From 2bfaf5b1594b4cfff742e7814f5853b867291836 Mon Sep 17 00:00:00 2001 From: sisamiwe Date: Thu, 27 Jul 2023 12:46:35 +0200 Subject: [PATCH 01/41] DB_ADDON: - Introduce plugin parameter to lock database before reading - allow excluding items from calculation via WebIF - allow to re-calculate items per WebIF - allow plugin item cache to be cleared for certain item per WebIF - just use shtime for time and date calculation - make sure, that db query always fetches latest entries - internal improvements --- db_addon/__init__.py | 953 ++++++++++++---------- db_addon/item_attributes_master.py | 299 ------- db_addon/locale.yaml | 0 db_addon/plugin.yaml | 17 +- db_addon/requirements.txt | 0 db_addon/user_doc.rst | 0 db_addon/webif/__init__.py | 102 ++- db_addon/webif/static/img/plugin_logo.png | Bin db_addon/webif/templates/index.html | 111 ++- 9 files changed, 733 insertions(+), 749 deletions(-) mode change 100755 => 100644 db_addon/__init__.py delete mode 100755 db_addon/item_attributes_master.py mode change 100755 => 100644 db_addon/locale.yaml mode change 100755 => 100644 db_addon/plugin.yaml mode change 100755 => 100644 db_addon/requirements.txt mode change 100755 => 100644 db_addon/user_doc.rst mode change 100755 => 100644 db_addon/webif/__init__.py mode change 100755 => 100644 db_addon/webif/static/img/plugin_logo.png mode change 100755 => 100644 db_addon/webif/templates/index.html diff --git a/db_addon/__init__.py b/db_addon/__init__.py old mode 100755 new mode 100644 index f20b78023..02c521b7a --- a/db_addon/__init__.py +++ b/db_addon/__init__.py @@ -30,8 +30,11 @@ import time import re import queue +import threading +import logging from dateutil.relativedelta import relativedelta from typing import Union +from dataclasses import dataclass, InitVar from lib.model.smartplugin import SmartPlugin from lib.item import Items @@ -53,7 +56,8 @@ class DatabaseAddOn(SmartPlugin): Main class of the Plugin. Does all plugin specific stuff and provides the update functions for the items """ - PLUGIN_VERSION = '1.2.2' + PLUGIN_VERSION = '1.2.3' + REVISION = 'C' def __init__(self, sh): """ @@ -75,6 +79,8 @@ def __init__(self, sh): # define variables for database, database connection, working queue and status self.item_queue = queue.Queue() # Queue containing all to be executed items + # ToDo: Check if still needed + self.queue_consumer_thread = None # Queue consumer thread self._db_plugin = None # object if database plugin self._db = None # object of database self.connection_data = None # connection data list of database @@ -82,19 +88,13 @@ def __init__(self, sh): self.db_instance = None # instance of the used database self.item_attribute_search_str = 'database' # attribute, on which an item configured for database can be identified self.last_connect_time = 0 # mechanism for limiting db connection requests + # ToDo: Check if still needed + self.last_commit_time = 0 self.alive = None # Is plugin alive? self.startup_finished = False # Startup of Plugin finished self.suspended = False # Is plugin activity suspended self.active_queue_item: str = '-' # String holding item path of currently executed item - # define debug logs - self.parse_debug = True # Enable / Disable debug logging for method 'parse item' - self.execute_debug = True # Enable / Disable debug logging for method 'execute items' - self.sql_debug = True # Enable / Disable debug logging for sql stuff - self.ondemand_debug = True # Enable / Disable debug logging for method 'handle_ondemand' - self.onchange_debug = True # Enable / Disable debug logging for method 'handle_onchange' - self.prepare_debug = True # Enable / Disable debug logging for query preparation - # define default mysql settings self.default_connect_timeout = 60 self.default_net_read_timeout = 60 @@ -106,6 +106,12 @@ def __init__(self, sh): self.value_filter = self.get_parameter_value('value_filter') self.optimize_value_filter = self.get_parameter_value('optimize_value_filter') self.use_oldest_entry = self.get_parameter_value('use_oldest_entry') + self.lock_db_for_query = self.get_parameter_value('lock_db_for_query') + # ToDo: Check if still needed + self.refresh_cycle = self.get_parameter_value('refresh_cycle') + + # get debug log options + self.debug_log = DebugLogOptions(self.log_level) # init cache dicts self._init_cache_dicts() @@ -132,20 +138,21 @@ def run(self): return self.deinit() self.logger.debug("Initialization of database API successful") - # init db + # check initialization of db if not self._initialize_db(): self.logger.error("Connection to database failed") return self.deinit() + self._db.close() # check db connection settings - if self.db_driver is not None and self.db_driver.lower() == 'pymysql': + if self.db_driver.lower() == 'pymysql': self._check_db_connection_setting() # add scheduler for cyclic trigger item calculation - self.scheduler_add('cyclic', self.execute_due_items, prio=3, cron='5 0 0 * * *', cycle=None, value=None, offset=None, next=None) + self.scheduler_add('cyclic', self.execute_due_items, prio=3, cron='10 0 * * *', cycle=None, value=None, offset=None, next=None) # add scheduler to trigger items to be calculated at startup with delay - dt = self.shtime.now() + datetime.timedelta(seconds=(self.startup_run_delay + 3)) + dt = self.shtime.now() + relativedelta(seconds=(self.startup_run_delay + 3)) self.logger.info(f"Set scheduler for calculating startup-items with delay of {self.startup_run_delay + 3}s to {dt}.") self.scheduler_add('startup', self.execute_startup_items, next=dt) @@ -156,8 +163,12 @@ def run(self): self.alive = True # work item queue + self.work_item_queue() + + # ToDo: Check if still needed + """ try: - self.work_item_queue() + self._queue_consumer_thread_startup() except Exception as e: self.logger.warning(f"During working item queue Exception '{e}' occurred.") self.logger.debug(e, exc_info=True) @@ -165,6 +176,7 @@ def run(self): # self.deinit() self.logger.error("Suspend Plugin and clear Item-Queue.") self.suspend(True) + """ def stop(self): """ @@ -174,6 +186,9 @@ def stop(self): self.logger.debug("Stop method called") self.alive = False self.scheduler_remove('cyclic') + self._db.close() + # ToDo: Check if still needed + # self._queue_consumer_thread_shutdown() def parse_item(self, item: Item): """ @@ -198,7 +213,7 @@ def get_query_parameters_from_db_addon_fct() -> Union[dict, None]: if db_addon_fct in HISTORIE_ATTRIBUTES_ONCHANGE: # handle functions 'minmax on-change' in format 'minmax_timeframe_func' items like 'minmax_heute_max', 'minmax_heute_min', 'minmax_woche_max', 'minmax_woche_min' - timeframe = harmonize_timeframe_expression(db_addon_fct_vars[1]) + timeframe = translate_timeframe(db_addon_fct_vars[1]) func = db_addon_fct_vars[2] if db_addon_fct_vars[2] in ALLOWED_MINMAX_FUNCS else None start = end = 0 log_text = 'minmax_timeframe_func' @@ -209,7 +224,7 @@ def get_query_parameters_from_db_addon_fct() -> Union[dict, None]: func = db_addon_fct_vars[3] start, timeframe = split_sting_letters_numbers(db_addon_fct_vars[2]) start = to_int(start) - timeframe = harmonize_timeframe_expression(timeframe) + timeframe = translate_timeframe(timeframe) end = 0 log_text = 'minmax_last_timedelta|timeframe_function' required_params = [func, timeframe, start, end] @@ -217,7 +232,7 @@ def get_query_parameters_from_db_addon_fct() -> Union[dict, None]: elif db_addon_fct in HISTORIE_ATTRIBUTES_TIMEFRAME: # handle functions 'min/max/avg' in format 'minmax_timeframe_timedelta_func' like 'minmax_heute_minus2_max' func = db_addon_fct_vars[3] # min, max, avg - timeframe = harmonize_timeframe_expression(db_addon_fct_vars[1]) # day, week, month, year + timeframe = translate_timeframe(db_addon_fct_vars[1]) # day, week, month, year end = to_int(split_sting_letters_numbers(db_addon_fct_vars[2])[1]) start = end log_text = 'minmax_timeframe_timedelta_func' @@ -226,7 +241,7 @@ def get_query_parameters_from_db_addon_fct() -> Union[dict, None]: elif db_addon_fct in ZAEHLERSTAND_ATTRIBUTES_TIMEFRAME: # handle functions 'zaehlerstand' in format 'zaehlerstand_timeframe_timedelta' like 'zaehlerstand_heute_minus1' # func = 'max' - timeframe = harmonize_timeframe_expression(db_addon_fct_vars[1]) + timeframe = translate_timeframe(db_addon_fct_vars[1]) end = to_int(split_sting_letters_numbers(db_addon_fct_vars[2])[1]) start = end log_text = 'zaehlerstand_timeframe_timedelta' @@ -234,7 +249,7 @@ def get_query_parameters_from_db_addon_fct() -> Union[dict, None]: elif db_addon_fct in VERBRAUCH_ATTRIBUTES_ONCHANGE: # handle functions 'verbrauch on-change' items in format 'verbrauch_timeframe' like 'verbrauch_heute', 'verbrauch_woche', 'verbrauch_monat', 'verbrauch_jahr' - timeframe = harmonize_timeframe_expression(db_addon_fct_vars[1]) + timeframe = translate_timeframe(db_addon_fct_vars[1]) end = 0 start = 1 log_text = 'verbrauch_timeframe' @@ -242,7 +257,7 @@ def get_query_parameters_from_db_addon_fct() -> Union[dict, None]: elif db_addon_fct in VERBRAUCH_ATTRIBUTES_TIMEFRAME: # handle functions 'verbrauch on-demand' in format 'verbrauch_timeframe_timedelta' like 'verbrauch_heute_minus2' - timeframe = harmonize_timeframe_expression(db_addon_fct_vars[1]) + timeframe = translate_timeframe(db_addon_fct_vars[1]) # end = to_int(db_addon_fct_vars[2][-1]) end = to_int(split_sting_letters_numbers(db_addon_fct_vars[2])[1]) start = end + 1 @@ -250,28 +265,29 @@ def get_query_parameters_from_db_addon_fct() -> Union[dict, None]: required_params = [timeframe, start, end] elif db_addon_fct in VERBRAUCH_ATTRIBUTES_ROLLING: + # ToDo: check if rolling window correct; muss start und ende dynamisch berechnet werden? # handle functions 'verbrauch_on-demand' in format 'verbrauch_rolling_window_timeframe_timedelta' like 'verbrauch_rolling_12m_woche_minus1' func = db_addon_fct_vars[1] window_inc, window_dur = split_sting_letters_numbers(db_addon_fct_vars[2]) window_inc = to_int(window_inc) # 12 - window_dur = harmonize_timeframe_expression(window_dur) # day, week, month, year - timeframe = harmonize_timeframe_expression(db_addon_fct_vars[3]) # day, week, month, year + window_dur = translate_timeframe(window_dur) # day, week, month, year + timeframe = translate_timeframe(db_addon_fct_vars[3]) # day, week, month, year end = to_int(split_sting_letters_numbers(db_addon_fct_vars[4])[1]) if window_dur in ALLOWED_QUERY_TIMEFRAMES and window_inc and timeframe and end: - start = to_int(convert_timeframe(timeframe, window_dur) * window_inc) + end + start = to_int(timeframe_to_timeframe(timeframe, window_dur) * window_inc) + end log_text = 'verbrauch_rolling_window_timeframe_timedelta' required_params = [func, timeframe, start, end] elif db_addon_fct in VERBRAUCH_ATTRIBUTES_JAHRESZEITRAUM: # handle functions of format 'verbrauch_jahreszeitraum_timedelta' like 'verbrauch_jahreszeitraum_minus1' - timeframe = harmonize_timeframe_expression(db_addon_fct_vars[1]) # day, week, month, year + timeframe = translate_timeframe(db_addon_fct_vars[1]) # day, week, month, year timedelta = to_int(split_sting_letters_numbers(db_addon_fct_vars[2])[1]) log_text = 'verbrauch_jahreszeitraum_timedelta' required_params = [timeframe, timedelta] elif db_addon_fct in TAGESMITTEL_ATTRIBUTES_ONCHANGE: # handle functions 'tagesmitteltemperatur on-change' items in format 'tagesmitteltemperatur_timeframe' like 'tagesmitteltemperatur_heute', 'tagesmitteltemperatur_woche', 'tagesmitteltemperatur_monat', 'tagesmitteltemperatur_jahr' - timeframe = harmonize_timeframe_expression(db_addon_fct_vars[1]) + timeframe = translate_timeframe(db_addon_fct_vars[1]) func = 'max' start = end = 0 log_text = 'tagesmitteltemperatur_timeframe' @@ -280,7 +296,7 @@ def get_query_parameters_from_db_addon_fct() -> Union[dict, None]: elif db_addon_fct in TAGESMITTEL_ATTRIBUTES_TIMEFRAME: # handle 'tagesmitteltemperatur_timeframe_timedelta' like 'tagesmitteltemperatur_heute_minus1' func = 'max' - timeframe = harmonize_timeframe_expression(db_addon_fct_vars[1]) + timeframe = translate_timeframe(db_addon_fct_vars[1]) end = to_int(split_sting_letters_numbers(db_addon_fct_vars[2])[1]) start = end method = 'avg_hour' @@ -290,10 +306,10 @@ def get_query_parameters_from_db_addon_fct() -> Union[dict, None]: elif db_addon_fct in SERIE_ATTRIBUTES_MINMAX: # handle functions 'serie_minmax' in format 'serie_minmax_timeframe_func_start|group' like 'serie_minmax_monat_min_15m' func = db_addon_fct_vars[3] - timeframe = harmonize_timeframe_expression(db_addon_fct_vars[2]) + timeframe = translate_timeframe(db_addon_fct_vars[2]) start, group = split_sting_letters_numbers(db_addon_fct_vars[4]) start = to_int(start) - group = harmonize_timeframe_expression(group) + group = translate_timeframe(group) end = 0 log_text = 'serie_minmax_timeframe_func_start|group' required_params = [func, timeframe, start, end, group] @@ -301,20 +317,20 @@ def get_query_parameters_from_db_addon_fct() -> Union[dict, None]: elif db_addon_fct in SERIE_ATTRIBUTES_ZAEHLERSTAND: # handle functions 'serie_zaehlerstand' in format 'serie_zaehlerstand_timeframe_start|group' like 'serie_zaehlerstand_tag_30d' func = 'max' - timeframe = harmonize_timeframe_expression(db_addon_fct_vars[2]) + timeframe = translate_timeframe(db_addon_fct_vars[2]) start, group = split_sting_letters_numbers(db_addon_fct_vars[3]) start = to_int(start) - group = harmonize_timeframe_expression(group) + group = translate_timeframe(group) log_text = 'serie_zaehlerstand_timeframe_start|group' required_params = [timeframe, start, group] elif db_addon_fct in SERIE_ATTRIBUTES_VERBRAUCH: # handle all functions of format 'serie_verbrauch_timeframe_start|group' like 'serie_verbrauch_tag_30d' func = 'diff_max' - timeframe = harmonize_timeframe_expression(db_addon_fct_vars[2]) + timeframe = translate_timeframe(db_addon_fct_vars[2]) start, group = split_sting_letters_numbers(db_addon_fct_vars[3]) start = to_int(start) - group = harmonize_timeframe_expression(group) + group = translate_timeframe(group) log_text = 'serie_verbrauch_timeframe_start|group' required_params = [timeframe, start, group] @@ -323,7 +339,7 @@ def get_query_parameters_from_db_addon_fct() -> Union[dict, None]: func = 'sum_max' start, timeframe = split_sting_letters_numbers(db_addon_fct_vars[3]) start = to_int(start) - timeframe = harmonize_timeframe_expression(timeframe) + timeframe = translate_timeframe(timeframe) end = 0 group = 'day', group2 = 'month' @@ -336,7 +352,7 @@ def get_query_parameters_from_db_addon_fct() -> Union[dict, None]: timeframe = 'year' start, group = split_sting_letters_numbers(db_addon_fct_vars[2]) start = to_int(start) - group = harmonize_timeframe_expression(group) + group = translate_timeframe(group) end = 0 log_text = 'serie_tagesmittelwert_count|group' required_params = [func, timeframe, start, end, group] @@ -349,17 +365,17 @@ def get_query_parameters_from_db_addon_fct() -> Union[dict, None]: group = 'hour' start, group2 = split_sting_letters_numbers(db_addon_fct_vars[3]) start = to_int(start) - group2 = harmonize_timeframe_expression(group2) + group2 = translate_timeframe(group2) log_text = 'serie_tagesmittelwert_group2_count|group' required_params = [func, timeframe, start, end, group, group2] elif db_addon_fct in SERIE_ATTRIBUTES_MITTEL_H1: - # handle 'serie_tagesmittelwert_stunde_start_end|group' like 'serie_tagesmittelwert_stunde_30_0d' => Stundenmittelwerte von vor 30 Tage bis vor 0 Tagen (also heute) + # handle 'serie_tagesmittelwert_stunde_start_end|group' like 'serie_tagesmittelwert_stunde_30_0d' => Stundenmittelwerte von vor 30 Tagen bis vor 0 Tagen (also heute) method = 'avg_hour' start = to_int(db_addon_fct_vars[3]) end, timeframe = split_sting_letters_numbers(db_addon_fct_vars[4]) end = to_int(end) - timeframe = harmonize_timeframe_expression(timeframe) + timeframe = translate_timeframe(timeframe) log_text = 'serie_tagesmittelwert_stunde_start_end|group' required_params = [timeframe, method, start, end] @@ -369,7 +385,7 @@ def get_query_parameters_from_db_addon_fct() -> Union[dict, None]: end = 0 start, timeframe = split_sting_letters_numbers(db_addon_fct_vars[4]) start = to_int(start) - timeframe = harmonize_timeframe_expression(timeframe) + timeframe = translate_timeframe(timeframe) log_text = 'serie_tagesmittelwert_tag_stunde_end|group' required_params = [timeframe, method, start, end] @@ -461,7 +477,7 @@ def get_database_item_path() -> tuple: for i in range(3): if self.has_iattr(_lookup_item.conf, 'db_addon_database_item'): - if self.parse_debug: + if self.debug_log.parse: self.logger.debug(f"Attribut 'db_addon_database_item' for item='{item.path()}' has been found {i + 1} level above item at '{_lookup_item.path()}'.") _database_item_path = self.get_iattr_value(_lookup_item.conf, 'db_addon_database_item') _startup = bool(self.get_iattr_value(_lookup_item.conf, 'db_addon_startup')) @@ -480,7 +496,7 @@ def get_database_item() -> Item: for i in range(2): if self.has_iattr(_lookup_item.conf, self.item_attribute_search_str): - if self.parse_debug: + if self.debug_log.parse: self.logger.debug(f"Attribut '{self.item_attribute_search_str}' for item='{item.path()}' has been found {i + 1} level above item at '{_lookup_item.path()}'.") return _lookup_item else: @@ -532,7 +548,7 @@ def format_db_addon_ignore_value_list(optimize: bool = self.optimize_value_filte db_addon_ignore_value_list_formatted.append(f"{op} {value}") max_values[op].append(value) - if self.parse_debug: + if self.debug_log.parse: self.logger.debug(f"Summarized 'ignore_value_list' for item {item.path()}: {db_addon_ignore_value_list_formatted}") if not db_addon_ignore_value_list_formatted: @@ -541,7 +557,7 @@ def format_db_addon_ignore_value_list(optimize: bool = self.optimize_value_filte if not optimize: return db_addon_ignore_value_list_formatted - if self.parse_debug: + if self.debug_log.parse: self.logger.debug(f"Optimizing 'ignore_value_list' for item {item.path()} active.") # find low @@ -572,7 +588,7 @@ def format_db_addon_ignore_value_list(optimize: bool = self.optimize_value_filte if (not lower_end[0] or (lower_end[0] and v >= lower_end[1])) or (not upper_end[0] or (upper_end[0] and v <= upper_end[1])): db_addon_ignore_value_list_optimized.append(f'!= {v}') - if self.parse_debug: + if self.debug_log.parse: self.logger.debug(f"Optimized 'ignore_value_list' for item {item.path()}: {db_addon_ignore_value_list_optimized}") return db_addon_ignore_value_list_optimized @@ -580,7 +596,7 @@ def format_db_addon_ignore_value_list(optimize: bool = self.optimize_value_filte # handle all items with db_addon_fct if self.has_iattr(item.conf, 'db_addon_fct'): - if self.parse_debug: + if self.debug_log.parse: self.logger.debug(f"parse item: {item.path()} due to 'db_addon_fct'") # get db_addon_fct attribute value @@ -600,7 +616,7 @@ def format_db_addon_ignore_value_list(optimize: bool = self.optimize_value_filte database_item = get_database_item() db_addon_startup = bool(self.get_iattr_value(item.conf, 'db_addon_startup')) if database_item is None: - self.logger.warning(f"No database item found for {item.path()}: Item ignored. Maybe you should check instance of database plugin.") + self.logger.warning(f"No database item found for item={item.path()}: Item ignored. Maybe you should check instance of database plugin.") return # get/create list of comparison operators and check it @@ -623,20 +639,20 @@ def format_db_addon_ignore_value_list(optimize: bool = self.optimize_value_filte if db_addon_ignore_value_list: db_addon_ignore_value_list_final = format_db_addon_ignore_value_list() - if self.parse_debug: + if self.debug_log.parse: self.logger.debug(f"{db_addon_ignore_value_list_final=}") query_params.update({'ignore_value_list': db_addon_ignore_value_list_final}) # create standard items config - item_config_data_dict = {'db_addon': 'function', 'db_addon_fct': db_addon_fct, 'database_item': database_item, 'query_params': query_params} + item_config_data_dict = {'db_addon': 'function', 'db_addon_fct': db_addon_fct, 'database_item': database_item, 'query_params': query_params, 'active': True} if isinstance(database_item, str): item_config_data_dict.update({'database_item_path': True}) else: database_item = database_item.path() # do logging - if self.parse_debug: - self.logger.debug(f"Item '{item.path()}' added with db_addon_fct={db_addon_fct} and database_item={database_item}") + if self.debug_log.parse: + self.logger.debug(f"Item={item.path()} added with db_addon_fct={db_addon_fct} and database_item={database_item}") # add cycle for item groups if db_addon_fct in ALL_DAILY_ATTRIBUTES: @@ -661,7 +677,7 @@ def format_db_addon_ignore_value_list(optimize: bool = self.optimize_value_filte item_config_data_dict.update({'cycle': f"{timeframe_to_updatecyle(cycle)}"}) # do logging - if self.parse_debug: + if self.debug_log.parse: self.logger.debug(f"Item '{item.path()}' added to be run {item_config_data_dict['cycle']}.") # create item config for item to be run on startup @@ -675,21 +691,21 @@ def format_db_addon_ignore_value_list(optimize: bool = self.optimize_value_filte # handle all items with db_addon_info elif self.has_iattr(item.conf, 'db_addon_info'): - if self.parse_debug: - self.logger.debug(f"parse item: {item.path()} due to used item attribute 'db_addon_info'") + if self.debug_log.parse: + self.logger.debug(f"parse item={item.path()} due to used item attribute 'db_addon_info'") self.add_item(item, config_data_dict={'db_addon': 'info', 'db_addon_fct': f"info_{self.get_iattr_value(item.conf, 'db_addon_info').lower()}", 'database_item': None, 'startup': True}) # handle all items with db_addon_admin elif self.has_iattr(item.conf, 'db_addon_admin'): - if self.parse_debug: - self.logger.debug(f"parse item: {item.path()} due to used item attribute 'db_addon_admin'") + if self.debug_log.parse: + self.logger.debug(f"parse item={item.path()} due to used item attribute 'db_addon_admin'") self.add_item(item, config_data_dict={'db_addon': 'admin', 'db_addon_fct': f"admin_{self.get_iattr_value(item.conf, 'db_addon_admin').lower()}", 'database_item': None}) return self.update_item # Reference to 'update_item' für alle Items mit Attribut 'database', um die on_change Items zu berechnen elif self.has_iattr(item.conf, self.item_attribute_search_str) and has_db_addon_item(): - if self.parse_debug: - self.logger.debug(f"reference to update_item for item '{item.path()}' will be set due to on-change") + if self.debug_log.parse: + self.logger.debug(f"reference to update_item for item={item.path()} will be set due to on-change") self.add_item(item, config_data_dict={'db_addon': 'database'}) return self.update_item @@ -739,7 +755,7 @@ def execute_startup_items(self) -> None: self.execute_items(option='startup') self.startup_finished = True - def execute_items(self, option: str = 'due'): + def execute_items(self, option: str = 'due', item: str = None): """Execute all items per option""" def _create_due_items() -> list: @@ -752,33 +768,36 @@ def _create_due_items() -> list: self.previous_values[DAY] = {} # wenn Wochentag == Montag, werden auch die wöchentlichen Items berechnet - if self.shtime.now().hour == 0 and self.shtime.now().minute == 0 and self.shtime.weekday( - self.shtime.today()) == 1: + if self.shtime.weekday(self.shtime.today()) == 1: _todo_items.update(set(self._weekly_items())) self.current_values[WEEK] = {} self.previous_values[WEEK] = {} # wenn der erste Tage eines Monates ist, werden auch die monatlichen Items berechnet - if self.shtime.now().hour == 0 and self.shtime.now().minute == 0 and self.shtime.now().day == 1: + if self.shtime.now().day == 1: _todo_items.update(set(self._monthly_items())) self.current_values[MONTH] = {} self.previous_values[MONTH] = {} - # wenn der erste Tage des ersten Monates eines Jahres ist, werden auch die jährlichen Items berechnet - if self.shtime.now().hour == 0 and self.shtime.now().minute == 0 and self.shtime.now().day == 1 and self.shtime.now().month == 1: - _todo_items.update(set(self._yearly_items())) - self.current_values[YEAR] = {} - self.previous_values[YEAR] = {} + # wenn der erste Tage des ersten Monates eines Jahres ist, werden auch die jährlichen Items berechnet + if self.shtime.now().month == 1: + _todo_items.update(set(self._yearly_items())) + self.current_values[YEAR] = {} + self.previous_values[YEAR] = {} return list(_todo_items) - if self.execute_debug: + if self.debug_log.execute: self.logger.debug(f"execute_items called with {option=}") if self.suspended: self.logger.info(f"Plugin is suspended. No items will be calculated.") return + deactivated_items = self._deactivated_items() + if len(deactivated_items) > 0: + self.logger.info(f"{len(deactivated_items)} are de-activated and will not be calculated.") + todo_items = [] if option == 'startup': todo_items = self._startup_items() @@ -794,7 +813,17 @@ def _create_due_items() -> list: todo_items = self._all_items() elif option == 'due': todo_items = _create_due_items() + elif option == 'item': + if isinstance(item, str): + item = self.items.return_item(item) + if isinstance(item, Item): + todo_items = [item] + # remove de-activated items + if option != 'item': + todo_items = list(set(todo_items) - set(deactivated_items)) + + # put to queue self.logger.info(f"{len(todo_items)} items will be calculated for {option=}.") [self.item_queue.put(i) for i in todo_items] @@ -804,17 +833,18 @@ def work_item_queue(self) -> None: while self.alive: try: queue_entry = self.item_queue.get(True, 10) + self.logger.debug(f"{queue_entry=}") except queue.Empty: self.active_queue_item = '-' pass else: if isinstance(queue_entry, tuple): item, value = queue_entry - self.logger.info(f"# {self.item_queue.qsize() + 1} item(s) to do. || 'on-change' item '{item.path()}' with {value=} will be processed.") + self.logger.info(f"# {self.item_queue.qsize() + 1} item(s) to do. || 'on-change' item={item.path()} with {value=} will be processed.") self.active_queue_item = str(item.path()) self.handle_onchange(item, value) else: - self.logger.info(f"# {self.item_queue.qsize() + 1} item(s) to do. || 'on-demand' item '{queue_entry.path()}' will be processed.") + self.logger.info(f"# {self.item_queue.qsize() + 1} item(s) to do. || 'on-demand' item={queue_entry.path()} will be processed.") self.active_queue_item = str(queue_entry.path()) self.handle_ondemand(queue_entry) @@ -827,7 +857,7 @@ def handle_ondemand(self, item: Item) -> None: # get parameters item_config = self.get_item_config(item) - if self.ondemand_debug: + if self.debug_log.ondemand: self.logger.debug(f"Item={item.path()} with {item_config=}") db_addon_fct = item_config['db_addon_fct'] database_item = item_config['database_item'] @@ -838,7 +868,7 @@ def handle_ondemand(self, item: Item) -> None: else: params = {} - if self.ondemand_debug: + if self.debug_log.ondemand: self.logger.debug(f"{db_addon_fct=} will _query_item with {params=}.") # handle item starting with 'verbrauch_' @@ -846,7 +876,7 @@ def handle_ondemand(self, item: Item) -> None: result = self._handle_verbrauch(params) if result and result < 0: - self.logger.warning(f"Result of item {item.path()} with {db_addon_fct=} was negative. Something seems to be wrong.") + self.logger.info(f"Result of item {item.path()} with {db_addon_fct=} was negative. Something seems to be wrong.") # handle 'serie_verbrauch' elif db_addon_fct in SERIE_ATTRIBUTES_VERBRAUCH: @@ -907,7 +937,7 @@ def handle_ondemand(self, item: Item) -> None: result = self._query_item(**params)[0][1] # log result - if self.ondemand_debug: + if self.debug_log.ondemand: self.logger.debug(f"result is {result} for item '{item.path()}' with '{db_addon_fct=}'") if result is None: @@ -932,7 +962,7 @@ def handle_minmax(): cache_dict = self.current_values[timeframe] init = False - if self.onchange_debug: + if self.debug_log.onchange: self.logger.debug(f"'minmax' Item={updated_item.path()} with {func=} and {timeframe=} detected. Check for update of cache_dicts {cache_dict=} and item value.") # make sure, that database item is in cache dict @@ -942,55 +972,55 @@ def handle_minmax(): # get _recent_value; if not already cached, create cache cached_value = cache_dict[database_item].get(func) if cached_value is None: - if self.onchange_debug: + if self.debug_log.onchange: self.logger.debug(f"{func} value for {timeframe=} of item={updated_item.path()} not in cache dict. Query database.") query_params = {'func': func, 'database_item': database_item, 'timeframe': timeframe, 'start': 0, 'end': 0, 'ignore_value_list': ignore_value_list, 'use_oldest_entry': True} cached_value = self._query_item(**query_params)[0][1] if cached_value is None: - if self.onchange_debug: - self.logger.debug(f"{func} value for {timeframe=} of item={updated_item.path()} not available in database. Abort calculation.") + if self.debug_log.onchange: + self.logger.debug(f"{func} value for {timeframe=} of item={updated_item.path()} not available in database. Abort calculation.") return init = True - # if value not given -> read + # if value not given if init: - if self.onchange_debug: - self.logger.debug(f"initial {func} value for {timeframe=} of item={item.path()} with will be set to {cached_value}") - cache_dict[database_item][func] = cached_value - return cached_value + if self.debug_log.onchange: + self.logger.debug(f"initial {func} value for {timeframe=} of item={item.path()} with will be set to {value}") + cache_dict[database_item][func] = value + return value # check value for update of cache dict min elif func == 'min' and value < cached_value: - if self.onchange_debug: + if self.debug_log.onchange: self.logger.debug(f"new value={value} lower then current min_value={cached_value} for {timeframe=}. cache_dict will be updated") cache_dict[database_item][func] = value return value # check value for update of cache dict max elif func == 'max' and value > cached_value: - if self.onchange_debug: + if self.debug_log.onchange: self.logger.debug(f"new value={value} higher then current max_value={cached_value} for {timeframe=}. cache_dict will be updated") cache_dict[database_item][func] = value return value # no impact - if self.onchange_debug: + if self.debug_log.onchange: self.logger.debug(f"new value={value} will not change max/min for period={timeframe}.") return None def handle_verbrauch(): cache_dict = self.previous_values[timeframe] - if self.onchange_debug: + if self.debug_log.onchange: self.logger.debug(f"'verbrauch' item {updated_item.path()} with {func=} and {value=} detected. Check for update of cache_dicts {cache_dict=} and item value.") # get _cached_value for value at end of last period; if not already cached, create cache cached_value = cache_dict.get(database_item) if cached_value is None: - if self.onchange_debug: + if self.debug_log.onchange: self.logger.debug(f"Most recent value for last {timeframe=} of item={updated_item.path()} not in cache dict. Query database.") # try to get most recent value of last timeframe, assuming that this is the value at end of last timeframe @@ -1002,12 +1032,12 @@ def handle_verbrauch(): return cache_dict[database_item] = cached_value - if self.onchange_debug: + if self.debug_log.onchange: self.logger.debug(f"Value for Item={updated_item.path()} at end of last {timeframe} not in cache dict. Value={cached_value} has been added.") # calculate value, set item value, put data into plugin_item_dict _new_value = value - cached_value - return _new_value if isinstance(_new_value, int) else round(_new_value, 1) + return _new_value if isinstance(_new_value, int) else round(_new_value, 2) def handle_tagesmittel(): result = self._prepare_value_list(database_item=database_item, timeframe='day', start=0, end=0, ignore_value_list=ignore_value_list, method='first_hour') @@ -1015,17 +1045,18 @@ def handle_tagesmittel(): if isinstance(result, list): return result[0][1] - if self.onchange_debug: + if self.debug_log.onchange: self.logger.debug(f"called with updated_item={updated_item.path()} and value={value}.") relevant_item_list = set(self.get_item_list('database_item', updated_item)) & set(self.get_item_list('cycle', 'on-change')) - if self.onchange_debug: + if self.debug_log.onchange: self.logger.debug(f"Following items where identified for update: {relevant_item_list}.") for item in relevant_item_list: item_config = self.get_item_config(item) - self.logger.debug(f"Item={item.path()} with {item_config=}") + if self.debug_log.onchange: + self.logger.debug(f"Item={item.path()} with {item_config=}") db_addon_fct = item_config['db_addon_fct'] database_item = item_config['database_item'] timeframe = item_config['query_params']['timeframe'] @@ -1035,7 +1066,7 @@ def handle_tagesmittel(): # handle all on_change functions if db_addon_fct not in ALL_ONCHANGE_ATTRIBUTES: - if self.onchange_debug: + if self.debug_log.onchange: self.logger.debug(f"non on-change function detected. Skip update.") continue @@ -1074,8 +1105,19 @@ def _update_database_items(self) -> None: if db_addon_startup: item_config.update({'startup': True}) + def _activate_item_calculation(self, item: Union[str, Item], active: bool = True) -> None: + """active / de-active item calculation""" + if isinstance(item, str): + item = self.items.return_item(item) + + if not isinstance(item, Item): + return + + item_config = self.get_item_config(item) + item_config['active'] = active + @property - def log_level(self): + def log_level(self) -> int: return self.logger.getEffectiveLevel() def queue_backlog(self) -> int: @@ -1120,6 +1162,9 @@ def _database_item_path_items(self) -> list: def _ondemand_items(self) -> list: return self._daily_items() + self._weekly_items() + self._monthly_items() + self._yearly_items() + self._static_items() + def _deactivated_items(self) -> list: + return self.get_item_list('active', False) + def _all_items(self) -> list: # return self._ondemand_items() + self._onchange_items() + self._static_items() + self._admin_items() + self._info_items() return self.get_item_list('db_addon', 'function') @@ -1133,7 +1178,7 @@ def gruenlandtemperatursumme(self, item_path: str, year: Union[int, str] = None) Query database for gruenlandtemperatursumme for given year or year https://de.wikipedia.org/wiki/Gr%C3%BCnlandtemperatursumme - Beim Grünland wird die Wärmesumme nach Ernst und Loeper benutzt, um den Vegetationsbeginn und somit den Termin von Düngungsmaßnahmen zu bestimmen. + Beim Grünland wird die Wärmesumme nach Ernst und Loeper benutzt, um den Vegetationsbeginn und somit den Termin von Duengemaßnahmen zu bestimmen. Dabei erfolgt die Aufsummierung der Tagesmitteltemperaturen über 0 °C, wobei der Januar mit 0.5 und der Februar mit 0.75 gewichtet wird. Bei einer Wärmesumme von 200 Grad ist eine Düngung angesagt. @@ -1199,7 +1244,7 @@ def tagesmitteltemperatur(self, item_path: str, timeframe: str = None, count: in count = to_int(count) end = 0 start = end + count - query_params = {'database_item': item, 'func': 'max', 'timeframe': harmonize_timeframe_expression(timeframe), 'start': start, 'end': end} + query_params = {'database_item': item, 'func': 'max', 'timeframe': translate_timeframe(timeframe), 'start': start, 'end': end} return self._handle_tagesmitteltemperatur(**query_params) def wachstumsgradtage(self, item_path: str, year: Union[int, str] = None, method: int = 0, threshold: int = 10) -> Union[int, None]: @@ -1295,11 +1340,11 @@ def suspend(self, state: bool = False) -> bool: """ if state: - self.logger.warning("Plugin is set to 'suspended'. Queries to database will not be made until suspension is cancelled.") + self.logger.info("Plugin is set to 'suspended'. Queries to database will not be made until suspension is cleared.") self.suspended = True self._clear_queue() else: - self.logger.warning("Plugin suspension cancelled. Queries to database will be resumed.") + self.logger.info("Plugin suspension cleared. Queries to database will be resumed.") self.suspended = False # write back value to item, if one exists @@ -1333,8 +1378,8 @@ def _handle_verbrauch(self, query_params: dict) -> Union[None, float]: # define start, end for verbrauch_jahreszeitraum_timedelta if 'timedelta' in query_params: timedelta = query_params.pop('timedelta') - today = datetime.date.today() - start_date = datetime.date(today.year, 1, 1) - relativedelta(years=timedelta) + today = self.shtime.today(offset=0) + start_date = self.shtime.beginning_of_year(offset=-timedelta) end_date = today - relativedelta(years=timedelta) start = (today - start_date).days end = (today - end_date).days @@ -1343,14 +1388,14 @@ def _handle_verbrauch(self, query_params: dict) -> Union[None, float]: end = query_params['end'] # calculate consumption - if self.prepare_debug: + if self.debug_log.prepare: self.logger.debug(f"called with {query_params=}") # get value for end and check it; query_params.update({'func': 'last', 'start': end, 'end': end}) value_end = self._query_item(**query_params)[0][1] - if self.prepare_debug: + if self.debug_log.prepare: self.logger.debug(f"{value_end=}") if value_end is None or value_end == 0: @@ -1359,36 +1404,37 @@ def _handle_verbrauch(self, query_params: dict) -> Union[None, float]: # get value for start and check it; query_params.update({'func': 'last', 'start': start, 'end': start}) value_start = self._query_item(**query_params)[0][1] - if self.prepare_debug: + if self.debug_log.prepare: self.logger.debug(f"{value_start=}") if value_start is None: - if self.prepare_debug: + if self.debug_log.prepare: self.logger.debug(f"Error occurred during query. Return.") return if not value_start: - self.logger.info(f"No DB Entry found for requested start date. Looking for next recent DB entry.") + self.logger.info(f"No DB Entry of item={query_params['database_item'].path()} found for requested start date. Looking for next recent DB entry.") query_params.update({'func': 'next'}) value_start = self._query_item(**query_params)[0][1] - if self.prepare_debug: + if self.debug_log.prepare: self.logger.debug(f"next recent value is {value_start=}") if not value_start: value_start = 0 - if self.prepare_debug: + if self.debug_log.prepare: self.logger.debug(f"No start value available. Will be set to 0 as default") # calculate consumption consumption = value_end - value_start - if self.prepare_debug: - self.logger.debug(f"{consumption=}") if isinstance(consumption, float): if consumption.is_integer(): consumption = int(consumption) else: - consumption = round(consumption, 1) + consumption = round(consumption, 2) + + if self.debug_log.prepare: + self.logger.debug(f"{consumption=}") return consumption @@ -1402,7 +1448,7 @@ def _handle_verbrauch_serie(self, query_params: dict) -> list: for i in range(1, start): value = self._handle_verbrauch({'database_item': database_item, 'timeframe': timeframe, 'start': i + 1, 'end': i}) - ts_start, ts_end = get_start_end_as_timestamp(timeframe, i, i + 1) + ts_start, ts_end = self._get_start_end_as_timestamp(timeframe, i, i + 1) series.append([ts_end, value]) return series @@ -1420,33 +1466,34 @@ def _handle_zaehlerstand(self, query_params: dict) -> Union[float, int, None]: - Ergibt diese Abfrage keinen Wert, dann Rückgabe von None """ - if self.prepare_debug: + if self.debug_log.prepare: self.logger.debug(f"called with {query_params=}") # get last value of timeframe query_params.update({'func': 'last'}) last_value = self._query_item(**query_params)[0][1] - if self.prepare_debug: + if self.debug_log.prepare: self.logger.debug(f"{last_value=}") if last_value is None: - if self.prepare_debug: + if self.debug_log.prepare: self.logger.debug(f"Error occurred during query. Return.") return if not last_value: # get last value (next) before timeframe - self.logger.info(f"No DB Entry found for requested start date. Looking for next recent DB entry.") + if self.debug_log.prepare: + self.logger.debug(f"No DB entry for item={query_params['database_item'].path()} found for requested start date. Looking for next recent DB entry.") query_params.update({'func': 'next'}) last_value = self._query_item(**query_params)[0][1] - if self.prepare_debug: + if self.debug_log.prepare: self.logger.debug(f"next recent value is {last_value=}") if isinstance(last_value, float): if last_value.is_integer(): last_value = int(last_value) else: - last_value = round(last_value, 1) + last_value = round(last_value, 2) return last_value @@ -1460,7 +1507,7 @@ def _handle_zaehlerstand_serie(self, query_params: dict) -> list: for i in range(1, start): value = self._handle_zaehlerstand({'database_item': database_item, 'timeframe': timeframe, 'start': i, 'end': i}) - ts_start = get_start_end_as_timestamp(timeframe, i, i)[0] + ts_start = self._get_start_end_as_timestamp(timeframe, i, i)[0] series.append([ts_start, value]) return series @@ -1476,30 +1523,29 @@ def _handle_kaeltesumme(self, database_item: Item, year: Union[int, str] = None, :return: kaeltesumme """ - if self.prepare_debug: + if self.debug_log.prepare: self.logger.debug(f"called with {database_item=}, {year=}, {month=}") # check validity of given year - if not valid_year(year): + if not self._valid_year(year): self.logger.error(f"Year for item={database_item.path()} was {year}. This is not a valid year. Query cancelled.") return - # set default year - if not year: - year = 'current' + # get datetime of today + today = self.shtime.today(offset=0) # define year - if year == 'current': - if datetime.date.today() < datetime.date(int(datetime.date.today().year), 9, 21): - year = datetime.date.today().year - 1 + if not year or year == 'current': + if today < datetime.date(int(today.year), 9, 21): + year = today.year - 1 else: - year = datetime.date.today().year + year = today.year # define start_date and end_date if month is None: start_date = datetime.date(int(year), 9, 21) end_date = datetime.date(int(year) + 1, 3, 22) - elif valid_month(month): + elif self._valid_month(month): start_date = datetime.date(int(year), int(month), 1) end_date = start_date + relativedelta(months=+1) - datetime.timedelta(days=1) else: @@ -1507,7 +1553,6 @@ def _handle_kaeltesumme(self, database_item: Item, year: Union[int, str] = None, return # define start / end - today = datetime.date.today() if start_date > today: self.logger.error(f"Start time for query of item={database_item.path()} is in future. Query cancelled.") return @@ -1519,10 +1564,10 @@ def _handle_kaeltesumme(self, database_item: Item, year: Union[int, str] = None, return # get raw data as list - if self.prepare_debug: + if self.debug_log.prepare: self.logger.debug("try to get raw data") raw_data = self._prepare_value_list(database_item=database_item, timeframe='day', start=start, end=end, method='avg_hour') - if self.execute_debug: + if self.debug_log.prepare: self.logger.debug(f"raw_value_list={raw_data=}") # calculate value @@ -1549,7 +1594,7 @@ def _handle_waermesumme(self, database_item: Item, year: Union[int, str] = None, # get raw data as list raw_data = self._prepare_waermesumme(database_item=database_item, year=year, month=month) - if self.execute_debug: + if self.debug_log.prepare: self.logger.debug(f"raw_value_list={raw_data=}") # set threshold to min 0 @@ -1578,7 +1623,7 @@ def _handle_gruenlandtemperatursumme(self, database_item: Item, year: Union[int, # get raw data as list raw_data = self._prepare_waermesumme(database_item=database_item, year=year) - if self.execute_debug: + if self.debug_log.prepare: self.logger.debug(f"raw_data={raw_data}") # calculate value @@ -1591,7 +1636,7 @@ def _handle_gruenlandtemperatursumme(self, database_item: Item, year: Union[int, for entry in raw_data: timestamp, value = entry if value > 0: - dt = datetime.datetime.fromtimestamp(timestamp / 1000) + dt = self._timestamp_to_datetime(timestamp / 1000) if dt.month == 1: value = value * 0.5 elif dt.month == 2: @@ -1611,24 +1656,22 @@ def _handle_wachstumsgradtage(self, database_item: Item, year: Union[int, str] = :return: wachstumsgradtage """ - # set default year - if not year: - year = 'current' - - if not valid_year(year): + if not self._valid_year(year): self.logger.error(f"Year for item={database_item.path()} was {year}. This is not a valid year. Query cancelled.") return + # get datetime of today + today = self.shtime.today(offset=0) + # define year - if year == 'current': - year = datetime.date.today().year + if not year or year == 'current': + year = today.year # define start_date, end_date start_date = datetime.date(int(year), 1, 1) end_date = datetime.date(int(year), 9, 21) # check start_date - today = datetime.date.today() if start_date > today: self.logger.info(f"Start time for query of item={database_item.path()} is in future. Query cancelled.") return @@ -1643,8 +1686,8 @@ def _handle_wachstumsgradtage(self, database_item: Item, year: Union[int, str] = return # get raw data as list - raw_data = self._prepare_value_list(database_item=database_item, timeframe='day', start=start, end=end, method='minmax_hour') - if self.execute_debug: + raw_data = self._prepare_value_list(database_item=database_item, timeframe='day', start=start, end=end, method='minmax_hour') + if self.debug_log.prepare: self.logger.debug(f"raw_value_list={raw_data}") # calculate value @@ -1709,24 +1752,22 @@ def _handle_temperaturserie(self, database_item: Item, year: Union[int, str] = N :return: list of temperatures """ - # set default year - if not year: - year = 'current' - - if not valid_year(year): + if not self._valid_year(year): self.logger.error(f"Year for item={database_item.path()} was {year}. This is not a valid year. Query cancelled.") return + # get datetime of today + today = self.shtime.today(offset=0) + # define year - if year == 'current': - year = datetime.date.today().year + if not year or year == 'current': + year = today.year # define start_date, end_date start_date = datetime.date(int(year), 1, 1) end_date = datetime.date(int(year), 12, 31) # check start_date - today = datetime.date.today() if start_date > today: self.logger.info(f"Start time for query of item={database_item.path()} is in future. Query cancelled.") return @@ -1742,7 +1783,7 @@ def _handle_temperaturserie(self, database_item: Item, year: Union[int, str] = N # get raw data as list temp_list = self._prepare_value_list(database_item=database_item, timeframe='day', start=start, end=end, method=method) - if self.execute_debug: + if self.debug_log.prepare: self.logger.debug(f"{temp_list=}") return temp_list @@ -1751,23 +1792,22 @@ def _prepare_waermesumme(self, database_item: Item, year: Union[int, str] = None """Prepares raw data for waermesumme""" # check validity of given year - if not valid_year(year): + if not self._valid_year(year): self.logger.error(f"Year for item={database_item.path()} was {year}. This is not a valid year. Query cancelled.") return - # set default year - if not year: - year = 'current' + # get datetime of today + today = self.shtime.today(offset=0) # define year - if year == 'current': - year = datetime.date.today().year + if not year or year == 'current': + year = today.year # define start_date, end_date if month is None: start_date = datetime.date(int(year), 1, 1) end_date = datetime.date(int(year), 9, 21) - elif valid_month(month): + elif self._valid_month(month): start_date = datetime.date(int(year), int(month), 1) end_date = start_date + relativedelta(months=+1) - datetime.timedelta(days=1) else: @@ -1775,7 +1815,6 @@ def _prepare_waermesumme(self, database_item: Item, year: Union[int, str] = None return # check start_date - today = datetime.date.today() if start_date > today: self.logger.info(f"Start time for query of item={database_item.path()} is in future. Query cancelled.") return @@ -1814,12 +1853,12 @@ def _prepare_value_list(self, database_item: Item, timeframe: str, start: int, e def _create_raw_value_dict(block: str) -> dict: """ create dict of datetimes (per day or hour) and values based on database query result in format {'datetime1': [values]}, 'datetime1': [values], ..., 'datetimex': [values]} - :param block: defined the increment of datetimes, default is hour, furhter possible is 'day' + :param block: defined the increment of datetimes, default is hour, further possible is 'day' """ _value_dict = {} for _entry in raw_data: - dt = datetime.datetime.utcfromtimestamp(_entry[0] / 1000) + dt = self._timestamp_to_datetime(_entry[0] / 1000) dt = dt.replace(minute=0, second=0, microsecond=0) if block == 'day': dt = dt.replace(hour=0) @@ -1843,15 +1882,18 @@ def _create_value_list_timestamp_value(option: str) -> list: _value_list = [] # create nested list with timestamp, avg_value per hour/day for entry in value_dict: - _timestamp = datetime_to_timestamp(entry) + _timestamp = self._datetime_to_timestamp(entry) if option == 'first': _value_list.append([_timestamp, value_dict[entry][0]]) elif option == 'avg': - _value_list.append([_timestamp, round(sum(value_dict[entry]) / len(value_dict[entry]), 1)]) + _value_list.append([_timestamp, round(sum(value_dict[entry]) / len(value_dict[entry]), 2)]) elif option == 'minmax': _value_list.append([_timestamp, min(value_dict[entry]), max(value_dict[entry])]) return _value_list + if self.debug_log.prepare: + self.logger.debug(f'called with database_item={database_item.path()}, {timeframe=}, {start=}, {end=}, {ignore_value_list=}, {method=}') + # check method if method in ['avg_day', 'avg_hour', 'minmax_day', 'minmax_hour', 'first_day', 'first_hour']: _method, _block = method.split('_') @@ -1864,18 +1906,18 @@ def _create_value_list_timestamp_value(option: str) -> list: # get raw data from database raw_data = self._query_item(func='raw', database_item=database_item, timeframe=timeframe, start=start, end=end, ignore_value_list=ignore_value_list) - if raw_data in [[[None, None]], [[0, 0]]]: - self.logger.warning("no valid data from database query received during _prepare_value_list. Aborting...") + if raw_data == [[None, None]] or raw_data == [[0, 0]]: + self.logger.info(f"no valid data from database query for item={database_item.path()} received during _prepare_value_list. Aborting...") return # create nested dict with values value_dict = _create_raw_value_dict(block=_block) - if self.prepare_debug: + if self.debug_log.prepare: self.logger.debug(f"{value_dict=}") # return value list result = _create_value_list_timestamp_value(option=_method) - if self.prepare_debug: + if self.debug_log.prepare: self.logger.debug(f"{method=}, {result=}") return result @@ -1937,33 +1979,9 @@ def _get_db_parameter(self) -> bool: else: return True - def _initialize_db(self) -> bool: - """ - Initializes database connection - - :return: Status of initialization - """ - - try: - if not self._db.connected(): - # limit connection requests to 20 seconds. - current_time = time.time() - time_delta_last_connect = current_time - self.last_connect_time - if time_delta_last_connect > 20: - self.last_connect_time = time.time() - self._db.connect() - else: - self.logger.error(f"_initialize_db: Database reconnect suppressed: Delta time: {time_delta_last_connect}") - return False - except Exception as e: - self.logger.critical(f"_initialize_db: Database: Initialization failed: {e}") - return False - else: - return True - def _check_db_connection_setting(self) -> None: """ - Check Setting of DB connection for stable use. + Check Setting of mysql connection for stable use. """ try: connect_timeout = int(self._get_db_connect_timeout()[1]) @@ -1998,8 +2016,8 @@ def _get_oldest_log(self, item: Item) -> Union[None, int]: self.item_cache[item] = {} self.item_cache[item]['oldest_log'] = oldest_log - if self.prepare_debug: - self.logger.debug(f"_get_oldest_log for item {item.path()} = {oldest_log}") + if self.debug_log.prepare: + self.logger.debug(f"_get_oldest_log for item={item.path()} = {oldest_log}") return oldest_log @@ -2024,7 +2042,7 @@ def _get_oldest_value(self, item: Item) -> Union[int, float, bool]: oldest_log = self._get_oldest_log(item) if oldest_log is None: validity = True - self.logger.error(f"oldest_log for item {item.path()} could not be read; value is set to -999999999") + self.logger.error(f"oldest_log for item={item.path()} could not be read; value is set to -999999999") oldest_entry = self._read_log_timestamp(item_id, oldest_log) i += 1 if isinstance(oldest_entry, list) and isinstance(oldest_entry[0], tuple) and len(oldest_entry[0]) >= 4: @@ -2035,10 +2053,10 @@ def _get_oldest_value(self, item: Item) -> Union[int, float, bool]: validity = True elif i == 10: validity = True - self.logger.error(f"oldest_value for item {item.path()} could not be read; value is set to -999999999") + self.logger.error(f"oldest_value for item={item.path()} could not be read; value is set to -999999999") - if self.prepare_debug: - self.logger.debug(f"_get_oldest_value for item {item.path()} = {_oldest_value}") + if self.debug_log.prepare: + self.logger.debug(f"_get_oldest_value for item={item.path()} = {_oldest_value}") return _oldest_value @@ -2080,7 +2098,7 @@ def _get_itemid_for_query(self, item: Union[Item, str, int]) -> Union[int, None] item_id = None return item_id - def _query_item(self, func: str, database_item: Item, timeframe: str, start: int = None, end: int = 0, group: str = None, group2: str = None, ignore_value_list=None, use_oldest_entry: bool = False) -> list: + def _query_item(self, func: str, database_item: Item, timeframe: str, start: int = None, end: int = 0, group: str = "", group2: str = "", ignore_value_list=None, use_oldest_entry: bool = False) -> list: """ Do diverse checks of input, and prepare query of log by getting item_id, start / end in timestamp etc. @@ -2097,84 +2115,85 @@ def _query_item(self, func: str, database_item: Item, timeframe: str, start: int :return: query response / list for value pairs [[None, None]] for errors, [[0,0]] for no-data in DB """ - if self.prepare_debug: - self.logger.debug(f"called with {func=}, item={database_item.path()}, {timeframe=}, {start=}, {end=}, {group=}, {group2=}, {ignore_value_list=}") + if self.debug_log.prepare: + self.logger.debug(f" called with {func=}, item={database_item.path()}, {timeframe=}, {start=}, {end=}, {group=}, {group2=}, {ignore_value_list=}, {use_oldest_entry=}") # set default result - default_result = [[None, None]] + error_result = [[None, None]] + nodata_result = [[0, 0]] # check correctness of timeframe if timeframe not in ALLOWED_QUERY_TIMEFRAMES: self.logger.error(f"Requested {timeframe=} for item={database_item.path()} not defined; Need to be 'year' or 'month' or 'week' or 'day' or 'hour''. Query cancelled.") - return default_result + return error_result # define start and end of query as timestamp in microseconds - ts_start, ts_end = get_start_end_as_timestamp(timeframe, start, end) + ts_start, ts_end = self._get_start_end_as_timestamp(timeframe, start, end) oldest_log = self._get_oldest_log(database_item) if oldest_log is None: - return default_result + return error_result # check correctness of ts_start / ts_end if ts_start is None: ts_start = oldest_log if ts_end is None or ts_start > ts_end: - if self.prepare_debug: + if self.debug_log.prepare: self.logger.debug(f"{ts_start=}, {ts_end=}") self.logger.warning(f"Requested {start=} for item={database_item.path()} is not valid since {start=} < {end=} or end not given. Query cancelled.") - return default_result + return error_result # define item_id item_id = self._get_itemid(database_item) if not item_id: - self.logger.error(f"ItemId for item={database_item.path()} not found. Query cancelled.") - return default_result + self.logger.error(f"DB ItemId for item={database_item.path()} not found. Query cancelled.") + return error_result - if self.prepare_debug: - self.logger.debug(f"Requested {timeframe=} with {start=} and {end=} resulted in start being timestamp={ts_start} / {timestamp_to_timestring(ts_start)} and end being timestamp={ts_end} / {timestamp_to_timestring(ts_end)}") + if self.debug_log.prepare: + self.logger.debug(f" Requested {timeframe=} with {start=} and {end=} resulted in start being timestamp={ts_start}/{self._timestamp_to_timestring(ts_start)} and end being timestamp={ts_end}/{self._timestamp_to_timestring(ts_end)}") # check if values for end time and start time are in database if ts_end < oldest_log: # (Abfrage abbrechen, wenn Endzeitpunkt in UNIX-timestamp der Abfrage kleiner (und damit jünger) ist, als der UNIX-timestamp des ältesten Eintrages) - self.logger.info(f"Requested end time timestamp={ts_end} / {timestamp_to_timestring(ts_end)} of query for Item='{database_item.path()}' is prior to oldest entry with timestamp={oldest_log} / {timestamp_to_timestring(oldest_log)}. Query cancelled.") - return default_result + self.logger.info(f" Requested end time timestamp={ts_end}/{self._timestamp_to_timestring(ts_end)} of query for item={database_item.path()} is prior to oldest entry with timestamp={oldest_log}/{self._timestamp_to_timestring(oldest_log)}. Query cancelled.") + return error_result if ts_start < oldest_log: if self.use_oldest_entry or use_oldest_entry: - self.logger.info(f"Requested start time timestamp={ts_start} / {timestamp_to_timestring(ts_start)} of query for Item='{database_item.path()}' is prior to oldest entry with timestamp={oldest_log} / {timestamp_to_timestring(oldest_log)}. Oldest available entry will be used.") + self.logger.info(f" Requested start time timestamp={ts_start}/{self._timestamp_to_timestring(ts_start)} of query for item={database_item.path()} is prior to oldest entry with timestamp={oldest_log}/{self._timestamp_to_timestring(oldest_log)}. Oldest available entry will be used.") ts_start = oldest_log else: - self.logger.info(f"Requested start time timestamp={ts_start} / {timestamp_to_timestring(ts_start)} of query for Item='{database_item.path()}' is prior to oldest entry with timestamp={oldest_log} / {timestamp_to_timestring(oldest_log)}. Query cancelled.") - return default_result + self.logger.info(f" Requested start time timestamp={ts_start}/{self._timestamp_to_timestring(ts_start)} of query for item={database_item.path()} is prior to oldest entry with timestamp={oldest_log}/{self._timestamp_to_timestring(oldest_log)}. Query cancelled.") + return error_result # prepare and do query query_params = {'func': func, 'item_id': item_id, 'ts_start': ts_start, 'ts_end': ts_end, 'group': group, 'group2': group2, 'ignore_value_list': ignore_value_list} query_result = self._query_log_timestamp(**query_params) - if self.prepare_debug: - self.logger.debug(f"result of '_query_log_timestamp' {query_result=}") + if self.debug_log.prepare: + self.logger.debug(f" result of '_query_log_timestamp' {query_result=}") # post process query_result if query_result is None: - self.logger.error(f"Error occurred during _query_item. Aborting...") - return default_result + self.logger.error(f"Error occurred during '_query_log_timestamp' of item={database_item.path()}. Aborting...") + return error_result if len(query_result) == 0: - self.logger.info(f"No values for item in requested timeframe in database found.") - return [[0, 0]] + self.logger.info(f" No values for item={database_item.path()} in requested timeframe between {ts_start}/{self._timestamp_to_timestring(ts_start)} and {ts_end}/{self._timestamp_to_timestring(ts_end)} in database found.") + return nodata_result result = [] for element in query_result: timestamp, value = element if timestamp is not None and value is not None: if isinstance(value, float): - value = round(value, 1) + value = round(value, 2) result.append([timestamp, value]) - if self.prepare_debug: - self.logger.debug(f"value for item={database_item.path()} with {query_params=}: {result}") + if self.debug_log.prepare: + self.logger.debug(f" value for item={database_item.path()} with {query_params=}: {result}") if not result: - self.logger.info(f"No values for item in requested timeframe in database found.") - return default_result + self.logger.info(f" No values for item={database_item.path()} in requested timeframe between {ts_start}/{self._timestamp_to_timestring(ts_start)} and {ts_end}/{self._timestamp_to_timestring(ts_end)} in database found.") + return nodata_result return result @@ -2201,6 +2220,28 @@ def _init_cache_dicts(self) -> None: YEAR: {} } + def _clean_item_cache(self, item: Union[str, Item]) -> None: + """set cached values for item to None""" + + if isinstance(item, str): + item = self.items.return_item(item) + + if not isinstance(item, Item): + return + + database_item = self.get_item_config(item).get('database_item') + + if database_item: + for timeframe in self.previous_values: + for cached_item in self.previous_values[timeframe]: + if cached_item == database_item: + self.previous_values[timeframe][cached_item] = None + + for timeframe in self.current_values: + for cached_item in self.current_values[timeframe]: + if cached_item == database_item: + self.current_values[timeframe][cached_item] = {} + def _clear_queue(self) -> None: """ Clear working queue @@ -2209,11 +2250,108 @@ def _clear_queue(self) -> None: self.logger.info(f"Working queue will be cleared. Calculation run will end.") self.item_queue.queue.clear() + # ToDo: Check if still needed + def _queue_consumer_thread_startup(self): + """Start a thread to work item queue""" + + self.logger = logging.getLogger(__name__) + _name = 'plugins.' + self.get_fullname() + '.work_item_queue' + + try: + self.queue_consumer_thread = threading.Thread(target=self.work_item_queue, name=_name, daemon=False) + self.queue_consumer_thread.start() + self.logger.debug("Thread for 'queue_consumer_thread' has been started") + except threading.ThreadError: + self.logger.error("Unable to launch thread for 'queue_consumer_thread'.") + self.queue_consumer_thread = None + + # ToDo: Check if still needed + def _queue_consumer_thread_shutdown(self): + """Shut down the thread to work item queue""" + + if self.queue_consumer_thread: + self.queue_consumer_thread.join() + if self.queue_consumer_thread.is_alive(): + self.logger.error("Unable to shut down 'queue_consumer_thread' thread") + else: + self.logger.info("Thread 'queue_consumer_thread' has been shut down.") + self.queue_consumer_thread = None + + def _get_start_end_as_timestamp(self, timeframe: str, start: Union[int, str, None], end: Union[int, str, None]) -> tuple: + """ + Provides start and end as timestamp in microseconds from timeframe with start and end + + :param timeframe: timeframe as week, month, year + :param start: beginning timeframe in x timeframes from now + :param end: end of timeframe in x timeframes from now + + :return: start time in timestamp in microseconds, end time in timestamp in microseconds + + """ + + ts_start = ts_end = None + + def get_query_timestamp(_offset) -> int: + if timeframe == 'week': + _date = self.shtime.beginning_of_week(offset=_offset) + elif timeframe == 'month': + _date = self.shtime.beginning_of_month(offset=_offset) + elif timeframe == 'year': + _date = self.shtime.beginning_of_year(offset=_offset) + else: + _date = self.shtime.today(offset=_offset) + + return self._datetime_to_timestamp(datetime.datetime.combine(_date, datetime.datetime.min.time())) * 1000 + + if isinstance(start, str) and start.isdigit(): + start = int(start) + if isinstance(start, int): + ts_start = get_query_timestamp(-start) + + if isinstance(end, str) and end.isdigit(): + end = int(end) + if isinstance(end, int): + ts_end = get_query_timestamp(-end + 1) + + return ts_start, ts_end + + def _datetime_to_timestamp(self, dt: datetime) -> int: + """Provides timestamp from given datetime""" + + return int(dt.replace(tzinfo=self.shtime.tzinfo()).timestamp()) + + def _timestamp_to_datetime(self, timestamp: int) -> datetime: + """Parse timestamp from db query to datetime""" + + return datetime.datetime.fromtimestamp(timestamp / 1000, tz=self.shtime.tzinfo()) + + def _timestamp_to_timestring(self, timestamp: int) -> str: + """Parse timestamp from db query to string representing date and time""" + + return self._timestamp_to_datetime(timestamp).strftime('%Y-%m-%d %H:%M:%S') + + def _valid_year(self, year: Union[int, str]) -> bool: + """Check if given year is digit and within allowed range""" + + if ((isinstance(year, int) or (isinstance(year, str) and year.isdigit())) and ( + 1980 <= int(year) <= self.shtime.today(offset=0).year)) or (isinstance(year, str) and year == 'current'): + return True + else: + return False + + def _valid_month(self, month: Union[int, str]) -> bool: + """Check if given month is digit and within allowed range""" + + if (isinstance(month, int) or (isinstance(month, str) and month.isdigit())) and (1 <= int(month) <= 12): + return True + else: + return False + ################################# # Database Query Preparation ################################# - def _query_log_timestamp(self, func: str, item_id: int, ts_start: int, ts_end: int, group: str = None, group2: str = None, ignore_value_list=None) -> Union[list, None]: + def _query_log_timestamp(self, func: str, item_id: int, ts_start: int, ts_end: int, group: str = "", group2: str = "", ignore_value_list=None) -> Union[list, None]: """ Assemble a mysql query str and param dict based on given parameters, get query response and return it @@ -2230,7 +2368,7 @@ def _query_log_timestamp(self, func: str, item_id: int, ts_start: int, ts_end: i """ # do debug log - if self.prepare_debug: + if self.debug_log.prepare: self.logger.debug(f"Called with {func=}, {item_id=}, {ts_start=}, {ts_end=}, {group=}, {group2=}, {ignore_value_list=}") # define query parts @@ -2254,41 +2392,31 @@ def _query_log_timestamp(self, func: str, item_id: int, ts_start: int, ts_end: i } _table_alias = { - 'avg': '', 'avg1': ') AS table1 ', - 'min': '', - 'max': '', 'max1': ') AS table1 ', - 'sum': '', - 'on': '', - 'integrate': '', 'sum_max': ') AS table1 ', 'sum_avg': ') AS table1 ', 'sum_min_neg': ') AS table1 ', 'diff_max': ') AS table1 ', - 'next': '', - 'raw': '', - 'first': '', - 'last': '', } _order = { - 'avg': 'time ASC ', - 'avg1': 'time ASC ', - 'min': 'time ASC ', - 'max': 'time ASC ', - 'max1': 'time ASC ', - 'sum': 'time ASC ', - 'on': 'time ASC ', - 'integrate': 'time ASC ', - 'sum_max': 'time ASC ', - 'sum_avg': 'time ASC ', - 'sum_min_neg': 'time ASC ', - 'diff_max': 'time ASC ', - 'next': 'time DESC LIMIT 1 ', - 'raw': 'time ASC ', - 'first': 'time ASC LIMIT 1 ', - 'last': 'time DESC LIMIT 1 ', + 'avg1': 'ORDER BY time ASC ', + 'max1': 'ORDER BY time ASC ', + 'on': 'ORDER BY time ASC ', + 'sum_max': 'ORDER BY time ASC ', + 'sum_min_neg': 'ORDER BY time ASC ', + 'diff_max': 'ORDER BY time ASC ', + 'next': 'ORDER BY time DESC ', + 'raw': 'ORDER BY time ASC ', + 'first': 'ORDER BY time ASC ', + 'last': 'ORDER BY time DESC ', + } + + _limit = { + 'next': 'LIMIT 1 ', + 'first': 'LIMIT 1 ', + 'last': 'LIMIT 1 ', } _where = "item_id = :item_id AND time < :ts_start " if func == "next" else "item_id = :item_id AND time BETWEEN :ts_start AND :ts_end " @@ -2301,7 +2429,6 @@ def _query_log_timestamp(self, func: str, item_id: int, ts_start: int, ts_end: i "week": "GROUP BY YEARWEEK(FROM_UNIXTIME(time/1000), 5) ", "day": "GROUP BY DATE(FROM_UNIXTIME(time/1000)) ", "hour": "GROUP BY FROM_UNIXTIME((time/1000),'%Y%m%d%H') ", - None: "", } _group_by_sqlite = { @@ -2310,7 +2437,6 @@ def _query_log_timestamp(self, func: str, item_id: int, ts_start: int, ts_end: i "week": "GROUP BY strftime('%Y%W', date((time/1000),'unixepoch')) ", "day": "GROUP BY date((time/1000),'unixepoch') ", "hour": "GROUP BY strftime('%Y%m%d%H', datetime((time/1000),'unixepoch')) ", - None: "", } # select query parts depending in db driver @@ -2328,10 +2454,10 @@ def _query_log_timestamp(self, func: str, item_id: int, ts_start: int, ts_end: i return # check correctness of group and group2 - if group not in _group_by: + if group and group not in _group_by: self.logger.error(f"Requested {group=} for item={item_id=} not defined. Query cancelled.") return - if group2 not in _group_by: + if group2 and group2 not in _group_by: self.logger.error(f"Requested {group2=} for item={item_id=} not defined. Query cancelled.") return @@ -2348,75 +2474,62 @@ def _query_log_timestamp(self, func: str, item_id: int, ts_start: int, ts_end: i params.update({'ts_end': ts_end}) # assemble query - query = f"SELECT {_select[func]}FROM {_db_table}WHERE {_where}{_group_by[group]}ORDER BY {_order[func]}{_table_alias[func]}{_group_by[group2]}".strip() + query = f"SELECT {_select[func]}FROM {_db_table}WHERE {_where}{_group_by.get(group, '')}{_order.get(func, '')}{_limit.get(func, '')}{_table_alias.get(func, '')}{_group_by.get(group2, '')}".strip() if self.db_driver.lower() == 'sqlite3': query = query.replace('IF', 'IIF') # do debug log - if self.prepare_debug: + if self.debug_log.prepare: self.logger.debug(f"{query=}, {params=}") # request database and return result return self._fetchall(query, params) - def _read_log_all(self, item_id: int): + def _read_log_oldest(self, item_id: int) -> int: """ - Read the oldest log record for given item + Read the oldest log record for given database ID - :param item_id: item_id to read the record for - :return: Log record for item_id + :param item_id: Database ID of item to read the record for + :return: timestamp of oldest log entry of given item_id """ - if self.prepare_debug: - self.logger.debug(f"called for {item_id=}") - - query = "SELECT * FROM log WHERE (item_id = :item_id) AND (time = None OR 1 = 1)" params = {'item_id': item_id} - result = self._fetchall(query, params) - return result + query = "SELECT min(time) FROM log WHERE item_id = :item_id;" + return self._fetchall(query, params)[0][0] - def _read_log_oldest(self, item_id: int, cur=None) -> int: + def _read_log_newest(self, item_id: int) -> int: """ Read the oldest log record for given database ID :param item_id: Database ID of item to read the record for - :type item_id: int - :param cur: A database cursor object if available (optional) - - :return: Log record for the database ID + :return: timestamp of newest log entry of given item_id """ params = {'item_id': item_id} - query = "SELECT min(time) FROM log WHERE item_id = :item_id;" - return self._fetchall(query, params, cur=cur)[0][0] + query = "SELECT max(time) FROM log WHERE item_id = :item_id;" + return self._fetchall(query, params)[0][0] - def _read_log_timestamp(self, item_id: int, timestamp: int, cur=None) -> Union[list, None]: + def _read_log_timestamp(self, item_id: int, timestamp: int) -> Union[list, None]: """ Read database log record for given database ID :param item_id: Database ID of item to read the record for - :type item_id: int :param timestamp: timestamp for the given value - :type timestamp: int - :param cur: A database cursor object if available (optional) - :return: Log record for the database ID at given timestamp """ params = {'item_id': item_id, 'timestamp': timestamp} query = "SELECT * FROM log WHERE item_id = :item_id AND time = :timestamp;" - return self._fetchall(query, params, cur=cur) + return self._fetchall(query, params) - def _read_item_table(self, item_id: int = None, item_path: str = None): + def _read_item_table(self, item_id: int = None, item_path: str = None) -> Union[list, None]: """ Read item table :param item_id: unique ID for item within database :param item_path: item_path for Item within the database - :return: Data for the selected item - :rtype: tuple """ columns_entries = ('id', 'name', 'time', 'val_str', 'val_num', 'val_bool', 'changed') @@ -2456,9 +2569,34 @@ def _get_db_net_read_timeout(self) -> list: query = "SHOW GLOBAL VARIABLES LIKE 'net_read_timeout'" return self._fetchone(query) - ####################### - # Database Queries - ####################### + ############################### + # Database specific stuff + ############################### + + def _initialize_db(self) -> bool: + """ + Initializes database connection + + :return: Status of initialization + """ + + try: + if not self._db.connected(): + # limit connection requests to 20 seconds. + time_since_last_connect = time.time() - self.last_connect_time + if time_since_last_connect > 20: + self.last_connect_time = time.time() + self.logger.debug(f"Connect to database.") + self._db.connect() + else: + self.logger.warning(f"Database reconnect suppressed since last connection is less then 20sec ago.") + return False + + except Exception as e: + self.logger.critical(f"Initialization of Database Connection failed: {e}") + return False + + return True def _execute(self, query: str, params: dict = None, cur=None) -> list: if params is None: @@ -2476,13 +2614,15 @@ def _fetchall(self, query: str, params: dict = None, cur=None) -> list: if params is None: params = {} - return self._query(self._db.fetchall, query, params, cur) + tuples = self._query(self._db.fetchall, query, params, cur) + return None if tuples is None else list(tuples) - def _query(self, fetch, query: str, params: dict = None, cur=None) -> Union[None, list]: + # ToDo: Check if still needed. + def _query_geht(self, fetch, query: str, params: dict = None, cur=None) -> Union[None, list]: if params is None: params = {} - if self.sql_debug: + if self.debug_log.sql: self.logger.debug(f"Called with {query=}, {params=}, {cur=}") if not self._initialize_db(): @@ -2492,26 +2632,103 @@ def _query(self, fetch, query: str, params: dict = None, cur=None) -> Union[None if self._db.verify(5) == 0: self.logger.error("Connection to database not recovered.") return None - if not self._db.lock(300): - self.logger.error("Can't query due to fail to acquire lock.") + + if self.lock_db_for_query and not self._db.lock(300): + self.logger.error("Can't query database due to fail to acquire lock.") return None query_readable = re.sub(r':([a-z_]+)', r'{\1}', query).format(**params) + # do periodic commit to get latest data during fetch + time_since_last_commit = time.time() - self.last_commit_time + if time_since_last_commit > self.refresh_cycle: + self.last_commit_time = time.time() + self.logger.debug(f"Commit to database for getting updated data. time_since_last_commit={int(time_since_last_commit)}") + self._db.commit() + + # fetch data try: tuples = fetch(query, params, cur=cur) except Exception as e: - self.logger.error(f"Error for query '{query_readable}': {e}") + self.logger.error(f"Error '{e}' for query={query_readable} occurred.") tuples = None pass finally: - if cur is None: + if cur is None and self.lock_db_for_query: self._db.release() - if self.sql_debug: - self.logger.debug(f"Result of '{query_readable}': {tuples}") + if self.debug_log.sql: + self.logger.debug(f"Result of query={query_readable}: {tuples}") + + return tuples + + def _query(self, fetch, query: str, params: dict = None, cur=None) -> Union[None, list]: + if params is None: + params = {} + + if self.debug_log.sql: + self.logger.debug(f"Called with {query=}, {params=}, {cur=}") + + # recovery connection to database + if cur is None or not self._db.connected: + verify_conn = self._db.verify(retry=5) + if verify_conn == 0: + self.logger.error("Connection to database NOT recovered.") + return None + else: + if self.debug_log.sql: + self.logger.debug("Connection to database recovered.") + + # lock database if required + if cur is None and self.lock_db_for_query: + if not self._db.lock(300): + self.logger.error("Can't query database due to fail to acquire lock.") + return None + + # fetch data + query_readable = re.sub(r':([a-z_]+)', r'{\1}', query).format(**params) + try: + tuples = fetch(query, params, cur=cur) + except Exception as e: + self.logger.error(f"Error '{e}' for query={query_readable} occurred.") + tuples = None + pass + + # release database + if cur is None and self.lock_db_for_query: + self._db.release() + + # close connection + self._db.close() + + if self.debug_log.sql: + self.logger.debug(f"Result of query={query_readable}: {tuples}") + return tuples + +@dataclass +class DebugLogOptions: + """Class to simplify use and handling of debug log options.""" + + log_level: InitVar[int] = 10 + parse: bool = True # Enable / Disable debug logging for method 'parse item' + execute: bool = True # Enable / Disable debug logging for method 'execute items' + ondemand: bool = True # Enable / Disable debug logging for method 'handle_ondemand' + onchange: bool = True # Enable / Disable debug logging for method 'handle_onchange' + prepare: bool = True # Enable / Disable debug logging for query preparation + sql: bool = True # Enable / Disable debug logging for sql stuff + + def __post_init__(self, log_level): + if log_level > 10: + self.parse = False + self.execute = False + self.ondemand = False + self.onchange = False + self.prepare = False + self.prepare = False + + ####################### # Helper functions ####################### @@ -2539,42 +2756,11 @@ def params_to_dict(string: str) -> Union[dict, None]: return None elif key in ('start', 'end', 'count') and not isinstance(res_dict[key], int): return None - elif key in 'year': - if not valid_year(res_dict[key]): - return None - elif key in 'month': - if not valid_month(res_dict[key]): - return None return res_dict -def valid_year(year: Union[int, str]) -> bool: - """Check if given year is digit and within allowed range""" - - if ((isinstance(year, int) or (isinstance(year, str) and year.isdigit())) and ( - 1980 <= int(year) <= datetime.date.today().year)) or (isinstance(year, str) and year == 'current'): - return True - else: - return False - - -def valid_month(month: Union[int, str]) -> bool: - """Check if given month is digit and within allowed range""" - - if (isinstance(month, int) or (isinstance(month, str) and month.isdigit())) and (1 <= int(month) <= 12): - return True - else: - return False - - -def timestamp_to_timestring(timestamp: int) -> str: - """Parse timestamp from db query to string representing date and time""" - - return datetime.datetime.utcfromtimestamp(timestamp / 1000).strftime('%Y-%m-%d %H:%M:%S') - - -def harmonize_timeframe_expression(timeframe: str) -> str: - """harmonizes different expression of timeframe""" +def translate_timeframe(timeframe: str) -> str: + """translates different expression of timeframe""" lookup = { 'tag': 'day', @@ -2594,7 +2780,7 @@ def harmonize_timeframe_expression(timeframe: str) -> str: return lookup.get(timeframe) -def convert_timeframe(timeframe_in: str, timeframe_out: str) -> int: +def timeframe_to_timeframe(timeframe_in: str, timeframe_out: str) -> int: """Convert timeframe to timeframe like month in years or years in days""" _h_in_d = 24 @@ -2641,104 +2827,6 @@ def convert_timeframe(timeframe_in: str, timeframe_out: str) -> int: return lookup[timeframe_in][timeframe_out] -def get_start_end_as_timestamp(timeframe: str, start: Union[int, str, None], end: Union[int, str, None]) -> tuple: - """ - Provides start and end as timestamp in microseconds from timeframe with start and end - - :param timeframe: timeframe as week, month, year - :param start: beginning timeframe in x timeframes from now - :param end: end of timeframe in x timeframes from now - - :return: start time in timestamp in microseconds, end time in timestamp in microseconds - - """ - - def get_start() -> datetime: - if timeframe == 'week': - return _week_beginning() - elif timeframe == 'month': - return _month_beginning() - elif timeframe == 'year': - return _year_beginning() - else: - return _day_beginning() - - def get_end() -> datetime: - if timeframe == 'week': - return _week_end() - elif timeframe == 'month': - return _month_end() - elif timeframe == 'year': - return _year_end() - else: - return _day_end() - - def _year_beginning(delta: int = start) -> datetime: - """provides datetime of beginning of year of today minus x years""" - - _dt = datetime.datetime.combine(datetime.date.today(), datetime.datetime.min.time()) - return _dt.replace(month=1, day=1) - relativedelta(years=delta) - - def _year_end(delta: int = end) -> datetime: - """provides datetime of end of year of today minus x years""" - - return _year_beginning(delta) + relativedelta(years=1) - - def _month_beginning(delta: int = start) -> datetime: - """provides datetime of beginning of month minus x month""" - - _dt = datetime.datetime.combine(datetime.date.today(), datetime.datetime.min.time()) - return _dt.replace(day=1) - relativedelta(months=delta) - - def _month_end(delta: int = end) -> datetime: - """provides datetime of end of month minus x month""" - - return _month_beginning(delta) + relativedelta(months=1) - - def _week_beginning(delta: int = start) -> datetime: - """provides datetime of beginning of week minus x weeks""" - - _dt = datetime.datetime.combine(datetime.date.today(), datetime.datetime.min.time()) - return _dt - relativedelta(days=(datetime.date.today().weekday() + (delta * 7))) - - def _week_end(delta: int = end) -> datetime: - """provides datetime of end of week minus x weeks""" - - return _week_beginning(delta) + relativedelta(days=7) - - def _day_beginning(delta: int = start) -> datetime: - """provides datetime of beginning of today minus x days""" - - return datetime.datetime.combine(datetime.date.today(), datetime.datetime.min.time()) - relativedelta(days=delta) - - def _day_end(delta: int = end) -> datetime: - """provides datetime of end of today minus x days""" - - return _day_beginning(delta) + relativedelta(days=1) - - if isinstance(start, str) and start.isdigit(): - start = int(start) - if isinstance(start, int): - ts_start = datetime_to_timestamp(get_start()) * 1000 - else: - ts_start = None - - if isinstance(end, str) and end.isdigit(): - end = int(end) - if isinstance(end, int): - ts_end = datetime_to_timestamp(get_end()) * 1000 - else: - ts_end = None - - return ts_start, ts_end - - -def datetime_to_timestamp(dt: datetime) -> int: - """Provides timestamp from given datetime""" - - return int(dt.replace(tzinfo=datetime.timezone.utc).timestamp()) - - def to_int(arg) -> Union[int, None]: try: return int(arg) @@ -2776,4 +2864,3 @@ def split_sting_letters_numbers(string) -> list: ALLOWED_QUERY_TIMEFRAMES = ['year', 'month', 'week', 'day', 'hour'] ALLOWED_MINMAX_FUNCS = ['min', 'max', 'avg'] - diff --git a/db_addon/item_attributes_master.py b/db_addon/item_attributes_master.py deleted file mode 100755 index 00b54a8cf..000000000 --- a/db_addon/item_attributes_master.py +++ /dev/null @@ -1,299 +0,0 @@ -# !/usr/bin/env python -# vim: set encoding=utf-8 tabstop=4 softtabstop=4 shiftwidth=4 expandtab -# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # -# Copyright 2023 Michael Wenzel -# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # -# AVM for SmartHomeNG. https://github.com/smarthomeNG// -# -# This plugin is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# This plugin is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this plugin. If not, see . -# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # - -import ruamel.yaml - -FILENAME_ATTRIBUTES = 'item_attributes.py' - -FILENAME_PLUGIN = 'plugin.yaml' - -ITEM_ATTRIBUTES = { - 'db_addon_fct': { - 'verbrauch_heute': {'cat': 'verbrauch', 'sub_cat': 'onchange', 'item_type': 'num', 'calc': 'onchange', 'params': False, 'description': 'Verbrauch am heutigen Tag (Differenz zwischen aktuellem Wert und den Wert am Ende des vorherigen Tages)'}, - 'verbrauch_woche': {'cat': 'verbrauch', 'sub_cat': 'onchange', 'item_type': 'num', 'calc': 'onchange', 'params': False, 'description': 'Verbrauch in der aktuellen Woche'}, - 'verbrauch_monat': {'cat': 'verbrauch', 'sub_cat': 'onchange', 'item_type': 'num', 'calc': 'onchange', 'params': False, 'description': 'Verbrauch im aktuellen Monat'}, - 'verbrauch_jahr': {'cat': 'verbrauch', 'sub_cat': 'onchange', 'item_type': 'num', 'calc': 'onchange', 'params': False, 'description': 'Verbrauch im aktuellen Jahr'}, - 'verbrauch_heute_minus1': {'cat': 'verbrauch', 'sub_cat': 'timeframe', 'item_type': 'num', 'calc': 'daily', 'params': False, 'description': 'Verbrauch gestern (heute -1 Tag) (Differenz zwischen Wert am Ende des gestrigen Tages und dem Wert am Ende des Tages davor)'}, - 'verbrauch_heute_minus2': {'cat': 'verbrauch', 'sub_cat': 'timeframe', 'item_type': 'num', 'calc': 'daily', 'params': False, 'description': 'Verbrauch vorgestern (heute -2 Tage)'}, - 'verbrauch_heute_minus3': {'cat': 'verbrauch', 'sub_cat': 'timeframe', 'item_type': 'num', 'calc': 'daily', 'params': False, 'description': 'Verbrauch heute -3 Tage'}, - 'verbrauch_heute_minus4': {'cat': 'verbrauch', 'sub_cat': 'timeframe', 'item_type': 'num', 'calc': 'daily', 'params': False, 'description': 'Verbrauch heute -4 Tage'}, - 'verbrauch_heute_minus5': {'cat': 'verbrauch', 'sub_cat': 'timeframe', 'item_type': 'num', 'calc': 'daily', 'params': False, 'description': 'Verbrauch heute -5 Tage'}, - 'verbrauch_heute_minus6': {'cat': 'verbrauch', 'sub_cat': 'timeframe', 'item_type': 'num', 'calc': 'daily', 'params': False, 'description': 'Verbrauch heute -6 Tage'}, - 'verbrauch_heute_minus7': {'cat': 'verbrauch', 'sub_cat': 'timeframe', 'item_type': 'num', 'calc': 'daily', 'params': False, 'description': 'Verbrauch heute -7 Tage'}, - 'verbrauch_woche_minus1': {'cat': 'verbrauch', 'sub_cat': 'timeframe', 'item_type': 'num', 'calc': 'weekly', 'params': False, 'description': 'Verbrauch Vorwoche (aktuelle Woche -1)'}, - 'verbrauch_woche_minus2': {'cat': 'verbrauch', 'sub_cat': 'timeframe', 'item_type': 'num', 'calc': 'weekly', 'params': False, 'description': 'Verbrauch aktuelle Woche -2 Wochen'}, - 'verbrauch_woche_minus3': {'cat': 'verbrauch', 'sub_cat': 'timeframe', 'item_type': 'num', 'calc': 'weekly', 'params': False, 'description': 'Verbrauch aktuelle Woche -3 Wochen'}, - 'verbrauch_woche_minus4': {'cat': 'verbrauch', 'sub_cat': 'timeframe', 'item_type': 'num', 'calc': 'weekly', 'params': False, 'description': 'Verbrauch aktuelle Woche -4 Wochen'}, - 'verbrauch_monat_minus1': {'cat': 'verbrauch', 'sub_cat': 'timeframe', 'item_type': 'num', 'calc': 'monthly', 'params': False, 'description': 'Verbrauch Vormonat (aktueller Monat -1)'}, - 'verbrauch_monat_minus2': {'cat': 'verbrauch', 'sub_cat': 'timeframe', 'item_type': 'num', 'calc': 'monthly', 'params': False, 'description': 'Verbrauch aktueller Monat -2 Monate'}, - 'verbrauch_monat_minus3': {'cat': 'verbrauch', 'sub_cat': 'timeframe', 'item_type': 'num', 'calc': 'monthly', 'params': False, 'description': 'Verbrauch aktueller Monat -3 Monate'}, - 'verbrauch_monat_minus4': {'cat': 'verbrauch', 'sub_cat': 'timeframe', 'item_type': 'num', 'calc': 'monthly', 'params': False, 'description': 'Verbrauch aktueller Monat -4 Monate'}, - 'verbrauch_monat_minus12': {'cat': 'verbrauch', 'sub_cat': 'timeframe', 'item_type': 'num', 'calc': 'monthly', 'params': False, 'description': 'Verbrauch aktueller Monat -12 Monate'}, - 'verbrauch_jahr_minus1': {'cat': 'verbrauch', 'sub_cat': 'timeframe', 'item_type': 'num', 'calc': 'yearly', 'params': False, 'description': 'Verbrauch Vorjahr (aktuelles Jahr -1 Jahr)'}, - 'verbrauch_jahr_minus2': {'cat': 'verbrauch', 'sub_cat': 'timeframe', 'item_type': 'num', 'calc': 'yearly', 'params': False, 'description': 'Verbrauch aktuelles Jahr -2 Jahre'}, - 'verbrauch_rolling_12m_heute_minus1': {'cat': 'verbrauch', 'sub_cat': 'rolling', 'item_type': 'num', 'calc': 'daily', 'params': False, 'description': 'Verbrauch der letzten 12 Monate ausgehend im Ende des letzten Tages'}, - 'verbrauch_rolling_12m_woche_minus1': {'cat': 'verbrauch', 'sub_cat': 'rolling', 'item_type': 'num', 'calc': 'weekly', 'params': False, 'description': 'Verbrauch der letzten 12 Monate ausgehend im Ende der letzten Woche'}, - 'verbrauch_rolling_12m_monat_minus1': {'cat': 'verbrauch', 'sub_cat': 'rolling', 'item_type': 'num', 'calc': 'monthly', 'params': False, 'description': 'Verbrauch der letzten 12 Monate ausgehend im Ende des letzten Monats'}, - 'verbrauch_rolling_12m_jahr_minus1': {'cat': 'verbrauch', 'sub_cat': 'rolling', 'item_type': 'num', 'calc': 'yearly', 'params': False, 'description': 'Verbrauch der letzten 12 Monate ausgehend im Ende des letzten Jahres'}, - 'verbrauch_jahreszeitraum_minus1': {'cat': 'verbrauch', 'sub_cat': 'jahrzeit', 'item_type': 'num', 'calc': 'daily', 'params': False, 'description': 'Verbrauch seit dem 1.1. bis zum heutigen Tag des Vorjahres'}, - 'verbrauch_jahreszeitraum_minus2': {'cat': 'verbrauch', 'sub_cat': 'jahrzeit', 'item_type': 'num', 'calc': 'daily', 'params': False, 'description': 'Verbrauch seit dem 1.1. bis zum heutigen Tag vor 2 Jahren'}, - 'verbrauch_jahreszeitraum_minus3': {'cat': 'verbrauch', 'sub_cat': 'jahrzeit', 'item_type': 'num', 'calc': 'daily', 'params': False, 'description': 'Verbrauch seit dem 1.1. bis zum heutigen Tag vor 3 Jahren'}, - 'zaehlerstand_heute_minus1': {'cat': 'zaehler', 'sub_cat': 'timeframe', 'item_type': 'num', 'calc': 'daily', 'params': False, 'description': 'Zählerstand / Wert am Ende des letzten Tages (heute -1 Tag)'}, - 'zaehlerstand_heute_minus2': {'cat': 'zaehler', 'sub_cat': 'timeframe', 'item_type': 'num', 'calc': 'daily', 'params': False, 'description': 'Zählerstand / Wert am Ende des vorletzten Tages (heute -2 Tag)'}, - 'zaehlerstand_heute_minus3': {'cat': 'zaehler', 'sub_cat': 'timeframe', 'item_type': 'num', 'calc': 'daily', 'params': False, 'description': 'Zählerstand / Wert am Ende des vorvorletzten Tages (heute -3 Tag)'}, - 'zaehlerstand_woche_minus1': {'cat': 'zaehler', 'sub_cat': 'timeframe', 'item_type': 'num', 'calc': 'weekly', 'params': False, 'description': 'Zählerstand / Wert am Ende der vorvorletzten Woche (aktuelle Woche -1 Woche)'}, - 'zaehlerstand_woche_minus2': {'cat': 'zaehler', 'sub_cat': 'timeframe', 'item_type': 'num', 'calc': 'weekly', 'params': False, 'description': 'Zählerstand / Wert am Ende der vorletzten Woche (aktuelle Woche -2 Wochen)'}, - 'zaehlerstand_woche_minus3': {'cat': 'zaehler', 'sub_cat': 'timeframe', 'item_type': 'num', 'calc': 'weekly', 'params': False, 'description': 'Zählerstand / Wert am Ende der aktuellen Woche -3 Wochen'}, - 'zaehlerstand_monat_minus1': {'cat': 'zaehler', 'sub_cat': 'timeframe', 'item_type': 'num', 'calc': 'monthly', 'params': False, 'description': 'Zählerstand / Wert am Ende des letzten Monates (aktueller Monat -1 Monat)'}, - 'zaehlerstand_monat_minus2': {'cat': 'zaehler', 'sub_cat': 'timeframe', 'item_type': 'num', 'calc': 'monthly', 'params': False, 'description': 'Zählerstand / Wert am Ende des vorletzten Monates (aktueller Monat -2 Monate)'}, - 'zaehlerstand_monat_minus3': {'cat': 'zaehler', 'sub_cat': 'timeframe', 'item_type': 'num', 'calc': 'monthly', 'params': False, 'description': 'Zählerstand / Wert am Ende des aktuellen Monats -3 Monate'}, - 'zaehlerstand_jahr_minus1': {'cat': 'zaehler', 'sub_cat': 'timeframe', 'item_type': 'num', 'calc': 'yearly', 'params': False, 'description': 'Zählerstand / Wert am Ende des letzten Jahres (aktuelles Jahr -1 Jahr)'}, - 'zaehlerstand_jahr_minus2': {'cat': 'zaehler', 'sub_cat': 'timeframe', 'item_type': 'num', 'calc': 'yearly', 'params': False, 'description': 'Zählerstand / Wert am Ende des vorletzten Jahres (aktuelles Jahr -2 Jahre)'}, - 'zaehlerstand_jahr_minus3': {'cat': 'zaehler', 'sub_cat': 'timeframe', 'item_type': 'num', 'calc': 'yearly', 'params': False, 'description': 'Zählerstand / Wert am Ende des aktuellen Jahres -3 Jahre'}, - 'minmax_last_24h_min': {'cat': 'wertehistorie', 'sub_cat': 'last', 'item_type': 'num', 'calc': 'daily', 'params': False, 'description': 'minimaler Wert der letzten 24h'}, - 'minmax_last_24h_max': {'cat': 'wertehistorie', 'sub_cat': 'last', 'item_type': 'num', 'calc': 'daily', 'params': False, 'description': 'maximaler Wert der letzten 24h'}, - 'minmax_last_24h_avg': {'cat': 'wertehistorie', 'sub_cat': 'last', 'item_type': 'num', 'calc': 'daily', 'params': False, 'description': 'durchschnittlicher Wert der letzten 24h'}, - 'minmax_last_7d_min': {'cat': 'wertehistorie', 'sub_cat': 'last', 'item_type': 'num', 'calc': 'daily', 'params': False, 'description': 'minimaler Wert der letzten 7 Tage'}, - 'minmax_last_7d_max': {'cat': 'wertehistorie', 'sub_cat': 'last', 'item_type': 'num', 'calc': 'daily', 'params': False, 'description': 'maximaler Wert der letzten 7 Tage'}, - 'minmax_last_7d_avg': {'cat': 'wertehistorie', 'sub_cat': 'last', 'item_type': 'num', 'calc': 'daily', 'params': False, 'description': 'durchschnittlicher Wert der letzten 7 Tage'}, - 'minmax_heute_min': {'cat': 'wertehistorie', 'sub_cat': 'onchange', 'item_type': 'num', 'calc': 'onchange', 'params': False, 'description': 'Minimalwert seit Tagesbeginn'}, - 'minmax_heute_max': {'cat': 'wertehistorie', 'sub_cat': 'onchange', 'item_type': 'num', 'calc': 'onchange', 'params': False, 'description': 'Maximalwert seit Tagesbeginn'}, - 'minmax_heute_avg': {'cat': 'wertehistorie', 'sub_cat': 'onchange', 'item_type': 'num', 'calc': 'onchange', 'params': False, 'description': 'Durschnittswert seit Tagesbeginn'}, - 'minmax_heute_minus1_min': {'cat': 'wertehistorie', 'sub_cat': 'timeframe', 'item_type': 'num', 'calc': 'daily', 'params': False, 'description': 'Minimalwert gestern (heute -1 Tag)'}, - 'minmax_heute_minus1_max': {'cat': 'wertehistorie', 'sub_cat': 'timeframe', 'item_type': 'num', 'calc': 'daily', 'params': False, 'description': 'Maximalwert gestern (heute -1 Tag)'}, - 'minmax_heute_minus1_avg': {'cat': 'wertehistorie', 'sub_cat': 'timeframe', 'item_type': 'num', 'calc': 'daily', 'params': False, 'description': 'Durchschnittswert gestern (heute -1 Tag)'}, - 'minmax_heute_minus2_min': {'cat': 'wertehistorie', 'sub_cat': 'timeframe', 'item_type': 'num', 'calc': 'daily', 'params': False, 'description': 'Minimalwert vorgestern (heute -2 Tage)'}, - 'minmax_heute_minus2_max': {'cat': 'wertehistorie', 'sub_cat': 'timeframe', 'item_type': 'num', 'calc': 'daily', 'params': False, 'description': 'Maximalwert vorgestern (heute -2 Tage)'}, - 'minmax_heute_minus2_avg': {'cat': 'wertehistorie', 'sub_cat': 'timeframe', 'item_type': 'num', 'calc': 'daily', 'params': False, 'description': 'Durchschnittswert vorgestern (heute -2 Tage)'}, - 'minmax_heute_minus3_min': {'cat': 'wertehistorie', 'sub_cat': 'timeframe', 'item_type': 'num', 'calc': 'daily', 'params': False, 'description': 'Minimalwert heute vor 3 Tagen'}, - 'minmax_heute_minus3_max': {'cat': 'wertehistorie', 'sub_cat': 'timeframe', 'item_type': 'num', 'calc': 'daily', 'params': False, 'description': 'Maximalwert heute vor 3 Tagen'}, - 'minmax_heute_minus3_avg': {'cat': 'wertehistorie', 'sub_cat': 'timeframe', 'item_type': 'num', 'calc': 'daily', 'params': False, 'description': 'Durchschnittswert heute vor 3 Tagen'}, - 'minmax_woche_min': {'cat': 'wertehistorie', 'sub_cat': 'onchange', 'item_type': 'num', 'calc': 'onchange', 'params': False, 'description': 'Minimalwert seit Wochenbeginn'}, - 'minmax_woche_max': {'cat': 'wertehistorie', 'sub_cat': 'onchange', 'item_type': 'num', 'calc': 'onchange', 'params': False, 'description': 'Maximalwert seit Wochenbeginn'}, - 'minmax_woche_minus1_min': {'cat': 'wertehistorie', 'sub_cat': 'timeframe', 'item_type': 'num', 'calc': 'weekly', 'params': False, 'description': 'Minimalwert Vorwoche (aktuelle Woche -1)'}, - 'minmax_woche_minus1_max': {'cat': 'wertehistorie', 'sub_cat': 'timeframe', 'item_type': 'num', 'calc': 'weekly', 'params': False, 'description': 'Maximalwert Vorwoche (aktuelle Woche -1)'}, - 'minmax_woche_minus1_avg': {'cat': 'wertehistorie', 'sub_cat': 'timeframe', 'item_type': 'num', 'calc': 'weekly', 'params': False, 'description': 'Durchschnittswert Vorwoche (aktuelle Woche -1)'}, - 'minmax_woche_minus2_min': {'cat': 'wertehistorie', 'sub_cat': 'timeframe', 'item_type': 'num', 'calc': 'weekly', 'params': False, 'description': 'Minimalwert aktuelle Woche -2 Wochen'}, - 'minmax_woche_minus2_max': {'cat': 'wertehistorie', 'sub_cat': 'timeframe', 'item_type': 'num', 'calc': 'weekly', 'params': False, 'description': 'Maximalwert aktuelle Woche -2 Wochen'}, - 'minmax_woche_minus2_avg': {'cat': 'wertehistorie', 'sub_cat': 'timeframe', 'item_type': 'num', 'calc': 'weekly', 'params': False, 'description': 'Durchschnittswert aktuelle Woche -2 Wochen'}, - 'minmax_monat_min': {'cat': 'wertehistorie', 'sub_cat': 'onchange', 'item_type': 'num', 'calc': 'onchange', 'params': False, 'description': 'Minimalwert seit Monatsbeginn'}, - 'minmax_monat_max': {'cat': 'wertehistorie', 'sub_cat': 'onchange', 'item_type': 'num', 'calc': 'onchange', 'params': False, 'description': 'Maximalwert seit Monatsbeginn'}, - 'minmax_monat_minus1_min': {'cat': 'wertehistorie', 'sub_cat': 'timeframe', 'item_type': 'num', 'calc': 'monthly', 'params': False, 'description': 'Minimalwert Vormonat (aktueller Monat -1)'}, - 'minmax_monat_minus1_max': {'cat': 'wertehistorie', 'sub_cat': 'timeframe', 'item_type': 'num', 'calc': 'monthly', 'params': False, 'description': 'Maximalwert Vormonat (aktueller Monat -1)'}, - 'minmax_monat_minus1_avg': {'cat': 'wertehistorie', 'sub_cat': 'timeframe', 'item_type': 'num', 'calc': 'monthly', 'params': False, 'description': 'Durchschnittswert Vormonat (aktueller Monat -1)'}, - 'minmax_monat_minus2_min': {'cat': 'wertehistorie', 'sub_cat': 'timeframe', 'item_type': 'num', 'calc': 'monthly', 'params': False, 'description': 'Minimalwert aktueller Monat -2 Monate'}, - 'minmax_monat_minus2_max': {'cat': 'wertehistorie', 'sub_cat': 'timeframe', 'item_type': 'num', 'calc': 'monthly', 'params': False, 'description': 'Maximalwert aktueller Monat -2 Monate'}, - 'minmax_monat_minus2_avg': {'cat': 'wertehistorie', 'sub_cat': 'timeframe', 'item_type': 'num', 'calc': 'monthly', 'params': False, 'description': 'Durchschnittswert aktueller Monat -2 Monate'}, - 'minmax_jahr_min': {'cat': 'wertehistorie', 'sub_cat': 'onchange', 'item_type': 'num', 'calc': 'onchange', 'params': False, 'description': 'Minimalwert seit Jahresbeginn'}, - 'minmax_jahr_max': {'cat': 'wertehistorie', 'sub_cat': 'onchange', 'item_type': 'num', 'calc': 'onchange', 'params': False, 'description': 'Maximalwert seit Jahresbeginn'}, - 'minmax_jahr_minus1_min': {'cat': 'wertehistorie', 'sub_cat': 'timeframe', 'item_type': 'num', 'calc': 'yearly', 'params': False, 'description': 'Minimalwert Vorjahr (aktuelles Jahr -1 Jahr)'}, - 'minmax_jahr_minus1_max': {'cat': 'wertehistorie', 'sub_cat': 'timeframe', 'item_type': 'num', 'calc': 'yearly', 'params': False, 'description': 'Maximalwert Vorjahr (aktuelles Jahr -1 Jahr)'}, - 'minmax_jahr_minus1_avg': {'cat': 'wertehistorie', 'sub_cat': 'timeframe', 'item_type': 'num', 'calc': 'yearly', 'params': False, 'description': 'Durchschnittswert Vorjahr (aktuelles Jahr -1 Jahr)'}, - 'tagesmitteltemperatur_heute': {'cat': 'tagesmittel', 'sub_cat': 'onchange', 'item_type': 'num', 'calc': 'onchange', 'params': False, 'description': 'Tagesmitteltemperatur heute'}, - 'tagesmitteltemperatur_heute_minus1': {'cat': 'tagesmittel', 'sub_cat': 'timeframe', 'item_type': 'num', 'calc': 'daily', 'params': False, 'description': 'Tagesmitteltemperatur des letzten Tages (heute -1 Tag)'}, - 'tagesmitteltemperatur_heute_minus2': {'cat': 'tagesmittel', 'sub_cat': 'timeframe', 'item_type': 'num', 'calc': 'daily', 'params': False, 'description': 'Tagesmitteltemperatur des vorletzten Tages (heute -2 Tag)'}, - 'tagesmitteltemperatur_heute_minus3': {'cat': 'tagesmittel', 'sub_cat': 'timeframe', 'item_type': 'num', 'calc': 'daily', 'params': False, 'description': 'Tagesmitteltemperatur des vorvorletzten Tages (heute -3 Tag)'}, - 'serie_minmax_monat_min_15m': {'cat': 'serie', 'sub_cat': 'minmax', 'item_type': 'list', 'calc': 'monthly', 'params': False, 'description': 'monatlicher Minimalwert der letzten 15 Monate (gleitend)'}, - 'serie_minmax_monat_max_15m': {'cat': 'serie', 'sub_cat': 'minmax', 'item_type': 'list', 'calc': 'monthly', 'params': False, 'description': 'monatlicher Maximalwert der letzten 15 Monate (gleitend)'}, - 'serie_minmax_monat_avg_15m': {'cat': 'serie', 'sub_cat': 'minmax', 'item_type': 'list', 'calc': 'monthly', 'params': False, 'description': 'monatlicher Mittelwert der letzten 15 Monate (gleitend)'}, - 'serie_minmax_woche_min_30w': {'cat': 'serie', 'sub_cat': 'minmax', 'item_type': 'list', 'calc': 'weekly', 'params': False, 'description': 'wöchentlicher Minimalwert der letzten 30 Wochen (gleitend)'}, - 'serie_minmax_woche_max_30w': {'cat': 'serie', 'sub_cat': 'minmax', 'item_type': 'list', 'calc': 'weekly', 'params': False, 'description': 'wöchentlicher Maximalwert der letzten 30 Wochen (gleitend)'}, - 'serie_minmax_woche_avg_30w': {'cat': 'serie', 'sub_cat': 'minmax', 'item_type': 'list', 'calc': 'weekly', 'params': False, 'description': 'wöchentlicher Mittelwert der letzten 30 Wochen (gleitend)'}, - 'serie_minmax_tag_min_30d': {'cat': 'serie', 'sub_cat': 'minmax', 'item_type': 'list', 'calc': 'daily', 'params': False, 'description': 'täglicher Minimalwert der letzten 30 Tage (gleitend)'}, - 'serie_minmax_tag_max_30d': {'cat': 'serie', 'sub_cat': 'minmax', 'item_type': 'list', 'calc': 'daily', 'params': False, 'description': 'täglicher Maximalwert der letzten 30 Tage (gleitend)'}, - 'serie_minmax_tag_avg_30d': {'cat': 'serie', 'sub_cat': 'minmax', 'item_type': 'list', 'calc': 'daily', 'params': False, 'description': 'täglicher Mittelwert der letzten 30 Tage (gleitend)'}, - 'serie_verbrauch_tag_30d': {'cat': 'serie', 'sub_cat': 'verbrauch', 'item_type': 'list', 'calc': 'daily', 'params': False, 'description': 'Verbrauch pro Tag der letzten 30 Tage'}, - 'serie_verbrauch_woche_30w': {'cat': 'serie', 'sub_cat': 'verbrauch', 'item_type': 'list', 'calc': 'weekly', 'params': False, 'description': 'Verbrauch pro Woche der letzten 30 Wochen'}, - 'serie_verbrauch_monat_18m': {'cat': 'serie', 'sub_cat': 'verbrauch', 'item_type': 'list', 'calc': 'monthly', 'params': False, 'description': 'Verbrauch pro Monat der letzten 18 Monate'}, - 'serie_zaehlerstand_tag_30d': {'cat': 'serie', 'sub_cat': 'zaehler', 'item_type': 'list', 'calc': 'daily', 'params': False, 'description': 'Zählerstand am Tagesende der letzten 30 Tage'}, - 'serie_zaehlerstand_woche_30w': {'cat': 'serie', 'sub_cat': 'zaehler', 'item_type': 'list', 'calc': 'weekly', 'params': False, 'description': 'Zählerstand am Wochenende der letzten 30 Wochen'}, - 'serie_zaehlerstand_monat_18m': {'cat': 'serie', 'sub_cat': 'zaehler', 'item_type': 'list', 'calc': 'monthly', 'params': False, 'description': 'Zählerstand am Monatsende der letzten 18 Monate'}, - 'serie_waermesumme_monat_24m': {'cat': 'serie', 'sub_cat': 'summe', 'item_type': 'list', 'calc': 'monthly', 'params': False, 'description': 'monatliche Wärmesumme der letzten 24 Monate'}, - 'serie_kaeltesumme_monat_24m': {'cat': 'serie', 'sub_cat': 'summe', 'item_type': 'list', 'calc': 'monthly', 'params': False, 'description': 'monatliche Kältesumme der letzten 24 Monate'}, - 'serie_tagesmittelwert_0d': {'cat': 'serie', 'sub_cat': 'mittel_d', 'item_type': 'list', 'calc': 'daily', 'params': False, 'description': 'Tagesmittelwert für den aktuellen Tag'}, - 'serie_tagesmittelwert_stunde_0d': {'cat': 'serie', 'sub_cat': 'mittel_h', 'item_type': 'list', 'calc': 'daily', 'params': False, 'description': 'Stundenmittelwert für den aktuellen Tag'}, - 'serie_tagesmittelwert_stunde_30_0d': {'cat': 'serie', 'sub_cat': 'mittel_h1', 'item_type': 'list', 'calc': 'daily', 'params': False, 'description': 'Stundenmittelwert für den aktuellen Tag'}, - 'serie_tagesmittelwert_tag_stunde_30d': {'cat': 'serie', 'sub_cat': 'mittel_d_h', 'item_type': 'list', 'calc': 'daily', 'params': False, 'description': 'Stundenmittelwert pro Tag der letzten 30 Tage (bspw. zur Berechnung der Tagesmitteltemperatur basierend auf den Mittelwert der Temperatur pro Stunde'}, - 'general_oldest_value': {'cat': 'gen', 'sub_cat': None, 'item_type': 'num', 'calc': 'no', 'params': False, 'description': 'Ausgabe des ältesten Wertes des entsprechenden "Parent-Items" mit database Attribut'}, - 'general_oldest_log': {'cat': 'gen', 'sub_cat': None, 'item_type': 'list', 'calc': 'no', 'params': False, 'description': 'Ausgabe des Timestamp des ältesten Eintrages des entsprechenden "Parent-Items" mit database Attribut'}, - 'kaeltesumme': {'cat': 'complex', 'sub_cat': 'summe', 'item_type': 'num', 'calc': 'daily', 'params': True, 'description': 'Berechnet die Kältesumme für einen Zeitraum, db_addon_params: (year=mandatory, month=optional)'}, - 'waermesumme': {'cat': 'complex', 'sub_cat': 'summe', 'item_type': 'num', 'calc': 'daily', 'params': True, 'description': 'Berechnet die Wärmesumme für einen Zeitraum, db_addon_params: (year=mandatory, month=optional)'}, - 'gruenlandtempsumme': {'cat': 'complex', 'sub_cat': None, 'item_type': 'num', 'calc': 'daily', 'params': True, 'description': 'Berechnet die Grünlandtemperatursumme für einen Zeitraum, db_addon_params: (year=mandatory)'}, - 'tagesmitteltemperatur': {'cat': 'complex', 'sub_cat': None, 'item_type': 'list', 'calc': 'daily', 'params': True, 'description': 'Berechnet die Tagesmitteltemperatur auf Basis der stündlichen Durchschnittswerte eines Tages für die angegebene Anzahl von Tagen (timeframe=day, count=integer)'}, - 'wachstumsgradtage': {'cat': 'complex', 'sub_cat': None, 'item_type': 'num', 'calc': 'daily', 'params': True, 'description': 'Berechnet die Wachstumsgradtage auf Basis der stündlichen Durchschnittswerte eines Tages für das laufende Jahr mit an Angabe des Temperaturschwellenwertes (threshold=Schwellentemperatur)'}, - 'db_request': {'cat': 'complex', 'sub_cat': None, 'item_type': 'list', 'calc': 'group', 'params': True, 'description': 'Abfrage der DB: db_addon_params: (func=mandatory, item=mandatory, timespan=mandatory, start=optional, end=optional, count=optional, group=optional, group2=optional)'}, - 'minmax': {'cat': 'complex', 'sub_cat': None, 'item_type': 'num', 'calc': 'timeframe', 'params': True, 'description': 'Berechnet einen min/max/avg Wert für einen bestimmen Zeitraum: db_addon_params: (func=mandatory, timeframe=mandatory, start=mandatory)'}, - 'minmax_last': {'cat': 'complex', 'sub_cat': None, 'item_type': 'num', 'calc': 'timeframe', 'params': True, 'description': 'Berechnet einen min/max/avg Wert für ein bestimmtes Zeitfenster von jetzt zurück: db_addon_params: (func=mandatory, timeframe=mandatory, start=mandatory, end=mandatory)'}, - 'verbrauch': {'cat': 'complex', 'sub_cat': None, 'item_type': 'num', 'calc': 'timeframe', 'params': True, 'description': 'Berechnet einen Verbrauchswert für einen bestimmen Zeitraum: db_addon_params: (timeframe=mandatory, start=mandatory end=mandatory)'}, - 'zaehlerstand': {'cat': 'complex', 'sub_cat': None, 'item_type': 'num', 'calc': 'timeframe', 'params': True, 'description': 'Berechnet einen Zählerstand für einen bestimmen Zeitpunkt: db_addon_params: (timeframe=mandatory, start=mandatory)'}, - }, - 'db_addon_info': { - 'db_version': {'cat': 'info', 'item_type': 'str', 'calc': 'no', 'params': False, 'description': 'Version der verbundenen Datenbank'}, - }, - 'db_addon_admin': { - 'suspend': {'cat': 'admin', 'item_type': 'bool', 'calc': 'no', 'params': False, 'description': 'Unterbricht die Aktivitäten des Plugin'}, - 'recalc_all': {'cat': 'admin', 'item_type': 'bool', 'calc': 'no', 'params': False, 'description': 'Startet einen Neuberechnungslauf aller on-demand Items'}, - 'clean_cache_values': {'cat': 'admin', 'item_type': 'bool', 'calc': 'no', 'params': False, 'description': 'Löscht Plugin-Cache und damit alle im Plugin zwischengespeicherten Werte'}, - }, -} - -FILE_HEADER = """\ -# !/usr/bin/env python -# vim: set encoding=utf-8 tabstop=4 softtabstop=4 shiftwidth=4 expandtab -# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # -# Copyright 2023 Michael Wenzel -# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # -# DatabaseAddOn for SmartHomeNG. https://github.com/smarthomeNG// -# -# This plugin is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# This plugin is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this plugin. If not, see . -# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # - - -# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # -# -# -# THIS FILE IS AUTOMATICALLY CREATED BY USING item_attributes_master.py -# -# -# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # - -""" - -def get_attrs(sub_dict: dict = {}) -> list: - attributes = [] - for entry in ITEM_ATTRIBUTES: - for db_addon_fct in ITEM_ATTRIBUTES[entry]: - if sub_dict.items() <= ITEM_ATTRIBUTES[entry][db_addon_fct].items(): - attributes.append(db_addon_fct) - return attributes - -def export_item_attributes_py(): - ATTRS = dict() - ATTRS['ALL_ONCHANGE_ATTRIBUTES'] = get_attrs(sub_dict={'calc': 'onchange'}) - ATTRS['ALL_DAILY_ATTRIBUTES'] = get_attrs(sub_dict={'calc': 'daily'}) - ATTRS['ALL_WEEKLY_ATTRIBUTES'] = get_attrs(sub_dict={'calc': 'weekly'}) - ATTRS['ALL_MONTHLY_ATTRIBUTES'] = get_attrs(sub_dict={'calc': 'monthly'}) - ATTRS['ALL_YEARLY_ATTRIBUTES'] = get_attrs(sub_dict={'calc': 'yearly'}) - ATTRS['ALL_NEED_PARAMS_ATTRIBUTES'] = get_attrs(sub_dict={'params': True}) - ATTRS['ALL_VERBRAUCH_ATTRIBUTES'] = get_attrs(sub_dict={'cat': 'verbrauch'}) - ATTRS['VERBRAUCH_ATTRIBUTES_ONCHANGE'] = get_attrs(sub_dict={'cat': 'verbrauch', 'sub_cat': 'onchange'}) - ATTRS['VERBRAUCH_ATTRIBUTES_TIMEFRAME'] = get_attrs(sub_dict={'cat': 'verbrauch', 'sub_cat': 'timeframe'}) - ATTRS['VERBRAUCH_ATTRIBUTES_ROLLING'] = get_attrs(sub_dict={'cat': 'verbrauch', 'sub_cat': 'rolling'}) - ATTRS['VERBRAUCH_ATTRIBUTES_JAHRESZEITRAUM'] = get_attrs(sub_dict={'cat': 'verbrauch', 'sub_cat': 'jahrzeit'}) - ATTRS['ALL_ZAEHLERSTAND_ATTRIBUTES'] = get_attrs(sub_dict={'cat': 'zaehler'}) - ATTRS['ZAEHLERSTAND_ATTRIBUTES_TIMEFRAME'] = get_attrs(sub_dict={'cat': 'zaehler', 'sub_cat': 'timeframe'}) - ATTRS['ALL_HISTORIE_ATTRIBUTES'] = get_attrs(sub_dict={'cat': 'wertehistorie'}) - ATTRS['HISTORIE_ATTRIBUTES_ONCHANGE'] = get_attrs(sub_dict={'cat': 'wertehistorie', 'sub_cat': 'onchange'}) - ATTRS['HISTORIE_ATTRIBUTES_LAST'] = get_attrs(sub_dict={'cat': 'wertehistorie', 'sub_cat': 'last'}) - ATTRS['HISTORIE_ATTRIBUTES_TIMEFRAME'] = get_attrs(sub_dict={'cat': 'wertehistorie', 'sub_cat': 'timeframe'}) - ATTRS['ALL_TAGESMITTEL_ATTRIBUTES'] = get_attrs(sub_dict={'cat': 'tagesmittel'}) - ATTRS['TAGESMITTEL_ATTRIBUTES_ONCHANGE'] = get_attrs(sub_dict={'cat': 'tagesmittel', 'sub_cat': 'onchange'}) - ATTRS['TAGESMITTEL_ATTRIBUTES_TIMEFRAME'] = get_attrs(sub_dict={'cat': 'tagesmittel', 'sub_cat': 'timeframe'}) - ATTRS['ALL_SERIE_ATTRIBUTES'] = get_attrs(sub_dict={'cat': 'serie'}) - ATTRS['SERIE_ATTRIBUTES_MINMAX'] = get_attrs(sub_dict={'cat': 'serie', 'sub_cat': 'minmax'}) - ATTRS['SERIE_ATTRIBUTES_ZAEHLERSTAND'] = get_attrs(sub_dict={'cat': 'serie', 'sub_cat': 'zaehler'}) - ATTRS['SERIE_ATTRIBUTES_VERBRAUCH'] = get_attrs(sub_dict={'cat': 'serie', 'sub_cat': 'verbrauch'}) - ATTRS['SERIE_ATTRIBUTES_SUMME'] = get_attrs(sub_dict={'cat': 'serie', 'sub_cat': 'summe'}) - ATTRS['SERIE_ATTRIBUTES_MITTEL_D'] = get_attrs(sub_dict={'cat': 'serie', 'sub_cat': 'mittel_d'}) - ATTRS['SERIE_ATTRIBUTES_MITTEL_H'] = get_attrs(sub_dict={'cat': 'serie', 'sub_cat': 'mittel_h'}) - ATTRS['SERIE_ATTRIBUTES_MITTEL_H1'] = get_attrs(sub_dict={'cat': 'serie', 'sub_cat': 'mittel_h1'}) - ATTRS['SERIE_ATTRIBUTES_MITTEL_D_H'] = get_attrs(sub_dict={'cat': 'serie', 'sub_cat': 'mittel_d_h'}) - ATTRS['ALL_GEN_ATTRIBUTES'] = get_attrs(sub_dict={'cat': 'gen'}) - ATTRS['ALL_COMPLEX_ATTRIBUTES'] = get_attrs(sub_dict={'cat': 'complex'}) - - # create file and write header - f = open(FILENAME_ATTRIBUTES, "w") - f.write(FILE_HEADER) - f.close() - - # write avm_data_types - for attr, alist in ATTRS.items(): - with open(FILENAME_ATTRIBUTES, "a") as f: - print(f'{attr} = {alist!r}', file=f) - - print('item_attributes.py successfully created!') - -def create_plugin_yaml_item_attribute_valids(): - """Create valid_list of db_addon_fct based on master dict""" - - valid_list_str = """ # NOTE: valid_list is automatically created by using item_attributes_master.py""" - valid_list_desc_str = """ # NOTE: valid_list_description is automatically created by using item_attributes_master.py""" - valid_list_item_type = """ # NOTE: valid_list_item_type is automatically created by using item_attributes_master.py""" - valid_list_calculation = """ # NOTE: valid_list_calculation is automatically created by using item_attributes_master.py""" - - for db_addon_fct in ITEM_ATTRIBUTES[attribute]: - valid_list_str = f"""{valid_list_str}\n\ - - {db_addon_fct!r:<40}""" - - valid_list_desc_str = f"""{valid_list_desc_str}\n\ - - '{ITEM_ATTRIBUTES[attribute][db_addon_fct]['description']:<}'""" - - valid_list_item_type = f"""{valid_list_item_type}\n\ - - '{ITEM_ATTRIBUTES[attribute][db_addon_fct]['item_type']:<}'""" - - valid_list_calculation = f"""{valid_list_calculation}\n\ - - '{ITEM_ATTRIBUTES[attribute][db_addon_fct]['calc']:<}'""" - - valid_list_calculation = f"""{valid_list_calculation}\n\r""" - - return valid_list_str, valid_list_desc_str, valid_list_item_type, valid_list_calculation - -def update_plugin_yaml_item_attributes(): - """Update 'valid_list', 'valid_list_description', 'valid_list_item_type' and 'valid_list_calculation' of item attributes in plugin.yaml""" - - yaml = ruamel.yaml.YAML() - yaml.indent(mapping=4, sequence=4, offset=4) - yaml.width = 200 - yaml.allow_unicode = True - yaml.preserve_quotes = False - - valid_list_str, valid_list_desc_str, valid_list_item_type_str, valid_list_calc_str = create_plugin_yaml_item_attribute_valids() - - with open(FILENAME_PLUGIN, 'r', encoding="utf-8") as f: - data = yaml.load(f) - - if data.get('item_attributes', {}).get(attribute): - data['item_attributes'][attribute]['valid_list'] = yaml.load(valid_list_str) - data['item_attributes'][attribute]['valid_list_description'] = yaml.load(valid_list_desc_str) - data['item_attributes'][attribute]['valid_list_item_type'] = yaml.load(valid_list_item_type_str) - data['item_attributes'][attribute]['valid_list_calculation'] = yaml.load(valid_list_calc_str) - - with open(FILENAME_PLUGIN, 'w', encoding="utf-8") as f: - yaml.dump(data, f) - print(f"Successfully updated Attribute '{attribute}' in plugin.yaml!") - else: - print(f"Attribute '{attribute}' not defined in plugin.yaml") - -if __name__ == '__main__': - export_item_attributes_py() - for attribute in ITEM_ATTRIBUTES: - update_plugin_yaml_item_attributes() diff --git a/db_addon/locale.yaml b/db_addon/locale.yaml old mode 100755 new mode 100644 diff --git a/db_addon/plugin.yaml b/db_addon/plugin.yaml old mode 100755 new mode 100644 index 98115af82..c050022f5 --- a/db_addon/plugin.yaml +++ b/db_addon/plugin.yaml @@ -11,7 +11,7 @@ plugin: # keywords: iot xyz # documentation: https://github.com/smarthomeNG/smarthome/wiki/CLI-Plugin # url of documentation (wiki) page support: https://knx-user-forum.de/forum/supportforen/smarthome-py/1848494-support-thread-databaseaddon-plugin - version: 1.2.2 # Plugin version (must match the version specified in __init__.py) + version: 1.2.3 # Plugin version (must match the version specified in __init__.py) sh_minversion: 1.9.3.5 # minimum shNG version to use this plugin # sh_maxversion: # maximum shNG version to use this plugin (leave empty if latest) py_minversion: 3.8 # minimum Python version to use for this plugin @@ -62,6 +62,21 @@ parameters: de: 'True: Verwendung des ältesten Eintrags des Items in der Datenbank, falls der Start des Abfragezeitraums zeitlich vor diesem Eintrag liegt False: Abbruch der Datenbankabfrage' en: 'True: Use of oldest entry of item in database, if start of query is prior to oldest entry False: Cancel query' + lock_db_for_query: + type: bool + default: false + description: + de: 'Sperren der Datenbank während der Abfrage' + en: 'Lock the database during queries' + + refresh_cycle: + type: int + default: 60 + description: + de: 'Zyklus, in dem die Datenbank neu gelesen wird' + en: 'Cycle to update database' + + item_attributes: db_addon_fct: type: str diff --git a/db_addon/requirements.txt b/db_addon/requirements.txt old mode 100755 new mode 100644 diff --git a/db_addon/user_doc.rst b/db_addon/user_doc.rst old mode 100755 new mode 100644 diff --git a/db_addon/webif/__init__.py b/db_addon/webif/__init__.py old mode 100755 new mode 100644 index 604f6b147..0bc74ca9a --- a/db_addon/webif/__init__.py +++ b/db_addon/webif/__init__.py @@ -59,7 +59,7 @@ def __init__(self, webif_dir, plugin): self.tplenv = self.init_template_environment() @cherrypy.expose - def index(self, reload=None): + def index(self, reload=None, action=None, item_path=None, active=None, option=None): """ Build index.html for cherrypy @@ -70,6 +70,19 @@ def index(self, reload=None): tmpl = self.tplenv.get_template('index.html') + if action is not None: + if action == "recalc_item" and item_path is not None: + self.logger.info(f"Recalc of item={item_path} called via WebIF. Item put to Queue for new calculation.") + self.plugin.execute_items(option='item', item=item_path) + + elif action == "clean_item_cache" and item_path is not None: + self.logger.info(f"Clean item cache of item={item_path} called via WebIF. Plugin item value cache will be cleaned.") + self.plugin._clean_item_cache(item=item_path) + + elif action == "_activate_item_calculation" and item_path is not None and active is not None: + self.logger.info(f"Item calculation of item={item_path} will be set to {bool(int(active))} via WebIF.") + self.plugin._activate_item_calculation(item=item_path, active=bool(int(active))) + return tmpl.render(p=self.plugin, webif_pagelength=self.plugin.get_parameter_value('webif_pagelength'), suspended='true' if self.plugin.suspended else 'false', @@ -78,7 +91,7 @@ def index(self, reload=None): plugin_shortname=self.plugin.get_shortname(), plugin_version=self.plugin.get_version(), plugin_info=self.plugin.get_info(), - maintenance=True if self.plugin.log_level == 10 else False, + maintenance=True if self.plugin.log_level < 20 else False, ) @cherrypy.expose @@ -94,24 +107,33 @@ def get_data_html(self, dataSet=None): if dataSet is None: # get the new data data = dict() - data['items'] = {} + data['items'] = {} for item in self.plugin.get_item_list('db_addon', 'function'): - data['items'][item.id()] = {} - data['items'][item.id()]['value'] = item.property.value - data['items'][item.id()]['last_update'] = item.property.last_update.strftime('%d.%m.%Y %H:%M:%S') - data['items'][item.id()]['last_change'] = item.property.last_change.strftime('%d.%m.%Y %H:%M:%S') + data['items'][item.path()] = {} + data['items'][item.path()]['value'] = item.property.value + data['items'][item.path()]['last_update'] = item.property.last_update.strftime('%d.%m.%Y %H:%M:%S') + data['items'][item.path()]['last_change'] = item.property.last_change.strftime('%d.%m.%Y %H:%M:%S') data['plugin_suspended'] = self.plugin.suspended data['maintenance'] = True if self.plugin.log_level == 10 else False data['queue_length'] = self.plugin.queue_backlog() data['active_queue_item'] = self.plugin.active_queue_item + data['debug_log'] = {} + for debug in ['parse', 'execute', 'ondemand', 'onchange', 'prepare', 'sql']: + data['debug_log'][debug] = getattr(self.plugin.debug_log, debug) + try: return json.dumps(data, default=str) except Exception as e: self.logger.error(f"get_data_html exception: {e}") + @cherrypy.expose + def submit(self, cmd=None, param1=None, param2=None): + """Submit handler für Ajax""" + self.logger.warning(f"submit: {cmd=}, {param1=}, {param2=}") + @cherrypy.expose def recalc_all(self): self.logger.debug(f"recalc_all called") @@ -136,3 +158,69 @@ def activate(self): def suspend(self): self.logger.debug(f"suspend called") self.plugin.suspend(True) + + @cherrypy.expose + def debug_log_option(self, log: str = None, state: bool = None): + self.logger.warning(f"debug_log_option called with {log=}, {state=}") + _state = True if state == 'true' else False + setattr(self.plugin.debug_log, log, _state) + + @cherrypy.expose + def debug_log_option_parse_true(self): + self.logger.debug("debug_log_option_parse_true") + setattr(self.plugin.debug_log, 'parse', True) + + @cherrypy.expose + def debug_log_option_parse_false (self): + self.logger.debug("debug_log_option_parse_false") + setattr(self.plugin.debug_log, 'parse', False) + + @cherrypy.expose + def debug_log_option_execute_true(self): + self.logger.debug("debug_log_option_execute_true") + setattr(self.plugin.debug_log, 'execute', True) + + @cherrypy.expose + def debug_log_option_execute_false (self): + self.logger.debug("debug_log_option_execute_false") + setattr(self.plugin.debug_log, 'execute', False) + + @cherrypy.expose + def debug_log_option_ondemand_true(self): + self.logger.debug("debug_log_option_ondemand_true") + setattr(self.plugin.debug_log, 'ondemand', True) + + @cherrypy.expose + def debug_log_option_ondemand_false (self): + self.logger.debug("debug_log_option_ondemand_false") + setattr(self.plugin.debug_log, 'ondemand', False) + + @cherrypy.expose + def debug_log_option_onchange_true(self): + self.logger.debug("debug_log_option_onchange_true") + setattr(self.plugin.debug_log, 'onchange', True) + + @cherrypy.expose + def debug_log_option_onchange_false (self): + self.logger.debug("debug_log_option_onchange_false") + setattr(self.plugin.debug_log, 'onchange', False) + + @cherrypy.expose + def debug_log_option_prepare_true(self): + self.logger.debug("debug_log_option_prepare_true") + setattr(self.plugin.debug_log, 'prepare', True) + + @cherrypy.expose + def debug_log_option_prepare_false (self): + self.logger.debug("debug_log_option_prepare_false") + setattr(self.plugin.debug_log, 'prepare', False) + + @cherrypy.expose + def debug_log_option_sql_true(self): + self.logger.debug("debug_log_option_sql_true") + setattr(self.plugin.debug_log, 'sql', True) + + @cherrypy.expose + def debug_log_option_sql_false (self): + self.logger.debug("debug_log_option_sql_false") + setattr(self.plugin.debug_log, 'sql', False) \ No newline at end of file diff --git a/db_addon/webif/static/img/plugin_logo.png b/db_addon/webif/static/img/plugin_logo.png old mode 100755 new mode 100644 diff --git a/db_addon/webif/templates/index.html b/db_addon/webif/templates/index.html old mode 100755 new mode 100644 index 62f398e70..99aeddaa5 --- a/db_addon/webif/templates/index.html +++ b/db_addon/webif/templates/index.html @@ -35,6 +35,9 @@ } table th.last { width: 150px; + } + table th.aktion { + width: 100px; } table th.dict { width: 150px; @@ -101,6 +104,13 @@ document.getElementById('pause').disabled = true; } } + + { document.getElementById('debug_parse').checked = objResponse['debug_log']['parse']; } + { document.getElementById('debug_execute').checked = objResponse['debug_log']['execute']; } + { document.getElementById('debug_ondemand').checked = objResponse['debug_log']['ondemand']; } + { document.getElementById('debug_onchange').checked = objResponse['debug_log']['onchange']; } + { document.getElementById('debug_prepare').checked = objResponse['debug_log']['prepare']; } + { document.getElementById('debug_sql').checked = objResponse['debug_log']['sql']; } } @@ -156,8 +166,13 @@ { title: '{{ _('Letzter Change') }}', targets: [8], "className": "last" + }, + { + title: '{{ _('Aktionen') }}', + targets: [9], "className": "aktion" }].concat($.fn.dataTable.defaults.columnDefs), pageResize: resize}); + {% if maintenance %} mtable2 = $('#mtable2').DataTable( { columnDefs: [ @@ -180,6 +195,8 @@ catch (e) { console.warn("Datatable JS not loaded, showing standard table without reorder option " + e); } + + // Handler für Suspend (Play/Pause) Button if ({{ suspended }} == false) { document.getElementById('play').classList = 'btn btn-success btn-sm'; document.getElementById('play').disabled = true; @@ -192,6 +209,31 @@ document.getElementById('pause').classList = 'btn btn-danger btn-sm'; document.getElementById('pause').disabled = true; } + + // Handler für Formular - das "submit"-Element (Senden) wird abgefangen + $("#button_pressed").submit(function(e) { + + // keine HTML-Aktion ausführen (z.B. Formular senden) + e.preventDefault(); + + console.log('submit') + + // die Kennung des gedrückten Buttons per AJAX senden + $.post('submit', {button: $("#button").val()}, function(data) { + + console.log(data) + + // Zeile ermitteln + // var row = $("#button").val() + // var id = row + "_value" + + // nur die betroffene Zeile ändern. Der dritte Parameter muss mit der Tabellen-ID identisch sein. + // shngInserText(id, data.wert, 'maintable') + + }); + return false ; + }); + }); @@ -206,6 +248,7 @@ } } + + + {% endblock pluginscripts %} @@ -231,7 +282,7 @@ {{ _('Verbunden') }} - {% if p._db._connected %}{{ _('Ja') }}{% else %}{{ _('Nein') }}{% endif %} + {% if p._db._connected %}{{ _('Ja') }}{% else %}{{ _('Nein') }}{% endif %} {{ _('Treiber') }} {{ p.db_driver }} {{ _('Startup Delay') }} @@ -255,10 +306,35 @@ {% endif %} {% endfor %} - {{ _('Item in Berechnung') }} + {{ _('Item in Berechnung') }} {{ p.active_queue_item }} - {{ _('Arbeitsvorrat') }} - {{ p.queue_backlog }} {{ _('Items') }} + {{ _('Arbeitsvorrat') }} + {{ p.queue_backlog }} {{ _('Items') }} + {{ _('LogLevel') }} + + {{ p.log_level }} + {% if p.log_level == 10 %} + {{ (' || ') }} +
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+ {% endif %} + @@ -282,11 +358,7 @@ {% set tabcount = 3 %} {% set tab1title = "" ~ plugin_shortname ~ " Items (" ~ item_count ~ ")" %} -{% if maintenance %} - {% set tab2title = "" ~ plugin_shortname ~ " Maintenance" %} -{% else %} - {% set tab2title = "hidden" %} -{% endif %} +{% set tab2title = "" ~ plugin_shortname ~ " Maintenance" %} {% set tab3title = "" ~ plugin_shortname ~ " API/Doku" %} @@ -312,10 +384,31 @@ {{ item._value | float | round(2) }} {{ item.property.last_update.strftime('%d.%m.%Y %H:%M:%S') }} {{ item.property.last_change.strftime('%d.%m.%Y %H:%M:%S') }} + + + + {% if p.get_item_config(item._path)['active'] %} + + {% else %} + + {% endif %} + + + {% endfor %} +
+ +
{% endblock bodytab1 %} From 22dc7e8210ac74ec753e53f0ee18c7491c35b3a5 Mon Sep 17 00:00:00 2001 From: sisamiwe Date: Mon, 7 Aug 2023 11:48:39 +0200 Subject: [PATCH 02/41] DB_ADDON: - use commit, to always fetches latest entries - internal improvements --- db_addon/__init__.py | 45 +++++++++++++------------ db_addon/plugin.yaml | 8 ----- db_addon/webif/__init__.py | 20 +++++++++-- db_addon/webif/templates/index.html | 51 +++++++++++++++++++---------- 4 files changed, 73 insertions(+), 51 deletions(-) diff --git a/db_addon/__init__.py b/db_addon/__init__.py index 02c521b7a..d254064f2 100644 --- a/db_addon/__init__.py +++ b/db_addon/__init__.py @@ -57,7 +57,8 @@ class DatabaseAddOn(SmartPlugin): """ PLUGIN_VERSION = '1.2.3' - REVISION = 'C' + # ToDo: remove revision + REVISION = 'D' def __init__(self, sh): """ @@ -88,8 +89,6 @@ def __init__(self, sh): self.db_instance = None # instance of the used database self.item_attribute_search_str = 'database' # attribute, on which an item configured for database can be identified self.last_connect_time = 0 # mechanism for limiting db connection requests - # ToDo: Check if still needed - self.last_commit_time = 0 self.alive = None # Is plugin alive? self.startup_finished = False # Startup of Plugin finished self.suspended = False # Is plugin activity suspended @@ -107,8 +106,6 @@ def __init__(self, sh): self.optimize_value_filter = self.get_parameter_value('optimize_value_filter') self.use_oldest_entry = self.get_parameter_value('use_oldest_entry') self.lock_db_for_query = self.get_parameter_value('lock_db_for_query') - # ToDo: Check if still needed - self.refresh_cycle = self.get_parameter_value('refresh_cycle') # get debug log options self.debug_log = DebugLogOptions(self.log_level) @@ -265,7 +262,6 @@ def get_query_parameters_from_db_addon_fct() -> Union[dict, None]: required_params = [timeframe, start, end] elif db_addon_fct in VERBRAUCH_ATTRIBUTES_ROLLING: - # ToDo: check if rolling window correct; muss start und ende dynamisch berechnet werden? # handle functions 'verbrauch_on-demand' in format 'verbrauch_rolling_window_timeframe_timedelta' like 'verbrauch_rolling_12m_woche_minus1' func = db_addon_fct_vars[1] window_inc, window_dur = split_sting_letters_numbers(db_addon_fct_vars[2]) @@ -2339,7 +2335,8 @@ def _valid_year(self, year: Union[int, str]) -> bool: else: return False - def _valid_month(self, month: Union[int, str]) -> bool: + @staticmethod + def _valid_month(month: Union[int, str]) -> bool: """Check if given month is digit and within allowed range""" if (isinstance(month, int) or (isinstance(month, str) and month.isdigit())) and (1 <= int(month) <= 12): @@ -2618,7 +2615,9 @@ def _fetchall(self, query: str, params: dict = None, cur=None) -> list: return None if tuples is None else list(tuples) # ToDo: Check if still needed. - def _query_geht(self, fetch, query: str, params: dict = None, cur=None) -> Union[None, list]: + def _query(self, fetch, query: str, params: dict = None, cur=None) -> Union[None, list]: + """query using commit to get latest data from db""" + if params is None: params = {} @@ -2629,22 +2628,19 @@ def _query_geht(self, fetch, query: str, params: dict = None, cur=None) -> Union return None if cur is None: - if self._db.verify(5) == 0: - self.logger.error("Connection to database not recovered.") + verify_conn = self._db.verify(retry=5) + if verify_conn == 0: + self.logger.error("Connection to database NOT recovered.") return None - if self.lock_db_for_query and not self._db.lock(300): - self.logger.error("Can't query database due to fail to acquire lock.") - return None + if self.lock_db_for_query and not self._db.lock(300): + self.logger.error("Can't query database due to fail to acquire lock.") + return None query_readable = re.sub(r':([a-z_]+)', r'{\1}', query).format(**params) - # do periodic commit to get latest data during fetch - time_since_last_commit = time.time() - self.last_commit_time - if time_since_last_commit > self.refresh_cycle: - self.last_commit_time = time.time() - self.logger.debug(f"Commit to database for getting updated data. time_since_last_commit={int(time_since_last_commit)}") - self._db.commit() + # do commit to get latest data during fetch + self._db.commit() # fetch data try: @@ -2653,16 +2649,19 @@ def _query_geht(self, fetch, query: str, params: dict = None, cur=None) -> Union self.logger.error(f"Error '{e}' for query={query_readable} occurred.") tuples = None pass - finally: - if cur is None and self.lock_db_for_query: - self._db.release() + + if cur is None and self.lock_db_for_query: + self._db.release() if self.debug_log.sql: self.logger.debug(f"Result of query={query_readable}: {tuples}") return tuples - def _query(self, fetch, query: str, params: dict = None, cur=None) -> Union[None, list]: + # ToDo: Check if still needed. + def _query_geht_gut(self, fetch, query: str, params: dict = None, cur=None) -> Union[None, list]: + """query open and close connection for each query to get latest data from db""" + if params is None: params = {} diff --git a/db_addon/plugin.yaml b/db_addon/plugin.yaml index c050022f5..84e5ad089 100644 --- a/db_addon/plugin.yaml +++ b/db_addon/plugin.yaml @@ -69,14 +69,6 @@ parameters: de: 'Sperren der Datenbank während der Abfrage' en: 'Lock the database during queries' - refresh_cycle: - type: int - default: 60 - description: - de: 'Zyklus, in dem die Datenbank neu gelesen wird' - en: 'Cycle to update database' - - item_attributes: db_addon_fct: type: str diff --git a/db_addon/webif/__init__.py b/db_addon/webif/__init__.py index 0bc74ca9a..d1fca7eba 100644 --- a/db_addon/webif/__init__.py +++ b/db_addon/webif/__init__.py @@ -130,9 +130,23 @@ def get_data_html(self, dataSet=None): self.logger.error(f"get_data_html exception: {e}") @cherrypy.expose - def submit(self, cmd=None, param1=None, param2=None): - """Submit handler für Ajax""" - self.logger.warning(f"submit: {cmd=}, {param1=}, {param2=}") + def submit(self, param1=None): + ''' + Submit handler für Ajax + ''' + result = None + + self.logger.warning(f'{param1}') + + if param1 is not None: + + # verarbeite die Daten + self.logger.warning(f'{param1}') + + if result_dict is not None: + # JSON zurücksenden + cherrypy.response.headers['Content-Type'] = 'application/json' + return json.dumps(result_dict).encode('utf-8') @cherrypy.expose def recalc_all(self): diff --git a/db_addon/webif/templates/index.html b/db_addon/webif/templates/index.html index 99aeddaa5..1b0af72cc 100644 --- a/db_addon/webif/templates/index.html +++ b/db_addon/webif/templates/index.html @@ -210,29 +210,47 @@ document.getElementById('pause').disabled = true; } - // Handler für Formular - das "submit"-Element (Senden) wird abgefangen - $("#button_pressed").submit(function(e) { + // Handler für einfachen Button - das "click"-Element wird abgefangen + $("#clear").click(function(e) { - // keine HTML-Aktion ausführen (z.B. Formular senden) - e.preventDefault(); + // keine HTML-Aktion ausführen (z.B. Formular senden) + e.preventDefault(); - console.log('submit') + // festen Wert per AJAX senden + $.post('submit', {clear: "true"}, function(data) { - // die Kennung des gedrückten Buttons per AJAX senden - $.post('submit', {button: $("#button").val()}, function(data) { + // Ergebnis in Feld #fromip schreiben. Der dritte Parameter muss mit der Tabellen-ID identisch sein. + shngInsertText('fromip', data.ip, 'maintable') + }); + return false ; + }); + + // Handler für Formular - das "submit"-Element (Senden) wird abgefangen + $("#button_pressed").submit(function(e) { + + // keine HTML-Aktion ausführen (z.B. Formular senden) + e.preventDefault(); - console.log(data) + // die Kennung des gedrückten Buttons per AJAX senden + $.post('submit', {button: $("#button").val()}, function(data) { - // Zeile ermitteln - // var row = $("#button").val() - // var id = row + "_value" + // Zeile ermitteln + var row = $("#button").val() + var id = row + "_value" + + console.log(row) - // nur die betroffene Zeile ändern. Der dritte Parameter muss mit der Tabellen-ID identisch sein. - // shngInserText(id, data.wert, 'maintable') + // nur die betroffene Zeile ändern. Der dritte Parameter muss mit der Tabellen-ID identisch sein. + shngInserText(id, data.wert, 'maintable') + // alternativ kann auch ein ganzes Feld übertragen werden... + for (var row in data) { + shngInsertText(row + "_value", data.row.wert, 'maintable') + } + }); + return false ; }); - return false ; - }); + }); @@ -277,7 +295,6 @@ {% block headtable %} - @@ -397,7 +414,7 @@ class="btn-sm btn-secondary" type="button" title="{{ 'TestButton' }}" - onclick="$('#button').val('{{ item.property.path }}');$('#button_pressed').submit();" + onclick="$('#button').val('{{ item }}');$('#button_pressed').submit();" > T From 94d592735ec4d7decc2eac1e44c85c2ceef5eaf8 Mon Sep 17 00:00:00 2001 From: sisamiwe Date: Mon, 7 Aug 2023 11:52:11 +0200 Subject: [PATCH 03/41] DB_ADDON: - add item_attributes_master.py --- db_addon/item_attributes_master.py | 299 +++++++++++++++++++++++++++++ 1 file changed, 299 insertions(+) create mode 100644 db_addon/item_attributes_master.py diff --git a/db_addon/item_attributes_master.py b/db_addon/item_attributes_master.py new file mode 100644 index 000000000..00b54a8cf --- /dev/null +++ b/db_addon/item_attributes_master.py @@ -0,0 +1,299 @@ +# !/usr/bin/env python +# vim: set encoding=utf-8 tabstop=4 softtabstop=4 shiftwidth=4 expandtab +# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # +# Copyright 2023 Michael Wenzel +# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # +# AVM for SmartHomeNG. https://github.com/smarthomeNG// +# +# This plugin is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This plugin is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this plugin. If not, see . +# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # + +import ruamel.yaml + +FILENAME_ATTRIBUTES = 'item_attributes.py' + +FILENAME_PLUGIN = 'plugin.yaml' + +ITEM_ATTRIBUTES = { + 'db_addon_fct': { + 'verbrauch_heute': {'cat': 'verbrauch', 'sub_cat': 'onchange', 'item_type': 'num', 'calc': 'onchange', 'params': False, 'description': 'Verbrauch am heutigen Tag (Differenz zwischen aktuellem Wert und den Wert am Ende des vorherigen Tages)'}, + 'verbrauch_woche': {'cat': 'verbrauch', 'sub_cat': 'onchange', 'item_type': 'num', 'calc': 'onchange', 'params': False, 'description': 'Verbrauch in der aktuellen Woche'}, + 'verbrauch_monat': {'cat': 'verbrauch', 'sub_cat': 'onchange', 'item_type': 'num', 'calc': 'onchange', 'params': False, 'description': 'Verbrauch im aktuellen Monat'}, + 'verbrauch_jahr': {'cat': 'verbrauch', 'sub_cat': 'onchange', 'item_type': 'num', 'calc': 'onchange', 'params': False, 'description': 'Verbrauch im aktuellen Jahr'}, + 'verbrauch_heute_minus1': {'cat': 'verbrauch', 'sub_cat': 'timeframe', 'item_type': 'num', 'calc': 'daily', 'params': False, 'description': 'Verbrauch gestern (heute -1 Tag) (Differenz zwischen Wert am Ende des gestrigen Tages und dem Wert am Ende des Tages davor)'}, + 'verbrauch_heute_minus2': {'cat': 'verbrauch', 'sub_cat': 'timeframe', 'item_type': 'num', 'calc': 'daily', 'params': False, 'description': 'Verbrauch vorgestern (heute -2 Tage)'}, + 'verbrauch_heute_minus3': {'cat': 'verbrauch', 'sub_cat': 'timeframe', 'item_type': 'num', 'calc': 'daily', 'params': False, 'description': 'Verbrauch heute -3 Tage'}, + 'verbrauch_heute_minus4': {'cat': 'verbrauch', 'sub_cat': 'timeframe', 'item_type': 'num', 'calc': 'daily', 'params': False, 'description': 'Verbrauch heute -4 Tage'}, + 'verbrauch_heute_minus5': {'cat': 'verbrauch', 'sub_cat': 'timeframe', 'item_type': 'num', 'calc': 'daily', 'params': False, 'description': 'Verbrauch heute -5 Tage'}, + 'verbrauch_heute_minus6': {'cat': 'verbrauch', 'sub_cat': 'timeframe', 'item_type': 'num', 'calc': 'daily', 'params': False, 'description': 'Verbrauch heute -6 Tage'}, + 'verbrauch_heute_minus7': {'cat': 'verbrauch', 'sub_cat': 'timeframe', 'item_type': 'num', 'calc': 'daily', 'params': False, 'description': 'Verbrauch heute -7 Tage'}, + 'verbrauch_woche_minus1': {'cat': 'verbrauch', 'sub_cat': 'timeframe', 'item_type': 'num', 'calc': 'weekly', 'params': False, 'description': 'Verbrauch Vorwoche (aktuelle Woche -1)'}, + 'verbrauch_woche_minus2': {'cat': 'verbrauch', 'sub_cat': 'timeframe', 'item_type': 'num', 'calc': 'weekly', 'params': False, 'description': 'Verbrauch aktuelle Woche -2 Wochen'}, + 'verbrauch_woche_minus3': {'cat': 'verbrauch', 'sub_cat': 'timeframe', 'item_type': 'num', 'calc': 'weekly', 'params': False, 'description': 'Verbrauch aktuelle Woche -3 Wochen'}, + 'verbrauch_woche_minus4': {'cat': 'verbrauch', 'sub_cat': 'timeframe', 'item_type': 'num', 'calc': 'weekly', 'params': False, 'description': 'Verbrauch aktuelle Woche -4 Wochen'}, + 'verbrauch_monat_minus1': {'cat': 'verbrauch', 'sub_cat': 'timeframe', 'item_type': 'num', 'calc': 'monthly', 'params': False, 'description': 'Verbrauch Vormonat (aktueller Monat -1)'}, + 'verbrauch_monat_minus2': {'cat': 'verbrauch', 'sub_cat': 'timeframe', 'item_type': 'num', 'calc': 'monthly', 'params': False, 'description': 'Verbrauch aktueller Monat -2 Monate'}, + 'verbrauch_monat_minus3': {'cat': 'verbrauch', 'sub_cat': 'timeframe', 'item_type': 'num', 'calc': 'monthly', 'params': False, 'description': 'Verbrauch aktueller Monat -3 Monate'}, + 'verbrauch_monat_minus4': {'cat': 'verbrauch', 'sub_cat': 'timeframe', 'item_type': 'num', 'calc': 'monthly', 'params': False, 'description': 'Verbrauch aktueller Monat -4 Monate'}, + 'verbrauch_monat_minus12': {'cat': 'verbrauch', 'sub_cat': 'timeframe', 'item_type': 'num', 'calc': 'monthly', 'params': False, 'description': 'Verbrauch aktueller Monat -12 Monate'}, + 'verbrauch_jahr_minus1': {'cat': 'verbrauch', 'sub_cat': 'timeframe', 'item_type': 'num', 'calc': 'yearly', 'params': False, 'description': 'Verbrauch Vorjahr (aktuelles Jahr -1 Jahr)'}, + 'verbrauch_jahr_minus2': {'cat': 'verbrauch', 'sub_cat': 'timeframe', 'item_type': 'num', 'calc': 'yearly', 'params': False, 'description': 'Verbrauch aktuelles Jahr -2 Jahre'}, + 'verbrauch_rolling_12m_heute_minus1': {'cat': 'verbrauch', 'sub_cat': 'rolling', 'item_type': 'num', 'calc': 'daily', 'params': False, 'description': 'Verbrauch der letzten 12 Monate ausgehend im Ende des letzten Tages'}, + 'verbrauch_rolling_12m_woche_minus1': {'cat': 'verbrauch', 'sub_cat': 'rolling', 'item_type': 'num', 'calc': 'weekly', 'params': False, 'description': 'Verbrauch der letzten 12 Monate ausgehend im Ende der letzten Woche'}, + 'verbrauch_rolling_12m_monat_minus1': {'cat': 'verbrauch', 'sub_cat': 'rolling', 'item_type': 'num', 'calc': 'monthly', 'params': False, 'description': 'Verbrauch der letzten 12 Monate ausgehend im Ende des letzten Monats'}, + 'verbrauch_rolling_12m_jahr_minus1': {'cat': 'verbrauch', 'sub_cat': 'rolling', 'item_type': 'num', 'calc': 'yearly', 'params': False, 'description': 'Verbrauch der letzten 12 Monate ausgehend im Ende des letzten Jahres'}, + 'verbrauch_jahreszeitraum_minus1': {'cat': 'verbrauch', 'sub_cat': 'jahrzeit', 'item_type': 'num', 'calc': 'daily', 'params': False, 'description': 'Verbrauch seit dem 1.1. bis zum heutigen Tag des Vorjahres'}, + 'verbrauch_jahreszeitraum_minus2': {'cat': 'verbrauch', 'sub_cat': 'jahrzeit', 'item_type': 'num', 'calc': 'daily', 'params': False, 'description': 'Verbrauch seit dem 1.1. bis zum heutigen Tag vor 2 Jahren'}, + 'verbrauch_jahreszeitraum_minus3': {'cat': 'verbrauch', 'sub_cat': 'jahrzeit', 'item_type': 'num', 'calc': 'daily', 'params': False, 'description': 'Verbrauch seit dem 1.1. bis zum heutigen Tag vor 3 Jahren'}, + 'zaehlerstand_heute_minus1': {'cat': 'zaehler', 'sub_cat': 'timeframe', 'item_type': 'num', 'calc': 'daily', 'params': False, 'description': 'Zählerstand / Wert am Ende des letzten Tages (heute -1 Tag)'}, + 'zaehlerstand_heute_minus2': {'cat': 'zaehler', 'sub_cat': 'timeframe', 'item_type': 'num', 'calc': 'daily', 'params': False, 'description': 'Zählerstand / Wert am Ende des vorletzten Tages (heute -2 Tag)'}, + 'zaehlerstand_heute_minus3': {'cat': 'zaehler', 'sub_cat': 'timeframe', 'item_type': 'num', 'calc': 'daily', 'params': False, 'description': 'Zählerstand / Wert am Ende des vorvorletzten Tages (heute -3 Tag)'}, + 'zaehlerstand_woche_minus1': {'cat': 'zaehler', 'sub_cat': 'timeframe', 'item_type': 'num', 'calc': 'weekly', 'params': False, 'description': 'Zählerstand / Wert am Ende der vorvorletzten Woche (aktuelle Woche -1 Woche)'}, + 'zaehlerstand_woche_minus2': {'cat': 'zaehler', 'sub_cat': 'timeframe', 'item_type': 'num', 'calc': 'weekly', 'params': False, 'description': 'Zählerstand / Wert am Ende der vorletzten Woche (aktuelle Woche -2 Wochen)'}, + 'zaehlerstand_woche_minus3': {'cat': 'zaehler', 'sub_cat': 'timeframe', 'item_type': 'num', 'calc': 'weekly', 'params': False, 'description': 'Zählerstand / Wert am Ende der aktuellen Woche -3 Wochen'}, + 'zaehlerstand_monat_minus1': {'cat': 'zaehler', 'sub_cat': 'timeframe', 'item_type': 'num', 'calc': 'monthly', 'params': False, 'description': 'Zählerstand / Wert am Ende des letzten Monates (aktueller Monat -1 Monat)'}, + 'zaehlerstand_monat_minus2': {'cat': 'zaehler', 'sub_cat': 'timeframe', 'item_type': 'num', 'calc': 'monthly', 'params': False, 'description': 'Zählerstand / Wert am Ende des vorletzten Monates (aktueller Monat -2 Monate)'}, + 'zaehlerstand_monat_minus3': {'cat': 'zaehler', 'sub_cat': 'timeframe', 'item_type': 'num', 'calc': 'monthly', 'params': False, 'description': 'Zählerstand / Wert am Ende des aktuellen Monats -3 Monate'}, + 'zaehlerstand_jahr_minus1': {'cat': 'zaehler', 'sub_cat': 'timeframe', 'item_type': 'num', 'calc': 'yearly', 'params': False, 'description': 'Zählerstand / Wert am Ende des letzten Jahres (aktuelles Jahr -1 Jahr)'}, + 'zaehlerstand_jahr_minus2': {'cat': 'zaehler', 'sub_cat': 'timeframe', 'item_type': 'num', 'calc': 'yearly', 'params': False, 'description': 'Zählerstand / Wert am Ende des vorletzten Jahres (aktuelles Jahr -2 Jahre)'}, + 'zaehlerstand_jahr_minus3': {'cat': 'zaehler', 'sub_cat': 'timeframe', 'item_type': 'num', 'calc': 'yearly', 'params': False, 'description': 'Zählerstand / Wert am Ende des aktuellen Jahres -3 Jahre'}, + 'minmax_last_24h_min': {'cat': 'wertehistorie', 'sub_cat': 'last', 'item_type': 'num', 'calc': 'daily', 'params': False, 'description': 'minimaler Wert der letzten 24h'}, + 'minmax_last_24h_max': {'cat': 'wertehistorie', 'sub_cat': 'last', 'item_type': 'num', 'calc': 'daily', 'params': False, 'description': 'maximaler Wert der letzten 24h'}, + 'minmax_last_24h_avg': {'cat': 'wertehistorie', 'sub_cat': 'last', 'item_type': 'num', 'calc': 'daily', 'params': False, 'description': 'durchschnittlicher Wert der letzten 24h'}, + 'minmax_last_7d_min': {'cat': 'wertehistorie', 'sub_cat': 'last', 'item_type': 'num', 'calc': 'daily', 'params': False, 'description': 'minimaler Wert der letzten 7 Tage'}, + 'minmax_last_7d_max': {'cat': 'wertehistorie', 'sub_cat': 'last', 'item_type': 'num', 'calc': 'daily', 'params': False, 'description': 'maximaler Wert der letzten 7 Tage'}, + 'minmax_last_7d_avg': {'cat': 'wertehistorie', 'sub_cat': 'last', 'item_type': 'num', 'calc': 'daily', 'params': False, 'description': 'durchschnittlicher Wert der letzten 7 Tage'}, + 'minmax_heute_min': {'cat': 'wertehistorie', 'sub_cat': 'onchange', 'item_type': 'num', 'calc': 'onchange', 'params': False, 'description': 'Minimalwert seit Tagesbeginn'}, + 'minmax_heute_max': {'cat': 'wertehistorie', 'sub_cat': 'onchange', 'item_type': 'num', 'calc': 'onchange', 'params': False, 'description': 'Maximalwert seit Tagesbeginn'}, + 'minmax_heute_avg': {'cat': 'wertehistorie', 'sub_cat': 'onchange', 'item_type': 'num', 'calc': 'onchange', 'params': False, 'description': 'Durschnittswert seit Tagesbeginn'}, + 'minmax_heute_minus1_min': {'cat': 'wertehistorie', 'sub_cat': 'timeframe', 'item_type': 'num', 'calc': 'daily', 'params': False, 'description': 'Minimalwert gestern (heute -1 Tag)'}, + 'minmax_heute_minus1_max': {'cat': 'wertehistorie', 'sub_cat': 'timeframe', 'item_type': 'num', 'calc': 'daily', 'params': False, 'description': 'Maximalwert gestern (heute -1 Tag)'}, + 'minmax_heute_minus1_avg': {'cat': 'wertehistorie', 'sub_cat': 'timeframe', 'item_type': 'num', 'calc': 'daily', 'params': False, 'description': 'Durchschnittswert gestern (heute -1 Tag)'}, + 'minmax_heute_minus2_min': {'cat': 'wertehistorie', 'sub_cat': 'timeframe', 'item_type': 'num', 'calc': 'daily', 'params': False, 'description': 'Minimalwert vorgestern (heute -2 Tage)'}, + 'minmax_heute_minus2_max': {'cat': 'wertehistorie', 'sub_cat': 'timeframe', 'item_type': 'num', 'calc': 'daily', 'params': False, 'description': 'Maximalwert vorgestern (heute -2 Tage)'}, + 'minmax_heute_minus2_avg': {'cat': 'wertehistorie', 'sub_cat': 'timeframe', 'item_type': 'num', 'calc': 'daily', 'params': False, 'description': 'Durchschnittswert vorgestern (heute -2 Tage)'}, + 'minmax_heute_minus3_min': {'cat': 'wertehistorie', 'sub_cat': 'timeframe', 'item_type': 'num', 'calc': 'daily', 'params': False, 'description': 'Minimalwert heute vor 3 Tagen'}, + 'minmax_heute_minus3_max': {'cat': 'wertehistorie', 'sub_cat': 'timeframe', 'item_type': 'num', 'calc': 'daily', 'params': False, 'description': 'Maximalwert heute vor 3 Tagen'}, + 'minmax_heute_minus3_avg': {'cat': 'wertehistorie', 'sub_cat': 'timeframe', 'item_type': 'num', 'calc': 'daily', 'params': False, 'description': 'Durchschnittswert heute vor 3 Tagen'}, + 'minmax_woche_min': {'cat': 'wertehistorie', 'sub_cat': 'onchange', 'item_type': 'num', 'calc': 'onchange', 'params': False, 'description': 'Minimalwert seit Wochenbeginn'}, + 'minmax_woche_max': {'cat': 'wertehistorie', 'sub_cat': 'onchange', 'item_type': 'num', 'calc': 'onchange', 'params': False, 'description': 'Maximalwert seit Wochenbeginn'}, + 'minmax_woche_minus1_min': {'cat': 'wertehistorie', 'sub_cat': 'timeframe', 'item_type': 'num', 'calc': 'weekly', 'params': False, 'description': 'Minimalwert Vorwoche (aktuelle Woche -1)'}, + 'minmax_woche_minus1_max': {'cat': 'wertehistorie', 'sub_cat': 'timeframe', 'item_type': 'num', 'calc': 'weekly', 'params': False, 'description': 'Maximalwert Vorwoche (aktuelle Woche -1)'}, + 'minmax_woche_minus1_avg': {'cat': 'wertehistorie', 'sub_cat': 'timeframe', 'item_type': 'num', 'calc': 'weekly', 'params': False, 'description': 'Durchschnittswert Vorwoche (aktuelle Woche -1)'}, + 'minmax_woche_minus2_min': {'cat': 'wertehistorie', 'sub_cat': 'timeframe', 'item_type': 'num', 'calc': 'weekly', 'params': False, 'description': 'Minimalwert aktuelle Woche -2 Wochen'}, + 'minmax_woche_minus2_max': {'cat': 'wertehistorie', 'sub_cat': 'timeframe', 'item_type': 'num', 'calc': 'weekly', 'params': False, 'description': 'Maximalwert aktuelle Woche -2 Wochen'}, + 'minmax_woche_minus2_avg': {'cat': 'wertehistorie', 'sub_cat': 'timeframe', 'item_type': 'num', 'calc': 'weekly', 'params': False, 'description': 'Durchschnittswert aktuelle Woche -2 Wochen'}, + 'minmax_monat_min': {'cat': 'wertehistorie', 'sub_cat': 'onchange', 'item_type': 'num', 'calc': 'onchange', 'params': False, 'description': 'Minimalwert seit Monatsbeginn'}, + 'minmax_monat_max': {'cat': 'wertehistorie', 'sub_cat': 'onchange', 'item_type': 'num', 'calc': 'onchange', 'params': False, 'description': 'Maximalwert seit Monatsbeginn'}, + 'minmax_monat_minus1_min': {'cat': 'wertehistorie', 'sub_cat': 'timeframe', 'item_type': 'num', 'calc': 'monthly', 'params': False, 'description': 'Minimalwert Vormonat (aktueller Monat -1)'}, + 'minmax_monat_minus1_max': {'cat': 'wertehistorie', 'sub_cat': 'timeframe', 'item_type': 'num', 'calc': 'monthly', 'params': False, 'description': 'Maximalwert Vormonat (aktueller Monat -1)'}, + 'minmax_monat_minus1_avg': {'cat': 'wertehistorie', 'sub_cat': 'timeframe', 'item_type': 'num', 'calc': 'monthly', 'params': False, 'description': 'Durchschnittswert Vormonat (aktueller Monat -1)'}, + 'minmax_monat_minus2_min': {'cat': 'wertehistorie', 'sub_cat': 'timeframe', 'item_type': 'num', 'calc': 'monthly', 'params': False, 'description': 'Minimalwert aktueller Monat -2 Monate'}, + 'minmax_monat_minus2_max': {'cat': 'wertehistorie', 'sub_cat': 'timeframe', 'item_type': 'num', 'calc': 'monthly', 'params': False, 'description': 'Maximalwert aktueller Monat -2 Monate'}, + 'minmax_monat_minus2_avg': {'cat': 'wertehistorie', 'sub_cat': 'timeframe', 'item_type': 'num', 'calc': 'monthly', 'params': False, 'description': 'Durchschnittswert aktueller Monat -2 Monate'}, + 'minmax_jahr_min': {'cat': 'wertehistorie', 'sub_cat': 'onchange', 'item_type': 'num', 'calc': 'onchange', 'params': False, 'description': 'Minimalwert seit Jahresbeginn'}, + 'minmax_jahr_max': {'cat': 'wertehistorie', 'sub_cat': 'onchange', 'item_type': 'num', 'calc': 'onchange', 'params': False, 'description': 'Maximalwert seit Jahresbeginn'}, + 'minmax_jahr_minus1_min': {'cat': 'wertehistorie', 'sub_cat': 'timeframe', 'item_type': 'num', 'calc': 'yearly', 'params': False, 'description': 'Minimalwert Vorjahr (aktuelles Jahr -1 Jahr)'}, + 'minmax_jahr_minus1_max': {'cat': 'wertehistorie', 'sub_cat': 'timeframe', 'item_type': 'num', 'calc': 'yearly', 'params': False, 'description': 'Maximalwert Vorjahr (aktuelles Jahr -1 Jahr)'}, + 'minmax_jahr_minus1_avg': {'cat': 'wertehistorie', 'sub_cat': 'timeframe', 'item_type': 'num', 'calc': 'yearly', 'params': False, 'description': 'Durchschnittswert Vorjahr (aktuelles Jahr -1 Jahr)'}, + 'tagesmitteltemperatur_heute': {'cat': 'tagesmittel', 'sub_cat': 'onchange', 'item_type': 'num', 'calc': 'onchange', 'params': False, 'description': 'Tagesmitteltemperatur heute'}, + 'tagesmitteltemperatur_heute_minus1': {'cat': 'tagesmittel', 'sub_cat': 'timeframe', 'item_type': 'num', 'calc': 'daily', 'params': False, 'description': 'Tagesmitteltemperatur des letzten Tages (heute -1 Tag)'}, + 'tagesmitteltemperatur_heute_minus2': {'cat': 'tagesmittel', 'sub_cat': 'timeframe', 'item_type': 'num', 'calc': 'daily', 'params': False, 'description': 'Tagesmitteltemperatur des vorletzten Tages (heute -2 Tag)'}, + 'tagesmitteltemperatur_heute_minus3': {'cat': 'tagesmittel', 'sub_cat': 'timeframe', 'item_type': 'num', 'calc': 'daily', 'params': False, 'description': 'Tagesmitteltemperatur des vorvorletzten Tages (heute -3 Tag)'}, + 'serie_minmax_monat_min_15m': {'cat': 'serie', 'sub_cat': 'minmax', 'item_type': 'list', 'calc': 'monthly', 'params': False, 'description': 'monatlicher Minimalwert der letzten 15 Monate (gleitend)'}, + 'serie_minmax_monat_max_15m': {'cat': 'serie', 'sub_cat': 'minmax', 'item_type': 'list', 'calc': 'monthly', 'params': False, 'description': 'monatlicher Maximalwert der letzten 15 Monate (gleitend)'}, + 'serie_minmax_monat_avg_15m': {'cat': 'serie', 'sub_cat': 'minmax', 'item_type': 'list', 'calc': 'monthly', 'params': False, 'description': 'monatlicher Mittelwert der letzten 15 Monate (gleitend)'}, + 'serie_minmax_woche_min_30w': {'cat': 'serie', 'sub_cat': 'minmax', 'item_type': 'list', 'calc': 'weekly', 'params': False, 'description': 'wöchentlicher Minimalwert der letzten 30 Wochen (gleitend)'}, + 'serie_minmax_woche_max_30w': {'cat': 'serie', 'sub_cat': 'minmax', 'item_type': 'list', 'calc': 'weekly', 'params': False, 'description': 'wöchentlicher Maximalwert der letzten 30 Wochen (gleitend)'}, + 'serie_minmax_woche_avg_30w': {'cat': 'serie', 'sub_cat': 'minmax', 'item_type': 'list', 'calc': 'weekly', 'params': False, 'description': 'wöchentlicher Mittelwert der letzten 30 Wochen (gleitend)'}, + 'serie_minmax_tag_min_30d': {'cat': 'serie', 'sub_cat': 'minmax', 'item_type': 'list', 'calc': 'daily', 'params': False, 'description': 'täglicher Minimalwert der letzten 30 Tage (gleitend)'}, + 'serie_minmax_tag_max_30d': {'cat': 'serie', 'sub_cat': 'minmax', 'item_type': 'list', 'calc': 'daily', 'params': False, 'description': 'täglicher Maximalwert der letzten 30 Tage (gleitend)'}, + 'serie_minmax_tag_avg_30d': {'cat': 'serie', 'sub_cat': 'minmax', 'item_type': 'list', 'calc': 'daily', 'params': False, 'description': 'täglicher Mittelwert der letzten 30 Tage (gleitend)'}, + 'serie_verbrauch_tag_30d': {'cat': 'serie', 'sub_cat': 'verbrauch', 'item_type': 'list', 'calc': 'daily', 'params': False, 'description': 'Verbrauch pro Tag der letzten 30 Tage'}, + 'serie_verbrauch_woche_30w': {'cat': 'serie', 'sub_cat': 'verbrauch', 'item_type': 'list', 'calc': 'weekly', 'params': False, 'description': 'Verbrauch pro Woche der letzten 30 Wochen'}, + 'serie_verbrauch_monat_18m': {'cat': 'serie', 'sub_cat': 'verbrauch', 'item_type': 'list', 'calc': 'monthly', 'params': False, 'description': 'Verbrauch pro Monat der letzten 18 Monate'}, + 'serie_zaehlerstand_tag_30d': {'cat': 'serie', 'sub_cat': 'zaehler', 'item_type': 'list', 'calc': 'daily', 'params': False, 'description': 'Zählerstand am Tagesende der letzten 30 Tage'}, + 'serie_zaehlerstand_woche_30w': {'cat': 'serie', 'sub_cat': 'zaehler', 'item_type': 'list', 'calc': 'weekly', 'params': False, 'description': 'Zählerstand am Wochenende der letzten 30 Wochen'}, + 'serie_zaehlerstand_monat_18m': {'cat': 'serie', 'sub_cat': 'zaehler', 'item_type': 'list', 'calc': 'monthly', 'params': False, 'description': 'Zählerstand am Monatsende der letzten 18 Monate'}, + 'serie_waermesumme_monat_24m': {'cat': 'serie', 'sub_cat': 'summe', 'item_type': 'list', 'calc': 'monthly', 'params': False, 'description': 'monatliche Wärmesumme der letzten 24 Monate'}, + 'serie_kaeltesumme_monat_24m': {'cat': 'serie', 'sub_cat': 'summe', 'item_type': 'list', 'calc': 'monthly', 'params': False, 'description': 'monatliche Kältesumme der letzten 24 Monate'}, + 'serie_tagesmittelwert_0d': {'cat': 'serie', 'sub_cat': 'mittel_d', 'item_type': 'list', 'calc': 'daily', 'params': False, 'description': 'Tagesmittelwert für den aktuellen Tag'}, + 'serie_tagesmittelwert_stunde_0d': {'cat': 'serie', 'sub_cat': 'mittel_h', 'item_type': 'list', 'calc': 'daily', 'params': False, 'description': 'Stundenmittelwert für den aktuellen Tag'}, + 'serie_tagesmittelwert_stunde_30_0d': {'cat': 'serie', 'sub_cat': 'mittel_h1', 'item_type': 'list', 'calc': 'daily', 'params': False, 'description': 'Stundenmittelwert für den aktuellen Tag'}, + 'serie_tagesmittelwert_tag_stunde_30d': {'cat': 'serie', 'sub_cat': 'mittel_d_h', 'item_type': 'list', 'calc': 'daily', 'params': False, 'description': 'Stundenmittelwert pro Tag der letzten 30 Tage (bspw. zur Berechnung der Tagesmitteltemperatur basierend auf den Mittelwert der Temperatur pro Stunde'}, + 'general_oldest_value': {'cat': 'gen', 'sub_cat': None, 'item_type': 'num', 'calc': 'no', 'params': False, 'description': 'Ausgabe des ältesten Wertes des entsprechenden "Parent-Items" mit database Attribut'}, + 'general_oldest_log': {'cat': 'gen', 'sub_cat': None, 'item_type': 'list', 'calc': 'no', 'params': False, 'description': 'Ausgabe des Timestamp des ältesten Eintrages des entsprechenden "Parent-Items" mit database Attribut'}, + 'kaeltesumme': {'cat': 'complex', 'sub_cat': 'summe', 'item_type': 'num', 'calc': 'daily', 'params': True, 'description': 'Berechnet die Kältesumme für einen Zeitraum, db_addon_params: (year=mandatory, month=optional)'}, + 'waermesumme': {'cat': 'complex', 'sub_cat': 'summe', 'item_type': 'num', 'calc': 'daily', 'params': True, 'description': 'Berechnet die Wärmesumme für einen Zeitraum, db_addon_params: (year=mandatory, month=optional)'}, + 'gruenlandtempsumme': {'cat': 'complex', 'sub_cat': None, 'item_type': 'num', 'calc': 'daily', 'params': True, 'description': 'Berechnet die Grünlandtemperatursumme für einen Zeitraum, db_addon_params: (year=mandatory)'}, + 'tagesmitteltemperatur': {'cat': 'complex', 'sub_cat': None, 'item_type': 'list', 'calc': 'daily', 'params': True, 'description': 'Berechnet die Tagesmitteltemperatur auf Basis der stündlichen Durchschnittswerte eines Tages für die angegebene Anzahl von Tagen (timeframe=day, count=integer)'}, + 'wachstumsgradtage': {'cat': 'complex', 'sub_cat': None, 'item_type': 'num', 'calc': 'daily', 'params': True, 'description': 'Berechnet die Wachstumsgradtage auf Basis der stündlichen Durchschnittswerte eines Tages für das laufende Jahr mit an Angabe des Temperaturschwellenwertes (threshold=Schwellentemperatur)'}, + 'db_request': {'cat': 'complex', 'sub_cat': None, 'item_type': 'list', 'calc': 'group', 'params': True, 'description': 'Abfrage der DB: db_addon_params: (func=mandatory, item=mandatory, timespan=mandatory, start=optional, end=optional, count=optional, group=optional, group2=optional)'}, + 'minmax': {'cat': 'complex', 'sub_cat': None, 'item_type': 'num', 'calc': 'timeframe', 'params': True, 'description': 'Berechnet einen min/max/avg Wert für einen bestimmen Zeitraum: db_addon_params: (func=mandatory, timeframe=mandatory, start=mandatory)'}, + 'minmax_last': {'cat': 'complex', 'sub_cat': None, 'item_type': 'num', 'calc': 'timeframe', 'params': True, 'description': 'Berechnet einen min/max/avg Wert für ein bestimmtes Zeitfenster von jetzt zurück: db_addon_params: (func=mandatory, timeframe=mandatory, start=mandatory, end=mandatory)'}, + 'verbrauch': {'cat': 'complex', 'sub_cat': None, 'item_type': 'num', 'calc': 'timeframe', 'params': True, 'description': 'Berechnet einen Verbrauchswert für einen bestimmen Zeitraum: db_addon_params: (timeframe=mandatory, start=mandatory end=mandatory)'}, + 'zaehlerstand': {'cat': 'complex', 'sub_cat': None, 'item_type': 'num', 'calc': 'timeframe', 'params': True, 'description': 'Berechnet einen Zählerstand für einen bestimmen Zeitpunkt: db_addon_params: (timeframe=mandatory, start=mandatory)'}, + }, + 'db_addon_info': { + 'db_version': {'cat': 'info', 'item_type': 'str', 'calc': 'no', 'params': False, 'description': 'Version der verbundenen Datenbank'}, + }, + 'db_addon_admin': { + 'suspend': {'cat': 'admin', 'item_type': 'bool', 'calc': 'no', 'params': False, 'description': 'Unterbricht die Aktivitäten des Plugin'}, + 'recalc_all': {'cat': 'admin', 'item_type': 'bool', 'calc': 'no', 'params': False, 'description': 'Startet einen Neuberechnungslauf aller on-demand Items'}, + 'clean_cache_values': {'cat': 'admin', 'item_type': 'bool', 'calc': 'no', 'params': False, 'description': 'Löscht Plugin-Cache und damit alle im Plugin zwischengespeicherten Werte'}, + }, +} + +FILE_HEADER = """\ +# !/usr/bin/env python +# vim: set encoding=utf-8 tabstop=4 softtabstop=4 shiftwidth=4 expandtab +# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # +# Copyright 2023 Michael Wenzel +# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # +# DatabaseAddOn for SmartHomeNG. https://github.com/smarthomeNG// +# +# This plugin is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This plugin is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this plugin. If not, see . +# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # + + +# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # +# +# +# THIS FILE IS AUTOMATICALLY CREATED BY USING item_attributes_master.py +# +# +# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # + +""" + +def get_attrs(sub_dict: dict = {}) -> list: + attributes = [] + for entry in ITEM_ATTRIBUTES: + for db_addon_fct in ITEM_ATTRIBUTES[entry]: + if sub_dict.items() <= ITEM_ATTRIBUTES[entry][db_addon_fct].items(): + attributes.append(db_addon_fct) + return attributes + +def export_item_attributes_py(): + ATTRS = dict() + ATTRS['ALL_ONCHANGE_ATTRIBUTES'] = get_attrs(sub_dict={'calc': 'onchange'}) + ATTRS['ALL_DAILY_ATTRIBUTES'] = get_attrs(sub_dict={'calc': 'daily'}) + ATTRS['ALL_WEEKLY_ATTRIBUTES'] = get_attrs(sub_dict={'calc': 'weekly'}) + ATTRS['ALL_MONTHLY_ATTRIBUTES'] = get_attrs(sub_dict={'calc': 'monthly'}) + ATTRS['ALL_YEARLY_ATTRIBUTES'] = get_attrs(sub_dict={'calc': 'yearly'}) + ATTRS['ALL_NEED_PARAMS_ATTRIBUTES'] = get_attrs(sub_dict={'params': True}) + ATTRS['ALL_VERBRAUCH_ATTRIBUTES'] = get_attrs(sub_dict={'cat': 'verbrauch'}) + ATTRS['VERBRAUCH_ATTRIBUTES_ONCHANGE'] = get_attrs(sub_dict={'cat': 'verbrauch', 'sub_cat': 'onchange'}) + ATTRS['VERBRAUCH_ATTRIBUTES_TIMEFRAME'] = get_attrs(sub_dict={'cat': 'verbrauch', 'sub_cat': 'timeframe'}) + ATTRS['VERBRAUCH_ATTRIBUTES_ROLLING'] = get_attrs(sub_dict={'cat': 'verbrauch', 'sub_cat': 'rolling'}) + ATTRS['VERBRAUCH_ATTRIBUTES_JAHRESZEITRAUM'] = get_attrs(sub_dict={'cat': 'verbrauch', 'sub_cat': 'jahrzeit'}) + ATTRS['ALL_ZAEHLERSTAND_ATTRIBUTES'] = get_attrs(sub_dict={'cat': 'zaehler'}) + ATTRS['ZAEHLERSTAND_ATTRIBUTES_TIMEFRAME'] = get_attrs(sub_dict={'cat': 'zaehler', 'sub_cat': 'timeframe'}) + ATTRS['ALL_HISTORIE_ATTRIBUTES'] = get_attrs(sub_dict={'cat': 'wertehistorie'}) + ATTRS['HISTORIE_ATTRIBUTES_ONCHANGE'] = get_attrs(sub_dict={'cat': 'wertehistorie', 'sub_cat': 'onchange'}) + ATTRS['HISTORIE_ATTRIBUTES_LAST'] = get_attrs(sub_dict={'cat': 'wertehistorie', 'sub_cat': 'last'}) + ATTRS['HISTORIE_ATTRIBUTES_TIMEFRAME'] = get_attrs(sub_dict={'cat': 'wertehistorie', 'sub_cat': 'timeframe'}) + ATTRS['ALL_TAGESMITTEL_ATTRIBUTES'] = get_attrs(sub_dict={'cat': 'tagesmittel'}) + ATTRS['TAGESMITTEL_ATTRIBUTES_ONCHANGE'] = get_attrs(sub_dict={'cat': 'tagesmittel', 'sub_cat': 'onchange'}) + ATTRS['TAGESMITTEL_ATTRIBUTES_TIMEFRAME'] = get_attrs(sub_dict={'cat': 'tagesmittel', 'sub_cat': 'timeframe'}) + ATTRS['ALL_SERIE_ATTRIBUTES'] = get_attrs(sub_dict={'cat': 'serie'}) + ATTRS['SERIE_ATTRIBUTES_MINMAX'] = get_attrs(sub_dict={'cat': 'serie', 'sub_cat': 'minmax'}) + ATTRS['SERIE_ATTRIBUTES_ZAEHLERSTAND'] = get_attrs(sub_dict={'cat': 'serie', 'sub_cat': 'zaehler'}) + ATTRS['SERIE_ATTRIBUTES_VERBRAUCH'] = get_attrs(sub_dict={'cat': 'serie', 'sub_cat': 'verbrauch'}) + ATTRS['SERIE_ATTRIBUTES_SUMME'] = get_attrs(sub_dict={'cat': 'serie', 'sub_cat': 'summe'}) + ATTRS['SERIE_ATTRIBUTES_MITTEL_D'] = get_attrs(sub_dict={'cat': 'serie', 'sub_cat': 'mittel_d'}) + ATTRS['SERIE_ATTRIBUTES_MITTEL_H'] = get_attrs(sub_dict={'cat': 'serie', 'sub_cat': 'mittel_h'}) + ATTRS['SERIE_ATTRIBUTES_MITTEL_H1'] = get_attrs(sub_dict={'cat': 'serie', 'sub_cat': 'mittel_h1'}) + ATTRS['SERIE_ATTRIBUTES_MITTEL_D_H'] = get_attrs(sub_dict={'cat': 'serie', 'sub_cat': 'mittel_d_h'}) + ATTRS['ALL_GEN_ATTRIBUTES'] = get_attrs(sub_dict={'cat': 'gen'}) + ATTRS['ALL_COMPLEX_ATTRIBUTES'] = get_attrs(sub_dict={'cat': 'complex'}) + + # create file and write header + f = open(FILENAME_ATTRIBUTES, "w") + f.write(FILE_HEADER) + f.close() + + # write avm_data_types + for attr, alist in ATTRS.items(): + with open(FILENAME_ATTRIBUTES, "a") as f: + print(f'{attr} = {alist!r}', file=f) + + print('item_attributes.py successfully created!') + +def create_plugin_yaml_item_attribute_valids(): + """Create valid_list of db_addon_fct based on master dict""" + + valid_list_str = """ # NOTE: valid_list is automatically created by using item_attributes_master.py""" + valid_list_desc_str = """ # NOTE: valid_list_description is automatically created by using item_attributes_master.py""" + valid_list_item_type = """ # NOTE: valid_list_item_type is automatically created by using item_attributes_master.py""" + valid_list_calculation = """ # NOTE: valid_list_calculation is automatically created by using item_attributes_master.py""" + + for db_addon_fct in ITEM_ATTRIBUTES[attribute]: + valid_list_str = f"""{valid_list_str}\n\ + - {db_addon_fct!r:<40}""" + + valid_list_desc_str = f"""{valid_list_desc_str}\n\ + - '{ITEM_ATTRIBUTES[attribute][db_addon_fct]['description']:<}'""" + + valid_list_item_type = f"""{valid_list_item_type}\n\ + - '{ITEM_ATTRIBUTES[attribute][db_addon_fct]['item_type']:<}'""" + + valid_list_calculation = f"""{valid_list_calculation}\n\ + - '{ITEM_ATTRIBUTES[attribute][db_addon_fct]['calc']:<}'""" + + valid_list_calculation = f"""{valid_list_calculation}\n\r""" + + return valid_list_str, valid_list_desc_str, valid_list_item_type, valid_list_calculation + +def update_plugin_yaml_item_attributes(): + """Update 'valid_list', 'valid_list_description', 'valid_list_item_type' and 'valid_list_calculation' of item attributes in plugin.yaml""" + + yaml = ruamel.yaml.YAML() + yaml.indent(mapping=4, sequence=4, offset=4) + yaml.width = 200 + yaml.allow_unicode = True + yaml.preserve_quotes = False + + valid_list_str, valid_list_desc_str, valid_list_item_type_str, valid_list_calc_str = create_plugin_yaml_item_attribute_valids() + + with open(FILENAME_PLUGIN, 'r', encoding="utf-8") as f: + data = yaml.load(f) + + if data.get('item_attributes', {}).get(attribute): + data['item_attributes'][attribute]['valid_list'] = yaml.load(valid_list_str) + data['item_attributes'][attribute]['valid_list_description'] = yaml.load(valid_list_desc_str) + data['item_attributes'][attribute]['valid_list_item_type'] = yaml.load(valid_list_item_type_str) + data['item_attributes'][attribute]['valid_list_calculation'] = yaml.load(valid_list_calc_str) + + with open(FILENAME_PLUGIN, 'w', encoding="utf-8") as f: + yaml.dump(data, f) + print(f"Successfully updated Attribute '{attribute}' in plugin.yaml!") + else: + print(f"Attribute '{attribute}' not defined in plugin.yaml") + +if __name__ == '__main__': + export_item_attributes_py() + for attribute in ITEM_ATTRIBUTES: + update_plugin_yaml_item_attributes() From 5bb511afd52656c498f3f7187d45c879e3e76f50 Mon Sep 17 00:00:00 2001 From: sisamiwe Date: Fri, 11 Aug 2023 16:01:22 +0200 Subject: [PATCH 04/41] db_addon: - execution of onchange to make sure changed values are already in db - store/load cached data as pickle to survive restart - enhance automated update scripts --- db_addon/__init__.py | 153 +++++++++++++++++++++++++++-- db_addon/item_attributes_master.py | 97 ++++++++++++++---- db_addon/plugin.yaml | 4 +- 3 files changed, 228 insertions(+), 26 deletions(-) diff --git a/db_addon/__init__.py b/db_addon/__init__.py index d254064f2..cc7646ce6 100644 --- a/db_addon/__init__.py +++ b/db_addon/__init__.py @@ -25,6 +25,7 @@ # ######################################################################### +import os import sqlvalidator import datetime import time @@ -32,9 +33,11 @@ import queue import threading import logging +import pickle from dateutil.relativedelta import relativedelta from typing import Union from dataclasses import dataclass, InitVar +from collections import deque from lib.model.smartplugin import SmartPlugin from lib.item import Items @@ -58,7 +61,7 @@ class DatabaseAddOn(SmartPlugin): PLUGIN_VERSION = '1.2.3' # ToDo: remove revision - REVISION = 'D' + REVISION = 'E' def __init__(self, sh): """ @@ -68,18 +71,22 @@ def __init__(self, sh): # Call init code of parent class (SmartPlugin) super().__init__() + self.logger.debug(f'Start of {self.get_shortname()} Plugin.') + # get item and shtime instance self.shtime = Shtime.get_instance() self.items = Items.get_instance() self.plugins = Plugins.get_instance() # define cache dicts - self.current_values = {} # Dict to hold min and max value of current day / week / month / year for items - self.previous_values = {} # Dict to hold value of end of last day / week / month / year for items - self.item_cache = {} # Dict to hold item_id, oldest_log_ts and oldest_entry for items + self.pickle_data_validity_time = 600 # seconds after which the data saved in pickle are not valid anymore + self.current_values = {} # Dict to hold min and max value of current day / week / month / year for items + self.previous_values = {} # Dict to hold value of end of last day / week / month / year for items + self.item_cache = {} # Dict to hold item_id, oldest_log_ts and oldest_entry for items # define variables for database, database connection, working queue and status self.item_queue = queue.Queue() # Queue containing all to be executed items + self.update_item_delay_deque = deque() # Deque for delay working of updated item values # ToDo: Check if still needed self.queue_consumer_thread = None # Queue consumer thread self._db_plugin = None # object if database plugin @@ -93,6 +100,7 @@ def __init__(self, sh): self.startup_finished = False # Startup of Plugin finished self.suspended = False # Is plugin activity suspended self.active_queue_item: str = '-' # String holding item path of currently executed item + self.onchange_delay_time = 30 # define default mysql settings self.default_connect_timeout = 60 @@ -107,11 +115,15 @@ def __init__(self, sh): self.use_oldest_entry = self.get_parameter_value('use_oldest_entry') self.lock_db_for_query = self.get_parameter_value('lock_db_for_query') + # path and filename for data storage + data_storage_file = 'db_addon_data' + self.data_storage_path = f"{os.getcwd()}/var/plugin_data/{self.get_shortname()}/{data_storage_file}.pkl" + # get debug log options self.debug_log = DebugLogOptions(self.log_level) - # init cache dicts - self._init_cache_dicts() + # init cache data + self.init_cache_data() # init webinterface self.init_webinterface(WebInterface) @@ -153,6 +165,9 @@ def run(self): self.logger.info(f"Set scheduler for calculating startup-items with delay of {self.startup_run_delay + 3}s to {dt}.") self.scheduler_add('startup', self.execute_startup_items, next=dt) + # add scheduler for delayed working if onchange items + self.scheduler_add('onchange_delay', self.work_update_item_delay_deque, prio=3, cron=None, cycle=30, value=None, offset=None, next=None) + # update database_items in item config, where path was given self._update_database_items() @@ -183,7 +198,10 @@ def stop(self): self.logger.debug("Stop method called") self.alive = False self.scheduler_remove('cyclic') + self.scheduler_remove('onchange_delay') self._db.close() + self.save_cache_data() + # ToDo: Check if still needed # self._queue_consumer_thread_shutdown() @@ -740,6 +758,115 @@ def update_item(self, item, caller=None, source=None, dest=None): self._init_cache_dicts() item(False, self.get_shortname()) + def _save_pickle(self, data) -> None: + """Saves received data as pickle to given file""" + + if data and len(data) > 0: + self.logger.debug(f"Start writing data {data=} to '{self.data_storage_path}'") + os.makedirs(os.path.dirname(self.data_storage_path), exist_ok=True) + try: + with open(self.data_storage_path, "wb") as output: + try: + pickle.dump(data, output, pickle.HIGHEST_PROTOCOL) + self.logger.debug(f"Successfully wrote data to '{self.data_storage_path}'") + except Exception as e: + self.logger.debug(f"Unable to write data to '{self.data_storage_path}': {e}") + pass + except OSError as e: + self.logger.debug(f"Unable to write data to '{self.data_storage_path}': {e}") + pass + + def _read_pickle(self): + """read a pickle file to gather data""" + + self.logger.debug(f"Start reading data from '{self.data_storage_path}'") + + if os.path.exists(self.data_storage_path): + with open(self.data_storage_path, 'rb') as data: + try: + data = pickle.load(data) + self.logger.debug(f"Successfully read data from {self.data_storage_path}") + return data + except Exception as e: + self.logger.debug(f"Unable to read data from {self.data_storage_path}: {e}") + return None + + self.logger.debug(f"Unable to read data from {self.data_storage_path}: 'File/Path not existing'") + return None + + def init_cache_data(self): + """init cache dicts by reading pickle""" + + def create_items_1(d): + n_d = {} + for item_str in d: + item = self.items.return_item(item_str) + if item: + n_d[item] = d[item_str] + return n_d + + def create_items_2(d): + n_d = {} + for timeframe in d: + n_d[timeframe] = {} + for item_str in d[timeframe]: + item = self.items.return_item(item_str) + if item: + n_d[timeframe][item] = d[timeframe][item_str] + return n_d + + # init cache dicts + self._init_cache_dicts() + + # read pickle and set data + raw_data = self._read_pickle() + + if not isinstance(raw_data, dict): + self.logger.info("Unable to extract db_addon data from pickle file. Start with empty cache.") + return + + current_values = raw_data.get('current_values') + previous_values = raw_data.get('previous_values') + item_cache = raw_data.get('item_cache') + stop_time = raw_data.get('stop_time') + + if not stop_time or (int(time.time()) - stop_time) > self.pickle_data_validity_time: + self.logger.info("Data for db_addon read from pickle are expired. Start with empty cache.") + return + + if isinstance(current_values, dict): + self.current_values = create_items_2(current_values) + if isinstance(previous_values, dict): + self.previous_values = create_items_2(previous_values) + if isinstance(item_cache, dict): + self.item_cache = create_items_1(item_cache) + + def save_cache_data(self): + """save all relevant data to survive restart, transform items in item_str""" + + def clean_items_1(d): + n_d = {} + for item in d: + n_d[item.path()] = d[item] + return n_d + + def clean_items_2(d): + n_d = {} + for timeframe in d: + n_d[timeframe] = {} + for item in d[timeframe]: + n_d[timeframe][item.path()] = d[timeframe][item] + return n_d + + self._save_pickle({'current_values': clean_items_2(self.current_values), + 'previous_values': clean_items_2(self.previous_values), + 'item_cache': clean_items_1(self.item_cache), + 'stop_time': int(time.time())}) + + ######################################### + # Item Handling + ######################################### + def execute_due_items(self) -> None: """Execute all items, which are due""" @@ -838,12 +965,24 @@ def work_item_queue(self) -> None: item, value = queue_entry self.logger.info(f"# {self.item_queue.qsize() + 1} item(s) to do. || 'on-change' item={item.path()} with {value=} will be processed.") self.active_queue_item = str(item.path()) - self.handle_onchange(item, value) + # self.handle_onchange(item, value) + self.update_item_delay_deque.append([int(time.time()) + self.onchange_delay_time, item, value]) else: self.logger.info(f"# {self.item_queue.qsize() + 1} item(s) to do. || 'on-demand' item={queue_entry.path()} will be processed.") self.active_queue_item = str(queue_entry.path()) self.handle_ondemand(queue_entry) + def work_update_item_delay_deque(self): + """check update_item_delay_deque is due and process it""" + + for i in range(len(self.update_item_delay_deque)): + [update_time, item, value] = self.update_item_delay_deque.popleft() + if update_time < int(time.time()): + self.logger.debug(f"Item {item.path()} with {value=} is now due for being processed.") + self.handle_onchange(item, value) + else: + self.update_item_delay_deque.append([update_time, item, value]) + def handle_ondemand(self, item: Item) -> None: """ Calculate value for requested item, fill cache dicts and set item value. diff --git a/db_addon/item_attributes_master.py b/db_addon/item_attributes_master.py index 00b54a8cf..6fa54edf5 100644 --- a/db_addon/item_attributes_master.py +++ b/db_addon/item_attributes_master.py @@ -188,6 +188,7 @@ """ + def get_attrs(sub_dict: dict = {}) -> list: attributes = [] for entry in ITEM_ATTRIBUTES: @@ -196,7 +197,12 @@ def get_attrs(sub_dict: dict = {}) -> list: attributes.append(db_addon_fct) return attributes + def export_item_attributes_py(): + + print() + print(f"A) Start generation of {FILENAME_ATTRIBUTES}") + ATTRS = dict() ATTRS['ALL_ONCHANGE_ATTRIBUTES'] = get_attrs(sub_dict={'calc': 'onchange'}) ATTRS['ALL_DAILY_ATTRIBUTES'] = get_attrs(sub_dict={'calc': 'daily'}) @@ -240,9 +246,10 @@ def export_item_attributes_py(): with open(FILENAME_ATTRIBUTES, "a") as f: print(f'{attr} = {alist!r}', file=f) - print('item_attributes.py successfully created!') + print(f" {FILENAME_ATTRIBUTES} successfully generated.") -def create_plugin_yaml_item_attribute_valids(): + +def create_plugin_yaml_item_attribute_valids(attribute): """Create valid_list of db_addon_fct based on master dict""" valid_list_str = """ # NOTE: valid_list is automatically created by using item_attributes_master.py""" @@ -267,33 +274,89 @@ def create_plugin_yaml_item_attribute_valids(): return valid_list_str, valid_list_desc_str, valid_list_item_type, valid_list_calculation + def update_plugin_yaml_item_attributes(): """Update 'valid_list', 'valid_list_description', 'valid_list_item_type' and 'valid_list_calculation' of item attributes in plugin.yaml""" + print() + print(f"B) Start updating valid for attributes in {FILENAME_PLUGIN}") + + for attribute in ITEM_ATTRIBUTES: + + print(f" Attribute {attribute} in progress") + + yaml = ruamel.yaml.YAML() + yaml.indent(mapping=4, sequence=4, offset=4) + yaml.width = 200 + yaml.allow_unicode = True + yaml.preserve_quotes = False + + valid_list_str, valid_list_desc_str, valid_list_item_type_str, valid_list_calc_str = create_plugin_yaml_item_attribute_valids(attribute) + + with open(FILENAME_PLUGIN, 'r', encoding="utf-8") as f: + data = yaml.load(f) + + if data.get('item_attributes', {}).get(attribute): + data['item_attributes'][attribute]['valid_list'] = yaml.load(valid_list_str) + data['item_attributes'][attribute]['valid_list_description'] = yaml.load(valid_list_desc_str) + data['item_attributes'][attribute]['valid_list_item_type'] = yaml.load(valid_list_item_type_str) + data['item_attributes'][attribute]['valid_list_calculation'] = yaml.load(valid_list_calc_str) + + with open(FILENAME_PLUGIN, 'w', encoding="utf-8") as f: + yaml.dump(data, f) + print(f" Successfully updated Attribute '{attribute}' in plugin.yaml!") + else: + print(f" Attribute '{attribute}' not defined in plugin.yaml") + + +def check_plugin_yaml_structs(): + # check structs for wrong attributes + print() + print(f'C) Checking used attributes in structs defined in {FILENAME_PLUGIN} ') + + # open plugin.yaml and update yaml = ruamel.yaml.YAML() yaml.indent(mapping=4, sequence=4, offset=4) yaml.width = 200 yaml.allow_unicode = True yaml.preserve_quotes = False - - valid_list_str, valid_list_desc_str, valid_list_item_type_str, valid_list_calc_str = create_plugin_yaml_item_attribute_valids() - with open(FILENAME_PLUGIN, 'r', encoding="utf-8") as f: data = yaml.load(f) - if data.get('item_attributes', {}).get(attribute): - data['item_attributes'][attribute]['valid_list'] = yaml.load(valid_list_str) - data['item_attributes'][attribute]['valid_list_description'] = yaml.load(valid_list_desc_str) - data['item_attributes'][attribute]['valid_list_item_type'] = yaml.load(valid_list_item_type_str) - data['item_attributes'][attribute]['valid_list_calculation'] = yaml.load(valid_list_calc_str) + structs = data.get('item_structs') + + def get_all_keys(d): + for key, value in d.items(): + yield key, value + if isinstance(value, dict): + yield from get_all_keys(value) + + attr_valid = True + + if structs: + for attr, attr_val in get_all_keys(structs): + if attr in ITEM_ATTRIBUTES: + if attr_val not in ITEM_ATTRIBUTES[attr].keys(): + print(f" - {attr_val} not a valid value for {ITEM_ATTRIBUTES[attr]}") + attr_valid = False + + if attr_valid: + print(f" All used attributes are valid.") + + print(f' Check complete.') + - with open(FILENAME_PLUGIN, 'w', encoding="utf-8") as f: - yaml.dump(data, f) - print(f"Successfully updated Attribute '{attribute}' in plugin.yaml!") - else: - print(f"Attribute '{attribute}' not defined in plugin.yaml") if __name__ == '__main__': + + print(f'Start automated update and check of {FILENAME_PLUGIN} and generation of {FILENAME_ATTRIBUTES}.') + print('-------------------------------------------------------------') + export_item_attributes_py() - for attribute in ITEM_ATTRIBUTES: - update_plugin_yaml_item_attributes() + + update_plugin_yaml_item_attributes() + + check_plugin_yaml_structs() + + print() + print(f'Automated update and check of {FILENAME_PLUGIN} and generation of {FILENAME_ATTRIBUTES} complete.') diff --git a/db_addon/plugin.yaml b/db_addon/plugin.yaml index 84e5ad089..c966df1bd 100644 --- a/db_addon/plugin.yaml +++ b/db_addon/plugin.yaml @@ -66,8 +66,8 @@ parameters: type: bool default: false description: - de: 'Sperren der Datenbank während der Abfrage' - en: 'Lock the database during queries' + de: Sperren der Datenbank während der Abfrage + en: Lock the database during queries item_attributes: db_addon_fct: From ba85b626fd5000e6bccaff7a3cea9b680a01ca68 Mon Sep 17 00:00:00 2001 From: sisamiwe Date: Sat, 12 Aug 2023 20:06:05 +0200 Subject: [PATCH 05/41] db_addon: - bugfix in work_update_item_delay_deque - update user-doc.rst --- db_addon/__init__.py | 16 +- db_addon/item_attributes_master.py | 50 +++++- db_addon/user_doc.rst | 262 ++++++++++++++++++++++++++++- 3 files changed, 318 insertions(+), 10 deletions(-) diff --git a/db_addon/__init__.py b/db_addon/__init__.py index cc7646ce6..7a87fa828 100644 --- a/db_addon/__init__.py +++ b/db_addon/__init__.py @@ -975,13 +975,15 @@ def work_item_queue(self) -> None: def work_update_item_delay_deque(self): """check update_item_delay_deque is due and process it""" - for i in range(len(self.update_item_delay_deque)): - [update_time, item, value] = self.update_item_delay_deque.popleft() - if update_time < int(time.time()): - self.logger.debug(f"Item {item.path()} with {value=} is now due for being processed.") - self.handle_onchange(item, value) - else: - self.update_item_delay_deque.append([update_time, item, value]) + deque_len = len(self.update_item_delay_deque) + if deque_len > 0: + for i in range(deque_len): + [update_time, item, value] = self.update_item_delay_deque.popleft() + if update_time < int(time.time()): + self.logger.debug(f"Item {item.path()} with {value=} is now due for being processed.") + self.handle_onchange(item, value) + else: + self.update_item_delay_deque.append([update_time, item, value]) def handle_ondemand(self, item: Item) -> None: """ diff --git a/db_addon/item_attributes_master.py b/db_addon/item_attributes_master.py index 6fa54edf5..d0bd1436f 100644 --- a/db_addon/item_attributes_master.py +++ b/db_addon/item_attributes_master.py @@ -25,6 +25,8 @@ FILENAME_PLUGIN = 'plugin.yaml' +DOC_FILE_NAME = 'user_doc.rst' + ITEM_ATTRIBUTES = { 'db_addon_fct': { 'verbrauch_heute': {'cat': 'verbrauch', 'sub_cat': 'onchange', 'item_type': 'num', 'calc': 'onchange', 'params': False, 'description': 'Verbrauch am heutigen Tag (Differenz zwischen aktuellem Wert und den Wert am Ende des vorherigen Tages)'}, @@ -312,7 +314,7 @@ def update_plugin_yaml_item_attributes(): def check_plugin_yaml_structs(): # check structs for wrong attributes print() - print(f'C) Checking used attributes in structs defined in {FILENAME_PLUGIN} ') + print(f'D) Checking used attributes in structs defined in {FILENAME_PLUGIN} ') # open plugin.yaml and update yaml = ruamel.yaml.YAML() @@ -346,10 +348,52 @@ def get_all_keys(d): print(f' Check complete.') +def update_user_doc(): + # Update user_doc.rst + print() + print(f'C) Start updating DB-Addon-Attributes and descriptions in {DOC_FILE_NAME}!"') + attribute_list = [ + "Dieses Kapitel wurde automatisch durch Ausführen des Skripts in der Datei 'item_attributes_master.py' erstellt.\n", "\n", + "Nachfolgend eine Auflistung der möglichen Attribute für das Plugin im Format: Attribute: Beschreibung | Berechnungszyklus | Item-Type\n", + "\n"] + + for attribute in ITEM_ATTRIBUTES: + attribute_list.append("\n") + attribute_list.append(f"{attribute}\n") + attribute_list.append('-' * len(attribute)) + attribute_list.append("\n") + attribute_list.append("\n") + + for db_addon_fct in ITEM_ATTRIBUTES[attribute]: + attribute_list.append(f"- {db_addon_fct}: {ITEM_ATTRIBUTES[attribute][db_addon_fct]['description']} " + f"| Berechnung: {ITEM_ATTRIBUTES[attribute][db_addon_fct]['calc']} " + f"| Item-Type: {ITEM_ATTRIBUTES[attribute][db_addon_fct]['item_type']}\n") + attribute_list.append("\n") + + with open(DOC_FILE_NAME, 'r', encoding='utf-8') as file: + lines = file.readlines() + + start = end = None + for i, line in enumerate(lines): + if 'db_addon Item-Attribute' in line: + start = i + 3 + if 'Hinweise' in line: + end = i - 1 + + part1 = lines[0:start] + part3 = lines[end:len(lines)] + new_lines = part1 + attribute_list + part3 + + with open(DOC_FILE_NAME, 'w', encoding='utf-8') as file: + for line in new_lines: + file.write(line) + + print(f" Successfully updated Foshk-Attributes in {DOC_FILE_NAME}!") + if __name__ == '__main__': - print(f'Start automated update and check of {FILENAME_PLUGIN} and generation of {FILENAME_ATTRIBUTES}.') + print(f'Start automated update and check of {FILENAME_PLUGIN} with generation of {FILENAME_ATTRIBUTES} and update of {DOC_FILE_NAME}.') print('-------------------------------------------------------------') export_item_attributes_py() @@ -358,5 +402,7 @@ def get_all_keys(d): check_plugin_yaml_structs() + update_user_doc() + print() print(f'Automated update and check of {FILENAME_PLUGIN} and generation of {FILENAME_ATTRIBUTES} complete.') diff --git a/db_addon/user_doc.rst b/db_addon/user_doc.rst index 6f7978e1d..442888df7 100644 --- a/db_addon/user_doc.rst +++ b/db_addon/user_doc.rst @@ -68,7 +68,6 @@ Hinweis: Das Plugin selbst ist aktuell nicht multi-instance fähig. Das bedeutet des Database-Plugin abgebunden werden kann. - Konfiguration ============= @@ -93,6 +92,267 @@ Dazu folgenden Block am Ende der Datei */etc/mysql/my.cnf* einfügen bzw den exi interactive_timeout = 28800 +db_addon Item-Attribute +======================= + +Dieses Kapitel wurde automatisch durch Ausführen des Skripts in der Datei 'item_attributes_master.py' erstellt. + +Nachfolgend eine Auflistung der möglichen Attribute für das Plugin im Format: Attribute: Beschreibung | Berechnungszyklus | Item-Type + + +db_addon_fct +------------ + +- verbrauch_heute: Verbrauch am heutigen Tag (Differenz zwischen aktuellem Wert und den Wert am Ende des vorherigen Tages) | Berechnung: onchange | Item-Type: num + +- verbrauch_woche: Verbrauch in der aktuellen Woche | Berechnung: onchange | Item-Type: num + +- verbrauch_monat: Verbrauch im aktuellen Monat | Berechnung: onchange | Item-Type: num + +- verbrauch_jahr: Verbrauch im aktuellen Jahr | Berechnung: onchange | Item-Type: num + +- verbrauch_heute_minus1: Verbrauch gestern (heute -1 Tag) (Differenz zwischen Wert am Ende des gestrigen Tages und dem Wert am Ende des Tages davor) | Berechnung: daily | Item-Type: num + +- verbrauch_heute_minus2: Verbrauch vorgestern (heute -2 Tage) | Berechnung: daily | Item-Type: num + +- verbrauch_heute_minus3: Verbrauch heute -3 Tage | Berechnung: daily | Item-Type: num + +- verbrauch_heute_minus4: Verbrauch heute -4 Tage | Berechnung: daily | Item-Type: num + +- verbrauch_heute_minus5: Verbrauch heute -5 Tage | Berechnung: daily | Item-Type: num + +- verbrauch_heute_minus6: Verbrauch heute -6 Tage | Berechnung: daily | Item-Type: num + +- verbrauch_heute_minus7: Verbrauch heute -7 Tage | Berechnung: daily | Item-Type: num + +- verbrauch_woche_minus1: Verbrauch Vorwoche (aktuelle Woche -1) | Berechnung: weekly | Item-Type: num + +- verbrauch_woche_minus2: Verbrauch aktuelle Woche -2 Wochen | Berechnung: weekly | Item-Type: num + +- verbrauch_woche_minus3: Verbrauch aktuelle Woche -3 Wochen | Berechnung: weekly | Item-Type: num + +- verbrauch_woche_minus4: Verbrauch aktuelle Woche -4 Wochen | Berechnung: weekly | Item-Type: num + +- verbrauch_monat_minus1: Verbrauch Vormonat (aktueller Monat -1) | Berechnung: monthly | Item-Type: num + +- verbrauch_monat_minus2: Verbrauch aktueller Monat -2 Monate | Berechnung: monthly | Item-Type: num + +- verbrauch_monat_minus3: Verbrauch aktueller Monat -3 Monate | Berechnung: monthly | Item-Type: num + +- verbrauch_monat_minus4: Verbrauch aktueller Monat -4 Monate | Berechnung: monthly | Item-Type: num + +- verbrauch_monat_minus12: Verbrauch aktueller Monat -12 Monate | Berechnung: monthly | Item-Type: num + +- verbrauch_jahr_minus1: Verbrauch Vorjahr (aktuelles Jahr -1 Jahr) | Berechnung: yearly | Item-Type: num + +- verbrauch_jahr_minus2: Verbrauch aktuelles Jahr -2 Jahre | Berechnung: yearly | Item-Type: num + +- verbrauch_rolling_12m_heute_minus1: Verbrauch der letzten 12 Monate ausgehend im Ende des letzten Tages | Berechnung: daily | Item-Type: num + +- verbrauch_rolling_12m_woche_minus1: Verbrauch der letzten 12 Monate ausgehend im Ende der letzten Woche | Berechnung: weekly | Item-Type: num + +- verbrauch_rolling_12m_monat_minus1: Verbrauch der letzten 12 Monate ausgehend im Ende des letzten Monats | Berechnung: monthly | Item-Type: num + +- verbrauch_rolling_12m_jahr_minus1: Verbrauch der letzten 12 Monate ausgehend im Ende des letzten Jahres | Berechnung: yearly | Item-Type: num + +- verbrauch_jahreszeitraum_minus1: Verbrauch seit dem 1.1. bis zum heutigen Tag des Vorjahres | Berechnung: daily | Item-Type: num + +- verbrauch_jahreszeitraum_minus2: Verbrauch seit dem 1.1. bis zum heutigen Tag vor 2 Jahren | Berechnung: daily | Item-Type: num + +- verbrauch_jahreszeitraum_minus3: Verbrauch seit dem 1.1. bis zum heutigen Tag vor 3 Jahren | Berechnung: daily | Item-Type: num + +- zaehlerstand_heute_minus1: Zählerstand / Wert am Ende des letzten Tages (heute -1 Tag) | Berechnung: daily | Item-Type: num + +- zaehlerstand_heute_minus2: Zählerstand / Wert am Ende des vorletzten Tages (heute -2 Tag) | Berechnung: daily | Item-Type: num + +- zaehlerstand_heute_minus3: Zählerstand / Wert am Ende des vorvorletzten Tages (heute -3 Tag) | Berechnung: daily | Item-Type: num + +- zaehlerstand_woche_minus1: Zählerstand / Wert am Ende der vorvorletzten Woche (aktuelle Woche -1 Woche) | Berechnung: weekly | Item-Type: num + +- zaehlerstand_woche_minus2: Zählerstand / Wert am Ende der vorletzten Woche (aktuelle Woche -2 Wochen) | Berechnung: weekly | Item-Type: num + +- zaehlerstand_woche_minus3: Zählerstand / Wert am Ende der aktuellen Woche -3 Wochen | Berechnung: weekly | Item-Type: num + +- zaehlerstand_monat_minus1: Zählerstand / Wert am Ende des letzten Monates (aktueller Monat -1 Monat) | Berechnung: monthly | Item-Type: num + +- zaehlerstand_monat_minus2: Zählerstand / Wert am Ende des vorletzten Monates (aktueller Monat -2 Monate) | Berechnung: monthly | Item-Type: num + +- zaehlerstand_monat_minus3: Zählerstand / Wert am Ende des aktuellen Monats -3 Monate | Berechnung: monthly | Item-Type: num + +- zaehlerstand_jahr_minus1: Zählerstand / Wert am Ende des letzten Jahres (aktuelles Jahr -1 Jahr) | Berechnung: yearly | Item-Type: num + +- zaehlerstand_jahr_minus2: Zählerstand / Wert am Ende des vorletzten Jahres (aktuelles Jahr -2 Jahre) | Berechnung: yearly | Item-Type: num + +- zaehlerstand_jahr_minus3: Zählerstand / Wert am Ende des aktuellen Jahres -3 Jahre | Berechnung: yearly | Item-Type: num + +- minmax_last_24h_min: minimaler Wert der letzten 24h | Berechnung: daily | Item-Type: num + +- minmax_last_24h_max: maximaler Wert der letzten 24h | Berechnung: daily | Item-Type: num + +- minmax_last_24h_avg: durchschnittlicher Wert der letzten 24h | Berechnung: daily | Item-Type: num + +- minmax_last_7d_min: minimaler Wert der letzten 7 Tage | Berechnung: daily | Item-Type: num + +- minmax_last_7d_max: maximaler Wert der letzten 7 Tage | Berechnung: daily | Item-Type: num + +- minmax_last_7d_avg: durchschnittlicher Wert der letzten 7 Tage | Berechnung: daily | Item-Type: num + +- minmax_heute_min: Minimalwert seit Tagesbeginn | Berechnung: onchange | Item-Type: num + +- minmax_heute_max: Maximalwert seit Tagesbeginn | Berechnung: onchange | Item-Type: num + +- minmax_heute_avg: Durschnittswert seit Tagesbeginn | Berechnung: onchange | Item-Type: num + +- minmax_heute_minus1_min: Minimalwert gestern (heute -1 Tag) | Berechnung: daily | Item-Type: num + +- minmax_heute_minus1_max: Maximalwert gestern (heute -1 Tag) | Berechnung: daily | Item-Type: num + +- minmax_heute_minus1_avg: Durchschnittswert gestern (heute -1 Tag) | Berechnung: daily | Item-Type: num + +- minmax_heute_minus2_min: Minimalwert vorgestern (heute -2 Tage) | Berechnung: daily | Item-Type: num + +- minmax_heute_minus2_max: Maximalwert vorgestern (heute -2 Tage) | Berechnung: daily | Item-Type: num + +- minmax_heute_minus2_avg: Durchschnittswert vorgestern (heute -2 Tage) | Berechnung: daily | Item-Type: num + +- minmax_heute_minus3_min: Minimalwert heute vor 3 Tagen | Berechnung: daily | Item-Type: num + +- minmax_heute_minus3_max: Maximalwert heute vor 3 Tagen | Berechnung: daily | Item-Type: num + +- minmax_heute_minus3_avg: Durchschnittswert heute vor 3 Tagen | Berechnung: daily | Item-Type: num + +- minmax_woche_min: Minimalwert seit Wochenbeginn | Berechnung: onchange | Item-Type: num + +- minmax_woche_max: Maximalwert seit Wochenbeginn | Berechnung: onchange | Item-Type: num + +- minmax_woche_minus1_min: Minimalwert Vorwoche (aktuelle Woche -1) | Berechnung: weekly | Item-Type: num + +- minmax_woche_minus1_max: Maximalwert Vorwoche (aktuelle Woche -1) | Berechnung: weekly | Item-Type: num + +- minmax_woche_minus1_avg: Durchschnittswert Vorwoche (aktuelle Woche -1) | Berechnung: weekly | Item-Type: num + +- minmax_woche_minus2_min: Minimalwert aktuelle Woche -2 Wochen | Berechnung: weekly | Item-Type: num + +- minmax_woche_minus2_max: Maximalwert aktuelle Woche -2 Wochen | Berechnung: weekly | Item-Type: num + +- minmax_woche_minus2_avg: Durchschnittswert aktuelle Woche -2 Wochen | Berechnung: weekly | Item-Type: num + +- minmax_monat_min: Minimalwert seit Monatsbeginn | Berechnung: onchange | Item-Type: num + +- minmax_monat_max: Maximalwert seit Monatsbeginn | Berechnung: onchange | Item-Type: num + +- minmax_monat_minus1_min: Minimalwert Vormonat (aktueller Monat -1) | Berechnung: monthly | Item-Type: num + +- minmax_monat_minus1_max: Maximalwert Vormonat (aktueller Monat -1) | Berechnung: monthly | Item-Type: num + +- minmax_monat_minus1_avg: Durchschnittswert Vormonat (aktueller Monat -1) | Berechnung: monthly | Item-Type: num + +- minmax_monat_minus2_min: Minimalwert aktueller Monat -2 Monate | Berechnung: monthly | Item-Type: num + +- minmax_monat_minus2_max: Maximalwert aktueller Monat -2 Monate | Berechnung: monthly | Item-Type: num + +- minmax_monat_minus2_avg: Durchschnittswert aktueller Monat -2 Monate | Berechnung: monthly | Item-Type: num + +- minmax_jahr_min: Minimalwert seit Jahresbeginn | Berechnung: onchange | Item-Type: num + +- minmax_jahr_max: Maximalwert seit Jahresbeginn | Berechnung: onchange | Item-Type: num + +- minmax_jahr_minus1_min: Minimalwert Vorjahr (aktuelles Jahr -1 Jahr) | Berechnung: yearly | Item-Type: num + +- minmax_jahr_minus1_max: Maximalwert Vorjahr (aktuelles Jahr -1 Jahr) | Berechnung: yearly | Item-Type: num + +- minmax_jahr_minus1_avg: Durchschnittswert Vorjahr (aktuelles Jahr -1 Jahr) | Berechnung: yearly | Item-Type: num + +- tagesmitteltemperatur_heute: Tagesmitteltemperatur heute | Berechnung: onchange | Item-Type: num + +- tagesmitteltemperatur_heute_minus1: Tagesmitteltemperatur des letzten Tages (heute -1 Tag) | Berechnung: daily | Item-Type: num + +- tagesmitteltemperatur_heute_minus2: Tagesmitteltemperatur des vorletzten Tages (heute -2 Tag) | Berechnung: daily | Item-Type: num + +- tagesmitteltemperatur_heute_minus3: Tagesmitteltemperatur des vorvorletzten Tages (heute -3 Tag) | Berechnung: daily | Item-Type: num + +- serie_minmax_monat_min_15m: monatlicher Minimalwert der letzten 15 Monate (gleitend) | Berechnung: monthly | Item-Type: list + +- serie_minmax_monat_max_15m: monatlicher Maximalwert der letzten 15 Monate (gleitend) | Berechnung: monthly | Item-Type: list + +- serie_minmax_monat_avg_15m: monatlicher Mittelwert der letzten 15 Monate (gleitend) | Berechnung: monthly | Item-Type: list + +- serie_minmax_woche_min_30w: wöchentlicher Minimalwert der letzten 30 Wochen (gleitend) | Berechnung: weekly | Item-Type: list + +- serie_minmax_woche_max_30w: wöchentlicher Maximalwert der letzten 30 Wochen (gleitend) | Berechnung: weekly | Item-Type: list + +- serie_minmax_woche_avg_30w: wöchentlicher Mittelwert der letzten 30 Wochen (gleitend) | Berechnung: weekly | Item-Type: list + +- serie_minmax_tag_min_30d: täglicher Minimalwert der letzten 30 Tage (gleitend) | Berechnung: daily | Item-Type: list + +- serie_minmax_tag_max_30d: täglicher Maximalwert der letzten 30 Tage (gleitend) | Berechnung: daily | Item-Type: list + +- serie_minmax_tag_avg_30d: täglicher Mittelwert der letzten 30 Tage (gleitend) | Berechnung: daily | Item-Type: list + +- serie_verbrauch_tag_30d: Verbrauch pro Tag der letzten 30 Tage | Berechnung: daily | Item-Type: list + +- serie_verbrauch_woche_30w: Verbrauch pro Woche der letzten 30 Wochen | Berechnung: weekly | Item-Type: list + +- serie_verbrauch_monat_18m: Verbrauch pro Monat der letzten 18 Monate | Berechnung: monthly | Item-Type: list + +- serie_zaehlerstand_tag_30d: Zählerstand am Tagesende der letzten 30 Tage | Berechnung: daily | Item-Type: list + +- serie_zaehlerstand_woche_30w: Zählerstand am Wochenende der letzten 30 Wochen | Berechnung: weekly | Item-Type: list + +- serie_zaehlerstand_monat_18m: Zählerstand am Monatsende der letzten 18 Monate | Berechnung: monthly | Item-Type: list + +- serie_waermesumme_monat_24m: monatliche Wärmesumme der letzten 24 Monate | Berechnung: monthly | Item-Type: list + +- serie_kaeltesumme_monat_24m: monatliche Kältesumme der letzten 24 Monate | Berechnung: monthly | Item-Type: list + +- serie_tagesmittelwert_0d: Tagesmittelwert für den aktuellen Tag | Berechnung: daily | Item-Type: list + +- serie_tagesmittelwert_stunde_0d: Stundenmittelwert für den aktuellen Tag | Berechnung: daily | Item-Type: list + +- serie_tagesmittelwert_stunde_30_0d: Stundenmittelwert für den aktuellen Tag | Berechnung: daily | Item-Type: list + +- serie_tagesmittelwert_tag_stunde_30d: Stundenmittelwert pro Tag der letzten 30 Tage (bspw. zur Berechnung der Tagesmitteltemperatur basierend auf den Mittelwert der Temperatur pro Stunde | Berechnung: daily | Item-Type: list + +- general_oldest_value: Ausgabe des ältesten Wertes des entsprechenden "Parent-Items" mit database Attribut | Berechnung: no | Item-Type: num + +- general_oldest_log: Ausgabe des Timestamp des ältesten Eintrages des entsprechenden "Parent-Items" mit database Attribut | Berechnung: no | Item-Type: list + +- kaeltesumme: Berechnet die Kältesumme für einen Zeitraum, db_addon_params: (year=mandatory, month=optional) | Berechnung: daily | Item-Type: num + +- waermesumme: Berechnet die Wärmesumme für einen Zeitraum, db_addon_params: (year=mandatory, month=optional) | Berechnung: daily | Item-Type: num + +- gruenlandtempsumme: Berechnet die Grünlandtemperatursumme für einen Zeitraum, db_addon_params: (year=mandatory) | Berechnung: daily | Item-Type: num + +- tagesmitteltemperatur: Berechnet die Tagesmitteltemperatur auf Basis der stündlichen Durchschnittswerte eines Tages für die angegebene Anzahl von Tagen (timeframe=day, count=integer) | Berechnung: daily | Item-Type: list + +- wachstumsgradtage: Berechnet die Wachstumsgradtage auf Basis der stündlichen Durchschnittswerte eines Tages für das laufende Jahr mit an Angabe des Temperaturschwellenwertes (threshold=Schwellentemperatur) | Berechnung: daily | Item-Type: num + +- db_request: Abfrage der DB: db_addon_params: (func=mandatory, item=mandatory, timespan=mandatory, start=optional, end=optional, count=optional, group=optional, group2=optional) | Berechnung: group | Item-Type: list + +- minmax: Berechnet einen min/max/avg Wert für einen bestimmen Zeitraum: db_addon_params: (func=mandatory, timeframe=mandatory, start=mandatory) | Berechnung: timeframe | Item-Type: num + +- minmax_last: Berechnet einen min/max/avg Wert für ein bestimmtes Zeitfenster von jetzt zurück: db_addon_params: (func=mandatory, timeframe=mandatory, start=mandatory, end=mandatory) | Berechnung: timeframe | Item-Type: num + +- verbrauch: Berechnet einen Verbrauchswert für einen bestimmen Zeitraum: db_addon_params: (timeframe=mandatory, start=mandatory end=mandatory) | Berechnung: timeframe | Item-Type: num + +- zaehlerstand: Berechnet einen Zählerstand für einen bestimmen Zeitpunkt: db_addon_params: (timeframe=mandatory, start=mandatory) | Berechnung: timeframe | Item-Type: num + + +db_addon_info +------------- + +- db_version: Version der verbundenen Datenbank | Berechnung: no | Item-Type: str + + +db_addon_admin +-------------- + +- suspend: Unterbricht die Aktivitäten des Plugin | Berechnung: no | Item-Type: bool + +- recalc_all: Startet einen Neuberechnungslauf aller on-demand Items | Berechnung: no | Item-Type: bool + +- clean_cache_values: Löscht Plugin-Cache und damit alle im Plugin zwischengespeicherten Werte | Berechnung: no | Item-Type: bool + Hinweise ======== From 7111c73d8aeeab4664f4f3b81c4af8c190e9690f Mon Sep 17 00:00:00 2001 From: sisamiwe Date: Mon, 14 Aug 2023 11:53:54 +0200 Subject: [PATCH 06/41] db_addon: - bugfix webif - update plugin.yaml --- db_addon/plugin.yaml | 2 +- db_addon/webif/templates/index.html | 34 +++++++++++++++-------------- 2 files changed, 19 insertions(+), 17 deletions(-) diff --git a/db_addon/plugin.yaml b/db_addon/plugin.yaml index c966df1bd..5f719b5b9 100644 --- a/db_addon/plugin.yaml +++ b/db_addon/plugin.yaml @@ -36,7 +36,7 @@ parameters: en: Delay in seconds, after which the startup calculations will be run ignore_0: - type: list + type: list(str) default: [] description: de: 'Bei Items, bei denen ein String aus der Liste im Pfadnamen vorkommt, werden 0-Werte (val_num = 0) bei Datenbankauswertungen ignoriert. Beispieleintrag: temp | hum' diff --git a/db_addon/webif/templates/index.html b/db_addon/webif/templates/index.html index 1b0af72cc..cf6eb4964 100644 --- a/db_addon/webif/templates/index.html +++ b/db_addon/webif/templates/index.html @@ -306,22 +306,24 @@ {% set first = True %} - {% for key, value in p._db._params.items() %} - {% if loop.index % 4 == 0 %} - - {% endif %} - {% if key != "passwd" %} - - {% else %} - - {% endif %} - {% if loop.index % 3 > 0 and loop.last %} - - {% endif %} - {% if loop.index % 4 == 0 and not first %} - - {% endif %} - {% endfor %} + {% if p._db %} + {% for key, value in p._db._params.items() %} + {% if loop.index % 4 == 0 %} + + {% endif %} + {% if key != "passwd" %} + + {% else %} + + {% endif %} + {% if loop.index % 3 > 0 and loop.last %} + + {% endif %} + {% if loop.index % 4 == 0 and not first %} + + {% endif %} + {% endfor %} + {% endif %} From c1e0ed95554050aa62f738e75ec80bb21fabf810 Mon Sep 17 00:00:00 2001 From: sisamiwe Date: Wed, 16 Aug 2023 08:06:38 +0200 Subject: [PATCH 07/41] - change way of delaying on-change items for being processed --- db_addon/__init__.py | 50 +++++++++++++++++++++----------------------- 1 file changed, 24 insertions(+), 26 deletions(-) diff --git a/db_addon/__init__.py b/db_addon/__init__.py index 7a87fa828..2175c53de 100644 --- a/db_addon/__init__.py +++ b/db_addon/__init__.py @@ -61,7 +61,7 @@ class DatabaseAddOn(SmartPlugin): PLUGIN_VERSION = '1.2.3' # ToDo: remove revision - REVISION = 'E' + REVISION = 'G' def __init__(self, sh): """ @@ -97,7 +97,6 @@ def __init__(self, sh): self.item_attribute_search_str = 'database' # attribute, on which an item configured for database can be identified self.last_connect_time = 0 # mechanism for limiting db connection requests self.alive = None # Is plugin alive? - self.startup_finished = False # Startup of Plugin finished self.suspended = False # Is plugin activity suspended self.active_queue_item: str = '-' # String holding item path of currently executed item self.onchange_delay_time = 30 @@ -165,9 +164,6 @@ def run(self): self.logger.info(f"Set scheduler for calculating startup-items with delay of {self.startup_run_delay + 3}s to {dt}.") self.scheduler_add('startup', self.execute_startup_items, next=dt) - # add scheduler for delayed working if onchange items - self.scheduler_add('onchange_delay', self.work_update_item_delay_deque, prio=3, cron=None, cycle=30, value=None, offset=None, next=None) - # update database_items in item config, where path was given self._update_database_items() @@ -738,13 +734,13 @@ def update_item(self, item, caller=None, source=None, dest=None): if self.alive and caller != self.get_shortname(): # handle database items if item in self._database_items(): - if not self.startup_finished: - self.logger.info(f"Handling of 'on-change' is paused for startup. No updated will be processed.") - elif self.suspended: + # if not self.startup_finished: + # self.logger.info(f"Handling of 'on-change' is paused for startup. No updated will be processed.") + if self.suspended: self.logger.info(f"Plugin is suspended. No updated will be processed.") else: - self.logger.info(f"+ Updated item '{item.path()}' with value {item()} will be put to queue for processing. {self.item_queue.qsize() + 1} items to do.") - self.item_queue.put((item, item())) + self.logger.debug(f" Updated Item {item.path()} with value {item()} will be put to queue in approx. {self.onchange_delay_time}s resp. after startup.") + self.update_item_delay_deque.append([item, item(), int(time.time() + self.onchange_delay_time)]) # handle admin items elif self.has_iattr(item.conf, 'db_addon_admin'): @@ -762,7 +758,7 @@ def _save_pickle(self, data) -> None: """Saves received data as pickle to given file""" if data and len(data) > 0: - self.logger.debug(f"Start writing data {data=} to '{self.data_storage_path}'") + self.logger.debug(f"Start writing {data=} to '{self.data_storage_path}'") os.makedirs(os.path.dirname(self.data_storage_path), exist_ok=True) try: with open(self.data_storage_path, "wb") as output: @@ -873,10 +869,13 @@ def execute_due_items(self) -> None: self.execute_items() def execute_startup_items(self) -> None: - """Execute all startup_items""" + """Execute all startup_items and set scheduler for delaying on-change items""" + # execute item calculation self.execute_items(option='startup') - self.startup_finished = True + + # add scheduler for delayed working if onchange items + self.scheduler_add('onchange_delay', self.work_update_item_delay_deque, prio=3, cron=None, cycle=30, value=None, offset=None, next=None) def execute_items(self, option: str = 'due', item: str = None): """Execute all items per option""" @@ -965,25 +964,24 @@ def work_item_queue(self) -> None: item, value = queue_entry self.logger.info(f"# {self.item_queue.qsize() + 1} item(s) to do. || 'on-change' item={item.path()} with {value=} will be processed.") self.active_queue_item = str(item.path()) - # self.handle_onchange(item, value) - self.update_item_delay_deque.append([int(time.time()) + self.onchange_delay_time, item, value]) + self.handle_onchange(item, value) else: self.logger.info(f"# {self.item_queue.qsize() + 1} item(s) to do. || 'on-demand' item={queue_entry.path()} will be processed.") self.active_queue_item = str(queue_entry.path()) self.handle_ondemand(queue_entry) def work_update_item_delay_deque(self): - """check update_item_delay_deque is due and process it""" - - deque_len = len(self.update_item_delay_deque) - if deque_len > 0: - for i in range(deque_len): - [update_time, item, value] = self.update_item_delay_deque.popleft() - if update_time < int(time.time()): - self.logger.debug(f"Item {item.path()} with {value=} is now due for being processed.") - self.handle_onchange(item, value) - else: - self.update_item_delay_deque.append([update_time, item, value]) + """check if entries in update_item_delay_deque are due, if so put it to working queue""" + + while self.update_item_delay_deque: + update_time = self.update_item_delay_deque[0][2] + if update_time <= int(time.time()): + [item, value, *_] = self.update_item_delay_deque.popleft() + self.logger.info(f"+ Updated item '{item.path()}' with value {item()} is now due to be put to queue for processing. {self.item_queue.qsize() + 1} items to do.") + self.item_queue.put((item, value)) + else: + self.logger.debug(f"Remaining items in deque are not due, yet.") + break def handle_ondemand(self, item: Item) -> None: """ From 7a2e993d1773afd2d2d4c1c9051852e2575cd5a6 Mon Sep 17 00:00:00 2001 From: sisamiwe Date: Wed, 16 Aug 2023 08:11:38 +0200 Subject: [PATCH 08/41] - change way of delaying on-change items for being processed --- db_addon/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/db_addon/__init__.py b/db_addon/__init__.py index 2175c53de..446d44d81 100644 --- a/db_addon/__init__.py +++ b/db_addon/__init__.py @@ -980,7 +980,7 @@ def work_update_item_delay_deque(self): self.logger.info(f"+ Updated item '{item.path()}' with value {item()} is now due to be put to queue for processing. {self.item_queue.qsize() + 1} items to do.") self.item_queue.put((item, value)) else: - self.logger.debug(f"Remaining items in deque are not due, yet.") + self.logger.debug(f"Remaining {len(self.update_item_delay_deque)} items in deque are not due, yet.") break def handle_ondemand(self, item: Item) -> None: From 4010d0ff5c61a5c91ffaaaceb798dd3b0b45d946 Mon Sep 17 00:00:00 2001 From: sisamiwe Date: Sun, 20 Aug 2023 17:10:31 +0200 Subject: [PATCH 09/41] =?UTF-8?q?DB=5FADDON:=20-=20rewrite=20of=20diverse?= =?UTF-8?q?=20methods=20for=20better=20maintainablility=20-=20introduce=20?= =?UTF-8?q?'Kenntage'=20like=20W=C3=BCstentag,=20Hei=C3=9Fer=20Tag,=20...?= =?UTF-8?q?=20-=20Bugfixing=20-=20update=20user=5Fdoc.rst=20-=20update=20i?= =?UTF-8?q?tem=5Fattributes=5Fmaster.py=20-=20update=20item=5Fattributes.p?= =?UTF-8?q?y?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- db_addon/__init__.py | 687 ++++++++++++++--------------- db_addon/item_attributes.py | 7 +- db_addon/item_attributes_master.py | 25 +- db_addon/plugin.yaml | 44 +- db_addon/user_doc.rst | 89 +++- 5 files changed, 466 insertions(+), 386 deletions(-) diff --git a/db_addon/__init__.py b/db_addon/__init__.py index 446d44d81..2cfb1369f 100644 --- a/db_addon/__init__.py +++ b/db_addon/__init__.py @@ -34,6 +34,7 @@ import threading import logging import pickle +import operator from dateutil.relativedelta import relativedelta from typing import Union from dataclasses import dataclass, InitVar @@ -61,7 +62,7 @@ class DatabaseAddOn(SmartPlugin): PLUGIN_VERSION = '1.2.3' # ToDo: remove revision - REVISION = 'G' + REVISION = 'H' def __init__(self, sh): """ @@ -83,6 +84,7 @@ def __init__(self, sh): self.current_values = {} # Dict to hold min and max value of current day / week / month / year for items self.previous_values = {} # Dict to hold value of end of last day / week / month / year for items self.item_cache = {} # Dict to hold item_id, oldest_log_ts and oldest_entry for items + self.value_list_raw_data = {} # define variables for database, database connection, working queue and status self.item_queue = queue.Queue() # Queue containing all to be executed items @@ -216,10 +218,11 @@ def parse_item(self, item: Item): """ def get_query_parameters_from_db_addon_fct() -> Union[dict, None]: + """ derived parameters from given db_addon_fct""" # get parameter db_addon_fct_vars = db_addon_fct.split('_') - func = timeframe = timedelta = start = end = group = group2 = method = log_text = None + func = timeframe = timedelta = start = end = group = group2 = data_con_func = log_text = None required_params = None if db_addon_fct in HISTORIE_ATTRIBUTES_ONCHANGE: @@ -309,9 +312,9 @@ def get_query_parameters_from_db_addon_fct() -> Union[dict, None]: timeframe = translate_timeframe(db_addon_fct_vars[1]) end = to_int(split_sting_letters_numbers(db_addon_fct_vars[2])[1]) start = end - method = 'avg_hour' + data_con_func = 'first_hour_avg_day' log_text = 'tagesmitteltemperatur_timeframe_timedelta' - required_params = [func, timeframe, start, end, method] + required_params = [func, timeframe, start, end, data_con_func] elif db_addon_fct in SERIE_ATTRIBUTES_MINMAX: # handle functions 'serie_minmax' in format 'serie_minmax_timeframe_func_start|group' like 'serie_minmax_monat_min_15m' @@ -381,23 +384,23 @@ def get_query_parameters_from_db_addon_fct() -> Union[dict, None]: elif db_addon_fct in SERIE_ATTRIBUTES_MITTEL_H1: # handle 'serie_tagesmittelwert_stunde_start_end|group' like 'serie_tagesmittelwert_stunde_30_0d' => Stundenmittelwerte von vor 30 Tagen bis vor 0 Tagen (also heute) - method = 'avg_hour' + data_con_func = 'avg_hour' start = to_int(db_addon_fct_vars[3]) end, timeframe = split_sting_letters_numbers(db_addon_fct_vars[4]) end = to_int(end) timeframe = translate_timeframe(timeframe) log_text = 'serie_tagesmittelwert_stunde_start_end|group' - required_params = [timeframe, method, start, end] + required_params = [timeframe, data_con_func, start, end] elif db_addon_fct in SERIE_ATTRIBUTES_MITTEL_D_H: # handle 'serie_tagesmittelwert_tag_stunde_end|group' like 'serie_tagesmittelwert_tag_stunde_30d' => Tagesmittelwert auf Basis des Mittelwerts pro Stunden für die letzten 30 Tage - method = 'avg_hour' + data_con_func = 'first_hour_avg_day' end = 0 start, timeframe = split_sting_letters_numbers(db_addon_fct_vars[4]) start = to_int(start) timeframe = translate_timeframe(timeframe) log_text = 'serie_tagesmittelwert_tag_stunde_end|group' - required_params = [timeframe, method, start, end] + required_params = [timeframe, data_con_func, start, end] elif db_addon_fct in ALL_GEN_ATTRIBUTES: log_text = 'all_gen_attributes' @@ -408,37 +411,44 @@ def get_query_parameters_from_db_addon_fct() -> Union[dict, None]: return if required_params and None in required_params: - self.logger.warning(f"For calculating '{db_addon_fct}' at Item '{item.path()}' not all mandatory parameters given. Definitions are: {func=}, {timeframe=}, {timedelta=}, {start=}, {end=}, {group=}, {group2=}, {method=}") + self.logger.warning(f"For calculating '{db_addon_fct}' at Item '{item.path()}' not all mandatory parameters given. Definitions are: {func=}, {timeframe=}, {timedelta=}, {start=}, {end=}, {group=}, {group2=}, {data_con_func=}") return # create dict and reduce dict to keys with value != None - param_dict = {'func': func, 'timeframe': timeframe, 'timedelta': timedelta, 'start': start, 'end': end, 'group': group, 'group2': group2, 'method': method} + param_dict = {'func': func, 'timeframe': timeframe, 'timedelta': timedelta, 'start': start, 'end': end, 'group': group, 'group2': group2, 'data_con_func': data_con_func} # return reduced dict w keys with value != None return {k: v for k, v in param_dict.items() if v is not None} def get_query_parameters_from_db_addon_params() -> Union[dict, None]: - """get query parameters from item attribute db_addon_params""" + """derives parameters from item attribute db_addon_params, if parameter for db_addon_fct are not sufficient + + possible_params may be given, if not, default value is used + required_params must be given + """ db_addon_params = params_to_dict(self.get_iattr_value(item.conf, 'db_addon_params')) if not db_addon_params: db_addon_params = self.get_iattr_value(item.conf, 'db_addon_params_dict') + if not db_addon_params: + db_addon_params = {} + new_db_addon_params = {} possible_params = required_params = [] - if db_addon_params is None: - self.logger.warning(f"Definition for Item '{item.path()}' with db_addon_fct={db_addon_fct} incomplete, since parameters via 'db_addon_params' not given. Item will be ignored.") - return - # create item config for all functions with 'summe' like waermesumme, kaeltesumme, gruenlandtemperatursumme - if 'summe' in db_addon_fct: + if db_addon_fct in ('kaeltesumme', 'waermesumme', 'gruenlandtempsumme'): possible_params = ['year', 'month'] - # create item config for wachstumsgradtage function + # create item config for wachstumsgradtage attributes elif db_addon_fct == 'wachstumsgradtage': - possible_params = ['year', 'method', 'threshold'] + possible_params = ['year', 'variant', 'threshold', 'result'] + + # create item config for kenntage attributes + elif db_addon_fct in ('wuestentage', 'heisse_tage', 'tropennaechte', 'sommertage', 'heiztage', 'vegetationstage', 'frosttage', 'eistage'): + possible_params = ['year', 'month'] # create item config for tagesmitteltemperatur elif db_addon_fct == 'tagesmitteltemperatur': @@ -475,8 +485,7 @@ def get_query_parameters_from_db_addon_params() -> Union[dict, None]: if value: new_db_addon_params[key] = value - if new_db_addon_params: - return new_db_addon_params + return new_db_addon_params def get_database_item_path() -> tuple: """ @@ -488,10 +497,11 @@ def get_database_item_path() -> tuple: for i in range(3): if self.has_iattr(_lookup_item.conf, 'db_addon_database_item'): if self.debug_log.parse: - self.logger.debug(f"Attribut 'db_addon_database_item' for item='{item.path()}' has been found {i + 1} level above item at '{_lookup_item.path()}'.") + self.logger.debug(f"Attribut 'db_addon_database_item' for item='{item.path()}' has been found {i} level above item at '{_lookup_item.path()}'.") _database_item_path = self.get_iattr_value(_lookup_item.conf, 'db_addon_database_item') - _startup = bool(self.get_iattr_value(_lookup_item.conf, 'db_addon_startup')) - return _database_item_path, _startup + if self.debug_log.parse: + self.logger.debug(f"{_database_item_path=}, {_lookup_item.path()}") + return _database_item_path, _lookup_item else: _lookup_item = _lookup_item.return_parent() @@ -613,26 +623,29 @@ def format_db_addon_ignore_value_list(optimize: bool = self.optimize_value_filte db_addon_fct = self.get_iattr_value(item.conf, 'db_addon_fct').lower() # get query parameters from db_addon_fct or db_addon_params - if db_addon_fct in ALL_NEED_PARAMS_ATTRIBUTES: + if db_addon_fct in ALL_PARAMS_ATTRIBUTES: query_params = get_query_parameters_from_db_addon_params() else: query_params = get_query_parameters_from_db_addon_fct() - if not query_params: + if query_params is None: return # get database item (and attribute value if item should be calculated at plugin startup) and return if not available - database_item, db_addon_startup = get_database_item_path() + database_item, database_item_definition_item = get_database_item_path() if database_item is None: database_item = get_database_item() - db_addon_startup = bool(self.get_iattr_value(item.conf, 'db_addon_startup')) + database_item_definition_item = item + db_addon_startup = self.get_iattr_value(database_item_definition_item.conf, 'db_addon_startup') + db_addon_ignore_value_list = self.get_iattr_value(database_item_definition_item.conf, 'db_addon_ignore_value_list') # ['> 0', '< 35'] + db_addon_ignore_value = self.get_iattr_value(database_item_definition_item.conf, 'db_addon_ignore_value') # num if database_item is None: self.logger.warning(f"No database item found for item={item.path()}: Item ignored. Maybe you should check instance of database plugin.") return + else: + if self.debug_log.parse: + self.logger.debug(f"{database_item=}, {db_addon_startup=}, {db_addon_ignore_value_list=}, {db_addon_ignore_value=}") - # get/create list of comparison operators and check it - db_addon_ignore_value_list = self.get_iattr_value(item.conf, 'db_addon_ignore_value_list') # ['> 0', '< 35'] - db_addon_ignore_value = self.get_iattr_value(item.conf, 'db_addon_ignore_value') # num - + # create list of comparison operators and check it if not db_addon_ignore_value_list: db_addon_ignore_value_list = [] @@ -888,6 +901,7 @@ def _create_due_items() -> list: _todo_items.update(set(self._daily_items())) self.current_values[DAY] = {} self.previous_values[DAY] = {} + self.value_list_raw_data = {} # wenn Wochentag == Montag, werden auch die wöchentlichen Items berechnet if self.shtime.weekday(self.shtime.today()) == 1: @@ -1032,7 +1046,7 @@ def handle_ondemand(self, item: Item) -> None: # handle TAGESMITTEL_ATTRIBUTES_TIMEFRAME like tagesmitteltemperatur_heute_minus1 elif db_addon_fct in TAGESMITTEL_ATTRIBUTES_TIMEFRAME: - params.update({'method': 'avg_hour'}) + params.update({'data_con_func': 'first_hour_avg_day'}) _result = self._prepare_value_list(**params) if isinstance(_result, list): @@ -1052,22 +1066,15 @@ def handle_ondemand(self, item: Item) -> None: elif db_addon_fct == 'general_oldest_log': result = self._get_oldest_log(database_item) - # handle kaeltesumme - elif db_addon_fct == 'kaeltesumme': - result = self._handle_kaeltesumme(database_item=database_item, year=params.get('year'), month=params.get('month')) - - # handle waermesumme - elif db_addon_fct == 'waermesumme': - result = self._handle_waermesumme(database_item=database_item, year=params.get('year'), month=params.get('month')) - - # handle gruenlandtempsumme - elif db_addon_fct == 'gruenlandtempsumme': - result = self._handle_gruenlandtemperatursumme(database_item=database_item, year=params.get('year')) - - # handle wachstumsgradtage - elif db_addon_fct == 'wachstumsgradtage': - result = self._handle_wachstumsgradtage(database_item=database_item, year=params.get('year')) + # handle all functions using temperature sums + elif db_addon_fct in ALL_SUMME_ATTRIBUTES: + new_params = {} + for entry in ('threshold', 'variant', 'result', 'data_con_func'): + if entry in params: + new_params.update({entry: params[entry]}) + result = self._handle_temp_sums(func=db_addon_fct, database_item=database_item, year=params.get('year'), month=params.get('month'), ignore_value_list=params.get('ignore_value_list'), params=new_params) + # handle everything else else: result = self._query_item(**params)[0][1] @@ -1123,9 +1130,9 @@ def handle_minmax(): # if value not given if init: if self.debug_log.onchange: - self.logger.debug(f"initial {func} value for {timeframe=} of item={item.path()} with will be set to {value}") - cache_dict[database_item][func] = value - return value + self.logger.debug(f"initial {func} value for {timeframe=} of item={item.path()} with will be set to {cached_value}") + cache_dict[database_item][func] = cached_value + return cached_value # check value for update of cache dict min elif func == 'min' and value < cached_value: @@ -1175,7 +1182,7 @@ def handle_verbrauch(): return _new_value if isinstance(_new_value, int) else round(_new_value, 2) def handle_tagesmittel(): - result = self._prepare_value_list(database_item=database_item, timeframe='day', start=0, end=0, ignore_value_list=ignore_value_list, method='first_hour') + result = self._prepare_value_list(database_item=database_item, timeframe='day', start=0, end=0, ignore_value_list=ignore_value_list, data_con_func='first_hour') if isinstance(result, list): return result[0][1] @@ -1199,7 +1206,7 @@ def handle_tagesmittel(): ignore_value_list = item_config['query_params'].get('ignore_value_list') new_value = None - # handle all on_change functions + # handle all non on_change functions if db_addon_fct not in ALL_ONCHANGE_ATTRIBUTES: if self.debug_log.onchange: self.logger.debug(f"non on-change function detected. Skip update.") @@ -1308,7 +1315,7 @@ def _all_items(self) -> list: # Public functions / Using item_path ######################################### - def gruenlandtemperatursumme(self, item_path: str, year: Union[int, str] = None) -> Union[int, None]: + def gruenlandtemperatursumme(self, item_path: str, year: Union[int, str] = None, ignore_value_list: list = None) -> Union[int, None]: """ Query database for gruenlandtemperatursumme for given year or year https://de.wikipedia.org/wiki/Gr%C3%BCnlandtemperatursumme @@ -1324,9 +1331,9 @@ def gruenlandtemperatursumme(self, item_path: str, year: Union[int, str] = None) item = self.items.return_item(item_path) if item: - return self._handle_gruenlandtemperatursumme(item, year) + return self._handle_temp_sums(func='gruendlandtempsumme', database_item=item, year=year, ignore_value_list=ignore_value_list) - def waermesumme(self, item_path: str, year: Union[int, str] = None, month: Union[int, str] = None, threshold: int = 0) -> Union[int, None]: + def waermesumme(self, item_path: str, year: Union[int, str] = None, month: Union[int, str] = None, ignore_value_list: list = None, threshold: int = 0) -> Union[int, None]: """ Query database for waermesumme for given year or year/month https://de.wikipedia.org/wiki/W%C3%A4rmesumme @@ -1340,9 +1347,9 @@ def waermesumme(self, item_path: str, year: Union[int, str] = None, month: Union item = self.items.return_item(item_path) if item: - return self._handle_waermesumme(item, year, month, threshold) + return self._handle_temp_sums(func='waermesumme', database_item=item, year=year, month=month, ignore_value_list=ignore_value_list, params={'threshold': threshold}) - def kaeltesumme(self, item_path: str, year: Union[int, str] = None, month: Union[int, str] = None) -> Union[int, None]: + def kaeltesumme(self, item_path: str, year: Union[int, str] = None, month: Union[int, str] = None, ignore_value_list: list = None) -> Union[int, None]: """ Query database for kaeltesumme for given year or year/month https://de.wikipedia.org/wiki/K%C3%A4ltesumme @@ -1355,63 +1362,37 @@ def kaeltesumme(self, item_path: str, year: Union[int, str] = None, month: Union item = self.items.return_item(item_path) if item: - return self._handle_kaeltesumme(item, year, month) - - def tagesmitteltemperatur(self, item_path: str, timeframe: str = None, count: int = None) -> list: - """ - Query database for tagesmitteltemperatur - https://www.dwd.de/DE/leistungen/klimadatendeutschland/beschreibung_tagesmonatswerte.html - - :param item_path: item object or item_id for which the query should be done - :param timeframe: time increment for determination - :param count: number of time increments starting from now to the left (into the past) - :return: tagesmitteltemperatur - """ - - if not timeframe: - timeframe = 'day' - - if not count: - count = 0 - - item = self.items.return_item(item_path) - if item: - count = to_int(count) - end = 0 - start = end + count - query_params = {'database_item': item, 'func': 'max', 'timeframe': translate_timeframe(timeframe), 'start': start, 'end': end} - return self._handle_tagesmitteltemperatur(**query_params) + return self._handle_temp_sums(func='kaeltesumme', database_item=item, year=year, month=month, ignore_value_list=ignore_value_list) - def wachstumsgradtage(self, item_path: str, year: Union[int, str] = None, method: int = 0, threshold: int = 10) -> Union[int, None]: + def wachstumsgradtage(self, item_path: str, year: Union[int, str] = None, ignore_value_list: list = None, variant: int = 0, threshold: int = 10) -> Union[int, None]: """ Query database for wachstumsgradtage https://de.wikipedia.org/wiki/Wachstumsgradtag :param item_path: item object or item_id for which the query should be done :param year: year the wachstumsgradtage should be calculated for - :param method: method to be used + :param variant: variant to be used :param threshold: Temperature in °C as threshold: Ein Tage mit einer Tagesdurchschnittstemperatur oberhalb des Schwellenwertes gilt als Wachstumsgradtag :return: wachstumsgradtage """ item = self.items.return_item(item_path) if item: - return self._handle_wachstumsgradtage(database_item=item, year=year, method=method, threshold=threshold) + return self._handle_temp_sums(func='wachstumsgradtage', database_item=item, year=year, ignore_value_list=ignore_value_list, params={'threshold': threshold, 'variant': variant}) - def temperaturserie(self, item_path: str, year: Union[int, str] = None, method: str = 'avg_hour') -> Union[list, None]: + def temperaturserie(self, item_path: str, year: Union[int, str] = None, ignore_value_list: list = None, data_con_func: str = 'first_hour_avg_day') -> Union[list, None]: """ - Query database for wachstumsgradtage - https://de.wikipedia.org/wiki/Wachstumsgradtag + Query database for temperaturserie :param item_path: item object or item_id for which the query should be done :param year: year the wachstumsgradtage should be calculated for - :param method: Calculation method - :return: wachstumsgradtage + :param data_con_func: data concentration function + :return: temperature series """ item = self.items.return_item(item_path) if item: - return self._handle_temperaturserie(item, year, method) + return self._handle_temp_sums(func='temperaturserie', database_item=item, year=year, ignore_value_list=ignore_value_list, params={'data_con_func': data_con_func}) def query_item(self, func: str, item_path: str, timeframe: str, start: int = None, end: int = 0, group: str = None, group2: str = None, ignore_value_list=None) -> list: item = self.items.return_item(item_path) @@ -1647,98 +1628,76 @@ def _handle_zaehlerstand_serie(self, query_params: dict) -> list: return series - def _handle_kaeltesumme(self, database_item: Item, year: Union[int, str] = None, month: Union[int, str] = None) -> Union[int, None]: + def _handle_temp_sums(self, func: str, database_item: Item, year: Union[int, str] = None, month: Union[int, str] = None, ignore_value_list: list = None, params: dict = {}) -> Union[list, None]: """ - Query database for kaeltesumme for given year or year/month - https://de.wikipedia.org/wiki/K%C3%A4ltesumme - + Calculates diverse temperature sums and day counts + + :param func: defines which temperature sum or count should be calculated :param database_item: item object or item_id for which the query should be done :param year: year the kaeltesumme should be calculated for :param month: month the kaeltesumme should be calculated for - :return: kaeltesumme - """ - - if self.debug_log.prepare: - self.logger.debug(f"called with {database_item=}, {year=}, {month=}") - - # check validity of given year - if not self._valid_year(year): - self.logger.error(f"Year for item={database_item.path()} was {year}. This is not a valid year. Query cancelled.") - return - - # get datetime of today - today = self.shtime.today(offset=0) - - # define year - if not year or year == 'current': - if today < datetime.date(int(today.year), 9, 21): - year = today.year - 1 - else: - year = today.year - - # define start_date and end_date - if month is None: - start_date = datetime.date(int(year), 9, 21) - end_date = datetime.date(int(year) + 1, 3, 22) - elif self._valid_month(month): - start_date = datetime.date(int(year), int(month), 1) - end_date = start_date + relativedelta(months=+1) - datetime.timedelta(days=1) - else: - self.logger.error(f"Month for item={database_item.path()} was {month}. This is not a valid month. Query cancelled.") - return - - # define start / end - if start_date > today: - self.logger.error(f"Start time for query of item={database_item.path()} is in future. Query cancelled.") - return - - start = (today - start_date).days - end = (today - end_date).days if end_date < today else 0 - if start < end: - self.logger.error(f"End time for query of item={database_item.path()} is before start time. Query cancelled.") - return - - # get raw data as list - if self.debug_log.prepare: - self.logger.debug("try to get raw data") - raw_data = self._prepare_value_list(database_item=database_item, timeframe='day', start=start, end=end, method='avg_hour') - if self.debug_log.prepare: - self.logger.debug(f"raw_value_list={raw_data=}") - - # calculate value - if raw_data is None: - return - elif isinstance(raw_data, list): - # akkumulieren alle negativen Werte + :param params: params to be used for executing function (see below) + :return: temperature sum or day count + + - kaeltesumme: Kältesumme nach https://de.wikipedia.org/wiki/K%C3%A4ltesumme + - waermesumme: Wärmesumme https://de.wikipedia.org/wiki/W%C3%A4rmesumme + params: threshold + - gruenlandtempsumme: Grünlandtemperatursumme: https://de.wikipedia.org/wiki/Gr%C3%BCnlandtemperatursumme + - wachstumsgradtage: Wachstumsgradtage https://de.wikipedia.org/wiki/Wachstumsgradtag + params: threshold, variant, result + - temperaturserie: Temperaturserie provide list of lists having timestamp and temperature(s) per day + params: data_con_func + - wuestentage: Wüstentage, Anzahl der Tage mit Tmax ≥ 35 °C + - heisse_tage: Heiße Tage, Anzahl der Tage mit Tmax ≥ 30 °C + - tropennaechte: Tropennächte, Anzahl der Tage mit Tmin ≥ 20 °C + - sommertage: Sommertage, Anzahl der Tage mit Tmax ≥ 25 °C + - heiztage: Heiztage, Anzahl der Tage mit Tmed < 15 °C / 12 °C + - vegetationstage: Vegetationstage, Anzahl der Tage mit Tmed ≥ 5 °C + - frosttage: Frosttage, Anzahl der Tage mit Tmin < 0 °C + - eistage: Eistage, Anzahl der Tage mit Tmax < 0 °C + """ + + timeframe = {1: ((0, 9, 21), (1, 3, 22)), + 2: ((0, 1, 1), (0, 9, 21)), + 3: ((0, 1, 1), (0, 12, 31))} + + defaults = {'kaeltesumme': {'start_end': timeframe[1], 'data_con_func': 'first_hour_avg_day'}, + 'waermesumme': {'start_end': timeframe[2], 'data_con_func': 'first_hour_avg_day'}, + 'gruenlandtempsumme': {'start_end': timeframe[2], 'data_con_func': 'first_hour_avg_day'}, + 'wachstumsgradtage': {'start_end': timeframe[2], 'data_con_func': 'minmax_day'}, + 'temperaturserie': {'start_end': timeframe[2], 'data_con_func': params.get('data_con_func', 'avg_hour')}, + 'wuestentage': {'start_end': timeframe[3], 'data_con_func': 'minmax_day'}, + 'heisse_tage': {'start_end': timeframe[3], 'data_con_func': 'minmax_day'}, + 'tropennaechte': {'start_end': timeframe[3], 'data_con_func': 'minmax_day'}, + 'sommertage': {'start_end': timeframe[3], 'data_con_func': 'minmax_day'}, + 'heiztage': {'start_end': timeframe[3], 'data_con_func': 'first_hour_avg_day'}, + 'vegetationstage': {'start_end': timeframe[3], 'data_con_func': 'first_hour_avg_day'}, + 'frosttage': {'start_end': timeframe[3], 'data_con_func': 'minmax_day'}, + 'eistage': {'start_end': timeframe[3], 'data_con_func': 'minmax_day'}, + } + + def kaeltesumme() -> float: + """Berechnung der Kältesumme durch Akkumulieren aller negativen Tagesdurchschnittstemperaturen im Abfragezeitraum + + :return: value of waermesumme + """ + ks = 0 for entry in raw_data: if entry[1] < 0: ks -= entry[1] return int(round(ks, 0)) - def _handle_waermesumme(self, database_item: Item, year: Union[int, str] = None, month: Union[int, str] = None, threshold: int = 0) -> Union[int, None]: - """ - Query database for waermesumme for given year or year/month - https://de.wikipedia.org/wiki/W%C3%A4rmesumme - - :param database_item: item object or item_id for which the query should be done - :param year: year the waermesumme should be calculated for; "current" for current year - :param month: month the waermesumme should be calculated for - :return: waermesumme - """ + def waermesumme() -> float: + """Berechnung der Wärmesumme durch Akkumulieren aller Tagesdurchschnittstemperaturen im Abfragezeitraum, die größer/gleich dem Schwellenwert sind - # get raw data as list - raw_data = self._prepare_waermesumme(database_item=database_item, year=year, month=month) - if self.debug_log.prepare: - self.logger.debug(f"raw_value_list={raw_data=}") - - # set threshold to min 0 - threshold = max(0, threshold) + :return: value of waermesumme + """ + + # get threshold and set to min 0 + threshold = params.get('threshold', 10) + threshold = max(0, threshold) - # calculate value - if raw_data is None: - return - elif isinstance(raw_data, list): # akkumulieren alle Werte, größer/gleich Schwellenwert ws = 0 for entry in raw_data: @@ -1746,27 +1705,12 @@ def _handle_waermesumme(self, database_item: Item, year: Union[int, str] = None, ws += entry[1] return int(round(ws, 0)) - def _handle_gruenlandtemperatursumme(self, database_item: Item, year: Union[int, str] = None) -> Union[int, None]: - """ - Query database for gruenlandtemperatursumme for given year or year/month - https://de.wikipedia.org/wiki/Gr%C3%BCnlandtemperatursumme - - :param database_item: item object for which the query should be done - :param year: year the gruenlandtemperatursumme should be calculated for - :return: gruenlandtemperatursumme - """ - - # get raw data as list - raw_data = self._prepare_waermesumme(database_item=database_item, year=year) - if self.debug_log.prepare: - self.logger.debug(f"raw_data={raw_data}") - - # calculate value - if raw_data is None: - return + def gruenlandtempsumme() -> float: + """Berechnung der Grünlandtemperatursumme durch Akkumulieren alle positiven Tagesmitteltemperaturen, im Januar gewichtet mit 50%, im Februar mit 75% - elif isinstance(raw_data, list): - # akkumulieren alle positiven Tagesmitteltemperaturen, im Januar gewichtet mit 50%, im Februar mit 75% + :return: value of gruenlandtempsumme + """ + gts = 0 for entry in raw_data: timestamp, value = entry @@ -1779,179 +1723,142 @@ def _handle_gruenlandtemperatursumme(self, database_item: Item, year: Union[int, gts += value return int(round(gts, 0)) - def _handle_wachstumsgradtage(self, database_item: Item, year: Union[int, str] = None, method: int = 0, threshold: int = 10) -> Union[list, float, None]: - """ - Calculate "wachstumsgradtage" for given year with temperature threshold - https://de.wikipedia.org/wiki/Wachstumsgradtag - - :param database_item: item object or item_id for which the query should be done - :param year: year the wachstumsgradtage should be calculated for - :param method: calculation method to be used - :param threshold: temperature in °C as threshold for evaluation - :return: wachstumsgradtage - """ - - if not self._valid_year(year): - self.logger.error(f"Year for item={database_item.path()} was {year}. This is not a valid year. Query cancelled.") - return - - # get datetime of today - today = self.shtime.today(offset=0) - - # define year - if not year or year == 'current': - year = today.year - - # define start_date, end_date - start_date = datetime.date(int(year), 1, 1) - end_date = datetime.date(int(year), 9, 21) - - # check start_date - if start_date > today: - self.logger.info(f"Start time for query of item={database_item.path()} is in future. Query cancelled.") - return - - # define start / end - start = (today - start_date).days - end = (today - end_date).days if end_date < today else 0 - - # check end - if start < end: - self.logger.error(f"End time for query of item={database_item.path()} is before start time. Query cancelled.") - return - - # get raw data as list - raw_data = self._prepare_value_list(database_item=database_item, timeframe='day', start=start, end=end, method='minmax_hour') - if self.debug_log.prepare: - self.logger.debug(f"raw_value_list={raw_data}") - - # calculate value - if raw_data is None: - return - - if isinstance(raw_data, list): - # Die Berechnung des einfachen Durchschnitts // akkumuliere positive Differenz aus Mittelwert aus Tagesminimaltemperatur und Tagesmaximaltemperatur limitiert auf 30°C und Schwellenwert + def wachstumsgradtage() -> Union[list, float, None]: + """Berechnet die Wachstumsgradtage noch 3 möglichen Methoden und gibt entweder den Gesamtwert oder eine Liste mit kumulierten Werten pro Tag zurück + + variant 1: Berechnung des einfachen Durchschnitts + variant 2: modifizierte Berechnung des einfachen Durchschnitts. + variant 3: Zähle Tage, bei denen die Tagesmitteltemperatur oberhalb des Schwellenwertes lag + + result 'value': Rückgabe als Gesamtwert + result 'series: Rückgabe als Liste mit kumulierten Werten pro Tag zurück [['timestamp1', 'kumulierter Wert am Ende von Tag1'], ['timestamp2', ''kumulierter Wert am Ende von Tag2', [...], ...] + """ + + # define defaults wgte = 0 wgte_list = [] - if method == 0 or method == 10: + + # get threshold and set to min 0 + threshold = params.get('threshold', 10) + threshold = max(0, threshold) + + # get variant + variant = params.get('variant', 0) + + # get result type + result = params.get('result', 'value') + + # Berechnung des einfachen Durchschnitts + if variant == 0: self.logger.info(f"Calculate 'Wachstumsgradtag' according to 'Berechnung des einfachen Durchschnitts'.") - for entry in raw_data: - timestamp, min_val, max_val = entry - wgt = (((min_val + min(30, max_val)) / 2) - threshold) - if wgt > 0: - wgte += wgt - wgte_list.append([timestamp, int(round(wgte, 0))]) - if method == 0: - return int(round(wgte, 0)) - else: - return wgte_list - # Die modifizierte Berechnung des einfachen Durchschnitts. // akkumuliere positive Differenz aus Mittelwert aus Tagesminimaltemperatur mit mind Schwellentemperatur und Tagesmaximaltemperatur limitiert auf 30°C und Schwellenwert - elif method == 1 or method == 11: + elif variant == 1: self.logger.info(f"Calculate 'Wachstumsgradtag' according to 'Modifizierte Berechnung des einfachen Durchschnitts'.") - for entry in raw_data: - timestamp, min_val, max_val = entry - wgt = (((max(threshold, min_val) + min(30.0, max_val)) / 2) - threshold) - if wgt > 0: - wgte += wgt - wgte_list.append([timestamp, int(round(wgte, 0))]) - if method == 1: - return int(round(wgte, 0)) - else: - return wgte_list - # Zähle Tage, bei denen die Tagesmitteltemperatur oberhalb des Schwellenwertes lag - elif method == 2 or method == 12: + elif variant == 2: self.logger.info(f"Calculate 'Wachstumsgradtag' according to 'Anzahl der Tage, bei denen die Tagesmitteltemperatur oberhalb des Schwellenwertes lag'.") - for entry in raw_data: - timestamp, min_val, max_val = entry + else: + self.logger.warning(f"Requested variant of 'Wachstumsgradtag' not defined. Aborting...") + return + + for entry in raw_data: + timestamp, min_val, max_val = entry + + if variant == 0: + wgt = (((min_val + min(30, max_val)) / 2) - threshold) + elif variant == 1: + wgt = (((max(threshold, min_val) + min(30.0, max_val)) / 2) - threshold) + elif variant == 2: wgt = (((min_val + min(30, max_val)) / 2) - threshold) - if wgt > 0: - wgte += 1 - wgte_list.append([timestamp, wgte]) - if method == 0: - return wgte else: - return wgte_list + wgt = None - else: - self.logger.info(f"Method for 'Wachstumsgradtag' calculation not defined.'") + if wgt and wgt > 0: + wgte += wgt + wgte_list.append([timestamp, int(round(wgte, 0))]) - def _handle_temperaturserie(self, database_item: Item, year: Union[int, str] = None, method: str = 'avg_hour') -> Union[list, None]: - """ - provide list of lists having timestamp and temperature(s) per day + if result == 'series': + return wgte_list + else: + return int(round(wgte, 0)) - :param database_item: item object or item_id for which the query should be done - :param year: year the wachstumsgradtage should be calculated for - :param method: calculation method to be used - :return: list of temperatures - """ + def temperaturserie() -> list: + """provide list of lists having timestamp and temperature(s) per day""" - if not self._valid_year(year): - self.logger.error(f"Year for item={database_item.path()} was {year}. This is not a valid year. Query cancelled.") - return + return raw_data - # get datetime of today - today = self.shtime.today(offset=0) + def wuestentage() -> int: + """provide number day counted as Wüstentag with Tmax ≥ 35°C""" + return _count(operator.ge, 'max', 35) - # define year - if not year or year == 'current': - year = today.year + def heisse_tage() -> int: + """provide number day counted as heißer Tag with Tmax ≥ 30°C""" + return _count(operator.ge, 'max', 30) - # define start_date, end_date - start_date = datetime.date(int(year), 1, 1) - end_date = datetime.date(int(year), 12, 31) + def tropennaechte() -> int: + """provide number day counted as Tropnenacht with Tmin ≥ 20 °C""" + return _count(operator.ge, 'min', 20) - # check start_date - if start_date > today: - self.logger.info(f"Start time for query of item={database_item.path()} is in future. Query cancelled.") - return + def sommertage() -> int: + """provide number day counted as Sommertag with Tmax ≥ 25°C""" + return _count(operator.ge, 'max', 25) - # define start / end - start = (today - start_date).days - end = (today - end_date).days if end_date < today else 0 + def frosttage() -> int: + """provide number day counted as Frosttag with Tmin < 0°C""" + return _count(operator.lt, 'min', 0) - # check end - if start < end: - self.logger.error(f"End time for query of item={database_item.path()} is before start time. Query cancelled.") - return + def eistage() -> int: + """provide number day counted as Frosttag with Tmax < 0°C""" + return _count(operator.lt, 'max', 0) - # get raw data as list - temp_list = self._prepare_value_list(database_item=database_item, timeframe='day', start=start, end=end, method=method) - if self.debug_log.prepare: - self.logger.debug(f"{temp_list=}") + def heiztage() -> int: + """provide number day counted as Frosttag with Tavg < 15°C""" + return _count(operator.lt, 'avg', 15) - return temp_list + def vegetationstage() -> int: + """provide number day counted as Frosttag with Tavg > 5°C""" + return _count(operator.ge, 'avg', 5) - def _prepare_waermesumme(self, database_item: Item, year: Union[int, str] = None, month: Union[int, str] = None) -> Union[list, None]: - """Prepares raw data for waermesumme""" + def _count(op, minmax: str, limit: int) -> int: + count = 0 + for entry in raw_data: + value = entry[2] if minmax == 'max' else entry[1] + if op(value, limit): + count += 1 + return count - # check validity of given year - if not self._valid_year(year): - self.logger.error(f"Year for item={database_item.path()} was {year}. This is not a valid year. Query cancelled.") + self.logger.debug(f"{func=}, {database_item=}, {year=}, {month=}, {params=}") + + # check if func is defined + if func not in defaults: + self.logger.warning(f"_handle_temp_sums called with {func=}, which is not defined. Aborting...") return # get datetime of today today = self.shtime.today(offset=0) - # define year + # define year or check validity of given year if not year or year == 'current': year = today.year + elif not self._valid_year(year): + self.logger.error(f"Year for item={database_item.path()} was {year}. This is not a valid year. Aborting...") + return # define start_date, end_date if month is None: - start_date = datetime.date(int(year), 1, 1) - end_date = datetime.date(int(year), 9, 21) + ((s_y, s_m, s_d), (e_y, e_m, e_d)) = defaults.get(func, {}).get('start_end', timeframe[3]) + start_date = datetime.date(int(year) + s_y, s_m, s_d) + end_date = datetime.date(int(year) + e_y, e_m, e_d) elif self._valid_month(month): start_date = datetime.date(int(year), int(month), 1) end_date = start_date + relativedelta(months=+1) - datetime.timedelta(days=1) else: - self.logger.error(f"Month for item={database_item.path()} was {month}. This is not a valid month. Query cancelled.") + self.logger.error(f"Month for item={database_item.path()} was {month}. This is not a valid month. Aborting...") return # check start_date if start_date > today: - self.logger.info(f"Start time for query of item={database_item.path()} is in future. Query cancelled.") + self.logger.info(f"Start time for query of item={database_item.path()} is in future. Aborting...") return # define start / end @@ -1960,13 +1867,25 @@ def _prepare_waermesumme(self, database_item: Item, year: Union[int, str] = None # check end if start < end: - self.logger.error(f"End time for query of item={database_item.path()} is before start time. Query cancelled.") + self.logger.error(f"End time for query of item={database_item.path()} is before start time. Aborting...") + return + + # get raw data as list + if self.debug_log.prepare: + self.logger.debug("try to get raw data") + data_con_func = defaults.get(func, {}).get('data_con_func') + raw_data = self._prepare_value_list(database_item=database_item, timeframe='day', start=start, end=end, ignore_value_list=ignore_value_list, data_con_func=data_con_func, cache=True) + if self.debug_log.prepare: + self.logger.debug(f"raw_value_list={raw_data}") + + # return None, if now raw data + if raw_data is None or not isinstance(raw_data, list): return - # return raw data as list - return self._prepare_value_list(database_item=database_item, timeframe='day', start=start, end=end, method='avg_hour') + # calculate value and return it + return locals()[func]() - def _prepare_value_list(self, database_item: Item, timeframe: str, start: int, end: int = 0, ignore_value_list=None, method: str = 'avg_hour') -> Union[list, None]: + def _prepare_value_list(self, database_item: Item, timeframe: str, start: int, end: int = 0, ignore_value_list=None, data_con_func: str = 'avg_day', cache: bool = False) -> Union[list, None]: """ returns list of lists having timestamp and values(s) per day / hour in format of regular database query @@ -1975,35 +1894,40 @@ def _prepare_value_list(self, database_item: Item, timeframe: str, start: int, e :param start: increments for timeframe from now to start :param end: increments for timeframe from now to end :param ignore_value_list: list of comparison operators for val_num, which will be applied during query - :param method: calculation method + :param data_con_func: data concentration function - avg_day: determines average value per day of values within plugin - avg_hour: determines average value per hour of values within plugin - first_day: determines first value per day of values within plugin - first_hour: determines first value per hour of values within plugin - minmax_day: determines min and max value per day of values within plugin - minmax_hour: determines min and max value per hour of values within plugin + - first_hour_avg_day: 2-step concentration: 1) concentrate values within an hour by using first value 2) concentrate values by average for first value of each hour :return: list of list with [timestamp, value] """ - def _create_raw_value_dict(block: str) -> dict: + def _group_value_by_datetime_block(block: str) -> dict: """ create dict of datetimes (per day or hour) and values based on database query result in format {'datetime1': [values]}, 'datetime1': [values], ..., 'datetimex': [values]} - :param block: defined the increment of datetimes, default is hour, further possible is 'day' + :param block: defined the increment of datetime, default is min, further possible is 'day' and 'hour' """ _value_dict = {} for _entry in raw_data: - dt = self._timestamp_to_datetime(_entry[0] / 1000) - dt = dt.replace(minute=0, second=0, microsecond=0) + ts = _entry[0] + if len(str(ts)) > 10: + ts = ts / 1000 + dt = self._timestamp_to_datetime(ts) + dt = dt.replace(second=0, microsecond=0, tzinfo=None) + if block == 'hour': + dt = dt.replace(minute=0) if block == 'day': - dt = dt.replace(hour=0) + dt = dt.replace(minute=0, hour=0) if dt not in _value_dict: _value_dict[dt] = [] _value_dict[dt].append(_entry[1]) - return dict(sorted(_value_dict.items())) - def _create_value_list_timestamp_value(option: str) -> list: + def _concentrate_values(option: str) -> list: """ Create list of list with [[timestamp1, value1], [timestamp2, value2], ...] based on value_dict in format of database query result values given in the list will be concentrated as per given option @@ -2015,7 +1939,7 @@ def _create_value_list_timestamp_value(option: str) -> list: """ _value_list = [] - # create nested list with timestamp, avg_value per hour/day + # create nested list with timestamp, avg_value or minmax per hour/day for entry in value_dict: _timestamp = self._datetime_to_timestamp(entry) if option == 'first': @@ -2027,33 +1951,64 @@ def _create_value_list_timestamp_value(option: str) -> list: return _value_list if self.debug_log.prepare: - self.logger.debug(f'called with database_item={database_item.path()}, {timeframe=}, {start=}, {end=}, {ignore_value_list=}, {method=}') + self.logger.debug(f'called with database_item={database_item.path()}, {timeframe=}, {start=}, {end=}, {ignore_value_list=}, {data_con_func=}') - # check method - if method in ['avg_day', 'avg_hour', 'minmax_day', 'minmax_hour', 'first_day', 'first_hour']: - _method, _block = method.split('_') - elif method in ['avg', 'minmax', 'first']: - _method = method - _block = 'hour' - else: - self.logger.warning(f"defined {method=} for _prepare_value_list unknown. Need to be 'avg_day', 'avg_hour', 'minmax_day', 'minmax_hour', 'first_day' or 'first_hour'. Aborting...") + if data_con_func not in ('avg', 'minmax', 'first', 'avg_day', 'avg_hour', 'minmax_day', 'minmax_hour', 'first_day','first_hour', 'first_hour_avg_day', 'avg_hour_avg_day'): + self.logger.warning(f"defined {data_con_func=} for _prepare_value_list unknown. Need to be 'avg', 'minmax', 'first', 'avg_day', 'avg_hour', 'minmax_day', 'minmax_hour', 'first_day','first_hour', 'first_hour_avg_day' or 'avg_hour_avg_day'. Aborting...") return + # define defaults + _data_con1 = _block1 = _data_con2 = _block2 = result = None + + # check data_con_func + data_con_func_list = data_con_func.split('_') + if len(data_con_func_list) == 1: + _data_con1 = data_con_func_list + _block = 'hour' + elif len(data_con_func_list) == 2: + _data_con1, _block1 = data_con_func_list + elif len(data_con_func_list) == 4: + _data_con1, _block1, _data_con2, _block2 = data_con_func_list + + # define quere params + _query_params = {'func': 'raw', 'database_item': database_item, 'timeframe': timeframe, 'start': start, 'end': end, 'ignore_value_list': ignore_value_list} + # get raw data from database - raw_data = self._query_item(func='raw', database_item=database_item, timeframe=timeframe, start=start, end=end, ignore_value_list=ignore_value_list) - if raw_data == [[None, None]] or raw_data == [[0, 0]]: - self.logger.info(f"no valid data from database query for item={database_item.path()} received during _prepare_value_list. Aborting...") - return + if not cache or str(_query_params) not in self.value_list_raw_data: + raw_data = self._query_item(**_query_params) - # create nested dict with values - value_dict = _create_raw_value_dict(block=_block) - if self.debug_log.prepare: - self.logger.debug(f"{value_dict=}") + if raw_data == [[None, None]] or raw_data == [[0, 0]]: + self.logger.info(f"no valid data from database query for item={database_item.path()} received during _prepare_value_list. Aborting...") + return - # return value list - result = _create_value_list_timestamp_value(option=_method) - if self.debug_log.prepare: - self.logger.debug(f"{method=}, {result=}") + if cache: + self.logger.debug(f"raw_data for {_query_params=} put to cache.") + self.value_list_raw_data[str(_query_params)] = raw_data + else: + self.logger.debug(f"raw_data for {_query_params=} read from cache.") + raw_data = self.value_list_raw_data[str(_query_params)] + + if _data_con1 and _block1: + # create nested dict with values + value_dict = _group_value_by_datetime_block(block=_block1) + if self.debug_log.prepare: + self.logger.debug(f"{_block1=}, {value_dict=}") + + # return value list + result = _concentrate_values(option=_data_con1) + if self.debug_log.prepare: + self.logger.debug(f"{_data_con1=}, {result=}") + + if _data_con2 and _block2: + # create nested dict with values + value_dict = _group_value_by_datetime_block(block=_block2) + if self.debug_log.prepare: + self.logger.debug(f"{_block2=}, {value_dict=}") + + # return value list + result = _concentrate_values(option=_data_con2) + if self.debug_log.prepare: + self.logger.debug(f"{_data_con2=}, {result=}") return result @@ -2355,6 +2310,8 @@ def _init_cache_dicts(self) -> None: YEAR: {} } + self.value_list_raw_data = {} + def _clean_item_cache(self, item: Union[str, Item]) -> None: """set cached values for item to None""" @@ -2455,15 +2412,15 @@ def _datetime_to_timestamp(self, dt: datetime) -> int: return int(dt.replace(tzinfo=self.shtime.tzinfo()).timestamp()) - def _timestamp_to_datetime(self, timestamp: int) -> datetime: + def _timestamp_to_datetime(self, timestamp: float) -> datetime: """Parse timestamp from db query to datetime""" - return datetime.datetime.fromtimestamp(timestamp / 1000, tz=self.shtime.tzinfo()) + return datetime.datetime.fromtimestamp(timestamp, tz=self.shtime.tzinfo()) def _timestamp_to_timestring(self, timestamp: int) -> str: """Parse timestamp from db query to string representing date and time""" - return self._timestamp_to_datetime(timestamp).strftime('%Y-%m-%d %H:%M:%S') + return self._timestamp_to_datetime(timestamp / 1000).strftime('%Y-%m-%d %H:%M:%S') def _valid_year(self, year: Union[int, str]) -> bool: """Check if given year is digit and within allowed range""" @@ -2548,7 +2505,7 @@ def _query_log_timestamp(self, func: str, item_id: int, ts_start: int, ts_end: i 'first': 'ORDER BY time ASC ', 'last': 'ORDER BY time DESC ', } - + _limit = { 'next': 'LIMIT 1 ', 'first': 'LIMIT 1 ', @@ -2632,7 +2589,8 @@ def _read_log_oldest(self, item_id: int) -> int: params = {'item_id': item_id} query = "SELECT min(time) FROM log WHERE item_id = :item_id;" - return self._fetchall(query, params)[0][0] + result = self._fetchall(query, params) + return None if result is None else result[0][0] def _read_log_newest(self, item_id: int) -> int: """ @@ -2644,7 +2602,8 @@ def _read_log_newest(self, item_id: int) -> int: params = {'item_id': item_id} query = "SELECT max(time) FROM log WHERE item_id = :item_id;" - return self._fetchall(query, params)[0][0] + result = self._fetchall(query, params) + return None if result is None else result[0][0] def _read_log_timestamp(self, item_id: int, timestamp: int) -> Union[list, None]: """ diff --git a/db_addon/item_attributes.py b/db_addon/item_attributes.py index 7c04066fc..e1d94b417 100644 --- a/db_addon/item_attributes.py +++ b/db_addon/item_attributes.py @@ -29,11 +29,11 @@ # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # ALL_ONCHANGE_ATTRIBUTES = ['verbrauch_heute', 'verbrauch_woche', 'verbrauch_monat', 'verbrauch_jahr', 'minmax_heute_min', 'minmax_heute_max', 'minmax_heute_avg', 'minmax_woche_min', 'minmax_woche_max', 'minmax_monat_min', 'minmax_monat_max', 'minmax_jahr_min', 'minmax_jahr_max', 'tagesmitteltemperatur_heute'] -ALL_DAILY_ATTRIBUTES = ['verbrauch_heute_minus1', 'verbrauch_heute_minus2', 'verbrauch_heute_minus3', 'verbrauch_heute_minus4', 'verbrauch_heute_minus5', 'verbrauch_heute_minus6', 'verbrauch_heute_minus7', 'verbrauch_rolling_12m_heute_minus1', 'verbrauch_jahreszeitraum_minus1', 'verbrauch_jahreszeitraum_minus2', 'verbrauch_jahreszeitraum_minus3', 'zaehlerstand_heute_minus1', 'zaehlerstand_heute_minus2', 'zaehlerstand_heute_minus3', 'minmax_last_24h_min', 'minmax_last_24h_max', 'minmax_last_24h_avg', 'minmax_last_7d_min', 'minmax_last_7d_max', 'minmax_last_7d_avg', 'minmax_heute_minus1_min', 'minmax_heute_minus1_max', 'minmax_heute_minus1_avg', 'minmax_heute_minus2_min', 'minmax_heute_minus2_max', 'minmax_heute_minus2_avg', 'minmax_heute_minus3_min', 'minmax_heute_minus3_max', 'minmax_heute_minus3_avg', 'tagesmitteltemperatur_heute_minus1', 'tagesmitteltemperatur_heute_minus2', 'tagesmitteltemperatur_heute_minus3', 'serie_minmax_tag_min_30d', 'serie_minmax_tag_max_30d', 'serie_minmax_tag_avg_30d', 'serie_verbrauch_tag_30d', 'serie_zaehlerstand_tag_30d', 'serie_tagesmittelwert_0d', 'serie_tagesmittelwert_stunde_0d', 'serie_tagesmittelwert_stunde_30_0d', 'serie_tagesmittelwert_tag_stunde_30d', 'kaeltesumme', 'waermesumme', 'gruenlandtempsumme', 'tagesmitteltemperatur', 'wachstumsgradtage'] +ALL_DAILY_ATTRIBUTES = ['verbrauch_heute_minus1', 'verbrauch_heute_minus2', 'verbrauch_heute_minus3', 'verbrauch_heute_minus4', 'verbrauch_heute_minus5', 'verbrauch_heute_minus6', 'verbrauch_heute_minus7', 'verbrauch_rolling_12m_heute_minus1', 'verbrauch_jahreszeitraum_minus1', 'verbrauch_jahreszeitraum_minus2', 'verbrauch_jahreszeitraum_minus3', 'zaehlerstand_heute_minus1', 'zaehlerstand_heute_minus2', 'zaehlerstand_heute_minus3', 'minmax_last_24h_min', 'minmax_last_24h_max', 'minmax_last_24h_avg', 'minmax_last_7d_min', 'minmax_last_7d_max', 'minmax_last_7d_avg', 'minmax_heute_minus1_min', 'minmax_heute_minus1_max', 'minmax_heute_minus1_avg', 'minmax_heute_minus2_min', 'minmax_heute_minus2_max', 'minmax_heute_minus2_avg', 'minmax_heute_minus3_min', 'minmax_heute_minus3_max', 'minmax_heute_minus3_avg', 'tagesmitteltemperatur_heute_minus1', 'tagesmitteltemperatur_heute_minus2', 'tagesmitteltemperatur_heute_minus3', 'serie_minmax_tag_min_30d', 'serie_minmax_tag_max_30d', 'serie_minmax_tag_avg_30d', 'serie_verbrauch_tag_30d', 'serie_zaehlerstand_tag_30d', 'serie_tagesmittelwert_0d', 'serie_tagesmittelwert_stunde_0d', 'serie_tagesmittelwert_stunde_30_0d', 'serie_tagesmittelwert_tag_stunde_30d', 'kaeltesumme', 'waermesumme', 'gruenlandtempsumme', 'wachstumsgradtage', 'wuestentage', 'heisse_tage', 'tropennaechte', 'sommertage', 'heiztage', 'vegetationstage', 'frosttage', 'eistage', 'tagesmitteltemperatur'] ALL_WEEKLY_ATTRIBUTES = ['verbrauch_woche_minus1', 'verbrauch_woche_minus2', 'verbrauch_woche_minus3', 'verbrauch_woche_minus4', 'verbrauch_rolling_12m_woche_minus1', 'zaehlerstand_woche_minus1', 'zaehlerstand_woche_minus2', 'zaehlerstand_woche_minus3', 'minmax_woche_minus1_min', 'minmax_woche_minus1_max', 'minmax_woche_minus1_avg', 'minmax_woche_minus2_min', 'minmax_woche_minus2_max', 'minmax_woche_minus2_avg', 'serie_minmax_woche_min_30w', 'serie_minmax_woche_max_30w', 'serie_minmax_woche_avg_30w', 'serie_verbrauch_woche_30w', 'serie_zaehlerstand_woche_30w'] ALL_MONTHLY_ATTRIBUTES = ['verbrauch_monat_minus1', 'verbrauch_monat_minus2', 'verbrauch_monat_minus3', 'verbrauch_monat_minus4', 'verbrauch_monat_minus12', 'verbrauch_rolling_12m_monat_minus1', 'zaehlerstand_monat_minus1', 'zaehlerstand_monat_minus2', 'zaehlerstand_monat_minus3', 'minmax_monat_minus1_min', 'minmax_monat_minus1_max', 'minmax_monat_minus1_avg', 'minmax_monat_minus2_min', 'minmax_monat_minus2_max', 'minmax_monat_minus2_avg', 'serie_minmax_monat_min_15m', 'serie_minmax_monat_max_15m', 'serie_minmax_monat_avg_15m', 'serie_verbrauch_monat_18m', 'serie_zaehlerstand_monat_18m', 'serie_waermesumme_monat_24m', 'serie_kaeltesumme_monat_24m'] ALL_YEARLY_ATTRIBUTES = ['verbrauch_jahr_minus1', 'verbrauch_jahr_minus2', 'verbrauch_rolling_12m_jahr_minus1', 'zaehlerstand_jahr_minus1', 'zaehlerstand_jahr_minus2', 'zaehlerstand_jahr_minus3', 'minmax_jahr_minus1_min', 'minmax_jahr_minus1_max', 'minmax_jahr_minus1_avg'] -ALL_NEED_PARAMS_ATTRIBUTES = ['kaeltesumme', 'waermesumme', 'gruenlandtempsumme', 'tagesmitteltemperatur', 'wachstumsgradtage', 'db_request', 'minmax', 'minmax_last', 'verbrauch', 'zaehlerstand'] +ALL_PARAMS_ATTRIBUTES = ['kaeltesumme', 'waermesumme', 'gruenlandtempsumme', 'wachstumsgradtage', 'wuestentage', 'heisse_tage', 'tropennaechte', 'sommertage', 'heiztage', 'vegetationstage', 'frosttage', 'eistage', 'tagesmitteltemperatur', 'db_request', 'minmax', 'minmax_last', 'verbrauch', 'zaehlerstand'] ALL_VERBRAUCH_ATTRIBUTES = ['verbrauch_heute', 'verbrauch_woche', 'verbrauch_monat', 'verbrauch_jahr', 'verbrauch_heute_minus1', 'verbrauch_heute_minus2', 'verbrauch_heute_minus3', 'verbrauch_heute_minus4', 'verbrauch_heute_minus5', 'verbrauch_heute_minus6', 'verbrauch_heute_minus7', 'verbrauch_woche_minus1', 'verbrauch_woche_minus2', 'verbrauch_woche_minus3', 'verbrauch_woche_minus4', 'verbrauch_monat_minus1', 'verbrauch_monat_minus2', 'verbrauch_monat_minus3', 'verbrauch_monat_minus4', 'verbrauch_monat_minus12', 'verbrauch_jahr_minus1', 'verbrauch_jahr_minus2', 'verbrauch_rolling_12m_heute_minus1', 'verbrauch_rolling_12m_woche_minus1', 'verbrauch_rolling_12m_monat_minus1', 'verbrauch_rolling_12m_jahr_minus1', 'verbrauch_jahreszeitraum_minus1', 'verbrauch_jahreszeitraum_minus2', 'verbrauch_jahreszeitraum_minus3'] VERBRAUCH_ATTRIBUTES_ONCHANGE = ['verbrauch_heute', 'verbrauch_woche', 'verbrauch_monat', 'verbrauch_jahr'] VERBRAUCH_ATTRIBUTES_TIMEFRAME = ['verbrauch_heute_minus1', 'verbrauch_heute_minus2', 'verbrauch_heute_minus3', 'verbrauch_heute_minus4', 'verbrauch_heute_minus5', 'verbrauch_heute_minus6', 'verbrauch_heute_minus7', 'verbrauch_woche_minus1', 'verbrauch_woche_minus2', 'verbrauch_woche_minus3', 'verbrauch_woche_minus4', 'verbrauch_monat_minus1', 'verbrauch_monat_minus2', 'verbrauch_monat_minus3', 'verbrauch_monat_minus4', 'verbrauch_monat_minus12', 'verbrauch_jahr_minus1', 'verbrauch_jahr_minus2'] @@ -58,4 +58,5 @@ SERIE_ATTRIBUTES_MITTEL_H1 = ['serie_tagesmittelwert_stunde_30_0d'] SERIE_ATTRIBUTES_MITTEL_D_H = ['serie_tagesmittelwert_tag_stunde_30d'] ALL_GEN_ATTRIBUTES = ['general_oldest_value', 'general_oldest_log'] -ALL_COMPLEX_ATTRIBUTES = ['kaeltesumme', 'waermesumme', 'gruenlandtempsumme', 'tagesmitteltemperatur', 'wachstumsgradtage', 'db_request', 'minmax', 'minmax_last', 'verbrauch', 'zaehlerstand'] +ALL_SUMME_ATTRIBUTES = ['kaeltesumme', 'waermesumme', 'gruenlandtempsumme', 'wachstumsgradtage', 'wuestentage', 'heisse_tage', 'tropennaechte', 'sommertage', 'heiztage', 'vegetationstage', 'frosttage', 'eistage'] +ALL_COMPLEX_ATTRIBUTES = ['tagesmitteltemperatur', 'db_request', 'minmax', 'minmax_last', 'verbrauch', 'zaehlerstand'] diff --git a/db_addon/item_attributes_master.py b/db_addon/item_attributes_master.py index d0bd1436f..cdf36d71c 100644 --- a/db_addon/item_attributes_master.py +++ b/db_addon/item_attributes_master.py @@ -27,6 +27,8 @@ DOC_FILE_NAME = 'user_doc.rst' +PLUGIN_VERSION = '1.2.3' + ITEM_ATTRIBUTES = { 'db_addon_fct': { 'verbrauch_heute': {'cat': 'verbrauch', 'sub_cat': 'onchange', 'item_type': 'num', 'calc': 'onchange', 'params': False, 'description': 'Verbrauch am heutigen Tag (Differenz zwischen aktuellem Wert und den Wert am Ende des vorherigen Tages)'}, @@ -136,11 +138,19 @@ 'serie_tagesmittelwert_tag_stunde_30d': {'cat': 'serie', 'sub_cat': 'mittel_d_h', 'item_type': 'list', 'calc': 'daily', 'params': False, 'description': 'Stundenmittelwert pro Tag der letzten 30 Tage (bspw. zur Berechnung der Tagesmitteltemperatur basierend auf den Mittelwert der Temperatur pro Stunde'}, 'general_oldest_value': {'cat': 'gen', 'sub_cat': None, 'item_type': 'num', 'calc': 'no', 'params': False, 'description': 'Ausgabe des ältesten Wertes des entsprechenden "Parent-Items" mit database Attribut'}, 'general_oldest_log': {'cat': 'gen', 'sub_cat': None, 'item_type': 'list', 'calc': 'no', 'params': False, 'description': 'Ausgabe des Timestamp des ältesten Eintrages des entsprechenden "Parent-Items" mit database Attribut'}, - 'kaeltesumme': {'cat': 'complex', 'sub_cat': 'summe', 'item_type': 'num', 'calc': 'daily', 'params': True, 'description': 'Berechnet die Kältesumme für einen Zeitraum, db_addon_params: (year=mandatory, month=optional)'}, - 'waermesumme': {'cat': 'complex', 'sub_cat': 'summe', 'item_type': 'num', 'calc': 'daily', 'params': True, 'description': 'Berechnet die Wärmesumme für einen Zeitraum, db_addon_params: (year=mandatory, month=optional)'}, - 'gruenlandtempsumme': {'cat': 'complex', 'sub_cat': None, 'item_type': 'num', 'calc': 'daily', 'params': True, 'description': 'Berechnet die Grünlandtemperatursumme für einen Zeitraum, db_addon_params: (year=mandatory)'}, + 'kaeltesumme': {'cat': 'summe', 'sub_cat': None, 'item_type': 'num', 'calc': 'daily', 'params': True, 'description': 'Berechnet die Kältesumme für einen Zeitraum, db_addon_params: (year=optional, month=optional)'}, + 'waermesumme': {'cat': 'summe', 'sub_cat': None, 'item_type': 'num', 'calc': 'daily', 'params': True, 'description': 'Berechnet die Wärmesumme für einen Zeitraum, db_addon_params: (year=optional, month=optional)'}, + 'gruenlandtempsumme': {'cat': 'summe', 'sub_cat': None, 'item_type': 'num', 'calc': 'daily', 'params': True, 'description': 'Berechnet die Grünlandtemperatursumme für einen Zeitraum, db_addon_params: (year=optional)'}, + 'wachstumsgradtage': {'cat': 'summe', 'sub_cat': None, 'item_type': 'num', 'calc': 'daily', 'params': True, 'description': 'Berechnet die Wachstumsgradtage auf Basis der stündlichen Durchschnittswerte eines Tages für das laufende Jahr mit an Angabe des Temperaturschwellenwertes (threshold=Schwellentemperatur)'}, + 'wuestentage': {'cat': 'summe', 'sub_cat': 'kenntage', 'item_type': 'num', 'calc': 'daily', 'params': True, 'description': 'Berechnet die Anzahl der Wüstentage des Jahres, db_addon_params: (year=optional)'}, + 'heisse_tage': {'cat': 'summe', 'sub_cat': 'kenntage', 'item_type': 'num', 'calc': 'daily', 'params': True, 'description': 'Berechnet die Anzahl der heissen Tage des Jahres, db_addon_params: (year=optional)'}, + 'tropennaechte': {'cat': 'summe', 'sub_cat': 'kenntage', 'item_type': 'num', 'calc': 'daily', 'params': True, 'description': 'Berechnet die Anzahl der Tropennächte des Jahres, db_addon_params: (year=optional)'}, + 'sommertage': {'cat': 'summe', 'sub_cat': 'kenntage', 'item_type': 'num', 'calc': 'daily', 'params': True, 'description': 'Berechnet die Anzahl der Sommertage des Jahres, db_addon_params: (year=optional)'}, + 'heiztage': {'cat': 'summe', 'sub_cat': 'kenntage', 'item_type': 'num', 'calc': 'daily', 'params': True, 'description': 'Berechnet die Anzahl der Heiztage des Jahres, db_addon_params: (year=optional)'}, + 'vegetationstage': {'cat': 'summe', 'sub_cat': 'kenntage', 'item_type': 'num', 'calc': 'daily', 'params': True, 'description': 'Berechnet die Anzahl der Vegatationstage des Jahres, db_addon_params: (year=optional)'}, + 'frosttage': {'cat': 'summe', 'sub_cat': 'kenntage', 'item_type': 'num', 'calc': 'daily', 'params': True, 'description': 'Berechnet die Anzahl der Frosttage des Jahres, db_addon_params: (year=optional)'}, + 'eistage': {'cat': 'summe', 'sub_cat': 'kenntage', 'item_type': 'num', 'calc': 'daily', 'params': True, 'description': 'Berechnet die Anzahl der Eistage des Jahres, db_addon_params: (year=optional)'}, 'tagesmitteltemperatur': {'cat': 'complex', 'sub_cat': None, 'item_type': 'list', 'calc': 'daily', 'params': True, 'description': 'Berechnet die Tagesmitteltemperatur auf Basis der stündlichen Durchschnittswerte eines Tages für die angegebene Anzahl von Tagen (timeframe=day, count=integer)'}, - 'wachstumsgradtage': {'cat': 'complex', 'sub_cat': None, 'item_type': 'num', 'calc': 'daily', 'params': True, 'description': 'Berechnet die Wachstumsgradtage auf Basis der stündlichen Durchschnittswerte eines Tages für das laufende Jahr mit an Angabe des Temperaturschwellenwertes (threshold=Schwellentemperatur)'}, 'db_request': {'cat': 'complex', 'sub_cat': None, 'item_type': 'list', 'calc': 'group', 'params': True, 'description': 'Abfrage der DB: db_addon_params: (func=mandatory, item=mandatory, timespan=mandatory, start=optional, end=optional, count=optional, group=optional, group2=optional)'}, 'minmax': {'cat': 'complex', 'sub_cat': None, 'item_type': 'num', 'calc': 'timeframe', 'params': True, 'description': 'Berechnet einen min/max/avg Wert für einen bestimmen Zeitraum: db_addon_params: (func=mandatory, timeframe=mandatory, start=mandatory)'}, 'minmax_last': {'cat': 'complex', 'sub_cat': None, 'item_type': 'num', 'calc': 'timeframe', 'params': True, 'description': 'Berechnet einen min/max/avg Wert für ein bestimmtes Zeitfenster von jetzt zurück: db_addon_params: (func=mandatory, timeframe=mandatory, start=mandatory, end=mandatory)'}, @@ -211,7 +221,7 @@ def export_item_attributes_py(): ATTRS['ALL_WEEKLY_ATTRIBUTES'] = get_attrs(sub_dict={'calc': 'weekly'}) ATTRS['ALL_MONTHLY_ATTRIBUTES'] = get_attrs(sub_dict={'calc': 'monthly'}) ATTRS['ALL_YEARLY_ATTRIBUTES'] = get_attrs(sub_dict={'calc': 'yearly'}) - ATTRS['ALL_NEED_PARAMS_ATTRIBUTES'] = get_attrs(sub_dict={'params': True}) + ATTRS['ALL_PARAMS_ATTRIBUTES'] = get_attrs(sub_dict={'params': True}) ATTRS['ALL_VERBRAUCH_ATTRIBUTES'] = get_attrs(sub_dict={'cat': 'verbrauch'}) ATTRS['VERBRAUCH_ATTRIBUTES_ONCHANGE'] = get_attrs(sub_dict={'cat': 'verbrauch', 'sub_cat': 'onchange'}) ATTRS['VERBRAUCH_ATTRIBUTES_TIMEFRAME'] = get_attrs(sub_dict={'cat': 'verbrauch', 'sub_cat': 'timeframe'}) @@ -236,6 +246,7 @@ def export_item_attributes_py(): ATTRS['SERIE_ATTRIBUTES_MITTEL_H1'] = get_attrs(sub_dict={'cat': 'serie', 'sub_cat': 'mittel_h1'}) ATTRS['SERIE_ATTRIBUTES_MITTEL_D_H'] = get_attrs(sub_dict={'cat': 'serie', 'sub_cat': 'mittel_d_h'}) ATTRS['ALL_GEN_ATTRIBUTES'] = get_attrs(sub_dict={'cat': 'gen'}) + ATTRS['ALL_SUMME_ATTRIBUTES'] = get_attrs(sub_dict={'cat': 'summe'}) ATTRS['ALL_COMPLEX_ATTRIBUTES'] = get_attrs(sub_dict={'cat': 'complex'}) # create file and write header @@ -314,7 +325,7 @@ def update_plugin_yaml_item_attributes(): def check_plugin_yaml_structs(): # check structs for wrong attributes print() - print(f'D) Checking used attributes in structs defined in {FILENAME_PLUGIN} ') + print(f'C) Checking used attributes in structs defined in {FILENAME_PLUGIN} ') # open plugin.yaml and update yaml = ruamel.yaml.YAML() @@ -351,7 +362,7 @@ def get_all_keys(d): def update_user_doc(): # Update user_doc.rst print() - print(f'C) Start updating DB-Addon-Attributes and descriptions in {DOC_FILE_NAME}!"') + print(f'D) Start updating DB-Addon-Attributes and descriptions in {DOC_FILE_NAME}!"') attribute_list = [ "Dieses Kapitel wurde automatisch durch Ausführen des Skripts in der Datei 'item_attributes_master.py' erstellt.\n", "\n", "Nachfolgend eine Auflistung der möglichen Attribute für das Plugin im Format: Attribute: Beschreibung | Berechnungszyklus | Item-Type\n", diff --git a/db_addon/plugin.yaml b/db_addon/plugin.yaml index 5f719b5b9..7de29be1f 100644 --- a/db_addon/plugin.yaml +++ b/db_addon/plugin.yaml @@ -187,8 +187,16 @@ item_attributes: - kaeltesumme - waermesumme - gruenlandtempsumme - - tagesmitteltemperatur - wachstumsgradtage + - wuestentage + - heisse_tage + - tropennaechte + - sommertage + - heiztage + - vegetationstage + - frosttage + - eistage + - tagesmitteltemperatur - db_request - minmax - minmax_last @@ -303,11 +311,19 @@ item_attributes: - Stundenmittelwert pro Tag der letzten 30 Tage (bspw. zur Berechnung der Tagesmitteltemperatur basierend auf den Mittelwert der Temperatur pro Stunde - Ausgabe des ältesten Wertes des entsprechenden "Parent-Items" mit database Attribut - Ausgabe des Timestamp des ältesten Eintrages des entsprechenden "Parent-Items" mit database Attribut - - 'Berechnet die Kältesumme für einen Zeitraum, db_addon_params: (year=mandatory, month=optional)' - - 'Berechnet die Wärmesumme für einen Zeitraum, db_addon_params: (year=mandatory, month=optional)' - - 'Berechnet die Grünlandtemperatursumme für einen Zeitraum, db_addon_params: (year=mandatory)' - - Berechnet die Tagesmitteltemperatur auf Basis der stündlichen Durchschnittswerte eines Tages für die angegebene Anzahl von Tagen (timeframe=day, count=integer) + - 'Berechnet die Kältesumme für einen Zeitraum, db_addon_params: (year=optional, month=optional)' + - 'Berechnet die Wärmesumme für einen Zeitraum, db_addon_params: (year=optional, month=optional)' + - 'Berechnet die Grünlandtemperatursumme für einen Zeitraum, db_addon_params: (year=optional)' - Berechnet die Wachstumsgradtage auf Basis der stündlichen Durchschnittswerte eines Tages für das laufende Jahr mit an Angabe des Temperaturschwellenwertes (threshold=Schwellentemperatur) + - 'Berechnet die Anzahl der Wüstentage des Jahres, db_addon_params: (year=optional)' + - 'Berechnet die Anzahl der heissen Tage des Jahres, db_addon_params: (year=optional)' + - 'Berechnet die Anzahl der Tropennächte des Jahres, db_addon_params: (year=optional)' + - 'Berechnet die Anzahl der Sommertage des Jahres, db_addon_params: (year=optional)' + - 'Berechnet die Anzahl der Heiztage des Jahres, db_addon_params: (year=optional)' + - 'Berechnet die Anzahl der Vegatationstage des Jahres, db_addon_params: (year=optional)' + - 'Berechnet die Anzahl der Frosttage des Jahres, db_addon_params: (year=optional)' + - 'Berechnet die Anzahl der Eistage des Jahres, db_addon_params: (year=optional)' + - Berechnet die Tagesmitteltemperatur auf Basis der stündlichen Durchschnittswerte eines Tages für die angegebene Anzahl von Tagen (timeframe=day, count=integer) - 'Abfrage der DB: db_addon_params: (func=mandatory, item=mandatory, timespan=mandatory, start=optional, end=optional, count=optional, group=optional, group2=optional)' - 'Berechnet einen min/max/avg Wert für einen bestimmen Zeitraum: db_addon_params: (func=mandatory, timeframe=mandatory, start=mandatory)' - 'Berechnet einen min/max/avg Wert für ein bestimmtes Zeitfenster von jetzt zurück: db_addon_params: (func=mandatory, timeframe=mandatory, start=mandatory, end=mandatory)' @@ -425,8 +441,16 @@ item_attributes: - num - num - num - - list - num + - num + - num + - num + - num + - num + - num + - num + - num + - list - list - num - num @@ -546,6 +570,14 @@ item_attributes: - daily - daily - daily + - daily + - daily + - daily + - daily + - daily + - daily + - daily + - daily - group - timeframe - timeframe diff --git a/db_addon/user_doc.rst b/db_addon/user_doc.rst index 442888df7..d95d4658d 100644 --- a/db_addon/user_doc.rst +++ b/db_addon/user_doc.rst @@ -317,16 +317,32 @@ db_addon_fct - general_oldest_log: Ausgabe des Timestamp des ältesten Eintrages des entsprechenden "Parent-Items" mit database Attribut | Berechnung: no | Item-Type: list -- kaeltesumme: Berechnet die Kältesumme für einen Zeitraum, db_addon_params: (year=mandatory, month=optional) | Berechnung: daily | Item-Type: num +- kaeltesumme: Berechnet die Kältesumme für einen Zeitraum, db_addon_params: (year=optional, month=optional) | Berechnung: daily | Item-Type: num -- waermesumme: Berechnet die Wärmesumme für einen Zeitraum, db_addon_params: (year=mandatory, month=optional) | Berechnung: daily | Item-Type: num +- waermesumme: Berechnet die Wärmesumme für einen Zeitraum, db_addon_params: (year=optional, month=optional) | Berechnung: daily | Item-Type: num -- gruenlandtempsumme: Berechnet die Grünlandtemperatursumme für einen Zeitraum, db_addon_params: (year=mandatory) | Berechnung: daily | Item-Type: num - -- tagesmitteltemperatur: Berechnet die Tagesmitteltemperatur auf Basis der stündlichen Durchschnittswerte eines Tages für die angegebene Anzahl von Tagen (timeframe=day, count=integer) | Berechnung: daily | Item-Type: list +- gruenlandtempsumme: Berechnet die Grünlandtemperatursumme für einen Zeitraum, db_addon_params: (year=optional) | Berechnung: daily | Item-Type: num - wachstumsgradtage: Berechnet die Wachstumsgradtage auf Basis der stündlichen Durchschnittswerte eines Tages für das laufende Jahr mit an Angabe des Temperaturschwellenwertes (threshold=Schwellentemperatur) | Berechnung: daily | Item-Type: num +- wuestentage: Berechnet die Anzahl der Wüstentage des Jahres, db_addon_params: (year=optional) | Berechnung: daily | Item-Type: num + +- heisse_tage: Berechnet die Anzahl der heissen Tage des Jahres, db_addon_params: (year=optional) | Berechnung: daily | Item-Type: num + +- tropennaechte: Berechnet die Anzahl der Tropennächte des Jahres, db_addon_params: (year=optional) | Berechnung: daily | Item-Type: num + +- sommertage: Berechnet die Anzahl der Sommertage des Jahres, db_addon_params: (year=optional) | Berechnung: daily | Item-Type: num + +- heiztage: Berechnet die Anzahl der Heiztage des Jahres, db_addon_params: (year=optional) | Berechnung: daily | Item-Type: num + +- vegetationstage: Berechnet die Anzahl der Vegatationstage des Jahres, db_addon_params: (year=optional) | Berechnung: daily | Item-Type: num + +- frosttage: Berechnet die Anzahl der Frosttage des Jahres, db_addon_params: (year=optional) | Berechnung: daily | Item-Type: num + +- eistage: Berechnet die Anzahl der Eistage des Jahres, db_addon_params: (year=optional) | Berechnung: daily | Item-Type: num + +- tagesmitteltemperatur: Berechnet die Tagesmitteltemperatur auf Basis der stündlichen Durchschnittswerte eines Tages für die angegebene Anzahl von Tagen (timeframe=day, count=integer) | Berechnung: daily | Item-Type: list + - db_request: Abfrage der DB: db_addon_params: (func=mandatory, item=mandatory, timespan=mandatory, start=optional, end=optional, count=optional, group=optional, group2=optional) | Berechnung: group | Item-Type: list - minmax: Berechnet einen min/max/avg Wert für einen bestimmen Zeitraum: db_addon_params: (func=mandatory, timeframe=mandatory, start=mandatory) | Berechnung: timeframe | Item-Type: num @@ -390,6 +406,67 @@ Hinweise starker Systembelastung nützlich sein. +Konfiguration im Item +===================== + +direkt +------ +Bei der direkten Konfiguration wird das auszuwertende Database-Item durch das Plugin selbst bestimmt. Dazu muss die Konfiguration des +Attributes `db_addon_fct` oder eines entsprechenden `struct` direkt im Database-Item oder in der Itemstruktur bis zu 3 Ebenen darunter erfolgen. + +.. code-block:: yaml + wasserzaehler: + zaehlerstand: + type: num + knx_dpt: 12 + knx_cache: 5/3/4 + database: init + struct: + - db_addon.verbrauch_1 + +oder + +.. code-block:: yaml + wasserzaehler: + zaehlerstand: + type: num + knx_dpt: 12 + knx_cache: 5/3/4 + database: init + + auswertung: + type: foo + struct: + - db_addon.verbrauch_1 + + +indirekt +-------- +Bei der indirekten Konfiguration muss das auszuwertende Database-Item zusätzlich über das Attribut `db_addon_database_item` konfiguriert/angegeben werden. +Die Konfiguration kann somit frei im Itembaum erfolgen. Es wird hier der gleiche Syntax wie bei `eval_trigger` verwendet (Itempfad als String) + +.. code-block:: yaml + wasserzaehler: + zaehlerstand: + type: num + knx_dpt: 12 + knx_cache: 5/3/4 + database: init + + auswertungen: + wasser: + typ: foo + db_addon_database_item: wasserzaehler.zaehlerstand + db_addon_startup: yes + db_addon_ignore_value_list: ['!=0'] + struct: + - db_addon.verbrauch_1 + +Hinweis: +Da ein Zähler nicht 0 werden kann/sollte, aber beim Starten/Beenden von shNG auch 0 in die Datenbank geschrieben wird, kann man mit Hilfe des Attributs `db_addon_ignore_value_list` +diese Werte bei Abfragen der Datenbank maskieren. + + Beispiele ========= @@ -437,7 +514,7 @@ Soll bspw. die minimalen und maximalen Temperaturen ausgewertet werden, kann die Die Temperaturwerte werden in die Datenbank geschrieben und darauf basierend ausgewertet. Die structs 'db_addon.minmax_1' und 'db_addon.minmax_2' stellen entsprechende Items für die min/max Auswertung zur Verfügung. -| + Web Interface ============= From b1c44e2a7c0e8139d1ed1431c9184e24a137115d Mon Sep 17 00:00:00 2001 From: sisamiwe Date: Wed, 23 Aug 2023 16:16:04 +0200 Subject: [PATCH 10/41] DB_ADDON: - bugfixing methods - add all attributs containing 'heute' also with 'tag' - bugfix structs --- db_addon/__init__.py | 73 +++++--- db_addon/item_attributes.py | 28 +-- db_addon/item_attributes_master.py | 37 +++- db_addon/plugin.yaml | 278 +++++++++++++++++++++-------- db_addon/user_doc.rst | 60 +++++++ db_addon/webif/__init__.py | 3 +- 6 files changed, 361 insertions(+), 118 deletions(-) diff --git a/db_addon/__init__.py b/db_addon/__init__.py index 2cfb1369f..c0a809c29 100644 --- a/db_addon/__init__.py +++ b/db_addon/__init__.py @@ -60,9 +60,7 @@ class DatabaseAddOn(SmartPlugin): Main class of the Plugin. Does all plugin specific stuff and provides the update functions for the items """ - PLUGIN_VERSION = '1.2.3' - # ToDo: remove revision - REVISION = 'H' + PLUGIN_VERSION = '1.2.4' def __init__(self, sh): """ @@ -254,7 +252,7 @@ def get_query_parameters_from_db_addon_fct() -> Union[dict, None]: elif db_addon_fct in ZAEHLERSTAND_ATTRIBUTES_TIMEFRAME: # handle functions 'zaehlerstand' in format 'zaehlerstand_timeframe_timedelta' like 'zaehlerstand_heute_minus1' - # func = 'max' + func = 'last' timeframe = translate_timeframe(db_addon_fct_vars[1]) end = to_int(split_sting_letters_numbers(db_addon_fct_vars[2])[1]) start = end @@ -272,7 +270,6 @@ def get_query_parameters_from_db_addon_fct() -> Union[dict, None]: elif db_addon_fct in VERBRAUCH_ATTRIBUTES_TIMEFRAME: # handle functions 'verbrauch on-demand' in format 'verbrauch_timeframe_timedelta' like 'verbrauch_heute_minus2' timeframe = translate_timeframe(db_addon_fct_vars[1]) - # end = to_int(db_addon_fct_vars[2][-1]) end = to_int(split_sting_letters_numbers(db_addon_fct_vars[2])[1]) start = end + 1 log_text = 'verbrauch_timeframe_timedelta' @@ -329,7 +326,6 @@ def get_query_parameters_from_db_addon_fct() -> Union[dict, None]: elif db_addon_fct in SERIE_ATTRIBUTES_ZAEHLERSTAND: # handle functions 'serie_zaehlerstand' in format 'serie_zaehlerstand_timeframe_start|group' like 'serie_zaehlerstand_tag_30d' - func = 'max' timeframe = translate_timeframe(db_addon_fct_vars[2]) start, group = split_sting_letters_numbers(db_addon_fct_vars[3]) start = to_int(start) @@ -339,7 +335,6 @@ def get_query_parameters_from_db_addon_fct() -> Union[dict, None]: elif db_addon_fct in SERIE_ATTRIBUTES_VERBRAUCH: # handle all functions of format 'serie_verbrauch_timeframe_start|group' like 'serie_verbrauch_tag_30d' - func = 'diff_max' timeframe = translate_timeframe(db_addon_fct_vars[2]) start, group = split_sting_letters_numbers(db_addon_fct_vars[3]) start = to_int(start) @@ -1054,6 +1049,14 @@ def handle_ondemand(self, item: Item) -> None: else: result = None + # handle all functions using temperature sums + elif db_addon_fct in ALL_SUMME_ATTRIBUTES: + new_params = {} + for entry in ('threshold', 'variant', 'result', 'data_con_func'): + if entry in params: + new_params.update({entry: params[entry]}) + result = self._handle_temp_sums(func=db_addon_fct, database_item=database_item, year=params.get('year'), month=params.get('month'), ignore_value_list=params.get('ignore_value_list'), params=new_params) + # handle info functions elif db_addon_fct == 'info_db_version': result = self._get_db_version() @@ -1066,14 +1069,6 @@ def handle_ondemand(self, item: Item) -> None: elif db_addon_fct == 'general_oldest_log': result = self._get_oldest_log(database_item) - # handle all functions using temperature sums - elif db_addon_fct in ALL_SUMME_ATTRIBUTES: - new_params = {} - for entry in ('threshold', 'variant', 'result', 'data_con_func'): - if entry in params: - new_params.update({entry: params[entry]}) - result = self._handle_temp_sums(func=db_addon_fct, database_item=database_item, year=params.get('year'), month=params.get('month'), ignore_value_list=params.get('ignore_value_list'), params=new_params) - # handle everything else else: result = self._query_item(**params)[0][1] @@ -1213,7 +1208,7 @@ def handle_tagesmittel(): continue # handle minmax on-change items tagesmitteltemperatur_heute, minmax_heute_avg - if db_addon_fct in ['tagesmitteltemperatur_heute', 'minmax_heute_avg']: + if db_addon_fct in TAGESMITTEL_ATTRIBUTES_ONCHANGE: new_value = handle_tagesmittel() # handle minmax on-change items like minmax_heute_max, minmax_heute_min, minmax_woche_max, minmax_woche_min..... @@ -1326,6 +1321,7 @@ def gruenlandtemperatursumme(self, item_path: str, year: Union[int, str] = None, :param item_path: item object or item_id for which the query should be done :param year: year the gruenlandtemperatursumme should be calculated for + :param ignore_value_list: list of comparison operators for val_num, which will be applied during query :return: gruenlandtemperatursumme """ @@ -1341,6 +1337,7 @@ def waermesumme(self, item_path: str, year: Union[int, str] = None, month: Union :param item_path: item object or item_id for which the query should be done :param year: year the waermesumme should be calculated for :param month: month the waermesumme should be calculated for + :param ignore_value_list: list of comparison operators for val_num, which will be applied during query :param threshold: threshold for temperature :return: waermesumme """ @@ -1357,6 +1354,7 @@ def kaeltesumme(self, item_path: str, year: Union[int, str] = None, month: Union :param item_path: item object or item_id for which the query should be done :param year: year the kaeltesumme should be calculated for :param month: month the kaeltesumme should be calculated for + :param ignore_value_list: list of comparison operators for val_num, which will be applied during query :return: kaeltesumme """ @@ -1371,6 +1369,7 @@ def wachstumsgradtage(self, item_path: str, year: Union[int, str] = None, ignore :param item_path: item object or item_id for which the query should be done :param year: year the wachstumsgradtage should be calculated for + :param ignore_value_list: list of comparison operators for val_num, which will be applied during query :param variant: variant to be used :param threshold: Temperature in °C as threshold: Ein Tage mit einer Tagesdurchschnittstemperatur oberhalb des Schwellenwertes gilt als Wachstumsgradtag :return: wachstumsgradtage @@ -1386,6 +1385,7 @@ def temperaturserie(self, item_path: str, year: Union[int, str] = None, ignore_v :param item_path: item object or item_id for which the query should be done :param year: year the wachstumsgradtage should be calculated for + :param ignore_value_list: list of comparison operators for val_num, which will be applied during query :param data_con_func: data concentration function :return: temperature series """ @@ -1395,6 +1395,21 @@ def temperaturserie(self, item_path: str, year: Union[int, str] = None, ignore_v return self._handle_temp_sums(func='temperaturserie', database_item=item, year=year, ignore_value_list=ignore_value_list, params={'data_con_func': data_con_func}) def query_item(self, func: str, item_path: str, timeframe: str, start: int = None, end: int = 0, group: str = None, group2: str = None, ignore_value_list=None) -> list: + """ + Query database, format response and return it + + :param func: function, defined in query_item method to be used at query + :param item_path: item str or item_id for which the query should be done + :param timeframe: time increment für definition of start, end, count (day, week, month, year) + :param start: start of timeframe (oldest) for query given in x time increments (default = None, meaning complete database) + :param end: end of timeframe (newest) for query given in x time increments (default = 0, meaning today, end of last week, end of last month, end of last year) + :param group: first grouping parameter (default = None, possible values: day, week, month, year) + :param group2: second grouping parameter (default = None, possible values: day, week, month, year) + :param ignore_value_list: list of comparison operators for val_num, which will be applied during query + + :return: formatted query response + """ + item = self.items.return_item(item_path) if item is None: return [] @@ -1405,7 +1420,7 @@ def fetch_log(self, func: str, item_path: str, timeframe: str, start: int = None """ Query database, format response and return it - :param func: function to be used at query + :param func: sql function to be used at query :param item_path: item str or item_id for which the query should be done :param timeframe: time increment für definition of start, end, count (day, week, month, year) :param start: start of timeframe (oldest) for query given in x time increments (default = None, meaning complete database) @@ -1562,7 +1577,7 @@ def _handle_verbrauch_serie(self, query_params: dict) -> list: timeframe = query_params['timeframe'] start = query_params['start'] - for i in range(1, start): + for i in range(start, 1, -1): value = self._handle_verbrauch({'database_item': database_item, 'timeframe': timeframe, 'start': i + 1, 'end': i}) ts_start, ts_end = self._get_start_end_as_timestamp(timeframe, i, i + 1) series.append([ts_end, value]) @@ -1621,14 +1636,14 @@ def _handle_zaehlerstand_serie(self, query_params: dict) -> list: timeframe = query_params['timeframe'] start = query_params['start'] - for i in range(1, start): + for i in range(start, 1, -1): value = self._handle_zaehlerstand({'database_item': database_item, 'timeframe': timeframe, 'start': i, 'end': i}) ts_start = self._get_start_end_as_timestamp(timeframe, i, i)[0] series.append([ts_start, value]) return series - def _handle_temp_sums(self, func: str, database_item: Item, year: Union[int, str] = None, month: Union[int, str] = None, ignore_value_list: list = None, params: dict = {}) -> Union[list, None]: + def _handle_temp_sums(self, func: str, database_item: Item, year: Union[int, str] = None, month: Union[int, str] = None, ignore_value_list: list = None, params: dict = None) -> Union[list, None]: """ Calculates diverse temperature sums and day counts @@ -1676,6 +1691,9 @@ def _handle_temp_sums(self, func: str, database_item: Item, year: Union[int, str 'eistage': {'start_end': timeframe[3], 'data_con_func': 'minmax_day'}, } + if not params: + params = dict() + def kaeltesumme() -> float: """Berechnung der Kältesumme durch Akkumulieren aller negativen Tagesdurchschnittstemperaturen im Abfragezeitraum @@ -1901,6 +1919,10 @@ def _prepare_value_list(self, database_item: Item, timeframe: str, start: int, e - first_hour: determines first value per hour of values within plugin - minmax_day: determines min and max value per day of values within plugin - minmax_hour: determines min and max value per hour of values within plugin + - min_day: determines min value per day of values within plugin + - max_hour: determines max value per hour of values within plugin + - min_day: determines min value per day of values within plugin + - max_hour: determines max value per hour of values within plugin - first_hour_avg_day: 2-step concentration: 1) concentrate values within an hour by using first value 2) concentrate values by average for first value of each hour :return: list of list with [timestamp, value] """ @@ -1936,6 +1958,8 @@ def _concentrate_values(option: str) -> list: 'first' will take first entry of list per datetime to get as close to value at full hour as possible 'avg' will use the calculated average of values in list per datetime 'minmax' will get min and max value of list per datetime + 'min' will get the min value of list per datetime + 'max' will get the min value of list per datetime """ _value_list = [] @@ -1948,12 +1972,16 @@ def _concentrate_values(option: str) -> list: _value_list.append([_timestamp, round(sum(value_dict[entry]) / len(value_dict[entry]), 2)]) elif option == 'minmax': _value_list.append([_timestamp, min(value_dict[entry]), max(value_dict[entry])]) + elif option == 'max': + _value_list.append([_timestamp, max(value_dict[entry])]) + elif option == 'min': + _value_list.append([_timestamp, min(value_dict[entry])]) return _value_list if self.debug_log.prepare: self.logger.debug(f'called with database_item={database_item.path()}, {timeframe=}, {start=}, {end=}, {ignore_value_list=}, {data_con_func=}') - if data_con_func not in ('avg', 'minmax', 'first', 'avg_day', 'avg_hour', 'minmax_day', 'minmax_hour', 'first_day','first_hour', 'first_hour_avg_day', 'avg_hour_avg_day'): + if data_con_func not in ('min', 'max', 'avg', 'minmax', 'first', 'avg_day', 'avg_hour', 'minmax_day', 'minmax_hour', 'first_day', 'first_hour', 'first_hour_avg_day', 'avg_hour_avg_day', 'min_hour', 'min_day', 'max_hour', 'max_day'): self.logger.warning(f"defined {data_con_func=} for _prepare_value_list unknown. Need to be 'avg', 'minmax', 'first', 'avg_day', 'avg_hour', 'minmax_day', 'minmax_hour', 'first_day','first_hour', 'first_hour_avg_day' or 'avg_hour_avg_day'. Aborting...") return @@ -2712,7 +2740,6 @@ def _fetchall(self, query: str, params: dict = None, cur=None) -> list: tuples = self._query(self._db.fetchall, query, params, cur) return None if tuples is None else list(tuples) - # ToDo: Check if still needed. def _query(self, fetch, query: str, params: dict = None, cur=None) -> Union[None, list]: """query using commit to get latest data from db""" @@ -2757,7 +2784,7 @@ def _query(self, fetch, query: str, params: dict = None, cur=None) -> Union[None return tuples # ToDo: Check if still needed. - def _query_geht_gut(self, fetch, query: str, params: dict = None, cur=None) -> Union[None, list]: + def _query_with_close(self, fetch, query: str, params: dict = None, cur=None) -> Union[None, list]: """query open and close connection for each query to get latest data from db""" if params is None: diff --git a/db_addon/item_attributes.py b/db_addon/item_attributes.py index e1d94b417..e28c243c2 100644 --- a/db_addon/item_attributes.py +++ b/db_addon/item_attributes.py @@ -28,26 +28,26 @@ # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # -ALL_ONCHANGE_ATTRIBUTES = ['verbrauch_heute', 'verbrauch_woche', 'verbrauch_monat', 'verbrauch_jahr', 'minmax_heute_min', 'minmax_heute_max', 'minmax_heute_avg', 'minmax_woche_min', 'minmax_woche_max', 'minmax_monat_min', 'minmax_monat_max', 'minmax_jahr_min', 'minmax_jahr_max', 'tagesmitteltemperatur_heute'] -ALL_DAILY_ATTRIBUTES = ['verbrauch_heute_minus1', 'verbrauch_heute_minus2', 'verbrauch_heute_minus3', 'verbrauch_heute_minus4', 'verbrauch_heute_minus5', 'verbrauch_heute_minus6', 'verbrauch_heute_minus7', 'verbrauch_rolling_12m_heute_minus1', 'verbrauch_jahreszeitraum_minus1', 'verbrauch_jahreszeitraum_minus2', 'verbrauch_jahreszeitraum_minus3', 'zaehlerstand_heute_minus1', 'zaehlerstand_heute_minus2', 'zaehlerstand_heute_minus3', 'minmax_last_24h_min', 'minmax_last_24h_max', 'minmax_last_24h_avg', 'minmax_last_7d_min', 'minmax_last_7d_max', 'minmax_last_7d_avg', 'minmax_heute_minus1_min', 'minmax_heute_minus1_max', 'minmax_heute_minus1_avg', 'minmax_heute_minus2_min', 'minmax_heute_minus2_max', 'minmax_heute_minus2_avg', 'minmax_heute_minus3_min', 'minmax_heute_minus3_max', 'minmax_heute_minus3_avg', 'tagesmitteltemperatur_heute_minus1', 'tagesmitteltemperatur_heute_minus2', 'tagesmitteltemperatur_heute_minus3', 'serie_minmax_tag_min_30d', 'serie_minmax_tag_max_30d', 'serie_minmax_tag_avg_30d', 'serie_verbrauch_tag_30d', 'serie_zaehlerstand_tag_30d', 'serie_tagesmittelwert_0d', 'serie_tagesmittelwert_stunde_0d', 'serie_tagesmittelwert_stunde_30_0d', 'serie_tagesmittelwert_tag_stunde_30d', 'kaeltesumme', 'waermesumme', 'gruenlandtempsumme', 'wachstumsgradtage', 'wuestentage', 'heisse_tage', 'tropennaechte', 'sommertage', 'heiztage', 'vegetationstage', 'frosttage', 'eistage', 'tagesmitteltemperatur'] +ALL_ONCHANGE_ATTRIBUTES = ['verbrauch_heute', 'verbrauch_tag', 'verbrauch_woche', 'verbrauch_monat', 'verbrauch_jahr', 'minmax_heute_min', 'minmax_heute_max', 'minmax_heute_avg', 'minmax_tag_min', 'minmax_tag_max', 'minmax_tag_avg', 'minmax_woche_min', 'minmax_woche_max', 'minmax_monat_min', 'minmax_monat_max', 'minmax_jahr_min', 'minmax_jahr_max', 'tagesmitteltemperatur_heute', 'tagesmitteltemperatur_tag'] +ALL_DAILY_ATTRIBUTES = ['verbrauch_heute_minus1', 'verbrauch_heute_minus2', 'verbrauch_heute_minus3', 'verbrauch_heute_minus4', 'verbrauch_heute_minus5', 'verbrauch_heute_minus6', 'verbrauch_heute_minus7', 'verbrauch_heute_minus8', 'verbrauch_tag_minus1', 'verbrauch_tag_minus2', 'verbrauch_tag_minus3', 'verbrauch_tag_minus4', 'verbrauch_tag_minus5', 'verbrauch_tag_minus6', 'verbrauch_tag_minus7', 'verbrauch_tag_minus8', 'verbrauch_rolling_12m_heute_minus1', 'verbrauch_rolling_12m_tag_minus1', 'verbrauch_jahreszeitraum_minus1', 'verbrauch_jahreszeitraum_minus2', 'verbrauch_jahreszeitraum_minus3', 'zaehlerstand_heute_minus1', 'zaehlerstand_heute_minus2', 'zaehlerstand_heute_minus3', 'zaehlerstand_tag_minus1', 'zaehlerstand_tag_minus2', 'zaehlerstand_tag_minus3', 'minmax_last_24h_min', 'minmax_last_24h_max', 'minmax_last_24h_avg', 'minmax_last_7d_min', 'minmax_last_7d_max', 'minmax_last_7d_avg', 'minmax_heute_minus1_min', 'minmax_heute_minus1_max', 'minmax_heute_minus1_avg', 'minmax_heute_minus2_min', 'minmax_heute_minus2_max', 'minmax_heute_minus2_avg', 'minmax_heute_minus3_min', 'minmax_heute_minus3_max', 'minmax_heute_minus3_avg', 'minmax_tag_minus1_min', 'minmax_tag_minus1_max', 'minmax_tag_minus1_avg', 'minmax_tag_minus2_min', 'minmax_tag_minus2_max', 'minmax_tag_minus2_avg', 'minmax_tag_minus3_min', 'minmax_tag_minus3_max', 'minmax_tag_minus3_avg', 'tagesmitteltemperatur_heute_minus1', 'tagesmitteltemperatur_heute_minus2', 'tagesmitteltemperatur_heute_minus3', 'tagesmitteltemperatur_tag_minus1', 'tagesmitteltemperatur_tag_minus2', 'tagesmitteltemperatur_tag_minus3', 'serie_minmax_tag_min_30d', 'serie_minmax_tag_max_30d', 'serie_minmax_tag_avg_30d', 'serie_verbrauch_tag_30d', 'serie_zaehlerstand_tag_30d', 'serie_tagesmittelwert_0d', 'serie_tagesmittelwert_stunde_0d', 'serie_tagesmittelwert_stunde_30_0d', 'serie_tagesmittelwert_tag_stunde_30d', 'kaeltesumme', 'waermesumme', 'gruenlandtempsumme', 'wachstumsgradtage', 'wuestentage', 'heisse_tage', 'tropennaechte', 'sommertage', 'heiztage', 'vegetationstage', 'frosttage', 'eistage', 'tagesmitteltemperatur'] ALL_WEEKLY_ATTRIBUTES = ['verbrauch_woche_minus1', 'verbrauch_woche_minus2', 'verbrauch_woche_minus3', 'verbrauch_woche_minus4', 'verbrauch_rolling_12m_woche_minus1', 'zaehlerstand_woche_minus1', 'zaehlerstand_woche_minus2', 'zaehlerstand_woche_minus3', 'minmax_woche_minus1_min', 'minmax_woche_minus1_max', 'minmax_woche_minus1_avg', 'minmax_woche_minus2_min', 'minmax_woche_minus2_max', 'minmax_woche_minus2_avg', 'serie_minmax_woche_min_30w', 'serie_minmax_woche_max_30w', 'serie_minmax_woche_avg_30w', 'serie_verbrauch_woche_30w', 'serie_zaehlerstand_woche_30w'] ALL_MONTHLY_ATTRIBUTES = ['verbrauch_monat_minus1', 'verbrauch_monat_minus2', 'verbrauch_monat_minus3', 'verbrauch_monat_minus4', 'verbrauch_monat_minus12', 'verbrauch_rolling_12m_monat_minus1', 'zaehlerstand_monat_minus1', 'zaehlerstand_monat_minus2', 'zaehlerstand_monat_minus3', 'minmax_monat_minus1_min', 'minmax_monat_minus1_max', 'minmax_monat_minus1_avg', 'minmax_monat_minus2_min', 'minmax_monat_minus2_max', 'minmax_monat_minus2_avg', 'serie_minmax_monat_min_15m', 'serie_minmax_monat_max_15m', 'serie_minmax_monat_avg_15m', 'serie_verbrauch_monat_18m', 'serie_zaehlerstand_monat_18m', 'serie_waermesumme_monat_24m', 'serie_kaeltesumme_monat_24m'] ALL_YEARLY_ATTRIBUTES = ['verbrauch_jahr_minus1', 'verbrauch_jahr_minus2', 'verbrauch_rolling_12m_jahr_minus1', 'zaehlerstand_jahr_minus1', 'zaehlerstand_jahr_minus2', 'zaehlerstand_jahr_minus3', 'minmax_jahr_minus1_min', 'minmax_jahr_minus1_max', 'minmax_jahr_minus1_avg'] ALL_PARAMS_ATTRIBUTES = ['kaeltesumme', 'waermesumme', 'gruenlandtempsumme', 'wachstumsgradtage', 'wuestentage', 'heisse_tage', 'tropennaechte', 'sommertage', 'heiztage', 'vegetationstage', 'frosttage', 'eistage', 'tagesmitteltemperatur', 'db_request', 'minmax', 'minmax_last', 'verbrauch', 'zaehlerstand'] -ALL_VERBRAUCH_ATTRIBUTES = ['verbrauch_heute', 'verbrauch_woche', 'verbrauch_monat', 'verbrauch_jahr', 'verbrauch_heute_minus1', 'verbrauch_heute_minus2', 'verbrauch_heute_minus3', 'verbrauch_heute_minus4', 'verbrauch_heute_minus5', 'verbrauch_heute_minus6', 'verbrauch_heute_minus7', 'verbrauch_woche_minus1', 'verbrauch_woche_minus2', 'verbrauch_woche_minus3', 'verbrauch_woche_minus4', 'verbrauch_monat_minus1', 'verbrauch_monat_minus2', 'verbrauch_monat_minus3', 'verbrauch_monat_minus4', 'verbrauch_monat_minus12', 'verbrauch_jahr_minus1', 'verbrauch_jahr_minus2', 'verbrauch_rolling_12m_heute_minus1', 'verbrauch_rolling_12m_woche_minus1', 'verbrauch_rolling_12m_monat_minus1', 'verbrauch_rolling_12m_jahr_minus1', 'verbrauch_jahreszeitraum_minus1', 'verbrauch_jahreszeitraum_minus2', 'verbrauch_jahreszeitraum_minus3'] -VERBRAUCH_ATTRIBUTES_ONCHANGE = ['verbrauch_heute', 'verbrauch_woche', 'verbrauch_monat', 'verbrauch_jahr'] -VERBRAUCH_ATTRIBUTES_TIMEFRAME = ['verbrauch_heute_minus1', 'verbrauch_heute_minus2', 'verbrauch_heute_minus3', 'verbrauch_heute_minus4', 'verbrauch_heute_minus5', 'verbrauch_heute_minus6', 'verbrauch_heute_minus7', 'verbrauch_woche_minus1', 'verbrauch_woche_minus2', 'verbrauch_woche_minus3', 'verbrauch_woche_minus4', 'verbrauch_monat_minus1', 'verbrauch_monat_minus2', 'verbrauch_monat_minus3', 'verbrauch_monat_minus4', 'verbrauch_monat_minus12', 'verbrauch_jahr_minus1', 'verbrauch_jahr_minus2'] -VERBRAUCH_ATTRIBUTES_ROLLING = ['verbrauch_rolling_12m_heute_minus1', 'verbrauch_rolling_12m_woche_minus1', 'verbrauch_rolling_12m_monat_minus1', 'verbrauch_rolling_12m_jahr_minus1'] +ALL_VERBRAUCH_ATTRIBUTES = ['verbrauch_heute', 'verbrauch_tag', 'verbrauch_woche', 'verbrauch_monat', 'verbrauch_jahr', 'verbrauch_heute_minus1', 'verbrauch_heute_minus2', 'verbrauch_heute_minus3', 'verbrauch_heute_minus4', 'verbrauch_heute_minus5', 'verbrauch_heute_minus6', 'verbrauch_heute_minus7', 'verbrauch_heute_minus8', 'verbrauch_tag_minus1', 'verbrauch_tag_minus2', 'verbrauch_tag_minus3', 'verbrauch_tag_minus4', 'verbrauch_tag_minus5', 'verbrauch_tag_minus6', 'verbrauch_tag_minus7', 'verbrauch_tag_minus8', 'verbrauch_woche_minus1', 'verbrauch_woche_minus2', 'verbrauch_woche_minus3', 'verbrauch_woche_minus4', 'verbrauch_monat_minus1', 'verbrauch_monat_minus2', 'verbrauch_monat_minus3', 'verbrauch_monat_minus4', 'verbrauch_monat_minus12', 'verbrauch_jahr_minus1', 'verbrauch_jahr_minus2', 'verbrauch_rolling_12m_heute_minus1', 'verbrauch_rolling_12m_tag_minus1', 'verbrauch_rolling_12m_woche_minus1', 'verbrauch_rolling_12m_monat_minus1', 'verbrauch_rolling_12m_jahr_minus1', 'verbrauch_jahreszeitraum_minus1', 'verbrauch_jahreszeitraum_minus2', 'verbrauch_jahreszeitraum_minus3'] +VERBRAUCH_ATTRIBUTES_ONCHANGE = ['verbrauch_heute', 'verbrauch_tag', 'verbrauch_woche', 'verbrauch_monat', 'verbrauch_jahr'] +VERBRAUCH_ATTRIBUTES_TIMEFRAME = ['verbrauch_heute_minus1', 'verbrauch_heute_minus2', 'verbrauch_heute_minus3', 'verbrauch_heute_minus4', 'verbrauch_heute_minus5', 'verbrauch_heute_minus6', 'verbrauch_heute_minus7', 'verbrauch_heute_minus8', 'verbrauch_tag_minus1', 'verbrauch_tag_minus2', 'verbrauch_tag_minus3', 'verbrauch_tag_minus4', 'verbrauch_tag_minus5', 'verbrauch_tag_minus6', 'verbrauch_tag_minus7', 'verbrauch_tag_minus8', 'verbrauch_woche_minus1', 'verbrauch_woche_minus2', 'verbrauch_woche_minus3', 'verbrauch_woche_minus4', 'verbrauch_monat_minus1', 'verbrauch_monat_minus2', 'verbrauch_monat_minus3', 'verbrauch_monat_minus4', 'verbrauch_monat_minus12', 'verbrauch_jahr_minus1', 'verbrauch_jahr_minus2'] +VERBRAUCH_ATTRIBUTES_ROLLING = ['verbrauch_rolling_12m_heute_minus1', 'verbrauch_rolling_12m_tag_minus1', 'verbrauch_rolling_12m_woche_minus1', 'verbrauch_rolling_12m_monat_minus1', 'verbrauch_rolling_12m_jahr_minus1'] VERBRAUCH_ATTRIBUTES_JAHRESZEITRAUM = ['verbrauch_jahreszeitraum_minus1', 'verbrauch_jahreszeitraum_minus2', 'verbrauch_jahreszeitraum_minus3'] -ALL_ZAEHLERSTAND_ATTRIBUTES = ['zaehlerstand_heute_minus1', 'zaehlerstand_heute_minus2', 'zaehlerstand_heute_minus3', 'zaehlerstand_woche_minus1', 'zaehlerstand_woche_minus2', 'zaehlerstand_woche_minus3', 'zaehlerstand_monat_minus1', 'zaehlerstand_monat_minus2', 'zaehlerstand_monat_minus3', 'zaehlerstand_jahr_minus1', 'zaehlerstand_jahr_minus2', 'zaehlerstand_jahr_minus3'] -ZAEHLERSTAND_ATTRIBUTES_TIMEFRAME = ['zaehlerstand_heute_minus1', 'zaehlerstand_heute_minus2', 'zaehlerstand_heute_minus3', 'zaehlerstand_woche_minus1', 'zaehlerstand_woche_minus2', 'zaehlerstand_woche_minus3', 'zaehlerstand_monat_minus1', 'zaehlerstand_monat_minus2', 'zaehlerstand_monat_minus3', 'zaehlerstand_jahr_minus1', 'zaehlerstand_jahr_minus2', 'zaehlerstand_jahr_minus3'] -ALL_HISTORIE_ATTRIBUTES = ['minmax_last_24h_min', 'minmax_last_24h_max', 'minmax_last_24h_avg', 'minmax_last_7d_min', 'minmax_last_7d_max', 'minmax_last_7d_avg', 'minmax_heute_min', 'minmax_heute_max', 'minmax_heute_avg', 'minmax_heute_minus1_min', 'minmax_heute_minus1_max', 'minmax_heute_minus1_avg', 'minmax_heute_minus2_min', 'minmax_heute_minus2_max', 'minmax_heute_minus2_avg', 'minmax_heute_minus3_min', 'minmax_heute_minus3_max', 'minmax_heute_minus3_avg', 'minmax_woche_min', 'minmax_woche_max', 'minmax_woche_minus1_min', 'minmax_woche_minus1_max', 'minmax_woche_minus1_avg', 'minmax_woche_minus2_min', 'minmax_woche_minus2_max', 'minmax_woche_minus2_avg', 'minmax_monat_min', 'minmax_monat_max', 'minmax_monat_minus1_min', 'minmax_monat_minus1_max', 'minmax_monat_minus1_avg', 'minmax_monat_minus2_min', 'minmax_monat_minus2_max', 'minmax_monat_minus2_avg', 'minmax_jahr_min', 'minmax_jahr_max', 'minmax_jahr_minus1_min', 'minmax_jahr_minus1_max', 'minmax_jahr_minus1_avg'] -HISTORIE_ATTRIBUTES_ONCHANGE = ['minmax_heute_min', 'minmax_heute_max', 'minmax_heute_avg', 'minmax_woche_min', 'minmax_woche_max', 'minmax_monat_min', 'minmax_monat_max', 'minmax_jahr_min', 'minmax_jahr_max'] +ALL_ZAEHLERSTAND_ATTRIBUTES = ['zaehlerstand_heute_minus1', 'zaehlerstand_heute_minus2', 'zaehlerstand_heute_minus3', 'zaehlerstand_tag_minus1', 'zaehlerstand_tag_minus2', 'zaehlerstand_tag_minus3', 'zaehlerstand_woche_minus1', 'zaehlerstand_woche_minus2', 'zaehlerstand_woche_minus3', 'zaehlerstand_monat_minus1', 'zaehlerstand_monat_minus2', 'zaehlerstand_monat_minus3', 'zaehlerstand_jahr_minus1', 'zaehlerstand_jahr_minus2', 'zaehlerstand_jahr_minus3'] +ZAEHLERSTAND_ATTRIBUTES_TIMEFRAME = ['zaehlerstand_heute_minus1', 'zaehlerstand_heute_minus2', 'zaehlerstand_heute_minus3', 'zaehlerstand_tag_minus1', 'zaehlerstand_tag_minus2', 'zaehlerstand_tag_minus3', 'zaehlerstand_woche_minus1', 'zaehlerstand_woche_minus2', 'zaehlerstand_woche_minus3', 'zaehlerstand_monat_minus1', 'zaehlerstand_monat_minus2', 'zaehlerstand_monat_minus3', 'zaehlerstand_jahr_minus1', 'zaehlerstand_jahr_minus2', 'zaehlerstand_jahr_minus3'] +ALL_HISTORIE_ATTRIBUTES = ['minmax_last_24h_min', 'minmax_last_24h_max', 'minmax_last_24h_avg', 'minmax_last_7d_min', 'minmax_last_7d_max', 'minmax_last_7d_avg', 'minmax_heute_min', 'minmax_heute_max', 'minmax_heute_avg', 'minmax_heute_minus1_min', 'minmax_heute_minus1_max', 'minmax_heute_minus1_avg', 'minmax_heute_minus2_min', 'minmax_heute_minus2_max', 'minmax_heute_minus2_avg', 'minmax_heute_minus3_min', 'minmax_heute_minus3_max', 'minmax_heute_minus3_avg', 'minmax_tag_min', 'minmax_tag_max', 'minmax_tag_avg', 'minmax_tag_minus1_min', 'minmax_tag_minus1_max', 'minmax_tag_minus1_avg', 'minmax_tag_minus2_min', 'minmax_tag_minus2_max', 'minmax_tag_minus2_avg', 'minmax_tag_minus3_min', 'minmax_tag_minus3_max', 'minmax_tag_minus3_avg', 'minmax_woche_min', 'minmax_woche_max', 'minmax_woche_minus1_min', 'minmax_woche_minus1_max', 'minmax_woche_minus1_avg', 'minmax_woche_minus2_min', 'minmax_woche_minus2_max', 'minmax_woche_minus2_avg', 'minmax_monat_min', 'minmax_monat_max', 'minmax_monat_minus1_min', 'minmax_monat_minus1_max', 'minmax_monat_minus1_avg', 'minmax_monat_minus2_min', 'minmax_monat_minus2_max', 'minmax_monat_minus2_avg', 'minmax_jahr_min', 'minmax_jahr_max', 'minmax_jahr_minus1_min', 'minmax_jahr_minus1_max', 'minmax_jahr_minus1_avg'] +HISTORIE_ATTRIBUTES_ONCHANGE = ['minmax_heute_min', 'minmax_heute_max', 'minmax_heute_avg', 'minmax_tag_min', 'minmax_tag_max', 'minmax_tag_avg', 'minmax_woche_min', 'minmax_woche_max', 'minmax_monat_min', 'minmax_monat_max', 'minmax_jahr_min', 'minmax_jahr_max'] HISTORIE_ATTRIBUTES_LAST = ['minmax_last_24h_min', 'minmax_last_24h_max', 'minmax_last_24h_avg', 'minmax_last_7d_min', 'minmax_last_7d_max', 'minmax_last_7d_avg'] -HISTORIE_ATTRIBUTES_TIMEFRAME = ['minmax_heute_minus1_min', 'minmax_heute_minus1_max', 'minmax_heute_minus1_avg', 'minmax_heute_minus2_min', 'minmax_heute_minus2_max', 'minmax_heute_minus2_avg', 'minmax_heute_minus3_min', 'minmax_heute_minus3_max', 'minmax_heute_minus3_avg', 'minmax_woche_minus1_min', 'minmax_woche_minus1_max', 'minmax_woche_minus1_avg', 'minmax_woche_minus2_min', 'minmax_woche_minus2_max', 'minmax_woche_minus2_avg', 'minmax_monat_minus1_min', 'minmax_monat_minus1_max', 'minmax_monat_minus1_avg', 'minmax_monat_minus2_min', 'minmax_monat_minus2_max', 'minmax_monat_minus2_avg', 'minmax_jahr_minus1_min', 'minmax_jahr_minus1_max', 'minmax_jahr_minus1_avg'] -ALL_TAGESMITTEL_ATTRIBUTES = ['tagesmitteltemperatur_heute', 'tagesmitteltemperatur_heute_minus1', 'tagesmitteltemperatur_heute_minus2', 'tagesmitteltemperatur_heute_minus3'] -TAGESMITTEL_ATTRIBUTES_ONCHANGE = ['tagesmitteltemperatur_heute'] -TAGESMITTEL_ATTRIBUTES_TIMEFRAME = ['tagesmitteltemperatur_heute_minus1', 'tagesmitteltemperatur_heute_minus2', 'tagesmitteltemperatur_heute_minus3'] +HISTORIE_ATTRIBUTES_TIMEFRAME = ['minmax_heute_minus1_min', 'minmax_heute_minus1_max', 'minmax_heute_minus1_avg', 'minmax_heute_minus2_min', 'minmax_heute_minus2_max', 'minmax_heute_minus2_avg', 'minmax_heute_minus3_min', 'minmax_heute_minus3_max', 'minmax_heute_minus3_avg', 'minmax_tag_minus1_min', 'minmax_tag_minus1_max', 'minmax_tag_minus1_avg', 'minmax_tag_minus2_min', 'minmax_tag_minus2_max', 'minmax_tag_minus2_avg', 'minmax_tag_minus3_min', 'minmax_tag_minus3_max', 'minmax_tag_minus3_avg', 'minmax_woche_minus1_min', 'minmax_woche_minus1_max', 'minmax_woche_minus1_avg', 'minmax_woche_minus2_min', 'minmax_woche_minus2_max', 'minmax_woche_minus2_avg', 'minmax_monat_minus1_min', 'minmax_monat_minus1_max', 'minmax_monat_minus1_avg', 'minmax_monat_minus2_min', 'minmax_monat_minus2_max', 'minmax_monat_minus2_avg', 'minmax_jahr_minus1_min', 'minmax_jahr_minus1_max', 'minmax_jahr_minus1_avg'] +ALL_TAGESMITTEL_ATTRIBUTES = ['tagesmitteltemperatur_heute', 'tagesmitteltemperatur_heute_minus1', 'tagesmitteltemperatur_heute_minus2', 'tagesmitteltemperatur_heute_minus3', 'tagesmitteltemperatur_tag', 'tagesmitteltemperatur_tag_minus1', 'tagesmitteltemperatur_tag_minus2', 'tagesmitteltemperatur_tag_minus3'] +TAGESMITTEL_ATTRIBUTES_ONCHANGE = ['tagesmitteltemperatur_heute', 'tagesmitteltemperatur_tag', 'minmax_heute_avg', 'minmax_tag_avg'] +TAGESMITTEL_ATTRIBUTES_TIMEFRAME = ['tagesmitteltemperatur_heute_minus1', 'tagesmitteltemperatur_heute_minus2', 'tagesmitteltemperatur_heute_minus3', 'tagesmitteltemperatur_tag_minus1', 'tagesmitteltemperatur_tag_minus2', 'tagesmitteltemperatur_tag_minus3'] ALL_SERIE_ATTRIBUTES = ['serie_minmax_monat_min_15m', 'serie_minmax_monat_max_15m', 'serie_minmax_monat_avg_15m', 'serie_minmax_woche_min_30w', 'serie_minmax_woche_max_30w', 'serie_minmax_woche_avg_30w', 'serie_minmax_tag_min_30d', 'serie_minmax_tag_max_30d', 'serie_minmax_tag_avg_30d', 'serie_verbrauch_tag_30d', 'serie_verbrauch_woche_30w', 'serie_verbrauch_monat_18m', 'serie_zaehlerstand_tag_30d', 'serie_zaehlerstand_woche_30w', 'serie_zaehlerstand_monat_18m', 'serie_waermesumme_monat_24m', 'serie_kaeltesumme_monat_24m', 'serie_tagesmittelwert_0d', 'serie_tagesmittelwert_stunde_0d', 'serie_tagesmittelwert_stunde_30_0d', 'serie_tagesmittelwert_tag_stunde_30d'] SERIE_ATTRIBUTES_MINMAX = ['serie_minmax_monat_min_15m', 'serie_minmax_monat_max_15m', 'serie_minmax_monat_avg_15m', 'serie_minmax_woche_min_30w', 'serie_minmax_woche_max_30w', 'serie_minmax_woche_avg_30w', 'serie_minmax_tag_min_30d', 'serie_minmax_tag_max_30d', 'serie_minmax_tag_avg_30d'] SERIE_ATTRIBUTES_ZAEHLERSTAND = ['serie_zaehlerstand_tag_30d', 'serie_zaehlerstand_woche_30w', 'serie_zaehlerstand_monat_18m'] diff --git a/db_addon/item_attributes_master.py b/db_addon/item_attributes_master.py index cdf36d71c..ae6855bca 100644 --- a/db_addon/item_attributes_master.py +++ b/db_addon/item_attributes_master.py @@ -27,11 +27,12 @@ DOC_FILE_NAME = 'user_doc.rst' -PLUGIN_VERSION = '1.2.3' +PLUGIN_VERSION = '1.2.4' ITEM_ATTRIBUTES = { 'db_addon_fct': { 'verbrauch_heute': {'cat': 'verbrauch', 'sub_cat': 'onchange', 'item_type': 'num', 'calc': 'onchange', 'params': False, 'description': 'Verbrauch am heutigen Tag (Differenz zwischen aktuellem Wert und den Wert am Ende des vorherigen Tages)'}, + 'verbrauch_tag': {'cat': 'verbrauch', 'sub_cat': 'onchange', 'item_type': 'num', 'calc': 'onchange', 'params': False, 'description': 'Verbrauch am heutigen Tag (Differenz zwischen aktuellem Wert und den Wert am Ende des vorherigen Tages)'}, 'verbrauch_woche': {'cat': 'verbrauch', 'sub_cat': 'onchange', 'item_type': 'num', 'calc': 'onchange', 'params': False, 'description': 'Verbrauch in der aktuellen Woche'}, 'verbrauch_monat': {'cat': 'verbrauch', 'sub_cat': 'onchange', 'item_type': 'num', 'calc': 'onchange', 'params': False, 'description': 'Verbrauch im aktuellen Monat'}, 'verbrauch_jahr': {'cat': 'verbrauch', 'sub_cat': 'onchange', 'item_type': 'num', 'calc': 'onchange', 'params': False, 'description': 'Verbrauch im aktuellen Jahr'}, @@ -42,6 +43,15 @@ 'verbrauch_heute_minus5': {'cat': 'verbrauch', 'sub_cat': 'timeframe', 'item_type': 'num', 'calc': 'daily', 'params': False, 'description': 'Verbrauch heute -5 Tage'}, 'verbrauch_heute_minus6': {'cat': 'verbrauch', 'sub_cat': 'timeframe', 'item_type': 'num', 'calc': 'daily', 'params': False, 'description': 'Verbrauch heute -6 Tage'}, 'verbrauch_heute_minus7': {'cat': 'verbrauch', 'sub_cat': 'timeframe', 'item_type': 'num', 'calc': 'daily', 'params': False, 'description': 'Verbrauch heute -7 Tage'}, + 'verbrauch_heute_minus8': {'cat': 'verbrauch', 'sub_cat': 'timeframe', 'item_type': 'num', 'calc': 'daily', 'params': False, 'description': 'Verbrauch heute -8 Tage'}, + 'verbrauch_tag_minus1': {'cat': 'verbrauch', 'sub_cat': 'timeframe', 'item_type': 'num', 'calc': 'daily', 'params': False, 'description': 'Verbrauch gestern (heute -1 Tag) (Differenz zwischen Wert am Ende des gestrigen Tages und dem Wert am Ende des Tages davor)'}, + 'verbrauch_tag_minus2': {'cat': 'verbrauch', 'sub_cat': 'timeframe', 'item_type': 'num', 'calc': 'daily', 'params': False, 'description': 'Verbrauch vorgestern (heute -2 Tage)'}, + 'verbrauch_tag_minus3': {'cat': 'verbrauch', 'sub_cat': 'timeframe', 'item_type': 'num', 'calc': 'daily', 'params': False, 'description': 'Verbrauch heute -3 Tage'}, + 'verbrauch_tag_minus4': {'cat': 'verbrauch', 'sub_cat': 'timeframe', 'item_type': 'num', 'calc': 'daily', 'params': False, 'description': 'Verbrauch heute -4 Tage'}, + 'verbrauch_tag_minus5': {'cat': 'verbrauch', 'sub_cat': 'timeframe', 'item_type': 'num', 'calc': 'daily', 'params': False, 'description': 'Verbrauch heute -5 Tage'}, + 'verbrauch_tag_minus6': {'cat': 'verbrauch', 'sub_cat': 'timeframe', 'item_type': 'num', 'calc': 'daily', 'params': False, 'description': 'Verbrauch heute -6 Tage'}, + 'verbrauch_tag_minus7': {'cat': 'verbrauch', 'sub_cat': 'timeframe', 'item_type': 'num', 'calc': 'daily', 'params': False, 'description': 'Verbrauch heute -7 Tage'}, + 'verbrauch_tag_minus8': {'cat': 'verbrauch', 'sub_cat': 'timeframe', 'item_type': 'num', 'calc': 'daily', 'params': False, 'description': 'Verbrauch heute -8 Tage'}, 'verbrauch_woche_minus1': {'cat': 'verbrauch', 'sub_cat': 'timeframe', 'item_type': 'num', 'calc': 'weekly', 'params': False, 'description': 'Verbrauch Vorwoche (aktuelle Woche -1)'}, 'verbrauch_woche_minus2': {'cat': 'verbrauch', 'sub_cat': 'timeframe', 'item_type': 'num', 'calc': 'weekly', 'params': False, 'description': 'Verbrauch aktuelle Woche -2 Wochen'}, 'verbrauch_woche_minus3': {'cat': 'verbrauch', 'sub_cat': 'timeframe', 'item_type': 'num', 'calc': 'weekly', 'params': False, 'description': 'Verbrauch aktuelle Woche -3 Wochen'}, @@ -54,6 +64,7 @@ 'verbrauch_jahr_minus1': {'cat': 'verbrauch', 'sub_cat': 'timeframe', 'item_type': 'num', 'calc': 'yearly', 'params': False, 'description': 'Verbrauch Vorjahr (aktuelles Jahr -1 Jahr)'}, 'verbrauch_jahr_minus2': {'cat': 'verbrauch', 'sub_cat': 'timeframe', 'item_type': 'num', 'calc': 'yearly', 'params': False, 'description': 'Verbrauch aktuelles Jahr -2 Jahre'}, 'verbrauch_rolling_12m_heute_minus1': {'cat': 'verbrauch', 'sub_cat': 'rolling', 'item_type': 'num', 'calc': 'daily', 'params': False, 'description': 'Verbrauch der letzten 12 Monate ausgehend im Ende des letzten Tages'}, + 'verbrauch_rolling_12m_tag_minus1': {'cat': 'verbrauch', 'sub_cat': 'rolling', 'item_type': 'num', 'calc': 'daily', 'params': False, 'description': 'Verbrauch der letzten 12 Monate ausgehend im Ende des letzten Tages'}, 'verbrauch_rolling_12m_woche_minus1': {'cat': 'verbrauch', 'sub_cat': 'rolling', 'item_type': 'num', 'calc': 'weekly', 'params': False, 'description': 'Verbrauch der letzten 12 Monate ausgehend im Ende der letzten Woche'}, 'verbrauch_rolling_12m_monat_minus1': {'cat': 'verbrauch', 'sub_cat': 'rolling', 'item_type': 'num', 'calc': 'monthly', 'params': False, 'description': 'Verbrauch der letzten 12 Monate ausgehend im Ende des letzten Monats'}, 'verbrauch_rolling_12m_jahr_minus1': {'cat': 'verbrauch', 'sub_cat': 'rolling', 'item_type': 'num', 'calc': 'yearly', 'params': False, 'description': 'Verbrauch der letzten 12 Monate ausgehend im Ende des letzten Jahres'}, @@ -63,6 +74,9 @@ 'zaehlerstand_heute_minus1': {'cat': 'zaehler', 'sub_cat': 'timeframe', 'item_type': 'num', 'calc': 'daily', 'params': False, 'description': 'Zählerstand / Wert am Ende des letzten Tages (heute -1 Tag)'}, 'zaehlerstand_heute_minus2': {'cat': 'zaehler', 'sub_cat': 'timeframe', 'item_type': 'num', 'calc': 'daily', 'params': False, 'description': 'Zählerstand / Wert am Ende des vorletzten Tages (heute -2 Tag)'}, 'zaehlerstand_heute_minus3': {'cat': 'zaehler', 'sub_cat': 'timeframe', 'item_type': 'num', 'calc': 'daily', 'params': False, 'description': 'Zählerstand / Wert am Ende des vorvorletzten Tages (heute -3 Tag)'}, + 'zaehlerstand_tag_minus1': {'cat': 'zaehler', 'sub_cat': 'timeframe', 'item_type': 'num', 'calc': 'daily', 'params': False, 'description': 'Zählerstand / Wert am Ende des letzten Tages (heute -1 Tag)'}, + 'zaehlerstand_tag_minus2': {'cat': 'zaehler', 'sub_cat': 'timeframe', 'item_type': 'num', 'calc': 'daily', 'params': False, 'description': 'Zählerstand / Wert am Ende des vorletzten Tages (heute -2 Tag)'}, + 'zaehlerstand_tag_minus3': {'cat': 'zaehler', 'sub_cat': 'timeframe', 'item_type': 'num', 'calc': 'daily', 'params': False, 'description': 'Zählerstand / Wert am Ende des vorvorletzten Tages (heute -3 Tag)'}, 'zaehlerstand_woche_minus1': {'cat': 'zaehler', 'sub_cat': 'timeframe', 'item_type': 'num', 'calc': 'weekly', 'params': False, 'description': 'Zählerstand / Wert am Ende der vorvorletzten Woche (aktuelle Woche -1 Woche)'}, 'zaehlerstand_woche_minus2': {'cat': 'zaehler', 'sub_cat': 'timeframe', 'item_type': 'num', 'calc': 'weekly', 'params': False, 'description': 'Zählerstand / Wert am Ende der vorletzten Woche (aktuelle Woche -2 Wochen)'}, 'zaehlerstand_woche_minus3': {'cat': 'zaehler', 'sub_cat': 'timeframe', 'item_type': 'num', 'calc': 'weekly', 'params': False, 'description': 'Zählerstand / Wert am Ende der aktuellen Woche -3 Wochen'}, @@ -90,6 +104,18 @@ 'minmax_heute_minus3_min': {'cat': 'wertehistorie', 'sub_cat': 'timeframe', 'item_type': 'num', 'calc': 'daily', 'params': False, 'description': 'Minimalwert heute vor 3 Tagen'}, 'minmax_heute_minus3_max': {'cat': 'wertehistorie', 'sub_cat': 'timeframe', 'item_type': 'num', 'calc': 'daily', 'params': False, 'description': 'Maximalwert heute vor 3 Tagen'}, 'minmax_heute_minus3_avg': {'cat': 'wertehistorie', 'sub_cat': 'timeframe', 'item_type': 'num', 'calc': 'daily', 'params': False, 'description': 'Durchschnittswert heute vor 3 Tagen'}, + 'minmax_tag_min': {'cat': 'wertehistorie', 'sub_cat': 'onchange', 'item_type': 'num', 'calc': 'onchange', 'params': False, 'description': 'Minimalwert seit Tagesbeginn'}, + 'minmax_tag_max': {'cat': 'wertehistorie', 'sub_cat': 'onchange', 'item_type': 'num', 'calc': 'onchange', 'params': False, 'description': 'Maximalwert seit Tagesbeginn'}, + 'minmax_tag_avg': {'cat': 'wertehistorie', 'sub_cat': 'onchange', 'item_type': 'num', 'calc': 'onchange', 'params': False, 'description': 'Durschnittswert seit Tagesbeginn'}, + 'minmax_tag_minus1_min': {'cat': 'wertehistorie', 'sub_cat': 'timeframe', 'item_type': 'num', 'calc': 'daily', 'params': False, 'description': 'Minimalwert gestern (heute -1 Tag)'}, + 'minmax_tag_minus1_max': {'cat': 'wertehistorie', 'sub_cat': 'timeframe', 'item_type': 'num', 'calc': 'daily', 'params': False, 'description': 'Maximalwert gestern (heute -1 Tag)'}, + 'minmax_tag_minus1_avg': {'cat': 'wertehistorie', 'sub_cat': 'timeframe', 'item_type': 'num', 'calc': 'daily', 'params': False, 'description': 'Durchschnittswert gestern (heute -1 Tag)'}, + 'minmax_tag_minus2_min': {'cat': 'wertehistorie', 'sub_cat': 'timeframe', 'item_type': 'num', 'calc': 'daily', 'params': False, 'description': 'Minimalwert vorgestern (heute -2 Tage)'}, + 'minmax_tag_minus2_max': {'cat': 'wertehistorie', 'sub_cat': 'timeframe', 'item_type': 'num', 'calc': 'daily', 'params': False, 'description': 'Maximalwert vorgestern (heute -2 Tage)'}, + 'minmax_tag_minus2_avg': {'cat': 'wertehistorie', 'sub_cat': 'timeframe', 'item_type': 'num', 'calc': 'daily', 'params': False, 'description': 'Durchschnittswert vorgestern (heute -2 Tage)'}, + 'minmax_tag_minus3_min': {'cat': 'wertehistorie', 'sub_cat': 'timeframe', 'item_type': 'num', 'calc': 'daily', 'params': False, 'description': 'Minimalwert heute vor 3 Tagen'}, + 'minmax_tag_minus3_max': {'cat': 'wertehistorie', 'sub_cat': 'timeframe', 'item_type': 'num', 'calc': 'daily', 'params': False, 'description': 'Maximalwert heute vor 3 Tagen'}, + 'minmax_tag_minus3_avg': {'cat': 'wertehistorie', 'sub_cat': 'timeframe', 'item_type': 'num', 'calc': 'daily', 'params': False, 'description': 'Durchschnittswert heute vor 3 Tagen'}, 'minmax_woche_min': {'cat': 'wertehistorie', 'sub_cat': 'onchange', 'item_type': 'num', 'calc': 'onchange', 'params': False, 'description': 'Minimalwert seit Wochenbeginn'}, 'minmax_woche_max': {'cat': 'wertehistorie', 'sub_cat': 'onchange', 'item_type': 'num', 'calc': 'onchange', 'params': False, 'description': 'Maximalwert seit Wochenbeginn'}, 'minmax_woche_minus1_min': {'cat': 'wertehistorie', 'sub_cat': 'timeframe', 'item_type': 'num', 'calc': 'weekly', 'params': False, 'description': 'Minimalwert Vorwoche (aktuelle Woche -1)'}, @@ -115,6 +141,10 @@ 'tagesmitteltemperatur_heute_minus1': {'cat': 'tagesmittel', 'sub_cat': 'timeframe', 'item_type': 'num', 'calc': 'daily', 'params': False, 'description': 'Tagesmitteltemperatur des letzten Tages (heute -1 Tag)'}, 'tagesmitteltemperatur_heute_minus2': {'cat': 'tagesmittel', 'sub_cat': 'timeframe', 'item_type': 'num', 'calc': 'daily', 'params': False, 'description': 'Tagesmitteltemperatur des vorletzten Tages (heute -2 Tag)'}, 'tagesmitteltemperatur_heute_minus3': {'cat': 'tagesmittel', 'sub_cat': 'timeframe', 'item_type': 'num', 'calc': 'daily', 'params': False, 'description': 'Tagesmitteltemperatur des vorvorletzten Tages (heute -3 Tag)'}, + 'tagesmitteltemperatur_tag': {'cat': 'tagesmittel', 'sub_cat': 'onchange', 'item_type': 'num', 'calc': 'onchange', 'params': False, 'description': 'Tagesmitteltemperatur heute'}, + 'tagesmitteltemperatur_tag_minus1': {'cat': 'tagesmittel', 'sub_cat': 'timeframe', 'item_type': 'num', 'calc': 'daily', 'params': False, 'description': 'Tagesmitteltemperatur des letzten Tages (heute -1 Tag)'}, + 'tagesmitteltemperatur_tag_minus2': {'cat': 'tagesmittel', 'sub_cat': 'timeframe', 'item_type': 'num', 'calc': 'daily', 'params': False, 'description': 'Tagesmitteltemperatur des vorletzten Tages (heute -2 Tag)'}, + 'tagesmitteltemperatur_tag_minus3': {'cat': 'tagesmittel', 'sub_cat': 'timeframe', 'item_type': 'num', 'calc': 'daily', 'params': False, 'description': 'Tagesmitteltemperatur des vorvorletzten Tages (heute -3 Tag)'}, 'serie_minmax_monat_min_15m': {'cat': 'serie', 'sub_cat': 'minmax', 'item_type': 'list', 'calc': 'monthly', 'params': False, 'description': 'monatlicher Minimalwert der letzten 15 Monate (gleitend)'}, 'serie_minmax_monat_max_15m': {'cat': 'serie', 'sub_cat': 'minmax', 'item_type': 'list', 'calc': 'monthly', 'params': False, 'description': 'monatlicher Maximalwert der letzten 15 Monate (gleitend)'}, 'serie_minmax_monat_avg_15m': {'cat': 'serie', 'sub_cat': 'minmax', 'item_type': 'list', 'calc': 'monthly', 'params': False, 'description': 'monatlicher Mittelwert der letzten 15 Monate (gleitend)'}, @@ -248,6 +278,11 @@ def export_item_attributes_py(): ATTRS['ALL_GEN_ATTRIBUTES'] = get_attrs(sub_dict={'cat': 'gen'}) ATTRS['ALL_SUMME_ATTRIBUTES'] = get_attrs(sub_dict={'cat': 'summe'}) ATTRS['ALL_COMPLEX_ATTRIBUTES'] = get_attrs(sub_dict={'cat': 'complex'}) + ATTRS['TAGESMITTEL_ATTRIBUTES_ONCHANGE'] = get_attrs(sub_dict={'cat': 'tagesmittel', 'sub_cat': 'onchange'}) + + for entry in ATTRS['HISTORIE_ATTRIBUTES_ONCHANGE']: + if entry.endswith('avg'): + ATTRS['TAGESMITTEL_ATTRIBUTES_ONCHANGE'].append(entry) # create file and write header f = open(FILENAME_ATTRIBUTES, "w") diff --git a/db_addon/plugin.yaml b/db_addon/plugin.yaml index 7de29be1f..44aebd666 100644 --- a/db_addon/plugin.yaml +++ b/db_addon/plugin.yaml @@ -11,7 +11,7 @@ plugin: # keywords: iot xyz # documentation: https://github.com/smarthomeNG/smarthome/wiki/CLI-Plugin # url of documentation (wiki) page support: https://knx-user-forum.de/forum/supportforen/smarthome-py/1848494-support-thread-databaseaddon-plugin - version: 1.2.3 # Plugin version (must match the version specified in __init__.py) + version: 1.2.4 # Plugin version (must match the version specified in __init__.py) sh_minversion: 1.9.3.5 # minimum shNG version to use this plugin # sh_maxversion: # maximum shNG version to use this plugin (leave empty if latest) py_minversion: 3.8 # minimum Python version to use for this plugin @@ -78,6 +78,7 @@ item_attributes: valid_list: # NOTE: valid_list is automatically created by using item_attributes_master.py - verbrauch_heute + - verbrauch_tag - verbrauch_woche - verbrauch_monat - verbrauch_jahr @@ -88,6 +89,15 @@ item_attributes: - verbrauch_heute_minus5 - verbrauch_heute_minus6 - verbrauch_heute_minus7 + - verbrauch_heute_minus8 + - verbrauch_tag_minus1 + - verbrauch_tag_minus2 + - verbrauch_tag_minus3 + - verbrauch_tag_minus4 + - verbrauch_tag_minus5 + - verbrauch_tag_minus6 + - verbrauch_tag_minus7 + - verbrauch_tag_minus8 - verbrauch_woche_minus1 - verbrauch_woche_minus2 - verbrauch_woche_minus3 @@ -100,6 +110,7 @@ item_attributes: - verbrauch_jahr_minus1 - verbrauch_jahr_minus2 - verbrauch_rolling_12m_heute_minus1 + - verbrauch_rolling_12m_tag_minus1 - verbrauch_rolling_12m_woche_minus1 - verbrauch_rolling_12m_monat_minus1 - verbrauch_rolling_12m_jahr_minus1 @@ -109,6 +120,9 @@ item_attributes: - zaehlerstand_heute_minus1 - zaehlerstand_heute_minus2 - zaehlerstand_heute_minus3 + - zaehlerstand_tag_minus1 + - zaehlerstand_tag_minus2 + - zaehlerstand_tag_minus3 - zaehlerstand_woche_minus1 - zaehlerstand_woche_minus2 - zaehlerstand_woche_minus3 @@ -136,6 +150,18 @@ item_attributes: - minmax_heute_minus3_min - minmax_heute_minus3_max - minmax_heute_minus3_avg + - minmax_tag_min + - minmax_tag_max + - minmax_tag_avg + - minmax_tag_minus1_min + - minmax_tag_minus1_max + - minmax_tag_minus1_avg + - minmax_tag_minus2_min + - minmax_tag_minus2_max + - minmax_tag_minus2_avg + - minmax_tag_minus3_min + - minmax_tag_minus3_max + - minmax_tag_minus3_avg - minmax_woche_min - minmax_woche_max - minmax_woche_minus1_min @@ -161,6 +187,10 @@ item_attributes: - tagesmitteltemperatur_heute_minus1 - tagesmitteltemperatur_heute_minus2 - tagesmitteltemperatur_heute_minus3 + - tagesmitteltemperatur_tag + - tagesmitteltemperatur_tag_minus1 + - tagesmitteltemperatur_tag_minus2 + - tagesmitteltemperatur_tag_minus3 - serie_minmax_monat_min_15m - serie_minmax_monat_max_15m - serie_minmax_monat_avg_15m @@ -204,6 +234,7 @@ item_attributes: - zaehlerstand valid_list_description: # NOTE: valid_list_description is automatically created by using item_attributes_master.py + - Verbrauch am heutigen Tag (Differenz zwischen aktuellem Wert und den Wert am Ende des vorherigen Tages) - Verbrauch am heutigen Tag (Differenz zwischen aktuellem Wert und den Wert am Ende des vorherigen Tages) - Verbrauch in der aktuellen Woche - Verbrauch im aktuellen Monat @@ -215,6 +246,15 @@ item_attributes: - Verbrauch heute -5 Tage - Verbrauch heute -6 Tage - Verbrauch heute -7 Tage + - Verbrauch heute -8 Tage + - Verbrauch gestern (heute -1 Tag) (Differenz zwischen Wert am Ende des gestrigen Tages und dem Wert am Ende des Tages davor) + - Verbrauch vorgestern (heute -2 Tage) + - Verbrauch heute -3 Tage + - Verbrauch heute -4 Tage + - Verbrauch heute -5 Tage + - Verbrauch heute -6 Tage + - Verbrauch heute -7 Tage + - Verbrauch heute -8 Tage - Verbrauch Vorwoche (aktuelle Woche -1) - Verbrauch aktuelle Woche -2 Wochen - Verbrauch aktuelle Woche -3 Wochen @@ -227,6 +267,7 @@ item_attributes: - Verbrauch Vorjahr (aktuelles Jahr -1 Jahr) - Verbrauch aktuelles Jahr -2 Jahre - Verbrauch der letzten 12 Monate ausgehend im Ende des letzten Tages + - Verbrauch der letzten 12 Monate ausgehend im Ende des letzten Tages - Verbrauch der letzten 12 Monate ausgehend im Ende der letzten Woche - Verbrauch der letzten 12 Monate ausgehend im Ende des letzten Monats - Verbrauch der letzten 12 Monate ausgehend im Ende des letzten Jahres @@ -236,6 +277,9 @@ item_attributes: - Zählerstand / Wert am Ende des letzten Tages (heute -1 Tag) - Zählerstand / Wert am Ende des vorletzten Tages (heute -2 Tag) - Zählerstand / Wert am Ende des vorvorletzten Tages (heute -3 Tag) + - Zählerstand / Wert am Ende des letzten Tages (heute -1 Tag) + - Zählerstand / Wert am Ende des vorletzten Tages (heute -2 Tag) + - Zählerstand / Wert am Ende des vorvorletzten Tages (heute -3 Tag) - Zählerstand / Wert am Ende der vorvorletzten Woche (aktuelle Woche -1 Woche) - Zählerstand / Wert am Ende der vorletzten Woche (aktuelle Woche -2 Wochen) - Zählerstand / Wert am Ende der aktuellen Woche -3 Wochen @@ -263,6 +307,18 @@ item_attributes: - Minimalwert heute vor 3 Tagen - Maximalwert heute vor 3 Tagen - Durchschnittswert heute vor 3 Tagen + - Minimalwert seit Tagesbeginn + - Maximalwert seit Tagesbeginn + - Durschnittswert seit Tagesbeginn + - Minimalwert gestern (heute -1 Tag) + - Maximalwert gestern (heute -1 Tag) + - Durchschnittswert gestern (heute -1 Tag) + - Minimalwert vorgestern (heute -2 Tage) + - Maximalwert vorgestern (heute -2 Tage) + - Durchschnittswert vorgestern (heute -2 Tage) + - Minimalwert heute vor 3 Tagen + - Maximalwert heute vor 3 Tagen + - Durchschnittswert heute vor 3 Tagen - Minimalwert seit Wochenbeginn - Maximalwert seit Wochenbeginn - Minimalwert Vorwoche (aktuelle Woche -1) @@ -288,6 +344,10 @@ item_attributes: - Tagesmitteltemperatur des letzten Tages (heute -1 Tag) - Tagesmitteltemperatur des vorletzten Tages (heute -2 Tag) - Tagesmitteltemperatur des vorvorletzten Tages (heute -3 Tag) + - Tagesmitteltemperatur heute + - Tagesmitteltemperatur des letzten Tages (heute -1 Tag) + - Tagesmitteltemperatur des vorletzten Tages (heute -2 Tag) + - Tagesmitteltemperatur des vorvorletzten Tages (heute -3 Tag) - monatlicher Minimalwert der letzten 15 Monate (gleitend) - monatlicher Maximalwert der letzten 15 Monate (gleitend) - monatlicher Mittelwert der letzten 15 Monate (gleitend) @@ -415,6 +475,36 @@ item_attributes: - num - num - num + - num + - num + - num + - num + - num + - num + - num + - num + - num + - num + - num + - num + - num + - num + - num + - num + - num + - num + - num + - num + - num + - num + - num + - num + - num + - num + - num + - num + - num + - num - list - list - list @@ -462,6 +552,16 @@ item_attributes: - onchange - onchange - onchange + - onchange + - daily + - daily + - daily + - daily + - daily + - daily + - daily + - daily + - daily - daily - daily - daily @@ -481,6 +581,7 @@ item_attributes: - yearly - yearly - daily + - daily - weekly - monthly - yearly @@ -490,6 +591,9 @@ item_attributes: - daily - daily - daily + - daily + - daily + - daily - weekly - weekly - weekly @@ -519,6 +623,18 @@ item_attributes: - daily - onchange - onchange + - onchange + - daily + - daily + - daily + - daily + - daily + - daily + - daily + - daily + - daily + - onchange + - onchange - weekly - weekly - weekly @@ -542,6 +658,10 @@ item_attributes: - daily - daily - daily + - onchange + - daily + - daily + - daily - monthly - monthly - monthly @@ -664,9 +784,9 @@ item_attributes: item_structs: verbrauch_1: name: Struct für Verbrauchsauswertung bei Zählern mit stetig ansteigendem Zählerstand (Teil 1) - verbrauch_heute: - name: Verbrauch heute - db_addon_fct: verbrauch_heute + verbrauch_tag: + name: Verbrauch am heutigen Tag + db_addon_fct: verbrauch_tag db_addon_startup: yes type: num visu_acl: ro @@ -698,37 +818,37 @@ item_structs: verbrauch_rolling_12m: name: Verbrauch innerhalb der letzten 12 Monate ausgehend von gestern - db_addon_fct: verbrauch_rolling_12m_heute_minus1 + db_addon_fct: verbrauch_rolling_12m_tag_minus1 db_addon_startup: yes type: num visu_acl: ro # cache: yes - verbrauch_gestern: + verbrauch_tag_minus1: name: Verbrauch gestern - db_addon_fct: verbrauch_heute_minus1 + db_addon_fct: verbrauch_tag_minus1 db_addon_startup: yes type: num visu_acl: ro # cache: yes - verbrauch_gestern_minus1: + verbrauch_tag_minus2: name: Verbrauch vorgestern - db_addon_fct: verbrauch_heute_minus2 + db_addon_fct: verbrauch_tag_minus2 db_addon_startup: yes type: num visu_acl: ro # cache: yes - verbrauch_gestern_minus2: + verbrauch_tag_minus3: name: Verbrauch vor 3 Tagen - db_addon_fct: verbrauch_heute_minus3 + db_addon_fct: verbrauch_tag_minus3 db_addon_startup: yes type: num visu_acl: ro # cache: yes - verbrauch_vorwoche: + verbrauch_woche_minus1: name: Verbrauch in der Vorwoche db_addon_fct: verbrauch_woche_minus1 db_addon_startup: yes @@ -736,7 +856,7 @@ item_structs: visu_acl: ro # cache: yes - verbrauch_vorwoche_minus1: + verbrauch_woche_minus2: name: Verbrauch vor 2 Wochen db_addon_fct: verbrauch_woche_minus2 db_addon_startup: yes @@ -744,7 +864,7 @@ item_structs: visu_acl: ro # cache: yes - verbrauch_vormonat: + verbrauch_monat_minus1: name: Verbrauch im Vormonat db_addon_fct: verbrauch_monat_minus1 db_addon_startup: yes @@ -752,7 +872,7 @@ item_structs: visu_acl: ro # cache: yes - verbrauch_vormonat_minus12: + verbrauch_monat_minus12: name: Verbrauch vor 12 Monaten db_addon_fct: verbrauch_monat_minus12 db_addon_startup: yes @@ -778,70 +898,70 @@ item_structs: verbrauch_2: name: Struct für Verbrauchsauswertung bei Zählern mit stetig ansteigendem Zählerstand (Teil 2) - verbrauch_gestern_minus3: - name: Verbrauch vor 3 Tagen - db_addon_fct: verbrauch_heute_minus3 - type: num - visu_acl: ro - cache: yes - - verbrauch_gestern_minus4: + verbrauch_tag_minus4: name: Verbrauch vor 4 Tagen - db_addon_fct: verbrauch_heute_minus4 + db_addon_fct: verbrauch_tag_minus4 type: num visu_acl: ro cache: yes - verbrauch_gestern_minus5: + verbrauch_tag_minus5: name: Verbrauch vor 5 Tagen - db_addon_fct: verbrauch_heute_minus5 + db_addon_fct: verbrauch_tag_minus5 type: num visu_acl: ro cache: yes - verbrauch_gestern_minus6: + verbrauch_tag_minus6: name: Verbrauch vor 6 Tagen - db_addon_fct: verbrauch_heute_minus6 + db_addon_fct: verbrauch_tag_minus6 type: num visu_acl: ro cache: yes - verbrauch_gestern_minus7: + verbrauch_tag_minus7: name: Verbrauch vor 7 Tagen - db_addon_fct: verbrauch_heute_minus7 + db_addon_fct: verbrauch_tag_minus7 + type: num + visu_acl: ro + cache: yes + + verbrauch_tag_minus8: + name: Verbrauch vor 8 Tagen + db_addon_fct: verbrauch_tag_minus8 type: num visu_acl: ro cache: yes - verbrauch_vorwoche_minus2: + verbrauch_woche_minus3: name: Verbrauch vor 3 Wochen db_addon_fct: verbrauch_woche_minus3 type: num visu_acl: ro cache: yes - verbrauch_vorwoche_minus3: + verbrauch_woche_minus4: name: Verbrauch vor 4 Wochen db_addon_fct: verbrauch_woche_minus4 type: num visu_acl: ro cache: yes - verbrauch_vormonat_minus1: + verbrauch_monat_minus2: name: Verbrauch vor 2 Monaten db_addon_fct: verbrauch_monat_minus2 type: num visu_acl: ro cache: yes - verbrauch_vormonat_minus2: + verbrauch_monat_minus3: name: Verbrauch vor 3 Monaten db_addon_fct: verbrauch_monat_minus3 type: num visu_acl: ro cache: yes - verbrauch_vormonat_minus3: + verbrauch_monat_minus4: name: Verbrauch vor 4 Monaten db_addon_fct: verbrauch_monat_minus4 type: num @@ -852,13 +972,13 @@ item_structs: name: Struct für die Erfassung von Zählerständen zu bestimmten Zeitpunkten bei Zählern mit stetig ansteigendem Zählerstand zaehlerstand_gestern: name: Zählerstand zum Ende des gestrigen Tages - db_addon_fct: zaehlerstand_heute_minus1 + db_addon_fct: zaehlerstand_tag_minus1 db_addon_startup: yes type: num visu_acl: ro # cache: yes - zaehlerstand_vorwoche: + zaehlerstand_woche_minus1: name: Zählerstand zum Ende der vorigen Woche db_addon_fct: zaehlerstand_woche_minus1 db_addon_startup: yes @@ -866,7 +986,7 @@ item_structs: visu_acl: ro # cache: yes - zaehlerstand_vormonat: + zaehlerstand_monat_minus1: name: Zählerstand zum Ende des Vormonates db_addon_fct: zaehlerstand_monat_minus1 db_addon_startup: yes @@ -874,7 +994,7 @@ item_structs: visu_acl: ro # cache: yes - zaehlerstand_vormonat_minus1: + zaehlerstand_monat_minus2: name: Zählerstand zum Monatsende vor 2 Monaten db_addon_fct: zaehlerstand_monat_minus2 db_addon_startup: yes @@ -882,7 +1002,7 @@ item_structs: visu_acl: ro # cache: yes - zaehlerstand_vormonat_minus2: + zaehlerstand_monat_minus3: name: Zählerstand zum Monatsende vor 3 Monaten db_addon_fct: zaehlerstand_monat_minus3 db_addon_startup: yes @@ -890,7 +1010,7 @@ item_structs: visu_acl: ro # cache: yes - zaehlerstand_vorjahr: + zaehlerstand_jahr_minus1: name: Zählerstand am Ende des vorigen Jahres db_addon_fct: zaehlerstand_jahr_minus1 db_addon_startup: yes @@ -901,24 +1021,24 @@ item_structs: minmax_1: name: Struct für Auswertung der Wertehistorie bei schwankenden Werten wie bspw. Temperatur oder Leistung (Teil 1) - heute_min: + tag_min: name: Minimaler Wert seit Tagesbeginn - db_addon_fct: minmax_heute_min + db_addon_fct: minmax_tag_min db_addon_ignore_value: 0 db_addon_startup: yes type: num # cache: yes - heute_max: + tag_max: name: Maximaler Wert seit Tagesbeginn - db_addon_fct: minmax_heute_max + db_addon_fct: minmax_tag_max db_addon_startup: yes type: num # cache: yes - heute_avg: + tag_avg: name: Maximaler Wert seit Tagesbeginn - db_addon_fct: minmax_heute_avg + db_addon_fct: minmax_tag_avg db_addon_startup: yes type: num @@ -978,77 +1098,77 @@ item_structs: type: num # cache: yes - gestern_min: + tag_minus1_min: name: Minimaler Wert gestern - db_addon_fct: minmax_heute_minus1_min + db_addon_fct: minmax_tag_minus1_min db_addon_startup: yes type: num # cache: yes - gestern_max: + tag_minus1_max: name: Maximaler Wert gestern - db_addon_fct: minmax_heute_minus1_max + db_addon_fct: minmax_tag_minus1_max db_addon_startup: yes type: num # cache: yes - gestern_avg: + tag_minus1_avg: name: Durchschnittlicher Wert gestern - db_addon_fct: minmax_heute_minus1_avg + db_addon_fct: minmax_tag_minus1_avg db_addon_startup: yes type: num # cache: yes - vorwoche_min: + woche_minus1_min: name: Minimaler Wert in der Vorwoche db_addon_fct: minmax_woche_minus1_min db_addon_startup: yes type: num # cache: yes - vorwoche_max: + woche_minus1_max: name: Maximaler Wert in der Vorwoche db_addon_fct: minmax_woche_minus1_max db_addon_startup: yes type: num # cache: yes - vorwoche_avg: + woche_minus1_avg: name: Durchschnittlicher Wert in der Vorwoche db_addon_fct: minmax_woche_minus1_avg db_addon_startup: yes type: num # cache: yes - vormonat_min: + monat_minus1_min: name: Minimaler Wert im Vormonat db_addon_fct: minmax_monat_minus1_min db_addon_startup: yes type: num # cache: yes - vormonat_max: + monat_minus1_max: name: Maximaler Wert im Vormonat db_addon_fct: minmax_monat_minus1_max db_addon_startup: yes type: num # cache: yes - vormonat_avg: + monat_minus1_avg: name: Durchschnittlicher Wert im Vormonat db_addon_fct: minmax_monat_minus1_avg db_addon_startup: yes type: num # cache: yes - vorjahr_min: + jahr_minus1_min: name: Minimaler Wert im Vorjahr db_addon_fct: minmax_jahr_minus1_min db_addon_startup: yes type: num # cache: yes - vorjahr_max: + jahr_minus1_max: name: Maximaler Wert im Vorjahr db_addon_fct: minmax_jahr_minus1_max db_addon_startup: yes @@ -1058,73 +1178,73 @@ item_structs: minmax_2: name: Struct für Auswertung der Wertehistorie bei schwankenden Werten wie bspw. Temperatur oder Leistung (Teil 2) - gestern_minus1_min: + tag_minus2_min: name: Minimaler Wert vorgestern - db_addon_fct: minmax_heute_minus2_min + db_addon_fct: minmax_tag_minus2_min type: num cache: yes - gestern_minus1_max: + tag_minus2_max: name: Maximaler Wert vorgestern - db_addon_fct: minmax_heute_minus2_max + db_addon_fct: minmax_tag_minus2_max type: num cache: yes - gestern_minus1_avg: + tag_minus2_avg: name: Durchschnittlicher Wert vorgestern - db_addon_fct: minmax_heute_minus2_avg + db_addon_fct: minmax_tag_minus2_avg type: num cache: yes - gestern_minus2_min: + tag_minus3_min: name: Minimaler Wert vor 3 Tagen - db_addon_fct: minmax_heute_minus3_min + db_addon_fct: minmax_tag_minus3_min type: num cache: yes - gestern_minus2_max: + tag_minus3_max: name: Maximaler Wert vor 3 Tagen - db_addon_fct: minmax_heute_minus3_max + db_addon_fct: minmax_tag_minus3_max type: num cache: yes - gestern_minus2_avg: + tag_minus3_avg: name: Durchschnittlicher Wert vor 3 Tagen - db_addon_fct: minmax_heute_minus3_avg + db_addon_fct: minmax_tag_minus3_avg type: num cache: yes - vorwoche_minus1_min: + woche_minus2_min: name: Minimaler Wert in der Woche vor 2 Wochen db_addon_fct: minmax_woche_minus2_min type: num cache: yes - vorwoche_minus1_max: + woche_minus2_max: name: Maximaler Wert in der Woche vor 2 Wochen db_addon_fct: minmax_woche_minus2_max type: num cache: yes - vorwoche_minus1_avg: + woche_minus2_avg: name: Durchschnittlicher Wert in der Woche vor 2 Wochen db_addon_fct: minmax_woche_minus2_avg type: num cache: yes - vormonat_minus1_min: + monat_minus2_min: name: Minimaler Wert im Monat vor 2 Monaten db_addon_fct: minmax_monat_minus2_min type: num cache: yes - vormonat_minus1_max: + monat_minus2_max: name: Maximaler Wert im Monat vor 2 Monaten db_addon_fct: minmax_monat_minus2_max type: num cache: yes - vormonat_minus1_avg: + monat_minus2_avg: name: Durchschnittlicher Wert im Monat vor 2 Monaten db_addon_fct: minmax_monat_minus2_avg type: num diff --git a/db_addon/user_doc.rst b/db_addon/user_doc.rst index d95d4658d..bb3457f48 100644 --- a/db_addon/user_doc.rst +++ b/db_addon/user_doc.rst @@ -105,6 +105,8 @@ db_addon_fct - verbrauch_heute: Verbrauch am heutigen Tag (Differenz zwischen aktuellem Wert und den Wert am Ende des vorherigen Tages) | Berechnung: onchange | Item-Type: num +- verbrauch_tag: Verbrauch am heutigen Tag (Differenz zwischen aktuellem Wert und den Wert am Ende des vorherigen Tages) | Berechnung: onchange | Item-Type: num + - verbrauch_woche: Verbrauch in der aktuellen Woche | Berechnung: onchange | Item-Type: num - verbrauch_monat: Verbrauch im aktuellen Monat | Berechnung: onchange | Item-Type: num @@ -125,6 +127,24 @@ db_addon_fct - verbrauch_heute_minus7: Verbrauch heute -7 Tage | Berechnung: daily | Item-Type: num +- verbrauch_heute_minus8: Verbrauch heute -8 Tage | Berechnung: daily | Item-Type: num + +- verbrauch_tag_minus1: Verbrauch gestern (heute -1 Tag) (Differenz zwischen Wert am Ende des gestrigen Tages und dem Wert am Ende des Tages davor) | Berechnung: daily | Item-Type: num + +- verbrauch_tag_minus2: Verbrauch vorgestern (heute -2 Tage) | Berechnung: daily | Item-Type: num + +- verbrauch_tag_minus3: Verbrauch heute -3 Tage | Berechnung: daily | Item-Type: num + +- verbrauch_tag_minus4: Verbrauch heute -4 Tage | Berechnung: daily | Item-Type: num + +- verbrauch_tag_minus5: Verbrauch heute -5 Tage | Berechnung: daily | Item-Type: num + +- verbrauch_tag_minus6: Verbrauch heute -6 Tage | Berechnung: daily | Item-Type: num + +- verbrauch_tag_minus7: Verbrauch heute -7 Tage | Berechnung: daily | Item-Type: num + +- verbrauch_tag_minus8: Verbrauch heute -8 Tage | Berechnung: daily | Item-Type: num + - verbrauch_woche_minus1: Verbrauch Vorwoche (aktuelle Woche -1) | Berechnung: weekly | Item-Type: num - verbrauch_woche_minus2: Verbrauch aktuelle Woche -2 Wochen | Berechnung: weekly | Item-Type: num @@ -149,6 +169,8 @@ db_addon_fct - verbrauch_rolling_12m_heute_minus1: Verbrauch der letzten 12 Monate ausgehend im Ende des letzten Tages | Berechnung: daily | Item-Type: num +- verbrauch_rolling_12m_tag_minus1: Verbrauch der letzten 12 Monate ausgehend im Ende des letzten Tages | Berechnung: daily | Item-Type: num + - verbrauch_rolling_12m_woche_minus1: Verbrauch der letzten 12 Monate ausgehend im Ende der letzten Woche | Berechnung: weekly | Item-Type: num - verbrauch_rolling_12m_monat_minus1: Verbrauch der letzten 12 Monate ausgehend im Ende des letzten Monats | Berechnung: monthly | Item-Type: num @@ -167,6 +189,12 @@ db_addon_fct - zaehlerstand_heute_minus3: Zählerstand / Wert am Ende des vorvorletzten Tages (heute -3 Tag) | Berechnung: daily | Item-Type: num +- zaehlerstand_tag_minus1: Zählerstand / Wert am Ende des letzten Tages (heute -1 Tag) | Berechnung: daily | Item-Type: num + +- zaehlerstand_tag_minus2: Zählerstand / Wert am Ende des vorletzten Tages (heute -2 Tag) | Berechnung: daily | Item-Type: num + +- zaehlerstand_tag_minus3: Zählerstand / Wert am Ende des vorvorletzten Tages (heute -3 Tag) | Berechnung: daily | Item-Type: num + - zaehlerstand_woche_minus1: Zählerstand / Wert am Ende der vorvorletzten Woche (aktuelle Woche -1 Woche) | Berechnung: weekly | Item-Type: num - zaehlerstand_woche_minus2: Zählerstand / Wert am Ende der vorletzten Woche (aktuelle Woche -2 Wochen) | Berechnung: weekly | Item-Type: num @@ -221,6 +249,30 @@ db_addon_fct - minmax_heute_minus3_avg: Durchschnittswert heute vor 3 Tagen | Berechnung: daily | Item-Type: num +- minmax_tag_min: Minimalwert seit Tagesbeginn | Berechnung: onchange | Item-Type: num + +- minmax_tag_max: Maximalwert seit Tagesbeginn | Berechnung: onchange | Item-Type: num + +- minmax_tag_avg: Durschnittswert seit Tagesbeginn | Berechnung: onchange | Item-Type: num + +- minmax_tag_minus1_min: Minimalwert gestern (heute -1 Tag) | Berechnung: daily | Item-Type: num + +- minmax_tag_minus1_max: Maximalwert gestern (heute -1 Tag) | Berechnung: daily | Item-Type: num + +- minmax_tag_minus1_avg: Durchschnittswert gestern (heute -1 Tag) | Berechnung: daily | Item-Type: num + +- minmax_tag_minus2_min: Minimalwert vorgestern (heute -2 Tage) | Berechnung: daily | Item-Type: num + +- minmax_tag_minus2_max: Maximalwert vorgestern (heute -2 Tage) | Berechnung: daily | Item-Type: num + +- minmax_tag_minus2_avg: Durchschnittswert vorgestern (heute -2 Tage) | Berechnung: daily | Item-Type: num + +- minmax_tag_minus3_min: Minimalwert heute vor 3 Tagen | Berechnung: daily | Item-Type: num + +- minmax_tag_minus3_max: Maximalwert heute vor 3 Tagen | Berechnung: daily | Item-Type: num + +- minmax_tag_minus3_avg: Durchschnittswert heute vor 3 Tagen | Berechnung: daily | Item-Type: num + - minmax_woche_min: Minimalwert seit Wochenbeginn | Berechnung: onchange | Item-Type: num - minmax_woche_max: Maximalwert seit Wochenbeginn | Berechnung: onchange | Item-Type: num @@ -271,6 +323,14 @@ db_addon_fct - tagesmitteltemperatur_heute_minus3: Tagesmitteltemperatur des vorvorletzten Tages (heute -3 Tag) | Berechnung: daily | Item-Type: num +- tagesmitteltemperatur_tag: Tagesmitteltemperatur heute | Berechnung: onchange | Item-Type: num + +- tagesmitteltemperatur_tag_minus1: Tagesmitteltemperatur des letzten Tages (heute -1 Tag) | Berechnung: daily | Item-Type: num + +- tagesmitteltemperatur_tag_minus2: Tagesmitteltemperatur des vorletzten Tages (heute -2 Tag) | Berechnung: daily | Item-Type: num + +- tagesmitteltemperatur_tag_minus3: Tagesmitteltemperatur des vorvorletzten Tages (heute -3 Tag) | Berechnung: daily | Item-Type: num + - serie_minmax_monat_min_15m: monatlicher Minimalwert der letzten 15 Monate (gleitend) | Berechnung: monthly | Item-Type: list - serie_minmax_monat_max_15m: monatlicher Maximalwert der letzten 15 Monate (gleitend) | Berechnung: monthly | Item-Type: list diff --git a/db_addon/webif/__init__.py b/db_addon/webif/__init__.py index d1fca7eba..05dbb8d7a 100644 --- a/db_addon/webif/__init__.py +++ b/db_addon/webif/__init__.py @@ -68,6 +68,7 @@ def index(self, reload=None, action=None, item_path=None, active=None, option=No :return: contents of the template after being rendered """ + pagelength = self.plugin.get_parameter_value('webif_pagelength') tmpl = self.tplenv.get_template('index.html') if action is not None: @@ -84,7 +85,7 @@ def index(self, reload=None, action=None, item_path=None, active=None, option=No self.plugin._activate_item_calculation(item=item_path, active=bool(int(active))) return tmpl.render(p=self.plugin, - webif_pagelength=self.plugin.get_parameter_value('webif_pagelength'), + webif_pagelength=pagelength, suspended='true' if self.plugin.suspended else 'false', items=self.plugin.get_item_list('db_addon', 'function'), item_count=len(self.plugin.get_item_list('db_addon', 'function')), From 92c3abe26cc52c03cbc964432e32ba9a03da8cd8 Mon Sep 17 00:00:00 2001 From: sisamiwe Date: Sun, 17 Sep 2023 20:14:30 +0200 Subject: [PATCH 11/41] DB_ADDON: - update WebIF for button - add attribute "verbauch_last_24h" - update methods to handle hourly calculation - bump to 1.2.5 --- db_addon/__init__.py | 200 +++++++++++------ db_addon/item_attributes.py | 4 +- db_addon/item_attributes_master.py | 6 +- db_addon/locale.yaml | 1 + db_addon/plugin.yaml | 18 +- db_addon/user_doc.rst | 321 +++++++++++++++++++++------- db_addon/webif/__init__.py | 43 ++-- db_addon/webif/templates/index.html | 217 ++++++++++--------- 8 files changed, 558 insertions(+), 252 deletions(-) diff --git a/db_addon/__init__.py b/db_addon/__init__.py index c0a809c29..b728211e8 100644 --- a/db_addon/__init__.py +++ b/db_addon/__init__.py @@ -49,6 +49,7 @@ from .item_attributes import * import lib.db +HOUR = 'hour' DAY = 'day' WEEK = 'week' MONTH = 'month' @@ -60,7 +61,7 @@ class DatabaseAddOn(SmartPlugin): Main class of the Plugin. Does all plugin specific stuff and provides the update functions for the items """ - PLUGIN_VERSION = '1.2.4' + PLUGIN_VERSION = '1.2.5' def __init__(self, sh): """ @@ -157,7 +158,7 @@ def run(self): self._check_db_connection_setting() # add scheduler for cyclic trigger item calculation - self.scheduler_add('cyclic', self.execute_due_items, prio=3, cron='10 0 * * *', cycle=None, value=None, offset=None, next=None) + self.scheduler_add('cyclic', self.execute_due_items, prio=3, cron='10 * * * *', cycle=None, value=None, offset=None, next=None) # add scheduler to trigger items to be calculated at startup with delay dt = self.shtime.now() + relativedelta(seconds=(self.startup_run_delay + 3)) @@ -195,7 +196,8 @@ def stop(self): self.alive = False self.scheduler_remove('cyclic') self.scheduler_remove('onchange_delay') - self._db.close() + if self._db: + self._db.close() self.save_cache_data() # ToDo: Check if still needed @@ -275,6 +277,15 @@ def get_query_parameters_from_db_addon_fct() -> Union[dict, None]: log_text = 'verbrauch_timeframe_timedelta' required_params = [timeframe, start, end] + elif db_addon_fct in VERBRAUCH_ATTRIBUTES_LAST: + # handle functions 'verbrauch_last' in format 'verbrauch_last_timedelta|timeframe' like 'verbrauch_last_24h' + start, timeframe = split_sting_letters_numbers(db_addon_fct_vars[2]) + start = to_int(start) + timeframe = translate_timeframe(timeframe) + end = 0 + log_text = 'verbrauch_last_timedelta|timeframe' + required_params = [timeframe, start, end] + elif db_addon_fct in VERBRAUCH_ATTRIBUTES_ROLLING: # handle functions 'verbrauch_on-demand' in format 'verbrauch_rolling_window_timeframe_timedelta' like 'verbrauch_rolling_12m_woche_minus1' func = db_addon_fct_vars[1] @@ -673,7 +684,9 @@ def format_db_addon_ignore_value_list(optimize: bool = self.optimize_value_filte self.logger.debug(f"Item={item.path()} added with db_addon_fct={db_addon_fct} and database_item={database_item}") # add cycle for item groups - if db_addon_fct in ALL_DAILY_ATTRIBUTES: + if db_addon_fct in ALL_HOURLY_ATTRIBUTES: + item_config_data_dict.update({'cycle': 'hourly'}) + elif db_addon_fct in ALL_DAILY_ATTRIBUTES: item_config_data_dict.update({'cycle': 'daily'}) elif db_addon_fct in ALL_WEEKLY_ATTRIBUTES: item_config_data_dict.update({'cycle': 'weekly'}) @@ -693,6 +706,9 @@ def format_db_addon_ignore_value_list(optimize: bool = self.optimize_value_filte elif db_addon_fct == 'minmax': cycle = item_config_data_dict['query_params']['timeframe'] item_config_data_dict.update({'cycle': f"{timeframe_to_updatecyle(cycle)}"}) + else: + self.logger.warning(f"Cycle for {item.path()} undefined") + item_config_data_dict.update({'cycle': None}) # do logging if self.debug_log.parse: @@ -891,30 +907,38 @@ def execute_items(self, option: str = 'due', item: str = None): def _create_due_items() -> list: """Create list of items which are due and reset cache dicts""" - # täglich zu berechnende Items zur Action Liste hinzufügen + # set für zu berechnende Items erstellen _todo_items = set() - _todo_items.update(set(self._daily_items())) - self.current_values[DAY] = {} - self.previous_values[DAY] = {} - self.value_list_raw_data = {} - - # wenn Wochentag == Montag, werden auch die wöchentlichen Items berechnet - if self.shtime.weekday(self.shtime.today()) == 1: - _todo_items.update(set(self._weekly_items())) - self.current_values[WEEK] = {} - self.previous_values[WEEK] = {} - - # wenn der erste Tage eines Monates ist, werden auch die monatlichen Items berechnet - if self.shtime.now().day == 1: - _todo_items.update(set(self._monthly_items())) - self.current_values[MONTH] = {} - self.previous_values[MONTH] = {} - - # wenn der erste Tage des ersten Monates eines Jahres ist, werden auch die jährlichen Items berechnet - if self.shtime.now().month == 1: - _todo_items.update(set(self._yearly_items())) - self.current_values[YEAR] = {} - self.previous_values[YEAR] = {} + + # stündlich zu berechnende Items hinzufügen + _todo_items.update(set(self._hourly_items())) + self.current_values[HOUR] = {} + self.previous_values[HOUR] = {} + + # wenn aktuelle Stunde == 0, werden auch die täglichen Items berechnet + if self.shtime.now().hour == 0: + _todo_items.update(set(self._daily_items())) + self.current_values[DAY] = {} + self.previous_values[DAY] = {} + self.value_list_raw_data = {} + + # wenn zusätzlich der Wochentag == Montag, werden auch die wöchentlichen Items berechnet + if self.shtime.weekday(self.shtime.today()) == 1: + _todo_items.update(set(self._weekly_items())) + self.current_values[WEEK] = {} + self.previous_values[WEEK] = {} + + # wenn zusätzlich der erste Tage eines Monates ist, werden auch die monatlichen Items berechnet + if self.shtime.now().day == 1: + _todo_items.update(set(self._monthly_items())) + self.current_values[MONTH] = {} + self.previous_values[MONTH] = {} + + # wenn zusätzlich der erste Monat ist, werden auch die jährlichen Items berechnet + if self.shtime.now().month == 1: + _todo_items.update(set(self._yearly_items())) + self.current_values[YEAR] = {} + self.previous_values[YEAR] = {} return list(_todo_items) @@ -956,7 +980,10 @@ def _create_due_items() -> list: # put to queue self.logger.info(f"{len(todo_items)} items will be calculated for {option=}.") + if self.debug_log.execute: + self.logger.debug(f"Items to be calculated: {todo_items=}") [self.item_queue.put(i) for i in todo_items] + return True def work_item_queue(self) -> None: """Handles item queue were all to be executed items were be placed in.""" @@ -1228,6 +1255,7 @@ def handle_tagesmittel(): item(new_value, self.get_shortname()) def _update_database_items(self) -> None: + """Turns given as database_item path into database_items""" for item in self._database_item_path_items(): item_config = self.get_item_config(item) database_item_path = item_config.get('database_item') @@ -1242,7 +1270,7 @@ def _update_database_items(self) -> None: if db_addon_startup: item_config.update({'startup': True}) - def _activate_item_calculation(self, item: Union[str, Item], active: bool = True) -> None: + def _activate_item_calculation(self, item: Union[str, Item], active: bool = True) -> Union[bool, None]: """active / de-active item calculation""" if isinstance(item, str): item = self.items.return_item(item) @@ -1252,6 +1280,7 @@ def _activate_item_calculation(self, item: Union[str, Item], active: bool = True item_config = self.get_item_config(item) item_config['active'] = active + return active @property def log_level(self) -> int: @@ -1269,6 +1298,9 @@ def _startup_items(self) -> list: def _onchange_items(self) -> list: return self.get_item_list('cycle', 'on-change') + def _hourly_items(self) -> list: + return self.get_item_list('cycle', 'hourly') + def _daily_items(self) -> list: return self.get_item_list('cycle', 'daily') @@ -1495,15 +1527,11 @@ def _handle_verbrauch(self, query_params: dict) -> Union[None, float]: Ermittlung des Verbrauches innerhalb eines Zeitraumes Die Vorgehensweise ist: - - Endwert: Abfrage des letzten Eintrages im Zeitraum - - Ergibt diese Abfrage einen Wert, gab eines einen Eintrag im Zeitraum in der DB, es wurde also etwas verbraucht, dann entspricht dieser dem Endzählerstand + - Endwert / Endzählerstand: Abfrage des letzten Eintrages (Zählerstandes) im Zeitraum - Ergibt diese Abfrage keinen Wert, gab eines keinen Eintrag im Zeitraum in der DB, es wurde also nichts verbraucht -> Rückgabe von 0 - - Startwert: Abfrage des letzten Eintrages im Zeitraum vor dem Abfragezeitraum - - Ergibt diese Abfrage einen Wert, entspricht dieser dem Zählerstand am Ende des Zeitraumes vor dem Abfragezeitraum - - Ergibt diese Abfrage keinen Wert, wurde in Zeitraum, vor dem Abfragezeitraum nichts verbraucht, der Anfangszählerstand kann so nicht ermittelt werden. - - Abfrage des nächsten Wertes vor dem Zeitraum - - Ergibt diese Abfrage einen Wert, entspricht dieser dem Anfangszählerstand - - Ergibt diese Abfrage keinen Wert, Anfangszählerstand = 0 + - Startwert / Anfangszählerstand: Abfrage des letzten Eintrages (Zählerstandes) vor dem Abfragezeitraum + - Ergibt diese Abfrage einen Wert, entspricht dieser dem Anfangszählerstand + - Ergibt diese Abfrage keinen Wert, Anfangszählerstand = 0 """ # define start, end for verbrauch_jahreszeitraum_timedelta @@ -1523,7 +1551,7 @@ def _handle_verbrauch(self, query_params: dict) -> Union[None, float]: self.logger.debug(f"called with {query_params=}") # get value for end and check it; - query_params.update({'func': 'last', 'start': end, 'end': end}) + query_params.update({'func': 'last', 'start': start, 'end': end}) value_end = self._query_item(**query_params)[0][1] if self.debug_log.prepare: @@ -1533,28 +1561,19 @@ def _handle_verbrauch(self, query_params: dict) -> Union[None, float]: return value_end # get value for start and check it; - query_params.update({'func': 'last', 'start': start, 'end': start}) + query_params.update({'func': 'next', 'start': start, 'end': start}) value_start = self._query_item(**query_params)[0][1] if self.debug_log.prepare: - self.logger.debug(f"{value_start=}") - - if value_start is None: - if self.debug_log.prepare: - self.logger.debug(f"Error occurred during query. Return.") - return - - if not value_start: - self.logger.info(f"No DB Entry of item={query_params['database_item'].path()} found for requested start date. Looking for next recent DB entry.") - query_params.update({'func': 'next'}) - value_start = self._query_item(**query_params)[0][1] - if self.debug_log.prepare: - self.logger.debug(f"next recent value is {value_start=}") + self.logger.debug(f"next recent value is {value_start=}") if not value_start: value_start = 0 if self.debug_log.prepare: self.logger.debug(f"No start value available. Will be set to 0 as default") + if self.debug_log.prepare: + self.logger.debug(f"{value_start=}") + # calculate consumption consumption = value_end - value_start @@ -1584,6 +1603,30 @@ def _handle_verbrauch_serie(self, query_params: dict) -> list: return series + def _handle_verbrauch_serie_new(self, query_params: dict) -> list: + """Ermittlung einer Serie von Verbräuchen in einem Zeitraum für x Zeiträume""" + + # ToDo: Test method + + query_params.update({'data_con_func': 'max_day', 'cache': True}) + raw_data = self._prepare_value_list(**query_params) + + new_dict = {k[0]: k[1:][0] for k in raw_data} + consumption_list = [] + start_ts = min(new_dict) + start_val = new_dict[start_ts] + + for i in range(query_params['start']): + end_ts = int(start_ts + 24 * 60 * 60) + end_val = new_dict.get(end_ts, None) + if not end_val: + end_val = start_val + consumption_list.append([end_ts, round((end_val - start_val), 2)]) + start_ts = end_ts + start_val = end_val + + return consumption_list + def _handle_zaehlerstand(self, query_params: dict) -> Union[float, int, None]: """ Ermittlung des Zählerstandes zum Ende eines Zeitraumes @@ -1643,6 +1686,30 @@ def _handle_zaehlerstand_serie(self, query_params: dict) -> list: return series + def _handle_zaehlerstand_serie_new(self, query_params: dict) -> list: + """Ermittlung einer Serie von Zählerständen zum Ende eines Zeitraumes für x Zeiträume""" + + # ToDo: Test method + + query_params.update({'data_con_func': 'max_day', 'cache': True}) + raw_data = self._prepare_value_list(**query_params) + + new_dict = {k[0]: k[1:][0] for k in raw_data} + zaehler_list = [] + start_ts = min(new_dict) + start_val = new_dict[start_ts] + + for i in range(query_params['start']): + end_ts = int(start_ts + 24 * 60 * 60) + end_val = new_dict.get(end_ts, None) + if not end_val: + end_val = start_val + zaehler_list.append([end_ts, round(end_val, 2)]) + start_ts = end_ts + start_val = end_val + + return zaehler_list + def _handle_temp_sums(self, func: str, database_item: Item, year: Union[int, str] = None, month: Union[int, str] = None, ignore_value_list: list = None, params: dict = None) -> Union[list, None]: """ Calculates diverse temperature sums and day counts @@ -2257,7 +2324,7 @@ def _query_item(self, func: str, database_item: Item, timeframe: str, start: int if ts_end is None or ts_start > ts_end: if self.debug_log.prepare: self.logger.debug(f"{ts_start=}, {ts_end=}") - self.logger.warning(f"Requested {start=} for item={database_item.path()} is not valid since {start=} < {end=} or end not given. Query cancelled.") + self.logger.warning(f"Requested {start=} for item={database_item.path()} is not valid since {start=} > {end=} or end not given. Query cancelled.") return error_result # define item_id @@ -2325,6 +2392,7 @@ def _init_cache_dicts(self) -> None: self.item_cache = {} self.current_values = { + HOUR: {}, DAY: {}, WEEK: {}, MONTH: {}, @@ -2332,6 +2400,7 @@ def _init_cache_dicts(self) -> None: } self.previous_values = { + HOUR: {}, DAY: {}, WEEK: {}, MONTH: {}, @@ -2340,14 +2409,14 @@ def _init_cache_dicts(self) -> None: self.value_list_raw_data = {} - def _clean_item_cache(self, item: Union[str, Item]) -> None: + def _clean_item_cache(self, item: Union[str, Item]) -> bool: """set cached values for item to None""" if isinstance(item, str): item = self.items.return_item(item) if not isinstance(item, Item): - return + return False database_item = self.get_item_config(item).get('database_item') @@ -2362,6 +2431,9 @@ def _clean_item_cache(self, item: Union[str, Item]) -> None: if cached_item == database_item: self.current_values[timeframe][cached_item] = {} + return True + return False + def _clear_queue(self) -> None: """ Clear working queue @@ -2412,26 +2484,32 @@ def _get_start_end_as_timestamp(self, timeframe: str, start: Union[int, str, Non ts_start = ts_end = None def get_query_timestamp(_offset) -> int: - if timeframe == 'week': - _date = self.shtime.beginning_of_week(offset=_offset) + if timeframe == 'hour': + dt = self.shtime.now().replace(microsecond=0, second=0, minute=0) - datetime.timedelta(hours=_offset) + return self._datetime_to_timestamp(dt) * 1000 + elif timeframe == 'week': + _date = self.shtime.beginning_of_week(offset=-_offset) elif timeframe == 'month': - _date = self.shtime.beginning_of_month(offset=_offset) + _date = self.shtime.beginning_of_month(offset=-_offset) elif timeframe == 'year': - _date = self.shtime.beginning_of_year(offset=_offset) + _date = self.shtime.beginning_of_year(offset=-_offset) else: - _date = self.shtime.today(offset=_offset) + _date = self.shtime.today(offset=-_offset) return self._datetime_to_timestamp(datetime.datetime.combine(_date, datetime.datetime.min.time())) * 1000 if isinstance(start, str) and start.isdigit(): start = int(start) if isinstance(start, int): - ts_start = get_query_timestamp(-start) + ts_start = get_query_timestamp(start) if isinstance(end, str) and end.isdigit(): end = int(end) if isinstance(end, int): - ts_end = get_query_timestamp(-end + 1) + if timeframe == 'hour': + ts_end = get_query_timestamp(end) + else: + ts_end = get_query_timestamp(end - 1) return ts_start, ts_end diff --git a/db_addon/item_attributes.py b/db_addon/item_attributes.py index e28c243c2..23ee09161 100644 --- a/db_addon/item_attributes.py +++ b/db_addon/item_attributes.py @@ -29,14 +29,16 @@ # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # ALL_ONCHANGE_ATTRIBUTES = ['verbrauch_heute', 'verbrauch_tag', 'verbrauch_woche', 'verbrauch_monat', 'verbrauch_jahr', 'minmax_heute_min', 'minmax_heute_max', 'minmax_heute_avg', 'minmax_tag_min', 'minmax_tag_max', 'minmax_tag_avg', 'minmax_woche_min', 'minmax_woche_max', 'minmax_monat_min', 'minmax_monat_max', 'minmax_jahr_min', 'minmax_jahr_max', 'tagesmitteltemperatur_heute', 'tagesmitteltemperatur_tag'] +ALL_HOURLY_ATTRIBUTES = ['verbrauch_last_24h', 'verbrauch_last_7d'] ALL_DAILY_ATTRIBUTES = ['verbrauch_heute_minus1', 'verbrauch_heute_minus2', 'verbrauch_heute_minus3', 'verbrauch_heute_minus4', 'verbrauch_heute_minus5', 'verbrauch_heute_minus6', 'verbrauch_heute_minus7', 'verbrauch_heute_minus8', 'verbrauch_tag_minus1', 'verbrauch_tag_minus2', 'verbrauch_tag_minus3', 'verbrauch_tag_minus4', 'verbrauch_tag_minus5', 'verbrauch_tag_minus6', 'verbrauch_tag_minus7', 'verbrauch_tag_minus8', 'verbrauch_rolling_12m_heute_minus1', 'verbrauch_rolling_12m_tag_minus1', 'verbrauch_jahreszeitraum_minus1', 'verbrauch_jahreszeitraum_minus2', 'verbrauch_jahreszeitraum_minus3', 'zaehlerstand_heute_minus1', 'zaehlerstand_heute_minus2', 'zaehlerstand_heute_minus3', 'zaehlerstand_tag_minus1', 'zaehlerstand_tag_minus2', 'zaehlerstand_tag_minus3', 'minmax_last_24h_min', 'minmax_last_24h_max', 'minmax_last_24h_avg', 'minmax_last_7d_min', 'minmax_last_7d_max', 'minmax_last_7d_avg', 'minmax_heute_minus1_min', 'minmax_heute_minus1_max', 'minmax_heute_minus1_avg', 'minmax_heute_minus2_min', 'minmax_heute_minus2_max', 'minmax_heute_minus2_avg', 'minmax_heute_minus3_min', 'minmax_heute_minus3_max', 'minmax_heute_minus3_avg', 'minmax_tag_minus1_min', 'minmax_tag_minus1_max', 'minmax_tag_minus1_avg', 'minmax_tag_minus2_min', 'minmax_tag_minus2_max', 'minmax_tag_minus2_avg', 'minmax_tag_minus3_min', 'minmax_tag_minus3_max', 'minmax_tag_minus3_avg', 'tagesmitteltemperatur_heute_minus1', 'tagesmitteltemperatur_heute_minus2', 'tagesmitteltemperatur_heute_minus3', 'tagesmitteltemperatur_tag_minus1', 'tagesmitteltemperatur_tag_minus2', 'tagesmitteltemperatur_tag_minus3', 'serie_minmax_tag_min_30d', 'serie_minmax_tag_max_30d', 'serie_minmax_tag_avg_30d', 'serie_verbrauch_tag_30d', 'serie_zaehlerstand_tag_30d', 'serie_tagesmittelwert_0d', 'serie_tagesmittelwert_stunde_0d', 'serie_tagesmittelwert_stunde_30_0d', 'serie_tagesmittelwert_tag_stunde_30d', 'kaeltesumme', 'waermesumme', 'gruenlandtempsumme', 'wachstumsgradtage', 'wuestentage', 'heisse_tage', 'tropennaechte', 'sommertage', 'heiztage', 'vegetationstage', 'frosttage', 'eistage', 'tagesmitteltemperatur'] ALL_WEEKLY_ATTRIBUTES = ['verbrauch_woche_minus1', 'verbrauch_woche_minus2', 'verbrauch_woche_minus3', 'verbrauch_woche_minus4', 'verbrauch_rolling_12m_woche_minus1', 'zaehlerstand_woche_minus1', 'zaehlerstand_woche_minus2', 'zaehlerstand_woche_minus3', 'minmax_woche_minus1_min', 'minmax_woche_minus1_max', 'minmax_woche_minus1_avg', 'minmax_woche_minus2_min', 'minmax_woche_minus2_max', 'minmax_woche_minus2_avg', 'serie_minmax_woche_min_30w', 'serie_minmax_woche_max_30w', 'serie_minmax_woche_avg_30w', 'serie_verbrauch_woche_30w', 'serie_zaehlerstand_woche_30w'] ALL_MONTHLY_ATTRIBUTES = ['verbrauch_monat_minus1', 'verbrauch_monat_minus2', 'verbrauch_monat_minus3', 'verbrauch_monat_minus4', 'verbrauch_monat_minus12', 'verbrauch_rolling_12m_monat_minus1', 'zaehlerstand_monat_minus1', 'zaehlerstand_monat_minus2', 'zaehlerstand_monat_minus3', 'minmax_monat_minus1_min', 'minmax_monat_minus1_max', 'minmax_monat_minus1_avg', 'minmax_monat_minus2_min', 'minmax_monat_minus2_max', 'minmax_monat_minus2_avg', 'serie_minmax_monat_min_15m', 'serie_minmax_monat_max_15m', 'serie_minmax_monat_avg_15m', 'serie_verbrauch_monat_18m', 'serie_zaehlerstand_monat_18m', 'serie_waermesumme_monat_24m', 'serie_kaeltesumme_monat_24m'] ALL_YEARLY_ATTRIBUTES = ['verbrauch_jahr_minus1', 'verbrauch_jahr_minus2', 'verbrauch_rolling_12m_jahr_minus1', 'zaehlerstand_jahr_minus1', 'zaehlerstand_jahr_minus2', 'zaehlerstand_jahr_minus3', 'minmax_jahr_minus1_min', 'minmax_jahr_minus1_max', 'minmax_jahr_minus1_avg'] ALL_PARAMS_ATTRIBUTES = ['kaeltesumme', 'waermesumme', 'gruenlandtempsumme', 'wachstumsgradtage', 'wuestentage', 'heisse_tage', 'tropennaechte', 'sommertage', 'heiztage', 'vegetationstage', 'frosttage', 'eistage', 'tagesmitteltemperatur', 'db_request', 'minmax', 'minmax_last', 'verbrauch', 'zaehlerstand'] -ALL_VERBRAUCH_ATTRIBUTES = ['verbrauch_heute', 'verbrauch_tag', 'verbrauch_woche', 'verbrauch_monat', 'verbrauch_jahr', 'verbrauch_heute_minus1', 'verbrauch_heute_minus2', 'verbrauch_heute_minus3', 'verbrauch_heute_minus4', 'verbrauch_heute_minus5', 'verbrauch_heute_minus6', 'verbrauch_heute_minus7', 'verbrauch_heute_minus8', 'verbrauch_tag_minus1', 'verbrauch_tag_minus2', 'verbrauch_tag_minus3', 'verbrauch_tag_minus4', 'verbrauch_tag_minus5', 'verbrauch_tag_minus6', 'verbrauch_tag_minus7', 'verbrauch_tag_minus8', 'verbrauch_woche_minus1', 'verbrauch_woche_minus2', 'verbrauch_woche_minus3', 'verbrauch_woche_minus4', 'verbrauch_monat_minus1', 'verbrauch_monat_minus2', 'verbrauch_monat_minus3', 'verbrauch_monat_minus4', 'verbrauch_monat_minus12', 'verbrauch_jahr_minus1', 'verbrauch_jahr_minus2', 'verbrauch_rolling_12m_heute_minus1', 'verbrauch_rolling_12m_tag_minus1', 'verbrauch_rolling_12m_woche_minus1', 'verbrauch_rolling_12m_monat_minus1', 'verbrauch_rolling_12m_jahr_minus1', 'verbrauch_jahreszeitraum_minus1', 'verbrauch_jahreszeitraum_minus2', 'verbrauch_jahreszeitraum_minus3'] +ALL_VERBRAUCH_ATTRIBUTES = ['verbrauch_heute', 'verbrauch_tag', 'verbrauch_woche', 'verbrauch_monat', 'verbrauch_jahr', 'verbrauch_last_24h', 'verbrauch_last_7d', 'verbrauch_heute_minus1', 'verbrauch_heute_minus2', 'verbrauch_heute_minus3', 'verbrauch_heute_minus4', 'verbrauch_heute_minus5', 'verbrauch_heute_minus6', 'verbrauch_heute_minus7', 'verbrauch_heute_minus8', 'verbrauch_tag_minus1', 'verbrauch_tag_minus2', 'verbrauch_tag_minus3', 'verbrauch_tag_minus4', 'verbrauch_tag_minus5', 'verbrauch_tag_minus6', 'verbrauch_tag_minus7', 'verbrauch_tag_minus8', 'verbrauch_woche_minus1', 'verbrauch_woche_minus2', 'verbrauch_woche_minus3', 'verbrauch_woche_minus4', 'verbrauch_monat_minus1', 'verbrauch_monat_minus2', 'verbrauch_monat_minus3', 'verbrauch_monat_minus4', 'verbrauch_monat_minus12', 'verbrauch_jahr_minus1', 'verbrauch_jahr_minus2', 'verbrauch_rolling_12m_heute_minus1', 'verbrauch_rolling_12m_tag_minus1', 'verbrauch_rolling_12m_woche_minus1', 'verbrauch_rolling_12m_monat_minus1', 'verbrauch_rolling_12m_jahr_minus1', 'verbrauch_jahreszeitraum_minus1', 'verbrauch_jahreszeitraum_minus2', 'verbrauch_jahreszeitraum_minus3'] VERBRAUCH_ATTRIBUTES_ONCHANGE = ['verbrauch_heute', 'verbrauch_tag', 'verbrauch_woche', 'verbrauch_monat', 'verbrauch_jahr'] VERBRAUCH_ATTRIBUTES_TIMEFRAME = ['verbrauch_heute_minus1', 'verbrauch_heute_minus2', 'verbrauch_heute_minus3', 'verbrauch_heute_minus4', 'verbrauch_heute_minus5', 'verbrauch_heute_minus6', 'verbrauch_heute_minus7', 'verbrauch_heute_minus8', 'verbrauch_tag_minus1', 'verbrauch_tag_minus2', 'verbrauch_tag_minus3', 'verbrauch_tag_minus4', 'verbrauch_tag_minus5', 'verbrauch_tag_minus6', 'verbrauch_tag_minus7', 'verbrauch_tag_minus8', 'verbrauch_woche_minus1', 'verbrauch_woche_minus2', 'verbrauch_woche_minus3', 'verbrauch_woche_minus4', 'verbrauch_monat_minus1', 'verbrauch_monat_minus2', 'verbrauch_monat_minus3', 'verbrauch_monat_minus4', 'verbrauch_monat_minus12', 'verbrauch_jahr_minus1', 'verbrauch_jahr_minus2'] +VERBRAUCH_ATTRIBUTES_LAST = ['verbrauch_last_24h', 'verbrauch_last_7d'] VERBRAUCH_ATTRIBUTES_ROLLING = ['verbrauch_rolling_12m_heute_minus1', 'verbrauch_rolling_12m_tag_minus1', 'verbrauch_rolling_12m_woche_minus1', 'verbrauch_rolling_12m_monat_minus1', 'verbrauch_rolling_12m_jahr_minus1'] VERBRAUCH_ATTRIBUTES_JAHRESZEITRAUM = ['verbrauch_jahreszeitraum_minus1', 'verbrauch_jahreszeitraum_minus2', 'verbrauch_jahreszeitraum_minus3'] ALL_ZAEHLERSTAND_ATTRIBUTES = ['zaehlerstand_heute_minus1', 'zaehlerstand_heute_minus2', 'zaehlerstand_heute_minus3', 'zaehlerstand_tag_minus1', 'zaehlerstand_tag_minus2', 'zaehlerstand_tag_minus3', 'zaehlerstand_woche_minus1', 'zaehlerstand_woche_minus2', 'zaehlerstand_woche_minus3', 'zaehlerstand_monat_minus1', 'zaehlerstand_monat_minus2', 'zaehlerstand_monat_minus3', 'zaehlerstand_jahr_minus1', 'zaehlerstand_jahr_minus2', 'zaehlerstand_jahr_minus3'] diff --git a/db_addon/item_attributes_master.py b/db_addon/item_attributes_master.py index ae6855bca..b6ddb65a0 100644 --- a/db_addon/item_attributes_master.py +++ b/db_addon/item_attributes_master.py @@ -27,7 +27,7 @@ DOC_FILE_NAME = 'user_doc.rst' -PLUGIN_VERSION = '1.2.4' +PLUGIN_VERSION = '1.2.5' ITEM_ATTRIBUTES = { 'db_addon_fct': { @@ -36,6 +36,8 @@ 'verbrauch_woche': {'cat': 'verbrauch', 'sub_cat': 'onchange', 'item_type': 'num', 'calc': 'onchange', 'params': False, 'description': 'Verbrauch in der aktuellen Woche'}, 'verbrauch_monat': {'cat': 'verbrauch', 'sub_cat': 'onchange', 'item_type': 'num', 'calc': 'onchange', 'params': False, 'description': 'Verbrauch im aktuellen Monat'}, 'verbrauch_jahr': {'cat': 'verbrauch', 'sub_cat': 'onchange', 'item_type': 'num', 'calc': 'onchange', 'params': False, 'description': 'Verbrauch im aktuellen Jahr'}, + 'verbrauch_last_24h': {'cat': 'verbrauch', 'sub_cat': 'last', 'item_type': 'num', 'calc': 'hourly', 'params': False, 'description': 'Verbrauch innerhalb letzten 24h'}, + 'verbrauch_last_7d': {'cat': 'verbrauch', 'sub_cat': 'last', 'item_type': 'num', 'calc': 'hourly', 'params': False, 'description': 'Verbrauch innerhalb letzten 7 Tage'}, 'verbrauch_heute_minus1': {'cat': 'verbrauch', 'sub_cat': 'timeframe', 'item_type': 'num', 'calc': 'daily', 'params': False, 'description': 'Verbrauch gestern (heute -1 Tag) (Differenz zwischen Wert am Ende des gestrigen Tages und dem Wert am Ende des Tages davor)'}, 'verbrauch_heute_minus2': {'cat': 'verbrauch', 'sub_cat': 'timeframe', 'item_type': 'num', 'calc': 'daily', 'params': False, 'description': 'Verbrauch vorgestern (heute -2 Tage)'}, 'verbrauch_heute_minus3': {'cat': 'verbrauch', 'sub_cat': 'timeframe', 'item_type': 'num', 'calc': 'daily', 'params': False, 'description': 'Verbrauch heute -3 Tage'}, @@ -247,6 +249,7 @@ def export_item_attributes_py(): ATTRS = dict() ATTRS['ALL_ONCHANGE_ATTRIBUTES'] = get_attrs(sub_dict={'calc': 'onchange'}) + ATTRS['ALL_HOURLY_ATTRIBUTES'] = get_attrs(sub_dict={'calc': 'hourly'}) ATTRS['ALL_DAILY_ATTRIBUTES'] = get_attrs(sub_dict={'calc': 'daily'}) ATTRS['ALL_WEEKLY_ATTRIBUTES'] = get_attrs(sub_dict={'calc': 'weekly'}) ATTRS['ALL_MONTHLY_ATTRIBUTES'] = get_attrs(sub_dict={'calc': 'monthly'}) @@ -255,6 +258,7 @@ def export_item_attributes_py(): ATTRS['ALL_VERBRAUCH_ATTRIBUTES'] = get_attrs(sub_dict={'cat': 'verbrauch'}) ATTRS['VERBRAUCH_ATTRIBUTES_ONCHANGE'] = get_attrs(sub_dict={'cat': 'verbrauch', 'sub_cat': 'onchange'}) ATTRS['VERBRAUCH_ATTRIBUTES_TIMEFRAME'] = get_attrs(sub_dict={'cat': 'verbrauch', 'sub_cat': 'timeframe'}) + ATTRS['VERBRAUCH_ATTRIBUTES_LAST'] = get_attrs(sub_dict={'cat': 'verbrauch', 'sub_cat': 'last'}) ATTRS['VERBRAUCH_ATTRIBUTES_ROLLING'] = get_attrs(sub_dict={'cat': 'verbrauch', 'sub_cat': 'rolling'}) ATTRS['VERBRAUCH_ATTRIBUTES_JAHRESZEITRAUM'] = get_attrs(sub_dict={'cat': 'verbrauch', 'sub_cat': 'jahrzeit'}) ATTRS['ALL_ZAEHLERSTAND_ATTRIBUTES'] = get_attrs(sub_dict={'cat': 'zaehler'}) diff --git a/db_addon/locale.yaml b/db_addon/locale.yaml index 2c14a15da..b465b6014 100644 --- a/db_addon/locale.yaml +++ b/db_addon/locale.yaml @@ -1,6 +1,7 @@ # translations for the web interface plugin_translations: # Translations for the plugin specially for the web interface + 'hourly': {'de': 'stündlich', 'en': 'hourly'} 'daily': {'de': 'täglich', 'en': 'daily'} 'weekly': {'de': 'wöchentlich', 'en': '='} 'monthly': {'de': 'monatlich', 'en': '='} diff --git a/db_addon/plugin.yaml b/db_addon/plugin.yaml index 44aebd666..dfb51fbb7 100644 --- a/db_addon/plugin.yaml +++ b/db_addon/plugin.yaml @@ -11,7 +11,7 @@ plugin: # keywords: iot xyz # documentation: https://github.com/smarthomeNG/smarthome/wiki/CLI-Plugin # url of documentation (wiki) page support: https://knx-user-forum.de/forum/supportforen/smarthome-py/1848494-support-thread-databaseaddon-plugin - version: 1.2.4 # Plugin version (must match the version specified in __init__.py) + version: 1.2.5 # Plugin version (must match the version specified in __init__.py) sh_minversion: 1.9.3.5 # minimum shNG version to use this plugin # sh_maxversion: # maximum shNG version to use this plugin (leave empty if latest) py_minversion: 3.8 # minimum Python version to use for this plugin @@ -82,6 +82,8 @@ item_attributes: - verbrauch_woche - verbrauch_monat - verbrauch_jahr + - verbrauch_last_24h + - verbrauch_last_7d - verbrauch_heute_minus1 - verbrauch_heute_minus2 - verbrauch_heute_minus3 @@ -239,6 +241,8 @@ item_attributes: - Verbrauch in der aktuellen Woche - Verbrauch im aktuellen Monat - Verbrauch im aktuellen Jahr + - Verbrauch innerhalb letzten 24h + - Verbrauch innerhalb letzten 7 Tage - Verbrauch gestern (heute -1 Tag) (Differenz zwischen Wert am Ende des gestrigen Tages und dem Wert am Ende des Tages davor) - Verbrauch vorgestern (heute -2 Tage) - Verbrauch heute -3 Tage @@ -505,6 +509,8 @@ item_attributes: - num - num - num + - num + - num - list - list - list @@ -553,6 +559,8 @@ item_attributes: - onchange - onchange - onchange + - hourly + - hourly - daily - daily - daily @@ -792,6 +800,14 @@ item_structs: visu_acl: ro # cache: yes + verbrauch_last_24h: + name: Verbrauch innerhalb der letzten 24h + db_addon_fct: verbrauch_last_24h + db_addon_startup: yes + type: num + visu_acl: ro + # cache: yes + verbrauch_woche: name: Verbrauch seit Wochenbeginn db_addon_fct: verbrauch_woche diff --git a/db_addon/user_doc.rst b/db_addon/user_doc.rst index bb3457f48..a83616b44 100644 --- a/db_addon/user_doc.rst +++ b/db_addon/user_doc.rst @@ -68,6 +68,7 @@ Hinweis: Das Plugin selbst ist aktuell nicht multi-instance fähig. Das bedeutet des Database-Plugin abgebunden werden kann. + Konfiguration ============= @@ -92,9 +93,230 @@ Dazu folgenden Block am Ende der Datei */etc/mysql/my.cnf* einfügen bzw den exi interactive_timeout = 28800 -db_addon Item-Attribute -======================= +Hinweise +======== + + - Das Plugin startet die Berechnungen der Werte nach einer gewissen (konfigurierbaren) Zeit (Attribut `startup_run_delay`) + nach dem Start von shNG, um den Startvorgang nicht zu beeinflussen. + + - Bei Start werden automatisch nur die Items berechnet, für das das Attribute `db_addon_startup` gesetzt wurde. Alle anderen + Items werden erst zur konfigurierten Zeit berechnet. Das Attribute `db_addon_startup` kann auch direkt am `Database-Item` + gesetzt werden. Dabei wird das Attribut auf alle darunter liegenden `db_addon-Items` (bspw. bei Verwendung von structs) vererbt. + Über das WebIF kann die Berechnung aller definierten Items ausgelöst werden. + + - Für sogenannte `on_change` Items, also Items, deren Berechnung bis zum Jetzt (bspw. verbrauch-heute) gehen, wird die Berechnung + immer bei eintreffen eines neuen Wertes gestartet. Zu Reduktion der Belastung auf die Datenbank werden die Werte für das Ende der + letzten Periode gecached. + + - Berechnungen werden nur ausgeführt, wenn für den kompletten abgefragten Zeitraum Werte in der Datenbank vorliegen. Wird bspw. + der Verbrauch des letzten Monats abgefragt wobei erst Werte ab dem 3. des Monats in der Datenbank sind, wird die Berechnung abgebrochen. + + - Mit dem Attribut `use_oldest_entry` kann dieses Verhalten verändert werden. Ist das Attribut gesetzt, wird, wenn für den + Beginn der Abfragezeitraums keinen Werte vorliegen, der älteste Eintrag der Datenbank genutzt. + + - Für die Auswertung kann es nützlich sein, bestimmte Werte aus der Datenbank bei der Berechnung auszublenden. Hierfür stehen + 2 Möglichkeiten zur Verfügung: + - Plugin-Attribut `ignore_0`: (list of strings) Bei Items, bei denen ein String aus der Liste im Pfadnamen vorkommt, + werden 0-Werte (val_num = 0) bei Datenbankauswertungen ignoriert. Hat also das Attribut den Wert ['temp'] werden bei allen Items mit + 'temp' im Pfadnamen die 0-Werte bei der Auswertung ignoriert. + - Item-Attribut `db_addon_ignore_value`: (num) Dieser Wert wird bei der Abfrage bzw. Auswertung der Datenbank für diese + Item ignoriert. + + - Das Plugin enthält sehr ausführliche Logginginformation. Bei unerwartetem Verhalten, den LogLevel entsprechend anpassen, + um mehr information zu erhalten. + + - Berechnungen des Plugins können im WebIF unterbrochen werden. Auch das gesamte Plugin kann pausiert werden. Dies kann bei + starker Systembelastung nützlich sein. + + +Beispiele +========= + +Verbrauch +--------- + +Soll bspw. der Verbrauch von Wasser ausgewertet werden, so ist dies wie folgt möglich: + + +.. code-block:: yaml + + wasserzaehler: + zaehlerstand: + type: num + knx_dpt: 12 + knx_cache: 5/3/4 + eval: round(value/1000, 1) + database: init + struct: + - db_addon.verbrauch_1 + - db_addon.verbrauch_2 + - db_addon.zaehlerstand_1 + +Die Werte des Wasserzählerstandes werden in die Datenbank geschrieben und darauf basierend ausgewertet. Die structs +'db_addon.verbrauch_1' und 'db_addon.verbrauch_2' stellen entsprechende Items für die Verbrauchsauswerten zur Verfügung. + +minmax +------ + +Soll bspw. die minimalen und maximalen Temperaturen ausgewertet werden, kann dies so umgesetzt werden: + +.. code-block:: yaml + + temperature: + aussen: + nord: + name: Außentemp Nordseite + type: num + visu_acl: ro + knx_dpt: 9 + knx_cache: 6/5/1 + database: init + struct: + - db_addon.minmax_1 + - db_addon.minmax_2 + +Die Temperaturwerte werden in die Datenbank geschrieben und darauf basierend ausgewertet. Die structs +'db_addon.minmax_1' und 'db_addon.minmax_2' stellen entsprechende Items für die min/max Auswertung zur Verfügung. + +| + +Web Interface +============= + +Das WebIF stellt neben der Ansicht verbundener Items und deren Parameter und Werte auch Funktionen für die +Administration des Plugins bereit. + +Es stehen Button für: + +- Neuberechnung aller Items +- Abbruch eines aktiven Berechnungslaufes +- Pausieren des Plugins +- Wiederaufnahme des Plugins + +bereit. + +Achtung: Das Auslösen einer kompletten Neuberechnung aller Items kann zu einer starken Belastung der Datenbank +aufgrund vieler Leseanfragen führen. + + +db_addon Items +-------------- + +Dieser Reiter des Webinterface zeigt die Items an, für die ein DatabaseAddon Attribut konfiguriert ist. + + +db_addon Maintenance +-------------------- + +Das Webinterface zeigt detaillierte Informationen über die im Plugin verfügbaren Daten an. +Dies dient der Maintenance bzw. Fehlersuche. Dieser Tab ist nur bei Log-Level "Debug" verfügbar. + + +Erläuterungen zu Temperatursummen +================================= + + +Grünlandtemperatursumme +----------------------- + +Beim Grünland wird die Wärmesumme nach Ernst und Loeper benutzt, um den Vegetationsbeginn und somit den Termin von Düngungsmaßnahmen zu bestimmen. +Dabei erfolgt die Aufsummierung der Tagesmitteltemperaturen über 0 °C, wobei der Januar mit 0.5 und der Februar mit 0.75 gewichtet wird. +Bei einer Wärmesumme von 200 Grad ist eine Düngung angesagt. + +siehe: https://de.wikipedia.org/wiki/Gr%C3%BCnlandtemperatursumme + +Folgende Parameter sind möglich / notwendig: + + +.. code-block:: yaml + + db_addon_params: "year=current" + +- year: Jahreszahl (str oder int), für das die Berechnung ausgeführt werden soll oder "current" für aktuelles Jahr (default: 'current') + + +Wachstumsgradtag +---------------- +Der Begriff Wachstumsgradtage (WGT) ist ein Überbegriff für verschiedene Größen. +Gemeinsam ist ihnen, daß zur Berechnung eine Lufttemperatur von einem Schwellenwert subtrahiert wird. +Je nach Fragestellung und Pflanzenart werden der Schwellenwert unterschiedlich gewählt und die Temperatur unterschiedlich bestimmt. +Verfügbar sind die Berechnung über 0) "einfachen Durchschnitt der Tagestemperaturen", 1) "modifizierten Durchschnitt der Tagestemperaturen" +und 2) Anzahl der Tage, deren Mitteltempertatur oberhalb der Schwellentemperatur lag. + +siehe https://de.wikipedia.org/wiki/Wachstumsgradtag + +Folgende Parameter sind möglich / notwendig: + +.. code-block:: yaml + + db_addon_params: "year=current, method=1, threshold=10" + +- year: Jahreszahl (str oder int), für das die Berechnung ausgeführt werden soll oder "current" für aktuelles Jahr (default: 'current') +- method: 0-Berechnung über "einfachen Durchschnitt der Tagestemperaturen", 1-Berechnung über "modifizierten Durchschnitt (default: 0) +der Tagestemperaturen" 2-Anzahl der Tage, mit Mitteltempertatur oberhalb Schwellentemperatur// 10, 11 Ausgabe aus Zeitserie +- threshold: Schwellentemperatur in °C (int) (default: 10) + + +Wärmesumme +---------- + +Die Wärmesumme soll eine Aussage über den Sommer und die Pflanzenreife liefern. Es gibt keine eindeutige Definition der Größe "Wärmesumme". +Berechnet wird die Wärmesumme als Summe aller Tagesmitteltemperaturen über einem Schwellenwert ab dem 1.1. des Jahres. + +siehe https://de.wikipedia.org/wiki/W%C3%A4rmesumme + +Folgende Parameter sind möglich / notwendig: + +.. code-block:: yaml + + db_addon_params: "year=current, month=1, threshold=10" + +- year: Jahreszahl (str oder int), für das die Berechnung ausgeführt werden soll oder "current" für aktuelles Jahr (default: 'current') +- month: Monat (int) des Jahres, für das die Berechnung ausgeführt werden soll (optional) (default: None) +- threshold: Schwellentemperatur in °C (int) (default: 10) + + +Kältesumme +---------- + +Die Kältesumme soll eine Aussage über die Härte des Winters liefern. +Berechnet wird die Kältesumme als Summe aller negativen Tagesmitteltemperaturen ab dem 21.9. des Jahres bis 31.3. des Folgejahres. + +siehe https://de.wikipedia.org/wiki/K%C3%A4ltesumme + +Folgende Parameter sind möglich / notwendig: + +.. code-block:: yaml + + db_addon_params: "year=current, month=1" + +- year: Jahreszahl (str oder int), für das die Berechnung ausgeführt werden soll oder "current" für aktuelles Jahr (default: 'current') +- month: Monat (int) des Jahres, für das die Berechnung ausgeführt werden soll (optional) (default: None) + + +Tagesmitteltemperatur +--------------------- + +Die Tagesmitteltemperatur wird auf Basis der stündlichen Durchschnittswerte eines Tages (aller in der DB enthaltenen Datensätze) +für die angegebene Anzahl von Tagen (days=optional) berechnet. + + + +Vorgehen bei Funktionserweiterung des Plugins bzw. Ergänzung weiterer Werte für Item-Attribute +---------------------------------------------------------------------------------------------- + +Aufgrund der Vielzahl der möglichen Werte der Itemattribute, insbesondere des Itemattributes `db_addon_fct`, wurde die Erstellung/Update +der entsprechenden Teile der `plugin.yam` sowie die Erstellung der Datei `item_attributes.py`, die vom Plugin verwendet wird, automatisiert. + +Die Masterinformationen für alle Itemattribute sowie die Skripte zum Erstellen/Update der beiden Dateien sind in der +Datei `item_attributes_master.py` enthalten. + +.. important:: + + Korrekturen, Erweiterungen etc. der Itemattribute sollten nur in der Datei `item_attributes_master.py` + im Dict der Variable `ITEM_ATTRIBUTS` vorgenommen werden. Das Ausführen der Datei `item_attributes_master.py` (main) + erstellt die `item_attributes.py` und aktualisiert die `plugin.yaml` entsprechend. Dieses Kapitel wurde automatisch durch Ausführen des Skripts in der Datei 'item_attributes_master.py' erstellt. Nachfolgend eine Auflistung der möglichen Attribute für das Plugin im Format: Attribute: Beschreibung | Berechnungszyklus | Item-Type @@ -113,6 +335,10 @@ db_addon_fct - verbrauch_jahr: Verbrauch im aktuellen Jahr | Berechnung: onchange | Item-Type: num +- verbrauch_last_24h: Verbrauch innerhalb letzten 24h | Berechnung: hourly | Item-Type: num + +- verbrauch_last_7d: Verbrauch innerhalb letzten 7 Tage | Berechnung: hourly | Item-Type: num + - verbrauch_heute_minus1: Verbrauch gestern (heute -1 Tag) (Differenz zwischen Wert am Ende des gestrigen Tages und dem Wert am Ende des Tages davor) | Berechnung: daily | Item-Type: num - verbrauch_heute_minus2: Verbrauch vorgestern (heute -2 Tage) | Berechnung: daily | Item-Type: num @@ -466,67 +692,6 @@ Hinweise starker Systembelastung nützlich sein. -Konfiguration im Item -===================== - -direkt ------- -Bei der direkten Konfiguration wird das auszuwertende Database-Item durch das Plugin selbst bestimmt. Dazu muss die Konfiguration des -Attributes `db_addon_fct` oder eines entsprechenden `struct` direkt im Database-Item oder in der Itemstruktur bis zu 3 Ebenen darunter erfolgen. - -.. code-block:: yaml - wasserzaehler: - zaehlerstand: - type: num - knx_dpt: 12 - knx_cache: 5/3/4 - database: init - struct: - - db_addon.verbrauch_1 - -oder - -.. code-block:: yaml - wasserzaehler: - zaehlerstand: - type: num - knx_dpt: 12 - knx_cache: 5/3/4 - database: init - - auswertung: - type: foo - struct: - - db_addon.verbrauch_1 - - -indirekt --------- -Bei der indirekten Konfiguration muss das auszuwertende Database-Item zusätzlich über das Attribut `db_addon_database_item` konfiguriert/angegeben werden. -Die Konfiguration kann somit frei im Itembaum erfolgen. Es wird hier der gleiche Syntax wie bei `eval_trigger` verwendet (Itempfad als String) - -.. code-block:: yaml - wasserzaehler: - zaehlerstand: - type: num - knx_dpt: 12 - knx_cache: 5/3/4 - database: init - - auswertungen: - wasser: - typ: foo - db_addon_database_item: wasserzaehler.zaehlerstand - db_addon_startup: yes - db_addon_ignore_value_list: ['!=0'] - struct: - - db_addon.verbrauch_1 - -Hinweis: -Da ein Zähler nicht 0 werden kann/sollte, aber beim Starten/Beenden von shNG auch 0 in die Datenbank geschrieben wird, kann man mit Hilfe des Attributs `db_addon_ignore_value_list` -diese Werte bei Abfragen der Datenbank maskieren. - - Beispiele ========= @@ -537,6 +702,7 @@ Soll bspw. der Verbrauch von Wasser ausgewertet werden, so ist dies wie folgt m .. code-block:: yaml + wasserzaehler: zaehlerstand: type: num @@ -558,6 +724,7 @@ minmax Soll bspw. die minimalen und maximalen Temperaturen ausgewertet werden, kann dies so umgesetzt werden: .. code-block:: yaml + temperature: aussen: nord: @@ -574,7 +741,7 @@ Soll bspw. die minimalen und maximalen Temperaturen ausgewertet werden, kann die Die Temperaturwerte werden in die Datenbank geschrieben und darauf basierend ausgewertet. Die structs 'db_addon.minmax_1' und 'db_addon.minmax_2' stellen entsprechende Items für die min/max Auswertung zur Verfügung. - +| Web Interface ============= @@ -615,8 +782,8 @@ Erläuterungen zu Temperatursummen Grünlandtemperatursumme ----------------------- -Beim Grünland wird die Wärmesumme nach Ernst und Loeper benutzt, um den Vegetationsbeginn und somit den Termin von Düngungsmaßnahmen zu bestimmen. -Dabei erfolgt die Aufsummierung der Tagesmitteltemperaturen über 0 °C, wobei der Januar mit 0.5 und der Februar mit 0.75 gewichtet wird. +Beim Grünland wird die Wärmesumme nach Ernst und Loeper benutzt, um den Vegetationsbeginn und somit den Termin von Düngungsmaßnahmen zu bestimmen. +Dabei erfolgt die Aufsummierung der Tagesmitteltemperaturen über 0 °C, wobei der Januar mit 0.5 und der Februar mit 0.75 gewichtet wird. Bei einer Wärmesumme von 200 Grad ist eine Düngung angesagt. siehe: https://de.wikipedia.org/wiki/Gr%C3%BCnlandtemperatursumme @@ -625,6 +792,7 @@ Folgende Parameter sind möglich / notwendig: .. code-block:: yaml + db_addon_params: "year=current" - year: Jahreszahl (str oder int), für das die Berechnung ausgeführt werden soll oder "current" für aktuelles Jahr (default: 'current') @@ -632,10 +800,10 @@ Folgende Parameter sind möglich / notwendig: Wachstumsgradtag ---------------- -Der Begriff Wachstumsgradtage (WGT) ist ein Überbegriff für verschiedene Größen. -Gemeinsam ist ihnen, daß zur Berechnung eine Lufttemperatur von einem Schwellenwert subtrahiert wird. -Je nach Fragestellung und Pflanzenart werden der Schwellenwert unterschiedlich gewählt und die Temperatur unterschiedlich bestimmt. -Verfügbar sind die Berechnung über 0) "einfachen Durchschnitt der Tagestemperaturen", 1) "modifizierten Durchschnitt der Tagestemperaturen" +Der Begriff Wachstumsgradtage (WGT) ist ein Überbegriff für verschiedene Größen. +Gemeinsam ist ihnen, daß zur Berechnung eine Lufttemperatur von einem Schwellenwert subtrahiert wird. +Je nach Fragestellung und Pflanzenart werden der Schwellenwert unterschiedlich gewählt und die Temperatur unterschiedlich bestimmt. +Verfügbar sind die Berechnung über 0) "einfachen Durchschnitt der Tagestemperaturen", 1) "modifizierten Durchschnitt der Tagestemperaturen" und 2) Anzahl der Tage, deren Mitteltempertatur oberhalb der Schwellentemperatur lag. siehe https://de.wikipedia.org/wiki/Wachstumsgradtag @@ -643,6 +811,7 @@ siehe https://de.wikipedia.org/wiki/Wachstumsgradtag Folgende Parameter sind möglich / notwendig: .. code-block:: yaml + db_addon_params: "year=current, method=1, threshold=10" - year: Jahreszahl (str oder int), für das die Berechnung ausgeführt werden soll oder "current" für aktuelles Jahr (default: 'current') @@ -655,13 +824,14 @@ Wärmesumme ---------- Die Wärmesumme soll eine Aussage über den Sommer und die Pflanzenreife liefern. Es gibt keine eindeutige Definition der Größe "Wärmesumme". -Berechnet wird die Wärmesumme als Summe aller Tagesmitteltemperaturen über einem Schwellenwert ab dem 1.1. des Jahres. +Berechnet wird die Wärmesumme als Summe aller Tagesmitteltemperaturen über einem Schwellenwert ab dem 1.1. des Jahres. siehe https://de.wikipedia.org/wiki/W%C3%A4rmesumme Folgende Parameter sind möglich / notwendig: .. code-block:: yaml + db_addon_params: "year=current, month=1, threshold=10" - year: Jahreszahl (str oder int), für das die Berechnung ausgeführt werden soll oder "current" für aktuelles Jahr (default: 'current') @@ -672,7 +842,7 @@ Folgende Parameter sind möglich / notwendig: Kältesumme ---------- -Die Kältesumme soll eine Aussage über die Härte des Winters liefern. +Die Kältesumme soll eine Aussage über die Härte des Winters liefern. Berechnet wird die Kältesumme als Summe aller negativen Tagesmitteltemperaturen ab dem 21.9. des Jahres bis 31.3. des Folgejahres. siehe https://de.wikipedia.org/wiki/K%C3%A4ltesumme @@ -680,6 +850,7 @@ siehe https://de.wikipedia.org/wiki/K%C3%A4ltesumme Folgende Parameter sind möglich / notwendig: .. code-block:: yaml + db_addon_params: "year=current, month=1" - year: Jahreszahl (str oder int), für das die Berechnung ausgeführt werden soll oder "current" für aktuelles Jahr (default: 'current') @@ -697,14 +868,14 @@ für die angegebene Anzahl von Tagen (days=optional) berechnet. Vorgehen bei Funktionserweiterung des Plugins bzw. Ergänzung weiterer Werte für Item-Attribute ---------------------------------------------------------------------------------------------- -Augrund der Vielzahl der möglichen Werte der Itemattribute, insbesondere des Itemattributes`db_addon_fct`, wurde die Erstellung/Update +Aufgrund der Vielzahl der möglichen Werte der Itemattribute, insbesondere des Itemattributes `db_addon_fct`, wurde die Erstellung/Update der entsprechenden Teile der `plugin.yam` sowie die Erstellung der Datei `item_attributes.py`, die vom Plugin verwendet wird, automatisiert. -Die Masterinformationen für alle Itemattributs sowie die Skripte zum Erstellen/Update der beiden Dateien sind in der +Die Masterinformationen für alle Itemattribute sowie die Skripte zum Erstellen/Update der beiden Dateien sind in der Datei `item_attributes_master.py` enthalten. .. important:: Korrekturen, Erweiterungen etc. der Itemattribute sollten nur in der Datei `item_attributes_master.py` im Dict der Variable `ITEM_ATTRIBUTS` vorgenommen werden. Das Ausführen der Datei `item_attributes_master.py` (main) - erstellt die `item_attributes.py` und aktualisiert die `plugin.yaml` entsprechend. \ No newline at end of file + erstellt die `item_attributes.py` und aktualisiert die `plugin.yaml` entsprechend. diff --git a/db_addon/webif/__init__.py b/db_addon/webif/__init__.py index 05dbb8d7a..e4ee8dcee 100644 --- a/db_addon/webif/__init__.py +++ b/db_addon/webif/__init__.py @@ -131,23 +131,40 @@ def get_data_html(self, dataSet=None): self.logger.error(f"get_data_html exception: {e}") @cherrypy.expose - def submit(self, param1=None): - ''' - Submit handler für Ajax - ''' + def submit(self, item=None): result = None + item_path, cmd = item.split(':') + if item_path is not None and cmd is not None: + self.logger.debug(f"Sending db_addon {cmd=} for {item_path=} via web interface") - self.logger.warning(f'{param1}') - - if param1 is not None: - - # verarbeite die Daten - self.logger.warning(f'{param1}') + if cmd == "recalc_item": + self.logger.info(f"Recalc of item={item_path} called via WebIF. Item put to Queue for new calculation.") + result = self.plugin.execute_items(option='item', item=item_path) + self.logger.debug(f"Result for web interface: {result}") + return json.dumps(result).encode('utf-8') - if result_dict is not None: + elif cmd == "clean_item_cache": + self.logger.info(f"Clean item cache of item={item_path} called via WebIF. Plugin item value cache will be cleaned.") + result = self.plugin._clean_item_cache(item=item_path) + self.logger.debug(f"Result for web interface: {result}") + return json.dumps(result).encode('utf-8') + + elif cmd.startswith("set_item_calculation"): + cmd, value = cmd.split(',') + self.logger.info(f"Item calculation of item={item_path} will be set to '{value}' via WebIF.") + if value == "True": + value = True + else: + value = False + result = self.plugin._activate_item_calculation(item=item_path, active=value) + self.logger.debug(f"Result for web interface: {result}") + return json.dumps(result).encode('utf-8') + + if result is not None: # JSON zurücksenden cherrypy.response.headers['Content-Type'] = 'application/json' - return json.dumps(result_dict).encode('utf-8') + self.logger.debug(f"Result for web interface: {result}") + return json.dumps(result).encode('utf-8') @cherrypy.expose def recalc_all(self): @@ -238,4 +255,4 @@ def debug_log_option_sql_true(self): @cherrypy.expose def debug_log_option_sql_false (self): self.logger.debug("debug_log_option_sql_false") - setattr(self.plugin.debug_log, 'sql', False) \ No newline at end of file + setattr(self.plugin.debug_log, 'sql', False) diff --git a/db_addon/webif/templates/index.html b/db_addon/webif/templates/index.html index cf6eb4964..5bcd657ce 100644 --- a/db_addon/webif/templates/index.html +++ b/db_addon/webif/templates/index.html @@ -64,6 +64,49 @@ {% block pluginscripts %} + + @@ -287,10 +307,15 @@ + {% endblock pluginscripts %} @@ -333,24 +358,26 @@ @@ -404,22 +431,11 @@ {% endfor %} @@ -427,6 +443,7 @@
{{ (p.startup_run_delay) }}s
{{ key }}{{ value }}{{ key }}{% for letter in value %}*{% endfor %}
{{ key }}{{ value }}{{ key }}{% for letter in value %}*{% endfor %}
{{ _('Item in Berechnung') }} {{ p.active_queue_item }} {{ p.log_level }} {% if p.log_level == 10 %} - {{ (' || ') }} -
- -
-
- -
-
- -
-
- -
-
- -
-
- +
+ {{ (' || ') }} +
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
{% endif %}
{{ item.property.last_update.strftime('%d.%m.%Y %H:%M:%S') }} {{ item.property.last_change.strftime('%d.%m.%Y %H:%M:%S') }} - - - {% if p.get_item_config(item._path)['active'] %} - - {% else %} - - {% endif %} + + - + +
+
{% endblock bodytab1 %} From 571b923f46a7cbffa1c26f480bbc663e95c3214b Mon Sep 17 00:00:00 2001 From: sisamiwe Date: Thu, 21 Sep 2023 14:06:21 +0200 Subject: [PATCH 12/41] DB_ADDON: - update WebIF for button - debug _handle_verbrauch - update docu - bump to 1.2.6 --- db_addon/__init__.py | 28 +- db_addon/item_attributes_master.py | 2 +- db_addon/plugin.yaml | 2 +- db_addon/user_doc.rst | 562 ++++++++++++++++++++++++++++ db_addon/webif/__init__.py | 22 +- db_addon/webif/templates/index.html | 187 ++++----- 6 files changed, 673 insertions(+), 130 deletions(-) diff --git a/db_addon/__init__.py b/db_addon/__init__.py index b728211e8..737c4fb26 100644 --- a/db_addon/__init__.py +++ b/db_addon/__init__.py @@ -61,7 +61,7 @@ class DatabaseAddOn(SmartPlugin): Main class of the Plugin. Does all plugin specific stuff and provides the update functions for the items """ - PLUGIN_VERSION = '1.2.5' + PLUGIN_VERSION = '1.2.6' def __init__(self, sh): """ @@ -273,7 +273,7 @@ def get_query_parameters_from_db_addon_fct() -> Union[dict, None]: # handle functions 'verbrauch on-demand' in format 'verbrauch_timeframe_timedelta' like 'verbrauch_heute_minus2' timeframe = translate_timeframe(db_addon_fct_vars[1]) end = to_int(split_sting_letters_numbers(db_addon_fct_vars[2])[1]) - start = end + 1 + start = end log_text = 'verbrauch_timeframe_timedelta' required_params = [timeframe, start, end] @@ -673,7 +673,7 @@ def format_db_addon_ignore_value_list(optimize: bool = self.optimize_value_filte query_params.update({'ignore_value_list': db_addon_ignore_value_list_final}) # create standard items config - item_config_data_dict = {'db_addon': 'function', 'db_addon_fct': db_addon_fct, 'database_item': database_item, 'query_params': query_params, 'active': True} + item_config_data_dict = {'db_addon': 'function', 'db_addon_fct': db_addon_fct, 'database_item': database_item, 'query_params': query_params, 'suspended': False} if isinstance(database_item, str): item_config_data_dict.update({'database_item_path': True}) else: @@ -949,9 +949,9 @@ def _create_due_items() -> list: self.logger.info(f"Plugin is suspended. No items will be calculated.") return - deactivated_items = self._deactivated_items() - if len(deactivated_items) > 0: - self.logger.info(f"{len(deactivated_items)} are de-activated and will not be calculated.") + suspended_items = self._suspended_items() + if len(suspended_items) > 0: + self.logger.info(f"{len(suspended_items)} are suspended and will not be calculated.") todo_items = [] if option == 'startup': @@ -974,9 +974,9 @@ def _create_due_items() -> list: if isinstance(item, Item): todo_items = [item] - # remove de-activated items + # remove suspended items if option != 'item': - todo_items = list(set(todo_items) - set(deactivated_items)) + todo_items = list(set(todo_items) - set(suspended_items)) # put to queue self.logger.info(f"{len(todo_items)} items will be calculated for {option=}.") @@ -1270,8 +1270,8 @@ def _update_database_items(self) -> None: if db_addon_startup: item_config.update({'startup': True}) - def _activate_item_calculation(self, item: Union[str, Item], active: bool = True) -> Union[bool, None]: - """active / de-active item calculation""" + def _suspend_item_calculation(self, item: Union[str, Item], suspended: bool = False) -> Union[bool, None]: + """suspend calculation od decicated item""" if isinstance(item, str): item = self.items.return_item(item) @@ -1279,8 +1279,8 @@ def _activate_item_calculation(self, item: Union[str, Item], active: bool = True return item_config = self.get_item_config(item) - item_config['active'] = active - return active + item_config['suspended'] = suspended + return suspended @property def log_level(self) -> int: @@ -1331,8 +1331,8 @@ def _database_item_path_items(self) -> list: def _ondemand_items(self) -> list: return self._daily_items() + self._weekly_items() + self._monthly_items() + self._yearly_items() + self._static_items() - def _deactivated_items(self) -> list: - return self.get_item_list('active', False) + def _suspended_items(self) -> list: + return self.get_item_list('suspended', True) def _all_items(self) -> list: # return self._ondemand_items() + self._onchange_items() + self._static_items() + self._admin_items() + self._info_items() diff --git a/db_addon/item_attributes_master.py b/db_addon/item_attributes_master.py index b6ddb65a0..2244f4ce6 100644 --- a/db_addon/item_attributes_master.py +++ b/db_addon/item_attributes_master.py @@ -27,7 +27,7 @@ DOC_FILE_NAME = 'user_doc.rst' -PLUGIN_VERSION = '1.2.5' +PLUGIN_VERSION = '1.2.6' ITEM_ATTRIBUTES = { 'db_addon_fct': { diff --git a/db_addon/plugin.yaml b/db_addon/plugin.yaml index dfb51fbb7..776c7d7d7 100644 --- a/db_addon/plugin.yaml +++ b/db_addon/plugin.yaml @@ -11,7 +11,7 @@ plugin: # keywords: iot xyz # documentation: https://github.com/smarthomeNG/smarthome/wiki/CLI-Plugin # url of documentation (wiki) page support: https://knx-user-forum.de/forum/supportforen/smarthome-py/1848494-support-thread-databaseaddon-plugin - version: 1.2.5 # Plugin version (must match the version specified in __init__.py) + version: 1.2.6 # Plugin version (must match the version specified in __init__.py) sh_minversion: 1.9.3.5 # minimum shNG version to use this plugin # sh_maxversion: # maximum shNG version to use this plugin (leave empty if latest) py_minversion: 3.8 # minimum Python version to use for this plugin diff --git a/db_addon/user_doc.rst b/db_addon/user_doc.rst index a83616b44..fb274f839 100644 --- a/db_addon/user_doc.rst +++ b/db_addon/user_doc.rst @@ -865,6 +865,568 @@ für die angegebene Anzahl von Tagen (days=optional) berechnet. +Vorgehen bei Funktionserweiterung des Plugins bzw. Ergänzung weiterer Werte für Item-Attribute +---------------------------------------------------------------------------------------------- + +Aufgrund der Vielzahl der möglichen Werte der Itemattribute, insbesondere des Itemattributes `db_addon_fct`, wurde die Erstellung/Update +der entsprechenden Teile der `plugin.yam` sowie die Erstellung der Datei `item_attributes.py`, die vom Plugin verwendet wird, automatisiert. + +Die Masterinformationen für alle Itemattribute sowie die Skripte zum Erstellen/Update der beiden Dateien sind in der +Datei `item_attributes_master.py` enthalten. + +.. important:: + + Korrekturen, Erweiterungen etc. der Itemattribute sollten nur in der Datei `item_attributes_master.py` + im Dict der Variable `ITEM_ATTRIBUTS` vorgenommen werden. Das Ausführen der Datei `item_attributes_master.py` (main) + erstellt die `item_attributes.py` und aktualisiert die `plugin.yaml` entsprechend. +Dieses Kapitel wurde automatisch durch Ausführen des Skripts in der Datei 'item_attributes_master.py' erstellt. + +Nachfolgend eine Auflistung der möglichen Attribute für das Plugin im Format: Attribute: Beschreibung | Berechnungszyklus | Item-Type + + +db_addon_fct +------------ + +- verbrauch_heute: Verbrauch am heutigen Tag (Differenz zwischen aktuellem Wert und den Wert am Ende des vorherigen Tages) | Berechnung: onchange | Item-Type: num + +- verbrauch_tag: Verbrauch am heutigen Tag (Differenz zwischen aktuellem Wert und den Wert am Ende des vorherigen Tages) | Berechnung: onchange | Item-Type: num + +- verbrauch_woche: Verbrauch in der aktuellen Woche | Berechnung: onchange | Item-Type: num + +- verbrauch_monat: Verbrauch im aktuellen Monat | Berechnung: onchange | Item-Type: num + +- verbrauch_jahr: Verbrauch im aktuellen Jahr | Berechnung: onchange | Item-Type: num + +- verbrauch_last_24h: Verbrauch innerhalb letzten 24h | Berechnung: hourly | Item-Type: num + +- verbrauch_last_7d: Verbrauch innerhalb letzten 7 Tage | Berechnung: hourly | Item-Type: num + +- verbrauch_heute_minus1: Verbrauch gestern (heute -1 Tag) (Differenz zwischen Wert am Ende des gestrigen Tages und dem Wert am Ende des Tages davor) | Berechnung: daily | Item-Type: num + +- verbrauch_heute_minus2: Verbrauch vorgestern (heute -2 Tage) | Berechnung: daily | Item-Type: num + +- verbrauch_heute_minus3: Verbrauch heute -3 Tage | Berechnung: daily | Item-Type: num + +- verbrauch_heute_minus4: Verbrauch heute -4 Tage | Berechnung: daily | Item-Type: num + +- verbrauch_heute_minus5: Verbrauch heute -5 Tage | Berechnung: daily | Item-Type: num + +- verbrauch_heute_minus6: Verbrauch heute -6 Tage | Berechnung: daily | Item-Type: num + +- verbrauch_heute_minus7: Verbrauch heute -7 Tage | Berechnung: daily | Item-Type: num + +- verbrauch_heute_minus8: Verbrauch heute -8 Tage | Berechnung: daily | Item-Type: num + +- verbrauch_tag_minus1: Verbrauch gestern (heute -1 Tag) (Differenz zwischen Wert am Ende des gestrigen Tages und dem Wert am Ende des Tages davor) | Berechnung: daily | Item-Type: num + +- verbrauch_tag_minus2: Verbrauch vorgestern (heute -2 Tage) | Berechnung: daily | Item-Type: num + +- verbrauch_tag_minus3: Verbrauch heute -3 Tage | Berechnung: daily | Item-Type: num + +- verbrauch_tag_minus4: Verbrauch heute -4 Tage | Berechnung: daily | Item-Type: num + +- verbrauch_tag_minus5: Verbrauch heute -5 Tage | Berechnung: daily | Item-Type: num + +- verbrauch_tag_minus6: Verbrauch heute -6 Tage | Berechnung: daily | Item-Type: num + +- verbrauch_tag_minus7: Verbrauch heute -7 Tage | Berechnung: daily | Item-Type: num + +- verbrauch_tag_minus8: Verbrauch heute -8 Tage | Berechnung: daily | Item-Type: num + +- verbrauch_woche_minus1: Verbrauch Vorwoche (aktuelle Woche -1) | Berechnung: weekly | Item-Type: num + +- verbrauch_woche_minus2: Verbrauch aktuelle Woche -2 Wochen | Berechnung: weekly | Item-Type: num + +- verbrauch_woche_minus3: Verbrauch aktuelle Woche -3 Wochen | Berechnung: weekly | Item-Type: num + +- verbrauch_woche_minus4: Verbrauch aktuelle Woche -4 Wochen | Berechnung: weekly | Item-Type: num + +- verbrauch_monat_minus1: Verbrauch Vormonat (aktueller Monat -1) | Berechnung: monthly | Item-Type: num + +- verbrauch_monat_minus2: Verbrauch aktueller Monat -2 Monate | Berechnung: monthly | Item-Type: num + +- verbrauch_monat_minus3: Verbrauch aktueller Monat -3 Monate | Berechnung: monthly | Item-Type: num + +- verbrauch_monat_minus4: Verbrauch aktueller Monat -4 Monate | Berechnung: monthly | Item-Type: num + +- verbrauch_monat_minus12: Verbrauch aktueller Monat -12 Monate | Berechnung: monthly | Item-Type: num + +- verbrauch_jahr_minus1: Verbrauch Vorjahr (aktuelles Jahr -1 Jahr) | Berechnung: yearly | Item-Type: num + +- verbrauch_jahr_minus2: Verbrauch aktuelles Jahr -2 Jahre | Berechnung: yearly | Item-Type: num + +- verbrauch_rolling_12m_heute_minus1: Verbrauch der letzten 12 Monate ausgehend im Ende des letzten Tages | Berechnung: daily | Item-Type: num + +- verbrauch_rolling_12m_tag_minus1: Verbrauch der letzten 12 Monate ausgehend im Ende des letzten Tages | Berechnung: daily | Item-Type: num + +- verbrauch_rolling_12m_woche_minus1: Verbrauch der letzten 12 Monate ausgehend im Ende der letzten Woche | Berechnung: weekly | Item-Type: num + +- verbrauch_rolling_12m_monat_minus1: Verbrauch der letzten 12 Monate ausgehend im Ende des letzten Monats | Berechnung: monthly | Item-Type: num + +- verbrauch_rolling_12m_jahr_minus1: Verbrauch der letzten 12 Monate ausgehend im Ende des letzten Jahres | Berechnung: yearly | Item-Type: num + +- verbrauch_jahreszeitraum_minus1: Verbrauch seit dem 1.1. bis zum heutigen Tag des Vorjahres | Berechnung: daily | Item-Type: num + +- verbrauch_jahreszeitraum_minus2: Verbrauch seit dem 1.1. bis zum heutigen Tag vor 2 Jahren | Berechnung: daily | Item-Type: num + +- verbrauch_jahreszeitraum_minus3: Verbrauch seit dem 1.1. bis zum heutigen Tag vor 3 Jahren | Berechnung: daily | Item-Type: num + +- zaehlerstand_heute_minus1: Zählerstand / Wert am Ende des letzten Tages (heute -1 Tag) | Berechnung: daily | Item-Type: num + +- zaehlerstand_heute_minus2: Zählerstand / Wert am Ende des vorletzten Tages (heute -2 Tag) | Berechnung: daily | Item-Type: num + +- zaehlerstand_heute_minus3: Zählerstand / Wert am Ende des vorvorletzten Tages (heute -3 Tag) | Berechnung: daily | Item-Type: num + +- zaehlerstand_tag_minus1: Zählerstand / Wert am Ende des letzten Tages (heute -1 Tag) | Berechnung: daily | Item-Type: num + +- zaehlerstand_tag_minus2: Zählerstand / Wert am Ende des vorletzten Tages (heute -2 Tag) | Berechnung: daily | Item-Type: num + +- zaehlerstand_tag_minus3: Zählerstand / Wert am Ende des vorvorletzten Tages (heute -3 Tag) | Berechnung: daily | Item-Type: num + +- zaehlerstand_woche_minus1: Zählerstand / Wert am Ende der vorvorletzten Woche (aktuelle Woche -1 Woche) | Berechnung: weekly | Item-Type: num + +- zaehlerstand_woche_minus2: Zählerstand / Wert am Ende der vorletzten Woche (aktuelle Woche -2 Wochen) | Berechnung: weekly | Item-Type: num + +- zaehlerstand_woche_minus3: Zählerstand / Wert am Ende der aktuellen Woche -3 Wochen | Berechnung: weekly | Item-Type: num + +- zaehlerstand_monat_minus1: Zählerstand / Wert am Ende des letzten Monates (aktueller Monat -1 Monat) | Berechnung: monthly | Item-Type: num + +- zaehlerstand_monat_minus2: Zählerstand / Wert am Ende des vorletzten Monates (aktueller Monat -2 Monate) | Berechnung: monthly | Item-Type: num + +- zaehlerstand_monat_minus3: Zählerstand / Wert am Ende des aktuellen Monats -3 Monate | Berechnung: monthly | Item-Type: num + +- zaehlerstand_jahr_minus1: Zählerstand / Wert am Ende des letzten Jahres (aktuelles Jahr -1 Jahr) | Berechnung: yearly | Item-Type: num + +- zaehlerstand_jahr_minus2: Zählerstand / Wert am Ende des vorletzten Jahres (aktuelles Jahr -2 Jahre) | Berechnung: yearly | Item-Type: num + +- zaehlerstand_jahr_minus3: Zählerstand / Wert am Ende des aktuellen Jahres -3 Jahre | Berechnung: yearly | Item-Type: num + +- minmax_last_24h_min: minimaler Wert der letzten 24h | Berechnung: daily | Item-Type: num + +- minmax_last_24h_max: maximaler Wert der letzten 24h | Berechnung: daily | Item-Type: num + +- minmax_last_24h_avg: durchschnittlicher Wert der letzten 24h | Berechnung: daily | Item-Type: num + +- minmax_last_7d_min: minimaler Wert der letzten 7 Tage | Berechnung: daily | Item-Type: num + +- minmax_last_7d_max: maximaler Wert der letzten 7 Tage | Berechnung: daily | Item-Type: num + +- minmax_last_7d_avg: durchschnittlicher Wert der letzten 7 Tage | Berechnung: daily | Item-Type: num + +- minmax_heute_min: Minimalwert seit Tagesbeginn | Berechnung: onchange | Item-Type: num + +- minmax_heute_max: Maximalwert seit Tagesbeginn | Berechnung: onchange | Item-Type: num + +- minmax_heute_avg: Durschnittswert seit Tagesbeginn | Berechnung: onchange | Item-Type: num + +- minmax_heute_minus1_min: Minimalwert gestern (heute -1 Tag) | Berechnung: daily | Item-Type: num + +- minmax_heute_minus1_max: Maximalwert gestern (heute -1 Tag) | Berechnung: daily | Item-Type: num + +- minmax_heute_minus1_avg: Durchschnittswert gestern (heute -1 Tag) | Berechnung: daily | Item-Type: num + +- minmax_heute_minus2_min: Minimalwert vorgestern (heute -2 Tage) | Berechnung: daily | Item-Type: num + +- minmax_heute_minus2_max: Maximalwert vorgestern (heute -2 Tage) | Berechnung: daily | Item-Type: num + +- minmax_heute_minus2_avg: Durchschnittswert vorgestern (heute -2 Tage) | Berechnung: daily | Item-Type: num + +- minmax_heute_minus3_min: Minimalwert heute vor 3 Tagen | Berechnung: daily | Item-Type: num + +- minmax_heute_minus3_max: Maximalwert heute vor 3 Tagen | Berechnung: daily | Item-Type: num + +- minmax_heute_minus3_avg: Durchschnittswert heute vor 3 Tagen | Berechnung: daily | Item-Type: num + +- minmax_tag_min: Minimalwert seit Tagesbeginn | Berechnung: onchange | Item-Type: num + +- minmax_tag_max: Maximalwert seit Tagesbeginn | Berechnung: onchange | Item-Type: num + +- minmax_tag_avg: Durschnittswert seit Tagesbeginn | Berechnung: onchange | Item-Type: num + +- minmax_tag_minus1_min: Minimalwert gestern (heute -1 Tag) | Berechnung: daily | Item-Type: num + +- minmax_tag_minus1_max: Maximalwert gestern (heute -1 Tag) | Berechnung: daily | Item-Type: num + +- minmax_tag_minus1_avg: Durchschnittswert gestern (heute -1 Tag) | Berechnung: daily | Item-Type: num + +- minmax_tag_minus2_min: Minimalwert vorgestern (heute -2 Tage) | Berechnung: daily | Item-Type: num + +- minmax_tag_minus2_max: Maximalwert vorgestern (heute -2 Tage) | Berechnung: daily | Item-Type: num + +- minmax_tag_minus2_avg: Durchschnittswert vorgestern (heute -2 Tage) | Berechnung: daily | Item-Type: num + +- minmax_tag_minus3_min: Minimalwert heute vor 3 Tagen | Berechnung: daily | Item-Type: num + +- minmax_tag_minus3_max: Maximalwert heute vor 3 Tagen | Berechnung: daily | Item-Type: num + +- minmax_tag_minus3_avg: Durchschnittswert heute vor 3 Tagen | Berechnung: daily | Item-Type: num + +- minmax_woche_min: Minimalwert seit Wochenbeginn | Berechnung: onchange | Item-Type: num + +- minmax_woche_max: Maximalwert seit Wochenbeginn | Berechnung: onchange | Item-Type: num + +- minmax_woche_minus1_min: Minimalwert Vorwoche (aktuelle Woche -1) | Berechnung: weekly | Item-Type: num + +- minmax_woche_minus1_max: Maximalwert Vorwoche (aktuelle Woche -1) | Berechnung: weekly | Item-Type: num + +- minmax_woche_minus1_avg: Durchschnittswert Vorwoche (aktuelle Woche -1) | Berechnung: weekly | Item-Type: num + +- minmax_woche_minus2_min: Minimalwert aktuelle Woche -2 Wochen | Berechnung: weekly | Item-Type: num + +- minmax_woche_minus2_max: Maximalwert aktuelle Woche -2 Wochen | Berechnung: weekly | Item-Type: num + +- minmax_woche_minus2_avg: Durchschnittswert aktuelle Woche -2 Wochen | Berechnung: weekly | Item-Type: num + +- minmax_monat_min: Minimalwert seit Monatsbeginn | Berechnung: onchange | Item-Type: num + +- minmax_monat_max: Maximalwert seit Monatsbeginn | Berechnung: onchange | Item-Type: num + +- minmax_monat_minus1_min: Minimalwert Vormonat (aktueller Monat -1) | Berechnung: monthly | Item-Type: num + +- minmax_monat_minus1_max: Maximalwert Vormonat (aktueller Monat -1) | Berechnung: monthly | Item-Type: num + +- minmax_monat_minus1_avg: Durchschnittswert Vormonat (aktueller Monat -1) | Berechnung: monthly | Item-Type: num + +- minmax_monat_minus2_min: Minimalwert aktueller Monat -2 Monate | Berechnung: monthly | Item-Type: num + +- minmax_monat_minus2_max: Maximalwert aktueller Monat -2 Monate | Berechnung: monthly | Item-Type: num + +- minmax_monat_minus2_avg: Durchschnittswert aktueller Monat -2 Monate | Berechnung: monthly | Item-Type: num + +- minmax_jahr_min: Minimalwert seit Jahresbeginn | Berechnung: onchange | Item-Type: num + +- minmax_jahr_max: Maximalwert seit Jahresbeginn | Berechnung: onchange | Item-Type: num + +- minmax_jahr_minus1_min: Minimalwert Vorjahr (aktuelles Jahr -1 Jahr) | Berechnung: yearly | Item-Type: num + +- minmax_jahr_minus1_max: Maximalwert Vorjahr (aktuelles Jahr -1 Jahr) | Berechnung: yearly | Item-Type: num + +- minmax_jahr_minus1_avg: Durchschnittswert Vorjahr (aktuelles Jahr -1 Jahr) | Berechnung: yearly | Item-Type: num + +- tagesmitteltemperatur_heute: Tagesmitteltemperatur heute | Berechnung: onchange | Item-Type: num + +- tagesmitteltemperatur_heute_minus1: Tagesmitteltemperatur des letzten Tages (heute -1 Tag) | Berechnung: daily | Item-Type: num + +- tagesmitteltemperatur_heute_minus2: Tagesmitteltemperatur des vorletzten Tages (heute -2 Tag) | Berechnung: daily | Item-Type: num + +- tagesmitteltemperatur_heute_minus3: Tagesmitteltemperatur des vorvorletzten Tages (heute -3 Tag) | Berechnung: daily | Item-Type: num + +- tagesmitteltemperatur_tag: Tagesmitteltemperatur heute | Berechnung: onchange | Item-Type: num + +- tagesmitteltemperatur_tag_minus1: Tagesmitteltemperatur des letzten Tages (heute -1 Tag) | Berechnung: daily | Item-Type: num + +- tagesmitteltemperatur_tag_minus2: Tagesmitteltemperatur des vorletzten Tages (heute -2 Tag) | Berechnung: daily | Item-Type: num + +- tagesmitteltemperatur_tag_minus3: Tagesmitteltemperatur des vorvorletzten Tages (heute -3 Tag) | Berechnung: daily | Item-Type: num + +- serie_minmax_monat_min_15m: monatlicher Minimalwert der letzten 15 Monate (gleitend) | Berechnung: monthly | Item-Type: list + +- serie_minmax_monat_max_15m: monatlicher Maximalwert der letzten 15 Monate (gleitend) | Berechnung: monthly | Item-Type: list + +- serie_minmax_monat_avg_15m: monatlicher Mittelwert der letzten 15 Monate (gleitend) | Berechnung: monthly | Item-Type: list + +- serie_minmax_woche_min_30w: wöchentlicher Minimalwert der letzten 30 Wochen (gleitend) | Berechnung: weekly | Item-Type: list + +- serie_minmax_woche_max_30w: wöchentlicher Maximalwert der letzten 30 Wochen (gleitend) | Berechnung: weekly | Item-Type: list + +- serie_minmax_woche_avg_30w: wöchentlicher Mittelwert der letzten 30 Wochen (gleitend) | Berechnung: weekly | Item-Type: list + +- serie_minmax_tag_min_30d: täglicher Minimalwert der letzten 30 Tage (gleitend) | Berechnung: daily | Item-Type: list + +- serie_minmax_tag_max_30d: täglicher Maximalwert der letzten 30 Tage (gleitend) | Berechnung: daily | Item-Type: list + +- serie_minmax_tag_avg_30d: täglicher Mittelwert der letzten 30 Tage (gleitend) | Berechnung: daily | Item-Type: list + +- serie_verbrauch_tag_30d: Verbrauch pro Tag der letzten 30 Tage | Berechnung: daily | Item-Type: list + +- serie_verbrauch_woche_30w: Verbrauch pro Woche der letzten 30 Wochen | Berechnung: weekly | Item-Type: list + +- serie_verbrauch_monat_18m: Verbrauch pro Monat der letzten 18 Monate | Berechnung: monthly | Item-Type: list + +- serie_zaehlerstand_tag_30d: Zählerstand am Tagesende der letzten 30 Tage | Berechnung: daily | Item-Type: list + +- serie_zaehlerstand_woche_30w: Zählerstand am Wochenende der letzten 30 Wochen | Berechnung: weekly | Item-Type: list + +- serie_zaehlerstand_monat_18m: Zählerstand am Monatsende der letzten 18 Monate | Berechnung: monthly | Item-Type: list + +- serie_waermesumme_monat_24m: monatliche Wärmesumme der letzten 24 Monate | Berechnung: monthly | Item-Type: list + +- serie_kaeltesumme_monat_24m: monatliche Kältesumme der letzten 24 Monate | Berechnung: monthly | Item-Type: list + +- serie_tagesmittelwert_0d: Tagesmittelwert für den aktuellen Tag | Berechnung: daily | Item-Type: list + +- serie_tagesmittelwert_stunde_0d: Stundenmittelwert für den aktuellen Tag | Berechnung: daily | Item-Type: list + +- serie_tagesmittelwert_stunde_30_0d: Stundenmittelwert für den aktuellen Tag | Berechnung: daily | Item-Type: list + +- serie_tagesmittelwert_tag_stunde_30d: Stundenmittelwert pro Tag der letzten 30 Tage (bspw. zur Berechnung der Tagesmitteltemperatur basierend auf den Mittelwert der Temperatur pro Stunde | Berechnung: daily | Item-Type: list + +- general_oldest_value: Ausgabe des ältesten Wertes des entsprechenden "Parent-Items" mit database Attribut | Berechnung: no | Item-Type: num + +- general_oldest_log: Ausgabe des Timestamp des ältesten Eintrages des entsprechenden "Parent-Items" mit database Attribut | Berechnung: no | Item-Type: list + +- kaeltesumme: Berechnet die Kältesumme für einen Zeitraum, db_addon_params: (year=optional, month=optional) | Berechnung: daily | Item-Type: num + +- waermesumme: Berechnet die Wärmesumme für einen Zeitraum, db_addon_params: (year=optional, month=optional) | Berechnung: daily | Item-Type: num + +- gruenlandtempsumme: Berechnet die Grünlandtemperatursumme für einen Zeitraum, db_addon_params: (year=optional) | Berechnung: daily | Item-Type: num + +- wachstumsgradtage: Berechnet die Wachstumsgradtage auf Basis der stündlichen Durchschnittswerte eines Tages für das laufende Jahr mit an Angabe des Temperaturschwellenwertes (threshold=Schwellentemperatur) | Berechnung: daily | Item-Type: num + +- wuestentage: Berechnet die Anzahl der Wüstentage des Jahres, db_addon_params: (year=optional) | Berechnung: daily | Item-Type: num + +- heisse_tage: Berechnet die Anzahl der heissen Tage des Jahres, db_addon_params: (year=optional) | Berechnung: daily | Item-Type: num + +- tropennaechte: Berechnet die Anzahl der Tropennächte des Jahres, db_addon_params: (year=optional) | Berechnung: daily | Item-Type: num + +- sommertage: Berechnet die Anzahl der Sommertage des Jahres, db_addon_params: (year=optional) | Berechnung: daily | Item-Type: num + +- heiztage: Berechnet die Anzahl der Heiztage des Jahres, db_addon_params: (year=optional) | Berechnung: daily | Item-Type: num + +- vegetationstage: Berechnet die Anzahl der Vegatationstage des Jahres, db_addon_params: (year=optional) | Berechnung: daily | Item-Type: num + +- frosttage: Berechnet die Anzahl der Frosttage des Jahres, db_addon_params: (year=optional) | Berechnung: daily | Item-Type: num + +- eistage: Berechnet die Anzahl der Eistage des Jahres, db_addon_params: (year=optional) | Berechnung: daily | Item-Type: num + +- tagesmitteltemperatur: Berechnet die Tagesmitteltemperatur auf Basis der stündlichen Durchschnittswerte eines Tages für die angegebene Anzahl von Tagen (timeframe=day, count=integer) | Berechnung: daily | Item-Type: list + +- db_request: Abfrage der DB: db_addon_params: (func=mandatory, item=mandatory, timespan=mandatory, start=optional, end=optional, count=optional, group=optional, group2=optional) | Berechnung: group | Item-Type: list + +- minmax: Berechnet einen min/max/avg Wert für einen bestimmen Zeitraum: db_addon_params: (func=mandatory, timeframe=mandatory, start=mandatory) | Berechnung: timeframe | Item-Type: num + +- minmax_last: Berechnet einen min/max/avg Wert für ein bestimmtes Zeitfenster von jetzt zurück: db_addon_params: (func=mandatory, timeframe=mandatory, start=mandatory, end=mandatory) | Berechnung: timeframe | Item-Type: num + +- verbrauch: Berechnet einen Verbrauchswert für einen bestimmen Zeitraum: db_addon_params: (timeframe=mandatory, start=mandatory end=mandatory) | Berechnung: timeframe | Item-Type: num + +- zaehlerstand: Berechnet einen Zählerstand für einen bestimmen Zeitpunkt: db_addon_params: (timeframe=mandatory, start=mandatory) | Berechnung: timeframe | Item-Type: num + + +db_addon_info +------------- + +- db_version: Version der verbundenen Datenbank | Berechnung: no | Item-Type: str + + +db_addon_admin +-------------- + +- suspend: Unterbricht die Aktivitäten des Plugin | Berechnung: no | Item-Type: bool + +- recalc_all: Startet einen Neuberechnungslauf aller on-demand Items | Berechnung: no | Item-Type: bool + +- clean_cache_values: Löscht Plugin-Cache und damit alle im Plugin zwischengespeicherten Werte | Berechnung: no | Item-Type: bool + + +Hinweise +======== + + - Das Plugin startet die Berechnungen der Werte nach einer gewissen (konfigurierbaren) Zeit (Attribut `startup_run_delay`) + nach dem Start von shNG, um den Startvorgang nicht zu beeinflussen. + + - Bei Start werden automatisch nur die Items berechnet, für das das Attribute `db_addon_startup` gesetzt wurde. Alle anderen + Items werden erst zur konfigurierten Zeit berechnet. Das Attribute `db_addon_startup` kann auch direkt am `Database-Item` + gesetzt werden. Dabei wird das Attribut auf alle darunter liegenden `db_addon-Items` (bspw. bei Verwendung von structs) vererbt. + Über das WebIF kann die Berechnung aller definierten Items ausgelöst werden. + + - Für sogenannte `on_change` Items, also Items, deren Berechnung bis zum Jetzt (bspw. verbrauch-heute) gehen, wird die Berechnung + immer bei eintreffen eines neuen Wertes gestartet. Zu Reduktion der Belastung auf die Datenbank werden die Werte für das Ende der + letzten Periode gecached. + + - Berechnungen werden nur ausgeführt, wenn für den kompletten abgefragten Zeitraum Werte in der Datenbank vorliegen. Wird bspw. + der Verbrauch des letzten Monats abgefragt wobei erst Werte ab dem 3. des Monats in der Datenbank sind, wird die Berechnung abgebrochen. + + - Mit dem Attribut `use_oldest_entry` kann dieses Verhalten verändert werden. Ist das Attribut gesetzt, wird, wenn für den + Beginn der Abfragezeitraums keinen Werte vorliegen, der älteste Eintrag der Datenbank genutzt. + + - Für die Auswertung kann es nützlich sein, bestimmte Werte aus der Datenbank bei der Berechnung auszublenden. Hierfür stehen + 2 Möglichkeiten zur Verfügung: + - Plugin-Attribut `ignore_0`: (list of strings) Bei Items, bei denen ein String aus der Liste im Pfadnamen vorkommt, + werden 0-Werte (val_num = 0) bei Datenbankauswertungen ignoriert. Hat also das Attribut den Wert ['temp'] werden bei allen Items mit + 'temp' im Pfadnamen die 0-Werte bei der Auswertung ignoriert. + - Item-Attribut `db_addon_ignore_value`: (num) Dieser Wert wird bei der Abfrage bzw. Auswertung der Datenbank für diese + Item ignoriert. + + - Das Plugin enthält sehr ausführliche Logginginformation. Bei unerwartetem Verhalten, den LogLevel entsprechend anpassen, + um mehr information zu erhalten. + + - Berechnungen des Plugins können im WebIF unterbrochen werden. Auch das gesamte Plugin kann pausiert werden. Dies kann bei + starker Systembelastung nützlich sein. + + +Beispiele +========= + +Verbrauch +--------- + +Soll bspw. der Verbrauch von Wasser ausgewertet werden, so ist dies wie folgt möglich: + + +.. code-block:: yaml + + wasserzaehler: + zaehlerstand: + type: num + knx_dpt: 12 + knx_cache: 5/3/4 + eval: round(value/1000, 1) + database: init + struct: + - db_addon.verbrauch_1 + - db_addon.verbrauch_2 + - db_addon.zaehlerstand_1 + +Die Werte des Wasserzählerstandes werden in die Datenbank geschrieben und darauf basierend ausgewertet. Die structs +'db_addon.verbrauch_1' und 'db_addon.verbrauch_2' stellen entsprechende Items für die Verbrauchsauswerten zur Verfügung. + +minmax +------ + +Soll bspw. die minimalen und maximalen Temperaturen ausgewertet werden, kann dies so umgesetzt werden: + +.. code-block:: yaml + + temperature: + aussen: + nord: + name: Außentemp Nordseite + type: num + visu_acl: ro + knx_dpt: 9 + knx_cache: 6/5/1 + database: init + struct: + - db_addon.minmax_1 + - db_addon.minmax_2 + +Die Temperaturwerte werden in die Datenbank geschrieben und darauf basierend ausgewertet. Die structs +'db_addon.minmax_1' und 'db_addon.minmax_2' stellen entsprechende Items für die min/max Auswertung zur Verfügung. + +| + +Web Interface +============= + +Das WebIF stellt neben der Ansicht verbundener Items und deren Parameter und Werte auch Funktionen für die +Administration des Plugins bereit. + +Es stehen Button für: + +- Neuberechnung aller Items +- Abbruch eines aktiven Berechnungslaufes +- Pausieren des Plugins +- Wiederaufnahme des Plugins + +bereit. + +Achtung: Das Auslösen einer kompletten Neuberechnung aller Items kann zu einer starken Belastung der Datenbank +aufgrund vieler Leseanfragen führen. + + +db_addon Items +-------------- + +Dieser Reiter des Webinterface zeigt die Items an, für die ein DatabaseAddon Attribut konfiguriert ist. + + +db_addon Maintenance +-------------------- + +Das Webinterface zeigt detaillierte Informationen über die im Plugin verfügbaren Daten an. +Dies dient der Maintenance bzw. Fehlersuche. Dieser Tab ist nur bei Log-Level "Debug" verfügbar. + + +Erläuterungen zu Temperatursummen +================================= + + +Grünlandtemperatursumme +----------------------- + +Beim Grünland wird die Wärmesumme nach Ernst und Loeper benutzt, um den Vegetationsbeginn und somit den Termin von Düngungsmaßnahmen zu bestimmen. +Dabei erfolgt die Aufsummierung der Tagesmitteltemperaturen über 0 °C, wobei der Januar mit 0.5 und der Februar mit 0.75 gewichtet wird. +Bei einer Wärmesumme von 200 Grad ist eine Düngung angesagt. + +siehe: https://de.wikipedia.org/wiki/Gr%C3%BCnlandtemperatursumme + +Folgende Parameter sind möglich / notwendig: + + +.. code-block:: yaml + + db_addon_params: "year=current" + +- year: Jahreszahl (str oder int), für das die Berechnung ausgeführt werden soll oder "current" für aktuelles Jahr (default: 'current') + + +Wachstumsgradtag +---------------- +Der Begriff Wachstumsgradtage (WGT) ist ein Überbegriff für verschiedene Größen. +Gemeinsam ist ihnen, daß zur Berechnung eine Lufttemperatur von einem Schwellenwert subtrahiert wird. +Je nach Fragestellung und Pflanzenart werden der Schwellenwert unterschiedlich gewählt und die Temperatur unterschiedlich bestimmt. +Verfügbar sind die Berechnung über 0) "einfachen Durchschnitt der Tagestemperaturen", 1) "modifizierten Durchschnitt der Tagestemperaturen" +und 2) Anzahl der Tage, deren Mitteltempertatur oberhalb der Schwellentemperatur lag. + +siehe https://de.wikipedia.org/wiki/Wachstumsgradtag + +Folgende Parameter sind möglich / notwendig: + +.. code-block:: yaml + + db_addon_params: "year=current, method=1, threshold=10" + +- year: Jahreszahl (str oder int), für das die Berechnung ausgeführt werden soll oder "current" für aktuelles Jahr (default: 'current') +- method: 0-Berechnung über "einfachen Durchschnitt der Tagestemperaturen", 1-Berechnung über "modifizierten Durchschnitt (default: 0) +der Tagestemperaturen" 2-Anzahl der Tage, mit Mitteltempertatur oberhalb Schwellentemperatur// 10, 11 Ausgabe aus Zeitserie +- threshold: Schwellentemperatur in °C (int) (default: 10) + + +Wärmesumme +---------- + +Die Wärmesumme soll eine Aussage über den Sommer und die Pflanzenreife liefern. Es gibt keine eindeutige Definition der Größe "Wärmesumme". +Berechnet wird die Wärmesumme als Summe aller Tagesmitteltemperaturen über einem Schwellenwert ab dem 1.1. des Jahres. + +siehe https://de.wikipedia.org/wiki/W%C3%A4rmesumme + +Folgende Parameter sind möglich / notwendig: + +.. code-block:: yaml + + db_addon_params: "year=current, month=1, threshold=10" + +- year: Jahreszahl (str oder int), für das die Berechnung ausgeführt werden soll oder "current" für aktuelles Jahr (default: 'current') +- month: Monat (int) des Jahres, für das die Berechnung ausgeführt werden soll (optional) (default: None) +- threshold: Schwellentemperatur in °C (int) (default: 10) + + +Kältesumme +---------- + +Die Kältesumme soll eine Aussage über die Härte des Winters liefern. +Berechnet wird die Kältesumme als Summe aller negativen Tagesmitteltemperaturen ab dem 21.9. des Jahres bis 31.3. des Folgejahres. + +siehe https://de.wikipedia.org/wiki/K%C3%A4ltesumme + +Folgende Parameter sind möglich / notwendig: + +.. code-block:: yaml + + db_addon_params: "year=current, month=1" + +- year: Jahreszahl (str oder int), für das die Berechnung ausgeführt werden soll oder "current" für aktuelles Jahr (default: 'current') +- month: Monat (int) des Jahres, für das die Berechnung ausgeführt werden soll (optional) (default: None) + + +Tagesmitteltemperatur +--------------------- + +Die Tagesmitteltemperatur wird auf Basis der stündlichen Durchschnittswerte eines Tages (aller in der DB enthaltenen Datensätze) +für die angegebene Anzahl von Tagen (days=optional) berechnet. + + + Vorgehen bei Funktionserweiterung des Plugins bzw. Ergänzung weiterer Werte für Item-Attribute ---------------------------------------------------------------------------------------------- diff --git a/db_addon/webif/__init__.py b/db_addon/webif/__init__.py index e4ee8dcee..c7f7c6a71 100644 --- a/db_addon/webif/__init__.py +++ b/db_addon/webif/__init__.py @@ -135,7 +135,7 @@ def submit(self, item=None): result = None item_path, cmd = item.split(':') if item_path is not None and cmd is not None: - self.logger.debug(f"Sending db_addon {cmd=} for {item_path=} via web interface") + self.logger.debug(f"Received db_addon {cmd=} for {item_path=} via web interface") if cmd == "recalc_item": self.logger.info(f"Recalc of item={item_path} called via WebIF. Item put to Queue for new calculation.") @@ -149,14 +149,20 @@ def submit(self, item=None): self.logger.debug(f"Result for web interface: {result}") return json.dumps(result).encode('utf-8') - elif cmd.startswith("set_item_calculation"): + elif cmd.startswith("suspend_plugin_calculation"): + self.logger.debug(f"set_plugin_calculation {cmd=}") cmd, value = cmd.split(',') - self.logger.info(f"Item calculation of item={item_path} will be set to '{value}' via WebIF.") - if value == "True": - value = True - else: - value = False - result = self.plugin._activate_item_calculation(item=item_path, active=value) + value = True if value == "True" else False + self.logger.info(f"Plugin will be set to suspended: {value} via WebIF.") + result = self.plugin.suspend(value) + self.logger.debug(f"Result for web interface: {result}") + return json.dumps(result).encode('utf-8') + + elif cmd.startswith("suspend_item_calculation"): + cmd, value = cmd.split(',') + self.logger.info(f"Item calculation of item={item_path} will be set to suspended: {value} via WebIF.") + value = True if value == "True" else False + result = self.plugin._suspend_item_calculation(item=item_path, suspended=value) self.logger.debug(f"Result for web interface: {result}") return json.dumps(result).encode('utf-8') diff --git a/db_addon/webif/templates/index.html b/db_addon/webif/templates/index.html index 5bcd657ce..270751ff7 100644 --- a/db_addon/webif/templates/index.html +++ b/db_addon/webif/templates/index.html @@ -59,33 +59,49 @@ .shng_effect_standard { background-color: none; } + button.actionbutton { + width: 32px; + } {% endblock pluginstyles %} {% block pluginscripts %} @@ -134,26 +149,17 @@ shngInsertText('queue_length', item_count); shngInsertText('active_queue_item', objResponse['active_queue_item']); - if (objResponse['plugin_suspended'] === false) { - document.getElementById('play').classList = 'btn btn-success btn-sm'; - document.getElementById('play').disabled = true; - document.getElementById('pause').classList = 'btn btn-outline-danger btn-sm'; - document.getElementById('pause').disabled = false; - } - else { - document.getElementById('play').classList = 'btn btn-outline-success btn-sm'; - document.getElementById('play').disabled = false; - document.getElementById('pause').classList = 'btn btn-danger btn-sm'; - document.getElementById('pause').disabled = true; - } + togglePlayPause("plugin_button_playpause", objResponse['plugin_suspended'].toString()); } - document.getElementById('debug_parse').checked = objResponse['debug_log']['parse']; - document.getElementById('debug_execute').checked = objResponse['debug_log']['execute']; - document.getElementById('debug_ondemand').checked = objResponse['debug_log']['ondemand']; - document.getElementById('debug_onchange').checked = objResponse['debug_log']['onchange']; - document.getElementById('debug_prepare').checked = objResponse['debug_log']['prepare']; - document.getElementById('debug_sql').checked = objResponse['debug_log']['sql']; + if ($("#logging").length > 0){ + document.getElementById('debug_parse').checked = objResponse['debug_log']['parse']; + document.getElementById('debug_execute').checked = objResponse['debug_log']['execute']; + document.getElementById('debug_ondemand').checked = objResponse['debug_log']['ondemand']; + document.getElementById('debug_onchange').checked = objResponse['debug_log']['onchange']; + document.getElementById('debug_prepare').checked = objResponse['debug_log']['prepare']; + document.getElementById('debug_sql').checked = objResponse['debug_log']['sql']; + } } @@ -166,27 +172,26 @@ // keine HTML-Aktion ausführen (z.B. Formular senden) e.preventDefault(); let value = $("#button").val(); + const id = $("#button_id").val(); + const escapedId = $.escapeSelector(id); + const buttonElement = $("#" + escapedId); console.log('Sending db_addon command for ' + value); // die Kennung des gedrückten Buttons per AJAX senden $.post('submit', {item: value}, function(data) { - let id = $("#button_id").val(); - console.log("Return value from plugin: " + data + " id " + id); - - toggleButton(id, data) - - const escapedVal = $.escapeSelector(value); - const buttonElement = $("#" + escapedVal + "_button"); - if (data) - updateButton(buttonElement, "checkmark"); - else - updateButton(buttonElement, "issue"); + console.log("Return value from plugin: id=" + id + ", data=" + data); + if (id.endsWith("_playpause")) + togglePlayPause(id, data.toString()); + else { + if (data === "true") + updateButton(buttonElement, "btn-success"); + else + updateButton(buttonElement, "btn-danger"); + } }).fail(function(jqXHR, textStatus, errorThrown) { // Error callback console.error("AJAX request failed:", textStatus, errorThrown); - const escapedVal = $.escapeSelector($("#button").val()); - const buttonElement = $("#" + escapedVal + "_button"); - updateButton(buttonElement, "issue"); + updateButton(buttonElement, "btn-danger"); }); return false ; }); @@ -259,34 +264,9 @@ console.warn("Datatable JS not loaded, showing standard table without reorder option " + e); } - // Handler für Suspend (Play/Pause) Button - if ({{ suspended }} == false) { - document.getElementById('play').classList = 'btn btn-success btn-sm'; - document.getElementById('play').disabled = true; - document.getElementById('pause').classList = 'btn btn-outline-danger btn-sm'; - document.getElementById('pause').disabled = false; - } - else { - document.getElementById('play').classList = 'btn btn-outline-success btn-sm'; - document.getElementById('play').disabled = false; - document.getElementById('pause').classList = 'btn btn-danger btn-sm'; - document.getElementById('pause').disabled = true; - } }); - - @@ -358,26 +334,24 @@ {{ p.log_level }} {% if p.log_level == 10 %} -
- {{ (' || ') }} -
- -
-
- -
-
- -
-
- -
-
- -
-
- -
+ {{' || ' }} +
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+
{% endif %} @@ -393,11 +367,13 @@ -
- - -
+ +
+
+ + +
{% endblock %} @@ -427,15 +403,14 @@ {{ p.get_item_config(item._path)['db_addon_fct'] }} {{ _(p.get_item_config(item)['cycle']|string) }} {% if p.get_item_config(item)['startup'] %}{{ _('Ja') }}{% else %}{{ _('Nein') }}{% endif %} - {{ item._value | float | round(2) }} - {{ item.property.last_update.strftime('%d.%m.%Y %H:%M:%S') }} - {{ item.property.last_change.strftime('%d.%m.%Y %H:%M:%S') }} +   +   +   - - - - - + + + + {% endfor %} From 0bf6ceae648d52f1437d54c336f194a5ca456c0b Mon Sep 17 00:00:00 2001 From: sisamiwe Date: Sat, 23 Sep 2023 14:40:11 +0200 Subject: [PATCH 13/41] =?UTF-8?q?DB=5FADDON:=20-=20bugfix=20bei=20Verbrauc?= =?UTF-8?q?hsberechnung=20der=20on-change=20Items=20-=20Bugfix=20bis=20Z?= =?UTF-8?q?=C3=A4hlerstand?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- db_addon/__init__.py | 45 +++++++++++--------------------------------- 1 file changed, 11 insertions(+), 34 deletions(-) diff --git a/db_addon/__init__.py b/db_addon/__init__.py index 737c4fb26..f32549361 100644 --- a/db_addon/__init__.py +++ b/db_addon/__init__.py @@ -247,8 +247,7 @@ def get_query_parameters_from_db_addon_fct() -> Union[dict, None]: # handle functions 'min/max/avg' in format 'minmax_timeframe_timedelta_func' like 'minmax_heute_minus2_max' func = db_addon_fct_vars[3] # min, max, avg timeframe = translate_timeframe(db_addon_fct_vars[1]) # day, week, month, year - end = to_int(split_sting_letters_numbers(db_addon_fct_vars[2])[1]) - start = end + start = end = to_int(split_sting_letters_numbers(db_addon_fct_vars[2])[1]) log_text = 'minmax_timeframe_timedelta_func' required_params = [func, timeframe, start, end] @@ -256,24 +255,21 @@ def get_query_parameters_from_db_addon_fct() -> Union[dict, None]: # handle functions 'zaehlerstand' in format 'zaehlerstand_timeframe_timedelta' like 'zaehlerstand_heute_minus1' func = 'last' timeframe = translate_timeframe(db_addon_fct_vars[1]) - end = to_int(split_sting_letters_numbers(db_addon_fct_vars[2])[1]) - start = end + start = end = to_int(split_sting_letters_numbers(db_addon_fct_vars[2])[1]) log_text = 'zaehlerstand_timeframe_timedelta' required_params = [timeframe, start, end] elif db_addon_fct in VERBRAUCH_ATTRIBUTES_ONCHANGE: # handle functions 'verbrauch on-change' items in format 'verbrauch_timeframe' like 'verbrauch_heute', 'verbrauch_woche', 'verbrauch_monat', 'verbrauch_jahr' timeframe = translate_timeframe(db_addon_fct_vars[1]) - end = 0 - start = 1 + start = end = 0 log_text = 'verbrauch_timeframe' required_params = [timeframe, start, end] elif db_addon_fct in VERBRAUCH_ATTRIBUTES_TIMEFRAME: # handle functions 'verbrauch on-demand' in format 'verbrauch_timeframe_timedelta' like 'verbrauch_heute_minus2' timeframe = translate_timeframe(db_addon_fct_vars[1]) - end = to_int(split_sting_letters_numbers(db_addon_fct_vars[2])[1]) - start = end + start = end = to_int(split_sting_letters_numbers(db_addon_fct_vars[2])[1]) log_text = 'verbrauch_timeframe_timedelta' required_params = [timeframe, start, end] @@ -318,8 +314,7 @@ def get_query_parameters_from_db_addon_fct() -> Union[dict, None]: # handle 'tagesmitteltemperatur_timeframe_timedelta' like 'tagesmitteltemperatur_heute_minus1' func = 'max' timeframe = translate_timeframe(db_addon_fct_vars[1]) - end = to_int(split_sting_letters_numbers(db_addon_fct_vars[2])[1]) - start = end + start = end = to_int(split_sting_letters_numbers(db_addon_fct_vars[2])[1]) data_con_func = 'first_hour_avg_day' log_text = 'tagesmitteltemperatur_timeframe_timedelta' required_params = [func, timeframe, start, end, data_con_func] @@ -1564,16 +1559,13 @@ def _handle_verbrauch(self, query_params: dict) -> Union[None, float]: query_params.update({'func': 'next', 'start': start, 'end': start}) value_start = self._query_item(**query_params)[0][1] if self.debug_log.prepare: - self.logger.debug(f"next recent value is {value_start=}") + self.logger.debug(f"{value_start=}") if not value_start: value_start = 0 if self.debug_log.prepare: self.logger.debug(f"No start value available. Will be set to 0 as default") - if self.debug_log.prepare: - self.logger.debug(f"{value_start=}") - # calculate consumption consumption = value_end - value_start @@ -1629,39 +1621,24 @@ def _handle_verbrauch_serie_new(self, query_params: dict) -> list: def _handle_zaehlerstand(self, query_params: dict) -> Union[float, int, None]: """ - Ermittlung des Zählerstandes zum Ende eines Zeitraumes + Ermittlung des Zählerstandes zu Beginn des Zeitraumes Die Vorgehensweise ist: - - Abfrage des letzten Eintrages im Zeitraum - - Ergibt diese Abfrage einen Wert, entspricht dieser dem Zählerstand - - Ergibt diese Abfrage keinen Wert, dann - - Abfrage des nächsten Wertes vor dem Zeitraum - - Ergibt diese Abfrage einen Wert, entspricht dieser dem Zählerstand - - Ergibt diese Abfrage keinen Wert, dann Rückgabe von None + - Abfrage des letzten Eintrages vor dem Beginn des Zeitraums """ if self.debug_log.prepare: self.logger.debug(f"called with {query_params=}") # get last value of timeframe - query_params.update({'func': 'last'}) + query_params.update({'func': 'next'}) last_value = self._query_item(**query_params)[0][1] if self.debug_log.prepare: self.logger.debug(f"{last_value=}") if last_value is None: - if self.debug_log.prepare: - self.logger.debug(f"Error occurred during query. Return.") - return - - if not last_value: - # get last value (next) before timeframe - if self.debug_log.prepare: - self.logger.debug(f"No DB entry for item={query_params['database_item'].path()} found for requested start date. Looking for next recent DB entry.") - query_params.update({'func': 'next'}) - last_value = self._query_item(**query_params)[0][1] - if self.debug_log.prepare: - self.logger.debug(f"next recent value is {last_value=}") + self.logger.info('No entry in database found. Maybe item was just created. Setting last_value to 0.') + last_value = 0 if isinstance(last_value, float): if last_value.is_integer(): From d0874b1380d61b3ca042ac610ab2a715d6683426 Mon Sep 17 00:00:00 2001 From: Onkel Andy Date: Tue, 24 Oct 2023 23:29:51 +0200 Subject: [PATCH 14/41] blockly plugin: remove bootstrap and jquery as it is now part of the http module --- blockly/webif/static/js/bootstrap-reload.js | 68 - .../webif/static/js/bootstrap-reload.min.js | 1 - blockly/webif/static/js/bootstrap-treeview.js | 1249 -- .../webif/static/js/bootstrap-treeview.min.js | 1 - blockly/webif/static/js/bootstrap.js | 2377 ---- blockly/webif/static/js/bootstrap.min.js | 7 - blockly/webif/static/js/jquery-3.2.1.js | 10253 ---------------- blockly/webif/static/js/jquery-3.2.1.min.js | 4 - 8 files changed, 13960 deletions(-) delete mode 100755 blockly/webif/static/js/bootstrap-reload.js delete mode 100755 blockly/webif/static/js/bootstrap-reload.min.js delete mode 100755 blockly/webif/static/js/bootstrap-treeview.js delete mode 100755 blockly/webif/static/js/bootstrap-treeview.min.js delete mode 100755 blockly/webif/static/js/bootstrap.js delete mode 100755 blockly/webif/static/js/bootstrap.min.js delete mode 100755 blockly/webif/static/js/jquery-3.2.1.js delete mode 100755 blockly/webif/static/js/jquery-3.2.1.min.js diff --git a/blockly/webif/static/js/bootstrap-reload.js b/blockly/webif/static/js/bootstrap-reload.js deleted file mode 100755 index ac42b6f3c..000000000 --- a/blockly/webif/static/js/bootstrap-reload.js +++ /dev/null @@ -1,68 +0,0 @@ -(function( $, window, document, undefined ) { - var Reload = function(elem, options) { - this.$elem = $(elem); - this.options = options; - }; - - Reload.prototype.defaults = { - time: 3000, - autoReload: false, - //beforeReload: function(){}, - //afterReload: function(){}, - parameterString: '', - parseData: function(){} - }; - - Reload.prototype.init = function() { - var self = this; - - // Set the configuration parameters - self.config = $.extend({},self.defaults,self.options); - - // Set the container for refresh animation - self.config.refreshContainer = $(self.config.refreshContainer) || self.$elem.find('.refresh-container'); - - // Set the container to update the data with - self.config.dataContainer = $(self.config.dataContainer) || self.$elem.find('.data-container'); - - self.$elem.find('.fa-refresh').click(self.reload()); - self.$elem.find('.fa-refresh').off('click'); - self.$elem.find('.fa-refresh').on('click', function() { - self.reload() - }); - - if(self.config.autoReload) { - setInterval(self.reload,self.config.time); - _self.$elem.find('.fa-refresh').addClass('fa-spin'); - } - - return self; - }; - - Reload.prototype.reload = function(){ - var _self = this; - _self.$elem.find('.fa-refresh').addClass('fa-spin'); - _self.config.refreshContainer.fadeIn('fast'); - // Send the AJAX request to fetch the data - $.getJSON(_self.$elem.data('url')+_self.config.parameterString, function(result) { - _self.config.parseData(result); - if(_self.config.autoReload) { - _self.config.refreshContainer.fadeOut("done", function() {}); - } else { - _self.config.refreshContainer.fadeOut("done", function() {_self.$elem.find('.fa-refresh').removeClass('fa-spin');}); - } - }); - }; - - // Register the plugin to JQuery - $.fn.reload = function(options) { - this.each(function() { - var $this, reload; - $this = $(this); - reload = new Reload(this, options); - return reload.init(); - - }); - }; - -})( window.jQuery, window, document ); \ No newline at end of file diff --git a/blockly/webif/static/js/bootstrap-reload.min.js b/blockly/webif/static/js/bootstrap-reload.min.js deleted file mode 100755 index dab077a3c..000000000 --- a/blockly/webif/static/js/bootstrap-reload.min.js +++ /dev/null @@ -1 +0,0 @@ -!function(e,n,i,a){var t=function(n,i){this.$elem=e(n),this.options=i};t.prototype.defaults={time:3e3,autoReload:!1,parameterString:"",parseData:function(){}},t.prototype.init=function(){var n=this;return n.config=e.extend({},n.defaults,n.options),n.config.refreshContainer=e(n.config.refreshContainer)||n.$elem.find(".refresh-container"),n.config.dataContainer=e(n.config.dataContainer)||n.$elem.find(".data-container"),n.$elem.find(".fa-refresh").click(n.reload()),n.$elem.find(".fa-refresh").off("click"),n.$elem.find(".fa-refresh").on("click",function(){n.reload()}),n.config.autoReload&&(setInterval(n.reload,n.config.time),_self.$elem.find(".fa-refresh").addClass("fa-spin")),n},t.prototype.reload=function(){var n=this;n.$elem.find(".fa-refresh").addClass("fa-spin"),n.config.refreshContainer.fadeIn("fast"),e.getJSON(n.$elem.data("url")+n.config.parameterString,function(e){n.config.parseData(e),n.config.autoReload?n.config.refreshContainer.fadeOut("done",function(){}):n.config.refreshContainer.fadeOut("done",function(){n.$elem.find(".fa-refresh").removeClass("fa-spin")})})},e.fn.reload=function(n){this.each(function(){var i,a;return i=e(this),a=new t(this,n),a.init()})}}(window.jQuery,window,document); \ No newline at end of file diff --git a/blockly/webif/static/js/bootstrap-treeview.js b/blockly/webif/static/js/bootstrap-treeview.js deleted file mode 100755 index 7a82a2eeb..000000000 --- a/blockly/webif/static/js/bootstrap-treeview.js +++ /dev/null @@ -1,1249 +0,0 @@ -/* ========================================================= - * bootstrap-treeview.js v1.2.0 - * ========================================================= - * Copyright 2013 Jonathan Miles - * Project URL : http://www.jondmiles.com/bootstrap-treeview - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ========================================================= */ - -;(function ($, window, document, undefined) { - - /*global jQuery, console*/ - - 'use strict'; - - var pluginName = 'treeview'; - - var _default = {}; - - _default.settings = { - - injectStyle: true, - - levels: 2, - - expandIcon: 'glyphicon glyphicon-plus', - collapseIcon: 'glyphicon glyphicon-minus', - emptyIcon: 'glyphicon', - nodeIcon: '', - selectedIcon: '', - checkedIcon: 'glyphicon glyphicon-check', - uncheckedIcon: 'glyphicon glyphicon-unchecked', - - color: undefined, // '#000000', - backColor: undefined, // '#FFFFFF', - borderColor: undefined, // '#dddddd', - onhoverColor: '#F5F5F5', - selectedColor: '#FFFFFF', - selectedBackColor: '#428bca', - searchResultColor: '#D9534F', - searchResultBackColor: undefined, //'#FFFFFF', - - enableLinks: false, - highlightSelected: true, - highlightSearchResults: true, - showBorder: true, - showIcon: true, - showCheckbox: false, - showTags: false, - multiSelect: false, - - // Event handlers - onNodeChecked: undefined, - onNodeCollapsed: undefined, - onNodeDisabled: undefined, - onNodeEnabled: undefined, - onNodeExpanded: undefined, - onNodeSelected: undefined, - onNodeUnchecked: undefined, - onNodeUnselected: undefined, - onSearchComplete: undefined, - onSearchCleared: undefined - }; - - _default.options = { - silent: false, - ignoreChildren: false - }; - - _default.searchOptions = { - ignoreCase: true, - exactMatch: false, - revealResults: true - }; - - var Tree = function (element, options) { - - this.$element = $(element); - this.elementId = element.id; - this.styleId = this.elementId + '-style'; - - this.init(options); - - return { - - // Options (public access) - options: this.options, - - // Initialize / destroy methods - init: $.proxy(this.init, this), - remove: $.proxy(this.remove, this), - - // Get methods - getNode: $.proxy(this.getNode, this), - getParent: $.proxy(this.getParent, this), - getSiblings: $.proxy(this.getSiblings, this), - getSelected: $.proxy(this.getSelected, this), - getUnselected: $.proxy(this.getUnselected, this), - getExpanded: $.proxy(this.getExpanded, this), - getCollapsed: $.proxy(this.getCollapsed, this), - getChecked: $.proxy(this.getChecked, this), - getUnchecked: $.proxy(this.getUnchecked, this), - getDisabled: $.proxy(this.getDisabled, this), - getEnabled: $.proxy(this.getEnabled, this), - - // Select methods - selectNode: $.proxy(this.selectNode, this), - unselectNode: $.proxy(this.unselectNode, this), - toggleNodeSelected: $.proxy(this.toggleNodeSelected, this), - - // Expand / collapse methods - collapseAll: $.proxy(this.collapseAll, this), - collapseNode: $.proxy(this.collapseNode, this), - expandAll: $.proxy(this.expandAll, this), - expandNode: $.proxy(this.expandNode, this), - toggleNodeExpanded: $.proxy(this.toggleNodeExpanded, this), - revealNode: $.proxy(this.revealNode, this), - - // Expand / collapse methods - checkAll: $.proxy(this.checkAll, this), - checkNode: $.proxy(this.checkNode, this), - uncheckAll: $.proxy(this.uncheckAll, this), - uncheckNode: $.proxy(this.uncheckNode, this), - toggleNodeChecked: $.proxy(this.toggleNodeChecked, this), - - // Disable / enable methods - disableAll: $.proxy(this.disableAll, this), - disableNode: $.proxy(this.disableNode, this), - enableAll: $.proxy(this.enableAll, this), - enableNode: $.proxy(this.enableNode, this), - toggleNodeDisabled: $.proxy(this.toggleNodeDisabled, this), - - // Search methods - search: $.proxy(this.search, this), - clearSearch: $.proxy(this.clearSearch, this) - }; - }; - - Tree.prototype.init = function (options) { - - this.tree = []; - this.nodes = []; - - if (options.data) { - if (typeof options.data === 'string') { - options.data = $.parseJSON(options.data); - } - this.tree = $.extend(true, [], options.data); - delete options.data; - } - this.options = $.extend({}, _default.settings, options); - - this.destroy(); - this.subscribeEvents(); - this.setInitialStates({ nodes: this.tree }, 0); - this.render(); - }; - - Tree.prototype.remove = function () { - this.destroy(); - $.removeData(this, pluginName); - $('#' + this.styleId).remove(); - }; - - Tree.prototype.destroy = function () { - - if (!this.initialized) return; - - this.$wrapper.remove(); - this.$wrapper = null; - - // Switch off events - this.unsubscribeEvents(); - - // Reset this.initialized flag - this.initialized = false; - }; - - Tree.prototype.unsubscribeEvents = function () { - - this.$element.off('click'); - this.$element.off('nodeChecked'); - this.$element.off('nodeCollapsed'); - this.$element.off('nodeDisabled'); - this.$element.off('nodeEnabled'); - this.$element.off('nodeExpanded'); - this.$element.off('nodeSelected'); - this.$element.off('nodeUnchecked'); - this.$element.off('nodeUnselected'); - this.$element.off('searchComplete'); - this.$element.off('searchCleared'); - }; - - Tree.prototype.subscribeEvents = function () { - - this.unsubscribeEvents(); - - this.$element.on('click', $.proxy(this.clickHandler, this)); - - if (typeof (this.options.onNodeChecked) === 'function') { - this.$element.on('nodeChecked', this.options.onNodeChecked); - } - - if (typeof (this.options.onNodeCollapsed) === 'function') { - this.$element.on('nodeCollapsed', this.options.onNodeCollapsed); - } - - if (typeof (this.options.onNodeDisabled) === 'function') { - this.$element.on('nodeDisabled', this.options.onNodeDisabled); - } - - if (typeof (this.options.onNodeEnabled) === 'function') { - this.$element.on('nodeEnabled', this.options.onNodeEnabled); - } - - if (typeof (this.options.onNodeExpanded) === 'function') { - this.$element.on('nodeExpanded', this.options.onNodeExpanded); - } - - if (typeof (this.options.onNodeSelected) === 'function') { - this.$element.on('nodeSelected', this.options.onNodeSelected); - } - - if (typeof (this.options.onNodeUnchecked) === 'function') { - this.$element.on('nodeUnchecked', this.options.onNodeUnchecked); - } - - if (typeof (this.options.onNodeUnselected) === 'function') { - this.$element.on('nodeUnselected', this.options.onNodeUnselected); - } - - if (typeof (this.options.onSearchComplete) === 'function') { - this.$element.on('searchComplete', this.options.onSearchComplete); - } - - if (typeof (this.options.onSearchCleared) === 'function') { - this.$element.on('searchCleared', this.options.onSearchCleared); - } - }; - - /* - Recurse the tree structure and ensure all nodes have - valid initial states. User defined states will be preserved. - For performance we also take this opportunity to - index nodes in a flattened structure - */ - Tree.prototype.setInitialStates = function (node, level) { - - if (!node.nodes) return; - level += 1; - - var parent = node; - var _this = this; - $.each(node.nodes, function checkStates(index, node) { - - // nodeId : unique, incremental identifier - node.nodeId = _this.nodes.length; - - // parentId : transversing up the tree - node.parentId = parent.nodeId; - - // if not provided set selectable default value - if (!node.hasOwnProperty('selectable')) { - node.selectable = true; - } - - // where provided we should preserve states - node.state = node.state || {}; - - // set checked state; unless set always false - if (!node.state.hasOwnProperty('checked')) { - node.state.checked = false; - } - - // set enabled state; unless set always false - if (!node.state.hasOwnProperty('disabled')) { - node.state.disabled = false; - } - - // set expanded state; if not provided based on levels - if (!node.state.hasOwnProperty('expanded')) { - if (!node.state.disabled && - (level < _this.options.levels) && - (node.nodes && node.nodes.length > 0)) { - node.state.expanded = true; - } - else { - node.state.expanded = false; - } - } - - // set selected state; unless set always false - if (!node.state.hasOwnProperty('selected')) { - node.state.selected = false; - } - - // index nodes in a flattened structure for use later - _this.nodes.push(node); - - // recurse child nodes and transverse the tree - if (node.nodes) { - _this.setInitialStates(node, level); - } - }); - }; - - Tree.prototype.clickHandler = function (event) { - - if (!this.options.enableLinks) event.preventDefault(); - - var target = $(event.target); - var node = this.findNode(target); - if (!node || node.state.disabled) return; - - var classList = target.attr('class') ? target.attr('class').split(' ') : []; - if ((classList.indexOf('expand-icon') !== -1)) { - - this.toggleExpandedState(node, _default.options); - this.render(); - } - else if ((classList.indexOf('check-icon') !== -1)) { - - this.toggleCheckedState(node, _default.options); - this.render(); - } - else { - - if (node.selectable) { - this.toggleSelectedState(node, _default.options); - } else { - this.toggleExpandedState(node, _default.options); - } - - this.render(); - } - }; - - // Looks up the DOM for the closest parent list item to retrieve the - // data attribute nodeid, which is used to lookup the node in the flattened structure. - Tree.prototype.findNode = function (target) { - - var nodeId = target.closest('li.list-group-item').attr('data-nodeid'); - var node = this.nodes[nodeId]; - - if (!node) { - console.log('Error: node does not exist'); - } - return node; - }; - - Tree.prototype.toggleExpandedState = function (node, options) { - if (!node) return; - this.setExpandedState(node, !node.state.expanded, options); - }; - - Tree.prototype.setExpandedState = function (node, state, options) { - - if (state === node.state.expanded) return; - - if (state && node.nodes) { - - // Expand a node - node.state.expanded = true; - if (!options.silent) { - this.$element.trigger('nodeExpanded', $.extend(true, {}, node)); - } - } - else if (!state) { - - // Collapse a node - node.state.expanded = false; - if (!options.silent) { - this.$element.trigger('nodeCollapsed', $.extend(true, {}, node)); - } - - // Collapse child nodes - if (node.nodes && !options.ignoreChildren) { - $.each(node.nodes, $.proxy(function (index, node) { - this.setExpandedState(node, false, options); - }, this)); - } - } - }; - - Tree.prototype.toggleSelectedState = function (node, options) { - if (!node) return; - this.setSelectedState(node, !node.state.selected, options); - }; - - Tree.prototype.setSelectedState = function (node, state, options) { - - if (state === node.state.selected) return; - - if (state) { - - // If multiSelect false, unselect previously selected - if (!this.options.multiSelect) { - $.each(this.findNodes('true', 'g', 'state.selected'), $.proxy(function (index, node) { - this.setSelectedState(node, false, options); - }, this)); - } - - // Continue selecting node - node.state.selected = true; - if (!options.silent) { - this.$element.trigger('nodeSelected', $.extend(true, {}, node)); - } - } - else { - - // Unselect node - node.state.selected = false; - if (!options.silent) { - this.$element.trigger('nodeUnselected', $.extend(true, {}, node)); - } - } - }; - - Tree.prototype.toggleCheckedState = function (node, options) { - if (!node) return; - this.setCheckedState(node, !node.state.checked, options); - }; - - Tree.prototype.setCheckedState = function (node, state, options) { - - if (state === node.state.checked) return; - - if (state) { - - // Check node - node.state.checked = true; - - if (!options.silent) { - this.$element.trigger('nodeChecked', $.extend(true, {}, node)); - } - } - else { - - // Uncheck node - node.state.checked = false; - if (!options.silent) { - this.$element.trigger('nodeUnchecked', $.extend(true, {}, node)); - } - } - }; - - Tree.prototype.setDisabledState = function (node, state, options) { - - if (state === node.state.disabled) return; - - if (state) { - - // Disable node - node.state.disabled = true; - - // Disable all other states - this.setExpandedState(node, false, options); - this.setSelectedState(node, false, options); - this.setCheckedState(node, false, options); - - if (!options.silent) { - this.$element.trigger('nodeDisabled', $.extend(true, {}, node)); - } - } - else { - - // Enabled node - node.state.disabled = false; - if (!options.silent) { - this.$element.trigger('nodeEnabled', $.extend(true, {}, node)); - } - } - }; - - Tree.prototype.render = function () { - - if (!this.initialized) { - - // Setup first time only components - this.$element.addClass(pluginName); - this.$wrapper = $(this.template.list); - - this.injectStyle(); - - this.initialized = true; - } - - this.$element.empty().append(this.$wrapper.empty()); - - // Build tree - this.buildTree(this.tree, 0); - }; - - // Starting from the root node, and recursing down the - // structure we build the tree one node at a time - Tree.prototype.buildTree = function (nodes, level) { - - if (!nodes) return; - level += 1; - - var _this = this; - $.each(nodes, function addNodes(id, node) { - - var treeItem = $(_this.template.item) - .addClass('node-' + _this.elementId) - .addClass(node.state.checked ? 'node-checked' : '') - .addClass(node.state.disabled ? 'node-disabled': '') - .addClass(node.state.selected ? 'node-selected' : '') - .addClass(node.searchResult ? 'search-result' : '') - .attr('data-nodeid', node.nodeId) - .attr('style', _this.buildStyleOverride(node)); - - // Add indent/spacer to mimic tree structure - for (var i = 0; i < (level - 1); i++) { - treeItem.append(_this.template.indent); - } - - // Add expand, collapse or empty spacer icons - var classList = []; - if (node.nodes) { - classList.push('expand-icon'); - if (node.state.expanded) { - classList.push(_this.options.collapseIcon); - } - else { - classList.push(_this.options.expandIcon); - } - } - else { - classList.push(_this.options.emptyIcon); - } - - treeItem - .append($(_this.template.icon) - .addClass(classList.join(' ')) - ); - - - // Add node icon - if (_this.options.showIcon) { - - var classList = ['node-icon']; - - classList.push(node.icon || _this.options.nodeIcon); - if (node.state.selected) { - classList.pop(); - classList.push(node.selectedIcon || _this.options.selectedIcon || - node.icon || _this.options.nodeIcon); - } - - treeItem - .append($(_this.template.icon) - .addClass(classList.join(' ')) - ); - } - - // Add check / unchecked icon - if (_this.options.showCheckbox) { - - var classList = ['check-icon']; - if (node.state.checked) { - classList.push(_this.options.checkedIcon); - } - else { - classList.push(_this.options.uncheckedIcon); - } - - treeItem - .append($(_this.template.icon) - .addClass(classList.join(' ')) - ); - } - - // Add text - if (_this.options.enableLinks) { - // Add hyperlink - treeItem - .append($(_this.template.link) - .attr('href', node.href) - .append(node.text) - ); - } - else { - // otherwise just text - treeItem - .append(node.text); - } - - // Add tags as badges - if (_this.options.showTags && node.tags) { - $.each(node.tags, function addTag(id, tag) { - treeItem - .append($(_this.template.badge) - .append(tag) - ); - }); - } - - // Add item to the tree - _this.$wrapper.append(treeItem); - - // Recursively add child ndoes - if (node.nodes && node.state.expanded && !node.state.disabled) { - return _this.buildTree(node.nodes, level); - } - }); - }; - - // Define any node level style override for - // 1. selectedNode - // 2. node|data assigned color overrides - Tree.prototype.buildStyleOverride = function (node) { - - if (node.state.disabled) return ''; - - var color = node.color; - var backColor = node.backColor; - - if (this.options.highlightSelected && node.state.selected) { - if (this.options.selectedColor) { - color = this.options.selectedColor; - } - if (this.options.selectedBackColor) { - backColor = this.options.selectedBackColor; - } - } - - if (this.options.highlightSearchResults && node.searchResult && !node.state.disabled) { - if (this.options.searchResultColor) { - color = this.options.searchResultColor; - } - if (this.options.searchResultBackColor) { - backColor = this.options.searchResultBackColor; - } - } - - return 'color:' + color + - ';background-color:' + backColor + ';'; - }; - - // Add inline style into head - Tree.prototype.injectStyle = function () { - - if (this.options.injectStyle && !document.getElementById(this.styleId)) { - $('').appendTo('head'); - } - }; - - // Construct trees style based on user options - Tree.prototype.buildStyle = function () { - - var style = '.node-' + this.elementId + '{'; - - if (this.options.color) { - style += 'color:' + this.options.color + ';'; - } - - if (this.options.backColor) { - style += 'background-color:' + this.options.backColor + ';'; - } - - if (!this.options.showBorder) { - style += 'border:none;'; - } - else if (this.options.borderColor) { - style += 'border:1px solid ' + this.options.borderColor + ';'; - } - style += '}'; - - if (this.options.onhoverColor) { - style += '.node-' + this.elementId + ':not(.node-disabled):hover{' + - 'background-color:' + this.options.onhoverColor + ';' + - '}'; - } - - return this.css + style; - }; - - Tree.prototype.template = { - list: '
    ', - item: '
  • ', - indent: '', - icon: '', - link: '', - badge: '' - }; - - Tree.prototype.css = '.treeview .list-group-item{cursor:pointer}.treeview span.indent{margin-left:10px;margin-right:10px}.treeview span.icon{width:12px;margin-right:5px}.treeview .node-disabled{color:silver;cursor:not-allowed}' - - - /** - Returns a single node object that matches the given node id. - @param {Number} nodeId - A node's unique identifier - @return {Object} node - Matching node - */ - Tree.prototype.getNode = function (nodeId) { - return this.nodes[nodeId]; - }; - - /** - Returns the parent node of a given node, if valid otherwise returns undefined. - @param {Object|Number} identifier - A valid node or node id - @returns {Object} node - The parent node - */ - Tree.prototype.getParent = function (identifier) { - var node = this.identifyNode(identifier); - return this.nodes[node.parentId]; - }; - - /** - Returns an array of sibling nodes for a given node, if valid otherwise returns undefined. - @param {Object|Number} identifier - A valid node or node id - @returns {Array} nodes - Sibling nodes - */ - Tree.prototype.getSiblings = function (identifier) { - var node = this.identifyNode(identifier); - var parent = this.getParent(node); - var nodes = parent ? parent.nodes : this.tree; - return nodes.filter(function (obj) { - return obj.nodeId !== node.nodeId; - }); - }; - - /** - Returns an array of selected nodes. - @returns {Array} nodes - Selected nodes - */ - Tree.prototype.getSelected = function () { - return this.findNodes('true', 'g', 'state.selected'); - }; - - /** - Returns an array of unselected nodes. - @returns {Array} nodes - Unselected nodes - */ - Tree.prototype.getUnselected = function () { - return this.findNodes('false', 'g', 'state.selected'); - }; - - /** - Returns an array of expanded nodes. - @returns {Array} nodes - Expanded nodes - */ - Tree.prototype.getExpanded = function () { - return this.findNodes('true', 'g', 'state.expanded'); - }; - - /** - Returns an array of collapsed nodes. - @returns {Array} nodes - Collapsed nodes - */ - Tree.prototype.getCollapsed = function () { - return this.findNodes('false', 'g', 'state.expanded'); - }; - - /** - Returns an array of checked nodes. - @returns {Array} nodes - Checked nodes - */ - Tree.prototype.getChecked = function () { - return this.findNodes('true', 'g', 'state.checked'); - }; - - /** - Returns an array of unchecked nodes. - @returns {Array} nodes - Unchecked nodes - */ - Tree.prototype.getUnchecked = function () { - return this.findNodes('false', 'g', 'state.checked'); - }; - - /** - Returns an array of disabled nodes. - @returns {Array} nodes - Disabled nodes - */ - Tree.prototype.getDisabled = function () { - return this.findNodes('true', 'g', 'state.disabled'); - }; - - /** - Returns an array of enabled nodes. - @returns {Array} nodes - Enabled nodes - */ - Tree.prototype.getEnabled = function () { - return this.findNodes('false', 'g', 'state.disabled'); - }; - - - /** - Set a node state to selected - @param {Object|Number} identifiers - A valid node, node id or array of node identifiers - @param {optional Object} options - */ - Tree.prototype.selectNode = function (identifiers, options) { - this.forEachIdentifier(identifiers, options, $.proxy(function (node, options) { - this.setSelectedState(node, true, options); - }, this)); - - this.render(); - }; - - /** - Set a node state to unselected - @param {Object|Number} identifiers - A valid node, node id or array of node identifiers - @param {optional Object} options - */ - Tree.prototype.unselectNode = function (identifiers, options) { - this.forEachIdentifier(identifiers, options, $.proxy(function (node, options) { - this.setSelectedState(node, false, options); - }, this)); - - this.render(); - }; - - /** - Toggles a node selected state; selecting if unselected, unselecting if selected. - @param {Object|Number} identifiers - A valid node, node id or array of node identifiers - @param {optional Object} options - */ - Tree.prototype.toggleNodeSelected = function (identifiers, options) { - this.forEachIdentifier(identifiers, options, $.proxy(function (node, options) { - this.toggleSelectedState(node, options); - }, this)); - - this.render(); - }; - - - /** - Collapse all tree nodes - @param {optional Object} options - */ - Tree.prototype.collapseAll = function (options) { - var identifiers = this.findNodes('true', 'g', 'state.expanded'); - this.forEachIdentifier(identifiers, options, $.proxy(function (node, options) { - this.setExpandedState(node, false, options); - }, this)); - - this.render(); - }; - - /** - Collapse a given tree node - @param {Object|Number} identifiers - A valid node, node id or array of node identifiers - @param {optional Object} options - */ - Tree.prototype.collapseNode = function (identifiers, options) { - this.forEachIdentifier(identifiers, options, $.proxy(function (node, options) { - this.setExpandedState(node, false, options); - }, this)); - - this.render(); - }; - - /** - Expand all tree nodes - @param {optional Object} options - */ - Tree.prototype.expandAll = function (options) { - options = $.extend({}, _default.options, options); - - if (options && options.levels) { - this.expandLevels(this.tree, options.levels, options); - } - else { - var identifiers = this.findNodes('false', 'g', 'state.expanded'); - this.forEachIdentifier(identifiers, options, $.proxy(function (node, options) { - this.setExpandedState(node, true, options); - }, this)); - } - - this.render(); - }; - - /** - Expand a given tree node - @param {Object|Number} identifiers - A valid node, node id or array of node identifiers - @param {optional Object} options - */ - Tree.prototype.expandNode = function (identifiers, options) { - this.forEachIdentifier(identifiers, options, $.proxy(function (node, options) { - this.setExpandedState(node, true, options); - if (node.nodes && (options && options.levels)) { - this.expandLevels(node.nodes, options.levels-1, options); - } - }, this)); - - this.render(); - }; - - Tree.prototype.expandLevels = function (nodes, level, options) { - options = $.extend({}, _default.options, options); - - $.each(nodes, $.proxy(function (index, node) { - this.setExpandedState(node, (level > 0) ? true : false, options); - if (node.nodes) { - this.expandLevels(node.nodes, level-1, options); - } - }, this)); - }; - - /** - Reveals a given tree node, expanding the tree from node to root. - @param {Object|Number|Array} identifiers - A valid node, node id or array of node identifiers - @param {optional Object} options - */ - Tree.prototype.revealNode = function (identifiers, options) { - this.forEachIdentifier(identifiers, options, $.proxy(function (node, options) { - var parentNode = this.getParent(node); - while (parentNode) { - this.setExpandedState(parentNode, true, options); - parentNode = this.getParent(parentNode); - }; - }, this)); - - this.render(); - }; - - /** - Toggles a nodes expanded state; collapsing if expanded, expanding if collapsed. - @param {Object|Number} identifiers - A valid node, node id or array of node identifiers - @param {optional Object} options - */ - Tree.prototype.toggleNodeExpanded = function (identifiers, options) { - this.forEachIdentifier(identifiers, options, $.proxy(function (node, options) { - this.toggleExpandedState(node, options); - }, this)); - - this.render(); - }; - - - /** - Check all tree nodes - @param {optional Object} options - */ - Tree.prototype.checkAll = function (options) { - var identifiers = this.findNodes('false', 'g', 'state.checked'); - this.forEachIdentifier(identifiers, options, $.proxy(function (node, options) { - this.setCheckedState(node, true, options); - }, this)); - - this.render(); - }; - - /** - Check a given tree node - @param {Object|Number} identifiers - A valid node, node id or array of node identifiers - @param {optional Object} options - */ - Tree.prototype.checkNode = function (identifiers, options) { - this.forEachIdentifier(identifiers, options, $.proxy(function (node, options) { - this.setCheckedState(node, true, options); - }, this)); - - this.render(); - }; - - /** - Uncheck all tree nodes - @param {optional Object} options - */ - Tree.prototype.uncheckAll = function (options) { - var identifiers = this.findNodes('true', 'g', 'state.checked'); - this.forEachIdentifier(identifiers, options, $.proxy(function (node, options) { - this.setCheckedState(node, false, options); - }, this)); - - this.render(); - }; - - /** - Uncheck a given tree node - @param {Object|Number} identifiers - A valid node, node id or array of node identifiers - @param {optional Object} options - */ - Tree.prototype.uncheckNode = function (identifiers, options) { - this.forEachIdentifier(identifiers, options, $.proxy(function (node, options) { - this.setCheckedState(node, false, options); - }, this)); - - this.render(); - }; - - /** - Toggles a nodes checked state; checking if unchecked, unchecking if checked. - @param {Object|Number} identifiers - A valid node, node id or array of node identifiers - @param {optional Object} options - */ - Tree.prototype.toggleNodeChecked = function (identifiers, options) { - this.forEachIdentifier(identifiers, options, $.proxy(function (node, options) { - this.toggleCheckedState(node, options); - }, this)); - - this.render(); - }; - - - /** - Disable all tree nodes - @param {optional Object} options - */ - Tree.prototype.disableAll = function (options) { - var identifiers = this.findNodes('false', 'g', 'state.disabled'); - this.forEachIdentifier(identifiers, options, $.proxy(function (node, options) { - this.setDisabledState(node, true, options); - }, this)); - - this.render(); - }; - - /** - Disable a given tree node - @param {Object|Number} identifiers - A valid node, node id or array of node identifiers - @param {optional Object} options - */ - Tree.prototype.disableNode = function (identifiers, options) { - this.forEachIdentifier(identifiers, options, $.proxy(function (node, options) { - this.setDisabledState(node, true, options); - }, this)); - - this.render(); - }; - - /** - Enable all tree nodes - @param {optional Object} options - */ - Tree.prototype.enableAll = function (options) { - var identifiers = this.findNodes('true', 'g', 'state.disabled'); - this.forEachIdentifier(identifiers, options, $.proxy(function (node, options) { - this.setDisabledState(node, false, options); - }, this)); - - this.render(); - }; - - /** - Enable a given tree node - @param {Object|Number} identifiers - A valid node, node id or array of node identifiers - @param {optional Object} options - */ - Tree.prototype.enableNode = function (identifiers, options) { - this.forEachIdentifier(identifiers, options, $.proxy(function (node, options) { - this.setDisabledState(node, false, options); - }, this)); - - this.render(); - }; - - /** - Toggles a nodes disabled state; disabling is enabled, enabling if disabled. - @param {Object|Number} identifiers - A valid node, node id or array of node identifiers - @param {optional Object} options - */ - Tree.prototype.toggleNodeDisabled = function (identifiers, options) { - this.forEachIdentifier(identifiers, options, $.proxy(function (node, options) { - this.setDisabledState(node, !node.state.disabled, options); - }, this)); - - this.render(); - }; - - - /** - Common code for processing multiple identifiers - */ - Tree.prototype.forEachIdentifier = function (identifiers, options, callback) { - - options = $.extend({}, _default.options, options); - - if (!(identifiers instanceof Array)) { - identifiers = [identifiers]; - } - - $.each(identifiers, $.proxy(function (index, identifier) { - callback(this.identifyNode(identifier), options); - }, this)); - }; - - /* - Identifies a node from either a node id or object - */ - Tree.prototype.identifyNode = function (identifier) { - return ((typeof identifier) === 'number') ? - this.nodes[identifier] : - identifier; - }; - - /** - Searches the tree for nodes (text) that match given criteria - @param {String} pattern - A given string to match against - @param {optional Object} options - Search criteria options - @return {Array} nodes - Matching nodes - */ - Tree.prototype.search = function (pattern, options) { - options = $.extend({}, _default.searchOptions, options); - - this.clearSearch({ render: false }); - - var results = []; - if (pattern && pattern.length > 0) { - - if (options.exactMatch) { - pattern = '^' + pattern + '$'; - } - - var modifier = 'g'; - if (options.ignoreCase) { - modifier += 'i'; - } - - results = this.findNodes(pattern, modifier); - - // Add searchResult property to all matching nodes - // This will be used to apply custom styles - // and when identifying result to be cleared - $.each(results, function (index, node) { - node.searchResult = true; - }) - } - - // If revealResults, then render is triggered from revealNode - // otherwise we just call render. - if (options.revealResults) { - this.revealNode(results); - } - else { - this.render(); - } - - this.$element.trigger('searchComplete', $.extend(true, {}, results)); - - return results; - }; - - /** - Clears previous search results - */ - Tree.prototype.clearSearch = function (options) { - - options = $.extend({}, { render: true }, options); - - var results = $.each(this.findNodes('true', 'g', 'searchResult'), function (index, node) { - node.searchResult = false; - }); - - if (options.render) { - this.render(); - } - - this.$element.trigger('searchCleared', $.extend(true, {}, results)); - }; - - /** - Find nodes that match a given criteria - @param {String} pattern - A given string to match against - @param {optional String} modifier - Valid RegEx modifiers - @param {optional String} attribute - Attribute to compare pattern against - @return {Array} nodes - Nodes that match your criteria - */ - Tree.prototype.findNodes = function (pattern, modifier, attribute) { - - modifier = modifier || 'g'; - attribute = attribute || 'text'; - - var _this = this; - return $.grep(this.nodes, function (node) { - var val = _this.getNodeValue(node, attribute); - if (typeof val === 'string') { - return val.match(new RegExp(pattern, modifier)); - } - }); - }; - - /** - Recursive find for retrieving nested attributes values - All values are return as strings, unless invalid - @param {Object} obj - Typically a node, could be any object - @param {String} attr - Identifies an object property using dot notation - @return {String} value - Matching attributes string representation - */ - Tree.prototype.getNodeValue = function (obj, attr) { - var index = attr.indexOf('.'); - if (index > 0) { - var _obj = obj[attr.substring(0, index)]; - var _attr = attr.substring(index + 1, attr.length); - return this.getNodeValue(_obj, _attr); - } - else { - if (obj.hasOwnProperty(attr)) { - return obj[attr].toString(); - } - else { - return undefined; - } - } - }; - - var logError = function (message) { - if (window.console) { - window.console.error(message); - } - }; - - // Prevent against multiple instantiations, - // handle updates and method calls - $.fn[pluginName] = function (options, args) { - - var result; - - this.each(function () { - var _this = $.data(this, pluginName); - if (typeof options === 'string') { - if (!_this) { - logError('Not initialized, can not call method : ' + options); - } - else if (!$.isFunction(_this[options]) || options.charAt(0) === '_') { - logError('No such method : ' + options); - } - else { - if (!(args instanceof Array)) { - args = [ args ]; - } - result = _this[options].apply(_this, args); - } - } - else if (typeof options === 'boolean') { - result = _this; - } - else { - $.data(this, pluginName, new Tree(this, $.extend(true, {}, options))); - } - }); - - return result || this; - }; - -})(jQuery, window, document); diff --git a/blockly/webif/static/js/bootstrap-treeview.min.js b/blockly/webif/static/js/bootstrap-treeview.min.js deleted file mode 100755 index 9e2803815..000000000 --- a/blockly/webif/static/js/bootstrap-treeview.min.js +++ /dev/null @@ -1 +0,0 @@ -!function(a,b,c,d){"use strict";var e="treeview",f={};f.settings={injectStyle:!0,levels:2,expandIcon:"glyphicon glyphicon-plus",collapseIcon:"glyphicon glyphicon-minus",emptyIcon:"glyphicon",nodeIcon:"",selectedIcon:"",checkedIcon:"glyphicon glyphicon-check",uncheckedIcon:"glyphicon glyphicon-unchecked",color:d,backColor:d,borderColor:d,onhoverColor:"#F5F5F5",selectedColor:"#FFFFFF",selectedBackColor:"#428bca",searchResultColor:"#D9534F",searchResultBackColor:d,enableLinks:!1,highlightSelected:!0,highlightSearchResults:!0,showBorder:!0,showIcon:!0,showCheckbox:!1,showTags:!1,multiSelect:!1,onNodeChecked:d,onNodeCollapsed:d,onNodeDisabled:d,onNodeEnabled:d,onNodeExpanded:d,onNodeSelected:d,onNodeUnchecked:d,onNodeUnselected:d,onSearchComplete:d,onSearchCleared:d},f.options={silent:!1,ignoreChildren:!1},f.searchOptions={ignoreCase:!0,exactMatch:!1,revealResults:!0};var g=function(b,c){return this.$element=a(b),this.elementId=b.id,this.styleId=this.elementId+"-style",this.init(c),{options:this.options,init:a.proxy(this.init,this),remove:a.proxy(this.remove,this),getNode:a.proxy(this.getNode,this),getParent:a.proxy(this.getParent,this),getSiblings:a.proxy(this.getSiblings,this),getSelected:a.proxy(this.getSelected,this),getUnselected:a.proxy(this.getUnselected,this),getExpanded:a.proxy(this.getExpanded,this),getCollapsed:a.proxy(this.getCollapsed,this),getChecked:a.proxy(this.getChecked,this),getUnchecked:a.proxy(this.getUnchecked,this),getDisabled:a.proxy(this.getDisabled,this),getEnabled:a.proxy(this.getEnabled,this),selectNode:a.proxy(this.selectNode,this),unselectNode:a.proxy(this.unselectNode,this),toggleNodeSelected:a.proxy(this.toggleNodeSelected,this),collapseAll:a.proxy(this.collapseAll,this),collapseNode:a.proxy(this.collapseNode,this),expandAll:a.proxy(this.expandAll,this),expandNode:a.proxy(this.expandNode,this),toggleNodeExpanded:a.proxy(this.toggleNodeExpanded,this),revealNode:a.proxy(this.revealNode,this),checkAll:a.proxy(this.checkAll,this),checkNode:a.proxy(this.checkNode,this),uncheckAll:a.proxy(this.uncheckAll,this),uncheckNode:a.proxy(this.uncheckNode,this),toggleNodeChecked:a.proxy(this.toggleNodeChecked,this),disableAll:a.proxy(this.disableAll,this),disableNode:a.proxy(this.disableNode,this),enableAll:a.proxy(this.enableAll,this),enableNode:a.proxy(this.enableNode,this),toggleNodeDisabled:a.proxy(this.toggleNodeDisabled,this),search:a.proxy(this.search,this),clearSearch:a.proxy(this.clearSearch,this)}};g.prototype.init=function(b){this.tree=[],this.nodes=[],b.data&&("string"==typeof b.data&&(b.data=a.parseJSON(b.data)),this.tree=a.extend(!0,[],b.data),delete b.data),this.options=a.extend({},f.settings,b),this.destroy(),this.subscribeEvents(),this.setInitialStates({nodes:this.tree},0),this.render()},g.prototype.remove=function(){this.destroy(),a.removeData(this,e),a("#"+this.styleId).remove()},g.prototype.destroy=function(){this.initialized&&(this.$wrapper.remove(),this.$wrapper=null,this.unsubscribeEvents(),this.initialized=!1)},g.prototype.unsubscribeEvents=function(){this.$element.off("click"),this.$element.off("nodeChecked"),this.$element.off("nodeCollapsed"),this.$element.off("nodeDisabled"),this.$element.off("nodeEnabled"),this.$element.off("nodeExpanded"),this.$element.off("nodeSelected"),this.$element.off("nodeUnchecked"),this.$element.off("nodeUnselected"),this.$element.off("searchComplete"),this.$element.off("searchCleared")},g.prototype.subscribeEvents=function(){this.unsubscribeEvents(),this.$element.on("click",a.proxy(this.clickHandler,this)),"function"==typeof this.options.onNodeChecked&&this.$element.on("nodeChecked",this.options.onNodeChecked),"function"==typeof this.options.onNodeCollapsed&&this.$element.on("nodeCollapsed",this.options.onNodeCollapsed),"function"==typeof this.options.onNodeDisabled&&this.$element.on("nodeDisabled",this.options.onNodeDisabled),"function"==typeof this.options.onNodeEnabled&&this.$element.on("nodeEnabled",this.options.onNodeEnabled),"function"==typeof this.options.onNodeExpanded&&this.$element.on("nodeExpanded",this.options.onNodeExpanded),"function"==typeof this.options.onNodeSelected&&this.$element.on("nodeSelected",this.options.onNodeSelected),"function"==typeof this.options.onNodeUnchecked&&this.$element.on("nodeUnchecked",this.options.onNodeUnchecked),"function"==typeof this.options.onNodeUnselected&&this.$element.on("nodeUnselected",this.options.onNodeUnselected),"function"==typeof this.options.onSearchComplete&&this.$element.on("searchComplete",this.options.onSearchComplete),"function"==typeof this.options.onSearchCleared&&this.$element.on("searchCleared",this.options.onSearchCleared)},g.prototype.setInitialStates=function(b,c){if(b.nodes){c+=1;var d=b,e=this;a.each(b.nodes,function(a,b){b.nodeId=e.nodes.length,b.parentId=d.nodeId,b.hasOwnProperty("selectable")||(b.selectable=!0),b.state=b.state||{},b.state.hasOwnProperty("checked")||(b.state.checked=!1),b.state.hasOwnProperty("disabled")||(b.state.disabled=!1),b.state.hasOwnProperty("expanded")||(!b.state.disabled&&c0?b.state.expanded=!0:b.state.expanded=!1),b.state.hasOwnProperty("selected")||(b.state.selected=!1),e.nodes.push(b),b.nodes&&e.setInitialStates(b,c)})}},g.prototype.clickHandler=function(b){this.options.enableLinks||b.preventDefault();var c=a(b.target),d=this.findNode(c);if(d&&!d.state.disabled){var e=c.attr("class")?c.attr("class").split(" "):[];-1!==e.indexOf("expand-icon")?(this.toggleExpandedState(d,f.options),this.render()):-1!==e.indexOf("check-icon")?(this.toggleCheckedState(d,f.options),this.render()):(d.selectable?this.toggleSelectedState(d,f.options):this.toggleExpandedState(d,f.options),this.render())}},g.prototype.findNode=function(a){var b=a.closest("li.list-group-item").attr("data-nodeid"),c=this.nodes[b];return c||console.log("Error: node does not exist"),c},g.prototype.toggleExpandedState=function(a,b){a&&this.setExpandedState(a,!a.state.expanded,b)},g.prototype.setExpandedState=function(b,c,d){c!==b.state.expanded&&(c&&b.nodes?(b.state.expanded=!0,d.silent||this.$element.trigger("nodeExpanded",a.extend(!0,{},b))):c||(b.state.expanded=!1,d.silent||this.$element.trigger("nodeCollapsed",a.extend(!0,{},b)),b.nodes&&!d.ignoreChildren&&a.each(b.nodes,a.proxy(function(a,b){this.setExpandedState(b,!1,d)},this))))},g.prototype.toggleSelectedState=function(a,b){a&&this.setSelectedState(a,!a.state.selected,b)},g.prototype.setSelectedState=function(b,c,d){c!==b.state.selected&&(c?(this.options.multiSelect||a.each(this.findNodes("true","g","state.selected"),a.proxy(function(a,b){this.setSelectedState(b,!1,d)},this)),b.state.selected=!0,d.silent||this.$element.trigger("nodeSelected",a.extend(!0,{},b))):(b.state.selected=!1,d.silent||this.$element.trigger("nodeUnselected",a.extend(!0,{},b))))},g.prototype.toggleCheckedState=function(a,b){a&&this.setCheckedState(a,!a.state.checked,b)},g.prototype.setCheckedState=function(b,c,d){c!==b.state.checked&&(c?(b.state.checked=!0,d.silent||this.$element.trigger("nodeChecked",a.extend(!0,{},b))):(b.state.checked=!1,d.silent||this.$element.trigger("nodeUnchecked",a.extend(!0,{},b))))},g.prototype.setDisabledState=function(b,c,d){c!==b.state.disabled&&(c?(b.state.disabled=!0,this.setExpandedState(b,!1,d),this.setSelectedState(b,!1,d),this.setCheckedState(b,!1,d),d.silent||this.$element.trigger("nodeDisabled",a.extend(!0,{},b))):(b.state.disabled=!1,d.silent||this.$element.trigger("nodeEnabled",a.extend(!0,{},b))))},g.prototype.render=function(){this.initialized||(this.$element.addClass(e),this.$wrapper=a(this.template.list),this.injectStyle(),this.initialized=!0),this.$element.empty().append(this.$wrapper.empty()),this.buildTree(this.tree,0)},g.prototype.buildTree=function(b,c){if(b){c+=1;var d=this;a.each(b,function(b,e){for(var f=a(d.template.item).addClass("node-"+d.elementId).addClass(e.state.checked?"node-checked":"").addClass(e.state.disabled?"node-disabled":"").addClass(e.state.selected?"node-selected":"").addClass(e.searchResult?"search-result":"").attr("data-nodeid",e.nodeId).attr("style",d.buildStyleOverride(e)),g=0;c-1>g;g++)f.append(d.template.indent);var h=[];if(e.nodes?(h.push("expand-icon"),h.push(e.state.expanded?d.options.collapseIcon:d.options.expandIcon)):h.push(d.options.emptyIcon),f.append(a(d.template.icon).addClass(h.join(" "))),d.options.showIcon){var h=["node-icon"];h.push(e.icon||d.options.nodeIcon),e.state.selected&&(h.pop(),h.push(e.selectedIcon||d.options.selectedIcon||e.icon||d.options.nodeIcon)),f.append(a(d.template.icon).addClass(h.join(" ")))}if(d.options.showCheckbox){var h=["check-icon"];h.push(e.state.checked?d.options.checkedIcon:d.options.uncheckedIcon),f.append(a(d.template.icon).addClass(h.join(" ")))}return f.append(d.options.enableLinks?a(d.template.link).attr("href",e.href).append(e.text):e.text),d.options.showTags&&e.tags&&a.each(e.tags,function(b,c){f.append(a(d.template.badge).append(c))}),d.$wrapper.append(f),e.nodes&&e.state.expanded&&!e.state.disabled?d.buildTree(e.nodes,c):void 0})}},g.prototype.buildStyleOverride=function(a){if(a.state.disabled)return"";var b=a.color,c=a.backColor;return this.options.highlightSelected&&a.state.selected&&(this.options.selectedColor&&(b=this.options.selectedColor),this.options.selectedBackColor&&(c=this.options.selectedBackColor)),this.options.highlightSearchResults&&a.searchResult&&!a.state.disabled&&(this.options.searchResultColor&&(b=this.options.searchResultColor),this.options.searchResultBackColor&&(c=this.options.searchResultBackColor)),"color:"+b+";background-color:"+c+";"},g.prototype.injectStyle=function(){this.options.injectStyle&&!c.getElementById(this.styleId)&&a('").appendTo("head")},g.prototype.buildStyle=function(){var a=".node-"+this.elementId+"{";return this.options.color&&(a+="color:"+this.options.color+";"),this.options.backColor&&(a+="background-color:"+this.options.backColor+";"),this.options.showBorder?this.options.borderColor&&(a+="border:1px solid "+this.options.borderColor+";"):a+="border:none;",a+="}",this.options.onhoverColor&&(a+=".node-"+this.elementId+":not(.node-disabled):hover{background-color:"+this.options.onhoverColor+";}"),this.css+a},g.prototype.template={list:'
      ',item:'
    • ',indent:'',icon:'',link:'',badge:''},g.prototype.css=".treeview .list-group-item{cursor:pointer}.treeview span.indent{margin-left:10px;margin-right:10px}.treeview span.icon{width:12px;margin-right:5px}.treeview .node-disabled{color:silver;cursor:not-allowed}",g.prototype.getNode=function(a){return this.nodes[a]},g.prototype.getParent=function(a){var b=this.identifyNode(a);return this.nodes[b.parentId]},g.prototype.getSiblings=function(a){var b=this.identifyNode(a),c=this.getParent(b),d=c?c.nodes:this.tree;return d.filter(function(a){return a.nodeId!==b.nodeId})},g.prototype.getSelected=function(){return this.findNodes("true","g","state.selected")},g.prototype.getUnselected=function(){return this.findNodes("false","g","state.selected")},g.prototype.getExpanded=function(){return this.findNodes("true","g","state.expanded")},g.prototype.getCollapsed=function(){return this.findNodes("false","g","state.expanded")},g.prototype.getChecked=function(){return this.findNodes("true","g","state.checked")},g.prototype.getUnchecked=function(){return this.findNodes("false","g","state.checked")},g.prototype.getDisabled=function(){return this.findNodes("true","g","state.disabled")},g.prototype.getEnabled=function(){return this.findNodes("false","g","state.disabled")},g.prototype.selectNode=function(b,c){this.forEachIdentifier(b,c,a.proxy(function(a,b){this.setSelectedState(a,!0,b)},this)),this.render()},g.prototype.unselectNode=function(b,c){this.forEachIdentifier(b,c,a.proxy(function(a,b){this.setSelectedState(a,!1,b)},this)),this.render()},g.prototype.toggleNodeSelected=function(b,c){this.forEachIdentifier(b,c,a.proxy(function(a,b){this.toggleSelectedState(a,b)},this)),this.render()},g.prototype.collapseAll=function(b){var c=this.findNodes("true","g","state.expanded");this.forEachIdentifier(c,b,a.proxy(function(a,b){this.setExpandedState(a,!1,b)},this)),this.render()},g.prototype.collapseNode=function(b,c){this.forEachIdentifier(b,c,a.proxy(function(a,b){this.setExpandedState(a,!1,b)},this)),this.render()},g.prototype.expandAll=function(b){if(b=a.extend({},f.options,b),b&&b.levels)this.expandLevels(this.tree,b.levels,b);else{var c=this.findNodes("false","g","state.expanded");this.forEachIdentifier(c,b,a.proxy(function(a,b){this.setExpandedState(a,!0,b)},this))}this.render()},g.prototype.expandNode=function(b,c){this.forEachIdentifier(b,c,a.proxy(function(a,b){this.setExpandedState(a,!0,b),a.nodes&&b&&b.levels&&this.expandLevels(a.nodes,b.levels-1,b)},this)),this.render()},g.prototype.expandLevels=function(b,c,d){d=a.extend({},f.options,d),a.each(b,a.proxy(function(a,b){this.setExpandedState(b,c>0?!0:!1,d),b.nodes&&this.expandLevels(b.nodes,c-1,d)},this))},g.prototype.revealNode=function(b,c){this.forEachIdentifier(b,c,a.proxy(function(a,b){for(var c=this.getParent(a);c;)this.setExpandedState(c,!0,b),c=this.getParent(c)},this)),this.render()},g.prototype.toggleNodeExpanded=function(b,c){this.forEachIdentifier(b,c,a.proxy(function(a,b){this.toggleExpandedState(a,b)},this)),this.render()},g.prototype.checkAll=function(b){var c=this.findNodes("false","g","state.checked");this.forEachIdentifier(c,b,a.proxy(function(a,b){this.setCheckedState(a,!0,b)},this)),this.render()},g.prototype.checkNode=function(b,c){this.forEachIdentifier(b,c,a.proxy(function(a,b){this.setCheckedState(a,!0,b)},this)),this.render()},g.prototype.uncheckAll=function(b){var c=this.findNodes("true","g","state.checked");this.forEachIdentifier(c,b,a.proxy(function(a,b){this.setCheckedState(a,!1,b)},this)),this.render()},g.prototype.uncheckNode=function(b,c){this.forEachIdentifier(b,c,a.proxy(function(a,b){this.setCheckedState(a,!1,b)},this)),this.render()},g.prototype.toggleNodeChecked=function(b,c){this.forEachIdentifier(b,c,a.proxy(function(a,b){this.toggleCheckedState(a,b)},this)),this.render()},g.prototype.disableAll=function(b){var c=this.findNodes("false","g","state.disabled");this.forEachIdentifier(c,b,a.proxy(function(a,b){this.setDisabledState(a,!0,b)},this)),this.render()},g.prototype.disableNode=function(b,c){this.forEachIdentifier(b,c,a.proxy(function(a,b){this.setDisabledState(a,!0,b)},this)),this.render()},g.prototype.enableAll=function(b){var c=this.findNodes("true","g","state.disabled");this.forEachIdentifier(c,b,a.proxy(function(a,b){this.setDisabledState(a,!1,b)},this)),this.render()},g.prototype.enableNode=function(b,c){this.forEachIdentifier(b,c,a.proxy(function(a,b){this.setDisabledState(a,!1,b)},this)),this.render()},g.prototype.toggleNodeDisabled=function(b,c){this.forEachIdentifier(b,c,a.proxy(function(a,b){this.setDisabledState(a,!a.state.disabled,b)},this)),this.render()},g.prototype.forEachIdentifier=function(b,c,d){c=a.extend({},f.options,c),b instanceof Array||(b=[b]),a.each(b,a.proxy(function(a,b){d(this.identifyNode(b),c)},this))},g.prototype.identifyNode=function(a){return"number"==typeof a?this.nodes[a]:a},g.prototype.search=function(b,c){c=a.extend({},f.searchOptions,c),this.clearSearch({render:!1});var d=[];if(b&&b.length>0){c.exactMatch&&(b="^"+b+"$");var e="g";c.ignoreCase&&(e+="i"),d=this.findNodes(b,e),a.each(d,function(a,b){b.searchResult=!0})}return c.revealResults?this.revealNode(d):this.render(),this.$element.trigger("searchComplete",a.extend(!0,{},d)),d},g.prototype.clearSearch=function(b){b=a.extend({},{render:!0},b);var c=a.each(this.findNodes("true","g","searchResult"),function(a,b){b.searchResult=!1});b.render&&this.render(),this.$element.trigger("searchCleared",a.extend(!0,{},c))},g.prototype.findNodes=function(b,c,d){c=c||"g",d=d||"text";var e=this;return a.grep(this.nodes,function(a){var f=e.getNodeValue(a,d);return"string"==typeof f?f.match(new RegExp(b,c)):void 0})},g.prototype.getNodeValue=function(a,b){var c=b.indexOf(".");if(c>0){var e=a[b.substring(0,c)],f=b.substring(c+1,b.length);return this.getNodeValue(e,f)}return a.hasOwnProperty(b)?a[b].toString():d};var h=function(a){b.console&&b.console.error(a)};a.fn[e]=function(b,c){var d;return this.each(function(){var f=a.data(this,e);"string"==typeof b?f?a.isFunction(f[b])&&"_"!==b.charAt(0)?(c instanceof Array||(c=[c]),d=f[b].apply(f,c)):h("No such method : "+b):h("Not initialized, can not call method : "+b):"boolean"==typeof b?d=f:a.data(this,e,new g(this,a.extend(!0,{},b)))}),d||this}}(jQuery,window,document); \ No newline at end of file diff --git a/blockly/webif/static/js/bootstrap.js b/blockly/webif/static/js/bootstrap.js deleted file mode 100755 index 8a2e99a53..000000000 --- a/blockly/webif/static/js/bootstrap.js +++ /dev/null @@ -1,2377 +0,0 @@ -/*! - * Bootstrap v3.3.7 (http://getbootstrap.com) - * Copyright 2011-2016 Twitter, Inc. - * Licensed under the MIT license - */ - -if (typeof jQuery === 'undefined') { - throw new Error('Bootstrap\'s JavaScript requires jQuery') -} - -+function ($) { - 'use strict'; - var version = $.fn.jquery.split(' ')[0].split('.') - if ((version[0] < 2 && version[1] < 9) || (version[0] == 1 && version[1] == 9 && version[2] < 1) || (version[0] > 3)) { - throw new Error('Bootstrap\'s JavaScript requires jQuery version 1.9.1 or higher, but lower than version 4') - } -}(jQuery); - -/* ======================================================================== - * Bootstrap: transition.js v3.3.7 - * http://getbootstrap.com/javascript/#transitions - * ======================================================================== - * Copyright 2011-2016 Twitter, Inc. - * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) - * ======================================================================== */ - - -+function ($) { - 'use strict'; - - // CSS TRANSITION SUPPORT (Shoutout: http://www.modernizr.com/) - // ============================================================ - - function transitionEnd() { - var el = document.createElement('bootstrap') - - var transEndEventNames = { - WebkitTransition : 'webkitTransitionEnd', - MozTransition : 'transitionend', - OTransition : 'oTransitionEnd otransitionend', - transition : 'transitionend' - } - - for (var name in transEndEventNames) { - if (el.style[name] !== undefined) { - return { end: transEndEventNames[name] } - } - } - - return false // explicit for ie8 ( ._.) - } - - // http://blog.alexmaccaw.com/css-transitions - $.fn.emulateTransitionEnd = function (duration) { - var called = false - var $el = this - $(this).one('bsTransitionEnd', function () { called = true }) - var callback = function () { if (!called) $($el).trigger($.support.transition.end) } - setTimeout(callback, duration) - return this - } - - $(function () { - $.support.transition = transitionEnd() - - if (!$.support.transition) return - - $.event.special.bsTransitionEnd = { - bindType: $.support.transition.end, - delegateType: $.support.transition.end, - handle: function (e) { - if ($(e.target).is(this)) return e.handleObj.handler.apply(this, arguments) - } - } - }) - -}(jQuery); - -/* ======================================================================== - * Bootstrap: alert.js v3.3.7 - * http://getbootstrap.com/javascript/#alerts - * ======================================================================== - * Copyright 2011-2016 Twitter, Inc. - * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) - * ======================================================================== */ - - -+function ($) { - 'use strict'; - - // ALERT CLASS DEFINITION - // ====================== - - var dismiss = '[data-dismiss="alert"]' - var Alert = function (el) { - $(el).on('click', dismiss, this.close) - } - - Alert.VERSION = '3.3.7' - - Alert.TRANSITION_DURATION = 150 - - Alert.prototype.close = function (e) { - var $this = $(this) - var selector = $this.attr('data-target') - - if (!selector) { - selector = $this.attr('href') - selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') // strip for ie7 - } - - var $parent = $(selector === '#' ? [] : selector) - - if (e) e.preventDefault() - - if (!$parent.length) { - $parent = $this.closest('.alert') - } - - $parent.trigger(e = $.Event('close.bs.alert')) - - if (e.isDefaultPrevented()) return - - $parent.removeClass('in') - - function removeElement() { - // detach from parent, fire event then clean up data - $parent.detach().trigger('closed.bs.alert').remove() - } - - $.support.transition && $parent.hasClass('fade') ? - $parent - .one('bsTransitionEnd', removeElement) - .emulateTransitionEnd(Alert.TRANSITION_DURATION) : - removeElement() - } - - - // ALERT PLUGIN DEFINITION - // ======================= - - function Plugin(option) { - return this.each(function () { - var $this = $(this) - var data = $this.data('bs.alert') - - if (!data) $this.data('bs.alert', (data = new Alert(this))) - if (typeof option == 'string') data[option].call($this) - }) - } - - var old = $.fn.alert - - $.fn.alert = Plugin - $.fn.alert.Constructor = Alert - - - // ALERT NO CONFLICT - // ================= - - $.fn.alert.noConflict = function () { - $.fn.alert = old - return this - } - - - // ALERT DATA-API - // ============== - - $(document).on('click.bs.alert.data-api', dismiss, Alert.prototype.close) - -}(jQuery); - -/* ======================================================================== - * Bootstrap: button.js v3.3.7 - * http://getbootstrap.com/javascript/#buttons - * ======================================================================== - * Copyright 2011-2016 Twitter, Inc. - * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) - * ======================================================================== */ - - -+function ($) { - 'use strict'; - - // BUTTON PUBLIC CLASS DEFINITION - // ============================== - - var Button = function (element, options) { - this.$element = $(element) - this.options = $.extend({}, Button.DEFAULTS, options) - this.isLoading = false - } - - Button.VERSION = '3.3.7' - - Button.DEFAULTS = { - loadingText: 'loading...' - } - - Button.prototype.setState = function (state) { - var d = 'disabled' - var $el = this.$element - var val = $el.is('input') ? 'val' : 'html' - var data = $el.data() - - state += 'Text' - - if (data.resetText == null) $el.data('resetText', $el[val]()) - - // push to event loop to allow forms to submit - setTimeout($.proxy(function () { - $el[val](data[state] == null ? this.options[state] : data[state]) - - if (state == 'loadingText') { - this.isLoading = true - $el.addClass(d).attr(d, d).prop(d, true) - } else if (this.isLoading) { - this.isLoading = false - $el.removeClass(d).removeAttr(d).prop(d, false) - } - }, this), 0) - } - - Button.prototype.toggle = function () { - var changed = true - var $parent = this.$element.closest('[data-toggle="buttons"]') - - if ($parent.length) { - var $input = this.$element.find('input') - if ($input.prop('type') == 'radio') { - if ($input.prop('checked')) changed = false - $parent.find('.active').removeClass('active') - this.$element.addClass('active') - } else if ($input.prop('type') == 'checkbox') { - if (($input.prop('checked')) !== this.$element.hasClass('active')) changed = false - this.$element.toggleClass('active') - } - $input.prop('checked', this.$element.hasClass('active')) - if (changed) $input.trigger('change') - } else { - this.$element.attr('aria-pressed', !this.$element.hasClass('active')) - this.$element.toggleClass('active') - } - } - - - // BUTTON PLUGIN DEFINITION - // ======================== - - function Plugin(option) { - return this.each(function () { - var $this = $(this) - var data = $this.data('bs.button') - var options = typeof option == 'object' && option - - if (!data) $this.data('bs.button', (data = new Button(this, options))) - - if (option == 'toggle') data.toggle() - else if (option) data.setState(option) - }) - } - - var old = $.fn.button - - $.fn.button = Plugin - $.fn.button.Constructor = Button - - - // BUTTON NO CONFLICT - // ================== - - $.fn.button.noConflict = function () { - $.fn.button = old - return this - } - - - // BUTTON DATA-API - // =============== - - $(document) - .on('click.bs.button.data-api', '[data-toggle^="button"]', function (e) { - var $btn = $(e.target).closest('.btn') - Plugin.call($btn, 'toggle') - if (!($(e.target).is('input[type="radio"], input[type="checkbox"]'))) { - // Prevent double click on radios, and the double selections (so cancellation) on checkboxes - e.preventDefault() - // The target component still receive the focus - if ($btn.is('input,button')) $btn.trigger('focus') - else $btn.find('input:visible,button:visible').first().trigger('focus') - } - }) - .on('focus.bs.button.data-api blur.bs.button.data-api', '[data-toggle^="button"]', function (e) { - $(e.target).closest('.btn').toggleClass('focus', /^focus(in)?$/.test(e.type)) - }) - -}(jQuery); - -/* ======================================================================== - * Bootstrap: carousel.js v3.3.7 - * http://getbootstrap.com/javascript/#carousel - * ======================================================================== - * Copyright 2011-2016 Twitter, Inc. - * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) - * ======================================================================== */ - - -+function ($) { - 'use strict'; - - // CAROUSEL CLASS DEFINITION - // ========================= - - var Carousel = function (element, options) { - this.$element = $(element) - this.$indicators = this.$element.find('.carousel-indicators') - this.options = options - this.paused = null - this.sliding = null - this.interval = null - this.$active = null - this.$items = null - - this.options.keyboard && this.$element.on('keydown.bs.carousel', $.proxy(this.keydown, this)) - - this.options.pause == 'hover' && !('ontouchstart' in document.documentElement) && this.$element - .on('mouseenter.bs.carousel', $.proxy(this.pause, this)) - .on('mouseleave.bs.carousel', $.proxy(this.cycle, this)) - } - - Carousel.VERSION = '3.3.7' - - Carousel.TRANSITION_DURATION = 600 - - Carousel.DEFAULTS = { - interval: 5000, - pause: 'hover', - wrap: true, - keyboard: true - } - - Carousel.prototype.keydown = function (e) { - if (/input|textarea/i.test(e.target.tagName)) return - switch (e.which) { - case 37: this.prev(); break - case 39: this.next(); break - default: return - } - - e.preventDefault() - } - - Carousel.prototype.cycle = function (e) { - e || (this.paused = false) - - this.interval && clearInterval(this.interval) - - this.options.interval - && !this.paused - && (this.interval = setInterval($.proxy(this.next, this), this.options.interval)) - - return this - } - - Carousel.prototype.getItemIndex = function (item) { - this.$items = item.parent().children('.item') - return this.$items.index(item || this.$active) - } - - Carousel.prototype.getItemForDirection = function (direction, active) { - var activeIndex = this.getItemIndex(active) - var willWrap = (direction == 'prev' && activeIndex === 0) - || (direction == 'next' && activeIndex == (this.$items.length - 1)) - if (willWrap && !this.options.wrap) return active - var delta = direction == 'prev' ? -1 : 1 - var itemIndex = (activeIndex + delta) % this.$items.length - return this.$items.eq(itemIndex) - } - - Carousel.prototype.to = function (pos) { - var that = this - var activeIndex = this.getItemIndex(this.$active = this.$element.find('.item.active')) - - if (pos > (this.$items.length - 1) || pos < 0) return - - if (this.sliding) return this.$element.one('slid.bs.carousel', function () { that.to(pos) }) // yes, "slid" - if (activeIndex == pos) return this.pause().cycle() - - return this.slide(pos > activeIndex ? 'next' : 'prev', this.$items.eq(pos)) - } - - Carousel.prototype.pause = function (e) { - e || (this.paused = true) - - if (this.$element.find('.next, .prev').length && $.support.transition) { - this.$element.trigger($.support.transition.end) - this.cycle(true) - } - - this.interval = clearInterval(this.interval) - - return this - } - - Carousel.prototype.next = function () { - if (this.sliding) return - return this.slide('next') - } - - Carousel.prototype.prev = function () { - if (this.sliding) return - return this.slide('prev') - } - - Carousel.prototype.slide = function (type, next) { - var $active = this.$element.find('.item.active') - var $next = next || this.getItemForDirection(type, $active) - var isCycling = this.interval - var direction = type == 'next' ? 'left' : 'right' - var that = this - - if ($next.hasClass('active')) return (this.sliding = false) - - var relatedTarget = $next[0] - var slideEvent = $.Event('slide.bs.carousel', { - relatedTarget: relatedTarget, - direction: direction - }) - this.$element.trigger(slideEvent) - if (slideEvent.isDefaultPrevented()) return - - this.sliding = true - - isCycling && this.pause() - - if (this.$indicators.length) { - this.$indicators.find('.active').removeClass('active') - var $nextIndicator = $(this.$indicators.children()[this.getItemIndex($next)]) - $nextIndicator && $nextIndicator.addClass('active') - } - - var slidEvent = $.Event('slid.bs.carousel', { relatedTarget: relatedTarget, direction: direction }) // yes, "slid" - if ($.support.transition && this.$element.hasClass('slide')) { - $next.addClass(type) - $next[0].offsetWidth // force reflow - $active.addClass(direction) - $next.addClass(direction) - $active - .one('bsTransitionEnd', function () { - $next.removeClass([type, direction].join(' ')).addClass('active') - $active.removeClass(['active', direction].join(' ')) - that.sliding = false - setTimeout(function () { - that.$element.trigger(slidEvent) - }, 0) - }) - .emulateTransitionEnd(Carousel.TRANSITION_DURATION) - } else { - $active.removeClass('active') - $next.addClass('active') - this.sliding = false - this.$element.trigger(slidEvent) - } - - isCycling && this.cycle() - - return this - } - - - // CAROUSEL PLUGIN DEFINITION - // ========================== - - function Plugin(option) { - return this.each(function () { - var $this = $(this) - var data = $this.data('bs.carousel') - var options = $.extend({}, Carousel.DEFAULTS, $this.data(), typeof option == 'object' && option) - var action = typeof option == 'string' ? option : options.slide - - if (!data) $this.data('bs.carousel', (data = new Carousel(this, options))) - if (typeof option == 'number') data.to(option) - else if (action) data[action]() - else if (options.interval) data.pause().cycle() - }) - } - - var old = $.fn.carousel - - $.fn.carousel = Plugin - $.fn.carousel.Constructor = Carousel - - - // CAROUSEL NO CONFLICT - // ==================== - - $.fn.carousel.noConflict = function () { - $.fn.carousel = old - return this - } - - - // CAROUSEL DATA-API - // ================= - - var clickHandler = function (e) { - var href - var $this = $(this) - var $target = $($this.attr('data-target') || (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '')) // strip for ie7 - if (!$target.hasClass('carousel')) return - var options = $.extend({}, $target.data(), $this.data()) - var slideIndex = $this.attr('data-slide-to') - if (slideIndex) options.interval = false - - Plugin.call($target, options) - - if (slideIndex) { - $target.data('bs.carousel').to(slideIndex) - } - - e.preventDefault() - } - - $(document) - .on('click.bs.carousel.data-api', '[data-slide]', clickHandler) - .on('click.bs.carousel.data-api', '[data-slide-to]', clickHandler) - - $(window).on('load', function () { - $('[data-ride="carousel"]').each(function () { - var $carousel = $(this) - Plugin.call($carousel, $carousel.data()) - }) - }) - -}(jQuery); - -/* ======================================================================== - * Bootstrap: collapse.js v3.3.7 - * http://getbootstrap.com/javascript/#collapse - * ======================================================================== - * Copyright 2011-2016 Twitter, Inc. - * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) - * ======================================================================== */ - -/* jshint latedef: false */ - -+function ($) { - 'use strict'; - - // COLLAPSE PUBLIC CLASS DEFINITION - // ================================ - - var Collapse = function (element, options) { - this.$element = $(element) - this.options = $.extend({}, Collapse.DEFAULTS, options) - this.$trigger = $('[data-toggle="collapse"][href="#' + element.id + '"],' + - '[data-toggle="collapse"][data-target="#' + element.id + '"]') - this.transitioning = null - - if (this.options.parent) { - this.$parent = this.getParent() - } else { - this.addAriaAndCollapsedClass(this.$element, this.$trigger) - } - - if (this.options.toggle) this.toggle() - } - - Collapse.VERSION = '3.3.7' - - Collapse.TRANSITION_DURATION = 350 - - Collapse.DEFAULTS = { - toggle: true - } - - Collapse.prototype.dimension = function () { - var hasWidth = this.$element.hasClass('width') - return hasWidth ? 'width' : 'height' - } - - Collapse.prototype.show = function () { - if (this.transitioning || this.$element.hasClass('in')) return - - var activesData - var actives = this.$parent && this.$parent.children('.panel').children('.in, .collapsing') - - if (actives && actives.length) { - activesData = actives.data('bs.collapse') - if (activesData && activesData.transitioning) return - } - - var startEvent = $.Event('show.bs.collapse') - this.$element.trigger(startEvent) - if (startEvent.isDefaultPrevented()) return - - if (actives && actives.length) { - Plugin.call(actives, 'hide') - activesData || actives.data('bs.collapse', null) - } - - var dimension = this.dimension() - - this.$element - .removeClass('collapse') - .addClass('collapsing')[dimension](0) - .attr('aria-expanded', true) - - this.$trigger - .removeClass('collapsed') - .attr('aria-expanded', true) - - this.transitioning = 1 - - var complete = function () { - this.$element - .removeClass('collapsing') - .addClass('collapse in')[dimension]('') - this.transitioning = 0 - this.$element - .trigger('shown.bs.collapse') - } - - if (!$.support.transition) return complete.call(this) - - var scrollSize = $.camelCase(['scroll', dimension].join('-')) - - this.$element - .one('bsTransitionEnd', $.proxy(complete, this)) - .emulateTransitionEnd(Collapse.TRANSITION_DURATION)[dimension](this.$element[0][scrollSize]) - } - - Collapse.prototype.hide = function () { - if (this.transitioning || !this.$element.hasClass('in')) return - - var startEvent = $.Event('hide.bs.collapse') - this.$element.trigger(startEvent) - if (startEvent.isDefaultPrevented()) return - - var dimension = this.dimension() - - this.$element[dimension](this.$element[dimension]())[0].offsetHeight - - this.$element - .addClass('collapsing') - .removeClass('collapse in') - .attr('aria-expanded', false) - - this.$trigger - .addClass('collapsed') - .attr('aria-expanded', false) - - this.transitioning = 1 - - var complete = function () { - this.transitioning = 0 - this.$element - .removeClass('collapsing') - .addClass('collapse') - .trigger('hidden.bs.collapse') - } - - if (!$.support.transition) return complete.call(this) - - this.$element - [dimension](0) - .one('bsTransitionEnd', $.proxy(complete, this)) - .emulateTransitionEnd(Collapse.TRANSITION_DURATION) - } - - Collapse.prototype.toggle = function () { - this[this.$element.hasClass('in') ? 'hide' : 'show']() - } - - Collapse.prototype.getParent = function () { - return $(this.options.parent) - .find('[data-toggle="collapse"][data-parent="' + this.options.parent + '"]') - .each($.proxy(function (i, element) { - var $element = $(element) - this.addAriaAndCollapsedClass(getTargetFromTrigger($element), $element) - }, this)) - .end() - } - - Collapse.prototype.addAriaAndCollapsedClass = function ($element, $trigger) { - var isOpen = $element.hasClass('in') - - $element.attr('aria-expanded', isOpen) - $trigger - .toggleClass('collapsed', !isOpen) - .attr('aria-expanded', isOpen) - } - - function getTargetFromTrigger($trigger) { - var href - var target = $trigger.attr('data-target') - || (href = $trigger.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '') // strip for ie7 - - return $(target) - } - - - // COLLAPSE PLUGIN DEFINITION - // ========================== - - function Plugin(option) { - return this.each(function () { - var $this = $(this) - var data = $this.data('bs.collapse') - var options = $.extend({}, Collapse.DEFAULTS, $this.data(), typeof option == 'object' && option) - - if (!data && options.toggle && /show|hide/.test(option)) options.toggle = false - if (!data) $this.data('bs.collapse', (data = new Collapse(this, options))) - if (typeof option == 'string') data[option]() - }) - } - - var old = $.fn.collapse - - $.fn.collapse = Plugin - $.fn.collapse.Constructor = Collapse - - - // COLLAPSE NO CONFLICT - // ==================== - - $.fn.collapse.noConflict = function () { - $.fn.collapse = old - return this - } - - - // COLLAPSE DATA-API - // ================= - - $(document).on('click.bs.collapse.data-api', '[data-toggle="collapse"]', function (e) { - var $this = $(this) - - if (!$this.attr('data-target')) e.preventDefault() - - var $target = getTargetFromTrigger($this) - var data = $target.data('bs.collapse') - var option = data ? 'toggle' : $this.data() - - Plugin.call($target, option) - }) - -}(jQuery); - -/* ======================================================================== - * Bootstrap: dropdown.js v3.3.7 - * http://getbootstrap.com/javascript/#dropdowns - * ======================================================================== - * Copyright 2011-2016 Twitter, Inc. - * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) - * ======================================================================== */ - - -+function ($) { - 'use strict'; - - // DROPDOWN CLASS DEFINITION - // ========================= - - var backdrop = '.dropdown-backdrop' - var toggle = '[data-toggle="dropdown"]' - var Dropdown = function (element) { - $(element).on('click.bs.dropdown', this.toggle) - } - - Dropdown.VERSION = '3.3.7' - - function getParent($this) { - var selector = $this.attr('data-target') - - if (!selector) { - selector = $this.attr('href') - selector = selector && /#[A-Za-z]/.test(selector) && selector.replace(/.*(?=#[^\s]*$)/, '') // strip for ie7 - } - - var $parent = selector && $(selector) - - return $parent && $parent.length ? $parent : $this.parent() - } - - function clearMenus(e) { - if (e && e.which === 3) return - $(backdrop).remove() - $(toggle).each(function () { - var $this = $(this) - var $parent = getParent($this) - var relatedTarget = { relatedTarget: this } - - if (!$parent.hasClass('open')) return - - if (e && e.type == 'click' && /input|textarea/i.test(e.target.tagName) && $.contains($parent[0], e.target)) return - - $parent.trigger(e = $.Event('hide.bs.dropdown', relatedTarget)) - - if (e.isDefaultPrevented()) return - - $this.attr('aria-expanded', 'false') - $parent.removeClass('open').trigger($.Event('hidden.bs.dropdown', relatedTarget)) - }) - } - - Dropdown.prototype.toggle = function (e) { - var $this = $(this) - - if ($this.is('.disabled, :disabled')) return - - var $parent = getParent($this) - var isActive = $parent.hasClass('open') - - clearMenus() - - if (!isActive) { - if ('ontouchstart' in document.documentElement && !$parent.closest('.navbar-nav').length) { - // if mobile we use a backdrop because click events don't delegate - $(document.createElement('div')) - .addClass('dropdown-backdrop') - .insertAfter($(this)) - .on('click', clearMenus) - } - - var relatedTarget = { relatedTarget: this } - $parent.trigger(e = $.Event('show.bs.dropdown', relatedTarget)) - - if (e.isDefaultPrevented()) return - - $this - .trigger('focus') - .attr('aria-expanded', 'true') - - $parent - .toggleClass('open') - .trigger($.Event('shown.bs.dropdown', relatedTarget)) - } - - return false - } - - Dropdown.prototype.keydown = function (e) { - if (!/(38|40|27|32)/.test(e.which) || /input|textarea/i.test(e.target.tagName)) return - - var $this = $(this) - - e.preventDefault() - e.stopPropagation() - - if ($this.is('.disabled, :disabled')) return - - var $parent = getParent($this) - var isActive = $parent.hasClass('open') - - if (!isActive && e.which != 27 || isActive && e.which == 27) { - if (e.which == 27) $parent.find(toggle).trigger('focus') - return $this.trigger('click') - } - - var desc = ' li:not(.disabled):visible a' - var $items = $parent.find('.dropdown-menu' + desc) - - if (!$items.length) return - - var index = $items.index(e.target) - - if (e.which == 38 && index > 0) index-- // up - if (e.which == 40 && index < $items.length - 1) index++ // down - if (!~index) index = 0 - - $items.eq(index).trigger('focus') - } - - - // DROPDOWN PLUGIN DEFINITION - // ========================== - - function Plugin(option) { - return this.each(function () { - var $this = $(this) - var data = $this.data('bs.dropdown') - - if (!data) $this.data('bs.dropdown', (data = new Dropdown(this))) - if (typeof option == 'string') data[option].call($this) - }) - } - - var old = $.fn.dropdown - - $.fn.dropdown = Plugin - $.fn.dropdown.Constructor = Dropdown - - - // DROPDOWN NO CONFLICT - // ==================== - - $.fn.dropdown.noConflict = function () { - $.fn.dropdown = old - return this - } - - - // APPLY TO STANDARD DROPDOWN ELEMENTS - // =================================== - - $(document) - .on('click.bs.dropdown.data-api', clearMenus) - .on('click.bs.dropdown.data-api', '.dropdown form', function (e) { e.stopPropagation() }) - .on('click.bs.dropdown.data-api', toggle, Dropdown.prototype.toggle) - .on('keydown.bs.dropdown.data-api', toggle, Dropdown.prototype.keydown) - .on('keydown.bs.dropdown.data-api', '.dropdown-menu', Dropdown.prototype.keydown) - -}(jQuery); - -/* ======================================================================== - * Bootstrap: modal.js v3.3.7 - * http://getbootstrap.com/javascript/#modals - * ======================================================================== - * Copyright 2011-2016 Twitter, Inc. - * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) - * ======================================================================== */ - - -+function ($) { - 'use strict'; - - // MODAL CLASS DEFINITION - // ====================== - - var Modal = function (element, options) { - this.options = options - this.$body = $(document.body) - this.$element = $(element) - this.$dialog = this.$element.find('.modal-dialog') - this.$backdrop = null - this.isShown = null - this.originalBodyPad = null - this.scrollbarWidth = 0 - this.ignoreBackdropClick = false - - if (this.options.remote) { - this.$element - .find('.modal-content') - .load(this.options.remote, $.proxy(function () { - this.$element.trigger('loaded.bs.modal') - }, this)) - } - } - - Modal.VERSION = '3.3.7' - - Modal.TRANSITION_DURATION = 300 - Modal.BACKDROP_TRANSITION_DURATION = 150 - - Modal.DEFAULTS = { - backdrop: true, - keyboard: true, - show: true - } - - Modal.prototype.toggle = function (_relatedTarget) { - return this.isShown ? this.hide() : this.show(_relatedTarget) - } - - Modal.prototype.show = function (_relatedTarget) { - var that = this - var e = $.Event('show.bs.modal', { relatedTarget: _relatedTarget }) - - this.$element.trigger(e) - - if (this.isShown || e.isDefaultPrevented()) return - - this.isShown = true - - this.checkScrollbar() - this.setScrollbar() - this.$body.addClass('modal-open') - - this.escape() - this.resize() - - this.$element.on('click.dismiss.bs.modal', '[data-dismiss="modal"]', $.proxy(this.hide, this)) - - this.$dialog.on('mousedown.dismiss.bs.modal', function () { - that.$element.one('mouseup.dismiss.bs.modal', function (e) { - if ($(e.target).is(that.$element)) that.ignoreBackdropClick = true - }) - }) - - this.backdrop(function () { - var transition = $.support.transition && that.$element.hasClass('fade') - - if (!that.$element.parent().length) { - that.$element.appendTo(that.$body) // don't move modals dom position - } - - that.$element - .show() - .scrollTop(0) - - that.adjustDialog() - - if (transition) { - that.$element[0].offsetWidth // force reflow - } - - that.$element.addClass('in') - - that.enforceFocus() - - var e = $.Event('shown.bs.modal', { relatedTarget: _relatedTarget }) - - transition ? - that.$dialog // wait for modal to slide in - .one('bsTransitionEnd', function () { - that.$element.trigger('focus').trigger(e) - }) - .emulateTransitionEnd(Modal.TRANSITION_DURATION) : - that.$element.trigger('focus').trigger(e) - }) - } - - Modal.prototype.hide = function (e) { - if (e) e.preventDefault() - - e = $.Event('hide.bs.modal') - - this.$element.trigger(e) - - if (!this.isShown || e.isDefaultPrevented()) return - - this.isShown = false - - this.escape() - this.resize() - - $(document).off('focusin.bs.modal') - - this.$element - .removeClass('in') - .off('click.dismiss.bs.modal') - .off('mouseup.dismiss.bs.modal') - - this.$dialog.off('mousedown.dismiss.bs.modal') - - $.support.transition && this.$element.hasClass('fade') ? - this.$element - .one('bsTransitionEnd', $.proxy(this.hideModal, this)) - .emulateTransitionEnd(Modal.TRANSITION_DURATION) : - this.hideModal() - } - - Modal.prototype.enforceFocus = function () { - $(document) - .off('focusin.bs.modal') // guard against infinite focus loop - .on('focusin.bs.modal', $.proxy(function (e) { - if (document !== e.target && - this.$element[0] !== e.target && - !this.$element.has(e.target).length) { - this.$element.trigger('focus') - } - }, this)) - } - - Modal.prototype.escape = function () { - if (this.isShown && this.options.keyboard) { - this.$element.on('keydown.dismiss.bs.modal', $.proxy(function (e) { - e.which == 27 && this.hide() - }, this)) - } else if (!this.isShown) { - this.$element.off('keydown.dismiss.bs.modal') - } - } - - Modal.prototype.resize = function () { - if (this.isShown) { - $(window).on('resize.bs.modal', $.proxy(this.handleUpdate, this)) - } else { - $(window).off('resize.bs.modal') - } - } - - Modal.prototype.hideModal = function () { - var that = this - this.$element.hide() - this.backdrop(function () { - that.$body.removeClass('modal-open') - that.resetAdjustments() - that.resetScrollbar() - that.$element.trigger('hidden.bs.modal') - }) - } - - Modal.prototype.removeBackdrop = function () { - this.$backdrop && this.$backdrop.remove() - this.$backdrop = null - } - - Modal.prototype.backdrop = function (callback) { - var that = this - var animate = this.$element.hasClass('fade') ? 'fade' : '' - - if (this.isShown && this.options.backdrop) { - var doAnimate = $.support.transition && animate - - this.$backdrop = $(document.createElement('div')) - .addClass('modal-backdrop ' + animate) - .appendTo(this.$body) - - this.$element.on('click.dismiss.bs.modal', $.proxy(function (e) { - if (this.ignoreBackdropClick) { - this.ignoreBackdropClick = false - return - } - if (e.target !== e.currentTarget) return - this.options.backdrop == 'static' - ? this.$element[0].focus() - : this.hide() - }, this)) - - if (doAnimate) this.$backdrop[0].offsetWidth // force reflow - - this.$backdrop.addClass('in') - - if (!callback) return - - doAnimate ? - this.$backdrop - .one('bsTransitionEnd', callback) - .emulateTransitionEnd(Modal.BACKDROP_TRANSITION_DURATION) : - callback() - - } else if (!this.isShown && this.$backdrop) { - this.$backdrop.removeClass('in') - - var callbackRemove = function () { - that.removeBackdrop() - callback && callback() - } - $.support.transition && this.$element.hasClass('fade') ? - this.$backdrop - .one('bsTransitionEnd', callbackRemove) - .emulateTransitionEnd(Modal.BACKDROP_TRANSITION_DURATION) : - callbackRemove() - - } else if (callback) { - callback() - } - } - - // these following methods are used to handle overflowing modals - - Modal.prototype.handleUpdate = function () { - this.adjustDialog() - } - - Modal.prototype.adjustDialog = function () { - var modalIsOverflowing = this.$element[0].scrollHeight > document.documentElement.clientHeight - - this.$element.css({ - paddingLeft: !this.bodyIsOverflowing && modalIsOverflowing ? this.scrollbarWidth : '', - paddingRight: this.bodyIsOverflowing && !modalIsOverflowing ? this.scrollbarWidth : '' - }) - } - - Modal.prototype.resetAdjustments = function () { - this.$element.css({ - paddingLeft: '', - paddingRight: '' - }) - } - - Modal.prototype.checkScrollbar = function () { - var fullWindowWidth = window.innerWidth - if (!fullWindowWidth) { // workaround for missing window.innerWidth in IE8 - var documentElementRect = document.documentElement.getBoundingClientRect() - fullWindowWidth = documentElementRect.right - Math.abs(documentElementRect.left) - } - this.bodyIsOverflowing = document.body.clientWidth < fullWindowWidth - this.scrollbarWidth = this.measureScrollbar() - } - - Modal.prototype.setScrollbar = function () { - var bodyPad = parseInt((this.$body.css('padding-right') || 0), 10) - this.originalBodyPad = document.body.style.paddingRight || '' - if (this.bodyIsOverflowing) this.$body.css('padding-right', bodyPad + this.scrollbarWidth) - } - - Modal.prototype.resetScrollbar = function () { - this.$body.css('padding-right', this.originalBodyPad) - } - - Modal.prototype.measureScrollbar = function () { // thx walsh - var scrollDiv = document.createElement('div') - scrollDiv.className = 'modal-scrollbar-measure' - this.$body.append(scrollDiv) - var scrollbarWidth = scrollDiv.offsetWidth - scrollDiv.clientWidth - this.$body[0].removeChild(scrollDiv) - return scrollbarWidth - } - - - // MODAL PLUGIN DEFINITION - // ======================= - - function Plugin(option, _relatedTarget) { - return this.each(function () { - var $this = $(this) - var data = $this.data('bs.modal') - var options = $.extend({}, Modal.DEFAULTS, $this.data(), typeof option == 'object' && option) - - if (!data) $this.data('bs.modal', (data = new Modal(this, options))) - if (typeof option == 'string') data[option](_relatedTarget) - else if (options.show) data.show(_relatedTarget) - }) - } - - var old = $.fn.modal - - $.fn.modal = Plugin - $.fn.modal.Constructor = Modal - - - // MODAL NO CONFLICT - // ================= - - $.fn.modal.noConflict = function () { - $.fn.modal = old - return this - } - - - // MODAL DATA-API - // ============== - - $(document).on('click.bs.modal.data-api', '[data-toggle="modal"]', function (e) { - var $this = $(this) - var href = $this.attr('href') - var $target = $($this.attr('data-target') || (href && href.replace(/.*(?=#[^\s]+$)/, ''))) // strip for ie7 - var option = $target.data('bs.modal') ? 'toggle' : $.extend({ remote: !/#/.test(href) && href }, $target.data(), $this.data()) - - if ($this.is('a')) e.preventDefault() - - $target.one('show.bs.modal', function (showEvent) { - if (showEvent.isDefaultPrevented()) return // only register focus restorer if modal will actually get shown - $target.one('hidden.bs.modal', function () { - $this.is(':visible') && $this.trigger('focus') - }) - }) - Plugin.call($target, option, this) - }) - -}(jQuery); - -/* ======================================================================== - * Bootstrap: tooltip.js v3.3.7 - * http://getbootstrap.com/javascript/#tooltip - * Inspired by the original jQuery.tipsy by Jason Frame - * ======================================================================== - * Copyright 2011-2016 Twitter, Inc. - * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) - * ======================================================================== */ - - -+function ($) { - 'use strict'; - - // TOOLTIP PUBLIC CLASS DEFINITION - // =============================== - - var Tooltip = function (element, options) { - this.type = null - this.options = null - this.enabled = null - this.timeout = null - this.hoverState = null - this.$element = null - this.inState = null - - this.init('tooltip', element, options) - } - - Tooltip.VERSION = '3.3.7' - - Tooltip.TRANSITION_DURATION = 150 - - Tooltip.DEFAULTS = { - animation: true, - placement: 'top', - selector: false, - template: '', - trigger: 'hover focus', - title: '', - delay: 0, - html: false, - container: false, - viewport: { - selector: 'body', - padding: 0 - } - } - - Tooltip.prototype.init = function (type, element, options) { - this.enabled = true - this.type = type - this.$element = $(element) - this.options = this.getOptions(options) - this.$viewport = this.options.viewport && $($.isFunction(this.options.viewport) ? this.options.viewport.call(this, this.$element) : (this.options.viewport.selector || this.options.viewport)) - this.inState = { click: false, hover: false, focus: false } - - if (this.$element[0] instanceof document.constructor && !this.options.selector) { - throw new Error('`selector` option must be specified when initializing ' + this.type + ' on the window.document object!') - } - - var triggers = this.options.trigger.split(' ') - - for (var i = triggers.length; i--;) { - var trigger = triggers[i] - - if (trigger == 'click') { - this.$element.on('click.' + this.type, this.options.selector, $.proxy(this.toggle, this)) - } else if (trigger != 'manual') { - var eventIn = trigger == 'hover' ? 'mouseenter' : 'focusin' - var eventOut = trigger == 'hover' ? 'mouseleave' : 'focusout' - - this.$element.on(eventIn + '.' + this.type, this.options.selector, $.proxy(this.enter, this)) - this.$element.on(eventOut + '.' + this.type, this.options.selector, $.proxy(this.leave, this)) - } - } - - this.options.selector ? - (this._options = $.extend({}, this.options, { trigger: 'manual', selector: '' })) : - this.fixTitle() - } - - Tooltip.prototype.getDefaults = function () { - return Tooltip.DEFAULTS - } - - Tooltip.prototype.getOptions = function (options) { - options = $.extend({}, this.getDefaults(), this.$element.data(), options) - - if (options.delay && typeof options.delay == 'number') { - options.delay = { - show: options.delay, - hide: options.delay - } - } - - return options - } - - Tooltip.prototype.getDelegateOptions = function () { - var options = {} - var defaults = this.getDefaults() - - this._options && $.each(this._options, function (key, value) { - if (defaults[key] != value) options[key] = value - }) - - return options - } - - Tooltip.prototype.enter = function (obj) { - var self = obj instanceof this.constructor ? - obj : $(obj.currentTarget).data('bs.' + this.type) - - if (!self) { - self = new this.constructor(obj.currentTarget, this.getDelegateOptions()) - $(obj.currentTarget).data('bs.' + this.type, self) - } - - if (obj instanceof $.Event) { - self.inState[obj.type == 'focusin' ? 'focus' : 'hover'] = true - } - - if (self.tip().hasClass('in') || self.hoverState == 'in') { - self.hoverState = 'in' - return - } - - clearTimeout(self.timeout) - - self.hoverState = 'in' - - if (!self.options.delay || !self.options.delay.show) return self.show() - - self.timeout = setTimeout(function () { - if (self.hoverState == 'in') self.show() - }, self.options.delay.show) - } - - Tooltip.prototype.isInStateTrue = function () { - for (var key in this.inState) { - if (this.inState[key]) return true - } - - return false - } - - Tooltip.prototype.leave = function (obj) { - var self = obj instanceof this.constructor ? - obj : $(obj.currentTarget).data('bs.' + this.type) - - if (!self) { - self = new this.constructor(obj.currentTarget, this.getDelegateOptions()) - $(obj.currentTarget).data('bs.' + this.type, self) - } - - if (obj instanceof $.Event) { - self.inState[obj.type == 'focusout' ? 'focus' : 'hover'] = false - } - - if (self.isInStateTrue()) return - - clearTimeout(self.timeout) - - self.hoverState = 'out' - - if (!self.options.delay || !self.options.delay.hide) return self.hide() - - self.timeout = setTimeout(function () { - if (self.hoverState == 'out') self.hide() - }, self.options.delay.hide) - } - - Tooltip.prototype.show = function () { - var e = $.Event('show.bs.' + this.type) - - if (this.hasContent() && this.enabled) { - this.$element.trigger(e) - - var inDom = $.contains(this.$element[0].ownerDocument.documentElement, this.$element[0]) - if (e.isDefaultPrevented() || !inDom) return - var that = this - - var $tip = this.tip() - - var tipId = this.getUID(this.type) - - this.setContent() - $tip.attr('id', tipId) - this.$element.attr('aria-describedby', tipId) - - if (this.options.animation) $tip.addClass('fade') - - var placement = typeof this.options.placement == 'function' ? - this.options.placement.call(this, $tip[0], this.$element[0]) : - this.options.placement - - var autoToken = /\s?auto?\s?/i - var autoPlace = autoToken.test(placement) - if (autoPlace) placement = placement.replace(autoToken, '') || 'top' - - $tip - .detach() - .css({ top: 0, left: 0, display: 'block' }) - .addClass(placement) - .data('bs.' + this.type, this) - - this.options.container ? $tip.appendTo(this.options.container) : $tip.insertAfter(this.$element) - this.$element.trigger('inserted.bs.' + this.type) - - var pos = this.getPosition() - var actualWidth = $tip[0].offsetWidth - var actualHeight = $tip[0].offsetHeight - - if (autoPlace) { - var orgPlacement = placement - var viewportDim = this.getPosition(this.$viewport) - - placement = placement == 'bottom' && pos.bottom + actualHeight > viewportDim.bottom ? 'top' : - placement == 'top' && pos.top - actualHeight < viewportDim.top ? 'bottom' : - placement == 'right' && pos.right + actualWidth > viewportDim.width ? 'left' : - placement == 'left' && pos.left - actualWidth < viewportDim.left ? 'right' : - placement - - $tip - .removeClass(orgPlacement) - .addClass(placement) - } - - var calculatedOffset = this.getCalculatedOffset(placement, pos, actualWidth, actualHeight) - - this.applyPlacement(calculatedOffset, placement) - - var complete = function () { - var prevHoverState = that.hoverState - that.$element.trigger('shown.bs.' + that.type) - that.hoverState = null - - if (prevHoverState == 'out') that.leave(that) - } - - $.support.transition && this.$tip.hasClass('fade') ? - $tip - .one('bsTransitionEnd', complete) - .emulateTransitionEnd(Tooltip.TRANSITION_DURATION) : - complete() - } - } - - Tooltip.prototype.applyPlacement = function (offset, placement) { - var $tip = this.tip() - var width = $tip[0].offsetWidth - var height = $tip[0].offsetHeight - - // manually read margins because getBoundingClientRect includes difference - var marginTop = parseInt($tip.css('margin-top'), 10) - var marginLeft = parseInt($tip.css('margin-left'), 10) - - // we must check for NaN for ie 8/9 - if (isNaN(marginTop)) marginTop = 0 - if (isNaN(marginLeft)) marginLeft = 0 - - offset.top += marginTop - offset.left += marginLeft - - // $.fn.offset doesn't round pixel values - // so we use setOffset directly with our own function B-0 - $.offset.setOffset($tip[0], $.extend({ - using: function (props) { - $tip.css({ - top: Math.round(props.top), - left: Math.round(props.left) - }) - } - }, offset), 0) - - $tip.addClass('in') - - // check to see if placing tip in new offset caused the tip to resize itself - var actualWidth = $tip[0].offsetWidth - var actualHeight = $tip[0].offsetHeight - - if (placement == 'top' && actualHeight != height) { - offset.top = offset.top + height - actualHeight - } - - var delta = this.getViewportAdjustedDelta(placement, offset, actualWidth, actualHeight) - - if (delta.left) offset.left += delta.left - else offset.top += delta.top - - var isVertical = /top|bottom/.test(placement) - var arrowDelta = isVertical ? delta.left * 2 - width + actualWidth : delta.top * 2 - height + actualHeight - var arrowOffsetPosition = isVertical ? 'offsetWidth' : 'offsetHeight' - - $tip.offset(offset) - this.replaceArrow(arrowDelta, $tip[0][arrowOffsetPosition], isVertical) - } - - Tooltip.prototype.replaceArrow = function (delta, dimension, isVertical) { - this.arrow() - .css(isVertical ? 'left' : 'top', 50 * (1 - delta / dimension) + '%') - .css(isVertical ? 'top' : 'left', '') - } - - Tooltip.prototype.setContent = function () { - var $tip = this.tip() - var title = this.getTitle() - - $tip.find('.tooltip-inner')[this.options.html ? 'html' : 'text'](title) - $tip.removeClass('fade in top bottom left right') - } - - Tooltip.prototype.hide = function (callback) { - var that = this - var $tip = $(this.$tip) - var e = $.Event('hide.bs.' + this.type) - - function complete() { - if (that.hoverState != 'in') $tip.detach() - if (that.$element) { // TODO: Check whether guarding this code with this `if` is really necessary. - that.$element - .removeAttr('aria-describedby') - .trigger('hidden.bs.' + that.type) - } - callback && callback() - } - - this.$element.trigger(e) - - if (e.isDefaultPrevented()) return - - $tip.removeClass('in') - - $.support.transition && $tip.hasClass('fade') ? - $tip - .one('bsTransitionEnd', complete) - .emulateTransitionEnd(Tooltip.TRANSITION_DURATION) : - complete() - - this.hoverState = null - - return this - } - - Tooltip.prototype.fixTitle = function () { - var $e = this.$element - if ($e.attr('title') || typeof $e.attr('data-original-title') != 'string') { - $e.attr('data-original-title', $e.attr('title') || '').attr('title', '') - } - } - - Tooltip.prototype.hasContent = function () { - return this.getTitle() - } - - Tooltip.prototype.getPosition = function ($element) { - $element = $element || this.$element - - var el = $element[0] - var isBody = el.tagName == 'BODY' - - var elRect = el.getBoundingClientRect() - if (elRect.width == null) { - // width and height are missing in IE8, so compute them manually; see https://github.com/twbs/bootstrap/issues/14093 - elRect = $.extend({}, elRect, { width: elRect.right - elRect.left, height: elRect.bottom - elRect.top }) - } - var isSvg = window.SVGElement && el instanceof window.SVGElement - // Avoid using $.offset() on SVGs since it gives incorrect results in jQuery 3. - // See https://github.com/twbs/bootstrap/issues/20280 - var elOffset = isBody ? { top: 0, left: 0 } : (isSvg ? null : $element.offset()) - var scroll = { scroll: isBody ? document.documentElement.scrollTop || document.body.scrollTop : $element.scrollTop() } - var outerDims = isBody ? { width: $(window).width(), height: $(window).height() } : null - - return $.extend({}, elRect, scroll, outerDims, elOffset) - } - - Tooltip.prototype.getCalculatedOffset = function (placement, pos, actualWidth, actualHeight) { - return placement == 'bottom' ? { top: pos.top + pos.height, left: pos.left + pos.width / 2 - actualWidth / 2 } : - placement == 'top' ? { top: pos.top - actualHeight, left: pos.left + pos.width / 2 - actualWidth / 2 } : - placement == 'left' ? { top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left - actualWidth } : - /* placement == 'right' */ { top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left + pos.width } - - } - - Tooltip.prototype.getViewportAdjustedDelta = function (placement, pos, actualWidth, actualHeight) { - var delta = { top: 0, left: 0 } - if (!this.$viewport) return delta - - var viewportPadding = this.options.viewport && this.options.viewport.padding || 0 - var viewportDimensions = this.getPosition(this.$viewport) - - if (/right|left/.test(placement)) { - var topEdgeOffset = pos.top - viewportPadding - viewportDimensions.scroll - var bottomEdgeOffset = pos.top + viewportPadding - viewportDimensions.scroll + actualHeight - if (topEdgeOffset < viewportDimensions.top) { // top overflow - delta.top = viewportDimensions.top - topEdgeOffset - } else if (bottomEdgeOffset > viewportDimensions.top + viewportDimensions.height) { // bottom overflow - delta.top = viewportDimensions.top + viewportDimensions.height - bottomEdgeOffset - } - } else { - var leftEdgeOffset = pos.left - viewportPadding - var rightEdgeOffset = pos.left + viewportPadding + actualWidth - if (leftEdgeOffset < viewportDimensions.left) { // left overflow - delta.left = viewportDimensions.left - leftEdgeOffset - } else if (rightEdgeOffset > viewportDimensions.right) { // right overflow - delta.left = viewportDimensions.left + viewportDimensions.width - rightEdgeOffset - } - } - - return delta - } - - Tooltip.prototype.getTitle = function () { - var title - var $e = this.$element - var o = this.options - - title = $e.attr('data-original-title') - || (typeof o.title == 'function' ? o.title.call($e[0]) : o.title) - - return title - } - - Tooltip.prototype.getUID = function (prefix) { - do prefix += ~~(Math.random() * 1000000) - while (document.getElementById(prefix)) - return prefix - } - - Tooltip.prototype.tip = function () { - if (!this.$tip) { - this.$tip = $(this.options.template) - if (this.$tip.length != 1) { - throw new Error(this.type + ' `template` option must consist of exactly 1 top-level element!') - } - } - return this.$tip - } - - Tooltip.prototype.arrow = function () { - return (this.$arrow = this.$arrow || this.tip().find('.tooltip-arrow')) - } - - Tooltip.prototype.enable = function () { - this.enabled = true - } - - Tooltip.prototype.disable = function () { - this.enabled = false - } - - Tooltip.prototype.toggleEnabled = function () { - this.enabled = !this.enabled - } - - Tooltip.prototype.toggle = function (e) { - var self = this - if (e) { - self = $(e.currentTarget).data('bs.' + this.type) - if (!self) { - self = new this.constructor(e.currentTarget, this.getDelegateOptions()) - $(e.currentTarget).data('bs.' + this.type, self) - } - } - - if (e) { - self.inState.click = !self.inState.click - if (self.isInStateTrue()) self.enter(self) - else self.leave(self) - } else { - self.tip().hasClass('in') ? self.leave(self) : self.enter(self) - } - } - - Tooltip.prototype.destroy = function () { - var that = this - clearTimeout(this.timeout) - this.hide(function () { - that.$element.off('.' + that.type).removeData('bs.' + that.type) - if (that.$tip) { - that.$tip.detach() - } - that.$tip = null - that.$arrow = null - that.$viewport = null - that.$element = null - }) - } - - - // TOOLTIP PLUGIN DEFINITION - // ========================= - - function Plugin(option) { - return this.each(function () { - var $this = $(this) - var data = $this.data('bs.tooltip') - var options = typeof option == 'object' && option - - if (!data && /destroy|hide/.test(option)) return - if (!data) $this.data('bs.tooltip', (data = new Tooltip(this, options))) - if (typeof option == 'string') data[option]() - }) - } - - var old = $.fn.tooltip - - $.fn.tooltip = Plugin - $.fn.tooltip.Constructor = Tooltip - - - // TOOLTIP NO CONFLICT - // =================== - - $.fn.tooltip.noConflict = function () { - $.fn.tooltip = old - return this - } - -}(jQuery); - -/* ======================================================================== - * Bootstrap: popover.js v3.3.7 - * http://getbootstrap.com/javascript/#popovers - * ======================================================================== - * Copyright 2011-2016 Twitter, Inc. - * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) - * ======================================================================== */ - - -+function ($) { - 'use strict'; - - // POPOVER PUBLIC CLASS DEFINITION - // =============================== - - var Popover = function (element, options) { - this.init('popover', element, options) - } - - if (!$.fn.tooltip) throw new Error('Popover requires tooltip.js') - - Popover.VERSION = '3.3.7' - - Popover.DEFAULTS = $.extend({}, $.fn.tooltip.Constructor.DEFAULTS, { - placement: 'right', - trigger: 'click', - content: '', - template: '' - }) - - - // NOTE: POPOVER EXTENDS tooltip.js - // ================================ - - Popover.prototype = $.extend({}, $.fn.tooltip.Constructor.prototype) - - Popover.prototype.constructor = Popover - - Popover.prototype.getDefaults = function () { - return Popover.DEFAULTS - } - - Popover.prototype.setContent = function () { - var $tip = this.tip() - var title = this.getTitle() - var content = this.getContent() - - $tip.find('.popover-title')[this.options.html ? 'html' : 'text'](title) - $tip.find('.popover-content').children().detach().end()[ // we use append for html objects to maintain js events - this.options.html ? (typeof content == 'string' ? 'html' : 'append') : 'text' - ](content) - - $tip.removeClass('fade top bottom left right in') - - // IE8 doesn't accept hiding via the `:empty` pseudo selector, we have to do - // this manually by checking the contents. - if (!$tip.find('.popover-title').html()) $tip.find('.popover-title').hide() - } - - Popover.prototype.hasContent = function () { - return this.getTitle() || this.getContent() - } - - Popover.prototype.getContent = function () { - var $e = this.$element - var o = this.options - - return $e.attr('data-content') - || (typeof o.content == 'function' ? - o.content.call($e[0]) : - o.content) - } - - Popover.prototype.arrow = function () { - return (this.$arrow = this.$arrow || this.tip().find('.arrow')) - } - - - // POPOVER PLUGIN DEFINITION - // ========================= - - function Plugin(option) { - return this.each(function () { - var $this = $(this) - var data = $this.data('bs.popover') - var options = typeof option == 'object' && option - - if (!data && /destroy|hide/.test(option)) return - if (!data) $this.data('bs.popover', (data = new Popover(this, options))) - if (typeof option == 'string') data[option]() - }) - } - - var old = $.fn.popover - - $.fn.popover = Plugin - $.fn.popover.Constructor = Popover - - - // POPOVER NO CONFLICT - // =================== - - $.fn.popover.noConflict = function () { - $.fn.popover = old - return this - } - -}(jQuery); - -/* ======================================================================== - * Bootstrap: scrollspy.js v3.3.7 - * http://getbootstrap.com/javascript/#scrollspy - * ======================================================================== - * Copyright 2011-2016 Twitter, Inc. - * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) - * ======================================================================== */ - - -+function ($) { - 'use strict'; - - // SCROLLSPY CLASS DEFINITION - // ========================== - - function ScrollSpy(element, options) { - this.$body = $(document.body) - this.$scrollElement = $(element).is(document.body) ? $(window) : $(element) - this.options = $.extend({}, ScrollSpy.DEFAULTS, options) - this.selector = (this.options.target || '') + ' .nav li > a' - this.offsets = [] - this.targets = [] - this.activeTarget = null - this.scrollHeight = 0 - - this.$scrollElement.on('scroll.bs.scrollspy', $.proxy(this.process, this)) - this.refresh() - this.process() - } - - ScrollSpy.VERSION = '3.3.7' - - ScrollSpy.DEFAULTS = { - offset: 10 - } - - ScrollSpy.prototype.getScrollHeight = function () { - return this.$scrollElement[0].scrollHeight || Math.max(this.$body[0].scrollHeight, document.documentElement.scrollHeight) - } - - ScrollSpy.prototype.refresh = function () { - var that = this - var offsetMethod = 'offset' - var offsetBase = 0 - - this.offsets = [] - this.targets = [] - this.scrollHeight = this.getScrollHeight() - - if (!$.isWindow(this.$scrollElement[0])) { - offsetMethod = 'position' - offsetBase = this.$scrollElement.scrollTop() - } - - this.$body - .find(this.selector) - .map(function () { - var $el = $(this) - var href = $el.data('target') || $el.attr('href') - var $href = /^#./.test(href) && $(href) - - return ($href - && $href.length - && $href.is(':visible') - && [[$href[offsetMethod]().top + offsetBase, href]]) || null - }) - .sort(function (a, b) { return a[0] - b[0] }) - .each(function () { - that.offsets.push(this[0]) - that.targets.push(this[1]) - }) - } - - ScrollSpy.prototype.process = function () { - var scrollTop = this.$scrollElement.scrollTop() + this.options.offset - var scrollHeight = this.getScrollHeight() - var maxScroll = this.options.offset + scrollHeight - this.$scrollElement.height() - var offsets = this.offsets - var targets = this.targets - var activeTarget = this.activeTarget - var i - - if (this.scrollHeight != scrollHeight) { - this.refresh() - } - - if (scrollTop >= maxScroll) { - return activeTarget != (i = targets[targets.length - 1]) && this.activate(i) - } - - if (activeTarget && scrollTop < offsets[0]) { - this.activeTarget = null - return this.clear() - } - - for (i = offsets.length; i--;) { - activeTarget != targets[i] - && scrollTop >= offsets[i] - && (offsets[i + 1] === undefined || scrollTop < offsets[i + 1]) - && this.activate(targets[i]) - } - } - - ScrollSpy.prototype.activate = function (target) { - this.activeTarget = target - - this.clear() - - var selector = this.selector + - '[data-target="' + target + '"],' + - this.selector + '[href="' + target + '"]' - - var active = $(selector) - .parents('li') - .addClass('active') - - if (active.parent('.dropdown-menu').length) { - active = active - .closest('li.dropdown') - .addClass('active') - } - - active.trigger('activate.bs.scrollspy') - } - - ScrollSpy.prototype.clear = function () { - $(this.selector) - .parentsUntil(this.options.target, '.active') - .removeClass('active') - } - - - // SCROLLSPY PLUGIN DEFINITION - // =========================== - - function Plugin(option) { - return this.each(function () { - var $this = $(this) - var data = $this.data('bs.scrollspy') - var options = typeof option == 'object' && option - - if (!data) $this.data('bs.scrollspy', (data = new ScrollSpy(this, options))) - if (typeof option == 'string') data[option]() - }) - } - - var old = $.fn.scrollspy - - $.fn.scrollspy = Plugin - $.fn.scrollspy.Constructor = ScrollSpy - - - // SCROLLSPY NO CONFLICT - // ===================== - - $.fn.scrollspy.noConflict = function () { - $.fn.scrollspy = old - return this - } - - - // SCROLLSPY DATA-API - // ================== - - $(window).on('load.bs.scrollspy.data-api', function () { - $('[data-spy="scroll"]').each(function () { - var $spy = $(this) - Plugin.call($spy, $spy.data()) - }) - }) - -}(jQuery); - -/* ======================================================================== - * Bootstrap: tab.js v3.3.7 - * http://getbootstrap.com/javascript/#tabs - * ======================================================================== - * Copyright 2011-2016 Twitter, Inc. - * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) - * ======================================================================== */ - - -+function ($) { - 'use strict'; - - // TAB CLASS DEFINITION - // ==================== - - var Tab = function (element) { - // jscs:disable requireDollarBeforejQueryAssignment - this.element = $(element) - // jscs:enable requireDollarBeforejQueryAssignment - } - - Tab.VERSION = '3.3.7' - - Tab.TRANSITION_DURATION = 150 - - Tab.prototype.show = function () { - var $this = this.element - var $ul = $this.closest('ul:not(.dropdown-menu)') - var selector = $this.data('target') - - if (!selector) { - selector = $this.attr('href') - selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') // strip for ie7 - } - - if ($this.parent('li').hasClass('active')) return - - var $previous = $ul.find('.active:last a') - var hideEvent = $.Event('hide.bs.tab', { - relatedTarget: $this[0] - }) - var showEvent = $.Event('show.bs.tab', { - relatedTarget: $previous[0] - }) - - $previous.trigger(hideEvent) - $this.trigger(showEvent) - - if (showEvent.isDefaultPrevented() || hideEvent.isDefaultPrevented()) return - - var $target = $(selector) - - this.activate($this.closest('li'), $ul) - this.activate($target, $target.parent(), function () { - $previous.trigger({ - type: 'hidden.bs.tab', - relatedTarget: $this[0] - }) - $this.trigger({ - type: 'shown.bs.tab', - relatedTarget: $previous[0] - }) - }) - } - - Tab.prototype.activate = function (element, container, callback) { - var $active = container.find('> .active') - var transition = callback - && $.support.transition - && ($active.length && $active.hasClass('fade') || !!container.find('> .fade').length) - - function next() { - $active - .removeClass('active') - .find('> .dropdown-menu > .active') - .removeClass('active') - .end() - .find('[data-toggle="tab"]') - .attr('aria-expanded', false) - - element - .addClass('active') - .find('[data-toggle="tab"]') - .attr('aria-expanded', true) - - if (transition) { - element[0].offsetWidth // reflow for transition - element.addClass('in') - } else { - element.removeClass('fade') - } - - if (element.parent('.dropdown-menu').length) { - element - .closest('li.dropdown') - .addClass('active') - .end() - .find('[data-toggle="tab"]') - .attr('aria-expanded', true) - } - - callback && callback() - } - - $active.length && transition ? - $active - .one('bsTransitionEnd', next) - .emulateTransitionEnd(Tab.TRANSITION_DURATION) : - next() - - $active.removeClass('in') - } - - - // TAB PLUGIN DEFINITION - // ===================== - - function Plugin(option) { - return this.each(function () { - var $this = $(this) - var data = $this.data('bs.tab') - - if (!data) $this.data('bs.tab', (data = new Tab(this))) - if (typeof option == 'string') data[option]() - }) - } - - var old = $.fn.tab - - $.fn.tab = Plugin - $.fn.tab.Constructor = Tab - - - // TAB NO CONFLICT - // =============== - - $.fn.tab.noConflict = function () { - $.fn.tab = old - return this - } - - - // TAB DATA-API - // ============ - - var clickHandler = function (e) { - e.preventDefault() - Plugin.call($(this), 'show') - } - - $(document) - .on('click.bs.tab.data-api', '[data-toggle="tab"]', clickHandler) - .on('click.bs.tab.data-api', '[data-toggle="pill"]', clickHandler) - -}(jQuery); - -/* ======================================================================== - * Bootstrap: affix.js v3.3.7 - * http://getbootstrap.com/javascript/#affix - * ======================================================================== - * Copyright 2011-2016 Twitter, Inc. - * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) - * ======================================================================== */ - - -+function ($) { - 'use strict'; - - // AFFIX CLASS DEFINITION - // ====================== - - var Affix = function (element, options) { - this.options = $.extend({}, Affix.DEFAULTS, options) - - this.$target = $(this.options.target) - .on('scroll.bs.affix.data-api', $.proxy(this.checkPosition, this)) - .on('click.bs.affix.data-api', $.proxy(this.checkPositionWithEventLoop, this)) - - this.$element = $(element) - this.affixed = null - this.unpin = null - this.pinnedOffset = null - - this.checkPosition() - } - - Affix.VERSION = '3.3.7' - - Affix.RESET = 'affix affix-top affix-bottom' - - Affix.DEFAULTS = { - offset: 0, - target: window - } - - Affix.prototype.getState = function (scrollHeight, height, offsetTop, offsetBottom) { - var scrollTop = this.$target.scrollTop() - var position = this.$element.offset() - var targetHeight = this.$target.height() - - if (offsetTop != null && this.affixed == 'top') return scrollTop < offsetTop ? 'top' : false - - if (this.affixed == 'bottom') { - if (offsetTop != null) return (scrollTop + this.unpin <= position.top) ? false : 'bottom' - return (scrollTop + targetHeight <= scrollHeight - offsetBottom) ? false : 'bottom' - } - - var initializing = this.affixed == null - var colliderTop = initializing ? scrollTop : position.top - var colliderHeight = initializing ? targetHeight : height - - if (offsetTop != null && scrollTop <= offsetTop) return 'top' - if (offsetBottom != null && (colliderTop + colliderHeight >= scrollHeight - offsetBottom)) return 'bottom' - - return false - } - - Affix.prototype.getPinnedOffset = function () { - if (this.pinnedOffset) return this.pinnedOffset - this.$element.removeClass(Affix.RESET).addClass('affix') - var scrollTop = this.$target.scrollTop() - var position = this.$element.offset() - return (this.pinnedOffset = position.top - scrollTop) - } - - Affix.prototype.checkPositionWithEventLoop = function () { - setTimeout($.proxy(this.checkPosition, this), 1) - } - - Affix.prototype.checkPosition = function () { - if (!this.$element.is(':visible')) return - - var height = this.$element.height() - var offset = this.options.offset - var offsetTop = offset.top - var offsetBottom = offset.bottom - var scrollHeight = Math.max($(document).height(), $(document.body).height()) - - if (typeof offset != 'object') offsetBottom = offsetTop = offset - if (typeof offsetTop == 'function') offsetTop = offset.top(this.$element) - if (typeof offsetBottom == 'function') offsetBottom = offset.bottom(this.$element) - - var affix = this.getState(scrollHeight, height, offsetTop, offsetBottom) - - if (this.affixed != affix) { - if (this.unpin != null) this.$element.css('top', '') - - var affixType = 'affix' + (affix ? '-' + affix : '') - var e = $.Event(affixType + '.bs.affix') - - this.$element.trigger(e) - - if (e.isDefaultPrevented()) return - - this.affixed = affix - this.unpin = affix == 'bottom' ? this.getPinnedOffset() : null - - this.$element - .removeClass(Affix.RESET) - .addClass(affixType) - .trigger(affixType.replace('affix', 'affixed') + '.bs.affix') - } - - if (affix == 'bottom') { - this.$element.offset({ - top: scrollHeight - height - offsetBottom - }) - } - } - - - // AFFIX PLUGIN DEFINITION - // ======================= - - function Plugin(option) { - return this.each(function () { - var $this = $(this) - var data = $this.data('bs.affix') - var options = typeof option == 'object' && option - - if (!data) $this.data('bs.affix', (data = new Affix(this, options))) - if (typeof option == 'string') data[option]() - }) - } - - var old = $.fn.affix - - $.fn.affix = Plugin - $.fn.affix.Constructor = Affix - - - // AFFIX NO CONFLICT - // ================= - - $.fn.affix.noConflict = function () { - $.fn.affix = old - return this - } - - - // AFFIX DATA-API - // ============== - - $(window).on('load', function () { - $('[data-spy="affix"]').each(function () { - var $spy = $(this) - var data = $spy.data() - - data.offset = data.offset || {} - - if (data.offsetBottom != null) data.offset.bottom = data.offsetBottom - if (data.offsetTop != null) data.offset.top = data.offsetTop - - Plugin.call($spy, data) - }) - }) - -}(jQuery); diff --git a/blockly/webif/static/js/bootstrap.min.js b/blockly/webif/static/js/bootstrap.min.js deleted file mode 100755 index 9bcd2fcca..000000000 --- a/blockly/webif/static/js/bootstrap.min.js +++ /dev/null @@ -1,7 +0,0 @@ -/*! - * Bootstrap v3.3.7 (http://getbootstrap.com) - * Copyright 2011-2016 Twitter, Inc. - * Licensed under the MIT license - */ -if("undefined"==typeof jQuery)throw new Error("Bootstrap's JavaScript requires jQuery");+function(a){"use strict";var b=a.fn.jquery.split(" ")[0].split(".");if(b[0]<2&&b[1]<9||1==b[0]&&9==b[1]&&b[2]<1||b[0]>3)throw new Error("Bootstrap's JavaScript requires jQuery version 1.9.1 or higher, but lower than version 4")}(jQuery),+function(a){"use strict";function b(){var a=document.createElement("bootstrap"),b={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var c in b)if(void 0!==a.style[c])return{end:b[c]};return!1}a.fn.emulateTransitionEnd=function(b){var c=!1,d=this;a(this).one("bsTransitionEnd",function(){c=!0});var e=function(){c||a(d).trigger(a.support.transition.end)};return setTimeout(e,b),this},a(function(){a.support.transition=b(),a.support.transition&&(a.event.special.bsTransitionEnd={bindType:a.support.transition.end,delegateType:a.support.transition.end,handle:function(b){if(a(b.target).is(this))return b.handleObj.handler.apply(this,arguments)}})})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var c=a(this),e=c.data("bs.alert");e||c.data("bs.alert",e=new d(this)),"string"==typeof b&&e[b].call(c)})}var c='[data-dismiss="alert"]',d=function(b){a(b).on("click",c,this.close)};d.VERSION="3.3.7",d.TRANSITION_DURATION=150,d.prototype.close=function(b){function c(){g.detach().trigger("closed.bs.alert").remove()}var e=a(this),f=e.attr("data-target");f||(f=e.attr("href"),f=f&&f.replace(/.*(?=#[^\s]*$)/,""));var g=a("#"===f?[]:f);b&&b.preventDefault(),g.length||(g=e.closest(".alert")),g.trigger(b=a.Event("close.bs.alert")),b.isDefaultPrevented()||(g.removeClass("in"),a.support.transition&&g.hasClass("fade")?g.one("bsTransitionEnd",c).emulateTransitionEnd(d.TRANSITION_DURATION):c())};var e=a.fn.alert;a.fn.alert=b,a.fn.alert.Constructor=d,a.fn.alert.noConflict=function(){return a.fn.alert=e,this},a(document).on("click.bs.alert.data-api",c,d.prototype.close)}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.button"),f="object"==typeof b&&b;e||d.data("bs.button",e=new c(this,f)),"toggle"==b?e.toggle():b&&e.setState(b)})}var c=function(b,d){this.$element=a(b),this.options=a.extend({},c.DEFAULTS,d),this.isLoading=!1};c.VERSION="3.3.7",c.DEFAULTS={loadingText:"loading..."},c.prototype.setState=function(b){var c="disabled",d=this.$element,e=d.is("input")?"val":"html",f=d.data();b+="Text",null==f.resetText&&d.data("resetText",d[e]()),setTimeout(a.proxy(function(){d[e](null==f[b]?this.options[b]:f[b]),"loadingText"==b?(this.isLoading=!0,d.addClass(c).attr(c,c).prop(c,!0)):this.isLoading&&(this.isLoading=!1,d.removeClass(c).removeAttr(c).prop(c,!1))},this),0)},c.prototype.toggle=function(){var a=!0,b=this.$element.closest('[data-toggle="buttons"]');if(b.length){var c=this.$element.find("input");"radio"==c.prop("type")?(c.prop("checked")&&(a=!1),b.find(".active").removeClass("active"),this.$element.addClass("active")):"checkbox"==c.prop("type")&&(c.prop("checked")!==this.$element.hasClass("active")&&(a=!1),this.$element.toggleClass("active")),c.prop("checked",this.$element.hasClass("active")),a&&c.trigger("change")}else this.$element.attr("aria-pressed",!this.$element.hasClass("active")),this.$element.toggleClass("active")};var d=a.fn.button;a.fn.button=b,a.fn.button.Constructor=c,a.fn.button.noConflict=function(){return a.fn.button=d,this},a(document).on("click.bs.button.data-api",'[data-toggle^="button"]',function(c){var d=a(c.target).closest(".btn");b.call(d,"toggle"),a(c.target).is('input[type="radio"], input[type="checkbox"]')||(c.preventDefault(),d.is("input,button")?d.trigger("focus"):d.find("input:visible,button:visible").first().trigger("focus"))}).on("focus.bs.button.data-api blur.bs.button.data-api",'[data-toggle^="button"]',function(b){a(b.target).closest(".btn").toggleClass("focus",/^focus(in)?$/.test(b.type))})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.carousel"),f=a.extend({},c.DEFAULTS,d.data(),"object"==typeof b&&b),g="string"==typeof b?b:f.slide;e||d.data("bs.carousel",e=new c(this,f)),"number"==typeof b?e.to(b):g?e[g]():f.interval&&e.pause().cycle()})}var c=function(b,c){this.$element=a(b),this.$indicators=this.$element.find(".carousel-indicators"),this.options=c,this.paused=null,this.sliding=null,this.interval=null,this.$active=null,this.$items=null,this.options.keyboard&&this.$element.on("keydown.bs.carousel",a.proxy(this.keydown,this)),"hover"==this.options.pause&&!("ontouchstart"in document.documentElement)&&this.$element.on("mouseenter.bs.carousel",a.proxy(this.pause,this)).on("mouseleave.bs.carousel",a.proxy(this.cycle,this))};c.VERSION="3.3.7",c.TRANSITION_DURATION=600,c.DEFAULTS={interval:5e3,pause:"hover",wrap:!0,keyboard:!0},c.prototype.keydown=function(a){if(!/input|textarea/i.test(a.target.tagName)){switch(a.which){case 37:this.prev();break;case 39:this.next();break;default:return}a.preventDefault()}},c.prototype.cycle=function(b){return b||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(a.proxy(this.next,this),this.options.interval)),this},c.prototype.getItemIndex=function(a){return this.$items=a.parent().children(".item"),this.$items.index(a||this.$active)},c.prototype.getItemForDirection=function(a,b){var c=this.getItemIndex(b),d="prev"==a&&0===c||"next"==a&&c==this.$items.length-1;if(d&&!this.options.wrap)return b;var e="prev"==a?-1:1,f=(c+e)%this.$items.length;return this.$items.eq(f)},c.prototype.to=function(a){var b=this,c=this.getItemIndex(this.$active=this.$element.find(".item.active"));if(!(a>this.$items.length-1||a<0))return this.sliding?this.$element.one("slid.bs.carousel",function(){b.to(a)}):c==a?this.pause().cycle():this.slide(a>c?"next":"prev",this.$items.eq(a))},c.prototype.pause=function(b){return b||(this.paused=!0),this.$element.find(".next, .prev").length&&a.support.transition&&(this.$element.trigger(a.support.transition.end),this.cycle(!0)),this.interval=clearInterval(this.interval),this},c.prototype.next=function(){if(!this.sliding)return this.slide("next")},c.prototype.prev=function(){if(!this.sliding)return this.slide("prev")},c.prototype.slide=function(b,d){var e=this.$element.find(".item.active"),f=d||this.getItemForDirection(b,e),g=this.interval,h="next"==b?"left":"right",i=this;if(f.hasClass("active"))return this.sliding=!1;var j=f[0],k=a.Event("slide.bs.carousel",{relatedTarget:j,direction:h});if(this.$element.trigger(k),!k.isDefaultPrevented()){if(this.sliding=!0,g&&this.pause(),this.$indicators.length){this.$indicators.find(".active").removeClass("active");var l=a(this.$indicators.children()[this.getItemIndex(f)]);l&&l.addClass("active")}var m=a.Event("slid.bs.carousel",{relatedTarget:j,direction:h});return a.support.transition&&this.$element.hasClass("slide")?(f.addClass(b),f[0].offsetWidth,e.addClass(h),f.addClass(h),e.one("bsTransitionEnd",function(){f.removeClass([b,h].join(" ")).addClass("active"),e.removeClass(["active",h].join(" ")),i.sliding=!1,setTimeout(function(){i.$element.trigger(m)},0)}).emulateTransitionEnd(c.TRANSITION_DURATION)):(e.removeClass("active"),f.addClass("active"),this.sliding=!1,this.$element.trigger(m)),g&&this.cycle(),this}};var d=a.fn.carousel;a.fn.carousel=b,a.fn.carousel.Constructor=c,a.fn.carousel.noConflict=function(){return a.fn.carousel=d,this};var e=function(c){var d,e=a(this),f=a(e.attr("data-target")||(d=e.attr("href"))&&d.replace(/.*(?=#[^\s]+$)/,""));if(f.hasClass("carousel")){var g=a.extend({},f.data(),e.data()),h=e.attr("data-slide-to");h&&(g.interval=!1),b.call(f,g),h&&f.data("bs.carousel").to(h),c.preventDefault()}};a(document).on("click.bs.carousel.data-api","[data-slide]",e).on("click.bs.carousel.data-api","[data-slide-to]",e),a(window).on("load",function(){a('[data-ride="carousel"]').each(function(){var c=a(this);b.call(c,c.data())})})}(jQuery),+function(a){"use strict";function b(b){var c,d=b.attr("data-target")||(c=b.attr("href"))&&c.replace(/.*(?=#[^\s]+$)/,"");return a(d)}function c(b){return this.each(function(){var c=a(this),e=c.data("bs.collapse"),f=a.extend({},d.DEFAULTS,c.data(),"object"==typeof b&&b);!e&&f.toggle&&/show|hide/.test(b)&&(f.toggle=!1),e||c.data("bs.collapse",e=new d(this,f)),"string"==typeof b&&e[b]()})}var d=function(b,c){this.$element=a(b),this.options=a.extend({},d.DEFAULTS,c),this.$trigger=a('[data-toggle="collapse"][href="#'+b.id+'"],[data-toggle="collapse"][data-target="#'+b.id+'"]'),this.transitioning=null,this.options.parent?this.$parent=this.getParent():this.addAriaAndCollapsedClass(this.$element,this.$trigger),this.options.toggle&&this.toggle()};d.VERSION="3.3.7",d.TRANSITION_DURATION=350,d.DEFAULTS={toggle:!0},d.prototype.dimension=function(){var a=this.$element.hasClass("width");return a?"width":"height"},d.prototype.show=function(){if(!this.transitioning&&!this.$element.hasClass("in")){var b,e=this.$parent&&this.$parent.children(".panel").children(".in, .collapsing");if(!(e&&e.length&&(b=e.data("bs.collapse"),b&&b.transitioning))){var f=a.Event("show.bs.collapse");if(this.$element.trigger(f),!f.isDefaultPrevented()){e&&e.length&&(c.call(e,"hide"),b||e.data("bs.collapse",null));var g=this.dimension();this.$element.removeClass("collapse").addClass("collapsing")[g](0).attr("aria-expanded",!0),this.$trigger.removeClass("collapsed").attr("aria-expanded",!0),this.transitioning=1;var h=function(){this.$element.removeClass("collapsing").addClass("collapse in")[g](""),this.transitioning=0,this.$element.trigger("shown.bs.collapse")};if(!a.support.transition)return h.call(this);var i=a.camelCase(["scroll",g].join("-"));this.$element.one("bsTransitionEnd",a.proxy(h,this)).emulateTransitionEnd(d.TRANSITION_DURATION)[g](this.$element[0][i])}}}},d.prototype.hide=function(){if(!this.transitioning&&this.$element.hasClass("in")){var b=a.Event("hide.bs.collapse");if(this.$element.trigger(b),!b.isDefaultPrevented()){var c=this.dimension();this.$element[c](this.$element[c]())[0].offsetHeight,this.$element.addClass("collapsing").removeClass("collapse in").attr("aria-expanded",!1),this.$trigger.addClass("collapsed").attr("aria-expanded",!1),this.transitioning=1;var e=function(){this.transitioning=0,this.$element.removeClass("collapsing").addClass("collapse").trigger("hidden.bs.collapse")};return a.support.transition?void this.$element[c](0).one("bsTransitionEnd",a.proxy(e,this)).emulateTransitionEnd(d.TRANSITION_DURATION):e.call(this)}}},d.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()},d.prototype.getParent=function(){return a(this.options.parent).find('[data-toggle="collapse"][data-parent="'+this.options.parent+'"]').each(a.proxy(function(c,d){var e=a(d);this.addAriaAndCollapsedClass(b(e),e)},this)).end()},d.prototype.addAriaAndCollapsedClass=function(a,b){var c=a.hasClass("in");a.attr("aria-expanded",c),b.toggleClass("collapsed",!c).attr("aria-expanded",c)};var e=a.fn.collapse;a.fn.collapse=c,a.fn.collapse.Constructor=d,a.fn.collapse.noConflict=function(){return a.fn.collapse=e,this},a(document).on("click.bs.collapse.data-api",'[data-toggle="collapse"]',function(d){var e=a(this);e.attr("data-target")||d.preventDefault();var f=b(e),g=f.data("bs.collapse"),h=g?"toggle":e.data();c.call(f,h)})}(jQuery),+function(a){"use strict";function b(b){var c=b.attr("data-target");c||(c=b.attr("href"),c=c&&/#[A-Za-z]/.test(c)&&c.replace(/.*(?=#[^\s]*$)/,""));var d=c&&a(c);return d&&d.length?d:b.parent()}function c(c){c&&3===c.which||(a(e).remove(),a(f).each(function(){var d=a(this),e=b(d),f={relatedTarget:this};e.hasClass("open")&&(c&&"click"==c.type&&/input|textarea/i.test(c.target.tagName)&&a.contains(e[0],c.target)||(e.trigger(c=a.Event("hide.bs.dropdown",f)),c.isDefaultPrevented()||(d.attr("aria-expanded","false"),e.removeClass("open").trigger(a.Event("hidden.bs.dropdown",f)))))}))}function d(b){return this.each(function(){var c=a(this),d=c.data("bs.dropdown");d||c.data("bs.dropdown",d=new g(this)),"string"==typeof b&&d[b].call(c)})}var e=".dropdown-backdrop",f='[data-toggle="dropdown"]',g=function(b){a(b).on("click.bs.dropdown",this.toggle)};g.VERSION="3.3.7",g.prototype.toggle=function(d){var e=a(this);if(!e.is(".disabled, :disabled")){var f=b(e),g=f.hasClass("open");if(c(),!g){"ontouchstart"in document.documentElement&&!f.closest(".navbar-nav").length&&a(document.createElement("div")).addClass("dropdown-backdrop").insertAfter(a(this)).on("click",c);var h={relatedTarget:this};if(f.trigger(d=a.Event("show.bs.dropdown",h)),d.isDefaultPrevented())return;e.trigger("focus").attr("aria-expanded","true"),f.toggleClass("open").trigger(a.Event("shown.bs.dropdown",h))}return!1}},g.prototype.keydown=function(c){if(/(38|40|27|32)/.test(c.which)&&!/input|textarea/i.test(c.target.tagName)){var d=a(this);if(c.preventDefault(),c.stopPropagation(),!d.is(".disabled, :disabled")){var e=b(d),g=e.hasClass("open");if(!g&&27!=c.which||g&&27==c.which)return 27==c.which&&e.find(f).trigger("focus"),d.trigger("click");var h=" li:not(.disabled):visible a",i=e.find(".dropdown-menu"+h);if(i.length){var j=i.index(c.target);38==c.which&&j>0&&j--,40==c.which&&jdocument.documentElement.clientHeight;this.$element.css({paddingLeft:!this.bodyIsOverflowing&&a?this.scrollbarWidth:"",paddingRight:this.bodyIsOverflowing&&!a?this.scrollbarWidth:""})},c.prototype.resetAdjustments=function(){this.$element.css({paddingLeft:"",paddingRight:""})},c.prototype.checkScrollbar=function(){var a=window.innerWidth;if(!a){var b=document.documentElement.getBoundingClientRect();a=b.right-Math.abs(b.left)}this.bodyIsOverflowing=document.body.clientWidth
      ',trigger:"hover focus",title:"",delay:0,html:!1,container:!1,viewport:{selector:"body",padding:0}},c.prototype.init=function(b,c,d){if(this.enabled=!0,this.type=b,this.$element=a(c),this.options=this.getOptions(d),this.$viewport=this.options.viewport&&a(a.isFunction(this.options.viewport)?this.options.viewport.call(this,this.$element):this.options.viewport.selector||this.options.viewport),this.inState={click:!1,hover:!1,focus:!1},this.$element[0]instanceof document.constructor&&!this.options.selector)throw new Error("`selector` option must be specified when initializing "+this.type+" on the window.document object!");for(var e=this.options.trigger.split(" "),f=e.length;f--;){var g=e[f];if("click"==g)this.$element.on("click."+this.type,this.options.selector,a.proxy(this.toggle,this));else if("manual"!=g){var h="hover"==g?"mouseenter":"focusin",i="hover"==g?"mouseleave":"focusout";this.$element.on(h+"."+this.type,this.options.selector,a.proxy(this.enter,this)),this.$element.on(i+"."+this.type,this.options.selector,a.proxy(this.leave,this))}}this.options.selector?this._options=a.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},c.prototype.getDefaults=function(){return c.DEFAULTS},c.prototype.getOptions=function(b){return b=a.extend({},this.getDefaults(),this.$element.data(),b),b.delay&&"number"==typeof b.delay&&(b.delay={show:b.delay,hide:b.delay}),b},c.prototype.getDelegateOptions=function(){var b={},c=this.getDefaults();return this._options&&a.each(this._options,function(a,d){c[a]!=d&&(b[a]=d)}),b},c.prototype.enter=function(b){var c=b instanceof this.constructor?b:a(b.currentTarget).data("bs."+this.type);return c||(c=new this.constructor(b.currentTarget,this.getDelegateOptions()),a(b.currentTarget).data("bs."+this.type,c)),b instanceof a.Event&&(c.inState["focusin"==b.type?"focus":"hover"]=!0),c.tip().hasClass("in")||"in"==c.hoverState?void(c.hoverState="in"):(clearTimeout(c.timeout),c.hoverState="in",c.options.delay&&c.options.delay.show?void(c.timeout=setTimeout(function(){"in"==c.hoverState&&c.show()},c.options.delay.show)):c.show())},c.prototype.isInStateTrue=function(){for(var a in this.inState)if(this.inState[a])return!0;return!1},c.prototype.leave=function(b){var c=b instanceof this.constructor?b:a(b.currentTarget).data("bs."+this.type);if(c||(c=new this.constructor(b.currentTarget,this.getDelegateOptions()),a(b.currentTarget).data("bs."+this.type,c)),b instanceof a.Event&&(c.inState["focusout"==b.type?"focus":"hover"]=!1),!c.isInStateTrue())return clearTimeout(c.timeout),c.hoverState="out",c.options.delay&&c.options.delay.hide?void(c.timeout=setTimeout(function(){"out"==c.hoverState&&c.hide()},c.options.delay.hide)):c.hide()},c.prototype.show=function(){var b=a.Event("show.bs."+this.type);if(this.hasContent()&&this.enabled){this.$element.trigger(b);var d=a.contains(this.$element[0].ownerDocument.documentElement,this.$element[0]);if(b.isDefaultPrevented()||!d)return;var e=this,f=this.tip(),g=this.getUID(this.type);this.setContent(),f.attr("id",g),this.$element.attr("aria-describedby",g),this.options.animation&&f.addClass("fade");var h="function"==typeof this.options.placement?this.options.placement.call(this,f[0],this.$element[0]):this.options.placement,i=/\s?auto?\s?/i,j=i.test(h);j&&(h=h.replace(i,"")||"top"),f.detach().css({top:0,left:0,display:"block"}).addClass(h).data("bs."+this.type,this),this.options.container?f.appendTo(this.options.container):f.insertAfter(this.$element),this.$element.trigger("inserted.bs."+this.type);var k=this.getPosition(),l=f[0].offsetWidth,m=f[0].offsetHeight;if(j){var n=h,o=this.getPosition(this.$viewport);h="bottom"==h&&k.bottom+m>o.bottom?"top":"top"==h&&k.top-mo.width?"left":"left"==h&&k.left-lg.top+g.height&&(e.top=g.top+g.height-i)}else{var j=b.left-f,k=b.left+f+c;jg.right&&(e.left=g.left+g.width-k)}return e},c.prototype.getTitle=function(){var a,b=this.$element,c=this.options;return a=b.attr("data-original-title")||("function"==typeof c.title?c.title.call(b[0]):c.title)},c.prototype.getUID=function(a){do a+=~~(1e6*Math.random());while(document.getElementById(a));return a},c.prototype.tip=function(){if(!this.$tip&&(this.$tip=a(this.options.template),1!=this.$tip.length))throw new Error(this.type+" `template` option must consist of exactly 1 top-level element!");return this.$tip},c.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")},c.prototype.enable=function(){this.enabled=!0},c.prototype.disable=function(){this.enabled=!1},c.prototype.toggleEnabled=function(){this.enabled=!this.enabled},c.prototype.toggle=function(b){var c=this;b&&(c=a(b.currentTarget).data("bs."+this.type),c||(c=new this.constructor(b.currentTarget,this.getDelegateOptions()),a(b.currentTarget).data("bs."+this.type,c))),b?(c.inState.click=!c.inState.click,c.isInStateTrue()?c.enter(c):c.leave(c)):c.tip().hasClass("in")?c.leave(c):c.enter(c)},c.prototype.destroy=function(){var a=this;clearTimeout(this.timeout),this.hide(function(){a.$element.off("."+a.type).removeData("bs."+a.type),a.$tip&&a.$tip.detach(),a.$tip=null,a.$arrow=null,a.$viewport=null,a.$element=null})};var d=a.fn.tooltip;a.fn.tooltip=b,a.fn.tooltip.Constructor=c,a.fn.tooltip.noConflict=function(){return a.fn.tooltip=d,this}}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.popover"),f="object"==typeof b&&b;!e&&/destroy|hide/.test(b)||(e||d.data("bs.popover",e=new c(this,f)),"string"==typeof b&&e[b]())})}var c=function(a,b){this.init("popover",a,b)};if(!a.fn.tooltip)throw new Error("Popover requires tooltip.js");c.VERSION="3.3.7",c.DEFAULTS=a.extend({},a.fn.tooltip.Constructor.DEFAULTS,{placement:"right",trigger:"click",content:"",template:''}),c.prototype=a.extend({},a.fn.tooltip.Constructor.prototype),c.prototype.constructor=c,c.prototype.getDefaults=function(){return c.DEFAULTS},c.prototype.setContent=function(){var a=this.tip(),b=this.getTitle(),c=this.getContent();a.find(".popover-title")[this.options.html?"html":"text"](b),a.find(".popover-content").children().detach().end()[this.options.html?"string"==typeof c?"html":"append":"text"](c),a.removeClass("fade top bottom left right in"),a.find(".popover-title").html()||a.find(".popover-title").hide()},c.prototype.hasContent=function(){return this.getTitle()||this.getContent()},c.prototype.getContent=function(){var a=this.$element,b=this.options;return a.attr("data-content")||("function"==typeof b.content?b.content.call(a[0]):b.content)},c.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")};var d=a.fn.popover;a.fn.popover=b,a.fn.popover.Constructor=c,a.fn.popover.noConflict=function(){return a.fn.popover=d,this}}(jQuery),+function(a){"use strict";function b(c,d){this.$body=a(document.body),this.$scrollElement=a(a(c).is(document.body)?window:c),this.options=a.extend({},b.DEFAULTS,d),this.selector=(this.options.target||"")+" .nav li > a",this.offsets=[],this.targets=[],this.activeTarget=null,this.scrollHeight=0,this.$scrollElement.on("scroll.bs.scrollspy",a.proxy(this.process,this)),this.refresh(),this.process()}function c(c){return this.each(function(){var d=a(this),e=d.data("bs.scrollspy"),f="object"==typeof c&&c;e||d.data("bs.scrollspy",e=new b(this,f)),"string"==typeof c&&e[c]()})}b.VERSION="3.3.7",b.DEFAULTS={offset:10},b.prototype.getScrollHeight=function(){return this.$scrollElement[0].scrollHeight||Math.max(this.$body[0].scrollHeight,document.documentElement.scrollHeight)},b.prototype.refresh=function(){var b=this,c="offset",d=0;this.offsets=[],this.targets=[],this.scrollHeight=this.getScrollHeight(),a.isWindow(this.$scrollElement[0])||(c="position",d=this.$scrollElement.scrollTop()),this.$body.find(this.selector).map(function(){var b=a(this),e=b.data("target")||b.attr("href"),f=/^#./.test(e)&&a(e);return f&&f.length&&f.is(":visible")&&[[f[c]().top+d,e]]||null}).sort(function(a,b){return a[0]-b[0]}).each(function(){b.offsets.push(this[0]),b.targets.push(this[1])})},b.prototype.process=function(){var a,b=this.$scrollElement.scrollTop()+this.options.offset,c=this.getScrollHeight(),d=this.options.offset+c-this.$scrollElement.height(),e=this.offsets,f=this.targets,g=this.activeTarget;if(this.scrollHeight!=c&&this.refresh(),b>=d)return g!=(a=f[f.length-1])&&this.activate(a);if(g&&b=e[a]&&(void 0===e[a+1]||b .dropdown-menu > .active").removeClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!1),b.addClass("active").find('[data-toggle="tab"]').attr("aria-expanded",!0),h?(b[0].offsetWidth,b.addClass("in")):b.removeClass("fade"),b.parent(".dropdown-menu").length&&b.closest("li.dropdown").addClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!0),e&&e()}var g=d.find("> .active"),h=e&&a.support.transition&&(g.length&&g.hasClass("fade")||!!d.find("> .fade").length);g.length&&h?g.one("bsTransitionEnd",f).emulateTransitionEnd(c.TRANSITION_DURATION):f(),g.removeClass("in")};var d=a.fn.tab;a.fn.tab=b,a.fn.tab.Constructor=c,a.fn.tab.noConflict=function(){return a.fn.tab=d,this};var e=function(c){c.preventDefault(),b.call(a(this),"show")};a(document).on("click.bs.tab.data-api",'[data-toggle="tab"]',e).on("click.bs.tab.data-api",'[data-toggle="pill"]',e)}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.affix"),f="object"==typeof b&&b;e||d.data("bs.affix",e=new c(this,f)),"string"==typeof b&&e[b]()})}var c=function(b,d){this.options=a.extend({},c.DEFAULTS,d),this.$target=a(this.options.target).on("scroll.bs.affix.data-api",a.proxy(this.checkPosition,this)).on("click.bs.affix.data-api",a.proxy(this.checkPositionWithEventLoop,this)),this.$element=a(b),this.affixed=null,this.unpin=null,this.pinnedOffset=null,this.checkPosition()};c.VERSION="3.3.7",c.RESET="affix affix-top affix-bottom",c.DEFAULTS={offset:0,target:window},c.prototype.getState=function(a,b,c,d){var e=this.$target.scrollTop(),f=this.$element.offset(),g=this.$target.height();if(null!=c&&"top"==this.affixed)return e=a-d&&"bottom"},c.prototype.getPinnedOffset=function(){if(this.pinnedOffset)return this.pinnedOffset;this.$element.removeClass(c.RESET).addClass("affix");var a=this.$target.scrollTop(),b=this.$element.offset();return this.pinnedOffset=b.top-a},c.prototype.checkPositionWithEventLoop=function(){setTimeout(a.proxy(this.checkPosition,this),1)},c.prototype.checkPosition=function(){if(this.$element.is(":visible")){var b=this.$element.height(),d=this.options.offset,e=d.top,f=d.bottom,g=Math.max(a(document).height(),a(document.body).height());"object"!=typeof d&&(f=e=d),"function"==typeof e&&(e=d.top(this.$element)),"function"==typeof f&&(f=d.bottom(this.$element));var h=this.getState(g,b,e,f);if(this.affixed!=h){null!=this.unpin&&this.$element.css("top","");var i="affix"+(h?"-"+h:""),j=a.Event(i+".bs.affix");if(this.$element.trigger(j),j.isDefaultPrevented())return;this.affixed=h,this.unpin="bottom"==h?this.getPinnedOffset():null,this.$element.removeClass(c.RESET).addClass(i).trigger(i.replace("affix","affixed")+".bs.affix")}"bottom"==h&&this.$element.offset({top:g-b-f})}};var d=a.fn.affix;a.fn.affix=b,a.fn.affix.Constructor=c,a.fn.affix.noConflict=function(){return a.fn.affix=d,this},a(window).on("load",function(){a('[data-spy="affix"]').each(function(){var c=a(this),d=c.data();d.offset=d.offset||{},null!=d.offsetBottom&&(d.offset.bottom=d.offsetBottom),null!=d.offsetTop&&(d.offset.top=d.offsetTop),b.call(c,d)})})}(jQuery); \ No newline at end of file diff --git a/blockly/webif/static/js/jquery-3.2.1.js b/blockly/webif/static/js/jquery-3.2.1.js deleted file mode 100755 index d2d8ca479..000000000 --- a/blockly/webif/static/js/jquery-3.2.1.js +++ /dev/null @@ -1,10253 +0,0 @@ -/*! - * jQuery JavaScript Library v3.2.1 - * https://jquery.com/ - * - * Includes Sizzle.js - * https://sizzlejs.com/ - * - * Copyright JS Foundation and other contributors - * Released under the MIT license - * https://jquery.org/license - * - * Date: 2017-03-20T18:59Z - */ -( function( global, factory ) { - - "use strict"; - - if ( typeof module === "object" && typeof module.exports === "object" ) { - - // For CommonJS and CommonJS-like environments where a proper `window` - // is present, execute the factory and get jQuery. - // For environments that do not have a `window` with a `document` - // (such as Node.js), expose a factory as module.exports. - // This accentuates the need for the creation of a real `window`. - // e.g. var jQuery = require("jquery")(window); - // See ticket #14549 for more info. - module.exports = global.document ? - factory( global, true ) : - function( w ) { - if ( !w.document ) { - throw new Error( "jQuery requires a window with a document" ); - } - return factory( w ); - }; - } else { - factory( global ); - } - -// Pass this if window is not defined yet -} )( typeof window !== "undefined" ? window : this, function( window, noGlobal ) { - -// Edge <= 12 - 13+, Firefox <=18 - 45+, IE 10 - 11, Safari 5.1 - 9+, iOS 6 - 9.1 -// throw exceptions when non-strict code (e.g., ASP.NET 4.5) accesses strict mode -// arguments.callee.caller (trac-13335). But as of jQuery 3.0 (2016), strict mode should be common -// enough that all such attempts are guarded in a try block. -"use strict"; - -var arr = []; - -var document = window.document; - -var getProto = Object.getPrototypeOf; - -var slice = arr.slice; - -var concat = arr.concat; - -var push = arr.push; - -var indexOf = arr.indexOf; - -var class2type = {}; - -var toString = class2type.toString; - -var hasOwn = class2type.hasOwnProperty; - -var fnToString = hasOwn.toString; - -var ObjectFunctionString = fnToString.call( Object ); - -var support = {}; - - - - function DOMEval( code, doc ) { - doc = doc || document; - - var script = doc.createElement( "script" ); - - script.text = code; - doc.head.appendChild( script ).parentNode.removeChild( script ); - } -/* global Symbol */ -// Defining this global in .eslintrc.json would create a danger of using the global -// unguarded in another place, it seems safer to define global only for this module - - - -var - version = "3.2.1", - - // Define a local copy of jQuery - jQuery = function( selector, context ) { - - // The jQuery object is actually just the init constructor 'enhanced' - // Need init if jQuery is called (just allow error to be thrown if not included) - return new jQuery.fn.init( selector, context ); - }, - - // Support: Android <=4.0 only - // Make sure we trim BOM and NBSP - rtrim = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, - - // Matches dashed string for camelizing - rmsPrefix = /^-ms-/, - rdashAlpha = /-([a-z])/g, - - // Used by jQuery.camelCase as callback to replace() - fcamelCase = function( all, letter ) { - return letter.toUpperCase(); - }; - -jQuery.fn = jQuery.prototype = { - - // The current version of jQuery being used - jquery: version, - - constructor: jQuery, - - // The default length of a jQuery object is 0 - length: 0, - - toArray: function() { - return slice.call( this ); - }, - - // Get the Nth element in the matched element set OR - // Get the whole matched element set as a clean array - get: function( num ) { - - // Return all the elements in a clean array - if ( num == null ) { - return slice.call( this ); - } - - // Return just the one element from the set - return num < 0 ? this[ num + this.length ] : this[ num ]; - }, - - // Take an array of elements and push it onto the stack - // (returning the new matched element set) - pushStack: function( elems ) { - - // Build a new jQuery matched element set - var ret = jQuery.merge( this.constructor(), elems ); - - // Add the old object onto the stack (as a reference) - ret.prevObject = this; - - // Return the newly-formed element set - return ret; - }, - - // Execute a callback for every element in the matched set. - each: function( callback ) { - return jQuery.each( this, callback ); - }, - - map: function( callback ) { - return this.pushStack( jQuery.map( this, function( elem, i ) { - return callback.call( elem, i, elem ); - } ) ); - }, - - slice: function() { - return this.pushStack( slice.apply( this, arguments ) ); - }, - - first: function() { - return this.eq( 0 ); - }, - - last: function() { - return this.eq( -1 ); - }, - - eq: function( i ) { - var len = this.length, - j = +i + ( i < 0 ? len : 0 ); - return this.pushStack( j >= 0 && j < len ? [ this[ j ] ] : [] ); - }, - - end: function() { - return this.prevObject || this.constructor(); - }, - - // For internal use only. - // Behaves like an Array's method, not like a jQuery method. - push: push, - sort: arr.sort, - splice: arr.splice -}; - -jQuery.extend = jQuery.fn.extend = function() { - var options, name, src, copy, copyIsArray, clone, - target = arguments[ 0 ] || {}, - i = 1, - length = arguments.length, - deep = false; - - // Handle a deep copy situation - if ( typeof target === "boolean" ) { - deep = target; - - // Skip the boolean and the target - target = arguments[ i ] || {}; - i++; - } - - // Handle case when target is a string or something (possible in deep copy) - if ( typeof target !== "object" && !jQuery.isFunction( target ) ) { - target = {}; - } - - // Extend jQuery itself if only one argument is passed - if ( i === length ) { - target = this; - i--; - } - - for ( ; i < length; i++ ) { - - // Only deal with non-null/undefined values - if ( ( options = arguments[ i ] ) != null ) { - - // Extend the base object - for ( name in options ) { - src = target[ name ]; - copy = options[ name ]; - - // Prevent never-ending loop - if ( target === copy ) { - continue; - } - - // Recurse if we're merging plain objects or arrays - if ( deep && copy && ( jQuery.isPlainObject( copy ) || - ( copyIsArray = Array.isArray( copy ) ) ) ) { - - if ( copyIsArray ) { - copyIsArray = false; - clone = src && Array.isArray( src ) ? src : []; - - } else { - clone = src && jQuery.isPlainObject( src ) ? src : {}; - } - - // Never move original objects, clone them - target[ name ] = jQuery.extend( deep, clone, copy ); - - // Don't bring in undefined values - } else if ( copy !== undefined ) { - target[ name ] = copy; - } - } - } - } - - // Return the modified object - return target; -}; - -jQuery.extend( { - - // Unique for each copy of jQuery on the page - expando: "jQuery" + ( version + Math.random() ).replace( /\D/g, "" ), - - // Assume jQuery is ready without the ready module - isReady: true, - - error: function( msg ) { - throw new Error( msg ); - }, - - noop: function() {}, - - isFunction: function( obj ) { - return jQuery.type( obj ) === "function"; - }, - - isWindow: function( obj ) { - return obj != null && obj === obj.window; - }, - - isNumeric: function( obj ) { - - // As of jQuery 3.0, isNumeric is limited to - // strings and numbers (primitives or objects) - // that can be coerced to finite numbers (gh-2662) - var type = jQuery.type( obj ); - return ( type === "number" || type === "string" ) && - - // parseFloat NaNs numeric-cast false positives ("") - // ...but misinterprets leading-number strings, particularly hex literals ("0x...") - // subtraction forces infinities to NaN - !isNaN( obj - parseFloat( obj ) ); - }, - - isPlainObject: function( obj ) { - var proto, Ctor; - - // Detect obvious negatives - // Use toString instead of jQuery.type to catch host objects - if ( !obj || toString.call( obj ) !== "[object Object]" ) { - return false; - } - - proto = getProto( obj ); - - // Objects with no prototype (e.g., `Object.create( null )`) are plain - if ( !proto ) { - return true; - } - - // Objects with prototype are plain iff they were constructed by a global Object function - Ctor = hasOwn.call( proto, "constructor" ) && proto.constructor; - return typeof Ctor === "function" && fnToString.call( Ctor ) === ObjectFunctionString; - }, - - isEmptyObject: function( obj ) { - - /* eslint-disable no-unused-vars */ - // See https://github.com/eslint/eslint/issues/6125 - var name; - - for ( name in obj ) { - return false; - } - return true; - }, - - type: function( obj ) { - if ( obj == null ) { - return obj + ""; - } - - // Support: Android <=2.3 only (functionish RegExp) - return typeof obj === "object" || typeof obj === "function" ? - class2type[ toString.call( obj ) ] || "object" : - typeof obj; - }, - - // Evaluates a script in a global context - globalEval: function( code ) { - DOMEval( code ); - }, - - // Convert dashed to camelCase; used by the css and data modules - // Support: IE <=9 - 11, Edge 12 - 13 - // Microsoft forgot to hump their vendor prefix (#9572) - camelCase: function( string ) { - return string.replace( rmsPrefix, "ms-" ).replace( rdashAlpha, fcamelCase ); - }, - - each: function( obj, callback ) { - var length, i = 0; - - if ( isArrayLike( obj ) ) { - length = obj.length; - for ( ; i < length; i++ ) { - if ( callback.call( obj[ i ], i, obj[ i ] ) === false ) { - break; - } - } - } else { - for ( i in obj ) { - if ( callback.call( obj[ i ], i, obj[ i ] ) === false ) { - break; - } - } - } - - return obj; - }, - - // Support: Android <=4.0 only - trim: function( text ) { - return text == null ? - "" : - ( text + "" ).replace( rtrim, "" ); - }, - - // results is for internal usage only - makeArray: function( arr, results ) { - var ret = results || []; - - if ( arr != null ) { - if ( isArrayLike( Object( arr ) ) ) { - jQuery.merge( ret, - typeof arr === "string" ? - [ arr ] : arr - ); - } else { - push.call( ret, arr ); - } - } - - return ret; - }, - - inArray: function( elem, arr, i ) { - return arr == null ? -1 : indexOf.call( arr, elem, i ); - }, - - // Support: Android <=4.0 only, PhantomJS 1 only - // push.apply(_, arraylike) throws on ancient WebKit - merge: function( first, second ) { - var len = +second.length, - j = 0, - i = first.length; - - for ( ; j < len; j++ ) { - first[ i++ ] = second[ j ]; - } - - first.length = i; - - return first; - }, - - grep: function( elems, callback, invert ) { - var callbackInverse, - matches = [], - i = 0, - length = elems.length, - callbackExpect = !invert; - - // Go through the array, only saving the items - // that pass the validator function - for ( ; i < length; i++ ) { - callbackInverse = !callback( elems[ i ], i ); - if ( callbackInverse !== callbackExpect ) { - matches.push( elems[ i ] ); - } - } - - return matches; - }, - - // arg is for internal usage only - map: function( elems, callback, arg ) { - var length, value, - i = 0, - ret = []; - - // Go through the array, translating each of the items to their new values - if ( isArrayLike( elems ) ) { - length = elems.length; - for ( ; i < length; i++ ) { - value = callback( elems[ i ], i, arg ); - - if ( value != null ) { - ret.push( value ); - } - } - - // Go through every key on the object, - } else { - for ( i in elems ) { - value = callback( elems[ i ], i, arg ); - - if ( value != null ) { - ret.push( value ); - } - } - } - - // Flatten any nested arrays - return concat.apply( [], ret ); - }, - - // A global GUID counter for objects - guid: 1, - - // Bind a function to a context, optionally partially applying any - // arguments. - proxy: function( fn, context ) { - var tmp, args, proxy; - - if ( typeof context === "string" ) { - tmp = fn[ context ]; - context = fn; - fn = tmp; - } - - // Quick check to determine if target is callable, in the spec - // this throws a TypeError, but we will just return undefined. - if ( !jQuery.isFunction( fn ) ) { - return undefined; - } - - // Simulated bind - args = slice.call( arguments, 2 ); - proxy = function() { - return fn.apply( context || this, args.concat( slice.call( arguments ) ) ); - }; - - // Set the guid of unique handler to the same of original handler, so it can be removed - proxy.guid = fn.guid = fn.guid || jQuery.guid++; - - return proxy; - }, - - now: Date.now, - - // jQuery.support is not used in Core but other projects attach their - // properties to it so it needs to exist. - support: support -} ); - -if ( typeof Symbol === "function" ) { - jQuery.fn[ Symbol.iterator ] = arr[ Symbol.iterator ]; -} - -// Populate the class2type map -jQuery.each( "Boolean Number String Function Array Date RegExp Object Error Symbol".split( " " ), -function( i, name ) { - class2type[ "[object " + name + "]" ] = name.toLowerCase(); -} ); - -function isArrayLike( obj ) { - - // Support: real iOS 8.2 only (not reproducible in simulator) - // `in` check used to prevent JIT error (gh-2145) - // hasOwn isn't used here due to false negatives - // regarding Nodelist length in IE - var length = !!obj && "length" in obj && obj.length, - type = jQuery.type( obj ); - - if ( type === "function" || jQuery.isWindow( obj ) ) { - return false; - } - - return type === "array" || length === 0 || - typeof length === "number" && length > 0 && ( length - 1 ) in obj; -} -var Sizzle = -/*! - * Sizzle CSS Selector Engine v2.3.3 - * https://sizzlejs.com/ - * - * Copyright jQuery Foundation and other contributors - * Released under the MIT license - * http://jquery.org/license - * - * Date: 2016-08-08 - */ -(function( window ) { - -var i, - support, - Expr, - getText, - isXML, - tokenize, - compile, - select, - outermostContext, - sortInput, - hasDuplicate, - - // Local document vars - setDocument, - document, - docElem, - documentIsHTML, - rbuggyQSA, - rbuggyMatches, - matches, - contains, - - // Instance-specific data - expando = "sizzle" + 1 * new Date(), - preferredDoc = window.document, - dirruns = 0, - done = 0, - classCache = createCache(), - tokenCache = createCache(), - compilerCache = createCache(), - sortOrder = function( a, b ) { - if ( a === b ) { - hasDuplicate = true; - } - return 0; - }, - - // Instance methods - hasOwn = ({}).hasOwnProperty, - arr = [], - pop = arr.pop, - push_native = arr.push, - push = arr.push, - slice = arr.slice, - // Use a stripped-down indexOf as it's faster than native - // https://jsperf.com/thor-indexof-vs-for/5 - indexOf = function( list, elem ) { - var i = 0, - len = list.length; - for ( ; i < len; i++ ) { - if ( list[i] === elem ) { - return i; - } - } - return -1; - }, - - booleans = "checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped", - - // Regular expressions - - // http://www.w3.org/TR/css3-selectors/#whitespace - whitespace = "[\\x20\\t\\r\\n\\f]", - - // http://www.w3.org/TR/CSS21/syndata.html#value-def-identifier - identifier = "(?:\\\\.|[\\w-]|[^\0-\\xa0])+", - - // Attribute selectors: http://www.w3.org/TR/selectors/#attribute-selectors - attributes = "\\[" + whitespace + "*(" + identifier + ")(?:" + whitespace + - // Operator (capture 2) - "*([*^$|!~]?=)" + whitespace + - // "Attribute values must be CSS identifiers [capture 5] or strings [capture 3 or capture 4]" - "*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|(" + identifier + "))|)" + whitespace + - "*\\]", - - pseudos = ":(" + identifier + ")(?:\\((" + - // To reduce the number of selectors needing tokenize in the preFilter, prefer arguments: - // 1. quoted (capture 3; capture 4 or capture 5) - "('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|" + - // 2. simple (capture 6) - "((?:\\\\.|[^\\\\()[\\]]|" + attributes + ")*)|" + - // 3. anything else (capture 2) - ".*" + - ")\\)|)", - - // Leading and non-escaped trailing whitespace, capturing some non-whitespace characters preceding the latter - rwhitespace = new RegExp( whitespace + "+", "g" ), - rtrim = new RegExp( "^" + whitespace + "+|((?:^|[^\\\\])(?:\\\\.)*)" + whitespace + "+$", "g" ), - - rcomma = new RegExp( "^" + whitespace + "*," + whitespace + "*" ), - rcombinators = new RegExp( "^" + whitespace + "*([>+~]|" + whitespace + ")" + whitespace + "*" ), - - rattributeQuotes = new RegExp( "=" + whitespace + "*([^\\]'\"]*?)" + whitespace + "*\\]", "g" ), - - rpseudo = new RegExp( pseudos ), - ridentifier = new RegExp( "^" + identifier + "$" ), - - matchExpr = { - "ID": new RegExp( "^#(" + identifier + ")" ), - "CLASS": new RegExp( "^\\.(" + identifier + ")" ), - "TAG": new RegExp( "^(" + identifier + "|[*])" ), - "ATTR": new RegExp( "^" + attributes ), - "PSEUDO": new RegExp( "^" + pseudos ), - "CHILD": new RegExp( "^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\(" + whitespace + - "*(even|odd|(([+-]|)(\\d*)n|)" + whitespace + "*(?:([+-]|)" + whitespace + - "*(\\d+)|))" + whitespace + "*\\)|)", "i" ), - "bool": new RegExp( "^(?:" + booleans + ")$", "i" ), - // For use in libraries implementing .is() - // We use this for POS matching in `select` - "needsContext": new RegExp( "^" + whitespace + "*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\(" + - whitespace + "*((?:-\\d)?\\d*)" + whitespace + "*\\)|)(?=[^-]|$)", "i" ) - }, - - rinputs = /^(?:input|select|textarea|button)$/i, - rheader = /^h\d$/i, - - rnative = /^[^{]+\{\s*\[native \w/, - - // Easily-parseable/retrievable ID or TAG or CLASS selectors - rquickExpr = /^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/, - - rsibling = /[+~]/, - - // CSS escapes - // http://www.w3.org/TR/CSS21/syndata.html#escaped-characters - runescape = new RegExp( "\\\\([\\da-f]{1,6}" + whitespace + "?|(" + whitespace + ")|.)", "ig" ), - funescape = function( _, escaped, escapedWhitespace ) { - var high = "0x" + escaped - 0x10000; - // NaN means non-codepoint - // Support: Firefox<24 - // Workaround erroneous numeric interpretation of +"0x" - return high !== high || escapedWhitespace ? - escaped : - high < 0 ? - // BMP codepoint - String.fromCharCode( high + 0x10000 ) : - // Supplemental Plane codepoint (surrogate pair) - String.fromCharCode( high >> 10 | 0xD800, high & 0x3FF | 0xDC00 ); - }, - - // CSS string/identifier serialization - // https://drafts.csswg.org/cssom/#common-serializing-idioms - rcssescape = /([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g, - fcssescape = function( ch, asCodePoint ) { - if ( asCodePoint ) { - - // U+0000 NULL becomes U+FFFD REPLACEMENT CHARACTER - if ( ch === "\0" ) { - return "\uFFFD"; - } - - // Control characters and (dependent upon position) numbers get escaped as code points - return ch.slice( 0, -1 ) + "\\" + ch.charCodeAt( ch.length - 1 ).toString( 16 ) + " "; - } - - // Other potentially-special ASCII characters get backslash-escaped - return "\\" + ch; - }, - - // Used for iframes - // See setDocument() - // Removing the function wrapper causes a "Permission Denied" - // error in IE - unloadHandler = function() { - setDocument(); - }, - - disabledAncestor = addCombinator( - function( elem ) { - return elem.disabled === true && ("form" in elem || "label" in elem); - }, - { dir: "parentNode", next: "legend" } - ); - -// Optimize for push.apply( _, NodeList ) -try { - push.apply( - (arr = slice.call( preferredDoc.childNodes )), - preferredDoc.childNodes - ); - // Support: Android<4.0 - // Detect silently failing push.apply - arr[ preferredDoc.childNodes.length ].nodeType; -} catch ( e ) { - push = { apply: arr.length ? - - // Leverage slice if possible - function( target, els ) { - push_native.apply( target, slice.call(els) ); - } : - - // Support: IE<9 - // Otherwise append directly - function( target, els ) { - var j = target.length, - i = 0; - // Can't trust NodeList.length - while ( (target[j++] = els[i++]) ) {} - target.length = j - 1; - } - }; -} - -function Sizzle( selector, context, results, seed ) { - var m, i, elem, nid, match, groups, newSelector, - newContext = context && context.ownerDocument, - - // nodeType defaults to 9, since context defaults to document - nodeType = context ? context.nodeType : 9; - - results = results || []; - - // Return early from calls with invalid selector or context - if ( typeof selector !== "string" || !selector || - nodeType !== 1 && nodeType !== 9 && nodeType !== 11 ) { - - return results; - } - - // Try to shortcut find operations (as opposed to filters) in HTML documents - if ( !seed ) { - - if ( ( context ? context.ownerDocument || context : preferredDoc ) !== document ) { - setDocument( context ); - } - context = context || document; - - if ( documentIsHTML ) { - - // If the selector is sufficiently simple, try using a "get*By*" DOM method - // (excepting DocumentFragment context, where the methods don't exist) - if ( nodeType !== 11 && (match = rquickExpr.exec( selector )) ) { - - // ID selector - if ( (m = match[1]) ) { - - // Document context - if ( nodeType === 9 ) { - if ( (elem = context.getElementById( m )) ) { - - // Support: IE, Opera, Webkit - // TODO: identify versions - // getElementById can match elements by name instead of ID - if ( elem.id === m ) { - results.push( elem ); - return results; - } - } else { - return results; - } - - // Element context - } else { - - // Support: IE, Opera, Webkit - // TODO: identify versions - // getElementById can match elements by name instead of ID - if ( newContext && (elem = newContext.getElementById( m )) && - contains( context, elem ) && - elem.id === m ) { - - results.push( elem ); - return results; - } - } - - // Type selector - } else if ( match[2] ) { - push.apply( results, context.getElementsByTagName( selector ) ); - return results; - - // Class selector - } else if ( (m = match[3]) && support.getElementsByClassName && - context.getElementsByClassName ) { - - push.apply( results, context.getElementsByClassName( m ) ); - return results; - } - } - - // Take advantage of querySelectorAll - if ( support.qsa && - !compilerCache[ selector + " " ] && - (!rbuggyQSA || !rbuggyQSA.test( selector )) ) { - - if ( nodeType !== 1 ) { - newContext = context; - newSelector = selector; - - // qSA looks outside Element context, which is not what we want - // Thanks to Andrew Dupont for this workaround technique - // Support: IE <=8 - // Exclude object elements - } else if ( context.nodeName.toLowerCase() !== "object" ) { - - // Capture the context ID, setting it first if necessary - if ( (nid = context.getAttribute( "id" )) ) { - nid = nid.replace( rcssescape, fcssescape ); - } else { - context.setAttribute( "id", (nid = expando) ); - } - - // Prefix every selector in the list - groups = tokenize( selector ); - i = groups.length; - while ( i-- ) { - groups[i] = "#" + nid + " " + toSelector( groups[i] ); - } - newSelector = groups.join( "," ); - - // Expand context for sibling selectors - newContext = rsibling.test( selector ) && testContext( context.parentNode ) || - context; - } - - if ( newSelector ) { - try { - push.apply( results, - newContext.querySelectorAll( newSelector ) - ); - return results; - } catch ( qsaError ) { - } finally { - if ( nid === expando ) { - context.removeAttribute( "id" ); - } - } - } - } - } - } - - // All others - return select( selector.replace( rtrim, "$1" ), context, results, seed ); -} - -/** - * Create key-value caches of limited size - * @returns {function(string, object)} Returns the Object data after storing it on itself with - * property name the (space-suffixed) string and (if the cache is larger than Expr.cacheLength) - * deleting the oldest entry - */ -function createCache() { - var keys = []; - - function cache( key, value ) { - // Use (key + " ") to avoid collision with native prototype properties (see Issue #157) - if ( keys.push( key + " " ) > Expr.cacheLength ) { - // Only keep the most recent entries - delete cache[ keys.shift() ]; - } - return (cache[ key + " " ] = value); - } - return cache; -} - -/** - * Mark a function for special use by Sizzle - * @param {Function} fn The function to mark - */ -function markFunction( fn ) { - fn[ expando ] = true; - return fn; -} - -/** - * Support testing using an element - * @param {Function} fn Passed the created element and returns a boolean result - */ -function assert( fn ) { - var el = document.createElement("fieldset"); - - try { - return !!fn( el ); - } catch (e) { - return false; - } finally { - // Remove from its parent by default - if ( el.parentNode ) { - el.parentNode.removeChild( el ); - } - // release memory in IE - el = null; - } -} - -/** - * Adds the same handler for all of the specified attrs - * @param {String} attrs Pipe-separated list of attributes - * @param {Function} handler The method that will be applied - */ -function addHandle( attrs, handler ) { - var arr = attrs.split("|"), - i = arr.length; - - while ( i-- ) { - Expr.attrHandle[ arr[i] ] = handler; - } -} - -/** - * Checks document order of two siblings - * @param {Element} a - * @param {Element} b - * @returns {Number} Returns less than 0 if a precedes b, greater than 0 if a follows b - */ -function siblingCheck( a, b ) { - var cur = b && a, - diff = cur && a.nodeType === 1 && b.nodeType === 1 && - a.sourceIndex - b.sourceIndex; - - // Use IE sourceIndex if available on both nodes - if ( diff ) { - return diff; - } - - // Check if b follows a - if ( cur ) { - while ( (cur = cur.nextSibling) ) { - if ( cur === b ) { - return -1; - } - } - } - - return a ? 1 : -1; -} - -/** - * Returns a function to use in pseudos for input types - * @param {String} type - */ -function createInputPseudo( type ) { - return function( elem ) { - var name = elem.nodeName.toLowerCase(); - return name === "input" && elem.type === type; - }; -} - -/** - * Returns a function to use in pseudos for buttons - * @param {String} type - */ -function createButtonPseudo( type ) { - return function( elem ) { - var name = elem.nodeName.toLowerCase(); - return (name === "input" || name === "button") && elem.type === type; - }; -} - -/** - * Returns a function to use in pseudos for :enabled/:disabled - * @param {Boolean} disabled true for :disabled; false for :enabled - */ -function createDisabledPseudo( disabled ) { - - // Known :disabled false positives: fieldset[disabled] > legend:nth-of-type(n+2) :can-disable - return function( elem ) { - - // Only certain elements can match :enabled or :disabled - // https://html.spec.whatwg.org/multipage/scripting.html#selector-enabled - // https://html.spec.whatwg.org/multipage/scripting.html#selector-disabled - if ( "form" in elem ) { - - // Check for inherited disabledness on relevant non-disabled elements: - // * listed form-associated elements in a disabled fieldset - // https://html.spec.whatwg.org/multipage/forms.html#category-listed - // https://html.spec.whatwg.org/multipage/forms.html#concept-fe-disabled - // * option elements in a disabled optgroup - // https://html.spec.whatwg.org/multipage/forms.html#concept-option-disabled - // All such elements have a "form" property. - if ( elem.parentNode && elem.disabled === false ) { - - // Option elements defer to a parent optgroup if present - if ( "label" in elem ) { - if ( "label" in elem.parentNode ) { - return elem.parentNode.disabled === disabled; - } else { - return elem.disabled === disabled; - } - } - - // Support: IE 6 - 11 - // Use the isDisabled shortcut property to check for disabled fieldset ancestors - return elem.isDisabled === disabled || - - // Where there is no isDisabled, check manually - /* jshint -W018 */ - elem.isDisabled !== !disabled && - disabledAncestor( elem ) === disabled; - } - - return elem.disabled === disabled; - - // Try to winnow out elements that can't be disabled before trusting the disabled property. - // Some victims get caught in our net (label, legend, menu, track), but it shouldn't - // even exist on them, let alone have a boolean value. - } else if ( "label" in elem ) { - return elem.disabled === disabled; - } - - // Remaining elements are neither :enabled nor :disabled - return false; - }; -} - -/** - * Returns a function to use in pseudos for positionals - * @param {Function} fn - */ -function createPositionalPseudo( fn ) { - return markFunction(function( argument ) { - argument = +argument; - return markFunction(function( seed, matches ) { - var j, - matchIndexes = fn( [], seed.length, argument ), - i = matchIndexes.length; - - // Match elements found at the specified indexes - while ( i-- ) { - if ( seed[ (j = matchIndexes[i]) ] ) { - seed[j] = !(matches[j] = seed[j]); - } - } - }); - }); -} - -/** - * Checks a node for validity as a Sizzle context - * @param {Element|Object=} context - * @returns {Element|Object|Boolean} The input node if acceptable, otherwise a falsy value - */ -function testContext( context ) { - return context && typeof context.getElementsByTagName !== "undefined" && context; -} - -// Expose support vars for convenience -support = Sizzle.support = {}; - -/** - * Detects XML nodes - * @param {Element|Object} elem An element or a document - * @returns {Boolean} True iff elem is a non-HTML XML node - */ -isXML = Sizzle.isXML = function( elem ) { - // documentElement is verified for cases where it doesn't yet exist - // (such as loading iframes in IE - #4833) - var documentElement = elem && (elem.ownerDocument || elem).documentElement; - return documentElement ? documentElement.nodeName !== "HTML" : false; -}; - -/** - * Sets document-related variables once based on the current document - * @param {Element|Object} [doc] An element or document object to use to set the document - * @returns {Object} Returns the current document - */ -setDocument = Sizzle.setDocument = function( node ) { - var hasCompare, subWindow, - doc = node ? node.ownerDocument || node : preferredDoc; - - // Return early if doc is invalid or already selected - if ( doc === document || doc.nodeType !== 9 || !doc.documentElement ) { - return document; - } - - // Update global variables - document = doc; - docElem = document.documentElement; - documentIsHTML = !isXML( document ); - - // Support: IE 9-11, Edge - // Accessing iframe documents after unload throws "permission denied" errors (jQuery #13936) - if ( preferredDoc !== document && - (subWindow = document.defaultView) && subWindow.top !== subWindow ) { - - // Support: IE 11, Edge - if ( subWindow.addEventListener ) { - subWindow.addEventListener( "unload", unloadHandler, false ); - - // Support: IE 9 - 10 only - } else if ( subWindow.attachEvent ) { - subWindow.attachEvent( "onunload", unloadHandler ); - } - } - - /* Attributes - ---------------------------------------------------------------------- */ - - // Support: IE<8 - // Verify that getAttribute really returns attributes and not properties - // (excepting IE8 booleans) - support.attributes = assert(function( el ) { - el.className = "i"; - return !el.getAttribute("className"); - }); - - /* getElement(s)By* - ---------------------------------------------------------------------- */ - - // Check if getElementsByTagName("*") returns only elements - support.getElementsByTagName = assert(function( el ) { - el.appendChild( document.createComment("") ); - return !el.getElementsByTagName("*").length; - }); - - // Support: IE<9 - support.getElementsByClassName = rnative.test( document.getElementsByClassName ); - - // Support: IE<10 - // Check if getElementById returns elements by name - // The broken getElementById methods don't pick up programmatically-set names, - // so use a roundabout getElementsByName test - support.getById = assert(function( el ) { - docElem.appendChild( el ).id = expando; - return !document.getElementsByName || !document.getElementsByName( expando ).length; - }); - - // ID filter and find - if ( support.getById ) { - Expr.filter["ID"] = function( id ) { - var attrId = id.replace( runescape, funescape ); - return function( elem ) { - return elem.getAttribute("id") === attrId; - }; - }; - Expr.find["ID"] = function( id, context ) { - if ( typeof context.getElementById !== "undefined" && documentIsHTML ) { - var elem = context.getElementById( id ); - return elem ? [ elem ] : []; - } - }; - } else { - Expr.filter["ID"] = function( id ) { - var attrId = id.replace( runescape, funescape ); - return function( elem ) { - var node = typeof elem.getAttributeNode !== "undefined" && - elem.getAttributeNode("id"); - return node && node.value === attrId; - }; - }; - - // Support: IE 6 - 7 only - // getElementById is not reliable as a find shortcut - Expr.find["ID"] = function( id, context ) { - if ( typeof context.getElementById !== "undefined" && documentIsHTML ) { - var node, i, elems, - elem = context.getElementById( id ); - - if ( elem ) { - - // Verify the id attribute - node = elem.getAttributeNode("id"); - if ( node && node.value === id ) { - return [ elem ]; - } - - // Fall back on getElementsByName - elems = context.getElementsByName( id ); - i = 0; - while ( (elem = elems[i++]) ) { - node = elem.getAttributeNode("id"); - if ( node && node.value === id ) { - return [ elem ]; - } - } - } - - return []; - } - }; - } - - // Tag - Expr.find["TAG"] = support.getElementsByTagName ? - function( tag, context ) { - if ( typeof context.getElementsByTagName !== "undefined" ) { - return context.getElementsByTagName( tag ); - - // DocumentFragment nodes don't have gEBTN - } else if ( support.qsa ) { - return context.querySelectorAll( tag ); - } - } : - - function( tag, context ) { - var elem, - tmp = [], - i = 0, - // By happy coincidence, a (broken) gEBTN appears on DocumentFragment nodes too - results = context.getElementsByTagName( tag ); - - // Filter out possible comments - if ( tag === "*" ) { - while ( (elem = results[i++]) ) { - if ( elem.nodeType === 1 ) { - tmp.push( elem ); - } - } - - return tmp; - } - return results; - }; - - // Class - Expr.find["CLASS"] = support.getElementsByClassName && function( className, context ) { - if ( typeof context.getElementsByClassName !== "undefined" && documentIsHTML ) { - return context.getElementsByClassName( className ); - } - }; - - /* QSA/matchesSelector - ---------------------------------------------------------------------- */ - - // QSA and matchesSelector support - - // matchesSelector(:active) reports false when true (IE9/Opera 11.5) - rbuggyMatches = []; - - // qSa(:focus) reports false when true (Chrome 21) - // We allow this because of a bug in IE8/9 that throws an error - // whenever `document.activeElement` is accessed on an iframe - // So, we allow :focus to pass through QSA all the time to avoid the IE error - // See https://bugs.jquery.com/ticket/13378 - rbuggyQSA = []; - - if ( (support.qsa = rnative.test( document.querySelectorAll )) ) { - // Build QSA regex - // Regex strategy adopted from Diego Perini - assert(function( el ) { - // Select is set to empty string on purpose - // This is to test IE's treatment of not explicitly - // setting a boolean content attribute, - // since its presence should be enough - // https://bugs.jquery.com/ticket/12359 - docElem.appendChild( el ).innerHTML = "" + - ""; - - // Support: IE8, Opera 11-12.16 - // Nothing should be selected when empty strings follow ^= or $= or *= - // The test attribute must be unknown in Opera but "safe" for WinRT - // https://msdn.microsoft.com/en-us/library/ie/hh465388.aspx#attribute_section - if ( el.querySelectorAll("[msallowcapture^='']").length ) { - rbuggyQSA.push( "[*^$]=" + whitespace + "*(?:''|\"\")" ); - } - - // Support: IE8 - // Boolean attributes and "value" are not treated correctly - if ( !el.querySelectorAll("[selected]").length ) { - rbuggyQSA.push( "\\[" + whitespace + "*(?:value|" + booleans + ")" ); - } - - // Support: Chrome<29, Android<4.4, Safari<7.0+, iOS<7.0+, PhantomJS<1.9.8+ - if ( !el.querySelectorAll( "[id~=" + expando + "-]" ).length ) { - rbuggyQSA.push("~="); - } - - // Webkit/Opera - :checked should return selected option elements - // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked - // IE8 throws error here and will not see later tests - if ( !el.querySelectorAll(":checked").length ) { - rbuggyQSA.push(":checked"); - } - - // Support: Safari 8+, iOS 8+ - // https://bugs.webkit.org/show_bug.cgi?id=136851 - // In-page `selector#id sibling-combinator selector` fails - if ( !el.querySelectorAll( "a#" + expando + "+*" ).length ) { - rbuggyQSA.push(".#.+[+~]"); - } - }); - - assert(function( el ) { - el.innerHTML = "" + - ""; - - // Support: Windows 8 Native Apps - // The type and name attributes are restricted during .innerHTML assignment - var input = document.createElement("input"); - input.setAttribute( "type", "hidden" ); - el.appendChild( input ).setAttribute( "name", "D" ); - - // Support: IE8 - // Enforce case-sensitivity of name attribute - if ( el.querySelectorAll("[name=d]").length ) { - rbuggyQSA.push( "name" + whitespace + "*[*^$|!~]?=" ); - } - - // FF 3.5 - :enabled/:disabled and hidden elements (hidden elements are still enabled) - // IE8 throws error here and will not see later tests - if ( el.querySelectorAll(":enabled").length !== 2 ) { - rbuggyQSA.push( ":enabled", ":disabled" ); - } - - // Support: IE9-11+ - // IE's :disabled selector does not pick up the children of disabled fieldsets - docElem.appendChild( el ).disabled = true; - if ( el.querySelectorAll(":disabled").length !== 2 ) { - rbuggyQSA.push( ":enabled", ":disabled" ); - } - - // Opera 10-11 does not throw on post-comma invalid pseudos - el.querySelectorAll("*,:x"); - rbuggyQSA.push(",.*:"); - }); - } - - if ( (support.matchesSelector = rnative.test( (matches = docElem.matches || - docElem.webkitMatchesSelector || - docElem.mozMatchesSelector || - docElem.oMatchesSelector || - docElem.msMatchesSelector) )) ) { - - assert(function( el ) { - // Check to see if it's possible to do matchesSelector - // on a disconnected node (IE 9) - support.disconnectedMatch = matches.call( el, "*" ); - - // This should fail with an exception - // Gecko does not error, returns false instead - matches.call( el, "[s!='']:x" ); - rbuggyMatches.push( "!=", pseudos ); - }); - } - - rbuggyQSA = rbuggyQSA.length && new RegExp( rbuggyQSA.join("|") ); - rbuggyMatches = rbuggyMatches.length && new RegExp( rbuggyMatches.join("|") ); - - /* Contains - ---------------------------------------------------------------------- */ - hasCompare = rnative.test( docElem.compareDocumentPosition ); - - // Element contains another - // Purposefully self-exclusive - // As in, an element does not contain itself - contains = hasCompare || rnative.test( docElem.contains ) ? - function( a, b ) { - var adown = a.nodeType === 9 ? a.documentElement : a, - bup = b && b.parentNode; - return a === bup || !!( bup && bup.nodeType === 1 && ( - adown.contains ? - adown.contains( bup ) : - a.compareDocumentPosition && a.compareDocumentPosition( bup ) & 16 - )); - } : - function( a, b ) { - if ( b ) { - while ( (b = b.parentNode) ) { - if ( b === a ) { - return true; - } - } - } - return false; - }; - - /* Sorting - ---------------------------------------------------------------------- */ - - // Document order sorting - sortOrder = hasCompare ? - function( a, b ) { - - // Flag for duplicate removal - if ( a === b ) { - hasDuplicate = true; - return 0; - } - - // Sort on method existence if only one input has compareDocumentPosition - var compare = !a.compareDocumentPosition - !b.compareDocumentPosition; - if ( compare ) { - return compare; - } - - // Calculate position if both inputs belong to the same document - compare = ( a.ownerDocument || a ) === ( b.ownerDocument || b ) ? - a.compareDocumentPosition( b ) : - - // Otherwise we know they are disconnected - 1; - - // Disconnected nodes - if ( compare & 1 || - (!support.sortDetached && b.compareDocumentPosition( a ) === compare) ) { - - // Choose the first element that is related to our preferred document - if ( a === document || a.ownerDocument === preferredDoc && contains(preferredDoc, a) ) { - return -1; - } - if ( b === document || b.ownerDocument === preferredDoc && contains(preferredDoc, b) ) { - return 1; - } - - // Maintain original order - return sortInput ? - ( indexOf( sortInput, a ) - indexOf( sortInput, b ) ) : - 0; - } - - return compare & 4 ? -1 : 1; - } : - function( a, b ) { - // Exit early if the nodes are identical - if ( a === b ) { - hasDuplicate = true; - return 0; - } - - var cur, - i = 0, - aup = a.parentNode, - bup = b.parentNode, - ap = [ a ], - bp = [ b ]; - - // Parentless nodes are either documents or disconnected - if ( !aup || !bup ) { - return a === document ? -1 : - b === document ? 1 : - aup ? -1 : - bup ? 1 : - sortInput ? - ( indexOf( sortInput, a ) - indexOf( sortInput, b ) ) : - 0; - - // If the nodes are siblings, we can do a quick check - } else if ( aup === bup ) { - return siblingCheck( a, b ); - } - - // Otherwise we need full lists of their ancestors for comparison - cur = a; - while ( (cur = cur.parentNode) ) { - ap.unshift( cur ); - } - cur = b; - while ( (cur = cur.parentNode) ) { - bp.unshift( cur ); - } - - // Walk down the tree looking for a discrepancy - while ( ap[i] === bp[i] ) { - i++; - } - - return i ? - // Do a sibling check if the nodes have a common ancestor - siblingCheck( ap[i], bp[i] ) : - - // Otherwise nodes in our document sort first - ap[i] === preferredDoc ? -1 : - bp[i] === preferredDoc ? 1 : - 0; - }; - - return document; -}; - -Sizzle.matches = function( expr, elements ) { - return Sizzle( expr, null, null, elements ); -}; - -Sizzle.matchesSelector = function( elem, expr ) { - // Set document vars if needed - if ( ( elem.ownerDocument || elem ) !== document ) { - setDocument( elem ); - } - - // Make sure that attribute selectors are quoted - expr = expr.replace( rattributeQuotes, "='$1']" ); - - if ( support.matchesSelector && documentIsHTML && - !compilerCache[ expr + " " ] && - ( !rbuggyMatches || !rbuggyMatches.test( expr ) ) && - ( !rbuggyQSA || !rbuggyQSA.test( expr ) ) ) { - - try { - var ret = matches.call( elem, expr ); - - // IE 9's matchesSelector returns false on disconnected nodes - if ( ret || support.disconnectedMatch || - // As well, disconnected nodes are said to be in a document - // fragment in IE 9 - elem.document && elem.document.nodeType !== 11 ) { - return ret; - } - } catch (e) {} - } - - return Sizzle( expr, document, null, [ elem ] ).length > 0; -}; - -Sizzle.contains = function( context, elem ) { - // Set document vars if needed - if ( ( context.ownerDocument || context ) !== document ) { - setDocument( context ); - } - return contains( context, elem ); -}; - -Sizzle.attr = function( elem, name ) { - // Set document vars if needed - if ( ( elem.ownerDocument || elem ) !== document ) { - setDocument( elem ); - } - - var fn = Expr.attrHandle[ name.toLowerCase() ], - // Don't get fooled by Object.prototype properties (jQuery #13807) - val = fn && hasOwn.call( Expr.attrHandle, name.toLowerCase() ) ? - fn( elem, name, !documentIsHTML ) : - undefined; - - return val !== undefined ? - val : - support.attributes || !documentIsHTML ? - elem.getAttribute( name ) : - (val = elem.getAttributeNode(name)) && val.specified ? - val.value : - null; -}; - -Sizzle.escape = function( sel ) { - return (sel + "").replace( rcssescape, fcssescape ); -}; - -Sizzle.error = function( msg ) { - throw new Error( "Syntax error, unrecognized expression: " + msg ); -}; - -/** - * Document sorting and removing duplicates - * @param {ArrayLike} results - */ -Sizzle.uniqueSort = function( results ) { - var elem, - duplicates = [], - j = 0, - i = 0; - - // Unless we *know* we can detect duplicates, assume their presence - hasDuplicate = !support.detectDuplicates; - sortInput = !support.sortStable && results.slice( 0 ); - results.sort( sortOrder ); - - if ( hasDuplicate ) { - while ( (elem = results[i++]) ) { - if ( elem === results[ i ] ) { - j = duplicates.push( i ); - } - } - while ( j-- ) { - results.splice( duplicates[ j ], 1 ); - } - } - - // Clear input after sorting to release objects - // See https://github.com/jquery/sizzle/pull/225 - sortInput = null; - - return results; -}; - -/** - * Utility function for retrieving the text value of an array of DOM nodes - * @param {Array|Element} elem - */ -getText = Sizzle.getText = function( elem ) { - var node, - ret = "", - i = 0, - nodeType = elem.nodeType; - - if ( !nodeType ) { - // If no nodeType, this is expected to be an array - while ( (node = elem[i++]) ) { - // Do not traverse comment nodes - ret += getText( node ); - } - } else if ( nodeType === 1 || nodeType === 9 || nodeType === 11 ) { - // Use textContent for elements - // innerText usage removed for consistency of new lines (jQuery #11153) - if ( typeof elem.textContent === "string" ) { - return elem.textContent; - } else { - // Traverse its children - for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) { - ret += getText( elem ); - } - } - } else if ( nodeType === 3 || nodeType === 4 ) { - return elem.nodeValue; - } - // Do not include comment or processing instruction nodes - - return ret; -}; - -Expr = Sizzle.selectors = { - - // Can be adjusted by the user - cacheLength: 50, - - createPseudo: markFunction, - - match: matchExpr, - - attrHandle: {}, - - find: {}, - - relative: { - ">": { dir: "parentNode", first: true }, - " ": { dir: "parentNode" }, - "+": { dir: "previousSibling", first: true }, - "~": { dir: "previousSibling" } - }, - - preFilter: { - "ATTR": function( match ) { - match[1] = match[1].replace( runescape, funescape ); - - // Move the given value to match[3] whether quoted or unquoted - match[3] = ( match[3] || match[4] || match[5] || "" ).replace( runescape, funescape ); - - if ( match[2] === "~=" ) { - match[3] = " " + match[3] + " "; - } - - return match.slice( 0, 4 ); - }, - - "CHILD": function( match ) { - /* matches from matchExpr["CHILD"] - 1 type (only|nth|...) - 2 what (child|of-type) - 3 argument (even|odd|\d*|\d*n([+-]\d+)?|...) - 4 xn-component of xn+y argument ([+-]?\d*n|) - 5 sign of xn-component - 6 x of xn-component - 7 sign of y-component - 8 y of y-component - */ - match[1] = match[1].toLowerCase(); - - if ( match[1].slice( 0, 3 ) === "nth" ) { - // nth-* requires argument - if ( !match[3] ) { - Sizzle.error( match[0] ); - } - - // numeric x and y parameters for Expr.filter.CHILD - // remember that false/true cast respectively to 0/1 - match[4] = +( match[4] ? match[5] + (match[6] || 1) : 2 * ( match[3] === "even" || match[3] === "odd" ) ); - match[5] = +( ( match[7] + match[8] ) || match[3] === "odd" ); - - // other types prohibit arguments - } else if ( match[3] ) { - Sizzle.error( match[0] ); - } - - return match; - }, - - "PSEUDO": function( match ) { - var excess, - unquoted = !match[6] && match[2]; - - if ( matchExpr["CHILD"].test( match[0] ) ) { - return null; - } - - // Accept quoted arguments as-is - if ( match[3] ) { - match[2] = match[4] || match[5] || ""; - - // Strip excess characters from unquoted arguments - } else if ( unquoted && rpseudo.test( unquoted ) && - // Get excess from tokenize (recursively) - (excess = tokenize( unquoted, true )) && - // advance to the next closing parenthesis - (excess = unquoted.indexOf( ")", unquoted.length - excess ) - unquoted.length) ) { - - // excess is a negative index - match[0] = match[0].slice( 0, excess ); - match[2] = unquoted.slice( 0, excess ); - } - - // Return only captures needed by the pseudo filter method (type and argument) - return match.slice( 0, 3 ); - } - }, - - filter: { - - "TAG": function( nodeNameSelector ) { - var nodeName = nodeNameSelector.replace( runescape, funescape ).toLowerCase(); - return nodeNameSelector === "*" ? - function() { return true; } : - function( elem ) { - return elem.nodeName && elem.nodeName.toLowerCase() === nodeName; - }; - }, - - "CLASS": function( className ) { - var pattern = classCache[ className + " " ]; - - return pattern || - (pattern = new RegExp( "(^|" + whitespace + ")" + className + "(" + whitespace + "|$)" )) && - classCache( className, function( elem ) { - return pattern.test( typeof elem.className === "string" && elem.className || typeof elem.getAttribute !== "undefined" && elem.getAttribute("class") || "" ); - }); - }, - - "ATTR": function( name, operator, check ) { - return function( elem ) { - var result = Sizzle.attr( elem, name ); - - if ( result == null ) { - return operator === "!="; - } - if ( !operator ) { - return true; - } - - result += ""; - - return operator === "=" ? result === check : - operator === "!=" ? result !== check : - operator === "^=" ? check && result.indexOf( check ) === 0 : - operator === "*=" ? check && result.indexOf( check ) > -1 : - operator === "$=" ? check && result.slice( -check.length ) === check : - operator === "~=" ? ( " " + result.replace( rwhitespace, " " ) + " " ).indexOf( check ) > -1 : - operator === "|=" ? result === check || result.slice( 0, check.length + 1 ) === check + "-" : - false; - }; - }, - - "CHILD": function( type, what, argument, first, last ) { - var simple = type.slice( 0, 3 ) !== "nth", - forward = type.slice( -4 ) !== "last", - ofType = what === "of-type"; - - return first === 1 && last === 0 ? - - // Shortcut for :nth-*(n) - function( elem ) { - return !!elem.parentNode; - } : - - function( elem, context, xml ) { - var cache, uniqueCache, outerCache, node, nodeIndex, start, - dir = simple !== forward ? "nextSibling" : "previousSibling", - parent = elem.parentNode, - name = ofType && elem.nodeName.toLowerCase(), - useCache = !xml && !ofType, - diff = false; - - if ( parent ) { - - // :(first|last|only)-(child|of-type) - if ( simple ) { - while ( dir ) { - node = elem; - while ( (node = node[ dir ]) ) { - if ( ofType ? - node.nodeName.toLowerCase() === name : - node.nodeType === 1 ) { - - return false; - } - } - // Reverse direction for :only-* (if we haven't yet done so) - start = dir = type === "only" && !start && "nextSibling"; - } - return true; - } - - start = [ forward ? parent.firstChild : parent.lastChild ]; - - // non-xml :nth-child(...) stores cache data on `parent` - if ( forward && useCache ) { - - // Seek `elem` from a previously-cached index - - // ...in a gzip-friendly way - node = parent; - outerCache = node[ expando ] || (node[ expando ] = {}); - - // Support: IE <9 only - // Defend against cloned attroperties (jQuery gh-1709) - uniqueCache = outerCache[ node.uniqueID ] || - (outerCache[ node.uniqueID ] = {}); - - cache = uniqueCache[ type ] || []; - nodeIndex = cache[ 0 ] === dirruns && cache[ 1 ]; - diff = nodeIndex && cache[ 2 ]; - node = nodeIndex && parent.childNodes[ nodeIndex ]; - - while ( (node = ++nodeIndex && node && node[ dir ] || - - // Fallback to seeking `elem` from the start - (diff = nodeIndex = 0) || start.pop()) ) { - - // When found, cache indexes on `parent` and break - if ( node.nodeType === 1 && ++diff && node === elem ) { - uniqueCache[ type ] = [ dirruns, nodeIndex, diff ]; - break; - } - } - - } else { - // Use previously-cached element index if available - if ( useCache ) { - // ...in a gzip-friendly way - node = elem; - outerCache = node[ expando ] || (node[ expando ] = {}); - - // Support: IE <9 only - // Defend against cloned attroperties (jQuery gh-1709) - uniqueCache = outerCache[ node.uniqueID ] || - (outerCache[ node.uniqueID ] = {}); - - cache = uniqueCache[ type ] || []; - nodeIndex = cache[ 0 ] === dirruns && cache[ 1 ]; - diff = nodeIndex; - } - - // xml :nth-child(...) - // or :nth-last-child(...) or :nth(-last)?-of-type(...) - if ( diff === false ) { - // Use the same loop as above to seek `elem` from the start - while ( (node = ++nodeIndex && node && node[ dir ] || - (diff = nodeIndex = 0) || start.pop()) ) { - - if ( ( ofType ? - node.nodeName.toLowerCase() === name : - node.nodeType === 1 ) && - ++diff ) { - - // Cache the index of each encountered element - if ( useCache ) { - outerCache = node[ expando ] || (node[ expando ] = {}); - - // Support: IE <9 only - // Defend against cloned attroperties (jQuery gh-1709) - uniqueCache = outerCache[ node.uniqueID ] || - (outerCache[ node.uniqueID ] = {}); - - uniqueCache[ type ] = [ dirruns, diff ]; - } - - if ( node === elem ) { - break; - } - } - } - } - } - - // Incorporate the offset, then check against cycle size - diff -= last; - return diff === first || ( diff % first === 0 && diff / first >= 0 ); - } - }; - }, - - "PSEUDO": function( pseudo, argument ) { - // pseudo-class names are case-insensitive - // http://www.w3.org/TR/selectors/#pseudo-classes - // Prioritize by case sensitivity in case custom pseudos are added with uppercase letters - // Remember that setFilters inherits from pseudos - var args, - fn = Expr.pseudos[ pseudo ] || Expr.setFilters[ pseudo.toLowerCase() ] || - Sizzle.error( "unsupported pseudo: " + pseudo ); - - // The user may use createPseudo to indicate that - // arguments are needed to create the filter function - // just as Sizzle does - if ( fn[ expando ] ) { - return fn( argument ); - } - - // But maintain support for old signatures - if ( fn.length > 1 ) { - args = [ pseudo, pseudo, "", argument ]; - return Expr.setFilters.hasOwnProperty( pseudo.toLowerCase() ) ? - markFunction(function( seed, matches ) { - var idx, - matched = fn( seed, argument ), - i = matched.length; - while ( i-- ) { - idx = indexOf( seed, matched[i] ); - seed[ idx ] = !( matches[ idx ] = matched[i] ); - } - }) : - function( elem ) { - return fn( elem, 0, args ); - }; - } - - return fn; - } - }, - - pseudos: { - // Potentially complex pseudos - "not": markFunction(function( selector ) { - // Trim the selector passed to compile - // to avoid treating leading and trailing - // spaces as combinators - var input = [], - results = [], - matcher = compile( selector.replace( rtrim, "$1" ) ); - - return matcher[ expando ] ? - markFunction(function( seed, matches, context, xml ) { - var elem, - unmatched = matcher( seed, null, xml, [] ), - i = seed.length; - - // Match elements unmatched by `matcher` - while ( i-- ) { - if ( (elem = unmatched[i]) ) { - seed[i] = !(matches[i] = elem); - } - } - }) : - function( elem, context, xml ) { - input[0] = elem; - matcher( input, null, xml, results ); - // Don't keep the element (issue #299) - input[0] = null; - return !results.pop(); - }; - }), - - "has": markFunction(function( selector ) { - return function( elem ) { - return Sizzle( selector, elem ).length > 0; - }; - }), - - "contains": markFunction(function( text ) { - text = text.replace( runescape, funescape ); - return function( elem ) { - return ( elem.textContent || elem.innerText || getText( elem ) ).indexOf( text ) > -1; - }; - }), - - // "Whether an element is represented by a :lang() selector - // is based solely on the element's language value - // being equal to the identifier C, - // or beginning with the identifier C immediately followed by "-". - // The matching of C against the element's language value is performed case-insensitively. - // The identifier C does not have to be a valid language name." - // http://www.w3.org/TR/selectors/#lang-pseudo - "lang": markFunction( function( lang ) { - // lang value must be a valid identifier - if ( !ridentifier.test(lang || "") ) { - Sizzle.error( "unsupported lang: " + lang ); - } - lang = lang.replace( runescape, funescape ).toLowerCase(); - return function( elem ) { - var elemLang; - do { - if ( (elemLang = documentIsHTML ? - elem.lang : - elem.getAttribute("xml:lang") || elem.getAttribute("lang")) ) { - - elemLang = elemLang.toLowerCase(); - return elemLang === lang || elemLang.indexOf( lang + "-" ) === 0; - } - } while ( (elem = elem.parentNode) && elem.nodeType === 1 ); - return false; - }; - }), - - // Miscellaneous - "target": function( elem ) { - var hash = window.location && window.location.hash; - return hash && hash.slice( 1 ) === elem.id; - }, - - "root": function( elem ) { - return elem === docElem; - }, - - "focus": function( elem ) { - return elem === document.activeElement && (!document.hasFocus || document.hasFocus()) && !!(elem.type || elem.href || ~elem.tabIndex); - }, - - // Boolean properties - "enabled": createDisabledPseudo( false ), - "disabled": createDisabledPseudo( true ), - - "checked": function( elem ) { - // In CSS3, :checked should return both checked and selected elements - // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked - var nodeName = elem.nodeName.toLowerCase(); - return (nodeName === "input" && !!elem.checked) || (nodeName === "option" && !!elem.selected); - }, - - "selected": function( elem ) { - // Accessing this property makes selected-by-default - // options in Safari work properly - if ( elem.parentNode ) { - elem.parentNode.selectedIndex; - } - - return elem.selected === true; - }, - - // Contents - "empty": function( elem ) { - // http://www.w3.org/TR/selectors/#empty-pseudo - // :empty is negated by element (1) or content nodes (text: 3; cdata: 4; entity ref: 5), - // but not by others (comment: 8; processing instruction: 7; etc.) - // nodeType < 6 works because attributes (2) do not appear as children - for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) { - if ( elem.nodeType < 6 ) { - return false; - } - } - return true; - }, - - "parent": function( elem ) { - return !Expr.pseudos["empty"]( elem ); - }, - - // Element/input types - "header": function( elem ) { - return rheader.test( elem.nodeName ); - }, - - "input": function( elem ) { - return rinputs.test( elem.nodeName ); - }, - - "button": function( elem ) { - var name = elem.nodeName.toLowerCase(); - return name === "input" && elem.type === "button" || name === "button"; - }, - - "text": function( elem ) { - var attr; - return elem.nodeName.toLowerCase() === "input" && - elem.type === "text" && - - // Support: IE<8 - // New HTML5 attribute values (e.g., "search") appear with elem.type === "text" - ( (attr = elem.getAttribute("type")) == null || attr.toLowerCase() === "text" ); - }, - - // Position-in-collection - "first": createPositionalPseudo(function() { - return [ 0 ]; - }), - - "last": createPositionalPseudo(function( matchIndexes, length ) { - return [ length - 1 ]; - }), - - "eq": createPositionalPseudo(function( matchIndexes, length, argument ) { - return [ argument < 0 ? argument + length : argument ]; - }), - - "even": createPositionalPseudo(function( matchIndexes, length ) { - var i = 0; - for ( ; i < length; i += 2 ) { - matchIndexes.push( i ); - } - return matchIndexes; - }), - - "odd": createPositionalPseudo(function( matchIndexes, length ) { - var i = 1; - for ( ; i < length; i += 2 ) { - matchIndexes.push( i ); - } - return matchIndexes; - }), - - "lt": createPositionalPseudo(function( matchIndexes, length, argument ) { - var i = argument < 0 ? argument + length : argument; - for ( ; --i >= 0; ) { - matchIndexes.push( i ); - } - return matchIndexes; - }), - - "gt": createPositionalPseudo(function( matchIndexes, length, argument ) { - var i = argument < 0 ? argument + length : argument; - for ( ; ++i < length; ) { - matchIndexes.push( i ); - } - return matchIndexes; - }) - } -}; - -Expr.pseudos["nth"] = Expr.pseudos["eq"]; - -// Add button/input type pseudos -for ( i in { radio: true, checkbox: true, file: true, password: true, image: true } ) { - Expr.pseudos[ i ] = createInputPseudo( i ); -} -for ( i in { submit: true, reset: true } ) { - Expr.pseudos[ i ] = createButtonPseudo( i ); -} - -// Easy API for creating new setFilters -function setFilters() {} -setFilters.prototype = Expr.filters = Expr.pseudos; -Expr.setFilters = new setFilters(); - -tokenize = Sizzle.tokenize = function( selector, parseOnly ) { - var matched, match, tokens, type, - soFar, groups, preFilters, - cached = tokenCache[ selector + " " ]; - - if ( cached ) { - return parseOnly ? 0 : cached.slice( 0 ); - } - - soFar = selector; - groups = []; - preFilters = Expr.preFilter; - - while ( soFar ) { - - // Comma and first run - if ( !matched || (match = rcomma.exec( soFar )) ) { - if ( match ) { - // Don't consume trailing commas as valid - soFar = soFar.slice( match[0].length ) || soFar; - } - groups.push( (tokens = []) ); - } - - matched = false; - - // Combinators - if ( (match = rcombinators.exec( soFar )) ) { - matched = match.shift(); - tokens.push({ - value: matched, - // Cast descendant combinators to space - type: match[0].replace( rtrim, " " ) - }); - soFar = soFar.slice( matched.length ); - } - - // Filters - for ( type in Expr.filter ) { - if ( (match = matchExpr[ type ].exec( soFar )) && (!preFilters[ type ] || - (match = preFilters[ type ]( match ))) ) { - matched = match.shift(); - tokens.push({ - value: matched, - type: type, - matches: match - }); - soFar = soFar.slice( matched.length ); - } - } - - if ( !matched ) { - break; - } - } - - // Return the length of the invalid excess - // if we're just parsing - // Otherwise, throw an error or return tokens - return parseOnly ? - soFar.length : - soFar ? - Sizzle.error( selector ) : - // Cache the tokens - tokenCache( selector, groups ).slice( 0 ); -}; - -function toSelector( tokens ) { - var i = 0, - len = tokens.length, - selector = ""; - for ( ; i < len; i++ ) { - selector += tokens[i].value; - } - return selector; -} - -function addCombinator( matcher, combinator, base ) { - var dir = combinator.dir, - skip = combinator.next, - key = skip || dir, - checkNonElements = base && key === "parentNode", - doneName = done++; - - return combinator.first ? - // Check against closest ancestor/preceding element - function( elem, context, xml ) { - while ( (elem = elem[ dir ]) ) { - if ( elem.nodeType === 1 || checkNonElements ) { - return matcher( elem, context, xml ); - } - } - return false; - } : - - // Check against all ancestor/preceding elements - function( elem, context, xml ) { - var oldCache, uniqueCache, outerCache, - newCache = [ dirruns, doneName ]; - - // We can't set arbitrary data on XML nodes, so they don't benefit from combinator caching - if ( xml ) { - while ( (elem = elem[ dir ]) ) { - if ( elem.nodeType === 1 || checkNonElements ) { - if ( matcher( elem, context, xml ) ) { - return true; - } - } - } - } else { - while ( (elem = elem[ dir ]) ) { - if ( elem.nodeType === 1 || checkNonElements ) { - outerCache = elem[ expando ] || (elem[ expando ] = {}); - - // Support: IE <9 only - // Defend against cloned attroperties (jQuery gh-1709) - uniqueCache = outerCache[ elem.uniqueID ] || (outerCache[ elem.uniqueID ] = {}); - - if ( skip && skip === elem.nodeName.toLowerCase() ) { - elem = elem[ dir ] || elem; - } else if ( (oldCache = uniqueCache[ key ]) && - oldCache[ 0 ] === dirruns && oldCache[ 1 ] === doneName ) { - - // Assign to newCache so results back-propagate to previous elements - return (newCache[ 2 ] = oldCache[ 2 ]); - } else { - // Reuse newcache so results back-propagate to previous elements - uniqueCache[ key ] = newCache; - - // A match means we're done; a fail means we have to keep checking - if ( (newCache[ 2 ] = matcher( elem, context, xml )) ) { - return true; - } - } - } - } - } - return false; - }; -} - -function elementMatcher( matchers ) { - return matchers.length > 1 ? - function( elem, context, xml ) { - var i = matchers.length; - while ( i-- ) { - if ( !matchers[i]( elem, context, xml ) ) { - return false; - } - } - return true; - } : - matchers[0]; -} - -function multipleContexts( selector, contexts, results ) { - var i = 0, - len = contexts.length; - for ( ; i < len; i++ ) { - Sizzle( selector, contexts[i], results ); - } - return results; -} - -function condense( unmatched, map, filter, context, xml ) { - var elem, - newUnmatched = [], - i = 0, - len = unmatched.length, - mapped = map != null; - - for ( ; i < len; i++ ) { - if ( (elem = unmatched[i]) ) { - if ( !filter || filter( elem, context, xml ) ) { - newUnmatched.push( elem ); - if ( mapped ) { - map.push( i ); - } - } - } - } - - return newUnmatched; -} - -function setMatcher( preFilter, selector, matcher, postFilter, postFinder, postSelector ) { - if ( postFilter && !postFilter[ expando ] ) { - postFilter = setMatcher( postFilter ); - } - if ( postFinder && !postFinder[ expando ] ) { - postFinder = setMatcher( postFinder, postSelector ); - } - return markFunction(function( seed, results, context, xml ) { - var temp, i, elem, - preMap = [], - postMap = [], - preexisting = results.length, - - // Get initial elements from seed or context - elems = seed || multipleContexts( selector || "*", context.nodeType ? [ context ] : context, [] ), - - // Prefilter to get matcher input, preserving a map for seed-results synchronization - matcherIn = preFilter && ( seed || !selector ) ? - condense( elems, preMap, preFilter, context, xml ) : - elems, - - matcherOut = matcher ? - // If we have a postFinder, or filtered seed, or non-seed postFilter or preexisting results, - postFinder || ( seed ? preFilter : preexisting || postFilter ) ? - - // ...intermediate processing is necessary - [] : - - // ...otherwise use results directly - results : - matcherIn; - - // Find primary matches - if ( matcher ) { - matcher( matcherIn, matcherOut, context, xml ); - } - - // Apply postFilter - if ( postFilter ) { - temp = condense( matcherOut, postMap ); - postFilter( temp, [], context, xml ); - - // Un-match failing elements by moving them back to matcherIn - i = temp.length; - while ( i-- ) { - if ( (elem = temp[i]) ) { - matcherOut[ postMap[i] ] = !(matcherIn[ postMap[i] ] = elem); - } - } - } - - if ( seed ) { - if ( postFinder || preFilter ) { - if ( postFinder ) { - // Get the final matcherOut by condensing this intermediate into postFinder contexts - temp = []; - i = matcherOut.length; - while ( i-- ) { - if ( (elem = matcherOut[i]) ) { - // Restore matcherIn since elem is not yet a final match - temp.push( (matcherIn[i] = elem) ); - } - } - postFinder( null, (matcherOut = []), temp, xml ); - } - - // Move matched elements from seed to results to keep them synchronized - i = matcherOut.length; - while ( i-- ) { - if ( (elem = matcherOut[i]) && - (temp = postFinder ? indexOf( seed, elem ) : preMap[i]) > -1 ) { - - seed[temp] = !(results[temp] = elem); - } - } - } - - // Add elements to results, through postFinder if defined - } else { - matcherOut = condense( - matcherOut === results ? - matcherOut.splice( preexisting, matcherOut.length ) : - matcherOut - ); - if ( postFinder ) { - postFinder( null, results, matcherOut, xml ); - } else { - push.apply( results, matcherOut ); - } - } - }); -} - -function matcherFromTokens( tokens ) { - var checkContext, matcher, j, - len = tokens.length, - leadingRelative = Expr.relative[ tokens[0].type ], - implicitRelative = leadingRelative || Expr.relative[" "], - i = leadingRelative ? 1 : 0, - - // The foundational matcher ensures that elements are reachable from top-level context(s) - matchContext = addCombinator( function( elem ) { - return elem === checkContext; - }, implicitRelative, true ), - matchAnyContext = addCombinator( function( elem ) { - return indexOf( checkContext, elem ) > -1; - }, implicitRelative, true ), - matchers = [ function( elem, context, xml ) { - var ret = ( !leadingRelative && ( xml || context !== outermostContext ) ) || ( - (checkContext = context).nodeType ? - matchContext( elem, context, xml ) : - matchAnyContext( elem, context, xml ) ); - // Avoid hanging onto element (issue #299) - checkContext = null; - return ret; - } ]; - - for ( ; i < len; i++ ) { - if ( (matcher = Expr.relative[ tokens[i].type ]) ) { - matchers = [ addCombinator(elementMatcher( matchers ), matcher) ]; - } else { - matcher = Expr.filter[ tokens[i].type ].apply( null, tokens[i].matches ); - - // Return special upon seeing a positional matcher - if ( matcher[ expando ] ) { - // Find the next relative operator (if any) for proper handling - j = ++i; - for ( ; j < len; j++ ) { - if ( Expr.relative[ tokens[j].type ] ) { - break; - } - } - return setMatcher( - i > 1 && elementMatcher( matchers ), - i > 1 && toSelector( - // If the preceding token was a descendant combinator, insert an implicit any-element `*` - tokens.slice( 0, i - 1 ).concat({ value: tokens[ i - 2 ].type === " " ? "*" : "" }) - ).replace( rtrim, "$1" ), - matcher, - i < j && matcherFromTokens( tokens.slice( i, j ) ), - j < len && matcherFromTokens( (tokens = tokens.slice( j )) ), - j < len && toSelector( tokens ) - ); - } - matchers.push( matcher ); - } - } - - return elementMatcher( matchers ); -} - -function matcherFromGroupMatchers( elementMatchers, setMatchers ) { - var bySet = setMatchers.length > 0, - byElement = elementMatchers.length > 0, - superMatcher = function( seed, context, xml, results, outermost ) { - var elem, j, matcher, - matchedCount = 0, - i = "0", - unmatched = seed && [], - setMatched = [], - contextBackup = outermostContext, - // We must always have either seed elements or outermost context - elems = seed || byElement && Expr.find["TAG"]( "*", outermost ), - // Use integer dirruns iff this is the outermost matcher - dirrunsUnique = (dirruns += contextBackup == null ? 1 : Math.random() || 0.1), - len = elems.length; - - if ( outermost ) { - outermostContext = context === document || context || outermost; - } - - // Add elements passing elementMatchers directly to results - // Support: IE<9, Safari - // Tolerate NodeList properties (IE: "length"; Safari: ) matching elements by id - for ( ; i !== len && (elem = elems[i]) != null; i++ ) { - if ( byElement && elem ) { - j = 0; - if ( !context && elem.ownerDocument !== document ) { - setDocument( elem ); - xml = !documentIsHTML; - } - while ( (matcher = elementMatchers[j++]) ) { - if ( matcher( elem, context || document, xml) ) { - results.push( elem ); - break; - } - } - if ( outermost ) { - dirruns = dirrunsUnique; - } - } - - // Track unmatched elements for set filters - if ( bySet ) { - // They will have gone through all possible matchers - if ( (elem = !matcher && elem) ) { - matchedCount--; - } - - // Lengthen the array for every element, matched or not - if ( seed ) { - unmatched.push( elem ); - } - } - } - - // `i` is now the count of elements visited above, and adding it to `matchedCount` - // makes the latter nonnegative. - matchedCount += i; - - // Apply set filters to unmatched elements - // NOTE: This can be skipped if there are no unmatched elements (i.e., `matchedCount` - // equals `i`), unless we didn't visit _any_ elements in the above loop because we have - // no element matchers and no seed. - // Incrementing an initially-string "0" `i` allows `i` to remain a string only in that - // case, which will result in a "00" `matchedCount` that differs from `i` but is also - // numerically zero. - if ( bySet && i !== matchedCount ) { - j = 0; - while ( (matcher = setMatchers[j++]) ) { - matcher( unmatched, setMatched, context, xml ); - } - - if ( seed ) { - // Reintegrate element matches to eliminate the need for sorting - if ( matchedCount > 0 ) { - while ( i-- ) { - if ( !(unmatched[i] || setMatched[i]) ) { - setMatched[i] = pop.call( results ); - } - } - } - - // Discard index placeholder values to get only actual matches - setMatched = condense( setMatched ); - } - - // Add matches to results - push.apply( results, setMatched ); - - // Seedless set matches succeeding multiple successful matchers stipulate sorting - if ( outermost && !seed && setMatched.length > 0 && - ( matchedCount + setMatchers.length ) > 1 ) { - - Sizzle.uniqueSort( results ); - } - } - - // Override manipulation of globals by nested matchers - if ( outermost ) { - dirruns = dirrunsUnique; - outermostContext = contextBackup; - } - - return unmatched; - }; - - return bySet ? - markFunction( superMatcher ) : - superMatcher; -} - -compile = Sizzle.compile = function( selector, match /* Internal Use Only */ ) { - var i, - setMatchers = [], - elementMatchers = [], - cached = compilerCache[ selector + " " ]; - - if ( !cached ) { - // Generate a function of recursive functions that can be used to check each element - if ( !match ) { - match = tokenize( selector ); - } - i = match.length; - while ( i-- ) { - cached = matcherFromTokens( match[i] ); - if ( cached[ expando ] ) { - setMatchers.push( cached ); - } else { - elementMatchers.push( cached ); - } - } - - // Cache the compiled function - cached = compilerCache( selector, matcherFromGroupMatchers( elementMatchers, setMatchers ) ); - - // Save selector and tokenization - cached.selector = selector; - } - return cached; -}; - -/** - * A low-level selection function that works with Sizzle's compiled - * selector functions - * @param {String|Function} selector A selector or a pre-compiled - * selector function built with Sizzle.compile - * @param {Element} context - * @param {Array} [results] - * @param {Array} [seed] A set of elements to match against - */ -select = Sizzle.select = function( selector, context, results, seed ) { - var i, tokens, token, type, find, - compiled = typeof selector === "function" && selector, - match = !seed && tokenize( (selector = compiled.selector || selector) ); - - results = results || []; - - // Try to minimize operations if there is only one selector in the list and no seed - // (the latter of which guarantees us context) - if ( match.length === 1 ) { - - // Reduce context if the leading compound selector is an ID - tokens = match[0] = match[0].slice( 0 ); - if ( tokens.length > 2 && (token = tokens[0]).type === "ID" && - context.nodeType === 9 && documentIsHTML && Expr.relative[ tokens[1].type ] ) { - - context = ( Expr.find["ID"]( token.matches[0].replace(runescape, funescape), context ) || [] )[0]; - if ( !context ) { - return results; - - // Precompiled matchers will still verify ancestry, so step up a level - } else if ( compiled ) { - context = context.parentNode; - } - - selector = selector.slice( tokens.shift().value.length ); - } - - // Fetch a seed set for right-to-left matching - i = matchExpr["needsContext"].test( selector ) ? 0 : tokens.length; - while ( i-- ) { - token = tokens[i]; - - // Abort if we hit a combinator - if ( Expr.relative[ (type = token.type) ] ) { - break; - } - if ( (find = Expr.find[ type ]) ) { - // Search, expanding context for leading sibling combinators - if ( (seed = find( - token.matches[0].replace( runescape, funescape ), - rsibling.test( tokens[0].type ) && testContext( context.parentNode ) || context - )) ) { - - // If seed is empty or no tokens remain, we can return early - tokens.splice( i, 1 ); - selector = seed.length && toSelector( tokens ); - if ( !selector ) { - push.apply( results, seed ); - return results; - } - - break; - } - } - } - } - - // Compile and execute a filtering function if one is not provided - // Provide `match` to avoid retokenization if we modified the selector above - ( compiled || compile( selector, match ) )( - seed, - context, - !documentIsHTML, - results, - !context || rsibling.test( selector ) && testContext( context.parentNode ) || context - ); - return results; -}; - -// One-time assignments - -// Sort stability -support.sortStable = expando.split("").sort( sortOrder ).join("") === expando; - -// Support: Chrome 14-35+ -// Always assume duplicates if they aren't passed to the comparison function -support.detectDuplicates = !!hasDuplicate; - -// Initialize against the default document -setDocument(); - -// Support: Webkit<537.32 - Safari 6.0.3/Chrome 25 (fixed in Chrome 27) -// Detached nodes confoundingly follow *each other* -support.sortDetached = assert(function( el ) { - // Should return 1, but returns 4 (following) - return el.compareDocumentPosition( document.createElement("fieldset") ) & 1; -}); - -// Support: IE<8 -// Prevent attribute/property "interpolation" -// https://msdn.microsoft.com/en-us/library/ms536429%28VS.85%29.aspx -if ( !assert(function( el ) { - el.innerHTML = ""; - return el.firstChild.getAttribute("href") === "#" ; -}) ) { - addHandle( "type|href|height|width", function( elem, name, isXML ) { - if ( !isXML ) { - return elem.getAttribute( name, name.toLowerCase() === "type" ? 1 : 2 ); - } - }); -} - -// Support: IE<9 -// Use defaultValue in place of getAttribute("value") -if ( !support.attributes || !assert(function( el ) { - el.innerHTML = ""; - el.firstChild.setAttribute( "value", "" ); - return el.firstChild.getAttribute( "value" ) === ""; -}) ) { - addHandle( "value", function( elem, name, isXML ) { - if ( !isXML && elem.nodeName.toLowerCase() === "input" ) { - return elem.defaultValue; - } - }); -} - -// Support: IE<9 -// Use getAttributeNode to fetch booleans when getAttribute lies -if ( !assert(function( el ) { - return el.getAttribute("disabled") == null; -}) ) { - addHandle( booleans, function( elem, name, isXML ) { - var val; - if ( !isXML ) { - return elem[ name ] === true ? name.toLowerCase() : - (val = elem.getAttributeNode( name )) && val.specified ? - val.value : - null; - } - }); -} - -return Sizzle; - -})( window ); - - - -jQuery.find = Sizzle; -jQuery.expr = Sizzle.selectors; - -// Deprecated -jQuery.expr[ ":" ] = jQuery.expr.pseudos; -jQuery.uniqueSort = jQuery.unique = Sizzle.uniqueSort; -jQuery.text = Sizzle.getText; -jQuery.isXMLDoc = Sizzle.isXML; -jQuery.contains = Sizzle.contains; -jQuery.escapeSelector = Sizzle.escape; - - - - -var dir = function( elem, dir, until ) { - var matched = [], - truncate = until !== undefined; - - while ( ( elem = elem[ dir ] ) && elem.nodeType !== 9 ) { - if ( elem.nodeType === 1 ) { - if ( truncate && jQuery( elem ).is( until ) ) { - break; - } - matched.push( elem ); - } - } - return matched; -}; - - -var siblings = function( n, elem ) { - var matched = []; - - for ( ; n; n = n.nextSibling ) { - if ( n.nodeType === 1 && n !== elem ) { - matched.push( n ); - } - } - - return matched; -}; - - -var rneedsContext = jQuery.expr.match.needsContext; - - - -function nodeName( elem, name ) { - - return elem.nodeName && elem.nodeName.toLowerCase() === name.toLowerCase(); - -}; -var rsingleTag = ( /^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i ); - - - -var risSimple = /^.[^:#\[\.,]*$/; - -// Implement the identical functionality for filter and not -function winnow( elements, qualifier, not ) { - if ( jQuery.isFunction( qualifier ) ) { - return jQuery.grep( elements, function( elem, i ) { - return !!qualifier.call( elem, i, elem ) !== not; - } ); - } - - // Single element - if ( qualifier.nodeType ) { - return jQuery.grep( elements, function( elem ) { - return ( elem === qualifier ) !== not; - } ); - } - - // Arraylike of elements (jQuery, arguments, Array) - if ( typeof qualifier !== "string" ) { - return jQuery.grep( elements, function( elem ) { - return ( indexOf.call( qualifier, elem ) > -1 ) !== not; - } ); - } - - // Simple selector that can be filtered directly, removing non-Elements - if ( risSimple.test( qualifier ) ) { - return jQuery.filter( qualifier, elements, not ); - } - - // Complex selector, compare the two sets, removing non-Elements - qualifier = jQuery.filter( qualifier, elements ); - return jQuery.grep( elements, function( elem ) { - return ( indexOf.call( qualifier, elem ) > -1 ) !== not && elem.nodeType === 1; - } ); -} - -jQuery.filter = function( expr, elems, not ) { - var elem = elems[ 0 ]; - - if ( not ) { - expr = ":not(" + expr + ")"; - } - - if ( elems.length === 1 && elem.nodeType === 1 ) { - return jQuery.find.matchesSelector( elem, expr ) ? [ elem ] : []; - } - - return jQuery.find.matches( expr, jQuery.grep( elems, function( elem ) { - return elem.nodeType === 1; - } ) ); -}; - -jQuery.fn.extend( { - find: function( selector ) { - var i, ret, - len = this.length, - self = this; - - if ( typeof selector !== "string" ) { - return this.pushStack( jQuery( selector ).filter( function() { - for ( i = 0; i < len; i++ ) { - if ( jQuery.contains( self[ i ], this ) ) { - return true; - } - } - } ) ); - } - - ret = this.pushStack( [] ); - - for ( i = 0; i < len; i++ ) { - jQuery.find( selector, self[ i ], ret ); - } - - return len > 1 ? jQuery.uniqueSort( ret ) : ret; - }, - filter: function( selector ) { - return this.pushStack( winnow( this, selector || [], false ) ); - }, - not: function( selector ) { - return this.pushStack( winnow( this, selector || [], true ) ); - }, - is: function( selector ) { - return !!winnow( - this, - - // If this is a positional/relative selector, check membership in the returned set - // so $("p:first").is("p:last") won't return true for a doc with two "p". - typeof selector === "string" && rneedsContext.test( selector ) ? - jQuery( selector ) : - selector || [], - false - ).length; - } -} ); - - -// Initialize a jQuery object - - -// A central reference to the root jQuery(document) -var rootjQuery, - - // A simple way to check for HTML strings - // Prioritize #id over to avoid XSS via location.hash (#9521) - // Strict HTML recognition (#11290: must start with <) - // Shortcut simple #id case for speed - rquickExpr = /^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/, - - init = jQuery.fn.init = function( selector, context, root ) { - var match, elem; - - // HANDLE: $(""), $(null), $(undefined), $(false) - if ( !selector ) { - return this; - } - - // Method init() accepts an alternate rootjQuery - // so migrate can support jQuery.sub (gh-2101) - root = root || rootjQuery; - - // Handle HTML strings - if ( typeof selector === "string" ) { - if ( selector[ 0 ] === "<" && - selector[ selector.length - 1 ] === ">" && - selector.length >= 3 ) { - - // Assume that strings that start and end with <> are HTML and skip the regex check - match = [ null, selector, null ]; - - } else { - match = rquickExpr.exec( selector ); - } - - // Match html or make sure no context is specified for #id - if ( match && ( match[ 1 ] || !context ) ) { - - // HANDLE: $(html) -> $(array) - if ( match[ 1 ] ) { - context = context instanceof jQuery ? context[ 0 ] : context; - - // Option to run scripts is true for back-compat - // Intentionally let the error be thrown if parseHTML is not present - jQuery.merge( this, jQuery.parseHTML( - match[ 1 ], - context && context.nodeType ? context.ownerDocument || context : document, - true - ) ); - - // HANDLE: $(html, props) - if ( rsingleTag.test( match[ 1 ] ) && jQuery.isPlainObject( context ) ) { - for ( match in context ) { - - // Properties of context are called as methods if possible - if ( jQuery.isFunction( this[ match ] ) ) { - this[ match ]( context[ match ] ); - - // ...and otherwise set as attributes - } else { - this.attr( match, context[ match ] ); - } - } - } - - return this; - - // HANDLE: $(#id) - } else { - elem = document.getElementById( match[ 2 ] ); - - if ( elem ) { - - // Inject the element directly into the jQuery object - this[ 0 ] = elem; - this.length = 1; - } - return this; - } - - // HANDLE: $(expr, $(...)) - } else if ( !context || context.jquery ) { - return ( context || root ).find( selector ); - - // HANDLE: $(expr, context) - // (which is just equivalent to: $(context).find(expr) - } else { - return this.constructor( context ).find( selector ); - } - - // HANDLE: $(DOMElement) - } else if ( selector.nodeType ) { - this[ 0 ] = selector; - this.length = 1; - return this; - - // HANDLE: $(function) - // Shortcut for document ready - } else if ( jQuery.isFunction( selector ) ) { - return root.ready !== undefined ? - root.ready( selector ) : - - // Execute immediately if ready is not present - selector( jQuery ); - } - - return jQuery.makeArray( selector, this ); - }; - -// Give the init function the jQuery prototype for later instantiation -init.prototype = jQuery.fn; - -// Initialize central reference -rootjQuery = jQuery( document ); - - -var rparentsprev = /^(?:parents|prev(?:Until|All))/, - - // Methods guaranteed to produce a unique set when starting from a unique set - guaranteedUnique = { - children: true, - contents: true, - next: true, - prev: true - }; - -jQuery.fn.extend( { - has: function( target ) { - var targets = jQuery( target, this ), - l = targets.length; - - return this.filter( function() { - var i = 0; - for ( ; i < l; i++ ) { - if ( jQuery.contains( this, targets[ i ] ) ) { - return true; - } - } - } ); - }, - - closest: function( selectors, context ) { - var cur, - i = 0, - l = this.length, - matched = [], - targets = typeof selectors !== "string" && jQuery( selectors ); - - // Positional selectors never match, since there's no _selection_ context - if ( !rneedsContext.test( selectors ) ) { - for ( ; i < l; i++ ) { - for ( cur = this[ i ]; cur && cur !== context; cur = cur.parentNode ) { - - // Always skip document fragments - if ( cur.nodeType < 11 && ( targets ? - targets.index( cur ) > -1 : - - // Don't pass non-elements to Sizzle - cur.nodeType === 1 && - jQuery.find.matchesSelector( cur, selectors ) ) ) { - - matched.push( cur ); - break; - } - } - } - } - - return this.pushStack( matched.length > 1 ? jQuery.uniqueSort( matched ) : matched ); - }, - - // Determine the position of an element within the set - index: function( elem ) { - - // No argument, return index in parent - if ( !elem ) { - return ( this[ 0 ] && this[ 0 ].parentNode ) ? this.first().prevAll().length : -1; - } - - // Index in selector - if ( typeof elem === "string" ) { - return indexOf.call( jQuery( elem ), this[ 0 ] ); - } - - // Locate the position of the desired element - return indexOf.call( this, - - // If it receives a jQuery object, the first element is used - elem.jquery ? elem[ 0 ] : elem - ); - }, - - add: function( selector, context ) { - return this.pushStack( - jQuery.uniqueSort( - jQuery.merge( this.get(), jQuery( selector, context ) ) - ) - ); - }, - - addBack: function( selector ) { - return this.add( selector == null ? - this.prevObject : this.prevObject.filter( selector ) - ); - } -} ); - -function sibling( cur, dir ) { - while ( ( cur = cur[ dir ] ) && cur.nodeType !== 1 ) {} - return cur; -} - -jQuery.each( { - parent: function( elem ) { - var parent = elem.parentNode; - return parent && parent.nodeType !== 11 ? parent : null; - }, - parents: function( elem ) { - return dir( elem, "parentNode" ); - }, - parentsUntil: function( elem, i, until ) { - return dir( elem, "parentNode", until ); - }, - next: function( elem ) { - return sibling( elem, "nextSibling" ); - }, - prev: function( elem ) { - return sibling( elem, "previousSibling" ); - }, - nextAll: function( elem ) { - return dir( elem, "nextSibling" ); - }, - prevAll: function( elem ) { - return dir( elem, "previousSibling" ); - }, - nextUntil: function( elem, i, until ) { - return dir( elem, "nextSibling", until ); - }, - prevUntil: function( elem, i, until ) { - return dir( elem, "previousSibling", until ); - }, - siblings: function( elem ) { - return siblings( ( elem.parentNode || {} ).firstChild, elem ); - }, - children: function( elem ) { - return siblings( elem.firstChild ); - }, - contents: function( elem ) { - if ( nodeName( elem, "iframe" ) ) { - return elem.contentDocument; - } - - // Support: IE 9 - 11 only, iOS 7 only, Android Browser <=4.3 only - // Treat the template element as a regular one in browsers that - // don't support it. - if ( nodeName( elem, "template" ) ) { - elem = elem.content || elem; - } - - return jQuery.merge( [], elem.childNodes ); - } -}, function( name, fn ) { - jQuery.fn[ name ] = function( until, selector ) { - var matched = jQuery.map( this, fn, until ); - - if ( name.slice( -5 ) !== "Until" ) { - selector = until; - } - - if ( selector && typeof selector === "string" ) { - matched = jQuery.filter( selector, matched ); - } - - if ( this.length > 1 ) { - - // Remove duplicates - if ( !guaranteedUnique[ name ] ) { - jQuery.uniqueSort( matched ); - } - - // Reverse order for parents* and prev-derivatives - if ( rparentsprev.test( name ) ) { - matched.reverse(); - } - } - - return this.pushStack( matched ); - }; -} ); -var rnothtmlwhite = ( /[^\x20\t\r\n\f]+/g ); - - - -// Convert String-formatted options into Object-formatted ones -function createOptions( options ) { - var object = {}; - jQuery.each( options.match( rnothtmlwhite ) || [], function( _, flag ) { - object[ flag ] = true; - } ); - return object; -} - -/* - * Create a callback list using the following parameters: - * - * options: an optional list of space-separated options that will change how - * the callback list behaves or a more traditional option object - * - * By default a callback list will act like an event callback list and can be - * "fired" multiple times. - * - * Possible options: - * - * once: will ensure the callback list can only be fired once (like a Deferred) - * - * memory: will keep track of previous values and will call any callback added - * after the list has been fired right away with the latest "memorized" - * values (like a Deferred) - * - * unique: will ensure a callback can only be added once (no duplicate in the list) - * - * stopOnFalse: interrupt callings when a callback returns false - * - */ -jQuery.Callbacks = function( options ) { - - // Convert options from String-formatted to Object-formatted if needed - // (we check in cache first) - options = typeof options === "string" ? - createOptions( options ) : - jQuery.extend( {}, options ); - - var // Flag to know if list is currently firing - firing, - - // Last fire value for non-forgettable lists - memory, - - // Flag to know if list was already fired - fired, - - // Flag to prevent firing - locked, - - // Actual callback list - list = [], - - // Queue of execution data for repeatable lists - queue = [], - - // Index of currently firing callback (modified by add/remove as needed) - firingIndex = -1, - - // Fire callbacks - fire = function() { - - // Enforce single-firing - locked = locked || options.once; - - // Execute callbacks for all pending executions, - // respecting firingIndex overrides and runtime changes - fired = firing = true; - for ( ; queue.length; firingIndex = -1 ) { - memory = queue.shift(); - while ( ++firingIndex < list.length ) { - - // Run callback and check for early termination - if ( list[ firingIndex ].apply( memory[ 0 ], memory[ 1 ] ) === false && - options.stopOnFalse ) { - - // Jump to end and forget the data so .add doesn't re-fire - firingIndex = list.length; - memory = false; - } - } - } - - // Forget the data if we're done with it - if ( !options.memory ) { - memory = false; - } - - firing = false; - - // Clean up if we're done firing for good - if ( locked ) { - - // Keep an empty list if we have data for future add calls - if ( memory ) { - list = []; - - // Otherwise, this object is spent - } else { - list = ""; - } - } - }, - - // Actual Callbacks object - self = { - - // Add a callback or a collection of callbacks to the list - add: function() { - if ( list ) { - - // If we have memory from a past run, we should fire after adding - if ( memory && !firing ) { - firingIndex = list.length - 1; - queue.push( memory ); - } - - ( function add( args ) { - jQuery.each( args, function( _, arg ) { - if ( jQuery.isFunction( arg ) ) { - if ( !options.unique || !self.has( arg ) ) { - list.push( arg ); - } - } else if ( arg && arg.length && jQuery.type( arg ) !== "string" ) { - - // Inspect recursively - add( arg ); - } - } ); - } )( arguments ); - - if ( memory && !firing ) { - fire(); - } - } - return this; - }, - - // Remove a callback from the list - remove: function() { - jQuery.each( arguments, function( _, arg ) { - var index; - while ( ( index = jQuery.inArray( arg, list, index ) ) > -1 ) { - list.splice( index, 1 ); - - // Handle firing indexes - if ( index <= firingIndex ) { - firingIndex--; - } - } - } ); - return this; - }, - - // Check if a given callback is in the list. - // If no argument is given, return whether or not list has callbacks attached. - has: function( fn ) { - return fn ? - jQuery.inArray( fn, list ) > -1 : - list.length > 0; - }, - - // Remove all callbacks from the list - empty: function() { - if ( list ) { - list = []; - } - return this; - }, - - // Disable .fire and .add - // Abort any current/pending executions - // Clear all callbacks and values - disable: function() { - locked = queue = []; - list = memory = ""; - return this; - }, - disabled: function() { - return !list; - }, - - // Disable .fire - // Also disable .add unless we have memory (since it would have no effect) - // Abort any pending executions - lock: function() { - locked = queue = []; - if ( !memory && !firing ) { - list = memory = ""; - } - return this; - }, - locked: function() { - return !!locked; - }, - - // Call all callbacks with the given context and arguments - fireWith: function( context, args ) { - if ( !locked ) { - args = args || []; - args = [ context, args.slice ? args.slice() : args ]; - queue.push( args ); - if ( !firing ) { - fire(); - } - } - return this; - }, - - // Call all the callbacks with the given arguments - fire: function() { - self.fireWith( this, arguments ); - return this; - }, - - // To know if the callbacks have already been called at least once - fired: function() { - return !!fired; - } - }; - - return self; -}; - - -function Identity( v ) { - return v; -} -function Thrower( ex ) { - throw ex; -} - -function adoptValue( value, resolve, reject, noValue ) { - var method; - - try { - - // Check for promise aspect first to privilege synchronous behavior - if ( value && jQuery.isFunction( ( method = value.promise ) ) ) { - method.call( value ).done( resolve ).fail( reject ); - - // Other thenables - } else if ( value && jQuery.isFunction( ( method = value.then ) ) ) { - method.call( value, resolve, reject ); - - // Other non-thenables - } else { - - // Control `resolve` arguments by letting Array#slice cast boolean `noValue` to integer: - // * false: [ value ].slice( 0 ) => resolve( value ) - // * true: [ value ].slice( 1 ) => resolve() - resolve.apply( undefined, [ value ].slice( noValue ) ); - } - - // For Promises/A+, convert exceptions into rejections - // Since jQuery.when doesn't unwrap thenables, we can skip the extra checks appearing in - // Deferred#then to conditionally suppress rejection. - } catch ( value ) { - - // Support: Android 4.0 only - // Strict mode functions invoked without .call/.apply get global-object context - reject.apply( undefined, [ value ] ); - } -} - -jQuery.extend( { - - Deferred: function( func ) { - var tuples = [ - - // action, add listener, callbacks, - // ... .then handlers, argument index, [final state] - [ "notify", "progress", jQuery.Callbacks( "memory" ), - jQuery.Callbacks( "memory" ), 2 ], - [ "resolve", "done", jQuery.Callbacks( "once memory" ), - jQuery.Callbacks( "once memory" ), 0, "resolved" ], - [ "reject", "fail", jQuery.Callbacks( "once memory" ), - jQuery.Callbacks( "once memory" ), 1, "rejected" ] - ], - state = "pending", - promise = { - state: function() { - return state; - }, - always: function() { - deferred.done( arguments ).fail( arguments ); - return this; - }, - "catch": function( fn ) { - return promise.then( null, fn ); - }, - - // Keep pipe for back-compat - pipe: function( /* fnDone, fnFail, fnProgress */ ) { - var fns = arguments; - - return jQuery.Deferred( function( newDefer ) { - jQuery.each( tuples, function( i, tuple ) { - - // Map tuples (progress, done, fail) to arguments (done, fail, progress) - var fn = jQuery.isFunction( fns[ tuple[ 4 ] ] ) && fns[ tuple[ 4 ] ]; - - // deferred.progress(function() { bind to newDefer or newDefer.notify }) - // deferred.done(function() { bind to newDefer or newDefer.resolve }) - // deferred.fail(function() { bind to newDefer or newDefer.reject }) - deferred[ tuple[ 1 ] ]( function() { - var returned = fn && fn.apply( this, arguments ); - if ( returned && jQuery.isFunction( returned.promise ) ) { - returned.promise() - .progress( newDefer.notify ) - .done( newDefer.resolve ) - .fail( newDefer.reject ); - } else { - newDefer[ tuple[ 0 ] + "With" ]( - this, - fn ? [ returned ] : arguments - ); - } - } ); - } ); - fns = null; - } ).promise(); - }, - then: function( onFulfilled, onRejected, onProgress ) { - var maxDepth = 0; - function resolve( depth, deferred, handler, special ) { - return function() { - var that = this, - args = arguments, - mightThrow = function() { - var returned, then; - - // Support: Promises/A+ section 2.3.3.3.3 - // https://promisesaplus.com/#point-59 - // Ignore double-resolution attempts - if ( depth < maxDepth ) { - return; - } - - returned = handler.apply( that, args ); - - // Support: Promises/A+ section 2.3.1 - // https://promisesaplus.com/#point-48 - if ( returned === deferred.promise() ) { - throw new TypeError( "Thenable self-resolution" ); - } - - // Support: Promises/A+ sections 2.3.3.1, 3.5 - // https://promisesaplus.com/#point-54 - // https://promisesaplus.com/#point-75 - // Retrieve `then` only once - then = returned && - - // Support: Promises/A+ section 2.3.4 - // https://promisesaplus.com/#point-64 - // Only check objects and functions for thenability - ( typeof returned === "object" || - typeof returned === "function" ) && - returned.then; - - // Handle a returned thenable - if ( jQuery.isFunction( then ) ) { - - // Special processors (notify) just wait for resolution - if ( special ) { - then.call( - returned, - resolve( maxDepth, deferred, Identity, special ), - resolve( maxDepth, deferred, Thrower, special ) - ); - - // Normal processors (resolve) also hook into progress - } else { - - // ...and disregard older resolution values - maxDepth++; - - then.call( - returned, - resolve( maxDepth, deferred, Identity, special ), - resolve( maxDepth, deferred, Thrower, special ), - resolve( maxDepth, deferred, Identity, - deferred.notifyWith ) - ); - } - - // Handle all other returned values - } else { - - // Only substitute handlers pass on context - // and multiple values (non-spec behavior) - if ( handler !== Identity ) { - that = undefined; - args = [ returned ]; - } - - // Process the value(s) - // Default process is resolve - ( special || deferred.resolveWith )( that, args ); - } - }, - - // Only normal processors (resolve) catch and reject exceptions - process = special ? - mightThrow : - function() { - try { - mightThrow(); - } catch ( e ) { - - if ( jQuery.Deferred.exceptionHook ) { - jQuery.Deferred.exceptionHook( e, - process.stackTrace ); - } - - // Support: Promises/A+ section 2.3.3.3.4.1 - // https://promisesaplus.com/#point-61 - // Ignore post-resolution exceptions - if ( depth + 1 >= maxDepth ) { - - // Only substitute handlers pass on context - // and multiple values (non-spec behavior) - if ( handler !== Thrower ) { - that = undefined; - args = [ e ]; - } - - deferred.rejectWith( that, args ); - } - } - }; - - // Support: Promises/A+ section 2.3.3.3.1 - // https://promisesaplus.com/#point-57 - // Re-resolve promises immediately to dodge false rejection from - // subsequent errors - if ( depth ) { - process(); - } else { - - // Call an optional hook to record the stack, in case of exception - // since it's otherwise lost when execution goes async - if ( jQuery.Deferred.getStackHook ) { - process.stackTrace = jQuery.Deferred.getStackHook(); - } - window.setTimeout( process ); - } - }; - } - - return jQuery.Deferred( function( newDefer ) { - - // progress_handlers.add( ... ) - tuples[ 0 ][ 3 ].add( - resolve( - 0, - newDefer, - jQuery.isFunction( onProgress ) ? - onProgress : - Identity, - newDefer.notifyWith - ) - ); - - // fulfilled_handlers.add( ... ) - tuples[ 1 ][ 3 ].add( - resolve( - 0, - newDefer, - jQuery.isFunction( onFulfilled ) ? - onFulfilled : - Identity - ) - ); - - // rejected_handlers.add( ... ) - tuples[ 2 ][ 3 ].add( - resolve( - 0, - newDefer, - jQuery.isFunction( onRejected ) ? - onRejected : - Thrower - ) - ); - } ).promise(); - }, - - // Get a promise for this deferred - // If obj is provided, the promise aspect is added to the object - promise: function( obj ) { - return obj != null ? jQuery.extend( obj, promise ) : promise; - } - }, - deferred = {}; - - // Add list-specific methods - jQuery.each( tuples, function( i, tuple ) { - var list = tuple[ 2 ], - stateString = tuple[ 5 ]; - - // promise.progress = list.add - // promise.done = list.add - // promise.fail = list.add - promise[ tuple[ 1 ] ] = list.add; - - // Handle state - if ( stateString ) { - list.add( - function() { - - // state = "resolved" (i.e., fulfilled) - // state = "rejected" - state = stateString; - }, - - // rejected_callbacks.disable - // fulfilled_callbacks.disable - tuples[ 3 - i ][ 2 ].disable, - - // progress_callbacks.lock - tuples[ 0 ][ 2 ].lock - ); - } - - // progress_handlers.fire - // fulfilled_handlers.fire - // rejected_handlers.fire - list.add( tuple[ 3 ].fire ); - - // deferred.notify = function() { deferred.notifyWith(...) } - // deferred.resolve = function() { deferred.resolveWith(...) } - // deferred.reject = function() { deferred.rejectWith(...) } - deferred[ tuple[ 0 ] ] = function() { - deferred[ tuple[ 0 ] + "With" ]( this === deferred ? undefined : this, arguments ); - return this; - }; - - // deferred.notifyWith = list.fireWith - // deferred.resolveWith = list.fireWith - // deferred.rejectWith = list.fireWith - deferred[ tuple[ 0 ] + "With" ] = list.fireWith; - } ); - - // Make the deferred a promise - promise.promise( deferred ); - - // Call given func if any - if ( func ) { - func.call( deferred, deferred ); - } - - // All done! - return deferred; - }, - - // Deferred helper - when: function( singleValue ) { - var - - // count of uncompleted subordinates - remaining = arguments.length, - - // count of unprocessed arguments - i = remaining, - - // subordinate fulfillment data - resolveContexts = Array( i ), - resolveValues = slice.call( arguments ), - - // the master Deferred - master = jQuery.Deferred(), - - // subordinate callback factory - updateFunc = function( i ) { - return function( value ) { - resolveContexts[ i ] = this; - resolveValues[ i ] = arguments.length > 1 ? slice.call( arguments ) : value; - if ( !( --remaining ) ) { - master.resolveWith( resolveContexts, resolveValues ); - } - }; - }; - - // Single- and empty arguments are adopted like Promise.resolve - if ( remaining <= 1 ) { - adoptValue( singleValue, master.done( updateFunc( i ) ).resolve, master.reject, - !remaining ); - - // Use .then() to unwrap secondary thenables (cf. gh-3000) - if ( master.state() === "pending" || - jQuery.isFunction( resolveValues[ i ] && resolveValues[ i ].then ) ) { - - return master.then(); - } - } - - // Multiple arguments are aggregated like Promise.all array elements - while ( i-- ) { - adoptValue( resolveValues[ i ], updateFunc( i ), master.reject ); - } - - return master.promise(); - } -} ); - - -// These usually indicate a programmer mistake during development, -// warn about them ASAP rather than swallowing them by default. -var rerrorNames = /^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/; - -jQuery.Deferred.exceptionHook = function( error, stack ) { - - // Support: IE 8 - 9 only - // Console exists when dev tools are open, which can happen at any time - if ( window.console && window.console.warn && error && rerrorNames.test( error.name ) ) { - window.console.warn( "jQuery.Deferred exception: " + error.message, error.stack, stack ); - } -}; - - - - -jQuery.readyException = function( error ) { - window.setTimeout( function() { - throw error; - } ); -}; - - - - -// The deferred used on DOM ready -var readyList = jQuery.Deferred(); - -jQuery.fn.ready = function( fn ) { - - readyList - .then( fn ) - - // Wrap jQuery.readyException in a function so that the lookup - // happens at the time of error handling instead of callback - // registration. - .catch( function( error ) { - jQuery.readyException( error ); - } ); - - return this; -}; - -jQuery.extend( { - - // Is the DOM ready to be used? Set to true once it occurs. - isReady: false, - - // A counter to track how many items to wait for before - // the ready event fires. See #6781 - readyWait: 1, - - // Handle when the DOM is ready - ready: function( wait ) { - - // Abort if there are pending holds or we're already ready - if ( wait === true ? --jQuery.readyWait : jQuery.isReady ) { - return; - } - - // Remember that the DOM is ready - jQuery.isReady = true; - - // If a normal DOM Ready event fired, decrement, and wait if need be - if ( wait !== true && --jQuery.readyWait > 0 ) { - return; - } - - // If there are functions bound, to execute - readyList.resolveWith( document, [ jQuery ] ); - } -} ); - -jQuery.ready.then = readyList.then; - -// The ready event handler and self cleanup method -function completed() { - document.removeEventListener( "DOMContentLoaded", completed ); - window.removeEventListener( "load", completed ); - jQuery.ready(); -} - -// Catch cases where $(document).ready() is called -// after the browser event has already occurred. -// Support: IE <=9 - 10 only -// Older IE sometimes signals "interactive" too soon -if ( document.readyState === "complete" || - ( document.readyState !== "loading" && !document.documentElement.doScroll ) ) { - - // Handle it asynchronously to allow scripts the opportunity to delay ready - window.setTimeout( jQuery.ready ); - -} else { - - // Use the handy event callback - document.addEventListener( "DOMContentLoaded", completed ); - - // A fallback to window.onload, that will always work - window.addEventListener( "load", completed ); -} - - - - -// Multifunctional method to get and set values of a collection -// The value/s can optionally be executed if it's a function -var access = function( elems, fn, key, value, chainable, emptyGet, raw ) { - var i = 0, - len = elems.length, - bulk = key == null; - - // Sets many values - if ( jQuery.type( key ) === "object" ) { - chainable = true; - for ( i in key ) { - access( elems, fn, i, key[ i ], true, emptyGet, raw ); - } - - // Sets one value - } else if ( value !== undefined ) { - chainable = true; - - if ( !jQuery.isFunction( value ) ) { - raw = true; - } - - if ( bulk ) { - - // Bulk operations run against the entire set - if ( raw ) { - fn.call( elems, value ); - fn = null; - - // ...except when executing function values - } else { - bulk = fn; - fn = function( elem, key, value ) { - return bulk.call( jQuery( elem ), value ); - }; - } - } - - if ( fn ) { - for ( ; i < len; i++ ) { - fn( - elems[ i ], key, raw ? - value : - value.call( elems[ i ], i, fn( elems[ i ], key ) ) - ); - } - } - } - - if ( chainable ) { - return elems; - } - - // Gets - if ( bulk ) { - return fn.call( elems ); - } - - return len ? fn( elems[ 0 ], key ) : emptyGet; -}; -var acceptData = function( owner ) { - - // Accepts only: - // - Node - // - Node.ELEMENT_NODE - // - Node.DOCUMENT_NODE - // - Object - // - Any - return owner.nodeType === 1 || owner.nodeType === 9 || !( +owner.nodeType ); -}; - - - - -function Data() { - this.expando = jQuery.expando + Data.uid++; -} - -Data.uid = 1; - -Data.prototype = { - - cache: function( owner ) { - - // Check if the owner object already has a cache - var value = owner[ this.expando ]; - - // If not, create one - if ( !value ) { - value = {}; - - // We can accept data for non-element nodes in modern browsers, - // but we should not, see #8335. - // Always return an empty object. - if ( acceptData( owner ) ) { - - // If it is a node unlikely to be stringify-ed or looped over - // use plain assignment - if ( owner.nodeType ) { - owner[ this.expando ] = value; - - // Otherwise secure it in a non-enumerable property - // configurable must be true to allow the property to be - // deleted when data is removed - } else { - Object.defineProperty( owner, this.expando, { - value: value, - configurable: true - } ); - } - } - } - - return value; - }, - set: function( owner, data, value ) { - var prop, - cache = this.cache( owner ); - - // Handle: [ owner, key, value ] args - // Always use camelCase key (gh-2257) - if ( typeof data === "string" ) { - cache[ jQuery.camelCase( data ) ] = value; - - // Handle: [ owner, { properties } ] args - } else { - - // Copy the properties one-by-one to the cache object - for ( prop in data ) { - cache[ jQuery.camelCase( prop ) ] = data[ prop ]; - } - } - return cache; - }, - get: function( owner, key ) { - return key === undefined ? - this.cache( owner ) : - - // Always use camelCase key (gh-2257) - owner[ this.expando ] && owner[ this.expando ][ jQuery.camelCase( key ) ]; - }, - access: function( owner, key, value ) { - - // In cases where either: - // - // 1. No key was specified - // 2. A string key was specified, but no value provided - // - // Take the "read" path and allow the get method to determine - // which value to return, respectively either: - // - // 1. The entire cache object - // 2. The data stored at the key - // - if ( key === undefined || - ( ( key && typeof key === "string" ) && value === undefined ) ) { - - return this.get( owner, key ); - } - - // When the key is not a string, or both a key and value - // are specified, set or extend (existing objects) with either: - // - // 1. An object of properties - // 2. A key and value - // - this.set( owner, key, value ); - - // Since the "set" path can have two possible entry points - // return the expected data based on which path was taken[*] - return value !== undefined ? value : key; - }, - remove: function( owner, key ) { - var i, - cache = owner[ this.expando ]; - - if ( cache === undefined ) { - return; - } - - if ( key !== undefined ) { - - // Support array or space separated string of keys - if ( Array.isArray( key ) ) { - - // If key is an array of keys... - // We always set camelCase keys, so remove that. - key = key.map( jQuery.camelCase ); - } else { - key = jQuery.camelCase( key ); - - // If a key with the spaces exists, use it. - // Otherwise, create an array by matching non-whitespace - key = key in cache ? - [ key ] : - ( key.match( rnothtmlwhite ) || [] ); - } - - i = key.length; - - while ( i-- ) { - delete cache[ key[ i ] ]; - } - } - - // Remove the expando if there's no more data - if ( key === undefined || jQuery.isEmptyObject( cache ) ) { - - // Support: Chrome <=35 - 45 - // Webkit & Blink performance suffers when deleting properties - // from DOM nodes, so set to undefined instead - // https://bugs.chromium.org/p/chromium/issues/detail?id=378607 (bug restricted) - if ( owner.nodeType ) { - owner[ this.expando ] = undefined; - } else { - delete owner[ this.expando ]; - } - } - }, - hasData: function( owner ) { - var cache = owner[ this.expando ]; - return cache !== undefined && !jQuery.isEmptyObject( cache ); - } -}; -var dataPriv = new Data(); - -var dataUser = new Data(); - - - -// Implementation Summary -// -// 1. Enforce API surface and semantic compatibility with 1.9.x branch -// 2. Improve the module's maintainability by reducing the storage -// paths to a single mechanism. -// 3. Use the same single mechanism to support "private" and "user" data. -// 4. _Never_ expose "private" data to user code (TODO: Drop _data, _removeData) -// 5. Avoid exposing implementation details on user objects (eg. expando properties) -// 6. Provide a clear path for implementation upgrade to WeakMap in 2014 - -var rbrace = /^(?:\{[\w\W]*\}|\[[\w\W]*\])$/, - rmultiDash = /[A-Z]/g; - -function getData( data ) { - if ( data === "true" ) { - return true; - } - - if ( data === "false" ) { - return false; - } - - if ( data === "null" ) { - return null; - } - - // Only convert to a number if it doesn't change the string - if ( data === +data + "" ) { - return +data; - } - - if ( rbrace.test( data ) ) { - return JSON.parse( data ); - } - - return data; -} - -function dataAttr( elem, key, data ) { - var name; - - // If nothing was found internally, try to fetch any - // data from the HTML5 data-* attribute - if ( data === undefined && elem.nodeType === 1 ) { - name = "data-" + key.replace( rmultiDash, "-$&" ).toLowerCase(); - data = elem.getAttribute( name ); - - if ( typeof data === "string" ) { - try { - data = getData( data ); - } catch ( e ) {} - - // Make sure we set the data so it isn't changed later - dataUser.set( elem, key, data ); - } else { - data = undefined; - } - } - return data; -} - -jQuery.extend( { - hasData: function( elem ) { - return dataUser.hasData( elem ) || dataPriv.hasData( elem ); - }, - - data: function( elem, name, data ) { - return dataUser.access( elem, name, data ); - }, - - removeData: function( elem, name ) { - dataUser.remove( elem, name ); - }, - - // TODO: Now that all calls to _data and _removeData have been replaced - // with direct calls to dataPriv methods, these can be deprecated. - _data: function( elem, name, data ) { - return dataPriv.access( elem, name, data ); - }, - - _removeData: function( elem, name ) { - dataPriv.remove( elem, name ); - } -} ); - -jQuery.fn.extend( { - data: function( key, value ) { - var i, name, data, - elem = this[ 0 ], - attrs = elem && elem.attributes; - - // Gets all values - if ( key === undefined ) { - if ( this.length ) { - data = dataUser.get( elem ); - - if ( elem.nodeType === 1 && !dataPriv.get( elem, "hasDataAttrs" ) ) { - i = attrs.length; - while ( i-- ) { - - // Support: IE 11 only - // The attrs elements can be null (#14894) - if ( attrs[ i ] ) { - name = attrs[ i ].name; - if ( name.indexOf( "data-" ) === 0 ) { - name = jQuery.camelCase( name.slice( 5 ) ); - dataAttr( elem, name, data[ name ] ); - } - } - } - dataPriv.set( elem, "hasDataAttrs", true ); - } - } - - return data; - } - - // Sets multiple values - if ( typeof key === "object" ) { - return this.each( function() { - dataUser.set( this, key ); - } ); - } - - return access( this, function( value ) { - var data; - - // The calling jQuery object (element matches) is not empty - // (and therefore has an element appears at this[ 0 ]) and the - // `value` parameter was not undefined. An empty jQuery object - // will result in `undefined` for elem = this[ 0 ] which will - // throw an exception if an attempt to read a data cache is made. - if ( elem && value === undefined ) { - - // Attempt to get data from the cache - // The key will always be camelCased in Data - data = dataUser.get( elem, key ); - if ( data !== undefined ) { - return data; - } - - // Attempt to "discover" the data in - // HTML5 custom data-* attrs - data = dataAttr( elem, key ); - if ( data !== undefined ) { - return data; - } - - // We tried really hard, but the data doesn't exist. - return; - } - - // Set the data... - this.each( function() { - - // We always store the camelCased key - dataUser.set( this, key, value ); - } ); - }, null, value, arguments.length > 1, null, true ); - }, - - removeData: function( key ) { - return this.each( function() { - dataUser.remove( this, key ); - } ); - } -} ); - - -jQuery.extend( { - queue: function( elem, type, data ) { - var queue; - - if ( elem ) { - type = ( type || "fx" ) + "queue"; - queue = dataPriv.get( elem, type ); - - // Speed up dequeue by getting out quickly if this is just a lookup - if ( data ) { - if ( !queue || Array.isArray( data ) ) { - queue = dataPriv.access( elem, type, jQuery.makeArray( data ) ); - } else { - queue.push( data ); - } - } - return queue || []; - } - }, - - dequeue: function( elem, type ) { - type = type || "fx"; - - var queue = jQuery.queue( elem, type ), - startLength = queue.length, - fn = queue.shift(), - hooks = jQuery._queueHooks( elem, type ), - next = function() { - jQuery.dequeue( elem, type ); - }; - - // If the fx queue is dequeued, always remove the progress sentinel - if ( fn === "inprogress" ) { - fn = queue.shift(); - startLength--; - } - - if ( fn ) { - - // Add a progress sentinel to prevent the fx queue from being - // automatically dequeued - if ( type === "fx" ) { - queue.unshift( "inprogress" ); - } - - // Clear up the last queue stop function - delete hooks.stop; - fn.call( elem, next, hooks ); - } - - if ( !startLength && hooks ) { - hooks.empty.fire(); - } - }, - - // Not public - generate a queueHooks object, or return the current one - _queueHooks: function( elem, type ) { - var key = type + "queueHooks"; - return dataPriv.get( elem, key ) || dataPriv.access( elem, key, { - empty: jQuery.Callbacks( "once memory" ).add( function() { - dataPriv.remove( elem, [ type + "queue", key ] ); - } ) - } ); - } -} ); - -jQuery.fn.extend( { - queue: function( type, data ) { - var setter = 2; - - if ( typeof type !== "string" ) { - data = type; - type = "fx"; - setter--; - } - - if ( arguments.length < setter ) { - return jQuery.queue( this[ 0 ], type ); - } - - return data === undefined ? - this : - this.each( function() { - var queue = jQuery.queue( this, type, data ); - - // Ensure a hooks for this queue - jQuery._queueHooks( this, type ); - - if ( type === "fx" && queue[ 0 ] !== "inprogress" ) { - jQuery.dequeue( this, type ); - } - } ); - }, - dequeue: function( type ) { - return this.each( function() { - jQuery.dequeue( this, type ); - } ); - }, - clearQueue: function( type ) { - return this.queue( type || "fx", [] ); - }, - - // Get a promise resolved when queues of a certain type - // are emptied (fx is the type by default) - promise: function( type, obj ) { - var tmp, - count = 1, - defer = jQuery.Deferred(), - elements = this, - i = this.length, - resolve = function() { - if ( !( --count ) ) { - defer.resolveWith( elements, [ elements ] ); - } - }; - - if ( typeof type !== "string" ) { - obj = type; - type = undefined; - } - type = type || "fx"; - - while ( i-- ) { - tmp = dataPriv.get( elements[ i ], type + "queueHooks" ); - if ( tmp && tmp.empty ) { - count++; - tmp.empty.add( resolve ); - } - } - resolve(); - return defer.promise( obj ); - } -} ); -var pnum = ( /[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/ ).source; - -var rcssNum = new RegExp( "^(?:([+-])=|)(" + pnum + ")([a-z%]*)$", "i" ); - - -var cssExpand = [ "Top", "Right", "Bottom", "Left" ]; - -var isHiddenWithinTree = function( elem, el ) { - - // isHiddenWithinTree might be called from jQuery#filter function; - // in that case, element will be second argument - elem = el || elem; - - // Inline style trumps all - return elem.style.display === "none" || - elem.style.display === "" && - - // Otherwise, check computed style - // Support: Firefox <=43 - 45 - // Disconnected elements can have computed display: none, so first confirm that elem is - // in the document. - jQuery.contains( elem.ownerDocument, elem ) && - - jQuery.css( elem, "display" ) === "none"; - }; - -var swap = function( elem, options, callback, args ) { - var ret, name, - old = {}; - - // Remember the old values, and insert the new ones - for ( name in options ) { - old[ name ] = elem.style[ name ]; - elem.style[ name ] = options[ name ]; - } - - ret = callback.apply( elem, args || [] ); - - // Revert the old values - for ( name in options ) { - elem.style[ name ] = old[ name ]; - } - - return ret; -}; - - - - -function adjustCSS( elem, prop, valueParts, tween ) { - var adjusted, - scale = 1, - maxIterations = 20, - currentValue = tween ? - function() { - return tween.cur(); - } : - function() { - return jQuery.css( elem, prop, "" ); - }, - initial = currentValue(), - unit = valueParts && valueParts[ 3 ] || ( jQuery.cssNumber[ prop ] ? "" : "px" ), - - // Starting value computation is required for potential unit mismatches - initialInUnit = ( jQuery.cssNumber[ prop ] || unit !== "px" && +initial ) && - rcssNum.exec( jQuery.css( elem, prop ) ); - - if ( initialInUnit && initialInUnit[ 3 ] !== unit ) { - - // Trust units reported by jQuery.css - unit = unit || initialInUnit[ 3 ]; - - // Make sure we update the tween properties later on - valueParts = valueParts || []; - - // Iteratively approximate from a nonzero starting point - initialInUnit = +initial || 1; - - do { - - // If previous iteration zeroed out, double until we get *something*. - // Use string for doubling so we don't accidentally see scale as unchanged below - scale = scale || ".5"; - - // Adjust and apply - initialInUnit = initialInUnit / scale; - jQuery.style( elem, prop, initialInUnit + unit ); - - // Update scale, tolerating zero or NaN from tween.cur() - // Break the loop if scale is unchanged or perfect, or if we've just had enough. - } while ( - scale !== ( scale = currentValue() / initial ) && scale !== 1 && --maxIterations - ); - } - - if ( valueParts ) { - initialInUnit = +initialInUnit || +initial || 0; - - // Apply relative offset (+=/-=) if specified - adjusted = valueParts[ 1 ] ? - initialInUnit + ( valueParts[ 1 ] + 1 ) * valueParts[ 2 ] : - +valueParts[ 2 ]; - if ( tween ) { - tween.unit = unit; - tween.start = initialInUnit; - tween.end = adjusted; - } - } - return adjusted; -} - - -var defaultDisplayMap = {}; - -function getDefaultDisplay( elem ) { - var temp, - doc = elem.ownerDocument, - nodeName = elem.nodeName, - display = defaultDisplayMap[ nodeName ]; - - if ( display ) { - return display; - } - - temp = doc.body.appendChild( doc.createElement( nodeName ) ); - display = jQuery.css( temp, "display" ); - - temp.parentNode.removeChild( temp ); - - if ( display === "none" ) { - display = "block"; - } - defaultDisplayMap[ nodeName ] = display; - - return display; -} - -function showHide( elements, show ) { - var display, elem, - values = [], - index = 0, - length = elements.length; - - // Determine new display value for elements that need to change - for ( ; index < length; index++ ) { - elem = elements[ index ]; - if ( !elem.style ) { - continue; - } - - display = elem.style.display; - if ( show ) { - - // Since we force visibility upon cascade-hidden elements, an immediate (and slow) - // check is required in this first loop unless we have a nonempty display value (either - // inline or about-to-be-restored) - if ( display === "none" ) { - values[ index ] = dataPriv.get( elem, "display" ) || null; - if ( !values[ index ] ) { - elem.style.display = ""; - } - } - if ( elem.style.display === "" && isHiddenWithinTree( elem ) ) { - values[ index ] = getDefaultDisplay( elem ); - } - } else { - if ( display !== "none" ) { - values[ index ] = "none"; - - // Remember what we're overwriting - dataPriv.set( elem, "display", display ); - } - } - } - - // Set the display of the elements in a second loop to avoid constant reflow - for ( index = 0; index < length; index++ ) { - if ( values[ index ] != null ) { - elements[ index ].style.display = values[ index ]; - } - } - - return elements; -} - -jQuery.fn.extend( { - show: function() { - return showHide( this, true ); - }, - hide: function() { - return showHide( this ); - }, - toggle: function( state ) { - if ( typeof state === "boolean" ) { - return state ? this.show() : this.hide(); - } - - return this.each( function() { - if ( isHiddenWithinTree( this ) ) { - jQuery( this ).show(); - } else { - jQuery( this ).hide(); - } - } ); - } -} ); -var rcheckableType = ( /^(?:checkbox|radio)$/i ); - -var rtagName = ( /<([a-z][^\/\0>\x20\t\r\n\f]+)/i ); - -var rscriptType = ( /^$|\/(?:java|ecma)script/i ); - - - -// We have to close these tags to support XHTML (#13200) -var wrapMap = { - - // Support: IE <=9 only - option: [ 1, "" ], - - // XHTML parsers do not magically insert elements in the - // same way that tag soup parsers do. So we cannot shorten - // this by omitting or other required elements. - thead: [ 1, "", "
      " ], - col: [ 2, "", "
      " ], - tr: [ 2, "", "
      " ], - td: [ 3, "", "
      " ], - - _default: [ 0, "", "" ] -}; - -// Support: IE <=9 only -wrapMap.optgroup = wrapMap.option; - -wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead; -wrapMap.th = wrapMap.td; - - -function getAll( context, tag ) { - - // Support: IE <=9 - 11 only - // Use typeof to avoid zero-argument method invocation on host objects (#15151) - var ret; - - if ( typeof context.getElementsByTagName !== "undefined" ) { - ret = context.getElementsByTagName( tag || "*" ); - - } else if ( typeof context.querySelectorAll !== "undefined" ) { - ret = context.querySelectorAll( tag || "*" ); - - } else { - ret = []; - } - - if ( tag === undefined || tag && nodeName( context, tag ) ) { - return jQuery.merge( [ context ], ret ); - } - - return ret; -} - - -// Mark scripts as having already been evaluated -function setGlobalEval( elems, refElements ) { - var i = 0, - l = elems.length; - - for ( ; i < l; i++ ) { - dataPriv.set( - elems[ i ], - "globalEval", - !refElements || dataPriv.get( refElements[ i ], "globalEval" ) - ); - } -} - - -var rhtml = /<|&#?\w+;/; - -function buildFragment( elems, context, scripts, selection, ignored ) { - var elem, tmp, tag, wrap, contains, j, - fragment = context.createDocumentFragment(), - nodes = [], - i = 0, - l = elems.length; - - for ( ; i < l; i++ ) { - elem = elems[ i ]; - - if ( elem || elem === 0 ) { - - // Add nodes directly - if ( jQuery.type( elem ) === "object" ) { - - // Support: Android <=4.0 only, PhantomJS 1 only - // push.apply(_, arraylike) throws on ancient WebKit - jQuery.merge( nodes, elem.nodeType ? [ elem ] : elem ); - - // Convert non-html into a text node - } else if ( !rhtml.test( elem ) ) { - nodes.push( context.createTextNode( elem ) ); - - // Convert html into DOM nodes - } else { - tmp = tmp || fragment.appendChild( context.createElement( "div" ) ); - - // Deserialize a standard representation - tag = ( rtagName.exec( elem ) || [ "", "" ] )[ 1 ].toLowerCase(); - wrap = wrapMap[ tag ] || wrapMap._default; - tmp.innerHTML = wrap[ 1 ] + jQuery.htmlPrefilter( elem ) + wrap[ 2 ]; - - // Descend through wrappers to the right content - j = wrap[ 0 ]; - while ( j-- ) { - tmp = tmp.lastChild; - } - - // Support: Android <=4.0 only, PhantomJS 1 only - // push.apply(_, arraylike) throws on ancient WebKit - jQuery.merge( nodes, tmp.childNodes ); - - // Remember the top-level container - tmp = fragment.firstChild; - - // Ensure the created nodes are orphaned (#12392) - tmp.textContent = ""; - } - } - } - - // Remove wrapper from fragment - fragment.textContent = ""; - - i = 0; - while ( ( elem = nodes[ i++ ] ) ) { - - // Skip elements already in the context collection (trac-4087) - if ( selection && jQuery.inArray( elem, selection ) > -1 ) { - if ( ignored ) { - ignored.push( elem ); - } - continue; - } - - contains = jQuery.contains( elem.ownerDocument, elem ); - - // Append to fragment - tmp = getAll( fragment.appendChild( elem ), "script" ); - - // Preserve script evaluation history - if ( contains ) { - setGlobalEval( tmp ); - } - - // Capture executables - if ( scripts ) { - j = 0; - while ( ( elem = tmp[ j++ ] ) ) { - if ( rscriptType.test( elem.type || "" ) ) { - scripts.push( elem ); - } - } - } - } - - return fragment; -} - - -( function() { - var fragment = document.createDocumentFragment(), - div = fragment.appendChild( document.createElement( "div" ) ), - input = document.createElement( "input" ); - - // Support: Android 4.0 - 4.3 only - // Check state lost if the name is set (#11217) - // Support: Windows Web Apps (WWA) - // `name` and `type` must use .setAttribute for WWA (#14901) - input.setAttribute( "type", "radio" ); - input.setAttribute( "checked", "checked" ); - input.setAttribute( "name", "t" ); - - div.appendChild( input ); - - // Support: Android <=4.1 only - // Older WebKit doesn't clone checked state correctly in fragments - support.checkClone = div.cloneNode( true ).cloneNode( true ).lastChild.checked; - - // Support: IE <=11 only - // Make sure textarea (and checkbox) defaultValue is properly cloned - div.innerHTML = ""; - support.noCloneChecked = !!div.cloneNode( true ).lastChild.defaultValue; -} )(); -var documentElement = document.documentElement; - - - -var - rkeyEvent = /^key/, - rmouseEvent = /^(?:mouse|pointer|contextmenu|drag|drop)|click/, - rtypenamespace = /^([^.]*)(?:\.(.+)|)/; - -function returnTrue() { - return true; -} - -function returnFalse() { - return false; -} - -// Support: IE <=9 only -// See #13393 for more info -function safeActiveElement() { - try { - return document.activeElement; - } catch ( err ) { } -} - -function on( elem, types, selector, data, fn, one ) { - var origFn, type; - - // Types can be a map of types/handlers - if ( typeof types === "object" ) { - - // ( types-Object, selector, data ) - if ( typeof selector !== "string" ) { - - // ( types-Object, data ) - data = data || selector; - selector = undefined; - } - for ( type in types ) { - on( elem, type, selector, data, types[ type ], one ); - } - return elem; - } - - if ( data == null && fn == null ) { - - // ( types, fn ) - fn = selector; - data = selector = undefined; - } else if ( fn == null ) { - if ( typeof selector === "string" ) { - - // ( types, selector, fn ) - fn = data; - data = undefined; - } else { - - // ( types, data, fn ) - fn = data; - data = selector; - selector = undefined; - } - } - if ( fn === false ) { - fn = returnFalse; - } else if ( !fn ) { - return elem; - } - - if ( one === 1 ) { - origFn = fn; - fn = function( event ) { - - // Can use an empty set, since event contains the info - jQuery().off( event ); - return origFn.apply( this, arguments ); - }; - - // Use same guid so caller can remove using origFn - fn.guid = origFn.guid || ( origFn.guid = jQuery.guid++ ); - } - return elem.each( function() { - jQuery.event.add( this, types, fn, data, selector ); - } ); -} - -/* - * Helper functions for managing events -- not part of the public interface. - * Props to Dean Edwards' addEvent library for many of the ideas. - */ -jQuery.event = { - - global: {}, - - add: function( elem, types, handler, data, selector ) { - - var handleObjIn, eventHandle, tmp, - events, t, handleObj, - special, handlers, type, namespaces, origType, - elemData = dataPriv.get( elem ); - - // Don't attach events to noData or text/comment nodes (but allow plain objects) - if ( !elemData ) { - return; - } - - // Caller can pass in an object of custom data in lieu of the handler - if ( handler.handler ) { - handleObjIn = handler; - handler = handleObjIn.handler; - selector = handleObjIn.selector; - } - - // Ensure that invalid selectors throw exceptions at attach time - // Evaluate against documentElement in case elem is a non-element node (e.g., document) - if ( selector ) { - jQuery.find.matchesSelector( documentElement, selector ); - } - - // Make sure that the handler has a unique ID, used to find/remove it later - if ( !handler.guid ) { - handler.guid = jQuery.guid++; - } - - // Init the element's event structure and main handler, if this is the first - if ( !( events = elemData.events ) ) { - events = elemData.events = {}; - } - if ( !( eventHandle = elemData.handle ) ) { - eventHandle = elemData.handle = function( e ) { - - // Discard the second event of a jQuery.event.trigger() and - // when an event is called after a page has unloaded - return typeof jQuery !== "undefined" && jQuery.event.triggered !== e.type ? - jQuery.event.dispatch.apply( elem, arguments ) : undefined; - }; - } - - // Handle multiple events separated by a space - types = ( types || "" ).match( rnothtmlwhite ) || [ "" ]; - t = types.length; - while ( t-- ) { - tmp = rtypenamespace.exec( types[ t ] ) || []; - type = origType = tmp[ 1 ]; - namespaces = ( tmp[ 2 ] || "" ).split( "." ).sort(); - - // There *must* be a type, no attaching namespace-only handlers - if ( !type ) { - continue; - } - - // If event changes its type, use the special event handlers for the changed type - special = jQuery.event.special[ type ] || {}; - - // If selector defined, determine special event api type, otherwise given type - type = ( selector ? special.delegateType : special.bindType ) || type; - - // Update special based on newly reset type - special = jQuery.event.special[ type ] || {}; - - // handleObj is passed to all event handlers - handleObj = jQuery.extend( { - type: type, - origType: origType, - data: data, - handler: handler, - guid: handler.guid, - selector: selector, - needsContext: selector && jQuery.expr.match.needsContext.test( selector ), - namespace: namespaces.join( "." ) - }, handleObjIn ); - - // Init the event handler queue if we're the first - if ( !( handlers = events[ type ] ) ) { - handlers = events[ type ] = []; - handlers.delegateCount = 0; - - // Only use addEventListener if the special events handler returns false - if ( !special.setup || - special.setup.call( elem, data, namespaces, eventHandle ) === false ) { - - if ( elem.addEventListener ) { - elem.addEventListener( type, eventHandle ); - } - } - } - - if ( special.add ) { - special.add.call( elem, handleObj ); - - if ( !handleObj.handler.guid ) { - handleObj.handler.guid = handler.guid; - } - } - - // Add to the element's handler list, delegates in front - if ( selector ) { - handlers.splice( handlers.delegateCount++, 0, handleObj ); - } else { - handlers.push( handleObj ); - } - - // Keep track of which events have ever been used, for event optimization - jQuery.event.global[ type ] = true; - } - - }, - - // Detach an event or set of events from an element - remove: function( elem, types, handler, selector, mappedTypes ) { - - var j, origCount, tmp, - events, t, handleObj, - special, handlers, type, namespaces, origType, - elemData = dataPriv.hasData( elem ) && dataPriv.get( elem ); - - if ( !elemData || !( events = elemData.events ) ) { - return; - } - - // Once for each type.namespace in types; type may be omitted - types = ( types || "" ).match( rnothtmlwhite ) || [ "" ]; - t = types.length; - while ( t-- ) { - tmp = rtypenamespace.exec( types[ t ] ) || []; - type = origType = tmp[ 1 ]; - namespaces = ( tmp[ 2 ] || "" ).split( "." ).sort(); - - // Unbind all events (on this namespace, if provided) for the element - if ( !type ) { - for ( type in events ) { - jQuery.event.remove( elem, type + types[ t ], handler, selector, true ); - } - continue; - } - - special = jQuery.event.special[ type ] || {}; - type = ( selector ? special.delegateType : special.bindType ) || type; - handlers = events[ type ] || []; - tmp = tmp[ 2 ] && - new RegExp( "(^|\\.)" + namespaces.join( "\\.(?:.*\\.|)" ) + "(\\.|$)" ); - - // Remove matching events - origCount = j = handlers.length; - while ( j-- ) { - handleObj = handlers[ j ]; - - if ( ( mappedTypes || origType === handleObj.origType ) && - ( !handler || handler.guid === handleObj.guid ) && - ( !tmp || tmp.test( handleObj.namespace ) ) && - ( !selector || selector === handleObj.selector || - selector === "**" && handleObj.selector ) ) { - handlers.splice( j, 1 ); - - if ( handleObj.selector ) { - handlers.delegateCount--; - } - if ( special.remove ) { - special.remove.call( elem, handleObj ); - } - } - } - - // Remove generic event handler if we removed something and no more handlers exist - // (avoids potential for endless recursion during removal of special event handlers) - if ( origCount && !handlers.length ) { - if ( !special.teardown || - special.teardown.call( elem, namespaces, elemData.handle ) === false ) { - - jQuery.removeEvent( elem, type, elemData.handle ); - } - - delete events[ type ]; - } - } - - // Remove data and the expando if it's no longer used - if ( jQuery.isEmptyObject( events ) ) { - dataPriv.remove( elem, "handle events" ); - } - }, - - dispatch: function( nativeEvent ) { - - // Make a writable jQuery.Event from the native event object - var event = jQuery.event.fix( nativeEvent ); - - var i, j, ret, matched, handleObj, handlerQueue, - args = new Array( arguments.length ), - handlers = ( dataPriv.get( this, "events" ) || {} )[ event.type ] || [], - special = jQuery.event.special[ event.type ] || {}; - - // Use the fix-ed jQuery.Event rather than the (read-only) native event - args[ 0 ] = event; - - for ( i = 1; i < arguments.length; i++ ) { - args[ i ] = arguments[ i ]; - } - - event.delegateTarget = this; - - // Call the preDispatch hook for the mapped type, and let it bail if desired - if ( special.preDispatch && special.preDispatch.call( this, event ) === false ) { - return; - } - - // Determine handlers - handlerQueue = jQuery.event.handlers.call( this, event, handlers ); - - // Run delegates first; they may want to stop propagation beneath us - i = 0; - while ( ( matched = handlerQueue[ i++ ] ) && !event.isPropagationStopped() ) { - event.currentTarget = matched.elem; - - j = 0; - while ( ( handleObj = matched.handlers[ j++ ] ) && - !event.isImmediatePropagationStopped() ) { - - // Triggered event must either 1) have no namespace, or 2) have namespace(s) - // a subset or equal to those in the bound event (both can have no namespace). - if ( !event.rnamespace || event.rnamespace.test( handleObj.namespace ) ) { - - event.handleObj = handleObj; - event.data = handleObj.data; - - ret = ( ( jQuery.event.special[ handleObj.origType ] || {} ).handle || - handleObj.handler ).apply( matched.elem, args ); - - if ( ret !== undefined ) { - if ( ( event.result = ret ) === false ) { - event.preventDefault(); - event.stopPropagation(); - } - } - } - } - } - - // Call the postDispatch hook for the mapped type - if ( special.postDispatch ) { - special.postDispatch.call( this, event ); - } - - return event.result; - }, - - handlers: function( event, handlers ) { - var i, handleObj, sel, matchedHandlers, matchedSelectors, - handlerQueue = [], - delegateCount = handlers.delegateCount, - cur = event.target; - - // Find delegate handlers - if ( delegateCount && - - // Support: IE <=9 - // Black-hole SVG instance trees (trac-13180) - cur.nodeType && - - // Support: Firefox <=42 - // Suppress spec-violating clicks indicating a non-primary pointer button (trac-3861) - // https://www.w3.org/TR/DOM-Level-3-Events/#event-type-click - // Support: IE 11 only - // ...but not arrow key "clicks" of radio inputs, which can have `button` -1 (gh-2343) - !( event.type === "click" && event.button >= 1 ) ) { - - for ( ; cur !== this; cur = cur.parentNode || this ) { - - // Don't check non-elements (#13208) - // Don't process clicks on disabled elements (#6911, #8165, #11382, #11764) - if ( cur.nodeType === 1 && !( event.type === "click" && cur.disabled === true ) ) { - matchedHandlers = []; - matchedSelectors = {}; - for ( i = 0; i < delegateCount; i++ ) { - handleObj = handlers[ i ]; - - // Don't conflict with Object.prototype properties (#13203) - sel = handleObj.selector + " "; - - if ( matchedSelectors[ sel ] === undefined ) { - matchedSelectors[ sel ] = handleObj.needsContext ? - jQuery( sel, this ).index( cur ) > -1 : - jQuery.find( sel, this, null, [ cur ] ).length; - } - if ( matchedSelectors[ sel ] ) { - matchedHandlers.push( handleObj ); - } - } - if ( matchedHandlers.length ) { - handlerQueue.push( { elem: cur, handlers: matchedHandlers } ); - } - } - } - } - - // Add the remaining (directly-bound) handlers - cur = this; - if ( delegateCount < handlers.length ) { - handlerQueue.push( { elem: cur, handlers: handlers.slice( delegateCount ) } ); - } - - return handlerQueue; - }, - - addProp: function( name, hook ) { - Object.defineProperty( jQuery.Event.prototype, name, { - enumerable: true, - configurable: true, - - get: jQuery.isFunction( hook ) ? - function() { - if ( this.originalEvent ) { - return hook( this.originalEvent ); - } - } : - function() { - if ( this.originalEvent ) { - return this.originalEvent[ name ]; - } - }, - - set: function( value ) { - Object.defineProperty( this, name, { - enumerable: true, - configurable: true, - writable: true, - value: value - } ); - } - } ); - }, - - fix: function( originalEvent ) { - return originalEvent[ jQuery.expando ] ? - originalEvent : - new jQuery.Event( originalEvent ); - }, - - special: { - load: { - - // Prevent triggered image.load events from bubbling to window.load - noBubble: true - }, - focus: { - - // Fire native event if possible so blur/focus sequence is correct - trigger: function() { - if ( this !== safeActiveElement() && this.focus ) { - this.focus(); - return false; - } - }, - delegateType: "focusin" - }, - blur: { - trigger: function() { - if ( this === safeActiveElement() && this.blur ) { - this.blur(); - return false; - } - }, - delegateType: "focusout" - }, - click: { - - // For checkbox, fire native event so checked state will be right - trigger: function() { - if ( this.type === "checkbox" && this.click && nodeName( this, "input" ) ) { - this.click(); - return false; - } - }, - - // For cross-browser consistency, don't fire native .click() on links - _default: function( event ) { - return nodeName( event.target, "a" ); - } - }, - - beforeunload: { - postDispatch: function( event ) { - - // Support: Firefox 20+ - // Firefox doesn't alert if the returnValue field is not set. - if ( event.result !== undefined && event.originalEvent ) { - event.originalEvent.returnValue = event.result; - } - } - } - } -}; - -jQuery.removeEvent = function( elem, type, handle ) { - - // This "if" is needed for plain objects - if ( elem.removeEventListener ) { - elem.removeEventListener( type, handle ); - } -}; - -jQuery.Event = function( src, props ) { - - // Allow instantiation without the 'new' keyword - if ( !( this instanceof jQuery.Event ) ) { - return new jQuery.Event( src, props ); - } - - // Event object - if ( src && src.type ) { - this.originalEvent = src; - this.type = src.type; - - // Events bubbling up the document may have been marked as prevented - // by a handler lower down the tree; reflect the correct value. - this.isDefaultPrevented = src.defaultPrevented || - src.defaultPrevented === undefined && - - // Support: Android <=2.3 only - src.returnValue === false ? - returnTrue : - returnFalse; - - // Create target properties - // Support: Safari <=6 - 7 only - // Target should not be a text node (#504, #13143) - this.target = ( src.target && src.target.nodeType === 3 ) ? - src.target.parentNode : - src.target; - - this.currentTarget = src.currentTarget; - this.relatedTarget = src.relatedTarget; - - // Event type - } else { - this.type = src; - } - - // Put explicitly provided properties onto the event object - if ( props ) { - jQuery.extend( this, props ); - } - - // Create a timestamp if incoming event doesn't have one - this.timeStamp = src && src.timeStamp || jQuery.now(); - - // Mark it as fixed - this[ jQuery.expando ] = true; -}; - -// jQuery.Event is based on DOM3 Events as specified by the ECMAScript Language Binding -// https://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html -jQuery.Event.prototype = { - constructor: jQuery.Event, - isDefaultPrevented: returnFalse, - isPropagationStopped: returnFalse, - isImmediatePropagationStopped: returnFalse, - isSimulated: false, - - preventDefault: function() { - var e = this.originalEvent; - - this.isDefaultPrevented = returnTrue; - - if ( e && !this.isSimulated ) { - e.preventDefault(); - } - }, - stopPropagation: function() { - var e = this.originalEvent; - - this.isPropagationStopped = returnTrue; - - if ( e && !this.isSimulated ) { - e.stopPropagation(); - } - }, - stopImmediatePropagation: function() { - var e = this.originalEvent; - - this.isImmediatePropagationStopped = returnTrue; - - if ( e && !this.isSimulated ) { - e.stopImmediatePropagation(); - } - - this.stopPropagation(); - } -}; - -// Includes all common event props including KeyEvent and MouseEvent specific props -jQuery.each( { - altKey: true, - bubbles: true, - cancelable: true, - changedTouches: true, - ctrlKey: true, - detail: true, - eventPhase: true, - metaKey: true, - pageX: true, - pageY: true, - shiftKey: true, - view: true, - "char": true, - charCode: true, - key: true, - keyCode: true, - button: true, - buttons: true, - clientX: true, - clientY: true, - offsetX: true, - offsetY: true, - pointerId: true, - pointerType: true, - screenX: true, - screenY: true, - targetTouches: true, - toElement: true, - touches: true, - - which: function( event ) { - var button = event.button; - - // Add which for key events - if ( event.which == null && rkeyEvent.test( event.type ) ) { - return event.charCode != null ? event.charCode : event.keyCode; - } - - // Add which for click: 1 === left; 2 === middle; 3 === right - if ( !event.which && button !== undefined && rmouseEvent.test( event.type ) ) { - if ( button & 1 ) { - return 1; - } - - if ( button & 2 ) { - return 3; - } - - if ( button & 4 ) { - return 2; - } - - return 0; - } - - return event.which; - } -}, jQuery.event.addProp ); - -// Create mouseenter/leave events using mouseover/out and event-time checks -// so that event delegation works in jQuery. -// Do the same for pointerenter/pointerleave and pointerover/pointerout -// -// Support: Safari 7 only -// Safari sends mouseenter too often; see: -// https://bugs.chromium.org/p/chromium/issues/detail?id=470258 -// for the description of the bug (it existed in older Chrome versions as well). -jQuery.each( { - mouseenter: "mouseover", - mouseleave: "mouseout", - pointerenter: "pointerover", - pointerleave: "pointerout" -}, function( orig, fix ) { - jQuery.event.special[ orig ] = { - delegateType: fix, - bindType: fix, - - handle: function( event ) { - var ret, - target = this, - related = event.relatedTarget, - handleObj = event.handleObj; - - // For mouseenter/leave call the handler if related is outside the target. - // NB: No relatedTarget if the mouse left/entered the browser window - if ( !related || ( related !== target && !jQuery.contains( target, related ) ) ) { - event.type = handleObj.origType; - ret = handleObj.handler.apply( this, arguments ); - event.type = fix; - } - return ret; - } - }; -} ); - -jQuery.fn.extend( { - - on: function( types, selector, data, fn ) { - return on( this, types, selector, data, fn ); - }, - one: function( types, selector, data, fn ) { - return on( this, types, selector, data, fn, 1 ); - }, - off: function( types, selector, fn ) { - var handleObj, type; - if ( types && types.preventDefault && types.handleObj ) { - - // ( event ) dispatched jQuery.Event - handleObj = types.handleObj; - jQuery( types.delegateTarget ).off( - handleObj.namespace ? - handleObj.origType + "." + handleObj.namespace : - handleObj.origType, - handleObj.selector, - handleObj.handler - ); - return this; - } - if ( typeof types === "object" ) { - - // ( types-object [, selector] ) - for ( type in types ) { - this.off( type, selector, types[ type ] ); - } - return this; - } - if ( selector === false || typeof selector === "function" ) { - - // ( types [, fn] ) - fn = selector; - selector = undefined; - } - if ( fn === false ) { - fn = returnFalse; - } - return this.each( function() { - jQuery.event.remove( this, types, fn, selector ); - } ); - } -} ); - - -var - - /* eslint-disable max-len */ - - // See https://github.com/eslint/eslint/issues/3229 - rxhtmlTag = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([a-z][^\/\0>\x20\t\r\n\f]*)[^>]*)\/>/gi, - - /* eslint-enable */ - - // Support: IE <=10 - 11, Edge 12 - 13 - // In IE/Edge using regex groups here causes severe slowdowns. - // See https://connect.microsoft.com/IE/feedback/details/1736512/ - rnoInnerhtml = /\s*$/g; - -// Prefer a tbody over its parent table for containing new rows -function manipulationTarget( elem, content ) { - if ( nodeName( elem, "table" ) && - nodeName( content.nodeType !== 11 ? content : content.firstChild, "tr" ) ) { - - return jQuery( ">tbody", elem )[ 0 ] || elem; - } - - return elem; -} - -// Replace/restore the type attribute of script elements for safe DOM manipulation -function disableScript( elem ) { - elem.type = ( elem.getAttribute( "type" ) !== null ) + "/" + elem.type; - return elem; -} -function restoreScript( elem ) { - var match = rscriptTypeMasked.exec( elem.type ); - - if ( match ) { - elem.type = match[ 1 ]; - } else { - elem.removeAttribute( "type" ); - } - - return elem; -} - -function cloneCopyEvent( src, dest ) { - var i, l, type, pdataOld, pdataCur, udataOld, udataCur, events; - - if ( dest.nodeType !== 1 ) { - return; - } - - // 1. Copy private data: events, handlers, etc. - if ( dataPriv.hasData( src ) ) { - pdataOld = dataPriv.access( src ); - pdataCur = dataPriv.set( dest, pdataOld ); - events = pdataOld.events; - - if ( events ) { - delete pdataCur.handle; - pdataCur.events = {}; - - for ( type in events ) { - for ( i = 0, l = events[ type ].length; i < l; i++ ) { - jQuery.event.add( dest, type, events[ type ][ i ] ); - } - } - } - } - - // 2. Copy user data - if ( dataUser.hasData( src ) ) { - udataOld = dataUser.access( src ); - udataCur = jQuery.extend( {}, udataOld ); - - dataUser.set( dest, udataCur ); - } -} - -// Fix IE bugs, see support tests -function fixInput( src, dest ) { - var nodeName = dest.nodeName.toLowerCase(); - - // Fails to persist the checked state of a cloned checkbox or radio button. - if ( nodeName === "input" && rcheckableType.test( src.type ) ) { - dest.checked = src.checked; - - // Fails to return the selected option to the default selected state when cloning options - } else if ( nodeName === "input" || nodeName === "textarea" ) { - dest.defaultValue = src.defaultValue; - } -} - -function domManip( collection, args, callback, ignored ) { - - // Flatten any nested arrays - args = concat.apply( [], args ); - - var fragment, first, scripts, hasScripts, node, doc, - i = 0, - l = collection.length, - iNoClone = l - 1, - value = args[ 0 ], - isFunction = jQuery.isFunction( value ); - - // We can't cloneNode fragments that contain checked, in WebKit - if ( isFunction || - ( l > 1 && typeof value === "string" && - !support.checkClone && rchecked.test( value ) ) ) { - return collection.each( function( index ) { - var self = collection.eq( index ); - if ( isFunction ) { - args[ 0 ] = value.call( this, index, self.html() ); - } - domManip( self, args, callback, ignored ); - } ); - } - - if ( l ) { - fragment = buildFragment( args, collection[ 0 ].ownerDocument, false, collection, ignored ); - first = fragment.firstChild; - - if ( fragment.childNodes.length === 1 ) { - fragment = first; - } - - // Require either new content or an interest in ignored elements to invoke the callback - if ( first || ignored ) { - scripts = jQuery.map( getAll( fragment, "script" ), disableScript ); - hasScripts = scripts.length; - - // Use the original fragment for the last item - // instead of the first because it can end up - // being emptied incorrectly in certain situations (#8070). - for ( ; i < l; i++ ) { - node = fragment; - - if ( i !== iNoClone ) { - node = jQuery.clone( node, true, true ); - - // Keep references to cloned scripts for later restoration - if ( hasScripts ) { - - // Support: Android <=4.0 only, PhantomJS 1 only - // push.apply(_, arraylike) throws on ancient WebKit - jQuery.merge( scripts, getAll( node, "script" ) ); - } - } - - callback.call( collection[ i ], node, i ); - } - - if ( hasScripts ) { - doc = scripts[ scripts.length - 1 ].ownerDocument; - - // Reenable scripts - jQuery.map( scripts, restoreScript ); - - // Evaluate executable scripts on first document insertion - for ( i = 0; i < hasScripts; i++ ) { - node = scripts[ i ]; - if ( rscriptType.test( node.type || "" ) && - !dataPriv.access( node, "globalEval" ) && - jQuery.contains( doc, node ) ) { - - if ( node.src ) { - - // Optional AJAX dependency, but won't run scripts if not present - if ( jQuery._evalUrl ) { - jQuery._evalUrl( node.src ); - } - } else { - DOMEval( node.textContent.replace( rcleanScript, "" ), doc ); - } - } - } - } - } - } - - return collection; -} - -function remove( elem, selector, keepData ) { - var node, - nodes = selector ? jQuery.filter( selector, elem ) : elem, - i = 0; - - for ( ; ( node = nodes[ i ] ) != null; i++ ) { - if ( !keepData && node.nodeType === 1 ) { - jQuery.cleanData( getAll( node ) ); - } - - if ( node.parentNode ) { - if ( keepData && jQuery.contains( node.ownerDocument, node ) ) { - setGlobalEval( getAll( node, "script" ) ); - } - node.parentNode.removeChild( node ); - } - } - - return elem; -} - -jQuery.extend( { - htmlPrefilter: function( html ) { - return html.replace( rxhtmlTag, "<$1>" ); - }, - - clone: function( elem, dataAndEvents, deepDataAndEvents ) { - var i, l, srcElements, destElements, - clone = elem.cloneNode( true ), - inPage = jQuery.contains( elem.ownerDocument, elem ); - - // Fix IE cloning issues - if ( !support.noCloneChecked && ( elem.nodeType === 1 || elem.nodeType === 11 ) && - !jQuery.isXMLDoc( elem ) ) { - - // We eschew Sizzle here for performance reasons: https://jsperf.com/getall-vs-sizzle/2 - destElements = getAll( clone ); - srcElements = getAll( elem ); - - for ( i = 0, l = srcElements.length; i < l; i++ ) { - fixInput( srcElements[ i ], destElements[ i ] ); - } - } - - // Copy the events from the original to the clone - if ( dataAndEvents ) { - if ( deepDataAndEvents ) { - srcElements = srcElements || getAll( elem ); - destElements = destElements || getAll( clone ); - - for ( i = 0, l = srcElements.length; i < l; i++ ) { - cloneCopyEvent( srcElements[ i ], destElements[ i ] ); - } - } else { - cloneCopyEvent( elem, clone ); - } - } - - // Preserve script evaluation history - destElements = getAll( clone, "script" ); - if ( destElements.length > 0 ) { - setGlobalEval( destElements, !inPage && getAll( elem, "script" ) ); - } - - // Return the cloned set - return clone; - }, - - cleanData: function( elems ) { - var data, elem, type, - special = jQuery.event.special, - i = 0; - - for ( ; ( elem = elems[ i ] ) !== undefined; i++ ) { - if ( acceptData( elem ) ) { - if ( ( data = elem[ dataPriv.expando ] ) ) { - if ( data.events ) { - for ( type in data.events ) { - if ( special[ type ] ) { - jQuery.event.remove( elem, type ); - - // This is a shortcut to avoid jQuery.event.remove's overhead - } else { - jQuery.removeEvent( elem, type, data.handle ); - } - } - } - - // Support: Chrome <=35 - 45+ - // Assign undefined instead of using delete, see Data#remove - elem[ dataPriv.expando ] = undefined; - } - if ( elem[ dataUser.expando ] ) { - - // Support: Chrome <=35 - 45+ - // Assign undefined instead of using delete, see Data#remove - elem[ dataUser.expando ] = undefined; - } - } - } - } -} ); - -jQuery.fn.extend( { - detach: function( selector ) { - return remove( this, selector, true ); - }, - - remove: function( selector ) { - return remove( this, selector ); - }, - - text: function( value ) { - return access( this, function( value ) { - return value === undefined ? - jQuery.text( this ) : - this.empty().each( function() { - if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) { - this.textContent = value; - } - } ); - }, null, value, arguments.length ); - }, - - append: function() { - return domManip( this, arguments, function( elem ) { - if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) { - var target = manipulationTarget( this, elem ); - target.appendChild( elem ); - } - } ); - }, - - prepend: function() { - return domManip( this, arguments, function( elem ) { - if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) { - var target = manipulationTarget( this, elem ); - target.insertBefore( elem, target.firstChild ); - } - } ); - }, - - before: function() { - return domManip( this, arguments, function( elem ) { - if ( this.parentNode ) { - this.parentNode.insertBefore( elem, this ); - } - } ); - }, - - after: function() { - return domManip( this, arguments, function( elem ) { - if ( this.parentNode ) { - this.parentNode.insertBefore( elem, this.nextSibling ); - } - } ); - }, - - empty: function() { - var elem, - i = 0; - - for ( ; ( elem = this[ i ] ) != null; i++ ) { - if ( elem.nodeType === 1 ) { - - // Prevent memory leaks - jQuery.cleanData( getAll( elem, false ) ); - - // Remove any remaining nodes - elem.textContent = ""; - } - } - - return this; - }, - - clone: function( dataAndEvents, deepDataAndEvents ) { - dataAndEvents = dataAndEvents == null ? false : dataAndEvents; - deepDataAndEvents = deepDataAndEvents == null ? dataAndEvents : deepDataAndEvents; - - return this.map( function() { - return jQuery.clone( this, dataAndEvents, deepDataAndEvents ); - } ); - }, - - html: function( value ) { - return access( this, function( value ) { - var elem = this[ 0 ] || {}, - i = 0, - l = this.length; - - if ( value === undefined && elem.nodeType === 1 ) { - return elem.innerHTML; - } - - // See if we can take a shortcut and just use innerHTML - if ( typeof value === "string" && !rnoInnerhtml.test( value ) && - !wrapMap[ ( rtagName.exec( value ) || [ "", "" ] )[ 1 ].toLowerCase() ] ) { - - value = jQuery.htmlPrefilter( value ); - - try { - for ( ; i < l; i++ ) { - elem = this[ i ] || {}; - - // Remove element nodes and prevent memory leaks - if ( elem.nodeType === 1 ) { - jQuery.cleanData( getAll( elem, false ) ); - elem.innerHTML = value; - } - } - - elem = 0; - - // If using innerHTML throws an exception, use the fallback method - } catch ( e ) {} - } - - if ( elem ) { - this.empty().append( value ); - } - }, null, value, arguments.length ); - }, - - replaceWith: function() { - var ignored = []; - - // Make the changes, replacing each non-ignored context element with the new content - return domManip( this, arguments, function( elem ) { - var parent = this.parentNode; - - if ( jQuery.inArray( this, ignored ) < 0 ) { - jQuery.cleanData( getAll( this ) ); - if ( parent ) { - parent.replaceChild( elem, this ); - } - } - - // Force callback invocation - }, ignored ); - } -} ); - -jQuery.each( { - appendTo: "append", - prependTo: "prepend", - insertBefore: "before", - insertAfter: "after", - replaceAll: "replaceWith" -}, function( name, original ) { - jQuery.fn[ name ] = function( selector ) { - var elems, - ret = [], - insert = jQuery( selector ), - last = insert.length - 1, - i = 0; - - for ( ; i <= last; i++ ) { - elems = i === last ? this : this.clone( true ); - jQuery( insert[ i ] )[ original ]( elems ); - - // Support: Android <=4.0 only, PhantomJS 1 only - // .get() because push.apply(_, arraylike) throws on ancient WebKit - push.apply( ret, elems.get() ); - } - - return this.pushStack( ret ); - }; -} ); -var rmargin = ( /^margin/ ); - -var rnumnonpx = new RegExp( "^(" + pnum + ")(?!px)[a-z%]+$", "i" ); - -var getStyles = function( elem ) { - - // Support: IE <=11 only, Firefox <=30 (#15098, #14150) - // IE throws on elements created in popups - // FF meanwhile throws on frame elements through "defaultView.getComputedStyle" - var view = elem.ownerDocument.defaultView; - - if ( !view || !view.opener ) { - view = window; - } - - return view.getComputedStyle( elem ); - }; - - - -( function() { - - // Executing both pixelPosition & boxSizingReliable tests require only one layout - // so they're executed at the same time to save the second computation. - function computeStyleTests() { - - // This is a singleton, we need to execute it only once - if ( !div ) { - return; - } - - div.style.cssText = - "box-sizing:border-box;" + - "position:relative;display:block;" + - "margin:auto;border:1px;padding:1px;" + - "top:1%;width:50%"; - div.innerHTML = ""; - documentElement.appendChild( container ); - - var divStyle = window.getComputedStyle( div ); - pixelPositionVal = divStyle.top !== "1%"; - - // Support: Android 4.0 - 4.3 only, Firefox <=3 - 44 - reliableMarginLeftVal = divStyle.marginLeft === "2px"; - boxSizingReliableVal = divStyle.width === "4px"; - - // Support: Android 4.0 - 4.3 only - // Some styles come back with percentage values, even though they shouldn't - div.style.marginRight = "50%"; - pixelMarginRightVal = divStyle.marginRight === "4px"; - - documentElement.removeChild( container ); - - // Nullify the div so it wouldn't be stored in the memory and - // it will also be a sign that checks already performed - div = null; - } - - var pixelPositionVal, boxSizingReliableVal, pixelMarginRightVal, reliableMarginLeftVal, - container = document.createElement( "div" ), - div = document.createElement( "div" ); - - // Finish early in limited (non-browser) environments - if ( !div.style ) { - return; - } - - // Support: IE <=9 - 11 only - // Style of cloned element affects source element cloned (#8908) - div.style.backgroundClip = "content-box"; - div.cloneNode( true ).style.backgroundClip = ""; - support.clearCloneStyle = div.style.backgroundClip === "content-box"; - - container.style.cssText = "border:0;width:8px;height:0;top:0;left:-9999px;" + - "padding:0;margin-top:1px;position:absolute"; - container.appendChild( div ); - - jQuery.extend( support, { - pixelPosition: function() { - computeStyleTests(); - return pixelPositionVal; - }, - boxSizingReliable: function() { - computeStyleTests(); - return boxSizingReliableVal; - }, - pixelMarginRight: function() { - computeStyleTests(); - return pixelMarginRightVal; - }, - reliableMarginLeft: function() { - computeStyleTests(); - return reliableMarginLeftVal; - } - } ); -} )(); - - -function curCSS( elem, name, computed ) { - var width, minWidth, maxWidth, ret, - - // Support: Firefox 51+ - // Retrieving style before computed somehow - // fixes an issue with getting wrong values - // on detached elements - style = elem.style; - - computed = computed || getStyles( elem ); - - // getPropertyValue is needed for: - // .css('filter') (IE 9 only, #12537) - // .css('--customProperty) (#3144) - if ( computed ) { - ret = computed.getPropertyValue( name ) || computed[ name ]; - - if ( ret === "" && !jQuery.contains( elem.ownerDocument, elem ) ) { - ret = jQuery.style( elem, name ); - } - - // A tribute to the "awesome hack by Dean Edwards" - // Android Browser returns percentage for some values, - // but width seems to be reliably pixels. - // This is against the CSSOM draft spec: - // https://drafts.csswg.org/cssom/#resolved-values - if ( !support.pixelMarginRight() && rnumnonpx.test( ret ) && rmargin.test( name ) ) { - - // Remember the original values - width = style.width; - minWidth = style.minWidth; - maxWidth = style.maxWidth; - - // Put in the new values to get a computed value out - style.minWidth = style.maxWidth = style.width = ret; - ret = computed.width; - - // Revert the changed values - style.width = width; - style.minWidth = minWidth; - style.maxWidth = maxWidth; - } - } - - return ret !== undefined ? - - // Support: IE <=9 - 11 only - // IE returns zIndex value as an integer. - ret + "" : - ret; -} - - -function addGetHookIf( conditionFn, hookFn ) { - - // Define the hook, we'll check on the first run if it's really needed. - return { - get: function() { - if ( conditionFn() ) { - - // Hook not needed (or it's not possible to use it due - // to missing dependency), remove it. - delete this.get; - return; - } - - // Hook needed; redefine it so that the support test is not executed again. - return ( this.get = hookFn ).apply( this, arguments ); - } - }; -} - - -var - - // Swappable if display is none or starts with table - // except "table", "table-cell", or "table-caption" - // See here for display values: https://developer.mozilla.org/en-US/docs/CSS/display - rdisplayswap = /^(none|table(?!-c[ea]).+)/, - rcustomProp = /^--/, - cssShow = { position: "absolute", visibility: "hidden", display: "block" }, - cssNormalTransform = { - letterSpacing: "0", - fontWeight: "400" - }, - - cssPrefixes = [ "Webkit", "Moz", "ms" ], - emptyStyle = document.createElement( "div" ).style; - -// Return a css property mapped to a potentially vendor prefixed property -function vendorPropName( name ) { - - // Shortcut for names that are not vendor prefixed - if ( name in emptyStyle ) { - return name; - } - - // Check for vendor prefixed names - var capName = name[ 0 ].toUpperCase() + name.slice( 1 ), - i = cssPrefixes.length; - - while ( i-- ) { - name = cssPrefixes[ i ] + capName; - if ( name in emptyStyle ) { - return name; - } - } -} - -// Return a property mapped along what jQuery.cssProps suggests or to -// a vendor prefixed property. -function finalPropName( name ) { - var ret = jQuery.cssProps[ name ]; - if ( !ret ) { - ret = jQuery.cssProps[ name ] = vendorPropName( name ) || name; - } - return ret; -} - -function setPositiveNumber( elem, value, subtract ) { - - // Any relative (+/-) values have already been - // normalized at this point - var matches = rcssNum.exec( value ); - return matches ? - - // Guard against undefined "subtract", e.g., when used as in cssHooks - Math.max( 0, matches[ 2 ] - ( subtract || 0 ) ) + ( matches[ 3 ] || "px" ) : - value; -} - -function augmentWidthOrHeight( elem, name, extra, isBorderBox, styles ) { - var i, - val = 0; - - // If we already have the right measurement, avoid augmentation - if ( extra === ( isBorderBox ? "border" : "content" ) ) { - i = 4; - - // Otherwise initialize for horizontal or vertical properties - } else { - i = name === "width" ? 1 : 0; - } - - for ( ; i < 4; i += 2 ) { - - // Both box models exclude margin, so add it if we want it - if ( extra === "margin" ) { - val += jQuery.css( elem, extra + cssExpand[ i ], true, styles ); - } - - if ( isBorderBox ) { - - // border-box includes padding, so remove it if we want content - if ( extra === "content" ) { - val -= jQuery.css( elem, "padding" + cssExpand[ i ], true, styles ); - } - - // At this point, extra isn't border nor margin, so remove border - if ( extra !== "margin" ) { - val -= jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles ); - } - } else { - - // At this point, extra isn't content, so add padding - val += jQuery.css( elem, "padding" + cssExpand[ i ], true, styles ); - - // At this point, extra isn't content nor padding, so add border - if ( extra !== "padding" ) { - val += jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles ); - } - } - } - - return val; -} - -function getWidthOrHeight( elem, name, extra ) { - - // Start with computed style - var valueIsBorderBox, - styles = getStyles( elem ), - val = curCSS( elem, name, styles ), - isBorderBox = jQuery.css( elem, "boxSizing", false, styles ) === "border-box"; - - // Computed unit is not pixels. Stop here and return. - if ( rnumnonpx.test( val ) ) { - return val; - } - - // Check for style in case a browser which returns unreliable values - // for getComputedStyle silently falls back to the reliable elem.style - valueIsBorderBox = isBorderBox && - ( support.boxSizingReliable() || val === elem.style[ name ] ); - - // Fall back to offsetWidth/Height when value is "auto" - // This happens for inline elements with no explicit setting (gh-3571) - if ( val === "auto" ) { - val = elem[ "offset" + name[ 0 ].toUpperCase() + name.slice( 1 ) ]; - } - - // Normalize "", auto, and prepare for extra - val = parseFloat( val ) || 0; - - // Use the active box-sizing model to add/subtract irrelevant styles - return ( val + - augmentWidthOrHeight( - elem, - name, - extra || ( isBorderBox ? "border" : "content" ), - valueIsBorderBox, - styles - ) - ) + "px"; -} - -jQuery.extend( { - - // Add in style property hooks for overriding the default - // behavior of getting and setting a style property - cssHooks: { - opacity: { - get: function( elem, computed ) { - if ( computed ) { - - // We should always get a number back from opacity - var ret = curCSS( elem, "opacity" ); - return ret === "" ? "1" : ret; - } - } - } - }, - - // Don't automatically add "px" to these possibly-unitless properties - cssNumber: { - "animationIterationCount": true, - "columnCount": true, - "fillOpacity": true, - "flexGrow": true, - "flexShrink": true, - "fontWeight": true, - "lineHeight": true, - "opacity": true, - "order": true, - "orphans": true, - "widows": true, - "zIndex": true, - "zoom": true - }, - - // Add in properties whose names you wish to fix before - // setting or getting the value - cssProps: { - "float": "cssFloat" - }, - - // Get and set the style property on a DOM Node - style: function( elem, name, value, extra ) { - - // Don't set styles on text and comment nodes - if ( !elem || elem.nodeType === 3 || elem.nodeType === 8 || !elem.style ) { - return; - } - - // Make sure that we're working with the right name - var ret, type, hooks, - origName = jQuery.camelCase( name ), - isCustomProp = rcustomProp.test( name ), - style = elem.style; - - // Make sure that we're working with the right name. We don't - // want to query the value if it is a CSS custom property - // since they are user-defined. - if ( !isCustomProp ) { - name = finalPropName( origName ); - } - - // Gets hook for the prefixed version, then unprefixed version - hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ]; - - // Check if we're setting a value - if ( value !== undefined ) { - type = typeof value; - - // Convert "+=" or "-=" to relative numbers (#7345) - if ( type === "string" && ( ret = rcssNum.exec( value ) ) && ret[ 1 ] ) { - value = adjustCSS( elem, name, ret ); - - // Fixes bug #9237 - type = "number"; - } - - // Make sure that null and NaN values aren't set (#7116) - if ( value == null || value !== value ) { - return; - } - - // If a number was passed in, add the unit (except for certain CSS properties) - if ( type === "number" ) { - value += ret && ret[ 3 ] || ( jQuery.cssNumber[ origName ] ? "" : "px" ); - } - - // background-* props affect original clone's values - if ( !support.clearCloneStyle && value === "" && name.indexOf( "background" ) === 0 ) { - style[ name ] = "inherit"; - } - - // If a hook was provided, use that value, otherwise just set the specified value - if ( !hooks || !( "set" in hooks ) || - ( value = hooks.set( elem, value, extra ) ) !== undefined ) { - - if ( isCustomProp ) { - style.setProperty( name, value ); - } else { - style[ name ] = value; - } - } - - } else { - - // If a hook was provided get the non-computed value from there - if ( hooks && "get" in hooks && - ( ret = hooks.get( elem, false, extra ) ) !== undefined ) { - - return ret; - } - - // Otherwise just get the value from the style object - return style[ name ]; - } - }, - - css: function( elem, name, extra, styles ) { - var val, num, hooks, - origName = jQuery.camelCase( name ), - isCustomProp = rcustomProp.test( name ); - - // Make sure that we're working with the right name. We don't - // want to modify the value if it is a CSS custom property - // since they are user-defined. - if ( !isCustomProp ) { - name = finalPropName( origName ); - } - - // Try prefixed name followed by the unprefixed name - hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ]; - - // If a hook was provided get the computed value from there - if ( hooks && "get" in hooks ) { - val = hooks.get( elem, true, extra ); - } - - // Otherwise, if a way to get the computed value exists, use that - if ( val === undefined ) { - val = curCSS( elem, name, styles ); - } - - // Convert "normal" to computed value - if ( val === "normal" && name in cssNormalTransform ) { - val = cssNormalTransform[ name ]; - } - - // Make numeric if forced or a qualifier was provided and val looks numeric - if ( extra === "" || extra ) { - num = parseFloat( val ); - return extra === true || isFinite( num ) ? num || 0 : val; - } - - return val; - } -} ); - -jQuery.each( [ "height", "width" ], function( i, name ) { - jQuery.cssHooks[ name ] = { - get: function( elem, computed, extra ) { - if ( computed ) { - - // Certain elements can have dimension info if we invisibly show them - // but it must have a current display style that would benefit - return rdisplayswap.test( jQuery.css( elem, "display" ) ) && - - // Support: Safari 8+ - // Table columns in Safari have non-zero offsetWidth & zero - // getBoundingClientRect().width unless display is changed. - // Support: IE <=11 only - // Running getBoundingClientRect on a disconnected node - // in IE throws an error. - ( !elem.getClientRects().length || !elem.getBoundingClientRect().width ) ? - swap( elem, cssShow, function() { - return getWidthOrHeight( elem, name, extra ); - } ) : - getWidthOrHeight( elem, name, extra ); - } - }, - - set: function( elem, value, extra ) { - var matches, - styles = extra && getStyles( elem ), - subtract = extra && augmentWidthOrHeight( - elem, - name, - extra, - jQuery.css( elem, "boxSizing", false, styles ) === "border-box", - styles - ); - - // Convert to pixels if value adjustment is needed - if ( subtract && ( matches = rcssNum.exec( value ) ) && - ( matches[ 3 ] || "px" ) !== "px" ) { - - elem.style[ name ] = value; - value = jQuery.css( elem, name ); - } - - return setPositiveNumber( elem, value, subtract ); - } - }; -} ); - -jQuery.cssHooks.marginLeft = addGetHookIf( support.reliableMarginLeft, - function( elem, computed ) { - if ( computed ) { - return ( parseFloat( curCSS( elem, "marginLeft" ) ) || - elem.getBoundingClientRect().left - - swap( elem, { marginLeft: 0 }, function() { - return elem.getBoundingClientRect().left; - } ) - ) + "px"; - } - } -); - -// These hooks are used by animate to expand properties -jQuery.each( { - margin: "", - padding: "", - border: "Width" -}, function( prefix, suffix ) { - jQuery.cssHooks[ prefix + suffix ] = { - expand: function( value ) { - var i = 0, - expanded = {}, - - // Assumes a single number if not a string - parts = typeof value === "string" ? value.split( " " ) : [ value ]; - - for ( ; i < 4; i++ ) { - expanded[ prefix + cssExpand[ i ] + suffix ] = - parts[ i ] || parts[ i - 2 ] || parts[ 0 ]; - } - - return expanded; - } - }; - - if ( !rmargin.test( prefix ) ) { - jQuery.cssHooks[ prefix + suffix ].set = setPositiveNumber; - } -} ); - -jQuery.fn.extend( { - css: function( name, value ) { - return access( this, function( elem, name, value ) { - var styles, len, - map = {}, - i = 0; - - if ( Array.isArray( name ) ) { - styles = getStyles( elem ); - len = name.length; - - for ( ; i < len; i++ ) { - map[ name[ i ] ] = jQuery.css( elem, name[ i ], false, styles ); - } - - return map; - } - - return value !== undefined ? - jQuery.style( elem, name, value ) : - jQuery.css( elem, name ); - }, name, value, arguments.length > 1 ); - } -} ); - - -function Tween( elem, options, prop, end, easing ) { - return new Tween.prototype.init( elem, options, prop, end, easing ); -} -jQuery.Tween = Tween; - -Tween.prototype = { - constructor: Tween, - init: function( elem, options, prop, end, easing, unit ) { - this.elem = elem; - this.prop = prop; - this.easing = easing || jQuery.easing._default; - this.options = options; - this.start = this.now = this.cur(); - this.end = end; - this.unit = unit || ( jQuery.cssNumber[ prop ] ? "" : "px" ); - }, - cur: function() { - var hooks = Tween.propHooks[ this.prop ]; - - return hooks && hooks.get ? - hooks.get( this ) : - Tween.propHooks._default.get( this ); - }, - run: function( percent ) { - var eased, - hooks = Tween.propHooks[ this.prop ]; - - if ( this.options.duration ) { - this.pos = eased = jQuery.easing[ this.easing ]( - percent, this.options.duration * percent, 0, 1, this.options.duration - ); - } else { - this.pos = eased = percent; - } - this.now = ( this.end - this.start ) * eased + this.start; - - if ( this.options.step ) { - this.options.step.call( this.elem, this.now, this ); - } - - if ( hooks && hooks.set ) { - hooks.set( this ); - } else { - Tween.propHooks._default.set( this ); - } - return this; - } -}; - -Tween.prototype.init.prototype = Tween.prototype; - -Tween.propHooks = { - _default: { - get: function( tween ) { - var result; - - // Use a property on the element directly when it is not a DOM element, - // or when there is no matching style property that exists. - if ( tween.elem.nodeType !== 1 || - tween.elem[ tween.prop ] != null && tween.elem.style[ tween.prop ] == null ) { - return tween.elem[ tween.prop ]; - } - - // Passing an empty string as a 3rd parameter to .css will automatically - // attempt a parseFloat and fallback to a string if the parse fails. - // Simple values such as "10px" are parsed to Float; - // complex values such as "rotate(1rad)" are returned as-is. - result = jQuery.css( tween.elem, tween.prop, "" ); - - // Empty strings, null, undefined and "auto" are converted to 0. - return !result || result === "auto" ? 0 : result; - }, - set: function( tween ) { - - // Use step hook for back compat. - // Use cssHook if its there. - // Use .style if available and use plain properties where available. - if ( jQuery.fx.step[ tween.prop ] ) { - jQuery.fx.step[ tween.prop ]( tween ); - } else if ( tween.elem.nodeType === 1 && - ( tween.elem.style[ jQuery.cssProps[ tween.prop ] ] != null || - jQuery.cssHooks[ tween.prop ] ) ) { - jQuery.style( tween.elem, tween.prop, tween.now + tween.unit ); - } else { - tween.elem[ tween.prop ] = tween.now; - } - } - } -}; - -// Support: IE <=9 only -// Panic based approach to setting things on disconnected nodes -Tween.propHooks.scrollTop = Tween.propHooks.scrollLeft = { - set: function( tween ) { - if ( tween.elem.nodeType && tween.elem.parentNode ) { - tween.elem[ tween.prop ] = tween.now; - } - } -}; - -jQuery.easing = { - linear: function( p ) { - return p; - }, - swing: function( p ) { - return 0.5 - Math.cos( p * Math.PI ) / 2; - }, - _default: "swing" -}; - -jQuery.fx = Tween.prototype.init; - -// Back compat <1.8 extension point -jQuery.fx.step = {}; - - - - -var - fxNow, inProgress, - rfxtypes = /^(?:toggle|show|hide)$/, - rrun = /queueHooks$/; - -function schedule() { - if ( inProgress ) { - if ( document.hidden === false && window.requestAnimationFrame ) { - window.requestAnimationFrame( schedule ); - } else { - window.setTimeout( schedule, jQuery.fx.interval ); - } - - jQuery.fx.tick(); - } -} - -// Animations created synchronously will run synchronously -function createFxNow() { - window.setTimeout( function() { - fxNow = undefined; - } ); - return ( fxNow = jQuery.now() ); -} - -// Generate parameters to create a standard animation -function genFx( type, includeWidth ) { - var which, - i = 0, - attrs = { height: type }; - - // If we include width, step value is 1 to do all cssExpand values, - // otherwise step value is 2 to skip over Left and Right - includeWidth = includeWidth ? 1 : 0; - for ( ; i < 4; i += 2 - includeWidth ) { - which = cssExpand[ i ]; - attrs[ "margin" + which ] = attrs[ "padding" + which ] = type; - } - - if ( includeWidth ) { - attrs.opacity = attrs.width = type; - } - - return attrs; -} - -function createTween( value, prop, animation ) { - var tween, - collection = ( Animation.tweeners[ prop ] || [] ).concat( Animation.tweeners[ "*" ] ), - index = 0, - length = collection.length; - for ( ; index < length; index++ ) { - if ( ( tween = collection[ index ].call( animation, prop, value ) ) ) { - - // We're done with this property - return tween; - } - } -} - -function defaultPrefilter( elem, props, opts ) { - var prop, value, toggle, hooks, oldfire, propTween, restoreDisplay, display, - isBox = "width" in props || "height" in props, - anim = this, - orig = {}, - style = elem.style, - hidden = elem.nodeType && isHiddenWithinTree( elem ), - dataShow = dataPriv.get( elem, "fxshow" ); - - // Queue-skipping animations hijack the fx hooks - if ( !opts.queue ) { - hooks = jQuery._queueHooks( elem, "fx" ); - if ( hooks.unqueued == null ) { - hooks.unqueued = 0; - oldfire = hooks.empty.fire; - hooks.empty.fire = function() { - if ( !hooks.unqueued ) { - oldfire(); - } - }; - } - hooks.unqueued++; - - anim.always( function() { - - // Ensure the complete handler is called before this completes - anim.always( function() { - hooks.unqueued--; - if ( !jQuery.queue( elem, "fx" ).length ) { - hooks.empty.fire(); - } - } ); - } ); - } - - // Detect show/hide animations - for ( prop in props ) { - value = props[ prop ]; - if ( rfxtypes.test( value ) ) { - delete props[ prop ]; - toggle = toggle || value === "toggle"; - if ( value === ( hidden ? "hide" : "show" ) ) { - - // Pretend to be hidden if this is a "show" and - // there is still data from a stopped show/hide - if ( value === "show" && dataShow && dataShow[ prop ] !== undefined ) { - hidden = true; - - // Ignore all other no-op show/hide data - } else { - continue; - } - } - orig[ prop ] = dataShow && dataShow[ prop ] || jQuery.style( elem, prop ); - } - } - - // Bail out if this is a no-op like .hide().hide() - propTween = !jQuery.isEmptyObject( props ); - if ( !propTween && jQuery.isEmptyObject( orig ) ) { - return; - } - - // Restrict "overflow" and "display" styles during box animations - if ( isBox && elem.nodeType === 1 ) { - - // Support: IE <=9 - 11, Edge 12 - 13 - // Record all 3 overflow attributes because IE does not infer the shorthand - // from identically-valued overflowX and overflowY - opts.overflow = [ style.overflow, style.overflowX, style.overflowY ]; - - // Identify a display type, preferring old show/hide data over the CSS cascade - restoreDisplay = dataShow && dataShow.display; - if ( restoreDisplay == null ) { - restoreDisplay = dataPriv.get( elem, "display" ); - } - display = jQuery.css( elem, "display" ); - if ( display === "none" ) { - if ( restoreDisplay ) { - display = restoreDisplay; - } else { - - // Get nonempty value(s) by temporarily forcing visibility - showHide( [ elem ], true ); - restoreDisplay = elem.style.display || restoreDisplay; - display = jQuery.css( elem, "display" ); - showHide( [ elem ] ); - } - } - - // Animate inline elements as inline-block - if ( display === "inline" || display === "inline-block" && restoreDisplay != null ) { - if ( jQuery.css( elem, "float" ) === "none" ) { - - // Restore the original display value at the end of pure show/hide animations - if ( !propTween ) { - anim.done( function() { - style.display = restoreDisplay; - } ); - if ( restoreDisplay == null ) { - display = style.display; - restoreDisplay = display === "none" ? "" : display; - } - } - style.display = "inline-block"; - } - } - } - - if ( opts.overflow ) { - style.overflow = "hidden"; - anim.always( function() { - style.overflow = opts.overflow[ 0 ]; - style.overflowX = opts.overflow[ 1 ]; - style.overflowY = opts.overflow[ 2 ]; - } ); - } - - // Implement show/hide animations - propTween = false; - for ( prop in orig ) { - - // General show/hide setup for this element animation - if ( !propTween ) { - if ( dataShow ) { - if ( "hidden" in dataShow ) { - hidden = dataShow.hidden; - } - } else { - dataShow = dataPriv.access( elem, "fxshow", { display: restoreDisplay } ); - } - - // Store hidden/visible for toggle so `.stop().toggle()` "reverses" - if ( toggle ) { - dataShow.hidden = !hidden; - } - - // Show elements before animating them - if ( hidden ) { - showHide( [ elem ], true ); - } - - /* eslint-disable no-loop-func */ - - anim.done( function() { - - /* eslint-enable no-loop-func */ - - // The final step of a "hide" animation is actually hiding the element - if ( !hidden ) { - showHide( [ elem ] ); - } - dataPriv.remove( elem, "fxshow" ); - for ( prop in orig ) { - jQuery.style( elem, prop, orig[ prop ] ); - } - } ); - } - - // Per-property setup - propTween = createTween( hidden ? dataShow[ prop ] : 0, prop, anim ); - if ( !( prop in dataShow ) ) { - dataShow[ prop ] = propTween.start; - if ( hidden ) { - propTween.end = propTween.start; - propTween.start = 0; - } - } - } -} - -function propFilter( props, specialEasing ) { - var index, name, easing, value, hooks; - - // camelCase, specialEasing and expand cssHook pass - for ( index in props ) { - name = jQuery.camelCase( index ); - easing = specialEasing[ name ]; - value = props[ index ]; - if ( Array.isArray( value ) ) { - easing = value[ 1 ]; - value = props[ index ] = value[ 0 ]; - } - - if ( index !== name ) { - props[ name ] = value; - delete props[ index ]; - } - - hooks = jQuery.cssHooks[ name ]; - if ( hooks && "expand" in hooks ) { - value = hooks.expand( value ); - delete props[ name ]; - - // Not quite $.extend, this won't overwrite existing keys. - // Reusing 'index' because we have the correct "name" - for ( index in value ) { - if ( !( index in props ) ) { - props[ index ] = value[ index ]; - specialEasing[ index ] = easing; - } - } - } else { - specialEasing[ name ] = easing; - } - } -} - -function Animation( elem, properties, options ) { - var result, - stopped, - index = 0, - length = Animation.prefilters.length, - deferred = jQuery.Deferred().always( function() { - - // Don't match elem in the :animated selector - delete tick.elem; - } ), - tick = function() { - if ( stopped ) { - return false; - } - var currentTime = fxNow || createFxNow(), - remaining = Math.max( 0, animation.startTime + animation.duration - currentTime ), - - // Support: Android 2.3 only - // Archaic crash bug won't allow us to use `1 - ( 0.5 || 0 )` (#12497) - temp = remaining / animation.duration || 0, - percent = 1 - temp, - index = 0, - length = animation.tweens.length; - - for ( ; index < length; index++ ) { - animation.tweens[ index ].run( percent ); - } - - deferred.notifyWith( elem, [ animation, percent, remaining ] ); - - // If there's more to do, yield - if ( percent < 1 && length ) { - return remaining; - } - - // If this was an empty animation, synthesize a final progress notification - if ( !length ) { - deferred.notifyWith( elem, [ animation, 1, 0 ] ); - } - - // Resolve the animation and report its conclusion - deferred.resolveWith( elem, [ animation ] ); - return false; - }, - animation = deferred.promise( { - elem: elem, - props: jQuery.extend( {}, properties ), - opts: jQuery.extend( true, { - specialEasing: {}, - easing: jQuery.easing._default - }, options ), - originalProperties: properties, - originalOptions: options, - startTime: fxNow || createFxNow(), - duration: options.duration, - tweens: [], - createTween: function( prop, end ) { - var tween = jQuery.Tween( elem, animation.opts, prop, end, - animation.opts.specialEasing[ prop ] || animation.opts.easing ); - animation.tweens.push( tween ); - return tween; - }, - stop: function( gotoEnd ) { - var index = 0, - - // If we are going to the end, we want to run all the tweens - // otherwise we skip this part - length = gotoEnd ? animation.tweens.length : 0; - if ( stopped ) { - return this; - } - stopped = true; - for ( ; index < length; index++ ) { - animation.tweens[ index ].run( 1 ); - } - - // Resolve when we played the last frame; otherwise, reject - if ( gotoEnd ) { - deferred.notifyWith( elem, [ animation, 1, 0 ] ); - deferred.resolveWith( elem, [ animation, gotoEnd ] ); - } else { - deferred.rejectWith( elem, [ animation, gotoEnd ] ); - } - return this; - } - } ), - props = animation.props; - - propFilter( props, animation.opts.specialEasing ); - - for ( ; index < length; index++ ) { - result = Animation.prefilters[ index ].call( animation, elem, props, animation.opts ); - if ( result ) { - if ( jQuery.isFunction( result.stop ) ) { - jQuery._queueHooks( animation.elem, animation.opts.queue ).stop = - jQuery.proxy( result.stop, result ); - } - return result; - } - } - - jQuery.map( props, createTween, animation ); - - if ( jQuery.isFunction( animation.opts.start ) ) { - animation.opts.start.call( elem, animation ); - } - - // Attach callbacks from options - animation - .progress( animation.opts.progress ) - .done( animation.opts.done, animation.opts.complete ) - .fail( animation.opts.fail ) - .always( animation.opts.always ); - - jQuery.fx.timer( - jQuery.extend( tick, { - elem: elem, - anim: animation, - queue: animation.opts.queue - } ) - ); - - return animation; -} - -jQuery.Animation = jQuery.extend( Animation, { - - tweeners: { - "*": [ function( prop, value ) { - var tween = this.createTween( prop, value ); - adjustCSS( tween.elem, prop, rcssNum.exec( value ), tween ); - return tween; - } ] - }, - - tweener: function( props, callback ) { - if ( jQuery.isFunction( props ) ) { - callback = props; - props = [ "*" ]; - } else { - props = props.match( rnothtmlwhite ); - } - - var prop, - index = 0, - length = props.length; - - for ( ; index < length; index++ ) { - prop = props[ index ]; - Animation.tweeners[ prop ] = Animation.tweeners[ prop ] || []; - Animation.tweeners[ prop ].unshift( callback ); - } - }, - - prefilters: [ defaultPrefilter ], - - prefilter: function( callback, prepend ) { - if ( prepend ) { - Animation.prefilters.unshift( callback ); - } else { - Animation.prefilters.push( callback ); - } - } -} ); - -jQuery.speed = function( speed, easing, fn ) { - var opt = speed && typeof speed === "object" ? jQuery.extend( {}, speed ) : { - complete: fn || !fn && easing || - jQuery.isFunction( speed ) && speed, - duration: speed, - easing: fn && easing || easing && !jQuery.isFunction( easing ) && easing - }; - - // Go to the end state if fx are off - if ( jQuery.fx.off ) { - opt.duration = 0; - - } else { - if ( typeof opt.duration !== "number" ) { - if ( opt.duration in jQuery.fx.speeds ) { - opt.duration = jQuery.fx.speeds[ opt.duration ]; - - } else { - opt.duration = jQuery.fx.speeds._default; - } - } - } - - // Normalize opt.queue - true/undefined/null -> "fx" - if ( opt.queue == null || opt.queue === true ) { - opt.queue = "fx"; - } - - // Queueing - opt.old = opt.complete; - - opt.complete = function() { - if ( jQuery.isFunction( opt.old ) ) { - opt.old.call( this ); - } - - if ( opt.queue ) { - jQuery.dequeue( this, opt.queue ); - } - }; - - return opt; -}; - -jQuery.fn.extend( { - fadeTo: function( speed, to, easing, callback ) { - - // Show any hidden elements after setting opacity to 0 - return this.filter( isHiddenWithinTree ).css( "opacity", 0 ).show() - - // Animate to the value specified - .end().animate( { opacity: to }, speed, easing, callback ); - }, - animate: function( prop, speed, easing, callback ) { - var empty = jQuery.isEmptyObject( prop ), - optall = jQuery.speed( speed, easing, callback ), - doAnimation = function() { - - // Operate on a copy of prop so per-property easing won't be lost - var anim = Animation( this, jQuery.extend( {}, prop ), optall ); - - // Empty animations, or finishing resolves immediately - if ( empty || dataPriv.get( this, "finish" ) ) { - anim.stop( true ); - } - }; - doAnimation.finish = doAnimation; - - return empty || optall.queue === false ? - this.each( doAnimation ) : - this.queue( optall.queue, doAnimation ); - }, - stop: function( type, clearQueue, gotoEnd ) { - var stopQueue = function( hooks ) { - var stop = hooks.stop; - delete hooks.stop; - stop( gotoEnd ); - }; - - if ( typeof type !== "string" ) { - gotoEnd = clearQueue; - clearQueue = type; - type = undefined; - } - if ( clearQueue && type !== false ) { - this.queue( type || "fx", [] ); - } - - return this.each( function() { - var dequeue = true, - index = type != null && type + "queueHooks", - timers = jQuery.timers, - data = dataPriv.get( this ); - - if ( index ) { - if ( data[ index ] && data[ index ].stop ) { - stopQueue( data[ index ] ); - } - } else { - for ( index in data ) { - if ( data[ index ] && data[ index ].stop && rrun.test( index ) ) { - stopQueue( data[ index ] ); - } - } - } - - for ( index = timers.length; index--; ) { - if ( timers[ index ].elem === this && - ( type == null || timers[ index ].queue === type ) ) { - - timers[ index ].anim.stop( gotoEnd ); - dequeue = false; - timers.splice( index, 1 ); - } - } - - // Start the next in the queue if the last step wasn't forced. - // Timers currently will call their complete callbacks, which - // will dequeue but only if they were gotoEnd. - if ( dequeue || !gotoEnd ) { - jQuery.dequeue( this, type ); - } - } ); - }, - finish: function( type ) { - if ( type !== false ) { - type = type || "fx"; - } - return this.each( function() { - var index, - data = dataPriv.get( this ), - queue = data[ type + "queue" ], - hooks = data[ type + "queueHooks" ], - timers = jQuery.timers, - length = queue ? queue.length : 0; - - // Enable finishing flag on private data - data.finish = true; - - // Empty the queue first - jQuery.queue( this, type, [] ); - - if ( hooks && hooks.stop ) { - hooks.stop.call( this, true ); - } - - // Look for any active animations, and finish them - for ( index = timers.length; index--; ) { - if ( timers[ index ].elem === this && timers[ index ].queue === type ) { - timers[ index ].anim.stop( true ); - timers.splice( index, 1 ); - } - } - - // Look for any animations in the old queue and finish them - for ( index = 0; index < length; index++ ) { - if ( queue[ index ] && queue[ index ].finish ) { - queue[ index ].finish.call( this ); - } - } - - // Turn off finishing flag - delete data.finish; - } ); - } -} ); - -jQuery.each( [ "toggle", "show", "hide" ], function( i, name ) { - var cssFn = jQuery.fn[ name ]; - jQuery.fn[ name ] = function( speed, easing, callback ) { - return speed == null || typeof speed === "boolean" ? - cssFn.apply( this, arguments ) : - this.animate( genFx( name, true ), speed, easing, callback ); - }; -} ); - -// Generate shortcuts for custom animations -jQuery.each( { - slideDown: genFx( "show" ), - slideUp: genFx( "hide" ), - slideToggle: genFx( "toggle" ), - fadeIn: { opacity: "show" }, - fadeOut: { opacity: "hide" }, - fadeToggle: { opacity: "toggle" } -}, function( name, props ) { - jQuery.fn[ name ] = function( speed, easing, callback ) { - return this.animate( props, speed, easing, callback ); - }; -} ); - -jQuery.timers = []; -jQuery.fx.tick = function() { - var timer, - i = 0, - timers = jQuery.timers; - - fxNow = jQuery.now(); - - for ( ; i < timers.length; i++ ) { - timer = timers[ i ]; - - // Run the timer and safely remove it when done (allowing for external removal) - if ( !timer() && timers[ i ] === timer ) { - timers.splice( i--, 1 ); - } - } - - if ( !timers.length ) { - jQuery.fx.stop(); - } - fxNow = undefined; -}; - -jQuery.fx.timer = function( timer ) { - jQuery.timers.push( timer ); - jQuery.fx.start(); -}; - -jQuery.fx.interval = 13; -jQuery.fx.start = function() { - if ( inProgress ) { - return; - } - - inProgress = true; - schedule(); -}; - -jQuery.fx.stop = function() { - inProgress = null; -}; - -jQuery.fx.speeds = { - slow: 600, - fast: 200, - - // Default speed - _default: 400 -}; - - -// Based off of the plugin by Clint Helfers, with permission. -// https://web.archive.org/web/20100324014747/http://blindsignals.com/index.php/2009/07/jquery-delay/ -jQuery.fn.delay = function( time, type ) { - time = jQuery.fx ? jQuery.fx.speeds[ time ] || time : time; - type = type || "fx"; - - return this.queue( type, function( next, hooks ) { - var timeout = window.setTimeout( next, time ); - hooks.stop = function() { - window.clearTimeout( timeout ); - }; - } ); -}; - - -( function() { - var input = document.createElement( "input" ), - select = document.createElement( "select" ), - opt = select.appendChild( document.createElement( "option" ) ); - - input.type = "checkbox"; - - // Support: Android <=4.3 only - // Default value for a checkbox should be "on" - support.checkOn = input.value !== ""; - - // Support: IE <=11 only - // Must access selectedIndex to make default options select - support.optSelected = opt.selected; - - // Support: IE <=11 only - // An input loses its value after becoming a radio - input = document.createElement( "input" ); - input.value = "t"; - input.type = "radio"; - support.radioValue = input.value === "t"; -} )(); - - -var boolHook, - attrHandle = jQuery.expr.attrHandle; - -jQuery.fn.extend( { - attr: function( name, value ) { - return access( this, jQuery.attr, name, value, arguments.length > 1 ); - }, - - removeAttr: function( name ) { - return this.each( function() { - jQuery.removeAttr( this, name ); - } ); - } -} ); - -jQuery.extend( { - attr: function( elem, name, value ) { - var ret, hooks, - nType = elem.nodeType; - - // Don't get/set attributes on text, comment and attribute nodes - if ( nType === 3 || nType === 8 || nType === 2 ) { - return; - } - - // Fallback to prop when attributes are not supported - if ( typeof elem.getAttribute === "undefined" ) { - return jQuery.prop( elem, name, value ); - } - - // Attribute hooks are determined by the lowercase version - // Grab necessary hook if one is defined - if ( nType !== 1 || !jQuery.isXMLDoc( elem ) ) { - hooks = jQuery.attrHooks[ name.toLowerCase() ] || - ( jQuery.expr.match.bool.test( name ) ? boolHook : undefined ); - } - - if ( value !== undefined ) { - if ( value === null ) { - jQuery.removeAttr( elem, name ); - return; - } - - if ( hooks && "set" in hooks && - ( ret = hooks.set( elem, value, name ) ) !== undefined ) { - return ret; - } - - elem.setAttribute( name, value + "" ); - return value; - } - - if ( hooks && "get" in hooks && ( ret = hooks.get( elem, name ) ) !== null ) { - return ret; - } - - ret = jQuery.find.attr( elem, name ); - - // Non-existent attributes return null, we normalize to undefined - return ret == null ? undefined : ret; - }, - - attrHooks: { - type: { - set: function( elem, value ) { - if ( !support.radioValue && value === "radio" && - nodeName( elem, "input" ) ) { - var val = elem.value; - elem.setAttribute( "type", value ); - if ( val ) { - elem.value = val; - } - return value; - } - } - } - }, - - removeAttr: function( elem, value ) { - var name, - i = 0, - - // Attribute names can contain non-HTML whitespace characters - // https://html.spec.whatwg.org/multipage/syntax.html#attributes-2 - attrNames = value && value.match( rnothtmlwhite ); - - if ( attrNames && elem.nodeType === 1 ) { - while ( ( name = attrNames[ i++ ] ) ) { - elem.removeAttribute( name ); - } - } - } -} ); - -// Hooks for boolean attributes -boolHook = { - set: function( elem, value, name ) { - if ( value === false ) { - - // Remove boolean attributes when set to false - jQuery.removeAttr( elem, name ); - } else { - elem.setAttribute( name, name ); - } - return name; - } -}; - -jQuery.each( jQuery.expr.match.bool.source.match( /\w+/g ), function( i, name ) { - var getter = attrHandle[ name ] || jQuery.find.attr; - - attrHandle[ name ] = function( elem, name, isXML ) { - var ret, handle, - lowercaseName = name.toLowerCase(); - - if ( !isXML ) { - - // Avoid an infinite loop by temporarily removing this function from the getter - handle = attrHandle[ lowercaseName ]; - attrHandle[ lowercaseName ] = ret; - ret = getter( elem, name, isXML ) != null ? - lowercaseName : - null; - attrHandle[ lowercaseName ] = handle; - } - return ret; - }; -} ); - - - - -var rfocusable = /^(?:input|select|textarea|button)$/i, - rclickable = /^(?:a|area)$/i; - -jQuery.fn.extend( { - prop: function( name, value ) { - return access( this, jQuery.prop, name, value, arguments.length > 1 ); - }, - - removeProp: function( name ) { - return this.each( function() { - delete this[ jQuery.propFix[ name ] || name ]; - } ); - } -} ); - -jQuery.extend( { - prop: function( elem, name, value ) { - var ret, hooks, - nType = elem.nodeType; - - // Don't get/set properties on text, comment and attribute nodes - if ( nType === 3 || nType === 8 || nType === 2 ) { - return; - } - - if ( nType !== 1 || !jQuery.isXMLDoc( elem ) ) { - - // Fix name and attach hooks - name = jQuery.propFix[ name ] || name; - hooks = jQuery.propHooks[ name ]; - } - - if ( value !== undefined ) { - if ( hooks && "set" in hooks && - ( ret = hooks.set( elem, value, name ) ) !== undefined ) { - return ret; - } - - return ( elem[ name ] = value ); - } - - if ( hooks && "get" in hooks && ( ret = hooks.get( elem, name ) ) !== null ) { - return ret; - } - - return elem[ name ]; - }, - - propHooks: { - tabIndex: { - get: function( elem ) { - - // Support: IE <=9 - 11 only - // elem.tabIndex doesn't always return the - // correct value when it hasn't been explicitly set - // https://web.archive.org/web/20141116233347/http://fluidproject.org/blog/2008/01/09/getting-setting-and-removing-tabindex-values-with-javascript/ - // Use proper attribute retrieval(#12072) - var tabindex = jQuery.find.attr( elem, "tabindex" ); - - if ( tabindex ) { - return parseInt( tabindex, 10 ); - } - - if ( - rfocusable.test( elem.nodeName ) || - rclickable.test( elem.nodeName ) && - elem.href - ) { - return 0; - } - - return -1; - } - } - }, - - propFix: { - "for": "htmlFor", - "class": "className" - } -} ); - -// Support: IE <=11 only -// Accessing the selectedIndex property -// forces the browser to respect setting selected -// on the option -// The getter ensures a default option is selected -// when in an optgroup -// eslint rule "no-unused-expressions" is disabled for this code -// since it considers such accessions noop -if ( !support.optSelected ) { - jQuery.propHooks.selected = { - get: function( elem ) { - - /* eslint no-unused-expressions: "off" */ - - var parent = elem.parentNode; - if ( parent && parent.parentNode ) { - parent.parentNode.selectedIndex; - } - return null; - }, - set: function( elem ) { - - /* eslint no-unused-expressions: "off" */ - - var parent = elem.parentNode; - if ( parent ) { - parent.selectedIndex; - - if ( parent.parentNode ) { - parent.parentNode.selectedIndex; - } - } - } - }; -} - -jQuery.each( [ - "tabIndex", - "readOnly", - "maxLength", - "cellSpacing", - "cellPadding", - "rowSpan", - "colSpan", - "useMap", - "frameBorder", - "contentEditable" -], function() { - jQuery.propFix[ this.toLowerCase() ] = this; -} ); - - - - - // Strip and collapse whitespace according to HTML spec - // https://html.spec.whatwg.org/multipage/infrastructure.html#strip-and-collapse-whitespace - function stripAndCollapse( value ) { - var tokens = value.match( rnothtmlwhite ) || []; - return tokens.join( " " ); - } - - -function getClass( elem ) { - return elem.getAttribute && elem.getAttribute( "class" ) || ""; -} - -jQuery.fn.extend( { - addClass: function( value ) { - var classes, elem, cur, curValue, clazz, j, finalValue, - i = 0; - - if ( jQuery.isFunction( value ) ) { - return this.each( function( j ) { - jQuery( this ).addClass( value.call( this, j, getClass( this ) ) ); - } ); - } - - if ( typeof value === "string" && value ) { - classes = value.match( rnothtmlwhite ) || []; - - while ( ( elem = this[ i++ ] ) ) { - curValue = getClass( elem ); - cur = elem.nodeType === 1 && ( " " + stripAndCollapse( curValue ) + " " ); - - if ( cur ) { - j = 0; - while ( ( clazz = classes[ j++ ] ) ) { - if ( cur.indexOf( " " + clazz + " " ) < 0 ) { - cur += clazz + " "; - } - } - - // Only assign if different to avoid unneeded rendering. - finalValue = stripAndCollapse( cur ); - if ( curValue !== finalValue ) { - elem.setAttribute( "class", finalValue ); - } - } - } - } - - return this; - }, - - removeClass: function( value ) { - var classes, elem, cur, curValue, clazz, j, finalValue, - i = 0; - - if ( jQuery.isFunction( value ) ) { - return this.each( function( j ) { - jQuery( this ).removeClass( value.call( this, j, getClass( this ) ) ); - } ); - } - - if ( !arguments.length ) { - return this.attr( "class", "" ); - } - - if ( typeof value === "string" && value ) { - classes = value.match( rnothtmlwhite ) || []; - - while ( ( elem = this[ i++ ] ) ) { - curValue = getClass( elem ); - - // This expression is here for better compressibility (see addClass) - cur = elem.nodeType === 1 && ( " " + stripAndCollapse( curValue ) + " " ); - - if ( cur ) { - j = 0; - while ( ( clazz = classes[ j++ ] ) ) { - - // Remove *all* instances - while ( cur.indexOf( " " + clazz + " " ) > -1 ) { - cur = cur.replace( " " + clazz + " ", " " ); - } - } - - // Only assign if different to avoid unneeded rendering. - finalValue = stripAndCollapse( cur ); - if ( curValue !== finalValue ) { - elem.setAttribute( "class", finalValue ); - } - } - } - } - - return this; - }, - - toggleClass: function( value, stateVal ) { - var type = typeof value; - - if ( typeof stateVal === "boolean" && type === "string" ) { - return stateVal ? this.addClass( value ) : this.removeClass( value ); - } - - if ( jQuery.isFunction( value ) ) { - return this.each( function( i ) { - jQuery( this ).toggleClass( - value.call( this, i, getClass( this ), stateVal ), - stateVal - ); - } ); - } - - return this.each( function() { - var className, i, self, classNames; - - if ( type === "string" ) { - - // Toggle individual class names - i = 0; - self = jQuery( this ); - classNames = value.match( rnothtmlwhite ) || []; - - while ( ( className = classNames[ i++ ] ) ) { - - // Check each className given, space separated list - if ( self.hasClass( className ) ) { - self.removeClass( className ); - } else { - self.addClass( className ); - } - } - - // Toggle whole class name - } else if ( value === undefined || type === "boolean" ) { - className = getClass( this ); - if ( className ) { - - // Store className if set - dataPriv.set( this, "__className__", className ); - } - - // If the element has a class name or if we're passed `false`, - // then remove the whole classname (if there was one, the above saved it). - // Otherwise bring back whatever was previously saved (if anything), - // falling back to the empty string if nothing was stored. - if ( this.setAttribute ) { - this.setAttribute( "class", - className || value === false ? - "" : - dataPriv.get( this, "__className__" ) || "" - ); - } - } - } ); - }, - - hasClass: function( selector ) { - var className, elem, - i = 0; - - className = " " + selector + " "; - while ( ( elem = this[ i++ ] ) ) { - if ( elem.nodeType === 1 && - ( " " + stripAndCollapse( getClass( elem ) ) + " " ).indexOf( className ) > -1 ) { - return true; - } - } - - return false; - } -} ); - - - - -var rreturn = /\r/g; - -jQuery.fn.extend( { - val: function( value ) { - var hooks, ret, isFunction, - elem = this[ 0 ]; - - if ( !arguments.length ) { - if ( elem ) { - hooks = jQuery.valHooks[ elem.type ] || - jQuery.valHooks[ elem.nodeName.toLowerCase() ]; - - if ( hooks && - "get" in hooks && - ( ret = hooks.get( elem, "value" ) ) !== undefined - ) { - return ret; - } - - ret = elem.value; - - // Handle most common string cases - if ( typeof ret === "string" ) { - return ret.replace( rreturn, "" ); - } - - // Handle cases where value is null/undef or number - return ret == null ? "" : ret; - } - - return; - } - - isFunction = jQuery.isFunction( value ); - - return this.each( function( i ) { - var val; - - if ( this.nodeType !== 1 ) { - return; - } - - if ( isFunction ) { - val = value.call( this, i, jQuery( this ).val() ); - } else { - val = value; - } - - // Treat null/undefined as ""; convert numbers to string - if ( val == null ) { - val = ""; - - } else if ( typeof val === "number" ) { - val += ""; - - } else if ( Array.isArray( val ) ) { - val = jQuery.map( val, function( value ) { - return value == null ? "" : value + ""; - } ); - } - - hooks = jQuery.valHooks[ this.type ] || jQuery.valHooks[ this.nodeName.toLowerCase() ]; - - // If set returns undefined, fall back to normal setting - if ( !hooks || !( "set" in hooks ) || hooks.set( this, val, "value" ) === undefined ) { - this.value = val; - } - } ); - } -} ); - -jQuery.extend( { - valHooks: { - option: { - get: function( elem ) { - - var val = jQuery.find.attr( elem, "value" ); - return val != null ? - val : - - // Support: IE <=10 - 11 only - // option.text throws exceptions (#14686, #14858) - // Strip and collapse whitespace - // https://html.spec.whatwg.org/#strip-and-collapse-whitespace - stripAndCollapse( jQuery.text( elem ) ); - } - }, - select: { - get: function( elem ) { - var value, option, i, - options = elem.options, - index = elem.selectedIndex, - one = elem.type === "select-one", - values = one ? null : [], - max = one ? index + 1 : options.length; - - if ( index < 0 ) { - i = max; - - } else { - i = one ? index : 0; - } - - // Loop through all the selected options - for ( ; i < max; i++ ) { - option = options[ i ]; - - // Support: IE <=9 only - // IE8-9 doesn't update selected after form reset (#2551) - if ( ( option.selected || i === index ) && - - // Don't return options that are disabled or in a disabled optgroup - !option.disabled && - ( !option.parentNode.disabled || - !nodeName( option.parentNode, "optgroup" ) ) ) { - - // Get the specific value for the option - value = jQuery( option ).val(); - - // We don't need an array for one selects - if ( one ) { - return value; - } - - // Multi-Selects return an array - values.push( value ); - } - } - - return values; - }, - - set: function( elem, value ) { - var optionSet, option, - options = elem.options, - values = jQuery.makeArray( value ), - i = options.length; - - while ( i-- ) { - option = options[ i ]; - - /* eslint-disable no-cond-assign */ - - if ( option.selected = - jQuery.inArray( jQuery.valHooks.option.get( option ), values ) > -1 - ) { - optionSet = true; - } - - /* eslint-enable no-cond-assign */ - } - - // Force browsers to behave consistently when non-matching value is set - if ( !optionSet ) { - elem.selectedIndex = -1; - } - return values; - } - } - } -} ); - -// Radios and checkboxes getter/setter -jQuery.each( [ "radio", "checkbox" ], function() { - jQuery.valHooks[ this ] = { - set: function( elem, value ) { - if ( Array.isArray( value ) ) { - return ( elem.checked = jQuery.inArray( jQuery( elem ).val(), value ) > -1 ); - } - } - }; - if ( !support.checkOn ) { - jQuery.valHooks[ this ].get = function( elem ) { - return elem.getAttribute( "value" ) === null ? "on" : elem.value; - }; - } -} ); - - - - -// Return jQuery for attributes-only inclusion - - -var rfocusMorph = /^(?:focusinfocus|focusoutblur)$/; - -jQuery.extend( jQuery.event, { - - trigger: function( event, data, elem, onlyHandlers ) { - - var i, cur, tmp, bubbleType, ontype, handle, special, - eventPath = [ elem || document ], - type = hasOwn.call( event, "type" ) ? event.type : event, - namespaces = hasOwn.call( event, "namespace" ) ? event.namespace.split( "." ) : []; - - cur = tmp = elem = elem || document; - - // Don't do events on text and comment nodes - if ( elem.nodeType === 3 || elem.nodeType === 8 ) { - return; - } - - // focus/blur morphs to focusin/out; ensure we're not firing them right now - if ( rfocusMorph.test( type + jQuery.event.triggered ) ) { - return; - } - - if ( type.indexOf( "." ) > -1 ) { - - // Namespaced trigger; create a regexp to match event type in handle() - namespaces = type.split( "." ); - type = namespaces.shift(); - namespaces.sort(); - } - ontype = type.indexOf( ":" ) < 0 && "on" + type; - - // Caller can pass in a jQuery.Event object, Object, or just an event type string - event = event[ jQuery.expando ] ? - event : - new jQuery.Event( type, typeof event === "object" && event ); - - // Trigger bitmask: & 1 for native handlers; & 2 for jQuery (always true) - event.isTrigger = onlyHandlers ? 2 : 3; - event.namespace = namespaces.join( "." ); - event.rnamespace = event.namespace ? - new RegExp( "(^|\\.)" + namespaces.join( "\\.(?:.*\\.|)" ) + "(\\.|$)" ) : - null; - - // Clean up the event in case it is being reused - event.result = undefined; - if ( !event.target ) { - event.target = elem; - } - - // Clone any incoming data and prepend the event, creating the handler arg list - data = data == null ? - [ event ] : - jQuery.makeArray( data, [ event ] ); - - // Allow special events to draw outside the lines - special = jQuery.event.special[ type ] || {}; - if ( !onlyHandlers && special.trigger && special.trigger.apply( elem, data ) === false ) { - return; - } - - // Determine event propagation path in advance, per W3C events spec (#9951) - // Bubble up to document, then to window; watch for a global ownerDocument var (#9724) - if ( !onlyHandlers && !special.noBubble && !jQuery.isWindow( elem ) ) { - - bubbleType = special.delegateType || type; - if ( !rfocusMorph.test( bubbleType + type ) ) { - cur = cur.parentNode; - } - for ( ; cur; cur = cur.parentNode ) { - eventPath.push( cur ); - tmp = cur; - } - - // Only add window if we got to document (e.g., not plain obj or detached DOM) - if ( tmp === ( elem.ownerDocument || document ) ) { - eventPath.push( tmp.defaultView || tmp.parentWindow || window ); - } - } - - // Fire handlers on the event path - i = 0; - while ( ( cur = eventPath[ i++ ] ) && !event.isPropagationStopped() ) { - - event.type = i > 1 ? - bubbleType : - special.bindType || type; - - // jQuery handler - handle = ( dataPriv.get( cur, "events" ) || {} )[ event.type ] && - dataPriv.get( cur, "handle" ); - if ( handle ) { - handle.apply( cur, data ); - } - - // Native handler - handle = ontype && cur[ ontype ]; - if ( handle && handle.apply && acceptData( cur ) ) { - event.result = handle.apply( cur, data ); - if ( event.result === false ) { - event.preventDefault(); - } - } - } - event.type = type; - - // If nobody prevented the default action, do it now - if ( !onlyHandlers && !event.isDefaultPrevented() ) { - - if ( ( !special._default || - special._default.apply( eventPath.pop(), data ) === false ) && - acceptData( elem ) ) { - - // Call a native DOM method on the target with the same name as the event. - // Don't do default actions on window, that's where global variables be (#6170) - if ( ontype && jQuery.isFunction( elem[ type ] ) && !jQuery.isWindow( elem ) ) { - - // Don't re-trigger an onFOO event when we call its FOO() method - tmp = elem[ ontype ]; - - if ( tmp ) { - elem[ ontype ] = null; - } - - // Prevent re-triggering of the same event, since we already bubbled it above - jQuery.event.triggered = type; - elem[ type ](); - jQuery.event.triggered = undefined; - - if ( tmp ) { - elem[ ontype ] = tmp; - } - } - } - } - - return event.result; - }, - - // Piggyback on a donor event to simulate a different one - // Used only for `focus(in | out)` events - simulate: function( type, elem, event ) { - var e = jQuery.extend( - new jQuery.Event(), - event, - { - type: type, - isSimulated: true - } - ); - - jQuery.event.trigger( e, null, elem ); - } - -} ); - -jQuery.fn.extend( { - - trigger: function( type, data ) { - return this.each( function() { - jQuery.event.trigger( type, data, this ); - } ); - }, - triggerHandler: function( type, data ) { - var elem = this[ 0 ]; - if ( elem ) { - return jQuery.event.trigger( type, data, elem, true ); - } - } -} ); - - -jQuery.each( ( "blur focus focusin focusout resize scroll click dblclick " + - "mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave " + - "change select submit keydown keypress keyup contextmenu" ).split( " " ), - function( i, name ) { - - // Handle event binding - jQuery.fn[ name ] = function( data, fn ) { - return arguments.length > 0 ? - this.on( name, null, data, fn ) : - this.trigger( name ); - }; -} ); - -jQuery.fn.extend( { - hover: function( fnOver, fnOut ) { - return this.mouseenter( fnOver ).mouseleave( fnOut || fnOver ); - } -} ); - - - - -support.focusin = "onfocusin" in window; - - -// Support: Firefox <=44 -// Firefox doesn't have focus(in | out) events -// Related ticket - https://bugzilla.mozilla.org/show_bug.cgi?id=687787 -// -// Support: Chrome <=48 - 49, Safari <=9.0 - 9.1 -// focus(in | out) events fire after focus & blur events, -// which is spec violation - http://www.w3.org/TR/DOM-Level-3-Events/#events-focusevent-event-order -// Related ticket - https://bugs.chromium.org/p/chromium/issues/detail?id=449857 -if ( !support.focusin ) { - jQuery.each( { focus: "focusin", blur: "focusout" }, function( orig, fix ) { - - // Attach a single capturing handler on the document while someone wants focusin/focusout - var handler = function( event ) { - jQuery.event.simulate( fix, event.target, jQuery.event.fix( event ) ); - }; - - jQuery.event.special[ fix ] = { - setup: function() { - var doc = this.ownerDocument || this, - attaches = dataPriv.access( doc, fix ); - - if ( !attaches ) { - doc.addEventListener( orig, handler, true ); - } - dataPriv.access( doc, fix, ( attaches || 0 ) + 1 ); - }, - teardown: function() { - var doc = this.ownerDocument || this, - attaches = dataPriv.access( doc, fix ) - 1; - - if ( !attaches ) { - doc.removeEventListener( orig, handler, true ); - dataPriv.remove( doc, fix ); - - } else { - dataPriv.access( doc, fix, attaches ); - } - } - }; - } ); -} -var location = window.location; - -var nonce = jQuery.now(); - -var rquery = ( /\?/ ); - - - -// Cross-browser xml parsing -jQuery.parseXML = function( data ) { - var xml; - if ( !data || typeof data !== "string" ) { - return null; - } - - // Support: IE 9 - 11 only - // IE throws on parseFromString with invalid input. - try { - xml = ( new window.DOMParser() ).parseFromString( data, "text/xml" ); - } catch ( e ) { - xml = undefined; - } - - if ( !xml || xml.getElementsByTagName( "parsererror" ).length ) { - jQuery.error( "Invalid XML: " + data ); - } - return xml; -}; - - -var - rbracket = /\[\]$/, - rCRLF = /\r?\n/g, - rsubmitterTypes = /^(?:submit|button|image|reset|file)$/i, - rsubmittable = /^(?:input|select|textarea|keygen)/i; - -function buildParams( prefix, obj, traditional, add ) { - var name; - - if ( Array.isArray( obj ) ) { - - // Serialize array item. - jQuery.each( obj, function( i, v ) { - if ( traditional || rbracket.test( prefix ) ) { - - // Treat each array item as a scalar. - add( prefix, v ); - - } else { - - // Item is non-scalar (array or object), encode its numeric index. - buildParams( - prefix + "[" + ( typeof v === "object" && v != null ? i : "" ) + "]", - v, - traditional, - add - ); - } - } ); - - } else if ( !traditional && jQuery.type( obj ) === "object" ) { - - // Serialize object item. - for ( name in obj ) { - buildParams( prefix + "[" + name + "]", obj[ name ], traditional, add ); - } - - } else { - - // Serialize scalar item. - add( prefix, obj ); - } -} - -// Serialize an array of form elements or a set of -// key/values into a query string -jQuery.param = function( a, traditional ) { - var prefix, - s = [], - add = function( key, valueOrFunction ) { - - // If value is a function, invoke it and use its return value - var value = jQuery.isFunction( valueOrFunction ) ? - valueOrFunction() : - valueOrFunction; - - s[ s.length ] = encodeURIComponent( key ) + "=" + - encodeURIComponent( value == null ? "" : value ); - }; - - // If an array was passed in, assume that it is an array of form elements. - if ( Array.isArray( a ) || ( a.jquery && !jQuery.isPlainObject( a ) ) ) { - - // Serialize the form elements - jQuery.each( a, function() { - add( this.name, this.value ); - } ); - - } else { - - // If traditional, encode the "old" way (the way 1.3.2 or older - // did it), otherwise encode params recursively. - for ( prefix in a ) { - buildParams( prefix, a[ prefix ], traditional, add ); - } - } - - // Return the resulting serialization - return s.join( "&" ); -}; - -jQuery.fn.extend( { - serialize: function() { - return jQuery.param( this.serializeArray() ); - }, - serializeArray: function() { - return this.map( function() { - - // Can add propHook for "elements" to filter or add form elements - var elements = jQuery.prop( this, "elements" ); - return elements ? jQuery.makeArray( elements ) : this; - } ) - .filter( function() { - var type = this.type; - - // Use .is( ":disabled" ) so that fieldset[disabled] works - return this.name && !jQuery( this ).is( ":disabled" ) && - rsubmittable.test( this.nodeName ) && !rsubmitterTypes.test( type ) && - ( this.checked || !rcheckableType.test( type ) ); - } ) - .map( function( i, elem ) { - var val = jQuery( this ).val(); - - if ( val == null ) { - return null; - } - - if ( Array.isArray( val ) ) { - return jQuery.map( val, function( val ) { - return { name: elem.name, value: val.replace( rCRLF, "\r\n" ) }; - } ); - } - - return { name: elem.name, value: val.replace( rCRLF, "\r\n" ) }; - } ).get(); - } -} ); - - -var - r20 = /%20/g, - rhash = /#.*$/, - rantiCache = /([?&])_=[^&]*/, - rheaders = /^(.*?):[ \t]*([^\r\n]*)$/mg, - - // #7653, #8125, #8152: local protocol detection - rlocalProtocol = /^(?:about|app|app-storage|.+-extension|file|res|widget):$/, - rnoContent = /^(?:GET|HEAD)$/, - rprotocol = /^\/\//, - - /* Prefilters - * 1) They are useful to introduce custom dataTypes (see ajax/jsonp.js for an example) - * 2) These are called: - * - BEFORE asking for a transport - * - AFTER param serialization (s.data is a string if s.processData is true) - * 3) key is the dataType - * 4) the catchall symbol "*" can be used - * 5) execution will start with transport dataType and THEN continue down to "*" if needed - */ - prefilters = {}, - - /* Transports bindings - * 1) key is the dataType - * 2) the catchall symbol "*" can be used - * 3) selection will start with transport dataType and THEN go to "*" if needed - */ - transports = {}, - - // Avoid comment-prolog char sequence (#10098); must appease lint and evade compression - allTypes = "*/".concat( "*" ), - - // Anchor tag for parsing the document origin - originAnchor = document.createElement( "a" ); - originAnchor.href = location.href; - -// Base "constructor" for jQuery.ajaxPrefilter and jQuery.ajaxTransport -function addToPrefiltersOrTransports( structure ) { - - // dataTypeExpression is optional and defaults to "*" - return function( dataTypeExpression, func ) { - - if ( typeof dataTypeExpression !== "string" ) { - func = dataTypeExpression; - dataTypeExpression = "*"; - } - - var dataType, - i = 0, - dataTypes = dataTypeExpression.toLowerCase().match( rnothtmlwhite ) || []; - - if ( jQuery.isFunction( func ) ) { - - // For each dataType in the dataTypeExpression - while ( ( dataType = dataTypes[ i++ ] ) ) { - - // Prepend if requested - if ( dataType[ 0 ] === "+" ) { - dataType = dataType.slice( 1 ) || "*"; - ( structure[ dataType ] = structure[ dataType ] || [] ).unshift( func ); - - // Otherwise append - } else { - ( structure[ dataType ] = structure[ dataType ] || [] ).push( func ); - } - } - } - }; -} - -// Base inspection function for prefilters and transports -function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) { - - var inspected = {}, - seekingTransport = ( structure === transports ); - - function inspect( dataType ) { - var selected; - inspected[ dataType ] = true; - jQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) { - var dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR ); - if ( typeof dataTypeOrTransport === "string" && - !seekingTransport && !inspected[ dataTypeOrTransport ] ) { - - options.dataTypes.unshift( dataTypeOrTransport ); - inspect( dataTypeOrTransport ); - return false; - } else if ( seekingTransport ) { - return !( selected = dataTypeOrTransport ); - } - } ); - return selected; - } - - return inspect( options.dataTypes[ 0 ] ) || !inspected[ "*" ] && inspect( "*" ); -} - -// A special extend for ajax options -// that takes "flat" options (not to be deep extended) -// Fixes #9887 -function ajaxExtend( target, src ) { - var key, deep, - flatOptions = jQuery.ajaxSettings.flatOptions || {}; - - for ( key in src ) { - if ( src[ key ] !== undefined ) { - ( flatOptions[ key ] ? target : ( deep || ( deep = {} ) ) )[ key ] = src[ key ]; - } - } - if ( deep ) { - jQuery.extend( true, target, deep ); - } - - return target; -} - -/* Handles responses to an ajax request: - * - finds the right dataType (mediates between content-type and expected dataType) - * - returns the corresponding response - */ -function ajaxHandleResponses( s, jqXHR, responses ) { - - var ct, type, finalDataType, firstDataType, - contents = s.contents, - dataTypes = s.dataTypes; - - // Remove auto dataType and get content-type in the process - while ( dataTypes[ 0 ] === "*" ) { - dataTypes.shift(); - if ( ct === undefined ) { - ct = s.mimeType || jqXHR.getResponseHeader( "Content-Type" ); - } - } - - // Check if we're dealing with a known content-type - if ( ct ) { - for ( type in contents ) { - if ( contents[ type ] && contents[ type ].test( ct ) ) { - dataTypes.unshift( type ); - break; - } - } - } - - // Check to see if we have a response for the expected dataType - if ( dataTypes[ 0 ] in responses ) { - finalDataType = dataTypes[ 0 ]; - } else { - - // Try convertible dataTypes - for ( type in responses ) { - if ( !dataTypes[ 0 ] || s.converters[ type + " " + dataTypes[ 0 ] ] ) { - finalDataType = type; - break; - } - if ( !firstDataType ) { - firstDataType = type; - } - } - - // Or just use first one - finalDataType = finalDataType || firstDataType; - } - - // If we found a dataType - // We add the dataType to the list if needed - // and return the corresponding response - if ( finalDataType ) { - if ( finalDataType !== dataTypes[ 0 ] ) { - dataTypes.unshift( finalDataType ); - } - return responses[ finalDataType ]; - } -} - -/* Chain conversions given the request and the original response - * Also sets the responseXXX fields on the jqXHR instance - */ -function ajaxConvert( s, response, jqXHR, isSuccess ) { - var conv2, current, conv, tmp, prev, - converters = {}, - - // Work with a copy of dataTypes in case we need to modify it for conversion - dataTypes = s.dataTypes.slice(); - - // Create converters map with lowercased keys - if ( dataTypes[ 1 ] ) { - for ( conv in s.converters ) { - converters[ conv.toLowerCase() ] = s.converters[ conv ]; - } - } - - current = dataTypes.shift(); - - // Convert to each sequential dataType - while ( current ) { - - if ( s.responseFields[ current ] ) { - jqXHR[ s.responseFields[ current ] ] = response; - } - - // Apply the dataFilter if provided - if ( !prev && isSuccess && s.dataFilter ) { - response = s.dataFilter( response, s.dataType ); - } - - prev = current; - current = dataTypes.shift(); - - if ( current ) { - - // There's only work to do if current dataType is non-auto - if ( current === "*" ) { - - current = prev; - - // Convert response if prev dataType is non-auto and differs from current - } else if ( prev !== "*" && prev !== current ) { - - // Seek a direct converter - conv = converters[ prev + " " + current ] || converters[ "* " + current ]; - - // If none found, seek a pair - if ( !conv ) { - for ( conv2 in converters ) { - - // If conv2 outputs current - tmp = conv2.split( " " ); - if ( tmp[ 1 ] === current ) { - - // If prev can be converted to accepted input - conv = converters[ prev + " " + tmp[ 0 ] ] || - converters[ "* " + tmp[ 0 ] ]; - if ( conv ) { - - // Condense equivalence converters - if ( conv === true ) { - conv = converters[ conv2 ]; - - // Otherwise, insert the intermediate dataType - } else if ( converters[ conv2 ] !== true ) { - current = tmp[ 0 ]; - dataTypes.unshift( tmp[ 1 ] ); - } - break; - } - } - } - } - - // Apply converter (if not an equivalence) - if ( conv !== true ) { - - // Unless errors are allowed to bubble, catch and return them - if ( conv && s.throws ) { - response = conv( response ); - } else { - try { - response = conv( response ); - } catch ( e ) { - return { - state: "parsererror", - error: conv ? e : "No conversion from " + prev + " to " + current - }; - } - } - } - } - } - } - - return { state: "success", data: response }; -} - -jQuery.extend( { - - // Counter for holding the number of active queries - active: 0, - - // Last-Modified header cache for next request - lastModified: {}, - etag: {}, - - ajaxSettings: { - url: location.href, - type: "GET", - isLocal: rlocalProtocol.test( location.protocol ), - global: true, - processData: true, - async: true, - contentType: "application/x-www-form-urlencoded; charset=UTF-8", - - /* - timeout: 0, - data: null, - dataType: null, - username: null, - password: null, - cache: null, - throws: false, - traditional: false, - headers: {}, - */ - - accepts: { - "*": allTypes, - text: "text/plain", - html: "text/html", - xml: "application/xml, text/xml", - json: "application/json, text/javascript" - }, - - contents: { - xml: /\bxml\b/, - html: /\bhtml/, - json: /\bjson\b/ - }, - - responseFields: { - xml: "responseXML", - text: "responseText", - json: "responseJSON" - }, - - // Data converters - // Keys separate source (or catchall "*") and destination types with a single space - converters: { - - // Convert anything to text - "* text": String, - - // Text to html (true = no transformation) - "text html": true, - - // Evaluate text as a json expression - "text json": JSON.parse, - - // Parse text as xml - "text xml": jQuery.parseXML - }, - - // For options that shouldn't be deep extended: - // you can add your own custom options here if - // and when you create one that shouldn't be - // deep extended (see ajaxExtend) - flatOptions: { - url: true, - context: true - } - }, - - // Creates a full fledged settings object into target - // with both ajaxSettings and settings fields. - // If target is omitted, writes into ajaxSettings. - ajaxSetup: function( target, settings ) { - return settings ? - - // Building a settings object - ajaxExtend( ajaxExtend( target, jQuery.ajaxSettings ), settings ) : - - // Extending ajaxSettings - ajaxExtend( jQuery.ajaxSettings, target ); - }, - - ajaxPrefilter: addToPrefiltersOrTransports( prefilters ), - ajaxTransport: addToPrefiltersOrTransports( transports ), - - // Main method - ajax: function( url, options ) { - - // If url is an object, simulate pre-1.5 signature - if ( typeof url === "object" ) { - options = url; - url = undefined; - } - - // Force options to be an object - options = options || {}; - - var transport, - - // URL without anti-cache param - cacheURL, - - // Response headers - responseHeadersString, - responseHeaders, - - // timeout handle - timeoutTimer, - - // Url cleanup var - urlAnchor, - - // Request state (becomes false upon send and true upon completion) - completed, - - // To know if global events are to be dispatched - fireGlobals, - - // Loop variable - i, - - // uncached part of the url - uncached, - - // Create the final options object - s = jQuery.ajaxSetup( {}, options ), - - // Callbacks context - callbackContext = s.context || s, - - // Context for global events is callbackContext if it is a DOM node or jQuery collection - globalEventContext = s.context && - ( callbackContext.nodeType || callbackContext.jquery ) ? - jQuery( callbackContext ) : - jQuery.event, - - // Deferreds - deferred = jQuery.Deferred(), - completeDeferred = jQuery.Callbacks( "once memory" ), - - // Status-dependent callbacks - statusCode = s.statusCode || {}, - - // Headers (they are sent all at once) - requestHeaders = {}, - requestHeadersNames = {}, - - // Default abort message - strAbort = "canceled", - - // Fake xhr - jqXHR = { - readyState: 0, - - // Builds headers hashtable if needed - getResponseHeader: function( key ) { - var match; - if ( completed ) { - if ( !responseHeaders ) { - responseHeaders = {}; - while ( ( match = rheaders.exec( responseHeadersString ) ) ) { - responseHeaders[ match[ 1 ].toLowerCase() ] = match[ 2 ]; - } - } - match = responseHeaders[ key.toLowerCase() ]; - } - return match == null ? null : match; - }, - - // Raw string - getAllResponseHeaders: function() { - return completed ? responseHeadersString : null; - }, - - // Caches the header - setRequestHeader: function( name, value ) { - if ( completed == null ) { - name = requestHeadersNames[ name.toLowerCase() ] = - requestHeadersNames[ name.toLowerCase() ] || name; - requestHeaders[ name ] = value; - } - return this; - }, - - // Overrides response content-type header - overrideMimeType: function( type ) { - if ( completed == null ) { - s.mimeType = type; - } - return this; - }, - - // Status-dependent callbacks - statusCode: function( map ) { - var code; - if ( map ) { - if ( completed ) { - - // Execute the appropriate callbacks - jqXHR.always( map[ jqXHR.status ] ); - } else { - - // Lazy-add the new callbacks in a way that preserves old ones - for ( code in map ) { - statusCode[ code ] = [ statusCode[ code ], map[ code ] ]; - } - } - } - return this; - }, - - // Cancel the request - abort: function( statusText ) { - var finalText = statusText || strAbort; - if ( transport ) { - transport.abort( finalText ); - } - done( 0, finalText ); - return this; - } - }; - - // Attach deferreds - deferred.promise( jqXHR ); - - // Add protocol if not provided (prefilters might expect it) - // Handle falsy url in the settings object (#10093: consistency with old signature) - // We also use the url parameter if available - s.url = ( ( url || s.url || location.href ) + "" ) - .replace( rprotocol, location.protocol + "//" ); - - // Alias method option to type as per ticket #12004 - s.type = options.method || options.type || s.method || s.type; - - // Extract dataTypes list - s.dataTypes = ( s.dataType || "*" ).toLowerCase().match( rnothtmlwhite ) || [ "" ]; - - // A cross-domain request is in order when the origin doesn't match the current origin. - if ( s.crossDomain == null ) { - urlAnchor = document.createElement( "a" ); - - // Support: IE <=8 - 11, Edge 12 - 13 - // IE throws exception on accessing the href property if url is malformed, - // e.g. http://example.com:80x/ - try { - urlAnchor.href = s.url; - - // Support: IE <=8 - 11 only - // Anchor's host property isn't correctly set when s.url is relative - urlAnchor.href = urlAnchor.href; - s.crossDomain = originAnchor.protocol + "//" + originAnchor.host !== - urlAnchor.protocol + "//" + urlAnchor.host; - } catch ( e ) { - - // If there is an error parsing the URL, assume it is crossDomain, - // it can be rejected by the transport if it is invalid - s.crossDomain = true; - } - } - - // Convert data if not already a string - if ( s.data && s.processData && typeof s.data !== "string" ) { - s.data = jQuery.param( s.data, s.traditional ); - } - - // Apply prefilters - inspectPrefiltersOrTransports( prefilters, s, options, jqXHR ); - - // If request was aborted inside a prefilter, stop there - if ( completed ) { - return jqXHR; - } - - // We can fire global events as of now if asked to - // Don't fire events if jQuery.event is undefined in an AMD-usage scenario (#15118) - fireGlobals = jQuery.event && s.global; - - // Watch for a new set of requests - if ( fireGlobals && jQuery.active++ === 0 ) { - jQuery.event.trigger( "ajaxStart" ); - } - - // Uppercase the type - s.type = s.type.toUpperCase(); - - // Determine if request has content - s.hasContent = !rnoContent.test( s.type ); - - // Save the URL in case we're toying with the If-Modified-Since - // and/or If-None-Match header later on - // Remove hash to simplify url manipulation - cacheURL = s.url.replace( rhash, "" ); - - // More options handling for requests with no content - if ( !s.hasContent ) { - - // Remember the hash so we can put it back - uncached = s.url.slice( cacheURL.length ); - - // If data is available, append data to url - if ( s.data ) { - cacheURL += ( rquery.test( cacheURL ) ? "&" : "?" ) + s.data; - - // #9682: remove data so that it's not used in an eventual retry - delete s.data; - } - - // Add or update anti-cache param if needed - if ( s.cache === false ) { - cacheURL = cacheURL.replace( rantiCache, "$1" ); - uncached = ( rquery.test( cacheURL ) ? "&" : "?" ) + "_=" + ( nonce++ ) + uncached; - } - - // Put hash and anti-cache on the URL that will be requested (gh-1732) - s.url = cacheURL + uncached; - - // Change '%20' to '+' if this is encoded form body content (gh-2658) - } else if ( s.data && s.processData && - ( s.contentType || "" ).indexOf( "application/x-www-form-urlencoded" ) === 0 ) { - s.data = s.data.replace( r20, "+" ); - } - - // Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode. - if ( s.ifModified ) { - if ( jQuery.lastModified[ cacheURL ] ) { - jqXHR.setRequestHeader( "If-Modified-Since", jQuery.lastModified[ cacheURL ] ); - } - if ( jQuery.etag[ cacheURL ] ) { - jqXHR.setRequestHeader( "If-None-Match", jQuery.etag[ cacheURL ] ); - } - } - - // Set the correct header, if data is being sent - if ( s.data && s.hasContent && s.contentType !== false || options.contentType ) { - jqXHR.setRequestHeader( "Content-Type", s.contentType ); - } - - // Set the Accepts header for the server, depending on the dataType - jqXHR.setRequestHeader( - "Accept", - s.dataTypes[ 0 ] && s.accepts[ s.dataTypes[ 0 ] ] ? - s.accepts[ s.dataTypes[ 0 ] ] + - ( s.dataTypes[ 0 ] !== "*" ? ", " + allTypes + "; q=0.01" : "" ) : - s.accepts[ "*" ] - ); - - // Check for headers option - for ( i in s.headers ) { - jqXHR.setRequestHeader( i, s.headers[ i ] ); - } - - // Allow custom headers/mimetypes and early abort - if ( s.beforeSend && - ( s.beforeSend.call( callbackContext, jqXHR, s ) === false || completed ) ) { - - // Abort if not done already and return - return jqXHR.abort(); - } - - // Aborting is no longer a cancellation - strAbort = "abort"; - - // Install callbacks on deferreds - completeDeferred.add( s.complete ); - jqXHR.done( s.success ); - jqXHR.fail( s.error ); - - // Get transport - transport = inspectPrefiltersOrTransports( transports, s, options, jqXHR ); - - // If no transport, we auto-abort - if ( !transport ) { - done( -1, "No Transport" ); - } else { - jqXHR.readyState = 1; - - // Send global event - if ( fireGlobals ) { - globalEventContext.trigger( "ajaxSend", [ jqXHR, s ] ); - } - - // If request was aborted inside ajaxSend, stop there - if ( completed ) { - return jqXHR; - } - - // Timeout - if ( s.async && s.timeout > 0 ) { - timeoutTimer = window.setTimeout( function() { - jqXHR.abort( "timeout" ); - }, s.timeout ); - } - - try { - completed = false; - transport.send( requestHeaders, done ); - } catch ( e ) { - - // Rethrow post-completion exceptions - if ( completed ) { - throw e; - } - - // Propagate others as results - done( -1, e ); - } - } - - // Callback for when everything is done - function done( status, nativeStatusText, responses, headers ) { - var isSuccess, success, error, response, modified, - statusText = nativeStatusText; - - // Ignore repeat invocations - if ( completed ) { - return; - } - - completed = true; - - // Clear timeout if it exists - if ( timeoutTimer ) { - window.clearTimeout( timeoutTimer ); - } - - // Dereference transport for early garbage collection - // (no matter how long the jqXHR object will be used) - transport = undefined; - - // Cache response headers - responseHeadersString = headers || ""; - - // Set readyState - jqXHR.readyState = status > 0 ? 4 : 0; - - // Determine if successful - isSuccess = status >= 200 && status < 300 || status === 304; - - // Get response data - if ( responses ) { - response = ajaxHandleResponses( s, jqXHR, responses ); - } - - // Convert no matter what (that way responseXXX fields are always set) - response = ajaxConvert( s, response, jqXHR, isSuccess ); - - // If successful, handle type chaining - if ( isSuccess ) { - - // Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode. - if ( s.ifModified ) { - modified = jqXHR.getResponseHeader( "Last-Modified" ); - if ( modified ) { - jQuery.lastModified[ cacheURL ] = modified; - } - modified = jqXHR.getResponseHeader( "etag" ); - if ( modified ) { - jQuery.etag[ cacheURL ] = modified; - } - } - - // if no content - if ( status === 204 || s.type === "HEAD" ) { - statusText = "nocontent"; - - // if not modified - } else if ( status === 304 ) { - statusText = "notmodified"; - - // If we have data, let's convert it - } else { - statusText = response.state; - success = response.data; - error = response.error; - isSuccess = !error; - } - } else { - - // Extract error from statusText and normalize for non-aborts - error = statusText; - if ( status || !statusText ) { - statusText = "error"; - if ( status < 0 ) { - status = 0; - } - } - } - - // Set data for the fake xhr object - jqXHR.status = status; - jqXHR.statusText = ( nativeStatusText || statusText ) + ""; - - // Success/Error - if ( isSuccess ) { - deferred.resolveWith( callbackContext, [ success, statusText, jqXHR ] ); - } else { - deferred.rejectWith( callbackContext, [ jqXHR, statusText, error ] ); - } - - // Status-dependent callbacks - jqXHR.statusCode( statusCode ); - statusCode = undefined; - - if ( fireGlobals ) { - globalEventContext.trigger( isSuccess ? "ajaxSuccess" : "ajaxError", - [ jqXHR, s, isSuccess ? success : error ] ); - } - - // Complete - completeDeferred.fireWith( callbackContext, [ jqXHR, statusText ] ); - - if ( fireGlobals ) { - globalEventContext.trigger( "ajaxComplete", [ jqXHR, s ] ); - - // Handle the global AJAX counter - if ( !( --jQuery.active ) ) { - jQuery.event.trigger( "ajaxStop" ); - } - } - } - - return jqXHR; - }, - - getJSON: function( url, data, callback ) { - return jQuery.get( url, data, callback, "json" ); - }, - - getScript: function( url, callback ) { - return jQuery.get( url, undefined, callback, "script" ); - } -} ); - -jQuery.each( [ "get", "post" ], function( i, method ) { - jQuery[ method ] = function( url, data, callback, type ) { - - // Shift arguments if data argument was omitted - if ( jQuery.isFunction( data ) ) { - type = type || callback; - callback = data; - data = undefined; - } - - // The url can be an options object (which then must have .url) - return jQuery.ajax( jQuery.extend( { - url: url, - type: method, - dataType: type, - data: data, - success: callback - }, jQuery.isPlainObject( url ) && url ) ); - }; -} ); - - -jQuery._evalUrl = function( url ) { - return jQuery.ajax( { - url: url, - - // Make this explicit, since user can override this through ajaxSetup (#11264) - type: "GET", - dataType: "script", - cache: true, - async: false, - global: false, - "throws": true - } ); -}; - - -jQuery.fn.extend( { - wrapAll: function( html ) { - var wrap; - - if ( this[ 0 ] ) { - if ( jQuery.isFunction( html ) ) { - html = html.call( this[ 0 ] ); - } - - // The elements to wrap the target around - wrap = jQuery( html, this[ 0 ].ownerDocument ).eq( 0 ).clone( true ); - - if ( this[ 0 ].parentNode ) { - wrap.insertBefore( this[ 0 ] ); - } - - wrap.map( function() { - var elem = this; - - while ( elem.firstElementChild ) { - elem = elem.firstElementChild; - } - - return elem; - } ).append( this ); - } - - return this; - }, - - wrapInner: function( html ) { - if ( jQuery.isFunction( html ) ) { - return this.each( function( i ) { - jQuery( this ).wrapInner( html.call( this, i ) ); - } ); - } - - return this.each( function() { - var self = jQuery( this ), - contents = self.contents(); - - if ( contents.length ) { - contents.wrapAll( html ); - - } else { - self.append( html ); - } - } ); - }, - - wrap: function( html ) { - var isFunction = jQuery.isFunction( html ); - - return this.each( function( i ) { - jQuery( this ).wrapAll( isFunction ? html.call( this, i ) : html ); - } ); - }, - - unwrap: function( selector ) { - this.parent( selector ).not( "body" ).each( function() { - jQuery( this ).replaceWith( this.childNodes ); - } ); - return this; - } -} ); - - -jQuery.expr.pseudos.hidden = function( elem ) { - return !jQuery.expr.pseudos.visible( elem ); -}; -jQuery.expr.pseudos.visible = function( elem ) { - return !!( elem.offsetWidth || elem.offsetHeight || elem.getClientRects().length ); -}; - - - - -jQuery.ajaxSettings.xhr = function() { - try { - return new window.XMLHttpRequest(); - } catch ( e ) {} -}; - -var xhrSuccessStatus = { - - // File protocol always yields status code 0, assume 200 - 0: 200, - - // Support: IE <=9 only - // #1450: sometimes IE returns 1223 when it should be 204 - 1223: 204 - }, - xhrSupported = jQuery.ajaxSettings.xhr(); - -support.cors = !!xhrSupported && ( "withCredentials" in xhrSupported ); -support.ajax = xhrSupported = !!xhrSupported; - -jQuery.ajaxTransport( function( options ) { - var callback, errorCallback; - - // Cross domain only allowed if supported through XMLHttpRequest - if ( support.cors || xhrSupported && !options.crossDomain ) { - return { - send: function( headers, complete ) { - var i, - xhr = options.xhr(); - - xhr.open( - options.type, - options.url, - options.async, - options.username, - options.password - ); - - // Apply custom fields if provided - if ( options.xhrFields ) { - for ( i in options.xhrFields ) { - xhr[ i ] = options.xhrFields[ i ]; - } - } - - // Override mime type if needed - if ( options.mimeType && xhr.overrideMimeType ) { - xhr.overrideMimeType( options.mimeType ); - } - - // X-Requested-With header - // For cross-domain requests, seeing as conditions for a preflight are - // akin to a jigsaw puzzle, we simply never set it to be sure. - // (it can always be set on a per-request basis or even using ajaxSetup) - // For same-domain requests, won't change header if already provided. - if ( !options.crossDomain && !headers[ "X-Requested-With" ] ) { - headers[ "X-Requested-With" ] = "XMLHttpRequest"; - } - - // Set headers - for ( i in headers ) { - xhr.setRequestHeader( i, headers[ i ] ); - } - - // Callback - callback = function( type ) { - return function() { - if ( callback ) { - callback = errorCallback = xhr.onload = - xhr.onerror = xhr.onabort = xhr.onreadystatechange = null; - - if ( type === "abort" ) { - xhr.abort(); - } else if ( type === "error" ) { - - // Support: IE <=9 only - // On a manual native abort, IE9 throws - // errors on any property access that is not readyState - if ( typeof xhr.status !== "number" ) { - complete( 0, "error" ); - } else { - complete( - - // File: protocol always yields status 0; see #8605, #14207 - xhr.status, - xhr.statusText - ); - } - } else { - complete( - xhrSuccessStatus[ xhr.status ] || xhr.status, - xhr.statusText, - - // Support: IE <=9 only - // IE9 has no XHR2 but throws on binary (trac-11426) - // For XHR2 non-text, let the caller handle it (gh-2498) - ( xhr.responseType || "text" ) !== "text" || - typeof xhr.responseText !== "string" ? - { binary: xhr.response } : - { text: xhr.responseText }, - xhr.getAllResponseHeaders() - ); - } - } - }; - }; - - // Listen to events - xhr.onload = callback(); - errorCallback = xhr.onerror = callback( "error" ); - - // Support: IE 9 only - // Use onreadystatechange to replace onabort - // to handle uncaught aborts - if ( xhr.onabort !== undefined ) { - xhr.onabort = errorCallback; - } else { - xhr.onreadystatechange = function() { - - // Check readyState before timeout as it changes - if ( xhr.readyState === 4 ) { - - // Allow onerror to be called first, - // but that will not handle a native abort - // Also, save errorCallback to a variable - // as xhr.onerror cannot be accessed - window.setTimeout( function() { - if ( callback ) { - errorCallback(); - } - } ); - } - }; - } - - // Create the abort callback - callback = callback( "abort" ); - - try { - - // Do send the request (this may raise an exception) - xhr.send( options.hasContent && options.data || null ); - } catch ( e ) { - - // #14683: Only rethrow if this hasn't been notified as an error yet - if ( callback ) { - throw e; - } - } - }, - - abort: function() { - if ( callback ) { - callback(); - } - } - }; - } -} ); - - - - -// Prevent auto-execution of scripts when no explicit dataType was provided (See gh-2432) -jQuery.ajaxPrefilter( function( s ) { - if ( s.crossDomain ) { - s.contents.script = false; - } -} ); - -// Install script dataType -jQuery.ajaxSetup( { - accepts: { - script: "text/javascript, application/javascript, " + - "application/ecmascript, application/x-ecmascript" - }, - contents: { - script: /\b(?:java|ecma)script\b/ - }, - converters: { - "text script": function( text ) { - jQuery.globalEval( text ); - return text; - } - } -} ); - -// Handle cache's special case and crossDomain -jQuery.ajaxPrefilter( "script", function( s ) { - if ( s.cache === undefined ) { - s.cache = false; - } - if ( s.crossDomain ) { - s.type = "GET"; - } -} ); - -// Bind script tag hack transport -jQuery.ajaxTransport( "script", function( s ) { - - // This transport only deals with cross domain requests - if ( s.crossDomain ) { - var script, callback; - return { - send: function( _, complete ) { - script = jQuery( " - - - - - {%- endblock scripts %} - {%- endblock head %} - - - {% block body -%} - {% block navbar %} - {%- endblock navbar %} - {% block content -%} - {%- endblock content %} - - {%- endblock body %} - -{%- endblock html %} - -{% endblock doc -%} diff --git a/blockly/webif/templates/blockly.html b/blockly/webif/templates/blockly.html index ec829f053..b084c55d1 100755 --- a/blockly/webif/templates/blockly.html +++ b/blockly/webif/templates/blockly.html @@ -1,7 +1,4 @@ - - -{% extends "base.html" %} - +{% extends "base_plugin.html" %} {% block content %} {% include "logics_blockly_toolbox.html" %} From 16e5bdd132f1f08db7bf2bd90baa757f54da0899 Mon Sep 17 00:00:00 2001 From: Onkel Andy Date: Tue, 24 Oct 2023 23:31:44 +0200 Subject: [PATCH 16/41] blockly plugin: update locale / translation to work with newer translate function of shng --- blockly/locale.yaml | 13 +++++++++++++ blockly/locale/de.json | 17 ----------------- blockly/locale/en.json | 17 ----------------- blockly/locale/fr.json | 17 ----------------- blockly/locale/pl.json | 17 ----------------- 5 files changed, 13 insertions(+), 68 deletions(-) create mode 100755 blockly/locale.yaml delete mode 100755 blockly/locale/de.json delete mode 100755 blockly/locale/en.json delete mode 100755 blockly/locale/fr.json delete mode 100755 blockly/locale/pl.json diff --git a/blockly/locale.yaml b/blockly/locale.yaml new file mode 100755 index 000000000..3bd10c371 --- /dev/null +++ b/blockly/locale.yaml @@ -0,0 +1,13 @@ +plugin_translations: + # Translations for the plugin specially for the web interface + 'Logik-Editor': {'de': '=', 'en': 'Logic-Editor', 'fr': 'Editeur de Logiques', 'pl': 'Edytor logiki'} + 'für SmartHomeNG': {'de': '=', 'en': 'for SmartHomeNG', 'fr': 'pour SmartHomeNG', 'pl': 'SmartHomeNG'} + 'Aktivieren': {'de': '=', 'en': 'Enable', 'fr': 'Activer', 'pl': 'Włącz'} + 'Beenden': {'de': '=', 'en': 'Stop', 'fr': 'Terminer', 'pl': 'Stop'} + 'Speichern': {'de': '=', 'en': 'Save', 'fr': 'Sauvegarder', 'pl': 'Zapisz'} + 'Speichern & schließen': {'de': '=', 'en': 'Save & Close', 'fr': 'Sauvegarder & Fermer', 'pl': 'Zapisz & Zamknij'} + 'Blöcke speichern': {'de': '=', 'en': 'Save Blocks', 'fr': 'Enregistrer les blocs', 'pl': 'Zapisz Bloki'} + 'Verwerfen': {'de': '=', 'en': 'Undo Changes', 'fr': 'Annuler', 'pl': 'Cofnij Zmiany'} + 'Änderungen verwerfen': {'de': '=', 'en': 'Undo Changes', 'fr': 'Annuler modifications', 'pl': 'Cofnij Zmiany'} + 'Leeren': {'de': '=', 'en': 'Clear', 'fr': 'Vider', 'pl': 'Wyczyść'} + 'Schließen': {'de': '=', 'en': 'Close', 'fr': 'Fermer', 'pl': 'Zamknij'} diff --git a/blockly/locale/de.json b/blockly/locale/de.json deleted file mode 100755 index f41c669c9..000000000 --- a/blockly/locale/de.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "Logik-Editor": "Logik-Editor", - "für SmartHomeNG": "für SmartHomeNG", - - "_button": { - "Aktivieren": "Aktivieren", - "Beenden" : "Beenden", - "Speichern" : "Speichern", - "Speichern & schließen" : "Speichern & schließen", - "Blöcke speichern" : "Blöcke speichern", - "Verwerfen" : "Verwerfen", - "Änderungen verwerfen" : "Änderungen verwerfen", - "Leeren" : "Leeren", - "Schließen": "Schließen" - } - -} diff --git a/blockly/locale/en.json b/blockly/locale/en.json deleted file mode 100755 index d15661d86..000000000 --- a/blockly/locale/en.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "Logik-Editor": "Logic-Editor", - "für SmartHomeNG": "for SmartHomeNG", - - "_button": { - "Aktivieren": "Enable", - "Beenden" : "Stop", - "Speichern" : "Save", - "Speichern & schließen" : "Save & Close", - "Blöcke speichern" : "Save Blocks", - "Verwerfen" : "Undo Changes", - "Änderungen verwerfen" : "Undo Changes", - "Leeren" : "Clear", - "Schließen": "Close" - } - -} diff --git a/blockly/locale/fr.json b/blockly/locale/fr.json deleted file mode 100755 index f94f75c44..000000000 --- a/blockly/locale/fr.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "Logik-Editor": "Editeur de Logiques", - "für SmartHomeNG": "pour SmartHomeNG", - - "_button": { - "Aktivieren": "Activer", - "Beenden" : "Terminer", - "Speichern" : "Sauvegarder", - "Speichern & schließen" : "Sauvegarder & Fermer", - "Blöcke speichern" : "Enregistrer les blocs", - "Verwerfen" : "Annuler", - "Änderungen verwerfen" : "Annuler modifications", - "Leeren" : "Vider", - "Schließen": "Fermer" - } - -} diff --git a/blockly/locale/pl.json b/blockly/locale/pl.json deleted file mode 100755 index ef99ee529..000000000 --- a/blockly/locale/pl.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "Logik-Editor": "Edytor logiki", - "für SmartHomeNG": "SmartHomeNG", - - "_button": { - "Aktivieren": "Włącz", - "Beenden" : "Stop", - "Speichern" : "Zapisz", - "Speichern & schließen" : "Zapisz & Zamknij", - "Blöcke speichern" : "Zapisz Bloki", - "Verwerfen" : "Cofnij Zmiany", - "Änderungen verwerfen" : "Cofnij Zmiany", - "Leeren" : "Wyczyść", - "Schließen": "Zamknij" - } - -} From 525c90f06ab85a7daf5fb8a4d98e3349e41809b7 Mon Sep 17 00:00:00 2001 From: Onkel Andy Date: Tue, 24 Oct 2023 23:32:57 +0200 Subject: [PATCH 17/41] blockly plugin: outsource web interface code, update webif translation feature --- blockly/__init__.py | 411 +-------------------------- blockly/webif/__init__.py | 337 ++++++++++++++++++++++ blockly/webif/templates/blockly.html | 16 +- 3 files changed, 350 insertions(+), 414 deletions(-) create mode 100755 blockly/webif/__init__.py diff --git a/blockly/__init__.py b/blockly/__init__.py index 3545337ea..b53ae2508 100755 --- a/blockly/__init__.py +++ b/blockly/__init__.py @@ -30,11 +30,10 @@ import lib.config from lib.model.smartplugin import SmartPlugin +from .webif import WebInterface from lib.utils import Utils from lib.module import Modules -from lib.logic import Logics # für update der /etc/logic.yaml -from lib.logic import Logic # für reload (bytecode) -#import lib.logic as logics + from .utils import * @@ -60,22 +59,14 @@ def __init__(self, sh, *args, **kwargs): # self.logger = SmartPluginLogger(__name__, self) self.logger = logging.getLogger(__name__) self.logger.debug('Blockly.__init__') - - # attention: - # if your plugin runs standalone, sh will likely be None so do not rely on it later or check it within your code - -# self._init_complete = False -# return - - # Initialization code goes here - self.init_webinterface() + self.init_webinterface(WebInterface) def run(self): """ Run method for the plugin - """ + """ self.logger.debug("Plugin '{}': run method called".format(self.get_shortname())) self.alive = True # if you want to create child threads, do not make them daemon = True! @@ -128,401 +119,9 @@ def update_item(self, item, caller=None, source=None, dest=None): :param source: if given it represents the source :param dest: if given it represents the dest """ - # todo + # todo # change 'foo_itemtag' into your attribute name if item(): if self.has_iattr(item.conf, 'foo_itemtag'): self.logger.debug("Plugin '{}': update_item ws called with item '{}' from caller '{}', source '{}' and dest '{}'".format(self.get_shortname(), item, caller, source, dest)) pass - - # PLEASE CHECK CODE HERE. The following was in the old skeleton.py and seems not to be - # valid any more - # # todo here: change 'plugin' to the plugin name - # if caller != 'plugin': - # logger.info("update item: {0}".format(item.id())) - - - def init_webinterface(self): - """" - Initialize the web interface for this plugin - - This method is only needed if the plugin is implementing a web interface - """ - try: - self.mod_http = Modules.get_instance().get_module('http') # try/except to handle running in a core version that does not support modules - except: - self.mod_http = None - if self.mod_http == None: - self.logger.error("Plugin '{}': Not initializing the web interface".format(self.get_shortname())) - return False - - # set application configuration for cherrypy - webif_dir = self.path_join(self.get_plugin_dir(), 'webif') - config = { - '/': { - 'tools.staticdir.root': webif_dir, - }, - '/static': { - 'tools.staticdir.on': True, - 'tools.staticdir.dir': 'static' - } - } - - # Register the web interface as a cherrypy app - self.mod_http.register_webif(WebInterface(webif_dir, self), - self.get_shortname(), - config, - self.get_classname(), self.get_instance_name(), - description='Blockly graphical logics editor for SmartHomeNG', - webifname='') - - return True - - -# ------------------------------------------ -# Webinterface of the plugin -# ------------------------------------------ - -import cherrypy -from cherrypy.lib.static import serve_file -from jinja2 import Environment, FileSystemLoader - -class WebInterface: - - logics = None - - logicname = '' - logic_filename = '' - cmd = '' - edit_redirect = '' - - def __init__(self, webif_dir, plugin): - """ - Initialization of instance of class WebInterface - - :param webif_dir: directory where the webinterface of the plugin resides - :param plugin: instance of the plugin - :type webif_dir: str - :type plugin: object - """ - self.logger = logging.getLogger(__name__) - self.webif_dir = webif_dir - self.plugininstance = plugin - self._sh = self.plugininstance.get_sh() - self._sh_dir = self._sh.base_dir - self._section_prefix = self.plugininstance._parameters.get('section_prefix','') - self.logger.debug("WebInterface: section_prefix = {}".format(self._section_prefix)) - - self.logger.info('Blockly Webif.__init__') - - self.tplenv = Environment(loader=FileSystemLoader(self.plugininstance.path_join( self.webif_dir, 'templates' ) )) - self.tplenv.globals['_'] = translate - - self.logicname = '' - self.logic_filename = '' - - - def html_escape(self, str): - return html_escape(str) - - - @cherrypy.expose - def index(self): - - return self.index_html() - - -# @cherrypy.expose -# def index_html(self, cmd='', filename='', logicname='', v=0): -# -# self.cmd = cmd.lower() -# self.logger.info("index_html: cmd = {}, filename = {}, logicname = {}".format(cmd, filename, logicname)) -# if self.cmd == '': -# self.logic_filename = '' -# self.logicname = '' -# elif self.cmd == 'new': -# self.logic_filename = 'new' -# self.logicname = '' -# elif self.cmd == 'edit': -# self.logic_filename = filename -# self.logicname = logicname -# -# language = self._sh.get_defaultlanguage() -# if language != get_translation_lang(): -# self.logger.debug("Blockly: Language = '{}' get_translation_lang() = '{}'".format(language,get_translation_lang())) -# if not load_translation(language): -# self.logger.warning("Blockly: Language '{}' not found, using standard language instead".format(language)) -# -# tmpl = self.tplenv.get_template('blockly.html') -# return tmpl.render(smarthome=self._sh, -# dyn_sh_toolbox=self._DynToolbox(self._sh), -# cmd=self.cmd, -# logicname=logicname, -# lang=translation_lang) - - - @cherrypy.expose - def index_html(self, cmd='', filename='', logicname='', v=0): - - self.logger.info("index_html: cmd = '{}', filename = '{}', logicname = '{}'".format(cmd, filename, logicname)) - if self.edit_redirect != '': - self.edit_html(cmd='edit', logicname=self.edit_redirect) - - if self.logics is None: - self.logics = Logics.get_instance() - - cherrypy.lib.caching.expires(0) - - if cmd == '' and filename == '' and logicname == '': - cmd = self.cmd - if cmd == '': - cmd = 'new' - - self.cmd = cmd.lower() - self.logger.info("index_html: cmd = {}, filename = {}, logicname = {}".format(cmd, filename, logicname)) - if self.cmd == '': -# self.logic_filename = '' - self.logicname = '' - elif self.cmd == 'new': - self.logic_filename = 'new' - self.logicname = '' - elif self.cmd == 'edit' and filename != '': - self.logic_filename = filename - self.logicname = logicname - self.logger.info("index_html: self.logicname = '{}', self.logic_filename = '{}'".format(self.logicname, self.logic_filename)) - - language = self._sh.get_defaultlanguage() - if language != get_translation_lang(): - self.logger.debug("index_html: Language = '{}' get_translation_lang() = '{}'".format(language,get_translation_lang())) - if not load_translation(language): - self.logger.warning("index_html: Language '{}' not found, using standard language instead".format(language)) - - tmpl = self.tplenv.get_template('blockly.html') - return tmpl.render(smarthome=self._sh, - dyn_sh_toolbox=self._DynToolbox(self._sh), - cmd=self.cmd, - logicname=logicname, - timestamp=str(time.time()), - lang=translation_lang) - - - @cherrypy.expose - def edit_html(self, cmd='', filename='', logicname='', v=0): - - if self.logics is None: - self.logics = Logics.get_instance() - - cherrypy.lib.caching.expires(0) - - if cmd == '' and filename == '' and logicname == '': - cmd = self.cmd - if cmd == '': - cmd = 'new' - - self.cmd = cmd.lower() - self.logger.info("edit_html: cmd = {}, filename = {}, logicname = {}".format(cmd, filename, logicname)) - if self.cmd == '': -# self.logic_filename = '' - self.logicname = '' - elif self.cmd == 'new': - self.logic_filename = 'new' - self.logicname = '' - elif self.cmd == 'edit' and filename != '': - self.logic_filename = filename - self.logicname = logicname - self.logger.info("edit_html: self.logicname = '{}', self.logic_filename = '{}'".format(self.logicname, self.logic_filename)) - - language = self._sh.get_defaultlanguage() - if language != get_translation_lang(): - self.logger.debug("edit_html: Language = '{}' get_translation_lang() = '{}'".format(language,get_translation_lang())) - if not load_translation(language): - self.logger.warning("edit_html: Language '{}' not found, using standard language instead".format(language)) - - tmpl = self.tplenv.get_template('blockly.html') - return tmpl.render(smarthome=self._sh, - dyn_sh_toolbox=self._DynToolbox(self._sh), - cmd=self.cmd, - logicname=logicname, - timestamp=str(time.time()), - lang=translation_lang) - - - def _DynToolbox(self, sh): - mytree = self._build_tree() - return mytree + "-\n" - - - def _build_tree(self): - # Get top level items - toplevelitems = [] - allitems = sorted(self._sh.return_items(), key=lambda k: str.lower(k['_path']), reverse=False) - for item in allitems: - if item._path.find('.') == -1: - if item._path not in ['env_daily', 'env_init', 'env_loc', 'env_stat']: - toplevelitems.append(item) - - xml = '\n' - for item in toplevelitems: - xml += self._build_treelevel(item) -# self.logger.info("log_tree # xml -> '{}'".format(str(xml))) - return xml - - - def _build_treelevel(self, item, parent='', level=0): - """ - Builds one tree level of the items - - This methods calls itself recursively while there are further child items - """ - childitems = sorted(item.return_children(), key=lambda k: str.lower(k['_path']), reverse=False) - - name = remove_prefix(item._path, parent+'.') - if childitems != []: - xml = '' - if (item.type() != 'foo') or (item() != None): -# self.logger.info("item._path = '{}', item.type() = '{}', item() = '{}', childitems = '{}'".format(item._path, item.type(), str(item()), childitems)) - xml += self._build_leaf(name, item, level+1) - xml += ''.ljust(3*(level)) + '\n'.format(name, len(childitems)+1) - else: - xml += ''.ljust(3*(level)) + '\n'.format(name, len(childitems)) - for grandchild in childitems: - xml += self._build_treelevel(grandchild, item._path, level+1) - - xml += ''.ljust(3*(level)) + ' # name={}\n'.format(item._path) - else: - xml = self._build_leaf(name, item, level) - return xml - - - def _build_leaf(self, name, item, level=0): - """ - Builds the leaf information for an entry in the item tree - """ -# n = item._path.title().replace('.','_') - n = item._path - xml = ''.ljust(3*(level)) + '\n' - xml += ''.ljust(3*(level+1)) + '' + n + '>\n' - xml += ''.ljust(3*(level+1)) + '' + item._path + '>\n' - xml += ''.ljust(3*(level+1)) + '' + item.type() + '>\n' - xml += ''.ljust(3*(level)) + '\n' - return xml - - - @cherrypy.expose - def blockly_close_editor(self, content=''): - self.logger.warning("blockly_close_editor: content = '{}'".format(content)) - - self.logic_filename = '' - return - - - @cherrypy.expose - def blockly_load_logic(self, uniq_param=''): - self.logger.warning("blockly_load_logic: self.logicname = '{}', self.logic_filename = '{}'".format(self.logicname, self.logic_filename)) - if self.logicname == '' and self.edit_redirect == '': - if self.logic_filename == 'new': - fn_xml = self.plugininstance.path_join( self.webif_dir, 'templates') + '/' + "new.blockly" - else: - fn_xml = self._sh._logic_dir + "blockly_logics.blockly" - else: - if self.logic_filename == '': - fn_xml = self.plugininstance.path_join( self.webif_dir, 'templates') + '/' + "new.blockly" - else: - fn_xml = self._sh._logic_dir + self.logic_filename - self.logger.warning("blockly_load_logic: fn_xml = {}".format(fn_xml)) - return serve_file(fn_xml, content_type='application/xml') - - - def blockly_update_config(self, code, name=''): - """ - Fill configuration section in /etc/logic.yaml from header lines in generated code - - Method is called from blockly_save_logic() - - :param code: Python code of the logic - :param name: name of configuration section, if ommited, the section name is read from the source code - :type code: str - :type name: str - """ - section = '' - active = False - config_list = [] - for line in code.splitlines(): - if (line.startswith('#comment#')): - if config_list == []: - sc, fn, ac, fnco = line[9:].split('#') - fnk, fnv = fn.split(':') - ack, acv = ac.split(':') - active = Utils.to_bool(acv.strip(), False) - if section == '': - section = sc; - self.logger.info("blockly_update_config: #comment# section = '{}'".format(section)) - config_list.append([fnk.strip(), fnv.strip(), fnco]) - elif line.startswith('#trigger#'): - sc, fn, tr, co = line[9:].split('#') - trk, trv = tr.split(':') - if config_list == []: - fnk, fnv = fn.split(':') - fnco = '' - config_list.append([fnk.strip(), fnv.strip(), fnco]) - if section == '': - section = sc; - self.logger.info("blockly_update_config: #trigger# section = '{}'".format(section)) - config_list.append([trk.strip(), trv.strip(),co]) - elif line.startswith('"""'): # initial .rst-comment reached, stop scanning - break - else: # non-metadata lines between beginning of code and initial .rst-comment - pass - - if section == '': - section = name - if self._section_prefix != '': - section = self._section_prefix + section - self.logger.info("blockly_update_config: section = '{}'".format(section)) - - self.logics.update_config_section(active, section, config_list) - - - def pretty_print_xml(self, xml_in): - import xml.dom.minidom - - xml = xml.dom.minidom.parseString(xml_in) - xml_out = xml.toprettyxml() - return xml_out - - - @cherrypy.expose - def blockly_save_logic(self, py, xml, name): - """ - Save the logic - Saves the Blocky xml and the Python code - - :param py: - :param xml: - :param name: - :type py: - :type xml: - :type name: - """ - self._pycode = py - self._xmldata = xml - fn_py = self._sh._logic_dir + name.lower() + ".py" - self.logic_filename = name.lower() + ".blockly" - fn_xml = self._sh._logic_dir + self.logic_filename - self.logger.info("blockly_save_logic: saving blockly logic {} as file {}".format(name, fn_py)) - self.logger.debug("blockly_save_logic: SAVE PY blockly logic {} = {}\n '{}'".format(name, fn_py, py)) - with open(fn_py, 'w') as fpy: - fpy.write(py) - self.logger.debug("blockly_save_logic: SAVE XML blockly logic {} = {}\n '{}'".format(name, fn_xml, xml)) - xml = self.pretty_print_xml(xml) - with open(fn_xml, 'w') as fxml: - fxml.write(xml) - - self.blockly_update_config(self._pycode, name) - - section = name - if self._section_prefix != '': - section = self._section_prefix + section - - self.logics.load_logic(section) - self.edit_redirect = name - diff --git a/blockly/webif/__init__.py b/blockly/webif/__init__.py new file mode 100755 index 000000000..198f50647 --- /dev/null +++ b/blockly/webif/__init__.py @@ -0,0 +1,337 @@ +#!/usr/bin/env python3 +# vim: set encoding=utf-8 tabstop=4 softtabstop=4 shiftwidth=4 expandtab +######################################################################### +# Copyright 2016- Oliver Hinckel github@ollisnet.de +# Based on ideas of sqlite plugin by Marcus Popp marcus@popp.mx +######################################################################### +# This file is part of SmartHomeNG. +# +# Sample Web Interface for new plugins to run with SmartHomeNG version 1.4 +# and upwards. +# +# SmartHomeNG is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# SmartHomeNG is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with SmartHomeNG. If not, see . +# +######################################################################### + +import datetime +import time +import os +import json + +from lib.item import Items +from lib.model.smartplugin import SmartPluginWebIf +from lib.logic import Logics # für update der /etc/logic.yaml +from lib.logic import Logic # für reload (bytecode) +from ..utils import * + +# ------------------------------------------ +# Webinterface of the plugin +# ------------------------------------------ + +import cherrypy +import csv +from jinja2 import Environment, FileSystemLoader + +class WebInterface(SmartPluginWebIf): + logics = None + + logicname = '' + logic_filename = '' + cmd = '' + edit_redirect = '' + + def __init__(self, webif_dir, plugin): + """ + Initialization of instance of class WebInterface + + :param webif_dir: directory where the webinterface of the plugin resides + :param plugin: instance of the plugin + :type webif_dir: str + :type plugin: object + """ + self.logger = plugin.logger + self.webif_dir = webif_dir + self.plugin = plugin + self.items = Items.get_instance() + self.plugininstance = plugin + self._sh = self.plugininstance.get_sh() + self._sh_dir = self._sh.base_dir + self._section_prefix = self.plugininstance._parameters.get('section_prefix','') + self.logger.debug("WebInterface: section_prefix = {}".format(self._section_prefix)) + self.logicname = '' + self.logic_filename = '' + + self.tplenv = self.init_template_environment() + + def html_escape(self, str): + return html_escape(str) + + + @cherrypy.expose + def index(self): + + return self.index_html() + + @cherrypy.expose + def index_html(self, cmd='', filename='', logicname='', v=0): + + self.logger.info("index_html: cmd = '{}', filename = '{}', logicname = '{}'".format(cmd, filename, logicname)) + if self.edit_redirect != '': + self.edit_html(cmd='edit', logicname=self.edit_redirect) + + if self.logics is None: + self.logics = Logics.get_instance() + + cherrypy.lib.caching.expires(0) + + if cmd == '' and filename == '' and logicname == '': + cmd = self.cmd + if cmd == '': + cmd = 'new' + + self.cmd = cmd.lower() + self.logger.info("index_html: cmd = {}, filename = {}, logicname = {}".format(cmd, filename, logicname)) + if self.cmd == '': +# self.logic_filename = '' + self.logicname = '' + elif self.cmd == 'new': + self.logic_filename = 'new' + self.logicname = '' + elif self.cmd == 'edit' and filename != '': + self.logic_filename = filename + self.logicname = logicname + self.logger.info("index_html: self.logicname = '{}', self.logic_filename = '{}'".format(self.logicname, self.logic_filename)) + + tmpl = self.tplenv.get_template('blockly.html') + return tmpl.render(smarthome=self._sh, + p=self.plugin, + dyn_sh_toolbox=self._DynToolbox(self._sh), + cmd=self.cmd, + logicname=logicname, + timestamp=str(time.time())) + + + @cherrypy.expose + def edit_html(self, cmd='', filename='', logicname='', v=0): + + if self.logics is None: + self.logics = Logics.get_instance() + + cherrypy.lib.caching.expires(0) + + if cmd == '' and filename == '' and logicname == '': + cmd = self.cmd + if cmd == '': + cmd = 'new' + + self.cmd = cmd.lower() + self.logger.info("edit_html: cmd = {}, filename = {}, logicname = {}".format(cmd, filename, logicname)) + if self.cmd == '': +# self.logic_filename = '' + self.logicname = '' + elif self.cmd == 'new': + self.logic_filename = 'new' + self.logicname = '' + elif self.cmd == 'edit' and filename != '': + self.logic_filename = filename + self.logicname = logicname + self.logger.info("edit_html: self.logicname = '{}', self.logic_filename = '{}'".format(self.logicname, self.logic_filename)) + + + tmpl = self.tplenv.get_template('blockly.html') + return tmpl.render(smarthome=self._sh, + dyn_sh_toolbox=self._DynToolbox(self._sh), + cmd=self.cmd, + logicname=logicname, + timestamp=str(time.time())) + + + def _DynToolbox(self, sh): + mytree = self._build_tree() + return mytree + "-\n" + + + def _build_tree(self): + # Get top level items + toplevelitems = [] + allitems = sorted(self._sh.return_items(), key=lambda k: str.lower(k['_path']), reverse=False) + for item in allitems: + if item._path.find('.') == -1: + if item._path not in ['env_daily', 'env_init', 'env_loc', 'env_stat']: + toplevelitems.append(item) + + xml = '\n' + for item in toplevelitems: + xml += self._build_treelevel(item) +# self.logger.info("log_tree # xml -> '{}'".format(str(xml))) + return xml + + + def _build_treelevel(self, item, parent='', level=0): + """ + Builds one tree level of the items + + This methods calls itself recursively while there are further child items + """ + childitems = sorted(item.return_children(), key=lambda k: str.lower(k['_path']), reverse=False) + + name = remove_prefix(item._path, parent+'.') + if childitems != []: + xml = '' + if (item.type() != 'foo') or (item() != None): +# self.logger.info("item._path = '{}', item.type() = '{}', item() = '{}', childitems = '{}'".format(item._path, item.type(), str(item()), childitems)) + xml += self._build_leaf(name, item, level+1) + xml += ''.ljust(3*(level)) + '\n'.format(name, len(childitems)+1) + else: + xml += ''.ljust(3*(level)) + '\n'.format(name, len(childitems)) + for grandchild in childitems: + xml += self._build_treelevel(grandchild, item._path, level+1) + + xml += ''.ljust(3*(level)) + ' # name={}\n'.format(item._path) + else: + xml = self._build_leaf(name, item, level) + return xml + + + def _build_leaf(self, name, item, level=0): + """ + Builds the leaf information for an entry in the item tree + """ +# n = item._path.title().replace('.','_') + n = item._path + xml = ''.ljust(3*(level)) + '\n' + xml += ''.ljust(3*(level+1)) + '' + n + '>\n' + xml += ''.ljust(3*(level+1)) + '' + item._path + '>\n' + xml += ''.ljust(3*(level+1)) + '' + item.type() + '>\n' + xml += ''.ljust(3*(level)) + '\n' + return xml + + + @cherrypy.expose + def blockly_close_editor(self, content=''): + self.logger.warning("blockly_close_editor: content = '{}'".format(content)) + + self.logic_filename = '' + return + + + @cherrypy.expose + def blockly_load_logic(self, uniq_param=''): + self.logger.info("blockly_load_logic: self.logicname = '{}', self.logic_filename = '{}'".format(self.logicname, self.logic_filename)) + if self.logicname == '' and self.edit_redirect == '': + if self.logic_filename == 'new': + fn_xml = self.plugininstance.path_join( self.webif_dir, 'templates') + '/' + "new.blockly" + else: + fn_xml = self._sh._logic_dir + "blockly_logics.blockly" + else: + if self.logic_filename == '': + fn_xml = self.plugininstance.path_join( self.webif_dir, 'templates') + '/' + "new.blockly" + else: + fn_xml = self._sh._logic_dir + self.logic_filename + self.logger.info("blockly_load_logic: fn_xml = {}".format(fn_xml)) + return cherrypy.lib.static.serve_file(fn_xml, content_type='application/xml') + + + def blockly_update_config(self, code, name=''): + """ + Fill configuration section in /etc/logic.yaml from header lines in generated code + + Method is called from blockly_save_logic() + + :param code: Python code of the logic + :param name: name of configuration section, if ommited, the section name is read from the source code + :type code: str + :type name: str + """ + section = '' + active = False + config_list = [] + for line in code.splitlines(): + if (line.startswith('#comment#')): + if config_list == []: + sc, fn, ac, fnco = line[9:].split('#') + fnk, fnv = fn.split(':') + ack, acv = ac.split(':') + active = Utils.to_bool(acv.strip(), False) + if section == '': + section = sc; + self.logger.info("blockly_update_config: #comment# section = '{}'".format(section)) + config_list.append([fnk.strip(), fnv.strip(), fnco]) + elif line.startswith('#trigger#'): + sc, fn, tr, co = line[9:].split('#') + trk, trv = tr.split(':') + if config_list == []: + fnk, fnv = fn.split(':') + fnco = '' + config_list.append([fnk.strip(), fnv.strip(), fnco]) + if section == '': + section = sc; + self.logger.info("blockly_update_config: #trigger# section = '{}'".format(section)) + config_list.append([trk.strip(), trv.strip(),co]) + elif line.startswith('"""'): # initial .rst-comment reached, stop scanning + break + else: # non-metadata lines between beginning of code and initial .rst-comment + pass + + if section == '': + section = name + if self._section_prefix != '': + section = self._section_prefix + section + self.logger.info("blockly_update_config: section = '{}'".format(section)) + + self.logics.update_config_section(active, section, config_list) + + + def pretty_print_xml(self, xml_in): + import xml.dom.minidom + + xml = xml.dom.minidom.parseString(xml_in) + xml_out = xml.toprettyxml() + return xml_out + + + @cherrypy.expose + def blockly_save_logic(self, py, xml, name): + """ + Save the logic - Saves the Blocky xml and the Python code + + :param py: + :param xml: + :param name: + :type py: + :type xml: + :type name: + """ + self._pycode = py + self._xmldata = xml + fn_py = self._sh._logic_dir + name.lower() + ".py" + self.logic_filename = name.lower() + ".blockly" + fn_xml = self._sh._logic_dir + self.logic_filename + self.logger.info("blockly_save_logic: saving blockly logic {} as file {}".format(name, fn_py)) + self.logger.debug("blockly_save_logic: SAVE PY blockly logic {} = {}\n '{}'".format(name, fn_py, py)) + with open(fn_py, 'w') as fpy: + fpy.write(py) + self.logger.debug("blockly_save_logic: SAVE XML blockly logic {} = {}\n '{}'".format(name, fn_xml, xml)) + xml = self.pretty_print_xml(xml) + with open(fn_xml, 'w') as fxml: + fxml.write(xml) + + self.blockly_update_config(self._pycode, name) + + section = name + if self._section_prefix != '': + section = self._section_prefix + section + + self.logics.load_logic(section) + self.edit_redirect = name diff --git a/blockly/webif/templates/blockly.html b/blockly/webif/templates/blockly.html index b084c55d1..db391ff84 100755 --- a/blockly/webif/templates/blockly.html +++ b/blockly/webif/templates/blockly.html @@ -52,17 +52,17 @@

      Blockly {{ _('Logik-Editor') }} {{ _('für SmartHomeNG') }} {% if cmd != 'edit' and cmd != 'new' %} - - - - + + + + {% else %} - - + + - + {% endif %} From 5daa1f77ecbc5e12f664b4f51c173fa15374720f Mon Sep 17 00:00:00 2001 From: Onkel Andy Date: Tue, 24 Oct 2023 23:35:04 +0200 Subject: [PATCH 18/41] blockly plugin: update blockly core code to 10.2.2 --- blockly/webif/static/blockly/LICENSE | 0 blockly/webif/static/blockly/README.md | 70 +- .../static/blockly/blockly_compressed.js | 2884 ++++++++++------- .../static/blockly/blockly_compressed.js.map | 1 + .../webif/static/blockly/blocks_compressed.js | 360 +- .../static/blockly/blocks_compressed.js.map | 1 + blockly/webif/static/blockly/de.js | 135 +- blockly/webif/static/blockly/en.js | 37 +- blockly/webif/static/blockly/fr.js | 281 +- blockly/webif/static/blockly/media/1x1.gif | Bin blockly/webif/static/blockly/media/click.mp3 | Bin blockly/webif/static/blockly/media/click.ogg | Bin blockly/webif/static/blockly/media/click.wav | Bin blockly/webif/static/blockly/media/delete.mp3 | Bin blockly/webif/static/blockly/media/delete.ogg | Bin blockly/webif/static/blockly/media/delete.wav | Bin .../webif/static/blockly/media/disconnect.mp3 | Bin .../webif/static/blockly/media/disconnect.ogg | Bin .../webif/static/blockly/media/disconnect.wav | Bin .../static/blockly/media/dropdown-arrow.svg | 1 + .../webif/static/blockly/media/handclosed.cur | Bin .../webif/static/blockly/media/handdelete.cur | Bin .../webif/static/blockly/media/handopen.cur | Bin .../webif/static/blockly/media/pilcrow.png | Bin blockly/webif/static/blockly/media/quote0.png | Bin blockly/webif/static/blockly/media/quote1.png | Bin .../webif/static/blockly/media/sprites.png | Bin .../webif/static/blockly/media/sprites.svg | 0 blockly/webif/static/blockly/pl.js | 97 +- .../webif/static/blockly/python_compressed.js | 307 +- .../static/blockly/python_compressed.js.map | 1 + blockly/webif/static/blockly/style.css | 20 + 32 files changed, 2432 insertions(+), 1763 deletions(-) mode change 100755 => 100644 blockly/webif/static/blockly/LICENSE mode change 100755 => 100644 blockly/webif/static/blockly/README.md mode change 100755 => 100644 blockly/webif/static/blockly/blockly_compressed.js create mode 100644 blockly/webif/static/blockly/blockly_compressed.js.map mode change 100755 => 100644 blockly/webif/static/blockly/blocks_compressed.js create mode 100644 blockly/webif/static/blockly/blocks_compressed.js.map mode change 100755 => 100644 blockly/webif/static/blockly/de.js mode change 100755 => 100644 blockly/webif/static/blockly/en.js mode change 100755 => 100644 blockly/webif/static/blockly/fr.js mode change 100755 => 100644 blockly/webif/static/blockly/media/1x1.gif mode change 100755 => 100644 blockly/webif/static/blockly/media/click.mp3 mode change 100755 => 100644 blockly/webif/static/blockly/media/click.ogg mode change 100755 => 100644 blockly/webif/static/blockly/media/click.wav mode change 100755 => 100644 blockly/webif/static/blockly/media/delete.mp3 mode change 100755 => 100644 blockly/webif/static/blockly/media/delete.ogg mode change 100755 => 100644 blockly/webif/static/blockly/media/delete.wav mode change 100755 => 100644 blockly/webif/static/blockly/media/disconnect.mp3 mode change 100755 => 100644 blockly/webif/static/blockly/media/disconnect.ogg mode change 100755 => 100644 blockly/webif/static/blockly/media/disconnect.wav create mode 100644 blockly/webif/static/blockly/media/dropdown-arrow.svg mode change 100755 => 100644 blockly/webif/static/blockly/media/handclosed.cur mode change 100755 => 100644 blockly/webif/static/blockly/media/handdelete.cur mode change 100755 => 100644 blockly/webif/static/blockly/media/handopen.cur mode change 100755 => 100644 blockly/webif/static/blockly/media/pilcrow.png mode change 100755 => 100644 blockly/webif/static/blockly/media/quote0.png mode change 100755 => 100644 blockly/webif/static/blockly/media/quote1.png mode change 100755 => 100644 blockly/webif/static/blockly/media/sprites.png mode change 100755 => 100644 blockly/webif/static/blockly/media/sprites.svg mode change 100755 => 100644 blockly/webif/static/blockly/pl.js mode change 100755 => 100644 blockly/webif/static/blockly/python_compressed.js create mode 100644 blockly/webif/static/blockly/python_compressed.js.map mode change 100755 => 100644 blockly/webif/static/blockly/style.css diff --git a/blockly/webif/static/blockly/LICENSE b/blockly/webif/static/blockly/LICENSE old mode 100755 new mode 100644 diff --git a/blockly/webif/static/blockly/README.md b/blockly/webif/static/blockly/README.md old mode 100755 new mode 100644 index 999f96b26..5a0f3b8f2 --- a/blockly/webif/static/blockly/README.md +++ b/blockly/webif/static/blockly/README.md @@ -1,37 +1,58 @@ -# Blockly [![Build Status]( https://travis-ci.org/google/blockly.svg?branch=master)](https://travis-ci.org/google/blockly) +# Blockly +Google's Blockly is a library that adds a visual code editor to web and mobile apps. The Blockly editor uses interlocking, graphical blocks to represent code concepts like variables, logical expressions, loops, and more. It allows users to apply programming principles without having to worry about syntax or the intimidation of a blinking cursor on the command line. All code is free and open source. -Google's Blockly is a web-based, visual programming editor. Users can drag -blocks together to build programs. All code is free and open source. +![](https://developers.google.com/blockly/images/sample.png) -**The project page is https://developers.google.com/blockly/** +## Getting Started with Blockly -![](https://developers.google.com/blockly/images/sample.png) +Blockly has many resources for learning how to use the library. Start at our [Google Developers Site](https://developers.google.com/blockly) to read the documentation on how to get started, configure Blockly, and integrate it into your application. The developers site also contains links to: -Blockly has an active [developer forum](https://groups.google.com/forum/#!forum/blockly). Please drop by and say hello. Show us your prototypes early; collectively we have a lot of experience and can offer hints which will save you time. We actively monitor the forums and typically respond to questions within 2 working days. +- [Getting Started article](https://developers.google.com/blockly/guides/get-started/web) +- [Getting Started codelab](https://blocklycodelabs.dev/codelabs/getting-started/index.html#0) +- [More codelabs](https://blocklycodelabs.dev/) +- [Demos and plugins](https://google.github.io/blockly-samples/) Help us focus our development efforts by telling us [what you are doing with -Blockly](https://developers.google.com/blockly/registration). The questionnaire only takes +Blockly](https://developers.google.com/blockly/registration). The questionnaire only takes a few minutes and will help us better support the Blockly community. -Cross-browser Testing Platform and Open Source <3 Provided by [Sauce Labs](https://saucelabs.com) +### Installing Blockly -Want to contribute? Great! First, read [our guidelines for contributors](https://developers.google.com/blockly/guides/modify/contributing). - -## Releases +Blockly is [available on npm](https://www.npmjs.com/package/blockly). -We release by pushing the latest code to the master branch, followed by updating our [docs](https://developers.google.com/blockly) and [demo pages](https://blockly-demo.appspot.com). We typically release a new version of Blockly once a quarter (every 3 months). If there are breaking bugs, such as a crash when performing a standard action or a rendering issue that makes Blockly unusable, we will cherry-pick fixes to master between releases to fix them. The [releases page](https://github.com/google/blockly/releases) has a list of all releases. - -Releases are tagged by the release date (YYYYMMDD) with a leading '2.' and a trailing '.0' in case we ever need a major or minor version (such as [2.20190722.1](https://github.com/google/blockly/tree/2.20190722.1)). If you're using npm, you can install the ``blockly`` package on npm: ```bash npm install blockly ``` -### New APIs +For more information on installing and using Blockly, see the [Getting Started article](https://developers.google.com/blockly/guides/get-started/web). -Once a new API is merged into master it is considered beta until the following release. We generally try to avoid changing an API after it has been merged to master, but sometimes we need to make changes after seeing how an API is used. If an API has been around for at least two releases we'll do our best to avoid breaking it. +### Getting Help -Unreleased APIs may change radically. Anything that is in `develop` but not `master` is subject to change without warning. +- [Report a bug](https://developers.google.com/blockly/guides/modify/contribute/write_a_good_issue) or file a feature request on GitHub +- Ask a question, or search others' questions, on our [developer forum](https://groups.google.com/forum/#!forum/blockly). You can also drop by to say hello and show us your prototypes; collectively we have a lot of experience and can offer hints which will save you time. We actively monitor the forums and typically respond to questions within 2 working days. + +### blockly-samples + +We have a number of resources such as example code, demos, and plugins in another repository called [blockly-samples](https://github.com/google/blockly-samples/). A plugin is a self-contained piece of code that adds functionality to Blockly. Plugins can add fields, define themes, create renderers, and much more. For more information, see the [Plugins documentation](https://developers.google.com/blockly/guides/plugins/overview). + +## Contributing to Blockly + +Want to make Blockly better? We welcome contributions to Blockly in the form of pull requests, bug reports, documentation, answers on the forum, and more! Check out our [Contributing Guidelines](https://developers.google.com/blockly/guides/modify/contributing) for more information. You might also want to look for issues tagged "[Help Wanted](https://github.com/google/blockly/labels/help%20wanted)" which are issues we think would be great for external contributors to help with. + +## Releases + +We release by pushing the latest code to the master branch, followed by updating the npm package, our [docs](https://developers.google.com/blockly), and [demo pages](https://google.github.io/blockly-samples/). If there are breaking bugs, such as a crash when performing a standard action or a rendering issue that makes Blockly unusable, we will cherry-pick fixes to master between releases to fix them. The [releases page](https://github.com/google/blockly/releases) has a list of all releases. + +We use [semantic versioning](https://semver.org/). Releases that have breaking changes or are otherwise not backwards compatible will have a new major version. Patch versions are reserved for bug-fix patches between scheduled releases. + +We now have a [beta release on npm](https://www.npmjs.com/package/blockly?activeTab=versions). If you'd like to test the upcoming release, or try out a not-yet-released new API, you can use the beta channel with: + +```bash +npm install blockly@beta +``` + +As it is a beta channel, it may be less stable, and the APIs there are subject to change. ### Branches @@ -43,14 +64,17 @@ There are two main branches for Blockly. **other branches:** - Larger changes may have their own branches until they are good enough for people to try out. These will be developed separately until we think they are almost ready for release. These branches typically get merged into develop immediately after a release to allow extra time for testing. -## Issues and Milestones +### New APIs + +Once a new API is merged into master it is considered beta until the following release. We generally try to avoid changing an API after it has been merged to master, but sometimes we need to make changes after seeing how an API is used. If an API has been around for at least two releases we'll do our best to avoid breaking it. -We typically triage all bugs within 2 working days, which includes adding any appropriate labels and assigning it to a milestone. Please keep in mind, we are a small team so even feature requests that everyone agrees on may not be prioritized. +Unreleased APIs may change radically. Anything that is in `develop` but not `master` is subject to change without warning. -### Milestones +## Issues and Milestones -**Upcoming release** - The upcoming release milestone is for all bugs we plan on fixing before the next release. This typically has the form of `year_quarter_release` (such as `2019_q2_release`). Some bugs will be added to this release when they are triaged, others may be added closer to a release. +We typically triage all bugs within 1 week, which includes adding any appropriate labels and assigning it to a milestone. Please keep in mind, we are a small team so even feature requests that everyone agrees on may not be prioritized. -**Bug Bash Backlog** - These are bugs that we're still prioritizing. They haven't been added to a specific release yet, but we'll consider them for each release depending on relative priority and available time. +## Good to Know -**Icebox** - These are bugs that we do not intend to spend time on. They are either too much work or minor enough that we don't expect them to ever take priority. We are still happy to accept pull requests for these bugs. +- Cross-browser Testing Platform and Open Source <3 Provided by [Sauce Labs](https://saucelabs.com) +- We test browsers using [BrowserStack](https://browserstack.com) diff --git a/blockly/webif/static/blockly/blockly_compressed.js b/blockly/webif/static/blockly/blockly_compressed.js old mode 100755 new mode 100644 index 9de0658d8..43b7326ab --- a/blockly/webif/static/blockly/blockly_compressed.js +++ b/blockly/webif/static/blockly/blockly_compressed.js @@ -1,1229 +1,1659 @@ -// Do not edit this file; automatically generated by build.py. -'use strict'; +// Do not edit this file; automatically generated. - -var Blockly={};Blockly.Blocks=Object.create(null); -Blockly.utils={};Blockly.utils.global=function(){return"object"===typeof self?self:"object"===typeof window?window:"object"===typeof global?global:this}();Blockly.Msg={};Blockly.utils.global.Blockly||(Blockly.utils.global.Blockly={});Blockly.utils.global.Blockly.Msg||(Blockly.utils.global.Blockly.Msg=Blockly.Msg);Blockly.utils.Coordinate=function(a,b){this.x=a;this.y=b};Blockly.utils.Coordinate.equals=function(a,b){return a==b?!0:a&&b?a.x==b.x&&a.y==b.y:!1};Blockly.utils.Coordinate.distance=function(a,b){var c=a.x-b.x,d=a.y-b.y;return Math.sqrt(c*c+d*d)};Blockly.utils.Coordinate.magnitude=function(a){return Math.sqrt(a.x*a.x+a.y*a.y)};Blockly.utils.Coordinate.difference=function(a,b){return new Blockly.utils.Coordinate(a.x-b.x,a.y-b.y)}; -Blockly.utils.Coordinate.sum=function(a,b){return new Blockly.utils.Coordinate(a.x+b.x,a.y+b.y)};Blockly.utils.Coordinate.prototype.scale=function(a){this.x*=a;this.y*=a;return this};Blockly.utils.Coordinate.prototype.translate=function(a,b){this.x+=a;this.y+=b;return this};Blockly.utils.string={};Blockly.utils.string.startsWith=function(a,b){return 0==a.lastIndexOf(b,0)};Blockly.utils.string.shortestStringLength=function(a){return a.length?a.reduce(function(a,c){return a.lengthb&&(b=c[d].length);d=-Infinity;var e=1;do{var f=d;var g=a;var h=[],k=c.length/e,l=1;for(d=0;df);return g}; -Blockly.utils.string.wrapScore_=function(a,b,c){for(var d=[0],e=[],f=0;fd&&(d=h,e=g)}return e?Blockly.utils.string.wrapMutate_(a,e,c):b};Blockly.utils.string.wrapToText_=function(a,b){for(var c=[],d=0;d=k?(e=2,g=k,(k=f.join(""))&&c.push(k),f.length=0):"{"==k?e=3:(f.push("%",k),e=0):2==e?"0"<=k&&"9">=k?g+=k:(c.push(parseInt(g,10)),h--,e=0):3==e&&(""==k?(f.splice(0,0,"%{"),h--,e=0):"}"!=k?f.push(k):(e=f.join(""),/[A-Z]\w*/i.test(e)?(k=e.toUpperCase(),(k= -Blockly.utils.string.startsWith(k,"BKY_")?k.substring(4):null)&&k in Blockly.Msg?(e=Blockly.Msg[k],"string"==typeof e?Array.prototype.push.apply(c,Blockly.utils.tokenizeInterpolation_(e,b)):b?c.push(String(e)):c.push(e)):c.push("%{"+e+"}")):c.push("%{"+e+"}"),e=f.length=0))}(k=f.join(""))&&c.push(k);d=[];for(h=f.length=0;hc;c++)b[c]=Blockly.utils.genUid.soup_.charAt(Math.random()*a);return b.join("")};Blockly.utils.genUid.soup_="!#$%()*+,-./:;=?@[]^_`{|}~ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"; -Blockly.utils.is3dSupported=function(){if(void 0!==Blockly.utils.is3dSupported.cached_)return Blockly.utils.is3dSupported.cached_;if(!Blockly.utils.global.getComputedStyle)return!1;var a=document.createElement("p"),b="none",c={webkitTransform:"-webkit-transform",OTransform:"-o-transform",msTransform:"-ms-transform",MozTransform:"-moz-transform",transform:"transform"};document.body.insertBefore(a,null);for(var d in c)if(void 0!==a.style[d]){a.style[d]="translate3d(1px,1px,1px)";b=Blockly.utils.global.getComputedStyle(a); -if(!b)return document.body.removeChild(a),!1;b=b.getPropertyValue(c[d])}document.body.removeChild(a);Blockly.utils.is3dSupported.cached_="none"!==b;return Blockly.utils.is3dSupported.cached_};Blockly.utils.runAfterPageLoad=function(a){if("object"!=typeof document)throw Error("Blockly.utils.runAfterPageLoad() requires browser document.");if("complete"==document.readyState)a();else var b=setInterval(function(){"complete"==document.readyState&&(clearInterval(b),a())},10)}; -Blockly.utils.getViewportBBox=function(){var a=Blockly.utils.style.getViewportPageOffset();return{right:document.documentElement.clientWidth+a.x,bottom:document.documentElement.clientHeight+a.y,top:a.y,left:a.x}};Blockly.utils.arrayRemove=function(a,b){var c=a.indexOf(b);if(-1==c)return!1;a.splice(c,1);return!0}; -Blockly.utils.getDocumentScroll=function(){var a=document.documentElement,b=window;return Blockly.utils.userAgent.IE&&b.pageYOffset!=a.scrollTop?new Blockly.utils.Coordinate(a.scrollLeft,a.scrollTop):new Blockly.utils.Coordinate(b.pageXOffset||a.scrollLeft,b.pageYOffset||a.scrollTop)}; -Blockly.utils.getBlockTypeCounts=function(a,b){var c=Object.create(null),d=a.getDescendants(!0);if(b){var e=a.getNextBlock();e&&(e=d.indexOf(e),d.splice(e,d.length-e))}e=0;for(var f;f=d[e];e++)c[f.type]?c[f.type]++:c[f.type]=1;return c};Blockly.utils.screenToWsCoordinates=function(a,b){var c=b.x,d=b.y,e=a.getInjectionDiv().getBoundingClientRect();c=new Blockly.utils.Coordinate(c-e.left,d-e.top);d=a.getOriginOffsetInPixels();return Blockly.utils.Coordinate.difference(c,d).scale(1/a.scale)}; -Blockly.Events={};Blockly.Events.group_="";Blockly.Events.recordUndo=!0;Blockly.Events.disabled_=0;Blockly.Events.CREATE="create";Blockly.Events.BLOCK_CREATE=Blockly.Events.CREATE;Blockly.Events.DELETE="delete";Blockly.Events.BLOCK_DELETE=Blockly.Events.DELETE;Blockly.Events.CHANGE="change";Blockly.Events.BLOCK_CHANGE=Blockly.Events.CHANGE;Blockly.Events.MOVE="move";Blockly.Events.BLOCK_MOVE=Blockly.Events.MOVE;Blockly.Events.VAR_CREATE="var_create";Blockly.Events.VAR_DELETE="var_delete"; -Blockly.Events.VAR_RENAME="var_rename";Blockly.Events.UI="ui";Blockly.Events.COMMENT_CREATE="comment_create";Blockly.Events.COMMENT_DELETE="comment_delete";Blockly.Events.COMMENT_CHANGE="comment_change";Blockly.Events.COMMENT_MOVE="comment_move";Blockly.Events.FINISHED_LOADING="finished_loading";Blockly.Events.BUMP_EVENTS=[Blockly.Events.BLOCK_CREATE,Blockly.Events.BLOCK_MOVE,Blockly.Events.COMMENT_CREATE,Blockly.Events.COMMENT_MOVE];Blockly.Events.FIRE_QUEUE_=[]; -Blockly.Events.fire=function(a){Blockly.Events.isEnabled()&&(Blockly.Events.FIRE_QUEUE_.length||setTimeout(Blockly.Events.fireNow_,0),Blockly.Events.FIRE_QUEUE_.push(a))};Blockly.Events.fireNow_=function(){for(var a=Blockly.Events.filter(Blockly.Events.FIRE_QUEUE_,!0),b=Blockly.Events.FIRE_QUEUE_.length=0,c;c=a[b];b++)if(c.workspaceId){var d=Blockly.Workspace.getById(c.workspaceId);d&&d.fireChangeListener(c)}}; -Blockly.Events.filter=function(a,b){var c=a.slice();b||c.reverse();for(var d=[],e=Object.create(null),f=0,g;g=c[f];f++)if(!g.isNull()){var h=[g.type,g.blockId,g.workspaceId].join(" "),k=e[h],l=k?k.event:null;if(!k)e[h]={event:g,index:f},d.push(g);else if(g.type==Blockly.Events.MOVE&&k.index==f-1)l.newParentId=g.newParentId,l.newInputName=g.newInputName,l.newCoordinate=g.newCoordinate,k.index=f;else if(g.type==Blockly.Events.CHANGE&&g.element==l.element&&g.name==l.name)l.newValue=g.newValue;else if(g.type!= -Blockly.Events.UI||"click"!=g.element||"commentOpen"!=l.element&&"mutatorOpen"!=l.element&&"warningOpen"!=l.element)e[h]={event:g,index:1},d.push(g)}c=d.filter(function(a){return!a.isNull()});b||c.reverse();for(f=1;g=c[f];f++)g.type==Blockly.Events.CHANGE&&"mutation"==g.element&&c.unshift(c.splice(f,1)[0]);return c};Blockly.Events.clearPendingUndo=function(){for(var a=0,b;b=Blockly.Events.FIRE_QUEUE_[a];a++)b.recordUndo=!1};Blockly.Events.disable=function(){Blockly.Events.disabled_++}; -Blockly.Events.enable=function(){Blockly.Events.disabled_--};Blockly.Events.isEnabled=function(){return 0==Blockly.Events.disabled_};Blockly.Events.getGroup=function(){return Blockly.Events.group_};Blockly.Events.setGroup=function(a){Blockly.Events.group_="boolean"==typeof a?a?Blockly.utils.genUid():"":a};Blockly.Events.getDescendantIds=function(a){var b=[];a=a.getDescendants(!1);for(var c=0,d;d=a[c];c++)b[c]=d.id;return b}; -Blockly.Events.fromJson=function(a,b){switch(a.type){case Blockly.Events.CREATE:var c=new Blockly.Events.Create(null);break;case Blockly.Events.DELETE:c=new Blockly.Events.Delete(null);break;case Blockly.Events.CHANGE:c=new Blockly.Events.Change(null,"","","","");break;case Blockly.Events.MOVE:c=new Blockly.Events.Move(null);break;case Blockly.Events.VAR_CREATE:c=new Blockly.Events.VarCreate(null);break;case Blockly.Events.VAR_DELETE:c=new Blockly.Events.VarDelete(null);break;case Blockly.Events.VAR_RENAME:c= -new Blockly.Events.VarRename(null,"");break;case Blockly.Events.UI:c=new Blockly.Events.Ui(null,"","","");break;case Blockly.Events.COMMENT_CREATE:c=new Blockly.Events.CommentCreate(null);break;case Blockly.Events.COMMENT_CHANGE:c=new Blockly.Events.CommentChange(null,"","");break;case Blockly.Events.COMMENT_MOVE:c=new Blockly.Events.CommentMove(null);break;case Blockly.Events.COMMENT_DELETE:c=new Blockly.Events.CommentDelete(null);break;default:throw Error("Unknown event type.");}c.fromJson(a);c.workspaceId= -b.id;return c};Blockly.Events.disableOrphans=function(a){if((a.type==Blockly.Events.MOVE||a.type==Blockly.Events.CREATE)&&a.workspaceId){var b=Blockly.Workspace.getById(a.workspaceId);if(a=b.getBlockById(a.blockId)){var c=a.getParent();if(c&&c.isEnabled())for(b=a.getDescendants(!1),a=0;c=b[a];a++)c.setEnabled(!0);else if((a.outputConnection||a.previousConnection)&&!b.isDragging()){do a.setEnabled(!1),a=a.getNextBlock();while(a)}}}}; -Blockly.Events.Abstract=function(){this.workspaceId=void 0;this.group=Blockly.Events.getGroup();this.recordUndo=Blockly.Events.recordUndo};Blockly.Events.Abstract.prototype.toJson=function(){var a={type:this.type};this.group&&(a.group=this.group);return a};Blockly.Events.Abstract.prototype.fromJson=function(a){this.group=a.group};Blockly.Events.Abstract.prototype.isNull=function(){return!1};Blockly.Events.Abstract.prototype.run=function(a){}; -Blockly.Events.Abstract.prototype.getEventWorkspace_=function(){if(this.workspaceId)var a=Blockly.Workspace.getById(this.workspaceId);if(!a)throw Error("Workspace is null. Event must have been generated from real Blockly events.");return a};Blockly.utils.object={};Blockly.utils.object.inherits=function(a,b){a.superClass_=b.prototype;a.prototype=Object.create(b.prototype);a.prototype.constructor=a};Blockly.utils.object.mixin=function(a,b){for(var c in b)a[c]=b[c]};Blockly.utils.object.values=function(a){return Object.values?Object.values(a):Object.keys(a).map(function(b){return a[b]})};Blockly.utils.xml={};Blockly.utils.xml.NAME_SPACE="https://developers.google.com/blockly/xml";Blockly.utils.xml.document=function(){return document};Blockly.utils.xml.createElement=function(a){return Blockly.utils.xml.document().createElementNS(Blockly.utils.xml.NAME_SPACE,a)};Blockly.utils.xml.createTextNode=function(a){return Blockly.utils.xml.document().createTextNode(a)};Blockly.utils.xml.textToDomDocument=function(a){return(new DOMParser).parseFromString(a,"text/xml")}; -Blockly.utils.xml.domToText=function(a){return(new XMLSerializer).serializeToString(a)};Blockly.Events.BlockBase=function(a){Blockly.Events.BlockBase.superClass_.constructor.call(this);this.blockId=a.id;this.workspaceId=a.workspace.id};Blockly.utils.object.inherits(Blockly.Events.BlockBase,Blockly.Events.Abstract);Blockly.Events.BlockBase.prototype.toJson=function(){var a=Blockly.Events.BlockBase.superClass_.toJson.call(this);a.blockId=this.blockId;return a}; -Blockly.Events.BlockBase.prototype.fromJson=function(a){Blockly.Events.BlockBase.superClass_.fromJson.call(this,a);this.blockId=a.blockId};Blockly.Events.Change=function(a,b,c,d,e){a&&(Blockly.Events.Change.superClass_.constructor.call(this,a),this.element=b,this.name=c,this.oldValue=d,this.newValue=e)};Blockly.utils.object.inherits(Blockly.Events.Change,Blockly.Events.BlockBase);Blockly.Events.BlockChange=Blockly.Events.Change;Blockly.Events.Change.prototype.type=Blockly.Events.CHANGE; -Blockly.Events.Change.prototype.toJson=function(){var a=Blockly.Events.Change.superClass_.toJson.call(this);a.element=this.element;this.name&&(a.name=this.name);a.newValue=this.newValue;return a};Blockly.Events.Change.prototype.fromJson=function(a){Blockly.Events.Change.superClass_.fromJson.call(this,a);this.element=a.element;this.name=a.name;this.newValue=a.newValue};Blockly.Events.Change.prototype.isNull=function(){return this.oldValue==this.newValue}; -Blockly.Events.Change.prototype.run=function(a){var b=this.getEventWorkspace_().getBlockById(this.blockId);if(b)switch(b.mutator&&b.mutator.setVisible(!1),a=a?this.newValue:this.oldValue,this.element){case "field":(b=b.getField(this.name))?b.setValue(a):console.warn("Can't set non-existent field: "+this.name);break;case "comment":b.setCommentText(a||null);break;case "collapsed":b.setCollapsed(!!a);break;case "disabled":b.setEnabled(!a);break;case "inline":b.setInputsInline(!!a);break;case "mutation":var c= -"";b.mutationToDom&&(c=(c=b.mutationToDom())&&Blockly.Xml.domToText(c));if(b.domToMutation){var d=Blockly.Xml.textToDom(a||"");b.domToMutation(d)}Blockly.Events.fire(new Blockly.Events.Change(b,"mutation",null,c,a));break;default:console.warn("Unknown change type: "+this.element)}else console.warn("Can't change non-existent block: "+this.blockId)}; -Blockly.Events.Create=function(a){a&&(Blockly.Events.Create.superClass_.constructor.call(this,a),this.xml=a.workspace.rendered?Blockly.Xml.blockToDomWithXY(a):Blockly.Xml.blockToDom(a),this.ids=Blockly.Events.getDescendantIds(a))};Blockly.utils.object.inherits(Blockly.Events.Create,Blockly.Events.BlockBase);Blockly.Events.BlockCreate=Blockly.Events.Create;Blockly.Events.Create.prototype.type=Blockly.Events.CREATE; -Blockly.Events.Create.prototype.toJson=function(){var a=Blockly.Events.Create.superClass_.toJson.call(this);a.xml=Blockly.Xml.domToText(this.xml);a.ids=this.ids;return a};Blockly.Events.Create.prototype.fromJson=function(a){Blockly.Events.Create.superClass_.fromJson.call(this,a);this.xml=Blockly.Xml.textToDom(a.xml);this.ids=a.ids}; -Blockly.Events.Create.prototype.run=function(a){var b=this.getEventWorkspace_();if(a)a=Blockly.utils.xml.createElement("xml"),a.appendChild(this.xml),Blockly.Xml.domToWorkspace(a,b);else{a=0;for(var c;c=this.ids[a];a++){var d=b.getBlockById(c);d?d.dispose(!1):c==this.blockId&&console.warn("Can't uncreate non-existent block: "+c)}}}; -Blockly.Events.Delete=function(a){if(a){if(a.getParent())throw Error("Connected blocks cannot be deleted.");Blockly.Events.Delete.superClass_.constructor.call(this,a);this.oldXml=a.workspace.rendered?Blockly.Xml.blockToDomWithXY(a):Blockly.Xml.blockToDom(a);this.ids=Blockly.Events.getDescendantIds(a)}};Blockly.utils.object.inherits(Blockly.Events.Delete,Blockly.Events.BlockBase);Blockly.Events.BlockDelete=Blockly.Events.Delete;Blockly.Events.Delete.prototype.type=Blockly.Events.DELETE; -Blockly.Events.Delete.prototype.toJson=function(){var a=Blockly.Events.Delete.superClass_.toJson.call(this);a.ids=this.ids;return a};Blockly.Events.Delete.prototype.fromJson=function(a){Blockly.Events.Delete.superClass_.fromJson.call(this,a);this.ids=a.ids}; -Blockly.Events.Delete.prototype.run=function(a){var b=this.getEventWorkspace_();if(a){a=0;for(var c;c=this.ids[a];a++){var d=b.getBlockById(c);d?d.dispose(!1):c==this.blockId&&console.warn("Can't delete non-existent block: "+c)}}else a=Blockly.utils.xml.createElement("xml"),a.appendChild(this.oldXml),Blockly.Xml.domToWorkspace(a,b)}; -Blockly.Events.Move=function(a){a&&(Blockly.Events.Move.superClass_.constructor.call(this,a),a=this.currentLocation_(),this.oldParentId=a.parentId,this.oldInputName=a.inputName,this.oldCoordinate=a.coordinate)};Blockly.utils.object.inherits(Blockly.Events.Move,Blockly.Events.BlockBase);Blockly.Events.BlockMove=Blockly.Events.Move;Blockly.Events.Move.prototype.type=Blockly.Events.MOVE; -Blockly.Events.Move.prototype.toJson=function(){var a=Blockly.Events.Move.superClass_.toJson.call(this);this.newParentId&&(a.newParentId=this.newParentId);this.newInputName&&(a.newInputName=this.newInputName);this.newCoordinate&&(a.newCoordinate=Math.round(this.newCoordinate.x)+","+Math.round(this.newCoordinate.y));return a}; -Blockly.Events.Move.prototype.fromJson=function(a){Blockly.Events.Move.superClass_.fromJson.call(this,a);this.newParentId=a.newParentId;this.newInputName=a.newInputName;a.newCoordinate&&(a=a.newCoordinate.split(","),this.newCoordinate=new Blockly.utils.Coordinate(Number(a[0]),Number(a[1])))};Blockly.Events.Move.prototype.recordNew=function(){var a=this.currentLocation_();this.newParentId=a.parentId;this.newInputName=a.inputName;this.newCoordinate=a.coordinate}; -Blockly.Events.Move.prototype.currentLocation_=function(){var a=this.getEventWorkspace_().getBlockById(this.blockId),b={},c=a.getParent();if(c){if(b.parentId=c.id,a=c.getInputWithBlock(a))b.inputName=a.name}else b.coordinate=a.getRelativeToSurfaceXY();return b};Blockly.Events.Move.prototype.isNull=function(){return this.oldParentId==this.newParentId&&this.oldInputName==this.newInputName&&Blockly.utils.Coordinate.equals(this.oldCoordinate,this.newCoordinate)}; -Blockly.Events.Move.prototype.run=function(a){var b=this.getEventWorkspace_(),c=b.getBlockById(this.blockId);if(c){var d=a?this.newParentId:this.oldParentId,e=a?this.newInputName:this.oldInputName;a=a?this.newCoordinate:this.oldCoordinate;var f=null;if(d&&(f=b.getBlockById(d),!f)){console.warn("Can't connect to non-existent block: "+d);return}c.getParent()&&c.unplug();if(a)e=c.getRelativeToSurfaceXY(),c.moveBy(a.x-e.x,a.y-e.y);else{c=c.outputConnection||c.previousConnection;if(e){if(b=f.getInput(e))var g= -b.connection}else c.type==Blockly.PREVIOUS_STATEMENT&&(g=f.nextConnection);g?c.connect(g):console.warn("Can't connect to non-existent input: "+e)}}else console.warn("Can't move non-existent block: "+this.blockId)};Blockly.Events.FinishedLoading=function(a){this.workspaceId=a.id;this.group=Blockly.Events.getGroup();this.recordUndo=!1};Blockly.utils.object.inherits(Blockly.Events.FinishedLoading,Blockly.Events.Abstract);Blockly.Events.FinishedLoading.prototype.type=Blockly.Events.FINISHED_LOADING;Blockly.Events.FinishedLoading.prototype.toJson=function(){var a={type:this.type};this.group&&(a.group=this.group);this.workspaceId&&(a.workspaceId=this.workspaceId);return a}; -Blockly.Events.FinishedLoading.prototype.fromJson=function(a){this.workspaceId=a.workspaceId;this.group=a.group};Blockly.Events.VarBase=function(a){Blockly.Events.VarBase.superClass_.constructor.call(this);this.varId=a.getId();this.workspaceId=a.workspace.id};Blockly.utils.object.inherits(Blockly.Events.VarBase,Blockly.Events.Abstract);Blockly.Events.VarBase.prototype.toJson=function(){var a=Blockly.Events.VarBase.superClass_.toJson.call(this);a.varId=this.varId;return a};Blockly.Events.VarBase.prototype.fromJson=function(a){Blockly.Events.VarBase.superClass_.toJson.call(this);this.varId=a.varId}; -Blockly.Events.VarCreate=function(a){a&&(Blockly.Events.VarCreate.superClass_.constructor.call(this,a),this.varType=a.type,this.varName=a.name)};Blockly.utils.object.inherits(Blockly.Events.VarCreate,Blockly.Events.VarBase);Blockly.Events.VarCreate.prototype.type=Blockly.Events.VAR_CREATE;Blockly.Events.VarCreate.prototype.toJson=function(){var a=Blockly.Events.VarCreate.superClass_.toJson.call(this);a.varType=this.varType;a.varName=this.varName;return a}; -Blockly.Events.VarCreate.prototype.fromJson=function(a){Blockly.Events.VarCreate.superClass_.fromJson.call(this,a);this.varType=a.varType;this.varName=a.varName};Blockly.Events.VarCreate.prototype.run=function(a){var b=this.getEventWorkspace_();a?b.createVariable(this.varName,this.varType,this.varId):b.deleteVariableById(this.varId)};Blockly.Events.VarDelete=function(a){a&&(Blockly.Events.VarDelete.superClass_.constructor.call(this,a),this.varType=a.type,this.varName=a.name)}; -Blockly.utils.object.inherits(Blockly.Events.VarDelete,Blockly.Events.VarBase);Blockly.Events.VarDelete.prototype.type=Blockly.Events.VAR_DELETE;Blockly.Events.VarDelete.prototype.toJson=function(){var a=Blockly.Events.VarDelete.superClass_.toJson.call(this);a.varType=this.varType;a.varName=this.varName;return a};Blockly.Events.VarDelete.prototype.fromJson=function(a){Blockly.Events.VarDelete.superClass_.fromJson.call(this,a);this.varType=a.varType;this.varName=a.varName}; -Blockly.Events.VarDelete.prototype.run=function(a){var b=this.getEventWorkspace_();a?b.deleteVariableById(this.varId):b.createVariable(this.varName,this.varType,this.varId)};Blockly.Events.VarRename=function(a,b){a&&(Blockly.Events.VarRename.superClass_.constructor.call(this,a),this.oldName=a.name,this.newName=b)};Blockly.utils.object.inherits(Blockly.Events.VarRename,Blockly.Events.VarBase);Blockly.Events.VarRename.prototype.type=Blockly.Events.VAR_RENAME; -Blockly.Events.VarRename.prototype.toJson=function(){var a=Blockly.Events.VarRename.superClass_.toJson.call(this);a.oldName=this.oldName;a.newName=this.newName;return a};Blockly.Events.VarRename.prototype.fromJson=function(a){Blockly.Events.VarRename.superClass_.fromJson.call(this,a);this.oldName=a.oldName;this.newName=a.newName};Blockly.Events.VarRename.prototype.run=function(a){var b=this.getEventWorkspace_();a?b.renameVariableById(this.varId,this.newName):b.renameVariableById(this.varId,this.oldName)};Blockly.utils.dom={};Blockly.utils.dom.SVG_NS="http://www.w3.org/2000/svg";Blockly.utils.dom.HTML_NS="http://www.w3.org/1999/xhtml";Blockly.utils.dom.XLINK_NS="http://www.w3.org/1999/xlink";Blockly.utils.dom.Node={ELEMENT_NODE:1,TEXT_NODE:3,COMMENT_NODE:8,DOCUMENT_POSITION_CONTAINED_BY:16};Blockly.utils.dom.cacheWidths_=null;Blockly.utils.dom.cacheReference_=0; -Blockly.utils.dom.createSvgElement=function(a,b,c){a=document.createElementNS(Blockly.utils.dom.SVG_NS,a);for(var d in b)a.setAttribute(d,b[d]);document.body.runtimeStyle&&(a.runtimeStyle=a.currentStyle=a.style);c&&c.appendChild(a);return a};Blockly.utils.dom.addClass=function(a,b){var c=a.getAttribute("class")||"";if(-1!=(" "+c+" ").indexOf(" "+b+" "))return!1;c&&(c+=" ");a.setAttribute("class",c+b);return!0}; -Blockly.utils.dom.removeClass=function(a,b){var c=a.getAttribute("class");if(-1==(" "+c+" ").indexOf(" "+b+" "))return!1;c=c.split(/\s+/);for(var d=0;d]*[^/])?>[^<]*)\n([^<]*<\/)/;do{var c=a;a=a.replace(b,"$1 $2")}while(a!=c);return a};Blockly.Xml.domToPrettyText=function(a){a=Blockly.Xml.domToText(a).split("<");for(var b="",c=1;c"!=d.slice(-2)&&(b+=" ")}a=a.join("\n");a=a.replace(/(<(\w+)\b[^>]*>[^\n]*)\n *<\/\2>/g,"$1");return a.replace(/^\n/,"")}; -Blockly.Xml.textToDom=function(a){var b=Blockly.utils.xml.textToDomDocument(a);if(!b||!b.documentElement||b.getElementsByTagName("parsererror").length)throw Error("textToDom was unable to parse: "+a);return b.documentElement};Blockly.Xml.clearWorkspaceAndLoadFromXml=function(a,b){b.setResizesEnabled(!1);b.clear();var c=Blockly.Xml.domToWorkspace(a,b);b.setResizesEnabled(!0);return c}; -Blockly.Xml.domToWorkspace=function(a,b){if(a instanceof Blockly.Workspace){var c=a;a=b;b=c;console.warn("Deprecated call to Blockly.Xml.domToWorkspace, swap the arguments.")}var d;b.RTL&&(d=b.getWidth());c=[];Blockly.utils.dom.startTextWidthCache();var e=a.childNodes.length,f=Blockly.Events.getGroup();f||Blockly.Events.setGroup(!0);b.setResizesEnabled&&b.setResizesEnabled(!1);var g=!0;try{for(var h=0;hc)){var d=b.getSvgXY(a.getSvgRoot());a.outputConnection?(d.x+=(a.RTL?3:-3)*c,d.y+=13*c):a.previousConnection&&(d.x+=(a.RTL?-23:23)*c,d.y+=3*c);a=Blockly.utils.dom.createSvgElement("circle",{cx:d.x,cy:d.y,r:0,fill:"none",stroke:"#888","stroke-width":10},b.getParentSvg());Blockly.blockAnimations.connectionUiStep_(a,new Date,c)}}; -Blockly.blockAnimations.connectionUiStep_=function(a,b,c){var d=(new Date-b)/150;1a.workspace.scale)){var b=a.getHeightWidth().height;b=Math.atan(10/b)/Math.PI*180;a.RTL||(b*=-1);Blockly.blockAnimations.disconnectUiStep_(a.getSvgRoot(),b,new Date)}}; -Blockly.blockAnimations.disconnectUiStep_=function(a,b,c){var d=(new Date-c)/200;1c-Blockly.CURRENT_CONNECTION_PREFERENCE)}if(this.localConnection_||this.closestConnection_)console.error("Only one of localConnection_ and closestConnection_ was set."); -else return!0}else return!(!this.localConnection_||!this.closestConnection_);console.error("Returning true from shouldUpdatePreviews, but it's not clear why.");return!0};Blockly.InsertionMarkerManager.prototype.getCandidate_=function(a){for(var b=this.getStartRadius_(),c=null,d=null,e=0;e=c+this.handleLength_&&(d+= -e);this.setHandlePosition(this.constrainHandle_(d));this.onScroll_();a.stopPropagation();a.preventDefault()}}; -Blockly.Scrollbar.prototype.onMouseDownHandle_=function(a){this.workspace_.markFocused();this.cleanUp_();Blockly.utils.isRightButton(a)?a.stopPropagation():(this.startDragHandle=this.handlePosition_,this.workspace_.setupDragSurface(),this.startDragMouse_=this.horizontal_?a.clientX:a.clientY,Blockly.Scrollbar.onMouseUpWrapper_=Blockly.bindEventWithChecks_(document,"mouseup",this,this.onMouseUpHandle_),Blockly.Scrollbar.onMouseMoveWrapper_=Blockly.bindEventWithChecks_(document,"mousemove",this,this.onMouseMoveHandle_), -a.stopPropagation(),a.preventDefault())};Blockly.Scrollbar.prototype.onMouseMoveHandle_=function(a){this.setHandlePosition(this.constrainHandle_(this.startDragHandle+((this.horizontal_?a.clientX:a.clientY)-this.startDragMouse_)));this.onScroll_()};Blockly.Scrollbar.prototype.onMouseUpHandle_=function(){this.workspace_.resetDragSurface();Blockly.Touch.clearTouchIdentifier();this.cleanUp_()}; -Blockly.Scrollbar.prototype.cleanUp_=function(){Blockly.hideChaff(!0);Blockly.Scrollbar.onMouseUpWrapper_&&(Blockly.unbindEvent_(Blockly.Scrollbar.onMouseUpWrapper_),Blockly.Scrollbar.onMouseUpWrapper_=null);Blockly.Scrollbar.onMouseMoveWrapper_&&(Blockly.unbindEvent_(Blockly.Scrollbar.onMouseMoveWrapper_),Blockly.Scrollbar.onMouseMoveWrapper_=null)}; -Blockly.Scrollbar.prototype.constrainHandle_=function(a){return a=0>=a||isNaN(a)||this.scrollViewSize_a)throw Error("Cannot unsubscribe a workspace that hasn't been subscribed.");this.subscribedWorkspaces_.splice(a,1)};Blockly.ThemeManager.prototype.subscribe=function(a,b,c){this.componentDB_[b]||(this.componentDB_[b]=[]);this.componentDB_[b].push({element:a,propertyName:c});b=this.theme_&&this.theme_.getComponentStyle(b);a.style[c]=b||""}; -Blockly.ThemeManager.prototype.unsubscribe=function(a){if(a)for(var b=Object.keys(this.componentDB_),c=0,d;d=b[c];c++){for(var e=this.componentDB_[d],f=e.length-1;0<=f;f--)e[f].element===a&&e.splice(f,1);this.componentDB_[d].length||delete this.componentDB_[d]}};Blockly.ThemeManager.prototype.dispose=function(){this.componentDB_=this.subscribedWorkspaces_=this.theme_=this.owner_=null};Blockly.Themes={};Blockly.Themes.Classic={};Blockly.Themes.Classic.defaultBlockStyles={colour_blocks:{colourPrimary:"20"},list_blocks:{colourPrimary:"260"},logic_blocks:{colourPrimary:"210"},loop_blocks:{colourPrimary:"120"},math_blocks:{colourPrimary:"230"},procedure_blocks:{colourPrimary:"290"},text_blocks:{colourPrimary:"160"},variable_blocks:{colourPrimary:"330"},variable_dynamic_blocks:{colourPrimary:"310"},hat_blocks:{colourPrimary:"330",hat:"cap"}}; -Blockly.Themes.Classic.categoryStyles={colour_category:{colour:"20"},list_category:{colour:"260"},logic_category:{colour:"210"},loop_category:{colour:"120"},math_category:{colour:"230"},procedure_category:{colour:"290"},text_category:{colour:"160"},variable_category:{colour:"330"},variable_dynamic_category:{colour:"310"}};Blockly.Themes.Classic=new Blockly.Theme(Blockly.Themes.Classic.defaultBlockStyles,Blockly.Themes.Classic.categoryStyles);Blockly.VariableMap=function(a){this.variableMap_=Object.create(null);this.workspace=a};Blockly.VariableMap.prototype.clear=function(){this.variableMap_=Object.create(null)};Blockly.VariableMap.prototype.renameVariable=function(a,b){var c=this.getVariable(b,a.type),d=this.workspace.getAllBlocks(!1);Blockly.Events.setGroup(!0);try{c&&c.getId()!=a.getId()?this.renameVariableWithConflict_(a,b,c,d):this.renameVariableAndUses_(a,b,d)}finally{Blockly.Events.setGroup(!1)}}; -Blockly.VariableMap.prototype.renameVariableById=function(a,b){var c=this.getVariableById(a);if(!c)throw Error("Tried to rename a variable that didn't exist. ID: "+a);this.renameVariable(c,b)};Blockly.VariableMap.prototype.renameVariableAndUses_=function(a,b,c){Blockly.Events.fire(new Blockly.Events.VarRename(a,b));a.name=b;for(b=0;bthis.remainingCapacityOfType(c))return!1;b+=a[c]}return b>this.remainingCapacity()?!1:!0};Blockly.Workspace.prototype.hasBlockLimits=function(){return Infinity!=this.options.maxBlocks||!!this.options.maxInstances}; -Blockly.Workspace.prototype.undo=function(a){var b=a?this.redoStack_:this.undoStack_,c=a?this.undoStack_:this.redoStack_,d=b.pop();if(d){for(var e=[d];b.length&&d.group&&d.group==b[b.length-1].group;)e.push(b.pop());for(b=0;d=e[b];b++)c.push(d);e=Blockly.Events.filter(e,a);Blockly.Events.recordUndo=!1;try{for(b=0;d=e[b];b++)d.run(a)}finally{Blockly.Events.recordUndo=!0}}};Blockly.Workspace.prototype.clearUndo=function(){this.undoStack_.length=0;this.redoStack_.length=0;Blockly.Events.clearPendingUndo()}; -Blockly.Workspace.prototype.addChangeListener=function(a){this.listeners_.push(a);return a};Blockly.Workspace.prototype.removeChangeListener=function(a){Blockly.utils.arrayRemove(this.listeners_,a)};Blockly.Workspace.prototype.fireChangeListener=function(a){if(a.recordUndo)for(this.undoStack_.push(a),this.redoStack_.length=0;this.undoStack_.length>this.MAX_UNDO&&0<=this.MAX_UNDO;)this.undoStack_.shift();for(var b=0,c;c=this.listeners_[b];b++)c(a)}; -Blockly.Workspace.prototype.getBlockById=function(a){return this.blockDB_[a]||null};Blockly.Workspace.prototype.getCommentById=function(a){return this.commentDB_[a]||null};Blockly.Workspace.prototype.allInputsFilled=function(a){for(var b=this.getTopBlocks(!1),c=0,d;d=b[c];c++)if(!d.allInputsFilled(a))return!1;return!0};Blockly.Workspace.prototype.getPotentialVariableMap=function(){return this.potentialVariableMap_}; -Blockly.Workspace.prototype.createPotentialVariableMap=function(){this.potentialVariableMap_=new Blockly.VariableMap(this)};Blockly.Workspace.prototype.getVariableMap=function(){return this.variableMap_};Blockly.Workspace.WorkspaceDB_=Object.create(null);Blockly.Workspace.getById=function(a){return Blockly.Workspace.WorkspaceDB_[a]||null};Blockly.Workspace.getAll=function(){var a=[],b;for(b in Blockly.Workspace.WorkspaceDB_)a.push(Blockly.Workspace.WorkspaceDB_[b]);return a}; -Blockly.Workspace.prototype.getThemeManager=function(){return this.themeManager_};Blockly.Bubble=function(a,b,c,d,e,f){this.workspace_=a;this.content_=b;this.shape_=c;c=Blockly.Bubble.ARROW_ANGLE;this.workspace_.RTL&&(c=-c);this.arrow_radians_=Blockly.utils.math.toRadians(c);a.getBubbleCanvas().appendChild(this.createDom_(b,!(!e||!f)));this.setAnchorLocation(d);e&&f||(b=this.content_.getBBox(),e=b.width+2*Blockly.Bubble.BORDER_WIDTH,f=b.height+2*Blockly.Bubble.BORDER_WIDTH);this.setBubbleSize(e,f);this.positionBubble_();this.renderArrow_();this.rendered_=!0;a.options.readOnly|| -(Blockly.bindEventWithChecks_(this.bubbleBack_,"mousedown",this,this.bubbleMouseDown_),this.resizeGroup_&&Blockly.bindEventWithChecks_(this.resizeGroup_,"mousedown",this,this.resizeMouseDown_))};Blockly.Bubble.BORDER_WIDTH=6;Blockly.Bubble.ARROW_THICKNESS=5;Blockly.Bubble.ARROW_ANGLE=20;Blockly.Bubble.ARROW_BEND=4;Blockly.Bubble.ANCHOR_RADIUS=8;Blockly.Bubble.onMouseUpWrapper_=null;Blockly.Bubble.onMouseMoveWrapper_=null;Blockly.Bubble.prototype.resizeCallback_=null; -Blockly.Bubble.unbindDragEvents_=function(){Blockly.Bubble.onMouseUpWrapper_&&(Blockly.unbindEvent_(Blockly.Bubble.onMouseUpWrapper_),Blockly.Bubble.onMouseUpWrapper_=null);Blockly.Bubble.onMouseMoveWrapper_&&(Blockly.unbindEvent_(Blockly.Bubble.onMouseMoveWrapper_),Blockly.Bubble.onMouseMoveWrapper_=null)};Blockly.Bubble.bubbleMouseUp_=function(){Blockly.Touch.clearTouchIdentifier();Blockly.Bubble.unbindDragEvents_()};Blockly.Bubble.prototype.rendered_=!1;Blockly.Bubble.prototype.anchorXY_=null; -Blockly.Bubble.prototype.relativeLeft_=0;Blockly.Bubble.prototype.relativeTop_=0;Blockly.Bubble.prototype.width_=0;Blockly.Bubble.prototype.height_=0;Blockly.Bubble.prototype.autoLayout_=!0; -Blockly.Bubble.prototype.createDom_=function(a,b){this.bubbleGroup_=Blockly.utils.dom.createSvgElement("g",{},null);var c={filter:"url(#"+this.workspace_.options.embossFilterId+")"};Blockly.utils.userAgent.JAVA_FX&&(c={});c=Blockly.utils.dom.createSvgElement("g",c,this.bubbleGroup_);this.bubbleArrow_=Blockly.utils.dom.createSvgElement("path",{},c);this.bubbleBack_=Blockly.utils.dom.createSvgElement("rect",{"class":"blocklyDraggable",x:0,y:0,rx:Blockly.Bubble.BORDER_WIDTH,ry:Blockly.Bubble.BORDER_WIDTH}, -c);b?(this.resizeGroup_=Blockly.utils.dom.createSvgElement("g",{"class":this.workspace_.RTL?"blocklyResizeSW":"blocklyResizeSE"},this.bubbleGroup_),c=2*Blockly.Bubble.BORDER_WIDTH,Blockly.utils.dom.createSvgElement("polygon",{points:"0,x x,x x,0".replace(/x/g,c.toString())},this.resizeGroup_),Blockly.utils.dom.createSvgElement("line",{"class":"blocklyResizeLine",x1:c/3,y1:c-1,x2:c-1,y2:c/3},this.resizeGroup_),Blockly.utils.dom.createSvgElement("line",{"class":"blocklyResizeLine",x1:2*c/3,y1:c-1,x2:c- -1,y2:2*c/3},this.resizeGroup_)):this.resizeGroup_=null;this.bubbleGroup_.appendChild(a);return this.bubbleGroup_};Blockly.Bubble.prototype.getSvgRoot=function(){return this.bubbleGroup_};Blockly.Bubble.prototype.setSvgId=function(a){this.bubbleGroup_.dataset&&(this.bubbleGroup_.dataset.blockId=a)};Blockly.Bubble.prototype.bubbleMouseDown_=function(a){var b=this.workspace_.getGesture(a);b&&b.handleBubbleStart(a,this)};Blockly.Bubble.prototype.showContextMenu_=function(a){}; -Blockly.Bubble.prototype.isDeletable=function(){return!1}; -Blockly.Bubble.prototype.resizeMouseDown_=function(a){this.promote_();Blockly.Bubble.unbindDragEvents_();Blockly.utils.isRightButton(a)||(this.workspace_.startDrag(a,new Blockly.utils.Coordinate(this.workspace_.RTL?-this.width_:this.width_,this.height_)),Blockly.Bubble.onMouseUpWrapper_=Blockly.bindEventWithChecks_(document,"mouseup",this,Blockly.Bubble.bubbleMouseUp_),Blockly.Bubble.onMouseMoveWrapper_=Blockly.bindEventWithChecks_(document,"mousemove",this,this.resizeMouseMove_),Blockly.hideChaff()); -a.stopPropagation()};Blockly.Bubble.prototype.resizeMouseMove_=function(a){this.autoLayout_=!1;a=this.workspace_.moveDrag(a);this.setBubbleSize(this.workspace_.RTL?-a.x:a.x,a.y);this.workspace_.RTL&&this.positionBubble_()};Blockly.Bubble.prototype.registerResizeEvent=function(a){this.resizeCallback_=a};Blockly.Bubble.prototype.promote_=function(){var a=this.bubbleGroup_.parentNode;return a.lastChild!==this.bubbleGroup_?(a.appendChild(this.bubbleGroup_),!0):!1}; -Blockly.Bubble.prototype.setAnchorLocation=function(a){this.anchorXY_=a;this.rendered_&&this.positionBubble_()}; -Blockly.Bubble.prototype.layoutBubble_=function(){var a=this.workspace_.getMetrics();a.viewLeft/=this.workspace_.scale;a.viewWidth/=this.workspace_.scale;a.viewTop/=this.workspace_.scale;a.viewHeight/=this.workspace_.scale;var b=this.getOptimalRelativeLeft_(a),c=this.getOptimalRelativeTop_(a),d=this.shape_.getBBox(),e={x:b,y:-this.height_-Blockly.BlockSvg.MIN_BLOCK_Y},f={x:-this.width_-30,y:c};c={x:d.width,y:c};var g={x:b,y:d.height};b=d.widtha.viewWidth)return b;if(this.workspace_.RTL)var c=this.anchorXY_.x-b,d=c-this.width_,e=a.viewLeft+a.viewWidth,f=a.viewLeft+Blockly.Scrollbar.scrollbarThickness/this.workspace_.scale;else d=b+this.anchorXY_.x,c=d+this.width_,f=a.viewLeft,e=a.viewLeft+a.viewWidth-Blockly.Scrollbar.scrollbarThickness/this.workspace_.scale;this.workspace_.RTL?de&&(b=-(e-this.anchorXY_.x)): -de&&(b=e-this.anchorXY_.x-this.width_);return b};Blockly.Bubble.prototype.getOptimalRelativeTop_=function(a){var b=-this.height_/4;if(this.height_>a.viewHeight)return b;var c=this.anchorXY_.y+b,d=c+this.height_,e=a.viewTop;a=a.viewTop+a.viewHeight-Blockly.Scrollbar.scrollbarThickness/this.workspace_.scale;var f=this.anchorXY_.y;ca&&(b=a-f-this.height_);return b}; -Blockly.Bubble.prototype.positionBubble_=function(){var a=this.anchorXY_.x;a=this.workspace_.RTL?a-(this.relativeLeft_+this.width_):a+this.relativeLeft_;this.moveTo(a,this.relativeTop_+this.anchorXY_.y)};Blockly.Bubble.prototype.moveTo=function(a,b){this.bubbleGroup_.setAttribute("transform","translate("+a+","+b+")")};Blockly.Bubble.prototype.getBubbleSize=function(){return new Blockly.utils.Size(this.width_,this.height_)}; -Blockly.Bubble.prototype.setBubbleSize=function(a,b){var c=2*Blockly.Bubble.BORDER_WIDTH;a=Math.max(a,c+45);b=Math.max(b,c+20);this.width_=a;this.height_=b;this.bubbleBack_.setAttribute("width",a);this.bubbleBack_.setAttribute("height",b);this.resizeGroup_&&(this.workspace_.RTL?this.resizeGroup_.setAttribute("transform","translate("+2*Blockly.Bubble.BORDER_WIDTH+","+(b-c)+") scale(-1 1)"):this.resizeGroup_.setAttribute("transform","translate("+(a-c)+","+(b-c)+")"));this.autoLayout_&&this.layoutBubble_(); -this.positionBubble_();this.renderArrow_();this.resizeCallback_&&this.resizeCallback_()}; -Blockly.Bubble.prototype.renderArrow_=function(){var a=[],b=this.width_/2,c=this.height_/2,d=-this.relativeLeft_,e=-this.relativeTop_;if(b==d&&c==e)a.push("M "+b+","+c);else{e-=c;d-=b;this.workspace_.RTL&&(d*=-1);var f=Math.sqrt(e*e+d*d),g=Math.acos(d/f);0>e&&(g=2*Math.PI-g);var h=g+Math.PI/2;h>2*Math.PI&&(h-=2*Math.PI);var k=Math.sin(h),l=Math.cos(h),m=this.getBubbleSize();h=(m.width+m.height)/Blockly.Bubble.ARROW_THICKNESS;h=Math.min(h,m.width,m.height)/4;m=1-Blockly.Bubble.ANCHOR_RADIUS/f;d=b+ -m*d;e=c+m*e;m=b+h*l;var n=c+h*k;b-=h*l;c-=h*k;k=g+this.arrow_radians_;k>2*Math.PI&&(k-=2*Math.PI);g=Math.sin(k)*f/Blockly.Bubble.ARROW_BEND;f=Math.cos(k)*f/Blockly.Bubble.ARROW_BEND;a.push("M"+m+","+n);a.push("C"+(m+f)+","+(n+g)+" "+d+","+e+" "+d+","+e);a.push("C"+d+","+e+" "+(b+f)+","+(c+g)+" "+b+","+c)}a.push("z");this.bubbleArrow_.setAttribute("d",a.join(" "))};Blockly.Bubble.prototype.setColour=function(a){this.bubbleBack_.setAttribute("fill",a);this.bubbleArrow_.setAttribute("fill",a)}; -Blockly.Bubble.prototype.dispose=function(){Blockly.Bubble.unbindDragEvents_();Blockly.utils.dom.removeNode(this.bubbleGroup_);this.shape_=this.content_=this.workspace_=this.resizeGroup_=this.bubbleBack_=this.bubbleArrow_=this.bubbleGroup_=null};Blockly.Bubble.prototype.moveDuringDrag=function(a,b){a?a.translateSurface(b.x,b.y):this.moveTo(b.x,b.y);this.relativeLeft_=this.workspace_.RTL?this.anchorXY_.x-b.x-this.width_:b.x-this.anchorXY_.x;this.relativeTop_=b.y-this.anchorXY_.y;this.renderArrow_()}; -Blockly.Bubble.prototype.getRelativeToSurfaceXY=function(){return new Blockly.utils.Coordinate(this.anchorXY_.x+this.relativeLeft_,this.anchorXY_.y+this.relativeTop_)};Blockly.Bubble.prototype.setAutoLayout=function(a){this.autoLayout_=a};Blockly.Events.CommentBase=function(a){this.commentId=a.id;this.workspaceId=a.workspace.id;this.group=Blockly.Events.getGroup();this.recordUndo=Blockly.Events.recordUndo};Blockly.utils.object.inherits(Blockly.Events.CommentBase,Blockly.Events.Abstract);Blockly.Events.CommentBase.prototype.toJson=function(){var a=Blockly.Events.CommentBase.superClass_.toJson.call(this);this.commentId&&(a.commentId=this.commentId);return a}; -Blockly.Events.CommentBase.prototype.fromJson=function(a){Blockly.Events.CommentBase.superClass_.fromJson.call(this,a);this.commentId=a.commentId};Blockly.Events.CommentChange=function(a,b,c){a&&(Blockly.Events.CommentChange.superClass_.constructor.call(this,a),this.oldContents_=b,this.newContents_=c)};Blockly.utils.object.inherits(Blockly.Events.CommentChange,Blockly.Events.CommentBase);Blockly.Events.CommentChange.prototype.type=Blockly.Events.COMMENT_CHANGE; -Blockly.Events.CommentChange.prototype.toJson=function(){var a=Blockly.Events.CommentChange.superClass_.toJson.call(this);a.newContents=this.newContents_;return a};Blockly.Events.CommentChange.prototype.fromJson=function(a){Blockly.Events.CommentChange.superClass_.fromJson.call(this,a);this.newContents_=a.newValue};Blockly.Events.CommentChange.prototype.isNull=function(){return this.oldContents_==this.newContents_}; -Blockly.Events.CommentChange.prototype.run=function(a){var b=this.getEventWorkspace_().getCommentById(this.commentId);b?b.setContent(a?this.newContents_:this.oldContents_):console.warn("Can't change non-existent comment: "+this.commentId)};Blockly.Events.CommentCreate=function(a){a&&(Blockly.Events.CommentCreate.superClass_.constructor.call(this,a),this.xml=a.toXmlWithXY())};Blockly.utils.object.inherits(Blockly.Events.CommentCreate,Blockly.Events.CommentBase); -Blockly.Events.CommentCreate.prototype.type=Blockly.Events.COMMENT_CREATE;Blockly.Events.CommentCreate.prototype.toJson=function(){var a=Blockly.Events.CommentCreate.superClass_.toJson.call(this);a.xml=Blockly.Xml.domToText(this.xml);return a};Blockly.Events.CommentCreate.prototype.fromJson=function(a){Blockly.Events.CommentCreate.superClass_.fromJson.call(this,a);this.xml=Blockly.Xml.textToDom(a.xml)}; -Blockly.Events.CommentCreate.prototype.run=function(a){Blockly.Events.CommentCreateDeleteHelper(this,a)};Blockly.Events.CommentCreateDeleteHelper=function(a,b){var c=a.getEventWorkspace_();if(b){var d=Blockly.utils.xml.createElement("xml");d.appendChild(a.xml);Blockly.Xml.domToWorkspace(d,c)}else(c=c.getCommentById(a.commentId))?c.dispose(!1,!1):console.warn("Can't uncreate non-existent comment: "+a.commentId)}; -Blockly.Events.CommentDelete=function(a){a&&(Blockly.Events.CommentDelete.superClass_.constructor.call(this,a),this.xml=a.toXmlWithXY())};Blockly.utils.object.inherits(Blockly.Events.CommentDelete,Blockly.Events.CommentBase);Blockly.Events.CommentDelete.prototype.type=Blockly.Events.COMMENT_DELETE;Blockly.Events.CommentDelete.prototype.toJson=function(){return Blockly.Events.CommentDelete.superClass_.toJson.call(this)}; -Blockly.Events.CommentDelete.prototype.fromJson=function(a){Blockly.Events.CommentDelete.superClass_.fromJson.call(this,a)};Blockly.Events.CommentDelete.prototype.run=function(a){Blockly.Events.CommentCreateDeleteHelper(this,!a)};Blockly.Events.CommentMove=function(a){a&&(Blockly.Events.CommentMove.superClass_.constructor.call(this,a),this.comment_=a,this.oldCoordinate_=a.getXY(),this.newCoordinate_=null)};Blockly.utils.object.inherits(Blockly.Events.CommentMove,Blockly.Events.CommentBase); -Blockly.Events.CommentMove.prototype.recordNew=function(){if(!this.comment_)throw Error("Tried to record the new position of a comment on the same event twice.");this.newCoordinate_=this.comment_.getXY();this.comment_=null};Blockly.Events.CommentMove.prototype.type=Blockly.Events.COMMENT_MOVE;Blockly.Events.CommentMove.prototype.setOldCoordinate=function(a){this.oldCoordinate_=a}; -Blockly.Events.CommentMove.prototype.toJson=function(){var a=Blockly.Events.CommentMove.superClass_.toJson.call(this);this.newCoordinate_&&(a.newCoordinate=Math.round(this.newCoordinate_.x)+","+Math.round(this.newCoordinate_.y));return a};Blockly.Events.CommentMove.prototype.fromJson=function(a){Blockly.Events.CommentMove.superClass_.fromJson.call(this,a);a.newCoordinate&&(a=a.newCoordinate.split(","),this.newCoordinate_=new Blockly.utils.Coordinate(Number(a[0]),Number(a[1])))}; -Blockly.Events.CommentMove.prototype.isNull=function(){return Blockly.utils.Coordinate.equals(this.oldCoordinate_,this.newCoordinate_)};Blockly.Events.CommentMove.prototype.run=function(a){var b=this.getEventWorkspace_().getCommentById(this.commentId);if(b){a=a?this.newCoordinate_:this.oldCoordinate_;var c=b.getXY();b.moveBy(a.x-c.x,a.y-c.y)}else console.warn("Can't move non-existent comment: "+this.commentId)};Blockly.BubbleDragger=function(a,b){this.draggingBubble_=a;this.workspace_=b;this.deleteArea_=null;this.wouldDeleteBubble_=!1;this.startXY_=this.draggingBubble_.getRelativeToSurfaceXY();this.dragSurface_=Blockly.utils.is3dSupported()&&b.getBlockDragSurface()?b.getBlockDragSurface():null};Blockly.BubbleDragger.prototype.dispose=function(){this.dragSurface_=this.workspace_=this.draggingBubble_=null}; -Blockly.BubbleDragger.prototype.startBubbleDrag=function(){Blockly.Events.getGroup()||Blockly.Events.setGroup(!0);this.workspace_.setResizesEnabled(!1);this.draggingBubble_.setAutoLayout(!1);this.dragSurface_&&this.moveToDragSurface_();this.draggingBubble_.setDragging&&this.draggingBubble_.setDragging(!0);var a=this.workspace_.getToolbox();if(a){var b=this.draggingBubble_.isDeletable()?"blocklyToolboxDelete":"blocklyToolboxGrab";a.addStyle(b)}}; -Blockly.BubbleDragger.prototype.dragBubble=function(a,b){var c=this.pixelsToWorkspaceUnits_(b);c=Blockly.utils.Coordinate.sum(this.startXY_,c);this.draggingBubble_.moveDuringDrag(this.dragSurface_,c);this.draggingBubble_.isDeletable()&&(this.deleteArea_=this.workspace_.isDeleteArea(a),this.updateCursorDuringBubbleDrag_())}; -Blockly.BubbleDragger.prototype.maybeDeleteBubble_=function(){var a=this.workspace_.trashcan;this.wouldDeleteBubble_?(a&&setTimeout(a.close.bind(a),100),this.fireMoveEvent_(),this.draggingBubble_.dispose(!1,!0)):a&&a.close();return this.wouldDeleteBubble_}; -Blockly.BubbleDragger.prototype.updateCursorDuringBubbleDrag_=function(){this.wouldDeleteBubble_=this.deleteArea_!=Blockly.DELETE_AREA_NONE;var a=this.workspace_.trashcan;this.wouldDeleteBubble_?(this.draggingBubble_.setDeleteStyle(!0),this.deleteArea_==Blockly.DELETE_AREA_TRASH&&a&&a.setOpen_(!0)):(this.draggingBubble_.setDeleteStyle(!1),a&&a.setOpen_(!1))}; -Blockly.BubbleDragger.prototype.endBubbleDrag=function(a,b){this.dragBubble(a,b);var c=this.pixelsToWorkspaceUnits_(b);c=Blockly.utils.Coordinate.sum(this.startXY_,c);this.draggingBubble_.moveTo(c.x,c.y);this.maybeDeleteBubble_()||(this.dragSurface_&&this.dragSurface_.clearAndHide(this.workspace_.getBubbleCanvas()),this.draggingBubble_.setDragging&&this.draggingBubble_.setDragging(!1),this.fireMoveEvent_());this.workspace_.setResizesEnabled(!0);this.workspace_.toolbox_&&(c=this.draggingBubble_.isDeletable()? -"blocklyToolboxDelete":"blocklyToolboxGrab",this.workspace_.toolbox_.removeStyle(c));Blockly.Events.setGroup(!1)};Blockly.BubbleDragger.prototype.fireMoveEvent_=function(){if(this.draggingBubble_.isComment){var a=new Blockly.Events.CommentMove(this.draggingBubble_);a.setOldCoordinate(this.startXY_);a.recordNew();Blockly.Events.fire(a)}}; -Blockly.BubbleDragger.prototype.pixelsToWorkspaceUnits_=function(a){a=new Blockly.utils.Coordinate(a.x/this.workspace_.scale,a.y/this.workspace_.scale);this.workspace_.isMutator&&a.scale(1/this.workspace_.options.parentWorkspace.scale);return a};Blockly.BubbleDragger.prototype.moveToDragSurface_=function(){this.draggingBubble_.moveTo(0,0);this.dragSurface_.translateSurface(this.startXY_.x,this.startXY_.y);this.dragSurface_.setBlocksAndShow(this.draggingBubble_.getSvgRoot())};Blockly.constants={};Blockly.LINE_MODE_MULTIPLIER=40;Blockly.PAGE_MODE_MULTIPLIER=125;Blockly.DRAG_RADIUS=5;Blockly.FLYOUT_DRAG_RADIUS=10;Blockly.SNAP_RADIUS=28;Blockly.CONNECTING_SNAP_RADIUS=Blockly.SNAP_RADIUS;Blockly.CURRENT_CONNECTION_PREFERENCE=8;Blockly.INSERTION_MARKER_COLOUR="#000000";Blockly.BUMP_DELAY=250;Blockly.BUMP_RANDOMNESS=10;Blockly.COLLAPSE_CHARS=30;Blockly.LONGPRESS=750;Blockly.SOUND_LIMIT=100;Blockly.DRAG_STACK=!0;Blockly.HSV_SATURATION=.45;Blockly.HSV_VALUE=.65; -Blockly.SPRITE={width:96,height:124,url:"sprites.png"};Blockly.INPUT_VALUE=1;Blockly.OUTPUT_VALUE=2;Blockly.NEXT_STATEMENT=3;Blockly.PREVIOUS_STATEMENT=4;Blockly.DUMMY_INPUT=5;Blockly.ALIGN_LEFT=-1;Blockly.ALIGN_CENTRE=0;Blockly.ALIGN_RIGHT=1;Blockly.DRAG_NONE=0;Blockly.DRAG_STICKY=1;Blockly.DRAG_BEGIN=1;Blockly.DRAG_FREE=2;Blockly.OPPOSITE_TYPE=[];Blockly.OPPOSITE_TYPE[Blockly.INPUT_VALUE]=Blockly.OUTPUT_VALUE;Blockly.OPPOSITE_TYPE[Blockly.OUTPUT_VALUE]=Blockly.INPUT_VALUE; -Blockly.OPPOSITE_TYPE[Blockly.NEXT_STATEMENT]=Blockly.PREVIOUS_STATEMENT;Blockly.OPPOSITE_TYPE[Blockly.PREVIOUS_STATEMENT]=Blockly.NEXT_STATEMENT;Blockly.TOOLBOX_AT_TOP=0;Blockly.TOOLBOX_AT_BOTTOM=1;Blockly.TOOLBOX_AT_LEFT=2;Blockly.TOOLBOX_AT_RIGHT=3;Blockly.DELETE_AREA_NONE=null;Blockly.DELETE_AREA_TRASH=1;Blockly.DELETE_AREA_TOOLBOX=2;Blockly.VARIABLE_CATEGORY_NAME="VARIABLE";Blockly.VARIABLE_DYNAMIC_CATEGORY_NAME="VARIABLE_DYNAMIC";Blockly.PROCEDURE_CATEGORY_NAME="PROCEDURE"; -Blockly.RENAME_VARIABLE_ID="RENAME_VARIABLE_ID";Blockly.DELETE_VARIABLE_ID="DELETE_VARIABLE_ID";Blockly.Events.Ui=function(a,b,c,d){Blockly.Events.Ui.superClass_.constructor.call(this);this.blockId=a?a.id:null;this.workspaceId=a?a.workspace.id:void 0;this.element=b;this.oldValue=c;this.newValue=d;this.recordUndo=!1};Blockly.utils.object.inherits(Blockly.Events.Ui,Blockly.Events.Abstract);Blockly.Events.Ui.prototype.type=Blockly.Events.UI; -Blockly.Events.Ui.prototype.toJson=function(){var a=Blockly.Events.Ui.superClass_.toJson.call(this);a.element=this.element;void 0!==this.newValue&&(a.newValue=this.newValue);this.blockId&&(a.blockId=this.blockId);return a};Blockly.Events.Ui.prototype.fromJson=function(a){Blockly.Events.Ui.superClass_.fromJson.call(this,a);this.element=a.element;this.newValue=a.newValue;this.blockId=a.blockId};Blockly.WorkspaceDragger=function(a){this.workspace_=a;this.startScrollXY_=new Blockly.utils.Coordinate(a.scrollX,a.scrollY)};Blockly.WorkspaceDragger.prototype.dispose=function(){this.workspace_=null};Blockly.WorkspaceDragger.prototype.startDrag=function(){Blockly.selected&&Blockly.selected.unselect();this.workspace_.setupDragSurface()};Blockly.WorkspaceDragger.prototype.endDrag=function(a){this.drag(a);this.workspace_.resetDragSurface()}; -Blockly.WorkspaceDragger.prototype.drag=function(a){a=Blockly.utils.Coordinate.sum(this.startScrollXY_,a);this.workspace_.scroll(a.x,a.y)};Blockly.FlyoutDragger=function(a){Blockly.FlyoutDragger.superClass_.constructor.call(this,a.getWorkspace());this.scrollbar_=a.scrollbar_;this.horizontalLayout_=a.horizontalLayout_};Blockly.utils.object.inherits(Blockly.FlyoutDragger,Blockly.WorkspaceDragger);Blockly.FlyoutDragger.prototype.drag=function(a){a=Blockly.utils.Coordinate.sum(this.startScrollXY_,a);this.horizontalLayout_?this.scrollbar_.set(-a.x):this.scrollbar_.set(-a.y)};Blockly.Tooltip={};Blockly.Tooltip.visible=!1;Blockly.Tooltip.blocked_=!1;Blockly.Tooltip.LIMIT=50;Blockly.Tooltip.mouseOutPid_=0;Blockly.Tooltip.showPid_=0;Blockly.Tooltip.lastX_=0;Blockly.Tooltip.lastY_=0;Blockly.Tooltip.element_=null;Blockly.Tooltip.poisonedElement_=null;Blockly.Tooltip.OFFSET_X=0;Blockly.Tooltip.OFFSET_Y=10;Blockly.Tooltip.RADIUS_OK=10;Blockly.Tooltip.HOVER_MS=750;Blockly.Tooltip.MARGINS=5;Blockly.Tooltip.DIV=null; -Blockly.Tooltip.createDom=function(){Blockly.Tooltip.DIV||(Blockly.Tooltip.DIV=document.createElement("div"),Blockly.Tooltip.DIV.className="blocklyTooltipDiv",document.body.appendChild(Blockly.Tooltip.DIV))};Blockly.Tooltip.bindMouseEvents=function(a){Blockly.bindEvent_(a,"mouseover",null,Blockly.Tooltip.onMouseOver_);Blockly.bindEvent_(a,"mouseout",null,Blockly.Tooltip.onMouseOut_);a.addEventListener("mousemove",Blockly.Tooltip.onMouseMove_,!1)}; -Blockly.Tooltip.onMouseOver_=function(a){if(!Blockly.Tooltip.blocked_){for(a=a.currentTarget;"string"!=typeof a.tooltip&&"function"!=typeof a.tooltip;)a=a.tooltip;Blockly.Tooltip.element_!=a&&(Blockly.Tooltip.hide(),Blockly.Tooltip.poisonedElement_=null,Blockly.Tooltip.element_=a);clearTimeout(Blockly.Tooltip.mouseOutPid_)}}; -Blockly.Tooltip.onMouseOut_=function(a){Blockly.Tooltip.blocked_||(Blockly.Tooltip.mouseOutPid_=setTimeout(function(){Blockly.Tooltip.element_=null;Blockly.Tooltip.poisonedElement_=null;Blockly.Tooltip.hide()},1),clearTimeout(Blockly.Tooltip.showPid_))}; -Blockly.Tooltip.onMouseMove_=function(a){if(Blockly.Tooltip.element_&&Blockly.Tooltip.element_.tooltip&&!Blockly.Tooltip.blocked_)if(Blockly.Tooltip.visible){var b=Blockly.Tooltip.lastX_-a.pageX;a=Blockly.Tooltip.lastY_-a.pageY;Math.sqrt(b*b+a*a)>Blockly.Tooltip.RADIUS_OK&&Blockly.Tooltip.hide()}else Blockly.Tooltip.poisonedElement_!=Blockly.Tooltip.element_&&(clearTimeout(Blockly.Tooltip.showPid_),Blockly.Tooltip.lastX_=a.pageX,Blockly.Tooltip.lastY_=a.pageY,Blockly.Tooltip.showPid_=setTimeout(Blockly.Tooltip.show_, -Blockly.Tooltip.HOVER_MS))};Blockly.Tooltip.hide=function(){Blockly.Tooltip.visible&&(Blockly.Tooltip.visible=!1,Blockly.Tooltip.DIV&&(Blockly.Tooltip.DIV.style.display="none"));Blockly.Tooltip.showPid_&&clearTimeout(Blockly.Tooltip.showPid_)};Blockly.Tooltip.block=function(){Blockly.Tooltip.hide();Blockly.Tooltip.blocked_=!0};Blockly.Tooltip.unblock=function(){Blockly.Tooltip.blocked_=!1}; -Blockly.Tooltip.show_=function(){if(!Blockly.Tooltip.blocked_&&(Blockly.Tooltip.poisonedElement_=Blockly.Tooltip.element_,Blockly.Tooltip.DIV)){Blockly.Tooltip.DIV.innerHTML="";for(var a=Blockly.Tooltip.element_.tooltip;"function"==typeof a;)a=a();a=Blockly.utils.string.wrap(a,Blockly.Tooltip.LIMIT);a=a.split("\n");for(var b=0;bc+window.scrollY&&(e-=Blockly.Tooltip.DIV.offsetHeight+2*Blockly.Tooltip.OFFSET_Y);a?d=Math.max(Blockly.Tooltip.MARGINS-window.scrollX, -d):d+Blockly.Tooltip.DIV.offsetWidth>b+window.scrollX-2*Blockly.Tooltip.MARGINS&&(d=b-Blockly.Tooltip.DIV.offsetWidth-2*Blockly.Tooltip.MARGINS);Blockly.Tooltip.DIV.style.top=e+"px";Blockly.Tooltip.DIV.style.left=d+"px"}};Blockly.Gesture=function(a,b){this.startWorkspace_=this.targetBlock_=this.startBlock_=this.startField_=this.startBubble_=this.currentDragDeltaXY_=this.mouseDownXY_=null;this.creatorWorkspace_=b;this.isDraggingBubble_=this.isDraggingBlock_=this.isDraggingWorkspace_=this.hasExceededDragRadius_=!1;this.mostRecentEvent_=a;this.flyout_=this.workspaceDragger_=this.blockDragger_=this.bubbleDragger_=this.onUpWrapper_=this.onMoveWrapper_=null;this.isEnding_=this.hasStarted_=this.calledUpdateIsDragging_=!1; -this.healStack_=!Blockly.DRAG_STACK}; -Blockly.Gesture.prototype.dispose=function(){Blockly.Touch.clearTouchIdentifier();Blockly.Tooltip.unblock();this.creatorWorkspace_.clearGesture();this.onMoveWrapper_&&Blockly.unbindEvent_(this.onMoveWrapper_);this.onUpWrapper_&&Blockly.unbindEvent_(this.onUpWrapper_);this.flyout_=this.startWorkspace_=this.targetBlock_=this.startBlock_=this.startField_=null;this.blockDragger_&&(this.blockDragger_.dispose(),this.blockDragger_=null);this.workspaceDragger_&&(this.workspaceDragger_.dispose(),this.workspaceDragger_= -null);this.bubbleDragger_&&(this.bubbleDragger_.dispose(),this.bubbleDragger_=null)};Blockly.Gesture.prototype.updateFromEvent_=function(a){var b=new Blockly.utils.Coordinate(a.clientX,a.clientY);this.updateDragDelta_(b)&&(this.updateIsDragging_(),Blockly.longStop_());this.mostRecentEvent_=a}; -Blockly.Gesture.prototype.updateDragDelta_=function(a){this.currentDragDeltaXY_=Blockly.utils.Coordinate.difference(a,this.mouseDownXY_);return this.hasExceededDragRadius_?!1:this.hasExceededDragRadius_=Blockly.utils.Coordinate.magnitude(this.currentDragDeltaXY_)>(this.flyout_?Blockly.FLYOUT_DRAG_RADIUS:Blockly.DRAG_RADIUS)}; -Blockly.Gesture.prototype.updateIsDraggingFromFlyout_=function(){return this.flyout_.isBlockCreatable_(this.targetBlock_)?!this.flyout_.isScrollable()||this.flyout_.isDragTowardWorkspace(this.currentDragDeltaXY_)?(this.startWorkspace_=this.flyout_.targetWorkspace_,this.startWorkspace_.updateScreenCalculationsIfScrolled(),Blockly.Events.getGroup()||Blockly.Events.setGroup(!0),this.startBlock_=null,this.targetBlock_=this.flyout_.createBlock(this.targetBlock_),this.targetBlock_.select(),!0):!1:!1}; -Blockly.Gesture.prototype.updateIsDraggingBubble_=function(){if(!this.startBubble_)return!1;this.isDraggingBubble_=!0;this.startDraggingBubble_();return!0};Blockly.Gesture.prototype.updateIsDraggingBlock_=function(){if(!this.targetBlock_)return!1;this.flyout_?this.isDraggingBlock_=this.updateIsDraggingFromFlyout_():this.targetBlock_.isMovable()&&(this.isDraggingBlock_=!0);return this.isDraggingBlock_?(this.startDraggingBlock_(),!0):!1}; -Blockly.Gesture.prototype.updateIsDraggingWorkspace_=function(){if(this.flyout_?this.flyout_.isScrollable():this.startWorkspace_&&this.startWorkspace_.isDraggable())this.workspaceDragger_=this.flyout_?new Blockly.FlyoutDragger(this.flyout_):new Blockly.WorkspaceDragger(this.startWorkspace_),this.isDraggingWorkspace_=!0,this.workspaceDragger_.startDrag()}; -Blockly.Gesture.prototype.updateIsDragging_=function(){if(this.calledUpdateIsDragging_)throw Error("updateIsDragging_ should only be called once per gesture.");this.calledUpdateIsDragging_=!0;this.updateIsDraggingBubble_()||this.updateIsDraggingBlock_()||this.updateIsDraggingWorkspace_()}; -Blockly.Gesture.prototype.startDraggingBlock_=function(){this.blockDragger_=new Blockly.BlockDragger(this.targetBlock_,this.startWorkspace_);this.blockDragger_.startBlockDrag(this.currentDragDeltaXY_,this.healStack_);this.blockDragger_.dragBlock(this.mostRecentEvent_,this.currentDragDeltaXY_)}; -Blockly.Gesture.prototype.startDraggingBubble_=function(){this.bubbleDragger_=new Blockly.BubbleDragger(this.startBubble_,this.startWorkspace_);this.bubbleDragger_.startBubbleDrag();this.bubbleDragger_.dragBubble(this.mostRecentEvent_,this.currentDragDeltaXY_)}; -Blockly.Gesture.prototype.doStart=function(a){Blockly.utils.isTargetInput(a)?this.cancel():(this.hasStarted_=!0,Blockly.blockAnimations.disconnectUiStop(),this.startWorkspace_.updateScreenCalculationsIfScrolled(),this.startWorkspace_.isMutator&&this.startWorkspace_.resize(),this.startWorkspace_.markFocused(),this.mostRecentEvent_=a,Blockly.hideChaff(!!this.flyout_),Blockly.Tooltip.block(),this.targetBlock_&&(!this.targetBlock_.isInFlyout&&a.shiftKey?(Blockly.navigation.enableKeyboardAccessibility(), -this.creatorWorkspace_.getCursor().setCurNode(Blockly.navigation.getTopNode(this.targetBlock_))):this.targetBlock_.select()),Blockly.utils.isRightButton(a)?this.handleRightClick(a):("touchstart"!=a.type.toLowerCase()&&"pointerdown"!=a.type.toLowerCase()||"mouse"==a.pointerType||Blockly.longStart_(a,this),this.mouseDownXY_=new Blockly.utils.Coordinate(a.clientX,a.clientY),this.healStack_=a.altKey||a.ctrlKey||a.metaKey,this.bindMouseEvents(a)))}; -Blockly.Gesture.prototype.bindMouseEvents=function(a){this.onMoveWrapper_=Blockly.bindEventWithChecks_(document,"mousemove",null,this.handleMove.bind(this));this.onUpWrapper_=Blockly.bindEventWithChecks_(document,"mouseup",null,this.handleUp.bind(this));a.preventDefault();a.stopPropagation()}; -Blockly.Gesture.prototype.handleMove=function(a){this.updateFromEvent_(a);this.isDraggingWorkspace_?this.workspaceDragger_.drag(this.currentDragDeltaXY_):this.isDraggingBlock_?this.blockDragger_.dragBlock(this.mostRecentEvent_,this.currentDragDeltaXY_):this.isDraggingBubble_&&this.bubbleDragger_.dragBubble(this.mostRecentEvent_,this.currentDragDeltaXY_);a.preventDefault();a.stopPropagation()}; -Blockly.Gesture.prototype.handleUp=function(a){this.updateFromEvent_(a);Blockly.longStop_();this.isEnding_?console.log("Trying to end a gesture recursively."):(this.isEnding_=!0,this.isDraggingBubble_?this.bubbleDragger_.endBubbleDrag(a,this.currentDragDeltaXY_):this.isDraggingBlock_?this.blockDragger_.endBlockDrag(a,this.currentDragDeltaXY_):this.isDraggingWorkspace_?this.workspaceDragger_.endDrag(this.currentDragDeltaXY_):this.isBubbleClick_()?this.doBubbleClick_():this.isFieldClick_()?this.doFieldClick_(): -this.isBlockClick_()?this.doBlockClick_():this.isWorkspaceClick_()&&this.doWorkspaceClick_(a),a.preventDefault(),a.stopPropagation(),this.dispose())}; -Blockly.Gesture.prototype.cancel=function(){this.isEnding_||(Blockly.longStop_(),this.isDraggingBubble_?this.bubbleDragger_.endBubbleDrag(this.mostRecentEvent_,this.currentDragDeltaXY_):this.isDraggingBlock_?this.blockDragger_.endBlockDrag(this.mostRecentEvent_,this.currentDragDeltaXY_):this.isDraggingWorkspace_&&this.workspaceDragger_.endDrag(this.currentDragDeltaXY_),this.dispose())}; -Blockly.Gesture.prototype.handleRightClick=function(a){this.targetBlock_?(this.bringBlockToFront_(),Blockly.hideChaff(this.flyout_),this.targetBlock_.showContextMenu_(a)):this.startBubble_?this.startBubble_.showContextMenu_(a):this.startWorkspace_&&!this.flyout_&&(Blockly.hideChaff(),this.startWorkspace_.showContextMenu_(a));a.preventDefault();a.stopPropagation();this.dispose()}; -Blockly.Gesture.prototype.handleWsStart=function(a,b){if(this.hasStarted_)throw Error("Tried to call gesture.handleWsStart, but the gesture had already been started.");this.setStartWorkspace_(b);this.mostRecentEvent_=a;this.doStart(a);Blockly.keyboardAccessibilityMode&&Blockly.navigation.setState(Blockly.navigation.STATE_WS)}; -Blockly.Gesture.prototype.handleFlyoutStart=function(a,b){if(this.hasStarted_)throw Error("Tried to call gesture.handleFlyoutStart, but the gesture had already been started.");this.setStartFlyout_(b);this.handleWsStart(a,b.getWorkspace())};Blockly.Gesture.prototype.handleBlockStart=function(a,b){if(this.hasStarted_)throw Error("Tried to call gesture.handleBlockStart, but the gesture had already been started.");this.setStartBlock(b);this.mostRecentEvent_=a}; -Blockly.Gesture.prototype.handleBubbleStart=function(a,b){if(this.hasStarted_)throw Error("Tried to call gesture.handleBubbleStart, but the gesture had already been started.");this.setStartBubble(b);this.mostRecentEvent_=a};Blockly.Gesture.prototype.doBubbleClick_=function(){this.startBubble_.setFocus&&this.startBubble_.setFocus();this.startBubble_.select&&this.startBubble_.select()};Blockly.Gesture.prototype.doFieldClick_=function(){this.startField_.showEditor_();this.bringBlockToFront_()}; -Blockly.Gesture.prototype.doBlockClick_=function(){this.flyout_&&this.flyout_.autoClose?this.targetBlock_.isEnabled()&&(Blockly.Events.getGroup()||Blockly.Events.setGroup(!0),this.flyout_.createBlock(this.targetBlock_).scheduleSnapAndBump()):Blockly.Events.fire(new Blockly.Events.Ui(this.startBlock_,"click",void 0,void 0));this.bringBlockToFront_();Blockly.Events.setGroup(!1)}; -Blockly.Gesture.prototype.doWorkspaceClick_=function(a){var b=this.creatorWorkspace_;a.shiftKey?(Blockly.navigation.enableKeyboardAccessibility(),a=new Blockly.utils.Coordinate(a.clientX,a.clientY),a=Blockly.utils.screenToWsCoordinates(b,a),a=Blockly.ASTNode.createWorkspaceNode(b,a),b.getCursor().setCurNode(a)):Blockly.selected&&Blockly.selected.unselect()};Blockly.Gesture.prototype.bringBlockToFront_=function(){this.targetBlock_&&!this.flyout_&&this.targetBlock_.bringToFront()}; -Blockly.Gesture.prototype.setStartField=function(a){if(this.hasStarted_)throw Error("Tried to call gesture.setStartField, but the gesture had already been started.");this.startField_||(this.startField_=a)};Blockly.Gesture.prototype.setStartBubble=function(a){this.startBubble_||(this.startBubble_=a)};Blockly.Gesture.prototype.setStartBlock=function(a){this.startBlock_||this.startBubble_||(this.startBlock_=a,a.isInFlyout&&a!=a.getRootBlock()?this.setTargetBlock_(a.getRootBlock()):this.setTargetBlock_(a))}; -Blockly.Gesture.prototype.setTargetBlock_=function(a){a.isShadow()?this.setTargetBlock_(a.getParent()):this.targetBlock_=a};Blockly.Gesture.prototype.setStartWorkspace_=function(a){this.startWorkspace_||(this.startWorkspace_=a)};Blockly.Gesture.prototype.setStartFlyout_=function(a){this.flyout_||(this.flyout_=a)};Blockly.Gesture.prototype.isBubbleClick_=function(){return!!this.startBubble_&&!this.hasExceededDragRadius_}; -Blockly.Gesture.prototype.isBlockClick_=function(){return!!this.startBlock_&&!this.hasExceededDragRadius_&&!this.isFieldClick_()};Blockly.Gesture.prototype.isFieldClick_=function(){return(this.startField_?this.startField_.isClickable():!1)&&!this.hasExceededDragRadius_&&(!this.flyout_||!this.flyout_.autoClose)};Blockly.Gesture.prototype.isWorkspaceClick_=function(){return!this.startBlock_&&!this.startBubble_&&!this.startField_&&!this.hasExceededDragRadius_}; -Blockly.Gesture.prototype.isDragging=function(){return this.isDraggingWorkspace_||this.isDraggingBlock_||this.isDraggingBubble_};Blockly.Gesture.prototype.hasStarted=function(){return this.hasStarted_};Blockly.Gesture.prototype.getInsertionMarkers=function(){return this.blockDragger_?this.blockDragger_.getInsertionMarkers():[]};Blockly.Gesture.inProgress=function(){for(var a=Blockly.Workspace.getAll(),b=0,c;c=a[b];b++)if(c.currentGesture_)return!0;return!1};Blockly.Field=function(a,b,c){this.tooltip_=this.validator_=this.value_=null;this.size_=new Blockly.utils.Size(0,0);this.markerSvg_=this.cursorSvg_=null;c&&this.configure_(c);this.setValue(a);b&&this.setValidator(b)};Blockly.Field.BORDER_RECT_DEFAULT_HEIGHT=16;Blockly.Field.TEXT_DEFAULT_HEIGHT=12.5;Blockly.Field.X_PADDING=10;Blockly.Field.Y_PADDING=10;Blockly.Field.DEFAULT_TEXT_OFFSET=Blockly.Field.X_PADDING/2;Blockly.Field.prototype.name=void 0;Blockly.Field.prototype.disposed=!1; -Blockly.Field.prototype.maxDisplayLength=50;Blockly.Field.prototype.sourceBlock_=null;Blockly.Field.prototype.isDirty_=!0;Blockly.Field.prototype.visible_=!0;Blockly.Field.prototype.clickTarget_=null;Blockly.Field.NBSP="\u00a0";Blockly.Field.prototype.EDITABLE=!0;Blockly.Field.prototype.SERIALIZABLE=!1;Blockly.Field.prototype.configure_=function(a){var b=a.tooltip;"string"==typeof b&&(b=Blockly.utils.replaceMessageReferences(a.tooltip));b&&this.setTooltip(b)}; -Blockly.Field.prototype.setSourceBlock=function(a){if(this.sourceBlock_)throw Error("Field already bound to a block.");this.sourceBlock_=a};Blockly.Field.prototype.getSourceBlock=function(){return this.sourceBlock_}; -Blockly.Field.prototype.init=function(){this.fieldGroup_||(this.fieldGroup_=Blockly.utils.dom.createSvgElement("g",{},null),this.isVisible()||(this.fieldGroup_.style.display="none"),this.sourceBlock_.getSvgRoot().appendChild(this.fieldGroup_),this.initView(),this.updateEditable(),this.setTooltip(this.tooltip_),this.bindEvents_(),this.initModel())};Blockly.Field.prototype.initView=function(){this.createBorderRect_();this.createTextElement_()};Blockly.Field.prototype.initModel=function(){}; -Blockly.Field.prototype.createBorderRect_=function(){this.size_.height=Math.max(this.size_.height,Blockly.Field.BORDER_RECT_DEFAULT_HEIGHT);this.size_.width=Math.max(this.size_.width,Blockly.Field.X_PADDING);this.borderRect_=Blockly.utils.dom.createSvgElement("rect",{rx:4,ry:4,x:0,y:0,height:this.size_.height,width:this.size_.width},this.fieldGroup_)}; -Blockly.Field.prototype.createTextElement_=function(){this.textElement_=Blockly.utils.dom.createSvgElement("text",{"class":"blocklyText",y:Blockly.Field.TEXT_DEFAULT_HEIGHT,x:this.borderRect_?Blockly.Field.DEFAULT_TEXT_OFFSET:0},this.fieldGroup_);this.textContent_=document.createTextNode("");this.textElement_.appendChild(this.textContent_)}; -Blockly.Field.prototype.bindEvents_=function(){Blockly.Tooltip.bindMouseEvents(this.getClickTarget_());this.mouseDownWrapper_=Blockly.bindEventWithChecks_(this.getClickTarget_(),"mousedown",this,this.onMouseDown_)};Blockly.Field.prototype.fromXml=function(a){this.setValue(a.textContent)};Blockly.Field.prototype.toXml=function(a){a.textContent=this.getValue();return a}; -Blockly.Field.prototype.dispose=function(){Blockly.DropDownDiv.hideIfOwner(this);Blockly.WidgetDiv.hideIfOwner(this);this.mouseDownWrapper_&&Blockly.unbindEvent_(this.mouseDownWrapper_);Blockly.utils.dom.removeNode(this.fieldGroup_);this.disposed=!0}; -Blockly.Field.prototype.updateEditable=function(){var a=this.getClickTarget_();this.EDITABLE&&a&&(this.sourceBlock_.isEditable()?(Blockly.utils.dom.addClass(a,"blocklyEditableText"),Blockly.utils.dom.removeClass(a,"blocklyNonEditableText"),a.style.cursor=this.CURSOR):(Blockly.utils.dom.addClass(a,"blocklyNonEditableText"),Blockly.utils.dom.removeClass(a,"blocklyEditableText"),a.style.cursor=""))}; -Blockly.Field.prototype.isClickable=function(){return!!this.sourceBlock_&&this.sourceBlock_.isEditable()&&!!this.showEditor_&&"function"===typeof this.showEditor_};Blockly.Field.prototype.isCurrentlyEditable=function(){return this.EDITABLE&&!!this.sourceBlock_&&this.sourceBlock_.isEditable()}; -Blockly.Field.prototype.isSerializable=function(){var a=!1;this.name&&(this.SERIALIZABLE?a=!0:this.EDITABLE&&(console.warn("Detected an editable field that was not serializable. Please define SERIALIZABLE property as true on all editable custom fields. Proceeding with serialization."),a=!0));return a};Blockly.Field.prototype.isVisible=function(){return this.visible_}; -Blockly.Field.prototype.setVisible=function(a){if(this.visible_!=a){this.visible_=a;var b=this.getSvgRoot();b&&(b.style.display=a?"block":"none")}};Blockly.Field.prototype.setValidator=function(a){this.validator_=a};Blockly.Field.prototype.getValidator=function(){return this.validator_};Blockly.Field.prototype.classValidator=function(a){return a}; -Blockly.Field.prototype.callValidator=function(a){var b=this.classValidator(a);if(null===b)return null;void 0!==b&&(a=b);if(b=this.getValidator()){b=b.call(this,a);if(null===b)return null;void 0!==b&&(a=b)}return a};Blockly.Field.prototype.getSvgRoot=function(){return this.fieldGroup_};Blockly.Field.prototype.updateColour=function(){};Blockly.Field.prototype.render_=function(){this.textContent_&&(this.textContent_.nodeValue=this.getDisplayText_(),this.updateSize_())}; -Blockly.Field.prototype.updateWidth=function(){console.warn("Deprecated call to updateWidth, call Blockly.Field.updateSize_ to force an update to the size of the field, or Blockly.utils.dom.getTextWidth() to check the size of the field.");this.updateSize_()};Blockly.Field.prototype.updateSize_=function(){var a=Blockly.utils.dom.getTextWidth(this.textElement_);this.borderRect_&&(a+=Blockly.Field.X_PADDING,this.borderRect_.setAttribute("width",a));this.size_.width=a}; -Blockly.Field.prototype.getSize=function(){if(!this.isVisible())return new Blockly.utils.Size(0,0);this.isDirty_?(this.render_(),this.isDirty_=!1):this.visible_&&0==this.size_.width&&(console.warn("Deprecated use of setting size_.width to 0 to rerender a field. Set field.isDirty_ to true instead."),this.render_());return this.size_}; -Blockly.Field.prototype.getScaledBBox_=function(){var a=this.borderRect_.getBBox(),b=a.height*this.sourceBlock_.workspace.scale;a=a.width*this.sourceBlock_.workspace.scale;var c=this.getAbsoluteXY_();return{top:c.y,bottom:c.y+b,left:c.x,right:c.x+a}}; -Blockly.Field.prototype.getDisplayText_=function(){var a=this.getText();if(!a)return Blockly.Field.NBSP;a.length>this.maxDisplayLength&&(a=a.substring(0,this.maxDisplayLength-2)+"\u2026");a=a.replace(/\s/g,Blockly.Field.NBSP);this.sourceBlock_&&this.sourceBlock_.RTL&&(a+="\u200f");return a};Blockly.Field.prototype.getText=function(){if(this.getText_){var a=this.getText_.call(this);if(null!==a)return String(a)}return String(this.getValue())}; -Blockly.Field.prototype.setText=function(a){throw Error("setText method is deprecated");};Blockly.Field.prototype.markDirty=function(){this.isDirty_=!0};Blockly.Field.prototype.forceRerender=function(){this.isDirty_=!0;this.sourceBlock_&&this.sourceBlock_.rendered&&(this.sourceBlock_.render(),this.sourceBlock_.bumpNeighbours())}; -Blockly.Field.prototype.setValue=function(a){if(null!==a){var b=this.doClassValidation_(a);a=this.processValidation_(a,b);if(!(a instanceof Error)){if(b=this.getValidator())if(b=b.call(this,a),a=this.processValidation_(a,b),a instanceof Error)return;b=this.getValue();b!==a&&(this.sourceBlock_&&Blockly.Events.isEnabled()&&Blockly.Events.fire(new Blockly.Events.BlockChange(this.sourceBlock_,"field",this.name||null,b,a)),this.doValueUpdate_(a),this.isDirty_&&this.forceRerender())}}}; -Blockly.Field.prototype.processValidation_=function(a,b){if(null===b)return this.doValueInvalid_(a),this.isDirty_&&this.forceRerender(),Error();void 0!==b&&(a=b);return a};Blockly.Field.prototype.getValue=function(){return this.value_};Blockly.Field.prototype.doClassValidation_=function(a){return null===a||void 0===a?null:a=this.classValidator(a)};Blockly.Field.prototype.doValueUpdate_=function(a){this.value_=a;this.isDirty_=!0};Blockly.Field.prototype.doValueInvalid_=function(a){}; -Blockly.Field.prototype.onMouseDown_=function(a){this.sourceBlock_&&this.sourceBlock_.workspace&&(a=this.sourceBlock_.workspace.getGesture(a))&&a.setStartField(this)};Blockly.Field.prototype.setTooltip=function(a){var b=this.getClickTarget_();b?b.tooltip=a||""===a?a:this.sourceBlock_:this.tooltip_=a};Blockly.Field.prototype.getClickTarget_=function(){return this.clickTarget_||this.getSvgRoot()};Blockly.Field.prototype.getAbsoluteXY_=function(){return Blockly.utils.style.getPageOffset(this.borderRect_)}; -Blockly.Field.prototype.referencesVariables=function(){return!1};Blockly.Field.prototype.getParentInput=function(){for(var a=null,b=this.sourceBlock_,c=b.inputList,d=0;da||a>this.fieldRow.length)throw Error("index "+a+" out of bounds.");if(!(b||""==b&&c))return a;"string"==typeof b&&(b=new Blockly.FieldLabel(b));b.setSourceBlock(this.sourceBlock_);this.sourceBlock_.rendered&&b.init();b.name=c;b.prefixField&&(a=this.insertFieldAt(a,b.prefixField));this.fieldRow.splice(a,0,b);++a;b.suffixField&&(a=this.insertFieldAt(a,b.suffixField));this.sourceBlock_.rendered&&(this.sourceBlock_.render(),this.sourceBlock_.bumpNeighbours()); -return a};Blockly.Input.prototype.removeField=function(a){for(var b=0,c;c=this.fieldRow[b];b++)if(c.name===a){c.dispose();this.fieldRow.splice(b,1);this.sourceBlock_.rendered&&(this.sourceBlock_.render(),this.sourceBlock_.bumpNeighbours());return}throw Error('Field "%s" not found.',a);};Blockly.Input.prototype.isVisible=function(){return this.visible_}; -Blockly.Input.prototype.setVisible=function(a){var b=[];if(this.visible_==a)return b;for(var c=(this.visible_=a)?"block":"none",d=0,e;e=this.fieldRow[d];d++)e.setVisible(a);this.connection&&(a?b=this.connection.unhideAll():this.connection.hideAll(),d=this.connection.targetBlock())&&(d.getSvgRoot().style.display=c,a||(d.rendered=!1));return b};Blockly.Input.prototype.markDirty=function(){for(var a=0,b;b=this.fieldRow[a];a++)b.markDirty()}; -Blockly.Input.prototype.setCheck=function(a){if(!this.connection)throw Error("This input does not have a connection.");this.connection.setCheck(a);return this};Blockly.Input.prototype.setAlign=function(a){this.align=a;this.sourceBlock_.rendered&&this.sourceBlock_.render();return this};Blockly.Input.prototype.init=function(){if(this.sourceBlock_.workspace.rendered)for(var a=0;aa&&0<=b&&256>b&&0<=c&&256>c)?Blockly.utils.colour.rgbToHex(a,b,c):null}; -Blockly.utils.colour.rgbToHex=function(a,b,c){b=a<<16|b<<8|c;return 16>a?"#"+(16777216|b).toString(16).substr(1):"#"+b.toString(16)};Blockly.utils.colour.hexToRgb=function(a){a=parseInt(a.substr(1),16);return[a>>16,a>>8&255,a&255]}; -Blockly.utils.colour.hsvToHex=function(a,b,c){var d=0,e=0,f=0;if(0==b)f=e=d=c;else{var g=Math.floor(a/60),h=a/60-g;a=c*(1-b);var k=c*(1-b*h);b=c*(1-b*(1-h));switch(g){case 1:d=k;e=c;f=a;break;case 2:d=a;e=c;f=b;break;case 3:d=a;e=k;f=c;break;case 4:d=b;e=a;f=c;break;case 5:d=c;e=a;f=k;break;case 6:case 0:d=c,e=b,f=a}}return Blockly.utils.colour.rgbToHex(Math.floor(d),Math.floor(e),Math.floor(f))}; -Blockly.utils.colour.blend=function(a,b,c){a=Blockly.utils.colour.hexToRgb(Blockly.utils.colour.parse(a));b=Blockly.utils.colour.hexToRgb(Blockly.utils.colour.parse(b));return Blockly.utils.colour.rgbToHex(Math.round(b[0]+c*(a[0]-b[0])),Math.round(b[1]+c*(a[1]-b[1])),Math.round(b[2]+c*(a[2]-b[2])))}; -Blockly.utils.colour.names={aqua:"#00ffff",black:"#000000",blue:"#0000ff",fuchsia:"#ff00ff",gray:"#808080",green:"#008000",lime:"#00ff00",maroon:"#800000",navy:"#000080",olive:"#808000",purple:"#800080",red:"#ff0000",silver:"#c0c0c0",teal:"#008080",white:"#ffffff",yellow:"#ffff00"};Blockly.Block=function(a,b,c){if(Blockly.Generator&&"undefined"!=typeof Blockly.Generator.prototype[b])throw Error('Block prototypeName "'+b+'" conflicts with Blockly.Generator members.');this.id=c&&!a.getBlockById(c)?c:Blockly.utils.genUid();a.blockDB_[this.id]=this;this.previousConnection=this.nextConnection=this.outputConnection=null;this.inputList=[];this.inputsInline=void 0;this.disabled=!1;this.tooltip="";this.contextMenu=!0;this.parentBlock_=null;this.childBlocks_=[];this.editable_=this.movable_= -this.deletable_=!0;this.collapsed_=this.isShadow_=!1;this.comment=null;this.commentModel={text:null,pinned:!1,size:new Blockly.utils.Size(160,80)};this.xy_=new Blockly.utils.Coordinate(0,0);this.workspace=a;this.isInFlyout=a.isFlyout;this.isInMutator=a.isMutator;this.RTL=a.RTL;this.isInsertionMarker_=!1;this.hat=void 0;if(b){this.type=b;c=Blockly.Blocks[b];if(!c||"object"!=typeof c)throw TypeError("Unknown block type: "+b);Blockly.utils.object.mixin(this,c)}a.addTopBlock(this);a.addTypedBlock(this); -"function"==typeof this.init&&this.init();this.inputsInlineDefault=this.inputsInline;if(Blockly.Events.isEnabled()){(a=Blockly.Events.getGroup())||Blockly.Events.setGroup(!0);try{Blockly.Events.fire(new Blockly.Events.BlockCreate(this))}finally{a||Blockly.Events.setGroup(!1)}}"function"==typeof this.onchange&&this.setOnChange(this.onchange)};Blockly.Block.prototype.data=null;Blockly.Block.prototype.disposed=!1;Blockly.Block.prototype.hue_=null;Blockly.Block.prototype.colour_="#000000"; -Blockly.Block.prototype.colourSecondary_=null;Blockly.Block.prototype.colourTertiary_=null;Blockly.Block.prototype.styleName_=null; -Blockly.Block.prototype.dispose=function(a){if(this.workspace){this.onchangeWrapper_&&this.workspace.removeChangeListener(this.onchangeWrapper_);Blockly.keyboardAccessibilityMode&&Blockly.navigation.moveCursorOnBlockDelete(this);this.unplug(a);Blockly.Events.isEnabled()&&Blockly.Events.fire(new Blockly.Events.BlockDelete(this));Blockly.Events.disable();try{this.workspace&&(this.workspace.removeTopBlock(this),this.workspace.removeTypedBlock(this),delete this.workspace.blockDB_[this.id],this.workspace= -null);Blockly.selected==this&&(Blockly.selected=null);for(var b=this.childBlocks_.length-1;0<=b;b--)this.childBlocks_[b].dispose(!1);b=0;for(var c;c=this.inputList[b];b++)c.dispose();this.inputList.length=0;var d=this.getConnections_(!0);b=0;for(var e;e=d[b];b++)e.dispose()}finally{Blockly.Events.enable(),this.disposed=!0}}};Blockly.Block.prototype.initModel=function(){for(var a=0,b;b=this.inputList[a];a++)for(var c=0,d;d=b.fieldRow[c];c++)d.initModel&&d.initModel()}; -Blockly.Block.prototype.unplug=function(a){this.outputConnection?this.unplugFromRow_(a):this.previousConnection&&this.unplugFromStack_(a)};Blockly.Block.prototype.unplugFromRow_=function(a){var b=null;this.outputConnection.isConnected()&&(b=this.outputConnection.targetConnection,this.outputConnection.disconnect());if(b&&a&&(a=this.getOnlyValueConnection_())&&a.isConnected()&&!a.targetBlock().isShadow())if(a=a.targetConnection,a.disconnect(),a.checkType_(b))b.connect(a);else a.onFailedConnect(b)}; -Blockly.Block.prototype.getOnlyValueConnection_=function(){for(var a=null,b=0;b=c)this.hue_=c,this.colour_=Blockly.hueToHex(c);else if(c=Blockly.utils.colour.parse(b))this.colour_=c,this.hue_=null;else throw c='Invalid colour: "'+b+'"',a!=b&&(c+=' (from "'+a+'")'),Error(c);}; -Blockly.Block.prototype.setStyle=function(a){var b=this.workspace.getTheme().getBlockStyle(a);this.styleName_=a;if(b)this.colourSecondary_=b.colourSecondary,this.colourTertiary_=b.colourTertiary,this.hat=b.hat,this.setColour(b.colourPrimary);else throw Error("Invalid style name: "+a);}; -Blockly.Block.prototype.setOnChange=function(a){if(a&&"function"!=typeof a)throw Error("onchange must be a function.");this.onchangeWrapper_&&this.workspace.removeChangeListener(this.onchangeWrapper_);if(this.onchange=a)this.onchangeWrapper_=a.bind(this),this.workspace.addChangeListener(this.onchangeWrapper_)};Blockly.Block.prototype.getField=function(a){for(var b=0,c;c=this.inputList[b];b++)for(var d=0,e;e=c.fieldRow[d];d++)if(e.name==a)return e;return null}; -Blockly.Block.prototype.getVars=function(){for(var a=[],b=0,c;c=this.inputList[b];b++)for(var d=0,e;e=c.fieldRow[d];d++)e.referencesVariables()&&a.push(e.getValue());return a};Blockly.Block.prototype.getVarModels=function(){for(var a=[],b=0,c;c=this.inputList[b];b++)for(var d=0,e;e=c.fieldRow[d];d++)e.referencesVariables()&&(e=this.workspace.getVariableById(e.getValue()))&&a.push(e);return a}; -Blockly.Block.prototype.updateVarName=function(a){for(var b=0,c;c=this.inputList[b];b++)for(var d=0,e;e=c.fieldRow[d];d++)e.referencesVariables()&&a.getId()==e.getValue()&&e.refreshVariableName()};Blockly.Block.prototype.renameVarById=function(a,b){for(var c=0,d;d=this.inputList[c];c++)for(var e=0,f;f=d.fieldRow[e];e++)f.referencesVariables()&&a==f.getValue()&&f.setValue(b)};Blockly.Block.prototype.getFieldValue=function(a){return(a=this.getField(a))?a.getValue():null}; -Blockly.Block.prototype.setFieldValue=function(a,b){var c=this.getField(b);if(!c)throw Error('Field "'+b+'" not found.');c.setValue(a)}; -Blockly.Block.prototype.setPreviousStatement=function(a,b){if(a){void 0===b&&(b=null);if(!this.previousConnection){if(this.outputConnection)throw Error("Remove output connection prior to adding previous connection.");this.previousConnection=this.makeConnection_(Blockly.PREVIOUS_STATEMENT)}this.previousConnection.setCheck(b)}else if(this.previousConnection){if(this.previousConnection.isConnected())throw Error("Must disconnect previous statement before removing connection.");this.previousConnection.dispose(); -this.previousConnection=null}};Blockly.Block.prototype.setNextStatement=function(a,b){if(a)void 0===b&&(b=null),this.nextConnection||(this.nextConnection=this.makeConnection_(Blockly.NEXT_STATEMENT)),this.nextConnection.setCheck(b);else if(this.nextConnection){if(this.nextConnection.isConnected())throw Error("Must disconnect next statement before removing connection.");this.nextConnection.dispose();this.nextConnection=null}}; -Blockly.Block.prototype.setOutput=function(a,b){if(a){void 0===b&&(b=null);if(!this.outputConnection){if(this.previousConnection)throw Error("Remove previous connection prior to adding output connection.");this.outputConnection=this.makeConnection_(Blockly.OUTPUT_VALUE)}this.outputConnection.setCheck(b)}else if(this.outputConnection){if(this.outputConnection.isConnected())throw Error("Must disconnect output value before removing connection.");this.outputConnection.dispose();this.outputConnection= -null}};Blockly.Block.prototype.setInputsInline=function(a){this.inputsInline!=a&&(Blockly.Events.fire(new Blockly.Events.BlockChange(this,"inline",null,this.inputsInline,a)),this.inputsInline=a)}; -Blockly.Block.prototype.getInputsInline=function(){if(void 0!=this.inputsInline)return this.inputsInline;for(var a=1;aa&&(c=c.substring(0,a-3)+"...");return c}; -Blockly.Block.prototype.appendValueInput=function(a){return this.appendInput_(Blockly.INPUT_VALUE,a)};Blockly.Block.prototype.appendStatementInput=function(a){return this.appendInput_(Blockly.NEXT_STATEMENT,a)};Blockly.Block.prototype.appendDummyInput=function(a){return this.appendInput_(Blockly.DUMMY_INPUT,a||"")}; -Blockly.Block.prototype.jsonInit=function(a){var b=a.type?'Block "'+a.type+'": ':"";if(a.output&&a.previousStatement)throw Error(b+"Must not have both an output and a previousStatement.");a.style&&a.style.hat&&(this.hat=a.style.hat,a.style=null);if(a.style&&a.colour)throw Error(b+"Must not have both a colour and a style.");a.style?this.jsonInitStyle_(a,b):this.jsonInitColour_(a,b);for(var c=0;void 0!==a["message"+c];)this.interpolate_(a["message"+c],a["args"+c]||[],a["lastDummyAlign"+c]),c++;void 0!== -a.inputsInline&&this.setInputsInline(a.inputsInline);void 0!==a.output&&this.setOutput(!0,a.output);void 0!==a.previousStatement&&this.setPreviousStatement(!0,a.previousStatement);void 0!==a.nextStatement&&this.setNextStatement(!0,a.nextStatement);void 0!==a.tooltip&&(c=a.tooltip,c=Blockly.utils.replaceMessageReferences(c),this.setTooltip(c));void 0!==a.enableContextMenu&&(c=a.enableContextMenu,this.contextMenu=!!c);void 0!==a.helpUrl&&(c=a.helpUrl,c=Blockly.utils.replaceMessageReferences(c),this.setHelpUrl(c)); -"string"==typeof a.extensions&&(console.warn(b+"JSON attribute 'extensions' should be an array of strings. Found raw string in JSON for '"+a.type+"' block."),a.extensions=[a.extensions]);void 0!==a.mutator&&Blockly.Extensions.apply(a.mutator,this,!0);if(Array.isArray(a.extensions))for(a=a.extensions,b=0;b=h||h>b.length)throw Error('Block "'+this.type+'": Message index %'+h+" out of range.");if(e[h])throw Error('Block "'+this.type+'": Message index %'+h+" duplicated.");e[h]=!0;f++;a.push(b[h-1])}else(h=h.trim())&&a.push(h)}if(f!=b.length)throw Error('Block "'+this.type+'": Message does not reference all '+b.length+" arg(s)."); -a.length&&("string"==typeof a[a.length-1]||Blockly.utils.string.startsWith(a[a.length-1].type,"field_"))&&(g={type:"input_dummy"},c&&(g.align=c),a.push(g));c={LEFT:Blockly.ALIGN_LEFT,RIGHT:Blockly.ALIGN_RIGHT,CENTRE:Blockly.ALIGN_CENTRE};b=[];for(g=0;g=this.inputList.length)throw RangeError("Input index "+a+" out of bounds.");if(b>this.inputList.length)throw RangeError("Reference input "+b+" out of bounds.");var c=this.inputList[a];this.inputList.splice(a,1);ab||b>this.getChildCount())throw Error(Blockly.Component.Error.CHILD_INDEX_OUT_OF_BOUNDS);this.childIndex_[a.getId()]=a;if(a.getParent()==this){var d=this.children_.indexOf(a);-1a?b-1:a},this.highlightedIndex_)}; -Blockly.Menu.prototype.highlightHelper=function(a,b){var c=0>b?-1:b,d=this.getChildCount();c=a.call(this,c,d);for(var e=0;e<=d;){var f=this.getChildAt(c);if(f&&this.canHighlightItem(f))return this.setHighlightedIndex(c),!0;e++;c=a.call(this,c,d)}return!1};Blockly.Menu.prototype.canHighlightItem=function(a){return a.isEnabled()};Blockly.Menu.prototype.handleMouseOver_=function(a){(a=this.getMenuItem(a.target))&&a.isEnabled()&&this.getHighlighted()!==a&&(this.unhighlightCurrent(),this.setHighlighted(a))}; -Blockly.Menu.prototype.handleClick_=function(a){var b=this.getMenuItem(a.target);b&&b.handleClick(a)&&a.preventDefault()};Blockly.Menu.prototype.handleMouseEnter_=function(a){this.focus()};Blockly.Menu.prototype.handleMouseLeave_=function(a){this.getElement()&&(this.blur(),this.clearHighlighted())};Blockly.Menu.prototype.handleKeyEvent=function(a){return 0!=this.getChildCount()&&this.handleKeyEventInternal(a)?(a.preventDefault(),a.stopPropagation(),!0):!1}; -Blockly.Menu.prototype.handleKeyEventInternal=function(a){var b=this.getHighlighted();if(b&&"function"==typeof b.handleKeyEvent&&b.handleKeyEvent(a))return!0;if(a.shiftKey||a.ctrlKey||a.metaKey||a.altKey)return!1;switch(a.keyCode){case Blockly.utils.KeyCodes.ENTER:b&&b.performActionInternal(a);break;case Blockly.utils.KeyCodes.UP:this.highlightPrevious();break;case Blockly.utils.KeyCodes.DOWN:this.highlightNext();break;default:return!1}return!0};Blockly.MenuItem=function(a,b){Blockly.Component.call(this);this.setContentInternal(a);this.setValue(b);this.enabled_=!0};Blockly.utils.object.inherits(Blockly.MenuItem,Blockly.Component); -Blockly.MenuItem.prototype.createDom=function(){var a=document.createElement("div");a.id=this.getId();this.setElementInternal(a);a.className="goog-menuitem goog-option "+(this.enabled_?"":"goog-menuitem-disabled ")+(this.checked_?"goog-option-selected ":"")+(this.isRightToLeft()?"goog-menuitem-rtl ":"");var b=this.getContentWrapperDom();a.appendChild(b);var c=this.getCheckboxDom();c&&b.appendChild(c);b.appendChild(this.getContentDom());Blockly.utils.aria.setRole(a,this.roleName_||(this.checkable_? -Blockly.utils.aria.Role.MENUITEMCHECKBOX:Blockly.utils.aria.Role.MENUITEM));Blockly.utils.aria.setState(a,Blockly.utils.aria.State.SELECTED,this.checkable_&&this.checked_||!1)};Blockly.MenuItem.prototype.getCheckboxDom=function(){if(!this.checkable_)return null;var a=document.createElement("div");a.className="goog-menuitem-checkbox";return a};Blockly.MenuItem.prototype.getContentDom=function(){var a=this.content_;"string"===typeof a&&(a=document.createTextNode(a));return a}; -Blockly.MenuItem.prototype.getContentWrapperDom=function(){var a=document.createElement("div");a.className="goog-menuitem-content";return a};Blockly.MenuItem.prototype.setContentInternal=function(a){this.content_=a};Blockly.MenuItem.prototype.setValue=function(a){this.value_=a};Blockly.MenuItem.prototype.getValue=function(){return this.value_};Blockly.MenuItem.prototype.setRole=function(a){this.roleName_=a};Blockly.MenuItem.prototype.setCheckable=function(a){this.checkable_=a}; -Blockly.MenuItem.prototype.setChecked=function(a){if(this.checkable_){this.checked_=a;var b=this.getElement();b&&this.isEnabled()&&(a?(Blockly.utils.dom.addClass(b,"goog-option-selected"),Blockly.utils.aria.setState(b,Blockly.utils.aria.State.SELECTED,!0)):(Blockly.utils.dom.removeClass(b,"goog-option-selected"),Blockly.utils.aria.setState(b,Blockly.utils.aria.State.SELECTED,!1)))}}; -Blockly.MenuItem.prototype.setHighlighted=function(a){this.highlight_=a;var b=this.getElement();b&&this.isEnabled()&&(a?Blockly.utils.dom.addClass(b,"goog-menuitem-highlight"):Blockly.utils.dom.removeClass(b,"goog-menuitem-highlight"))};Blockly.MenuItem.prototype.isEnabled=function(){return this.enabled_};Blockly.MenuItem.prototype.setEnabled=function(a){this.enabled_=a;(a=this.getElement())&&(this.enabled_?Blockly.utils.dom.removeClass(a,"goog-menuitem-disabled"):Blockly.utils.dom.addClass(a,"goog-menuitem-disabled"))}; -Blockly.MenuItem.prototype.handleClick=function(a){this.isEnabled()&&(this.setHighlighted(!0),this.performActionInternal())};Blockly.MenuItem.prototype.performActionInternal=function(){this.checkable_&&this.setChecked(!this.checked_);this.actionHandler_&&this.actionHandler_.call(this.actionHandlerObj_,this)};Blockly.MenuItem.prototype.onAction=function(a,b){this.actionHandler_=a;this.actionHandlerObj_=b};Blockly.utils.uiMenu={};Blockly.utils.uiMenu.getSize=function(a){a=a.getElement();var b=Blockly.utils.style.getSize(a);b.height=a.scrollHeight;return b};Blockly.utils.uiMenu.adjustBBoxesForRTL=function(a,b,c){b.left+=c.width;b.right+=c.width;a.left+=c.width;a.right+=c.width};Blockly.ContextMenu={};Blockly.ContextMenu.currentBlock=null;Blockly.ContextMenu.eventWrapper_=null;Blockly.ContextMenu.show=function(a,b,c){Blockly.WidgetDiv.show(Blockly.ContextMenu,c,null);if(b.length){var d=Blockly.ContextMenu.populate_(b,c);Blockly.ContextMenu.position_(d,a,c);setTimeout(function(){d.getElement().focus()},1);Blockly.ContextMenu.currentBlock=null}else Blockly.ContextMenu.hide()}; -Blockly.ContextMenu.populate_=function(a,b){var c=new Blockly.Menu;c.setRightToLeft(b);for(var d=0,e;e=a[d];d++){var f=new Blockly.MenuItem(e.text);f.setRightToLeft(b);c.addChild(f,!0);f.setEnabled(e.enabled);if(e.enabled)f.onAction(function(){Blockly.ContextMenu.hide();this.callback()},e)}return c}; -Blockly.ContextMenu.position_=function(a,b,c){var d=Blockly.utils.getViewportBBox();b={top:b.clientY+d.top,bottom:b.clientY+d.top,left:b.clientX+d.left,right:b.clientX+d.left};Blockly.ContextMenu.createWidget_(a);var e=Blockly.utils.uiMenu.getSize(a);c&&Blockly.utils.uiMenu.adjustBBoxesForRTL(d,b,e);Blockly.WidgetDiv.positionWithAnchor(d,b,e,c);a.getElement().focus()}; -Blockly.ContextMenu.createWidget_=function(a){a.render(Blockly.WidgetDiv.DIV);var b=a.getElement();Blockly.utils.dom.addClass(b,"blocklyContextMenu");Blockly.bindEventWithChecks_(b,"contextmenu",null,Blockly.utils.noEvent);a.focus()};Blockly.ContextMenu.hide=function(){Blockly.WidgetDiv.hideIfOwner(Blockly.ContextMenu);Blockly.ContextMenu.currentBlock=null;Blockly.ContextMenu.eventWrapper_&&Blockly.unbindEvent_(Blockly.ContextMenu.eventWrapper_)}; -Blockly.ContextMenu.callbackFactory=function(a,b){return function(){Blockly.Events.disable();try{var c=Blockly.Xml.domToBlock(b,a.workspace),d=a.getRelativeToSurfaceXY();d.x=a.RTL?d.x-Blockly.SNAP_RADIUS:d.x+Blockly.SNAP_RADIUS;d.y+=2*Blockly.SNAP_RADIUS;c.moveBy(d.x,d.y)}finally{Blockly.Events.enable()}Blockly.Events.isEnabled()&&!c.isShadow()&&Blockly.Events.fire(new Blockly.Events.BlockCreate(c));c.select()}}; -Blockly.ContextMenu.blockDeleteOption=function(a){var b=a.getDescendants(!1).length,c=a.getNextBlock();c&&(b-=c.getDescendants(!1).length);return{text:1==b?Blockly.Msg.DELETE_BLOCK:Blockly.Msg.DELETE_X_BLOCKS.replace("%1",String(b)),enabled:!0,callback:function(){Blockly.Events.setGroup(!0);a.dispose(!0,!0);Blockly.Events.setGroup(!1)}}};Blockly.ContextMenu.blockHelpOption=function(a){return{enabled:!("function"==typeof a.helpUrl?!a.helpUrl():!a.helpUrl),text:Blockly.Msg.HELP,callback:function(){a.showHelp_()}}}; -Blockly.ContextMenu.blockDuplicateOption=function(a){var b=a.isDuplicatable();return{text:Blockly.Msg.DUPLICATE_BLOCK,enabled:b,callback:function(){Blockly.duplicate_(a)}}};Blockly.ContextMenu.blockCommentOption=function(a){var b={enabled:!Blockly.utils.userAgent.IE};a.comment?(b.text=Blockly.Msg.REMOVE_COMMENT,b.callback=function(){a.setCommentText(null)}):(b.text=Blockly.Msg.ADD_COMMENT,b.callback=function(){a.setCommentText("")});return b}; -Blockly.ContextMenu.commentDeleteOption=function(a){return{text:Blockly.Msg.REMOVE_COMMENT,enabled:!0,callback:function(){Blockly.Events.setGroup(!0);a.dispose(!0,!0);Blockly.Events.setGroup(!1)}}};Blockly.ContextMenu.commentDuplicateOption=function(a){return{text:Blockly.Msg.DUPLICATE_COMMENT,enabled:!0,callback:function(){Blockly.duplicate_(a)}}}; -Blockly.ContextMenu.workspaceCommentOption=function(a,b){if(!Blockly.WorkspaceCommentSvg)throw Error("Missing require for Blockly.WorkspaceCommentSvg");var c={enabled:!Blockly.utils.userAgent.IE};c.text=Blockly.Msg.ADD_COMMENT;c.callback=function(){var c=new Blockly.WorkspaceCommentSvg(a,Blockly.Msg.WORKSPACE_COMMENT_DEFAULT_TEXT,Blockly.WorkspaceCommentSvg.DEFAULT_SIZE,Blockly.WorkspaceCommentSvg.DEFAULT_SIZE),e=a.getInjectionDiv().getBoundingClientRect();e=new Blockly.utils.Coordinate(b.clientX- -e.left,b.clientY-e.top);var f=a.getOriginOffsetInPixels();e=Blockly.utils.Coordinate.difference(e,f);e.scale(1/a.scale);c.moveBy(e.x,e.y);a.rendered&&(c.initSvg(),c.render(),c.select())};return c};Blockly.RenderedConnection=function(a,b){Blockly.RenderedConnection.superClass_.constructor.call(this,a,b);this.db_=a.workspace.connectionDBList[b];this.dbOpposite_=a.workspace.connectionDBList[Blockly.OPPOSITE_TYPE[b]];this.offsetInBlock_=new Blockly.utils.Coordinate(0,0);this.inDB_=!1;this.hidden_=!this.db_};Blockly.utils.object.inherits(Blockly.RenderedConnection,Blockly.Connection); -Blockly.RenderedConnection.prototype.dispose=function(){Blockly.RenderedConnection.superClass_.dispose.call(this);this.inDB_&&this.db_.removeConnection_(this)};Blockly.RenderedConnection.prototype.distanceFrom=function(a){var b=this.x_-a.x_;a=this.y_-a.y_;return Math.sqrt(b*b+a*a)}; -Blockly.RenderedConnection.prototype.bumpAwayFrom_=function(a){if(!this.sourceBlock_.workspace.isDragging()){var b=this.sourceBlock_.getRootBlock();if(!b.isInFlyout){var c=!1;if(!b.isMovable()){b=a.getSourceBlock().getRootBlock();if(!b.isMovable())return;a=this;c=!0}var d=Blockly.selected==b;d||b.addSelect();var e=a.x_+Blockly.SNAP_RADIUS+Math.floor(Math.random()*Blockly.BUMP_RANDOMNESS)-this.x_,f=a.y_+Blockly.SNAP_RADIUS+Math.floor(Math.random()*Blockly.BUMP_RANDOMNESS)-this.y_;c&&(f=-f);b.RTL&& -(e=a.x_-Blockly.SNAP_RADIUS-Math.floor(Math.random()*Blockly.BUMP_RANDOMNESS)-this.x_);b.moveBy(e,f);d||b.removeSelect()}}};Blockly.RenderedConnection.prototype.moveTo=function(a,b){this.inDB_&&this.db_.removeConnection_(this);this.x_=a;this.y_=b;this.hidden_||this.db_.addConnection(this)};Blockly.RenderedConnection.prototype.moveBy=function(a,b){this.moveTo(this.x_+a,this.y_+b)};Blockly.RenderedConnection.prototype.moveToOffset=function(a){this.moveTo(a.x+this.offsetInBlock_.x,a.y+this.offsetInBlock_.y)}; -Blockly.RenderedConnection.prototype.setOffsetInBlock=function(a,b){this.offsetInBlock_.x=a;this.offsetInBlock_.y=b};Blockly.RenderedConnection.prototype.getOffsetInBlock=function(){return this.offsetInBlock_}; -Blockly.RenderedConnection.prototype.tighten_=function(){var a=this.targetConnection.x_-this.x_,b=this.targetConnection.y_-this.y_;if(0!=a||0!=b){var c=this.targetBlock(),d=c.getSvgRoot();if(!d)throw Error("block is not rendered.");d=Blockly.utils.getRelativeXY(d);c.getSvgRoot().setAttribute("transform","translate("+(d.x-a)+","+(d.y-b)+")");c.moveConnections_(-a,-b)}};Blockly.RenderedConnection.prototype.closest=function(a,b){return this.dbOpposite_.searchForClosest(this,a,b)}; -Blockly.RenderedConnection.prototype.highlight=function(){var a=this.sourceBlock_.workspace.getRenderer().getConstants();a=this.type==Blockly.INPUT_VALUE||this.type==Blockly.OUTPUT_VALUE?Blockly.utils.svgPaths.moveBy(0,-5)+Blockly.utils.svgPaths.lineOnAxis("v",5)+a.PUZZLE_TAB.pathDown+Blockly.utils.svgPaths.lineOnAxis("v",5):Blockly.utils.svgPaths.moveBy(-5,0)+Blockly.utils.svgPaths.lineOnAxis("h",5)+a.NOTCH.pathLeft+Blockly.utils.svgPaths.lineOnAxis("h",5);var b=this.sourceBlock_.getRelativeToSurfaceXY(); -Blockly.Connection.highlightedPath_=Blockly.utils.dom.createSvgElement("path",{"class":"blocklyHighlightedConnectionPath",d:a,transform:"translate("+(this.x_-b.x)+","+(this.y_-b.y)+")"+(this.sourceBlock_.RTL?" scale(-1 1)":"")},this.sourceBlock_.getSvgRoot())}; -Blockly.RenderedConnection.prototype.unhideAll=function(){this.setHidden(!1);var a=[];if(this.type!=Blockly.INPUT_VALUE&&this.type!=Blockly.NEXT_STATEMENT)return a;var b=this.targetBlock();if(b){if(b.isCollapsed()){var c=[];b.outputConnection&&c.push(b.outputConnection);b.nextConnection&&c.push(b.nextConnection);b.previousConnection&&c.push(b.previousConnection)}else c=b.getConnections_(!0);for(var d=0;db?!1:Blockly.RenderedConnection.superClass_.isConnectionAllowed.call(this,a)}; -Blockly.RenderedConnection.prototype.onFailedConnect=function(a){this.bumpAwayFrom_(a)};Blockly.RenderedConnection.prototype.disconnectInternal_=function(a,b){Blockly.RenderedConnection.superClass_.disconnectInternal_.call(this,a,b);a.rendered&&a.render();b.rendered&&(b.updateDisabled(),b.render())}; -Blockly.RenderedConnection.prototype.respawnShadow_=function(){var a=this.getSourceBlock(),b=this.getShadowDom();if(a.workspace&&b&&Blockly.Events.recordUndo){Blockly.RenderedConnection.superClass_.respawnShadow_.call(this);b=this.targetBlock();if(!b)throw Error("Couldn't respawn the shadow block that should exist here.");b.initSvg();b.render(!1);a.rendered&&a.render()}};Blockly.RenderedConnection.prototype.neighbours_=function(a){return this.dbOpposite_.getNeighbours(this,a)}; -Blockly.RenderedConnection.prototype.connect_=function(a){Blockly.RenderedConnection.superClass_.connect_.call(this,a);var b=this.getSourceBlock();a=a.getSourceBlock();b.rendered&&b.updateDisabled();a.rendered&&a.updateDisabled();b.rendered&&a.rendered&&(this.type==Blockly.NEXT_STATEMENT||this.type==Blockly.PREVIOUS_STATEMENT?a.render():b.render())}; -Blockly.RenderedConnection.prototype.onCheckChanged_=function(){this.isConnected()&&!this.checkType_(this.targetConnection)&&((this.isSuperior()?this.targetBlock():this.sourceBlock_).unplug(),this.sourceBlock_.bumpNeighbours())};Blockly.utils.Rect=function(a,b,c,d){this.top=a;this.bottom=b;this.left=c;this.right=d};Blockly.utils.Rect.prototype.contains=function(a,b){return a>=this.left&&a<=this.right&&b>=this.top&&b<=this.bottom};Blockly.Icon=function(a){this.block_=a};Blockly.Icon.prototype.collapseHidden=!0;Blockly.Icon.prototype.SIZE=17;Blockly.Icon.prototype.bubble_=null;Blockly.Icon.prototype.iconXY_=null; -Blockly.Icon.prototype.createIcon=function(){this.iconGroup_||(this.iconGroup_=Blockly.utils.dom.createSvgElement("g",{"class":"blocklyIconGroup"},null),this.block_.isInFlyout&&Blockly.utils.dom.addClass(this.iconGroup_,"blocklyIconGroupReadonly"),this.drawIcon_(this.iconGroup_),this.block_.getSvgRoot().appendChild(this.iconGroup_),Blockly.bindEventWithChecks_(this.iconGroup_,"mouseup",this,this.iconClick_),this.updateEditable())}; -Blockly.Icon.prototype.dispose=function(){Blockly.utils.dom.removeNode(this.iconGroup_);this.iconGroup_=null;this.setVisible(!1);this.block_=null};Blockly.Icon.prototype.updateEditable=function(){};Blockly.Icon.prototype.isVisible=function(){return!!this.bubble_};Blockly.Icon.prototype.iconClick_=function(a){this.block_.workspace.isDragging()||this.block_.isInFlyout||Blockly.utils.isRightButton(a)||this.setVisible(!this.isVisible())}; -Blockly.Icon.prototype.updateColour=function(){this.isVisible()&&this.bubble_.setColour(this.block_.getColour())};Blockly.Icon.prototype.setIconLocation=function(a){this.iconXY_=a;this.isVisible()&&this.bubble_.setAnchorLocation(a)}; -Blockly.Icon.prototype.computeIconLocation=function(){var a=this.block_.getRelativeToSurfaceXY(),b=Blockly.utils.getRelativeXY(this.iconGroup_);a=new Blockly.utils.Coordinate(a.x+b.x+this.SIZE/2,a.y+b.y+this.SIZE/2);Blockly.utils.Coordinate.equals(this.getIconLocation(),a)||this.setIconLocation(a)};Blockly.Icon.prototype.getIconLocation=function(){return this.iconXY_}; -Blockly.Icon.prototype.getCorrectedSize=function(){return new Blockly.utils.Size(Blockly.Icon.prototype.SIZE,Blockly.Icon.prototype.SIZE-2)};Blockly.Warning=function(a){Blockly.Warning.superClass_.constructor.call(this,a);this.createIcon();this.text_={}};Blockly.utils.object.inherits(Blockly.Warning,Blockly.Icon);Blockly.Warning.prototype.collapseHidden=!1; -Blockly.Warning.prototype.drawIcon_=function(a){Blockly.utils.dom.createSvgElement("path",{"class":"blocklyIconShape",d:"M2,15Q-1,15 0.5,12L6.5,1.7Q8,-1 9.5,1.7L15.5,12Q17,15 14,15z"},a);Blockly.utils.dom.createSvgElement("path",{"class":"blocklyIconSymbol",d:"m7,4.8v3.16l0.27,2.27h1.46l0.27,-2.27v-3.16z"},a);Blockly.utils.dom.createSvgElement("rect",{"class":"blocklyIconSymbol",x:"7",y:"11",height:"2",width:"2"},a)}; -Blockly.Warning.textToDom_=function(a){var b=Blockly.utils.dom.createSvgElement("text",{"class":"blocklyText blocklyBubbleText",y:Blockly.Bubble.BORDER_WIDTH},null);a=a.split("\n");for(var c=0;c>>/g,d);d=document.createElement("style");c=document.createTextNode(c);d.appendChild(c);document.head.insertBefore(d,document.head.firstChild)}}};Blockly.Css.setCursor=function(a){console.warn("Deprecated call to Blockly.Css.setCursor. See https://github.com/google/blockly/issues/981 for context")}; -Blockly.Css.CONTENT=[".blocklySvg {","background-color: #fff;","outline: none;","overflow: hidden;","position: absolute;","display: block;","}",".blocklyWidgetDiv {","display: none;","position: absolute;","z-index: 99999;","}",".injectionDiv {","height: 100%;","position: relative;","overflow: hidden;","touch-action: none;","}",".blocklyNonSelectable {","user-select: none;","-ms-user-select: none;","-webkit-user-select: none;","}",".blocklyWsDragSurface {","display: none;","position: absolute;","top: 0;", -"left: 0;","}",".blocklyWsDragSurface.blocklyOverflowVisible {","overflow: visible;","}",".blocklyBlockDragSurface {","display: none;","position: absolute;","top: 0;","left: 0;","right: 0;","bottom: 0;","overflow: visible !important;","z-index: 50;","}",".blocklyBlockCanvas.blocklyCanvasTransitioning,",".blocklyBubbleCanvas.blocklyCanvasTransitioning {","transition: transform .5s;","}",".blocklyTooltipDiv {","background-color: #ffffc7;","border: 1px solid #ddc;","box-shadow: 4px 4px 20px 1px rgba(0,0,0,.15);", -"color: #000;","display: none;","font-family: sans-serif;","font-size: 9pt;","opacity: .9;","padding: 2px;","position: absolute;","z-index: 100000;","}",".blocklyDropDownDiv {","position: fixed;","left: 0;","top: 0;","z-index: 1000;","display: none;","border: 1px solid;","border-radius: 2px;","padding: 4px;","box-shadow: 0px 0px 3px 1px rgba(0,0,0,.3);","}",".blocklyDropDownDiv.focused {","box-shadow: 0px 0px 6px 1px rgba(0,0,0,.3);","}",".blocklyDropDownContent {","max-height: 300px;","overflow: auto;", -"overflow-x: hidden;","}",".blocklyDropDownArrow {","position: absolute;","left: 0;","top: 0;","width: 16px;","height: 16px;","z-index: -1;","background-color: inherit;","border-color: inherit;","}",".blocklyDropDownButton {","display: inline-block;","float: left;","padding: 0;","margin: 4px;","border-radius: 4px;","outline: none;","border: 1px solid;","transition: box-shadow .1s;","cursor: pointer;","}",".arrowTop {","border-top: 1px solid;","border-left: 1px solid;","border-top-left-radius: 4px;", -"border-color: inherit;","}",".arrowBottom {","border-bottom: 1px solid;","border-right: 1px solid;","border-bottom-right-radius: 4px;","border-color: inherit;","}",".blocklyResizeSE {","cursor: se-resize;","fill: #aaa;","}",".blocklyResizeSW {","cursor: sw-resize;","fill: #aaa;","}",".blocklyResizeLine {","stroke: #515A5A;","stroke-width: 1;","}",".blocklyHighlightedConnectionPath {","fill: none;","stroke: #fc3;","stroke-width: 4px;","}",".blocklyPathLight {","fill: none;","stroke-linecap: round;", -"stroke-width: 1;","}",".blocklySelected>.blocklyPath {","stroke: #fc3;","stroke-width: 3px;","}",".blocklySelected>.blocklyPathLight {","display: none;","}",".blocklyDraggable {",'cursor: url("<<>>/handopen.cur"), auto;',"cursor: grab;","cursor: -webkit-grab;","}",".blocklyDragging {",'cursor: url("<<>>/handclosed.cur"), auto;',"cursor: grabbing;","cursor: -webkit-grabbing;","}",".blocklyDraggable:active {",'cursor: url("<<>>/handclosed.cur"), auto;',"cursor: grabbing;","cursor: -webkit-grabbing;", -"}",".blocklyBlockDragSurface .blocklyDraggable {",'cursor: url("<<>>/handclosed.cur"), auto;',"cursor: grabbing;","cursor: -webkit-grabbing;","}",".blocklyDragging.blocklyDraggingDelete {",'cursor: url("<<>>/handdelete.cur"), auto;',"}",".blocklyDragging>.blocklyPath,",".blocklyDragging>.blocklyPathLight {","fill-opacity: .8;","stroke-opacity: .8;","}",".blocklyDragging>.blocklyPathDark {","display: none;","}",".blocklyDisabled>.blocklyPath {","fill-opacity: .5;","stroke-opacity: .5;", -"}",".blocklyDisabled>.blocklyPathLight,",".blocklyDisabled>.blocklyPathDark {","display: none;","}",".blocklyInsertionMarker>.blocklyPath,",".blocklyInsertionMarker>.blocklyPathLight,",".blocklyInsertionMarker>.blocklyPathDark {","fill-opacity: .2;","stroke: none","}",".blocklyReplaceable .blocklyPath {","fill-opacity: .5;","}",".blocklyReplaceable .blocklyPathLight,",".blocklyReplaceable .blocklyPathDark {","display: none;","}",".blocklyText {","cursor: default;","fill: #fff;","font-family: sans-serif;", -"font-size: 11pt;","}",".blocklyMultilineText {","font-family: monospace;","}",".blocklyNonEditableText>text {","pointer-events: none;","}",".blocklyNonEditableText>rect,",".blocklyEditableText>rect {","fill: #fff;","fill-opacity: .6;","}",".blocklyNonEditableText>text,",".blocklyEditableText>text {","fill: #000;","}",".blocklyEditableText:hover>rect {","stroke: #fff;","stroke-width: 2;","}",".blocklyBubbleText {","fill: #000;","}",".blocklyFlyout {","position: absolute;","z-index: 20;","}",".blocklySvg text, .blocklyBlockDragSurface text {", -"user-select: none;","-ms-user-select: none;","-webkit-user-select: none;","cursor: inherit;","}",".blocklyHidden {","display: none;","}",".blocklyFieldDropdown:not(.blocklyHidden) {","display: block;","}",".blocklyIconGroup {","cursor: default;","}",".blocklyIconGroup:not(:hover),",".blocklyIconGroupReadonly {","opacity: .6;","}",".blocklyIconShape {","fill: #00f;","stroke: #fff;","stroke-width: 1px;","}",".blocklyIconSymbol {","fill: #fff;","}",".blocklyMinimalBody {","margin: 0;","padding: 0;", -"}",".blocklyCommentForeignObject {","position: relative;","z-index: 0;","}",".blocklyCommentRect {","fill: #E7DE8E;","stroke: #bcA903;","stroke-width: 1px","}",".blocklyCommentTarget {","fill: transparent;","stroke: #bcA903;","}",".blocklyCommentTargetFocused {","fill: none;","}",".blocklyCommentHandleTarget {","fill: none;","}",".blocklyCommentHandleTargetFocused {","fill: transparent;","}",".blocklyFocused>.blocklyCommentRect {","fill: #B9B272;","stroke: #B9B272;","}",".blocklySelected>.blocklyCommentTarget {", -"stroke: #fc3;","stroke-width: 3px;","}",".blocklyCommentTextarea {","background-color: #fef49c;","border: 0;","outline: 0;","margin: 0;","padding: 3px;","resize: none;","display: block;","overflow: hidden;","}",".blocklyCommentDeleteIcon {","cursor: pointer;","fill: #000;","display: none","}",".blocklySelected > .blocklyCommentDeleteIcon {","display: block","}",".blocklyDeleteIconShape {","fill: #000;","stroke: #000;","stroke-width: 1px;","}",".blocklyDeleteIconShape.blocklyDeleteIconHighlighted {", -"stroke: #fc3;","}",".blocklyHtmlInput {","border: none;","border-radius: 4px;","font-family: sans-serif;","height: 100%;","margin: 0;","outline: none;","padding: 0;","width: 100%;","text-align: center;","}",".blocklyHtmlInput::-ms-clear {","display: none;","}",".blocklyMainBackground {","stroke-width: 1;","stroke: #c6c6c6;","}",".blocklyMutatorBackground {","fill: #fff;","stroke: #ddd;","stroke-width: 1;","}",".blocklyFlyoutBackground {","fill: #ddd;","fill-opacity: .8;","}",".blocklyMainWorkspaceScrollbar {", -"z-index: 20;","}",".blocklyFlyoutScrollbar {","z-index: 30;","}",".blocklyScrollbarHorizontal, .blocklyScrollbarVertical {","position: absolute;","outline: none;","}",".blocklyScrollbarBackground {","opacity: 0;","}",".blocklyScrollbarHandle {","fill: #ccc;","}",".blocklyScrollbarBackground:hover+.blocklyScrollbarHandle,",".blocklyScrollbarHandle:hover {","fill: #bbb;","}",".blocklyFlyout .blocklyScrollbarHandle {","fill: #bbb;","}",".blocklyFlyout .blocklyScrollbarBackground:hover+.blocklyScrollbarHandle,", -".blocklyFlyout .blocklyScrollbarHandle:hover {","fill: #aaa;","}",".blocklyInvalidInput {","background: #faa;","}",".blocklyContextMenu {","border-radius: 4px;","max-height: 100%;","}",".blocklyDropdownMenu {","border-radius: 2px;","padding: 0 !important;","}",".blocklyWidgetDiv .blocklyDropdownMenu .goog-menuitem,",".blocklyDropDownDiv .blocklyDropdownMenu .goog-menuitem {","padding-left: 28px;","}",".blocklyWidgetDiv .blocklyDropdownMenu .goog-menuitem.goog-menuitem-rtl,",".blocklyDropDownDiv .blocklyDropdownMenu .goog-menuitem.goog-menuitem-rtl {", -"padding-left: 5px;","padding-right: 28px;","}",".blocklyVerticalCursor {","stroke-width: 3px;","fill: rgba(255,255,255,.5);","}",".blocklyWidgetDiv .goog-option-selected .goog-menuitem-checkbox,",".blocklyWidgetDiv .goog-option-selected .goog-menuitem-icon,",".blocklyDropDownDiv .goog-option-selected .goog-menuitem-checkbox,",".blocklyDropDownDiv .goog-option-selected .goog-menuitem-icon {","background: url(<<>>/sprites.png) no-repeat -48px -16px;","}",".blocklyWidgetDiv .goog-menu {","background: #fff;", -"border-color: transparent;","border-style: solid;","border-width: 1px;","cursor: default;","font: normal 13px Arial, sans-serif;","margin: 0;","outline: none;","padding: 4px 0;","position: absolute;","overflow-y: auto;","overflow-x: hidden;","max-height: 100%;","z-index: 20000;","box-shadow: 0px 0px 3px 1px rgba(0,0,0,.3);","}",".blocklyWidgetDiv .goog-menu.focused {","box-shadow: 0px 0px 6px 1px rgba(0,0,0,.3);","}",".blocklyDropDownDiv .goog-menu {","cursor: default;",'font: normal 13px "Helvetica Neue", Helvetica, sans-serif;', -"outline: none;","z-index: 20000;","}",".blocklyWidgetDiv .goog-menuitem,",".blocklyDropDownDiv .goog-menuitem {","color: #000;","font: normal 13px Arial, sans-serif;","list-style: none;","margin: 0;","min-width: 7em;","border: none;","padding: 6px 15px;","white-space: nowrap;","cursor: pointer;","}",".blocklyWidgetDiv .goog-menu-nocheckbox .goog-menuitem,",".blocklyWidgetDiv .goog-menu-noicon .goog-menuitem,",".blocklyDropDownDiv .goog-menu-nocheckbox .goog-menuitem,",".blocklyDropDownDiv .goog-menu-noicon .goog-menuitem {", -"padding-left: 12px;","}",".blocklyWidgetDiv .goog-menuitem-content,",".blocklyDropDownDiv .goog-menuitem-content {","font: normal 13px Arial, sans-serif;","}",".blocklyWidgetDiv .goog-menuitem-content {","color: #000;","}",".blocklyDropDownDiv .goog-menuitem-content {","color: #000;","}",".blocklyWidgetDiv .goog-menuitem-disabled,",".blocklyDropDownDiv .goog-menuitem-disabled {","cursor: inherit;","}",".blocklyWidgetDiv .goog-menuitem-disabled .goog-menuitem-content,",".blocklyDropDownDiv .goog-menuitem-disabled .goog-menuitem-content {", -"color: #ccc !important;","}",".blocklyWidgetDiv .goog-menuitem-disabled .goog-menuitem-icon,",".blocklyDropDownDiv .goog-menuitem-disabled .goog-menuitem-icon {","opacity: .3;","filter: alpha(opacity=30);","}",".blocklyWidgetDiv .goog-menuitem-highlight ,",".blocklyDropDownDiv .goog-menuitem-highlight {","background-color: rgba(0,0,0,.1);","}",".blocklyWidgetDiv .goog-menuitem-checkbox,",".blocklyWidgetDiv .goog-menuitem-icon,",".blocklyDropDownDiv .goog-menuitem-checkbox,",".blocklyDropDownDiv .goog-menuitem-icon {", -"background-repeat: no-repeat;","height: 16px;","left: 6px;","position: absolute;","right: auto;","vertical-align: middle;","width: 16px;","}",".blocklyWidgetDiv .goog-menuitem-rtl .goog-menuitem-checkbox,",".blocklyWidgetDiv .goog-menuitem-rtl .goog-menuitem-icon,",".blocklyDropDownDiv .goog-menuitem-rtl .goog-menuitem-checkbox,",".blocklyDropDownDiv .goog-menuitem-rtl .goog-menuitem-icon {","left: auto;","right: 6px;","}",".blocklyWidgetDiv .goog-option-selected .goog-menuitem-checkbox,",".blocklyWidgetDiv .goog-option-selected .goog-menuitem-icon,", -".blocklyDropDownDiv .goog-option-selected .goog-menuitem-checkbox,",".blocklyDropDownDiv .goog-option-selected .goog-menuitem-icon {","position: static;","float: left;","margin-left: -24px;","}",".blocklyWidgetDiv .goog-menuitem-rtl .goog-menuitem-checkbox,",".blocklyWidgetDiv .goog-menuitem-rtl .goog-menuitem-icon,",".blocklyDropDownDiv .goog-menuitem-rtl .goog-menuitem-checkbox,",".blocklyDropDownDiv .goog-menuitem-rtl .goog-menuitem-icon {","float: right;","margin-right: -24px;","}"]; -Blockly.DropDownDiv=function(){};Blockly.DropDownDiv.DIV_=null;Blockly.DropDownDiv.boundsElement_=null;Blockly.DropDownDiv.owner_=null;Blockly.DropDownDiv.positionToField_=null;Blockly.DropDownDiv.ARROW_SIZE=16;Blockly.DropDownDiv.BORDER_SIZE=1;Blockly.DropDownDiv.ARROW_HORIZONTAL_PADDING=12;Blockly.DropDownDiv.PADDING_Y=16;Blockly.DropDownDiv.ANIMATION_TIME=.25;Blockly.DropDownDiv.DEFAULT_DROPDOWN_BORDER_COLOR="#dadce0";Blockly.DropDownDiv.DEFAULT_DROPDOWN_COLOR="#fff"; -Blockly.DropDownDiv.animateOutTimer_=null;Blockly.DropDownDiv.onHide_=null; -Blockly.DropDownDiv.createDom=function(){if(!Blockly.DropDownDiv.DIV_){var a=document.createElement("div");a.className="blocklyDropDownDiv";a.style.backgroundColor=Blockly.DropDownDiv.DEFAULT_DROPDOWN_COLOR;a.style.borderColor=Blockly.DropDownDiv.DEFAULT_DROPDOWN_BORDER_COLOR;document.body.appendChild(a);Blockly.DropDownDiv.DIV_=a;var b=document.createElement("div");b.className="blocklyDropDownContent";a.appendChild(b);Blockly.DropDownDiv.content_=b;b=document.createElement("div");b.className="blocklyDropDownArrow"; -a.appendChild(b);Blockly.DropDownDiv.arrow_=b;Blockly.DropDownDiv.DIV_.style.opacity=0;Blockly.DropDownDiv.DIV_.style.transition="transform "+Blockly.DropDownDiv.ANIMATION_TIME+"s, opacity "+Blockly.DropDownDiv.ANIMATION_TIME+"s";a.addEventListener("focusin",function(){Blockly.utils.dom.addClass(a,"focused")});a.addEventListener("focusout",function(){Blockly.utils.dom.removeClass(a,"focused")})}};Blockly.DropDownDiv.setBoundsElement=function(a){Blockly.DropDownDiv.boundsElement_=a}; -Blockly.DropDownDiv.getContentDiv=function(){return Blockly.DropDownDiv.content_};Blockly.DropDownDiv.clearContent=function(){Blockly.DropDownDiv.content_.innerHTML="";Blockly.DropDownDiv.content_.style.width=""};Blockly.DropDownDiv.setColour=function(a,b){Blockly.DropDownDiv.DIV_.style.backgroundColor=a;Blockly.DropDownDiv.DIV_.style.borderColor=b};Blockly.DropDownDiv.setCategory=function(a){Blockly.DropDownDiv.DIV_.setAttribute("data-category",a)}; -Blockly.DropDownDiv.showPositionedByBlock=function(a,b,c,d){var e=b.workspace.scale,f=b.width,g=b.height;f*=e;g*=e;e=b.getSvgRoot().getBoundingClientRect();f=e.left+f/2;g=e.top+g;e=e.top;d&&(e+=d);Blockly.DropDownDiv.setBoundsElement(b.workspace.getParentSvg().parentNode);return Blockly.DropDownDiv.show(a,b.RTL,f,g,f,e,c)}; -Blockly.DropDownDiv.showPositionedByField=function(a,b,c){var d=a.getSvgRoot().getBoundingClientRect(),e=d.left+d.width/2,f=d.bottom;d=d.top;c&&(d+=c);c=a.getSourceBlock();Blockly.DropDownDiv.positionToField_=!0;Blockly.DropDownDiv.setBoundsElement(c.workspace.getParentSvg().parentNode);return Blockly.DropDownDiv.show(a,c.RTL,e,f,e,d,b)}; -Blockly.DropDownDiv.show=function(a,b,c,d,e,f,g){Blockly.DropDownDiv.owner_=a;Blockly.DropDownDiv.onHide_=g||null;a=Blockly.DropDownDiv.getPositionMetrics(c,d,e,f);a.arrowVisible?(Blockly.DropDownDiv.arrow_.style.display="",Blockly.DropDownDiv.arrow_.style.transform="translate("+a.arrowX+"px,"+a.arrowY+"px) rotate(45deg)",Blockly.DropDownDiv.arrow_.setAttribute("class",a.arrowAtTop?"blocklyDropDownArrow arrowTop":"blocklyDropDownArrow arrowBottom")):Blockly.DropDownDiv.arrow_.style.display="none"; -Blockly.DropDownDiv.DIV_.style.direction=b?"rtl":"ltr";Blockly.DropDownDiv.positionInternal_(a.initialX,a.initialY,a.finalX,a.finalY);return a.arrowAtTop};Blockly.DropDownDiv.getBoundsInfo_=function(){var a=Blockly.DropDownDiv.boundsElement_.getBoundingClientRect(),b=Blockly.utils.style.getSize(Blockly.DropDownDiv.boundsElement_);return{left:a.left,right:a.left+b.width,top:a.top,bottom:a.top+b.height,width:b.width,height:b.height}}; -Blockly.DropDownDiv.getPositionMetrics=function(a,b,c,d){var e=Blockly.DropDownDiv.getBoundsInfo_(),f=Blockly.utils.style.getSize(Blockly.DropDownDiv.DIV_);return b+f.heighte.top?Blockly.DropDownDiv.getPositionAboveMetrics(c,d,e,f):b+f.heightdocument.documentElement.clientTop?Blockly.DropDownDiv.getPositionAboveMetrics(c,d, -e,f):Blockly.DropDownDiv.getPositionTopOfPageMetrics(a,e,f)};Blockly.DropDownDiv.getPositionBelowMetrics=function(a,b,c,d){a=Blockly.DropDownDiv.getPositionX(a,c.left,c.right,d.width);return{initialX:a.divX,initialY:b,finalX:a.divX,finalY:b+Blockly.DropDownDiv.PADDING_Y,arrowX:a.arrowX,arrowY:-(Blockly.DropDownDiv.ARROW_SIZE/2+Blockly.DropDownDiv.BORDER_SIZE),arrowAtTop:!0,arrowVisible:!0}}; -Blockly.DropDownDiv.getPositionAboveMetrics=function(a,b,c,d){a=Blockly.DropDownDiv.getPositionX(a,c.left,c.right,d.width);return{initialX:a.divX,initialY:b-d.height,finalX:a.divX,finalY:b-d.height-Blockly.DropDownDiv.PADDING_Y,arrowX:a.arrowX,arrowY:d.height-2*Blockly.DropDownDiv.BORDER_SIZE-Blockly.DropDownDiv.ARROW_SIZE/2,arrowAtTop:!1,arrowVisible:!0}}; -Blockly.DropDownDiv.getPositionTopOfPageMetrics=function(a,b,c){a=Blockly.DropDownDiv.getPositionX(a,b.left,b.right,c.width);return{initialX:a.divX,initialY:0,finalX:a.divX,finalY:0,arrowVisible:!1}};Blockly.DropDownDiv.getPositionX=function(a,b,c,d){var e=a;a=Blockly.utils.math.clamp(b,a-d/2,c-d);e-=Blockly.DropDownDiv.ARROW_SIZE/2;b=Blockly.DropDownDiv.ARROW_HORIZONTAL_PADDING;d=Blockly.utils.math.clamp(b,e-a,d-b-Blockly.DropDownDiv.ARROW_SIZE);return{arrowX:d,divX:a}}; -Blockly.DropDownDiv.isVisible=function(){return!!Blockly.DropDownDiv.owner_};Blockly.DropDownDiv.hideIfOwner=function(a,b){return Blockly.DropDownDiv.owner_===a?(b?Blockly.DropDownDiv.hideWithoutAnimation():Blockly.DropDownDiv.hide(),!0):!1}; -Blockly.DropDownDiv.hide=function(){var a=Blockly.DropDownDiv.DIV_;a.style.transform="translate(0, 0)";a.style.opacity=0;Blockly.DropDownDiv.animateOutTimer_=setTimeout(function(){Blockly.DropDownDiv.hideWithoutAnimation()},1E3*Blockly.DropDownDiv.ANIMATION_TIME);Blockly.DropDownDiv.onHide_&&(Blockly.DropDownDiv.onHide_(),Blockly.DropDownDiv.onHide_=null)}; -Blockly.DropDownDiv.hideWithoutAnimation=function(){if(Blockly.DropDownDiv.isVisible()){Blockly.DropDownDiv.animateOutTimer_&&clearTimeout(Blockly.DropDownDiv.animateOutTimer_);var a=Blockly.DropDownDiv.DIV_;a.style.transform="";a.style.left="";a.style.top="";a.style.opacity=0;a.style.display="none";a.style.backgroundColor=Blockly.DropDownDiv.DEFAULT_DROPDOWN_COLOR;a.style.borderColor=Blockly.DropDownDiv.DEFAULT_DROPDOWN_BORDER_COLOR;Blockly.DropDownDiv.onHide_&&(Blockly.DropDownDiv.onHide_(),Blockly.DropDownDiv.onHide_= -null);Blockly.DropDownDiv.clearContent();Blockly.DropDownDiv.owner_=null}};Blockly.DropDownDiv.positionInternal_=function(a,b,c,d){a=Math.floor(a);b=Math.floor(b);c=Math.floor(c);d=Math.floor(d);var e=Blockly.DropDownDiv.DIV_;e.style.left=a+"px";e.style.top=b+"px";e.style.display="block";e.style.opacity=1;e.style.transform="translate("+(c-a)+"px,"+(d-b)+"px)"}; -Blockly.DropDownDiv.repositionForWindowResize=function(){if(Blockly.DropDownDiv.owner_){var a=Blockly.DropDownDiv.owner_.getSourceBlock(),b=a.workspace.scale,c=Blockly.DropDownDiv.positionToField_?Blockly.DropDownDiv.owner_.size_.width:a.width,d=Blockly.DropDownDiv.positionToField_?Blockly.DropDownDiv.owner_.size_.height:a.height;c*=b;d*=b;a=Blockly.DropDownDiv.positionToField_?Blockly.DropDownDiv.owner_.fieldGroup_.getBoundingClientRect():a.getSvgRoot().getBoundingClientRect();c=a.left+c/2;d=Blockly.DropDownDiv.getPositionMetrics(c, -a.top+d,c,a.top);Blockly.DropDownDiv.positionInternal_(d.initialX,d.initialY,d.finalX,d.finalY)}else Blockly.DropDownDiv.hide()};Blockly.Grid=function(a,b){this.gridPattern_=a;this.spacing_=b.spacing;this.length_=b.length;this.line2_=(this.line1_=a.firstChild)&&this.line1_.nextSibling;this.snapToGrid_=b.snap};Blockly.Grid.prototype.scale_=1;Blockly.Grid.prototype.dispose=function(){this.gridPattern_=null};Blockly.Grid.prototype.shouldSnap=function(){return this.snapToGrid_};Blockly.Grid.prototype.getSpacing=function(){return this.spacing_};Blockly.Grid.prototype.getPatternId=function(){return this.gridPattern_.id}; -Blockly.Grid.prototype.update=function(a){this.scale_=a;var b=this.spacing_*a||100;this.gridPattern_.setAttribute("width",b);this.gridPattern_.setAttribute("height",b);b=Math.floor(this.spacing_/2)+.5;var c=b-this.length_/2,d=b+this.length_/2;b*=a;c*=a;d*=a;this.setLineAttributes_(this.line1_,a,c,d,b,b);this.setLineAttributes_(this.line2_,a,b,b,c,d)}; -Blockly.Grid.prototype.setLineAttributes_=function(a,b,c,d,e,f){a&&(a.setAttribute("stroke-width",b),a.setAttribute("x1",c),a.setAttribute("y1",e),a.setAttribute("x2",d),a.setAttribute("y2",f))};Blockly.Grid.prototype.moveTo=function(a,b){this.gridPattern_.setAttribute("x",a);this.gridPattern_.setAttribute("y",b);(Blockly.utils.userAgent.IE||Blockly.utils.userAgent.EDGE)&&this.update(this.scale_)}; -Blockly.Grid.createDom=function(a,b,c){a=Blockly.utils.dom.createSvgElement("pattern",{id:"blocklyGridPattern"+a,patternUnits:"userSpaceOnUse"},c);0 document.");}else a=null;return a};Blockly.WorkspaceDragSurfaceSvg=function(a){this.container_=a;this.createDom()};Blockly.WorkspaceDragSurfaceSvg.prototype.SVG_=null;Blockly.WorkspaceDragSurfaceSvg.prototype.dragGroup_=null;Blockly.WorkspaceDragSurfaceSvg.prototype.container_=null; -Blockly.WorkspaceDragSurfaceSvg.prototype.createDom=function(){this.SVG_||(this.SVG_=Blockly.utils.dom.createSvgElement("svg",{xmlns:Blockly.utils.dom.SVG_NS,"xmlns:html":Blockly.utils.dom.HTML_NS,"xmlns:xlink":Blockly.utils.dom.XLINK_NS,version:"1.1","class":"blocklyWsDragSurface blocklyOverflowVisible"},null),this.container_.appendChild(this.SVG_))}; -Blockly.WorkspaceDragSurfaceSvg.prototype.translateSurface=function(a,b){var c=a.toFixed(0),d=b.toFixed(0);this.SVG_.style.display="block";Blockly.utils.dom.setCssTransform(this.SVG_,"translate3d("+c+"px, "+d+"px, 0px)")};Blockly.WorkspaceDragSurfaceSvg.prototype.getSurfaceTranslation=function(){return Blockly.utils.getRelativeXY(this.SVG_)}; -Blockly.WorkspaceDragSurfaceSvg.prototype.clearAndHide=function(a){if(!a)throw Error("Couldn't clear and hide the drag surface: missing new surface.");var b=this.SVG_.childNodes[0],c=this.SVG_.childNodes[1];if(!(b&&c&&Blockly.utils.dom.hasClass(b,"blocklyBlockCanvas")&&Blockly.utils.dom.hasClass(c,"blocklyBubbleCanvas")))throw Error("Couldn't clear and hide the drag surface. A node was missing.");null!=this.previousSibling_?Blockly.utils.dom.insertAfter(b,this.previousSibling_):a.insertBefore(b,a.firstChild); -Blockly.utils.dom.insertAfter(c,b);this.SVG_.style.display="none";if(this.SVG_.childNodes.length)throw Error("Drag surface was not cleared.");Blockly.utils.dom.setCssTransform(this.SVG_,"");this.previousSibling_=null}; -Blockly.WorkspaceDragSurfaceSvg.prototype.setContentsAndShow=function(a,b,c,d,e,f){if(this.SVG_.childNodes.length)throw Error("Already dragging a block.");this.previousSibling_=c;a.setAttribute("transform","translate(0, 0) scale("+f+")");b.setAttribute("transform","translate(0, 0) scale("+f+")");this.SVG_.setAttribute("width",d);this.SVG_.setAttribute("height",e);this.SVG_.appendChild(a);this.SVG_.appendChild(b);this.SVG_.style.display="block"};Blockly.blockRendering.rendererMap_={};Blockly.blockRendering.useDebugger=!1;Blockly.blockRendering.register=function(a,b){if(Blockly.blockRendering.rendererMap_[a])throw Error("Renderer has already been registered.");Blockly.blockRendering.rendererMap_[a]=b};Blockly.blockRendering.unregister=function(a){Blockly.blockRendering.rendererMap_[a]?delete Blockly.blockRendering.rendererMap_[a]:console.warn('No renderer mapping for name "'+a+'" found to unregister')}; -Blockly.blockRendering.startDebugger=function(){Blockly.blockRendering.useDebugger=!0};Blockly.blockRendering.stopDebugger=function(){Blockly.blockRendering.useDebugger=!1};Blockly.blockRendering.init=function(a){if(!Blockly.blockRendering.rendererMap_[a])throw Error("Renderer not registered: ",a);var b=function(){b.superClass_.constructor.call(this)};Blockly.utils.object.inherits(b,Blockly.blockRendering.rendererMap_[a]);a=new b;a.init();return a};Blockly.ConnectionDB=function(){this.connections_=[]};Blockly.ConnectionDB.prototype.addConnection=function(a){if(a.inDB_)throw Error("Connection already in database.");if(!a.getSourceBlock().isInFlyout){var b=this.findPositionForConnection_(a);this.connections_.splice(b,0,a);a.inDB_=!0}}; -Blockly.ConnectionDB.prototype.findConnection=function(a){if(!this.connections_.length)return-1;var b=this.findPositionForConnection_(a);if(b>=this.connections_.length)return-1;for(var c=a.y_,d=b;0<=d&&this.connections_[d].y_==c;){if(this.connections_[d]==a)return d;d--}for(;ba.y_)c=d;else{b=d;break}}return b}; -Blockly.ConnectionDB.prototype.removeConnection_=function(a){if(!a.inDB_)throw Error("Connection not in database.");var b=this.findConnection(a);if(-1==b)throw Error("Unable to find connection in connectionDB.");a.inDB_=!1;this.connections_.splice(b,1)}; -Blockly.ConnectionDB.prototype.getNeighbours=function(a,b){function c(a){var c=e-d[a].x_,g=f-d[a].y_;Math.sqrt(c*c+g*g)<=b&&l.push(d[a]);return gthis.previousScale_){var c=b-this.previousScale_;c=0Object.keys(this.cachedPoints_).length&&(this.cachedPoints_={},this.previousScale_=0)}; -Blockly.TouchGesture.prototype.getTouchPoint=function(a){return this.startWorkspace_?new Blockly.utils.Coordinate(a.pageX?a.pageX:a.changedTouches[0].pageX,a.pageY?a.pageY:a.changedTouches[0].pageY):null};Blockly.WorkspaceAudio=function(a){this.parentWorkspace_=a;this.SOUNDS_=Object.create(null)};Blockly.WorkspaceAudio.prototype.lastSound_=null;Blockly.WorkspaceAudio.prototype.dispose=function(){this.SOUNDS_=this.parentWorkspace_=null}; -Blockly.WorkspaceAudio.prototype.load=function(a,b){if(a.length){try{var c=new Blockly.utils.global.Audio}catch(h){return}for(var d,e=0;e=this.remainingCapacity()||(this.currentGesture_&&this.currentGesture_.cancel(),"comment"==a.tagName.toLowerCase()?this.pasteWorkspaceComment_(a):this.pasteBlock_(a))}; -Blockly.WorkspaceSvg.prototype.pasteBlock_=function(a){Blockly.Events.disable();try{var b=Blockly.Xml.domToBlock(a,this),c=this.getMarker().getCurNode();if(Blockly.keyboardAccessibilityMode&&c){Blockly.navigation.insertBlock(b,c.getLocation());return}var d=parseInt(a.getAttribute("x"),10),e=parseInt(a.getAttribute("y"),10);if(!isNaN(d)&&!isNaN(e)){this.RTL&&(d=-d);do{a=!1;var f=this.getAllBlocks(!1);c=0;for(var g;g=f[c];c++){var h=g.getRelativeToSurfaceXY();if(1>=Math.abs(d-h.x)&&1>=Math.abs(e-h.y)){a= -!0;break}}if(!a){var k=b.getConnections_(!1);c=0;for(var l;l=k[c];c++)if(l.closest(Blockly.SNAP_RADIUS,new Blockly.utils.Coordinate(d,e)).connection){a=!0;break}}a&&(d=this.RTL?d-Blockly.SNAP_RADIUS:d+Blockly.SNAP_RADIUS,e+=2*Blockly.SNAP_RADIUS)}while(a);b.moveBy(d,e)}}finally{Blockly.Events.enable()}Blockly.Events.isEnabled()&&!b.isShadow()&&Blockly.Events.fire(new Blockly.Events.BlockCreate(b));b.select()}; -Blockly.WorkspaceSvg.prototype.pasteWorkspaceComment_=function(a){Blockly.Events.disable();try{var b=Blockly.WorkspaceCommentSvg.fromXml(a,this),c=parseInt(a.getAttribute("x"),10),d=parseInt(a.getAttribute("y"),10);isNaN(c)||isNaN(d)||(this.RTL&&(c=-c),b.moveBy(c+50,d+50))}finally{Blockly.Events.enable()}Blockly.Events.isEnabled();b.select()}; -Blockly.WorkspaceSvg.prototype.refreshToolboxSelection=function(){var a=this.isFlyout?this.targetWorkspace:this;a&&!a.currentGesture_&&a.toolbox_&&a.toolbox_.flyout_&&a.toolbox_.refreshSelection()};Blockly.WorkspaceSvg.prototype.renameVariableById=function(a,b){Blockly.WorkspaceSvg.superClass_.renameVariableById.call(this,a,b);this.refreshToolboxSelection()};Blockly.WorkspaceSvg.prototype.deleteVariableById=function(a){Blockly.WorkspaceSvg.superClass_.deleteVariableById.call(this,a);this.refreshToolboxSelection()}; -Blockly.WorkspaceSvg.prototype.createVariable=function(a,b,c){a=Blockly.WorkspaceSvg.superClass_.createVariable.call(this,a,b,c);this.refreshToolboxSelection();return a};Blockly.WorkspaceSvg.prototype.recordDeleteAreas=function(){this.deleteAreaTrash_=this.trashcan&&this.svgGroup_.parentNode?this.trashcan.getClientRect():null;this.deleteAreaToolbox_=this.flyout_?this.flyout_.getClientRect():this.toolbox_?this.toolbox_.getClientRect():null}; -Blockly.WorkspaceSvg.prototype.isDeleteArea=function(a){return this.deleteAreaTrash_&&this.deleteAreaTrash_.contains(a.clientX,a.clientY)?Blockly.DELETE_AREA_TRASH:this.deleteAreaToolbox_&&this.deleteAreaToolbox_.contains(a.clientX,a.clientY)?Blockly.DELETE_AREA_TOOLBOX:Blockly.DELETE_AREA_NONE};Blockly.WorkspaceSvg.prototype.onMouseDown_=function(a){var b=this.getGesture(a);b&&b.handleWsStart(a,this)}; -Blockly.WorkspaceSvg.prototype.startDrag=function(a,b){var c=Blockly.utils.mouseToSvg(a,this.getParentSvg(),this.getInverseScreenCTM());c.x/=this.scale;c.y/=this.scale;this.dragDeltaXY_=Blockly.utils.Coordinate.difference(b,c)};Blockly.WorkspaceSvg.prototype.moveDrag=function(a){a=Blockly.utils.mouseToSvg(a,this.getParentSvg(),this.getInverseScreenCTM());a.x/=this.scale;a.y/=this.scale;return Blockly.utils.Coordinate.sum(this.dragDeltaXY_,a)}; -Blockly.WorkspaceSvg.prototype.isDragging=function(){return null!=this.currentGesture_&&this.currentGesture_.isDragging()};Blockly.WorkspaceSvg.prototype.isDraggable=function(){return this.options.moveOptions&&this.options.moveOptions.drag}; -Blockly.WorkspaceSvg.prototype.isContentBounded=function(){return this.options.moveOptions&&this.options.moveOptions.scrollbars||this.options.moveOptions&&this.options.moveOptions.wheel||this.options.moveOptions&&this.options.moveOptions.drag||this.options.zoomOptions&&this.options.zoomOptions.controls||this.options.zoomOptions&&this.options.zoomOptions.wheel}; -Blockly.WorkspaceSvg.prototype.isMovable=function(){return this.options.moveOptions&&this.options.moveOptions.scrollbars||this.options.moveOptions&&this.options.moveOptions.wheel||this.options.moveOptions&&this.options.moveOptions.drag||this.options.zoomOptions&&this.options.zoomOptions.wheel}; -Blockly.WorkspaceSvg.prototype.onMouseWheel_=function(a){if(Blockly.Gesture.inProgress())a.preventDefault(),a.stopPropagation();else{var b=this.options.zoomOptions&&this.options.zoomOptions.wheel,c=this.options.moveOptions&&this.options.moveOptions.wheel;if(b||c){var d=Blockly.utils.getScrollDeltaPixels(a);!b||!a.ctrlKey&&c?(b=this.scrollX-d.x,c=this.scrollY-d.y,a.shiftKey&&!d.x&&(b=this.scrollX-d.y,c=this.scrollY),this.scroll(b,c)):(d=-d.y/50,b=Blockly.utils.mouseToSvg(a,this.getParentSvg(),this.getInverseScreenCTM()), -this.zoom(b.x,b.y,d));a.preventDefault()}}};Blockly.WorkspaceSvg.prototype.getBlocksBoundingBox=function(){var a=this.getTopBlocks(!1),b=this.getTopComments(!1);a=a.concat(b);if(!a.length)return new Blockly.utils.Rect(0,0,0,0);b=a[0].getBoundingRectangle();for(var c=1;cb.bottom&&(b.bottom=d.bottom);d.leftb.right&&(b.right=d.right)}return b}; -Blockly.WorkspaceSvg.prototype.cleanUp=function(){this.setResizesEnabled(!1);Blockly.Events.setGroup(!0);for(var a=this.getTopBlocks(!0),b=0,c=0,d;d=a[c];c++)if(d.isMovable()){var e=d.getRelativeToSurfaceXY();d.moveBy(-e.x,b-e.y);d.snapToGrid();b=d.getRelativeToSurfaceXY().y+d.getHeightWidth().height+Blockly.BlockSvg.MIN_BLOCK_Y}Blockly.Events.setGroup(!1);this.setResizesEnabled(!0)}; -Blockly.WorkspaceSvg.prototype.showContextMenu_=function(a){function b(a){if(a.isDeletable())p=p.concat(a.getDescendants(!1));else{a=a.getChildren(!1);for(var c=0;cp.length?c():Blockly.confirm(Blockly.Msg.DELETE_ALL_BLOCKS.replace("%1",p.length),function(a){a&& -c()})}};d.push(h);this.configureContextMenu&&this.configureContextMenu(d);Blockly.ContextMenu.show(a,d,this.RTL)}}; -Blockly.WorkspaceSvg.prototype.updateToolbox=function(a){if(a=Blockly.Options.parseToolboxTree(a)){if(!this.options.languageTree)throw Error("Existing toolbox is null. Can't create new toolbox.");if(a.getElementsByTagName("category").length){if(!this.toolbox_)throw Error("Existing toolbox has no categories. Can't change mode.");this.options.languageTree=a;this.toolbox_.renderTree(a)}else{if(!this.flyout_)throw Error("Existing toolbox has categories. Can't change mode.");this.options.languageTree= -a;this.flyout_.show(a.childNodes)}}else if(this.options.languageTree)throw Error("Can't nullify an existing toolbox.");};Blockly.WorkspaceSvg.prototype.markFocused=function(){this.options.parentWorkspace?this.options.parentWorkspace.markFocused():(Blockly.mainWorkspace=this,this.setBrowserFocus())};Blockly.WorkspaceSvg.prototype.setBrowserFocus=function(){document.activeElement&&document.activeElement.blur();try{this.getParentSvg().focus()}catch(a){try{this.getParentSvg().parentNode.setActive()}catch(b){this.getParentSvg().parentNode.focus()}}}; -Blockly.WorkspaceSvg.prototype.zoom=function(a,b,c){if(!this.isFlyout&&!this.isMutator){c=Math.pow(this.options.zoomOptions.scaleSpeed,c);var d=this.scale*c;if(this.scale!=d){d>this.options.zoomOptions.maxScale?c=this.options.zoomOptions.maxScale/this.scale:dthis.options.zoomOptions.maxScale?a=this.options.zoomOptions.maxScale:this.options.zoomOptions.minScale&&ab.viewBottom||b.contentLeftb.viewRight){c=null;a&&(c=Blockly.Events.getGroup(),Blockly.Events.setGroup(a.group));switch(a.type){case Blockly.Events.BLOCK_CREATE:case Blockly.Events.BLOCK_MOVE:var f=e.getBlockById(a.blockId);f=f.getRootBlock();break;case Blockly.Events.COMMENT_CREATE:case Blockly.Events.COMMENT_MOVE:f=e.getCommentById(a.commentId)}if(f){d= -f.getBoundingRectangle();d.height=d.bottom-d.top;d.width=d.right-d.left;var m=b.viewTop,n=b.viewBottom-d.height;n=Math.max(m,n);m=Blockly.utils.math.clamp(m,d.top,n)-d.top;n=b.viewLeft;var p=b.viewRight-d.width;b.RTL?n=Math.min(p,n):p=Math.max(n,p);b=Blockly.utils.math.clamp(n,d.left,p)-d.left;f.moveBy(b,m)}a&&(a.group||console.log("WARNING: Moved object in bounds but there was no event group. This may break undo."),null!==c&&Blockly.Events.setGroup(c))}}});Blockly.svgResize(e);Blockly.WidgetDiv.createDom(); -Blockly.DropDownDiv.createDom();Blockly.Tooltip.createDom();return e}; -Blockly.init_=function(a){var b=a.options,c=a.getParentSvg();Blockly.bindEventWithChecks_(c.parentNode,"contextmenu",null,function(a){Blockly.utils.isTargetInput(a)||a.preventDefault()});c=Blockly.bindEventWithChecks_(window,"resize",null,function(){Blockly.hideChaff(!0);Blockly.svgResize(a)});a.setResizeHandlerWrapper(c);Blockly.inject.bindDocumentEvents_();b.languageTree&&(a.toolbox_?a.toolbox_.init(a):a.flyout_&&(a.flyout_.init(a),a.flyout_.show(b.languageTree.childNodes),a.flyout_.scrollToStart())); -c=Blockly.Scrollbar.scrollbarThickness;b.hasTrashcan&&(c=a.trashcan.init(c));b.zoomOptions&&b.zoomOptions.controls&&a.zoomControls_.init(c);b.moveOptions&&b.moveOptions.scrollbars?(a.scrollbar=new Blockly.ScrollbarPair(a),a.scrollbar.resize()):a.setMetrics({x:.5,y:.5});b.hasSounds&&Blockly.inject.loadSounds_(b.pathToMedia,a)}; -Blockly.inject.bindDocumentEvents_=function(){Blockly.documentEventsBound_||(Blockly.bindEventWithChecks_(document,"scroll",null,function(){for(var a=Blockly.Workspace.getAll(),b=0,c;c=a[b];b++)c.updateInverseScreenCTM&&c.updateInverseScreenCTM()}),Blockly.bindEventWithChecks_(document,"keydown",null,Blockly.onKeyDown_),Blockly.bindEvent_(document,"touchend",null,Blockly.longStop_),Blockly.bindEvent_(document,"touchcancel",null,Blockly.longStop_),Blockly.utils.userAgent.IPAD&&Blockly.bindEventWithChecks_(window, -"orientationchange",document,function(){Blockly.svgResize(Blockly.getMainWorkspace())}));Blockly.documentEventsBound_=!0}; -Blockly.inject.loadSounds_=function(a,b){var c=b.getAudioManager();c.load([a+"click.mp3",a+"click.wav",a+"click.ogg"],"click");c.load([a+"disconnect.wav",a+"disconnect.mp3",a+"disconnect.ogg"],"disconnect");c.load([a+"delete.mp3",a+"delete.ogg",a+"delete.wav"],"delete");var d=[],e=function(){for(;d.length;)Blockly.unbindEvent_(d.pop());c.preload()};d.push(Blockly.bindEventWithChecks_(document,"mousemove",null,e,!0));d.push(Blockly.bindEventWithChecks_(document,"touchstart",null,e,!0))};Blockly.Action=function(a,b){this.name=a;this.desc=b};Blockly.ASTNode=function(a,b,c){if(!b)throw Error("Cannot create a node without a location.");this.type_=a;this.isConnection_=Blockly.ASTNode.isConnectionType_(a);this.location_=b;this.processParams_(c||null)};Blockly.ASTNode.types={FIELD:"field",BLOCK:"block",INPUT:"input",OUTPUT:"output",NEXT:"next",PREVIOUS:"previous",STACK:"stack",WORKSPACE:"workspace"};Blockly.ASTNode.DEFAULT_OFFSET_Y=-20;Blockly.ASTNode.isConnectionType_=function(a){switch(a){case Blockly.ASTNode.types.PREVIOUS:case Blockly.ASTNode.types.NEXT:case Blockly.ASTNode.types.INPUT:case Blockly.ASTNode.types.OUTPUT:return!0}return!1}; -Blockly.ASTNode.createFieldNode=function(a){return new Blockly.ASTNode(Blockly.ASTNode.types.FIELD,a)}; -Blockly.ASTNode.createConnectionNode=function(a){return a?a.type==Blockly.INPUT_VALUE||a.type==Blockly.NEXT_STATEMENT&&a.getParentInput()?Blockly.ASTNode.createInputNode(a.getParentInput()):a.type==Blockly.NEXT_STATEMENT?new Blockly.ASTNode(Blockly.ASTNode.types.NEXT,a):a.type==Blockly.OUTPUT_VALUE?new Blockly.ASTNode(Blockly.ASTNode.types.OUTPUT,a):a.type==Blockly.PREVIOUS_STATEMENT?new Blockly.ASTNode(Blockly.ASTNode.types.PREVIOUS,a):null:null}; -Blockly.ASTNode.createInputNode=function(a){return a?new Blockly.ASTNode(Blockly.ASTNode.types.INPUT,a.connection):null};Blockly.ASTNode.createBlockNode=function(a){return new Blockly.ASTNode(Blockly.ASTNode.types.BLOCK,a)};Blockly.ASTNode.createStackNode=function(a){return new Blockly.ASTNode(Blockly.ASTNode.types.STACK,a)};Blockly.ASTNode.createWorkspaceNode=function(a,b){return new Blockly.ASTNode(Blockly.ASTNode.types.WORKSPACE,a,{wsCoordinate:b})}; -Blockly.ASTNode.prototype.processParams_=function(a){a&&a.wsCoordinate&&(this.wsCoordinate_=a.wsCoordinate)};Blockly.ASTNode.prototype.getLocation=function(){return this.location_};Blockly.ASTNode.prototype.getType=function(){return this.type_};Blockly.ASTNode.prototype.getWsCoordinate=function(){return this.wsCoordinate_};Blockly.ASTNode.prototype.isConnection=function(){return this.isConnection_}; -Blockly.ASTNode.prototype.findPreviousEditableField_=function(a,b,c){b=b.fieldRow;a=b.indexOf(a);for(c=(c?b.length:a)-1;a=b[c];c--)if(a.EDITABLE)return b=a,Blockly.ASTNode.createFieldNode(b);return null};Blockly.ASTNode.prototype.findNextForInput_=function(){var a=this.location_.getParentInput(),b=a.getSourceBlock();a=b.inputList.indexOf(a)+1;for(var c;c=b.inputList[a];a++){for(var d=c.fieldRow,e=0,f;f=d[e];e++)if(f.EDITABLE)return Blockly.ASTNode.createFieldNode(f);if(c.connection)return Blockly.ASTNode.createInputNode(c)}return null}; -Blockly.ASTNode.prototype.findNextForField_=function(){var a=this.location_,b=a.getParentInput(),c=a.getSourceBlock(),d=c.inputList.indexOf(b);for(a=b.fieldRow.indexOf(a)+1;b=c.inputList[d];d++){for(var e=b.fieldRow;a1'),d.appendChild(c),b.push(d));if(Blockly.Blocks.variables_get){a.sort(Blockly.VariableModel.compareByName);c=0;for(var e;e=a[c];c++)d=Blockly.utils.xml.createElement("block"),d.setAttribute("type","variables_get"),d.setAttribute("gap",8),d.appendChild(Blockly.Variables.generateVariableFieldDom(e)),b.push(d)}}return b}; -Blockly.Variables.generateUniqueName=function(a){a=a.getAllVariables();var b="";if(a.length)for(var c=1,d=0,e="ijkmnopqrstuvwxyzabcdefgh".charAt(d);!b;){for(var f=!1,g=0;ge?Blockly.WidgetDiv.positionInternal_(a,0,c.height+e):Blockly.WidgetDiv.positionInternal_(a,e,c.height)}; -Blockly.WidgetDiv.calculateX_=function(a,b,c,d){if(d)return b=Math.max(b.right-c.width,a.left),Math.min(b,a.right-c.width);b=Math.min(b.left,a.right-c.width);return Math.max(b,a.left)};Blockly.WidgetDiv.calculateY_=function(a,b,c){return b.bottom+c.height>=a.bottom?b.top-c.height:b.bottom};Blockly.VERSION="3.20191014.4";Blockly.mainWorkspace=null;Blockly.selected=null;Blockly.cursor=null;Blockly.keyboardAccessibilityMode=!1;Blockly.draggingConnections_=[];Blockly.clipboardXml_=null;Blockly.clipboardSource_=null;Blockly.clipboardTypeCounts_=null;Blockly.cache3dSupported_=null;Blockly.svgSize=function(a){return{width:a.cachedWidth_,height:a.cachedHeight_}};Blockly.resizeSvgContents=function(a){a.resizeContents()}; -Blockly.svgResize=function(a){for(;a.options.parentWorkspace;)a=a.options.parentWorkspace;var b=a.getParentSvg(),c=b.parentNode;if(c){var d=c.offsetWidth;c=c.offsetHeight;b.cachedWidth_!=d&&(b.setAttribute("width",d+"px"),b.cachedWidth_=d);b.cachedHeight_!=c&&(b.setAttribute("height",c+"px"),b.cachedHeight_=c);a.resize()}}; -Blockly.onKeyDown_=function(a){var b=Blockly.mainWorkspace;if(!(Blockly.utils.isTargetInput(a)||b.rendered&&!b.isVisible()))if(b.options.readOnly)Blockly.navigation.onKeyPress(a);else{var c=!1;if(a.keyCode==Blockly.utils.KeyCodes.ESC)Blockly.hideChaff(),Blockly.navigation.onBlocklyAction(Blockly.navigation.ACTION_EXIT);else{if(Blockly.navigation.onKeyPress(a))return;if(a.keyCode==Blockly.utils.KeyCodes.BACKSPACE||a.keyCode==Blockly.utils.KeyCodes.DELETE){a.preventDefault();if(Blockly.Gesture.inProgress())return; -Blockly.selected&&Blockly.selected.isDeletable()&&(c=!0)}else if(a.altKey||a.ctrlKey||a.metaKey){if(Blockly.Gesture.inProgress())return;Blockly.selected&&Blockly.selected.isDeletable()&&Blockly.selected.isMovable()&&(a.keyCode==Blockly.utils.KeyCodes.C?(Blockly.hideChaff(),Blockly.copy_(Blockly.selected)):a.keyCode!=Blockly.utils.KeyCodes.X||Blockly.selected.workspace.isFlyout||(Blockly.copy_(Blockly.selected),c=!0));a.keyCode==Blockly.utils.KeyCodes.V?Blockly.clipboardXml_&&(a=Blockly.clipboardSource_, -a.isFlyout&&(a=a.targetWorkspace),Blockly.clipboardTypeCounts_&&a.isCapacityAvailable(Blockly.clipboardTypeCounts_)&&(Blockly.Events.setGroup(!0),a.paste(Blockly.clipboardXml_),Blockly.Events.setGroup(!1))):a.keyCode==Blockly.utils.KeyCodes.Z&&(Blockly.hideChaff(),b.undo(a.shiftKey))}}c&&!Blockly.selected.workspace.isFlyout&&(Blockly.Events.setGroup(!0),Blockly.hideChaff(),Blockly.selected.dispose(!0,!0),Blockly.Events.setGroup(!1))}}; -Blockly.copy_=function(a){if(a.isComment)var b=a.toXmlWithXY();else{b=Blockly.Xml.blockToDom(a,!0);Blockly.Xml.deleteNext(b);var c=a.getRelativeToSurfaceXY();b.setAttribute("x",a.RTL?-c.x:c.x);b.setAttribute("y",c.y)}Blockly.clipboardXml_=b;Blockly.clipboardSource_=a.workspace;Blockly.clipboardTypeCounts_=a.isComment?null:Blockly.utils.getBlockTypeCounts(a,!0)}; -Blockly.duplicate_=function(a){var b=Blockly.clipboardXml_,c=Blockly.clipboardSource_;Blockly.copy_(a);a.workspace.paste(Blockly.clipboardXml_);Blockly.clipboardXml_=b;Blockly.clipboardSource_=c};Blockly.onContextMenu_=function(a){Blockly.utils.isTargetInput(a)||a.preventDefault()}; -Blockly.hideChaff=function(a){Blockly.Tooltip.hide();Blockly.WidgetDiv.hide();Blockly.DropDownDiv.hideWithoutAnimation();a||(a=Blockly.getMainWorkspace(),a.trashcan&&a.trashcan.flyout_&&a.trashcan.flyout_.hide(),a.toolbox_&&a.toolbox_.flyout_&&a.toolbox_.flyout_.autoClose&&a.toolbox_.clearSelection())};Blockly.getMainWorkspace=function(){return Blockly.mainWorkspace};Blockly.alert=function(a,b){alert(a);b&&b()};Blockly.confirm=function(a,b){b(confirm(a))}; -Blockly.prompt=function(a,b,c){c(prompt(a,b))};Blockly.jsonInitFactory_=function(a){return function(){this.jsonInit(a)}}; -Blockly.defineBlocksWithJsonArray=function(a){for(var b=0;ba&&(a=this.computeDepth_(),this.setDepth_(a));return a};Blockly.tree.BaseNode.prototype.computeDepth_=function(){var a=this.getParent();return a?a.getDepth()+1:0};Blockly.tree.BaseNode.prototype.setDepth_=function(a){if(a!=this.depth_){this.depth_=a;var b=this.getRowElement();if(b){var c=this.getPixelIndent_()+"px";this.isRightToLeft()?b.style.paddingRight=c:b.style.paddingLeft=c}this.forEachChild(function(b){b.setDepth_(a+1)})}}; -Blockly.tree.BaseNode.prototype.contains=function(a){for(;a;){if(a==this)return!0;a=a.getParent()}return!1};Blockly.tree.BaseNode.prototype.getChildren=function(){var a=[];this.forEachChild(function(b){a.push(b)});return a};Blockly.tree.BaseNode.prototype.getFirstChild=function(){return this.getChildAt(0)};Blockly.tree.BaseNode.prototype.getLastChild=function(){return this.getChildAt(this.getChildCount()-1)};Blockly.tree.BaseNode.prototype.getPreviousSibling=function(){return this.previousSibling_}; -Blockly.tree.BaseNode.prototype.getNextSibling=function(){return this.nextSibling_};Blockly.tree.BaseNode.prototype.isLastSibling=function(){return!this.nextSibling_};Blockly.tree.BaseNode.prototype.isSelected=function(){return this.selected_};Blockly.tree.BaseNode.prototype.select=function(){var a=this.getTree();a&&a.setSelectedItem(this)};Blockly.tree.BaseNode.prototype.selectFirst=function(){var a=this.getTree();a&&this.firstChild_&&a.setSelectedItem(this.firstChild_)}; -Blockly.tree.BaseNode.prototype.setSelectedInternal=function(a){if(this.selected_!=a){this.selected_=a;this.updateRow();var b=this.getElement();b&&(Blockly.utils.aria.setState(b,Blockly.utils.aria.State.SELECTED,a),a&&(a=this.getTree().getElement(),Blockly.utils.aria.setState(a,Blockly.utils.aria.State.ACTIVEDESCENDANT,this.getId())))}};Blockly.tree.BaseNode.prototype.getExpanded=function(){return this.expanded_};Blockly.tree.BaseNode.prototype.setExpandedInternal=function(a){this.expanded_=a}; -Blockly.tree.BaseNode.prototype.setExpanded=function(a){var b=a!=this.expanded_,c;this.expanded_=a;var d=this.getTree(),e=this.getElement();if(this.hasChildren()){if(!a&&d&&this.contains(d.getSelectedItem())&&this.select(),e){if(c=this.getChildrenElement())Blockly.utils.style.setElementShown(c,a),Blockly.utils.aria.setState(e,Blockly.utils.aria.State.EXPANDED,a),a&&this.isInDocument()&&!c.hasChildNodes()&&(this.forEachChild(function(a){c.appendChild(a.toDom())}),this.forEachChild(function(a){a.enterDocument()})); -this.updateExpandIcon()}}else(c=this.getChildrenElement())&&Blockly.utils.style.setElementShown(c,!1);e&&this.updateIcon_();b&&(a?this.doNodeExpanded():this.doNodeCollapsed())};Blockly.tree.BaseNode.prototype.doNodeExpanded=function(){};Blockly.tree.BaseNode.prototype.doNodeCollapsed=function(){};Blockly.tree.BaseNode.prototype.toggle=function(){this.setExpanded(!this.getExpanded())};Blockly.tree.BaseNode.prototype.isUserCollapsible=function(){return this.isUserCollapsible_}; -Blockly.tree.BaseNode.prototype.toDom=function(){var a=this.getExpanded()&&this.hasChildren(),b=document.createElement("div");b.style.backgroundPosition=this.getBackgroundPosition();a||(b.style.display="none");a&&this.forEachChild(function(a){b.appendChild(a.toDom())});a=document.createElement("div");a.id=this.getId();a.appendChild(this.getRowDom());a.appendChild(b);return a};Blockly.tree.BaseNode.prototype.getPixelIndent_=function(){return Math.max(0,(this.getDepth()-1)*this.config_.indentWidth)}; -Blockly.tree.BaseNode.prototype.getRowDom=function(){var a=document.createElement("div");a.className=this.getRowClassName();a.style["padding-"+(this.isRightToLeft()?"right":"left")]=this.getPixelIndent_()+"px";a.appendChild(this.getIconDom());a.appendChild(this.getLabelDom());return a};Blockly.tree.BaseNode.prototype.getRowClassName=function(){var a="";this.isSelected()&&(a=" "+(this.config_.cssSelectedRow||""));return this.config_.cssTreeRow+a}; -Blockly.tree.BaseNode.prototype.getLabelDom=function(){var a=document.createElement("span");a.className=this.config_.cssItemLabel||"";a.textContent=this.getText();return a};Blockly.tree.BaseNode.prototype.getIconDom=function(){var a=document.createElement("span");a.style.display="inline-block";a.className=this.getCalculatedIconClass();return a};Blockly.tree.BaseNode.prototype.getCalculatedIconClass=function(){throw Error("unimplemented abstract method");}; -Blockly.tree.BaseNode.prototype.getBackgroundPosition=function(){return(this.isLastSibling()?"-100":(this.getDepth()-1)*this.config_.indentWidth)+"px 0"};Blockly.tree.BaseNode.prototype.getElement=function(){var a=Blockly.tree.BaseNode.superClass_.getElement.call(this);a||(a=document.getElementById(this.getId()),this.setElementInternal(a));return a};Blockly.tree.BaseNode.prototype.getRowElement=function(){var a=this.getElement();return a?a.firstChild:null}; -Blockly.tree.BaseNode.prototype.getIconElement=function(){var a=this.getRowElement();return a?a.firstChild:null};Blockly.tree.BaseNode.prototype.getLabelElement=function(){var a=this.getRowElement();return a&&a.lastChild?a.lastChild.previousSibling:null};Blockly.tree.BaseNode.prototype.getChildrenElement=function(){var a=this.getElement();return a?a.lastChild:null};Blockly.tree.BaseNode.prototype.getIconClass=function(){return this.iconClass_}; -Blockly.tree.BaseNode.prototype.getExpandedIconClass=function(){return this.expandedIconClass_};Blockly.tree.BaseNode.prototype.setText=function(a){this.content_=a};Blockly.tree.BaseNode.prototype.getText=function(){return this.content_};Blockly.tree.BaseNode.prototype.updateRow=function(){var a=this.getRowElement();a&&(a.className=this.getRowClassName())};Blockly.tree.BaseNode.prototype.updateExpandIcon=function(){var a=this.getChildrenElement();a&&(a.style.backgroundPosition=this.getBackgroundPosition())}; -Blockly.tree.BaseNode.prototype.updateIcon_=function(){this.getIconElement().className=this.getCalculatedIconClass()};Blockly.tree.BaseNode.prototype.onMouseDown=function(a){"expand"==a.target.getAttribute("type")&&this.hasChildren()?this.isUserCollapsible_&&this.toggle():(this.select(),this.updateRow())};Blockly.tree.BaseNode.prototype.onClick_=function(a){a.preventDefault()}; -Blockly.tree.BaseNode.prototype.onKeyDown=function(a){var b=!0;switch(a.keyCode){case Blockly.utils.KeyCodes.RIGHT:if(a.altKey)break;b=this.selectChild();break;case Blockly.utils.KeyCodes.LEFT:if(a.altKey)break;b=this.selectParent();break;case Blockly.utils.KeyCodes.DOWN:b=this.selectNext();break;case Blockly.utils.KeyCodes.UP:b=this.selectPrevious();break;default:b=!1}b&&a.preventDefault();return b}; -Blockly.tree.BaseNode.prototype.selectNext=function(){var a=this.getNextShownNode();a&&a.select();return!0};Blockly.tree.BaseNode.prototype.selectPrevious=function(){var a=this.getPreviousShownNode();a&&a.select();return!0};Blockly.tree.BaseNode.prototype.selectParent=function(){if(this.hasChildren()&&this.getExpanded()&&this.isUserCollapsible_)this.setExpanded(!1);else{var a=this.getParent(),b=this.getTree();a&&a!=b&&a.select()}return!0}; -Blockly.tree.BaseNode.prototype.selectChild=function(){return this.hasChildren()?(this.getExpanded()?this.getFirstChild().select():this.setExpanded(!0),!0):!1};Blockly.tree.BaseNode.prototype.getLastShownDescendant=function(){return this.getExpanded()&&this.hasChildren()?this.getLastChild().getLastShownDescendant():this}; -Blockly.tree.BaseNode.prototype.getNextShownNode=function(){if(this.hasChildren()&&this.getExpanded())return this.getFirstChild();for(var a=this,b;a!=this.getTree();){b=a.getNextSibling();if(null!=b)return b;a=a.getParent()}return null};Blockly.tree.BaseNode.prototype.getPreviousShownNode=function(){var a=this.getPreviousSibling();if(null!=a)return a.getLastShownDescendant();a=this.getParent();var b=this.getTree();return a==b||this==b?null:a};Blockly.tree.BaseNode.prototype.getConfig=function(){return this.config_}; -Blockly.tree.BaseNode.prototype.setTreeInternal=function(a){this.tree!=a&&(this.tree=a,this.forEachChild(function(b){b.setTreeInternal(a)}))};Blockly.tree.TreeNode=function(a,b,c){this.toolbox_=a;Blockly.tree.BaseNode.call(this,b,c)};Blockly.utils.object.inherits(Blockly.tree.TreeNode,Blockly.tree.BaseNode);Blockly.tree.TreeNode.prototype.getTree=function(){if(this.tree)return this.tree;var a=this.getParent();return a&&(a=a.getTree())?(this.setTreeInternal(a),a):null}; -Blockly.tree.TreeNode.prototype.getCalculatedIconClass=function(){var a=this.getExpanded(),b=this.getExpandedIconClass();if(a&&b)return b;b=this.getIconClass();if(!a&&b)return b;b=this.getConfig();if(this.hasChildren()){if(a&&b.cssExpandedFolderIcon)return b.cssTreeIcon+" "+b.cssExpandedFolderIcon;if(!a&&b.cssCollapsedFolderIcon)return b.cssTreeIcon+" "+b.cssCollapsedFolderIcon}else if(b.cssFileIcon)return b.cssTreeIcon+" "+b.cssFileIcon;return""}; -Blockly.tree.TreeNode.prototype.onClick_=function(a){this.hasChildren()&&this.isUserCollapsible()?(this.toggle(),this.select()):this.isSelected()?this.getTree().setSelectedItem(null):this.select();this.updateRow()};Blockly.tree.TreeNode.prototype.onMouseDown=function(a){}; -Blockly.tree.TreeNode.prototype.onKeyDown=function(a){if(this.tree.toolbox_.horizontalLayout_){var b={},c=Blockly.utils.KeyCodes.DOWN,d=Blockly.utils.KeyCodes.UP;b[Blockly.utils.KeyCodes.RIGHT]=this.isRightToLeft()?d:c;b[Blockly.utils.KeyCodes.LEFT]=this.isRightToLeft()?c:d;b[Blockly.utils.KeyCodes.UP]=Blockly.utils.KeyCodes.LEFT;b[Blockly.utils.KeyCodes.DOWN]=Blockly.utils.KeyCodes.RIGHT;Object.defineProperties(a,{keyCode:{value:b[a.keyCode]||a.keyCode}})}return Blockly.tree.TreeNode.superClass_.onKeyDown.call(this, -a)};Blockly.tree.TreeNode.prototype.onSizeChanged=function(a){this.onSizeChanged_=a};Blockly.tree.TreeNode.prototype.resizeToolbox_=function(){this.onSizeChanged_&&this.onSizeChanged_.call(this.toolbox_)};Blockly.tree.TreeNode.prototype.doNodeExpanded=Blockly.tree.TreeNode.prototype.resizeToolbox_;Blockly.tree.TreeNode.prototype.doNodeCollapsed=Blockly.tree.TreeNode.prototype.resizeToolbox_;Blockly.tree.TreeControl=function(a,b){this.toolbox_=a;Blockly.tree.BaseNode.call(this,"",b);this.setExpandedInternal(!0);this.setSelectedInternal(!0);this.selectedItem_=this};Blockly.utils.object.inherits(Blockly.tree.TreeControl,Blockly.tree.BaseNode);Blockly.tree.TreeControl.prototype.getTree=function(){return this};Blockly.tree.TreeControl.prototype.getToolbox=function(){return this.toolbox_};Blockly.tree.TreeControl.prototype.getDepth=function(){return 0}; -Blockly.tree.TreeControl.prototype.handleFocus_=function(a){this.focused_=!0;a=this.getElement();Blockly.utils.dom.addClass(a,"focused");this.selectedItem_&&this.selectedItem_.select()};Blockly.tree.TreeControl.prototype.handleBlur_=function(a){this.focused_=!1;a=this.getElement();Blockly.utils.dom.removeClass(a,"focused")};Blockly.tree.TreeControl.prototype.hasFocus=function(){return this.focused_};Blockly.tree.TreeControl.prototype.getExpanded=function(){return!0}; -Blockly.tree.TreeControl.prototype.setExpanded=function(a){this.setExpandedInternal(a)};Blockly.tree.TreeControl.prototype.getIconElement=function(){var a=this.getRowElement();return a?a.firstChild:null};Blockly.tree.TreeControl.prototype.updateExpandIcon=function(){};Blockly.tree.TreeControl.prototype.getRowClassName=function(){return Blockly.tree.TreeControl.superClass_.getRowClassName.call(this)+" "+this.getConfig().cssHideRoot}; -Blockly.tree.TreeControl.prototype.getCalculatedIconClass=function(){var a=this.getExpanded(),b=this.getExpandedIconClass();if(a&&b)return b;b=this.getIconClass();if(!a&&b)return b;b=this.getConfig();return a&&b.cssExpandedRootIcon?b.cssTreeIcon+" "+b.cssExpandedRootIcon:""}; -Blockly.tree.TreeControl.prototype.setSelectedItem=function(a){if(a!=this.selectedItem_&&(!this.onBeforeSelected_||this.onBeforeSelected_.call(this.toolbox_,a))){var b=this.getSelectedItem();this.selectedItem_&&this.selectedItem_.setSelectedInternal(!1);(this.selectedItem_=a)&&a.setSelectedInternal(!0);this.onAfterSelected_&&this.onAfterSelected_.call(this.toolbox_,b,a)}};Blockly.tree.TreeControl.prototype.onBeforeSelected=function(a){this.onBeforeSelected_=a}; -Blockly.tree.TreeControl.prototype.onAfterSelected=function(a){this.onAfterSelected_=a};Blockly.tree.TreeControl.prototype.getSelectedItem=function(){return this.selectedItem_};Blockly.tree.TreeControl.prototype.initAccessibility=function(){Blockly.tree.TreeControl.superClass_.initAccessibility.call(this);var a=this.getElement();Blockly.utils.aria.setRole(a,Blockly.utils.aria.Role.TREE);Blockly.utils.aria.setState(a,Blockly.utils.aria.State.LABELLEDBY,this.getLabelElement().id)}; -Blockly.tree.TreeControl.prototype.enterDocument=function(){Blockly.tree.TreeControl.superClass_.enterDocument.call(this);var a=this.getElement();a.className=this.getConfig().cssRoot;a.setAttribute("hideFocus","true");this.attachEvents_();this.initAccessibility()};Blockly.tree.TreeControl.prototype.exitDocument=function(){Blockly.tree.TreeControl.superClass_.exitDocument.call(this);this.detachEvents_()}; -Blockly.tree.TreeControl.prototype.attachEvents_=function(){var a=this.getElement();a.tabIndex=0;this.onFocusWrapper_=Blockly.bindEvent_(a,"focus",this,this.handleFocus_);this.onBlurWrapper_=Blockly.bindEvent_(a,"blur",this,this.handleBlur_);this.onClickWrapper_=Blockly.bindEventWithChecks_(a,"click",this,this.handleMouseEvent_);this.onKeydownWrapper_=Blockly.bindEvent_(a,"keydown",this,this.handleKeyEvent_)}; -Blockly.tree.TreeControl.prototype.detachEvents_=function(){Blockly.unbindEvent_(this.onFocusWrapper_);Blockly.unbindEvent_(this.onBlurWrapper_);Blockly.unbindEvent_(this.onClickWrapper_);Blockly.unbindEvent_(this.onKeydownWrapper_)};Blockly.tree.TreeControl.prototype.handleMouseEvent_=function(a){var b=this.getNodeFromEvent_(a);if(b)switch(a.type){case "mousedown":b.onMouseDown(a);break;case "click":b.onClick_(a)}}; -Blockly.tree.TreeControl.prototype.handleKeyEvent_=function(a){var b=!1;if(b=this.selectedItem_&&this.selectedItem_.onKeyDown(a)||b)Blockly.utils.style.scrollIntoContainerView(this.selectedItem_.getElement(),this.getElement().parentNode),a.preventDefault();return b};Blockly.tree.TreeControl.prototype.getNodeFromEvent_=function(a){for(var b=a.target;null!=b;){if(a=Blockly.tree.BaseNode.allNodes[b.id])return a;if(b==this.getElement())break;b=b.parentNode}return null}; -Blockly.tree.TreeControl.prototype.createNode=function(a){return new Blockly.tree.TreeNode(this.toolbox_,a||"",this.getConfig())};Blockly.FieldTextInput=function(a,b,c){this.spellcheck_=!0;null==a&&(a="");Blockly.FieldTextInput.superClass_.constructor.call(this,a,b,c)};Blockly.utils.object.inherits(Blockly.FieldTextInput,Blockly.Field);Blockly.FieldTextInput.fromJson=function(a){var b=Blockly.utils.replaceMessageReferences(a.text);return new Blockly.FieldTextInput(b,void 0,a)};Blockly.FieldTextInput.prototype.SERIALIZABLE=!0;Blockly.FieldTextInput.FONTSIZE=11;Blockly.FieldTextInput.BORDERRADIUS=4; -Blockly.FieldTextInput.prototype.CURSOR="text";Blockly.FieldTextInput.prototype.configure_=function(a){Blockly.FieldTextInput.superClass_.configure_.call(this,a);"boolean"==typeof a.spellcheck&&(this.spellcheck_=a.spellcheck)};Blockly.FieldTextInput.prototype.doClassValidation_=function(a){return null===a||void 0===a?null:String(a)}; -Blockly.FieldTextInput.prototype.doValueInvalid_=function(a){this.isBeingEdited_&&(this.isTextValid_=!1,a=this.value_,this.value_=this.htmlInput_.untypedDefaultValue_,this.sourceBlock_&&Blockly.Events.isEnabled()&&Blockly.Events.fire(new Blockly.Events.BlockChange(this.sourceBlock_,"field",this.name||null,a,this.value_)))};Blockly.FieldTextInput.prototype.doValueUpdate_=function(a){this.isTextValid_=!0;this.value_=a;this.isBeingEdited_||(this.isDirty_=!0)}; -Blockly.FieldTextInput.prototype.render_=function(){Blockly.FieldTextInput.superClass_.render_.call(this);this.isBeingEdited_&&(this.sourceBlock_.RTL?setTimeout(this.resizeEditor_.bind(this),0):this.resizeEditor_(),this.isTextValid_?(Blockly.utils.dom.removeClass(this.htmlInput_,"blocklyInvalidInput"),Blockly.utils.aria.setState(this.htmlInput_,"invalid",!1)):(Blockly.utils.dom.addClass(this.htmlInput_,"blocklyInvalidInput"),Blockly.utils.aria.setState(this.htmlInput_,"invalid",!0)))}; -Blockly.FieldTextInput.prototype.setSpellcheck=function(a){a!=this.spellcheck_&&(this.spellcheck_=a,this.htmlInput_&&this.htmlInput_.setAttribute("spellcheck",this.spellcheck_))};Blockly.FieldTextInput.prototype.showEditor_=function(a){this.workspace_=this.sourceBlock_.workspace;a=a||!1;!a&&(Blockly.utils.userAgent.MOBILE||Blockly.utils.userAgent.ANDROID||Blockly.utils.userAgent.IPAD)?this.showPromptEditor_():this.showInlineEditor_(a)}; -Blockly.FieldTextInput.prototype.showPromptEditor_=function(){var a=this;Blockly.prompt(Blockly.Msg.CHANGE_VALUE_TITLE,this.getText(),function(b){a.setValue(b)})};Blockly.FieldTextInput.prototype.showInlineEditor_=function(a){Blockly.WidgetDiv.show(this,this.sourceBlock_.RTL,this.widgetDispose_.bind(this));this.htmlInput_=this.widgetCreate_();this.isBeingEdited_=!0;a||(this.htmlInput_.focus(),this.htmlInput_.select())}; -Blockly.FieldTextInput.prototype.widgetCreate_=function(){var a=Blockly.WidgetDiv.DIV,b=document.createElement("input");b.className="blocklyHtmlInput";b.setAttribute("spellcheck",this.spellcheck_);var c=Blockly.FieldTextInput.FONTSIZE*this.workspace_.scale+"pt";a.style.fontSize=c;b.style.fontSize=c;b.style.borderRadius=Blockly.FieldTextInput.BORDERRADIUS*this.workspace_.scale+"px";a.appendChild(b);b.value=b.defaultValue=this.getEditorText_(this.value_);b.untypedDefaultValue_=this.value_;b.oldValue_= -null;Blockly.utils.userAgent.GECKO?setTimeout(this.resizeEditor_.bind(this),0):this.resizeEditor_();this.bindInputEvents_(b);return b};Blockly.FieldTextInput.prototype.widgetDispose_=function(){this.isBeingEdited_=!1;this.isTextValid_=!0;this.forceRerender();if(this.onFinishEditing_)this.onFinishEditing_(this.value_);this.unbindInputEvents_();var a=Blockly.WidgetDiv.DIV.style;a.width="auto";a.height="auto";a.fontSize=""}; -Blockly.FieldTextInput.prototype.bindInputEvents_=function(a){this.onKeyDownWrapper_=Blockly.bindEventWithChecks_(a,"keydown",this,this.onHtmlInputKeyDown_);this.onKeyInputWrapper_=Blockly.bindEventWithChecks_(a,"input",this,this.onHtmlInputChange_)};Blockly.FieldTextInput.prototype.unbindInputEvents_=function(){Blockly.unbindEvent_(this.onKeyDownWrapper_);Blockly.unbindEvent_(this.onKeyInputWrapper_)}; -Blockly.FieldTextInput.prototype.onHtmlInputKeyDown_=function(a){a.keyCode==Blockly.utils.KeyCodes.ENTER?(Blockly.WidgetDiv.hide(),Blockly.DropDownDiv.hideWithoutAnimation()):a.keyCode==Blockly.utils.KeyCodes.ESC?(this.htmlInput_.value=this.htmlInput_.defaultValue,Blockly.WidgetDiv.hide(),Blockly.DropDownDiv.hideWithoutAnimation()):a.keyCode==Blockly.utils.KeyCodes.TAB&&(Blockly.WidgetDiv.hide(),Blockly.DropDownDiv.hideWithoutAnimation(),this.sourceBlock_.tab(this,!a.shiftKey),a.preventDefault())}; -Blockly.FieldTextInput.prototype.onHtmlInputChange_=function(a){a=this.htmlInput_.value;a!==this.htmlInput_.oldValue_&&(this.htmlInput_.oldValue_=a,Blockly.Events.setGroup(!0),a=this.getValueFromEditorText_(a),this.setValue(a),this.forceRerender(),Blockly.Events.setGroup(!1))};Blockly.FieldTextInput.prototype.setEditorValue_=function(a){this.isDirty_=!0;this.isBeingEdited_&&(this.htmlInput_.value=this.getEditorText_(a));this.setValue(a)}; -Blockly.FieldTextInput.prototype.resizeEditor_=function(){var a=Blockly.WidgetDiv.DIV,b=this.getScaledBBox_();a.style.width=b.right-b.left+"px";a.style.height=b.bottom-b.top+"px";b=new Blockly.utils.Coordinate(this.sourceBlock_.RTL?b.right-a.offsetWidth:b.left,b.top);b.y+=1;Blockly.utils.userAgent.GECKO&&Blockly.WidgetDiv.DIV.style.top&&(--b.x,--b.y);Blockly.utils.userAgent.WEBKIT&&(b.y-=3);a.style.left=b.x+"px";a.style.top=b.y+"px"}; -Blockly.FieldTextInput.numberValidator=function(a){console.warn("Blockly.FieldTextInput.numberValidator is deprecated. Use Blockly.FieldNumber instead.");if(null===a)return null;a=String(a);a=a.replace(/O/ig,"0");a=a.replace(/,/g,"");a=Number(a||0);return isNaN(a)?null:String(a)};Blockly.FieldTextInput.nonnegativeIntegerValidator=function(a){(a=Blockly.FieldTextInput.numberValidator(a))&&(a=String(Math.max(0,Math.floor(a))));return a};Blockly.FieldTextInput.prototype.isTabNavigable=function(){return!0}; -Blockly.FieldTextInput.prototype.getText_=function(){return this.isBeingEdited_&&this.htmlInput_?this.htmlInput_.value:null};Blockly.FieldTextInput.prototype.getEditorText_=function(a){return String(a)};Blockly.FieldTextInput.prototype.getValueFromEditorText_=function(a){return a};Blockly.fieldRegistry.register("field_input",Blockly.FieldTextInput);Blockly.FieldAngle=function(a,b,c){this.clockwise_=Blockly.FieldAngle.CLOCKWISE;this.offset_=Blockly.FieldAngle.OFFSET;this.wrap_=Blockly.FieldAngle.WRAP;this.round_=Blockly.FieldAngle.ROUND;Blockly.FieldAngle.superClass_.constructor.call(this,a||0,b,c)};Blockly.utils.object.inherits(Blockly.FieldAngle,Blockly.FieldTextInput);Blockly.FieldAngle.fromJson=function(a){return new Blockly.FieldAngle(a.angle,void 0,a)};Blockly.FieldAngle.prototype.SERIALIZABLE=!0;Blockly.FieldAngle.ROUND=15; -Blockly.FieldAngle.HALF=50;Blockly.FieldAngle.CLOCKWISE=!1;Blockly.FieldAngle.OFFSET=0;Blockly.FieldAngle.WRAP=360;Blockly.FieldAngle.RADIUS=Blockly.FieldAngle.HALF-1; -Blockly.FieldAngle.prototype.configure_=function(a){Blockly.FieldAngle.superClass_.configure_.call(this,a);switch(a.mode){case "compass":this.clockwise_=!0;this.offset_=90;break;case "protractor":this.clockwise_=!1,this.offset_=0}var b=a.clockwise;"boolean"==typeof b&&(this.clockwise_=b);b=a.offset;null!=b&&(b=Number(b),isNaN(b)||(this.offset_=b));b=a.wrap;null!=b&&(b=Number(b),isNaN(b)||(this.wrap_=b));a=a.round;null!=a&&(a=Number(a),isNaN(a)||(this.round_=a))}; -Blockly.FieldAngle.prototype.initView=function(){Blockly.FieldAngle.superClass_.initView.call(this);this.symbol_=Blockly.utils.dom.createSvgElement("tspan",{},null);this.symbol_.appendChild(document.createTextNode("\u00b0"));this.textElement_.appendChild(this.symbol_)};Blockly.FieldAngle.prototype.render_=function(){Blockly.FieldAngle.superClass_.render_.call(this);this.updateGraph_()}; -Blockly.FieldAngle.prototype.showEditor_=function(){Blockly.FieldAngle.superClass_.showEditor_.call(this,Blockly.utils.userAgent.MOBILE||Blockly.utils.userAgent.ANDROID||Blockly.utils.userAgent.IPAD);var a=this.dropdownCreate_();Blockly.DropDownDiv.getContentDiv().appendChild(a);a=this.sourceBlock_.getColourBorder();a=a.colourBorder||a.colourLight;Blockly.DropDownDiv.setColour(this.sourceBlock_.getColour(),a);Blockly.DropDownDiv.showPositionedByField(this,this.dropdownDispose_.bind(this));this.updateGraph_()}; -Blockly.FieldAngle.prototype.dropdownCreate_=function(){var a=Blockly.utils.dom.createSvgElement("svg",{xmlns:Blockly.utils.dom.SVG_NS,"xmlns:html":Blockly.utils.dom.HTML_NS,"xmlns:xlink":Blockly.utils.dom.XLINK_NS,version:"1.1",height:2*Blockly.FieldAngle.HALF+"px",width:2*Blockly.FieldAngle.HALF+"px",style:"touch-action: none"},null),b=Blockly.utils.dom.createSvgElement("circle",{cx:Blockly.FieldAngle.HALF,cy:Blockly.FieldAngle.HALF,r:Blockly.FieldAngle.RADIUS,"class":"blocklyAngleCircle"},a);this.gauge_= -Blockly.utils.dom.createSvgElement("path",{"class":"blocklyAngleGauge"},a);this.line_=Blockly.utils.dom.createSvgElement("line",{x1:Blockly.FieldAngle.HALF,y1:Blockly.FieldAngle.HALF,"class":"blocklyAngleLine"},a);for(var c=0;360>c;c+=15)Blockly.utils.dom.createSvgElement("line",{x1:Blockly.FieldAngle.HALF+Blockly.FieldAngle.RADIUS,y1:Blockly.FieldAngle.HALF,x2:Blockly.FieldAngle.HALF+Blockly.FieldAngle.RADIUS-(0==c%45?10:5),y2:Blockly.FieldAngle.HALF,"class":"blocklyAngleMarks",transform:"rotate("+ -c+","+Blockly.FieldAngle.HALF+","+Blockly.FieldAngle.HALF+")"},a);this.clickWrapper_=Blockly.bindEventWithChecks_(a,"click",this,this.hide_);this.clickSurfaceWrapper_=Blockly.bindEventWithChecks_(b,"click",this,this.onMouseMove,!0,!0);this.moveSurfaceWrapper_=Blockly.bindEventWithChecks_(b,"mousemove",this,this.onMouseMove,!0,!0);return a};Blockly.FieldAngle.prototype.dropdownDispose_=function(){Blockly.unbindEvent_(this.clickWrapper_);Blockly.unbindEvent_(this.clickSurfaceWrapper_);Blockly.unbindEvent_(this.moveSurfaceWrapper_)}; -Blockly.FieldAngle.prototype.hide_=function(){Blockly.DropDownDiv.hideIfOwner(this);Blockly.WidgetDiv.hide()};Blockly.FieldAngle.prototype.onMouseMove=function(a){var b=this.gauge_.ownerSVGElement.getBoundingClientRect(),c=a.clientX-b.left-Blockly.FieldAngle.HALF;a=a.clientY-b.top-Blockly.FieldAngle.HALF;b=Math.atan(-a/c);isNaN(b)||(b=Blockly.utils.math.toDegrees(b),0>c?b+=180:0a&&(a+=360);a>this.wrap_&&(a-=360);return a};Blockly.Css.register(".blocklyAngleCircle {,stroke: #444;,stroke-width: 1;,fill: #ddd;,fill-opacity: .8;,},.blocklyAngleMarks {,stroke: #444;,stroke-width: 1;,},.blocklyAngleGauge {,fill: #f88;,fill-opacity: .8;,pointer-events: none;,},.blocklyAngleLine {,stroke: #f00;,stroke-width: 2;,stroke-linecap: round;,pointer-events: none;,}".split(",")); -Blockly.fieldRegistry.register("field_angle",Blockly.FieldAngle);Blockly.FieldCheckbox=function(a,b,c){this.checkChar_=null;null==a&&(a="FALSE");Blockly.FieldCheckbox.superClass_.constructor.call(this,a,b,c);this.size_.width=Blockly.FieldCheckbox.WIDTH};Blockly.utils.object.inherits(Blockly.FieldCheckbox,Blockly.Field);Blockly.FieldCheckbox.fromJson=function(a){return new Blockly.FieldCheckbox(a.checked,void 0,a)};Blockly.FieldCheckbox.WIDTH=15;Blockly.FieldCheckbox.CHECK_CHAR="\u2713";Blockly.FieldCheckbox.CHECK_X_OFFSET=Blockly.Field.DEFAULT_TEXT_OFFSET-3; -Blockly.FieldCheckbox.CHECK_Y_OFFSET=14;Blockly.FieldCheckbox.prototype.SERIALIZABLE=!0;Blockly.FieldCheckbox.prototype.CURSOR="default";Blockly.FieldCheckbox.prototype.isDirty_=!1;Blockly.FieldCheckbox.prototype.configure_=function(a){Blockly.FieldCheckbox.superClass_.configure_.call(this,a);a.checkCharacter&&(this.checkChar_=a.checkCharacter)}; -Blockly.FieldCheckbox.prototype.initView=function(){Blockly.FieldCheckbox.superClass_.initView.call(this);this.textElement_.setAttribute("x",Blockly.FieldCheckbox.CHECK_X_OFFSET);this.textElement_.setAttribute("y",Blockly.FieldCheckbox.CHECK_Y_OFFSET);Blockly.utils.dom.addClass(this.textElement_,"blocklyCheckbox");this.textContent_.nodeValue=this.checkChar_||Blockly.FieldCheckbox.CHECK_CHAR;this.textElement_.style.display=this.value_?"block":"none"}; -Blockly.FieldCheckbox.prototype.setCheckCharacter=function(a){this.checkChar_=a;this.textContent_&&(this.textContent_.nodeValue=a||Blockly.FieldCheckbox.CHECK_CHAR)};Blockly.FieldCheckbox.prototype.showEditor_=function(){this.setValue(!this.value_)};Blockly.FieldCheckbox.prototype.doClassValidation_=function(a){return!0===a||"TRUE"===a?"TRUE":!1===a||"FALSE"===a?"FALSE":null}; -Blockly.FieldCheckbox.prototype.doValueUpdate_=function(a){this.value_=this.convertValueToBool_(a);this.textElement_&&(this.textElement_.style.display=this.value_?"block":"none")};Blockly.FieldCheckbox.prototype.getValue=function(){return this.value_?"TRUE":"FALSE"};Blockly.FieldCheckbox.prototype.getValueBoolean=function(){return this.value_};Blockly.FieldCheckbox.prototype.getText=function(){return String(this.convertValueToBool_(this.value_))}; -Blockly.FieldCheckbox.prototype.convertValueToBool_=function(a){return"string"==typeof a?"TRUE"==a:!!a};Blockly.fieldRegistry.register("field_checkbox",Blockly.FieldCheckbox);Blockly.FieldColour=function(a,b,c){Blockly.FieldColour.superClass_.constructor.call(this,a||Blockly.FieldColour.COLOURS[0],b,c);this.size_=new Blockly.utils.Size(Blockly.FieldColour.DEFAULT_WIDTH,Blockly.FieldColour.DEFAULT_HEIGHT)};Blockly.utils.object.inherits(Blockly.FieldColour,Blockly.Field);Blockly.FieldColour.fromJson=function(a){return new Blockly.FieldColour(a.colour,void 0,a)};Blockly.FieldColour.DEFAULT_WIDTH=26;Blockly.FieldColour.DEFAULT_HEIGHT=Blockly.Field.BORDER_RECT_DEFAULT_HEIGHT; -Blockly.FieldColour.prototype.SERIALIZABLE=!0;Blockly.FieldColour.prototype.CURSOR="default";Blockly.FieldColour.prototype.isDirty_=!1;Blockly.FieldColour.prototype.colours_=null;Blockly.FieldColour.prototype.titles_=null;Blockly.FieldColour.prototype.columns_=0;Blockly.FieldColour.prototype.configure_=function(a){Blockly.FieldColour.superClass_.configure_.call(this,a);a.colourOptions&&(this.colours_=a.colourOptions,this.titles_=a.colourTitles);a.columns&&(this.columns_=a.columns)}; -Blockly.FieldColour.prototype.initView=function(){this.createBorderRect_();this.borderRect_.style.fillOpacity=1;this.borderRect_.style.fill=this.value_};Blockly.FieldColour.prototype.doClassValidation_=function(a){return"string"!=typeof a?null:Blockly.utils.colour.parse(a)};Blockly.FieldColour.prototype.doValueUpdate_=function(a){this.value_=a;this.borderRect_&&(this.borderRect_.style.fill=a)}; -Blockly.FieldColour.prototype.getText=function(){var a=this.value_;/^#(.)\1(.)\2(.)\3$/.test(a)&&(a="#"+a[1]+a[3]+a[5]);return a};Blockly.FieldColour.COLOURS="#ffffff #cccccc #c0c0c0 #999999 #666666 #333333 #000000 #ffcccc #ff6666 #ff0000 #cc0000 #990000 #660000 #330000 #ffcc99 #ff9966 #ff9900 #ff6600 #cc6600 #993300 #663300 #ffff99 #ffff66 #ffcc66 #ffcc33 #cc9933 #996633 #663333 #ffffcc #ffff33 #ffff00 #ffcc00 #999900 #666600 #333300 #99ff99 #66ff99 #33ff33 #33cc00 #009900 #006600 #003300 #99ffff #33ffff #66cccc #00cccc #339999 #336666 #003333 #ccffff #66ffff #33ccff #3366ff #3333ff #000099 #000066 #ccccff #9999ff #6666cc #6633ff #6600cc #333399 #330099 #ffccff #ff99ff #cc66cc #cc33cc #993399 #663366 #330033".split(" "); -Blockly.FieldColour.TITLES=[];Blockly.FieldColour.COLUMNS=7;Blockly.FieldColour.prototype.setColours=function(a,b){this.colours_=a;b&&(this.titles_=b);return this};Blockly.FieldColour.prototype.setColumns=function(a){this.columns_=a;return this};Blockly.FieldColour.prototype.showEditor_=function(){this.picker_=this.dropdownCreate_();Blockly.DropDownDiv.getContentDiv().appendChild(this.picker_);Blockly.DropDownDiv.showPositionedByField(this,this.dropdownDispose_.bind(this));this.picker_.focus()}; -Blockly.FieldColour.prototype.onClick_=function(a){a=(a=a.target)&&a.label;null!==a&&(this.setValue(a),Blockly.DropDownDiv.hideIfOwner(this))}; -Blockly.FieldColour.prototype.onKeyDown_=function(a){var b=!1;if(a.keyCode===Blockly.utils.KeyCodes.UP)this.moveHighlightBy_(0,-1),b=!0;else if(a.keyCode===Blockly.utils.KeyCodes.DOWN)this.moveHighlightBy_(0,1),b=!0;else if(a.keyCode===Blockly.utils.KeyCodes.LEFT)this.moveHighlightBy_(-1,0),b=!0;else if(a.keyCode===Blockly.utils.KeyCodes.RIGHT)this.moveHighlightBy_(1,0),b=!0;else if(a.keyCode===Blockly.utils.KeyCodes.ENTER){if(b=this.getHighlighted_())b=b&&b.label,null!==b&&this.setValue(b);Blockly.DropDownDiv.hideWithoutAnimation(); -b=!0}b&&a.stopPropagation()};Blockly.FieldColour.prototype.onBlocklyAction=function(a){if(this.picker_){if(a===Blockly.navigation.ACTION_PREVIOUS)return this.moveHighlightBy_(0,-1),!0;if(a===Blockly.navigation.ACTION_NEXT)return this.moveHighlightBy_(0,1),!0;if(a===Blockly.navigation.ACTION_OUT)return this.moveHighlightBy_(-1,0),!0;if(a===Blockly.navigation.ACTION_IN)return this.moveHighlightBy_(1,0),!0}return Blockly.FieldColour.superClass_.onBlocklyAction.call(this,a)}; -Blockly.FieldColour.prototype.moveHighlightBy_=function(a,b){var c=this.colours_||Blockly.FieldColour.COLOURS,d=this.columns_||Blockly.FieldColour.COLUMNS,e=this.highlightedIndex_%d,f=Math.floor(this.highlightedIndex_/d);e+=a;f+=b;0>a?0>e&&0e&&(e=0):0d-1&&fd-1&&e--:0>b?0>f&&(f=0):0Math.floor(c.length/d)-1&&(f=Math.floor(c.length/d)-1);this.setHighlightedCell_(this.picker_.childNodes[f].childNodes[e],f*d+e)}; -Blockly.FieldColour.prototype.onMouseMove_=function(a){var b=(a=a.target)&&a.getAttribute("data-index");null!==b&&b!==this.highlightedIndex_&&this.setHighlightedCell_(a,Number(b))};Blockly.FieldColour.prototype.onMouseEnter_=function(){this.picker_.focus()};Blockly.FieldColour.prototype.onMouseLeave_=function(){this.picker_.blur();var a=this.getHighlighted_();a&&Blockly.utils.dom.removeClass(a,"blocklyColourHighlighted")}; -Blockly.FieldColour.prototype.getHighlighted_=function(){var a=this.columns_||Blockly.FieldColour.COLUMNS,b=this.picker_.childNodes[Math.floor(this.highlightedIndex_/a)];return b?b.childNodes[this.highlightedIndex_%a]:null}; -Blockly.FieldColour.prototype.setHighlightedCell_=function(a,b){var c=this.getHighlighted_();c&&Blockly.utils.dom.removeClass(c,"blocklyColourHighlighted");Blockly.utils.dom.addClass(a,"blocklyColourHighlighted");this.highlightedIndex_=b;Blockly.utils.aria.setState(this.picker_,Blockly.utils.aria.State.ACTIVEDESCENDANT,a.getAttribute("id"))}; -Blockly.FieldColour.prototype.dropdownCreate_=function(){var a=this.columns_||Blockly.FieldColour.COLUMNS,b=this.colours_||Blockly.FieldColour.COLOURS,c=this.titles_||Blockly.FieldColour.TITLES,d=this.getValue(),e=document.createElement("table");e.className="blocklyColourTable";e.tabIndex=0;e.dir="ltr";Blockly.utils.aria.setRole(e,Blockly.utils.aria.Role.GRID);Blockly.utils.aria.setState(e,Blockly.utils.aria.State.EXPANDED,!0);Blockly.utils.aria.setState(e,"rowcount",Math.floor(b.length/a));Blockly.utils.aria.setState(e, -"colcount",a);for(var f,g=0;gtr>td {","border: .5px solid #888;","box-sizing: border-box;","cursor: pointer;","display: inline-block;","height: 20px;","padding: 0;","width: 20px;","}",".blocklyColourTable>tr>td.blocklyColourHighlighted {","border-color: #eee;","box-shadow: 2px 2px 7px 2px rgba(0,0,0,.3);","position: relative;","}",".blocklyColourSelected, .blocklyColourSelected:hover {", -"border-color: #eee !important;","outline: 1px solid #333;","position: relative;","}"]);Blockly.fieldRegistry.register("field_colour",Blockly.FieldColour);Blockly.FieldDropdown=function(a,b,c){"function"!=typeof a&&Blockly.FieldDropdown.validateOptions_(a);this.menuGenerator_=a;this.generatedOptions_=null;this.selectedIndex_=0;this.trimOptions_();a=this.getOptions(!1)[0];Blockly.FieldDropdown.superClass_.constructor.call(this,a[1],b,c);this.selectedMenuItem_=this.imageElement_=null};Blockly.utils.object.inherits(Blockly.FieldDropdown,Blockly.Field);Blockly.FieldDropdown.fromJson=function(a){return new Blockly.FieldDropdown(a.options,void 0,a)}; -Blockly.FieldDropdown.prototype.SERIALIZABLE=!0;Blockly.FieldDropdown.CHECKMARK_OVERHANG=25;Blockly.FieldDropdown.MAX_MENU_HEIGHT_VH=.45;Blockly.FieldDropdown.IMAGE_Y_OFFSET=5;Blockly.FieldDropdown.IMAGE_Y_PADDING=2*Blockly.FieldDropdown.IMAGE_Y_OFFSET;Blockly.FieldDropdown.ARROW_CHAR=Blockly.utils.userAgent.ANDROID?"\u25bc":"\u25be";Blockly.FieldDropdown.prototype.CURSOR="default"; -Blockly.FieldDropdown.prototype.initView=function(){Blockly.FieldDropdown.superClass_.initView.call(this);this.imageElement_=Blockly.utils.dom.createSvgElement("image",{y:Blockly.FieldDropdown.IMAGE_Y_OFFSET},this.fieldGroup_);this.arrow_=Blockly.utils.dom.createSvgElement("tspan",{},this.textElement_);this.arrow_.appendChild(document.createTextNode(this.sourceBlock_.RTL?Blockly.FieldDropdown.ARROW_CHAR+" ":" "+Blockly.FieldDropdown.ARROW_CHAR));this.sourceBlock_.RTL?this.textElement_.insertBefore(this.arrow_, -this.textContent_):this.textElement_.appendChild(this.arrow_)};Blockly.FieldDropdown.prototype.showEditor_=function(){this.menu_=this.dropdownCreate_();this.menu_.render(Blockly.DropDownDiv.getContentDiv());Blockly.utils.dom.addClass(this.menu_.getElement(),"blocklyDropdownMenu");Blockly.DropDownDiv.showPositionedByField(this,this.dropdownDispose_.bind(this));this.menu_.focus();this.selectedMenuItem_&&Blockly.utils.style.scrollIntoContainerView(this.selectedMenuItem_.getElement(),this.menu_.getElement())}; -Blockly.FieldDropdown.prototype.dropdownCreate_=function(){var a=new Blockly.Menu;a.setRightToLeft(this.sourceBlock_.RTL);a.setRole("listbox");var b=this.getOptions(!1);this.selectedMenuItem_=null;for(var c=0;ca.length)){b=[];for(c=0;cthis.selectedIndex_)return null;var a=this.getOptions(!0)[this.selectedIndex_][0];return"object"==typeof a?a.alt:a}; -Blockly.FieldDropdown.validateOptions_=function(a){if(!Array.isArray(a))throw TypeError("FieldDropdown options must be an array.");if(!a.length)throw TypeError("FieldDropdown options must not be an empty array.");for(var b=!1,c=0;c{setTimeout(fireNow$$module$build$src$core$events$utils,0)})}catch(b){setTimeout(fireNow$$module$build$src$core$events$utils,0)}FIRE_QUEUE$$module$build$src$core$events$utils.push(a)}}; +fireNow$$module$build$src$core$events$utils=function(){var a=filter$$module$build$src$core$events$utils(FIRE_QUEUE$$module$build$src$core$events$utils,!0);FIRE_QUEUE$$module$build$src$core$events$utils.length=0;for(let c=0,d;d=a[c];c++)if(d.workspaceId){var b=getWorkspaceById$$module$build$src$core$common(d.workspaceId);b&&b.fireChangeListener(d)}a=new Set(a.map(c=>c.workspaceId));for(const c of a){if(!c)continue;a=getWorkspaceById$$module$build$src$core$common(c);if(!a)continue;a=a.getUndoStack(); +let d=void 0;for(b=a.length;0>>/g,a),content$$module$build$src$core$css="",a=document.createElement("style"),a.id="blockly-common-style",b=document.createTextNode(b),a.appendChild(b),document.head.insertBefore(a,document.head.firstChild)))}; +warn$$module$build$src$core$utils$deprecation=function(a,b,c,d){a=a+" was deprecated in "+b+" and will be deleted in "+c+".";d&&(a+="\nUse "+d+" instead.");console.warn(a)};createSvgElement$$module$build$src$core$utils$dom=function(a,b,c){a=document.createElementNS(SVG_NS$$module$build$src$core$utils$dom,`${a}`);for(const d in b)a.setAttribute(d,`${b[d]}`);c&&c.appendChild(a);return a}; +addClass$$module$build$src$core$utils$dom=function(a,b){b=b.split(" ");if(b.every(c=>a.classList.contains(c)))return!1;a.classList.add(...b);return!0};removeClasses$$module$build$src$core$utils$dom=function(a,b){a.classList.remove(...b.split(" "))};removeClass$$module$build$src$core$utils$dom=function(a,b){b=b.split(" ");if(b.every(c=>!a.classList.contains(c)))return!1;a.classList.remove(...b);return!0};hasClass$$module$build$src$core$utils$dom=function(a,b){return a.classList.contains(b)}; +removeNode$$module$build$src$core$utils$dom=function(a){return a&&a.parentNode?a.parentNode.removeChild(a):null};insertAfter$$module$build$src$core$utils$dom=function(a,b){const c=b.nextSibling;b=b.parentNode;if(!b)throw Error("Reference node has no parent.");c?b.insertBefore(a,c):b.appendChild(a)}; +containsNode$$module$build$src$core$utils$dom=function(a,b){warn$$module$build$src$core$utils$deprecation("Blockly.utils.dom.containsNode","version 10","version 11",'Use native "contains" DOM method');return a.contains(b)};setCssTransform$$module$build$src$core$utils$dom=function(a,b){a.style.transform=b;a.style["-webkit-transform"]=b}; +startTextWidthCache$$module$build$src$core$utils$dom=function(){cacheReference$$module$build$src$core$utils$dom++;cacheWidths$$module$build$src$core$utils$dom||(cacheWidths$$module$build$src$core$utils$dom=Object.create(null))};stopTextWidthCache$$module$build$src$core$utils$dom=function(){cacheReference$$module$build$src$core$utils$dom--;cacheReference$$module$build$src$core$utils$dom||(cacheWidths$$module$build$src$core$utils$dom=null)}; +getTextWidth$$module$build$src$core$utils$dom=function(a){const b=a.textContent+"\n"+a.className.baseVal;let c;if(cacheWidths$$module$build$src$core$utils$dom&&(c=cacheWidths$$module$build$src$core$utils$dom[b]))return c;try{c=a.getComputedTextLength()}catch(d){return 8*a.textContent.length}cacheWidths$$module$build$src$core$utils$dom&&(cacheWidths$$module$build$src$core$utils$dom[b]=c);return c}; +getFastTextWidth$$module$build$src$core$utils$dom=function(a,b,c,d){return getFastTextWidthWithSizeString$$module$build$src$core$utils$dom(a,b+"pt",c,d)}; +getFastTextWidthWithSizeString$$module$build$src$core$utils$dom=function(a,b,c,d){const e=a.textContent;a=e+"\n"+a.className.baseVal;var f;if(cacheWidths$$module$build$src$core$utils$dom&&(f=cacheWidths$$module$build$src$core$utils$dom[a]))return f;canvasContext$$module$build$src$core$utils$dom||(f=document.createElement("canvas"),f.className="blocklyComputeCanvas",document.body.appendChild(f),canvasContext$$module$build$src$core$utils$dom=f.getContext("2d"));canvasContext$$module$build$src$core$utils$dom.font= +c+" "+b+" "+d;f=e?canvasContext$$module$build$src$core$utils$dom.measureText(e).width:0;cacheWidths$$module$build$src$core$utils$dom&&(cacheWidths$$module$build$src$core$utils$dom[a]=f);return f}; +measureFontMetrics$$module$build$src$core$utils$dom=function(a,b,c,d){const e=document.createElement("span");e.style.font=c+" "+b+" "+d;e.textContent=a;a=document.createElement("div");a.style.width="1px";a.style.height="0";b=document.createElement("div");b.style.display="flex";b.style.position="fixed";b.style.top="0";b.style.left="0";b.appendChild(e);b.appendChild(a);document.body.appendChild(b);c={height:0,baseline:0};try{b.style.alignItems="baseline",c.baseline=a.offsetTop-e.offsetTop,b.style.alignItems= +"flex-end",c.height=a.offsetTop-e.offsetTop}finally{document.body.removeChild(b)}return c};getSize$$module$build$src$core$utils$style=function(a){return TEST_ONLY$$module$build$src$core$utils$style.getSizeInternal(a)}; +getSizeInternal$$module$build$src$core$utils$style=function(a){if("none"!==getComputedStyle$$module$build$src$core$utils$style(a,"display"))return getSizeWithDisplay$$module$build$src$core$utils$style(a);const b=a.style,c=b.display,d=b.visibility,e=b.position;b.visibility="hidden";b.position="absolute";b.display="inline";const f=a.offsetWidth;a=a.offsetHeight;b.display=c;b.position=e;b.visibility=d;return new Size$$module$build$src$core$utils$size(f,a)}; +getSizeWithDisplay$$module$build$src$core$utils$style=function(a){return new Size$$module$build$src$core$utils$size(a.offsetWidth,a.offsetHeight)};getComputedStyle$$module$build$src$core$utils$style=function(a,b){a=window.getComputedStyle(a);return a[b]||a.getPropertyValue(b)}; +getPageOffset$$module$build$src$core$utils$style=function(a){const b=new Coordinate$$module$build$src$core$utils$coordinate(0,0);a=a.getBoundingClientRect();var c=document.documentElement;c=new Coordinate$$module$build$src$core$utils$coordinate(window.pageXOffset||c.scrollLeft,window.pageYOffset||c.scrollTop);b.x=a.left+c.x;b.y=a.top+c.y;return b}; +getViewportPageOffset$$module$build$src$core$utils$style=function(){const a=document.body,b=document.documentElement;return new Coordinate$$module$build$src$core$utils$coordinate(a.scrollLeft||b.scrollLeft,a.scrollTop||b.scrollTop)}; +getBorderBox$$module$build$src$core$utils$style=function(a){const b=parseFloat(getComputedStyle$$module$build$src$core$utils$style(a,"borderLeftWidth")),c=parseFloat(getComputedStyle$$module$build$src$core$utils$style(a,"borderRightWidth")),d=parseFloat(getComputedStyle$$module$build$src$core$utils$style(a,"borderTopWidth"));a=parseFloat(getComputedStyle$$module$build$src$core$utils$style(a,"borderBottomWidth"));return new Rect$$module$build$src$core$utils$rect(d,a,b,c)}; +scrollIntoContainerView$$module$build$src$core$utils$style=function(a,b,c){a=getContainerOffsetToScrollInto$$module$build$src$core$utils$style(a,b,c);b.scrollLeft=a.x;b.scrollTop=a.y}; +getContainerOffsetToScrollInto$$module$build$src$core$utils$style=function(a,b,c){var d=getPageOffset$$module$build$src$core$utils$style(a),e=getPageOffset$$module$build$src$core$utils$style(b),f=getBorderBox$$module$build$src$core$utils$style(b);const g=d.x-e.x-f.left;d=d.y-e.y-f.top;e=getSizeWithDisplay$$module$build$src$core$utils$style(a);a=b.clientWidth-e.width;e=b.clientHeight-e.height;f=b.scrollLeft;b=b.scrollTop;c?(f+=g-a/2,b+=d-e/2):(f+=Math.min(g,Math.max(g-a,0)),b+=Math.min(d,Math.max(d- +e,0)));return new Coordinate$$module$build$src$core$utils$coordinate(f,b)}; +getRelativeXY$$module$build$src$core$utils$svg_math=function(a){const b=new Coordinate$$module$build$src$core$utils$coordinate(0,0);var c=a.x&&a.getAttribute("x");const d=a.y&&a.getAttribute("y");c&&(b.x=parseInt(c));d&&(b.y=parseInt(d));if(c=(c=a.getAttribute("transform"))&&c.match(XY_REGEX$$module$build$src$core$utils$svg_math))b.x+=Number(c[1]),c[3]&&(b.y+=Number(c[3]));(a=a.getAttribute("style"))&&-1`&#${b.charCodeAt(0)};`)}; +convertToolboxDefToJson$$module$build$src$core$utils$toolbox=function(a){if(!a)return null;if(a instanceof Element||"string"===typeof a)a=parseToolboxTree$$module$build$src$core$utils$toolbox(a),a=convertToToolboxJson$$module$build$src$core$utils$toolbox(a);validateToolbox$$module$build$src$core$utils$toolbox(a);return a}; +validateToolbox$$module$build$src$core$utils$toolbox=function(a){const b=a.kind;a=a.contents;if(b&&b!==FLYOUT_TOOLBOX_KIND$$module$build$src$core$utils$toolbox&&b!==CATEGORY_TOOLBOX_KIND$$module$build$src$core$utils$toolbox)throw Error("Invalid toolbox kind "+b+". Please supply either "+FLYOUT_TOOLBOX_KIND$$module$build$src$core$utils$toolbox+" or "+CATEGORY_TOOLBOX_KIND$$module$build$src$core$utils$toolbox);if(!a)throw Error("Toolbox must have a contents attribute.");}; +convertFlyoutDefToJsonArray$$module$build$src$core$utils$toolbox=function(a){return a?a.contents?a.contents:Array.isArray(a)&&0 document.");}else a instanceof Element&&(b=a);return b}; +getStartPositionRect$$module$build$src$core$positionable_helpers=function(a,b,c,d,e,f){const g=f.scrollbar&&f.scrollbar.canScrollVertically();a.horizontal===horizontalPosition$$module$build$src$core$positionable_helpers.LEFT?(c=e.absoluteMetrics.left+c,g&&f.RTL&&(c+=Scrollbar$$module$build$src$core$scrollbar.scrollbarThickness)):(c=e.absoluteMetrics.left+e.viewMetrics.width-b.width-c,g&&!f.RTL&&(c-=Scrollbar$$module$build$src$core$scrollbar.scrollbarThickness));a.vertical===verticalPosition$$module$build$src$core$positionable_helpers.TOP? +a=e.absoluteMetrics.top+d:(a=e.absoluteMetrics.top+e.viewMetrics.height-b.height-d,f.scrollbar&&f.scrollbar.canScrollHorizontally()&&(a-=Scrollbar$$module$build$src$core$scrollbar.scrollbarThickness));return new Rect$$module$build$src$core$utils$rect(a,a+b.height,c,c+b.width)}; +getCornerOppositeToolbox$$module$build$src$core$positionable_helpers=function(a,b){return{horizontal:b.toolboxMetrics.position===Position$$module$build$src$core$utils$toolbox.LEFT||a.horizontalLayout&&!a.RTL?horizontalPosition$$module$build$src$core$positionable_helpers.RIGHT:horizontalPosition$$module$build$src$core$positionable_helpers.LEFT,vertical:b.toolboxMetrics.position===Position$$module$build$src$core$utils$toolbox.BOTTOM?verticalPosition$$module$build$src$core$positionable_helpers.TOP:verticalPosition$$module$build$src$core$positionable_helpers.BOTTOM}}; +bumpPositionRect$$module$build$src$core$positionable_helpers=function(a,b,c,d){const e=a.left,f=a.right-a.left,g=a.bottom-a.top;for(let h=0;h1'),d.appendChild(c),b.push(d));if(Blocks$$module$build$src$core$blocks.variables_get){a.sort(VariableModel$$module$build$src$core$variable_model.compareByName); +for(let e=0,f;f=a[e];e++)c=$.createElement$$module$build$src$core$utils$xml("block"),c.setAttribute("type","variables_get"),c.setAttribute("gap","8"),c.appendChild(generateVariableFieldDom$$module$build$src$core$variables(f)),b.push(c)}}return b};generateUniqueName$$module$build$src$core$variables=function(a){return TEST_ONLY$$module$build$src$core$variables.generateUniqueNameInternal(a)}; +generateUniqueNameInternal$$module$build$src$core$variables=function(a){return generateUniqueNameFromOptions$$module$build$src$core$variables(VAR_LETTER_OPTIONS$$module$build$src$core$variables.charAt(0),a.getAllVariableNames())}; +generateUniqueNameFromOptions$$module$build$src$core$variables=function(a,b){if(!b.length)return a;const c=VAR_LETTER_OPTIONS$$module$build$src$core$variables;let d="",e=c.indexOf(a);for(;;){let f=!1;for(let g=0;gf.getVariableModel().name);if(d&&(c=d.some(f=>f.toLowerCase()===a),d=d.some(f=>f.toLowerCase()===b),c&&d))return e.getName()}return null}; +checkForConflictingParamWithLegacyProcedures$$module$build$src$core$variables=function(a,b,c){a=a.toLowerCase();b=b.toLowerCase();c=c.getAllBlocks(!1);for(const e of c){if(!isLegacyProcedureDefBlock$$module$build$src$core$interfaces$i_legacy_procedure_blocks(e))continue;c=e.getProcedureDef();var d=c[1];const f=d.some(g=>g.toLowerCase()===a);d=d.some(g=>g.toLowerCase()===b);if(f&&d)return c[0]}return null}; +generateVariableFieldDom$$module$build$src$core$variables=function(a){const b=$.createElement$$module$build$src$core$utils$xml("field");b.setAttribute("name","VAR");b.setAttribute("id",a.getId());b.setAttribute("variabletype",a.type);a=$.createTextNode$$module$build$src$core$utils$xml(a.name);b.appendChild(a);return b}; +$.getOrCreateVariablePackage$$module$build$src$core$variables=function(a,b,c,d){let e=$.getVariable$$module$build$src$core$variables(a,b,c,d);e||(e=createVariable$$module$build$src$core$variables(a,b,c,d));return e}; +$.getVariable$$module$build$src$core$variables=function(a,b,c,d){const e=a.getPotentialVariableMap();let f=null;if(b&&(f=a.getVariableById(b),!f&&e&&(f=e.getVariableById(b)),f))return f;if(c){if(void 0===d)throw Error("Tried to look up a variable by name without a type");f=a.getVariable(c,d);!f&&e&&(f=e.getVariable(c,d))}return f}; +createVariable$$module$build$src$core$variables=function(a,b,c,d){const e=a.getPotentialVariableMap();c||(c=generateUniqueName$$module$build$src$core$variables(a.isFlyout?a.targetWorkspace:a));return e?e.createVariable(c,d,b):a.createVariable(c,d,b)};getAddedVariables$$module$build$src$core$variables=function(a,b){a=a.getAllVariables();const c=[];if(b.length!==a.length)for(let d=0;d{afterRendersResolver$$module$build$src$core$render_management=b;animationRequestId$$module$build$src$core$render_management= +window.requestAnimationFrame(()=>{doRenders$$module$build$src$core$render_management();b()})}));return afterRendersPromise$$module$build$src$core$render_management};finishQueuedRenders$$module$build$src$core$render_management=function(){return afterRendersPromise$$module$build$src$core$render_management?afterRendersPromise$$module$build$src$core$render_management:Promise.resolve()}; +triggerQueuedRenders$$module$build$src$core$render_management=function(){window.cancelAnimationFrame(animationRequestId$$module$build$src$core$render_management);doRenders$$module$build$src$core$render_management();afterRendersResolver$$module$build$src$core$render_management&&afterRendersResolver$$module$build$src$core$render_management()};alwaysImmediatelyRender$$module$build$src$core$render_management=function(){return JavaFx$$module$build$src$core$utils$useragent}; +queueBlock$$module$build$src$core$render_management=function(a){dirtyBlocks$$module$build$src$core$render_management.add(a);const b=a.getParent();b?queueBlock$$module$build$src$core$render_management(b):rootBlocks$$module$build$src$core$render_management.add(a)}; +doRenders$$module$build$src$core$render_management=function(){const a=new Set([...rootBlocks$$module$build$src$core$render_management].map(b=>b.workspace));for(const b of rootBlocks$$module$build$src$core$render_management){if(b.isDisposed())continue;if(b.getParent())continue;renderBlock$$module$build$src$core$render_management(b);const c=b.getRelativeToSurfaceXY();updateConnectionLocations$$module$build$src$core$render_management(b,c);updateIconLocations$$module$build$src$core$render_management(b, +c)}for(const b of a)b.resizeContents();rootBlocks$$module$build$src$core$render_management.clear();dirtyBlocks$$module$build$src$core$render_management=new Set;afterRendersPromise$$module$build$src$core$render_management=null};renderBlock$$module$build$src$core$render_management=function(a){if(dirtyBlocks$$module$build$src$core$render_management.has(a)){for(const b of a.getChildren(!1))renderBlock$$module$build$src$core$render_management(b);a.renderEfficiently()}}; +updateConnectionLocations$$module$build$src$core$render_management=function(a,b){for(const c of a.getConnections_(!1)){a=c.moveToOffset(b);const d=c.targetBlock();c.isSuperior()&&d&&(a||dirtyBlocks$$module$build$src$core$render_management.has(d))&&updateConnectionLocations$$module$build$src$core$render_management(d,Coordinate$$module$build$src$core$utils$coordinate.sum(b,d.relativeCoords))}}; +updateIconLocations$$module$build$src$core$render_management=function(a,b){if(a.getIcons){for(const c of a.getIcons())c.onLocationChange(b);for(const c of a.getChildren(!1))updateIconLocations$$module$build$src$core$render_management(c,Coordinate$$module$build$src$core$utils$coordinate.sum(b,c.relativeCoords))}}; +workspaceToDom$$module$build$src$core$xml=function(a,b){const c=$.createElement$$module$build$src$core$utils$xml("xml");var d=variablesToDom$$module$build$src$core$xml($.allUsedVarModels$$module$build$src$core$variables(a));d.hasChildNodes()&&c.appendChild(d);d=a.getTopComments(!0);for(let e=0;e/g,"<$1$2>")}; +domToPrettyText$$module$build$src$core$xml=function(a){a=domToText$$module$build$src$core$xml(a).split("<");let b="";for(let c=1;c"!==d.slice(-2)&&(b+=" ")}a=a.join("\n");a=a.replace(/(<(\w+)\b[^>]*>[^\n]*)\n *<\/\2>/g,"$1");return a.replace(/^\n/,"")}; +clearWorkspaceAndLoadFromXml$$module$build$src$core$xml=function(a,b){b.setResizesEnabled(!1);b.clear();a=$.domToWorkspace$$module$build$src$core$xml(a,b);b.setResizesEnabled(!0);return a}; +$.domToWorkspace$$module$build$src$core$xml=function(a,b){let c=0;b.RTL&&(c=b.getWidth());const d=[];startTextWidthCache$$module$build$src$core$utils$dom();const e=$.getGroup$$module$build$src$core$events$utils();e||$.setGroup$$module$build$src$core$events$utils(!0);b.setResizesEnabled&&b.setResizesEnabled(!1);let f=!0;try{for(let g=0,h;h=a.childNodes[g];g++){const k=h.nodeName.toLowerCase(),l=h;if("block"===k||"shadow"===k&&!getRecordUndo$$module$build$src$core$events$utils()){const m=domToBlockInternal$$module$build$src$core$xml(l, +b);d.push(m.id);let n;const p=parseInt(null!=(n=l.getAttribute("x"))?n:"10",10);let q;const r=parseInt(null!=(q=l.getAttribute("y"))?q:"10",10);isNaN(p)||isNaN(r)||m.moveBy(b.RTL?c-p:p,r,["create"]);f=!1}else{if("shadow"===k)throw TypeError("Shadow block cannot be a top-level block.");if("comment"===k)b.rendered?WorkspaceCommentSvg$$module$build$src$core$workspace_comment_svg.fromXmlRendered(l,b,c):WorkspaceComment$$module$build$src$core$workspace_comment.fromXml(l,b);else if("variables"===k){if(f)domToVariables$$module$build$src$core$xml(l, +b);else throw Error("'variables' tag must exist once before block and shadow tag elements in the workspace XML, but it was found in another location.");f=!1}}}}finally{$.setGroup$$module$build$src$core$events$utils(e),b.setResizesEnabled&&b.setResizesEnabled(!0),b.rendered&&triggerQueuedRenders$$module$build$src$core$render_management(),stopTextWidthCache$$module$build$src$core$utils$dom()}fire$$module$build$src$core$events$utils(new (get$$module$build$src$core$events$utils(FINISHED_LOADING$$module$build$src$core$events$utils))(b)); +return d}; +appendDomToWorkspace$$module$build$src$core$xml=function(a,b){if(!b.getBlocksBoundingBox)return $.domToWorkspace$$module$build$src$core$xml(a,b);var c=b.getBlocksBoundingBox();a=$.domToWorkspace$$module$build$src$core$xml(a,b);if(c&&c.top!==c.bottom){var d=c.bottom;c=b.RTL?c.right:c.left;var e=Infinity;let f=-Infinity,g=Infinity;for(let h=0;hf&&(f=k.x)}d=d-g+10;c=b.RTL?c-f:c-e;for(e=0;el.setBubbleVisible(f), +1)}};applyDataTagNodes$$module$build$src$core$xml=function(a,b){for(let c=0;c{h.disposed||h.setConnectionTracking(!0)},1)}return g}; +appendPrivate$$module$build$src$core$serialization$blocks=function(a,b,{parentConnection:c,isShadow:d=!1}={}){if(!a.type)throw new MissingBlockType$$module$build$src$core$serialization$exceptions(a);const e=b.newBlock(a.type,a.id);e.setShadow(d);loadCoords$$module$build$src$core$serialization$blocks(e,a);loadAttributes$$module$build$src$core$serialization$blocks(e,a);loadExtraState$$module$build$src$core$serialization$blocks(e,a);tryToConnectParent$$module$build$src$core$serialization$blocks(c,e, +a);loadIcons$$module$build$src$core$serialization$blocks(e,a);loadFields$$module$build$src$core$serialization$blocks(e,a);loadInputBlocks$$module$build$src$core$serialization$blocks(e,a);loadNextBlocks$$module$build$src$core$serialization$blocks(e,a);initBlock$$module$build$src$core$serialization$blocks(e,b.rendered);return e};loadCoords$$module$build$src$core$serialization$blocks=function(a,b){let c=void 0===b.x?0:b.x;b=void 0===b.y?0:b.y;const d=a.workspace;c=d.RTL?d.getWidth()-c:c;a.moveBy(c,b)}; +loadAttributes$$module$build$src$core$serialization$blocks=function(a,b){b.collapsed&&a.setCollapsed(!0);!1===b.deletable&&a.setDeletable(!1);!1===b.movable&&a.setMovable(!1);!1===b.editable&&a.setEditable(!1);!1===b.enabled&&a.setEnabled(!1);void 0!==b.inline&&a.setInputsInline(b.inline);void 0!==b.data&&(a.data=b.data)};loadExtraState$$module$build$src$core$serialization$blocks=function(a,b){b.extraState&&(a.loadExtraState?a.loadExtraState(b.extraState):a.domToMutation&&a.domToMutation($.textToDom$$module$build$src$core$utils$xml(b.extraState)))}; +tryToConnectParent$$module$build$src$core$serialization$blocks=function(a,b,c){if(a){if(a.getSourceBlock().isShadow()&&!b.isShadow())throw new RealChildOfShadow$$module$build$src$core$serialization$exceptions(c);if(a.type===$.inputTypes$$module$build$src$core$inputs$input_types.VALUE){var d=b.outputConnection;if(!d)throw new MissingConnection$$module$build$src$core$serialization$exceptions("output",b,c);}else if(d=b.previousConnection,!d)throw new MissingConnection$$module$build$src$core$serialization$exceptions("previous", +b,c);if(!a.connect(d)){const e=b.workspace.connectionChecker;throw new BadConnectionCheck$$module$build$src$core$serialization$exceptions(e.getErrorMessage(e.canConnectWithReason(d,a,!1),d,a),a.type===$.inputTypes$$module$build$src$core$inputs$input_types.VALUE?"output connection":"previous connection",b,c);}}}; +loadIcons$$module$build$src$core$serialization$blocks=function(a,b){if(b.icons){var c=Object.keys(b.icons);for(const e of c){c=b.icons[e];var d=a.getIcon(e);if(!d){d=getClass$$module$build$src$core$registry(Type$$module$build$src$core$registry.ICON,e,!1);if(!d)throw new UnregisteredIcon$$module$build$src$core$serialization$exceptions(e,a,b);d=new d(a);a.addIcon(d)}isSerializable$$module$build$src$core$interfaces$i_serializable(d)&&d.loadState(c)}}}; +loadFields$$module$build$src$core$serialization$blocks=function(a,b){if(b.fields){var c=Object.keys(b.fields);for(let d=0;dg.id!=a.id).map(g=>g.getRelativeToSurfaceXY());for(;blockOverlapsOtherExactly$$module$build$src$core$clipboard$block_paster(Coordinate$$module$build$src$core$utils$coordinate.sum(d,e),f)||blockIsInSnapRadius$$module$build$src$core$clipboard$block_paster(a, +e,c);)b.RTL?e.translate(-c,2*c):e.translate(c,2*c);a.moveTo(Coordinate$$module$build$src$core$utils$coordinate.sum(d,e))};blockOverlapsOtherExactly$$module$build$src$core$clipboard$block_paster=function(a,b){return b.some(c=>1>=Math.abs(c.x-a.x)&&1>=Math.abs(c.y-a.y))};blockIsInSnapRadius$$module$build$src$core$clipboard$block_paster=function(a,b,c){return a.getConnections_(!1).some(d=>!!d.closest(c,b).connection)}; +copy$$module$build$src$core$clipboard=function(a){warn$$module$build$src$core$utils$deprecation("Blockly.clipboard.copy","v11","v12","myCopyable.toCopyData()");return TEST_ONLY$$module$build$src$core$clipboard.copyInternal(a)};copyInternal$$module$build$src$core$clipboard=function(a){const b=a.toCopyData();stashedCopyData$$module$build$src$core$clipboard=b;let c;stashedWorkspace$$module$build$src$core$clipboard=null!=(c=a.workspace)?c:null;return b}; +paste$$module$build$src$core$clipboard=function(a,b,c){return a&&b?pasteFromData$$module$build$src$core$clipboard(a,b,c):stashedCopyData$$module$build$src$core$clipboard&&stashedWorkspace$$module$build$src$core$clipboard?pasteFromData$$module$build$src$core$clipboard(stashedCopyData$$module$build$src$core$clipboard,stashedWorkspace$$module$build$src$core$clipboard):null}; +pasteFromData$$module$build$src$core$clipboard=function(a,b,c){let d;b=null!=(d=b.getRootWorkspace())?d:b;let e,f;return null!=(f=null==(e=getObject$$module$build$src$core$registry(Type$$module$build$src$core$registry.PASTER,a.paster,!1))?void 0:e.paste(a,b,c))?f:null};duplicate$$module$build$src$core$clipboard=function(a){warn$$module$build$src$core$utils$deprecation("Blockly.clipboard.duplicate","v11","v12","Blockly.clipboard.paste(myCopyable.toCopyData(), myWorkspace)");return TEST_ONLY$$module$build$src$core$clipboard.duplicateInternal(a)}; +duplicateInternal$$module$build$src$core$clipboard=function(a){const b=a.toCopyData();return b?paste$$module$build$src$core$clipboard(b,a.workspace):null};setRole$$module$build$src$core$utils$aria=function(a,b){a.setAttribute(ROLE_ATTRIBUTE$$module$build$src$core$utils$aria,b)};setState$$module$build$src$core$utils$aria=function(a,b,c){Array.isArray(c)&&(c=c.join(" "));a.setAttribute(ARIA_PREFIX$$module$build$src$core$utils$aria+b,`${c}`)};getDiv$$module$build$src$core$widgetdiv=function(){return containerDiv$$module$build$src$core$widgetdiv}; +testOnly_setDiv$$module$build$src$core$widgetdiv=function(a){containerDiv$$module$build$src$core$widgetdiv=a};createDom$$module$build$src$core$widgetdiv=function(){containerDiv$$module$build$src$core$widgetdiv||(containerDiv$$module$build$src$core$widgetdiv=document.createElement("div"),containerDiv$$module$build$src$core$widgetdiv.className="blocklyWidgetDiv",(getParentContainer$$module$build$src$core$common()||document.body).appendChild(containerDiv$$module$build$src$core$widgetdiv))}; +show$$module$build$src$core$widgetdiv=function(a,b,c){hide$$module$build$src$core$widgetdiv();owner$$module$build$src$core$widgetdiv=a;dispose$$module$build$src$core$widgetdiv=c;if(a=containerDiv$$module$build$src$core$widgetdiv)a.style.direction=b?"rtl":"ltr",a.style.display="block",b=getMainWorkspace$$module$build$src$core$common(),rendererClassName$$module$build$src$core$widgetdiv=b.getRenderer().getClassName(),themeClassName$$module$build$src$core$widgetdiv=b.getTheme().getClassName(),rendererClassName$$module$build$src$core$widgetdiv&& +addClass$$module$build$src$core$utils$dom(a,rendererClassName$$module$build$src$core$widgetdiv),themeClassName$$module$build$src$core$widgetdiv&&addClass$$module$build$src$core$utils$dom(a,themeClassName$$module$build$src$core$widgetdiv)}; +hide$$module$build$src$core$widgetdiv=function(){if(isVisible$$module$build$src$core$widgetdiv()){owner$$module$build$src$core$widgetdiv=null;var a=containerDiv$$module$build$src$core$widgetdiv;a&&(a.style.display="none",a.style.left="",a.style.top="",dispose$$module$build$src$core$widgetdiv&&dispose$$module$build$src$core$widgetdiv(),dispose$$module$build$src$core$widgetdiv=null,a.textContent="",rendererClassName$$module$build$src$core$widgetdiv&&(removeClass$$module$build$src$core$utils$dom(a,rendererClassName$$module$build$src$core$widgetdiv), +rendererClassName$$module$build$src$core$widgetdiv=""),themeClassName$$module$build$src$core$widgetdiv&&(removeClass$$module$build$src$core$utils$dom(a,themeClassName$$module$build$src$core$widgetdiv),themeClassName$$module$build$src$core$widgetdiv=""),getMainWorkspace$$module$build$src$core$common().markFocused())}};isVisible$$module$build$src$core$widgetdiv=function(){return!!owner$$module$build$src$core$widgetdiv}; +hideIfOwner$$module$build$src$core$widgetdiv=function(a){owner$$module$build$src$core$widgetdiv===a&&hide$$module$build$src$core$widgetdiv()};positionInternal$$module$build$src$core$widgetdiv=function(a,b,c){containerDiv$$module$build$src$core$widgetdiv.style.left=a+"px";containerDiv$$module$build$src$core$widgetdiv.style.top=b+"px";containerDiv$$module$build$src$core$widgetdiv.style.height=c+"px"}; +positionWithAnchor$$module$build$src$core$widgetdiv=function(a,b,c,d){const e=calculateY$$module$build$src$core$widgetdiv(a,b,c);a=calculateX$$module$build$src$core$widgetdiv(a,b,c,d);0>e?positionInternal$$module$build$src$core$widgetdiv(a,0,c.height+e):positionInternal$$module$build$src$core$widgetdiv(a,e,c.height)};calculateX$$module$build$src$core$widgetdiv=function(a,b,c,d){return d?Math.min(Math.max(b.right-c.width,a.left),a.right-c.width):Math.max(Math.min(b.left,a.right-c.width),a.left)}; +calculateY$$module$build$src$core$widgetdiv=function(a,b,c){return b.bottom+c.height>=a.bottom?b.top-c.height:b.bottom};isRepositionable$$module$build$src$core$widgetdiv=function(a){return!(null==a||!a.repositionForWindowResize)};repositionForWindowResize$$module$build$src$core$widgetdiv=function(){isRepositionable$$module$build$src$core$widgetdiv(owner$$module$build$src$core$widgetdiv)&&owner$$module$build$src$core$widgetdiv.repositionForWindowResize()||hide$$module$build$src$core$widgetdiv()}; +getCurrentBlock$$module$build$src$core$contextmenu=function(){return currentBlock$$module$build$src$core$contextmenu};setCurrentBlock$$module$build$src$core$contextmenu=function(a){currentBlock$$module$build$src$core$contextmenu=a}; +show$$module$build$src$core$contextmenu=function(a,b,c){show$$module$build$src$core$widgetdiv(dummyOwner$$module$build$src$core$contextmenu,c,dispose$$module$build$src$core$contextmenu);if(b.length){var d=populate_$$module$build$src$core$contextmenu(b,c);menu_$$module$build$src$core$contextmenu=d;position_$$module$build$src$core$contextmenu(d,a,c);setTimeout(function(){d.focus()},1);currentBlock$$module$build$src$core$contextmenu=null}else hide$$module$build$src$core$contextmenu()}; +populate_$$module$build$src$core$contextmenu=function(a,b){const c=new Menu$$module$build$src$core$menu;c.setRole(Role$$module$build$src$core$utils$aria.MENU);for(let d=0;d{setTimeout(()=>{e.callback(e.scope)}, +0)})},{})}return c};position_$$module$build$src$core$contextmenu=function(a,b,c){const d=getViewportBBox$$module$build$src$core$utils$svg_math();b=new Rect$$module$build$src$core$utils$rect(b.clientY+d.top,b.clientY+d.top,b.clientX+d.left,b.clientX+d.left);createWidget_$$module$build$src$core$contextmenu(a);const e=a.getSize();c&&(b.left+=e.width,b.right+=e.width,d.left+=e.width,d.right+=e.width);positionWithAnchor$$module$build$src$core$widgetdiv(d,b,e,c);a.focus()}; +createWidget_$$module$build$src$core$contextmenu=function(a){var b=getDiv$$module$build$src$core$widgetdiv();if(!b)throw Error("Attempting to create a context menu when widget div is null");b=a.render(b);addClass$$module$build$src$core$utils$dom(b,"blocklyContextMenu");conditionalBind$$module$build$src$core$browser_events(b,"contextmenu",null,haltPropagation$$module$build$src$core$contextmenu);a.focus()};haltPropagation$$module$build$src$core$contextmenu=function(a){a.preventDefault();a.stopPropagation()}; +hide$$module$build$src$core$contextmenu=function(){hideIfOwner$$module$build$src$core$widgetdiv(dummyOwner$$module$build$src$core$contextmenu);currentBlock$$module$build$src$core$contextmenu=null};dispose$$module$build$src$core$contextmenu=function(){menu_$$module$build$src$core$contextmenu&&(menu_$$module$build$src$core$contextmenu.dispose(),menu_$$module$build$src$core$contextmenu=null)}; +$.callbackFactory$$module$build$src$core$contextmenu=function(a,b){return()=>{$.disable$$module$build$src$core$events$utils();let c;try{c=b instanceof Element?domToBlockInternal$$module$build$src$core$xml(b,a.workspace):appendInternal$$module$build$src$core$serialization$blocks(b,a.workspace);const d=a.getRelativeToSurfaceXY();d.x=a.RTL?d.x-$.config$$module$build$src$core$config.snapRadius:d.x+$.config$$module$build$src$core$config.snapRadius;d.y+=2*$.config$$module$build$src$core$config.snapRadius; +c.moveBy(d.x,d.y)}finally{$.enable$$module$build$src$core$events$utils()}isEnabled$$module$build$src$core$events$utils()&&!c.isShadow()&&fire$$module$build$src$core$events$utils(new (get$$module$build$src$core$events$utils($.CREATE$$module$build$src$core$events$utils))(c));c.select();return c}}; +commentDeleteOption$$module$build$src$core$contextmenu=function(a){return{text:$.Msg$$module$build$src$core$msg.REMOVE_COMMENT,enabled:!0,callback:function(){$.setGroup$$module$build$src$core$events$utils(!0);a.dispose();$.setGroup$$module$build$src$core$events$utils(!1)}}}; +commentDuplicateOption$$module$build$src$core$contextmenu=function(a){return{text:$.Msg$$module$build$src$core$msg.DUPLICATE_COMMENT,enabled:!0,callback:function(){const b=a.toCopyData();b&&paste$$module$build$src$core$clipboard(b,a.workspace)}}}; +workspaceCommentOption$$module$build$src$core$contextmenu=function(a,b){const c={enabled:!0};c.text=$.Msg$$module$build$src$core$msg.ADD_COMMENT;c.callback=function(){const d=new WorkspaceCommentSvg$$module$build$src$core$workspace_comment_svg(a,$.Msg$$module$build$src$core$msg.WORKSPACE_COMMENT_DEFAULT_TEXT,WorkspaceCommentSvg$$module$build$src$core$workspace_comment_svg.DEFAULT_SIZE,WorkspaceCommentSvg$$module$build$src$core$workspace_comment_svg.DEFAULT_SIZE);var e=a.getInjectionDiv().getBoundingClientRect(); +e=new Coordinate$$module$build$src$core$utils$coordinate(b.clientX-e.left,b.clientY-e.top);const f=a.getOriginOffsetInPixels();e=Coordinate$$module$build$src$core$utils$coordinate.difference(e,f);e.scale(1/a.scale);d.moveBy(e.x,e.y);a.rendered&&(d.initSvg(),d.render(),d.select())};return c};toRadians$$module$build$src$core$utils$math=function(a){return a*Math.PI/180};toDegrees$$module$build$src$core$utils$math=function(a){return 180*a/Math.PI}; +clamp$$module$build$src$core$utils$math=function(a,b,c){if(cc)){var d=b.getSvgXY(a.getSvgRoot());a.outputConnection?(d.x+=(a.RTL?3:-3)*c,d.y+=13*c):a.previousConnection&&(d.x+=(a.RTL?-23:23)*c,d.y+=3*c);var e=createSvgElement$$module$build$src$core$utils$dom(Svg$$module$build$src$core$utils$svg.CIRCLE,{cx:d.x,cy:d.y,r:0,fill:"none",stroke:"#888","stroke-width":10},b.getParentSvg());a=createSvgElement$$module$build$src$core$utils$dom(Svg$$module$build$src$core$utils$svg.ANIMATE, +{id:"animationCircle",begin:"indefinite",attributeName:"r",dur:"150ms",from:0,to:25*c},e);b=createSvgElement$$module$build$src$core$utils$dom(Svg$$module$build$src$core$utils$svg.ANIMATE,{id:"animationOpacity",begin:"indefinite",attributeName:"opacity",dur:"150ms",from:1,to:0},e);a.beginElement();b.beginElement();setTimeout(()=>void removeNode$$module$build$src$core$utils$dom(e),150)}}; +disconnectUiEffect$$module$build$src$core$block_animations=function(a){disconnectUiStop$$module$build$src$core$block_animations();a.workspace.getAudioManager().play("disconnect");if(!(1>a.workspace.scale)){var b=a.getHeightWidth().height;b=Math.atan(10/b)/Math.PI*180;a.RTL||(b*=-1);wobblingBlock$$module$build$src$core$block_animations=a;disconnectUiStep$$module$build$src$core$block_animations(a,b,new Date)}}; +disconnectUiStep$$module$build$src$core$block_animations=function(a,b,c){const d=((new Date).getTime()-c.getTime())/200;let e="";1>=d&&(e=`skewX(${Math.round(Math.sin(d*Math.PI*3)*(1-d)*b)})`,disconnectPid$$module$build$src$core$block_animations=setTimeout(disconnectUiStep$$module$build$src$core$block_animations,10,a,b,c));a.getSvgRoot().setAttribute("transform",`${a.getTranslation()} ${e}`)}; +disconnectUiStop$$module$build$src$core$block_animations=function(){wobblingBlock$$module$build$src$core$block_animations&&(disconnectPid$$module$build$src$core$block_animations&&(clearTimeout(disconnectPid$$module$build$src$core$block_animations),disconnectPid$$module$build$src$core$block_animations=null),wobblingBlock$$module$build$src$core$block_animations.getSvgRoot().setAttribute("transform",wobblingBlock$$module$build$src$core$block_animations.getTranslation()),wobblingBlock$$module$build$src$core$block_animations= +null)};startsWith$$module$build$src$core$utils$string=function(a,b){warn$$module$build$src$core$utils$deprecation("Blockly.utils.string.startsWith()","April 2022","April 2023","Use built-in string.startsWith");return a.startsWith(b)};shortestStringLength$$module$build$src$core$utils$string=function(a){return a.length?a.reduce(function(b,c){return b.lengthb&&(b=c[d].length);var e=-Infinity;let f,g=1;do{d=e;f=a;a=[];e=c.length/g;let h=1;for(let k=0;kd);return f}; +wrapScore$$module$build$src$core$utils$string=function(a,b,c){const d=[0],e=[];for(var f=0;fd&&(d=h,e=g)}return e?wrapMutate$$module$build$src$core$utils$string(a,e,c):b}; +wrapToText$$module$build$src$core$utils$string=function(a,b){const c=[];for(let d=0;dRADIUS_OK$$module$build$src$core$tooltip&&hide$$module$build$src$core$tooltip()}else poisonedElement$$module$build$src$core$tooltip!==element$$module$build$src$core$tooltip&& +(clearTimeout(showPid$$module$build$src$core$tooltip),lastX$$module$build$src$core$tooltip=a.pageX,lastY$$module$build$src$core$tooltip=a.pageY,showPid$$module$build$src$core$tooltip=setTimeout(show$$module$build$src$core$tooltip,HOVER_MS$$module$build$src$core$tooltip))};dispose$$module$build$src$core$tooltip=function(){poisonedElement$$module$build$src$core$tooltip=element$$module$build$src$core$tooltip=null;hide$$module$build$src$core$tooltip()}; +hide$$module$build$src$core$tooltip=function(){visible$$module$build$src$core$tooltip&&(visible$$module$build$src$core$tooltip=!1,containerDiv$$module$build$src$core$tooltip&&(containerDiv$$module$build$src$core$tooltip.style.display="none"));showPid$$module$build$src$core$tooltip&&(clearTimeout(showPid$$module$build$src$core$tooltip),showPid$$module$build$src$core$tooltip=0)}; +block$$module$build$src$core$tooltip=function(){hide$$module$build$src$core$tooltip();blocked$$module$build$src$core$tooltip=!0};unblock$$module$build$src$core$tooltip=function(){blocked$$module$build$src$core$tooltip=!1}; +renderContent$$module$build$src$core$tooltip=function(){containerDiv$$module$build$src$core$tooltip&&element$$module$build$src$core$tooltip&&("function"===typeof customTooltip$$module$build$src$core$tooltip?customTooltip$$module$build$src$core$tooltip(containerDiv$$module$build$src$core$tooltip,element$$module$build$src$core$tooltip):renderDefaultContent$$module$build$src$core$tooltip())}; +renderDefaultContent$$module$build$src$core$tooltip=function(){var a=getTooltipOfObject$$module$build$src$core$tooltip(element$$module$build$src$core$tooltip);a=$.wrap$$module$build$src$core$utils$string(a,LIMIT$$module$build$src$core$tooltip);a=a.split("\n");for(let b=0;bc+window.scrollY&&(e-=containerDiv$$module$build$src$core$tooltip.offsetHeight+ +2*OFFSET_Y$$module$build$src$core$tooltip);a?d=Math.max(MARGINS$$module$build$src$core$tooltip-window.scrollX,d):d+containerDiv$$module$build$src$core$tooltip.offsetWidth>b+window.scrollX-2*MARGINS$$module$build$src$core$tooltip&&(d=b-containerDiv$$module$build$src$core$tooltip.offsetWidth-2*MARGINS$$module$build$src$core$tooltip);return{x:d,y:e}}; +show$$module$build$src$core$tooltip=function(){if(!blocked$$module$build$src$core$tooltip&&(poisonedElement$$module$build$src$core$tooltip=element$$module$build$src$core$tooltip,containerDiv$$module$build$src$core$tooltip)){containerDiv$$module$build$src$core$tooltip.textContent="";renderContent$$module$build$src$core$tooltip();var a=element$$module$build$src$core$tooltip.RTL;containerDiv$$module$build$src$core$tooltip.style.direction=a?"rtl":"ltr";containerDiv$$module$build$src$core$tooltip.style.display= +"block";visible$$module$build$src$core$tooltip=!0;var {x:b,y:c}=getPosition$$module$build$src$core$tooltip(a);containerDiv$$module$build$src$core$tooltip.style.left=b+"px";containerDiv$$module$build$src$core$tooltip.style.top=c+"px"}};deepMerge$$module$build$src$core$utils$object=function(a,b){for(const c in b)a[c]=null!==b[c]&&"object"===typeof b[c]?deepMerge$$module$build$src$core$utils$object(a[c]||Object.create(null),b[c]):b[c];return a}; +hasBubble$$module$build$src$core$interfaces$i_has_bubble=function(a){return void 0!==a.bubbleIsVisible&&void 0!==a.setBubbleVisible};getHsvSaturation$$module$build$src$core$utils$colour=function(){return hsvSaturation$$module$build$src$core$utils$colour};setHsvSaturation$$module$build$src$core$utils$colour=function(a){hsvSaturation$$module$build$src$core$utils$colour=a};getHsvValue$$module$build$src$core$utils$colour=function(){return hsvValue$$module$build$src$core$utils$colour}; +setHsvValue$$module$build$src$core$utils$colour=function(a){hsvValue$$module$build$src$core$utils$colour=a}; +parse$$module$build$src$core$utils$colour=function(a){a=`${a}`.toLowerCase().trim();var b=names$$module$build$src$core$utils$colour[a];if(b)return b;b="0x"===a.substring(0,2)?"#"+a.substring(2):a;b="#"===b[0]?b:"#"+b;if(/^#[0-9a-f]{6}$/.test(b))return b;if(/^#[0-9a-f]{3}$/.test(b))return["#",b[1],b[1],b[2],b[2],b[3],b[3]].join("");var c=a.match(/^(?:rgb)?\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)$/);return c&&(a=Number(c[1]),b=Number(c[2]),c=Number(c[3]),0<=a&&256>a&&0<=b&&256>b&&0<=c&&256>c)?rgbToHex$$module$build$src$core$utils$colour(a, +b,c):null};rgbToHex$$module$build$src$core$utils$colour=function(a,b,c){b=a<<16|b<<8|c;return 16>a?"#"+(16777216|b).toString(16).substr(1):"#"+b.toString(16)};hexToRgb$$module$build$src$core$utils$colour=function(a){a=parse$$module$build$src$core$utils$colour(a);if(!a)return[0,0,0];a=parseInt(a.substr(1),16);return[a>>16,a>>8&255,a&255]}; +hsvToHex$$module$build$src$core$utils$colour=function(a,b,c){let d=0,e=0,f=0;if(0===b)f=e=d=c;else{const g=Math.floor(a/60),h=a/60-g;a=c*(1-b);const k=c*(1-b*h);b=c*(1-b*(1-h));switch(g){case 1:d=k;e=c;f=a;break;case 2:d=a;e=c;f=b;break;case 3:d=a;e=k;f=c;break;case 4:d=b;e=a;f=c;break;case 5:d=c;e=a;f=k;break;case 6:case 0:d=c,e=b,f=a}}return rgbToHex$$module$build$src$core$utils$colour(Math.floor(d),Math.floor(e),Math.floor(f))}; +blend$$module$build$src$core$utils$colour=function(a,b,c){a=parse$$module$build$src$core$utils$colour(a);if(!a)return null;b=parse$$module$build$src$core$utils$colour(b);if(!b)return null;a=hexToRgb$$module$build$src$core$utils$colour(a);b=hexToRgb$$module$build$src$core$utils$colour(b);return rgbToHex$$module$build$src$core$utils$colour(Math.round(b[0]+c*(a[0]-b[0])),Math.round(b[1]+c*(a[1]-b[1])),Math.round(b[2]+c*(a[2]-b[2])))}; +hueToHex$$module$build$src$core$utils$colour=function(a){return hsvToHex$$module$build$src$core$utils$colour(a,hsvSaturation$$module$build$src$core$utils$colour,255*hsvValue$$module$build$src$core$utils$colour)}; +tokenizeInterpolationInternal$$module$build$src$core$utils$parsing=function(a,b,c){const d=[];var e=a.split("");e.push("");var f=0;a=[];let g=null;for(let l=0;l=h?(f=2,g=h,(h=a.join(""))&&d.push(h),a.length=0):"{"===h?f=3:(a.push("%",h),f=0);else if(2===f)if("0"<=h&&"9">= +h)g+=h;else{var k=void 0;d.push(parseInt(null!=(k=g)?k:"",10));l--;f=0}else 3===f&&(""===h?(a.splice(0,0,"%{"),l--,f=0):"}"!==h?a.push(h):(f=a.join(""),/[A-Z]\w*/i.test(f)?(h=f.toUpperCase(),(h=h.startsWith("BKY_")?h.substring(4):null)&&h in $.Msg$$module$build$src$core$msg?(f=$.Msg$$module$build$src$core$msg[h],"string"===typeof f?Array.prototype.push.apply(d,tokenizeInterpolationInternal$$module$build$src$core$utils$parsing(f,b,c)):b?d.push(`${f}`):d.push(f)):d.push("%{"+f+"}")):d.push("%{"+f+"}"), +f=a.length=0))}(b=a.join(""))&&d.push(b);k=[];a.length=0;for(e=0;e=c)return{hue:c,hex:hsvToHex$$module$build$src$core$utils$colour(c,getHsvSaturation$$module$build$src$core$utils$colour(),255*getHsvValue$$module$build$src$core$utils$colour())};if(c=parse$$module$build$src$core$utils$colour(b))return{hue:null,hex:c};c='Invalid colour: "'+b+'"';a!==b&&(c+=' (from "'+ +a+'")');throw Error(c);};isProcedureBlock$$module$build$src$core$interfaces$i_procedure_block=function(a){return void 0!==a.getProcedureModel&&void 0!==a.doProcedureUpdate&&void 0!==a.isProcedureDef};isObservable$$module$build$src$core$interfaces$i_observable=function(a){return void 0!==a.startPublishing&&void 0!==a.stopPublishing};register$$module$build$src$core$field_registry=function(a,b){register$$module$build$src$core$registry(Type$$module$build$src$core$registry.FIELD,a,b)}; +unregister$$module$build$src$core$field_registry=function(a){unregister$$module$build$src$core$registry(Type$$module$build$src$core$registry.FIELD,a)};$.fromJson$$module$build$src$core$field_registry=function(a){return TEST_ONLY$$module$build$src$core$field_registry.fromJsonInternal(a)}; +fromJsonInternal$$module$build$src$core$field_registry=function(a){const b=getObject$$module$build$src$core$registry(Type$$module$build$src$core$registry.FIELD,a.type);if(b){if("function"!==typeof b.fromJson)throw new TypeError("returned Field was not a IRegistrableField");return b.fromJson(a)}console.warn("Blockly could not create a field of type "+a.type+". The field is probably not being registered. This could be because the file is not loaded, the field does not register itself (Issue #1584), or the registration is not being reached."); +return null}; +trimOptions$$module$build$src$core$field_dropdown=function(a){let b=!1;const c=a.map(([g,h])=>{if("string"===typeof g)return[replaceMessageReferences$$module$build$src$core$utils$parsing(g),h];b=!0;return[null!==g.alt?Object.assign({},g,{alt:replaceMessageReferences$$module$build$src$core$utils$parsing(g.alt)}):Object.assign({},g),h]});if(b||2>a.length)return{options:c};var d=c.map(([g])=>g),e=shortestStringLength$$module$build$src$core$utils$string(d);a=commonWordPrefix$$module$build$src$core$utils$string(d,e); +const f=commonWordSuffix$$module$build$src$core$utils$string(d,e);if(!a&&!f||e<=a+f)return{options:c};e=a?d[0].substring(0,a-1):void 0;d=f?d[0].substr(1-f):void 0;return{options:applyTrim$$module$build$src$core$field_dropdown(c,a,f),prefix:e,suffix:d}};applyTrim$$module$build$src$core$field_dropdown=function(a,b,c){return a.map(([d,e])=>[d.substring(b,d.length-c),e])}; +validateOptions$$module$build$src$core$field_dropdown=function(a){if(!Array.isArray(a))throw TypeError("FieldDropdown options must be an array.");if(!a.length)throw TypeError("FieldDropdown options must not be an empty array.");let b=!1;for(let c=0;c=c||0>=b)throw Error("Height and width values of an image field must be greater than 0.");this.flipRtl_=!1;this.altText_="";Blockly.FieldImage.superClass_.constructor.call(this, -a||"",null,g);g||(this.flipRtl_=!!f,this.altText_=Blockly.utils.replaceMessageReferences(d)||"");this.size_=new Blockly.utils.Size(b,c+Blockly.FieldImage.Y_PADDING);this.imageHeight_=c;this.clickHandler_=null;"function"==typeof e&&(this.clickHandler_=e)};Blockly.utils.object.inherits(Blockly.FieldImage,Blockly.Field);Blockly.FieldImage.fromJson=function(a){return new Blockly.FieldImage(a.src,a.width,a.height,void 0,void 0,void 0,a)};Blockly.FieldImage.Y_PADDING=1; -Blockly.FieldImage.prototype.EDITABLE=!1;Blockly.FieldImage.prototype.isDirty_=!1;Blockly.FieldImage.prototype.configure_=function(a){Blockly.FieldImage.superClass_.configure_.call(this,a);this.flipRtl_=!!a.flipRtl;this.altText_=Blockly.utils.replaceMessageReferences(a.alt)||""}; -Blockly.FieldImage.prototype.initView=function(){this.imageElement_=Blockly.utils.dom.createSvgElement("image",{height:this.imageHeight_+"px",width:this.size_.width+"px",alt:this.altText_},this.fieldGroup_);this.imageElement_.setAttributeNS(Blockly.utils.dom.XLINK_NS,"xlink:href",this.value_)};Blockly.FieldImage.prototype.doClassValidation_=function(a){return"string"!=typeof a?null:a}; -Blockly.FieldImage.prototype.doValueUpdate_=function(a){this.value_=a;this.imageElement_&&this.imageElement_.setAttributeNS(Blockly.utils.dom.XLINK_NS,"xlink:href",this.value_||"")};Blockly.FieldImage.prototype.getFlipRtl=function(){return this.flipRtl_};Blockly.FieldImage.prototype.setAlt=function(a){a!=this.altText_&&(this.altText_=a||"",this.imageElement_&&this.imageElement_.setAttribute("alt",this.altText_))};Blockly.FieldImage.prototype.showEditor_=function(){this.clickHandler_&&this.clickHandler_(this)}; -Blockly.FieldImage.prototype.setOnClickHandler=function(a){this.clickHandler_=a};Blockly.FieldImage.prototype.getText_=function(){return this.altText_};Blockly.fieldRegistry.register("field_image",Blockly.FieldImage);Blockly.FieldLabelSerializable=function(a,b,c){Blockly.FieldLabelSerializable.superClass_.constructor.call(this,a,b,c)};Blockly.utils.object.inherits(Blockly.FieldLabelSerializable,Blockly.FieldLabel);Blockly.FieldLabelSerializable.fromJson=function(a){var b=Blockly.utils.replaceMessageReferences(a.text);return new Blockly.FieldLabelSerializable(b,void 0,a)};Blockly.FieldLabelSerializable.prototype.EDITABLE=!1;Blockly.FieldLabelSerializable.prototype.SERIALIZABLE=!0; -Blockly.fieldRegistry.register("field_label_serializable",Blockly.FieldLabelSerializable);Blockly.FieldMultilineInput=function(a,b,c){null==a&&(a="");Blockly.FieldMultilineInput.superClass_.constructor.call(this,a,b,c)};Blockly.utils.object.inherits(Blockly.FieldMultilineInput,Blockly.FieldTextInput);Blockly.FieldMultilineInput.LINE_HEIGHT=20;Blockly.FieldMultilineInput.fromJson=function(a){var b=Blockly.utils.replaceMessageReferences(a.text);return new Blockly.FieldMultilineInput(b,void 0,a)}; -Blockly.FieldMultilineInput.prototype.initView=function(){this.createBorderRect_();this.textGroup_=Blockly.utils.dom.createSvgElement("g",{"class":"blocklyEditableText"},this.fieldGroup_)}; -Blockly.FieldMultilineInput.prototype.getDisplayText_=function(){var a=this.value_;if(!a)return Blockly.Field.NBSP;var b=a.split("\n");a="";for(var c=0;cthis.maxDisplayLength&&(d=d.substring(0,this.maxDisplayLength-4)+"...");d=d.replace(/\s/g,Blockly.Field.NBSP);a+=d;c!==b.length-1&&(a+="\n")}this.sourceBlock_.RTL&&(a+="\u200f");return a}; -Blockly.FieldMultilineInput.prototype.render_=function(){for(var a;a=this.textGroup_.firstChild;)this.textGroup_.removeChild(a);a=this.getDisplayText_().split("\n");for(var b=Blockly.Field.Y_PADDING/2,c=0,d=0;db&&(b=e);c+=Blockly.FieldMultilineInput.LINE_HEIGHT}this.borderRect_&&(b+=Blockly.Field.X_PADDING,this.borderRect_.setAttribute("width",b),this.borderRect_.setAttribute("height",c));this.size_.width=b;this.size_.height=c}; -Blockly.FieldMultilineInput.prototype.resizeEditor_=function(){var a=Blockly.WidgetDiv.DIV,b=this.getScaledBBox_();a.style.width=b.right-b.left+"px";a.style.height=b.bottom-b.top+"px";b=new Blockly.utils.Coordinate(this.sourceBlock_.RTL?b.right-a.offsetWidth:b.left,b.top);a.style.left=b.x+"px";a.style.top=b.y+"px"}; -Blockly.FieldMultilineInput.prototype.widgetCreate_=function(){var a=Blockly.WidgetDiv.DIV,b=this.workspace_.scale,c=document.createElement("textarea");c.className="blocklyHtmlInput blocklyHtmlTextAreaInput";c.setAttribute("spellcheck",this.spellcheck_);var d=Blockly.FieldTextInput.FONTSIZE*b+"pt";a.style.fontSize=d;c.style.fontSize=d;c.style.borderRadius=Blockly.FieldTextInput.BORDERRADIUS*b+"px";d=Blockly.Field.DEFAULT_TEXT_OFFSET*b;c.style.paddingLeft=d+"px";c.style.width="calc(100% - "+d+"px)"; -c.style.lineHeight=Blockly.FieldMultilineInput.LINE_HEIGHT*b+"px";a.appendChild(c);c.value=c.defaultValue=this.getEditorText_(this.value_);c.untypedDefaultValue_=this.value_;c.oldValue_=null;Blockly.utils.userAgent.GECKO?setTimeout(this.resizeEditor_.bind(this),0):this.resizeEditor_();this.bindInputEvents_(c);return c}; -Blockly.FieldMultilineInput.prototype.onHtmlInputKeyDown_=function(a){a.keyCode!==Blockly.utils.KeyCodes.ENTER&&Blockly.FieldMultilineInput.superClass_.onHtmlInputKeyDown_.call(this,a)};Blockly.Css.register(".blocklyHtmlTextAreaInput {,font-family: monospace;,resize: none;,overflow: hidden;,height: 100%;,text-align: left;,}".split(","));Blockly.fieldRegistry.register("field_multilinetext",Blockly.FieldMultilineInput);Blockly.FieldNumber=function(a,b,c,d,e,f){this.min_=-Infinity;this.max_=Infinity;this.precision_=0;this.decimalPlaces_=null;Blockly.FieldNumber.superClass_.constructor.call(this,a||0,e,f);f||this.setConstraints(b,c,d)};Blockly.utils.object.inherits(Blockly.FieldNumber,Blockly.FieldTextInput);Blockly.FieldNumber.fromJson=function(a){return new Blockly.FieldNumber(a.value,void 0,void 0,void 0,void 0,a)};Blockly.FieldNumber.prototype.SERIALIZABLE=!0; -Blockly.FieldNumber.prototype.configure_=function(a){Blockly.FieldNumber.superClass_.configure_.call(this,a);this.setMinInternal_(a.min);this.setMaxInternal_(a.max);this.setPrecisionInternal_(a.precision)};Blockly.FieldNumber.prototype.setConstraints=function(a,b,c){this.setMinInternal_(a);this.setMaxInternal_(b);this.setPrecisionInternal_(c);this.setValue(this.getValue())};Blockly.FieldNumber.prototype.setMin=function(a){this.setMinInternal_(a);this.setValue(this.getValue())}; -Blockly.FieldNumber.prototype.setMinInternal_=function(a){null==a?this.min_=-Infinity:(a=Number(a),isNaN(a)||(this.min_=a))};Blockly.FieldNumber.prototype.getMin=function(){return this.min_};Blockly.FieldNumber.prototype.setMax=function(a){this.setMaxInternal_(a);this.setValue(this.getValue())};Blockly.FieldNumber.prototype.setMaxInternal_=function(a){null==a?this.max_=Infinity:(a=Number(a),isNaN(a)||(this.max_=a))};Blockly.FieldNumber.prototype.getMax=function(){return this.max_}; -Blockly.FieldNumber.prototype.setPrecision=function(a){this.setPrecisionInternal_(a);this.setValue(this.getValue())};Blockly.FieldNumber.prototype.setPrecisionInternal_=function(a){null==a?this.precision_=0:(a=Number(a),isNaN(a)||(this.precision_=a));var b=this.precision_.toString(),c=b.indexOf(".");this.decimalPlaces_=-1==c?a?0:null:b.length-c-1};Blockly.FieldNumber.prototype.getPrecision=function(){return this.precision_}; -Blockly.FieldNumber.prototype.doClassValidation_=function(a){if(null===a)return null;a=String(a);a=a.replace(/O/ig,"0");a=a.replace(/,/g,"");a=Number(a||0);if(isNaN(a))return null;a=Math.min(Math.max(a,this.min_),this.max_);this.precision_&&isFinite(a)&&(a=Math.round(a/this.precision_)*this.precision_);null!=this.decimalPlaces_&&(a=Number(a.toFixed(this.decimalPlaces_)));return a}; -Blockly.FieldNumber.prototype.widgetCreate_=function(){var a=Blockly.FieldNumber.superClass_.widgetCreate_.call(this);-Infinitythis.max_&&Blockly.utils.aria.setState(a,Blockly.utils.aria.State.VALUEMAX,this.max_);return a};Blockly.fieldRegistry.register("field_number",Blockly.FieldNumber);Blockly.FieldVariable=function(a,b,c,d,e){this.menuGenerator_=Blockly.FieldVariable.dropdownCreate;this.defaultVariableName=a||"";this.size_=new Blockly.utils.Size(0,Blockly.BlockSvg.MIN_BLOCK_Y);e&&this.configure_(e);b&&this.setValidator(b);e||this.setTypes_(c,d)};Blockly.utils.object.inherits(Blockly.FieldVariable,Blockly.FieldDropdown);Blockly.FieldVariable.fromJson=function(a){var b=Blockly.utils.replaceMessageReferences(a.variable);return new Blockly.FieldVariable(b,void 0,void 0,void 0,a)}; -Blockly.FieldVariable.prototype.workspace_=null;Blockly.FieldVariable.prototype.SERIALIZABLE=!0;Blockly.FieldVariable.prototype.configure_=function(a){Blockly.FieldVariable.superClass_.configure_.call(this,a);this.setTypes_(a.variableTypes,a.defaultType)}; -Blockly.FieldVariable.prototype.initModel=function(){if(!this.variable_){var a=Blockly.Variables.getOrCreateVariablePackage(this.sourceBlock_.workspace,null,this.defaultVariableName,this.defaultType_);Blockly.Events.disable();this.setValue(a.getId());Blockly.Events.enable()}}; -Blockly.FieldVariable.prototype.fromXml=function(a){var b=a.getAttribute("id"),c=a.textContent,d=a.getAttribute("variabletype")||a.getAttribute("variableType")||"";b=Blockly.Variables.getOrCreateVariablePackage(this.sourceBlock_.workspace,b,c,d);if(null!=d&&d!==b.type)throw Error("Serialized variable type with id '"+b.getId()+"' had type "+b.type+", and does not match variable field that references it: "+Blockly.Xml.domToText(a)+".");this.setValue(b.getId())}; -Blockly.FieldVariable.prototype.toXml=function(a){this.initModel();a.id=this.variable_.getId();a.textContent=this.variable_.name;this.variable_.type&&a.setAttribute("variabletype",this.variable_.type);return a};Blockly.FieldVariable.prototype.setSourceBlock=function(a){if(a.isShadow())throw Error("Variable fields are not allowed to exist on shadow blocks.");Blockly.FieldVariable.superClass_.setSourceBlock.call(this,a)}; -Blockly.FieldVariable.prototype.getValue=function(){return this.variable_?this.variable_.getId():null};Blockly.FieldVariable.prototype.getText=function(){return this.variable_?this.variable_.name:""};Blockly.FieldVariable.prototype.getVariable=function(){return this.variable_};Blockly.FieldVariable.prototype.getValidator=function(){return this.variable_?this.validator_:null}; -Blockly.FieldVariable.prototype.doClassValidation_=function(a){if(null===a)return null;var b=Blockly.Variables.getVariable(this.sourceBlock_.workspace,a);if(!b)return console.warn("Variable id doesn't point to a real variable! ID was "+a),null;b=b.type;return this.typeIsAllowed_(b)?a:(console.warn("Variable type doesn't match this field! Type was "+b),null)}; -Blockly.FieldVariable.prototype.doValueUpdate_=function(a){this.variable_=Blockly.Variables.getVariable(this.sourceBlock_.workspace,a);Blockly.FieldVariable.superClass_.doValueUpdate_.call(this,a)};Blockly.FieldVariable.prototype.typeIsAllowed_=function(a){var b=this.getVariableTypes_();if(!b)return!0;for(var c=0;c90-b||a>-90-b&&a<-90+b?!0:!1}; -Blockly.HorizontalFlyout.prototype.getClientRect=function(){if(!this.svgGroup_)return null;var a=this.svgGroup_.getBoundingClientRect(),b=a.top;return this.toolboxPosition_==Blockly.TOOLBOX_AT_TOP?new Blockly.utils.Rect(-1E9,b+a.height,-1E9,1E9):new Blockly.utils.Rect(b,-1E9,-1E9,1E9)}; -Blockly.HorizontalFlyout.prototype.reflowInternal_=function(){this.workspace_.scale=this.targetWorkspace_.scale;for(var a=0,b=this.workspace_.getTopBlocks(!1),c=0,d;d=b[c];c++)a=Math.max(a,d.getHeightWidth().height);a+=1.5*this.MARGIN;a*=this.workspace_.scale;a+=Blockly.Scrollbar.scrollbarThickness;if(this.height_!=a){for(c=0;d=b[c];c++)d.flyoutRect_&&this.moveRectToBlock_(d.flyoutRect_,d);this.height_=a;this.position()}};Blockly.VerticalFlyout=function(a){a.getMetrics=this.getMetrics_.bind(this);a.setMetrics=this.setMetrics_.bind(this);Blockly.VerticalFlyout.superClass_.constructor.call(this,a);this.horizontalLayout_=!1};Blockly.utils.object.inherits(Blockly.VerticalFlyout,Blockly.Flyout); -Blockly.VerticalFlyout.prototype.getMetrics_=function(){if(!this.isVisible())return null;try{var a=this.workspace_.getCanvas().getBBox()}catch(e){a={height:0,y:0,width:0,x:0}}var b=this.SCROLLBAR_PADDING,c=this.height_-2*this.SCROLLBAR_PADDING,d=this.width_;this.RTL||(d-=this.SCROLLBAR_PADDING);return{viewHeight:c,viewWidth:d,contentHeight:a.height*this.workspace_.scale+2*this.MARGIN,contentWidth:a.width*this.workspace_.scale+2*this.MARGIN,viewTop:-this.workspace_.scrollY+a.y,viewLeft:-this.workspace_.scrollX, -contentTop:a.y,contentLeft:a.x,absoluteTop:b,absoluteLeft:0}};Blockly.VerticalFlyout.prototype.setMetrics_=function(a){var b=this.getMetrics_();b&&("number"==typeof a.y&&(this.workspace_.scrollY=-b.contentHeight*a.y),this.workspace_.translate(this.workspace_.scrollX+b.absoluteLeft,this.workspace_.scrollY+b.absoluteTop))}; -Blockly.VerticalFlyout.prototype.position=function(){if(this.isVisible()){var a=this.targetWorkspace_.getMetrics();a&&(this.height_=a.viewHeight,this.setBackgroundPath_(this.width_-this.CORNER_RADIUS,a.viewHeight-2*this.CORNER_RADIUS),this.positionAt_(this.width_,this.height_,this.targetWorkspace_.toolboxPosition==this.toolboxPosition_?a.toolboxWidth?this.toolboxPosition_==Blockly.TOOLBOX_AT_LEFT?a.toolboxWidth:a.viewWidth-this.width_:this.toolboxPosition_==Blockly.TOOLBOX_AT_LEFT?0:a.viewWidth:this.toolboxPosition_== -Blockly.TOOLBOX_AT_LEFT?0:a.viewWidth+a.absoluteLeft-this.width_,0))}}; -Blockly.VerticalFlyout.prototype.setBackgroundPath_=function(a,b){var c=this.toolboxPosition_==Blockly.TOOLBOX_AT_RIGHT,d=a+this.CORNER_RADIUS;d=["M "+(c?d:0)+",0"];d.push("h",c?-a:a);d.push("a",this.CORNER_RADIUS,this.CORNER_RADIUS,0,0,c?0:1,c?-this.CORNER_RADIUS:this.CORNER_RADIUS,this.CORNER_RADIUS);d.push("v",Math.max(0,b));d.push("a",this.CORNER_RADIUS,this.CORNER_RADIUS,0,0,c?0:1,c?this.CORNER_RADIUS:-this.CORNER_RADIUS,this.CORNER_RADIUS);d.push("h",c?a:-a);d.push("z");this.svgBackground_.setAttribute("d", -d.join(" "))};Blockly.VerticalFlyout.prototype.scrollToStart=function(){this.scrollbar_.set(0)};Blockly.VerticalFlyout.prototype.wheel_=function(a){var b=Blockly.utils.getScrollDeltaPixels(a);if(b.y){var c=this.getMetrics_();b=c.viewTop-c.contentTop+b.y;b=Math.min(b,c.contentHeight-c.viewHeight);b=Math.max(b,0);this.scrollbar_.set(b);Blockly.WidgetDiv.hide()}a.preventDefault();a.stopPropagation()}; -Blockly.VerticalFlyout.prototype.layout_=function(a,b){this.workspace_.scale=this.targetWorkspace_.scale;for(var c=this.MARGIN,d=this.RTL?c:c+this.tabWidth_,e=0,f;f=a[e];e++)if("block"==f.type){f=f.block;for(var g=f.getDescendants(!1),h=0,k;k=g[h];h++)k.isInFlyout=!0;f.render();g=f.getSvgRoot();h=f.getHeightWidth();k=f.outputConnection?d-this.tabWidth_:d;f.moveBy(k,c);k=this.createRect_(f,this.RTL?k-h.width:k,c,h,e);this.addBlockListeners_(g,f,k);c+=h.height+b[e]}else"button"==f.type&&(this.initFlyoutButton_(f.button, -d,c),c+=f.button.height+b[e])};Blockly.VerticalFlyout.prototype.isDragTowardWorkspace=function(a){a=Math.atan2(a.y,a.x)/Math.PI*180;var b=this.dragAngleRange_;return a-b||a<-180+b||a>180-b?!0:!1}; -Blockly.VerticalFlyout.prototype.getClientRect=function(){if(!this.svgGroup_)return null;var a=this.svgGroup_.getBoundingClientRect(),b=a.left;if(this.toolboxPosition_==Blockly.TOOLBOX_AT_LEFT)return new Blockly.utils.Rect(-1E9,1E9,-1E9,b+a.width);Blockly.utils.userAgent.GECKO&&this.targetWorkspace_&&this.targetWorkspace_.isMutator&&(a=this.targetWorkspace_.svgGroup_.getBoundingClientRect().x,10>Math.abs(a-b)&&(b+=this.leftEdge_*this.targetWorkspace_.options.parentWorkspace.scale));return new Blockly.utils.Rect(-1E9, -1E9,b,1E9)}; -Blockly.VerticalFlyout.prototype.reflowInternal_=function(){this.workspace_.scale=this.targetWorkspace_.scale;for(var a=0,b=this.workspace_.getTopBlocks(!1),c=0,d;d=b[c];c++){var e=d.getHeightWidth().width;d.outputConnection&&(e-=this.tabWidth_);a=Math.max(a,e)}for(c=0;d=this.buttons_[c];c++)a=Math.max(a,d.width);a+=1.5*this.MARGIN+this.tabWidth_;a*=this.workspace_.scale;a+=Blockly.Scrollbar.scrollbarThickness;if(this.width_!=a){for(c=0;d=b[c];c++){if(this.RTL){e=d.getRelativeToSurfaceXY().x;var f= -a/this.workspace_.scale-this.MARGIN;d.outputConnection||(f-=this.tabWidth_);d.moveBy(f-e,0)}d.flyoutRect_&&this.moveRectToBlock_(d.flyoutRect_,d)}if(this.RTL)for(c=0;d=this.buttons_[c];c++)b=d.getPosition().y,d.moveTo(a/this.workspace_.scale-d.width-this.MARGIN-this.tabWidth_,b);this.width_=a;this.position()}};Blockly.Generator=function(a){this.name_=a;this.FUNCTION_NAME_PLACEHOLDER_REGEXP_=new RegExp(this.FUNCTION_NAME_PLACEHOLDER_,"g")};Blockly.Generator.NAME_TYPE="generated_function";Blockly.Generator.prototype.INFINITE_LOOP_TRAP=null;Blockly.Generator.prototype.STATEMENT_PREFIX=null;Blockly.Generator.prototype.STATEMENT_SUFFIX=null;Blockly.Generator.prototype.INDENT=" ";Blockly.Generator.prototype.COMMENT_WRAP=60;Blockly.Generator.prototype.ORDER_OVERRIDES=[]; -Blockly.Generator.prototype.workspaceToCode=function(a){a||(console.warn("No workspace specified in workspaceToCode call. Guessing."),a=Blockly.getMainWorkspace());var b=[];this.init(a);a=a.getTopBlocks(!0);for(var c=0,d;d=a[c];c++){var e=this.blockToCode(d);Array.isArray(e)&&(e=e[0]);e&&(d.outputConnection&&(e=this.scrubNakedValue(e),this.STATEMENT_PREFIX&&!d.suppressPrefixSuffix&&(e=this.injectId(this.STATEMENT_PREFIX,d)+e),this.STATEMENT_SUFFIX&&!d.suppressPrefixSuffix&&(e+=this.injectId(this.STATEMENT_SUFFIX, -d))),b.push(e))}b=b.join("\n");b=this.finish(b);b=b.replace(/^\s+\n/,"");b=b.replace(/\n\s+$/,"\n");return b=b.replace(/[ \t]+\n/g,"\n")};Blockly.Generator.prototype.prefixLines=function(a,b){return b+a.replace(/(?!\n$)\n/g,"\n"+b)};Blockly.Generator.prototype.allNestedComments=function(a){var b=[];a=a.getDescendants(!0);for(var c=0;ca||Math.abs(this.workspaceHeight_-b)>a)this.workspaceWidth_=c,this.workspaceHeight_=b,this.bubble_.setBubbleSize(c+a,b+a),this.svgDialog_.setAttribute("width",this.workspaceWidth_), -this.svgDialog_.setAttribute("height",this.workspaceHeight_);this.block_.RTL&&(a="translate("+this.workspaceWidth_+",0)",this.workspace_.getCanvas().setAttribute("transform",a));this.workspace_.resize()}; -Blockly.Mutator.prototype.setVisible=function(a){if(a!=this.isVisible())if(Blockly.Events.fire(new Blockly.Events.Ui(this.block_,"mutatorOpen",!a,a)),a){this.bubble_=new Blockly.Bubble(this.block_.workspace,this.createEditor_(),this.block_.svgPath_,this.iconXY_,null,null);this.bubble_.setSvgId(this.block_.id);if(a=this.workspace_.options.languageTree)this.workspace_.flyout_.init(this.workspace_),this.workspace_.flyout_.show(a.childNodes);this.rootBlock_=this.block_.decompose(this.workspace_);a=this.rootBlock_.getDescendants(!1); -for(var b=0,c;c=a[b];b++)c.render();this.rootBlock_.setMovable(!1);this.rootBlock_.setDeletable(!1);this.workspace_.flyout_?(a=2*this.workspace_.flyout_.CORNER_RADIUS,b=this.workspace_.getFlyout().getWidth()+a):b=a=16;this.block_.RTL&&(b=-b);this.rootBlock_.moveBy(b,a);if(this.block_.saveConnections){var d=this;this.block_.saveConnections(this.rootBlock_);this.sourceListener_=function(){d.block_.saveConnections(d.rootBlock_)};this.block_.workspace.addChangeListener(this.sourceListener_)}this.resizeBubble_(); -this.workspace_.addChangeListener(this.workspaceChanged_.bind(this));this.updateColour()}else this.svgDialog_=null,this.workspace_.dispose(),this.rootBlock_=this.workspace_=null,this.bubble_.dispose(),this.bubble_=null,this.workspaceHeight_=this.workspaceWidth_=0,this.sourceListener_&&(this.block_.workspace.removeChangeListener(this.sourceListener_),this.sourceListener_=null)}; -Blockly.Mutator.prototype.workspaceChanged_=function(a){if(a.type!=Blockly.Events.UI&&(a.type!=Blockly.Events.CHANGE||"disabled"!=a.element)){if(!this.workspace_.isDragging()){a=this.workspace_.getTopBlocks(!1);for(var b=0,c;c=a[b];b++){var d=c.getRelativeToSurfaceXY(),e=c.getHeightWidth();20>d.y+e.height&&c.moveBy(0,20-e.height-d.y)}}if(this.rootBlock_.workspace==this.workspace_){Blockly.Events.setGroup(!0);c=this.block_;a=(a=c.mutationToDom())&&Blockly.Xml.domToText(a);b=c.rendered;c.rendered=!1; -c.compose(this.rootBlock_);c.rendered=b;c.initSvg();b=(b=c.mutationToDom())&&Blockly.Xml.domToText(b);if(a!=b){Blockly.Events.fire(new Blockly.Events.BlockChange(c,"mutation",null,a,b));var f=Blockly.Events.getGroup();setTimeout(function(){Blockly.Events.setGroup(f);c.bumpNeighbours();Blockly.Events.setGroup(!1)},Blockly.BUMP_DELAY)}c.rendered&&c.render();a!=b&&Blockly.keyboardAccessibilityMode&&Blockly.navigation.moveCursorOnBlockMutation(c);this.workspace_.isDragging()||this.resizeBubble_();Blockly.Events.setGroup(!1)}}}; -Blockly.Mutator.prototype.getFlyoutMetrics_=function(){return{viewHeight:this.workspaceHeight_,viewWidth:this.workspaceWidth_-this.workspace_.getFlyout().getWidth(),absoluteTop:0,absoluteLeft:this.workspace_.RTL?0:this.workspace_.getFlyout().getWidth()}};Blockly.Mutator.prototype.dispose=function(){this.block_.mutator=null;Blockly.Icon.prototype.dispose.call(this)}; -Blockly.Mutator.prototype.updateBlockStyle=function(){var a=this.workspace_;if(a&&a.getAllBlocks()){for(var b=a.getAllBlocks(),c=0;cthis.highlightOffset_&&(this.steps_+=Blockly.utils.svgPaths.lineOnAxis("V",a.yPos+a.height-this.highlightOffset_)))}; -Blockly.geras.Highlighter.prototype.drawBottomRow=function(a){if(this.RTL_)this.steps_+=Blockly.utils.svgPaths.lineOnAxis("V",a.baseline-this.highlightOffset_);else{var b=this.info_.bottomRow.elements[0];Blockly.blockRendering.Types.isLeftSquareCorner(b)?this.steps_+=Blockly.utils.svgPaths.moveTo(a.xPos+this.highlightOffset_,a.baseline-this.highlightOffset_):Blockly.blockRendering.Types.isLeftRoundedCorner(b)&&(this.steps_+=Blockly.utils.svgPaths.moveTo(a.xPos,a.baseline),this.steps_+=this.outsideCornerPaths_.bottomLeft())}}; -Blockly.geras.Highlighter.prototype.drawLeft=function(){var a=this.info_.outputConnection;a&&(a=a.connectionOffsetY+a.height,this.RTL_?this.steps_+=Blockly.utils.svgPaths.moveTo(this.info_.startX,a):(this.steps_+=Blockly.utils.svgPaths.moveTo(this.info_.startX+this.highlightOffset_,this.info_.bottomRow.baseline-this.highlightOffset_),this.steps_+=Blockly.utils.svgPaths.lineOnAxis("V",a)),this.steps_+=this.puzzleTabPaths_.pathUp(this.RTL_));this.RTL_||(a=this.info_.topRow,Blockly.blockRendering.Types.isLeftRoundedCorner(a.elements[0])? -this.steps_+=Blockly.utils.svgPaths.lineOnAxis("V",this.outsideCornerPaths_.height):this.steps_+=Blockly.utils.svgPaths.lineOnAxis("V",a.capline+this.highlightOffset_))}; -Blockly.geras.Highlighter.prototype.drawInlineInput=function(a){var b=this.highlightOffset_,c=a.xPos+a.connectionWidth,d=a.centerline-a.height/2,e=a.width-a.connectionWidth,f=d+b;this.RTL_?(d=a.connectionOffsetY-b,a=a.height-(a.connectionOffsetY+a.connectionHeight)+b,this.inlineSteps_+=Blockly.utils.svgPaths.moveTo(c-b,f)+Blockly.utils.svgPaths.lineOnAxis("v",d)+this.puzzleTabPaths_.pathDown(this.RTL_)+Blockly.utils.svgPaths.lineOnAxis("v",a)+Blockly.utils.svgPaths.lineOnAxis("h",e)):this.inlineSteps_+= -Blockly.utils.svgPaths.moveTo(a.xPos+a.width+b,f)+Blockly.utils.svgPaths.lineOnAxis("v",a.height)+Blockly.utils.svgPaths.lineOnAxis("h",-e)+Blockly.utils.svgPaths.moveTo(c,d+a.connectionOffsetY)+this.puzzleTabPaths_.pathDown(this.RTL_)};Blockly.geras.PathObject=function(a){this.svgRoot=a;this.svgPathDark=Blockly.utils.dom.createSvgElement("path",{"class":"blocklyPathDark",transform:"translate(1,1)"},this.svgRoot);this.svgPath=Blockly.utils.dom.createSvgElement("path",{"class":"blocklyPath"},this.svgRoot);this.svgPathLight=Blockly.utils.dom.createSvgElement("path",{"class":"blocklyPathLight"},this.svgRoot)}; -Blockly.geras.PathObject.prototype.setPaths=function(a,b){this.svgPath.setAttribute("d",a);this.svgPathDark.setAttribute("d",a);this.svgPathLight.setAttribute("d",b)};Blockly.geras.PathObject.prototype.flipRTL=function(){this.svgPath.setAttribute("transform","scale(-1 1)");this.svgPathLight.setAttribute("transform","scale(-1 1)");this.svgPathDark.setAttribute("transform","translate(1,1) scale(-1 1)")};Blockly.geras.InlineInput=function(a,b){Blockly.geras.InlineInput.superClass_.constructor.call(this,a,b);this.connectedBlock&&(this.width+=this.constants_.DARK_PATH_OFFSET,this.height+=this.constants_.DARK_PATH_OFFSET)};Blockly.utils.object.inherits(Blockly.geras.InlineInput,Blockly.blockRendering.InlineInput);Blockly.geras.StatementInput=function(a,b){Blockly.geras.StatementInput.superClass_.constructor.call(this,a,b);this.connectedBlock&&(this.height+=this.constants_.DARK_PATH_OFFSET)}; -Blockly.utils.object.inherits(Blockly.geras.StatementInput,Blockly.blockRendering.StatementInput);Blockly.geras.RenderInfo=function(a,b){Blockly.geras.RenderInfo.superClass_.constructor.call(this,a,b)};Blockly.utils.object.inherits(Blockly.geras.RenderInfo,Blockly.blockRendering.RenderInfo);Blockly.geras.RenderInfo.prototype.getRenderer=function(){return this.renderer_}; -Blockly.geras.RenderInfo.prototype.addInput_=function(a,b){this.isInline&&a.type==Blockly.INPUT_VALUE?(b.elements.push(new Blockly.geras.InlineInput(this.constants_,a)),b.hasInlineInput=!0):a.type==Blockly.NEXT_STATEMENT?(b.elements.push(new Blockly.geras.StatementInput(this.constants_,a)),b.hasStatement=!0):a.type==Blockly.INPUT_VALUE?(b.elements.push(new Blockly.blockRendering.ExternalValueInput(this.constants_,a)),b.hasExternalInput=!0):a.type==Blockly.DUMMY_INPUT&&(b.minHeight=Math.max(b.minHeight, -this.constants_.DUMMY_INPUT_MIN_HEIGHT),b.hasDummyInput=!0);b.align=a.align}; -Blockly.geras.RenderInfo.prototype.addElemSpacing_=function(){for(var a=!1,b=0,c;c=this.rows[b];b++)c.hasExternalInput&&(a=!0);for(b=0;c=this.rows[b];b++){var d=c.elements;c.elements=[];c.startsWithElemSpacer()&&c.elements.push(new Blockly.blockRendering.InRowSpacer(this.constants_,this.getInRowSpacing_(null,d[0])));for(var e=0;e>>/handdelete.cur"), auto;',"}",".blocklyToolboxGrab {",'cursor: url("<<>>/handclosed.cur"), auto;',"cursor: grabbing;","cursor: -webkit-grabbing;","}",".blocklyToolboxDiv {","background-color: #ddd;","overflow-x: visible;","overflow-y: auto;","position: absolute;","z-index: 70;","-webkit-tap-highlight-color: transparent;","}",".blocklyTreeRoot {","padding: 4px 0;","}",".blocklyTreeRoot:focus {","outline: none;","}",".blocklyTreeRow {", -"height: 22px;","line-height: 22px;","margin-bottom: 3px;","padding-right: 8px;","white-space: nowrap;","}",".blocklyHorizontalTree {","float: left;","margin: 1px 5px 8px 0;","}",".blocklyHorizontalTreeRtl {","float: right;","margin: 1px 0 8px 5px;","}",'.blocklyToolboxDiv[dir="RTL"] .blocklyTreeRow {',"margin-left: 8px;","}",".blocklyTreeRow:not(.blocklyTreeSelected):hover {","background-color: #e4e4e4;","}",".blocklyTreeSeparator {","border-bottom: solid #e5e5e5 1px;","height: 0;","margin: 5px 0;", -"}",".blocklyTreeSeparatorHorizontal {","border-right: solid #e5e5e5 1px;","width: 0;","padding: 5px 0;","margin: 0 5px;","}",".blocklyTreeIcon {","background-image: url(<<>>/sprites.png);","height: 16px;","vertical-align: middle;","width: 16px;","}",".blocklyTreeIconClosedLtr {","background-position: -32px -1px;","}",".blocklyTreeIconClosedRtl {","background-position: 0 -1px;","}",".blocklyTreeIconOpen {","background-position: -16px -1px;","}",".blocklyTreeSelected>.blocklyTreeIconClosedLtr {", -"background-position: -32px -17px;","}",".blocklyTreeSelected>.blocklyTreeIconClosedRtl {","background-position: 0 -17px;","}",".blocklyTreeSelected>.blocklyTreeIconOpen {","background-position: -16px -17px;","}",".blocklyTreeIconNone,",".blocklyTreeSelected>.blocklyTreeIconNone {","background-position: -48px -1px;","}",".blocklyTreeLabel {","cursor: default;","font-family: sans-serif;","font-size: 16px;","padding: 0 3px;","vertical-align: middle;","}",".blocklyToolboxDelete .blocklyTreeLabel {", -'cursor: url("<<>>/handdelete.cur"), auto;',"}",".blocklyTreeSelected .blocklyTreeLabel {","color: #fff;","}"]);Blockly.Trashcan=function(a){this.workspace_=a;this.contents_=[];if(!(0>=this.workspace_.options.maxTrashcanContents)){a={scrollbars:!0,disabledPatternId:this.workspace_.options.disabledPatternId,parentWorkspace:this.workspace_,RTL:this.workspace_.RTL,oneBasedIndex:this.workspace_.options.oneBasedIndex,renderer:this.workspace_.options.renderer};if(this.workspace_.horizontalLayout){a.toolboxPosition=this.workspace_.toolboxPosition==Blockly.TOOLBOX_AT_TOP?Blockly.TOOLBOX_AT_BOTTOM:Blockly.TOOLBOX_AT_TOP; -if(!Blockly.HorizontalFlyout)throw Error("Missing require for Blockly.HorizontalFlyout");this.flyout_=new Blockly.HorizontalFlyout(a)}else{a.toolboxPosition=this.workspace_.toolboxPosition==Blockly.TOOLBOX_AT_RIGHT?Blockly.TOOLBOX_AT_LEFT:Blockly.TOOLBOX_AT_RIGHT;if(!Blockly.VerticalFlyout)throw Error("Missing require for Blockly.VerticalFlyout");this.flyout_=new Blockly.VerticalFlyout(a)}this.workspace_.addChangeListener(this.onDelete_.bind(this))}};Blockly.Trashcan.prototype.WIDTH_=47; -Blockly.Trashcan.prototype.BODY_HEIGHT_=44;Blockly.Trashcan.prototype.LID_HEIGHT_=16;Blockly.Trashcan.prototype.MARGIN_BOTTOM_=20;Blockly.Trashcan.prototype.MARGIN_SIDE_=20;Blockly.Trashcan.prototype.MARGIN_HOTSPOT_=10;Blockly.Trashcan.prototype.SPRITE_LEFT_=0;Blockly.Trashcan.prototype.SPRITE_TOP_=32;Blockly.Trashcan.prototype.HAS_BLOCKS_LID_ANGLE=.1;Blockly.Trashcan.prototype.isOpen=!1;Blockly.Trashcan.prototype.minOpenness_=0;Blockly.Trashcan.prototype.svgGroup_=null; -Blockly.Trashcan.prototype.svgLid_=null;Blockly.Trashcan.prototype.lidTask_=0;Blockly.Trashcan.prototype.lidOpen_=0;Blockly.Trashcan.prototype.left_=0;Blockly.Trashcan.prototype.top_=0; -Blockly.Trashcan.prototype.createDom=function(){this.svgGroup_=Blockly.utils.dom.createSvgElement("g",{"class":"blocklyTrash"},null);var a=String(Math.random()).substring(2);var b=Blockly.utils.dom.createSvgElement("clipPath",{id:"blocklyTrashBodyClipPath"+a},this.svgGroup_);Blockly.utils.dom.createSvgElement("rect",{width:this.WIDTH_,height:this.BODY_HEIGHT_,y:this.LID_HEIGHT_},b);var c=Blockly.utils.dom.createSvgElement("image",{width:Blockly.SPRITE.width,x:-this.SPRITE_LEFT_,height:Blockly.SPRITE.height, -y:-this.SPRITE_TOP_,"clip-path":"url(#blocklyTrashBodyClipPath"+a+")"},this.svgGroup_);c.setAttributeNS(Blockly.utils.dom.XLINK_NS,"xlink:href",this.workspace_.options.pathToMedia+Blockly.SPRITE.url);b=Blockly.utils.dom.createSvgElement("clipPath",{id:"blocklyTrashLidClipPath"+a},this.svgGroup_);Blockly.utils.dom.createSvgElement("rect",{width:this.WIDTH_,height:this.LID_HEIGHT_},b);this.svgLid_=Blockly.utils.dom.createSvgElement("image",{width:Blockly.SPRITE.width,x:-this.SPRITE_LEFT_,height:Blockly.SPRITE.height, -y:-this.SPRITE_TOP_,"clip-path":"url(#blocklyTrashLidClipPath"+a+")"},this.svgGroup_);this.svgLid_.setAttributeNS(Blockly.utils.dom.XLINK_NS,"xlink:href",this.workspace_.options.pathToMedia+Blockly.SPRITE.url);Blockly.bindEventWithChecks_(this.svgGroup_,"mouseup",this,this.click);Blockly.bindEvent_(c,"mouseover",this,this.mouseOver_);Blockly.bindEvent_(c,"mouseout",this,this.mouseOut_);this.animateLid_();return this.svgGroup_}; -Blockly.Trashcan.prototype.init=function(a){0this.minOpenness_&&1>this.lidOpen_&&(this.lidTask_=setTimeout(this.animateLid_.bind(this),20))}; -Blockly.Trashcan.prototype.setLidAngle_=function(a){var b=this.workspace_.toolboxPosition==Blockly.TOOLBOX_AT_RIGHT||this.workspace_.horizontalLayout&&this.workspace_.RTL;this.svgLid_.setAttribute("transform","rotate("+(b?-a:a)+","+(b?4:this.WIDTH_-4)+","+(this.LID_HEIGHT_-2)+")")};Blockly.Trashcan.prototype.close=function(){this.setOpen_(!1)};Blockly.Trashcan.prototype.click=function(){if(this.contents_.length){for(var a=[],b=0,c;c=this.contents_[b];b++)a[b]=Blockly.Xml.textToDom(c);this.flyout_.show(a)}}; -Blockly.Trashcan.prototype.mouseOver_=function(){this.contents_.length&&this.setOpen_(!0)};Blockly.Trashcan.prototype.mouseOut_=function(){this.setOpen_(!1)}; -Blockly.Trashcan.prototype.onDelete_=function(a){if(!(0>=this.workspace_.options.maxTrashcanContents)&&a.type==Blockly.Events.BLOCK_DELETE&&"shadow"!=a.oldXml.tagName.toLowerCase()&&(a=this.cleanBlockXML_(a.oldXml),-1==this.contents_.indexOf(a))){for(this.contents_.unshift(a);this.contents_.length>this.workspace_.options.maxTrashcanContents;)this.contents_.pop();this.minOpenness_=this.HAS_BLOCKS_LID_ANGLE;this.setLidAngle_(45*this.minOpenness_)}}; -Blockly.Trashcan.prototype.cleanBlockXML_=function(a){for(var b=a=a.cloneNode(!0);b;){b.removeAttribute&&(b.removeAttribute("x"),b.removeAttribute("y"),b.removeAttribute("id"));var c=b.firstChild||b.nextSibling;if(!c)for(c=b.parentNode;c;){if(c.nextSibling){c=c.nextSibling;break}c=c.parentNode}b=c}return Blockly.Xml.domToText(a)};Blockly.VariablesDynamic={};Blockly.VariablesDynamic.onCreateVariableButtonClick_String=function(a){Blockly.Variables.createVariableButtonHandler(a.getTargetWorkspace(),null,"String")};Blockly.VariablesDynamic.onCreateVariableButtonClick_Number=function(a){Blockly.Variables.createVariableButtonHandler(a.getTargetWorkspace(),null,"Number")};Blockly.VariablesDynamic.onCreateVariableButtonClick_Colour=function(a){Blockly.Variables.createVariableButtonHandler(a.getTargetWorkspace(),null,"Colour")}; -Blockly.VariablesDynamic.flyoutCategory=function(a){var b=[],c=document.createElement("button");c.setAttribute("text",Blockly.Msg.NEW_STRING_VARIABLE);c.setAttribute("callbackKey","CREATE_VARIABLE_STRING");b.push(c);c=document.createElement("button");c.setAttribute("text",Blockly.Msg.NEW_NUMBER_VARIABLE);c.setAttribute("callbackKey","CREATE_VARIABLE_NUMBER");b.push(c);c=document.createElement("button");c.setAttribute("text",Blockly.Msg.NEW_COLOUR_VARIABLE);c.setAttribute("callbackKey","CREATE_VARIABLE_COLOUR"); -b.push(c);a.registerButtonCallback("CREATE_VARIABLE_STRING",Blockly.VariablesDynamic.onCreateVariableButtonClick_String);a.registerButtonCallback("CREATE_VARIABLE_NUMBER",Blockly.VariablesDynamic.onCreateVariableButtonClick_Number);a.registerButtonCallback("CREATE_VARIABLE_COLOUR",Blockly.VariablesDynamic.onCreateVariableButtonClick_Colour);a=Blockly.VariablesDynamic.flyoutCategoryBlocks(a);return b=b.concat(a)}; -Blockly.VariablesDynamic.flyoutCategoryBlocks=function(a){a=a.getAllVariables();var b=[];if(0image, .blocklyZoom>svg>image {","opacity: .4;","}",".blocklyZoom>image:hover, .blocklyZoom>svg>image:hover {","opacity: .6;","}",".blocklyZoom>image:active, .blocklyZoom>svg>image:active {","opacity: .8;","}"]);Blockly.Themes.Dark={}; -Blockly.Themes.Dark.defaultBlockStyles={colour_blocks:{colourPrimary:"#a5745b",colourSecondary:"#dbc7bd",colourTertiary:"#845d49"},list_blocks:{colourPrimary:"#745ba5",colourSecondary:"#c7bddb",colourTertiary:"#5d4984"},logic_blocks:{colourPrimary:"#5b80a5",colourSecondary:"#bdccdb",colourTertiary:"#496684"},loop_blocks:{colourPrimary:"#5ba55b",colourSecondary:"#bddbbd",colourTertiary:"#498449"},math_blocks:{colourPrimary:"#5b67a5",colourSecondary:"#bdc2db",colourTertiary:"#495284"},procedure_blocks:{colourPrimary:"#995ba5", -colourSecondary:"#d6bddb",colourTertiary:"#7a4984"},text_blocks:{colourPrimary:"#5ba58c",colourSecondary:"#bddbd1",colourTertiary:"#498470"},variable_blocks:{colourPrimary:"#a55b99",colourSecondary:"#dbbdd6",colourTertiary:"#84497a"},variable_dynamic_blocks:{colourPrimary:"#a55b99",colourSecondary:"#dbbdd6",colourTertiary:"#84497a"},hat_blocks:{colourPrimary:"#a55b99",colourSecondary:"#dbbdd6",colourTertiary:"#84497a",hat:"cap"}}; -Blockly.Themes.Dark.categoryStyles={colour_category:{colour:"#a5745b"},list_category:{colour:"#745ba5"},logic_category:{colour:"#5b80a5"},loop_category:{colour:"#5ba55b"},math_category:{colour:"#5b67a5"},procedure_category:{colour:"#995ba5"},text_category:{colour:"#5ba58c"},variable_category:{colour:"#a55b99"},variable_dynamic_category:{colour:"#a55b99"}};Blockly.Themes.Dark=new Blockly.Theme(Blockly.Themes.Dark.defaultBlockStyles,Blockly.Themes.Dark.categoryStyles); -Blockly.Themes.Dark.setComponentStyle("workspace","#1e1e1e");Blockly.Themes.Dark.setComponentStyle("toolbox","#333");Blockly.Themes.Dark.setComponentStyle("toolboxText","#fff");Blockly.Themes.Dark.setComponentStyle("flyout","#252526");Blockly.Themes.Dark.setComponentStyle("flyoutText","#ccc");Blockly.Themes.Dark.setComponentStyle("flyoutOpacity",1);Blockly.Themes.Dark.setComponentStyle("scrollbar","#797979");Blockly.Themes.Dark.setComponentStyle("scrollbarOpacity",.4);Blockly.Themes.HighContrast={}; -Blockly.Themes.HighContrast.defaultBlockStyles={colour_blocks:{colourPrimary:"#a52714",colourSecondary:"#FB9B8C",colourTertiary:"#FBE1DD"},list_blocks:{colourPrimary:"#4a148c",colourSecondary:"#AD7BE9",colourTertiary:"#CDB6E9"},logic_blocks:{colourPrimary:"#01579b",colourSecondary:"#64C7FF",colourTertiary:"#C5EAFF"},loop_blocks:{colourPrimary:"#33691e",colourSecondary:"#9AFF78",colourTertiary:"#E1FFD7"},math_blocks:{colourPrimary:"#1a237e",colourSecondary:"#8A9EFF",colourTertiary:"#DCE2FF"},procedure_blocks:{colourPrimary:"#006064", -colourSecondary:"#77E6EE",colourTertiary:"#CFECEE"},text_blocks:{colourPrimary:"#004d40",colourSecondary:"#5ae27c",colourTertiary:"#D2FFDD"},variable_blocks:{colourPrimary:"#880e4f",colourSecondary:"#FF73BE",colourTertiary:"#FFD4EB"},variable_dynamic_blocks:{colourPrimary:"#880e4f",colourSecondary:"#FF73BE",colourTertiary:"#FFD4EB"},hat_blocks:{colourPrimary:"#880e4f",colourSecondary:"#FF73BE",colourTertiary:"#FFD4EB",hat:"cap"}}; -Blockly.Themes.HighContrast.categoryStyles={colour_category:{colour:"#a52714"},list_category:{colour:"#4a148c"},logic_category:{colour:"#01579b"},loop_category:{colour:"#33691e"},math_category:{colour:"#1a237e"},procedure_category:{colour:"#006064"},text_category:{colour:"#004d40"},variable_category:{colour:"#880e4f"},variable_dynamic_category:{colour:"#880e4f"}};Blockly.Themes.HighContrast=new Blockly.Theme(Blockly.Themes.HighContrast.defaultBlockStyles,Blockly.Themes.HighContrast.categoryStyles);Blockly.Themes.Modern={}; -Blockly.Themes.Modern.defaultBlockStyles={colour_blocks:{colourPrimary:"#a5745b",colourSecondary:"#dbc7bd",colourTertiary:"#845d49"},list_blocks:{colourPrimary:"#745ba5",colourSecondary:"#c7bddb",colourTertiary:"#5d4984"},logic_blocks:{colourPrimary:"#5b80a5",colourSecondary:"#bdccdb",colourTertiary:"#496684"},loop_blocks:{colourPrimary:"#5ba55b",colourSecondary:"#bddbbd",colourTertiary:"#498449"},math_blocks:{colourPrimary:"#5b67a5",colourSecondary:"#bdc2db",colourTertiary:"#495284"},procedure_blocks:{colourPrimary:"#995ba5", -colourSecondary:"#d6bddb",colourTertiary:"#7a4984"},text_blocks:{colourPrimary:"#5ba58c",colourSecondary:"#bddbd1",colourTertiary:"#498470"},variable_blocks:{colourPrimary:"#a55b99",colourSecondary:"#dbbdd6",colourTertiary:"#84497a"},variable_dynamic_blocks:{colourPrimary:"#a55b99",colourSecondary:"#dbbdd6",colourTertiary:"#84497a"},hat_blocks:{colourPrimary:"#a55b99",colourSecondary:"#dbbdd6",colourTertiary:"#84497a",hat:"cap"}}; -Blockly.Themes.Modern.categoryStyles={colour_category:{colour:"#a5745b"},list_category:{colour:"#745ba5"},logic_category:{colour:"#5b80a5"},loop_category:{colour:"#5ba55b"},math_category:{colour:"#5b67a5"},procedure_category:{colour:"#995ba5"},text_category:{colour:"#5ba58c"},variable_category:{colour:"#a55b99"},variable_dynamic_category:{colour:"#a55b99"}};Blockly.Themes.Modern=new Blockly.Theme(Blockly.Themes.Modern.defaultBlockStyles,Blockly.Themes.Modern.categoryStyles);Blockly.requires={}; \ No newline at end of file +$.register$$module$build$src$core$extensions=function(a,b){if("string"!==typeof a||""===a.trim())throw Error('Error: Invalid extension name "'+a+'"');if(allExtensions$$module$build$src$core$extensions[a])throw Error('Error: Extension "'+a+'" is already registered.');if("function"!==typeof b)throw Error('Error: Extension "'+a+'" must be a function');allExtensions$$module$build$src$core$extensions[a]=b}; +$.registerMixin$$module$build$src$core$extensions=function(a,b){if(!b||"object"!==typeof b)throw Error('Error: Mixin "'+a+'" must be a object');$.register$$module$build$src$core$extensions(a,function(){this.mixin(b)})}; +$.registerMutator$$module$build$src$core$extensions=function(a,b,c,d){const e='Error when registering mutator "'+a+'": ';checkHasMutatorProperties$$module$build$src$core$extensions(e,b);const f=checkMutatorDialog$$module$build$src$core$extensions(b,e);if(c&&"function"!==typeof c)throw Error(e+'Extension "'+a+'" is not a function');$.register$$module$build$src$core$extensions(a,function(){f&&this.setMutator(new $.MutatorIcon$$module$build$src$core$icons$mutator_icon(d||[],this));this.mixin(b);c&&c.apply(this)})}; +unregister$$module$build$src$core$extensions=function(a){isRegistered$$module$build$src$core$extensions(a)?delete allExtensions$$module$build$src$core$extensions[a]:console.warn('No extension mapping for name "'+a+'" found to unregister')};isRegistered$$module$build$src$core$extensions=function(a){return!!allExtensions$$module$build$src$core$extensions[a]}; +apply$$module$build$src$core$extensions=function(a,b,c){const d=allExtensions$$module$build$src$core$extensions[a];if("function"!==typeof d)throw Error('Error: Extension "'+a+'" not found.');let e;c?checkNoMutatorProperties$$module$build$src$core$extensions(a,b):e=getMutatorProperties$$module$build$src$core$extensions(b);d.apply(b);if(c)checkHasMutatorProperties$$module$build$src$core$extensions('Error after applying mutator "'+a+'": ',b);else if(!mutatorPropertiesMatch$$module$build$src$core$extensions(e, +b))throw Error('Error when applying extension "'+a+'": mutation properties changed when applying a non-mutator extension.');};checkNoMutatorProperties$$module$build$src$core$extensions=function(a,b){if(getMutatorProperties$$module$build$src$core$extensions(b).length)throw Error('Error: tried to apply mutation "'+a+'" to a block that already has mutator functions. Block id: '+b.id);}; +checkXmlHooks$$module$build$src$core$extensions=function(a,b){return checkHasFunctionPair$$module$build$src$core$extensions(a.mutationToDom,a.domToMutation,b+" mutationToDom/domToMutation")};checkJsonHooks$$module$build$src$core$extensions=function(a,b){return checkHasFunctionPair$$module$build$src$core$extensions(a.saveExtraState,a.loadExtraState,b+" saveExtraState/loadExtraState")}; +checkMutatorDialog$$module$build$src$core$extensions=function(a,b){return checkHasFunctionPair$$module$build$src$core$extensions(a.compose,a.decompose,b+" compose/decompose")};checkHasFunctionPair$$module$build$src$core$extensions=function(a,b,c){if(a&&b){if("function"!==typeof a||"function"!==typeof b)throw Error(c+" must be a function");return!0}if(!a&&!b)return!1;throw Error(c+"Must have both or neither functions");}; +checkHasMutatorProperties$$module$build$src$core$extensions=function(a,b){const c=checkXmlHooks$$module$build$src$core$extensions(b,a),d=checkJsonHooks$$module$build$src$core$extensions(b,a);if(!c&&!d)throw Error(a+"Mutations must contain either XML hooks, or JSON hooks, or both");checkMutatorDialog$$module$build$src$core$extensions(b,a)}; +getMutatorProperties$$module$build$src$core$extensions=function(a){const b=[];void 0!==a.domToMutation&&b.push(a.domToMutation);void 0!==a.mutationToDom&&b.push(a.mutationToDom);void 0!==a.saveExtraState&&b.push(a.saveExtraState);void 0!==a.loadExtraState&&b.push(a.loadExtraState);void 0!==a.compose&&b.push(a.compose);void 0!==a.decompose&&b.push(a.decompose);return b}; +mutatorPropertiesMatch$$module$build$src$core$extensions=function(a,b){b=getMutatorProperties$$module$build$src$core$extensions(b);if(b.length!==a.length)return!1;for(let c=0;c!d.getReturnTypes()).map(d=>[d.getName(),d.getParameters().map(e=>e.getName()),!1]);a.getBlocksByType("procedures_defnoreturn",!1).forEach(d=>{!isProcedureBlock$$module$build$src$core$interfaces$i_procedure_block(d)&&isLegacyProcedureDefBlock$$module$build$src$core$interfaces$i_legacy_procedure_blocks(d)&&b.push(d.getProcedureDef())});const c=a.getProcedureMap().getProcedures().filter(d=> +!!d.getReturnTypes()).map(d=>[d.getName(),d.getParameters().map(e=>e.getName()),!0]);a.getBlocksByType("procedures_defreturn",!1).forEach(d=>{!isProcedureBlock$$module$build$src$core$interfaces$i_procedure_block(d)&&isLegacyProcedureDefBlock$$module$build$src$core$interfaces$i_legacy_procedure_blocks(d)&&c.push(d.getProcedureDef())});b.sort(procTupleComparator$$module$build$src$core$procedures);c.sort(procTupleComparator$$module$build$src$core$procedures);return[b,c]}; +procTupleComparator$$module$build$src$core$procedures=function(a,b){return a[0].localeCompare(b[0],void 0,{sensitivity:"base"})};$.findLegalName$$module$build$src$core$procedures=function(a,b){if(b.isInFlyout)return a;for(a=a||$.Msg$$module$build$src$core$msg.UNNAMED_KEY||"unnamed";!isLegalName$$module$build$src$core$procedures(a,b.workspace,b);){const c=a.match(/^(.*?)(\d+)$/);a=c?c[1]+(parseInt(c[2])+1):a+"2"}return a}; +isLegalName$$module$build$src$core$procedures=function(a,b,c){return!isNameUsed$$module$build$src$core$procedures(a,b,c)}; +isNameUsed$$module$build$src$core$procedures=function(a,b,c){for(const d of b.getAllBlocks(!1))if(d!==c&&isLegacyProcedureDefBlock$$module$build$src$core$interfaces$i_legacy_procedure_blocks(d)&&$.Names$$module$build$src$core$names.equals(d.getProcedureDef()[0],a))return!0;c=c&&isProcedureBlock$$module$build$src$core$interfaces$i_procedure_block(c)?null==c?void 0:c.getProcedureModel():void 0;for(const d of b.getProcedureMap().getProcedures())if(d!==c&&$.Names$$module$build$src$core$names.equals(d.getName(), +a))return!0;return!1}; +$.rename$$module$build$src$core$procedures=function(a){var b=this.getSourceBlock();if(!b)throw new UnattachedFieldError$$module$build$src$core$field;a=a.trim();const c=$.findLegalName$$module$build$src$core$procedures(a,b);isProcedureBlock$$module$build$src$core$interfaces$i_procedure_block(b)&&!b.isInsertionMarker()&&b.getProcedureModel().setName(c);const d=this.getValue();if(d!==a&&d!==c)for(a=b.workspace.getAllBlocks(!1),b=0;bblockIsModernCallerFor$$module$build$src$core$procedures(c,a)||isLegacyProcedureCallBlock$$module$build$src$core$interfaces$i_legacy_procedure_blocks(c)&&$.Names$$module$build$src$core$names.equals(c.getProcedureCall(),a))}; +blockIsModernCallerFor$$module$build$src$core$procedures=function(a,b){return isProcedureBlock$$module$build$src$core$interfaces$i_procedure_block(a)&&!a.isProcedureDef()&&a.getProcedureModel()&&$.Names$$module$build$src$core$names.equals(a.getProcedureModel().getName(),b)}; +$.mutateCallers$$module$build$src$core$procedures=function(a){const b=getRecordUndo$$module$build$src$core$events$utils();var c=a.getProcedureDef()[0];const d=a.mutationToDom(!0);a=getCallers$$module$build$src$core$procedures(c,a.workspace);for(let f=0,g;g=a[f];f++){c=(c=g.mutationToDom())&&domToText$$module$build$src$core$utils$xml(c);g.domToMutation&&g.domToMutation(d);var e=g.mutationToDom();e=e&&domToText$$module$build$src$core$utils$xml(e);c!==e&&(setRecordUndo$$module$build$src$core$events$utils(!1), +fire$$module$build$src$core$events$utils(new (get$$module$build$src$core$events$utils($.CHANGE$$module$build$src$core$events$utils))(g,"mutation",null,c,e)),setRecordUndo$$module$build$src$core$events$utils(b))}}; +$.getDefinition$$module$build$src$core$procedures=function(a,b){for(const c of b.getAllBlocks(!1))if(isProcedureBlock$$module$build$src$core$interfaces$i_procedure_block(c)&&c.isProcedureDef()&&$.Names$$module$build$src$core$names.equals(c.getProcedureModel().getName(),a)||isLegacyProcedureDefBlock$$module$build$src$core$interfaces$i_legacy_procedure_blocks(c)&&$.Names$$module$build$src$core$names.equals(c.getProcedureDef()[0],a))return c;return null}; +isDynamicShape$$module$build$src$core$renderers$common$constants=function(a){return a.isDynamic};getParentConnection$$module$build$src$core$keyboard_nav$ast_node=function(a){let b=a.outputConnection;if(!b||a.previousConnection&&a.previousConnection.isConnected())b=a.previousConnection;return b};connectReciprocally$$module$build$src$core$connection=function(a,b){if(!a||!b)throw Error("Cannot connect null connections.");a.targetConnection=b;b.targetConnection=a}; +getSingleConnection$$module$build$src$core$connection=function(a,b){let c=null;b=b.outputConnection;const d=null==b?void 0:b.getConnectionChecker();for(let e=0,f;f=a.inputList[e];e++){const g=f.connection;let h;if(g&&(null==(h=d)?0:h.canConnect(b,g,!1))){if(c)return null;c=g}}return c};getConnectionForOrphanedOutput$$module$build$src$core$connection=function(a,b){let c;for(;c=getSingleConnection$$module$build$src$core$connection(a,b);)if(a=c.targetBlock(),!a||a.isShadow())return c;return null}; +register$$module$build$src$core$renderers$common$block_rendering=function(a,b){register$$module$build$src$core$registry(Type$$module$build$src$core$registry.RENDERER,a,b)};unregister$$module$build$src$core$renderers$common$block_rendering=function(a){unregister$$module$build$src$core$registry(Type$$module$build$src$core$registry.RENDERER,a)}; +init$$module$build$src$core$renderers$common$block_rendering=function(a,b,c){a=new (getClass$$module$build$src$core$registry(Type$$module$build$src$core$registry.RENDERER,a))(a);a.init(b,c);return a};stringButtonClickHandler$$module$build$src$core$variables_dynamic=function(a){createVariableButtonHandler$$module$build$src$core$variables(a.getTargetWorkspace(),void 0,"String")}; +numberButtonClickHandler$$module$build$src$core$variables_dynamic=function(a){createVariableButtonHandler$$module$build$src$core$variables(a.getTargetWorkspace(),void 0,"Number")};colourButtonClickHandler$$module$build$src$core$variables_dynamic=function(a){createVariableButtonHandler$$module$build$src$core$variables(a.getTargetWorkspace(),void 0,"Colour")}; +flyoutCategory$$module$build$src$core$variables_dynamic=function(a){let b=[],c=document.createElement("button");c.setAttribute("text",$.Msg$$module$build$src$core$msg.NEW_STRING_VARIABLE);c.setAttribute("callbackKey","CREATE_VARIABLE_STRING");b.push(c);c=document.createElement("button");c.setAttribute("text",$.Msg$$module$build$src$core$msg.NEW_NUMBER_VARIABLE);c.setAttribute("callbackKey","CREATE_VARIABLE_NUMBER");b.push(c);c=document.createElement("button");c.setAttribute("text",$.Msg$$module$build$src$core$msg.NEW_COLOUR_VARIABLE); +c.setAttribute("callbackKey","CREATE_VARIABLE_COLOUR");b.push(c);a.registerButtonCallback("CREATE_VARIABLE_STRING",stringButtonClickHandler$$module$build$src$core$variables_dynamic);a.registerButtonCallback("CREATE_VARIABLE_NUMBER",numberButtonClickHandler$$module$build$src$core$variables_dynamic);a.registerButtonCallback("CREATE_VARIABLE_COLOUR",colourButtonClickHandler$$module$build$src$core$variables_dynamic);a=flyoutCategoryBlocks$$module$build$src$core$variables_dynamic(a);return b=b.concat(a)}; +flyoutCategoryBlocks$$module$build$src$core$variables_dynamic=function(a){a=a.getAllVariables();const b=[];if(0saveParameter$$module$build$src$core$serialization$procedures(c));return b};saveParameter$$module$build$src$core$serialization$procedures=function(a){const b={id:a.getId(),name:a.getName()};if(!a.getTypes().length)return b;b.types=a.getTypes();return b}; +loadProcedure$$module$build$src$core$serialization$procedures=function(a,b,c,d){a=(new a(d,c.name,c.id)).setReturnTypes(c.returnTypes);if(!c.parameters)return a;for(const [e,f]of c.parameters.entries())a.insertParameter(loadParameter$$module$build$src$core$serialization$procedures(b,f,d),e);return a};loadParameter$$module$build$src$core$serialization$procedures=function(a,b,c){a=new a(c,b.name,b.id);b.types&&a.setTypes(b.types);return a}; +save$$module$build$src$core$serialization$workspaces=function(a){const b=Object.create(null),c=getAllItems$$module$build$src$core$registry(Type$$module$build$src$core$registry.SERIALIZER,!0);for(const d in c){let e;const f=null==(e=c[d])?void 0:e.save(a);f&&(b[d]=f)}return b}; +load$$module$build$src$core$serialization$workspaces=function(a,b,{recordUndo:c=!1}={}){var d=getAllItems$$module$build$src$core$registry(Type$$module$build$src$core$registry.SERIALIZER,!0);if(d){d=Object.entries(d).sort((f,g)=>g[1].priority-f[1].priority);var e=getRecordUndo$$module$build$src$core$events$utils();setRecordUndo$$module$build$src$core$events$utils(c);(c=$.getGroup$$module$build$src$core$events$utils())||$.setGroup$$module$build$src$core$events$utils(!0);startTextWidthCache$$module$build$src$core$utils$dom(); +b instanceof WorkspaceSvg$$module$build$src$core$workspace_svg&&b.setResizesEnabled(!1);for(const [,f]of d.reverse()){let g;null==(g=f)||g.clear(b)}for(let [f,g]of d.reverse())if(a[f]){let h;null==(h=g)||h.load(a[f],b)}b instanceof WorkspaceSvg$$module$build$src$core$workspace_svg&&b.setResizesEnabled(!0);stopTextWidthCache$$module$build$src$core$utils$dom();fire$$module$build$src$core$events$utils(new (get$$module$build$src$core$events$utils(FINISHED_LOADING$$module$build$src$core$events$utils))(b)); +$.setGroup$$module$build$src$core$events$utils(c);setRecordUndo$$module$build$src$core$events$utils(e)}};bumpObjectIntoBounds$$module$build$src$core$bump_objects=function(a,b,c){const d=c.getBoundingRectangle(),e=d.right-d.left,f=clamp$$module$build$src$core$utils$math(b.top,d.top,b.top+b.height-(d.bottom-d.top))-d.top;let g=b.left;b=b.left+b.width-e;a.RTL?g=Math.min(b,g):b=Math.max(g,b);return(a=clamp$$module$build$src$core$utils$math(g,d.left,b)-d.left)||f?(c.moveBy(a,f,["inbounds"]),!0):!1}; +bumpIntoBoundsHandler$$module$build$src$core$bump_objects=function(a){return b=>{var c=a.getMetricsManager();if(c.hasFixedEdges()&&!a.isDragging()){var d;if(-1!==BUMP_EVENTS$$module$build$src$core$events$utils.indexOf(null!=(d=b.type)?d:"")){d=c.getScrollMetrics(!0);const e=extractObjectFromEvent$$module$build$src$core$bump_objects(a,b);e&&(c=$.getGroup$$module$build$src$core$events$utils()||!1,$.setGroup$$module$build$src$core$events$utils(b.group),bumpObjectIntoBounds$$module$build$src$core$bump_objects(a, +d,e)&&!b.group&&console.warn("Moved object in bounds but there was no event group. This may break undo."),$.setGroup$$module$build$src$core$events$utils(c))}else b.type===VIEWPORT_CHANGE$$module$build$src$core$events$utils&&b.scale&&b.oldScale&&b.scale>b.oldScale&&bumpTopObjectsIntoBounds$$module$build$src$core$bump_objects(a)}}}; +extractObjectFromEvent$$module$build$src$core$bump_objects=function(a,b){let c=null;switch(b.type){case $.CREATE$$module$build$src$core$events$utils:case $.MOVE$$module$build$src$core$events$utils:(c=a.getBlockById(b.blockId))&&(c=c.getRootBlock());break;case COMMENT_CREATE$$module$build$src$core$events$utils:case COMMENT_MOVE$$module$build$src$core$events$utils:c=a.getCommentById(b.commentId)}return c}; +bumpTopObjectsIntoBounds$$module$build$src$core$bump_objects=function(a){var b=a.getMetricsManager();if(b.hasFixedEdges()&&!a.isDragging()){b=b.getScrollMetrics(!0);var c=a.getTopBoundedElements();for(let d=0,e;e=c[d];d++)bumpObjectIntoBounds$$module$build$src$core$bump_objects(a,b,e)}}; +initIconData$$module$build$src$core$block_dragger=function(a,b){const c=[];for(const d of a.getIcons())if(!hasBubble$$module$build$src$core$interfaces$i_has_bubble(d)||d.bubbleIsVisible())c.push({location:b,icon:d}),d.onLocationChange(b);for(const d of a.getChildren(!1))c.push(...initIconData$$module$build$src$core$block_dragger(d,Coordinate$$module$build$src$core$utils$coordinate.sum(b,d.relativeCoords)));return c}; +registerUndo$$module$build$src$core$contextmenu_items=function(){ContextMenuRegistry$$module$build$src$core$contextmenu_registry.registry.register({displayText(){return $.Msg$$module$build$src$core$msg.UNDO},preconditionFn(a){return 0b.length?deleteNext_$$module$build$src$core$contextmenu_items(b):confirm$$module$build$src$core$dialog($.Msg$$module$build$src$core$msg.DELETE_ALL_BLOCKS.replace("%1",String(b.length)),function(c){c&&deleteNext_$$module$build$src$core$contextmenu_items(b)})}},scopeType:ContextMenuRegistry$$module$build$src$core$contextmenu_registry.ScopeType.WORKSPACE, +id:"workspaceDelete",weight:6})};registerWorkspaceOptions_$$module$build$src$core$contextmenu_items=function(){registerUndo$$module$build$src$core$contextmenu_items();registerRedo$$module$build$src$core$contextmenu_items();registerCleanup$$module$build$src$core$contextmenu_items();registerCollapse$$module$build$src$core$contextmenu_items();registerExpand$$module$build$src$core$contextmenu_items();registerDeleteAll$$module$build$src$core$contextmenu_items()}; +registerDuplicate$$module$build$src$core$contextmenu_items=function(){ContextMenuRegistry$$module$build$src$core$contextmenu_registry.registry.register({displayText(){return $.Msg$$module$build$src$core$msg.DUPLICATE_BLOCK},preconditionFn(a){a=a.block;return!a.isInFlyout&&a.isDeletable()&&a.isMovable()?a.isDuplicatable()?"enabled":"disabled":"hidden"},callback(a){if(a.block){var b=a.block.toCopyData();b&&paste$$module$build$src$core$clipboard(b,a.block.workspace)}},scopeType:ContextMenuRegistry$$module$build$src$core$contextmenu_registry.ScopeType.BLOCK, +id:"blockDuplicate",weight:1})}; +registerComment$$module$build$src$core$contextmenu_items=function(){ContextMenuRegistry$$module$build$src$core$contextmenu_registry.registry.register({displayText(a){return a.block.hasIcon(CommentIcon$$module$build$src$core$icons$comment_icon.TYPE)?$.Msg$$module$build$src$core$msg.REMOVE_COMMENT:$.Msg$$module$build$src$core$msg.ADD_COMMENT},preconditionFn(a){a=a.block;return!a.isInFlyout&&a.workspace.options.comments&&!a.isCollapsed()&&a.isEditable()?"enabled":"hidden"},callback(a){a=a.block;a.hasIcon(CommentIcon$$module$build$src$core$icons$comment_icon.TYPE)? +a.setCommentText(null):a.setCommentText("")},scopeType:ContextMenuRegistry$$module$build$src$core$contextmenu_registry.ScopeType.BLOCK,id:"blockComment",weight:2})}; +registerInline$$module$build$src$core$contextmenu_items=function(){ContextMenuRegistry$$module$build$src$core$contextmenu_registry.registry.register({displayText(a){return a.block.getInputsInline()?$.Msg$$module$build$src$core$msg.EXTERNAL_INPUTS:$.Msg$$module$build$src$core$msg.INLINE_INPUTS},preconditionFn(a){a=a.block;if(!a.isInFlyout&&a.isMovable()&&!a.isCollapsed())for(let b=1;b>>0,$jscomp.propertyToPolyfillSymbol[e]=$jscomp.IS_SYMBOL_NATIVE? +$jscomp.global.Symbol(e):$jscomp.POLYFILL_PREFIX+c+"$"+e),$jscomp.defineProperty(d,$jscomp.propertyToPolyfillSymbol[e],{configurable:!0,writable:!0,value:b})))};$jscomp.polyfill("globalThis",function(a){return a||$jscomp.global},"es_2020","es3");$jscomp.arrayIteratorImpl=function(a){var b=0;return function(){return b{const a=soup$$module$build$src$core$utils$idgenerator.length,b=[];for(let c=0;20>c;c++)b[c]=soup$$module$build$src$core$utils$idgenerator.charAt(Math.random()*a);return b.join("")}},TEST_ONLY$$module$build$src$core$utils$idgenerator=internal$$module$build$src$core$utils$idgenerator,nextId$$module$build$src$core$utils$idgenerator= +0,module$build$src$core$utils$idgenerator={TEST_ONLY:internal$$module$build$src$core$utils$idgenerator};module$build$src$core$utils$idgenerator.genUid=genUid$$module$build$src$core$utils$idgenerator;module$build$src$core$utils$idgenerator.getNextUniqueId=getNextUniqueId$$module$build$src$core$utils$idgenerator;var group$$module$build$src$core$events$utils,recordUndo$$module$build$src$core$events$utils,disabled$$module$build$src$core$events$utils,BLOCK_CREATE$$module$build$src$core$events$utils,BLOCK_DELETE$$module$build$src$core$events$utils,BLOCK_CHANGE$$module$build$src$core$events$utils,BLOCK_FIELD_INTERMEDIATE_CHANGE$$module$build$src$core$events$utils,BLOCK_MOVE$$module$build$src$core$events$utils,VAR_CREATE$$module$build$src$core$events$utils,VAR_DELETE$$module$build$src$core$events$utils,VAR_RENAME$$module$build$src$core$events$utils, +UI$$module$build$src$core$events$utils,BLOCK_DRAG$$module$build$src$core$events$utils,SELECTED$$module$build$src$core$events$utils,CLICK$$module$build$src$core$events$utils,MARKER_MOVE$$module$build$src$core$events$utils,BUBBLE_OPEN$$module$build$src$core$events$utils,TRASHCAN_OPEN$$module$build$src$core$events$utils,TOOLBOX_ITEM_SELECT$$module$build$src$core$events$utils,THEME_CHANGE$$module$build$src$core$events$utils,VIEWPORT_CHANGE$$module$build$src$core$events$utils,COMMENT_CREATE$$module$build$src$core$events$utils, +COMMENT_DELETE$$module$build$src$core$events$utils,COMMENT_CHANGE$$module$build$src$core$events$utils,COMMENT_MOVE$$module$build$src$core$events$utils,FINISHED_LOADING$$module$build$src$core$events$utils,BUMP_EVENTS$$module$build$src$core$events$utils,FIRE_QUEUE$$module$build$src$core$events$utils,TEST_ONLY$$module$build$src$core$events$utils,module$build$src$core$events$utils;group$$module$build$src$core$events$utils="";recordUndo$$module$build$src$core$events$utils=!0; +disabled$$module$build$src$core$events$utils=0;$.CREATE$$module$build$src$core$events$utils="create";BLOCK_CREATE$$module$build$src$core$events$utils=$.CREATE$$module$build$src$core$events$utils;$.DELETE$$module$build$src$core$events$utils="delete";BLOCK_DELETE$$module$build$src$core$events$utils=$.DELETE$$module$build$src$core$events$utils;$.CHANGE$$module$build$src$core$events$utils="change";BLOCK_CHANGE$$module$build$src$core$events$utils=$.CHANGE$$module$build$src$core$events$utils; +BLOCK_FIELD_INTERMEDIATE_CHANGE$$module$build$src$core$events$utils="block_field_intermediate_change";$.MOVE$$module$build$src$core$events$utils="move";BLOCK_MOVE$$module$build$src$core$events$utils=$.MOVE$$module$build$src$core$events$utils;VAR_CREATE$$module$build$src$core$events$utils="var_create";VAR_DELETE$$module$build$src$core$events$utils="var_delete";VAR_RENAME$$module$build$src$core$events$utils="var_rename";UI$$module$build$src$core$events$utils="ui"; +BLOCK_DRAG$$module$build$src$core$events$utils="drag";SELECTED$$module$build$src$core$events$utils="selected";CLICK$$module$build$src$core$events$utils="click";MARKER_MOVE$$module$build$src$core$events$utils="marker_move";BUBBLE_OPEN$$module$build$src$core$events$utils="bubble_open";TRASHCAN_OPEN$$module$build$src$core$events$utils="trashcan_open";TOOLBOX_ITEM_SELECT$$module$build$src$core$events$utils="toolbox_item_select";THEME_CHANGE$$module$build$src$core$events$utils="theme_change"; +VIEWPORT_CHANGE$$module$build$src$core$events$utils="viewport_change";COMMENT_CREATE$$module$build$src$core$events$utils="comment_create";COMMENT_DELETE$$module$build$src$core$events$utils="comment_delete";COMMENT_CHANGE$$module$build$src$core$events$utils="comment_change";COMMENT_MOVE$$module$build$src$core$events$utils="comment_move";FINISHED_LOADING$$module$build$src$core$events$utils="finished_loading"; +BUMP_EVENTS$$module$build$src$core$events$utils=[$.CREATE$$module$build$src$core$events$utils,$.MOVE$$module$build$src$core$events$utils,COMMENT_CREATE$$module$build$src$core$events$utils,COMMENT_MOVE$$module$build$src$core$events$utils];FIRE_QUEUE$$module$build$src$core$events$utils=[]; +TEST_ONLY$$module$build$src$core$events$utils={FIRE_QUEUE:FIRE_QUEUE$$module$build$src$core$events$utils,fireNow:fireNow$$module$build$src$core$events$utils,fireInternal:fireInternal$$module$build$src$core$events$utils,setGroupInternal:setGroupInternal$$module$build$src$core$events$utils}; +module$build$src$core$events$utils={BLOCK_CHANGE:$.CHANGE$$module$build$src$core$events$utils,BLOCK_CREATE:$.CREATE$$module$build$src$core$events$utils,BLOCK_DELETE:$.DELETE$$module$build$src$core$events$utils,BLOCK_DRAG:BLOCK_DRAG$$module$build$src$core$events$utils,BLOCK_FIELD_INTERMEDIATE_CHANGE:BLOCK_FIELD_INTERMEDIATE_CHANGE$$module$build$src$core$events$utils,BLOCK_MOVE:$.MOVE$$module$build$src$core$events$utils,BUBBLE_OPEN:BUBBLE_OPEN$$module$build$src$core$events$utils,BUMP_EVENTS:BUMP_EVENTS$$module$build$src$core$events$utils, +CHANGE:$.CHANGE$$module$build$src$core$events$utils,CLICK:CLICK$$module$build$src$core$events$utils,COMMENT_CHANGE:COMMENT_CHANGE$$module$build$src$core$events$utils,COMMENT_CREATE:COMMENT_CREATE$$module$build$src$core$events$utils,COMMENT_DELETE:COMMENT_DELETE$$module$build$src$core$events$utils,COMMENT_MOVE:COMMENT_MOVE$$module$build$src$core$events$utils,CREATE:$.CREATE$$module$build$src$core$events$utils,DELETE:$.DELETE$$module$build$src$core$events$utils,FINISHED_LOADING:FINISHED_LOADING$$module$build$src$core$events$utils, +MARKER_MOVE:MARKER_MOVE$$module$build$src$core$events$utils,MOVE:$.MOVE$$module$build$src$core$events$utils,SELECTED:SELECTED$$module$build$src$core$events$utils,TEST_ONLY:TEST_ONLY$$module$build$src$core$events$utils,THEME_CHANGE:THEME_CHANGE$$module$build$src$core$events$utils,TOOLBOX_ITEM_SELECT:TOOLBOX_ITEM_SELECT$$module$build$src$core$events$utils,TRASHCAN_OPEN:TRASHCAN_OPEN$$module$build$src$core$events$utils,UI:UI$$module$build$src$core$events$utils,VAR_CREATE:VAR_CREATE$$module$build$src$core$events$utils, +VAR_DELETE:VAR_DELETE$$module$build$src$core$events$utils,VAR_RENAME:VAR_RENAME$$module$build$src$core$events$utils,VIEWPORT_CHANGE:VIEWPORT_CHANGE$$module$build$src$core$events$utils};module$build$src$core$events$utils.clearPendingUndo=clearPendingUndo$$module$build$src$core$events$utils;module$build$src$core$events$utils.disable=$.disable$$module$build$src$core$events$utils;module$build$src$core$events$utils.disableOrphans=disableOrphans$$module$build$src$core$events$utils; +module$build$src$core$events$utils.enable=$.enable$$module$build$src$core$events$utils;module$build$src$core$events$utils.filter=filter$$module$build$src$core$events$utils;module$build$src$core$events$utils.fire=fire$$module$build$src$core$events$utils;module$build$src$core$events$utils.fromJson=fromJson$$module$build$src$core$events$utils;module$build$src$core$events$utils.get=get$$module$build$src$core$events$utils;module$build$src$core$events$utils.getDescendantIds=getDescendantIds$$module$build$src$core$events$utils; +module$build$src$core$events$utils.getGroup=$.getGroup$$module$build$src$core$events$utils;module$build$src$core$events$utils.getRecordUndo=getRecordUndo$$module$build$src$core$events$utils;module$build$src$core$events$utils.isEnabled=isEnabled$$module$build$src$core$events$utils;module$build$src$core$events$utils.setGroup=$.setGroup$$module$build$src$core$events$utils;module$build$src$core$events$utils.setRecordUndo=setRecordUndo$$module$build$src$core$events$utils;var Abstract$$module$build$src$core$events$events_abstract=class{constructor(){this.workspaceId=void 0;this.isUiEvent=!1;this.type="";this.group=$.getGroup$$module$build$src$core$events$utils();this.recordUndo=getRecordUndo$$module$build$src$core$events$utils()}toJson(){return{type:this.type,group:this.group}}static fromJson(a,b,c){c.isBlank=!1;c.group=a.group||"";c.workspaceId=b.id;return c}isNull(){return!1}run(a){}getEventWorkspace_(){let a;this.workspaceId&&(a=getWorkspaceById$$module$build$src$core$common(this.workspaceId)); +if(!a)throw Error("Workspace is null. Event must have been generated from real Blockly events.");return a}},module$build$src$core$events$events_abstract={};module$build$src$core$events$events_abstract.Abstract=Abstract$$module$build$src$core$events$events_abstract;var UiBase$$module$build$src$core$events$events_ui_base=class extends Abstract$$module$build$src$core$events$events_abstract{constructor(a){super();this.recordUndo=!1;this.isUiEvent=!0;this.isBlank="undefined"===typeof a;this.workspaceId=a?a:""}},module$build$src$core$events$events_ui_base={};module$build$src$core$events$events_ui_base.UiBase=UiBase$$module$build$src$core$events$events_ui_base;var Click$$module$build$src$core$events$events_click=class extends UiBase$$module$build$src$core$events$events_ui_base{constructor(a,b,c){b=a?a.workspace.id:b;null===b&&(b=void 0);super(b);this.type=CLICK$$module$build$src$core$events$utils;this.blockId=a?a.id:void 0;this.targetType=c}toJson(){const a=super.toJson();if(!this.targetType)throw Error("The click target type is undefined. Either pass a block to the constructor, or call fromJson");a.targetType=this.targetType;a.blockId=this.blockId;return a}static fromJson(a, +b,c){b=super.fromJson(a,b,null!=c?c:new Click$$module$build$src$core$events$events_click);b.targetType=a.targetType;b.blockId=a.blockId;return b}},ClickTarget$$module$build$src$core$events$events_click;(function(a){a.BLOCK="block";a.WORKSPACE="workspace";a.ZOOM_CONTROLS="zoom_controls"})(ClickTarget$$module$build$src$core$events$events_click||(ClickTarget$$module$build$src$core$events$events_click={})); +register$$module$build$src$core$registry(Type$$module$build$src$core$registry.EVENT,CLICK$$module$build$src$core$events$utils,Click$$module$build$src$core$events$events_click);var module$build$src$core$events$events_click={};module$build$src$core$events$events_click.Click=Click$$module$build$src$core$events$events_click;module$build$src$core$events$events_click.ClickTarget=ClickTarget$$module$build$src$core$events$events_click;var LONGPRESS$$module$build$src$core$touch=750,TOUCH_ENABLED$$module$build$src$core$touch="ontouchstart"in globalThis||!!(globalThis.document&&document.documentElement&&"ontouchstart"in document.documentElement)||!(!globalThis.navigator||!globalThis.navigator.maxTouchPoints&&!globalThis.navigator.msMaxTouchPoints),touchIdentifier_$$module$build$src$core$touch=null,TOUCH_MAP$$module$build$src$core$touch={mousedown:["pointerdown"],mouseenter:["pointerenter"],mouseleave:["pointerleave"],mousemove:["pointermove"], +mouseout:["pointerout"],mouseover:["pointerover"],mouseup:["pointerup","pointercancel"],touchend:["pointerup"],touchcancel:["pointercancel"]},longPid_$$module$build$src$core$touch=0,module$build$src$core$touch={TOUCH_ENABLED:TOUCH_ENABLED$$module$build$src$core$touch,TOUCH_MAP:TOUCH_MAP$$module$build$src$core$touch};module$build$src$core$touch.checkTouchIdentifier=checkTouchIdentifier$$module$build$src$core$touch;module$build$src$core$touch.clearTouchIdentifier=clearTouchIdentifier$$module$build$src$core$touch; +module$build$src$core$touch.getTouchIdentifierFromEvent=getTouchIdentifierFromEvent$$module$build$src$core$touch;module$build$src$core$touch.longStart=longStart$$module$build$src$core$touch;module$build$src$core$touch.longStop=longStop$$module$build$src$core$touch;module$build$src$core$touch.shouldHandleEvent=shouldHandleEvent$$module$build$src$core$touch;var rawUserAgent$$module$build$src$core$utils$useragent,isJavaFx$$module$build$src$core$utils$useragent,isWebKit$$module$build$src$core$utils$useragent,isGecko$$module$build$src$core$utils$useragent,isAndroid$$module$build$src$core$utils$useragent,isIPad$$module$build$src$core$utils$useragent,isIPhone$$module$build$src$core$utils$useragent,isMac$$module$build$src$core$utils$useragent,isTablet$$module$build$src$core$utils$useragent,isMobile$$module$build$src$core$utils$useragent; +(function(a){function b(d){return-1!==c.indexOf(d.toUpperCase())}rawUserAgent$$module$build$src$core$utils$useragent=a;const c=rawUserAgent$$module$build$src$core$utils$useragent.toUpperCase();isJavaFx$$module$build$src$core$utils$useragent=b("JavaFX");isWebKit$$module$build$src$core$utils$useragent=b("WebKit");isGecko$$module$build$src$core$utils$useragent=b("Gecko")&&!isWebKit$$module$build$src$core$utils$useragent;isAndroid$$module$build$src$core$utils$useragent=b("Android");a=globalThis.navigator&& +globalThis.navigator.maxTouchPoints;isIPad$$module$build$src$core$utils$useragent=b("iPad")||b("Macintosh")&&0{d.push(this.componentData.get(e))});d.sort(function(e,f){return e.weight-f.weight});d.forEach(function(e){c.push(e.component)})}else a.forEach(d=>{c.push(this.componentData.get(d).component)});return c}};ComponentManager$$module$build$src$core$component_manager.Capability=Capability$$module$build$src$core$component_manager;var module$build$src$core$component_manager={};module$build$src$core$component_manager.ComponentManager=ComponentManager$$module$build$src$core$component_manager;var injected$$module$build$src$core$css=!1,content$$module$build$src$core$css='\n.blocklySvg {\n background-color: #fff;\n outline: none;\n overflow: hidden; /* IE overflows by default. */\n position: absolute;\n display: block;\n}\n\n.blocklyWidgetDiv {\n display: none;\n position: absolute;\n z-index: 99999; /* big value for bootstrap3 compatibility */\n}\n\n.injectionDiv {\n height: 100%;\n position: relative;\n overflow: hidden; /* So blocks in drag surface disappear at edges */\n touch-action: none;\n}\n\n.blocklyNonSelectable {\n user-select: none;\n -ms-user-select: none;\n -webkit-user-select: none;\n}\n\n.blocklyBlockCanvas.blocklyCanvasTransitioning,\n.blocklyBubbleCanvas.blocklyCanvasTransitioning {\n transition: transform .5s;\n}\n\n.blocklyTooltipDiv {\n background-color: #ffffc7;\n border: 1px solid #ddc;\n box-shadow: 4px 4px 20px 1px rgba(0,0,0,.15);\n color: #000;\n display: none;\n font: 9pt sans-serif;\n opacity: .9;\n padding: 2px;\n position: absolute;\n z-index: 100000; /* big value for bootstrap3 compatibility */\n}\n\n.blocklyDropDownDiv {\n position: absolute;\n left: 0;\n top: 0;\n z-index: 1000;\n display: none;\n border: 1px solid;\n border-color: #dadce0;\n background-color: #fff;\n border-radius: 2px;\n padding: 4px;\n box-shadow: 0 0 3px 1px rgba(0,0,0,.3);\n}\n\n.blocklyDropDownDiv.blocklyFocused {\n box-shadow: 0 0 6px 1px rgba(0,0,0,.3);\n}\n\n.blocklyDropDownContent {\n max-height: 300px; /* @todo: spec for maximum height. */\n overflow: auto;\n overflow-x: hidden;\n position: relative;\n}\n\n.blocklyDropDownArrow {\n position: absolute;\n left: 0;\n top: 0;\n width: 16px;\n height: 16px;\n z-index: -1;\n background-color: inherit;\n border-color: inherit;\n}\n\n.blocklyDropDownButton {\n display: inline-block;\n float: left;\n padding: 0;\n margin: 4px;\n border-radius: 4px;\n outline: none;\n border: 1px solid;\n transition: box-shadow .1s;\n cursor: pointer;\n}\n\n.blocklyArrowTop {\n border-top: 1px solid;\n border-left: 1px solid;\n border-top-left-radius: 4px;\n border-color: inherit;\n}\n\n.blocklyArrowBottom {\n border-bottom: 1px solid;\n border-right: 1px solid;\n border-bottom-right-radius: 4px;\n border-color: inherit;\n}\n\n.blocklyResizeSE {\n cursor: se-resize;\n fill: #aaa;\n}\n\n.blocklyResizeSW {\n cursor: sw-resize;\n fill: #aaa;\n}\n\n.blocklyResizeLine {\n stroke: #515A5A;\n stroke-width: 1;\n}\n\n.blocklyHighlightedConnectionPath {\n fill: none;\n stroke: #fc3;\n stroke-width: 4px;\n}\n\n.blocklyPathLight {\n fill: none;\n stroke-linecap: round;\n stroke-width: 1;\n}\n\n.blocklySelected>.blocklyPathLight {\n display: none;\n}\n\n.blocklyDraggable {\n cursor: grab;\n cursor: -webkit-grab;\n}\n\n.blocklyDragging {\n cursor: grabbing;\n cursor: -webkit-grabbing;\n}\n\n /* Changes cursor on mouse down. Not effective in Firefox because of\n https://bugzilla.mozilla.org/show_bug.cgi?id=771241 */\n.blocklyDraggable:active {\n cursor: grabbing;\n cursor: -webkit-grabbing;\n}\n\n.blocklyDragging.blocklyDraggingDelete {\n cursor: url("<<>>/handdelete.cur"), auto;\n}\n\n.blocklyDragging>.blocklyPath,\n.blocklyDragging>.blocklyPathLight {\n fill-opacity: .8;\n stroke-opacity: .8;\n}\n\n.blocklyDragging>.blocklyPathDark {\n display: none;\n}\n\n.blocklyDisabled>.blocklyPath {\n fill-opacity: .5;\n stroke-opacity: .5;\n}\n\n.blocklyDisabled>.blocklyPathLight,\n.blocklyDisabled>.blocklyPathDark {\n display: none;\n}\n\n.blocklyInsertionMarker>.blocklyPath,\n.blocklyInsertionMarker>.blocklyPathLight,\n.blocklyInsertionMarker>.blocklyPathDark {\n fill-opacity: .2;\n stroke: none;\n}\n\n.blocklyMultilineText {\n font-family: monospace;\n}\n\n.blocklyNonEditableText>text {\n pointer-events: none;\n}\n\n.blocklyFlyout {\n position: absolute;\n z-index: 20;\n}\n\n.blocklyText text {\n cursor: default;\n}\n\n/*\n Don\'t allow users to select text. It gets annoying when trying to\n drag a block and selected text moves instead.\n*/\n.blocklySvg text {\n user-select: none;\n -ms-user-select: none;\n -webkit-user-select: none;\n cursor: inherit;\n}\n\n.blocklyHidden {\n display: none;\n}\n\n.blocklyFieldDropdown:not(.blocklyHidden) {\n display: block;\n}\n\n.blocklyIconGroup {\n cursor: default;\n}\n\n.blocklyIconGroup:not(:hover),\n.blocklyIconGroupReadonly {\n opacity: .6;\n}\n\n.blocklyIconShape {\n fill: #00f;\n stroke: #fff;\n stroke-width: 1px;\n}\n\n.blocklyIconSymbol {\n fill: #fff;\n}\n\n.blocklyMinimalBody {\n margin: 0;\n padding: 0;\n}\n\n.blocklyHtmlInput {\n border: none;\n border-radius: 4px;\n height: 100%;\n margin: 0;\n outline: none;\n padding: 0;\n width: 100%;\n text-align: center;\n display: block;\n box-sizing: border-box;\n}\n\n/* Remove the increase and decrease arrows on the field number editor */\ninput.blocklyHtmlInput[type=number]::-webkit-inner-spin-button,\ninput.blocklyHtmlInput[type=number]::-webkit-outer-spin-button {\n -webkit-appearance: none;\n margin: 0;\n}\n\ninput[type=number] {\n -moz-appearance: textfield;\n}\n\n.blocklyMainBackground {\n stroke-width: 1;\n stroke: #c6c6c6; /* Equates to #ddd due to border being off-pixel. */\n}\n\n.blocklyMutatorBackground {\n fill: #fff;\n stroke: #ddd;\n stroke-width: 1;\n}\n\n.blocklyFlyoutBackground {\n fill: #ddd;\n fill-opacity: .8;\n}\n\n.blocklyMainWorkspaceScrollbar {\n z-index: 20;\n}\n\n.blocklyFlyoutScrollbar {\n z-index: 30;\n}\n\n.blocklyScrollbarHorizontal,\n.blocklyScrollbarVertical {\n position: absolute;\n outline: none;\n}\n\n.blocklyScrollbarBackground {\n opacity: 0;\n}\n\n.blocklyScrollbarHandle {\n fill: #ccc;\n}\n\n.blocklyScrollbarBackground:hover+.blocklyScrollbarHandle,\n.blocklyScrollbarHandle:hover {\n fill: #bbb;\n}\n\n/* Darken flyout scrollbars due to being on a grey background. */\n/* By contrast, workspace scrollbars are on a white background. */\n.blocklyFlyout .blocklyScrollbarHandle {\n fill: #bbb;\n}\n\n.blocklyFlyout .blocklyScrollbarBackground:hover+.blocklyScrollbarHandle,\n.blocklyFlyout .blocklyScrollbarHandle:hover {\n fill: #aaa;\n}\n\n.blocklyInvalidInput {\n background: #faa;\n}\n\n.blocklyVerticalMarker {\n stroke-width: 3px;\n fill: rgba(255,255,255,.5);\n pointer-events: none;\n}\n\n.blocklyComputeCanvas {\n position: absolute;\n width: 0;\n height: 0;\n}\n\n.blocklyNoPointerEvents {\n pointer-events: none;\n}\n\n.blocklyContextMenu {\n border-radius: 4px;\n max-height: 100%;\n}\n\n.blocklyDropdownMenu {\n border-radius: 2px;\n padding: 0 !important;\n}\n\n.blocklyDropdownMenu .blocklyMenuItem {\n /* 28px on the left for icon or checkbox. */\n padding-left: 28px;\n}\n\n/* BiDi override for the resting state. */\n.blocklyDropdownMenu .blocklyMenuItemRtl {\n /* Flip left/right padding for BiDi. */\n padding-left: 5px;\n padding-right: 28px;\n}\n\n.blocklyWidgetDiv .blocklyMenu {\n background: #fff;\n border: 1px solid transparent;\n box-shadow: 0 0 3px 1px rgba(0,0,0,.3);\n font: normal 13px Arial, sans-serif;\n margin: 0;\n outline: none;\n padding: 4px 0;\n position: absolute;\n overflow-y: auto;\n overflow-x: hidden;\n max-height: 100%;\n z-index: 20000; /* Arbitrary, but some apps depend on it... */\n}\n\n.blocklyWidgetDiv .blocklyMenu.blocklyFocused {\n box-shadow: 0 0 6px 1px rgba(0,0,0,.3);\n}\n\n.blocklyDropDownDiv .blocklyMenu {\n background: inherit; /* Compatibility with gapi, reset from goog-menu */\n border: inherit; /* Compatibility with gapi, reset from goog-menu */\n font: normal 13px "Helvetica Neue", Helvetica, sans-serif;\n outline: none;\n position: relative; /* Compatibility with gapi, reset from goog-menu */\n z-index: 20000; /* Arbitrary, but some apps depend on it... */\n}\n\n/* State: resting. */\n.blocklyMenuItem {\n border: none;\n color: #000;\n cursor: pointer;\n list-style: none;\n margin: 0;\n /* 7em on the right for shortcut. */\n min-width: 7em;\n padding: 6px 15px;\n white-space: nowrap;\n}\n\n/* State: disabled. */\n.blocklyMenuItemDisabled {\n color: #ccc;\n cursor: inherit;\n}\n\n/* State: hover. */\n.blocklyMenuItemHighlight {\n background-color: rgba(0,0,0,.1);\n}\n\n/* State: selected/checked. */\n.blocklyMenuItemCheckbox {\n height: 16px;\n position: absolute;\n width: 16px;\n}\n\n.blocklyMenuItemSelected .blocklyMenuItemCheckbox {\n background: url(<<>>/sprites.png) no-repeat -48px -16px;\n float: left;\n margin-left: -24px;\n position: static; /* Scroll with the menu. */\n}\n\n.blocklyMenuItemRtl .blocklyMenuItemCheckbox {\n float: right;\n margin-right: -24px;\n}\n', +module$build$src$core$css={};module$build$src$core$css.inject=inject$$module$build$src$core$css;module$build$src$core$css.register=register$$module$build$src$core$css;var Coordinate$$module$build$src$core$utils$coordinate=class{constructor(a,b){this.x=a;this.y=b}clone(){return new Coordinate$$module$build$src$core$utils$coordinate(this.x,this.y)}scale(a){this.x*=a;this.y*=a;return this}translate(a,b){this.x+=a;this.y+=b;return this}static equals(a,b){return a===b?!0:a&&b?a.x===b.x&&a.y===b.y:!1}static distance(a,b){const c=a.x-b.x;a=a.y-b.y;return Math.sqrt(c*c+a*a)}static magnitude(a){return Math.sqrt(a.x*a.x+a.y*a.y)}static difference(a,b){return new Coordinate$$module$build$src$core$utils$coordinate(a.x- +b.x,a.y-b.y)}static sum(a,b){return new Coordinate$$module$build$src$core$utils$coordinate(a.x+b.x,a.y+b.y)}},module$build$src$core$utils$coordinate={};module$build$src$core$utils$coordinate.Coordinate=Coordinate$$module$build$src$core$utils$coordinate;var module$build$src$core$utils$deprecation={};module$build$src$core$utils$deprecation.warn=warn$$module$build$src$core$utils$deprecation;var SVG_NS$$module$build$src$core$utils$dom="http://www.w3.org/2000/svg",HTML_NS$$module$build$src$core$utils$dom="http://www.w3.org/1999/xhtml",XLINK_NS$$module$build$src$core$utils$dom="http://www.w3.org/1999/xlink",NodeType$$module$build$src$core$utils$dom;(function(a){a[a.ELEMENT_NODE=1]="ELEMENT_NODE";a[a.TEXT_NODE=3]="TEXT_NODE";a[a.COMMENT_NODE=8]="COMMENT_NODE"})(NodeType$$module$build$src$core$utils$dom||(NodeType$$module$build$src$core$utils$dom={})); +var cacheWidths$$module$build$src$core$utils$dom=null,cacheReference$$module$build$src$core$utils$dom=0,canvasContext$$module$build$src$core$utils$dom=null,module$build$src$core$utils$dom={HTML_NS:HTML_NS$$module$build$src$core$utils$dom};module$build$src$core$utils$dom.NodeType=NodeType$$module$build$src$core$utils$dom;module$build$src$core$utils$dom.SVG_NS=SVG_NS$$module$build$src$core$utils$dom;module$build$src$core$utils$dom.XLINK_NS=XLINK_NS$$module$build$src$core$utils$dom; +module$build$src$core$utils$dom.addClass=addClass$$module$build$src$core$utils$dom;module$build$src$core$utils$dom.containsNode=containsNode$$module$build$src$core$utils$dom;module$build$src$core$utils$dom.createSvgElement=createSvgElement$$module$build$src$core$utils$dom;module$build$src$core$utils$dom.getFastTextWidth=getFastTextWidth$$module$build$src$core$utils$dom;module$build$src$core$utils$dom.getFastTextWidthWithSizeString=getFastTextWidthWithSizeString$$module$build$src$core$utils$dom; +module$build$src$core$utils$dom.getTextWidth=getTextWidth$$module$build$src$core$utils$dom;module$build$src$core$utils$dom.hasClass=hasClass$$module$build$src$core$utils$dom;module$build$src$core$utils$dom.insertAfter=insertAfter$$module$build$src$core$utils$dom;module$build$src$core$utils$dom.measureFontMetrics=measureFontMetrics$$module$build$src$core$utils$dom;module$build$src$core$utils$dom.removeClass=removeClass$$module$build$src$core$utils$dom; +module$build$src$core$utils$dom.removeClasses=removeClasses$$module$build$src$core$utils$dom;module$build$src$core$utils$dom.removeNode=removeNode$$module$build$src$core$utils$dom;module$build$src$core$utils$dom.setCssTransform=setCssTransform$$module$build$src$core$utils$dom;module$build$src$core$utils$dom.startTextWidthCache=startTextWidthCache$$module$build$src$core$utils$dom;module$build$src$core$utils$dom.stopTextWidthCache=stopTextWidthCache$$module$build$src$core$utils$dom;var Svg$$module$build$src$core$utils$svg=class{constructor(a){this.tagName=a}toString(){return this.tagName}};Svg$$module$build$src$core$utils$svg.ANIMATE=new Svg$$module$build$src$core$utils$svg("animate");Svg$$module$build$src$core$utils$svg.CIRCLE=new Svg$$module$build$src$core$utils$svg("circle");Svg$$module$build$src$core$utils$svg.CLIPPATH=new Svg$$module$build$src$core$utils$svg("clipPath");Svg$$module$build$src$core$utils$svg.DEFS=new Svg$$module$build$src$core$utils$svg("defs"); +Svg$$module$build$src$core$utils$svg.FECOMPOSITE=new Svg$$module$build$src$core$utils$svg("feComposite");Svg$$module$build$src$core$utils$svg.FECOMPONENTTRANSFER=new Svg$$module$build$src$core$utils$svg("feComponentTransfer");Svg$$module$build$src$core$utils$svg.FEFLOOD=new Svg$$module$build$src$core$utils$svg("feFlood");Svg$$module$build$src$core$utils$svg.FEFUNCA=new Svg$$module$build$src$core$utils$svg("feFuncA");Svg$$module$build$src$core$utils$svg.FEGAUSSIANBLUR=new Svg$$module$build$src$core$utils$svg("feGaussianBlur"); +Svg$$module$build$src$core$utils$svg.FEPOINTLIGHT=new Svg$$module$build$src$core$utils$svg("fePointLight");Svg$$module$build$src$core$utils$svg.FESPECULARLIGHTING=new Svg$$module$build$src$core$utils$svg("feSpecularLighting");Svg$$module$build$src$core$utils$svg.FILTER=new Svg$$module$build$src$core$utils$svg("filter");Svg$$module$build$src$core$utils$svg.FOREIGNOBJECT=new Svg$$module$build$src$core$utils$svg("foreignObject");Svg$$module$build$src$core$utils$svg.G=new Svg$$module$build$src$core$utils$svg("g"); +Svg$$module$build$src$core$utils$svg.IMAGE=new Svg$$module$build$src$core$utils$svg("image");Svg$$module$build$src$core$utils$svg.LINE=new Svg$$module$build$src$core$utils$svg("line");Svg$$module$build$src$core$utils$svg.PATH=new Svg$$module$build$src$core$utils$svg("path");Svg$$module$build$src$core$utils$svg.PATTERN=new Svg$$module$build$src$core$utils$svg("pattern");Svg$$module$build$src$core$utils$svg.POLYGON=new Svg$$module$build$src$core$utils$svg("polygon"); +Svg$$module$build$src$core$utils$svg.RECT=new Svg$$module$build$src$core$utils$svg("rect");Svg$$module$build$src$core$utils$svg.SVG=new Svg$$module$build$src$core$utils$svg("svg");Svg$$module$build$src$core$utils$svg.TEXT=new Svg$$module$build$src$core$utils$svg("text");Svg$$module$build$src$core$utils$svg.TSPAN=new Svg$$module$build$src$core$utils$svg("tspan");var module$build$src$core$utils$svg={};module$build$src$core$utils$svg.Svg=Svg$$module$build$src$core$utils$svg;var Rect$$module$build$src$core$utils$rect=class{constructor(a,b,c,d){this.top=a;this.bottom=b;this.left=c;this.right=d}getHeight(){return this.bottom-this.top}getWidth(){return this.right-this.left}contains(a,b){return a>=this.left&&a<=this.right&&b>=this.top&&b<=this.bottom}intersects(a){return!(this.left>a.right||this.righta.bottom||this.bottom=a||isNaN(a)?0:Math.min(a,this.scrollbarLength)}setHandleLength(a){this.handleLength=a;this.svgHandle.setAttribute(this.lengthAttribute_,String(this.handleLength))}constrainHandlePosition(a){return a=0>=a||isNaN(a)?0:Math.min(a,this.scrollbarLength-this.handleLength)}setHandlePosition(a){this.handlePosition=a;this.svgHandle.setAttribute(this.positionAttribute_, +String(this.handlePosition))}setScrollbarLength(a){this.scrollbarLength=a;this.outerSvg.setAttribute(this.lengthAttribute_,String(this.scrollbarLength));this.svgBackground.setAttribute(this.lengthAttribute_,String(this.scrollbarLength))}setPosition(a,b){this.position.x=a;this.position.y=b;setCssTransform$$module$build$src$core$utils$dom(this.outerSvg,"translate("+(this.position.x+this.origin.x)+"px,"+(this.position.y+this.origin.y)+"px)")}resize(a){if(!a&&(a=this.workspace.getMetrics(),!a))return; +this.oldHostMetrics&&Scrollbar$$module$build$src$core$scrollbar.metricsAreEquivalent(a,this.oldHostMetrics)||(this.horizontal?this.resizeHorizontal(a):this.resizeVertical(a),this.oldHostMetrics=a,this.updateMetrics())}requiresViewResize(a){return this.oldHostMetrics?this.oldHostMetrics.viewWidth!==a.viewWidth||this.oldHostMetrics.viewHeight!==a.viewHeight||this.oldHostMetrics.absoluteLeft!==a.absoluteLeft||this.oldHostMetrics.absoluteTop!==a.absoluteTop:!0}resizeHorizontal(a){this.requiresViewResize(a)? +this.resizeViewHorizontal(a):this.resizeContentHorizontal(a)}resizeViewHorizontal(a){var b=a.viewWidth-2*this.margin;this.pair&&(b-=Scrollbar$$module$build$src$core$scrollbar.scrollbarThickness);this.setScrollbarLength(Math.max(0,b));b=a.absoluteLeft+this.margin;this.pair&&this.workspace.RTL&&(b+=Scrollbar$$module$build$src$core$scrollbar.scrollbarThickness);this.setPosition(b,a.absoluteTop+a.viewHeight-Scrollbar$$module$build$src$core$scrollbar.scrollbarThickness-this.margin);this.resizeContentHorizontal(a)}resizeContentHorizontal(a){if(a.viewWidth>= +a.scrollWidth)this.setHandleLength(this.scrollbarLength),this.setHandlePosition(0),this.pair||this.setVisible(!1);else{this.pair||this.setVisible(!0);var b=this.scrollbarLength*a.viewWidth/a.scrollWidth;b=this.constrainHandleLength(b);this.setHandleLength(b);b=a.scrollWidth-a.viewWidth;var c=this.scrollbarLength-this.handleLength;a=(a.viewLeft-a.scrollLeft)/b*c;a=this.constrainHandlePosition(a);this.setHandlePosition(a);this.ratio=c/b}}resizeVertical(a){this.requiresViewResize(a)?this.resizeViewVertical(a): +this.resizeContentVertical(a)}resizeViewVertical(a){let b=a.viewHeight-2*this.margin;this.pair&&(b-=Scrollbar$$module$build$src$core$scrollbar.scrollbarThickness);this.setScrollbarLength(Math.max(0,b));this.setPosition(this.workspace.RTL?a.absoluteLeft+this.margin:a.absoluteLeft+a.viewWidth-Scrollbar$$module$build$src$core$scrollbar.scrollbarThickness-this.margin,a.absoluteTop+this.margin);this.resizeContentVertical(a)}resizeContentVertical(a){if(a.viewHeight>=a.scrollHeight)this.setHandleLength(this.scrollbarLength), +this.setHandlePosition(0),this.pair||this.setVisible(!1);else{this.pair||this.setVisible(!0);var b=this.scrollbarLength*a.viewHeight/a.scrollHeight;b=this.constrainHandleLength(b);this.setHandleLength(b);b=a.scrollHeight-a.viewHeight;var c=this.scrollbarLength-this.handleLength;a=(a.viewTop-a.scrollTop)/b*c;a=this.constrainHandlePosition(a);this.setHandlePosition(a);this.ratio=c/b}}isVisible(){return this.isHandleVisible}setContainerVisible(a){const b=a!==this.containerVisible;this.containerVisible= +a;b&&this.updateDisplay_()}setVisible(a){if(this.pair)throw Error("Unable to toggle visibility of paired scrollbars.");this.setVisibleInternal(a)}setVisibleInternal(a){const b=a!==this.isVisible();this.isHandleVisible=a;b&&this.updateDisplay_()}updateDisplay_(){this.containerVisible&&this.isVisible()?this.outerSvg.setAttribute("display","block"):this.outerSvg.setAttribute("display","none")}onMouseDownBar(a){this.workspace.markFocused();clearTouchIdentifier$$module$build$src$core$touch();this.cleanUp(); +if(isRightButton$$module$build$src$core$browser_events(a))a.stopPropagation();else{var b=mouseToSvg$$module$build$src$core$browser_events(a,this.workspace.getParentSvg(),this.workspace.getInverseScreenCTM());b=this.horizontal?b.x:b.y;var c=getInjectionDivXY$$module$build$src$core$utils$svg_math(this.svgHandle);c=this.horizontal?c.x:c.y;var d=this.handlePosition,e=.95*this.handleLength;b<=c?d-=e:b>=c+this.handleLength&&(d+=e);this.setHandlePosition(this.constrainHandlePosition(d));this.updateMetrics(); +a.stopPropagation();a.preventDefault()}}onMouseDownHandle(a){this.workspace.markFocused();this.cleanUp();isRightButton$$module$build$src$core$browser_events(a)?a.stopPropagation():(this.startDragHandle=this.handlePosition,this.startDragMouse=this.horizontal?a.clientX:a.clientY,this.onMouseUpWrapper_=conditionalBind$$module$build$src$core$browser_events(document,"pointerup",this,this.onMouseUpHandle),this.onMouseMoveWrapper_=conditionalBind$$module$build$src$core$browser_events(document,"pointermove", +this,this.onMouseMoveHandle),a.stopPropagation(),a.preventDefault())}onMouseMoveHandle(a){this.setHandlePosition(this.constrainHandlePosition(this.startDragHandle+((this.horizontal?a.clientX:a.clientY)-this.startDragMouse)));this.updateMetrics()}onMouseUpHandle(){clearTouchIdentifier$$module$build$src$core$touch();this.cleanUp()}cleanUp(){this.workspace.hideChaff(!0);this.onMouseUpWrapper_&&(unbind$$module$build$src$core$browser_events(this.onMouseUpWrapper_),this.onMouseUpWrapper_=null);this.onMouseMoveWrapper_&& +(unbind$$module$build$src$core$browser_events(this.onMouseMoveWrapper_),this.onMouseMoveWrapper_=null)}getRatio_(){let a=this.handlePosition/(this.scrollbarLength-this.handleLength);isNaN(a)&&(a=0);return a}updateMetrics(){const a=this.getRatio_();this.horizontal?this.workspace.setMetrics({x:a}):this.workspace.setMetrics({y:a})}set(a,b){this.setHandlePosition(this.constrainHandlePosition(a*this.ratio));(b||void 0===b)&&this.updateMetrics()}setOrigin(a,b){this.origin=new Coordinate$$module$build$src$core$utils$coordinate(a, +b)}static metricsAreEquivalent(a,b){return a.viewWidth===b.viewWidth&&a.viewHeight===b.viewHeight&&a.viewLeft===b.viewLeft&&a.viewTop===b.viewTop&&a.absoluteTop===b.absoluteTop&&a.absoluteLeft===b.absoluteLeft&&a.scrollWidth===b.scrollWidth&&a.scrollHeight===b.scrollHeight&&a.scrollLeft===b.scrollLeft&&a.scrollTop===b.scrollTop}};Scrollbar$$module$build$src$core$scrollbar.scrollbarThickness=TOUCH_ENABLED$$module$build$src$core$touch?25:15; +Scrollbar$$module$build$src$core$scrollbar.DEFAULT_SCROLLBAR_MARGIN=.5;var module$build$src$core$scrollbar={};module$build$src$core$scrollbar.Scrollbar=Scrollbar$$module$build$src$core$scrollbar;var domParser$$module$build$src$core$utils$xml={parseFromString:function(){throw Error("DOMParser was not found in the global scope and was not properly injected using injectDependencies");}},xmlSerializer$$module$build$src$core$utils$xml={serializeToString:function(){throw Error("XMLSerializer was not foundin the global scope and was not properly injected using injectDependencies");}},{document:document$$module$build$src$core$utils$xml,DOMParser:DOMParser$$module$build$src$core$utils$xml,XMLSerializer:XMLSerializer$$module$build$src$core$utils$xml}= +globalThis;DOMParser$$module$build$src$core$utils$xml&&(domParser$$module$build$src$core$utils$xml=new DOMParser$$module$build$src$core$utils$xml);XMLSerializer$$module$build$src$core$utils$xml&&(xmlSerializer$$module$build$src$core$utils$xml=new XMLSerializer$$module$build$src$core$utils$xml); +var NAME_SPACE$$module$build$src$core$utils$xml="https://developers.google.com/blockly/xml",INVALID_CONTROL_CHARS$$module$build$src$core$utils$xml=/[\x00-\x09\x0B\x0C\x0E-\x1F]/g,module$build$src$core$utils$xml={NAME_SPACE:NAME_SPACE$$module$build$src$core$utils$xml};module$build$src$core$utils$xml.createElement=$.createElement$$module$build$src$core$utils$xml;module$build$src$core$utils$xml.createTextNode=$.createTextNode$$module$build$src$core$utils$xml; +module$build$src$core$utils$xml.domToText=domToText$$module$build$src$core$utils$xml;module$build$src$core$utils$xml.injectDependencies=injectDependencies$$module$build$src$core$utils$xml;module$build$src$core$utils$xml.textToDom=$.textToDom$$module$build$src$core$utils$xml;var CATEGORY_TOOLBOX_KIND$$module$build$src$core$utils$toolbox="categoryToolbox",FLYOUT_TOOLBOX_KIND$$module$build$src$core$utils$toolbox="flyoutToolbox",Position$$module$build$src$core$utils$toolbox;(function(a){a[a.TOP=0]="TOP";a[a.BOTTOM=1]="BOTTOM";a[a.LEFT=2]="LEFT";a[a.RIGHT=3]="RIGHT"})(Position$$module$build$src$core$utils$toolbox||(Position$$module$build$src$core$utils$toolbox={})); +var TEST_ONLY$$module$build$src$core$utils$toolbox={hasCategoriesInternal:hasCategoriesInternal$$module$build$src$core$utils$toolbox},module$build$src$core$utils$toolbox={};module$build$src$core$utils$toolbox.Position=Position$$module$build$src$core$utils$toolbox;module$build$src$core$utils$toolbox.TEST_ONLY=TEST_ONLY$$module$build$src$core$utils$toolbox;module$build$src$core$utils$toolbox.convertFlyoutDefToJsonArray=convertFlyoutDefToJsonArray$$module$build$src$core$utils$toolbox; +module$build$src$core$utils$toolbox.convertToolboxDefToJson=convertToolboxDefToJson$$module$build$src$core$utils$toolbox;module$build$src$core$utils$toolbox.hasCategories=hasCategories$$module$build$src$core$utils$toolbox;module$build$src$core$utils$toolbox.isCategoryCollapsible=isCategoryCollapsible$$module$build$src$core$utils$toolbox;module$build$src$core$utils$toolbox.parseToolboxTree=parseToolboxTree$$module$build$src$core$utils$toolbox;var verticalPosition$$module$build$src$core$positionable_helpers;(function(a){a[a.TOP=0]="TOP";a[a.BOTTOM=1]="BOTTOM"})(verticalPosition$$module$build$src$core$positionable_helpers||(verticalPosition$$module$build$src$core$positionable_helpers={}));var horizontalPosition$$module$build$src$core$positionable_helpers;(function(a){a[a.LEFT=0]="LEFT";a[a.RIGHT=1]="RIGHT"})(horizontalPosition$$module$build$src$core$positionable_helpers||(horizontalPosition$$module$build$src$core$positionable_helpers={})); +var bumpDirection$$module$build$src$core$positionable_helpers;(function(a){a[a.UP=0]="UP";a[a.DOWN=1]="DOWN"})(bumpDirection$$module$build$src$core$positionable_helpers||(bumpDirection$$module$build$src$core$positionable_helpers={}));var module$build$src$core$positionable_helpers={};module$build$src$core$positionable_helpers.bumpDirection=bumpDirection$$module$build$src$core$positionable_helpers;module$build$src$core$positionable_helpers.bumpPositionRect=bumpPositionRect$$module$build$src$core$positionable_helpers; +module$build$src$core$positionable_helpers.getCornerOppositeToolbox=getCornerOppositeToolbox$$module$build$src$core$positionable_helpers;module$build$src$core$positionable_helpers.getStartPositionRect=getStartPositionRect$$module$build$src$core$positionable_helpers;module$build$src$core$positionable_helpers.horizontalPosition=horizontalPosition$$module$build$src$core$positionable_helpers;module$build$src$core$positionable_helpers.verticalPosition=verticalPosition$$module$build$src$core$positionable_helpers;var SPRITE$$module$build$src$core$sprites={width:96,height:124,url:"sprites.png"},module$build$src$core$sprites={SPRITE:SPRITE$$module$build$src$core$sprites};var ZoomControls$$module$build$src$core$zoom_controls=class{constructor(a){this.workspace=a;this.id="zoomControls";this.boundEvents=[];this.zoomResetGroup=this.zoomOutGroup=this.zoomInGroup=null;this.HEIGHT=this.WIDTH=32;this.SMALL_SPACING=2;this.LARGE_SPACING=11;this.MARGIN_HORIZONTAL=this.MARGIN_VERTICAL=20;this.svgGroup=null;this.top=this.left=0;this.initialized=!1}createDom(){this.svgGroup=createSvgElement$$module$build$src$core$utils$dom(Svg$$module$build$src$core$utils$svg.G,{});const a=String(Math.random()).substring(2); +this.createZoomOutSvg(a);this.createZoomInSvg(a);this.workspace.isMovable()&&this.createZoomResetSvg(a);return this.svgGroup}init(){this.workspace.getComponentManager().addComponent({component:this,weight:2,capabilities:[ComponentManager$$module$build$src$core$component_manager.Capability.POSITIONABLE]});this.initialized=!0}dispose(){this.workspace.getComponentManager().removeComponent("zoomControls");this.svgGroup&&removeNode$$module$build$src$core$utils$dom(this.svgGroup);for(const a of this.boundEvents)unbind$$module$build$src$core$browser_events(a); +this.boundEvents.length=0}getBoundingRectangle(){let a=this.SMALL_SPACING+2*this.HEIGHT;this.zoomResetGroup&&(a+=this.LARGE_SPACING+this.HEIGHT);return new Rect$$module$build$src$core$utils$rect(this.top,this.top+a,this.left,this.left+this.WIDTH)}position(a,b){if(this.initialized){var c=getCornerOppositeToolbox$$module$build$src$core$positionable_helpers(this.workspace,a),d=this.SMALL_SPACING+2*this.HEIGHT;this.zoomResetGroup&&(d+=this.LARGE_SPACING+this.HEIGHT);a=getStartPositionRect$$module$build$src$core$positionable_helpers(c, +new Size$$module$build$src$core$utils$size(this.WIDTH,d),this.MARGIN_HORIZONTAL,this.MARGIN_VERTICAL,a,this.workspace);c=c.vertical;b=bumpPositionRect$$module$build$src$core$positionable_helpers(a,this.MARGIN_VERTICAL,c===verticalPosition$$module$build$src$core$positionable_helpers.TOP?bumpDirection$$module$build$src$core$positionable_helpers.DOWN:bumpDirection$$module$build$src$core$positionable_helpers.UP,b);if(c===verticalPosition$$module$build$src$core$positionable_helpers.TOP){var e=this.SMALL_SPACING+ +this.HEIGHT,f;null==(f=this.zoomInGroup)||f.setAttribute("transform","translate(0, "+e+")");this.zoomResetGroup&&this.zoomResetGroup.setAttribute("transform","translate(0, "+(e+this.LARGE_SPACING+this.HEIGHT)+")")}else{f=this.zoomResetGroup?this.LARGE_SPACING+this.HEIGHT:0;let h;null==(h=this.zoomInGroup)||h.setAttribute("transform","translate(0, "+f+")");f=f+this.SMALL_SPACING+this.HEIGHT;null==(e=this.zoomOutGroup)||e.setAttribute("transform","translate(0, "+f+")")}this.top=b.top;this.left=b.left; +var g;null==(g=this.svgGroup)||g.setAttribute("transform","translate("+this.left+","+this.top+")")}}createZoomOutSvg(a){this.zoomOutGroup=createSvgElement$$module$build$src$core$utils$dom(Svg$$module$build$src$core$utils$svg.G,{"class":"blocklyZoom blocklyZoomOut"},this.svgGroup);const b=createSvgElement$$module$build$src$core$utils$dom(Svg$$module$build$src$core$utils$svg.CLIPPATH,{id:"blocklyZoomoutClipPath"+a},this.zoomOutGroup);createSvgElement$$module$build$src$core$utils$dom(Svg$$module$build$src$core$utils$svg.RECT, +{width:32,height:32},b);createSvgElement$$module$build$src$core$utils$dom(Svg$$module$build$src$core$utils$svg.IMAGE,{width:SPRITE$$module$build$src$core$sprites.width,height:SPRITE$$module$build$src$core$sprites.height,x:-64,y:-92,"clip-path":"url(#blocklyZoomoutClipPath"+a+")"},this.zoomOutGroup).setAttributeNS(XLINK_NS$$module$build$src$core$utils$dom,"xlink:href",this.workspace.options.pathToMedia+SPRITE$$module$build$src$core$sprites.url);this.boundEvents.push(conditionalBind$$module$build$src$core$browser_events(this.zoomOutGroup, +"pointerdown",null,this.zoom.bind(this,-1)))}createZoomInSvg(a){this.zoomInGroup=createSvgElement$$module$build$src$core$utils$dom(Svg$$module$build$src$core$utils$svg.G,{"class":"blocklyZoom blocklyZoomIn"},this.svgGroup);const b=createSvgElement$$module$build$src$core$utils$dom(Svg$$module$build$src$core$utils$svg.CLIPPATH,{id:"blocklyZoominClipPath"+a},this.zoomInGroup);createSvgElement$$module$build$src$core$utils$dom(Svg$$module$build$src$core$utils$svg.RECT,{width:32,height:32},b);createSvgElement$$module$build$src$core$utils$dom(Svg$$module$build$src$core$utils$svg.IMAGE, +{width:SPRITE$$module$build$src$core$sprites.width,height:SPRITE$$module$build$src$core$sprites.height,x:-32,y:-92,"clip-path":"url(#blocklyZoominClipPath"+a+")"},this.zoomInGroup).setAttributeNS(XLINK_NS$$module$build$src$core$utils$dom,"xlink:href",this.workspace.options.pathToMedia+SPRITE$$module$build$src$core$sprites.url);this.boundEvents.push(conditionalBind$$module$build$src$core$browser_events(this.zoomInGroup,"pointerdown",null,this.zoom.bind(this,1)))}zoom(a,b){this.workspace.markFocused(); +this.workspace.zoomCenter(a);this.fireZoomEvent();clearTouchIdentifier$$module$build$src$core$touch();b.stopPropagation();b.preventDefault()}createZoomResetSvg(a){this.zoomResetGroup=createSvgElement$$module$build$src$core$utils$dom(Svg$$module$build$src$core$utils$svg.G,{"class":"blocklyZoom blocklyZoomReset"},this.svgGroup);const b=createSvgElement$$module$build$src$core$utils$dom(Svg$$module$build$src$core$utils$svg.CLIPPATH,{id:"blocklyZoomresetClipPath"+a},this.zoomResetGroup);createSvgElement$$module$build$src$core$utils$dom(Svg$$module$build$src$core$utils$svg.RECT, +{width:32,height:32},b);createSvgElement$$module$build$src$core$utils$dom(Svg$$module$build$src$core$utils$svg.IMAGE,{width:SPRITE$$module$build$src$core$sprites.width,height:SPRITE$$module$build$src$core$sprites.height,y:-92,"clip-path":"url(#blocklyZoomresetClipPath"+a+")"},this.zoomResetGroup).setAttributeNS(XLINK_NS$$module$build$src$core$utils$dom,"xlink:href",this.workspace.options.pathToMedia+SPRITE$$module$build$src$core$sprites.url);this.boundEvents.push(conditionalBind$$module$build$src$core$browser_events(this.zoomResetGroup, +"pointerdown",null,this.resetZoom.bind(this)))}resetZoom(a){this.workspace.markFocused();const b=Math.log(this.workspace.options.zoomOptions.startScale/this.workspace.scale)/Math.log(this.workspace.options.zoomOptions.scaleSpeed);this.workspace.beginCanvasTransition();this.workspace.zoomCenter(b);this.workspace.scrollCenter();setTimeout(this.workspace.endCanvasTransition.bind(this.workspace),500);this.fireZoomEvent();clearTouchIdentifier$$module$build$src$core$touch();a.stopPropagation();a.preventDefault()}fireZoomEvent(){const a= +new (get$$module$build$src$core$events$utils(CLICK$$module$build$src$core$events$utils))(null,this.workspace.id,"zoom_controls");fire$$module$build$src$core$events$utils(a)}};register$$module$build$src$core$css("\n.blocklyZoom>image, .blocklyZoom>svg>image {\n opacity: .4;\n}\n\n.blocklyZoom>image:hover, .blocklyZoom>svg>image:hover {\n opacity: .6;\n}\n\n.blocklyZoom>image:active, .blocklyZoom>svg>image:active {\n opacity: .8;\n}\n");var module$build$src$core$zoom_controls={}; +module$build$src$core$zoom_controls.ZoomControls=ZoomControls$$module$build$src$core$zoom_controls;var IconType$$module$build$src$core$icons$icon_types=class{constructor(a){this.name=a}toString(){return this.name}equals(a){return this.name===a.toString()}};IconType$$module$build$src$core$icons$icon_types.MUTATOR=new IconType$$module$build$src$core$icons$icon_types("mutator");IconType$$module$build$src$core$icons$icon_types.WARNING=new IconType$$module$build$src$core$icons$icon_types("warning");IconType$$module$build$src$core$icons$icon_types.COMMENT=new IconType$$module$build$src$core$icons$icon_types("comment"); +var module$build$src$core$icons$icon_types={};module$build$src$core$icons$icon_types.IconType=IconType$$module$build$src$core$icons$icon_types;(function(a){a[a.VALUE=1]="VALUE";a[a.STATEMENT=3]="STATEMENT";a[a.DUMMY=5]="DUMMY";a[a.CUSTOM=6]="CUSTOM";a[a.END_ROW=7]="END_ROW"})($.inputTypes$$module$build$src$core$inputs$input_types||($.inputTypes$$module$build$src$core$inputs$input_types={}));var module$build$src$core$inputs$input_types={};module$build$src$core$inputs$input_types.inputTypes=$.inputTypes$$module$build$src$core$inputs$input_types;var alertImplementation$$module$build$src$core$dialog=function(a,b){window.alert(a);b&&b()},confirmImplementation$$module$build$src$core$dialog=function(a,b){b(window.confirm(a))},promptImplementation$$module$build$src$core$dialog=function(a,b,c){c(window.prompt(a,b))},TEST_ONLY$$module$build$src$core$dialog={confirmInternal:confirmInternal$$module$build$src$core$dialog},module$build$src$core$dialog={TEST_ONLY:TEST_ONLY$$module$build$src$core$dialog};module$build$src$core$dialog.alert=alert$$module$build$src$core$dialog; +module$build$src$core$dialog.confirm=confirm$$module$build$src$core$dialog;module$build$src$core$dialog.prompt=prompt$$module$build$src$core$dialog;module$build$src$core$dialog.setAlert=setAlert$$module$build$src$core$dialog;module$build$src$core$dialog.setConfirm=setConfirm$$module$build$src$core$dialog;module$build$src$core$dialog.setPrompt=setPrompt$$module$build$src$core$dialog;var module$build$src$core$interfaces$i_variable_backed_parameter_model={};module$build$src$core$interfaces$i_variable_backed_parameter_model.isVariableBackedParameterModel=isVariableBackedParameterModel$$module$build$src$core$interfaces$i_variable_backed_parameter_model;var setLocale$$module$build$src$core$msg,module$build$src$core$msg;$.Msg$$module$build$src$core$msg=Object.create(null);setLocale$$module$build$src$core$msg=function(a){Object.keys(a).forEach(function(b){$.Msg$$module$build$src$core$msg[b]=a[b]})};module$build$src$core$msg={Msg:$.Msg$$module$build$src$core$msg,setLocale:setLocale$$module$build$src$core$msg};var module$build$src$core$interfaces$i_legacy_procedure_blocks={};module$build$src$core$interfaces$i_legacy_procedure_blocks.isLegacyProcedureCallBlock=isLegacyProcedureCallBlock$$module$build$src$core$interfaces$i_legacy_procedure_blocks;module$build$src$core$interfaces$i_legacy_procedure_blocks.isLegacyProcedureDefBlock=isLegacyProcedureDefBlock$$module$build$src$core$interfaces$i_legacy_procedure_blocks;var VarBase$$module$build$src$core$events$events_var_base=class extends Abstract$$module$build$src$core$events$events_abstract{constructor(a){super();this.isBlank="undefined"===typeof a;a&&(this.varId=a.getId(),this.workspaceId=a.workspace.id)}toJson(){const a=super.toJson();if(!this.varId)throw Error("The var ID is undefined. Either pass a variable to the constructor, or call fromJson");a.varId=this.varId;return a}static fromJson(a,b,c){b=super.fromJson(a,b,null!=c?c:new VarBase$$module$build$src$core$events$events_var_base); +b.varId=a.varId;return b}},module$build$src$core$events$events_var_base={};module$build$src$core$events$events_var_base.VarBase=VarBase$$module$build$src$core$events$events_var_base;var VarCreate$$module$build$src$core$events$events_var_create=class extends VarBase$$module$build$src$core$events$events_var_base{constructor(a){super(a);this.type=VAR_CREATE$$module$build$src$core$events$utils;a&&(this.varType=a.type,this.varName=a.name)}toJson(){const a=super.toJson();if(void 0===this.varType)throw Error("The var type is undefined. Either pass a variable to the constructor, or call fromJson");if(!this.varName)throw Error("The var name is undefined. Either pass a variable to the constructor, or call fromJson"); +a.varType=this.varType;a.varName=this.varName;return a}static fromJson(a,b,c){b=super.fromJson(a,b,null!=c?c:new VarCreate$$module$build$src$core$events$events_var_create);b.varType=a.varType;b.varName=a.varName;return b}run(a){const b=this.getEventWorkspace_();if(!this.varId)throw Error("The var ID is undefined. Either pass a variable to the constructor, or call fromJson");if(!this.varName)throw Error("The var name is undefined. Either pass a variable to the constructor, or call fromJson");a?b.createVariable(this.varName, +this.varType,this.varId):b.deleteVariableById(this.varId)}};register$$module$build$src$core$registry(Type$$module$build$src$core$registry.EVENT,VAR_CREATE$$module$build$src$core$events$utils,VarCreate$$module$build$src$core$events$events_var_create);var module$build$src$core$events$events_var_create={};module$build$src$core$events$events_var_create.VarCreate=VarCreate$$module$build$src$core$events$events_var_create;var VariableModel$$module$build$src$core$variable_model=class{constructor(a,b,c,d){this.workspace=a;this.name=b;this.type=c||"";this.id_=d||genUid$$module$build$src$core$utils$idgenerator()}getId(){return this.id_}static compareByName(a,b){return a.name.localeCompare(b.name,void 0,{sensitivity:"base"})}},module$build$src$core$variable_model={};module$build$src$core$variable_model.VariableModel=VariableModel$$module$build$src$core$variable_model;var CATEGORY_NAME$$module$build$src$core$variables="VARIABLE",VAR_LETTER_OPTIONS$$module$build$src$core$variables="ijkmnopqrstuvwxyzabcdefgh",TEST_ONLY$$module$build$src$core$variables={generateUniqueNameInternal:generateUniqueNameInternal$$module$build$src$core$variables},module$build$src$core$variables={CATEGORY_NAME:CATEGORY_NAME$$module$build$src$core$variables,TEST_ONLY:TEST_ONLY$$module$build$src$core$variables,VAR_LETTER_OPTIONS:VAR_LETTER_OPTIONS$$module$build$src$core$variables}; +module$build$src$core$variables.allDeveloperVariables=$.allDeveloperVariables$$module$build$src$core$variables;module$build$src$core$variables.allUsedVarModels=$.allUsedVarModels$$module$build$src$core$variables;module$build$src$core$variables.createVariableButtonHandler=createVariableButtonHandler$$module$build$src$core$variables;module$build$src$core$variables.flyoutCategory=flyoutCategory$$module$build$src$core$variables;module$build$src$core$variables.flyoutCategoryBlocks=flyoutCategoryBlocks$$module$build$src$core$variables; +module$build$src$core$variables.generateUniqueName=generateUniqueName$$module$build$src$core$variables;module$build$src$core$variables.generateUniqueNameFromOptions=generateUniqueNameFromOptions$$module$build$src$core$variables;module$build$src$core$variables.generateVariableFieldDom=generateVariableFieldDom$$module$build$src$core$variables;module$build$src$core$variables.getAddedVariables=getAddedVariables$$module$build$src$core$variables; +module$build$src$core$variables.getOrCreateVariablePackage=$.getOrCreateVariablePackage$$module$build$src$core$variables;module$build$src$core$variables.getVariable=$.getVariable$$module$build$src$core$variables;module$build$src$core$variables.nameUsedWithAnyType=nameUsedWithAnyType$$module$build$src$core$variables;module$build$src$core$variables.nameUsedWithConflictingParam=nameUsedWithConflictingParam$$module$build$src$core$variables;module$build$src$core$variables.promptName=promptName$$module$build$src$core$variables; +module$build$src$core$variables.renameVariable=$.renameVariable$$module$build$src$core$variables;var WorkspaceComment$$module$build$src$core$workspace_comment=class{constructor(a,b,c,d,e){this.workspace=a;this.editable=this.movable=this.deletable=!0;this.disposed_=!1;this.isComment=!0;this.id=e&&!a.getCommentById(e)?e:genUid$$module$build$src$core$utils$idgenerator();a.addTopComment(this);this.xy_=new Coordinate$$module$build$src$core$utils$coordinate(0,0);this.height_=c;this.width_=d;this.RTL=a.RTL;this.content_=b;WorkspaceComment$$module$build$src$core$workspace_comment.fireCreateEvent(this)}dispose(){this.disposed_|| +(isEnabled$$module$build$src$core$events$utils()&&fire$$module$build$src$core$events$utils(new (get$$module$build$src$core$events$utils(COMMENT_DELETE$$module$build$src$core$events$utils))(this)),this.workspace.removeTopComment(this),this.disposed_=!0)}getHeight(){return this.height_}setHeight(a){this.height_=a}getWidth(){return this.width_}setWidth(a){this.width_=a}getRelativeToSurfaceXY(){return new Coordinate$$module$build$src$core$utils$coordinate(this.xy_.x,this.xy_.y)}moveBy(a,b){const c=new (get$$module$build$src$core$events$utils(COMMENT_MOVE$$module$build$src$core$events$utils))(this); +this.xy_.translate(a,b);c.recordNew();fire$$module$build$src$core$events$utils(c)}isDeletable(){return this.deletable&&!(this.workspace&&this.workspace.options.readOnly)}setDeletable(a){this.deletable=a}isMovable(){return this.movable&&!(this.workspace&&this.workspace.options.readOnly)}setMovable(a){this.movable=a}isEditable(){return this.editable&&!(this.workspace&&this.workspace.options.readOnly)}setEditable(a){this.editable=a}getContent(){return this.content_}setContent(a){this.content_!==a&&(fire$$module$build$src$core$events$utils(new (get$$module$build$src$core$events$utils(COMMENT_CHANGE$$module$build$src$core$events$utils))(this, +this.content_,a)),this.content_=a)}toXmlWithXY(a){a=this.toXml(a);a.setAttribute("x",String(Math.round(this.xy_.x)));a.setAttribute("y",String(Math.round(this.xy_.y)));a.setAttribute("h",String(this.height_));a.setAttribute("w",String(this.width_));return a}toXml(a){const b=$.createElement$$module$build$src$core$utils$xml("comment");a||(b.id=this.id);b.textContent=this.getContent();return b}static fireCreateEvent(a){if(isEnabled$$module$build$src$core$events$utils()){const b=$.getGroup$$module$build$src$core$events$utils(); +b||$.setGroup$$module$build$src$core$events$utils(!0);try{fire$$module$build$src$core$events$utils(new (get$$module$build$src$core$events$utils(COMMENT_CREATE$$module$build$src$core$events$utils))(a))}finally{$.setGroup$$module$build$src$core$events$utils(b)}}}static fromXml(a,b){var c=WorkspaceComment$$module$build$src$core$workspace_comment.parseAttributes(a);b=new WorkspaceComment$$module$build$src$core$workspace_comment(b,c.content,c.h,c.w,c.id);c=a.getAttribute("x");a=a.getAttribute("y");c=c? +parseInt(c,10):NaN;a=a?parseInt(a,10):NaN;isNaN(c)||isNaN(a)||b.moveBy(c,a);WorkspaceComment$$module$build$src$core$workspace_comment.fireCreateEvent(b);return b}static parseAttributes(a){const b=a.getAttribute("h"),c=a.getAttribute("w"),d=a.getAttribute("x"),e=a.getAttribute("y"),f=a.getAttribute("id");if(!f)throw Error("No ID present in XML comment definition.");let g;return{id:f,h:b?parseInt(b):100,w:c?parseInt(c):100,x:d?parseInt(d):NaN,y:e?parseInt(e):NaN,content:null!=(g=a.textContent)?g:""}}}, +module$build$src$core$workspace_comment={};module$build$src$core$workspace_comment.WorkspaceComment=WorkspaceComment$$module$build$src$core$workspace_comment;var Selected$$module$build$src$core$events$events_selected=class extends UiBase$$module$build$src$core$events$events_ui_base{constructor(a,b,c){super(c);this.type=SELECTED$$module$build$src$core$events$utils;this.oldElementId=null!=a?a:void 0;this.newElementId=null!=b?b:void 0}toJson(){const a=super.toJson();a.oldElementId=this.oldElementId;a.newElementId=this.newElementId;return a}static fromJson(a,b,c){b=super.fromJson(a,b,null!=c?c:new Selected$$module$build$src$core$events$events_selected);b.oldElementId= +a.oldElementId;b.newElementId=a.newElementId;return b}};register$$module$build$src$core$registry(Type$$module$build$src$core$registry.EVENT,SELECTED$$module$build$src$core$events$utils,Selected$$module$build$src$core$events$events_selected);var module$build$src$core$events$events_selected={};module$build$src$core$events$events_selected.Selected=Selected$$module$build$src$core$events$events_selected;var module$build$src$core$clipboard$registry={};module$build$src$core$clipboard$registry.register=register$$module$build$src$core$clipboard$registry;module$build$src$core$clipboard$registry.unregister=unregister$$module$build$src$core$clipboard$registry;var WorkspaceCommentPaster$$module$build$src$core$clipboard$workspace_comment_paster=class{paste(a,b,c){const d=a.commentState;if(c)d.setAttribute("x",`${c.x}`),d.setAttribute("y",`${c.y}`);else{var e;c=parseInt(null!=(e=d.getAttribute("x"))?e:"0")+50;let f;e=parseInt(null!=(f=d.getAttribute("y"))?f:"0")+50;d.setAttribute("x",`${c}`);d.setAttribute("y",`${e}`)}return WorkspaceCommentSvg$$module$build$src$core$workspace_comment_svg.fromXmlRendered(a.commentState,b)}}; +WorkspaceCommentPaster$$module$build$src$core$clipboard$workspace_comment_paster.TYPE="workspace-comment";register$$module$build$src$core$clipboard$registry(WorkspaceCommentPaster$$module$build$src$core$clipboard$workspace_comment_paster.TYPE,new WorkspaceCommentPaster$$module$build$src$core$clipboard$workspace_comment_paster);var module$build$src$core$clipboard$workspace_comment_paster={};module$build$src$core$clipboard$workspace_comment_paster.WorkspaceCommentPaster=WorkspaceCommentPaster$$module$build$src$core$clipboard$workspace_comment_paster;var RESIZE_SIZE$$module$build$src$core$workspace_comment_svg=8,BORDER_RADIUS$$module$build$src$core$workspace_comment_svg=3,TEXTAREA_OFFSET$$module$build$src$core$workspace_comment_svg=2,WorkspaceCommentSvg$$module$build$src$core$workspace_comment_svg=class extends WorkspaceComment$$module$build$src$core$workspace_comment{constructor(a,b,c,d,e){super(a,b,c,d,e);this.onMouseMoveWrapper=this.onMouseUpWrapper=null;this.eventsInit=!1;this.deleteIconBorder=this.deleteGroup=this.resizeGroup=this.foreignObject= +this.svgHandleTarget=this.svgRectTarget=this.textarea=null;this.rendered=this.autoLayout=this.focused=!1;this.svgGroup=createSvgElement$$module$build$src$core$utils$dom(Svg$$module$build$src$core$utils$svg.G,{"class":"blocklyComment"});this.workspace=a;this.svgRect_=createSvgElement$$module$build$src$core$utils$dom(Svg$$module$build$src$core$utils$svg.RECT,{"class":"blocklyCommentRect",x:0,y:0,rx:BORDER_RADIUS$$module$build$src$core$workspace_comment_svg,ry:BORDER_RADIUS$$module$build$src$core$workspace_comment_svg}); +this.svgGroup.appendChild(this.svgRect_);this.render()}dispose(){this.disposed_||(getSelected$$module$build$src$core$common()===this&&(this.unselect(),this.workspace.cancelCurrentGesture()),isEnabled$$module$build$src$core$events$utils()&&fire$$module$build$src$core$events$utils(new (get$$module$build$src$core$events$utils(COMMENT_DELETE$$module$build$src$core$events$utils))(this)),removeNode$$module$build$src$core$utils$dom(this.svgGroup),$.disable$$module$build$src$core$events$utils(),super.dispose(), +$.enable$$module$build$src$core$events$utils())}initSvg(a){if(!this.workspace.rendered)throw TypeError("Workspace is headless.");this.workspace.options.readOnly||this.eventsInit||(conditionalBind$$module$build$src$core$browser_events(this.svgRectTarget,"pointerdown",this,this.pathMouseDown),conditionalBind$$module$build$src$core$browser_events(this.svgHandleTarget,"pointerdown",this,this.pathMouseDown));this.eventsInit=!0;this.updateMovable();this.getSvgRoot().parentNode||this.workspace.getBubbleCanvas().appendChild(this.getSvgRoot()); +!a&&this.textarea&&this.textarea.select()}pathMouseDown(a){const b=this.workspace.getGesture(a);b&&b.handleBubbleStart(a,this)}showContextMenu(a){throw Error("The implementation of showContextMenu should be monkey-patched in by blockly.ts");}select(){if(getSelected$$module$build$src$core$common()!==this){var a=null;if(getSelected$$module$build$src$core$common()){a=getSelected$$module$build$src$core$common().id;$.disable$$module$build$src$core$events$utils();try{getSelected$$module$build$src$core$common().unselect()}finally{$.enable$$module$build$src$core$events$utils()}}a= +new (get$$module$build$src$core$events$utils(SELECTED$$module$build$src$core$events$utils))(a,this.id,this.workspace.id);fire$$module$build$src$core$events$utils(a);setSelected$$module$build$src$core$common(this);this.addSelect()}}unselect(){if(getSelected$$module$build$src$core$common()===this){var a=new (get$$module$build$src$core$events$utils(SELECTED$$module$build$src$core$events$utils))(this.id,null,this.workspace.id);fire$$module$build$src$core$events$utils(a);setSelected$$module$build$src$core$common(null); +this.removeSelect();this.blurFocus()}}addSelect(){addClass$$module$build$src$core$utils$dom(this.svgGroup,"blocklySelected");this.setFocus()}removeSelect(){addClass$$module$build$src$core$utils$dom(this.svgGroup,"blocklySelected");this.blurFocus()}addFocus(){addClass$$module$build$src$core$utils$dom(this.svgGroup,"blocklyFocused")}removeFocus(){removeClass$$module$build$src$core$utils$dom(this.svgGroup,"blocklyFocused")}getRelativeToSurfaceXY(){let a=0,b=0,c=this.getSvgRoot();if(c){do{const d=getRelativeXY$$module$build$src$core$utils$svg_math(c); +a+=d.x;b+=d.y;c=c.parentNode}while(c&&c!==this.workspace.getBubbleCanvas()&&null!==c)}return this.xy_=new Coordinate$$module$build$src$core$utils$coordinate(a,b)}moveBy(a,b){const c=new (get$$module$build$src$core$events$utils(COMMENT_MOVE$$module$build$src$core$events$utils))(this),d=this.getRelativeToSurfaceXY();this.translate(d.x+a,d.y+b);this.xy_=new Coordinate$$module$build$src$core$utils$coordinate(d.x+a,d.y+b);c.recordNew();fire$$module$build$src$core$events$utils(c);this.workspace.resizeContents()}translate(a, +b){this.xy_=new Coordinate$$module$build$src$core$utils$coordinate(a,b);this.getSvgRoot().setAttribute("transform","translate("+a+","+b+")")}moveDuringDrag(a){a=`translate(${a.x}, ${a.y})`;this.getSvgRoot().setAttribute("transform",a)}moveTo(a,b){this.translate(a,b)}clearTransformAttributes(){this.getSvgRoot().removeAttribute("transform")}getBoundingRectangle(){var a=this.getRelativeToSurfaceXY();const b=this.getHeightWidth(),c=a.y,d=a.y+b.height;let e;this.RTL?(e=a.x-b.width,a=a.x):(e=a.x,a=a.x+ +b.width);return new Rect$$module$build$src$core$utils$rect(c,d,e,a)}updateMovable(){this.isMovable()?addClass$$module$build$src$core$utils$dom(this.svgGroup,"blocklyDraggable"):removeClass$$module$build$src$core$utils$dom(this.svgGroup,"blocklyDraggable")}setMovable(a){super.setMovable(a);this.updateMovable()}setEditable(a){super.setEditable(a);this.textarea&&(this.textarea.readOnly=!a)}setDragging(a){a?addClass$$module$build$src$core$utils$dom(this.getSvgRoot(),"blocklyDragging"):removeClass$$module$build$src$core$utils$dom(this.getSvgRoot(), +"blocklyDragging")}getSvgRoot(){return this.svgGroup}getContent(){return this.textarea?this.textarea.value:this.content_}setContent(a){super.setContent(a);this.textarea&&(this.textarea.value=a)}setDeleteStyle(a){a?addClass$$module$build$src$core$utils$dom(this.svgGroup,"blocklyDraggingDelete"):removeClass$$module$build$src$core$utils$dom(this.svgGroup,"blocklyDraggingDelete")}setAutoLayout(a){}toXmlWithXY(a){let b=0;this.workspace.RTL&&(b=this.workspace.getWidth());a=this.toXml(a);const c=this.getRelativeToSurfaceXY(); +a.setAttribute("x",String(Math.round(this.workspace.RTL?b-c.x:c.x)));a.setAttribute("y",String(Math.round(c.y)));a.setAttribute("h",String(this.getHeight()));a.setAttribute("w",String(this.getWidth()));return a}toCopyData(){return{paster:WorkspaceCommentPaster$$module$build$src$core$clipboard$workspace_comment_paster.TYPE,commentState:this.toXmlWithXY()}}getHeightWidth(){return{width:this.getWidth(),height:this.getHeight()}}render(){if(!this.rendered){var a=this.getHeightWidth(),b=this.createEditor(); +this.svgGroup.appendChild(b);this.svgHandleTarget=createSvgElement$$module$build$src$core$utils$dom(Svg$$module$build$src$core$utils$svg.RECT,{"class":"blocklyCommentHandleTarget",x:0,y:0});this.svgGroup.appendChild(this.svgHandleTarget);this.svgRectTarget=createSvgElement$$module$build$src$core$utils$dom(Svg$$module$build$src$core$utils$svg.RECT,{"class":"blocklyCommentTarget",x:0,y:0,rx:BORDER_RADIUS$$module$build$src$core$workspace_comment_svg,ry:BORDER_RADIUS$$module$build$src$core$workspace_comment_svg}); +this.svgGroup.appendChild(this.svgRectTarget);this.addResizeDom();this.isDeletable()&&this.addDeleteDom();this.setSize(a.width,a.height);this.textarea.value=this.content_;this.rendered=!0;this.resizeGroup&&conditionalBind$$module$build$src$core$browser_events(this.resizeGroup,"pointerdown",this,this.resizeMouseDown);this.isDeletable()&&(conditionalBind$$module$build$src$core$browser_events(this.deleteGroup,"pointerdown",this,this.deleteMouseDown),conditionalBind$$module$build$src$core$browser_events(this.deleteGroup, +"pointerout",this,this.deleteMouseOut),conditionalBind$$module$build$src$core$browser_events(this.deleteGroup,"pointerup",this,this.deleteMouseUp))}}createEditor(){this.foreignObject=createSvgElement$$module$build$src$core$utils$dom(Svg$$module$build$src$core$utils$svg.FOREIGNOBJECT,{x:0,y:WorkspaceCommentSvg$$module$build$src$core$workspace_comment_svg.TOP_OFFSET,"class":"blocklyCommentForeignObject"});const a=document.createElementNS(HTML_NS$$module$build$src$core$utils$dom,"body");a.setAttribute("xmlns", +HTML_NS$$module$build$src$core$utils$dom);a.className="blocklyMinimalBody";const b=document.createElementNS(HTML_NS$$module$build$src$core$utils$dom,"textarea");b.className="blocklyCommentTextarea";b.setAttribute("dir",this.RTL?"RTL":"LTR");b.readOnly=!this.isEditable();a.appendChild(b);this.textarea=b;this.foreignObject.appendChild(a);conditionalBind$$module$build$src$core$browser_events(b,"wheel",this,function(c){c.stopPropagation()});conditionalBind$$module$build$src$core$browser_events(b,"change", +this,function(c){this.setContent(b.value)});return this.foreignObject}addResizeDom(){this.resizeGroup=createSvgElement$$module$build$src$core$utils$dom(Svg$$module$build$src$core$utils$svg.G,{"class":this.RTL?"blocklyResizeSW":"blocklyResizeSE"},this.svgGroup);createSvgElement$$module$build$src$core$utils$dom(Svg$$module$build$src$core$utils$svg.POLYGON,{points:`0,${RESIZE_SIZE$$module$build$src$core$workspace_comment_svg} ${RESIZE_SIZE$$module$build$src$core$workspace_comment_svg},${RESIZE_SIZE$$module$build$src$core$workspace_comment_svg} ${RESIZE_SIZE$$module$build$src$core$workspace_comment_svg},0`}, +this.resizeGroup);createSvgElement$$module$build$src$core$utils$dom(Svg$$module$build$src$core$utils$svg.LINE,{"class":"blocklyResizeLine",x1:RESIZE_SIZE$$module$build$src$core$workspace_comment_svg/3,y1:RESIZE_SIZE$$module$build$src$core$workspace_comment_svg-1,x2:RESIZE_SIZE$$module$build$src$core$workspace_comment_svg-1,y2:RESIZE_SIZE$$module$build$src$core$workspace_comment_svg/3},this.resizeGroup);createSvgElement$$module$build$src$core$utils$dom(Svg$$module$build$src$core$utils$svg.LINE,{"class":"blocklyResizeLine", +x1:2*RESIZE_SIZE$$module$build$src$core$workspace_comment_svg/3,y1:RESIZE_SIZE$$module$build$src$core$workspace_comment_svg-1,x2:RESIZE_SIZE$$module$build$src$core$workspace_comment_svg-1,y2:2*RESIZE_SIZE$$module$build$src$core$workspace_comment_svg/3},this.resizeGroup)}addDeleteDom(){this.deleteGroup=createSvgElement$$module$build$src$core$utils$dom(Svg$$module$build$src$core$utils$svg.G,{"class":"blocklyCommentDeleteIcon"},this.svgGroup);this.deleteIconBorder=createSvgElement$$module$build$src$core$utils$dom(Svg$$module$build$src$core$utils$svg.CIRCLE, +{"class":"blocklyDeleteIconShape",r:"7",cx:"7.5",cy:"7.5"},this.deleteGroup);createSvgElement$$module$build$src$core$utils$dom(Svg$$module$build$src$core$utils$svg.LINE,{x1:"5",y1:"10",x2:"10",y2:"5",stroke:"#fff","stroke-width":"2"},this.deleteGroup);createSvgElement$$module$build$src$core$utils$dom(Svg$$module$build$src$core$utils$svg.LINE,{x1:"5",y1:"5",x2:"10",y2:"10",stroke:"#fff","stroke-width":"2"},this.deleteGroup)}resizeMouseDown(a){this.unbindDragEvents();isRightButton$$module$build$src$core$browser_events(a)|| +(this.workspace.startDrag(a,new Coordinate$$module$build$src$core$utils$coordinate(this.workspace.RTL?-this.width_:this.width_,this.height_)),this.onMouseUpWrapper=conditionalBind$$module$build$src$core$browser_events(document,"pointerup",this,this.resizeMouseUp),this.onMouseMoveWrapper=conditionalBind$$module$build$src$core$browser_events(document,"pointermove",this,this.resizeMouseMove),this.workspace.hideChaff());a.stopPropagation()}deleteMouseDown(a){this.deleteIconBorder&&addClass$$module$build$src$core$utils$dom(this.deleteIconBorder, +"blocklyDeleteIconHighlighted");a.stopPropagation()}deleteMouseOut(a){this.deleteIconBorder&&removeClass$$module$build$src$core$utils$dom(this.deleteIconBorder,"blocklyDeleteIconHighlighted")}deleteMouseUp(a){this.dispose();a.stopPropagation()}unbindDragEvents(){this.onMouseUpWrapper&&(unbind$$module$build$src$core$browser_events(this.onMouseUpWrapper),this.onMouseUpWrapper=null);this.onMouseMoveWrapper&&(unbind$$module$build$src$core$browser_events(this.onMouseMoveWrapper),this.onMouseMoveWrapper= +null)}resizeMouseUp(a){clearTouchIdentifier$$module$build$src$core$touch();this.unbindDragEvents()}resizeMouseMove(a){this.autoLayout=!1;a=this.workspace.moveDrag(a);this.setSize(this.RTL?-a.x:a.x,a.y)}resizeComment(){const a=this.getHeightWidth(),b=WorkspaceCommentSvg$$module$build$src$core$workspace_comment_svg.TOP_OFFSET,c=2*TEXTAREA_OFFSET$$module$build$src$core$workspace_comment_svg;let d;null==(d=this.foreignObject)||d.setAttribute("width",String(a.width));let e;null==(e=this.foreignObject)|| +e.setAttribute("height",String(a.height-b));if(this.RTL){let f;null==(f=this.foreignObject)||f.setAttribute("x",String(-a.width))}this.textarea&&(this.textarea.style.width=a.width-c+"px",this.textarea.style.height=a.height-c-b+"px")}setSize(a,b){a=Math.max(a,45);b=Math.max(b,20+WorkspaceCommentSvg$$module$build$src$core$workspace_comment_svg.TOP_OFFSET);this.width_=a;this.height_=b;this.svgRect_.setAttribute("width",`${a}`);this.svgRect_.setAttribute("height",`${b}`);let c;null==(c=this.svgRectTarget)|| +c.setAttribute("width",`${a}`);let d;null==(d=this.svgRectTarget)||d.setAttribute("height",`${b}`);let e;null==(e=this.svgHandleTarget)||e.setAttribute("width",`${a}`);let f;null==(f=this.svgHandleTarget)||f.setAttribute("height",String(WorkspaceCommentSvg$$module$build$src$core$workspace_comment_svg.TOP_OFFSET));if(this.RTL){this.svgRect_.setAttribute("transform","scale(-1 1)");let g;null==(g=this.svgRectTarget)||g.setAttribute("transform","scale(-1 1)")}if(this.resizeGroup)if(this.RTL){this.resizeGroup.setAttribute("transform", +"translate("+(-a+RESIZE_SIZE$$module$build$src$core$workspace_comment_svg)+","+(b-RESIZE_SIZE$$module$build$src$core$workspace_comment_svg)+") scale(-1 1)");let g;null==(g=this.deleteGroup)||g.setAttribute("transform","translate("+(-a+RESIZE_SIZE$$module$build$src$core$workspace_comment_svg)+","+-RESIZE_SIZE$$module$build$src$core$workspace_comment_svg+") scale(-1 1)")}else{this.resizeGroup.setAttribute("transform","translate("+(a-RESIZE_SIZE$$module$build$src$core$workspace_comment_svg)+","+(b-RESIZE_SIZE$$module$build$src$core$workspace_comment_svg)+ +")");let g;null==(g=this.deleteGroup)||g.setAttribute("transform","translate("+(a-RESIZE_SIZE$$module$build$src$core$workspace_comment_svg)+","+-RESIZE_SIZE$$module$build$src$core$workspace_comment_svg+")")}this.resizeComment()}setFocus(){this.focused=!0;setTimeout(()=>{this.disposed_||(this.textarea.focus(),this.addFocus(),this.svgRectTarget&&addClass$$module$build$src$core$utils$dom(this.svgRectTarget,"blocklyCommentTargetFocused"),this.svgHandleTarget&&addClass$$module$build$src$core$utils$dom(this.svgHandleTarget, +"blocklyCommentHandleTargetFocused"))},0)}blurFocus(){this.focused=!1;setTimeout(()=>{this.disposed_||(this.textarea.blur(),this.removeFocus(),this.svgRectTarget&&removeClass$$module$build$src$core$utils$dom(this.svgRectTarget,"blocklyCommentTargetFocused"),this.svgHandleTarget&&removeClass$$module$build$src$core$utils$dom(this.svgHandleTarget,"blocklyCommentHandleTargetFocused"))},0)}static fromXmlRendered(a,b,c){$.disable$$module$build$src$core$events$utils();let d;try{const e=WorkspaceComment$$module$build$src$core$workspace_comment.parseAttributes(a); +d=new WorkspaceCommentSvg$$module$build$src$core$workspace_comment_svg(b,e.content,e.h,e.w,e.id);b.rendered&&(d.initSvg(!0),d.render());if(!isNaN(e.x)&&!isNaN(e.y))if(b.RTL){const f=c||b.getWidth();d.moveBy(f-e.x,e.y)}else d.moveBy(e.x,e.y)}finally{$.enable$$module$build$src$core$events$utils()}WorkspaceComment$$module$build$src$core$workspace_comment.fireCreateEvent(d);return d}};WorkspaceCommentSvg$$module$build$src$core$workspace_comment_svg.DEFAULT_SIZE=100; +WorkspaceCommentSvg$$module$build$src$core$workspace_comment_svg.TOP_OFFSET=10;register$$module$build$src$core$css("\n.blocklyCommentForeignObject {\n position: relative;\n z-index: 0;\n}\n\n.blocklyCommentRect {\n fill: #E7DE8E;\n stroke: #bcA903;\n stroke-width: 1px;\n}\n\n.blocklyCommentTarget {\n fill: transparent;\n stroke: #bcA903;\n}\n\n.blocklyCommentTargetFocused {\n fill: none;\n}\n\n.blocklyCommentHandleTarget {\n fill: none;\n}\n\n.blocklyCommentHandleTargetFocused {\n fill: transparent;\n}\n\n.blocklyFocused>.blocklyCommentRect {\n fill: #B9B272;\n stroke: #B9B272;\n}\n\n.blocklySelected>.blocklyCommentTarget {\n stroke: #fc3;\n stroke-width: 3px;\n}\n\n.blocklyCommentDeleteIcon {\n cursor: pointer;\n fill: #000;\n display: none;\n}\n\n.blocklySelected > .blocklyCommentDeleteIcon {\n display: block;\n}\n\n.blocklyDeleteIconShape {\n fill: #000;\n stroke: #000;\n stroke-width: 1px;\n}\n\n.blocklyDeleteIconShape.blocklyDeleteIconHighlighted {\n stroke: #fc3;\n}\n"); +var module$build$src$core$workspace_comment_svg={};module$build$src$core$workspace_comment_svg.WorkspaceCommentSvg=WorkspaceCommentSvg$$module$build$src$core$workspace_comment_svg;var rootBlocks$$module$build$src$core$render_management=new Set,dirtyBlocks$$module$build$src$core$render_management=new WeakSet,afterRendersPromise$$module$build$src$core$render_management=null,afterRendersResolver$$module$build$src$core$render_management=null,animationRequestId$$module$build$src$core$render_management=0,module$build$src$core$render_management={};module$build$src$core$render_management.finishQueuedRenders=finishQueuedRenders$$module$build$src$core$render_management; +module$build$src$core$render_management.queueRender=queueRender$$module$build$src$core$render_management;module$build$src$core$render_management.triggerQueuedRenders=triggerQueuedRenders$$module$build$src$core$render_management;var module$build$src$core$xml={};module$build$src$core$xml.appendDomToWorkspace=appendDomToWorkspace$$module$build$src$core$xml;module$build$src$core$xml.blockToDom=blockToDom$$module$build$src$core$xml;module$build$src$core$xml.blockToDomWithXY=blockToDomWithXY$$module$build$src$core$xml;module$build$src$core$xml.clearWorkspaceAndLoadFromXml=clearWorkspaceAndLoadFromXml$$module$build$src$core$xml;module$build$src$core$xml.deleteNext=deleteNext$$module$build$src$core$xml; +module$build$src$core$xml.domToBlock=$.domToBlock$$module$build$src$core$xml;module$build$src$core$xml.domToBlockInternal=domToBlockInternal$$module$build$src$core$xml;module$build$src$core$xml.domToPrettyText=domToPrettyText$$module$build$src$core$xml;module$build$src$core$xml.domToText=domToText$$module$build$src$core$xml;module$build$src$core$xml.domToVariables=domToVariables$$module$build$src$core$xml;module$build$src$core$xml.domToWorkspace=$.domToWorkspace$$module$build$src$core$xml; +module$build$src$core$xml.variablesToDom=variablesToDom$$module$build$src$core$xml;module$build$src$core$xml.workspaceToDom=workspaceToDom$$module$build$src$core$xml;var module$build$src$core$interfaces$i_serializable={};module$build$src$core$interfaces$i_serializable.isSerializable=isSerializable$$module$build$src$core$interfaces$i_serializable;var DeserializationError$$module$build$src$core$serialization$exceptions=class extends Error{},MissingBlockType$$module$build$src$core$serialization$exceptions=class extends DeserializationError$$module$build$src$core$serialization$exceptions{constructor(a){super("Expected to find a 'type' property, defining the block type");this.state=a}},MissingConnection$$module$build$src$core$serialization$exceptions=class extends DeserializationError$$module$build$src$core$serialization$exceptions{constructor(a, +b,c){super(`The block ${b.toDevString()} is missing a(n) ${a} +connection`);this.block=b;this.state=c}},BadConnectionCheck$$module$build$src$core$serialization$exceptions=class extends DeserializationError$$module$build$src$core$serialization$exceptions{constructor(a,b,c,d){super(`The block ${c.toDevString()} could not connect its +${b} to its parent, because: ${a}`);this.childBlock=c;this.childState=d}},RealChildOfShadow$$module$build$src$core$serialization$exceptions=class extends DeserializationError$$module$build$src$core$serialization$exceptions{constructor(a){super("Encountered a real block which is defined as a child of a shadow\nblock. It is an invariant of Blockly that shadow blocks only have shadow\nchildren");this.state=a}},UnregisteredIcon$$module$build$src$core$serialization$exceptions=class extends DeserializationError$$module$build$src$core$serialization$exceptions{constructor(a, +b,c){super(`Cannot add an icon of type '${a}' to the block `+`${b.toDevString()}, because there is no icon registered with `+`type '${a}'. Make sure that all of your icons have been `+"registered.");this.block=b;this.state=c}},module$build$src$core$serialization$exceptions={};module$build$src$core$serialization$exceptions.BadConnectionCheck=BadConnectionCheck$$module$build$src$core$serialization$exceptions;module$build$src$core$serialization$exceptions.DeserializationError=DeserializationError$$module$build$src$core$serialization$exceptions; +module$build$src$core$serialization$exceptions.MissingBlockType=MissingBlockType$$module$build$src$core$serialization$exceptions;module$build$src$core$serialization$exceptions.MissingConnection=MissingConnection$$module$build$src$core$serialization$exceptions;module$build$src$core$serialization$exceptions.RealChildOfShadow=RealChildOfShadow$$module$build$src$core$serialization$exceptions;module$build$src$core$serialization$exceptions.UnregisteredIcon=UnregisteredIcon$$module$build$src$core$serialization$exceptions;var VARIABLES$$module$build$src$core$serialization$priorities=100,PROCEDURES$$module$build$src$core$serialization$priorities=75,BLOCKS$$module$build$src$core$serialization$priorities=50,module$build$src$core$serialization$priorities={BLOCKS:BLOCKS$$module$build$src$core$serialization$priorities,PROCEDURES:PROCEDURES$$module$build$src$core$serialization$priorities,VARIABLES:VARIABLES$$module$build$src$core$serialization$priorities};var module$build$src$core$serialization$registry={};module$build$src$core$serialization$registry.register=register$$module$build$src$core$serialization$registry;module$build$src$core$serialization$registry.unregister=unregister$$module$build$src$core$serialization$registry;var saveBlock$$module$build$src$core$serialization$blocks=save$$module$build$src$core$serialization$blocks,BlockSerializer$$module$build$src$core$serialization$blocks=class{constructor(){this.priority=BLOCKS$$module$build$src$core$serialization$priorities}save(a){const b=[];for(const c of a.getTopBlocks(!1))(a=save$$module$build$src$core$serialization$blocks(c,{addCoordinates:!0,doFullSerialization:!1}))&&b.push(a);return b.length?{languageVersion:0,blocks:b}:null}load(a,b){a=a.blocks;for(const c of a)append$$module$build$src$core$serialization$blocks(c, +b,{recordUndo:getRecordUndo$$module$build$src$core$events$utils()})}clear(a){for(const b of a.getTopBlocks(!1))b.dispose(!1)}};register$$module$build$src$core$serialization$registry("blocks",new BlockSerializer$$module$build$src$core$serialization$blocks);var module$build$src$core$serialization$blocks={};module$build$src$core$serialization$blocks.BlockSerializer=BlockSerializer$$module$build$src$core$serialization$blocks;module$build$src$core$serialization$blocks.append=append$$module$build$src$core$serialization$blocks; +module$build$src$core$serialization$blocks.appendInternal=appendInternal$$module$build$src$core$serialization$blocks;module$build$src$core$serialization$blocks.save=save$$module$build$src$core$serialization$blocks;var BlockBase$$module$build$src$core$events$events_block_base=class extends Abstract$$module$build$src$core$events$events_abstract{constructor(a){super();this.isBlank=!a;a&&(this.blockId=a.id,this.workspaceId=a.workspace.id)}toJson(){const a=super.toJson();if(!this.blockId)throw Error("The block ID is undefined. Either pass a block to the constructor, or call fromJson");a.blockId=this.blockId;return a}static fromJson(a,b,c){b=super.fromJson(a,b,null!=c?c:new BlockBase$$module$build$src$core$events$events_block_base); +b.blockId=a.blockId;return b}},module$build$src$core$events$events_block_base={};module$build$src$core$events$events_block_base.BlockBase=BlockBase$$module$build$src$core$events$events_block_base;var BlockCreate$$module$build$src$core$events$events_block_create=class extends BlockBase$$module$build$src$core$events$events_block_base{constructor(a){super(a);this.type=$.CREATE$$module$build$src$core$events$utils;a&&(a.isShadow()&&(this.recordUndo=!1),this.xml=blockToDomWithXY$$module$build$src$core$xml(a),this.ids=getDescendantIds$$module$build$src$core$events$utils(a),this.json=save$$module$build$src$core$serialization$blocks(a,{addCoordinates:!0}))}toJson(){const a=super.toJson();if(!this.xml)throw Error("The block XML is undefined. Either pass a block to the constructor, or call fromJson"); +if(!this.ids)throw Error("The block IDs are undefined. Either pass a block to the constructor, or call fromJson");if(!this.json)throw Error("The block JSON is undefined. Either pass a block to the constructor, or call fromJson");a.xml=domToText$$module$build$src$core$xml(this.xml);a.ids=this.ids;a.json=this.json;this.recordUndo||(a.recordUndo=this.recordUndo);return a}static fromJson(a,b,c){b=super.fromJson(a,b,null!=c?c:new BlockCreate$$module$build$src$core$events$events_block_create);b.xml=$.textToDom$$module$build$src$core$utils$xml(a.xml); +b.ids=a.ids;b.json=a.json;void 0!==a.recordUndo&&(b.recordUndo=a.recordUndo);return b}run(a){const b=this.getEventWorkspace_();if(!this.json)throw Error("The block JSON is undefined. Either pass a block to the constructor, or call fromJson");if(!this.ids)throw Error("The block IDs are undefined. Either pass a block to the constructor, or call fromJson");if(!allShadowBlocks$$module$build$src$core$events$events_block_create(b,this.ids))if(a)append$$module$build$src$core$serialization$blocks(this.json, +b);else for(a=0;aa.getBlockById(c)).filter(c=>c&&c.isShadow()).length===b.length};register$$module$build$src$core$registry(Type$$module$build$src$core$registry.EVENT,$.CREATE$$module$build$src$core$events$utils,BlockCreate$$module$build$src$core$events$events_block_create); +var module$build$src$core$events$events_block_create={};module$build$src$core$events$events_block_create.BlockCreate=BlockCreate$$module$build$src$core$events$events_block_create;var ThemeChange$$module$build$src$core$events$events_theme_change=class extends UiBase$$module$build$src$core$events$events_ui_base{constructor(a,b){super(b);this.type=THEME_CHANGE$$module$build$src$core$events$utils;this.themeName=a}toJson(){const a=super.toJson();if(!this.themeName)throw Error("The theme name is undefined. Either pass a theme name to the constructor, or call fromJson");a.themeName=this.themeName;return a}static fromJson(a,b,c){b=super.fromJson(a,b,null!=c?c:new ThemeChange$$module$build$src$core$events$events_theme_change); +b.themeName=a.themeName;return b}};register$$module$build$src$core$registry(Type$$module$build$src$core$registry.EVENT,THEME_CHANGE$$module$build$src$core$events$utils,ThemeChange$$module$build$src$core$events$events_theme_change);var module$build$src$core$events$events_theme_change={};module$build$src$core$events$events_theme_change.ThemeChange=ThemeChange$$module$build$src$core$events$events_theme_change;var ViewportChange$$module$build$src$core$events$events_viewport=class extends UiBase$$module$build$src$core$events$events_ui_base{constructor(a,b,c,d,e){super(d);this.type=VIEWPORT_CHANGE$$module$build$src$core$events$utils;this.viewTop=a;this.viewLeft=b;this.scale=c;this.oldScale=e}toJson(){const a=super.toJson();if(void 0===this.viewTop)throw Error("The view top is undefined. Either pass a value to the constructor, or call fromJson");if(void 0===this.viewLeft)throw Error("The view left is undefined. Either pass a value to the constructor, or call fromJson"); +if(void 0===this.scale)throw Error("The scale is undefined. Either pass a value to the constructor, or call fromJson");if(void 0===this.oldScale)throw Error("The old scale is undefined. Either pass a value to the constructor, or call fromJson");a.viewTop=this.viewTop;a.viewLeft=this.viewLeft;a.scale=this.scale;a.oldScale=this.oldScale;return a}static fromJson(a,b,c){b=super.fromJson(a,b,null!=c?c:new ViewportChange$$module$build$src$core$events$events_viewport);b.viewTop=a.viewTop;b.viewLeft=a.viewLeft; +b.scale=a.scale;b.oldScale=a.oldScale;return b}};register$$module$build$src$core$registry(Type$$module$build$src$core$registry.EVENT,VIEWPORT_CHANGE$$module$build$src$core$events$utils,ViewportChange$$module$build$src$core$events$events_viewport);var module$build$src$core$events$events_viewport={};module$build$src$core$events$events_viewport.ViewportChange=ViewportChange$$module$build$src$core$events$events_viewport;var DEFAULT_SNAP_RADIUS$$module$build$src$core$config,module$build$src$core$config;DEFAULT_SNAP_RADIUS$$module$build$src$core$config=28;$.config$$module$build$src$core$config={dragRadius:5,flyoutDragRadius:10,snapRadius:DEFAULT_SNAP_RADIUS$$module$build$src$core$config,connectingSnapRadius:DEFAULT_SNAP_RADIUS$$module$build$src$core$config,currentConnectionPreference:8,bumpDelay:250};module$build$src$core$config={config:$.config$$module$build$src$core$config};var ConnectionType$$module$build$src$core$connection_type;(function(a){a[a.INPUT_VALUE=1]="INPUT_VALUE";a[a.OUTPUT_VALUE=2]="OUTPUT_VALUE";a[a.NEXT_STATEMENT=3]="NEXT_STATEMENT";a[a.PREVIOUS_STATEMENT=4]="PREVIOUS_STATEMENT"})(ConnectionType$$module$build$src$core$connection_type||(ConnectionType$$module$build$src$core$connection_type={}));var module$build$src$core$connection_type={};module$build$src$core$connection_type.ConnectionType=ConnectionType$$module$build$src$core$connection_type;var ConnectionDB$$module$build$src$core$connection_db=class{constructor(a){this.connectionChecker=a;this.connections=[]}addConnection(a,b){b=this.calculateIndexForYPos(b);this.connections.splice(b,0,a)}findIndexOfConnection(a,b){if(!this.connections.length)return-1;const c=this.calculateIndexForYPos(b);if(c>=this.connections.length)return-1;b=a.y;let d=c;for(;0<=d&&this.connections[d].y===b;){if(this.connections[d]===a)return d;d--}for(d=c;da)c=d;else{b=d;break}}return b}removeConnection(a,b){a=this.findIndexOfConnection(a,b);if(-1===a)throw Error("Unable to find connection in connectionDB.");this.connections.splice(a,1)}getNeighbours(a,b){function c(l){const m=e-d[l].x,n=f-d[l].y;Math.sqrt(m*m+n*n)<=b&&k.push(d[l]); +return na?this.menuItems.length:a,-1)}highlightFirst(){this.highlightHelper(-1,1)}highlightLast(){this.highlightHelper(this.menuItems.length,-1)}highlightHelper(a, +b){a+=b;let c;for(;c=this.menuItems[a];){if(c.isEnabled()){this.setHighlighted(c);break}a+=b}}handleMouseOver(a){(a=this.getMenuItem(a.target))&&(a.isEnabled()?this.highlightedItem!==a&&this.setHighlighted(a):this.setHighlighted(null))}handleClick(a){const b=this.openingCoords;this.openingCoords=null;if(b&&"number"===typeof a.clientX){const c=new Coordinate$$module$build$src$core$utils$coordinate(a.clientX,a.clientY);if(1>Coordinate$$module$build$src$core$utils$coordinate.distance(b,c))return}(a= +this.getMenuItem(a.target))&&a.performAction()}handleMouseEnter(a){this.focus()}handleMouseLeave(a){this.getElement()&&(this.blur(),this.setHighlighted(null))}handleKeyEvent(a){if(this.menuItems.length&&!(a.shiftKey||a.ctrlKey||a.metaKey||a.altKey)){var b=this.highlightedItem;switch(a.key){case "Enter":case " ":b&&b.performAction();break;case "ArrowUp":this.highlightPrevious();break;case "ArrowDown":this.highlightNext();break;case "PageUp":case "Home":this.highlightFirst();break;case "PageDown":case "End":this.highlightLast(); +break;default:return}a.preventDefault();a.stopPropagation()}}getSize(){const a=this.getElement(),b=getSize$$module$build$src$core$utils$style(a);b.height=a.scrollHeight;return b}},module$build$src$core$menu={};module$build$src$core$menu.Menu=Menu$$module$build$src$core$menu;var MenuItem$$module$build$src$core$menuitem=class{constructor(a,b){this.content=a;this.opt_value=b;this.enabled=!0;this.element=null;this.rightToLeft=!1;this.roleName=null;this.highlight=this.checked=this.checkable=!1;this.actionHandler=null}createDom(){const a=document.createElement("div");a.id=getNextUniqueId$$module$build$src$core$utils$idgenerator();this.element=a;a.className="blocklyMenuItem goog-menuitem "+(this.enabled?"":"blocklyMenuItemDisabled goog-menuitem-disabled ")+(this.checked?"blocklyMenuItemSelected goog-option-selected ": +"")+(this.highlight?"blocklyMenuItemHighlight goog-menuitem-highlight ":"")+(this.rightToLeft?"blocklyMenuItemRtl goog-menuitem-rtl ":"");const b=document.createElement("div");b.className="blocklyMenuItemContent goog-menuitem-content";if(this.checkable){var c=document.createElement("div");c.className="blocklyMenuItemCheckbox goog-menuitem-checkbox";b.appendChild(c)}c=this.content;"string"===typeof this.content&&(c=document.createTextNode(this.content));b.appendChild(c);a.appendChild(b);this.roleName&& +setRole$$module$build$src$core$utils$aria(a,this.roleName);setState$$module$build$src$core$utils$aria(a,State$$module$build$src$core$utils$aria.SELECTED,this.checkable&&this.checked||!1);setState$$module$build$src$core$utils$aria(a,State$$module$build$src$core$utils$aria.DISABLED,!this.enabled);return a}dispose(){this.element=null}getElement(){return this.element}getId(){return this.element.id}getValue(){let a;return null!=(a=this.opt_value)?a:null}setRightToLeft(a){this.rightToLeft=a}setRole(a){this.roleName= +a}setCheckable(a){this.checkable=a}setChecked(a){this.checked=a}setHighlighted(a){this.highlight=a;const b=this.getElement();b&&this.isEnabled()&&(a?(addClass$$module$build$src$core$utils$dom(b,"blocklyMenuItemHighlight"),addClass$$module$build$src$core$utils$dom(b,"goog-menuitem-highlight")):(removeClass$$module$build$src$core$utils$dom(b,"blocklyMenuItemHighlight"),removeClass$$module$build$src$core$utils$dom(b,"goog-menuitem-highlight")))}isEnabled(){return this.enabled}setEnabled(a){this.enabled= +a}performAction(){this.isEnabled()&&this.actionHandler&&this.actionHandler(this)}onAction(a,b){this.actionHandler=a.bind(b)}},module$build$src$core$menuitem={};module$build$src$core$menuitem.MenuItem=MenuItem$$module$build$src$core$menuitem;var owner$$module$build$src$core$widgetdiv=null,dispose$$module$build$src$core$widgetdiv=null,rendererClassName$$module$build$src$core$widgetdiv="",themeClassName$$module$build$src$core$widgetdiv="",containerDiv$$module$build$src$core$widgetdiv,module$build$src$core$widgetdiv={};module$build$src$core$widgetdiv.createDom=createDom$$module$build$src$core$widgetdiv;module$build$src$core$widgetdiv.getDiv=getDiv$$module$build$src$core$widgetdiv;module$build$src$core$widgetdiv.hide=hide$$module$build$src$core$widgetdiv; +module$build$src$core$widgetdiv.hideIfOwner=hideIfOwner$$module$build$src$core$widgetdiv;module$build$src$core$widgetdiv.isVisible=isVisible$$module$build$src$core$widgetdiv;module$build$src$core$widgetdiv.positionWithAnchor=positionWithAnchor$$module$build$src$core$widgetdiv;module$build$src$core$widgetdiv.repositionForWindowResize=repositionForWindowResize$$module$build$src$core$widgetdiv;module$build$src$core$widgetdiv.show=show$$module$build$src$core$widgetdiv; +module$build$src$core$widgetdiv.testOnly_setDiv=testOnly_setDiv$$module$build$src$core$widgetdiv;var currentBlock$$module$build$src$core$contextmenu=null,dummyOwner$$module$build$src$core$contextmenu={},menu_$$module$build$src$core$contextmenu=null,module$build$src$core$contextmenu={};module$build$src$core$contextmenu.callbackFactory=$.callbackFactory$$module$build$src$core$contextmenu;module$build$src$core$contextmenu.commentDeleteOption=commentDeleteOption$$module$build$src$core$contextmenu;module$build$src$core$contextmenu.commentDuplicateOption=commentDuplicateOption$$module$build$src$core$contextmenu; +module$build$src$core$contextmenu.dispose=dispose$$module$build$src$core$contextmenu;module$build$src$core$contextmenu.getCurrentBlock=getCurrentBlock$$module$build$src$core$contextmenu;module$build$src$core$contextmenu.hide=hide$$module$build$src$core$contextmenu;module$build$src$core$contextmenu.setCurrentBlock=setCurrentBlock$$module$build$src$core$contextmenu;module$build$src$core$contextmenu.show=show$$module$build$src$core$contextmenu; +module$build$src$core$contextmenu.workspaceCommentOption=workspaceCommentOption$$module$build$src$core$contextmenu;var ContextMenuRegistry$$module$build$src$core$contextmenu_registry=class{constructor(){this.registry_=new Map;this.reset()}reset(){this.registry_.clear()}register(a){if(this.registry_.has(a.id))throw Error('Menu item with ID "'+a.id+'" is already registered.');this.registry_.set(a.id,a)}unregister(a){if(!this.registry_.has(a))throw Error('Menu item with ID "'+a+'" not found.');this.registry_.delete(a)}getItem(a){let b;return null!=(b=this.registry_.get(a))?b:null}getContextMenuOptions(a,b){const c= +[];for(const e of this.registry_.values())if(a===e.scopeType){var d=e.preconditionFn(b);"hidden"!==d&&(d={text:"function"===typeof e.displayText?e.displayText(b):e.displayText,enabled:"enabled"===d,callback:e.callback,scope:b,weight:e.weight},c.push(d))}c.sort(function(e,f){return e.weight-f.weight});return c}}; +(function(a){var b=a.ScopeType||(a.ScopeType={});b.BLOCK="block";b.WORKSPACE="workspace";a.registry=new a})(ContextMenuRegistry$$module$build$src$core$contextmenu_registry||(ContextMenuRegistry$$module$build$src$core$contextmenu_registry={}));var ScopeType$$module$build$src$core$contextmenu_registry=ContextMenuRegistry$$module$build$src$core$contextmenu_registry.ScopeType,module$build$src$core$contextmenu_registry={};module$build$src$core$contextmenu_registry.ContextMenuRegistry=ContextMenuRegistry$$module$build$src$core$contextmenu_registry; +module$build$src$core$contextmenu_registry.ScopeType=ScopeType$$module$build$src$core$contextmenu_registry;var module$build$src$core$utils$math={};module$build$src$core$utils$math.clamp=clamp$$module$build$src$core$utils$math;module$build$src$core$utils$math.toDegrees=toDegrees$$module$build$src$core$utils$math;module$build$src$core$utils$math.toRadians=toRadians$$module$build$src$core$utils$math;var ARROW_SIZE$$module$build$src$core$dropdowndiv=16,BORDER_SIZE$$module$build$src$core$dropdowndiv=1,ARROW_HORIZONTAL_PADDING$$module$build$src$core$dropdowndiv=12,PADDING_Y$$module$build$src$core$dropdowndiv=16,ANIMATION_TIME$$module$build$src$core$dropdowndiv=.25,animateOutTimer$$module$build$src$core$dropdowndiv=null,onHide$$module$build$src$core$dropdowndiv=null,renderedClassName$$module$build$src$core$dropdowndiv="",themeClassName$$module$build$src$core$dropdowndiv="",div$$module$build$src$core$dropdowndiv, +content$$module$build$src$core$dropdowndiv,arrow$$module$build$src$core$dropdowndiv,boundsElement$$module$build$src$core$dropdowndiv=null,owner$$module$build$src$core$dropdowndiv=null,positionToField$$module$build$src$core$dropdowndiv=null,internal$$module$build$src$core$dropdowndiv={getBoundsInfo:function(){const a=getPageOffset$$module$build$src$core$utils$style(boundsElement$$module$build$src$core$dropdowndiv),b=getSize$$module$build$src$core$utils$style(boundsElement$$module$build$src$core$dropdowndiv); +return{left:a.x,right:a.x+b.width,top:a.y,bottom:a.y+b.height,width:b.width,height:b.height}},getPositionMetrics:function(a,b,c,d){const e=internal$$module$build$src$core$dropdowndiv.getBoundsInfo(),f=getSize$$module$build$src$core$utils$style(div$$module$build$src$core$dropdowndiv);return b+f.heighte.top?getPositionAboveMetrics$$module$build$src$core$dropdowndiv(c,d,e,f):b+f.heightdocument.documentElement.clientTop?getPositionAboveMetrics$$module$build$src$core$dropdowndiv(c,d,e,f):getPositionTopOfPageMetrics$$module$build$src$core$dropdowndiv(a,e,f)}},TEST_ONLY$$module$build$src$core$dropdowndiv=internal$$module$build$src$core$dropdowndiv,module$build$src$core$dropdowndiv={ANIMATION_TIME:ANIMATION_TIME$$module$build$src$core$dropdowndiv,ARROW_HORIZONTAL_PADDING:ARROW_HORIZONTAL_PADDING$$module$build$src$core$dropdowndiv, +ARROW_SIZE:ARROW_SIZE$$module$build$src$core$dropdowndiv,BORDER_SIZE:BORDER_SIZE$$module$build$src$core$dropdowndiv,PADDING_Y:PADDING_Y$$module$build$src$core$dropdowndiv,TEST_ONLY:internal$$module$build$src$core$dropdowndiv};module$build$src$core$dropdowndiv.clearContent=clearContent$$module$build$src$core$dropdowndiv;module$build$src$core$dropdowndiv.createDom=createDom$$module$build$src$core$dropdowndiv;module$build$src$core$dropdowndiv.getContentDiv=getContentDiv$$module$build$src$core$dropdowndiv; +module$build$src$core$dropdowndiv.getOwner=getOwner$$module$build$src$core$dropdowndiv;module$build$src$core$dropdowndiv.getPositionX=getPositionX$$module$build$src$core$dropdowndiv;module$build$src$core$dropdowndiv.hide=hide$$module$build$src$core$dropdowndiv;module$build$src$core$dropdowndiv.hideIfOwner=hideIfOwner$$module$build$src$core$dropdowndiv;module$build$src$core$dropdowndiv.hideWithoutAnimation=hideWithoutAnimation$$module$build$src$core$dropdowndiv; +module$build$src$core$dropdowndiv.isVisible=isVisible$$module$build$src$core$dropdowndiv;module$build$src$core$dropdowndiv.repositionForWindowResize=repositionForWindowResize$$module$build$src$core$dropdowndiv;module$build$src$core$dropdowndiv.setBoundsElement=setBoundsElement$$module$build$src$core$dropdowndiv;module$build$src$core$dropdowndiv.setColour=setColour$$module$build$src$core$dropdowndiv;module$build$src$core$dropdowndiv.show=show$$module$build$src$core$dropdowndiv; +module$build$src$core$dropdowndiv.showPositionedByBlock=showPositionedByBlock$$module$build$src$core$dropdowndiv;module$build$src$core$dropdowndiv.showPositionedByField=showPositionedByField$$module$build$src$core$dropdowndiv;var disconnectPid$$module$build$src$core$block_animations=null,wobblingBlock$$module$build$src$core$block_animations=null,module$build$src$core$block_animations={};module$build$src$core$block_animations.connectionUiEffect=connectionUiEffect$$module$build$src$core$block_animations;module$build$src$core$block_animations.disconnectUiEffect=disconnectUiEffect$$module$build$src$core$block_animations;module$build$src$core$block_animations.disconnectUiStop=disconnectUiStop$$module$build$src$core$block_animations; +module$build$src$core$block_animations.disposeUiEffect=disposeUiEffect$$module$build$src$core$block_animations;var BubbleDragger$$module$build$src$core$bubble_dragger=class{constructor(a,b){this.bubble=a;this.workspace=b;this.dragTarget_=null;this.wouldDeleteBubble_=!1;this.startXY_=this.bubble.getRelativeToSurfaceXY()}startBubbleDrag(){$.getGroup$$module$build$src$core$events$utils()||$.setGroup$$module$build$src$core$events$utils(!0);this.workspace.setResizesEnabled(!1);this.bubble.setAutoLayout&&this.bubble.setAutoLayout(!1);this.bubble.setDragging&&this.bubble.setDragging(!0)}dragBubble(a,b){b=this.pixelsToWorkspaceUnits_(b); +b=Coordinate$$module$build$src$core$utils$coordinate.sum(this.startXY_,b);this.bubble.moveDuringDrag(b);b=this.dragTarget_;this.dragTarget_=this.workspace.getDragTarget(a);a=this.wouldDeleteBubble_;this.wouldDeleteBubble_=this.shouldDelete_(this.dragTarget_);a!==this.wouldDeleteBubble_&&this.updateCursorDuringBubbleDrag_();this.dragTarget_!==b&&(b&&b.onDragExit(this.bubble),this.dragTarget_&&this.dragTarget_.onDragEnter(this.bubble));this.dragTarget_&&this.dragTarget_.onDragOver(this.bubble)}shouldDelete_(a){return a&& +this.workspace.getComponentManager().hasCapability(a.id,ComponentManager$$module$build$src$core$component_manager.Capability.DELETE_AREA)?a.wouldDelete(this.bubble,!1):!1}updateCursorDuringBubbleDrag_(){this.bubble.setDeleteStyle(this.wouldDeleteBubble_)}endBubbleDrag(a,b){this.dragBubble(a,b);this.dragTarget_&&this.dragTarget_.shouldPreventMove(this.bubble)?a=this.startXY_:(a=this.pixelsToWorkspaceUnits_(b),a=Coordinate$$module$build$src$core$utils$coordinate.sum(this.startXY_,a));this.bubble.moveTo(a.x, +a.y);if(this.dragTarget_)this.dragTarget_.onDrop(this.bubble);this.wouldDeleteBubble_?(this.fireMoveEvent_(),this.bubble.dispose()):(this.bubble.setDragging&&this.bubble.setDragging(!1),this.fireMoveEvent_());this.workspace.setResizesEnabled(!0);$.setGroup$$module$build$src$core$events$utils(!1)}fireMoveEvent_(){if(this.bubble instanceof WorkspaceCommentSvg$$module$build$src$core$workspace_comment_svg){const a=new (get$$module$build$src$core$events$utils(COMMENT_MOVE$$module$build$src$core$events$utils))(this.bubble); +a.setOldCoordinate(this.startXY_);a.recordNew();fire$$module$build$src$core$events$utils(a)}}pixelsToWorkspaceUnits_(a){a=new Coordinate$$module$build$src$core$utils$coordinate(a.x/this.workspace.scale,a.y/this.workspace.scale);this.workspace.isMutator&&a.scale(1/this.workspace.options.parentWorkspace.scale);return a}},module$build$src$core$bubble_dragger={};module$build$src$core$bubble_dragger.BubbleDragger=BubbleDragger$$module$build$src$core$bubble_dragger;var COLLAPSE_CHARS$$module$build$src$core$internal_constants=30,DRAG_STACK$$module$build$src$core$internal_constants=!0,OPPOSITE_TYPE$$module$build$src$core$internal_constants=[];OPPOSITE_TYPE$$module$build$src$core$internal_constants[ConnectionType$$module$build$src$core$connection_type.INPUT_VALUE]=ConnectionType$$module$build$src$core$connection_type.OUTPUT_VALUE;OPPOSITE_TYPE$$module$build$src$core$internal_constants[ConnectionType$$module$build$src$core$connection_type.OUTPUT_VALUE]=ConnectionType$$module$build$src$core$connection_type.INPUT_VALUE; +OPPOSITE_TYPE$$module$build$src$core$internal_constants[ConnectionType$$module$build$src$core$connection_type.NEXT_STATEMENT]=ConnectionType$$module$build$src$core$connection_type.PREVIOUS_STATEMENT;OPPOSITE_TYPE$$module$build$src$core$internal_constants[ConnectionType$$module$build$src$core$connection_type.PREVIOUS_STATEMENT]=ConnectionType$$module$build$src$core$connection_type.NEXT_STATEMENT; +var RENAME_VARIABLE_ID$$module$build$src$core$internal_constants="RENAME_VARIABLE_ID",DELETE_VARIABLE_ID$$module$build$src$core$internal_constants="DELETE_VARIABLE_ID",module$build$src$core$internal_constants={COLLAPSE_CHARS:COLLAPSE_CHARS$$module$build$src$core$internal_constants,DELETE_VARIABLE_ID:DELETE_VARIABLE_ID$$module$build$src$core$internal_constants,DRAG_STACK:DRAG_STACK$$module$build$src$core$internal_constants,OPPOSITE_TYPE:OPPOSITE_TYPE$$module$build$src$core$internal_constants,RENAME_VARIABLE_ID:RENAME_VARIABLE_ID$$module$build$src$core$internal_constants};var module$build$src$core$utils$string={};module$build$src$core$utils$string.commonWordPrefix=commonWordPrefix$$module$build$src$core$utils$string;module$build$src$core$utils$string.commonWordSuffix=commonWordSuffix$$module$build$src$core$utils$string;module$build$src$core$utils$string.isNumber=$.isNumber$$module$build$src$core$utils$string;module$build$src$core$utils$string.shortestStringLength=shortestStringLength$$module$build$src$core$utils$string; +module$build$src$core$utils$string.startsWith=startsWith$$module$build$src$core$utils$string;module$build$src$core$utils$string.wrap=$.wrap$$module$build$src$core$utils$string;var customTooltip$$module$build$src$core$tooltip=void 0,visible$$module$build$src$core$tooltip=!1,blocked$$module$build$src$core$tooltip=!1,LIMIT$$module$build$src$core$tooltip=50,mouseOutPid$$module$build$src$core$tooltip=0,showPid$$module$build$src$core$tooltip=0,lastX$$module$build$src$core$tooltip=0,lastY$$module$build$src$core$tooltip=0,element$$module$build$src$core$tooltip=null,poisonedElement$$module$build$src$core$tooltip=null,OFFSET_X$$module$build$src$core$tooltip=0,OFFSET_Y$$module$build$src$core$tooltip= +10,RADIUS_OK$$module$build$src$core$tooltip=10,HOVER_MS$$module$build$src$core$tooltip=750,MARGINS$$module$build$src$core$tooltip=5,containerDiv$$module$build$src$core$tooltip=null,module$build$src$core$tooltip={HOVER_MS:HOVER_MS$$module$build$src$core$tooltip,LIMIT:LIMIT$$module$build$src$core$tooltip,MARGINS:MARGINS$$module$build$src$core$tooltip,OFFSET_X:OFFSET_X$$module$build$src$core$tooltip,OFFSET_Y:OFFSET_Y$$module$build$src$core$tooltip,RADIUS_OK:RADIUS_OK$$module$build$src$core$tooltip}; +module$build$src$core$tooltip.bindMouseEvents=bindMouseEvents$$module$build$src$core$tooltip;module$build$src$core$tooltip.block=block$$module$build$src$core$tooltip;module$build$src$core$tooltip.createDom=createDom$$module$build$src$core$tooltip;module$build$src$core$tooltip.dispose=dispose$$module$build$src$core$tooltip;module$build$src$core$tooltip.getCustomTooltip=getCustomTooltip$$module$build$src$core$tooltip;module$build$src$core$tooltip.getDiv=getDiv$$module$build$src$core$tooltip; +module$build$src$core$tooltip.getTooltipOfObject=getTooltipOfObject$$module$build$src$core$tooltip;module$build$src$core$tooltip.hide=hide$$module$build$src$core$tooltip;module$build$src$core$tooltip.isVisible=isVisible$$module$build$src$core$tooltip;module$build$src$core$tooltip.setCustomTooltip=setCustomTooltip$$module$build$src$core$tooltip;module$build$src$core$tooltip.unbindMouseEvents=unbindMouseEvents$$module$build$src$core$tooltip;module$build$src$core$tooltip.unblock=unblock$$module$build$src$core$tooltip;var WorkspaceDragger$$module$build$src$core$workspace_dragger=class{constructor(a){this.workspace=a;this.horizontalScrollEnabled_=this.workspace.isMovableHorizontally();this.verticalScrollEnabled_=this.workspace.isMovableVertically();this.startScrollXY_=new Coordinate$$module$build$src$core$utils$coordinate(a.scrollX,a.scrollY)}dispose(){this.workspace=null}startDrag(){getSelected$$module$build$src$core$common()&&getSelected$$module$build$src$core$common().unselect()}endDrag(a){this.drag(a)}drag(a){a= +Coordinate$$module$build$src$core$utils$coordinate.sum(this.startScrollXY_,a);if(this.horizontalScrollEnabled_&&this.verticalScrollEnabled_)this.workspace.scroll(a.x,a.y);else if(this.horizontalScrollEnabled_)this.workspace.scroll(a.x,this.workspace.scrollY);else if(this.verticalScrollEnabled_)this.workspace.scroll(this.workspace.scrollX,a.y);else throw new TypeError("Invalid state.");}},module$build$src$core$workspace_dragger={};module$build$src$core$workspace_dragger.WorkspaceDragger=WorkspaceDragger$$module$build$src$core$workspace_dragger;var ZOOM_IN_MULTIPLIER$$module$build$src$core$gesture=5,ZOOM_OUT_MULTIPLIER$$module$build$src$core$gesture=6,Gesture$$module$build$src$core$gesture=class{constructor(a,b){this.creatorWorkspace=b;this.mouseDownXY=new Coordinate$$module$build$src$core$utils$coordinate(0,0);this.startWorkspace_=this.targetBlock=this.startBlock=this.startIcon=this.startField=this.startBubble=null;this.hasExceededDragRadius=!1;this.boundEvents=[];this.flyout=this.workspaceDragger=this.blockDragger=this.bubbleDragger=null; +this.isMultiTouch_=this.isEnding_=this.gestureHasStarted=this.calledUpdateIsDragging=!1;this.cachedPoints=new Map;this.startDistance=this.previousScale=0;this.currentDropdownOwner=this.isPinchZoomEnabled=null;this.mostRecentEvent=a;this.currentDragDeltaXY=new Coordinate$$module$build$src$core$utils$coordinate(0,0);this.healStack=!DRAG_STACK$$module$build$src$core$internal_constants}dispose(){clearTouchIdentifier$$module$build$src$core$touch();unblock$$module$build$src$core$tooltip();this.creatorWorkspace.clearGesture(); +for(const a of this.boundEvents)unbind$$module$build$src$core$browser_events(a);this.boundEvents.length=0;this.blockDragger&&this.blockDragger.dispose();this.workspaceDragger&&this.workspaceDragger.dispose()}updateFromEvent(a){const b=new Coordinate$$module$build$src$core$utils$coordinate(a.clientX,a.clientY);this.updateDragDelta(b)&&(this.updateIsDragging(),longStop$$module$build$src$core$touch());this.mostRecentEvent=a}updateDragDelta(a){this.currentDragDeltaXY=Coordinate$$module$build$src$core$utils$coordinate.difference(a, +this.mouseDownXY);return this.hasExceededDragRadius?!1:this.hasExceededDragRadius=Coordinate$$module$build$src$core$utils$coordinate.magnitude(this.currentDragDeltaXY)>(this.flyout?$.config$$module$build$src$core$config.flyoutDragRadius:$.config$$module$build$src$core$config.dragRadius)}updateIsDraggingFromFlyout(){let a;if(!this.targetBlock||null==(a=this.flyout)||!a.isBlockCreatable(this.targetBlock))return!1;if(!this.flyout.targetWorkspace)throw Error("Cannot update dragging from the flyout because the ' +\n 'flyout's target workspace is undefined"); +return!this.flyout.isScrollable()||this.flyout.isDragTowardWorkspace(this.currentDragDeltaXY)?(this.startWorkspace_=this.flyout.targetWorkspace,this.startWorkspace_.updateScreenCalculationsIfScrolled(),$.getGroup$$module$build$src$core$events$utils()||$.setGroup$$module$build$src$core$events$utils(!0),this.startBlock=null,this.targetBlock=this.flyout.createBlock(this.targetBlock),this.targetBlock.select(),!0):!1}updateIsDraggingBubble(){if(!this.startBubble)return!1;this.startDraggingBubble();return!0}updateIsDraggingBlock(){if(!this.targetBlock)return!1; +if(this.flyout){if(this.updateIsDraggingFromFlyout())return this.startDraggingBlock(),!0}else if(this.targetBlock.isMovable())return this.startDraggingBlock(),!0;return!1}updateIsDraggingWorkspace(){if(!this.startWorkspace_)throw Error("Cannot update dragging the workspace because the start workspace is undefined");if(this.flyout?this.flyout.isScrollable():this.startWorkspace_&&this.startWorkspace_.isDraggable())this.workspaceDragger=new WorkspaceDragger$$module$build$src$core$workspace_dragger(this.startWorkspace_), +this.workspaceDragger.startDrag()}updateIsDragging(){if(this.calledUpdateIsDragging)throw Error("updateIsDragging_ should only be called once per gesture.");this.calledUpdateIsDragging=!0;this.updateIsDraggingBubble()||this.updateIsDraggingBlock()||this.updateIsDraggingWorkspace()}startDraggingBlock(){this.blockDragger=new (getClassFromOptions$$module$build$src$core$registry(Type$$module$build$src$core$registry.BLOCK_DRAGGER,this.creatorWorkspace.options,!0))(this.targetBlock,this.startWorkspace_); +this.blockDragger.startDrag(this.currentDragDeltaXY,this.healStack);this.blockDragger.drag(this.mostRecentEvent,this.currentDragDeltaXY)}startDraggingBubble(){if(!this.startBubble)throw Error("Cannot update dragging the bubble because the start bubble is undefined");if(!this.startWorkspace_)throw Error("Cannot update dragging the bubble because the start workspace is undefined");this.bubbleDragger=new BubbleDragger$$module$build$src$core$bubble_dragger(this.startBubble,this.startWorkspace_);this.bubbleDragger.startBubbleDrag(); +this.bubbleDragger.dragBubble(this.mostRecentEvent,this.currentDragDeltaXY)}doStart(a){if(!this.startWorkspace_)throw Error("Cannot start the touch gesture becauase the start workspace is undefined");this.isPinchZoomEnabled=this.startWorkspace_.options.zoomOptions&&this.startWorkspace_.options.zoomOptions.pinch;isTargetInput$$module$build$src$core$browser_events(a)?this.cancel():(this.gestureHasStarted=!0,disconnectUiStop$$module$build$src$core$block_animations(),this.startWorkspace_.updateScreenCalculationsIfScrolled(), +this.startWorkspace_.isMutator&&this.startWorkspace_.resize(),this.currentDropdownOwner=getOwner$$module$build$src$core$dropdowndiv(),this.startWorkspace_.hideChaff(!!this.flyout),this.startWorkspace_.markFocused(),this.mostRecentEvent=a,block$$module$build$src$core$tooltip(),this.targetBlock&&this.targetBlock.select(),isRightButton$$module$build$src$core$browser_events(a)?this.handleRightClick(a):("pointerdown"===a.type.toLowerCase()&&"mouse"!==a.pointerType&&longStart$$module$build$src$core$touch(a, +this),this.mouseDownXY=new Coordinate$$module$build$src$core$utils$coordinate(a.clientX,a.clientY),this.healStack=a.altKey||a.ctrlKey||a.metaKey,this.bindMouseEvents(a),this.isEnding_||this.handleTouchStart(a)))}bindMouseEvents(a){this.boundEvents.push(conditionalBind$$module$build$src$core$browser_events(document,"pointerdown",null,this.handleStart.bind(this),!0));this.boundEvents.push(conditionalBind$$module$build$src$core$browser_events(document,"pointermove",null,this.handleMove.bind(this),!0)); +this.boundEvents.push(conditionalBind$$module$build$src$core$browser_events(document,"pointerup",null,this.handleUp.bind(this),!0));a.preventDefault();a.stopPropagation()}handleStart(a){this.isDragging()||(this.handleTouchStart(a),this.isMultiTouch()&&longStop$$module$build$src$core$touch())}handleMove(a){this.isDragging()&&shouldHandleEvent$$module$build$src$core$touch(a)||!this.isMultiTouch()?(this.updateFromEvent(a),this.workspaceDragger?this.workspaceDragger.drag(this.currentDragDeltaXY):this.blockDragger? +this.blockDragger.drag(this.mostRecentEvent,this.currentDragDeltaXY):this.bubbleDragger&&this.bubbleDragger.dragBubble(this.mostRecentEvent,this.currentDragDeltaXY),a.preventDefault(),a.stopPropagation()):this.isMultiTouch()&&(this.handleTouchMove(a),longStop$$module$build$src$core$touch())}handleUp(a){this.isDragging()||this.handleTouchEnd(a);if(!this.isMultiTouch()||this.isDragging()){if(!shouldHandleEvent$$module$build$src$core$touch(a))return;this.updateFromEvent(a);longStop$$module$build$src$core$touch(); +if(this.isEnding_){console.log("Trying to end a gesture recursively.");return}this.isEnding_=!0;this.bubbleDragger?this.bubbleDragger.endBubbleDrag(a,this.currentDragDeltaXY):this.blockDragger?this.blockDragger.endDrag(a,this.currentDragDeltaXY):this.workspaceDragger?this.workspaceDragger.endDrag(this.currentDragDeltaXY):this.isBubbleClick()?this.doBubbleClick():this.isFieldClick()?this.doFieldClick():this.isIconClick()?this.doIconClick():this.isBlockClick()?this.doBlockClick():this.isWorkspaceClick()&& +this.doWorkspaceClick(a)}a.preventDefault();a.stopPropagation();this.dispose()}handleTouchStart(a){var b=getTouchIdentifierFromEvent$$module$build$src$core$touch(a);this.cachedPoints.set(b,this.getTouchPoint(a));var c=Array.from(this.cachedPoints.keys());2===c.length&&(b=this.cachedPoints.get(c[0]),c=this.cachedPoints.get(c[1]),this.startDistance=Coordinate$$module$build$src$core$utils$coordinate.distance(b,c),this.isMultiTouch_=!0,a.preventDefault())}handleTouchMove(a){const b=getTouchIdentifierFromEvent$$module$build$src$core$touch(a); +this.cachedPoints.set(b,this.getTouchPoint(a));this.isPinchZoomEnabled&&2===this.cachedPoints.size?this.handlePinch(a):this.handleMove(a)}handlePinch(a){var b=Array.from(this.cachedPoints.keys()),c=this.cachedPoints.get(b[0]);b=this.cachedPoints.get(b[1]);c=Coordinate$$module$build$src$core$utils$coordinate.distance(c,b)/this.startDistance;if(0this.previousScale){b=c-this.previousScale;b=0this.cachedPoints.size&&(this.cachedPoints.clear(),this.previousScale=0)}getTouchPoint(a){return this.startWorkspace_? +new Coordinate$$module$build$src$core$utils$coordinate(a.pageX,a.pageY):null}isMultiTouch(){return this.isMultiTouch_}cancel(){this.isEnding_||(longStop$$module$build$src$core$touch(),this.bubbleDragger?this.bubbleDragger.endBubbleDrag(this.mostRecentEvent,this.currentDragDeltaXY):this.blockDragger?this.blockDragger.endDrag(this.mostRecentEvent,this.currentDragDeltaXY):this.workspaceDragger&&this.workspaceDragger.endDrag(this.currentDragDeltaXY),this.dispose())}handleRightClick(a){this.targetBlock? +(this.bringBlockToFront(),this.targetBlock.workspace.hideChaff(!!this.flyout),this.targetBlock.showContextMenu(a)):this.startBubble?this.startBubble.showContextMenu(a):this.startWorkspace_&&!this.flyout&&(this.startWorkspace_.hideChaff(),this.startWorkspace_.showContextMenu(a));a.preventDefault();a.stopPropagation();this.dispose()}handleWsStart(a,b){if(this.gestureHasStarted)throw Error("Tried to call gesture.handleWsStart, but the gesture had already been started.");this.setStartWorkspace(b);this.mostRecentEvent= +a;this.doStart(a)}fireWorkspaceClick(a){fire$$module$build$src$core$events$utils(new (get$$module$build$src$core$events$utils(CLICK$$module$build$src$core$events$utils))(null,a.id,"workspace"))}handleFlyoutStart(a,b){if(this.gestureHasStarted)throw Error("Tried to call gesture.handleFlyoutStart, but the gesture had already been started.");this.setStartFlyout(b);this.handleWsStart(a,b.getWorkspace())}handleBlockStart(a,b){if(this.gestureHasStarted)throw Error("Tried to call gesture.handleBlockStart, but the gesture had already been started."); +this.setStartBlock(b);this.mostRecentEvent=a}handleBubbleStart(a,b){if(this.gestureHasStarted)throw Error("Tried to call gesture.handleBubbleStart, but the gesture had already been started.");this.setStartBubble(b);this.mostRecentEvent=a}doBubbleClick(){this.startBubble instanceof WorkspaceCommentSvg$$module$build$src$core$workspace_comment_svg&&(this.startBubble.setFocus(),this.startBubble.select())}doFieldClick(){if(!this.startField)throw Error("Cannot do a field click because the start field is undefined"); +this.currentDropdownOwner!==this.startField&&this.startField.showEditor(this.mostRecentEvent);this.bringBlockToFront()}doIconClick(){if(!this.startIcon)throw Error("Cannot do an icon click because the start icon is undefined");this.startIcon.onClick()}doBlockClick(){if(this.flyout&&this.flyout.autoClose){if(!this.targetBlock)throw Error("Cannot do a block click because the target block is undefined");this.targetBlock.isEnabled()&&($.getGroup$$module$build$src$core$events$utils()||$.setGroup$$module$build$src$core$events$utils(!0), +this.flyout.createBlock(this.targetBlock).scheduleSnapAndBump())}else{if(!this.startWorkspace_)throw Error("Cannot do a block click because the start workspace is undefined");const a=new (get$$module$build$src$core$events$utils(CLICK$$module$build$src$core$events$utils))(this.startBlock,this.startWorkspace_.id,"block");fire$$module$build$src$core$events$utils(a)}this.bringBlockToFront();$.setGroup$$module$build$src$core$events$utils(!1)}doWorkspaceClick(a){a=this.creatorWorkspace;getSelected$$module$build$src$core$common()&& +getSelected$$module$build$src$core$common().unselect();this.fireWorkspaceClick(this.startWorkspace_||a)}bringBlockToFront(){this.targetBlock&&!this.flyout&&this.targetBlock.bringToFront()}setStartField(a){if(this.gestureHasStarted)throw Error("Tried to call gesture.setStartField, but the gesture had already been started.");this.startField||(this.startField=a)}setStartIcon(a){if(this.gestureHasStarted)throw Error("Tried to call gesture.setStartIcon, but the gesture had already been started.");this.startIcon|| +(this.startIcon=a)}setStartBubble(a){this.startBubble||(this.startBubble=a)}setStartBlock(a){this.startBlock||this.startBubble||(this.startBlock=a,a.isInFlyout&&a!==a.getRootBlock()?this.setTargetBlock(a.getRootBlock()):this.setTargetBlock(a))}setTargetBlock(a){a.isShadow()?this.setTargetBlock(a.getParent()):this.targetBlock=a}setStartWorkspace(a){this.startWorkspace_||(this.startWorkspace_=a)}setStartFlyout(a){this.flyout||(this.flyout=a)}isBubbleClick(){return!!this.startBubble&&!this.hasExceededDragRadius}isBlockClick(){return!!this.startBlock&& +!this.hasExceededDragRadius&&!this.isFieldClick()&&!this.isIconClick()}isFieldClick(){return(this.startField?this.startField.isClickable():!1)&&!this.hasExceededDragRadius&&(!this.flyout||!this.flyout.autoClose)}isIconClick(){return!!this.startIcon&&!this.hasExceededDragRadius}isWorkspaceClick(){return!this.startBlock&&!this.startBubble&&!this.startField&&!this.hasExceededDragRadius}isDragging(){return!!this.workspaceDragger||!!this.blockDragger||!!this.bubbleDragger}hasStarted(){return this.gestureHasStarted}getInsertionMarkers(){return this.blockDragger? +this.blockDragger.getInsertionMarkers():[]}getCurrentDragger(){let a,b;return null!=(b=null!=(a=this.blockDragger)?a:this.workspaceDragger)?b:this.bubbleDragger}static inProgress(){const a=getAllWorkspaces$$module$build$src$core$common();for(let b=0,c;c=a[b];b++)if(c.currentGesture_)return!0;return!1}},module$build$src$core$gesture={};module$build$src$core$gesture.Gesture=Gesture$$module$build$src$core$gesture;var Grid$$module$build$src$core$grid=class{constructor(a,b){this.pattern=a;let c;this.spacing=null!=(c=b.spacing)?c:0;let d;this.length=null!=(d=b.length)?d:1;this.line2=(this.line1=a.firstChild)&&this.line1.nextSibling;let e;this.snapToGrid=null!=(e=b.snap)?e:!1}shouldSnap(){return this.snapToGrid}getSpacing(){return this.spacing}getPatternId(){return this.pattern.id}update(a){var b=this.spacing*a;this.pattern.setAttribute("width",`${b}`);this.pattern.setAttribute("height",`${b}`);b=Math.floor(this.spacing/ +2)+.5;let c=b-this.length/2,d=b+this.length/2;b*=a;c*=a;d*=a;this.setLineAttributes(this.line1,a,c,d,b,b);this.setLineAttributes(this.line2,a,b,b,c,d)}setLineAttributes(a,b,c,d,e,f){a&&(a.setAttribute("stroke-width",`${b}`),a.setAttribute("x1",`${c}`),a.setAttribute("y1",`${e}`),a.setAttribute("x2",`${d}`),a.setAttribute("y2",`${f}`))}moveTo(a,b){this.pattern.setAttribute("x",`${a}`);this.pattern.setAttribute("y",`${b}`)}static createDom(a,b,c){a=createSvgElement$$module$build$src$core$utils$dom(Svg$$module$build$src$core$utils$svg.PATTERN, +{id:"blocklyGridPattern"+a,patternUnits:"userSpaceOnUse"},c);let d,e;if(0<(null!=(d=b.length)?d:1)&&0<(null!=(e=b.spacing)?e:0)){createSvgElement$$module$build$src$core$utils$dom(Svg$$module$build$src$core$utils$svg.LINE,{stroke:b.colour},a);let f;null!=(f=b.length)&&f&&createSvgElement$$module$build$src$core$utils$dom(Svg$$module$build$src$core$utils$svg.LINE,{stroke:b.colour},a)}else createSvgElement$$module$build$src$core$utils$dom(Svg$$module$build$src$core$utils$svg.LINE,{},a);return a}},module$build$src$core$grid= +{};module$build$src$core$grid.Grid=Grid$$module$build$src$core$grid;var MarkerManager$$module$build$src$core$marker_manager=class{constructor(a){this.workspace=a;this.cursorSvg_=this.cursor_=null;this.markers=new Map;this.markerSvg_=null}registerMarker(a,b){this.markers.has(a)&&this.unregisterMarker(a);b.setDrawer(this.workspace.getRenderer().makeMarkerDrawer(this.workspace,b));this.setMarkerSvg(b.getDrawer().createDom());this.markers.set(a,b)}unregisterMarker(a){const b=this.markers.get(a);if(b)b.dispose(),this.markers.delete(a);else throw Error("Marker with ID "+ +a+" does not exist. Can only unregister markers that exist.");}getCursor(){return this.cursor_}getMarker(a){return this.markers.get(a)||null}setCursor(a){this.cursor_&&this.cursor_.getDrawer()&&this.cursor_.getDrawer().dispose();if(this.cursor_=a)a=this.workspace.getRenderer().makeMarkerDrawer(this.workspace,this.cursor_),this.cursor_.setDrawer(a),this.setCursorSvg(this.cursor_.getDrawer().createDom())}setCursorSvg(a){a?(this.workspace.getBlockCanvas().appendChild(a),this.cursorSvg_=a):this.cursorSvg_= +null}setMarkerSvg(a){a?this.workspace.getBlockCanvas()&&(this.cursorSvg_?this.workspace.getBlockCanvas().insertBefore(a,this.cursorSvg_):this.workspace.getBlockCanvas().appendChild(a)):this.markerSvg_=null}updateMarkers(){this.workspace.keyboardAccessibilityMode&&this.cursorSvg_&&this.workspace.getCursor().draw()}dispose(){const a=Object.keys(this.markers);for(let b=0,c;c=a[b];b++)this.unregisterMarker(c);this.markers.clear();this.cursor_&&(this.cursor_.dispose(),this.cursor_=null)}}; +MarkerManager$$module$build$src$core$marker_manager.LOCAL_MARKER="local_marker_1";var module$build$src$core$marker_manager={};module$build$src$core$marker_manager.MarkerManager=MarkerManager$$module$build$src$core$marker_manager;var module$build$src$core$utils$object={};module$build$src$core$utils$object.deepMerge=deepMerge$$module$build$src$core$utils$object;var Theme$$module$build$src$core$theme=class{constructor(a,b,c,d){this.name=a;this.startHats=!1;this.blockStyles=b||Object.create(null);this.categoryStyles=c||Object.create(null);this.componentStyles=d||Object.create(null);this.fontStyle=Object.create(null);register$$module$build$src$core$registry(Type$$module$build$src$core$registry.THEME,a,this,!0)}getClassName(){return this.name+"-theme"}setBlockStyle(a,b){this.blockStyles[a]=b}setCategoryStyle(a,b){this.categoryStyles[a]=b}getComponentStyle(a){a= +this.componentStyles[a];if(!a)return null;if("string"===typeof a){const b=this.getComponentStyle(a);if(b)return b}return`${a}`}setComponentStyle(a,b){this.componentStyles[a]=b}setFontStyle(a){this.fontStyle=a}setStartHats(a){this.startHats=a}static defineTheme(a,b){a=a.toLowerCase();const c=new Theme$$module$build$src$core$theme(a);let d=b.base;if(d){if("string"===typeof d){let e;d=null!=(e=getObject$$module$build$src$core$registry(Type$$module$build$src$core$registry.THEME,d))?e:void 0}d instanceof +Theme$$module$build$src$core$theme&&(deepMerge$$module$build$src$core$utils$object(c,d),c.name=a)}deepMerge$$module$build$src$core$utils$object(c.blockStyles,b.blockStyles);deepMerge$$module$build$src$core$utils$object(c.categoryStyles,b.categoryStyles);deepMerge$$module$build$src$core$utils$object(c.componentStyles,b.componentStyles);deepMerge$$module$build$src$core$utils$object(c.fontStyle,b.fontStyle);null!==b.startHats&&(c.startHats=b.startHats);return c}},module$build$src$core$theme={}; +module$build$src$core$theme.Theme=Theme$$module$build$src$core$theme;var defaultBlockStyles$$module$build$src$core$theme$classic={colour_blocks:{colourPrimary:"20"},list_blocks:{colourPrimary:"260"},logic_blocks:{colourPrimary:"210"},loop_blocks:{colourPrimary:"120"},math_blocks:{colourPrimary:"230"},procedure_blocks:{colourPrimary:"290"},text_blocks:{colourPrimary:"160"},variable_blocks:{colourPrimary:"330"},variable_dynamic_blocks:{colourPrimary:"310"},hat_blocks:{colourPrimary:"330",hat:"cap"}},categoryStyles$$module$build$src$core$theme$classic={colour_category:{colour:"20"}, +list_category:{colour:"260"},logic_category:{colour:"210"},loop_category:{colour:"120"},math_category:{colour:"230"},procedure_category:{colour:"290"},text_category:{colour:"160"},variable_category:{colour:"330"},variable_dynamic_category:{colour:"310"}},Classic$$module$build$src$core$theme$classic=new Theme$$module$build$src$core$theme("classic",defaultBlockStyles$$module$build$src$core$theme$classic,categoryStyles$$module$build$src$core$theme$classic),module$build$src$core$theme$classic={Classic:Classic$$module$build$src$core$theme$classic};var Options$$module$build$src$core$options=class{constructor(a){this.gridPattern=null;this.getMetrics=this.setMetrics=void 0;let b=null,c=!1;var d=!1,e=!1,f=!1,g=!1,h=!1;const k=!!a.readOnly;if(!k){var l;b=convertToolboxDefToJson$$module$build$src$core$utils$toolbox(null!=(l=a.toolbox)?l:null);c=hasCategories$$module$build$src$core$utils$toolbox(b);d=a.trashcan;d=void 0===d?c:d;e=a.collapse;e=void 0===e?c:e;f=a.comments;f=void 0===f?c:f;g=a.disable;g=void 0===g?c:g;h=a.sounds;h=void 0===h?!0:h}l= +a.maxTrashcanContents;d?void 0===l&&(l=32):l=0;const m=!!a.rtl;let n=a.horizontalLayout;void 0===n&&(n=!1);var p="end"!==a.toolboxPosition;p=n?p?Position$$module$build$src$core$utils$toolbox.TOP:Position$$module$build$src$core$utils$toolbox.BOTTOM:p===m?Position$$module$build$src$core$utils$toolbox.RIGHT:Position$$module$build$src$core$utils$toolbox.LEFT;let q=a.css;void 0===q&&(q=!0);let r="https://blockly-demo.appspot.com/static/media/";a.media?r=a.media.endsWith("/")?a.media:a.media+"/":"path"in +a&&(warn$$module$build$src$core$utils$deprecation("path","Nov 2014","Jul 2023","media"),r=a.path+"media/");const u=a.oneBasedIndex,y=a.renderer||"geras",z=a.plugins||{};let t=a.modalInputs;void 0===t&&(t=!0);this.RTL=m;this.oneBasedIndex=void 0===u?!0:u;this.collapse=e;this.comments=f;this.disable=g;this.readOnly=k;this.maxBlocks=a.maxBlocks||Infinity;let v;this.maxInstances=null!=(v=a.maxInstances)?v:null;this.modalInputs=t;this.pathToMedia=r;this.hasCategories=c;this.moveOptions=Options$$module$build$src$core$options.parseMoveOptions_(a, +c);this.hasScrollbars=!!this.moveOptions.scrollbars;this.hasTrashcan=d;this.maxTrashcanContents=l;this.hasSounds=h;this.hasCss=q;this.horizontalLayout=n;this.languageTree=b;this.gridOptions=Options$$module$build$src$core$options.parseGridOptions_(a);this.zoomOptions=Options$$module$build$src$core$options.parseZoomOptions_(a);this.toolboxPosition=p;this.theme=Options$$module$build$src$core$options.parseThemeOptions_(a);this.renderer=y;let w;this.rendererOverrides=null!=(w=a.rendererOverrides)?w:null; +let x;this.parentWorkspace=null!=(x=a.parentWorkspace)?x:null;this.plugins=z}static parseMoveOptions_(a,b){const c=a.move||{},d={};void 0===c.scrollbars&&void 0===a.scrollbars?d.scrollbars=b:"object"===typeof c.scrollbars?(d.scrollbars={horizontal:!!c.scrollbars.horizontal,vertical:!!c.scrollbars.vertical},d.scrollbars.horizontal&&d.scrollbars.vertical?d.scrollbars=!0:d.scrollbars.horizontal||d.scrollbars.vertical||(d.scrollbars=!1)):d.scrollbars=!!c.scrollbars||!!a.scrollbars;d.wheel=d.scrollbars&& +void 0!==c.wheel?!!c.wheel:"object"===typeof d.scrollbars;d.drag=d.scrollbars?void 0===c.drag?!0:!!c.drag:!1;return d}static parseZoomOptions_(a){a=a.zoom||{};const b={};b.controls=void 0===a.controls?!1:!!a.controls;b.wheel=void 0===a.wheel?!1:!!a.wheel;b.startScale=void 0===a.startScale?1:Number(a.startScale);b.maxScale=void 0===a.maxScale?3:Number(a.maxScale);b.minScale=void 0===a.minScale?.3:Number(a.minScale);b.scaleSpeed=void 0===a.scaleSpeed?1.2:Number(a.scaleSpeed);b.pinch=void 0===a.pinch? +b.wheel||b.controls:!!a.pinch;return b}static parseGridOptions_(a){a=a.grid||{};const b={};b.spacing=Number(a.spacing)||0;b.colour=a.colour||"#888";b.length=void 0===a.length?1:Number(a.length);b.snap=0"));fire$$module$build$src$core$events$utils(new BlockChange$$module$build$src$core$events$events_block_change(b,"mutation",null,c,a));break;default:console.warn("Unknown change type: "+this.element)}}static getExtraBlockState_(a){return a.saveExtraState? +(a=a.saveExtraState(!0))?JSON.stringify(a):"":a.mutationToDom?(a=a.mutationToDom())?domToText$$module$build$src$core$xml(a):"":""}};register$$module$build$src$core$registry(Type$$module$build$src$core$registry.EVENT,$.CHANGE$$module$build$src$core$events$utils,BlockChange$$module$build$src$core$events$events_block_change);var module$build$src$core$events$events_block_change={};module$build$src$core$events$events_block_change.BlockChange=BlockChange$$module$build$src$core$events$events_block_change;var hsvSaturation$$module$build$src$core$utils$colour=.45,hsvValue$$module$build$src$core$utils$colour=.65,names$$module$build$src$core$utils$colour={aqua:"#00ffff",black:"#000000",blue:"#0000ff",fuchsia:"#ff00ff",gray:"#808080",green:"#008000",lime:"#00ff00",maroon:"#800000",navy:"#000080",olive:"#808000",purple:"#800080",red:"#ff0000",silver:"#c0c0c0",teal:"#008080",white:"#ffffff",yellow:"#ffff00"},module$build$src$core$utils$colour={};module$build$src$core$utils$colour.blend=blend$$module$build$src$core$utils$colour; +module$build$src$core$utils$colour.getHsvSaturation=getHsvSaturation$$module$build$src$core$utils$colour;module$build$src$core$utils$colour.getHsvValue=getHsvValue$$module$build$src$core$utils$colour;module$build$src$core$utils$colour.hexToRgb=hexToRgb$$module$build$src$core$utils$colour;module$build$src$core$utils$colour.hsvToHex=hsvToHex$$module$build$src$core$utils$colour;module$build$src$core$utils$colour.hueToHex=hueToHex$$module$build$src$core$utils$colour; +module$build$src$core$utils$colour.names=names$$module$build$src$core$utils$colour;module$build$src$core$utils$colour.parse=parse$$module$build$src$core$utils$colour;module$build$src$core$utils$colour.rgbToHex=rgbToHex$$module$build$src$core$utils$colour;module$build$src$core$utils$colour.setHsvSaturation=setHsvSaturation$$module$build$src$core$utils$colour;module$build$src$core$utils$colour.setHsvValue=setHsvValue$$module$build$src$core$utils$colour;var module$build$src$core$utils$parsing={};module$build$src$core$utils$parsing.checkMessageReferences=checkMessageReferences$$module$build$src$core$utils$parsing;module$build$src$core$utils$parsing.parseBlockColour=parseBlockColour$$module$build$src$core$utils$parsing;module$build$src$core$utils$parsing.replaceMessageReferences=replaceMessageReferences$$module$build$src$core$utils$parsing;module$build$src$core$utils$parsing.tokenizeInterpolation=tokenizeInterpolation$$module$build$src$core$utils$parsing;var Field$$module$build$src$core$field=class{constructor(a,b,c){this.DEFAULT_VALUE=null;this.name=void 0;this.constants_=this.mouseDownWrapper_=this.textContent_=this.textElement_=this.borderRect_=this.fieldGroup_=this.markerSvg_=this.cursorSvg_=this.tooltip_=this.validator_=null;this.disposed=!1;this.maxDisplayLength=50;this.sourceBlock_=null;this.enabled_=this.visible_=this.isDirty_=!0;this.suffixField=this.prefixField=this.clickTarget_=null;this.EDITABLE=!0;this.SERIALIZABLE=!1;this.CURSOR=""; +this.value_="DEFAULT_VALUE"in new.target.prototype?new.target.prototype.DEFAULT_VALUE:this.DEFAULT_VALUE;this.size_=new Size$$module$build$src$core$utils$size(0,0);a!==Field$$module$build$src$core$field.SKIP_SETUP&&(c&&this.configure_(c),this.setValue(a),b&&this.setValidator(b))}configure_(a){a.tooltip&&this.setTooltip(replaceMessageReferences$$module$build$src$core$utils$parsing(a.tooltip))}setSourceBlock(a){if(this.sourceBlock_)throw Error("Field already bound to a block");this.sourceBlock_=a}getConstants(){!this.constants_&& +this.sourceBlock_&&!this.sourceBlock_.isDeadOrDying()&&this.sourceBlock_.workspace.rendered&&(this.constants_=this.sourceBlock_.workspace.getRenderer().getConstants());return this.constants_}getSourceBlock(){return this.sourceBlock_}init(){this.fieldGroup_||(this.fieldGroup_=createSvgElement$$module$build$src$core$utils$dom(Svg$$module$build$src$core$utils$svg.G,{}),this.isVisible()||(this.fieldGroup_.style.display="none"),this.sourceBlock_.getSvgRoot().appendChild(this.fieldGroup_),this.initView(), +this.updateEditable(),this.setTooltip(this.tooltip_),this.bindEvents_(),this.initModel())}initView(){this.createBorderRect_();this.createTextElement_()}initModel(){}isFullBlockField(){return!this.borderRect_}createBorderRect_(){this.borderRect_=createSvgElement$$module$build$src$core$utils$dom(Svg$$module$build$src$core$utils$svg.RECT,{rx:this.getConstants().FIELD_BORDER_RECT_RADIUS,ry:this.getConstants().FIELD_BORDER_RECT_RADIUS,x:0,y:0,height:this.size_.height,width:this.size_.width,"class":"blocklyFieldRect"}, +this.fieldGroup_)}createTextElement_(){this.textElement_=createSvgElement$$module$build$src$core$utils$dom(Svg$$module$build$src$core$utils$svg.TEXT,{"class":"blocklyText"},this.fieldGroup_);this.getConstants().FIELD_TEXT_BASELINE_CENTER&&this.textElement_.setAttribute("dominant-baseline","central");this.textContent_=document.createTextNode("");this.textElement_.appendChild(this.textContent_)}bindEvents_(){const a=this.getClickTarget_();if(!a)throw Error("A click target has not been set.");bindMouseEvents$$module$build$src$core$tooltip(a); +this.mouseDownWrapper_=conditionalBind$$module$build$src$core$browser_events(a,"pointerdown",this,this.onMouseDown_)}fromXml(a){this.setValue(a.textContent)}toXml(a){a.textContent=this.getValue();return a}saveState(a){a=this.saveLegacyState(Field$$module$build$src$core$field);return null!==a?a:this.getValue()}loadState(a){this.loadLegacyState(Field$$module$build$src$core$field,a)||this.setValue(a)}saveLegacyState(a){return a.prototype.saveState===this.saveState&&a.prototype.toXml!==this.toXml?(a= +$.createElement$$module$build$src$core$utils$xml("field"),a.setAttribute("name",this.name||""),domToText$$module$build$src$core$utils$xml(this.toXml(a)).replace(' xmlns="https://developers.google.com/blockly/xml"',"")):null}loadLegacyState(a,b){return a.prototype.loadState===this.loadState&&a.prototype.fromXml!==this.fromXml?(this.fromXml($.textToDom$$module$build$src$core$utils$xml(b)),!0):!1}dispose(){hideIfOwner$$module$build$src$core$dropdowndiv(this);hideIfOwner$$module$build$src$core$widgetdiv(this); +let a;(null==(a=this.getSourceBlock())?0:a.isDeadOrDying())||removeNode$$module$build$src$core$utils$dom(this.fieldGroup_);this.disposed=!0}updateEditable(){const a=this.fieldGroup_,b=this.getSourceBlock();this.EDITABLE&&a&&b&&(this.enabled_&&b.isEditable()?(addClass$$module$build$src$core$utils$dom(a,"blocklyEditableText"),removeClass$$module$build$src$core$utils$dom(a,"blocklyNonEditableText"),a.style.cursor=this.CURSOR):(addClass$$module$build$src$core$utils$dom(a,"blocklyNonEditableText"),removeClass$$module$build$src$core$utils$dom(a, +"blocklyEditableText"),a.style.cursor=""))}setEnabled(a){this.enabled_=a;this.updateEditable()}isEnabled(){return this.enabled_}isClickable(){return this.enabled_&&!!this.sourceBlock_&&this.sourceBlock_.isEditable()&&this.showEditor_!==Field$$module$build$src$core$field.prototype.showEditor_}isCurrentlyEditable(){return this.enabled_&&this.EDITABLE&&!!this.sourceBlock_&&this.sourceBlock_.isEditable()}isSerializable(){let a=!1;this.name&&(this.SERIALIZABLE?a=!0:this.EDITABLE&&(console.warn("Detected an editable field that was not serializable. Please define SERIALIZABLE property as true on all editable custom fields. Proceeding with serialization."), +a=!0));return a}isVisible(){return this.visible_}setVisible(a){if(this.visible_!==a){this.visible_=a;var b=this.fieldGroup_;b&&(b.style.display=a?"block":"none")}}setValidator(a){this.validator_=a}getValidator(){return this.validator_}getSvgRoot(){return this.fieldGroup_}getBorderRect(){if(!this.borderRect_)throw Error(`The border rectangle is ${this.borderRect_}.`);return this.borderRect_}getTextElement(){if(!this.textElement_)throw Error(`The text element is ${this.textElement_}.`);return this.textElement_}getTextContent(){if(!this.textContent_)throw Error(`The text content is ${this.textContent_}.`); +return this.textContent_}applyColour(){}render_(){this.textContent_&&(this.textContent_.nodeValue=this.getDisplayText_());this.updateSize_()}showEditor(a){this.isClickable()&&this.showEditor_(a)}showEditor_(a){}repositionForWindowResize(){return!1}updateSize_(a){const b=this.getConstants();a=void 0!==a?a:this.isFullBlockField()?0:this.getConstants().FIELD_BORDER_RECT_X_PADDING;let c=2*a,d=b.FIELD_TEXT_HEIGHT,e=0;this.textElement_&&(e=getFastTextWidth$$module$build$src$core$utils$dom(this.textElement_, +b.FIELD_TEXT_FONTSIZE,b.FIELD_TEXT_FONTWEIGHT,b.FIELD_TEXT_FONTFAMILY),c+=e);this.isFullBlockField()||(d=Math.max(d,b.FIELD_BORDER_RECT_HEIGHT));this.size_.height=d;this.size_.width=c;this.positionTextElement_(a,e);this.positionBorderRect_()}positionTextElement_(a,b){if(this.textElement_){var c=this.getConstants(),d=this.size_.height/2,e;this.textElement_.setAttribute("x",String((null==(e=this.getSourceBlock())?0:e.RTL)?this.size_.width-b-a:a));this.textElement_.setAttribute("y",String(c.FIELD_TEXT_BASELINE_CENTER? +d:d-c.FIELD_TEXT_HEIGHT/2+c.FIELD_TEXT_BASELINE))}}positionBorderRect_(){this.borderRect_&&(this.borderRect_.setAttribute("width",String(this.size_.width)),this.borderRect_.setAttribute("height",String(this.size_.height)),this.borderRect_.setAttribute("rx",String(this.getConstants().FIELD_BORDER_RECT_RADIUS)),this.borderRect_.setAttribute("ry",String(this.getConstants().FIELD_BORDER_RECT_RADIUS)))}getSize(){if(!this.isVisible())return new Size$$module$build$src$core$utils$size(0,0);this.isDirty_? +(this.render_(),this.isDirty_=!1):this.visible_&&0===this.size_.width&&(this.render_(),0!==this.size_.width&&console.warn("Deprecated use of setting size_.width to 0 to rerender a field. Set field.isDirty_ to true instead."));return this.size_}getScaledBBox(){let a;var b=this.getSourceBlock();if(!b)throw new UnattachedFieldError$$module$build$src$core$field;if(this.isFullBlockField()){var c=this.sourceBlock_.getHeightWidth();const d=b.workspace.scale;a=this.getAbsoluteXY_();b=(c.width+1)*d;c=(c.height+ +1)*d;GECKO$$module$build$src$core$utils$useragent?(a.x+=1.5*d,a.y+=1.5*d):(a.x-=.5*d,a.y-=.5*d)}else c=this.borderRect_.getBoundingClientRect(),a=getPageOffset$$module$build$src$core$utils$style(this.borderRect_),b=c.width,c=c.height;return new Rect$$module$build$src$core$utils$rect(a.y,a.y+c,a.x,a.x+b)}getDisplayText_(){let a=this.getText();if(!a)return Field$$module$build$src$core$field.NBSP;a.length>this.maxDisplayLength&&(a=a.substring(0,this.maxDisplayLength-2)+"\u2026");a=a.replace(/\s/g,Field$$module$build$src$core$field.NBSP); +this.sourceBlock_&&this.sourceBlock_.RTL&&(a+="\u200f");return a}getText(){const a=this.getText_();return null!==a?String(a):String(this.getValue())}getText_(){return null}markDirty(){this.isDirty_=!0;this.constants_=null}forceRerender(){this.isDirty_=!0;this.sourceBlock_&&this.sourceBlock_.rendered&&(this.sourceBlock_.queueRender(),this.sourceBlock_.bumpNeighbours())}setValue(a,b=!0){if(null!==a){var c=this.doClassValidation_(a);a=this.processValidation_(a,c);if(!(a instanceof Error)){var d;c=null== +(d=this.getValidator())?void 0:d.call(this,a);d=this.processValidation_(a,c);d instanceof Error||(a=this.sourceBlock_,a&&a.disposed||(c=this.getValue(),c===d?this.doValueUpdate_(d):(this.doValueUpdate_(d),b&&a&&isEnabled$$module$build$src$core$events$utils()&&fire$$module$build$src$core$events$utils(new (get$$module$build$src$core$events$utils($.CHANGE$$module$build$src$core$events$utils))(a,"field",this.name||null,c,d)),this.isDirty_&&this.forceRerender())))}}}processValidation_(a,b){return null=== +b?(this.doValueInvalid_(a),this.isDirty_&&this.forceRerender(),Error()):void 0===b?a:b}getValue(){return this.value_}doClassValidation_(a){return null===a||void 0===a?null:a}doValueUpdate_(a){this.value_=a;this.isDirty_=!0}doValueInvalid_(a){}onMouseDown_(a){this.sourceBlock_&&!this.sourceBlock_.isDeadOrDying()&&(a=this.sourceBlock_.workspace.getGesture(a))&&a.setStartField(this)}setTooltip(a){a||""===a||(a=this.sourceBlock_);const b=this.getClickTarget_();b?b.tooltip=a:this.tooltip_=a}getTooltip(){const a= +this.getClickTarget_();return a?getTooltipOfObject$$module$build$src$core$tooltip(a):getTooltipOfObject$$module$build$src$core$tooltip({tooltip:this.tooltip_})}getClickTarget_(){return this.clickTarget_||this.getSvgRoot()}getAbsoluteXY_(){return getPageOffset$$module$build$src$core$utils$style(this.getClickTarget_())}referencesVariables(){return!1}refreshVariableName(){}getParentInput(){let a=null;const b=this.getSourceBlock();if(!b)throw new UnattachedFieldError$$module$build$src$core$field;const c= +b.inputList;for(let d=0;d +b[1]===a)?a:(this.sourceBlock_&&console.warn("Cannot set the dropdown's value to an unavailable option. Block type: "+this.sourceBlock_.type+", Field name: "+this.name+", Value: "+a),null)}doValueUpdate_(a){super.doValueUpdate_(a);a=this.getOptions(!0);for(let b=0,c;c=a[b];b++)c[1]===this.value_&&(this.selectedOption=c)}applyColour(){const a=this.sourceBlock_.style;this.borderRect_&&(this.borderRect_.setAttribute("stroke",a.colourTertiary),this.menu_?this.borderRect_.setAttribute("fill",a.colourTertiary): +this.borderRect_.setAttribute("fill","transparent"));this.sourceBlock_&&this.arrow&&(this.sourceBlock_.isShadow()?this.arrow.style.fill=a.colourSecondary:this.arrow.style.fill=a.colourPrimary)}render_(){this.getTextContent().nodeValue="";this.imageElement.style.display="none";const a=this.selectedOption&&this.selectedOption[0];a&&"object"===typeof a?this.renderSelectedImage(a):this.renderSelectedText();this.positionBorderRect_()}renderSelectedImage(a){const b=this.getSourceBlock();if(!b)throw new UnattachedFieldError$$module$build$src$core$field; +this.imageElement.style.display="";this.imageElement.setAttributeNS(XLINK_NS$$module$build$src$core$utils$dom,"xlink:href",a.src);this.imageElement.setAttribute("height",String(a.height));this.imageElement.setAttribute("width",String(a.width));const c=Number(a.height);a=Number(a.width);var d=!!this.borderRect_;const e=Math.max(d?this.getConstants().FIELD_DROPDOWN_BORDER_RECT_HEIGHT:0,c+IMAGE_Y_PADDING$$module$build$src$core$field_dropdown);d=d?this.getConstants().FIELD_BORDER_RECT_X_PADDING:0;let f; +f=this.svgArrow?this.positionSVGArrow(a+d,e/2-this.getConstants().FIELD_DROPDOWN_SVG_ARROW_SIZE/2):getFastTextWidth$$module$build$src$core$utils$dom(this.arrow,this.getConstants().FIELD_TEXT_FONTSIZE,this.getConstants().FIELD_TEXT_FONTWEIGHT,this.getConstants().FIELD_TEXT_FONTFAMILY);this.size_.width=a+f+2*d;this.size_.height=e;let g=0;b.RTL?this.imageElement.setAttribute("x",`${d+f}`):(g=a+f,this.getTextElement().setAttribute("text-anchor","end"),this.imageElement.setAttribute("x",`${d}`));this.imageElement.setAttribute("y", +String(e/2-c/2));this.positionTextElement_(g+d,a+f)}renderSelectedText(){this.getTextContent().nodeValue=this.getDisplayText_();var a=this.getTextElement();addClass$$module$build$src$core$utils$dom(a,"blocklyDropdownText");a.setAttribute("text-anchor","start");var b=!!this.borderRect_;a=Math.max(b?this.getConstants().FIELD_DROPDOWN_BORDER_RECT_HEIGHT:0,this.getConstants().FIELD_TEXT_HEIGHT);const c=getFastTextWidth$$module$build$src$core$utils$dom(this.getTextElement(),this.getConstants().FIELD_TEXT_FONTSIZE, +this.getConstants().FIELD_TEXT_FONTWEIGHT,this.getConstants().FIELD_TEXT_FONTFAMILY);b=b?this.getConstants().FIELD_BORDER_RECT_X_PADDING:0;let d=0;this.svgArrow&&(d=this.positionSVGArrow(c+b,a/2-this.getConstants().FIELD_DROPDOWN_SVG_ARROW_SIZE/2));this.size_.width=c+d+2*b;this.size_.height=a;this.positionTextElement_(b,c)}positionSVGArrow(a,b){if(!this.svgArrow)return 0;const c=this.getSourceBlock();if(!c)throw new UnattachedFieldError$$module$build$src$core$field;const d=this.borderRect_?this.getConstants().FIELD_BORDER_RECT_X_PADDING: +0,e=this.getConstants().FIELD_DROPDOWN_SVG_ARROW_PADDING,f=this.getConstants().FIELD_DROPDOWN_SVG_ARROW_SIZE;this.svgArrow.setAttribute("transform","translate("+(c.RTL?d:a+e)+","+b+")");return f+e}getText_(){if(!this.selectedOption)return null;const a=this.selectedOption[0];return"object"===typeof a?a.alt:a}static fromJson(a){if(!a.options)throw Error("options are required for the dropdown field. The options property must be assigned an array of [humanReadableValue, languageNeutralValue] tuples."); +return new this(a.options,void 0,a)}};FieldDropdown$$module$build$src$core$field_dropdown.CHECKMARK_OVERHANG=25;FieldDropdown$$module$build$src$core$field_dropdown.MAX_MENU_HEIGHT_VH=.45;FieldDropdown$$module$build$src$core$field_dropdown.ARROW_CHAR="\u25be";var IMAGE_Y_OFFSET$$module$build$src$core$field_dropdown=5,IMAGE_Y_PADDING$$module$build$src$core$field_dropdown=2*IMAGE_Y_OFFSET$$module$build$src$core$field_dropdown;register$$module$build$src$core$field_registry("field_dropdown",FieldDropdown$$module$build$src$core$field_dropdown); +var module$build$src$core$field_dropdown={};module$build$src$core$field_dropdown.FieldDropdown=FieldDropdown$$module$build$src$core$field_dropdown;var _a$$module$build$src$core$bubbles$bubble,Bubble$$module$build$src$core$bubbles$bubble=class{constructor(a,b,c){this.workspace=a;this.anchor=b;this.ownerRect=c;this.size=new Size$$module$build$src$core$utils$size(0,0);this.colour="#ffffff";this.disposed=!1;this.relativeLeft=this.relativeTop=0;this.svgRoot=createSvgElement$$module$build$src$core$utils$dom(Svg$$module$build$src$core$utils$svg.G,{},a.getBubbleCanvas());a=createSvgElement$$module$build$src$core$utils$dom(Svg$$module$build$src$core$utils$svg.G, +{filter:`url(#${this.workspace.getRenderer().getConstants().embossFilterId})`},this.svgRoot);this.tail=createSvgElement$$module$build$src$core$utils$dom(Svg$$module$build$src$core$utils$svg.PATH,{},a);this.background=createSvgElement$$module$build$src$core$utils$dom(Svg$$module$build$src$core$utils$svg.RECT,{"class":"blocklyDraggable",x:0,y:0,rx:_a$$module$build$src$core$bubbles$bubble.BORDER_WIDTH,ry:_a$$module$build$src$core$bubbles$bubble.BORDER_WIDTH},a);this.contentContainer=createSvgElement$$module$build$src$core$utils$dom(Svg$$module$build$src$core$utils$svg.G, +{},this.svgRoot);conditionalBind$$module$build$src$core$browser_events(this.background,"pointerdown",this,this.onMouseDown)}dispose(){removeNode$$module$build$src$core$utils$dom(this.svgRoot);this.disposed=!0}setAnchorLocation(a,b=!1){this.anchor=a;b?this.positionByRect(this.ownerRect):this.positionRelativeToAnchor();this.renderTail()}setPositionRelativeToAnchor(a,b){this.relativeLeft=a;this.relativeTop=b;this.positionRelativeToAnchor();this.renderTail()}getSize(){return this.size}setSize(a,b=!1){a.width= +Math.max(a.width,_a$$module$build$src$core$bubbles$bubble.MIN_SIZE);a.height=Math.max(a.height,_a$$module$build$src$core$bubbles$bubble.MIN_SIZE);this.size=a;this.background.setAttribute("width",`${a.width}`);this.background.setAttribute("height",`${a.height}`);b?this.positionByRect(this.ownerRect):this.positionRelativeToAnchor();this.renderTail()}getColour(){return this.colour}setColour(a){this.colour=a;this.tail.setAttribute("fill",a);this.background.setAttribute("fill",a)}onMouseDown(a){let b; +null==(b=this.workspace.getGesture(a))||b.handleBubbleStart(a,this)}positionRelativeToAnchor(){let a=this.anchor.x;a=this.workspace.RTL?a-(this.relativeLeft+this.size.width):a+this.relativeLeft;this.moveTo(a,this.relativeTop+this.anchor.y)}moveTo(a,b){this.svgRoot.setAttribute("transform",`translate(${a}, ${b})`)}positionByRect(a=new Rect$$module$build$src$core$utils$rect(0,0,0,0)){var b=this.workspace.getMetricsManager().getViewMetrics(!0),c=this.getOptimalRelativeLeft(b),d=this.getOptimalRelativeTop(b); +const e={x:c,y:-this.size.height-this.workspace.getRenderer().getConstants().MIN_BLOCK_HEIGHT},f={x:-this.size.width-30,y:d};d={x:a.getWidth(),y:d};var g={x:c,y:a.getHeight()};c=a.getWidth()a.width)return b;a=this.getWorkspaceViewRect(a); +if(this.workspace.RTL){var c=this.anchor.x-b;c-this.size.widtha.right&&(b=-(a.right-this.anchor.x))}else{c=b+this.anchor.x;const d=c+this.size.width;ca.right&&(b=a.right-this.anchor.x-this.size.width)}return b}getOptimalRelativeTop(a){let b=-this.size.height/4;if(this.size.height>a.height)return b;const c=this.anchor.y+b,d=c+this.size.height;a=this.getWorkspaceViewRect(a);ca.bottom&& +(b=a.bottom-this.anchor.y-this.size.height);return b}getWorkspaceViewRect(a){const b=a.top;let c=a.top+a.height,d=a.left;a=a.left+a.width;c-=this.getScrollbarThickness();this.workspace.RTL?d-=this.getScrollbarThickness():a-=this.getScrollbarThickness();return new Rect$$module$build$src$core$utils$rect(b,c,d,a)}getScrollbarThickness(){return Scrollbar$$module$build$src$core$scrollbar.scrollbarThickness/this.workspace.scale}renderTail(){const a=[];var b=this.size.width/2,c=this.size.height/2,d=-this.relativeLeft, +e=-this.relativeTop;if(b===d&&c===e)a.push("M "+b+","+c);else{e-=c;d-=b;this.workspace.RTL&&(d*=-1);var f=Math.sqrt(e*e+d*d),g=Math.acos(d/f);0>e&&(g=2*Math.PI-g);var h=g+Math.PI/2;h>2*Math.PI&&(h-=2*Math.PI);var k=Math.sin(h);const m=Math.cos(h);let n=(this.size.width+this.size.height)/_a$$module$build$src$core$bubbles$bubble.TAIL_THICKNESS;n=Math.min(n,this.size.width,this.size.height)/4;h=1-_a$$module$build$src$core$bubbles$bubble.ANCHOR_RADIUS/f;d=b+h*d;e=c+h*e;h=b+n*m;const p=c+n*k;b-=n*m;c-= +n*k;k=toRadians$$module$build$src$core$utils$math(this.workspace.RTL?-_a$$module$build$src$core$bubbles$bubble.TAIL_ANGLE:_a$$module$build$src$core$bubbles$bubble.TAIL_ANGLE);k=g+k;k>2*Math.PI&&(k-=2*Math.PI);g=Math.sin(k)*f/_a$$module$build$src$core$bubbles$bubble.TAIL_BEND;f=Math.cos(k)*f/_a$$module$build$src$core$bubbles$bubble.TAIL_BEND;a.push("M"+h+","+p);a.push("C"+(h+f)+","+(p+g)+" "+d+","+e+" "+d+","+e);a.push("C"+d+","+e+" "+(b+f)+","+(c+g)+" "+b+","+c)}a.push("z");let l;null==(l=this.tail)|| +l.setAttribute("d",a.join(" "))}bringToFront(){let a;const b=null==(a=this.svgRoot)?void 0:a.parentNode;return this.svgRoot&&(null==b?void 0:b.lastChild)!==this.svgRoot?(null==b||b.appendChild(this.svgRoot),!0):!1}getRelativeToSurfaceXY(){return new Coordinate$$module$build$src$core$utils$coordinate(this.workspace.RTL?-this.relativeLeft+this.anchor.x-this.size.width:this.anchor.x+this.relativeLeft,this.anchor.y+this.relativeTop)}getSvgRoot(){return this.svgRoot}moveDuringDrag(a){this.moveTo(a.x,a.y); +this.relativeLeft=this.workspace.RTL?this.anchor.x-a.x-this.size.width:a.x-this.anchor.x;this.relativeTop=a.y-this.anchor.y;this.renderTail()}setDragging(a){}setDeleteStyle(a){}isDeletable(){return!1}showContextMenu(a){}};_a$$module$build$src$core$bubbles$bubble=Bubble$$module$build$src$core$bubbles$bubble;Bubble$$module$build$src$core$bubbles$bubble.BORDER_WIDTH=6;Bubble$$module$build$src$core$bubbles$bubble.DOUBLE_BORDER=2*_a$$module$build$src$core$bubbles$bubble.BORDER_WIDTH; +Bubble$$module$build$src$core$bubbles$bubble.MIN_SIZE=_a$$module$build$src$core$bubbles$bubble.DOUBLE_BORDER;Bubble$$module$build$src$core$bubbles$bubble.TAIL_THICKNESS=1;Bubble$$module$build$src$core$bubbles$bubble.TAIL_ANGLE=20;Bubble$$module$build$src$core$bubbles$bubble.TAIL_BEND=4;Bubble$$module$build$src$core$bubbles$bubble.ANCHOR_RADIUS=8;var module$build$src$core$bubbles$bubble={};module$build$src$core$bubbles$bubble.Bubble=Bubble$$module$build$src$core$bubbles$bubble;var MiniWorkspaceBubble$$module$build$src$core$bubbles$mini_workspace_bubble=class extends Bubble$$module$build$src$core$bubbles$bubble{constructor(a,b,c,d){super(b,c,d);this.workspace=b;this.anchor=c;this.ownerRect=d;this.autoLayout=!0;b=new Options$$module$build$src$core$options(a);this.validateWorkspaceOptions(b);this.svgDialog=createSvgElement$$module$build$src$core$utils$dom(Svg$$module$build$src$core$utils$svg.SVG,{x:Bubble$$module$build$src$core$bubbles$bubble.BORDER_WIDTH,y:Bubble$$module$build$src$core$bubbles$bubble.BORDER_WIDTH}, +this.contentContainer);a.parentWorkspace=this.workspace;this.miniWorkspace=this.newWorkspaceSvg(new Options$$module$build$src$core$options(a));this.miniWorkspace.internalIsMutator=!0;a=this.miniWorkspace.createDom("blocklyMutatorBackground");this.svgDialog.appendChild(a);b.languageTree&&(a.insertBefore(this.miniWorkspace.addFlyout(Svg$$module$build$src$core$utils$svg.G),this.miniWorkspace.getCanvas()),a=this.miniWorkspace.getFlyout(),null==a||a.init(this.miniWorkspace),null==a||a.show(b.languageTree)); +this.miniWorkspace.addChangeListener(this.onWorkspaceChange.bind(this));let e,f;null==(e=this.miniWorkspace.getFlyout())||null==(f=e.getWorkspace())||f.addChangeListener(this.onWorkspaceChange.bind(this));this.updateBubbleSize()}dispose(){this.miniWorkspace.dispose();super.dispose()}getWorkspace(){return this.miniWorkspace}addWorkspaceChangeListener(a){this.miniWorkspace.addChangeListener(a)}validateWorkspaceOptions(a){if(a.hasCategories)throw Error("The miniworkspace bubble does not support toolboxes with categories"); +if(a.hasTrashcan)throw Error("The miniworkspace bubble does not support trashcans");if(a.zoomOptions.controls||a.zoomOptions.wheel||a.zoomOptions.pinch)throw Error("The miniworkspace bubble does not support zooming");if(a.moveOptions.scrollbars||a.moveOptions.wheel||a.moveOptions.drag)throw Error("The miniworkspace bubble does not scrolling/moving the workspace");if(a.horizontalLayout)throw Error("The miniworkspace bubble does not support horizontal layouts");}onWorkspaceChange(){this.bumpBlocksIntoBounds(); +this.updateBubbleSize()}bumpBlocksIntoBounds(){if(!this.miniWorkspace.isDragging())for(const a of this.miniWorkspace.getTopBlocks(!1)){const b=a.getRelativeToSurfaceXY();20>b.y&&a.moveBy(0,20-b.y);if(a.RTL){let c=-20;const d=this.miniWorkspace.getFlyout();d&&(c-=d.getWidth());b.x>c&&a.moveBy(c-b.x,0)}else 20>b.x&&a.moveBy(20-b.x,0)}}updateBubbleSize(){if(!this.miniWorkspace.isDragging()){var a=this.getSize(),b=this.calculateWorkspaceSize();Math.abs(a.width-b.width)({kind:"block",type:c}))});return b}getAnchorLocation(){const a=SIZE$$module$build$src$core$icons$mutator_icon/2;return Coordinate$$module$build$src$core$utils$coordinate.sum(this.workspaceLocation,new Coordinate$$module$build$src$core$utils$coordinate(a,a))}getBubbleOwnerRect(){const a=this.sourceBlock.getSvgRoot().getBBox();return new Rect$$module$build$src$core$utils$rect(a.y,a.y+a.height, +a.x,a.x+a.width)}createRootBlock(){if(!this.sourceBlock.decompose)throw Error("Blocks with mutator icons must include a decompose method");this.rootBlock=this.sourceBlock.decompose(this.miniWorkspaceBubble.getWorkspace());for(var a of this.rootBlock.getDescendants(!1))a.queueRender();this.rootBlock.setMovable(!1);this.rootBlock.setDeletable(!1);let b,c,d,e;a=null!=(e=null==(b=this.miniWorkspaceBubble)?void 0:null==(c=b.getWorkspace())?void 0:null==(d=c.getFlyout())?void 0:d.getWidth())?e:0;this.rootBlock.moveBy(this.rootBlock.RTL? +-(a+WORKSPACE_MARGIN$$module$build$src$core$icons$mutator_icon):WORKSPACE_MARGIN$$module$build$src$core$icons$mutator_icon,WORKSPACE_MARGIN$$module$build$src$core$icons$mutator_icon)}addSaveConnectionsListener(){this.sourceBlock.saveConnections&&this.rootBlock&&(this.saveConnectionsListener=()=>{this.sourceBlock.saveConnections&&this.rootBlock&&this.sourceBlock.saveConnections(this.rootBlock)},this.saveConnectionsListener(),this.sourceBlock.workspace.addChangeListener(this.saveConnectionsListener))}createMiniWorkspaceChangeListener(){return a=> +{$.MutatorIcon$$module$build$src$core$icons$mutator_icon.isIgnorableMutatorEvent(a)||this.updateWorkspacePid||(this.updateWorkspacePid=setTimeout(()=>{this.updateWorkspacePid=null;this.recomposeSourceBlock()},0))}}static isIgnorableMutatorEvent(a){return a.isUiEvent||a.type===$.CREATE$$module$build$src$core$events$utils||a.type===$.CHANGE$$module$build$src$core$events$utils&&"disabled"===a.element}recomposeSourceBlock(){if(this.rootBlock){if(!this.sourceBlock.compose)throw Error("Blocks with mutator icons must include a compose method"); +var a=$.getGroup$$module$build$src$core$events$utils();a||$.setGroup$$module$build$src$core$events$utils(!0);var b=BlockChange$$module$build$src$core$events$events_block_change.getExtraBlockState_(this.sourceBlock);this.sourceBlock.compose(this.rootBlock);var c=BlockChange$$module$build$src$core$events$events_block_change.getExtraBlockState_(this.sourceBlock);b!==c&&fire$$module$build$src$core$events$utils(new (get$$module$build$src$core$events$utils($.CHANGE$$module$build$src$core$events$utils))(this.sourceBlock, +"mutation",null,b,c));$.setGroup$$module$build$src$core$events$utils(a)}}getWorkspace(){let a;return null==(a=this.miniWorkspaceBubble)?void 0:a.getWorkspace()}static reconnect(a,b,c){warn$$module$build$src$core$utils$deprecation("MutatorIcon.reconnect","v10","v11","connection.reconnect");return a?a.reconnect(b,c):!1}static findParentWs(a){warn$$module$build$src$core$utils$deprecation("MutatorIcon.findParentWs","v10","v11","workspace.getRootWorkspace");return a.getRootWorkspace()}}; +$.MutatorIcon$$module$build$src$core$icons$mutator_icon.TYPE=IconType$$module$build$src$core$icons$icon_types.MUTATOR;$.MutatorIcon$$module$build$src$core$icons$mutator_icon.WEIGHT=1;var module$build$src$core$icons$mutator_icon={};module$build$src$core$icons$mutator_icon.MutatorIcon=$.MutatorIcon$$module$build$src$core$icons$mutator_icon;var allExtensions$$module$build$src$core$extensions=Object.create(null),TEST_ONLY$$module$build$src$core$extensions={allExtensions:allExtensions$$module$build$src$core$extensions};$.register$$module$build$src$core$extensions("parent_tooltip_when_inline",extensionParentTooltip$$module$build$src$core$extensions);var module$build$src$core$extensions={TEST_ONLY:TEST_ONLY$$module$build$src$core$extensions};module$build$src$core$extensions.apply=apply$$module$build$src$core$extensions; +module$build$src$core$extensions.buildTooltipForDropdown=$.buildTooltipForDropdown$$module$build$src$core$extensions;module$build$src$core$extensions.buildTooltipWithFieldText=$.buildTooltipWithFieldText$$module$build$src$core$extensions;module$build$src$core$extensions.isRegistered=isRegistered$$module$build$src$core$extensions;module$build$src$core$extensions.register=$.register$$module$build$src$core$extensions;module$build$src$core$extensions.registerMixin=$.registerMixin$$module$build$src$core$extensions; +module$build$src$core$extensions.registerMutator=$.registerMutator$$module$build$src$core$extensions;module$build$src$core$extensions.runAfterPageLoad=runAfterPageLoad$$module$build$src$core$extensions;module$build$src$core$extensions.unregister=unregister$$module$build$src$core$extensions;var KeyCodes$$module$build$src$core$utils$keycodes; +(function(a){a[a.WIN_KEY_FF_LINUX=0]="WIN_KEY_FF_LINUX";a[a.MAC_ENTER=3]="MAC_ENTER";a[a.BACKSPACE=8]="BACKSPACE";a[a.TAB=9]="TAB";a[a.NUM_CENTER=12]="NUM_CENTER";a[a.ENTER=13]="ENTER";a[a.SHIFT=16]="SHIFT";a[a.CTRL=17]="CTRL";a[a.ALT=18]="ALT";a[a.PAUSE=19]="PAUSE";a[a.CAPS_LOCK=20]="CAPS_LOCK";a[a.ESC=27]="ESC";a[a.SPACE=32]="SPACE";a[a.PAGE_UP=33]="PAGE_UP";a[a.PAGE_DOWN=34]="PAGE_DOWN";a[a.END=35]="END";a[a.HOME=36]="HOME";a[a.LEFT=37]="LEFT";a[a.UP=38]="UP";a[a.RIGHT=39]="RIGHT";a[a.DOWN=40]= +"DOWN";a[a.PLUS_SIGN=43]="PLUS_SIGN";a[a.PRINT_SCREEN=44]="PRINT_SCREEN";a[a.INSERT=45]="INSERT";a[a.DELETE=46]="DELETE";a[a.ZERO=48]="ZERO";a[a.ONE=49]="ONE";a[a.TWO=50]="TWO";a[a.THREE=51]="THREE";a[a.FOUR=52]="FOUR";a[a.FIVE=53]="FIVE";a[a.SIX=54]="SIX";a[a.SEVEN=55]="SEVEN";a[a.EIGHT=56]="EIGHT";a[a.NINE=57]="NINE";a[a.FF_SEMICOLON=59]="FF_SEMICOLON";a[a.FF_EQUALS=61]="FF_EQUALS";a[a.FF_DASH=173]="FF_DASH";a[a.FF_HASH=163]="FF_HASH";a[a.QUESTION_MARK=63]="QUESTION_MARK";a[a.AT_SIGN=64]="AT_SIGN"; +a[a.A=65]="A";a[a.B=66]="B";a[a.C=67]="C";a[a.D=68]="D";a[a.E=69]="E";a[a.F=70]="F";a[a.G=71]="G";a[a.H=72]="H";a[a.I=73]="I";a[a.J=74]="J";a[a.K=75]="K";a[a.L=76]="L";a[a.M=77]="M";a[a.N=78]="N";a[a.O=79]="O";a[a.P=80]="P";a[a.Q=81]="Q";a[a.R=82]="R";a[a.S=83]="S";a[a.T=84]="T";a[a.U=85]="U";a[a.V=86]="V";a[a.W=87]="W";a[a.X=88]="X";a[a.Y=89]="Y";a[a.Z=90]="Z";a[a.META=91]="META";a[a.WIN_KEY_RIGHT=92]="WIN_KEY_RIGHT";a[a.CONTEXT_MENU=93]="CONTEXT_MENU";a[a.NUM_ZERO=96]="NUM_ZERO";a[a.NUM_ONE=97]= +"NUM_ONE";a[a.NUM_TWO=98]="NUM_TWO";a[a.NUM_THREE=99]="NUM_THREE";a[a.NUM_FOUR=100]="NUM_FOUR";a[a.NUM_FIVE=101]="NUM_FIVE";a[a.NUM_SIX=102]="NUM_SIX";a[a.NUM_SEVEN=103]="NUM_SEVEN";a[a.NUM_EIGHT=104]="NUM_EIGHT";a[a.NUM_NINE=105]="NUM_NINE";a[a.NUM_MULTIPLY=106]="NUM_MULTIPLY";a[a.NUM_PLUS=107]="NUM_PLUS";a[a.NUM_MINUS=109]="NUM_MINUS";a[a.NUM_PERIOD=110]="NUM_PERIOD";a[a.NUM_DIVISION=111]="NUM_DIVISION";a[a.F1=112]="F1";a[a.F2=113]="F2";a[a.F3=114]="F3";a[a.F4=115]="F4";a[a.F5=116]="F5";a[a.F6= +117]="F6";a[a.F7=118]="F7";a[a.F8=119]="F8";a[a.F9=120]="F9";a[a.F10=121]="F10";a[a.F11=122]="F11";a[a.F12=123]="F12";a[a.NUMLOCK=144]="NUMLOCK";a[a.SCROLL_LOCK=145]="SCROLL_LOCK";a[a.FIRST_MEDIA_KEY=166]="FIRST_MEDIA_KEY";a[a.LAST_MEDIA_KEY=183]="LAST_MEDIA_KEY";a[a.SEMICOLON=186]="SEMICOLON";a[a.DASH=189]="DASH";a[a.EQUALS=187]="EQUALS";a[a.COMMA=188]="COMMA";a[a.PERIOD=190]="PERIOD";a[a.SLASH=191]="SLASH";a[a.APOSTROPHE=192]="APOSTROPHE";a[a.TILDE=192]="TILDE";a[a.SINGLE_QUOTE=222]="SINGLE_QUOTE"; +a[a.OPEN_SQUARE_BRACKET=219]="OPEN_SQUARE_BRACKET";a[a.BACKSLASH=220]="BACKSLASH";a[a.CLOSE_SQUARE_BRACKET=221]="CLOSE_SQUARE_BRACKET";a[a.WIN_KEY=224]="WIN_KEY";a[a.MAC_FF_META=224]="MAC_FF_META";a[a.MAC_WK_CMD_LEFT=91]="MAC_WK_CMD_LEFT";a[a.MAC_WK_CMD_RIGHT=93]="MAC_WK_CMD_RIGHT";a[a.WIN_IME=229]="WIN_IME";a[a.VK_NONAME=252]="VK_NONAME";a[a.PHANTOM=255]="PHANTOM"})(KeyCodes$$module$build$src$core$utils$keycodes||(KeyCodes$$module$build$src$core$utils$keycodes={})); +var module$build$src$core$utils$keycodes={};module$build$src$core$utils$keycodes.KeyCodes=KeyCodes$$module$build$src$core$utils$keycodes;var module$build$src$core$utils$svg_paths={};module$build$src$core$utils$svg_paths.arc=arc$$module$build$src$core$utils$svg_paths;module$build$src$core$utils$svg_paths.curve=curve$$module$build$src$core$utils$svg_paths;module$build$src$core$utils$svg_paths.line=line$$module$build$src$core$utils$svg_paths;module$build$src$core$utils$svg_paths.lineOnAxis=lineOnAxis$$module$build$src$core$utils$svg_paths;module$build$src$core$utils$svg_paths.lineTo=lineTo$$module$build$src$core$utils$svg_paths; +module$build$src$core$utils$svg_paths.moveBy=moveBy$$module$build$src$core$utils$svg_paths;module$build$src$core$utils$svg_paths.moveTo=moveTo$$module$build$src$core$utils$svg_paths;module$build$src$core$utils$svg_paths.point=point$$module$build$src$core$utils$svg_paths;var module$build$src$core$utils={};module$build$src$core$utils.Coordinate=Coordinate$$module$build$src$core$utils$coordinate;module$build$src$core$utils.KeyCodes=KeyCodes$$module$build$src$core$utils$keycodes;module$build$src$core$utils.Rect=Rect$$module$build$src$core$utils$rect;module$build$src$core$utils.Size=Size$$module$build$src$core$utils$size;module$build$src$core$utils.Svg=Svg$$module$build$src$core$utils$svg;module$build$src$core$utils.aria=module$build$src$core$utils$aria; +module$build$src$core$utils.array=module$build$src$core$utils$array;module$build$src$core$utils.browserEvents=module$build$src$core$browser_events;module$build$src$core$utils.colour=module$build$src$core$utils$colour;module$build$src$core$utils.deprecation=module$build$src$core$utils$deprecation;module$build$src$core$utils.dom=module$build$src$core$utils$dom;module$build$src$core$utils.extensions=module$build$src$core$extensions;module$build$src$core$utils.idGenerator=module$build$src$core$utils$idgenerator; +module$build$src$core$utils.math=module$build$src$core$utils$math;module$build$src$core$utils.object=module$build$src$core$utils$object;module$build$src$core$utils.parsing=module$build$src$core$utils$parsing;module$build$src$core$utils.string=module$build$src$core$utils$string;module$build$src$core$utils.style=module$build$src$core$utils$style;module$build$src$core$utils.svgMath=module$build$src$core$utils$svg_math;module$build$src$core$utils.svgPaths=module$build$src$core$utils$svg_paths; +module$build$src$core$utils.toolbox=module$build$src$core$utils$toolbox;module$build$src$core$utils.userAgent=module$build$src$core$utils$useragent;module$build$src$core$utils.xml=module$build$src$core$utils$xml;var module$build$src$core$icons$registry={};module$build$src$core$icons$registry.register=register$$module$build$src$core$icons$registry;module$build$src$core$icons$registry.unregister=unregister$$module$build$src$core$icons$registry;var TextBubble$$module$build$src$core$bubbles$text_bubble=class extends Bubble$$module$build$src$core$bubbles$bubble{constructor(a,b,c,d){super(b,c,d);this.text=a;this.workspace=b;this.anchor=c;this.ownerRect=d;this.paragraph=this.stringToSvg(a,this.contentContainer);this.updateBubbleSize()}getText(){return this.text}setText(a){this.text=a;removeNode$$module$build$src$core$utils$dom(this.paragraph);this.paragraph=this.stringToSvg(a,this.contentContainer);this.updateBubbleSize()}stringToSvg(a,b){b= +this.createParagraph(b);a=this.createSpans(b,a);this.workspace.RTL&&this.rightAlignSpans(b.getBBox().width,a);return b}createParagraph(a){return createSvgElement$$module$build$src$core$utils$dom(Svg$$module$build$src$core$utils$svg.TEXT,{"class":"blocklyText blocklyBubbleText blocklyNoPointerEvents",y:Bubble$$module$build$src$core$bubbles$bubble.BORDER_WIDTH},a)}createSpans(a,b){return b.split("\n").map(c=>{const d=createSvgElement$$module$build$src$core$utils$dom(Svg$$module$build$src$core$utils$svg.TSPAN, +{dy:"1em",x:Bubble$$module$build$src$core$bubbles$bubble.BORDER_WIDTH},a);c=document.createTextNode(c);d.appendChild(c);return d})}rightAlignSpans(a,b){for(const c of b)c.setAttribute("text-anchor","end"),c.setAttribute("x",`${a+Bubble$$module$build$src$core$bubbles$bubble.BORDER_WIDTH}`)}updateBubbleSize(){const a=this.paragraph.getBBox();this.setSize(new Size$$module$build$src$core$utils$size(a.width+2*Bubble$$module$build$src$core$bubbles$bubble.BORDER_WIDTH,a.height+2*Bubble$$module$build$src$core$bubbles$bubble.BORDER_WIDTH), +!0)}},module$build$src$core$bubbles$text_bubble={};module$build$src$core$bubbles$text_bubble.TextBubble=TextBubble$$module$build$src$core$bubbles$text_bubble;var TextInputBubble$$module$build$src$core$bubbles$textinput_bubble=class extends Bubble$$module$build$src$core$bubbles$bubble{constructor(a,b,c){super(a,b,c);this.workspace=a;this.anchor=b;this.ownerRect=c;this.resizePointerMoveListener=this.resizePointerUpListener=null;this.textChangeListeners=[];this.sizeChangeListeners=[];this.text="";this.DEFAULT_SIZE=new Size$$module$build$src$core$utils$size(160+Bubble$$module$build$src$core$bubbles$bubble.DOUBLE_BORDER,80+Bubble$$module$build$src$core$bubbles$bubble.DOUBLE_BORDER); +this.MIN_SIZE=new Size$$module$build$src$core$utils$size(45+Bubble$$module$build$src$core$bubbles$bubble.DOUBLE_BORDER,20+Bubble$$module$build$src$core$bubbles$bubble.DOUBLE_BORDER);({inputRoot:this.inputRoot,textArea:this.textArea}=this.createEditor(this.contentContainer));this.resizeGroup=this.createResizeHandle(this.svgRoot);this.setSize(this.DEFAULT_SIZE,!0)}getText(){return this.text}setText(a){this.text=a;this.textArea.value=a;this.onTextChange()}addTextChangeListener(a){this.textChangeListeners.push(a)}addSizeChangeListener(a){this.sizeChangeListeners.push(a)}createEditor(a){a= +createSvgElement$$module$build$src$core$utils$dom(Svg$$module$build$src$core$utils$svg.FOREIGNOBJECT,{x:Bubble$$module$build$src$core$bubbles$bubble.BORDER_WIDTH,y:Bubble$$module$build$src$core$bubbles$bubble.BORDER_WIDTH},a);const b=document.createElementNS(HTML_NS$$module$build$src$core$utils$dom,"body");b.setAttribute("xmlns",HTML_NS$$module$build$src$core$utils$dom);b.className="blocklyMinimalBody";const c=document.createElementNS(HTML_NS$$module$build$src$core$utils$dom,"textarea");c.className= +"blocklyCommentTextarea";c.setAttribute("dir",this.workspace.RTL?"RTL":"LTR");b.appendChild(c);a.appendChild(b);this.bindTextAreaEvents(c);setTimeout(()=>{c.focus()},0);return{inputRoot:a,textArea:c}}bindTextAreaEvents(a){conditionalBind$$module$build$src$core$browser_events(a,"wheel",this,b=>{b.stopPropagation()});conditionalBind$$module$build$src$core$browser_events(a,"focus",this,this.onStartEdit,!0);conditionalBind$$module$build$src$core$browser_events(a,"change",this,this.onTextChange)}createResizeHandle(a){a= +createSvgElement$$module$build$src$core$utils$dom(Svg$$module$build$src$core$utils$svg.G,{"class":this.workspace.RTL?"blocklyResizeSW":"blocklyResizeSE"},a);const b=2*Bubble$$module$build$src$core$bubbles$bubble.BORDER_WIDTH;createSvgElement$$module$build$src$core$utils$dom(Svg$$module$build$src$core$utils$svg.POLYGON,{points:`0,${b} ${b},${b} ${b},0`},a);createSvgElement$$module$build$src$core$utils$dom(Svg$$module$build$src$core$utils$svg.LINE,{"class":"blocklyResizeLine",x1:b/3,y1:b-1,x2:b-1,y2:b/ +3},a);createSvgElement$$module$build$src$core$utils$dom(Svg$$module$build$src$core$utils$svg.LINE,{"class":"blocklyResizeLine",x1:2*b/3,y1:b-1,x2:b-1,y2:2*b/3},a);conditionalBind$$module$build$src$core$browser_events(a,"pointerdown",this,this.onResizePointerDown);return a}setSize(a,b=!1){a.width=Math.max(a.width,this.MIN_SIZE.width);a.height=Math.max(a.height,this.MIN_SIZE.height);const c=a.width-Bubble$$module$build$src$core$bubbles$bubble.DOUBLE_BORDER,d=a.height-Bubble$$module$build$src$core$bubbles$bubble.DOUBLE_BORDER; +this.inputRoot.setAttribute("width",`${c}`);this.inputRoot.setAttribute("height",`${d}`);this.textArea.style.width=`${c-4}px`;this.textArea.style.height=`${d-4}px`;this.workspace.RTL?this.resizeGroup.setAttribute("transform",`translate(${Bubble$$module$build$src$core$bubbles$bubble.DOUBLE_BORDER}, ${d}) scale(-1 1)`):this.resizeGroup.setAttribute("transform",`translate(${c}, ${d})`);super.setSize(a,b);this.onSizeChange()}getSize(){return super.getSize()}onResizePointerDown(a){this.bringToFront(); +isRightButton$$module$build$src$core$browser_events(a)||(this.workspace.startDrag(a,new Coordinate$$module$build$src$core$utils$coordinate(this.workspace.RTL?-this.getSize().width:this.getSize().width,this.getSize().height)),this.resizePointerUpListener=conditionalBind$$module$build$src$core$browser_events(document,"pointerup",this,this.onResizePointerUp),this.resizePointerMoveListener=conditionalBind$$module$build$src$core$browser_events(document,"pointermove",this,this.onResizePointerMove),this.workspace.hideChaff()); +a.stopPropagation()}onResizePointerUp(a){clearTouchIdentifier$$module$build$src$core$touch();this.resizePointerUpListener&&(unbind$$module$build$src$core$browser_events(this.resizePointerUpListener),this.resizePointerUpListener=null);this.resizePointerMoveListener&&(unbind$$module$build$src$core$browser_events(this.resizePointerMoveListener),this.resizePointerMoveListener=null)}onResizePointerMove(a){a=this.workspace.moveDrag(a);this.setSize(new Size$$module$build$src$core$utils$size(this.workspace.RTL? +-a.x:a.x,a.y),!1);this.onSizeChange()}onStartEdit(){this.bringToFront()&&this.textArea.focus()}onTextChange(){this.text=this.textArea.value;for(const a of this.textChangeListeners)a()}onSizeChange(){for(const a of this.sizeChangeListeners)a()}};register$$module$build$src$core$css("\n.blocklyCommentTextarea {\n background-color: #fef49c;\n border: 0;\n display: block;\n margin: 0;\n outline: 0;\n padding: 3px;\n resize: none;\n text-overflow: hidden;\n}\n"); +var module$build$src$core$bubbles$textinput_bubble={};module$build$src$core$bubbles$textinput_bubble.TextInputBubble=TextInputBubble$$module$build$src$core$bubbles$textinput_bubble;var SIZE$$module$build$src$core$icons$comment_icon=17,DEFAULT_BUBBLE_WIDTH$$module$build$src$core$icons$comment_icon=160,DEFAULT_BUBBLE_HEIGHT$$module$build$src$core$icons$comment_icon=80,CommentIcon$$module$build$src$core$icons$comment_icon=class extends Icon$$module$build$src$core$icons$icon{constructor(a){super(a);this.sourceBlock=a;this.textBubble=this.textInputBubble=null;this.text="";this.bubbleSize=new Size$$module$build$src$core$utils$size(DEFAULT_BUBBLE_WIDTH$$module$build$src$core$icons$comment_icon, +DEFAULT_BUBBLE_HEIGHT$$module$build$src$core$icons$comment_icon);this.bubbleVisiblity=!1}getType(){return CommentIcon$$module$build$src$core$icons$comment_icon.TYPE}initView(a){this.svgRoot||(super.initView(a),createSvgElement$$module$build$src$core$utils$dom(Svg$$module$build$src$core$utils$svg.CIRCLE,{"class":"blocklyIconShape",r:"8",cx:"8",cy:"8"},this.svgRoot),createSvgElement$$module$build$src$core$utils$dom(Svg$$module$build$src$core$utils$svg.PATH,{"class":"blocklyIconSymbol",d:"m6.8,10h2c0.003,-0.617 0.271,-0.962 0.633,-1.266 2.875,-2.4050.607,-5.534 -3.765,-3.874v1.7c3.12,-1.657 3.698,0.118 2.336,1.25-1.201,0.998 -1.201,1.528 -1.204,2.19z"}, +this.svgRoot),createSvgElement$$module$build$src$core$utils$dom(Svg$$module$build$src$core$utils$svg.RECT,{"class":"blocklyIconSymbol",x:"6.8",y:"10.78",height:"2",width:"2"},this.svgRoot))}dispose(){super.dispose();let a;null==(a=this.textInputBubble)||a.dispose();let b;null==(b=this.textBubble)||b.dispose()}getWeight(){return CommentIcon$$module$build$src$core$icons$comment_icon.WEIGHT}getSize(){return new Size$$module$build$src$core$utils$size(SIZE$$module$build$src$core$icons$comment_icon,SIZE$$module$build$src$core$icons$comment_icon)}applyColour(){super.applyColour(); +const a=this.sourceBlock.style.colourPrimary;let b;null==(b=this.textInputBubble)||b.setColour(a);let c;null==(c=this.textBubble)||c.setColour(a)}updateEditable(){super.updateEditable();this.bubbleIsVisible()&&(this.setBubbleVisible(!1),this.setBubbleVisible(!0))}onLocationChange(a){super.onLocationChange(a);a=this.getAnchorLocation();let b;null==(b=this.textInputBubble)||b.setAnchorLocation(a);let c;null==(c=this.textBubble)||c.setAnchorLocation(a)}setText(a){this.text=a;let b;null==(b=this.textInputBubble)|| +b.setText(this.text);let c;null==(c=this.textBubble)||c.setText(this.text)}getText(){return this.text}setBubbleSize(a){this.bubbleSize=a;let b;null==(b=this.textInputBubble)||b.setSize(this.bubbleSize,!0)}getBubbleSize(){return this.bubbleSize}saveState(){return this.text?{text:this.text,pinned:this.bubbleIsVisible(),height:this.bubbleSize.height,width:this.bubbleSize.width}:null}loadState(a){let b;this.text=null!=(b=a.text)?b:"";let c,d;this.bubbleSize=new Size$$module$build$src$core$utils$size(null!= +(c=a.width)?c:DEFAULT_BUBBLE_WIDTH$$module$build$src$core$icons$comment_icon,null!=(d=a.height)?d:DEFAULT_BUBBLE_HEIGHT$$module$build$src$core$icons$comment_icon);let e;this.bubbleVisiblity=null!=(e=a.pinned)?e:!1;setTimeout(()=>this.setBubbleVisible(this.bubbleVisiblity),1)}onClick(){super.onClick();this.setBubbleVisible(!this.bubbleIsVisible())}onTextChange(){this.textInputBubble&&(this.text=this.textInputBubble.getText())}onSizeChange(){this.textInputBubble&&(this.bubbleSize=this.textInputBubble.getSize())}bubbleIsVisible(){return this.bubbleVisiblity}setBubbleVisible(a){if(!a|| +!this.textBubble&&!this.textInputBubble)if(a||this.textBubble||this.textInputBubble)this.bubbleVisiblity=a,this.sourceBlock.rendered&&!this.sourceBlock.isInFlyout&&(a?(this.sourceBlock.isEditable()?this.showEditableBubble():this.showNonEditableBubble(),this.applyColour()):this.hideBubble(),fire$$module$build$src$core$events$utils(new (get$$module$build$src$core$events$utils(BUBBLE_OPEN$$module$build$src$core$events$utils))(this.sourceBlock,a,"comment")))}showEditableBubble(){this.textInputBubble= +new TextInputBubble$$module$build$src$core$bubbles$textinput_bubble(this.sourceBlock.workspace,this.getAnchorLocation(),this.getBubbleOwnerRect());this.textInputBubble.setText(this.getText());this.textInputBubble.setSize(this.bubbleSize,!0);this.textInputBubble.addTextChangeListener(()=>this.onTextChange());this.textInputBubble.addSizeChangeListener(()=>this.onSizeChange())}showNonEditableBubble(){this.textBubble=new TextBubble$$module$build$src$core$bubbles$text_bubble(this.getText(),this.sourceBlock.workspace, +this.getAnchorLocation(),this.getBubbleOwnerRect())}hideBubble(){let a;null==(a=this.textInputBubble)||a.dispose();this.textInputBubble=null;let b;null==(b=this.textBubble)||b.dispose();this.textBubble=null}getAnchorLocation(){const a=SIZE$$module$build$src$core$icons$comment_icon/2;return Coordinate$$module$build$src$core$utils$coordinate.sum(this.workspaceLocation,new Coordinate$$module$build$src$core$utils$coordinate(a,a))}getBubbleOwnerRect(){const a=this.sourceBlock.getSvgRoot().getBBox();return new Rect$$module$build$src$core$utils$rect(a.y, +a.y+a.height,a.x,a.x+a.width)}};CommentIcon$$module$build$src$core$icons$comment_icon.TYPE=IconType$$module$build$src$core$icons$icon_types.COMMENT;CommentIcon$$module$build$src$core$icons$comment_icon.WEIGHT=3;register$$module$build$src$core$icons$registry(CommentIcon$$module$build$src$core$icons$comment_icon.TYPE,CommentIcon$$module$build$src$core$icons$comment_icon);var module$build$src$core$icons$comment_icon={};module$build$src$core$icons$comment_icon.CommentIcon=CommentIcon$$module$build$src$core$icons$comment_icon;var SIZE$$module$build$src$core$icons$warning_icon=17,WarningIcon$$module$build$src$core$icons$warning_icon=class extends Icon$$module$build$src$core$icons$icon{constructor(a){super(a);this.sourceBlock=a;this.textMap=new Map;this.textBubble=null}getType(){return WarningIcon$$module$build$src$core$icons$warning_icon.TYPE}initView(a){this.svgRoot||(super.initView(a),createSvgElement$$module$build$src$core$utils$dom(Svg$$module$build$src$core$utils$svg.PATH,{"class":"blocklyIconShape",d:"M2,15Q-1,15 0.5,12L6.5,1.7Q8,-1 9.5,1.7L15.5,12Q17,15 14,15z"}, +this.svgRoot),createSvgElement$$module$build$src$core$utils$dom(Svg$$module$build$src$core$utils$svg.PATH,{"class":"blocklyIconSymbol",d:"m7,4.8v3.16l0.27,2.27h1.46l0.27,-2.27v-3.16z"},this.svgRoot),createSvgElement$$module$build$src$core$utils$dom(Svg$$module$build$src$core$utils$svg.RECT,{"class":"blocklyIconSymbol",x:"7",y:"11",height:"2",width:"2"},this.svgRoot))}dispose(){super.dispose();let a;null==(a=this.textBubble)||a.dispose()}getWeight(){return WarningIcon$$module$build$src$core$icons$warning_icon.WEIGHT}getSize(){return new Size$$module$build$src$core$utils$size(SIZE$$module$build$src$core$icons$warning_icon, +SIZE$$module$build$src$core$icons$warning_icon)}applyColour(){super.applyColour();let a;null==(a=this.textBubble)||a.setColour(this.sourceBlock.style.colourPrimary)}updateCollapsed(){}isShownWhenCollapsed(){return!0}onLocationChange(a){super.onLocationChange(a);let b;null==(b=this.textBubble)||b.setAnchorLocation(this.getAnchorLocation())}addMessage(a,b){if(this.textMap.get(b)===a)return this;a?this.textMap.set(b,a):this.textMap.delete(b);let c;null==(c=this.textBubble)||c.setText(this.getText()); +return this}getText(){return[...this.textMap.values()].join("\n")}onClick(){super.onClick();this.setBubbleVisible(!this.bubbleIsVisible())}bubbleIsVisible(){return!!this.textBubble}setBubbleVisible(a){if(this.bubbleIsVisible()!==a){if(a)this.textBubble=new TextBubble$$module$build$src$core$bubbles$text_bubble(this.getText(),this.sourceBlock.workspace,this.getAnchorLocation(),this.getBubbleOwnerRect()),this.applyColour();else{let b;null==(b=this.textBubble)||b.dispose();this.textBubble=null}fire$$module$build$src$core$events$utils(new (get$$module$build$src$core$events$utils(BUBBLE_OPEN$$module$build$src$core$events$utils))(this.sourceBlock, +a,"warning"))}}getAnchorLocation(){const a=SIZE$$module$build$src$core$icons$warning_icon/2;return Coordinate$$module$build$src$core$utils$coordinate.sum(this.workspaceLocation,new Coordinate$$module$build$src$core$utils$coordinate(a,a))}getBubbleOwnerRect(){const a=this.sourceBlock.getSvgRoot().getBBox();return new Rect$$module$build$src$core$utils$rect(a.y,a.y+a.height,a.x,a.x+a.width)}};WarningIcon$$module$build$src$core$icons$warning_icon.TYPE=IconType$$module$build$src$core$icons$icon_types.WARNING; +WarningIcon$$module$build$src$core$icons$warning_icon.WEIGHT=2;var module$build$src$core$icons$warning_icon={};module$build$src$core$icons$warning_icon.WarningIcon=WarningIcon$$module$build$src$core$icons$warning_icon;var DuplicateIconType$$module$build$src$core$icons$exceptions=class extends Error{constructor(a){super(`Tried to append an icon of type ${a.getType()} when an icon of `+"that type already exists on the block. Use getIcon to access the existing icon.");this.icon=a}},module$build$src$core$icons$exceptions={};module$build$src$core$icons$exceptions.DuplicateIconType=DuplicateIconType$$module$build$src$core$icons$exceptions;var module$build$src$core$icons={};module$build$src$core$icons.CommentIcon=CommentIcon$$module$build$src$core$icons$comment_icon;module$build$src$core$icons.Icon=Icon$$module$build$src$core$icons$icon;module$build$src$core$icons.IconType=IconType$$module$build$src$core$icons$icon_types;module$build$src$core$icons.MutatorIcon=$.MutatorIcon$$module$build$src$core$icons$mutator_icon;module$build$src$core$icons.WarningIcon=WarningIcon$$module$build$src$core$icons$warning_icon; +module$build$src$core$icons.exceptions=module$build$src$core$icons$exceptions;module$build$src$core$icons.registry=module$build$src$core$icons$registry;var CATEGORY_NAME$$module$build$src$core$procedures,module$build$src$core$procedures;CATEGORY_NAME$$module$build$src$core$procedures="PROCEDURE";$.DEFAULT_ARG$$module$build$src$core$procedures="x";module$build$src$core$procedures={CATEGORY_NAME:CATEGORY_NAME$$module$build$src$core$procedures,DEFAULT_ARG:$.DEFAULT_ARG$$module$build$src$core$procedures};module$build$src$core$procedures.ObservableProcedureMap=ObservableProcedureMap$$module$build$src$core$observable_procedure_map; +module$build$src$core$procedures.allProcedures=allProcedures$$module$build$src$core$procedures;module$build$src$core$procedures.findLegalName=$.findLegalName$$module$build$src$core$procedures;module$build$src$core$procedures.flyoutCategory=flyoutCategory$$module$build$src$core$procedures;module$build$src$core$procedures.getCallers=getCallers$$module$build$src$core$procedures;module$build$src$core$procedures.getDefinition=$.getDefinition$$module$build$src$core$procedures; +module$build$src$core$procedures.isNameUsed=isNameUsed$$module$build$src$core$procedures;module$build$src$core$procedures.isProcedureBlock=isProcedureBlock$$module$build$src$core$interfaces$i_procedure_block;module$build$src$core$procedures.mutateCallers=$.mutateCallers$$module$build$src$core$procedures;module$build$src$core$procedures.mutatorOpenListener=mutatorOpenListener$$module$build$src$core$procedures;module$build$src$core$procedures.rename=$.rename$$module$build$src$core$procedures;var TypesContainer$$module$build$src$core$renderers$measurables$types=class{constructor(){this.NONE=0;this.FIELD=1;this.HAT=2;this.ICON=4;this.SPACER=8;this.BETWEEN_ROW_SPACER=16;this.IN_ROW_SPACER=32;this.EXTERNAL_VALUE_INPUT=64;this.INPUT=128;this.INLINE_INPUT=256;this.STATEMENT_INPUT=512;this.CONNECTION=1024;this.PREVIOUS_CONNECTION=2048;this.NEXT_CONNECTION=4096;this.OUTPUT_CONNECTION=8192;this.CORNER=16384;this.LEFT_SQUARE_CORNER=32768;this.LEFT_ROUND_CORNER=65536;this.RIGHT_SQUARE_CORNER=131072; +this.RIGHT_ROUND_CORNER=262144;this.JAGGED_EDGE=524288;this.ROW=1048576;this.TOP_ROW=2097152;this.BOTTOM_ROW=4194304;this.INPUT_ROW=8388608;this.LEFT_CORNER=this.LEFT_SQUARE_CORNER|this.LEFT_ROUND_CORNER;this.RIGHT_CORNER=this.RIGHT_SQUARE_CORNER|this.RIGHT_ROUND_CORNER;this.nextTypeValue_=16777216}getType(a){Object.prototype.hasOwnProperty.call(this,a)||(this[a]=this.nextTypeValue_,this.nextTypeValue_<<=1);return this[a]}isField(a){return a.type&this.FIELD}isHat(a){return a.type&this.HAT}isIcon(a){return a.type& +this.ICON}isSpacer(a){return a.type&this.SPACER}isInRowSpacer(a){return a.type&this.IN_ROW_SPACER}isInput(a){return a.type&this.INPUT}isExternalInput(a){return a.type&this.EXTERNAL_VALUE_INPUT}isInlineInput(a){return a.type&this.INLINE_INPUT}isStatementInput(a){return a.type&this.STATEMENT_INPUT}isPreviousConnection(a){return a.type&this.PREVIOUS_CONNECTION}isNextConnection(a){return a.type&this.NEXT_CONNECTION}isPreviousOrNextConnection(a){return a.type&(this.PREVIOUS_CONNECTION|this.NEXT_CONNECTION)}isLeftRoundedCorner(a){return a.type& +this.LEFT_ROUND_CORNER}isRightRoundedCorner(a){return a.type&this.RIGHT_ROUND_CORNER}isLeftSquareCorner(a){return a.type&this.LEFT_SQUARE_CORNER}isRightSquareCorner(a){return a.type&this.RIGHT_SQUARE_CORNER}isCorner(a){return a.type&this.CORNER}isJaggedEdge(a){return a.type&this.JAGGED_EDGE}isRow(a){return a.type&this.ROW}isBetweenRowSpacer(a){return a.type&this.BETWEEN_ROW_SPACER}isTopRow(a){return a.type&this.TOP_ROW}isBottomRow(a){return a.type&this.BOTTOM_ROW}isTopOrBottomRow(a){return a.type& +(this.TOP_ROW|this.BOTTOM_ROW)}isInputRow(a){return a.type&this.INPUT_ROW}},Types$$module$build$src$core$renderers$measurables$types=new TypesContainer$$module$build$src$core$renderers$measurables$types,module$build$src$core$renderers$measurables$types={Types:Types$$module$build$src$core$renderers$measurables$types};var Measurable$$module$build$src$core$renderers$measurables$base=class{constructor(a){this.centerline=this.xPos=this.height=this.width=0;this.constants_=a;this.type=Types$$module$build$src$core$renderers$measurables$types.NONE;this.notchOffset=this.constants_.NOTCH_OFFSET_LEFT}},module$build$src$core$renderers$measurables$base={};module$build$src$core$renderers$measurables$base.Measurable=Measurable$$module$build$src$core$renderers$measurables$base;var Row$$module$build$src$core$renderers$measurables$row=class{constructor(a){this.elements=[];this.xPos=this.yPos=this.widthWithConnectedBlocks=this.minWidth=this.minHeight=this.width=this.height=0;this.hasStatement=this.hasExternalInput=!1;this.statementEdge=0;this.hasJaggedEdge=this.hasDummyInput=this.hasInlineInput=!1;this.align=null;this.constants_=a;this.type=Types$$module$build$src$core$renderers$measurables$types.ROW;this.notchOffset=this.constants_.NOTCH_OFFSET_LEFT}getLastInput(){for(let a= +this.elements.length-1;0<=a;a--){const b=this.elements[a];if(Types$$module$build$src$core$renderers$measurables$types.isInput(b))return b}return null}measure(){throw Error("Unexpected attempt to measure a base Row.");}startsWithElemSpacer(){return!0}endsWithElemSpacer(){return!0}getFirstSpacer(){for(let a=0;arect,`,`${a} .blocklyEditableText>rect {`,`fill: ${this.FIELD_BORDER_RECT_COLOUR};`,"fill-opacity: .6;","stroke: none;","}",`${a} .blocklyNonEditableText>text,`,`${a} .blocklyEditableText>text {`,"fill: #000;","}",`${a} .blocklyFlyoutLabelText {`,"fill: #000;","}",`${a} .blocklyText.blocklyBubbleText {`,"fill: #000;","}",`${a} .blocklyEditableText:not(.editing):hover>rect {`,"stroke: #fff;","stroke-width: 2;","}",`${a} .blocklyHtmlInput {`, +`font-family: ${this.FIELD_TEXT_FONTFAMILY};`,`font-weight: ${this.FIELD_TEXT_FONTWEIGHT};`,"}",`${a} .blocklySelected>.blocklyPath {`,"stroke: #fc3;","stroke-width: 3px;","}",`${a} .blocklyHighlightedConnectionPath {`,"stroke: #fc3;","}",`${a} .blocklyReplaceable .blocklyPath {`,"fill-opacity: .5;","}",`${a} .blocklyReplaceable .blocklyPathLight,`,`${a} .blocklyReplaceable .blocklyPathDark {`,"display: none;","}",`${a} .blocklyInsertionMarker>.blocklyPath {`,`fill-opacity: ${this.INSERTION_MARKER_OPACITY};`, +"stroke: none;","}"]}},module$build$src$core$renderers$common$constants={};module$build$src$core$renderers$common$constants.ConstantProvider=ConstantProvider$$module$build$src$core$renderers$common$constants;module$build$src$core$renderers$common$constants.isDynamicShape=isDynamicShape$$module$build$src$core$renderers$common$constants;var Drawer$$module$build$src$core$renderers$common$drawer=class{constructor(a,b){this.inlinePath_=this.outlinePath_="";this.block_=a;this.info_=b;this.topLeft_=a.getRelativeToSurfaceXY();this.constants_=b.getRenderer().getConstants()}draw(){this.drawOutline_();this.drawInternals_();this.block_.pathObject.setPath(this.outlinePath_+"\n"+this.inlinePath_);this.info_.RTL&&this.block_.pathObject.flipRTL();this.recordSizeOnBlock_()}hideHiddenIcons_(){warn$$module$build$src$core$utils$deprecation("hideHiddenIcons_", +"v10","v11")}recordSizeOnBlock_(){this.block_.height=this.info_.height;this.block_.width=this.info_.widthWithChildren}drawOutline_(){this.drawTop_();for(let a=1;aa||a>this.fieldRow.length)throw Error("index "+a+" out of bounds.");if(!(b|| +""===b&&c))return a;"string"===typeof b&&(b=$.fromJson$$module$build$src$core$field_registry({type:"field_label",text:b}));b.setSourceBlock(this.sourceBlock);this.sourceBlock.rendered&&(b.init(),b.applyColour());b.name=c;b.setVisible(this.isVisible());b.prefixField&&(a=this.insertFieldAt(a,b.prefixField));this.fieldRow.splice(a,0,b);a++;b.suffixField&&(a=this.insertFieldAt(a,b.suffixField));this.sourceBlock.rendered&&(this.sourceBlock.queueRender(),this.sourceBlock.bumpNeighbours());return a}removeField(a, +b){for(let c=0,d;d=this.fieldRow[c];c++)if(d.name===a)return d.dispose(),this.fieldRow.splice(c,1),this.sourceBlock.rendered&&(this.sourceBlock.queueRender(),this.sourceBlock.bumpNeighbours()),!0;if(b)return!1;throw Error('Field "'+a+'" not found.');}isVisible(){return this.visible}setVisible(a){let b=[];if(this.visible===a)return b;this.visible=a;for(let d=0,e;e=this.fieldRow[d];d++)e.setVisible(a);if(this.connection){var c=this.connection;a?b=c.startTrackingAll():c.stopTrackingAll();if(c=c.targetBlock())c.getSvgRoot().style.display= +a?"block":"none"}return b}markDirty(){for(let a=0,b;b=this.fieldRow[a];a++)b.markDirty()}setCheck(a){if(!this.connection)throw Error("This input does not have a connection.");this.connection.setCheck(a);return this}setAlign(a){this.align=a;this.sourceBlock.rendered&&this.sourceBlock.queueRender();return this}setShadowDom(a){if(!this.connection)throw Error("This input does not have a connection.");this.connection.setShadowDom(a);return this}getShadowDom(){if(!this.connection)throw Error("This input does not have a connection."); +return this.connection.getShadowDom()}init(){if(this.sourceBlock.workspace.rendered)for(let a=0;a{connectionUiEffect$$module$build$src$core$block_animations(c.getSourceBlock());setTimeout(()=>{d.bringToFront()},0)})}}}update(a,b){const c=this.getCandidate(a);if((this.wouldDeleteBlock=this.shouldDelete(!!c,b))||this.shouldUpdatePreviews(c, +a))$.disable$$module$build$src$core$events$utils(),this.maybeHidePreview(c),this.maybeShowPreview(c),$.enable$$module$build$src$core$events$utils()}createMarkerBlock(a){var b=a.type;$.disable$$module$build$src$core$events$utils();let c;try{c=this.workspace.newBlock(b);c.setInsertionMarker(!0);if(a.saveExtraState){var d=a.saveExtraState(!0);d&&c.loadExtraState&&c.loadExtraState(d)}else if(a.mutationToDom){const e=a.mutationToDom();e&&c.domToMutation&&c.domToMutation(e)}for(b=0;b{let k;null==(k=d)||k.positionNearConnection(h,f,g);let l;null==(l=d)||l.getSvgRoot().setAttribute("visibility","visible")});this.markerConnection=e}hideInsertionMarker(){if(this.markerConnection){var a=this.markerConnection,b=a.getSourceBlock(),c=b.outputConnection,d;if((null==(d=b.previousConnection)?0:d.targetConnection)||(null==c?0:c.targetConnection))b.unplug(!0); +else{let e;null==(e=a.targetBlock())||e.unplug(!1)}if(a.targetConnection)throw Error("markerConnection still connected at the end of disconnectInsertionMarker");this.markerConnection=null;(a=b.getSvgRoot())&&a.setAttribute("visibility","hidden")}}showInsertionInputOutline(a){a=a.closest;this.highlightedBlock=a.getSourceBlock();this.highlightedBlock.highlightShapeForInput(a,!0)}hideInsertionInputOutline(){if(this.highlightedBlock){if(!this.activeCandidate)throw Error("Cannot hide the insertion marker outline because there is no active candidate"); +this.highlightedBlock.highlightShapeForInput(this.activeCandidate.closest,!1);this.highlightedBlock=null}}showReplacementFade(a){this.fadedBlock=a.closest.targetBlock();if(!this.fadedBlock)throw Error("Cannot show the replacement fade because the closest connection does not have a target block");this.fadedBlock.fadeForReplacement(!0)}hideReplacementFade(){this.fadedBlock&&(this.fadedBlock.fadeForReplacement(!1),this.fadedBlock=null)}getInsertionMarkers(){const a=[];this.firstMarker&&a.push(this.firstMarker); +this.lastMarker&&a.push(this.lastMarker);return a}disposeInsertionMarker(a){if(a){$.disable$$module$build$src$core$events$utils();try{a.dispose()}finally{$.enable$$module$build$src$core$events$utils()}}}}; +(function(a){a=a.PREVIEW_TYPE||(a.PREVIEW_TYPE={});a[a.INSERTION_MARKER=0]="INSERTION_MARKER";a[a.INPUT_OUTLINE=1]="INPUT_OUTLINE";a[a.REPLACEMENT_FADE=2]="REPLACEMENT_FADE"})(InsertionMarkerManager$$module$build$src$core$insertion_marker_manager||(InsertionMarkerManager$$module$build$src$core$insertion_marker_manager={})); +var PreviewType$$module$build$src$core$insertion_marker_manager=InsertionMarkerManager$$module$build$src$core$insertion_marker_manager.PREVIEW_TYPE,module$build$src$core$insertion_marker_manager={};module$build$src$core$insertion_marker_manager.InsertionMarkerManager=InsertionMarkerManager$$module$build$src$core$insertion_marker_manager;module$build$src$core$insertion_marker_manager.PreviewType=PreviewType$$module$build$src$core$insertion_marker_manager;var Renderer$$module$build$src$core$renderers$common$renderer=class{constructor(a){this.overrides=null;this.name=a}getClassName(){return this.name+"-renderer"}init(a,b){this.constants_=this.makeConstants_();b&&(this.overrides=b,Object.assign(this.constants_,b));this.constants_.setTheme(a);this.constants_.init()}createDom(a,b){this.constants_.createDom(a,this.name+"-"+b.name,"."+this.getClassName()+"."+b.getClassName())}refreshDom(a,b){const c=this.getConstants();c.dispose();this.constants_=this.makeConstants_(); +this.overrides&&Object.assign(this.constants_,this.overrides);this.constants_.randomIdentifier=c.randomIdentifier;this.constants_.setTheme(b);this.constants_.init();this.createDom(a,b)}dispose(){this.constants_&&this.constants_.dispose()}makeConstants_(){return new ConstantProvider$$module$build$src$core$renderers$common$constants}makeRenderInfo_(a){return new RenderInfo$$module$build$src$core$renderers$common$info(this,a)}makeDrawer_(a,b){return new Drawer$$module$build$src$core$renderers$common$drawer(a, +b)}makeMarkerDrawer(a,b){return new MarkerSvg$$module$build$src$core$renderers$common$marker_svg(a,this.getConstants(),b)}makePathObject(a,b){return new PathObject$$module$build$src$core$renderers$common$path_object(a,b,this.constants_)}getConstants(){return this.constants_}shouldHighlightConnection(a){return!0}orphanCanConnectAtEnd(a,b,c){return!!Connection$$module$build$src$core$connection.getConnectionForOrphanedConnection(a,c===ConnectionType$$module$build$src$core$connection_type.OUTPUT_VALUE? +b.outputConnection:b.previousConnection)}getConnectionPreviewMethod(a,b,c){return b.type===ConnectionType$$module$build$src$core$connection_type.OUTPUT_VALUE||b.type===ConnectionType$$module$build$src$core$connection_type.PREVIOUS_STATEMENT?!a.isConnected()||this.orphanCanConnectAtEnd(c,a.targetBlock(),b.type)?InsertionMarkerManager$$module$build$src$core$insertion_marker_manager.PREVIEW_TYPE.INSERTION_MARKER:InsertionMarkerManager$$module$build$src$core$insertion_marker_manager.PREVIEW_TYPE.REPLACEMENT_FADE: +InsertionMarkerManager$$module$build$src$core$insertion_marker_manager.PREVIEW_TYPE.INSERTION_MARKER}render(a){const b=this.makeRenderInfo_(a);b.measure();this.makeDrawer_(a,b).draw()}},module$build$src$core$renderers$common$renderer={};module$build$src$core$renderers$common$renderer.Renderer=Renderer$$module$build$src$core$renderers$common$renderer;var module$build$src$core$renderers$common$block_rendering={};module$build$src$core$renderers$common$block_rendering.BottomRow=BottomRow$$module$build$src$core$renderers$measurables$bottom_row;module$build$src$core$renderers$common$block_rendering.Connection=Connection$$module$build$src$core$renderers$measurables$connection;module$build$src$core$renderers$common$block_rendering.ConstantProvider=ConstantProvider$$module$build$src$core$renderers$common$constants; +module$build$src$core$renderers$common$block_rendering.Drawer=Drawer$$module$build$src$core$renderers$common$drawer;module$build$src$core$renderers$common$block_rendering.ExternalValueInput=ExternalValueInput$$module$build$src$core$renderers$measurables$external_value_input;module$build$src$core$renderers$common$block_rendering.Field=Field$$module$build$src$core$renderers$measurables$field;module$build$src$core$renderers$common$block_rendering.Hat=Hat$$module$build$src$core$renderers$measurables$hat; +module$build$src$core$renderers$common$block_rendering.Icon=Icon$$module$build$src$core$renderers$measurables$icon;module$build$src$core$renderers$common$block_rendering.InRowSpacer=InRowSpacer$$module$build$src$core$renderers$measurables$in_row_spacer;module$build$src$core$renderers$common$block_rendering.InlineInput=InlineInput$$module$build$src$core$renderers$measurables$inline_input;module$build$src$core$renderers$common$block_rendering.InputConnection=InputConnection$$module$build$src$core$renderers$measurables$input_connection; +module$build$src$core$renderers$common$block_rendering.InputRow=InputRow$$module$build$src$core$renderers$measurables$input_row;module$build$src$core$renderers$common$block_rendering.JaggedEdge=JaggedEdge$$module$build$src$core$renderers$measurables$jagged_edge;module$build$src$core$renderers$common$block_rendering.MarkerSvg=MarkerSvg$$module$build$src$core$renderers$common$marker_svg;module$build$src$core$renderers$common$block_rendering.Measurable=Measurable$$module$build$src$core$renderers$measurables$base; +module$build$src$core$renderers$common$block_rendering.NextConnection=NextConnection$$module$build$src$core$renderers$measurables$next_connection;module$build$src$core$renderers$common$block_rendering.OutputConnection=OutputConnection$$module$build$src$core$renderers$measurables$output_connection;module$build$src$core$renderers$common$block_rendering.PathObject=PathObject$$module$build$src$core$renderers$common$path_object; +module$build$src$core$renderers$common$block_rendering.PreviousConnection=PreviousConnection$$module$build$src$core$renderers$measurables$previous_connection;module$build$src$core$renderers$common$block_rendering.RenderInfo=RenderInfo$$module$build$src$core$renderers$common$info;module$build$src$core$renderers$common$block_rendering.Renderer=Renderer$$module$build$src$core$renderers$common$renderer;module$build$src$core$renderers$common$block_rendering.RoundCorner=RoundCorner$$module$build$src$core$renderers$measurables$round_corner; +module$build$src$core$renderers$common$block_rendering.Row=Row$$module$build$src$core$renderers$measurables$row;module$build$src$core$renderers$common$block_rendering.SpacerRow=SpacerRow$$module$build$src$core$renderers$measurables$spacer_row;module$build$src$core$renderers$common$block_rendering.SquareCorner=SquareCorner$$module$build$src$core$renderers$measurables$square_corner;module$build$src$core$renderers$common$block_rendering.StatementInput=StatementInput$$module$build$src$core$renderers$measurables$statement_input; +module$build$src$core$renderers$common$block_rendering.TopRow=TopRow$$module$build$src$core$renderers$measurables$top_row;module$build$src$core$renderers$common$block_rendering.Types=Types$$module$build$src$core$renderers$measurables$types;module$build$src$core$renderers$common$block_rendering.init=init$$module$build$src$core$renderers$common$block_rendering;module$build$src$core$renderers$common$block_rendering.register=register$$module$build$src$core$renderers$common$block_rendering; +module$build$src$core$renderers$common$block_rendering.unregister=unregister$$module$build$src$core$renderers$common$block_rendering;var ThemeManager$$module$build$src$core$theme_manager=class{constructor(a,b){this.workspace=a;this.theme=b;this.subscribedWorkspaces_=[];this.componentDB=new Map}getTheme(){return this.theme}setTheme(a){var b=this.theme;this.theme=a;if(a=this.workspace.getInjectionDiv())b&&(b=b.getClassName())&&removeClass$$module$build$src$core$utils$dom(a,b),(b=this.theme.getClassName())&&addClass$$module$build$src$core$utils$dom(a,b);for(let c=0,d;d=this.subscribedWorkspaces_[c];c++)d.refreshTheme();for(const [c, +d]of this.componentDB)for(const e of d){a=e.element;b=e.propertyName;const f=this.theme&&this.theme.getComponentStyle(c);a.style.setProperty(b,f||"")}for(const c of this.subscribedWorkspaces_)c.hideChaff()}subscribeWorkspace(a){this.subscribedWorkspaces_.push(a)}unsubscribeWorkspace(a){if(!removeElem$$module$build$src$core$utils$array(this.subscribedWorkspaces_,a))throw Error("Cannot unsubscribe a workspace that hasn't been subscribed.");}subscribe(a,b,c){this.componentDB.has(b)||this.componentDB.set(b, +[]);this.componentDB.get(b).push({element:a,propertyName:c});b=this.theme&&this.theme.getComponentStyle(b);a.style.setProperty(c,b||"")}unsubscribe(a){if(a)for(const [b,c]of this.componentDB){for(let d=c.length-1;0<=d;d--)c[d].element===a&&c.splice(d,1);c.length||this.componentDB.delete(b)}}dispose(){this.subscribedWorkspaces_.length=0;this.componentDB.clear()}},module$build$src$core$theme_manager={};module$build$src$core$theme_manager.ThemeManager=ThemeManager$$module$build$src$core$theme_manager;var CATEGORY_NAME$$module$build$src$core$variables_dynamic="VARIABLE_DYNAMIC",onCreateVariableButtonClick_String$$module$build$src$core$variables_dynamic=stringButtonClickHandler$$module$build$src$core$variables_dynamic,onCreateVariableButtonClick_Number$$module$build$src$core$variables_dynamic=numberButtonClickHandler$$module$build$src$core$variables_dynamic,onCreateVariableButtonClick_Colour$$module$build$src$core$variables_dynamic=colourButtonClickHandler$$module$build$src$core$variables_dynamic, +module$build$src$core$variables_dynamic={CATEGORY_NAME:CATEGORY_NAME$$module$build$src$core$variables_dynamic};module$build$src$core$variables_dynamic.flyoutCategory=flyoutCategory$$module$build$src$core$variables_dynamic;module$build$src$core$variables_dynamic.flyoutCategoryBlocks=flyoutCategoryBlocks$$module$build$src$core$variables_dynamic;module$build$src$core$variables_dynamic.onCreateVariableButtonClick_Colour=colourButtonClickHandler$$module$build$src$core$variables_dynamic; +module$build$src$core$variables_dynamic.onCreateVariableButtonClick_Number=numberButtonClickHandler$$module$build$src$core$variables_dynamic;module$build$src$core$variables_dynamic.onCreateVariableButtonClick_String=stringButtonClickHandler$$module$build$src$core$variables_dynamic;var ConnectionChecker$$module$build$src$core$connection_checker=class{canConnect(a,b,c,d){return this.canConnectWithReason(a,b,c,d)===Connection$$module$build$src$core$connection.CAN_CONNECT}canConnectWithReason(a,b,c,d){const e=this.doSafetyChecks(a,b);return e!==Connection$$module$build$src$core$connection.CAN_CONNECT?e:this.doTypeChecks(a,b)?c&&!this.doDragChecks(a,b,d||0)?Connection$$module$build$src$core$connection.REASON_DRAG_CHECKS_FAILED:Connection$$module$build$src$core$connection.CAN_CONNECT: +Connection$$module$build$src$core$connection.REASON_CHECKS_FAILED}getErrorMessage(a,b,c){switch(a){case Connection$$module$build$src$core$connection.REASON_SELF_CONNECTION:return"Attempted to connect a block to itself.";case Connection$$module$build$src$core$connection.REASON_DIFFERENT_WORKSPACES:return"Blocks not on same workspace.";case Connection$$module$build$src$core$connection.REASON_WRONG_TYPE:return"Attempt to connect incompatible types.";case Connection$$module$build$src$core$connection.REASON_TARGET_NULL:return"Target connection is null."; +case Connection$$module$build$src$core$connection.REASON_CHECKS_FAILED:return"Connection checks failed. "+(b+" expected "+b.getCheck()+", found "+c.getCheck());case Connection$$module$build$src$core$connection.REASON_SHADOW_PARENT:return"Connecting non-shadow to shadow block.";case Connection$$module$build$src$core$connection.REASON_DRAG_CHECKS_FAILED:return"Drag checks failed.";case Connection$$module$build$src$core$connection.REASON_PREVIOUS_AND_OUTPUT:return"Block would have an output and a previous connection."; +default:return"Unknown connection failure: this should never happen!"}}doSafetyChecks(a,b){if(!a||!b)return Connection$$module$build$src$core$connection.REASON_TARGET_NULL;let c,d,e;a.isSuperior()?(c=a.getSourceBlock(),d=b.getSourceBlock(),e=b):(d=a.getSourceBlock(),c=b.getSourceBlock(),e=a,a=b);return c===d?Connection$$module$build$src$core$connection.REASON_SELF_CONNECTION:e.type!==OPPOSITE_TYPE$$module$build$src$core$internal_constants[a.type]?Connection$$module$build$src$core$connection.REASON_WRONG_TYPE: +c.workspace!==d.workspace?Connection$$module$build$src$core$connection.REASON_DIFFERENT_WORKSPACES:c.isShadow()&&!d.isShadow()?Connection$$module$build$src$core$connection.REASON_SHADOW_PARENT:e.type===ConnectionType$$module$build$src$core$connection_type.OUTPUT_VALUE&&d.previousConnection&&d.previousConnection.isConnected()||e.type===ConnectionType$$module$build$src$core$connection_type.PREVIOUS_STATEMENT&&d.outputConnection&&d.outputConnection.isConnected()?Connection$$module$build$src$core$connection.REASON_PREVIOUS_AND_OUTPUT: +Connection$$module$build$src$core$connection.CAN_CONNECT}doTypeChecks(a,b){a=a.getCheck();b=b.getCheck();if(!a||!b)return!0;for(let c=0;cc||b.getSourceBlock().isInsertionMarker())return!1;switch(b.type){case ConnectionType$$module$build$src$core$connection_type.PREVIOUS_STATEMENT:return this.canConnectToPrevious_(a,b);case ConnectionType$$module$build$src$core$connection_type.OUTPUT_VALUE:if(b.isConnected()&& +!b.targetBlock().isInsertionMarker()||a.isConnected())return!1;break;case ConnectionType$$module$build$src$core$connection_type.INPUT_VALUE:if(b.isConnected()&&!b.targetBlock().isMovable()&&!b.targetBlock().isShadow())return!1;break;case ConnectionType$$module$build$src$core$connection_type.NEXT_STATEMENT:if(b.isConnected()&&!a.getSourceBlock().nextConnection&&!b.targetBlock().isShadow()&&b.targetBlock().nextConnection||b.targetBlock()&&!b.targetBlock().isMovable()&&!b.targetBlock().isShadow())return!1; +break;default:return!1}return-1!==draggingConnections$$module$build$src$core$common.indexOf(b)?!1:!0}canConnectToPrevious_(a,b){if(a.targetConnection||-1!==draggingConnections$$module$build$src$core$common.indexOf(b))return!1;if(!b.targetConnection)return!0;a=b.targetBlock();return a.isInsertionMarker()?!a.getPreviousBlock():!1}};register$$module$build$src$core$registry(Type$$module$build$src$core$registry.CONNECTION_CHECKER,DEFAULT$$module$build$src$core$registry,ConnectionChecker$$module$build$src$core$connection_checker); +var module$build$src$core$connection_checker={};module$build$src$core$connection_checker.ConnectionChecker=ConnectionChecker$$module$build$src$core$connection_checker;var VarDelete$$module$build$src$core$events$events_var_delete=class extends VarBase$$module$build$src$core$events$events_var_base{constructor(a){super(a);this.type=VAR_DELETE$$module$build$src$core$events$utils;a&&(this.varType=a.type,this.varName=a.name)}toJson(){const a=super.toJson();if(void 0===this.varType)throw Error("The var type is undefined. Either pass a variable to the constructor, or call fromJson");if(!this.varName)throw Error("The var name is undefined. Either pass a variable to the constructor, or call fromJson"); +a.varType=this.varType;a.varName=this.varName;return a}static fromJson(a,b,c){b=super.fromJson(a,b,null!=c?c:new VarDelete$$module$build$src$core$events$events_var_delete);b.varType=a.varType;b.varName=a.varName;return b}run(a){const b=this.getEventWorkspace_();if(!this.varId)throw Error("The var ID is undefined. Either pass a variable to the constructor, or call fromJson");if(!this.varName)throw Error("The var name is undefined. Either pass a variable to the constructor, or call fromJson");a?b.deleteVariableById(this.varId): +b.createVariable(this.varName,this.varType,this.varId)}};register$$module$build$src$core$registry(Type$$module$build$src$core$registry.EVENT,VAR_DELETE$$module$build$src$core$events$utils,VarDelete$$module$build$src$core$events$events_var_delete);var module$build$src$core$events$events_var_delete={};module$build$src$core$events$events_var_delete.VarDelete=VarDelete$$module$build$src$core$events$events_var_delete;var VarRename$$module$build$src$core$events$events_var_rename=class extends VarBase$$module$build$src$core$events$events_var_base{constructor(a,b){super(a);this.type=VAR_RENAME$$module$build$src$core$events$utils;a&&(this.oldName=a.name,this.newName="undefined"===typeof b?"":b)}toJson(){const a=super.toJson();if(!this.oldName)throw Error("The old var name is undefined. Either pass a variable to the constructor, or call fromJson");if(!this.newName)throw Error("The new var name is undefined. Either pass a value to the constructor, or call fromJson"); +a.oldName=this.oldName;a.newName=this.newName;return a}static fromJson(a,b,c){b=super.fromJson(a,b,null!=c?c:new VarRename$$module$build$src$core$events$events_var_rename);b.oldName=a.oldName;b.newName=a.newName;return b}run(a){const b=this.getEventWorkspace_();if(!this.varId)throw Error("The var ID is undefined. Either pass a variable to the constructor, or call fromJson");if(!this.oldName)throw Error("The old var name is undefined. Either pass a variable to the constructor, or call fromJson");if(!this.newName)throw Error("The new var name is undefined. Either pass a value to the constructor, or call fromJson"); +a?b.renameVariableById(this.varId,this.newName):b.renameVariableById(this.varId,this.oldName)}};register$$module$build$src$core$registry(Type$$module$build$src$core$registry.EVENT,VAR_RENAME$$module$build$src$core$events$utils,VarRename$$module$build$src$core$events$events_var_rename);var module$build$src$core$events$events_var_rename={};module$build$src$core$events$events_var_rename.VarRename=VarRename$$module$build$src$core$events$events_var_rename;var VariableMap$$module$build$src$core$variable_map=class{constructor(a){this.workspace=a;this.variableMap=new Map}clear(){for(const a of this.variableMap.values())for(;0{e&&b&&this.deleteVariableInternal(b,d)})):this.deleteVariableInternal(b,d)}else console.warn("Can't delete non-existent variable: "+a)}deleteVariableInternal(a, +b){const c=$.getGroup$$module$build$src$core$events$utils();c||$.setGroup$$module$build$src$core$events$utils(!0);try{for(let d=0;da.name)}getVariableUsesById(a){const b=[],c=this.workspace.getAllBlocks(!1); +for(let d=0;dthis.remainingCapacityOfType(c))return!1;b+=a[c]}return b>this.remainingCapacity()?!1:!0}hasBlockLimits(){return Infinity!==this.options.maxBlocks||!!this.options.maxInstances}getUndoStack(){return this.undoStack_}getRedoStack(){return this.redoStack_}undo(a){var b= +a?this.redoStack_:this.undoStack_,c=a?this.undoStack_:this.redoStack_;const d=b.pop();if(d){for(var e=[d];b.length&&d.group&&d.group===b[b.length-1].group;){const f=b.pop();f&&e.push(f)}for(b=0;bthis.MAX_UNDO&&0<=this.MAX_UNDO;)this.undoStack_.shift();for(let b=0;bMath.abs(b-this.oldTop)&&1>Math.abs(c-this.oldLeft))){var d=new (get$$module$build$src$core$events$utils(VIEWPORT_CHANGE$$module$build$src$core$events$utils))(b,c,a,this.id,this.oldScale);this.oldScale=a;this.oldTop=b;this.oldLeft=c;fire$$module$build$src$core$events$utils(d)}}}translate(a,b){const c="translate("+a+","+b+") scale("+this.scale+")";this.svgBlockCanvas_.setAttribute("transform",c);this.svgBubbleCanvas_.setAttribute("transform", +c);this.grid&&this.grid.moveTo(a,b);this.maybeFireViewportChangeEvent()}getWidth(){const a=this.getMetrics();return a?a.viewWidth/this.scale:0}setVisible(a){this.isVisible_=a;this.svgGroup_&&(this.scrollbar&&this.scrollbar.setContainerVisible(a),this.getFlyout()&&this.getFlyout().setContainerVisible(a),this.getParentSvg().style.display=a?"block":"none",this.toolbox_&&this.toolbox_.setVisible(a),a||this.hideChaff(!0))}render(){var a=this.getAllBlocks(!1);for(var b=a.length-1;0<=b;b--)a[b].queueRender(); +if(this.currentGesture_)for(a=this.currentGesture_.getInsertionMarkers(),b=0;bvoid this.markerManager.updateMarkers())}highlightBlock(a,b){if(void 0===b){for(let c=0,d;d=this.highlightedBlocks[c];c++)d.setHighlighted(!1);this.highlightedBlocks.length=0}if(a=a?this.getBlockById(a):null)(b=void 0===b||b)?-1===this.highlightedBlocks.indexOf(a)&&this.highlightedBlocks.push(a):removeElem$$module$build$src$core$utils$array(this.highlightedBlocks, +a),a.setHighlighted(b)}paste(a){warn$$module$build$src$core$utils$deprecation("Blockly.WorkspaceSvg.prototype.paste","v10","v11","Blockly.clipboard.paste");if(!this.rendered||!a.type&&!a.tagName)return null;this.currentGesture_&&this.currentGesture_.cancel();const b=$.getGroup$$module$build$src$core$events$utils();b||$.setGroup$$module$build$src$core$events$utils(!0);let c;try{c=a.type?this.pasteBlock_(null,a):"comment"===a.tagName.toLowerCase()?this.pasteWorkspaceComment_(a):this.pasteBlock_(a,null)}finally{$.setGroup$$module$build$src$core$events$utils(b)}return c}pasteBlock_(a, +b){$.disable$$module$build$src$core$events$utils();let c;try{let d=0,e=0;if(a){c=domToBlockInternal$$module$build$src$core$xml(a,this);let f;d=parseInt(null!=(f=a.getAttribute("x"))?f:"0");this.RTL&&(d=-d);let g;e=parseInt(null!=(g=a.getAttribute("y"))?g:"0")}else b&&(c=append$$module$build$src$core$serialization$blocks(b,this),d=b.x||10,this.RTL&&(d=this.getWidth()-d),e=b.y||10);if(!isNaN(d)&&!isNaN(e)){let f;do{f=!1;const g=this.getAllBlocks(!1);for(let h=0,k;k=g[h];h++){const l=k.getRelativeToSurfaceXY(); +if(1>=Math.abs(d-l.x)&&1>=Math.abs(e-l.y)){f=!0;break}}if(!f){const h=c.getConnections_(!1);for(let k=0,l;l=h[k];k++)if(l.closest($.config$$module$build$src$core$config.snapRadius,new Coordinate$$module$build$src$core$utils$coordinate(d,e)).connection){f=!0;break}}f&&(d=this.RTL?d-$.config$$module$build$src$core$config.snapRadius:d+$.config$$module$build$src$core$config.snapRadius,e+=2*$.config$$module$build$src$core$config.snapRadius)}while(f);c.moveTo(new Coordinate$$module$build$src$core$utils$coordinate(d, +e))}}finally{$.enable$$module$build$src$core$events$utils()}isEnabled$$module$build$src$core$events$utils()&&!c.isShadow()&&fire$$module$build$src$core$events$utils(new (get$$module$build$src$core$events$utils($.CREATE$$module$build$src$core$events$utils))(c));c.select();return c}pasteWorkspaceComment_(a){$.disable$$module$build$src$core$events$utils();let b;try{b=WorkspaceCommentSvg$$module$build$src$core$workspace_comment_svg.fromXmlRendered(a,this);let c,d=parseInt(null!=(c=a.getAttribute("x"))? +c:"0"),e,f=parseInt(null!=(e=a.getAttribute("y"))?e:"0");isNaN(d)||isNaN(f)||(this.RTL&&(d=-d),b.moveBy(d+50,f+50))}finally{$.enable$$module$build$src$core$events$utils()}isEnabled$$module$build$src$core$events$utils()&&WorkspaceComment$$module$build$src$core$workspace_comment.fireCreateEvent(b);b.select();return b}refreshToolboxSelection(){const a=this.isFlyout?this.targetWorkspace:this;a&&!a.currentGesture_&&a.toolbox_&&a.toolbox_.getFlyout()&&a.toolbox_.refreshSelection()}renameVariableById(a, +b){super.renameVariableById(a,b);this.refreshToolboxSelection()}deleteVariableById(a){super.deleteVariableById(a);this.refreshToolboxSelection()}createVariable(a,b,c){a=super.createVariable(a,b,c);this.refreshToolboxSelection();return a}recordDragTargets(){const a=this.componentManager.getComponents(ComponentManager$$module$build$src$core$component_manager.Capability.DRAG_TARGET,!0);this.dragTargetAreas=[];for(let b=0,c;c=a[b];b++){const d=c.getClientRect();d&&this.dragTargetAreas.push({component:c, +clientRect:d})}}newBlock(a,b){throw Error("The implementation of newBlock should be monkey-patched in by blockly.ts");}getDragTarget(a){for(let b=0,c;c=this.dragTargetAreas[b];b++)if(c.clientRect.contains(a.clientX,a.clientY))return c.component;return null}onMouseDown_(a){const b=this.getGesture(a);b&&b.handleWsStart(a,this)}startDrag(a,b){a=mouseToSvg$$module$build$src$core$browser_events(a,this.getParentSvg(),this.getInverseScreenCTM());a.x/=this.scale;a.y/=this.scale;this.dragDeltaXY=Coordinate$$module$build$src$core$utils$coordinate.difference(b, +a)}moveDrag(a){a=mouseToSvg$$module$build$src$core$browser_events(a,this.getParentSvg(),this.getInverseScreenCTM());a.x/=this.scale;a.y/=this.scale;return Coordinate$$module$build$src$core$utils$coordinate.sum(this.dragDeltaXY,a)}isDragging(){return null!==this.currentGesture_&&this.currentGesture_.isDragging()}isDraggable(){return this.options.moveOptions&&this.options.moveOptions.drag}isMovable(){return this.options.moveOptions&&!!this.options.moveOptions.scrollbars||this.options.moveOptions&&this.options.moveOptions.wheel|| +this.options.moveOptions&&this.options.moveOptions.drag||this.options.zoomOptions&&this.options.zoomOptions.wheel||this.options.zoomOptions&&this.options.zoomOptions.pinch}isMovableHorizontally(){const a=!!this.scrollbar;return this.isMovable()&&(!a||a&&this.scrollbar.canScrollHorizontally())}isMovableVertically(){const a=!!this.scrollbar;return this.isMovable()&&(!a||a&&this.scrollbar.canScrollVertically())}onMouseWheel_(a){if(Gesture$$module$build$src$core$gesture.inProgress())a.preventDefault(), +a.stopPropagation();else{var b=this.options.zoomOptions&&this.options.zoomOptions.wheel,c=this.options.moveOptions&&this.options.moveOptions.wheel;if(b||c){var d=getScrollDeltaPixels$$module$build$src$core$browser_events(a);if(MAC$$module$build$src$core$utils$useragent)var e=a.metaKey;b&&(a.ctrlKey||e||!c)?(d=-d.y/50,b=mouseToSvg$$module$build$src$core$browser_events(a,this.getParentSvg(),this.getInverseScreenCTM()),this.zoom(b.x,b.y,d)):(b=this.scrollX-d.x,c=this.scrollY-d.y,a.shiftKey&&!d.x&&(b= +this.scrollX-d.y,c=this.scrollY),this.scroll(b,c));a.preventDefault()}}}getBlocksBoundingBox(){const a=this.getTopBoundedElements();if(!a.length)return new Rect$$module$build$src$core$utils$rect(0,0,0,0);const b=a[0].getBoundingRectangle();for(let d=1;db.bottom&&(b.bottom=c.bottom),c.leftb.right&&(b.right=c.right))}return b}cleanUp(){this.setResizesEnabled(!1); +$.setGroup$$module$build$src$core$events$utils(!0);const a=this.getTopBlocks(!0);let b=0;for(let c=0,d;d=a[c];c++){if(!d.isMovable())continue;const e=d.getRelativeToSurfaceXY();d.moveBy(-e.x,b-e.y,["cleanup"]);d.snapToGrid();b=d.getRelativeToSurfaceXY().y+d.getHeightWidth().height+this.renderer.getConstants().MIN_BLOCK_HEIGHT}$.setGroup$$module$build$src$core$events$utils(!1);this.setResizesEnabled(!0)}showContextMenu(a){if(!this.options.readOnly&&!this.isFlyout){var b=ContextMenuRegistry$$module$build$src$core$contextmenu_registry.registry.getContextMenuOptions(ContextMenuRegistry$$module$build$src$core$contextmenu_registry.ScopeType.WORKSPACE, +{workspace:this});this.configureContextMenu&&this.configureContextMenu(b,a);show$$module$build$src$core$contextmenu(a,b,this.RTL)}}updateToolbox(a){if(a=convertToolboxDefToJson$$module$build$src$core$utils$toolbox(a)){if(!this.options.languageTree)throw Error("Existing toolbox is null. Can't create new toolbox.");if(hasCategories$$module$build$src$core$utils$toolbox(a)){if(!this.toolbox_)throw Error("Existing toolbox has no categories. Can't change mode.");this.options.languageTree=a;this.toolbox_.render(a)}else{if(!this.flyout)throw Error("Existing toolbox has categories. Can't change mode."); +this.options.languageTree=a;this.flyout.show(a)}}else if(this.options.languageTree)throw Error("Can't nullify an existing toolbox.");}markFocused(){this.options.parentWorkspace?this.options.parentWorkspace.markFocused():(setMainWorkspace$$module$build$src$core$common(this),this.getParentSvg().focus({preventScroll:!0}))}zoom(a,b,c){c=Math.pow(this.options.zoomOptions.scaleSpeed,c);const d=this.scale*c;if(this.scale!==d){d>this.options.zoomOptions.maxScale?c=this.options.zoomOptions.maxScale/this.scale: +dthis.options.zoomOptions.maxScale?a=this.options.zoomOptions.maxScale:this.options.zoomOptions.minScale&&ab.autoHide(a))}static setTopLevelWorkspaceMetrics_(a){const b=this.getMetrics();"number"===typeof a.x&&(this.scrollX=-(b.scrollLeft+(b.scrollWidth-b.viewWidth)*a.x));"number"===typeof a.y&&(this.scrollY=-(b.scrollTop+(b.scrollHeight-b.viewHeight)*a.y));this.translate(this.scrollX+b.absoluteLeft,this.scrollY+b.absoluteTop)}},module$build$src$core$workspace_svg={};module$build$src$core$workspace_svg.WorkspaceSvg=WorkspaceSvg$$module$build$src$core$workspace_svg; +module$build$src$core$workspace_svg.resizeSvgContents=resizeSvgContents$$module$build$src$core$workspace_svg;var TrashcanOpen$$module$build$src$core$events$events_trashcan_open=class extends UiBase$$module$build$src$core$events$events_ui_base{constructor(a,b){super(b);this.type=TRASHCAN_OPEN$$module$build$src$core$events$utils;this.isOpen=a}toJson(){const a=super.toJson();if(void 0===this.isOpen)throw Error("Whether this is already open or not is undefined. Either pass a value to the constructor, or call fromJson");a.isOpen=this.isOpen;return a}static fromJson(a,b,c){b=super.fromJson(a,b,null!=c?c:new TrashcanOpen$$module$build$src$core$events$events_trashcan_open); +b.isOpen=a.isOpen;return b}};register$$module$build$src$core$registry(Type$$module$build$src$core$registry.EVENT,TRASHCAN_OPEN$$module$build$src$core$events$utils,TrashcanOpen$$module$build$src$core$events$events_trashcan_open);var module$build$src$core$events$events_trashcan_open={};module$build$src$core$events$events_trashcan_open.TrashcanOpen=TrashcanOpen$$module$build$src$core$events$events_trashcan_open;var BlockDelete$$module$build$src$core$events$events_block_delete=class extends BlockBase$$module$build$src$core$events$events_block_base{constructor(a){super(a);this.type=$.DELETE$$module$build$src$core$events$utils;if(a){if(a.getParent())throw Error("Connected blocks cannot be deleted.");a.isShadow()&&(this.recordUndo=!1);this.oldXml=blockToDomWithXY$$module$build$src$core$xml(a);this.ids=getDescendantIds$$module$build$src$core$events$utils(a);this.wasShadow=a.isShadow();this.oldJson=save$$module$build$src$core$serialization$blocks(a, +{addCoordinates:!0})}}toJson(){const a=super.toJson();if(!this.oldXml)throw Error("The old block XML is undefined. Either pass a block to the constructor, or call fromJson");if(!this.ids)throw Error("The block IDs are undefined. Either pass a block to the constructor, or call fromJson");if(void 0===this.wasShadow)throw Error("Whether the block was a shadow is undefined. Either pass a block to the constructor, or call fromJson");if(!this.oldJson)throw Error("The old block JSON is undefined. Either pass a block to the constructor, or call fromJson"); +a.oldXml=domToText$$module$build$src$core$xml(this.oldXml);a.ids=this.ids;a.wasShadow=this.wasShadow;a.oldJson=this.oldJson;this.recordUndo||(a.recordUndo=this.recordUndo);return a}static fromJson(a,b,c){b=super.fromJson(a,b,null!=c?c:new BlockDelete$$module$build$src$core$events$events_block_delete);b.oldXml=$.textToDom$$module$build$src$core$utils$xml(a.oldXml);b.ids=a.ids;b.wasShadow=a.wasShadow||"shadow"===b.oldXml.tagName.toLowerCase();b.oldJson=a.oldJson;void 0!==a.recordUndo&&(b.recordUndo= +a.recordUndo);return b}run(a){const b=this.getEventWorkspace_();if(!this.ids)throw Error("The block IDs are undefined. Either pass a block to the constructor, or call fromJson");if(!this.oldJson)throw Error("The old block JSON is undefined. Either pass a block to the constructor, or call fromJson");if(a)for(a=0;aa.disposeInternal()), +this.inputList.forEach(a=>a.dispose()),this.inputList.length=0,this.getConnections_(!0).forEach(a=>a.dispose()),this.disposed=!0)}isDeadOrDying(){return this.disposing||this.disposed}initModel(){for(const a of this.inputList)for(const b of a.fieldRow)b.initModel&&b.initModel()}unplug(a){this.outputConnection&&this.unplugFromRow_(a);this.previousConnection&&this.unplugFromStack_(a)}unplugFromRow_(a){let b=null,c;if(null==(c=this.outputConnection)?0:c.isConnected())b=this.outputConnection.targetConnection, +this.outputConnection.disconnect();b&&a&&(a=this.getOnlyValueConnection_())&&a.isConnected()&&!a.targetBlock().isShadow()&&(a=a.targetConnection,null==a||a.disconnect(),this.workspace.connectionChecker.canConnect(a,b,!1)?b.connect(a):null==a||a.onFailedConnect(b))}getOnlyValueConnection_(){let a=null;for(let b=0;b{d=d+("("===c||")"===e?"":" ")+e;c=e[e.length-1];return d},"");b=b.trim()||"???";a&&b.length>a&&(b=b.substring(0,a-3)+"...");return b}toTokens(a="?"){const b=[];for(const d of this.inputList)if(d.name!=COLLAPSED_INPUT_NAME$$module$build$src$core$constants){for(const e of d.fieldRow)b.push(e.getText());if(d.connection){const e=d.connection.targetBlock();if(e){var c=d.connection;let f=c.getCheck();!f&&c.targetConnection&&(f=c.targetConnection.getCheck()); +(c=!!f&&(-1!==f.indexOf("Boolean")||-1!==f.indexOf("Number")))&&b.push("(");b.push(...e.toTokens(a));c&&b.push(")")}else b.push(a)}}return b}appendValueInput(a){return this.appendInput(new $.ValueInput$$module$build$src$core$inputs$value_input(a,this))}appendStatementInput(a){this.statementInputCount++;return this.appendInput(new StatementInput$$module$build$src$core$inputs$statement_input(a,this))}appendDummyInput(a=""){return this.appendInput(new DummyInput$$module$build$src$core$inputs$dummy_input(a, +this))}appendEndRowInput(a=""){return this.appendInput(new EndRowInput$$module$build$src$core$inputs$end_row_input(a,this))}appendInput(a){this.inputList.push(a);return a}appendInputFromRegistry(a,b){return(a=getClass$$module$build$src$core$registry(Type$$module$build$src$core$registry.INPUT,a,!1))?this.appendInput(new a(b,this)):null}jsonInit(a){var b=a.type?'Block "'+a.type+'": ':"";if(a.output&&a.previousStatement)throw Error(b+"Must not have both an output and a previousStatement.");a.style&& +a.style.hat&&(this.hat=a.style.hat,a.style=null);if(a.style&&a.colour)throw Error(b+"Must not have both a colour and a style.");a.style?this.jsonInitStyle_(a,b):this.jsonInitColour_(a,b);for(var c=0;void 0!==a["message"+c];)this.interpolate_(a["message"+c],a["args"+c]||[],a["implicitAlign"+c]||a["lastDummyAlign"+c],b),c++;void 0!==a.inputsInline&&($.disable$$module$build$src$core$events$utils(),this.setInputsInline(a.inputsInline),$.enable$$module$build$src$core$events$utils());void 0!==a.output&& +this.setOutput(!0,a.output);void 0!==a.outputShape&&this.setOutputShape(a.outputShape);void 0!==a.previousStatement&&this.setPreviousStatement(!0,a.previousStatement);void 0!==a.nextStatement&&this.setNextStatement(!0,a.nextStatement);void 0!==a.tooltip&&(c=replaceMessageReferences$$module$build$src$core$utils$parsing(a.tooltip),this.setTooltip(c));void 0!==a.enableContextMenu&&(this.contextMenu=!!a.enableContextMenu);void 0!==a.suppressPrefixSuffix&&(this.suppressPrefixSuffix=!!a.suppressPrefixSuffix); +void 0!==a.helpUrl&&(c=replaceMessageReferences$$module$build$src$core$utils$parsing(a.helpUrl),this.setHelpUrl(c));"string"===typeof a.extensions&&(console.warn(b+"JSON attribute 'extensions' should be an array of strings. Found raw string in JSON for '"+a.type+"' block."),a.extensions=[a.extensions]);void 0!==a.mutator&&apply$$module$build$src$core$extensions(a.mutator,this,!0);a=a.extensions;if(Array.isArray(a))for(b=0;b +f||f>b)throw Error('Block "'+this.type+'": Message index %'+f+" out of range.");if(c[f])throw Error('Block "'+this.type+'": Message index %'+f+" duplicated.");c[f]=!0;d++}}if(d!==b)throw Error('Block "'+this.type+'": Message does not reference all '+b+" arg(s).");}interpolateArguments_(a,b,c){const d=[];for(let f=0;f=this.inputList.length)throw RangeError("Input index "+a+" out of bounds.");if(b>this.inputList.length)throw RangeError("Reference input "+b+" out of bounds.");const c=this.inputList[a];this.inputList.splice(a,1);ab.getWeight()-c.getWeight());return a}removeIcon(a){if(!this.hasIcon(a))return!1;let b;null==(b=this.getIcon(a))||b.dispose();this.icons=this.icons.filter(c=>!c.getType().equals(a));return!0}hasIcon(a){return this.icons.some(b=> +b.getType().equals(a))}getIcon(a){return a instanceof IconType$$module$build$src$core$icons$icon_types?this.icons.find(b=>b.getType().equals(a)):this.icons.find(b=>b.getType().toString()===a)}getIcons(){return[...this.icons]}getRelativeToSurfaceXY(){return this.xy_}moveBy(a,b,c){if(this.parentBlock_)throw Error("Block has parent");const d=new (get$$module$build$src$core$events$utils($.MOVE$$module$build$src$core$events$utils))(this);c&&d.setReason(c);this.xy_.translate(a,b);d.recordNew();fire$$module$build$src$core$events$utils(d)}makeConnection_(a){return new Connection$$module$build$src$core$connection(this, +a)}allInputsFilled(a){void 0===a&&(a=!0);if(!a&&this.isShadow())return!1;for(let c=0,d;d=this.inputList[c];c++)if(d.connection){var b=d.connection.targetBlock();if(!b||!b.allInputsFilled(a))return!1}return(b=this.getNextBlock())?b.allInputsFilled(a):!0}toDevString(){let a=this.type?'"'+this.type+'" block':"Block";this.id&&(a+=' (id="'+this.id+'")');return a}};Block$$module$build$src$core$block.COLLAPSED_INPUT_NAME=COLLAPSED_INPUT_NAME$$module$build$src$core$constants; +Block$$module$build$src$core$block.COLLAPSED_FIELD_NAME=COLLAPSED_FIELD_NAME$$module$build$src$core$constants;var module$build$src$core$block={};module$build$src$core$block.Block=Block$$module$build$src$core$block;var Marker$$module$build$src$core$keyboard_nav$marker=class{constructor(){this.drawer=this.curNode=this.colour=null;this.type="marker"}setDrawer(a){this.drawer=a}getDrawer(){return this.drawer}getCurNode(){return this.curNode}setCurNode(a){const b=this.curNode;this.curNode=a;this.drawer&&this.drawer.draw(b,this.curNode)}draw(){this.drawer&&this.drawer.draw(this.curNode,this.curNode)}hide(){this.drawer&&this.drawer.hide()}dispose(){this.getDrawer()&&this.getDrawer().dispose()}},module$build$src$core$keyboard_nav$marker= +{};module$build$src$core$keyboard_nav$marker.Marker=Marker$$module$build$src$core$keyboard_nav$marker;var Cursor$$module$build$src$core$keyboard_nav$cursor=class extends Marker$$module$build$src$core$keyboard_nav$marker{constructor(){super();this.type="cursor"}next(){var a=this.getCurNode();if(!a)return null;for(a=a.next();a&&a.next()&&(a.getType()===ASTNode$$module$build$src$core$keyboard_nav$ast_node.types.NEXT||a.getType()===ASTNode$$module$build$src$core$keyboard_nav$ast_node.types.BLOCK);)a=a.next();a&&this.setCurNode(a);return a}in(){var a=this.getCurNode();if(!a)return null;if(a.getType()=== +ASTNode$$module$build$src$core$keyboard_nav$ast_node.types.PREVIOUS||a.getType()===ASTNode$$module$build$src$core$keyboard_nav$ast_node.types.OUTPUT)a=a.next();let b,c;(a=null!=(c=null==(b=a)?void 0:b.in())?c:null)&&this.setCurNode(a);return a}prev(){var a=this.getCurNode();if(!a)return null;for(a=a.prev();a&&a.prev()&&(a.getType()===ASTNode$$module$build$src$core$keyboard_nav$ast_node.types.NEXT||a.getType()===ASTNode$$module$build$src$core$keyboard_nav$ast_node.types.BLOCK);)a=a.prev();a&&this.setCurNode(a); +return a}out(){var a=this.getCurNode();if(!a)return null;(a=a.out())&&a.getType()===ASTNode$$module$build$src$core$keyboard_nav$ast_node.types.BLOCK&&(a=a.prev()||a);a&&this.setCurNode(a);return a}};register$$module$build$src$core$registry(Type$$module$build$src$core$registry.CURSOR,DEFAULT$$module$build$src$core$registry,Cursor$$module$build$src$core$keyboard_nav$cursor);var module$build$src$core$keyboard_nav$cursor={};module$build$src$core$keyboard_nav$cursor.Cursor=Cursor$$module$build$src$core$keyboard_nav$cursor;var BasicCursor$$module$build$src$core$keyboard_nav$basic_cursor=class extends Cursor$$module$build$src$core$keyboard_nav$cursor{constructor(){super()}next(){var a=this.getCurNode();if(!a)return null;(a=this.getNextNode_(a,this.validNode_))&&this.setCurNode(a);return a}in(){return this.next()}prev(){var a=this.getCurNode();if(!a)return null;(a=this.getPreviousNode_(a,this.validNode_))&&this.setCurNode(a);return a}out(){return this.prev()}getNextNode_(a,b){if(!a)return null;const c=a.in()||a.next(); +if(b(c))return c;if(c)return this.getNextNode_(c,b);a=this.findSiblingOrParent(a.out());return b(a)?a:a?this.getNextNode_(a,b):null}getPreviousNode_(a,b){if(!a)return null;let c=a.prev();c=c?this.getRightMostChild(c):a.out();return b(c)?c:c?this.getPreviousNode_(c,b):null}validNode_(a){let b=!1;a=a&&a.getType();if(a===ASTNode$$module$build$src$core$keyboard_nav$ast_node.types.OUTPUT||a===ASTNode$$module$build$src$core$keyboard_nav$ast_node.types.INPUT||a===ASTNode$$module$build$src$core$keyboard_nav$ast_node.types.FIELD|| +a===ASTNode$$module$build$src$core$keyboard_nav$ast_node.types.NEXT||a===ASTNode$$module$build$src$core$keyboard_nav$ast_node.types.PREVIOUS||a===ASTNode$$module$build$src$core$keyboard_nav$ast_node.types.WORKSPACE)b=!0;return b}findSiblingOrParent(a){if(!a)return null;const b=a.next();return b?b:this.findSiblingOrParent(a.out())}getRightMostChild(a){if(!a.in())return a;for(a=a.in();a&&a.next();)a=a.next();return this.getRightMostChild(a)}}; +BasicCursor$$module$build$src$core$keyboard_nav$basic_cursor.registrationName="basicCursor";register$$module$build$src$core$registry(Type$$module$build$src$core$registry.CURSOR,BasicCursor$$module$build$src$core$keyboard_nav$basic_cursor.registrationName,BasicCursor$$module$build$src$core$keyboard_nav$basic_cursor);var module$build$src$core$keyboard_nav$basic_cursor={};module$build$src$core$keyboard_nav$basic_cursor.BasicCursor=BasicCursor$$module$build$src$core$keyboard_nav$basic_cursor;var TabNavigateCursor$$module$build$src$core$keyboard_nav$tab_navigate_cursor=class extends BasicCursor$$module$build$src$core$keyboard_nav$basic_cursor{validNode_(a){let b=!1;const c=a&&a.getType();a&&(a=a.getLocation(),c===ASTNode$$module$build$src$core$keyboard_nav$ast_node.types.FIELD&&a&&a.isTabNavigable()&&a.isClickable()&&(b=!0));return b}},module$build$src$core$keyboard_nav$tab_navigate_cursor={};module$build$src$core$keyboard_nav$tab_navigate_cursor.TabNavigateCursor=TabNavigateCursor$$module$build$src$core$keyboard_nav$tab_navigate_cursor;var BUMP_RANDOMNESS$$module$build$src$core$rendered_connection=10,RenderedConnection$$module$build$src$core$rendered_connection=class extends Connection$$module$build$src$core$connection{constructor(a,b){super(a,b);this.targetConnection=this.highlightPath=null;this.db=a.workspace.connectionDBList[b];this.dbOpposite=a.workspace.connectionDBList[OPPOSITE_TYPE$$module$build$src$core$internal_constants[b]];this.offsetInBlock=new Coordinate$$module$build$src$core$utils$coordinate(0,0);this.trackedState= +RenderedConnection$$module$build$src$core$rendered_connection.TrackedState.WILL_TRACK}dispose(){super.dispose();this.trackedState===RenderedConnection$$module$build$src$core$rendered_connection.TrackedState.TRACKED&&this.db.removeConnection(this,this.y);this.highlightPath&&(removeNode$$module$build$src$core$utils$dom(this.highlightPath),this.highlightPath=null)}getSourceBlock(){return super.getSourceBlock()}targetBlock(){return super.targetBlock()}distanceFrom(a){const b=this.x-a.x;a=this.y-a.y;return Math.sqrt(b* +b+a*a)}bumpAwayFrom(a){if(!this.sourceBlock_.workspace.isDragging()){var b=this.sourceBlock_.getRootBlock();if(!b.isInFlyout){var c=!1;if(!b.isMovable()){b=a.getSourceBlock().getRootBlock();if(!b.isMovable())return;a=this;c=!0}var d=getSelected$$module$build$src$core$common()==b;d||b.addSelect();var e=a.x+$.config$$module$build$src$core$config.snapRadius+Math.floor(Math.random()*BUMP_RANDOMNESS$$module$build$src$core$rendered_connection)-this.x,f=a.y+$.config$$module$build$src$core$config.snapRadius+ +Math.floor(Math.random()*BUMP_RANDOMNESS$$module$build$src$core$rendered_connection)-this.y;c&&(f=-f);b.RTL&&(e=a.x-$.config$$module$build$src$core$config.snapRadius-Math.floor(Math.random()*BUMP_RANDOMNESS$$module$build$src$core$rendered_connection)-this.x);b.moveBy(e,f,["bump"]);d||b.removeSelect()}}}moveTo(a,b){let c=!1;this.trackedState===RenderedConnection$$module$build$src$core$rendered_connection.TrackedState.WILL_TRACK?(this.db.addConnection(this,b),this.trackedState=RenderedConnection$$module$build$src$core$rendered_connection.TrackedState.TRACKED, +c=!0):this.trackedState===RenderedConnection$$module$build$src$core$rendered_connection.TrackedState.TRACKED&&(this.db.removeConnection(this,this.y),this.db.addConnection(this,b),c=!0);this.x=a;this.y=b;return c}moveBy(a,b){return this.moveTo(this.x+a,this.y+b)}moveToOffset(a){return this.moveTo(a.x+this.offsetInBlock.x,a.y+this.offsetInBlock.y)}setOffsetInBlock(a,b){this.offsetInBlock.x=a;this.offsetInBlock.y=b}getOffsetInBlock(){return this.offsetInBlock}tighten(){const a=this.targetConnection.x- +this.x,b=this.targetConnection.y-this.y;if(0!==a||0!==b){const d=this.targetBlock();var c=d.getSvgRoot();if(!c)throw Error("block is not rendered.");c=getRelativeXY$$module$build$src$core$utils$svg_math(c);d.translate(c.x-a,c.y-b);d.moveConnections(-a,-b)}}tightenEfficiently(){var a=this.targetConnection;const b=this.targetBlock();a&&b&&(a=Coordinate$$module$build$src$core$utils$coordinate.difference(this.offsetInBlock,a.offsetInBlock),b.translate(a.x,a.y))}closest(a,b){return this.dbOpposite.searchForClosest(this, +a,b)}highlight(){if(!this.highlightPath){var a=this.sourceBlock_.workspace.getRenderer().getConstants();var b=a.shapeFor(this);this.type===ConnectionType$$module$build$src$core$connection_type.INPUT_VALUE||this.type===ConnectionType$$module$build$src$core$connection_type.OUTPUT_VALUE?(a=a.TAB_OFFSET_FROM_TOP,b=moveBy$$module$build$src$core$utils$svg_paths(0,-a)+lineOnAxis$$module$build$src$core$utils$svg_paths("v",a)+b.pathDown+lineOnAxis$$module$build$src$core$utils$svg_paths("v",a)):(a=a.NOTCH_OFFSET_LEFT- +a.CORNER_RADIUS,b=moveBy$$module$build$src$core$utils$svg_paths(-a,0)+lineOnAxis$$module$build$src$core$utils$svg_paths("h",a)+b.pathLeft+lineOnAxis$$module$build$src$core$utils$svg_paths("h",a));a=this.offsetInBlock;this.highlightPath=createSvgElement$$module$build$src$core$utils$dom(Svg$$module$build$src$core$utils$svg.PATH,{"class":"blocklyHighlightedConnectionPath",d:b,transform:`translate(${a.x}, ${a.y})`+(this.sourceBlock_.RTL?" scale(-1 1)":"")},this.sourceBlock_.getSvgRoot())}}unhighlight(){this.highlightPath&& +(removeNode$$module$build$src$core$utils$dom(this.highlightPath),this.highlightPath=null)}setTracking(a){a&&this.trackedState===RenderedConnection$$module$build$src$core$rendered_connection.TrackedState.TRACKED||!a&&this.trackedState===RenderedConnection$$module$build$src$core$rendered_connection.TrackedState.UNTRACKED||this.sourceBlock_.isInFlyout||(a?(this.db.addConnection(this,this.y),this.trackedState=RenderedConnection$$module$build$src$core$rendered_connection.TrackedState.TRACKED):(this.trackedState=== +RenderedConnection$$module$build$src$core$rendered_connection.TrackedState.TRACKED&&this.db.removeConnection(this,this.y),this.trackedState=RenderedConnection$$module$build$src$core$rendered_connection.TrackedState.UNTRACKED))}stopTrackingAll(){this.setTracking(!1);if(this.targetConnection){const a=this.targetBlock().getDescendants(!1);for(let b=0;bclearTimeout(a)),this.warningTextDb.clear(),this.getIcons().forEach(a=>a.dispose()))}checkAndDelete(){this.workspace.isFlyout||($.setGroup$$module$build$src$core$events$utils(!0),this.workspace.hideChaff(),this.outputConnection?this.dispose(!1,!0):this.dispose(!0,!0),$.setGroup$$module$build$src$core$events$utils(!1))}toCopyData(){return this.isInsertionMarker_? +null:{paster:BlockPaster$$module$build$src$core$clipboard$block_paster.TYPE,blockState:save$$module$build$src$core$serialization$blocks(this,{addCoordinates:!0,addNextBlocks:!1}),typeCounts:getBlockTypeCounts$$module$build$src$core$common(this,!0)}}applyColour(){this.pathObject.applyColour(this);const a=this.getIcons();for(let b=0;b{this.isDeadOrDying()||(this.warningTextDb.delete(b),this.setWarningText(a,b))},100));else if(this.isInFlyout&&(a=null),c=this.getIcon(WarningIcon$$module$build$src$core$icons$warning_icon.TYPE),a){let d=this.getSurroundParent(),e=null;for(;d;)d.isCollapsed()&&(e=d),d=d.getSurroundParent();e&&e.setWarningText($.Msg$$module$build$src$core$msg.COLLAPSED_WARNINGS_WARNING, +BlockSvg$$module$build$src$core$block_svg.COLLAPSED_WARNING_ID);c?c.addMessage(a,b):this.addIcon((new WarningIcon$$module$build$src$core$icons$warning_icon(this)).addMessage(a,b))}else c&&(b?(c.addMessage("",b),c.getText()||this.removeIcon(WarningIcon$$module$build$src$core$icons$warning_icon.TYPE)):this.removeIcon(WarningIcon$$module$build$src$core$icons$warning_icon.TYPE))}setMutator(a){this.removeIcon($.MutatorIcon$$module$build$src$core$icons$mutator_icon.TYPE);a&&this.addIcon(a)}addIcon(a){super.addIcon(a); +a instanceof WarningIcon$$module$build$src$core$icons$warning_icon&&(this.warning=a);a instanceof $.MutatorIcon$$module$build$src$core$icons$mutator_icon&&(this.mutator=a);this.rendered&&(a.initView(this.createIconPointerDownListener(a)),a.applyColour(),a.updateEditable(),this.queueRender(),triggerQueuedRenders$$module$build$src$core$render_management(),this.bumpNeighbours());return a}createIconPointerDownListener(a){return b=>{this.isDeadOrDying()||(b=this.workspace.getGesture(b))&&b.setStartIcon(a)}}removeIcon(a){const b= +super.removeIcon(a);a.equals(WarningIcon$$module$build$src$core$icons$warning_icon.TYPE)&&(this.warning=null);a.equals($.MutatorIcon$$module$build$src$core$icons$mutator_icon.TYPE)&&(this.mutator=null);this.rendered&&(this.queueRender(),triggerQueuedRenders$$module$build$src$core$render_management(),this.bumpNeighbours());return b}setEnabled(a){this.isEnabled()!==a&&(super.setEnabled(a),this.rendered&&!this.getInheritedDisabled()&&this.updateDisabled())}setHighlighted(a){this.rendered&&this.pathObject.updateHighlighted(a)}addSelect(){this.pathObject.updateSelected(!0)}removeSelect(){this.pathObject.updateSelected(!1)}setDeleteStyle(a){this.pathObject.updateDraggingDelete(a)}getColour(){return this.style.colourPrimary}setColour(a){super.setColour(a); +a=this.workspace.getRenderer().getConstants().getBlockStyleForColour(this.colour_);this.pathObject.setStyle(a.style);this.style=a.style;this.styleName_=a.name;this.applyColour()}setStyle(a){const b=this.workspace.getRenderer().getConstants().getBlockStyle(a);this.styleName_=a;if(b)this.hat=b.hat,this.pathObject.setStyle(b),this.colour_=b.colourPrimary,this.style=b,this.applyColour();else throw Error("Invalid style name: "+a);}bringToFront(a=!1){let b=this;do{const c=b.getSvgRoot(),d=c.parentNode, +e=d.childNodes;e[e.length-1]!==c&&d.appendChild(c);if(a)break;b=b.getParent()}while(b)}setPreviousStatement(a,b){super.setPreviousStatement(a,b);this.rendered&&(this.queueRender(),this.bumpNeighbours())}setNextStatement(a,b){super.setNextStatement(a,b);this.rendered&&(this.queueRender(),this.bumpNeighbours())}setOutput(a,b){super.setOutput(a,b);this.rendered&&(this.queueRender(),this.bumpNeighbours())}setInputsInline(a){super.setInputsInline(a);this.rendered&&(this.queueRender(),this.bumpNeighbours())}removeInput(a, +b){a=super.removeInput(a,b);this.rendered&&(this.queueRender(),this.bumpNeighbours());return a}moveNumberedInputBefore(a,b){super.moveNumberedInputBefore(a,b);this.rendered&&(this.queueRender(),this.bumpNeighbours())}appendInput(a){super.appendInput(a);this.rendered&&(this.queueRender(),this.bumpNeighbours());return a}setConnectionTracking(a){this.previousConnection&&this.previousConnection.setTracking(a);this.outputConnection&&this.outputConnection.setTracking(a);if(this.nextConnection){this.nextConnection.setTracking(a); +var b=this.nextConnection.targetBlock();b&&b.setConnectionTracking(a)}if(!this.collapsed_)for(b=0;b{const b= +$.getGroup$$module$build$src$core$events$utils();$.setGroup$$module$build$src$core$events$utils(a);this.getRootBlock().bumpNeighboursInternal();$.setGroup$$module$build$src$core$events$utils(b);this.bumpNeighboursPid=0},$.config$$module$build$src$core$config.bumpDelay)}}bumpNeighboursInternal(){const a=this.getRootBlock();if(!(this.isDeadOrDying()||this.workspace.isDragging()||a.isInFlyout))for(const b of this.getConnections_(!1)){if(b.isSuperior()){let c;null==(c=b.targetBlock())||c.bumpNeighboursInternal()}for(const c of b.neighbours($.config$$module$build$src$core$config.snapRadius))c.getSourceBlock().getRootBlock()!== +a&&(b.isConnected()&&c.isConnected()||(b.isSuperior()?c.bumpAwayFrom(b):b.bumpAwayFrom(c)))}}scheduleSnapAndBump(){const a=$.getGroup$$module$build$src$core$events$utils();setTimeout(()=>{$.setGroup$$module$build$src$core$events$utils(a);this.snapToGrid();$.setGroup$$module$build$src$core$events$utils(!1)},$.config$$module$build$src$core$config.bumpDelay/2);this.bumpNeighbours()}positionNearConnection(a,b,c){if(a.type===ConnectionType$$module$build$src$core$connection_type.NEXT_STATEMENT||a.type=== +ConnectionType$$module$build$src$core$connection_type.INPUT_VALUE){let d=b.x;b=b.y;d+=c.x-a.getOffsetInBlock().x;b+=c.y-a.getOffsetInBlock().y;this.moveBy(d,b)}}getChildren(a){return super.getChildren(a)}queueRender(){return queueRender$$module$build$src$core$render_management(this)}render(){this.queueRender();triggerQueuedRenders$$module$build$src$core$render_management()}renderEfficiently(){this.rendered=!0;startTextWidthCache$$module$build$src$core$utils$dom();this.isCollapsed()&&this.updateCollapsed_(); +this.workspace.getRenderer().render(this);this.tightenChildrenEfficiently();stopTextWidthCache$$module$build$src$core$utils$dom();this.updateMarkers_()}tightenChildrenEfficiently(){for(const a of this.inputList){const b=a.connection;b&&b.tightenEfficiently()}this.nextConnection&&this.nextConnection.tightenEfficiently()}updateMarkers_(){this.workspace.keyboardAccessibilityMode&&this.pathObject.cursorSvg&&this.workspace.getCursor().draw();this.workspace.keyboardAccessibilityMode&&this.pathObject.markerSvg&& +this.workspace.getMarker(MarkerManager$$module$build$src$core$marker_manager.LOCAL_MARKER).draw();for(const a of this.inputList)for(const b of a.fieldRow)b.updateMarkers_()}updateConnectionAndIconLocations(){const a=this.getRelativeToSurfaceXY();this.previousConnection&&this.previousConnection.moveToOffset(a);this.outputConnection&&this.outputConnection.moveToOffset(a);for(let b=0;b=this.workspace.options.maxTrashcanContents||(a=new Options$$module$build$src$core$options({scrollbars:!0,parentWorkspace:this.workspace,rtl:this.workspace.RTL,oneBasedIndex:this.workspace.options.oneBasedIndex, +renderer:this.workspace.options.renderer,rendererOverrides:this.workspace.options.rendererOverrides,move:{scrollbars:!0}}),this.workspace.horizontalLayout?(a.toolboxPosition=this.workspace.toolboxPosition===Position$$module$build$src$core$utils$toolbox.TOP?Position$$module$build$src$core$utils$toolbox.BOTTOM:Position$$module$build$src$core$utils$toolbox.TOP,this.flyout=new (getClassFromOptions$$module$build$src$core$registry(Type$$module$build$src$core$registry.FLYOUTS_HORIZONTAL_TOOLBOX,this.workspace.options, +!0))(a)):(a.toolboxPosition=this.workspace.toolboxPosition===Position$$module$build$src$core$utils$toolbox.RIGHT?Position$$module$build$src$core$utils$toolbox.LEFT:Position$$module$build$src$core$utils$toolbox.RIGHT,this.flyout=new (getClassFromOptions$$module$build$src$core$registry(Type$$module$build$src$core$registry.FLYOUTS_VERTICAL_TOOLBOX,this.workspace.options,!0))(a)),this.workspace.addChangeListener(this.onDelete.bind(this)))}createDom(){this.svgGroup=createSvgElement$$module$build$src$core$utils$dom(Svg$$module$build$src$core$utils$svg.G, +{"class":"blocklyTrash"});let a;const b=String(Math.random()).substring(2);a=createSvgElement$$module$build$src$core$utils$dom(Svg$$module$build$src$core$utils$svg.CLIPPATH,{id:"blocklyTrashBodyClipPath"+b},this.svgGroup);createSvgElement$$module$build$src$core$utils$dom(Svg$$module$build$src$core$utils$svg.RECT,{width:WIDTH$$module$build$src$core$trashcan,height:BODY_HEIGHT$$module$build$src$core$trashcan,y:LID_HEIGHT$$module$build$src$core$trashcan},a);const c=createSvgElement$$module$build$src$core$utils$dom(Svg$$module$build$src$core$utils$svg.IMAGE, +{width:SPRITE$$module$build$src$core$sprites.width,x:-SPRITE_LEFT$$module$build$src$core$trashcan,height:SPRITE$$module$build$src$core$sprites.height,y:-SPRITE_TOP$$module$build$src$core$trashcan,"clip-path":"url(#blocklyTrashBodyClipPath"+b+")"},this.svgGroup);c.setAttributeNS(XLINK_NS$$module$build$src$core$utils$dom,"xlink:href",this.workspace.options.pathToMedia+SPRITE$$module$build$src$core$sprites.url);a=createSvgElement$$module$build$src$core$utils$dom(Svg$$module$build$src$core$utils$svg.CLIPPATH, +{id:"blocklyTrashLidClipPath"+b},this.svgGroup);createSvgElement$$module$build$src$core$utils$dom(Svg$$module$build$src$core$utils$svg.RECT,{width:WIDTH$$module$build$src$core$trashcan,height:LID_HEIGHT$$module$build$src$core$trashcan},a);this.svgLid=createSvgElement$$module$build$src$core$utils$dom(Svg$$module$build$src$core$utils$svg.IMAGE,{width:SPRITE$$module$build$src$core$sprites.width,x:-SPRITE_LEFT$$module$build$src$core$trashcan,height:SPRITE$$module$build$src$core$sprites.height,y:-SPRITE_TOP$$module$build$src$core$trashcan, +"clip-path":"url(#blocklyTrashLidClipPath"+b+")"},this.svgGroup);this.svgLid.setAttributeNS(XLINK_NS$$module$build$src$core$utils$dom,"xlink:href",this.workspace.options.pathToMedia+SPRITE$$module$build$src$core$sprites.url);bind$$module$build$src$core$browser_events(this.svgGroup,"pointerdown",this,this.blockMouseDownWhenOpenable);bind$$module$build$src$core$browser_events(this.svgGroup,"pointerup",this,this.click);bind$$module$build$src$core$browser_events(c,"pointerover",this,this.mouseOver);bind$$module$build$src$core$browser_events(c, +"pointerout",this,this.mouseOut);this.animateLid();return this.svgGroup}init(){0{let c;null==(c=this.flyout)||c.show(a);b.cursor="";let d;null==(d=this.workspace.scrollbar)||d.setVisible(!1)},10);this.fireUiEvent(!0)}}closeFlyout(){if(this.contentsIsOpen()){var a;null==(a=this.flyout)||a.hide();var b;null==(b=this.workspace.scrollbar)||b.setVisible(!0);this.fireUiEvent(!1);this.workspace.recordDragTargets()}}autoHide(a){!a&&this.flyout&&this.closeFlyout()}emptyContents(){this.hasContents()&& +(this.contents.length=0,this.setMinOpenness(0),this.closeFlyout())}position(a,b){if(this.initialized){var c=getCornerOppositeToolbox$$module$build$src$core$positionable_helpers(this.workspace,a);a=getStartPositionRect$$module$build$src$core$positionable_helpers(c,new Size$$module$build$src$core$utils$size(WIDTH$$module$build$src$core$trashcan,BODY_HEIGHT$$module$build$src$core$trashcan+LID_HEIGHT$$module$build$src$core$trashcan),MARGIN_HORIZONTAL$$module$build$src$core$trashcan,MARGIN_VERTICAL$$module$build$src$core$trashcan, +a,this.workspace);b=bumpPositionRect$$module$build$src$core$positionable_helpers(a,MARGIN_VERTICAL$$module$build$src$core$trashcan,c.vertical===verticalPosition$$module$build$src$core$positionable_helpers.TOP?bumpDirection$$module$build$src$core$positionable_helpers.DOWN:bumpDirection$$module$build$src$core$positionable_helpers.UP,b);this.top=b.top;this.left=b.left;var d;null==(d=this.svgGroup)||d.setAttribute("transform","translate("+this.left+","+this.top+")")}}getBoundingRectangle(){return new Rect$$module$build$src$core$utils$rect(this.top, +this.top+BODY_HEIGHT$$module$build$src$core$trashcan+LID_HEIGHT$$module$build$src$core$trashcan,this.left,this.left+WIDTH$$module$build$src$core$trashcan)}getClientRect(){if(!this.svgGroup)return null;var a=this.svgGroup.getBoundingClientRect();const b=a.top+SPRITE_TOP$$module$build$src$core$trashcan-MARGIN_HOTSPOT$$module$build$src$core$trashcan;a=a.left+SPRITE_LEFT$$module$build$src$core$trashcan-MARGIN_HOTSPOT$$module$build$src$core$trashcan;return new Rect$$module$build$src$core$utils$rect(b, +b+LID_HEIGHT$$module$build$src$core$trashcan+BODY_HEIGHT$$module$build$src$core$trashcan+2*MARGIN_HOTSPOT$$module$build$src$core$trashcan,a,a+WIDTH$$module$build$src$core$trashcan+2*MARGIN_HOTSPOT$$module$build$src$core$trashcan)}onDragOver(a){this.setLidOpen(this.wouldDelete_)}onDragExit(a){this.setLidOpen(!1)}onDrop(a){setTimeout(this.setLidOpen.bind(this,!1),100)}setLidOpen(a){this.isLidOpen!==a&&(this.lidTask&&clearTimeout(this.lidTask),this.isLidOpen=a,this.animateLid())}animateLid(){const a= +ANIMATION_FRAMES$$module$build$src$core$trashcan;var b=1/(a+1);this.lidOpen+=this.isLidOpen?b:-b;this.lidOpen=Math.min(Math.max(this.lidOpen,this.minOpenness),1);this.setLidAngle(this.lidOpen*MAX_LID_ANGLE$$module$build$src$core$trashcan);b=OPACITY_MIN$$module$build$src$core$trashcan+this.lidOpen*(OPACITY_MAX$$module$build$src$core$trashcan-OPACITY_MIN$$module$build$src$core$trashcan);this.svgGroup&&(this.svgGroup.style.opacity=`${b}`);this.lidOpen>this.minOpenness&&1>this.lidOpen&&(this.lidTask= +setTimeout(this.animateLid.bind(this),ANIMATION_LENGTH$$module$build$src$core$trashcan/a))}setLidAngle(a){const b=this.workspace.toolboxPosition===Position$$module$build$src$core$utils$toolbox.RIGHT||this.workspace.horizontalLayout&&this.workspace.RTL;let c;null==(c=this.svgLid)||c.setAttribute("transform","rotate("+(b?-a:a)+","+(b?4:WIDTH$$module$build$src$core$trashcan-4)+","+(LID_HEIGHT$$module$build$src$core$trashcan-2)+")")}setMinOpenness(a){this.minOpenness=a;this.isLidOpen||this.setLidAngle(a* +MAX_LID_ANGLE$$module$build$src$core$trashcan)}closeLid(){this.setLidOpen(!1)}click(){this.hasContents()&&this.openFlyout()}fireUiEvent(a){a=new (get$$module$build$src$core$events$utils(TRASHCAN_OPEN$$module$build$src$core$events$utils))(a,this.workspace.id);fire$$module$build$src$core$events$utils(a)}blockMouseDownWhenOpenable(a){!this.contentsIsOpen()&&this.hasContents()&&a.stopPropagation()}mouseOver(){this.hasContents()&&this.setLidOpen(!0)}mouseOut(){this.setLidOpen(!1)}onDelete(a){if(!(0>=this.workspace.options.maxTrashcanContents|| +a.type!==$.DELETE$$module$build$src$core$events$utils||a.type!==$.DELETE$$module$build$src$core$events$utils||a.wasShadow)){if(!a.oldJson)throw Error("Encountered a delete event without proper oldJson");a=JSON.stringify(this.cleanBlockJson(a.oldJson));if(-1===this.contents.indexOf(a)){for(this.contents.unshift(a);this.contents.length>this.workspace.options.maxTrashcanContents;)this.contents.pop();this.setMinOpenness(HAS_BLOCKS_LID_ANGLE$$module$build$src$core$trashcan)}}}cleanBlockJson(a){function b(c){if(c){delete c.id; +delete c.x;delete c.y;delete c.enabled;if(c.icons&&c.icons.comment){var d=c.icons.comment;delete d.height;delete d.width;delete d.pinned}d=c.inputs;for(var e in d){var f=d[e];const g=f.block;f=f.shadow;g&&b(g);f&&b(f)}c.next&&(e=c.next,c=e.block,e=e.shadow,c&&b(c),e&&b(e))}}a=JSON.parse(JSON.stringify(a));b(a);return Object.assign({},{kind:"BLOCK"},a)}},WIDTH$$module$build$src$core$trashcan=47,BODY_HEIGHT$$module$build$src$core$trashcan=44,LID_HEIGHT$$module$build$src$core$trashcan=16,MARGIN_VERTICAL$$module$build$src$core$trashcan= +20,MARGIN_HORIZONTAL$$module$build$src$core$trashcan=20,MARGIN_HOTSPOT$$module$build$src$core$trashcan=10,SPRITE_LEFT$$module$build$src$core$trashcan=0,SPRITE_TOP$$module$build$src$core$trashcan=32,HAS_BLOCKS_LID_ANGLE$$module$build$src$core$trashcan=.1,ANIMATION_LENGTH$$module$build$src$core$trashcan=80,ANIMATION_FRAMES$$module$build$src$core$trashcan=4,OPACITY_MIN$$module$build$src$core$trashcan=.4,OPACITY_MAX$$module$build$src$core$trashcan=.8,MAX_LID_ANGLE$$module$build$src$core$trashcan=45,module$build$src$core$trashcan= +{};module$build$src$core$trashcan.Trashcan=Trashcan$$module$build$src$core$trashcan;var ShortcutRegistry$$module$build$src$core$shortcut_registry=class{constructor(){this.shortcuts=new Map;this.keyMap=new Map;this.reset()}reset(){this.shortcuts.clear();this.keyMap.clear()}register(a,b){if(this.shortcuts.get(a.name)&&!b)throw Error(`Shortcut named "${a.name}" already exists.`);this.shortcuts.set(a.name,a);if((b=a.keyCodes)&&0saveProcedure$$module$build$src$core$serialization$procedures(b));return a.length?a:null}load(a,b){const c=b.getProcedureMap();for(const d of a)c.add(loadProcedure$$module$build$src$core$serialization$procedures(this.procedureModelClass, +this.parameterModelClass,d,b))}clear(a){a.getProcedureMap().clear()}},module$build$src$core$serialization$procedures={};module$build$src$core$serialization$procedures.ProcedureSerializer=ProcedureSerializer$$module$build$src$core$serialization$procedures;module$build$src$core$serialization$procedures.loadParameter=loadParameter$$module$build$src$core$serialization$procedures;module$build$src$core$serialization$procedures.loadProcedure=loadProcedure$$module$build$src$core$serialization$procedures; +module$build$src$core$serialization$procedures.saveParameter=saveParameter$$module$build$src$core$serialization$procedures;module$build$src$core$serialization$procedures.saveProcedure=saveProcedure$$module$build$src$core$serialization$procedures;var VariableSerializer$$module$build$src$core$serialization$variables=class{constructor(){this.priority=VARIABLES$$module$build$src$core$serialization$priorities}save(a){const b=[];for(const c of a.getAllVariables())a={name:c.name,id:c.getId()},c.type&&(a.type=c.type),b.push(a);return b.length?b:null}load(a,b){for(const c of a)b.createVariable(c.name,c.type,c.id)}clear(a){a.getVariableMap().clear()}};register$$module$build$src$core$serialization$registry("variables",new VariableSerializer$$module$build$src$core$serialization$variables); +var module$build$src$core$serialization$variables={};module$build$src$core$serialization$variables.VariableSerializer=VariableSerializer$$module$build$src$core$serialization$variables;var module$build$src$core$serialization$workspaces={};module$build$src$core$serialization$workspaces.load=load$$module$build$src$core$serialization$workspaces;module$build$src$core$serialization$workspaces.save=save$$module$build$src$core$serialization$workspaces;var module$build$src$core$serialization={blocks:module$build$src$core$serialization$blocks,exceptions:module$build$src$core$serialization$exceptions,priorities:module$build$src$core$serialization$priorities,procedures:module$build$src$core$serialization$procedures,registry:module$build$src$core$serialization$registry,variables:module$build$src$core$serialization$variables,workspaces:module$build$src$core$serialization$workspaces};var ScrollbarPair$$module$build$src$core$scrollbar_pair=class{constructor(a,b,c,d,e){this.workspace=a;this.oldHostMetrics_=this.corner_=this.vScroll=this.hScroll=null;b=void 0===b?!0:b;c=void 0===c?!0:c;const f=b&&c;b&&(this.hScroll=new Scrollbar$$module$build$src$core$scrollbar(a,!0,f,d,e));c&&(this.vScroll=new Scrollbar$$module$build$src$core$scrollbar(a,!1,f,d,e));f&&(this.corner_=createSvgElement$$module$build$src$core$utils$dom(Svg$$module$build$src$core$utils$svg.RECT,{height:Scrollbar$$module$build$src$core$scrollbar.scrollbarThickness, +width:Scrollbar$$module$build$src$core$scrollbar.scrollbarThickness,"class":"blocklyScrollbarBackground"}),insertAfter$$module$build$src$core$utils$dom(this.corner_,a.getBubbleCanvas()))}dispose(){removeNode$$module$build$src$core$utils$dom(this.corner_);this.oldHostMetrics_=this.corner_=null;this.hScroll&&(this.hScroll.dispose(),this.hScroll=null);this.vScroll&&(this.vScroll.dispose(),this.vScroll=null)}resize(){const a=this.workspace.getMetrics();if(a){var b=!1,c=!1;this.oldHostMetrics_&&this.oldHostMetrics_.viewWidth=== +a.viewWidth&&this.oldHostMetrics_.viewHeight===a.viewHeight&&this.oldHostMetrics_.absoluteTop===a.absoluteTop&&this.oldHostMetrics_.absoluteLeft===a.absoluteLeft?(this.oldHostMetrics_&&this.oldHostMetrics_.scrollWidth===a.scrollWidth&&this.oldHostMetrics_.viewLeft===a.viewLeft&&this.oldHostMetrics_.scrollLeft===a.scrollLeft||(b=!0),this.oldHostMetrics_&&this.oldHostMetrics_.scrollHeight===a.scrollHeight&&this.oldHostMetrics_.viewTop===a.viewTop&&this.oldHostMetrics_.scrollTop===a.scrollTop||(c=!0)): +c=b=!0;if(b||c){try{$.disable$$module$build$src$core$events$utils(),this.hScroll&&b&&this.hScroll.resize(a),this.vScroll&&c&&this.vScroll.resize(a)}finally{$.enable$$module$build$src$core$events$utils()}this.workspace.maybeFireViewportChangeEvent()}if(this.hScroll&&this.vScroll){if(!this.oldHostMetrics_||this.oldHostMetrics_.viewWidth!==a.viewWidth||this.oldHostMetrics_.absoluteLeft!==a.absoluteLeft){let d;null==(d=this.corner_)||d.setAttribute("x",String(this.vScroll.position.x))}if(!this.oldHostMetrics_|| +this.oldHostMetrics_.viewHeight!==a.viewHeight||this.oldHostMetrics_.absoluteTop!==a.absoluteTop){let d;null==(d=this.corner_)||d.setAttribute("y",String(this.hScroll.position.y))}}this.oldHostMetrics_=a}}canScrollHorizontally(){return!!this.hScroll}canScrollVertically(){return!!this.vScroll}setOrigin(a,b){this.hScroll&&this.hScroll.setOrigin(a,b);this.vScroll&&this.vScroll.setOrigin(a,b)}set(a,b,c){this.hScroll&&this.hScroll.set(a,!1);this.vScroll&&this.vScroll.set(b,!1);if(c||void 0===c)a={},this.hScroll&& +(a.x=this.hScroll.getRatio_()),this.vScroll&&(a.y=this.vScroll.getRatio_()),this.workspace.setMetrics(a)}setX(a){this.hScroll&&this.hScroll.set(a,!0)}setY(a){this.vScroll&&this.vScroll.set(a,!0)}setContainerVisible(a){this.hScroll&&this.hScroll.setContainerVisible(a);this.vScroll&&this.vScroll.setContainerVisible(a)}isVisible(){let a=!1;this.hScroll&&(a=this.hScroll.isVisible());this.vScroll&&(a=a||this.vScroll.isVisible());return a}setVisible(a){this.hScroll&&this.hScroll.setVisibleInternal(a);this.vScroll&& +this.vScroll.setVisibleInternal(a)}resizeContent(a){this.hScroll&&this.hScroll.resizeContentHorizontal(a);this.vScroll&&this.vScroll.resizeContentVertical(a)}resizeView(a){this.hScroll&&this.hScroll.resizeViewHorizontal(a);this.vScroll&&this.vScroll.resizeViewVertical(a)}},module$build$src$core$scrollbar_pair={};module$build$src$core$scrollbar_pair.ScrollbarPair=ScrollbarPair$$module$build$src$core$scrollbar_pair;var MetricsManager$$module$build$src$core$metrics_manager=class{constructor(a){this.workspace_=a}getDimensionsPx_(a){let b=0,c=0;a&&(b=a.getWidth(),c=a.getHeight());return new Size$$module$build$src$core$utils$size(b,c)}getFlyoutMetrics(a){a=this.getDimensionsPx_(this.workspace_.getFlyout(a));return{width:a.width,height:a.height,position:this.workspace_.toolboxPosition}}getToolboxMetrics(){const a=this.getDimensionsPx_(this.workspace_.getToolbox());return{width:a.width,height:a.height,position:this.workspace_.toolboxPosition}}getSvgMetrics(){return this.workspace_.getCachedParentSvgSize()}getAbsoluteMetrics(){let a= +0;const b=this.getToolboxMetrics(),c=this.getFlyoutMetrics(!0),d=!!this.workspace_.getToolbox(),e=!!this.workspace_.getFlyout(!0);var f=d?b.position:c.position,g=f===Position$$module$build$src$core$utils$toolbox.LEFT;f=f===Position$$module$build$src$core$utils$toolbox.TOP;d&&g?a=b.width:e&&g&&(a=c.width);g=0;d&&f?g=b.height:e&&f&&(g=c.height);return{top:g,left:a}}getViewMetrics(a){a=a?this.workspace_.scale:1;const b=this.getSvgMetrics(),c=this.getToolboxMetrics(),d=this.getFlyoutMetrics(!0),e=this.workspace_.getToolbox()? +c.position:d.position;if(this.workspace_.getToolbox())if(e===Position$$module$build$src$core$utils$toolbox.TOP||e===Position$$module$build$src$core$utils$toolbox.BOTTOM)b.height-=c.height;else{if(e===Position$$module$build$src$core$utils$toolbox.LEFT||e===Position$$module$build$src$core$utils$toolbox.RIGHT)b.width-=c.width}else if(this.workspace_.getFlyout(!0))if(e===Position$$module$build$src$core$utils$toolbox.TOP||e===Position$$module$build$src$core$utils$toolbox.BOTTOM)b.height-=d.height;else if(e=== +Position$$module$build$src$core$utils$toolbox.LEFT||e===Position$$module$build$src$core$utils$toolbox.RIGHT)b.width-=d.width;return{height:b.height/a,width:b.width/a,top:-this.workspace_.scrollY/a,left:-this.workspace_.scrollX/a}}getContentMetrics(a){a=a?1:this.workspace_.scale;const b=this.workspace_.getBlocksBoundingBox();return{height:(b.bottom-b.top)*a,width:(b.right-b.left)*a,top:b.top*a,left:b.left*a}}hasFixedEdges(){return!this.workspace_.isMovableHorizontally()||!this.workspace_.isMovableVertically()}getComputedFixedEdges_(a){if(!this.hasFixedEdges())return{}; +const b=this.workspace_.isMovableHorizontally(),c=this.workspace_.isMovableVertically();a=a||this.getViewMetrics(!1);const d={};c||(d.top=a.top,d.bottom=a.top+a.height);b||(d.left=a.left,d.right=a.left+a.width);return d}getPaddedContent_(a,b){const c=b.top+b.height,d=b.left+b.width,e=a.width;a=a.height;const f=e/2,g=a/2;return{top:Math.min(b.top-g,c-a),bottom:Math.max(c+g,b.top+a),left:Math.min(b.left-f,d-e),right:Math.max(d+f,b.left+e)}}getScrollMetrics(a,b,c){a=a?this.workspace_.scale:1;b=b||this.getViewMetrics(!1); +var d=c||this.getContentMetrics();c=this.getComputedFixedEdges_(b);b=this.getPaddedContent_(b,d);d=void 0!==c.top?c.top:b.top;const e=void 0!==c.left?c.left:b.left;return{top:d/a,left:e/a,width:((void 0!==c.right?c.right:b.right)-e)/a,height:((void 0!==c.bottom?c.bottom:b.bottom)-d)/a}}getUiMetrics(){return{viewMetrics:this.getViewMetrics(),absoluteMetrics:this.getAbsoluteMetrics(),toolboxMetrics:this.getToolboxMetrics()}}getMetrics(){const a=this.getToolboxMetrics(),b=this.getFlyoutMetrics(!0),c= +this.getSvgMetrics(),d=this.getAbsoluteMetrics(),e=this.getViewMetrics(),f=this.getContentMetrics(),g=this.getScrollMetrics(!1,e,f);return{contentHeight:f.height,contentWidth:f.width,contentTop:f.top,contentLeft:f.left,scrollHeight:g.height,scrollWidth:g.width,scrollTop:g.top,scrollLeft:g.left,viewHeight:e.height,viewWidth:e.width,viewTop:e.top,viewLeft:e.left,absoluteTop:d.top,absoluteLeft:d.left,svgHeight:c.height,svgWidth:c.width,toolboxWidth:a.width,toolboxHeight:a.height,toolboxPosition:a.position, +flyoutWidth:b.width,flyoutHeight:b.height}}};register$$module$build$src$core$registry(Type$$module$build$src$core$registry.METRICS_MANAGER,DEFAULT$$module$build$src$core$registry,MetricsManager$$module$build$src$core$metrics_manager);var module$build$src$core$metrics_manager={};module$build$src$core$metrics_manager.MetricsManager=MetricsManager$$module$build$src$core$metrics_manager;var FinishedLoading$$module$build$src$core$events$workspace_events=class extends Abstract$$module$build$src$core$events$events_abstract{constructor(a){super();this.isBlank=!0;this.recordUndo=!1;this.type=FINISHED_LOADING$$module$build$src$core$events$utils;this.isBlank=!!a;a&&(this.workspaceId=a.id)}};register$$module$build$src$core$registry(Type$$module$build$src$core$registry.EVENT,FINISHED_LOADING$$module$build$src$core$events$utils,FinishedLoading$$module$build$src$core$events$workspace_events); +var module$build$src$core$events$workspace_events={};module$build$src$core$events$workspace_events.FinishedLoading=FinishedLoading$$module$build$src$core$events$workspace_events;var BlockDrag$$module$build$src$core$events$events_block_drag=class extends UiBase$$module$build$src$core$events$events_ui_base{constructor(a,b,c){super(a?a.workspace.id:void 0);this.type=BLOCK_DRAG$$module$build$src$core$events$utils;a&&(this.blockId=a.id,this.isStart=b,this.blocks=c)}toJson(){const a=super.toJson();if(void 0===this.isStart)throw Error("Whether this event is the start of a drag is undefined. Either pass the value to the constructor, or call fromJson");if(void 0===this.blockId)throw Error("The block ID is undefined. Either pass a block to the constructor, or call fromJson"); +a.isStart=this.isStart;a.blockId=this.blockId;a.blocks=this.blocks;return a}static fromJson(a,b,c){b=super.fromJson(a,b,null!=c?c:new BlockDrag$$module$build$src$core$events$events_block_drag);b.isStart=a.isStart;b.blockId=a.blockId;b.blocks=a.blocks;return b}};register$$module$build$src$core$registry(Type$$module$build$src$core$registry.EVENT,BLOCK_DRAG$$module$build$src$core$events$utils,BlockDrag$$module$build$src$core$events$events_block_drag); +var module$build$src$core$events$events_block_drag={};module$build$src$core$events$events_block_drag.BlockDrag=BlockDrag$$module$build$src$core$events$events_block_drag;var bumpIntoBounds$$module$build$src$core$bump_objects=bumpObjectIntoBounds$$module$build$src$core$bump_objects,module$build$src$core$bump_objects={};module$build$src$core$bump_objects.bumpIntoBounds=bumpObjectIntoBounds$$module$build$src$core$bump_objects;module$build$src$core$bump_objects.bumpIntoBoundsHandler=bumpIntoBoundsHandler$$module$build$src$core$bump_objects;module$build$src$core$bump_objects.bumpTopObjectsIntoBounds=bumpTopObjectsIntoBounds$$module$build$src$core$bump_objects;var BlockDragger$$module$build$src$core$block_dragger=class{constructor(a,b){this.dragTarget_=null;this.wouldDeleteBlock_=!1;this.draggingBlock_=a;this.draggedConnectionManager_=new InsertionMarkerManager$$module$build$src$core$insertion_marker_manager(this.draggingBlock_);this.workspace_=b;this.startXY_=this.draggingBlock_.getRelativeToSurfaceXY();this.dragIconData_=initIconData$$module$build$src$core$block_dragger(a,this.startXY_)}dispose(){this.dragIconData_.length=0;this.draggedConnectionManager_&& +this.draggedConnectionManager_.dispose()}startDrag(a,b){$.getGroup$$module$build$src$core$events$utils()||$.setGroup$$module$build$src$core$events$utils(!0);this.fireDragStartEvent_();this.draggingBlock_.bringToFront(!0);startTextWidthCache$$module$build$src$core$utils$dom();this.workspace_.setResizesEnabled(!1);disconnectUiStop$$module$build$src$core$block_animations();this.shouldDisconnect_(b)&&this.disconnectBlock_(b,a);this.draggingBlock_.setDragging(!0)}shouldDisconnect_(a){return!!(this.draggingBlock_.getParent()|| +a&&this.draggingBlock_.nextConnection&&this.draggingBlock_.nextConnection.targetBlock())}disconnectBlock_(a,b){this.draggingBlock_.unplug(a);a=this.pixelsToWorkspaceUnits_(b);a=Coordinate$$module$build$src$core$utils$coordinate.sum(this.startXY_,a);this.draggingBlock_.translate(a.x,a.y);disconnectUiEffect$$module$build$src$core$block_animations(this.draggingBlock_);this.draggedConnectionManager_.updateAvailableConnections()}fireDragStartEvent_(){const a=new (get$$module$build$src$core$events$utils(BLOCK_DRAG$$module$build$src$core$events$utils))(this.draggingBlock_, +!0,this.draggingBlock_.getDescendants(!1));fire$$module$build$src$core$events$utils(a)}drag(a,b){b=this.pixelsToWorkspaceUnits_(b);var c=Coordinate$$module$build$src$core$utils$coordinate.sum(this.startXY_,b);this.draggingBlock_.moveDuringDrag(c);this.dragIcons_(b);c=this.dragTarget_;this.dragTarget_=this.workspace_.getDragTarget(a);this.draggedConnectionManager_.update(b,this.dragTarget_);a=this.wouldDeleteBlock_;this.wouldDeleteBlock_=this.draggedConnectionManager_.wouldDeleteBlock;a!==this.wouldDeleteBlock_&& +this.updateCursorDuringBlockDrag_();this.dragTarget_!==c&&(c&&c.onDragExit(this.draggingBlock_),this.dragTarget_&&this.dragTarget_.onDragEnter(this.draggingBlock_));this.dragTarget_&&this.dragTarget_.onDragOver(this.draggingBlock_)}endDrag(a,b){this.drag(a,b);this.dragIconData_=[];this.fireDragEndEvent_();stopTextWidthCache$$module$build$src$core$utils$dom();disconnectUiStop$$module$build$src$core$block_animations();a=null;this.dragTarget_&&this.dragTarget_.shouldPreventMove(this.draggingBlock_)|| +(a=this.getNewLocationAfterDrag_(b).delta);if(this.dragTarget_)this.dragTarget_.onDrop(this.draggingBlock_);this.maybeDeleteBlock_()||(this.draggingBlock_.setDragging(!1),a?this.updateBlockAfterMove_():bumpObjectIntoBounds$$module$build$src$core$bump_objects(this.draggingBlock_.workspace,this.workspace_.getMetricsManager().getScrollMetrics(!0),this.draggingBlock_));this.workspace_.setResizesEnabled(!0);$.setGroup$$module$build$src$core$events$utils(!1)}getNewLocationAfterDrag_(a){a=this.pixelsToWorkspaceUnits_(a); +const b=Coordinate$$module$build$src$core$utils$coordinate.sum(this.startXY_,a);return{delta:a,newLocation:b}}maybeDeleteBlock_(){return this.wouldDeleteBlock_?(this.fireMoveEvent_(),this.draggingBlock_.dispose(!1,!0),draggingConnections$$module$build$src$core$common.length=0,!0):!1}updateBlockAfterMove_(){this.fireMoveEvent_();this.draggedConnectionManager_.wouldConnectBlock()?this.draggedConnectionManager_.applyConnections():this.draggingBlock_.queueRender();this.draggingBlock_.scheduleSnapAndBump()}fireDragEndEvent_(){const a= +new (get$$module$build$src$core$events$utils(BLOCK_DRAG$$module$build$src$core$events$utils))(this.draggingBlock_,!1,this.draggingBlock_.getDescendants(!1));fire$$module$build$src$core$events$utils(a)}updateToolboxStyle_(a){const b=this.workspace_.getToolbox();if(b){const c=this.draggingBlock_.isDeletable()?"blocklyToolboxDelete":"blocklyToolboxGrab";a&&"function"===typeof b.removeStyle?b.removeStyle(c):a||"function"!==typeof b.addStyle||b.addStyle(c)}}fireMoveEvent_(){if(!this.draggingBlock_.isDeadOrDying()){var a= +new (get$$module$build$src$core$events$utils($.MOVE$$module$build$src$core$events$utils))(this.draggingBlock_);a.setReason(["drag"]);a.oldCoordinate=this.startXY_;a.recordNew();fire$$module$build$src$core$events$utils(a)}}updateCursorDuringBlockDrag_(){this.draggingBlock_.setDeleteStyle(this.wouldDeleteBlock_)}pixelsToWorkspaceUnits_(a){a=new Coordinate$$module$build$src$core$utils$coordinate(a.x/this.workspace_.scale,a.y/this.workspace_.scale);this.workspace_.isMutator&&a.scale(1/this.workspace_.options.parentWorkspace.scale); +return a}dragIcons_(a){for(const b of this.dragIconData_)b.icon.onLocationChange(Coordinate$$module$build$src$core$utils$coordinate.sum(b.location,a))}getInsertionMarkers(){return this.draggedConnectionManager_&&this.draggedConnectionManager_.getInsertionMarkers?this.draggedConnectionManager_.getInsertionMarkers():[]}};register$$module$build$src$core$registry(Type$$module$build$src$core$registry.BLOCK_DRAGGER,DEFAULT$$module$build$src$core$registry,BlockDragger$$module$build$src$core$block_dragger); +var module$build$src$core$block_dragger={};module$build$src$core$block_dragger.BlockDragger=BlockDragger$$module$build$src$core$block_dragger;var module$build$src$core$bubbles={};module$build$src$core$bubbles.Bubble=Bubble$$module$build$src$core$bubbles$bubble;module$build$src$core$bubbles.MiniWorkspaceBubble=MiniWorkspaceBubble$$module$build$src$core$bubbles$mini_workspace_bubble;module$build$src$core$bubbles.TextBubble=TextBubble$$module$build$src$core$bubbles$text_bubble;module$build$src$core$bubbles.TextInputBubble=TextInputBubble$$module$build$src$core$bubbles$textinput_bubble;var BlockFieldIntermediateChange$$module$build$src$core$events$events_block_field_intermediate_change=class extends BlockBase$$module$build$src$core$events$events_block_base{constructor(a,b,c,d){super(a);this.type=BLOCK_FIELD_INTERMEDIATE_CHANGE$$module$build$src$core$events$utils;this.recordUndo=!1;a&&(this.name=b,this.oldValue=c,this.newValue=d)}toJson(){const a=super.toJson();if(!this.name)throw Error("The changed field name is undefined. Either pass a name to the constructor, or call fromJson."); +a.name=this.name;a.oldValue=this.oldValue;a.newValue=this.newValue;return a}static fromJson(a,b,c){b=super.fromJson(a,b,null!=c?c:new BlockFieldIntermediateChange$$module$build$src$core$events$events_block_field_intermediate_change);b.name=a.name;b.oldValue=a.oldValue;b.newValue=a.newValue;return b}isNull(){return this.oldValue===this.newValue}};register$$module$build$src$core$registry(Type$$module$build$src$core$registry.EVENT,BLOCK_FIELD_INTERMEDIATE_CHANGE$$module$build$src$core$events$utils,BlockFieldIntermediateChange$$module$build$src$core$events$events_block_field_intermediate_change); +var module$build$src$core$events$events_block_field_intermediate_change={};module$build$src$core$events$events_block_field_intermediate_change.BlockFieldIntermediateChange=BlockFieldIntermediateChange$$module$build$src$core$events$events_block_field_intermediate_change;var BlockMove$$module$build$src$core$events$events_block_move=class extends BlockBase$$module$build$src$core$events$events_block_base{constructor(a){super(a);this.type=$.MOVE$$module$build$src$core$events$utils;a&&(a.isShadow()&&(this.recordUndo=!1),a=this.currentLocation_(),this.oldParentId=a.parentId,this.oldInputName=a.inputName,this.oldCoordinate=a.coordinate)}toJson(){const a=super.toJson();a.oldParentId=this.oldParentId;a.oldInputName=this.oldInputName;this.oldCoordinate&&(a.oldCoordinate=`${Math.round(this.oldCoordinate.x)}, `+ +`${Math.round(this.oldCoordinate.y)}`);a.newParentId=this.newParentId;a.newInputName=this.newInputName;this.newCoordinate&&(a.newCoordinate=`${Math.round(this.newCoordinate.x)}, `+`${Math.round(this.newCoordinate.y)}`);this.reason&&(a.reason=this.reason);this.recordUndo||(a.recordUndo=this.recordUndo);return a}static fromJson(a,b,c){b=super.fromJson(a,b,null!=c?c:new BlockMove$$module$build$src$core$events$events_block_move);b.oldParentId=a.oldParentId;b.oldInputName=a.oldInputName;a.oldCoordinate&& +(c=a.oldCoordinate.split(","),b.oldCoordinate=new Coordinate$$module$build$src$core$utils$coordinate(Number(c[0]),Number(c[1])));b.newParentId=a.newParentId;b.newInputName=a.newInputName;a.newCoordinate&&(c=a.newCoordinate.split(","),b.newCoordinate=new Coordinate$$module$build$src$core$utils$coordinate(Number(c[0]),Number(c[1])));void 0!==a.reason&&(b.reason=a.reason);void 0!==a.recordUndo&&(b.recordUndo=a.recordUndo);return b}recordNew(){const a=this.currentLocation_();this.newParentId=a.parentId; +this.newInputName=a.inputName;this.newCoordinate=a.coordinate}setReason(a){this.reason=a}currentLocation_(){var a=this.getEventWorkspace_();if(!this.blockId)throw Error("The block ID is undefined. Either pass a block to the constructor, or call fromJson");var b=a.getBlockById(this.blockId);if(!b)throw Error("The block associated with the block move event could not be found");a={};const c=b.getParent();if(c){if(a.parentId=c.id,b=c.getInputWithBlock(b))a.inputName=b.name}else a.coordinate=b.getRelativeToSurfaceXY(); +return a}isNull(){return this.oldParentId===this.newParentId&&this.oldInputName===this.newInputName&&Coordinate$$module$build$src$core$utils$coordinate.equals(this.oldCoordinate,this.newCoordinate)}run(a){var b=this.getEventWorkspace_();if(!this.blockId)throw Error("The block ID is undefined. Either pass a block to the constructor, or call fromJson");var c=b.getBlockById(this.blockId);if(c){var d=a?this.newParentId:this.oldParentId,e=a?this.newInputName:this.oldInputName;a=a?this.newCoordinate:this.oldCoordinate; +if(d){var f=b.getBlockById(d);if(!f){console.warn("Can't connect to non-existent block: "+d);return}}c.getParent()&&c.unplug();if(a)e=c.getRelativeToSurfaceXY(),c.moveBy(a.x-e.x,a.y-e.y,this.reason);else{b=c.outputConnection;if(!b||c.previousConnection&&c.previousConnection.isConnected())b=c.previousConnection;let g,h;c=null==(h=b)?void 0:h.type;if(e){if(c=f.getInput(e))g=c.connection}else c===ConnectionType$$module$build$src$core$connection_type.PREVIOUS_STATEMENT&&(g=f.nextConnection);g&&b?b.connect(g): +console.warn("Can't connect to non-existent input: "+e)}}else console.warn("Can't move non-existent block: "+this.blockId)}};register$$module$build$src$core$registry(Type$$module$build$src$core$registry.EVENT,$.MOVE$$module$build$src$core$events$utils,BlockMove$$module$build$src$core$events$events_block_move);var module$build$src$core$events$events_block_move={};module$build$src$core$events$events_block_move.BlockMove=BlockMove$$module$build$src$core$events$events_block_move;var BubbleOpen$$module$build$src$core$events$events_bubble_open=class extends UiBase$$module$build$src$core$events$events_ui_base{constructor(a,b,c){super(a?a.workspace.id:void 0);this.type=BUBBLE_OPEN$$module$build$src$core$events$utils;a&&(this.blockId=a.id,this.isOpen=b,this.bubbleType=c)}toJson(){const a=super.toJson();if(void 0===this.isOpen)throw Error("Whether this event is for opening the bubble is undefined. Either pass the value to the constructor, or call fromJson");if(!this.bubbleType)throw Error("The type of bubble is undefined. Either pass the value to the constructor, or call fromJson"); +a.isOpen=this.isOpen;a.bubbleType=this.bubbleType;a.blockId=this.blockId||"";return a}static fromJson(a,b,c){b=super.fromJson(a,b,null!=c?c:new BubbleOpen$$module$build$src$core$events$events_bubble_open);b.isOpen=a.isOpen;b.bubbleType=a.bubbleType;b.blockId=a.blockId;return b}},BubbleType$$module$build$src$core$events$events_bubble_open; +(function(a){a.MUTATOR="mutator";a.COMMENT="comment";a.WARNING="warning"})(BubbleType$$module$build$src$core$events$events_bubble_open||(BubbleType$$module$build$src$core$events$events_bubble_open={}));register$$module$build$src$core$registry(Type$$module$build$src$core$registry.EVENT,BUBBLE_OPEN$$module$build$src$core$events$utils,BubbleOpen$$module$build$src$core$events$events_bubble_open);var module$build$src$core$events$events_bubble_open={}; +module$build$src$core$events$events_bubble_open.BubbleOpen=BubbleOpen$$module$build$src$core$events$events_bubble_open;module$build$src$core$events$events_bubble_open.BubbleType=BubbleType$$module$build$src$core$events$events_bubble_open;var CommentBase$$module$build$src$core$events$events_comment_base=class extends Abstract$$module$build$src$core$events$events_abstract{constructor(a){super();this.isBlank=!a;a&&(this.commentId=a.id,this.workspaceId=a.workspace.id,this.group=$.getGroup$$module$build$src$core$events$utils(),this.recordUndo=getRecordUndo$$module$build$src$core$events$utils())}toJson(){const a=super.toJson();if(!this.commentId)throw Error("The comment ID is undefined. Either pass a comment to the constructor, or call fromJson"); +a.commentId=this.commentId;return a}static fromJson(a,b,c){b=super.fromJson(a,b,null!=c?c:new CommentBase$$module$build$src$core$events$events_comment_base);b.commentId=a.commentId;return b}static CommentCreateDeleteHelper(a,b){var c=a.getEventWorkspace_();if(b){b=$.createElement$$module$build$src$core$utils$xml("xml");if(!a.xml)throw Error("Ecountered a comment event without proper xml");b.appendChild(a.xml);$.domToWorkspace$$module$build$src$core$xml(b,c)}else{if(!a.commentId)throw Error("The comment ID is undefined. Either pass a comment to the constructor, or call fromJson"); +(c=c.getCommentById(a.commentId))?c.dispose():console.warn("Can't uncreate non-existent comment: "+a.commentId)}}},module$build$src$core$events$events_comment_base={};module$build$src$core$events$events_comment_base.CommentBase=CommentBase$$module$build$src$core$events$events_comment_base;var CommentChange$$module$build$src$core$events$events_comment_change=class extends CommentBase$$module$build$src$core$events$events_comment_base{constructor(a,b,c){super(a);this.type=COMMENT_CHANGE$$module$build$src$core$events$utils;a&&(this.oldContents_="undefined"===typeof b?"":b,this.newContents_="undefined"===typeof c?"":c)}toJson(){const a=super.toJson();if(!this.oldContents_)throw Error("The old contents is undefined. Either pass a value to the constructor, or call fromJson");if(!this.newContents_)throw Error("The new contents is undefined. Either pass a value to the constructor, or call fromJson"); +a.oldContents=this.oldContents_;a.newContents=this.newContents_;return a}static fromJson(a,b,c){b=super.fromJson(a,b,null!=c?c:new CommentChange$$module$build$src$core$events$events_comment_change);b.oldContents_=a.oldContents;b.newContents_=a.newContents;return b}isNull(){return this.oldContents_===this.newContents_}run(a){var b=this.getEventWorkspace_();if(!this.commentId)throw Error("The comment ID is undefined. Either pass a comment to the constructor, or call fromJson");if(b=b.getCommentById(this.commentId)){var c= +a?this.newContents_:this.oldContents_;if(!c){if(a)throw Error("The new contents is undefined. Either pass a value to the constructor, or call fromJson");throw Error("The old contents is undefined. Either pass a value to the constructor, or call fromJson");}b.setContent(c)}else console.warn("Can't change non-existent comment: "+this.commentId)}};register$$module$build$src$core$registry(Type$$module$build$src$core$registry.EVENT,COMMENT_CHANGE$$module$build$src$core$events$utils,CommentChange$$module$build$src$core$events$events_comment_change); +var module$build$src$core$events$events_comment_change={};module$build$src$core$events$events_comment_change.CommentChange=CommentChange$$module$build$src$core$events$events_comment_change;var CommentCreate$$module$build$src$core$events$events_comment_create=class extends CommentBase$$module$build$src$core$events$events_comment_base{constructor(a){super(a);this.type=COMMENT_CREATE$$module$build$src$core$events$utils;a&&(this.xml=a.toXmlWithXY())}toJson(){const a=super.toJson();if(!this.xml)throw Error("The comment XML is undefined. Either pass a comment to the constructor, or call fromJson");a.xml=domToText$$module$build$src$core$xml(this.xml);return a}static fromJson(a,b,c){b=super.fromJson(a, +b,null!=c?c:new CommentCreate$$module$build$src$core$events$events_comment_create);b.xml=$.textToDom$$module$build$src$core$utils$xml(a.xml);return b}run(a){CommentBase$$module$build$src$core$events$events_comment_base.CommentCreateDeleteHelper(this,a)}};register$$module$build$src$core$registry(Type$$module$build$src$core$registry.EVENT,COMMENT_CREATE$$module$build$src$core$events$utils,CommentCreate$$module$build$src$core$events$events_comment_create); +var module$build$src$core$events$events_comment_create={};module$build$src$core$events$events_comment_create.CommentCreate=CommentCreate$$module$build$src$core$events$events_comment_create;var CommentDelete$$module$build$src$core$events$events_comment_delete=class extends CommentBase$$module$build$src$core$events$events_comment_base{constructor(a){super(a);this.type=COMMENT_DELETE$$module$build$src$core$events$utils;a&&(this.xml=a.toXmlWithXY())}run(a){CommentBase$$module$build$src$core$events$events_comment_base.CommentCreateDeleteHelper(this,!a)}toJson(){const a=super.toJson();if(!this.xml)throw Error("The comment XML is undefined. Either pass a comment to the constructor, or call fromJson"); +a.xml=domToText$$module$build$src$core$xml(this.xml);return a}static fromJson(a,b,c){b=super.fromJson(a,b,null!=c?c:new CommentDelete$$module$build$src$core$events$events_comment_delete);b.xml=$.textToDom$$module$build$src$core$utils$xml(a.xml);return b}};register$$module$build$src$core$registry(Type$$module$build$src$core$registry.EVENT,COMMENT_DELETE$$module$build$src$core$events$utils,CommentDelete$$module$build$src$core$events$events_comment_delete); +var module$build$src$core$events$events_comment_delete={};module$build$src$core$events$events_comment_delete.CommentDelete=CommentDelete$$module$build$src$core$events$events_comment_delete;var CommentMove$$module$build$src$core$events$events_comment_move=class extends CommentBase$$module$build$src$core$events$events_comment_base{constructor(a){super(a);this.type=COMMENT_MOVE$$module$build$src$core$events$utils;a&&(this.comment_=a,this.oldCoordinate_=a.getRelativeToSurfaceXY())}recordNew(){if(this.newCoordinate_)throw Error("Tried to record the new position of a comment on the same event twice.");if(!this.comment_)throw Error("The comment is undefined. Pass a comment to the constructor if you want to use the record functionality"); +this.newCoordinate_=this.comment_.getRelativeToSurfaceXY()}setOldCoordinate(a){this.oldCoordinate_=a}toJson(){const a=super.toJson();if(!this.oldCoordinate_)throw Error("The old comment position is undefined. Either pass a comment to the constructor, or call fromJson");if(!this.newCoordinate_)throw Error("The new comment position is undefined. Either call recordNew, or call fromJson");a.oldCoordinate=`${Math.round(this.oldCoordinate_.x)}, `+`${Math.round(this.oldCoordinate_.y)}`;a.newCoordinate=Math.round(this.newCoordinate_.x)+ +","+Math.round(this.newCoordinate_.y);return a}static fromJson(a,b,c){b=super.fromJson(a,b,null!=c?c:new CommentMove$$module$build$src$core$events$events_comment_move);c=a.oldCoordinate.split(",");b.oldCoordinate_=new Coordinate$$module$build$src$core$utils$coordinate(Number(c[0]),Number(c[1]));c=a.newCoordinate.split(",");b.newCoordinate_=new Coordinate$$module$build$src$core$utils$coordinate(Number(c[0]),Number(c[1]));return b}isNull(){return Coordinate$$module$build$src$core$utils$coordinate.equals(this.oldCoordinate_, +this.newCoordinate_)}run(a){var b=this.getEventWorkspace_();if(!this.commentId)throw Error("The comment ID is undefined. Either pass a comment to the constructor, or call fromJson");if(b=b.getCommentById(this.commentId)){a=a?this.newCoordinate_:this.oldCoordinate_;if(!a)throw Error("Either oldCoordinate_ or newCoordinate_ is undefined. Either pass a comment to the constructor and call recordNew, or call fromJson");var c=b.getRelativeToSurfaceXY();b.moveBy(a.x-c.x,a.y-c.y)}else console.warn("Can't move non-existent comment: "+ +this.commentId)}};register$$module$build$src$core$registry(Type$$module$build$src$core$registry.EVENT,COMMENT_MOVE$$module$build$src$core$events$utils,CommentMove$$module$build$src$core$events$events_comment_move);var module$build$src$core$events$events_comment_move={};module$build$src$core$events$events_comment_move.CommentMove=CommentMove$$module$build$src$core$events$events_comment_move;var ToolboxItemSelect$$module$build$src$core$events$events_toolbox_item_select=class extends UiBase$$module$build$src$core$events$events_ui_base{constructor(a,b,c){super(c);this.type=TOOLBOX_ITEM_SELECT$$module$build$src$core$events$utils;this.oldItem=null!=a?a:void 0;this.newItem=null!=b?b:void 0}toJson(){const a=super.toJson();a.oldItem=this.oldItem;a.newItem=this.newItem;return a}static fromJson(a,b,c){b=super.fromJson(a,b,null!=c?c:new ToolboxItemSelect$$module$build$src$core$events$events_toolbox_item_select); +b.oldItem=a.oldItem;b.newItem=a.newItem;return b}};register$$module$build$src$core$registry(Type$$module$build$src$core$registry.EVENT,TOOLBOX_ITEM_SELECT$$module$build$src$core$events$utils,ToolboxItemSelect$$module$build$src$core$events$events_toolbox_item_select);var module$build$src$core$events$events_toolbox_item_select={};module$build$src$core$events$events_toolbox_item_select.ToolboxItemSelect=ToolboxItemSelect$$module$build$src$core$events$events_toolbox_item_select;var BLOCK_CHANGE$$module$build$src$core$events$events=$.CHANGE$$module$build$src$core$events$utils,BLOCK_CREATE$$module$build$src$core$events$events=$.CREATE$$module$build$src$core$events$utils,BLOCK_DELETE$$module$build$src$core$events$events=$.DELETE$$module$build$src$core$events$utils,BLOCK_DRAG$$module$build$src$core$events$events=BLOCK_DRAG$$module$build$src$core$events$utils,BLOCK_MOVE$$module$build$src$core$events$events=$.MOVE$$module$build$src$core$events$utils,BLOCK_FIELD_INTERMEDIATE_CHANGE$$module$build$src$core$events$events= +BLOCK_FIELD_INTERMEDIATE_CHANGE$$module$build$src$core$events$utils,BUBBLE_OPEN$$module$build$src$core$events$events=BUBBLE_OPEN$$module$build$src$core$events$utils,BUMP_EVENTS$$module$build$src$core$events$events=BUMP_EVENTS$$module$build$src$core$events$utils,CHANGE$$module$build$src$core$events$events=$.CHANGE$$module$build$src$core$events$utils,CLICK$$module$build$src$core$events$events=CLICK$$module$build$src$core$events$utils,COMMENT_CHANGE$$module$build$src$core$events$events=COMMENT_CHANGE$$module$build$src$core$events$utils, +COMMENT_CREATE$$module$build$src$core$events$events=COMMENT_CREATE$$module$build$src$core$events$utils,COMMENT_DELETE$$module$build$src$core$events$events=COMMENT_DELETE$$module$build$src$core$events$utils,COMMENT_MOVE$$module$build$src$core$events$events=COMMENT_MOVE$$module$build$src$core$events$utils,CREATE$$module$build$src$core$events$events=$.CREATE$$module$build$src$core$events$utils,DELETE$$module$build$src$core$events$events=$.DELETE$$module$build$src$core$events$utils,FINISHED_LOADING$$module$build$src$core$events$events= +FINISHED_LOADING$$module$build$src$core$events$utils,MARKER_MOVE$$module$build$src$core$events$events=MARKER_MOVE$$module$build$src$core$events$utils,MOVE$$module$build$src$core$events$events=$.MOVE$$module$build$src$core$events$utils,SELECTED$$module$build$src$core$events$events=SELECTED$$module$build$src$core$events$utils,THEME_CHANGE$$module$build$src$core$events$events=THEME_CHANGE$$module$build$src$core$events$utils,TOOLBOX_ITEM_SELECT$$module$build$src$core$events$events=TOOLBOX_ITEM_SELECT$$module$build$src$core$events$utils, +TRASHCAN_OPEN$$module$build$src$core$events$events=TRASHCAN_OPEN$$module$build$src$core$events$utils,UI$$module$build$src$core$events$events=UI$$module$build$src$core$events$utils,VAR_CREATE$$module$build$src$core$events$events=VAR_CREATE$$module$build$src$core$events$utils,VAR_DELETE$$module$build$src$core$events$events=VAR_DELETE$$module$build$src$core$events$utils,VAR_RENAME$$module$build$src$core$events$events=VAR_RENAME$$module$build$src$core$events$utils,VIEWPORT_CHANGE$$module$build$src$core$events$events= +VIEWPORT_CHANGE$$module$build$src$core$events$utils,clearPendingUndo$$module$build$src$core$events$events=clearPendingUndo$$module$build$src$core$events$utils,disable$$module$build$src$core$events$events=$.disable$$module$build$src$core$events$utils,enable$$module$build$src$core$events$events=$.enable$$module$build$src$core$events$utils,filter$$module$build$src$core$events$events=filter$$module$build$src$core$events$utils,fire$$module$build$src$core$events$events=fire$$module$build$src$core$events$utils, +fromJson$$module$build$src$core$events$events=fromJson$$module$build$src$core$events$utils,getDescendantIds$$module$build$src$core$events$events=getDescendantIds$$module$build$src$core$events$utils,get$$module$build$src$core$events$events=get$$module$build$src$core$events$utils,getGroup$$module$build$src$core$events$events=$.getGroup$$module$build$src$core$events$utils,getRecordUndo$$module$build$src$core$events$events=getRecordUndo$$module$build$src$core$events$utils,isEnabled$$module$build$src$core$events$events= +isEnabled$$module$build$src$core$events$utils,setGroup$$module$build$src$core$events$events=$.setGroup$$module$build$src$core$events$utils,setRecordUndo$$module$build$src$core$events$events=setRecordUndo$$module$build$src$core$events$utils,disableOrphans$$module$build$src$core$events$events=disableOrphans$$module$build$src$core$events$utils,module$build$src$core$events$events={};module$build$src$core$events$events.Abstract=Abstract$$module$build$src$core$events$events_abstract; +module$build$src$core$events$events.BLOCK_CHANGE=$.CHANGE$$module$build$src$core$events$utils;module$build$src$core$events$events.BLOCK_CREATE=$.CREATE$$module$build$src$core$events$utils;module$build$src$core$events$events.BLOCK_DELETE=$.DELETE$$module$build$src$core$events$utils;module$build$src$core$events$events.BLOCK_DRAG=BLOCK_DRAG$$module$build$src$core$events$utils;module$build$src$core$events$events.BLOCK_FIELD_INTERMEDIATE_CHANGE=BLOCK_FIELD_INTERMEDIATE_CHANGE$$module$build$src$core$events$utils; +module$build$src$core$events$events.BLOCK_MOVE=$.MOVE$$module$build$src$core$events$utils;module$build$src$core$events$events.BUBBLE_OPEN=BUBBLE_OPEN$$module$build$src$core$events$utils;module$build$src$core$events$events.BUMP_EVENTS=BUMP_EVENTS$$module$build$src$core$events$utils;module$build$src$core$events$events.BlockBase=BlockBase$$module$build$src$core$events$events_block_base;module$build$src$core$events$events.BlockChange=BlockChange$$module$build$src$core$events$events_block_change; +module$build$src$core$events$events.BlockCreate=BlockCreate$$module$build$src$core$events$events_block_create;module$build$src$core$events$events.BlockDelete=BlockDelete$$module$build$src$core$events$events_block_delete;module$build$src$core$events$events.BlockDrag=BlockDrag$$module$build$src$core$events$events_block_drag;module$build$src$core$events$events.BlockFieldIntermediateChange=BlockFieldIntermediateChange$$module$build$src$core$events$events_block_field_intermediate_change; +module$build$src$core$events$events.BlockMove=BlockMove$$module$build$src$core$events$events_block_move;module$build$src$core$events$events.BubbleOpen=BubbleOpen$$module$build$src$core$events$events_bubble_open;module$build$src$core$events$events.BubbleType=BubbleType$$module$build$src$core$events$events_bubble_open;module$build$src$core$events$events.CHANGE=$.CHANGE$$module$build$src$core$events$utils;module$build$src$core$events$events.CLICK=CLICK$$module$build$src$core$events$utils; +module$build$src$core$events$events.COMMENT_CHANGE=COMMENT_CHANGE$$module$build$src$core$events$utils;module$build$src$core$events$events.COMMENT_CREATE=COMMENT_CREATE$$module$build$src$core$events$utils;module$build$src$core$events$events.COMMENT_DELETE=COMMENT_DELETE$$module$build$src$core$events$utils;module$build$src$core$events$events.COMMENT_MOVE=COMMENT_MOVE$$module$build$src$core$events$utils;module$build$src$core$events$events.CREATE=$.CREATE$$module$build$src$core$events$utils; +module$build$src$core$events$events.Click=Click$$module$build$src$core$events$events_click;module$build$src$core$events$events.ClickTarget=ClickTarget$$module$build$src$core$events$events_click;module$build$src$core$events$events.CommentBase=CommentBase$$module$build$src$core$events$events_comment_base;module$build$src$core$events$events.CommentChange=CommentChange$$module$build$src$core$events$events_comment_change;module$build$src$core$events$events.CommentCreate=CommentCreate$$module$build$src$core$events$events_comment_create; +module$build$src$core$events$events.CommentDelete=CommentDelete$$module$build$src$core$events$events_comment_delete;module$build$src$core$events$events.CommentMove=CommentMove$$module$build$src$core$events$events_comment_move;module$build$src$core$events$events.DELETE=$.DELETE$$module$build$src$core$events$utils;module$build$src$core$events$events.FINISHED_LOADING=FINISHED_LOADING$$module$build$src$core$events$utils;module$build$src$core$events$events.FinishedLoading=FinishedLoading$$module$build$src$core$events$workspace_events; +module$build$src$core$events$events.MARKER_MOVE=MARKER_MOVE$$module$build$src$core$events$utils;module$build$src$core$events$events.MOVE=$.MOVE$$module$build$src$core$events$utils;module$build$src$core$events$events.MarkerMove=MarkerMove$$module$build$src$core$events$events_marker_move;module$build$src$core$events$events.SELECTED=SELECTED$$module$build$src$core$events$utils;module$build$src$core$events$events.Selected=Selected$$module$build$src$core$events$events_selected; +module$build$src$core$events$events.THEME_CHANGE=THEME_CHANGE$$module$build$src$core$events$utils;module$build$src$core$events$events.TOOLBOX_ITEM_SELECT=TOOLBOX_ITEM_SELECT$$module$build$src$core$events$utils;module$build$src$core$events$events.TRASHCAN_OPEN=TRASHCAN_OPEN$$module$build$src$core$events$utils;module$build$src$core$events$events.ThemeChange=ThemeChange$$module$build$src$core$events$events_theme_change;module$build$src$core$events$events.ToolboxItemSelect=ToolboxItemSelect$$module$build$src$core$events$events_toolbox_item_select; +module$build$src$core$events$events.TrashcanOpen=TrashcanOpen$$module$build$src$core$events$events_trashcan_open;module$build$src$core$events$events.UI=UI$$module$build$src$core$events$utils;module$build$src$core$events$events.UiBase=UiBase$$module$build$src$core$events$events_ui_base;module$build$src$core$events$events.VAR_CREATE=VAR_CREATE$$module$build$src$core$events$utils;module$build$src$core$events$events.VAR_DELETE=VAR_DELETE$$module$build$src$core$events$utils; +module$build$src$core$events$events.VAR_RENAME=VAR_RENAME$$module$build$src$core$events$utils;module$build$src$core$events$events.VIEWPORT_CHANGE=VIEWPORT_CHANGE$$module$build$src$core$events$utils;module$build$src$core$events$events.VarBase=VarBase$$module$build$src$core$events$events_var_base;module$build$src$core$events$events.VarCreate=VarCreate$$module$build$src$core$events$events_var_create;module$build$src$core$events$events.VarDelete=VarDelete$$module$build$src$core$events$events_var_delete; +module$build$src$core$events$events.VarRename=VarRename$$module$build$src$core$events$events_var_rename;module$build$src$core$events$events.ViewportChange=ViewportChange$$module$build$src$core$events$events_viewport;module$build$src$core$events$events.clearPendingUndo=clearPendingUndo$$module$build$src$core$events$utils;module$build$src$core$events$events.disable=$.disable$$module$build$src$core$events$utils;module$build$src$core$events$events.disableOrphans=disableOrphans$$module$build$src$core$events$utils; +module$build$src$core$events$events.enable=$.enable$$module$build$src$core$events$utils;module$build$src$core$events$events.filter=filter$$module$build$src$core$events$utils;module$build$src$core$events$events.fire=fire$$module$build$src$core$events$utils;module$build$src$core$events$events.fromJson=fromJson$$module$build$src$core$events$utils;module$build$src$core$events$events.get=get$$module$build$src$core$events$utils;module$build$src$core$events$events.getDescendantIds=getDescendantIds$$module$build$src$core$events$utils; +module$build$src$core$events$events.getGroup=$.getGroup$$module$build$src$core$events$utils;module$build$src$core$events$events.getRecordUndo=getRecordUndo$$module$build$src$core$events$utils;module$build$src$core$events$events.isEnabled=isEnabled$$module$build$src$core$events$utils;module$build$src$core$events$events.setGroup=$.setGroup$$module$build$src$core$events$utils;module$build$src$core$events$events.setRecordUndo=setRecordUndo$$module$build$src$core$events$utils;var ConstantProvider$$module$build$src$core$renderers$zelos$constants=class extends ConstantProvider$$module$build$src$core$renderers$common$constants{constructor(){super();this.GRID_UNIT=4;this.CURSOR_COLOUR="#ffa200";this.CURSOR_RADIUS=5;this.JAGGED_TEETH_WIDTH=this.JAGGED_TEETH_HEIGHT=0;this.START_HAT_HEIGHT=22;this.START_HAT_WIDTH=96;this.SHAPES={HEXAGONAL:1,ROUND:2,SQUARE:3,PUZZLE:4,NOTCH:5};this.SHAPE_IN_SHAPE_PADDING={1:{0:5*this.GRID_UNIT,1:2*this.GRID_UNIT,2:5*this.GRID_UNIT,3:5*this.GRID_UNIT}, +2:{0:3*this.GRID_UNIT,1:3*this.GRID_UNIT,2:1*this.GRID_UNIT,3:2*this.GRID_UNIT},3:{0:2*this.GRID_UNIT,1:2*this.GRID_UNIT,2:2*this.GRID_UNIT,3:2*this.GRID_UNIT}};this.FULL_BLOCK_FIELDS=!0;this.FIELD_TEXT_FONTWEIGHT="bold";this.FIELD_TEXT_FONTFAMILY='"Helvetica Neue", "Segoe UI", Helvetica, sans-serif';this.FIELD_COLOUR_FULL_BLOCK=this.FIELD_TEXTINPUT_BOX_SHADOW=this.FIELD_DROPDOWN_SVG_ARROW=this.FIELD_DROPDOWN_COLOURED_DIV=this.FIELD_DROPDOWN_NO_BORDER_RECT_SHADOW=!0;this.SELECTED_GLOW_COLOUR="#fff200"; +this.SELECTED_GLOW_SIZE=.5;this.REPLACEMENT_GLOW_COLOUR="#fff200";this.REPLACEMENT_GLOW_SIZE=2;this.selectedGlowFilterId="";this.selectedGlowFilter=null;this.replacementGlowFilterId="";this.SQUARED=this.ROUNDED=this.HEXAGONAL=this.replacementGlowFilter=null;this.SMALL_PADDING=this.GRID_UNIT;this.MEDIUM_PADDING=2*this.GRID_UNIT;this.MEDIUM_LARGE_PADDING=3*this.GRID_UNIT;this.LARGE_PADDING=4*this.GRID_UNIT;this.CORNER_RADIUS=1*this.GRID_UNIT;this.NOTCH_WIDTH=9*this.GRID_UNIT;this.NOTCH_HEIGHT=2*this.GRID_UNIT; +this.STATEMENT_INPUT_NOTCH_OFFSET=this.NOTCH_OFFSET_LEFT=3*this.GRID_UNIT;this.MIN_BLOCK_WIDTH=2*this.GRID_UNIT;this.MIN_BLOCK_HEIGHT=12*this.GRID_UNIT;this.EMPTY_STATEMENT_INPUT_HEIGHT=6*this.GRID_UNIT;this.TOP_ROW_MIN_HEIGHT=this.CORNER_RADIUS;this.TOP_ROW_PRECEDES_STATEMENT_MIN_HEIGHT=this.LARGE_PADDING;this.BOTTOM_ROW_MIN_HEIGHT=this.CORNER_RADIUS;this.BOTTOM_ROW_AFTER_STATEMENT_MIN_HEIGHT=6*this.GRID_UNIT;this.STATEMENT_BOTTOM_SPACER=-this.NOTCH_HEIGHT;this.STATEMENT_INPUT_SPACER_MIN_WIDTH=40* +this.GRID_UNIT;this.STATEMENT_INPUT_PADDING_LEFT=4*this.GRID_UNIT;this.EMPTY_INLINE_INPUT_PADDING=4*this.GRID_UNIT;this.EMPTY_INLINE_INPUT_HEIGHT=8*this.GRID_UNIT;this.DUMMY_INPUT_MIN_HEIGHT=8*this.GRID_UNIT;this.DUMMY_INPUT_SHADOW_MIN_HEIGHT=6*this.GRID_UNIT;this.CURSOR_WS_WIDTH=20*this.GRID_UNIT;this.FIELD_TEXT_FONTSIZE=3*this.GRID_UNIT;this.FIELD_BORDER_RECT_RADIUS=this.CORNER_RADIUS;this.FIELD_BORDER_RECT_X_PADDING=2*this.GRID_UNIT;this.FIELD_BORDER_RECT_Y_PADDING=1.625*this.GRID_UNIT;this.FIELD_BORDER_RECT_HEIGHT= +8*this.GRID_UNIT;this.FIELD_DROPDOWN_BORDER_RECT_HEIGHT=8*this.GRID_UNIT;this.FIELD_DROPDOWN_SVG_ARROW_PADDING=this.FIELD_BORDER_RECT_X_PADDING;this.FIELD_COLOUR_DEFAULT_WIDTH=6*this.GRID_UNIT;this.FIELD_COLOUR_DEFAULT_HEIGHT=8*this.GRID_UNIT;this.FIELD_CHECKBOX_X_OFFSET=1*this.GRID_UNIT;this.MAX_DYNAMIC_CONNECTION_SHAPE_WIDTH=12*this.GRID_UNIT}setFontConstants_(a){super.setFontConstants_(a);this.FIELD_DROPDOWN_BORDER_RECT_HEIGHT=this.FIELD_BORDER_RECT_HEIGHT=this.FIELD_TEXT_HEIGHT+2*this.FIELD_BORDER_RECT_Y_PADDING}init(){super.init(); +this.HEXAGONAL=this.makeHexagonal();this.ROUNDED=this.makeRounded();this.SQUARED=this.makeSquared();this.STATEMENT_INPUT_NOTCH_OFFSET=this.NOTCH_OFFSET_LEFT+this.INSIDE_CORNERS.rightWidth}setDynamicProperties_(a){super.setDynamicProperties_(a);this.SELECTED_GLOW_COLOUR=a.getComponentStyle("selectedGlowColour")||this.SELECTED_GLOW_COLOUR;const b=Number(a.getComponentStyle("selectedGlowSize"));this.SELECTED_GLOW_SIZE=b&&!isNaN(b)?b:this.SELECTED_GLOW_SIZE;this.REPLACEMENT_GLOW_COLOUR=a.getComponentStyle("replacementGlowColour")|| +this.REPLACEMENT_GLOW_COLOUR;this.REPLACEMENT_GLOW_SIZE=(a=Number(a.getComponentStyle("replacementGlowSize")))&&!isNaN(a)?a:this.REPLACEMENT_GLOW_SIZE}dispose(){super.dispose();this.selectedGlowFilter&&removeNode$$module$build$src$core$utils$dom(this.selectedGlowFilter);this.replacementGlowFilter&&removeNode$$module$build$src$core$utils$dom(this.replacementGlowFilter)}makeStartHat(){const a=this.START_HAT_HEIGHT,b=this.START_HAT_WIDTH,c=curve$$module$build$src$core$utils$svg_paths("c",[point$$module$build$src$core$utils$svg_paths(25, +-a),point$$module$build$src$core$utils$svg_paths(71,-a),point$$module$build$src$core$utils$svg_paths(b,0)]);return{height:a,width:b,path:c}}makeHexagonal(){function a(c,d,e){var f=c/2;f=f>b?b:f;e=e?-1:1;c=(d?-1:1)*c/2;return lineTo$$module$build$src$core$utils$svg_paths(-e*f,c)+lineTo$$module$build$src$core$utils$svg_paths(e*f,c)}const b=this.MAX_DYNAMIC_CONNECTION_SHAPE_WIDTH;return{type:this.SHAPES.HEXAGONAL,isDynamic:!0,width(c){c/=2;return c>b?b:c},height(c){return c},connectionOffsetY(c){return c/ +2},connectionOffsetX(c){return-c},pathDown(c){return a(c,!1,!1)},pathUp(c){return a(c,!0,!1)},pathRightDown(c){return a(c,!1,!0)},pathRightUp(c){return a(c,!1,!0)}}}makeRounded(){function a(d,e,f){const g=d>c?d-c:0;d=(d>c?c:d)/2;return arc$$module$build$src$core$utils$svg_paths("a","0 0,1",d,point$$module$build$src$core$utils$svg_paths((e?-1:1)*d,(e?-1:1)*d))+lineOnAxis$$module$build$src$core$utils$svg_paths("v",(f?1:-1)*g)+arc$$module$build$src$core$utils$svg_paths("a","0 0,1",d,point$$module$build$src$core$utils$svg_paths((e? +1:-1)*d,(e?-1:1)*d))}const b=this.MAX_DYNAMIC_CONNECTION_SHAPE_WIDTH,c=2*b;return{type:this.SHAPES.ROUND,isDynamic:!0,width(d){d/=2;return d>b?b:d},height(d){return d},connectionOffsetY(d){return d/2},connectionOffsetX(d){return-d},pathDown(d){return a(d,!1,!1)},pathUp(d){return a(d,!0,!1)},pathRightDown(d){return a(d,!1,!0)},pathRightUp(d){return a(d,!1,!0)}}}makeSquared(){function a(c,d,e){c-=2*b;return arc$$module$build$src$core$utils$svg_paths("a","0 0,1",b,point$$module$build$src$core$utils$svg_paths((d? +-1:1)*b,(d?-1:1)*b))+lineOnAxis$$module$build$src$core$utils$svg_paths("v",(e?1:-1)*c)+arc$$module$build$src$core$utils$svg_paths("a","0 0,1",b,point$$module$build$src$core$utils$svg_paths((d?1:-1)*b,(d?-1:1)*b))}const b=this.CORNER_RADIUS;return{type:this.SHAPES.SQUARE,isDynamic:!0,width(c){return b},height(c){return c},connectionOffsetY(c){return c/2},connectionOffsetX(c){return-c},pathDown(c){return a(c,!1,!1)},pathUp(c){return a(c,!0,!1)},pathRightDown(c){return a(c,!1,!0)},pathRightUp(c){return a(c, +!1,!0)}}}shapeFor(a){let b=a.getCheck();!b&&a.targetConnection&&(b=a.targetConnection.getCheck());switch(a.type){case ConnectionType$$module$build$src$core$connection_type.INPUT_VALUE:case ConnectionType$$module$build$src$core$connection_type.OUTPUT_VALUE:a=a.getSourceBlock().getOutputShape();if(null!==a)switch(a){case this.SHAPES.HEXAGONAL:return this.HEXAGONAL;case this.SHAPES.ROUND:return this.ROUNDED;case this.SHAPES.SQUARE:return this.SQUARED}if(b&&-1!==b.indexOf("Boolean"))return this.HEXAGONAL; +if(b&&-1!==b.indexOf("Number"))return this.ROUNDED;b&&b.indexOf("String");return this.ROUNDED;case ConnectionType$$module$build$src$core$connection_type.PREVIOUS_STATEMENT:case ConnectionType$$module$build$src$core$connection_type.NEXT_STATEMENT:return this.NOTCH;default:throw Error("Unknown type");}}makeNotch(){function a(l){return curve$$module$build$src$core$utils$svg_paths("c",[point$$module$build$src$core$utils$svg_paths(l*e/2,0),point$$module$build$src$core$utils$svg_paths(l*e*3/4,g/2),point$$module$build$src$core$utils$svg_paths(l* +e,g)])+line$$module$build$src$core$utils$svg_paths([point$$module$build$src$core$utils$svg_paths(l*e,f)])+curve$$module$build$src$core$utils$svg_paths("c",[point$$module$build$src$core$utils$svg_paths(l*e/4,g/2),point$$module$build$src$core$utils$svg_paths(l*e/2,g),point$$module$build$src$core$utils$svg_paths(l*e,g)])+lineOnAxis$$module$build$src$core$utils$svg_paths("h",l*d)+curve$$module$build$src$core$utils$svg_paths("c",[point$$module$build$src$core$utils$svg_paths(l*e/2,0),point$$module$build$src$core$utils$svg_paths(l* +e*3/4,-(g/2)),point$$module$build$src$core$utils$svg_paths(l*e,-g)])+line$$module$build$src$core$utils$svg_paths([point$$module$build$src$core$utils$svg_paths(l*e,-f)])+curve$$module$build$src$core$utils$svg_paths("c",[point$$module$build$src$core$utils$svg_paths(l*e/4,-(g/2)),point$$module$build$src$core$utils$svg_paths(l*e/2,-g),point$$module$build$src$core$utils$svg_paths(l*e,-g)])}const b=this.NOTCH_WIDTH,c=this.NOTCH_HEIGHT,d=b/3,e=d/3,f=c/2,g=f/2,h=a(1),k=a(-1);return{type:this.SHAPES.NOTCH, +width:b,height:c,pathLeft:h,pathRight:k}}makeInsideCorners(){const a=this.CORNER_RADIUS,b=arc$$module$build$src$core$utils$svg_paths("a","0 0,0",a,point$$module$build$src$core$utils$svg_paths(-a,a)),c=arc$$module$build$src$core$utils$svg_paths("a","0 0,1",a,point$$module$build$src$core$utils$svg_paths(-a,a)),d=arc$$module$build$src$core$utils$svg_paths("a","0 0,0",a,point$$module$build$src$core$utils$svg_paths(a,a)),e=arc$$module$build$src$core$utils$svg_paths("a","0 0,1",a,point$$module$build$src$core$utils$svg_paths(a, +a));return{width:a,height:a,pathTop:b,pathBottom:d,rightWidth:a,rightHeight:a,pathTopRight:c,pathBottomRight:e}}generateSecondaryColour_(a){return blend$$module$build$src$core$utils$colour("#000",a,.15)||a}generateTertiaryColour_(a){return blend$$module$build$src$core$utils$colour("#000",a,.25)||a}createDom(a,b,c){super.createDom(a,b,c);a=createSvgElement$$module$build$src$core$utils$dom(Svg$$module$build$src$core$utils$svg.DEFS,{},a);b=createSvgElement$$module$build$src$core$utils$dom(Svg$$module$build$src$core$utils$svg.FILTER, +{id:"blocklySelectedGlowFilter"+this.randomIdentifier,height:"160%",width:"180%",y:"-30%",x:"-40%"},a);createSvgElement$$module$build$src$core$utils$dom(Svg$$module$build$src$core$utils$svg.FEGAUSSIANBLUR,{"in":"SourceGraphic",stdDeviation:this.SELECTED_GLOW_SIZE},b);c=createSvgElement$$module$build$src$core$utils$dom(Svg$$module$build$src$core$utils$svg.FECOMPONENTTRANSFER,{result:"outBlur"},b);createSvgElement$$module$build$src$core$utils$dom(Svg$$module$build$src$core$utils$svg.FEFUNCA,{type:"table", +tableValues:"0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1"},c);createSvgElement$$module$build$src$core$utils$dom(Svg$$module$build$src$core$utils$svg.FEFLOOD,{"flood-color":this.SELECTED_GLOW_COLOUR,"flood-opacity":1,result:"outColor"},b);createSvgElement$$module$build$src$core$utils$dom(Svg$$module$build$src$core$utils$svg.FECOMPOSITE,{"in":"outColor",in2:"outBlur",operator:"in",result:"outGlow"},b);this.selectedGlowFilterId=b.id;this.selectedGlowFilter=b;a=createSvgElement$$module$build$src$core$utils$dom(Svg$$module$build$src$core$utils$svg.FILTER, +{id:"blocklyReplacementGlowFilter"+this.randomIdentifier,height:"160%",width:"180%",y:"-30%",x:"-40%"},a);createSvgElement$$module$build$src$core$utils$dom(Svg$$module$build$src$core$utils$svg.FEGAUSSIANBLUR,{"in":"SourceGraphic",stdDeviation:this.REPLACEMENT_GLOW_SIZE},a);b=createSvgElement$$module$build$src$core$utils$dom(Svg$$module$build$src$core$utils$svg.FECOMPONENTTRANSFER,{result:"outBlur"},a);createSvgElement$$module$build$src$core$utils$dom(Svg$$module$build$src$core$utils$svg.FEFUNCA,{type:"table", +tableValues:"0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1"},b);createSvgElement$$module$build$src$core$utils$dom(Svg$$module$build$src$core$utils$svg.FEFLOOD,{"flood-color":this.REPLACEMENT_GLOW_COLOUR,"flood-opacity":1,result:"outColor"},a);createSvgElement$$module$build$src$core$utils$dom(Svg$$module$build$src$core$utils$svg.FECOMPOSITE,{"in":"outColor",in2:"outBlur",operator:"in",result:"outGlow"},a);createSvgElement$$module$build$src$core$utils$dom(Svg$$module$build$src$core$utils$svg.FECOMPOSITE,{"in":"SourceGraphic", +in2:"outGlow",operator:"over"},a);this.replacementGlowFilterId=a.id;this.replacementGlowFilter=a}getCSS_(a){return[`${a} .blocklyText,`,`${a} .blocklyFlyoutLabelText {`,`font: ${this.FIELD_TEXT_FONTWEIGHT} ${this.FIELD_TEXT_FONTSIZE}`+`pt ${this.FIELD_TEXT_FONTFAMILY};`,"}",`${a} .blocklyText {`,"fill: #fff;","}",`${a} .blocklyNonEditableText>rect:not(.blocklyDropdownRect),`,`${a} .blocklyEditableText>rect:not(.blocklyDropdownRect) {`,`fill: ${this.FIELD_BORDER_RECT_COLOUR};`,"}",`${a} .blocklyNonEditableText>text,`, +`${a} .blocklyEditableText>text,`,`${a} .blocklyNonEditableText>g>text,`,`${a} .blocklyEditableText>g>text {`,"fill: #575E75;","}",`${a} .blocklyFlyoutLabelText {`,"fill: #575E75;","}",`${a} .blocklyText.blocklyBubbleText {`,"fill: #575E75;","}",`${a} .blocklyDraggable:not(.blocklyDisabled)`," .blocklyEditableText:not(.editing):hover>rect,",`${a} .blocklyDraggable:not(.blocklyDisabled)`," .blocklyEditableText:not(.editing):hover>.blocklyPath {","stroke: #fff;","stroke-width: 2;","}",`${a} .blocklyHtmlInput {`, +`font-family: ${this.FIELD_TEXT_FONTFAMILY};`,`font-weight: ${this.FIELD_TEXT_FONTWEIGHT};`,"color: #575E75;","}",`${a} .blocklyDropdownText {`,"fill: #fff !important;","}",`${a}.blocklyWidgetDiv .goog-menuitem,`,`${a}.blocklyDropDownDiv .goog-menuitem {`,`font-family: ${this.FIELD_TEXT_FONTFAMILY};`,"}",`${a}.blocklyDropDownDiv .goog-menuitem-content {`,"color: #fff;","}",`${a} .blocklyHighlightedConnectionPath {`,`stroke: ${this.SELECTED_GLOW_COLOUR};`,"}",`${a} .blocklyDisabled > .blocklyOutlinePath {`, +`fill: url(#blocklyDisabledPattern${this.randomIdentifier})`,"}",`${a} .blocklyInsertionMarker>.blocklyPath {`,`fill-opacity: ${this.INSERTION_MARKER_OPACITY};`,"stroke: none;","}"]}},module$build$src$core$renderers$zelos$constants={};module$build$src$core$renderers$zelos$constants.ConstantProvider=ConstantProvider$$module$build$src$core$renderers$zelos$constants;var Drawer$$module$build$src$core$renderers$zelos$drawer=class extends Drawer$$module$build$src$core$renderers$common$drawer{constructor(a,b){super(a,b)}draw(){const a=this.block_.pathObject;a.beginDrawing();this.drawOutline_();this.drawInternals_();a.setPath(this.outlinePath_+"\n"+this.inlinePath_);this.info_.RTL&&a.flipRTL();this.recordSizeOnBlock_();this.info_.outputConnection&&(a.outputShapeType=this.info_.outputConnection.shape.type);a.endDrawing()}drawOutline_(){this.info_.outputConnection&& +this.info_.outputConnection.isDynamicShape&&!this.info_.hasStatementInput&&!this.info_.bottomRow.hasNextConnection?(this.drawFlatTop_(),this.drawRightDynamicConnection_(),this.drawFlatBottom_(),this.drawLeftDynamicConnection_()):super.drawOutline_()}drawLeft_(){this.info_.outputConnection&&this.info_.outputConnection.isDynamicShape?this.drawLeftDynamicConnection_():super.drawLeft_()}drawRightSideRow_(a){if(!(0>=a.height)){if(Types$$module$build$src$core$renderers$measurables$types.isSpacer(a)){const d= +a.precedesStatement;var b=a.followsStatement;if(d||b){const e=this.constants_.INSIDE_CORNERS;var c=e.rightHeight;c=a.height-(d?c:0);b=b?e.pathBottomRight:"";a=0=c||0>=b)throw Error("Height and width values of an image field must be greater than 0.");this.size_=new Size$$module$build$src$core$utils$size(b,c+FieldImage$$module$build$src$core$field_image.Y_PADDING);this.imageHeight=c;"function"===typeof e&&(this.clickHandler=e);a!==Field$$module$build$src$core$field.SKIP_SETUP&&(g?this.configure_(g):(this.flipRtl=!!f,this.altText=replaceMessageReferences$$module$build$src$core$utils$parsing(d)||""),this.setValue(replaceMessageReferences$$module$build$src$core$utils$parsing(a)))}configure_(a){super.configure_(a); +a.flipRtl&&(this.flipRtl=a.flipRtl);a.alt&&(this.altText=replaceMessageReferences$$module$build$src$core$utils$parsing(a.alt))}initView(){this.imageElement=createSvgElement$$module$build$src$core$utils$dom(Svg$$module$build$src$core$utils$svg.IMAGE,{height:this.imageHeight+"px",width:this.size_.width+"px",alt:this.altText},this.fieldGroup_);this.imageElement.setAttributeNS(XLINK_NS$$module$build$src$core$utils$dom,"xlink:href",this.value_);this.clickHandler&&(this.imageElement.style.cursor="pointer")}updateSize_(){}doClassValidation_(a){return"string"!== +typeof a?null:a}doValueUpdate_(a){this.value_=a;this.imageElement&&this.imageElement.setAttributeNS(XLINK_NS$$module$build$src$core$utils$dom,"xlink:href",this.value_)}getFlipRtl(){return this.flipRtl}setAlt(a){a!==this.altText&&(this.altText=a||"",this.imageElement&&this.imageElement.setAttribute("alt",this.altText))}showEditor_(){this.clickHandler&&this.clickHandler(this)}setOnClickHandler(a){this.clickHandler=a}getText_(){return this.altText}static fromJson(a){if(!a.src||!a.width||!a.height)throw Error("src, width, and height values for an image field arerequired. The width and height must be non-zero."); +return new this(a.src,a.width,a.height,void 0,void 0,void 0,a)}};FieldImage$$module$build$src$core$field_image.Y_PADDING=1;register$$module$build$src$core$field_registry("field_image",FieldImage$$module$build$src$core$field_image);FieldImage$$module$build$src$core$field_image.prototype.DEFAULT_VALUE="";var module$build$src$core$field_image={};module$build$src$core$field_image.FieldImage=FieldImage$$module$build$src$core$field_image;var FieldInput$$module$build$src$core$field_input=class extends Field$$module$build$src$core$field{constructor(a,b,c){super(Field$$module$build$src$core$field.SKIP_SETUP);this.spellcheck_=!0;this.htmlInput_=null;this.isTextValid_=this.isBeingEdited_=!1;this.onKeyInputWrapper_=this.onKeyDownWrapper_=this.valueWhenEditorWasOpened_=null;this.fullBlockClickTarget_=!1;this.workspace_=null;this.SERIALIZABLE=!0;this.CURSOR="text";a!==Field$$module$build$src$core$field.SKIP_SETUP&&(c&&this.configure_(c), +this.setValue(a),b&&this.setValidator(b))}configure_(a){super.configure_(a);void 0!==a.spellcheck&&(this.spellcheck_=a.spellcheck)}initView(){if(!this.getSourceBlock())throw new UnattachedFieldError$$module$build$src$core$field;super.initView();this.isFullBlockField()&&(this.clickTarget_=this.sourceBlock_.getSvgRoot())}isFullBlockField(){const a=this.getSourceBlock();if(!a)throw new UnattachedFieldError$$module$build$src$core$field;let b;return this.fullBlockClickTarget_=!(null==(b=this.getConstants())|| +!b.FULL_BLOCK_FIELDS)&&a.isSimpleReporter()}doValueInvalid_(a){this.isBeingEdited_&&(this.isDirty_=!0,this.isTextValid_=!1,a=this.value_,this.value_=this.htmlInput_.getAttribute("data-untyped-default-value"),this.sourceBlock_&&isEnabled$$module$build$src$core$events$utils()&&fire$$module$build$src$core$events$utils(new (get$$module$build$src$core$events$utils($.CHANGE$$module$build$src$core$events$utils))(this.sourceBlock_,"field",this.name||null,a,this.value_)))}doValueUpdate_(a){this.isTextValid_= +this.isDirty_=!0;this.value_=a}applyColour(){const a=this.getSourceBlock();if(!a)throw new UnattachedFieldError$$module$build$src$core$field;this.getConstants().FULL_BLOCK_FIELDS&&this.fieldGroup_&&(!this.isFullBlockField()&&this.borderRect_?(this.borderRect_.style.display="block",this.borderRect_.setAttribute("stroke",a.style.colourTertiary)):(this.borderRect_.style.display="none",a.pathObject.svgPath.setAttribute("fill",this.getConstants().FIELD_BORDER_RECT_COLOUR)))}getSize(){let a;if(null==(a= +this.getConstants())?0:a.FULL_BLOCK_FIELDS)this.render_(),this.isDirty_=!1;return super.getSize()}render_(){super.render_();if(this.isBeingEdited_){this.resizeEditor_();var a=this.htmlInput_;this.isTextValid_?(removeClass$$module$build$src$core$utils$dom(a,"blocklyInvalidInput"),setState$$module$build$src$core$utils$aria(a,State$$module$build$src$core$utils$aria.INVALID,!1)):(addClass$$module$build$src$core$utils$dom(a,"blocklyInvalidInput"),setState$$module$build$src$core$utils$aria(a,State$$module$build$src$core$utils$aria.INVALID, +!0))}a=this.getSourceBlock();if(!a)throw new UnattachedFieldError$$module$build$src$core$field;this.getConstants().FULL_BLOCK_FIELDS&&a.applyColour()}setSpellcheck(a){a!==this.spellcheck_&&(this.spellcheck_=a,this.htmlInput_&&this.htmlInput_.setAttribute("spellcheck",this.spellcheck_))}showEditor_(a,b=!1){this.workspace_=this.sourceBlock_.workspace;!b&&this.workspace_.options.modalInputs&&(MOBILE$$module$build$src$core$utils$useragent||ANDROID$$module$build$src$core$utils$useragent||IPAD$$module$build$src$core$utils$useragent)? +this.showPromptEditor_():this.showInlineEditor_(b)}showPromptEditor_(){prompt$$module$build$src$core$dialog($.Msg$$module$build$src$core$msg.CHANGE_VALUE_TITLE,this.getText(),a=>{null!==a&&this.setValue(this.getValueFromEditorText_(a));this.onFinishEditing_(this.value_)})}showInlineEditor_(a){const b=this.getSourceBlock();if(!b)throw new UnattachedFieldError$$module$build$src$core$field;show$$module$build$src$core$widgetdiv(this,b.RTL,this.widgetDispose_.bind(this));this.htmlInput_=this.widgetCreate_(); +this.isBeingEdited_=!0;this.valueWhenEditorWasOpened_=this.value_;a||(this.htmlInput_.focus({preventScroll:!0}),this.htmlInput_.select())}widgetCreate_(){var a=this.getSourceBlock();if(!a)throw new UnattachedFieldError$$module$build$src$core$field;$.setGroup$$module$build$src$core$events$utils(!0);const b=getDiv$$module$build$src$core$widgetdiv();var c=this.getClickTarget_();if(!c)throw Error("A click target has not been set.");addClass$$module$build$src$core$utils$dom(c,"editing");c=document.createElement("input"); +c.className="blocklyHtmlInput";c.setAttribute("spellcheck",this.spellcheck_);const d=this.workspace_.getScale();var e=this.getConstants().FIELD_TEXT_FONTSIZE*d+"pt";b.style.fontSize=e;c.style.fontSize=e;e=FieldInput$$module$build$src$core$field_input.BORDERRADIUS*d+"px";this.isFullBlockField()&&(e=this.getScaledBBox(),e=(e.bottom-e.top)/2+"px",a=a.getParent()?a.getParent().style.colourTertiary:this.sourceBlock_.style.colourTertiary,c.style.border=1*d+"px solid "+a,b.style.borderRadius=e,b.style.transition= +"box-shadow 0.25s ease 0s",this.getConstants().FIELD_TEXTINPUT_BOX_SHADOW&&(b.style.boxShadow="rgba(255, 255, 255, 0.3) 0 0 0 "+4*d+"px"));c.style.borderRadius=e;b.appendChild(c);c.value=c.defaultValue=this.getEditorText_(this.value_);c.setAttribute("data-untyped-default-value",String(this.value_));this.resizeEditor_();this.bindInputEvents_(c);return c}widgetDispose_(){this.isBeingEdited_=!1;this.isTextValid_=!0;this.forceRerender();this.onFinishEditing_(this.value_);this.sourceBlock_&&isEnabled$$module$build$src$core$events$utils()&& +null!==this.valueWhenEditorWasOpened_&&this.valueWhenEditorWasOpened_!==this.value_&&(fire$$module$build$src$core$events$utils(new (get$$module$build$src$core$events$utils($.CHANGE$$module$build$src$core$events$utils))(this.sourceBlock_,"field",this.name||null,this.valueWhenEditorWasOpened_,this.value_)),this.valueWhenEditorWasOpened_=null);$.setGroup$$module$build$src$core$events$utils(!1);this.unbindInputEvents_();var a=getDiv$$module$build$src$core$widgetdiv().style;a.width="auto";a.height="auto"; +a.fontSize="";a.transition="";a.boxShadow="";this.htmlInput_=null;a=this.getClickTarget_();if(!a)throw Error("A click target has not been set.");removeClass$$module$build$src$core$utils$dom(a,"editing")}onFinishEditing_(a){}bindInputEvents_(a){this.onKeyDownWrapper_=conditionalBind$$module$build$src$core$browser_events(a,"keydown",this,this.onHtmlInputKeyDown_);this.onKeyInputWrapper_=conditionalBind$$module$build$src$core$browser_events(a,"input",this,this.onHtmlInputChange_)}unbindInputEvents_(){this.onKeyDownWrapper_&& +(unbind$$module$build$src$core$browser_events(this.onKeyDownWrapper_),this.onKeyDownWrapper_=null);this.onKeyInputWrapper_&&(unbind$$module$build$src$core$browser_events(this.onKeyInputWrapper_),this.onKeyInputWrapper_=null)}onHtmlInputKeyDown_(a){"Enter"===a.key?(hide$$module$build$src$core$widgetdiv(),hideWithoutAnimation$$module$build$src$core$dropdowndiv()):"Escape"===a.key?(this.setValue(this.htmlInput_.getAttribute("data-untyped-default-value")),hide$$module$build$src$core$widgetdiv(),hideWithoutAnimation$$module$build$src$core$dropdowndiv()): +"Tab"===a.key&&(hide$$module$build$src$core$widgetdiv(),hideWithoutAnimation$$module$build$src$core$dropdowndiv(),this.sourceBlock_.tab(this,!a.shiftKey),a.preventDefault())}onHtmlInputChange_(a){a=this.value_;this.setValue(this.getValueFromEditorText_(this.htmlInput_.value),!1);this.sourceBlock_&&isEnabled$$module$build$src$core$events$utils()&&this.value_!==a&&fire$$module$build$src$core$events$utils(new (get$$module$build$src$core$events$utils(BLOCK_FIELD_INTERMEDIATE_CHANGE$$module$build$src$core$events$utils))(this.sourceBlock_, +this.name||null,a,this.value_));finishQueuedRenders$$module$build$src$core$render_management().then(()=>{this.resizeEditor_()})}setEditorValue_(a,b=!0){this.isDirty_=!0;this.isBeingEdited_&&(this.htmlInput_.value=this.getEditorText_(a));this.setValue(a,b)}resizeEditor_(){var a=this.getSourceBlock();if(!a)throw new UnattachedFieldError$$module$build$src$core$field;const b=getDiv$$module$build$src$core$widgetdiv(),c=this.getScaledBBox();b.style.width=c.right-c.left+"px";b.style.height=c.bottom-c.top+ +"px";a=new Coordinate$$module$build$src$core$utils$coordinate(a.RTL?c.right-b.offsetWidth:c.left,c.top);b.style.left=a.x+"px";b.style.top=a.y+"px"}repositionForWindowResize(){const a=this.getSourceBlock();if(!(a instanceof BlockSvg$$module$build$src$core$block_svg))return!1;bumpObjectIntoBounds$$module$build$src$core$bump_objects(this.workspace_,this.workspace_.getMetricsManager().getViewMetrics(!0),a);this.resizeEditor_();return!0}isTabNavigable(){return!0}getText_(){return this.isBeingEdited_&& +this.htmlInput_?this.htmlInput_.value:null}getEditorText_(a){return`${a}`}getValueFromEditorText_(a){return a}};FieldInput$$module$build$src$core$field_input.BORDERRADIUS=4;var module$build$src$core$field_input={};module$build$src$core$field_input.FieldInput=FieldInput$$module$build$src$core$field_input;var FieldTextInput$$module$build$src$core$field_textinput=class extends FieldInput$$module$build$src$core$field_input{constructor(a,b,c){super(a,b,c)}doClassValidation_(a){return void 0===a?null:`${a}`}static fromJson(a){return new this(replaceMessageReferences$$module$build$src$core$utils$parsing(a.text),void 0,a)}};register$$module$build$src$core$field_registry("field_input",FieldTextInput$$module$build$src$core$field_textinput); +FieldTextInput$$module$build$src$core$field_textinput.prototype.DEFAULT_VALUE="";var module$build$src$core$field_textinput={};module$build$src$core$field_textinput.FieldTextInput=FieldTextInput$$module$build$src$core$field_textinput;var BottomRow$$module$build$src$core$renderers$zelos$measurables$bottom_row=class extends BottomRow$$module$build$src$core$renderers$measurables$bottom_row{constructor(a){super(a)}endsWithElemSpacer(){return!1}hasLeftSquareCorner(a){return!!a.outputConnection}hasRightSquareCorner(a){return!!a.outputConnection&&!a.statementInputCount&&!a.nextConnection}},module$build$src$core$renderers$zelos$measurables$bottom_row={};module$build$src$core$renderers$zelos$measurables$bottom_row.BottomRow=BottomRow$$module$build$src$core$renderers$zelos$measurables$bottom_row;var StatementInput$$module$build$src$core$renderers$zelos$measurables$inputs=class extends StatementInput$$module$build$src$core$renderers$measurables$statement_input{constructor(a,b){super(a,b);this.connectedBottomNextConnection=!1;if(this.connectedBlock){for(a=this.connectedBlock;b=a.getNextBlock();)a=b;a.nextConnection||(this.height=this.connectedBlockHeight,this.connectedBottomNextConnection=!0)}}},module$build$src$core$renderers$zelos$measurables$inputs={}; +module$build$src$core$renderers$zelos$measurables$inputs.StatementInput=StatementInput$$module$build$src$core$renderers$zelos$measurables$inputs;var RightConnectionShape$$module$build$src$core$renderers$zelos$measurables$row_elements=class extends Measurable$$module$build$src$core$renderers$measurables$base{constructor(a){super(a);this.width=this.height=0;this.type|=Types$$module$build$src$core$renderers$measurables$types.getType("RIGHT_CONNECTION")}},module$build$src$core$renderers$zelos$measurables$row_elements={};module$build$src$core$renderers$zelos$measurables$row_elements.RightConnectionShape=RightConnectionShape$$module$build$src$core$renderers$zelos$measurables$row_elements;var TopRow$$module$build$src$core$renderers$zelos$measurables$top_row=class extends TopRow$$module$build$src$core$renderers$measurables$top_row{constructor(a){super(a)}endsWithElemSpacer(){return!1}hasLeftSquareCorner(a){const b=(a.hat?"cap"===a.hat:this.constants_.ADD_START_HATS)&&!a.outputConnection&&!a.previousConnection;return!!a.outputConnection||b}hasRightSquareCorner(a){return!!a.outputConnection&&!a.statementInputCount&&!a.nextConnection}},module$build$src$core$renderers$zelos$measurables$top_row= +{};module$build$src$core$renderers$zelos$measurables$top_row.TopRow=TopRow$$module$build$src$core$renderers$zelos$measurables$top_row;var RenderInfo$$module$build$src$core$renderers$zelos$info=class extends RenderInfo$$module$build$src$core$renderers$common$info{constructor(a,b){super(a,b);this.isInline=!0;this.renderer_=a;this.constants_=this.renderer_.getConstants();this.topRow=new TopRow$$module$build$src$core$renderers$zelos$measurables$top_row(this.constants_);this.bottomRow=new BottomRow$$module$build$src$core$renderers$zelos$measurables$bottom_row(this.constants_);this.isMultiRow=!b.getInputsInline()||b.isCollapsed();this.hasStatementInput= +0=this.rows.length-1?!!this.bottomRow.hasNextConnection:!!d.precedesStatement;if(Types$$module$build$src$core$renderers$measurables$types.isInputRow(f)&&f.hasStatement){f.measure();let g,h;b=f.width-(null!=(h=null==(g=f.getLastInput())?void 0:g.width)?h:0)+a}else if(c&&(2===e||d)&&Types$$module$build$src$core$renderers$measurables$types.isInputRow(f)&&!f.hasStatement){d=f.xPos;c=null;for(let g= +0;gc?c:this.height/2,b-c*(1-Math.sin(Math.acos((c-this.constants_.SMALL_PADDING)/c)));default:return 0}if(Types$$module$build$src$core$renderers$measurables$types.isInlineInput(a)&&a instanceof InputConnection$$module$build$src$core$renderers$measurables$input_connection){const e=a.connectedBlock;a=e?e.pathObject.outputShapeType:a.shape.type;return null==a||e&&e.outputConnection&&(e.statementInputCount||e.nextConnection)||c===d.SHAPES.HEXAGONAL&&c!==a?0:b-this.constants_.SHAPE_IN_SHAPE_PADDING[c][a]}return Types$$module$build$src$core$renderers$measurables$types.isField(a)&& +a instanceof Field$$module$build$src$core$renderers$measurables$field?c===d.SHAPES.ROUND&&a.field instanceof FieldTextInput$$module$build$src$core$field_textinput?b-2.75*d.GRID_UNIT:b-this.constants_.SHAPE_IN_SHAPE_PADDING[c][0]:Types$$module$build$src$core$renderers$measurables$types.isIcon(a)?this.constants_.SMALL_PADDING:0}finalizeVerticalAlignment_(){if(!this.outputConnection)for(let d=2;d=this.rows.length- +1?!!this.bottomRow.hasNextConnection:!!g.precedesStatement;if(a?this.topRow.hasPreviousConnection:e.followsStatement){var c=f.elements[1];c=3===f.elements.length&&c instanceof Field$$module$build$src$core$renderers$measurables$field&&(c.field instanceof FieldLabel$$module$build$src$core$field_label||c.field instanceof FieldImage$$module$build$src$core$field_image);if(!a&&c)e.height-=this.constants_.SMALL_PADDING,g.height-=this.constants_.SMALL_PADDING,f.height-=this.constants_.MEDIUM_PADDING;else if(!a&& +!b)e.height+=this.constants_.SMALL_PADDING;else if(b){a=!1;for(b=0;bc;c+=15)createSvgElement$$module$build$src$core$utils$dom(Svg$$module$build$src$core$utils$svg.LINE,{x1:FieldAngle$$module$build$src$core$field_angle.HALF+ +FieldAngle$$module$build$src$core$field_angle.RADIUS,y1:FieldAngle$$module$build$src$core$field_angle.HALF,x2:FieldAngle$$module$build$src$core$field_angle.HALF+FieldAngle$$module$build$src$core$field_angle.RADIUS-(0===c%45?10:5),y2:FieldAngle$$module$build$src$core$field_angle.HALF,"class":"blocklyAngleMarks",transform:"rotate("+c+","+FieldAngle$$module$build$src$core$field_angle.HALF+","+FieldAngle$$module$build$src$core$field_angle.HALF+")"},a);this.boundEvents.push(conditionalBind$$module$build$src$core$browser_events(a, +"click",this,this.hide));this.boundEvents.push(conditionalBind$$module$build$src$core$browser_events(b,"pointerdown",this,this.onMouseMove_,!0));this.boundEvents.push(conditionalBind$$module$build$src$core$browser_events(b,"pointermove",this,this.onMouseMove_,!0));return a}dropdownDispose(){for(const a of this.boundEvents)unbind$$module$build$src$core$browser_events(a);this.boundEvents.length=0;this.line=this.gauge=null}hide(){hideIfOwner$$module$build$src$core$dropdowndiv(this);hide$$module$build$src$core$widgetdiv()}onMouseMove_(a){var b= +this.gauge.ownerSVGElement.getBoundingClientRect();const c=a.clientX-b.left-FieldAngle$$module$build$src$core$field_angle.HALF;a=a.clientY-b.top-FieldAngle$$module$build$src$core$field_angle.HALF;b=Math.atan(-a/c);isNaN(b)||(b=toDegrees$$module$build$src$core$utils$math(b),0>c?b+=180:0a&&(a+=360);a>this.wrap&&(a-=360);return a}static fromJson(a){return new this(a.angle,void 0,a)}}; +FieldAngle$$module$build$src$core$field_angle.HALF=50;FieldAngle$$module$build$src$core$field_angle.RADIUS=FieldAngle$$module$build$src$core$field_angle.HALF-1;FieldAngle$$module$build$src$core$field_angle.CLOCKWISE=!1;FieldAngle$$module$build$src$core$field_angle.OFFSET=0;FieldAngle$$module$build$src$core$field_angle.WRAP=360;FieldAngle$$module$build$src$core$field_angle.ROUND=15;register$$module$build$src$core$field_registry("field_angle",FieldAngle$$module$build$src$core$field_angle); +FieldAngle$$module$build$src$core$field_angle.prototype.DEFAULT_VALUE=0;register$$module$build$src$core$css("\n.blocklyAngleCircle {\n stroke: #444;\n stroke-width: 1;\n fill: #ddd;\n fill-opacity: 0.8;\n}\n\n.blocklyAngleMarks {\n stroke: #444;\n stroke-width: 1;\n}\n\n.blocklyAngleGauge {\n fill: #f88;\n fill-opacity: 0.8;\n pointer-events: none;\n}\n\n.blocklyAngleLine {\n stroke: #f00;\n stroke-width: 2;\n stroke-linecap: round;\n pointer-events: none;\n}\n");var Mode$$module$build$src$core$field_angle; +(function(a){a.COMPASS="compass";a.PROTRACTOR="protractor"})(Mode$$module$build$src$core$field_angle||(Mode$$module$build$src$core$field_angle={}));var module$build$src$core$field_angle={};module$build$src$core$field_angle.FieldAngle=FieldAngle$$module$build$src$core$field_angle;module$build$src$core$field_angle.Mode=Mode$$module$build$src$core$field_angle;var FieldCheckbox$$module$build$src$core$field_checkbox=class extends Field$$module$build$src$core$field{constructor(a,b,c){super(Field$$module$build$src$core$field.SKIP_SETUP);this.SERIALIZABLE=!0;this.CURSOR="default";this.value_=this.value_;this.checkChar=FieldCheckbox$$module$build$src$core$field_checkbox.CHECK_CHAR;a!==Field$$module$build$src$core$field.SKIP_SETUP&&(c&&this.configure_(c),this.setValue(a),b&&this.setValidator(b))}configure_(a){super.configure_(a);a.checkCharacter&&(this.checkChar= +a.checkCharacter)}saveState(){const a=this.saveLegacyState(FieldCheckbox$$module$build$src$core$field_checkbox);return null!==a?a:this.getValueBoolean()}initView(){super.initView();const a=this.getTextElement();addClass$$module$build$src$core$utils$dom(a,"blocklyCheckbox");a.style.display=this.value_?"block":"none"}render_(){this.textContent_&&(this.textContent_.nodeValue=this.getDisplayText_());this.updateSize_(this.getConstants().FIELD_CHECKBOX_X_OFFSET)}getDisplayText_(){return this.checkChar}setCheckCharacter(a){this.checkChar= +a||FieldCheckbox$$module$build$src$core$field_checkbox.CHECK_CHAR;this.forceRerender()}showEditor_(){this.setValue(!this.value_)}doClassValidation_(a){return!0===a||"TRUE"===a?"TRUE":!1===a||"FALSE"===a?"FALSE":null}doValueUpdate_(a){this.value_=this.convertValueToBool_(a);this.textElement_&&(this.textElement_.style.display=this.value_?"block":"none")}getValue(){return this.value_?"TRUE":"FALSE"}getValueBoolean(){return this.value_}getText(){return String(this.convertValueToBool_(this.value_))}convertValueToBool_(a){return"string"=== +typeof a?"TRUE"===a:!!a}static fromJson(a){return new this(a.checked,void 0,a)}};FieldCheckbox$$module$build$src$core$field_checkbox.CHECK_CHAR="\u2713";register$$module$build$src$core$field_registry("field_checkbox",FieldCheckbox$$module$build$src$core$field_checkbox);FieldCheckbox$$module$build$src$core$field_checkbox.prototype.DEFAULT_VALUE=!1;var module$build$src$core$field_checkbox={};module$build$src$core$field_checkbox.FieldCheckbox=FieldCheckbox$$module$build$src$core$field_checkbox;var FieldColour$$module$build$src$core$field_colour=class extends Field$$module$build$src$core$field{constructor(a,b,c){super(Field$$module$build$src$core$field.SKIP_SETUP);this.highlightedIndex=this.picker=null;this.boundEvents=[];this.SERIALIZABLE=!0;this.CURSOR="default";this.isDirty_=!1;this.titles=this.colours=null;this.columns=0;a!==Field$$module$build$src$core$field.SKIP_SETUP&&(c&&this.configure_(c),this.setValue(a),b&&this.setValidator(b))}configure_(a){super.configure_(a);a.colourOptions&& +(this.colours=a.colourOptions);a.colourTitles&&(this.titles=a.colourTitles);a.columns&&(this.columns=a.columns)}initView(){this.size_=new Size$$module$build$src$core$utils$size(this.getConstants().FIELD_COLOUR_DEFAULT_WIDTH,this.getConstants().FIELD_COLOUR_DEFAULT_HEIGHT);this.createBorderRect_();this.getBorderRect().style.fillOpacity="1";this.getBorderRect().setAttribute("stroke","#fff");this.isFullBlockField()&&(this.clickTarget_=this.sourceBlock_.getSvgRoot())}isFullBlockField(){const a=this.getSourceBlock(); +if(!a)throw new UnattachedFieldError$$module$build$src$core$field;const b=this.getConstants();return a.isSimpleReporter()&&!(null==b||!b.FIELD_COLOUR_FULL_BLOCK)}applyColour(){const a=this.getSourceBlock();if(!a)throw new UnattachedFieldError$$module$build$src$core$field;if(this.fieldGroup_){var b=this.borderRect_;if(!b)throw Error("The border rect has not been initialized");this.isFullBlockField()?(b.style.display="none",a.pathObject.svgPath.setAttribute("fill",this.getValue()),a.pathObject.svgPath.setAttribute("stroke", +"#fff")):(b.style.display="block",b.style.fill=this.getValue())}}getSize(){let a;if(null==(a=this.getConstants())?0:a.FIELD_COLOUR_FULL_BLOCK)this.render_(),this.isDirty_=!1;return super.getSize()}render_(){super.render_();const a=this.getSourceBlock();if(!a)throw new UnattachedFieldError$$module$build$src$core$field;a.applyColour()}updateSize_(a){var b=this.getConstants();this.isFullBlockField()?(a=2*(null!=a?a:0),b=b.FIELD_TEXT_HEIGHT):(a=b.FIELD_COLOUR_DEFAULT_WIDTH,b=b.FIELD_COLOUR_DEFAULT_HEIGHT); +this.size_.height=b;this.size_.width=a;this.positionBorderRect_()}doClassValidation_(a){return"string"!==typeof a?null:parse$$module$build$src$core$utils$colour(a)}getText(){let a=this.value_;/^#(.)\1(.)\2(.)\3$/.test(a)&&(a="#"+a[1]+a[3]+a[5]);return a}setColours(a,b){this.colours=a;b&&(this.titles=b);return this}setColumns(a){this.columns=a;return this}showEditor_(){this.dropdownCreate();getContentDiv$$module$build$src$core$dropdowndiv().appendChild(this.picker);showPositionedByField$$module$build$src$core$dropdowndiv(this, +this.dropdownDispose.bind(this));this.picker.focus({preventScroll:!0})}onClick(a){a=(a=a.target)&&a.getAttribute("data-colour");null!==a&&(this.setValue(a),hideIfOwner$$module$build$src$core$dropdowndiv(this))}onKeyDown(a){let b=!0;var c;switch(a.key){case "ArrowUp":this.moveHighlightBy(0,-1);break;case "ArrowDown":this.moveHighlightBy(0,1);break;case "ArrowLeft":this.moveHighlightBy(-1,0);break;case "ArrowRight":this.moveHighlightBy(1,0);break;case "Enter":if(c=this.getHighlighted())c=c.getAttribute("data-colour"), +null!==c&&this.setValue(c);hideWithoutAnimation$$module$build$src$core$dropdowndiv();break;default:b=!1}b&&a.stopPropagation()}moveHighlightBy(a,b){if(this.highlightedIndex){var c=this.colours||FieldColour$$module$build$src$core$field_colour.COLOURS,d=this.columns||FieldColour$$module$build$src$core$field_colour.COLUMNS,e=this.highlightedIndex%d,f=Math.floor(this.highlightedIndex/d);e+=a;f+=b;0>a?0>e&&0e&&(e=0):0d-1&&fd-1&&e--:0>b?0>f&&(f= +0):0Math.floor(c.length/d)-1&&(f=Math.floor(c.length/d)-1);this.setHighlightedCell(this.picker.childNodes[f].childNodes[e],f*d+e)}}onMouseMove(a){const b=(a=a.target)&&Number(a.getAttribute("data-index"));null!==b&&b!==this.highlightedIndex&&this.setHighlightedCell(a,b)}onMouseEnter(){let a;null==(a=this.picker)||a.focus({preventScroll:!0})}onMouseLeave(){var a;null==(a=this.picker)||a.blur();(a=this.getHighlighted())&&removeClass$$module$build$src$core$utils$dom(a,"blocklyColourHighlighted")}getHighlighted(){if(!this.highlightedIndex)return null; +const a=this.columns||FieldColour$$module$build$src$core$field_colour.COLUMNS,b=this.picker.childNodes[Math.floor(this.highlightedIndex/a)];return b?b.childNodes[this.highlightedIndex%a]:null}setHighlightedCell(a,b){const c=this.getHighlighted();c&&removeClass$$module$build$src$core$utils$dom(c,"blocklyColourHighlighted");addClass$$module$build$src$core$utils$dom(a,"blocklyColourHighlighted");this.highlightedIndex=b;(a=a.getAttribute("id"))&&this.picker&&setState$$module$build$src$core$utils$aria(this.picker, +State$$module$build$src$core$utils$aria.ACTIVEDESCENDANT,a)}dropdownCreate(){const a=this.columns||FieldColour$$module$build$src$core$field_colour.COLUMNS,b=this.colours||FieldColour$$module$build$src$core$field_colour.COLOURS,c=this.titles||FieldColour$$module$build$src$core$field_colour.TITLES,d=this.getValue(),e=document.createElement("table");e.className="blocklyColourTable";e.tabIndex=0;e.dir="ltr";setRole$$module$build$src$core$utils$aria(e,Role$$module$build$src$core$utils$aria.GRID);setState$$module$build$src$core$utils$aria(e, +State$$module$build$src$core$utils$aria.EXPANDED,!0);setState$$module$build$src$core$utils$aria(e,State$$module$build$src$core$utils$aria.ROWCOUNT,Math.floor(b.length/a));setState$$module$build$src$core$utils$aria(e,State$$module$build$src$core$utils$aria.COLCOUNT,a);let f;for(let g=0;gtr>td {\n border: 0.5px solid #888;\n box-sizing: border-box;\n cursor: pointer;\n display: inline-block;\n height: 20px;\n padding: 0;\n width: 20px;\n}\n\n.blocklyColourTable>tr>td.blocklyColourHighlighted {\n border-color: #eee;\n box-shadow: 2px 2px 7px 2px rgba(0, 0, 0, 0.3);\n position: relative;\n}\n\n.blocklyColourSelected, .blocklyColourSelected:hover {\n border-color: #eee !important;\n outline: 1px solid #333;\n position: relative;\n}\n"); +var module$build$src$core$field_colour={};module$build$src$core$field_colour.FieldColour=FieldColour$$module$build$src$core$field_colour;var FieldLabelSerializable$$module$build$src$core$field_label_serializable=class extends FieldLabel$$module$build$src$core$field_label{constructor(a,b,c){super(String(null!=a?a:""),b,c);this.EDITABLE=!1;this.SERIALIZABLE=!0}static fromJson(a){return new this(replaceMessageReferences$$module$build$src$core$utils$parsing(a.text),void 0,a)}};register$$module$build$src$core$field_registry("field_label_serializable",FieldLabelSerializable$$module$build$src$core$field_label_serializable); +var module$build$src$core$field_label_serializable={};module$build$src$core$field_label_serializable.FieldLabelSerializable=FieldLabelSerializable$$module$build$src$core$field_label_serializable;var FieldMultilineInput$$module$build$src$core$field_multilineinput=class extends FieldTextInput$$module$build$src$core$field_textinput{constructor(a,b,c){super(Field$$module$build$src$core$field.SKIP_SETUP);this.textGroup=null;this.maxLines_=Infinity;this.isOverflowedY_=!1;a!==Field$$module$build$src$core$field.SKIP_SETUP&&(c&&this.configure_(c),this.setValue(a),b&&this.setValidator(b))}configure_(a){super.configure_(a);a.maxLines&&this.setMaxLines(a.maxLines)}toXml(a){a.textContent=this.getValue().replace(/\n/g, +" ");return a}fromXml(a){this.setValue(a.textContent.replace(/ /g,"\n"))}saveState(){const a=this.saveLegacyState(FieldMultilineInput$$module$build$src$core$field_multilineinput);return null!==a?a:this.getValue()}loadState(a){this.loadLegacyState(Field$$module$build$src$core$field,a)||this.setValue(a)}initView(){this.createBorderRect_();this.textGroup=createSvgElement$$module$build$src$core$utils$dom(Svg$$module$build$src$core$utils$svg.G,{"class":"blocklyEditableText"},this.fieldGroup_)}getDisplayText_(){const a= +this.getSourceBlock();if(!a)throw new UnattachedFieldError$$module$build$src$core$field;let b=this.getText();if(!b)return Field$$module$build$src$core$field.NBSP;const c=b.split("\n");b="";const d=this.isOverflowedY_?this.maxLines_:c.length;for(let e=0;ethis.maxDisplayLength?f=f.substring(0,this.maxDisplayLength-4)+"...":this.isOverflowedY_&&e===d-1&&(f=f.substring(0,f.length-3)+"...");f=f.replace(/\s/g,Field$$module$build$src$core$field.NBSP);b+=f;e!==d-1&&(b+="\n")}a.RTL&& +(b+="\u200f");return b}doValueUpdate_(a){super.doValueUpdate_(a);null!==this.value_&&(this.isOverflowedY_=this.value_.split("\n").length>this.maxLines_)}render_(){var a=this.getSourceBlock();if(!a)throw new UnattachedFieldError$$module$build$src$core$field;for(var b,c=this.textGroup;b=c.firstChild;)c.removeChild(b);b=this.getDisplayText_().split("\n");let d=0;for(let e=0;ee&&(e=h);f+=this.getConstants().FIELD_TEXT_HEIGHT+(0this.maxDisplayLength&&(a[h]=a[h].substring(0,this.maxDisplayLength));g.textContent=a[h];const k=getFastTextWidth$$module$build$src$core$utils$dom(g,b,c,d);k>e&&(e=k)}e+=this.htmlInput_.offsetWidth-this.htmlInput_.clientWidth}this.borderRect_&&(f+=2*this.getConstants().FIELD_BORDER_RECT_Y_PADDING,e+=2*this.getConstants().FIELD_BORDER_RECT_X_PADDING,this.borderRect_.setAttribute("width",`${e}`),this.borderRect_.setAttribute("height",`${f}`));this.size_.width=e;this.size_.height= +f;this.positionBorderRect_()}showEditor_(a,b){super.showEditor_(a,b);this.forceRerender()}widgetCreate_(){const a=getDiv$$module$build$src$core$widgetdiv(),b=this.workspace_.getScale(),c=document.createElement("textarea");c.className="blocklyHtmlInput blocklyHtmlTextAreaInput";c.setAttribute("spellcheck",String(this.spellcheck_));var d=this.getConstants().FIELD_TEXT_FONTSIZE*b+"pt";a.style.fontSize=d;c.style.fontSize=d;c.style.borderRadius=FieldTextInput$$module$build$src$core$field_textinput.BORDERRADIUS* +b+"px";d=this.getConstants().FIELD_BORDER_RECT_X_PADDING*b;const e=this.getConstants().FIELD_BORDER_RECT_Y_PADDING*b/2;c.style.padding=e+"px "+d+"px "+e+"px "+d+"px";d=this.getConstants().FIELD_TEXT_HEIGHT+this.getConstants().FIELD_BORDER_RECT_Y_PADDING;c.style.lineHeight=d*b+"px";a.appendChild(c);c.value=c.defaultValue=this.getEditorText_(this.value_);c.setAttribute("data-untyped-default-value",String(this.value_));c.setAttribute("data-old-value","");GECKO$$module$build$src$core$utils$useragent? +setTimeout(this.resizeEditor_.bind(this),0):this.resizeEditor_();this.bindInputEvents_(c);return c}setMaxLines(a){"number"===typeof a&&0this.max_&&(a.max=`${this.max_}`,setState$$module$build$src$core$utils$aria(a,State$$module$build$src$core$utils$aria.VALUEMAX, +this.max_));return a}static fromJson(a){return new this(a.value,void 0,void 0,void 0,void 0,a)}};register$$module$build$src$core$field_registry("field_number",FieldNumber$$module$build$src$core$field_number);FieldNumber$$module$build$src$core$field_number.prototype.DEFAULT_VALUE=0;var module$build$src$core$field_number={};module$build$src$core$field_number.FieldNumber=FieldNumber$$module$build$src$core$field_number;var FieldVariable$$module$build$src$core$field_variable=class extends FieldDropdown$$module$build$src$core$field_dropdown{constructor(a,b,c,d,e){super(Field$$module$build$src$core$field.SKIP_SETUP);this.defaultType="";this.variableTypes=[];this.variable=null;this.SERIALIZABLE=!0;this.menuGenerator_=FieldVariable$$module$build$src$core$field_variable.dropdownCreate;this.defaultVariableName="string"===typeof a?a:"";this.size_=new Size$$module$build$src$core$utils$size(0,0);a!==Field$$module$build$src$core$field.SKIP_SETUP&& +(e?this.configure_(e):this.setTypes(c,d),b&&this.setValidator(b))}configure_(a){super.configure_(a);this.setTypes(a.variableTypes,a.defaultType)}initModel(){var a=this.getSourceBlock();if(!a)throw new UnattachedFieldError$$module$build$src$core$field;this.variable||(a=$.getOrCreateVariablePackage$$module$build$src$core$variables(a.workspace,null,this.defaultVariableName,this.defaultType),this.doValueUpdate_(a.getId()))}shouldAddBorderRect_(){const a=this.getSourceBlock();if(!a)throw new UnattachedFieldError$$module$build$src$core$field; +return super.shouldAddBorderRect_()&&(!this.getConstants().FIELD_DROPDOWN_NO_BORDER_RECT_SHADOW||"variables_get"!==a.type)}fromXml(a){var b=this.getSourceBlock();if(!b)throw new UnattachedFieldError$$module$build$src$core$field;const c=a.getAttribute("id"),d=a.textContent,e=a.getAttribute("variabletype")||a.getAttribute("variableType")||"";b=$.getOrCreateVariablePackage$$module$build$src$core$variables(b.workspace,c,d,e);if(null!==e&&e!==b.type)throw Error("Serialized variable type with id '"+b.getId()+ +"' had type "+b.type+", and does not match variable field that references it: "+domToText$$module$build$src$core$xml(a)+".");this.setValue(b.getId())}toXml(a){this.initModel();a.id=this.variable.getId();a.textContent=this.variable.name;this.variable.type&&a.setAttribute("variabletype",this.variable.type);return a}saveState(a){var b=this.saveLegacyState(FieldVariable$$module$build$src$core$field_variable);if(null!==b)return b;this.initModel();b={id:this.variable.getId()};a&&(b.name=this.variable.name, +b.type=this.variable.type);return b}loadState(a){const b=this.getSourceBlock();if(!b)throw new UnattachedFieldError$$module$build$src$core$field;this.loadLegacyState(FieldVariable$$module$build$src$core$field_variable,a)||(a=$.getOrCreateVariablePackage$$module$build$src$core$variables(b.workspace,a.id||null,a.name,a.type||""),this.setValue(a.getId()))}setSourceBlock(a){if(a.isShadow())throw Error("Variable fields are not allowed to exist on shadow blocks.");super.setSourceBlock(a)}getValue(){return this.variable? +this.variable.getId():null}getText(){return this.variable?this.variable.name:""}getVariable(){return this.variable}getValidator(){return this.variable?this.validator_:null}doClassValidation_(a){if(null===a)return null;var b=this.getSourceBlock();if(!b)throw new UnattachedFieldError$$module$build$src$core$field;b=$.getVariable$$module$build$src$core$variables(b.workspace,a);if(!b)return console.warn("Variable id doesn't point to a real variable! ID was "+a),null;b=b.type;return this.typeIsAllowed(b)? +a:(console.warn("Variable type doesn't match this field! Type was "+b),null)}doValueUpdate_(a){const b=this.getSourceBlock();if(!b)throw new UnattachedFieldError$$module$build$src$core$field;this.variable=$.getVariable$$module$build$src$core$variables(b.workspace,a);super.doValueUpdate_(a)}typeIsAllowed(a){const b=this.getVariableTypes();if(!b)return!0;for(let c=0;c{const c=this.targetWorkspace.getGesture(b); +c&&(c.setStartBlock(a),c.handleFlyoutStart(b,this))}}onMouseDown(a){const b=this.targetWorkspace.getGesture(a);b&&b.handleFlyoutStart(a,this)}isBlockCreatable(a){return a.isEnabled()}createBlock(a){let b=null;$.disable$$module$build$src$core$events$utils();var c=this.targetWorkspace.getAllVariables();this.targetWorkspace.setResizesEnabled(!1);try{b=this.placeNewBlock(a)}finally{$.enable$$module$build$src$core$events$utils()}this.targetWorkspace.hideChaff();a=getAddedVariables$$module$build$src$core$variables(this.targetWorkspace, +c);if(isEnabled$$module$build$src$core$events$utils()){$.setGroup$$module$build$src$core$events$utils(!0);for(c=0;c90-b||a>-90-b&&a<-90+b?!0:!1}getClientRect(){if(!this.svgGroup_||this.autoClose|| +!this.isVisible())return null;const a=this.svgGroup_.getBoundingClientRect(),b=a.top;return this.toolboxPosition_===Position$$module$build$src$core$utils$toolbox.TOP?new Rect$$module$build$src$core$utils$rect(-1E9,b+a.height,-1E9,1E9):new Rect$$module$build$src$core$utils$rect(b,1E9,-1E9,1E9)}reflowInternal_(){this.workspace_.scale=this.getFlyoutScale();let a=0;const b=this.workspace_.getTopBlocks(!1);for(let d=0,e;e=b[d];d++)a=Math.max(a,e.getHeightWidth().height);const c=this.buttons_;for(let d= +0,e;e=c[d];d++)a=Math.max(a,e.height);a+=1.5*this.MARGIN;a*=this.workspace_.scale;a+=Scrollbar$$module$build$src$core$scrollbar.scrollbarThickness;if(this.height_!==a){for(let d=0,e;e=b[d];d++)this.rectMap_.has(e)&&this.moveRectToBlock_(this.rectMap_.get(e),e);this.targetWorkspace.toolboxPosition!==this.toolboxPosition_||this.toolboxPosition_!==Position$$module$build$src$core$utils$toolbox.TOP||this.targetWorkspace.getToolbox()||this.targetWorkspace.translate(this.targetWorkspace.scrollX,this.targetWorkspace.scrollY+ +a);this.height_=a;this.position();this.targetWorkspace.recordDragTargets()}}};register$$module$build$src$core$registry(Type$$module$build$src$core$registry.FLYOUTS_HORIZONTAL_TOOLBOX,DEFAULT$$module$build$src$core$registry,HorizontalFlyout$$module$build$src$core$flyout_horizontal);var module$build$src$core$flyout_horizontal={};module$build$src$core$flyout_horizontal.HorizontalFlyout=HorizontalFlyout$$module$build$src$core$flyout_horizontal;var VerticalFlyout$$module$build$src$core$flyout_vertical=class extends Flyout$$module$build$src$core$flyout_base{constructor(a){super(a)}setMetrics_(a){if(this.isVisible()){var b=this.workspace_.getMetricsManager(),c=b.getScrollMetrics(),d=b.getViewMetrics();b=b.getAbsoluteMetrics();"number"===typeof a.y&&(this.workspace_.scrollY=-(c.top+(c.height-d.height)*a.y));this.workspace_.translate(this.workspace_.scrollX+b.left,this.workspace_.scrollY+b.top)}}getX(){if(!this.isVisible())return 0;var a=this.targetWorkspace.getMetricsManager(); +const b=a.getAbsoluteMetrics(),c=a.getViewMetrics();a=a.getToolboxMetrics();return this.targetWorkspace.toolboxPosition===this.toolboxPosition_?this.targetWorkspace.getToolbox()?this.toolboxPosition_===Position$$module$build$src$core$utils$toolbox.LEFT?a.width:c.width-this.width_:this.toolboxPosition_===Position$$module$build$src$core$utils$toolbox.LEFT?0:c.width:this.toolboxPosition_===Position$$module$build$src$core$utils$toolbox.LEFT?0:c.width+b.left-this.width_}getY(){return 0}position(){if(this.isVisible()&& +this.targetWorkspace.isVisible()){var a=this.targetWorkspace.getMetricsManager().getViewMetrics();this.height_=a.height;this.setBackgroundPath(this.width_-this.CORNER_RADIUS,a.height-2*this.CORNER_RADIUS);a=this.getX();var b=this.getY();this.positionAt_(this.width_,this.height_,a,b)}}setBackgroundPath(a,b){const c=this.toolboxPosition_===Position$$module$build$src$core$utils$toolbox.RIGHT;var d=a+this.CORNER_RADIUS;d=["M "+(c?d:0)+",0"];d.push("h",c?-a:a);d.push("a",this.CORNER_RADIUS,this.CORNER_RADIUS, +0,0,c?0:1,c?-this.CORNER_RADIUS:this.CORNER_RADIUS,this.CORNER_RADIUS);d.push("v",Math.max(0,b));d.push("a",this.CORNER_RADIUS,this.CORNER_RADIUS,0,0,c?0:1,c?this.CORNER_RADIUS:-this.CORNER_RADIUS,this.CORNER_RADIUS);d.push("h",c?a:-a);d.push("z");this.svgBackground_.setAttribute("d",d.join(" "))}scrollToStart(){let a;null==(a=this.workspace_.scrollbar)||a.setY(0)}wheel_(a){var b=getScrollDeltaPixels$$module$build$src$core$browser_events(a);if(b.y){const c=this.workspace_.getMetricsManager(),d=c.getScrollMetrics(); +b=c.getViewMetrics().top-d.top+b.y;let e;null==(e=this.workspace_.scrollbar)||e.setY(b);hide$$module$build$src$core$widgetdiv();hideWithoutAnimation$$module$build$src$core$dropdowndiv()}a.preventDefault();a.stopPropagation()}layout_(a,b){this.workspace_.scale=this.targetWorkspace.scale;var c=this.MARGIN;const d=this.RTL?c:c+this.tabWidth_;for(let h=0,k;k=a[h];h++)if("block"===k.type){var e=k.block,f=e.getDescendants(!1);for(let m=0,n;n=f[m];m++)n.isInFlyout=!0;f=e.getSvgRoot();const l=e.getHeightWidth(); +var g=e.outputConnection?d-this.tabWidth_:d;e.moveBy(g,c);g=this.createRect_(e,this.RTL?g-l.width:g,c,l,h);this.addBlockListeners_(f,e,g);c+=l.height+b[h]}else"button"===k.type&&(e=k.button,this.initFlyoutButton_(e,d,c),c+=e.height+b[h])}isDragTowardWorkspace(a){a=Math.atan2(a.y,a.x)/Math.PI*180;const b=this.dragAngleRange_;return a-b||a<-180+b||a>180-b?!0:!1}getClientRect(){if(!this.svgGroup_||this.autoClose||!this.isVisible())return null;const a=this.svgGroup_.getBoundingClientRect(),b=a.left; +return this.toolboxPosition_===Position$$module$build$src$core$utils$toolbox.LEFT?new Rect$$module$build$src$core$utils$rect(-1E9,1E9,-1E9,b+a.width):new Rect$$module$build$src$core$utils$rect(-1E9,1E9,b,1E9)}reflowInternal_(){this.workspace_.scale=this.getFlyoutScale();let a=0;var b=this.workspace_.getTopBlocks(!1);for(let d=0,e;e=b[d];d++){var c=e.getHeightWidth().width;e.outputConnection&&(c-=this.tabWidth_);a=Math.max(a,c)}for(let d=0,e;e=this.buttons_[d];d++)a=Math.max(a,e.width);a+=1.5*this.MARGIN+ +this.tabWidth_;a*=this.workspace_.scale;a+=Scrollbar$$module$build$src$core$scrollbar.scrollbarThickness;if(this.width_!==a){for(let d=0,e;e=b[d];d++){if(this.RTL){c=e.getRelativeToSurfaceXY().x;let f=a/this.workspace_.scale-this.MARGIN;e.outputConnection||(f-=this.tabWidth_);e.moveBy(f-c,0)}this.rectMap_.has(e)&&this.moveRectToBlock_(this.rectMap_.get(e),e)}if(this.RTL)for(let d=0,e;e=this.buttons_[d];d++)b=e.getPosition().y,e.moveTo(a/this.workspace_.scale-e.width-this.MARGIN-this.tabWidth_,b); +this.targetWorkspace.toolboxPosition!==this.toolboxPosition_||this.toolboxPosition_!==Position$$module$build$src$core$utils$toolbox.LEFT||this.targetWorkspace.getToolbox()||this.targetWorkspace.translate(this.targetWorkspace.scrollX+a,this.targetWorkspace.scrollY);this.width_=a;this.position();this.targetWorkspace.recordDragTargets()}}};VerticalFlyout$$module$build$src$core$flyout_vertical.registryName="verticalFlyout"; +register$$module$build$src$core$registry(Type$$module$build$src$core$registry.FLYOUTS_VERTICAL_TOOLBOX,DEFAULT$$module$build$src$core$registry,VerticalFlyout$$module$build$src$core$flyout_vertical);var module$build$src$core$flyout_vertical={};module$build$src$core$flyout_vertical.VerticalFlyout=VerticalFlyout$$module$build$src$core$flyout_vertical;var module$build$src$core$generator; +$.CodeGenerator$$module$build$src$core$generator=class{constructor(a){this.forBlock=Object.create(null);this.FUNCTION_NAME_PLACEHOLDER_="{leCUI8hutHZI4480Dc}";this.STATEMENT_SUFFIX=this.STATEMENT_PREFIX=this.INFINITE_LOOP_TRAP=null;this.INDENT=" ";this.COMMENT_WRAP=60;this.ORDER_OVERRIDES=[];this.isInitialized=null;this.RESERVED_WORDS_="";this.definitions_=Object.create(null);this.functionNames_=Object.create(null);this.nameDB_=void 0;this.name_=a;this.FUNCTION_NAME_PLACEHOLDER_REGEXP_=new RegExp(this.FUNCTION_NAME_PLACEHOLDER_, +"g")}workspaceToCode(a){a||(console.warn("No workspace specified in workspaceToCode call. Guessing."),a=getMainWorkspace$$module$build$src$core$common());var b=[];this.init(a);a=a.getTopBlocks(!0);for(let c=0,d;d=a[c];c++){let e=this.blockToCode(d);Array.isArray(e)&&(e=e[0]);e&&(d.outputConnection&&(e=this.scrubNakedValue(e),this.STATEMENT_PREFIX&&!d.suppressPrefixSuffix&&(e=this.injectId(this.STATEMENT_PREFIX,d)+e),this.STATEMENT_SUFFIX&&!d.suppressPrefixSuffix&&(e+=this.injectId(this.STATEMENT_SUFFIX, +d))),b.push(e))}b=b.join("\n");b=this.finish(b);b=b.replace(/^\s+\n/,"");b=b.replace(/\n\s+$/,"\n");return b=b.replace(/[ \t]+\n/g,"\n")}prefixLines(a,b){return b+a.replace(/(?!\n$)\n/g,"\n"+b)}allNestedComments(a){const b=[];a=a.getDescendants(!0);for(let c=0;c.blocklyPathLight,`,`${a} .blocklyInsertionMarker>.blocklyPathDark {`,`fill-opacity: ${this.INSERTION_MARKER_OPACITY};`,"stroke: none;", +"}"])}},module$build$src$core$renderers$geras$constants={};module$build$src$core$renderers$geras$constants.ConstantProvider=ConstantProvider$$module$build$src$core$renderers$geras$constants;var Highlighter$$module$build$src$core$renderers$geras$highlighter=class{constructor(a){this.inlineSteps_=this.steps_="";this.info_=a;this.RTL_=this.info_.RTL;a=a.getRenderer();this.constants_=a.getConstants();this.highlightConstants_=a.getHighlightConstants();this.highlightOffset=this.highlightConstants_.OFFSET;this.outsideCornerPaths_=this.highlightConstants_.OUTSIDE_CORNER;this.insideCornerPaths_=this.highlightConstants_.INSIDE_CORNER;this.puzzleTabPaths_=this.highlightConstants_.PUZZLE_TAB;this.notchPaths_= +this.highlightConstants_.NOTCH;this.startPaths_=this.highlightConstants_.START_HAT;this.jaggedTeethPaths_=this.highlightConstants_.JAGGED_TEETH}getPath(){return this.steps_+"\n"+this.inlineSteps_}drawTopCorner(a){this.steps_+=moveBy$$module$build$src$core$utils$svg_paths(a.xPos,this.info_.startY);for(let b=0,c;c=a.elements[b];b++)Types$$module$build$src$core$renderers$measurables$types.isLeftSquareCorner(c)?this.steps_+=this.highlightConstants_.START_POINT:Types$$module$build$src$core$renderers$measurables$types.isLeftRoundedCorner(c)? +this.steps_+=this.outsideCornerPaths_.topLeft(this.RTL_):Types$$module$build$src$core$renderers$measurables$types.isPreviousConnection(c)?this.steps_+=this.notchPaths_.pathLeft:Types$$module$build$src$core$renderers$measurables$types.isHat(c)?this.steps_+=this.startPaths_.path(this.RTL_):Types$$module$build$src$core$renderers$measurables$types.isSpacer(c)&&0!==c.width&&(this.steps_+=lineOnAxis$$module$build$src$core$utils$svg_paths("H",c.xPos+c.width-this.highlightOffset));this.steps_+=lineOnAxis$$module$build$src$core$utils$svg_paths("H", +a.xPos+a.width-this.highlightOffset)}drawJaggedEdge_(a){this.info_.RTL&&(this.steps_+=this.jaggedTeethPaths_.pathLeft+lineOnAxis$$module$build$src$core$utils$svg_paths("v",a.height-this.jaggedTeethPaths_.height-this.highlightOffset))}drawValueInput(a){const b=a.getLastInput();if(this.RTL_){const c=a.height-b.connectionHeight;this.steps_+=moveTo$$module$build$src$core$utils$svg_paths(b.xPos+b.width-this.highlightOffset,a.yPos)+this.puzzleTabPaths_.pathDown(this.RTL_)+lineOnAxis$$module$build$src$core$utils$svg_paths("v", +c)}else this.steps_+=moveTo$$module$build$src$core$utils$svg_paths(b.xPos+b.width,a.yPos)+this.puzzleTabPaths_.pathDown(this.RTL_)}drawStatementInput(a){const b=a.getLastInput();if(b)if(this.RTL_){const c=a.height-2*this.insideCornerPaths_.height;this.steps_+=moveTo$$module$build$src$core$utils$svg_paths(b.xPos,a.yPos)+this.insideCornerPaths_.pathTop(this.RTL_)+lineOnAxis$$module$build$src$core$utils$svg_paths("v",c)+this.insideCornerPaths_.pathBottom(this.RTL_)+lineTo$$module$build$src$core$utils$svg_paths(a.width- +b.xPos-this.insideCornerPaths_.width,0)}else this.steps_+=moveTo$$module$build$src$core$utils$svg_paths(b.xPos,a.yPos+a.height)+this.insideCornerPaths_.pathBottom(this.RTL_)+lineTo$$module$build$src$core$utils$svg_paths(a.width-b.xPos-this.insideCornerPaths_.width,0)}drawRightSideRow(a){const b=a.xPos+a.width-this.highlightOffset;a instanceof SpacerRow$$module$build$src$core$renderers$measurables$spacer_row&&a.followsStatement&&(this.steps_+=lineOnAxis$$module$build$src$core$utils$svg_paths("H",b)); +this.RTL_&&(this.steps_+=lineOnAxis$$module$build$src$core$utils$svg_paths("H",b),a.height>this.highlightOffset&&(this.steps_+=lineOnAxis$$module$build$src$core$utils$svg_paths("V",a.yPos+a.height-this.highlightOffset)))}drawBottomRow(a){if(this.RTL_)this.steps_+=lineOnAxis$$module$build$src$core$utils$svg_paths("V",a.baseline-this.highlightOffset);else{const b=this.info_.bottomRow.elements[0];Types$$module$build$src$core$renderers$measurables$types.isLeftSquareCorner(b)?this.steps_+=moveTo$$module$build$src$core$utils$svg_paths(a.xPos+ +this.highlightOffset,a.baseline-this.highlightOffset):Types$$module$build$src$core$renderers$measurables$types.isLeftRoundedCorner(b)&&(this.steps_+=moveTo$$module$build$src$core$utils$svg_paths(a.xPos,a.baseline),this.steps_+=this.outsideCornerPaths_.bottomLeft())}}drawLeft(){var a=this.info_.outputConnection;a&&(a=a.connectionOffsetY+a.height,this.RTL_?this.steps_+=moveTo$$module$build$src$core$utils$svg_paths(this.info_.startX,a):(this.steps_+=moveTo$$module$build$src$core$utils$svg_paths(this.info_.startX+ +this.highlightOffset,this.info_.bottomRow.baseline-this.highlightOffset),this.steps_+=lineOnAxis$$module$build$src$core$utils$svg_paths("V",a)),this.steps_+=this.puzzleTabPaths_.pathUp(this.RTL_));this.RTL_||(a=this.info_.topRow,Types$$module$build$src$core$renderers$measurables$types.isLeftRoundedCorner(a.elements[0])?this.steps_+=lineOnAxis$$module$build$src$core$utils$svg_paths("V",this.outsideCornerPaths_.height):this.steps_+=lineOnAxis$$module$build$src$core$utils$svg_paths("V",a.capline+this.highlightOffset))}drawInlineInput(a){const b= +this.highlightOffset,c=a.xPos+a.connectionWidth;var d=a.centerline-a.height/2;const e=a.width-a.connectionWidth,f=d+b;this.RTL_?(d=a.connectionOffsetY-b,a=a.height-(a.connectionOffsetY+a.connectionHeight)+b,this.inlineSteps_+=moveTo$$module$build$src$core$utils$svg_paths(c-b,f)+lineOnAxis$$module$build$src$core$utils$svg_paths("v",d)+this.puzzleTabPaths_.pathDown(this.RTL_)+lineOnAxis$$module$build$src$core$utils$svg_paths("v",a)+lineOnAxis$$module$build$src$core$utils$svg_paths("h",e)):this.inlineSteps_+= +moveTo$$module$build$src$core$utils$svg_paths(a.xPos+a.width+b,f)+lineOnAxis$$module$build$src$core$utils$svg_paths("v",a.height)+lineOnAxis$$module$build$src$core$utils$svg_paths("h",-e)+moveTo$$module$build$src$core$utils$svg_paths(c,d+a.connectionOffsetY)+this.puzzleTabPaths_.pathDown(this.RTL_)}},module$build$src$core$renderers$geras$highlighter={};module$build$src$core$renderers$geras$highlighter.Highlighter=Highlighter$$module$build$src$core$renderers$geras$highlighter;var Drawer$$module$build$src$core$renderers$geras$drawer=class extends Drawer$$module$build$src$core$renderers$common$drawer{constructor(a,b){super(a,b);this.highlighter_=new Highlighter$$module$build$src$core$renderers$geras$highlighter(b)}draw(){this.drawOutline_();this.drawInternals_();const a=this.block_.pathObject;a.setPath(this.outlinePath_+"\n"+this.inlinePath_);a.setHighlightPath(this.highlighter_.getPath());this.info_.RTL&&a.flipRTL();this.recordSizeOnBlock_()}drawTop_(){this.highlighter_.drawTopCorner(this.info_.topRow); +this.highlighter_.drawRightSideRow(this.info_.topRow);super.drawTop_()}drawJaggedEdge_(a){this.highlighter_.drawJaggedEdge_(a);super.drawJaggedEdge_(a)}drawValueInput_(a){this.highlighter_.drawValueInput(a);super.drawValueInput_(a)}drawStatementInput_(a){this.highlighter_.drawStatementInput(a);super.drawStatementInput_(a)}drawRightSideRow_(a){this.highlighter_.drawRightSideRow(a);this.outlinePath_+=lineOnAxis$$module$build$src$core$utils$svg_paths("H",a.xPos+a.width)+lineOnAxis$$module$build$src$core$utils$svg_paths("V", +a.yPos+a.height)}drawBottom_(){this.highlighter_.drawBottomRow(this.info_.bottomRow);super.drawBottom_()}drawLeft_(){this.highlighter_.drawLeft();super.drawLeft_()}drawInlineInput_(a){this.highlighter_.drawInlineInput(a);super.drawInlineInput_(a)}positionInlineInputConnection_(a){const b=a.centerline-a.height/2;if(a.connectionModel){let c=a.xPos+a.connectionWidth+this.constants_.DARK_PATH_OFFSET;this.info_.RTL&&(c*=-1);a.connectionModel.setOffsetInBlock(c,b+a.connectionOffsetY+this.constants_.DARK_PATH_OFFSET)}}positionStatementInputConnection_(a){const b= +a.getLastInput();if(null==b?0:b.connectionModel){let c=a.xPos+a.statementEdge+b.notchOffset;c=this.info_.RTL?-1*c:c+this.constants_.DARK_PATH_OFFSET;b.connectionModel.setOffsetInBlock(c,a.yPos+this.constants_.DARK_PATH_OFFSET)}}positionExternalValueConnection_(a){const b=a.getLastInput();if(b&&b.connectionModel){let c=a.xPos+a.width+this.constants_.DARK_PATH_OFFSET;this.info_.RTL&&(c*=-1);b.connectionModel.setOffsetInBlock(c,a.yPos)}}positionNextConnection_(){const a=this.info_.bottomRow;if(a.connection){const b= +a.connection,c=b.xPos;b.connectionModel.setOffsetInBlock((this.info_.RTL?-c:c)+this.constants_.DARK_PATH_OFFSET/2,a.baseline+this.constants_.DARK_PATH_OFFSET)}}},module$build$src$core$renderers$geras$drawer={};module$build$src$core$renderers$geras$drawer.Drawer=Drawer$$module$build$src$core$renderers$geras$drawer;var HighlightConstantProvider$$module$build$src$core$renderers$geras$highlight_constants=class{constructor(a){this.OFFSET=.5;this.constantProvider=a;this.START_POINT=moveBy$$module$build$src$core$utils$svg_paths(this.OFFSET,this.OFFSET)}init(){this.INSIDE_CORNER=this.makeInsideCorner();this.OUTSIDE_CORNER=this.makeOutsideCorner();this.PUZZLE_TAB=this.makePuzzleTab();this.NOTCH=this.makeNotch();this.JAGGED_TEETH=this.makeJaggedTeeth();this.START_HAT=this.makeStartHat()}makeInsideCorner(){const a=this.constantProvider.CORNER_RADIUS, +b=this.OFFSET,c=(1-Math.SQRT1_2)*(a+b)-b,d=moveBy$$module$build$src$core$utils$svg_paths(c,c)+arc$$module$build$src$core$utils$svg_paths("a","0 0,0",a,point$$module$build$src$core$utils$svg_paths(-c-b,a-c)),e=arc$$module$build$src$core$utils$svg_paths("a","0 0,0",a+b,point$$module$build$src$core$utils$svg_paths(a+b,a+b)),f=moveBy$$module$build$src$core$utils$svg_paths(c,-c)+arc$$module$build$src$core$utils$svg_paths("a","0 0,0",a+b,point$$module$build$src$core$utils$svg_paths(a-c,c+b));return{width:a+ +b,height:a,pathTop(g){return g?d:""},pathBottom(g){return g?e:f}}}makeOutsideCorner(){const a=this.constantProvider.CORNER_RADIUS,b=this.OFFSET,c=(1-Math.SQRT1_2)*(a-b)+b,d=moveBy$$module$build$src$core$utils$svg_paths(c,c)+arc$$module$build$src$core$utils$svg_paths("a","0 0,1",a-b,point$$module$build$src$core$utils$svg_paths(a-c,-c+b)),e=moveBy$$module$build$src$core$utils$svg_paths(b,a)+arc$$module$build$src$core$utils$svg_paths("a","0 0,1",a-b,point$$module$build$src$core$utils$svg_paths(a,-a+ +b)),f=-c,g=moveBy$$module$build$src$core$utils$svg_paths(c,f)+arc$$module$build$src$core$utils$svg_paths("a","0 0,1",a-b,point$$module$build$src$core$utils$svg_paths(-c+b,-f-a));return{height:a,topLeft(h){return h?d:e},bottomLeft(){return g}}}makePuzzleTab(){const a=this.constantProvider.TAB_WIDTH,b=this.constantProvider.TAB_HEIGHT,c=moveBy$$module$build$src$core$utils$svg_paths(-2,-b+3.4)+lineTo$$module$build$src$core$utils$svg_paths(-.45*a,-2.1),d=lineOnAxis$$module$build$src$core$utils$svg_paths("v", +2.5)+moveBy$$module$build$src$core$utils$svg_paths(.97*-a,2.5)+curve$$module$build$src$core$utils$svg_paths("q",[point$$module$build$src$core$utils$svg_paths(.05*-a,10),point$$module$build$src$core$utils$svg_paths(.3*a,9.5)])+moveBy$$module$build$src$core$utils$svg_paths(.67*a,-1.9)+lineOnAxis$$module$build$src$core$utils$svg_paths("v",2.5),e=lineOnAxis$$module$build$src$core$utils$svg_paths("v",-1.5)+moveBy$$module$build$src$core$utils$svg_paths(-.92*a,-.5)+curve$$module$build$src$core$utils$svg_paths("q", +[point$$module$build$src$core$utils$svg_paths(-.19*a,-5.5),point$$module$build$src$core$utils$svg_paths(0,-11)])+moveBy$$module$build$src$core$utils$svg_paths(.92*a,1),f=moveBy$$module$build$src$core$utils$svg_paths(-5,b-.7)+lineTo$$module$build$src$core$utils$svg_paths(.46*a,-2.1);return{width:a,height:b,pathUp(g){return g?c:e},pathDown(g){return g?d:f}}}makeNotch(){return{pathLeft:lineOnAxis$$module$build$src$core$utils$svg_paths("h",this.OFFSET)+this.constantProvider.NOTCH.pathLeft}}makeJaggedTeeth(){return{pathLeft:lineTo$$module$build$src$core$utils$svg_paths(5.1, +2.6)+moveBy$$module$build$src$core$utils$svg_paths(-10.2,6.8)+lineTo$$module$build$src$core$utils$svg_paths(5.1,2.6),height:12,width:10.2}}makeStartHat(){const a=this.constantProvider.START_HAT.height,b=moveBy$$module$build$src$core$utils$svg_paths(25,-8.7)+curve$$module$build$src$core$utils$svg_paths("c",[point$$module$build$src$core$utils$svg_paths(29.7,-6.2),point$$module$build$src$core$utils$svg_paths(57.2,-.5),point$$module$build$src$core$utils$svg_paths(75,8.7)]),c=curve$$module$build$src$core$utils$svg_paths("c", +[point$$module$build$src$core$utils$svg_paths(17.8,-9.2),point$$module$build$src$core$utils$svg_paths(45.3,-14.9),point$$module$build$src$core$utils$svg_paths(75,-8.7)])+moveTo$$module$build$src$core$utils$svg_paths(100.5,a+.5);return{path(d){return d?b:c}}}},module$build$src$core$renderers$geras$highlight_constants={};module$build$src$core$renderers$geras$highlight_constants.HighlightConstantProvider=HighlightConstantProvider$$module$build$src$core$renderers$geras$highlight_constants;var InlineInput$$module$build$src$core$renderers$geras$measurables$inline_input=class extends InlineInput$$module$build$src$core$renderers$measurables$inline_input{constructor(a,b){super(a,b);this.constants_=a;this.connectedBlock&&(this.width+=this.constants_.DARK_PATH_OFFSET,this.height+=this.constants_.DARK_PATH_OFFSET)}},module$build$src$core$renderers$geras$measurables$inline_input={};module$build$src$core$renderers$geras$measurables$inline_input.InlineInput=InlineInput$$module$build$src$core$renderers$geras$measurables$inline_input;var StatementInput$$module$build$src$core$renderers$geras$measurables$statement_input=class extends StatementInput$$module$build$src$core$renderers$measurables$statement_input{constructor(a,b){super(a,b);this.constants_=a;this.connectedBlock&&(this.height+=this.constants_.DARK_PATH_OFFSET)}},module$build$src$core$renderers$geras$measurables$statement_input={};module$build$src$core$renderers$geras$measurables$statement_input.StatementInput=StatementInput$$module$build$src$core$renderers$geras$measurables$statement_input;var RenderInfo$$module$build$src$core$renderers$geras$info=class extends RenderInfo$$module$build$src$core$renderers$common$info{constructor(a,b){super(a,b);this.renderer_=a}getRenderer(){return this.renderer_}populateBottomRow_(){super.populateBottomRow_();this.block_.inputList.length&&this.block_.inputList[this.block_.inputList.length-1]instanceof StatementInput$$module$build$src$core$inputs$statement_input||(this.bottomRow.minHeight=this.constants_.MEDIUM_PADDING-this.constants_.DARK_PATH_OFFSET)}addInput_(a, +b){if(this.isInline&&a instanceof $.ValueInput$$module$build$src$core$inputs$value_input)b.elements.push(new InlineInput$$module$build$src$core$renderers$geras$measurables$inline_input(this.constants_,a)),b.hasInlineInput=!0;else if(a instanceof StatementInput$$module$build$src$core$inputs$statement_input)b.elements.push(new StatementInput$$module$build$src$core$renderers$geras$measurables$statement_input(this.constants_,a)),b.hasStatement=!0;else if(a instanceof $.ValueInput$$module$build$src$core$inputs$value_input)b.elements.push(new ExternalValueInput$$module$build$src$core$renderers$measurables$external_value_input(this.constants_, +a)),b.hasExternalInput=!0;else if(a instanceof DummyInput$$module$build$src$core$inputs$dummy_input||a instanceof EndRowInput$$module$build$src$core$inputs$end_row_input)b.minHeight=Math.max(b.minHeight,this.constants_.DUMMY_INPUT_MIN_HEIGHT),b.hasDummyInput=!0;this.isInline||null!==b.align||(b.align=a.align)}addElemSpacing_(){let a=!1;for(let c=0,d;d=this.rows[c];c++)d.hasExternalInput&&(a=!0);for(let c=0,d;d=this.rows[c];c++){var b=d.elements;d.elements=[];d.startsWithElemSpacer()&&d.elements.push(new InRowSpacer$$module$build$src$core$renderers$measurables$in_row_spacer(this.constants_, +this.getInRowSpacing_(null,b[0])));if(b.length){for(let e=0;e>>/sprites.png);\n height: 16px;\n vertical-align: middle;\n visibility: hidden;\n width: 16px;\n}\n\n.blocklyTreeIconClosed {\n background-position: -32px -1px;\n}\n\n.blocklyToolboxDiv[dir="RTL"] .blocklyTreeIconClosed {\n background-position: 0 -1px;\n}\n\n.blocklyTreeSelected>.blocklyTreeIconClosed {\n background-position: -32px -17px;\n}\n\n.blocklyToolboxDiv[dir="RTL"] .blocklyTreeSelected>.blocklyTreeIconClosed {\n background-position: 0 -17px;\n}\n\n.blocklyTreeIconOpen {\n background-position: -16px -1px;\n}\n\n.blocklyTreeSelected>.blocklyTreeIconOpen {\n background-position: -16px -17px;\n}\n\n.blocklyTreeLabel {\n cursor: default;\n font: 16px sans-serif;\n padding: 0 3px;\n vertical-align: middle;\n}\n\n.blocklyToolboxDelete .blocklyTreeLabel {\n cursor: url("<<>>/handdelete.cur"), auto;\n}\n\n.blocklyTreeSelected .blocklyTreeLabel {\n color: #fff;\n}\n'); +register$$module$build$src$core$registry(Type$$module$build$src$core$registry.TOOLBOX_ITEM,ToolboxCategory$$module$build$src$core$toolbox$category.registrationName,ToolboxCategory$$module$build$src$core$toolbox$category);var module$build$src$core$toolbox$category={};module$build$src$core$toolbox$category.ToolboxCategory=ToolboxCategory$$module$build$src$core$toolbox$category;var ToolboxSeparator$$module$build$src$core$toolbox$separator=class extends ToolboxItem$$module$build$src$core$toolbox$toolbox_item{constructor(a,b){super(a,b);this.cssConfig_={container:"blocklyTreeSeparator"};this.htmlDiv_=null;Object.assign(this.cssConfig_,a.cssconfig||a.cssConfig)}init(){this.createDom_()}createDom_(){const a=document.createElement("div"),b=this.cssConfig_.container;b&&addClass$$module$build$src$core$utils$dom(a,b);return this.htmlDiv_=a}getDiv(){return this.htmlDiv_}dispose(){removeNode$$module$build$src$core$utils$dom(this.htmlDiv_)}}; +ToolboxSeparator$$module$build$src$core$toolbox$separator.registrationName="sep";register$$module$build$src$core$css('\n.blocklyTreeSeparator {\n border-bottom: solid #e5e5e5 1px;\n height: 0;\n margin: 5px 0;\n}\n\n.blocklyToolboxDiv[layout="h"] .blocklyTreeSeparator {\n border-right: solid #e5e5e5 1px;\n border-bottom: none;\n height: auto;\n margin: 0 5px 0 5px;\n padding: 5px 0;\n width: 0;\n}\n'); +register$$module$build$src$core$registry(Type$$module$build$src$core$registry.TOOLBOX_ITEM,ToolboxSeparator$$module$build$src$core$toolbox$separator.registrationName,ToolboxSeparator$$module$build$src$core$toolbox$separator);var module$build$src$core$toolbox$separator={};module$build$src$core$toolbox$separator.ToolboxSeparator=ToolboxSeparator$$module$build$src$core$toolbox$separator;var CollapsibleToolboxCategory$$module$build$src$core$toolbox$collapsible_category=class extends ToolboxCategory$$module$build$src$core$toolbox$category{constructor(a,b,c){super(a,b,c);this.subcategoriesDiv_=null;this.expanded_=!1;this.toolboxItems_=[]}makeDefaultCssConfig_(){const a=super.makeDefaultCssConfig_();a.contents="blocklyToolboxContents";return a}parseContents_(a){if("custom"in a)this.flyoutItems_=a.custom;else{const b=a.contents;if(b){this.flyoutItems_=[];a=!0;for(let c=0;c>>/handdelete.cur"), auto;\n}\n\n.blocklyToolboxGrab {\n cursor: url("<<>>/handclosed.cur"), auto;\n cursor: grabbing;\n cursor: -webkit-grabbing;\n}\n\n/* Category tree in Toolbox. */\n.blocklyToolboxDiv {\n background-color: #ddd;\n overflow-x: visible;\n overflow-y: auto;\n padding: 4px 0 4px 0;\n position: absolute;\n z-index: 70; /* so blocks go under toolbox when dragging */\n -webkit-tap-highlight-color: transparent; /* issue #1345 */\n}\n\n.blocklyToolboxContents {\n display: flex;\n flex-wrap: wrap;\n flex-direction: column;\n}\n\n.blocklyToolboxContents:focus {\n outline: none;\n}\n'); +register$$module$build$src$core$registry(Type$$module$build$src$core$registry.TOOLBOX,DEFAULT$$module$build$src$core$registry,Toolbox$$module$build$src$core$toolbox$toolbox);var module$build$src$core$toolbox$toolbox={};module$build$src$core$toolbox$toolbox.Toolbox=Toolbox$$module$build$src$core$toolbox$toolbox;var VERSION$$module$build$src$core$blockly="10.2.2",ALIGN_LEFT$$module$build$src$core$blockly=$.Align$$module$build$src$core$inputs$align.LEFT,ALIGN_CENTRE$$module$build$src$core$blockly=$.Align$$module$build$src$core$inputs$align.CENTRE,ALIGN_RIGHT$$module$build$src$core$blockly=$.Align$$module$build$src$core$inputs$align.RIGHT,INPUT_VALUE$$module$build$src$core$blockly=ConnectionType$$module$build$src$core$connection_type.INPUT_VALUE,OUTPUT_VALUE$$module$build$src$core$blockly=ConnectionType$$module$build$src$core$connection_type.OUTPUT_VALUE, +NEXT_STATEMENT$$module$build$src$core$blockly=ConnectionType$$module$build$src$core$connection_type.NEXT_STATEMENT,PREVIOUS_STATEMENT$$module$build$src$core$blockly=ConnectionType$$module$build$src$core$connection_type.PREVIOUS_STATEMENT,DUMMY_INPUT$$module$build$src$core$blockly=$.inputTypes$$module$build$src$core$inputs$input_types.DUMMY,TOOLBOX_AT_TOP$$module$build$src$core$blockly=Position$$module$build$src$core$utils$toolbox.TOP,TOOLBOX_AT_BOTTOM$$module$build$src$core$blockly=Position$$module$build$src$core$utils$toolbox.BOTTOM, +TOOLBOX_AT_LEFT$$module$build$src$core$blockly=Position$$module$build$src$core$utils$toolbox.LEFT,TOOLBOX_AT_RIGHT$$module$build$src$core$blockly=Position$$module$build$src$core$utils$toolbox.RIGHT,svgResize$$module$build$src$core$blockly=svgResize$$module$build$src$core$common,getMainWorkspace$$module$build$src$core$blockly=getMainWorkspace$$module$build$src$core$common,getSelected$$module$build$src$core$blockly=getSelected$$module$build$src$core$common,defineBlocksWithJsonArray$$module$build$src$core$blockly= +defineBlocksWithJsonArray$$module$build$src$core$common,setParentContainer$$module$build$src$core$blockly=setParentContainer$$module$build$src$core$common,COLLAPSE_CHARS$$module$build$src$core$blockly=COLLAPSE_CHARS$$module$build$src$core$internal_constants,DRAG_STACK$$module$build$src$core$blockly=DRAG_STACK$$module$build$src$core$internal_constants,OPPOSITE_TYPE$$module$build$src$core$blockly=OPPOSITE_TYPE$$module$build$src$core$internal_constants,RENAME_VARIABLE_ID$$module$build$src$core$blockly= +RENAME_VARIABLE_ID$$module$build$src$core$internal_constants,DELETE_VARIABLE_ID$$module$build$src$core$blockly=DELETE_VARIABLE_ID$$module$build$src$core$internal_constants,COLLAPSED_INPUT_NAME$$module$build$src$core$blockly=COLLAPSED_INPUT_NAME$$module$build$src$core$constants,COLLAPSED_FIELD_NAME$$module$build$src$core$blockly=COLLAPSED_FIELD_NAME$$module$build$src$core$constants,VARIABLE_CATEGORY_NAME$$module$build$src$core$blockly=CATEGORY_NAME$$module$build$src$core$variables,VARIABLE_DYNAMIC_CATEGORY_NAME$$module$build$src$core$blockly= +CATEGORY_NAME$$module$build$src$core$variables_dynamic,PROCEDURE_CATEGORY_NAME$$module$build$src$core$blockly=CATEGORY_NAME$$module$build$src$core$procedures;Workspace$$module$build$src$core$workspace.prototype.newBlock=function(a,b){return new Block$$module$build$src$core$block(this,a,b)};WorkspaceSvg$$module$build$src$core$workspace_svg.prototype.newBlock=function(a,b){return new BlockSvg$$module$build$src$core$block_svg(this,a,b)};WorkspaceSvg$$module$build$src$core$workspace_svg.newTrashcan=function(a){return new Trashcan$$module$build$src$core$trashcan(a)}; +WorkspaceCommentSvg$$module$build$src$core$workspace_comment_svg.prototype.showContextMenu=function(a){if(!this.workspace.options.readOnly){var b=[];this.isDeletable()&&this.isMovable()&&(b.push(commentDuplicateOption$$module$build$src$core$contextmenu(this)),b.push(commentDeleteOption$$module$build$src$core$contextmenu(this)));show$$module$build$src$core$contextmenu(a,b,this.RTL)}};MiniWorkspaceBubble$$module$build$src$core$bubbles$mini_workspace_bubble.prototype.newWorkspaceSvg=function(a){return new WorkspaceSvg$$module$build$src$core$workspace_svg(a)}; +$.Names$$module$build$src$core$names.prototype.populateProcedures=function(a){a=allProcedures$$module$build$src$core$procedures(a);a=a[0].concat(a[1]);for(let b=0;b AnyDuringMigration) | AnyDuringMigration;\n };\n} = Object.create(null);\nexport const TEST_ONLY = {typeMap};\n\n/**\n * A map of maps. With the keys being the type and caseless name of the class we\n * are registring, and the value being the most recent cased name for that\n * registration.\n */\nconst nameMap: {[key: string]: {[key: string]: string}} = Object.create(null);\n\n/**\n * The string used to register the default class for a type of plugin.\n */\nexport const DEFAULT = 'default';\n\n/**\n * A name with the type of the element stored in the generic.\n */\nexport class Type<_T> {\n /** @param name The name of the registry type. */\n constructor(private readonly name: string) {}\n\n /**\n * Returns the name of the type.\n *\n * @returns The name.\n */\n toString(): string {\n return this.name;\n }\n\n static CONNECTION_CHECKER = new Type('connectionChecker');\n\n static CURSOR = new Type('cursor');\n\n static EVENT = new Type('event');\n\n static FIELD = new Type('field');\n\n static INPUT = new Type('input');\n\n static RENDERER = new Type('renderer');\n\n static TOOLBOX = new Type('toolbox');\n\n static THEME = new Type('theme');\n\n static TOOLBOX_ITEM = new Type('toolboxItem');\n\n static FLYOUTS_VERTICAL_TOOLBOX = new Type('flyoutsVerticalToolbox');\n\n static FLYOUTS_HORIZONTAL_TOOLBOX = new Type(\n 'flyoutsHorizontalToolbox',\n );\n\n static METRICS_MANAGER = new Type('metricsManager');\n\n static BLOCK_DRAGGER = new Type('blockDragger');\n\n /** @internal */\n static SERIALIZER = new Type('serializer');\n\n /** @internal */\n static ICON = new Type('icon');\n\n /** @internal */\n static PASTER = new Type>>('paster');\n}\n\n/**\n * Registers a class based on a type and name.\n *\n * @param type The type of the plugin.\n * (e.g. Field, Renderer)\n * @param name The plugin's name. (Ex. field_angle, geras)\n * @param registryItem The class or object to register.\n * @param opt_allowOverrides True to prevent an error when overriding an already\n * registered item.\n * @throws {Error} if the type or name is empty, a name with the given type has\n * already been registered, or if the given class or object is not valid for\n * its type.\n */\nexport function register(\n type: string | Type,\n name: string,\n registryItem:\n | (new (...p1: AnyDuringMigration[]) => T)\n | null\n | AnyDuringMigration,\n opt_allowOverrides?: boolean,\n): void {\n if (\n (!(type instanceof Type) && typeof type !== 'string') ||\n `${type}`.trim() === ''\n ) {\n throw Error(\n 'Invalid type \"' +\n type +\n '\". The type must be a' +\n ' non-empty string or a Blockly.registry.Type.',\n );\n }\n type = `${type}`.toLowerCase();\n\n if (typeof name !== 'string' || name.trim() === '') {\n throw Error(\n 'Invalid name \"' + name + '\". The name must be a' + ' non-empty string.',\n );\n }\n const caselessName = name.toLowerCase();\n if (!registryItem) {\n throw Error('Can not register a null value');\n }\n let typeRegistry = typeMap[type];\n let nameRegistry = nameMap[type];\n // If the type registry has not been created, create it.\n if (!typeRegistry) {\n typeRegistry = typeMap[type] = Object.create(null);\n nameRegistry = nameMap[type] = Object.create(null);\n }\n\n // Validate that the given class has all the required properties.\n validate(type, registryItem);\n\n // Don't throw an error if opt_allowOverrides is true.\n if (!opt_allowOverrides && typeRegistry[caselessName]) {\n throw Error(\n 'Name \"' +\n caselessName +\n '\" with type \"' +\n type +\n '\" already registered.',\n );\n }\n typeRegistry[caselessName] = registryItem;\n nameRegistry[caselessName] = name;\n}\n\n/**\n * Checks the given registry item for properties that are required based on the\n * type.\n *\n * @param type The type of the plugin. (e.g. Field, Renderer)\n * @param registryItem A class or object that we are checking for the required\n * properties.\n */\nfunction validate(type: string, registryItem: Function | AnyDuringMigration) {\n switch (type) {\n case String(Type.FIELD):\n if (typeof registryItem.fromJson !== 'function') {\n throw Error('Type \"' + type + '\" must have a fromJson function');\n }\n break;\n }\n}\n\n/**\n * Unregisters the registry item with the given type and name.\n *\n * @param type The type of the plugin.\n * (e.g. Field, Renderer)\n * @param name The plugin's name. (Ex. field_angle, geras)\n */\nexport function unregister(type: string | Type, name: string) {\n type = `${type}`.toLowerCase();\n name = name.toLowerCase();\n const typeRegistry = typeMap[type];\n if (!typeRegistry || !typeRegistry[name]) {\n console.warn(\n 'Unable to unregister [' +\n name +\n '][' +\n type +\n '] from the ' +\n 'registry.',\n );\n return;\n }\n delete typeMap[type][name];\n delete nameMap[type][name];\n}\n\n/**\n * Gets the registry item for the given name and type. This can be either a\n * class or an object.\n *\n * @param type The type of the plugin.\n * (e.g. Field, Renderer)\n * @param name The plugin's name. (Ex. field_angle, geras)\n * @param opt_throwIfMissing Whether or not to throw an error if we are unable\n * to find the plugin.\n * @returns The class or object with the given name and type or null if none\n * exists.\n */\nfunction getItem(\n type: string | Type,\n name: string,\n opt_throwIfMissing?: boolean,\n): (new (...p1: AnyDuringMigration[]) => T) | null | AnyDuringMigration {\n type = `${type}`.toLowerCase();\n name = name.toLowerCase();\n const typeRegistry = typeMap[type];\n if (!typeRegistry || !typeRegistry[name]) {\n const msg = 'Unable to find [' + name + '][' + type + '] in the registry.';\n if (opt_throwIfMissing) {\n throw new Error(\n msg + ' You must require or register a ' + type + ' plugin.',\n );\n } else {\n console.warn(msg);\n }\n return null;\n }\n return typeRegistry[name];\n}\n\n/**\n * Returns whether or not the registry contains an item with the given type and\n * name.\n *\n * @param type The type of the plugin.\n * (e.g. Field, Renderer)\n * @param name The plugin's name. (Ex. field_angle, geras)\n * @returns True if the registry has an item with the given type and name, false\n * otherwise.\n */\nexport function hasItem(type: string | Type, name: string): boolean {\n type = `${type}`.toLowerCase();\n name = name.toLowerCase();\n const typeRegistry = typeMap[type];\n if (!typeRegistry) {\n return false;\n }\n return !!typeRegistry[name];\n}\n\n/**\n * Gets the class for the given name and type.\n *\n * @param type The type of the plugin.\n * (e.g. Field, Renderer)\n * @param name The plugin's name. (Ex. field_angle, geras)\n * @param opt_throwIfMissing Whether or not to throw an error if we are unable\n * to find the plugin.\n * @returns The class with the given name and type or null if none exists.\n */\nexport function getClass(\n type: string | Type,\n name: string,\n opt_throwIfMissing?: boolean,\n): (new (...p1: AnyDuringMigration[]) => T) | null {\n return getItem(type, name, opt_throwIfMissing) as\n | (new (...p1: AnyDuringMigration[]) => T)\n | null;\n}\n\n/**\n * Gets the object for the given name and type.\n *\n * @param type The type of the plugin.\n * (e.g. Category)\n * @param name The plugin's name. (Ex. logic_category)\n * @param opt_throwIfMissing Whether or not to throw an error if we are unable\n * to find the object.\n * @returns The object with the given name and type or null if none exists.\n */\nexport function getObject(\n type: string | Type,\n name: string,\n opt_throwIfMissing?: boolean,\n): T | null {\n return getItem(type, name, opt_throwIfMissing) as T;\n}\n\n/**\n * Returns a map of items registered with the given type.\n *\n * @param type The type of the plugin. (e.g. Category)\n * @param opt_cased Whether or not to return a map with cased keys (rather than\n * caseless keys). False by default.\n * @param opt_throwIfMissing Whether or not to throw an error if we are unable\n * to find the object. False by default.\n * @returns A map of objects with the given type, or null if none exists.\n */\nexport function getAllItems(\n type: string | Type,\n opt_cased?: boolean,\n opt_throwIfMissing?: boolean,\n): {[key: string]: T | null | (new (...p1: AnyDuringMigration[]) => T)} | null {\n type = `${type}`.toLowerCase();\n const typeRegistry = typeMap[type];\n if (!typeRegistry) {\n const msg = `Unable to find [${type}] in the registry.`;\n if (opt_throwIfMissing) {\n throw new Error(`${msg} You must require or register a ${type} plugin.`);\n } else {\n console.warn(msg);\n }\n return null;\n }\n if (!opt_cased) {\n return typeRegistry;\n }\n const nameRegistry = nameMap[type];\n const casedRegistry = Object.create(null);\n for (const key of Object.keys(typeRegistry)) {\n casedRegistry[nameRegistry[key]] = typeRegistry[key];\n }\n return casedRegistry;\n}\n\n/**\n * Gets the class from Blockly options for the given type.\n * This is used for plugins that override a built in feature. (e.g. Toolbox)\n *\n * @param type The type of the plugin.\n * @param options The option object to check for the given plugin.\n * @param opt_throwIfMissing Whether or not to throw an error if we are unable\n * to find the plugin.\n * @returns The class for the plugin.\n */\nexport function getClassFromOptions(\n type: Type,\n options: Options,\n opt_throwIfMissing?: boolean,\n): (new (...p1: AnyDuringMigration[]) => T) | null {\n const plugin = options.plugins[String(type)] || DEFAULT;\n\n // If the user passed in a plugin class instead of a registered plugin name.\n if (typeof plugin === 'function') {\n return plugin;\n }\n return getClass(type, plugin, opt_throwIfMissing);\n}\n","/**\n * @license\n * Copyright 2021 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\n// Former goog.module ID: Blockly.common\n\n/* eslint-disable-next-line no-unused-vars */\nimport type {Block} from './block.js';\nimport {ISelectable} from './blockly.js';\nimport {BlockDefinition, Blocks} from './blocks.js';\nimport type {Connection} from './connection.js';\nimport type {Workspace} from './workspace.js';\nimport type {WorkspaceSvg} from './workspace_svg.js';\n\n/** Database of all workspaces. */\nconst WorkspaceDB_ = Object.create(null);\n\n/**\n * Find the workspace with the specified ID.\n *\n * @param id ID of workspace to find.\n * @returns The sought after workspace or null if not found.\n */\nexport function getWorkspaceById(id: string): Workspace | null {\n return WorkspaceDB_[id] || null;\n}\n\n/**\n * Find all workspaces.\n *\n * @returns Array of workspaces.\n */\nexport function getAllWorkspaces(): Workspace[] {\n const workspaces = [];\n for (const workspaceId in WorkspaceDB_) {\n workspaces.push(WorkspaceDB_[workspaceId]);\n }\n return workspaces;\n}\n\n/**\n * Register a workspace in the workspace db.\n *\n * @param workspace\n */\nexport function registerWorkspace(workspace: Workspace) {\n WorkspaceDB_[workspace.id] = workspace;\n}\n\n/**\n * Unregister a workspace from the workspace db.\n *\n * @param workspace\n */\nexport function unregisterWorkpace(workspace: Workspace) {\n delete WorkspaceDB_[workspace.id];\n}\n\n/**\n * The main workspace most recently used.\n * Set by Blockly.WorkspaceSvg.prototype.markFocused\n */\nlet mainWorkspace: Workspace;\n\n/**\n * Returns the last used top level workspace (based on focus). Try not to use\n * this function, particularly if there are multiple Blockly instances on a\n * page.\n *\n * @returns The main workspace.\n */\nexport function getMainWorkspace(): Workspace {\n return mainWorkspace;\n}\n\n/**\n * Sets last used main workspace.\n *\n * @param workspace The most recently used top level workspace.\n */\nexport function setMainWorkspace(workspace: Workspace) {\n mainWorkspace = workspace;\n}\n\n/**\n * Currently selected copyable object.\n */\nlet selected: ISelectable | null = null;\n\n/**\n * Returns the currently selected copyable object.\n */\nexport function getSelected(): ISelectable | null {\n return selected;\n}\n\n/**\n * Sets the currently selected block. This function does not visually mark the\n * block as selected or fire the required events. If you wish to\n * programmatically select a block, use `BlockSvg#select`.\n *\n * @param newSelection The newly selected block.\n * @internal\n */\nexport function setSelected(newSelection: ISelectable | null) {\n selected = newSelection;\n}\n\n/**\n * Container element in which to render the WidgetDiv, DropDownDiv and Tooltip.\n */\nlet parentContainer: Element | null;\n\n/**\n * Get the container element in which to render the WidgetDiv, DropDownDiv and\n * Tooltip.\n *\n * @returns The parent container.\n */\nexport function getParentContainer(): Element | null {\n return parentContainer;\n}\n\n/**\n * Set the parent container. This is the container element that the WidgetDiv,\n * DropDownDiv, and Tooltip are rendered into the first time `Blockly.inject`\n * is called.\n * This method is a NOP if called after the first `Blockly.inject`.\n *\n * @param newParent The container element.\n */\nexport function setParentContainer(newParent: Element) {\n parentContainer = newParent;\n}\n\n/**\n * Size the SVG image to completely fill its container. Call this when the view\n * actually changes sizes (e.g. on a window resize/device orientation change).\n * See workspace.resizeContents to resize the workspace when the contents\n * change (e.g. when a block is added or removed).\n * Record the height/width of the SVG image.\n *\n * @param workspace Any workspace in the SVG.\n */\nexport function svgResize(workspace: WorkspaceSvg) {\n let mainWorkspace = workspace;\n while (mainWorkspace.options.parentWorkspace) {\n mainWorkspace = mainWorkspace.options.parentWorkspace;\n }\n const svg = mainWorkspace.getParentSvg();\n const cachedSize = mainWorkspace.getCachedParentSvgSize();\n const div = svg.parentElement;\n if (!(div instanceof HTMLElement)) {\n // Workspace deleted, or something.\n return;\n }\n\n const width = div.offsetWidth;\n const height = div.offsetHeight;\n if (cachedSize.width !== width) {\n svg.setAttribute('width', width + 'px');\n mainWorkspace.setCachedParentSvgSize(width, null);\n }\n if (cachedSize.height !== height) {\n svg.setAttribute('height', height + 'px');\n mainWorkspace.setCachedParentSvgSize(null, height);\n }\n mainWorkspace.resize();\n}\n\n/**\n * All of the connections on blocks that are currently being dragged.\n */\nexport const draggingConnections: Connection[] = [];\n\n/**\n * Get a map of all the block's descendants mapping their type to the number of\n * children with that type.\n *\n * @param block The block to map.\n * @param opt_stripFollowing Optionally ignore all following\n * statements (blocks that are not inside a value or statement input\n * of the block).\n * @returns Map of types to type counts for descendants of the bock.\n */\nexport function getBlockTypeCounts(\n block: Block,\n opt_stripFollowing?: boolean,\n): {[key: string]: number} {\n const typeCountsMap = Object.create(null);\n const descendants = block.getDescendants(true);\n if (opt_stripFollowing) {\n const nextBlock = block.getNextBlock();\n if (nextBlock) {\n const index = descendants.indexOf(nextBlock);\n descendants.splice(index, descendants.length - index);\n }\n }\n for (let i = 0, checkBlock; (checkBlock = descendants[i]); i++) {\n if (typeCountsMap[checkBlock.type]) {\n typeCountsMap[checkBlock.type]++;\n } else {\n typeCountsMap[checkBlock.type] = 1;\n }\n }\n return typeCountsMap;\n}\n\n/**\n * Helper function for defining a block from JSON. The resulting function has\n * the correct value of jsonDef at the point in code where jsonInit is called.\n *\n * @param jsonDef The JSON definition of a block.\n * @returns A function that calls jsonInit with the correct value\n * of jsonDef.\n */\nfunction jsonInitFactory(jsonDef: AnyDuringMigration): () => void {\n return function (this: Block) {\n this.jsonInit(jsonDef);\n };\n}\n\n/**\n * Define blocks from an array of JSON block definitions, as might be generated\n * by the Blockly Developer Tools.\n *\n * @param jsonArray An array of JSON block definitions.\n */\nexport function defineBlocksWithJsonArray(jsonArray: AnyDuringMigration[]) {\n TEST_ONLY.defineBlocksWithJsonArrayInternal(jsonArray);\n}\n\n/**\n * Private version of defineBlocksWithJsonArray for stubbing in tests.\n */\nfunction defineBlocksWithJsonArrayInternal(jsonArray: AnyDuringMigration[]) {\n defineBlocks(createBlockDefinitionsFromJsonArray(jsonArray));\n}\n\n/**\n * Define blocks from an array of JSON block definitions, as might be generated\n * by the Blockly Developer Tools.\n *\n * @param jsonArray An array of JSON block definitions.\n * @returns A map of the block\n * definitions created.\n */\nexport function createBlockDefinitionsFromJsonArray(\n jsonArray: AnyDuringMigration[],\n): {[key: string]: BlockDefinition} {\n const blocks: {[key: string]: BlockDefinition} = {};\n for (let i = 0; i < jsonArray.length; i++) {\n const elem = jsonArray[i];\n if (!elem) {\n console.warn(`Block definition #${i} in JSON array is ${elem}. Skipping`);\n continue;\n }\n const type = elem['type'];\n if (!type) {\n console.warn(\n `Block definition #${i} in JSON array is missing a type attribute. ` +\n 'Skipping.',\n );\n continue;\n }\n blocks[type] = {init: jsonInitFactory(elem)};\n }\n return blocks;\n}\n\n/**\n * Add the specified block definitions to the block definitions\n * dictionary (Blockly.Blocks).\n *\n * @param blocks A map of block\n * type names to block definitions.\n */\nexport function defineBlocks(blocks: {[key: string]: BlockDefinition}) {\n // Iterate over own enumerable properties.\n for (const type of Object.keys(blocks)) {\n const definition = blocks[type];\n if (type in Blocks) {\n console.warn(`Block definiton \"${type}\" overwrites previous definition.`);\n }\n Blocks[type] = definition;\n }\n}\n\nexport const TEST_ONLY = {defineBlocksWithJsonArrayInternal};\n","/**\n * @license\n * Copyright 2019 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\n// Former goog.module ID: Blockly.utils.idGenerator\n\n/**\n * Legal characters for the universally unique IDs. Should be all on\n * a US keyboard. No characters that conflict with XML or JSON.\n * Requests to remove additional 'problematic' characters from this\n * soup will be denied. That's your failure to properly escape in\n * your own environment. Issues #251, #625, #682, #1304.\n */\nconst soup =\n '!#$%()*+,-./:;=?@[]^_`{|}~' +\n 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';\n\n/**\n * Namespace object for internal implementations we want to be able to\n * stub in tests. Do not use externally.\n *\n * @internal\n */\nconst internal = {\n /**\n * Generate a random unique ID. This should be globally unique.\n * 87 characters ^ 20 length is greater than 128 bits (better than a UUID).\n *\n * @returns A globally unique ID string.\n */\n genUid: () => {\n const length = 20;\n const soupLength = soup.length;\n const id = [];\n for (let i = 0; i < length; i++) {\n id[i] = soup.charAt(Math.random() * soupLength);\n }\n return id.join('');\n },\n};\nexport const TEST_ONLY = internal;\n\n/** Next unique ID to use. */\nlet nextId = 0;\n\n/**\n * Generate the next unique element IDs.\n * IDs are compatible with the HTML4 'id' attribute restrictions:\n * Use only ASCII letters, digits, '_', '-' and '.'\n *\n * For UUIDs use genUid (below) instead; this ID generator should\n * primarily be used for IDs that end up in the DOM.\n *\n * @returns The next unique identifier.\n */\nexport function getNextUniqueId(): string {\n return 'blockly-' + (nextId++).toString(36);\n}\n\n/**\n * Generate a random unique ID.\n *\n * @see internal.genUid\n * @returns A globally unique ID string.\n */\nexport function genUid(): string {\n return internal.genUid();\n}\n","/**\n * @license\n * Copyright 2021 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\n// Former goog.module ID: Blockly.Events.utils\n\nimport type {Block} from '../block.js';\nimport * as common from '../common.js';\nimport * as registry from '../registry.js';\nimport * as idGenerator from '../utils/idgenerator.js';\nimport type {Workspace} from '../workspace.js';\nimport type {WorkspaceSvg} from '../workspace_svg.js';\n\nimport type {Abstract} from './events_abstract.js';\nimport type {BlockChange} from './events_block_change.js';\nimport type {BlockCreate} from './events_block_create.js';\nimport type {BlockMove} from './events_block_move.js';\nimport type {CommentCreate} from './events_comment_create.js';\nimport type {CommentMove} from './events_comment_move.js';\nimport type {ViewportChange} from './events_viewport.js';\n\n/** Group ID for new events. Grouped events are indivisible. */\nlet group = '';\n\n/** Sets whether the next event should be added to the undo stack. */\nlet recordUndo = true;\n\n/**\n * Sets whether events should be added to the undo stack.\n *\n * @param newValue True if events should be added to the undo stack.\n */\nexport function setRecordUndo(newValue: boolean) {\n recordUndo = newValue;\n}\n\n/**\n * Returns whether or not events will be added to the undo stack.\n *\n * @returns True if events will be added to the undo stack.\n */\nexport function getRecordUndo(): boolean {\n return recordUndo;\n}\n\n/** Allow change events to be created and fired. */\nlet disabled = 0;\n\n/**\n * Name of event that creates a block. Will be deprecated for BLOCK_CREATE.\n */\nexport const CREATE = 'create';\n\n/**\n * Name of event that creates a block.\n */\nexport const BLOCK_CREATE = CREATE;\n\n/**\n * Name of event that deletes a block. Will be deprecated for BLOCK_DELETE.\n */\nexport const DELETE = 'delete';\n\n/**\n * Name of event that deletes a block.\n */\nexport const BLOCK_DELETE = DELETE;\n\n/**\n * Name of event that changes a block. Will be deprecated for BLOCK_CHANGE.\n */\nexport const CHANGE = 'change';\n\n/**\n * Name of event that changes a block.\n */\nexport const BLOCK_CHANGE = CHANGE;\n\n/**\n * Name of event representing an in-progress change to a field of a block, which\n * is expected to be followed by a block change event.\n */\nexport const BLOCK_FIELD_INTERMEDIATE_CHANGE =\n 'block_field_intermediate_change';\n\n/**\n * Name of event that moves a block. Will be deprecated for BLOCK_MOVE.\n */\nexport const MOVE = 'move';\n\n/**\n * Name of event that moves a block.\n */\nexport const BLOCK_MOVE = MOVE;\n\n/**\n * Name of event that creates a variable.\n */\nexport const VAR_CREATE = 'var_create';\n\n/**\n * Name of event that deletes a variable.\n */\nexport const VAR_DELETE = 'var_delete';\n\n/**\n * Name of event that renames a variable.\n */\nexport const VAR_RENAME = 'var_rename';\n\n/**\n * Name of generic event that records a UI change.\n */\nexport const UI = 'ui';\n\n/**\n * Name of event that record a block drags a block.\n */\nexport const BLOCK_DRAG = 'drag';\n\n/**\n * Name of event that records a change in selected element.\n */\nexport const SELECTED = 'selected';\n\n/**\n * Name of event that records a click.\n */\nexport const CLICK = 'click';\n\n/**\n * Name of event that records a marker move.\n */\nexport const MARKER_MOVE = 'marker_move';\n\n/**\n * Name of event that records a bubble open.\n */\nexport const BUBBLE_OPEN = 'bubble_open';\n\n/**\n * Name of event that records a trashcan open.\n */\nexport const TRASHCAN_OPEN = 'trashcan_open';\n\n/**\n * Name of event that records a toolbox item select.\n */\nexport const TOOLBOX_ITEM_SELECT = 'toolbox_item_select';\n\n/**\n * Name of event that records a theme change.\n */\nexport const THEME_CHANGE = 'theme_change';\n\n/**\n * Name of event that records a viewport change.\n */\nexport const VIEWPORT_CHANGE = 'viewport_change';\n\n/**\n * Name of event that creates a comment.\n */\nexport const COMMENT_CREATE = 'comment_create';\n\n/**\n * Name of event that deletes a comment.\n */\nexport const COMMENT_DELETE = 'comment_delete';\n\n/**\n * Name of event that changes a comment.\n */\nexport const COMMENT_CHANGE = 'comment_change';\n\n/**\n * Name of event that moves a comment.\n */\nexport const COMMENT_MOVE = 'comment_move';\n\n/**\n * Name of event that records a workspace load.\n */\nexport const FINISHED_LOADING = 'finished_loading';\n\n/**\n * Type of events that cause objects to be bumped back into the visible\n * portion of the workspace.\n *\n * Not to be confused with bumping so that disconnected connections do not\n * appear connected.\n */\nexport type BumpEvent = BlockCreate | BlockMove | CommentCreate | CommentMove;\n\n/**\n * List of events that cause objects to be bumped back into the visible\n * portion of the workspace.\n *\n * Not to be confused with bumping so that disconnected connections do not\n * appear connected.\n */\nexport const BUMP_EVENTS: string[] = [\n BLOCK_CREATE,\n BLOCK_MOVE,\n COMMENT_CREATE,\n COMMENT_MOVE,\n];\n\n/** List of events queued for firing. */\nconst FIRE_QUEUE: Abstract[] = [];\n\n/**\n * Create a custom event and fire it.\n *\n * @param event Custom data for event.\n */\nexport function fire(event: Abstract) {\n TEST_ONLY.fireInternal(event);\n}\n\n/**\n * Private version of fireInternal for stubbing in tests.\n */\nfunction fireInternal(event: Abstract) {\n if (!isEnabled()) {\n return;\n }\n if (!FIRE_QUEUE.length) {\n // First event added; schedule a firing of the event queue.\n try {\n // If we are in a browser context, we want to make sure that the event\n // fires after blocks have been rerendered this frame.\n requestAnimationFrame(() => {\n setTimeout(fireNow, 0);\n });\n } catch (e) {\n // Otherwise we just want to delay so events can be coallesced.\n // requestAnimationFrame will error triggering this.\n setTimeout(fireNow, 0);\n }\n }\n FIRE_QUEUE.push(event);\n}\n\n/** Fire all queued events. */\nfunction fireNow() {\n const queue = filter(FIRE_QUEUE, true);\n FIRE_QUEUE.length = 0;\n for (let i = 0, event; (event = queue[i]); i++) {\n if (!event.workspaceId) {\n continue;\n }\n const eventWorkspace = common.getWorkspaceById(event.workspaceId);\n if (eventWorkspace) {\n eventWorkspace.fireChangeListener(event);\n }\n }\n\n // Post-filter the undo stack to squash and remove any events that result in\n // a null event\n\n // 1. Determine which workspaces will need to have their undo stacks validated\n const workspaceIds = new Set(queue.map((e) => e.workspaceId));\n for (const workspaceId of workspaceIds) {\n // Only process valid workspaces\n if (!workspaceId) {\n continue;\n }\n const eventWorkspace = common.getWorkspaceById(workspaceId);\n if (!eventWorkspace) {\n continue;\n }\n\n // Find the last contiguous group of events on the stack\n const undoStack = eventWorkspace.getUndoStack();\n let i;\n let group: string | undefined = undefined;\n for (i = undoStack.length; i > 0; i--) {\n const event = undoStack[i - 1];\n if (event.group === '') {\n break;\n } else if (group === undefined) {\n group = event.group;\n } else if (event.group !== group) {\n break;\n }\n }\n if (!group || i == undoStack.length - 1) {\n // Need a group of two or more events on the stack. Nothing to do here.\n continue;\n }\n\n // Extract the event group, filter, and add back to the undo stack\n let events = undoStack.splice(i, undoStack.length - i);\n events = filter(events, true);\n undoStack.push(...events);\n }\n}\n\n/**\n * Filter the queued events and merge duplicates.\n *\n * @param queueIn Array of events.\n * @param forward True if forward (redo), false if backward (undo).\n * @returns Array of filtered events.\n */\nexport function filter(queueIn: Abstract[], forward: boolean): Abstract[] {\n let queue = queueIn.slice();\n // Shallow copy of queue.\n if (!forward) {\n // Undo is merged in reverse order.\n queue.reverse();\n }\n const mergedQueue = [];\n const hash = Object.create(null);\n // Merge duplicates.\n for (let i = 0, event; (event = queue[i]); i++) {\n if (!event.isNull()) {\n // Treat all UI events as the same type in hash table.\n const eventType = event.isUiEvent ? UI : event.type;\n // TODO(#5927): Check whether `blockId` exists before accessing it.\n const blockId = (event as AnyDuringMigration).blockId;\n const key = [eventType, blockId, event.workspaceId].join(' ');\n\n const lastEntry = hash[key];\n const lastEvent = lastEntry ? lastEntry.event : null;\n if (!lastEntry) {\n // Each item in the hash table has the event and the index of that event\n // in the input array. This lets us make sure we only merge adjacent\n // move events.\n hash[key] = {event, index: i};\n mergedQueue.push(event);\n } else if (event.type === MOVE && lastEntry.index === i - 1) {\n const moveEvent = event as BlockMove;\n // Merge move events.\n lastEvent.newParentId = moveEvent.newParentId;\n lastEvent.newInputName = moveEvent.newInputName;\n lastEvent.newCoordinate = moveEvent.newCoordinate;\n if (moveEvent.reason) {\n if (lastEvent.reason) {\n // Concatenate reasons without duplicates.\n const reasonSet = new Set(\n moveEvent.reason.concat(lastEvent.reason),\n );\n lastEvent.reason = Array.from(reasonSet);\n } else {\n lastEvent.reason = moveEvent.reason;\n }\n }\n lastEntry.index = i;\n } else if (\n event.type === CHANGE &&\n (event as BlockChange).element === lastEvent.element &&\n (event as BlockChange).name === lastEvent.name\n ) {\n const changeEvent = event as BlockChange;\n // Merge change events.\n lastEvent.newValue = changeEvent.newValue;\n } else if (event.type === VIEWPORT_CHANGE) {\n const viewportEvent = event as ViewportChange;\n // Merge viewport change events.\n lastEvent.viewTop = viewportEvent.viewTop;\n lastEvent.viewLeft = viewportEvent.viewLeft;\n lastEvent.scale = viewportEvent.scale;\n lastEvent.oldScale = viewportEvent.oldScale;\n } else if (event.type === CLICK && lastEvent.type === BUBBLE_OPEN) {\n // Drop click events caused by opening/closing bubbles.\n } else {\n // Collision: newer events should merge into this event to maintain\n // order.\n hash[key] = {event, index: i};\n mergedQueue.push(event);\n }\n }\n }\n // Filter out any events that have become null due to merging.\n queue = mergedQueue.filter(function (e) {\n return !e.isNull();\n });\n if (!forward) {\n // Restore undo order.\n queue.reverse();\n }\n // Move mutation events to the top of the queue.\n // Intentionally skip first event.\n for (let i = 1, event; (event = queue[i]); i++) {\n // AnyDuringMigration because: Property 'element' does not exist on type\n // 'Abstract'.\n if (\n event.type === CHANGE &&\n (event as AnyDuringMigration).element === 'mutation'\n ) {\n queue.unshift(queue.splice(i, 1)[0]);\n }\n }\n return queue;\n}\n\n/**\n * Modify pending undo events so that when they are fired they don't land\n * in the undo stack. Called by Workspace.clearUndo.\n */\nexport function clearPendingUndo() {\n for (let i = 0, event; (event = FIRE_QUEUE[i]); i++) {\n event.recordUndo = false;\n }\n}\n\n/**\n * Stop sending events. Every call to this function MUST also call enable.\n */\nexport function disable() {\n disabled++;\n}\n\n/**\n * Start sending events. Unless events were already disabled when the\n * corresponding call to disable was made.\n */\nexport function enable() {\n disabled--;\n}\n\n/**\n * Returns whether events may be fired or not.\n *\n * @returns True if enabled.\n */\nexport function isEnabled(): boolean {\n return disabled === 0;\n}\n\n/**\n * Current group.\n *\n * @returns ID string.\n */\nexport function getGroup(): string {\n return group;\n}\n\n/**\n * Start or stop a group.\n *\n * @param state True to start new group, false to end group.\n * String to set group explicitly.\n */\nexport function setGroup(state: boolean | string) {\n TEST_ONLY.setGroupInternal(state);\n}\n\n/**\n * Private version of setGroup for stubbing in tests.\n */\nfunction setGroupInternal(state: boolean | string) {\n if (typeof state === 'boolean') {\n group = state ? idGenerator.genUid() : '';\n } else {\n group = state;\n }\n}\n\n/**\n * Compute a list of the IDs of the specified block and all its descendants.\n *\n * @param block The root block.\n * @returns List of block IDs.\n * @internal\n */\nexport function getDescendantIds(block: Block): string[] {\n const ids = [];\n const descendants = block.getDescendants(false);\n for (let i = 0, descendant; (descendant = descendants[i]); i++) {\n ids[i] = descendant.id;\n }\n return ids;\n}\n\n/**\n * Decode the JSON into an event.\n *\n * @param json JSON representation.\n * @param workspace Target workspace for event.\n * @returns The event represented by the JSON.\n * @throws {Error} if an event type is not found in the registry.\n */\nexport function fromJson(\n json: AnyDuringMigration,\n workspace: Workspace,\n): Abstract {\n const eventClass = get(json['type']);\n if (!eventClass) throw Error('Unknown event type.');\n\n return (eventClass as any).fromJson(json, workspace);\n}\n\n/**\n * Gets the class for a specific event type from the registry.\n *\n * @param eventType The type of the event to get.\n * @returns The event class with the given type.\n */\nexport function get(\n eventType: string,\n): new (...p1: AnyDuringMigration[]) => Abstract {\n const event = registry.getClass(registry.Type.EVENT, eventType);\n if (!event) {\n throw new Error(`Event type ${eventType} not found in registry.`);\n }\n return event;\n}\n\n/**\n * Enable/disable a block depending on whether it is properly connected.\n * Use this on applications where all blocks should be connected to a top block.\n * Recommend setting the 'disable' option to 'false' in the config so that\n * users don't try to re-enable disabled orphan blocks.\n *\n * @param event Custom data for event.\n */\nexport function disableOrphans(event: Abstract) {\n if (event.type === MOVE || event.type === CREATE) {\n const blockEvent = event as BlockMove | BlockCreate;\n if (!blockEvent.workspaceId) {\n return;\n }\n const eventWorkspace = common.getWorkspaceById(\n blockEvent.workspaceId,\n ) as WorkspaceSvg;\n if (!blockEvent.blockId) {\n throw new Error('Encountered a blockEvent without a proper blockId');\n }\n let block = eventWorkspace.getBlockById(blockEvent.blockId);\n if (block) {\n // Changing blocks as part of this event shouldn't be undoable.\n const initialUndoFlag = recordUndo;\n try {\n recordUndo = false;\n const parent = block.getParent();\n if (parent && parent.isEnabled()) {\n const children = block.getDescendants(false);\n for (let i = 0, child; (child = children[i]); i++) {\n child.setEnabled(true);\n }\n } else if (\n (block.outputConnection || block.previousConnection) &&\n !eventWorkspace.isDragging()\n ) {\n do {\n block.setEnabled(false);\n block = block.getNextBlock();\n } while (block);\n }\n } finally {\n recordUndo = initialUndoFlag;\n }\n }\n }\n}\n\nexport const TEST_ONLY = {\n FIRE_QUEUE,\n fireNow,\n fireInternal,\n setGroupInternal,\n};\n","/**\n * @license\n * Copyright 2016 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\n// Former goog.module ID: Blockly.Touch\n\nimport type {Gesture} from './gesture.js';\n\n/** Length in ms for a touch to become a long press. */\nconst LONGPRESS = 750;\n\n/**\n * Whether touch is enabled in the browser.\n * Copied from Closure's goog.events.BrowserFeature.TOUCH_ENABLED\n */\nexport const TOUCH_ENABLED =\n 'ontouchstart' in globalThis ||\n !!(\n globalThis['document'] &&\n document.documentElement &&\n 'ontouchstart' in document.documentElement\n ) || // IE10 uses non-standard touch events,\n // so it has a different check.\n !!(\n globalThis['navigator'] &&\n (globalThis['navigator']['maxTouchPoints'] ||\n (globalThis['navigator'] as any)['msMaxTouchPoints'])\n );\n\n/** Which touch events are we currently paying attention to? */\nlet touchIdentifier_: string | null = null;\n\n/**\n * The TOUCH_MAP lookup dictionary specifies additional touch events to fire,\n * in conjunction with mouse events.\n */\nexport const TOUCH_MAP: {[key: string]: string[]} = {\n 'mousedown': ['pointerdown'],\n 'mouseenter': ['pointerenter'],\n 'mouseleave': ['pointerleave'],\n 'mousemove': ['pointermove'],\n 'mouseout': ['pointerout'],\n 'mouseover': ['pointerover'],\n 'mouseup': ['pointerup', 'pointercancel'],\n 'touchend': ['pointerup'],\n 'touchcancel': ['pointercancel'],\n};\n\n/** PID of queued long-press task. */\nlet longPid_: AnyDuringMigration = 0;\n\n/**\n * Context menus on touch devices are activated using a long-press.\n * Unfortunately the contextmenu touch event is currently (2015) only supported\n * by Chrome. This function is fired on any touchstart event, queues a task,\n * which after about a second opens the context menu. The tasks is killed\n * if the touch event terminates early.\n *\n * @param e Touch start event.\n * @param gesture The gesture that triggered this longStart.\n * @internal\n */\nexport function longStart(e: PointerEvent, gesture: Gesture) {\n longStop();\n longPid_ = setTimeout(function () {\n // Let the gesture route the right-click correctly.\n if (gesture) {\n gesture.handleRightClick(e);\n }\n }, LONGPRESS);\n}\n\n/**\n * Nope, that's not a long-press. Either touchend or touchcancel was fired,\n * or a drag hath begun. Kill the queued long-press task.\n *\n * @internal\n */\nexport function longStop() {\n if (longPid_) {\n clearTimeout(longPid_);\n longPid_ = 0;\n }\n}\n\n/**\n * Clear the touch identifier that tracks which touch stream to pay attention\n * to. This ends the current drag/gesture and allows other pointers to be\n * captured.\n */\nexport function clearTouchIdentifier() {\n touchIdentifier_ = null;\n}\n\n/**\n * Decide whether Blockly should handle or ignore this event.\n * Mouse and touch events require special checks because we only want to deal\n * with one touch stream at a time. All other events should always be handled.\n *\n * @param e The event to check.\n * @returns True if this event should be passed through to the registered\n * handler; false if it should be blocked.\n */\nexport function shouldHandleEvent(e: Event): boolean {\n // Do not replace the startsWith with a check for `instanceof PointerEvent`.\n // `click` and `contextmenu` are PointerEvents in some browsers,\n // despite not starting with `pointer`, but we want to always handle them\n // without worrying about touch identifiers.\n return (\n !e.type.startsWith('pointer') ||\n (e instanceof PointerEvent && checkTouchIdentifier(e))\n );\n}\n\n/**\n * Get the pointer identifier from the given event.\n *\n * @param e Pointer event.\n * @returns The pointerId of the event.\n */\nexport function getTouchIdentifierFromEvent(e: PointerEvent): string {\n return `${e.pointerId}`;\n}\n\n/**\n * Check whether the pointer identifier on the event matches the current saved\n * identifier. If the current identifier was unset, save the identifier from\n * the event. This starts a drag/gesture, during which pointer events with\n * other identifiers will be silently ignored.\n *\n * @param e Pointer event.\n * @returns Whether the identifier on the event matches the current saved\n * identifier.\n */\nexport function checkTouchIdentifier(e: PointerEvent): boolean {\n const identifier = getTouchIdentifierFromEvent(e);\n\n if (touchIdentifier_) {\n // We're already tracking some touch/mouse event. Is this from the same\n // source?\n return touchIdentifier_ === identifier;\n }\n if (e.type === 'pointerdown') {\n // No identifier set yet, and this is the start of a drag. Set it and\n // return.\n touchIdentifier_ = identifier;\n return true;\n }\n // There was no identifier yet, but this wasn't a start event so we're going\n // to ignore it. This probably means that another drag finished while this\n // pointer was down.\n return false;\n}\n","/**\n * @license\n * Copyright 2021 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\n// Former goog.module ID: Blockly.browserEvents\n\nimport * as Touch from './touch.js';\nimport * as userAgent from './utils/useragent.js';\n\n/**\n * Blockly opaque event data used to unbind events when using\n * `bind` and `conditionalBind`.\n */\nexport type Data = [EventTarget, string, (e: Event) => void][];\n\n/**\n * The multiplier for scroll wheel deltas using the line delta mode.\n * See https://developer.mozilla.org/en-US/docs/Web/API/WheelEvent/deltaMode\n * for more information on deltaMode.\n */\nconst LINE_MODE_MULTIPLIER = 40;\n\n/**\n * The multiplier for scroll wheel deltas using the page delta mode.\n * See https://developer.mozilla.org/en-US/docs/Web/API/WheelEvent/deltaMode\n * for more information on deltaMode.\n */\nconst PAGE_MODE_MULTIPLIER = 125;\n\n/**\n * Bind an event handler that can be ignored if it is not part of the active\n * touch stream.\n * Use this for events that either start or continue a multi-part gesture (e.g.\n * mousedown or mousemove, which may be part of a drag or click).\n *\n * @param node Node upon which to listen.\n * @param name Event name to listen to (e.g. 'mousedown').\n * @param thisObject The value of 'this' in the function.\n * @param func Function to call when event is triggered.\n * @param opt_noCaptureIdentifier True if triggering on this event should not\n * block execution of other event handlers on this touch or other\n * simultaneous touches. False by default.\n * @returns Opaque data that can be passed to unbindEvent_.\n */\nexport function conditionalBind(\n node: EventTarget,\n name: string,\n thisObject: Object | null,\n func: Function,\n opt_noCaptureIdentifier?: boolean,\n): Data {\n /**\n *\n * @param e\n */\n function wrapFunc(e: Event) {\n const captureIdentifier = !opt_noCaptureIdentifier;\n\n if (!(captureIdentifier && !Touch.shouldHandleEvent(e))) {\n if (thisObject) {\n func.call(thisObject, e);\n } else {\n func(e);\n }\n }\n }\n\n const bindData: Data = [];\n if (name in Touch.TOUCH_MAP) {\n for (let i = 0; i < Touch.TOUCH_MAP[name].length; i++) {\n const type = Touch.TOUCH_MAP[name][i];\n node.addEventListener(type, wrapFunc, false);\n bindData.push([node, type, wrapFunc]);\n }\n } else {\n node.addEventListener(name, wrapFunc, false);\n bindData.push([node, name, wrapFunc]);\n }\n return bindData;\n}\n\n/**\n * Bind an event handler that should be called regardless of whether it is part\n * of the active touch stream.\n * Use this for events that are not part of a multi-part gesture (e.g.\n * mouseover for tooltips).\n *\n * @param node Node upon which to listen.\n * @param name Event name to listen to (e.g. 'mousedown').\n * @param thisObject The value of 'this' in the function.\n * @param func Function to call when event is triggered.\n * @returns Opaque data that can be passed to unbindEvent_.\n */\nexport function bind(\n node: EventTarget,\n name: string,\n thisObject: Object | null,\n func: Function,\n): Data {\n /**\n *\n * @param e\n */\n function wrapFunc(e: Event) {\n if (thisObject) {\n func.call(thisObject, e);\n } else {\n func(e);\n }\n }\n\n const bindData: Data = [];\n if (name in Touch.TOUCH_MAP) {\n for (let i = 0; i < Touch.TOUCH_MAP[name].length; i++) {\n const type = Touch.TOUCH_MAP[name][i];\n node.addEventListener(type, wrapFunc, false);\n bindData.push([node, type, wrapFunc]);\n }\n } else {\n node.addEventListener(name, wrapFunc, false);\n bindData.push([node, name, wrapFunc]);\n }\n return bindData;\n}\n\n/**\n * Unbind one or more events event from a function call.\n *\n * @param bindData Opaque data from bindEvent_.\n * This list is emptied during the course of calling this function.\n * @returns The function call.\n */\nexport function unbind(bindData: Data): (e: Event) => void {\n // Accessing an element of the last property of the array is unsafe if the\n // bindData is an empty array. But that should never happen because developers\n // should only pass Data from bind or conditionalBind.\n const callback = bindData[bindData.length - 1][2];\n while (bindData.length) {\n const [node, name, func] = bindData.pop()!;\n node.removeEventListener(name, func, false);\n }\n return callback;\n}\n\n/**\n * Returns true if this event is targeting a text input widget?\n *\n * @param e An event.\n * @returns True if text input.\n */\nexport function isTargetInput(e: Event): boolean {\n if (e.target instanceof HTMLElement) {\n if (\n e.target.isContentEditable ||\n e.target.getAttribute('data-is-text-input') === 'true'\n ) {\n return true;\n }\n\n if (e.target instanceof HTMLInputElement) {\n const target = e.target;\n return (\n target.type === 'text' ||\n target.type === 'number' ||\n target.type === 'email' ||\n target.type === 'password' ||\n target.type === 'search' ||\n target.type === 'tel' ||\n target.type === 'url'\n );\n }\n\n if (e.target instanceof HTMLTextAreaElement) {\n return true;\n }\n }\n\n return false;\n}\n\n/**\n * Returns true this event is a right-click.\n *\n * @param e Mouse event.\n * @returns True if right-click.\n */\nexport function isRightButton(e: MouseEvent): boolean {\n if (e.ctrlKey && userAgent.MAC) {\n // Control-clicking on Mac OS X is treated as a right-click.\n // WebKit on Mac OS X fails to change button to 2 (but Gecko does).\n return true;\n }\n return e.button === 2;\n}\n\n/**\n * Returns the converted coordinates of the given mouse event.\n * The origin (0,0) is the top-left corner of the Blockly SVG.\n *\n * @param e Mouse event.\n * @param svg SVG element.\n * @param matrix Inverted screen CTM to use.\n * @returns Object with .x and .y properties.\n */\nexport function mouseToSvg(\n e: MouseEvent,\n svg: SVGSVGElement,\n matrix: SVGMatrix | null,\n): SVGPoint {\n const svgPoint = svg.createSVGPoint();\n svgPoint.x = e.clientX;\n svgPoint.y = e.clientY;\n\n if (!matrix) {\n matrix = svg.getScreenCTM()!.inverse();\n }\n return svgPoint.matrixTransform(matrix);\n}\n\n/**\n * Returns the scroll delta of a mouse event in pixel units.\n *\n * @param e Mouse event.\n * @returns Scroll delta object with .x and .y properties.\n */\nexport function getScrollDeltaPixels(e: WheelEvent): {x: number; y: number} {\n switch (e.deltaMode) {\n case 0x00: // Pixel mode.\n default:\n return {x: e.deltaX, y: e.deltaY};\n case 0x01: // Line mode.\n return {\n x: e.deltaX * LINE_MODE_MULTIPLIER,\n y: e.deltaY * LINE_MODE_MULTIPLIER,\n };\n case 0x02: // Page mode.\n return {\n x: e.deltaX * PAGE_MODE_MULTIPLIER,\n y: e.deltaY * PAGE_MODE_MULTIPLIER,\n };\n }\n}\n","/**\n * @license\n * Copyright 2021 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\n// Former goog.module ID: Blockly.utils.array\n\n/**\n * Removes the first occurrence of a particular value from an array.\n *\n * @param arr Array from which to remove value.\n * @param value Value to remove.\n * @returns True if an element was removed.\n * @internal\n */\nexport function removeElem(arr: Array, value: T): boolean {\n const i = arr.indexOf(value);\n if (i === -1) {\n return false;\n }\n arr.splice(i, 1);\n return true;\n}\n","/**\n * @license\n * Copyright 2013 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\n// Former goog.module ID: Blockly.Css\n\n/** Has CSS already been injected? */\nlet injected = false;\n\n/**\n * Add some CSS to the blob that will be injected later. Allows optional\n * components such as fields and the toolbox to store separate CSS.\n *\n * @param cssContent Multiline CSS string or an array of single lines of CSS.\n */\nexport function register(cssContent: string) {\n if (injected) {\n throw Error('CSS already injected');\n }\n content += '\\n' + cssContent;\n}\n\n/**\n * Inject the CSS into the DOM. This is preferable over using a regular CSS\n * file since:\n * a) It loads synchronously and doesn't force a redraw later.\n * b) It speeds up loading by not blocking on a separate HTTP transfer.\n * c) The CSS content may be made dynamic depending on init options.\n *\n * @param hasCss If false, don't inject CSS (providing CSS becomes the\n * document's responsibility).\n * @param pathToMedia Path from page to the Blockly media directory.\n */\nexport function inject(hasCss: boolean, pathToMedia: string) {\n // Only inject the CSS once.\n if (injected) {\n return;\n }\n injected = true;\n if (!hasCss) {\n return;\n }\n // Strip off any trailing slash (either Unix or Windows).\n const mediaPath = pathToMedia.replace(/[\\\\/]$/, '');\n const cssContent = content.replace(/<<>>/g, mediaPath);\n // Cleanup the collected css content after injecting it to the DOM.\n content = '';\n\n // Inject CSS tag at start of head.\n const cssNode = document.createElement('style');\n cssNode.id = 'blockly-common-style';\n const cssTextNode = document.createTextNode(cssContent);\n cssNode.appendChild(cssTextNode);\n document.head.insertBefore(cssNode, document.head.firstChild);\n}\n\n/**\n * The CSS content for Blockly.\n */\nlet content = `\n.blocklySvg {\n background-color: #fff;\n outline: none;\n overflow: hidden; /* IE overflows by default. */\n position: absolute;\n display: block;\n}\n\n.blocklyWidgetDiv {\n display: none;\n position: absolute;\n z-index: 99999; /* big value for bootstrap3 compatibility */\n}\n\n.injectionDiv {\n height: 100%;\n position: relative;\n overflow: hidden; /* So blocks in drag surface disappear at edges */\n touch-action: none;\n}\n\n.blocklyNonSelectable {\n user-select: none;\n -ms-user-select: none;\n -webkit-user-select: none;\n}\n\n.blocklyBlockCanvas.blocklyCanvasTransitioning,\n.blocklyBubbleCanvas.blocklyCanvasTransitioning {\n transition: transform .5s;\n}\n\n.blocklyTooltipDiv {\n background-color: #ffffc7;\n border: 1px solid #ddc;\n box-shadow: 4px 4px 20px 1px rgba(0,0,0,.15);\n color: #000;\n display: none;\n font: 9pt sans-serif;\n opacity: .9;\n padding: 2px;\n position: absolute;\n z-index: 100000; /* big value for bootstrap3 compatibility */\n}\n\n.blocklyDropDownDiv {\n position: absolute;\n left: 0;\n top: 0;\n z-index: 1000;\n display: none;\n border: 1px solid;\n border-color: #dadce0;\n background-color: #fff;\n border-radius: 2px;\n padding: 4px;\n box-shadow: 0 0 3px 1px rgba(0,0,0,.3);\n}\n\n.blocklyDropDownDiv.blocklyFocused {\n box-shadow: 0 0 6px 1px rgba(0,0,0,.3);\n}\n\n.blocklyDropDownContent {\n max-height: 300px; /* @todo: spec for maximum height. */\n overflow: auto;\n overflow-x: hidden;\n position: relative;\n}\n\n.blocklyDropDownArrow {\n position: absolute;\n left: 0;\n top: 0;\n width: 16px;\n height: 16px;\n z-index: -1;\n background-color: inherit;\n border-color: inherit;\n}\n\n.blocklyDropDownButton {\n display: inline-block;\n float: left;\n padding: 0;\n margin: 4px;\n border-radius: 4px;\n outline: none;\n border: 1px solid;\n transition: box-shadow .1s;\n cursor: pointer;\n}\n\n.blocklyArrowTop {\n border-top: 1px solid;\n border-left: 1px solid;\n border-top-left-radius: 4px;\n border-color: inherit;\n}\n\n.blocklyArrowBottom {\n border-bottom: 1px solid;\n border-right: 1px solid;\n border-bottom-right-radius: 4px;\n border-color: inherit;\n}\n\n.blocklyResizeSE {\n cursor: se-resize;\n fill: #aaa;\n}\n\n.blocklyResizeSW {\n cursor: sw-resize;\n fill: #aaa;\n}\n\n.blocklyResizeLine {\n stroke: #515A5A;\n stroke-width: 1;\n}\n\n.blocklyHighlightedConnectionPath {\n fill: none;\n stroke: #fc3;\n stroke-width: 4px;\n}\n\n.blocklyPathLight {\n fill: none;\n stroke-linecap: round;\n stroke-width: 1;\n}\n\n.blocklySelected>.blocklyPathLight {\n display: none;\n}\n\n.blocklyDraggable {\n cursor: grab;\n cursor: -webkit-grab;\n}\n\n.blocklyDragging {\n cursor: grabbing;\n cursor: -webkit-grabbing;\n}\n\n /* Changes cursor on mouse down. Not effective in Firefox because of\n https://bugzilla.mozilla.org/show_bug.cgi?id=771241 */\n.blocklyDraggable:active {\n cursor: grabbing;\n cursor: -webkit-grabbing;\n}\n\n.blocklyDragging.blocklyDraggingDelete {\n cursor: url(\"<<>>/handdelete.cur\"), auto;\n}\n\n.blocklyDragging>.blocklyPath,\n.blocklyDragging>.blocklyPathLight {\n fill-opacity: .8;\n stroke-opacity: .8;\n}\n\n.blocklyDragging>.blocklyPathDark {\n display: none;\n}\n\n.blocklyDisabled>.blocklyPath {\n fill-opacity: .5;\n stroke-opacity: .5;\n}\n\n.blocklyDisabled>.blocklyPathLight,\n.blocklyDisabled>.blocklyPathDark {\n display: none;\n}\n\n.blocklyInsertionMarker>.blocklyPath,\n.blocklyInsertionMarker>.blocklyPathLight,\n.blocklyInsertionMarker>.blocklyPathDark {\n fill-opacity: .2;\n stroke: none;\n}\n\n.blocklyMultilineText {\n font-family: monospace;\n}\n\n.blocklyNonEditableText>text {\n pointer-events: none;\n}\n\n.blocklyFlyout {\n position: absolute;\n z-index: 20;\n}\n\n.blocklyText text {\n cursor: default;\n}\n\n/*\n Don't allow users to select text. It gets annoying when trying to\n drag a block and selected text moves instead.\n*/\n.blocklySvg text {\n user-select: none;\n -ms-user-select: none;\n -webkit-user-select: none;\n cursor: inherit;\n}\n\n.blocklyHidden {\n display: none;\n}\n\n.blocklyFieldDropdown:not(.blocklyHidden) {\n display: block;\n}\n\n.blocklyIconGroup {\n cursor: default;\n}\n\n.blocklyIconGroup:not(:hover),\n.blocklyIconGroupReadonly {\n opacity: .6;\n}\n\n.blocklyIconShape {\n fill: #00f;\n stroke: #fff;\n stroke-width: 1px;\n}\n\n.blocklyIconSymbol {\n fill: #fff;\n}\n\n.blocklyMinimalBody {\n margin: 0;\n padding: 0;\n}\n\n.blocklyHtmlInput {\n border: none;\n border-radius: 4px;\n height: 100%;\n margin: 0;\n outline: none;\n padding: 0;\n width: 100%;\n text-align: center;\n display: block;\n box-sizing: border-box;\n}\n\n/* Remove the increase and decrease arrows on the field number editor */\ninput.blocklyHtmlInput[type=number]::-webkit-inner-spin-button,\ninput.blocklyHtmlInput[type=number]::-webkit-outer-spin-button {\n -webkit-appearance: none;\n margin: 0;\n}\n\ninput[type=number] {\n -moz-appearance: textfield;\n}\n\n.blocklyMainBackground {\n stroke-width: 1;\n stroke: #c6c6c6; /* Equates to #ddd due to border being off-pixel. */\n}\n\n.blocklyMutatorBackground {\n fill: #fff;\n stroke: #ddd;\n stroke-width: 1;\n}\n\n.blocklyFlyoutBackground {\n fill: #ddd;\n fill-opacity: .8;\n}\n\n.blocklyMainWorkspaceScrollbar {\n z-index: 20;\n}\n\n.blocklyFlyoutScrollbar {\n z-index: 30;\n}\n\n.blocklyScrollbarHorizontal,\n.blocklyScrollbarVertical {\n position: absolute;\n outline: none;\n}\n\n.blocklyScrollbarBackground {\n opacity: 0;\n}\n\n.blocklyScrollbarHandle {\n fill: #ccc;\n}\n\n.blocklyScrollbarBackground:hover+.blocklyScrollbarHandle,\n.blocklyScrollbarHandle:hover {\n fill: #bbb;\n}\n\n/* Darken flyout scrollbars due to being on a grey background. */\n/* By contrast, workspace scrollbars are on a white background. */\n.blocklyFlyout .blocklyScrollbarHandle {\n fill: #bbb;\n}\n\n.blocklyFlyout .blocklyScrollbarBackground:hover+.blocklyScrollbarHandle,\n.blocklyFlyout .blocklyScrollbarHandle:hover {\n fill: #aaa;\n}\n\n.blocklyInvalidInput {\n background: #faa;\n}\n\n.blocklyVerticalMarker {\n stroke-width: 3px;\n fill: rgba(255,255,255,.5);\n pointer-events: none;\n}\n\n.blocklyComputeCanvas {\n position: absolute;\n width: 0;\n height: 0;\n}\n\n.blocklyNoPointerEvents {\n pointer-events: none;\n}\n\n.blocklyContextMenu {\n border-radius: 4px;\n max-height: 100%;\n}\n\n.blocklyDropdownMenu {\n border-radius: 2px;\n padding: 0 !important;\n}\n\n.blocklyDropdownMenu .blocklyMenuItem {\n /* 28px on the left for icon or checkbox. */\n padding-left: 28px;\n}\n\n/* BiDi override for the resting state. */\n.blocklyDropdownMenu .blocklyMenuItemRtl {\n /* Flip left/right padding for BiDi. */\n padding-left: 5px;\n padding-right: 28px;\n}\n\n.blocklyWidgetDiv .blocklyMenu {\n background: #fff;\n border: 1px solid transparent;\n box-shadow: 0 0 3px 1px rgba(0,0,0,.3);\n font: normal 13px Arial, sans-serif;\n margin: 0;\n outline: none;\n padding: 4px 0;\n position: absolute;\n overflow-y: auto;\n overflow-x: hidden;\n max-height: 100%;\n z-index: 20000; /* Arbitrary, but some apps depend on it... */\n}\n\n.blocklyWidgetDiv .blocklyMenu.blocklyFocused {\n box-shadow: 0 0 6px 1px rgba(0,0,0,.3);\n}\n\n.blocklyDropDownDiv .blocklyMenu {\n background: inherit; /* Compatibility with gapi, reset from goog-menu */\n border: inherit; /* Compatibility with gapi, reset from goog-menu */\n font: normal 13px \"Helvetica Neue\", Helvetica, sans-serif;\n outline: none;\n position: relative; /* Compatibility with gapi, reset from goog-menu */\n z-index: 20000; /* Arbitrary, but some apps depend on it... */\n}\n\n/* State: resting. */\n.blocklyMenuItem {\n border: none;\n color: #000;\n cursor: pointer;\n list-style: none;\n margin: 0;\n /* 7em on the right for shortcut. */\n min-width: 7em;\n padding: 6px 15px;\n white-space: nowrap;\n}\n\n/* State: disabled. */\n.blocklyMenuItemDisabled {\n color: #ccc;\n cursor: inherit;\n}\n\n/* State: hover. */\n.blocklyMenuItemHighlight {\n background-color: rgba(0,0,0,.1);\n}\n\n/* State: selected/checked. */\n.blocklyMenuItemCheckbox {\n height: 16px;\n position: absolute;\n width: 16px;\n}\n\n.blocklyMenuItemSelected .blocklyMenuItemCheckbox {\n background: url(<<>>/sprites.png) no-repeat -48px -16px;\n float: left;\n margin-left: -24px;\n position: static; /* Scroll with the menu. */\n}\n\n.blocklyMenuItemRtl .blocklyMenuItemCheckbox {\n float: right;\n margin-right: -24px;\n}\n`;\n","/**\n * @license\n * Copyright 2020 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\n// Former goog.module ID: Blockly.utils.deprecation\n\n/**\n * Warn developers that a function or property is deprecated.\n *\n * @param name The name of the function or property.\n * @param deprecationDate The date of deprecation. Prefer 'version n.0.0'\n * format, and fall back to 'month yyyy' or 'quarter yyyy' format.\n * @param deletionDate The date of deletion. Prefer 'version n.0.0'\n * format, and fall back to 'month yyyy' or 'quarter yyyy' format.\n * @param opt_use The name of a function or property to use instead, if any.\n * @internal\n */\nexport function warn(\n name: string,\n deprecationDate: string,\n deletionDate: string,\n opt_use?: string,\n) {\n let msg =\n name +\n ' was deprecated in ' +\n deprecationDate +\n ' and will be deleted in ' +\n deletionDate +\n '.';\n if (opt_use) {\n msg += '\\nUse ' + opt_use + ' instead.';\n }\n console.warn(msg);\n}\n","/**\n * @license\n * Copyright 2019 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\n// Former goog.module ID: Blockly.utils.dom\n\nimport * as deprecation from './deprecation.js';\nimport type {Svg} from './svg.js';\n\n/**\n * Required name space for SVG elements.\n */\nexport const SVG_NS = 'http://www.w3.org/2000/svg';\n\n/**\n * Required name space for HTML elements.\n */\nexport const HTML_NS = 'http://www.w3.org/1999/xhtml';\n\n/**\n * Required name space for XLINK elements.\n */\nexport const XLINK_NS = 'http://www.w3.org/1999/xlink';\n\n/**\n * Node type constants.\n * https://developer.mozilla.org/en-US/docs/Web/API/Node/nodeType\n */\nexport enum NodeType {\n ELEMENT_NODE = 1,\n TEXT_NODE = 3,\n COMMENT_NODE = 8,\n}\n\n/** Temporary cache of text widths. */\nlet cacheWidths: {[key: string]: number} | null = null;\n\n/** Number of current references to cache. */\nlet cacheReference = 0;\n\n/** A HTML canvas context used for computing text width. */\nlet canvasContext: CanvasRenderingContext2D | null = null;\n\n/**\n * Helper method for creating SVG elements.\n *\n * @param name Element's tag name.\n * @param attrs Dictionary of attribute names and values.\n * @param opt_parent Optional parent on which to append the element.\n * @returns if name is a string or a more specific type if it a member of Svg.\n */\nexport function createSvgElement(\n name: string | Svg,\n attrs: {[key: string]: string | number},\n opt_parent?: Element | null,\n): T {\n const e = document.createElementNS(SVG_NS, `${name}`) as T;\n for (const key in attrs) {\n e.setAttribute(key, `${attrs[key]}`);\n }\n if (opt_parent) {\n opt_parent.appendChild(e);\n }\n return e;\n}\n\n/**\n * Add a CSS class to a element.\n *\n * Handles multiple space-separated classes for legacy reasons.\n *\n * @param element DOM element to add class to.\n * @param className Name of class to add.\n * @returns True if class was added, false if already present.\n */\nexport function addClass(element: Element, className: string): boolean {\n const classNames = className.split(' ');\n if (classNames.every((name) => element.classList.contains(name))) {\n return false;\n }\n element.classList.add(...classNames);\n return true;\n}\n\n/**\n * Removes multiple classes from an element.\n *\n * @param element DOM element to remove classes from.\n * @param classNames A string of one or multiple class names for an element.\n */\nexport function removeClasses(element: Element, classNames: string) {\n element.classList.remove(...classNames.split(' '));\n}\n\n/**\n * Remove a CSS class from a element.\n *\n * Handles multiple space-separated classes for legacy reasons.\n *\n * @param element DOM element to remove class from.\n * @param className Name of class to remove.\n * @returns True if class was removed, false if never present.\n */\nexport function removeClass(element: Element, className: string): boolean {\n const classNames = className.split(' ');\n if (classNames.every((name) => !element.classList.contains(name))) {\n return false;\n }\n element.classList.remove(...classNames);\n return true;\n}\n\n/**\n * Checks if an element has the specified CSS class.\n *\n * @param element DOM element to check.\n * @param className Name of class to check.\n * @returns True if class exists, false otherwise.\n */\nexport function hasClass(element: Element, className: string): boolean {\n return element.classList.contains(className);\n}\n\n/**\n * Removes a node from its parent. No-op if not attached to a parent.\n *\n * @param node The node to remove.\n * @returns The node removed if removed; else, null.\n */\n// Copied from Closure goog.dom.removeNode\nexport function removeNode(node: Node | null): Node | null {\n return node && node.parentNode ? node.parentNode.removeChild(node) : null;\n}\n\n/**\n * Insert a node after a reference node.\n * Contrast with node.insertBefore function.\n *\n * @param newNode New element to insert.\n * @param refNode Existing element to precede new node.\n */\nexport function insertAfter(newNode: Element, refNode: Element) {\n const siblingNode = refNode.nextSibling;\n const parentNode = refNode.parentNode;\n if (!parentNode) {\n throw Error('Reference node has no parent.');\n }\n if (siblingNode) {\n parentNode.insertBefore(newNode, siblingNode);\n } else {\n parentNode.appendChild(newNode);\n }\n}\n\n/**\n * Whether a node contains another node.\n *\n * @param parent The node that should contain the other node.\n * @param descendant The node to test presence of.\n * @returns Whether the parent node contains the descendant node.\n * @deprecated Use native 'contains' DOM method.\n */\nexport function containsNode(parent: Node, descendant: Node): boolean {\n deprecation.warn(\n 'Blockly.utils.dom.containsNode',\n 'version 10',\n 'version 11',\n 'Use native \"contains\" DOM method',\n );\n return parent.contains(descendant);\n}\n\n/**\n * Sets the CSS transform property on an element. This function sets the\n * non-vendor-prefixed and vendor-prefixed versions for backwards compatibility\n * with older browsers. See https://caniuse.com/#feat=transforms2d\n *\n * @param element Element to which the CSS transform will be applied.\n * @param transform The value of the CSS `transform` property.\n */\nexport function setCssTransform(\n element: HTMLElement | SVGElement,\n transform: string,\n) {\n element.style['transform'] = transform;\n element.style['-webkit-transform' as any] = transform;\n}\n\n/**\n * Start caching text widths. Every call to this function MUST also call\n * stopTextWidthCache. Caches must not survive between execution threads.\n */\nexport function startTextWidthCache() {\n cacheReference++;\n if (!cacheWidths) {\n cacheWidths = Object.create(null);\n }\n}\n\n/**\n * Stop caching field widths. Unless caching was already on when the\n * corresponding call to startTextWidthCache was made.\n */\nexport function stopTextWidthCache() {\n cacheReference--;\n if (!cacheReference) {\n cacheWidths = null;\n }\n}\n\n/**\n * Gets the width of a text element, caching it in the process.\n *\n * @param textElement An SVG 'text' element.\n * @returns Width of element.\n */\nexport function getTextWidth(textElement: SVGTextElement): number {\n const key = textElement.textContent + '\\n' + textElement.className.baseVal;\n let width;\n // Return the cached width if it exists.\n if (cacheWidths) {\n width = cacheWidths[key];\n if (width) {\n return width;\n }\n }\n\n // Attempt to compute fetch the width of the SVG text element.\n try {\n width = textElement.getComputedTextLength();\n } catch (e) {\n // In other cases where we fail to get the computed text. Instead, use an\n // approximation and do not cache the result. At some later point in time\n // when the block is inserted into the visible DOM, this method will be\n // called again and, at that point in time, will not throw an exception.\n return textElement.textContent!.length * 8;\n }\n\n // Cache the computed width and return.\n if (cacheWidths) {\n cacheWidths[key] = width;\n }\n return width;\n}\n\n/**\n * Gets the width of a text element using a faster method than `getTextWidth`.\n * This method requires that we know the text element's font family and size in\n * advance. Similar to `getTextWidth`, we cache the width we compute.\n *\n * @param textElement An SVG 'text' element.\n * @param fontSize The font size to use.\n * @param fontWeight The font weight to use.\n * @param fontFamily The font family to use.\n * @returns Width of element.\n */\nexport function getFastTextWidth(\n textElement: SVGTextElement,\n fontSize: number,\n fontWeight: string,\n fontFamily: string,\n): number {\n return getFastTextWidthWithSizeString(\n textElement,\n fontSize + 'pt',\n fontWeight,\n fontFamily,\n );\n}\n\n/**\n * Gets the width of a text element using a faster method than `getTextWidth`.\n * This method requires that we know the text element's font family and size in\n * advance. Similar to `getTextWidth`, we cache the width we compute.\n * This method is similar to `getFastTextWidth` but expects the font size\n * parameter to be a string.\n *\n * @param textElement An SVG 'text' element.\n * @param fontSize The font size to use.\n * @param fontWeight The font weight to use.\n * @param fontFamily The font family to use.\n * @returns Width of element.\n */\nexport function getFastTextWidthWithSizeString(\n textElement: SVGTextElement,\n fontSize: string,\n fontWeight: string,\n fontFamily: string,\n): number {\n const text = textElement.textContent;\n const key = text + '\\n' + textElement.className.baseVal;\n let width;\n\n // Return the cached width if it exists.\n if (cacheWidths) {\n width = cacheWidths[key];\n if (width) {\n return width;\n }\n }\n\n if (!canvasContext) {\n // Inject the canvas element used for computing text widths.\n const computeCanvas = document.createElement('canvas');\n computeCanvas.className = 'blocklyComputeCanvas';\n document.body.appendChild(computeCanvas);\n\n // Initialize the HTML canvas context and set the font.\n // The context font must match blocklyText's fontsize and font-family\n // set in CSS.\n canvasContext = computeCanvas.getContext('2d') as CanvasRenderingContext2D;\n }\n // Set the desired font size and family.\n canvasContext.font = fontWeight + ' ' + fontSize + ' ' + fontFamily;\n\n // Measure the text width using the helper canvas context.\n if (text) {\n width = canvasContext.measureText(text).width;\n } else {\n width = 0;\n }\n\n // Cache the computed width and return.\n if (cacheWidths) {\n cacheWidths[key] = width;\n }\n return width;\n}\n\n/**\n * Measure a font's metrics. The height and baseline values.\n *\n * @param text Text to measure the font dimensions of.\n * @param fontSize The font size to use.\n * @param fontWeight The font weight to use.\n * @param fontFamily The font family to use.\n * @returns Font measurements.\n */\nexport function measureFontMetrics(\n text: string,\n fontSize: string,\n fontWeight: string,\n fontFamily: string,\n): {height: number; baseline: number} {\n const span = document.createElement('span');\n span.style.font = fontWeight + ' ' + fontSize + ' ' + fontFamily;\n span.textContent = text;\n\n const block = document.createElement('div');\n block.style.width = '1px';\n block.style.height = '0';\n\n const div = document.createElement('div');\n div.style.display = 'flex';\n div.style.position = 'fixed';\n div.style.top = '0';\n div.style.left = '0';\n div.appendChild(span);\n div.appendChild(block);\n\n document.body.appendChild(div);\n const result = {\n height: 0,\n baseline: 0,\n };\n try {\n div.style.alignItems = 'baseline';\n result.baseline = block.offsetTop - span.offsetTop;\n div.style.alignItems = 'flex-end';\n result.height = block.offsetTop - span.offsetTop;\n } finally {\n document.body.removeChild(div);\n }\n return result;\n}\n","/**\n * @license\n * Copyright 2019 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\n// Former goog.module ID: Blockly.utils.style\n\nimport {Coordinate} from './coordinate.js';\nimport {Rect} from './rect.js';\nimport {Size} from './size.js';\n\n/**\n * Gets the height and width of an element.\n * Similar to Closure's goog.style.getSize\n *\n * @param element Element to get size of.\n * @returns Object with width/height properties.\n */\nexport function getSize(element: Element): Size {\n return TEST_ONLY.getSizeInternal(element);\n}\n\n/**\n * Private version of getSize for stubbing in tests.\n */\nfunction getSizeInternal(element: Element): Size {\n if (getComputedStyle(element, 'display') !== 'none') {\n return getSizeWithDisplay(element);\n }\n\n // Evaluate size with a temporary element.\n // AnyDuringMigration because: Property 'style' does not exist on type\n // 'Element'.\n const style = (element as AnyDuringMigration).style;\n const originalDisplay = style.display;\n const originalVisibility = style.visibility;\n const originalPosition = style.position;\n\n style.visibility = 'hidden';\n style.position = 'absolute';\n style.display = 'inline';\n\n const offsetWidth = (element as HTMLElement).offsetWidth;\n const offsetHeight = (element as HTMLElement).offsetHeight;\n\n style.display = originalDisplay;\n style.position = originalPosition;\n style.visibility = originalVisibility;\n\n return new Size(offsetWidth, offsetHeight);\n}\n\n/**\n * Gets the height and width of an element when the display is not none.\n *\n * @param element Element to get size of.\n * @returns Object with width/height properties.\n */\nfunction getSizeWithDisplay(element: Element): Size {\n const offsetWidth = (element as HTMLElement).offsetWidth;\n const offsetHeight = (element as HTMLElement).offsetHeight;\n return new Size(offsetWidth, offsetHeight);\n}\n\n/**\n * Retrieves a computed style value of a node. It returns empty string\n * if the property requested is an SVG one and it has not been\n * explicitly set (firefox and webkit).\n *\n * Copied from Closure's goog.style.getComputedStyle\n *\n * @param element Element to get style of.\n * @param property Property to get (camel-case).\n * @returns Style value.\n */\nexport function getComputedStyle(element: Element, property: string): string {\n const styles = window.getComputedStyle(element);\n // element.style[..] is undefined for browser specific styles\n // as 'filter'.\n return (\n (styles as AnyDuringMigration)[property] ||\n styles.getPropertyValue(property)\n );\n}\n\n/**\n * Returns a Coordinate object relative to the top-left of the HTML document.\n * Similar to Closure's goog.style.getPageOffset\n *\n * @param el Element to get the page offset for.\n * @returns The page offset.\n */\nexport function getPageOffset(el: Element): Coordinate {\n const pos = new Coordinate(0, 0);\n const box = el.getBoundingClientRect();\n const documentElement = document.documentElement;\n // Must add the scroll coordinates in to get the absolute page offset\n // of element since getBoundingClientRect returns relative coordinates to\n // the viewport.\n const scrollCoord = new Coordinate(\n window.pageXOffset || documentElement.scrollLeft,\n window.pageYOffset || documentElement.scrollTop,\n );\n pos.x = box.left + scrollCoord.x;\n pos.y = box.top + scrollCoord.y;\n\n return pos;\n}\n\n/**\n * Calculates the viewport coordinates relative to the document.\n * Similar to Closure's goog.style.getViewportPageOffset\n *\n * @returns The page offset of the viewport.\n */\nexport function getViewportPageOffset(): Coordinate {\n const body = document.body;\n const documentElement = document.documentElement;\n const scrollLeft = body.scrollLeft || documentElement.scrollLeft;\n const scrollTop = body.scrollTop || documentElement.scrollTop;\n return new Coordinate(scrollLeft, scrollTop);\n}\n\n/**\n * Gets the computed border widths (on all sides) in pixels\n * Copied from Closure's goog.style.getBorderBox\n *\n * @param element The element to get the border widths for.\n * @returns The computed border widths.\n */\nexport function getBorderBox(element: Element): Rect {\n const left = parseFloat(getComputedStyle(element, 'borderLeftWidth'));\n const right = parseFloat(getComputedStyle(element, 'borderRightWidth'));\n const top = parseFloat(getComputedStyle(element, 'borderTopWidth'));\n const bottom = parseFloat(getComputedStyle(element, 'borderBottomWidth'));\n\n return new Rect(top, bottom, left, right);\n}\n\n/**\n * Changes the scroll position of `container` with the minimum amount so\n * that the content and the borders of the given `element` become visible.\n * If the element is bigger than the container, its top left corner will be\n * aligned as close to the container's top left corner as possible.\n * Copied from Closure's goog.style.scrollIntoContainerView\n *\n * @param element The element to make visible.\n * @param container The container to scroll. If not set, then the document\n * scroll element will be used.\n * @param opt_center Whether to center the element in the container.\n * Defaults to false.\n */\nexport function scrollIntoContainerView(\n element: Element,\n container: Element,\n opt_center?: boolean,\n) {\n const offset = getContainerOffsetToScrollInto(element, container, opt_center);\n container.scrollLeft = offset.x;\n container.scrollTop = offset.y;\n}\n\n/**\n * Calculate the scroll position of `container` with the minimum amount so\n * that the content and the borders of the given `element` become visible.\n * If the element is bigger than the container, its top left corner will be\n * aligned as close to the container's top left corner as possible.\n * Copied from Closure's goog.style.getContainerOffsetToScrollInto\n *\n * @param element The element to make visible.\n * @param container The container to scroll. If not set, then the document\n * scroll element will be used.\n * @param opt_center Whether to center the element in the container.\n * Defaults to false.\n * @returns The new scroll position of the container.\n */\nexport function getContainerOffsetToScrollInto(\n element: Element,\n container: Element,\n opt_center?: boolean,\n): Coordinate {\n // Absolute position of the element's border's top left corner.\n const elementPos = getPageOffset(element);\n // Absolute position of the container's border's top left corner.\n const containerPos = getPageOffset(container);\n const containerBorder = getBorderBox(container);\n // Relative pos. of the element's border box to the container's content box.\n const relX = elementPos.x - containerPos.x - containerBorder.left;\n const relY = elementPos.y - containerPos.y - containerBorder.top;\n // How much the element can move in the container, i.e. the difference between\n // the element's bottom-right-most and top-left-most position where it's\n // fully visible.\n const elementSize = getSizeWithDisplay(element);\n const spaceX = container.clientWidth - elementSize.width;\n const spaceY = container.clientHeight - elementSize.height;\n let scrollLeft = container.scrollLeft;\n let scrollTop = container.scrollTop;\n if (opt_center) {\n // All browsers round non-integer scroll positions down.\n scrollLeft += relX - spaceX / 2;\n scrollTop += relY - spaceY / 2;\n } else {\n // This formula was designed to give the correct scroll values in the\n // following cases:\n // - element is higher than container (spaceY < 0) => scroll down by relY\n // - element is not higher that container (spaceY >= 0):\n // - it is above container (relY < 0) => scroll up by abs(relY)\n // - it is below container (relY > spaceY) => scroll down by relY - spaceY\n // - it is in the container => don't scroll\n scrollLeft += Math.min(relX, Math.max(relX - spaceX, 0));\n scrollTop += Math.min(relY, Math.max(relY - spaceY, 0));\n }\n return new Coordinate(scrollLeft, scrollTop);\n}\n\nexport const TEST_ONLY = {\n getSizeInternal,\n};\n","/**\n * @license\n * Copyright 2021 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\n// Former goog.module ID: Blockly.utils.svgMath\n\nimport type {WorkspaceSvg} from '../workspace_svg.js';\n\nimport {Coordinate} from './coordinate.js';\nimport {Rect} from './rect.js';\nimport * as style from './style.js';\n\n/**\n * Static regex to pull the x,y values out of an SVG translate() directive.\n * Note that Firefox and IE (9,10) return 'translate(12)' instead of\n * 'translate(12, 0)'.\n * Note that IE (9,10) returns 'translate(16 8)' instead of 'translate(16, 8)'.\n * Note that IE has been reported to return scientific notation (0.123456e-42).\n */\nconst XY_REGEX = /translate\\(\\s*([-+\\d.e]+)([ ,]\\s*([-+\\d.e]+)\\s*)?/;\n\n/**\n * Static regex to pull the x,y values out of a translate() or translate3d()\n * style property.\n * Accounts for same exceptions as XY_REGEX.\n */\nconst XY_STYLE_REGEX =\n /transform:\\s*translate(?:3d)?\\(\\s*([-+\\d.e]+)\\s*px([ ,]\\s*([-+\\d.e]+)\\s*px)?/;\n\n/**\n * Return the coordinates of the top-left corner of this element relative to\n * its parent. Only for SVG elements and children (e.g. rect, g, path).\n *\n * @param element SVG element to find the coordinates of.\n * @returns Object with .x and .y properties.\n */\nexport function getRelativeXY(element: Element): Coordinate {\n const xy = new Coordinate(0, 0);\n // First, check for x and y attributes.\n // Checking for the existence of x/y properties is faster than getAttribute.\n // However, x/y contains an SVGAnimatedLength object, so rely on getAttribute\n // to get the number.\n const x = (element as any).x && element.getAttribute('x');\n const y = (element as any).y && element.getAttribute('y');\n if (x) {\n xy.x = parseInt(x);\n }\n if (y) {\n xy.y = parseInt(y);\n }\n // Second, check for transform=\"translate(...)\" attribute.\n const transform = element.getAttribute('transform');\n const r = transform && transform.match(XY_REGEX);\n if (r) {\n xy.x += Number(r[1]);\n if (r[3]) {\n xy.y += Number(r[3]);\n }\n }\n\n // Then check for style = transform: translate(...) or translate3d(...)\n const style = element.getAttribute('style');\n if (style && style.indexOf('translate') > -1) {\n const styleComponents = style.match(XY_STYLE_REGEX);\n if (styleComponents) {\n xy.x += Number(styleComponents[1]);\n if (styleComponents[3]) {\n xy.y += Number(styleComponents[3]);\n }\n }\n }\n return xy;\n}\n\n/**\n * Return the coordinates of the top-left corner of this element relative to\n * the div Blockly was injected into.\n *\n * @param element SVG element to find the coordinates of. If this is not a child\n * of the div Blockly was injected into, the behaviour is undefined.\n * @returns Object with .x and .y properties.\n */\nexport function getInjectionDivXY(element: Element): Coordinate {\n let x = 0;\n let y = 0;\n while (element) {\n const xy = getRelativeXY(element);\n x = x + xy.x;\n y = y + xy.y;\n const classes = element.getAttribute('class') || '';\n if ((' ' + classes + ' ').indexOf(' injectionDiv ') !== -1) {\n break;\n }\n element = element.parentNode as Element;\n }\n return new Coordinate(x, y);\n}\n\n/**\n * Get the position of the current viewport in window coordinates. This takes\n * scroll into account.\n *\n * @returns An object containing window width, height, and scroll position in\n * window coordinates.\n * @internal\n */\nexport function getViewportBBox(): Rect {\n // Pixels, in window coordinates.\n const scrollOffset = style.getViewportPageOffset();\n return new Rect(\n scrollOffset.y,\n document.documentElement.clientHeight + scrollOffset.y,\n scrollOffset.x,\n document.documentElement.clientWidth + scrollOffset.x,\n );\n}\n\n/**\n * Gets the document scroll distance as a coordinate object.\n * Copied from Closure's goog.dom.getDocumentScroll.\n *\n * @returns Object with values 'x' and 'y'.\n */\nexport function getDocumentScroll(): Coordinate {\n const el = document.documentElement;\n const win = window;\n return new Coordinate(\n win.pageXOffset || el.scrollLeft,\n win.pageYOffset || el.scrollTop,\n );\n}\n\n/**\n * Converts screen coordinates to workspace coordinates.\n *\n * @param ws The workspace to find the coordinates on.\n * @param screenCoordinates The screen coordinates to be converted to workspace\n * coordinates\n * @returns The workspace coordinates.\n */\nexport function screenToWsCoordinates(\n ws: WorkspaceSvg,\n screenCoordinates: Coordinate,\n): Coordinate {\n const screenX = screenCoordinates.x;\n const screenY = screenCoordinates.y;\n\n const injectionDiv = ws.getInjectionDiv();\n // Bounding rect coordinates are in client coordinates, meaning that they\n // are in pixels relative to the upper left corner of the visible browser\n // window. These coordinates change when you scroll the browser window.\n const boundingRect = injectionDiv.getBoundingClientRect();\n\n // The client coordinates offset by the injection div's upper left corner.\n const clientOffsetPixels = new Coordinate(\n screenX - boundingRect.left,\n screenY - boundingRect.top,\n );\n\n // The offset in pixels between the main workspace's origin and the upper\n // left corner of the injection div.\n const mainOffsetPixels = ws.getOriginOffsetInPixels();\n\n // The position of the new comment in pixels relative to the origin of the\n // main workspace.\n const finalOffsetPixels = Coordinate.difference(\n clientOffsetPixels,\n mainOffsetPixels,\n );\n // The position in main workspace coordinates.\n const finalOffsetMainWs = finalOffsetPixels.scale(1 / ws.scale);\n return finalOffsetMainWs;\n}\n\n/**\n * Converts workspace coordinates to screen coordinates.\n *\n * @param ws The workspace to get the coordinates out of.\n * @param workspaceCoordinates The workspace coordinates to be converted\n * to screen coordinates.\n * @returns The screen coordinates.\n */\nexport function wsToScreenCoordinates(\n ws: WorkspaceSvg,\n workspaceCoordinates: Coordinate,\n): Coordinate {\n // Fix workspace scale vs browser scale.\n const screenCoordinates = workspaceCoordinates.scale(ws.scale);\n const screenX = screenCoordinates.x;\n const screenY = screenCoordinates.y;\n\n const injectionDiv = ws.getInjectionDiv();\n const boundingRect = injectionDiv.getBoundingClientRect();\n const mainOffset = ws.getOriginOffsetInPixels();\n\n // Fix workspace origin vs browser origin.\n return new Coordinate(\n screenX + boundingRect.left + mainOffset.x,\n screenY + boundingRect.top + mainOffset.y,\n );\n}\n\nexport const TEST_ONLY = {\n XY_REGEX,\n XY_STYLE_REGEX,\n};\n","/**\n * @license\n * Copyright 2018 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\n// Former goog.module ID: Blockly.utils.xml\n\nlet domParser: DOMParser = {\n parseFromString: function () {\n throw new Error(\n 'DOMParser was not found in the global scope and was not properly ' +\n 'injected using injectDependencies',\n );\n },\n};\n\nlet xmlSerializer: XMLSerializer = {\n serializeToString: function () {\n throw new Error(\n 'XMLSerializer was not foundin the global scope and was not properly ' +\n 'injected using injectDependencies',\n );\n },\n};\n\n/**\n * Injected dependencies. By default these are just (and have the\n * same types as) the corresponding DOM Window properties, but the\n * Node.js wrapper for Blockly (see scripts/package/node/core.js)\n * calls injectDependencies to supply implementations from the jsdom\n * package instead.\n */\nlet {document, DOMParser, XMLSerializer} = globalThis;\nif (DOMParser) domParser = new DOMParser();\nif (XMLSerializer) xmlSerializer = new XMLSerializer();\n\n/**\n * Inject implementations of document, DOMParser and/or XMLSerializer\n * to use instead of the default ones.\n *\n * Used by the Node.js wrapper for Blockly (see\n * scripts/package/node/core.js) to supply implementations from the\n * jsdom package instead.\n *\n * While they may be set individually, it is normally the case that\n * all three will be sourced from the same JSDOM instance. They MUST\n * at least come from the same copy of the jsdom package. (Typically\n * this is hard to avoid satsifying this requirement, but it can be\n * inadvertently violated by using webpack to build multiple bundles\n * containing Blockly and jsdom, and then loading more than one into\n * the same JavaScript runtime. See\n * https://github.com/google/blockly-samples/pull/1452#issuecomment-1364442135\n * for an example of how this happened.)\n *\n * @param dependencies Options object containing dependencies to set.\n */\nexport function injectDependencies(dependencies: {\n document?: Document;\n DOMParser?: typeof DOMParser;\n XMLSerializer?: typeof XMLSerializer;\n}) {\n ({\n // Default to existing value if option not supplied.\n document = document,\n DOMParser = DOMParser,\n XMLSerializer = XMLSerializer,\n } = dependencies);\n\n domParser = new DOMParser();\n xmlSerializer = new XMLSerializer();\n}\n\n/**\n * Namespace for Blockly's XML.\n */\nexport const NAME_SPACE = 'https://developers.google.com/blockly/xml';\n\n// eslint-disable-next-line no-control-regex\nconst INVALID_CONTROL_CHARS = /[\\x00-\\x09\\x0B\\x0C\\x0E-\\x1F]/g;\n\n/**\n * Create DOM element for XML.\n *\n * @param tagName Name of DOM element.\n * @returns New DOM element.\n */\nexport function createElement(tagName: string): Element {\n return document.createElementNS(NAME_SPACE, tagName);\n}\n\n/**\n * Create text element for XML.\n *\n * @param text Text content.\n * @returns New DOM text node.\n */\nexport function createTextNode(text: string): Text {\n return document.createTextNode(text);\n}\n\n/**\n * Converts an XML string into a DOM structure.\n *\n * Control characters should be escaped. (But we will try to best-effort parse\n * unescaped characters.)\n *\n * Note that even when escaped, U+0000 will be parsed as U+FFFD (the\n * \"replacement character\") because U+0000 is never a valid XML character\n * (even in XML 1.1).\n * https://www.w3.org/TR/xml11/#charsets\n *\n * @param text An XML string.\n * @returns A DOM object representing the singular child of the document\n * element.\n * @throws if the text doesn't parse.\n */\nexport function textToDom(text: string): Element {\n let doc = domParser.parseFromString(text, 'text/xml');\n if (\n doc &&\n doc.documentElement &&\n !doc.getElementsByTagName('parsererror').length\n ) {\n return doc.documentElement;\n }\n\n // Attempt to parse as HTML to deserialize control characters that were\n // serialized before the serializer did proper escaping.\n doc = domParser.parseFromString(text, 'text/html');\n if (\n doc &&\n doc.body.firstChild &&\n doc.body.firstChild.nodeName.toLowerCase() === 'xml'\n ) {\n return doc.body.firstChild as Element;\n }\n\n throw new Error(`DOMParser was unable to parse: ${text}`);\n}\n\n/**\n * Converts a DOM structure into plain text.\n * Currently the text format is fairly ugly: all one line with no whitespace.\n *\n * Control characters are escaped using their decimal encodings. This includes\n * U+0000 even though it is technically never a valid XML character (even in\n * XML 1.1).\n * https://www.w3.org/TR/xml11/#charsets\n *\n * When decoded U+0000 will be parsed as U+FFFD (the \"replacement character\").\n *\n * @param dom A tree of XML nodes.\n * @returns Text representation.\n */\nexport function domToText(dom: Node): string {\n return sanitizeText(xmlSerializer.serializeToString(dom));\n}\n\nfunction sanitizeText(text: string) {\n return text.replace(\n INVALID_CONTROL_CHARS,\n (match) => `&#${match.charCodeAt(0)};`,\n );\n}\n","/**\n * @license\n * Copyright 2020 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\n// Former goog.module ID: Blockly.utils.toolbox\n\nimport type {ConnectionState} from '../serialization/blocks.js';\nimport type {CssConfig as CategoryCssConfig} from '../toolbox/category.js';\nimport type {CssConfig as SeparatorCssConfig} from '../toolbox/separator.js';\nimport * as utilsXml from './xml.js';\n\n/**\n * The information needed to create a block in the toolbox.\n * Note that disabled has a different type for backwards compatibility.\n */\nexport interface BlockInfo {\n kind: string;\n blockxml?: string | Node;\n type?: string;\n gap?: string | number;\n disabled?: string | boolean;\n enabled?: boolean;\n id?: string;\n x?: number;\n y?: number;\n collapsed?: boolean;\n inline?: boolean;\n data?: string;\n extraState?: AnyDuringMigration;\n icons?: {[key: string]: AnyDuringMigration};\n fields?: {[key: string]: AnyDuringMigration};\n inputs?: {[key: string]: ConnectionState};\n next?: ConnectionState;\n}\n\n/**\n * The information needed to create a separator in the toolbox.\n */\nexport interface SeparatorInfo {\n kind: string;\n id: string | undefined;\n gap: number | undefined;\n cssconfig: SeparatorCssConfig | undefined;\n}\n\n/**\n * The information needed to create a button in the toolbox.\n */\nexport interface ButtonInfo {\n kind: string;\n text: string;\n callbackkey: string;\n}\n\n/**\n * The information needed to create a label in the toolbox.\n */\nexport interface LabelInfo {\n kind: string;\n text: string;\n id: string | undefined;\n}\n\n/**\n * The information needed to create either a button or a label in the flyout.\n */\nexport type ButtonOrLabelInfo = ButtonInfo | LabelInfo;\n\n/**\n * The information needed to create a category in the toolbox.\n */\nexport interface StaticCategoryInfo {\n kind: string;\n name: string;\n contents: ToolboxItemInfo[];\n id: string | undefined;\n categorystyle: string | undefined;\n colour: string | undefined;\n cssconfig: CategoryCssConfig | undefined;\n hidden: string | undefined;\n expanded?: string | boolean;\n}\n\n/**\n * The information needed to create a custom category.\n */\nexport interface DynamicCategoryInfo {\n kind: string;\n custom: string;\n id: string | undefined;\n categorystyle: string | undefined;\n colour: string | undefined;\n cssconfig: CategoryCssConfig | undefined;\n hidden: string | undefined;\n expanded?: string | boolean;\n}\n\n/**\n * The information needed to create either a dynamic or static category.\n */\nexport type CategoryInfo = StaticCategoryInfo | DynamicCategoryInfo;\n\n/**\n * Any information that can be used to create an item in the toolbox.\n */\nexport type ToolboxItemInfo = FlyoutItemInfo | StaticCategoryInfo;\n\n/**\n * All the different types that can be displayed in a flyout.\n */\nexport type FlyoutItemInfo =\n | BlockInfo\n | SeparatorInfo\n | ButtonInfo\n | LabelInfo\n | DynamicCategoryInfo;\n\n/**\n * The JSON definition of a toolbox.\n */\nexport interface ToolboxInfo {\n kind?: string;\n contents: ToolboxItemInfo[];\n}\n\n/**\n * An array holding flyout items.\n */\nexport type FlyoutItemInfoArray = FlyoutItemInfo[];\n\n/**\n * All of the different types that can create a toolbox.\n */\nexport type ToolboxDefinition = Node | ToolboxInfo | string;\n\n/**\n * All of the different types that can be used to show items in a flyout.\n */\nexport type FlyoutDefinition =\n | FlyoutItemInfoArray\n | NodeList\n | ToolboxInfo\n | Node[];\n\n/**\n * The name used to identify a toolbox that has category like items.\n * This only needs to be used if a toolbox wants to be treated like a category\n * toolbox but does not actually contain any toolbox items with the kind\n * 'category'.\n */\nconst CATEGORY_TOOLBOX_KIND = 'categoryToolbox';\n\n/**\n * The name used to identify a toolbox that has no categories and is displayed\n * as a simple flyout displaying blocks, buttons, or labels.\n */\nconst FLYOUT_TOOLBOX_KIND = 'flyoutToolbox';\n\n/**\n * Position of the toolbox and/or flyout relative to the workspace.\n */\nexport enum Position {\n TOP,\n BOTTOM,\n LEFT,\n RIGHT,\n}\n\n/**\n * Converts the toolbox definition into toolbox JSON.\n *\n * @param toolboxDef The definition of the toolbox in one of its many forms.\n * @returns Object holding information for creating a toolbox.\n * @internal\n */\nexport function convertToolboxDefToJson(\n toolboxDef: ToolboxDefinition | null,\n): ToolboxInfo | null {\n if (!toolboxDef) {\n return null;\n }\n\n if (toolboxDef instanceof Element || typeof toolboxDef === 'string') {\n toolboxDef = parseToolboxTree(toolboxDef);\n // AnyDuringMigration because: Argument of type 'Node | null' is not\n // assignable to parameter of type 'Node'.\n toolboxDef = convertToToolboxJson(toolboxDef as AnyDuringMigration);\n }\n\n const toolboxJson = toolboxDef as ToolboxInfo;\n validateToolbox(toolboxJson);\n return toolboxJson;\n}\n\n/**\n * Validates the toolbox JSON fields have been set correctly.\n *\n * @param toolboxJson Object holding information for creating a toolbox.\n * @throws {Error} if the toolbox is not the correct format.\n */\nfunction validateToolbox(toolboxJson: ToolboxInfo) {\n const toolboxKind = toolboxJson['kind'];\n const toolboxContents = toolboxJson['contents'];\n\n if (toolboxKind) {\n if (\n toolboxKind !== FLYOUT_TOOLBOX_KIND &&\n toolboxKind !== CATEGORY_TOOLBOX_KIND\n ) {\n throw Error(\n 'Invalid toolbox kind ' +\n toolboxKind +\n '.' +\n ' Please supply either ' +\n FLYOUT_TOOLBOX_KIND +\n ' or ' +\n CATEGORY_TOOLBOX_KIND,\n );\n }\n }\n if (!toolboxContents) {\n throw Error('Toolbox must have a contents attribute.');\n }\n}\n\n/**\n * Converts the flyout definition into a list of flyout items.\n *\n * @param flyoutDef The definition of the flyout in one of its many forms.\n * @returns A list of flyout items.\n * @internal\n */\nexport function convertFlyoutDefToJsonArray(\n flyoutDef: FlyoutDefinition | null,\n): FlyoutItemInfoArray {\n if (!flyoutDef) {\n return [];\n }\n\n if ((flyoutDef as AnyDuringMigration)['contents']) {\n return (flyoutDef as AnyDuringMigration)['contents'];\n }\n // If it is already in the correct format return the flyoutDef.\n // AnyDuringMigration because: Property 'nodeType' does not exist on type\n // 'Node | FlyoutItemInfo'.\n if (\n Array.isArray(flyoutDef) &&\n flyoutDef.length > 0 &&\n !(flyoutDef[0] as AnyDuringMigration).nodeType\n ) {\n // AnyDuringMigration because: Type 'FlyoutItemInfoArray | Node[]' is not\n // assignable to type 'FlyoutItemInfoArray'.\n return flyoutDef as AnyDuringMigration;\n }\n\n // AnyDuringMigration because: Type 'ToolboxItemInfo[] | FlyoutItemInfoArray'\n // is not assignable to type 'FlyoutItemInfoArray'.\n return xmlToJsonArray(flyoutDef as Node[] | NodeList) as AnyDuringMigration;\n}\n\n/**\n * Whether or not the toolbox definition has categories.\n *\n * @param toolboxJson Object holding information for creating a toolbox.\n * @returns True if the toolbox has categories.\n * @internal\n */\nexport function hasCategories(toolboxJson: ToolboxInfo | null): boolean {\n return TEST_ONLY.hasCategoriesInternal(toolboxJson);\n}\n\n/**\n * Private version of hasCategories for stubbing in tests.\n */\nfunction hasCategoriesInternal(toolboxJson: ToolboxInfo | null): boolean {\n if (!toolboxJson) {\n return false;\n }\n\n const toolboxKind = toolboxJson['kind'];\n if (toolboxKind) {\n return toolboxKind === CATEGORY_TOOLBOX_KIND;\n }\n\n const categories = toolboxJson['contents'].filter(function (item) {\n return item['kind'].toUpperCase() === 'CATEGORY';\n });\n return !!categories.length;\n}\n\n/**\n * Whether or not the category is collapsible.\n *\n * @param categoryInfo Object holing information for creating a category.\n * @returns True if the category has subcategories.\n * @internal\n */\nexport function isCategoryCollapsible(categoryInfo: CategoryInfo): boolean {\n if (!categoryInfo || !(categoryInfo as AnyDuringMigration)['contents']) {\n return false;\n }\n\n const categories = (categoryInfo as AnyDuringMigration)['contents'].filter(\n function (item: AnyDuringMigration) {\n return item['kind'].toUpperCase() === 'CATEGORY';\n },\n );\n return !!categories.length;\n}\n\n/**\n * Parses the provided toolbox definition into a consistent format.\n *\n * @param toolboxDef The definition of the toolbox in one of its many forms.\n * @returns Object holding information for creating a toolbox.\n */\nfunction convertToToolboxJson(toolboxDef: Node): ToolboxInfo {\n const contents = xmlToJsonArray(toolboxDef as Node | Node[]);\n const toolboxJson = {'contents': contents};\n if (toolboxDef instanceof Node) {\n addAttributes(toolboxDef, toolboxJson);\n }\n return toolboxJson;\n}\n\n/**\n * Converts the xml for a toolbox to JSON.\n *\n * @param toolboxDef The definition of the toolbox in one of its many forms.\n * @returns A list of objects in the toolbox.\n */\nfunction xmlToJsonArray(\n toolboxDef: Node | Node[] | NodeList,\n): FlyoutItemInfoArray | ToolboxItemInfo[] {\n const arr = [];\n // If it is a node it will have children.\n // AnyDuringMigration because: Property 'childNodes' does not exist on type\n // 'Node | NodeList | Node[]'.\n let childNodes = (toolboxDef as AnyDuringMigration).childNodes;\n if (!childNodes) {\n // Otherwise the toolboxDef is an array or collection.\n childNodes = toolboxDef;\n }\n for (let i = 0, child; (child = childNodes[i]); i++) {\n if (!child.tagName) {\n continue;\n }\n const obj = {};\n const tagName = child.tagName.toUpperCase();\n (obj as AnyDuringMigration)['kind'] = tagName;\n\n // Store the XML for a block.\n if (tagName === 'BLOCK') {\n (obj as AnyDuringMigration)['blockxml'] = child;\n } else if (child.childNodes && child.childNodes.length > 0) {\n // Get the contents of a category\n (obj as AnyDuringMigration)['contents'] = xmlToJsonArray(child);\n }\n\n // Add XML attributes to object\n addAttributes(child, obj);\n arr.push(obj);\n }\n // AnyDuringMigration because: Type '{}[]' is not assignable to type\n // 'ToolboxItemInfo[] | FlyoutItemInfoArray'.\n return arr as AnyDuringMigration;\n}\n\n/**\n * Adds the attributes on the node to the given object.\n *\n * @param node The node to copy the attributes from.\n * @param obj The object to copy the attributes to.\n */\nfunction addAttributes(node: Node, obj: AnyDuringMigration) {\n // AnyDuringMigration because: Property 'attributes' does not exist on type\n // 'Node'.\n for (let j = 0; j < (node as AnyDuringMigration).attributes.length; j++) {\n // AnyDuringMigration because: Property 'attributes' does not exist on type\n // 'Node'.\n const attr = (node as AnyDuringMigration).attributes[j];\n if (attr.nodeName.indexOf('css-') > -1) {\n obj['cssconfig'] = obj['cssconfig'] || {};\n obj['cssconfig'][attr.nodeName.replace('css-', '')] = attr.value;\n } else {\n obj[attr.nodeName] = attr.value;\n }\n }\n}\n\n/**\n * Parse the provided toolbox tree into a consistent DOM format.\n *\n * @param toolboxDef DOM tree of blocks, or text representation of same.\n * @returns DOM tree of blocks, or null.\n */\nexport function parseToolboxTree(\n toolboxDef: Element | null | string,\n): Element | null {\n let parsedToolboxDef: Element | null = null;\n if (toolboxDef) {\n if (typeof toolboxDef === 'string') {\n parsedToolboxDef = utilsXml.textToDom(toolboxDef);\n if (parsedToolboxDef.nodeName.toLowerCase() !== 'xml') {\n throw TypeError('Toolbox should be an document.');\n }\n } else if (toolboxDef instanceof Element) {\n parsedToolboxDef = toolboxDef;\n }\n }\n return parsedToolboxDef;\n}\n\nexport const TEST_ONLY = {\n hasCategoriesInternal,\n};\n","/**\n * @license\n * Copyright 2021 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\n// Former goog.module ID: Blockly.uiPosition\n\nimport type {UiMetrics} from './metrics_manager.js';\nimport {Scrollbar} from './scrollbar.js';\nimport {Rect} from './utils/rect.js';\nimport type {Size} from './utils/size.js';\nimport * as toolbox from './utils/toolbox.js';\nimport type {WorkspaceSvg} from './workspace_svg.js';\n\n/**\n * Enum for vertical positioning.\n *\n * @internal\n */\nexport enum verticalPosition {\n TOP,\n BOTTOM,\n}\n\n/**\n * Enum for horizontal positioning.\n *\n * @internal\n */\nexport enum horizontalPosition {\n LEFT,\n RIGHT,\n}\n\n/**\n * An object defining a horizontal and vertical positioning.\n *\n * @internal\n */\nexport interface Position {\n horizontal: horizontalPosition;\n vertical: verticalPosition;\n}\n\n/**\n * Enum for bump rules to use for dealing with collisions.\n *\n * @internal\n */\nexport enum bumpDirection {\n UP,\n DOWN,\n}\n\n/**\n * Returns a rectangle representing reasonable position for where to place a UI\n * element of the specified size given the restraints and locations of the\n * scrollbars. This method does not take into account any already placed UI\n * elements.\n *\n * @param position The starting horizontal and vertical position.\n * @param size the size of the UI element to get a start position for.\n * @param horizontalPadding The horizontal padding to use.\n * @param verticalPadding The vertical padding to use.\n * @param metrics The workspace UI metrics.\n * @param workspace The workspace.\n * @returns The suggested start position.\n * @internal\n */\nexport function getStartPositionRect(\n position: Position,\n size: Size,\n horizontalPadding: number,\n verticalPadding: number,\n metrics: UiMetrics,\n workspace: WorkspaceSvg,\n): Rect {\n // Horizontal positioning.\n let left = 0;\n const hasVerticalScrollbar =\n workspace.scrollbar && workspace.scrollbar.canScrollVertically();\n if (position.horizontal === horizontalPosition.LEFT) {\n left = metrics.absoluteMetrics.left + horizontalPadding;\n if (hasVerticalScrollbar && workspace.RTL) {\n left += Scrollbar.scrollbarThickness;\n }\n } else {\n // position.horizontal === horizontalPosition.RIGHT\n left =\n metrics.absoluteMetrics.left +\n metrics.viewMetrics.width -\n size.width -\n horizontalPadding;\n if (hasVerticalScrollbar && !workspace.RTL) {\n left -= Scrollbar.scrollbarThickness;\n }\n }\n // Vertical positioning.\n let top = 0;\n if (position.vertical === verticalPosition.TOP) {\n top = metrics.absoluteMetrics.top + verticalPadding;\n } else {\n // position.vertical === verticalPosition.BOTTOM\n top =\n metrics.absoluteMetrics.top +\n metrics.viewMetrics.height -\n size.height -\n verticalPadding;\n if (workspace.scrollbar && workspace.scrollbar.canScrollHorizontally()) {\n // The scrollbars are always positioned on the bottom if they exist.\n top -= Scrollbar.scrollbarThickness;\n }\n }\n return new Rect(top, top + size.height, left, left + size.width);\n}\n\n/**\n * Returns a corner position that is on the opposite side of the workspace from\n * the toolbox.\n * If in horizontal orientation, defaults to the bottom corner. If in vertical\n * orientation, defaults to the right corner.\n *\n * @param workspace The workspace.\n * @param metrics The workspace metrics.\n * @returns The suggested corner position.\n * @internal\n */\nexport function getCornerOppositeToolbox(\n workspace: WorkspaceSvg,\n metrics: UiMetrics,\n): Position {\n const leftCorner =\n metrics.toolboxMetrics.position !== toolbox.Position.LEFT &&\n (!workspace.horizontalLayout || workspace.RTL);\n const topCorner = metrics.toolboxMetrics.position === toolbox.Position.BOTTOM;\n const hPosition = leftCorner\n ? horizontalPosition.LEFT\n : horizontalPosition.RIGHT;\n const vPosition = topCorner ? verticalPosition.TOP : verticalPosition.BOTTOM;\n return {horizontal: hPosition, vertical: vPosition};\n}\n\n/**\n * Returns a position Rect based on a starting position that is bumped\n * so that it doesn't intersect with any of the provided savedPositions. This\n * method does not check that the bumped position is still within bounds.\n *\n * @param startRect The starting position to use.\n * @param margin The margin to use between elements when bumping.\n * @param bumpDir The direction to bump if there is a collision with an existing\n * UI element.\n * @param savedPositions List of rectangles that represent the positions of UI\n * elements already placed.\n * @returns The suggested position rectangle.\n * @internal\n */\nexport function bumpPositionRect(\n startRect: Rect,\n margin: number,\n bumpDir: bumpDirection,\n savedPositions: Rect[],\n): Rect {\n let top = startRect.top;\n const left = startRect.left;\n const width = startRect.right - startRect.left;\n const height = startRect.bottom - startRect.top;\n\n // Check for collision and bump if needed.\n let boundingRect = startRect;\n for (let i = 0; i < savedPositions.length; i++) {\n const otherEl = savedPositions[i];\n if (boundingRect.intersects(otherEl)) {\n if (bumpDir === bumpDirection.UP) {\n top = otherEl.top - height - margin;\n } else {\n // bumpDir === bumpDirection.DOWN\n top = otherEl.bottom + margin;\n }\n // Recheck other savedPositions\n boundingRect = new Rect(top, top + height, left, left + width);\n i = -1;\n }\n }\n return boundingRect;\n}\n","/**\n * @license\n * Copyright 2021 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\n// Former goog.module ID: Blockly.dialog\n\nlet alertImplementation = function (\n message: string,\n opt_callback?: () => void,\n) {\n window.alert(message);\n if (opt_callback) {\n opt_callback();\n }\n};\n\nlet confirmImplementation = function (\n message: string,\n callback: (result: boolean) => void,\n) {\n callback(window.confirm(message));\n};\n\nlet promptImplementation = function (\n message: string,\n defaultValue: string,\n callback: (result: string | null) => void,\n) {\n callback(window.prompt(message, defaultValue));\n};\n\n/**\n * Wrapper to window.alert() that app developers may override via setAlert to\n * provide alternatives to the modal browser window.\n *\n * @param message The message to display to the user.\n * @param opt_callback The callback when the alert is dismissed.\n */\nexport function alert(message: string, opt_callback?: () => void) {\n alertImplementation(message, opt_callback);\n}\n\n/**\n * Sets the function to be run when Blockly.dialog.alert() is called.\n *\n * @param alertFunction The function to be run.\n * @see Blockly.dialog.alert\n */\nexport function setAlert(alertFunction: (p1: string, p2?: () => void) => void) {\n alertImplementation = alertFunction;\n}\n\n/**\n * Wrapper to window.confirm() that app developers may override via setConfirm\n * to provide alternatives to the modal browser window.\n *\n * @param message The message to display to the user.\n * @param callback The callback for handling user response.\n */\nexport function confirm(message: string, callback: (p1: boolean) => void) {\n TEST_ONLY.confirmInternal(message, callback);\n}\n\n/**\n * Private version of confirm for stubbing in tests.\n */\nfunction confirmInternal(message: string, callback: (p1: boolean) => void) {\n confirmImplementation(message, callback);\n}\n\n/**\n * Sets the function to be run when Blockly.dialog.confirm() is called.\n *\n * @param confirmFunction The function to be run.\n * @see Blockly.dialog.confirm\n */\nexport function setConfirm(\n confirmFunction: (p1: string, p2: (p1: boolean) => void) => void,\n) {\n confirmImplementation = confirmFunction;\n}\n\n/**\n * Wrapper to window.prompt() that app developers may override via setPrompt to\n * provide alternatives to the modal browser window. Built-in browser prompts\n * are often used for better text input experience on mobile device. We strongly\n * recommend testing mobile when overriding this.\n *\n * @param message The message to display to the user.\n * @param defaultValue The value to initialize the prompt with.\n * @param callback The callback for handling user response.\n */\nexport function prompt(\n message: string,\n defaultValue: string,\n callback: (p1: string | null) => void,\n) {\n promptImplementation(message, defaultValue, callback);\n}\n\n/**\n * Sets the function to be run when Blockly.dialog.prompt() is called.\n *\n * @param promptFunction The function to be run.\n * @see Blockly.dialog.prompt\n */\nexport function setPrompt(\n promptFunction: (\n p1: string,\n p2: string,\n p3: (p1: string | null) => void,\n ) => void,\n) {\n promptImplementation = promptFunction;\n}\n\nexport const TEST_ONLY = {\n confirmInternal,\n};\n","/**\n * @license\n * Copyright 2023 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport type {VariableModel} from '../variable_model.js';\nimport {IParameterModel} from './i_parameter_model.js';\n\n/** Interface for a parameter model that holds a variable model. */\nexport interface IVariableBackedParameterModel extends IParameterModel {\n /** Returns the variable model held by this type. */\n getVariableModel(): VariableModel;\n}\n\n/**\n * Returns whether the given object is a variable holder or not.\n */\nexport function isVariableBackedParameterModel(\n param: IParameterModel,\n): param is IVariableBackedParameterModel {\n return (param as any).getVariableModel !== undefined;\n}\n","/**\n * @license\n * Copyright 2023 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\n/**\n * Legacy means of representing a procedure signature. The elements are\n * respectively: name, parameter names, and whether it has a return value.\n */\nexport type ProcedureTuple = [string, string[], boolean];\n\n/**\n * Procedure block type.\n *\n * @internal\n */\nexport interface ProcedureBlock {\n getProcedureCall: () => string;\n renameProcedure: (p1: string, p2: string) => void;\n getProcedureDef: () => ProcedureTuple;\n}\n\n/** @internal */\nexport interface LegacyProcedureDefBlock {\n getProcedureDef: () => ProcedureTuple;\n}\n\n/** @internal */\nexport function isLegacyProcedureDefBlock(\n block: Object,\n): block is LegacyProcedureDefBlock {\n return (block as any).getProcedureDef !== undefined;\n}\n\n/** @internal */\nexport interface LegacyProcedureCallBlock {\n getProcedureCall: () => string;\n renameProcedure: (p1: string, p2: string) => void;\n}\n\n/** @internal */\nexport function isLegacyProcedureCallBlock(\n block: Object,\n): block is LegacyProcedureCallBlock {\n return (\n (block as any).getProcedureCall !== undefined &&\n (block as any).renameProcedure !== undefined\n );\n}\n","/**\n * @license\n * Copyright 2012 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\n// Former goog.module ID: Blockly.Variables\n\nimport {Blocks} from './blocks.js';\nimport * as dialog from './dialog.js';\nimport {isVariableBackedParameterModel} from './interfaces/i_variable_backed_parameter_model.js';\nimport {Msg} from './msg.js';\nimport {isLegacyProcedureDefBlock} from './interfaces/i_legacy_procedure_blocks.js';\nimport * as utilsXml from './utils/xml.js';\nimport {VariableModel} from './variable_model.js';\nimport type {Workspace} from './workspace.js';\nimport type {WorkspaceSvg} from './workspace_svg.js';\n\n/**\n * String for use in the \"custom\" attribute of a category in toolbox XML.\n * This string indicates that the category should be dynamically populated with\n * variable blocks.\n * See also Blockly.Procedures.CATEGORY_NAME and\n * Blockly.VariablesDynamic.CATEGORY_NAME.\n */\nexport const CATEGORY_NAME = 'VARIABLE';\n\n/**\n * Find all user-created variables that are in use in the workspace.\n * For use by generators.\n * To get a list of all variables on a workspace, including unused variables,\n * call Workspace.getAllVariables.\n *\n * @param ws The workspace to search for variables.\n * @returns Array of variable models.\n */\nexport function allUsedVarModels(ws: Workspace): VariableModel[] {\n const blocks = ws.getAllBlocks(false);\n const variables = new Set();\n // Iterate through every block and add each variable to the set.\n for (let i = 0; i < blocks.length; i++) {\n const blockVariables = blocks[i].getVarModels();\n if (blockVariables) {\n for (let j = 0; j < blockVariables.length; j++) {\n const variable = blockVariables[j];\n const id = variable.getId();\n if (id) {\n variables.add(variable);\n }\n }\n }\n }\n // Convert the set into a list.\n return Array.from(variables.values());\n}\n\n/**\n * Find all developer variables used by blocks in the workspace.\n * Developer variables are never shown to the user, but are declared as global\n * variables in the generated code.\n * To declare developer variables, define the getDeveloperVariables function on\n * your block and return a list of variable names.\n * For use by generators.\n *\n * @param workspace The workspace to search.\n * @returns A list of non-duplicated variable names.\n */\nexport function allDeveloperVariables(workspace: Workspace): string[] {\n const blocks = workspace.getAllBlocks(false);\n const variables = new Set();\n for (let i = 0, block; (block = blocks[i]); i++) {\n const getDeveloperVariables = block.getDeveloperVariables;\n if (getDeveloperVariables) {\n const devVars = getDeveloperVariables();\n for (let j = 0; j < devVars.length; j++) {\n variables.add(devVars[j]);\n }\n }\n }\n // Convert the set into a list.\n return Array.from(variables.values());\n}\n\n/**\n * Construct the elements (blocks and button) required by the flyout for the\n * variable category.\n *\n * @param workspace The workspace containing variables.\n * @returns Array of XML elements.\n */\nexport function flyoutCategory(workspace: WorkspaceSvg): Element[] {\n let xmlList = new Array();\n const button = document.createElement('button');\n button.setAttribute('text', '%{BKY_NEW_VARIABLE}');\n button.setAttribute('callbackKey', 'CREATE_VARIABLE');\n\n workspace.registerButtonCallback('CREATE_VARIABLE', function (button) {\n createVariableButtonHandler(button.getTargetWorkspace());\n });\n\n xmlList.push(button);\n\n const blockList = flyoutCategoryBlocks(workspace);\n xmlList = xmlList.concat(blockList);\n return xmlList;\n}\n\n/**\n * Construct the blocks required by the flyout for the variable category.\n *\n * @param workspace The workspace containing variables.\n * @returns Array of XML block elements.\n */\nexport function flyoutCategoryBlocks(workspace: Workspace): Element[] {\n const variableModelList = workspace.getVariablesOfType('');\n\n const xmlList = [];\n if (variableModelList.length > 0) {\n // New variables are added to the end of the variableModelList.\n const mostRecentVariable = variableModelList[variableModelList.length - 1];\n if (Blocks['variables_set']) {\n const block = utilsXml.createElement('block');\n block.setAttribute('type', 'variables_set');\n block.setAttribute('gap', Blocks['math_change'] ? '8' : '24');\n block.appendChild(generateVariableFieldDom(mostRecentVariable));\n xmlList.push(block);\n }\n if (Blocks['math_change']) {\n const block = utilsXml.createElement('block');\n block.setAttribute('type', 'math_change');\n block.setAttribute('gap', Blocks['variables_get'] ? '20' : '8');\n block.appendChild(generateVariableFieldDom(mostRecentVariable));\n const value = utilsXml.textToDom(\n '' +\n '' +\n '1' +\n '' +\n '',\n );\n block.appendChild(value);\n xmlList.push(block);\n }\n\n if (Blocks['variables_get']) {\n variableModelList.sort(VariableModel.compareByName);\n for (let i = 0, variable; (variable = variableModelList[i]); i++) {\n const block = utilsXml.createElement('block');\n block.setAttribute('type', 'variables_get');\n block.setAttribute('gap', '8');\n block.appendChild(generateVariableFieldDom(variable));\n xmlList.push(block);\n }\n }\n }\n return xmlList;\n}\n\nexport const VAR_LETTER_OPTIONS = 'ijkmnopqrstuvwxyzabcdefgh';\n\n/**\n * Return a new variable name that is not yet being used. This will try to\n * generate single letter variable names in the range 'i' to 'z' to start with.\n * If no unique name is located it will try 'i' to 'z', 'a' to 'h',\n * then 'i2' to 'z2' etc. Skip 'l'.\n *\n * @param workspace The workspace to be unique in.\n * @returns New variable name.\n */\nexport function generateUniqueName(workspace: Workspace): string {\n return TEST_ONLY.generateUniqueNameInternal(workspace);\n}\n\n/**\n * Private version of generateUniqueName for stubbing in tests.\n */\nfunction generateUniqueNameInternal(workspace: Workspace): string {\n return generateUniqueNameFromOptions(\n VAR_LETTER_OPTIONS.charAt(0),\n workspace.getAllVariableNames(),\n );\n}\n\n/**\n * Returns a unique name that is not present in the usedNames array. This\n * will try to generate single letter names in the range a - z (skip l). It\n * will start with the character passed to startChar.\n *\n * @param startChar The character to start the search at.\n * @param usedNames A list of all of the used names.\n * @returns A unique name that is not present in the usedNames array.\n */\nexport function generateUniqueNameFromOptions(\n startChar: string,\n usedNames: string[],\n): string {\n if (!usedNames.length) {\n return startChar;\n }\n\n const letters = VAR_LETTER_OPTIONS;\n let suffix = '';\n let letterIndex = letters.indexOf(startChar);\n let potName = startChar;\n\n // eslint-disable-next-line no-constant-condition\n while (true) {\n let inUse = false;\n for (let i = 0; i < usedNames.length; i++) {\n if (usedNames[i].toLowerCase() === potName) {\n inUse = true;\n break;\n }\n }\n if (!inUse) {\n break;\n }\n\n letterIndex++;\n if (letterIndex === letters.length) {\n // Reached the end of the character sequence so back to 'i'.\n letterIndex = 0;\n suffix = `${Number(suffix) + 1}`;\n }\n potName = letters.charAt(letterIndex) + suffix;\n }\n return potName;\n}\n\n/**\n * Handles \"Create Variable\" button in the default variables toolbox category.\n * It will prompt the user for a variable name, including re-prompts if a name\n * is already in use among the workspace's variables.\n *\n * Custom button handlers can delegate to this function, allowing variables\n * types and after-creation processing. More complex customization (e.g.,\n * prompting for variable type) is beyond the scope of this function.\n *\n * @param workspace The workspace on which to create the variable.\n * @param opt_callback A callback. It will be passed an acceptable new variable\n * name, or null if change is to be aborted (cancel button), or undefined if\n * an existing variable was chosen.\n * @param opt_type The type of the variable like 'int', 'string', or ''. This\n * will default to '', which is a specific type.\n */\nexport function createVariableButtonHandler(\n workspace: Workspace,\n opt_callback?: (p1?: string | null) => void,\n opt_type?: string,\n) {\n const type = opt_type || '';\n // This function needs to be named so it can be called recursively.\n function promptAndCheckWithAlert(defaultName: string) {\n promptName(Msg['NEW_VARIABLE_TITLE'], defaultName, function (text) {\n if (!text) {\n // User canceled prompt.\n if (opt_callback) opt_callback(null);\n return;\n }\n\n const existing = nameUsedWithAnyType(text, workspace);\n if (!existing) {\n // No conflict\n workspace.createVariable(text, type);\n if (opt_callback) opt_callback(text);\n return;\n }\n\n let msg;\n if (existing.type === type) {\n msg = Msg['VARIABLE_ALREADY_EXISTS'].replace('%1', existing.name);\n } else {\n msg = Msg['VARIABLE_ALREADY_EXISTS_FOR_ANOTHER_TYPE'];\n msg = msg.replace('%1', existing.name).replace('%2', existing.type);\n }\n dialog.alert(msg, function () {\n promptAndCheckWithAlert(text);\n });\n });\n }\n promptAndCheckWithAlert('');\n}\n\n/**\n * Opens a prompt that allows the user to enter a new name for a variable.\n * Triggers a rename if the new name is valid. Or re-prompts if there is a\n * collision.\n *\n * @param workspace The workspace on which to rename the variable.\n * @param variable Variable to rename.\n * @param opt_callback A callback. It will be passed an acceptable new variable\n * name, or null if change is to be aborted (cancel button), or undefined if\n * an existing variable was chosen.\n */\nexport function renameVariable(\n workspace: Workspace,\n variable: VariableModel,\n opt_callback?: (p1?: string | null) => void,\n) {\n // This function needs to be named so it can be called recursively.\n function promptAndCheckWithAlert(defaultName: string) {\n const promptText = Msg['RENAME_VARIABLE_TITLE'].replace(\n '%1',\n variable.name,\n );\n promptName(promptText, defaultName, function (newName) {\n if (!newName) {\n // User canceled prompt.\n if (opt_callback) opt_callback(null);\n return;\n }\n\n const existing = nameUsedWithOtherType(newName, variable.type, workspace);\n const procedure = nameUsedWithConflictingParam(\n variable.name,\n newName,\n workspace,\n );\n if (!existing && !procedure) {\n // No conflict.\n workspace.renameVariableById(variable.getId(), newName);\n if (opt_callback) opt_callback(newName);\n return;\n }\n\n let msg = '';\n if (existing) {\n msg = Msg['VARIABLE_ALREADY_EXISTS_FOR_ANOTHER_TYPE']\n .replace('%1', existing.name)\n .replace('%2', existing.type);\n } else if (procedure) {\n msg = Msg['VARIABLE_ALREADY_EXISTS_FOR_A_PARAMETER']\n .replace('%1', newName)\n .replace('%2', procedure);\n }\n dialog.alert(msg, function () {\n promptAndCheckWithAlert(newName);\n });\n });\n }\n promptAndCheckWithAlert('');\n}\n\n/**\n * Prompt the user for a new variable name.\n *\n * @param promptText The string of the prompt.\n * @param defaultText The default value to show in the prompt's field.\n * @param callback A callback. It will be passed the new variable name, or null\n * if the user picked something illegal.\n */\nexport function promptName(\n promptText: string,\n defaultText: string,\n callback: (p1: string | null) => void,\n) {\n dialog.prompt(promptText, defaultText, function (newVar) {\n // Merge runs of whitespace. Strip leading and trailing whitespace.\n // Beyond this, all names are legal.\n if (newVar) {\n newVar = newVar.replace(/[\\s\\xa0]+/g, ' ').trim();\n if (newVar === Msg['RENAME_VARIABLE'] || newVar === Msg['NEW_VARIABLE']) {\n // Ok, not ALL names are legal...\n newVar = null;\n }\n }\n callback(newVar);\n });\n}\n/**\n * Check whether there exists a variable with the given name but a different\n * type.\n *\n * @param name The name to search for.\n * @param type The type to exclude from the search.\n * @param workspace The workspace to search for the variable.\n * @returns The variable with the given name and a different type, or null if\n * none was found.\n */\nfunction nameUsedWithOtherType(\n name: string,\n type: string,\n workspace: Workspace,\n): VariableModel | null {\n const allVariables = workspace.getVariableMap().getAllVariables();\n\n name = name.toLowerCase();\n for (let i = 0, variable; (variable = allVariables[i]); i++) {\n if (variable.name.toLowerCase() === name && variable.type !== type) {\n return variable;\n }\n }\n return null;\n}\n\n/**\n * Check whether there exists a variable with the given name of any type.\n *\n * @param name The name to search for.\n * @param workspace The workspace to search for the variable.\n * @returns The variable with the given name, or null if none was found.\n */\nexport function nameUsedWithAnyType(\n name: string,\n workspace: Workspace,\n): VariableModel | null {\n const allVariables = workspace.getVariableMap().getAllVariables();\n\n name = name.toLowerCase();\n for (let i = 0, variable; (variable = allVariables[i]); i++) {\n if (variable.name.toLowerCase() === name) {\n return variable;\n }\n }\n return null;\n}\n\n/**\n * Returns the name of the procedure with a conflicting parameter name, or null\n * if one does not exist.\n *\n * This checks the procedure map if it contains models, and the legacy procedure\n * blocks otherwise.\n *\n * @param oldName The old name of the variable.\n * @param newName The proposed name of the variable.\n * @param workspace The workspace to search for conflicting parameters.\n * @internal\n */\nexport function nameUsedWithConflictingParam(\n oldName: string,\n newName: string,\n workspace: Workspace,\n): string | null {\n return workspace.getProcedureMap().getProcedures().length\n ? checkForConflictingParamWithProcedureModels(oldName, newName, workspace)\n : checkForConflictingParamWithLegacyProcedures(oldName, newName, workspace);\n}\n\n/**\n * Returns the name of the procedure model with a conflicting param name, or\n * null if one does not exist.\n */\nfunction checkForConflictingParamWithProcedureModels(\n oldName: string,\n newName: string,\n workspace: Workspace,\n): string | null {\n oldName = oldName.toLowerCase();\n newName = newName.toLowerCase();\n\n const procedures = workspace.getProcedureMap().getProcedures();\n for (const procedure of procedures) {\n const params = procedure\n .getParameters()\n .filter(isVariableBackedParameterModel)\n .map((param) => param.getVariableModel().name);\n if (!params) continue;\n const procHasOld = params.some((param) => param.toLowerCase() === oldName);\n const procHasNew = params.some((param) => param.toLowerCase() === newName);\n if (procHasOld && procHasNew) return procedure.getName();\n }\n return null;\n}\n\n/**\n * Returns the name of the procedure block with a conflicting param name, or\n * null if one does not exist.\n */\nfunction checkForConflictingParamWithLegacyProcedures(\n oldName: string,\n newName: string,\n workspace: Workspace,\n): string | null {\n oldName = oldName.toLowerCase();\n newName = newName.toLowerCase();\n\n const blocks = workspace.getAllBlocks(false);\n for (const block of blocks) {\n if (!isLegacyProcedureDefBlock(block)) continue;\n const def = block.getProcedureDef();\n const params = def[1];\n const blockHasOld = params.some((param) => param.toLowerCase() === oldName);\n const blockHasNew = params.some((param) => param.toLowerCase() === newName);\n if (blockHasOld && blockHasNew) return def[0];\n }\n return null;\n}\n\n/**\n * Generate DOM objects representing a variable field.\n *\n * @param variableModel The variable model to represent.\n * @returns The generated DOM.\n */\nexport function generateVariableFieldDom(\n variableModel: VariableModel,\n): Element {\n /* Generates the following XML:\n * foo\n */\n const field = utilsXml.createElement('field');\n field.setAttribute('name', 'VAR');\n field.setAttribute('id', variableModel.getId());\n field.setAttribute('variabletype', variableModel.type);\n const name = utilsXml.createTextNode(variableModel.name);\n field.appendChild(name);\n return field;\n}\n\n/**\n * Helper function to look up or create a variable on the given workspace.\n * If no variable exists, creates and returns it.\n *\n * @param workspace The workspace to search for the variable. It may be a\n * flyout workspace or main workspace.\n * @param id The ID to use to look up or create the variable, or null.\n * @param opt_name The string to use to look up or create the variable.\n * @param opt_type The type to use to look up or create the variable.\n * @returns The variable corresponding to the given ID or name + type\n * combination.\n */\nexport function getOrCreateVariablePackage(\n workspace: Workspace,\n id: string | null,\n opt_name?: string,\n opt_type?: string,\n): VariableModel {\n let variable = getVariable(workspace, id, opt_name, opt_type);\n if (!variable) {\n variable = createVariable(workspace, id, opt_name, opt_type);\n }\n return variable;\n}\n\n/**\n * Look up a variable on the given workspace.\n * Always looks in the main workspace before looking in the flyout workspace.\n * Always prefers lookup by ID to lookup by name + type.\n *\n * @param workspace The workspace to search for the variable. It may be a\n * flyout workspace or main workspace.\n * @param id The ID to use to look up the variable, or null.\n * @param opt_name The string to use to look up the variable.\n * Only used if lookup by ID fails.\n * @param opt_type The type to use to look up the variable.\n * Only used if lookup by ID fails.\n * @returns The variable corresponding to the given ID or name + type\n * combination, or null if not found.\n */\nexport function getVariable(\n workspace: Workspace,\n id: string | null,\n opt_name?: string,\n opt_type?: string,\n): VariableModel | null {\n const potentialVariableMap = workspace.getPotentialVariableMap();\n let variable = null;\n // Try to just get the variable, by ID if possible.\n if (id) {\n // Look in the real variable map before checking the potential variable map.\n variable = workspace.getVariableById(id);\n if (!variable && potentialVariableMap) {\n variable = potentialVariableMap.getVariableById(id);\n }\n if (variable) {\n return variable;\n }\n }\n // If there was no ID, or there was an ID but it didn't match any variables,\n // look up by name and type.\n if (opt_name) {\n if (opt_type === undefined) {\n throw Error('Tried to look up a variable by name without a type');\n }\n // Otherwise look up by name and type.\n variable = workspace.getVariable(opt_name, opt_type);\n if (!variable && potentialVariableMap) {\n variable = potentialVariableMap.getVariable(opt_name, opt_type);\n }\n }\n return variable;\n}\n\n/**\n * Helper function to create a variable on the given workspace.\n *\n * @param workspace The workspace in which to create the variable. It may be a\n * flyout workspace or main workspace.\n * @param id The ID to use to create the variable, or null.\n * @param opt_name The string to use to create the variable.\n * @param opt_type The type to use to create the variable.\n * @returns The variable corresponding to the given ID or name + type\n * combination.\n */\nfunction createVariable(\n workspace: Workspace,\n id: string | null,\n opt_name?: string,\n opt_type?: string,\n): VariableModel {\n const potentialVariableMap = workspace.getPotentialVariableMap();\n // Variables without names get uniquely named for this workspace.\n if (!opt_name) {\n const ws = workspace.isFlyout\n ? (workspace as WorkspaceSvg).targetWorkspace\n : workspace;\n opt_name = generateUniqueName(ws!);\n }\n\n // Create a potential variable if in the flyout.\n let variable = null;\n if (potentialVariableMap) {\n variable = potentialVariableMap.createVariable(opt_name, opt_type, id);\n } else {\n // In the main workspace, create a real variable.\n variable = workspace.createVariable(opt_name, opt_type, id);\n }\n return variable;\n}\n\n/**\n * Helper function to get the list of variables that have been added to the\n * workspace after adding a new block, using the given list of variables that\n * were in the workspace before the new block was added.\n *\n * @param workspace The workspace to inspect.\n * @param originalVariables The array of variables that existed in the workspace\n * before adding the new block.\n * @returns The new array of variables that were freshly added to the workspace\n * after creating the new block, or [] if no new variables were added to the\n * workspace.\n * @internal\n */\nexport function getAddedVariables(\n workspace: Workspace,\n originalVariables: VariableModel[],\n): VariableModel[] {\n const allCurrentVariables = workspace.getAllVariables();\n const addedVariables = [];\n if (originalVariables.length !== allCurrentVariables.length) {\n for (let i = 0; i < allCurrentVariables.length; i++) {\n const variable = allCurrentVariables[i];\n // For any variable that is present in allCurrentVariables but not\n // present in originalVariables, add the variable to addedVariables.\n if (originalVariables.indexOf(variable) === -1) {\n addedVariables.push(variable);\n }\n }\n }\n return addedVariables;\n}\n\nexport const TEST_ONLY = {\n generateUniqueNameInternal,\n};\n","/**\n * @license\n * Copyright 2023 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport {ICopyable, ICopyData} from '../interfaces/i_copyable.js';\nimport type {IPaster} from '../interfaces/i_paster.js';\nimport * as registry from '../registry.js';\n\n/**\n * Registers the given paster so that it cna be used for pasting.\n *\n * @param type The type of the paster to register, e.g. 'block', 'comment', etc.\n * @param paster The paster to register.\n */\nexport function register>(\n type: string,\n paster: IPaster,\n) {\n registry.register(registry.Type.PASTER, type, paster);\n}\n\n/**\n * Unregisters the paster associated with the given type.\n *\n * @param type The type of the paster to unregister.\n */\nexport function unregister(type: string) {\n registry.unregister(registry.Type.PASTER, type);\n}\n","/**\n * @license\n * Copyright 2023 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport {BlockSvg} from './block_svg.js';\nimport {Coordinate} from './utils/coordinate.js';\nimport * as userAgent from './utils/useragent.js';\n\n/** The set of all blocks in need of rendering which don't have parents. */\nconst rootBlocks = new Set();\n\n/** The set of all blocks in need of rendering. */\nlet dirtyBlocks = new WeakSet();\n\n/**\n * The promise which resolves after the current set of renders is completed. Or\n * null if there are no queued renders.\n *\n * Stored so that we can return it from afterQueuedRenders.\n */\nlet afterRendersPromise: Promise | null = null;\n\n/** The function to call to resolve the `afterRendersPromise`. */\nlet afterRendersResolver: (() => void) | null = null;\n\n/**\n * The ID of the current animation frame request. Used to cancel the request\n * if necessary.\n */\nlet animationRequestId = 0;\n\n/**\n * Registers that the given block and all of its parents need to be rerendered,\n * and registers a callback to do so after a delay, to allowf or batching.\n *\n * @param block The block to rerender.\n * @returns A promise that resolves after the currently queued renders have been\n * completed. Used for triggering other behavior that relies on updated\n * size/position location for the block.\n * @internal\n */\nexport function queueRender(block: BlockSvg): Promise {\n queueBlock(block);\n\n if (alwaysImmediatelyRender()) {\n doRenders();\n return Promise.resolve();\n }\n\n if (!afterRendersPromise) {\n afterRendersPromise = new Promise((resolve) => {\n afterRendersResolver = resolve;\n animationRequestId = window.requestAnimationFrame(() => {\n doRenders();\n resolve();\n });\n });\n }\n return afterRendersPromise;\n}\n\n/**\n * @returns A promise that resolves after the currently queued renders have\n * been completed.\n */\nexport function finishQueuedRenders(): Promise {\n // If there are no queued renders, return a resolved promise so `then`\n // callbacks trigger immediately.\n return afterRendersPromise ? afterRendersPromise : Promise.resolve();\n}\n\n/**\n * Triggers an immediate render of all queued renders. Should only be used in\n * cases where queueing renders breaks functionality + backwards compatibility\n * (such as rendering icons).\n *\n * @internal\n */\nexport function triggerQueuedRenders() {\n window.cancelAnimationFrame(animationRequestId);\n doRenders();\n if (afterRendersResolver) afterRendersResolver();\n}\n\n/**\n * @returns True if we should always trigger an immediate render.\n * Some platforms don't properly support `requestAnimationFrame`, so to\n * avoid glitchiness, we give up the performance improvements.\n */\nfunction alwaysImmediatelyRender() {\n return userAgent.JavaFx;\n}\n\n/**\n * Adds the given block and its parents to the render queue. Adds the root block\n * to the list of root blocks.\n *\n * @param block The block to queue.\n */\nfunction queueBlock(block: BlockSvg) {\n dirtyBlocks.add(block);\n const parent = block.getParent();\n if (parent) {\n queueBlock(parent);\n } else {\n rootBlocks.add(block);\n }\n}\n\n/**\n * Rerenders all of the blocks in the queue.\n */\nfunction doRenders() {\n const workspaces = new Set([...rootBlocks].map((block) => block.workspace));\n for (const block of rootBlocks) {\n // No need to render a dead block.\n if (block.isDisposed()) continue;\n // A render for this block may have been queued, and then the block was\n // connected to a parent, so it is no longer a root block.\n // Rendering will be triggered through the real root block.\n if (block.getParent()) continue;\n\n renderBlock(block);\n const blockOrigin = block.getRelativeToSurfaceXY();\n updateConnectionLocations(block, blockOrigin);\n updateIconLocations(block, blockOrigin);\n }\n for (const workspace of workspaces) {\n workspace.resizeContents();\n }\n\n rootBlocks.clear();\n dirtyBlocks = new Set();\n afterRendersPromise = null;\n}\n\n/**\n * Recursively renders all of the dirty children of the given block, and\n * then renders the block.\n *\n * @param block The block to rerender.\n */\nfunction renderBlock(block: BlockSvg) {\n if (!dirtyBlocks.has(block)) return;\n for (const child of block.getChildren(false)) {\n renderBlock(child);\n }\n block.renderEfficiently();\n}\n\n/**\n * Updates the connection database with the new locations of all of the\n * connections that are children of the given block.\n *\n * @param block The block to update the connection locations of.\n * @param blockOrigin The top left of the given block in workspace coordinates.\n */\nfunction updateConnectionLocations(block: BlockSvg, blockOrigin: Coordinate) {\n for (const conn of block.getConnections_(false)) {\n const moved = conn.moveToOffset(blockOrigin);\n const target = conn.targetBlock();\n if (!conn.isSuperior()) continue;\n if (!target) continue;\n if (moved || dirtyBlocks.has(target)) {\n updateConnectionLocations(\n target,\n Coordinate.sum(blockOrigin, target.relativeCoords),\n );\n }\n }\n}\n\n/**\n * Updates all icons that are children of the given block with their new\n * locations.\n *\n * @param block The block to update the icon locations of.\n */\nfunction updateIconLocations(block: BlockSvg, blockOrigin: Coordinate) {\n if (!block.getIcons) return;\n for (const icon of block.getIcons()) {\n icon.onLocationChange(blockOrigin);\n }\n for (const child of block.getChildren(false)) {\n updateIconLocations(\n child,\n Coordinate.sum(blockOrigin, child.relativeCoords),\n );\n }\n}\n","/**\n * @license\n * Copyright 2012 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\n// Former goog.module ID: Blockly.Xml\n\nimport type {Block} from './block.js';\nimport type {BlockSvg} from './block_svg.js';\nimport type {Connection} from './connection.js';\nimport * as eventUtils from './events/utils.js';\nimport type {Field} from './field.js';\nimport {IconType} from './icons/icon_types.js';\nimport {inputTypes} from './inputs/input_types.js';\nimport * as dom from './utils/dom.js';\nimport {Size} from './utils/size.js';\nimport * as utilsXml from './utils/xml.js';\nimport type {VariableModel} from './variable_model.js';\nimport * as Variables from './variables.js';\nimport type {Workspace} from './workspace.js';\nimport {WorkspaceComment} from './workspace_comment.js';\nimport {WorkspaceCommentSvg} from './workspace_comment_svg.js';\nimport type {WorkspaceSvg} from './workspace_svg.js';\nimport * as renderManagement from './render_management.js';\n\n/**\n * Encode a block tree as XML.\n *\n * @param workspace The workspace containing blocks.\n * @param opt_noId True if the encoder should skip the block IDs.\n * @returns XML DOM element.\n */\nexport function workspaceToDom(\n workspace: Workspace,\n opt_noId?: boolean,\n): Element {\n const treeXml = utilsXml.createElement('xml');\n const variablesElement = variablesToDom(\n Variables.allUsedVarModels(workspace),\n );\n if (variablesElement.hasChildNodes()) {\n treeXml.appendChild(variablesElement);\n }\n const comments = workspace.getTopComments(true);\n for (let i = 0; i < comments.length; i++) {\n const comment = comments[i];\n treeXml.appendChild(comment.toXmlWithXY(opt_noId));\n }\n const blocks = workspace.getTopBlocks(true);\n for (let i = 0; i < blocks.length; i++) {\n const block = blocks[i];\n treeXml.appendChild(blockToDomWithXY(block, opt_noId));\n }\n return treeXml;\n}\n\n/**\n * Encode a list of variables as XML.\n *\n * @param variableList List of all variable models.\n * @returns Tree of XML elements.\n */\nexport function variablesToDom(variableList: VariableModel[]): Element {\n const variables = utilsXml.createElement('variables');\n for (let i = 0; i < variableList.length; i++) {\n const variable = variableList[i];\n const element = utilsXml.createElement('variable');\n element.appendChild(utilsXml.createTextNode(variable.name));\n if (variable.type) {\n element.setAttribute('type', variable.type);\n }\n element.id = variable.getId();\n variables.appendChild(element);\n }\n return variables;\n}\n\n/**\n * Encode a block subtree as XML with XY coordinates.\n *\n * @param block The root block to encode.\n * @param opt_noId True if the encoder should skip the block ID.\n * @returns Tree of XML elements or an empty document fragment if the block was\n * an insertion marker.\n */\nexport function blockToDomWithXY(\n block: Block,\n opt_noId?: boolean,\n): Element | DocumentFragment {\n if (block.isInsertionMarker()) {\n // Skip over insertion markers.\n block = block.getChildren(false)[0];\n if (!block) {\n // Disappears when appended.\n return new DocumentFragment();\n }\n }\n\n let width = 0; // Not used in LTR.\n if (block.workspace.RTL) {\n width = block.workspace.getWidth();\n }\n\n const element = blockToDom(block, opt_noId);\n if (isElement(element)) {\n const xy = block.getRelativeToSurfaceXY();\n element.setAttribute(\n 'x',\n String(Math.round(block.workspace.RTL ? width - xy.x : xy.x)),\n );\n element.setAttribute('y', String(Math.round(xy.y)));\n }\n return element;\n}\n\n/**\n * Encode a field as XML.\n *\n * @param field The field to encode.\n * @returns XML element, or null if the field did not need to be serialized.\n */\nfunction fieldToDom(field: Field): Element | null {\n if (field.isSerializable()) {\n const container = utilsXml.createElement('field');\n container.setAttribute('name', field.name || '');\n return field.toXml(container);\n }\n return null;\n}\n\n/**\n * Encode all of a block's fields as XML and attach them to the given tree of\n * XML elements.\n *\n * @param block A block with fields to be encoded.\n * @param element The XML element to which the field DOM should be attached.\n */\nfunction allFieldsToDom(block: Block, element: Element) {\n for (let i = 0; i < block.inputList.length; i++) {\n const input = block.inputList[i];\n for (let j = 0; j < input.fieldRow.length; j++) {\n const field = input.fieldRow[j];\n const fieldDom = fieldToDom(field);\n if (fieldDom) {\n element.appendChild(fieldDom);\n }\n }\n }\n}\n\n/**\n * Encode a block subtree as XML.\n *\n * @param block The root block to encode.\n * @param opt_noId True if the encoder should skip the block ID.\n * @returns Tree of XML elements or an empty document fragment if the block was\n * an insertion marker.\n */\nexport function blockToDom(\n block: Block,\n opt_noId?: boolean,\n): Element | DocumentFragment {\n // Skip over insertion markers.\n if (block.isInsertionMarker()) {\n const child = block.getChildren(false)[0];\n if (child) {\n return blockToDom(child);\n } else {\n // Disappears when appended.\n return new DocumentFragment();\n }\n }\n\n const element = utilsXml.createElement(block.isShadow() ? 'shadow' : 'block');\n element.setAttribute('type', block.type);\n if (!opt_noId) {\n element.id = block.id;\n }\n if (block.mutationToDom) {\n // Custom data for an advanced block.\n const mutation = block.mutationToDom();\n if (mutation && (mutation.hasChildNodes() || mutation.hasAttributes())) {\n element.appendChild(mutation);\n }\n }\n\n allFieldsToDom(block, element);\n\n const commentText = block.getCommentText();\n if (commentText) {\n const comment = block.getIcon(IconType.COMMENT)!;\n const size = comment.getBubbleSize();\n const pinned = comment.bubbleIsVisible();\n\n const commentElement = utilsXml.createElement('comment');\n commentElement.appendChild(utilsXml.createTextNode(commentText));\n commentElement.setAttribute('pinned', `${pinned}`);\n commentElement.setAttribute('h', String(size.height));\n commentElement.setAttribute('w', String(size.width));\n\n element.appendChild(commentElement);\n }\n\n if (block.data) {\n const dataElement = utilsXml.createElement('data');\n dataElement.appendChild(utilsXml.createTextNode(block.data));\n element.appendChild(dataElement);\n }\n\n for (let i = 0; i < block.inputList.length; i++) {\n const input = block.inputList[i];\n let container: Element;\n let empty = true;\n if (input.type === inputTypes.DUMMY || input.type === inputTypes.END_ROW) {\n continue;\n } else {\n const childBlock = input.connection!.targetBlock();\n if (input.type === inputTypes.VALUE) {\n container = utilsXml.createElement('value');\n } else if (input.type === inputTypes.STATEMENT) {\n container = utilsXml.createElement('statement');\n }\n const childShadow = input.connection!.getShadowDom();\n if (childShadow && (!childBlock || !childBlock.isShadow())) {\n container!.appendChild(cloneShadow(childShadow, opt_noId));\n }\n if (childBlock) {\n const childElem = blockToDom(childBlock, opt_noId);\n if (childElem.nodeType === dom.NodeType.ELEMENT_NODE) {\n container!.appendChild(childElem);\n empty = false;\n }\n }\n }\n container!.setAttribute('name', input.name);\n if (!empty) {\n element.appendChild(container!);\n }\n }\n if (\n block.inputsInline !== undefined &&\n block.inputsInline !== block.inputsInlineDefault\n ) {\n element.setAttribute('inline', String(block.inputsInline));\n }\n if (block.isCollapsed()) {\n element.setAttribute('collapsed', 'true');\n }\n if (!block.isEnabled()) {\n element.setAttribute('disabled', 'true');\n }\n if (!block.isDeletable() && !block.isShadow()) {\n element.setAttribute('deletable', 'false');\n }\n if (!block.isMovable() && !block.isShadow()) {\n element.setAttribute('movable', 'false');\n }\n if (!block.isEditable()) {\n element.setAttribute('editable', 'false');\n }\n\n const nextBlock = block.getNextBlock();\n let container: Element;\n if (nextBlock) {\n const nextElem = blockToDom(nextBlock, opt_noId);\n if (nextElem.nodeType === dom.NodeType.ELEMENT_NODE) {\n container = utilsXml.createElement('next');\n container.appendChild(nextElem);\n element.appendChild(container);\n }\n }\n const nextShadow =\n block.nextConnection && block.nextConnection.getShadowDom();\n if (nextShadow && (!nextBlock || !nextBlock.isShadow())) {\n container!.appendChild(cloneShadow(nextShadow, opt_noId));\n }\n\n return element;\n}\n\n/**\n * Deeply clone the shadow's DOM so that changes don't back-wash to the block.\n *\n * @param shadow A tree of XML elements.\n * @param opt_noId True if the encoder should skip the block ID.\n * @returns A tree of XML elements.\n */\nfunction cloneShadow(shadow: Element, opt_noId?: boolean): Element {\n shadow = shadow.cloneNode(true) as Element;\n // Walk the tree looking for whitespace. Don't prune whitespace in a tag.\n let node: Node | null = shadow;\n let textNode;\n while (node) {\n if (opt_noId && node.nodeName === 'shadow') {\n // Strip off IDs from shadow blocks. There should never be a 'block' as\n // a child of a 'shadow', so no need to check that.\n (node as Element).removeAttribute('id');\n }\n if (node.firstChild) {\n node = node.firstChild;\n } else {\n while (node && !node.nextSibling) {\n textNode = node;\n node = node.parentNode;\n if (\n textNode.nodeType === dom.NodeType.TEXT_NODE &&\n (textNode as Text).data.trim() === '' &&\n node?.firstChild !== textNode\n ) {\n // Prune whitespace after a tag.\n dom.removeNode(textNode);\n }\n }\n if (node) {\n textNode = node;\n node = node.nextSibling;\n if (\n textNode.nodeType === dom.NodeType.TEXT_NODE &&\n (textNode as Text).data.trim() === ''\n ) {\n // Prune whitespace before a tag.\n dom.removeNode(textNode);\n }\n }\n }\n }\n return shadow;\n}\n\n/**\n * Converts a DOM structure into plain text.\n * Currently the text format is fairly ugly: all one line with no whitespace,\n * unless the DOM itself has whitespace built-in.\n *\n * @param dom A tree of XML nodes.\n * @returns Text representation.\n */\nexport function domToText(dom: Node): string {\n const text = utilsXml.domToText(dom);\n // Unpack self-closing tags. These tags fail when embedded in HTML.\n // -> \n return text.replace(/<(\\w+)([^<]*)\\/>/g, '<$1$2>');\n}\n\n/**\n * Converts a DOM structure into properly indented text.\n *\n * @param dom A tree of XML elements.\n * @returns Text representation.\n */\nexport function domToPrettyText(dom: Node): string {\n // This function is not guaranteed to be correct for all XML.\n // But it handles the XML that Blockly generates.\n const blob = domToText(dom);\n // Place every open and close tag on its own line.\n const lines = blob.split('<');\n // Indent every line.\n let indent = '';\n for (let i = 1; i < lines.length; i++) {\n const line = lines[i];\n if (line[0] === '/') {\n indent = indent.substring(2);\n }\n lines[i] = indent + '<' + line;\n if (line[0] !== '/' && line.slice(-2) !== '/>') {\n indent += ' ';\n }\n }\n // Pull simple tags back together.\n // E.g. \n let text = lines.join('\\n');\n text = text.replace(/(<(\\w+)\\b[^>]*>[^\\n]*)\\n *<\\/\\2>/g, '$1');\n // Trim leading blank line.\n return text.replace(/^\\n/, '');\n}\n\n/**\n * Clear the given workspace then decode an XML DOM and\n * create blocks on the workspace.\n *\n * @param xml XML DOM.\n * @param workspace The workspace.\n * @returns An array containing new block IDs.\n */\nexport function clearWorkspaceAndLoadFromXml(\n xml: Element,\n workspace: WorkspaceSvg,\n): string[] {\n workspace.setResizesEnabled(false);\n workspace.clear();\n const blockIds = domToWorkspace(xml, workspace);\n workspace.setResizesEnabled(true);\n return blockIds;\n}\n\n/**\n * Decode an XML DOM and create blocks on the workspace.\n *\n * @param xml XML DOM.\n * @param workspace The workspace.\n * @returns An array containing new block IDs.\n */\nexport function domToWorkspace(xml: Element, workspace: Workspace): string[] {\n let width = 0; // Not used in LTR.\n if (workspace.RTL) {\n width = workspace.getWidth();\n }\n const newBlockIds = []; // A list of block IDs added by this call.\n dom.startTextWidthCache();\n const existingGroup = eventUtils.getGroup();\n if (!existingGroup) {\n eventUtils.setGroup(true);\n }\n\n // Disable workspace resizes as an optimization.\n // Assume it is rendered so we can check.\n if ((workspace as WorkspaceSvg).setResizesEnabled) {\n (workspace as WorkspaceSvg).setResizesEnabled(false);\n }\n let variablesFirst = true;\n try {\n for (let i = 0, xmlChild; (xmlChild = xml.childNodes[i]); i++) {\n const name = xmlChild.nodeName.toLowerCase();\n const xmlChildElement = xmlChild as Element;\n if (\n name === 'block' ||\n (name === 'shadow' && !eventUtils.getRecordUndo())\n ) {\n // Allow top-level shadow blocks if recordUndo is disabled since\n // that means an undo is in progress. Such a block is expected\n // to be moved to a nested destination in the next operation.\n const block = domToBlockInternal(xmlChildElement, workspace);\n newBlockIds.push(block.id);\n const blockX = parseInt(xmlChildElement.getAttribute('x') ?? '10', 10);\n const blockY = parseInt(xmlChildElement.getAttribute('y') ?? '10', 10);\n if (!isNaN(blockX) && !isNaN(blockY)) {\n block.moveBy(workspace.RTL ? width - blockX : blockX, blockY, [\n 'create',\n ]);\n }\n variablesFirst = false;\n } else if (name === 'shadow') {\n throw TypeError('Shadow block cannot be a top-level block.');\n } else if (name === 'comment') {\n if (workspace.rendered) {\n WorkspaceCommentSvg.fromXmlRendered(\n xmlChildElement,\n workspace as WorkspaceSvg,\n width,\n );\n } else {\n WorkspaceComment.fromXml(xmlChildElement, workspace);\n }\n } else if (name === 'variables') {\n if (variablesFirst) {\n domToVariables(xmlChildElement, workspace);\n } else {\n throw Error(\n \"'variables' tag must exist once before block and \" +\n 'shadow tag elements in the workspace XML, but it was found in ' +\n 'another location.',\n );\n }\n variablesFirst = false;\n }\n }\n } finally {\n eventUtils.setGroup(existingGroup);\n if ((workspace as WorkspaceSvg).setResizesEnabled) {\n (workspace as WorkspaceSvg).setResizesEnabled(true);\n }\n if (workspace.rendered) renderManagement.triggerQueuedRenders();\n dom.stopTextWidthCache();\n }\n // Re-enable workspace resizing.\n eventUtils.fire(new (eventUtils.get(eventUtils.FINISHED_LOADING))(workspace));\n return newBlockIds;\n}\n\n/**\n * Decode an XML DOM and create blocks on the workspace. Position the new\n * blocks immediately below prior blocks, aligned by their starting edge.\n *\n * @param xml The XML DOM.\n * @param workspace The workspace to add to.\n * @returns An array containing new block IDs.\n */\nexport function appendDomToWorkspace(\n xml: Element,\n workspace: WorkspaceSvg,\n): string[] {\n // First check if we have a WorkspaceSvg, otherwise the blocks have no shape\n // and the position does not matter.\n // Assume it is rendered so we can check.\n if (!(workspace as WorkspaceSvg).getBlocksBoundingBox) {\n return domToWorkspace(xml, workspace);\n }\n\n const bbox = (workspace as WorkspaceSvg).getBlocksBoundingBox();\n // Load the new blocks into the workspace and get the IDs of the new blocks.\n const newBlockIds = domToWorkspace(xml, workspace);\n if (bbox && bbox.top !== bbox.bottom) {\n // Check if any previous block.\n let offsetY = 0; // Offset to add to y of the new block.\n let offsetX = 0;\n const farY = bbox.bottom; // Bottom position.\n const topX = workspace.RTL ? bbox.right : bbox.left; // X of bounding box.\n // Check position of the new blocks.\n let newLeftX = Infinity; // X of top left corner.\n let newRightX = -Infinity; // X of top right corner.\n let newY = Infinity; // Y of top corner.\n const ySeparation = 10;\n for (let i = 0; i < newBlockIds.length; i++) {\n const blockXY = workspace\n .getBlockById(newBlockIds[i])!\n .getRelativeToSurfaceXY();\n if (blockXY.y < newY) {\n newY = blockXY.y;\n }\n if (blockXY.x < newLeftX) {\n // if we left align also on x\n newLeftX = blockXY.x;\n }\n if (blockXY.x > newRightX) {\n // if we right align also on x\n newRightX = blockXY.x;\n }\n }\n offsetY = farY - newY + ySeparation;\n offsetX = workspace.RTL ? topX - newRightX : topX - newLeftX;\n for (let i = 0; i < newBlockIds.length; i++) {\n const block = workspace.getBlockById(newBlockIds[i]);\n block!.moveBy(offsetX, offsetY, ['create']);\n }\n }\n return newBlockIds;\n}\n\n/**\n * Decode an XML block tag and create a block (and possibly sub blocks) on the\n * workspace.\n *\n * @param xmlBlock XML block element.\n * @param workspace The workspace.\n * @returns The root block created.\n */\nexport function domToBlock(xmlBlock: Element, workspace: Workspace): Block {\n const block = domToBlockInternal(xmlBlock, workspace);\n if (workspace.rendered) renderManagement.triggerQueuedRenders();\n return block;\n}\n\n/**\n * Decode an XML block tag and create a block (and possibly sub blocks) on the\n * workspace.\n *\n * This is defined internally so that it doesn't trigger an immediate render,\n * which we do want to happen for external calls.\n *\n * @param xmlBlock XML block element.\n * @param workspace The workspace.\n * @returns The root block created.\n * @internal\n */\nexport function domToBlockInternal(\n xmlBlock: Element,\n workspace: Workspace,\n): Block {\n // Create top-level block.\n eventUtils.disable();\n const variablesBeforeCreation = workspace.getAllVariables();\n let topBlock;\n try {\n topBlock = domToBlockHeadless(xmlBlock, workspace);\n // Generate list of all blocks.\n if (workspace.rendered) {\n const topBlockSvg = topBlock as BlockSvg;\n const blocks = topBlock.getDescendants(false);\n topBlockSvg.setConnectionTracking(false);\n // Render each block.\n for (let i = blocks.length - 1; i >= 0; i--) {\n (blocks[i] as BlockSvg).initSvg();\n }\n for (let i = blocks.length - 1; i >= 0; i--) {\n (blocks[i] as BlockSvg).queueRender();\n }\n // Populating the connection database may be deferred until after the\n // blocks have rendered.\n setTimeout(function () {\n if (!topBlockSvg.disposed) {\n topBlockSvg.setConnectionTracking(true);\n }\n }, 1);\n topBlockSvg.updateDisabled();\n // Allow the scrollbars to resize and move based on the new contents.\n // TODO(@picklesrus): #387. Remove when domToBlock avoids resizing.\n (workspace as WorkspaceSvg).resizeContents();\n } else {\n const blocks = topBlock.getDescendants(false);\n for (let i = blocks.length - 1; i >= 0; i--) {\n blocks[i].initModel();\n }\n }\n } finally {\n eventUtils.enable();\n }\n if (eventUtils.isEnabled()) {\n const newVariables = Variables.getAddedVariables(\n workspace,\n variablesBeforeCreation,\n );\n // Fire a VarCreate event for each (if any) new variable created.\n for (let i = 0; i < newVariables.length; i++) {\n const thisVariable = newVariables[i];\n eventUtils.fire(\n new (eventUtils.get(eventUtils.VAR_CREATE))(thisVariable),\n );\n }\n // Block events come after var events, in case they refer to newly created\n // variables.\n eventUtils.fire(new (eventUtils.get(eventUtils.CREATE))(topBlock));\n }\n return topBlock;\n}\n\n/**\n * Decode an XML list of variables and add the variables to the workspace.\n *\n * @param xmlVariables List of XML variable elements.\n * @param workspace The workspace to which the variable should be added.\n */\nexport function domToVariables(xmlVariables: Element, workspace: Workspace) {\n for (let i = 0; i < xmlVariables.children.length; i++) {\n const xmlChild = xmlVariables.children[i];\n const type = xmlChild.getAttribute('type');\n const id = xmlChild.getAttribute('id');\n const name = xmlChild.textContent;\n\n if (!name) return;\n workspace.createVariable(name, type, id);\n }\n}\n\n/** A mapping of nodeName to node for child nodes of xmlBlock. */\ninterface childNodeTagMap {\n mutation: Element[];\n comment: Element[];\n data: Element[];\n field: Element[];\n input: Element[];\n next: Element[];\n}\n\n/**\n * Creates a mapping of childNodes for each supported XML tag for the provided\n * xmlBlock. Logs a warning for any encountered unsupported tags.\n *\n * @param xmlBlock XML block element.\n * @returns The childNode map from nodeName to node.\n */\nfunction mapSupportedXmlTags(xmlBlock: Element): childNodeTagMap {\n const childNodeMap = {\n mutation: new Array(),\n comment: new Array(),\n data: new Array(),\n field: new Array(),\n input: new Array(),\n next: new Array(),\n };\n for (let i = 0; i < xmlBlock.children.length; i++) {\n const xmlChild = xmlBlock.children[i];\n if (xmlChild.nodeType === dom.NodeType.TEXT_NODE) {\n // Ignore any text at the level. It's all whitespace anyway.\n continue;\n }\n switch (xmlChild.nodeName.toLowerCase()) {\n case 'mutation':\n childNodeMap.mutation.push(xmlChild);\n break;\n case 'comment':\n childNodeMap.comment.push(xmlChild);\n break;\n case 'data':\n childNodeMap.data.push(xmlChild);\n break;\n case 'title':\n // Titles were renamed to field in December 2013.\n // Fall through.\n case 'field':\n childNodeMap.field.push(xmlChild);\n break;\n case 'value':\n case 'statement':\n childNodeMap.input.push(xmlChild);\n break;\n case 'next':\n childNodeMap.next.push(xmlChild);\n break;\n default:\n // Unknown tag; ignore. Same principle as HTML parsers.\n console.warn('Ignoring unknown tag: ' + xmlChild.nodeName);\n }\n }\n return childNodeMap;\n}\n\n/**\n * Applies mutation tag child nodes to the given block.\n *\n * @param xmlChildren Child nodes.\n * @param block The block to apply the child nodes on.\n * @returns True if mutation may have added some elements that need\n * initialization (requiring initSvg call).\n */\nfunction applyMutationTagNodes(xmlChildren: Element[], block: Block): boolean {\n let shouldCallInitSvg = false;\n for (let i = 0; i < xmlChildren.length; i++) {\n const xmlChild = xmlChildren[i];\n // Custom data for an advanced block.\n if (block.domToMutation) {\n block.domToMutation(xmlChild);\n if ((block as BlockSvg).initSvg) {\n // Mutation may have added some elements that need initializing.\n shouldCallInitSvg = true;\n }\n }\n }\n return shouldCallInitSvg;\n}\n\n/**\n * Applies comment tag child nodes to the given block.\n *\n * @param xmlChildren Child nodes.\n * @param block The block to apply the child nodes on.\n */\nfunction applyCommentTagNodes(xmlChildren: Element[], block: Block) {\n for (let i = 0; i < xmlChildren.length; i++) {\n const xmlChild = xmlChildren[i];\n const text = xmlChild.textContent;\n const pinned = xmlChild.getAttribute('pinned') === 'true';\n const width = parseInt(xmlChild.getAttribute('w') ?? '50', 10);\n const height = parseInt(xmlChild.getAttribute('h') ?? '50', 10);\n\n block.setCommentText(text);\n const comment = block.getIcon(IconType.COMMENT)!;\n if (!isNaN(width) && !isNaN(height)) {\n comment.setBubbleSize(new Size(width, height));\n }\n // Set the pinned state of the bubble.\n comment.setBubbleVisible(pinned);\n // Actually show the bubble after the block has been rendered.\n setTimeout(() => comment.setBubbleVisible(pinned), 1);\n }\n}\n\n/**\n * Applies data tag child nodes to the given block.\n *\n * @param xmlChildren Child nodes.\n * @param block The block to apply the child nodes on.\n */\nfunction applyDataTagNodes(xmlChildren: Element[], block: Block) {\n for (let i = 0; i < xmlChildren.length; i++) {\n const xmlChild = xmlChildren[i];\n block.data = xmlChild.textContent;\n }\n}\n\n/**\n * Applies field tag child nodes to the given block.\n *\n * @param xmlChildren Child nodes.\n * @param block The block to apply the child nodes on.\n */\nfunction applyFieldTagNodes(xmlChildren: Element[], block: Block) {\n for (let i = 0; i < xmlChildren.length; i++) {\n const xmlChild = xmlChildren[i];\n const nodeName = xmlChild.getAttribute('name');\n if (!nodeName) {\n console.warn(`Ignoring unnamed field in block ${block.type}`);\n continue;\n }\n domToField(block, nodeName, xmlChild);\n }\n}\n\n/**\n * Finds any enclosed blocks or shadows within this XML node.\n *\n * @param xmlNode The XML node to extract child block info from.\n * @returns Any found child block.\n */\nfunction findChildBlocks(xmlNode: Element): {\n childBlockElement: Element | null;\n childShadowElement: Element | null;\n} {\n let childBlockElement: Element | null = null;\n let childShadowElement: Element | null = null;\n for (let i = 0; i < xmlNode.childNodes.length; i++) {\n const xmlChild = xmlNode.childNodes[i];\n if (isElement(xmlChild)) {\n if (xmlChild.nodeName.toLowerCase() === 'block') {\n childBlockElement = xmlChild;\n } else if (xmlChild.nodeName.toLowerCase() === 'shadow') {\n childShadowElement = xmlChild;\n }\n }\n }\n return {childBlockElement, childShadowElement};\n}\n/**\n * Applies input child nodes (value or statement) to the given block.\n *\n * @param xmlChildren Child nodes.\n * @param workspace The workspace containing the given block.\n * @param block The block to apply the child nodes on.\n * @param prototypeName The prototype name of the block.\n */\nfunction applyInputTagNodes(\n xmlChildren: Element[],\n workspace: Workspace,\n block: Block,\n prototypeName: string,\n) {\n for (let i = 0; i < xmlChildren.length; i++) {\n const xmlChild = xmlChildren[i];\n const nodeName = xmlChild.getAttribute('name');\n const input = nodeName ? block.getInput(nodeName) : null;\n if (!input) {\n console.warn(\n 'Ignoring non-existent input ' +\n nodeName +\n ' in block ' +\n prototypeName,\n );\n break;\n }\n const childBlockInfo = findChildBlocks(xmlChild);\n if (childBlockInfo.childBlockElement) {\n if (!input.connection) {\n throw TypeError('Input connection does not exist.');\n }\n domToBlockHeadless(\n childBlockInfo.childBlockElement,\n workspace,\n input.connection,\n false,\n );\n }\n // Set shadow after so we don't create a shadow we delete immediately.\n if (childBlockInfo.childShadowElement) {\n input.connection?.setShadowDom(childBlockInfo.childShadowElement);\n }\n }\n}\n\n/**\n * Applies next child nodes to the given block.\n *\n * @param xmlChildren Child nodes.\n * @param workspace The workspace containing the given block.\n * @param block The block to apply the child nodes on.\n */\nfunction applyNextTagNodes(\n xmlChildren: Element[],\n workspace: Workspace,\n block: Block,\n) {\n for (let i = 0; i < xmlChildren.length; i++) {\n const xmlChild = xmlChildren[i];\n const childBlockInfo = findChildBlocks(xmlChild);\n if (childBlockInfo.childBlockElement) {\n if (!block.nextConnection) {\n throw TypeError('Next statement does not exist.');\n }\n // If there is more than one XML 'next' tag.\n if (block.nextConnection.isConnected()) {\n throw TypeError('Next statement is already connected.');\n }\n // Create child block.\n domToBlockHeadless(\n childBlockInfo.childBlockElement,\n workspace,\n block.nextConnection,\n true,\n );\n }\n // Set shadow after so we don't create a shadow we delete immediately.\n if (childBlockInfo.childShadowElement && block.nextConnection) {\n block.nextConnection.setShadowDom(childBlockInfo.childShadowElement);\n }\n }\n}\n\n/**\n * Decode an XML block tag and create a block (and possibly sub blocks) on the\n * workspace.\n *\n * @param xmlBlock XML block element.\n * @param workspace The workspace.\n * @param parentConnection The parent connection to to connect this block to\n * after instantiating.\n * @param connectedToParentNext Whether the provided parent connection is a next\n * connection, rather than output or statement.\n * @returns The root block created.\n */\nfunction domToBlockHeadless(\n xmlBlock: Element,\n workspace: Workspace,\n parentConnection?: Connection,\n connectedToParentNext?: boolean,\n): Block {\n let block = null;\n const prototypeName = xmlBlock.getAttribute('type');\n if (!prototypeName) {\n throw TypeError('Block type unspecified: ' + xmlBlock.outerHTML);\n }\n const id = xmlBlock.getAttribute('id') ?? undefined;\n block = workspace.newBlock(prototypeName, id);\n\n // Preprocess childNodes so tags can be processed in a consistent order.\n const xmlChildNameMap = mapSupportedXmlTags(xmlBlock);\n\n const shouldCallInitSvg = applyMutationTagNodes(\n xmlChildNameMap.mutation,\n block,\n );\n applyCommentTagNodes(xmlChildNameMap.comment, block);\n applyDataTagNodes(xmlChildNameMap.data, block);\n\n // Connect parent after processing mutation and before setting fields.\n if (parentConnection) {\n if (connectedToParentNext) {\n if (block.previousConnection) {\n parentConnection.connect(block.previousConnection);\n } else {\n throw TypeError('Next block does not have previous statement.');\n }\n } else {\n if (block.outputConnection) {\n parentConnection.connect(block.outputConnection);\n } else if (block.previousConnection) {\n parentConnection.connect(block.previousConnection);\n } else {\n throw TypeError(\n 'Child block does not have output or previous statement.',\n );\n }\n }\n }\n\n applyFieldTagNodes(xmlChildNameMap.field, block);\n applyInputTagNodes(xmlChildNameMap.input, workspace, block, prototypeName);\n applyNextTagNodes(xmlChildNameMap.next, workspace, block);\n\n if (shouldCallInitSvg) {\n // This shouldn't even be called here\n // (ref: https://github.com/google/blockly/pull/4296#issuecomment-884226021\n // But the XML serializer/deserializer is iceboxed so I'm not going to fix\n // it.\n (block as BlockSvg).initSvg();\n }\n\n const inline = xmlBlock.getAttribute('inline');\n if (inline) {\n block.setInputsInline(inline === 'true');\n }\n const disabled = xmlBlock.getAttribute('disabled');\n if (disabled) {\n block.setEnabled(disabled !== 'true' && disabled !== 'disabled');\n }\n const deletable = xmlBlock.getAttribute('deletable');\n if (deletable) {\n block.setDeletable(deletable === 'true');\n }\n const movable = xmlBlock.getAttribute('movable');\n if (movable) {\n block.setMovable(movable === 'true');\n }\n const editable = xmlBlock.getAttribute('editable');\n if (editable) {\n block.setEditable(editable === 'true');\n }\n const collapsed = xmlBlock.getAttribute('collapsed');\n if (collapsed) {\n block.setCollapsed(collapsed === 'true');\n }\n if (xmlBlock.nodeName.toLowerCase() === 'shadow') {\n // Ensure all children are also shadows.\n const children = block.getChildren(false);\n for (let i = 0; i < children.length; i++) {\n const child = children[i];\n if (!child.isShadow()) {\n throw TypeError('Shadow block not allowed non-shadow child.');\n }\n }\n // Ensure this block doesn't have any variable inputs.\n if (block.getVarModels().length) {\n throw TypeError('Shadow blocks cannot have variable references.');\n }\n block.setShadow(true);\n }\n return block;\n}\n\n/**\n * Decode an XML field tag and set the value of that field on the given block.\n *\n * @param block The block that is currently being deserialized.\n * @param fieldName The name of the field on the block.\n * @param xml The field tag to decode.\n */\nfunction domToField(block: Block, fieldName: string, xml: Element) {\n const field = block.getField(fieldName);\n if (!field) {\n console.warn(\n 'Ignoring non-existent field ' + fieldName + ' in block ' + block.type,\n );\n return;\n }\n field.fromXml(xml);\n}\n\n/**\n * Remove any 'next' block (statements in a stack).\n *\n * @param xmlBlock XML block element or an empty DocumentFragment if the block\n * was an insertion marker.\n */\nexport function deleteNext(xmlBlock: Element | DocumentFragment) {\n for (let i = 0; i < xmlBlock.childNodes.length; i++) {\n const child = xmlBlock.childNodes[i];\n if (child.nodeName.toLowerCase() === 'next') {\n xmlBlock.removeChild(child);\n break;\n }\n }\n}\n\nfunction isElement(node: Node): node is Element {\n return node.nodeType === dom.NodeType.ELEMENT_NODE;\n}\n","/**\n * @license\n * Copyright 2023 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\nexport interface ISerializable {\n /**\n * @param doFullSerialization If true, this signals that any backing data\n * structures used by this ISerializable should also be serialized. This\n * is used for copy-paste.\n * @returns a JSON serializable value that records the ISerializable's state.\n */\n saveState(doFullSerialization: boolean): any;\n\n /**\n * Takes in a JSON serializable value and sets the ISerializable's state\n * based on that.\n *\n * @param state The state to apply to the ISerializable.\n */\n loadState(state: any): void;\n}\n\n/** Type guard that checks whether the given object is a ISerializable. */\nexport function isSerializable(obj: any): obj is ISerializable {\n return obj.saveState !== undefined && obj.loadState !== undefined;\n}\n","/**\n * @license\n * Copyright 2021 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\n// Former goog.module ID: Blockly.serialization.registry\n\nimport type {ISerializer} from '../interfaces/i_serializer.js';\nimport * as registry from '../registry.js';\n\n/**\n * Registers the given serializer so that it can be used for serialization and\n * deserialization.\n *\n * @param name The name of the serializer to register.\n * @param serializer The serializer to register.\n */\nexport function register(name: string, serializer: ISerializer) {\n registry.register(registry.Type.SERIALIZER, name, serializer);\n}\n\n/**\n * Unregisters the serializer associated with the given name.\n *\n * @param name The name of the serializer to unregister.\n */\nexport function unregister(name: string) {\n registry.unregister(registry.Type.SERIALIZER, name);\n}\n","/**\n * @license\n * Copyright 2021 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\n// Former goog.module ID: Blockly.serialization.blocks\n\nimport type {Block} from '../block.js';\nimport type {BlockSvg} from '../block_svg.js';\nimport type {Connection} from '../connection.js';\nimport * as eventUtils from '../events/utils.js';\nimport {inputTypes} from '../inputs/input_types.js';\nimport {isSerializable} from '../interfaces/i_serializable.js';\nimport type {ISerializer} from '../interfaces/i_serializer.js';\nimport * as registry from '../registry.js';\nimport * as utilsXml from '../utils/xml.js';\nimport type {Workspace} from '../workspace.js';\nimport * as Xml from '../xml.js';\nimport * as renderManagement from '../render_management.js';\n\nimport {\n BadConnectionCheck,\n MissingBlockType,\n MissingConnection,\n RealChildOfShadow,\n UnregisteredIcon,\n} from './exceptions.js';\nimport * as priorities from './priorities.js';\nimport * as serializationRegistry from './registry.js';\n\n// TODO(#5160): Remove this once lint is fixed.\n/* eslint-disable no-use-before-define */\n\n/**\n * Represents the state of a connection.\n */\nexport interface ConnectionState {\n shadow?: State;\n block?: State;\n}\n\n/**\n * Represents the state of a given block.\n */\nexport interface State {\n type: string;\n id?: string;\n x?: number;\n y?: number;\n collapsed?: boolean;\n deletable?: boolean;\n movable?: boolean;\n editable?: boolean;\n enabled?: boolean;\n inline?: boolean;\n data?: string;\n extraState?: AnyDuringMigration;\n icons?: {[key: string]: AnyDuringMigration};\n fields?: {[key: string]: AnyDuringMigration};\n inputs?: {[key: string]: ConnectionState};\n next?: ConnectionState;\n}\n\n/**\n * Returns the state of the given block as a plain JavaScript object.\n *\n * @param block The block to serialize.\n * @param param1 addCoordinates: If true, the coordinates of the block are added\n * to the serialized state. False by default. addinputBlocks: If true,\n * children of the block which are connected to inputs will be serialized.\n * True by default. addNextBlocks: If true, children of the block which are\n * connected to the block's next connection (if it exists) will be\n * serialized. True by default. doFullSerialization: If true, fields that\n * normally just save a reference to some external state (eg variables) will\n * instead serialize all of the info about that state. This supports\n * deserializing the block into a workspace where that state doesn't yet\n * exist. True by default.\n * @returns The serialized state of the block, or null if the block could not be\n * serialied (eg it was an insertion marker).\n */\nexport function save(\n block: Block,\n {\n addCoordinates = false,\n addInputBlocks = true,\n addNextBlocks = true,\n doFullSerialization = true,\n }: {\n addCoordinates?: boolean;\n addInputBlocks?: boolean;\n addNextBlocks?: boolean;\n doFullSerialization?: boolean;\n } = {},\n): State | null {\n if (block.isInsertionMarker()) {\n return null;\n }\n\n const state = {\n 'type': block.type,\n 'id': block.id,\n };\n\n if (addCoordinates) {\n // AnyDuringMigration because: Argument of type '{ type: string; id:\n // string; }' is not assignable to parameter of type 'State'.\n saveCoords(block, state as AnyDuringMigration);\n }\n // AnyDuringMigration because: Argument of type '{ type: string; id: string;\n // }' is not assignable to parameter of type 'State'.\n saveAttributes(block, state as AnyDuringMigration);\n // AnyDuringMigration because: Argument of type '{ type: string; id: string;\n // }' is not assignable to parameter of type 'State'.\n saveExtraState(block, state as AnyDuringMigration, doFullSerialization);\n // AnyDuringMigration because: Argument of type '{ type: string; id: string;\n // }' is not assignable to parameter of type 'State'.\n saveIcons(block, state as AnyDuringMigration, doFullSerialization);\n // AnyDuringMigration because: Argument of type '{ type: string; id: string;\n // }' is not assignable to parameter of type 'State'.\n saveFields(block, state as AnyDuringMigration, doFullSerialization);\n if (addInputBlocks) {\n // AnyDuringMigration because: Argument of type '{ type: string; id:\n // string; }' is not assignable to parameter of type 'State'.\n saveInputBlocks(block, state as AnyDuringMigration, doFullSerialization);\n }\n if (addNextBlocks) {\n // AnyDuringMigration because: Argument of type '{ type: string; id:\n // string; }' is not assignable to parameter of type 'State'.\n saveNextBlocks(block, state as AnyDuringMigration, doFullSerialization);\n }\n\n // AnyDuringMigration because: Type '{ type: string; id: string; }' is not\n // assignable to type 'State'.\n return state as AnyDuringMigration;\n}\n\n/**\n * Adds attributes to the given state object based on the state of the block.\n * Eg collapsed, disabled, inline, etc.\n *\n * @param block The block to base the attributes on.\n * @param state The state object to append to.\n */\nfunction saveAttributes(block: Block, state: State) {\n if (block.isCollapsed()) {\n state['collapsed'] = true;\n }\n if (!block.isEnabled()) {\n state['enabled'] = false;\n }\n if (!block.isOwnDeletable()) {\n state['deletable'] = false;\n }\n if (!block.isOwnMovable()) {\n state['movable'] = false;\n }\n if (!block.isOwnEditable()) {\n state['editable'] = false;\n }\n if (\n block.inputsInline !== undefined &&\n block.inputsInline !== block.inputsInlineDefault\n ) {\n state['inline'] = block.inputsInline;\n }\n // Data is a nullable string, so we don't need to worry about falsy values.\n if (block.data) {\n state['data'] = block.data;\n }\n}\n\n/**\n * Adds the coordinates of the given block to the given state object.\n *\n * @param block The block to base the coordinates on.\n * @param state The state object to append to.\n */\nfunction saveCoords(block: Block, state: State) {\n const workspace = block.workspace;\n const xy = block.getRelativeToSurfaceXY();\n state['x'] = Math.round(workspace.RTL ? workspace.getWidth() - xy.x : xy.x);\n state['y'] = Math.round(xy.y);\n}\n\n/**\n * Adds any extra state the block may provide to the given state object.\n *\n * @param block The block to serialize the extra state of.\n * @param state The state object to append to.\n * @param doFullSerialization Whether or not to serialize the full state of the\n * extra state (rather than possibly saving a reference to some state).\n */\nfunction saveExtraState(\n block: Block,\n state: State,\n doFullSerialization: boolean,\n) {\n if (block.saveExtraState) {\n const extraState = block.saveExtraState(doFullSerialization);\n if (extraState !== null) {\n state['extraState'] = extraState;\n }\n } else if (block.mutationToDom) {\n const extraState = block.mutationToDom();\n if (extraState !== null) {\n state['extraState'] = Xml.domToText(extraState).replace(\n ' xmlns=\"https://developers.google.com/blockly/xml\"',\n '',\n );\n }\n }\n}\n\n/**\n * Adds the state of all of the icons on the block to the given state object.\n *\n * @param block The block to serialize the icon state of.\n * @param state The state object to append to.\n * @param doFullSerialization Whether or not to serialize the full state of the\n * icon (rather than possibly saving a reference to some state).\n */\nfunction saveIcons(block: Block, state: State, doFullSerialization: boolean) {\n const icons = Object.create(null);\n for (const icon of block.getIcons()) {\n if (isSerializable(icon)) {\n const state = icon.saveState(doFullSerialization);\n if (state) icons[icon.getType().toString()] = state;\n }\n }\n\n if (Object.keys(icons).length) {\n state['icons'] = icons;\n }\n}\n\n/**\n * Adds the state of all of the fields on the block to the given state object.\n *\n * @param block The block to serialize the field state of.\n * @param state The state object to append to.\n * @param doFullSerialization Whether or not to serialize the full state of the\n * field (rather than possibly saving a reference to some state).\n */\nfunction saveFields(block: Block, state: State, doFullSerialization: boolean) {\n const fields = Object.create(null);\n for (let i = 0; i < block.inputList.length; i++) {\n const input = block.inputList[i];\n for (let j = 0; j < input.fieldRow.length; j++) {\n const field = input.fieldRow[j];\n if (field.isSerializable()) {\n fields[field.name!] = field.saveState(doFullSerialization);\n }\n }\n }\n if (Object.keys(fields).length) {\n state['fields'] = fields;\n }\n}\n\n/**\n * Adds the state of all of the child blocks of the given block (which are\n * connected to inputs) to the given state object.\n *\n * @param block The block to serialize the input blocks of.\n * @param state The state object to append to.\n * @param doFullSerialization Whether or not to do full serialization.\n */\nfunction saveInputBlocks(\n block: Block,\n state: State,\n doFullSerialization: boolean,\n) {\n const inputs = Object.create(null);\n for (let i = 0; i < block.inputList.length; i++) {\n const input = block.inputList[i];\n if (!input.connection) continue;\n const connectionState = saveConnection(\n input.connection as Connection,\n doFullSerialization,\n );\n if (connectionState) {\n inputs[input.name] = connectionState;\n }\n }\n\n if (Object.keys(inputs).length) {\n state['inputs'] = inputs;\n }\n}\n\n/**\n * Adds the state of all of the next blocks of the given block to the given\n * state object.\n *\n * @param block The block to serialize the next blocks of.\n * @param state The state object to append to.\n * @param doFullSerialization Whether or not to do full serialization.\n */\nfunction saveNextBlocks(\n block: Block,\n state: State,\n doFullSerialization: boolean,\n) {\n if (!block.nextConnection) {\n return;\n }\n const connectionState = saveConnection(\n block.nextConnection,\n doFullSerialization,\n );\n if (connectionState) {\n state['next'] = connectionState;\n }\n}\n\n/**\n * Returns the state of the given connection (ie the state of any connected\n * shadow or real blocks).\n *\n * @param connection The connection to serialize the connected blocks of.\n * @returns An object containing the state of any connected shadow block, or any\n * connected real block.\n * @param doFullSerialization Whether or not to do full serialization.\n */\nfunction saveConnection(\n connection: Connection,\n doFullSerialization: boolean,\n): ConnectionState | null {\n const shadow = connection.getShadowState(true);\n const child = connection.targetBlock();\n if (!shadow && !child) {\n return null;\n }\n const state = Object.create(null);\n if (shadow) {\n state['shadow'] = shadow;\n }\n if (child && !child.isShadow()) {\n state['block'] = save(child, {doFullSerialization});\n }\n return state;\n}\n\n/**\n * Loads the block represented by the given state into the given workspace.\n *\n * @param state The state of a block to deserialize into the workspace.\n * @param workspace The workspace to add the block to.\n * @param param1 recordUndo: If true, events triggered by this function will be\n * undo-able by the user. False by default.\n * @returns The block that was just loaded.\n */\nexport function append(\n state: State,\n workspace: Workspace,\n {recordUndo = false}: {recordUndo?: boolean} = {},\n): Block {\n const block = appendInternal(state, workspace, {recordUndo});\n if (workspace.rendered) renderManagement.triggerQueuedRenders();\n return block;\n}\n\n/**\n * Loads the block represented by the given state into the given workspace.\n * This is defined internally so that the extra parameters don't clutter our\n * external API.\n * But it is exported so that other places within Blockly can call it directly\n * with the extra parameters.\n *\n * @param state The state of a block to deserialize into the workspace.\n * @param workspace The workspace to add the block to.\n * @param param1 parentConnection: If provided, the system will attempt to\n * connect the block to this connection after it is created. Undefined by\n * default. isShadow: If true, the block will be set to a shadow block after\n * it is created. False by default. recordUndo: If true, events triggered by\n * this function will be undo-able by the user. False by default.\n * @returns The block that was just appended.\n * @internal\n */\nexport function appendInternal(\n state: State,\n workspace: Workspace,\n {\n parentConnection = undefined,\n isShadow = false,\n recordUndo = false,\n }: {\n parentConnection?: Connection;\n isShadow?: boolean;\n recordUndo?: boolean;\n } = {},\n): Block {\n const prevRecordUndo = eventUtils.getRecordUndo();\n eventUtils.setRecordUndo(recordUndo);\n const existingGroup = eventUtils.getGroup();\n if (!existingGroup) {\n eventUtils.setGroup(true);\n }\n eventUtils.disable();\n\n let block;\n try {\n block = appendPrivate(state, workspace, {parentConnection, isShadow});\n } finally {\n eventUtils.enable();\n }\n\n if (eventUtils.isEnabled()) {\n eventUtils.fire(new (eventUtils.get(eventUtils.BLOCK_CREATE))(block));\n }\n eventUtils.setGroup(existingGroup);\n eventUtils.setRecordUndo(prevRecordUndo);\n\n // Adding connections to the connection db is expensive. This defers that\n // operation to decrease load time.\n if (workspace.rendered) {\n const blockSvg = block as BlockSvg;\n setTimeout(() => {\n if (!blockSvg.disposed) {\n blockSvg.setConnectionTracking(true);\n }\n }, 1);\n }\n\n return block;\n}\n\n/**\n * Loads the block represented by the given state into the given workspace.\n * This is defined privately so that it can be called recursively without firing\n * eroneous events. Events (and other things we only want to occur on the top\n * block) are handled by appendInternal.\n *\n * @param state The state of a block to deserialize into the workspace.\n * @param workspace The workspace to add the block to.\n * @param param1 parentConnection: If provided, the system will attempt to\n * connect the block to this connection after it is created. Undefined by\n * default. isShadow: The block will be set to a shadow block after it is\n * created. False by default.\n * @returns The block that was just appended.\n */\nfunction appendPrivate(\n state: State,\n workspace: Workspace,\n {\n parentConnection = undefined,\n isShadow = false,\n }: {parentConnection?: Connection; isShadow?: boolean} = {},\n): Block {\n if (!state['type']) {\n throw new MissingBlockType(state);\n }\n\n const block = workspace.newBlock(state['type'], state['id']);\n block.setShadow(isShadow);\n loadCoords(block, state);\n loadAttributes(block, state);\n loadExtraState(block, state);\n tryToConnectParent(parentConnection, block, state);\n loadIcons(block, state);\n loadFields(block, state);\n loadInputBlocks(block, state);\n loadNextBlocks(block, state);\n initBlock(block, workspace.rendered);\n\n return block;\n}\n\n/**\n * Applies any coordinate information available on the state object to the\n * block.\n *\n * @param block The block to set the position of.\n * @param state The state object to reference.\n */\nfunction loadCoords(block: Block, state: State) {\n let x = state['x'] === undefined ? 0 : state['x'];\n const y = state['y'] === undefined ? 0 : state['y'];\n\n const workspace = block.workspace;\n x = workspace.RTL ? workspace.getWidth() - x : x;\n\n block.moveBy(x, y);\n}\n\n/**\n * Applies any attribute information available on the state object to the block.\n *\n * @param block The block to set the attributes of.\n * @param state The state object to reference.\n */\nfunction loadAttributes(block: Block, state: State) {\n if (state['collapsed']) {\n block.setCollapsed(true);\n }\n if (state['deletable'] === false) {\n block.setDeletable(false);\n }\n if (state['movable'] === false) {\n block.setMovable(false);\n }\n if (state['editable'] === false) {\n block.setEditable(false);\n }\n if (state['enabled'] === false) {\n block.setEnabled(false);\n }\n if (state['inline'] !== undefined) {\n block.setInputsInline(state['inline']);\n }\n if (state['data'] !== undefined) {\n block.data = state['data'];\n }\n}\n\n/**\n * Applies any extra state information available on the state object to the\n * block.\n *\n * @param block The block to set the extra state of.\n * @param state The state object to reference.\n */\nfunction loadExtraState(block: Block, state: State) {\n if (!state['extraState']) {\n return;\n }\n if (block.loadExtraState) {\n block.loadExtraState(state['extraState']);\n } else if (block.domToMutation) {\n block.domToMutation(utilsXml.textToDom(state['extraState']));\n }\n}\n\n/**\n * Attempts to connect the block to the parent connection, if it exists.\n *\n * @param parentConnection The parent connection to try to connect the block to.\n * @param child The block to try to connect to the parent.\n * @param state The state which defines the given block\n */\nfunction tryToConnectParent(\n parentConnection: Connection | undefined,\n child: Block,\n state: State,\n) {\n if (!parentConnection) {\n return;\n }\n\n if (parentConnection.getSourceBlock().isShadow() && !child.isShadow()) {\n throw new RealChildOfShadow(state);\n }\n\n let connected = false;\n let childConnection;\n if (parentConnection.type === inputTypes.VALUE) {\n childConnection = child.outputConnection;\n if (!childConnection) {\n throw new MissingConnection('output', child, state);\n }\n connected = parentConnection.connect(childConnection);\n } else {\n // Statement type.\n childConnection = child.previousConnection;\n if (!childConnection) {\n throw new MissingConnection('previous', child, state);\n }\n connected = parentConnection.connect(childConnection);\n }\n\n if (!connected) {\n const checker = child.workspace.connectionChecker;\n throw new BadConnectionCheck(\n checker.getErrorMessage(\n checker.canConnectWithReason(childConnection, parentConnection, false),\n childConnection,\n parentConnection,\n ),\n parentConnection.type === inputTypes.VALUE\n ? 'output connection'\n : 'previous connection',\n child,\n state,\n );\n }\n}\n\n/**\n * Applies icon state to the icons on the block, based on the given state\n * object.\n *\n * @param block The block to set the icon state of.\n * @param state The state object to reference.\n */\nfunction loadIcons(block: Block, state: State) {\n if (!state['icons']) return;\n\n const iconTypes = Object.keys(state['icons']);\n for (const iconType of iconTypes) {\n const iconState = state['icons'][iconType];\n let icon = block.getIcon(iconType);\n if (!icon) {\n const constructor = registry.getClass(\n registry.Type.ICON,\n iconType,\n false,\n );\n if (!constructor) throw new UnregisteredIcon(iconType, block, state);\n icon = new constructor(block);\n block.addIcon(icon);\n }\n if (isSerializable(icon)) icon.loadState(iconState);\n }\n}\n\n/**\n * Applies any field information available on the state object to the block.\n *\n * @param block The block to set the field state of.\n * @param state The state object to reference.\n */\nfunction loadFields(block: Block, state: State) {\n if (!state['fields']) {\n return;\n }\n const keys = Object.keys(state['fields']);\n for (let i = 0; i < keys.length; i++) {\n const fieldName = keys[i];\n const fieldState = state['fields'][fieldName];\n const field = block.getField(fieldName);\n if (!field) {\n console.warn(\n `Ignoring non-existant field ${fieldName} in block ${block.type}`,\n );\n continue;\n }\n field.loadState(fieldState);\n }\n}\n\n/**\n * Creates any child blocks (attached to inputs) defined by the given state\n * and attaches them to the given block.\n *\n * @param block The block to attach input blocks to.\n * @param state The state object to reference.\n */\nfunction loadInputBlocks(block: Block, state: State) {\n if (!state['inputs']) {\n return;\n }\n const keys = Object.keys(state['inputs']);\n for (let i = 0; i < keys.length; i++) {\n const inputName = keys[i];\n const input = block.getInput(inputName);\n if (!input || !input.connection) {\n throw new MissingConnection(inputName, block, state);\n }\n loadConnection(input.connection, state['inputs'][inputName]);\n }\n}\n\n/**\n * Creates any next blocks defined by the given state and attaches them to the\n * given block.\n *\n * @param block The block to attach next blocks to.\n * @param state The state object to reference.\n */\nfunction loadNextBlocks(block: Block, state: State) {\n if (!state['next']) {\n return;\n }\n if (!block.nextConnection) {\n throw new MissingConnection('next', block, state);\n }\n loadConnection(block.nextConnection, state['next']);\n}\n/**\n * Applies the state defined by connectionState to the given connection, ie\n * assigns shadows and attaches child blocks.\n *\n * @param connection The connection to deserialize the connected blocks of.\n * @param connectionState The object containing the state of any connected\n * shadow block, or any connected real block.\n */\nfunction loadConnection(\n connection: Connection,\n connectionState: ConnectionState,\n) {\n if (connectionState['shadow']) {\n connection.setShadowState(connectionState['shadow']);\n }\n if (connectionState['block']) {\n appendPrivate(\n connectionState['block'],\n connection.getSourceBlock().workspace,\n {parentConnection: connection},\n );\n }\n}\n\n// TODO(#5146): Remove this from the serialization system.\n/**\n * Initializes the give block, eg init the model, inits the svg, renders, etc.\n *\n * @param block The block to initialize.\n * @param rendered Whether the block is a rendered or headless block.\n */\nfunction initBlock(block: Block, rendered: boolean) {\n if (rendered) {\n const blockSvg = block as BlockSvg;\n // Adding connections to the connection db is expensive. This defers that\n // operation to decrease load time.\n blockSvg.setConnectionTracking(false);\n\n blockSvg.initSvg();\n blockSvg.queueRender();\n blockSvg.updateDisabled();\n\n // fixes #6076 JSO deserialization doesn't\n // set .iconXY_ property so here it will be set\n for (const icon of blockSvg.getIcons()) {\n icon.onLocationChange(blockSvg.getRelativeToSurfaceXY());\n }\n } else {\n block.initModel();\n }\n}\n\n// Alias to disambiguate saving within the serializer.\nconst saveBlock = save;\n\n/**\n * Serializer for saving and loading block state.\n */\nexport class BlockSerializer implements ISerializer {\n priority: number;\n\n /* eslint-disable-next-line require-jsdoc */\n constructor() {\n /** The priority for deserializing blocks. */\n this.priority = priorities.BLOCKS;\n }\n\n /**\n * Serializes the blocks of the given workspace.\n *\n * @param workspace The workspace to save the blocks of.\n * @returns The state of the workspace's blocks, or null if there are no\n * blocks.\n */\n save(\n workspace: Workspace,\n ): {languageVersion: number; blocks: State[]} | null {\n const blockStates = [];\n for (const block of workspace.getTopBlocks(false)) {\n const state = saveBlock(block, {\n addCoordinates: true,\n doFullSerialization: false,\n });\n if (state) {\n blockStates.push(state);\n }\n }\n if (blockStates.length) {\n return {\n 'languageVersion': 0, // Currently unused.\n 'blocks': blockStates,\n };\n }\n return null;\n }\n\n /**\n * Deserializes the blocks defined by the given state into the given\n * workspace.\n *\n * @param state The state of the blocks to deserialize.\n * @param workspace The workspace to deserialize into.\n */\n load(\n state: {languageVersion: number; blocks: State[]},\n workspace: Workspace,\n ) {\n const blockStates = state['blocks'];\n for (const state of blockStates) {\n append(state, workspace, {recordUndo: eventUtils.getRecordUndo()});\n }\n }\n\n /**\n * Disposes of any blocks that exist on the workspace.\n *\n * @param workspace The workspace to clear the blocks of.\n */\n clear(workspace: Workspace) {\n // Cannot use workspace.clear() because that also removes variables.\n for (const block of workspace.getTopBlocks(false)) {\n block.dispose(false);\n }\n }\n}\n\nserializationRegistry.register('blocks', new BlockSerializer());\n","/**\n * @license\n * Copyright 2023 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport {BlockSvg} from '../block_svg.js';\nimport * as registry from './registry.js';\nimport {ICopyData} from '../interfaces/i_copyable.js';\nimport {IPaster} from '../interfaces/i_paster.js';\nimport {State, append} from '../serialization/blocks.js';\nimport {Coordinate} from '../utils/coordinate.js';\nimport {WorkspaceSvg} from '../workspace_svg.js';\nimport * as eventUtils from '../events/utils.js';\nimport {config} from '../config.js';\n\nexport class BlockPaster implements IPaster {\n static TYPE = 'block';\n\n paste(\n copyData: BlockCopyData,\n workspace: WorkspaceSvg,\n coordinate?: Coordinate,\n ): BlockSvg | null {\n if (!workspace.isCapacityAvailable(copyData.typeCounts!)) return null;\n\n if (coordinate) {\n copyData.blockState['x'] = coordinate.x;\n copyData.blockState['y'] = coordinate.y;\n }\n\n eventUtils.disable();\n let block;\n try {\n block = append(copyData.blockState, workspace) as BlockSvg;\n moveBlockToNotConflict(block);\n } finally {\n eventUtils.enable();\n }\n\n if (!block) return block;\n\n if (eventUtils.isEnabled() && !block.isShadow()) {\n eventUtils.fire(new (eventUtils.get(eventUtils.BLOCK_CREATE))(block));\n }\n block.select();\n return block;\n }\n}\n\n/**\n * Moves the given block to a location where it does not: (1) overlap exactly\n * with any other blocks, or (2) look like it is connected to any other blocks.\n *\n * Exported for testing.\n *\n * @param block The block to move to an unambiguous location.\n * @internal\n */\nexport function moveBlockToNotConflict(block: BlockSvg) {\n const workspace = block.workspace;\n const snapRadius = config.snapRadius;\n const coord = block.getRelativeToSurfaceXY();\n const offset = new Coordinate(0, 0);\n // getRelativeToSurfaceXY is really expensive, so we want to cache this.\n const otherCoords = workspace\n .getAllBlocks(false)\n .filter((otherBlock) => otherBlock.id != block.id)\n .map((b) => b.getRelativeToSurfaceXY());\n\n while (\n blockOverlapsOtherExactly(Coordinate.sum(coord, offset), otherCoords) ||\n blockIsInSnapRadius(block, offset, snapRadius)\n ) {\n if (workspace.RTL) {\n offset.translate(-snapRadius, snapRadius * 2);\n } else {\n offset.translate(snapRadius, snapRadius * 2);\n }\n }\n\n block!.moveTo(Coordinate.sum(coord, offset));\n}\n\n/**\n * @returns true if the given block coordinates are less than a delta of 1 from\n * any of the other coordinates.\n */\nfunction blockOverlapsOtherExactly(\n coord: Coordinate,\n otherCoords: Coordinate[],\n): boolean {\n return otherCoords.some(\n (otherCoord) =>\n Math.abs(otherCoord.x - coord.x) <= 1 &&\n Math.abs(otherCoord.y - coord.y) <= 1,\n );\n}\n\n/**\n * @returns true if the given block (when offset by the given amount) is close\n * enough to any other connections (within the snap radius) that it looks\n * like they could connect.\n */\nfunction blockIsInSnapRadius(\n block: BlockSvg,\n offset: Coordinate,\n snapRadius: number,\n): boolean {\n return block\n .getConnections_(false)\n .some((connection) => !!connection.closest(snapRadius, offset).connection);\n}\n\nexport interface BlockCopyData extends ICopyData {\n blockState: State;\n typeCounts: {[key: string]: number};\n}\n\nregistry.register(BlockPaster.TYPE, new BlockPaster());\n","/**\n * @license\n * Copyright 2021 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\n// Former goog.module ID: Blockly.clipboard\n\nimport type {ICopyData, ICopyable} from './interfaces/i_copyable.js';\nimport {BlockPaster} from './clipboard/block_paster.js';\nimport * as globalRegistry from './registry.js';\nimport {WorkspaceSvg} from './workspace_svg.js';\nimport * as registry from './clipboard/registry.js';\nimport {Coordinate} from './utils/coordinate.js';\nimport * as deprecation from './utils/deprecation.js';\n\n/** Metadata about the object that is currently on the clipboard. */\nlet stashedCopyData: ICopyData | null = null;\n\nlet stashedWorkspace: WorkspaceSvg | null = null;\n\n/**\n * Copy a copyable element onto the local clipboard.\n *\n * @param toCopy The copyable element to be copied.\n * @deprecated v11. Use `myCopyable.toCopyData()` instead. To be removed v12.\n * @internal\n */\nexport function copy(toCopy: ICopyable): T | null {\n deprecation.warn(\n 'Blockly.clipboard.copy',\n 'v11',\n 'v12',\n 'myCopyable.toCopyData()',\n );\n return TEST_ONLY.copyInternal(toCopy);\n}\n\n/**\n * Private version of copy for stubbing in tests.\n */\nfunction copyInternal(toCopy: ICopyable): T | null {\n const data = toCopy.toCopyData();\n stashedCopyData = data;\n stashedWorkspace = (toCopy as any).workspace ?? null;\n return data;\n}\n\n/**\n * Paste a pasteable element into the workspace.\n *\n * @param copyData The data to paste into the workspace.\n * @param workspace The workspace to paste the data into.\n * @param coordinate The location to paste the thing at.\n * @returns The pasted thing if the paste was successful, null otherwise.\n */\nexport function paste(\n copyData: T,\n workspace: WorkspaceSvg,\n coordinate?: Coordinate,\n): ICopyable | null;\n\n/**\n * Pastes the last copied ICopyable into the workspace.\n *\n * @returns the pasted thing if the paste was successful, null otherwise.\n */\nexport function paste(): ICopyable | null;\n\n/**\n * Pastes the given data into the workspace, or the last copied ICopyable if\n * no data is passed.\n *\n * @param copyData The data to paste into the workspace.\n * @param workspace The workspace to paste the data into.\n * @param coordinate The location to paste the thing at.\n * @returns The pasted thing if the paste was successful, null otherwise.\n */\nexport function paste(\n copyData?: T,\n workspace?: WorkspaceSvg,\n coordinate?: Coordinate,\n): ICopyable | null {\n if (!copyData || !workspace) {\n if (!stashedCopyData || !stashedWorkspace) return null;\n return pasteFromData(stashedCopyData, stashedWorkspace);\n }\n return pasteFromData(copyData, workspace, coordinate);\n}\n\n/**\n * Paste a pasteable element into the workspace.\n *\n * @param copyData The data to paste into the workspace.\n * @param workspace The workspace to paste the data into.\n * @param coordinate The location to paste the thing at.\n * @returns The pasted thing if the paste was successful, null otherwise.\n */\nfunction pasteFromData(\n copyData: T,\n workspace: WorkspaceSvg,\n coordinate?: Coordinate,\n): ICopyable | null {\n workspace = workspace.getRootWorkspace() ?? workspace;\n return (globalRegistry\n .getObject(globalRegistry.Type.PASTER, copyData.paster, false)\n ?.paste(copyData, workspace, coordinate) ?? null) as ICopyable | null;\n}\n\n/**\n * Duplicate this copy-paste-able element.\n *\n * @param toDuplicate The element to be duplicated.\n * @returns The element that was duplicated, or null if the duplication failed.\n * @deprecated v11. Use\n * `Blockly.clipboard.paste(myCopyable.toCopyData(), myWorkspace)` instead.\n * To be removed v12.\n * @internal\n */\nexport function duplicate<\n U extends ICopyData,\n T extends ICopyable & IHasWorkspace,\n>(toDuplicate: T): T | null {\n deprecation.warn(\n 'Blockly.clipboard.duplicate',\n 'v11',\n 'v12',\n 'Blockly.clipboard.paste(myCopyable.toCopyData(), myWorkspace)',\n );\n return TEST_ONLY.duplicateInternal(toDuplicate);\n}\n\n/**\n * Private version of duplicate for stubbing in tests.\n */\nfunction duplicateInternal<\n U extends ICopyData,\n T extends ICopyable & IHasWorkspace,\n>(toDuplicate: T): T | null {\n const data = toDuplicate.toCopyData();\n if (!data) return null;\n return paste(data, toDuplicate.workspace) as T;\n}\n\ninterface IHasWorkspace {\n workspace: WorkspaceSvg;\n}\n\nexport const TEST_ONLY = {\n duplicateInternal,\n copyInternal,\n};\n\nexport {BlockPaster, registry};\n","/**\n * @license\n * Copyright 2019 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\n// Former goog.module ID: Blockly.utils.aria\n\n/** ARIA states/properties prefix. */\nconst ARIA_PREFIX = 'aria-';\n\n/** ARIA role attribute. */\nconst ROLE_ATTRIBUTE = 'role';\n\n/**\n * ARIA role values.\n * Copied from Closure's goog.a11y.aria.Role\n */\nexport enum Role {\n // ARIA role for an interactive control of tabular data.\n GRID = 'grid',\n\n // ARIA role for a cell in a grid.\n GRIDCELL = 'gridcell',\n // ARIA role for a group of related elements like tree item siblings.\n GROUP = 'group',\n\n // ARIA role for a listbox.\n LISTBOX = 'listbox',\n\n // ARIA role for a popup menu.\n MENU = 'menu',\n\n // ARIA role for menu item elements.\n MENUITEM = 'menuitem',\n // ARIA role for a checkbox box element inside a menu.\n MENUITEMCHECKBOX = 'menuitemcheckbox',\n // ARIA role for option items that are children of combobox, listbox, menu,\n // radiogroup, or tree elements.\n OPTION = 'option',\n // ARIA role for ignorable cosmetic elements with no semantic significance.\n PRESENTATION = 'presentation',\n\n // ARIA role for a row of cells in a grid.\n ROW = 'row',\n // ARIA role for a tree.\n TREE = 'tree',\n\n // ARIA role for a tree item that sometimes may be expanded or collapsed.\n TREEITEM = 'treeitem',\n}\n\n/**\n * ARIA states and properties.\n * Copied from Closure's goog.a11y.aria.State\n */\nexport enum State {\n // ARIA property for setting the currently active descendant of an element,\n // for example the selected item in a list box. Value: ID of an element.\n ACTIVEDESCENDANT = 'activedescendant',\n // ARIA property defines the total number of columns in a table, grid, or\n // treegrid.\n // Value: integer.\n COLCOUNT = 'colcount',\n // ARIA state for a disabled item. Value: one of {true, false}.\n DISABLED = 'disabled',\n\n // ARIA state for setting whether the element like a tree node is expanded.\n // Value: one of {true, false, undefined}.\n EXPANDED = 'expanded',\n\n // ARIA state indicating that the entered value does not conform. Value:\n // one of {false, true, 'grammar', 'spelling'}\n INVALID = 'invalid',\n\n // ARIA property that provides a label to override any other text, value, or\n // contents used to describe this element. Value: string.\n LABEL = 'label',\n // ARIA property for setting the element which labels another element.\n // Value: space-separated IDs of elements.\n LABELLEDBY = 'labelledby',\n\n // ARIA property for setting the level of an element in the hierarchy.\n // Value: integer.\n LEVEL = 'level',\n // ARIA property indicating if the element is horizontal or vertical.\n // Value: one of {'vertical', 'horizontal'}.\n ORIENTATION = 'orientation',\n\n // ARIA property that defines an element's number of position in a list.\n // Value: integer.\n POSINSET = 'posinset',\n\n // ARIA property defines the total number of rows in a table, grid, or\n // treegrid.\n // Value: integer.\n ROWCOUNT = 'rowcount',\n\n // ARIA state for setting the currently selected item in the list.\n // Value: one of {true, false, undefined}.\n SELECTED = 'selected',\n // ARIA property defining the number of items in a list. Value: integer.\n SETSIZE = 'setsize',\n\n // ARIA property for slider maximum value. Value: number.\n VALUEMAX = 'valuemax',\n\n // ARIA property for slider minimum value. Value: number.\n VALUEMIN = 'valuemin',\n}\n\n/**\n * Sets the role of an element.\n *\n * Similar to Closure's goog.a11y.aria\n *\n * @param element DOM node to set role of.\n * @param roleName Role name.\n */\nexport function setRole(element: Element, roleName: Role) {\n element.setAttribute(ROLE_ATTRIBUTE, roleName);\n}\n\n/**\n * Sets the state or property of an element.\n * Copied from Closure's goog.a11y.aria\n *\n * @param element DOM node where we set state.\n * @param stateName State attribute being set.\n * Automatically adds prefix 'aria-' to the state name if the attribute is\n * not an extra attribute.\n * @param value Value for the state attribute.\n */\nexport function setState(\n element: Element,\n stateName: State,\n value: string | boolean | number | string[],\n) {\n if (Array.isArray(value)) {\n value = value.join(' ');\n }\n const attrStateName = ARIA_PREFIX + stateName;\n element.setAttribute(attrStateName, `${value}`);\n}\n","/**\n * @license\n * Copyright 2013 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\n// Former goog.module ID: Blockly.WidgetDiv\n\nimport * as common from './common.js';\nimport * as dom from './utils/dom.js';\nimport type {Field} from './field.js';\nimport type {Rect} from './utils/rect.js';\nimport type {Size} from './utils/size.js';\nimport type {WorkspaceSvg} from './workspace_svg.js';\n\n/** The object currently using this container. */\nlet owner: unknown = null;\n\n/** Optional cleanup function set by whichever object uses the widget. */\nlet dispose: (() => void) | null = null;\n\n/** A class name representing the current owner's workspace renderer. */\nlet rendererClassName = '';\n\n/** A class name representing the current owner's workspace theme. */\nlet themeClassName = '';\n\n/** The HTML container for popup overlays (e.g. editor widgets). */\nlet containerDiv: HTMLDivElement | null;\n\n/**\n * Returns the HTML container for editor widgets.\n *\n * @returns The editor widget container.\n */\nexport function getDiv(): HTMLDivElement | null {\n return containerDiv;\n}\n\n/**\n * Allows unit tests to reset the div. Do not use outside of tests.\n *\n * @param newDiv The new value for the DIV field.\n * @internal\n */\nexport function testOnly_setDiv(newDiv: HTMLDivElement | null) {\n containerDiv = newDiv;\n}\n\n/**\n * Create the widget div and inject it onto the page.\n */\nexport function createDom() {\n if (containerDiv) {\n return; // Already created.\n }\n\n containerDiv = document.createElement('div') as HTMLDivElement;\n containerDiv.className = 'blocklyWidgetDiv';\n const container = common.getParentContainer() || document.body;\n container.appendChild(containerDiv);\n}\n\n/**\n * Initialize and display the widget div. Close the old one if needed.\n *\n * @param newOwner The object that will be using this container.\n * @param rtl Right-to-left (true) or left-to-right (false).\n * @param newDispose Optional cleanup function to be run when the widget is\n * closed.\n */\nexport function show(newOwner: unknown, rtl: boolean, newDispose: () => void) {\n hide();\n owner = newOwner;\n dispose = newDispose;\n const div = containerDiv;\n if (!div) return;\n div.style.direction = rtl ? 'rtl' : 'ltr';\n div.style.display = 'block';\n const mainWorkspace = common.getMainWorkspace() as WorkspaceSvg;\n rendererClassName = mainWorkspace.getRenderer().getClassName();\n themeClassName = mainWorkspace.getTheme().getClassName();\n if (rendererClassName) {\n dom.addClass(div, rendererClassName);\n }\n if (themeClassName) {\n dom.addClass(div, themeClassName);\n }\n}\n\n/**\n * Destroy the widget and hide the div.\n */\nexport function hide() {\n if (!isVisible()) {\n return;\n }\n owner = null;\n\n const div = containerDiv;\n if (!div) return;\n div.style.display = 'none';\n div.style.left = '';\n div.style.top = '';\n dispose && dispose();\n dispose = null;\n div.textContent = '';\n\n if (rendererClassName) {\n dom.removeClass(div, rendererClassName);\n rendererClassName = '';\n }\n if (themeClassName) {\n dom.removeClass(div, themeClassName);\n themeClassName = '';\n }\n (common.getMainWorkspace() as WorkspaceSvg).markFocused();\n}\n\n/**\n * Is the container visible?\n *\n * @returns True if visible.\n */\nexport function isVisible(): boolean {\n return !!owner;\n}\n\n/**\n * Destroy the widget and hide the div if it is being used by the specified\n * object.\n *\n * @param oldOwner The object that was using this container.\n */\nexport function hideIfOwner(oldOwner: unknown) {\n if (owner === oldOwner) {\n hide();\n }\n}\n/**\n * Set the widget div's position and height. This function does nothing clever:\n * it will not ensure that your widget div ends up in the visible window.\n *\n * @param x Horizontal location (window coordinates, not body).\n * @param y Vertical location (window coordinates, not body).\n * @param height The height of the widget div (pixels).\n */\nfunction positionInternal(x: number, y: number, height: number) {\n containerDiv!.style.left = x + 'px';\n containerDiv!.style.top = y + 'px';\n containerDiv!.style.height = height + 'px';\n}\n\n/**\n * Position the widget div based on an anchor rectangle.\n * The widget should be placed adjacent to but not overlapping the anchor\n * rectangle. The preferred position is directly below and aligned to the left\n * (LTR) or right (RTL) side of the anchor.\n *\n * @param viewportBBox The bounding rectangle of the current viewport, in window\n * coordinates.\n * @param anchorBBox The bounding rectangle of the anchor, in window\n * coordinates.\n * @param widgetSize The size of the widget that is inside the widget div, in\n * window coordinates.\n * @param rtl Whether the workspace is in RTL mode. This determines horizontal\n * alignment.\n * @internal\n */\nexport function positionWithAnchor(\n viewportBBox: Rect,\n anchorBBox: Rect,\n widgetSize: Size,\n rtl: boolean,\n) {\n const y = calculateY(viewportBBox, anchorBBox, widgetSize);\n const x = calculateX(viewportBBox, anchorBBox, widgetSize, rtl);\n\n if (y < 0) {\n positionInternal(x, 0, widgetSize.height + y);\n } else {\n positionInternal(x, y, widgetSize.height);\n }\n}\n\n/**\n * Calculate an x position (in window coordinates) such that the widget will not\n * be offscreen on the right or left.\n *\n * @param viewportBBox The bounding rectangle of the current viewport, in window\n * coordinates.\n * @param anchorBBox The bounding rectangle of the anchor, in window\n * coordinates.\n * @param widgetSize The dimensions of the widget inside the widget div.\n * @param rtl Whether the Blockly workspace is in RTL mode.\n * @returns A valid x-coordinate for the top left corner of the widget div, in\n * window coordinates.\n */\nfunction calculateX(\n viewportBBox: Rect,\n anchorBBox: Rect,\n widgetSize: Size,\n rtl: boolean,\n): number {\n if (rtl) {\n // Try to align the right side of the field and the right side of widget.\n const widgetLeft = anchorBBox.right - widgetSize.width;\n // Don't go offscreen left.\n const x = Math.max(widgetLeft, viewportBBox.left);\n // But really don't go offscreen right:\n return Math.min(x, viewportBBox.right - widgetSize.width);\n } else {\n // Try to align the left side of the field and the left side of widget.\n // Don't go offscreen right.\n const x = Math.min(anchorBBox.left, viewportBBox.right - widgetSize.width);\n // But left is more important, because that's where the text is.\n return Math.max(x, viewportBBox.left);\n }\n}\n\n/**\n * Calculate a y position (in window coordinates) such that the widget will not\n * be offscreen on the top or bottom.\n *\n * @param viewportBBox The bounding rectangle of the current viewport, in window\n * coordinates.\n * @param anchorBBox The bounding rectangle of the anchor, in window\n * coordinates.\n * @param widgetSize The dimensions of the widget inside the widget div.\n * @returns A valid y-coordinate for the top left corner of the widget div, in\n * window coordinates.\n */\nfunction calculateY(\n viewportBBox: Rect,\n anchorBBox: Rect,\n widgetSize: Size,\n): number {\n // Flip the widget vertically if off the bottom.\n // The widget could go off the top of the window, but it would also go off\n // the bottom. The window is just too small.\n if (anchorBBox.bottom + widgetSize.height >= viewportBBox.bottom) {\n // The bottom of the widget is at the top of the field.\n return anchorBBox.top - widgetSize.height;\n } else {\n // The top of the widget is at the bottom of the field.\n return anchorBBox.bottom;\n }\n}\n\n/**\n * Determine if the owner is a field for purposes of repositioning.\n * We can't simply check `instanceof Field` as that would introduce a circular\n * dependency.\n */\nfunction isRepositionable(item: any): item is Field {\n return !!item?.repositionForWindowResize;\n}\n\n/**\n * Reposition the widget div if the owner of it says to.\n * If the owner isn't a field, just give up and hide it.\n */\nexport function repositionForWindowResize(): void {\n if (!isRepositionable(owner) || !owner.repositionForWindowResize()) {\n // If the owner is not a Field, or if the owner returns false from the\n // reposition method, we should hide the widget div. Otherwise, we'll assume\n // the owner handled any needed resize.\n hide();\n }\n}\n","/**\n * @license\n * Copyright 2011 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\n// Former goog.module ID: Blockly.ContextMenu\n\nimport type {Block} from './block.js';\nimport type {BlockSvg} from './block_svg.js';\nimport * as browserEvents from './browser_events.js';\nimport * as clipboard from './clipboard.js';\nimport {config} from './config.js';\nimport * as dom from './utils/dom.js';\nimport type {\n ContextMenuOption,\n LegacyContextMenuOption,\n} from './contextmenu_registry.js';\nimport * as eventUtils from './events/utils.js';\nimport {Menu} from './menu.js';\nimport {MenuItem} from './menuitem.js';\nimport {Msg} from './msg.js';\nimport * as aria from './utils/aria.js';\nimport {Coordinate} from './utils/coordinate.js';\nimport {Rect} from './utils/rect.js';\nimport * as serializationBlocks from './serialization/blocks.js';\nimport * as svgMath from './utils/svg_math.js';\nimport * as WidgetDiv from './widgetdiv.js';\nimport {WorkspaceCommentSvg} from './workspace_comment_svg.js';\nimport type {WorkspaceSvg} from './workspace_svg.js';\nimport * as Xml from './xml.js';\n\n/**\n * Which block is the context menu attached to?\n */\nlet currentBlock: Block | null = null;\n\nconst dummyOwner = {};\n\n/**\n * Gets the block the context menu is currently attached to.\n *\n * @returns The block the context menu is attached to.\n */\nexport function getCurrentBlock(): Block | null {\n return currentBlock;\n}\n\n/**\n * Sets the block the context menu is currently attached to.\n *\n * @param block The block the context menu is attached to.\n */\nexport function setCurrentBlock(block: Block | null) {\n currentBlock = block;\n}\n\n/**\n * Menu object.\n */\nlet menu_: Menu | null = null;\n\n/**\n * Construct the menu based on the list of options and show the menu.\n *\n * @param e Mouse event.\n * @param options Array of menu options.\n * @param rtl True if RTL, false if LTR.\n */\nexport function show(\n e: Event,\n options: (ContextMenuOption | LegacyContextMenuOption)[],\n rtl: boolean,\n) {\n WidgetDiv.show(dummyOwner, rtl, dispose);\n if (!options.length) {\n hide();\n return;\n }\n const menu = populate_(options, rtl);\n menu_ = menu;\n\n position_(menu, e, rtl);\n // 1ms delay is required for focusing on context menus because some other\n // mouse event is still waiting in the queue and clears focus.\n setTimeout(function () {\n menu.focus();\n }, 1);\n currentBlock = null; // May be set by Blockly.Block.\n}\n\n/**\n * Create the context menu object and populate it with the given options.\n *\n * @param options Array of menu options.\n * @param rtl True if RTL, false if LTR.\n * @returns The menu that will be shown on right click.\n */\nfunction populate_(\n options: (ContextMenuOption | LegacyContextMenuOption)[],\n rtl: boolean,\n): Menu {\n /* Here's what one option object looks like:\n {text: 'Make It So',\n enabled: true,\n callback: Blockly.MakeItSo}\n */\n const menu = new Menu();\n menu.setRole(aria.Role.MENU);\n for (let i = 0; i < options.length; i++) {\n const option = options[i];\n const menuItem = new MenuItem(option.text);\n menuItem.setRightToLeft(rtl);\n menuItem.setRole(aria.Role.MENUITEM);\n menu.addChild(menuItem);\n menuItem.setEnabled(option.enabled);\n if (option.enabled) {\n const actionHandler = function () {\n hide();\n requestAnimationFrame(() => {\n setTimeout(() => {\n // If .scope does not exist on the option, then the callback\n // will not be expecting a scope parameter, so there should be\n // no problems. Just assume it is a ContextMenuOption and we'll\n // pass undefined if it's not.\n option.callback((option as ContextMenuOption).scope);\n }, 0);\n });\n };\n menuItem.onAction(actionHandler, {});\n }\n }\n return menu;\n}\n\n/**\n * Add the menu to the page and position it correctly.\n *\n * @param menu The menu to add and position.\n * @param e Mouse event for the right click that is making the context\n * menu appear.\n * @param rtl True if RTL, false if LTR.\n */\nfunction position_(menu: Menu, e: Event, rtl: boolean) {\n // Record windowSize and scrollOffset before adding menu.\n const viewportBBox = svgMath.getViewportBBox();\n const mouseEvent = e as MouseEvent;\n // This one is just a point, but we'll pretend that it's a rect so we can use\n // some helper functions.\n const anchorBBox = new Rect(\n mouseEvent.clientY + viewportBBox.top,\n mouseEvent.clientY + viewportBBox.top,\n mouseEvent.clientX + viewportBBox.left,\n mouseEvent.clientX + viewportBBox.left,\n );\n\n createWidget_(menu);\n const menuSize = menu.getSize();\n\n if (rtl) {\n anchorBBox.left += menuSize.width;\n anchorBBox.right += menuSize.width;\n viewportBBox.left += menuSize.width;\n viewportBBox.right += menuSize.width;\n }\n\n WidgetDiv.positionWithAnchor(viewportBBox, anchorBBox, menuSize, rtl);\n // Calling menuDom.focus() has to wait until after the menu has been placed\n // correctly. Otherwise it will cause a page scroll to get the misplaced menu\n // in view. See issue #1329.\n menu.focus();\n}\n\n/**\n * Create and render the menu widget inside Blockly's widget div.\n *\n * @param menu The menu to add to the widget div.\n */\nfunction createWidget_(menu: Menu) {\n const div = WidgetDiv.getDiv();\n if (!div) {\n throw Error('Attempting to create a context menu when widget div is null');\n }\n const menuDom = menu.render(div);\n dom.addClass(menuDom, 'blocklyContextMenu');\n // Prevent system context menu when right-clicking a Blockly context menu.\n browserEvents.conditionalBind(\n menuDom as EventTarget,\n 'contextmenu',\n null,\n haltPropagation,\n );\n // Focus only after the initial render to avoid issue #1329.\n menu.focus();\n}\n/**\n * Halts the propagation of the event without doing anything else.\n *\n * @param e An event.\n */\nfunction haltPropagation(e: Event) {\n // This event has been handled. No need to bubble up to the document.\n e.preventDefault();\n e.stopPropagation();\n}\n\n/**\n * Hide the context menu.\n */\nexport function hide() {\n WidgetDiv.hideIfOwner(dummyOwner);\n currentBlock = null;\n}\n\n/**\n * Dispose of the menu.\n */\nexport function dispose() {\n if (menu_) {\n menu_.dispose();\n menu_ = null;\n }\n}\n\n/**\n * Create a callback function that creates and configures a block,\n * then places the new block next to the original and returns it.\n *\n * @param block Original block.\n * @param state XML or JSON object representation of the new block.\n * @returns Function that creates a block.\n */\nexport function callbackFactory(\n block: Block,\n state: Element | serializationBlocks.State,\n): () => BlockSvg {\n return () => {\n eventUtils.disable();\n let newBlock: BlockSvg;\n try {\n if (state instanceof Element) {\n newBlock = Xml.domToBlockInternal(state, block.workspace!) as BlockSvg;\n } else {\n newBlock = serializationBlocks.appendInternal(\n state,\n block.workspace,\n ) as BlockSvg;\n }\n // Move the new block next to the old block.\n const xy = block.getRelativeToSurfaceXY();\n if (block.RTL) {\n xy.x -= config.snapRadius;\n } else {\n xy.x += config.snapRadius;\n }\n xy.y += config.snapRadius * 2;\n newBlock.moveBy(xy.x, xy.y);\n } finally {\n eventUtils.enable();\n }\n if (eventUtils.isEnabled() && !newBlock.isShadow()) {\n eventUtils.fire(new (eventUtils.get(eventUtils.BLOCK_CREATE))(newBlock));\n }\n newBlock.select();\n return newBlock;\n };\n}\n\n// Helper functions for creating context menu options.\n\n/**\n * Make a context menu option for deleting the current workspace comment.\n *\n * @param comment The workspace comment where the\n * right-click originated.\n * @returns A menu option,\n * containing text, enabled, and a callback.\n * @internal\n */\nexport function commentDeleteOption(\n comment: WorkspaceCommentSvg,\n): LegacyContextMenuOption {\n const deleteOption = {\n text: Msg['REMOVE_COMMENT'],\n enabled: true,\n callback: function () {\n eventUtils.setGroup(true);\n comment.dispose();\n eventUtils.setGroup(false);\n },\n };\n return deleteOption;\n}\n\n/**\n * Make a context menu option for duplicating the current workspace comment.\n *\n * @param comment The workspace comment where the\n * right-click originated.\n * @returns A menu option,\n * containing text, enabled, and a callback.\n * @internal\n */\nexport function commentDuplicateOption(\n comment: WorkspaceCommentSvg,\n): LegacyContextMenuOption {\n const duplicateOption = {\n text: Msg['DUPLICATE_COMMENT'],\n enabled: true,\n callback: function () {\n const data = comment.toCopyData();\n if (!data) return;\n clipboard.paste(data, comment.workspace);\n },\n };\n return duplicateOption;\n}\n\n/**\n * Make a context menu option for adding a comment on the workspace.\n *\n * @param ws The workspace where the right-click\n * originated.\n * @param e The right-click mouse event.\n * @returns A menu option, containing text, enabled, and a callback.\n * comments are not bundled in.\n * @internal\n */\nexport function workspaceCommentOption(\n ws: WorkspaceSvg,\n e: Event,\n): ContextMenuOption {\n /**\n * Helper function to create and position a comment correctly based on the\n * location of the mouse event.\n */\n function addWsComment() {\n const comment = new WorkspaceCommentSvg(\n ws,\n Msg['WORKSPACE_COMMENT_DEFAULT_TEXT'],\n WorkspaceCommentSvg.DEFAULT_SIZE,\n WorkspaceCommentSvg.DEFAULT_SIZE,\n );\n\n const injectionDiv = ws.getInjectionDiv();\n // Bounding rect coordinates are in client coordinates, meaning that they\n // are in pixels relative to the upper left corner of the visible browser\n // window. These coordinates change when you scroll the browser window.\n const boundingRect = injectionDiv.getBoundingClientRect();\n\n // The client coordinates offset by the injection div's upper left corner.\n const mouseEvent = e as MouseEvent;\n const clientOffsetPixels = new Coordinate(\n mouseEvent.clientX - boundingRect.left,\n mouseEvent.clientY - boundingRect.top,\n );\n\n // The offset in pixels between the main workspace's origin and the upper\n // left corner of the injection div.\n const mainOffsetPixels = ws.getOriginOffsetInPixels();\n\n // The position of the new comment in pixels relative to the origin of the\n // main workspace.\n const finalOffset = Coordinate.difference(\n clientOffsetPixels,\n mainOffsetPixels,\n );\n // The position of the new comment in main workspace coordinates.\n finalOffset.scale(1 / ws.scale);\n\n const commentX = finalOffset.x;\n const commentY = finalOffset.y;\n comment.moveBy(commentX, commentY);\n if (ws.rendered) {\n comment.initSvg();\n comment.render();\n comment.select();\n }\n }\n\n const wsCommentOption = {\n enabled: true,\n } as ContextMenuOption;\n wsCommentOption.text = Msg['ADD_COMMENT'];\n wsCommentOption.callback = function () {\n addWsComment();\n };\n return wsCommentOption;\n}\n","/**\n * @license\n * Copyright 2019 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\n// Former goog.module ID: Blockly.utils.math\n\n/**\n * Converts degrees to radians.\n * Copied from Closure's goog.math.toRadians.\n *\n * @param angleDegrees Angle in degrees.\n * @returns Angle in radians.\n */\nexport function toRadians(angleDegrees: number): number {\n return (angleDegrees * Math.PI) / 180;\n}\n\n/**\n * Converts radians to degrees.\n * Copied from Closure's goog.math.toDegrees.\n *\n * @param angleRadians Angle in radians.\n * @returns Angle in degrees.\n */\nexport function toDegrees(angleRadians: number): number {\n return (angleRadians * 180) / Math.PI;\n}\n\n/**\n * Clamp the provided number between the lower bound and the upper bound.\n *\n * @param lowerBound The desired lower bound.\n * @param number The number to clamp.\n * @param upperBound The desired upper bound.\n * @returns The clamped number.\n */\nexport function clamp(\n lowerBound: number,\n number: number,\n upperBound: number,\n): number {\n if (upperBound < lowerBound) {\n const temp = upperBound;\n upperBound = lowerBound;\n lowerBound = temp;\n }\n return Math.max(lowerBound, Math.min(number, upperBound));\n}\n","/**\n * @license\n * Copyright 2016 Massachusetts Institute of Technology\n * All rights reserved.\n * SPDX-License-Identifier: Apache-2.0\n */\n\n/**\n * A div that floats on top of the workspace, for drop-down menus.\n *\n * @class\n */\n// Former goog.module ID: Blockly.dropDownDiv\n\nimport type {BlockSvg} from './block_svg.js';\nimport * as common from './common.js';\nimport * as dom from './utils/dom.js';\nimport type {Field} from './field.js';\nimport * as math from './utils/math.js';\nimport {Rect} from './utils/rect.js';\nimport type {Size} from './utils/size.js';\nimport * as style from './utils/style.js';\nimport type {WorkspaceSvg} from './workspace_svg.js';\n\n/**\n * Arrow size in px. Should match the value in CSS\n * (need to position pre-render).\n */\nexport const ARROW_SIZE = 16;\n\n/**\n * Drop-down border size in px. Should match the value in CSS (need to position\n * the arrow).\n */\nexport const BORDER_SIZE = 1;\n\n/**\n * Amount the arrow must be kept away from the edges of the main drop-down div,\n * in px.\n */\nexport const ARROW_HORIZONTAL_PADDING = 12;\n\n/** Amount drop-downs should be padded away from the source, in px. */\nexport const PADDING_Y = 16;\n\n/** Length of animations in seconds. */\nexport const ANIMATION_TIME = 0.25;\n\n/**\n * Timer for animation out, to be cleared if we need to immediately hide\n * without disrupting new shows.\n */\nlet animateOutTimer: ReturnType | null = null;\n\n/** Callback for when the drop-down is hidden. */\nlet onHide: Function | null = null;\n\n/** A class name representing the current owner's workspace renderer. */\nlet renderedClassName = '';\n\n/** A class name representing the current owner's workspace theme. */\nlet themeClassName = '';\n\n/** The content element. */\nlet div: HTMLDivElement;\n\n/** The content element. */\nlet content: HTMLDivElement;\n\n/** The arrow element. */\nlet arrow: HTMLDivElement;\n\n/**\n * Drop-downs will appear within the bounds of this element if possible.\n * Set in setBoundsElement.\n */\nlet boundsElement: Element | null = null;\n\n/** The object currently using the drop-down. */\nlet owner: Field | null = null;\n\n/** Whether the dropdown was positioned to a field or the source block. */\nlet positionToField: boolean | null = null;\n\n/**\n * Dropdown bounds info object used to encapsulate sizing information about a\n * bounding element (bounding box and width/height).\n */\nexport interface BoundsInfo {\n top: number;\n left: number;\n bottom: number;\n right: number;\n width: number;\n height: number;\n}\n\n/** Dropdown position metrics. */\nexport interface PositionMetrics {\n initialX: number;\n initialY: number;\n finalX: number;\n finalY: number;\n arrowX: number | null;\n arrowY: number | null;\n arrowAtTop: boolean | null;\n arrowVisible: boolean;\n}\n\n/**\n * Create and insert the DOM element for this div.\n *\n * @internal\n */\nexport function createDom() {\n if (div) {\n return; // Already created.\n }\n div = document.createElement('div');\n div.className = 'blocklyDropDownDiv';\n const parentDiv = common.getParentContainer() || document.body;\n parentDiv.appendChild(div);\n\n content = document.createElement('div');\n content.className = 'blocklyDropDownContent';\n div.appendChild(content);\n\n arrow = document.createElement('div');\n arrow.className = 'blocklyDropDownArrow';\n div.appendChild(arrow);\n\n div.style.opacity = '0';\n // Transition animation for transform: translate() and opacity.\n div.style.transition =\n 'transform ' + ANIMATION_TIME + 's, ' + 'opacity ' + ANIMATION_TIME + 's';\n\n // Handle focusin/out events to add a visual indicator when\n // a child is focused or blurred.\n div.addEventListener('focusin', function () {\n dom.addClass(div, 'blocklyFocused');\n });\n div.addEventListener('focusout', function () {\n dom.removeClass(div, 'blocklyFocused');\n });\n}\n\n/**\n * Set an element to maintain bounds within. Drop-downs will appear\n * within the box of this element if possible.\n *\n * @param boundsElem Element to bind drop-down to.\n */\nexport function setBoundsElement(boundsElem: Element | null) {\n boundsElement = boundsElem;\n}\n\n/**\n * @returns The field that currently owns this, or null.\n */\nexport function getOwner(): Field | null {\n return owner;\n}\n\n/**\n * Provide the div for inserting content into the drop-down.\n *\n * @returns Div to populate with content.\n */\nexport function getContentDiv(): Element {\n return content;\n}\n\n/** Clear the content of the drop-down. */\nexport function clearContent() {\n content.textContent = '';\n content.style.width = '';\n}\n\n/**\n * Set the colour for the drop-down.\n *\n * @param backgroundColour Any CSS colour for the background.\n * @param borderColour Any CSS colour for the border.\n */\nexport function setColour(backgroundColour: string, borderColour: string) {\n div.style.backgroundColor = backgroundColour;\n div.style.borderColor = borderColour;\n}\n\n/**\n * Shortcut to show and place the drop-down with positioning determined\n * by a particular block. The primary position will be below the block,\n * and the secondary position above the block. Drop-down will be\n * constrained to the block's workspace.\n *\n * @param field The field showing the drop-down.\n * @param block Block to position the drop-down around.\n * @param opt_onHide Optional callback for when the drop-down is hidden.\n * @param opt_secondaryYOffset Optional Y offset for above-block positioning.\n * @returns True if the menu rendered below block; false if above.\n */\nexport function showPositionedByBlock(\n field: Field,\n block: BlockSvg,\n opt_onHide?: Function,\n opt_secondaryYOffset?: number,\n): boolean {\n return showPositionedByRect(\n getScaledBboxOfBlock(block),\n field as Field,\n opt_onHide,\n opt_secondaryYOffset,\n );\n}\n\n/**\n * Shortcut to show and place the drop-down with positioning determined\n * by a particular field. The primary position will be below the field,\n * and the secondary position above the field. Drop-down will be\n * constrained to the block's workspace.\n *\n * @param field The field to position the dropdown against.\n * @param opt_onHide Optional callback for when the drop-down is hidden.\n * @param opt_secondaryYOffset Optional Y offset for above-block positioning.\n * @returns True if the menu rendered below block; false if above.\n */\nexport function showPositionedByField(\n field: Field,\n opt_onHide?: Function,\n opt_secondaryYOffset?: number,\n): boolean {\n positionToField = true;\n return showPositionedByRect(\n getScaledBboxOfField(field as Field),\n field as Field,\n opt_onHide,\n opt_secondaryYOffset,\n );\n}\n/**\n * Get the scaled bounding box of a block.\n *\n * @param block The block.\n * @returns The scaled bounding box of the block.\n */\nfunction getScaledBboxOfBlock(block: BlockSvg): Rect {\n const blockSvg = block.getSvgRoot();\n const scale = block.workspace.scale;\n const scaledHeight = block.height * scale;\n const scaledWidth = block.width * scale;\n const xy = style.getPageOffset(blockSvg);\n return new Rect(xy.y, xy.y + scaledHeight, xy.x, xy.x + scaledWidth);\n}\n\n/**\n * Get the scaled bounding box of a field.\n *\n * @param field The field.\n * @returns The scaled bounding box of the field.\n */\nfunction getScaledBboxOfField(field: Field): Rect {\n const bBox = field.getScaledBBox();\n return new Rect(bBox.top, bBox.bottom, bBox.left, bBox.right);\n}\n\n/**\n * Helper method to show and place the drop-down with positioning determined\n * by a scaled bounding box. The primary position will be below the rect,\n * and the secondary position above the rect. Drop-down will be constrained to\n * the block's workspace.\n *\n * @param bBox The scaled bounding box.\n * @param field The field to position the dropdown against.\n * @param opt_onHide Optional callback for when the drop-down is hidden.\n * @param opt_secondaryYOffset Optional Y offset for above-block positioning.\n * @returns True if the menu rendered below block; false if above.\n */\nfunction showPositionedByRect(\n bBox: Rect,\n field: Field,\n opt_onHide?: Function,\n opt_secondaryYOffset?: number,\n): boolean {\n // If we can fit it, render below the block.\n const primaryX = bBox.left + (bBox.right - bBox.left) / 2;\n const primaryY = bBox.bottom;\n // If we can't fit it, render above the entire parent block.\n const secondaryX = primaryX;\n let secondaryY = bBox.top;\n if (opt_secondaryYOffset) {\n secondaryY += opt_secondaryYOffset;\n }\n const sourceBlock = field.getSourceBlock() as BlockSvg;\n // Set bounds to main workspace; show the drop-down.\n let workspace = sourceBlock.workspace;\n while (workspace.options.parentWorkspace) {\n workspace = workspace.options.parentWorkspace;\n }\n setBoundsElement(workspace.getParentSvg().parentNode as Element | null);\n return show(\n field,\n sourceBlock.RTL,\n primaryX,\n primaryY,\n secondaryX,\n secondaryY,\n opt_onHide,\n );\n}\n\n/**\n * Show and place the drop-down.\n * The drop-down is placed with an absolute \"origin point\" (x, y) - i.e.,\n * the arrow will point at this origin and box will positioned below or above\n * it. If we can maintain the container bounds at the primary point, the arrow\n * will point there, and the container will be positioned below it.\n * If we can't maintain the container bounds at the primary point, fall-back to\n * the secondary point and position above.\n *\n * @param newOwner The object showing the drop-down\n * @param rtl Right-to-left (true) or left-to-right (false).\n * @param primaryX Desired origin point x, in absolute px.\n * @param primaryY Desired origin point y, in absolute px.\n * @param secondaryX Secondary/alternative origin point x, in absolute px.\n * @param secondaryY Secondary/alternative origin point y, in absolute px.\n * @param opt_onHide Optional callback for when the drop-down is hidden.\n * @returns True if the menu rendered at the primary origin point.\n * @internal\n */\nexport function show(\n newOwner: Field,\n rtl: boolean,\n primaryX: number,\n primaryY: number,\n secondaryX: number,\n secondaryY: number,\n opt_onHide?: Function,\n): boolean {\n owner = newOwner as Field;\n onHide = opt_onHide || null;\n // Set direction.\n div.style.direction = rtl ? 'rtl' : 'ltr';\n\n const mainWorkspace = common.getMainWorkspace() as WorkspaceSvg;\n renderedClassName = mainWorkspace.getRenderer().getClassName();\n themeClassName = mainWorkspace.getTheme().getClassName();\n if (renderedClassName) {\n dom.addClass(div, renderedClassName);\n }\n if (themeClassName) {\n dom.addClass(div, themeClassName);\n }\n\n // When we change `translate` multiple times in close succession,\n // Chrome may choose to wait and apply them all at once.\n // Since we want the translation to initial X, Y to be immediate,\n // and the translation to final X, Y to be animated,\n // we saw problems where both would be applied after animation was turned on,\n // making the dropdown appear to fly in from (0, 0).\n // Using both `left`, `top` for the initial translation and then `translate`\n // for the animated transition to final X, Y is a workaround.\n return positionInternal(primaryX, primaryY, secondaryX, secondaryY);\n}\n\nconst internal = {\n /**\n * Get sizing info about the bounding element.\n *\n * @returns An object containing size information about the bounding element\n * (bounding box and width/height).\n */\n getBoundsInfo: function (): BoundsInfo {\n const boundPosition = style.getPageOffset(boundsElement as Element);\n const boundSize = style.getSize(boundsElement as Element);\n\n return {\n left: boundPosition.x,\n right: boundPosition.x + boundSize.width,\n top: boundPosition.y,\n bottom: boundPosition.y + boundSize.height,\n width: boundSize.width,\n height: boundSize.height,\n };\n },\n\n /**\n * Helper to position the drop-down and the arrow, maintaining bounds.\n * See explanation of origin points in show.\n *\n * @param primaryX Desired origin point x, in absolute px.\n * @param primaryY Desired origin point y, in absolute px.\n * @param secondaryX Secondary/alternative origin point x, in absolute px.\n * @param secondaryY Secondary/alternative origin point y, in absolute px.\n * @returns Various final metrics, including rendered positions for drop-down\n * and arrow.\n */\n getPositionMetrics: function (\n primaryX: number,\n primaryY: number,\n secondaryX: number,\n secondaryY: number,\n ): PositionMetrics {\n const boundsInfo = internal.getBoundsInfo();\n const divSize = style.getSize(div as Element);\n\n // Can we fit in-bounds below the target?\n if (primaryY + divSize.height < boundsInfo.bottom) {\n return getPositionBelowMetrics(primaryX, primaryY, boundsInfo, divSize);\n }\n // Can we fit in-bounds above the target?\n if (secondaryY - divSize.height > boundsInfo.top) {\n return getPositionAboveMetrics(\n secondaryX,\n secondaryY,\n boundsInfo,\n divSize,\n );\n }\n // Can we fit outside the workspace bounds (but inside the window)\n // below?\n if (primaryY + divSize.height < document.documentElement.clientHeight) {\n return getPositionBelowMetrics(primaryX, primaryY, boundsInfo, divSize);\n }\n // Can we fit outside the workspace bounds (but inside the window)\n // above?\n if (secondaryY - divSize.height > document.documentElement.clientTop) {\n return getPositionAboveMetrics(\n secondaryX,\n secondaryY,\n boundsInfo,\n divSize,\n );\n }\n\n // Last resort, render at top of page.\n return getPositionTopOfPageMetrics(primaryX, boundsInfo, divSize);\n },\n};\n\n/**\n * Get the metrics for positioning the div below the source.\n *\n * @param primaryX Desired origin point x, in absolute px.\n * @param primaryY Desired origin point y, in absolute px.\n * @param boundsInfo An object containing size information about the bounding\n * element (bounding box and width/height).\n * @param divSize An object containing information about the size of the\n * DropDownDiv (width & height).\n * @returns Various final metrics, including rendered positions for drop-down\n * and arrow.\n */\nfunction getPositionBelowMetrics(\n primaryX: number,\n primaryY: number,\n boundsInfo: BoundsInfo,\n divSize: Size,\n): PositionMetrics {\n const xCoords = getPositionX(\n primaryX,\n boundsInfo.left,\n boundsInfo.right,\n divSize.width,\n );\n\n const arrowY = -(ARROW_SIZE / 2 + BORDER_SIZE);\n const finalY = primaryY + PADDING_Y;\n\n return {\n initialX: xCoords.divX,\n initialY: primaryY,\n finalX: xCoords.divX, // X position remains constant during animation.\n finalY,\n arrowX: xCoords.arrowX,\n arrowY,\n arrowAtTop: true,\n arrowVisible: true,\n };\n}\n\n/**\n * Get the metrics for positioning the div above the source.\n *\n * @param secondaryX Secondary/alternative origin point x, in absolute px.\n * @param secondaryY Secondary/alternative origin point y, in absolute px.\n * @param boundsInfo An object containing size information about the bounding\n * element (bounding box and width/height).\n * @param divSize An object containing information about the size of the\n * DropDownDiv (width & height).\n * @returns Various final metrics, including rendered positions for drop-down\n * and arrow.\n */\nfunction getPositionAboveMetrics(\n secondaryX: number,\n secondaryY: number,\n boundsInfo: BoundsInfo,\n divSize: Size,\n): PositionMetrics {\n const xCoords = getPositionX(\n secondaryX,\n boundsInfo.left,\n boundsInfo.right,\n divSize.width,\n );\n\n const arrowY = divSize.height - BORDER_SIZE * 2 - ARROW_SIZE / 2;\n const finalY = secondaryY - divSize.height - PADDING_Y;\n const initialY = secondaryY - divSize.height; // No padding on Y.\n\n return {\n initialX: xCoords.divX,\n initialY,\n finalX: xCoords.divX, // X position remains constant during animation.\n finalY,\n arrowX: xCoords.arrowX,\n arrowY,\n arrowAtTop: false,\n arrowVisible: true,\n };\n}\n\n/**\n * Get the metrics for positioning the div at the top of the page.\n *\n * @param sourceX Desired origin point x, in absolute px.\n * @param boundsInfo An object containing size information about the bounding\n * element (bounding box and width/height).\n * @param divSize An object containing information about the size of the\n * DropDownDiv (width & height).\n * @returns Various final metrics, including rendered positions for drop-down\n * and arrow.\n */\nfunction getPositionTopOfPageMetrics(\n sourceX: number,\n boundsInfo: BoundsInfo,\n divSize: Size,\n): PositionMetrics {\n const xCoords = getPositionX(\n sourceX,\n boundsInfo.left,\n boundsInfo.right,\n divSize.width,\n );\n\n // No need to provide arrow-specific information because it won't be visible.\n return {\n initialX: xCoords.divX,\n initialY: 0,\n finalX: xCoords.divX, // X position remains constant during animation.\n finalY: 0, // Y position remains constant during animation.\n arrowAtTop: null,\n arrowX: null,\n arrowY: null,\n arrowVisible: false,\n };\n}\n\n/**\n * Get the x positions for the left side of the DropDownDiv and the arrow,\n * accounting for the bounds of the workspace.\n *\n * @param sourceX Desired origin point x, in absolute px.\n * @param boundsLeft The left edge of the bounding element, in absolute px.\n * @param boundsRight The right edge of the bounding element, in absolute px.\n * @param divWidth The width of the div in px.\n * @returns An object containing metrics for the x positions of the left side of\n * the DropDownDiv and the arrow.\n * @internal\n */\nexport function getPositionX(\n sourceX: number,\n boundsLeft: number,\n boundsRight: number,\n divWidth: number,\n): {divX: number; arrowX: number} {\n let divX = sourceX;\n // Offset the topLeft coord so that the dropdowndiv is centered.\n divX -= divWidth / 2;\n // Fit the dropdowndiv within the bounds of the workspace.\n divX = math.clamp(boundsLeft, divX, boundsRight - divWidth);\n\n let arrowX = sourceX;\n // Offset the arrow coord so that the arrow is centered.\n arrowX -= ARROW_SIZE / 2;\n // Convert the arrow position to be relative to the top left of the div.\n let relativeArrowX = arrowX - divX;\n const horizPadding = ARROW_HORIZONTAL_PADDING;\n // Clamp the arrow position so that it stays attached to the dropdowndiv.\n relativeArrowX = math.clamp(\n horizPadding,\n relativeArrowX,\n divWidth - horizPadding - ARROW_SIZE,\n );\n\n return {arrowX: relativeArrowX, divX};\n}\n\n/**\n * Is the container visible?\n *\n * @returns True if visible.\n */\nexport function isVisible(): boolean {\n return !!owner;\n}\n\n/**\n * Hide the menu only if it is owned by the provided object.\n *\n * @param divOwner Object which must be owning the drop-down to hide.\n * @param opt_withoutAnimation True if we should hide the dropdown without\n * animating.\n * @returns True if hidden.\n */\nexport function hideIfOwner(\n divOwner: Field,\n opt_withoutAnimation?: boolean,\n): boolean {\n if (owner === divOwner) {\n if (opt_withoutAnimation) {\n hideWithoutAnimation();\n } else {\n hide();\n }\n return true;\n }\n return false;\n}\n\n/** Hide the menu, triggering animation. */\nexport function hide() {\n // Start the animation by setting the translation and fading out.\n // Reset to (initialX, initialY) - i.e., no translation.\n div.style.transform = 'translate(0, 0)';\n div.style.opacity = '0';\n // Finish animation - reset all values to default.\n animateOutTimer = setTimeout(function () {\n hideWithoutAnimation();\n }, ANIMATION_TIME * 1000);\n if (onHide) {\n onHide();\n onHide = null;\n }\n}\n\n/** Hide the menu, without animation. */\nexport function hideWithoutAnimation() {\n if (!isVisible()) {\n return;\n }\n if (animateOutTimer) {\n clearTimeout(animateOutTimer);\n }\n\n // Reset style properties in case this gets called directly\n // instead of hide() - see discussion on #2551.\n div.style.transform = '';\n div.style.left = '';\n div.style.top = '';\n div.style.opacity = '0';\n div.style.display = 'none';\n div.style.backgroundColor = '';\n div.style.borderColor = '';\n\n if (onHide) {\n onHide();\n onHide = null;\n }\n clearContent();\n owner = null;\n\n if (renderedClassName) {\n dom.removeClass(div, renderedClassName);\n renderedClassName = '';\n }\n if (themeClassName) {\n dom.removeClass(div, themeClassName);\n themeClassName = '';\n }\n (common.getMainWorkspace() as WorkspaceSvg).markFocused();\n}\n\n/**\n * Set the dropdown div's position.\n *\n * @param primaryX Desired origin point x, in absolute px.\n * @param primaryY Desired origin point y, in absolute px.\n * @param secondaryX Secondary/alternative origin point x, in absolute px.\n * @param secondaryY Secondary/alternative origin point y, in absolute px.\n * @returns True if the menu rendered at the primary origin point.\n */\nfunction positionInternal(\n primaryX: number,\n primaryY: number,\n secondaryX: number,\n secondaryY: number,\n): boolean {\n const metrics = internal.getPositionMetrics(\n primaryX,\n primaryY,\n secondaryX,\n secondaryY,\n );\n\n // Update arrow CSS.\n if (metrics.arrowVisible) {\n arrow.style.display = '';\n arrow.style.transform =\n 'translate(' +\n metrics.arrowX +\n 'px,' +\n metrics.arrowY +\n 'px) rotate(45deg)';\n arrow.setAttribute(\n 'class',\n metrics.arrowAtTop\n ? 'blocklyDropDownArrow blocklyArrowTop'\n : 'blocklyDropDownArrow blocklyArrowBottom',\n );\n } else {\n arrow.style.display = 'none';\n }\n\n const initialX = Math.floor(metrics.initialX);\n const initialY = Math.floor(metrics.initialY);\n const finalX = Math.floor(metrics.finalX);\n const finalY = Math.floor(metrics.finalY);\n\n // First apply initial translation.\n div.style.left = initialX + 'px';\n div.style.top = initialY + 'px';\n\n // Show the div.\n div.style.display = 'block';\n div.style.opacity = '1';\n // Add final translate, animated through `transition`.\n // Coordinates are relative to (initialX, initialY),\n // where the drop-down is absolutely positioned.\n const dx = finalX - initialX;\n const dy = finalY - initialY;\n div.style.transform = 'translate(' + dx + 'px,' + dy + 'px)';\n\n return !!metrics.arrowAtTop;\n}\n\n/**\n * Repositions the dropdownDiv on window resize. If it doesn't know how to\n * calculate the new position, it will just hide it instead.\n *\n * @internal\n */\nexport function repositionForWindowResize() {\n // This condition mainly catches the dropdown div when it is being used as a\n // dropdown. It is important not to close it in this case because on Android,\n // when a field is focused, the soft keyboard opens triggering a window resize\n // event and we want the dropdown div to stick around so users can type into\n // it.\n if (owner) {\n const block = owner.getSourceBlock() as BlockSvg;\n const bBox = positionToField\n ? getScaledBboxOfField(owner)\n : getScaledBboxOfBlock(block);\n // If we can fit it, render below the block.\n const primaryX = bBox.left + (bBox.right - bBox.left) / 2;\n const primaryY = bBox.bottom;\n // If we can't fit it, render above the entire parent block.\n const secondaryX = primaryX;\n const secondaryY = bBox.top;\n positionInternal(primaryX, primaryY, secondaryX, secondaryY);\n } else {\n hide();\n }\n}\n\nexport const TEST_ONLY = internal;\n","/**\n * @license\n * Copyright 2018 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\n// Former goog.module ID: Blockly.blockAnimations\n\nimport type {BlockSvg} from './block_svg.js';\nimport * as dom from './utils/dom.js';\nimport {Svg} from './utils/svg.js';\n\n/** A bounding box for a cloned block. */\ninterface CloneRect {\n x: number;\n y: number;\n width: number;\n height: number;\n}\n\n/** PID of disconnect UI animation. There can only be one at a time. */\nlet disconnectPid: ReturnType | null = null;\n\n/** The wobbling block. There can only be one at a time. */\nlet wobblingBlock: BlockSvg | null = null;\n\n/**\n * Play some UI effects (sound, animation) when disposing of a block.\n *\n * @param block The block being disposed of.\n * @internal\n */\nexport function disposeUiEffect(block: BlockSvg) {\n // Disposing is going to take so long the animation won't play anyway.\n if (block.getDescendants(false).length > 100) return;\n\n const workspace = block.workspace;\n const svgGroup = block.getSvgRoot();\n workspace.getAudioManager().play('delete');\n\n const xy = workspace.getSvgXY(svgGroup);\n // Deeply clone the current block.\n const clone: SVGGElement = svgGroup.cloneNode(true) as SVGGElement;\n clone.setAttribute('transform', 'translate(' + xy.x + ',' + xy.y + ')');\n workspace.getParentSvg().appendChild(clone);\n const cloneRect = {\n 'x': xy.x,\n 'y': xy.y,\n 'width': block.width,\n 'height': block.height,\n };\n disposeUiStep(clone, cloneRect, workspace.RTL, new Date(), workspace.scale);\n}\n/**\n * Animate a cloned block and eventually dispose of it.\n * This is a class method, not an instance method since the original block has\n * been destroyed and is no longer accessible.\n *\n * @param clone SVG element to animate and dispose of.\n * @param rect Starting rect of the clone.\n * @param rtl True if RTL, false if LTR.\n * @param start Date of animation's start.\n * @param workspaceScale Scale of workspace.\n */\nfunction disposeUiStep(\n clone: Element,\n rect: CloneRect,\n rtl: boolean,\n start: Date,\n workspaceScale: number,\n) {\n const ms = new Date().getTime() - start.getTime();\n const percent = ms / 150;\n if (percent > 1) {\n dom.removeNode(clone);\n } else {\n const x =\n rect.x + (((rtl ? -1 : 1) * rect.width * workspaceScale) / 2) * percent;\n const y = rect.y + rect.height * workspaceScale * percent;\n const scale = (1 - percent) * workspaceScale;\n clone.setAttribute(\n 'transform',\n 'translate(' + x + ',' + y + ')' + ' scale(' + scale + ')',\n );\n setTimeout(disposeUiStep, 10, clone, rect, rtl, start, workspaceScale);\n }\n}\n\n/**\n * Play some UI effects (sound, ripple) after a connection has been established.\n *\n * @param block The block being connected.\n * @internal\n */\nexport function connectionUiEffect(block: BlockSvg) {\n const workspace = block.workspace;\n const scale = workspace.scale;\n workspace.getAudioManager().play('click');\n if (scale < 1) {\n return; // Too small to care about visual effects.\n }\n // Determine the absolute coordinates of the inferior block.\n const xy = workspace.getSvgXY(block.getSvgRoot());\n // Offset the coordinates based on the two connection types, fix scale.\n if (block.outputConnection) {\n xy.x += (block.RTL ? 3 : -3) * scale;\n xy.y += 13 * scale;\n } else if (block.previousConnection) {\n xy.x += (block.RTL ? -23 : 23) * scale;\n xy.y += 3 * scale;\n }\n const ripple = dom.createSvgElement(\n Svg.CIRCLE,\n {\n 'cx': xy.x,\n 'cy': xy.y,\n 'r': 0,\n 'fill': 'none',\n 'stroke': '#888',\n 'stroke-width': 10,\n },\n workspace.getParentSvg(),\n );\n\n const scaleAnimation = dom.createSvgElement(\n Svg.ANIMATE,\n {\n 'id': 'animationCircle',\n 'begin': 'indefinite',\n 'attributeName': 'r',\n 'dur': '150ms',\n 'from': 0,\n 'to': 25 * scale,\n },\n ripple,\n );\n const opacityAnimation = dom.createSvgElement(\n Svg.ANIMATE,\n {\n 'id': 'animationOpacity',\n 'begin': 'indefinite',\n 'attributeName': 'opacity',\n 'dur': '150ms',\n 'from': 1,\n 'to': 0,\n },\n ripple,\n );\n\n scaleAnimation.beginElement();\n opacityAnimation.beginElement();\n\n setTimeout(() => void dom.removeNode(ripple), 150);\n}\n\n/**\n * Play some UI effects (sound, animation) when disconnecting a block.\n *\n * @param block The block being disconnected.\n * @internal\n */\nexport function disconnectUiEffect(block: BlockSvg) {\n disconnectUiStop();\n block.workspace.getAudioManager().play('disconnect');\n if (block.workspace.scale < 1) {\n return; // Too small to care about visual effects.\n }\n // Horizontal distance for bottom of block to wiggle.\n const DISPLACEMENT = 10;\n // Scale magnitude of skew to height of block.\n const height = block.getHeightWidth().height;\n let magnitude = (Math.atan(DISPLACEMENT / height) / Math.PI) * 180;\n if (!block.RTL) {\n magnitude *= -1;\n }\n // Start the animation.\n wobblingBlock = block;\n disconnectUiStep(block, magnitude, new Date());\n}\n\n/**\n * Animate a brief wiggle of a disconnected block.\n *\n * @param block Block to animate.\n * @param magnitude Maximum degrees skew (reversed for RTL).\n * @param start Date of animation's start.\n */\nfunction disconnectUiStep(block: BlockSvg, magnitude: number, start: Date) {\n const DURATION = 200; // Milliseconds.\n const WIGGLES = 3; // Half oscillations.\n\n const ms = new Date().getTime() - start.getTime();\n const percent = ms / DURATION;\n\n let skew = '';\n if (percent <= 1) {\n const val = Math.round(\n Math.sin(percent * Math.PI * WIGGLES) * (1 - percent) * magnitude,\n );\n skew = `skewX(${val})`;\n disconnectPid = setTimeout(disconnectUiStep, 10, block, magnitude, start);\n }\n\n block\n .getSvgRoot()\n .setAttribute('transform', `${block.getTranslation()} ${skew}`);\n}\n\n/**\n * Stop the disconnect UI animation immediately.\n *\n * @internal\n */\nexport function disconnectUiStop() {\n if (!wobblingBlock) return;\n if (disconnectPid) {\n clearTimeout(disconnectPid);\n disconnectPid = null;\n }\n wobblingBlock\n .getSvgRoot()\n .setAttribute('transform', wobblingBlock.getTranslation());\n wobblingBlock = null;\n}\n","/**\n * @license\n * Copyright 2019 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\n// Former goog.module ID: Blockly.utils.string\n\nimport * as deprecation from './deprecation.js';\n\n/**\n * Fast prefix-checker.\n * Copied from Closure's goog.string.startsWith.\n *\n * @param str The string to check.\n * @param prefix A string to look for at the start of `str`.\n * @returns True if `str` begins with `prefix`.\n * @deprecated Use built-in **string.startsWith** instead.\n */\nexport function startsWith(str: string, prefix: string): boolean {\n deprecation.warn(\n 'Blockly.utils.string.startsWith()',\n 'April 2022',\n 'April 2023',\n 'Use built-in string.startsWith',\n );\n return str.startsWith(prefix);\n}\n\n/**\n * Given an array of strings, return the length of the shortest one.\n *\n * @param array Array of strings.\n * @returns Length of shortest string.\n */\nexport function shortestStringLength(array: string[]): number {\n if (!array.length) {\n return 0;\n }\n return array.reduce(function (a, b) {\n return a.length < b.length ? a : b;\n }).length;\n}\n\n/**\n * Given an array of strings, return the length of the common prefix.\n * Words may not be split. Any space after a word is included in the length.\n *\n * @param array Array of strings.\n * @param opt_shortest Length of shortest string.\n * @returns Length of common prefix.\n */\nexport function commonWordPrefix(\n array: string[],\n opt_shortest?: number,\n): number {\n if (!array.length) {\n return 0;\n } else if (array.length === 1) {\n return array[0].length;\n }\n let wordPrefix = 0;\n const max = opt_shortest || shortestStringLength(array);\n let len;\n for (len = 0; len < max; len++) {\n const letter = array[0][len];\n for (let i = 1; i < array.length; i++) {\n if (letter !== array[i][len]) {\n return wordPrefix;\n }\n }\n if (letter === ' ') {\n wordPrefix = len + 1;\n }\n }\n for (let i = 1; i < array.length; i++) {\n const letter = array[i][len];\n if (letter && letter !== ' ') {\n return wordPrefix;\n }\n }\n return max;\n}\n\n/**\n * Given an array of strings, return the length of the common suffix.\n * Words may not be split. Any space after a word is included in the length.\n *\n * @param array Array of strings.\n * @param opt_shortest Length of shortest string.\n * @returns Length of common suffix.\n */\nexport function commonWordSuffix(\n array: string[],\n opt_shortest?: number,\n): number {\n if (!array.length) {\n return 0;\n } else if (array.length === 1) {\n return array[0].length;\n }\n let wordPrefix = 0;\n const max = opt_shortest || shortestStringLength(array);\n let len;\n for (len = 0; len < max; len++) {\n const letter = array[0].substr(-len - 1, 1);\n for (let i = 1; i < array.length; i++) {\n if (letter !== array[i].substr(-len - 1, 1)) {\n return wordPrefix;\n }\n }\n if (letter === ' ') {\n wordPrefix = len + 1;\n }\n }\n for (let i = 1; i < array.length; i++) {\n const letter = array[i].charAt(array[i].length - len - 1);\n if (letter && letter !== ' ') {\n return wordPrefix;\n }\n }\n return max;\n}\n\n/**\n * Wrap text to the specified width.\n *\n * @param text Text to wrap.\n * @param limit Width to wrap each line.\n * @returns Wrapped text.\n */\nexport function wrap(text: string, limit: number): string {\n const lines = text.split('\\n');\n for (let i = 0; i < lines.length; i++) {\n lines[i] = wrapLine(lines[i], limit);\n }\n return lines.join('\\n');\n}\n\n/**\n * Wrap single line of text to the specified width.\n *\n * @param text Text to wrap.\n * @param limit Width to wrap each line.\n * @returns Wrapped text.\n */\nfunction wrapLine(text: string, limit: number): string {\n if (text.length <= limit) {\n // Short text, no need to wrap.\n return text;\n }\n // Split the text into words.\n const words = text.trim().split(/\\s+/);\n // Set limit to be the length of the largest word.\n for (let i = 0; i < words.length; i++) {\n if (words[i].length > limit) {\n limit = words[i].length;\n }\n }\n\n let lastScore;\n let score = -Infinity;\n let lastText;\n let lineCount = 1;\n do {\n lastScore = score;\n lastText = text;\n // Create a list of booleans representing if a space (false) or\n // a break (true) appears after each word.\n let wordBreaks = [];\n // Seed the list with evenly spaced linebreaks.\n const steps = words.length / lineCount;\n let insertedBreaks = 1;\n for (let i = 0; i < words.length - 1; i++) {\n if (insertedBreaks < (i + 1.5) / steps) {\n insertedBreaks++;\n wordBreaks[i] = true;\n } else {\n wordBreaks[i] = false;\n }\n }\n wordBreaks = wrapMutate(words, wordBreaks, limit);\n score = wrapScore(words, wordBreaks, limit);\n text = wrapToText(words, wordBreaks);\n lineCount++;\n } while (score > lastScore);\n return lastText;\n}\n\n/**\n * Compute a score for how good the wrapping is.\n *\n * @param words Array of each word.\n * @param wordBreaks Array of line breaks.\n * @param limit Width to wrap each line.\n * @returns Larger the better.\n */\nfunction wrapScore(\n words: string[],\n wordBreaks: boolean[],\n limit: number,\n): number {\n // If this function becomes a performance liability, add caching.\n // Compute the length of each line.\n const lineLengths = [0];\n const linePunctuation = [];\n for (let i = 0; i < words.length; i++) {\n lineLengths[lineLengths.length - 1] += words[i].length;\n if (wordBreaks[i] === true) {\n lineLengths.push(0);\n linePunctuation.push(words[i].charAt(words[i].length - 1));\n } else if (wordBreaks[i] === false) {\n lineLengths[lineLengths.length - 1]++;\n }\n }\n const maxLength = Math.max(...lineLengths);\n\n let score = 0;\n for (let i = 0; i < lineLengths.length; i++) {\n // Optimize for width.\n // -2 points per char over limit (scaled to the power of 1.5).\n score -= Math.pow(Math.abs(limit - lineLengths[i]), 1.5) * 2;\n // Optimize for even lines.\n // -1 point per char smaller than max (scaled to the power of 1.5).\n score -= Math.pow(maxLength - lineLengths[i], 1.5);\n // Optimize for structure.\n // Add score to line endings after punctuation.\n if ('.?!'.indexOf(linePunctuation[i]) !== -1) {\n score += limit / 3;\n } else if (',;)]}'.indexOf(linePunctuation[i]) !== -1) {\n score += limit / 4;\n }\n }\n // All else being equal, the last line should not be longer than the\n // previous line. For example, this looks wrong:\n // aaa bbb\n // ccc ddd eee\n if (\n lineLengths.length > 1 &&\n lineLengths[lineLengths.length - 1] <= lineLengths[lineLengths.length - 2]\n ) {\n score += 0.5;\n }\n return score;\n}\n/**\n * Mutate the array of line break locations until an optimal solution is found.\n * No line breaks are added or deleted, they are simply moved around.\n *\n * @param words Array of each word.\n * @param wordBreaks Array of line breaks.\n * @param limit Width to wrap each line.\n * @returns New array of optimal line breaks.\n */\nfunction wrapMutate(\n words: string[],\n wordBreaks: boolean[],\n limit: number,\n): boolean[] {\n let bestScore = wrapScore(words, wordBreaks, limit);\n let bestBreaks;\n // Try shifting every line break forward or backward.\n for (let i = 0; i < wordBreaks.length - 1; i++) {\n if (wordBreaks[i] === wordBreaks[i + 1]) {\n continue;\n }\n const mutatedWordBreaks = new Array().concat(wordBreaks);\n mutatedWordBreaks[i] = !mutatedWordBreaks[i];\n mutatedWordBreaks[i + 1] = !mutatedWordBreaks[i + 1];\n const mutatedScore = wrapScore(words, mutatedWordBreaks, limit);\n if (mutatedScore > bestScore) {\n bestScore = mutatedScore;\n bestBreaks = mutatedWordBreaks;\n }\n }\n if (bestBreaks) {\n // Found an improvement. See if it may be improved further.\n return wrapMutate(words, bestBreaks, limit);\n }\n // No improvements found. Done.\n return wordBreaks;\n}\n\n/**\n * Reassemble the array of words into text, with the specified line breaks.\n *\n * @param words Array of each word.\n * @param wordBreaks Array of line breaks.\n * @returns Plain text.\n */\nfunction wrapToText(words: string[], wordBreaks: boolean[]): string {\n const text = [];\n for (let i = 0; i < words.length; i++) {\n text.push(words[i]);\n if (wordBreaks[i] !== undefined) {\n text.push(wordBreaks[i] ? '\\n' : ' ');\n }\n }\n return text.join('');\n}\n\n/**\n * Is the given string a number (includes negative and decimals).\n *\n * @param str Input string.\n * @returns True if number, false otherwise.\n */\nexport function isNumber(str: string): boolean {\n return /^\\s*-?\\d+(\\.\\d+)?\\s*$/.test(str);\n}\n","/**\n * @license\n * Copyright 2011 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\n// Former goog.module ID: Blockly.Tooltip\n\nimport * as browserEvents from './browser_events.js';\nimport * as common from './common.js';\nimport * as blocklyString from './utils/string.js';\n\n/**\n * A type which can define a tooltip.\n * Either a string, an object containing a tooltip property, or a function which\n * returns either a string, or another arbitrarily nested function which\n * eventually unwinds to a string.\n */\nexport type TipInfo =\n | string\n | {tooltip: AnyDuringMigration}\n | (() => TipInfo | string | Function);\n\n/**\n * A function that renders custom tooltip UI.\n * 1st parameter: the div element to render content into.\n * 2nd parameter: the element being moused over (i.e., the element for which the\n * tooltip should be shown).\n */\nexport type CustomTooltip = (p1: Element, p2: Element) => AnyDuringMigration;\n\n/**\n * An optional function that renders custom tooltips into the provided DIV. If\n * this is defined, the function will be called instead of rendering the default\n * tooltip UI.\n */\nlet customTooltip: CustomTooltip | undefined = undefined;\n\n/**\n * Sets a custom function that will be called if present instead of the default\n * tooltip UI.\n *\n * @param customFn A custom tooltip used to render an alternate tooltip UI.\n */\nexport function setCustomTooltip(customFn: CustomTooltip) {\n customTooltip = customFn;\n}\n\n/**\n * Gets the custom tooltip function.\n *\n * @returns The custom tooltip function, if defined.\n */\nexport function getCustomTooltip(): CustomTooltip | undefined {\n return customTooltip;\n}\n\n/** Is a tooltip currently showing? */\nlet visible = false;\n\n/**\n * Returns whether or not a tooltip is showing\n *\n * @returns True if a tooltip is showing\n */\nexport function isVisible(): boolean {\n return visible;\n}\n\n/** Is someone else blocking the tooltip from being shown? */\nlet blocked = false;\n\n/**\n * Maximum width (in characters) of a tooltip.\n */\nexport const LIMIT = 50;\n\n/** PID of suspended thread to clear tooltip on mouse out. */\nlet mouseOutPid: AnyDuringMigration = 0;\n\n/** PID of suspended thread to show the tooltip. */\nlet showPid: AnyDuringMigration = 0;\n\n/**\n * Last observed X location of the mouse pointer (freezes when tooltip appears).\n */\nlet lastX = 0;\n\n/**\n * Last observed Y location of the mouse pointer (freezes when tooltip appears).\n */\nlet lastY = 0;\n\n/** Current element being pointed at. */\nlet element: AnyDuringMigration = null;\n\n/**\n * Once a tooltip has opened for an element, that element is 'poisoned' and\n * cannot respawn a tooltip until the pointer moves over a different element.\n */\nlet poisonedElement: AnyDuringMigration = null;\n\n/**\n * Horizontal offset between mouse cursor and tooltip.\n */\nexport const OFFSET_X = 0;\n\n/**\n * Vertical offset between mouse cursor and tooltip.\n */\nexport const OFFSET_Y = 10;\n\n/**\n * Radius mouse can move before killing tooltip.\n */\nexport const RADIUS_OK = 10;\n\n/**\n * Delay before tooltip appears.\n */\nexport const HOVER_MS = 750;\n\n/**\n * Horizontal padding between tooltip and screen edge.\n */\nexport const MARGINS = 5;\n\n/** The HTML container. Set once by createDom. */\nlet containerDiv: HTMLDivElement | null = null;\n\n/**\n * Returns the HTML tooltip container.\n *\n * @returns The HTML tooltip container.\n */\nexport function getDiv(): HTMLDivElement | null {\n return containerDiv;\n}\n\n/**\n * Returns the tooltip text for the given element.\n *\n * @param object The object to get the tooltip text of.\n * @returns The tooltip text of the element.\n */\nexport function getTooltipOfObject(object: AnyDuringMigration | null): string {\n const obj = getTargetObject(object);\n if (obj) {\n let tooltip = obj.tooltip;\n while (typeof tooltip === 'function') {\n tooltip = tooltip();\n }\n if (typeof tooltip !== 'string') {\n throw Error('Tooltip function must return a string.');\n }\n return tooltip;\n }\n return '';\n}\n\n/**\n * Returns the target object that the given object is targeting for its\n * tooltip. Could be the object itself.\n *\n * @param obj The object are trying to find the target tooltip object of.\n * @returns The target tooltip object.\n */\nfunction getTargetObject(\n obj: object | null,\n): {tooltip: AnyDuringMigration} | null {\n while (obj && (obj as any).tooltip) {\n if (\n typeof (obj as any).tooltip === 'string' ||\n typeof (obj as any).tooltip === 'function'\n ) {\n return obj as {tooltip: string | (() => string)};\n }\n obj = (obj as any).tooltip;\n }\n return null;\n}\n\n/**\n * Create the tooltip div and inject it onto the page.\n */\nexport function createDom() {\n if (containerDiv) {\n return; // Already created.\n }\n // Create an HTML container for popup overlays (e.g. editor widgets).\n containerDiv = document.createElement('div');\n containerDiv.className = 'blocklyTooltipDiv';\n const container = common.getParentContainer() || document.body;\n container.appendChild(containerDiv);\n}\n\n/**\n * Binds the required mouse events onto an SVG element.\n *\n * @param element SVG element onto which tooltip is to be bound.\n */\nexport function bindMouseEvents(element: Element) {\n // TODO (#6097): Don't stash wrapper info on the DOM.\n (element as AnyDuringMigration).mouseOverWrapper_ = browserEvents.bind(\n element,\n 'pointerover',\n null,\n onMouseOver,\n );\n (element as AnyDuringMigration).mouseOutWrapper_ = browserEvents.bind(\n element,\n 'pointerout',\n null,\n onMouseOut,\n );\n\n // Don't use bindEvent_ for mousemove since that would create a\n // corresponding touch handler, even though this only makes sense in the\n // context of a mouseover/mouseout.\n element.addEventListener('pointermove', onMouseMove, false);\n}\n\n/**\n * Unbinds tooltip mouse events from the SVG element.\n *\n * @param element SVG element onto which tooltip is bound.\n */\nexport function unbindMouseEvents(element: Element | null) {\n if (!element) {\n return;\n }\n // TODO (#6097): Don't stash wrapper info on the DOM.\n browserEvents.unbind((element as AnyDuringMigration).mouseOverWrapper_);\n browserEvents.unbind((element as AnyDuringMigration).mouseOutWrapper_);\n element.removeEventListener('pointermove', onMouseMove);\n}\n\n/**\n * Hide the tooltip if the mouse is over a different object.\n * Initialize the tooltip to potentially appear for this object.\n *\n * @param e Mouse event.\n */\nfunction onMouseOver(e: PointerEvent) {\n if (blocked) {\n // Someone doesn't want us to show tooltips.\n return;\n }\n // If the tooltip is an object, treat it as a pointer to the next object in\n // the chain to look at. Terminate when a string or function is found.\n const newElement = getTargetObject(e.currentTarget);\n if (element !== newElement) {\n hide();\n poisonedElement = null;\n element = newElement;\n }\n // Forget about any immediately preceding mouseOut event.\n clearTimeout(mouseOutPid);\n}\n\n/**\n * Hide the tooltip if the mouse leaves the object and enters the workspace.\n *\n * @param _e Mouse event.\n */\nfunction onMouseOut(_e: PointerEvent) {\n if (blocked) {\n // Someone doesn't want us to show tooltips.\n return;\n }\n // Moving from one element to another (overlapping or with no gap) generates\n // a mouseOut followed instantly by a mouseOver. Fork off the mouseOut\n // event and kill it if a mouseOver is received immediately.\n // This way the task only fully executes if mousing into the void.\n mouseOutPid = setTimeout(function () {\n element = null;\n poisonedElement = null;\n hide();\n }, 1);\n clearTimeout(showPid);\n showPid = 0;\n}\n\n/**\n * When hovering over an element, schedule a tooltip to be shown. If a tooltip\n * is already visible, hide it if the mouse strays out of a certain radius.\n *\n * @param e Mouse event.\n */\nfunction onMouseMove(e: Event) {\n if (!element || !(element as AnyDuringMigration).tooltip) {\n // No tooltip here to show.\n return;\n } else if (blocked) {\n // Someone doesn't want us to show tooltips. We are probably handling a\n // user gesture, such as a click or drag.\n return;\n }\n if (visible) {\n // Compute the distance between the mouse position when the tooltip was\n // shown and the current mouse position. Pythagorean theorem.\n // AnyDuringMigration because: Property 'pageX' does not exist on type\n // 'Event'.\n const dx = lastX - (e as AnyDuringMigration).pageX;\n // AnyDuringMigration because: Property 'pageY' does not exist on type\n // 'Event'.\n const dy = lastY - (e as AnyDuringMigration).pageY;\n if (Math.sqrt(dx * dx + dy * dy) > RADIUS_OK) {\n hide();\n }\n } else if (poisonedElement !== element) {\n // The mouse moved, clear any previously scheduled tooltip.\n clearTimeout(showPid);\n // Maybe this time the mouse will stay put. Schedule showing of tooltip.\n // AnyDuringMigration because: Property 'pageX' does not exist on type\n // 'Event'.\n lastX = (e as AnyDuringMigration).pageX;\n // AnyDuringMigration because: Property 'pageY' does not exist on type\n // 'Event'.\n lastY = (e as AnyDuringMigration).pageY;\n showPid = setTimeout(show, HOVER_MS);\n }\n}\n\n/**\n * Dispose of the tooltip.\n *\n * @internal\n */\nexport function dispose() {\n element = null;\n poisonedElement = null;\n hide();\n}\n\n/**\n * Hide the tooltip.\n */\nexport function hide() {\n if (visible) {\n visible = false;\n if (containerDiv) {\n containerDiv.style.display = 'none';\n }\n }\n if (showPid) {\n clearTimeout(showPid);\n showPid = 0;\n }\n}\n\n/**\n * Hide any in-progress tooltips and block showing new tooltips until the next\n * call to unblock().\n *\n * @internal\n */\nexport function block() {\n hide();\n blocked = true;\n}\n\n/**\n * Unblock tooltips: allow them to be scheduled and shown according to their own\n * logic.\n *\n * @internal\n */\nexport function unblock() {\n blocked = false;\n}\n\n/** Renders the tooltip content into the tooltip div. */\nfunction renderContent() {\n if (!containerDiv || !element) {\n // This shouldn't happen, but if it does, we can't render.\n return;\n }\n if (typeof customTooltip === 'function') {\n customTooltip(containerDiv, element);\n } else {\n renderDefaultContent();\n }\n}\n\n/** Renders the default tooltip UI. */\nfunction renderDefaultContent() {\n let tip = getTooltipOfObject(element);\n tip = blocklyString.wrap(tip, LIMIT);\n // Create new text, line by line.\n const lines = tip.split('\\n');\n for (let i = 0; i < lines.length; i++) {\n const div = document.createElement('div');\n div.appendChild(document.createTextNode(lines[i]));\n containerDiv!.appendChild(div);\n }\n}\n\n/**\n * Gets the coordinates for the tooltip div, taking into account the edges of\n * the screen to prevent showing the tooltip offscreen.\n *\n * @param rtl True if the tooltip should be in right-to-left layout.\n * @returns Coordinates at which the tooltip div should be placed.\n */\nfunction getPosition(rtl: boolean): {x: number; y: number} {\n // Position the tooltip just below the cursor.\n const windowWidth = document.documentElement.clientWidth;\n const windowHeight = document.documentElement.clientHeight;\n\n let anchorX = lastX;\n if (rtl) {\n anchorX -= OFFSET_X + containerDiv!.offsetWidth;\n } else {\n anchorX += OFFSET_X;\n }\n\n let anchorY = lastY + OFFSET_Y;\n if (anchorY + containerDiv!.offsetHeight > windowHeight + window.scrollY) {\n // Falling off the bottom of the screen; shift the tooltip up.\n anchorY -= containerDiv!.offsetHeight + 2 * OFFSET_Y;\n }\n\n if (rtl) {\n // Prevent falling off left edge in RTL mode.\n anchorX = Math.max(MARGINS - window.scrollX, anchorX);\n } else {\n if (\n anchorX + containerDiv!.offsetWidth >\n windowWidth + window.scrollX - 2 * MARGINS\n ) {\n // Falling off the right edge of the screen;\n // clamp the tooltip on the edge.\n anchorX = windowWidth - containerDiv!.offsetWidth - 2 * MARGINS;\n }\n }\n\n return {x: anchorX, y: anchorY};\n}\n\n/** Create the tooltip and show it. */\nfunction show() {\n if (blocked) {\n // Someone doesn't want us to show tooltips.\n return;\n }\n poisonedElement = element;\n if (!containerDiv) {\n return;\n }\n // Erase all existing text.\n containerDiv.textContent = '';\n\n // Add new content.\n renderContent();\n\n // Display the tooltip.\n const rtl = (element as any).RTL;\n containerDiv.style.direction = rtl ? 'rtl' : 'ltr';\n containerDiv.style.display = 'block';\n visible = true;\n\n const {x, y} = getPosition(rtl);\n containerDiv.style.left = x + 'px';\n containerDiv.style.top = y + 'px';\n}\n","/**\n * @license\n * Copyright 2019 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\n// Former goog.module ID: Blockly.utils.object\n\n/**\n * Complete a deep merge of all members of a source object with a target object.\n *\n * @param target Target.\n * @param source Source.\n * @returns The resulting object.\n */\nexport function deepMerge(\n target: AnyDuringMigration,\n source: AnyDuringMigration,\n): AnyDuringMigration {\n for (const x in source) {\n if (source[x] !== null && typeof source[x] === 'object') {\n target[x] = deepMerge(target[x] || Object.create(null), source[x]);\n } else {\n target[x] = source[x];\n }\n }\n return target;\n}\n","/**\n * @license\n * Copyright 2023 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\nexport interface IHasBubble {\n /** @returns True if the bubble is currently open, false otherwise. */\n bubbleIsVisible(): boolean;\n\n /** Sets whether the bubble is open or not. */\n setBubbleVisible(visible: boolean): void;\n}\n\n/** Type guard that checks whether the given object is a IHasBubble. */\nexport function hasBubble(obj: any): obj is IHasBubble {\n return (\n obj.bubbleIsVisible !== undefined && obj.setBubbleVisible !== undefined\n );\n}\n","/**\n * @license\n * Copyright 2019 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\n// Former goog.module ID: Blockly.utils.colour\n\n/**\n * The richness of block colours, regardless of the hue.\n * Must be in the range of 0 (inclusive) to 1 (exclusive).\n */\nlet hsvSaturation = 0.45;\n\n/**\n * Get the richness of block colours, regardless of the hue.\n *\n * @returns The current richness.\n * @internal\n */\nexport function getHsvSaturation(): number {\n return hsvSaturation;\n}\n\n/**\n * Set the richness of block colours, regardless of the hue.\n *\n * @param newSaturation The new richness, in the range of 0 (inclusive) to 1\n * (exclusive)\n * @internal\n */\nexport function setHsvSaturation(newSaturation: number) {\n hsvSaturation = newSaturation;\n}\n\n/**\n * The intensity of block colours, regardless of the hue.\n * Must be in the range of 0 (inclusive) to 1 (exclusive).\n */\nlet hsvValue = 0.65;\n\n/**\n * Get the intensity of block colours, regardless of the hue.\n *\n * @returns The current intensity.\n * @internal\n */\nexport function getHsvValue(): number {\n return hsvValue;\n}\n\n/**\n * Set the intensity of block colours, regardless of the hue.\n *\n * @param newValue The new intensity, in the range of 0 (inclusive) to 1\n * (exclusive)\n * @internal\n */\nexport function setHsvValue(newValue: number) {\n hsvValue = newValue;\n}\n\n/**\n * Parses a colour from a string.\n * .parse('red') = '#ff0000'\n * .parse('#f00') = '#ff0000'\n * .parse('#ff0000') = '#ff0000'\n * .parse('0xff0000') = '#ff0000'\n * .parse('rgb(255, 0, 0)') = '#ff0000'\n *\n * @param str Colour in some CSS format.\n * @returns A string containing a hex representation of the colour, or null if\n * can't be parsed.\n */\nexport function parse(str: string | number): string | null {\n str = `${str}`.toLowerCase().trim();\n let hex = names[str];\n if (hex) {\n // e.g. 'red'\n return hex;\n }\n hex = str.substring(0, 2) === '0x' ? '#' + str.substring(2) : str;\n hex = hex[0] === '#' ? hex : '#' + hex;\n if (/^#[0-9a-f]{6}$/.test(hex)) {\n // e.g. '#00ff88'\n return hex;\n }\n if (/^#[0-9a-f]{3}$/.test(hex)) {\n // e.g. '#0f8'\n return ['#', hex[1], hex[1], hex[2], hex[2], hex[3], hex[3]].join('');\n }\n const rgb = str.match(/^(?:rgb)?\\s*\\(\\s*(\\d+)\\s*,\\s*(\\d+)\\s*,\\s*(\\d+)\\s*\\)$/);\n if (rgb) {\n // e.g. 'rgb(0, 128, 255)'\n const r = Number(rgb[1]);\n const g = Number(rgb[2]);\n const b = Number(rgb[3]);\n if (r >= 0 && r < 256 && g >= 0 && g < 256 && b >= 0 && b < 256) {\n return rgbToHex(r, g, b);\n }\n }\n return null;\n}\n\n/**\n * Converts a colour from RGB to hex representation.\n *\n * @param r Amount of red, int between 0 and 255.\n * @param g Amount of green, int between 0 and 255.\n * @param b Amount of blue, int between 0 and 255.\n * @returns Hex representation of the colour.\n */\nexport function rgbToHex(r: number, g: number, b: number): string {\n const rgb = (r << 16) | (g << 8) | b;\n if (r < 0x10) {\n return '#' + (0x1000000 | rgb).toString(16).substr(1);\n }\n return '#' + rgb.toString(16);\n}\n\n/**\n * Converts a colour to RGB.\n *\n * @param colour String representing colour in any colour format ('#ff0000',\n * 'red', '0xff000', etc).\n * @returns RGB representation of the colour.\n */\nexport function hexToRgb(colour: string): number[] {\n const hex = parse(colour);\n if (!hex) {\n return [0, 0, 0];\n }\n\n const rgb = parseInt(hex.substr(1), 16);\n const r = rgb >> 16;\n const g = (rgb >> 8) & 255;\n const b = rgb & 255;\n\n return [r, g, b];\n}\n\n/**\n * Converts an HSV triplet to hex representation.\n *\n * @param h Hue value in [0, 360].\n * @param s Saturation value in [0, 1].\n * @param v Brightness in [0, 255].\n * @returns Hex representation of the colour.\n */\nexport function hsvToHex(h: number, s: number, v: number): string {\n let red = 0;\n let green = 0;\n let blue = 0;\n if (s === 0) {\n red = v;\n green = v;\n blue = v;\n } else {\n const sextant = Math.floor(h / 60);\n const remainder = h / 60 - sextant;\n const val1 = v * (1 - s);\n const val2 = v * (1 - s * remainder);\n const val3 = v * (1 - s * (1 - remainder));\n switch (sextant) {\n case 1:\n red = val2;\n green = v;\n blue = val1;\n break;\n case 2:\n red = val1;\n green = v;\n blue = val3;\n break;\n case 3:\n red = val1;\n green = val2;\n blue = v;\n break;\n case 4:\n red = val3;\n green = val1;\n blue = v;\n break;\n case 5:\n red = v;\n green = val1;\n blue = val2;\n break;\n case 6:\n case 0:\n red = v;\n green = val3;\n blue = val1;\n break;\n }\n }\n return rgbToHex(Math.floor(red), Math.floor(green), Math.floor(blue));\n}\n\n/**\n * Blend two colours together, using the specified factor to indicate the\n * weight given to the first colour.\n *\n * @param colour1 First colour.\n * @param colour2 Second colour.\n * @param factor The weight to be given to colour1 over colour2.\n * Values should be in the range [0, 1].\n * @returns Combined colour represented in hex.\n */\nexport function blend(\n colour1: string,\n colour2: string,\n factor: number,\n): string | null {\n const hex1 = parse(colour1);\n if (!hex1) {\n return null;\n }\n const hex2 = parse(colour2);\n if (!hex2) {\n return null;\n }\n const rgb1 = hexToRgb(hex1);\n const rgb2 = hexToRgb(hex2);\n const r = Math.round(rgb2[0] + factor * (rgb1[0] - rgb2[0]));\n const g = Math.round(rgb2[1] + factor * (rgb1[1] - rgb2[1]));\n const b = Math.round(rgb2[2] + factor * (rgb1[2] - rgb2[2]));\n return rgbToHex(r, g, b);\n}\n\n/**\n * A map that contains the 16 basic colour keywords as defined by W3C:\n * https://www.w3.org/TR/2018/REC-css-color-3-20180619/#html4\n * The keys of this map are the lowercase \"readable\" names of the colours,\n * while the values are the \"hex\" values.\n */\nexport const names: {[key: string]: string} = {\n 'aqua': '#00ffff',\n 'black': '#000000',\n 'blue': '#0000ff',\n 'fuchsia': '#ff00ff',\n 'gray': '#808080',\n 'green': '#008000',\n 'lime': '#00ff00',\n 'maroon': '#800000',\n 'navy': '#000080',\n 'olive': '#808000',\n 'purple': '#800080',\n 'red': '#ff0000',\n 'silver': '#c0c0c0',\n 'teal': '#008080',\n 'white': '#ffffff',\n 'yellow': '#ffff00',\n};\n\n/**\n * Convert a hue (HSV model) into an RGB hex triplet.\n *\n * @param hue Hue on a colour wheel (0-360).\n * @returns RGB code, e.g. '#5ba65b'.\n */\nexport function hueToHex(hue: number): string {\n return hsvToHex(hue, hsvSaturation, hsvValue * 255);\n}\n","/**\n * @license\n * Copyright 2021 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\n// Former goog.module ID: Blockly.utils.parsing\n\nimport {Msg} from '../msg.js';\n\nimport * as colourUtils from './colour.js';\n\n/**\n * Internal implementation of the message reference and interpolation token\n * parsing used by tokenizeInterpolation() and replaceMessageReferences().\n *\n * @param message Text which might contain string table references and\n * interpolation tokens.\n * @param parseInterpolationTokens Option to parse numeric interpolation\n * tokens (%1, %2, ...) when true.\n * @param tokenizeNewlines Split individual newline characters into separate\n * tokens when true.\n * @returns Array of strings and numbers.\n */\nfunction tokenizeInterpolationInternal(\n message: string,\n parseInterpolationTokens: boolean,\n tokenizeNewlines: boolean,\n): (string | number)[] {\n const tokens = [];\n const chars = message.split('');\n chars.push(''); // End marker.\n // Parse the message with a finite state machine.\n // 0 - Base case.\n // 1 - % found.\n // 2 - Digit found.\n // 3 - Message ref found.\n let state = 0;\n const buffer = new Array();\n let number = null;\n for (let i = 0; i < chars.length; i++) {\n const c = chars[i];\n if (state === 0) {\n // Start escape.\n if (c === '%') {\n const text = buffer.join('');\n if (text) {\n tokens.push(text);\n }\n buffer.length = 0;\n state = 1;\n } else if (tokenizeNewlines && c === '\\n') {\n // Output newline characters as single-character tokens, to be replaced\n // with endOfRow dummies during interpolation.\n const text = buffer.join('');\n if (text) {\n tokens.push(text);\n }\n buffer.length = 0;\n tokens.push(c);\n } else {\n buffer.push(c); // Regular char.\n }\n } else if (state === 1) {\n if (c === '%') {\n buffer.push(c); // Escaped %: %%\n state = 0;\n } else if (parseInterpolationTokens && '0' <= c && c <= '9') {\n state = 2;\n number = c;\n const text = buffer.join('');\n if (text) {\n tokens.push(text);\n }\n buffer.length = 0;\n } else if (c === '{') {\n state = 3;\n } else {\n buffer.push('%', c); // Not recognized. Return as literal.\n state = 0;\n }\n } else if (state === 2) {\n if ('0' <= c && c <= '9') {\n number += c; // Multi-digit number.\n } else {\n tokens.push(parseInt(number ?? '', 10));\n i--; // Parse this char again.\n state = 0;\n }\n } else if (state === 3) {\n // String table reference\n if (c === '') {\n // Premature end before closing '}'\n buffer.splice(0, 0, '%{'); // Re-insert leading delimiter\n i--; // Parse this char again.\n state = 0; // and parse as string literal.\n } else if (c !== '}') {\n buffer.push(c);\n } else {\n const rawKey = buffer.join('');\n if (/[A-Z]\\w*/i.test(rawKey)) {\n // Strict matching\n // Found a valid string key. Attempt case insensitive match.\n const keyUpper = rawKey.toUpperCase();\n\n // BKY_ is the prefix used to namespace the strings used in\n // Blockly core files and the predefined blocks in ../blocks/.\n // These strings are defined in ../msgs/ files.\n const bklyKey = keyUpper.startsWith('BKY_')\n ? keyUpper.substring(4)\n : null;\n if (bklyKey && bklyKey in Msg) {\n const rawValue = Msg[bklyKey];\n if (typeof rawValue === 'string') {\n // Attempt to dereference substrings, too, appending to the\n // end.\n Array.prototype.push.apply(\n tokens,\n tokenizeInterpolationInternal(\n rawValue,\n parseInterpolationTokens,\n tokenizeNewlines,\n ),\n );\n } else if (parseInterpolationTokens) {\n // When parsing interpolation tokens, numbers are special\n // placeholders (%1, %2, etc). Make sure all other values are\n // strings.\n tokens.push(`${rawValue}`);\n } else {\n tokens.push(rawValue);\n }\n } else {\n // No entry found in the string table. Pass reference as string.\n tokens.push('%{' + rawKey + '}');\n }\n buffer.length = 0; // Clear the array\n state = 0;\n } else {\n tokens.push('%{' + rawKey + '}');\n buffer.length = 0;\n state = 0; // and parse as string literal.\n }\n }\n }\n }\n let text = buffer.join('');\n if (text) {\n tokens.push(text);\n }\n\n // Merge adjacent text tokens into a single string (but if newlines should be\n // tokenized, don't merge those with adjacent text).\n const mergedTokens = [];\n buffer.length = 0;\n for (let i = 0; i < tokens.length; i++) {\n if (\n typeof tokens[i] === 'string' &&\n !(tokenizeNewlines && tokens[i] === '\\n')\n ) {\n buffer.push(tokens[i] as string);\n } else {\n text = buffer.join('');\n if (text) {\n mergedTokens.push(text);\n }\n buffer.length = 0;\n mergedTokens.push(tokens[i]);\n }\n }\n text = buffer.join('');\n if (text) {\n mergedTokens.push(text);\n }\n buffer.length = 0;\n\n return mergedTokens;\n}\n\n/**\n * Parse a string with any number of interpolation tokens (%1, %2, ...).\n * It will also replace string table references (e.g., %{bky_my_msg} and\n * %{BKY_MY_MSG} will both be replaced with the value in\n * Msg['MY_MSG']). Percentage sign characters '%' may be self-escaped\n * (e.g., '%%'). Newline characters will also be output as string tokens\n * containing a single newline character.\n *\n * @param message Text which might contain string table references and\n * interpolation tokens.\n * @returns Array of strings and numbers.\n */\nexport function tokenizeInterpolation(message: string): (string | number)[] {\n return tokenizeInterpolationInternal(message, true, true);\n}\n\n/**\n * Replaces string table references in a message, if the message is a string.\n * For example, \"%{bky_my_msg}\" and \"%{BKY_MY_MSG}\" will both be replaced with\n * the value in Msg['MY_MSG'].\n *\n * @param message Message, which may be a string that contains\n * string table references.\n * @returns String with message references replaced.\n */\nexport function replaceMessageReferences(message: string | any): string {\n if (typeof message !== 'string') {\n return message;\n }\n const interpolatedResult = tokenizeInterpolationInternal(\n message,\n false,\n false,\n );\n // When parseInterpolationTokens and tokenizeNewlines are false,\n // interpolatedResult should be at most length 1.\n return interpolatedResult.length ? String(interpolatedResult[0]) : '';\n}\n\n/**\n * Validates that any %{MSG_KEY} references in the message refer to keys of\n * the Msg string table.\n *\n * @param message Text which might contain string table references.\n * @returns True if all message references have matching values.\n * Otherwise, false.\n */\nexport function checkMessageReferences(message: string): boolean {\n let validSoFar = true;\n\n const msgTable = Msg;\n // TODO (#1169): Implement support for other string tables,\n // prefixes other than BKY_.\n const m = message.match(/%{BKY_[A-Z]\\w*}/gi);\n if (m) {\n for (let i = 0; i < m.length; i++) {\n const msgKey = m[i].toUpperCase();\n if (msgTable[msgKey.slice(6, -1)] === undefined) {\n console.warn('No message string for ' + m[i] + ' in ' + message);\n validSoFar = false; // Continue to report other errors.\n }\n }\n }\n\n return validSoFar;\n}\n\n/**\n * Parse a block colour from a number or string, as provided in a block\n * definition.\n *\n * @param colour HSV hue value (0 to 360), #RRGGBB string,\n * or a message reference string pointing to one of those two values.\n * @returns An object containing the colour as\n * a #RRGGBB string, and the hue if the input was an HSV hue value.\n * @throws {Error} If the colour cannot be parsed.\n */\nexport function parseBlockColour(colour: number | string): {\n hue: number | null;\n hex: string;\n} {\n const dereferenced =\n typeof colour === 'string' ? replaceMessageReferences(colour) : colour;\n\n const hue = Number(dereferenced);\n if (!isNaN(hue) && 0 <= hue && hue <= 360) {\n return {\n hue: hue,\n hex: colourUtils.hsvToHex(\n hue,\n colourUtils.getHsvSaturation(),\n colourUtils.getHsvValue() * 255,\n ),\n };\n } else {\n const hex = colourUtils.parse(dereferenced);\n if (hex) {\n // Only store hue if colour is set as a hue.\n return {hue: null, hex: hex};\n } else {\n let errorMsg = 'Invalid colour: \"' + dereferenced + '\"';\n if (colour !== dereferenced) {\n errorMsg += ' (from \"' + colour + '\")';\n }\n throw Error(errorMsg);\n }\n }\n}\n","/**\n * @license\n * Copyright 2022 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport type {Block} from '../block.js';\nimport {IProcedureModel} from './i_procedure_model.js';\n// Former goog.module ID: Blockly.procedures.IProcedureBlock\n\n/** The interface for a block which models a procedure. */\nexport interface IProcedureBlock {\n getProcedureModel(): IProcedureModel;\n doProcedureUpdate(): void;\n isProcedureDef(): boolean;\n}\n\n/** A type guard which checks if the given block is a procedure block. */\nexport function isProcedureBlock(\n block: Block | IProcedureBlock,\n): block is IProcedureBlock {\n return (\n (block as IProcedureBlock).getProcedureModel !== undefined &&\n (block as IProcedureBlock).doProcedureUpdate !== undefined &&\n (block as IProcedureBlock).isProcedureDef !== undefined\n );\n}\n","/**\n * @license\n * Copyright 2022 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\n/**\n * An object that fires events optionally.\n *\n * @internal\n */\nexport interface IObservable {\n startPublishing(): void;\n stopPublishing(): void;\n}\n\n/**\n * Type guard for checking if an object fulfills IObservable.\n *\n * @internal\n */\nexport function isObservable(obj: any): obj is IObservable {\n return obj.startPublishing !== undefined && obj.stopPublishing !== undefined;\n}\n","/**\n * @license\n * Copyright 2019 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\n// Former goog.module ID: Blockly.fieldRegistry\n\nimport type {Field, FieldProto} from './field.js';\nimport * as registry from './registry.js';\n\ninterface RegistryOptions {\n type: string;\n [key: string]: unknown;\n}\n\n/**\n * Registers a field type.\n * fieldRegistry.fromJson uses this registry to\n * find the appropriate field type.\n *\n * @param type The field type name as used in the JSON definition.\n * @param fieldClass The field class containing a fromJson function that can\n * construct an instance of the field.\n * @throws {Error} if the type name is empty, the field is already registered,\n * or the fieldClass is not an object containing a fromJson function.\n */\nexport function register(type: string, fieldClass: FieldProto) {\n registry.register(registry.Type.FIELD, type, fieldClass);\n}\n\n/**\n * Unregisters the field registered with the given type.\n *\n * @param type The field type name as used in the JSON definition.\n */\nexport function unregister(type: string) {\n registry.unregister(registry.Type.FIELD, type);\n}\n\n/**\n * Construct a Field from a JSON arg object.\n * Finds the appropriate registered field by the type name as registered using\n * fieldRegistry.register.\n *\n * @param options A JSON object with a type and options specific to the field\n * type.\n * @returns The new field instance or null if a field wasn't found with the\n * given type name\n * @internal\n */\nexport function fromJson(options: RegistryOptions): Field | null {\n return TEST_ONLY.fromJsonInternal(options);\n}\n\n/**\n * Private version of fromJson for stubbing in tests.\n *\n * @param options\n */\nfunction fromJsonInternal(options: RegistryOptions): Field | null {\n const fieldObject = registry.getObject(registry.Type.FIELD, options.type);\n if (!fieldObject) {\n console.warn(\n 'Blockly could not create a field of type ' +\n options['type'] +\n '. The field is probably not being registered. This could be because' +\n ' the file is not loaded, the field does not register itself (Issue' +\n ' #1584), or the registration is not being reached.',\n );\n return null;\n } else if (typeof (fieldObject as any).fromJson !== 'function') {\n throw new TypeError('returned Field was not a IRegistrableField');\n } else {\n type fromJson = (options: {}) => Field;\n return (fieldObject as unknown as {fromJson: fromJson}).fromJson(options);\n }\n}\n\nexport const TEST_ONLY = {\n fromJsonInternal,\n};\n","/**\n * @license\n * Copyright 2012 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\n/**\n * Dropdown input field. Used for editable titles and variables.\n * In the interests of a consistent UI, the toolbox shares some functions and\n * properties with the context menu.\n *\n * @class\n */\n// Former goog.module ID: Blockly.FieldDropdown\n\nimport type {BlockSvg} from './block_svg.js';\nimport * as dropDownDiv from './dropdowndiv.js';\nimport {\n Field,\n FieldConfig,\n FieldValidator,\n UnattachedFieldError,\n} from './field.js';\nimport * as fieldRegistry from './field_registry.js';\nimport {Menu} from './menu.js';\nimport {MenuItem} from './menuitem.js';\nimport * as style from './utils/style.js';\nimport * as aria from './utils/aria.js';\nimport {Coordinate} from './utils/coordinate.js';\nimport * as dom from './utils/dom.js';\nimport * as parsing from './utils/parsing.js';\nimport * as utilsString from './utils/string.js';\nimport {Svg} from './utils/svg.js';\n\n/**\n * Class for an editable dropdown field.\n */\nexport class FieldDropdown extends Field {\n /** Horizontal distance that a checkmark overhangs the dropdown. */\n static CHECKMARK_OVERHANG = 25;\n\n /**\n * Maximum height of the dropdown menu, as a percentage of the viewport\n * height.\n */\n static MAX_MENU_HEIGHT_VH = 0.45;\n\n static ARROW_CHAR = '▾';\n\n /** A reference to the currently selected menu item. */\n private selectedMenuItem: MenuItem | null = null;\n\n /** The dropdown menu. */\n protected menu_: Menu | null = null;\n\n /**\n * SVG image element if currently selected option is an image, or null.\n */\n private imageElement: SVGImageElement | null = null;\n\n /** Tspan based arrow element. */\n private arrow: SVGTSpanElement | null = null;\n\n /** SVG based arrow element. */\n private svgArrow: SVGElement | null = null;\n\n /**\n * Serializable fields are saved by the serializer, non-serializable fields\n * are not. Editable fields should also be serializable.\n */\n override SERIALIZABLE = true;\n\n /** Mouse cursor style when over the hotspot that initiates the editor. */\n override CURSOR = 'default';\n\n protected menuGenerator_?: MenuGenerator;\n\n /** A cache of the most recently generated options. */\n private generatedOptions: MenuOption[] | null = null;\n\n /**\n * The prefix field label, of common words set after options are trimmed.\n *\n * @internal\n */\n override prefixField: string | null = null;\n\n /**\n * The suffix field label, of common words set after options are trimmed.\n *\n * @internal\n */\n override suffixField: string | null = null;\n // TODO(b/109816955): remove '!', see go/strict-prop-init-fix.\n private selectedOption!: MenuOption;\n override clickTarget_: SVGElement | null = null;\n\n /**\n * @param menuGenerator A non-empty array of options for a dropdown list, or a\n * function which generates these options. Also accepts Field.SKIP_SETUP\n * if you wish to skip setup (only used by subclasses that want to handle\n * configuration and setting the field value after their own constructors\n * have run).\n * @param validator A function that is called to validate changes to the\n * field's value. Takes in a language-neutral dropdown option & returns a\n * validated language-neutral dropdown option, or null to abort the\n * change.\n * @param config A map of options used to configure the field.\n * See the [field creation documentation]{@link\n * https://developers.google.com/blockly/guides/create-custom-blocks/fields/built-in-fields/dropdown#creation}\n * for a list of properties this parameter supports.\n * @throws {TypeError} If `menuGenerator` options are incorrectly structured.\n */\n constructor(\n menuGenerator: MenuGenerator,\n validator?: FieldDropdownValidator,\n config?: FieldDropdownConfig,\n );\n constructor(menuGenerator: typeof Field.SKIP_SETUP);\n constructor(\n menuGenerator: MenuGenerator | typeof Field.SKIP_SETUP,\n validator?: FieldDropdownValidator,\n config?: FieldDropdownConfig,\n ) {\n super(Field.SKIP_SETUP);\n\n // If we pass SKIP_SETUP, don't do *anything* with the menu generator.\n if (menuGenerator === Field.SKIP_SETUP) return;\n\n if (Array.isArray(menuGenerator)) {\n validateOptions(menuGenerator);\n const trimmed = trimOptions(menuGenerator);\n this.menuGenerator_ = trimmed.options;\n this.prefixField = trimmed.prefix || null;\n this.suffixField = trimmed.suffix || null;\n } else {\n this.menuGenerator_ = menuGenerator;\n }\n\n /**\n * The currently selected option. The field is initialized with the\n * first option selected.\n */\n this.selectedOption = this.getOptions(false)[0];\n\n if (config) {\n this.configure_(config);\n }\n this.setValue(this.selectedOption[1]);\n if (validator) {\n this.setValidator(validator);\n }\n }\n\n /**\n * Sets the field's value based on the given XML element. Should only be\n * called by Blockly.Xml.\n *\n * @param fieldElement The element containing info about the field's state.\n * @internal\n */\n override fromXml(fieldElement: Element) {\n if (this.isOptionListDynamic()) {\n this.getOptions(false);\n }\n this.setValue(fieldElement.textContent);\n }\n\n /**\n * Sets the field's value based on the given state.\n *\n * @param state The state to apply to the dropdown field.\n * @internal\n */\n override loadState(state: AnyDuringMigration) {\n if (this.loadLegacyState(FieldDropdown, state)) {\n return;\n }\n if (this.isOptionListDynamic()) {\n this.getOptions(false);\n }\n this.setValue(state);\n }\n\n /**\n * Create the block UI for this dropdown.\n */\n override initView() {\n if (this.shouldAddBorderRect_()) {\n this.createBorderRect_();\n } else {\n this.clickTarget_ = (this.sourceBlock_ as BlockSvg).getSvgRoot();\n }\n this.createTextElement_();\n\n this.imageElement = dom.createSvgElement(Svg.IMAGE, {}, this.fieldGroup_);\n\n if (this.getConstants()!.FIELD_DROPDOWN_SVG_ARROW) {\n this.createSVGArrow_();\n } else {\n this.createTextArrow_();\n }\n\n if (this.borderRect_) {\n dom.addClass(this.borderRect_, 'blocklyDropdownRect');\n }\n }\n\n /**\n * Whether or not the dropdown should add a border rect.\n *\n * @returns True if the dropdown field should add a border rect.\n */\n protected shouldAddBorderRect_(): boolean {\n return (\n !this.getConstants()!.FIELD_DROPDOWN_NO_BORDER_RECT_SHADOW ||\n (this.getConstants()!.FIELD_DROPDOWN_NO_BORDER_RECT_SHADOW &&\n !this.getSourceBlock()?.isShadow())\n );\n }\n\n /** Create a tspan based arrow. */\n protected createTextArrow_() {\n this.arrow = dom.createSvgElement(Svg.TSPAN, {}, this.textElement_);\n this.arrow!.appendChild(\n document.createTextNode(\n this.getSourceBlock()?.RTL\n ? FieldDropdown.ARROW_CHAR + ' '\n : ' ' + FieldDropdown.ARROW_CHAR,\n ),\n );\n if (this.getSourceBlock()?.RTL) {\n this.getTextElement().insertBefore(this.arrow, this.textContent_);\n } else {\n this.getTextElement().appendChild(this.arrow);\n }\n }\n\n /** Create an SVG based arrow. */\n protected createSVGArrow_() {\n this.svgArrow = dom.createSvgElement(\n Svg.IMAGE,\n {\n 'height': this.getConstants()!.FIELD_DROPDOWN_SVG_ARROW_SIZE + 'px',\n 'width': this.getConstants()!.FIELD_DROPDOWN_SVG_ARROW_SIZE + 'px',\n },\n this.fieldGroup_,\n );\n this.svgArrow!.setAttributeNS(\n dom.XLINK_NS,\n 'xlink:href',\n this.getConstants()!.FIELD_DROPDOWN_SVG_ARROW_DATAURI,\n );\n }\n\n /**\n * Create a dropdown menu under the text.\n *\n * @param e Optional mouse event that triggered the field to open, or\n * undefined if triggered programmatically.\n */\n protected override showEditor_(e?: MouseEvent) {\n const block = this.getSourceBlock();\n if (!block) {\n throw new UnattachedFieldError();\n }\n this.dropdownCreate();\n if (e && typeof e.clientX === 'number') {\n this.menu_!.openingCoords = new Coordinate(e.clientX, e.clientY);\n } else {\n this.menu_!.openingCoords = null;\n }\n\n // Remove any pre-existing elements in the dropdown.\n dropDownDiv.clearContent();\n // Element gets created in render.\n const menuElement = this.menu_!.render(dropDownDiv.getContentDiv());\n dom.addClass(menuElement, 'blocklyDropdownMenu');\n\n if (this.getConstants()!.FIELD_DROPDOWN_COLOURED_DIV) {\n const primaryColour = block.isShadow()\n ? block.getParent()!.getColour()\n : block.getColour();\n const borderColour = block.isShadow()\n ? (block.getParent() as BlockSvg).style.colourTertiary\n : (this.sourceBlock_ as BlockSvg).style.colourTertiary;\n dropDownDiv.setColour(primaryColour, borderColour);\n }\n\n dropDownDiv.showPositionedByField(this, this.dropdownDispose_.bind(this));\n\n // Focusing needs to be handled after the menu is rendered and positioned.\n // Otherwise it will cause a page scroll to get the misplaced menu in\n // view. See issue #1329.\n this.menu_!.focus();\n\n if (this.selectedMenuItem) {\n this.menu_!.setHighlighted(this.selectedMenuItem);\n style.scrollIntoContainerView(\n this.selectedMenuItem.getElement()!,\n dropDownDiv.getContentDiv(),\n true,\n );\n }\n\n this.applyColour();\n }\n\n /** Create the dropdown editor. */\n private dropdownCreate() {\n const block = this.getSourceBlock();\n if (!block) {\n throw new UnattachedFieldError();\n }\n const menu = new Menu();\n menu.setRole(aria.Role.LISTBOX);\n this.menu_ = menu;\n\n const options = this.getOptions(false);\n this.selectedMenuItem = null;\n for (let i = 0; i < options.length; i++) {\n const [label, value] = options[i];\n const content = (() => {\n if (typeof label === 'object') {\n // Convert ImageProperties to an HTMLImageElement.\n const image = new Image(label['width'], label['height']);\n image.src = label['src'];\n image.alt = label['alt'] || '';\n return image;\n }\n return label;\n })();\n const menuItem = new MenuItem(content, value);\n menuItem.setRole(aria.Role.OPTION);\n menuItem.setRightToLeft(block.RTL);\n menuItem.setCheckable(true);\n menu.addChild(menuItem);\n menuItem.setChecked(value === this.value_);\n if (value === this.value_) {\n this.selectedMenuItem = menuItem;\n }\n menuItem.onAction(this.handleMenuActionEvent, this);\n }\n }\n\n /**\n * Disposes of events and DOM-references belonging to the dropdown editor.\n */\n protected dropdownDispose_() {\n if (this.menu_) {\n this.menu_.dispose();\n }\n this.menu_ = null;\n this.selectedMenuItem = null;\n this.applyColour();\n }\n\n /**\n * Handle an action in the dropdown menu.\n *\n * @param menuItem The MenuItem selected within menu.\n */\n private handleMenuActionEvent(menuItem: MenuItem) {\n dropDownDiv.hideIfOwner(this, true);\n this.onItemSelected_(this.menu_ as Menu, menuItem);\n }\n\n /**\n * Handle the selection of an item in the dropdown menu.\n *\n * @param menu The Menu component clicked.\n * @param menuItem The MenuItem selected within menu.\n */\n protected onItemSelected_(menu: Menu, menuItem: MenuItem) {\n this.setValue(menuItem.getValue());\n }\n\n /**\n * @returns True if the option list is generated by a function.\n * Otherwise false.\n */\n isOptionListDynamic(): boolean {\n return typeof this.menuGenerator_ === 'function';\n }\n\n /**\n * Return a list of the options for this dropdown.\n *\n * @param useCache For dynamic options, whether or not to use the cached\n * options or to re-generate them.\n * @returns A non-empty array of option tuples:\n * (human-readable text or image, language-neutral name).\n * @throws {TypeError} If generated options are incorrectly structured.\n */\n getOptions(useCache?: boolean): MenuOption[] {\n if (!this.menuGenerator_) {\n // A subclass improperly skipped setup without defining the menu\n // generator.\n throw TypeError('A menu generator was never defined.');\n }\n if (Array.isArray(this.menuGenerator_)) return this.menuGenerator_;\n if (useCache && this.generatedOptions) return this.generatedOptions;\n\n this.generatedOptions = this.menuGenerator_();\n validateOptions(this.generatedOptions);\n return this.generatedOptions;\n }\n\n /**\n * Ensure that the input value is a valid language-neutral option.\n *\n * @param newValue The input value.\n * @returns A valid language-neutral option, or null if invalid.\n */\n protected override doClassValidation_(newValue?: string): string | null {\n const options = this.getOptions(true);\n const isValueValid = options.some((option) => option[1] === newValue);\n\n if (!isValueValid) {\n if (this.sourceBlock_) {\n console.warn(\n \"Cannot set the dropdown's value to an unavailable option.\" +\n ' Block type: ' +\n this.sourceBlock_.type +\n ', Field name: ' +\n this.name +\n ', Value: ' +\n newValue,\n );\n }\n return null;\n }\n return newValue as string;\n }\n\n /**\n * Update the value of this dropdown field.\n *\n * @param newValue The value to be saved. The default validator guarantees\n * that this is one of the valid dropdown options.\n */\n protected override doValueUpdate_(newValue: string) {\n super.doValueUpdate_(newValue);\n const options = this.getOptions(true);\n for (let i = 0, option; (option = options[i]); i++) {\n if (option[1] === this.value_) {\n this.selectedOption = option;\n }\n }\n }\n\n /**\n * Updates the dropdown arrow to match the colour/style of the block.\n */\n override applyColour() {\n const style = (this.sourceBlock_ as BlockSvg).style;\n if (this.borderRect_) {\n this.borderRect_.setAttribute('stroke', style.colourTertiary);\n if (this.menu_) {\n this.borderRect_.setAttribute('fill', style.colourTertiary);\n } else {\n this.borderRect_.setAttribute('fill', 'transparent');\n }\n }\n // Update arrow's colour.\n if (this.sourceBlock_ && this.arrow) {\n if (this.sourceBlock_.isShadow()) {\n this.arrow.style.fill = style.colourSecondary;\n } else {\n this.arrow.style.fill = style.colourPrimary;\n }\n }\n }\n\n /** Draws the border with the correct width. */\n protected override render_() {\n // Hide both elements.\n this.getTextContent().nodeValue = '';\n this.imageElement!.style.display = 'none';\n\n // Show correct element.\n const option = this.selectedOption && this.selectedOption[0];\n if (option && typeof option === 'object') {\n this.renderSelectedImage(option);\n } else {\n this.renderSelectedText();\n }\n\n this.positionBorderRect_();\n }\n\n /**\n * Renders the selected option, which must be an image.\n *\n * @param imageJson Selected option that must be an image.\n */\n private renderSelectedImage(imageJson: ImageProperties) {\n const block = this.getSourceBlock();\n if (!block) {\n throw new UnattachedFieldError();\n }\n this.imageElement!.style.display = '';\n this.imageElement!.setAttributeNS(\n dom.XLINK_NS,\n 'xlink:href',\n imageJson.src,\n );\n this.imageElement!.setAttribute('height', String(imageJson.height));\n this.imageElement!.setAttribute('width', String(imageJson.width));\n\n const imageHeight = Number(imageJson.height);\n const imageWidth = Number(imageJson.width);\n\n // Height and width include the border rect.\n const hasBorder = !!this.borderRect_;\n const height = Math.max(\n hasBorder ? this.getConstants()!.FIELD_DROPDOWN_BORDER_RECT_HEIGHT : 0,\n imageHeight + IMAGE_Y_PADDING,\n );\n const xPadding = hasBorder\n ? this.getConstants()!.FIELD_BORDER_RECT_X_PADDING\n : 0;\n let arrowWidth = 0;\n if (this.svgArrow) {\n arrowWidth = this.positionSVGArrow(\n imageWidth + xPadding,\n height / 2 - this.getConstants()!.FIELD_DROPDOWN_SVG_ARROW_SIZE / 2,\n );\n } else {\n arrowWidth = dom.getFastTextWidth(\n this.arrow as SVGTSpanElement,\n this.getConstants()!.FIELD_TEXT_FONTSIZE,\n this.getConstants()!.FIELD_TEXT_FONTWEIGHT,\n this.getConstants()!.FIELD_TEXT_FONTFAMILY,\n );\n }\n this.size_.width = imageWidth + arrowWidth + xPadding * 2;\n this.size_.height = height;\n\n let arrowX = 0;\n if (block.RTL) {\n const imageX = xPadding + arrowWidth;\n this.imageElement!.setAttribute('x', `${imageX}`);\n } else {\n arrowX = imageWidth + arrowWidth;\n this.getTextElement().setAttribute('text-anchor', 'end');\n this.imageElement!.setAttribute('x', `${xPadding}`);\n }\n this.imageElement!.setAttribute('y', String(height / 2 - imageHeight / 2));\n\n this.positionTextElement_(arrowX + xPadding, imageWidth + arrowWidth);\n }\n\n /** Renders the selected option, which must be text. */\n private renderSelectedText() {\n // Retrieves the selected option to display through getText_.\n this.getTextContent().nodeValue = this.getDisplayText_();\n const textElement = this.getTextElement();\n dom.addClass(textElement, 'blocklyDropdownText');\n textElement.setAttribute('text-anchor', 'start');\n\n // Height and width include the border rect.\n const hasBorder = !!this.borderRect_;\n const height = Math.max(\n hasBorder ? this.getConstants()!.FIELD_DROPDOWN_BORDER_RECT_HEIGHT : 0,\n this.getConstants()!.FIELD_TEXT_HEIGHT,\n );\n const textWidth = dom.getFastTextWidth(\n this.getTextElement(),\n this.getConstants()!.FIELD_TEXT_FONTSIZE,\n this.getConstants()!.FIELD_TEXT_FONTWEIGHT,\n this.getConstants()!.FIELD_TEXT_FONTFAMILY,\n );\n const xPadding = hasBorder\n ? this.getConstants()!.FIELD_BORDER_RECT_X_PADDING\n : 0;\n let arrowWidth = 0;\n if (this.svgArrow) {\n arrowWidth = this.positionSVGArrow(\n textWidth + xPadding,\n height / 2 - this.getConstants()!.FIELD_DROPDOWN_SVG_ARROW_SIZE / 2,\n );\n }\n this.size_.width = textWidth + arrowWidth + xPadding * 2;\n this.size_.height = height;\n\n this.positionTextElement_(xPadding, textWidth);\n }\n\n /**\n * Position a drop-down arrow at the appropriate location at render-time.\n *\n * @param x X position the arrow is being rendered at, in px.\n * @param y Y position the arrow is being rendered at, in px.\n * @returns Amount of space the arrow is taking up, in px.\n */\n private positionSVGArrow(x: number, y: number): number {\n if (!this.svgArrow) {\n return 0;\n }\n const block = this.getSourceBlock();\n if (!block) {\n throw new UnattachedFieldError();\n }\n const hasBorder = !!this.borderRect_;\n const xPadding = hasBorder\n ? this.getConstants()!.FIELD_BORDER_RECT_X_PADDING\n : 0;\n const textPadding = this.getConstants()!.FIELD_DROPDOWN_SVG_ARROW_PADDING;\n const svgArrowSize = this.getConstants()!.FIELD_DROPDOWN_SVG_ARROW_SIZE;\n const arrowX = block.RTL ? xPadding : x + textPadding;\n this.svgArrow.setAttribute(\n 'transform',\n 'translate(' + arrowX + ',' + y + ')',\n );\n return svgArrowSize + textPadding;\n }\n\n /**\n * Use the `getText_` developer hook to override the field's text\n * representation. Get the selected option text. If the selected option is\n * an image we return the image alt text.\n *\n * @returns Selected option text.\n */\n protected override getText_(): string | null {\n if (!this.selectedOption) {\n return null;\n }\n const option = this.selectedOption[0];\n if (typeof option === 'object') {\n return option['alt'];\n }\n return option;\n }\n\n /**\n * Construct a FieldDropdown from a JSON arg object.\n *\n * @param options A JSON object with options (options).\n * @returns The new field instance.\n * @nocollapse\n * @internal\n */\n static fromJson(options: FieldDropdownFromJsonConfig): FieldDropdown {\n if (!options.options) {\n throw new Error(\n 'options are required for the dropdown field. The ' +\n 'options property must be assigned an array of ' +\n '[humanReadableValue, languageNeutralValue] tuples.',\n );\n }\n // `this` might be a subclass of FieldDropdown if that class doesn't\n // override the static fromJson method.\n return new this(options.options, undefined, options);\n }\n}\n\n/**\n * Definition of a human-readable image dropdown option.\n */\nexport interface ImageProperties {\n src: string;\n alt: string;\n width: number;\n height: number;\n}\n\n/**\n * An individual option in the dropdown menu. The first element is the human-\n * readable value (text or image), and the second element is the language-\n * neutral value.\n */\nexport type MenuOption = [string | ImageProperties, string];\n\n/**\n * A function that generates an array of menu options for FieldDropdown\n * or its descendants.\n */\nexport type MenuGeneratorFunction = (this: FieldDropdown) => MenuOption[];\n\n/**\n * Either an array of menu options or a function that generates an array of\n * menu options for FieldDropdown or its descendants.\n */\nexport type MenuGenerator = MenuOption[] | MenuGeneratorFunction;\n\n/**\n * Config options for the dropdown field.\n */\nexport type FieldDropdownConfig = FieldConfig;\n\n/**\n * fromJson config for the dropdown field.\n */\nexport interface FieldDropdownFromJsonConfig extends FieldDropdownConfig {\n options?: MenuOption[];\n}\n\n/**\n * A function that is called to validate changes to the field's value before\n * they are set.\n *\n * @see {@link https://developers.google.com/blockly/guides/create-custom-blocks/fields/validators#return_values}\n * @param newValue The value to be validated.\n * @returns One of three instructions for setting the new value: `T`, `null`,\n * or `undefined`.\n *\n * - `T` to set this function's returned value instead of `newValue`.\n *\n * - `null` to invoke `doValueInvalid_` and not set a value.\n *\n * - `undefined` to set `newValue` as is.\n */\nexport type FieldDropdownValidator = FieldValidator;\n\n/**\n * The y offset from the top of the field to the top of the image, if an image\n * is selected.\n */\nconst IMAGE_Y_OFFSET = 5;\n\n/** The total vertical padding above and below an image. */\nconst IMAGE_Y_PADDING: number = IMAGE_Y_OFFSET * 2;\n\n/**\n * Factor out common words in statically defined options.\n * Create prefix and/or suffix labels.\n */\nfunction trimOptions(options: MenuOption[]): {\n options: MenuOption[];\n prefix?: string;\n suffix?: string;\n} {\n let hasImages = false;\n const trimmedOptions = options.map(([label, value]): MenuOption => {\n if (typeof label === 'string') {\n return [parsing.replaceMessageReferences(label), value];\n }\n\n hasImages = true;\n // Copy the image properties so they're not influenced by the original.\n // NOTE: No need to deep copy since image properties are only 1 level deep.\n const imageLabel =\n label.alt !== null\n ? {...label, alt: parsing.replaceMessageReferences(label.alt)}\n : {...label};\n return [imageLabel, value];\n });\n\n if (hasImages || options.length < 2) return {options: trimmedOptions};\n\n const stringOptions = trimmedOptions as [string, string][];\n const stringLabels = stringOptions.map(([label]) => label);\n\n const shortest = utilsString.shortestStringLength(stringLabels);\n const prefixLength = utilsString.commonWordPrefix(stringLabels, shortest);\n const suffixLength = utilsString.commonWordSuffix(stringLabels, shortest);\n\n if (\n (!prefixLength && !suffixLength) ||\n shortest <= prefixLength + suffixLength\n ) {\n // One or more strings will entirely vanish if we proceed. Abort.\n return {options: stringOptions};\n }\n\n const prefix = prefixLength\n ? stringLabels[0].substring(0, prefixLength - 1)\n : undefined;\n const suffix = suffixLength\n ? stringLabels[0].substr(1 - suffixLength)\n : undefined;\n return {\n options: applyTrim(stringOptions, prefixLength, suffixLength),\n prefix,\n suffix,\n };\n}\n\n/**\n * Use the calculated prefix and suffix lengths to trim all of the options in\n * the given array.\n *\n * @param options Array of option tuples:\n * (human-readable text or image, language-neutral name).\n * @param prefixLength The length of the common prefix.\n * @param suffixLength The length of the common suffix\n * @returns A new array with all of the option text trimmed.\n */\nfunction applyTrim(\n options: [string, string][],\n prefixLength: number,\n suffixLength: number,\n): MenuOption[] {\n return options.map(([text, value]) => [\n text.substring(prefixLength, text.length - suffixLength),\n value,\n ]);\n}\n\n/**\n * Validates the data structure to be processed as an options list.\n *\n * @param options The proposed dropdown options.\n * @throws {TypeError} If proposed options are incorrectly structured.\n */\nfunction validateOptions(options: MenuOption[]) {\n if (!Array.isArray(options)) {\n throw TypeError('FieldDropdown options must be an array.');\n }\n if (!options.length) {\n throw TypeError('FieldDropdown options must not be an empty array.');\n }\n let foundError = false;\n for (let i = 0; i < options.length; i++) {\n const tuple = options[i];\n if (!Array.isArray(tuple)) {\n foundError = true;\n console.error(\n 'Invalid option[' +\n i +\n ']: Each FieldDropdown option must be an ' +\n 'array. Found: ',\n tuple,\n );\n } else if (typeof tuple[1] !== 'string') {\n foundError = true;\n console.error(\n 'Invalid option[' +\n i +\n ']: Each FieldDropdown option id must be ' +\n 'a string. Found ' +\n tuple[1] +\n ' in: ',\n tuple,\n );\n } else if (\n tuple[0] &&\n typeof tuple[0] !== 'string' &&\n typeof tuple[0].src !== 'string'\n ) {\n foundError = true;\n console.error(\n 'Invalid option[' +\n i +\n ']: Each FieldDropdown option must have a ' +\n 'string label or image description. Found' +\n tuple[0] +\n ' in: ',\n tuple,\n );\n }\n }\n if (foundError) {\n throw TypeError('Found invalid FieldDropdown options.');\n }\n}\n\nfieldRegistry.register('field_dropdown', FieldDropdown);\n","/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\n// Former goog.module ID: Blockly.Extensions\n\nimport type {Block} from './block.js';\nimport type {BlockSvg} from './block_svg.js';\nimport {FieldDropdown} from './field_dropdown.js';\nimport {MutatorIcon} from './icons/mutator_icon.js';\nimport * as parsing from './utils/parsing.js';\n\n/** The set of all registered extensions, keyed by extension name/id. */\nconst allExtensions = Object.create(null);\nexport const TEST_ONLY = {allExtensions};\n\n/**\n * Registers a new extension function. Extensions are functions that help\n * initialize blocks, usually adding dynamic behavior such as onchange\n * handlers and mutators. These are applied using Block.applyExtension(), or\n * the JSON \"extensions\" array attribute.\n *\n * @param name The name of this extension.\n * @param initFn The function to initialize an extended block.\n * @throws {Error} if the extension name is empty, the extension is already\n * registered, or extensionFn is not a function.\n */\nexport function register(name: string, initFn: Function) {\n if (typeof name !== 'string' || name.trim() === '') {\n throw Error('Error: Invalid extension name \"' + name + '\"');\n }\n if (allExtensions[name]) {\n throw Error('Error: Extension \"' + name + '\" is already registered.');\n }\n if (typeof initFn !== 'function') {\n throw Error('Error: Extension \"' + name + '\" must be a function');\n }\n allExtensions[name] = initFn;\n}\n\n/**\n * Registers a new extension function that adds all key/value of mixinObj.\n *\n * @param name The name of this extension.\n * @param mixinObj The values to mix in.\n * @throws {Error} if the extension name is empty or the extension is already\n * registered.\n */\nexport function registerMixin(name: string, mixinObj: AnyDuringMigration) {\n if (!mixinObj || typeof mixinObj !== 'object') {\n throw Error('Error: Mixin \"' + name + '\" must be a object');\n }\n register(name, function (this: Block) {\n this.mixin(mixinObj);\n });\n}\n\n/**\n * Registers a new extension function that adds a mutator to the block.\n * At register time this performs some basic sanity checks on the mutator.\n * The wrapper may also add a mutator dialog to the block, if both compose and\n * decompose are defined on the mixin.\n *\n * @param name The name of this mutator extension.\n * @param mixinObj The values to mix in.\n * @param opt_helperFn An optional function to apply after mixing in the object.\n * @param opt_blockList A list of blocks to appear in the flyout of the mutator\n * dialog.\n * @throws {Error} if the mutation is invalid or can't be applied to the block.\n */\nexport function registerMutator(\n name: string,\n mixinObj: AnyDuringMigration,\n opt_helperFn?: () => AnyDuringMigration,\n opt_blockList?: string[],\n) {\n const errorPrefix = 'Error when registering mutator \"' + name + '\": ';\n\n checkHasMutatorProperties(errorPrefix, mixinObj);\n const hasMutatorDialog = checkMutatorDialog(mixinObj, errorPrefix);\n\n if (opt_helperFn && typeof opt_helperFn !== 'function') {\n throw Error(errorPrefix + 'Extension \"' + name + '\" is not a function');\n }\n\n // Sanity checks passed.\n register(name, function (this: Block) {\n if (hasMutatorDialog) {\n this.setMutator(new MutatorIcon(opt_blockList || [], this as BlockSvg));\n }\n // Mixin the object.\n this.mixin(mixinObj);\n\n if (opt_helperFn) {\n opt_helperFn.apply(this);\n }\n });\n}\n\n/**\n * Unregisters the extension registered with the given name.\n *\n * @param name The name of the extension to unregister.\n */\nexport function unregister(name: string) {\n if (isRegistered(name)) {\n delete allExtensions[name];\n } else {\n console.warn(\n 'No extension mapping for name \"' + name + '\" found to unregister',\n );\n }\n}\n\n/**\n * Returns whether an extension is registered with the given name.\n *\n * @param name The name of the extension to check for.\n * @returns True if the extension is registered. False if it is not registered.\n */\nexport function isRegistered(name: string): boolean {\n return !!allExtensions[name];\n}\n\n/**\n * Applies an extension method to a block. This should only be called during\n * block construction.\n *\n * @param name The name of the extension.\n * @param block The block to apply the named extension to.\n * @param isMutator True if this extension defines a mutator.\n * @throws {Error} if the extension is not found.\n */\nexport function apply(name: string, block: Block, isMutator: boolean) {\n const extensionFn = allExtensions[name];\n if (typeof extensionFn !== 'function') {\n throw Error('Error: Extension \"' + name + '\" not found.');\n }\n let mutatorProperties;\n if (isMutator) {\n // Fail early if the block already has mutation properties.\n checkNoMutatorProperties(name, block);\n } else {\n // Record the old properties so we can make sure they don't change after\n // applying the extension.\n mutatorProperties = getMutatorProperties(block);\n }\n extensionFn.apply(block);\n\n if (isMutator) {\n const errorPrefix = 'Error after applying mutator \"' + name + '\": ';\n checkHasMutatorProperties(errorPrefix, block);\n } else {\n if (\n !mutatorPropertiesMatch(mutatorProperties as AnyDuringMigration[], block)\n ) {\n throw Error(\n 'Error when applying extension \"' +\n name +\n '\": ' +\n 'mutation properties changed when applying a non-mutator extension.',\n );\n }\n }\n}\n\n/**\n * Check that the given block does not have any of the four mutator properties\n * defined on it. This function should be called before applying a mutator\n * extension to a block, to make sure we are not overwriting properties.\n *\n * @param mutationName The name of the mutation to reference in error messages.\n * @param block The block to check.\n * @throws {Error} if any of the properties already exist on the block.\n */\nfunction checkNoMutatorProperties(mutationName: string, block: Block) {\n const properties = getMutatorProperties(block);\n if (properties.length) {\n throw Error(\n 'Error: tried to apply mutation \"' +\n mutationName +\n '\" to a block that already has mutator functions.' +\n ' Block id: ' +\n block.id,\n );\n }\n}\n\n/**\n * Checks if the given object has both the 'mutationToDom' and 'domToMutation'\n * functions.\n *\n * @param object The object to check.\n * @param errorPrefix The string to prepend to any error message.\n * @returns True if the object has both functions. False if it has neither\n * function.\n * @throws {Error} if the object has only one of the functions, or either is not\n * actually a function.\n */\nfunction checkXmlHooks(\n object: AnyDuringMigration,\n errorPrefix: string,\n): boolean {\n return checkHasFunctionPair(\n object.mutationToDom,\n object.domToMutation,\n errorPrefix + ' mutationToDom/domToMutation',\n );\n}\n/**\n * Checks if the given object has both the 'saveExtraState' and 'loadExtraState'\n * functions.\n *\n * @param object The object to check.\n * @param errorPrefix The string to prepend to any error message.\n * @returns True if the object has both functions. False if it has neither\n * function.\n * @throws {Error} if the object has only one of the functions, or either is not\n * actually a function.\n */\nfunction checkJsonHooks(\n object: AnyDuringMigration,\n errorPrefix: string,\n): boolean {\n return checkHasFunctionPair(\n object.saveExtraState,\n object.loadExtraState,\n errorPrefix + ' saveExtraState/loadExtraState',\n );\n}\n\n/**\n * Checks if the given object has both the 'compose' and 'decompose' functions.\n *\n * @param object The object to check.\n * @param errorPrefix The string to prepend to any error message.\n * @returns True if the object has both functions. False if it has neither\n * function.\n * @throws {Error} if the object has only one of the functions, or either is not\n * actually a function.\n */\nfunction checkMutatorDialog(\n object: AnyDuringMigration,\n errorPrefix: string,\n): boolean {\n return checkHasFunctionPair(\n object.compose,\n object.decompose,\n errorPrefix + ' compose/decompose',\n );\n}\n\n/**\n * Checks that both or neither of the given functions exist and that they are\n * indeed functions.\n *\n * @param func1 The first function in the pair.\n * @param func2 The second function in the pair.\n * @param errorPrefix The string to prepend to any error message.\n * @returns True if the object has both functions. False if it has neither\n * function.\n * @throws {Error} If the object has only one of the functions, or either is not\n * actually a function.\n */\nfunction checkHasFunctionPair(\n func1: AnyDuringMigration,\n func2: AnyDuringMigration,\n errorPrefix: string,\n): boolean {\n if (func1 && func2) {\n if (typeof func1 !== 'function' || typeof func2 !== 'function') {\n throw Error(errorPrefix + ' must be a function');\n }\n return true;\n } else if (!func1 && !func2) {\n return false;\n }\n throw Error(errorPrefix + 'Must have both or neither functions');\n}\n\n/**\n * Checks that the given object required mutator properties.\n *\n * @param errorPrefix The string to prepend to any error message.\n * @param object The object to inspect.\n */\nfunction checkHasMutatorProperties(\n errorPrefix: string,\n object: AnyDuringMigration,\n) {\n const hasXmlHooks = checkXmlHooks(object, errorPrefix);\n const hasJsonHooks = checkJsonHooks(object, errorPrefix);\n if (!hasXmlHooks && !hasJsonHooks) {\n throw Error(\n errorPrefix +\n 'Mutations must contain either XML hooks, or JSON hooks, or both',\n );\n }\n // A block with a mutator isn't required to have a mutation dialog, but\n // it should still have both or neither of compose and decompose.\n checkMutatorDialog(object, errorPrefix);\n}\n\n/**\n * Get a list of values of mutator properties on the given block.\n *\n * @param block The block to inspect.\n * @returns A list with all of the defined properties, which should be\n * functions, but may be anything other than undefined.\n */\nfunction getMutatorProperties(block: Block): AnyDuringMigration[] {\n const result = [];\n // List each function explicitly by reference to allow for renaming\n // during compilation.\n if (block.domToMutation !== undefined) {\n result.push(block.domToMutation);\n }\n if (block.mutationToDom !== undefined) {\n result.push(block.mutationToDom);\n }\n if (block.saveExtraState !== undefined) {\n result.push(block.saveExtraState);\n }\n if (block.loadExtraState !== undefined) {\n result.push(block.loadExtraState);\n }\n if (block.compose !== undefined) {\n result.push(block.compose);\n }\n if (block.decompose !== undefined) {\n result.push(block.decompose);\n }\n return result;\n}\n\n/**\n * Check that the current mutator properties match a list of old mutator\n * properties. This should be called after applying a non-mutator extension,\n * to verify that the extension didn't change properties it shouldn't.\n *\n * @param oldProperties The old values to compare to.\n * @param block The block to inspect for new values.\n * @returns True if the property lists match.\n */\nfunction mutatorPropertiesMatch(\n oldProperties: AnyDuringMigration[],\n block: Block,\n): boolean {\n const newProperties = getMutatorProperties(block);\n if (newProperties.length !== oldProperties.length) {\n return false;\n }\n for (let i = 0; i < newProperties.length; i++) {\n if (oldProperties[i] !== newProperties[i]) {\n return false;\n }\n }\n return true;\n}\n\n/**\n * Calls a function after the page has loaded, possibly immediately.\n *\n * @param fn Function to run.\n * @throws Error Will throw if no global document can be found (e.g., Node.js).\n * @internal\n */\nexport function runAfterPageLoad(fn: () => void) {\n if (typeof document !== 'object') {\n throw Error('runAfterPageLoad() requires browser document.');\n }\n if (document.readyState === 'complete') {\n fn(); // Page has already loaded. Call immediately.\n } else {\n // Poll readyState.\n const readyStateCheckInterval = setInterval(function () {\n if (document.readyState === 'complete') {\n clearInterval(readyStateCheckInterval);\n fn();\n }\n }, 10);\n }\n}\n\n/**\n * Builds an extension function that will map a dropdown value to a tooltip\n * string.\n *\n * @param dropdownName The name of the field whose value is the key to the\n * lookup table.\n * @param lookupTable The table of field values to tooltip text.\n * @returns The extension function.\n */\nexport function buildTooltipForDropdown(\n dropdownName: string,\n lookupTable: {[key: string]: string},\n): (this: Block) => void {\n // List of block types already validated, to minimize duplicate warnings.\n const blockTypesChecked: string[] = [];\n\n return function (this: Block) {\n if (blockTypesChecked.indexOf(this.type) === -1) {\n checkDropdownOptionsInTable(this, dropdownName, lookupTable);\n blockTypesChecked.push(this.type);\n }\n\n this.setTooltip(\n function (this: Block) {\n const value = String(this.getFieldValue(dropdownName));\n return parsing.replaceMessageReferences(lookupTable[value]);\n }.bind(this),\n );\n };\n}\n\n/**\n * Checks all options keys are present in the provided string lookup table.\n * Emits console warnings when they are not.\n *\n * @param block The block containing the dropdown\n * @param dropdownName The name of the dropdown\n * @param lookupTable The string lookup table\n */\nfunction checkDropdownOptionsInTable(\n block: Block,\n dropdownName: string,\n lookupTable: {[key: string]: string},\n) {\n const dropdown = block.getField(dropdownName);\n if (!(dropdown instanceof FieldDropdown) || dropdown.isOptionListDynamic()) {\n return;\n }\n\n const options = dropdown.getOptions();\n for (const [, key] of options) {\n if (lookupTable[key] === undefined) {\n console.warn(\n `No tooltip mapping for value ${key} of field ` +\n `${dropdownName} of block type ${block.type}.`,\n );\n }\n }\n}\n\n/**\n * Builds an extension function that will install a dynamic tooltip. The\n * tooltip message should include the string '%1' and that string will be\n * replaced with the text of the named field.\n *\n * @param msgTemplate The template form to of the message text, with %1\n * placeholder.\n * @param fieldName The field with the replacement text.\n * @returns The extension function.\n */\nexport function buildTooltipWithFieldText(\n msgTemplate: string,\n fieldName: string,\n): (this: Block) => void {\n return function (this: Block) {\n this.setTooltip(\n function (this: Block) {\n const field = this.getField(fieldName);\n return parsing\n .replaceMessageReferences(msgTemplate)\n .replace('%1', field ? field.getText() : '');\n }.bind(this),\n );\n };\n}\n\n/**\n * Configures the tooltip to mimic the parent block when connected. Otherwise,\n * uses the tooltip text at the time this extension is initialized. This takes\n * advantage of the fact that all other values from JSON are initialized before\n * extensions.\n */\nfunction extensionParentTooltip(this: Block) {\n const tooltipWhenNotConnected = this.tooltip;\n this.setTooltip(\n function (this: Block) {\n const parent = this.getParent();\n return (\n (parent && parent.getInputsInline() && parent.tooltip) ||\n tooltipWhenNotConnected\n );\n }.bind(this),\n );\n}\nregister('parent_tooltip_when_inline', extensionParentTooltip);\n","/**\n * @license\n * Copyright 2019 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\n// Former goog.module ID: Blockly.utils.svgPaths\n\n/**\n * Create a string representing the given x, y pair. It does not matter whether\n * the coordinate is relative or absolute. The result has leading\n * and trailing spaces, and separates the x and y coordinates with a comma but\n * no space.\n *\n * @param x The x coordinate.\n * @param y The y coordinate.\n * @returns A string of the format ' x,y '\n */\nexport function point(x: number, y: number): string {\n return ' ' + x + ',' + y + ' ';\n}\n\n/**\n * Draw a cubic or quadratic curve. See\n * developer.mozilla.org/en-US/docs/Web/SVG/Attribute/d#Cubic_B%C3%A9zier_Curve\n * These coordinates are unitless and hence in the user coordinate system.\n *\n * @param command The command to use.\n * Should be one of: c, C, s, S, q, Q.\n * @param points An array containing all of the points to pass to the curve\n * command, in order. The points are represented as strings of the format '\n * x, y '.\n * @returns A string defining one or more Bezier curves. See the MDN\n * documentation for exact format.\n */\nexport function curve(command: string, points: string[]): string {\n return ' ' + command + points.join('');\n}\n\n/**\n * Move the cursor to the given position without drawing a line.\n * The coordinates are absolute.\n * These coordinates are unitless and hence in the user coordinate system.\n * See developer.mozilla.org/en-US/docs/Web/SVG/Tutorial/Paths#Line_commands\n *\n * @param x The absolute x coordinate.\n * @param y The absolute y coordinate.\n * @returns A string of the format ' M x,y '\n */\nexport function moveTo(x: number, y: number): string {\n return ' M ' + x + ',' + y + ' ';\n}\n\n/**\n * Move the cursor to the given position without drawing a line.\n * Coordinates are relative.\n * These coordinates are unitless and hence in the user coordinate system.\n * See developer.mozilla.org/en-US/docs/Web/SVG/Tutorial/Paths#Line_commands\n *\n * @param dx The relative x coordinate.\n * @param dy The relative y coordinate.\n * @returns A string of the format ' m dx,dy '\n */\nexport function moveBy(dx: number, dy: number): string {\n return ' m ' + dx + ',' + dy + ' ';\n}\n\n/**\n * Draw a line from the current point to the end point, which is the current\n * point shifted by dx along the x-axis and dy along the y-axis.\n * These coordinates are unitless and hence in the user coordinate system.\n * See developer.mozilla.org/en-US/docs/Web/SVG/Tutorial/Paths#Line_commands\n *\n * @param dx The relative x coordinate.\n * @param dy The relative y coordinate.\n * @returns A string of the format ' l dx,dy '\n */\nexport function lineTo(dx: number, dy: number): string {\n return ' l ' + dx + ',' + dy + ' ';\n}\n\n/**\n * Draw multiple lines connecting all of the given points in order. This is\n * equivalent to a series of 'l' commands.\n * These coordinates are unitless and hence in the user coordinate system.\n * See developer.mozilla.org/en-US/docs/Web/SVG/Tutorial/Paths#Line_commands\n *\n * @param points An array containing all of the points to draw lines to, in\n * order. The points are represented as strings of the format ' dx,dy '.\n * @returns A string of the format ' l (dx,dy)+ '\n */\nexport function line(points: string[]): string {\n return ' l' + points.join('');\n}\n\n/**\n * Draw a horizontal or vertical line.\n * The first argument specifies the direction and whether the given position is\n * relative or absolute.\n * These coordinates are unitless and hence in the user coordinate system.\n * See developer.mozilla.org/en-US/docs/Web/SVG/Attribute/d#LineTo_path_commands\n *\n * @param command The command to prepend to the coordinate. This should be one\n * of: V, v, H, h.\n * @param val The coordinate to pass to the command. It may be absolute or\n * relative.\n * @returns A string of the format ' command val '\n */\nexport function lineOnAxis(command: string, val: number): string {\n return ' ' + command + ' ' + val + ' ';\n}\n\n/**\n * Draw an elliptical arc curve.\n * These coordinates are unitless and hence in the user coordinate system.\n * See developer.mozilla.org/en-US/docs/Web/SVG/Attribute/d#Elliptical_Arc_Curve\n *\n * @param command The command string. Either 'a' or 'A'.\n * @param flags The flag string. See the MDN documentation for a description\n * and examples.\n * @param radius The radius of the arc to draw.\n * @param point The point to move the cursor to after drawing the arc, specified\n * either in absolute or relative coordinates depending on the command.\n * @returns A string of the format 'command radius radius flags point'\n */\nexport function arc(\n command: string,\n flags: string,\n radius: number,\n point: string,\n): string {\n return command + ' ' + radius + ' ' + radius + ' ' + flags + point;\n}\n","/**\n * @license\n * Copyright 2023 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport type {Block} from '../block.js';\nimport type {IIcon} from '../interfaces/i_icon.js';\nimport * as registry from '../registry.js';\nimport {IconType} from './icon_types.js';\n\n/**\n * Registers the given icon so that it can be deserialized.\n *\n * @param type The type of the icon to register. This should be the same string\n * that is returned from its `getType` method.\n * @param iconConstructor The icon class/constructor to register.\n */\nexport function register(\n type: IconType,\n iconConstructor: new (block: Block) => IIcon,\n) {\n registry.register(registry.Type.ICON, type.toString(), iconConstructor);\n}\n\n/**\n * Unregisters the icon associated with the given type.\n *\n * @param type The type of the icon to unregister.\n */\nexport function unregister(type: string) {\n registry.unregister(registry.Type.ICON, type);\n}\n","/**\n * @license\n * Copyright 2012 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\n// Former goog.module ID: Blockly.Procedures\n\n// Unused import preserved for side-effects. Remove if unneeded.\nimport './events/events_block_change.js';\n\nimport type {Block} from './block.js';\nimport type {BlockSvg} from './block_svg.js';\nimport {Blocks} from './blocks.js';\nimport * as common from './common.js';\nimport type {Abstract} from './events/events_abstract.js';\nimport type {BubbleOpen} from './events/events_bubble_open.js';\nimport * as eventUtils from './events/utils.js';\nimport {Field, UnattachedFieldError} from './field.js';\nimport {Msg} from './msg.js';\nimport {Names} from './names.js';\nimport {IParameterModel} from './interfaces/i_parameter_model.js';\nimport {IProcedureMap} from './interfaces/i_procedure_map.js';\nimport {IProcedureModel} from './interfaces/i_procedure_model.js';\nimport {\n IProcedureBlock,\n isProcedureBlock,\n} from './interfaces/i_procedure_block.js';\nimport {\n isLegacyProcedureCallBlock,\n isLegacyProcedureDefBlock,\n ProcedureBlock,\n ProcedureTuple,\n} from './interfaces/i_legacy_procedure_blocks.js';\nimport {ObservableProcedureMap} from './observable_procedure_map.js';\nimport * as utilsXml from './utils/xml.js';\nimport * as Variables from './variables.js';\nimport type {Workspace} from './workspace.js';\nimport type {WorkspaceSvg} from './workspace_svg.js';\nimport {MutatorIcon} from './icons.js';\n\n/**\n * String for use in the \"custom\" attribute of a category in toolbox XML.\n * This string indicates that the category should be dynamically populated with\n * procedure blocks.\n * See also Blockly.Variables.CATEGORY_NAME and\n * Blockly.VariablesDynamic.CATEGORY_NAME.\n */\nexport const CATEGORY_NAME = 'PROCEDURE';\n\n/**\n * The default argument for a procedures_mutatorarg block.\n */\nexport const DEFAULT_ARG = 'x';\n\n/**\n * Find all user-created procedure definitions in a workspace.\n *\n * @param root Root workspace.\n * @returns Pair of arrays, the first contains procedures without return\n * variables, the second with. Each procedure is defined by a three-element\n * list of name, parameter list, and return value boolean.\n */\nexport function allProcedures(\n root: Workspace,\n): [ProcedureTuple[], ProcedureTuple[]] {\n const proceduresNoReturn: ProcedureTuple[] = root\n .getProcedureMap()\n .getProcedures()\n .filter((p) => !p.getReturnTypes())\n .map((p) => [\n p.getName(),\n p.getParameters().map((pa) => pa.getName()),\n false,\n ]);\n root.getBlocksByType('procedures_defnoreturn', false).forEach((b) => {\n if (!isProcedureBlock(b) && isLegacyProcedureDefBlock(b)) {\n proceduresNoReturn.push(b.getProcedureDef());\n }\n });\n\n const proceduresReturn: ProcedureTuple[] = root\n .getProcedureMap()\n .getProcedures()\n .filter((p) => !!p.getReturnTypes())\n .map((p) => [\n p.getName(),\n p.getParameters().map((pa) => pa.getName()),\n true,\n ]);\n root.getBlocksByType('procedures_defreturn', false).forEach((b) => {\n if (!isProcedureBlock(b) && isLegacyProcedureDefBlock(b)) {\n proceduresReturn.push(b.getProcedureDef());\n }\n });\n proceduresNoReturn.sort(procTupleComparator);\n proceduresReturn.sort(procTupleComparator);\n return [proceduresNoReturn, proceduresReturn];\n}\n\n/**\n * Comparison function for case-insensitive sorting of the first element of\n * a tuple.\n *\n * @param ta First tuple.\n * @param tb Second tuple.\n * @returns -1, 0, or 1 to signify greater than, equality, or less than.\n */\nfunction procTupleComparator(ta: ProcedureTuple, tb: ProcedureTuple): number {\n return ta[0].localeCompare(tb[0], undefined, {sensitivity: 'base'});\n}\n\n/**\n * Ensure two identically-named procedures don't exist.\n * Take the proposed procedure name, and return a legal name i.e. one that\n * is not empty and doesn't collide with other procedures.\n *\n * @param name Proposed procedure name.\n * @param block Block to disambiguate.\n * @returns Non-colliding name.\n */\nexport function findLegalName(name: string, block: Block): string {\n if (block.isInFlyout) {\n // Flyouts can have multiple procedures called 'do something'.\n return name;\n }\n name = name || Msg['UNNAMED_KEY'] || 'unnamed';\n while (!isLegalName(name, block.workspace, block)) {\n // Collision with another procedure.\n const r = name.match(/^(.*?)(\\d+)$/);\n if (!r) {\n name += '2';\n } else {\n name = r[1] + (parseInt(r[2]) + 1);\n }\n }\n return name;\n}\n/**\n * Does this procedure have a legal name? Illegal names include names of\n * procedures already defined.\n *\n * @param name The questionable name.\n * @param workspace The workspace to scan for collisions.\n * @param opt_exclude Optional block to exclude from comparisons (one doesn't\n * want to collide with oneself).\n * @returns True if the name is legal.\n */\nfunction isLegalName(\n name: string,\n workspace: Workspace,\n opt_exclude?: Block,\n): boolean {\n return !isNameUsed(name, workspace, opt_exclude);\n}\n\n/**\n * Return if the given name is already a procedure name.\n *\n * @param name The questionable name.\n * @param workspace The workspace to scan for collisions.\n * @param opt_exclude Optional block to exclude from comparisons (one doesn't\n * want to collide with oneself).\n * @returns True if the name is used, otherwise return false.\n */\nexport function isNameUsed(\n name: string,\n workspace: Workspace,\n opt_exclude?: Block,\n): boolean {\n for (const block of workspace.getAllBlocks(false)) {\n if (block === opt_exclude) continue;\n\n if (\n isLegacyProcedureDefBlock(block) &&\n Names.equals(block.getProcedureDef()[0], name)\n ) {\n return true;\n }\n }\n\n const excludeModel =\n opt_exclude && isProcedureBlock(opt_exclude)\n ? opt_exclude?.getProcedureModel()\n : undefined;\n for (const model of workspace.getProcedureMap().getProcedures()) {\n if (model === excludeModel) continue;\n if (Names.equals(model.getName(), name)) return true;\n }\n return false;\n}\n\n/**\n * Rename a procedure. Called by the editable field.\n *\n * @param name The proposed new name.\n * @returns The accepted name.\n */\nexport function rename(this: Field, name: string): string {\n const block = this.getSourceBlock();\n if (!block) {\n throw new UnattachedFieldError();\n }\n\n // Strip leading and trailing whitespace. Beyond this, all names are legal.\n name = name.trim();\n\n const legalName = findLegalName(name, block);\n if (isProcedureBlock(block) && !block.isInsertionMarker()) {\n block.getProcedureModel().setName(legalName);\n }\n const oldName = this.getValue();\n if (oldName !== name && oldName !== legalName) {\n // Rename any callers.\n const blocks = block.workspace.getAllBlocks(false);\n for (let i = 0; i < blocks.length; i++) {\n // Assume it is a procedure so we can check.\n const procedureBlock = blocks[i] as unknown as ProcedureBlock;\n if (procedureBlock.renameProcedure) {\n procedureBlock.renameProcedure(oldName as string, legalName);\n }\n }\n }\n return legalName;\n}\n\n/**\n * Construct the blocks required by the flyout for the procedure category.\n *\n * @param workspace The workspace containing procedures.\n * @returns Array of XML block elements.\n */\nexport function flyoutCategory(workspace: WorkspaceSvg): Element[] {\n const xmlList = [];\n if (Blocks['procedures_defnoreturn']) {\n // \n // do something\n // \n const block = utilsXml.createElement('block');\n block.setAttribute('type', 'procedures_defnoreturn');\n block.setAttribute('gap', '16');\n const nameField = utilsXml.createElement('field');\n nameField.setAttribute('name', 'NAME');\n nameField.appendChild(\n utilsXml.createTextNode(Msg['PROCEDURES_DEFNORETURN_PROCEDURE']),\n );\n block.appendChild(nameField);\n xmlList.push(block);\n }\n if (Blocks['procedures_defreturn']) {\n // \n // do something\n // \n const block = utilsXml.createElement('block');\n block.setAttribute('type', 'procedures_defreturn');\n block.setAttribute('gap', '16');\n const nameField = utilsXml.createElement('field');\n nameField.setAttribute('name', 'NAME');\n nameField.appendChild(\n utilsXml.createTextNode(Msg['PROCEDURES_DEFRETURN_PROCEDURE']),\n );\n block.appendChild(nameField);\n xmlList.push(block);\n }\n if (Blocks['procedures_ifreturn']) {\n // \n const block = utilsXml.createElement('block');\n block.setAttribute('type', 'procedures_ifreturn');\n block.setAttribute('gap', '16');\n xmlList.push(block);\n }\n if (xmlList.length) {\n // Add slightly larger gap between system blocks and user calls.\n xmlList[xmlList.length - 1].setAttribute('gap', '24');\n }\n\n /**\n * Add items to xmlList for each listed procedure.\n *\n * @param procedureList A list of procedures, each of which is defined by a\n * three-element list of name, parameter list, and return value boolean.\n * @param templateName The type of the block to generate.\n */\n function populateProcedures(\n procedureList: ProcedureTuple[],\n templateName: string,\n ) {\n for (let i = 0; i < procedureList.length; i++) {\n const name = procedureList[i][0];\n const args = procedureList[i][1];\n // \n // \n // \n // \n // \n const block = utilsXml.createElement('block');\n block.setAttribute('type', templateName);\n block.setAttribute('gap', '16');\n const mutation = utilsXml.createElement('mutation');\n mutation.setAttribute('name', name);\n block.appendChild(mutation);\n for (let j = 0; j < args.length; j++) {\n const arg = utilsXml.createElement('arg');\n arg.setAttribute('name', args[j]);\n mutation.appendChild(arg);\n }\n xmlList.push(block);\n }\n }\n\n const tuple = allProcedures(workspace);\n populateProcedures(tuple[0], 'procedures_callnoreturn');\n populateProcedures(tuple[1], 'procedures_callreturn');\n return xmlList;\n}\n\n/**\n * Updates the procedure mutator's flyout so that the arg block is not a\n * duplicate of another arg.\n *\n * @param workspace The procedure mutator's workspace. This workspace's flyout\n * is what is being updated.\n */\nfunction updateMutatorFlyout(workspace: WorkspaceSvg) {\n const usedNames = [];\n const blocks = workspace.getBlocksByType('procedures_mutatorarg', false);\n for (let i = 0, block; (block = blocks[i]); i++) {\n usedNames.push(block.getFieldValue('NAME'));\n }\n\n const xmlElement = utilsXml.createElement('xml');\n const argBlock = utilsXml.createElement('block');\n argBlock.setAttribute('type', 'procedures_mutatorarg');\n const nameField = utilsXml.createElement('field');\n nameField.setAttribute('name', 'NAME');\n const argValue = Variables.generateUniqueNameFromOptions(\n DEFAULT_ARG,\n usedNames,\n );\n const fieldContent = utilsXml.createTextNode(argValue);\n\n nameField.appendChild(fieldContent);\n argBlock.appendChild(nameField);\n xmlElement.appendChild(argBlock);\n\n workspace.updateToolbox(xmlElement);\n}\n\n/**\n * Listens for when a procedure mutator is opened. Then it triggers a flyout\n * update and adds a mutator change listener to the mutator workspace.\n *\n * @param e The event that triggered this listener.\n * @internal\n */\nexport function mutatorOpenListener(e: Abstract) {\n if (e.type !== eventUtils.BUBBLE_OPEN) {\n return;\n }\n const bubbleEvent = e as BubbleOpen;\n if (\n !(bubbleEvent.bubbleType === 'mutator' && bubbleEvent.isOpen) ||\n !bubbleEvent.blockId\n ) {\n return;\n }\n const workspaceId = bubbleEvent.workspaceId;\n const block = common\n .getWorkspaceById(workspaceId)!\n .getBlockById(bubbleEvent.blockId) as BlockSvg;\n const type = block.type;\n if (type !== 'procedures_defnoreturn' && type !== 'procedures_defreturn') {\n return;\n }\n const workspace = (\n block.getIcon(MutatorIcon.TYPE) as MutatorIcon\n ).getWorkspace()!;\n updateMutatorFlyout(workspace);\n workspace.addChangeListener(mutatorChangeListener);\n}\n/**\n * Listens for changes in a procedure mutator and triggers flyout updates when\n * necessary.\n *\n * @param e The event that triggered this listener.\n */\nfunction mutatorChangeListener(e: Abstract) {\n if (\n e.type !== eventUtils.BLOCK_CREATE &&\n e.type !== eventUtils.BLOCK_DELETE &&\n e.type !== eventUtils.BLOCK_CHANGE &&\n e.type !== eventUtils.BLOCK_FIELD_INTERMEDIATE_CHANGE\n ) {\n return;\n }\n const workspaceId = e.workspaceId as string;\n const workspace = common.getWorkspaceById(workspaceId) as WorkspaceSvg;\n updateMutatorFlyout(workspace);\n}\n\n/**\n * Find all the callers of a named procedure.\n *\n * @param name Name of procedure.\n * @param workspace The workspace to find callers in.\n * @returns Array of caller blocks.\n */\nexport function getCallers(name: string, workspace: Workspace): Block[] {\n return workspace.getAllBlocks(false).filter((block) => {\n return (\n blockIsModernCallerFor(block, name) ||\n (isLegacyProcedureCallBlock(block) &&\n Names.equals(block.getProcedureCall(), name))\n );\n });\n}\n\n/**\n * @returns True if the given block is a modern-style caller block of the given\n * procedure name.\n */\nfunction blockIsModernCallerFor(block: Block, procName: string): boolean {\n return (\n isProcedureBlock(block) &&\n !block.isProcedureDef() &&\n block.getProcedureModel() &&\n Names.equals(block.getProcedureModel().getName(), procName)\n );\n}\n\n/**\n * When a procedure definition changes its parameters, find and edit all its\n * callers.\n *\n * @param defBlock Procedure definition block.\n */\nexport function mutateCallers(defBlock: Block) {\n const oldRecordUndo = eventUtils.getRecordUndo();\n const procedureBlock = defBlock as unknown as ProcedureBlock;\n const name = procedureBlock.getProcedureDef()[0];\n const xmlElement = defBlock.mutationToDom!(true);\n const callers = getCallers(name, defBlock.workspace);\n for (let i = 0, caller; (caller = callers[i]); i++) {\n const oldMutationDom = caller.mutationToDom!();\n const oldMutation = oldMutationDom && utilsXml.domToText(oldMutationDom);\n if (caller.domToMutation) {\n caller.domToMutation(xmlElement);\n }\n const newMutationDom = caller.mutationToDom!();\n const newMutation = newMutationDom && utilsXml.domToText(newMutationDom);\n if (oldMutation !== newMutation) {\n // Fire a mutation on every caller block. But don't record this as an\n // undo action since it is deterministically tied to the procedure's\n // definition mutation.\n eventUtils.setRecordUndo(false);\n eventUtils.fire(\n new (eventUtils.get(eventUtils.BLOCK_CHANGE))(\n caller,\n 'mutation',\n null,\n oldMutation,\n newMutation,\n ),\n );\n eventUtils.setRecordUndo(oldRecordUndo);\n }\n }\n}\n\n/**\n * Find the definition block for the named procedure.\n *\n * @param name Name of procedure.\n * @param workspace The workspace to search.\n * @returns The procedure definition block, or null not found.\n */\nexport function getDefinition(\n name: string,\n workspace: Workspace,\n): Block | null {\n // Do not assume procedure is a top block. Some languages allow nested\n // procedures. Also do not assume it is one of the built-in blocks. Only\n // rely on isProcedureDef and getProcedureDef.\n for (const block of workspace.getAllBlocks(false)) {\n if (\n isProcedureBlock(block) &&\n block.isProcedureDef() &&\n Names.equals(block.getProcedureModel().getName(), name)\n ) {\n return block;\n }\n if (\n isLegacyProcedureDefBlock(block) &&\n Names.equals(block.getProcedureDef()[0], name)\n ) {\n return block;\n }\n }\n return null;\n}\n\nexport {\n ObservableProcedureMap,\n IParameterModel,\n IProcedureBlock,\n isProcedureBlock,\n IProcedureMap,\n IProcedureModel,\n ProcedureTuple,\n};\n","/**\n * @license\n * Copyright 2019 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\n// Former goog.module ID: Blockly.blockRendering.ConstantProvider\n\nimport {ConnectionType} from '../../connection_type.js';\nimport type {RenderedConnection} from '../../rendered_connection.js';\nimport type {BlockStyle, Theme} from '../../theme.js';\nimport * as colour from '../../utils/colour.js';\nimport * as dom from '../../utils/dom.js';\nimport * as parsing from '../../utils/parsing.js';\nimport {Svg} from '../../utils/svg.js';\nimport * as svgPaths from '../../utils/svg_paths.js';\n\n/** An object containing sizing and path information about outside corners. */\nexport interface OutsideCorners {\n topLeft: string;\n topRight: string;\n bottomRight: string;\n bottomLeft: string;\n rightHeight: number;\n}\n\n/** An object containing sizing and path information about inside corners. */\nexport interface InsideCorners {\n width: number;\n height: number;\n pathTop: string;\n pathBottom: string;\n}\n\n/** An object containing sizing and path information about a start hat. */\nexport interface StartHat {\n height: number;\n width: number;\n path: string;\n}\n\n/** An object containing sizing and path information about a notch. */\nexport interface Notch {\n type: number;\n width: number;\n height: number;\n pathLeft: string;\n pathRight: string;\n}\n\n/** An object containing sizing and path information about a puzzle tab. */\nexport interface PuzzleTab {\n type: number;\n width: number;\n height: number;\n pathDown: string | ((p1: number) => string);\n pathUp: string | ((p1: number) => string);\n}\n\n/**\n * An object containing sizing and path information about collapsed block\n * indicators.\n */\nexport interface JaggedTeeth {\n height: number;\n width: number;\n path: string;\n}\n\nexport type BaseShape = {\n type: number;\n width: number;\n height: number;\n};\n\n/** An object containing sizing and type information about a dynamic shape. */\nexport type DynamicShape = {\n type: number;\n width: (p1: number) => number;\n height: (p1: number) => number;\n isDynamic: true;\n connectionOffsetY: (p1: number) => number;\n connectionOffsetX: (p1: number) => number;\n pathDown: (p1: number) => string;\n pathUp: (p1: number) => string;\n pathRightDown: (p1: number) => string;\n pathRightUp: (p1: number) => string;\n};\n\n/** An object containing sizing and type information about a shape. */\nexport type Shape = BaseShape | DynamicShape;\n\n/**\n * Returns whether the shape is dynamic or not.\n *\n * @param shape The shape to check for dynamic-ness.\n * @returns Whether the shape is a dynamic shape or not.\n */\nexport function isDynamicShape(shape: Shape): shape is DynamicShape {\n return (shape as DynamicShape).isDynamic;\n}\n\n/**\n * An object that provides constants for rendering blocks.\n */\nexport class ConstantProvider {\n /** The size of an empty spacer. */\n NO_PADDING = 0;\n\n /** The size of small padding. */\n SMALL_PADDING = 3;\n\n /** The size of medium padding. */\n MEDIUM_PADDING = 5;\n\n /** The size of medium-large padding. */\n MEDIUM_LARGE_PADDING = 8;\n\n /** The size of large padding. */\n LARGE_PADDING = 10;\n TALL_INPUT_FIELD_OFFSET_Y: number;\n\n /** The height of the puzzle tab used for input and output connections. */\n TAB_HEIGHT = 15;\n\n /**\n * The offset from the top of the block at which a puzzle tab is positioned.\n */\n TAB_OFFSET_FROM_TOP = 5;\n\n /**\n * Vertical overlap of the puzzle tab, used to make it look more like a\n * puzzle piece.\n */\n TAB_VERTICAL_OVERLAP = 2.5;\n\n /** The width of the puzzle tab used for input and output connections. */\n TAB_WIDTH = 8;\n\n /** The width of the notch used for previous and next connections. */\n NOTCH_WIDTH = 15;\n\n /** The height of the notch used for previous and next connections. */\n NOTCH_HEIGHT = 4;\n\n /** The minimum width of the block. */\n MIN_BLOCK_WIDTH = 12;\n EMPTY_BLOCK_SPACER_HEIGHT = 16;\n DUMMY_INPUT_MIN_HEIGHT: number;\n DUMMY_INPUT_SHADOW_MIN_HEIGHT: number;\n\n /** Rounded corner radius. */\n CORNER_RADIUS = 8;\n\n /**\n * Offset from the left side of a block or the inside of a statement input\n * to the left side of the notch.\n */\n NOTCH_OFFSET_LEFT = 15;\n STATEMENT_INPUT_NOTCH_OFFSET: number;\n\n STATEMENT_BOTTOM_SPACER = 0;\n STATEMENT_INPUT_PADDING_LEFT = 20;\n\n /** Vertical padding between consecutive statement inputs. */\n BETWEEN_STATEMENT_PADDING_Y = 4;\n TOP_ROW_MIN_HEIGHT: number;\n TOP_ROW_PRECEDES_STATEMENT_MIN_HEIGHT: number;\n BOTTOM_ROW_MIN_HEIGHT: number;\n BOTTOM_ROW_AFTER_STATEMENT_MIN_HEIGHT: number;\n\n /**\n * Whether to add a 'hat' on top of all blocks with no previous or output\n * connections. Can be overridden by 'hat' property on Theme.BlockStyle.\n */\n ADD_START_HATS = false;\n\n /** Height of the top hat. */\n START_HAT_HEIGHT = 15;\n\n /** Width of the top hat. */\n START_HAT_WIDTH = 100;\n\n SPACER_DEFAULT_HEIGHT = 15;\n\n MIN_BLOCK_HEIGHT = 24;\n\n EMPTY_INLINE_INPUT_PADDING = 14.5;\n EMPTY_INLINE_INPUT_HEIGHT: number;\n\n EXTERNAL_VALUE_INPUT_PADDING = 2;\n EMPTY_STATEMENT_INPUT_HEIGHT: number;\n START_POINT: string;\n\n /** Height of SVG path for jagged teeth at the end of collapsed blocks. */\n JAGGED_TEETH_HEIGHT = 12;\n\n /** Width of SVG path for jagged teeth at the end of collapsed blocks. */\n JAGGED_TEETH_WIDTH = 6;\n\n /** Point size of text. */\n FIELD_TEXT_FONTSIZE = 11;\n\n /** Text font weight. */\n FIELD_TEXT_FONTWEIGHT = 'normal';\n\n /** Text font family. */\n FIELD_TEXT_FONTFAMILY = 'sans-serif';\n\n /**\n * Height of text. This constant is dynamically set in\n * `setFontConstants_` to be the height of the text based on the font\n * used.\n */\n FIELD_TEXT_HEIGHT = -1; // Dynamically set.\n\n /**\n * Text baseline. This constant is dynamically set in `setFontConstants_`\n * to be the baseline of the text based on the font used.\n */\n FIELD_TEXT_BASELINE = -1; // Dynamically set.\n\n /** A field's border rect corner radius. */\n FIELD_BORDER_RECT_RADIUS = 4;\n\n /** A field's border rect default height. */\n FIELD_BORDER_RECT_HEIGHT = 16;\n\n /** A field's border rect X padding. */\n FIELD_BORDER_RECT_X_PADDING = 5;\n\n /** A field's border rect Y padding. */\n FIELD_BORDER_RECT_Y_PADDING = 3;\n\n /**\n * The backing colour of a field's border rect.\n */\n FIELD_BORDER_RECT_COLOUR = '#fff';\n FIELD_TEXT_BASELINE_CENTER: boolean;\n FIELD_DROPDOWN_BORDER_RECT_HEIGHT: number;\n\n /**\n * Whether or not a dropdown field should add a border rect when in a shadow\n * block.\n */\n FIELD_DROPDOWN_NO_BORDER_RECT_SHADOW = false;\n\n /**\n * Whether or not a dropdown field's div should be coloured to match the\n * block colours.\n */\n FIELD_DROPDOWN_COLOURED_DIV = false;\n\n /** Whether or not a dropdown field uses a text or SVG arrow. */\n FIELD_DROPDOWN_SVG_ARROW = false;\n FIELD_DROPDOWN_SVG_ARROW_PADDING: number;\n\n /** A dropdown field's SVG arrow size. */\n FIELD_DROPDOWN_SVG_ARROW_SIZE = 12;\n FIELD_DROPDOWN_SVG_ARROW_DATAURI: string;\n\n /**\n * Whether or not to show a box shadow around the widget div. This is only a\n * feature of full block fields.\n */\n FIELD_TEXTINPUT_BOX_SHADOW = false;\n\n /**\n * Whether or not the colour field should display its colour value on the\n * entire block.\n */\n FIELD_COLOUR_FULL_BLOCK = false;\n\n /** A colour field's default width. */\n FIELD_COLOUR_DEFAULT_WIDTH = 26;\n FIELD_COLOUR_DEFAULT_HEIGHT: number;\n FIELD_CHECKBOX_X_OFFSET: number;\n randomIdentifier: string;\n\n /**\n * The defs tag that contains all filters and patterns for this Blockly\n * instance.\n */\n private defs: SVGElement | null = null;\n\n /**\n * The ID of the emboss filter, or the empty string if no filter is set.\n */\n embossFilterId = '';\n\n /** The element to use for highlighting, or null if not set. */\n private embossFilter: SVGElement | null = null;\n\n /**\n * The ID of the disabled pattern, or the empty string if no pattern is set.\n */\n disabledPatternId = '';\n\n /**\n * The element to use for disabled blocks, or null if not set.\n */\n private disabledPattern: SVGElement | null = null;\n\n /**\n * The ID of the debug filter, or the empty string if no pattern is set.\n */\n debugFilterId = '';\n\n /**\n * The element to use for a debug highlight, or null if not set.\n */\n private debugFilter: SVGElement | null = null;\n\n /** The +{% endblock pluginstyles %} +{% block pluginscripts %} + + + + + + + + + + + + + +{% endblock pluginscripts %} +{% block content %} + +{% include "logics_blockly_toolbox.html" %} @@ -76,26 +93,4 @@

      Blockly {{ _('Logik-Editor') }} {{ _('für SmartHomeNG') }}
      
         
       
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
       {% endblock %}
      
      From 40ad4038ff4e3875a5a7ac8bd5b92fae10ca5f09 Mon Sep 17 00:00:00 2001
      From: Onkel Andy 
      Date: Wed, 25 Oct 2023 18:15:57 +0200
      Subject: [PATCH 31/41] blockly plugin: load language in blockly based on shng
       language
      
      ---
       blockly/webif/__init__.py                      | 5 ++++-
       blockly/webif/static/js/logics_blockly_code.js | 2 +-
       2 files changed, 5 insertions(+), 2 deletions(-)
      
      diff --git a/blockly/webif/__init__.py b/blockly/webif/__init__.py
      index 6755d8874..d48bfe62d 100755
      --- a/blockly/webif/__init__.py
      +++ b/blockly/webif/__init__.py
      @@ -113,6 +113,7 @@ def index_html(self, cmd='', filename='', logicname='', v=0):
                   self.logic_filename = filename
                   self.logicname = logicname
               self.logger.info("index_html: self.logicname = '{}', self.logic_filename = '{}'".format(self.logicname, self.logic_filename))
      +        language = self._sh.get_defaultlanguage()
       
               tmpl = self.tplenv.get_template('blockly.html')
               return tmpl.render(smarthome=self._sh,
      @@ -120,6 +121,7 @@ def index_html(self, cmd='', filename='', logicname='', v=0):
                                  dyn_sh_toolbox=self._DynToolbox(self._sh),
                                  cmd=self.cmd,
                                  logicname=logicname,
      +                           lang=language,
                                  timestamp=str(time.time()))
       
       
      @@ -148,7 +150,7 @@ def edit_html(self, cmd='', filename='', logicname='', v=0):
                   self.logic_filename = filename
                   self.logicname = logicname
               self.logger.info("edit_html: self.logicname = '{}', self.logic_filename = '{}'".format(self.logicname, self.logic_filename))
      -
      +        language = self._sh.get_defaultlanguage()
       
               tmpl = self.tplenv.get_template('blockly.html')
               return tmpl.render(smarthome=self._sh,
      @@ -156,6 +158,7 @@ def edit_html(self, cmd='', filename='', logicname='', v=0):
                                  dyn_sh_toolbox=self._DynToolbox(self._sh),
                                  cmd=self.cmd,
                                  logicname=logicname,
      +                           lang=language,
                                  timestamp=str(time.time()))
       
       
      diff --git a/blockly/webif/static/js/logics_blockly_code.js b/blockly/webif/static/js/logics_blockly_code.js
      index 0950d63bc..8490e26e0 100755
      --- a/blockly/webif/static/js/logics_blockly_code.js
      +++ b/blockly/webif/static/js/logics_blockly_code.js
      @@ -1,3 +1,4 @@
      +
       /**
        * Create a namespace for the application.
        */
      @@ -74,7 +75,6 @@ Code.saveBlocks = function() {
         if (topblock.data == "sh_logic_main") {
             logicname = Code.workspace.getTopBlocks()[0].getFieldValue('LOGIC_NAME')
         };
      -  //Code.workspace;
         var pycode = Blockly.Python.workspaceToCode(Code.workspace);
         var xmldom = Blockly.Xml.workspaceToDom(Code.workspace);
         var xmltxt = Blockly.utils.xml.domToText(xmldom);
      
      From f191836f182cb753f6fcb013a8fd03c4e968b0a8 Mon Sep 17 00:00:00 2001
      From: Onkel Andy 
      Date: Wed, 25 Oct 2023 20:39:14 +0200
      Subject: [PATCH 32/41] blockly plugin: put 1.4.0 version as a backup in the
       folder
      
      ---
       .../How_to_Update_Blockly_Components.rst      |    20 +
       blockly/_pv_1_4_0/README.md                   |    26 +
       blockly/_pv_1_4_0/__init__.py                 |   528 +
       blockly/_pv_1_4_0/locale/de.json              |    17 +
       blockly/_pv_1_4_0/locale/en.json              |    17 +
       blockly/_pv_1_4_0/locale/fr.json              |    17 +
       blockly/_pv_1_4_0/locale/pl.json              |    17 +
       blockly/_pv_1_4_0/plugin.yaml                 |    45 +
       blockly/_pv_1_4_0/tests/__init__.py           |     0
       blockly/_pv_1_4_0/tests/cptestcase.py         |   102 +
       .../tests/test_backend_blocklylogics.py       |   116 +
       blockly/_pv_1_4_0/utils.py                    |   235 +
       .../_pv_1_4_0/webif/static/blockly/LICENSE    |   202 +
       .../_pv_1_4_0/webif/static/blockly/README.md  |    56 +
       .../static/blockly/blockly_compressed.js      |  1229 ++
       .../webif/static/blockly/blocks_compressed.js |   172 +
       blockly/_pv_1_4_0/webif/static/blockly/de.js  |   433 +
       blockly/_pv_1_4_0/webif/static/blockly/en.js  |   433 +
       blockly/_pv_1_4_0/webif/static/blockly/fr.js  |   433 +
       .../webif/static/blockly/media/1x1.gif        |   Bin 0 -> 43 bytes
       .../webif/static/blockly/media/click.mp3      |   Bin 0 -> 2304 bytes
       .../webif/static/blockly/media/click.ogg      |   Bin 0 -> 4865 bytes
       .../webif/static/blockly/media/click.wav      |   Bin 0 -> 3782 bytes
       .../webif/static/blockly/media/delete.mp3     |   Bin 0 -> 3123 bytes
       .../webif/static/blockly/media/delete.ogg     |   Bin 0 -> 5731 bytes
       .../webif/static/blockly/media/delete.wav     |   Bin 0 -> 9164 bytes
       .../webif/static/blockly/media/disconnect.mp3 |   Bin 0 -> 1586 bytes
       .../webif/static/blockly/media/disconnect.ogg |   Bin 0 -> 4404 bytes
       .../webif/static/blockly/media/disconnect.wav |   Bin 0 -> 1492 bytes
       .../webif/static/blockly/media/handclosed.cur |   Bin 0 -> 326 bytes
       .../webif/static/blockly/media/handdelete.cur |   Bin 0 -> 766 bytes
       .../webif/static/blockly/media/handopen.cur   |   Bin 0 -> 198 bytes
       .../webif/static/blockly/media/pilcrow.png    |   Bin 0 -> 1010 bytes
       .../webif/static/blockly/media/quote0.png     |   Bin 0 -> 771 bytes
       .../webif/static/blockly/media/quote1.png     |   Bin 0 -> 738 bytes
       .../webif/static/blockly/media/sprites.png    |   Bin 0 -> 2595 bytes
       .../webif/static/blockly/media/sprites.svg    |    74 +
       blockly/_pv_1_4_0/webif/static/blockly/pl.js  |   433 +
       .../webif/static/blockly/python_compressed.js |    86 +
       .../_pv_1_4_0/webif/static/blockly/style.css  |   164 +
       .../webif/static/css/bootstrap-reload.css     |    20 +
       .../webif/static/css/bootstrap-theme.css      |   587 +
       .../webif/static/css/bootstrap-theme.css.map  |     1 +
       .../webif/static/css/bootstrap-theme.min.css  |     6 +
       .../static/css/bootstrap-theme.min.css.map    |     1 +
       .../webif/static/css/bootstrap-treeview.css   |    37 +
       .../static/css/bootstrap-treeview.min.css     |     1 +
       .../_pv_1_4_0/webif/static/css/bootstrap.css  |  6757 ++++++++++
       .../webif/static/css/bootstrap.css.map        |     1 +
       .../webif/static/css/bootstrap.min.css        |     6 +
       .../webif/static/css/bootstrap.min.css.map    |     1 +
       .../webif/static/css/font-awesome.css         |  2337 ++++
       .../webif/static/css/font-awesome.min.css     |     4 +
       .../webif/static/fonts/FontAwesome.otf        |   Bin 0 -> 134808 bytes
       .../static/fonts/fontawesome-webfont.eot      |   Bin 0 -> 165742 bytes
       .../static/fonts/fontawesome-webfont.svg      |  2671 ++++
       .../static/fonts/fontawesome-webfont.ttf      |   Bin 0 -> 165548 bytes
       .../static/fonts/fontawesome-webfont.woff     |   Bin 0 -> 98024 bytes
       .../static/fonts/fontawesome-webfont.woff2    |   Bin 0 -> 77160 bytes
       .../fonts/glyphicons-halflings-regular.eot    |   Bin 0 -> 20127 bytes
       .../fonts/glyphicons-halflings-regular.svg    |   288 +
       .../fonts/glyphicons-halflings-regular.ttf    |   Bin 0 -> 45404 bytes
       .../fonts/glyphicons-halflings-regular.woff   |   Bin 0 -> 23424 bytes
       .../fonts/glyphicons-halflings-regular.woff2  |   Bin 0 -> 18028 bytes
       .../_pv_1_4_0/webif/static/img/favicon.ico    |   Bin 0 -> 26166 bytes
       .../_pv_1_4_0/webif/static/img/logo_big.png   |   Bin 0 -> 19632 bytes
       .../_pv_1_4_0/webif/static/img/logo_long.png  |   Bin 0 -> 3508 bytes
       .../webif/static/img/logo_small_120x120.png   |   Bin 0 -> 5134 bytes
       .../webif/static/img/logo_small_152x152.png   |   Bin 0 -> 6289 bytes
       .../webif/static/img/logo_small_32x32.png     |   Bin 0 -> 1330 bytes
       .../webif/static/img/logo_small_76x76.png     |   Bin 0 -> 3323 bytes
       .../webif/static/js/bootstrap-reload.js       |    68 +
       .../webif/static/js/bootstrap-reload.min.js   |     1 +
       .../webif/static/js/bootstrap-treeview.js     |  1249 ++
       .../webif/static/js/bootstrap-treeview.min.js |     1 +
       .../_pv_1_4_0/webif/static/js/bootstrap.js    |  2377 ++++
       .../webif/static/js/bootstrap.min.js          |     7 +
       .../static/js/google-prettify/lang-aea.js     |    18 +
       .../static/js/google-prettify/lang-agc.js     |    18 +
       .../static/js/google-prettify/lang-apollo.js  |    18 +
       .../static/js/google-prettify/lang-basic.js   |    18 +
       .../static/js/google-prettify/lang-cbm.js     |    18 +
       .../static/js/google-prettify/lang-cl.js      |    18 +
       .../static/js/google-prettify/lang-clj.js     |    17 +
       .../static/js/google-prettify/lang-css.js     |    18 +
       .../static/js/google-prettify/lang-dart.js    |    19 +
       .../static/js/google-prettify/lang-el.js      |    18 +
       .../static/js/google-prettify/lang-erl.js     |    18 +
       .../static/js/google-prettify/lang-erlang.js  |    18 +
       .../static/js/google-prettify/lang-fs.js      |    18 +
       .../static/js/google-prettify/lang-go.js      |    17 +
       .../static/js/google-prettify/lang-hs.js      |    18 +
       .../static/js/google-prettify/lang-lasso.js   |    19 +
       .../js/google-prettify/lang-lassoscript.js    |    19 +
       .../static/js/google-prettify/lang-latex.js   |    17 +
       .../static/js/google-prettify/lang-lgt.js     |    18 +
       .../static/js/google-prettify/lang-lisp.js    |    18 +
       .../static/js/google-prettify/lang-ll.js      |    17 +
       .../static/js/google-prettify/lang-llvm.js    |    17 +
       .../static/js/google-prettify/lang-logtalk.js |    18 +
       .../static/js/google-prettify/lang-ls.js      |    19 +
       .../static/js/google-prettify/lang-lsp.js     |    18 +
       .../static/js/google-prettify/lang-lua.js     |    18 +
       .../static/js/google-prettify/lang-matlab.js  |    29 +
       .../static/js/google-prettify/lang-ml.js      |    18 +
       .../static/js/google-prettify/lang-mumps.js   |    18 +
       .../webif/static/js/google-prettify/lang-n.js |    19 +
       .../static/js/google-prettify/lang-nemerle.js |    19 +
       .../static/js/google-prettify/lang-pascal.js  |    18 +
       .../static/js/google-prettify/lang-proto.js   |    17 +
       .../webif/static/js/google-prettify/lang-r.js |    18 +
       .../static/js/google-prettify/lang-rd.js      |    17 +
       .../static/js/google-prettify/lang-rkt.js     |    18 +
       .../static/js/google-prettify/lang-rust.js    |    20 +
       .../webif/static/js/google-prettify/lang-s.js |    18 +
       .../static/js/google-prettify/lang-scala.js   |    18 +
       .../static/js/google-prettify/lang-scm.js     |    18 +
       .../static/js/google-prettify/lang-splus.js   |    18 +
       .../static/js/google-prettify/lang-sql.js     |    18 +
       .../static/js/google-prettify/lang-ss.js      |    18 +
       .../static/js/google-prettify/lang-swift.js   |    18 +
       .../static/js/google-prettify/lang-tcl.js     |    18 +
       .../static/js/google-prettify/lang-tex.js     |    17 +
       .../static/js/google-prettify/lang-vb.js      |    19 +
       .../static/js/google-prettify/lang-vbs.js     |    19 +
       .../static/js/google-prettify/lang-vhd.js     |    19 +
       .../static/js/google-prettify/lang-vhdl.js    |    19 +
       .../static/js/google-prettify/lang-wiki.js    |    18 +
       .../static/js/google-prettify/lang-xq.js      |    19 +
       .../static/js/google-prettify/lang-xquery.js  |    19 +
       .../static/js/google-prettify/lang-yaml.js    |    18 +
       .../static/js/google-prettify/lang-yml.js     |    18 +
       .../static/js/google-prettify/prettify.css    |     1 +
       .../static/js/google-prettify/prettify.js     |    46 +
       .../static/js/google-prettify/run_prettify.js |    63 +
       .../js/google-prettify/skins/desert.css       |     1 +
       .../static/js/google-prettify/skins/doxy.css  |     1 +
       .../skins/sons-of-obsidian.css                |     1 +
       .../js/google-prettify/skins/sunburst.css     |     1 +
       .../_pv_1_4_0/webif/static/js/jquery-3.2.1.js | 10253 ++++++++++++++++
       .../webif/static/js/jquery-3.2.1.min.js       |     4 +
       .../webif/static/js/logics_blockly_code.js    |   254 +
       blockly/_pv_1_4_0/webif/static/js/npm.js      |    13 +
       .../webif/static/shblocks/sh_items.js         |   211 +
       .../webif/static/shblocks/sh_logic.js         |   117 +
       .../webif/static/shblocks/sh_logics.js        |   476 +
       .../webif/static/shblocks/sh_notify.js        |    95 +
       .../webif/static/shblocks/sh_time.js          |   123 +
       .../webif/static/shblocks/sh_tools.js         |   115 +
       blockly/_pv_1_4_0/webif/templates/base.html   |    57 +
       .../_pv_1_4_0/webif/templates/blockly.html    |   108 +
       .../templates/logics_blockly_toolbox.html     |   292 +
       blockly/_pv_1_4_0/webif/templates/new.blockly |     1 +
       153 files changed, 34516 insertions(+)
       create mode 100755 blockly/_pv_1_4_0/How_to_Update_Blockly_Components.rst
       create mode 100755 blockly/_pv_1_4_0/README.md
       create mode 100755 blockly/_pv_1_4_0/__init__.py
       create mode 100755 blockly/_pv_1_4_0/locale/de.json
       create mode 100755 blockly/_pv_1_4_0/locale/en.json
       create mode 100755 blockly/_pv_1_4_0/locale/fr.json
       create mode 100755 blockly/_pv_1_4_0/locale/pl.json
       create mode 100755 blockly/_pv_1_4_0/plugin.yaml
       create mode 100755 blockly/_pv_1_4_0/tests/__init__.py
       create mode 100755 blockly/_pv_1_4_0/tests/cptestcase.py
       create mode 100755 blockly/_pv_1_4_0/tests/test_backend_blocklylogics.py
       create mode 100755 blockly/_pv_1_4_0/utils.py
       create mode 100755 blockly/_pv_1_4_0/webif/static/blockly/LICENSE
       create mode 100755 blockly/_pv_1_4_0/webif/static/blockly/README.md
       create mode 100755 blockly/_pv_1_4_0/webif/static/blockly/blockly_compressed.js
       create mode 100755 blockly/_pv_1_4_0/webif/static/blockly/blocks_compressed.js
       create mode 100755 blockly/_pv_1_4_0/webif/static/blockly/de.js
       create mode 100755 blockly/_pv_1_4_0/webif/static/blockly/en.js
       create mode 100755 blockly/_pv_1_4_0/webif/static/blockly/fr.js
       create mode 100755 blockly/_pv_1_4_0/webif/static/blockly/media/1x1.gif
       create mode 100755 blockly/_pv_1_4_0/webif/static/blockly/media/click.mp3
       create mode 100755 blockly/_pv_1_4_0/webif/static/blockly/media/click.ogg
       create mode 100755 blockly/_pv_1_4_0/webif/static/blockly/media/click.wav
       create mode 100755 blockly/_pv_1_4_0/webif/static/blockly/media/delete.mp3
       create mode 100755 blockly/_pv_1_4_0/webif/static/blockly/media/delete.ogg
       create mode 100755 blockly/_pv_1_4_0/webif/static/blockly/media/delete.wav
       create mode 100755 blockly/_pv_1_4_0/webif/static/blockly/media/disconnect.mp3
       create mode 100755 blockly/_pv_1_4_0/webif/static/blockly/media/disconnect.ogg
       create mode 100755 blockly/_pv_1_4_0/webif/static/blockly/media/disconnect.wav
       create mode 100755 blockly/_pv_1_4_0/webif/static/blockly/media/handclosed.cur
       create mode 100755 blockly/_pv_1_4_0/webif/static/blockly/media/handdelete.cur
       create mode 100755 blockly/_pv_1_4_0/webif/static/blockly/media/handopen.cur
       create mode 100755 blockly/_pv_1_4_0/webif/static/blockly/media/pilcrow.png
       create mode 100755 blockly/_pv_1_4_0/webif/static/blockly/media/quote0.png
       create mode 100755 blockly/_pv_1_4_0/webif/static/blockly/media/quote1.png
       create mode 100755 blockly/_pv_1_4_0/webif/static/blockly/media/sprites.png
       create mode 100755 blockly/_pv_1_4_0/webif/static/blockly/media/sprites.svg
       create mode 100755 blockly/_pv_1_4_0/webif/static/blockly/pl.js
       create mode 100755 blockly/_pv_1_4_0/webif/static/blockly/python_compressed.js
       create mode 100755 blockly/_pv_1_4_0/webif/static/blockly/style.css
       create mode 100755 blockly/_pv_1_4_0/webif/static/css/bootstrap-reload.css
       create mode 100755 blockly/_pv_1_4_0/webif/static/css/bootstrap-theme.css
       create mode 100755 blockly/_pv_1_4_0/webif/static/css/bootstrap-theme.css.map
       create mode 100755 blockly/_pv_1_4_0/webif/static/css/bootstrap-theme.min.css
       create mode 100755 blockly/_pv_1_4_0/webif/static/css/bootstrap-theme.min.css.map
       create mode 100755 blockly/_pv_1_4_0/webif/static/css/bootstrap-treeview.css
       create mode 100755 blockly/_pv_1_4_0/webif/static/css/bootstrap-treeview.min.css
       create mode 100755 blockly/_pv_1_4_0/webif/static/css/bootstrap.css
       create mode 100755 blockly/_pv_1_4_0/webif/static/css/bootstrap.css.map
       create mode 100755 blockly/_pv_1_4_0/webif/static/css/bootstrap.min.css
       create mode 100755 blockly/_pv_1_4_0/webif/static/css/bootstrap.min.css.map
       create mode 100755 blockly/_pv_1_4_0/webif/static/css/font-awesome.css
       create mode 100755 blockly/_pv_1_4_0/webif/static/css/font-awesome.min.css
       create mode 100755 blockly/_pv_1_4_0/webif/static/fonts/FontAwesome.otf
       create mode 100755 blockly/_pv_1_4_0/webif/static/fonts/fontawesome-webfont.eot
       create mode 100755 blockly/_pv_1_4_0/webif/static/fonts/fontawesome-webfont.svg
       create mode 100755 blockly/_pv_1_4_0/webif/static/fonts/fontawesome-webfont.ttf
       create mode 100755 blockly/_pv_1_4_0/webif/static/fonts/fontawesome-webfont.woff
       create mode 100755 blockly/_pv_1_4_0/webif/static/fonts/fontawesome-webfont.woff2
       create mode 100755 blockly/_pv_1_4_0/webif/static/fonts/glyphicons-halflings-regular.eot
       create mode 100755 blockly/_pv_1_4_0/webif/static/fonts/glyphicons-halflings-regular.svg
       create mode 100755 blockly/_pv_1_4_0/webif/static/fonts/glyphicons-halflings-regular.ttf
       create mode 100755 blockly/_pv_1_4_0/webif/static/fonts/glyphicons-halflings-regular.woff
       create mode 100755 blockly/_pv_1_4_0/webif/static/fonts/glyphicons-halflings-regular.woff2
       create mode 100755 blockly/_pv_1_4_0/webif/static/img/favicon.ico
       create mode 100755 blockly/_pv_1_4_0/webif/static/img/logo_big.png
       create mode 100755 blockly/_pv_1_4_0/webif/static/img/logo_long.png
       create mode 100755 blockly/_pv_1_4_0/webif/static/img/logo_small_120x120.png
       create mode 100755 blockly/_pv_1_4_0/webif/static/img/logo_small_152x152.png
       create mode 100755 blockly/_pv_1_4_0/webif/static/img/logo_small_32x32.png
       create mode 100755 blockly/_pv_1_4_0/webif/static/img/logo_small_76x76.png
       create mode 100755 blockly/_pv_1_4_0/webif/static/js/bootstrap-reload.js
       create mode 100755 blockly/_pv_1_4_0/webif/static/js/bootstrap-reload.min.js
       create mode 100755 blockly/_pv_1_4_0/webif/static/js/bootstrap-treeview.js
       create mode 100755 blockly/_pv_1_4_0/webif/static/js/bootstrap-treeview.min.js
       create mode 100755 blockly/_pv_1_4_0/webif/static/js/bootstrap.js
       create mode 100755 blockly/_pv_1_4_0/webif/static/js/bootstrap.min.js
       create mode 100755 blockly/_pv_1_4_0/webif/static/js/google-prettify/lang-aea.js
       create mode 100755 blockly/_pv_1_4_0/webif/static/js/google-prettify/lang-agc.js
       create mode 100755 blockly/_pv_1_4_0/webif/static/js/google-prettify/lang-apollo.js
       create mode 100755 blockly/_pv_1_4_0/webif/static/js/google-prettify/lang-basic.js
       create mode 100755 blockly/_pv_1_4_0/webif/static/js/google-prettify/lang-cbm.js
       create mode 100755 blockly/_pv_1_4_0/webif/static/js/google-prettify/lang-cl.js
       create mode 100755 blockly/_pv_1_4_0/webif/static/js/google-prettify/lang-clj.js
       create mode 100755 blockly/_pv_1_4_0/webif/static/js/google-prettify/lang-css.js
       create mode 100755 blockly/_pv_1_4_0/webif/static/js/google-prettify/lang-dart.js
       create mode 100755 blockly/_pv_1_4_0/webif/static/js/google-prettify/lang-el.js
       create mode 100755 blockly/_pv_1_4_0/webif/static/js/google-prettify/lang-erl.js
       create mode 100755 blockly/_pv_1_4_0/webif/static/js/google-prettify/lang-erlang.js
       create mode 100755 blockly/_pv_1_4_0/webif/static/js/google-prettify/lang-fs.js
       create mode 100755 blockly/_pv_1_4_0/webif/static/js/google-prettify/lang-go.js
       create mode 100755 blockly/_pv_1_4_0/webif/static/js/google-prettify/lang-hs.js
       create mode 100755 blockly/_pv_1_4_0/webif/static/js/google-prettify/lang-lasso.js
       create mode 100755 blockly/_pv_1_4_0/webif/static/js/google-prettify/lang-lassoscript.js
       create mode 100755 blockly/_pv_1_4_0/webif/static/js/google-prettify/lang-latex.js
       create mode 100755 blockly/_pv_1_4_0/webif/static/js/google-prettify/lang-lgt.js
       create mode 100755 blockly/_pv_1_4_0/webif/static/js/google-prettify/lang-lisp.js
       create mode 100755 blockly/_pv_1_4_0/webif/static/js/google-prettify/lang-ll.js
       create mode 100755 blockly/_pv_1_4_0/webif/static/js/google-prettify/lang-llvm.js
       create mode 100755 blockly/_pv_1_4_0/webif/static/js/google-prettify/lang-logtalk.js
       create mode 100755 blockly/_pv_1_4_0/webif/static/js/google-prettify/lang-ls.js
       create mode 100755 blockly/_pv_1_4_0/webif/static/js/google-prettify/lang-lsp.js
       create mode 100755 blockly/_pv_1_4_0/webif/static/js/google-prettify/lang-lua.js
       create mode 100755 blockly/_pv_1_4_0/webif/static/js/google-prettify/lang-matlab.js
       create mode 100755 blockly/_pv_1_4_0/webif/static/js/google-prettify/lang-ml.js
       create mode 100755 blockly/_pv_1_4_0/webif/static/js/google-prettify/lang-mumps.js
       create mode 100755 blockly/_pv_1_4_0/webif/static/js/google-prettify/lang-n.js
       create mode 100755 blockly/_pv_1_4_0/webif/static/js/google-prettify/lang-nemerle.js
       create mode 100755 blockly/_pv_1_4_0/webif/static/js/google-prettify/lang-pascal.js
       create mode 100755 blockly/_pv_1_4_0/webif/static/js/google-prettify/lang-proto.js
       create mode 100755 blockly/_pv_1_4_0/webif/static/js/google-prettify/lang-r.js
       create mode 100755 blockly/_pv_1_4_0/webif/static/js/google-prettify/lang-rd.js
       create mode 100755 blockly/_pv_1_4_0/webif/static/js/google-prettify/lang-rkt.js
       create mode 100755 blockly/_pv_1_4_0/webif/static/js/google-prettify/lang-rust.js
       create mode 100755 blockly/_pv_1_4_0/webif/static/js/google-prettify/lang-s.js
       create mode 100755 blockly/_pv_1_4_0/webif/static/js/google-prettify/lang-scala.js
       create mode 100755 blockly/_pv_1_4_0/webif/static/js/google-prettify/lang-scm.js
       create mode 100755 blockly/_pv_1_4_0/webif/static/js/google-prettify/lang-splus.js
       create mode 100755 blockly/_pv_1_4_0/webif/static/js/google-prettify/lang-sql.js
       create mode 100755 blockly/_pv_1_4_0/webif/static/js/google-prettify/lang-ss.js
       create mode 100755 blockly/_pv_1_4_0/webif/static/js/google-prettify/lang-swift.js
       create mode 100755 blockly/_pv_1_4_0/webif/static/js/google-prettify/lang-tcl.js
       create mode 100755 blockly/_pv_1_4_0/webif/static/js/google-prettify/lang-tex.js
       create mode 100755 blockly/_pv_1_4_0/webif/static/js/google-prettify/lang-vb.js
       create mode 100755 blockly/_pv_1_4_0/webif/static/js/google-prettify/lang-vbs.js
       create mode 100755 blockly/_pv_1_4_0/webif/static/js/google-prettify/lang-vhd.js
       create mode 100755 blockly/_pv_1_4_0/webif/static/js/google-prettify/lang-vhdl.js
       create mode 100755 blockly/_pv_1_4_0/webif/static/js/google-prettify/lang-wiki.js
       create mode 100755 blockly/_pv_1_4_0/webif/static/js/google-prettify/lang-xq.js
       create mode 100755 blockly/_pv_1_4_0/webif/static/js/google-prettify/lang-xquery.js
       create mode 100755 blockly/_pv_1_4_0/webif/static/js/google-prettify/lang-yaml.js
       create mode 100755 blockly/_pv_1_4_0/webif/static/js/google-prettify/lang-yml.js
       create mode 100755 blockly/_pv_1_4_0/webif/static/js/google-prettify/prettify.css
       create mode 100755 blockly/_pv_1_4_0/webif/static/js/google-prettify/prettify.js
       create mode 100755 blockly/_pv_1_4_0/webif/static/js/google-prettify/run_prettify.js
       create mode 100755 blockly/_pv_1_4_0/webif/static/js/google-prettify/skins/desert.css
       create mode 100755 blockly/_pv_1_4_0/webif/static/js/google-prettify/skins/doxy.css
       create mode 100755 blockly/_pv_1_4_0/webif/static/js/google-prettify/skins/sons-of-obsidian.css
       create mode 100755 blockly/_pv_1_4_0/webif/static/js/google-prettify/skins/sunburst.css
       create mode 100755 blockly/_pv_1_4_0/webif/static/js/jquery-3.2.1.js
       create mode 100755 blockly/_pv_1_4_0/webif/static/js/jquery-3.2.1.min.js
       create mode 100755 blockly/_pv_1_4_0/webif/static/js/logics_blockly_code.js
       create mode 100755 blockly/_pv_1_4_0/webif/static/js/npm.js
       create mode 100755 blockly/_pv_1_4_0/webif/static/shblocks/sh_items.js
       create mode 100755 blockly/_pv_1_4_0/webif/static/shblocks/sh_logic.js
       create mode 100755 blockly/_pv_1_4_0/webif/static/shblocks/sh_logics.js
       create mode 100755 blockly/_pv_1_4_0/webif/static/shblocks/sh_notify.js
       create mode 100755 blockly/_pv_1_4_0/webif/static/shblocks/sh_time.js
       create mode 100755 blockly/_pv_1_4_0/webif/static/shblocks/sh_tools.js
       create mode 100755 blockly/_pv_1_4_0/webif/templates/base.html
       create mode 100755 blockly/_pv_1_4_0/webif/templates/blockly.html
       create mode 100755 blockly/_pv_1_4_0/webif/templates/logics_blockly_toolbox.html
       create mode 100755 blockly/_pv_1_4_0/webif/templates/new.blockly
      
      diff --git a/blockly/_pv_1_4_0/How_to_Update_Blockly_Components.rst b/blockly/_pv_1_4_0/How_to_Update_Blockly_Components.rst
      new file mode 100755
      index 000000000..a22ac16f2
      --- /dev/null
      +++ b/blockly/_pv_1_4_0/How_to_Update_Blockly_Components.rst
      @@ -0,0 +1,20 @@
      +How to Update Blockly with latest files
      +=======================================
      +
      +It is possible to download a whole zip directory from github at https://github.com/google/blockly/zipball/master
      +
      +From the content of the zip directory only a few files are needed for operation:
      +
      +* blockly_compressed.js
      +* blocks_compressed.js
      +* python_compressed.js
      +* demos/code/style.css
      +* msg/js/de.js
      +* msg/js/en.js
      +* msg/js/fr.js  ...  and other languages as well if needed
      +* LICENSE
      +* README.md
      +
      +need to be put directly and plain into ``plugins/blockly/webif/static/blockly`` directory
      +
      +The ``media`` directory needs to be copied in full to the same directory
      \ No newline at end of file
      diff --git a/blockly/_pv_1_4_0/README.md b/blockly/_pv_1_4_0/README.md
      new file mode 100755
      index 000000000..d9d1e6e3b
      --- /dev/null
      +++ b/blockly/_pv_1_4_0/README.md
      @@ -0,0 +1,26 @@
      +# Blockly Logic Editor (beyond shNG v1.3)
      +
      +## Requirements
      +
      +This plugin is running under Python >= 3.4 as well as the libs cherrypy and jinja2. You can install them with:
      +```
      +(sudo apt-get install python-cherrypy)
      +sudo pip3 install cherrypy
      +(sudo apt-get install python-jinja2)
      +sudo pip3 install jinja2
      +```
      +
      +And please pay attention that the libs are installed for Python3 and not an older Python 2.7 that is probably installed on your system.
      +
      +> Note: This plugin needs the SmartHomeNG loadable module `http` to be installed/configured.
      +
      +
      +## Configuration
      +
      +### plugin.yaml
      +
      +```yaml
      +# /etc/plugin.yaml
      +Blockly:
      +    plugin_name: blockly
      +```
      diff --git a/blockly/_pv_1_4_0/__init__.py b/blockly/_pv_1_4_0/__init__.py
      new file mode 100755
      index 000000000..3545337ea
      --- /dev/null
      +++ b/blockly/_pv_1_4_0/__init__.py
      @@ -0,0 +1,528 @@
      +#!/usr/bin/env python3
      +# -*- coding: utf8 -*-
      +#########################################################################
      +# Copyright 2016-       Martin Sinn                         m.sinn@gmx.de
      +#                       René Frieß                  rene.friess@gmail.com
      +#                       Dirk Wallmeier                dirk@wallmeier.info
      +#########################################################################
      +#  Blockly plugin for SmartHomeNG
      +#
      +#  This plugin is free software: you can redistribute it and/or modify
      +#  it under the terms of the GNU General Public License as published by
      +#  the Free Software Foundation, either version 3 of the License, or
      +#  (at your option) any later version.
      +#
      +#  This plugin is distributed in the hope that it will be useful,
      +#  but WITHOUT ANY WARRANTY; without even the implied warranty of
      +#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
      +#  GNU General Public License for more details.
      +#
      +#  You should have received a copy of the GNU General Public License
      +#  along with this plugin. If not, see .
      +#########################################################################
      +
      +import logging
      +import socket
      +import time
      +
      +import collections
      +import ast
      +
      +import lib.config
      +from lib.model.smartplugin import SmartPlugin
      +from lib.utils import Utils
      +from lib.module import Modules
      +from lib.logic import Logics          # für update der /etc/logic.yaml
      +from lib.logic import Logic           # für reload (bytecode)
      +#import lib.logic as logics
      +
      +from .utils import *
      +
      +import lib.shyaml as shyaml
      +#from lib.constants import (YAML_FILE, CONF_FILE)
      +
      +
      +class Blockly(SmartPlugin):
      +    """
      +    Main class of the Plugin. Does all plugin specific stuff and provides
      +    the update functions for the items
      +    """
      +    
      +    PLUGIN_VERSION='1.4.0'
      +
      +
      +    def __init__(self, sh, *args, **kwargs):
      +        """
      +        Initalizes the plugin. The parameters describe for this method are pulled from the entry in plugin.conf.
      +
      +        :param sh:  **Deprecated**: The instance of the smarthome object. For SmartHomeNG versions **beyond** 1.3: **Don't use it**! Use the method self.get_sh() instead
      +        """
      +#        self.logger = SmartPluginLogger(__name__, self)
      +        self.logger = logging.getLogger(__name__)
      +        self.logger.debug('Blockly.__init__')
      +        
      +        # attention:
      +        # if your plugin runs standalone, sh will likely be None so do not rely on it later or check it within your code
      +        
      +#        self._init_complete = False
      +#        return
      +
      +        # Initialization code goes here
      +
      +        self.init_webinterface()
      +
      +
      +    def run(self):
      +        """
      +        Run method for the plugin
      +        """        
      +        self.logger.debug("Plugin '{}': run method called".format(self.get_shortname()))
      +        self.alive = True
      +        # if you want to create child threads, do not make them daemon = True!
      +        # They will not shutdown properly. (It's a python bug)
      +
      +
      +    def stop(self):
      +        """
      +        Stop method for the plugin
      +        """
      +        self.logger.debug("Plugin '{}': stop method called".format(self.get_shortname()))
      +        self.alive = False
      +
      +
      +    def parse_item(self, item):
      +        """
      +        Default plugin parse_item method. Is called when the plugin is initialized.
      +        The plugin can, corresponding to its attribute keywords, decide what to do with
      +        the item in future, like adding it to an internal array for future reference
      +        :param item:    The item to process.
      +        :return:        If the plugin needs to be informed of an items change you should return a call back function
      +                        like the function update_item down below. An example when this is needed is the knx plugin
      +                        where parse_item returns the update_item function when the attribute knx_send is found.
      +                        This means that when the items value is about to be updated, the call back function is called
      +                        with the item, caller, source and dest as arguments and in case of the knx plugin the value
      +                        can be sent to the knx with a knx write function within the knx plugin.
      +        """
      +        if self.has_iattr(item.conf, 'foo_itemtag'):
      +            self.logger.debug("Plugin '{}': parse item: {}".format(self.get_shortname(), item))
      +
      +        # todo
      +        # if interesting item for sending values:
      +        #   return update_item
      +
      +
      +    def parse_logic(self, logic):
      +        """
      +        Default plugin parse_logic method
      +        """
      +        if 'xxx' in logic.conf:
      +            # self.function(logic['name'])
      +            pass
      +
      +
      +    def update_item(self, item, caller=None, source=None, dest=None):
      +        """
      +        Write items values
      +        :param item: item to be updated towards the plugin
      +        :param caller: if given it represents the callers name
      +        :param source: if given it represents the source
      +        :param dest: if given it represents the dest
      +        """
      +        # todo 
      +        # change 'foo_itemtag' into your attribute name
      +        if item():
      +            if self.has_iattr(item.conf, 'foo_itemtag'):
      +                self.logger.debug("Plugin '{}': update_item ws called with item '{}' from caller '{}', source '{}' and dest '{}'".format(self.get_shortname(), item, caller, source, dest))
      +            pass
      +
      +        # PLEASE CHECK CODE HERE. The following was in the old skeleton.py and seems not to be 
      +        # valid any more 
      +        # # todo here: change 'plugin' to the plugin name
      +        # if caller != 'plugin':  
      +        #    logger.info("update item: {0}".format(item.id()))
      +
      +
      +    def init_webinterface(self):
      +        """"
      +        Initialize the web interface for this plugin
      +
      +        This method is only needed if the plugin is implementing a web interface
      +        """
      +        try:
      +            self.mod_http = Modules.get_instance().get_module('http')   # try/except to handle running in a core version that does not support modules
      +        except:
      +             self.mod_http = None
      +        if self.mod_http == None:
      +            self.logger.error("Plugin '{}': Not initializing the web interface".format(self.get_shortname()))
      +            return False
      +        
      +        # set application configuration for cherrypy
      +        webif_dir = self.path_join(self.get_plugin_dir(), 'webif')
      +        config = {
      +            '/': {
      +                'tools.staticdir.root': webif_dir,
      +            },
      +            '/static': {
      +                'tools.staticdir.on': True,
      +                'tools.staticdir.dir': 'static'
      +            }
      +        }
      +        
      +        # Register the web interface as a cherrypy app
      +        self.mod_http.register_webif(WebInterface(webif_dir, self), 
      +                                     self.get_shortname(), 
      +                                     config, 
      +                                     self.get_classname(), self.get_instance_name(),
      +                                     description='Blockly graphical logics editor for SmartHomeNG',
      +                                     webifname='')
      +                                   
      +        return True
      +
      +
      +# ------------------------------------------
      +#    Webinterface of the plugin
      +# ------------------------------------------
      +
      +import cherrypy
      +from cherrypy.lib.static import serve_file
      +from jinja2 import Environment, FileSystemLoader
      +
      +class WebInterface:
      +
      +    logics = None
      +
      +    logicname = ''
      +    logic_filename = ''
      +    cmd = ''
      +    edit_redirect = ''
      +    
      +    def __init__(self, webif_dir, plugin):
      +        """
      +        Initialization of instance of class WebInterface
      +        
      +        :param webif_dir: directory where the webinterface of the plugin resides
      +        :param plugin: instance of the plugin
      +        :type webif_dir: str
      +        :type plugin: object
      +        """
      +        self.logger = logging.getLogger(__name__)
      +        self.webif_dir = webif_dir
      +        self.plugininstance = plugin
      +        self._sh = self.plugininstance.get_sh()
      +        self._sh_dir = self._sh.base_dir
      +        self._section_prefix = self.plugininstance._parameters.get('section_prefix','')
      +        self.logger.debug("WebInterface: section_prefix = {}".format(self._section_prefix))
      +
      +        self.logger.info('Blockly Webif.__init__')
      +
      +        self.tplenv = Environment(loader=FileSystemLoader(self.plugininstance.path_join( self.webif_dir, 'templates' ) ))
      +        self.tplenv.globals['_'] = translate
      +        
      +        self.logicname = ''
      +        self.logic_filename = ''
      +
      +
      +    def html_escape(self, str):
      +        return html_escape(str)
      +
      +
      +    @cherrypy.expose
      +    def index(self):
      +
      +        return self.index_html()
      +
      +
      +#     @cherrypy.expose
      +#     def index_html(self, cmd='', filename='', logicname='', v=0):
      +# 
      +#         self.cmd = cmd.lower()
      +#         self.logger.info("index_html: cmd = {}, filename = {}, logicname = {}".format(cmd, filename, logicname))
      +#         if self.cmd == '':
      +#             self.logic_filename = ''
      +#             self.logicname = ''
      +#         elif self.cmd == 'new':
      +#             self.logic_filename = 'new'
      +#             self.logicname = ''
      +#         elif self.cmd == 'edit':
      +#             self.logic_filename = filename
      +#             self.logicname = logicname
      +#         
      +#         language = self._sh.get_defaultlanguage()
      +#         if language != get_translation_lang():
      +#             self.logger.debug("Blockly: Language = '{}' get_translation_lang() = '{}'".format(language,get_translation_lang()))
      +#             if not load_translation(language):
      +#                 self.logger.warning("Blockly: Language '{}' not found, using standard language instead".format(language))
      +# 
      +#         tmpl = self.tplenv.get_template('blockly.html')
      +#         return tmpl.render(smarthome=self._sh,
      +#                            dyn_sh_toolbox=self._DynToolbox(self._sh), 
      +#                            cmd=self.cmd,
      +#                            logicname=logicname,
      +#                            lang=translation_lang)
      +
      +
      +    @cherrypy.expose
      +    def index_html(self, cmd='', filename='', logicname='', v=0):
      +
      +        self.logger.info("index_html: cmd = '{}', filename = '{}', logicname = '{}'".format(cmd, filename, logicname))
      +        if self.edit_redirect != '':
      +            self.edit_html(cmd='edit', logicname=self.edit_redirect)
      +
      +        if self.logics is None:
      +            self.logics = Logics.get_instance()
      +
      +        cherrypy.lib.caching.expires(0)
      +
      +        if cmd == '' and filename == '' and logicname == '':
      +            cmd = self.cmd
      +            if cmd == '':
      +                cmd = 'new'
      +                        
      +        self.cmd = cmd.lower()
      +        self.logger.info("index_html: cmd = {}, filename = {}, logicname = {}".format(cmd, filename, logicname))
      +        if self.cmd == '':
      +#            self.logic_filename = ''
      +            self.logicname = ''
      +        elif self.cmd == 'new':
      +            self.logic_filename = 'new'
      +            self.logicname = ''
      +        elif self.cmd == 'edit' and filename != '':
      +            self.logic_filename = filename
      +            self.logicname = logicname
      +        self.logger.info("index_html: self.logicname = '{}', self.logic_filename = '{}'".format(self.logicname, self.logic_filename))
      +
      +        language = self._sh.get_defaultlanguage()
      +        if language != get_translation_lang():
      +            self.logger.debug("index_html: Language = '{}' get_translation_lang() = '{}'".format(language,get_translation_lang()))
      +            if not load_translation(language):
      +                self.logger.warning("index_html: Language '{}' not found, using standard language instead".format(language))
      +
      +        tmpl = self.tplenv.get_template('blockly.html')
      +        return tmpl.render(smarthome=self._sh,
      +                           dyn_sh_toolbox=self._DynToolbox(self._sh), 
      +                           cmd=self.cmd,
      +                           logicname=logicname,
      +                           timestamp=str(time.time()),
      +                           lang=translation_lang)
      +
      +
      +    @cherrypy.expose
      +    def edit_html(self, cmd='', filename='', logicname='', v=0):
      +
      +        if self.logics is None:
      +            self.logics = Logics.get_instance()
      +
      +        cherrypy.lib.caching.expires(0)
      +
      +        if cmd == '' and filename == '' and logicname == '':
      +            cmd = self.cmd
      +            if cmd == '':
      +                cmd = 'new'
      +                        
      +        self.cmd = cmd.lower()
      +        self.logger.info("edit_html: cmd = {}, filename = {}, logicname = {}".format(cmd, filename, logicname))
      +        if self.cmd == '':
      +#            self.logic_filename = ''
      +            self.logicname = ''
      +        elif self.cmd == 'new':
      +            self.logic_filename = 'new'
      +            self.logicname = ''
      +        elif self.cmd == 'edit' and filename != '':
      +            self.logic_filename = filename
      +            self.logicname = logicname
      +        self.logger.info("edit_html: self.logicname = '{}', self.logic_filename = '{}'".format(self.logicname, self.logic_filename))
      +
      +        language = self._sh.get_defaultlanguage()
      +        if language != get_translation_lang():
      +            self.logger.debug("edit_html: Language = '{}' get_translation_lang() = '{}'".format(language,get_translation_lang()))
      +            if not load_translation(language):
      +                self.logger.warning("edit_html: Language '{}' not found, using standard language instead".format(language))
      +
      +        tmpl = self.tplenv.get_template('blockly.html')
      +        return tmpl.render(smarthome=self._sh,
      +                           dyn_sh_toolbox=self._DynToolbox(self._sh), 
      +                           cmd=self.cmd,
      +                           logicname=logicname,
      +                           timestamp=str(time.time()),
      +                           lang=translation_lang)
      +
      +
      +    def _DynToolbox(self, sh):
      +        mytree = self._build_tree()
      +        return mytree + "-\n"
      +
      +
      +    def _build_tree(self):
      +        # Get top level items
      +        toplevelitems = []
      +        allitems = sorted(self._sh.return_items(), key=lambda k: str.lower(k['_path']), reverse=False)
      +        for item in allitems:
      +            if item._path.find('.') == -1:
      +                if item._path not in ['env_daily', 'env_init', 'env_loc', 'env_stat']:
      +                    toplevelitems.append(item)
      +
      +        xml = '\n'
      +        for item in toplevelitems:
      +            xml += self._build_treelevel(item)
      +#        self.logger.info("log_tree #  xml -> '{}'".format(str(xml)))
      +        return xml
      +                
      +
      +    def _build_treelevel(self, item, parent='', level=0):
      +        """
      +        Builds one tree level of the items
      +        
      +        This methods calls itself recursively while there are further child items
      +        """
      +        childitems = sorted(item.return_children(), key=lambda k: str.lower(k['_path']), reverse=False)
      +
      +        name = remove_prefix(item._path, parent+'.')
      +        if childitems != []:
      +            xml = ''
      +            if (item.type() != 'foo') or (item() != None):
      +#                self.logger.info("item._path = '{}', item.type() = '{}', item() = '{}', childitems = '{}'".format(item._path, item.type(), str(item()), childitems))
      +                xml += self._build_leaf(name, item, level+1)
      +                xml += ''.ljust(3*(level)) + '\n'.format(name, len(childitems)+1)
      +            else:
      +                xml += ''.ljust(3*(level)) + '\n'.format(name, len(childitems))
      +            for grandchild in childitems:
      +                xml += self._build_treelevel(grandchild, item._path, level+1)
      +
      +            xml += ''.ljust(3*(level)) + '  # name={}\n'.format(item._path)
      +        else:
      +            xml = self._build_leaf(name, item, level)
      +        return xml
      +
      +
      +    def _build_leaf(self, name, item, level=0):
      +        """
      +        Builds the leaf information for an entry in the item tree
      +        """
      +#        n = item._path.title().replace('.','_')
      +        n = item._path
      +        xml = ''.ljust(3*(level)) + '\n'
      +        xml += ''.ljust(3*(level+1)) + '' + n + '>\n'
      +        xml += ''.ljust(3*(level+1)) + '' + item._path + '>\n'
      +        xml += ''.ljust(3*(level+1)) + '' + item.type() + '>\n'
      +        xml += ''.ljust(3*(level)) + '\n'
      +        return xml
      +        
      +
      +    @cherrypy.expose
      +    def blockly_close_editor(self, content=''):
      +        self.logger.warning("blockly_close_editor: content = '{}'".format(content))
      +
      +        self.logic_filename = ''
      +        return
      +        
      +
      +    @cherrypy.expose
      +    def blockly_load_logic(self, uniq_param=''):
      +        self.logger.warning("blockly_load_logic: self.logicname = '{}', self.logic_filename = '{}'".format(self.logicname, self.logic_filename))
      +        if self.logicname == '' and self.edit_redirect == '':
      +            if self.logic_filename == 'new':
      +                fn_xml = self.plugininstance.path_join( self.webif_dir, 'templates') + '/' + "new.blockly"
      +            else:
      +                fn_xml = self._sh._logic_dir + "blockly_logics.blockly"
      +        else:
      +            if self.logic_filename == '':
      +                fn_xml = self.plugininstance.path_join( self.webif_dir, 'templates') + '/' + "new.blockly"
      +            else:
      +                fn_xml = self._sh._logic_dir + self.logic_filename
      +        self.logger.warning("blockly_load_logic: fn_xml = {}".format(fn_xml))
      +        return serve_file(fn_xml, content_type='application/xml')
      +
      +
      +    def blockly_update_config(self, code, name=''):
      +        """
      +        Fill configuration section in /etc/logic.yaml from header lines in generated code
      +        
      +        Method is called from blockly_save_logic()
      +        
      +        :param code: Python code of the logic
      +        :param name: name of configuration section, if ommited, the section name is read from the source code
      +        :type code: str
      +        :type name: str
      +        """
      +        section = ''
      +        active = False
      +        config_list = []
      +        for line in code.splitlines():
      +            if (line.startswith('#comment#')):
      +                if config_list == []:
      +                    sc, fn, ac, fnco = line[9:].split('#')
      +                    fnk, fnv = fn.split(':')
      +                    ack, acv = ac.split(':')
      +                    active = Utils.to_bool(acv.strip(), False)
      +                    if section == '':
      +                        section = sc;
      +                        self.logger.info("blockly_update_config: #comment# section = '{}'".format(section))
      +                    config_list.append([fnk.strip(), fnv.strip(), fnco])
      +            elif line.startswith('#trigger#'):
      +                sc, fn, tr, co = line[9:].split('#')
      +                trk, trv = tr.split(':')
      +                if config_list == []:
      +                    fnk, fnv = fn.split(':')
      +                    fnco = ''
      +                    config_list.append([fnk.strip(), fnv.strip(), fnco])
      +                if section == '':
      +                    section = sc;
      +                    self.logger.info("blockly_update_config: #trigger# section = '{}'".format(section))
      +                config_list.append([trk.strip(), trv.strip(),co])
      +            elif line.startswith('"""'):    # initial .rst-comment reached, stop scanning
      +                break
      +            else:                           # non-metadata lines between beginning of code and initial .rst-comment
      +                pass
      +
      +        if section == '':
      +            section = name
      +        if self._section_prefix != '':
      +            section = self._section_prefix + section
      +        self.logger.info("blockly_update_config: section = '{}'".format(section))
      +
      +        self.logics.update_config_section(active, section, config_list)
      +
      +    
      +    def pretty_print_xml(self, xml_in):
      +        import xml.dom.minidom
      +
      +        xml = xml.dom.minidom.parseString(xml_in)
      +        xml_out = xml.toprettyxml()
      +        return xml_out
      +    
      +    
      +    @cherrypy.expose
      +    def blockly_save_logic(self, py, xml, name):
      +        """
      +        Save the logic - Saves the Blocky xml and the Python code
      +        
      +        :param py:
      +        :param xml:
      +        :param name:
      +        :type py:
      +        :type xml:
      +        :type name:
      +        """
      +        self._pycode = py
      +        self._xmldata = xml
      +        fn_py = self._sh._logic_dir + name.lower() + ".py"
      +        self.logic_filename = name.lower() + ".blockly"
      +        fn_xml = self._sh._logic_dir + self.logic_filename
      +        self.logger.info("blockly_save_logic: saving blockly logic {} as file {}".format(name, fn_py))
      +        self.logger.debug("blockly_save_logic: SAVE PY blockly logic {} = {}\n '{}'".format(name, fn_py, py))
      +        with open(fn_py, 'w') as fpy:
      +            fpy.write(py)
      +        self.logger.debug("blockly_save_logic: SAVE XML blockly logic {} = {}\n '{}'".format(name, fn_xml, xml))
      +        xml = self.pretty_print_xml(xml)
      +        with open(fn_xml, 'w') as fxml:
      +            fxml.write(xml)
      +
      +        self.blockly_update_config(self._pycode, name)
      +        
      +        section = name
      +        if self._section_prefix != '':
      +            section = self._section_prefix + section
      +        
      +        self.logics.load_logic(section)
      +        self.edit_redirect = name
      +        
      diff --git a/blockly/_pv_1_4_0/locale/de.json b/blockly/_pv_1_4_0/locale/de.json
      new file mode 100755
      index 000000000..f41c669c9
      --- /dev/null
      +++ b/blockly/_pv_1_4_0/locale/de.json
      @@ -0,0 +1,17 @@
      +{
      +	"Logik-Editor": "Logik-Editor",
      +	"für SmartHomeNG": "für SmartHomeNG",
      +	
      +	"_button": {
      +		"Aktivieren": "Aktivieren",
      +		"Beenden" : "Beenden",
      +		"Speichern" : "Speichern",
      +		"Speichern & schließen" : "Speichern & schließen",
      +		"Blöcke speichern" : "Blöcke speichern",
      +		"Verwerfen" : "Verwerfen",
      +		"Änderungen verwerfen" : "Änderungen verwerfen",
      +		"Leeren" : "Leeren",
      +		"Schließen": "Schließen"
      +	}
      +
      +}
      diff --git a/blockly/_pv_1_4_0/locale/en.json b/blockly/_pv_1_4_0/locale/en.json
      new file mode 100755
      index 000000000..d15661d86
      --- /dev/null
      +++ b/blockly/_pv_1_4_0/locale/en.json
      @@ -0,0 +1,17 @@
      +{
      +	"Logik-Editor": "Logic-Editor",
      +	"für SmartHomeNG": "for SmartHomeNG",
      +	
      +	"_button": {
      +		"Aktivieren": "Enable",
      +		"Beenden" : "Stop",
      +		"Speichern" : "Save",
      +		"Speichern & schließen" : "Save & Close",
      +		"Blöcke speichern" : "Save Blocks",
      +		"Verwerfen" : "Undo Changes",
      +		"Änderungen verwerfen" : "Undo Changes",
      +		"Leeren" : "Clear",
      +		"Schließen": "Close"
      +	}
      +
      +}
      diff --git a/blockly/_pv_1_4_0/locale/fr.json b/blockly/_pv_1_4_0/locale/fr.json
      new file mode 100755
      index 000000000..f94f75c44
      --- /dev/null
      +++ b/blockly/_pv_1_4_0/locale/fr.json
      @@ -0,0 +1,17 @@
      +{
      +	"Logik-Editor": "Editeur de Logiques",
      +	"für SmartHomeNG": "pour SmartHomeNG",
      +	
      +	"_button": {
      +		"Aktivieren": "Activer",
      +		"Beenden" : "Terminer",
      +		"Speichern" : "Sauvegarder",
      +		"Speichern & schließen" : "Sauvegarder & Fermer",
      +		"Blöcke speichern" : "Enregistrer les blocs",
      +		"Verwerfen" : "Annuler",
      +		"Änderungen verwerfen" : "Annuler modifications",
      +		"Leeren" : "Vider",
      +		"Schließen": "Fermer"
      +	}
      +
      +}
      diff --git a/blockly/_pv_1_4_0/locale/pl.json b/blockly/_pv_1_4_0/locale/pl.json
      new file mode 100755
      index 000000000..ef99ee529
      --- /dev/null
      +++ b/blockly/_pv_1_4_0/locale/pl.json
      @@ -0,0 +1,17 @@
      +{
      +	"Logik-Editor": "Edytor logiki",
      +	"für SmartHomeNG": "SmartHomeNG",
      +	
      +	"_button": {
      +		"Aktivieren": "Włącz",
      +		"Beenden" : "Stop",
      +		"Speichern" : "Zapisz",
      +		"Speichern & schließen" : "Zapisz & Zamknij",
      +		"Blöcke speichern" : "Zapisz Bloki",
      +		"Verwerfen" : "Cofnij Zmiany",
      +		"Änderungen verwerfen" : "Cofnij Zmiany",
      +		"Leeren" : "Wyczyść",
      +		"Schließen": "Zamknij"
      +	}
      +
      +}
      diff --git a/blockly/_pv_1_4_0/plugin.yaml b/blockly/_pv_1_4_0/plugin.yaml
      new file mode 100755
      index 000000000..225aebf99
      --- /dev/null
      +++ b/blockly/_pv_1_4_0/plugin.yaml
      @@ -0,0 +1,45 @@
      +# Metadata for the Smart-Plugin
      +plugin:
      +    # Global plugin attributes
      +    type: system                  # plugin type (gateway, interface, protocol, system, web)
      +#    subtype: core                 # plugin subtype (if applicable)
      +    description:                  # Alternative: description in multiple languages
      +        de: 'Blockly - graphischer Editor für Logiken - Noch in der Entwicklung, nicht für die Nutzung gedacht'
      +        en: 'Blockly - graphical editor for logics - Still in development, not for use'
      +    maintainer: msinn, psilo909
      +    tester: '?'
      +    state: develop
      +#    keywords: iot xyz
      +#    documentation: https://github.com/smarthomeNG/plugins/blob/develop/mqtt/README.md        # url of documentation (wiki) page
      +#    support: https://knx-user-forum.de/forum/supportforen/smarthome-py/959964-support-thread-für-das-backend-plugin
      +
      +    version: 1.4.0                # Plugin version
      +    sh_minversion: 1.4             # minimum shNG version to use this plugin
      +#    sh_maxversion:                 # maximum shNG version to use this plugin (leave empty if latest)
      +    multi_instance: False          # plugin supports multi instance
      +    restartable: unknown
      +    classname: Blockly             # class containing the plugin
      +
      +
      +parameters:
      +    # Definition of parameters to be configured in etc/plugin.yaml
      +    section_prefix:
      +        type: str
      +        default: blockly_
      +        description:
      +            de: 'Prefix, der dem Sektionsnamen in /etc/logic.yaml vorangstellt wird'
      +            en: 'Prefix that is added to the beginning of the section name in /etc/logic.yaml'
      +
      +
      +item_attributes: NONE
      +    # Definition of item attributes defined by this plugin
      +
      +item_structs: NONE
      +  # Definition of item-structure templates for this plugin
      +
      +logic_parameters: NONE
      +# Definition of logic parameters defined by this plugin
      +
      +plugin_functions: NONE
      +# Definition of plugin functions defined by this plugin
      +
      diff --git a/blockly/_pv_1_4_0/tests/__init__.py b/blockly/_pv_1_4_0/tests/__init__.py
      new file mode 100755
      index 000000000..e69de29bb
      diff --git a/blockly/_pv_1_4_0/tests/cptestcase.py b/blockly/_pv_1_4_0/tests/cptestcase.py
      new file mode 100755
      index 000000000..bdeb384eb
      --- /dev/null
      +++ b/blockly/_pv_1_4_0/tests/cptestcase.py
      @@ -0,0 +1,102 @@
      +# -*- coding: utf-8 -*-
      +from io import BytesIO
      +import unittest
      +import urllib.request, urllib.parse, urllib.error
      +
      +import cherrypy
      +
      +# Not strictly speaking mandatory but just makes sense
      +cherrypy.config.update({'environment': "test_suite"})
      +
      +# This is mandatory so that the HTTP server isn't started
      +# if you need to actually start (why would you?), simply
      +# subscribe it back.
      +cherrypy.server.unsubscribe()
      +
      +# simulate fake socket address... they are irrelevant in our context
      +local = cherrypy.lib.httputil.Host('127.0.0.1', 50000, "")
      +remote = cherrypy.lib.httputil.Host('127.0.0.1', 50001, "")
      +
      +class BaseCherryPyTestCase(unittest.TestCase):
      +    def request(self, path='/', method='GET', app_path='', scheme='http',
      +                proto='HTTP/1.1', data=None, headers=None, **kwargs):
      +        """
      +        CherryPy does not have a facility for serverless unit testing.
      +        However this recipe demonstrates a way of doing it by
      +        calling its internal API to simulate an incoming request.
      +        This will exercise the whole stack from there.
      +
      +        Remember a couple of things:
      +
      +        * CherryPy is multithreaded. The response you will get
      +          from this method is a thread-data object attached to
      +          the current thread. Unless you use many threads from
      +          within a unit test, you can mostly forget
      +          about the thread data aspect of the response.
      +
      +        * Responses are dispatched to a mounted application's
      +          page handler, if found. This is the reason why you
      +          must indicate which app you are targetting with
      +          this request by specifying its mount point.
      +
      +        You can simulate various request settings by setting
      +        the `headers` parameter to a dictionary of headers,
      +        the request's `scheme` or `protocol`.
      +
      +        .. seealso: http://docs.cherrypy.org/stable/refman/_cprequest.html#cherrypy._cprequest.Response
      +        """
      +        # This is a required header when running HTTP/1.1
      +        h = {'Host': '127.0.0.1'}
      +
      +        if headers is not None:
      +            h.update(headers)
      +
      +        # If we have a POST/PUT request but no data
      +        # we urlencode the named arguments in **kwargs
      +        # and set the content-type header
      +        if method in ('POST', 'PUT') and not data:
      +            data = urllib.parse.urlencode(kwargs)
      +            kwargs = None
      +            h['content-type'] = 'application/x-www-form-urlencoded'
      +
      +        # If we did have named arguments, let's
      +        # urlencode them and use them as a querystring
      +        qs = None
      +        if kwargs:
      +            qs = urllib.parse.urlencode(kwargs)
      +
      +        # if we had some data passed as the request entity
      +        # let's make sure we have the content-length set
      +        fd = None
      +        if data is not None:
      +            h['content-length'] = '%d' % len(data)
      +            #fd = StringIO(data)
      +            fd = BytesIO(data.encode())
      +
      +        # Get our application and run the request against it
      +        app = cherrypy.tree.apps.get(app_path)
      +        if not app:
      +            # XXX: perhaps not the best exception to raise?
      +            raise AssertionError("No application mounted at '%s'" % app_path)
      +
      +        # Cleanup any previous returned response
      +        # between calls to this method
      +        app.release_serving()
      +
      +        # Let's fake the local and remote addresses
      +        request, response = app.get_serving(local, remote, scheme, proto)
      +        try:
      +            h = [(k, v) for k, v in h.items()]
      +            response = request.run(method, path, qs, proto, h, fd)
      +        finally:
      +            if fd:
      +                fd.close()
      +                fd = None
      +
      +        if response.output_status.startswith(b'500'):
      +            print(response.body)
      +            raise AssertionError("Unexpected error")
      +
      +        # collapse the response into a bytestring
      +        response.collapse_body()
      +        return response
      diff --git a/blockly/_pv_1_4_0/tests/test_backend_blocklylogics.py b/blockly/_pv_1_4_0/tests/test_backend_blocklylogics.py
      new file mode 100755
      index 000000000..2ba0042e8
      --- /dev/null
      +++ b/blockly/_pv_1_4_0/tests/test_backend_blocklylogics.py
      @@ -0,0 +1,116 @@
      +# -*- coding: utf-8 -*-
      +import sys
      +print(f"sys.path={sys.path}")
      +
      +from tests import common
      +import cherrypy
      +from bs4 import BeautifulSoup
      +
      +import lib.item
      +
      +#from plugins.backend import WebInterface as Root
      +#from plugins.backend.tests.cptestcase import BaseCherryPyTestCase
      +from .cptestcase import BaseCherryPyTestCase
      +from tests.mock.core import MockSmartHome
      +
      +
      +def setUpModule():
      +#    bs = MockBackendServer()
      +#    sh = bs._sh
      +#    cherrypy.tree.mount(Root(backendserver=bs,developer_mode=True), '/')
      +#    cherrypy.engine.start()
      +    pass
      +setup_module = setUpModule
      +
      +
      +def tearDownModule():
      +#    cherrypy.engine.exit()
      +    pass
      +teardown_module = tearDownModule
      +
      +
      +class TestCherryPyApp(BaseCherryPyTestCase):
      +    def test_blockly(self):
      +        pass
      +        # dummy, because tests are from the tightly coupled 1. try do integrate blockly
      +        # (before it became a seperate plugin)
      +
      +#    def test_backendIntegration(self):
      +#        response = self.request('index')
      +#        self.assertEqual(response.output_status, b'200 OK')
      +#        body = BeautifulSoup(response.body[0])
      +#        self.assertEqual( str(body.find("a", href="logics.html"))[:2], '')
      +#         # self.assertEqual(response.body, ['hello world'])
      +
      +#     def test_DynToolbox(self):
      +#         response = self.request('logics_blockly_html')
      +#         #resp_body = str(response.body[0],'utf-8')
      +#         bs_body = BeautifulSoup(response.body[0])
      +#         #items = bs_body.find("category", name="SmartHome Items")
      +#         shItemsCat = bs_body.xml.find_all(attrs={'name': 'SmartHome Items'})[0]
      +#         # print(shItemsCat)
      +#         # print("categories: {}".format(len(list(shItemsCat.find_all("category")))) )
      +#         # print("    blocks: {}".format(len(shItemsCat.find_all("block", type="sh_item_obj") )) )
      +#         self.assertEqual(len(list(shItemsCat.find_all("block", type="sh_item_obj") )), 9 )
      +#         self.assertEqual(len(list(shItemsCat.find_all("category") )), 6 )
      +
      +#     def test_logics_blockly_load(self):
      +#         response = self.request('logics_blockly_load')
      +#         self.assertEqual(response.output_status, b'200 OK')
      +#         resp_xml = str(response.body[0],'utf-8')
      +#         #print(resp_xml)
      +#         self.assertRegex(resp_xml, 'Unit Test')
      +#         self.assertRegex(resp_xml, 'testen.unit.test')
      +#         self.assertRegex(resp_xml, 'bool')
      +
      +
      +
      +    # def test_logics_blockly_load(self):
      +    #     with open(fn_py, 'w') as fpy:
      +    #         with open(fn_xml, 'w') as fxml:
      +    #             fpy.write(py)
      +    #             fxml.write(xml)
      +
      +    # def test_echo(self):
      +    #     response = self.request('/echo', msg="hey there")
      +    #     self.assertEqual(response.output_status, '200 OK')
      +    #     self.assertEqual(response.body, ["hey there"])
      +    #
      +    #     response = self.request('/echo', method='POST', msg="back from the future")
      +    #     self.assertEqual(response.output_status, '200 OK')
      +    #     self.assertEqual(response.body, ["back from the future"])
      +    #
      +
      +
      +class MockBackendServer():
      +    import os
      +    cwd = os.getcwd()
      +    print(f"blockly cwd={cwd}")
      +    os.chdir('..')
      +    cwd = os.getcwd()
      +    print(f"blockly new cwd={cwd}")
      +
      +    _sh = MockSmartHome()
      +    print(f"blockly etc_dir = {_sh.get_etcdir()}")
      +
      +    def __init__(self):
      +        self._sh.with_items_from(common.BASE + "/tests/resources/blockly_items.conf")
      +
      +        # HACK: Make tests work! Backend accesses private field _logic_dir
      +        # directly instead of using a method (the field was remove in the
      +        # meantime). Setting this just to make it work again.
      +        self._sh._logic_dir = common.BASE + "/tests/resources/"
      +
      +
      +if __name__ == '__main__':
      +    import unittest
      +    unittest.main()
      diff --git a/blockly/_pv_1_4_0/utils.py b/blockly/_pv_1_4_0/utils.py
      new file mode 100755
      index 000000000..77866c2c6
      --- /dev/null
      +++ b/blockly/_pv_1_4_0/utils.py
      @@ -0,0 +1,235 @@
      +#!/usr/bin/env python3
      +# -*- coding: utf8 -*-
      +#########################################################################
      +# Copyright 2016-       Martin Sinn                         m.sinn@gmx.de
      +#                       René Frieß                  rene.friess@gmail.com
      +#                       Bernd Meiners
      +#########################################################################
      +#  Blockly plugin for SmartHomeNG
      +#
      +#  This plugin is free software: you can redistribute it and/or modify
      +#  it under the terms of the GNU General Public License as published by
      +#  the Free Software Foundation, either version 3 of the License, or
      +#  (at your option) any later version.
      +#
      +#  This plugin is distributed in the hope that it will be useful,
      +#  but WITHOUT ANY WARRANTY; without even the implied warranty of
      +#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
      +#  GNU General Public License for more details.
      +#
      +#  You should have received a copy of the GNU General Public License
      +#  along with this plugin. If not, see .
      +#########################################################################
      +
      +import logging
      +import json
      +import os
      +import collections
      +from collections import OrderedDict
      +
      +
      +# Funktionen für Jinja2 z.Zt außerhalb der Klasse Blockly, da ich Jinja2 noch nicht mit
      +# Methoden einer Klasse zum laufen bekam
      +
      +
      +# def get_basename(p):
      +#     """
      +#     returns the filename of a full pathname
      +# 
      +#     This function extends the jinja2 template engine
      +#     """
      +#     return os.path.basename(p)
      +
      +
      +def remove_prefix(string, prefix):
      +    """
      +    Remove prefix from a string
      +    
      +    :param string: String to remove the profix from
      +    :param prefix: Prefix to remove from string
      +    :type string: str
      +    :type prefix: str
      +    
      +    :return: Strting with prefix removed
      +    :rtype: str
      +    """
      +    if string.startswith(prefix):
      +        return string[len(prefix):]
      +    return string
      +
      +
      +translation_dict = {}
      +translation_dict_en = {}
      +translation_dict_de = {}
      +translation_lang = ''
      +
      +
      +def get_translation_lang():
      +    global translation_lang
      +    return translation_lang
      +
      +
      +def load_translation_backuplanguages():
      +    global translation_dict_en  # Needed to modify global copy of translation_dict
      +    global translation_dict_de  # Needed to modify global copy of translation_dict
      +
      +    logger = logging.getLogger(__name__)
      +
      +    lang_filename = os.path.dirname(os.path.abspath(__file__)) + '/locale/' + 'en' + '.json'
      +    try:
      +        f = open(lang_filename, 'r')
      +        translation_dict_en = json.load(f)
      +    except Exception as e:
      +        translation_dict_en = {}
      +        logger.error("Blockly: load_translation language='{0}' failed: Error '{1}'".format('en', e))
      +    logger.debug("Blockly: translation_dict_en='{0}'".format(translation_dict_en))
      +
      +    lang_filename = os.path.dirname(os.path.abspath(__file__)) + '/locale/' + 'de' + '.json'
      +    try:
      +        f = open(lang_filename, 'r')
      +        translation_dict_de = json.load(f)
      +    except Exception as e:
      +        translation_dict_de = {}
      +        logger.error("Blockly: load_translation language='{0}' failed: Error '{1}'".format('de', e))
      +    logger.debug("Blockly: translation_dict_de='{0}'".format(translation_dict_de))
      +
      +    return
      +
      +
      +def load_translation(language):
      +    global translation_dict  # Needed to modify global copy of translation_dict
      +    global translation_lang  # Needed to modify global copy of translation_lang
      +
      +    logger = logging.getLogger(__name__)
      +
      +    if translation_dict_en == {}:
      +        load_translation_backuplanguages()
      +
      +    translation_lang = language.lower()
      +    if translation_lang == '':
      +        translation_dict = {}
      +    else:
      +        lang_filename = os.path.dirname(os.path.abspath(__file__)) + '/locale/' + translation_lang + '.json'
      +        try:
      +            f = open(lang_filename, 'r')
      +        except Exception as e:
      +            translation_lang = ''
      +            logger.error("Blockly: load_translation language='{0}' failed: Error '{1}'".format(translation_lang, e))
      +            return False
      +        try:
      +            translation_dict = json.load(f)
      +        except Exception as e:
      +            logger.error("Blockly: load_translation language='{0}': Error '{1}'".format(translation_lang, e))
      +            return False
      +    logger.debug("Blockly: translation_dict='{0}'".format(translation_dict))
      +    return True
      +
      +
      +def html_escape(str):
      +    str = str.rstrip().replace('<', '<').replace('>', '>')
      +    str = str.rstrip().replace('(', '(').replace(')', ')')
      +    html = str.rstrip().replace("'", ''').replace('"', '"')
      +    return html
      +
      +
      +def _get_translation_for_block(lang, txt, block):
      +    """
      +    """
      +    if lang == 'en':
      +        blockdict = translation_dict_en.get('_' + block, {})
      +    elif lang == 'de':
      +        blockdict = translation_dict_de.get('_' + block, {})
      +    else:
      +        blockdict = translation_dict.get('_' + block, {})
      +
      +    return blockdict.get(txt, '')
      +        
      +        
      +def _get_translation(txt, block):
      +    """
      +    Get translation with fallback to english and further fallback to german
      +    """
      +    logger = logging.getLogger(__name__)
      +
      +    if block != '':
      +        tr = _get_translation_for_block('', txt, block)
      +        if tr == '':
      +            logger.info("Blockly: Language '{0}': Translation for '{1}' is missing!".format(translation_lang, txt))
      +            tr = _get_translation_for_block('en', txt, block)
      +            if tr == '':
      +                tr = _get_translation_for_block('de', txt, block)
      +    else:
      +        tr = translation_dict.get(txt, '')
      +        if tr == '':
      +            logger.info("Blockly: Language '{0}': Translation for '{1}' is missing".format(translation_lang, txt))
      +            tr = translation_dict_en.get(txt, '')
      +            if tr == '':
      +                logger.info("Blockly: Language '{0}': Translation for '{1}' is missing".format('en', txt))
      +                tr = translation_dict_de.get(txt, '')
      +    return tr
      +    
      +
      +def translate(txt, block=''):
      +    """
      +    returns translated text
      +    
      +    This function extends the jinja2 template engine
      +    """
      +    logger = logging.getLogger(__name__)
      +
      +    txt = str(txt)
      +    if translation_lang == '':
      +        tr = txt
      +    else:
      +        tr = _get_translation(txt, block)
      +
      +        if tr == '':
      +            logger.info("Blockly: -> Language '{0}': Translation for '{1}' is missing".format(translation_lang, txt))
      +            tr = txt
      +    return html_escape(tr)
      +
      +
      +#def create_hash(plaintext):
      +#    import hashlib
      +#    hashfunc = hashlib.sha512()
      +#    hashfunc.update(plaintext.encode())
      +#    return hashfunc.hexdigest()
      +
      +
      +#def parse_requirements(file_path):
      +#    fobj = open(file_path)
      +#    req_dict = {}
      +#    for line in fobj:
      +#        if len(line) > 0 and '#' not in line:
      +#            if ">" in line:
      +#                if line[0:line.find(">")].lower().strip() in req_dict:
      +#                    req_dict[line[0:line.find(">")].lower().strip()] += " | " + line[line.find(">"):len(
      +#                        line)].lower().strip()
      +#                else:
      +#                    req_dict[line[0:line.find(">")].lower().strip()] = line[line.find(">"):len(line)].lower().strip()
      +#            elif "<" in line:
      +#                if line[0:line.find("<")].lower().strip() in req_dict:
      +#                    req_dict[line[0:line.find("<")].lower().strip()] += " | " + line[line.find("<"):len(
      +#                        line)].lower().strip()
      +#                else:
      +#                    req_dict[line[0:line.find("<")].lower().strip()] = line[line.find("<"):len(line)].lower().strip()
      +#            elif "=" in line:
      +#                if line[0:line.find("=")].lower().strip() in req_dict:
      +#                    req_dict[line[0:line.find("=")].lower().strip()] += " | " + line[line.find("="):len(
      +#                        line)].lower().strip()
      +#                else:
      +#                    req_dict[line[0:line.find("=")].lower().strip()] = line[line.find("="):len(line)].lower().strip()
      +#    fobj.close()
      +#    return req_dict
      +
      +
      +#def strip_quotes(string):
      +#    string = string.strip()
      +#    if len(string) > 0:
      +#        if string[0] in ['"', "'"]:  # check if string starts with ' or "
      +#            if string[0] == string[-1]:  # and end with it
      +#                if string.count(string[0]) == 2:  # if they are the only one
      +#                    string = string[1:-1]  # remove them
      +#    return string
      +
      +
      diff --git a/blockly/_pv_1_4_0/webif/static/blockly/LICENSE b/blockly/_pv_1_4_0/webif/static/blockly/LICENSE
      new file mode 100755
      index 000000000..d64569567
      --- /dev/null
      +++ b/blockly/_pv_1_4_0/webif/static/blockly/LICENSE
      @@ -0,0 +1,202 @@
      +
      +                                 Apache License
      +                           Version 2.0, January 2004
      +                        http://www.apache.org/licenses/
      +
      +   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
      +
      +   1. Definitions.
      +
      +      "License" shall mean the terms and conditions for use, reproduction,
      +      and distribution as defined by Sections 1 through 9 of this document.
      +
      +      "Licensor" shall mean the copyright owner or entity authorized by
      +      the copyright owner that is granting the License.
      +
      +      "Legal Entity" shall mean the union of the acting entity and all
      +      other entities that control, are controlled by, or are under common
      +      control with that entity. For the purposes of this definition,
      +      "control" means (i) the power, direct or indirect, to cause the
      +      direction or management of such entity, whether by contract or
      +      otherwise, or (ii) ownership of fifty percent (50%) or more of the
      +      outstanding shares, or (iii) beneficial ownership of such entity.
      +
      +      "You" (or "Your") shall mean an individual or Legal Entity
      +      exercising permissions granted by this License.
      +
      +      "Source" form shall mean the preferred form for making modifications,
      +      including but not limited to software source code, documentation
      +      source, and configuration files.
      +
      +      "Object" form shall mean any form resulting from mechanical
      +      transformation or translation of a Source form, including but
      +      not limited to compiled object code, generated documentation,
      +      and conversions to other media types.
      +
      +      "Work" shall mean the work of authorship, whether in Source or
      +      Object form, made available under the License, as indicated by a
      +      copyright notice that is included in or attached to the work
      +      (an example is provided in the Appendix below).
      +
      +      "Derivative Works" shall mean any work, whether in Source or Object
      +      form, that is based on (or derived from) the Work and for which the
      +      editorial revisions, annotations, elaborations, or other modifications
      +      represent, as a whole, an original work of authorship. For the purposes
      +      of this License, Derivative Works shall not include works that remain
      +      separable from, or merely link (or bind by name) to the interfaces of,
      +      the Work and Derivative Works thereof.
      +
      +      "Contribution" shall mean any work of authorship, including
      +      the original version of the Work and any modifications or additions
      +      to that Work or Derivative Works thereof, that is intentionally
      +      submitted to Licensor for inclusion in the Work by the copyright owner
      +      or by an individual or Legal Entity authorized to submit on behalf of
      +      the copyright owner. For the purposes of this definition, "submitted"
      +      means any form of electronic, verbal, or written communication sent
      +      to the Licensor or its representatives, including but not limited to
      +      communication on electronic mailing lists, source code control systems,
      +      and issue tracking systems that are managed by, or on behalf of, the
      +      Licensor for the purpose of discussing and improving the Work, but
      +      excluding communication that is conspicuously marked or otherwise
      +      designated in writing by the copyright owner as "Not a Contribution."
      +
      +      "Contributor" shall mean Licensor and any individual or Legal Entity
      +      on behalf of whom a Contribution has been received by Licensor and
      +      subsequently incorporated within the Work.
      +
      +   2. Grant of Copyright License. Subject to the terms and conditions of
      +      this License, each Contributor hereby grants to You a perpetual,
      +      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
      +      copyright license to reproduce, prepare Derivative Works of,
      +      publicly display, publicly perform, sublicense, and distribute the
      +      Work and such Derivative Works in Source or Object form.
      +
      +   3. Grant of Patent License. Subject to the terms and conditions of
      +      this License, each Contributor hereby grants to You a perpetual,
      +      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
      +      (except as stated in this section) patent license to make, have made,
      +      use, offer to sell, sell, import, and otherwise transfer the Work,
      +      where such license applies only to those patent claims licensable
      +      by such Contributor that are necessarily infringed by their
      +      Contribution(s) alone or by combination of their Contribution(s)
      +      with the Work to which such Contribution(s) was submitted. If You
      +      institute patent litigation against any entity (including a
      +      cross-claim or counterclaim in a lawsuit) alleging that the Work
      +      or a Contribution incorporated within the Work constitutes direct
      +      or contributory patent infringement, then any patent licenses
      +      granted to You under this License for that Work shall terminate
      +      as of the date such litigation is filed.
      +
      +   4. Redistribution. You may reproduce and distribute copies of the
      +      Work or Derivative Works thereof in any medium, with or without
      +      modifications, and in Source or Object form, provided that You
      +      meet the following conditions:
      +
      +      (a) You must give any other recipients of the Work or
      +          Derivative Works a copy of this License; and
      +
      +      (b) You must cause any modified files to carry prominent notices
      +          stating that You changed the files; and
      +
      +      (c) You must retain, in the Source form of any Derivative Works
      +          that You distribute, all copyright, patent, trademark, and
      +          attribution notices from the Source form of the Work,
      +          excluding those notices that do not pertain to any part of
      +          the Derivative Works; and
      +
      +      (d) If the Work includes a "NOTICE" text file as part of its
      +          distribution, then any Derivative Works that You distribute must
      +          include a readable copy of the attribution notices contained
      +          within such NOTICE file, excluding those notices that do not
      +          pertain to any part of the Derivative Works, in at least one
      +          of the following places: within a NOTICE text file distributed
      +          as part of the Derivative Works; within the Source form or
      +          documentation, if provided along with the Derivative Works; or,
      +          within a display generated by the Derivative Works, if and
      +          wherever such third-party notices normally appear. The contents
      +          of the NOTICE file are for informational purposes only and
      +          do not modify the License. You may add Your own attribution
      +          notices within Derivative Works that You distribute, alongside
      +          or as an addendum to the NOTICE text from the Work, provided
      +          that such additional attribution notices cannot be construed
      +          as modifying the License.
      +
      +      You may add Your own copyright statement to Your modifications and
      +      may provide additional or different license terms and conditions
      +      for use, reproduction, or distribution of Your modifications, or
      +      for any such Derivative Works as a whole, provided Your use,
      +      reproduction, and distribution of the Work otherwise complies with
      +      the conditions stated in this License.
      +
      +   5. Submission of Contributions. Unless You explicitly state otherwise,
      +      any Contribution intentionally submitted for inclusion in the Work
      +      by You to the Licensor shall be under the terms and conditions of
      +      this License, without any additional terms or conditions.
      +      Notwithstanding the above, nothing herein shall supersede or modify
      +      the terms of any separate license agreement you may have executed
      +      with Licensor regarding such Contributions.
      +
      +   6. Trademarks. This License does not grant permission to use the trade
      +      names, trademarks, service marks, or product names of the Licensor,
      +      except as required for reasonable and customary use in describing the
      +      origin of the Work and reproducing the content of the NOTICE file.
      +
      +   7. Disclaimer of Warranty. Unless required by applicable law or
      +      agreed to in writing, Licensor provides the Work (and each
      +      Contributor provides its Contributions) on an "AS IS" BASIS,
      +      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
      +      implied, including, without limitation, any warranties or conditions
      +      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
      +      PARTICULAR PURPOSE. You are solely responsible for determining the
      +      appropriateness of using or redistributing the Work and assume any
      +      risks associated with Your exercise of permissions under this License.
      +
      +   8. Limitation of Liability. In no event and under no legal theory,
      +      whether in tort (including negligence), contract, or otherwise,
      +      unless required by applicable law (such as deliberate and grossly
      +      negligent acts) or agreed to in writing, shall any Contributor be
      +      liable to You for damages, including any direct, indirect, special,
      +      incidental, or consequential damages of any character arising as a
      +      result of this License or out of the use or inability to use the
      +      Work (including but not limited to damages for loss of goodwill,
      +      work stoppage, computer failure or malfunction, or any and all
      +      other commercial damages or losses), even if such Contributor
      +      has been advised of the possibility of such damages.
      +
      +   9. Accepting Warranty or Additional Liability. While redistributing
      +      the Work or Derivative Works thereof, You may choose to offer,
      +      and charge a fee for, acceptance of support, warranty, indemnity,
      +      or other liability obligations and/or rights consistent with this
      +      License. However, in accepting such obligations, You may act only
      +      on Your own behalf and on Your sole responsibility, not on behalf
      +      of any other Contributor, and only if You agree to indemnify,
      +      defend, and hold each Contributor harmless for any liability
      +      incurred by, or claims asserted against, such Contributor by reason
      +      of your accepting any such warranty or additional liability.
      +
      +   END OF TERMS AND CONDITIONS
      +
      +   APPENDIX: How to apply the Apache License to your work.
      +
      +      To apply the Apache License to your work, attach the following
      +      boilerplate notice, with the fields enclosed by brackets "[]"
      +      replaced with your own identifying information. (Don't include
      +      the brackets!)  The text should be enclosed in the appropriate
      +      comment syntax for the file format. We also recommend that a
      +      file or class name and description of purpose be included on the
      +      same "printed page" as the copyright notice for easier
      +      identification within third-party archives.
      +
      +   Copyright [yyyy] [name of copyright owner]
      +
      +   Licensed under the Apache License, Version 2.0 (the "License");
      +   you may not use this file except in compliance with the License.
      +   You may obtain a copy of the License at
      +
      +       http://www.apache.org/licenses/LICENSE-2.0
      +
      +   Unless required by applicable law or agreed to in writing, software
      +   distributed under the License is distributed on an "AS IS" BASIS,
      +   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      +   See the License for the specific language governing permissions and
      +   limitations under the License.
      diff --git a/blockly/_pv_1_4_0/webif/static/blockly/README.md b/blockly/_pv_1_4_0/webif/static/blockly/README.md
      new file mode 100755
      index 000000000..999f96b26
      --- /dev/null
      +++ b/blockly/_pv_1_4_0/webif/static/blockly/README.md
      @@ -0,0 +1,56 @@
      +# Blockly [![Build Status]( https://travis-ci.org/google/blockly.svg?branch=master)](https://travis-ci.org/google/blockly)
      +
      +
      +Google's Blockly is a web-based, visual programming editor.  Users can drag
      +blocks together to build programs.  All code is free and open source.
      +
      +**The project page is https://developers.google.com/blockly/**
      +
      +![](https://developers.google.com/blockly/images/sample.png)
      +
      +Blockly has an active [developer forum](https://groups.google.com/forum/#!forum/blockly).  Please drop by and say hello. Show us your prototypes early; collectively we have a lot of experience and can offer hints which will save you time. We actively monitor the forums and typically respond to questions within 2 working days.
      +
      +Help us focus our development efforts by telling us [what you are doing with
      +Blockly](https://developers.google.com/blockly/registration).  The questionnaire only takes
      +a few minutes and will help us better support the Blockly community.
      +
      +Cross-browser Testing Platform and Open Source <3 Provided by [Sauce Labs](https://saucelabs.com)
      +
      +Want to contribute? Great! First, read [our guidelines for contributors](https://developers.google.com/blockly/guides/modify/contributing).
      +
      +## Releases
      +
      +We release by pushing the latest code to the master branch, followed by updating our [docs](https://developers.google.com/blockly) and [demo pages](https://blockly-demo.appspot.com). We typically release a new version of Blockly once a quarter (every 3 months). If there are breaking bugs, such as a crash when performing a standard action or a rendering issue that makes Blockly unusable, we will cherry-pick fixes to master between releases to fix them. The [releases page](https://github.com/google/blockly/releases) has a list of all releases.
      +
      +Releases are tagged by the release date (YYYYMMDD) with a leading '2.' and a trailing '.0' in case we ever need a major or minor version (such as [2.20190722.1](https://github.com/google/blockly/tree/2.20190722.1)). If you're using npm, you can install the ``blockly`` package on npm: 
      +```bash
      +npm install blockly
      +```
      +
      +### New APIs
      +
      +Once a new API is merged into master it is considered beta until the following release. We generally try to avoid changing an API after it has been merged to master, but sometimes we need to make changes after seeing how an API is used. If an API has been around for at least two releases we'll do our best to avoid breaking it.
      +
      +Unreleased APIs may change radically. Anything that is in `develop` but not `master` is subject to change without warning.
      +
      +### Branches
      +
      +There are two main branches for Blockly.
      +
      +**[master](https://github.com/google/blockly)** - This is the (mostly) stable current release of Blockly.
      +
      +**[develop](https://github.com/google/blockly/tree/develop)** - This is where most of our work happens. Pull requests should always be made against develop. This branch will generally be usable, but may be less stable than the master branch. Once something is in develop we expect it to merge to master in the next release.
      +
      +**other branches:** - Larger changes may have their own branches until they are good enough for people to try out. These will be developed separately until we think they are almost ready for release. These branches typically get merged into develop immediately after a release to allow extra time for testing.
      +
      +## Issues and Milestones
      +
      +We typically triage all bugs within 2 working days, which includes adding any appropriate labels and assigning it to a milestone. Please keep in mind, we are a small team so even feature requests that everyone agrees on may not be prioritized.
      +
      +### Milestones
      +
      +**Upcoming release** - The upcoming release milestone is for all bugs we plan on fixing before the next release. This typically has the form of `year_quarter_release` (such as `2019_q2_release`). Some bugs will be added to this release when they are triaged, others may be added closer to a release.
      +
      +**Bug Bash Backlog** - These are bugs that we're still prioritizing. They haven't been added to a specific release yet, but we'll consider them for each release depending on relative priority and available time.
      +
      +**Icebox** - These are bugs that we do not intend to spend time on. They are either too much work or minor enough that we don't expect them to ever take priority. We are still happy to accept pull requests for these bugs.
      diff --git a/blockly/_pv_1_4_0/webif/static/blockly/blockly_compressed.js b/blockly/_pv_1_4_0/webif/static/blockly/blockly_compressed.js
      new file mode 100755
      index 000000000..9de0658d8
      --- /dev/null
      +++ b/blockly/_pv_1_4_0/webif/static/blockly/blockly_compressed.js
      @@ -0,0 +1,1229 @@
      +// Do not edit this file; automatically generated by build.py.
      +'use strict';
      +
      +
      +var Blockly={};Blockly.Blocks=Object.create(null);
      +Blockly.utils={};Blockly.utils.global=function(){return"object"===typeof self?self:"object"===typeof window?window:"object"===typeof global?global:this}();Blockly.Msg={};Blockly.utils.global.Blockly||(Blockly.utils.global.Blockly={});Blockly.utils.global.Blockly.Msg||(Blockly.utils.global.Blockly.Msg=Blockly.Msg);Blockly.utils.Coordinate=function(a,b){this.x=a;this.y=b};Blockly.utils.Coordinate.equals=function(a,b){return a==b?!0:a&&b?a.x==b.x&&a.y==b.y:!1};Blockly.utils.Coordinate.distance=function(a,b){var c=a.x-b.x,d=a.y-b.y;return Math.sqrt(c*c+d*d)};Blockly.utils.Coordinate.magnitude=function(a){return Math.sqrt(a.x*a.x+a.y*a.y)};Blockly.utils.Coordinate.difference=function(a,b){return new Blockly.utils.Coordinate(a.x-b.x,a.y-b.y)};
      +Blockly.utils.Coordinate.sum=function(a,b){return new Blockly.utils.Coordinate(a.x+b.x,a.y+b.y)};Blockly.utils.Coordinate.prototype.scale=function(a){this.x*=a;this.y*=a;return this};Blockly.utils.Coordinate.prototype.translate=function(a,b){this.x+=a;this.y+=b;return this};Blockly.utils.string={};Blockly.utils.string.startsWith=function(a,b){return 0==a.lastIndexOf(b,0)};Blockly.utils.string.shortestStringLength=function(a){return a.length?a.reduce(function(a,c){return a.lengthb&&(b=c[d].length);d=-Infinity;var e=1;do{var f=d;var g=a;var h=[],k=c.length/e,l=1;for(d=0;df);return g};
      +Blockly.utils.string.wrapScore_=function(a,b,c){for(var d=[0],e=[],f=0;fd&&(d=h,e=g)}return e?Blockly.utils.string.wrapMutate_(a,e,c):b};Blockly.utils.string.wrapToText_=function(a,b){for(var c=[],d=0;d=k?(e=2,g=k,(k=f.join(""))&&c.push(k),f.length=0):"{"==k?e=3:(f.push("%",k),e=0):2==e?"0"<=k&&"9">=k?g+=k:(c.push(parseInt(g,10)),h--,e=0):3==e&&(""==k?(f.splice(0,0,"%{"),h--,e=0):"}"!=k?f.push(k):(e=f.join(""),/[A-Z]\w*/i.test(e)?(k=e.toUpperCase(),(k=
      +Blockly.utils.string.startsWith(k,"BKY_")?k.substring(4):null)&&k in Blockly.Msg?(e=Blockly.Msg[k],"string"==typeof e?Array.prototype.push.apply(c,Blockly.utils.tokenizeInterpolation_(e,b)):b?c.push(String(e)):c.push(e)):c.push("%{"+e+"}")):c.push("%{"+e+"}"),e=f.length=0))}(k=f.join(""))&&c.push(k);d=[];for(h=f.length=0;hc;c++)b[c]=Blockly.utils.genUid.soup_.charAt(Math.random()*a);return b.join("")};Blockly.utils.genUid.soup_="!#$%()*+,-./:;=?@[]^_`{|}~ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
      +Blockly.utils.is3dSupported=function(){if(void 0!==Blockly.utils.is3dSupported.cached_)return Blockly.utils.is3dSupported.cached_;if(!Blockly.utils.global.getComputedStyle)return!1;var a=document.createElement("p"),b="none",c={webkitTransform:"-webkit-transform",OTransform:"-o-transform",msTransform:"-ms-transform",MozTransform:"-moz-transform",transform:"transform"};document.body.insertBefore(a,null);for(var d in c)if(void 0!==a.style[d]){a.style[d]="translate3d(1px,1px,1px)";b=Blockly.utils.global.getComputedStyle(a);
      +if(!b)return document.body.removeChild(a),!1;b=b.getPropertyValue(c[d])}document.body.removeChild(a);Blockly.utils.is3dSupported.cached_="none"!==b;return Blockly.utils.is3dSupported.cached_};Blockly.utils.runAfterPageLoad=function(a){if("object"!=typeof document)throw Error("Blockly.utils.runAfterPageLoad() requires browser document.");if("complete"==document.readyState)a();else var b=setInterval(function(){"complete"==document.readyState&&(clearInterval(b),a())},10)};
      +Blockly.utils.getViewportBBox=function(){var a=Blockly.utils.style.getViewportPageOffset();return{right:document.documentElement.clientWidth+a.x,bottom:document.documentElement.clientHeight+a.y,top:a.y,left:a.x}};Blockly.utils.arrayRemove=function(a,b){var c=a.indexOf(b);if(-1==c)return!1;a.splice(c,1);return!0};
      +Blockly.utils.getDocumentScroll=function(){var a=document.documentElement,b=window;return Blockly.utils.userAgent.IE&&b.pageYOffset!=a.scrollTop?new Blockly.utils.Coordinate(a.scrollLeft,a.scrollTop):new Blockly.utils.Coordinate(b.pageXOffset||a.scrollLeft,b.pageYOffset||a.scrollTop)};
      +Blockly.utils.getBlockTypeCounts=function(a,b){var c=Object.create(null),d=a.getDescendants(!0);if(b){var e=a.getNextBlock();e&&(e=d.indexOf(e),d.splice(e,d.length-e))}e=0;for(var f;f=d[e];e++)c[f.type]?c[f.type]++:c[f.type]=1;return c};Blockly.utils.screenToWsCoordinates=function(a,b){var c=b.x,d=b.y,e=a.getInjectionDiv().getBoundingClientRect();c=new Blockly.utils.Coordinate(c-e.left,d-e.top);d=a.getOriginOffsetInPixels();return Blockly.utils.Coordinate.difference(c,d).scale(1/a.scale)};
      +Blockly.Events={};Blockly.Events.group_="";Blockly.Events.recordUndo=!0;Blockly.Events.disabled_=0;Blockly.Events.CREATE="create";Blockly.Events.BLOCK_CREATE=Blockly.Events.CREATE;Blockly.Events.DELETE="delete";Blockly.Events.BLOCK_DELETE=Blockly.Events.DELETE;Blockly.Events.CHANGE="change";Blockly.Events.BLOCK_CHANGE=Blockly.Events.CHANGE;Blockly.Events.MOVE="move";Blockly.Events.BLOCK_MOVE=Blockly.Events.MOVE;Blockly.Events.VAR_CREATE="var_create";Blockly.Events.VAR_DELETE="var_delete";
      +Blockly.Events.VAR_RENAME="var_rename";Blockly.Events.UI="ui";Blockly.Events.COMMENT_CREATE="comment_create";Blockly.Events.COMMENT_DELETE="comment_delete";Blockly.Events.COMMENT_CHANGE="comment_change";Blockly.Events.COMMENT_MOVE="comment_move";Blockly.Events.FINISHED_LOADING="finished_loading";Blockly.Events.BUMP_EVENTS=[Blockly.Events.BLOCK_CREATE,Blockly.Events.BLOCK_MOVE,Blockly.Events.COMMENT_CREATE,Blockly.Events.COMMENT_MOVE];Blockly.Events.FIRE_QUEUE_=[];
      +Blockly.Events.fire=function(a){Blockly.Events.isEnabled()&&(Blockly.Events.FIRE_QUEUE_.length||setTimeout(Blockly.Events.fireNow_,0),Blockly.Events.FIRE_QUEUE_.push(a))};Blockly.Events.fireNow_=function(){for(var a=Blockly.Events.filter(Blockly.Events.FIRE_QUEUE_,!0),b=Blockly.Events.FIRE_QUEUE_.length=0,c;c=a[b];b++)if(c.workspaceId){var d=Blockly.Workspace.getById(c.workspaceId);d&&d.fireChangeListener(c)}};
      +Blockly.Events.filter=function(a,b){var c=a.slice();b||c.reverse();for(var d=[],e=Object.create(null),f=0,g;g=c[f];f++)if(!g.isNull()){var h=[g.type,g.blockId,g.workspaceId].join(" "),k=e[h],l=k?k.event:null;if(!k)e[h]={event:g,index:f},d.push(g);else if(g.type==Blockly.Events.MOVE&&k.index==f-1)l.newParentId=g.newParentId,l.newInputName=g.newInputName,l.newCoordinate=g.newCoordinate,k.index=f;else if(g.type==Blockly.Events.CHANGE&&g.element==l.element&&g.name==l.name)l.newValue=g.newValue;else if(g.type!=
      +Blockly.Events.UI||"click"!=g.element||"commentOpen"!=l.element&&"mutatorOpen"!=l.element&&"warningOpen"!=l.element)e[h]={event:g,index:1},d.push(g)}c=d.filter(function(a){return!a.isNull()});b||c.reverse();for(f=1;g=c[f];f++)g.type==Blockly.Events.CHANGE&&"mutation"==g.element&&c.unshift(c.splice(f,1)[0]);return c};Blockly.Events.clearPendingUndo=function(){for(var a=0,b;b=Blockly.Events.FIRE_QUEUE_[a];a++)b.recordUndo=!1};Blockly.Events.disable=function(){Blockly.Events.disabled_++};
      +Blockly.Events.enable=function(){Blockly.Events.disabled_--};Blockly.Events.isEnabled=function(){return 0==Blockly.Events.disabled_};Blockly.Events.getGroup=function(){return Blockly.Events.group_};Blockly.Events.setGroup=function(a){Blockly.Events.group_="boolean"==typeof a?a?Blockly.utils.genUid():"":a};Blockly.Events.getDescendantIds=function(a){var b=[];a=a.getDescendants(!1);for(var c=0,d;d=a[c];c++)b[c]=d.id;return b};
      +Blockly.Events.fromJson=function(a,b){switch(a.type){case Blockly.Events.CREATE:var c=new Blockly.Events.Create(null);break;case Blockly.Events.DELETE:c=new Blockly.Events.Delete(null);break;case Blockly.Events.CHANGE:c=new Blockly.Events.Change(null,"","","","");break;case Blockly.Events.MOVE:c=new Blockly.Events.Move(null);break;case Blockly.Events.VAR_CREATE:c=new Blockly.Events.VarCreate(null);break;case Blockly.Events.VAR_DELETE:c=new Blockly.Events.VarDelete(null);break;case Blockly.Events.VAR_RENAME:c=
      +new Blockly.Events.VarRename(null,"");break;case Blockly.Events.UI:c=new Blockly.Events.Ui(null,"","","");break;case Blockly.Events.COMMENT_CREATE:c=new Blockly.Events.CommentCreate(null);break;case Blockly.Events.COMMENT_CHANGE:c=new Blockly.Events.CommentChange(null,"","");break;case Blockly.Events.COMMENT_MOVE:c=new Blockly.Events.CommentMove(null);break;case Blockly.Events.COMMENT_DELETE:c=new Blockly.Events.CommentDelete(null);break;default:throw Error("Unknown event type.");}c.fromJson(a);c.workspaceId=
      +b.id;return c};Blockly.Events.disableOrphans=function(a){if((a.type==Blockly.Events.MOVE||a.type==Blockly.Events.CREATE)&&a.workspaceId){var b=Blockly.Workspace.getById(a.workspaceId);if(a=b.getBlockById(a.blockId)){var c=a.getParent();if(c&&c.isEnabled())for(b=a.getDescendants(!1),a=0;c=b[a];a++)c.setEnabled(!0);else if((a.outputConnection||a.previousConnection)&&!b.isDragging()){do a.setEnabled(!1),a=a.getNextBlock();while(a)}}}};
      +Blockly.Events.Abstract=function(){this.workspaceId=void 0;this.group=Blockly.Events.getGroup();this.recordUndo=Blockly.Events.recordUndo};Blockly.Events.Abstract.prototype.toJson=function(){var a={type:this.type};this.group&&(a.group=this.group);return a};Blockly.Events.Abstract.prototype.fromJson=function(a){this.group=a.group};Blockly.Events.Abstract.prototype.isNull=function(){return!1};Blockly.Events.Abstract.prototype.run=function(a){};
      +Blockly.Events.Abstract.prototype.getEventWorkspace_=function(){if(this.workspaceId)var a=Blockly.Workspace.getById(this.workspaceId);if(!a)throw Error("Workspace is null. Event must have been generated from real Blockly events.");return a};Blockly.utils.object={};Blockly.utils.object.inherits=function(a,b){a.superClass_=b.prototype;a.prototype=Object.create(b.prototype);a.prototype.constructor=a};Blockly.utils.object.mixin=function(a,b){for(var c in b)a[c]=b[c]};Blockly.utils.object.values=function(a){return Object.values?Object.values(a):Object.keys(a).map(function(b){return a[b]})};Blockly.utils.xml={};Blockly.utils.xml.NAME_SPACE="https://developers.google.com/blockly/xml";Blockly.utils.xml.document=function(){return document};Blockly.utils.xml.createElement=function(a){return Blockly.utils.xml.document().createElementNS(Blockly.utils.xml.NAME_SPACE,a)};Blockly.utils.xml.createTextNode=function(a){return Blockly.utils.xml.document().createTextNode(a)};Blockly.utils.xml.textToDomDocument=function(a){return(new DOMParser).parseFromString(a,"text/xml")};
      +Blockly.utils.xml.domToText=function(a){return(new XMLSerializer).serializeToString(a)};Blockly.Events.BlockBase=function(a){Blockly.Events.BlockBase.superClass_.constructor.call(this);this.blockId=a.id;this.workspaceId=a.workspace.id};Blockly.utils.object.inherits(Blockly.Events.BlockBase,Blockly.Events.Abstract);Blockly.Events.BlockBase.prototype.toJson=function(){var a=Blockly.Events.BlockBase.superClass_.toJson.call(this);a.blockId=this.blockId;return a};
      +Blockly.Events.BlockBase.prototype.fromJson=function(a){Blockly.Events.BlockBase.superClass_.fromJson.call(this,a);this.blockId=a.blockId};Blockly.Events.Change=function(a,b,c,d,e){a&&(Blockly.Events.Change.superClass_.constructor.call(this,a),this.element=b,this.name=c,this.oldValue=d,this.newValue=e)};Blockly.utils.object.inherits(Blockly.Events.Change,Blockly.Events.BlockBase);Blockly.Events.BlockChange=Blockly.Events.Change;Blockly.Events.Change.prototype.type=Blockly.Events.CHANGE;
      +Blockly.Events.Change.prototype.toJson=function(){var a=Blockly.Events.Change.superClass_.toJson.call(this);a.element=this.element;this.name&&(a.name=this.name);a.newValue=this.newValue;return a};Blockly.Events.Change.prototype.fromJson=function(a){Blockly.Events.Change.superClass_.fromJson.call(this,a);this.element=a.element;this.name=a.name;this.newValue=a.newValue};Blockly.Events.Change.prototype.isNull=function(){return this.oldValue==this.newValue};
      +Blockly.Events.Change.prototype.run=function(a){var b=this.getEventWorkspace_().getBlockById(this.blockId);if(b)switch(b.mutator&&b.mutator.setVisible(!1),a=a?this.newValue:this.oldValue,this.element){case "field":(b=b.getField(this.name))?b.setValue(a):console.warn("Can't set non-existent field: "+this.name);break;case "comment":b.setCommentText(a||null);break;case "collapsed":b.setCollapsed(!!a);break;case "disabled":b.setEnabled(!a);break;case "inline":b.setInputsInline(!!a);break;case "mutation":var c=
      +"";b.mutationToDom&&(c=(c=b.mutationToDom())&&Blockly.Xml.domToText(c));if(b.domToMutation){var d=Blockly.Xml.textToDom(a||"");b.domToMutation(d)}Blockly.Events.fire(new Blockly.Events.Change(b,"mutation",null,c,a));break;default:console.warn("Unknown change type: "+this.element)}else console.warn("Can't change non-existent block: "+this.blockId)};
      +Blockly.Events.Create=function(a){a&&(Blockly.Events.Create.superClass_.constructor.call(this,a),this.xml=a.workspace.rendered?Blockly.Xml.blockToDomWithXY(a):Blockly.Xml.blockToDom(a),this.ids=Blockly.Events.getDescendantIds(a))};Blockly.utils.object.inherits(Blockly.Events.Create,Blockly.Events.BlockBase);Blockly.Events.BlockCreate=Blockly.Events.Create;Blockly.Events.Create.prototype.type=Blockly.Events.CREATE;
      +Blockly.Events.Create.prototype.toJson=function(){var a=Blockly.Events.Create.superClass_.toJson.call(this);a.xml=Blockly.Xml.domToText(this.xml);a.ids=this.ids;return a};Blockly.Events.Create.prototype.fromJson=function(a){Blockly.Events.Create.superClass_.fromJson.call(this,a);this.xml=Blockly.Xml.textToDom(a.xml);this.ids=a.ids};
      +Blockly.Events.Create.prototype.run=function(a){var b=this.getEventWorkspace_();if(a)a=Blockly.utils.xml.createElement("xml"),a.appendChild(this.xml),Blockly.Xml.domToWorkspace(a,b);else{a=0;for(var c;c=this.ids[a];a++){var d=b.getBlockById(c);d?d.dispose(!1):c==this.blockId&&console.warn("Can't uncreate non-existent block: "+c)}}};
      +Blockly.Events.Delete=function(a){if(a){if(a.getParent())throw Error("Connected blocks cannot be deleted.");Blockly.Events.Delete.superClass_.constructor.call(this,a);this.oldXml=a.workspace.rendered?Blockly.Xml.blockToDomWithXY(a):Blockly.Xml.blockToDom(a);this.ids=Blockly.Events.getDescendantIds(a)}};Blockly.utils.object.inherits(Blockly.Events.Delete,Blockly.Events.BlockBase);Blockly.Events.BlockDelete=Blockly.Events.Delete;Blockly.Events.Delete.prototype.type=Blockly.Events.DELETE;
      +Blockly.Events.Delete.prototype.toJson=function(){var a=Blockly.Events.Delete.superClass_.toJson.call(this);a.ids=this.ids;return a};Blockly.Events.Delete.prototype.fromJson=function(a){Blockly.Events.Delete.superClass_.fromJson.call(this,a);this.ids=a.ids};
      +Blockly.Events.Delete.prototype.run=function(a){var b=this.getEventWorkspace_();if(a){a=0;for(var c;c=this.ids[a];a++){var d=b.getBlockById(c);d?d.dispose(!1):c==this.blockId&&console.warn("Can't delete non-existent block: "+c)}}else a=Blockly.utils.xml.createElement("xml"),a.appendChild(this.oldXml),Blockly.Xml.domToWorkspace(a,b)};
      +Blockly.Events.Move=function(a){a&&(Blockly.Events.Move.superClass_.constructor.call(this,a),a=this.currentLocation_(),this.oldParentId=a.parentId,this.oldInputName=a.inputName,this.oldCoordinate=a.coordinate)};Blockly.utils.object.inherits(Blockly.Events.Move,Blockly.Events.BlockBase);Blockly.Events.BlockMove=Blockly.Events.Move;Blockly.Events.Move.prototype.type=Blockly.Events.MOVE;
      +Blockly.Events.Move.prototype.toJson=function(){var a=Blockly.Events.Move.superClass_.toJson.call(this);this.newParentId&&(a.newParentId=this.newParentId);this.newInputName&&(a.newInputName=this.newInputName);this.newCoordinate&&(a.newCoordinate=Math.round(this.newCoordinate.x)+","+Math.round(this.newCoordinate.y));return a};
      +Blockly.Events.Move.prototype.fromJson=function(a){Blockly.Events.Move.superClass_.fromJson.call(this,a);this.newParentId=a.newParentId;this.newInputName=a.newInputName;a.newCoordinate&&(a=a.newCoordinate.split(","),this.newCoordinate=new Blockly.utils.Coordinate(Number(a[0]),Number(a[1])))};Blockly.Events.Move.prototype.recordNew=function(){var a=this.currentLocation_();this.newParentId=a.parentId;this.newInputName=a.inputName;this.newCoordinate=a.coordinate};
      +Blockly.Events.Move.prototype.currentLocation_=function(){var a=this.getEventWorkspace_().getBlockById(this.blockId),b={},c=a.getParent();if(c){if(b.parentId=c.id,a=c.getInputWithBlock(a))b.inputName=a.name}else b.coordinate=a.getRelativeToSurfaceXY();return b};Blockly.Events.Move.prototype.isNull=function(){return this.oldParentId==this.newParentId&&this.oldInputName==this.newInputName&&Blockly.utils.Coordinate.equals(this.oldCoordinate,this.newCoordinate)};
      +Blockly.Events.Move.prototype.run=function(a){var b=this.getEventWorkspace_(),c=b.getBlockById(this.blockId);if(c){var d=a?this.newParentId:this.oldParentId,e=a?this.newInputName:this.oldInputName;a=a?this.newCoordinate:this.oldCoordinate;var f=null;if(d&&(f=b.getBlockById(d),!f)){console.warn("Can't connect to non-existent block: "+d);return}c.getParent()&&c.unplug();if(a)e=c.getRelativeToSurfaceXY(),c.moveBy(a.x-e.x,a.y-e.y);else{c=c.outputConnection||c.previousConnection;if(e){if(b=f.getInput(e))var g=
      +b.connection}else c.type==Blockly.PREVIOUS_STATEMENT&&(g=f.nextConnection);g?c.connect(g):console.warn("Can't connect to non-existent input: "+e)}}else console.warn("Can't move non-existent block: "+this.blockId)};Blockly.Events.FinishedLoading=function(a){this.workspaceId=a.id;this.group=Blockly.Events.getGroup();this.recordUndo=!1};Blockly.utils.object.inherits(Blockly.Events.FinishedLoading,Blockly.Events.Abstract);Blockly.Events.FinishedLoading.prototype.type=Blockly.Events.FINISHED_LOADING;Blockly.Events.FinishedLoading.prototype.toJson=function(){var a={type:this.type};this.group&&(a.group=this.group);this.workspaceId&&(a.workspaceId=this.workspaceId);return a};
      +Blockly.Events.FinishedLoading.prototype.fromJson=function(a){this.workspaceId=a.workspaceId;this.group=a.group};Blockly.Events.VarBase=function(a){Blockly.Events.VarBase.superClass_.constructor.call(this);this.varId=a.getId();this.workspaceId=a.workspace.id};Blockly.utils.object.inherits(Blockly.Events.VarBase,Blockly.Events.Abstract);Blockly.Events.VarBase.prototype.toJson=function(){var a=Blockly.Events.VarBase.superClass_.toJson.call(this);a.varId=this.varId;return a};Blockly.Events.VarBase.prototype.fromJson=function(a){Blockly.Events.VarBase.superClass_.toJson.call(this);this.varId=a.varId};
      +Blockly.Events.VarCreate=function(a){a&&(Blockly.Events.VarCreate.superClass_.constructor.call(this,a),this.varType=a.type,this.varName=a.name)};Blockly.utils.object.inherits(Blockly.Events.VarCreate,Blockly.Events.VarBase);Blockly.Events.VarCreate.prototype.type=Blockly.Events.VAR_CREATE;Blockly.Events.VarCreate.prototype.toJson=function(){var a=Blockly.Events.VarCreate.superClass_.toJson.call(this);a.varType=this.varType;a.varName=this.varName;return a};
      +Blockly.Events.VarCreate.prototype.fromJson=function(a){Blockly.Events.VarCreate.superClass_.fromJson.call(this,a);this.varType=a.varType;this.varName=a.varName};Blockly.Events.VarCreate.prototype.run=function(a){var b=this.getEventWorkspace_();a?b.createVariable(this.varName,this.varType,this.varId):b.deleteVariableById(this.varId)};Blockly.Events.VarDelete=function(a){a&&(Blockly.Events.VarDelete.superClass_.constructor.call(this,a),this.varType=a.type,this.varName=a.name)};
      +Blockly.utils.object.inherits(Blockly.Events.VarDelete,Blockly.Events.VarBase);Blockly.Events.VarDelete.prototype.type=Blockly.Events.VAR_DELETE;Blockly.Events.VarDelete.prototype.toJson=function(){var a=Blockly.Events.VarDelete.superClass_.toJson.call(this);a.varType=this.varType;a.varName=this.varName;return a};Blockly.Events.VarDelete.prototype.fromJson=function(a){Blockly.Events.VarDelete.superClass_.fromJson.call(this,a);this.varType=a.varType;this.varName=a.varName};
      +Blockly.Events.VarDelete.prototype.run=function(a){var b=this.getEventWorkspace_();a?b.deleteVariableById(this.varId):b.createVariable(this.varName,this.varType,this.varId)};Blockly.Events.VarRename=function(a,b){a&&(Blockly.Events.VarRename.superClass_.constructor.call(this,a),this.oldName=a.name,this.newName=b)};Blockly.utils.object.inherits(Blockly.Events.VarRename,Blockly.Events.VarBase);Blockly.Events.VarRename.prototype.type=Blockly.Events.VAR_RENAME;
      +Blockly.Events.VarRename.prototype.toJson=function(){var a=Blockly.Events.VarRename.superClass_.toJson.call(this);a.oldName=this.oldName;a.newName=this.newName;return a};Blockly.Events.VarRename.prototype.fromJson=function(a){Blockly.Events.VarRename.superClass_.fromJson.call(this,a);this.oldName=a.oldName;this.newName=a.newName};Blockly.Events.VarRename.prototype.run=function(a){var b=this.getEventWorkspace_();a?b.renameVariableById(this.varId,this.newName):b.renameVariableById(this.varId,this.oldName)};Blockly.utils.dom={};Blockly.utils.dom.SVG_NS="http://www.w3.org/2000/svg";Blockly.utils.dom.HTML_NS="http://www.w3.org/1999/xhtml";Blockly.utils.dom.XLINK_NS="http://www.w3.org/1999/xlink";Blockly.utils.dom.Node={ELEMENT_NODE:1,TEXT_NODE:3,COMMENT_NODE:8,DOCUMENT_POSITION_CONTAINED_BY:16};Blockly.utils.dom.cacheWidths_=null;Blockly.utils.dom.cacheReference_=0;
      +Blockly.utils.dom.createSvgElement=function(a,b,c){a=document.createElementNS(Blockly.utils.dom.SVG_NS,a);for(var d in b)a.setAttribute(d,b[d]);document.body.runtimeStyle&&(a.runtimeStyle=a.currentStyle=a.style);c&&c.appendChild(a);return a};Blockly.utils.dom.addClass=function(a,b){var c=a.getAttribute("class")||"";if(-1!=(" "+c+" ").indexOf(" "+b+" "))return!1;c&&(c+=" ");a.setAttribute("class",c+b);return!0};
      +Blockly.utils.dom.removeClass=function(a,b){var c=a.getAttribute("class");if(-1==(" "+c+" ").indexOf(" "+b+" "))return!1;c=c.split(/\s+/);for(var d=0;d]*[^/])?>[^<]*)\n([^<]*<\/)/;do{var c=a;a=a.replace(b,"$1
      $2")}while(a!=c);return a};Blockly.Xml.domToPrettyText=function(a){a=Blockly.Xml.domToText(a).split("<");for(var b="",c=1;c"!=d.slice(-2)&&(b+="  ")}a=a.join("\n");a=a.replace(/(<(\w+)\b[^>]*>[^\n]*)\n *<\/\2>/g,"$1");return a.replace(/^\n/,"")};
      +Blockly.Xml.textToDom=function(a){var b=Blockly.utils.xml.textToDomDocument(a);if(!b||!b.documentElement||b.getElementsByTagName("parsererror").length)throw Error("textToDom was unable to parse: "+a);return b.documentElement};Blockly.Xml.clearWorkspaceAndLoadFromXml=function(a,b){b.setResizesEnabled(!1);b.clear();var c=Blockly.Xml.domToWorkspace(a,b);b.setResizesEnabled(!0);return c};
      +Blockly.Xml.domToWorkspace=function(a,b){if(a instanceof Blockly.Workspace){var c=a;a=b;b=c;console.warn("Deprecated call to Blockly.Xml.domToWorkspace, swap the arguments.")}var d;b.RTL&&(d=b.getWidth());c=[];Blockly.utils.dom.startTextWidthCache();var e=a.childNodes.length,f=Blockly.Events.getGroup();f||Blockly.Events.setGroup(!0);b.setResizesEnabled&&b.setResizesEnabled(!1);var g=!0;try{for(var h=0;hc)){var d=b.getSvgXY(a.getSvgRoot());a.outputConnection?(d.x+=(a.RTL?3:-3)*c,d.y+=13*c):a.previousConnection&&(d.x+=(a.RTL?-23:23)*c,d.y+=3*c);a=Blockly.utils.dom.createSvgElement("circle",{cx:d.x,cy:d.y,r:0,fill:"none",stroke:"#888","stroke-width":10},b.getParentSvg());Blockly.blockAnimations.connectionUiStep_(a,new Date,c)}};
      +Blockly.blockAnimations.connectionUiStep_=function(a,b,c){var d=(new Date-b)/150;1a.workspace.scale)){var b=a.getHeightWidth().height;b=Math.atan(10/b)/Math.PI*180;a.RTL||(b*=-1);Blockly.blockAnimations.disconnectUiStep_(a.getSvgRoot(),b,new Date)}};
      +Blockly.blockAnimations.disconnectUiStep_=function(a,b,c){var d=(new Date-c)/200;1c-Blockly.CURRENT_CONNECTION_PREFERENCE)}if(this.localConnection_||this.closestConnection_)console.error("Only one of localConnection_ and closestConnection_ was set.");
      +else return!0}else return!(!this.localConnection_||!this.closestConnection_);console.error("Returning true from shouldUpdatePreviews, but it's not clear why.");return!0};Blockly.InsertionMarkerManager.prototype.getCandidate_=function(a){for(var b=this.getStartRadius_(),c=null,d=null,e=0;e=c+this.handleLength_&&(d+=
      +e);this.setHandlePosition(this.constrainHandle_(d));this.onScroll_();a.stopPropagation();a.preventDefault()}};
      +Blockly.Scrollbar.prototype.onMouseDownHandle_=function(a){this.workspace_.markFocused();this.cleanUp_();Blockly.utils.isRightButton(a)?a.stopPropagation():(this.startDragHandle=this.handlePosition_,this.workspace_.setupDragSurface(),this.startDragMouse_=this.horizontal_?a.clientX:a.clientY,Blockly.Scrollbar.onMouseUpWrapper_=Blockly.bindEventWithChecks_(document,"mouseup",this,this.onMouseUpHandle_),Blockly.Scrollbar.onMouseMoveWrapper_=Blockly.bindEventWithChecks_(document,"mousemove",this,this.onMouseMoveHandle_),
      +a.stopPropagation(),a.preventDefault())};Blockly.Scrollbar.prototype.onMouseMoveHandle_=function(a){this.setHandlePosition(this.constrainHandle_(this.startDragHandle+((this.horizontal_?a.clientX:a.clientY)-this.startDragMouse_)));this.onScroll_()};Blockly.Scrollbar.prototype.onMouseUpHandle_=function(){this.workspace_.resetDragSurface();Blockly.Touch.clearTouchIdentifier();this.cleanUp_()};
      +Blockly.Scrollbar.prototype.cleanUp_=function(){Blockly.hideChaff(!0);Blockly.Scrollbar.onMouseUpWrapper_&&(Blockly.unbindEvent_(Blockly.Scrollbar.onMouseUpWrapper_),Blockly.Scrollbar.onMouseUpWrapper_=null);Blockly.Scrollbar.onMouseMoveWrapper_&&(Blockly.unbindEvent_(Blockly.Scrollbar.onMouseMoveWrapper_),Blockly.Scrollbar.onMouseMoveWrapper_=null)};
      +Blockly.Scrollbar.prototype.constrainHandle_=function(a){return a=0>=a||isNaN(a)||this.scrollViewSize_a)throw Error("Cannot unsubscribe a workspace that hasn't been subscribed.");this.subscribedWorkspaces_.splice(a,1)};Blockly.ThemeManager.prototype.subscribe=function(a,b,c){this.componentDB_[b]||(this.componentDB_[b]=[]);this.componentDB_[b].push({element:a,propertyName:c});b=this.theme_&&this.theme_.getComponentStyle(b);a.style[c]=b||""};
      +Blockly.ThemeManager.prototype.unsubscribe=function(a){if(a)for(var b=Object.keys(this.componentDB_),c=0,d;d=b[c];c++){for(var e=this.componentDB_[d],f=e.length-1;0<=f;f--)e[f].element===a&&e.splice(f,1);this.componentDB_[d].length||delete this.componentDB_[d]}};Blockly.ThemeManager.prototype.dispose=function(){this.componentDB_=this.subscribedWorkspaces_=this.theme_=this.owner_=null};Blockly.Themes={};Blockly.Themes.Classic={};Blockly.Themes.Classic.defaultBlockStyles={colour_blocks:{colourPrimary:"20"},list_blocks:{colourPrimary:"260"},logic_blocks:{colourPrimary:"210"},loop_blocks:{colourPrimary:"120"},math_blocks:{colourPrimary:"230"},procedure_blocks:{colourPrimary:"290"},text_blocks:{colourPrimary:"160"},variable_blocks:{colourPrimary:"330"},variable_dynamic_blocks:{colourPrimary:"310"},hat_blocks:{colourPrimary:"330",hat:"cap"}};
      +Blockly.Themes.Classic.categoryStyles={colour_category:{colour:"20"},list_category:{colour:"260"},logic_category:{colour:"210"},loop_category:{colour:"120"},math_category:{colour:"230"},procedure_category:{colour:"290"},text_category:{colour:"160"},variable_category:{colour:"330"},variable_dynamic_category:{colour:"310"}};Blockly.Themes.Classic=new Blockly.Theme(Blockly.Themes.Classic.defaultBlockStyles,Blockly.Themes.Classic.categoryStyles);Blockly.VariableMap=function(a){this.variableMap_=Object.create(null);this.workspace=a};Blockly.VariableMap.prototype.clear=function(){this.variableMap_=Object.create(null)};Blockly.VariableMap.prototype.renameVariable=function(a,b){var c=this.getVariable(b,a.type),d=this.workspace.getAllBlocks(!1);Blockly.Events.setGroup(!0);try{c&&c.getId()!=a.getId()?this.renameVariableWithConflict_(a,b,c,d):this.renameVariableAndUses_(a,b,d)}finally{Blockly.Events.setGroup(!1)}};
      +Blockly.VariableMap.prototype.renameVariableById=function(a,b){var c=this.getVariableById(a);if(!c)throw Error("Tried to rename a variable that didn't exist. ID: "+a);this.renameVariable(c,b)};Blockly.VariableMap.prototype.renameVariableAndUses_=function(a,b,c){Blockly.Events.fire(new Blockly.Events.VarRename(a,b));a.name=b;for(b=0;bthis.remainingCapacityOfType(c))return!1;b+=a[c]}return b>this.remainingCapacity()?!1:!0};Blockly.Workspace.prototype.hasBlockLimits=function(){return Infinity!=this.options.maxBlocks||!!this.options.maxInstances};
      +Blockly.Workspace.prototype.undo=function(a){var b=a?this.redoStack_:this.undoStack_,c=a?this.undoStack_:this.redoStack_,d=b.pop();if(d){for(var e=[d];b.length&&d.group&&d.group==b[b.length-1].group;)e.push(b.pop());for(b=0;d=e[b];b++)c.push(d);e=Blockly.Events.filter(e,a);Blockly.Events.recordUndo=!1;try{for(b=0;d=e[b];b++)d.run(a)}finally{Blockly.Events.recordUndo=!0}}};Blockly.Workspace.prototype.clearUndo=function(){this.undoStack_.length=0;this.redoStack_.length=0;Blockly.Events.clearPendingUndo()};
      +Blockly.Workspace.prototype.addChangeListener=function(a){this.listeners_.push(a);return a};Blockly.Workspace.prototype.removeChangeListener=function(a){Blockly.utils.arrayRemove(this.listeners_,a)};Blockly.Workspace.prototype.fireChangeListener=function(a){if(a.recordUndo)for(this.undoStack_.push(a),this.redoStack_.length=0;this.undoStack_.length>this.MAX_UNDO&&0<=this.MAX_UNDO;)this.undoStack_.shift();for(var b=0,c;c=this.listeners_[b];b++)c(a)};
      +Blockly.Workspace.prototype.getBlockById=function(a){return this.blockDB_[a]||null};Blockly.Workspace.prototype.getCommentById=function(a){return this.commentDB_[a]||null};Blockly.Workspace.prototype.allInputsFilled=function(a){for(var b=this.getTopBlocks(!1),c=0,d;d=b[c];c++)if(!d.allInputsFilled(a))return!1;return!0};Blockly.Workspace.prototype.getPotentialVariableMap=function(){return this.potentialVariableMap_};
      +Blockly.Workspace.prototype.createPotentialVariableMap=function(){this.potentialVariableMap_=new Blockly.VariableMap(this)};Blockly.Workspace.prototype.getVariableMap=function(){return this.variableMap_};Blockly.Workspace.WorkspaceDB_=Object.create(null);Blockly.Workspace.getById=function(a){return Blockly.Workspace.WorkspaceDB_[a]||null};Blockly.Workspace.getAll=function(){var a=[],b;for(b in Blockly.Workspace.WorkspaceDB_)a.push(Blockly.Workspace.WorkspaceDB_[b]);return a};
      +Blockly.Workspace.prototype.getThemeManager=function(){return this.themeManager_};Blockly.Bubble=function(a,b,c,d,e,f){this.workspace_=a;this.content_=b;this.shape_=c;c=Blockly.Bubble.ARROW_ANGLE;this.workspace_.RTL&&(c=-c);this.arrow_radians_=Blockly.utils.math.toRadians(c);a.getBubbleCanvas().appendChild(this.createDom_(b,!(!e||!f)));this.setAnchorLocation(d);e&&f||(b=this.content_.getBBox(),e=b.width+2*Blockly.Bubble.BORDER_WIDTH,f=b.height+2*Blockly.Bubble.BORDER_WIDTH);this.setBubbleSize(e,f);this.positionBubble_();this.renderArrow_();this.rendered_=!0;a.options.readOnly||
      +(Blockly.bindEventWithChecks_(this.bubbleBack_,"mousedown",this,this.bubbleMouseDown_),this.resizeGroup_&&Blockly.bindEventWithChecks_(this.resizeGroup_,"mousedown",this,this.resizeMouseDown_))};Blockly.Bubble.BORDER_WIDTH=6;Blockly.Bubble.ARROW_THICKNESS=5;Blockly.Bubble.ARROW_ANGLE=20;Blockly.Bubble.ARROW_BEND=4;Blockly.Bubble.ANCHOR_RADIUS=8;Blockly.Bubble.onMouseUpWrapper_=null;Blockly.Bubble.onMouseMoveWrapper_=null;Blockly.Bubble.prototype.resizeCallback_=null;
      +Blockly.Bubble.unbindDragEvents_=function(){Blockly.Bubble.onMouseUpWrapper_&&(Blockly.unbindEvent_(Blockly.Bubble.onMouseUpWrapper_),Blockly.Bubble.onMouseUpWrapper_=null);Blockly.Bubble.onMouseMoveWrapper_&&(Blockly.unbindEvent_(Blockly.Bubble.onMouseMoveWrapper_),Blockly.Bubble.onMouseMoveWrapper_=null)};Blockly.Bubble.bubbleMouseUp_=function(){Blockly.Touch.clearTouchIdentifier();Blockly.Bubble.unbindDragEvents_()};Blockly.Bubble.prototype.rendered_=!1;Blockly.Bubble.prototype.anchorXY_=null;
      +Blockly.Bubble.prototype.relativeLeft_=0;Blockly.Bubble.prototype.relativeTop_=0;Blockly.Bubble.prototype.width_=0;Blockly.Bubble.prototype.height_=0;Blockly.Bubble.prototype.autoLayout_=!0;
      +Blockly.Bubble.prototype.createDom_=function(a,b){this.bubbleGroup_=Blockly.utils.dom.createSvgElement("g",{},null);var c={filter:"url(#"+this.workspace_.options.embossFilterId+")"};Blockly.utils.userAgent.JAVA_FX&&(c={});c=Blockly.utils.dom.createSvgElement("g",c,this.bubbleGroup_);this.bubbleArrow_=Blockly.utils.dom.createSvgElement("path",{},c);this.bubbleBack_=Blockly.utils.dom.createSvgElement("rect",{"class":"blocklyDraggable",x:0,y:0,rx:Blockly.Bubble.BORDER_WIDTH,ry:Blockly.Bubble.BORDER_WIDTH},
      +c);b?(this.resizeGroup_=Blockly.utils.dom.createSvgElement("g",{"class":this.workspace_.RTL?"blocklyResizeSW":"blocklyResizeSE"},this.bubbleGroup_),c=2*Blockly.Bubble.BORDER_WIDTH,Blockly.utils.dom.createSvgElement("polygon",{points:"0,x x,x x,0".replace(/x/g,c.toString())},this.resizeGroup_),Blockly.utils.dom.createSvgElement("line",{"class":"blocklyResizeLine",x1:c/3,y1:c-1,x2:c-1,y2:c/3},this.resizeGroup_),Blockly.utils.dom.createSvgElement("line",{"class":"blocklyResizeLine",x1:2*c/3,y1:c-1,x2:c-
      +1,y2:2*c/3},this.resizeGroup_)):this.resizeGroup_=null;this.bubbleGroup_.appendChild(a);return this.bubbleGroup_};Blockly.Bubble.prototype.getSvgRoot=function(){return this.bubbleGroup_};Blockly.Bubble.prototype.setSvgId=function(a){this.bubbleGroup_.dataset&&(this.bubbleGroup_.dataset.blockId=a)};Blockly.Bubble.prototype.bubbleMouseDown_=function(a){var b=this.workspace_.getGesture(a);b&&b.handleBubbleStart(a,this)};Blockly.Bubble.prototype.showContextMenu_=function(a){};
      +Blockly.Bubble.prototype.isDeletable=function(){return!1};
      +Blockly.Bubble.prototype.resizeMouseDown_=function(a){this.promote_();Blockly.Bubble.unbindDragEvents_();Blockly.utils.isRightButton(a)||(this.workspace_.startDrag(a,new Blockly.utils.Coordinate(this.workspace_.RTL?-this.width_:this.width_,this.height_)),Blockly.Bubble.onMouseUpWrapper_=Blockly.bindEventWithChecks_(document,"mouseup",this,Blockly.Bubble.bubbleMouseUp_),Blockly.Bubble.onMouseMoveWrapper_=Blockly.bindEventWithChecks_(document,"mousemove",this,this.resizeMouseMove_),Blockly.hideChaff());
      +a.stopPropagation()};Blockly.Bubble.prototype.resizeMouseMove_=function(a){this.autoLayout_=!1;a=this.workspace_.moveDrag(a);this.setBubbleSize(this.workspace_.RTL?-a.x:a.x,a.y);this.workspace_.RTL&&this.positionBubble_()};Blockly.Bubble.prototype.registerResizeEvent=function(a){this.resizeCallback_=a};Blockly.Bubble.prototype.promote_=function(){var a=this.bubbleGroup_.parentNode;return a.lastChild!==this.bubbleGroup_?(a.appendChild(this.bubbleGroup_),!0):!1};
      +Blockly.Bubble.prototype.setAnchorLocation=function(a){this.anchorXY_=a;this.rendered_&&this.positionBubble_()};
      +Blockly.Bubble.prototype.layoutBubble_=function(){var a=this.workspace_.getMetrics();a.viewLeft/=this.workspace_.scale;a.viewWidth/=this.workspace_.scale;a.viewTop/=this.workspace_.scale;a.viewHeight/=this.workspace_.scale;var b=this.getOptimalRelativeLeft_(a),c=this.getOptimalRelativeTop_(a),d=this.shape_.getBBox(),e={x:b,y:-this.height_-Blockly.BlockSvg.MIN_BLOCK_Y},f={x:-this.width_-30,y:c};c={x:d.width,y:c};var g={x:b,y:d.height};b=d.widtha.viewWidth)return b;if(this.workspace_.RTL)var c=this.anchorXY_.x-b,d=c-this.width_,e=a.viewLeft+a.viewWidth,f=a.viewLeft+Blockly.Scrollbar.scrollbarThickness/this.workspace_.scale;else d=b+this.anchorXY_.x,c=d+this.width_,f=a.viewLeft,e=a.viewLeft+a.viewWidth-Blockly.Scrollbar.scrollbarThickness/this.workspace_.scale;this.workspace_.RTL?de&&(b=-(e-this.anchorXY_.x)):
      +de&&(b=e-this.anchorXY_.x-this.width_);return b};Blockly.Bubble.prototype.getOptimalRelativeTop_=function(a){var b=-this.height_/4;if(this.height_>a.viewHeight)return b;var c=this.anchorXY_.y+b,d=c+this.height_,e=a.viewTop;a=a.viewTop+a.viewHeight-Blockly.Scrollbar.scrollbarThickness/this.workspace_.scale;var f=this.anchorXY_.y;ca&&(b=a-f-this.height_);return b};
      +Blockly.Bubble.prototype.positionBubble_=function(){var a=this.anchorXY_.x;a=this.workspace_.RTL?a-(this.relativeLeft_+this.width_):a+this.relativeLeft_;this.moveTo(a,this.relativeTop_+this.anchorXY_.y)};Blockly.Bubble.prototype.moveTo=function(a,b){this.bubbleGroup_.setAttribute("transform","translate("+a+","+b+")")};Blockly.Bubble.prototype.getBubbleSize=function(){return new Blockly.utils.Size(this.width_,this.height_)};
      +Blockly.Bubble.prototype.setBubbleSize=function(a,b){var c=2*Blockly.Bubble.BORDER_WIDTH;a=Math.max(a,c+45);b=Math.max(b,c+20);this.width_=a;this.height_=b;this.bubbleBack_.setAttribute("width",a);this.bubbleBack_.setAttribute("height",b);this.resizeGroup_&&(this.workspace_.RTL?this.resizeGroup_.setAttribute("transform","translate("+2*Blockly.Bubble.BORDER_WIDTH+","+(b-c)+") scale(-1 1)"):this.resizeGroup_.setAttribute("transform","translate("+(a-c)+","+(b-c)+")"));this.autoLayout_&&this.layoutBubble_();
      +this.positionBubble_();this.renderArrow_();this.resizeCallback_&&this.resizeCallback_()};
      +Blockly.Bubble.prototype.renderArrow_=function(){var a=[],b=this.width_/2,c=this.height_/2,d=-this.relativeLeft_,e=-this.relativeTop_;if(b==d&&c==e)a.push("M "+b+","+c);else{e-=c;d-=b;this.workspace_.RTL&&(d*=-1);var f=Math.sqrt(e*e+d*d),g=Math.acos(d/f);0>e&&(g=2*Math.PI-g);var h=g+Math.PI/2;h>2*Math.PI&&(h-=2*Math.PI);var k=Math.sin(h),l=Math.cos(h),m=this.getBubbleSize();h=(m.width+m.height)/Blockly.Bubble.ARROW_THICKNESS;h=Math.min(h,m.width,m.height)/4;m=1-Blockly.Bubble.ANCHOR_RADIUS/f;d=b+
      +m*d;e=c+m*e;m=b+h*l;var n=c+h*k;b-=h*l;c-=h*k;k=g+this.arrow_radians_;k>2*Math.PI&&(k-=2*Math.PI);g=Math.sin(k)*f/Blockly.Bubble.ARROW_BEND;f=Math.cos(k)*f/Blockly.Bubble.ARROW_BEND;a.push("M"+m+","+n);a.push("C"+(m+f)+","+(n+g)+" "+d+","+e+" "+d+","+e);a.push("C"+d+","+e+" "+(b+f)+","+(c+g)+" "+b+","+c)}a.push("z");this.bubbleArrow_.setAttribute("d",a.join(" "))};Blockly.Bubble.prototype.setColour=function(a){this.bubbleBack_.setAttribute("fill",a);this.bubbleArrow_.setAttribute("fill",a)};
      +Blockly.Bubble.prototype.dispose=function(){Blockly.Bubble.unbindDragEvents_();Blockly.utils.dom.removeNode(this.bubbleGroup_);this.shape_=this.content_=this.workspace_=this.resizeGroup_=this.bubbleBack_=this.bubbleArrow_=this.bubbleGroup_=null};Blockly.Bubble.prototype.moveDuringDrag=function(a,b){a?a.translateSurface(b.x,b.y):this.moveTo(b.x,b.y);this.relativeLeft_=this.workspace_.RTL?this.anchorXY_.x-b.x-this.width_:b.x-this.anchorXY_.x;this.relativeTop_=b.y-this.anchorXY_.y;this.renderArrow_()};
      +Blockly.Bubble.prototype.getRelativeToSurfaceXY=function(){return new Blockly.utils.Coordinate(this.anchorXY_.x+this.relativeLeft_,this.anchorXY_.y+this.relativeTop_)};Blockly.Bubble.prototype.setAutoLayout=function(a){this.autoLayout_=a};Blockly.Events.CommentBase=function(a){this.commentId=a.id;this.workspaceId=a.workspace.id;this.group=Blockly.Events.getGroup();this.recordUndo=Blockly.Events.recordUndo};Blockly.utils.object.inherits(Blockly.Events.CommentBase,Blockly.Events.Abstract);Blockly.Events.CommentBase.prototype.toJson=function(){var a=Blockly.Events.CommentBase.superClass_.toJson.call(this);this.commentId&&(a.commentId=this.commentId);return a};
      +Blockly.Events.CommentBase.prototype.fromJson=function(a){Blockly.Events.CommentBase.superClass_.fromJson.call(this,a);this.commentId=a.commentId};Blockly.Events.CommentChange=function(a,b,c){a&&(Blockly.Events.CommentChange.superClass_.constructor.call(this,a),this.oldContents_=b,this.newContents_=c)};Blockly.utils.object.inherits(Blockly.Events.CommentChange,Blockly.Events.CommentBase);Blockly.Events.CommentChange.prototype.type=Blockly.Events.COMMENT_CHANGE;
      +Blockly.Events.CommentChange.prototype.toJson=function(){var a=Blockly.Events.CommentChange.superClass_.toJson.call(this);a.newContents=this.newContents_;return a};Blockly.Events.CommentChange.prototype.fromJson=function(a){Blockly.Events.CommentChange.superClass_.fromJson.call(this,a);this.newContents_=a.newValue};Blockly.Events.CommentChange.prototype.isNull=function(){return this.oldContents_==this.newContents_};
      +Blockly.Events.CommentChange.prototype.run=function(a){var b=this.getEventWorkspace_().getCommentById(this.commentId);b?b.setContent(a?this.newContents_:this.oldContents_):console.warn("Can't change non-existent comment: "+this.commentId)};Blockly.Events.CommentCreate=function(a){a&&(Blockly.Events.CommentCreate.superClass_.constructor.call(this,a),this.xml=a.toXmlWithXY())};Blockly.utils.object.inherits(Blockly.Events.CommentCreate,Blockly.Events.CommentBase);
      +Blockly.Events.CommentCreate.prototype.type=Blockly.Events.COMMENT_CREATE;Blockly.Events.CommentCreate.prototype.toJson=function(){var a=Blockly.Events.CommentCreate.superClass_.toJson.call(this);a.xml=Blockly.Xml.domToText(this.xml);return a};Blockly.Events.CommentCreate.prototype.fromJson=function(a){Blockly.Events.CommentCreate.superClass_.fromJson.call(this,a);this.xml=Blockly.Xml.textToDom(a.xml)};
      +Blockly.Events.CommentCreate.prototype.run=function(a){Blockly.Events.CommentCreateDeleteHelper(this,a)};Blockly.Events.CommentCreateDeleteHelper=function(a,b){var c=a.getEventWorkspace_();if(b){var d=Blockly.utils.xml.createElement("xml");d.appendChild(a.xml);Blockly.Xml.domToWorkspace(d,c)}else(c=c.getCommentById(a.commentId))?c.dispose(!1,!1):console.warn("Can't uncreate non-existent comment: "+a.commentId)};
      +Blockly.Events.CommentDelete=function(a){a&&(Blockly.Events.CommentDelete.superClass_.constructor.call(this,a),this.xml=a.toXmlWithXY())};Blockly.utils.object.inherits(Blockly.Events.CommentDelete,Blockly.Events.CommentBase);Blockly.Events.CommentDelete.prototype.type=Blockly.Events.COMMENT_DELETE;Blockly.Events.CommentDelete.prototype.toJson=function(){return Blockly.Events.CommentDelete.superClass_.toJson.call(this)};
      +Blockly.Events.CommentDelete.prototype.fromJson=function(a){Blockly.Events.CommentDelete.superClass_.fromJson.call(this,a)};Blockly.Events.CommentDelete.prototype.run=function(a){Blockly.Events.CommentCreateDeleteHelper(this,!a)};Blockly.Events.CommentMove=function(a){a&&(Blockly.Events.CommentMove.superClass_.constructor.call(this,a),this.comment_=a,this.oldCoordinate_=a.getXY(),this.newCoordinate_=null)};Blockly.utils.object.inherits(Blockly.Events.CommentMove,Blockly.Events.CommentBase);
      +Blockly.Events.CommentMove.prototype.recordNew=function(){if(!this.comment_)throw Error("Tried to record the new position of a comment on the same event twice.");this.newCoordinate_=this.comment_.getXY();this.comment_=null};Blockly.Events.CommentMove.prototype.type=Blockly.Events.COMMENT_MOVE;Blockly.Events.CommentMove.prototype.setOldCoordinate=function(a){this.oldCoordinate_=a};
      +Blockly.Events.CommentMove.prototype.toJson=function(){var a=Blockly.Events.CommentMove.superClass_.toJson.call(this);this.newCoordinate_&&(a.newCoordinate=Math.round(this.newCoordinate_.x)+","+Math.round(this.newCoordinate_.y));return a};Blockly.Events.CommentMove.prototype.fromJson=function(a){Blockly.Events.CommentMove.superClass_.fromJson.call(this,a);a.newCoordinate&&(a=a.newCoordinate.split(","),this.newCoordinate_=new Blockly.utils.Coordinate(Number(a[0]),Number(a[1])))};
      +Blockly.Events.CommentMove.prototype.isNull=function(){return Blockly.utils.Coordinate.equals(this.oldCoordinate_,this.newCoordinate_)};Blockly.Events.CommentMove.prototype.run=function(a){var b=this.getEventWorkspace_().getCommentById(this.commentId);if(b){a=a?this.newCoordinate_:this.oldCoordinate_;var c=b.getXY();b.moveBy(a.x-c.x,a.y-c.y)}else console.warn("Can't move non-existent comment: "+this.commentId)};Blockly.BubbleDragger=function(a,b){this.draggingBubble_=a;this.workspace_=b;this.deleteArea_=null;this.wouldDeleteBubble_=!1;this.startXY_=this.draggingBubble_.getRelativeToSurfaceXY();this.dragSurface_=Blockly.utils.is3dSupported()&&b.getBlockDragSurface()?b.getBlockDragSurface():null};Blockly.BubbleDragger.prototype.dispose=function(){this.dragSurface_=this.workspace_=this.draggingBubble_=null};
      +Blockly.BubbleDragger.prototype.startBubbleDrag=function(){Blockly.Events.getGroup()||Blockly.Events.setGroup(!0);this.workspace_.setResizesEnabled(!1);this.draggingBubble_.setAutoLayout(!1);this.dragSurface_&&this.moveToDragSurface_();this.draggingBubble_.setDragging&&this.draggingBubble_.setDragging(!0);var a=this.workspace_.getToolbox();if(a){var b=this.draggingBubble_.isDeletable()?"blocklyToolboxDelete":"blocklyToolboxGrab";a.addStyle(b)}};
      +Blockly.BubbleDragger.prototype.dragBubble=function(a,b){var c=this.pixelsToWorkspaceUnits_(b);c=Blockly.utils.Coordinate.sum(this.startXY_,c);this.draggingBubble_.moveDuringDrag(this.dragSurface_,c);this.draggingBubble_.isDeletable()&&(this.deleteArea_=this.workspace_.isDeleteArea(a),this.updateCursorDuringBubbleDrag_())};
      +Blockly.BubbleDragger.prototype.maybeDeleteBubble_=function(){var a=this.workspace_.trashcan;this.wouldDeleteBubble_?(a&&setTimeout(a.close.bind(a),100),this.fireMoveEvent_(),this.draggingBubble_.dispose(!1,!0)):a&&a.close();return this.wouldDeleteBubble_};
      +Blockly.BubbleDragger.prototype.updateCursorDuringBubbleDrag_=function(){this.wouldDeleteBubble_=this.deleteArea_!=Blockly.DELETE_AREA_NONE;var a=this.workspace_.trashcan;this.wouldDeleteBubble_?(this.draggingBubble_.setDeleteStyle(!0),this.deleteArea_==Blockly.DELETE_AREA_TRASH&&a&&a.setOpen_(!0)):(this.draggingBubble_.setDeleteStyle(!1),a&&a.setOpen_(!1))};
      +Blockly.BubbleDragger.prototype.endBubbleDrag=function(a,b){this.dragBubble(a,b);var c=this.pixelsToWorkspaceUnits_(b);c=Blockly.utils.Coordinate.sum(this.startXY_,c);this.draggingBubble_.moveTo(c.x,c.y);this.maybeDeleteBubble_()||(this.dragSurface_&&this.dragSurface_.clearAndHide(this.workspace_.getBubbleCanvas()),this.draggingBubble_.setDragging&&this.draggingBubble_.setDragging(!1),this.fireMoveEvent_());this.workspace_.setResizesEnabled(!0);this.workspace_.toolbox_&&(c=this.draggingBubble_.isDeletable()?
      +"blocklyToolboxDelete":"blocklyToolboxGrab",this.workspace_.toolbox_.removeStyle(c));Blockly.Events.setGroup(!1)};Blockly.BubbleDragger.prototype.fireMoveEvent_=function(){if(this.draggingBubble_.isComment){var a=new Blockly.Events.CommentMove(this.draggingBubble_);a.setOldCoordinate(this.startXY_);a.recordNew();Blockly.Events.fire(a)}};
      +Blockly.BubbleDragger.prototype.pixelsToWorkspaceUnits_=function(a){a=new Blockly.utils.Coordinate(a.x/this.workspace_.scale,a.y/this.workspace_.scale);this.workspace_.isMutator&&a.scale(1/this.workspace_.options.parentWorkspace.scale);return a};Blockly.BubbleDragger.prototype.moveToDragSurface_=function(){this.draggingBubble_.moveTo(0,0);this.dragSurface_.translateSurface(this.startXY_.x,this.startXY_.y);this.dragSurface_.setBlocksAndShow(this.draggingBubble_.getSvgRoot())};Blockly.constants={};Blockly.LINE_MODE_MULTIPLIER=40;Blockly.PAGE_MODE_MULTIPLIER=125;Blockly.DRAG_RADIUS=5;Blockly.FLYOUT_DRAG_RADIUS=10;Blockly.SNAP_RADIUS=28;Blockly.CONNECTING_SNAP_RADIUS=Blockly.SNAP_RADIUS;Blockly.CURRENT_CONNECTION_PREFERENCE=8;Blockly.INSERTION_MARKER_COLOUR="#000000";Blockly.BUMP_DELAY=250;Blockly.BUMP_RANDOMNESS=10;Blockly.COLLAPSE_CHARS=30;Blockly.LONGPRESS=750;Blockly.SOUND_LIMIT=100;Blockly.DRAG_STACK=!0;Blockly.HSV_SATURATION=.45;Blockly.HSV_VALUE=.65;
      +Blockly.SPRITE={width:96,height:124,url:"sprites.png"};Blockly.INPUT_VALUE=1;Blockly.OUTPUT_VALUE=2;Blockly.NEXT_STATEMENT=3;Blockly.PREVIOUS_STATEMENT=4;Blockly.DUMMY_INPUT=5;Blockly.ALIGN_LEFT=-1;Blockly.ALIGN_CENTRE=0;Blockly.ALIGN_RIGHT=1;Blockly.DRAG_NONE=0;Blockly.DRAG_STICKY=1;Blockly.DRAG_BEGIN=1;Blockly.DRAG_FREE=2;Blockly.OPPOSITE_TYPE=[];Blockly.OPPOSITE_TYPE[Blockly.INPUT_VALUE]=Blockly.OUTPUT_VALUE;Blockly.OPPOSITE_TYPE[Blockly.OUTPUT_VALUE]=Blockly.INPUT_VALUE;
      +Blockly.OPPOSITE_TYPE[Blockly.NEXT_STATEMENT]=Blockly.PREVIOUS_STATEMENT;Blockly.OPPOSITE_TYPE[Blockly.PREVIOUS_STATEMENT]=Blockly.NEXT_STATEMENT;Blockly.TOOLBOX_AT_TOP=0;Blockly.TOOLBOX_AT_BOTTOM=1;Blockly.TOOLBOX_AT_LEFT=2;Blockly.TOOLBOX_AT_RIGHT=3;Blockly.DELETE_AREA_NONE=null;Blockly.DELETE_AREA_TRASH=1;Blockly.DELETE_AREA_TOOLBOX=2;Blockly.VARIABLE_CATEGORY_NAME="VARIABLE";Blockly.VARIABLE_DYNAMIC_CATEGORY_NAME="VARIABLE_DYNAMIC";Blockly.PROCEDURE_CATEGORY_NAME="PROCEDURE";
      +Blockly.RENAME_VARIABLE_ID="RENAME_VARIABLE_ID";Blockly.DELETE_VARIABLE_ID="DELETE_VARIABLE_ID";Blockly.Events.Ui=function(a,b,c,d){Blockly.Events.Ui.superClass_.constructor.call(this);this.blockId=a?a.id:null;this.workspaceId=a?a.workspace.id:void 0;this.element=b;this.oldValue=c;this.newValue=d;this.recordUndo=!1};Blockly.utils.object.inherits(Blockly.Events.Ui,Blockly.Events.Abstract);Blockly.Events.Ui.prototype.type=Blockly.Events.UI;
      +Blockly.Events.Ui.prototype.toJson=function(){var a=Blockly.Events.Ui.superClass_.toJson.call(this);a.element=this.element;void 0!==this.newValue&&(a.newValue=this.newValue);this.blockId&&(a.blockId=this.blockId);return a};Blockly.Events.Ui.prototype.fromJson=function(a){Blockly.Events.Ui.superClass_.fromJson.call(this,a);this.element=a.element;this.newValue=a.newValue;this.blockId=a.blockId};Blockly.WorkspaceDragger=function(a){this.workspace_=a;this.startScrollXY_=new Blockly.utils.Coordinate(a.scrollX,a.scrollY)};Blockly.WorkspaceDragger.prototype.dispose=function(){this.workspace_=null};Blockly.WorkspaceDragger.prototype.startDrag=function(){Blockly.selected&&Blockly.selected.unselect();this.workspace_.setupDragSurface()};Blockly.WorkspaceDragger.prototype.endDrag=function(a){this.drag(a);this.workspace_.resetDragSurface()};
      +Blockly.WorkspaceDragger.prototype.drag=function(a){a=Blockly.utils.Coordinate.sum(this.startScrollXY_,a);this.workspace_.scroll(a.x,a.y)};Blockly.FlyoutDragger=function(a){Blockly.FlyoutDragger.superClass_.constructor.call(this,a.getWorkspace());this.scrollbar_=a.scrollbar_;this.horizontalLayout_=a.horizontalLayout_};Blockly.utils.object.inherits(Blockly.FlyoutDragger,Blockly.WorkspaceDragger);Blockly.FlyoutDragger.prototype.drag=function(a){a=Blockly.utils.Coordinate.sum(this.startScrollXY_,a);this.horizontalLayout_?this.scrollbar_.set(-a.x):this.scrollbar_.set(-a.y)};Blockly.Tooltip={};Blockly.Tooltip.visible=!1;Blockly.Tooltip.blocked_=!1;Blockly.Tooltip.LIMIT=50;Blockly.Tooltip.mouseOutPid_=0;Blockly.Tooltip.showPid_=0;Blockly.Tooltip.lastX_=0;Blockly.Tooltip.lastY_=0;Blockly.Tooltip.element_=null;Blockly.Tooltip.poisonedElement_=null;Blockly.Tooltip.OFFSET_X=0;Blockly.Tooltip.OFFSET_Y=10;Blockly.Tooltip.RADIUS_OK=10;Blockly.Tooltip.HOVER_MS=750;Blockly.Tooltip.MARGINS=5;Blockly.Tooltip.DIV=null;
      +Blockly.Tooltip.createDom=function(){Blockly.Tooltip.DIV||(Blockly.Tooltip.DIV=document.createElement("div"),Blockly.Tooltip.DIV.className="blocklyTooltipDiv",document.body.appendChild(Blockly.Tooltip.DIV))};Blockly.Tooltip.bindMouseEvents=function(a){Blockly.bindEvent_(a,"mouseover",null,Blockly.Tooltip.onMouseOver_);Blockly.bindEvent_(a,"mouseout",null,Blockly.Tooltip.onMouseOut_);a.addEventListener("mousemove",Blockly.Tooltip.onMouseMove_,!1)};
      +Blockly.Tooltip.onMouseOver_=function(a){if(!Blockly.Tooltip.blocked_){for(a=a.currentTarget;"string"!=typeof a.tooltip&&"function"!=typeof a.tooltip;)a=a.tooltip;Blockly.Tooltip.element_!=a&&(Blockly.Tooltip.hide(),Blockly.Tooltip.poisonedElement_=null,Blockly.Tooltip.element_=a);clearTimeout(Blockly.Tooltip.mouseOutPid_)}};
      +Blockly.Tooltip.onMouseOut_=function(a){Blockly.Tooltip.blocked_||(Blockly.Tooltip.mouseOutPid_=setTimeout(function(){Blockly.Tooltip.element_=null;Blockly.Tooltip.poisonedElement_=null;Blockly.Tooltip.hide()},1),clearTimeout(Blockly.Tooltip.showPid_))};
      +Blockly.Tooltip.onMouseMove_=function(a){if(Blockly.Tooltip.element_&&Blockly.Tooltip.element_.tooltip&&!Blockly.Tooltip.blocked_)if(Blockly.Tooltip.visible){var b=Blockly.Tooltip.lastX_-a.pageX;a=Blockly.Tooltip.lastY_-a.pageY;Math.sqrt(b*b+a*a)>Blockly.Tooltip.RADIUS_OK&&Blockly.Tooltip.hide()}else Blockly.Tooltip.poisonedElement_!=Blockly.Tooltip.element_&&(clearTimeout(Blockly.Tooltip.showPid_),Blockly.Tooltip.lastX_=a.pageX,Blockly.Tooltip.lastY_=a.pageY,Blockly.Tooltip.showPid_=setTimeout(Blockly.Tooltip.show_,
      +Blockly.Tooltip.HOVER_MS))};Blockly.Tooltip.hide=function(){Blockly.Tooltip.visible&&(Blockly.Tooltip.visible=!1,Blockly.Tooltip.DIV&&(Blockly.Tooltip.DIV.style.display="none"));Blockly.Tooltip.showPid_&&clearTimeout(Blockly.Tooltip.showPid_)};Blockly.Tooltip.block=function(){Blockly.Tooltip.hide();Blockly.Tooltip.blocked_=!0};Blockly.Tooltip.unblock=function(){Blockly.Tooltip.blocked_=!1};
      +Blockly.Tooltip.show_=function(){if(!Blockly.Tooltip.blocked_&&(Blockly.Tooltip.poisonedElement_=Blockly.Tooltip.element_,Blockly.Tooltip.DIV)){Blockly.Tooltip.DIV.innerHTML="";for(var a=Blockly.Tooltip.element_.tooltip;"function"==typeof a;)a=a();a=Blockly.utils.string.wrap(a,Blockly.Tooltip.LIMIT);a=a.split("\n");for(var b=0;bc+window.scrollY&&(e-=Blockly.Tooltip.DIV.offsetHeight+2*Blockly.Tooltip.OFFSET_Y);a?d=Math.max(Blockly.Tooltip.MARGINS-window.scrollX,
      +d):d+Blockly.Tooltip.DIV.offsetWidth>b+window.scrollX-2*Blockly.Tooltip.MARGINS&&(d=b-Blockly.Tooltip.DIV.offsetWidth-2*Blockly.Tooltip.MARGINS);Blockly.Tooltip.DIV.style.top=e+"px";Blockly.Tooltip.DIV.style.left=d+"px"}};Blockly.Gesture=function(a,b){this.startWorkspace_=this.targetBlock_=this.startBlock_=this.startField_=this.startBubble_=this.currentDragDeltaXY_=this.mouseDownXY_=null;this.creatorWorkspace_=b;this.isDraggingBubble_=this.isDraggingBlock_=this.isDraggingWorkspace_=this.hasExceededDragRadius_=!1;this.mostRecentEvent_=a;this.flyout_=this.workspaceDragger_=this.blockDragger_=this.bubbleDragger_=this.onUpWrapper_=this.onMoveWrapper_=null;this.isEnding_=this.hasStarted_=this.calledUpdateIsDragging_=!1;
      +this.healStack_=!Blockly.DRAG_STACK};
      +Blockly.Gesture.prototype.dispose=function(){Blockly.Touch.clearTouchIdentifier();Blockly.Tooltip.unblock();this.creatorWorkspace_.clearGesture();this.onMoveWrapper_&&Blockly.unbindEvent_(this.onMoveWrapper_);this.onUpWrapper_&&Blockly.unbindEvent_(this.onUpWrapper_);this.flyout_=this.startWorkspace_=this.targetBlock_=this.startBlock_=this.startField_=null;this.blockDragger_&&(this.blockDragger_.dispose(),this.blockDragger_=null);this.workspaceDragger_&&(this.workspaceDragger_.dispose(),this.workspaceDragger_=
      +null);this.bubbleDragger_&&(this.bubbleDragger_.dispose(),this.bubbleDragger_=null)};Blockly.Gesture.prototype.updateFromEvent_=function(a){var b=new Blockly.utils.Coordinate(a.clientX,a.clientY);this.updateDragDelta_(b)&&(this.updateIsDragging_(),Blockly.longStop_());this.mostRecentEvent_=a};
      +Blockly.Gesture.prototype.updateDragDelta_=function(a){this.currentDragDeltaXY_=Blockly.utils.Coordinate.difference(a,this.mouseDownXY_);return this.hasExceededDragRadius_?!1:this.hasExceededDragRadius_=Blockly.utils.Coordinate.magnitude(this.currentDragDeltaXY_)>(this.flyout_?Blockly.FLYOUT_DRAG_RADIUS:Blockly.DRAG_RADIUS)};
      +Blockly.Gesture.prototype.updateIsDraggingFromFlyout_=function(){return this.flyout_.isBlockCreatable_(this.targetBlock_)?!this.flyout_.isScrollable()||this.flyout_.isDragTowardWorkspace(this.currentDragDeltaXY_)?(this.startWorkspace_=this.flyout_.targetWorkspace_,this.startWorkspace_.updateScreenCalculationsIfScrolled(),Blockly.Events.getGroup()||Blockly.Events.setGroup(!0),this.startBlock_=null,this.targetBlock_=this.flyout_.createBlock(this.targetBlock_),this.targetBlock_.select(),!0):!1:!1};
      +Blockly.Gesture.prototype.updateIsDraggingBubble_=function(){if(!this.startBubble_)return!1;this.isDraggingBubble_=!0;this.startDraggingBubble_();return!0};Blockly.Gesture.prototype.updateIsDraggingBlock_=function(){if(!this.targetBlock_)return!1;this.flyout_?this.isDraggingBlock_=this.updateIsDraggingFromFlyout_():this.targetBlock_.isMovable()&&(this.isDraggingBlock_=!0);return this.isDraggingBlock_?(this.startDraggingBlock_(),!0):!1};
      +Blockly.Gesture.prototype.updateIsDraggingWorkspace_=function(){if(this.flyout_?this.flyout_.isScrollable():this.startWorkspace_&&this.startWorkspace_.isDraggable())this.workspaceDragger_=this.flyout_?new Blockly.FlyoutDragger(this.flyout_):new Blockly.WorkspaceDragger(this.startWorkspace_),this.isDraggingWorkspace_=!0,this.workspaceDragger_.startDrag()};
      +Blockly.Gesture.prototype.updateIsDragging_=function(){if(this.calledUpdateIsDragging_)throw Error("updateIsDragging_ should only be called once per gesture.");this.calledUpdateIsDragging_=!0;this.updateIsDraggingBubble_()||this.updateIsDraggingBlock_()||this.updateIsDraggingWorkspace_()};
      +Blockly.Gesture.prototype.startDraggingBlock_=function(){this.blockDragger_=new Blockly.BlockDragger(this.targetBlock_,this.startWorkspace_);this.blockDragger_.startBlockDrag(this.currentDragDeltaXY_,this.healStack_);this.blockDragger_.dragBlock(this.mostRecentEvent_,this.currentDragDeltaXY_)};
      +Blockly.Gesture.prototype.startDraggingBubble_=function(){this.bubbleDragger_=new Blockly.BubbleDragger(this.startBubble_,this.startWorkspace_);this.bubbleDragger_.startBubbleDrag();this.bubbleDragger_.dragBubble(this.mostRecentEvent_,this.currentDragDeltaXY_)};
      +Blockly.Gesture.prototype.doStart=function(a){Blockly.utils.isTargetInput(a)?this.cancel():(this.hasStarted_=!0,Blockly.blockAnimations.disconnectUiStop(),this.startWorkspace_.updateScreenCalculationsIfScrolled(),this.startWorkspace_.isMutator&&this.startWorkspace_.resize(),this.startWorkspace_.markFocused(),this.mostRecentEvent_=a,Blockly.hideChaff(!!this.flyout_),Blockly.Tooltip.block(),this.targetBlock_&&(!this.targetBlock_.isInFlyout&&a.shiftKey?(Blockly.navigation.enableKeyboardAccessibility(),
      +this.creatorWorkspace_.getCursor().setCurNode(Blockly.navigation.getTopNode(this.targetBlock_))):this.targetBlock_.select()),Blockly.utils.isRightButton(a)?this.handleRightClick(a):("touchstart"!=a.type.toLowerCase()&&"pointerdown"!=a.type.toLowerCase()||"mouse"==a.pointerType||Blockly.longStart_(a,this),this.mouseDownXY_=new Blockly.utils.Coordinate(a.clientX,a.clientY),this.healStack_=a.altKey||a.ctrlKey||a.metaKey,this.bindMouseEvents(a)))};
      +Blockly.Gesture.prototype.bindMouseEvents=function(a){this.onMoveWrapper_=Blockly.bindEventWithChecks_(document,"mousemove",null,this.handleMove.bind(this));this.onUpWrapper_=Blockly.bindEventWithChecks_(document,"mouseup",null,this.handleUp.bind(this));a.preventDefault();a.stopPropagation()};
      +Blockly.Gesture.prototype.handleMove=function(a){this.updateFromEvent_(a);this.isDraggingWorkspace_?this.workspaceDragger_.drag(this.currentDragDeltaXY_):this.isDraggingBlock_?this.blockDragger_.dragBlock(this.mostRecentEvent_,this.currentDragDeltaXY_):this.isDraggingBubble_&&this.bubbleDragger_.dragBubble(this.mostRecentEvent_,this.currentDragDeltaXY_);a.preventDefault();a.stopPropagation()};
      +Blockly.Gesture.prototype.handleUp=function(a){this.updateFromEvent_(a);Blockly.longStop_();this.isEnding_?console.log("Trying to end a gesture recursively."):(this.isEnding_=!0,this.isDraggingBubble_?this.bubbleDragger_.endBubbleDrag(a,this.currentDragDeltaXY_):this.isDraggingBlock_?this.blockDragger_.endBlockDrag(a,this.currentDragDeltaXY_):this.isDraggingWorkspace_?this.workspaceDragger_.endDrag(this.currentDragDeltaXY_):this.isBubbleClick_()?this.doBubbleClick_():this.isFieldClick_()?this.doFieldClick_():
      +this.isBlockClick_()?this.doBlockClick_():this.isWorkspaceClick_()&&this.doWorkspaceClick_(a),a.preventDefault(),a.stopPropagation(),this.dispose())};
      +Blockly.Gesture.prototype.cancel=function(){this.isEnding_||(Blockly.longStop_(),this.isDraggingBubble_?this.bubbleDragger_.endBubbleDrag(this.mostRecentEvent_,this.currentDragDeltaXY_):this.isDraggingBlock_?this.blockDragger_.endBlockDrag(this.mostRecentEvent_,this.currentDragDeltaXY_):this.isDraggingWorkspace_&&this.workspaceDragger_.endDrag(this.currentDragDeltaXY_),this.dispose())};
      +Blockly.Gesture.prototype.handleRightClick=function(a){this.targetBlock_?(this.bringBlockToFront_(),Blockly.hideChaff(this.flyout_),this.targetBlock_.showContextMenu_(a)):this.startBubble_?this.startBubble_.showContextMenu_(a):this.startWorkspace_&&!this.flyout_&&(Blockly.hideChaff(),this.startWorkspace_.showContextMenu_(a));a.preventDefault();a.stopPropagation();this.dispose()};
      +Blockly.Gesture.prototype.handleWsStart=function(a,b){if(this.hasStarted_)throw Error("Tried to call gesture.handleWsStart, but the gesture had already been started.");this.setStartWorkspace_(b);this.mostRecentEvent_=a;this.doStart(a);Blockly.keyboardAccessibilityMode&&Blockly.navigation.setState(Blockly.navigation.STATE_WS)};
      +Blockly.Gesture.prototype.handleFlyoutStart=function(a,b){if(this.hasStarted_)throw Error("Tried to call gesture.handleFlyoutStart, but the gesture had already been started.");this.setStartFlyout_(b);this.handleWsStart(a,b.getWorkspace())};Blockly.Gesture.prototype.handleBlockStart=function(a,b){if(this.hasStarted_)throw Error("Tried to call gesture.handleBlockStart, but the gesture had already been started.");this.setStartBlock(b);this.mostRecentEvent_=a};
      +Blockly.Gesture.prototype.handleBubbleStart=function(a,b){if(this.hasStarted_)throw Error("Tried to call gesture.handleBubbleStart, but the gesture had already been started.");this.setStartBubble(b);this.mostRecentEvent_=a};Blockly.Gesture.prototype.doBubbleClick_=function(){this.startBubble_.setFocus&&this.startBubble_.setFocus();this.startBubble_.select&&this.startBubble_.select()};Blockly.Gesture.prototype.doFieldClick_=function(){this.startField_.showEditor_();this.bringBlockToFront_()};
      +Blockly.Gesture.prototype.doBlockClick_=function(){this.flyout_&&this.flyout_.autoClose?this.targetBlock_.isEnabled()&&(Blockly.Events.getGroup()||Blockly.Events.setGroup(!0),this.flyout_.createBlock(this.targetBlock_).scheduleSnapAndBump()):Blockly.Events.fire(new Blockly.Events.Ui(this.startBlock_,"click",void 0,void 0));this.bringBlockToFront_();Blockly.Events.setGroup(!1)};
      +Blockly.Gesture.prototype.doWorkspaceClick_=function(a){var b=this.creatorWorkspace_;a.shiftKey?(Blockly.navigation.enableKeyboardAccessibility(),a=new Blockly.utils.Coordinate(a.clientX,a.clientY),a=Blockly.utils.screenToWsCoordinates(b,a),a=Blockly.ASTNode.createWorkspaceNode(b,a),b.getCursor().setCurNode(a)):Blockly.selected&&Blockly.selected.unselect()};Blockly.Gesture.prototype.bringBlockToFront_=function(){this.targetBlock_&&!this.flyout_&&this.targetBlock_.bringToFront()};
      +Blockly.Gesture.prototype.setStartField=function(a){if(this.hasStarted_)throw Error("Tried to call gesture.setStartField, but the gesture had already been started.");this.startField_||(this.startField_=a)};Blockly.Gesture.prototype.setStartBubble=function(a){this.startBubble_||(this.startBubble_=a)};Blockly.Gesture.prototype.setStartBlock=function(a){this.startBlock_||this.startBubble_||(this.startBlock_=a,a.isInFlyout&&a!=a.getRootBlock()?this.setTargetBlock_(a.getRootBlock()):this.setTargetBlock_(a))};
      +Blockly.Gesture.prototype.setTargetBlock_=function(a){a.isShadow()?this.setTargetBlock_(a.getParent()):this.targetBlock_=a};Blockly.Gesture.prototype.setStartWorkspace_=function(a){this.startWorkspace_||(this.startWorkspace_=a)};Blockly.Gesture.prototype.setStartFlyout_=function(a){this.flyout_||(this.flyout_=a)};Blockly.Gesture.prototype.isBubbleClick_=function(){return!!this.startBubble_&&!this.hasExceededDragRadius_};
      +Blockly.Gesture.prototype.isBlockClick_=function(){return!!this.startBlock_&&!this.hasExceededDragRadius_&&!this.isFieldClick_()};Blockly.Gesture.prototype.isFieldClick_=function(){return(this.startField_?this.startField_.isClickable():!1)&&!this.hasExceededDragRadius_&&(!this.flyout_||!this.flyout_.autoClose)};Blockly.Gesture.prototype.isWorkspaceClick_=function(){return!this.startBlock_&&!this.startBubble_&&!this.startField_&&!this.hasExceededDragRadius_};
      +Blockly.Gesture.prototype.isDragging=function(){return this.isDraggingWorkspace_||this.isDraggingBlock_||this.isDraggingBubble_};Blockly.Gesture.prototype.hasStarted=function(){return this.hasStarted_};Blockly.Gesture.prototype.getInsertionMarkers=function(){return this.blockDragger_?this.blockDragger_.getInsertionMarkers():[]};Blockly.Gesture.inProgress=function(){for(var a=Blockly.Workspace.getAll(),b=0,c;c=a[b];b++)if(c.currentGesture_)return!0;return!1};Blockly.Field=function(a,b,c){this.tooltip_=this.validator_=this.value_=null;this.size_=new Blockly.utils.Size(0,0);this.markerSvg_=this.cursorSvg_=null;c&&this.configure_(c);this.setValue(a);b&&this.setValidator(b)};Blockly.Field.BORDER_RECT_DEFAULT_HEIGHT=16;Blockly.Field.TEXT_DEFAULT_HEIGHT=12.5;Blockly.Field.X_PADDING=10;Blockly.Field.Y_PADDING=10;Blockly.Field.DEFAULT_TEXT_OFFSET=Blockly.Field.X_PADDING/2;Blockly.Field.prototype.name=void 0;Blockly.Field.prototype.disposed=!1;
      +Blockly.Field.prototype.maxDisplayLength=50;Blockly.Field.prototype.sourceBlock_=null;Blockly.Field.prototype.isDirty_=!0;Blockly.Field.prototype.visible_=!0;Blockly.Field.prototype.clickTarget_=null;Blockly.Field.NBSP="\u00a0";Blockly.Field.prototype.EDITABLE=!0;Blockly.Field.prototype.SERIALIZABLE=!1;Blockly.Field.prototype.configure_=function(a){var b=a.tooltip;"string"==typeof b&&(b=Blockly.utils.replaceMessageReferences(a.tooltip));b&&this.setTooltip(b)};
      +Blockly.Field.prototype.setSourceBlock=function(a){if(this.sourceBlock_)throw Error("Field already bound to a block.");this.sourceBlock_=a};Blockly.Field.prototype.getSourceBlock=function(){return this.sourceBlock_};
      +Blockly.Field.prototype.init=function(){this.fieldGroup_||(this.fieldGroup_=Blockly.utils.dom.createSvgElement("g",{},null),this.isVisible()||(this.fieldGroup_.style.display="none"),this.sourceBlock_.getSvgRoot().appendChild(this.fieldGroup_),this.initView(),this.updateEditable(),this.setTooltip(this.tooltip_),this.bindEvents_(),this.initModel())};Blockly.Field.prototype.initView=function(){this.createBorderRect_();this.createTextElement_()};Blockly.Field.prototype.initModel=function(){};
      +Blockly.Field.prototype.createBorderRect_=function(){this.size_.height=Math.max(this.size_.height,Blockly.Field.BORDER_RECT_DEFAULT_HEIGHT);this.size_.width=Math.max(this.size_.width,Blockly.Field.X_PADDING);this.borderRect_=Blockly.utils.dom.createSvgElement("rect",{rx:4,ry:4,x:0,y:0,height:this.size_.height,width:this.size_.width},this.fieldGroup_)};
      +Blockly.Field.prototype.createTextElement_=function(){this.textElement_=Blockly.utils.dom.createSvgElement("text",{"class":"blocklyText",y:Blockly.Field.TEXT_DEFAULT_HEIGHT,x:this.borderRect_?Blockly.Field.DEFAULT_TEXT_OFFSET:0},this.fieldGroup_);this.textContent_=document.createTextNode("");this.textElement_.appendChild(this.textContent_)};
      +Blockly.Field.prototype.bindEvents_=function(){Blockly.Tooltip.bindMouseEvents(this.getClickTarget_());this.mouseDownWrapper_=Blockly.bindEventWithChecks_(this.getClickTarget_(),"mousedown",this,this.onMouseDown_)};Blockly.Field.prototype.fromXml=function(a){this.setValue(a.textContent)};Blockly.Field.prototype.toXml=function(a){a.textContent=this.getValue();return a};
      +Blockly.Field.prototype.dispose=function(){Blockly.DropDownDiv.hideIfOwner(this);Blockly.WidgetDiv.hideIfOwner(this);this.mouseDownWrapper_&&Blockly.unbindEvent_(this.mouseDownWrapper_);Blockly.utils.dom.removeNode(this.fieldGroup_);this.disposed=!0};
      +Blockly.Field.prototype.updateEditable=function(){var a=this.getClickTarget_();this.EDITABLE&&a&&(this.sourceBlock_.isEditable()?(Blockly.utils.dom.addClass(a,"blocklyEditableText"),Blockly.utils.dom.removeClass(a,"blocklyNonEditableText"),a.style.cursor=this.CURSOR):(Blockly.utils.dom.addClass(a,"blocklyNonEditableText"),Blockly.utils.dom.removeClass(a,"blocklyEditableText"),a.style.cursor=""))};
      +Blockly.Field.prototype.isClickable=function(){return!!this.sourceBlock_&&this.sourceBlock_.isEditable()&&!!this.showEditor_&&"function"===typeof this.showEditor_};Blockly.Field.prototype.isCurrentlyEditable=function(){return this.EDITABLE&&!!this.sourceBlock_&&this.sourceBlock_.isEditable()};
      +Blockly.Field.prototype.isSerializable=function(){var a=!1;this.name&&(this.SERIALIZABLE?a=!0:this.EDITABLE&&(console.warn("Detected an editable field that was not serializable. Please define SERIALIZABLE property as true on all editable custom fields. Proceeding with serialization."),a=!0));return a};Blockly.Field.prototype.isVisible=function(){return this.visible_};
      +Blockly.Field.prototype.setVisible=function(a){if(this.visible_!=a){this.visible_=a;var b=this.getSvgRoot();b&&(b.style.display=a?"block":"none")}};Blockly.Field.prototype.setValidator=function(a){this.validator_=a};Blockly.Field.prototype.getValidator=function(){return this.validator_};Blockly.Field.prototype.classValidator=function(a){return a};
      +Blockly.Field.prototype.callValidator=function(a){var b=this.classValidator(a);if(null===b)return null;void 0!==b&&(a=b);if(b=this.getValidator()){b=b.call(this,a);if(null===b)return null;void 0!==b&&(a=b)}return a};Blockly.Field.prototype.getSvgRoot=function(){return this.fieldGroup_};Blockly.Field.prototype.updateColour=function(){};Blockly.Field.prototype.render_=function(){this.textContent_&&(this.textContent_.nodeValue=this.getDisplayText_(),this.updateSize_())};
      +Blockly.Field.prototype.updateWidth=function(){console.warn("Deprecated call to updateWidth, call Blockly.Field.updateSize_ to force an update to the size of the field, or Blockly.utils.dom.getTextWidth() to check the size of the field.");this.updateSize_()};Blockly.Field.prototype.updateSize_=function(){var a=Blockly.utils.dom.getTextWidth(this.textElement_);this.borderRect_&&(a+=Blockly.Field.X_PADDING,this.borderRect_.setAttribute("width",a));this.size_.width=a};
      +Blockly.Field.prototype.getSize=function(){if(!this.isVisible())return new Blockly.utils.Size(0,0);this.isDirty_?(this.render_(),this.isDirty_=!1):this.visible_&&0==this.size_.width&&(console.warn("Deprecated use of setting size_.width to 0 to rerender a field. Set field.isDirty_ to true instead."),this.render_());return this.size_};
      +Blockly.Field.prototype.getScaledBBox_=function(){var a=this.borderRect_.getBBox(),b=a.height*this.sourceBlock_.workspace.scale;a=a.width*this.sourceBlock_.workspace.scale;var c=this.getAbsoluteXY_();return{top:c.y,bottom:c.y+b,left:c.x,right:c.x+a}};
      +Blockly.Field.prototype.getDisplayText_=function(){var a=this.getText();if(!a)return Blockly.Field.NBSP;a.length>this.maxDisplayLength&&(a=a.substring(0,this.maxDisplayLength-2)+"\u2026");a=a.replace(/\s/g,Blockly.Field.NBSP);this.sourceBlock_&&this.sourceBlock_.RTL&&(a+="\u200f");return a};Blockly.Field.prototype.getText=function(){if(this.getText_){var a=this.getText_.call(this);if(null!==a)return String(a)}return String(this.getValue())};
      +Blockly.Field.prototype.setText=function(a){throw Error("setText method is deprecated");};Blockly.Field.prototype.markDirty=function(){this.isDirty_=!0};Blockly.Field.prototype.forceRerender=function(){this.isDirty_=!0;this.sourceBlock_&&this.sourceBlock_.rendered&&(this.sourceBlock_.render(),this.sourceBlock_.bumpNeighbours())};
      +Blockly.Field.prototype.setValue=function(a){if(null!==a){var b=this.doClassValidation_(a);a=this.processValidation_(a,b);if(!(a instanceof Error)){if(b=this.getValidator())if(b=b.call(this,a),a=this.processValidation_(a,b),a instanceof Error)return;b=this.getValue();b!==a&&(this.sourceBlock_&&Blockly.Events.isEnabled()&&Blockly.Events.fire(new Blockly.Events.BlockChange(this.sourceBlock_,"field",this.name||null,b,a)),this.doValueUpdate_(a),this.isDirty_&&this.forceRerender())}}};
      +Blockly.Field.prototype.processValidation_=function(a,b){if(null===b)return this.doValueInvalid_(a),this.isDirty_&&this.forceRerender(),Error();void 0!==b&&(a=b);return a};Blockly.Field.prototype.getValue=function(){return this.value_};Blockly.Field.prototype.doClassValidation_=function(a){return null===a||void 0===a?null:a=this.classValidator(a)};Blockly.Field.prototype.doValueUpdate_=function(a){this.value_=a;this.isDirty_=!0};Blockly.Field.prototype.doValueInvalid_=function(a){};
      +Blockly.Field.prototype.onMouseDown_=function(a){this.sourceBlock_&&this.sourceBlock_.workspace&&(a=this.sourceBlock_.workspace.getGesture(a))&&a.setStartField(this)};Blockly.Field.prototype.setTooltip=function(a){var b=this.getClickTarget_();b?b.tooltip=a||""===a?a:this.sourceBlock_:this.tooltip_=a};Blockly.Field.prototype.getClickTarget_=function(){return this.clickTarget_||this.getSvgRoot()};Blockly.Field.prototype.getAbsoluteXY_=function(){return Blockly.utils.style.getPageOffset(this.borderRect_)};
      +Blockly.Field.prototype.referencesVariables=function(){return!1};Blockly.Field.prototype.getParentInput=function(){for(var a=null,b=this.sourceBlock_,c=b.inputList,d=0;da||a>this.fieldRow.length)throw Error("index "+a+" out of bounds.");if(!(b||""==b&&c))return a;"string"==typeof b&&(b=new Blockly.FieldLabel(b));b.setSourceBlock(this.sourceBlock_);this.sourceBlock_.rendered&&b.init();b.name=c;b.prefixField&&(a=this.insertFieldAt(a,b.prefixField));this.fieldRow.splice(a,0,b);++a;b.suffixField&&(a=this.insertFieldAt(a,b.suffixField));this.sourceBlock_.rendered&&(this.sourceBlock_.render(),this.sourceBlock_.bumpNeighbours());
      +return a};Blockly.Input.prototype.removeField=function(a){for(var b=0,c;c=this.fieldRow[b];b++)if(c.name===a){c.dispose();this.fieldRow.splice(b,1);this.sourceBlock_.rendered&&(this.sourceBlock_.render(),this.sourceBlock_.bumpNeighbours());return}throw Error('Field "%s" not found.',a);};Blockly.Input.prototype.isVisible=function(){return this.visible_};
      +Blockly.Input.prototype.setVisible=function(a){var b=[];if(this.visible_==a)return b;for(var c=(this.visible_=a)?"block":"none",d=0,e;e=this.fieldRow[d];d++)e.setVisible(a);this.connection&&(a?b=this.connection.unhideAll():this.connection.hideAll(),d=this.connection.targetBlock())&&(d.getSvgRoot().style.display=c,a||(d.rendered=!1));return b};Blockly.Input.prototype.markDirty=function(){for(var a=0,b;b=this.fieldRow[a];a++)b.markDirty()};
      +Blockly.Input.prototype.setCheck=function(a){if(!this.connection)throw Error("This input does not have a connection.");this.connection.setCheck(a);return this};Blockly.Input.prototype.setAlign=function(a){this.align=a;this.sourceBlock_.rendered&&this.sourceBlock_.render();return this};Blockly.Input.prototype.init=function(){if(this.sourceBlock_.workspace.rendered)for(var a=0;aa&&0<=b&&256>b&&0<=c&&256>c)?Blockly.utils.colour.rgbToHex(a,b,c):null};
      +Blockly.utils.colour.rgbToHex=function(a,b,c){b=a<<16|b<<8|c;return 16>a?"#"+(16777216|b).toString(16).substr(1):"#"+b.toString(16)};Blockly.utils.colour.hexToRgb=function(a){a=parseInt(a.substr(1),16);return[a>>16,a>>8&255,a&255]};
      +Blockly.utils.colour.hsvToHex=function(a,b,c){var d=0,e=0,f=0;if(0==b)f=e=d=c;else{var g=Math.floor(a/60),h=a/60-g;a=c*(1-b);var k=c*(1-b*h);b=c*(1-b*(1-h));switch(g){case 1:d=k;e=c;f=a;break;case 2:d=a;e=c;f=b;break;case 3:d=a;e=k;f=c;break;case 4:d=b;e=a;f=c;break;case 5:d=c;e=a;f=k;break;case 6:case 0:d=c,e=b,f=a}}return Blockly.utils.colour.rgbToHex(Math.floor(d),Math.floor(e),Math.floor(f))};
      +Blockly.utils.colour.blend=function(a,b,c){a=Blockly.utils.colour.hexToRgb(Blockly.utils.colour.parse(a));b=Blockly.utils.colour.hexToRgb(Blockly.utils.colour.parse(b));return Blockly.utils.colour.rgbToHex(Math.round(b[0]+c*(a[0]-b[0])),Math.round(b[1]+c*(a[1]-b[1])),Math.round(b[2]+c*(a[2]-b[2])))};
      +Blockly.utils.colour.names={aqua:"#00ffff",black:"#000000",blue:"#0000ff",fuchsia:"#ff00ff",gray:"#808080",green:"#008000",lime:"#00ff00",maroon:"#800000",navy:"#000080",olive:"#808000",purple:"#800080",red:"#ff0000",silver:"#c0c0c0",teal:"#008080",white:"#ffffff",yellow:"#ffff00"};Blockly.Block=function(a,b,c){if(Blockly.Generator&&"undefined"!=typeof Blockly.Generator.prototype[b])throw Error('Block prototypeName "'+b+'" conflicts with Blockly.Generator members.');this.id=c&&!a.getBlockById(c)?c:Blockly.utils.genUid();a.blockDB_[this.id]=this;this.previousConnection=this.nextConnection=this.outputConnection=null;this.inputList=[];this.inputsInline=void 0;this.disabled=!1;this.tooltip="";this.contextMenu=!0;this.parentBlock_=null;this.childBlocks_=[];this.editable_=this.movable_=
      +this.deletable_=!0;this.collapsed_=this.isShadow_=!1;this.comment=null;this.commentModel={text:null,pinned:!1,size:new Blockly.utils.Size(160,80)};this.xy_=new Blockly.utils.Coordinate(0,0);this.workspace=a;this.isInFlyout=a.isFlyout;this.isInMutator=a.isMutator;this.RTL=a.RTL;this.isInsertionMarker_=!1;this.hat=void 0;if(b){this.type=b;c=Blockly.Blocks[b];if(!c||"object"!=typeof c)throw TypeError("Unknown block type: "+b);Blockly.utils.object.mixin(this,c)}a.addTopBlock(this);a.addTypedBlock(this);
      +"function"==typeof this.init&&this.init();this.inputsInlineDefault=this.inputsInline;if(Blockly.Events.isEnabled()){(a=Blockly.Events.getGroup())||Blockly.Events.setGroup(!0);try{Blockly.Events.fire(new Blockly.Events.BlockCreate(this))}finally{a||Blockly.Events.setGroup(!1)}}"function"==typeof this.onchange&&this.setOnChange(this.onchange)};Blockly.Block.prototype.data=null;Blockly.Block.prototype.disposed=!1;Blockly.Block.prototype.hue_=null;Blockly.Block.prototype.colour_="#000000";
      +Blockly.Block.prototype.colourSecondary_=null;Blockly.Block.prototype.colourTertiary_=null;Blockly.Block.prototype.styleName_=null;
      +Blockly.Block.prototype.dispose=function(a){if(this.workspace){this.onchangeWrapper_&&this.workspace.removeChangeListener(this.onchangeWrapper_);Blockly.keyboardAccessibilityMode&&Blockly.navigation.moveCursorOnBlockDelete(this);this.unplug(a);Blockly.Events.isEnabled()&&Blockly.Events.fire(new Blockly.Events.BlockDelete(this));Blockly.Events.disable();try{this.workspace&&(this.workspace.removeTopBlock(this),this.workspace.removeTypedBlock(this),delete this.workspace.blockDB_[this.id],this.workspace=
      +null);Blockly.selected==this&&(Blockly.selected=null);for(var b=this.childBlocks_.length-1;0<=b;b--)this.childBlocks_[b].dispose(!1);b=0;for(var c;c=this.inputList[b];b++)c.dispose();this.inputList.length=0;var d=this.getConnections_(!0);b=0;for(var e;e=d[b];b++)e.dispose()}finally{Blockly.Events.enable(),this.disposed=!0}}};Blockly.Block.prototype.initModel=function(){for(var a=0,b;b=this.inputList[a];a++)for(var c=0,d;d=b.fieldRow[c];c++)d.initModel&&d.initModel()};
      +Blockly.Block.prototype.unplug=function(a){this.outputConnection?this.unplugFromRow_(a):this.previousConnection&&this.unplugFromStack_(a)};Blockly.Block.prototype.unplugFromRow_=function(a){var b=null;this.outputConnection.isConnected()&&(b=this.outputConnection.targetConnection,this.outputConnection.disconnect());if(b&&a&&(a=this.getOnlyValueConnection_())&&a.isConnected()&&!a.targetBlock().isShadow())if(a=a.targetConnection,a.disconnect(),a.checkType_(b))b.connect(a);else a.onFailedConnect(b)};
      +Blockly.Block.prototype.getOnlyValueConnection_=function(){for(var a=null,b=0;b=c)this.hue_=c,this.colour_=Blockly.hueToHex(c);else if(c=Blockly.utils.colour.parse(b))this.colour_=c,this.hue_=null;else throw c='Invalid colour: "'+b+'"',a!=b&&(c+=' (from "'+a+'")'),Error(c);};
      +Blockly.Block.prototype.setStyle=function(a){var b=this.workspace.getTheme().getBlockStyle(a);this.styleName_=a;if(b)this.colourSecondary_=b.colourSecondary,this.colourTertiary_=b.colourTertiary,this.hat=b.hat,this.setColour(b.colourPrimary);else throw Error("Invalid style name: "+a);};
      +Blockly.Block.prototype.setOnChange=function(a){if(a&&"function"!=typeof a)throw Error("onchange must be a function.");this.onchangeWrapper_&&this.workspace.removeChangeListener(this.onchangeWrapper_);if(this.onchange=a)this.onchangeWrapper_=a.bind(this),this.workspace.addChangeListener(this.onchangeWrapper_)};Blockly.Block.prototype.getField=function(a){for(var b=0,c;c=this.inputList[b];b++)for(var d=0,e;e=c.fieldRow[d];d++)if(e.name==a)return e;return null};
      +Blockly.Block.prototype.getVars=function(){for(var a=[],b=0,c;c=this.inputList[b];b++)for(var d=0,e;e=c.fieldRow[d];d++)e.referencesVariables()&&a.push(e.getValue());return a};Blockly.Block.prototype.getVarModels=function(){for(var a=[],b=0,c;c=this.inputList[b];b++)for(var d=0,e;e=c.fieldRow[d];d++)e.referencesVariables()&&(e=this.workspace.getVariableById(e.getValue()))&&a.push(e);return a};
      +Blockly.Block.prototype.updateVarName=function(a){for(var b=0,c;c=this.inputList[b];b++)for(var d=0,e;e=c.fieldRow[d];d++)e.referencesVariables()&&a.getId()==e.getValue()&&e.refreshVariableName()};Blockly.Block.prototype.renameVarById=function(a,b){for(var c=0,d;d=this.inputList[c];c++)for(var e=0,f;f=d.fieldRow[e];e++)f.referencesVariables()&&a==f.getValue()&&f.setValue(b)};Blockly.Block.prototype.getFieldValue=function(a){return(a=this.getField(a))?a.getValue():null};
      +Blockly.Block.prototype.setFieldValue=function(a,b){var c=this.getField(b);if(!c)throw Error('Field "'+b+'" not found.');c.setValue(a)};
      +Blockly.Block.prototype.setPreviousStatement=function(a,b){if(a){void 0===b&&(b=null);if(!this.previousConnection){if(this.outputConnection)throw Error("Remove output connection prior to adding previous connection.");this.previousConnection=this.makeConnection_(Blockly.PREVIOUS_STATEMENT)}this.previousConnection.setCheck(b)}else if(this.previousConnection){if(this.previousConnection.isConnected())throw Error("Must disconnect previous statement before removing connection.");this.previousConnection.dispose();
      +this.previousConnection=null}};Blockly.Block.prototype.setNextStatement=function(a,b){if(a)void 0===b&&(b=null),this.nextConnection||(this.nextConnection=this.makeConnection_(Blockly.NEXT_STATEMENT)),this.nextConnection.setCheck(b);else if(this.nextConnection){if(this.nextConnection.isConnected())throw Error("Must disconnect next statement before removing connection.");this.nextConnection.dispose();this.nextConnection=null}};
      +Blockly.Block.prototype.setOutput=function(a,b){if(a){void 0===b&&(b=null);if(!this.outputConnection){if(this.previousConnection)throw Error("Remove previous connection prior to adding output connection.");this.outputConnection=this.makeConnection_(Blockly.OUTPUT_VALUE)}this.outputConnection.setCheck(b)}else if(this.outputConnection){if(this.outputConnection.isConnected())throw Error("Must disconnect output value before removing connection.");this.outputConnection.dispose();this.outputConnection=
      +null}};Blockly.Block.prototype.setInputsInline=function(a){this.inputsInline!=a&&(Blockly.Events.fire(new Blockly.Events.BlockChange(this,"inline",null,this.inputsInline,a)),this.inputsInline=a)};
      +Blockly.Block.prototype.getInputsInline=function(){if(void 0!=this.inputsInline)return this.inputsInline;for(var a=1;aa&&(c=c.substring(0,a-3)+"...");return c};
      +Blockly.Block.prototype.appendValueInput=function(a){return this.appendInput_(Blockly.INPUT_VALUE,a)};Blockly.Block.prototype.appendStatementInput=function(a){return this.appendInput_(Blockly.NEXT_STATEMENT,a)};Blockly.Block.prototype.appendDummyInput=function(a){return this.appendInput_(Blockly.DUMMY_INPUT,a||"")};
      +Blockly.Block.prototype.jsonInit=function(a){var b=a.type?'Block "'+a.type+'": ':"";if(a.output&&a.previousStatement)throw Error(b+"Must not have both an output and a previousStatement.");a.style&&a.style.hat&&(this.hat=a.style.hat,a.style=null);if(a.style&&a.colour)throw Error(b+"Must not have both a colour and a style.");a.style?this.jsonInitStyle_(a,b):this.jsonInitColour_(a,b);for(var c=0;void 0!==a["message"+c];)this.interpolate_(a["message"+c],a["args"+c]||[],a["lastDummyAlign"+c]),c++;void 0!==
      +a.inputsInline&&this.setInputsInline(a.inputsInline);void 0!==a.output&&this.setOutput(!0,a.output);void 0!==a.previousStatement&&this.setPreviousStatement(!0,a.previousStatement);void 0!==a.nextStatement&&this.setNextStatement(!0,a.nextStatement);void 0!==a.tooltip&&(c=a.tooltip,c=Blockly.utils.replaceMessageReferences(c),this.setTooltip(c));void 0!==a.enableContextMenu&&(c=a.enableContextMenu,this.contextMenu=!!c);void 0!==a.helpUrl&&(c=a.helpUrl,c=Blockly.utils.replaceMessageReferences(c),this.setHelpUrl(c));
      +"string"==typeof a.extensions&&(console.warn(b+"JSON attribute 'extensions' should be an array of strings. Found raw string in JSON for '"+a.type+"' block."),a.extensions=[a.extensions]);void 0!==a.mutator&&Blockly.Extensions.apply(a.mutator,this,!0);if(Array.isArray(a.extensions))for(a=a.extensions,b=0;b=h||h>b.length)throw Error('Block "'+this.type+'": Message index %'+h+" out of range.");if(e[h])throw Error('Block "'+this.type+'": Message index %'+h+" duplicated.");e[h]=!0;f++;a.push(b[h-1])}else(h=h.trim())&&a.push(h)}if(f!=b.length)throw Error('Block "'+this.type+'": Message does not reference all '+b.length+" arg(s).");
      +a.length&&("string"==typeof a[a.length-1]||Blockly.utils.string.startsWith(a[a.length-1].type,"field_"))&&(g={type:"input_dummy"},c&&(g.align=c),a.push(g));c={LEFT:Blockly.ALIGN_LEFT,RIGHT:Blockly.ALIGN_RIGHT,CENTRE:Blockly.ALIGN_CENTRE};b=[];for(g=0;g=this.inputList.length)throw RangeError("Input index "+a+" out of bounds.");if(b>this.inputList.length)throw RangeError("Reference input "+b+" out of bounds.");var c=this.inputList[a];this.inputList.splice(a,1);ab||b>this.getChildCount())throw Error(Blockly.Component.Error.CHILD_INDEX_OUT_OF_BOUNDS);this.childIndex_[a.getId()]=a;if(a.getParent()==this){var d=this.children_.indexOf(a);-1a?b-1:a},this.highlightedIndex_)};
      +Blockly.Menu.prototype.highlightHelper=function(a,b){var c=0>b?-1:b,d=this.getChildCount();c=a.call(this,c,d);for(var e=0;e<=d;){var f=this.getChildAt(c);if(f&&this.canHighlightItem(f))return this.setHighlightedIndex(c),!0;e++;c=a.call(this,c,d)}return!1};Blockly.Menu.prototype.canHighlightItem=function(a){return a.isEnabled()};Blockly.Menu.prototype.handleMouseOver_=function(a){(a=this.getMenuItem(a.target))&&a.isEnabled()&&this.getHighlighted()!==a&&(this.unhighlightCurrent(),this.setHighlighted(a))};
      +Blockly.Menu.prototype.handleClick_=function(a){var b=this.getMenuItem(a.target);b&&b.handleClick(a)&&a.preventDefault()};Blockly.Menu.prototype.handleMouseEnter_=function(a){this.focus()};Blockly.Menu.prototype.handleMouseLeave_=function(a){this.getElement()&&(this.blur(),this.clearHighlighted())};Blockly.Menu.prototype.handleKeyEvent=function(a){return 0!=this.getChildCount()&&this.handleKeyEventInternal(a)?(a.preventDefault(),a.stopPropagation(),!0):!1};
      +Blockly.Menu.prototype.handleKeyEventInternal=function(a){var b=this.getHighlighted();if(b&&"function"==typeof b.handleKeyEvent&&b.handleKeyEvent(a))return!0;if(a.shiftKey||a.ctrlKey||a.metaKey||a.altKey)return!1;switch(a.keyCode){case Blockly.utils.KeyCodes.ENTER:b&&b.performActionInternal(a);break;case Blockly.utils.KeyCodes.UP:this.highlightPrevious();break;case Blockly.utils.KeyCodes.DOWN:this.highlightNext();break;default:return!1}return!0};Blockly.MenuItem=function(a,b){Blockly.Component.call(this);this.setContentInternal(a);this.setValue(b);this.enabled_=!0};Blockly.utils.object.inherits(Blockly.MenuItem,Blockly.Component);
      +Blockly.MenuItem.prototype.createDom=function(){var a=document.createElement("div");a.id=this.getId();this.setElementInternal(a);a.className="goog-menuitem goog-option "+(this.enabled_?"":"goog-menuitem-disabled ")+(this.checked_?"goog-option-selected ":"")+(this.isRightToLeft()?"goog-menuitem-rtl ":"");var b=this.getContentWrapperDom();a.appendChild(b);var c=this.getCheckboxDom();c&&b.appendChild(c);b.appendChild(this.getContentDom());Blockly.utils.aria.setRole(a,this.roleName_||(this.checkable_?
      +Blockly.utils.aria.Role.MENUITEMCHECKBOX:Blockly.utils.aria.Role.MENUITEM));Blockly.utils.aria.setState(a,Blockly.utils.aria.State.SELECTED,this.checkable_&&this.checked_||!1)};Blockly.MenuItem.prototype.getCheckboxDom=function(){if(!this.checkable_)return null;var a=document.createElement("div");a.className="goog-menuitem-checkbox";return a};Blockly.MenuItem.prototype.getContentDom=function(){var a=this.content_;"string"===typeof a&&(a=document.createTextNode(a));return a};
      +Blockly.MenuItem.prototype.getContentWrapperDom=function(){var a=document.createElement("div");a.className="goog-menuitem-content";return a};Blockly.MenuItem.prototype.setContentInternal=function(a){this.content_=a};Blockly.MenuItem.prototype.setValue=function(a){this.value_=a};Blockly.MenuItem.prototype.getValue=function(){return this.value_};Blockly.MenuItem.prototype.setRole=function(a){this.roleName_=a};Blockly.MenuItem.prototype.setCheckable=function(a){this.checkable_=a};
      +Blockly.MenuItem.prototype.setChecked=function(a){if(this.checkable_){this.checked_=a;var b=this.getElement();b&&this.isEnabled()&&(a?(Blockly.utils.dom.addClass(b,"goog-option-selected"),Blockly.utils.aria.setState(b,Blockly.utils.aria.State.SELECTED,!0)):(Blockly.utils.dom.removeClass(b,"goog-option-selected"),Blockly.utils.aria.setState(b,Blockly.utils.aria.State.SELECTED,!1)))}};
      +Blockly.MenuItem.prototype.setHighlighted=function(a){this.highlight_=a;var b=this.getElement();b&&this.isEnabled()&&(a?Blockly.utils.dom.addClass(b,"goog-menuitem-highlight"):Blockly.utils.dom.removeClass(b,"goog-menuitem-highlight"))};Blockly.MenuItem.prototype.isEnabled=function(){return this.enabled_};Blockly.MenuItem.prototype.setEnabled=function(a){this.enabled_=a;(a=this.getElement())&&(this.enabled_?Blockly.utils.dom.removeClass(a,"goog-menuitem-disabled"):Blockly.utils.dom.addClass(a,"goog-menuitem-disabled"))};
      +Blockly.MenuItem.prototype.handleClick=function(a){this.isEnabled()&&(this.setHighlighted(!0),this.performActionInternal())};Blockly.MenuItem.prototype.performActionInternal=function(){this.checkable_&&this.setChecked(!this.checked_);this.actionHandler_&&this.actionHandler_.call(this.actionHandlerObj_,this)};Blockly.MenuItem.prototype.onAction=function(a,b){this.actionHandler_=a;this.actionHandlerObj_=b};Blockly.utils.uiMenu={};Blockly.utils.uiMenu.getSize=function(a){a=a.getElement();var b=Blockly.utils.style.getSize(a);b.height=a.scrollHeight;return b};Blockly.utils.uiMenu.adjustBBoxesForRTL=function(a,b,c){b.left+=c.width;b.right+=c.width;a.left+=c.width;a.right+=c.width};Blockly.ContextMenu={};Blockly.ContextMenu.currentBlock=null;Blockly.ContextMenu.eventWrapper_=null;Blockly.ContextMenu.show=function(a,b,c){Blockly.WidgetDiv.show(Blockly.ContextMenu,c,null);if(b.length){var d=Blockly.ContextMenu.populate_(b,c);Blockly.ContextMenu.position_(d,a,c);setTimeout(function(){d.getElement().focus()},1);Blockly.ContextMenu.currentBlock=null}else Blockly.ContextMenu.hide()};
      +Blockly.ContextMenu.populate_=function(a,b){var c=new Blockly.Menu;c.setRightToLeft(b);for(var d=0,e;e=a[d];d++){var f=new Blockly.MenuItem(e.text);f.setRightToLeft(b);c.addChild(f,!0);f.setEnabled(e.enabled);if(e.enabled)f.onAction(function(){Blockly.ContextMenu.hide();this.callback()},e)}return c};
      +Blockly.ContextMenu.position_=function(a,b,c){var d=Blockly.utils.getViewportBBox();b={top:b.clientY+d.top,bottom:b.clientY+d.top,left:b.clientX+d.left,right:b.clientX+d.left};Blockly.ContextMenu.createWidget_(a);var e=Blockly.utils.uiMenu.getSize(a);c&&Blockly.utils.uiMenu.adjustBBoxesForRTL(d,b,e);Blockly.WidgetDiv.positionWithAnchor(d,b,e,c);a.getElement().focus()};
      +Blockly.ContextMenu.createWidget_=function(a){a.render(Blockly.WidgetDiv.DIV);var b=a.getElement();Blockly.utils.dom.addClass(b,"blocklyContextMenu");Blockly.bindEventWithChecks_(b,"contextmenu",null,Blockly.utils.noEvent);a.focus()};Blockly.ContextMenu.hide=function(){Blockly.WidgetDiv.hideIfOwner(Blockly.ContextMenu);Blockly.ContextMenu.currentBlock=null;Blockly.ContextMenu.eventWrapper_&&Blockly.unbindEvent_(Blockly.ContextMenu.eventWrapper_)};
      +Blockly.ContextMenu.callbackFactory=function(a,b){return function(){Blockly.Events.disable();try{var c=Blockly.Xml.domToBlock(b,a.workspace),d=a.getRelativeToSurfaceXY();d.x=a.RTL?d.x-Blockly.SNAP_RADIUS:d.x+Blockly.SNAP_RADIUS;d.y+=2*Blockly.SNAP_RADIUS;c.moveBy(d.x,d.y)}finally{Blockly.Events.enable()}Blockly.Events.isEnabled()&&!c.isShadow()&&Blockly.Events.fire(new Blockly.Events.BlockCreate(c));c.select()}};
      +Blockly.ContextMenu.blockDeleteOption=function(a){var b=a.getDescendants(!1).length,c=a.getNextBlock();c&&(b-=c.getDescendants(!1).length);return{text:1==b?Blockly.Msg.DELETE_BLOCK:Blockly.Msg.DELETE_X_BLOCKS.replace("%1",String(b)),enabled:!0,callback:function(){Blockly.Events.setGroup(!0);a.dispose(!0,!0);Blockly.Events.setGroup(!1)}}};Blockly.ContextMenu.blockHelpOption=function(a){return{enabled:!("function"==typeof a.helpUrl?!a.helpUrl():!a.helpUrl),text:Blockly.Msg.HELP,callback:function(){a.showHelp_()}}};
      +Blockly.ContextMenu.blockDuplicateOption=function(a){var b=a.isDuplicatable();return{text:Blockly.Msg.DUPLICATE_BLOCK,enabled:b,callback:function(){Blockly.duplicate_(a)}}};Blockly.ContextMenu.blockCommentOption=function(a){var b={enabled:!Blockly.utils.userAgent.IE};a.comment?(b.text=Blockly.Msg.REMOVE_COMMENT,b.callback=function(){a.setCommentText(null)}):(b.text=Blockly.Msg.ADD_COMMENT,b.callback=function(){a.setCommentText("")});return b};
      +Blockly.ContextMenu.commentDeleteOption=function(a){return{text:Blockly.Msg.REMOVE_COMMENT,enabled:!0,callback:function(){Blockly.Events.setGroup(!0);a.dispose(!0,!0);Blockly.Events.setGroup(!1)}}};Blockly.ContextMenu.commentDuplicateOption=function(a){return{text:Blockly.Msg.DUPLICATE_COMMENT,enabled:!0,callback:function(){Blockly.duplicate_(a)}}};
      +Blockly.ContextMenu.workspaceCommentOption=function(a,b){if(!Blockly.WorkspaceCommentSvg)throw Error("Missing require for Blockly.WorkspaceCommentSvg");var c={enabled:!Blockly.utils.userAgent.IE};c.text=Blockly.Msg.ADD_COMMENT;c.callback=function(){var c=new Blockly.WorkspaceCommentSvg(a,Blockly.Msg.WORKSPACE_COMMENT_DEFAULT_TEXT,Blockly.WorkspaceCommentSvg.DEFAULT_SIZE,Blockly.WorkspaceCommentSvg.DEFAULT_SIZE),e=a.getInjectionDiv().getBoundingClientRect();e=new Blockly.utils.Coordinate(b.clientX-
      +e.left,b.clientY-e.top);var f=a.getOriginOffsetInPixels();e=Blockly.utils.Coordinate.difference(e,f);e.scale(1/a.scale);c.moveBy(e.x,e.y);a.rendered&&(c.initSvg(),c.render(),c.select())};return c};Blockly.RenderedConnection=function(a,b){Blockly.RenderedConnection.superClass_.constructor.call(this,a,b);this.db_=a.workspace.connectionDBList[b];this.dbOpposite_=a.workspace.connectionDBList[Blockly.OPPOSITE_TYPE[b]];this.offsetInBlock_=new Blockly.utils.Coordinate(0,0);this.inDB_=!1;this.hidden_=!this.db_};Blockly.utils.object.inherits(Blockly.RenderedConnection,Blockly.Connection);
      +Blockly.RenderedConnection.prototype.dispose=function(){Blockly.RenderedConnection.superClass_.dispose.call(this);this.inDB_&&this.db_.removeConnection_(this)};Blockly.RenderedConnection.prototype.distanceFrom=function(a){var b=this.x_-a.x_;a=this.y_-a.y_;return Math.sqrt(b*b+a*a)};
      +Blockly.RenderedConnection.prototype.bumpAwayFrom_=function(a){if(!this.sourceBlock_.workspace.isDragging()){var b=this.sourceBlock_.getRootBlock();if(!b.isInFlyout){var c=!1;if(!b.isMovable()){b=a.getSourceBlock().getRootBlock();if(!b.isMovable())return;a=this;c=!0}var d=Blockly.selected==b;d||b.addSelect();var e=a.x_+Blockly.SNAP_RADIUS+Math.floor(Math.random()*Blockly.BUMP_RANDOMNESS)-this.x_,f=a.y_+Blockly.SNAP_RADIUS+Math.floor(Math.random()*Blockly.BUMP_RANDOMNESS)-this.y_;c&&(f=-f);b.RTL&&
      +(e=a.x_-Blockly.SNAP_RADIUS-Math.floor(Math.random()*Blockly.BUMP_RANDOMNESS)-this.x_);b.moveBy(e,f);d||b.removeSelect()}}};Blockly.RenderedConnection.prototype.moveTo=function(a,b){this.inDB_&&this.db_.removeConnection_(this);this.x_=a;this.y_=b;this.hidden_||this.db_.addConnection(this)};Blockly.RenderedConnection.prototype.moveBy=function(a,b){this.moveTo(this.x_+a,this.y_+b)};Blockly.RenderedConnection.prototype.moveToOffset=function(a){this.moveTo(a.x+this.offsetInBlock_.x,a.y+this.offsetInBlock_.y)};
      +Blockly.RenderedConnection.prototype.setOffsetInBlock=function(a,b){this.offsetInBlock_.x=a;this.offsetInBlock_.y=b};Blockly.RenderedConnection.prototype.getOffsetInBlock=function(){return this.offsetInBlock_};
      +Blockly.RenderedConnection.prototype.tighten_=function(){var a=this.targetConnection.x_-this.x_,b=this.targetConnection.y_-this.y_;if(0!=a||0!=b){var c=this.targetBlock(),d=c.getSvgRoot();if(!d)throw Error("block is not rendered.");d=Blockly.utils.getRelativeXY(d);c.getSvgRoot().setAttribute("transform","translate("+(d.x-a)+","+(d.y-b)+")");c.moveConnections_(-a,-b)}};Blockly.RenderedConnection.prototype.closest=function(a,b){return this.dbOpposite_.searchForClosest(this,a,b)};
      +Blockly.RenderedConnection.prototype.highlight=function(){var a=this.sourceBlock_.workspace.getRenderer().getConstants();a=this.type==Blockly.INPUT_VALUE||this.type==Blockly.OUTPUT_VALUE?Blockly.utils.svgPaths.moveBy(0,-5)+Blockly.utils.svgPaths.lineOnAxis("v",5)+a.PUZZLE_TAB.pathDown+Blockly.utils.svgPaths.lineOnAxis("v",5):Blockly.utils.svgPaths.moveBy(-5,0)+Blockly.utils.svgPaths.lineOnAxis("h",5)+a.NOTCH.pathLeft+Blockly.utils.svgPaths.lineOnAxis("h",5);var b=this.sourceBlock_.getRelativeToSurfaceXY();
      +Blockly.Connection.highlightedPath_=Blockly.utils.dom.createSvgElement("path",{"class":"blocklyHighlightedConnectionPath",d:a,transform:"translate("+(this.x_-b.x)+","+(this.y_-b.y)+")"+(this.sourceBlock_.RTL?" scale(-1 1)":"")},this.sourceBlock_.getSvgRoot())};
      +Blockly.RenderedConnection.prototype.unhideAll=function(){this.setHidden(!1);var a=[];if(this.type!=Blockly.INPUT_VALUE&&this.type!=Blockly.NEXT_STATEMENT)return a;var b=this.targetBlock();if(b){if(b.isCollapsed()){var c=[];b.outputConnection&&c.push(b.outputConnection);b.nextConnection&&c.push(b.nextConnection);b.previousConnection&&c.push(b.previousConnection)}else c=b.getConnections_(!0);for(var d=0;db?!1:Blockly.RenderedConnection.superClass_.isConnectionAllowed.call(this,a)};
      +Blockly.RenderedConnection.prototype.onFailedConnect=function(a){this.bumpAwayFrom_(a)};Blockly.RenderedConnection.prototype.disconnectInternal_=function(a,b){Blockly.RenderedConnection.superClass_.disconnectInternal_.call(this,a,b);a.rendered&&a.render();b.rendered&&(b.updateDisabled(),b.render())};
      +Blockly.RenderedConnection.prototype.respawnShadow_=function(){var a=this.getSourceBlock(),b=this.getShadowDom();if(a.workspace&&b&&Blockly.Events.recordUndo){Blockly.RenderedConnection.superClass_.respawnShadow_.call(this);b=this.targetBlock();if(!b)throw Error("Couldn't respawn the shadow block that should exist here.");b.initSvg();b.render(!1);a.rendered&&a.render()}};Blockly.RenderedConnection.prototype.neighbours_=function(a){return this.dbOpposite_.getNeighbours(this,a)};
      +Blockly.RenderedConnection.prototype.connect_=function(a){Blockly.RenderedConnection.superClass_.connect_.call(this,a);var b=this.getSourceBlock();a=a.getSourceBlock();b.rendered&&b.updateDisabled();a.rendered&&a.updateDisabled();b.rendered&&a.rendered&&(this.type==Blockly.NEXT_STATEMENT||this.type==Blockly.PREVIOUS_STATEMENT?a.render():b.render())};
      +Blockly.RenderedConnection.prototype.onCheckChanged_=function(){this.isConnected()&&!this.checkType_(this.targetConnection)&&((this.isSuperior()?this.targetBlock():this.sourceBlock_).unplug(),this.sourceBlock_.bumpNeighbours())};Blockly.utils.Rect=function(a,b,c,d){this.top=a;this.bottom=b;this.left=c;this.right=d};Blockly.utils.Rect.prototype.contains=function(a,b){return a>=this.left&&a<=this.right&&b>=this.top&&b<=this.bottom};Blockly.Icon=function(a){this.block_=a};Blockly.Icon.prototype.collapseHidden=!0;Blockly.Icon.prototype.SIZE=17;Blockly.Icon.prototype.bubble_=null;Blockly.Icon.prototype.iconXY_=null;
      +Blockly.Icon.prototype.createIcon=function(){this.iconGroup_||(this.iconGroup_=Blockly.utils.dom.createSvgElement("g",{"class":"blocklyIconGroup"},null),this.block_.isInFlyout&&Blockly.utils.dom.addClass(this.iconGroup_,"blocklyIconGroupReadonly"),this.drawIcon_(this.iconGroup_),this.block_.getSvgRoot().appendChild(this.iconGroup_),Blockly.bindEventWithChecks_(this.iconGroup_,"mouseup",this,this.iconClick_),this.updateEditable())};
      +Blockly.Icon.prototype.dispose=function(){Blockly.utils.dom.removeNode(this.iconGroup_);this.iconGroup_=null;this.setVisible(!1);this.block_=null};Blockly.Icon.prototype.updateEditable=function(){};Blockly.Icon.prototype.isVisible=function(){return!!this.bubble_};Blockly.Icon.prototype.iconClick_=function(a){this.block_.workspace.isDragging()||this.block_.isInFlyout||Blockly.utils.isRightButton(a)||this.setVisible(!this.isVisible())};
      +Blockly.Icon.prototype.updateColour=function(){this.isVisible()&&this.bubble_.setColour(this.block_.getColour())};Blockly.Icon.prototype.setIconLocation=function(a){this.iconXY_=a;this.isVisible()&&this.bubble_.setAnchorLocation(a)};
      +Blockly.Icon.prototype.computeIconLocation=function(){var a=this.block_.getRelativeToSurfaceXY(),b=Blockly.utils.getRelativeXY(this.iconGroup_);a=new Blockly.utils.Coordinate(a.x+b.x+this.SIZE/2,a.y+b.y+this.SIZE/2);Blockly.utils.Coordinate.equals(this.getIconLocation(),a)||this.setIconLocation(a)};Blockly.Icon.prototype.getIconLocation=function(){return this.iconXY_};
      +Blockly.Icon.prototype.getCorrectedSize=function(){return new Blockly.utils.Size(Blockly.Icon.prototype.SIZE,Blockly.Icon.prototype.SIZE-2)};Blockly.Warning=function(a){Blockly.Warning.superClass_.constructor.call(this,a);this.createIcon();this.text_={}};Blockly.utils.object.inherits(Blockly.Warning,Blockly.Icon);Blockly.Warning.prototype.collapseHidden=!1;
      +Blockly.Warning.prototype.drawIcon_=function(a){Blockly.utils.dom.createSvgElement("path",{"class":"blocklyIconShape",d:"M2,15Q-1,15 0.5,12L6.5,1.7Q8,-1 9.5,1.7L15.5,12Q17,15 14,15z"},a);Blockly.utils.dom.createSvgElement("path",{"class":"blocklyIconSymbol",d:"m7,4.8v3.16l0.27,2.27h1.46l0.27,-2.27v-3.16z"},a);Blockly.utils.dom.createSvgElement("rect",{"class":"blocklyIconSymbol",x:"7",y:"11",height:"2",width:"2"},a)};
      +Blockly.Warning.textToDom_=function(a){var b=Blockly.utils.dom.createSvgElement("text",{"class":"blocklyText blocklyBubbleText",y:Blockly.Bubble.BORDER_WIDTH},null);a=a.split("\n");for(var c=0;c>>/g,d);d=document.createElement("style");c=document.createTextNode(c);d.appendChild(c);document.head.insertBefore(d,document.head.firstChild)}}};Blockly.Css.setCursor=function(a){console.warn("Deprecated call to Blockly.Css.setCursor. See https://github.com/google/blockly/issues/981 for context")};
      +Blockly.Css.CONTENT=[".blocklySvg {","background-color: #fff;","outline: none;","overflow: hidden;","position: absolute;","display: block;","}",".blocklyWidgetDiv {","display: none;","position: absolute;","z-index: 99999;","}",".injectionDiv {","height: 100%;","position: relative;","overflow: hidden;","touch-action: none;","}",".blocklyNonSelectable {","user-select: none;","-ms-user-select: none;","-webkit-user-select: none;","}",".blocklyWsDragSurface {","display: none;","position: absolute;","top: 0;",
      +"left: 0;","}",".blocklyWsDragSurface.blocklyOverflowVisible {","overflow: visible;","}",".blocklyBlockDragSurface {","display: none;","position: absolute;","top: 0;","left: 0;","right: 0;","bottom: 0;","overflow: visible !important;","z-index: 50;","}",".blocklyBlockCanvas.blocklyCanvasTransitioning,",".blocklyBubbleCanvas.blocklyCanvasTransitioning {","transition: transform .5s;","}",".blocklyTooltipDiv {","background-color: #ffffc7;","border: 1px solid #ddc;","box-shadow: 4px 4px 20px 1px rgba(0,0,0,.15);",
      +"color: #000;","display: none;","font-family: sans-serif;","font-size: 9pt;","opacity: .9;","padding: 2px;","position: absolute;","z-index: 100000;","}",".blocklyDropDownDiv {","position: fixed;","left: 0;","top: 0;","z-index: 1000;","display: none;","border: 1px solid;","border-radius: 2px;","padding: 4px;","box-shadow: 0px 0px 3px 1px rgba(0,0,0,.3);","}",".blocklyDropDownDiv.focused {","box-shadow: 0px 0px 6px 1px rgba(0,0,0,.3);","}",".blocklyDropDownContent {","max-height: 300px;","overflow: auto;",
      +"overflow-x: hidden;","}",".blocklyDropDownArrow {","position: absolute;","left: 0;","top: 0;","width: 16px;","height: 16px;","z-index: -1;","background-color: inherit;","border-color: inherit;","}",".blocklyDropDownButton {","display: inline-block;","float: left;","padding: 0;","margin: 4px;","border-radius: 4px;","outline: none;","border: 1px solid;","transition: box-shadow .1s;","cursor: pointer;","}",".arrowTop {","border-top: 1px solid;","border-left: 1px solid;","border-top-left-radius: 4px;",
      +"border-color: inherit;","}",".arrowBottom {","border-bottom: 1px solid;","border-right: 1px solid;","border-bottom-right-radius: 4px;","border-color: inherit;","}",".blocklyResizeSE {","cursor: se-resize;","fill: #aaa;","}",".blocklyResizeSW {","cursor: sw-resize;","fill: #aaa;","}",".blocklyResizeLine {","stroke: #515A5A;","stroke-width: 1;","}",".blocklyHighlightedConnectionPath {","fill: none;","stroke: #fc3;","stroke-width: 4px;","}",".blocklyPathLight {","fill: none;","stroke-linecap: round;",
      +"stroke-width: 1;","}",".blocklySelected>.blocklyPath {","stroke: #fc3;","stroke-width: 3px;","}",".blocklySelected>.blocklyPathLight {","display: none;","}",".blocklyDraggable {",'cursor: url("<<>>/handopen.cur"), auto;',"cursor: grab;","cursor: -webkit-grab;","}",".blocklyDragging {",'cursor: url("<<>>/handclosed.cur"), auto;',"cursor: grabbing;","cursor: -webkit-grabbing;","}",".blocklyDraggable:active {",'cursor: url("<<>>/handclosed.cur"), auto;',"cursor: grabbing;","cursor: -webkit-grabbing;",
      +"}",".blocklyBlockDragSurface .blocklyDraggable {",'cursor: url("<<>>/handclosed.cur"), auto;',"cursor: grabbing;","cursor: -webkit-grabbing;","}",".blocklyDragging.blocklyDraggingDelete {",'cursor: url("<<>>/handdelete.cur"), auto;',"}",".blocklyDragging>.blocklyPath,",".blocklyDragging>.blocklyPathLight {","fill-opacity: .8;","stroke-opacity: .8;","}",".blocklyDragging>.blocklyPathDark {","display: none;","}",".blocklyDisabled>.blocklyPath {","fill-opacity: .5;","stroke-opacity: .5;",
      +"}",".blocklyDisabled>.blocklyPathLight,",".blocklyDisabled>.blocklyPathDark {","display: none;","}",".blocklyInsertionMarker>.blocklyPath,",".blocklyInsertionMarker>.blocklyPathLight,",".blocklyInsertionMarker>.blocklyPathDark {","fill-opacity: .2;","stroke: none","}",".blocklyReplaceable .blocklyPath {","fill-opacity: .5;","}",".blocklyReplaceable .blocklyPathLight,",".blocklyReplaceable .blocklyPathDark {","display: none;","}",".blocklyText {","cursor: default;","fill: #fff;","font-family: sans-serif;",
      +"font-size: 11pt;","}",".blocklyMultilineText {","font-family: monospace;","}",".blocklyNonEditableText>text {","pointer-events: none;","}",".blocklyNonEditableText>rect,",".blocklyEditableText>rect {","fill: #fff;","fill-opacity: .6;","}",".blocklyNonEditableText>text,",".blocklyEditableText>text {","fill: #000;","}",".blocklyEditableText:hover>rect {","stroke: #fff;","stroke-width: 2;","}",".blocklyBubbleText {","fill: #000;","}",".blocklyFlyout {","position: absolute;","z-index: 20;","}",".blocklySvg text, .blocklyBlockDragSurface text {",
      +"user-select: none;","-ms-user-select: none;","-webkit-user-select: none;","cursor: inherit;","}",".blocklyHidden {","display: none;","}",".blocklyFieldDropdown:not(.blocklyHidden) {","display: block;","}",".blocklyIconGroup {","cursor: default;","}",".blocklyIconGroup:not(:hover),",".blocklyIconGroupReadonly {","opacity: .6;","}",".blocklyIconShape {","fill: #00f;","stroke: #fff;","stroke-width: 1px;","}",".blocklyIconSymbol {","fill: #fff;","}",".blocklyMinimalBody {","margin: 0;","padding: 0;",
      +"}",".blocklyCommentForeignObject {","position: relative;","z-index: 0;","}",".blocklyCommentRect {","fill: #E7DE8E;","stroke: #bcA903;","stroke-width: 1px","}",".blocklyCommentTarget {","fill: transparent;","stroke: #bcA903;","}",".blocklyCommentTargetFocused {","fill: none;","}",".blocklyCommentHandleTarget {","fill: none;","}",".blocklyCommentHandleTargetFocused {","fill: transparent;","}",".blocklyFocused>.blocklyCommentRect {","fill: #B9B272;","stroke: #B9B272;","}",".blocklySelected>.blocklyCommentTarget {",
      +"stroke: #fc3;","stroke-width: 3px;","}",".blocklyCommentTextarea {","background-color: #fef49c;","border: 0;","outline: 0;","margin: 0;","padding: 3px;","resize: none;","display: block;","overflow: hidden;","}",".blocklyCommentDeleteIcon {","cursor: pointer;","fill: #000;","display: none","}",".blocklySelected > .blocklyCommentDeleteIcon {","display: block","}",".blocklyDeleteIconShape {","fill: #000;","stroke: #000;","stroke-width: 1px;","}",".blocklyDeleteIconShape.blocklyDeleteIconHighlighted {",
      +"stroke: #fc3;","}",".blocklyHtmlInput {","border: none;","border-radius: 4px;","font-family: sans-serif;","height: 100%;","margin: 0;","outline: none;","padding: 0;","width: 100%;","text-align: center;","}",".blocklyHtmlInput::-ms-clear {","display: none;","}",".blocklyMainBackground {","stroke-width: 1;","stroke: #c6c6c6;","}",".blocklyMutatorBackground {","fill: #fff;","stroke: #ddd;","stroke-width: 1;","}",".blocklyFlyoutBackground {","fill: #ddd;","fill-opacity: .8;","}",".blocklyMainWorkspaceScrollbar {",
      +"z-index: 20;","}",".blocklyFlyoutScrollbar {","z-index: 30;","}",".blocklyScrollbarHorizontal, .blocklyScrollbarVertical {","position: absolute;","outline: none;","}",".blocklyScrollbarBackground {","opacity: 0;","}",".blocklyScrollbarHandle {","fill: #ccc;","}",".blocklyScrollbarBackground:hover+.blocklyScrollbarHandle,",".blocklyScrollbarHandle:hover {","fill: #bbb;","}",".blocklyFlyout .blocklyScrollbarHandle {","fill: #bbb;","}",".blocklyFlyout .blocklyScrollbarBackground:hover+.blocklyScrollbarHandle,",
      +".blocklyFlyout .blocklyScrollbarHandle:hover {","fill: #aaa;","}",".blocklyInvalidInput {","background: #faa;","}",".blocklyContextMenu {","border-radius: 4px;","max-height: 100%;","}",".blocklyDropdownMenu {","border-radius: 2px;","padding: 0 !important;","}",".blocklyWidgetDiv .blocklyDropdownMenu .goog-menuitem,",".blocklyDropDownDiv .blocklyDropdownMenu .goog-menuitem {","padding-left: 28px;","}",".blocklyWidgetDiv .blocklyDropdownMenu .goog-menuitem.goog-menuitem-rtl,",".blocklyDropDownDiv .blocklyDropdownMenu .goog-menuitem.goog-menuitem-rtl {",
      +"padding-left: 5px;","padding-right: 28px;","}",".blocklyVerticalCursor {","stroke-width: 3px;","fill: rgba(255,255,255,.5);","}",".blocklyWidgetDiv .goog-option-selected .goog-menuitem-checkbox,",".blocklyWidgetDiv .goog-option-selected .goog-menuitem-icon,",".blocklyDropDownDiv .goog-option-selected .goog-menuitem-checkbox,",".blocklyDropDownDiv .goog-option-selected .goog-menuitem-icon {","background: url(<<>>/sprites.png) no-repeat -48px -16px;","}",".blocklyWidgetDiv .goog-menu {","background: #fff;",
      +"border-color: transparent;","border-style: solid;","border-width: 1px;","cursor: default;","font: normal 13px Arial, sans-serif;","margin: 0;","outline: none;","padding: 4px 0;","position: absolute;","overflow-y: auto;","overflow-x: hidden;","max-height: 100%;","z-index: 20000;","box-shadow: 0px 0px 3px 1px rgba(0,0,0,.3);","}",".blocklyWidgetDiv .goog-menu.focused {","box-shadow: 0px 0px 6px 1px rgba(0,0,0,.3);","}",".blocklyDropDownDiv .goog-menu {","cursor: default;",'font: normal 13px "Helvetica Neue", Helvetica, sans-serif;',
      +"outline: none;","z-index: 20000;","}",".blocklyWidgetDiv .goog-menuitem,",".blocklyDropDownDiv .goog-menuitem {","color: #000;","font: normal 13px Arial, sans-serif;","list-style: none;","margin: 0;","min-width: 7em;","border: none;","padding: 6px 15px;","white-space: nowrap;","cursor: pointer;","}",".blocklyWidgetDiv .goog-menu-nocheckbox .goog-menuitem,",".blocklyWidgetDiv .goog-menu-noicon .goog-menuitem,",".blocklyDropDownDiv .goog-menu-nocheckbox .goog-menuitem,",".blocklyDropDownDiv .goog-menu-noicon .goog-menuitem {",
      +"padding-left: 12px;","}",".blocklyWidgetDiv .goog-menuitem-content,",".blocklyDropDownDiv .goog-menuitem-content {","font: normal 13px Arial, sans-serif;","}",".blocklyWidgetDiv .goog-menuitem-content {","color: #000;","}",".blocklyDropDownDiv .goog-menuitem-content {","color: #000;","}",".blocklyWidgetDiv .goog-menuitem-disabled,",".blocklyDropDownDiv .goog-menuitem-disabled {","cursor: inherit;","}",".blocklyWidgetDiv .goog-menuitem-disabled .goog-menuitem-content,",".blocklyDropDownDiv .goog-menuitem-disabled .goog-menuitem-content {",
      +"color: #ccc !important;","}",".blocklyWidgetDiv .goog-menuitem-disabled .goog-menuitem-icon,",".blocklyDropDownDiv .goog-menuitem-disabled .goog-menuitem-icon {","opacity: .3;","filter: alpha(opacity=30);","}",".blocklyWidgetDiv .goog-menuitem-highlight ,",".blocklyDropDownDiv .goog-menuitem-highlight {","background-color: rgba(0,0,0,.1);","}",".blocklyWidgetDiv .goog-menuitem-checkbox,",".blocklyWidgetDiv .goog-menuitem-icon,",".blocklyDropDownDiv .goog-menuitem-checkbox,",".blocklyDropDownDiv .goog-menuitem-icon {",
      +"background-repeat: no-repeat;","height: 16px;","left: 6px;","position: absolute;","right: auto;","vertical-align: middle;","width: 16px;","}",".blocklyWidgetDiv .goog-menuitem-rtl .goog-menuitem-checkbox,",".blocklyWidgetDiv .goog-menuitem-rtl .goog-menuitem-icon,",".blocklyDropDownDiv .goog-menuitem-rtl .goog-menuitem-checkbox,",".blocklyDropDownDiv .goog-menuitem-rtl .goog-menuitem-icon {","left: auto;","right: 6px;","}",".blocklyWidgetDiv .goog-option-selected .goog-menuitem-checkbox,",".blocklyWidgetDiv .goog-option-selected .goog-menuitem-icon,",
      +".blocklyDropDownDiv .goog-option-selected .goog-menuitem-checkbox,",".blocklyDropDownDiv .goog-option-selected .goog-menuitem-icon {","position: static;","float: left;","margin-left: -24px;","}",".blocklyWidgetDiv .goog-menuitem-rtl .goog-menuitem-checkbox,",".blocklyWidgetDiv .goog-menuitem-rtl .goog-menuitem-icon,",".blocklyDropDownDiv .goog-menuitem-rtl .goog-menuitem-checkbox,",".blocklyDropDownDiv .goog-menuitem-rtl .goog-menuitem-icon {","float: right;","margin-right: -24px;","}"];
      +Blockly.DropDownDiv=function(){};Blockly.DropDownDiv.DIV_=null;Blockly.DropDownDiv.boundsElement_=null;Blockly.DropDownDiv.owner_=null;Blockly.DropDownDiv.positionToField_=null;Blockly.DropDownDiv.ARROW_SIZE=16;Blockly.DropDownDiv.BORDER_SIZE=1;Blockly.DropDownDiv.ARROW_HORIZONTAL_PADDING=12;Blockly.DropDownDiv.PADDING_Y=16;Blockly.DropDownDiv.ANIMATION_TIME=.25;Blockly.DropDownDiv.DEFAULT_DROPDOWN_BORDER_COLOR="#dadce0";Blockly.DropDownDiv.DEFAULT_DROPDOWN_COLOR="#fff";
      +Blockly.DropDownDiv.animateOutTimer_=null;Blockly.DropDownDiv.onHide_=null;
      +Blockly.DropDownDiv.createDom=function(){if(!Blockly.DropDownDiv.DIV_){var a=document.createElement("div");a.className="blocklyDropDownDiv";a.style.backgroundColor=Blockly.DropDownDiv.DEFAULT_DROPDOWN_COLOR;a.style.borderColor=Blockly.DropDownDiv.DEFAULT_DROPDOWN_BORDER_COLOR;document.body.appendChild(a);Blockly.DropDownDiv.DIV_=a;var b=document.createElement("div");b.className="blocklyDropDownContent";a.appendChild(b);Blockly.DropDownDiv.content_=b;b=document.createElement("div");b.className="blocklyDropDownArrow";
      +a.appendChild(b);Blockly.DropDownDiv.arrow_=b;Blockly.DropDownDiv.DIV_.style.opacity=0;Blockly.DropDownDiv.DIV_.style.transition="transform "+Blockly.DropDownDiv.ANIMATION_TIME+"s, opacity "+Blockly.DropDownDiv.ANIMATION_TIME+"s";a.addEventListener("focusin",function(){Blockly.utils.dom.addClass(a,"focused")});a.addEventListener("focusout",function(){Blockly.utils.dom.removeClass(a,"focused")})}};Blockly.DropDownDiv.setBoundsElement=function(a){Blockly.DropDownDiv.boundsElement_=a};
      +Blockly.DropDownDiv.getContentDiv=function(){return Blockly.DropDownDiv.content_};Blockly.DropDownDiv.clearContent=function(){Blockly.DropDownDiv.content_.innerHTML="";Blockly.DropDownDiv.content_.style.width=""};Blockly.DropDownDiv.setColour=function(a,b){Blockly.DropDownDiv.DIV_.style.backgroundColor=a;Blockly.DropDownDiv.DIV_.style.borderColor=b};Blockly.DropDownDiv.setCategory=function(a){Blockly.DropDownDiv.DIV_.setAttribute("data-category",a)};
      +Blockly.DropDownDiv.showPositionedByBlock=function(a,b,c,d){var e=b.workspace.scale,f=b.width,g=b.height;f*=e;g*=e;e=b.getSvgRoot().getBoundingClientRect();f=e.left+f/2;g=e.top+g;e=e.top;d&&(e+=d);Blockly.DropDownDiv.setBoundsElement(b.workspace.getParentSvg().parentNode);return Blockly.DropDownDiv.show(a,b.RTL,f,g,f,e,c)};
      +Blockly.DropDownDiv.showPositionedByField=function(a,b,c){var d=a.getSvgRoot().getBoundingClientRect(),e=d.left+d.width/2,f=d.bottom;d=d.top;c&&(d+=c);c=a.getSourceBlock();Blockly.DropDownDiv.positionToField_=!0;Blockly.DropDownDiv.setBoundsElement(c.workspace.getParentSvg().parentNode);return Blockly.DropDownDiv.show(a,c.RTL,e,f,e,d,b)};
      +Blockly.DropDownDiv.show=function(a,b,c,d,e,f,g){Blockly.DropDownDiv.owner_=a;Blockly.DropDownDiv.onHide_=g||null;a=Blockly.DropDownDiv.getPositionMetrics(c,d,e,f);a.arrowVisible?(Blockly.DropDownDiv.arrow_.style.display="",Blockly.DropDownDiv.arrow_.style.transform="translate("+a.arrowX+"px,"+a.arrowY+"px) rotate(45deg)",Blockly.DropDownDiv.arrow_.setAttribute("class",a.arrowAtTop?"blocklyDropDownArrow arrowTop":"blocklyDropDownArrow arrowBottom")):Blockly.DropDownDiv.arrow_.style.display="none";
      +Blockly.DropDownDiv.DIV_.style.direction=b?"rtl":"ltr";Blockly.DropDownDiv.positionInternal_(a.initialX,a.initialY,a.finalX,a.finalY);return a.arrowAtTop};Blockly.DropDownDiv.getBoundsInfo_=function(){var a=Blockly.DropDownDiv.boundsElement_.getBoundingClientRect(),b=Blockly.utils.style.getSize(Blockly.DropDownDiv.boundsElement_);return{left:a.left,right:a.left+b.width,top:a.top,bottom:a.top+b.height,width:b.width,height:b.height}};
      +Blockly.DropDownDiv.getPositionMetrics=function(a,b,c,d){var e=Blockly.DropDownDiv.getBoundsInfo_(),f=Blockly.utils.style.getSize(Blockly.DropDownDiv.DIV_);return b+f.heighte.top?Blockly.DropDownDiv.getPositionAboveMetrics(c,d,e,f):b+f.heightdocument.documentElement.clientTop?Blockly.DropDownDiv.getPositionAboveMetrics(c,d,
      +e,f):Blockly.DropDownDiv.getPositionTopOfPageMetrics(a,e,f)};Blockly.DropDownDiv.getPositionBelowMetrics=function(a,b,c,d){a=Blockly.DropDownDiv.getPositionX(a,c.left,c.right,d.width);return{initialX:a.divX,initialY:b,finalX:a.divX,finalY:b+Blockly.DropDownDiv.PADDING_Y,arrowX:a.arrowX,arrowY:-(Blockly.DropDownDiv.ARROW_SIZE/2+Blockly.DropDownDiv.BORDER_SIZE),arrowAtTop:!0,arrowVisible:!0}};
      +Blockly.DropDownDiv.getPositionAboveMetrics=function(a,b,c,d){a=Blockly.DropDownDiv.getPositionX(a,c.left,c.right,d.width);return{initialX:a.divX,initialY:b-d.height,finalX:a.divX,finalY:b-d.height-Blockly.DropDownDiv.PADDING_Y,arrowX:a.arrowX,arrowY:d.height-2*Blockly.DropDownDiv.BORDER_SIZE-Blockly.DropDownDiv.ARROW_SIZE/2,arrowAtTop:!1,arrowVisible:!0}};
      +Blockly.DropDownDiv.getPositionTopOfPageMetrics=function(a,b,c){a=Blockly.DropDownDiv.getPositionX(a,b.left,b.right,c.width);return{initialX:a.divX,initialY:0,finalX:a.divX,finalY:0,arrowVisible:!1}};Blockly.DropDownDiv.getPositionX=function(a,b,c,d){var e=a;a=Blockly.utils.math.clamp(b,a-d/2,c-d);e-=Blockly.DropDownDiv.ARROW_SIZE/2;b=Blockly.DropDownDiv.ARROW_HORIZONTAL_PADDING;d=Blockly.utils.math.clamp(b,e-a,d-b-Blockly.DropDownDiv.ARROW_SIZE);return{arrowX:d,divX:a}};
      +Blockly.DropDownDiv.isVisible=function(){return!!Blockly.DropDownDiv.owner_};Blockly.DropDownDiv.hideIfOwner=function(a,b){return Blockly.DropDownDiv.owner_===a?(b?Blockly.DropDownDiv.hideWithoutAnimation():Blockly.DropDownDiv.hide(),!0):!1};
      +Blockly.DropDownDiv.hide=function(){var a=Blockly.DropDownDiv.DIV_;a.style.transform="translate(0, 0)";a.style.opacity=0;Blockly.DropDownDiv.animateOutTimer_=setTimeout(function(){Blockly.DropDownDiv.hideWithoutAnimation()},1E3*Blockly.DropDownDiv.ANIMATION_TIME);Blockly.DropDownDiv.onHide_&&(Blockly.DropDownDiv.onHide_(),Blockly.DropDownDiv.onHide_=null)};
      +Blockly.DropDownDiv.hideWithoutAnimation=function(){if(Blockly.DropDownDiv.isVisible()){Blockly.DropDownDiv.animateOutTimer_&&clearTimeout(Blockly.DropDownDiv.animateOutTimer_);var a=Blockly.DropDownDiv.DIV_;a.style.transform="";a.style.left="";a.style.top="";a.style.opacity=0;a.style.display="none";a.style.backgroundColor=Blockly.DropDownDiv.DEFAULT_DROPDOWN_COLOR;a.style.borderColor=Blockly.DropDownDiv.DEFAULT_DROPDOWN_BORDER_COLOR;Blockly.DropDownDiv.onHide_&&(Blockly.DropDownDiv.onHide_(),Blockly.DropDownDiv.onHide_=
      +null);Blockly.DropDownDiv.clearContent();Blockly.DropDownDiv.owner_=null}};Blockly.DropDownDiv.positionInternal_=function(a,b,c,d){a=Math.floor(a);b=Math.floor(b);c=Math.floor(c);d=Math.floor(d);var e=Blockly.DropDownDiv.DIV_;e.style.left=a+"px";e.style.top=b+"px";e.style.display="block";e.style.opacity=1;e.style.transform="translate("+(c-a)+"px,"+(d-b)+"px)"};
      +Blockly.DropDownDiv.repositionForWindowResize=function(){if(Blockly.DropDownDiv.owner_){var a=Blockly.DropDownDiv.owner_.getSourceBlock(),b=a.workspace.scale,c=Blockly.DropDownDiv.positionToField_?Blockly.DropDownDiv.owner_.size_.width:a.width,d=Blockly.DropDownDiv.positionToField_?Blockly.DropDownDiv.owner_.size_.height:a.height;c*=b;d*=b;a=Blockly.DropDownDiv.positionToField_?Blockly.DropDownDiv.owner_.fieldGroup_.getBoundingClientRect():a.getSvgRoot().getBoundingClientRect();c=a.left+c/2;d=Blockly.DropDownDiv.getPositionMetrics(c,
      +a.top+d,c,a.top);Blockly.DropDownDiv.positionInternal_(d.initialX,d.initialY,d.finalX,d.finalY)}else Blockly.DropDownDiv.hide()};Blockly.Grid=function(a,b){this.gridPattern_=a;this.spacing_=b.spacing;this.length_=b.length;this.line2_=(this.line1_=a.firstChild)&&this.line1_.nextSibling;this.snapToGrid_=b.snap};Blockly.Grid.prototype.scale_=1;Blockly.Grid.prototype.dispose=function(){this.gridPattern_=null};Blockly.Grid.prototype.shouldSnap=function(){return this.snapToGrid_};Blockly.Grid.prototype.getSpacing=function(){return this.spacing_};Blockly.Grid.prototype.getPatternId=function(){return this.gridPattern_.id};
      +Blockly.Grid.prototype.update=function(a){this.scale_=a;var b=this.spacing_*a||100;this.gridPattern_.setAttribute("width",b);this.gridPattern_.setAttribute("height",b);b=Math.floor(this.spacing_/2)+.5;var c=b-this.length_/2,d=b+this.length_/2;b*=a;c*=a;d*=a;this.setLineAttributes_(this.line1_,a,c,d,b,b);this.setLineAttributes_(this.line2_,a,b,b,c,d)};
      +Blockly.Grid.prototype.setLineAttributes_=function(a,b,c,d,e,f){a&&(a.setAttribute("stroke-width",b),a.setAttribute("x1",c),a.setAttribute("y1",e),a.setAttribute("x2",d),a.setAttribute("y2",f))};Blockly.Grid.prototype.moveTo=function(a,b){this.gridPattern_.setAttribute("x",a);this.gridPattern_.setAttribute("y",b);(Blockly.utils.userAgent.IE||Blockly.utils.userAgent.EDGE)&&this.update(this.scale_)};
      +Blockly.Grid.createDom=function(a,b,c){a=Blockly.utils.dom.createSvgElement("pattern",{id:"blocklyGridPattern"+a,patternUnits:"userSpaceOnUse"},c);0 document.");}else a=null;return a};Blockly.WorkspaceDragSurfaceSvg=function(a){this.container_=a;this.createDom()};Blockly.WorkspaceDragSurfaceSvg.prototype.SVG_=null;Blockly.WorkspaceDragSurfaceSvg.prototype.dragGroup_=null;Blockly.WorkspaceDragSurfaceSvg.prototype.container_=null;
      +Blockly.WorkspaceDragSurfaceSvg.prototype.createDom=function(){this.SVG_||(this.SVG_=Blockly.utils.dom.createSvgElement("svg",{xmlns:Blockly.utils.dom.SVG_NS,"xmlns:html":Blockly.utils.dom.HTML_NS,"xmlns:xlink":Blockly.utils.dom.XLINK_NS,version:"1.1","class":"blocklyWsDragSurface blocklyOverflowVisible"},null),this.container_.appendChild(this.SVG_))};
      +Blockly.WorkspaceDragSurfaceSvg.prototype.translateSurface=function(a,b){var c=a.toFixed(0),d=b.toFixed(0);this.SVG_.style.display="block";Blockly.utils.dom.setCssTransform(this.SVG_,"translate3d("+c+"px, "+d+"px, 0px)")};Blockly.WorkspaceDragSurfaceSvg.prototype.getSurfaceTranslation=function(){return Blockly.utils.getRelativeXY(this.SVG_)};
      +Blockly.WorkspaceDragSurfaceSvg.prototype.clearAndHide=function(a){if(!a)throw Error("Couldn't clear and hide the drag surface: missing new surface.");var b=this.SVG_.childNodes[0],c=this.SVG_.childNodes[1];if(!(b&&c&&Blockly.utils.dom.hasClass(b,"blocklyBlockCanvas")&&Blockly.utils.dom.hasClass(c,"blocklyBubbleCanvas")))throw Error("Couldn't clear and hide the drag surface. A node was missing.");null!=this.previousSibling_?Blockly.utils.dom.insertAfter(b,this.previousSibling_):a.insertBefore(b,a.firstChild);
      +Blockly.utils.dom.insertAfter(c,b);this.SVG_.style.display="none";if(this.SVG_.childNodes.length)throw Error("Drag surface was not cleared.");Blockly.utils.dom.setCssTransform(this.SVG_,"");this.previousSibling_=null};
      +Blockly.WorkspaceDragSurfaceSvg.prototype.setContentsAndShow=function(a,b,c,d,e,f){if(this.SVG_.childNodes.length)throw Error("Already dragging a block.");this.previousSibling_=c;a.setAttribute("transform","translate(0, 0) scale("+f+")");b.setAttribute("transform","translate(0, 0) scale("+f+")");this.SVG_.setAttribute("width",d);this.SVG_.setAttribute("height",e);this.SVG_.appendChild(a);this.SVG_.appendChild(b);this.SVG_.style.display="block"};Blockly.blockRendering.rendererMap_={};Blockly.blockRendering.useDebugger=!1;Blockly.blockRendering.register=function(a,b){if(Blockly.blockRendering.rendererMap_[a])throw Error("Renderer has already been registered.");Blockly.blockRendering.rendererMap_[a]=b};Blockly.blockRendering.unregister=function(a){Blockly.blockRendering.rendererMap_[a]?delete Blockly.blockRendering.rendererMap_[a]:console.warn('No renderer mapping for name "'+a+'" found to unregister')};
      +Blockly.blockRendering.startDebugger=function(){Blockly.blockRendering.useDebugger=!0};Blockly.blockRendering.stopDebugger=function(){Blockly.blockRendering.useDebugger=!1};Blockly.blockRendering.init=function(a){if(!Blockly.blockRendering.rendererMap_[a])throw Error("Renderer not registered: ",a);var b=function(){b.superClass_.constructor.call(this)};Blockly.utils.object.inherits(b,Blockly.blockRendering.rendererMap_[a]);a=new b;a.init();return a};Blockly.ConnectionDB=function(){this.connections_=[]};Blockly.ConnectionDB.prototype.addConnection=function(a){if(a.inDB_)throw Error("Connection already in database.");if(!a.getSourceBlock().isInFlyout){var b=this.findPositionForConnection_(a);this.connections_.splice(b,0,a);a.inDB_=!0}};
      +Blockly.ConnectionDB.prototype.findConnection=function(a){if(!this.connections_.length)return-1;var b=this.findPositionForConnection_(a);if(b>=this.connections_.length)return-1;for(var c=a.y_,d=b;0<=d&&this.connections_[d].y_==c;){if(this.connections_[d]==a)return d;d--}for(;ba.y_)c=d;else{b=d;break}}return b};
      +Blockly.ConnectionDB.prototype.removeConnection_=function(a){if(!a.inDB_)throw Error("Connection not in database.");var b=this.findConnection(a);if(-1==b)throw Error("Unable to find connection in connectionDB.");a.inDB_=!1;this.connections_.splice(b,1)};
      +Blockly.ConnectionDB.prototype.getNeighbours=function(a,b){function c(a){var c=e-d[a].x_,g=f-d[a].y_;Math.sqrt(c*c+g*g)<=b&&l.push(d[a]);return gthis.previousScale_){var c=b-this.previousScale_;c=0Object.keys(this.cachedPoints_).length&&(this.cachedPoints_={},this.previousScale_=0)};
      +Blockly.TouchGesture.prototype.getTouchPoint=function(a){return this.startWorkspace_?new Blockly.utils.Coordinate(a.pageX?a.pageX:a.changedTouches[0].pageX,a.pageY?a.pageY:a.changedTouches[0].pageY):null};Blockly.WorkspaceAudio=function(a){this.parentWorkspace_=a;this.SOUNDS_=Object.create(null)};Blockly.WorkspaceAudio.prototype.lastSound_=null;Blockly.WorkspaceAudio.prototype.dispose=function(){this.SOUNDS_=this.parentWorkspace_=null};
      +Blockly.WorkspaceAudio.prototype.load=function(a,b){if(a.length){try{var c=new Blockly.utils.global.Audio}catch(h){return}for(var d,e=0;e=this.remainingCapacity()||(this.currentGesture_&&this.currentGesture_.cancel(),"comment"==a.tagName.toLowerCase()?this.pasteWorkspaceComment_(a):this.pasteBlock_(a))};
      +Blockly.WorkspaceSvg.prototype.pasteBlock_=function(a){Blockly.Events.disable();try{var b=Blockly.Xml.domToBlock(a,this),c=this.getMarker().getCurNode();if(Blockly.keyboardAccessibilityMode&&c){Blockly.navigation.insertBlock(b,c.getLocation());return}var d=parseInt(a.getAttribute("x"),10),e=parseInt(a.getAttribute("y"),10);if(!isNaN(d)&&!isNaN(e)){this.RTL&&(d=-d);do{a=!1;var f=this.getAllBlocks(!1);c=0;for(var g;g=f[c];c++){var h=g.getRelativeToSurfaceXY();if(1>=Math.abs(d-h.x)&&1>=Math.abs(e-h.y)){a=
      +!0;break}}if(!a){var k=b.getConnections_(!1);c=0;for(var l;l=k[c];c++)if(l.closest(Blockly.SNAP_RADIUS,new Blockly.utils.Coordinate(d,e)).connection){a=!0;break}}a&&(d=this.RTL?d-Blockly.SNAP_RADIUS:d+Blockly.SNAP_RADIUS,e+=2*Blockly.SNAP_RADIUS)}while(a);b.moveBy(d,e)}}finally{Blockly.Events.enable()}Blockly.Events.isEnabled()&&!b.isShadow()&&Blockly.Events.fire(new Blockly.Events.BlockCreate(b));b.select()};
      +Blockly.WorkspaceSvg.prototype.pasteWorkspaceComment_=function(a){Blockly.Events.disable();try{var b=Blockly.WorkspaceCommentSvg.fromXml(a,this),c=parseInt(a.getAttribute("x"),10),d=parseInt(a.getAttribute("y"),10);isNaN(c)||isNaN(d)||(this.RTL&&(c=-c),b.moveBy(c+50,d+50))}finally{Blockly.Events.enable()}Blockly.Events.isEnabled();b.select()};
      +Blockly.WorkspaceSvg.prototype.refreshToolboxSelection=function(){var a=this.isFlyout?this.targetWorkspace:this;a&&!a.currentGesture_&&a.toolbox_&&a.toolbox_.flyout_&&a.toolbox_.refreshSelection()};Blockly.WorkspaceSvg.prototype.renameVariableById=function(a,b){Blockly.WorkspaceSvg.superClass_.renameVariableById.call(this,a,b);this.refreshToolboxSelection()};Blockly.WorkspaceSvg.prototype.deleteVariableById=function(a){Blockly.WorkspaceSvg.superClass_.deleteVariableById.call(this,a);this.refreshToolboxSelection()};
      +Blockly.WorkspaceSvg.prototype.createVariable=function(a,b,c){a=Blockly.WorkspaceSvg.superClass_.createVariable.call(this,a,b,c);this.refreshToolboxSelection();return a};Blockly.WorkspaceSvg.prototype.recordDeleteAreas=function(){this.deleteAreaTrash_=this.trashcan&&this.svgGroup_.parentNode?this.trashcan.getClientRect():null;this.deleteAreaToolbox_=this.flyout_?this.flyout_.getClientRect():this.toolbox_?this.toolbox_.getClientRect():null};
      +Blockly.WorkspaceSvg.prototype.isDeleteArea=function(a){return this.deleteAreaTrash_&&this.deleteAreaTrash_.contains(a.clientX,a.clientY)?Blockly.DELETE_AREA_TRASH:this.deleteAreaToolbox_&&this.deleteAreaToolbox_.contains(a.clientX,a.clientY)?Blockly.DELETE_AREA_TOOLBOX:Blockly.DELETE_AREA_NONE};Blockly.WorkspaceSvg.prototype.onMouseDown_=function(a){var b=this.getGesture(a);b&&b.handleWsStart(a,this)};
      +Blockly.WorkspaceSvg.prototype.startDrag=function(a,b){var c=Blockly.utils.mouseToSvg(a,this.getParentSvg(),this.getInverseScreenCTM());c.x/=this.scale;c.y/=this.scale;this.dragDeltaXY_=Blockly.utils.Coordinate.difference(b,c)};Blockly.WorkspaceSvg.prototype.moveDrag=function(a){a=Blockly.utils.mouseToSvg(a,this.getParentSvg(),this.getInverseScreenCTM());a.x/=this.scale;a.y/=this.scale;return Blockly.utils.Coordinate.sum(this.dragDeltaXY_,a)};
      +Blockly.WorkspaceSvg.prototype.isDragging=function(){return null!=this.currentGesture_&&this.currentGesture_.isDragging()};Blockly.WorkspaceSvg.prototype.isDraggable=function(){return this.options.moveOptions&&this.options.moveOptions.drag};
      +Blockly.WorkspaceSvg.prototype.isContentBounded=function(){return this.options.moveOptions&&this.options.moveOptions.scrollbars||this.options.moveOptions&&this.options.moveOptions.wheel||this.options.moveOptions&&this.options.moveOptions.drag||this.options.zoomOptions&&this.options.zoomOptions.controls||this.options.zoomOptions&&this.options.zoomOptions.wheel};
      +Blockly.WorkspaceSvg.prototype.isMovable=function(){return this.options.moveOptions&&this.options.moveOptions.scrollbars||this.options.moveOptions&&this.options.moveOptions.wheel||this.options.moveOptions&&this.options.moveOptions.drag||this.options.zoomOptions&&this.options.zoomOptions.wheel};
      +Blockly.WorkspaceSvg.prototype.onMouseWheel_=function(a){if(Blockly.Gesture.inProgress())a.preventDefault(),a.stopPropagation();else{var b=this.options.zoomOptions&&this.options.zoomOptions.wheel,c=this.options.moveOptions&&this.options.moveOptions.wheel;if(b||c){var d=Blockly.utils.getScrollDeltaPixels(a);!b||!a.ctrlKey&&c?(b=this.scrollX-d.x,c=this.scrollY-d.y,a.shiftKey&&!d.x&&(b=this.scrollX-d.y,c=this.scrollY),this.scroll(b,c)):(d=-d.y/50,b=Blockly.utils.mouseToSvg(a,this.getParentSvg(),this.getInverseScreenCTM()),
      +this.zoom(b.x,b.y,d));a.preventDefault()}}};Blockly.WorkspaceSvg.prototype.getBlocksBoundingBox=function(){var a=this.getTopBlocks(!1),b=this.getTopComments(!1);a=a.concat(b);if(!a.length)return new Blockly.utils.Rect(0,0,0,0);b=a[0].getBoundingRectangle();for(var c=1;cb.bottom&&(b.bottom=d.bottom);d.leftb.right&&(b.right=d.right)}return b};
      +Blockly.WorkspaceSvg.prototype.cleanUp=function(){this.setResizesEnabled(!1);Blockly.Events.setGroup(!0);for(var a=this.getTopBlocks(!0),b=0,c=0,d;d=a[c];c++)if(d.isMovable()){var e=d.getRelativeToSurfaceXY();d.moveBy(-e.x,b-e.y);d.snapToGrid();b=d.getRelativeToSurfaceXY().y+d.getHeightWidth().height+Blockly.BlockSvg.MIN_BLOCK_Y}Blockly.Events.setGroup(!1);this.setResizesEnabled(!0)};
      +Blockly.WorkspaceSvg.prototype.showContextMenu_=function(a){function b(a){if(a.isDeletable())p=p.concat(a.getDescendants(!1));else{a=a.getChildren(!1);for(var c=0;cp.length?c():Blockly.confirm(Blockly.Msg.DELETE_ALL_BLOCKS.replace("%1",p.length),function(a){a&&
      +c()})}};d.push(h);this.configureContextMenu&&this.configureContextMenu(d);Blockly.ContextMenu.show(a,d,this.RTL)}};
      +Blockly.WorkspaceSvg.prototype.updateToolbox=function(a){if(a=Blockly.Options.parseToolboxTree(a)){if(!this.options.languageTree)throw Error("Existing toolbox is null.  Can't create new toolbox.");if(a.getElementsByTagName("category").length){if(!this.toolbox_)throw Error("Existing toolbox has no categories.  Can't change mode.");this.options.languageTree=a;this.toolbox_.renderTree(a)}else{if(!this.flyout_)throw Error("Existing toolbox has categories.  Can't change mode.");this.options.languageTree=
      +a;this.flyout_.show(a.childNodes)}}else if(this.options.languageTree)throw Error("Can't nullify an existing toolbox.");};Blockly.WorkspaceSvg.prototype.markFocused=function(){this.options.parentWorkspace?this.options.parentWorkspace.markFocused():(Blockly.mainWorkspace=this,this.setBrowserFocus())};Blockly.WorkspaceSvg.prototype.setBrowserFocus=function(){document.activeElement&&document.activeElement.blur();try{this.getParentSvg().focus()}catch(a){try{this.getParentSvg().parentNode.setActive()}catch(b){this.getParentSvg().parentNode.focus()}}};
      +Blockly.WorkspaceSvg.prototype.zoom=function(a,b,c){if(!this.isFlyout&&!this.isMutator){c=Math.pow(this.options.zoomOptions.scaleSpeed,c);var d=this.scale*c;if(this.scale!=d){d>this.options.zoomOptions.maxScale?c=this.options.zoomOptions.maxScale/this.scale:dthis.options.zoomOptions.maxScale?a=this.options.zoomOptions.maxScale:this.options.zoomOptions.minScale&&ab.viewBottom||b.contentLeftb.viewRight){c=null;a&&(c=Blockly.Events.getGroup(),Blockly.Events.setGroup(a.group));switch(a.type){case Blockly.Events.BLOCK_CREATE:case Blockly.Events.BLOCK_MOVE:var f=e.getBlockById(a.blockId);f=f.getRootBlock();break;case Blockly.Events.COMMENT_CREATE:case Blockly.Events.COMMENT_MOVE:f=e.getCommentById(a.commentId)}if(f){d=
      +f.getBoundingRectangle();d.height=d.bottom-d.top;d.width=d.right-d.left;var m=b.viewTop,n=b.viewBottom-d.height;n=Math.max(m,n);m=Blockly.utils.math.clamp(m,d.top,n)-d.top;n=b.viewLeft;var p=b.viewRight-d.width;b.RTL?n=Math.min(p,n):p=Math.max(n,p);b=Blockly.utils.math.clamp(n,d.left,p)-d.left;f.moveBy(b,m)}a&&(a.group||console.log("WARNING: Moved object in bounds but there was no event group. This may break undo."),null!==c&&Blockly.Events.setGroup(c))}}});Blockly.svgResize(e);Blockly.WidgetDiv.createDom();
      +Blockly.DropDownDiv.createDom();Blockly.Tooltip.createDom();return e};
      +Blockly.init_=function(a){var b=a.options,c=a.getParentSvg();Blockly.bindEventWithChecks_(c.parentNode,"contextmenu",null,function(a){Blockly.utils.isTargetInput(a)||a.preventDefault()});c=Blockly.bindEventWithChecks_(window,"resize",null,function(){Blockly.hideChaff(!0);Blockly.svgResize(a)});a.setResizeHandlerWrapper(c);Blockly.inject.bindDocumentEvents_();b.languageTree&&(a.toolbox_?a.toolbox_.init(a):a.flyout_&&(a.flyout_.init(a),a.flyout_.show(b.languageTree.childNodes),a.flyout_.scrollToStart()));
      +c=Blockly.Scrollbar.scrollbarThickness;b.hasTrashcan&&(c=a.trashcan.init(c));b.zoomOptions&&b.zoomOptions.controls&&a.zoomControls_.init(c);b.moveOptions&&b.moveOptions.scrollbars?(a.scrollbar=new Blockly.ScrollbarPair(a),a.scrollbar.resize()):a.setMetrics({x:.5,y:.5});b.hasSounds&&Blockly.inject.loadSounds_(b.pathToMedia,a)};
      +Blockly.inject.bindDocumentEvents_=function(){Blockly.documentEventsBound_||(Blockly.bindEventWithChecks_(document,"scroll",null,function(){for(var a=Blockly.Workspace.getAll(),b=0,c;c=a[b];b++)c.updateInverseScreenCTM&&c.updateInverseScreenCTM()}),Blockly.bindEventWithChecks_(document,"keydown",null,Blockly.onKeyDown_),Blockly.bindEvent_(document,"touchend",null,Blockly.longStop_),Blockly.bindEvent_(document,"touchcancel",null,Blockly.longStop_),Blockly.utils.userAgent.IPAD&&Blockly.bindEventWithChecks_(window,
      +"orientationchange",document,function(){Blockly.svgResize(Blockly.getMainWorkspace())}));Blockly.documentEventsBound_=!0};
      +Blockly.inject.loadSounds_=function(a,b){var c=b.getAudioManager();c.load([a+"click.mp3",a+"click.wav",a+"click.ogg"],"click");c.load([a+"disconnect.wav",a+"disconnect.mp3",a+"disconnect.ogg"],"disconnect");c.load([a+"delete.mp3",a+"delete.ogg",a+"delete.wav"],"delete");var d=[],e=function(){for(;d.length;)Blockly.unbindEvent_(d.pop());c.preload()};d.push(Blockly.bindEventWithChecks_(document,"mousemove",null,e,!0));d.push(Blockly.bindEventWithChecks_(document,"touchstart",null,e,!0))};Blockly.Action=function(a,b){this.name=a;this.desc=b};Blockly.ASTNode=function(a,b,c){if(!b)throw Error("Cannot create a node without a location.");this.type_=a;this.isConnection_=Blockly.ASTNode.isConnectionType_(a);this.location_=b;this.processParams_(c||null)};Blockly.ASTNode.types={FIELD:"field",BLOCK:"block",INPUT:"input",OUTPUT:"output",NEXT:"next",PREVIOUS:"previous",STACK:"stack",WORKSPACE:"workspace"};Blockly.ASTNode.DEFAULT_OFFSET_Y=-20;Blockly.ASTNode.isConnectionType_=function(a){switch(a){case Blockly.ASTNode.types.PREVIOUS:case Blockly.ASTNode.types.NEXT:case Blockly.ASTNode.types.INPUT:case Blockly.ASTNode.types.OUTPUT:return!0}return!1};
      +Blockly.ASTNode.createFieldNode=function(a){return new Blockly.ASTNode(Blockly.ASTNode.types.FIELD,a)};
      +Blockly.ASTNode.createConnectionNode=function(a){return a?a.type==Blockly.INPUT_VALUE||a.type==Blockly.NEXT_STATEMENT&&a.getParentInput()?Blockly.ASTNode.createInputNode(a.getParentInput()):a.type==Blockly.NEXT_STATEMENT?new Blockly.ASTNode(Blockly.ASTNode.types.NEXT,a):a.type==Blockly.OUTPUT_VALUE?new Blockly.ASTNode(Blockly.ASTNode.types.OUTPUT,a):a.type==Blockly.PREVIOUS_STATEMENT?new Blockly.ASTNode(Blockly.ASTNode.types.PREVIOUS,a):null:null};
      +Blockly.ASTNode.createInputNode=function(a){return a?new Blockly.ASTNode(Blockly.ASTNode.types.INPUT,a.connection):null};Blockly.ASTNode.createBlockNode=function(a){return new Blockly.ASTNode(Blockly.ASTNode.types.BLOCK,a)};Blockly.ASTNode.createStackNode=function(a){return new Blockly.ASTNode(Blockly.ASTNode.types.STACK,a)};Blockly.ASTNode.createWorkspaceNode=function(a,b){return new Blockly.ASTNode(Blockly.ASTNode.types.WORKSPACE,a,{wsCoordinate:b})};
      +Blockly.ASTNode.prototype.processParams_=function(a){a&&a.wsCoordinate&&(this.wsCoordinate_=a.wsCoordinate)};Blockly.ASTNode.prototype.getLocation=function(){return this.location_};Blockly.ASTNode.prototype.getType=function(){return this.type_};Blockly.ASTNode.prototype.getWsCoordinate=function(){return this.wsCoordinate_};Blockly.ASTNode.prototype.isConnection=function(){return this.isConnection_};
      +Blockly.ASTNode.prototype.findPreviousEditableField_=function(a,b,c){b=b.fieldRow;a=b.indexOf(a);for(c=(c?b.length:a)-1;a=b[c];c--)if(a.EDITABLE)return b=a,Blockly.ASTNode.createFieldNode(b);return null};Blockly.ASTNode.prototype.findNextForInput_=function(){var a=this.location_.getParentInput(),b=a.getSourceBlock();a=b.inputList.indexOf(a)+1;for(var c;c=b.inputList[a];a++){for(var d=c.fieldRow,e=0,f;f=d[e];e++)if(f.EDITABLE)return Blockly.ASTNode.createFieldNode(f);if(c.connection)return Blockly.ASTNode.createInputNode(c)}return null};
      +Blockly.ASTNode.prototype.findNextForField_=function(){var a=this.location_,b=a.getParentInput(),c=a.getSourceBlock(),d=c.inputList.indexOf(b);for(a=b.fieldRow.indexOf(a)+1;b=c.inputList[d];d++){for(var e=b.fieldRow;a1'),d.appendChild(c),b.push(d));if(Blockly.Blocks.variables_get){a.sort(Blockly.VariableModel.compareByName);c=0;for(var e;e=a[c];c++)d=Blockly.utils.xml.createElement("block"),d.setAttribute("type","variables_get"),d.setAttribute("gap",8),d.appendChild(Blockly.Variables.generateVariableFieldDom(e)),b.push(d)}}return b};
      +Blockly.Variables.generateUniqueName=function(a){a=a.getAllVariables();var b="";if(a.length)for(var c=1,d=0,e="ijkmnopqrstuvwxyzabcdefgh".charAt(d);!b;){for(var f=!1,g=0;ge?Blockly.WidgetDiv.positionInternal_(a,0,c.height+e):Blockly.WidgetDiv.positionInternal_(a,e,c.height)};
      +Blockly.WidgetDiv.calculateX_=function(a,b,c,d){if(d)return b=Math.max(b.right-c.width,a.left),Math.min(b,a.right-c.width);b=Math.min(b.left,a.right-c.width);return Math.max(b,a.left)};Blockly.WidgetDiv.calculateY_=function(a,b,c){return b.bottom+c.height>=a.bottom?b.top-c.height:b.bottom};Blockly.VERSION="3.20191014.4";Blockly.mainWorkspace=null;Blockly.selected=null;Blockly.cursor=null;Blockly.keyboardAccessibilityMode=!1;Blockly.draggingConnections_=[];Blockly.clipboardXml_=null;Blockly.clipboardSource_=null;Blockly.clipboardTypeCounts_=null;Blockly.cache3dSupported_=null;Blockly.svgSize=function(a){return{width:a.cachedWidth_,height:a.cachedHeight_}};Blockly.resizeSvgContents=function(a){a.resizeContents()};
      +Blockly.svgResize=function(a){for(;a.options.parentWorkspace;)a=a.options.parentWorkspace;var b=a.getParentSvg(),c=b.parentNode;if(c){var d=c.offsetWidth;c=c.offsetHeight;b.cachedWidth_!=d&&(b.setAttribute("width",d+"px"),b.cachedWidth_=d);b.cachedHeight_!=c&&(b.setAttribute("height",c+"px"),b.cachedHeight_=c);a.resize()}};
      +Blockly.onKeyDown_=function(a){var b=Blockly.mainWorkspace;if(!(Blockly.utils.isTargetInput(a)||b.rendered&&!b.isVisible()))if(b.options.readOnly)Blockly.navigation.onKeyPress(a);else{var c=!1;if(a.keyCode==Blockly.utils.KeyCodes.ESC)Blockly.hideChaff(),Blockly.navigation.onBlocklyAction(Blockly.navigation.ACTION_EXIT);else{if(Blockly.navigation.onKeyPress(a))return;if(a.keyCode==Blockly.utils.KeyCodes.BACKSPACE||a.keyCode==Blockly.utils.KeyCodes.DELETE){a.preventDefault();if(Blockly.Gesture.inProgress())return;
      +Blockly.selected&&Blockly.selected.isDeletable()&&(c=!0)}else if(a.altKey||a.ctrlKey||a.metaKey){if(Blockly.Gesture.inProgress())return;Blockly.selected&&Blockly.selected.isDeletable()&&Blockly.selected.isMovable()&&(a.keyCode==Blockly.utils.KeyCodes.C?(Blockly.hideChaff(),Blockly.copy_(Blockly.selected)):a.keyCode!=Blockly.utils.KeyCodes.X||Blockly.selected.workspace.isFlyout||(Blockly.copy_(Blockly.selected),c=!0));a.keyCode==Blockly.utils.KeyCodes.V?Blockly.clipboardXml_&&(a=Blockly.clipboardSource_,
      +a.isFlyout&&(a=a.targetWorkspace),Blockly.clipboardTypeCounts_&&a.isCapacityAvailable(Blockly.clipboardTypeCounts_)&&(Blockly.Events.setGroup(!0),a.paste(Blockly.clipboardXml_),Blockly.Events.setGroup(!1))):a.keyCode==Blockly.utils.KeyCodes.Z&&(Blockly.hideChaff(),b.undo(a.shiftKey))}}c&&!Blockly.selected.workspace.isFlyout&&(Blockly.Events.setGroup(!0),Blockly.hideChaff(),Blockly.selected.dispose(!0,!0),Blockly.Events.setGroup(!1))}};
      +Blockly.copy_=function(a){if(a.isComment)var b=a.toXmlWithXY();else{b=Blockly.Xml.blockToDom(a,!0);Blockly.Xml.deleteNext(b);var c=a.getRelativeToSurfaceXY();b.setAttribute("x",a.RTL?-c.x:c.x);b.setAttribute("y",c.y)}Blockly.clipboardXml_=b;Blockly.clipboardSource_=a.workspace;Blockly.clipboardTypeCounts_=a.isComment?null:Blockly.utils.getBlockTypeCounts(a,!0)};
      +Blockly.duplicate_=function(a){var b=Blockly.clipboardXml_,c=Blockly.clipboardSource_;Blockly.copy_(a);a.workspace.paste(Blockly.clipboardXml_);Blockly.clipboardXml_=b;Blockly.clipboardSource_=c};Blockly.onContextMenu_=function(a){Blockly.utils.isTargetInput(a)||a.preventDefault()};
      +Blockly.hideChaff=function(a){Blockly.Tooltip.hide();Blockly.WidgetDiv.hide();Blockly.DropDownDiv.hideWithoutAnimation();a||(a=Blockly.getMainWorkspace(),a.trashcan&&a.trashcan.flyout_&&a.trashcan.flyout_.hide(),a.toolbox_&&a.toolbox_.flyout_&&a.toolbox_.flyout_.autoClose&&a.toolbox_.clearSelection())};Blockly.getMainWorkspace=function(){return Blockly.mainWorkspace};Blockly.alert=function(a,b){alert(a);b&&b()};Blockly.confirm=function(a,b){b(confirm(a))};
      +Blockly.prompt=function(a,b,c){c(prompt(a,b))};Blockly.jsonInitFactory_=function(a){return function(){this.jsonInit(a)}};
      +Blockly.defineBlocksWithJsonArray=function(a){for(var b=0;ba&&(a=this.computeDepth_(),this.setDepth_(a));return a};Blockly.tree.BaseNode.prototype.computeDepth_=function(){var a=this.getParent();return a?a.getDepth()+1:0};Blockly.tree.BaseNode.prototype.setDepth_=function(a){if(a!=this.depth_){this.depth_=a;var b=this.getRowElement();if(b){var c=this.getPixelIndent_()+"px";this.isRightToLeft()?b.style.paddingRight=c:b.style.paddingLeft=c}this.forEachChild(function(b){b.setDepth_(a+1)})}};
      +Blockly.tree.BaseNode.prototype.contains=function(a){for(;a;){if(a==this)return!0;a=a.getParent()}return!1};Blockly.tree.BaseNode.prototype.getChildren=function(){var a=[];this.forEachChild(function(b){a.push(b)});return a};Blockly.tree.BaseNode.prototype.getFirstChild=function(){return this.getChildAt(0)};Blockly.tree.BaseNode.prototype.getLastChild=function(){return this.getChildAt(this.getChildCount()-1)};Blockly.tree.BaseNode.prototype.getPreviousSibling=function(){return this.previousSibling_};
      +Blockly.tree.BaseNode.prototype.getNextSibling=function(){return this.nextSibling_};Blockly.tree.BaseNode.prototype.isLastSibling=function(){return!this.nextSibling_};Blockly.tree.BaseNode.prototype.isSelected=function(){return this.selected_};Blockly.tree.BaseNode.prototype.select=function(){var a=this.getTree();a&&a.setSelectedItem(this)};Blockly.tree.BaseNode.prototype.selectFirst=function(){var a=this.getTree();a&&this.firstChild_&&a.setSelectedItem(this.firstChild_)};
      +Blockly.tree.BaseNode.prototype.setSelectedInternal=function(a){if(this.selected_!=a){this.selected_=a;this.updateRow();var b=this.getElement();b&&(Blockly.utils.aria.setState(b,Blockly.utils.aria.State.SELECTED,a),a&&(a=this.getTree().getElement(),Blockly.utils.aria.setState(a,Blockly.utils.aria.State.ACTIVEDESCENDANT,this.getId())))}};Blockly.tree.BaseNode.prototype.getExpanded=function(){return this.expanded_};Blockly.tree.BaseNode.prototype.setExpandedInternal=function(a){this.expanded_=a};
      +Blockly.tree.BaseNode.prototype.setExpanded=function(a){var b=a!=this.expanded_,c;this.expanded_=a;var d=this.getTree(),e=this.getElement();if(this.hasChildren()){if(!a&&d&&this.contains(d.getSelectedItem())&&this.select(),e){if(c=this.getChildrenElement())Blockly.utils.style.setElementShown(c,a),Blockly.utils.aria.setState(e,Blockly.utils.aria.State.EXPANDED,a),a&&this.isInDocument()&&!c.hasChildNodes()&&(this.forEachChild(function(a){c.appendChild(a.toDom())}),this.forEachChild(function(a){a.enterDocument()}));
      +this.updateExpandIcon()}}else(c=this.getChildrenElement())&&Blockly.utils.style.setElementShown(c,!1);e&&this.updateIcon_();b&&(a?this.doNodeExpanded():this.doNodeCollapsed())};Blockly.tree.BaseNode.prototype.doNodeExpanded=function(){};Blockly.tree.BaseNode.prototype.doNodeCollapsed=function(){};Blockly.tree.BaseNode.prototype.toggle=function(){this.setExpanded(!this.getExpanded())};Blockly.tree.BaseNode.prototype.isUserCollapsible=function(){return this.isUserCollapsible_};
      +Blockly.tree.BaseNode.prototype.toDom=function(){var a=this.getExpanded()&&this.hasChildren(),b=document.createElement("div");b.style.backgroundPosition=this.getBackgroundPosition();a||(b.style.display="none");a&&this.forEachChild(function(a){b.appendChild(a.toDom())});a=document.createElement("div");a.id=this.getId();a.appendChild(this.getRowDom());a.appendChild(b);return a};Blockly.tree.BaseNode.prototype.getPixelIndent_=function(){return Math.max(0,(this.getDepth()-1)*this.config_.indentWidth)};
      +Blockly.tree.BaseNode.prototype.getRowDom=function(){var a=document.createElement("div");a.className=this.getRowClassName();a.style["padding-"+(this.isRightToLeft()?"right":"left")]=this.getPixelIndent_()+"px";a.appendChild(this.getIconDom());a.appendChild(this.getLabelDom());return a};Blockly.tree.BaseNode.prototype.getRowClassName=function(){var a="";this.isSelected()&&(a=" "+(this.config_.cssSelectedRow||""));return this.config_.cssTreeRow+a};
      +Blockly.tree.BaseNode.prototype.getLabelDom=function(){var a=document.createElement("span");a.className=this.config_.cssItemLabel||"";a.textContent=this.getText();return a};Blockly.tree.BaseNode.prototype.getIconDom=function(){var a=document.createElement("span");a.style.display="inline-block";a.className=this.getCalculatedIconClass();return a};Blockly.tree.BaseNode.prototype.getCalculatedIconClass=function(){throw Error("unimplemented abstract method");};
      +Blockly.tree.BaseNode.prototype.getBackgroundPosition=function(){return(this.isLastSibling()?"-100":(this.getDepth()-1)*this.config_.indentWidth)+"px 0"};Blockly.tree.BaseNode.prototype.getElement=function(){var a=Blockly.tree.BaseNode.superClass_.getElement.call(this);a||(a=document.getElementById(this.getId()),this.setElementInternal(a));return a};Blockly.tree.BaseNode.prototype.getRowElement=function(){var a=this.getElement();return a?a.firstChild:null};
      +Blockly.tree.BaseNode.prototype.getIconElement=function(){var a=this.getRowElement();return a?a.firstChild:null};Blockly.tree.BaseNode.prototype.getLabelElement=function(){var a=this.getRowElement();return a&&a.lastChild?a.lastChild.previousSibling:null};Blockly.tree.BaseNode.prototype.getChildrenElement=function(){var a=this.getElement();return a?a.lastChild:null};Blockly.tree.BaseNode.prototype.getIconClass=function(){return this.iconClass_};
      +Blockly.tree.BaseNode.prototype.getExpandedIconClass=function(){return this.expandedIconClass_};Blockly.tree.BaseNode.prototype.setText=function(a){this.content_=a};Blockly.tree.BaseNode.prototype.getText=function(){return this.content_};Blockly.tree.BaseNode.prototype.updateRow=function(){var a=this.getRowElement();a&&(a.className=this.getRowClassName())};Blockly.tree.BaseNode.prototype.updateExpandIcon=function(){var a=this.getChildrenElement();a&&(a.style.backgroundPosition=this.getBackgroundPosition())};
      +Blockly.tree.BaseNode.prototype.updateIcon_=function(){this.getIconElement().className=this.getCalculatedIconClass()};Blockly.tree.BaseNode.prototype.onMouseDown=function(a){"expand"==a.target.getAttribute("type")&&this.hasChildren()?this.isUserCollapsible_&&this.toggle():(this.select(),this.updateRow())};Blockly.tree.BaseNode.prototype.onClick_=function(a){a.preventDefault()};
      +Blockly.tree.BaseNode.prototype.onKeyDown=function(a){var b=!0;switch(a.keyCode){case Blockly.utils.KeyCodes.RIGHT:if(a.altKey)break;b=this.selectChild();break;case Blockly.utils.KeyCodes.LEFT:if(a.altKey)break;b=this.selectParent();break;case Blockly.utils.KeyCodes.DOWN:b=this.selectNext();break;case Blockly.utils.KeyCodes.UP:b=this.selectPrevious();break;default:b=!1}b&&a.preventDefault();return b};
      +Blockly.tree.BaseNode.prototype.selectNext=function(){var a=this.getNextShownNode();a&&a.select();return!0};Blockly.tree.BaseNode.prototype.selectPrevious=function(){var a=this.getPreviousShownNode();a&&a.select();return!0};Blockly.tree.BaseNode.prototype.selectParent=function(){if(this.hasChildren()&&this.getExpanded()&&this.isUserCollapsible_)this.setExpanded(!1);else{var a=this.getParent(),b=this.getTree();a&&a!=b&&a.select()}return!0};
      +Blockly.tree.BaseNode.prototype.selectChild=function(){return this.hasChildren()?(this.getExpanded()?this.getFirstChild().select():this.setExpanded(!0),!0):!1};Blockly.tree.BaseNode.prototype.getLastShownDescendant=function(){return this.getExpanded()&&this.hasChildren()?this.getLastChild().getLastShownDescendant():this};
      +Blockly.tree.BaseNode.prototype.getNextShownNode=function(){if(this.hasChildren()&&this.getExpanded())return this.getFirstChild();for(var a=this,b;a!=this.getTree();){b=a.getNextSibling();if(null!=b)return b;a=a.getParent()}return null};Blockly.tree.BaseNode.prototype.getPreviousShownNode=function(){var a=this.getPreviousSibling();if(null!=a)return a.getLastShownDescendant();a=this.getParent();var b=this.getTree();return a==b||this==b?null:a};Blockly.tree.BaseNode.prototype.getConfig=function(){return this.config_};
      +Blockly.tree.BaseNode.prototype.setTreeInternal=function(a){this.tree!=a&&(this.tree=a,this.forEachChild(function(b){b.setTreeInternal(a)}))};Blockly.tree.TreeNode=function(a,b,c){this.toolbox_=a;Blockly.tree.BaseNode.call(this,b,c)};Blockly.utils.object.inherits(Blockly.tree.TreeNode,Blockly.tree.BaseNode);Blockly.tree.TreeNode.prototype.getTree=function(){if(this.tree)return this.tree;var a=this.getParent();return a&&(a=a.getTree())?(this.setTreeInternal(a),a):null};
      +Blockly.tree.TreeNode.prototype.getCalculatedIconClass=function(){var a=this.getExpanded(),b=this.getExpandedIconClass();if(a&&b)return b;b=this.getIconClass();if(!a&&b)return b;b=this.getConfig();if(this.hasChildren()){if(a&&b.cssExpandedFolderIcon)return b.cssTreeIcon+" "+b.cssExpandedFolderIcon;if(!a&&b.cssCollapsedFolderIcon)return b.cssTreeIcon+" "+b.cssCollapsedFolderIcon}else if(b.cssFileIcon)return b.cssTreeIcon+" "+b.cssFileIcon;return""};
      +Blockly.tree.TreeNode.prototype.onClick_=function(a){this.hasChildren()&&this.isUserCollapsible()?(this.toggle(),this.select()):this.isSelected()?this.getTree().setSelectedItem(null):this.select();this.updateRow()};Blockly.tree.TreeNode.prototype.onMouseDown=function(a){};
      +Blockly.tree.TreeNode.prototype.onKeyDown=function(a){if(this.tree.toolbox_.horizontalLayout_){var b={},c=Blockly.utils.KeyCodes.DOWN,d=Blockly.utils.KeyCodes.UP;b[Blockly.utils.KeyCodes.RIGHT]=this.isRightToLeft()?d:c;b[Blockly.utils.KeyCodes.LEFT]=this.isRightToLeft()?c:d;b[Blockly.utils.KeyCodes.UP]=Blockly.utils.KeyCodes.LEFT;b[Blockly.utils.KeyCodes.DOWN]=Blockly.utils.KeyCodes.RIGHT;Object.defineProperties(a,{keyCode:{value:b[a.keyCode]||a.keyCode}})}return Blockly.tree.TreeNode.superClass_.onKeyDown.call(this,
      +a)};Blockly.tree.TreeNode.prototype.onSizeChanged=function(a){this.onSizeChanged_=a};Blockly.tree.TreeNode.prototype.resizeToolbox_=function(){this.onSizeChanged_&&this.onSizeChanged_.call(this.toolbox_)};Blockly.tree.TreeNode.prototype.doNodeExpanded=Blockly.tree.TreeNode.prototype.resizeToolbox_;Blockly.tree.TreeNode.prototype.doNodeCollapsed=Blockly.tree.TreeNode.prototype.resizeToolbox_;Blockly.tree.TreeControl=function(a,b){this.toolbox_=a;Blockly.tree.BaseNode.call(this,"",b);this.setExpandedInternal(!0);this.setSelectedInternal(!0);this.selectedItem_=this};Blockly.utils.object.inherits(Blockly.tree.TreeControl,Blockly.tree.BaseNode);Blockly.tree.TreeControl.prototype.getTree=function(){return this};Blockly.tree.TreeControl.prototype.getToolbox=function(){return this.toolbox_};Blockly.tree.TreeControl.prototype.getDepth=function(){return 0};
      +Blockly.tree.TreeControl.prototype.handleFocus_=function(a){this.focused_=!0;a=this.getElement();Blockly.utils.dom.addClass(a,"focused");this.selectedItem_&&this.selectedItem_.select()};Blockly.tree.TreeControl.prototype.handleBlur_=function(a){this.focused_=!1;a=this.getElement();Blockly.utils.dom.removeClass(a,"focused")};Blockly.tree.TreeControl.prototype.hasFocus=function(){return this.focused_};Blockly.tree.TreeControl.prototype.getExpanded=function(){return!0};
      +Blockly.tree.TreeControl.prototype.setExpanded=function(a){this.setExpandedInternal(a)};Blockly.tree.TreeControl.prototype.getIconElement=function(){var a=this.getRowElement();return a?a.firstChild:null};Blockly.tree.TreeControl.prototype.updateExpandIcon=function(){};Blockly.tree.TreeControl.prototype.getRowClassName=function(){return Blockly.tree.TreeControl.superClass_.getRowClassName.call(this)+" "+this.getConfig().cssHideRoot};
      +Blockly.tree.TreeControl.prototype.getCalculatedIconClass=function(){var a=this.getExpanded(),b=this.getExpandedIconClass();if(a&&b)return b;b=this.getIconClass();if(!a&&b)return b;b=this.getConfig();return a&&b.cssExpandedRootIcon?b.cssTreeIcon+" "+b.cssExpandedRootIcon:""};
      +Blockly.tree.TreeControl.prototype.setSelectedItem=function(a){if(a!=this.selectedItem_&&(!this.onBeforeSelected_||this.onBeforeSelected_.call(this.toolbox_,a))){var b=this.getSelectedItem();this.selectedItem_&&this.selectedItem_.setSelectedInternal(!1);(this.selectedItem_=a)&&a.setSelectedInternal(!0);this.onAfterSelected_&&this.onAfterSelected_.call(this.toolbox_,b,a)}};Blockly.tree.TreeControl.prototype.onBeforeSelected=function(a){this.onBeforeSelected_=a};
      +Blockly.tree.TreeControl.prototype.onAfterSelected=function(a){this.onAfterSelected_=a};Blockly.tree.TreeControl.prototype.getSelectedItem=function(){return this.selectedItem_};Blockly.tree.TreeControl.prototype.initAccessibility=function(){Blockly.tree.TreeControl.superClass_.initAccessibility.call(this);var a=this.getElement();Blockly.utils.aria.setRole(a,Blockly.utils.aria.Role.TREE);Blockly.utils.aria.setState(a,Blockly.utils.aria.State.LABELLEDBY,this.getLabelElement().id)};
      +Blockly.tree.TreeControl.prototype.enterDocument=function(){Blockly.tree.TreeControl.superClass_.enterDocument.call(this);var a=this.getElement();a.className=this.getConfig().cssRoot;a.setAttribute("hideFocus","true");this.attachEvents_();this.initAccessibility()};Blockly.tree.TreeControl.prototype.exitDocument=function(){Blockly.tree.TreeControl.superClass_.exitDocument.call(this);this.detachEvents_()};
      +Blockly.tree.TreeControl.prototype.attachEvents_=function(){var a=this.getElement();a.tabIndex=0;this.onFocusWrapper_=Blockly.bindEvent_(a,"focus",this,this.handleFocus_);this.onBlurWrapper_=Blockly.bindEvent_(a,"blur",this,this.handleBlur_);this.onClickWrapper_=Blockly.bindEventWithChecks_(a,"click",this,this.handleMouseEvent_);this.onKeydownWrapper_=Blockly.bindEvent_(a,"keydown",this,this.handleKeyEvent_)};
      +Blockly.tree.TreeControl.prototype.detachEvents_=function(){Blockly.unbindEvent_(this.onFocusWrapper_);Blockly.unbindEvent_(this.onBlurWrapper_);Blockly.unbindEvent_(this.onClickWrapper_);Blockly.unbindEvent_(this.onKeydownWrapper_)};Blockly.tree.TreeControl.prototype.handleMouseEvent_=function(a){var b=this.getNodeFromEvent_(a);if(b)switch(a.type){case "mousedown":b.onMouseDown(a);break;case "click":b.onClick_(a)}};
      +Blockly.tree.TreeControl.prototype.handleKeyEvent_=function(a){var b=!1;if(b=this.selectedItem_&&this.selectedItem_.onKeyDown(a)||b)Blockly.utils.style.scrollIntoContainerView(this.selectedItem_.getElement(),this.getElement().parentNode),a.preventDefault();return b};Blockly.tree.TreeControl.prototype.getNodeFromEvent_=function(a){for(var b=a.target;null!=b;){if(a=Blockly.tree.BaseNode.allNodes[b.id])return a;if(b==this.getElement())break;b=b.parentNode}return null};
      +Blockly.tree.TreeControl.prototype.createNode=function(a){return new Blockly.tree.TreeNode(this.toolbox_,a||"",this.getConfig())};Blockly.FieldTextInput=function(a,b,c){this.spellcheck_=!0;null==a&&(a="");Blockly.FieldTextInput.superClass_.constructor.call(this,a,b,c)};Blockly.utils.object.inherits(Blockly.FieldTextInput,Blockly.Field);Blockly.FieldTextInput.fromJson=function(a){var b=Blockly.utils.replaceMessageReferences(a.text);return new Blockly.FieldTextInput(b,void 0,a)};Blockly.FieldTextInput.prototype.SERIALIZABLE=!0;Blockly.FieldTextInput.FONTSIZE=11;Blockly.FieldTextInput.BORDERRADIUS=4;
      +Blockly.FieldTextInput.prototype.CURSOR="text";Blockly.FieldTextInput.prototype.configure_=function(a){Blockly.FieldTextInput.superClass_.configure_.call(this,a);"boolean"==typeof a.spellcheck&&(this.spellcheck_=a.spellcheck)};Blockly.FieldTextInput.prototype.doClassValidation_=function(a){return null===a||void 0===a?null:String(a)};
      +Blockly.FieldTextInput.prototype.doValueInvalid_=function(a){this.isBeingEdited_&&(this.isTextValid_=!1,a=this.value_,this.value_=this.htmlInput_.untypedDefaultValue_,this.sourceBlock_&&Blockly.Events.isEnabled()&&Blockly.Events.fire(new Blockly.Events.BlockChange(this.sourceBlock_,"field",this.name||null,a,this.value_)))};Blockly.FieldTextInput.prototype.doValueUpdate_=function(a){this.isTextValid_=!0;this.value_=a;this.isBeingEdited_||(this.isDirty_=!0)};
      +Blockly.FieldTextInput.prototype.render_=function(){Blockly.FieldTextInput.superClass_.render_.call(this);this.isBeingEdited_&&(this.sourceBlock_.RTL?setTimeout(this.resizeEditor_.bind(this),0):this.resizeEditor_(),this.isTextValid_?(Blockly.utils.dom.removeClass(this.htmlInput_,"blocklyInvalidInput"),Blockly.utils.aria.setState(this.htmlInput_,"invalid",!1)):(Blockly.utils.dom.addClass(this.htmlInput_,"blocklyInvalidInput"),Blockly.utils.aria.setState(this.htmlInput_,"invalid",!0)))};
      +Blockly.FieldTextInput.prototype.setSpellcheck=function(a){a!=this.spellcheck_&&(this.spellcheck_=a,this.htmlInput_&&this.htmlInput_.setAttribute("spellcheck",this.spellcheck_))};Blockly.FieldTextInput.prototype.showEditor_=function(a){this.workspace_=this.sourceBlock_.workspace;a=a||!1;!a&&(Blockly.utils.userAgent.MOBILE||Blockly.utils.userAgent.ANDROID||Blockly.utils.userAgent.IPAD)?this.showPromptEditor_():this.showInlineEditor_(a)};
      +Blockly.FieldTextInput.prototype.showPromptEditor_=function(){var a=this;Blockly.prompt(Blockly.Msg.CHANGE_VALUE_TITLE,this.getText(),function(b){a.setValue(b)})};Blockly.FieldTextInput.prototype.showInlineEditor_=function(a){Blockly.WidgetDiv.show(this,this.sourceBlock_.RTL,this.widgetDispose_.bind(this));this.htmlInput_=this.widgetCreate_();this.isBeingEdited_=!0;a||(this.htmlInput_.focus(),this.htmlInput_.select())};
      +Blockly.FieldTextInput.prototype.widgetCreate_=function(){var a=Blockly.WidgetDiv.DIV,b=document.createElement("input");b.className="blocklyHtmlInput";b.setAttribute("spellcheck",this.spellcheck_);var c=Blockly.FieldTextInput.FONTSIZE*this.workspace_.scale+"pt";a.style.fontSize=c;b.style.fontSize=c;b.style.borderRadius=Blockly.FieldTextInput.BORDERRADIUS*this.workspace_.scale+"px";a.appendChild(b);b.value=b.defaultValue=this.getEditorText_(this.value_);b.untypedDefaultValue_=this.value_;b.oldValue_=
      +null;Blockly.utils.userAgent.GECKO?setTimeout(this.resizeEditor_.bind(this),0):this.resizeEditor_();this.bindInputEvents_(b);return b};Blockly.FieldTextInput.prototype.widgetDispose_=function(){this.isBeingEdited_=!1;this.isTextValid_=!0;this.forceRerender();if(this.onFinishEditing_)this.onFinishEditing_(this.value_);this.unbindInputEvents_();var a=Blockly.WidgetDiv.DIV.style;a.width="auto";a.height="auto";a.fontSize=""};
      +Blockly.FieldTextInput.prototype.bindInputEvents_=function(a){this.onKeyDownWrapper_=Blockly.bindEventWithChecks_(a,"keydown",this,this.onHtmlInputKeyDown_);this.onKeyInputWrapper_=Blockly.bindEventWithChecks_(a,"input",this,this.onHtmlInputChange_)};Blockly.FieldTextInput.prototype.unbindInputEvents_=function(){Blockly.unbindEvent_(this.onKeyDownWrapper_);Blockly.unbindEvent_(this.onKeyInputWrapper_)};
      +Blockly.FieldTextInput.prototype.onHtmlInputKeyDown_=function(a){a.keyCode==Blockly.utils.KeyCodes.ENTER?(Blockly.WidgetDiv.hide(),Blockly.DropDownDiv.hideWithoutAnimation()):a.keyCode==Blockly.utils.KeyCodes.ESC?(this.htmlInput_.value=this.htmlInput_.defaultValue,Blockly.WidgetDiv.hide(),Blockly.DropDownDiv.hideWithoutAnimation()):a.keyCode==Blockly.utils.KeyCodes.TAB&&(Blockly.WidgetDiv.hide(),Blockly.DropDownDiv.hideWithoutAnimation(),this.sourceBlock_.tab(this,!a.shiftKey),a.preventDefault())};
      +Blockly.FieldTextInput.prototype.onHtmlInputChange_=function(a){a=this.htmlInput_.value;a!==this.htmlInput_.oldValue_&&(this.htmlInput_.oldValue_=a,Blockly.Events.setGroup(!0),a=this.getValueFromEditorText_(a),this.setValue(a),this.forceRerender(),Blockly.Events.setGroup(!1))};Blockly.FieldTextInput.prototype.setEditorValue_=function(a){this.isDirty_=!0;this.isBeingEdited_&&(this.htmlInput_.value=this.getEditorText_(a));this.setValue(a)};
      +Blockly.FieldTextInput.prototype.resizeEditor_=function(){var a=Blockly.WidgetDiv.DIV,b=this.getScaledBBox_();a.style.width=b.right-b.left+"px";a.style.height=b.bottom-b.top+"px";b=new Blockly.utils.Coordinate(this.sourceBlock_.RTL?b.right-a.offsetWidth:b.left,b.top);b.y+=1;Blockly.utils.userAgent.GECKO&&Blockly.WidgetDiv.DIV.style.top&&(--b.x,--b.y);Blockly.utils.userAgent.WEBKIT&&(b.y-=3);a.style.left=b.x+"px";a.style.top=b.y+"px"};
      +Blockly.FieldTextInput.numberValidator=function(a){console.warn("Blockly.FieldTextInput.numberValidator is deprecated. Use Blockly.FieldNumber instead.");if(null===a)return null;a=String(a);a=a.replace(/O/ig,"0");a=a.replace(/,/g,"");a=Number(a||0);return isNaN(a)?null:String(a)};Blockly.FieldTextInput.nonnegativeIntegerValidator=function(a){(a=Blockly.FieldTextInput.numberValidator(a))&&(a=String(Math.max(0,Math.floor(a))));return a};Blockly.FieldTextInput.prototype.isTabNavigable=function(){return!0};
      +Blockly.FieldTextInput.prototype.getText_=function(){return this.isBeingEdited_&&this.htmlInput_?this.htmlInput_.value:null};Blockly.FieldTextInput.prototype.getEditorText_=function(a){return String(a)};Blockly.FieldTextInput.prototype.getValueFromEditorText_=function(a){return a};Blockly.fieldRegistry.register("field_input",Blockly.FieldTextInput);Blockly.FieldAngle=function(a,b,c){this.clockwise_=Blockly.FieldAngle.CLOCKWISE;this.offset_=Blockly.FieldAngle.OFFSET;this.wrap_=Blockly.FieldAngle.WRAP;this.round_=Blockly.FieldAngle.ROUND;Blockly.FieldAngle.superClass_.constructor.call(this,a||0,b,c)};Blockly.utils.object.inherits(Blockly.FieldAngle,Blockly.FieldTextInput);Blockly.FieldAngle.fromJson=function(a){return new Blockly.FieldAngle(a.angle,void 0,a)};Blockly.FieldAngle.prototype.SERIALIZABLE=!0;Blockly.FieldAngle.ROUND=15;
      +Blockly.FieldAngle.HALF=50;Blockly.FieldAngle.CLOCKWISE=!1;Blockly.FieldAngle.OFFSET=0;Blockly.FieldAngle.WRAP=360;Blockly.FieldAngle.RADIUS=Blockly.FieldAngle.HALF-1;
      +Blockly.FieldAngle.prototype.configure_=function(a){Blockly.FieldAngle.superClass_.configure_.call(this,a);switch(a.mode){case "compass":this.clockwise_=!0;this.offset_=90;break;case "protractor":this.clockwise_=!1,this.offset_=0}var b=a.clockwise;"boolean"==typeof b&&(this.clockwise_=b);b=a.offset;null!=b&&(b=Number(b),isNaN(b)||(this.offset_=b));b=a.wrap;null!=b&&(b=Number(b),isNaN(b)||(this.wrap_=b));a=a.round;null!=a&&(a=Number(a),isNaN(a)||(this.round_=a))};
      +Blockly.FieldAngle.prototype.initView=function(){Blockly.FieldAngle.superClass_.initView.call(this);this.symbol_=Blockly.utils.dom.createSvgElement("tspan",{},null);this.symbol_.appendChild(document.createTextNode("\u00b0"));this.textElement_.appendChild(this.symbol_)};Blockly.FieldAngle.prototype.render_=function(){Blockly.FieldAngle.superClass_.render_.call(this);this.updateGraph_()};
      +Blockly.FieldAngle.prototype.showEditor_=function(){Blockly.FieldAngle.superClass_.showEditor_.call(this,Blockly.utils.userAgent.MOBILE||Blockly.utils.userAgent.ANDROID||Blockly.utils.userAgent.IPAD);var a=this.dropdownCreate_();Blockly.DropDownDiv.getContentDiv().appendChild(a);a=this.sourceBlock_.getColourBorder();a=a.colourBorder||a.colourLight;Blockly.DropDownDiv.setColour(this.sourceBlock_.getColour(),a);Blockly.DropDownDiv.showPositionedByField(this,this.dropdownDispose_.bind(this));this.updateGraph_()};
      +Blockly.FieldAngle.prototype.dropdownCreate_=function(){var a=Blockly.utils.dom.createSvgElement("svg",{xmlns:Blockly.utils.dom.SVG_NS,"xmlns:html":Blockly.utils.dom.HTML_NS,"xmlns:xlink":Blockly.utils.dom.XLINK_NS,version:"1.1",height:2*Blockly.FieldAngle.HALF+"px",width:2*Blockly.FieldAngle.HALF+"px",style:"touch-action: none"},null),b=Blockly.utils.dom.createSvgElement("circle",{cx:Blockly.FieldAngle.HALF,cy:Blockly.FieldAngle.HALF,r:Blockly.FieldAngle.RADIUS,"class":"blocklyAngleCircle"},a);this.gauge_=
      +Blockly.utils.dom.createSvgElement("path",{"class":"blocklyAngleGauge"},a);this.line_=Blockly.utils.dom.createSvgElement("line",{x1:Blockly.FieldAngle.HALF,y1:Blockly.FieldAngle.HALF,"class":"blocklyAngleLine"},a);for(var c=0;360>c;c+=15)Blockly.utils.dom.createSvgElement("line",{x1:Blockly.FieldAngle.HALF+Blockly.FieldAngle.RADIUS,y1:Blockly.FieldAngle.HALF,x2:Blockly.FieldAngle.HALF+Blockly.FieldAngle.RADIUS-(0==c%45?10:5),y2:Blockly.FieldAngle.HALF,"class":"blocklyAngleMarks",transform:"rotate("+
      +c+","+Blockly.FieldAngle.HALF+","+Blockly.FieldAngle.HALF+")"},a);this.clickWrapper_=Blockly.bindEventWithChecks_(a,"click",this,this.hide_);this.clickSurfaceWrapper_=Blockly.bindEventWithChecks_(b,"click",this,this.onMouseMove,!0,!0);this.moveSurfaceWrapper_=Blockly.bindEventWithChecks_(b,"mousemove",this,this.onMouseMove,!0,!0);return a};Blockly.FieldAngle.prototype.dropdownDispose_=function(){Blockly.unbindEvent_(this.clickWrapper_);Blockly.unbindEvent_(this.clickSurfaceWrapper_);Blockly.unbindEvent_(this.moveSurfaceWrapper_)};
      +Blockly.FieldAngle.prototype.hide_=function(){Blockly.DropDownDiv.hideIfOwner(this);Blockly.WidgetDiv.hide()};Blockly.FieldAngle.prototype.onMouseMove=function(a){var b=this.gauge_.ownerSVGElement.getBoundingClientRect(),c=a.clientX-b.left-Blockly.FieldAngle.HALF;a=a.clientY-b.top-Blockly.FieldAngle.HALF;b=Math.atan(-a/c);isNaN(b)||(b=Blockly.utils.math.toDegrees(b),0>c?b+=180:0a&&(a+=360);a>this.wrap_&&(a-=360);return a};Blockly.Css.register(".blocklyAngleCircle {,stroke: #444;,stroke-width: 1;,fill: #ddd;,fill-opacity: .8;,},.blocklyAngleMarks {,stroke: #444;,stroke-width: 1;,},.blocklyAngleGauge {,fill: #f88;,fill-opacity: .8;,pointer-events: none;,},.blocklyAngleLine {,stroke: #f00;,stroke-width: 2;,stroke-linecap: round;,pointer-events: none;,}".split(","));
      +Blockly.fieldRegistry.register("field_angle",Blockly.FieldAngle);Blockly.FieldCheckbox=function(a,b,c){this.checkChar_=null;null==a&&(a="FALSE");Blockly.FieldCheckbox.superClass_.constructor.call(this,a,b,c);this.size_.width=Blockly.FieldCheckbox.WIDTH};Blockly.utils.object.inherits(Blockly.FieldCheckbox,Blockly.Field);Blockly.FieldCheckbox.fromJson=function(a){return new Blockly.FieldCheckbox(a.checked,void 0,a)};Blockly.FieldCheckbox.WIDTH=15;Blockly.FieldCheckbox.CHECK_CHAR="\u2713";Blockly.FieldCheckbox.CHECK_X_OFFSET=Blockly.Field.DEFAULT_TEXT_OFFSET-3;
      +Blockly.FieldCheckbox.CHECK_Y_OFFSET=14;Blockly.FieldCheckbox.prototype.SERIALIZABLE=!0;Blockly.FieldCheckbox.prototype.CURSOR="default";Blockly.FieldCheckbox.prototype.isDirty_=!1;Blockly.FieldCheckbox.prototype.configure_=function(a){Blockly.FieldCheckbox.superClass_.configure_.call(this,a);a.checkCharacter&&(this.checkChar_=a.checkCharacter)};
      +Blockly.FieldCheckbox.prototype.initView=function(){Blockly.FieldCheckbox.superClass_.initView.call(this);this.textElement_.setAttribute("x",Blockly.FieldCheckbox.CHECK_X_OFFSET);this.textElement_.setAttribute("y",Blockly.FieldCheckbox.CHECK_Y_OFFSET);Blockly.utils.dom.addClass(this.textElement_,"blocklyCheckbox");this.textContent_.nodeValue=this.checkChar_||Blockly.FieldCheckbox.CHECK_CHAR;this.textElement_.style.display=this.value_?"block":"none"};
      +Blockly.FieldCheckbox.prototype.setCheckCharacter=function(a){this.checkChar_=a;this.textContent_&&(this.textContent_.nodeValue=a||Blockly.FieldCheckbox.CHECK_CHAR)};Blockly.FieldCheckbox.prototype.showEditor_=function(){this.setValue(!this.value_)};Blockly.FieldCheckbox.prototype.doClassValidation_=function(a){return!0===a||"TRUE"===a?"TRUE":!1===a||"FALSE"===a?"FALSE":null};
      +Blockly.FieldCheckbox.prototype.doValueUpdate_=function(a){this.value_=this.convertValueToBool_(a);this.textElement_&&(this.textElement_.style.display=this.value_?"block":"none")};Blockly.FieldCheckbox.prototype.getValue=function(){return this.value_?"TRUE":"FALSE"};Blockly.FieldCheckbox.prototype.getValueBoolean=function(){return this.value_};Blockly.FieldCheckbox.prototype.getText=function(){return String(this.convertValueToBool_(this.value_))};
      +Blockly.FieldCheckbox.prototype.convertValueToBool_=function(a){return"string"==typeof a?"TRUE"==a:!!a};Blockly.fieldRegistry.register("field_checkbox",Blockly.FieldCheckbox);Blockly.FieldColour=function(a,b,c){Blockly.FieldColour.superClass_.constructor.call(this,a||Blockly.FieldColour.COLOURS[0],b,c);this.size_=new Blockly.utils.Size(Blockly.FieldColour.DEFAULT_WIDTH,Blockly.FieldColour.DEFAULT_HEIGHT)};Blockly.utils.object.inherits(Blockly.FieldColour,Blockly.Field);Blockly.FieldColour.fromJson=function(a){return new Blockly.FieldColour(a.colour,void 0,a)};Blockly.FieldColour.DEFAULT_WIDTH=26;Blockly.FieldColour.DEFAULT_HEIGHT=Blockly.Field.BORDER_RECT_DEFAULT_HEIGHT;
      +Blockly.FieldColour.prototype.SERIALIZABLE=!0;Blockly.FieldColour.prototype.CURSOR="default";Blockly.FieldColour.prototype.isDirty_=!1;Blockly.FieldColour.prototype.colours_=null;Blockly.FieldColour.prototype.titles_=null;Blockly.FieldColour.prototype.columns_=0;Blockly.FieldColour.prototype.configure_=function(a){Blockly.FieldColour.superClass_.configure_.call(this,a);a.colourOptions&&(this.colours_=a.colourOptions,this.titles_=a.colourTitles);a.columns&&(this.columns_=a.columns)};
      +Blockly.FieldColour.prototype.initView=function(){this.createBorderRect_();this.borderRect_.style.fillOpacity=1;this.borderRect_.style.fill=this.value_};Blockly.FieldColour.prototype.doClassValidation_=function(a){return"string"!=typeof a?null:Blockly.utils.colour.parse(a)};Blockly.FieldColour.prototype.doValueUpdate_=function(a){this.value_=a;this.borderRect_&&(this.borderRect_.style.fill=a)};
      +Blockly.FieldColour.prototype.getText=function(){var a=this.value_;/^#(.)\1(.)\2(.)\3$/.test(a)&&(a="#"+a[1]+a[3]+a[5]);return a};Blockly.FieldColour.COLOURS="#ffffff #cccccc #c0c0c0 #999999 #666666 #333333 #000000 #ffcccc #ff6666 #ff0000 #cc0000 #990000 #660000 #330000 #ffcc99 #ff9966 #ff9900 #ff6600 #cc6600 #993300 #663300 #ffff99 #ffff66 #ffcc66 #ffcc33 #cc9933 #996633 #663333 #ffffcc #ffff33 #ffff00 #ffcc00 #999900 #666600 #333300 #99ff99 #66ff99 #33ff33 #33cc00 #009900 #006600 #003300 #99ffff #33ffff #66cccc #00cccc #339999 #336666 #003333 #ccffff #66ffff #33ccff #3366ff #3333ff #000099 #000066 #ccccff #9999ff #6666cc #6633ff #6600cc #333399 #330099 #ffccff #ff99ff #cc66cc #cc33cc #993399 #663366 #330033".split(" ");
      +Blockly.FieldColour.TITLES=[];Blockly.FieldColour.COLUMNS=7;Blockly.FieldColour.prototype.setColours=function(a,b){this.colours_=a;b&&(this.titles_=b);return this};Blockly.FieldColour.prototype.setColumns=function(a){this.columns_=a;return this};Blockly.FieldColour.prototype.showEditor_=function(){this.picker_=this.dropdownCreate_();Blockly.DropDownDiv.getContentDiv().appendChild(this.picker_);Blockly.DropDownDiv.showPositionedByField(this,this.dropdownDispose_.bind(this));this.picker_.focus()};
      +Blockly.FieldColour.prototype.onClick_=function(a){a=(a=a.target)&&a.label;null!==a&&(this.setValue(a),Blockly.DropDownDiv.hideIfOwner(this))};
      +Blockly.FieldColour.prototype.onKeyDown_=function(a){var b=!1;if(a.keyCode===Blockly.utils.KeyCodes.UP)this.moveHighlightBy_(0,-1),b=!0;else if(a.keyCode===Blockly.utils.KeyCodes.DOWN)this.moveHighlightBy_(0,1),b=!0;else if(a.keyCode===Blockly.utils.KeyCodes.LEFT)this.moveHighlightBy_(-1,0),b=!0;else if(a.keyCode===Blockly.utils.KeyCodes.RIGHT)this.moveHighlightBy_(1,0),b=!0;else if(a.keyCode===Blockly.utils.KeyCodes.ENTER){if(b=this.getHighlighted_())b=b&&b.label,null!==b&&this.setValue(b);Blockly.DropDownDiv.hideWithoutAnimation();
      +b=!0}b&&a.stopPropagation()};Blockly.FieldColour.prototype.onBlocklyAction=function(a){if(this.picker_){if(a===Blockly.navigation.ACTION_PREVIOUS)return this.moveHighlightBy_(0,-1),!0;if(a===Blockly.navigation.ACTION_NEXT)return this.moveHighlightBy_(0,1),!0;if(a===Blockly.navigation.ACTION_OUT)return this.moveHighlightBy_(-1,0),!0;if(a===Blockly.navigation.ACTION_IN)return this.moveHighlightBy_(1,0),!0}return Blockly.FieldColour.superClass_.onBlocklyAction.call(this,a)};
      +Blockly.FieldColour.prototype.moveHighlightBy_=function(a,b){var c=this.colours_||Blockly.FieldColour.COLOURS,d=this.columns_||Blockly.FieldColour.COLUMNS,e=this.highlightedIndex_%d,f=Math.floor(this.highlightedIndex_/d);e+=a;f+=b;0>a?0>e&&0e&&(e=0):0d-1&&fd-1&&e--:0>b?0>f&&(f=0):0Math.floor(c.length/d)-1&&(f=Math.floor(c.length/d)-1);this.setHighlightedCell_(this.picker_.childNodes[f].childNodes[e],f*d+e)};
      +Blockly.FieldColour.prototype.onMouseMove_=function(a){var b=(a=a.target)&&a.getAttribute("data-index");null!==b&&b!==this.highlightedIndex_&&this.setHighlightedCell_(a,Number(b))};Blockly.FieldColour.prototype.onMouseEnter_=function(){this.picker_.focus()};Blockly.FieldColour.prototype.onMouseLeave_=function(){this.picker_.blur();var a=this.getHighlighted_();a&&Blockly.utils.dom.removeClass(a,"blocklyColourHighlighted")};
      +Blockly.FieldColour.prototype.getHighlighted_=function(){var a=this.columns_||Blockly.FieldColour.COLUMNS,b=this.picker_.childNodes[Math.floor(this.highlightedIndex_/a)];return b?b.childNodes[this.highlightedIndex_%a]:null};
      +Blockly.FieldColour.prototype.setHighlightedCell_=function(a,b){var c=this.getHighlighted_();c&&Blockly.utils.dom.removeClass(c,"blocklyColourHighlighted");Blockly.utils.dom.addClass(a,"blocklyColourHighlighted");this.highlightedIndex_=b;Blockly.utils.aria.setState(this.picker_,Blockly.utils.aria.State.ACTIVEDESCENDANT,a.getAttribute("id"))};
      +Blockly.FieldColour.prototype.dropdownCreate_=function(){var a=this.columns_||Blockly.FieldColour.COLUMNS,b=this.colours_||Blockly.FieldColour.COLOURS,c=this.titles_||Blockly.FieldColour.TITLES,d=this.getValue(),e=document.createElement("table");e.className="blocklyColourTable";e.tabIndex=0;e.dir="ltr";Blockly.utils.aria.setRole(e,Blockly.utils.aria.Role.GRID);Blockly.utils.aria.setState(e,Blockly.utils.aria.State.EXPANDED,!0);Blockly.utils.aria.setState(e,"rowcount",Math.floor(b.length/a));Blockly.utils.aria.setState(e,
      +"colcount",a);for(var f,g=0;gtr>td {","border: .5px solid #888;","box-sizing: border-box;","cursor: pointer;","display: inline-block;","height: 20px;","padding: 0;","width: 20px;","}",".blocklyColourTable>tr>td.blocklyColourHighlighted {","border-color: #eee;","box-shadow: 2px 2px 7px 2px rgba(0,0,0,.3);","position: relative;","}",".blocklyColourSelected, .blocklyColourSelected:hover {",
      +"border-color: #eee !important;","outline: 1px solid #333;","position: relative;","}"]);Blockly.fieldRegistry.register("field_colour",Blockly.FieldColour);Blockly.FieldDropdown=function(a,b,c){"function"!=typeof a&&Blockly.FieldDropdown.validateOptions_(a);this.menuGenerator_=a;this.generatedOptions_=null;this.selectedIndex_=0;this.trimOptions_();a=this.getOptions(!1)[0];Blockly.FieldDropdown.superClass_.constructor.call(this,a[1],b,c);this.selectedMenuItem_=this.imageElement_=null};Blockly.utils.object.inherits(Blockly.FieldDropdown,Blockly.Field);Blockly.FieldDropdown.fromJson=function(a){return new Blockly.FieldDropdown(a.options,void 0,a)};
      +Blockly.FieldDropdown.prototype.SERIALIZABLE=!0;Blockly.FieldDropdown.CHECKMARK_OVERHANG=25;Blockly.FieldDropdown.MAX_MENU_HEIGHT_VH=.45;Blockly.FieldDropdown.IMAGE_Y_OFFSET=5;Blockly.FieldDropdown.IMAGE_Y_PADDING=2*Blockly.FieldDropdown.IMAGE_Y_OFFSET;Blockly.FieldDropdown.ARROW_CHAR=Blockly.utils.userAgent.ANDROID?"\u25bc":"\u25be";Blockly.FieldDropdown.prototype.CURSOR="default";
      +Blockly.FieldDropdown.prototype.initView=function(){Blockly.FieldDropdown.superClass_.initView.call(this);this.imageElement_=Blockly.utils.dom.createSvgElement("image",{y:Blockly.FieldDropdown.IMAGE_Y_OFFSET},this.fieldGroup_);this.arrow_=Blockly.utils.dom.createSvgElement("tspan",{},this.textElement_);this.arrow_.appendChild(document.createTextNode(this.sourceBlock_.RTL?Blockly.FieldDropdown.ARROW_CHAR+" ":" "+Blockly.FieldDropdown.ARROW_CHAR));this.sourceBlock_.RTL?this.textElement_.insertBefore(this.arrow_,
      +this.textContent_):this.textElement_.appendChild(this.arrow_)};Blockly.FieldDropdown.prototype.showEditor_=function(){this.menu_=this.dropdownCreate_();this.menu_.render(Blockly.DropDownDiv.getContentDiv());Blockly.utils.dom.addClass(this.menu_.getElement(),"blocklyDropdownMenu");Blockly.DropDownDiv.showPositionedByField(this,this.dropdownDispose_.bind(this));this.menu_.focus();this.selectedMenuItem_&&Blockly.utils.style.scrollIntoContainerView(this.selectedMenuItem_.getElement(),this.menu_.getElement())};
      +Blockly.FieldDropdown.prototype.dropdownCreate_=function(){var a=new Blockly.Menu;a.setRightToLeft(this.sourceBlock_.RTL);a.setRole("listbox");var b=this.getOptions(!1);this.selectedMenuItem_=null;for(var c=0;ca.length)){b=[];for(c=0;cthis.selectedIndex_)return null;var a=this.getOptions(!0)[this.selectedIndex_][0];return"object"==typeof a?a.alt:a};
      +Blockly.FieldDropdown.validateOptions_=function(a){if(!Array.isArray(a))throw TypeError("FieldDropdown options must be an array.");if(!a.length)throw TypeError("FieldDropdown options must not be an empty array.");for(var b=!1,c=0;c=c||0>=b)throw Error("Height and width values of an image field must be greater than 0.");this.flipRtl_=!1;this.altText_="";Blockly.FieldImage.superClass_.constructor.call(this,
      +a||"",null,g);g||(this.flipRtl_=!!f,this.altText_=Blockly.utils.replaceMessageReferences(d)||"");this.size_=new Blockly.utils.Size(b,c+Blockly.FieldImage.Y_PADDING);this.imageHeight_=c;this.clickHandler_=null;"function"==typeof e&&(this.clickHandler_=e)};Blockly.utils.object.inherits(Blockly.FieldImage,Blockly.Field);Blockly.FieldImage.fromJson=function(a){return new Blockly.FieldImage(a.src,a.width,a.height,void 0,void 0,void 0,a)};Blockly.FieldImage.Y_PADDING=1;
      +Blockly.FieldImage.prototype.EDITABLE=!1;Blockly.FieldImage.prototype.isDirty_=!1;Blockly.FieldImage.prototype.configure_=function(a){Blockly.FieldImage.superClass_.configure_.call(this,a);this.flipRtl_=!!a.flipRtl;this.altText_=Blockly.utils.replaceMessageReferences(a.alt)||""};
      +Blockly.FieldImage.prototype.initView=function(){this.imageElement_=Blockly.utils.dom.createSvgElement("image",{height:this.imageHeight_+"px",width:this.size_.width+"px",alt:this.altText_},this.fieldGroup_);this.imageElement_.setAttributeNS(Blockly.utils.dom.XLINK_NS,"xlink:href",this.value_)};Blockly.FieldImage.prototype.doClassValidation_=function(a){return"string"!=typeof a?null:a};
      +Blockly.FieldImage.prototype.doValueUpdate_=function(a){this.value_=a;this.imageElement_&&this.imageElement_.setAttributeNS(Blockly.utils.dom.XLINK_NS,"xlink:href",this.value_||"")};Blockly.FieldImage.prototype.getFlipRtl=function(){return this.flipRtl_};Blockly.FieldImage.prototype.setAlt=function(a){a!=this.altText_&&(this.altText_=a||"",this.imageElement_&&this.imageElement_.setAttribute("alt",this.altText_))};Blockly.FieldImage.prototype.showEditor_=function(){this.clickHandler_&&this.clickHandler_(this)};
      +Blockly.FieldImage.prototype.setOnClickHandler=function(a){this.clickHandler_=a};Blockly.FieldImage.prototype.getText_=function(){return this.altText_};Blockly.fieldRegistry.register("field_image",Blockly.FieldImage);Blockly.FieldLabelSerializable=function(a,b,c){Blockly.FieldLabelSerializable.superClass_.constructor.call(this,a,b,c)};Blockly.utils.object.inherits(Blockly.FieldLabelSerializable,Blockly.FieldLabel);Blockly.FieldLabelSerializable.fromJson=function(a){var b=Blockly.utils.replaceMessageReferences(a.text);return new Blockly.FieldLabelSerializable(b,void 0,a)};Blockly.FieldLabelSerializable.prototype.EDITABLE=!1;Blockly.FieldLabelSerializable.prototype.SERIALIZABLE=!0;
      +Blockly.fieldRegistry.register("field_label_serializable",Blockly.FieldLabelSerializable);Blockly.FieldMultilineInput=function(a,b,c){null==a&&(a="");Blockly.FieldMultilineInput.superClass_.constructor.call(this,a,b,c)};Blockly.utils.object.inherits(Blockly.FieldMultilineInput,Blockly.FieldTextInput);Blockly.FieldMultilineInput.LINE_HEIGHT=20;Blockly.FieldMultilineInput.fromJson=function(a){var b=Blockly.utils.replaceMessageReferences(a.text);return new Blockly.FieldMultilineInput(b,void 0,a)};
      +Blockly.FieldMultilineInput.prototype.initView=function(){this.createBorderRect_();this.textGroup_=Blockly.utils.dom.createSvgElement("g",{"class":"blocklyEditableText"},this.fieldGroup_)};
      +Blockly.FieldMultilineInput.prototype.getDisplayText_=function(){var a=this.value_;if(!a)return Blockly.Field.NBSP;var b=a.split("\n");a="";for(var c=0;cthis.maxDisplayLength&&(d=d.substring(0,this.maxDisplayLength-4)+"...");d=d.replace(/\s/g,Blockly.Field.NBSP);a+=d;c!==b.length-1&&(a+="\n")}this.sourceBlock_.RTL&&(a+="\u200f");return a};
      +Blockly.FieldMultilineInput.prototype.render_=function(){for(var a;a=this.textGroup_.firstChild;)this.textGroup_.removeChild(a);a=this.getDisplayText_().split("\n");for(var b=Blockly.Field.Y_PADDING/2,c=0,d=0;db&&(b=e);c+=Blockly.FieldMultilineInput.LINE_HEIGHT}this.borderRect_&&(b+=Blockly.Field.X_PADDING,this.borderRect_.setAttribute("width",b),this.borderRect_.setAttribute("height",c));this.size_.width=b;this.size_.height=c};
      +Blockly.FieldMultilineInput.prototype.resizeEditor_=function(){var a=Blockly.WidgetDiv.DIV,b=this.getScaledBBox_();a.style.width=b.right-b.left+"px";a.style.height=b.bottom-b.top+"px";b=new Blockly.utils.Coordinate(this.sourceBlock_.RTL?b.right-a.offsetWidth:b.left,b.top);a.style.left=b.x+"px";a.style.top=b.y+"px"};
      +Blockly.FieldMultilineInput.prototype.widgetCreate_=function(){var a=Blockly.WidgetDiv.DIV,b=this.workspace_.scale,c=document.createElement("textarea");c.className="blocklyHtmlInput blocklyHtmlTextAreaInput";c.setAttribute("spellcheck",this.spellcheck_);var d=Blockly.FieldTextInput.FONTSIZE*b+"pt";a.style.fontSize=d;c.style.fontSize=d;c.style.borderRadius=Blockly.FieldTextInput.BORDERRADIUS*b+"px";d=Blockly.Field.DEFAULT_TEXT_OFFSET*b;c.style.paddingLeft=d+"px";c.style.width="calc(100% - "+d+"px)";
      +c.style.lineHeight=Blockly.FieldMultilineInput.LINE_HEIGHT*b+"px";a.appendChild(c);c.value=c.defaultValue=this.getEditorText_(this.value_);c.untypedDefaultValue_=this.value_;c.oldValue_=null;Blockly.utils.userAgent.GECKO?setTimeout(this.resizeEditor_.bind(this),0):this.resizeEditor_();this.bindInputEvents_(c);return c};
      +Blockly.FieldMultilineInput.prototype.onHtmlInputKeyDown_=function(a){a.keyCode!==Blockly.utils.KeyCodes.ENTER&&Blockly.FieldMultilineInput.superClass_.onHtmlInputKeyDown_.call(this,a)};Blockly.Css.register(".blocklyHtmlTextAreaInput {,font-family: monospace;,resize: none;,overflow: hidden;,height: 100%;,text-align: left;,}".split(","));Blockly.fieldRegistry.register("field_multilinetext",Blockly.FieldMultilineInput);Blockly.FieldNumber=function(a,b,c,d,e,f){this.min_=-Infinity;this.max_=Infinity;this.precision_=0;this.decimalPlaces_=null;Blockly.FieldNumber.superClass_.constructor.call(this,a||0,e,f);f||this.setConstraints(b,c,d)};Blockly.utils.object.inherits(Blockly.FieldNumber,Blockly.FieldTextInput);Blockly.FieldNumber.fromJson=function(a){return new Blockly.FieldNumber(a.value,void 0,void 0,void 0,void 0,a)};Blockly.FieldNumber.prototype.SERIALIZABLE=!0;
      +Blockly.FieldNumber.prototype.configure_=function(a){Blockly.FieldNumber.superClass_.configure_.call(this,a);this.setMinInternal_(a.min);this.setMaxInternal_(a.max);this.setPrecisionInternal_(a.precision)};Blockly.FieldNumber.prototype.setConstraints=function(a,b,c){this.setMinInternal_(a);this.setMaxInternal_(b);this.setPrecisionInternal_(c);this.setValue(this.getValue())};Blockly.FieldNumber.prototype.setMin=function(a){this.setMinInternal_(a);this.setValue(this.getValue())};
      +Blockly.FieldNumber.prototype.setMinInternal_=function(a){null==a?this.min_=-Infinity:(a=Number(a),isNaN(a)||(this.min_=a))};Blockly.FieldNumber.prototype.getMin=function(){return this.min_};Blockly.FieldNumber.prototype.setMax=function(a){this.setMaxInternal_(a);this.setValue(this.getValue())};Blockly.FieldNumber.prototype.setMaxInternal_=function(a){null==a?this.max_=Infinity:(a=Number(a),isNaN(a)||(this.max_=a))};Blockly.FieldNumber.prototype.getMax=function(){return this.max_};
      +Blockly.FieldNumber.prototype.setPrecision=function(a){this.setPrecisionInternal_(a);this.setValue(this.getValue())};Blockly.FieldNumber.prototype.setPrecisionInternal_=function(a){null==a?this.precision_=0:(a=Number(a),isNaN(a)||(this.precision_=a));var b=this.precision_.toString(),c=b.indexOf(".");this.decimalPlaces_=-1==c?a?0:null:b.length-c-1};Blockly.FieldNumber.prototype.getPrecision=function(){return this.precision_};
      +Blockly.FieldNumber.prototype.doClassValidation_=function(a){if(null===a)return null;a=String(a);a=a.replace(/O/ig,"0");a=a.replace(/,/g,"");a=Number(a||0);if(isNaN(a))return null;a=Math.min(Math.max(a,this.min_),this.max_);this.precision_&&isFinite(a)&&(a=Math.round(a/this.precision_)*this.precision_);null!=this.decimalPlaces_&&(a=Number(a.toFixed(this.decimalPlaces_)));return a};
      +Blockly.FieldNumber.prototype.widgetCreate_=function(){var a=Blockly.FieldNumber.superClass_.widgetCreate_.call(this);-Infinitythis.max_&&Blockly.utils.aria.setState(a,Blockly.utils.aria.State.VALUEMAX,this.max_);return a};Blockly.fieldRegistry.register("field_number",Blockly.FieldNumber);Blockly.FieldVariable=function(a,b,c,d,e){this.menuGenerator_=Blockly.FieldVariable.dropdownCreate;this.defaultVariableName=a||"";this.size_=new Blockly.utils.Size(0,Blockly.BlockSvg.MIN_BLOCK_Y);e&&this.configure_(e);b&&this.setValidator(b);e||this.setTypes_(c,d)};Blockly.utils.object.inherits(Blockly.FieldVariable,Blockly.FieldDropdown);Blockly.FieldVariable.fromJson=function(a){var b=Blockly.utils.replaceMessageReferences(a.variable);return new Blockly.FieldVariable(b,void 0,void 0,void 0,a)};
      +Blockly.FieldVariable.prototype.workspace_=null;Blockly.FieldVariable.prototype.SERIALIZABLE=!0;Blockly.FieldVariable.prototype.configure_=function(a){Blockly.FieldVariable.superClass_.configure_.call(this,a);this.setTypes_(a.variableTypes,a.defaultType)};
      +Blockly.FieldVariable.prototype.initModel=function(){if(!this.variable_){var a=Blockly.Variables.getOrCreateVariablePackage(this.sourceBlock_.workspace,null,this.defaultVariableName,this.defaultType_);Blockly.Events.disable();this.setValue(a.getId());Blockly.Events.enable()}};
      +Blockly.FieldVariable.prototype.fromXml=function(a){var b=a.getAttribute("id"),c=a.textContent,d=a.getAttribute("variabletype")||a.getAttribute("variableType")||"";b=Blockly.Variables.getOrCreateVariablePackage(this.sourceBlock_.workspace,b,c,d);if(null!=d&&d!==b.type)throw Error("Serialized variable type with id '"+b.getId()+"' had type "+b.type+", and does not match variable field that references it: "+Blockly.Xml.domToText(a)+".");this.setValue(b.getId())};
      +Blockly.FieldVariable.prototype.toXml=function(a){this.initModel();a.id=this.variable_.getId();a.textContent=this.variable_.name;this.variable_.type&&a.setAttribute("variabletype",this.variable_.type);return a};Blockly.FieldVariable.prototype.setSourceBlock=function(a){if(a.isShadow())throw Error("Variable fields are not allowed to exist on shadow blocks.");Blockly.FieldVariable.superClass_.setSourceBlock.call(this,a)};
      +Blockly.FieldVariable.prototype.getValue=function(){return this.variable_?this.variable_.getId():null};Blockly.FieldVariable.prototype.getText=function(){return this.variable_?this.variable_.name:""};Blockly.FieldVariable.prototype.getVariable=function(){return this.variable_};Blockly.FieldVariable.prototype.getValidator=function(){return this.variable_?this.validator_:null};
      +Blockly.FieldVariable.prototype.doClassValidation_=function(a){if(null===a)return null;var b=Blockly.Variables.getVariable(this.sourceBlock_.workspace,a);if(!b)return console.warn("Variable id doesn't point to a real variable! ID was "+a),null;b=b.type;return this.typeIsAllowed_(b)?a:(console.warn("Variable type doesn't match this field!  Type was "+b),null)};
      +Blockly.FieldVariable.prototype.doValueUpdate_=function(a){this.variable_=Blockly.Variables.getVariable(this.sourceBlock_.workspace,a);Blockly.FieldVariable.superClass_.doValueUpdate_.call(this,a)};Blockly.FieldVariable.prototype.typeIsAllowed_=function(a){var b=this.getVariableTypes_();if(!b)return!0;for(var c=0;c90-b||a>-90-b&&a<-90+b?!0:!1};
      +Blockly.HorizontalFlyout.prototype.getClientRect=function(){if(!this.svgGroup_)return null;var a=this.svgGroup_.getBoundingClientRect(),b=a.top;return this.toolboxPosition_==Blockly.TOOLBOX_AT_TOP?new Blockly.utils.Rect(-1E9,b+a.height,-1E9,1E9):new Blockly.utils.Rect(b,-1E9,-1E9,1E9)};
      +Blockly.HorizontalFlyout.prototype.reflowInternal_=function(){this.workspace_.scale=this.targetWorkspace_.scale;for(var a=0,b=this.workspace_.getTopBlocks(!1),c=0,d;d=b[c];c++)a=Math.max(a,d.getHeightWidth().height);a+=1.5*this.MARGIN;a*=this.workspace_.scale;a+=Blockly.Scrollbar.scrollbarThickness;if(this.height_!=a){for(c=0;d=b[c];c++)d.flyoutRect_&&this.moveRectToBlock_(d.flyoutRect_,d);this.height_=a;this.position()}};Blockly.VerticalFlyout=function(a){a.getMetrics=this.getMetrics_.bind(this);a.setMetrics=this.setMetrics_.bind(this);Blockly.VerticalFlyout.superClass_.constructor.call(this,a);this.horizontalLayout_=!1};Blockly.utils.object.inherits(Blockly.VerticalFlyout,Blockly.Flyout);
      +Blockly.VerticalFlyout.prototype.getMetrics_=function(){if(!this.isVisible())return null;try{var a=this.workspace_.getCanvas().getBBox()}catch(e){a={height:0,y:0,width:0,x:0}}var b=this.SCROLLBAR_PADDING,c=this.height_-2*this.SCROLLBAR_PADDING,d=this.width_;this.RTL||(d-=this.SCROLLBAR_PADDING);return{viewHeight:c,viewWidth:d,contentHeight:a.height*this.workspace_.scale+2*this.MARGIN,contentWidth:a.width*this.workspace_.scale+2*this.MARGIN,viewTop:-this.workspace_.scrollY+a.y,viewLeft:-this.workspace_.scrollX,
      +contentTop:a.y,contentLeft:a.x,absoluteTop:b,absoluteLeft:0}};Blockly.VerticalFlyout.prototype.setMetrics_=function(a){var b=this.getMetrics_();b&&("number"==typeof a.y&&(this.workspace_.scrollY=-b.contentHeight*a.y),this.workspace_.translate(this.workspace_.scrollX+b.absoluteLeft,this.workspace_.scrollY+b.absoluteTop))};
      +Blockly.VerticalFlyout.prototype.position=function(){if(this.isVisible()){var a=this.targetWorkspace_.getMetrics();a&&(this.height_=a.viewHeight,this.setBackgroundPath_(this.width_-this.CORNER_RADIUS,a.viewHeight-2*this.CORNER_RADIUS),this.positionAt_(this.width_,this.height_,this.targetWorkspace_.toolboxPosition==this.toolboxPosition_?a.toolboxWidth?this.toolboxPosition_==Blockly.TOOLBOX_AT_LEFT?a.toolboxWidth:a.viewWidth-this.width_:this.toolboxPosition_==Blockly.TOOLBOX_AT_LEFT?0:a.viewWidth:this.toolboxPosition_==
      +Blockly.TOOLBOX_AT_LEFT?0:a.viewWidth+a.absoluteLeft-this.width_,0))}};
      +Blockly.VerticalFlyout.prototype.setBackgroundPath_=function(a,b){var c=this.toolboxPosition_==Blockly.TOOLBOX_AT_RIGHT,d=a+this.CORNER_RADIUS;d=["M "+(c?d:0)+",0"];d.push("h",c?-a:a);d.push("a",this.CORNER_RADIUS,this.CORNER_RADIUS,0,0,c?0:1,c?-this.CORNER_RADIUS:this.CORNER_RADIUS,this.CORNER_RADIUS);d.push("v",Math.max(0,b));d.push("a",this.CORNER_RADIUS,this.CORNER_RADIUS,0,0,c?0:1,c?this.CORNER_RADIUS:-this.CORNER_RADIUS,this.CORNER_RADIUS);d.push("h",c?a:-a);d.push("z");this.svgBackground_.setAttribute("d",
      +d.join(" "))};Blockly.VerticalFlyout.prototype.scrollToStart=function(){this.scrollbar_.set(0)};Blockly.VerticalFlyout.prototype.wheel_=function(a){var b=Blockly.utils.getScrollDeltaPixels(a);if(b.y){var c=this.getMetrics_();b=c.viewTop-c.contentTop+b.y;b=Math.min(b,c.contentHeight-c.viewHeight);b=Math.max(b,0);this.scrollbar_.set(b);Blockly.WidgetDiv.hide()}a.preventDefault();a.stopPropagation()};
      +Blockly.VerticalFlyout.prototype.layout_=function(a,b){this.workspace_.scale=this.targetWorkspace_.scale;for(var c=this.MARGIN,d=this.RTL?c:c+this.tabWidth_,e=0,f;f=a[e];e++)if("block"==f.type){f=f.block;for(var g=f.getDescendants(!1),h=0,k;k=g[h];h++)k.isInFlyout=!0;f.render();g=f.getSvgRoot();h=f.getHeightWidth();k=f.outputConnection?d-this.tabWidth_:d;f.moveBy(k,c);k=this.createRect_(f,this.RTL?k-h.width:k,c,h,e);this.addBlockListeners_(g,f,k);c+=h.height+b[e]}else"button"==f.type&&(this.initFlyoutButton_(f.button,
      +d,c),c+=f.button.height+b[e])};Blockly.VerticalFlyout.prototype.isDragTowardWorkspace=function(a){a=Math.atan2(a.y,a.x)/Math.PI*180;var b=this.dragAngleRange_;return a-b||a<-180+b||a>180-b?!0:!1};
      +Blockly.VerticalFlyout.prototype.getClientRect=function(){if(!this.svgGroup_)return null;var a=this.svgGroup_.getBoundingClientRect(),b=a.left;if(this.toolboxPosition_==Blockly.TOOLBOX_AT_LEFT)return new Blockly.utils.Rect(-1E9,1E9,-1E9,b+a.width);Blockly.utils.userAgent.GECKO&&this.targetWorkspace_&&this.targetWorkspace_.isMutator&&(a=this.targetWorkspace_.svgGroup_.getBoundingClientRect().x,10>Math.abs(a-b)&&(b+=this.leftEdge_*this.targetWorkspace_.options.parentWorkspace.scale));return new Blockly.utils.Rect(-1E9,
      +1E9,b,1E9)};
      +Blockly.VerticalFlyout.prototype.reflowInternal_=function(){this.workspace_.scale=this.targetWorkspace_.scale;for(var a=0,b=this.workspace_.getTopBlocks(!1),c=0,d;d=b[c];c++){var e=d.getHeightWidth().width;d.outputConnection&&(e-=this.tabWidth_);a=Math.max(a,e)}for(c=0;d=this.buttons_[c];c++)a=Math.max(a,d.width);a+=1.5*this.MARGIN+this.tabWidth_;a*=this.workspace_.scale;a+=Blockly.Scrollbar.scrollbarThickness;if(this.width_!=a){for(c=0;d=b[c];c++){if(this.RTL){e=d.getRelativeToSurfaceXY().x;var f=
      +a/this.workspace_.scale-this.MARGIN;d.outputConnection||(f-=this.tabWidth_);d.moveBy(f-e,0)}d.flyoutRect_&&this.moveRectToBlock_(d.flyoutRect_,d)}if(this.RTL)for(c=0;d=this.buttons_[c];c++)b=d.getPosition().y,d.moveTo(a/this.workspace_.scale-d.width-this.MARGIN-this.tabWidth_,b);this.width_=a;this.position()}};Blockly.Generator=function(a){this.name_=a;this.FUNCTION_NAME_PLACEHOLDER_REGEXP_=new RegExp(this.FUNCTION_NAME_PLACEHOLDER_,"g")};Blockly.Generator.NAME_TYPE="generated_function";Blockly.Generator.prototype.INFINITE_LOOP_TRAP=null;Blockly.Generator.prototype.STATEMENT_PREFIX=null;Blockly.Generator.prototype.STATEMENT_SUFFIX=null;Blockly.Generator.prototype.INDENT="  ";Blockly.Generator.prototype.COMMENT_WRAP=60;Blockly.Generator.prototype.ORDER_OVERRIDES=[];
      +Blockly.Generator.prototype.workspaceToCode=function(a){a||(console.warn("No workspace specified in workspaceToCode call.  Guessing."),a=Blockly.getMainWorkspace());var b=[];this.init(a);a=a.getTopBlocks(!0);for(var c=0,d;d=a[c];c++){var e=this.blockToCode(d);Array.isArray(e)&&(e=e[0]);e&&(d.outputConnection&&(e=this.scrubNakedValue(e),this.STATEMENT_PREFIX&&!d.suppressPrefixSuffix&&(e=this.injectId(this.STATEMENT_PREFIX,d)+e),this.STATEMENT_SUFFIX&&!d.suppressPrefixSuffix&&(e+=this.injectId(this.STATEMENT_SUFFIX,
      +d))),b.push(e))}b=b.join("\n");b=this.finish(b);b=b.replace(/^\s+\n/,"");b=b.replace(/\n\s+$/,"\n");return b=b.replace(/[ \t]+\n/g,"\n")};Blockly.Generator.prototype.prefixLines=function(a,b){return b+a.replace(/(?!\n$)\n/g,"\n"+b)};Blockly.Generator.prototype.allNestedComments=function(a){var b=[];a=a.getDescendants(!0);for(var c=0;ca||Math.abs(this.workspaceHeight_-b)>a)this.workspaceWidth_=c,this.workspaceHeight_=b,this.bubble_.setBubbleSize(c+a,b+a),this.svgDialog_.setAttribute("width",this.workspaceWidth_),
      +this.svgDialog_.setAttribute("height",this.workspaceHeight_);this.block_.RTL&&(a="translate("+this.workspaceWidth_+",0)",this.workspace_.getCanvas().setAttribute("transform",a));this.workspace_.resize()};
      +Blockly.Mutator.prototype.setVisible=function(a){if(a!=this.isVisible())if(Blockly.Events.fire(new Blockly.Events.Ui(this.block_,"mutatorOpen",!a,a)),a){this.bubble_=new Blockly.Bubble(this.block_.workspace,this.createEditor_(),this.block_.svgPath_,this.iconXY_,null,null);this.bubble_.setSvgId(this.block_.id);if(a=this.workspace_.options.languageTree)this.workspace_.flyout_.init(this.workspace_),this.workspace_.flyout_.show(a.childNodes);this.rootBlock_=this.block_.decompose(this.workspace_);a=this.rootBlock_.getDescendants(!1);
      +for(var b=0,c;c=a[b];b++)c.render();this.rootBlock_.setMovable(!1);this.rootBlock_.setDeletable(!1);this.workspace_.flyout_?(a=2*this.workspace_.flyout_.CORNER_RADIUS,b=this.workspace_.getFlyout().getWidth()+a):b=a=16;this.block_.RTL&&(b=-b);this.rootBlock_.moveBy(b,a);if(this.block_.saveConnections){var d=this;this.block_.saveConnections(this.rootBlock_);this.sourceListener_=function(){d.block_.saveConnections(d.rootBlock_)};this.block_.workspace.addChangeListener(this.sourceListener_)}this.resizeBubble_();
      +this.workspace_.addChangeListener(this.workspaceChanged_.bind(this));this.updateColour()}else this.svgDialog_=null,this.workspace_.dispose(),this.rootBlock_=this.workspace_=null,this.bubble_.dispose(),this.bubble_=null,this.workspaceHeight_=this.workspaceWidth_=0,this.sourceListener_&&(this.block_.workspace.removeChangeListener(this.sourceListener_),this.sourceListener_=null)};
      +Blockly.Mutator.prototype.workspaceChanged_=function(a){if(a.type!=Blockly.Events.UI&&(a.type!=Blockly.Events.CHANGE||"disabled"!=a.element)){if(!this.workspace_.isDragging()){a=this.workspace_.getTopBlocks(!1);for(var b=0,c;c=a[b];b++){var d=c.getRelativeToSurfaceXY(),e=c.getHeightWidth();20>d.y+e.height&&c.moveBy(0,20-e.height-d.y)}}if(this.rootBlock_.workspace==this.workspace_){Blockly.Events.setGroup(!0);c=this.block_;a=(a=c.mutationToDom())&&Blockly.Xml.domToText(a);b=c.rendered;c.rendered=!1;
      +c.compose(this.rootBlock_);c.rendered=b;c.initSvg();b=(b=c.mutationToDom())&&Blockly.Xml.domToText(b);if(a!=b){Blockly.Events.fire(new Blockly.Events.BlockChange(c,"mutation",null,a,b));var f=Blockly.Events.getGroup();setTimeout(function(){Blockly.Events.setGroup(f);c.bumpNeighbours();Blockly.Events.setGroup(!1)},Blockly.BUMP_DELAY)}c.rendered&&c.render();a!=b&&Blockly.keyboardAccessibilityMode&&Blockly.navigation.moveCursorOnBlockMutation(c);this.workspace_.isDragging()||this.resizeBubble_();Blockly.Events.setGroup(!1)}}};
      +Blockly.Mutator.prototype.getFlyoutMetrics_=function(){return{viewHeight:this.workspaceHeight_,viewWidth:this.workspaceWidth_-this.workspace_.getFlyout().getWidth(),absoluteTop:0,absoluteLeft:this.workspace_.RTL?0:this.workspace_.getFlyout().getWidth()}};Blockly.Mutator.prototype.dispose=function(){this.block_.mutator=null;Blockly.Icon.prototype.dispose.call(this)};
      +Blockly.Mutator.prototype.updateBlockStyle=function(){var a=this.workspace_;if(a&&a.getAllBlocks()){for(var b=a.getAllBlocks(),c=0;cthis.highlightOffset_&&(this.steps_+=Blockly.utils.svgPaths.lineOnAxis("V",a.yPos+a.height-this.highlightOffset_)))};
      +Blockly.geras.Highlighter.prototype.drawBottomRow=function(a){if(this.RTL_)this.steps_+=Blockly.utils.svgPaths.lineOnAxis("V",a.baseline-this.highlightOffset_);else{var b=this.info_.bottomRow.elements[0];Blockly.blockRendering.Types.isLeftSquareCorner(b)?this.steps_+=Blockly.utils.svgPaths.moveTo(a.xPos+this.highlightOffset_,a.baseline-this.highlightOffset_):Blockly.blockRendering.Types.isLeftRoundedCorner(b)&&(this.steps_+=Blockly.utils.svgPaths.moveTo(a.xPos,a.baseline),this.steps_+=this.outsideCornerPaths_.bottomLeft())}};
      +Blockly.geras.Highlighter.prototype.drawLeft=function(){var a=this.info_.outputConnection;a&&(a=a.connectionOffsetY+a.height,this.RTL_?this.steps_+=Blockly.utils.svgPaths.moveTo(this.info_.startX,a):(this.steps_+=Blockly.utils.svgPaths.moveTo(this.info_.startX+this.highlightOffset_,this.info_.bottomRow.baseline-this.highlightOffset_),this.steps_+=Blockly.utils.svgPaths.lineOnAxis("V",a)),this.steps_+=this.puzzleTabPaths_.pathUp(this.RTL_));this.RTL_||(a=this.info_.topRow,Blockly.blockRendering.Types.isLeftRoundedCorner(a.elements[0])?
      +this.steps_+=Blockly.utils.svgPaths.lineOnAxis("V",this.outsideCornerPaths_.height):this.steps_+=Blockly.utils.svgPaths.lineOnAxis("V",a.capline+this.highlightOffset_))};
      +Blockly.geras.Highlighter.prototype.drawInlineInput=function(a){var b=this.highlightOffset_,c=a.xPos+a.connectionWidth,d=a.centerline-a.height/2,e=a.width-a.connectionWidth,f=d+b;this.RTL_?(d=a.connectionOffsetY-b,a=a.height-(a.connectionOffsetY+a.connectionHeight)+b,this.inlineSteps_+=Blockly.utils.svgPaths.moveTo(c-b,f)+Blockly.utils.svgPaths.lineOnAxis("v",d)+this.puzzleTabPaths_.pathDown(this.RTL_)+Blockly.utils.svgPaths.lineOnAxis("v",a)+Blockly.utils.svgPaths.lineOnAxis("h",e)):this.inlineSteps_+=
      +Blockly.utils.svgPaths.moveTo(a.xPos+a.width+b,f)+Blockly.utils.svgPaths.lineOnAxis("v",a.height)+Blockly.utils.svgPaths.lineOnAxis("h",-e)+Blockly.utils.svgPaths.moveTo(c,d+a.connectionOffsetY)+this.puzzleTabPaths_.pathDown(this.RTL_)};Blockly.geras.PathObject=function(a){this.svgRoot=a;this.svgPathDark=Blockly.utils.dom.createSvgElement("path",{"class":"blocklyPathDark",transform:"translate(1,1)"},this.svgRoot);this.svgPath=Blockly.utils.dom.createSvgElement("path",{"class":"blocklyPath"},this.svgRoot);this.svgPathLight=Blockly.utils.dom.createSvgElement("path",{"class":"blocklyPathLight"},this.svgRoot)};
      +Blockly.geras.PathObject.prototype.setPaths=function(a,b){this.svgPath.setAttribute("d",a);this.svgPathDark.setAttribute("d",a);this.svgPathLight.setAttribute("d",b)};Blockly.geras.PathObject.prototype.flipRTL=function(){this.svgPath.setAttribute("transform","scale(-1 1)");this.svgPathLight.setAttribute("transform","scale(-1 1)");this.svgPathDark.setAttribute("transform","translate(1,1) scale(-1 1)")};Blockly.geras.InlineInput=function(a,b){Blockly.geras.InlineInput.superClass_.constructor.call(this,a,b);this.connectedBlock&&(this.width+=this.constants_.DARK_PATH_OFFSET,this.height+=this.constants_.DARK_PATH_OFFSET)};Blockly.utils.object.inherits(Blockly.geras.InlineInput,Blockly.blockRendering.InlineInput);Blockly.geras.StatementInput=function(a,b){Blockly.geras.StatementInput.superClass_.constructor.call(this,a,b);this.connectedBlock&&(this.height+=this.constants_.DARK_PATH_OFFSET)};
      +Blockly.utils.object.inherits(Blockly.geras.StatementInput,Blockly.blockRendering.StatementInput);Blockly.geras.RenderInfo=function(a,b){Blockly.geras.RenderInfo.superClass_.constructor.call(this,a,b)};Blockly.utils.object.inherits(Blockly.geras.RenderInfo,Blockly.blockRendering.RenderInfo);Blockly.geras.RenderInfo.prototype.getRenderer=function(){return this.renderer_};
      +Blockly.geras.RenderInfo.prototype.addInput_=function(a,b){this.isInline&&a.type==Blockly.INPUT_VALUE?(b.elements.push(new Blockly.geras.InlineInput(this.constants_,a)),b.hasInlineInput=!0):a.type==Blockly.NEXT_STATEMENT?(b.elements.push(new Blockly.geras.StatementInput(this.constants_,a)),b.hasStatement=!0):a.type==Blockly.INPUT_VALUE?(b.elements.push(new Blockly.blockRendering.ExternalValueInput(this.constants_,a)),b.hasExternalInput=!0):a.type==Blockly.DUMMY_INPUT&&(b.minHeight=Math.max(b.minHeight,
      +this.constants_.DUMMY_INPUT_MIN_HEIGHT),b.hasDummyInput=!0);b.align=a.align};
      +Blockly.geras.RenderInfo.prototype.addElemSpacing_=function(){for(var a=!1,b=0,c;c=this.rows[b];b++)c.hasExternalInput&&(a=!0);for(b=0;c=this.rows[b];b++){var d=c.elements;c.elements=[];c.startsWithElemSpacer()&&c.elements.push(new Blockly.blockRendering.InRowSpacer(this.constants_,this.getInRowSpacing_(null,d[0])));for(var e=0;e>>/handdelete.cur"), auto;',"}",".blocklyToolboxGrab {",'cursor: url("<<>>/handclosed.cur"), auto;',"cursor: grabbing;","cursor: -webkit-grabbing;","}",".blocklyToolboxDiv {","background-color: #ddd;","overflow-x: visible;","overflow-y: auto;","position: absolute;","z-index: 70;","-webkit-tap-highlight-color: transparent;","}",".blocklyTreeRoot {","padding: 4px 0;","}",".blocklyTreeRoot:focus {","outline: none;","}",".blocklyTreeRow {",
      +"height: 22px;","line-height: 22px;","margin-bottom: 3px;","padding-right: 8px;","white-space: nowrap;","}",".blocklyHorizontalTree {","float: left;","margin: 1px 5px 8px 0;","}",".blocklyHorizontalTreeRtl {","float: right;","margin: 1px 0 8px 5px;","}",'.blocklyToolboxDiv[dir="RTL"] .blocklyTreeRow {',"margin-left: 8px;","}",".blocklyTreeRow:not(.blocklyTreeSelected):hover {","background-color: #e4e4e4;","}",".blocklyTreeSeparator {","border-bottom: solid #e5e5e5 1px;","height: 0;","margin: 5px 0;",
      +"}",".blocklyTreeSeparatorHorizontal {","border-right: solid #e5e5e5 1px;","width: 0;","padding: 5px 0;","margin: 0 5px;","}",".blocklyTreeIcon {","background-image: url(<<>>/sprites.png);","height: 16px;","vertical-align: middle;","width: 16px;","}",".blocklyTreeIconClosedLtr {","background-position: -32px -1px;","}",".blocklyTreeIconClosedRtl {","background-position: 0 -1px;","}",".blocklyTreeIconOpen {","background-position: -16px -1px;","}",".blocklyTreeSelected>.blocklyTreeIconClosedLtr {",
      +"background-position: -32px -17px;","}",".blocklyTreeSelected>.blocklyTreeIconClosedRtl {","background-position: 0 -17px;","}",".blocklyTreeSelected>.blocklyTreeIconOpen {","background-position: -16px -17px;","}",".blocklyTreeIconNone,",".blocklyTreeSelected>.blocklyTreeIconNone {","background-position: -48px -1px;","}",".blocklyTreeLabel {","cursor: default;","font-family: sans-serif;","font-size: 16px;","padding: 0 3px;","vertical-align: middle;","}",".blocklyToolboxDelete .blocklyTreeLabel {",
      +'cursor: url("<<>>/handdelete.cur"), auto;',"}",".blocklyTreeSelected .blocklyTreeLabel {","color: #fff;","}"]);Blockly.Trashcan=function(a){this.workspace_=a;this.contents_=[];if(!(0>=this.workspace_.options.maxTrashcanContents)){a={scrollbars:!0,disabledPatternId:this.workspace_.options.disabledPatternId,parentWorkspace:this.workspace_,RTL:this.workspace_.RTL,oneBasedIndex:this.workspace_.options.oneBasedIndex,renderer:this.workspace_.options.renderer};if(this.workspace_.horizontalLayout){a.toolboxPosition=this.workspace_.toolboxPosition==Blockly.TOOLBOX_AT_TOP?Blockly.TOOLBOX_AT_BOTTOM:Blockly.TOOLBOX_AT_TOP;
      +if(!Blockly.HorizontalFlyout)throw Error("Missing require for Blockly.HorizontalFlyout");this.flyout_=new Blockly.HorizontalFlyout(a)}else{a.toolboxPosition=this.workspace_.toolboxPosition==Blockly.TOOLBOX_AT_RIGHT?Blockly.TOOLBOX_AT_LEFT:Blockly.TOOLBOX_AT_RIGHT;if(!Blockly.VerticalFlyout)throw Error("Missing require for Blockly.VerticalFlyout");this.flyout_=new Blockly.VerticalFlyout(a)}this.workspace_.addChangeListener(this.onDelete_.bind(this))}};Blockly.Trashcan.prototype.WIDTH_=47;
      +Blockly.Trashcan.prototype.BODY_HEIGHT_=44;Blockly.Trashcan.prototype.LID_HEIGHT_=16;Blockly.Trashcan.prototype.MARGIN_BOTTOM_=20;Blockly.Trashcan.prototype.MARGIN_SIDE_=20;Blockly.Trashcan.prototype.MARGIN_HOTSPOT_=10;Blockly.Trashcan.prototype.SPRITE_LEFT_=0;Blockly.Trashcan.prototype.SPRITE_TOP_=32;Blockly.Trashcan.prototype.HAS_BLOCKS_LID_ANGLE=.1;Blockly.Trashcan.prototype.isOpen=!1;Blockly.Trashcan.prototype.minOpenness_=0;Blockly.Trashcan.prototype.svgGroup_=null;
      +Blockly.Trashcan.prototype.svgLid_=null;Blockly.Trashcan.prototype.lidTask_=0;Blockly.Trashcan.prototype.lidOpen_=0;Blockly.Trashcan.prototype.left_=0;Blockly.Trashcan.prototype.top_=0;
      +Blockly.Trashcan.prototype.createDom=function(){this.svgGroup_=Blockly.utils.dom.createSvgElement("g",{"class":"blocklyTrash"},null);var a=String(Math.random()).substring(2);var b=Blockly.utils.dom.createSvgElement("clipPath",{id:"blocklyTrashBodyClipPath"+a},this.svgGroup_);Blockly.utils.dom.createSvgElement("rect",{width:this.WIDTH_,height:this.BODY_HEIGHT_,y:this.LID_HEIGHT_},b);var c=Blockly.utils.dom.createSvgElement("image",{width:Blockly.SPRITE.width,x:-this.SPRITE_LEFT_,height:Blockly.SPRITE.height,
      +y:-this.SPRITE_TOP_,"clip-path":"url(#blocklyTrashBodyClipPath"+a+")"},this.svgGroup_);c.setAttributeNS(Blockly.utils.dom.XLINK_NS,"xlink:href",this.workspace_.options.pathToMedia+Blockly.SPRITE.url);b=Blockly.utils.dom.createSvgElement("clipPath",{id:"blocklyTrashLidClipPath"+a},this.svgGroup_);Blockly.utils.dom.createSvgElement("rect",{width:this.WIDTH_,height:this.LID_HEIGHT_},b);this.svgLid_=Blockly.utils.dom.createSvgElement("image",{width:Blockly.SPRITE.width,x:-this.SPRITE_LEFT_,height:Blockly.SPRITE.height,
      +y:-this.SPRITE_TOP_,"clip-path":"url(#blocklyTrashLidClipPath"+a+")"},this.svgGroup_);this.svgLid_.setAttributeNS(Blockly.utils.dom.XLINK_NS,"xlink:href",this.workspace_.options.pathToMedia+Blockly.SPRITE.url);Blockly.bindEventWithChecks_(this.svgGroup_,"mouseup",this,this.click);Blockly.bindEvent_(c,"mouseover",this,this.mouseOver_);Blockly.bindEvent_(c,"mouseout",this,this.mouseOut_);this.animateLid_();return this.svgGroup_};
      +Blockly.Trashcan.prototype.init=function(a){0this.minOpenness_&&1>this.lidOpen_&&(this.lidTask_=setTimeout(this.animateLid_.bind(this),20))};
      +Blockly.Trashcan.prototype.setLidAngle_=function(a){var b=this.workspace_.toolboxPosition==Blockly.TOOLBOX_AT_RIGHT||this.workspace_.horizontalLayout&&this.workspace_.RTL;this.svgLid_.setAttribute("transform","rotate("+(b?-a:a)+","+(b?4:this.WIDTH_-4)+","+(this.LID_HEIGHT_-2)+")")};Blockly.Trashcan.prototype.close=function(){this.setOpen_(!1)};Blockly.Trashcan.prototype.click=function(){if(this.contents_.length){for(var a=[],b=0,c;c=this.contents_[b];b++)a[b]=Blockly.Xml.textToDom(c);this.flyout_.show(a)}};
      +Blockly.Trashcan.prototype.mouseOver_=function(){this.contents_.length&&this.setOpen_(!0)};Blockly.Trashcan.prototype.mouseOut_=function(){this.setOpen_(!1)};
      +Blockly.Trashcan.prototype.onDelete_=function(a){if(!(0>=this.workspace_.options.maxTrashcanContents)&&a.type==Blockly.Events.BLOCK_DELETE&&"shadow"!=a.oldXml.tagName.toLowerCase()&&(a=this.cleanBlockXML_(a.oldXml),-1==this.contents_.indexOf(a))){for(this.contents_.unshift(a);this.contents_.length>this.workspace_.options.maxTrashcanContents;)this.contents_.pop();this.minOpenness_=this.HAS_BLOCKS_LID_ANGLE;this.setLidAngle_(45*this.minOpenness_)}};
      +Blockly.Trashcan.prototype.cleanBlockXML_=function(a){for(var b=a=a.cloneNode(!0);b;){b.removeAttribute&&(b.removeAttribute("x"),b.removeAttribute("y"),b.removeAttribute("id"));var c=b.firstChild||b.nextSibling;if(!c)for(c=b.parentNode;c;){if(c.nextSibling){c=c.nextSibling;break}c=c.parentNode}b=c}return Blockly.Xml.domToText(a)};Blockly.VariablesDynamic={};Blockly.VariablesDynamic.onCreateVariableButtonClick_String=function(a){Blockly.Variables.createVariableButtonHandler(a.getTargetWorkspace(),null,"String")};Blockly.VariablesDynamic.onCreateVariableButtonClick_Number=function(a){Blockly.Variables.createVariableButtonHandler(a.getTargetWorkspace(),null,"Number")};Blockly.VariablesDynamic.onCreateVariableButtonClick_Colour=function(a){Blockly.Variables.createVariableButtonHandler(a.getTargetWorkspace(),null,"Colour")};
      +Blockly.VariablesDynamic.flyoutCategory=function(a){var b=[],c=document.createElement("button");c.setAttribute("text",Blockly.Msg.NEW_STRING_VARIABLE);c.setAttribute("callbackKey","CREATE_VARIABLE_STRING");b.push(c);c=document.createElement("button");c.setAttribute("text",Blockly.Msg.NEW_NUMBER_VARIABLE);c.setAttribute("callbackKey","CREATE_VARIABLE_NUMBER");b.push(c);c=document.createElement("button");c.setAttribute("text",Blockly.Msg.NEW_COLOUR_VARIABLE);c.setAttribute("callbackKey","CREATE_VARIABLE_COLOUR");
      +b.push(c);a.registerButtonCallback("CREATE_VARIABLE_STRING",Blockly.VariablesDynamic.onCreateVariableButtonClick_String);a.registerButtonCallback("CREATE_VARIABLE_NUMBER",Blockly.VariablesDynamic.onCreateVariableButtonClick_Number);a.registerButtonCallback("CREATE_VARIABLE_COLOUR",Blockly.VariablesDynamic.onCreateVariableButtonClick_Colour);a=Blockly.VariablesDynamic.flyoutCategoryBlocks(a);return b=b.concat(a)};
      +Blockly.VariablesDynamic.flyoutCategoryBlocks=function(a){a=a.getAllVariables();var b=[];if(0image, .blocklyZoom>svg>image {","opacity: .4;","}",".blocklyZoom>image:hover, .blocklyZoom>svg>image:hover {","opacity: .6;","}",".blocklyZoom>image:active, .blocklyZoom>svg>image:active {","opacity: .8;","}"]);Blockly.Themes.Dark={};
      +Blockly.Themes.Dark.defaultBlockStyles={colour_blocks:{colourPrimary:"#a5745b",colourSecondary:"#dbc7bd",colourTertiary:"#845d49"},list_blocks:{colourPrimary:"#745ba5",colourSecondary:"#c7bddb",colourTertiary:"#5d4984"},logic_blocks:{colourPrimary:"#5b80a5",colourSecondary:"#bdccdb",colourTertiary:"#496684"},loop_blocks:{colourPrimary:"#5ba55b",colourSecondary:"#bddbbd",colourTertiary:"#498449"},math_blocks:{colourPrimary:"#5b67a5",colourSecondary:"#bdc2db",colourTertiary:"#495284"},procedure_blocks:{colourPrimary:"#995ba5",
      +colourSecondary:"#d6bddb",colourTertiary:"#7a4984"},text_blocks:{colourPrimary:"#5ba58c",colourSecondary:"#bddbd1",colourTertiary:"#498470"},variable_blocks:{colourPrimary:"#a55b99",colourSecondary:"#dbbdd6",colourTertiary:"#84497a"},variable_dynamic_blocks:{colourPrimary:"#a55b99",colourSecondary:"#dbbdd6",colourTertiary:"#84497a"},hat_blocks:{colourPrimary:"#a55b99",colourSecondary:"#dbbdd6",colourTertiary:"#84497a",hat:"cap"}};
      +Blockly.Themes.Dark.categoryStyles={colour_category:{colour:"#a5745b"},list_category:{colour:"#745ba5"},logic_category:{colour:"#5b80a5"},loop_category:{colour:"#5ba55b"},math_category:{colour:"#5b67a5"},procedure_category:{colour:"#995ba5"},text_category:{colour:"#5ba58c"},variable_category:{colour:"#a55b99"},variable_dynamic_category:{colour:"#a55b99"}};Blockly.Themes.Dark=new Blockly.Theme(Blockly.Themes.Dark.defaultBlockStyles,Blockly.Themes.Dark.categoryStyles);
      +Blockly.Themes.Dark.setComponentStyle("workspace","#1e1e1e");Blockly.Themes.Dark.setComponentStyle("toolbox","#333");Blockly.Themes.Dark.setComponentStyle("toolboxText","#fff");Blockly.Themes.Dark.setComponentStyle("flyout","#252526");Blockly.Themes.Dark.setComponentStyle("flyoutText","#ccc");Blockly.Themes.Dark.setComponentStyle("flyoutOpacity",1);Blockly.Themes.Dark.setComponentStyle("scrollbar","#797979");Blockly.Themes.Dark.setComponentStyle("scrollbarOpacity",.4);Blockly.Themes.HighContrast={};
      +Blockly.Themes.HighContrast.defaultBlockStyles={colour_blocks:{colourPrimary:"#a52714",colourSecondary:"#FB9B8C",colourTertiary:"#FBE1DD"},list_blocks:{colourPrimary:"#4a148c",colourSecondary:"#AD7BE9",colourTertiary:"#CDB6E9"},logic_blocks:{colourPrimary:"#01579b",colourSecondary:"#64C7FF",colourTertiary:"#C5EAFF"},loop_blocks:{colourPrimary:"#33691e",colourSecondary:"#9AFF78",colourTertiary:"#E1FFD7"},math_blocks:{colourPrimary:"#1a237e",colourSecondary:"#8A9EFF",colourTertiary:"#DCE2FF"},procedure_blocks:{colourPrimary:"#006064",
      +colourSecondary:"#77E6EE",colourTertiary:"#CFECEE"},text_blocks:{colourPrimary:"#004d40",colourSecondary:"#5ae27c",colourTertiary:"#D2FFDD"},variable_blocks:{colourPrimary:"#880e4f",colourSecondary:"#FF73BE",colourTertiary:"#FFD4EB"},variable_dynamic_blocks:{colourPrimary:"#880e4f",colourSecondary:"#FF73BE",colourTertiary:"#FFD4EB"},hat_blocks:{colourPrimary:"#880e4f",colourSecondary:"#FF73BE",colourTertiary:"#FFD4EB",hat:"cap"}};
      +Blockly.Themes.HighContrast.categoryStyles={colour_category:{colour:"#a52714"},list_category:{colour:"#4a148c"},logic_category:{colour:"#01579b"},loop_category:{colour:"#33691e"},math_category:{colour:"#1a237e"},procedure_category:{colour:"#006064"},text_category:{colour:"#004d40"},variable_category:{colour:"#880e4f"},variable_dynamic_category:{colour:"#880e4f"}};Blockly.Themes.HighContrast=new Blockly.Theme(Blockly.Themes.HighContrast.defaultBlockStyles,Blockly.Themes.HighContrast.categoryStyles);Blockly.Themes.Modern={};
      +Blockly.Themes.Modern.defaultBlockStyles={colour_blocks:{colourPrimary:"#a5745b",colourSecondary:"#dbc7bd",colourTertiary:"#845d49"},list_blocks:{colourPrimary:"#745ba5",colourSecondary:"#c7bddb",colourTertiary:"#5d4984"},logic_blocks:{colourPrimary:"#5b80a5",colourSecondary:"#bdccdb",colourTertiary:"#496684"},loop_blocks:{colourPrimary:"#5ba55b",colourSecondary:"#bddbbd",colourTertiary:"#498449"},math_blocks:{colourPrimary:"#5b67a5",colourSecondary:"#bdc2db",colourTertiary:"#495284"},procedure_blocks:{colourPrimary:"#995ba5",
      +colourSecondary:"#d6bddb",colourTertiary:"#7a4984"},text_blocks:{colourPrimary:"#5ba58c",colourSecondary:"#bddbd1",colourTertiary:"#498470"},variable_blocks:{colourPrimary:"#a55b99",colourSecondary:"#dbbdd6",colourTertiary:"#84497a"},variable_dynamic_blocks:{colourPrimary:"#a55b99",colourSecondary:"#dbbdd6",colourTertiary:"#84497a"},hat_blocks:{colourPrimary:"#a55b99",colourSecondary:"#dbbdd6",colourTertiary:"#84497a",hat:"cap"}};
      +Blockly.Themes.Modern.categoryStyles={colour_category:{colour:"#a5745b"},list_category:{colour:"#745ba5"},logic_category:{colour:"#5b80a5"},loop_category:{colour:"#5ba55b"},math_category:{colour:"#5b67a5"},procedure_category:{colour:"#995ba5"},text_category:{colour:"#5ba58c"},variable_category:{colour:"#a55b99"},variable_dynamic_category:{colour:"#a55b99"}};Blockly.Themes.Modern=new Blockly.Theme(Blockly.Themes.Modern.defaultBlockStyles,Blockly.Themes.Modern.categoryStyles);Blockly.requires={};
      \ No newline at end of file
      diff --git a/blockly/_pv_1_4_0/webif/static/blockly/blocks_compressed.js b/blockly/_pv_1_4_0/webif/static/blockly/blocks_compressed.js
      new file mode 100755
      index 000000000..c83d73438
      --- /dev/null
      +++ b/blockly/_pv_1_4_0/webif/static/blockly/blocks_compressed.js
      @@ -0,0 +1,172 @@
      +// Do not edit this file; automatically generated by build.py.
      +'use strict';
      +
      +
      +Blockly.Blocks.colour={};Blockly.Constants={};Blockly.Constants.Colour={};Blockly.Constants.Colour.HUE=20;
      +Blockly.defineBlocksWithJsonArray([{type:"colour_picker",message0:"%1",args0:[{type:"field_colour",name:"COLOUR",colour:"#ff0000"}],output:"Colour",helpUrl:"%{BKY_COLOUR_PICKER_HELPURL}",style:"colour_blocks",tooltip:"%{BKY_COLOUR_PICKER_TOOLTIP}",extensions:["parent_tooltip_when_inline"]},{type:"colour_random",message0:"%{BKY_COLOUR_RANDOM_TITLE}",output:"Colour",helpUrl:"%{BKY_COLOUR_RANDOM_HELPURL}",style:"colour_blocks",tooltip:"%{BKY_COLOUR_RANDOM_TOOLTIP}"},{type:"colour_rgb",message0:"%{BKY_COLOUR_RGB_TITLE} %{BKY_COLOUR_RGB_RED} %1 %{BKY_COLOUR_RGB_GREEN} %2 %{BKY_COLOUR_RGB_BLUE} %3",
      +args0:[{type:"input_value",name:"RED",check:"Number",align:"RIGHT"},{type:"input_value",name:"GREEN",check:"Number",align:"RIGHT"},{type:"input_value",name:"BLUE",check:"Number",align:"RIGHT"}],output:"Colour",helpUrl:"%{BKY_COLOUR_RGB_HELPURL}",style:"colour_blocks",tooltip:"%{BKY_COLOUR_RGB_TOOLTIP}"},{type:"colour_blend",message0:"%{BKY_COLOUR_BLEND_TITLE} %{BKY_COLOUR_BLEND_COLOUR1} %1 %{BKY_COLOUR_BLEND_COLOUR2} %2 %{BKY_COLOUR_BLEND_RATIO} %3",args0:[{type:"input_value",name:"COLOUR1",check:"Colour",
      +align:"RIGHT"},{type:"input_value",name:"COLOUR2",check:"Colour",align:"RIGHT"},{type:"input_value",name:"RATIO",check:"Number",align:"RIGHT"}],output:"Colour",helpUrl:"%{BKY_COLOUR_BLEND_HELPURL}",style:"colour_blocks",tooltip:"%{BKY_COLOUR_BLEND_TOOLTIP}"}]);Blockly.Blocks.lists={};Blockly.Constants.Lists={};Blockly.Constants.Lists.HUE=260;
      +Blockly.defineBlocksWithJsonArray([{type:"lists_create_empty",message0:"%{BKY_LISTS_CREATE_EMPTY_TITLE}",output:"Array",style:"list_blocks",tooltip:"%{BKY_LISTS_CREATE_EMPTY_TOOLTIP}",helpUrl:"%{BKY_LISTS_CREATE_EMPTY_HELPURL}"},{type:"lists_repeat",message0:"%{BKY_LISTS_REPEAT_TITLE}",args0:[{type:"input_value",name:"ITEM"},{type:"input_value",name:"NUM",check:"Number"}],output:"Array",style:"list_blocks",tooltip:"%{BKY_LISTS_REPEAT_TOOLTIP}",helpUrl:"%{BKY_LISTS_REPEAT_HELPURL}"},{type:"lists_reverse",
      +message0:"%{BKY_LISTS_REVERSE_MESSAGE0}",args0:[{type:"input_value",name:"LIST",check:"Array"}],output:"Array",inputsInline:!0,style:"list_blocks",tooltip:"%{BKY_LISTS_REVERSE_TOOLTIP}",helpUrl:"%{BKY_LISTS_REVERSE_HELPURL}"},{type:"lists_isEmpty",message0:"%{BKY_LISTS_ISEMPTY_TITLE}",args0:[{type:"input_value",name:"VALUE",check:["String","Array"]}],output:"Boolean",style:"list_blocks",tooltip:"%{BKY_LISTS_ISEMPTY_TOOLTIP}",helpUrl:"%{BKY_LISTS_ISEMPTY_HELPURL}"},{type:"lists_length",message0:"%{BKY_LISTS_LENGTH_TITLE}",
      +args0:[{type:"input_value",name:"VALUE",check:["String","Array"]}],output:"Number",style:"list_blocks",tooltip:"%{BKY_LISTS_LENGTH_TOOLTIP}",helpUrl:"%{BKY_LISTS_LENGTH_HELPURL}"}]);
      +Blockly.Blocks.lists_create_with={init:function(){this.setHelpUrl(Blockly.Msg.LISTS_CREATE_WITH_HELPURL);this.setStyle("list_blocks");this.itemCount_=3;this.updateShape_();this.setOutput(!0,"Array");this.setMutator(new Blockly.Mutator(["lists_create_with_item"]));this.setTooltip(Blockly.Msg.LISTS_CREATE_WITH_TOOLTIP)},mutationToDom:function(){var a=Blockly.utils.xml.createElement("mutation");a.setAttribute("items",this.itemCount_);return a},domToMutation:function(a){this.itemCount_=parseInt(a.getAttribute("items"),
      +10);this.updateShape_()},decompose:function(a){var b=a.newBlock("lists_create_with_container");b.initSvg();for(var c=b.getInput("STACK").connection,d=0;d","GT"],["\u200f\u2265","GTE"]]},{type:"input_value",name:"B"}],inputsInline:!0,output:"Boolean",style:"logic_blocks",helpUrl:"%{BKY_LOGIC_COMPARE_HELPURL}",extensions:["logic_compare",
      +"logic_op_tooltip"]},{type:"logic_operation",message0:"%1 %2 %3",args0:[{type:"input_value",name:"A",check:"Boolean"},{type:"field_dropdown",name:"OP",options:[["%{BKY_LOGIC_OPERATION_AND}","AND"],["%{BKY_LOGIC_OPERATION_OR}","OR"]]},{type:"input_value",name:"B",check:"Boolean"}],inputsInline:!0,output:"Boolean",style:"logic_blocks",helpUrl:"%{BKY_LOGIC_OPERATION_HELPURL}",extensions:["logic_op_tooltip"]},{type:"logic_negate",message0:"%{BKY_LOGIC_NEGATE_TITLE}",args0:[{type:"input_value",name:"BOOL",
      +check:"Boolean"}],output:"Boolean",style:"logic_blocks",tooltip:"%{BKY_LOGIC_NEGATE_TOOLTIP}",helpUrl:"%{BKY_LOGIC_NEGATE_HELPURL}"},{type:"logic_null",message0:"%{BKY_LOGIC_NULL}",output:null,style:"logic_blocks",tooltip:"%{BKY_LOGIC_NULL_TOOLTIP}",helpUrl:"%{BKY_LOGIC_NULL_HELPURL}"},{type:"logic_ternary",message0:"%{BKY_LOGIC_TERNARY_CONDITION} %1",args0:[{type:"input_value",name:"IF",check:"Boolean"}],message1:"%{BKY_LOGIC_TERNARY_IF_TRUE} %1",args1:[{type:"input_value",name:"THEN"}],message2:"%{BKY_LOGIC_TERNARY_IF_FALSE} %1",
      +args2:[{type:"input_value",name:"ELSE"}],output:null,style:"logic_blocks",tooltip:"%{BKY_LOGIC_TERNARY_TOOLTIP}",helpUrl:"%{BKY_LOGIC_TERNARY_HELPURL}",extensions:["logic_ternary"]}]);
      +Blockly.defineBlocksWithJsonArray([{type:"controls_if_if",message0:"%{BKY_CONTROLS_IF_IF_TITLE_IF}",nextStatement:null,enableContextMenu:!1,style:"logic_blocks",tooltip:"%{BKY_CONTROLS_IF_IF_TOOLTIP}"},{type:"controls_if_elseif",message0:"%{BKY_CONTROLS_IF_ELSEIF_TITLE_ELSEIF}",previousStatement:null,nextStatement:null,enableContextMenu:!1,style:"logic_blocks",tooltip:"%{BKY_CONTROLS_IF_ELSEIF_TOOLTIP}"},{type:"controls_if_else",message0:"%{BKY_CONTROLS_IF_ELSE_TITLE_ELSE}",previousStatement:null,
      +enableContextMenu:!1,style:"logic_blocks",tooltip:"%{BKY_CONTROLS_IF_ELSE_TOOLTIP}"}]);Blockly.Constants.Logic.TOOLTIPS_BY_OP={EQ:"%{BKY_LOGIC_COMPARE_TOOLTIP_EQ}",NEQ:"%{BKY_LOGIC_COMPARE_TOOLTIP_NEQ}",LT:"%{BKY_LOGIC_COMPARE_TOOLTIP_LT}",LTE:"%{BKY_LOGIC_COMPARE_TOOLTIP_LTE}",GT:"%{BKY_LOGIC_COMPARE_TOOLTIP_GT}",GTE:"%{BKY_LOGIC_COMPARE_TOOLTIP_GTE}",AND:"%{BKY_LOGIC_OPERATION_TOOLTIP_AND}",OR:"%{BKY_LOGIC_OPERATION_TOOLTIP_OR}"};
      +Blockly.Extensions.register("logic_op_tooltip",Blockly.Extensions.buildTooltipForDropdown("OP",Blockly.Constants.Logic.TOOLTIPS_BY_OP));
      +Blockly.Constants.Logic.CONTROLS_IF_MUTATOR_MIXIN={elseifCount_:0,elseCount_:0,suppressPrefixSuffix:!0,mutationToDom:function(){if(!this.elseifCount_&&!this.elseCount_)return null;var a=Blockly.utils.xml.createElement("mutation");this.elseifCount_&&a.setAttribute("elseif",this.elseifCount_);this.elseCount_&&a.setAttribute("else",1);return a},domToMutation:function(a){this.elseifCount_=parseInt(a.getAttribute("elseif"),10)||0;this.elseCount_=parseInt(a.getAttribute("else"),10)||0;this.rebuildShape_()},
      +decompose:function(a){var b=a.newBlock("controls_if_if");b.initSvg();for(var c=b.nextConnection,d=1;d<=this.elseifCount_;d++){var e=a.newBlock("controls_if_elseif");e.initSvg();c.connect(e.previousConnection);c=e.nextConnection}this.elseCount_&&(a=a.newBlock("controls_if_else"),a.initSvg(),c.connect(a.previousConnection));return b},compose:function(a){a=a.nextConnection.targetBlock();this.elseCount_=this.elseifCount_=0;for(var b=[null],c=[null],d=null;a;){switch(a.type){case "controls_if_elseif":this.elseifCount_++;
      +b.push(a.valueConnection_);c.push(a.statementConnection_);break;case "controls_if_else":this.elseCount_++;d=a.statementConnection_;break;default:throw TypeError("Unknown block type: "+a.type);}a=a.nextConnection&&a.nextConnection.targetBlock()}this.updateShape_();this.reconnectChildBlocks_(b,c,d)},saveConnections:function(a){a=a.nextConnection.targetBlock();for(var b=1;a;){switch(a.type){case "controls_if_elseif":var c=this.getInput("IF"+b),d=this.getInput("DO"+b);a.valueConnection_=c&&c.connection.targetConnection;
      +a.statementConnection_=d&&d.connection.targetConnection;b++;break;case "controls_if_else":d=this.getInput("ELSE");a.statementConnection_=d&&d.connection.targetConnection;break;default:throw TypeError("Unknown block type: "+a.type);}a=a.nextConnection&&a.nextConnection.targetBlock()}},rebuildShape_:function(){var a=[null],b=[null],c=null;this.getInput("ELSE")&&(c=this.getInput("ELSE").connection.targetConnection);for(var d=1;this.getInput("IF"+d);){var e=this.getInput("IF"+d),f=this.getInput("DO"+
      +d);a.push(e.connection.targetConnection);b.push(f.connection.targetConnection);d++}this.updateShape_();this.reconnectChildBlocks_(a,b,c)},updateShape_:function(){this.getInput("ELSE")&&this.removeInput("ELSE");for(var a=1;this.getInput("IF"+a);)this.removeInput("IF"+a),this.removeInput("DO"+a),a++;for(a=1;a<=this.elseifCount_;a++)this.appendValueInput("IF"+a).setCheck("Boolean").appendField(Blockly.Msg.CONTROLS_IF_MSG_ELSEIF),this.appendStatementInput("DO"+a).appendField(Blockly.Msg.CONTROLS_IF_MSG_THEN);
      +this.elseCount_&&this.appendStatementInput("ELSE").appendField(Blockly.Msg.CONTROLS_IF_MSG_ELSE)},reconnectChildBlocks_:function(a,b,c){for(var d=1;d<=this.elseifCount_;d++)Blockly.Mutator.reconnect(a[d],this,"IF"+d),Blockly.Mutator.reconnect(b[d],this,"DO"+d);Blockly.Mutator.reconnect(c,this,"ELSE")}};Blockly.Extensions.registerMutator("controls_if_mutator",Blockly.Constants.Logic.CONTROLS_IF_MUTATOR_MIXIN,null,["controls_if_elseif","controls_if_else"]);
      +Blockly.Constants.Logic.CONTROLS_IF_TOOLTIP_EXTENSION=function(){this.setTooltip(function(){if(this.elseifCount_||this.elseCount_){if(!this.elseifCount_&&this.elseCount_)return Blockly.Msg.CONTROLS_IF_TOOLTIP_2;if(this.elseifCount_&&!this.elseCount_)return Blockly.Msg.CONTROLS_IF_TOOLTIP_3;if(this.elseifCount_&&this.elseCount_)return Blockly.Msg.CONTROLS_IF_TOOLTIP_4}else return Blockly.Msg.CONTROLS_IF_TOOLTIP_1;return""}.bind(this))};Blockly.Extensions.register("controls_if_tooltip",Blockly.Constants.Logic.CONTROLS_IF_TOOLTIP_EXTENSION);
      +Blockly.Constants.Logic.LOGIC_COMPARE_ONCHANGE_MIXIN={onchange:function(a){this.prevBlocks_||(this.prevBlocks_=[null,null]);var b=this.getInputTargetBlock("A"),c=this.getInputTargetBlock("B");b&&c&&!b.outputConnection.checkType_(c.outputConnection)&&(Blockly.Events.setGroup(a.group),a=this.prevBlocks_[0],a!==b&&(b.unplug(),a&&!a.isShadow()&&this.getInput("A").connection.connect(a.outputConnection)),b=this.prevBlocks_[1],b!==c&&(c.unplug(),b&&!b.isShadow()&&this.getInput("B").connection.connect(b.outputConnection)),
      +this.bumpNeighbours(),Blockly.Events.setGroup(!1));this.prevBlocks_[0]=this.getInputTargetBlock("A");this.prevBlocks_[1]=this.getInputTargetBlock("B")}};Blockly.Constants.Logic.LOGIC_COMPARE_EXTENSION=function(){this.mixin(Blockly.Constants.Logic.LOGIC_COMPARE_ONCHANGE_MIXIN)};Blockly.Extensions.register("logic_compare",Blockly.Constants.Logic.LOGIC_COMPARE_EXTENSION);
      +Blockly.Constants.Logic.LOGIC_TERNARY_ONCHANGE_MIXIN={prevParentConnection_:null,onchange:function(a){var b=this.getInputTargetBlock("THEN"),c=this.getInputTargetBlock("ELSE"),d=this.outputConnection.targetConnection;if((b||c)&&d)for(var e=0;2>e;e++){var f=1==e?b:c;f&&!f.outputConnection.checkType_(d)&&(Blockly.Events.setGroup(a.group),d===this.prevParentConnection_?(this.unplug(),d.getSourceBlock().bumpNeighbours()):(f.unplug(),f.bumpNeighbours()),Blockly.Events.setGroup(!1))}this.prevParentConnection_=
      +d}};Blockly.Extensions.registerMixin("logic_ternary",Blockly.Constants.Logic.LOGIC_TERNARY_ONCHANGE_MIXIN);Blockly.Blocks.loops={};Blockly.Constants.Loops={};Blockly.Constants.Loops.HUE=120;
      +Blockly.defineBlocksWithJsonArray([{type:"controls_repeat_ext",message0:"%{BKY_CONTROLS_REPEAT_TITLE}",args0:[{type:"input_value",name:"TIMES",check:"Number"}],message1:"%{BKY_CONTROLS_REPEAT_INPUT_DO} %1",args1:[{type:"input_statement",name:"DO"}],previousStatement:null,nextStatement:null,style:"loop_blocks",tooltip:"%{BKY_CONTROLS_REPEAT_TOOLTIP}",helpUrl:"%{BKY_CONTROLS_REPEAT_HELPURL}"},{type:"controls_repeat",message0:"%{BKY_CONTROLS_REPEAT_TITLE}",args0:[{type:"field_number",name:"TIMES",value:10,
      +min:0,precision:1}],message1:"%{BKY_CONTROLS_REPEAT_INPUT_DO} %1",args1:[{type:"input_statement",name:"DO"}],previousStatement:null,nextStatement:null,style:"loop_blocks",tooltip:"%{BKY_CONTROLS_REPEAT_TOOLTIP}",helpUrl:"%{BKY_CONTROLS_REPEAT_HELPURL}"},{type:"controls_whileUntil",message0:"%1 %2",args0:[{type:"field_dropdown",name:"MODE",options:[["%{BKY_CONTROLS_WHILEUNTIL_OPERATOR_WHILE}","WHILE"],["%{BKY_CONTROLS_WHILEUNTIL_OPERATOR_UNTIL}","UNTIL"]]},{type:"input_value",name:"BOOL",check:"Boolean"}],
      +message1:"%{BKY_CONTROLS_REPEAT_INPUT_DO} %1",args1:[{type:"input_statement",name:"DO"}],previousStatement:null,nextStatement:null,style:"loop_blocks",helpUrl:"%{BKY_CONTROLS_WHILEUNTIL_HELPURL}",extensions:["controls_whileUntil_tooltip"]},{type:"controls_for",message0:"%{BKY_CONTROLS_FOR_TITLE}",args0:[{type:"field_variable",name:"VAR",variable:null},{type:"input_value",name:"FROM",check:"Number",align:"RIGHT"},{type:"input_value",name:"TO",check:"Number",align:"RIGHT"},{type:"input_value",name:"BY",
      +check:"Number",align:"RIGHT"}],message1:"%{BKY_CONTROLS_REPEAT_INPUT_DO} %1",args1:[{type:"input_statement",name:"DO"}],inputsInline:!0,previousStatement:null,nextStatement:null,style:"loop_blocks",helpUrl:"%{BKY_CONTROLS_FOR_HELPURL}",extensions:["contextMenu_newGetVariableBlock","controls_for_tooltip"]},{type:"controls_forEach",message0:"%{BKY_CONTROLS_FOREACH_TITLE}",args0:[{type:"field_variable",name:"VAR",variable:null},{type:"input_value",name:"LIST",check:"Array"}],message1:"%{BKY_CONTROLS_REPEAT_INPUT_DO} %1",
      +args1:[{type:"input_statement",name:"DO"}],previousStatement:null,nextStatement:null,style:"loop_blocks",helpUrl:"%{BKY_CONTROLS_FOREACH_HELPURL}",extensions:["contextMenu_newGetVariableBlock","controls_forEach_tooltip"]},{type:"controls_flow_statements",message0:"%1",args0:[{type:"field_dropdown",name:"FLOW",options:[["%{BKY_CONTROLS_FLOW_STATEMENTS_OPERATOR_BREAK}","BREAK"],["%{BKY_CONTROLS_FLOW_STATEMENTS_OPERATOR_CONTINUE}","CONTINUE"]]}],previousStatement:null,style:"loop_blocks",helpUrl:"%{BKY_CONTROLS_FLOW_STATEMENTS_HELPURL}",
      +extensions:["controls_flow_tooltip","controls_flow_in_loop_check"]}]);Blockly.Constants.Loops.WHILE_UNTIL_TOOLTIPS={WHILE:"%{BKY_CONTROLS_WHILEUNTIL_TOOLTIP_WHILE}",UNTIL:"%{BKY_CONTROLS_WHILEUNTIL_TOOLTIP_UNTIL}"};Blockly.Extensions.register("controls_whileUntil_tooltip",Blockly.Extensions.buildTooltipForDropdown("MODE",Blockly.Constants.Loops.WHILE_UNTIL_TOOLTIPS));Blockly.Constants.Loops.BREAK_CONTINUE_TOOLTIPS={BREAK:"%{BKY_CONTROLS_FLOW_STATEMENTS_TOOLTIP_BREAK}",CONTINUE:"%{BKY_CONTROLS_FLOW_STATEMENTS_TOOLTIP_CONTINUE}"};
      +Blockly.Extensions.register("controls_flow_tooltip",Blockly.Extensions.buildTooltipForDropdown("FLOW",Blockly.Constants.Loops.BREAK_CONTINUE_TOOLTIPS));
      +Blockly.Constants.Loops.CUSTOM_CONTEXT_MENU_CREATE_VARIABLES_GET_MIXIN={customContextMenu:function(a){if(!this.isInFlyout){var b=this.getField("VAR").getVariable(),c=b.name;if(!this.isCollapsed()&&null!=c){var d={enabled:!0};d.text=Blockly.Msg.VARIABLES_SET_CREATE_GET.replace("%1",c);b=Blockly.Variables.generateVariableFieldDom(b);c=Blockly.utils.xml.createElement("block");c.setAttribute("type","variables_get");c.appendChild(b);d.callback=Blockly.ContextMenu.callbackFactory(this,c);a.push(d)}}}};
      +Blockly.Extensions.registerMixin("contextMenu_newGetVariableBlock",Blockly.Constants.Loops.CUSTOM_CONTEXT_MENU_CREATE_VARIABLES_GET_MIXIN);Blockly.Extensions.register("controls_for_tooltip",Blockly.Extensions.buildTooltipWithFieldText("%{BKY_CONTROLS_FOR_TOOLTIP}","VAR"));Blockly.Extensions.register("controls_forEach_tooltip",Blockly.Extensions.buildTooltipWithFieldText("%{BKY_CONTROLS_FOREACH_TOOLTIP}","VAR"));
      +Blockly.Constants.Loops.CONTROL_FLOW_IN_LOOP_CHECK_MIXIN={LOOP_TYPES:["controls_repeat","controls_repeat_ext","controls_forEach","controls_for","controls_whileUntil"],suppressPrefixSuffix:!0,getSurroundLoop:function(a){do{if(-1!=Blockly.Constants.Loops.CONTROL_FLOW_IN_LOOP_CHECK_MIXIN.LOOP_TYPES.indexOf(a.type))return a;a=a.getSurroundParent()}while(a);return null},onchange:function(a){this.workspace.isDragging&&!this.workspace.isDragging()&&(Blockly.Constants.Loops.CONTROL_FLOW_IN_LOOP_CHECK_MIXIN.getSurroundLoop(this)?
      +(this.setWarningText(null),this.isInFlyout||this.setEnabled(!0)):(this.setWarningText(Blockly.Msg.CONTROLS_FLOW_STATEMENTS_WARNING),this.isInFlyout||this.getInheritedDisabled()||this.setEnabled(!1)))}};Blockly.Extensions.registerMixin("controls_flow_in_loop_check",Blockly.Constants.Loops.CONTROL_FLOW_IN_LOOP_CHECK_MIXIN);Blockly.Blocks.math={};Blockly.Constants.Math={};Blockly.Constants.Math.HUE=230;
      +Blockly.defineBlocksWithJsonArray([{type:"math_number",message0:"%1",args0:[{type:"field_number",name:"NUM",value:0}],output:"Number",helpUrl:"%{BKY_MATH_NUMBER_HELPURL}",style:"math_blocks",tooltip:"%{BKY_MATH_NUMBER_TOOLTIP}",extensions:["parent_tooltip_when_inline"]},{type:"math_arithmetic",message0:"%1 %2 %3",args0:[{type:"input_value",name:"A",check:"Number"},{type:"field_dropdown",name:"OP",options:[["%{BKY_MATH_ADDITION_SYMBOL}","ADD"],["%{BKY_MATH_SUBTRACTION_SYMBOL}","MINUS"],["%{BKY_MATH_MULTIPLICATION_SYMBOL}",
      +"MULTIPLY"],["%{BKY_MATH_DIVISION_SYMBOL}","DIVIDE"],["%{BKY_MATH_POWER_SYMBOL}","POWER"]]},{type:"input_value",name:"B",check:"Number"}],inputsInline:!0,output:"Number",style:"math_blocks",helpUrl:"%{BKY_MATH_ARITHMETIC_HELPURL}",extensions:["math_op_tooltip"]},{type:"math_single",message0:"%1 %2",args0:[{type:"field_dropdown",name:"OP",options:[["%{BKY_MATH_SINGLE_OP_ROOT}","ROOT"],["%{BKY_MATH_SINGLE_OP_ABSOLUTE}","ABS"],["-","NEG"],["ln","LN"],["log10","LOG10"],["e^","EXP"],["10^","POW10"]]},
      +{type:"input_value",name:"NUM",check:"Number"}],output:"Number",style:"math_blocks",helpUrl:"%{BKY_MATH_SINGLE_HELPURL}",extensions:["math_op_tooltip"]},{type:"math_trig",message0:"%1 %2",args0:[{type:"field_dropdown",name:"OP",options:[["%{BKY_MATH_TRIG_SIN}","SIN"],["%{BKY_MATH_TRIG_COS}","COS"],["%{BKY_MATH_TRIG_TAN}","TAN"],["%{BKY_MATH_TRIG_ASIN}","ASIN"],["%{BKY_MATH_TRIG_ACOS}","ACOS"],["%{BKY_MATH_TRIG_ATAN}","ATAN"]]},{type:"input_value",name:"NUM",check:"Number"}],output:"Number",style:"math_blocks",
      +helpUrl:"%{BKY_MATH_TRIG_HELPURL}",extensions:["math_op_tooltip"]},{type:"math_constant",message0:"%1",args0:[{type:"field_dropdown",name:"CONSTANT",options:[["\u03c0","PI"],["e","E"],["\u03c6","GOLDEN_RATIO"],["sqrt(2)","SQRT2"],["sqrt(\u00bd)","SQRT1_2"],["\u221e","INFINITY"]]}],output:"Number",style:"math_blocks",tooltip:"%{BKY_MATH_CONSTANT_TOOLTIP}",helpUrl:"%{BKY_MATH_CONSTANT_HELPURL}"},{type:"math_number_property",message0:"%1 %2",args0:[{type:"input_value",name:"NUMBER_TO_CHECK",check:"Number"},
      +{type:"field_dropdown",name:"PROPERTY",options:[["%{BKY_MATH_IS_EVEN}","EVEN"],["%{BKY_MATH_IS_ODD}","ODD"],["%{BKY_MATH_IS_PRIME}","PRIME"],["%{BKY_MATH_IS_WHOLE}","WHOLE"],["%{BKY_MATH_IS_POSITIVE}","POSITIVE"],["%{BKY_MATH_IS_NEGATIVE}","NEGATIVE"],["%{BKY_MATH_IS_DIVISIBLE_BY}","DIVISIBLE_BY"]]}],inputsInline:!0,output:"Boolean",style:"math_blocks",tooltip:"%{BKY_MATH_IS_TOOLTIP}",mutator:"math_is_divisibleby_mutator"},{type:"math_change",message0:"%{BKY_MATH_CHANGE_TITLE}",args0:[{type:"field_variable",
      +name:"VAR",variable:"%{BKY_MATH_CHANGE_TITLE_ITEM}"},{type:"input_value",name:"DELTA",check:"Number"}],previousStatement:null,nextStatement:null,style:"variable_blocks",helpUrl:"%{BKY_MATH_CHANGE_HELPURL}",extensions:["math_change_tooltip"]},{type:"math_round",message0:"%1 %2",args0:[{type:"field_dropdown",name:"OP",options:[["%{BKY_MATH_ROUND_OPERATOR_ROUND}","ROUND"],["%{BKY_MATH_ROUND_OPERATOR_ROUNDUP}","ROUNDUP"],["%{BKY_MATH_ROUND_OPERATOR_ROUNDDOWN}","ROUNDDOWN"]]},{type:"input_value",name:"NUM",
      +check:"Number"}],output:"Number",style:"math_blocks",helpUrl:"%{BKY_MATH_ROUND_HELPURL}",tooltip:"%{BKY_MATH_ROUND_TOOLTIP}"},{type:"math_on_list",message0:"%1 %2",args0:[{type:"field_dropdown",name:"OP",options:[["%{BKY_MATH_ONLIST_OPERATOR_SUM}","SUM"],["%{BKY_MATH_ONLIST_OPERATOR_MIN}","MIN"],["%{BKY_MATH_ONLIST_OPERATOR_MAX}","MAX"],["%{BKY_MATH_ONLIST_OPERATOR_AVERAGE}","AVERAGE"],["%{BKY_MATH_ONLIST_OPERATOR_MEDIAN}","MEDIAN"],["%{BKY_MATH_ONLIST_OPERATOR_MODE}","MODE"],["%{BKY_MATH_ONLIST_OPERATOR_STD_DEV}",
      +"STD_DEV"],["%{BKY_MATH_ONLIST_OPERATOR_RANDOM}","RANDOM"]]},{type:"input_value",name:"LIST",check:"Array"}],output:"Number",style:"math_blocks",helpUrl:"%{BKY_MATH_ONLIST_HELPURL}",mutator:"math_modes_of_list_mutator",extensions:["math_op_tooltip"]},{type:"math_modulo",message0:"%{BKY_MATH_MODULO_TITLE}",args0:[{type:"input_value",name:"DIVIDEND",check:"Number"},{type:"input_value",name:"DIVISOR",check:"Number"}],inputsInline:!0,output:"Number",style:"math_blocks",tooltip:"%{BKY_MATH_MODULO_TOOLTIP}",
      +helpUrl:"%{BKY_MATH_MODULO_HELPURL}"},{type:"math_constrain",message0:"%{BKY_MATH_CONSTRAIN_TITLE}",args0:[{type:"input_value",name:"VALUE",check:"Number"},{type:"input_value",name:"LOW",check:"Number"},{type:"input_value",name:"HIGH",check:"Number"}],inputsInline:!0,output:"Number",style:"math_blocks",tooltip:"%{BKY_MATH_CONSTRAIN_TOOLTIP}",helpUrl:"%{BKY_MATH_CONSTRAIN_HELPURL}"},{type:"math_random_int",message0:"%{BKY_MATH_RANDOM_INT_TITLE}",args0:[{type:"input_value",name:"FROM",check:"Number"},
      +{type:"input_value",name:"TO",check:"Number"}],inputsInline:!0,output:"Number",style:"math_blocks",tooltip:"%{BKY_MATH_RANDOM_INT_TOOLTIP}",helpUrl:"%{BKY_MATH_RANDOM_INT_HELPURL}"},{type:"math_random_float",message0:"%{BKY_MATH_RANDOM_FLOAT_TITLE_RANDOM}",output:"Number",style:"math_blocks",tooltip:"%{BKY_MATH_RANDOM_FLOAT_TOOLTIP}",helpUrl:"%{BKY_MATH_RANDOM_FLOAT_HELPURL}"},{type:"math_atan2",message0:"%{BKY_MATH_ATAN2_TITLE}",args0:[{type:"input_value",name:"X",check:"Number"},{type:"input_value",
      +name:"Y",check:"Number"}],inputsInline:!0,output:"Number",style:"math_blocks",tooltip:"%{BKY_MATH_ATAN2_TOOLTIP}",helpUrl:"%{BKY_MATH_ATAN2_HELPURL}"}]);
      +Blockly.Constants.Math.TOOLTIPS_BY_OP={ADD:"%{BKY_MATH_ARITHMETIC_TOOLTIP_ADD}",MINUS:"%{BKY_MATH_ARITHMETIC_TOOLTIP_MINUS}",MULTIPLY:"%{BKY_MATH_ARITHMETIC_TOOLTIP_MULTIPLY}",DIVIDE:"%{BKY_MATH_ARITHMETIC_TOOLTIP_DIVIDE}",POWER:"%{BKY_MATH_ARITHMETIC_TOOLTIP_POWER}",ROOT:"%{BKY_MATH_SINGLE_TOOLTIP_ROOT}",ABS:"%{BKY_MATH_SINGLE_TOOLTIP_ABS}",NEG:"%{BKY_MATH_SINGLE_TOOLTIP_NEG}",LN:"%{BKY_MATH_SINGLE_TOOLTIP_LN}",LOG10:"%{BKY_MATH_SINGLE_TOOLTIP_LOG10}",EXP:"%{BKY_MATH_SINGLE_TOOLTIP_EXP}",POW10:"%{BKY_MATH_SINGLE_TOOLTIP_POW10}",
      +SIN:"%{BKY_MATH_TRIG_TOOLTIP_SIN}",COS:"%{BKY_MATH_TRIG_TOOLTIP_COS}",TAN:"%{BKY_MATH_TRIG_TOOLTIP_TAN}",ASIN:"%{BKY_MATH_TRIG_TOOLTIP_ASIN}",ACOS:"%{BKY_MATH_TRIG_TOOLTIP_ACOS}",ATAN:"%{BKY_MATH_TRIG_TOOLTIP_ATAN}",SUM:"%{BKY_MATH_ONLIST_TOOLTIP_SUM}",MIN:"%{BKY_MATH_ONLIST_TOOLTIP_MIN}",MAX:"%{BKY_MATH_ONLIST_TOOLTIP_MAX}",AVERAGE:"%{BKY_MATH_ONLIST_TOOLTIP_AVERAGE}",MEDIAN:"%{BKY_MATH_ONLIST_TOOLTIP_MEDIAN}",MODE:"%{BKY_MATH_ONLIST_TOOLTIP_MODE}",STD_DEV:"%{BKY_MATH_ONLIST_TOOLTIP_STD_DEV}",RANDOM:"%{BKY_MATH_ONLIST_TOOLTIP_RANDOM}"};
      +Blockly.Extensions.register("math_op_tooltip",Blockly.Extensions.buildTooltipForDropdown("OP",Blockly.Constants.Math.TOOLTIPS_BY_OP));
      +Blockly.Constants.Math.IS_DIVISIBLEBY_MUTATOR_MIXIN={mutationToDom:function(){var a=Blockly.utils.xml.createElement("mutation"),b="DIVISIBLE_BY"==this.getFieldValue("PROPERTY");a.setAttribute("divisor_input",b);return a},domToMutation:function(a){a="true"==a.getAttribute("divisor_input");this.updateShape_(a)},updateShape_:function(a){var b=this.getInput("DIVISOR");a?b||this.appendValueInput("DIVISOR").setCheck("Number"):b&&this.removeInput("DIVISOR")}};
      +Blockly.Constants.Math.IS_DIVISIBLE_MUTATOR_EXTENSION=function(){this.getField("PROPERTY").setValidator(function(a){a="DIVISIBLE_BY"==a;this.getSourceBlock().updateShape_(a)})};Blockly.Extensions.registerMutator("math_is_divisibleby_mutator",Blockly.Constants.Math.IS_DIVISIBLEBY_MUTATOR_MIXIN,Blockly.Constants.Math.IS_DIVISIBLE_MUTATOR_EXTENSION);Blockly.Extensions.register("math_change_tooltip",Blockly.Extensions.buildTooltipWithFieldText("%{BKY_MATH_CHANGE_TOOLTIP}","VAR"));
      +Blockly.Constants.Math.LIST_MODES_MUTATOR_MIXIN={updateType_:function(a){"MODE"==a?this.outputConnection.setCheck("Array"):this.outputConnection.setCheck("Number")},mutationToDom:function(){var a=Blockly.utils.xml.createElement("mutation");a.setAttribute("op",this.getFieldValue("OP"));return a},domToMutation:function(a){this.updateType_(a.getAttribute("op"))}};Blockly.Constants.Math.LIST_MODES_MUTATOR_EXTENSION=function(){this.getField("OP").setValidator(function(a){this.updateType_(a)}.bind(this))};
      +Blockly.Extensions.registerMutator("math_modes_of_list_mutator",Blockly.Constants.Math.LIST_MODES_MUTATOR_MIXIN,Blockly.Constants.Math.LIST_MODES_MUTATOR_EXTENSION);Blockly.Blocks.procedures={};
      +Blockly.Blocks.procedures_defnoreturn={init:function(){var a=new Blockly.FieldTextInput("",Blockly.Procedures.rename);a.setSpellcheck(!1);this.appendDummyInput().appendField(Blockly.Msg.PROCEDURES_DEFNORETURN_TITLE).appendField(a,"NAME").appendField("","PARAMS");this.setMutator(new Blockly.Mutator(["procedures_mutatorarg"]));(this.workspace.options.comments||this.workspace.options.parentWorkspace&&this.workspace.options.parentWorkspace.options.comments)&&Blockly.Msg.PROCEDURES_DEFNORETURN_COMMENT&&this.setCommentText(Blockly.Msg.PROCEDURES_DEFNORETURN_COMMENT);
      +this.setStyle("procedure_blocks");this.setTooltip(Blockly.Msg.PROCEDURES_DEFNORETURN_TOOLTIP);this.setHelpUrl(Blockly.Msg.PROCEDURES_DEFNORETURN_HELPURL);this.arguments_=[];this.argumentVarModels_=[];this.setStatements_(!0);this.statementConnection_=null},setStatements_:function(a){this.hasStatements_!==a&&(a?(this.appendStatementInput("STACK").appendField(Blockly.Msg.PROCEDURES_DEFNORETURN_DO),this.getInput("RETURN")&&this.moveInputBefore("STACK","RETURN")):this.removeInput("STACK",!0),this.hasStatements_=
      +a)},updateParams_:function(){var a="";this.arguments_.length&&(a=Blockly.Msg.PROCEDURES_BEFORE_PARAMS+" "+this.arguments_.join(", "));Blockly.Events.disable();try{this.setFieldValue(a,"PARAMS")}finally{Blockly.Events.enable()}},mutationToDom:function(a){var b=Blockly.utils.xml.createElement("mutation");a&&b.setAttribute("name",this.getFieldValue("NAME"));for(var c=0;c5S_413-^&w3C0*Djhb23xn^V5J7*a`8)ASWpJ=BH$)Wu~SmB<7_k
      z6s6{7Rsh*al?v|p`RO^S3Z8k%djEe
      z|8W7JU6wwMzOKf4mKH^fXJM`pX;9&~;>5tv0CLC9h9lfCiIGA>B1ot=-=`$KfxBg%
      z!2xvxQN{%u1ZVItq(kKX|Nq&bz`W(yxy6|b2}}%!60c^lW>9qJNYT78cK7X1G`=?E8tc&Ve+j=v1Tvih0*@(UOg
      z)*t^hr9ta#q~@}-;m&2rD@0cDT)bT*!L`fq5ld(5;h8Pk2Y6UQCK#ON^K*&Q;bhss
      z9BrK3;2d=3SdT^1nUz-!lTNNk@Mmq?@6Ud%@A{J`(*oW^&e)mc81_B)Si14_drS7G
      zzq-2c_uuE{Khk^7tTS$rj-Ikr)v)XCym_1Z3znXKSJt+4_U@f=e}9{n-@o_q*!$1_
      zEB<}`ef{>-}am~&Ni$6GlPLakVQmBho5g+#P@|YVu44#{>+Kski1s6Sk9!K
      zfj8soyG^C-EUk(PA#6;{Q6^WIn`c~D`^7+Hh82hGUKz=t+05gThWnaIbh@zJJ~KkT2if{=by{
      zTQ@IoW{I(Pu>SSez~uDu?f?G|PglO@n5t)*8uVuWesE08RaG}_le~O;$&!upuPt3#
      z8=v`Re&nesyE{%Tj?H`UbN#;vFNOjJhOlWaokA)e6P3DTmN+f&5Mr6SvEXOSJm;zB
      zK{3S7d@XXazRmOo4h9AjU^KF=ZEbV+q!+WU9HsZvvK=+^CR?=u0PulcRlXv+U&QSpI=?S
      zCH&&rkF9I7s}8nGoo8jOQ&`u;r3EVh^^8^xAfUf1KrvLqe1L&*2{3~xKx1eCLtxZu
      H^bi05jng?>
      
      literal 0
      HcmV?d00001
      
      diff --git a/blockly/_pv_1_4_0/webif/static/blockly/media/click.ogg b/blockly/_pv_1_4_0/webif/static/blockly/media/click.ogg
      new file mode 100755
      index 0000000000000000000000000000000000000000..e8ae42a6106dadbb6861981a696b7f8b8f64c9ae
      GIT binary patch
      literal 4865
      zcmai13s_S}7QRu01OrA07;JQJkQ8nJB?w5^vgIL#1X3gS4T_I;7qX~&LkdY!roq9>%9EDy)D25XYk`Pxlv((8**}U
      z#o1|alvoJoq=LU(L2_mm9Gfpr$-seG>w~#rfncfM67Ukt;WA^nfwB3?l1y>FC>IQc
      zMzh&r?{Z@UV{>GZ6j1=YH9tQ$V9lCs+qSLF6-skt*+S{+97)<5Gr1<$tZ#FsShzVS
      z75tg>ZI+_?V0MmBoGKOx;pA)~ED>di-v_i{I~<;qla?uhnb|3;F^kM*A|au17zhh?
      zK#zj;MPt=G2qHkx78k^}HkFB}70qtj8x#>JrS~dtP?YOQDV21?uN~|obbufWsK^ah
      z)jGpWA7P}CT&pBa4Dq}E$6>3An0pM|UUfK=9WdBSh^3Q|5Q0U;mm%#95+KTK77P^uGokQ9MCKXd&>8ZzahK@t
      zJYwv9$Jd6%a@joa$dcjqkyK}B2>85OY
      zs&IPhz~*J8e+1TVnFE2Ok(+W-A*iJHtBT(Z!I=a6Yv$w;`wx+?9&(B7a$!$+T>H)^
      z`l-*jeOQbSJJum-+(CBTQ55T!blq2UohOR|R`d6)D*0?0pyt%zTtz4-&eDsl~#rhAKv$f)QL&fp3irKO%xAJ;%
      zxl((fC3CQIzW4vO-!dm$;sP4ToG^*YYngM2P7Vdx)aAi`YPKoAo5T93;sexmRj|$F_D#%({#bDASwJxmR74-3
      zUm;0Gm{*(DkI->P6ax%bb?pQb@vJAUMX2p|DGyYw6U?h^3Q}ankv6-OavfL%S%Kf;
      z=CNuAOb`)*1bB`$Qlj9DAT!mRLHa{7hs8LqiXCBKSI7tHmPd*Sh?*Qbg7lN+!@&<#
      z#bd#45CmVsfM1B4k1z}(xI*`GT}EqtB8k*U`>;`>Xv&^FRp)cf$2W${8?xt3a(QH3F_|s=jcu
      zF)OLzl_)mRB+8FB)#DqJ&x_%S61cpC0#U+qUc9j|5^!VLw;Xu99^S2IS-kqf`}w@2
      zc+suryadNxiBl!_e<-|9LM2a4$^bXnC`vvjn|2c`#px|4v`ROvR-^67(st?+TjsPa
      z+QF_gZD+?|*Qt}8ne%|#c|zOeq1Aev?CN--^_cHDq3zWTcAakQJUQR<&Eh_f`QBV@
      zXXnYTCn&d9H*d(B@AcZ*jtsS*eB7()?aiL=%^U8?BDZQEe@Yv=e0s3!oB7@~XJwQa
      zp6sq7=|McOBWv@vqlwQ;y0ZTIneN3P5HRsC#%K=t0$BD@_8VZ#@YMb7WdAC4niA|(
      zt83JrobSqZ@9UTkiQyF{)rqFpB_%A&o?cg#ICY>!`?!}j^eIq8|H6<%{@9D0bjJ@c
      zj&$i37p4q6$Bky(G331nc<_U)^%Nf0e-K~;gJQ#eFsPa0zM#k-16fjLiLnHl9?mCl
      z9>Z;1x+O*WE=x~VY+$8R6gOxFm|MjhP}SP8wjzoNj#aaI11qChVdP|-X}=-(2i)e!
      z5_>8p_~{zM4Swa)6oU6`n{b4QQ=df{K-6qgn{5b7-A0ULdBzO`Ah%8gM`+sYVwsw5
      zAWGfl7|Ejd5EHZMMlx8@W|zoB48+(hPlIxm0S2P3qRLG=9yTa|sKdoIES9dWhBK_H
      zMMV`?v6x6t4J!)lip4rp!r^DqjVey2FW40jRl~~kH1HFnx@83ZV$-g4-EkS|Is;Hn
      zRg)rFXSy9TvgtF+Sz;ZkT%&hPtOCkoGkn{P=_n&HE6}KvvUJ89oCAQ7l67%Xx#OE(
      zEf=JF8jJ!Rs+@MFt_CQdxy`R+C?*6zR1K#RtVqnf&|aSo7)s9m?wQ-tOy3`F@HCpG*v^l>Od!G8h+
      zXk_{p5CE(U{7{xozcHheqBaUTe5U}2yJwUcEWpUPb^(IESY!pAUie0spDPJR^AVbi
      zD1w0-E9s>~K?QwQ6^cdl4WPzpC!wVW_{gI5M`bpInXiiU2J`D{HT&ASP=X);J|LqNeAZzpheM;P>(Qg*
      z2A|~#WLr_yMov1=5`a~oy@9H_861JAjr{$dAmv!#RZ!_$$^ldKHw7K^wh0c%Pf|(;
      zNFaU&*m{O1(rpw}b_4%|6T&Fi?`z~QhVEtOLPZg$^GfU5KDs=9&lGD4D7HgP-bOD5
      z91x2p6fKnXEPyH$BNRCZgLzC|{o5EJVAc#R0H|5>JjI3(6ST0+U<_FSK;~wmsDQ$m
      z3pf)P<#wQyQvk{4F@+t_VJhzw92AkjH7LUbRTG7ypzbnFrkK~FwIG1#Li7|~HRsYg
      z=$z?u|MJ2OTL)NB5gvl_Zl=#8#sOHblGjJdt0e@%>ZP0tM)(;~gp-~$si3Qgv7C%K
      zm7p>v`bY|k-q)dsW4RsLJ0a=lE*J*4Ulye}(Z
      z|4`ZVZ%wcniLe7ykR&P;Xa?3ye`rmfS;o8fNIphV@Yd>1J*zERk$4~57Gpga
      z<=6cB);VnYXJ`C7J-0We)Xha7T8y`ysj?3xx%%H^I3gFj%U+UniJ@KJCqCS5y>rni
      zlFjm)`(_I{MUkWvtD~$=xYzDuC9nF6h4|+M%XODn%|A6R!(={t4+r&aqtvTDTR6wt
      z(E0g6;iC!CUn5Q=F;lNCeU$BW|GOmSroE}z?jKvqe=MMt#x1$K^JVRVO9UB`AAH+?lzm%p
      z1{*OoyDC~2yvA{|wBY%m$HfoEr(eFDn~YrWN#O44%&c#(*VYUW8=}3SZR50+b&>qM
      zxcCR>eP4+5OETUHu=zUuse4@FjUC3L8u14ODJ0uU>gIE|zX`wiY2M#!by-+9-^KoO
      zeJ}QBQO_Ma+Ub;B>A9{pn|5Hj_BxTTyL(j`e$?g0&p8<2ox_Kd!;juM{mwD$hBLOe
      zpWo-*oe_@yVnOE*4^^(d)lrW|-?kAh+P0$SyGn*^ho|&;Rtx^%
      p7k4FIZ@TV#xbK&J-v%`HU5P#@S^9X{;VrAfeySU))r708{sTaExM%T7p^9ndf_EzHQ$3of#W9Y}f@)fC>4I3RdDtcslIgiiG%1X;f4SFXnB`9;I9I~b-
      zrOyo-my?z}N3M(>n_!iz#^ofOdL$jp?qnQ1dpf|4>)g67Yd
      zo3=>Kr!NkQ&CEjjXKl#}$p10a$V5G(8wK{$@Ms5jfg
      zCMe65Y!=5R8M|9{nFh1f@H+X0fT(NEuDtzh(?&i5>(uCyEx*a`2A+3pL=ew
      zJ;KpB)FYwl-`5+95B~h*a_z&Jrol5SE
      z-;;|EuE1x(hOgb1e_IE^OgtylbCY
      zHRnb2i_FR}+fJr>1^K76a(Sj2^0oKv2kc&&AKhjx@rw0f?kicf>yL)OnlGz^8~eG2
      zQcp{r+coQU!8lQOvE6HY^eW1E5Br+j-A}tOu*9=pwSzXlrnKh2oXHq(EVX{`
      zcEdcJUE&>G>m1WvLjRr&R92fzrWfo4&eEMm1o@yqaN){Q6##71+Ch)r6M;odo>7B(Sh^KSdF7}Ad
      zC2b)MCt@-N;5Na;dwi+x(!SMKidoQuzF^tP0OM^X(ojRjpk3dr4bn=qX?!3ag9&6a
      z`HGAow_yN0!3G=wV<8;Ma2<9*1J;Ws@mTmtyBB#z+R~rNDDnXeMn$yZEA(W2vp$il
      zq7$j3UmH|qq;Z7eqE;Bj!?Z{>MV+OodNMAj;YzOYnsSUaLO=0X>#Ca7f%*;ngT7

      ~Kv18<{tYx#Fqpj22d0W|!J;axGqUq#0ju4-7Dk3onMvxkUB#{h-^Wq$Law|@T zTjT~s$)xQh1`32P|6H%s-{y2? z_zgDUY5W{1L_!tr!|j-cFGYb^B7T)S4#5+$lYUEIkaO@co)BZjFmXa;;#?R{@<|!k z(I2OaFmY7WVH%l7f1?Ewy@#=zn8%m$5HVJs*ll`@g|nrkBYN_y+6HZr?khsTm-b+N z*<17=grh|aF{vBq}uRHE|4vv3C@q1S-IW zz(q7lE@gZ=Cb}_ivVOk6sB0&$=iZvUr zfOK}x;4sv%U1YD&w0yNptx*O+O++NDtP^aEmRb@jykc?xh#&UBn$6MB?Z+%IF1{jzh&xewMElNAM{;Cb@Ja zEh4Ao+3&`AScG9P3;MuKoPb@i6~2v+Fb^JsfwUuCNqbTXn_(hkLjlZ%1{{jdM3tC= ze_{x%g6pscJfJH^i4s0Zyos&gZ@5Sn(oMAdpWP6KE5t&HxVu;igdUalOJp`wix>Pj zZ!J7A7p(Lxmd9RWA=E^CAqH2AY2u=oj5o0Z^acwY#HkpI^YNHO=R`OG=OG?;V7SaQ z0XJedh#)QKWLifCla=s`#6^in!fo(18A6xQN%RcaC)L5hyYpz?z@1_cY#|HiT56;n zNEdihYSS9whR<;`G(j1hg++i86#=M=R=5z$a0nDbAF_d5AU}~j(vo~6kytEOjF;s>G4Z4zHB$AZF3aG{5cv2*Z@#2m+j76}YMADvgCpiU6aiB=%akA#s_&S+J|EBxt zJ#ts}KTq7}ErdUwgIL;zxv|;wJ<=cIFkd3MS(M0H9MD}>w+-SkSS;lmc@L2&QJh4- zV1KbT>L_(u27`{*l-j0l8I!zL`qj!jRP^c36+(IVK>r?eQJwlY>C*&l3joqSuO5a^DRfLOl;fn$#^QEG!CUx+Z zRJ@xaTTBtXL{BkND%pGJC(%VncX^|PlJ})r4#knU8Vj)sBVj9?gY^>WQJ5r(`A%NV zFNj(UBtbO4X?WAt=1SWwJGURPZ?&Ja?{Q30?c!af$}P?N8y`RKjUL%FY+jdf>6iFU-b(BWZMZ8II+)C%5-x*G>roK}NdiRF$dR#`+p!ce|n z>#eEUSG>Dq9-;9p$?&#PqI{-g84~GAJf`?QN+xa9Gse_&oB3VU_Wg@wn2J z-NPsPZZ*o4=z6J+=SSc-!&LJR)&*{Zt-a*?KLFFT66az^f@81q4J}zT5sOk`++zwf zX@;{TR9sS{oZTGZjv!}ywO(%vomif7z<5r+WzMo}vI2cYF2BN0i&6|GGwE1%i*060 zs0TTXlSHFlqlIZ)&DYlGcX% literal 0 HcmV?d00001 diff --git a/blockly/_pv_1_4_0/webif/static/blockly/media/delete.mp3 b/blockly/_pv_1_4_0/webif/static/blockly/media/delete.mp3 new file mode 100755 index 0000000000000000000000000000000000000000..442bd9c1f4c9cee39ca9cc776c7cd594c90f2795 GIT binary patch literal 3123 zcmeHJXH*m07M>&!dX=iEktT2fsh48B1PId6#Ly%{0to>Gg7l^YAtC|_JX+`=MMRMz z%|=4KfCcqIM5>~Qpi&e;ROW`Ku5}mx?vMBDy>G33W`Ad9&EEU$Z_XTRv@Q(b0CEUt zjnm;cq8u|14hsnK_YI^Vf`~!nV4SN3mNU!EF&!;!Z5$eF{&#xRLYqT*Id&|R9OOd` zG(Tc*&tbkC+rlwwSg;q_7~vBd8f1LnKtx1@W)LZa8WukCkYH%o-gs`WQe7$`+4l$5~2qp*kMsj@5D1;@IO7SNntOLC?!LRAvKcf9@ zv<~#9a;ON$-~b@t52$T}<95)t;p%n_ZwI&yoLEM7ruG)Pnns4fkO#lAk)SE^SeXF; zZ7UCz7B9tLH~v?yKN=(v=Ao(A3&8&P?V5oB77DOCAk1_{K7L_V>G{%k=1@Xx3l8dO zEQ;Xh5RJBl0zvil(`Yg2v9WKO`FktsM0UE{FSY4QEWT_XQxf{Lu#@iE>PKaz6z^1S#Kk6E| zG-kc6w!8meF>Y{bCCjCuXMue~ilz2C!X4IBS^mk%roZYV3EJ%*WEKJ4CXdY$UQ4Z)#EROyxblolH`S9mE z2QJKK*G*4-eWTyn(ffXymH0Jo*N+cx#lj%oWXLh=832^!1zpK5Gt?{Zu6~>g=Qj~g z;kv01&+284q4hmg6M7n=LU-_69`#Y6$IHWWue=~!%*zSP3s;u%z(unHZ6oA6>5wpA z0tUusc++ve)J0)^ot6*o<=*A4(6PhKg-GAljOBMKHQ4gC4?a(i7x@ucDN0>VX$46b zs_@PuxW{RY&!YHs-HH!6&(>VsY>jx?(Z1VQ#7!ci>cbIby!@Yaoay>{p&^lq}H#A~FK*Wpum_g(k9vo6T>j89*1Bax3k zbT?{hF?OPO2hY7UaB)<*`XH)mlCdl$c?$Zt#HhLHK)t*(Z)~hqV@I<0$hhCi6GisK zQqs=-E2aO0K*XV4AY z!)OJaCpY7M?urlK8Q0=@t2Y=qzcT^2a?j1DdZgooQGn>Jm3&*B3!-+(yl*41&FJb8 z%B8%lrQDQp^lfz);i~u6+0hrQ!-U4_E0AzUwT{P@C(xp^>g7$30wuI5Qm zHXns9?$9qO{c4Bl;se?U9=>zj5DZg2HdRcIS8=3SR_2nB?){D;FR_fg79G`}9cu4GN#xS_ z*Spjxg7uKy;zd=iJ1eai0tw$HESr@aaK;1VibBOdNH)79IuxFx*KgTjnc=sowdyWO zdL--2d_Pskq{g}N^Uu2^dq0TCWobt zdDo-+Bj7i)?x%kFm6xe+bkX}ZV63vAeH)8yy)9Sn`RKCQbD{H7^;pMaDv&aNv z+Z91w$7vqa(F7jXR5tS9Y%^%s3Iy|29127mmMeD7muocCUcW=X!}xolGP$F6HYPB4VL7_aI(MCd}qs6aUj^1?Gh@W3yLA@0ZwTW z)*=GR(#7yAd~pe<;oqly+u}=$xo>X5oPm`PV=M0;7|ng5ziXP)deG<5Gq{P zV8SlyRFD}Ba3lEn<>S3fCj@-K^~4@gX;D=``xW47B?H~p0+@o}Hz+)QUzwNroMxnk z)lGVO8nn%?1O%Cir7lCA5P6!OmOHWbu%2aEd}63QJr{mofy&9TTS;2wVmyFx{B`Eh m)Y*Qf`iFe0Ly8GZ08$|b00;okqjC1dfB267KmOlbfxiHkb?GSp literal 0 HcmV?d00001 diff --git a/blockly/_pv_1_4_0/webif/static/blockly/media/delete.ogg b/blockly/_pv_1_4_0/webif/static/blockly/media/delete.ogg new file mode 100755 index 0000000000000000000000000000000000000000..67f84ac19a05075a52de49829b3a2bc17af9e29c GIT binary patch literal 5731 zcmai12~<UMQkbya=Ux7sx%#2s1z zeSLnbQ<2iDyGCVU8(<01Y(^MI!h<=~eVuXuCMB-GTqP_2dL%0)9N*9zRD^ix|2aBlfNoisNpYyS00CJUftSg$j*} zi?K2>IdI^>mY5(;bbM40XG=6Y#AKN?VMIr>{H4M{AHwAL2XHvi>^No+iV__Z790kM zfT$o8n;98)5YUW6s9n*~ArVXzDJpOaOm5jKw4J>N3{nK@aV{uf(m)O!f)Eh2UmvZU z7feF)d1Xe23VBWvN@$u<$jcBS1G8|VKRXmY2$(DjB^klF6%(ZJK4J*ckjpM5hV8bj zMk!>vJte|#&20*ds%oiXMfIT#6jyu8K_Fx{PP%F8R7uA;p_`5b-H+PrPTlGf_Dal! z(&H=5I#DSuW^XFmDGe*C`i~auUBLX` z%_g)H1K9vy-ig(|6RYn?)xX0wR*-tQ69O@{p&AR>_+1?Q9nSZl?TT~g;Ow5$nCI8pWzRWwla;Vx0R=v8TrdhyWB3|g__)tbU$X#^wsv|fN%qPx!sOV11x zar#I~Mf_#zkZQ3)ea#>k)0!+%7HI{5d0~S^3N>S1V6FE+(Zq$T>VV4N6&to*r7g?* z3X7V3C4D!E&%la|2gR(ba6dqO3MzSb7cLq5Cwy!`+yX|CqO-?QiClSxx^9(j-iEkS z%6X-@PITplZ0=5SP0AjsmLWgxxYTkK1f?RRDE_mPLU|d*mARRiZlg=RWS>kB=mdk7WC=P5&pb z{>mH(Bu%O`CwYu4+?|q?-FEQh0RNdevFdkDYj>U2cW&0F3>x449q;-9e^1TP4Nq~` z@VloGKcvZYx9}SxFo)>O;RNPb8`Jl4qIcWZgjr6T@sap%GDngkdPMFEr(D^;GpE#u z``nVdk(8_NoxAB!K}beX&6#s=YRXssBXdGCs|z!$Ph?J>;2LEVgk=;7u9io1H%zzx z&-Pd5>|*PK1~SKyt^ZBt+`wtugKTOxrhHho(fS^6Xq@BPZvy~9H*%DmrRRtn6+28N z3{$amn)QFr7{DFIQ-<)svH1|B1wk7@kW&$v>>Rr&YcECIguYxEQNHXpGPN3Eu0&j| z7nfseXniG@*rD{{Db+~B!6hZzU@I53`c~Cm(kn|vaO}xKZV;4&>%`qgvinF~r4D^K z_*q^j(U6}vNJ3)^kmhKED%HRjB^86Du1X%#IrD6#YG6h^SOh76cU9Ryjt0y|9fBB2 z)RpKo9<>iWkwfjqz0#(ViPa_UeMCi_)NY*o*%SntukGH4zN4MmYx}AsWx&=5f>1YL z;I%Wt2RT9rL+ELYet#a`S>3={&9PsdIif}x$;aQt6WnO@9yR(fjs8%RLT@vms8J}h zG`gB2U4uSUK%uur_T!mjH2Pyr`fwZbq2>>s1@YtN6mRe;2Hg0Of<%9Dq+j7zQ51El zC=2>X8^JA(?nY;N)9Bs_Oz(NRr#R6WaNQ|m8gzOaeQYk0UXb`Kj_&8l9Gj2{NrcwIMo{9~Tq3r}E2 zr2m0)zVm6#k=uT$U+e|~1{a9^(b`wRvP)6x!IumO``L#^AUOn38&Buf}1uRE#kj=%^}aR}-Zs*;A2*X8Uc z3$=NB$l!yhe22 zCrc#|VK!MA)JKBzTOP$*5nOvWrOYJSmlZZ;;l1b>c zT(S$;6`6c7jp`GD6PHjU2w+!0R4zFJEAsJmX^ltttdj1kzSV;jUM~X54fsfB^2Jt7 zRupbx9XYICqP#|^>B|Mm-C2Yxakzxx8)+>r;*jgb_o>-{5g2)Wxai2Qe_GB6$BM*^ zdWmw(#r#~LeByym7Lhl|0HSiKSzv{4#MP>TaKI>{o@||Xz=b@i$y4K?#OHLktqYnO7%d59v=zf!dDLj zzD07B?J!z_eYQsE)IDSjIt@W48Sp{9y;2+0a}fhPFKw`)<#S}e5<>}>j*6q1VN_CG z$c8n^z@zo?01A9zuTOY=%czZFeVW+J*#JNxxc+vb&t?dE3pVstdX5-CISP;svI6KO zh9DTd#Mjz*a58GADq}+-=M%4nja@& z@Te;x2onP;q9(T>&hgWw;LKbB9g>`xWTHYDZzo!W;^k6-I$%-_TM771=pkY7eBPn} zG$IHI2mmXQk3G3w=*4Q#<%=10gb@JZ)`=n(88BFPuR_oxIR&UmX1$|@Arg+k2T6@c zLIF2s;nLL^nYhUkdquRc5Y#wTNJ;4dezKDKBMUIVrwA~JliHH5gv0&2F!`GTH;Df* zq6XAiDjwi(EkdqWT&~J@s!BftBfb{th0CAc)a-v(@BfYRWz_@7ecM4czpPY%mK4@| z?6O3!TV*V<5dp3;$c{p=V|ks_boA@WR1lsrdot0;0H6eo2JitH&GR9j;ZUg<1Ac+z z=(z7g#sb+227EC!9B8pp{TYsUQr?W2rfRjUlWim!Sm!HMu;Gx5rKjEyXf0hSmWfGm=sU zfPyan^XA)Pew_GLlnx z<7@qjZoLTnvs*HILOaP&k`e^Pj)qU8#hoZ&Nos*}Y7QI0*rGzsB<{M%bkY(chj}=@ zx;vHix`dJC=6W`ejO(c5d611xA0K4bwI=j}%PvY0GDYZ`C)>c(k)1$Msw^5RZMrdl z+bb*kQq^pw(#kujoWU>|2$9;UbozvslB${@xtw7IdF|cbsgR_Uo!xSB)oZgGa(<8E zQK=|d-4jBXdQMV`TGYYkt6i_$gj+fCm6z}4FlYk=<*r8Q=@k*V%BR-kAWo~~s^+Qj z0DK|nDJ*FXl%y|r;>3wyZbion8GVPK)XLj0WeuckNvEi|d{vQ^($c%T>_L@fw&dv~HI5XBh^yWBcWoiLfIa%=r^ zMtlX?5`SnuEBy^|;8NX((LLF5;R}{0pV{XH^G3$MpSXmCf?$oi&fH|KP}pW8`{Qc4 zKhBaKmG_R8-8A>WTp~XuGZ{3k?x|h{;qU%1NJ-1zb^S^!EqiW@j7{480+_18@$Z+8 zJ$@X$-6}sUoP7CRXTlE)Ew9%oRX1G9d;gqgc(-tNH&+P?(rTO=jXr*6h0AvZUf;KU z3GTzs-{trJ`*42RcW(T;&!s;`E*;b^{@!OpxU%Nj^9nnlW`g!^Erlvsn?>?_YU(Ga zT|HR%eXpPQGE-3k#5ziLcS*(7kHe2p2R;X1IC{?F{IjLGCHE@jMw2r)m&ShowDfA` z!g@O!?P-mhad);|_<`^IT~5jwn|CiZ973eyVII|iinxMJr~Yvi z3iI1ku@<7uG;Fm&466?IxD>)hnr4b?-(Q&Br*lrL=l2cAYhq`Zf;WE@-*ic6fFfWA z;Hpq|$|r2Hi*eSLi6IxyH=Gu=^Hx9k&YHxTKHl{2ExAzXug8V6mMV7_KOd71l54b0 z+N`x3ckiTJH&J7K-<*lxSYKP@sdu*8F^yh#aDCdHp@_sxh;kjz55v2zh(^AKr5U$cjWPrn9VL<_N63e zLT`BwArth|^Zmou^xorHnjF<#o_kN@Kh2H77Zjcygp9xZaAT$`h){=jl)te`bCGQx z>sIrU9Qx(M==|)b7T(~ovys;jN)>W(F#l&RR=Fwa$vNU%dMeP0p6s@vu7CoUZUaK~ z%~+WaBUgHIw>>QQf_Y>gc5DUhOT#Yf&Z5oP&8N}kHhO~bd5v{?N)Z9h1Bf~GSGQ-lb|*aYS|sWn=WgpR+|J*m zLA;Bw5k$>x8|RwBA>Qg9*)=A0E6Znw?b<&lCodU~CH^w{pzFD-!Gn>hsN0dT@`vaP zC(YHCtZQaBQ9?Xe-@$InIinOsvJRDv+q*TE)?b?YZI8vX>fHui$JlEhZs~Yvv5>Ma z$Ho4|wZrh*=zg8=s8HNYgX7yhL8Qh+JDHvA7eS`tX4180(lPl%OKaZ8`!41jM7!)z zs)e#vH?FW>Rh8iIc;D)7!FB5<;!j21#ls=^GEew#6``wK_s4opB6}aUB|26q?LU0P z_q8k(r_m^r5M+K;4d1}JXQNPCz_7-0F)n7KUX*#thF=Jrvx0SY`ARwp@wW%J9x!{G z_@JCD2OWhs+Rm6Bc5^BVRy(fsc1Ll~k&Lj@tZf!PqJ0a!T0bkJJpB->6@Pm7qw-!A z|C5BAG)46DlMq$N+SlXe#G5}Hyxt{uUz+CwLJ=arw{@GUiq;MoPsRVVd@jnKJDb6N zJNC{!%Itixz-0Fyi%tJj#)YfU`$$#-1uyocuBTLo{Bg0$<5d3%wyK}{qo_r!>P*?%2`8@z*%I5vsfd(Ix~S`4B4u7p z_2+r)Y&=Zxk4wLa+d;UzP(6R#z3%8E)djT*1LZEK^FyCTC-D$Zr_pAcv2KdVmo}R> z!zTOMCJ62cUoH<#e{}c=uZg++gvy;U9-ZjOhqDd|?VosUhwxgBhUc6xTyGYZg(9C~ z-d`-562E+s{(8vL>Bu9iGMi(6eBb0bfTbPdTz?C{?f7P!ucGnl9+{uMI6WTV{rou; vR`?Wo(2Qg0ZT{g!$8~yn$d@jH=kr;w_lFKSxWQO2W1GLb6Jt_4yA%39fAVYV literal 0 HcmV?d00001 diff --git a/blockly/_pv_1_4_0/webif/static/blockly/media/delete.wav b/blockly/_pv_1_4_0/webif/static/blockly/media/delete.wav new file mode 100755 index 0000000000000000000000000000000000000000..18debcf96d6f76e36f295feb6de2f09dffaec1f5 GIT binary patch literal 9164 zcmXAu2Yip$_s7qDzDa}-Dr%Jc>{XkXr6@AY+M`sB5G#loTWQP)MXjn$P^v{yVr#9^ z+N<`agpf$`eeU_c_5bRtvcAuK?mg#oKA+Dyw@pN7=+WXL9UFFN(r3`{BDqAw@L%H} zMW%N$;z%xO9?`a4BEOGl8QLnMWy2QlKhr2?#GoMq`$hLHGNi|l$QX%e*ruI7zi&G{ za!6EX zIe74Z?*FaCzkMTzb?-53*x;Dqk-dww7~H#GpMHGPBf58yn8-o>M)Q5o*dk$r2lpKq zStKI5S4DQ#s7+%(-d448l`0~=dkpW9Tuh{>Jk==s!uFI);v+-#qW&OvYgSyeKvfpSiNzigSQ0M7e{Yr*QV;L-YOb2tp95aXHv^Lgknr@%!TS*lw z*QBk~kf}0K{wJSGQPbP`)A4ckn_f;a&l}G`pPQZ!JTuJ;ov7BXaED|jW{mcJ@~P**n7iD4&>l^4i4v4E2rl+2d*CRFKE&wH@8Z-binV_pG<4+t8NL4jQ9DQpp54 zo6Iz+Wwtw)ozNTz2U%T3Qn1dkHtS zq?s*YE9*^ZWq#H{BdMr~uGkYc!8WuN?R`5{HW`o8*IDH>acYo@w7d(Tdn7ADmkH_OaX zGt%sl-V$W0nY8Yr9bfWARQ!Qq@nrFERaK5T4(96GTd}AyCj+%?6kk= z6Md$;^m83AwVjd1N2}Q{^tfD?cbceob*}hJG3}>6Ykx8)a+UXfVID}PmN2!PeUgnc z6_9Z02)=JvuidGiXq5Jpn>tvtkc}{1poOKB+yEJQrJMP{SeU0Uft3kR|m-$TU z6T_ieU2;oR>7?E4HG4pxNupfUe7x(n{I2nuF1<`ka~7QKkqIC#FFPA;3YqJ=&34jo zlW0z`pCOt_L`txuS$f8PrDvo#NZux;rMW)U?J`cfa;ioWDq%882ieV3X*E+@M91)s zmHM{~6xYV+J&88|>O?zC|BwZ;fxo?w2y;YcOI~RpIb}2TAEG<;kk*zeri}cif9ra( z^&7FQDAOf7Yd*J++$y$<+$CdKar(`=G0WazepI47Mz&jO#e zeg)pSPs1}x_(f>e)C(yGeRg~h?OQqRSw^(~S6N%AefLS`K2I;tK0V|4!E8?}oH|pp zd1~98Qp0zK^FQL6!&6u;xy^K-xo>8g+S=AT-u+E-m<;>MK9GabTKC!#`i{6pNqf`P z6ftq2X_F>M4>Q%glBJph45hdS>?~cZr|cR%4wto&6=tDnAiH(Bd?!_;EN7es&&`#7 zri$4BgKX05ve=Y0t#q;twta1V-jH2x>r3;k$8l!rY5OaYnr|cB!aB}uGds1s_F

    • byd!2eCa;2SN@P6|j{ouc39DL8n)mgA(AWS*wl45GVAr)vfIR$9pc?M5}O&^(~N zfh;A;or!ZS{MQ7wZKH=|s);w{q_+N}&1D5RD0h}U-As$X)#MC~r;skk$>Br#f6exRbd+r@BI7dUahejtyfj@e=6NM-SuH!@2GX$8He4YZRTWVeFF zSlJ|H%r%LXHs&vK5p23^FHN(TZA<i-D;w@mL2>c)157QM<~Q@C?1L8Ob@lE*3w6MPC~%mcN!)q*~uK)E#u{H z>Zcb^{YeD`$T=OWS*e*F)Yo;Md2MU!J@P)AoGj&;cI;^@NZAiA9_TdPt|RaZvFOJW zbl|w2QGY&>$lv|&MPubSPO7DFR{ans^2n|M^_B`Mp`oC$l-6a(=QO{345~)3&M)$p zgvdQT0#;J&c+Dz@rJ(r-U0AD2bq^eSjoqhlo_#t~e9UcjwTRDzkuQ-`c(>f>Y-4$( z)pU(smSN_hG?PUA*DkT4HpJG|1F-Wt&Cqr1`&ShFA$56F%dx^jy=7n8u~b|;YGprJ zZOI9mngPT!D{g4H#!&|$=stJ?{T|68KVgGgOB*rfCVOnIcWo$poTtOll5U(n8C(Q{ z+a6%*y-Ft8idqw0ze!I1C40rGfR!*#R;h^+9OT^RsqW=+5ijM3?rj9ajqm~w;g#H= zZ7)vp0_a<)|C5vYJr!RJp4@Jm5Sw0lAI0lMh0cThuBjt&8cY>mKoe6mCo%aQwI7DB z8Ni#KQXvyzvLqX;pGhP>_H+3PO!Q{Oi=1I7?Eg2s+d>|qABV~Ra4=dOHoOE<)^omv zI)a=;aLUnAjrPThTm6Kf5_|B3z$hmGe`0|hv5 z3^h{sKXy3CnI@3kDY_QS^p^^-W<2?iB3cWnivY=Be`R<_brALv2IvPDU4WzS^0}Qv zdlI@4MEsZ0sf;0G6^Z?3*z_A%c9mAql3G?<;n?P&bT3h?nQ-MaIJ&sZB@&4`AAi^Z zHtSAQ{vq#??7k_r9}CN`CwBKZOPD^ihrwQ^twU`jNFzB*2AkmER>3usi1i4W$f{4# zv-#{~2`uK-H^lERd&(Bm_nG=vM~k2NgF2`qgQ$$o)LC&!lP}~`IA$$)JB~^ngnRJRzo`34TD zLpGYDJrh8Db25?0ySGr!xlo=}ct5zWN0@y{8Ls%u{*lDSMu$ z=j>g&gz0Lv8YqjR=Iij}E8>8P$cN-FT&_?zd-ONiPfgt;DnWRga8%}JG_NW=Fw>h~ z%K3%*TrdeXTUz7vl1^KnzD|t!)9g26G|t^*Q&n`jx4$=+Gu`*O`P%+qbD_A~^s>{z zGtkVEv-UeT%%+3fCmKed*2tE1*Vu<>#}Y6!7%nR%bETY_fO5ArkM&zB<~e#C0|VrN zb6??CLS&7UGP&eOs;IDBu!*)c`ASDyHpzXMHcGz(vE5*!^YjNt@MJ&J8*Zi2qv^4C z@U@xDu$$aW>*1VBLBTNdt;u5?F<^Bu?rW%IGjo{-r0P`8ZE*r!aDg{KhFIc>)KnT5HlQ*B8d z{N9&?ybodh12Ezqay$?&86bsCLGxa#eTn=?J!*qF$sF|Mt}P;taV6MnHKXWF`_XZJ z3a(30y@$xdVcbYwyi881iWc7E`IWHQGrGwHobMGPw*b%jf{JNJ?G}KYtC5TQptm;f zjis)8;9uX^C~7#C3V225_B-|V3D^&(hMyAW#pLA#vGJAiOgoanP$0RBLziY!eYNRJ zr=f1OiDgMN{x9mbJzgl9xUYvh>dPZoVvl_ULN3@boa|p}X%3n+*tWPyM!UP< zmv-ZN66p8W!1*ECl`6lCcfKff&G)cYR`lVj&R~-D2aI>!Ueo+$qy&(q1S+;L9dSE+ z%tjoxrKY=rfl_#g>+~FZ;n63W#@ZeMf!FZiMg>*1G1@a`!P zUlZSRgSo~IdfPyFpoYrq1$@ghs*Yj`TB`~&)YVB!6! zXDvBm^P!4mrLhLs(Y6X6WjMXi2BstH!Xz8^%uLymdDREq}m4Kjm|T->W4mb7Cz~u z@>C33-V4o5(rnAE}3+U|DX$w7Khr)&5v$G_on7Jib zgYa5;%_q#-8p2VN>3oezCpZ16y~BK_s+_j(+!=NvRa?Z~VD_{K^gXxDsMOA8x)bf` z;*@4qx6S;|Ow`@3x&g3wJ3Z@8f)`ez%ke1fNNocLOr|CxaL%J70F~I!wDbu~JHY05 zqueRXj*GH#d3djr*T24-gZr4T^rUCcLX8LG^aJ2%MN10dUPjAH z+f7@UerBr9v@O^{s13JmI7jJ6jL+>B@k#A;J$8WNG z+B@I&V>YnYFh?-zoSE@duA{J{KeZb=_~W&^Z6{9XZnvjS$z z1a&vy;M%zAn!47V;+Dn3Ez&|%@PM1pU~4_$MoltRFmkjGA@K zIP`L;*@iP~Nv~9z&xYXEpV{h~kKWzaUb16!G~Rl?4WXwUKv#Ye9bjsw88*9}2BU*POpNJ~$FjxB?t@)y8(CZ6Oy;7RQ&l(L%T();;8AWj^yOs{ahO zZ*M=dLr|Jv(;Dn`r2Ah(C${CiZ$`hTagH&X(-yKR_8tBqQn#YdAxv_7wlzbY?oL4yrq?;gY5NymegpR>b2)8My=dp-FnZx+ zWAGw7@GA#k{&ecSIXZQS9_W$`Wy)X36X!fM<(aRinNym@7I7PU_j+4{fM8|`+27AN z#Mk(nV|vFust4jo7?T^ek3cMIZhvmw^eZgO`U(t zBOKEh9QjckxkrxKNp>fluOGjgq}7?0ZY1wv`Z@O;8$il_CL)JXkz35@SL4t9sie>7 z4uXuYv|#2Qhl^V0F82Oli{p}}+8#DVMw(O!z#lYo=6Q}fFPT9WWG1l-%qHpg(i|m9 z(98B~cZfULR*{iTYy4QK47KZ+-G+I5oL1asv~w&Kjly^DM*D{9WYf@DWu7>P%v_Y~FB$5b)l+VL`PM9v)wZX5+RbzmnY3JU^Vl?2 zsb_wbFPW+yq`&G6zll@abhp{v^)?I)uSPfG$>n<7%3S)mA@KHG3394>R&sMOgjd=K(Y;nLce0bC;9y zAr5OCRh2~d(_Z4W3s`>%oBU1pKZEJ^D{V`>(m~@bdW=JE6L!DRv^UeuR!_9&oE)Yy z#-XN1xLX>8#}1VXrk_*P$!Ct@FDs&*SLKXd?md@r(3`AXL1Ra)Z6DbEFve?rB0FK| ztf>DdPB}B0-ZCCcZKu;+&TO!j1UdzsmSz-n*2Vlzzxy@n6pjaS;f55AK%JMEf2lm! z7pMF{o|{c(f@X&y9>FjfoHD^Kb>mR6_xxWsP72yS>9 zp{l==$#Gi3cE%?k!#k(RBPYyxNSC+=Y}F&n=}h?M;@I;TW0LI?ZyYy+HQ=$~@J5dR zX8r}xl(9_g{)b|{;r1|)c&%qjc7jM`Fkk!*=UJ0USbkV*6P^Asy5pKQ*?Yx)VdA9= z{@dTFZ+h9S?rrWAv*8q1aI3oDGtB?0|FkSu{GxqhOtAghdo#U%+P=4*)Ub?J>f_nzyVtL--(8=9o@tK1 zr>@!Tje7Uf+mv@p^i!XY{eJS?*DKy5nT2gpIcVlPYvrVka9g^oaRIlTvi|4%Lyeo- z=j|KsN$0X>0v>3ytjBwF@Z5CTn?8EbUFS}*nQ-V`Rr>|J58B1nEvts)6kL3(4w?16YQE=pF8XzCTQWN zy(6A#p2Pt< zLwY%_q2vu5?z8g2#wU@v8{}`0`tu($D(z z_O!`d=l#&*>mTUzJabp(0R0vgy_UO)8E@m zQ_Mb1wBx<+xIGJUm)dbA$tmG<#3_|9xjkb|2dU}IaF)qo@0yHl?tYlFpDp8ty8U&P z>Fg8eyUBA_1HE;;HZwUrN5&vG5%*g~AG(FCzkFeGJHtH#oEqfErAN<7$HCnoY`fLx zwBH2ZV4p%hA2^Y2hm0i|MVPyEC z{mNwF7PcoH?Kr%aKet9-FvnbDb90kh-i*Z~*5&?W1-DFlZ6Q|a%XHG^etQ@`Yyth- zCH;#Ia-;oOe_`7HObR%?ogTP@OS+JIpJ*z-4Nui}DsqnyV=mBp1j%b|4N6E!4YYgQ zDcsvk<}S4zJR6Kog^Rz9&m5Y0*3I$X)U<|t!@d1BywU^i49l4?(?*Ws-8<`MTbQ~T zi(0%gskp;oOkzebkqTt(W9&JPd1-Q)bhti=X~uFpL3i7ywlV!yb?M9$rLfsezq!;t zgzHR1&Xi(+2WfY1I) R6c)kuZMgU8%=~+f{2#xTwtoNs literal 0 HcmV?d00001 diff --git a/blockly/_pv_1_4_0/webif/static/blockly/media/disconnect.mp3 b/blockly/_pv_1_4_0/webif/static/blockly/media/disconnect.mp3 new file mode 100755 index 0000000000000000000000000000000000000000..8cfaff6c06253a8b9bbe50dc0d5d05c4a25b6fb5 GIT binary patch literal 1586 zcmeZtF=l1}0w$Lb&k!RZLl%ew@(T(w^U@W3GE)@t(|}Y#QesZ7LU2iDa&}0hYY5S_413-^&w3C0*Djhb23xn^V5J7*a`8)ASWpJ=BH$)Wu~SmB<7_k z6s6{7Rsh*al?v|p`RO^S3Z8k%dPufLL`2Zb*8jgJ9D#TfiS*1%%Lj7#ftZPbf#nH9 z1F7IY$pC1VrH`YptFfM?MG@m!m}^8DR9FR^7#JEr?kM%Ux(OyRQfNp73G>`{+H$;s zxkPL2cI_uj3JklBc57@rmotr*p}~Z$azZxO{Z_Yd)K#$9}OR$+G?)epB%pW=1n=9LA9novfgAxAg&B5r3P5q7BqM|4 zJq4D7AL>8#cC<1JHasZM5n^`|XH`Cur-!_&v-`oU`xo3Bym%oMJl(@(rk zz5iKR$jfjc^J0afDaZf+KUaCe<-_}O-YGLgP8~^pYOepj{wS>@uLhL2WnW(a5)@E z;qYN#V4nZ`IVdr%T=9Upo1sI1`QigNhF35D#NOXq7r)0EB=yf3vo1*}J(-=+!+T*82Y~&8rv|a9m(8N=ka|z1Y&Q=V_j-ypvF)=>Ol7 zj&L(y^XzB(bG(6rfx!fnR0DrytVsHHc}i8-zc?)r;_ghVv{s;m3N-HP@+J()|YZPUw6 zn|9ZhUuJ*Q)NgIkxc0T_d*!`?(45zdVWj|ks@h9nmi z%S)9qm8`fNbA{=F@Q4NCr1+^mv3csb-{sYrRKuq0QWCzs`-*~Pi2QdT5?9s1IJ z==PG5{6ZNjD9%~u;^tHui`$awf>2-w+$7XmHPt9V5E_EK7KC{p$rE5EU3#yVk8dU8&-?e~lrL#vY_9vP49 zh1BJcBxd-IZ;wU8hI;^Wj z39OuIp-2^|iEKYi7o4GAKEu3nEhzcR&=lXuYa8N4Vxa_zI&)WrY_>u@TTz+TQj>AM zGVOd##?6|{r#0D(+Gq7|m3N+!)uB4-g0!vSH_u@mfiHJ_!tYqBsqI;UUOSub@|cd~naH!J^Ckp_lu;98(Y%m_n8|xxVY4YF=8i>|fWIJ!2ds25dQ6#vCmR ziYJ0bm7yLE3y&e-(-X#mgxPCe*dxNA*+s zCs+91`Uh>@^yAk*s23j(9_ns6?(ksYWWXHw5*t5eZ96ulS4|4M^d@I-pU-g*OZPO4 z1uPi6Z2{RZPd=^p=)ScZ)}~GA=T8pNp;xav9y~B4cJg}$i|*eVCO_ccgBA539ajud zGokmtxrWcLP|2~M!zTv(mVJ|9Yu%4lYTc!DRu}8Y>hia|kF;^eFyrb&+HH7u^-dxn z*i^pXp*e~m8kz&e&l?AnohUXo9pH?IygLzbIh1UAMkb>c`$lM6ytshk&`3b>p@I2# zRK5HJg=xT^zSg88aLnY4C~zv8+ZgK};0Ti17Uej00;1wY$NhKE)fKC*y-=_I4>QGw z4fR??m}o<^L@e1=QIz(!`u4e+%$w>vvz2#d4`r>a{W-9Hj2r}lM&pP{owR{FYN*~3 zM|C>*dE}JQM-MYE9S%zD4-!s?Uip%j{DgPSH$H_Y6!~Rd^HX26tGi>h6s$Ym4GDHIT+PQ=#*PkM%EkygtX6+h5Q&3vdul63z2hy z%iIFd)E_E*;?yzv8W^-Ze&ve}K#&WKUWtx#B!vi@AtGmpFo`(&mm>zKGd$sS9vJp0 zf&?JQ8gR0Pc0kz}R~)^Y!krItYv;SSf5_0Bpl$HtFApqlj17)H-^3sBdUBTt@!OhI zeTcnDi!Q&|^{U{(W(pj8u1E@kRB^|+A2O7af=g{%C%M#C-55XEbYxn9g*7uaVC*iR zoH;}1wBV9a$4ETTYV^sex4@n60_@P31iX$$5504b*JAEc=}L zPKaDDFX%XF)`ytQ-R8j}bFU?%yg?(G@xKYgmVa1p4zC(Zq#W^?GN{+@5m zp^Jkj&BK=Q{=VbArxpjlST+*6I9zJ(?LF21DM=l+EZWKzhr{3K!Y+56dOX}cJY2ju zTsARS#OyRb{xj$D#lG?WFBXT_pH;I`Bdi%;(lx^Vg50knR$C75L){!%PMomo>H$WZrjSfjhg#L-Fe!JI{Fr1 z!-d3#?|4i*YweP%%`S*LYk@AJaja-Ljd+Y2#awrmY6os*>UQDI> z_#R9*O?b4McH)Y5ot;pe>AE5P3^n@W@-W?WdO^4CMtZ}F99qPJF?UixHJv31z-pn* z=pBcfjPyi2EOi2a+&LYa&~5Y)3AzV>mC5Lzh;s+&8O2;X6IK{~G6a~7E-DJM>DSm$ zV0DQU?vU}IMF*^oRX5?dS`_kf}S`yF#nONF!Gxl={=;3MEFCf-WvKk6;7S1rASN_Rn|rxA!OLb))A8eIZZji z=TPG&_`%)Eq&N(dOvF;y1Cx9Vv)cI-w#h${6J||SU>Il-26=}gY~6+RRu|9ZX;fq@ zM6nHpbH_cv#HgNP80k5*KobM}Vxs4OZ5b->I8H#$WNZkg*@<(o8X7KOn;Aok4R(#6!I(| zwxmPu{V8ndQ^z^NMjAbk7)B?^<>%9+6a0rv9-NF!jW@?;sP>Md_`x>dUp2vph870| z$oJZ-p)u*ENdkdCLSYOum6HS=;fWv|NU|w?DY>fshuh%HT!QQ)&rF=}(XQKu*-%{* z0pdWVZlxF4&YDURbm^a>0FA=P3L3!5mc9kISa&OWSth%*Cvp}*JTR|U;6PAZ8A6bc z-8_)KrLV+q3}#R{yj+J8RVbLTfm=(L9^ft*woou@3*4E&<@k;9U&DhJ!LP;HI-jL{xw7`ztS7~aohei#!r+o{~4`BmJFbv=W z5v@zdkEsZP!!|XON5_qHJPdeyuuXQN0Hj1wOlNP9qHe|}U?zL|!7vCp96qHDk+lR& zvEG#SaE;Rh#3v)C2LdQv0b5suVFPw)!vNSHP6)g7V5B{L8FII{6sbz+E2}+feD~tD zyAEHoAlZ&{Sev{U5a5e85-qH)IG~Ee2ulNQaE@sje;lJlEjXbCfLd_Q)9s9NK#S52 zW7sMHS%{;@h91?Kz&XIE@qtuM2b`T_IvuB~7|+1#y7C{fsOj zz{;4>aZPj)p?GMJHl!rC=HT3s9$hLPa(Mr=vS*-T0`9^n1qr9IHoO_*LT8MDAdM@A zwDnz>;=bzYdfz9))5~*Iqneg4MQEBaufuh_y?lJlZ+1wdklnAoHs(>~b?DI9gUcR9 zTyV?$SdD5>S5}?Xh2B_I?OXi%C(D!1e?X0jH+eg+?k>n`1Zi511_tW+TJN`BYNQ=r z(d2W)R|oJ#kh?BbFCkSyZgq8adD_mAxuro{b2Y{f@4K=cWU`@9oL3cBN8fR^ckOfD z^bzuEPm1|>w_|Q@ksEjs-21DtM9a4bw(lQ$T^5vpsgAwh$FP0t|NZ&Yx3dg=Q~&Yn zAJV=b)&A*9)ZZKS*yVrF=6&{$>m@zWSvjBG{`^Ul@w@NlT+MCQ{&bV^hr2tr{ZT$- zSggN2;y3yIn$b~* zgNLCjQ~p{Ichf39wd%K1kN#Tqj|ZNc_CGQ$_ga3M+4TDSjg^T-Pu*T?{o>qrZ{M0< jxIK41^keCb2kVdh=ifJXu}>c?xOZB5^2z7YcaZ-Bex2=H literal 0 HcmV?d00001 diff --git a/blockly/_pv_1_4_0/webif/static/blockly/media/disconnect.wav b/blockly/_pv_1_4_0/webif/static/blockly/media/disconnect.wav new file mode 100755 index 0000000000000000000000000000000000000000..af5c25447cad1a7ebd705e0f28ffbc4ebec01f49 GIT binary patch literal 1492 zcmcgse@v8R9Djbiciaz^Ls1l@Ugwr2@*^}OGz~%I%0mZ-QkeuC2WQ9K0Y~UYx-47F z)a7)e;WE=P*TBL;@<+^7&eSBAzbaP~Jp?=m9rug(eV^y)IZjqvTYvVv`@Y}L_vh#P zJbT`^z?hr+qY8laS?g9>tKFgj008-u(+0r%#SkE10G3jBX{^8l;|l`D!a0onTPVYT zjz`0Yj0@sb5eq%430ME^iCE#-BZ5a!g$cYvq&iah&z=$Xi8(0Go0ux%n|SX7C&5lI z1!S^vdX^j{_sLm0#1i2gv|}`Hbic39e>I>4+5-Cmoq=NAm z757*5CG~X=Y#yd*dUkOB!04bbG7y*ptMvU-d*g)o z!*Q2mzS1Uuxxu#{T=!<*Upp*}PL;ag*HIUB8G1$YxZt2Kj_vVx_!yUOFg$qe#jha@$x#a7rNLuL`C~edGzGQDJ zRU_KN(#R1xLssM#vWV>l80F&%Ay;)rwO>^ul%Ym;TuGPC1qb|zeybk^)zT&6ga?G} z>K=86Y5~5=?kESO7sfV>d8I<~1^7;|YT9($^qIP)QOogcW|eP;wgiiUheJv7Myfz2 zJXE(tiBV(18JJAZNlQb?!SrBaXpS_j#DjTwi>h6HQr)HM#t!%{GtdTdo}8k+Y(6YU zX554K;?2kaJK3xBfif(o$g=mx9@%UCg$$znP}Z?ij~6^7tvkbrhpLYI>LN{doRHqqlu1AVXr?L-a~hdzSS z;Z}aT%h)j*P0x{5a)s2;Z4AR^^d(mC+c*Q|gH&o)n&ci?Anmjn%tLwjV?2ts!y(p5 zLqtn2(W@*LO0X66pbtfY)IQ>;>Iy84W0v%08u@{7HWWJJIJ@E1bYyKDmz_ zrFY3`VxX7lT}Hqle2=pip__04KZ|~5;S9O-8tEoU)K9->UEmm8Z7ejO;vcRtKX;8W zKg;wO$7`J~m(5WruC`f3rArgZy5QX7CK}5#YAc(B&4cephDBOgraFhrH5{cWsZDtreZ06gynH32{0;NO} z9j^cn;3-8u5_G)Ae{U_GW-~k8u8*mL%Q9^6c6*bRZdjrJa+LmXTW#6QRhg67=(=WB LR`K-RGPP%aOVoiS literal 0 HcmV?d00001 diff --git a/blockly/_pv_1_4_0/webif/static/blockly/media/handdelete.cur b/blockly/_pv_1_4_0/webif/static/blockly/media/handdelete.cur new file mode 100755 index 0000000000000000000000000000000000000000..170320fc281ab02ded109f0310aa180b77e465f0 GIT binary patch literal 766 zcmeHFF%AMD5F9v?Yp*cIl58w|z?Bw6?qT>6zj9Bx!ot!YtV7NVgxDBcCk(s8u)7HX zurTm`K#vX&3+w@$NKXdRz;P$&Z5XzMF{K1mWu^!r$3MP#feGL$h{26T0d9<;Xe$zH zyVWAc`hK=AyHX$`lT`DlMSN-BYBYYUZ7#3struI#()e@6fAbs8EI*J})n~VIF{(3v TWO5|WGG}sm$GKO%-`24&Q~QG0 literal 0 HcmV?d00001 diff --git a/blockly/_pv_1_4_0/webif/static/blockly/media/handopen.cur b/blockly/_pv_1_4_0/webif/static/blockly/media/handopen.cur new file mode 100755 index 0000000000000000000000000000000000000000..da44588b2fa68ee115deb843e1ce6802e58b3e30 GIT binary patch literal 198 zcmaLQu?>Sj429wUKPx#1ZP1_K>z@;j|==^1poj532;bRa{vGxhX4Q_hXIe}@nrx202p*dSaefwW^{L9 za%BK;VQFr3E^cLXAT%y9E;jv63FrU-17k@~NpgWidAYDCB{xzCg$v62`}%y(^E=vS&YW}R zIA_L8olku(cINkc=DV|JXP$Y^G}Nh61N!>ipY&rB1d5HUQ4bI2$I282@AHyK}XVm^?T%-*F?qH)ui3Sa`u+&-jj0bVL zwS>a{9u)_eXS=n3rrYGvYrCUE(?!=C$~~N7r6r**{=hU$!eUp0yVzo-WuZ2a!0TLJ z0iUql$|6C1B7u*(z5;rzBr@u8tsXTG{K)kcu-Hl>Lr)@s-@87KpE%k|B12ESfhpGY zG3;Xh#!4!JzSsi~$FRVUt)wF8i#@RJaGEUzd1)mTL0=-D;U})oL-+S+_w|0zlStr` zuFper(`8l?8F~^4yx#Q{p!sm*rv^cNB7rAkezxBq-L6+#StO{BKd_+bit8;vSCCa0 zY5GT9Vu3rc*z{6o|2R&>lEK-ZSYTb=cIDcOqqBV;b;c*)Kx_XC+mZ<^Xw>uEh1?M3 z(Pi%y>IrxU>dAU7-oha91Qs;wR(&KlOzns-a2^KHg2vO_aMcrkV8KAcup6&q*zG$i z$pr2XgO0I1COn2=!MOfm$0Ig(ombIs%8m!4J6% z9;ps|z-91Ab>Mw2gGZ_Z?{yhGQXP1Y%ixjfz`I=rk5mWV=`whvI`DRv!6Vgyx48@+ zsSdowW$;LKV9hmx)X#9u;NY423}@~tk-6(|=I(Tvn@ePFwwAg1aOR#kGWSdu`sKLo z*8VwelZU<B?g=~xQY`6?zK#qG8~eHcB(eheOiAAE zE)4(M`_JqL@;D1TB8wRqxP?KOkzv*x37{Z*iKnkC`y)ekTZU8^Ck)Z(J+#Hpl_C8`@E!djcq-Ly@x zBTzylkXvz~n63)P!qy8)8Rakc|JeFrpULw(GmRfFOaJ>g@m}$>%6o-+icyuvlA~g# z-8f+KK4L!G`48+3hav)4p7 zzhyRSJ2=bg?S!2ha%)7txbUp$$h`W}H23r#(QStdzbxEfJ7dT8@RqkLEi4oc2y@w8&^UpAiJqTb`*wXihmckC(N^~E_!2Ny5bExE#6ALuRd zy)(Du_(8FG)eqW3W)~e^y#L7IcQ=lf^Y5Ly=2L%Cq3Y=y=WjMq@3mx?nq_!+$Msi{ z_qVCPzL>Gs^~U+0L-RJ--s&>VTfKC@$v?X(HxCQ4NiLkf_T=)i&OWx7p;d1f*Kx8c~vxSdwa$T$Bo=7>o=IEp!bmb&ZTe3@xpU%&bf-v<(cb3=AX= gELw!3AvZrIGp!Q0hRnHAazG6Xp00i_>zopr0ACYJfB*mh literal 0 HcmV?d00001 diff --git a/blockly/_pv_1_4_0/webif/static/blockly/media/quote1.png b/blockly/_pv_1_4_0/webif/static/blockly/media/quote1.png new file mode 100755 index 0000000000000000000000000000000000000000..826583e0ad72dd1424a2ffe9e21a8b653b596058 GIT binary patch literal 738 zcmV<80v-K{P)hppyUq0&_`3K~zY` zwU*CIR8bVizi%)dr%W2FnSNk}mX$CPQd80l=@=9tO1LP9gf>Aze?W_ZAd3nT+6Pk9 zB8q4gJZRIxeo$192pP3d(M`3B=|$fbGxNOndG9^1MQ3#neBSq+d(J)QUf@5Or#j4F zE9wy-zzpWS-|kPDMh6-ZAix6Vys`~za&kJm|imv7ub-TtLCa_4e4I5=UIc=oR zMZp~HHelG>w3R-sf=NDc2!CO_CY#_mUAB7>EzoVZHQ_FSe#`~{NC3zSC#Rbm6>q&j z@5Sbta9Kce=vKUpKxc5ECM?@Y)`jaPksjiTxWXwc3)c%Gy#>t`;U6*3bhw@s=`#LQ zgx|zK7hC@;CdDkb013dG#HfHafZ=eN#h56ZuI2a!d?)%Hf#Ti4gV;lk^&D{=`uAKH z>As_!bMQrNY%+xcO4tP87l0Fr(gz&zW+I^^kw+i4SLqVeU+?i=+xKuriC~HwgdGn= z_h&iBtV2O@KjE8@OLZ0puFhMItm66JPiMSI>{r}(jwa$xtr%TGBJ>G;*cI`RvVMxs zLL&On7Or35l|6!X?J)HV@n-o}p+{V2`o01_tPF04@MVR5#+7#Pn08lp2(l%u8a;OK zp!ISz(Yv&yU9p3`nyiop<}_K~ng$MQvd`J#lr2W)iTQcM6h}31f?4O#I;+uB+-3%Q z`0*cPJNYsaZJP;O!<&(@=W~@+w3!zp^n`Il@%WNyddXfg_AZ&jjk(TlN%G=_dLieUI)}5eKVv-52W;%U3({kc=kzi09cD^L9+|y1X;sFF|f& UTm9BGZ2$lO07*qoM6N<$g0UG+&Hw-a literal 0 HcmV?d00001 diff --git a/blockly/_pv_1_4_0/webif/static/blockly/media/sprites.png b/blockly/_pv_1_4_0/webif/static/blockly/media/sprites.png new file mode 100755 index 0000000000000000000000000000000000000000..20aadb6c4c31f4a46f0a3316241788687c2fc444 GIT binary patch literal 2595 zcmZ{mc|6mPAICr2%r$G9Gq=d~t=uisVbfeWBNdTjj>;KwOlgg3o6w=$VTiUQqA*5Z zqeBNdlP~3NLYQlgzWe@uzkj}e{Qh{qpO4r3{dzs#|Guftj@EE-1#tiX;I=k+7Xf_) zby-wM&<|a|;wpep5Y7Py09EO*O<$-$s}XEm8~}i*1puUE0N@Koq-g-SWB>qM9{@1R z0sy&)yoTe41PidAoi!f#eKY-ivp|VO*tkatF7^LYAPb$`IKfQF7LPj-H#nOY93tH> z^E&<2Kvrjs^Dl@_DIESu)`EnM*Bvjyqg;;QL)~h5irx$z88=G~Q?ZS;dNuY=N~)rP z!{UdRCeJC3|^p@Y^MmSaw|O zqcgnH`mt=(`nwksF1OpdRwptSWL&g;<#Vt5VHL)|uKRA9#vdbF_=0_?$=A_m z@F%rT_!cE|G&D6rw}mnJ1_l_g{vf!~zq1Xc|EB$kXZY!_p79<2K9Yrd(OT{Mb{mHR zIvKG63$q6jt50+|q)^*;#+gBVShnFY)z5nDzRVi4ozb?LsVO@_w2}`s^Nsd45NuI& zhpaC93Xq=!P!5F+t|m_?X^7vZ!l;zS{DCNSO=s(#>vwURfgYrFL(a3IT>5^I1^Q*X z;)RoYq>tsN>gj(j@5Vm}xi@}SsB{RVwp&HMV7`=duNpIAN9DD77D=bx@cS4V-&vPO zs5T{9CdzxiGP{x8MkGN(d=iBWQ`V%DcFT)=J1o)t)H3Td!oc1LAK_<(d3rW6p80;H z#aIj?rO_f63gW^WOh=(%{(Ndk<7FM|l3yoxnrDV*OW1=m7B0}%cYUk@slC;DWXDJ- zbzq}6+noaUhkMwYaDbO3K#1{=500{dhi6mjFD;htRSp}2)l%ASo_Jf3u6|gk06e31F|)O_QAS*Z)CL|=mx)^$~0VZ>4RvI2=-oxLwg~Smc)R? ziic42uNohoj(`9tgiNDgQA$gb7jWL6o!tQebl792!%r&rX2iIfd zwjCA3av?iKJ}2lJ8aH!`0%DB+fVum7^Xn%nzYa~JUtU>O2ppA|Zv3&d&9bUmk59Wz zU5`&9r68bYF9iuIr-eb;&1xz9u|eaG%lNMHX%7WXx1|oiTEa z>5u=TY{rZ?nC7g%a>`NFGkxo57ecI%fnP_0QMi=h$usgg0U#K-lzo4ICX2@=XH+sc z?g*KF0<%eFSi+hfrgUltlJ2H-Z zNgsLbj_fx9j~L$hL?f1QThz~tgbFXL+ABGfgeeV!y6)b(&XBAjndVe&>reu7Pyf=x zBRL88M z)}J=R;=En-&;r8ZUsGq!E5bTZI30ysLn0@>FMiMaxg|*of^qCKqJSvJ z0d>D!A)AgP2XVYFBbH^}&?+aq&<1wvLZ5NZF6a6EL3a$E&MWZh;|@dmkt_PPY2swc z+FZ<9_A}S`S(YM7D3}&ZL*Y5Un?gWzqSNAI^s+V*l+rQuSk)OZIwLDY;!Y&bp^z16 zThcLSRSRV}#c|Rc5zKweZ=hGB3IQi{K@~RcKnG~SYLwuCuxQAB7^l~i#Xn5RuLq`; z3x`vtuuU4;q_@_T}uEHsg z*4`$9M+;xYYtcWMNO>;}oflgzXxnCsdQ{_X0K-Pe{Ar=B2@EJBsZNI*_oq#3H~VyO z1+Z!ok$uzv#fhVV&1M?SNP)52x%dd@WR24 zUs;*7RYd??6)qAX(T^L;oAxHFSVQ#WgHm$*kXwB_I_3T3&DJ&FrTvwioMQ7?w}NWCd{15EH?+j(m|Bqcpc;aWOw>o##G#~R~B zUK2Wj&~kbSK&DkUi_rUF{iq$AEzUzRN$hp^Ov$CFzCgWie8o9+7{CS_K5>u>-XXU?4pmmDU ztF($Uj}mD;7m=xN*ZW;doJicbKz@!Nb9mH-kEnvphMGQMR4LxYt-BP2MOr8}%g{!FKX!$g&pF<7_#5Ou0bt>ToPvvMIf;;DVHCXEYR{K)FG zEnpihSH8kHUn+U2iLU)o$`?z z?v&TgUglV~^_d5mvWG1PRPvjab=@BKopM~Yml!&Z@v1m=-&Bk&>c>i&w<7pjKM_7i z4O-r^YC0m*I}`em?^|CtlgnTzZ-0t#cSAfpe}nN7yeacKvaa!Lc^~0`!h$)k2vJas zVl6|mN7CebXQZr}Ji;q~o8Mu*J6`Z0{e|F3(u}q|9qsQM9biU?3=jY?GB7mVXMovf zWPHL9V`hXlGcny`U|?oou(O3u|5qS1-2Z%F{QnP}&sR_p1myp@;2Itn9qStz0K~?| g>YWb@jw1L*1n7lF2IbBjQV^H`TT4g$QwtyR-{S78%>V!Z literal 0 HcmV?d00001 diff --git a/blockly/_pv_1_4_0/webif/static/blockly/media/sprites.svg b/blockly/_pv_1_4_0/webif/static/blockly/media/sprites.svg new file mode 100755 index 000000000..3f09ef3a4 --- /dev/null +++ b/blockly/_pv_1_4_0/webif/static/blockly/media/sprites.svg @@ -0,0 +1,74 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/blockly/_pv_1_4_0/webif/static/blockly/pl.js b/blockly/_pv_1_4_0/webif/static/blockly/pl.js new file mode 100755 index 000000000..0c9e72cf6 --- /dev/null +++ b/blockly/_pv_1_4_0/webif/static/blockly/pl.js @@ -0,0 +1,433 @@ +// This file was automatically generated. Do not modify. + +'use strict'; + +Blockly.Msg["ADD_COMMENT"] = "Dodaj Komentarz"; +Blockly.Msg["CANNOT_DELETE_VARIABLE_PROCEDURE"] = "Nie można usunąć zmiennej '%1', ponieważ jest częścią definicji funkcji '%2'"; +Blockly.Msg["CHANGE_VALUE_TITLE"] = "Zmień wartość:"; +Blockly.Msg["CLEAN_UP"] = "Uporządkuj Bloki"; +Blockly.Msg["COLLAPSED_WARNINGS_WARNING"] = "Collapsed blocks contain warnings."; // untranslated +Blockly.Msg["COLLAPSE_ALL"] = "Zwiń Bloki"; +Blockly.Msg["COLLAPSE_BLOCK"] = "Zwiń Klocek"; +Blockly.Msg["COLOUR_BLEND_COLOUR1"] = "kolor 1"; +Blockly.Msg["COLOUR_BLEND_COLOUR2"] = "kolor 2"; +Blockly.Msg["COLOUR_BLEND_HELPURL"] = "http://meyerweb.com/eric/tools/color-blend/"; +Blockly.Msg["COLOUR_BLEND_RATIO"] = "proporcja"; +Blockly.Msg["COLOUR_BLEND_TITLE"] = "wymieszaj"; +Blockly.Msg["COLOUR_BLEND_TOOLTIP"] = "Miesza dwa kolory w danej proporcji (0.0 - 1.0)."; +Blockly.Msg["COLOUR_PICKER_HELPURL"] = "https://en.wikipedia.org/wiki/Color"; +Blockly.Msg["COLOUR_PICKER_TOOLTIP"] = "Wybierz kolor z palety."; +Blockly.Msg["COLOUR_RANDOM_HELPURL"] = "http://randomcolour.com"; // untranslated +Blockly.Msg["COLOUR_RANDOM_TITLE"] = "losowy kolor"; +Blockly.Msg["COLOUR_RANDOM_TOOLTIP"] = "Wybierz kolor w sposób losowy."; +Blockly.Msg["COLOUR_RGB_BLUE"] = "niebieski"; +Blockly.Msg["COLOUR_RGB_GREEN"] = "zielony"; +Blockly.Msg["COLOUR_RGB_HELPURL"] = "http://www.december.com/html/spec/colorper.html"; +Blockly.Msg["COLOUR_RGB_RED"] = "czerwony"; +Blockly.Msg["COLOUR_RGB_TITLE"] = "kolor z"; +Blockly.Msg["COLOUR_RGB_TOOLTIP"] = "Utwórz kolor składający sie z podanej ilości czerwieni, zieleni i błękitu. Zakres wartości: 0 do 100."; +Blockly.Msg["CONTROLS_FLOW_STATEMENTS_HELPURL"] = "https://github.com/google/blockly/wiki/Loops#loop-termination-blocks"; // untranslated +Blockly.Msg["CONTROLS_FLOW_STATEMENTS_OPERATOR_BREAK"] = "przerwij pętlę"; +Blockly.Msg["CONTROLS_FLOW_STATEMENTS_OPERATOR_CONTINUE"] = "przejdź do kolejnej iteracji pętli"; +Blockly.Msg["CONTROLS_FLOW_STATEMENTS_TOOLTIP_BREAK"] = "Przerwij działanie pętli."; +Blockly.Msg["CONTROLS_FLOW_STATEMENTS_TOOLTIP_CONTINUE"] = "Pomiń resztę pętli i kontynuuj w kolejnej iteracji."; +Blockly.Msg["CONTROLS_FLOW_STATEMENTS_WARNING"] = "Uwaga: Ten klocek może być użyty tylko wewnątrz pętli."; +Blockly.Msg["CONTROLS_FOREACH_HELPURL"] = "https://github.com/google/blockly/wiki/Loops#for-each"; // untranslated +Blockly.Msg["CONTROLS_FOREACH_TITLE"] = "dla każdego elementu %1 listy %2"; +Blockly.Msg["CONTROLS_FOREACH_TOOLTIP"] = "Przypisz zmiennej '%1' kolejno wartość każdego elementu listy, a następnie wykonaj kilka instrukcji."; +Blockly.Msg["CONTROLS_FOR_HELPURL"] = "https://github.com/google/blockly/wiki/Loops#count-with"; // untranslated +Blockly.Msg["CONTROLS_FOR_TITLE"] = "licz z %1 od %2 do %3 co %4 (wartość kroku)"; +Blockly.Msg["CONTROLS_FOR_TOOLTIP"] = "Zmiennej '%1' przypisuje wartości z podanego zakresu z podanym interwałem i wykonuje zadane bloki."; +Blockly.Msg["CONTROLS_IF_ELSEIF_TOOLTIP"] = "Dodaj warunek do klocka „jeśli”."; +Blockly.Msg["CONTROLS_IF_ELSE_TOOLTIP"] = "Dodaj ostatni zawsze prawdziwy warunek do klocka „jeśli”."; +Blockly.Msg["CONTROLS_IF_HELPURL"] = "https://github.com/google/blockly/wiki/IfElse"; // untranslated +Blockly.Msg["CONTROLS_IF_IF_TOOLTIP"] = "Dodaj, usuń lub zmień kolejność czynności, żeby zmodyfikować ten klocek „jeśli”."; +Blockly.Msg["CONTROLS_IF_MSG_ELSE"] = "w przeciwnym razie"; +Blockly.Msg["CONTROLS_IF_MSG_ELSEIF"] = "w przeciwnym razie, jeśli"; +Blockly.Msg["CONTROLS_IF_MSG_IF"] = "jeśli"; +Blockly.Msg["CONTROLS_IF_TOOLTIP_1"] = "Jeśli warunek jest spełniony, wykonaj zadane czynności."; +Blockly.Msg["CONTROLS_IF_TOOLTIP_2"] = "Jeśli warunek jest spełniony, wykonaj pierwszy blok instrukcji. W przeciwnym razie, wykonaj drugi blok instrukcji."; +Blockly.Msg["CONTROLS_IF_TOOLTIP_3"] = "Jeśli pierwszy warunek jest spełniony, wykonaj pierwszy blok instrukcji. W przeciwnym razie, jeśli drugi warunek jest spełniony, wykonaj drugi blok instrukcji."; +Blockly.Msg["CONTROLS_IF_TOOLTIP_4"] = "Jeśli pierwszy warunek jest spełniony, wykonaj pierwszy blok czynności. W przeciwnym razie jeśli drugi warunek jest spełniony, wykonaj drugi blok czynności. Jeżeli żaden z warunków nie zostanie spełniony, wykonaj ostatni blok czynności."; +Blockly.Msg["CONTROLS_REPEAT_HELPURL"] = "https://en.wikipedia.org/wiki/For_loop"; +Blockly.Msg["CONTROLS_REPEAT_INPUT_DO"] = "wykonaj"; +Blockly.Msg["CONTROLS_REPEAT_TITLE"] = "powtórz %1 razy"; +Blockly.Msg["CONTROLS_REPEAT_TOOLTIP"] = "Wykonaj niektóre instrukcje kilka razy."; +Blockly.Msg["CONTROLS_WHILEUNTIL_HELPURL"] = "https://github.com/google/blockly/wiki/Loops#repeat"; // untranslated +Blockly.Msg["CONTROLS_WHILEUNTIL_OPERATOR_UNTIL"] = "powtarzaj aż do"; +Blockly.Msg["CONTROLS_WHILEUNTIL_OPERATOR_WHILE"] = "powtarzaj dopóki"; +Blockly.Msg["CONTROLS_WHILEUNTIL_TOOLTIP_UNTIL"] = "Dopóki wyrażenie jest nieprawdziwe, wykonaj zadane czynności."; +Blockly.Msg["CONTROLS_WHILEUNTIL_TOOLTIP_WHILE"] = "Dopóki wyrażenie jest prawdziwe, wykonaj zadane czynności."; +Blockly.Msg["DELETE_ALL_BLOCKS"] = "Usunąć wszystkie klocki z %1?"; +Blockly.Msg["DELETE_BLOCK"] = "Usuń Klocek"; +Blockly.Msg["DELETE_VARIABLE"] = "Usuń zmienną '%1'"; +Blockly.Msg["DELETE_VARIABLE_CONFIRMATION"] = "Usunąć %1 wystąpień zmiennej '%2'?"; +Blockly.Msg["DELETE_X_BLOCKS"] = "Usuń %1 Bloki(ów)"; +Blockly.Msg["DISABLE_BLOCK"] = "Wyłącz Klocek"; +Blockly.Msg["DUPLICATE_BLOCK"] = "Powiel"; +Blockly.Msg["DUPLICATE_COMMENT"] = "Zduplikowany komentarz"; +Blockly.Msg["ENABLE_BLOCK"] = "Włącz Blok"; +Blockly.Msg["EXPAND_ALL"] = "Rozwiń Bloki"; +Blockly.Msg["EXPAND_BLOCK"] = "Rozwiń Klocek"; +Blockly.Msg["EXTERNAL_INPUTS"] = "Zewnętrzne Wejścia"; +Blockly.Msg["HELP"] = "Pomoc"; +Blockly.Msg["INLINE_INPUTS"] = "Wbudowane Wejścia"; +Blockly.Msg["IOS_CANCEL"] = "Anuluj"; +Blockly.Msg["IOS_ERROR"] = "Błąd"; +Blockly.Msg["IOS_OK"] = "OK"; +Blockly.Msg["IOS_PROCEDURES_ADD_INPUT"] = "+ Dodaj Wejście"; +Blockly.Msg["IOS_PROCEDURES_ALLOW_STATEMENTS"] = "Zezwalaj na czynności."; +Blockly.Msg["IOS_PROCEDURES_DUPLICATE_INPUTS_ERROR"] = "Ta funkcja ma zduplikowane wejścia."; +Blockly.Msg["IOS_PROCEDURES_INPUTS"] = "WEJŚCIA"; +Blockly.Msg["IOS_VARIABLES_ADD_BUTTON"] = "Dodaj"; +Blockly.Msg["IOS_VARIABLES_ADD_VARIABLE"] = "+ Dodaj Zmienną"; +Blockly.Msg["IOS_VARIABLES_DELETE_BUTTON"] = "Usuń"; +Blockly.Msg["IOS_VARIABLES_EMPTY_NAME_ERROR"] = "Nie możesz utworzyć funkcji bez nazwy."; +Blockly.Msg["IOS_VARIABLES_RENAME_BUTTON"] = "Zmień nazwę"; +Blockly.Msg["IOS_VARIABLES_VARIABLE_NAME"] = "Nazwa zmiennej"; +Blockly.Msg["LISTS_CREATE_EMPTY_HELPURL"] = "https://github.com/google/blockly/wiki/Lists#create-empty-list"; +Blockly.Msg["LISTS_CREATE_EMPTY_TITLE"] = "utwórz pustą listę"; +Blockly.Msg["LISTS_CREATE_EMPTY_TOOLTIP"] = "Zwraca listę o długości 0, nie zawierającą danych"; +Blockly.Msg["LISTS_CREATE_WITH_CONTAINER_TITLE_ADD"] = "lista"; +Blockly.Msg["LISTS_CREATE_WITH_CONTAINER_TOOLTIP"] = "Dodaj, usuń lub zmień kolejność sekcji aby przekonfigurować blok tej listy."; +Blockly.Msg["LISTS_CREATE_WITH_HELPURL"] = "https://github.com/google/blockly/wiki/Lists#create-list-with"; // untranslated +Blockly.Msg["LISTS_CREATE_WITH_INPUT_WITH"] = "utwórz listę z"; +Blockly.Msg["LISTS_CREATE_WITH_ITEM_TOOLTIP"] = "Dodaj element do listy."; +Blockly.Msg["LISTS_CREATE_WITH_TOOLTIP"] = "Utwórz listę z dowolną ilością elementów."; +Blockly.Msg["LISTS_GET_INDEX_FIRST"] = "pierwszy"; +Blockly.Msg["LISTS_GET_INDEX_FROM_END"] = "# od końca"; +Blockly.Msg["LISTS_GET_INDEX_FROM_START"] = "#"; +Blockly.Msg["LISTS_GET_INDEX_GET"] = "pobierz"; +Blockly.Msg["LISTS_GET_INDEX_GET_REMOVE"] = "zabierz"; +Blockly.Msg["LISTS_GET_INDEX_LAST"] = "ostatni"; +Blockly.Msg["LISTS_GET_INDEX_RANDOM"] = "losowy"; +Blockly.Msg["LISTS_GET_INDEX_REMOVE"] = "usuń"; +Blockly.Msg["LISTS_GET_INDEX_TAIL"] = ""; // untranslated +Blockly.Msg["LISTS_GET_INDEX_TOOLTIP_GET_FIRST"] = "Zwraca pierwszy element z listy."; +Blockly.Msg["LISTS_GET_INDEX_TOOLTIP_GET_FROM"] = "Zwraca element z konkretnej pozycji na liście."; +Blockly.Msg["LISTS_GET_INDEX_TOOLTIP_GET_LAST"] = "Zwraca ostatni element z listy."; +Blockly.Msg["LISTS_GET_INDEX_TOOLTIP_GET_RANDOM"] = "Zwraca losowy element z listy."; +Blockly.Msg["LISTS_GET_INDEX_TOOLTIP_GET_REMOVE_FIRST"] = "Usuwa i zwraca pierwszy element z listy."; +Blockly.Msg["LISTS_GET_INDEX_TOOLTIP_GET_REMOVE_FROM"] = "Usuwa i zwraca element z określonej pozycji na liście."; +Blockly.Msg["LISTS_GET_INDEX_TOOLTIP_GET_REMOVE_LAST"] = "Usuwa i zwraca ostatni element z listy."; +Blockly.Msg["LISTS_GET_INDEX_TOOLTIP_GET_REMOVE_RANDOM"] = "Usuwa i zwraca losowy element z listy."; +Blockly.Msg["LISTS_GET_INDEX_TOOLTIP_REMOVE_FIRST"] = "Usuwa pierwszy element z listy."; +Blockly.Msg["LISTS_GET_INDEX_TOOLTIP_REMOVE_FROM"] = "Usuwa element z określonej pozycji na liście."; +Blockly.Msg["LISTS_GET_INDEX_TOOLTIP_REMOVE_LAST"] = "Usuwa ostatni element z listy."; +Blockly.Msg["LISTS_GET_INDEX_TOOLTIP_REMOVE_RANDOM"] = "Usuwa losowy element z listy."; +Blockly.Msg["LISTS_GET_SUBLIST_END_FROM_END"] = "do # od końca"; +Blockly.Msg["LISTS_GET_SUBLIST_END_FROM_START"] = "do #"; +Blockly.Msg["LISTS_GET_SUBLIST_END_LAST"] = "do ostatniego"; +Blockly.Msg["LISTS_GET_SUBLIST_HELPURL"] = "https://github.com/google/blockly/wiki/Lists#getting-a-sublist"; // untranslated +Blockly.Msg["LISTS_GET_SUBLIST_START_FIRST"] = "utwórz listę podrzędną od pierwszego"; +Blockly.Msg["LISTS_GET_SUBLIST_START_FROM_END"] = "utwórz listę podrzędną z # od końca"; +Blockly.Msg["LISTS_GET_SUBLIST_START_FROM_START"] = "utwórz listę podrzędną z #"; +Blockly.Msg["LISTS_GET_SUBLIST_TAIL"] = ""; +Blockly.Msg["LISTS_GET_SUBLIST_TOOLTIP"] = "Tworzy kopię żądanej części listy."; +Blockly.Msg["LISTS_INDEX_FROM_END_TOOLTIP"] = "%1 to ostatni element."; +Blockly.Msg["LISTS_INDEX_FROM_START_TOOLTIP"] = "%1 to pierwszy element."; +Blockly.Msg["LISTS_INDEX_OF_FIRST"] = "znajdź pierwsze wystąpienie elementu"; +Blockly.Msg["LISTS_INDEX_OF_HELPURL"] = "https://github.com/google/blockly/wiki/Lists#getting-items-from-a-list"; // untranslated +Blockly.Msg["LISTS_INDEX_OF_LAST"] = "znajdź ostatanie wystąpienie elementu"; +Blockly.Msg["LISTS_INDEX_OF_TOOLTIP"] = "Zwraca indeks pierwszego/ostatniego wystąpienia elementu z listy. Zwraca %1, jeśli nie zostanie znaleziony."; +Blockly.Msg["LISTS_INLIST"] = "na liście"; +Blockly.Msg["LISTS_ISEMPTY_HELPURL"] = "https://github.com/google/blockly/wiki/Lists#is-empty"; // untranslated +Blockly.Msg["LISTS_ISEMPTY_TITLE"] = "%1 jest pusta"; +Blockly.Msg["LISTS_ISEMPTY_TOOLTIP"] = "Zwraca \"prawda\" jeśli lista jest pusta."; +Blockly.Msg["LISTS_LENGTH_HELPURL"] = "https://github.com/google/blockly/wiki/Lists#length-of"; // untranslated +Blockly.Msg["LISTS_LENGTH_TITLE"] = "długość %1"; +Blockly.Msg["LISTS_LENGTH_TOOLTIP"] = "Zwraca długość listy."; +Blockly.Msg["LISTS_REPEAT_HELPURL"] = "https://github.com/google/blockly/wiki/Lists#create-list-with"; // untranslated +Blockly.Msg["LISTS_REPEAT_TITLE"] = "utwórz listę powtarzając %1 %2 razy."; +Blockly.Msg["LISTS_REPEAT_TOOLTIP"] = "Tworzy listę zawierającą podaną wartość powtórzoną żądaną ilość razy."; +Blockly.Msg["LISTS_REVERSE_HELPURL"] = "https://github.com/google/blockly/wiki/Lists#reversing-a-list"; // untranslated +Blockly.Msg["LISTS_REVERSE_MESSAGE0"] = "odwróć %1"; +Blockly.Msg["LISTS_REVERSE_TOOLTIP"] = "Odwraca kolejność danych w kopii listy."; +Blockly.Msg["LISTS_SET_INDEX_HELPURL"] = "https://github.com/google/blockly/wiki/Lists#in-list--set"; // untranslated +Blockly.Msg["LISTS_SET_INDEX_INPUT_TO"] = "jako"; +Blockly.Msg["LISTS_SET_INDEX_INSERT"] = "wstaw w"; +Blockly.Msg["LISTS_SET_INDEX_SET"] = "ustaw"; +Blockly.Msg["LISTS_SET_INDEX_TOOLTIP_INSERT_FIRST"] = "Wstawia element na początku listy."; +Blockly.Msg["LISTS_SET_INDEX_TOOLTIP_INSERT_FROM"] = "Wstawia element na żądanej pozycji listy."; +Blockly.Msg["LISTS_SET_INDEX_TOOLTIP_INSERT_LAST"] = "Dodaj element na koniec listy."; +Blockly.Msg["LISTS_SET_INDEX_TOOLTIP_INSERT_RANDOM"] = "Wstawia element w losowym miejscu na liście."; +Blockly.Msg["LISTS_SET_INDEX_TOOLTIP_SET_FIRST"] = "Ustawia pierwszy element na liście."; +Blockly.Msg["LISTS_SET_INDEX_TOOLTIP_SET_FROM"] = "Ustawia element w określonym miejscu na liście."; +Blockly.Msg["LISTS_SET_INDEX_TOOLTIP_SET_LAST"] = "Ustawia ostatni element na liście."; +Blockly.Msg["LISTS_SET_INDEX_TOOLTIP_SET_RANDOM"] = "Ustawia losowy element na liście."; +Blockly.Msg["LISTS_SORT_HELPURL"] = "https://github.com/google/blockly/wiki/Lists#sorting-a-list"; +Blockly.Msg["LISTS_SORT_ORDER_ASCENDING"] = "rosnąco"; +Blockly.Msg["LISTS_SORT_ORDER_DESCENDING"] = "malejąco"; +Blockly.Msg["LISTS_SORT_TITLE"] = "sortuj %1 %2 %3"; +Blockly.Msg["LISTS_SORT_TOOLTIP"] = "Sortuj kopię listy."; +Blockly.Msg["LISTS_SORT_TYPE_IGNORECASE"] = "alfabetycznie, ignoruj wielkość liter"; +Blockly.Msg["LISTS_SORT_TYPE_NUMERIC"] = "numerycznie"; +Blockly.Msg["LISTS_SORT_TYPE_TEXT"] = "alfabetycznie"; +Blockly.Msg["LISTS_SPLIT_HELPURL"] = "https://github.com/google/blockly/wiki/Lists#splitting-strings-and-joining-lists"; // untranslated +Blockly.Msg["LISTS_SPLIT_LIST_FROM_TEXT"] = "utwórz listę z tekstu"; +Blockly.Msg["LISTS_SPLIT_TEXT_FROM_LIST"] = "utwórz tekst z listy"; +Blockly.Msg["LISTS_SPLIT_TOOLTIP_JOIN"] = "Łączy listę tekstów w jeden tekst, rozdzielany separatorem."; +Blockly.Msg["LISTS_SPLIT_TOOLTIP_SPLIT"] = "Rozdziela tekst zgodnie z separatorem tworząc listę z powstałych elementów."; +Blockly.Msg["LISTS_SPLIT_WITH_DELIMITER"] = "z separatorem"; +Blockly.Msg["LOGIC_BOOLEAN_FALSE"] = "fałsz"; +Blockly.Msg["LOGIC_BOOLEAN_HELPURL"] = "https://github.com/google/blockly/wiki/Logic#values"; // untranslated +Blockly.Msg["LOGIC_BOOLEAN_TOOLTIP"] = "Zwraca 'prawda' lub 'fałsz'."; +Blockly.Msg["LOGIC_BOOLEAN_TRUE"] = "prawda"; +Blockly.Msg["LOGIC_COMPARE_HELPURL"] = "https://pl.wikipedia.org/wiki/Nierówność"; +Blockly.Msg["LOGIC_COMPARE_TOOLTIP_EQ"] = "Zwraca \"prawda\", jeśli wejścia są identyczne."; +Blockly.Msg["LOGIC_COMPARE_TOOLTIP_GT"] = "Zwraca \"prawda\" jeśli pierwsze wejście jest większe od drugiego."; +Blockly.Msg["LOGIC_COMPARE_TOOLTIP_GTE"] = "Zwraca \"prawda\", jeśli pierwsze wejście jest większe lub równe drugiemu."; +Blockly.Msg["LOGIC_COMPARE_TOOLTIP_LT"] = "Zwraca \"prawda\" jeśli pierwsze wejście jest mniejsze od drugiego."; +Blockly.Msg["LOGIC_COMPARE_TOOLTIP_LTE"] = "Zwraca \"prawda\", jeśli pierwsze wejście jest mniejsze lub równe drugiemu."; +Blockly.Msg["LOGIC_COMPARE_TOOLTIP_NEQ"] = "Zwraca \"prawda\", jeśli wejścia nie są identyczne."; +Blockly.Msg["LOGIC_NEGATE_HELPURL"] = "https://github.com/google/blockly/wiki/Logic#not"; // untranslated +Blockly.Msg["LOGIC_NEGATE_TITLE"] = "nie %1"; +Blockly.Msg["LOGIC_NEGATE_TOOLTIP"] = "Zwraca \"prawda\", jeśli wejściu jest \"fałsz\". Zwraca \"fałsz\", jeśli na wejściu jest \"prawda\"."; +Blockly.Msg["LOGIC_NULL"] = "nic"; +Blockly.Msg["LOGIC_NULL_HELPURL"] = "https://en.wikipedia.org/wiki/Nullable_type"; +Blockly.Msg["LOGIC_NULL_TOOLTIP"] = "Zwraca nic."; +Blockly.Msg["LOGIC_OPERATION_AND"] = "i"; +Blockly.Msg["LOGIC_OPERATION_HELPURL"] = "https://github.com/google/blockly/wiki/Logic#logical-operations"; // untranslated +Blockly.Msg["LOGIC_OPERATION_OR"] = "lub"; +Blockly.Msg["LOGIC_OPERATION_TOOLTIP_AND"] = "Zwraca \"prawda\" jeśli na obydwóch wejściach jest \"prawda\"."; +Blockly.Msg["LOGIC_OPERATION_TOOLTIP_OR"] = "Zwraca \"prawda\" jeśli co najmniej na jednyk wejściu jest \"prawda\"."; +Blockly.Msg["LOGIC_TERNARY_CONDITION"] = "test"; +Blockly.Msg["LOGIC_TERNARY_HELPURL"] = "https://en.wikipedia.org/wiki/%3F:"; +Blockly.Msg["LOGIC_TERNARY_IF_FALSE"] = "jeśli fałsz"; +Blockly.Msg["LOGIC_TERNARY_IF_TRUE"] = "jeśli prawda"; +Blockly.Msg["LOGIC_TERNARY_TOOLTIP"] = "Sprawdź warunek w „test”. Jeśli warunek jest prawdziwy, to zwróci „jeśli prawda”; jeśli nie jest prawdziwy to zwróci „jeśli fałsz”."; +Blockly.Msg["MATH_ADDITION_SYMBOL"] = "+"; +Blockly.Msg["MATH_ARITHMETIC_HELPURL"] = "https://pl.wikipedia.org/wiki/Arytmetyka"; +Blockly.Msg["MATH_ARITHMETIC_TOOLTIP_ADD"] = "Zwróć sumę dwóch liczb."; +Blockly.Msg["MATH_ARITHMETIC_TOOLTIP_DIVIDE"] = "Zwróć iloraz dwóch liczb."; +Blockly.Msg["MATH_ARITHMETIC_TOOLTIP_MINUS"] = "Zwróć różnicę dwóch liczb."; +Blockly.Msg["MATH_ARITHMETIC_TOOLTIP_MULTIPLY"] = "Zwróć iloczyn dwóch liczb."; +Blockly.Msg["MATH_ARITHMETIC_TOOLTIP_POWER"] = "Zwróć pierwszą liczbę podniesioną do potęgi o wykładniku drugiej liczby."; +Blockly.Msg["MATH_ATAN2_HELPURL"] = "https://en.wikipedia.org/wiki/Atan2"; // untranslated +Blockly.Msg["MATH_ATAN2_TITLE"] = "atan2 of X:%1 Y:%2"; // untranslated +Blockly.Msg["MATH_ATAN2_TOOLTIP"] = "Return the arctangent of point (X, Y) in degrees from -180 to 180."; // untranslated +Blockly.Msg["MATH_CHANGE_HELPURL"] = "https://en.wikipedia.org/wiki/Programming_idiom#Incrementing_a_counter"; +Blockly.Msg["MATH_CHANGE_TITLE"] = "zmień %1 o %2"; +Blockly.Msg["MATH_CHANGE_TOOLTIP"] = "Dodaj liczbę do zmiennej '%1'."; +Blockly.Msg["MATH_CONSTANT_HELPURL"] = "https://pl.wikipedia.org/wiki/Stała_(matematyka)"; +Blockly.Msg["MATH_CONSTANT_TOOLTIP"] = "Zwróć jedną wspólną stałą: π (3.141), e (2.718...), φ (1.618...), sqrt(2) (1.414...), sqrt(½) (0.707...) lub ∞ (nieskończoność)."; +Blockly.Msg["MATH_CONSTRAIN_HELPURL"] = "https://en.wikipedia.org/wiki/Clamping_(graphics)"; // untranslated +Blockly.Msg["MATH_CONSTRAIN_TITLE"] = "ogranicz %1 z dołu %2 z góry %3"; +Blockly.Msg["MATH_CONSTRAIN_TOOLTIP"] = "Ogranicz liczbę, aby była w określonych granicach (włącznie)."; +Blockly.Msg["MATH_DIVISION_SYMBOL"] = "/"; +Blockly.Msg["MATH_IS_DIVISIBLE_BY"] = "jest podzielna przez"; +Blockly.Msg["MATH_IS_EVEN"] = "jest parzysta"; +Blockly.Msg["MATH_IS_NEGATIVE"] = "jest ujemna"; +Blockly.Msg["MATH_IS_ODD"] = "jest nieparzysta"; +Blockly.Msg["MATH_IS_POSITIVE"] = "jest dodatnia"; +Blockly.Msg["MATH_IS_PRIME"] = "jest liczbą pierwszą"; +Blockly.Msg["MATH_IS_TOOLTIP"] = "Sprawdź, czy liczba jest parzysta, nieparzysta, pierwsza, całkowita, dodatnia, ujemna, lub czy jest podzielna przez podaną liczbę. Zwraca wartość \"prawda\" lub \"fałsz\"."; +Blockly.Msg["MATH_IS_WHOLE"] = "jest liczbą całkowitą"; +Blockly.Msg["MATH_MODULO_HELPURL"] = "https://pl.wikipedia.org/wiki/Modulo"; +Blockly.Msg["MATH_MODULO_TITLE"] = "reszta z dzielenia %1 przez %2"; +Blockly.Msg["MATH_MODULO_TOOLTIP"] = "Zwróć resztę z dzielenia dwóch liczb przez siebie."; +Blockly.Msg["MATH_MULTIPLICATION_SYMBOL"] = "×"; +Blockly.Msg["MATH_NUMBER_HELPURL"] = "https://en.wikipedia.org/wiki/Number"; +Blockly.Msg["MATH_NUMBER_TOOLTIP"] = "Liczba."; +Blockly.Msg["MATH_ONLIST_HELPURL"] = ""; +Blockly.Msg["MATH_ONLIST_OPERATOR_AVERAGE"] = "średnia elementów listy"; +Blockly.Msg["MATH_ONLIST_OPERATOR_MAX"] = "maksymalna wartość z listy"; +Blockly.Msg["MATH_ONLIST_OPERATOR_MEDIAN"] = "mediana listy"; +Blockly.Msg["MATH_ONLIST_OPERATOR_MIN"] = "minimalna wartość z listy"; +Blockly.Msg["MATH_ONLIST_OPERATOR_MODE"] = "dominanty listy"; +Blockly.Msg["MATH_ONLIST_OPERATOR_RANDOM"] = "losowy element z listy"; +Blockly.Msg["MATH_ONLIST_OPERATOR_STD_DEV"] = "odchylenie standardowe listy"; +Blockly.Msg["MATH_ONLIST_OPERATOR_SUM"] = "suma elementów listy"; +Blockly.Msg["MATH_ONLIST_TOOLTIP_AVERAGE"] = "Zwróć średnią (średnią arytmetyczną) wartości liczbowych z listy."; +Blockly.Msg["MATH_ONLIST_TOOLTIP_MAX"] = "Zwróć największą liczbę w liście."; +Blockly.Msg["MATH_ONLIST_TOOLTIP_MEDIAN"] = "Zwróć medianę listy."; +Blockly.Msg["MATH_ONLIST_TOOLTIP_MIN"] = "Zwróć najmniejszą liczbę w liście."; +Blockly.Msg["MATH_ONLIST_TOOLTIP_MODE"] = "Zwróć listę najczęściej występujących elementów w liście."; +Blockly.Msg["MATH_ONLIST_TOOLTIP_RANDOM"] = "Zwróć losowy element z listy."; +Blockly.Msg["MATH_ONLIST_TOOLTIP_STD_DEV"] = "Zwróć odchylenie standardowe listy."; +Blockly.Msg["MATH_ONLIST_TOOLTIP_SUM"] = "Zwróć sumę wszystkich liczb z listy."; +Blockly.Msg["MATH_POWER_SYMBOL"] = "^"; +Blockly.Msg["MATH_RANDOM_FLOAT_HELPURL"] = "https://en.wikipedia.org/wiki/Random_number_generation"; +Blockly.Msg["MATH_RANDOM_FLOAT_TITLE_RANDOM"] = "losowy ułamek"; +Blockly.Msg["MATH_RANDOM_FLOAT_TOOLTIP"] = "Zwróć losowy ułamek między 0.0 (włącznie), a 1.0 (wyłącznie)."; +Blockly.Msg["MATH_RANDOM_INT_HELPURL"] = "https://en.wikipedia.org/wiki/Random_number_generation"; +Blockly.Msg["MATH_RANDOM_INT_TITLE"] = "losowa liczba całkowita od %1 do %2"; +Blockly.Msg["MATH_RANDOM_INT_TOOLTIP"] = "Zwróć losową liczbę całkowitą w ramach dwóch wyznaczonych granic, włącznie."; +Blockly.Msg["MATH_ROUND_HELPURL"] = "https://pl.wikipedia.org/wiki/Zaokrąglanie"; +Blockly.Msg["MATH_ROUND_OPERATOR_ROUND"] = "zaokrąglij"; +Blockly.Msg["MATH_ROUND_OPERATOR_ROUNDDOWN"] = "zaokrąglij w dół"; +Blockly.Msg["MATH_ROUND_OPERATOR_ROUNDUP"] = "zaokrąglij w górę"; +Blockly.Msg["MATH_ROUND_TOOLTIP"] = "Zaokrąglij w górę lub w dół."; +Blockly.Msg["MATH_SINGLE_HELPURL"] = "https://pl.wikipedia.org/wiki/Pierwiastek_kwadratowy"; +Blockly.Msg["MATH_SINGLE_OP_ABSOLUTE"] = "wartość bezwzględna"; +Blockly.Msg["MATH_SINGLE_OP_ROOT"] = "pierwiastek kwadratowy"; +Blockly.Msg["MATH_SINGLE_TOOLTIP_ABS"] = "Zwróć wartość bezwzględną danej liczby."; +Blockly.Msg["MATH_SINGLE_TOOLTIP_EXP"] = "Zwróć e do potęgi danej liczby."; +Blockly.Msg["MATH_SINGLE_TOOLTIP_LN"] = "Zwróć logarytm naturalny danej liczby."; +Blockly.Msg["MATH_SINGLE_TOOLTIP_LOG10"] = "Zwraca logarytm dziesiętny danej liczby."; +Blockly.Msg["MATH_SINGLE_TOOLTIP_NEG"] = "Zwróć negację danej liczby."; +Blockly.Msg["MATH_SINGLE_TOOLTIP_POW10"] = "Zwróć 10 do potęgi danej liczby."; +Blockly.Msg["MATH_SINGLE_TOOLTIP_ROOT"] = "Zwróć pierwiastek kwadratowy danej liczby."; +Blockly.Msg["MATH_SUBTRACTION_SYMBOL"] = "-"; +Blockly.Msg["MATH_TRIG_ACOS"] = "arccos"; +Blockly.Msg["MATH_TRIG_ASIN"] = "arcsin"; +Blockly.Msg["MATH_TRIG_ATAN"] = "arctg"; +Blockly.Msg["MATH_TRIG_COS"] = "cos"; +Blockly.Msg["MATH_TRIG_HELPURL"] = "https://pl.wikipedia.org/wiki/Funkcje_trygonometryczne"; +Blockly.Msg["MATH_TRIG_SIN"] = "sin"; +Blockly.Msg["MATH_TRIG_TAN"] = "tg"; +Blockly.Msg["MATH_TRIG_TOOLTIP_ACOS"] = "Zwróć arcus cosinus danej liczby."; +Blockly.Msg["MATH_TRIG_TOOLTIP_ASIN"] = "Zwróć arcus sinus danej liczby."; +Blockly.Msg["MATH_TRIG_TOOLTIP_ATAN"] = "Zwróć arcus tangens danej liczby."; +Blockly.Msg["MATH_TRIG_TOOLTIP_COS"] = "Zwróć wartość cosinusa o stopniu (nie w radianach)."; +Blockly.Msg["MATH_TRIG_TOOLTIP_SIN"] = "Zwróć wartość sinusa o stopniu (nie w radianach)."; +Blockly.Msg["MATH_TRIG_TOOLTIP_TAN"] = "Zwróć tangens o stopniu (nie w radianach)."; +Blockly.Msg["NEW_COLOUR_VARIABLE"] = "Utwórz zmienną colour"; +Blockly.Msg["NEW_NUMBER_VARIABLE"] = "Utwórz zmienną typu number"; +Blockly.Msg["NEW_STRING_VARIABLE"] = "Utwórz zmienną typu string"; +Blockly.Msg["NEW_VARIABLE"] = "Utwórz zmienną..."; +Blockly.Msg["NEW_VARIABLE_TITLE"] = "Nowa nazwa zmiennej:"; +Blockly.Msg["NEW_VARIABLE_TYPE_TITLE"] = "Nowy typ zmiennej:"; +Blockly.Msg["ORDINAL_NUMBER_SUFFIX"] = ""; +Blockly.Msg["PROCEDURES_ALLOW_STATEMENTS"] = "zezwól na czynności"; +Blockly.Msg["PROCEDURES_BEFORE_PARAMS"] = "z:"; +Blockly.Msg["PROCEDURES_CALLNORETURN_HELPURL"] = "https://pl.wikipedia.org/wiki/Podprogram"; +Blockly.Msg["PROCEDURES_CALLNORETURN_TOOLTIP"] = "Uruchom zdefiniowaną przez użytkownika funkcję '%1'."; +Blockly.Msg["PROCEDURES_CALLRETURN_HELPURL"] = "https://pl.wikipedia.org/wiki/Podprogram"; +Blockly.Msg["PROCEDURES_CALLRETURN_TOOLTIP"] = "Uruchom zdefiniowaną przez użytkownika funkcję '%1' i użyj jej wyjścia."; +Blockly.Msg["PROCEDURES_CALL_BEFORE_PARAMS"] = "z:"; +Blockly.Msg["PROCEDURES_CREATE_DO"] = "Utwórz '%1'"; +Blockly.Msg["PROCEDURES_DEFNORETURN_COMMENT"] = "Opisz tę funkcję..."; +Blockly.Msg["PROCEDURES_DEFNORETURN_DO"] = ""; +Blockly.Msg["PROCEDURES_DEFNORETURN_HELPURL"] = "https://en.wikipedia.org/wiki/Procedure_%28computer_science%29"; +Blockly.Msg["PROCEDURES_DEFNORETURN_PROCEDURE"] = "zrób coś"; +Blockly.Msg["PROCEDURES_DEFNORETURN_TITLE"] = "do"; +Blockly.Msg["PROCEDURES_DEFNORETURN_TOOLTIP"] = "Tworzy funkcję nie posiadającą wyjścia."; +Blockly.Msg["PROCEDURES_DEFRETURN_HELPURL"] = "https://en.wikipedia.org/wiki/Procedure_%28computer_science%29"; +Blockly.Msg["PROCEDURES_DEFRETURN_RETURN"] = "zwróć"; +Blockly.Msg["PROCEDURES_DEFRETURN_TOOLTIP"] = "Tworzy funkcję posiadającą wyjście."; +Blockly.Msg["PROCEDURES_DEF_DUPLICATE_WARNING"] = "Uwaga: Ta funkcja ma powtórzone parametry."; +Blockly.Msg["PROCEDURES_HIGHLIGHT_DEF"] = "Podświetl definicję funkcji"; +Blockly.Msg["PROCEDURES_IFRETURN_HELPURL"] = "http://c2.com/cgi/wiki?GuardClause"; // untranslated +Blockly.Msg["PROCEDURES_IFRETURN_TOOLTIP"] = "Jeśli warunek jest spełniony zwróć drugą wartość."; +Blockly.Msg["PROCEDURES_IFRETURN_WARNING"] = "Uwaga: Ten klocek może być używany tylko w definicji funkcji."; +Blockly.Msg["PROCEDURES_MUTATORARG_TITLE"] = "nazwa wejścia:"; +Blockly.Msg["PROCEDURES_MUTATORARG_TOOLTIP"] = "Dodaj wejście do funkcji."; +Blockly.Msg["PROCEDURES_MUTATORCONTAINER_TITLE"] = "wejścia"; +Blockly.Msg["PROCEDURES_MUTATORCONTAINER_TOOLTIP"] = "Dodaj, usuń lub zmień kolejność wejść tej funkcji."; +Blockly.Msg["REDO"] = "Ponów"; +Blockly.Msg["REMOVE_COMMENT"] = "Usuń komentarz"; +Blockly.Msg["RENAME_VARIABLE"] = "Zmień nazwę zmiennej..."; +Blockly.Msg["RENAME_VARIABLE_TITLE"] = "Zmień nazwy wszystkich '%1' zmiennych na:"; +Blockly.Msg["TEXT_APPEND_HELPURL"] = "https://github.com/google/blockly/wiki/Text#text-modification"; // untranslated +Blockly.Msg["TEXT_APPEND_TITLE"] = "dodaj tekst %2 do %1"; +Blockly.Msg["TEXT_APPEND_TOOLTIP"] = "Dołącz tekst do zmiennej '%1'."; +Blockly.Msg["TEXT_CHANGECASE_HELPURL"] = "https://github.com/google/blockly/wiki/Text#adjusting-text-case"; // untranslated +Blockly.Msg["TEXT_CHANGECASE_OPERATOR_LOWERCASE"] = "na małe litery"; +Blockly.Msg["TEXT_CHANGECASE_OPERATOR_TITLECASE"] = "na Pierwsza Duża"; +Blockly.Msg["TEXT_CHANGECASE_OPERATOR_UPPERCASE"] = "na WIELKIE LITERY"; +Blockly.Msg["TEXT_CHANGECASE_TOOLTIP"] = "Zwraca kopię tekstu z odwruconą wielkością liter."; +Blockly.Msg["TEXT_CHARAT_FIRST"] = "pobierz pierwszą literę"; +Blockly.Msg["TEXT_CHARAT_FROM_END"] = "pobierz literę # od końca"; +Blockly.Msg["TEXT_CHARAT_FROM_START"] = "pobierz literę #"; +Blockly.Msg["TEXT_CHARAT_HELPURL"] = "https://github.com/google/blockly/wiki/Text#extracting-text"; // untranslated +Blockly.Msg["TEXT_CHARAT_LAST"] = "pobierz ostatnią literę"; +Blockly.Msg["TEXT_CHARAT_RANDOM"] = "pobierz losową literę"; +Blockly.Msg["TEXT_CHARAT_TAIL"] = ""; +Blockly.Msg["TEXT_CHARAT_TITLE"] = "w tekście %1 %2"; +Blockly.Msg["TEXT_CHARAT_TOOLTIP"] = "Zwraca literę z określonej pozycji."; +Blockly.Msg["TEXT_COUNT_HELPURL"] = "https://github.com/google/blockly/wiki/Text#counting-substrings"; +Blockly.Msg["TEXT_COUNT_MESSAGE0"] = "policz %1 w %2"; +Blockly.Msg["TEXT_COUNT_TOOLTIP"] = "Liczy ile razy dany tekst występuje w innym tekście."; +Blockly.Msg["TEXT_CREATE_JOIN_ITEM_TOOLTIP"] = "Dodaj element do tekstu."; +Blockly.Msg["TEXT_CREATE_JOIN_TITLE_JOIN"] = "połącz"; +Blockly.Msg["TEXT_CREATE_JOIN_TOOLTIP"] = "Dodaj, usuń lub zmień kolejność sekcji, aby zmodyfikować klocek tekstowy."; +Blockly.Msg["TEXT_GET_SUBSTRING_END_FROM_END"] = "do # litery od końca"; +Blockly.Msg["TEXT_GET_SUBSTRING_END_FROM_START"] = "do # litery"; +Blockly.Msg["TEXT_GET_SUBSTRING_END_LAST"] = "do ostatniej litery"; +Blockly.Msg["TEXT_GET_SUBSTRING_HELPURL"] = "https://github.com/google/blockly/wiki/Text#extracting-a-region-of-text"; // untranslated +Blockly.Msg["TEXT_GET_SUBSTRING_INPUT_IN_TEXT"] = "w tekście"; +Blockly.Msg["TEXT_GET_SUBSTRING_START_FIRST"] = "pobierz podciąg od pierwszej litery"; +Blockly.Msg["TEXT_GET_SUBSTRING_START_FROM_END"] = "pobierz podciąg od # litery od końca"; +Blockly.Msg["TEXT_GET_SUBSTRING_START_FROM_START"] = "pobierz podciąg od # litery"; +Blockly.Msg["TEXT_GET_SUBSTRING_TAIL"] = ""; +Blockly.Msg["TEXT_GET_SUBSTRING_TOOLTIP"] = "Zwraca określoną część tekstu."; +Blockly.Msg["TEXT_INDEXOF_HELPURL"] = "https://github.com/google/blockly/wiki/Text#finding-text"; // untranslated +Blockly.Msg["TEXT_INDEXOF_OPERATOR_FIRST"] = "znajdź pierwsze wystąpienie tekstu"; +Blockly.Msg["TEXT_INDEXOF_OPERATOR_LAST"] = "znajdź ostatnie wystąpienie tekstu"; +Blockly.Msg["TEXT_INDEXOF_TITLE"] = "w tekście %1 %2 %3"; +Blockly.Msg["TEXT_INDEXOF_TOOLTIP"] = "Zwraca indeks pierwszego/ostatniego wystąpienia pierwszego tekstu w drugim tekście. Zwraca wartość %1, jeśli tekst nie został znaleziony."; +Blockly.Msg["TEXT_ISEMPTY_HELPURL"] = "https://github.com/google/blockly/wiki/Text#checking-for-empty-text"; // untranslated +Blockly.Msg["TEXT_ISEMPTY_TITLE"] = "%1 jest pusty"; +Blockly.Msg["TEXT_ISEMPTY_TOOLTIP"] = "Zwraca prawda (true), jeśli podany tekst jest pusty."; +Blockly.Msg["TEXT_JOIN_HELPURL"] = "https://github.com/google/blockly/wiki/Text#text-creation"; // untranslated +Blockly.Msg["TEXT_JOIN_TITLE_CREATEWITH"] = "utwórz tekst z"; +Blockly.Msg["TEXT_JOIN_TOOLTIP"] = "Tworzy fragment tekstu, łącząc ze sobą dowolną liczbę tekstów."; +Blockly.Msg["TEXT_LENGTH_HELPURL"] = "https://github.com/google/blockly/wiki/Text#text-modification"; // untranslated +Blockly.Msg["TEXT_LENGTH_TITLE"] = "długość %1"; +Blockly.Msg["TEXT_LENGTH_TOOLTIP"] = "Zwraca liczbę liter (łącznie ze spacjami) w podanym tekście."; +Blockly.Msg["TEXT_PRINT_HELPURL"] = "https://github.com/google/blockly/wiki/Text#printing-text"; // untranslated +Blockly.Msg["TEXT_PRINT_TITLE"] = "wydrukuj %1"; +Blockly.Msg["TEXT_PRINT_TOOLTIP"] = "Wyświetl określony tekst, liczbę lub inną wartość."; +Blockly.Msg["TEXT_PROMPT_HELPURL"] = "https://github.com/google/blockly/wiki/Text#getting-input-from-the-user"; // untranslated +Blockly.Msg["TEXT_PROMPT_TOOLTIP_NUMBER"] = "Zapytaj użytkownika o liczbę."; +Blockly.Msg["TEXT_PROMPT_TOOLTIP_TEXT"] = "Zapytaj użytkownika o jakiś tekst."; +Blockly.Msg["TEXT_PROMPT_TYPE_NUMBER"] = "poproś o liczbę z tą wiadomością"; +Blockly.Msg["TEXT_PROMPT_TYPE_TEXT"] = "poproś o tekst z tą wiadomością"; +Blockly.Msg["TEXT_REPLACE_HELPURL"] = "https://github.com/google/blockly/wiki/Text#replacing-substrings"; // untranslated +Blockly.Msg["TEXT_REPLACE_MESSAGE0"] = "zamień %1 na %2 w %3"; +Blockly.Msg["TEXT_REPLACE_TOOLTIP"] = "Zastąp wszystkie wystąpienia danego tekstu innym."; +Blockly.Msg["TEXT_REVERSE_HELPURL"] = "https://github.com/google/blockly/wiki/Text#reversing-text"; +Blockly.Msg["TEXT_REVERSE_MESSAGE0"] = "odwróć %1"; +Blockly.Msg["TEXT_REVERSE_TOOLTIP"] = "Odwraca kolejność znaków w tekście."; +Blockly.Msg["TEXT_TEXT_HELPURL"] = "https://pl.wikipedia.org/wiki/Tekstowy_typ_danych"; +Blockly.Msg["TEXT_TEXT_TOOLTIP"] = "Litera, wyraz lub linia tekstu."; +Blockly.Msg["TEXT_TRIM_HELPURL"] = "https://github.com/google/blockly/wiki/Text#trimming-removing-spaces"; // untranslated +Blockly.Msg["TEXT_TRIM_OPERATOR_BOTH"] = "usuń spacje po obu stronach"; +Blockly.Msg["TEXT_TRIM_OPERATOR_LEFT"] = "usuń spacje z lewej strony"; +Blockly.Msg["TEXT_TRIM_OPERATOR_RIGHT"] = "usuń spacje z prawej strony"; +Blockly.Msg["TEXT_TRIM_TOOLTIP"] = "Zwraca kopię tekstu z usuniętymi spacjami z jednego lub z obu końców tekstu."; +Blockly.Msg["TODAY"] = "Dzisiaj"; +Blockly.Msg["UNDO"] = "Cofnij"; +Blockly.Msg["UNNAMED_KEY"] = "bez nazwy"; +Blockly.Msg["VARIABLES_DEFAULT_NAME"] = "element"; +Blockly.Msg["VARIABLES_GET_CREATE_SET"] = "Utwórz klocek 'ustaw %1'"; +Blockly.Msg["VARIABLES_GET_HELPURL"] = "https://github.com/google/blockly/wiki/Variables#get"; // untranslated +Blockly.Msg["VARIABLES_GET_TOOLTIP"] = "Zwraca wartość tej zmiennej."; +Blockly.Msg["VARIABLES_SET"] = "przypisz %1 wartość %2"; +Blockly.Msg["VARIABLES_SET_CREATE_GET"] = "Utwórz klocek 'pobierz %1'"; +Blockly.Msg["VARIABLES_SET_HELPURL"] = "https://github.com/google/blockly/wiki/Variables#set"; // untranslated +Blockly.Msg["VARIABLES_SET_TOOLTIP"] = "Wartości zmiennej i wejście będą identyczne."; +Blockly.Msg["VARIABLE_ALREADY_EXISTS"] = "Zmienna o nazwie '%1' już istnieje."; +Blockly.Msg["VARIABLE_ALREADY_EXISTS_FOR_ANOTHER_TYPE"] = "Zmienna o nazwie '%1' już istnieje i jest typu '%2'."; +Blockly.Msg["WORKSPACE_COMMENT_DEFAULT_TEXT"] = "Powiedz coś..."; +Blockly.Msg["CONTROLS_FOREACH_INPUT_DO"] = Blockly.Msg["CONTROLS_REPEAT_INPUT_DO"]; +Blockly.Msg["CONTROLS_FOR_INPUT_DO"] = Blockly.Msg["CONTROLS_REPEAT_INPUT_DO"]; +Blockly.Msg["CONTROLS_IF_ELSEIF_TITLE_ELSEIF"] = Blockly.Msg["CONTROLS_IF_MSG_ELSEIF"]; +Blockly.Msg["CONTROLS_IF_ELSE_TITLE_ELSE"] = Blockly.Msg["CONTROLS_IF_MSG_ELSE"]; +Blockly.Msg["CONTROLS_IF_IF_TITLE_IF"] = Blockly.Msg["CONTROLS_IF_MSG_IF"]; +Blockly.Msg["CONTROLS_IF_MSG_THEN"] = Blockly.Msg["CONTROLS_REPEAT_INPUT_DO"]; +Blockly.Msg["CONTROLS_WHILEUNTIL_INPUT_DO"] = Blockly.Msg["CONTROLS_REPEAT_INPUT_DO"]; +Blockly.Msg["LISTS_CREATE_WITH_ITEM_TITLE"] = Blockly.Msg["VARIABLES_DEFAULT_NAME"]; +Blockly.Msg["LISTS_GET_INDEX_HELPURL"] = Blockly.Msg["LISTS_INDEX_OF_HELPURL"]; +Blockly.Msg["LISTS_GET_INDEX_INPUT_IN_LIST"] = Blockly.Msg["LISTS_INLIST"]; +Blockly.Msg["LISTS_GET_SUBLIST_INPUT_IN_LIST"] = Blockly.Msg["LISTS_INLIST"]; +Blockly.Msg["LISTS_INDEX_OF_INPUT_IN_LIST"] = Blockly.Msg["LISTS_INLIST"]; +Blockly.Msg["LISTS_SET_INDEX_INPUT_IN_LIST"] = Blockly.Msg["LISTS_INLIST"]; +Blockly.Msg["MATH_CHANGE_TITLE_ITEM"] = Blockly.Msg["VARIABLES_DEFAULT_NAME"]; +Blockly.Msg["PROCEDURES_DEFRETURN_COMMENT"] = Blockly.Msg["PROCEDURES_DEFNORETURN_COMMENT"]; +Blockly.Msg["PROCEDURES_DEFRETURN_DO"] = Blockly.Msg["PROCEDURES_DEFNORETURN_DO"]; +Blockly.Msg["PROCEDURES_DEFRETURN_PROCEDURE"] = Blockly.Msg["PROCEDURES_DEFNORETURN_PROCEDURE"]; +Blockly.Msg["PROCEDURES_DEFRETURN_TITLE"] = Blockly.Msg["PROCEDURES_DEFNORETURN_TITLE"]; +Blockly.Msg["TEXT_APPEND_VARIABLE"] = Blockly.Msg["VARIABLES_DEFAULT_NAME"]; +Blockly.Msg["TEXT_CREATE_JOIN_ITEM_TITLE_ITEM"] = Blockly.Msg["VARIABLES_DEFAULT_NAME"]; + +Blockly.Msg["MATH_HUE"] = "230"; +Blockly.Msg["LOOPS_HUE"] = "120"; +Blockly.Msg["LISTS_HUE"] = "260"; +Blockly.Msg["LOGIC_HUE"] = "210"; +Blockly.Msg["VARIABLES_HUE"] = "330"; +Blockly.Msg["TEXTS_HUE"] = "160"; +Blockly.Msg["PROCEDURES_HUE"] = "290"; +Blockly.Msg["COLOUR_HUE"] = "20"; +Blockly.Msg["VARIABLES_DYNAMIC_HUE"] = "310"; \ No newline at end of file diff --git a/blockly/_pv_1_4_0/webif/static/blockly/python_compressed.js b/blockly/_pv_1_4_0/webif/static/blockly/python_compressed.js new file mode 100755 index 000000000..c59970012 --- /dev/null +++ b/blockly/_pv_1_4_0/webif/static/blockly/python_compressed.js @@ -0,0 +1,86 @@ +// Do not edit this file; automatically generated by build.py. +'use strict'; + + +Blockly.Python=new Blockly.Generator("Python");Blockly.Python.addReservedWords("False,None,True,and,as,assert,break,class,continue,def,del,elif,else,except,exec,finally,for,from,global,if,import,in,is,lambda,nonlocal,not,or,pass,print,raise,return,try,while,with,yield,NotImplemented,Ellipsis,__debug__,quit,exit,copyright,license,credits,ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EnvironmentError,Exception,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StandardError,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,ZeroDivisionError,_,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,all,any,apply,ascii,basestring,bin,bool,buffer,bytearray,bytes,callable,chr,classmethod,cmp,coerce,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,execfile,exit,file,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,intern,isinstance,issubclass,iter,len,license,list,locals,long,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,raw_input,reduce,reload,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,unichr,unicode,vars,xrange,zip"); +Blockly.Python.ORDER_ATOMIC=0;Blockly.Python.ORDER_COLLECTION=1;Blockly.Python.ORDER_STRING_CONVERSION=1;Blockly.Python.ORDER_MEMBER=2.1;Blockly.Python.ORDER_FUNCTION_CALL=2.2;Blockly.Python.ORDER_EXPONENTIATION=3;Blockly.Python.ORDER_UNARY_SIGN=4;Blockly.Python.ORDER_BITWISE_NOT=4;Blockly.Python.ORDER_MULTIPLICATIVE=5;Blockly.Python.ORDER_ADDITIVE=6;Blockly.Python.ORDER_BITWISE_SHIFT=7;Blockly.Python.ORDER_BITWISE_AND=8;Blockly.Python.ORDER_BITWISE_XOR=9;Blockly.Python.ORDER_BITWISE_OR=10; +Blockly.Python.ORDER_RELATIONAL=11;Blockly.Python.ORDER_LOGICAL_NOT=12;Blockly.Python.ORDER_LOGICAL_AND=13;Blockly.Python.ORDER_LOGICAL_OR=14;Blockly.Python.ORDER_CONDITIONAL=15;Blockly.Python.ORDER_LAMBDA=16;Blockly.Python.ORDER_NONE=99; +Blockly.Python.ORDER_OVERRIDES=[[Blockly.Python.ORDER_FUNCTION_CALL,Blockly.Python.ORDER_MEMBER],[Blockly.Python.ORDER_FUNCTION_CALL,Blockly.Python.ORDER_FUNCTION_CALL],[Blockly.Python.ORDER_MEMBER,Blockly.Python.ORDER_MEMBER],[Blockly.Python.ORDER_MEMBER,Blockly.Python.ORDER_FUNCTION_CALL],[Blockly.Python.ORDER_LOGICAL_NOT,Blockly.Python.ORDER_LOGICAL_NOT],[Blockly.Python.ORDER_LOGICAL_AND,Blockly.Python.ORDER_LOGICAL_AND],[Blockly.Python.ORDER_LOGICAL_OR,Blockly.Python.ORDER_LOGICAL_OR]]; +Blockly.Python.init=function(a){Blockly.Python.PASS=this.INDENT+"pass\n";Blockly.Python.definitions_=Object.create(null);Blockly.Python.functionNames_=Object.create(null);Blockly.Python.variableDB_?Blockly.Python.variableDB_.reset():Blockly.Python.variableDB_=new Blockly.Names(Blockly.Python.RESERVED_WORDS_);Blockly.Python.variableDB_.setVariableMap(a.getVariableMap());for(var b=[],c=Blockly.Variables.allDeveloperVariables(a),d=0;dc?"int("+a+" - "+-c+")":"int("+a+")",d&&(a="-"+a));return a};Blockly.Python.colour={};Blockly.Python.colour_picker=function(a){return[Blockly.Python.quote_(a.getFieldValue("COLOUR")),Blockly.Python.ORDER_ATOMIC]};Blockly.Python.colour_random=function(a){Blockly.Python.definitions_.import_random="import random";return["'#%06x' % random.randint(0, 2**24 - 1)",Blockly.Python.ORDER_FUNCTION_CALL]}; +Blockly.Python.colour_rgb=function(a){var b=Blockly.Python.provideFunction_("colour_rgb",["def "+Blockly.Python.FUNCTION_NAME_PLACEHOLDER_+"(r, g, b):"," r = round(min(100, max(0, r)) * 2.55)"," g = round(min(100, max(0, g)) * 2.55)"," b = round(min(100, max(0, b)) * 2.55)"," return '#%02x%02x%02x' % (r, g, b)"]),c=Blockly.Python.valueToCode(a,"RED",Blockly.Python.ORDER_NONE)||0,d=Blockly.Python.valueToCode(a,"GREEN",Blockly.Python.ORDER_NONE)||0;a=Blockly.Python.valueToCode(a,"BLUE",Blockly.Python.ORDER_NONE)|| +0;return[b+"("+c+", "+d+", "+a+")",Blockly.Python.ORDER_FUNCTION_CALL]}; +Blockly.Python.colour_blend=function(a){var b=Blockly.Python.provideFunction_("colour_blend",["def "+Blockly.Python.FUNCTION_NAME_PLACEHOLDER_+"(colour1, colour2, ratio):"," r1, r2 = int(colour1[1:3], 16), int(colour2[1:3], 16)"," g1, g2 = int(colour1[3:5], 16), int(colour2[3:5], 16)"," b1, b2 = int(colour1[5:7], 16), int(colour2[5:7], 16)"," ratio = min(1, max(0, ratio))"," r = round(r1 * (1 - ratio) + r2 * ratio)"," g = round(g1 * (1 - ratio) + g2 * ratio)"," b = round(b1 * (1 - ratio) + b2 * ratio)", +" return '#%02x%02x%02x' % (r, g, b)"]),c=Blockly.Python.valueToCode(a,"COLOUR1",Blockly.Python.ORDER_NONE)||"'#000000'",d=Blockly.Python.valueToCode(a,"COLOUR2",Blockly.Python.ORDER_NONE)||"'#000000'";a=Blockly.Python.valueToCode(a,"RATIO",Blockly.Python.ORDER_NONE)||0;return[b+"("+c+", "+d+", "+a+")",Blockly.Python.ORDER_FUNCTION_CALL]};Blockly.Python.lists={};Blockly.Python.lists_create_empty=function(a){return["[]",Blockly.Python.ORDER_ATOMIC]};Blockly.Python.lists_create_with=function(a){for(var b=Array(a.itemCount_),c=0;c",GTE:">="}[a.getFieldValue("OP")],c=Blockly.Python.ORDER_RELATIONAL,d=Blockly.Python.valueToCode(a,"A",c)||"0";a=Blockly.Python.valueToCode(a,"B",c)||"0";return[d+" "+b+" "+a,c]}; +Blockly.Python.logic_operation=function(a){var b="AND"==a.getFieldValue("OP")?"and":"or",c="and"==b?Blockly.Python.ORDER_LOGICAL_AND:Blockly.Python.ORDER_LOGICAL_OR,d=Blockly.Python.valueToCode(a,"A",c);a=Blockly.Python.valueToCode(a,"B",c);if(d||a){var e="and"==b?"True":"False";d||(d=e);a||(a=e)}else a=d="False";return[d+" "+b+" "+a,c]};Blockly.Python.logic_negate=function(a){return["not "+(Blockly.Python.valueToCode(a,"BOOL",Blockly.Python.ORDER_LOGICAL_NOT)||"True"),Blockly.Python.ORDER_LOGICAL_NOT]}; +Blockly.Python.logic_boolean=function(a){return["TRUE"==a.getFieldValue("BOOL")?"True":"False",Blockly.Python.ORDER_ATOMIC]};Blockly.Python.logic_null=function(a){return["None",Blockly.Python.ORDER_ATOMIC]}; +Blockly.Python.logic_ternary=function(a){var b=Blockly.Python.valueToCode(a,"IF",Blockly.Python.ORDER_CONDITIONAL)||"False",c=Blockly.Python.valueToCode(a,"THEN",Blockly.Python.ORDER_CONDITIONAL)||"None";a=Blockly.Python.valueToCode(a,"ELSE",Blockly.Python.ORDER_CONDITIONAL)||"None";return[c+" if "+b+" else "+a,Blockly.Python.ORDER_CONDITIONAL]};Blockly.Python.loops={};Blockly.Python.controls_repeat_ext=function(a){var b=a.getField("TIMES")?String(parseInt(a.getFieldValue("TIMES"),10)):Blockly.Python.valueToCode(a,"TIMES",Blockly.Python.ORDER_NONE)||"0";b=Blockly.isNumber(b)?parseInt(b,10):"int("+b+")";var c=Blockly.Python.statementToCode(a,"DO");c=Blockly.Python.addLoopTrap(c,a)||Blockly.Python.PASS;return"for "+Blockly.Python.variableDB_.getDistinctName("count",Blockly.Variables.NAME_TYPE)+" in range("+b+"):\n"+c}; +Blockly.Python.controls_repeat=Blockly.Python.controls_repeat_ext;Blockly.Python.controls_whileUntil=function(a){var b="UNTIL"==a.getFieldValue("MODE"),c=Blockly.Python.valueToCode(a,"BOOL",b?Blockly.Python.ORDER_LOGICAL_NOT:Blockly.Python.ORDER_NONE)||"False",d=Blockly.Python.statementToCode(a,"DO");d=Blockly.Python.addLoopTrap(d,a)||Blockly.Python.PASS;b&&(c="not "+c);return"while "+c+":\n"+d}; +Blockly.Python.controls_for=function(a){var b=Blockly.Python.variableDB_.getName(a.getFieldValue("VAR"),Blockly.Variables.NAME_TYPE),c=Blockly.Python.valueToCode(a,"FROM",Blockly.Python.ORDER_NONE)||"0",d=Blockly.Python.valueToCode(a,"TO",Blockly.Python.ORDER_NONE)||"0",e=Blockly.Python.valueToCode(a,"BY",Blockly.Python.ORDER_NONE)||"1",f=Blockly.Python.statementToCode(a,"DO");f=Blockly.Python.addLoopTrap(f,a)||Blockly.Python.PASS;var h="",g=function(){return Blockly.Python.provideFunction_("upRange", +["def "+Blockly.Python.FUNCTION_NAME_PLACEHOLDER_+"(start, stop, step):"," while start <= stop:"," yield start"," start += abs(step)"])},k=function(){return Blockly.Python.provideFunction_("downRange",["def "+Blockly.Python.FUNCTION_NAME_PLACEHOLDER_+"(start, stop, step):"," while start >= stop:"," yield start"," start -= abs(step)"])};a=function(a,b,c){return"("+a+" <= "+b+") and "+g()+"("+a+", "+b+", "+c+") or "+k()+"("+a+", "+b+", "+c+")"};if(Blockly.isNumber(c)&&Blockly.isNumber(d)&& +Blockly.isNumber(e))c=Number(c),d=Number(d),e=Math.abs(Number(e)),0===c%1&&0===d%1&&0===e%1?(c<=d?(d++,a=0==c&&1==e?d:c+", "+d,1!=e&&(a+=", "+e)):(d--,a=c+", "+d+", -"+e),a="range("+a+")"):(a=ca?Blockly.Python.ORDER_UNARY_SIGN:Blockly.Python.ORDER_ATOMIC;return[a,b]}; +Blockly.Python.math_arithmetic=function(a){var b={ADD:[" + ",Blockly.Python.ORDER_ADDITIVE],MINUS:[" - ",Blockly.Python.ORDER_ADDITIVE],MULTIPLY:[" * ",Blockly.Python.ORDER_MULTIPLICATIVE],DIVIDE:[" / ",Blockly.Python.ORDER_MULTIPLICATIVE],POWER:[" ** ",Blockly.Python.ORDER_EXPONENTIATION]}[a.getFieldValue("OP")],c=b[0];b=b[1];var d=Blockly.Python.valueToCode(a,"A",b)||"0";a=Blockly.Python.valueToCode(a,"B",b)||"0";return[d+c+a,b]}; +Blockly.Python.math_single=function(a){var b=a.getFieldValue("OP");if("NEG"==b){var c=Blockly.Python.valueToCode(a,"NUM",Blockly.Python.ORDER_UNARY_SIGN)||"0";return["-"+c,Blockly.Python.ORDER_UNARY_SIGN]}Blockly.Python.definitions_.import_math="import math";a="SIN"==b||"COS"==b||"TAN"==b?Blockly.Python.valueToCode(a,"NUM",Blockly.Python.ORDER_MULTIPLICATIVE)||"0":Blockly.Python.valueToCode(a,"NUM",Blockly.Python.ORDER_NONE)||"0";switch(b){case "ABS":c="math.fabs("+a+")";break;case "ROOT":c="math.sqrt("+ +a+")";break;case "LN":c="math.log("+a+")";break;case "LOG10":c="math.log10("+a+")";break;case "EXP":c="math.exp("+a+")";break;case "POW10":c="math.pow(10,"+a+")";break;case "ROUND":c="round("+a+")";break;case "ROUNDUP":c="math.ceil("+a+")";break;case "ROUNDDOWN":c="math.floor("+a+")";break;case "SIN":c="math.sin("+a+" / 180.0 * math.pi)";break;case "COS":c="math.cos("+a+" / 180.0 * math.pi)";break;case "TAN":c="math.tan("+a+" / 180.0 * math.pi)"}if(c)return[c,Blockly.Python.ORDER_FUNCTION_CALL];switch(b){case "ASIN":c= +"math.asin("+a+") / math.pi * 180";break;case "ACOS":c="math.acos("+a+") / math.pi * 180";break;case "ATAN":c="math.atan("+a+") / math.pi * 180";break;default:throw Error("Unknown math operator: "+b);}return[c,Blockly.Python.ORDER_MULTIPLICATIVE]}; +Blockly.Python.math_constant=function(a){var b={PI:["math.pi",Blockly.Python.ORDER_MEMBER],E:["math.e",Blockly.Python.ORDER_MEMBER],GOLDEN_RATIO:["(1 + math.sqrt(5)) / 2",Blockly.Python.ORDER_MULTIPLICATIVE],SQRT2:["math.sqrt(2)",Blockly.Python.ORDER_MEMBER],SQRT1_2:["math.sqrt(1.0 / 2)",Blockly.Python.ORDER_MEMBER],INFINITY:["float('inf')",Blockly.Python.ORDER_ATOMIC]};a=a.getFieldValue("CONSTANT");"INFINITY"!=a&&(Blockly.Python.definitions_.import_math="import math");return b[a]}; +Blockly.Python.math_number_property=function(a){var b=Blockly.Python.valueToCode(a,"NUMBER_TO_CHECK",Blockly.Python.ORDER_MULTIPLICATIVE)||"0",c=a.getFieldValue("PROPERTY");if("PRIME"==c)return Blockly.Python.definitions_.import_math="import math",Blockly.Python.definitions_.from_numbers_import_Number="from numbers import Number",[Blockly.Python.provideFunction_("math_isPrime",["def "+Blockly.Python.FUNCTION_NAME_PLACEHOLDER_+"(n):"," # https://en.wikipedia.org/wiki/Primality_test#Naive_methods", +" # If n is not a number but a string, try parsing it."," if not isinstance(n, Number):"," try:"," n = float(n)"," except:"," return False"," if n == 2 or n == 3:"," return True"," # False if n is negative, is 1, or not whole, or if n is divisible by 2 or 3."," if n <= 1 or n % 1 != 0 or n % 2 == 0 or n % 3 == 0:"," return False"," # Check all the numbers of form 6k +/- 1, up to sqrt(n)."," for x in range(6, int(math.sqrt(n)) + 2, 6):"," if n % (x - 1) == 0 or n % (x + 1) == 0:", +" return False"," return True"])+"("+b+")",Blockly.Python.ORDER_FUNCTION_CALL];switch(c){case "EVEN":var d=b+" % 2 == 0";break;case "ODD":d=b+" % 2 == 1";break;case "WHOLE":d=b+" % 1 == 0";break;case "POSITIVE":d=b+" > 0";break;case "NEGATIVE":d=b+" < 0";break;case "DIVISIBLE_BY":a=Blockly.Python.valueToCode(a,"DIVISOR",Blockly.Python.ORDER_MULTIPLICATIVE);if(!a||"0"==a)return["False",Blockly.Python.ORDER_ATOMIC];d=b+" % "+a+" == 0"}return[d,Blockly.Python.ORDER_RELATIONAL]}; +Blockly.Python.math_change=function(a){Blockly.Python.definitions_.from_numbers_import_Number="from numbers import Number";var b=Blockly.Python.valueToCode(a,"DELTA",Blockly.Python.ORDER_ADDITIVE)||"0";a=Blockly.Python.variableDB_.getName(a.getFieldValue("VAR"),Blockly.Variables.NAME_TYPE);return a+" = ("+a+" if isinstance("+a+", Number) else 0) + "+b+"\n"};Blockly.Python.math_round=Blockly.Python.math_single;Blockly.Python.math_trig=Blockly.Python.math_single; +Blockly.Python.math_on_list=function(a){var b=a.getFieldValue("OP");a=Blockly.Python.valueToCode(a,"LIST",Blockly.Python.ORDER_NONE)||"[]";switch(b){case "SUM":b="sum("+a+")";break;case "MIN":b="min("+a+")";break;case "MAX":b="max("+a+")";break;case "AVERAGE":Blockly.Python.definitions_.from_numbers_import_Number="from numbers import Number";b=Blockly.Python.provideFunction_("math_mean",["def "+Blockly.Python.FUNCTION_NAME_PLACEHOLDER_+"(myList):"," localList = [e for e in myList if isinstance(e, Number)]", +" if not localList: return"," return float(sum(localList)) / len(localList)"]);b=b+"("+a+")";break;case "MEDIAN":Blockly.Python.definitions_.from_numbers_import_Number="from numbers import Number";b=Blockly.Python.provideFunction_("math_median",["def "+Blockly.Python.FUNCTION_NAME_PLACEHOLDER_+"(myList):"," localList = sorted([e for e in myList if isinstance(e, Number)])"," if not localList: return"," if len(localList) % 2 == 0:"," return (localList[len(localList) // 2 - 1] + localList[len(localList) // 2]) / 2.0", +" else:"," return localList[(len(localList) - 1) // 2]"]);b=b+"("+a+")";break;case "MODE":b=Blockly.Python.provideFunction_("math_modes",["def "+Blockly.Python.FUNCTION_NAME_PLACEHOLDER_+"(some_list):"," modes = []"," # Using a lists of [item, count] to keep count rather than dict",' # to avoid "unhashable" errors when the counted item is itself a list or dict.'," counts = []"," maxCount = 1"," for item in some_list:"," found = False"," for count in counts:"," if count[0] == item:", +" count[1] += 1"," maxCount = max(maxCount, count[1])"," found = True"," if not found:"," counts.append([item, 1])"," for counted_item, item_count in counts:"," if item_count == maxCount:"," modes.append(counted_item)"," return modes"]);b=b+"("+a+")";break;case "STD_DEV":Blockly.Python.definitions_.import_math="import math";b=Blockly.Python.provideFunction_("math_standard_deviation",["def "+Blockly.Python.FUNCTION_NAME_PLACEHOLDER_+"(numbers):"," n = len(numbers)", +" if n == 0: return"," mean = float(sum(numbers)) / n"," variance = sum((x - mean) ** 2 for x in numbers) / n"," return math.sqrt(variance)"]);b=b+"("+a+")";break;case "RANDOM":Blockly.Python.definitions_.import_random="import random";b="random.choice("+a+")";break;default:throw Error("Unknown operator: "+b);}return[b,Blockly.Python.ORDER_FUNCTION_CALL]}; +Blockly.Python.math_modulo=function(a){var b=Blockly.Python.valueToCode(a,"DIVIDEND",Blockly.Python.ORDER_MULTIPLICATIVE)||"0";a=Blockly.Python.valueToCode(a,"DIVISOR",Blockly.Python.ORDER_MULTIPLICATIVE)||"0";return[b+" % "+a,Blockly.Python.ORDER_MULTIPLICATIVE]}; +Blockly.Python.math_constrain=function(a){var b=Blockly.Python.valueToCode(a,"VALUE",Blockly.Python.ORDER_NONE)||"0",c=Blockly.Python.valueToCode(a,"LOW",Blockly.Python.ORDER_NONE)||"0";a=Blockly.Python.valueToCode(a,"HIGH",Blockly.Python.ORDER_NONE)||"float('inf')";return["min(max("+b+", "+c+"), "+a+")",Blockly.Python.ORDER_FUNCTION_CALL]}; +Blockly.Python.math_random_int=function(a){Blockly.Python.definitions_.import_random="import random";var b=Blockly.Python.valueToCode(a,"FROM",Blockly.Python.ORDER_NONE)||"0";a=Blockly.Python.valueToCode(a,"TO",Blockly.Python.ORDER_NONE)||"0";return["random.randint("+b+", "+a+")",Blockly.Python.ORDER_FUNCTION_CALL]};Blockly.Python.math_random_float=function(a){Blockly.Python.definitions_.import_random="import random";return["random.random()",Blockly.Python.ORDER_FUNCTION_CALL]}; +Blockly.Python.math_atan2=function(a){Blockly.Python.definitions_.import_math="import math";var b=Blockly.Python.valueToCode(a,"X",Blockly.Python.ORDER_NONE)||"0";return["math.atan2("+(Blockly.Python.valueToCode(a,"Y",Blockly.Python.ORDER_NONE)||"0")+", "+b+") / math.pi * 180",Blockly.Python.ORDER_MULTIPLICATIVE]};Blockly.Python.procedures={}; +Blockly.Python.procedures_defreturn=function(a){for(var b=[],c,d=a.workspace,e=Blockly.Variables.allUsedVarModels(d)||[],f=0;c=e[f];f++)c=c.name,-1==a.arguments_.indexOf(c)&&b.push(Blockly.Python.variableDB_.getName(c,Blockly.Variables.NAME_TYPE));d=Blockly.Variables.allDeveloperVariables(d);for(f=0;fimg { + opacity: 1; +} +button>img { + opacity: 0.6; + vertical-align: text-bottom; +} +button:hover>img { + opacity: 1; +} +button:active { + border: 1px solid #888 !important; +} +button:hover { + box-shadow: 2px 2px 5px #888; +} +button.disabled:hover>img { + opacity: 0.6; +} +button.disabled { + display: none; +} +button.notext { + font-size: 10%; +} + +h1 { + font-weight: normal; + font-size: 140%; + margin-left: 5px; + margin-right: 5px; +} + +/* Tabs */ +#tabRow>td { + border: 1px solid #ccc; + border-bottom: none; +} +td.tabon { + border-bottom-color: #ddd !important; + background-color: #ddd; + padding: 5px 19px; +} +td.taboff { + cursor: pointer; + padding: 5px 19px; +} +td.taboff:hover { + background-color: #eee; +} +td.tabmin { + border-top-style: none !important; + border-left-style: none !important; + border-right-style: none !important; +} +td.tabmax { + border-top-style: none !important; + border-left-style: none !important; + border-right-style: none !important; + width: 99%; + padding-left: 10px; + padding-right: 10px; + text-align: right; +} +html[dir=rtl] td.tabmax { + text-align: left; +} + +table { + border-collapse: collapse; + margin: 0; + padding: 0; + border: none; +} +td { + padding: 0; + vertical-align: top; +} +.content { + visibility: hidden; + margin: 0; + padding: 1ex; + position: absolute; + direction: ltr; +} +pre.content { + border: 1px solid #ccc; + overflow: scroll; +} +#content_blocks { + padding: 0; +} +.blocklySvg { + border-top: none !important; +} +#content_xml { + resize: none; + outline: none; + border: 1px solid #ccc; + font-family: monospace; + overflow: scroll; +} +#languageMenu { + vertical-align: top; + margin-left: 15px; + margin-right: 15px; + margin-top: 15px; +} + +/* Buttons */ +button { + padding: 1px 10px; + margin: 1px 5px; +} + +/* Sprited icons. */ +.icon21 { + height: 21px; + width: 21px; + background-image: url(icons.png); +} +.trash { + background-position: 0px 0px; +} +.link { + background-position: -21px 0px; +} +.run { + background-position: -42px 0px; +} diff --git a/blockly/_pv_1_4_0/webif/static/css/bootstrap-reload.css b/blockly/_pv_1_4_0/webif/static/css/bootstrap-reload.css new file mode 100755 index 000000000..0fd748a6d --- /dev/null +++ b/blockly/_pv_1_4_0/webif/static/css/bootstrap-reload.css @@ -0,0 +1,20 @@ +.panel-refresh { + min-height:250px; + position:relative; +} + +.refresh-container { + position:absolute; + top:0; + right:0; + background:rgba(0, 0, 0, 0.5); + width:100%; + height:100%; + display: none; + text-align:center; + z-index:4; +} +.refresh-spinner { + padding: 30px; + opacity: 0.8; +} \ No newline at end of file diff --git a/blockly/_pv_1_4_0/webif/static/css/bootstrap-theme.css b/blockly/_pv_1_4_0/webif/static/css/bootstrap-theme.css new file mode 100755 index 000000000..31d888266 --- /dev/null +++ b/blockly/_pv_1_4_0/webif/static/css/bootstrap-theme.css @@ -0,0 +1,587 @@ +/*! + * Bootstrap v3.3.7 (http://getbootstrap.com) + * Copyright 2011-2016 Twitter, Inc. + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) + */ +.btn-default, +.btn-primary, +.btn-success, +.btn-info, +.btn-warning, +.btn-danger { + text-shadow: 0 -1px 0 rgba(0, 0, 0, .2); + -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, .15), 0 1px 1px rgba(0, 0, 0, .075); + box-shadow: inset 0 1px 0 rgba(255, 255, 255, .15), 0 1px 1px rgba(0, 0, 0, .075); +} +.btn-default:active, +.btn-primary:active, +.btn-success:active, +.btn-info:active, +.btn-warning:active, +.btn-danger:active, +.btn-default.active, +.btn-primary.active, +.btn-success.active, +.btn-info.active, +.btn-warning.active, +.btn-danger.active { + -webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125); + box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125); +} +.btn-default.disabled, +.btn-primary.disabled, +.btn-success.disabled, +.btn-info.disabled, +.btn-warning.disabled, +.btn-danger.disabled, +.btn-default[disabled], +.btn-primary[disabled], +.btn-success[disabled], +.btn-info[disabled], +.btn-warning[disabled], +.btn-danger[disabled], +fieldset[disabled] .btn-default, +fieldset[disabled] .btn-primary, +fieldset[disabled] .btn-success, +fieldset[disabled] .btn-info, +fieldset[disabled] .btn-warning, +fieldset[disabled] .btn-danger { + -webkit-box-shadow: none; + box-shadow: none; +} +.btn-default .badge, +.btn-primary .badge, +.btn-success .badge, +.btn-info .badge, +.btn-warning .badge, +.btn-danger .badge { + text-shadow: none; +} +.btn:active, +.btn.active { + background-image: none; +} +.btn-default { + text-shadow: 0 1px 0 #fff; + background-image: -webkit-linear-gradient(top, #fff 0%, #e0e0e0 100%); + background-image: -o-linear-gradient(top, #fff 0%, #e0e0e0 100%); + background-image: -webkit-gradient(linear, left top, left bottom, from(#fff), to(#e0e0e0)); + background-image: linear-gradient(to bottom, #fff 0%, #e0e0e0 100%); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#ffe0e0e0', GradientType=0); + filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); + background-repeat: repeat-x; + border-color: #dbdbdb; + border-color: #ccc; +} +.btn-default:hover, +.btn-default:focus { + background-color: #e0e0e0; + background-position: 0 -15px; +} +.btn-default:active, +.btn-default.active { + background-color: #e0e0e0; + border-color: #dbdbdb; +} +.btn-default.disabled, +.btn-default[disabled], +fieldset[disabled] .btn-default, +.btn-default.disabled:hover, +.btn-default[disabled]:hover, +fieldset[disabled] .btn-default:hover, +.btn-default.disabled:focus, +.btn-default[disabled]:focus, +fieldset[disabled] .btn-default:focus, +.btn-default.disabled.focus, +.btn-default[disabled].focus, +fieldset[disabled] .btn-default.focus, +.btn-default.disabled:active, +.btn-default[disabled]:active, +fieldset[disabled] .btn-default:active, +.btn-default.disabled.active, +.btn-default[disabled].active, +fieldset[disabled] .btn-default.active { + background-color: #e0e0e0; + background-image: none; +} +.btn-primary { + background-image: -webkit-linear-gradient(top, #337ab7 0%, #265a88 100%); + background-image: -o-linear-gradient(top, #337ab7 0%, #265a88 100%); + background-image: -webkit-gradient(linear, left top, left bottom, from(#337ab7), to(#265a88)); + background-image: linear-gradient(to bottom, #337ab7 0%, #265a88 100%); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff265a88', GradientType=0); + filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); + background-repeat: repeat-x; + border-color: #245580; +} +.btn-primary:hover, +.btn-primary:focus { + background-color: #265a88; + background-position: 0 -15px; +} +.btn-primary:active, +.btn-primary.active { + background-color: #265a88; + border-color: #245580; +} +.btn-primary.disabled, +.btn-primary[disabled], +fieldset[disabled] .btn-primary, +.btn-primary.disabled:hover, +.btn-primary[disabled]:hover, +fieldset[disabled] .btn-primary:hover, +.btn-primary.disabled:focus, +.btn-primary[disabled]:focus, +fieldset[disabled] .btn-primary:focus, +.btn-primary.disabled.focus, +.btn-primary[disabled].focus, +fieldset[disabled] .btn-primary.focus, +.btn-primary.disabled:active, +.btn-primary[disabled]:active, +fieldset[disabled] .btn-primary:active, +.btn-primary.disabled.active, +.btn-primary[disabled].active, +fieldset[disabled] .btn-primary.active { + background-color: #265a88; + background-image: none; +} +.btn-success { + background-image: -webkit-linear-gradient(top, #5cb85c 0%, #419641 100%); + background-image: -o-linear-gradient(top, #5cb85c 0%, #419641 100%); + background-image: -webkit-gradient(linear, left top, left bottom, from(#5cb85c), to(#419641)); + background-image: linear-gradient(to bottom, #5cb85c 0%, #419641 100%); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5cb85c', endColorstr='#ff419641', GradientType=0); + filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); + background-repeat: repeat-x; + border-color: #3e8f3e; +} +.btn-success:hover, +.btn-success:focus { + background-color: #419641; + background-position: 0 -15px; +} +.btn-success:active, +.btn-success.active { + background-color: #419641; + border-color: #3e8f3e; +} +.btn-success.disabled, +.btn-success[disabled], +fieldset[disabled] .btn-success, +.btn-success.disabled:hover, +.btn-success[disabled]:hover, +fieldset[disabled] .btn-success:hover, +.btn-success.disabled:focus, +.btn-success[disabled]:focus, +fieldset[disabled] .btn-success:focus, +.btn-success.disabled.focus, +.btn-success[disabled].focus, +fieldset[disabled] .btn-success.focus, +.btn-success.disabled:active, +.btn-success[disabled]:active, +fieldset[disabled] .btn-success:active, +.btn-success.disabled.active, +.btn-success[disabled].active, +fieldset[disabled] .btn-success.active { + background-color: #419641; + background-image: none; +} +.btn-info { + background-image: -webkit-linear-gradient(top, #5bc0de 0%, #2aabd2 100%); + background-image: -o-linear-gradient(top, #5bc0de 0%, #2aabd2 100%); + background-image: -webkit-gradient(linear, left top, left bottom, from(#5bc0de), to(#2aabd2)); + background-image: linear-gradient(to bottom, #5bc0de 0%, #2aabd2 100%); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de', endColorstr='#ff2aabd2', GradientType=0); + filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); + background-repeat: repeat-x; + border-color: #28a4c9; +} +.btn-info:hover, +.btn-info:focus { + background-color: #2aabd2; + background-position: 0 -15px; +} +.btn-info:active, +.btn-info.active { + background-color: #2aabd2; + border-color: #28a4c9; +} +.btn-info.disabled, +.btn-info[disabled], +fieldset[disabled] .btn-info, +.btn-info.disabled:hover, +.btn-info[disabled]:hover, +fieldset[disabled] .btn-info:hover, +.btn-info.disabled:focus, +.btn-info[disabled]:focus, +fieldset[disabled] .btn-info:focus, +.btn-info.disabled.focus, +.btn-info[disabled].focus, +fieldset[disabled] .btn-info.focus, +.btn-info.disabled:active, +.btn-info[disabled]:active, +fieldset[disabled] .btn-info:active, +.btn-info.disabled.active, +.btn-info[disabled].active, +fieldset[disabled] .btn-info.active { + background-color: #2aabd2; + background-image: none; +} +.btn-warning { + background-image: -webkit-linear-gradient(top, #f0ad4e 0%, #eb9316 100%); + background-image: -o-linear-gradient(top, #f0ad4e 0%, #eb9316 100%); + background-image: -webkit-gradient(linear, left top, left bottom, from(#f0ad4e), to(#eb9316)); + background-image: linear-gradient(to bottom, #f0ad4e 0%, #eb9316 100%); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff0ad4e', endColorstr='#ffeb9316', GradientType=0); + filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); + background-repeat: repeat-x; + border-color: #e38d13; +} +.btn-warning:hover, +.btn-warning:focus { + background-color: #eb9316; + background-position: 0 -15px; +} +.btn-warning:active, +.btn-warning.active { + background-color: #eb9316; + border-color: #e38d13; +} +.btn-warning.disabled, +.btn-warning[disabled], +fieldset[disabled] .btn-warning, +.btn-warning.disabled:hover, +.btn-warning[disabled]:hover, +fieldset[disabled] .btn-warning:hover, +.btn-warning.disabled:focus, +.btn-warning[disabled]:focus, +fieldset[disabled] .btn-warning:focus, +.btn-warning.disabled.focus, +.btn-warning[disabled].focus, +fieldset[disabled] .btn-warning.focus, +.btn-warning.disabled:active, +.btn-warning[disabled]:active, +fieldset[disabled] .btn-warning:active, +.btn-warning.disabled.active, +.btn-warning[disabled].active, +fieldset[disabled] .btn-warning.active { + background-color: #eb9316; + background-image: none; +} +.btn-danger { + background-image: -webkit-linear-gradient(top, #d9534f 0%, #c12e2a 100%); + background-image: -o-linear-gradient(top, #d9534f 0%, #c12e2a 100%); + background-image: -webkit-gradient(linear, left top, left bottom, from(#d9534f), to(#c12e2a)); + background-image: linear-gradient(to bottom, #d9534f 0%, #c12e2a 100%); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9534f', endColorstr='#ffc12e2a', GradientType=0); + filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); + background-repeat: repeat-x; + border-color: #b92c28; +} +.btn-danger:hover, +.btn-danger:focus { + background-color: #c12e2a; + background-position: 0 -15px; +} +.btn-danger:active, +.btn-danger.active { + background-color: #c12e2a; + border-color: #b92c28; +} +.btn-danger.disabled, +.btn-danger[disabled], +fieldset[disabled] .btn-danger, +.btn-danger.disabled:hover, +.btn-danger[disabled]:hover, +fieldset[disabled] .btn-danger:hover, +.btn-danger.disabled:focus, +.btn-danger[disabled]:focus, +fieldset[disabled] .btn-danger:focus, +.btn-danger.disabled.focus, +.btn-danger[disabled].focus, +fieldset[disabled] .btn-danger.focus, +.btn-danger.disabled:active, +.btn-danger[disabled]:active, +fieldset[disabled] .btn-danger:active, +.btn-danger.disabled.active, +.btn-danger[disabled].active, +fieldset[disabled] .btn-danger.active { + background-color: #c12e2a; + background-image: none; +} +.thumbnail, +.img-thumbnail { + -webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, .075); + box-shadow: 0 1px 2px rgba(0, 0, 0, .075); +} +.dropdown-menu > li > a:hover, +.dropdown-menu > li > a:focus { + background-color: #e8e8e8; + background-image: -webkit-linear-gradient(top, #f5f5f5 0%, #e8e8e8 100%); + background-image: -o-linear-gradient(top, #f5f5f5 0%, #e8e8e8 100%); + background-image: -webkit-gradient(linear, left top, left bottom, from(#f5f5f5), to(#e8e8e8)); + background-image: linear-gradient(to bottom, #f5f5f5 0%, #e8e8e8 100%); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff5f5f5', endColorstr='#ffe8e8e8', GradientType=0); + background-repeat: repeat-x; +} +.dropdown-menu > .active > a, +.dropdown-menu > .active > a:hover, +.dropdown-menu > .active > a:focus { + background-color: #2e6da4; + background-image: -webkit-linear-gradient(top, #337ab7 0%, #2e6da4 100%); + background-image: -o-linear-gradient(top, #337ab7 0%, #2e6da4 100%); + background-image: -webkit-gradient(linear, left top, left bottom, from(#337ab7), to(#2e6da4)); + background-image: linear-gradient(to bottom, #337ab7 0%, #2e6da4 100%); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff2e6da4', GradientType=0); + background-repeat: repeat-x; +} +.navbar-default { + background-image: -webkit-linear-gradient(top, #fff 0%, #f8f8f8 100%); + background-image: -o-linear-gradient(top, #fff 0%, #f8f8f8 100%); + background-image: -webkit-gradient(linear, left top, left bottom, from(#fff), to(#f8f8f8)); + background-image: linear-gradient(to bottom, #fff 0%, #f8f8f8 100%); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#fff8f8f8', GradientType=0); + filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); + background-repeat: repeat-x; + border-radius: 4px; + -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, .15), 0 1px 5px rgba(0, 0, 0, .075); + box-shadow: inset 0 1px 0 rgba(255, 255, 255, .15), 0 1px 5px rgba(0, 0, 0, .075); +} +.navbar-default .navbar-nav > .open > a, +.navbar-default .navbar-nav > .active > a { + background-image: -webkit-linear-gradient(top, #dbdbdb 0%, #e2e2e2 100%); + background-image: -o-linear-gradient(top, #dbdbdb 0%, #e2e2e2 100%); + background-image: -webkit-gradient(linear, left top, left bottom, from(#dbdbdb), to(#e2e2e2)); + background-image: linear-gradient(to bottom, #dbdbdb 0%, #e2e2e2 100%); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffdbdbdb', endColorstr='#ffe2e2e2', GradientType=0); + background-repeat: repeat-x; + -webkit-box-shadow: inset 0 3px 9px rgba(0, 0, 0, .075); + box-shadow: inset 0 3px 9px rgba(0, 0, 0, .075); +} +.navbar-brand, +.navbar-nav > li > a { + text-shadow: 0 1px 0 rgba(255, 255, 255, .25); +} +.navbar-inverse { + background-image: -webkit-linear-gradient(top, #3c3c3c 0%, #222 100%); + background-image: -o-linear-gradient(top, #3c3c3c 0%, #222 100%); + background-image: -webkit-gradient(linear, left top, left bottom, from(#3c3c3c), to(#222)); + background-image: linear-gradient(to bottom, #3c3c3c 0%, #222 100%); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff3c3c3c', endColorstr='#ff222222', GradientType=0); + filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); + background-repeat: repeat-x; + border-radius: 4px; +} +.navbar-inverse .navbar-nav > .open > a, +.navbar-inverse .navbar-nav > .active > a { + background-image: -webkit-linear-gradient(top, #080808 0%, #0f0f0f 100%); + background-image: -o-linear-gradient(top, #080808 0%, #0f0f0f 100%); + background-image: -webkit-gradient(linear, left top, left bottom, from(#080808), to(#0f0f0f)); + background-image: linear-gradient(to bottom, #080808 0%, #0f0f0f 100%); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff080808', endColorstr='#ff0f0f0f', GradientType=0); + background-repeat: repeat-x; + -webkit-box-shadow: inset 0 3px 9px rgba(0, 0, 0, .25); + box-shadow: inset 0 3px 9px rgba(0, 0, 0, .25); +} +.navbar-inverse .navbar-brand, +.navbar-inverse .navbar-nav > li > a { + text-shadow: 0 -1px 0 rgba(0, 0, 0, .25); +} +.navbar-static-top, +.navbar-fixed-top, +.navbar-fixed-bottom { + border-radius: 0; +} +@media (max-width: 767px) { + .navbar .navbar-nav .open .dropdown-menu > .active > a, + .navbar .navbar-nav .open .dropdown-menu > .active > a:hover, + .navbar .navbar-nav .open .dropdown-menu > .active > a:focus { + color: #fff; + background-image: -webkit-linear-gradient(top, #337ab7 0%, #2e6da4 100%); + background-image: -o-linear-gradient(top, #337ab7 0%, #2e6da4 100%); + background-image: -webkit-gradient(linear, left top, left bottom, from(#337ab7), to(#2e6da4)); + background-image: linear-gradient(to bottom, #337ab7 0%, #2e6da4 100%); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff2e6da4', GradientType=0); + background-repeat: repeat-x; + } +} +.alert { + text-shadow: 0 1px 0 rgba(255, 255, 255, .2); + -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), 0 1px 2px rgba(0, 0, 0, .05); + box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), 0 1px 2px rgba(0, 0, 0, .05); +} +.alert-success { + background-image: -webkit-linear-gradient(top, #dff0d8 0%, #c8e5bc 100%); + background-image: -o-linear-gradient(top, #dff0d8 0%, #c8e5bc 100%); + background-image: -webkit-gradient(linear, left top, left bottom, from(#dff0d8), to(#c8e5bc)); + background-image: linear-gradient(to bottom, #dff0d8 0%, #c8e5bc 100%); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffdff0d8', endColorstr='#ffc8e5bc', GradientType=0); + background-repeat: repeat-x; + border-color: #b2dba1; +} +.alert-info { + background-image: -webkit-linear-gradient(top, #d9edf7 0%, #b9def0 100%); + background-image: -o-linear-gradient(top, #d9edf7 0%, #b9def0 100%); + background-image: -webkit-gradient(linear, left top, left bottom, from(#d9edf7), to(#b9def0)); + background-image: linear-gradient(to bottom, #d9edf7 0%, #b9def0 100%); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9edf7', endColorstr='#ffb9def0', GradientType=0); + background-repeat: repeat-x; + border-color: #9acfea; +} +.alert-warning { + background-image: -webkit-linear-gradient(top, #fcf8e3 0%, #f8efc0 100%); + background-image: -o-linear-gradient(top, #fcf8e3 0%, #f8efc0 100%); + background-image: -webkit-gradient(linear, left top, left bottom, from(#fcf8e3), to(#f8efc0)); + background-image: linear-gradient(to bottom, #fcf8e3 0%, #f8efc0 100%); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffcf8e3', endColorstr='#fff8efc0', GradientType=0); + background-repeat: repeat-x; + border-color: #f5e79e; +} +.alert-danger { + background-image: -webkit-linear-gradient(top, #f2dede 0%, #e7c3c3 100%); + background-image: -o-linear-gradient(top, #f2dede 0%, #e7c3c3 100%); + background-image: -webkit-gradient(linear, left top, left bottom, from(#f2dede), to(#e7c3c3)); + background-image: linear-gradient(to bottom, #f2dede 0%, #e7c3c3 100%); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff2dede', endColorstr='#ffe7c3c3', GradientType=0); + background-repeat: repeat-x; + border-color: #dca7a7; +} +.progress { + background-image: -webkit-linear-gradient(top, #ebebeb 0%, #f5f5f5 100%); + background-image: -o-linear-gradient(top, #ebebeb 0%, #f5f5f5 100%); + background-image: -webkit-gradient(linear, left top, left bottom, from(#ebebeb), to(#f5f5f5)); + background-image: linear-gradient(to bottom, #ebebeb 0%, #f5f5f5 100%); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffebebeb', endColorstr='#fff5f5f5', GradientType=0); + background-repeat: repeat-x; +} +.progress-bar { + background-image: -webkit-linear-gradient(top, #337ab7 0%, #286090 100%); + background-image: -o-linear-gradient(top, #337ab7 0%, #286090 100%); + background-image: -webkit-gradient(linear, left top, left bottom, from(#337ab7), to(#286090)); + background-image: linear-gradient(to bottom, #337ab7 0%, #286090 100%); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff286090', GradientType=0); + background-repeat: repeat-x; +} +.progress-bar-success { + background-image: -webkit-linear-gradient(top, #5cb85c 0%, #449d44 100%); + background-image: -o-linear-gradient(top, #5cb85c 0%, #449d44 100%); + background-image: -webkit-gradient(linear, left top, left bottom, from(#5cb85c), to(#449d44)); + background-image: linear-gradient(to bottom, #5cb85c 0%, #449d44 100%); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5cb85c', endColorstr='#ff449d44', GradientType=0); + background-repeat: repeat-x; +} +.progress-bar-info { + background-image: -webkit-linear-gradient(top, #5bc0de 0%, #31b0d5 100%); + background-image: -o-linear-gradient(top, #5bc0de 0%, #31b0d5 100%); + background-image: -webkit-gradient(linear, left top, left bottom, from(#5bc0de), to(#31b0d5)); + background-image: linear-gradient(to bottom, #5bc0de 0%, #31b0d5 100%); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de', endColorstr='#ff31b0d5', GradientType=0); + background-repeat: repeat-x; +} +.progress-bar-warning { + background-image: -webkit-linear-gradient(top, #f0ad4e 0%, #ec971f 100%); + background-image: -o-linear-gradient(top, #f0ad4e 0%, #ec971f 100%); + background-image: -webkit-gradient(linear, left top, left bottom, from(#f0ad4e), to(#ec971f)); + background-image: linear-gradient(to bottom, #f0ad4e 0%, #ec971f 100%); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff0ad4e', endColorstr='#ffec971f', GradientType=0); + background-repeat: repeat-x; +} +.progress-bar-danger { + background-image: -webkit-linear-gradient(top, #d9534f 0%, #c9302c 100%); + background-image: -o-linear-gradient(top, #d9534f 0%, #c9302c 100%); + background-image: -webkit-gradient(linear, left top, left bottom, from(#d9534f), to(#c9302c)); + background-image: linear-gradient(to bottom, #d9534f 0%, #c9302c 100%); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9534f', endColorstr='#ffc9302c', GradientType=0); + background-repeat: repeat-x; +} +.progress-bar-striped { + background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent); + background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent); + background-image: linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent); +} +.list-group { + border-radius: 4px; + -webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, .075); + box-shadow: 0 1px 2px rgba(0, 0, 0, .075); +} +.list-group-item.active, +.list-group-item.active:hover, +.list-group-item.active:focus { + text-shadow: 0 -1px 0 #286090; + background-image: -webkit-linear-gradient(top, #337ab7 0%, #2b669a 100%); + background-image: -o-linear-gradient(top, #337ab7 0%, #2b669a 100%); + background-image: -webkit-gradient(linear, left top, left bottom, from(#337ab7), to(#2b669a)); + background-image: linear-gradient(to bottom, #337ab7 0%, #2b669a 100%); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff2b669a', GradientType=0); + background-repeat: repeat-x; + border-color: #2b669a; +} +.list-group-item.active .badge, +.list-group-item.active:hover .badge, +.list-group-item.active:focus .badge { + text-shadow: none; +} +.panel { + -webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, .05); + box-shadow: 0 1px 2px rgba(0, 0, 0, .05); +} +.panel-default > .panel-heading { + background-image: -webkit-linear-gradient(top, #f5f5f5 0%, #e8e8e8 100%); + background-image: -o-linear-gradient(top, #f5f5f5 0%, #e8e8e8 100%); + background-image: -webkit-gradient(linear, left top, left bottom, from(#f5f5f5), to(#e8e8e8)); + background-image: linear-gradient(to bottom, #f5f5f5 0%, #e8e8e8 100%); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff5f5f5', endColorstr='#ffe8e8e8', GradientType=0); + background-repeat: repeat-x; +} +.panel-primary > .panel-heading { + background-image: -webkit-linear-gradient(top, #337ab7 0%, #2e6da4 100%); + background-image: -o-linear-gradient(top, #337ab7 0%, #2e6da4 100%); + background-image: -webkit-gradient(linear, left top, left bottom, from(#337ab7), to(#2e6da4)); + background-image: linear-gradient(to bottom, #337ab7 0%, #2e6da4 100%); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff2e6da4', GradientType=0); + background-repeat: repeat-x; +} +.panel-success > .panel-heading { + background-image: -webkit-linear-gradient(top, #dff0d8 0%, #d0e9c6 100%); + background-image: -o-linear-gradient(top, #dff0d8 0%, #d0e9c6 100%); + background-image: -webkit-gradient(linear, left top, left bottom, from(#dff0d8), to(#d0e9c6)); + background-image: linear-gradient(to bottom, #dff0d8 0%, #d0e9c6 100%); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffdff0d8', endColorstr='#ffd0e9c6', GradientType=0); + background-repeat: repeat-x; +} +.panel-info > .panel-heading { + background-image: -webkit-linear-gradient(top, #d9edf7 0%, #c4e3f3 100%); + background-image: -o-linear-gradient(top, #d9edf7 0%, #c4e3f3 100%); + background-image: -webkit-gradient(linear, left top, left bottom, from(#d9edf7), to(#c4e3f3)); + background-image: linear-gradient(to bottom, #d9edf7 0%, #c4e3f3 100%); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9edf7', endColorstr='#ffc4e3f3', GradientType=0); + background-repeat: repeat-x; +} +.panel-warning > .panel-heading { + background-image: -webkit-linear-gradient(top, #fcf8e3 0%, #faf2cc 100%); + background-image: -o-linear-gradient(top, #fcf8e3 0%, #faf2cc 100%); + background-image: -webkit-gradient(linear, left top, left bottom, from(#fcf8e3), to(#faf2cc)); + background-image: linear-gradient(to bottom, #fcf8e3 0%, #faf2cc 100%); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffcf8e3', endColorstr='#fffaf2cc', GradientType=0); + background-repeat: repeat-x; +} +.panel-danger > .panel-heading { + background-image: -webkit-linear-gradient(top, #f2dede 0%, #ebcccc 100%); + background-image: -o-linear-gradient(top, #f2dede 0%, #ebcccc 100%); + background-image: -webkit-gradient(linear, left top, left bottom, from(#f2dede), to(#ebcccc)); + background-image: linear-gradient(to bottom, #f2dede 0%, #ebcccc 100%); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff2dede', endColorstr='#ffebcccc', GradientType=0); + background-repeat: repeat-x; +} +.well { + background-image: -webkit-linear-gradient(top, #e8e8e8 0%, #f5f5f5 100%); + background-image: -o-linear-gradient(top, #e8e8e8 0%, #f5f5f5 100%); + background-image: -webkit-gradient(linear, left top, left bottom, from(#e8e8e8), to(#f5f5f5)); + background-image: linear-gradient(to bottom, #e8e8e8 0%, #f5f5f5 100%); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffe8e8e8', endColorstr='#fff5f5f5', GradientType=0); + background-repeat: repeat-x; + border-color: #dcdcdc; + -webkit-box-shadow: inset 0 1px 3px rgba(0, 0, 0, .05), 0 1px 0 rgba(255, 255, 255, .1); + box-shadow: inset 0 1px 3px rgba(0, 0, 0, .05), 0 1px 0 rgba(255, 255, 255, .1); +} +/*# sourceMappingURL=bootstrap-theme.css.map */ diff --git a/blockly/_pv_1_4_0/webif/static/css/bootstrap-theme.css.map b/blockly/_pv_1_4_0/webif/static/css/bootstrap-theme.css.map new file mode 100755 index 000000000..d876f60fb --- /dev/null +++ b/blockly/_pv_1_4_0/webif/static/css/bootstrap-theme.css.map @@ -0,0 +1 @@ +{"version":3,"sources":["bootstrap-theme.css","less/theme.less","less/mixins/vendor-prefixes.less","less/mixins/gradients.less","less/mixins/reset-filter.less"],"names":[],"mappings":"AAAA;;;;GAIG;ACeH;;;;;;EAME,yCAAA;EC2CA,4FAAA;EACQ,oFAAA;CFvDT;ACgBC;;;;;;;;;;;;ECsCA,yDAAA;EACQ,iDAAA;CFxCT;ACMC;;;;;;;;;;;;;;;;;;ECiCA,yBAAA;EACQ,iBAAA;CFnBT;AC/BD;;;;;;EAuBI,kBAAA;CDgBH;ACyBC;;EAEE,uBAAA;CDvBH;AC4BD;EErEI,sEAAA;EACA,iEAAA;EACA,2FAAA;EAAA,oEAAA;EAEA,uHAAA;ECnBF,oEAAA;EH4CA,4BAAA;EACA,sBAAA;EAuC2C,0BAAA;EAA2B,mBAAA;CDjBvE;ACpBC;;EAEE,0BAAA;EACA,6BAAA;CDsBH;ACnBC;;EAEE,0BAAA;EACA,sBAAA;CDqBH;ACfG;;;;;;;;;;;;;;;;;;EAME,0BAAA;EACA,uBAAA;CD6BL;ACbD;EEtEI,yEAAA;EACA,oEAAA;EACA,8FAAA;EAAA,uEAAA;EAEA,uHAAA;ECnBF,oEAAA;EH4CA,4BAAA;EACA,sBAAA;CD8DD;AC5DC;;EAEE,0BAAA;EACA,6BAAA;CD8DH;AC3DC;;EAEE,0BAAA;EACA,sBAAA;CD6DH;ACvDG;;;;;;;;;;;;;;;;;;EAME,0BAAA;EACA,uBAAA;CDqEL;ACpDD;EEvEI,yEAAA;EACA,oEAAA;EACA,8FAAA;EAAA,uEAAA;EAEA,uHAAA;ECnBF,oEAAA;EH4CA,4BAAA;EACA,sBAAA;CDsGD;ACpGC;;EAEE,0BAAA;EACA,6BAAA;CDsGH;ACnGC;;EAEE,0BAAA;EACA,sBAAA;CDqGH;AC/FG;;;;;;;;;;;;;;;;;;EAME,0BAAA;EACA,uBAAA;CD6GL;AC3FD;EExEI,yEAAA;EACA,oEAAA;EACA,8FAAA;EAAA,uEAAA;EAEA,uHAAA;ECnBF,oEAAA;EH4CA,4BAAA;EACA,sBAAA;CD8ID;AC5IC;;EAEE,0BAAA;EACA,6BAAA;CD8IH;AC3IC;;EAEE,0BAAA;EACA,sBAAA;CD6IH;ACvIG;;;;;;;;;;;;;;;;;;EAME,0BAAA;EACA,uBAAA;CDqJL;AClID;EEzEI,yEAAA;EACA,oEAAA;EACA,8FAAA;EAAA,uEAAA;EAEA,uHAAA;ECnBF,oEAAA;EH4CA,4BAAA;EACA,sBAAA;CDsLD;ACpLC;;EAEE,0BAAA;EACA,6BAAA;CDsLH;ACnLC;;EAEE,0BAAA;EACA,sBAAA;CDqLH;AC/KG;;;;;;;;;;;;;;;;;;EAME,0BAAA;EACA,uBAAA;CD6LL;ACzKD;EE1EI,yEAAA;EACA,oEAAA;EACA,8FAAA;EAAA,uEAAA;EAEA,uHAAA;ECnBF,oEAAA;EH4CA,4BAAA;EACA,sBAAA;CD8ND;AC5NC;;EAEE,0BAAA;EACA,6BAAA;CD8NH;AC3NC;;EAEE,0BAAA;EACA,sBAAA;CD6NH;ACvNG;;;;;;;;;;;;;;;;;;EAME,0BAAA;EACA,uBAAA;CDqOL;AC1MD;;EClCE,mDAAA;EACQ,2CAAA;CFgPT;ACrMD;;EE3FI,yEAAA;EACA,oEAAA;EACA,8FAAA;EAAA,uEAAA;EACA,4BAAA;EACA,uHAAA;EF0FF,0BAAA;CD2MD;ACzMD;;;EEhGI,yEAAA;EACA,oEAAA;EACA,8FAAA;EAAA,uEAAA;EACA,4BAAA;EACA,uHAAA;EFgGF,0BAAA;CD+MD;ACtMD;EE7GI,yEAAA;EACA,oEAAA;EACA,8FAAA;EAAA,uEAAA;EACA,4BAAA;EACA,uHAAA;ECnBF,oEAAA;EH+HA,mBAAA;ECjEA,4FAAA;EACQ,oFAAA;CF8QT;ACjND;;EE7GI,yEAAA;EACA,oEAAA;EACA,8FAAA;EAAA,uEAAA;EACA,4BAAA;EACA,uHAAA;ED2CF,yDAAA;EACQ,iDAAA;CFwRT;AC9MD;;EAEE,+CAAA;CDgND;AC5MD;EEhII,sEAAA;EACA,iEAAA;EACA,2FAAA;EAAA,oEAAA;EACA,4BAAA;EACA,uHAAA;ECnBF,oEAAA;EHkJA,mBAAA;CDkND;ACrND;;EEhII,yEAAA;EACA,oEAAA;EACA,8FAAA;EAAA,uEAAA;EACA,4BAAA;EACA,uHAAA;ED2CF,wDAAA;EACQ,gDAAA;CF+ST;AC/ND;;EAYI,0CAAA;CDuNH;AClND;;;EAGE,iBAAA;CDoND;AC/LD;EAfI;;;IAGE,YAAA;IE7JF,yEAAA;IACA,oEAAA;IACA,8FAAA;IAAA,uEAAA;IACA,4BAAA;IACA,uHAAA;GH+WD;CACF;AC3MD;EACE,8CAAA;EC3HA,2FAAA;EACQ,mFAAA;CFyUT;ACnMD;EEtLI,yEAAA;EACA,oEAAA;EACA,8FAAA;EAAA,uEAAA;EACA,4BAAA;EACA,uHAAA;EF8KF,sBAAA;CD+MD;AC1MD;EEvLI,yEAAA;EACA,oEAAA;EACA,8FAAA;EAAA,uEAAA;EACA,4BAAA;EACA,uHAAA;EF8KF,sBAAA;CDuND;ACjND;EExLI,yEAAA;EACA,oEAAA;EACA,8FAAA;EAAA,uEAAA;EACA,4BAAA;EACA,uHAAA;EF8KF,sBAAA;CD+ND;ACxND;EEzLI,yEAAA;EACA,oEAAA;EACA,8FAAA;EAAA,uEAAA;EACA,4BAAA;EACA,uHAAA;EF8KF,sBAAA;CDuOD;ACxND;EEjMI,yEAAA;EACA,oEAAA;EACA,8FAAA;EAAA,uEAAA;EACA,4BAAA;EACA,uHAAA;CH4ZH;ACrND;EE3MI,yEAAA;EACA,oEAAA;EACA,8FAAA;EAAA,uEAAA;EACA,4BAAA;EACA,uHAAA;CHmaH;AC3ND;EE5MI,yEAAA;EACA,oEAAA;EACA,8FAAA;EAAA,uEAAA;EACA,4BAAA;EACA,uHAAA;CH0aH;ACjOD;EE7MI,yEAAA;EACA,oEAAA;EACA,8FAAA;EAAA,uEAAA;EACA,4BAAA;EACA,uHAAA;CHibH;ACvOD;EE9MI,yEAAA;EACA,oEAAA;EACA,8FAAA;EAAA,uEAAA;EACA,4BAAA;EACA,uHAAA;CHwbH;AC7OD;EE/MI,yEAAA;EACA,oEAAA;EACA,8FAAA;EAAA,uEAAA;EACA,4BAAA;EACA,uHAAA;CH+bH;AChPD;EElLI,8MAAA;EACA,yMAAA;EACA,sMAAA;CHqaH;AC5OD;EACE,mBAAA;EC9KA,mDAAA;EACQ,2CAAA;CF6ZT;AC7OD;;;EAGE,8BAAA;EEnOE,yEAAA;EACA,oEAAA;EACA,8FAAA;EAAA,uEAAA;EACA,4BAAA;EACA,uHAAA;EFiOF,sBAAA;CDmPD;ACxPD;;;EAQI,kBAAA;CDqPH;AC3OD;ECnME,kDAAA;EACQ,0CAAA;CFibT;ACrOD;EE5PI,yEAAA;EACA,oEAAA;EACA,8FAAA;EAAA,uEAAA;EACA,4BAAA;EACA,uHAAA;CHoeH;AC3OD;EE7PI,yEAAA;EACA,oEAAA;EACA,8FAAA;EAAA,uEAAA;EACA,4BAAA;EACA,uHAAA;CH2eH;ACjPD;EE9PI,yEAAA;EACA,oEAAA;EACA,8FAAA;EAAA,uEAAA;EACA,4BAAA;EACA,uHAAA;CHkfH;ACvPD;EE/PI,yEAAA;EACA,oEAAA;EACA,8FAAA;EAAA,uEAAA;EACA,4BAAA;EACA,uHAAA;CHyfH;AC7PD;EEhQI,yEAAA;EACA,oEAAA;EACA,8FAAA;EAAA,uEAAA;EACA,4BAAA;EACA,uHAAA;CHggBH;ACnQD;EEjQI,yEAAA;EACA,oEAAA;EACA,8FAAA;EAAA,uEAAA;EACA,4BAAA;EACA,uHAAA;CHugBH;ACnQD;EExQI,yEAAA;EACA,oEAAA;EACA,8FAAA;EAAA,uEAAA;EACA,4BAAA;EACA,uHAAA;EFsQF,sBAAA;EC3NA,0FAAA;EACQ,kFAAA;CFqeT","file":"bootstrap-theme.css","sourcesContent":["/*!\n * Bootstrap v3.3.7 (http://getbootstrap.com)\n * Copyright 2011-2016 Twitter, Inc.\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n */\n.btn-default,\n.btn-primary,\n.btn-success,\n.btn-info,\n.btn-warning,\n.btn-danger {\n text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.2);\n -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15), 0 1px 1px rgba(0, 0, 0, 0.075);\n box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15), 0 1px 1px rgba(0, 0, 0, 0.075);\n}\n.btn-default:active,\n.btn-primary:active,\n.btn-success:active,\n.btn-info:active,\n.btn-warning:active,\n.btn-danger:active,\n.btn-default.active,\n.btn-primary.active,\n.btn-success.active,\n.btn-info.active,\n.btn-warning.active,\n.btn-danger.active {\n -webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);\n box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);\n}\n.btn-default.disabled,\n.btn-primary.disabled,\n.btn-success.disabled,\n.btn-info.disabled,\n.btn-warning.disabled,\n.btn-danger.disabled,\n.btn-default[disabled],\n.btn-primary[disabled],\n.btn-success[disabled],\n.btn-info[disabled],\n.btn-warning[disabled],\n.btn-danger[disabled],\nfieldset[disabled] .btn-default,\nfieldset[disabled] .btn-primary,\nfieldset[disabled] .btn-success,\nfieldset[disabled] .btn-info,\nfieldset[disabled] .btn-warning,\nfieldset[disabled] .btn-danger {\n -webkit-box-shadow: none;\n box-shadow: none;\n}\n.btn-default .badge,\n.btn-primary .badge,\n.btn-success .badge,\n.btn-info .badge,\n.btn-warning .badge,\n.btn-danger .badge {\n text-shadow: none;\n}\n.btn:active,\n.btn.active {\n background-image: none;\n}\n.btn-default {\n background-image: -webkit-linear-gradient(top, #fff 0%, #e0e0e0 100%);\n background-image: -o-linear-gradient(top, #fff 0%, #e0e0e0 100%);\n background-image: linear-gradient(to bottom, #fff 0%, #e0e0e0 100%);\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#ffe0e0e0', GradientType=0);\n filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);\n background-repeat: repeat-x;\n border-color: #dbdbdb;\n text-shadow: 0 1px 0 #fff;\n border-color: #ccc;\n}\n.btn-default:hover,\n.btn-default:focus {\n background-color: #e0e0e0;\n background-position: 0 -15px;\n}\n.btn-default:active,\n.btn-default.active {\n background-color: #e0e0e0;\n border-color: #dbdbdb;\n}\n.btn-default.disabled,\n.btn-default[disabled],\nfieldset[disabled] .btn-default,\n.btn-default.disabled:hover,\n.btn-default[disabled]:hover,\nfieldset[disabled] .btn-default:hover,\n.btn-default.disabled:focus,\n.btn-default[disabled]:focus,\nfieldset[disabled] .btn-default:focus,\n.btn-default.disabled.focus,\n.btn-default[disabled].focus,\nfieldset[disabled] .btn-default.focus,\n.btn-default.disabled:active,\n.btn-default[disabled]:active,\nfieldset[disabled] .btn-default:active,\n.btn-default.disabled.active,\n.btn-default[disabled].active,\nfieldset[disabled] .btn-default.active {\n background-color: #e0e0e0;\n background-image: none;\n}\n.btn-primary {\n background-image: -webkit-linear-gradient(top, #337ab7 0%, #265a88 100%);\n background-image: -o-linear-gradient(top, #337ab7 0%, #265a88 100%);\n background-image: linear-gradient(to bottom, #337ab7 0%, #265a88 100%);\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff265a88', GradientType=0);\n filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);\n background-repeat: repeat-x;\n border-color: #245580;\n}\n.btn-primary:hover,\n.btn-primary:focus {\n background-color: #265a88;\n background-position: 0 -15px;\n}\n.btn-primary:active,\n.btn-primary.active {\n background-color: #265a88;\n border-color: #245580;\n}\n.btn-primary.disabled,\n.btn-primary[disabled],\nfieldset[disabled] .btn-primary,\n.btn-primary.disabled:hover,\n.btn-primary[disabled]:hover,\nfieldset[disabled] .btn-primary:hover,\n.btn-primary.disabled:focus,\n.btn-primary[disabled]:focus,\nfieldset[disabled] .btn-primary:focus,\n.btn-primary.disabled.focus,\n.btn-primary[disabled].focus,\nfieldset[disabled] .btn-primary.focus,\n.btn-primary.disabled:active,\n.btn-primary[disabled]:active,\nfieldset[disabled] .btn-primary:active,\n.btn-primary.disabled.active,\n.btn-primary[disabled].active,\nfieldset[disabled] .btn-primary.active {\n background-color: #265a88;\n background-image: none;\n}\n.btn-success {\n background-image: -webkit-linear-gradient(top, #5cb85c 0%, #419641 100%);\n background-image: -o-linear-gradient(top, #5cb85c 0%, #419641 100%);\n background-image: linear-gradient(to bottom, #5cb85c 0%, #419641 100%);\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5cb85c', endColorstr='#ff419641', GradientType=0);\n filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);\n background-repeat: repeat-x;\n border-color: #3e8f3e;\n}\n.btn-success:hover,\n.btn-success:focus {\n background-color: #419641;\n background-position: 0 -15px;\n}\n.btn-success:active,\n.btn-success.active {\n background-color: #419641;\n border-color: #3e8f3e;\n}\n.btn-success.disabled,\n.btn-success[disabled],\nfieldset[disabled] .btn-success,\n.btn-success.disabled:hover,\n.btn-success[disabled]:hover,\nfieldset[disabled] .btn-success:hover,\n.btn-success.disabled:focus,\n.btn-success[disabled]:focus,\nfieldset[disabled] .btn-success:focus,\n.btn-success.disabled.focus,\n.btn-success[disabled].focus,\nfieldset[disabled] .btn-success.focus,\n.btn-success.disabled:active,\n.btn-success[disabled]:active,\nfieldset[disabled] .btn-success:active,\n.btn-success.disabled.active,\n.btn-success[disabled].active,\nfieldset[disabled] .btn-success.active {\n background-color: #419641;\n background-image: none;\n}\n.btn-info {\n background-image: -webkit-linear-gradient(top, #5bc0de 0%, #2aabd2 100%);\n background-image: -o-linear-gradient(top, #5bc0de 0%, #2aabd2 100%);\n background-image: linear-gradient(to bottom, #5bc0de 0%, #2aabd2 100%);\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de', endColorstr='#ff2aabd2', GradientType=0);\n filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);\n background-repeat: repeat-x;\n border-color: #28a4c9;\n}\n.btn-info:hover,\n.btn-info:focus {\n background-color: #2aabd2;\n background-position: 0 -15px;\n}\n.btn-info:active,\n.btn-info.active {\n background-color: #2aabd2;\n border-color: #28a4c9;\n}\n.btn-info.disabled,\n.btn-info[disabled],\nfieldset[disabled] .btn-info,\n.btn-info.disabled:hover,\n.btn-info[disabled]:hover,\nfieldset[disabled] .btn-info:hover,\n.btn-info.disabled:focus,\n.btn-info[disabled]:focus,\nfieldset[disabled] .btn-info:focus,\n.btn-info.disabled.focus,\n.btn-info[disabled].focus,\nfieldset[disabled] .btn-info.focus,\n.btn-info.disabled:active,\n.btn-info[disabled]:active,\nfieldset[disabled] .btn-info:active,\n.btn-info.disabled.active,\n.btn-info[disabled].active,\nfieldset[disabled] .btn-info.active {\n background-color: #2aabd2;\n background-image: none;\n}\n.btn-warning {\n background-image: -webkit-linear-gradient(top, #f0ad4e 0%, #eb9316 100%);\n background-image: -o-linear-gradient(top, #f0ad4e 0%, #eb9316 100%);\n background-image: linear-gradient(to bottom, #f0ad4e 0%, #eb9316 100%);\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff0ad4e', endColorstr='#ffeb9316', GradientType=0);\n filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);\n background-repeat: repeat-x;\n border-color: #e38d13;\n}\n.btn-warning:hover,\n.btn-warning:focus {\n background-color: #eb9316;\n background-position: 0 -15px;\n}\n.btn-warning:active,\n.btn-warning.active {\n background-color: #eb9316;\n border-color: #e38d13;\n}\n.btn-warning.disabled,\n.btn-warning[disabled],\nfieldset[disabled] .btn-warning,\n.btn-warning.disabled:hover,\n.btn-warning[disabled]:hover,\nfieldset[disabled] .btn-warning:hover,\n.btn-warning.disabled:focus,\n.btn-warning[disabled]:focus,\nfieldset[disabled] .btn-warning:focus,\n.btn-warning.disabled.focus,\n.btn-warning[disabled].focus,\nfieldset[disabled] .btn-warning.focus,\n.btn-warning.disabled:active,\n.btn-warning[disabled]:active,\nfieldset[disabled] .btn-warning:active,\n.btn-warning.disabled.active,\n.btn-warning[disabled].active,\nfieldset[disabled] .btn-warning.active {\n background-color: #eb9316;\n background-image: none;\n}\n.btn-danger {\n background-image: -webkit-linear-gradient(top, #d9534f 0%, #c12e2a 100%);\n background-image: -o-linear-gradient(top, #d9534f 0%, #c12e2a 100%);\n background-image: linear-gradient(to bottom, #d9534f 0%, #c12e2a 100%);\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9534f', endColorstr='#ffc12e2a', GradientType=0);\n filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);\n background-repeat: repeat-x;\n border-color: #b92c28;\n}\n.btn-danger:hover,\n.btn-danger:focus {\n background-color: #c12e2a;\n background-position: 0 -15px;\n}\n.btn-danger:active,\n.btn-danger.active {\n background-color: #c12e2a;\n border-color: #b92c28;\n}\n.btn-danger.disabled,\n.btn-danger[disabled],\nfieldset[disabled] .btn-danger,\n.btn-danger.disabled:hover,\n.btn-danger[disabled]:hover,\nfieldset[disabled] .btn-danger:hover,\n.btn-danger.disabled:focus,\n.btn-danger[disabled]:focus,\nfieldset[disabled] .btn-danger:focus,\n.btn-danger.disabled.focus,\n.btn-danger[disabled].focus,\nfieldset[disabled] .btn-danger.focus,\n.btn-danger.disabled:active,\n.btn-danger[disabled]:active,\nfieldset[disabled] .btn-danger:active,\n.btn-danger.disabled.active,\n.btn-danger[disabled].active,\nfieldset[disabled] .btn-danger.active {\n background-color: #c12e2a;\n background-image: none;\n}\n.thumbnail,\n.img-thumbnail {\n -webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.075);\n box-shadow: 0 1px 2px rgba(0, 0, 0, 0.075);\n}\n.dropdown-menu > li > a:hover,\n.dropdown-menu > li > a:focus {\n background-image: -webkit-linear-gradient(top, #f5f5f5 0%, #e8e8e8 100%);\n background-image: -o-linear-gradient(top, #f5f5f5 0%, #e8e8e8 100%);\n background-image: linear-gradient(to bottom, #f5f5f5 0%, #e8e8e8 100%);\n background-repeat: repeat-x;\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff5f5f5', endColorstr='#ffe8e8e8', GradientType=0);\n background-color: #e8e8e8;\n}\n.dropdown-menu > .active > a,\n.dropdown-menu > .active > a:hover,\n.dropdown-menu > .active > a:focus {\n background-image: -webkit-linear-gradient(top, #337ab7 0%, #2e6da4 100%);\n background-image: -o-linear-gradient(top, #337ab7 0%, #2e6da4 100%);\n background-image: linear-gradient(to bottom, #337ab7 0%, #2e6da4 100%);\n background-repeat: repeat-x;\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff2e6da4', GradientType=0);\n background-color: #2e6da4;\n}\n.navbar-default {\n background-image: -webkit-linear-gradient(top, #ffffff 0%, #f8f8f8 100%);\n background-image: -o-linear-gradient(top, #ffffff 0%, #f8f8f8 100%);\n background-image: linear-gradient(to bottom, #ffffff 0%, #f8f8f8 100%);\n background-repeat: repeat-x;\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#fff8f8f8', GradientType=0);\n filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);\n border-radius: 4px;\n -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15), 0 1px 5px rgba(0, 0, 0, 0.075);\n box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15), 0 1px 5px rgba(0, 0, 0, 0.075);\n}\n.navbar-default .navbar-nav > .open > a,\n.navbar-default .navbar-nav > .active > a {\n background-image: -webkit-linear-gradient(top, #dbdbdb 0%, #e2e2e2 100%);\n background-image: -o-linear-gradient(top, #dbdbdb 0%, #e2e2e2 100%);\n background-image: linear-gradient(to bottom, #dbdbdb 0%, #e2e2e2 100%);\n background-repeat: repeat-x;\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffdbdbdb', endColorstr='#ffe2e2e2', GradientType=0);\n -webkit-box-shadow: inset 0 3px 9px rgba(0, 0, 0, 0.075);\n box-shadow: inset 0 3px 9px rgba(0, 0, 0, 0.075);\n}\n.navbar-brand,\n.navbar-nav > li > a {\n text-shadow: 0 1px 0 rgba(255, 255, 255, 0.25);\n}\n.navbar-inverse {\n background-image: -webkit-linear-gradient(top, #3c3c3c 0%, #222 100%);\n background-image: -o-linear-gradient(top, #3c3c3c 0%, #222 100%);\n background-image: linear-gradient(to bottom, #3c3c3c 0%, #222 100%);\n background-repeat: repeat-x;\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff3c3c3c', endColorstr='#ff222222', GradientType=0);\n filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);\n border-radius: 4px;\n}\n.navbar-inverse .navbar-nav > .open > a,\n.navbar-inverse .navbar-nav > .active > a {\n background-image: -webkit-linear-gradient(top, #080808 0%, #0f0f0f 100%);\n background-image: -o-linear-gradient(top, #080808 0%, #0f0f0f 100%);\n background-image: linear-gradient(to bottom, #080808 0%, #0f0f0f 100%);\n background-repeat: repeat-x;\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff080808', endColorstr='#ff0f0f0f', GradientType=0);\n -webkit-box-shadow: inset 0 3px 9px rgba(0, 0, 0, 0.25);\n box-shadow: inset 0 3px 9px rgba(0, 0, 0, 0.25);\n}\n.navbar-inverse .navbar-brand,\n.navbar-inverse .navbar-nav > li > a {\n text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);\n}\n.navbar-static-top,\n.navbar-fixed-top,\n.navbar-fixed-bottom {\n border-radius: 0;\n}\n@media (max-width: 767px) {\n .navbar .navbar-nav .open .dropdown-menu > .active > a,\n .navbar .navbar-nav .open .dropdown-menu > .active > a:hover,\n .navbar .navbar-nav .open .dropdown-menu > .active > a:focus {\n color: #fff;\n background-image: -webkit-linear-gradient(top, #337ab7 0%, #2e6da4 100%);\n background-image: -o-linear-gradient(top, #337ab7 0%, #2e6da4 100%);\n background-image: linear-gradient(to bottom, #337ab7 0%, #2e6da4 100%);\n background-repeat: repeat-x;\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff2e6da4', GradientType=0);\n }\n}\n.alert {\n text-shadow: 0 1px 0 rgba(255, 255, 255, 0.2);\n -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 1px 2px rgba(0, 0, 0, 0.05);\n box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 1px 2px rgba(0, 0, 0, 0.05);\n}\n.alert-success {\n background-image: -webkit-linear-gradient(top, #dff0d8 0%, #c8e5bc 100%);\n background-image: -o-linear-gradient(top, #dff0d8 0%, #c8e5bc 100%);\n background-image: linear-gradient(to bottom, #dff0d8 0%, #c8e5bc 100%);\n background-repeat: repeat-x;\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffdff0d8', endColorstr='#ffc8e5bc', GradientType=0);\n border-color: #b2dba1;\n}\n.alert-info {\n background-image: -webkit-linear-gradient(top, #d9edf7 0%, #b9def0 100%);\n background-image: -o-linear-gradient(top, #d9edf7 0%, #b9def0 100%);\n background-image: linear-gradient(to bottom, #d9edf7 0%, #b9def0 100%);\n background-repeat: repeat-x;\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9edf7', endColorstr='#ffb9def0', GradientType=0);\n border-color: #9acfea;\n}\n.alert-warning {\n background-image: -webkit-linear-gradient(top, #fcf8e3 0%, #f8efc0 100%);\n background-image: -o-linear-gradient(top, #fcf8e3 0%, #f8efc0 100%);\n background-image: linear-gradient(to bottom, #fcf8e3 0%, #f8efc0 100%);\n background-repeat: repeat-x;\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffcf8e3', endColorstr='#fff8efc0', GradientType=0);\n border-color: #f5e79e;\n}\n.alert-danger {\n background-image: -webkit-linear-gradient(top, #f2dede 0%, #e7c3c3 100%);\n background-image: -o-linear-gradient(top, #f2dede 0%, #e7c3c3 100%);\n background-image: linear-gradient(to bottom, #f2dede 0%, #e7c3c3 100%);\n background-repeat: repeat-x;\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff2dede', endColorstr='#ffe7c3c3', GradientType=0);\n border-color: #dca7a7;\n}\n.progress {\n background-image: -webkit-linear-gradient(top, #ebebeb 0%, #f5f5f5 100%);\n background-image: -o-linear-gradient(top, #ebebeb 0%, #f5f5f5 100%);\n background-image: linear-gradient(to bottom, #ebebeb 0%, #f5f5f5 100%);\n background-repeat: repeat-x;\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffebebeb', endColorstr='#fff5f5f5', GradientType=0);\n}\n.progress-bar {\n background-image: -webkit-linear-gradient(top, #337ab7 0%, #286090 100%);\n background-image: -o-linear-gradient(top, #337ab7 0%, #286090 100%);\n background-image: linear-gradient(to bottom, #337ab7 0%, #286090 100%);\n background-repeat: repeat-x;\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff286090', GradientType=0);\n}\n.progress-bar-success {\n background-image: -webkit-linear-gradient(top, #5cb85c 0%, #449d44 100%);\n background-image: -o-linear-gradient(top, #5cb85c 0%, #449d44 100%);\n background-image: linear-gradient(to bottom, #5cb85c 0%, #449d44 100%);\n background-repeat: repeat-x;\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5cb85c', endColorstr='#ff449d44', GradientType=0);\n}\n.progress-bar-info {\n background-image: -webkit-linear-gradient(top, #5bc0de 0%, #31b0d5 100%);\n background-image: -o-linear-gradient(top, #5bc0de 0%, #31b0d5 100%);\n background-image: linear-gradient(to bottom, #5bc0de 0%, #31b0d5 100%);\n background-repeat: repeat-x;\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de', endColorstr='#ff31b0d5', GradientType=0);\n}\n.progress-bar-warning {\n background-image: -webkit-linear-gradient(top, #f0ad4e 0%, #ec971f 100%);\n background-image: -o-linear-gradient(top, #f0ad4e 0%, #ec971f 100%);\n background-image: linear-gradient(to bottom, #f0ad4e 0%, #ec971f 100%);\n background-repeat: repeat-x;\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff0ad4e', endColorstr='#ffec971f', GradientType=0);\n}\n.progress-bar-danger {\n background-image: -webkit-linear-gradient(top, #d9534f 0%, #c9302c 100%);\n background-image: -o-linear-gradient(top, #d9534f 0%, #c9302c 100%);\n background-image: linear-gradient(to bottom, #d9534f 0%, #c9302c 100%);\n background-repeat: repeat-x;\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9534f', endColorstr='#ffc9302c', GradientType=0);\n}\n.progress-bar-striped {\n background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);\n background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);\n background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);\n}\n.list-group {\n border-radius: 4px;\n -webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.075);\n box-shadow: 0 1px 2px rgba(0, 0, 0, 0.075);\n}\n.list-group-item.active,\n.list-group-item.active:hover,\n.list-group-item.active:focus {\n text-shadow: 0 -1px 0 #286090;\n background-image: -webkit-linear-gradient(top, #337ab7 0%, #2b669a 100%);\n background-image: -o-linear-gradient(top, #337ab7 0%, #2b669a 100%);\n background-image: linear-gradient(to bottom, #337ab7 0%, #2b669a 100%);\n background-repeat: repeat-x;\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff2b669a', GradientType=0);\n border-color: #2b669a;\n}\n.list-group-item.active .badge,\n.list-group-item.active:hover .badge,\n.list-group-item.active:focus .badge {\n text-shadow: none;\n}\n.panel {\n -webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);\n box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);\n}\n.panel-default > .panel-heading {\n background-image: -webkit-linear-gradient(top, #f5f5f5 0%, #e8e8e8 100%);\n background-image: -o-linear-gradient(top, #f5f5f5 0%, #e8e8e8 100%);\n background-image: linear-gradient(to bottom, #f5f5f5 0%, #e8e8e8 100%);\n background-repeat: repeat-x;\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff5f5f5', endColorstr='#ffe8e8e8', GradientType=0);\n}\n.panel-primary > .panel-heading {\n background-image: -webkit-linear-gradient(top, #337ab7 0%, #2e6da4 100%);\n background-image: -o-linear-gradient(top, #337ab7 0%, #2e6da4 100%);\n background-image: linear-gradient(to bottom, #337ab7 0%, #2e6da4 100%);\n background-repeat: repeat-x;\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff2e6da4', GradientType=0);\n}\n.panel-success > .panel-heading {\n background-image: -webkit-linear-gradient(top, #dff0d8 0%, #d0e9c6 100%);\n background-image: -o-linear-gradient(top, #dff0d8 0%, #d0e9c6 100%);\n background-image: linear-gradient(to bottom, #dff0d8 0%, #d0e9c6 100%);\n background-repeat: repeat-x;\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffdff0d8', endColorstr='#ffd0e9c6', GradientType=0);\n}\n.panel-info > .panel-heading {\n background-image: -webkit-linear-gradient(top, #d9edf7 0%, #c4e3f3 100%);\n background-image: -o-linear-gradient(top, #d9edf7 0%, #c4e3f3 100%);\n background-image: linear-gradient(to bottom, #d9edf7 0%, #c4e3f3 100%);\n background-repeat: repeat-x;\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9edf7', endColorstr='#ffc4e3f3', GradientType=0);\n}\n.panel-warning > .panel-heading {\n background-image: -webkit-linear-gradient(top, #fcf8e3 0%, #faf2cc 100%);\n background-image: -o-linear-gradient(top, #fcf8e3 0%, #faf2cc 100%);\n background-image: linear-gradient(to bottom, #fcf8e3 0%, #faf2cc 100%);\n background-repeat: repeat-x;\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffcf8e3', endColorstr='#fffaf2cc', GradientType=0);\n}\n.panel-danger > .panel-heading {\n background-image: -webkit-linear-gradient(top, #f2dede 0%, #ebcccc 100%);\n background-image: -o-linear-gradient(top, #f2dede 0%, #ebcccc 100%);\n background-image: linear-gradient(to bottom, #f2dede 0%, #ebcccc 100%);\n background-repeat: repeat-x;\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff2dede', endColorstr='#ffebcccc', GradientType=0);\n}\n.well {\n background-image: -webkit-linear-gradient(top, #e8e8e8 0%, #f5f5f5 100%);\n background-image: -o-linear-gradient(top, #e8e8e8 0%, #f5f5f5 100%);\n background-image: linear-gradient(to bottom, #e8e8e8 0%, #f5f5f5 100%);\n background-repeat: repeat-x;\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffe8e8e8', endColorstr='#fff5f5f5', GradientType=0);\n border-color: #dcdcdc;\n -webkit-box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.05), 0 1px 0 rgba(255, 255, 255, 0.1);\n box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.05), 0 1px 0 rgba(255, 255, 255, 0.1);\n}\n/*# sourceMappingURL=bootstrap-theme.css.map */","/*!\n * Bootstrap v3.3.7 (http://getbootstrap.com)\n * Copyright 2011-2016 Twitter, Inc.\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n */\n\n//\n// Load core variables and mixins\n// --------------------------------------------------\n\n@import \"variables.less\";\n@import \"mixins.less\";\n\n\n//\n// Buttons\n// --------------------------------------------------\n\n// Common styles\n.btn-default,\n.btn-primary,\n.btn-success,\n.btn-info,\n.btn-warning,\n.btn-danger {\n text-shadow: 0 -1px 0 rgba(0,0,0,.2);\n @shadow: inset 0 1px 0 rgba(255,255,255,.15), 0 1px 1px rgba(0,0,0,.075);\n .box-shadow(@shadow);\n\n // Reset the shadow\n &:active,\n &.active {\n .box-shadow(inset 0 3px 5px rgba(0,0,0,.125));\n }\n\n &.disabled,\n &[disabled],\n fieldset[disabled] & {\n .box-shadow(none);\n }\n\n .badge {\n text-shadow: none;\n }\n}\n\n// Mixin for generating new styles\n.btn-styles(@btn-color: #555) {\n #gradient > .vertical(@start-color: @btn-color; @end-color: darken(@btn-color, 12%));\n .reset-filter(); // Disable gradients for IE9 because filter bleeds through rounded corners; see https://github.com/twbs/bootstrap/issues/10620\n background-repeat: repeat-x;\n border-color: darken(@btn-color, 14%);\n\n &:hover,\n &:focus {\n background-color: darken(@btn-color, 12%);\n background-position: 0 -15px;\n }\n\n &:active,\n &.active {\n background-color: darken(@btn-color, 12%);\n border-color: darken(@btn-color, 14%);\n }\n\n &.disabled,\n &[disabled],\n fieldset[disabled] & {\n &,\n &:hover,\n &:focus,\n &.focus,\n &:active,\n &.active {\n background-color: darken(@btn-color, 12%);\n background-image: none;\n }\n }\n}\n\n// Common styles\n.btn {\n // Remove the gradient for the pressed/active state\n &:active,\n &.active {\n background-image: none;\n }\n}\n\n// Apply the mixin to the buttons\n.btn-default { .btn-styles(@btn-default-bg); text-shadow: 0 1px 0 #fff; border-color: #ccc; }\n.btn-primary { .btn-styles(@btn-primary-bg); }\n.btn-success { .btn-styles(@btn-success-bg); }\n.btn-info { .btn-styles(@btn-info-bg); }\n.btn-warning { .btn-styles(@btn-warning-bg); }\n.btn-danger { .btn-styles(@btn-danger-bg); }\n\n\n//\n// Images\n// --------------------------------------------------\n\n.thumbnail,\n.img-thumbnail {\n .box-shadow(0 1px 2px rgba(0,0,0,.075));\n}\n\n\n//\n// Dropdowns\n// --------------------------------------------------\n\n.dropdown-menu > li > a:hover,\n.dropdown-menu > li > a:focus {\n #gradient > .vertical(@start-color: @dropdown-link-hover-bg; @end-color: darken(@dropdown-link-hover-bg, 5%));\n background-color: darken(@dropdown-link-hover-bg, 5%);\n}\n.dropdown-menu > .active > a,\n.dropdown-menu > .active > a:hover,\n.dropdown-menu > .active > a:focus {\n #gradient > .vertical(@start-color: @dropdown-link-active-bg; @end-color: darken(@dropdown-link-active-bg, 5%));\n background-color: darken(@dropdown-link-active-bg, 5%);\n}\n\n\n//\n// Navbar\n// --------------------------------------------------\n\n// Default navbar\n.navbar-default {\n #gradient > .vertical(@start-color: lighten(@navbar-default-bg, 10%); @end-color: @navbar-default-bg);\n .reset-filter(); // Remove gradient in IE<10 to fix bug where dropdowns don't get triggered\n border-radius: @navbar-border-radius;\n @shadow: inset 0 1px 0 rgba(255,255,255,.15), 0 1px 5px rgba(0,0,0,.075);\n .box-shadow(@shadow);\n\n .navbar-nav > .open > a,\n .navbar-nav > .active > a {\n #gradient > .vertical(@start-color: darken(@navbar-default-link-active-bg, 5%); @end-color: darken(@navbar-default-link-active-bg, 2%));\n .box-shadow(inset 0 3px 9px rgba(0,0,0,.075));\n }\n}\n.navbar-brand,\n.navbar-nav > li > a {\n text-shadow: 0 1px 0 rgba(255,255,255,.25);\n}\n\n// Inverted navbar\n.navbar-inverse {\n #gradient > .vertical(@start-color: lighten(@navbar-inverse-bg, 10%); @end-color: @navbar-inverse-bg);\n .reset-filter(); // Remove gradient in IE<10 to fix bug where dropdowns don't get triggered; see https://github.com/twbs/bootstrap/issues/10257\n border-radius: @navbar-border-radius;\n .navbar-nav > .open > a,\n .navbar-nav > .active > a {\n #gradient > .vertical(@start-color: @navbar-inverse-link-active-bg; @end-color: lighten(@navbar-inverse-link-active-bg, 2.5%));\n .box-shadow(inset 0 3px 9px rgba(0,0,0,.25));\n }\n\n .navbar-brand,\n .navbar-nav > li > a {\n text-shadow: 0 -1px 0 rgba(0,0,0,.25);\n }\n}\n\n// Undo rounded corners in static and fixed navbars\n.navbar-static-top,\n.navbar-fixed-top,\n.navbar-fixed-bottom {\n border-radius: 0;\n}\n\n// Fix active state of dropdown items in collapsed mode\n@media (max-width: @grid-float-breakpoint-max) {\n .navbar .navbar-nav .open .dropdown-menu > .active > a {\n &,\n &:hover,\n &:focus {\n color: #fff;\n #gradient > .vertical(@start-color: @dropdown-link-active-bg; @end-color: darken(@dropdown-link-active-bg, 5%));\n }\n }\n}\n\n\n//\n// Alerts\n// --------------------------------------------------\n\n// Common styles\n.alert {\n text-shadow: 0 1px 0 rgba(255,255,255,.2);\n @shadow: inset 0 1px 0 rgba(255,255,255,.25), 0 1px 2px rgba(0,0,0,.05);\n .box-shadow(@shadow);\n}\n\n// Mixin for generating new styles\n.alert-styles(@color) {\n #gradient > .vertical(@start-color: @color; @end-color: darken(@color, 7.5%));\n border-color: darken(@color, 15%);\n}\n\n// Apply the mixin to the alerts\n.alert-success { .alert-styles(@alert-success-bg); }\n.alert-info { .alert-styles(@alert-info-bg); }\n.alert-warning { .alert-styles(@alert-warning-bg); }\n.alert-danger { .alert-styles(@alert-danger-bg); }\n\n\n//\n// Progress bars\n// --------------------------------------------------\n\n// Give the progress background some depth\n.progress {\n #gradient > .vertical(@start-color: darken(@progress-bg, 4%); @end-color: @progress-bg)\n}\n\n// Mixin for generating new styles\n.progress-bar-styles(@color) {\n #gradient > .vertical(@start-color: @color; @end-color: darken(@color, 10%));\n}\n\n// Apply the mixin to the progress bars\n.progress-bar { .progress-bar-styles(@progress-bar-bg); }\n.progress-bar-success { .progress-bar-styles(@progress-bar-success-bg); }\n.progress-bar-info { .progress-bar-styles(@progress-bar-info-bg); }\n.progress-bar-warning { .progress-bar-styles(@progress-bar-warning-bg); }\n.progress-bar-danger { .progress-bar-styles(@progress-bar-danger-bg); }\n\n// Reset the striped class because our mixins don't do multiple gradients and\n// the above custom styles override the new `.progress-bar-striped` in v3.2.0.\n.progress-bar-striped {\n #gradient > .striped();\n}\n\n\n//\n// List groups\n// --------------------------------------------------\n\n.list-group {\n border-radius: @border-radius-base;\n .box-shadow(0 1px 2px rgba(0,0,0,.075));\n}\n.list-group-item.active,\n.list-group-item.active:hover,\n.list-group-item.active:focus {\n text-shadow: 0 -1px 0 darken(@list-group-active-bg, 10%);\n #gradient > .vertical(@start-color: @list-group-active-bg; @end-color: darken(@list-group-active-bg, 7.5%));\n border-color: darken(@list-group-active-border, 7.5%);\n\n .badge {\n text-shadow: none;\n }\n}\n\n\n//\n// Panels\n// --------------------------------------------------\n\n// Common styles\n.panel {\n .box-shadow(0 1px 2px rgba(0,0,0,.05));\n}\n\n// Mixin for generating new styles\n.panel-heading-styles(@color) {\n #gradient > .vertical(@start-color: @color; @end-color: darken(@color, 5%));\n}\n\n// Apply the mixin to the panel headings only\n.panel-default > .panel-heading { .panel-heading-styles(@panel-default-heading-bg); }\n.panel-primary > .panel-heading { .panel-heading-styles(@panel-primary-heading-bg); }\n.panel-success > .panel-heading { .panel-heading-styles(@panel-success-heading-bg); }\n.panel-info > .panel-heading { .panel-heading-styles(@panel-info-heading-bg); }\n.panel-warning > .panel-heading { .panel-heading-styles(@panel-warning-heading-bg); }\n.panel-danger > .panel-heading { .panel-heading-styles(@panel-danger-heading-bg); }\n\n\n//\n// Wells\n// --------------------------------------------------\n\n.well {\n #gradient > .vertical(@start-color: darken(@well-bg, 5%); @end-color: @well-bg);\n border-color: darken(@well-bg, 10%);\n @shadow: inset 0 1px 3px rgba(0,0,0,.05), 0 1px 0 rgba(255,255,255,.1);\n .box-shadow(@shadow);\n}\n","// Vendor Prefixes\n//\n// All vendor mixins are deprecated as of v3.2.0 due to the introduction of\n// Autoprefixer in our Gruntfile. They have been removed in v4.\n\n// - Animations\n// - Backface visibility\n// - Box shadow\n// - Box sizing\n// - Content columns\n// - Hyphens\n// - Placeholder text\n// - Transformations\n// - Transitions\n// - User Select\n\n\n// Animations\n.animation(@animation) {\n -webkit-animation: @animation;\n -o-animation: @animation;\n animation: @animation;\n}\n.animation-name(@name) {\n -webkit-animation-name: @name;\n animation-name: @name;\n}\n.animation-duration(@duration) {\n -webkit-animation-duration: @duration;\n animation-duration: @duration;\n}\n.animation-timing-function(@timing-function) {\n -webkit-animation-timing-function: @timing-function;\n animation-timing-function: @timing-function;\n}\n.animation-delay(@delay) {\n -webkit-animation-delay: @delay;\n animation-delay: @delay;\n}\n.animation-iteration-count(@iteration-count) {\n -webkit-animation-iteration-count: @iteration-count;\n animation-iteration-count: @iteration-count;\n}\n.animation-direction(@direction) {\n -webkit-animation-direction: @direction;\n animation-direction: @direction;\n}\n.animation-fill-mode(@fill-mode) {\n -webkit-animation-fill-mode: @fill-mode;\n animation-fill-mode: @fill-mode;\n}\n\n// Backface visibility\n// Prevent browsers from flickering when using CSS 3D transforms.\n// Default value is `visible`, but can be changed to `hidden`\n\n.backface-visibility(@visibility) {\n -webkit-backface-visibility: @visibility;\n -moz-backface-visibility: @visibility;\n backface-visibility: @visibility;\n}\n\n// Drop shadows\n//\n// Note: Deprecated `.box-shadow()` as of v3.1.0 since all of Bootstrap's\n// supported browsers that have box shadow capabilities now support it.\n\n.box-shadow(@shadow) {\n -webkit-box-shadow: @shadow; // iOS <4.3 & Android <4.1\n box-shadow: @shadow;\n}\n\n// Box sizing\n.box-sizing(@boxmodel) {\n -webkit-box-sizing: @boxmodel;\n -moz-box-sizing: @boxmodel;\n box-sizing: @boxmodel;\n}\n\n// CSS3 Content Columns\n.content-columns(@column-count; @column-gap: @grid-gutter-width) {\n -webkit-column-count: @column-count;\n -moz-column-count: @column-count;\n column-count: @column-count;\n -webkit-column-gap: @column-gap;\n -moz-column-gap: @column-gap;\n column-gap: @column-gap;\n}\n\n// Optional hyphenation\n.hyphens(@mode: auto) {\n word-wrap: break-word;\n -webkit-hyphens: @mode;\n -moz-hyphens: @mode;\n -ms-hyphens: @mode; // IE10+\n -o-hyphens: @mode;\n hyphens: @mode;\n}\n\n// Placeholder text\n.placeholder(@color: @input-color-placeholder) {\n // Firefox\n &::-moz-placeholder {\n color: @color;\n opacity: 1; // Override Firefox's unusual default opacity; see https://github.com/twbs/bootstrap/pull/11526\n }\n &:-ms-input-placeholder { color: @color; } // Internet Explorer 10+\n &::-webkit-input-placeholder { color: @color; } // Safari and Chrome\n}\n\n// Transformations\n.scale(@ratio) {\n -webkit-transform: scale(@ratio);\n -ms-transform: scale(@ratio); // IE9 only\n -o-transform: scale(@ratio);\n transform: scale(@ratio);\n}\n.scale(@ratioX; @ratioY) {\n -webkit-transform: scale(@ratioX, @ratioY);\n -ms-transform: scale(@ratioX, @ratioY); // IE9 only\n -o-transform: scale(@ratioX, @ratioY);\n transform: scale(@ratioX, @ratioY);\n}\n.scaleX(@ratio) {\n -webkit-transform: scaleX(@ratio);\n -ms-transform: scaleX(@ratio); // IE9 only\n -o-transform: scaleX(@ratio);\n transform: scaleX(@ratio);\n}\n.scaleY(@ratio) {\n -webkit-transform: scaleY(@ratio);\n -ms-transform: scaleY(@ratio); // IE9 only\n -o-transform: scaleY(@ratio);\n transform: scaleY(@ratio);\n}\n.skew(@x; @y) {\n -webkit-transform: skewX(@x) skewY(@y);\n -ms-transform: skewX(@x) skewY(@y); // See https://github.com/twbs/bootstrap/issues/4885; IE9+\n -o-transform: skewX(@x) skewY(@y);\n transform: skewX(@x) skewY(@y);\n}\n.translate(@x; @y) {\n -webkit-transform: translate(@x, @y);\n -ms-transform: translate(@x, @y); // IE9 only\n -o-transform: translate(@x, @y);\n transform: translate(@x, @y);\n}\n.translate3d(@x; @y; @z) {\n -webkit-transform: translate3d(@x, @y, @z);\n transform: translate3d(@x, @y, @z);\n}\n.rotate(@degrees) {\n -webkit-transform: rotate(@degrees);\n -ms-transform: rotate(@degrees); // IE9 only\n -o-transform: rotate(@degrees);\n transform: rotate(@degrees);\n}\n.rotateX(@degrees) {\n -webkit-transform: rotateX(@degrees);\n -ms-transform: rotateX(@degrees); // IE9 only\n -o-transform: rotateX(@degrees);\n transform: rotateX(@degrees);\n}\n.rotateY(@degrees) {\n -webkit-transform: rotateY(@degrees);\n -ms-transform: rotateY(@degrees); // IE9 only\n -o-transform: rotateY(@degrees);\n transform: rotateY(@degrees);\n}\n.perspective(@perspective) {\n -webkit-perspective: @perspective;\n -moz-perspective: @perspective;\n perspective: @perspective;\n}\n.perspective-origin(@perspective) {\n -webkit-perspective-origin: @perspective;\n -moz-perspective-origin: @perspective;\n perspective-origin: @perspective;\n}\n.transform-origin(@origin) {\n -webkit-transform-origin: @origin;\n -moz-transform-origin: @origin;\n -ms-transform-origin: @origin; // IE9 only\n transform-origin: @origin;\n}\n\n\n// Transitions\n\n.transition(@transition) {\n -webkit-transition: @transition;\n -o-transition: @transition;\n transition: @transition;\n}\n.transition-property(@transition-property) {\n -webkit-transition-property: @transition-property;\n transition-property: @transition-property;\n}\n.transition-delay(@transition-delay) {\n -webkit-transition-delay: @transition-delay;\n transition-delay: @transition-delay;\n}\n.transition-duration(@transition-duration) {\n -webkit-transition-duration: @transition-duration;\n transition-duration: @transition-duration;\n}\n.transition-timing-function(@timing-function) {\n -webkit-transition-timing-function: @timing-function;\n transition-timing-function: @timing-function;\n}\n.transition-transform(@transition) {\n -webkit-transition: -webkit-transform @transition;\n -moz-transition: -moz-transform @transition;\n -o-transition: -o-transform @transition;\n transition: transform @transition;\n}\n\n\n// User select\n// For selecting text on the page\n\n.user-select(@select) {\n -webkit-user-select: @select;\n -moz-user-select: @select;\n -ms-user-select: @select; // IE10+\n user-select: @select;\n}\n","// Gradients\n\n#gradient {\n\n // Horizontal gradient, from left to right\n //\n // Creates two color stops, start and end, by specifying a color and position for each color stop.\n // Color stops are not available in IE9 and below.\n .horizontal(@start-color: #555; @end-color: #333; @start-percent: 0%; @end-percent: 100%) {\n background-image: -webkit-linear-gradient(left, @start-color @start-percent, @end-color @end-percent); // Safari 5.1-6, Chrome 10+\n background-image: -o-linear-gradient(left, @start-color @start-percent, @end-color @end-percent); // Opera 12\n background-image: linear-gradient(to right, @start-color @start-percent, @end-color @end-percent); // Standard, IE10, Firefox 16+, Opera 12.10+, Safari 7+, Chrome 26+\n background-repeat: repeat-x;\n filter: e(%(\"progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=1)\",argb(@start-color),argb(@end-color))); // IE9 and down\n }\n\n // Vertical gradient, from top to bottom\n //\n // Creates two color stops, start and end, by specifying a color and position for each color stop.\n // Color stops are not available in IE9 and below.\n .vertical(@start-color: #555; @end-color: #333; @start-percent: 0%; @end-percent: 100%) {\n background-image: -webkit-linear-gradient(top, @start-color @start-percent, @end-color @end-percent); // Safari 5.1-6, Chrome 10+\n background-image: -o-linear-gradient(top, @start-color @start-percent, @end-color @end-percent); // Opera 12\n background-image: linear-gradient(to bottom, @start-color @start-percent, @end-color @end-percent); // Standard, IE10, Firefox 16+, Opera 12.10+, Safari 7+, Chrome 26+\n background-repeat: repeat-x;\n filter: e(%(\"progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=0)\",argb(@start-color),argb(@end-color))); // IE9 and down\n }\n\n .directional(@start-color: #555; @end-color: #333; @deg: 45deg) {\n background-repeat: repeat-x;\n background-image: -webkit-linear-gradient(@deg, @start-color, @end-color); // Safari 5.1-6, Chrome 10+\n background-image: -o-linear-gradient(@deg, @start-color, @end-color); // Opera 12\n background-image: linear-gradient(@deg, @start-color, @end-color); // Standard, IE10, Firefox 16+, Opera 12.10+, Safari 7+, Chrome 26+\n }\n .horizontal-three-colors(@start-color: #00b3ee; @mid-color: #7a43b6; @color-stop: 50%; @end-color: #c3325f) {\n background-image: -webkit-linear-gradient(left, @start-color, @mid-color @color-stop, @end-color);\n background-image: -o-linear-gradient(left, @start-color, @mid-color @color-stop, @end-color);\n background-image: linear-gradient(to right, @start-color, @mid-color @color-stop, @end-color);\n background-repeat: no-repeat;\n filter: e(%(\"progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=1)\",argb(@start-color),argb(@end-color))); // IE9 and down, gets no color-stop at all for proper fallback\n }\n .vertical-three-colors(@start-color: #00b3ee; @mid-color: #7a43b6; @color-stop: 50%; @end-color: #c3325f) {\n background-image: -webkit-linear-gradient(@start-color, @mid-color @color-stop, @end-color);\n background-image: -o-linear-gradient(@start-color, @mid-color @color-stop, @end-color);\n background-image: linear-gradient(@start-color, @mid-color @color-stop, @end-color);\n background-repeat: no-repeat;\n filter: e(%(\"progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=0)\",argb(@start-color),argb(@end-color))); // IE9 and down, gets no color-stop at all for proper fallback\n }\n .radial(@inner-color: #555; @outer-color: #333) {\n background-image: -webkit-radial-gradient(circle, @inner-color, @outer-color);\n background-image: radial-gradient(circle, @inner-color, @outer-color);\n background-repeat: no-repeat;\n }\n .striped(@color: rgba(255,255,255,.15); @angle: 45deg) {\n background-image: -webkit-linear-gradient(@angle, @color 25%, transparent 25%, transparent 50%, @color 50%, @color 75%, transparent 75%, transparent);\n background-image: -o-linear-gradient(@angle, @color 25%, transparent 25%, transparent 50%, @color 50%, @color 75%, transparent 75%, transparent);\n background-image: linear-gradient(@angle, @color 25%, transparent 25%, transparent 50%, @color 50%, @color 75%, transparent 75%, transparent);\n }\n}\n","// Reset filters for IE\n//\n// When you need to remove a gradient background, do not forget to use this to reset\n// the IE filter for IE9 and below.\n\n.reset-filter() {\n filter: e(%(\"progid:DXImageTransform.Microsoft.gradient(enabled = false)\"));\n}\n"]} \ No newline at end of file diff --git a/blockly/_pv_1_4_0/webif/static/css/bootstrap-theme.min.css b/blockly/_pv_1_4_0/webif/static/css/bootstrap-theme.min.css new file mode 100755 index 000000000..5e3940195 --- /dev/null +++ b/blockly/_pv_1_4_0/webif/static/css/bootstrap-theme.min.css @@ -0,0 +1,6 @@ +/*! + * Bootstrap v3.3.7 (http://getbootstrap.com) + * Copyright 2011-2016 Twitter, Inc. + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) + */.btn-danger,.btn-default,.btn-info,.btn-primary,.btn-success,.btn-warning{text-shadow:0 -1px 0 rgba(0,0,0,.2);-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.15),0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 0 rgba(255,255,255,.15),0 1px 1px rgba(0,0,0,.075)}.btn-danger.active,.btn-danger:active,.btn-default.active,.btn-default:active,.btn-info.active,.btn-info:active,.btn-primary.active,.btn-primary:active,.btn-success.active,.btn-success:active,.btn-warning.active,.btn-warning:active{-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,.125);box-shadow:inset 0 3px 5px rgba(0,0,0,.125)}.btn-danger.disabled,.btn-danger[disabled],.btn-default.disabled,.btn-default[disabled],.btn-info.disabled,.btn-info[disabled],.btn-primary.disabled,.btn-primary[disabled],.btn-success.disabled,.btn-success[disabled],.btn-warning.disabled,.btn-warning[disabled],fieldset[disabled] .btn-danger,fieldset[disabled] .btn-default,fieldset[disabled] .btn-info,fieldset[disabled] .btn-primary,fieldset[disabled] .btn-success,fieldset[disabled] .btn-warning{-webkit-box-shadow:none;box-shadow:none}.btn-danger .badge,.btn-default .badge,.btn-info .badge,.btn-primary .badge,.btn-success .badge,.btn-warning .badge{text-shadow:none}.btn.active,.btn:active{background-image:none}.btn-default{text-shadow:0 1px 0 #fff;background-image:-webkit-linear-gradient(top,#fff 0,#e0e0e0 100%);background-image:-o-linear-gradient(top,#fff 0,#e0e0e0 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#fff),to(#e0e0e0));background-image:linear-gradient(to bottom,#fff 0,#e0e0e0 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#ffe0e0e0', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);background-repeat:repeat-x;border-color:#dbdbdb;border-color:#ccc}.btn-default:focus,.btn-default:hover{background-color:#e0e0e0;background-position:0 -15px}.btn-default.active,.btn-default:active{background-color:#e0e0e0;border-color:#dbdbdb}.btn-default.disabled,.btn-default.disabled.active,.btn-default.disabled.focus,.btn-default.disabled:active,.btn-default.disabled:focus,.btn-default.disabled:hover,.btn-default[disabled],.btn-default[disabled].active,.btn-default[disabled].focus,.btn-default[disabled]:active,.btn-default[disabled]:focus,.btn-default[disabled]:hover,fieldset[disabled] .btn-default,fieldset[disabled] .btn-default.active,fieldset[disabled] .btn-default.focus,fieldset[disabled] .btn-default:active,fieldset[disabled] .btn-default:focus,fieldset[disabled] .btn-default:hover{background-color:#e0e0e0;background-image:none}.btn-primary{background-image:-webkit-linear-gradient(top,#337ab7 0,#265a88 100%);background-image:-o-linear-gradient(top,#337ab7 0,#265a88 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#337ab7),to(#265a88));background-image:linear-gradient(to bottom,#337ab7 0,#265a88 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff265a88', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);background-repeat:repeat-x;border-color:#245580}.btn-primary:focus,.btn-primary:hover{background-color:#265a88;background-position:0 -15px}.btn-primary.active,.btn-primary:active{background-color:#265a88;border-color:#245580}.btn-primary.disabled,.btn-primary.disabled.active,.btn-primary.disabled.focus,.btn-primary.disabled:active,.btn-primary.disabled:focus,.btn-primary.disabled:hover,.btn-primary[disabled],.btn-primary[disabled].active,.btn-primary[disabled].focus,.btn-primary[disabled]:active,.btn-primary[disabled]:focus,.btn-primary[disabled]:hover,fieldset[disabled] .btn-primary,fieldset[disabled] .btn-primary.active,fieldset[disabled] .btn-primary.focus,fieldset[disabled] .btn-primary:active,fieldset[disabled] .btn-primary:focus,fieldset[disabled] .btn-primary:hover{background-color:#265a88;background-image:none}.btn-success{background-image:-webkit-linear-gradient(top,#5cb85c 0,#419641 100%);background-image:-o-linear-gradient(top,#5cb85c 0,#419641 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#5cb85c),to(#419641));background-image:linear-gradient(to bottom,#5cb85c 0,#419641 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5cb85c', endColorstr='#ff419641', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);background-repeat:repeat-x;border-color:#3e8f3e}.btn-success:focus,.btn-success:hover{background-color:#419641;background-position:0 -15px}.btn-success.active,.btn-success:active{background-color:#419641;border-color:#3e8f3e}.btn-success.disabled,.btn-success.disabled.active,.btn-success.disabled.focus,.btn-success.disabled:active,.btn-success.disabled:focus,.btn-success.disabled:hover,.btn-success[disabled],.btn-success[disabled].active,.btn-success[disabled].focus,.btn-success[disabled]:active,.btn-success[disabled]:focus,.btn-success[disabled]:hover,fieldset[disabled] .btn-success,fieldset[disabled] .btn-success.active,fieldset[disabled] .btn-success.focus,fieldset[disabled] .btn-success:active,fieldset[disabled] .btn-success:focus,fieldset[disabled] .btn-success:hover{background-color:#419641;background-image:none}.btn-info{background-image:-webkit-linear-gradient(top,#5bc0de 0,#2aabd2 100%);background-image:-o-linear-gradient(top,#5bc0de 0,#2aabd2 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#5bc0de),to(#2aabd2));background-image:linear-gradient(to bottom,#5bc0de 0,#2aabd2 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de', endColorstr='#ff2aabd2', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);background-repeat:repeat-x;border-color:#28a4c9}.btn-info:focus,.btn-info:hover{background-color:#2aabd2;background-position:0 -15px}.btn-info.active,.btn-info:active{background-color:#2aabd2;border-color:#28a4c9}.btn-info.disabled,.btn-info.disabled.active,.btn-info.disabled.focus,.btn-info.disabled:active,.btn-info.disabled:focus,.btn-info.disabled:hover,.btn-info[disabled],.btn-info[disabled].active,.btn-info[disabled].focus,.btn-info[disabled]:active,.btn-info[disabled]:focus,.btn-info[disabled]:hover,fieldset[disabled] .btn-info,fieldset[disabled] .btn-info.active,fieldset[disabled] .btn-info.focus,fieldset[disabled] .btn-info:active,fieldset[disabled] .btn-info:focus,fieldset[disabled] .btn-info:hover{background-color:#2aabd2;background-image:none}.btn-warning{background-image:-webkit-linear-gradient(top,#f0ad4e 0,#eb9316 100%);background-image:-o-linear-gradient(top,#f0ad4e 0,#eb9316 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#f0ad4e),to(#eb9316));background-image:linear-gradient(to bottom,#f0ad4e 0,#eb9316 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff0ad4e', endColorstr='#ffeb9316', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);background-repeat:repeat-x;border-color:#e38d13}.btn-warning:focus,.btn-warning:hover{background-color:#eb9316;background-position:0 -15px}.btn-warning.active,.btn-warning:active{background-color:#eb9316;border-color:#e38d13}.btn-warning.disabled,.btn-warning.disabled.active,.btn-warning.disabled.focus,.btn-warning.disabled:active,.btn-warning.disabled:focus,.btn-warning.disabled:hover,.btn-warning[disabled],.btn-warning[disabled].active,.btn-warning[disabled].focus,.btn-warning[disabled]:active,.btn-warning[disabled]:focus,.btn-warning[disabled]:hover,fieldset[disabled] .btn-warning,fieldset[disabled] .btn-warning.active,fieldset[disabled] .btn-warning.focus,fieldset[disabled] .btn-warning:active,fieldset[disabled] .btn-warning:focus,fieldset[disabled] .btn-warning:hover{background-color:#eb9316;background-image:none}.btn-danger{background-image:-webkit-linear-gradient(top,#d9534f 0,#c12e2a 100%);background-image:-o-linear-gradient(top,#d9534f 0,#c12e2a 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#d9534f),to(#c12e2a));background-image:linear-gradient(to bottom,#d9534f 0,#c12e2a 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9534f', endColorstr='#ffc12e2a', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);background-repeat:repeat-x;border-color:#b92c28}.btn-danger:focus,.btn-danger:hover{background-color:#c12e2a;background-position:0 -15px}.btn-danger.active,.btn-danger:active{background-color:#c12e2a;border-color:#b92c28}.btn-danger.disabled,.btn-danger.disabled.active,.btn-danger.disabled.focus,.btn-danger.disabled:active,.btn-danger.disabled:focus,.btn-danger.disabled:hover,.btn-danger[disabled],.btn-danger[disabled].active,.btn-danger[disabled].focus,.btn-danger[disabled]:active,.btn-danger[disabled]:focus,.btn-danger[disabled]:hover,fieldset[disabled] .btn-danger,fieldset[disabled] .btn-danger.active,fieldset[disabled] .btn-danger.focus,fieldset[disabled] .btn-danger:active,fieldset[disabled] .btn-danger:focus,fieldset[disabled] .btn-danger:hover{background-color:#c12e2a;background-image:none}.img-thumbnail,.thumbnail{-webkit-box-shadow:0 1px 2px rgba(0,0,0,.075);box-shadow:0 1px 2px rgba(0,0,0,.075)}.dropdown-menu>li>a:focus,.dropdown-menu>li>a:hover{background-color:#e8e8e8;background-image:-webkit-linear-gradient(top,#f5f5f5 0,#e8e8e8 100%);background-image:-o-linear-gradient(top,#f5f5f5 0,#e8e8e8 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#f5f5f5),to(#e8e8e8));background-image:linear-gradient(to bottom,#f5f5f5 0,#e8e8e8 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff5f5f5', endColorstr='#ffe8e8e8', GradientType=0);background-repeat:repeat-x}.dropdown-menu>.active>a,.dropdown-menu>.active>a:focus,.dropdown-menu>.active>a:hover{background-color:#2e6da4;background-image:-webkit-linear-gradient(top,#337ab7 0,#2e6da4 100%);background-image:-o-linear-gradient(top,#337ab7 0,#2e6da4 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#337ab7),to(#2e6da4));background-image:linear-gradient(to bottom,#337ab7 0,#2e6da4 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff2e6da4', GradientType=0);background-repeat:repeat-x}.navbar-default{background-image:-webkit-linear-gradient(top,#fff 0,#f8f8f8 100%);background-image:-o-linear-gradient(top,#fff 0,#f8f8f8 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#fff),to(#f8f8f8));background-image:linear-gradient(to bottom,#fff 0,#f8f8f8 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#fff8f8f8', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);background-repeat:repeat-x;border-radius:4px;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.15),0 1px 5px rgba(0,0,0,.075);box-shadow:inset 0 1px 0 rgba(255,255,255,.15),0 1px 5px rgba(0,0,0,.075)}.navbar-default .navbar-nav>.active>a,.navbar-default .navbar-nav>.open>a{background-image:-webkit-linear-gradient(top,#dbdbdb 0,#e2e2e2 100%);background-image:-o-linear-gradient(top,#dbdbdb 0,#e2e2e2 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#dbdbdb),to(#e2e2e2));background-image:linear-gradient(to bottom,#dbdbdb 0,#e2e2e2 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffdbdbdb', endColorstr='#ffe2e2e2', GradientType=0);background-repeat:repeat-x;-webkit-box-shadow:inset 0 3px 9px rgba(0,0,0,.075);box-shadow:inset 0 3px 9px rgba(0,0,0,.075)}.navbar-brand,.navbar-nav>li>a{text-shadow:0 1px 0 rgba(255,255,255,.25)}.navbar-inverse{background-image:-webkit-linear-gradient(top,#3c3c3c 0,#222 100%);background-image:-o-linear-gradient(top,#3c3c3c 0,#222 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#3c3c3c),to(#222));background-image:linear-gradient(to bottom,#3c3c3c 0,#222 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff3c3c3c', endColorstr='#ff222222', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);background-repeat:repeat-x;border-radius:4px}.navbar-inverse .navbar-nav>.active>a,.navbar-inverse .navbar-nav>.open>a{background-image:-webkit-linear-gradient(top,#080808 0,#0f0f0f 100%);background-image:-o-linear-gradient(top,#080808 0,#0f0f0f 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#080808),to(#0f0f0f));background-image:linear-gradient(to bottom,#080808 0,#0f0f0f 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff080808', endColorstr='#ff0f0f0f', GradientType=0);background-repeat:repeat-x;-webkit-box-shadow:inset 0 3px 9px rgba(0,0,0,.25);box-shadow:inset 0 3px 9px rgba(0,0,0,.25)}.navbar-inverse .navbar-brand,.navbar-inverse .navbar-nav>li>a{text-shadow:0 -1px 0 rgba(0,0,0,.25)}.navbar-fixed-bottom,.navbar-fixed-top,.navbar-static-top{border-radius:0}@media (max-width:767px){.navbar .navbar-nav .open .dropdown-menu>.active>a,.navbar .navbar-nav .open .dropdown-menu>.active>a:focus,.navbar .navbar-nav .open .dropdown-menu>.active>a:hover{color:#fff;background-image:-webkit-linear-gradient(top,#337ab7 0,#2e6da4 100%);background-image:-o-linear-gradient(top,#337ab7 0,#2e6da4 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#337ab7),to(#2e6da4));background-image:linear-gradient(to bottom,#337ab7 0,#2e6da4 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff2e6da4', GradientType=0);background-repeat:repeat-x}}.alert{text-shadow:0 1px 0 rgba(255,255,255,.2);-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.25),0 1px 2px rgba(0,0,0,.05);box-shadow:inset 0 1px 0 rgba(255,255,255,.25),0 1px 2px rgba(0,0,0,.05)}.alert-success{background-image:-webkit-linear-gradient(top,#dff0d8 0,#c8e5bc 100%);background-image:-o-linear-gradient(top,#dff0d8 0,#c8e5bc 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#dff0d8),to(#c8e5bc));background-image:linear-gradient(to bottom,#dff0d8 0,#c8e5bc 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffdff0d8', endColorstr='#ffc8e5bc', GradientType=0);background-repeat:repeat-x;border-color:#b2dba1}.alert-info{background-image:-webkit-linear-gradient(top,#d9edf7 0,#b9def0 100%);background-image:-o-linear-gradient(top,#d9edf7 0,#b9def0 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#d9edf7),to(#b9def0));background-image:linear-gradient(to bottom,#d9edf7 0,#b9def0 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9edf7', endColorstr='#ffb9def0', GradientType=0);background-repeat:repeat-x;border-color:#9acfea}.alert-warning{background-image:-webkit-linear-gradient(top,#fcf8e3 0,#f8efc0 100%);background-image:-o-linear-gradient(top,#fcf8e3 0,#f8efc0 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#fcf8e3),to(#f8efc0));background-image:linear-gradient(to bottom,#fcf8e3 0,#f8efc0 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffcf8e3', endColorstr='#fff8efc0', GradientType=0);background-repeat:repeat-x;border-color:#f5e79e}.alert-danger{background-image:-webkit-linear-gradient(top,#f2dede 0,#e7c3c3 100%);background-image:-o-linear-gradient(top,#f2dede 0,#e7c3c3 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#f2dede),to(#e7c3c3));background-image:linear-gradient(to bottom,#f2dede 0,#e7c3c3 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff2dede', endColorstr='#ffe7c3c3', GradientType=0);background-repeat:repeat-x;border-color:#dca7a7}.progress{background-image:-webkit-linear-gradient(top,#ebebeb 0,#f5f5f5 100%);background-image:-o-linear-gradient(top,#ebebeb 0,#f5f5f5 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#ebebeb),to(#f5f5f5));background-image:linear-gradient(to bottom,#ebebeb 0,#f5f5f5 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffebebeb', endColorstr='#fff5f5f5', GradientType=0);background-repeat:repeat-x}.progress-bar{background-image:-webkit-linear-gradient(top,#337ab7 0,#286090 100%);background-image:-o-linear-gradient(top,#337ab7 0,#286090 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#337ab7),to(#286090));background-image:linear-gradient(to bottom,#337ab7 0,#286090 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff286090', GradientType=0);background-repeat:repeat-x}.progress-bar-success{background-image:-webkit-linear-gradient(top,#5cb85c 0,#449d44 100%);background-image:-o-linear-gradient(top,#5cb85c 0,#449d44 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#5cb85c),to(#449d44));background-image:linear-gradient(to bottom,#5cb85c 0,#449d44 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5cb85c', endColorstr='#ff449d44', GradientType=0);background-repeat:repeat-x}.progress-bar-info{background-image:-webkit-linear-gradient(top,#5bc0de 0,#31b0d5 100%);background-image:-o-linear-gradient(top,#5bc0de 0,#31b0d5 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#5bc0de),to(#31b0d5));background-image:linear-gradient(to bottom,#5bc0de 0,#31b0d5 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de', endColorstr='#ff31b0d5', GradientType=0);background-repeat:repeat-x}.progress-bar-warning{background-image:-webkit-linear-gradient(top,#f0ad4e 0,#ec971f 100%);background-image:-o-linear-gradient(top,#f0ad4e 0,#ec971f 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#f0ad4e),to(#ec971f));background-image:linear-gradient(to bottom,#f0ad4e 0,#ec971f 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff0ad4e', endColorstr='#ffec971f', GradientType=0);background-repeat:repeat-x}.progress-bar-danger{background-image:-webkit-linear-gradient(top,#d9534f 0,#c9302c 100%);background-image:-o-linear-gradient(top,#d9534f 0,#c9302c 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#d9534f),to(#c9302c));background-image:linear-gradient(to bottom,#d9534f 0,#c9302c 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9534f', endColorstr='#ffc9302c', GradientType=0);background-repeat:repeat-x}.progress-bar-striped{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.list-group{border-radius:4px;-webkit-box-shadow:0 1px 2px rgba(0,0,0,.075);box-shadow:0 1px 2px rgba(0,0,0,.075)}.list-group-item.active,.list-group-item.active:focus,.list-group-item.active:hover{text-shadow:0 -1px 0 #286090;background-image:-webkit-linear-gradient(top,#337ab7 0,#2b669a 100%);background-image:-o-linear-gradient(top,#337ab7 0,#2b669a 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#337ab7),to(#2b669a));background-image:linear-gradient(to bottom,#337ab7 0,#2b669a 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff2b669a', GradientType=0);background-repeat:repeat-x;border-color:#2b669a}.list-group-item.active .badge,.list-group-item.active:focus .badge,.list-group-item.active:hover .badge{text-shadow:none}.panel{-webkit-box-shadow:0 1px 2px rgba(0,0,0,.05);box-shadow:0 1px 2px rgba(0,0,0,.05)}.panel-default>.panel-heading{background-image:-webkit-linear-gradient(top,#f5f5f5 0,#e8e8e8 100%);background-image:-o-linear-gradient(top,#f5f5f5 0,#e8e8e8 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#f5f5f5),to(#e8e8e8));background-image:linear-gradient(to bottom,#f5f5f5 0,#e8e8e8 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff5f5f5', endColorstr='#ffe8e8e8', GradientType=0);background-repeat:repeat-x}.panel-primary>.panel-heading{background-image:-webkit-linear-gradient(top,#337ab7 0,#2e6da4 100%);background-image:-o-linear-gradient(top,#337ab7 0,#2e6da4 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#337ab7),to(#2e6da4));background-image:linear-gradient(to bottom,#337ab7 0,#2e6da4 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff2e6da4', GradientType=0);background-repeat:repeat-x}.panel-success>.panel-heading{background-image:-webkit-linear-gradient(top,#dff0d8 0,#d0e9c6 100%);background-image:-o-linear-gradient(top,#dff0d8 0,#d0e9c6 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#dff0d8),to(#d0e9c6));background-image:linear-gradient(to bottom,#dff0d8 0,#d0e9c6 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffdff0d8', endColorstr='#ffd0e9c6', GradientType=0);background-repeat:repeat-x}.panel-info>.panel-heading{background-image:-webkit-linear-gradient(top,#d9edf7 0,#c4e3f3 100%);background-image:-o-linear-gradient(top,#d9edf7 0,#c4e3f3 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#d9edf7),to(#c4e3f3));background-image:linear-gradient(to bottom,#d9edf7 0,#c4e3f3 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9edf7', endColorstr='#ffc4e3f3', GradientType=0);background-repeat:repeat-x}.panel-warning>.panel-heading{background-image:-webkit-linear-gradient(top,#fcf8e3 0,#faf2cc 100%);background-image:-o-linear-gradient(top,#fcf8e3 0,#faf2cc 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#fcf8e3),to(#faf2cc));background-image:linear-gradient(to bottom,#fcf8e3 0,#faf2cc 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffcf8e3', endColorstr='#fffaf2cc', GradientType=0);background-repeat:repeat-x}.panel-danger>.panel-heading{background-image:-webkit-linear-gradient(top,#f2dede 0,#ebcccc 100%);background-image:-o-linear-gradient(top,#f2dede 0,#ebcccc 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#f2dede),to(#ebcccc));background-image:linear-gradient(to bottom,#f2dede 0,#ebcccc 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff2dede', endColorstr='#ffebcccc', GradientType=0);background-repeat:repeat-x}.well{background-image:-webkit-linear-gradient(top,#e8e8e8 0,#f5f5f5 100%);background-image:-o-linear-gradient(top,#e8e8e8 0,#f5f5f5 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#e8e8e8),to(#f5f5f5));background-image:linear-gradient(to bottom,#e8e8e8 0,#f5f5f5 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffe8e8e8', endColorstr='#fff5f5f5', GradientType=0);background-repeat:repeat-x;border-color:#dcdcdc;-webkit-box-shadow:inset 0 1px 3px rgba(0,0,0,.05),0 1px 0 rgba(255,255,255,.1);box-shadow:inset 0 1px 3px rgba(0,0,0,.05),0 1px 0 rgba(255,255,255,.1)} +/*# sourceMappingURL=bootstrap-theme.min.css.map */ \ No newline at end of file diff --git a/blockly/_pv_1_4_0/webif/static/css/bootstrap-theme.min.css.map b/blockly/_pv_1_4_0/webif/static/css/bootstrap-theme.min.css.map new file mode 100755 index 000000000..94813e900 --- /dev/null +++ b/blockly/_pv_1_4_0/webif/static/css/bootstrap-theme.min.css.map @@ -0,0 +1 @@ +{"version":3,"sources":["less/theme.less","less/mixins/vendor-prefixes.less","less/mixins/gradients.less","less/mixins/reset-filter.less"],"names":[],"mappings":";;;;AAmBA,YAAA,aAAA,UAAA,aAAA,aAAA,aAME,YAAA,EAAA,KAAA,EAAA,eC2CA,mBAAA,MAAA,EAAA,IAAA,EAAA,sBAAA,EAAA,IAAA,IAAA,iBACQ,WAAA,MAAA,EAAA,IAAA,EAAA,sBAAA,EAAA,IAAA,IAAA,iBDvCR,mBAAA,mBAAA,oBAAA,oBAAA,iBAAA,iBAAA,oBAAA,oBAAA,oBAAA,oBAAA,oBAAA,oBCsCA,mBAAA,MAAA,EAAA,IAAA,IAAA,iBACQ,WAAA,MAAA,EAAA,IAAA,IAAA,iBDlCR,qBAAA,sBAAA,sBAAA,uBAAA,mBAAA,oBAAA,sBAAA,uBAAA,sBAAA,uBAAA,sBAAA,uBAAA,+BAAA,gCAAA,6BAAA,gCAAA,gCAAA,gCCiCA,mBAAA,KACQ,WAAA,KDlDV,mBAAA,oBAAA,iBAAA,oBAAA,oBAAA,oBAuBI,YAAA,KAyCF,YAAA,YAEE,iBAAA,KAKJ,aErEI,YAAA,EAAA,IAAA,EAAA,KACA,iBAAA,iDACA,iBAAA,4CAAA,iBAAA,qEAEA,iBAAA,+CCnBF,OAAA,+GH4CA,OAAA,0DACA,kBAAA,SAuC2C,aAAA,QAA2B,aAAA,KArCtE,mBAAA,mBAEE,iBAAA,QACA,oBAAA,EAAA,MAGF,oBAAA,oBAEE,iBAAA,QACA,aAAA,QAMA,sBAAA,6BAAA,4BAAA,6BAAA,4BAAA,4BAAA,uBAAA,8BAAA,6BAAA,8BAAA,6BAAA,6BAAA,gCAAA,uCAAA,sCAAA,uCAAA,sCAAA,sCAME,iBAAA,QACA,iBAAA,KAgBN,aEtEI,iBAAA,oDACA,iBAAA,+CACA,iBAAA,wEAAA,iBAAA,kDAEA,OAAA,+GCnBF,OAAA,0DH4CA,kBAAA,SACA,aAAA,QAEA,mBAAA,mBAEE,iBAAA,QACA,oBAAA,EAAA,MAGF,oBAAA,oBAEE,iBAAA,QACA,aAAA,QAMA,sBAAA,6BAAA,4BAAA,6BAAA,4BAAA,4BAAA,uBAAA,8BAAA,6BAAA,8BAAA,6BAAA,6BAAA,gCAAA,uCAAA,sCAAA,uCAAA,sCAAA,sCAME,iBAAA,QACA,iBAAA,KAiBN,aEvEI,iBAAA,oDACA,iBAAA,+CACA,iBAAA,wEAAA,iBAAA,kDAEA,OAAA,+GCnBF,OAAA,0DH4CA,kBAAA,SACA,aAAA,QAEA,mBAAA,mBAEE,iBAAA,QACA,oBAAA,EAAA,MAGF,oBAAA,oBAEE,iBAAA,QACA,aAAA,QAMA,sBAAA,6BAAA,4BAAA,6BAAA,4BAAA,4BAAA,uBAAA,8BAAA,6BAAA,8BAAA,6BAAA,6BAAA,gCAAA,uCAAA,sCAAA,uCAAA,sCAAA,sCAME,iBAAA,QACA,iBAAA,KAkBN,UExEI,iBAAA,oDACA,iBAAA,+CACA,iBAAA,wEAAA,iBAAA,kDAEA,OAAA,+GCnBF,OAAA,0DH4CA,kBAAA,SACA,aAAA,QAEA,gBAAA,gBAEE,iBAAA,QACA,oBAAA,EAAA,MAGF,iBAAA,iBAEE,iBAAA,QACA,aAAA,QAMA,mBAAA,0BAAA,yBAAA,0BAAA,yBAAA,yBAAA,oBAAA,2BAAA,0BAAA,2BAAA,0BAAA,0BAAA,6BAAA,oCAAA,mCAAA,oCAAA,mCAAA,mCAME,iBAAA,QACA,iBAAA,KAmBN,aEzEI,iBAAA,oDACA,iBAAA,+CACA,iBAAA,wEAAA,iBAAA,kDAEA,OAAA,+GCnBF,OAAA,0DH4CA,kBAAA,SACA,aAAA,QAEA,mBAAA,mBAEE,iBAAA,QACA,oBAAA,EAAA,MAGF,oBAAA,oBAEE,iBAAA,QACA,aAAA,QAMA,sBAAA,6BAAA,4BAAA,6BAAA,4BAAA,4BAAA,uBAAA,8BAAA,6BAAA,8BAAA,6BAAA,6BAAA,gCAAA,uCAAA,sCAAA,uCAAA,sCAAA,sCAME,iBAAA,QACA,iBAAA,KAoBN,YE1EI,iBAAA,oDACA,iBAAA,+CACA,iBAAA,wEAAA,iBAAA,kDAEA,OAAA,+GCnBF,OAAA,0DH4CA,kBAAA,SACA,aAAA,QAEA,kBAAA,kBAEE,iBAAA,QACA,oBAAA,EAAA,MAGF,mBAAA,mBAEE,iBAAA,QACA,aAAA,QAMA,qBAAA,4BAAA,2BAAA,4BAAA,2BAAA,2BAAA,sBAAA,6BAAA,4BAAA,6BAAA,4BAAA,4BAAA,+BAAA,sCAAA,qCAAA,sCAAA,qCAAA,qCAME,iBAAA,QACA,iBAAA,KA2BN,eAAA,WClCE,mBAAA,EAAA,IAAA,IAAA,iBACQ,WAAA,EAAA,IAAA,IAAA,iBD2CV,0BAAA,0BE3FI,iBAAA,QACA,iBAAA,oDACA,iBAAA,+CAAA,iBAAA,wEACA,iBAAA,kDACA,OAAA,+GF0FF,kBAAA,SAEF,yBAAA,+BAAA,+BEhGI,iBAAA,QACA,iBAAA,oDACA,iBAAA,+CAAA,iBAAA,wEACA,iBAAA,kDACA,OAAA,+GFgGF,kBAAA,SASF,gBE7GI,iBAAA,iDACA,iBAAA,4CACA,iBAAA,qEAAA,iBAAA,+CACA,OAAA,+GACA,OAAA,0DCnBF,kBAAA,SH+HA,cAAA,ICjEA,mBAAA,MAAA,EAAA,IAAA,EAAA,sBAAA,EAAA,IAAA,IAAA,iBACQ,WAAA,MAAA,EAAA,IAAA,EAAA,sBAAA,EAAA,IAAA,IAAA,iBD6DV,sCAAA,oCE7GI,iBAAA,oDACA,iBAAA,+CACA,iBAAA,wEAAA,iBAAA,kDACA,OAAA,+GACA,kBAAA,SD2CF,mBAAA,MAAA,EAAA,IAAA,IAAA,iBACQ,WAAA,MAAA,EAAA,IAAA,IAAA,iBD0EV,cAAA,iBAEE,YAAA,EAAA,IAAA,EAAA,sBAIF,gBEhII,iBAAA,iDACA,iBAAA,4CACA,iBAAA,qEAAA,iBAAA,+CACA,OAAA,+GACA,OAAA,0DCnBF,kBAAA,SHkJA,cAAA,IAHF,sCAAA,oCEhII,iBAAA,oDACA,iBAAA,+CACA,iBAAA,wEAAA,iBAAA,kDACA,OAAA,+GACA,kBAAA,SD2CF,mBAAA,MAAA,EAAA,IAAA,IAAA,gBACQ,WAAA,MAAA,EAAA,IAAA,IAAA,gBDgFV,8BAAA,iCAYI,YAAA,EAAA,KAAA,EAAA,gBAKJ,qBAAA,kBAAA,mBAGE,cAAA,EAqBF,yBAfI,mDAAA,yDAAA,yDAGE,MAAA,KE7JF,iBAAA,oDACA,iBAAA,+CACA,iBAAA,wEAAA,iBAAA,kDACA,OAAA,+GACA,kBAAA,UFqKJ,OACE,YAAA,EAAA,IAAA,EAAA,qBC3HA,mBAAA,MAAA,EAAA,IAAA,EAAA,sBAAA,EAAA,IAAA,IAAA,gBACQ,WAAA,MAAA,EAAA,IAAA,EAAA,sBAAA,EAAA,IAAA,IAAA,gBDsIV,eEtLI,iBAAA,oDACA,iBAAA,+CACA,iBAAA,wEAAA,iBAAA,kDACA,OAAA,+GACA,kBAAA,SF8KF,aAAA,QAKF,YEvLI,iBAAA,oDACA,iBAAA,+CACA,iBAAA,wEAAA,iBAAA,kDACA,OAAA,+GACA,kBAAA,SF8KF,aAAA,QAMF,eExLI,iBAAA,oDACA,iBAAA,+CACA,iBAAA,wEAAA,iBAAA,kDACA,OAAA,+GACA,kBAAA,SF8KF,aAAA,QAOF,cEzLI,iBAAA,oDACA,iBAAA,+CACA,iBAAA,wEAAA,iBAAA,kDACA,OAAA,+GACA,kBAAA,SF8KF,aAAA,QAeF,UEjMI,iBAAA,oDACA,iBAAA,+CACA,iBAAA,wEAAA,iBAAA,kDACA,OAAA,+GACA,kBAAA,SFuMJ,cE3MI,iBAAA,oDACA,iBAAA,+CACA,iBAAA,wEAAA,iBAAA,kDACA,OAAA,+GACA,kBAAA,SFwMJ,sBE5MI,iBAAA,oDACA,iBAAA,+CACA,iBAAA,wEAAA,iBAAA,kDACA,OAAA,+GACA,kBAAA,SFyMJ,mBE7MI,iBAAA,oDACA,iBAAA,+CACA,iBAAA,wEAAA,iBAAA,kDACA,OAAA,+GACA,kBAAA,SF0MJ,sBE9MI,iBAAA,oDACA,iBAAA,+CACA,iBAAA,wEAAA,iBAAA,kDACA,OAAA,+GACA,kBAAA,SF2MJ,qBE/MI,iBAAA,oDACA,iBAAA,+CACA,iBAAA,wEAAA,iBAAA,kDACA,OAAA,+GACA,kBAAA,SF+MJ,sBElLI,iBAAA,yKACA,iBAAA,oKACA,iBAAA,iKFyLJ,YACE,cAAA,IC9KA,mBAAA,EAAA,IAAA,IAAA,iBACQ,WAAA,EAAA,IAAA,IAAA,iBDgLV,wBAAA,8BAAA,8BAGE,YAAA,EAAA,KAAA,EAAA,QEnOE,iBAAA,oDACA,iBAAA,+CACA,iBAAA,wEAAA,iBAAA,kDACA,OAAA,+GACA,kBAAA,SFiOF,aAAA,QALF,+BAAA,qCAAA,qCAQI,YAAA,KAUJ,OCnME,mBAAA,EAAA,IAAA,IAAA,gBACQ,WAAA,EAAA,IAAA,IAAA,gBD4MV,8BE5PI,iBAAA,oDACA,iBAAA,+CACA,iBAAA,wEAAA,iBAAA,kDACA,OAAA,+GACA,kBAAA,SFyPJ,8BE7PI,iBAAA,oDACA,iBAAA,+CACA,iBAAA,wEAAA,iBAAA,kDACA,OAAA,+GACA,kBAAA,SF0PJ,8BE9PI,iBAAA,oDACA,iBAAA,+CACA,iBAAA,wEAAA,iBAAA,kDACA,OAAA,+GACA,kBAAA,SF2PJ,2BE/PI,iBAAA,oDACA,iBAAA,+CACA,iBAAA,wEAAA,iBAAA,kDACA,OAAA,+GACA,kBAAA,SF4PJ,8BEhQI,iBAAA,oDACA,iBAAA,+CACA,iBAAA,wEAAA,iBAAA,kDACA,OAAA,+GACA,kBAAA,SF6PJ,6BEjQI,iBAAA,oDACA,iBAAA,+CACA,iBAAA,wEAAA,iBAAA,kDACA,OAAA,+GACA,kBAAA,SFoQJ,MExQI,iBAAA,oDACA,iBAAA,+CACA,iBAAA,wEAAA,iBAAA,kDACA,OAAA,+GACA,kBAAA,SFsQF,aAAA,QC3NA,mBAAA,MAAA,EAAA,IAAA,IAAA,gBAAA,EAAA,IAAA,EAAA,qBACQ,WAAA,MAAA,EAAA,IAAA,IAAA,gBAAA,EAAA,IAAA,EAAA","sourcesContent":["/*!\n * Bootstrap v3.3.7 (http://getbootstrap.com)\n * Copyright 2011-2016 Twitter, Inc.\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n */\n\n//\n// Load core variables and mixins\n// --------------------------------------------------\n\n@import \"variables.less\";\n@import \"mixins.less\";\n\n\n//\n// Buttons\n// --------------------------------------------------\n\n// Common styles\n.btn-default,\n.btn-primary,\n.btn-success,\n.btn-info,\n.btn-warning,\n.btn-danger {\n text-shadow: 0 -1px 0 rgba(0,0,0,.2);\n @shadow: inset 0 1px 0 rgba(255,255,255,.15), 0 1px 1px rgba(0,0,0,.075);\n .box-shadow(@shadow);\n\n // Reset the shadow\n &:active,\n &.active {\n .box-shadow(inset 0 3px 5px rgba(0,0,0,.125));\n }\n\n &.disabled,\n &[disabled],\n fieldset[disabled] & {\n .box-shadow(none);\n }\n\n .badge {\n text-shadow: none;\n }\n}\n\n// Mixin for generating new styles\n.btn-styles(@btn-color: #555) {\n #gradient > .vertical(@start-color: @btn-color; @end-color: darken(@btn-color, 12%));\n .reset-filter(); // Disable gradients for IE9 because filter bleeds through rounded corners; see https://github.com/twbs/bootstrap/issues/10620\n background-repeat: repeat-x;\n border-color: darken(@btn-color, 14%);\n\n &:hover,\n &:focus {\n background-color: darken(@btn-color, 12%);\n background-position: 0 -15px;\n }\n\n &:active,\n &.active {\n background-color: darken(@btn-color, 12%);\n border-color: darken(@btn-color, 14%);\n }\n\n &.disabled,\n &[disabled],\n fieldset[disabled] & {\n &,\n &:hover,\n &:focus,\n &.focus,\n &:active,\n &.active {\n background-color: darken(@btn-color, 12%);\n background-image: none;\n }\n }\n}\n\n// Common styles\n.btn {\n // Remove the gradient for the pressed/active state\n &:active,\n &.active {\n background-image: none;\n }\n}\n\n// Apply the mixin to the buttons\n.btn-default { .btn-styles(@btn-default-bg); text-shadow: 0 1px 0 #fff; border-color: #ccc; }\n.btn-primary { .btn-styles(@btn-primary-bg); }\n.btn-success { .btn-styles(@btn-success-bg); }\n.btn-info { .btn-styles(@btn-info-bg); }\n.btn-warning { .btn-styles(@btn-warning-bg); }\n.btn-danger { .btn-styles(@btn-danger-bg); }\n\n\n//\n// Images\n// --------------------------------------------------\n\n.thumbnail,\n.img-thumbnail {\n .box-shadow(0 1px 2px rgba(0,0,0,.075));\n}\n\n\n//\n// Dropdowns\n// --------------------------------------------------\n\n.dropdown-menu > li > a:hover,\n.dropdown-menu > li > a:focus {\n #gradient > .vertical(@start-color: @dropdown-link-hover-bg; @end-color: darken(@dropdown-link-hover-bg, 5%));\n background-color: darken(@dropdown-link-hover-bg, 5%);\n}\n.dropdown-menu > .active > a,\n.dropdown-menu > .active > a:hover,\n.dropdown-menu > .active > a:focus {\n #gradient > .vertical(@start-color: @dropdown-link-active-bg; @end-color: darken(@dropdown-link-active-bg, 5%));\n background-color: darken(@dropdown-link-active-bg, 5%);\n}\n\n\n//\n// Navbar\n// --------------------------------------------------\n\n// Default navbar\n.navbar-default {\n #gradient > .vertical(@start-color: lighten(@navbar-default-bg, 10%); @end-color: @navbar-default-bg);\n .reset-filter(); // Remove gradient in IE<10 to fix bug where dropdowns don't get triggered\n border-radius: @navbar-border-radius;\n @shadow: inset 0 1px 0 rgba(255,255,255,.15), 0 1px 5px rgba(0,0,0,.075);\n .box-shadow(@shadow);\n\n .navbar-nav > .open > a,\n .navbar-nav > .active > a {\n #gradient > .vertical(@start-color: darken(@navbar-default-link-active-bg, 5%); @end-color: darken(@navbar-default-link-active-bg, 2%));\n .box-shadow(inset 0 3px 9px rgba(0,0,0,.075));\n }\n}\n.navbar-brand,\n.navbar-nav > li > a {\n text-shadow: 0 1px 0 rgba(255,255,255,.25);\n}\n\n// Inverted navbar\n.navbar-inverse {\n #gradient > .vertical(@start-color: lighten(@navbar-inverse-bg, 10%); @end-color: @navbar-inverse-bg);\n .reset-filter(); // Remove gradient in IE<10 to fix bug where dropdowns don't get triggered; see https://github.com/twbs/bootstrap/issues/10257\n border-radius: @navbar-border-radius;\n .navbar-nav > .open > a,\n .navbar-nav > .active > a {\n #gradient > .vertical(@start-color: @navbar-inverse-link-active-bg; @end-color: lighten(@navbar-inverse-link-active-bg, 2.5%));\n .box-shadow(inset 0 3px 9px rgba(0,0,0,.25));\n }\n\n .navbar-brand,\n .navbar-nav > li > a {\n text-shadow: 0 -1px 0 rgba(0,0,0,.25);\n }\n}\n\n// Undo rounded corners in static and fixed navbars\n.navbar-static-top,\n.navbar-fixed-top,\n.navbar-fixed-bottom {\n border-radius: 0;\n}\n\n// Fix active state of dropdown items in collapsed mode\n@media (max-width: @grid-float-breakpoint-max) {\n .navbar .navbar-nav .open .dropdown-menu > .active > a {\n &,\n &:hover,\n &:focus {\n color: #fff;\n #gradient > .vertical(@start-color: @dropdown-link-active-bg; @end-color: darken(@dropdown-link-active-bg, 5%));\n }\n }\n}\n\n\n//\n// Alerts\n// --------------------------------------------------\n\n// Common styles\n.alert {\n text-shadow: 0 1px 0 rgba(255,255,255,.2);\n @shadow: inset 0 1px 0 rgba(255,255,255,.25), 0 1px 2px rgba(0,0,0,.05);\n .box-shadow(@shadow);\n}\n\n// Mixin for generating new styles\n.alert-styles(@color) {\n #gradient > .vertical(@start-color: @color; @end-color: darken(@color, 7.5%));\n border-color: darken(@color, 15%);\n}\n\n// Apply the mixin to the alerts\n.alert-success { .alert-styles(@alert-success-bg); }\n.alert-info { .alert-styles(@alert-info-bg); }\n.alert-warning { .alert-styles(@alert-warning-bg); }\n.alert-danger { .alert-styles(@alert-danger-bg); }\n\n\n//\n// Progress bars\n// --------------------------------------------------\n\n// Give the progress background some depth\n.progress {\n #gradient > .vertical(@start-color: darken(@progress-bg, 4%); @end-color: @progress-bg)\n}\n\n// Mixin for generating new styles\n.progress-bar-styles(@color) {\n #gradient > .vertical(@start-color: @color; @end-color: darken(@color, 10%));\n}\n\n// Apply the mixin to the progress bars\n.progress-bar { .progress-bar-styles(@progress-bar-bg); }\n.progress-bar-success { .progress-bar-styles(@progress-bar-success-bg); }\n.progress-bar-info { .progress-bar-styles(@progress-bar-info-bg); }\n.progress-bar-warning { .progress-bar-styles(@progress-bar-warning-bg); }\n.progress-bar-danger { .progress-bar-styles(@progress-bar-danger-bg); }\n\n// Reset the striped class because our mixins don't do multiple gradients and\n// the above custom styles override the new `.progress-bar-striped` in v3.2.0.\n.progress-bar-striped {\n #gradient > .striped();\n}\n\n\n//\n// List groups\n// --------------------------------------------------\n\n.list-group {\n border-radius: @border-radius-base;\n .box-shadow(0 1px 2px rgba(0,0,0,.075));\n}\n.list-group-item.active,\n.list-group-item.active:hover,\n.list-group-item.active:focus {\n text-shadow: 0 -1px 0 darken(@list-group-active-bg, 10%);\n #gradient > .vertical(@start-color: @list-group-active-bg; @end-color: darken(@list-group-active-bg, 7.5%));\n border-color: darken(@list-group-active-border, 7.5%);\n\n .badge {\n text-shadow: none;\n }\n}\n\n\n//\n// Panels\n// --------------------------------------------------\n\n// Common styles\n.panel {\n .box-shadow(0 1px 2px rgba(0,0,0,.05));\n}\n\n// Mixin for generating new styles\n.panel-heading-styles(@color) {\n #gradient > .vertical(@start-color: @color; @end-color: darken(@color, 5%));\n}\n\n// Apply the mixin to the panel headings only\n.panel-default > .panel-heading { .panel-heading-styles(@panel-default-heading-bg); }\n.panel-primary > .panel-heading { .panel-heading-styles(@panel-primary-heading-bg); }\n.panel-success > .panel-heading { .panel-heading-styles(@panel-success-heading-bg); }\n.panel-info > .panel-heading { .panel-heading-styles(@panel-info-heading-bg); }\n.panel-warning > .panel-heading { .panel-heading-styles(@panel-warning-heading-bg); }\n.panel-danger > .panel-heading { .panel-heading-styles(@panel-danger-heading-bg); }\n\n\n//\n// Wells\n// --------------------------------------------------\n\n.well {\n #gradient > .vertical(@start-color: darken(@well-bg, 5%); @end-color: @well-bg);\n border-color: darken(@well-bg, 10%);\n @shadow: inset 0 1px 3px rgba(0,0,0,.05), 0 1px 0 rgba(255,255,255,.1);\n .box-shadow(@shadow);\n}\n","// Vendor Prefixes\n//\n// All vendor mixins are deprecated as of v3.2.0 due to the introduction of\n// Autoprefixer in our Gruntfile. They have been removed in v4.\n\n// - Animations\n// - Backface visibility\n// - Box shadow\n// - Box sizing\n// - Content columns\n// - Hyphens\n// - Placeholder text\n// - Transformations\n// - Transitions\n// - User Select\n\n\n// Animations\n.animation(@animation) {\n -webkit-animation: @animation;\n -o-animation: @animation;\n animation: @animation;\n}\n.animation-name(@name) {\n -webkit-animation-name: @name;\n animation-name: @name;\n}\n.animation-duration(@duration) {\n -webkit-animation-duration: @duration;\n animation-duration: @duration;\n}\n.animation-timing-function(@timing-function) {\n -webkit-animation-timing-function: @timing-function;\n animation-timing-function: @timing-function;\n}\n.animation-delay(@delay) {\n -webkit-animation-delay: @delay;\n animation-delay: @delay;\n}\n.animation-iteration-count(@iteration-count) {\n -webkit-animation-iteration-count: @iteration-count;\n animation-iteration-count: @iteration-count;\n}\n.animation-direction(@direction) {\n -webkit-animation-direction: @direction;\n animation-direction: @direction;\n}\n.animation-fill-mode(@fill-mode) {\n -webkit-animation-fill-mode: @fill-mode;\n animation-fill-mode: @fill-mode;\n}\n\n// Backface visibility\n// Prevent browsers from flickering when using CSS 3D transforms.\n// Default value is `visible`, but can be changed to `hidden`\n\n.backface-visibility(@visibility) {\n -webkit-backface-visibility: @visibility;\n -moz-backface-visibility: @visibility;\n backface-visibility: @visibility;\n}\n\n// Drop shadows\n//\n// Note: Deprecated `.box-shadow()` as of v3.1.0 since all of Bootstrap's\n// supported browsers that have box shadow capabilities now support it.\n\n.box-shadow(@shadow) {\n -webkit-box-shadow: @shadow; // iOS <4.3 & Android <4.1\n box-shadow: @shadow;\n}\n\n// Box sizing\n.box-sizing(@boxmodel) {\n -webkit-box-sizing: @boxmodel;\n -moz-box-sizing: @boxmodel;\n box-sizing: @boxmodel;\n}\n\n// CSS3 Content Columns\n.content-columns(@column-count; @column-gap: @grid-gutter-width) {\n -webkit-column-count: @column-count;\n -moz-column-count: @column-count;\n column-count: @column-count;\n -webkit-column-gap: @column-gap;\n -moz-column-gap: @column-gap;\n column-gap: @column-gap;\n}\n\n// Optional hyphenation\n.hyphens(@mode: auto) {\n word-wrap: break-word;\n -webkit-hyphens: @mode;\n -moz-hyphens: @mode;\n -ms-hyphens: @mode; // IE10+\n -o-hyphens: @mode;\n hyphens: @mode;\n}\n\n// Placeholder text\n.placeholder(@color: @input-color-placeholder) {\n // Firefox\n &::-moz-placeholder {\n color: @color;\n opacity: 1; // Override Firefox's unusual default opacity; see https://github.com/twbs/bootstrap/pull/11526\n }\n &:-ms-input-placeholder { color: @color; } // Internet Explorer 10+\n &::-webkit-input-placeholder { color: @color; } // Safari and Chrome\n}\n\n// Transformations\n.scale(@ratio) {\n -webkit-transform: scale(@ratio);\n -ms-transform: scale(@ratio); // IE9 only\n -o-transform: scale(@ratio);\n transform: scale(@ratio);\n}\n.scale(@ratioX; @ratioY) {\n -webkit-transform: scale(@ratioX, @ratioY);\n -ms-transform: scale(@ratioX, @ratioY); // IE9 only\n -o-transform: scale(@ratioX, @ratioY);\n transform: scale(@ratioX, @ratioY);\n}\n.scaleX(@ratio) {\n -webkit-transform: scaleX(@ratio);\n -ms-transform: scaleX(@ratio); // IE9 only\n -o-transform: scaleX(@ratio);\n transform: scaleX(@ratio);\n}\n.scaleY(@ratio) {\n -webkit-transform: scaleY(@ratio);\n -ms-transform: scaleY(@ratio); // IE9 only\n -o-transform: scaleY(@ratio);\n transform: scaleY(@ratio);\n}\n.skew(@x; @y) {\n -webkit-transform: skewX(@x) skewY(@y);\n -ms-transform: skewX(@x) skewY(@y); // See https://github.com/twbs/bootstrap/issues/4885; IE9+\n -o-transform: skewX(@x) skewY(@y);\n transform: skewX(@x) skewY(@y);\n}\n.translate(@x; @y) {\n -webkit-transform: translate(@x, @y);\n -ms-transform: translate(@x, @y); // IE9 only\n -o-transform: translate(@x, @y);\n transform: translate(@x, @y);\n}\n.translate3d(@x; @y; @z) {\n -webkit-transform: translate3d(@x, @y, @z);\n transform: translate3d(@x, @y, @z);\n}\n.rotate(@degrees) {\n -webkit-transform: rotate(@degrees);\n -ms-transform: rotate(@degrees); // IE9 only\n -o-transform: rotate(@degrees);\n transform: rotate(@degrees);\n}\n.rotateX(@degrees) {\n -webkit-transform: rotateX(@degrees);\n -ms-transform: rotateX(@degrees); // IE9 only\n -o-transform: rotateX(@degrees);\n transform: rotateX(@degrees);\n}\n.rotateY(@degrees) {\n -webkit-transform: rotateY(@degrees);\n -ms-transform: rotateY(@degrees); // IE9 only\n -o-transform: rotateY(@degrees);\n transform: rotateY(@degrees);\n}\n.perspective(@perspective) {\n -webkit-perspective: @perspective;\n -moz-perspective: @perspective;\n perspective: @perspective;\n}\n.perspective-origin(@perspective) {\n -webkit-perspective-origin: @perspective;\n -moz-perspective-origin: @perspective;\n perspective-origin: @perspective;\n}\n.transform-origin(@origin) {\n -webkit-transform-origin: @origin;\n -moz-transform-origin: @origin;\n -ms-transform-origin: @origin; // IE9 only\n transform-origin: @origin;\n}\n\n\n// Transitions\n\n.transition(@transition) {\n -webkit-transition: @transition;\n -o-transition: @transition;\n transition: @transition;\n}\n.transition-property(@transition-property) {\n -webkit-transition-property: @transition-property;\n transition-property: @transition-property;\n}\n.transition-delay(@transition-delay) {\n -webkit-transition-delay: @transition-delay;\n transition-delay: @transition-delay;\n}\n.transition-duration(@transition-duration) {\n -webkit-transition-duration: @transition-duration;\n transition-duration: @transition-duration;\n}\n.transition-timing-function(@timing-function) {\n -webkit-transition-timing-function: @timing-function;\n transition-timing-function: @timing-function;\n}\n.transition-transform(@transition) {\n -webkit-transition: -webkit-transform @transition;\n -moz-transition: -moz-transform @transition;\n -o-transition: -o-transform @transition;\n transition: transform @transition;\n}\n\n\n// User select\n// For selecting text on the page\n\n.user-select(@select) {\n -webkit-user-select: @select;\n -moz-user-select: @select;\n -ms-user-select: @select; // IE10+\n user-select: @select;\n}\n","// Gradients\n\n#gradient {\n\n // Horizontal gradient, from left to right\n //\n // Creates two color stops, start and end, by specifying a color and position for each color stop.\n // Color stops are not available in IE9 and below.\n .horizontal(@start-color: #555; @end-color: #333; @start-percent: 0%; @end-percent: 100%) {\n background-image: -webkit-linear-gradient(left, @start-color @start-percent, @end-color @end-percent); // Safari 5.1-6, Chrome 10+\n background-image: -o-linear-gradient(left, @start-color @start-percent, @end-color @end-percent); // Opera 12\n background-image: linear-gradient(to right, @start-color @start-percent, @end-color @end-percent); // Standard, IE10, Firefox 16+, Opera 12.10+, Safari 7+, Chrome 26+\n background-repeat: repeat-x;\n filter: e(%(\"progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=1)\",argb(@start-color),argb(@end-color))); // IE9 and down\n }\n\n // Vertical gradient, from top to bottom\n //\n // Creates two color stops, start and end, by specifying a color and position for each color stop.\n // Color stops are not available in IE9 and below.\n .vertical(@start-color: #555; @end-color: #333; @start-percent: 0%; @end-percent: 100%) {\n background-image: -webkit-linear-gradient(top, @start-color @start-percent, @end-color @end-percent); // Safari 5.1-6, Chrome 10+\n background-image: -o-linear-gradient(top, @start-color @start-percent, @end-color @end-percent); // Opera 12\n background-image: linear-gradient(to bottom, @start-color @start-percent, @end-color @end-percent); // Standard, IE10, Firefox 16+, Opera 12.10+, Safari 7+, Chrome 26+\n background-repeat: repeat-x;\n filter: e(%(\"progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=0)\",argb(@start-color),argb(@end-color))); // IE9 and down\n }\n\n .directional(@start-color: #555; @end-color: #333; @deg: 45deg) {\n background-repeat: repeat-x;\n background-image: -webkit-linear-gradient(@deg, @start-color, @end-color); // Safari 5.1-6, Chrome 10+\n background-image: -o-linear-gradient(@deg, @start-color, @end-color); // Opera 12\n background-image: linear-gradient(@deg, @start-color, @end-color); // Standard, IE10, Firefox 16+, Opera 12.10+, Safari 7+, Chrome 26+\n }\n .horizontal-three-colors(@start-color: #00b3ee; @mid-color: #7a43b6; @color-stop: 50%; @end-color: #c3325f) {\n background-image: -webkit-linear-gradient(left, @start-color, @mid-color @color-stop, @end-color);\n background-image: -o-linear-gradient(left, @start-color, @mid-color @color-stop, @end-color);\n background-image: linear-gradient(to right, @start-color, @mid-color @color-stop, @end-color);\n background-repeat: no-repeat;\n filter: e(%(\"progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=1)\",argb(@start-color),argb(@end-color))); // IE9 and down, gets no color-stop at all for proper fallback\n }\n .vertical-three-colors(@start-color: #00b3ee; @mid-color: #7a43b6; @color-stop: 50%; @end-color: #c3325f) {\n background-image: -webkit-linear-gradient(@start-color, @mid-color @color-stop, @end-color);\n background-image: -o-linear-gradient(@start-color, @mid-color @color-stop, @end-color);\n background-image: linear-gradient(@start-color, @mid-color @color-stop, @end-color);\n background-repeat: no-repeat;\n filter: e(%(\"progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=0)\",argb(@start-color),argb(@end-color))); // IE9 and down, gets no color-stop at all for proper fallback\n }\n .radial(@inner-color: #555; @outer-color: #333) {\n background-image: -webkit-radial-gradient(circle, @inner-color, @outer-color);\n background-image: radial-gradient(circle, @inner-color, @outer-color);\n background-repeat: no-repeat;\n }\n .striped(@color: rgba(255,255,255,.15); @angle: 45deg) {\n background-image: -webkit-linear-gradient(@angle, @color 25%, transparent 25%, transparent 50%, @color 50%, @color 75%, transparent 75%, transparent);\n background-image: -o-linear-gradient(@angle, @color 25%, transparent 25%, transparent 50%, @color 50%, @color 75%, transparent 75%, transparent);\n background-image: linear-gradient(@angle, @color 25%, transparent 25%, transparent 50%, @color 50%, @color 75%, transparent 75%, transparent);\n }\n}\n","// Reset filters for IE\n//\n// When you need to remove a gradient background, do not forget to use this to reset\n// the IE filter for IE9 and below.\n\n.reset-filter() {\n filter: e(%(\"progid:DXImageTransform.Microsoft.gradient(enabled = false)\"));\n}\n"]} \ No newline at end of file diff --git a/blockly/_pv_1_4_0/webif/static/css/bootstrap-treeview.css b/blockly/_pv_1_4_0/webif/static/css/bootstrap-treeview.css new file mode 100755 index 000000000..23c6cf066 --- /dev/null +++ b/blockly/_pv_1_4_0/webif/static/css/bootstrap-treeview.css @@ -0,0 +1,37 @@ +/* ========================================================= + * bootstrap-treeview.css v1.2.0 + * ========================================================= + * Copyright 2013 Jonathan Miles + * Project URL : http://www.jondmiles.com/bootstrap-treeview + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ========================================================= */ + +.treeview .list-group-item { + cursor: pointer; +} + +.treeview span.indent { + margin-left: 10px; + margin-right: 10px; +} + +.treeview span.icon { + width: 12px; + margin-right: 5px; +} + +.treeview .node-disabled { + color: silver; + cursor: not-allowed; +} \ No newline at end of file diff --git a/blockly/_pv_1_4_0/webif/static/css/bootstrap-treeview.min.css b/blockly/_pv_1_4_0/webif/static/css/bootstrap-treeview.min.css new file mode 100755 index 000000000..57a348a87 --- /dev/null +++ b/blockly/_pv_1_4_0/webif/static/css/bootstrap-treeview.min.css @@ -0,0 +1 @@ +.treeview .list-group-item{cursor:pointer}.treeview span.indent{margin-left:10px;margin-right:10px}.treeview span.icon{width:12px;margin-right:5px}.treeview .node-disabled{color:silver;cursor:not-allowed} \ No newline at end of file diff --git a/blockly/_pv_1_4_0/webif/static/css/bootstrap.css b/blockly/_pv_1_4_0/webif/static/css/bootstrap.css new file mode 100755 index 000000000..6167622ce --- /dev/null +++ b/blockly/_pv_1_4_0/webif/static/css/bootstrap.css @@ -0,0 +1,6757 @@ +/*! + * Bootstrap v3.3.7 (http://getbootstrap.com) + * Copyright 2011-2016 Twitter, Inc. + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) + */ +/*! normalize.css v3.0.3 | MIT License | github.com/necolas/normalize.css */ +html { + font-family: sans-serif; + -webkit-text-size-adjust: 100%; + -ms-text-size-adjust: 100%; +} +body { + margin: 0; +} +article, +aside, +details, +figcaption, +figure, +footer, +header, +hgroup, +main, +menu, +nav, +section, +summary { + display: block; +} +audio, +canvas, +progress, +video { + display: inline-block; + vertical-align: baseline; +} +audio:not([controls]) { + display: none; + height: 0; +} +[hidden], +template { + display: none; +} +a { + background-color: transparent; +} +a:active, +a:hover { + outline: 0; +} +abbr[title] { + border-bottom: 1px dotted; +} +b, +strong { + font-weight: bold; +} +dfn { + font-style: italic; +} +h1 { + margin: .67em 0; + font-size: 2em; +} +mark { + color: #000; + background: #ff0; +} +small { + font-size: 80%; +} +sub, +sup { + position: relative; + font-size: 75%; + line-height: 0; + vertical-align: baseline; +} +sup { + top: -.5em; +} +sub { + bottom: -.25em; +} +img { + border: 0; +} +svg:not(:root) { + overflow: hidden; +} +figure { + margin: 1em 40px; +} +hr { + height: 0; + -webkit-box-sizing: content-box; + -moz-box-sizing: content-box; + box-sizing: content-box; +} +pre { + overflow: auto; +} +code, +kbd, +pre, +samp { + font-family: monospace, monospace; + font-size: 1em; +} +button, +input, +optgroup, +select, +textarea { + margin: 0; + font: inherit; + color: inherit; +} +button { + overflow: visible; +} +button, +select { + text-transform: none; +} +button, +html input[type="button"], +input[type="reset"], +input[type="submit"] { + -webkit-appearance: button; + cursor: pointer; +} +button[disabled], +html input[disabled] { + cursor: default; +} +button::-moz-focus-inner, +input::-moz-focus-inner { + padding: 0; + border: 0; +} +input { + line-height: normal; +} +input[type="checkbox"], +input[type="radio"] { + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; + padding: 0; +} +input[type="number"]::-webkit-inner-spin-button, +input[type="number"]::-webkit-outer-spin-button { + height: auto; +} +input[type="search"] { + -webkit-box-sizing: content-box; + -moz-box-sizing: content-box; + box-sizing: content-box; + -webkit-appearance: textfield; +} +input[type="search"]::-webkit-search-cancel-button, +input[type="search"]::-webkit-search-decoration { + -webkit-appearance: none; +} +fieldset { + padding: .35em .625em .75em; + margin: 0 2px; + border: 1px solid #c0c0c0; +} +legend { + padding: 0; + border: 0; +} +textarea { + overflow: auto; +} +optgroup { + font-weight: bold; +} +table { + border-spacing: 0; + border-collapse: collapse; +} +td, +th { + padding: 0; +} +/*! Source: https://github.com/h5bp/html5-boilerplate/blob/master/src/css/main.css */ +@media print { + *, + *:before, + *:after { + color: #000 !important; + text-shadow: none !important; + background: transparent !important; + -webkit-box-shadow: none !important; + box-shadow: none !important; + } + a, + a:visited { + text-decoration: underline; + } + a[href]:after { + content: " (" attr(href) ")"; + } + abbr[title]:after { + content: " (" attr(title) ")"; + } + a[href^="#"]:after, + a[href^="javascript:"]:after { + content: ""; + } + pre, + blockquote { + border: 1px solid #999; + + page-break-inside: avoid; + } + thead { + display: table-header-group; + } + tr, + img { + page-break-inside: avoid; + } + img { + max-width: 100% !important; + } + p, + h2, + h3 { + orphans: 3; + widows: 3; + } + h2, + h3 { + page-break-after: avoid; + } + .navbar { + display: none; + } + .btn > .caret, + .dropup > .btn > .caret { + border-top-color: #000 !important; + } + .label { + border: 1px solid #000; + } + .table { + border-collapse: collapse !important; + } + .table td, + .table th { + background-color: #fff !important; + } + .table-bordered th, + .table-bordered td { + border: 1px solid #ddd !important; + } +} +@font-face { + font-family: 'Glyphicons Halflings'; + + src: url('../fonts/glyphicons-halflings-regular.eot'); + src: url('../fonts/glyphicons-halflings-regular.eot?#iefix') format('embedded-opentype'), url('../fonts/glyphicons-halflings-regular.woff2') format('woff2'), url('../fonts/glyphicons-halflings-regular.woff') format('woff'), url('../fonts/glyphicons-halflings-regular.ttf') format('truetype'), url('../fonts/glyphicons-halflings-regular.svg#glyphicons_halflingsregular') format('svg'); +} +.glyphicon { + position: relative; + top: 1px; + display: inline-block; + font-family: 'Glyphicons Halflings'; + font-style: normal; + font-weight: normal; + line-height: 1; + + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; +} +.glyphicon-asterisk:before { + content: "\002a"; +} +.glyphicon-plus:before { + content: "\002b"; +} +.glyphicon-euro:before, +.glyphicon-eur:before { + content: "\20ac"; +} +.glyphicon-minus:before { + content: "\2212"; +} +.glyphicon-cloud:before { + content: "\2601"; +} +.glyphicon-envelope:before { + content: "\2709"; +} +.glyphicon-pencil:before { + content: "\270f"; +} +.glyphicon-glass:before { + content: "\e001"; +} +.glyphicon-music:before { + content: "\e002"; +} +.glyphicon-search:before { + content: "\e003"; +} +.glyphicon-heart:before { + content: "\e005"; +} +.glyphicon-star:before { + content: "\e006"; +} +.glyphicon-star-empty:before { + content: "\e007"; +} +.glyphicon-user:before { + content: "\e008"; +} +.glyphicon-film:before { + content: "\e009"; +} +.glyphicon-th-large:before { + content: "\e010"; +} +.glyphicon-th:before { + content: "\e011"; +} +.glyphicon-th-list:before { + content: "\e012"; +} +.glyphicon-ok:before { + content: "\e013"; +} +.glyphicon-remove:before { + content: "\e014"; +} +.glyphicon-zoom-in:before { + content: "\e015"; +} +.glyphicon-zoom-out:before { + content: "\e016"; +} +.glyphicon-off:before { + content: "\e017"; +} +.glyphicon-signal:before { + content: "\e018"; +} +.glyphicon-cog:before { + content: "\e019"; +} +.glyphicon-trash:before { + content: "\e020"; +} +.glyphicon-home:before { + content: "\e021"; +} +.glyphicon-file:before { + content: "\e022"; +} +.glyphicon-time:before { + content: "\e023"; +} +.glyphicon-road:before { + content: "\e024"; +} +.glyphicon-download-alt:before { + content: "\e025"; +} +.glyphicon-download:before { + content: "\e026"; +} +.glyphicon-upload:before { + content: "\e027"; +} +.glyphicon-inbox:before { + content: "\e028"; +} +.glyphicon-play-circle:before { + content: "\e029"; +} +.glyphicon-repeat:before { + content: "\e030"; +} +.glyphicon-refresh:before { + content: "\e031"; +} +.glyphicon-list-alt:before { + content: "\e032"; +} +.glyphicon-lock:before { + content: "\e033"; +} +.glyphicon-flag:before { + content: "\e034"; +} +.glyphicon-headphones:before { + content: "\e035"; +} +.glyphicon-volume-off:before { + content: "\e036"; +} +.glyphicon-volume-down:before { + content: "\e037"; +} +.glyphicon-volume-up:before { + content: "\e038"; +} +.glyphicon-qrcode:before { + content: "\e039"; +} +.glyphicon-barcode:before { + content: "\e040"; +} +.glyphicon-tag:before { + content: "\e041"; +} +.glyphicon-tags:before { + content: "\e042"; +} +.glyphicon-book:before { + content: "\e043"; +} +.glyphicon-bookmark:before { + content: "\e044"; +} +.glyphicon-print:before { + content: "\e045"; +} +.glyphicon-camera:before { + content: "\e046"; +} +.glyphicon-font:before { + content: "\e047"; +} +.glyphicon-bold:before { + content: "\e048"; +} +.glyphicon-italic:before { + content: "\e049"; +} +.glyphicon-text-height:before { + content: "\e050"; +} +.glyphicon-text-width:before { + content: "\e051"; +} +.glyphicon-align-left:before { + content: "\e052"; +} +.glyphicon-align-center:before { + content: "\e053"; +} +.glyphicon-align-right:before { + content: "\e054"; +} +.glyphicon-align-justify:before { + content: "\e055"; +} +.glyphicon-list:before { + content: "\e056"; +} +.glyphicon-indent-left:before { + content: "\e057"; +} +.glyphicon-indent-right:before { + content: "\e058"; +} +.glyphicon-facetime-video:before { + content: "\e059"; +} +.glyphicon-picture:before { + content: "\e060"; +} +.glyphicon-map-marker:before { + content: "\e062"; +} +.glyphicon-adjust:before { + content: "\e063"; +} +.glyphicon-tint:before { + content: "\e064"; +} +.glyphicon-edit:before { + content: "\e065"; +} +.glyphicon-share:before { + content: "\e066"; +} +.glyphicon-check:before { + content: "\e067"; +} +.glyphicon-move:before { + content: "\e068"; +} +.glyphicon-step-backward:before { + content: "\e069"; +} +.glyphicon-fast-backward:before { + content: "\e070"; +} +.glyphicon-backward:before { + content: "\e071"; +} +.glyphicon-play:before { + content: "\e072"; +} +.glyphicon-pause:before { + content: "\e073"; +} +.glyphicon-stop:before { + content: "\e074"; +} +.glyphicon-forward:before { + content: "\e075"; +} +.glyphicon-fast-forward:before { + content: "\e076"; +} +.glyphicon-step-forward:before { + content: "\e077"; +} +.glyphicon-eject:before { + content: "\e078"; +} +.glyphicon-chevron-left:before { + content: "\e079"; +} +.glyphicon-chevron-right:before { + content: "\e080"; +} +.glyphicon-plus-sign:before { + content: "\e081"; +} +.glyphicon-minus-sign:before { + content: "\e082"; +} +.glyphicon-remove-sign:before { + content: "\e083"; +} +.glyphicon-ok-sign:before { + content: "\e084"; +} +.glyphicon-question-sign:before { + content: "\e085"; +} +.glyphicon-info-sign:before { + content: "\e086"; +} +.glyphicon-screenshot:before { + content: "\e087"; +} +.glyphicon-remove-circle:before { + content: "\e088"; +} +.glyphicon-ok-circle:before { + content: "\e089"; +} +.glyphicon-ban-circle:before { + content: "\e090"; +} +.glyphicon-arrow-left:before { + content: "\e091"; +} +.glyphicon-arrow-right:before { + content: "\e092"; +} +.glyphicon-arrow-up:before { + content: "\e093"; +} +.glyphicon-arrow-down:before { + content: "\e094"; +} +.glyphicon-share-alt:before { + content: "\e095"; +} +.glyphicon-resize-full:before { + content: "\e096"; +} +.glyphicon-resize-small:before { + content: "\e097"; +} +.glyphicon-exclamation-sign:before { + content: "\e101"; +} +.glyphicon-gift:before { + content: "\e102"; +} +.glyphicon-leaf:before { + content: "\e103"; +} +.glyphicon-fire:before { + content: "\e104"; +} +.glyphicon-eye-open:before { + content: "\e105"; +} +.glyphicon-eye-close:before { + content: "\e106"; +} +.glyphicon-warning-sign:before { + content: "\e107"; +} +.glyphicon-plane:before { + content: "\e108"; +} +.glyphicon-calendar:before { + content: "\e109"; +} +.glyphicon-random:before { + content: "\e110"; +} +.glyphicon-comment:before { + content: "\e111"; +} +.glyphicon-magnet:before { + content: "\e112"; +} +.glyphicon-chevron-up:before { + content: "\e113"; +} +.glyphicon-chevron-down:before { + content: "\e114"; +} +.glyphicon-retweet:before { + content: "\e115"; +} +.glyphicon-shopping-cart:before { + content: "\e116"; +} +.glyphicon-folder-close:before { + content: "\e117"; +} +.glyphicon-folder-open:before { + content: "\e118"; +} +.glyphicon-resize-vertical:before { + content: "\e119"; +} +.glyphicon-resize-horizontal:before { + content: "\e120"; +} +.glyphicon-hdd:before { + content: "\e121"; +} +.glyphicon-bullhorn:before { + content: "\e122"; +} +.glyphicon-bell:before { + content: "\e123"; +} +.glyphicon-certificate:before { + content: "\e124"; +} +.glyphicon-thumbs-up:before { + content: "\e125"; +} +.glyphicon-thumbs-down:before { + content: "\e126"; +} +.glyphicon-hand-right:before { + content: "\e127"; +} +.glyphicon-hand-left:before { + content: "\e128"; +} +.glyphicon-hand-up:before { + content: "\e129"; +} +.glyphicon-hand-down:before { + content: "\e130"; +} +.glyphicon-circle-arrow-right:before { + content: "\e131"; +} +.glyphicon-circle-arrow-left:before { + content: "\e132"; +} +.glyphicon-circle-arrow-up:before { + content: "\e133"; +} +.glyphicon-circle-arrow-down:before { + content: "\e134"; +} +.glyphicon-globe:before { + content: "\e135"; +} +.glyphicon-wrench:before { + content: "\e136"; +} +.glyphicon-tasks:before { + content: "\e137"; +} +.glyphicon-filter:before { + content: "\e138"; +} +.glyphicon-briefcase:before { + content: "\e139"; +} +.glyphicon-fullscreen:before { + content: "\e140"; +} +.glyphicon-dashboard:before { + content: "\e141"; +} +.glyphicon-paperclip:before { + content: "\e142"; +} +.glyphicon-heart-empty:before { + content: "\e143"; +} +.glyphicon-link:before { + content: "\e144"; +} +.glyphicon-phone:before { + content: "\e145"; +} +.glyphicon-pushpin:before { + content: "\e146"; +} +.glyphicon-usd:before { + content: "\e148"; +} +.glyphicon-gbp:before { + content: "\e149"; +} +.glyphicon-sort:before { + content: "\e150"; +} +.glyphicon-sort-by-alphabet:before { + content: "\e151"; +} +.glyphicon-sort-by-alphabet-alt:before { + content: "\e152"; +} +.glyphicon-sort-by-order:before { + content: "\e153"; +} +.glyphicon-sort-by-order-alt:before { + content: "\e154"; +} +.glyphicon-sort-by-attributes:before { + content: "\e155"; +} +.glyphicon-sort-by-attributes-alt:before { + content: "\e156"; +} +.glyphicon-unchecked:before { + content: "\e157"; +} +.glyphicon-expand:before { + content: "\e158"; +} +.glyphicon-collapse-down:before { + content: "\e159"; +} +.glyphicon-collapse-up:before { + content: "\e160"; +} +.glyphicon-log-in:before { + content: "\e161"; +} +.glyphicon-flash:before { + content: "\e162"; +} +.glyphicon-log-out:before { + content: "\e163"; +} +.glyphicon-new-window:before { + content: "\e164"; +} +.glyphicon-record:before { + content: "\e165"; +} +.glyphicon-save:before { + content: "\e166"; +} +.glyphicon-open:before { + content: "\e167"; +} +.glyphicon-saved:before { + content: "\e168"; +} +.glyphicon-import:before { + content: "\e169"; +} +.glyphicon-export:before { + content: "\e170"; +} +.glyphicon-send:before { + content: "\e171"; +} +.glyphicon-floppy-disk:before { + content: "\e172"; +} +.glyphicon-floppy-saved:before { + content: "\e173"; +} +.glyphicon-floppy-remove:before { + content: "\e174"; +} +.glyphicon-floppy-save:before { + content: "\e175"; +} +.glyphicon-floppy-open:before { + content: "\e176"; +} +.glyphicon-credit-card:before { + content: "\e177"; +} +.glyphicon-transfer:before { + content: "\e178"; +} +.glyphicon-cutlery:before { + content: "\e179"; +} +.glyphicon-header:before { + content: "\e180"; +} +.glyphicon-compressed:before { + content: "\e181"; +} +.glyphicon-earphone:before { + content: "\e182"; +} +.glyphicon-phone-alt:before { + content: "\e183"; +} +.glyphicon-tower:before { + content: "\e184"; +} +.glyphicon-stats:before { + content: "\e185"; +} +.glyphicon-sd-video:before { + content: "\e186"; +} +.glyphicon-hd-video:before { + content: "\e187"; +} +.glyphicon-subtitles:before { + content: "\e188"; +} +.glyphicon-sound-stereo:before { + content: "\e189"; +} +.glyphicon-sound-dolby:before { + content: "\e190"; +} +.glyphicon-sound-5-1:before { + content: "\e191"; +} +.glyphicon-sound-6-1:before { + content: "\e192"; +} +.glyphicon-sound-7-1:before { + content: "\e193"; +} +.glyphicon-copyright-mark:before { + content: "\e194"; +} +.glyphicon-registration-mark:before { + content: "\e195"; +} +.glyphicon-cloud-download:before { + content: "\e197"; +} +.glyphicon-cloud-upload:before { + content: "\e198"; +} +.glyphicon-tree-conifer:before { + content: "\e199"; +} +.glyphicon-tree-deciduous:before { + content: "\e200"; +} +.glyphicon-cd:before { + content: "\e201"; +} +.glyphicon-save-file:before { + content: "\e202"; +} +.glyphicon-open-file:before { + content: "\e203"; +} +.glyphicon-level-up:before { + content: "\e204"; +} +.glyphicon-copy:before { + content: "\e205"; +} +.glyphicon-paste:before { + content: "\e206"; +} +.glyphicon-alert:before { + content: "\e209"; +} +.glyphicon-equalizer:before { + content: "\e210"; +} +.glyphicon-king:before { + content: "\e211"; +} +.glyphicon-queen:before { + content: "\e212"; +} +.glyphicon-pawn:before { + content: "\e213"; +} +.glyphicon-bishop:before { + content: "\e214"; +} +.glyphicon-knight:before { + content: "\e215"; +} +.glyphicon-baby-formula:before { + content: "\e216"; +} +.glyphicon-tent:before { + content: "\26fa"; +} +.glyphicon-blackboard:before { + content: "\e218"; +} +.glyphicon-bed:before { + content: "\e219"; +} +.glyphicon-apple:before { + content: "\f8ff"; +} +.glyphicon-erase:before { + content: "\e221"; +} +.glyphicon-hourglass:before { + content: "\231b"; +} +.glyphicon-lamp:before { + content: "\e223"; +} +.glyphicon-duplicate:before { + content: "\e224"; +} +.glyphicon-piggy-bank:before { + content: "\e225"; +} +.glyphicon-scissors:before { + content: "\e226"; +} +.glyphicon-bitcoin:before { + content: "\e227"; +} +.glyphicon-btc:before { + content: "\e227"; +} +.glyphicon-xbt:before { + content: "\e227"; +} +.glyphicon-yen:before { + content: "\00a5"; +} +.glyphicon-jpy:before { + content: "\00a5"; +} +.glyphicon-ruble:before { + content: "\20bd"; +} +.glyphicon-rub:before { + content: "\20bd"; +} +.glyphicon-scale:before { + content: "\e230"; +} +.glyphicon-ice-lolly:before { + content: "\e231"; +} +.glyphicon-ice-lolly-tasted:before { + content: "\e232"; +} +.glyphicon-education:before { + content: "\e233"; +} +.glyphicon-option-horizontal:before { + content: "\e234"; +} +.glyphicon-option-vertical:before { + content: "\e235"; +} +.glyphicon-menu-hamburger:before { + content: "\e236"; +} +.glyphicon-modal-window:before { + content: "\e237"; +} +.glyphicon-oil:before { + content: "\e238"; +} +.glyphicon-grain:before { + content: "\e239"; +} +.glyphicon-sunglasses:before { + content: "\e240"; +} +.glyphicon-text-size:before { + content: "\e241"; +} +.glyphicon-text-color:before { + content: "\e242"; +} +.glyphicon-text-background:before { + content: "\e243"; +} +.glyphicon-object-align-top:before { + content: "\e244"; +} +.glyphicon-object-align-bottom:before { + content: "\e245"; +} +.glyphicon-object-align-horizontal:before { + content: "\e246"; +} +.glyphicon-object-align-left:before { + content: "\e247"; +} +.glyphicon-object-align-vertical:before { + content: "\e248"; +} +.glyphicon-object-align-right:before { + content: "\e249"; +} +.glyphicon-triangle-right:before { + content: "\e250"; +} +.glyphicon-triangle-left:before { + content: "\e251"; +} +.glyphicon-triangle-bottom:before { + content: "\e252"; +} +.glyphicon-triangle-top:before { + content: "\e253"; +} +.glyphicon-console:before { + content: "\e254"; +} +.glyphicon-superscript:before { + content: "\e255"; +} +.glyphicon-subscript:before { + content: "\e256"; +} +.glyphicon-menu-left:before { + content: "\e257"; +} +.glyphicon-menu-right:before { + content: "\e258"; +} +.glyphicon-menu-down:before { + content: "\e259"; +} +.glyphicon-menu-up:before { + content: "\e260"; +} +* { + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; +} +*:before, +*:after { + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; +} +html { + font-size: 10px; + + -webkit-tap-highlight-color: rgba(0, 0, 0, 0); +} +body { + font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; + font-size: 14px; + line-height: 1.42857143; + color: #333; + background-color: #fff; +} +input, +button, +select, +textarea { + font-family: inherit; + font-size: inherit; + line-height: inherit; +} +a { + color: #337ab7; + text-decoration: none; +} +a:hover, +a:focus { + color: #23527c; + text-decoration: underline; +} +a:focus { + outline: 5px auto -webkit-focus-ring-color; + outline-offset: -2px; +} +figure { + margin: 0; +} +img { + vertical-align: middle; +} +.img-responsive, +.thumbnail > img, +.thumbnail a > img, +.carousel-inner > .item > img, +.carousel-inner > .item > a > img { + display: block; + max-width: 100%; + height: auto; +} +.img-rounded { + border-radius: 6px; +} +.img-thumbnail { + display: inline-block; + max-width: 100%; + height: auto; + padding: 4px; + line-height: 1.42857143; + background-color: #fff; + border: 1px solid #ddd; + border-radius: 4px; + -webkit-transition: all .2s ease-in-out; + -o-transition: all .2s ease-in-out; + transition: all .2s ease-in-out; +} +.img-circle { + border-radius: 50%; +} +hr { + margin-top: 20px; + margin-bottom: 20px; + border: 0; + border-top: 1px solid #eee; +} +.sr-only { + position: absolute; + width: 1px; + height: 1px; + padding: 0; + margin: -1px; + overflow: hidden; + clip: rect(0, 0, 0, 0); + border: 0; +} +.sr-only-focusable:active, +.sr-only-focusable:focus { + position: static; + width: auto; + height: auto; + margin: 0; + overflow: visible; + clip: auto; +} +[role="button"] { + cursor: pointer; +} +h1, +h2, +h3, +h4, +h5, +h6, +.h1, +.h2, +.h3, +.h4, +.h5, +.h6 { + font-family: inherit; + font-weight: 500; + line-height: 1.1; + color: inherit; +} +h1 small, +h2 small, +h3 small, +h4 small, +h5 small, +h6 small, +.h1 small, +.h2 small, +.h3 small, +.h4 small, +.h5 small, +.h6 small, +h1 .small, +h2 .small, +h3 .small, +h4 .small, +h5 .small, +h6 .small, +.h1 .small, +.h2 .small, +.h3 .small, +.h4 .small, +.h5 .small, +.h6 .small { + font-weight: normal; + line-height: 1; + color: #777; +} +h1, +.h1, +h2, +.h2, +h3, +.h3 { + margin-top: 20px; + margin-bottom: 10px; +} +h1 small, +.h1 small, +h2 small, +.h2 small, +h3 small, +.h3 small, +h1 .small, +.h1 .small, +h2 .small, +.h2 .small, +h3 .small, +.h3 .small { + font-size: 65%; +} +h4, +.h4, +h5, +.h5, +h6, +.h6 { + margin-top: 10px; + margin-bottom: 10px; +} +h4 small, +.h4 small, +h5 small, +.h5 small, +h6 small, +.h6 small, +h4 .small, +.h4 .small, +h5 .small, +.h5 .small, +h6 .small, +.h6 .small { + font-size: 75%; +} +h1, +.h1 { + font-size: 36px; +} +h2, +.h2 { + font-size: 30px; +} +h3, +.h3 { + font-size: 24px; +} +h4, +.h4 { + font-size: 18px; +} +h5, +.h5 { + font-size: 14px; +} +h6, +.h6 { + font-size: 12px; +} +p { + margin: 0 0 10px; +} +.lead { + margin-bottom: 20px; + font-size: 16px; + font-weight: 300; + line-height: 1.4; +} +@media (min-width: 768px) { + .lead { + font-size: 21px; + } +} +small, +.small { + font-size: 85%; +} +mark, +.mark { + padding: .2em; + background-color: #fcf8e3; +} +.text-left { + text-align: left; +} +.text-right { + text-align: right; +} +.text-center { + text-align: center; +} +.text-justify { + text-align: justify; +} +.text-nowrap { + white-space: nowrap; +} +.text-lowercase { + text-transform: lowercase; +} +.text-uppercase { + text-transform: uppercase; +} +.text-capitalize { + text-transform: capitalize; +} +.text-muted { + color: #777; +} +.text-primary { + color: #337ab7; +} +a.text-primary:hover, +a.text-primary:focus { + color: #286090; +} +.text-success { + color: #3c763d; +} +a.text-success:hover, +a.text-success:focus { + color: #2b542c; +} +.text-info { + color: #31708f; +} +a.text-info:hover, +a.text-info:focus { + color: #245269; +} +.text-warning { + color: #8a6d3b; +} +a.text-warning:hover, +a.text-warning:focus { + color: #66512c; +} +.text-danger { + color: #a94442; +} +a.text-danger:hover, +a.text-danger:focus { + color: #843534; +} +.bg-primary { + color: #fff; + background-color: #337ab7; +} +a.bg-primary:hover, +a.bg-primary:focus { + background-color: #286090; +} +.bg-success { + background-color: #dff0d8; +} +a.bg-success:hover, +a.bg-success:focus { + background-color: #c1e2b3; +} +.bg-info { + background-color: #d9edf7; +} +a.bg-info:hover, +a.bg-info:focus { + background-color: #afd9ee; +} +.bg-warning { + background-color: #fcf8e3; +} +a.bg-warning:hover, +a.bg-warning:focus { + background-color: #f7ecb5; +} +.bg-danger { + background-color: #f2dede; +} +a.bg-danger:hover, +a.bg-danger:focus { + background-color: #e4b9b9; +} +.page-header { + padding-bottom: 9px; + margin: 40px 0 20px; + border-bottom: 1px solid #eee; +} +ul, +ol { + margin-top: 0; + margin-bottom: 10px; +} +ul ul, +ol ul, +ul ol, +ol ol { + margin-bottom: 0; +} +.list-unstyled { + padding-left: 0; + list-style: none; +} +.list-inline { + padding-left: 0; + margin-left: -5px; + list-style: none; +} +.list-inline > li { + display: inline-block; + padding-right: 5px; + padding-left: 5px; +} +dl { + margin-top: 0; + margin-bottom: 20px; +} +dt, +dd { + line-height: 1.42857143; +} +dt { + font-weight: bold; +} +dd { + margin-left: 0; +} +@media (min-width: 768px) { + .dl-horizontal dt { + float: left; + width: 160px; + overflow: hidden; + clear: left; + text-align: right; + text-overflow: ellipsis; + white-space: nowrap; + } + .dl-horizontal dd { + margin-left: 180px; + } +} +abbr[title], +abbr[data-original-title] { + cursor: help; + border-bottom: 1px dotted #777; +} +.initialism { + font-size: 90%; + text-transform: uppercase; +} +blockquote { + padding: 10px 20px; + margin: 0 0 20px; + font-size: 17.5px; + border-left: 5px solid #eee; +} +blockquote p:last-child, +blockquote ul:last-child, +blockquote ol:last-child { + margin-bottom: 0; +} +blockquote footer, +blockquote small, +blockquote .small { + display: block; + font-size: 80%; + line-height: 1.42857143; + color: #777; +} +blockquote footer:before, +blockquote small:before, +blockquote .small:before { + content: '\2014 \00A0'; +} +.blockquote-reverse, +blockquote.pull-right { + padding-right: 15px; + padding-left: 0; + text-align: right; + border-right: 5px solid #eee; + border-left: 0; +} +.blockquote-reverse footer:before, +blockquote.pull-right footer:before, +.blockquote-reverse small:before, +blockquote.pull-right small:before, +.blockquote-reverse .small:before, +blockquote.pull-right .small:before { + content: ''; +} +.blockquote-reverse footer:after, +blockquote.pull-right footer:after, +.blockquote-reverse small:after, +blockquote.pull-right small:after, +.blockquote-reverse .small:after, +blockquote.pull-right .small:after { + content: '\00A0 \2014'; +} +address { + margin-bottom: 20px; + font-style: normal; + line-height: 1.42857143; +} +code, +kbd, +pre, +samp { + font-family: Menlo, Monaco, Consolas, "Courier New", monospace; +} +code { + padding: 2px 4px; + font-size: 90%; + color: #c7254e; + background-color: #f9f2f4; + border-radius: 4px; +} +kbd { + padding: 2px 4px; + font-size: 90%; + color: #fff; + background-color: #333; + border-radius: 3px; + -webkit-box-shadow: inset 0 -1px 0 rgba(0, 0, 0, .25); + box-shadow: inset 0 -1px 0 rgba(0, 0, 0, .25); +} +kbd kbd { + padding: 0; + font-size: 100%; + font-weight: bold; + -webkit-box-shadow: none; + box-shadow: none; +} +pre { + display: block; + padding: 9.5px; + margin: 0 0 10px; + font-size: 13px; + line-height: 1.42857143; + color: #333; + word-break: break-all; + word-wrap: break-word; + background-color: #f5f5f5; + border: 1px solid #ccc; + border-radius: 4px; +} +pre code { + padding: 0; + font-size: inherit; + color: inherit; + white-space: pre-wrap; + background-color: transparent; + border-radius: 0; +} +.pre-scrollable { + max-height: 340px; + overflow-y: scroll; +} +.container { + padding-right: 15px; + padding-left: 15px; + margin-right: auto; + margin-left: auto; +} +@media (min-width: 768px) { + .container { + width: 750px; + } +} +@media (min-width: 992px) { + .container { + width: 970px; + } +} +@media (min-width: 1200px) { + .container { + width: 1170px; + } +} +.container-fluid { + padding-right: 15px; + padding-left: 15px; + margin-right: auto; + margin-left: auto; +} +.row { + margin-right: -15px; + margin-left: -15px; +} +.col-xs-1, .col-sm-1, .col-md-1, .col-lg-1, .col-xs-2, .col-sm-2, .col-md-2, .col-lg-2, .col-xs-3, .col-sm-3, .col-md-3, .col-lg-3, .col-xs-4, .col-sm-4, .col-md-4, .col-lg-4, .col-xs-5, .col-sm-5, .col-md-5, .col-lg-5, .col-xs-6, .col-sm-6, .col-md-6, .col-lg-6, .col-xs-7, .col-sm-7, .col-md-7, .col-lg-7, .col-xs-8, .col-sm-8, .col-md-8, .col-lg-8, .col-xs-9, .col-sm-9, .col-md-9, .col-lg-9, .col-xs-10, .col-sm-10, .col-md-10, .col-lg-10, .col-xs-11, .col-sm-11, .col-md-11, .col-lg-11, .col-xs-12, .col-sm-12, .col-md-12, .col-lg-12 { + position: relative; + min-height: 1px; + padding-right: 15px; + padding-left: 15px; +} +.col-xs-1, .col-xs-2, .col-xs-3, .col-xs-4, .col-xs-5, .col-xs-6, .col-xs-7, .col-xs-8, .col-xs-9, .col-xs-10, .col-xs-11, .col-xs-12 { + float: left; +} +.col-xs-12 { + width: 100%; +} +.col-xs-11 { + width: 91.66666667%; +} +.col-xs-10 { + width: 83.33333333%; +} +.col-xs-9 { + width: 75%; +} +.col-xs-8 { + width: 66.66666667%; +} +.col-xs-7 { + width: 58.33333333%; +} +.col-xs-6 { + width: 50%; +} +.col-xs-5 { + width: 41.66666667%; +} +.col-xs-4 { + width: 33.33333333%; +} +.col-xs-3 { + width: 25%; +} +.col-xs-2 { + width: 16.66666667%; +} +.col-xs-1 { + width: 8.33333333%; +} +.col-xs-pull-12 { + right: 100%; +} +.col-xs-pull-11 { + right: 91.66666667%; +} +.col-xs-pull-10 { + right: 83.33333333%; +} +.col-xs-pull-9 { + right: 75%; +} +.col-xs-pull-8 { + right: 66.66666667%; +} +.col-xs-pull-7 { + right: 58.33333333%; +} +.col-xs-pull-6 { + right: 50%; +} +.col-xs-pull-5 { + right: 41.66666667%; +} +.col-xs-pull-4 { + right: 33.33333333%; +} +.col-xs-pull-3 { + right: 25%; +} +.col-xs-pull-2 { + right: 16.66666667%; +} +.col-xs-pull-1 { + right: 8.33333333%; +} +.col-xs-pull-0 { + right: auto; +} +.col-xs-push-12 { + left: 100%; +} +.col-xs-push-11 { + left: 91.66666667%; +} +.col-xs-push-10 { + left: 83.33333333%; +} +.col-xs-push-9 { + left: 75%; +} +.col-xs-push-8 { + left: 66.66666667%; +} +.col-xs-push-7 { + left: 58.33333333%; +} +.col-xs-push-6 { + left: 50%; +} +.col-xs-push-5 { + left: 41.66666667%; +} +.col-xs-push-4 { + left: 33.33333333%; +} +.col-xs-push-3 { + left: 25%; +} +.col-xs-push-2 { + left: 16.66666667%; +} +.col-xs-push-1 { + left: 8.33333333%; +} +.col-xs-push-0 { + left: auto; +} +.col-xs-offset-12 { + margin-left: 100%; +} +.col-xs-offset-11 { + margin-left: 91.66666667%; +} +.col-xs-offset-10 { + margin-left: 83.33333333%; +} +.col-xs-offset-9 { + margin-left: 75%; +} +.col-xs-offset-8 { + margin-left: 66.66666667%; +} +.col-xs-offset-7 { + margin-left: 58.33333333%; +} +.col-xs-offset-6 { + margin-left: 50%; +} +.col-xs-offset-5 { + margin-left: 41.66666667%; +} +.col-xs-offset-4 { + margin-left: 33.33333333%; +} +.col-xs-offset-3 { + margin-left: 25%; +} +.col-xs-offset-2 { + margin-left: 16.66666667%; +} +.col-xs-offset-1 { + margin-left: 8.33333333%; +} +.col-xs-offset-0 { + margin-left: 0; +} +@media (min-width: 768px) { + .col-sm-1, .col-sm-2, .col-sm-3, .col-sm-4, .col-sm-5, .col-sm-6, .col-sm-7, .col-sm-8, .col-sm-9, .col-sm-10, .col-sm-11, .col-sm-12 { + float: left; + } + .col-sm-12 { + width: 100%; + } + .col-sm-11 { + width: 91.66666667%; + } + .col-sm-10 { + width: 83.33333333%; + } + .col-sm-9 { + width: 75%; + } + .col-sm-8 { + width: 66.66666667%; + } + .col-sm-7 { + width: 58.33333333%; + } + .col-sm-6 { + width: 50%; + } + .col-sm-5 { + width: 41.66666667%; + } + .col-sm-4 { + width: 33.33333333%; + } + .col-sm-3 { + width: 25%; + } + .col-sm-2 { + width: 16.66666667%; + } + .col-sm-1 { + width: 8.33333333%; + } + .col-sm-pull-12 { + right: 100%; + } + .col-sm-pull-11 { + right: 91.66666667%; + } + .col-sm-pull-10 { + right: 83.33333333%; + } + .col-sm-pull-9 { + right: 75%; + } + .col-sm-pull-8 { + right: 66.66666667%; + } + .col-sm-pull-7 { + right: 58.33333333%; + } + .col-sm-pull-6 { + right: 50%; + } + .col-sm-pull-5 { + right: 41.66666667%; + } + .col-sm-pull-4 { + right: 33.33333333%; + } + .col-sm-pull-3 { + right: 25%; + } + .col-sm-pull-2 { + right: 16.66666667%; + } + .col-sm-pull-1 { + right: 8.33333333%; + } + .col-sm-pull-0 { + right: auto; + } + .col-sm-push-12 { + left: 100%; + } + .col-sm-push-11 { + left: 91.66666667%; + } + .col-sm-push-10 { + left: 83.33333333%; + } + .col-sm-push-9 { + left: 75%; + } + .col-sm-push-8 { + left: 66.66666667%; + } + .col-sm-push-7 { + left: 58.33333333%; + } + .col-sm-push-6 { + left: 50%; + } + .col-sm-push-5 { + left: 41.66666667%; + } + .col-sm-push-4 { + left: 33.33333333%; + } + .col-sm-push-3 { + left: 25%; + } + .col-sm-push-2 { + left: 16.66666667%; + } + .col-sm-push-1 { + left: 8.33333333%; + } + .col-sm-push-0 { + left: auto; + } + .col-sm-offset-12 { + margin-left: 100%; + } + .col-sm-offset-11 { + margin-left: 91.66666667%; + } + .col-sm-offset-10 { + margin-left: 83.33333333%; + } + .col-sm-offset-9 { + margin-left: 75%; + } + .col-sm-offset-8 { + margin-left: 66.66666667%; + } + .col-sm-offset-7 { + margin-left: 58.33333333%; + } + .col-sm-offset-6 { + margin-left: 50%; + } + .col-sm-offset-5 { + margin-left: 41.66666667%; + } + .col-sm-offset-4 { + margin-left: 33.33333333%; + } + .col-sm-offset-3 { + margin-left: 25%; + } + .col-sm-offset-2 { + margin-left: 16.66666667%; + } + .col-sm-offset-1 { + margin-left: 8.33333333%; + } + .col-sm-offset-0 { + margin-left: 0; + } +} +@media (min-width: 992px) { + .col-md-1, .col-md-2, .col-md-3, .col-md-4, .col-md-5, .col-md-6, .col-md-7, .col-md-8, .col-md-9, .col-md-10, .col-md-11, .col-md-12 { + float: left; + } + .col-md-12 { + width: 100%; + } + .col-md-11 { + width: 91.66666667%; + } + .col-md-10 { + width: 83.33333333%; + } + .col-md-9 { + width: 75%; + } + .col-md-8 { + width: 66.66666667%; + } + .col-md-7 { + width: 58.33333333%; + } + .col-md-6 { + width: 50%; + } + .col-md-5 { + width: 41.66666667%; + } + .col-md-4 { + width: 33.33333333%; + } + .col-md-3 { + width: 25%; + } + .col-md-2 { + width: 16.66666667%; + } + .col-md-1 { + width: 8.33333333%; + } + .col-md-pull-12 { + right: 100%; + } + .col-md-pull-11 { + right: 91.66666667%; + } + .col-md-pull-10 { + right: 83.33333333%; + } + .col-md-pull-9 { + right: 75%; + } + .col-md-pull-8 { + right: 66.66666667%; + } + .col-md-pull-7 { + right: 58.33333333%; + } + .col-md-pull-6 { + right: 50%; + } + .col-md-pull-5 { + right: 41.66666667%; + } + .col-md-pull-4 { + right: 33.33333333%; + } + .col-md-pull-3 { + right: 25%; + } + .col-md-pull-2 { + right: 16.66666667%; + } + .col-md-pull-1 { + right: 8.33333333%; + } + .col-md-pull-0 { + right: auto; + } + .col-md-push-12 { + left: 100%; + } + .col-md-push-11 { + left: 91.66666667%; + } + .col-md-push-10 { + left: 83.33333333%; + } + .col-md-push-9 { + left: 75%; + } + .col-md-push-8 { + left: 66.66666667%; + } + .col-md-push-7 { + left: 58.33333333%; + } + .col-md-push-6 { + left: 50%; + } + .col-md-push-5 { + left: 41.66666667%; + } + .col-md-push-4 { + left: 33.33333333%; + } + .col-md-push-3 { + left: 25%; + } + .col-md-push-2 { + left: 16.66666667%; + } + .col-md-push-1 { + left: 8.33333333%; + } + .col-md-push-0 { + left: auto; + } + .col-md-offset-12 { + margin-left: 100%; + } + .col-md-offset-11 { + margin-left: 91.66666667%; + } + .col-md-offset-10 { + margin-left: 83.33333333%; + } + .col-md-offset-9 { + margin-left: 75%; + } + .col-md-offset-8 { + margin-left: 66.66666667%; + } + .col-md-offset-7 { + margin-left: 58.33333333%; + } + .col-md-offset-6 { + margin-left: 50%; + } + .col-md-offset-5 { + margin-left: 41.66666667%; + } + .col-md-offset-4 { + margin-left: 33.33333333%; + } + .col-md-offset-3 { + margin-left: 25%; + } + .col-md-offset-2 { + margin-left: 16.66666667%; + } + .col-md-offset-1 { + margin-left: 8.33333333%; + } + .col-md-offset-0 { + margin-left: 0; + } +} +@media (min-width: 1200px) { + .col-lg-1, .col-lg-2, .col-lg-3, .col-lg-4, .col-lg-5, .col-lg-6, .col-lg-7, .col-lg-8, .col-lg-9, .col-lg-10, .col-lg-11, .col-lg-12 { + float: left; + } + .col-lg-12 { + width: 100%; + } + .col-lg-11 { + width: 91.66666667%; + } + .col-lg-10 { + width: 83.33333333%; + } + .col-lg-9 { + width: 75%; + } + .col-lg-8 { + width: 66.66666667%; + } + .col-lg-7 { + width: 58.33333333%; + } + .col-lg-6 { + width: 50%; + } + .col-lg-5 { + width: 41.66666667%; + } + .col-lg-4 { + width: 33.33333333%; + } + .col-lg-3 { + width: 25%; + } + .col-lg-2 { + width: 16.66666667%; + } + .col-lg-1 { + width: 8.33333333%; + } + .col-lg-pull-12 { + right: 100%; + } + .col-lg-pull-11 { + right: 91.66666667%; + } + .col-lg-pull-10 { + right: 83.33333333%; + } + .col-lg-pull-9 { + right: 75%; + } + .col-lg-pull-8 { + right: 66.66666667%; + } + .col-lg-pull-7 { + right: 58.33333333%; + } + .col-lg-pull-6 { + right: 50%; + } + .col-lg-pull-5 { + right: 41.66666667%; + } + .col-lg-pull-4 { + right: 33.33333333%; + } + .col-lg-pull-3 { + right: 25%; + } + .col-lg-pull-2 { + right: 16.66666667%; + } + .col-lg-pull-1 { + right: 8.33333333%; + } + .col-lg-pull-0 { + right: auto; + } + .col-lg-push-12 { + left: 100%; + } + .col-lg-push-11 { + left: 91.66666667%; + } + .col-lg-push-10 { + left: 83.33333333%; + } + .col-lg-push-9 { + left: 75%; + } + .col-lg-push-8 { + left: 66.66666667%; + } + .col-lg-push-7 { + left: 58.33333333%; + } + .col-lg-push-6 { + left: 50%; + } + .col-lg-push-5 { + left: 41.66666667%; + } + .col-lg-push-4 { + left: 33.33333333%; + } + .col-lg-push-3 { + left: 25%; + } + .col-lg-push-2 { + left: 16.66666667%; + } + .col-lg-push-1 { + left: 8.33333333%; + } + .col-lg-push-0 { + left: auto; + } + .col-lg-offset-12 { + margin-left: 100%; + } + .col-lg-offset-11 { + margin-left: 91.66666667%; + } + .col-lg-offset-10 { + margin-left: 83.33333333%; + } + .col-lg-offset-9 { + margin-left: 75%; + } + .col-lg-offset-8 { + margin-left: 66.66666667%; + } + .col-lg-offset-7 { + margin-left: 58.33333333%; + } + .col-lg-offset-6 { + margin-left: 50%; + } + .col-lg-offset-5 { + margin-left: 41.66666667%; + } + .col-lg-offset-4 { + margin-left: 33.33333333%; + } + .col-lg-offset-3 { + margin-left: 25%; + } + .col-lg-offset-2 { + margin-left: 16.66666667%; + } + .col-lg-offset-1 { + margin-left: 8.33333333%; + } + .col-lg-offset-0 { + margin-left: 0; + } +} +table { + background-color: transparent; +} +caption { + padding-top: 8px; + padding-bottom: 8px; + color: #777; + text-align: left; +} +th { + text-align: left; +} +.table { + width: 100%; + max-width: 100%; + margin-bottom: 20px; +} +.table > thead > tr > th, +.table > tbody > tr > th, +.table > tfoot > tr > th, +.table > thead > tr > td, +.table > tbody > tr > td, +.table > tfoot > tr > td { + padding: 8px; + line-height: 1.42857143; + vertical-align: top; + border-top: 1px solid #ddd; +} +.table > thead > tr > th { + vertical-align: bottom; + border-bottom: 2px solid #ddd; +} +.table > caption + thead > tr:first-child > th, +.table > colgroup + thead > tr:first-child > th, +.table > thead:first-child > tr:first-child > th, +.table > caption + thead > tr:first-child > td, +.table > colgroup + thead > tr:first-child > td, +.table > thead:first-child > tr:first-child > td { + border-top: 0; +} +.table > tbody + tbody { + border-top: 2px solid #ddd; +} +.table .table { + background-color: #fff; +} +.table-condensed > thead > tr > th, +.table-condensed > tbody > tr > th, +.table-condensed > tfoot > tr > th, +.table-condensed > thead > tr > td, +.table-condensed > tbody > tr > td, +.table-condensed > tfoot > tr > td { + padding: 5px; +} +.table-bordered { + border: 1px solid #ddd; +} +.table-bordered > thead > tr > th, +.table-bordered > tbody > tr > th, +.table-bordered > tfoot > tr > th, +.table-bordered > thead > tr > td, +.table-bordered > tbody > tr > td, +.table-bordered > tfoot > tr > td { + border: 1px solid #ddd; +} +.table-bordered > thead > tr > th, +.table-bordered > thead > tr > td { + border-bottom-width: 2px; +} +.table-striped > tbody > tr:nth-of-type(odd) { + background-color: #f9f9f9; +} +.table-hover > tbody > tr:hover { + background-color: #f5f5f5; +} +table col[class*="col-"] { + position: static; + display: table-column; + float: none; +} +table td[class*="col-"], +table th[class*="col-"] { + position: static; + display: table-cell; + float: none; +} +.table > thead > tr > td.active, +.table > tbody > tr > td.active, +.table > tfoot > tr > td.active, +.table > thead > tr > th.active, +.table > tbody > tr > th.active, +.table > tfoot > tr > th.active, +.table > thead > tr.active > td, +.table > tbody > tr.active > td, +.table > tfoot > tr.active > td, +.table > thead > tr.active > th, +.table > tbody > tr.active > th, +.table > tfoot > tr.active > th { + background-color: #f5f5f5; +} +.table-hover > tbody > tr > td.active:hover, +.table-hover > tbody > tr > th.active:hover, +.table-hover > tbody > tr.active:hover > td, +.table-hover > tbody > tr:hover > .active, +.table-hover > tbody > tr.active:hover > th { + background-color: #e8e8e8; +} +.table > thead > tr > td.success, +.table > tbody > tr > td.success, +.table > tfoot > tr > td.success, +.table > thead > tr > th.success, +.table > tbody > tr > th.success, +.table > tfoot > tr > th.success, +.table > thead > tr.success > td, +.table > tbody > tr.success > td, +.table > tfoot > tr.success > td, +.table > thead > tr.success > th, +.table > tbody > tr.success > th, +.table > tfoot > tr.success > th { + background-color: #dff0d8; +} +.table-hover > tbody > tr > td.success:hover, +.table-hover > tbody > tr > th.success:hover, +.table-hover > tbody > tr.success:hover > td, +.table-hover > tbody > tr:hover > .success, +.table-hover > tbody > tr.success:hover > th { + background-color: #d0e9c6; +} +.table > thead > tr > td.info, +.table > tbody > tr > td.info, +.table > tfoot > tr > td.info, +.table > thead > tr > th.info, +.table > tbody > tr > th.info, +.table > tfoot > tr > th.info, +.table > thead > tr.info > td, +.table > tbody > tr.info > td, +.table > tfoot > tr.info > td, +.table > thead > tr.info > th, +.table > tbody > tr.info > th, +.table > tfoot > tr.info > th { + background-color: #d9edf7; +} +.table-hover > tbody > tr > td.info:hover, +.table-hover > tbody > tr > th.info:hover, +.table-hover > tbody > tr.info:hover > td, +.table-hover > tbody > tr:hover > .info, +.table-hover > tbody > tr.info:hover > th { + background-color: #c4e3f3; +} +.table > thead > tr > td.warning, +.table > tbody > tr > td.warning, +.table > tfoot > tr > td.warning, +.table > thead > tr > th.warning, +.table > tbody > tr > th.warning, +.table > tfoot > tr > th.warning, +.table > thead > tr.warning > td, +.table > tbody > tr.warning > td, +.table > tfoot > tr.warning > td, +.table > thead > tr.warning > th, +.table > tbody > tr.warning > th, +.table > tfoot > tr.warning > th { + background-color: #fcf8e3; +} +.table-hover > tbody > tr > td.warning:hover, +.table-hover > tbody > tr > th.warning:hover, +.table-hover > tbody > tr.warning:hover > td, +.table-hover > tbody > tr:hover > .warning, +.table-hover > tbody > tr.warning:hover > th { + background-color: #faf2cc; +} +.table > thead > tr > td.danger, +.table > tbody > tr > td.danger, +.table > tfoot > tr > td.danger, +.table > thead > tr > th.danger, +.table > tbody > tr > th.danger, +.table > tfoot > tr > th.danger, +.table > thead > tr.danger > td, +.table > tbody > tr.danger > td, +.table > tfoot > tr.danger > td, +.table > thead > tr.danger > th, +.table > tbody > tr.danger > th, +.table > tfoot > tr.danger > th { + background-color: #f2dede; +} +.table-hover > tbody > tr > td.danger:hover, +.table-hover > tbody > tr > th.danger:hover, +.table-hover > tbody > tr.danger:hover > td, +.table-hover > tbody > tr:hover > .danger, +.table-hover > tbody > tr.danger:hover > th { + background-color: #ebcccc; +} +.table-responsive { + min-height: .01%; + overflow-x: auto; +} +@media screen and (max-width: 767px) { + .table-responsive { + width: 100%; + margin-bottom: 15px; + overflow-y: hidden; + -ms-overflow-style: -ms-autohiding-scrollbar; + border: 1px solid #ddd; + } + .table-responsive > .table { + margin-bottom: 0; + } + .table-responsive > .table > thead > tr > th, + .table-responsive > .table > tbody > tr > th, + .table-responsive > .table > tfoot > tr > th, + .table-responsive > .table > thead > tr > td, + .table-responsive > .table > tbody > tr > td, + .table-responsive > .table > tfoot > tr > td { + white-space: nowrap; + } + .table-responsive > .table-bordered { + border: 0; + } + .table-responsive > .table-bordered > thead > tr > th:first-child, + .table-responsive > .table-bordered > tbody > tr > th:first-child, + .table-responsive > .table-bordered > tfoot > tr > th:first-child, + .table-responsive > .table-bordered > thead > tr > td:first-child, + .table-responsive > .table-bordered > tbody > tr > td:first-child, + .table-responsive > .table-bordered > tfoot > tr > td:first-child { + border-left: 0; + } + .table-responsive > .table-bordered > thead > tr > th:last-child, + .table-responsive > .table-bordered > tbody > tr > th:last-child, + .table-responsive > .table-bordered > tfoot > tr > th:last-child, + .table-responsive > .table-bordered > thead > tr > td:last-child, + .table-responsive > .table-bordered > tbody > tr > td:last-child, + .table-responsive > .table-bordered > tfoot > tr > td:last-child { + border-right: 0; + } + .table-responsive > .table-bordered > tbody > tr:last-child > th, + .table-responsive > .table-bordered > tfoot > tr:last-child > th, + .table-responsive > .table-bordered > tbody > tr:last-child > td, + .table-responsive > .table-bordered > tfoot > tr:last-child > td { + border-bottom: 0; + } +} +fieldset { + min-width: 0; + padding: 0; + margin: 0; + border: 0; +} +legend { + display: block; + width: 100%; + padding: 0; + margin-bottom: 20px; + font-size: 21px; + line-height: inherit; + color: #333; + border: 0; + border-bottom: 1px solid #e5e5e5; +} +label { + display: inline-block; + max-width: 100%; + margin-bottom: 5px; + font-weight: bold; +} +input[type="search"] { + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; +} +input[type="radio"], +input[type="checkbox"] { + margin: 4px 0 0; + margin-top: 1px \9; + line-height: normal; +} +input[type="file"] { + display: block; +} +input[type="range"] { + display: block; + width: 100%; +} +select[multiple], +select[size] { + height: auto; +} +input[type="file"]:focus, +input[type="radio"]:focus, +input[type="checkbox"]:focus { + outline: 5px auto -webkit-focus-ring-color; + outline-offset: -2px; +} +output { + display: block; + padding-top: 7px; + font-size: 14px; + line-height: 1.42857143; + color: #555; +} +.form-control { + display: block; + width: 100%; + height: 34px; + padding: 6px 12px; + font-size: 14px; + line-height: 1.42857143; + color: #555; + background-color: #fff; + background-image: none; + border: 1px solid #ccc; + border-radius: 4px; + -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075); + box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075); + -webkit-transition: border-color ease-in-out .15s, -webkit-box-shadow ease-in-out .15s; + -o-transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s; + transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s; +} +.form-control:focus { + border-color: #66afe9; + outline: 0; + -webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(102, 175, 233, .6); + box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(102, 175, 233, .6); +} +.form-control::-moz-placeholder { + color: #999; + opacity: 1; +} +.form-control:-ms-input-placeholder { + color: #999; +} +.form-control::-webkit-input-placeholder { + color: #999; +} +.form-control::-ms-expand { + background-color: transparent; + border: 0; +} +.form-control[disabled], +.form-control[readonly], +fieldset[disabled] .form-control { + background-color: #eee; + opacity: 1; +} +.form-control[disabled], +fieldset[disabled] .form-control { + cursor: not-allowed; +} +textarea.form-control { + height: auto; +} +input[type="search"] { + -webkit-appearance: none; +} +@media screen and (-webkit-min-device-pixel-ratio: 0) { + input[type="date"].form-control, + input[type="time"].form-control, + input[type="datetime-local"].form-control, + input[type="month"].form-control { + line-height: 34px; + } + input[type="date"].input-sm, + input[type="time"].input-sm, + input[type="datetime-local"].input-sm, + input[type="month"].input-sm, + .input-group-sm input[type="date"], + .input-group-sm input[type="time"], + .input-group-sm input[type="datetime-local"], + .input-group-sm input[type="month"] { + line-height: 30px; + } + input[type="date"].input-lg, + input[type="time"].input-lg, + input[type="datetime-local"].input-lg, + input[type="month"].input-lg, + .input-group-lg input[type="date"], + .input-group-lg input[type="time"], + .input-group-lg input[type="datetime-local"], + .input-group-lg input[type="month"] { + line-height: 46px; + } +} +.form-group { + margin-bottom: 15px; +} +.radio, +.checkbox { + position: relative; + display: block; + margin-top: 10px; + margin-bottom: 10px; +} +.radio label, +.checkbox label { + min-height: 20px; + padding-left: 20px; + margin-bottom: 0; + font-weight: normal; + cursor: pointer; +} +.radio input[type="radio"], +.radio-inline input[type="radio"], +.checkbox input[type="checkbox"], +.checkbox-inline input[type="checkbox"] { + position: absolute; + margin-top: 4px \9; + margin-left: -20px; +} +.radio + .radio, +.checkbox + .checkbox { + margin-top: -5px; +} +.radio-inline, +.checkbox-inline { + position: relative; + display: inline-block; + padding-left: 20px; + margin-bottom: 0; + font-weight: normal; + vertical-align: middle; + cursor: pointer; +} +.radio-inline + .radio-inline, +.checkbox-inline + .checkbox-inline { + margin-top: 0; + margin-left: 10px; +} +input[type="radio"][disabled], +input[type="checkbox"][disabled], +input[type="radio"].disabled, +input[type="checkbox"].disabled, +fieldset[disabled] input[type="radio"], +fieldset[disabled] input[type="checkbox"] { + cursor: not-allowed; +} +.radio-inline.disabled, +.checkbox-inline.disabled, +fieldset[disabled] .radio-inline, +fieldset[disabled] .checkbox-inline { + cursor: not-allowed; +} +.radio.disabled label, +.checkbox.disabled label, +fieldset[disabled] .radio label, +fieldset[disabled] .checkbox label { + cursor: not-allowed; +} +.form-control-static { + min-height: 34px; + padding-top: 7px; + padding-bottom: 7px; + margin-bottom: 0; +} +.form-control-static.input-lg, +.form-control-static.input-sm { + padding-right: 0; + padding-left: 0; +} +.input-sm { + height: 30px; + padding: 5px 10px; + font-size: 12px; + line-height: 1.5; + border-radius: 3px; +} +select.input-sm { + height: 30px; + line-height: 30px; +} +textarea.input-sm, +select[multiple].input-sm { + height: auto; +} +.form-group-sm .form-control { + height: 30px; + padding: 5px 10px; + font-size: 12px; + line-height: 1.5; + border-radius: 3px; +} +.form-group-sm select.form-control { + height: 30px; + line-height: 30px; +} +.form-group-sm textarea.form-control, +.form-group-sm select[multiple].form-control { + height: auto; +} +.form-group-sm .form-control-static { + height: 30px; + min-height: 32px; + padding: 6px 10px; + font-size: 12px; + line-height: 1.5; +} +.input-lg { + height: 46px; + padding: 10px 16px; + font-size: 18px; + line-height: 1.3333333; + border-radius: 6px; +} +select.input-lg { + height: 46px; + line-height: 46px; +} +textarea.input-lg, +select[multiple].input-lg { + height: auto; +} +.form-group-lg .form-control { + height: 46px; + padding: 10px 16px; + font-size: 18px; + line-height: 1.3333333; + border-radius: 6px; +} +.form-group-lg select.form-control { + height: 46px; + line-height: 46px; +} +.form-group-lg textarea.form-control, +.form-group-lg select[multiple].form-control { + height: auto; +} +.form-group-lg .form-control-static { + height: 46px; + min-height: 38px; + padding: 11px 16px; + font-size: 18px; + line-height: 1.3333333; +} +.has-feedback { + position: relative; +} +.has-feedback .form-control { + padding-right: 42.5px; +} +.form-control-feedback { + position: absolute; + top: 0; + right: 0; + z-index: 2; + display: block; + width: 34px; + height: 34px; + line-height: 34px; + text-align: center; + pointer-events: none; +} +.input-lg + .form-control-feedback, +.input-group-lg + .form-control-feedback, +.form-group-lg .form-control + .form-control-feedback { + width: 46px; + height: 46px; + line-height: 46px; +} +.input-sm + .form-control-feedback, +.input-group-sm + .form-control-feedback, +.form-group-sm .form-control + .form-control-feedback { + width: 30px; + height: 30px; + line-height: 30px; +} +.has-success .help-block, +.has-success .control-label, +.has-success .radio, +.has-success .checkbox, +.has-success .radio-inline, +.has-success .checkbox-inline, +.has-success.radio label, +.has-success.checkbox label, +.has-success.radio-inline label, +.has-success.checkbox-inline label { + color: #3c763d; +} +.has-success .form-control { + border-color: #3c763d; + -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075); + box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075); +} +.has-success .form-control:focus { + border-color: #2b542c; + -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 6px #67b168; + box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 6px #67b168; +} +.has-success .input-group-addon { + color: #3c763d; + background-color: #dff0d8; + border-color: #3c763d; +} +.has-success .form-control-feedback { + color: #3c763d; +} +.has-warning .help-block, +.has-warning .control-label, +.has-warning .radio, +.has-warning .checkbox, +.has-warning .radio-inline, +.has-warning .checkbox-inline, +.has-warning.radio label, +.has-warning.checkbox label, +.has-warning.radio-inline label, +.has-warning.checkbox-inline label { + color: #8a6d3b; +} +.has-warning .form-control { + border-color: #8a6d3b; + -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075); + box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075); +} +.has-warning .form-control:focus { + border-color: #66512c; + -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 6px #c0a16b; + box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 6px #c0a16b; +} +.has-warning .input-group-addon { + color: #8a6d3b; + background-color: #fcf8e3; + border-color: #8a6d3b; +} +.has-warning .form-control-feedback { + color: #8a6d3b; +} +.has-error .help-block, +.has-error .control-label, +.has-error .radio, +.has-error .checkbox, +.has-error .radio-inline, +.has-error .checkbox-inline, +.has-error.radio label, +.has-error.checkbox label, +.has-error.radio-inline label, +.has-error.checkbox-inline label { + color: #a94442; +} +.has-error .form-control { + border-color: #a94442; + -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075); + box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075); +} +.has-error .form-control:focus { + border-color: #843534; + -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 6px #ce8483; + box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 6px #ce8483; +} +.has-error .input-group-addon { + color: #a94442; + background-color: #f2dede; + border-color: #a94442; +} +.has-error .form-control-feedback { + color: #a94442; +} +.has-feedback label ~ .form-control-feedback { + top: 25px; +} +.has-feedback label.sr-only ~ .form-control-feedback { + top: 0; +} +.help-block { + display: block; + margin-top: 5px; + margin-bottom: 10px; + color: #737373; +} +@media (min-width: 768px) { + .form-inline .form-group { + display: inline-block; + margin-bottom: 0; + vertical-align: middle; + } + .form-inline .form-control { + display: inline-block; + width: auto; + vertical-align: middle; + } + .form-inline .form-control-static { + display: inline-block; + } + .form-inline .input-group { + display: inline-table; + vertical-align: middle; + } + .form-inline .input-group .input-group-addon, + .form-inline .input-group .input-group-btn, + .form-inline .input-group .form-control { + width: auto; + } + .form-inline .input-group > .form-control { + width: 100%; + } + .form-inline .control-label { + margin-bottom: 0; + vertical-align: middle; + } + .form-inline .radio, + .form-inline .checkbox { + display: inline-block; + margin-top: 0; + margin-bottom: 0; + vertical-align: middle; + } + .form-inline .radio label, + .form-inline .checkbox label { + padding-left: 0; + } + .form-inline .radio input[type="radio"], + .form-inline .checkbox input[type="checkbox"] { + position: relative; + margin-left: 0; + } + .form-inline .has-feedback .form-control-feedback { + top: 0; + } +} +.form-horizontal .radio, +.form-horizontal .checkbox, +.form-horizontal .radio-inline, +.form-horizontal .checkbox-inline { + padding-top: 7px; + margin-top: 0; + margin-bottom: 0; +} +.form-horizontal .radio, +.form-horizontal .checkbox { + min-height: 27px; +} +.form-horizontal .form-group { + margin-right: -15px; + margin-left: -15px; +} +@media (min-width: 768px) { + .form-horizontal .control-label { + padding-top: 7px; + margin-bottom: 0; + text-align: right; + } +} +.form-horizontal .has-feedback .form-control-feedback { + right: 15px; +} +@media (min-width: 768px) { + .form-horizontal .form-group-lg .control-label { + padding-top: 11px; + font-size: 18px; + } +} +@media (min-width: 768px) { + .form-horizontal .form-group-sm .control-label { + padding-top: 6px; + font-size: 12px; + } +} +.btn { + display: inline-block; + padding: 6px 12px; + margin-bottom: 0; + font-size: 14px; + font-weight: normal; + line-height: 1.42857143; + text-align: center; + white-space: nowrap; + vertical-align: middle; + -ms-touch-action: manipulation; + touch-action: manipulation; + cursor: pointer; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; + background-image: none; + border: 1px solid transparent; + border-radius: 4px; +} +.btn:focus, +.btn:active:focus, +.btn.active:focus, +.btn.focus, +.btn:active.focus, +.btn.active.focus { + outline: 5px auto -webkit-focus-ring-color; + outline-offset: -2px; +} +.btn:hover, +.btn:focus, +.btn.focus { + color: #333; + text-decoration: none; +} +.btn:active, +.btn.active { + background-image: none; + outline: 0; + -webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125); + box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125); +} +.btn.disabled, +.btn[disabled], +fieldset[disabled] .btn { + cursor: not-allowed; + filter: alpha(opacity=65); + -webkit-box-shadow: none; + box-shadow: none; + opacity: .65; +} +a.btn.disabled, +fieldset[disabled] a.btn { + pointer-events: none; +} +.btn-default { + color: #333; + background-color: #fff; + border-color: #ccc; +} +.btn-default:focus, +.btn-default.focus { + color: #333; + background-color: #e6e6e6; + border-color: #8c8c8c; +} +.btn-default:hover { + color: #333; + background-color: #e6e6e6; + border-color: #adadad; +} +.btn-default:active, +.btn-default.active, +.open > .dropdown-toggle.btn-default { + color: #333; + background-color: #e6e6e6; + border-color: #adadad; +} +.btn-default:active:hover, +.btn-default.active:hover, +.open > .dropdown-toggle.btn-default:hover, +.btn-default:active:focus, +.btn-default.active:focus, +.open > .dropdown-toggle.btn-default:focus, +.btn-default:active.focus, +.btn-default.active.focus, +.open > .dropdown-toggle.btn-default.focus { + color: #333; + background-color: #d4d4d4; + border-color: #8c8c8c; +} +.btn-default:active, +.btn-default.active, +.open > .dropdown-toggle.btn-default { + background-image: none; +} +.btn-default.disabled:hover, +.btn-default[disabled]:hover, +fieldset[disabled] .btn-default:hover, +.btn-default.disabled:focus, +.btn-default[disabled]:focus, +fieldset[disabled] .btn-default:focus, +.btn-default.disabled.focus, +.btn-default[disabled].focus, +fieldset[disabled] .btn-default.focus { + background-color: #fff; + border-color: #ccc; +} +.btn-default .badge { + color: #fff; + background-color: #333; +} +.btn-primary { + color: #fff; + background-color: #337ab7; + border-color: #2e6da4; +} +.btn-primary:focus, +.btn-primary.focus { + color: #fff; + background-color: #286090; + border-color: #122b40; +} +.btn-primary:hover { + color: #fff; + background-color: #286090; + border-color: #204d74; +} +.btn-primary:active, +.btn-primary.active, +.open > .dropdown-toggle.btn-primary { + color: #fff; + background-color: #286090; + border-color: #204d74; +} +.btn-primary:active:hover, +.btn-primary.active:hover, +.open > .dropdown-toggle.btn-primary:hover, +.btn-primary:active:focus, +.btn-primary.active:focus, +.open > .dropdown-toggle.btn-primary:focus, +.btn-primary:active.focus, +.btn-primary.active.focus, +.open > .dropdown-toggle.btn-primary.focus { + color: #fff; + background-color: #204d74; + border-color: #122b40; +} +.btn-primary:active, +.btn-primary.active, +.open > .dropdown-toggle.btn-primary { + background-image: none; +} +.btn-primary.disabled:hover, +.btn-primary[disabled]:hover, +fieldset[disabled] .btn-primary:hover, +.btn-primary.disabled:focus, +.btn-primary[disabled]:focus, +fieldset[disabled] .btn-primary:focus, +.btn-primary.disabled.focus, +.btn-primary[disabled].focus, +fieldset[disabled] .btn-primary.focus { + background-color: #337ab7; + border-color: #2e6da4; +} +.btn-primary .badge { + color: #337ab7; + background-color: #fff; +} +.btn-success { + color: #fff; + background-color: #5cb85c; + border-color: #4cae4c; +} +.btn-success:focus, +.btn-success.focus { + color: #fff; + background-color: #449d44; + border-color: #255625; +} +.btn-success:hover { + color: #fff; + background-color: #449d44; + border-color: #398439; +} +.btn-success:active, +.btn-success.active, +.open > .dropdown-toggle.btn-success { + color: #fff; + background-color: #449d44; + border-color: #398439; +} +.btn-success:active:hover, +.btn-success.active:hover, +.open > .dropdown-toggle.btn-success:hover, +.btn-success:active:focus, +.btn-success.active:focus, +.open > .dropdown-toggle.btn-success:focus, +.btn-success:active.focus, +.btn-success.active.focus, +.open > .dropdown-toggle.btn-success.focus { + color: #fff; + background-color: #398439; + border-color: #255625; +} +.btn-success:active, +.btn-success.active, +.open > .dropdown-toggle.btn-success { + background-image: none; +} +.btn-success.disabled:hover, +.btn-success[disabled]:hover, +fieldset[disabled] .btn-success:hover, +.btn-success.disabled:focus, +.btn-success[disabled]:focus, +fieldset[disabled] .btn-success:focus, +.btn-success.disabled.focus, +.btn-success[disabled].focus, +fieldset[disabled] .btn-success.focus { + background-color: #5cb85c; + border-color: #4cae4c; +} +.btn-success .badge { + color: #5cb85c; + background-color: #fff; +} +.btn-info { + color: #fff; + background-color: #5bc0de; + border-color: #46b8da; +} +.btn-info:focus, +.btn-info.focus { + color: #fff; + background-color: #31b0d5; + border-color: #1b6d85; +} +.btn-info:hover { + color: #fff; + background-color: #31b0d5; + border-color: #269abc; +} +.btn-info:active, +.btn-info.active, +.open > .dropdown-toggle.btn-info { + color: #fff; + background-color: #31b0d5; + border-color: #269abc; +} +.btn-info:active:hover, +.btn-info.active:hover, +.open > .dropdown-toggle.btn-info:hover, +.btn-info:active:focus, +.btn-info.active:focus, +.open > .dropdown-toggle.btn-info:focus, +.btn-info:active.focus, +.btn-info.active.focus, +.open > .dropdown-toggle.btn-info.focus { + color: #fff; + background-color: #269abc; + border-color: #1b6d85; +} +.btn-info:active, +.btn-info.active, +.open > .dropdown-toggle.btn-info { + background-image: none; +} +.btn-info.disabled:hover, +.btn-info[disabled]:hover, +fieldset[disabled] .btn-info:hover, +.btn-info.disabled:focus, +.btn-info[disabled]:focus, +fieldset[disabled] .btn-info:focus, +.btn-info.disabled.focus, +.btn-info[disabled].focus, +fieldset[disabled] .btn-info.focus { + background-color: #5bc0de; + border-color: #46b8da; +} +.btn-info .badge { + color: #5bc0de; + background-color: #fff; +} +.btn-warning { + color: #fff; + background-color: #f0ad4e; + border-color: #eea236; +} +.btn-warning:focus, +.btn-warning.focus { + color: #fff; + background-color: #ec971f; + border-color: #985f0d; +} +.btn-warning:hover { + color: #fff; + background-color: #ec971f; + border-color: #d58512; +} +.btn-warning:active, +.btn-warning.active, +.open > .dropdown-toggle.btn-warning { + color: #fff; + background-color: #ec971f; + border-color: #d58512; +} +.btn-warning:active:hover, +.btn-warning.active:hover, +.open > .dropdown-toggle.btn-warning:hover, +.btn-warning:active:focus, +.btn-warning.active:focus, +.open > .dropdown-toggle.btn-warning:focus, +.btn-warning:active.focus, +.btn-warning.active.focus, +.open > .dropdown-toggle.btn-warning.focus { + color: #fff; + background-color: #d58512; + border-color: #985f0d; +} +.btn-warning:active, +.btn-warning.active, +.open > .dropdown-toggle.btn-warning { + background-image: none; +} +.btn-warning.disabled:hover, +.btn-warning[disabled]:hover, +fieldset[disabled] .btn-warning:hover, +.btn-warning.disabled:focus, +.btn-warning[disabled]:focus, +fieldset[disabled] .btn-warning:focus, +.btn-warning.disabled.focus, +.btn-warning[disabled].focus, +fieldset[disabled] .btn-warning.focus { + background-color: #f0ad4e; + border-color: #eea236; +} +.btn-warning .badge { + color: #f0ad4e; + background-color: #fff; +} +.btn-danger { + color: #fff; + background-color: #d9534f; + border-color: #d43f3a; +} +.btn-danger:focus, +.btn-danger.focus { + color: #fff; + background-color: #c9302c; + border-color: #761c19; +} +.btn-danger:hover { + color: #fff; + background-color: #c9302c; + border-color: #ac2925; +} +.btn-danger:active, +.btn-danger.active, +.open > .dropdown-toggle.btn-danger { + color: #fff; + background-color: #c9302c; + border-color: #ac2925; +} +.btn-danger:active:hover, +.btn-danger.active:hover, +.open > .dropdown-toggle.btn-danger:hover, +.btn-danger:active:focus, +.btn-danger.active:focus, +.open > .dropdown-toggle.btn-danger:focus, +.btn-danger:active.focus, +.btn-danger.active.focus, +.open > .dropdown-toggle.btn-danger.focus { + color: #fff; + background-color: #ac2925; + border-color: #761c19; +} +.btn-danger:active, +.btn-danger.active, +.open > .dropdown-toggle.btn-danger { + background-image: none; +} +.btn-danger.disabled:hover, +.btn-danger[disabled]:hover, +fieldset[disabled] .btn-danger:hover, +.btn-danger.disabled:focus, +.btn-danger[disabled]:focus, +fieldset[disabled] .btn-danger:focus, +.btn-danger.disabled.focus, +.btn-danger[disabled].focus, +fieldset[disabled] .btn-danger.focus { + background-color: #d9534f; + border-color: #d43f3a; +} +.btn-danger .badge { + color: #d9534f; + background-color: #fff; +} +.btn-link { + font-weight: normal; + color: #337ab7; + border-radius: 0; +} +.btn-link, +.btn-link:active, +.btn-link.active, +.btn-link[disabled], +fieldset[disabled] .btn-link { + background-color: transparent; + -webkit-box-shadow: none; + box-shadow: none; +} +.btn-link, +.btn-link:hover, +.btn-link:focus, +.btn-link:active { + border-color: transparent; +} +.btn-link:hover, +.btn-link:focus { + color: #23527c; + text-decoration: underline; + background-color: transparent; +} +.btn-link[disabled]:hover, +fieldset[disabled] .btn-link:hover, +.btn-link[disabled]:focus, +fieldset[disabled] .btn-link:focus { + color: #777; + text-decoration: none; +} +.btn-lg, +.btn-group-lg > .btn { + padding: 10px 16px; + font-size: 18px; + line-height: 1.3333333; + border-radius: 6px; +} +.btn-sm, +.btn-group-sm > .btn { + padding: 5px 10px; + font-size: 12px; + line-height: 1.5; + border-radius: 3px; +} +.btn-xs, +.btn-group-xs > .btn { + padding: 1px 5px; + font-size: 12px; + line-height: 1.5; + border-radius: 3px; +} +.btn-block { + display: block; + width: 100%; +} +.btn-block + .btn-block { + margin-top: 5px; +} +input[type="submit"].btn-block, +input[type="reset"].btn-block, +input[type="button"].btn-block { + width: 100%; +} +.fade { + opacity: 0; + -webkit-transition: opacity .15s linear; + -o-transition: opacity .15s linear; + transition: opacity .15s linear; +} +.fade.in { + opacity: 1; +} +.collapse { + display: none; +} +.collapse.in { + display: block; +} +tr.collapse.in { + display: table-row; +} +tbody.collapse.in { + display: table-row-group; +} +.collapsing { + position: relative; + height: 0; + overflow: hidden; + -webkit-transition-timing-function: ease; + -o-transition-timing-function: ease; + transition-timing-function: ease; + -webkit-transition-duration: .35s; + -o-transition-duration: .35s; + transition-duration: .35s; + -webkit-transition-property: height, visibility; + -o-transition-property: height, visibility; + transition-property: height, visibility; +} +.caret { + display: inline-block; + width: 0; + height: 0; + margin-left: 2px; + vertical-align: middle; + border-top: 4px dashed; + border-top: 4px solid \9; + border-right: 4px solid transparent; + border-left: 4px solid transparent; +} +.dropup, +.dropdown { + position: relative; +} +.dropdown-toggle:focus { + outline: 0; +} +.dropdown-menu { + position: absolute; + top: 100%; + left: 0; + z-index: 1000; + display: none; + float: left; + min-width: 160px; + padding: 5px 0; + margin: 2px 0 0; + font-size: 14px; + text-align: left; + list-style: none; + background-color: #fff; + -webkit-background-clip: padding-box; + background-clip: padding-box; + border: 1px solid #ccc; + border: 1px solid rgba(0, 0, 0, .15); + border-radius: 4px; + -webkit-box-shadow: 0 6px 12px rgba(0, 0, 0, .175); + box-shadow: 0 6px 12px rgba(0, 0, 0, .175); +} +.dropdown-menu.pull-right { + right: 0; + left: auto; +} +.dropdown-menu .divider { + height: 1px; + margin: 9px 0; + overflow: hidden; + background-color: #e5e5e5; +} +.dropdown-menu > li > a { + display: block; + padding: 3px 20px; + clear: both; + font-weight: normal; + line-height: 1.42857143; + color: #333; + white-space: nowrap; +} +.dropdown-menu > li > a:hover, +.dropdown-menu > li > a:focus { + color: #262626; + text-decoration: none; + background-color: #f5f5f5; +} +.dropdown-menu > .active > a, +.dropdown-menu > .active > a:hover, +.dropdown-menu > .active > a:focus { + color: #fff; + text-decoration: none; + background-color: #337ab7; + outline: 0; +} +.dropdown-menu > .disabled > a, +.dropdown-menu > .disabled > a:hover, +.dropdown-menu > .disabled > a:focus { + color: #777; +} +.dropdown-menu > .disabled > a:hover, +.dropdown-menu > .disabled > a:focus { + text-decoration: none; + cursor: not-allowed; + background-color: transparent; + background-image: none; + filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); +} +.open > .dropdown-menu { + display: block; +} +.open > a { + outline: 0; +} +.dropdown-menu-right { + right: 0; + left: auto; +} +.dropdown-menu-left { + right: auto; + left: 0; +} +.dropdown-header { + display: block; + padding: 3px 20px; + font-size: 12px; + line-height: 1.42857143; + color: #777; + white-space: nowrap; +} +.dropdown-backdrop { + position: fixed; + top: 0; + right: 0; + bottom: 0; + left: 0; + z-index: 990; +} +.pull-right > .dropdown-menu { + right: 0; + left: auto; +} +.dropup .caret, +.navbar-fixed-bottom .dropdown .caret { + content: ""; + border-top: 0; + border-bottom: 4px dashed; + border-bottom: 4px solid \9; +} +.dropup .dropdown-menu, +.navbar-fixed-bottom .dropdown .dropdown-menu { + top: auto; + bottom: 100%; + margin-bottom: 2px; +} +@media (min-width: 768px) { + .navbar-right .dropdown-menu { + right: 0; + left: auto; + } + .navbar-right .dropdown-menu-left { + right: auto; + left: 0; + } +} +.btn-group, +.btn-group-vertical { + position: relative; + display: inline-block; + vertical-align: middle; +} +.btn-group > .btn, +.btn-group-vertical > .btn { + position: relative; + float: left; +} +.btn-group > .btn:hover, +.btn-group-vertical > .btn:hover, +.btn-group > .btn:focus, +.btn-group-vertical > .btn:focus, +.btn-group > .btn:active, +.btn-group-vertical > .btn:active, +.btn-group > .btn.active, +.btn-group-vertical > .btn.active { + z-index: 2; +} +.btn-group .btn + .btn, +.btn-group .btn + .btn-group, +.btn-group .btn-group + .btn, +.btn-group .btn-group + .btn-group { + margin-left: -1px; +} +.btn-toolbar { + margin-left: -5px; +} +.btn-toolbar .btn, +.btn-toolbar .btn-group, +.btn-toolbar .input-group { + float: left; +} +.btn-toolbar > .btn, +.btn-toolbar > .btn-group, +.btn-toolbar > .input-group { + margin-left: 5px; +} +.btn-group > .btn:not(:first-child):not(:last-child):not(.dropdown-toggle) { + border-radius: 0; +} +.btn-group > .btn:first-child { + margin-left: 0; +} +.btn-group > .btn:first-child:not(:last-child):not(.dropdown-toggle) { + border-top-right-radius: 0; + border-bottom-right-radius: 0; +} +.btn-group > .btn:last-child:not(:first-child), +.btn-group > .dropdown-toggle:not(:first-child) { + border-top-left-radius: 0; + border-bottom-left-radius: 0; +} +.btn-group > .btn-group { + float: left; +} +.btn-group > .btn-group:not(:first-child):not(:last-child) > .btn { + border-radius: 0; +} +.btn-group > .btn-group:first-child:not(:last-child) > .btn:last-child, +.btn-group > .btn-group:first-child:not(:last-child) > .dropdown-toggle { + border-top-right-radius: 0; + border-bottom-right-radius: 0; +} +.btn-group > .btn-group:last-child:not(:first-child) > .btn:first-child { + border-top-left-radius: 0; + border-bottom-left-radius: 0; +} +.btn-group .dropdown-toggle:active, +.btn-group.open .dropdown-toggle { + outline: 0; +} +.btn-group > .btn + .dropdown-toggle { + padding-right: 8px; + padding-left: 8px; +} +.btn-group > .btn-lg + .dropdown-toggle { + padding-right: 12px; + padding-left: 12px; +} +.btn-group.open .dropdown-toggle { + -webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125); + box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125); +} +.btn-group.open .dropdown-toggle.btn-link { + -webkit-box-shadow: none; + box-shadow: none; +} +.btn .caret { + margin-left: 0; +} +.btn-lg .caret { + border-width: 5px 5px 0; + border-bottom-width: 0; +} +.dropup .btn-lg .caret { + border-width: 0 5px 5px; +} +.btn-group-vertical > .btn, +.btn-group-vertical > .btn-group, +.btn-group-vertical > .btn-group > .btn { + display: block; + float: none; + width: 100%; + max-width: 100%; +} +.btn-group-vertical > .btn-group > .btn { + float: none; +} +.btn-group-vertical > .btn + .btn, +.btn-group-vertical > .btn + .btn-group, +.btn-group-vertical > .btn-group + .btn, +.btn-group-vertical > .btn-group + .btn-group { + margin-top: -1px; + margin-left: 0; +} +.btn-group-vertical > .btn:not(:first-child):not(:last-child) { + border-radius: 0; +} +.btn-group-vertical > .btn:first-child:not(:last-child) { + border-top-left-radius: 4px; + border-top-right-radius: 4px; + border-bottom-right-radius: 0; + border-bottom-left-radius: 0; +} +.btn-group-vertical > .btn:last-child:not(:first-child) { + border-top-left-radius: 0; + border-top-right-radius: 0; + border-bottom-right-radius: 4px; + border-bottom-left-radius: 4px; +} +.btn-group-vertical > .btn-group:not(:first-child):not(:last-child) > .btn { + border-radius: 0; +} +.btn-group-vertical > .btn-group:first-child:not(:last-child) > .btn:last-child, +.btn-group-vertical > .btn-group:first-child:not(:last-child) > .dropdown-toggle { + border-bottom-right-radius: 0; + border-bottom-left-radius: 0; +} +.btn-group-vertical > .btn-group:last-child:not(:first-child) > .btn:first-child { + border-top-left-radius: 0; + border-top-right-radius: 0; +} +.btn-group-justified { + display: table; + width: 100%; + table-layout: fixed; + border-collapse: separate; +} +.btn-group-justified > .btn, +.btn-group-justified > .btn-group { + display: table-cell; + float: none; + width: 1%; +} +.btn-group-justified > .btn-group .btn { + width: 100%; +} +.btn-group-justified > .btn-group .dropdown-menu { + left: auto; +} +[data-toggle="buttons"] > .btn input[type="radio"], +[data-toggle="buttons"] > .btn-group > .btn input[type="radio"], +[data-toggle="buttons"] > .btn input[type="checkbox"], +[data-toggle="buttons"] > .btn-group > .btn input[type="checkbox"] { + position: absolute; + clip: rect(0, 0, 0, 0); + pointer-events: none; +} +.input-group { + position: relative; + display: table; + border-collapse: separate; +} +.input-group[class*="col-"] { + float: none; + padding-right: 0; + padding-left: 0; +} +.input-group .form-control { + position: relative; + z-index: 2; + float: left; + width: 100%; + margin-bottom: 0; +} +.input-group .form-control:focus { + z-index: 3; +} +.input-group-lg > .form-control, +.input-group-lg > .input-group-addon, +.input-group-lg > .input-group-btn > .btn { + height: 46px; + padding: 10px 16px; + font-size: 18px; + line-height: 1.3333333; + border-radius: 6px; +} +select.input-group-lg > .form-control, +select.input-group-lg > .input-group-addon, +select.input-group-lg > .input-group-btn > .btn { + height: 46px; + line-height: 46px; +} +textarea.input-group-lg > .form-control, +textarea.input-group-lg > .input-group-addon, +textarea.input-group-lg > .input-group-btn > .btn, +select[multiple].input-group-lg > .form-control, +select[multiple].input-group-lg > .input-group-addon, +select[multiple].input-group-lg > .input-group-btn > .btn { + height: auto; +} +.input-group-sm > .form-control, +.input-group-sm > .input-group-addon, +.input-group-sm > .input-group-btn > .btn { + height: 30px; + padding: 5px 10px; + font-size: 12px; + line-height: 1.5; + border-radius: 3px; +} +select.input-group-sm > .form-control, +select.input-group-sm > .input-group-addon, +select.input-group-sm > .input-group-btn > .btn { + height: 30px; + line-height: 30px; +} +textarea.input-group-sm > .form-control, +textarea.input-group-sm > .input-group-addon, +textarea.input-group-sm > .input-group-btn > .btn, +select[multiple].input-group-sm > .form-control, +select[multiple].input-group-sm > .input-group-addon, +select[multiple].input-group-sm > .input-group-btn > .btn { + height: auto; +} +.input-group-addon, +.input-group-btn, +.input-group .form-control { + display: table-cell; +} +.input-group-addon:not(:first-child):not(:last-child), +.input-group-btn:not(:first-child):not(:last-child), +.input-group .form-control:not(:first-child):not(:last-child) { + border-radius: 0; +} +.input-group-addon, +.input-group-btn { + width: 1%; + white-space: nowrap; + vertical-align: middle; +} +.input-group-addon { + padding: 6px 12px; + font-size: 14px; + font-weight: normal; + line-height: 1; + color: #555; + text-align: center; + background-color: #eee; + border: 1px solid #ccc; + border-radius: 4px; +} +.input-group-addon.input-sm { + padding: 5px 10px; + font-size: 12px; + border-radius: 3px; +} +.input-group-addon.input-lg { + padding: 10px 16px; + font-size: 18px; + border-radius: 6px; +} +.input-group-addon input[type="radio"], +.input-group-addon input[type="checkbox"] { + margin-top: 0; +} +.input-group .form-control:first-child, +.input-group-addon:first-child, +.input-group-btn:first-child > .btn, +.input-group-btn:first-child > .btn-group > .btn, +.input-group-btn:first-child > .dropdown-toggle, +.input-group-btn:last-child > .btn:not(:last-child):not(.dropdown-toggle), +.input-group-btn:last-child > .btn-group:not(:last-child) > .btn { + border-top-right-radius: 0; + border-bottom-right-radius: 0; +} +.input-group-addon:first-child { + border-right: 0; +} +.input-group .form-control:last-child, +.input-group-addon:last-child, +.input-group-btn:last-child > .btn, +.input-group-btn:last-child > .btn-group > .btn, +.input-group-btn:last-child > .dropdown-toggle, +.input-group-btn:first-child > .btn:not(:first-child), +.input-group-btn:first-child > .btn-group:not(:first-child) > .btn { + border-top-left-radius: 0; + border-bottom-left-radius: 0; +} +.input-group-addon:last-child { + border-left: 0; +} +.input-group-btn { + position: relative; + font-size: 0; + white-space: nowrap; +} +.input-group-btn > .btn { + position: relative; +} +.input-group-btn > .btn + .btn { + margin-left: -1px; +} +.input-group-btn > .btn:hover, +.input-group-btn > .btn:focus, +.input-group-btn > .btn:active { + z-index: 2; +} +.input-group-btn:first-child > .btn, +.input-group-btn:first-child > .btn-group { + margin-right: -1px; +} +.input-group-btn:last-child > .btn, +.input-group-btn:last-child > .btn-group { + z-index: 2; + margin-left: -1px; +} +.nav { + padding-left: 0; + margin-bottom: 0; + list-style: none; +} +.nav > li { + position: relative; + display: block; +} +.nav > li > a { + position: relative; + display: block; + padding: 10px 15px; +} +.nav > li > a:hover, +.nav > li > a:focus { + text-decoration: none; + background-color: #eee; +} +.nav > li.disabled > a { + color: #777; +} +.nav > li.disabled > a:hover, +.nav > li.disabled > a:focus { + color: #777; + text-decoration: none; + cursor: not-allowed; + background-color: transparent; +} +.nav .open > a, +.nav .open > a:hover, +.nav .open > a:focus { + background-color: #eee; + border-color: #337ab7; +} +.nav .nav-divider { + height: 1px; + margin: 9px 0; + overflow: hidden; + background-color: #e5e5e5; +} +.nav > li > a > img { + max-width: none; +} +.nav-tabs { + border-bottom: 1px solid #ddd; +} +.nav-tabs > li { + float: left; + margin-bottom: -1px; +} +.nav-tabs > li > a { + margin-right: 2px; + line-height: 1.42857143; + border: 1px solid transparent; + border-radius: 4px 4px 0 0; +} +.nav-tabs > li > a:hover { + border-color: #eee #eee #ddd; +} +.nav-tabs > li.active > a, +.nav-tabs > li.active > a:hover, +.nav-tabs > li.active > a:focus { + color: #555; + cursor: default; + background-color: #fff; + border: 1px solid #ddd; + border-bottom-color: transparent; +} +.nav-tabs.nav-justified { + width: 100%; + border-bottom: 0; +} +.nav-tabs.nav-justified > li { + float: none; +} +.nav-tabs.nav-justified > li > a { + margin-bottom: 5px; + text-align: center; +} +.nav-tabs.nav-justified > .dropdown .dropdown-menu { + top: auto; + left: auto; +} +@media (min-width: 768px) { + .nav-tabs.nav-justified > li { + display: table-cell; + width: 1%; + } + .nav-tabs.nav-justified > li > a { + margin-bottom: 0; + } +} +.nav-tabs.nav-justified > li > a { + margin-right: 0; + border-radius: 4px; +} +.nav-tabs.nav-justified > .active > a, +.nav-tabs.nav-justified > .active > a:hover, +.nav-tabs.nav-justified > .active > a:focus { + border: 1px solid #ddd; +} +@media (min-width: 768px) { + .nav-tabs.nav-justified > li > a { + border-bottom: 1px solid #ddd; + border-radius: 4px 4px 0 0; + } + .nav-tabs.nav-justified > .active > a, + .nav-tabs.nav-justified > .active > a:hover, + .nav-tabs.nav-justified > .active > a:focus { + border-bottom-color: #fff; + } +} +.nav-pills > li { + float: left; +} +.nav-pills > li > a { + border-radius: 4px; +} +.nav-pills > li + li { + margin-left: 2px; +} +.nav-pills > li.active > a, +.nav-pills > li.active > a:hover, +.nav-pills > li.active > a:focus { + color: #fff; + background-color: #337ab7; +} +.nav-stacked > li { + float: none; +} +.nav-stacked > li + li { + margin-top: 2px; + margin-left: 0; +} +.nav-justified { + width: 100%; +} +.nav-justified > li { + float: none; +} +.nav-justified > li > a { + margin-bottom: 5px; + text-align: center; +} +.nav-justified > .dropdown .dropdown-menu { + top: auto; + left: auto; +} +@media (min-width: 768px) { + .nav-justified > li { + display: table-cell; + width: 1%; + } + .nav-justified > li > a { + margin-bottom: 0; + } +} +.nav-tabs-justified { + border-bottom: 0; +} +.nav-tabs-justified > li > a { + margin-right: 0; + border-radius: 4px; +} +.nav-tabs-justified > .active > a, +.nav-tabs-justified > .active > a:hover, +.nav-tabs-justified > .active > a:focus { + border: 1px solid #ddd; +} +@media (min-width: 768px) { + .nav-tabs-justified > li > a { + border-bottom: 1px solid #ddd; + border-radius: 4px 4px 0 0; + } + .nav-tabs-justified > .active > a, + .nav-tabs-justified > .active > a:hover, + .nav-tabs-justified > .active > a:focus { + border-bottom-color: #fff; + } +} +.tab-content > .tab-pane { + display: none; +} +.tab-content > .active { + display: block; +} +.nav-tabs .dropdown-menu { + margin-top: -1px; + border-top-left-radius: 0; + border-top-right-radius: 0; +} +.navbar { + position: relative; + min-height: 50px; + margin-bottom: 20px; + border: 1px solid transparent; +} +@media (min-width: 768px) { + .navbar { + border-radius: 4px; + } +} +@media (min-width: 768px) { + .navbar-header { + float: left; + } +} +.navbar-collapse { + padding-right: 15px; + padding-left: 15px; + overflow-x: visible; + -webkit-overflow-scrolling: touch; + border-top: 1px solid transparent; + -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1); + box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1); +} +.navbar-collapse.in { + overflow-y: auto; +} +@media (min-width: 768px) { + .navbar-collapse { + width: auto; + border-top: 0; + -webkit-box-shadow: none; + box-shadow: none; + } + .navbar-collapse.collapse { + display: block !important; + height: auto !important; + padding-bottom: 0; + overflow: visible !important; + } + .navbar-collapse.in { + overflow-y: visible; + } + .navbar-fixed-top .navbar-collapse, + .navbar-static-top .navbar-collapse, + .navbar-fixed-bottom .navbar-collapse { + padding-right: 0; + padding-left: 0; + } +} +.navbar-fixed-top .navbar-collapse, +.navbar-fixed-bottom .navbar-collapse { + max-height: 340px; +} +@media (max-device-width: 480px) and (orientation: landscape) { + .navbar-fixed-top .navbar-collapse, + .navbar-fixed-bottom .navbar-collapse { + max-height: 200px; + } +} +.container > .navbar-header, +.container-fluid > .navbar-header, +.container > .navbar-collapse, +.container-fluid > .navbar-collapse { + margin-right: -15px; + margin-left: -15px; +} +@media (min-width: 768px) { + .container > .navbar-header, + .container-fluid > .navbar-header, + .container > .navbar-collapse, + .container-fluid > .navbar-collapse { + margin-right: 0; + margin-left: 0; + } +} +.navbar-static-top { + z-index: 1000; + border-width: 0 0 1px; +} +@media (min-width: 768px) { + .navbar-static-top { + border-radius: 0; + } +} +.navbar-fixed-top, +.navbar-fixed-bottom { + position: fixed; + right: 0; + left: 0; + z-index: 1030; +} +@media (min-width: 768px) { + .navbar-fixed-top, + .navbar-fixed-bottom { + border-radius: 0; + } +} +.navbar-fixed-top { + top: 0; + border-width: 0 0 1px; +} +.navbar-fixed-bottom { + bottom: 0; + margin-bottom: 0; + border-width: 1px 0 0; +} +.navbar-brand { + float: left; + height: 50px; + padding: 15px 15px; + font-size: 18px; + line-height: 20px; +} +.navbar-brand:hover, +.navbar-brand:focus { + text-decoration: none; +} +.navbar-brand > img { + display: block; +} +@media (min-width: 768px) { + .navbar > .container .navbar-brand, + .navbar > .container-fluid .navbar-brand { + margin-left: -15px; + } +} +.navbar-toggle { + position: relative; + float: right; + padding: 9px 10px; + margin-top: 8px; + margin-right: 15px; + margin-bottom: 8px; + background-color: transparent; + background-image: none; + border: 1px solid transparent; + border-radius: 4px; +} +.navbar-toggle:focus { + outline: 0; +} +.navbar-toggle .icon-bar { + display: block; + width: 22px; + height: 2px; + border-radius: 1px; +} +.navbar-toggle .icon-bar + .icon-bar { + margin-top: 4px; +} +@media (min-width: 768px) { + .navbar-toggle { + display: none; + } +} +.navbar-nav { + margin: 7.5px -15px; +} +.navbar-nav > li > a { + padding-top: 10px; + padding-bottom: 10px; + line-height: 20px; +} +@media (max-width: 767px) { + .navbar-nav .open .dropdown-menu { + position: static; + float: none; + width: auto; + margin-top: 0; + background-color: transparent; + border: 0; + -webkit-box-shadow: none; + box-shadow: none; + } + .navbar-nav .open .dropdown-menu > li > a, + .navbar-nav .open .dropdown-menu .dropdown-header { + padding: 5px 15px 5px 25px; + } + .navbar-nav .open .dropdown-menu > li > a { + line-height: 20px; + } + .navbar-nav .open .dropdown-menu > li > a:hover, + .navbar-nav .open .dropdown-menu > li > a:focus { + background-image: none; + } +} +@media (min-width: 768px) { + .navbar-nav { + float: left; + margin: 0; + } + .navbar-nav > li { + float: left; + } + .navbar-nav > li > a { + padding-top: 15px; + padding-bottom: 15px; + } +} +.navbar-form { + padding: 10px 15px; + margin-top: 8px; + margin-right: -15px; + margin-bottom: 8px; + margin-left: -15px; + border-top: 1px solid transparent; + border-bottom: 1px solid transparent; + -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1), 0 1px 0 rgba(255, 255, 255, .1); + box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1), 0 1px 0 rgba(255, 255, 255, .1); +} +@media (min-width: 768px) { + .navbar-form .form-group { + display: inline-block; + margin-bottom: 0; + vertical-align: middle; + } + .navbar-form .form-control { + display: inline-block; + width: auto; + vertical-align: middle; + } + .navbar-form .form-control-static { + display: inline-block; + } + .navbar-form .input-group { + display: inline-table; + vertical-align: middle; + } + .navbar-form .input-group .input-group-addon, + .navbar-form .input-group .input-group-btn, + .navbar-form .input-group .form-control { + width: auto; + } + .navbar-form .input-group > .form-control { + width: 100%; + } + .navbar-form .control-label { + margin-bottom: 0; + vertical-align: middle; + } + .navbar-form .radio, + .navbar-form .checkbox { + display: inline-block; + margin-top: 0; + margin-bottom: 0; + vertical-align: middle; + } + .navbar-form .radio label, + .navbar-form .checkbox label { + padding-left: 0; + } + .navbar-form .radio input[type="radio"], + .navbar-form .checkbox input[type="checkbox"] { + position: relative; + margin-left: 0; + } + .navbar-form .has-feedback .form-control-feedback { + top: 0; + } +} +@media (max-width: 767px) { + .navbar-form .form-group { + margin-bottom: 5px; + } + .navbar-form .form-group:last-child { + margin-bottom: 0; + } +} +@media (min-width: 768px) { + .navbar-form { + width: auto; + padding-top: 0; + padding-bottom: 0; + margin-right: 0; + margin-left: 0; + border: 0; + -webkit-box-shadow: none; + box-shadow: none; + } +} +.navbar-nav > li > .dropdown-menu { + margin-top: 0; + border-top-left-radius: 0; + border-top-right-radius: 0; +} +.navbar-fixed-bottom .navbar-nav > li > .dropdown-menu { + margin-bottom: 0; + border-top-left-radius: 4px; + border-top-right-radius: 4px; + border-bottom-right-radius: 0; + border-bottom-left-radius: 0; +} +.navbar-btn { + margin-top: 8px; + margin-bottom: 8px; +} +.navbar-btn.btn-sm { + margin-top: 10px; + margin-bottom: 10px; +} +.navbar-btn.btn-xs { + margin-top: 14px; + margin-bottom: 14px; +} +.navbar-text { + margin-top: 15px; + margin-bottom: 15px; +} +@media (min-width: 768px) { + .navbar-text { + float: left; + margin-right: 15px; + margin-left: 15px; + } +} +@media (min-width: 768px) { + .navbar-left { + float: left !important; + } + .navbar-right { + float: right !important; + margin-right: -15px; + } + .navbar-right ~ .navbar-right { + margin-right: 0; + } +} +.navbar-default { + background-color: #f8f8f8; + border-color: #e7e7e7; +} +.navbar-default .navbar-brand { + color: #777; +} +.navbar-default .navbar-brand:hover, +.navbar-default .navbar-brand:focus { + color: #5e5e5e; + background-color: transparent; +} +.navbar-default .navbar-text { + color: #777; +} +.navbar-default .navbar-nav > li > a { + color: #777; +} +.navbar-default .navbar-nav > li > a:hover, +.navbar-default .navbar-nav > li > a:focus { + color: #333; + background-color: transparent; +} +.navbar-default .navbar-nav > .active > a, +.navbar-default .navbar-nav > .active > a:hover, +.navbar-default .navbar-nav > .active > a:focus { + color: #555; + background-color: #e7e7e7; +} +.navbar-default .navbar-nav > .disabled > a, +.navbar-default .navbar-nav > .disabled > a:hover, +.navbar-default .navbar-nav > .disabled > a:focus { + color: #ccc; + background-color: transparent; +} +.navbar-default .navbar-toggle { + border-color: #ddd; +} +.navbar-default .navbar-toggle:hover, +.navbar-default .navbar-toggle:focus { + background-color: #ddd; +} +.navbar-default .navbar-toggle .icon-bar { + background-color: #888; +} +.navbar-default .navbar-collapse, +.navbar-default .navbar-form { + border-color: #e7e7e7; +} +.navbar-default .navbar-nav > .open > a, +.navbar-default .navbar-nav > .open > a:hover, +.navbar-default .navbar-nav > .open > a:focus { + color: #555; + background-color: #e7e7e7; +} +@media (max-width: 767px) { + .navbar-default .navbar-nav .open .dropdown-menu > li > a { + color: #777; + } + .navbar-default .navbar-nav .open .dropdown-menu > li > a:hover, + .navbar-default .navbar-nav .open .dropdown-menu > li > a:focus { + color: #333; + background-color: transparent; + } + .navbar-default .navbar-nav .open .dropdown-menu > .active > a, + .navbar-default .navbar-nav .open .dropdown-menu > .active > a:hover, + .navbar-default .navbar-nav .open .dropdown-menu > .active > a:focus { + color: #555; + background-color: #e7e7e7; + } + .navbar-default .navbar-nav .open .dropdown-menu > .disabled > a, + .navbar-default .navbar-nav .open .dropdown-menu > .disabled > a:hover, + .navbar-default .navbar-nav .open .dropdown-menu > .disabled > a:focus { + color: #ccc; + background-color: transparent; + } +} +.navbar-default .navbar-link { + color: #777; +} +.navbar-default .navbar-link:hover { + color: #333; +} +.navbar-default .btn-link { + color: #777; +} +.navbar-default .btn-link:hover, +.navbar-default .btn-link:focus { + color: #333; +} +.navbar-default .btn-link[disabled]:hover, +fieldset[disabled] .navbar-default .btn-link:hover, +.navbar-default .btn-link[disabled]:focus, +fieldset[disabled] .navbar-default .btn-link:focus { + color: #ccc; +} +.navbar-inverse { + background-color: #222; + border-color: #080808; +} +.navbar-inverse .navbar-brand { + color: #9d9d9d; +} +.navbar-inverse .navbar-brand:hover, +.navbar-inverse .navbar-brand:focus { + color: #fff; + background-color: transparent; +} +.navbar-inverse .navbar-text { + color: #9d9d9d; +} +.navbar-inverse .navbar-nav > li > a { + color: #9d9d9d; +} +.navbar-inverse .navbar-nav > li > a:hover, +.navbar-inverse .navbar-nav > li > a:focus { + color: #fff; + background-color: transparent; +} +.navbar-inverse .navbar-nav > .active > a, +.navbar-inverse .navbar-nav > .active > a:hover, +.navbar-inverse .navbar-nav > .active > a:focus { + color: #fff; + background-color: #080808; +} +.navbar-inverse .navbar-nav > .disabled > a, +.navbar-inverse .navbar-nav > .disabled > a:hover, +.navbar-inverse .navbar-nav > .disabled > a:focus { + color: #444; + background-color: transparent; +} +.navbar-inverse .navbar-toggle { + border-color: #333; +} +.navbar-inverse .navbar-toggle:hover, +.navbar-inverse .navbar-toggle:focus { + background-color: #333; +} +.navbar-inverse .navbar-toggle .icon-bar { + background-color: #fff; +} +.navbar-inverse .navbar-collapse, +.navbar-inverse .navbar-form { + border-color: #101010; +} +.navbar-inverse .navbar-nav > .open > a, +.navbar-inverse .navbar-nav > .open > a:hover, +.navbar-inverse .navbar-nav > .open > a:focus { + color: #fff; + background-color: #080808; +} +@media (max-width: 767px) { + .navbar-inverse .navbar-nav .open .dropdown-menu > .dropdown-header { + border-color: #080808; + } + .navbar-inverse .navbar-nav .open .dropdown-menu .divider { + background-color: #080808; + } + .navbar-inverse .navbar-nav .open .dropdown-menu > li > a { + color: #9d9d9d; + } + .navbar-inverse .navbar-nav .open .dropdown-menu > li > a:hover, + .navbar-inverse .navbar-nav .open .dropdown-menu > li > a:focus { + color: #fff; + background-color: transparent; + } + .navbar-inverse .navbar-nav .open .dropdown-menu > .active > a, + .navbar-inverse .navbar-nav .open .dropdown-menu > .active > a:hover, + .navbar-inverse .navbar-nav .open .dropdown-menu > .active > a:focus { + color: #fff; + background-color: #080808; + } + .navbar-inverse .navbar-nav .open .dropdown-menu > .disabled > a, + .navbar-inverse .navbar-nav .open .dropdown-menu > .disabled > a:hover, + .navbar-inverse .navbar-nav .open .dropdown-menu > .disabled > a:focus { + color: #444; + background-color: transparent; + } +} +.navbar-inverse .navbar-link { + color: #9d9d9d; +} +.navbar-inverse .navbar-link:hover { + color: #fff; +} +.navbar-inverse .btn-link { + color: #9d9d9d; +} +.navbar-inverse .btn-link:hover, +.navbar-inverse .btn-link:focus { + color: #fff; +} +.navbar-inverse .btn-link[disabled]:hover, +fieldset[disabled] .navbar-inverse .btn-link:hover, +.navbar-inverse .btn-link[disabled]:focus, +fieldset[disabled] .navbar-inverse .btn-link:focus { + color: #444; +} +.breadcrumb { + padding: 8px 15px; + margin-bottom: 20px; + list-style: none; + background-color: #f5f5f5; + border-radius: 4px; +} +.breadcrumb > li { + display: inline-block; +} +.breadcrumb > li + li:before { + padding: 0 5px; + color: #ccc; + content: "/\00a0"; +} +.breadcrumb > .active { + color: #777; +} +.pagination { + display: inline-block; + padding-left: 0; + margin: 20px 0; + border-radius: 4px; +} +.pagination > li { + display: inline; +} +.pagination > li > a, +.pagination > li > span { + position: relative; + float: left; + padding: 6px 12px; + margin-left: -1px; + line-height: 1.42857143; + color: #337ab7; + text-decoration: none; + background-color: #fff; + border: 1px solid #ddd; +} +.pagination > li:first-child > a, +.pagination > li:first-child > span { + margin-left: 0; + border-top-left-radius: 4px; + border-bottom-left-radius: 4px; +} +.pagination > li:last-child > a, +.pagination > li:last-child > span { + border-top-right-radius: 4px; + border-bottom-right-radius: 4px; +} +.pagination > li > a:hover, +.pagination > li > span:hover, +.pagination > li > a:focus, +.pagination > li > span:focus { + z-index: 2; + color: #23527c; + background-color: #eee; + border-color: #ddd; +} +.pagination > .active > a, +.pagination > .active > span, +.pagination > .active > a:hover, +.pagination > .active > span:hover, +.pagination > .active > a:focus, +.pagination > .active > span:focus { + z-index: 3; + color: #fff; + cursor: default; + background-color: #337ab7; + border-color: #337ab7; +} +.pagination > .disabled > span, +.pagination > .disabled > span:hover, +.pagination > .disabled > span:focus, +.pagination > .disabled > a, +.pagination > .disabled > a:hover, +.pagination > .disabled > a:focus { + color: #777; + cursor: not-allowed; + background-color: #fff; + border-color: #ddd; +} +.pagination-lg > li > a, +.pagination-lg > li > span { + padding: 10px 16px; + font-size: 18px; + line-height: 1.3333333; +} +.pagination-lg > li:first-child > a, +.pagination-lg > li:first-child > span { + border-top-left-radius: 6px; + border-bottom-left-radius: 6px; +} +.pagination-lg > li:last-child > a, +.pagination-lg > li:last-child > span { + border-top-right-radius: 6px; + border-bottom-right-radius: 6px; +} +.pagination-sm > li > a, +.pagination-sm > li > span { + padding: 5px 10px; + font-size: 12px; + line-height: 1.5; +} +.pagination-sm > li:first-child > a, +.pagination-sm > li:first-child > span { + border-top-left-radius: 3px; + border-bottom-left-radius: 3px; +} +.pagination-sm > li:last-child > a, +.pagination-sm > li:last-child > span { + border-top-right-radius: 3px; + border-bottom-right-radius: 3px; +} +.pager { + padding-left: 0; + margin: 20px 0; + text-align: center; + list-style: none; +} +.pager li { + display: inline; +} +.pager li > a, +.pager li > span { + display: inline-block; + padding: 5px 14px; + background-color: #fff; + border: 1px solid #ddd; + border-radius: 15px; +} +.pager li > a:hover, +.pager li > a:focus { + text-decoration: none; + background-color: #eee; +} +.pager .next > a, +.pager .next > span { + float: right; +} +.pager .previous > a, +.pager .previous > span { + float: left; +} +.pager .disabled > a, +.pager .disabled > a:hover, +.pager .disabled > a:focus, +.pager .disabled > span { + color: #777; + cursor: not-allowed; + background-color: #fff; +} +.label { + display: inline; + padding: .2em .6em .3em; + font-size: 75%; + font-weight: bold; + line-height: 1; + color: #fff; + text-align: center; + white-space: nowrap; + vertical-align: baseline; + border-radius: .25em; +} +a.label:hover, +a.label:focus { + color: #fff; + text-decoration: none; + cursor: pointer; +} +.label:empty { + display: none; +} +.btn .label { + position: relative; + top: -1px; +} +.label-default { + background-color: #777; +} +.label-default[href]:hover, +.label-default[href]:focus { + background-color: #5e5e5e; +} +.label-primary { + background-color: #337ab7; +} +.label-primary[href]:hover, +.label-primary[href]:focus { + background-color: #286090; +} +.label-success { + background-color: #5cb85c; +} +.label-success[href]:hover, +.label-success[href]:focus { + background-color: #449d44; +} +.label-info { + background-color: #5bc0de; +} +.label-info[href]:hover, +.label-info[href]:focus { + background-color: #31b0d5; +} +.label-warning { + background-color: #f0ad4e; +} +.label-warning[href]:hover, +.label-warning[href]:focus { + background-color: #ec971f; +} +.label-danger { + background-color: #d9534f; +} +.label-danger[href]:hover, +.label-danger[href]:focus { + background-color: #c9302c; +} +.badge { + display: inline-block; + min-width: 10px; + padding: 3px 7px; + font-size: 12px; + font-weight: bold; + line-height: 1; + color: #fff; + text-align: center; + white-space: nowrap; + vertical-align: middle; + background-color: #777; + border-radius: 10px; +} +.badge:empty { + display: none; +} +.btn .badge { + position: relative; + top: -1px; +} +.btn-xs .badge, +.btn-group-xs > .btn .badge { + top: 0; + padding: 1px 5px; +} +a.badge:hover, +a.badge:focus { + color: #fff; + text-decoration: none; + cursor: pointer; +} +.list-group-item.active > .badge, +.nav-pills > .active > a > .badge { + color: #337ab7; + background-color: #fff; +} +.list-group-item > .badge { + float: right; +} +.list-group-item > .badge + .badge { + margin-right: 5px; +} +.nav-pills > li > a > .badge { + margin-left: 3px; +} +.jumbotron { + padding-top: 30px; + padding-bottom: 30px; + margin-bottom: 30px; + color: inherit; + background-color: #eee; +} +.jumbotron h1, +.jumbotron .h1 { + color: inherit; +} +.jumbotron p { + margin-bottom: 15px; + font-size: 21px; + font-weight: 200; +} +.jumbotron > hr { + border-top-color: #d5d5d5; +} +.container .jumbotron, +.container-fluid .jumbotron { + padding-right: 15px; + padding-left: 15px; + border-radius: 6px; +} +.jumbotron .container { + max-width: 100%; +} +@media screen and (min-width: 768px) { + .jumbotron { + padding-top: 48px; + padding-bottom: 48px; + } + .container .jumbotron, + .container-fluid .jumbotron { + padding-right: 60px; + padding-left: 60px; + } + .jumbotron h1, + .jumbotron .h1 { + font-size: 63px; + } +} +.thumbnail { + display: block; + padding: 4px; + margin-bottom: 20px; + line-height: 1.42857143; + background-color: #fff; + border: 1px solid #ddd; + border-radius: 4px; + -webkit-transition: border .2s ease-in-out; + -o-transition: border .2s ease-in-out; + transition: border .2s ease-in-out; +} +.thumbnail > img, +.thumbnail a > img { + margin-right: auto; + margin-left: auto; +} +a.thumbnail:hover, +a.thumbnail:focus, +a.thumbnail.active { + border-color: #337ab7; +} +.thumbnail .caption { + padding: 9px; + color: #333; +} +.alert { + padding: 15px; + margin-bottom: 20px; + border: 1px solid transparent; + border-radius: 4px; +} +.alert h4 { + margin-top: 0; + color: inherit; +} +.alert .alert-link { + font-weight: bold; +} +.alert > p, +.alert > ul { + margin-bottom: 0; +} +.alert > p + p { + margin-top: 5px; +} +.alert-dismissable, +.alert-dismissible { + padding-right: 35px; +} +.alert-dismissable .close, +.alert-dismissible .close { + position: relative; + top: -2px; + right: -21px; + color: inherit; +} +.alert-success { + color: #3c763d; + background-color: #dff0d8; + border-color: #d6e9c6; +} +.alert-success hr { + border-top-color: #c9e2b3; +} +.alert-success .alert-link { + color: #2b542c; +} +.alert-info { + color: #31708f; + background-color: #d9edf7; + border-color: #bce8f1; +} +.alert-info hr { + border-top-color: #a6e1ec; +} +.alert-info .alert-link { + color: #245269; +} +.alert-warning { + color: #8a6d3b; + background-color: #fcf8e3; + border-color: #faebcc; +} +.alert-warning hr { + border-top-color: #f7e1b5; +} +.alert-warning .alert-link { + color: #66512c; +} +.alert-danger { + color: #a94442; + background-color: #f2dede; + border-color: #ebccd1; +} +.alert-danger hr { + border-top-color: #e4b9c0; +} +.alert-danger .alert-link { + color: #843534; +} +@-webkit-keyframes progress-bar-stripes { + from { + background-position: 40px 0; + } + to { + background-position: 0 0; + } +} +@-o-keyframes progress-bar-stripes { + from { + background-position: 40px 0; + } + to { + background-position: 0 0; + } +} +@keyframes progress-bar-stripes { + from { + background-position: 40px 0; + } + to { + background-position: 0 0; + } +} +.progress { + height: 20px; + margin-bottom: 20px; + overflow: hidden; + background-color: #f5f5f5; + border-radius: 4px; + -webkit-box-shadow: inset 0 1px 2px rgba(0, 0, 0, .1); + box-shadow: inset 0 1px 2px rgba(0, 0, 0, .1); +} +.progress-bar { + float: left; + width: 0; + height: 100%; + font-size: 12px; + line-height: 20px; + color: #fff; + text-align: center; + background-color: #337ab7; + -webkit-box-shadow: inset 0 -1px 0 rgba(0, 0, 0, .15); + box-shadow: inset 0 -1px 0 rgba(0, 0, 0, .15); + -webkit-transition: width .6s ease; + -o-transition: width .6s ease; + transition: width .6s ease; +} +.progress-striped .progress-bar, +.progress-bar-striped { + background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent); + background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent); + background-image: linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent); + -webkit-background-size: 40px 40px; + background-size: 40px 40px; +} +.progress.active .progress-bar, +.progress-bar.active { + -webkit-animation: progress-bar-stripes 2s linear infinite; + -o-animation: progress-bar-stripes 2s linear infinite; + animation: progress-bar-stripes 2s linear infinite; +} +.progress-bar-success { + background-color: #5cb85c; +} +.progress-striped .progress-bar-success { + background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent); + background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent); + background-image: linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent); +} +.progress-bar-info { + background-color: #5bc0de; +} +.progress-striped .progress-bar-info { + background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent); + background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent); + background-image: linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent); +} +.progress-bar-warning { + background-color: #f0ad4e; +} +.progress-striped .progress-bar-warning { + background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent); + background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent); + background-image: linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent); +} +.progress-bar-danger { + background-color: #d9534f; +} +.progress-striped .progress-bar-danger { + background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent); + background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent); + background-image: linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent); +} +.media { + margin-top: 15px; +} +.media:first-child { + margin-top: 0; +} +.media, +.media-body { + overflow: hidden; + zoom: 1; +} +.media-body { + width: 10000px; +} +.media-object { + display: block; +} +.media-object.img-thumbnail { + max-width: none; +} +.media-right, +.media > .pull-right { + padding-left: 10px; +} +.media-left, +.media > .pull-left { + padding-right: 10px; +} +.media-left, +.media-right, +.media-body { + display: table-cell; + vertical-align: top; +} +.media-middle { + vertical-align: middle; +} +.media-bottom { + vertical-align: bottom; +} +.media-heading { + margin-top: 0; + margin-bottom: 5px; +} +.media-list { + padding-left: 0; + list-style: none; +} +.list-group { + padding-left: 0; + margin-bottom: 20px; +} +.list-group-item { + position: relative; + display: block; + padding: 10px 15px; + margin-bottom: -1px; + background-color: #fff; + border: 1px solid #ddd; +} +.list-group-item:first-child { + border-top-left-radius: 4px; + border-top-right-radius: 4px; +} +.list-group-item:last-child { + margin-bottom: 0; + border-bottom-right-radius: 4px; + border-bottom-left-radius: 4px; +} +a.list-group-item, +button.list-group-item { + color: #555; +} +a.list-group-item .list-group-item-heading, +button.list-group-item .list-group-item-heading { + color: #333; +} +a.list-group-item:hover, +button.list-group-item:hover, +a.list-group-item:focus, +button.list-group-item:focus { + color: #555; + text-decoration: none; + background-color: #f5f5f5; +} +button.list-group-item { + width: 100%; + text-align: left; +} +.list-group-item.disabled, +.list-group-item.disabled:hover, +.list-group-item.disabled:focus { + color: #777; + cursor: not-allowed; + background-color: #eee; +} +.list-group-item.disabled .list-group-item-heading, +.list-group-item.disabled:hover .list-group-item-heading, +.list-group-item.disabled:focus .list-group-item-heading { + color: inherit; +} +.list-group-item.disabled .list-group-item-text, +.list-group-item.disabled:hover .list-group-item-text, +.list-group-item.disabled:focus .list-group-item-text { + color: #777; +} +.list-group-item.active, +.list-group-item.active:hover, +.list-group-item.active:focus { + z-index: 2; + color: #fff; + background-color: #337ab7; + border-color: #337ab7; +} +.list-group-item.active .list-group-item-heading, +.list-group-item.active:hover .list-group-item-heading, +.list-group-item.active:focus .list-group-item-heading, +.list-group-item.active .list-group-item-heading > small, +.list-group-item.active:hover .list-group-item-heading > small, +.list-group-item.active:focus .list-group-item-heading > small, +.list-group-item.active .list-group-item-heading > .small, +.list-group-item.active:hover .list-group-item-heading > .small, +.list-group-item.active:focus .list-group-item-heading > .small { + color: inherit; +} +.list-group-item.active .list-group-item-text, +.list-group-item.active:hover .list-group-item-text, +.list-group-item.active:focus .list-group-item-text { + color: #c7ddef; +} +.list-group-item-success { + color: #3c763d; + background-color: #dff0d8; +} +a.list-group-item-success, +button.list-group-item-success { + color: #3c763d; +} +a.list-group-item-success .list-group-item-heading, +button.list-group-item-success .list-group-item-heading { + color: inherit; +} +a.list-group-item-success:hover, +button.list-group-item-success:hover, +a.list-group-item-success:focus, +button.list-group-item-success:focus { + color: #3c763d; + background-color: #d0e9c6; +} +a.list-group-item-success.active, +button.list-group-item-success.active, +a.list-group-item-success.active:hover, +button.list-group-item-success.active:hover, +a.list-group-item-success.active:focus, +button.list-group-item-success.active:focus { + color: #fff; + background-color: #3c763d; + border-color: #3c763d; +} +.list-group-item-info { + color: #31708f; + background-color: #d9edf7; +} +a.list-group-item-info, +button.list-group-item-info { + color: #31708f; +} +a.list-group-item-info .list-group-item-heading, +button.list-group-item-info .list-group-item-heading { + color: inherit; +} +a.list-group-item-info:hover, +button.list-group-item-info:hover, +a.list-group-item-info:focus, +button.list-group-item-info:focus { + color: #31708f; + background-color: #c4e3f3; +} +a.list-group-item-info.active, +button.list-group-item-info.active, +a.list-group-item-info.active:hover, +button.list-group-item-info.active:hover, +a.list-group-item-info.active:focus, +button.list-group-item-info.active:focus { + color: #fff; + background-color: #31708f; + border-color: #31708f; +} +.list-group-item-warning { + color: #8a6d3b; + background-color: #fcf8e3; +} +a.list-group-item-warning, +button.list-group-item-warning { + color: #8a6d3b; +} +a.list-group-item-warning .list-group-item-heading, +button.list-group-item-warning .list-group-item-heading { + color: inherit; +} +a.list-group-item-warning:hover, +button.list-group-item-warning:hover, +a.list-group-item-warning:focus, +button.list-group-item-warning:focus { + color: #8a6d3b; + background-color: #faf2cc; +} +a.list-group-item-warning.active, +button.list-group-item-warning.active, +a.list-group-item-warning.active:hover, +button.list-group-item-warning.active:hover, +a.list-group-item-warning.active:focus, +button.list-group-item-warning.active:focus { + color: #fff; + background-color: #8a6d3b; + border-color: #8a6d3b; +} +.list-group-item-danger { + color: #a94442; + background-color: #f2dede; +} +a.list-group-item-danger, +button.list-group-item-danger { + color: #a94442; +} +a.list-group-item-danger .list-group-item-heading, +button.list-group-item-danger .list-group-item-heading { + color: inherit; +} +a.list-group-item-danger:hover, +button.list-group-item-danger:hover, +a.list-group-item-danger:focus, +button.list-group-item-danger:focus { + color: #a94442; + background-color: #ebcccc; +} +a.list-group-item-danger.active, +button.list-group-item-danger.active, +a.list-group-item-danger.active:hover, +button.list-group-item-danger.active:hover, +a.list-group-item-danger.active:focus, +button.list-group-item-danger.active:focus { + color: #fff; + background-color: #a94442; + border-color: #a94442; +} +.list-group-item-heading { + margin-top: 0; + margin-bottom: 5px; +} +.list-group-item-text { + margin-bottom: 0; + line-height: 1.3; +} +.panel { + margin-bottom: 20px; + background-color: #fff; + border: 1px solid transparent; + border-radius: 4px; + -webkit-box-shadow: 0 1px 1px rgba(0, 0, 0, .05); + box-shadow: 0 1px 1px rgba(0, 0, 0, .05); +} +.panel-body { + padding: 15px; +} +.panel-heading { + padding: 10px 15px; + border-bottom: 1px solid transparent; + border-top-left-radius: 3px; + border-top-right-radius: 3px; +} +.panel-heading > .dropdown .dropdown-toggle { + color: inherit; +} +.panel-title { + margin-top: 0; + margin-bottom: 0; + font-size: 16px; + color: inherit; +} +.panel-title > a, +.panel-title > small, +.panel-title > .small, +.panel-title > small > a, +.panel-title > .small > a { + color: inherit; +} +.panel-footer { + padding: 10px 15px; + background-color: #f5f5f5; + border-top: 1px solid #ddd; + border-bottom-right-radius: 3px; + border-bottom-left-radius: 3px; +} +.panel > .list-group, +.panel > .panel-collapse > .list-group { + margin-bottom: 0; +} +.panel > .list-group .list-group-item, +.panel > .panel-collapse > .list-group .list-group-item { + border-width: 1px 0; + border-radius: 0; +} +.panel > .list-group:first-child .list-group-item:first-child, +.panel > .panel-collapse > .list-group:first-child .list-group-item:first-child { + border-top: 0; + border-top-left-radius: 3px; + border-top-right-radius: 3px; +} +.panel > .list-group:last-child .list-group-item:last-child, +.panel > .panel-collapse > .list-group:last-child .list-group-item:last-child { + border-bottom: 0; + border-bottom-right-radius: 3px; + border-bottom-left-radius: 3px; +} +.panel > .panel-heading + .panel-collapse > .list-group .list-group-item:first-child { + border-top-left-radius: 0; + border-top-right-radius: 0; +} +.panel-heading + .list-group .list-group-item:first-child { + border-top-width: 0; +} +.list-group + .panel-footer { + border-top-width: 0; +} +.panel > .table, +.panel > .table-responsive > .table, +.panel > .panel-collapse > .table { + margin-bottom: 0; +} +.panel > .table caption, +.panel > .table-responsive > .table caption, +.panel > .panel-collapse > .table caption { + padding-right: 15px; + padding-left: 15px; +} +.panel > .table:first-child, +.panel > .table-responsive:first-child > .table:first-child { + border-top-left-radius: 3px; + border-top-right-radius: 3px; +} +.panel > .table:first-child > thead:first-child > tr:first-child, +.panel > .table-responsive:first-child > .table:first-child > thead:first-child > tr:first-child, +.panel > .table:first-child > tbody:first-child > tr:first-child, +.panel > .table-responsive:first-child > .table:first-child > tbody:first-child > tr:first-child { + border-top-left-radius: 3px; + border-top-right-radius: 3px; +} +.panel > .table:first-child > thead:first-child > tr:first-child td:first-child, +.panel > .table-responsive:first-child > .table:first-child > thead:first-child > tr:first-child td:first-child, +.panel > .table:first-child > tbody:first-child > tr:first-child td:first-child, +.panel > .table-responsive:first-child > .table:first-child > tbody:first-child > tr:first-child td:first-child, +.panel > .table:first-child > thead:first-child > tr:first-child th:first-child, +.panel > .table-responsive:first-child > .table:first-child > thead:first-child > tr:first-child th:first-child, +.panel > .table:first-child > tbody:first-child > tr:first-child th:first-child, +.panel > .table-responsive:first-child > .table:first-child > tbody:first-child > tr:first-child th:first-child { + border-top-left-radius: 3px; +} +.panel > .table:first-child > thead:first-child > tr:first-child td:last-child, +.panel > .table-responsive:first-child > .table:first-child > thead:first-child > tr:first-child td:last-child, +.panel > .table:first-child > tbody:first-child > tr:first-child td:last-child, +.panel > .table-responsive:first-child > .table:first-child > tbody:first-child > tr:first-child td:last-child, +.panel > .table:first-child > thead:first-child > tr:first-child th:last-child, +.panel > .table-responsive:first-child > .table:first-child > thead:first-child > tr:first-child th:last-child, +.panel > .table:first-child > tbody:first-child > tr:first-child th:last-child, +.panel > .table-responsive:first-child > .table:first-child > tbody:first-child > tr:first-child th:last-child { + border-top-right-radius: 3px; +} +.panel > .table:last-child, +.panel > .table-responsive:last-child > .table:last-child { + border-bottom-right-radius: 3px; + border-bottom-left-radius: 3px; +} +.panel > .table:last-child > tbody:last-child > tr:last-child, +.panel > .table-responsive:last-child > .table:last-child > tbody:last-child > tr:last-child, +.panel > .table:last-child > tfoot:last-child > tr:last-child, +.panel > .table-responsive:last-child > .table:last-child > tfoot:last-child > tr:last-child { + border-bottom-right-radius: 3px; + border-bottom-left-radius: 3px; +} +.panel > .table:last-child > tbody:last-child > tr:last-child td:first-child, +.panel > .table-responsive:last-child > .table:last-child > tbody:last-child > tr:last-child td:first-child, +.panel > .table:last-child > tfoot:last-child > tr:last-child td:first-child, +.panel > .table-responsive:last-child > .table:last-child > tfoot:last-child > tr:last-child td:first-child, +.panel > .table:last-child > tbody:last-child > tr:last-child th:first-child, +.panel > .table-responsive:last-child > .table:last-child > tbody:last-child > tr:last-child th:first-child, +.panel > .table:last-child > tfoot:last-child > tr:last-child th:first-child, +.panel > .table-responsive:last-child > .table:last-child > tfoot:last-child > tr:last-child th:first-child { + border-bottom-left-radius: 3px; +} +.panel > .table:last-child > tbody:last-child > tr:last-child td:last-child, +.panel > .table-responsive:last-child > .table:last-child > tbody:last-child > tr:last-child td:last-child, +.panel > .table:last-child > tfoot:last-child > tr:last-child td:last-child, +.panel > .table-responsive:last-child > .table:last-child > tfoot:last-child > tr:last-child td:last-child, +.panel > .table:last-child > tbody:last-child > tr:last-child th:last-child, +.panel > .table-responsive:last-child > .table:last-child > tbody:last-child > tr:last-child th:last-child, +.panel > .table:last-child > tfoot:last-child > tr:last-child th:last-child, +.panel > .table-responsive:last-child > .table:last-child > tfoot:last-child > tr:last-child th:last-child { + border-bottom-right-radius: 3px; +} +.panel > .panel-body + .table, +.panel > .panel-body + .table-responsive, +.panel > .table + .panel-body, +.panel > .table-responsive + .panel-body { + border-top: 1px solid #ddd; +} +.panel > .table > tbody:first-child > tr:first-child th, +.panel > .table > tbody:first-child > tr:first-child td { + border-top: 0; +} +.panel > .table-bordered, +.panel > .table-responsive > .table-bordered { + border: 0; +} +.panel > .table-bordered > thead > tr > th:first-child, +.panel > .table-responsive > .table-bordered > thead > tr > th:first-child, +.panel > .table-bordered > tbody > tr > th:first-child, +.panel > .table-responsive > .table-bordered > tbody > tr > th:first-child, +.panel > .table-bordered > tfoot > tr > th:first-child, +.panel > .table-responsive > .table-bordered > tfoot > tr > th:first-child, +.panel > .table-bordered > thead > tr > td:first-child, +.panel > .table-responsive > .table-bordered > thead > tr > td:first-child, +.panel > .table-bordered > tbody > tr > td:first-child, +.panel > .table-responsive > .table-bordered > tbody > tr > td:first-child, +.panel > .table-bordered > tfoot > tr > td:first-child, +.panel > .table-responsive > .table-bordered > tfoot > tr > td:first-child { + border-left: 0; +} +.panel > .table-bordered > thead > tr > th:last-child, +.panel > .table-responsive > .table-bordered > thead > tr > th:last-child, +.panel > .table-bordered > tbody > tr > th:last-child, +.panel > .table-responsive > .table-bordered > tbody > tr > th:last-child, +.panel > .table-bordered > tfoot > tr > th:last-child, +.panel > .table-responsive > .table-bordered > tfoot > tr > th:last-child, +.panel > .table-bordered > thead > tr > td:last-child, +.panel > .table-responsive > .table-bordered > thead > tr > td:last-child, +.panel > .table-bordered > tbody > tr > td:last-child, +.panel > .table-responsive > .table-bordered > tbody > tr > td:last-child, +.panel > .table-bordered > tfoot > tr > td:last-child, +.panel > .table-responsive > .table-bordered > tfoot > tr > td:last-child { + border-right: 0; +} +.panel > .table-bordered > thead > tr:first-child > td, +.panel > .table-responsive > .table-bordered > thead > tr:first-child > td, +.panel > .table-bordered > tbody > tr:first-child > td, +.panel > .table-responsive > .table-bordered > tbody > tr:first-child > td, +.panel > .table-bordered > thead > tr:first-child > th, +.panel > .table-responsive > .table-bordered > thead > tr:first-child > th, +.panel > .table-bordered > tbody > tr:first-child > th, +.panel > .table-responsive > .table-bordered > tbody > tr:first-child > th { + border-bottom: 0; +} +.panel > .table-bordered > tbody > tr:last-child > td, +.panel > .table-responsive > .table-bordered > tbody > tr:last-child > td, +.panel > .table-bordered > tfoot > tr:last-child > td, +.panel > .table-responsive > .table-bordered > tfoot > tr:last-child > td, +.panel > .table-bordered > tbody > tr:last-child > th, +.panel > .table-responsive > .table-bordered > tbody > tr:last-child > th, +.panel > .table-bordered > tfoot > tr:last-child > th, +.panel > .table-responsive > .table-bordered > tfoot > tr:last-child > th { + border-bottom: 0; +} +.panel > .table-responsive { + margin-bottom: 0; + border: 0; +} +.panel-group { + margin-bottom: 20px; +} +.panel-group .panel { + margin-bottom: 0; + border-radius: 4px; +} +.panel-group .panel + .panel { + margin-top: 5px; +} +.panel-group .panel-heading { + border-bottom: 0; +} +.panel-group .panel-heading + .panel-collapse > .panel-body, +.panel-group .panel-heading + .panel-collapse > .list-group { + border-top: 1px solid #ddd; +} +.panel-group .panel-footer { + border-top: 0; +} +.panel-group .panel-footer + .panel-collapse .panel-body { + border-bottom: 1px solid #ddd; +} +.panel-default { + border-color: #ddd; +} +.panel-default > .panel-heading { + color: #333; + background-color: #f5f5f5; + border-color: #ddd; +} +.panel-default > .panel-heading + .panel-collapse > .panel-body { + border-top-color: #ddd; +} +.panel-default > .panel-heading .badge { + color: #f5f5f5; + background-color: #333; +} +.panel-default > .panel-footer + .panel-collapse > .panel-body { + border-bottom-color: #ddd; +} +.panel-primary { + border-color: #337ab7; +} +.panel-primary > .panel-heading { + color: #fff; + background-color: #337ab7; + border-color: #337ab7; +} +.panel-primary > .panel-heading + .panel-collapse > .panel-body { + border-top-color: #337ab7; +} +.panel-primary > .panel-heading .badge { + color: #337ab7; + background-color: #fff; +} +.panel-primary > .panel-footer + .panel-collapse > .panel-body { + border-bottom-color: #337ab7; +} +.panel-success { + border-color: #d6e9c6; +} +.panel-success > .panel-heading { + color: #3c763d; + background-color: #dff0d8; + border-color: #d6e9c6; +} +.panel-success > .panel-heading + .panel-collapse > .panel-body { + border-top-color: #d6e9c6; +} +.panel-success > .panel-heading .badge { + color: #dff0d8; + background-color: #3c763d; +} +.panel-success > .panel-footer + .panel-collapse > .panel-body { + border-bottom-color: #d6e9c6; +} +.panel-info { + border-color: #bce8f1; +} +.panel-info > .panel-heading { + color: #31708f; + background-color: #d9edf7; + border-color: #bce8f1; +} +.panel-info > .panel-heading + .panel-collapse > .panel-body { + border-top-color: #bce8f1; +} +.panel-info > .panel-heading .badge { + color: #d9edf7; + background-color: #31708f; +} +.panel-info > .panel-footer + .panel-collapse > .panel-body { + border-bottom-color: #bce8f1; +} +.panel-warning { + border-color: #faebcc; +} +.panel-warning > .panel-heading { + color: #8a6d3b; + background-color: #fcf8e3; + border-color: #faebcc; +} +.panel-warning > .panel-heading + .panel-collapse > .panel-body { + border-top-color: #faebcc; +} +.panel-warning > .panel-heading .badge { + color: #fcf8e3; + background-color: #8a6d3b; +} +.panel-warning > .panel-footer + .panel-collapse > .panel-body { + border-bottom-color: #faebcc; +} +.panel-danger { + border-color: #ebccd1; +} +.panel-danger > .panel-heading { + color: #a94442; + background-color: #f2dede; + border-color: #ebccd1; +} +.panel-danger > .panel-heading + .panel-collapse > .panel-body { + border-top-color: #ebccd1; +} +.panel-danger > .panel-heading .badge { + color: #f2dede; + background-color: #a94442; +} +.panel-danger > .panel-footer + .panel-collapse > .panel-body { + border-bottom-color: #ebccd1; +} +.embed-responsive { + position: relative; + display: block; + height: 0; + padding: 0; + overflow: hidden; +} +.embed-responsive .embed-responsive-item, +.embed-responsive iframe, +.embed-responsive embed, +.embed-responsive object, +.embed-responsive video { + position: absolute; + top: 0; + bottom: 0; + left: 0; + width: 100%; + height: 100%; + border: 0; +} +.embed-responsive-16by9 { + padding-bottom: 56.25%; +} +.embed-responsive-4by3 { + padding-bottom: 75%; +} +.well { + min-height: 20px; + padding: 19px; + margin-bottom: 20px; + background-color: #f5f5f5; + border: 1px solid #e3e3e3; + border-radius: 4px; + -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .05); + box-shadow: inset 0 1px 1px rgba(0, 0, 0, .05); +} +.well blockquote { + border-color: #ddd; + border-color: rgba(0, 0, 0, .15); +} +.well-lg { + padding: 24px; + border-radius: 6px; +} +.well-sm { + padding: 9px; + border-radius: 3px; +} +.close { + float: right; + font-size: 21px; + font-weight: bold; + line-height: 1; + color: #000; + text-shadow: 0 1px 0 #fff; + filter: alpha(opacity=20); + opacity: .2; +} +.close:hover, +.close:focus { + color: #000; + text-decoration: none; + cursor: pointer; + filter: alpha(opacity=50); + opacity: .5; +} +button.close { + -webkit-appearance: none; + padding: 0; + cursor: pointer; + background: transparent; + border: 0; +} +.modal-open { + overflow: hidden; +} +.modal { + position: fixed; + top: 0; + right: 0; + bottom: 0; + left: 0; + z-index: 1050; + display: none; + overflow: hidden; + -webkit-overflow-scrolling: touch; + outline: 0; +} +.modal.fade .modal-dialog { + -webkit-transition: -webkit-transform .3s ease-out; + -o-transition: -o-transform .3s ease-out; + transition: transform .3s ease-out; + -webkit-transform: translate(0, -25%); + -ms-transform: translate(0, -25%); + -o-transform: translate(0, -25%); + transform: translate(0, -25%); +} +.modal.in .modal-dialog { + -webkit-transform: translate(0, 0); + -ms-transform: translate(0, 0); + -o-transform: translate(0, 0); + transform: translate(0, 0); +} +.modal-open .modal { + overflow-x: hidden; + overflow-y: auto; +} +.modal-dialog { + position: relative; + width: auto; + margin: 10px; +} +.modal-content { + position: relative; + background-color: #fff; + -webkit-background-clip: padding-box; + background-clip: padding-box; + border: 1px solid #999; + border: 1px solid rgba(0, 0, 0, .2); + border-radius: 6px; + outline: 0; + -webkit-box-shadow: 0 3px 9px rgba(0, 0, 0, .5); + box-shadow: 0 3px 9px rgba(0, 0, 0, .5); +} +.modal-backdrop { + position: fixed; + top: 0; + right: 0; + bottom: 0; + left: 0; + z-index: 1040; + background-color: #000; +} +.modal-backdrop.fade { + filter: alpha(opacity=0); + opacity: 0; +} +.modal-backdrop.in { + filter: alpha(opacity=50); + opacity: .5; +} +.modal-header { + padding: 15px; + border-bottom: 1px solid #e5e5e5; +} +.modal-header .close { + margin-top: -2px; +} +.modal-title { + margin: 0; + line-height: 1.42857143; +} +.modal-body { + position: relative; + padding: 15px; +} +.modal-footer { + padding: 15px; + text-align: right; + border-top: 1px solid #e5e5e5; +} +.modal-footer .btn + .btn { + margin-bottom: 0; + margin-left: 5px; +} +.modal-footer .btn-group .btn + .btn { + margin-left: -1px; +} +.modal-footer .btn-block + .btn-block { + margin-left: 0; +} +.modal-scrollbar-measure { + position: absolute; + top: -9999px; + width: 50px; + height: 50px; + overflow: scroll; +} +@media (min-width: 768px) { + .modal-dialog { + width: 600px; + margin: 30px auto; + } + .modal-content { + -webkit-box-shadow: 0 5px 15px rgba(0, 0, 0, .5); + box-shadow: 0 5px 15px rgba(0, 0, 0, .5); + } + .modal-sm { + width: 300px; + } +} +@media (min-width: 992px) { + .modal-lg { + width: 900px; + } +} +.tooltip { + position: absolute; + z-index: 1070; + display: block; + font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; + font-size: 12px; + font-style: normal; + font-weight: normal; + line-height: 1.42857143; + text-align: left; + text-align: start; + text-decoration: none; + text-shadow: none; + text-transform: none; + letter-spacing: normal; + word-break: normal; + word-spacing: normal; + word-wrap: normal; + white-space: normal; + filter: alpha(opacity=0); + opacity: 0; + + line-break: auto; +} +.tooltip.in { + filter: alpha(opacity=90); + opacity: .9; +} +.tooltip.top { + padding: 5px 0; + margin-top: -3px; +} +.tooltip.right { + padding: 0 5px; + margin-left: 3px; +} +.tooltip.bottom { + padding: 5px 0; + margin-top: 3px; +} +.tooltip.left { + padding: 0 5px; + margin-left: -3px; +} +.tooltip-inner { + max-width: 200px; + padding: 3px 8px; + color: #fff; + text-align: center; + background-color: #000; + border-radius: 4px; +} +.tooltip-arrow { + position: absolute; + width: 0; + height: 0; + border-color: transparent; + border-style: solid; +} +.tooltip.top .tooltip-arrow { + bottom: 0; + left: 50%; + margin-left: -5px; + border-width: 5px 5px 0; + border-top-color: #000; +} +.tooltip.top-left .tooltip-arrow { + right: 5px; + bottom: 0; + margin-bottom: -5px; + border-width: 5px 5px 0; + border-top-color: #000; +} +.tooltip.top-right .tooltip-arrow { + bottom: 0; + left: 5px; + margin-bottom: -5px; + border-width: 5px 5px 0; + border-top-color: #000; +} +.tooltip.right .tooltip-arrow { + top: 50%; + left: 0; + margin-top: -5px; + border-width: 5px 5px 5px 0; + border-right-color: #000; +} +.tooltip.left .tooltip-arrow { + top: 50%; + right: 0; + margin-top: -5px; + border-width: 5px 0 5px 5px; + border-left-color: #000; +} +.tooltip.bottom .tooltip-arrow { + top: 0; + left: 50%; + margin-left: -5px; + border-width: 0 5px 5px; + border-bottom-color: #000; +} +.tooltip.bottom-left .tooltip-arrow { + top: 0; + right: 5px; + margin-top: -5px; + border-width: 0 5px 5px; + border-bottom-color: #000; +} +.tooltip.bottom-right .tooltip-arrow { + top: 0; + left: 5px; + margin-top: -5px; + border-width: 0 5px 5px; + border-bottom-color: #000; +} +.popover { + position: absolute; + top: 0; + left: 0; + z-index: 1060; + display: none; + max-width: 276px; + padding: 1px; + font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; + font-size: 14px; + font-style: normal; + font-weight: normal; + line-height: 1.42857143; + text-align: left; + text-align: start; + text-decoration: none; + text-shadow: none; + text-transform: none; + letter-spacing: normal; + word-break: normal; + word-spacing: normal; + word-wrap: normal; + white-space: normal; + background-color: #fff; + -webkit-background-clip: padding-box; + background-clip: padding-box; + border: 1px solid #ccc; + border: 1px solid rgba(0, 0, 0, .2); + border-radius: 6px; + -webkit-box-shadow: 0 5px 10px rgba(0, 0, 0, .2); + box-shadow: 0 5px 10px rgba(0, 0, 0, .2); + + line-break: auto; +} +.popover.top { + margin-top: -10px; +} +.popover.right { + margin-left: 10px; +} +.popover.bottom { + margin-top: 10px; +} +.popover.left { + margin-left: -10px; +} +.popover-title { + padding: 8px 14px; + margin: 0; + font-size: 14px; + background-color: #f7f7f7; + border-bottom: 1px solid #ebebeb; + border-radius: 5px 5px 0 0; +} +.popover-content { + padding: 9px 14px; +} +.popover > .arrow, +.popover > .arrow:after { + position: absolute; + display: block; + width: 0; + height: 0; + border-color: transparent; + border-style: solid; +} +.popover > .arrow { + border-width: 11px; +} +.popover > .arrow:after { + content: ""; + border-width: 10px; +} +.popover.top > .arrow { + bottom: -11px; + left: 50%; + margin-left: -11px; + border-top-color: #999; + border-top-color: rgba(0, 0, 0, .25); + border-bottom-width: 0; +} +.popover.top > .arrow:after { + bottom: 1px; + margin-left: -10px; + content: " "; + border-top-color: #fff; + border-bottom-width: 0; +} +.popover.right > .arrow { + top: 50%; + left: -11px; + margin-top: -11px; + border-right-color: #999; + border-right-color: rgba(0, 0, 0, .25); + border-left-width: 0; +} +.popover.right > .arrow:after { + bottom: -10px; + left: 1px; + content: " "; + border-right-color: #fff; + border-left-width: 0; +} +.popover.bottom > .arrow { + top: -11px; + left: 50%; + margin-left: -11px; + border-top-width: 0; + border-bottom-color: #999; + border-bottom-color: rgba(0, 0, 0, .25); +} +.popover.bottom > .arrow:after { + top: 1px; + margin-left: -10px; + content: " "; + border-top-width: 0; + border-bottom-color: #fff; +} +.popover.left > .arrow { + top: 50%; + right: -11px; + margin-top: -11px; + border-right-width: 0; + border-left-color: #999; + border-left-color: rgba(0, 0, 0, .25); +} +.popover.left > .arrow:after { + right: 1px; + bottom: -10px; + content: " "; + border-right-width: 0; + border-left-color: #fff; +} +.carousel { + position: relative; +} +.carousel-inner { + position: relative; + width: 100%; + overflow: hidden; +} +.carousel-inner > .item { + position: relative; + display: none; + -webkit-transition: .6s ease-in-out left; + -o-transition: .6s ease-in-out left; + transition: .6s ease-in-out left; +} +.carousel-inner > .item > img, +.carousel-inner > .item > a > img { + line-height: 1; +} +@media all and (transform-3d), (-webkit-transform-3d) { + .carousel-inner > .item { + -webkit-transition: -webkit-transform .6s ease-in-out; + -o-transition: -o-transform .6s ease-in-out; + transition: transform .6s ease-in-out; + + -webkit-backface-visibility: hidden; + backface-visibility: hidden; + -webkit-perspective: 1000px; + perspective: 1000px; + } + .carousel-inner > .item.next, + .carousel-inner > .item.active.right { + left: 0; + -webkit-transform: translate3d(100%, 0, 0); + transform: translate3d(100%, 0, 0); + } + .carousel-inner > .item.prev, + .carousel-inner > .item.active.left { + left: 0; + -webkit-transform: translate3d(-100%, 0, 0); + transform: translate3d(-100%, 0, 0); + } + .carousel-inner > .item.next.left, + .carousel-inner > .item.prev.right, + .carousel-inner > .item.active { + left: 0; + -webkit-transform: translate3d(0, 0, 0); + transform: translate3d(0, 0, 0); + } +} +.carousel-inner > .active, +.carousel-inner > .next, +.carousel-inner > .prev { + display: block; +} +.carousel-inner > .active { + left: 0; +} +.carousel-inner > .next, +.carousel-inner > .prev { + position: absolute; + top: 0; + width: 100%; +} +.carousel-inner > .next { + left: 100%; +} +.carousel-inner > .prev { + left: -100%; +} +.carousel-inner > .next.left, +.carousel-inner > .prev.right { + left: 0; +} +.carousel-inner > .active.left { + left: -100%; +} +.carousel-inner > .active.right { + left: 100%; +} +.carousel-control { + position: absolute; + top: 0; + bottom: 0; + left: 0; + width: 15%; + font-size: 20px; + color: #fff; + text-align: center; + text-shadow: 0 1px 2px rgba(0, 0, 0, .6); + background-color: rgba(0, 0, 0, 0); + filter: alpha(opacity=50); + opacity: .5; +} +.carousel-control.left { + background-image: -webkit-linear-gradient(left, rgba(0, 0, 0, .5) 0%, rgba(0, 0, 0, .0001) 100%); + background-image: -o-linear-gradient(left, rgba(0, 0, 0, .5) 0%, rgba(0, 0, 0, .0001) 100%); + background-image: -webkit-gradient(linear, left top, right top, from(rgba(0, 0, 0, .5)), to(rgba(0, 0, 0, .0001))); + background-image: linear-gradient(to right, rgba(0, 0, 0, .5) 0%, rgba(0, 0, 0, .0001) 100%); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#80000000', endColorstr='#00000000', GradientType=1); + background-repeat: repeat-x; +} +.carousel-control.right { + right: 0; + left: auto; + background-image: -webkit-linear-gradient(left, rgba(0, 0, 0, .0001) 0%, rgba(0, 0, 0, .5) 100%); + background-image: -o-linear-gradient(left, rgba(0, 0, 0, .0001) 0%, rgba(0, 0, 0, .5) 100%); + background-image: -webkit-gradient(linear, left top, right top, from(rgba(0, 0, 0, .0001)), to(rgba(0, 0, 0, .5))); + background-image: linear-gradient(to right, rgba(0, 0, 0, .0001) 0%, rgba(0, 0, 0, .5) 100%); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#00000000', endColorstr='#80000000', GradientType=1); + background-repeat: repeat-x; +} +.carousel-control:hover, +.carousel-control:focus { + color: #fff; + text-decoration: none; + filter: alpha(opacity=90); + outline: 0; + opacity: .9; +} +.carousel-control .icon-prev, +.carousel-control .icon-next, +.carousel-control .glyphicon-chevron-left, +.carousel-control .glyphicon-chevron-right { + position: absolute; + top: 50%; + z-index: 5; + display: inline-block; + margin-top: -10px; +} +.carousel-control .icon-prev, +.carousel-control .glyphicon-chevron-left { + left: 50%; + margin-left: -10px; +} +.carousel-control .icon-next, +.carousel-control .glyphicon-chevron-right { + right: 50%; + margin-right: -10px; +} +.carousel-control .icon-prev, +.carousel-control .icon-next { + width: 20px; + height: 20px; + font-family: serif; + line-height: 1; +} +.carousel-control .icon-prev:before { + content: '\2039'; +} +.carousel-control .icon-next:before { + content: '\203a'; +} +.carousel-indicators { + position: absolute; + bottom: 10px; + left: 50%; + z-index: 15; + width: 60%; + padding-left: 0; + margin-left: -30%; + text-align: center; + list-style: none; +} +.carousel-indicators li { + display: inline-block; + width: 10px; + height: 10px; + margin: 1px; + text-indent: -999px; + cursor: pointer; + background-color: #000 \9; + background-color: rgba(0, 0, 0, 0); + border: 1px solid #fff; + border-radius: 10px; +} +.carousel-indicators .active { + width: 12px; + height: 12px; + margin: 0; + background-color: #fff; +} +.carousel-caption { + position: absolute; + right: 15%; + bottom: 20px; + left: 15%; + z-index: 10; + padding-top: 20px; + padding-bottom: 20px; + color: #fff; + text-align: center; + text-shadow: 0 1px 2px rgba(0, 0, 0, .6); +} +.carousel-caption .btn { + text-shadow: none; +} +@media screen and (min-width: 768px) { + .carousel-control .glyphicon-chevron-left, + .carousel-control .glyphicon-chevron-right, + .carousel-control .icon-prev, + .carousel-control .icon-next { + width: 30px; + height: 30px; + margin-top: -10px; + font-size: 30px; + } + .carousel-control .glyphicon-chevron-left, + .carousel-control .icon-prev { + margin-left: -10px; + } + .carousel-control .glyphicon-chevron-right, + .carousel-control .icon-next { + margin-right: -10px; + } + .carousel-caption { + right: 20%; + left: 20%; + padding-bottom: 30px; + } + .carousel-indicators { + bottom: 20px; + } +} +.clearfix:before, +.clearfix:after, +.dl-horizontal dd:before, +.dl-horizontal dd:after, +.container:before, +.container:after, +.container-fluid:before, +.container-fluid:after, +.row:before, +.row:after, +.form-horizontal .form-group:before, +.form-horizontal .form-group:after, +.btn-toolbar:before, +.btn-toolbar:after, +.btn-group-vertical > .btn-group:before, +.btn-group-vertical > .btn-group:after, +.nav:before, +.nav:after, +.navbar:before, +.navbar:after, +.navbar-header:before, +.navbar-header:after, +.navbar-collapse:before, +.navbar-collapse:after, +.pager:before, +.pager:after, +.panel-body:before, +.panel-body:after, +.modal-header:before, +.modal-header:after, +.modal-footer:before, +.modal-footer:after { + display: table; + content: " "; +} +.clearfix:after, +.dl-horizontal dd:after, +.container:after, +.container-fluid:after, +.row:after, +.form-horizontal .form-group:after, +.btn-toolbar:after, +.btn-group-vertical > .btn-group:after, +.nav:after, +.navbar:after, +.navbar-header:after, +.navbar-collapse:after, +.pager:after, +.panel-body:after, +.modal-header:after, +.modal-footer:after { + clear: both; +} +.center-block { + display: block; + margin-right: auto; + margin-left: auto; +} +.pull-right { + float: right !important; +} +.pull-left { + float: left !important; +} +.hide { + display: none !important; +} +.show { + display: block !important; +} +.invisible { + visibility: hidden; +} +.text-hide { + font: 0/0 a; + color: transparent; + text-shadow: none; + background-color: transparent; + border: 0; +} +.hidden { + display: none !important; +} +.affix { + position: fixed; +} +@-ms-viewport { + width: device-width; +} +.visible-xs, +.visible-sm, +.visible-md, +.visible-lg { + display: none !important; +} +.visible-xs-block, +.visible-xs-inline, +.visible-xs-inline-block, +.visible-sm-block, +.visible-sm-inline, +.visible-sm-inline-block, +.visible-md-block, +.visible-md-inline, +.visible-md-inline-block, +.visible-lg-block, +.visible-lg-inline, +.visible-lg-inline-block { + display: none !important; +} +@media (max-width: 767px) { + .visible-xs { + display: block !important; + } + table.visible-xs { + display: table !important; + } + tr.visible-xs { + display: table-row !important; + } + th.visible-xs, + td.visible-xs { + display: table-cell !important; + } +} +@media (max-width: 767px) { + .visible-xs-block { + display: block !important; + } +} +@media (max-width: 767px) { + .visible-xs-inline { + display: inline !important; + } +} +@media (max-width: 767px) { + .visible-xs-inline-block { + display: inline-block !important; + } +} +@media (min-width: 768px) and (max-width: 991px) { + .visible-sm { + display: block !important; + } + table.visible-sm { + display: table !important; + } + tr.visible-sm { + display: table-row !important; + } + th.visible-sm, + td.visible-sm { + display: table-cell !important; + } +} +@media (min-width: 768px) and (max-width: 991px) { + .visible-sm-block { + display: block !important; + } +} +@media (min-width: 768px) and (max-width: 991px) { + .visible-sm-inline { + display: inline !important; + } +} +@media (min-width: 768px) and (max-width: 991px) { + .visible-sm-inline-block { + display: inline-block !important; + } +} +@media (min-width: 992px) and (max-width: 1199px) { + .visible-md { + display: block !important; + } + table.visible-md { + display: table !important; + } + tr.visible-md { + display: table-row !important; + } + th.visible-md, + td.visible-md { + display: table-cell !important; + } +} +@media (min-width: 992px) and (max-width: 1199px) { + .visible-md-block { + display: block !important; + } +} +@media (min-width: 992px) and (max-width: 1199px) { + .visible-md-inline { + display: inline !important; + } +} +@media (min-width: 992px) and (max-width: 1199px) { + .visible-md-inline-block { + display: inline-block !important; + } +} +@media (min-width: 1200px) { + .visible-lg { + display: block !important; + } + table.visible-lg { + display: table !important; + } + tr.visible-lg { + display: table-row !important; + } + th.visible-lg, + td.visible-lg { + display: table-cell !important; + } +} +@media (min-width: 1200px) { + .visible-lg-block { + display: block !important; + } +} +@media (min-width: 1200px) { + .visible-lg-inline { + display: inline !important; + } +} +@media (min-width: 1200px) { + .visible-lg-inline-block { + display: inline-block !important; + } +} +@media (max-width: 767px) { + .hidden-xs { + display: none !important; + } +} +@media (min-width: 768px) and (max-width: 991px) { + .hidden-sm { + display: none !important; + } +} +@media (min-width: 992px) and (max-width: 1199px) { + .hidden-md { + display: none !important; + } +} +@media (min-width: 1200px) { + .hidden-lg { + display: none !important; + } +} +.visible-print { + display: none !important; +} +@media print { + .visible-print { + display: block !important; + } + table.visible-print { + display: table !important; + } + tr.visible-print { + display: table-row !important; + } + th.visible-print, + td.visible-print { + display: table-cell !important; + } +} +.visible-print-block { + display: none !important; +} +@media print { + .visible-print-block { + display: block !important; + } +} +.visible-print-inline { + display: none !important; +} +@media print { + .visible-print-inline { + display: inline !important; + } +} +.visible-print-inline-block { + display: none !important; +} +@media print { + .visible-print-inline-block { + display: inline-block !important; + } +} +@media print { + .hidden-print { + display: none !important; + } +} +/*# sourceMappingURL=bootstrap.css.map */ diff --git a/blockly/_pv_1_4_0/webif/static/css/bootstrap.css.map b/blockly/_pv_1_4_0/webif/static/css/bootstrap.css.map new file mode 100755 index 000000000..f010c82d1 --- /dev/null +++ b/blockly/_pv_1_4_0/webif/static/css/bootstrap.css.map @@ -0,0 +1 @@ +{"version":3,"sources":["bootstrap.css","less/normalize.less","less/print.less","less/glyphicons.less","less/scaffolding.less","less/mixins/vendor-prefixes.less","less/mixins/tab-focus.less","less/mixins/image.less","less/type.less","less/mixins/text-emphasis.less","less/mixins/background-variant.less","less/mixins/text-overflow.less","less/code.less","less/grid.less","less/mixins/grid.less","less/mixins/grid-framework.less","less/tables.less","less/mixins/table-row.less","less/forms.less","less/mixins/forms.less","less/buttons.less","less/mixins/buttons.less","less/mixins/opacity.less","less/component-animations.less","less/dropdowns.less","less/mixins/nav-divider.less","less/mixins/reset-filter.less","less/button-groups.less","less/mixins/border-radius.less","less/input-groups.less","less/navs.less","less/navbar.less","less/mixins/nav-vertical-align.less","less/utilities.less","less/breadcrumbs.less","less/pagination.less","less/mixins/pagination.less","less/pager.less","less/labels.less","less/mixins/labels.less","less/badges.less","less/jumbotron.less","less/thumbnails.less","less/alerts.less","less/mixins/alerts.less","less/progress-bars.less","less/mixins/gradients.less","less/mixins/progress-bar.less","less/media.less","less/list-group.less","less/mixins/list-group.less","less/panels.less","less/mixins/panels.less","less/responsive-embed.less","less/wells.less","less/close.less","less/modals.less","less/tooltip.less","less/mixins/reset-text.less","less/popovers.less","less/carousel.less","less/mixins/clearfix.less","less/mixins/center-block.less","less/mixins/hide-text.less","less/responsive-utilities.less","less/mixins/responsive-visibility.less"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,4EAA4E;ACG5E;EACE,wBAAA;EACA,2BAAA;EACA,+BAAA;CDDD;ACQD;EACE,UAAA;CDND;ACmBD;;;;;;;;;;;;;EAaE,eAAA;CDjBD;ACyBD;;;;EAIE,sBAAA;EACA,yBAAA;CDvBD;AC+BD;EACE,cAAA;EACA,UAAA;CD7BD;ACqCD;;EAEE,cAAA;CDnCD;AC6CD;EACE,8BAAA;CD3CD;ACmDD;;EAEE,WAAA;CDjDD;AC2DD;EACE,0BAAA;CDzDD;ACgED;;EAEE,kBAAA;CD9DD;ACqED;EACE,mBAAA;CDnED;AC2ED;EACE,eAAA;EACA,iBAAA;CDzED;ACgFD;EACE,iBAAA;EACA,YAAA;CD9ED;ACqFD;EACE,eAAA;CDnFD;AC0FD;;EAEE,eAAA;EACA,eAAA;EACA,mBAAA;EACA,yBAAA;CDxFD;AC2FD;EACE,YAAA;CDzFD;AC4FD;EACE,gBAAA;CD1FD;ACoGD;EACE,UAAA;CDlGD;ACyGD;EACE,iBAAA;CDvGD;ACiHD;EACE,iBAAA;CD/GD;ACsHD;EACE,gCAAA;KAAA,6BAAA;UAAA,wBAAA;EACA,UAAA;CDpHD;AC2HD;EACE,eAAA;CDzHD;ACgID;;;;EAIE,kCAAA;EACA,eAAA;CD9HD;ACgJD;;;;;EAKE,eAAA;EACA,cAAA;EACA,UAAA;CD9ID;ACqJD;EACE,kBAAA;CDnJD;AC6JD;;EAEE,qBAAA;CD3JD;ACsKD;;;;EAIE,2BAAA;EACA,gBAAA;CDpKD;AC2KD;;EAEE,gBAAA;CDzKD;ACgLD;;EAEE,UAAA;EACA,WAAA;CD9KD;ACsLD;EACE,oBAAA;CDpLD;AC+LD;;EAEE,+BAAA;KAAA,4BAAA;UAAA,uBAAA;EACA,WAAA;CD7LD;ACsMD;;EAEE,aAAA;CDpMD;AC4MD;EACE,8BAAA;EACA,gCAAA;KAAA,6BAAA;UAAA,wBAAA;CD1MD;ACmND;;EAEE,yBAAA;CDjND;ACwND;EACE,0BAAA;EACA,cAAA;EACA,+BAAA;CDtND;AC8ND;EACE,UAAA;EACA,WAAA;CD5ND;ACmOD;EACE,eAAA;CDjOD;ACyOD;EACE,kBAAA;CDvOD;ACiPD;EACE,0BAAA;EACA,kBAAA;CD/OD;ACkPD;;EAEE,WAAA;CDhPD;AACD,qFAAqF;AElFrF;EA7FI;;;IAGI,mCAAA;IACA,uBAAA;IACA,oCAAA;YAAA,4BAAA;IACA,6BAAA;GFkLL;EE/KC;;IAEI,2BAAA;GFiLL;EE9KC;IACI,6BAAA;GFgLL;EE7KC;IACI,8BAAA;GF+KL;EE1KC;;IAEI,YAAA;GF4KL;EEzKC;;IAEI,uBAAA;IACA,yBAAA;GF2KL;EExKC;IACI,4BAAA;GF0KL;EEvKC;;IAEI,yBAAA;GFyKL;EEtKC;IACI,2BAAA;GFwKL;EErKC;;;IAGI,WAAA;IACA,UAAA;GFuKL;EEpKC;;IAEI,wBAAA;GFsKL;EEhKC;IACI,cAAA;GFkKL;EEhKC;;IAGQ,kCAAA;GFiKT;EE9JC;IACI,uBAAA;GFgKL;EE7JC;IACI,qCAAA;GF+JL;EEhKC;;IAKQ,kCAAA;GF+JT;EE5JC;;IAGQ,kCAAA;GF6JT;CACF;AGnPD;EACE,oCAAA;EACA,sDAAA;EACA,gYAAA;CHqPD;AG7OD;EACE,mBAAA;EACA,SAAA;EACA,sBAAA;EACA,oCAAA;EACA,mBAAA;EACA,oBAAA;EACA,eAAA;EACA,oCAAA;EACA,mCAAA;CH+OD;AG3OmC;EAAW,iBAAA;CH8O9C;AG7OmC;EAAW,iBAAA;CHgP9C;AG9OmC;;EAAW,iBAAA;CHkP9C;AGjPmC;EAAW,iBAAA;CHoP9C;AGnPmC;EAAW,iBAAA;CHsP9C;AGrPmC;EAAW,iBAAA;CHwP9C;AGvPmC;EAAW,iBAAA;CH0P9C;AGzPmC;EAAW,iBAAA;CH4P9C;AG3PmC;EAAW,iBAAA;CH8P9C;AG7PmC;EAAW,iBAAA;CHgQ9C;AG/PmC;EAAW,iBAAA;CHkQ9C;AGjQmC;EAAW,iBAAA;CHoQ9C;AGnQmC;EAAW,iBAAA;CHsQ9C;AGrQmC;EAAW,iBAAA;CHwQ9C;AGvQmC;EAAW,iBAAA;CH0Q9C;AGzQmC;EAAW,iBAAA;CH4Q9C;AG3QmC;EAAW,iBAAA;CH8Q9C;AG7QmC;EAAW,iBAAA;CHgR9C;AG/QmC;EAAW,iBAAA;CHkR9C;AGjRmC;EAAW,iBAAA;CHoR9C;AGnRmC;EAAW,iBAAA;CHsR9C;AGrRmC;EAAW,iBAAA;CHwR9C;AGvRmC;EAAW,iBAAA;CH0R9C;AGzRmC;EAAW,iBAAA;CH4R9C;AG3RmC;EAAW,iBAAA;CH8R9C;AG7RmC;EAAW,iBAAA;CHgS9C;AG/RmC;EAAW,iBAAA;CHkS9C;AGjSmC;EAAW,iBAAA;CHoS9C;AGnSmC;EAAW,iBAAA;CHsS9C;AGrSmC;EAAW,iBAAA;CHwS9C;AGvSmC;EAAW,iBAAA;CH0S9C;AGzSmC;EAAW,iBAAA;CH4S9C;AG3SmC;EAAW,iBAAA;CH8S9C;AG7SmC;EAAW,iBAAA;CHgT9C;AG/SmC;EAAW,iBAAA;CHkT9C;AGjTmC;EAAW,iBAAA;CHoT9C;AGnTmC;EAAW,iBAAA;CHsT9C;AGrTmC;EAAW,iBAAA;CHwT9C;AGvTmC;EAAW,iBAAA;CH0T9C;AGzTmC;EAAW,iBAAA;CH4T9C;AG3TmC;EAAW,iBAAA;CH8T9C;AG7TmC;EAAW,iBAAA;CHgU9C;AG/TmC;EAAW,iBAAA;CHkU9C;AGjUmC;EAAW,iBAAA;CHoU9C;AGnUmC;EAAW,iBAAA;CHsU9C;AGrUmC;EAAW,iBAAA;CHwU9C;AGvUmC;EAAW,iBAAA;CH0U9C;AGzUmC;EAAW,iBAAA;CH4U9C;AG3UmC;EAAW,iBAAA;CH8U9C;AG7UmC;EAAW,iBAAA;CHgV9C;AG/UmC;EAAW,iBAAA;CHkV9C;AGjVmC;EAAW,iBAAA;CHoV9C;AGnVmC;EAAW,iBAAA;CHsV9C;AGrVmC;EAAW,iBAAA;CHwV9C;AGvVmC;EAAW,iBAAA;CH0V9C;AGzVmC;EAAW,iBAAA;CH4V9C;AG3VmC;EAAW,iBAAA;CH8V9C;AG7VmC;EAAW,iBAAA;CHgW9C;AG/VmC;EAAW,iBAAA;CHkW9C;AGjWmC;EAAW,iBAAA;CHoW9C;AGnWmC;EAAW,iBAAA;CHsW9C;AGrWmC;EAAW,iBAAA;CHwW9C;AGvWmC;EAAW,iBAAA;CH0W9C;AGzWmC;EAAW,iBAAA;CH4W9C;AG3WmC;EAAW,iBAAA;CH8W9C;AG7WmC;EAAW,iBAAA;CHgX9C;AG/WmC;EAAW,iBAAA;CHkX9C;AGjXmC;EAAW,iBAAA;CHoX9C;AGnXmC;EAAW,iBAAA;CHsX9C;AGrXmC;EAAW,iBAAA;CHwX9C;AGvXmC;EAAW,iBAAA;CH0X9C;AGzXmC;EAAW,iBAAA;CH4X9C;AG3XmC;EAAW,iBAAA;CH8X9C;AG7XmC;EAAW,iBAAA;CHgY9C;AG/XmC;EAAW,iBAAA;CHkY9C;AGjYmC;EAAW,iBAAA;CHoY9C;AGnYmC;EAAW,iBAAA;CHsY9C;AGrYmC;EAAW,iBAAA;CHwY9C;AGvYmC;EAAW,iBAAA;CH0Y9C;AGzYmC;EAAW,iBAAA;CH4Y9C;AG3YmC;EAAW,iBAAA;CH8Y9C;AG7YmC;EAAW,iBAAA;CHgZ9C;AG/YmC;EAAW,iBAAA;CHkZ9C;AGjZmC;EAAW,iBAAA;CHoZ9C;AGnZmC;EAAW,iBAAA;CHsZ9C;AGrZmC;EAAW,iBAAA;CHwZ9C;AGvZmC;EAAW,iBAAA;CH0Z9C;AGzZmC;EAAW,iBAAA;CH4Z9C;AG3ZmC;EAAW,iBAAA;CH8Z9C;AG7ZmC;EAAW,iBAAA;CHga9C;AG/ZmC;EAAW,iBAAA;CHka9C;AGjamC;EAAW,iBAAA;CHoa9C;AGnamC;EAAW,iBAAA;CHsa9C;AGramC;EAAW,iBAAA;CHwa9C;AGvamC;EAAW,iBAAA;CH0a9C;AGzamC;EAAW,iBAAA;CH4a9C;AG3amC;EAAW,iBAAA;CH8a9C;AG7amC;EAAW,iBAAA;CHgb9C;AG/amC;EAAW,iBAAA;CHkb9C;AGjbmC;EAAW,iBAAA;CHob9C;AGnbmC;EAAW,iBAAA;CHsb9C;AGrbmC;EAAW,iBAAA;CHwb9C;AGvbmC;EAAW,iBAAA;CH0b9C;AGzbmC;EAAW,iBAAA;CH4b9C;AG3bmC;EAAW,iBAAA;CH8b9C;AG7bmC;EAAW,iBAAA;CHgc9C;AG/bmC;EAAW,iBAAA;CHkc9C;AGjcmC;EAAW,iBAAA;CHoc9C;AGncmC;EAAW,iBAAA;CHsc9C;AGrcmC;EAAW,iBAAA;CHwc9C;AGvcmC;EAAW,iBAAA;CH0c9C;AGzcmC;EAAW,iBAAA;CH4c9C;AG3cmC;EAAW,iBAAA;CH8c9C;AG7cmC;EAAW,iBAAA;CHgd9C;AG/cmC;EAAW,iBAAA;CHkd9C;AGjdmC;EAAW,iBAAA;CHod9C;AGndmC;EAAW,iBAAA;CHsd9C;AGrdmC;EAAW,iBAAA;CHwd9C;AGvdmC;EAAW,iBAAA;CH0d9C;AGzdmC;EAAW,iBAAA;CH4d9C;AG3dmC;EAAW,iBAAA;CH8d9C;AG7dmC;EAAW,iBAAA;CHge9C;AG/dmC;EAAW,iBAAA;CHke9C;AGjemC;EAAW,iBAAA;CHoe9C;AGnemC;EAAW,iBAAA;CHse9C;AGremC;EAAW,iBAAA;CHwe9C;AGvemC;EAAW,iBAAA;CH0e9C;AGzemC;EAAW,iBAAA;CH4e9C;AG3emC;EAAW,iBAAA;CH8e9C;AG7emC;EAAW,iBAAA;CHgf9C;AG/emC;EAAW,iBAAA;CHkf9C;AGjfmC;EAAW,iBAAA;CHof9C;AGnfmC;EAAW,iBAAA;CHsf9C;AGrfmC;EAAW,iBAAA;CHwf9C;AGvfmC;EAAW,iBAAA;CH0f9C;AGzfmC;EAAW,iBAAA;CH4f9C;AG3fmC;EAAW,iBAAA;CH8f9C;AG7fmC;EAAW,iBAAA;CHggB9C;AG/fmC;EAAW,iBAAA;CHkgB9C;AGjgBmC;EAAW,iBAAA;CHogB9C;AGngBmC;EAAW,iBAAA;CHsgB9C;AGrgBmC;EAAW,iBAAA;CHwgB9C;AGvgBmC;EAAW,iBAAA;CH0gB9C;AGzgBmC;EAAW,iBAAA;CH4gB9C;AG3gBmC;EAAW,iBAAA;CH8gB9C;AG7gBmC;EAAW,iBAAA;CHghB9C;AG/gBmC;EAAW,iBAAA;CHkhB9C;AGjhBmC;EAAW,iBAAA;CHohB9C;AGnhBmC;EAAW,iBAAA;CHshB9C;AGrhBmC;EAAW,iBAAA;CHwhB9C;AGvhBmC;EAAW,iBAAA;CH0hB9C;AGzhBmC;EAAW,iBAAA;CH4hB9C;AG3hBmC;EAAW,iBAAA;CH8hB9C;AG7hBmC;EAAW,iBAAA;CHgiB9C;AG/hBmC;EAAW,iBAAA;CHkiB9C;AGjiBmC;EAAW,iBAAA;CHoiB9C;AGniBmC;EAAW,iBAAA;CHsiB9C;AGriBmC;EAAW,iBAAA;CHwiB9C;AGviBmC;EAAW,iBAAA;CH0iB9C;AGziBmC;EAAW,iBAAA;CH4iB9C;AG3iBmC;EAAW,iBAAA;CH8iB9C;AG7iBmC;EAAW,iBAAA;CHgjB9C;AG/iBmC;EAAW,iBAAA;CHkjB9C;AGjjBmC;EAAW,iBAAA;CHojB9C;AGnjBmC;EAAW,iBAAA;CHsjB9C;AGrjBmC;EAAW,iBAAA;CHwjB9C;AGvjBmC;EAAW,iBAAA;CH0jB9C;AGzjBmC;EAAW,iBAAA;CH4jB9C;AG3jBmC;EAAW,iBAAA;CH8jB9C;AG7jBmC;EAAW,iBAAA;CHgkB9C;AG/jBmC;EAAW,iBAAA;CHkkB9C;AGjkBmC;EAAW,iBAAA;CHokB9C;AGnkBmC;EAAW,iBAAA;CHskB9C;AGrkBmC;EAAW,iBAAA;CHwkB9C;AGvkBmC;EAAW,iBAAA;CH0kB9C;AGzkBmC;EAAW,iBAAA;CH4kB9C;AG3kBmC;EAAW,iBAAA;CH8kB9C;AG7kBmC;EAAW,iBAAA;CHglB9C;AG/kBmC;EAAW,iBAAA;CHklB9C;AGjlBmC;EAAW,iBAAA;CHolB9C;AGnlBmC;EAAW,iBAAA;CHslB9C;AGrlBmC;EAAW,iBAAA;CHwlB9C;AGvlBmC;EAAW,iBAAA;CH0lB9C;AGzlBmC;EAAW,iBAAA;CH4lB9C;AG3lBmC;EAAW,iBAAA;CH8lB9C;AG7lBmC;EAAW,iBAAA;CHgmB9C;AG/lBmC;EAAW,iBAAA;CHkmB9C;AGjmBmC;EAAW,iBAAA;CHomB9C;AGnmBmC;EAAW,iBAAA;CHsmB9C;AGrmBmC;EAAW,iBAAA;CHwmB9C;AGvmBmC;EAAW,iBAAA;CH0mB9C;AGzmBmC;EAAW,iBAAA;CH4mB9C;AG3mBmC;EAAW,iBAAA;CH8mB9C;AG7mBmC;EAAW,iBAAA;CHgnB9C;AG/mBmC;EAAW,iBAAA;CHknB9C;AGjnBmC;EAAW,iBAAA;CHonB9C;AGnnBmC;EAAW,iBAAA;CHsnB9C;AGrnBmC;EAAW,iBAAA;CHwnB9C;AGvnBmC;EAAW,iBAAA;CH0nB9C;AGznBmC;EAAW,iBAAA;CH4nB9C;AG3nBmC;EAAW,iBAAA;CH8nB9C;AG7nBmC;EAAW,iBAAA;CHgoB9C;AG/nBmC;EAAW,iBAAA;CHkoB9C;AGjoBmC;EAAW,iBAAA;CHooB9C;AGnoBmC;EAAW,iBAAA;CHsoB9C;AGroBmC;EAAW,iBAAA;CHwoB9C;AG/nBmC;EAAW,iBAAA;CHkoB9C;AGjoBmC;EAAW,iBAAA;CHooB9C;AGnoBmC;EAAW,iBAAA;CHsoB9C;AGroBmC;EAAW,iBAAA;CHwoB9C;AGvoBmC;EAAW,iBAAA;CH0oB9C;AGzoBmC;EAAW,iBAAA;CH4oB9C;AG3oBmC;EAAW,iBAAA;CH8oB9C;AG7oBmC;EAAW,iBAAA;CHgpB9C;AG/oBmC;EAAW,iBAAA;CHkpB9C;AGjpBmC;EAAW,iBAAA;CHopB9C;AGnpBmC;EAAW,iBAAA;CHspB9C;AGrpBmC;EAAW,iBAAA;CHwpB9C;AGvpBmC;EAAW,iBAAA;CH0pB9C;AGzpBmC;EAAW,iBAAA;CH4pB9C;AG3pBmC;EAAW,iBAAA;CH8pB9C;AG7pBmC;EAAW,iBAAA;CHgqB9C;AG/pBmC;EAAW,iBAAA;CHkqB9C;AGjqBmC;EAAW,iBAAA;CHoqB9C;AGnqBmC;EAAW,iBAAA;CHsqB9C;AGrqBmC;EAAW,iBAAA;CHwqB9C;AGvqBmC;EAAW,iBAAA;CH0qB9C;AGzqBmC;EAAW,iBAAA;CH4qB9C;AG3qBmC;EAAW,iBAAA;CH8qB9C;AG7qBmC;EAAW,iBAAA;CHgrB9C;AG/qBmC;EAAW,iBAAA;CHkrB9C;AGjrBmC;EAAW,iBAAA;CHorB9C;AGnrBmC;EAAW,iBAAA;CHsrB9C;AGrrBmC;EAAW,iBAAA;CHwrB9C;AGvrBmC;EAAW,iBAAA;CH0rB9C;AGzrBmC;EAAW,iBAAA;CH4rB9C;AG3rBmC;EAAW,iBAAA;CH8rB9C;AG7rBmC;EAAW,iBAAA;CHgsB9C;AG/rBmC;EAAW,iBAAA;CHksB9C;AGjsBmC;EAAW,iBAAA;CHosB9C;AGnsBmC;EAAW,iBAAA;CHssB9C;AGrsBmC;EAAW,iBAAA;CHwsB9C;AGvsBmC;EAAW,iBAAA;CH0sB9C;AGzsBmC;EAAW,iBAAA;CH4sB9C;AG3sBmC;EAAW,iBAAA;CH8sB9C;AG7sBmC;EAAW,iBAAA;CHgtB9C;AG/sBmC;EAAW,iBAAA;CHktB9C;AGjtBmC;EAAW,iBAAA;CHotB9C;AGntBmC;EAAW,iBAAA;CHstB9C;AGrtBmC;EAAW,iBAAA;CHwtB9C;AGvtBmC;EAAW,iBAAA;CH0tB9C;AGztBmC;EAAW,iBAAA;CH4tB9C;AG3tBmC;EAAW,iBAAA;CH8tB9C;AG7tBmC;EAAW,iBAAA;CHguB9C;AG/tBmC;EAAW,iBAAA;CHkuB9C;AGjuBmC;EAAW,iBAAA;CHouB9C;AGnuBmC;EAAW,iBAAA;CHsuB9C;AGruBmC;EAAW,iBAAA;CHwuB9C;AGvuBmC;EAAW,iBAAA;CH0uB9C;AGzuBmC;EAAW,iBAAA;CH4uB9C;AG3uBmC;EAAW,iBAAA;CH8uB9C;AG7uBmC;EAAW,iBAAA;CHgvB9C;AIthCD;ECgEE,+BAAA;EACG,4BAAA;EACK,uBAAA;CLy9BT;AIxhCD;;EC6DE,+BAAA;EACG,4BAAA;EACK,uBAAA;CL+9BT;AIthCD;EACE,gBAAA;EACA,8CAAA;CJwhCD;AIrhCD;EACE,4DAAA;EACA,gBAAA;EACA,wBAAA;EACA,eAAA;EACA,uBAAA;CJuhCD;AInhCD;;;;EAIE,qBAAA;EACA,mBAAA;EACA,qBAAA;CJqhCD;AI/gCD;EACE,eAAA;EACA,sBAAA;CJihCD;AI/gCC;;EAEE,eAAA;EACA,2BAAA;CJihCH;AI9gCC;EEnDA,2CAAA;EACA,qBAAA;CNokCD;AIvgCD;EACE,UAAA;CJygCD;AIngCD;EACE,uBAAA;CJqgCD;AIjgCD;;;;;EGvEE,eAAA;EACA,gBAAA;EACA,aAAA;CP+kCD;AIrgCD;EACE,mBAAA;CJugCD;AIjgCD;EACE,aAAA;EACA,wBAAA;EACA,uBAAA;EACA,uBAAA;EACA,mBAAA;EC6FA,yCAAA;EACK,oCAAA;EACG,iCAAA;EEvLR,sBAAA;EACA,gBAAA;EACA,aAAA;CP+lCD;AIjgCD;EACE,mBAAA;CJmgCD;AI7/BD;EACE,iBAAA;EACA,oBAAA;EACA,UAAA;EACA,8BAAA;CJ+/BD;AIv/BD;EACE,mBAAA;EACA,WAAA;EACA,YAAA;EACA,aAAA;EACA,WAAA;EACA,iBAAA;EACA,uBAAA;EACA,UAAA;CJy/BD;AIj/BC;;EAEE,iBAAA;EACA,YAAA;EACA,aAAA;EACA,UAAA;EACA,kBAAA;EACA,WAAA;CJm/BH;AIx+BD;EACE,gBAAA;CJ0+BD;AQjoCD;;;;;;;;;;;;EAEE,qBAAA;EACA,iBAAA;EACA,iBAAA;EACA,eAAA;CR6oCD;AQlpCD;;;;;;;;;;;;;;;;;;;;;;;;EASI,oBAAA;EACA,eAAA;EACA,eAAA;CRmqCH;AQ/pCD;;;;;;EAGE,iBAAA;EACA,oBAAA;CRoqCD;AQxqCD;;;;;;;;;;;;EAQI,eAAA;CR8qCH;AQ3qCD;;;;;;EAGE,iBAAA;EACA,oBAAA;CRgrCD;AQprCD;;;;;;;;;;;;EAQI,eAAA;CR0rCH;AQtrCD;;EAAU,gBAAA;CR0rCT;AQzrCD;;EAAU,gBAAA;CR6rCT;AQ5rCD;;EAAU,gBAAA;CRgsCT;AQ/rCD;;EAAU,gBAAA;CRmsCT;AQlsCD;;EAAU,gBAAA;CRssCT;AQrsCD;;EAAU,gBAAA;CRysCT;AQnsCD;EACE,iBAAA;CRqsCD;AQlsCD;EACE,oBAAA;EACA,gBAAA;EACA,iBAAA;EACA,iBAAA;CRosCD;AQ/rCD;EAwOA;IA1OI,gBAAA;GRqsCD;CACF;AQ7rCD;;EAEE,eAAA;CR+rCD;AQ5rCD;;EAEE,0BAAA;EACA,cAAA;CR8rCD;AQ1rCD;EAAuB,iBAAA;CR6rCtB;AQ5rCD;EAAuB,kBAAA;CR+rCtB;AQ9rCD;EAAuB,mBAAA;CRisCtB;AQhsCD;EAAuB,oBAAA;CRmsCtB;AQlsCD;EAAuB,oBAAA;CRqsCtB;AQlsCD;EAAuB,0BAAA;CRqsCtB;AQpsCD;EAAuB,0BAAA;CRusCtB;AQtsCD;EAAuB,2BAAA;CRysCtB;AQtsCD;EACE,eAAA;CRwsCD;AQtsCD;ECrGE,eAAA;CT8yCD;AS7yCC;;EAEE,eAAA;CT+yCH;AQ1sCD;ECxGE,eAAA;CTqzCD;ASpzCC;;EAEE,eAAA;CTszCH;AQ9sCD;EC3GE,eAAA;CT4zCD;AS3zCC;;EAEE,eAAA;CT6zCH;AQltCD;EC9GE,eAAA;CTm0CD;ASl0CC;;EAEE,eAAA;CTo0CH;AQttCD;ECjHE,eAAA;CT00CD;ASz0CC;;EAEE,eAAA;CT20CH;AQttCD;EAGE,YAAA;EE3HA,0BAAA;CVk1CD;AUj1CC;;EAEE,0BAAA;CVm1CH;AQxtCD;EE9HE,0BAAA;CVy1CD;AUx1CC;;EAEE,0BAAA;CV01CH;AQ5tCD;EEjIE,0BAAA;CVg2CD;AU/1CC;;EAEE,0BAAA;CVi2CH;AQhuCD;EEpIE,0BAAA;CVu2CD;AUt2CC;;EAEE,0BAAA;CVw2CH;AQpuCD;EEvIE,0BAAA;CV82CD;AU72CC;;EAEE,0BAAA;CV+2CH;AQnuCD;EACE,oBAAA;EACA,oBAAA;EACA,iCAAA;CRquCD;AQ7tCD;;EAEE,cAAA;EACA,oBAAA;CR+tCD;AQluCD;;;;EAMI,iBAAA;CRkuCH;AQ3tCD;EACE,gBAAA;EACA,iBAAA;CR6tCD;AQztCD;EALE,gBAAA;EACA,iBAAA;EAMA,kBAAA;CR4tCD;AQ9tCD;EAKI,sBAAA;EACA,kBAAA;EACA,mBAAA;CR4tCH;AQvtCD;EACE,cAAA;EACA,oBAAA;CRytCD;AQvtCD;;EAEE,wBAAA;CRytCD;AQvtCD;EACE,kBAAA;CRytCD;AQvtCD;EACE,eAAA;CRytCD;AQhsCD;EA6EA;IAvFM,YAAA;IACA,aAAA;IACA,YAAA;IACA,kBAAA;IGtNJ,iBAAA;IACA,wBAAA;IACA,oBAAA;GXq6CC;EQ7nCH;IAhFM,mBAAA;GRgtCH;CACF;AQvsCD;;EAGE,aAAA;EACA,kCAAA;CRwsCD;AQtsCD;EACE,eAAA;EA9IqB,0BAAA;CRu1CtB;AQpsCD;EACE,mBAAA;EACA,iBAAA;EACA,kBAAA;EACA,+BAAA;CRssCD;AQjsCG;;;EACE,iBAAA;CRqsCL;AQ/sCD;;;EAmBI,eAAA;EACA,eAAA;EACA,wBAAA;EACA,eAAA;CRisCH;AQ/rCG;;;EACE,uBAAA;CRmsCL;AQ3rCD;;EAEE,oBAAA;EACA,gBAAA;EACA,gCAAA;EACA,eAAA;EACA,kBAAA;CR6rCD;AQvrCG;;;;;;EAAW,YAAA;CR+rCd;AQ9rCG;;;;;;EACE,uBAAA;CRqsCL;AQ/rCD;EACE,oBAAA;EACA,mBAAA;EACA,wBAAA;CRisCD;AYv+CD;;;;EAIE,+DAAA;CZy+CD;AYr+CD;EACE,iBAAA;EACA,eAAA;EACA,eAAA;EACA,0BAAA;EACA,mBAAA;CZu+CD;AYn+CD;EACE,iBAAA;EACA,eAAA;EACA,YAAA;EACA,uBAAA;EACA,mBAAA;EACA,uDAAA;UAAA,+CAAA;CZq+CD;AY3+CD;EASI,WAAA;EACA,gBAAA;EACA,kBAAA;EACA,yBAAA;UAAA,iBAAA;CZq+CH;AYh+CD;EACE,eAAA;EACA,eAAA;EACA,iBAAA;EACA,gBAAA;EACA,wBAAA;EACA,sBAAA;EACA,sBAAA;EACA,eAAA;EACA,0BAAA;EACA,uBAAA;EACA,mBAAA;CZk+CD;AY7+CD;EAeI,WAAA;EACA,mBAAA;EACA,eAAA;EACA,sBAAA;EACA,8BAAA;EACA,iBAAA;CZi+CH;AY59CD;EACE,kBAAA;EACA,mBAAA;CZ89CD;AaxhDD;ECHE,mBAAA;EACA,kBAAA;EACA,mBAAA;EACA,oBAAA;Cd8hDD;AaxhDC;EAqEF;IAvEI,aAAA;Gb8hDD;CACF;Aa1hDC;EAkEF;IApEI,aAAA;GbgiDD;CACF;Aa5hDD;EA+DA;IAjEI,cAAA;GbkiDD;CACF;AazhDD;ECvBE,mBAAA;EACA,kBAAA;EACA,mBAAA;EACA,oBAAA;CdmjDD;AathDD;ECvBE,mBAAA;EACA,oBAAA;CdgjDD;AehjDG;EACE,mBAAA;EAEA,gBAAA;EAEA,mBAAA;EACA,oBAAA;CfgjDL;AehiDG;EACE,YAAA;CfkiDL;Ae3hDC;EACE,YAAA;Cf6hDH;Ae9hDC;EACE,oBAAA;CfgiDH;AejiDC;EACE,oBAAA;CfmiDH;AepiDC;EACE,WAAA;CfsiDH;AeviDC;EACE,oBAAA;CfyiDH;Ae1iDC;EACE,oBAAA;Cf4iDH;Ae7iDC;EACE,WAAA;Cf+iDH;AehjDC;EACE,oBAAA;CfkjDH;AenjDC;EACE,oBAAA;CfqjDH;AetjDC;EACE,WAAA;CfwjDH;AezjDC;EACE,oBAAA;Cf2jDH;Ae5jDC;EACE,mBAAA;Cf8jDH;AehjDC;EACE,YAAA;CfkjDH;AenjDC;EACE,oBAAA;CfqjDH;AetjDC;EACE,oBAAA;CfwjDH;AezjDC;EACE,WAAA;Cf2jDH;Ae5jDC;EACE,oBAAA;Cf8jDH;Ae/jDC;EACE,oBAAA;CfikDH;AelkDC;EACE,WAAA;CfokDH;AerkDC;EACE,oBAAA;CfukDH;AexkDC;EACE,oBAAA;Cf0kDH;Ae3kDC;EACE,WAAA;Cf6kDH;Ae9kDC;EACE,oBAAA;CfglDH;AejlDC;EACE,mBAAA;CfmlDH;Ae/kDC;EACE,YAAA;CfilDH;AejmDC;EACE,WAAA;CfmmDH;AepmDC;EACE,mBAAA;CfsmDH;AevmDC;EACE,mBAAA;CfymDH;Ae1mDC;EACE,UAAA;Cf4mDH;Ae7mDC;EACE,mBAAA;Cf+mDH;AehnDC;EACE,mBAAA;CfknDH;AennDC;EACE,UAAA;CfqnDH;AetnDC;EACE,mBAAA;CfwnDH;AeznDC;EACE,mBAAA;Cf2nDH;Ae5nDC;EACE,UAAA;Cf8nDH;Ae/nDC;EACE,mBAAA;CfioDH;AeloDC;EACE,kBAAA;CfooDH;AehoDC;EACE,WAAA;CfkoDH;AepnDC;EACE,kBAAA;CfsnDH;AevnDC;EACE,0BAAA;CfynDH;Ae1nDC;EACE,0BAAA;Cf4nDH;Ae7nDC;EACE,iBAAA;Cf+nDH;AehoDC;EACE,0BAAA;CfkoDH;AenoDC;EACE,0BAAA;CfqoDH;AetoDC;EACE,iBAAA;CfwoDH;AezoDC;EACE,0BAAA;Cf2oDH;Ae5oDC;EACE,0BAAA;Cf8oDH;Ae/oDC;EACE,iBAAA;CfipDH;AelpDC;EACE,0BAAA;CfopDH;AerpDC;EACE,yBAAA;CfupDH;AexpDC;EACE,gBAAA;Cf0pDH;Aa1pDD;EElCI;IACE,YAAA;Gf+rDH;EexrDD;IACE,YAAA;Gf0rDD;Ee3rDD;IACE,oBAAA;Gf6rDD;Ee9rDD;IACE,oBAAA;GfgsDD;EejsDD;IACE,WAAA;GfmsDD;EepsDD;IACE,oBAAA;GfssDD;EevsDD;IACE,oBAAA;GfysDD;Ee1sDD;IACE,WAAA;Gf4sDD;Ee7sDD;IACE,oBAAA;Gf+sDD;EehtDD;IACE,oBAAA;GfktDD;EentDD;IACE,WAAA;GfqtDD;EettDD;IACE,oBAAA;GfwtDD;EeztDD;IACE,mBAAA;Gf2tDD;Ee7sDD;IACE,YAAA;Gf+sDD;EehtDD;IACE,oBAAA;GfktDD;EentDD;IACE,oBAAA;GfqtDD;EettDD;IACE,WAAA;GfwtDD;EeztDD;IACE,oBAAA;Gf2tDD;Ee5tDD;IACE,oBAAA;Gf8tDD;Ee/tDD;IACE,WAAA;GfiuDD;EeluDD;IACE,oBAAA;GfouDD;EeruDD;IACE,oBAAA;GfuuDD;EexuDD;IACE,WAAA;Gf0uDD;Ee3uDD;IACE,oBAAA;Gf6uDD;Ee9uDD;IACE,mBAAA;GfgvDD;Ee5uDD;IACE,YAAA;Gf8uDD;Ee9vDD;IACE,WAAA;GfgwDD;EejwDD;IACE,mBAAA;GfmwDD;EepwDD;IACE,mBAAA;GfswDD;EevwDD;IACE,UAAA;GfywDD;Ee1wDD;IACE,mBAAA;Gf4wDD;Ee7wDD;IACE,mBAAA;Gf+wDD;EehxDD;IACE,UAAA;GfkxDD;EenxDD;IACE,mBAAA;GfqxDD;EetxDD;IACE,mBAAA;GfwxDD;EezxDD;IACE,UAAA;Gf2xDD;Ee5xDD;IACE,mBAAA;Gf8xDD;Ee/xDD;IACE,kBAAA;GfiyDD;Ee7xDD;IACE,WAAA;Gf+xDD;EejxDD;IACE,kBAAA;GfmxDD;EepxDD;IACE,0BAAA;GfsxDD;EevxDD;IACE,0BAAA;GfyxDD;Ee1xDD;IACE,iBAAA;Gf4xDD;Ee7xDD;IACE,0BAAA;Gf+xDD;EehyDD;IACE,0BAAA;GfkyDD;EenyDD;IACE,iBAAA;GfqyDD;EetyDD;IACE,0BAAA;GfwyDD;EezyDD;IACE,0BAAA;Gf2yDD;Ee5yDD;IACE,iBAAA;Gf8yDD;Ee/yDD;IACE,0BAAA;GfizDD;EelzDD;IACE,yBAAA;GfozDD;EerzDD;IACE,gBAAA;GfuzDD;CACF;Aa/yDD;EE3CI;IACE,YAAA;Gf61DH;Eet1DD;IACE,YAAA;Gfw1DD;Eez1DD;IACE,oBAAA;Gf21DD;Ee51DD;IACE,oBAAA;Gf81DD;Ee/1DD;IACE,WAAA;Gfi2DD;Eel2DD;IACE,oBAAA;Gfo2DD;Eer2DD;IACE,oBAAA;Gfu2DD;Eex2DD;IACE,WAAA;Gf02DD;Ee32DD;IACE,oBAAA;Gf62DD;Ee92DD;IACE,oBAAA;Gfg3DD;Eej3DD;IACE,WAAA;Gfm3DD;Eep3DD;IACE,oBAAA;Gfs3DD;Eev3DD;IACE,mBAAA;Gfy3DD;Ee32DD;IACE,YAAA;Gf62DD;Ee92DD;IACE,oBAAA;Gfg3DD;Eej3DD;IACE,oBAAA;Gfm3DD;Eep3DD;IACE,WAAA;Gfs3DD;Eev3DD;IACE,oBAAA;Gfy3DD;Ee13DD;IACE,oBAAA;Gf43DD;Ee73DD;IACE,WAAA;Gf+3DD;Eeh4DD;IACE,oBAAA;Gfk4DD;Een4DD;IACE,oBAAA;Gfq4DD;Eet4DD;IACE,WAAA;Gfw4DD;Eez4DD;IACE,oBAAA;Gf24DD;Ee54DD;IACE,mBAAA;Gf84DD;Ee14DD;IACE,YAAA;Gf44DD;Ee55DD;IACE,WAAA;Gf85DD;Ee/5DD;IACE,mBAAA;Gfi6DD;Eel6DD;IACE,mBAAA;Gfo6DD;Eer6DD;IACE,UAAA;Gfu6DD;Eex6DD;IACE,mBAAA;Gf06DD;Ee36DD;IACE,mBAAA;Gf66DD;Ee96DD;IACE,UAAA;Gfg7DD;Eej7DD;IACE,mBAAA;Gfm7DD;Eep7DD;IACE,mBAAA;Gfs7DD;Eev7DD;IACE,UAAA;Gfy7DD;Ee17DD;IACE,mBAAA;Gf47DD;Ee77DD;IACE,kBAAA;Gf+7DD;Ee37DD;IACE,WAAA;Gf67DD;Ee/6DD;IACE,kBAAA;Gfi7DD;Eel7DD;IACE,0BAAA;Gfo7DD;Eer7DD;IACE,0BAAA;Gfu7DD;Eex7DD;IACE,iBAAA;Gf07DD;Ee37DD;IACE,0BAAA;Gf67DD;Ee97DD;IACE,0BAAA;Gfg8DD;Eej8DD;IACE,iBAAA;Gfm8DD;Eep8DD;IACE,0BAAA;Gfs8DD;Eev8DD;IACE,0BAAA;Gfy8DD;Ee18DD;IACE,iBAAA;Gf48DD;Ee78DD;IACE,0BAAA;Gf+8DD;Eeh9DD;IACE,yBAAA;Gfk9DD;Een9DD;IACE,gBAAA;Gfq9DD;CACF;Aa18DD;EE9CI;IACE,YAAA;Gf2/DH;Eep/DD;IACE,YAAA;Gfs/DD;Eev/DD;IACE,oBAAA;Gfy/DD;Ee1/DD;IACE,oBAAA;Gf4/DD;Ee7/DD;IACE,WAAA;Gf+/DD;EehgED;IACE,oBAAA;GfkgED;EengED;IACE,oBAAA;GfqgED;EetgED;IACE,WAAA;GfwgED;EezgED;IACE,oBAAA;Gf2gED;Ee5gED;IACE,oBAAA;Gf8gED;Ee/gED;IACE,WAAA;GfihED;EelhED;IACE,oBAAA;GfohED;EerhED;IACE,mBAAA;GfuhED;EezgED;IACE,YAAA;Gf2gED;Ee5gED;IACE,oBAAA;Gf8gED;Ee/gED;IACE,oBAAA;GfihED;EelhED;IACE,WAAA;GfohED;EerhED;IACE,oBAAA;GfuhED;EexhED;IACE,oBAAA;Gf0hED;Ee3hED;IACE,WAAA;Gf6hED;Ee9hED;IACE,oBAAA;GfgiED;EejiED;IACE,oBAAA;GfmiED;EepiED;IACE,WAAA;GfsiED;EeviED;IACE,oBAAA;GfyiED;Ee1iED;IACE,mBAAA;Gf4iED;EexiED;IACE,YAAA;Gf0iED;Ee1jED;IACE,WAAA;Gf4jED;Ee7jED;IACE,mBAAA;Gf+jED;EehkED;IACE,mBAAA;GfkkED;EenkED;IACE,UAAA;GfqkED;EetkED;IACE,mBAAA;GfwkED;EezkED;IACE,mBAAA;Gf2kED;Ee5kED;IACE,UAAA;Gf8kED;Ee/kED;IACE,mBAAA;GfilED;EellED;IACE,mBAAA;GfolED;EerlED;IACE,UAAA;GfulED;EexlED;IACE,mBAAA;Gf0lED;Ee3lED;IACE,kBAAA;Gf6lED;EezlED;IACE,WAAA;Gf2lED;Ee7kED;IACE,kBAAA;Gf+kED;EehlED;IACE,0BAAA;GfklED;EenlED;IACE,0BAAA;GfqlED;EetlED;IACE,iBAAA;GfwlED;EezlED;IACE,0BAAA;Gf2lED;Ee5lED;IACE,0BAAA;Gf8lED;Ee/lED;IACE,iBAAA;GfimED;EelmED;IACE,0BAAA;GfomED;EermED;IACE,0BAAA;GfumED;EexmED;IACE,iBAAA;Gf0mED;Ee3mED;IACE,0BAAA;Gf6mED;Ee9mED;IACE,yBAAA;GfgnED;EejnED;IACE,gBAAA;GfmnED;CACF;AgBvrED;EACE,8BAAA;ChByrED;AgBvrED;EACE,iBAAA;EACA,oBAAA;EACA,eAAA;EACA,iBAAA;ChByrED;AgBvrED;EACE,iBAAA;ChByrED;AgBnrED;EACE,YAAA;EACA,gBAAA;EACA,oBAAA;ChBqrED;AgBxrED;;;;;;EAWQ,aAAA;EACA,wBAAA;EACA,oBAAA;EACA,2BAAA;ChBqrEP;AgBnsED;EAoBI,uBAAA;EACA,8BAAA;ChBkrEH;AgBvsED;;;;;;EA8BQ,cAAA;ChBirEP;AgB/sED;EAoCI,2BAAA;ChB8qEH;AgBltED;EAyCI,uBAAA;ChB4qEH;AgBrqED;;;;;;EAOQ,aAAA;ChBsqEP;AgB3pED;EACE,uBAAA;ChB6pED;AgB9pED;;;;;;EAQQ,uBAAA;ChB8pEP;AgBtqED;;EAeM,yBAAA;ChB2pEL;AgBjpED;EAEI,0BAAA;ChBkpEH;AgBzoED;EAEI,0BAAA;ChB0oEH;AgBjoED;EACE,iBAAA;EACA,YAAA;EACA,sBAAA;ChBmoED;AgB9nEG;;EACE,iBAAA;EACA,YAAA;EACA,oBAAA;ChBioEL;AiB7wEC;;;;;;;;;;;;EAOI,0BAAA;CjBoxEL;AiB9wEC;;;;;EAMI,0BAAA;CjB+wEL;AiBlyEC;;;;;;;;;;;;EAOI,0BAAA;CjByyEL;AiBnyEC;;;;;EAMI,0BAAA;CjBoyEL;AiBvzEC;;;;;;;;;;;;EAOI,0BAAA;CjB8zEL;AiBxzEC;;;;;EAMI,0BAAA;CjByzEL;AiB50EC;;;;;;;;;;;;EAOI,0BAAA;CjBm1EL;AiB70EC;;;;;EAMI,0BAAA;CjB80EL;AiBj2EC;;;;;;;;;;;;EAOI,0BAAA;CjBw2EL;AiBl2EC;;;;;EAMI,0BAAA;CjBm2EL;AgBjtED;EACE,iBAAA;EACA,kBAAA;ChBmtED;AgBtpED;EACA;IA3DI,YAAA;IACA,oBAAA;IACA,mBAAA;IACA,6CAAA;IACA,uBAAA;GhBotED;EgB7pEH;IAnDM,iBAAA;GhBmtEH;EgBhqEH;;;;;;IA1CY,oBAAA;GhBktET;EgBxqEH;IAlCM,UAAA;GhB6sEH;EgB3qEH;;;;;;IAzBY,eAAA;GhB4sET;EgBnrEH;;;;;;IArBY,gBAAA;GhBgtET;EgB3rEH;;;;IARY,iBAAA;GhBysET;CACF;AkBn6ED;EACE,WAAA;EACA,UAAA;EACA,UAAA;EAIA,aAAA;ClBk6ED;AkB/5ED;EACE,eAAA;EACA,YAAA;EACA,WAAA;EACA,oBAAA;EACA,gBAAA;EACA,qBAAA;EACA,eAAA;EACA,UAAA;EACA,iCAAA;ClBi6ED;AkB95ED;EACE,sBAAA;EACA,gBAAA;EACA,mBAAA;EACA,kBAAA;ClBg6ED;AkBr5ED;Eb4BE,+BAAA;EACG,4BAAA;EACK,uBAAA;CL43ET;AkBr5ED;;EAEE,gBAAA;EACA,mBAAA;EACA,oBAAA;ClBu5ED;AkBp5ED;EACE,eAAA;ClBs5ED;AkBl5ED;EACE,eAAA;EACA,YAAA;ClBo5ED;AkBh5ED;;EAEE,aAAA;ClBk5ED;AkB94ED;;;EZrEE,2CAAA;EACA,qBAAA;CNw9ED;AkB74ED;EACE,eAAA;EACA,iBAAA;EACA,gBAAA;EACA,wBAAA;EACA,eAAA;ClB+4ED;AkBr3ED;EACE,eAAA;EACA,YAAA;EACA,aAAA;EACA,kBAAA;EACA,gBAAA;EACA,wBAAA;EACA,eAAA;EACA,uBAAA;EACA,uBAAA;EACA,uBAAA;EACA,mBAAA;EbxDA,yDAAA;EACQ,iDAAA;EAyHR,uFAAA;EACK,0EAAA;EACG,uEAAA;CLwzET;AmBh8EC;EACE,sBAAA;EACA,WAAA;EdUF,uFAAA;EACQ,+EAAA;CLy7ET;AKx5EC;EACE,YAAA;EACA,WAAA;CL05EH;AKx5EC;EAA0B,YAAA;CL25E3B;AK15EC;EAAgC,YAAA;CL65EjC;AkBj4EC;EACE,UAAA;EACA,8BAAA;ClBm4EH;AkB33EC;;;EAGE,0BAAA;EACA,WAAA;ClB63EH;AkB13EC;;EAEE,oBAAA;ClB43EH;AkBx3EC;EACE,aAAA;ClB03EH;AkB92ED;EACE,yBAAA;ClBg3ED;AkBx0ED;EAtBI;;;;IACE,kBAAA;GlBo2EH;EkBj2EC;;;;;;;;IAEE,kBAAA;GlBy2EH;EkBt2EC;;;;;;;;IAEE,kBAAA;GlB82EH;CACF;AkBp2ED;EACE,oBAAA;ClBs2ED;AkB91ED;;EAEE,mBAAA;EACA,eAAA;EACA,iBAAA;EACA,oBAAA;ClBg2ED;AkBr2ED;;EAQI,iBAAA;EACA,mBAAA;EACA,iBAAA;EACA,oBAAA;EACA,gBAAA;ClBi2EH;AkB91ED;;;;EAIE,mBAAA;EACA,mBAAA;EACA,mBAAA;ClBg2ED;AkB71ED;;EAEE,iBAAA;ClB+1ED;AkB31ED;;EAEE,mBAAA;EACA,sBAAA;EACA,mBAAA;EACA,iBAAA;EACA,uBAAA;EACA,oBAAA;EACA,gBAAA;ClB61ED;AkB31ED;;EAEE,cAAA;EACA,kBAAA;ClB61ED;AkBp1EC;;;;;;EAGE,oBAAA;ClBy1EH;AkBn1EC;;;;EAEE,oBAAA;ClBu1EH;AkBj1EC;;;;EAGI,oBAAA;ClBo1EL;AkBz0ED;EAEE,iBAAA;EACA,oBAAA;EAEA,iBAAA;EACA,iBAAA;ClBy0ED;AkBv0EC;;EAEE,gBAAA;EACA,iBAAA;ClBy0EH;AkB5zED;ECnQE,aAAA;EACA,kBAAA;EACA,gBAAA;EACA,iBAAA;EACA,mBAAA;CnBkkFD;AmBhkFC;EACE,aAAA;EACA,kBAAA;CnBkkFH;AmB/jFC;;EAEE,aAAA;CnBikFH;AkBx0ED;EAEI,aAAA;EACA,kBAAA;EACA,gBAAA;EACA,iBAAA;EACA,mBAAA;ClBy0EH;AkB/0ED;EASI,aAAA;EACA,kBAAA;ClBy0EH;AkBn1ED;;EAcI,aAAA;ClBy0EH;AkBv1ED;EAiBI,aAAA;EACA,iBAAA;EACA,kBAAA;EACA,gBAAA;EACA,iBAAA;ClBy0EH;AkBr0ED;EC/RE,aAAA;EACA,mBAAA;EACA,gBAAA;EACA,uBAAA;EACA,mBAAA;CnBumFD;AmBrmFC;EACE,aAAA;EACA,kBAAA;CnBumFH;AmBpmFC;;EAEE,aAAA;CnBsmFH;AkBj1ED;EAEI,aAAA;EACA,mBAAA;EACA,gBAAA;EACA,uBAAA;EACA,mBAAA;ClBk1EH;AkBx1ED;EASI,aAAA;EACA,kBAAA;ClBk1EH;AkB51ED;;EAcI,aAAA;ClBk1EH;AkBh2ED;EAiBI,aAAA;EACA,iBAAA;EACA,mBAAA;EACA,gBAAA;EACA,uBAAA;ClBk1EH;AkBz0ED;EAEE,mBAAA;ClB00ED;AkB50ED;EAMI,sBAAA;ClBy0EH;AkBr0ED;EACE,mBAAA;EACA,OAAA;EACA,SAAA;EACA,WAAA;EACA,eAAA;EACA,YAAA;EACA,aAAA;EACA,kBAAA;EACA,mBAAA;EACA,qBAAA;ClBu0ED;AkBr0ED;;;EAGE,YAAA;EACA,aAAA;EACA,kBAAA;ClBu0ED;AkBr0ED;;;EAGE,YAAA;EACA,aAAA;EACA,kBAAA;ClBu0ED;AkBn0ED;;;;;;;;;;EC1ZI,eAAA;CnByuFH;AkB/0ED;ECtZI,sBAAA;Ed+CF,yDAAA;EACQ,iDAAA;CL0rFT;AmBxuFG;EACE,sBAAA;Ed4CJ,0EAAA;EACQ,kEAAA;CL+rFT;AkBz1ED;EC5YI,eAAA;EACA,sBAAA;EACA,0BAAA;CnBwuFH;AkB91ED;ECtYI,eAAA;CnBuuFH;AkB91ED;;;;;;;;;;EC7ZI,eAAA;CnBuwFH;AkB12ED;ECzZI,sBAAA;Ed+CF,yDAAA;EACQ,iDAAA;CLwtFT;AmBtwFG;EACE,sBAAA;Ed4CJ,0EAAA;EACQ,kEAAA;CL6tFT;AkBp3ED;EC/YI,eAAA;EACA,sBAAA;EACA,0BAAA;CnBswFH;AkBz3ED;ECzYI,eAAA;CnBqwFH;AkBz3ED;;;;;;;;;;EChaI,eAAA;CnBqyFH;AkBr4ED;EC5ZI,sBAAA;Ed+CF,yDAAA;EACQ,iDAAA;CLsvFT;AmBpyFG;EACE,sBAAA;Ed4CJ,0EAAA;EACQ,kEAAA;CL2vFT;AkB/4ED;EClZI,eAAA;EACA,sBAAA;EACA,0BAAA;CnBoyFH;AkBp5ED;EC5YI,eAAA;CnBmyFH;AkBh5EC;EACE,UAAA;ClBk5EH;AkBh5EC;EACE,OAAA;ClBk5EH;AkBx4ED;EACE,eAAA;EACA,gBAAA;EACA,oBAAA;EACA,eAAA;ClB04ED;AkBvzED;EAwEA;IAtIM,sBAAA;IACA,iBAAA;IACA,uBAAA;GlBy3EH;EkBrvEH;IA/HM,sBAAA;IACA,YAAA;IACA,uBAAA;GlBu3EH;EkB1vEH;IAxHM,sBAAA;GlBq3EH;EkB7vEH;IApHM,sBAAA;IACA,uBAAA;GlBo3EH;EkBjwEH;;;IA9GQ,YAAA;GlBo3EL;EkBtwEH;IAxGM,YAAA;GlBi3EH;EkBzwEH;IApGM,iBAAA;IACA,uBAAA;GlBg3EH;EkB7wEH;;IA5FM,sBAAA;IACA,cAAA;IACA,iBAAA;IACA,uBAAA;GlB62EH;EkBpxEH;;IAtFQ,gBAAA;GlB82EL;EkBxxEH;;IAjFM,mBAAA;IACA,eAAA;GlB62EH;EkB7xEH;IA3EM,OAAA;GlB22EH;CACF;AkBj2ED;;;;EASI,cAAA;EACA,iBAAA;EACA,iBAAA;ClB81EH;AkBz2ED;;EAiBI,iBAAA;ClB41EH;AkB72ED;EJthBE,mBAAA;EACA,oBAAA;Cds4FD;AkB10EC;EAyBF;IAnCM,kBAAA;IACA,iBAAA;IACA,iBAAA;GlBw1EH;CACF;AkBx3ED;EAwCI,YAAA;ClBm1EH;AkBr0EC;EAUF;IAdQ,kBAAA;IACA,gBAAA;GlB60EL;CACF;AkBn0EC;EAEF;IANQ,iBAAA;IACA,gBAAA;GlB20EL;CACF;AoBp6FD;EACE,sBAAA;EACA,iBAAA;EACA,oBAAA;EACA,mBAAA;EACA,uBAAA;EACA,+BAAA;MAAA,2BAAA;EACA,gBAAA;EACA,uBAAA;EACA,8BAAA;EACA,oBAAA;EC0CA,kBAAA;EACA,gBAAA;EACA,wBAAA;EACA,mBAAA;EhB+JA,0BAAA;EACG,uBAAA;EACC,sBAAA;EACI,kBAAA;CL+tFT;AoBv6FG;;;;;;EdnBF,2CAAA;EACA,qBAAA;CNk8FD;AoB16FC;;;EAGE,YAAA;EACA,sBAAA;CpB46FH;AoBz6FC;;EAEE,WAAA;EACA,uBAAA;Ef2BF,yDAAA;EACQ,iDAAA;CLi5FT;AoBz6FC;;;EAGE,oBAAA;EE7CF,cAAA;EAGA,0BAAA;EjB8DA,yBAAA;EACQ,iBAAA;CL05FT;AoBz6FG;;EAEE,qBAAA;CpB26FL;AoBl6FD;EC3DE,YAAA;EACA,uBAAA;EACA,mBAAA;CrBg+FD;AqB99FC;;EAEE,YAAA;EACA,0BAAA;EACI,sBAAA;CrBg+FP;AqB99FC;EACE,YAAA;EACA,0BAAA;EACI,sBAAA;CrBg+FP;AqB99FC;;;EAGE,YAAA;EACA,0BAAA;EACI,sBAAA;CrBg+FP;AqB99FG;;;;;;;;;EAGE,YAAA;EACA,0BAAA;EACI,sBAAA;CrBs+FT;AqBn+FC;;;EAGE,uBAAA;CrBq+FH;AqBh+FG;;;;;;;;;EAGE,uBAAA;EACI,mBAAA;CrBw+FT;AoBv9FD;ECZI,YAAA;EACA,uBAAA;CrBs+FH;AoBx9FD;EC9DE,YAAA;EACA,0BAAA;EACA,sBAAA;CrByhGD;AqBvhGC;;EAEE,YAAA;EACA,0BAAA;EACI,sBAAA;CrByhGP;AqBvhGC;EACE,YAAA;EACA,0BAAA;EACI,sBAAA;CrByhGP;AqBvhGC;;;EAGE,YAAA;EACA,0BAAA;EACI,sBAAA;CrByhGP;AqBvhGG;;;;;;;;;EAGE,YAAA;EACA,0BAAA;EACI,sBAAA;CrB+hGT;AqB5hGC;;;EAGE,uBAAA;CrB8hGH;AqBzhGG;;;;;;;;;EAGE,0BAAA;EACI,sBAAA;CrBiiGT;AoB7gGD;ECfI,eAAA;EACA,uBAAA;CrB+hGH;AoB7gGD;EClEE,YAAA;EACA,0BAAA;EACA,sBAAA;CrBklGD;AqBhlGC;;EAEE,YAAA;EACA,0BAAA;EACI,sBAAA;CrBklGP;AqBhlGC;EACE,YAAA;EACA,0BAAA;EACI,sBAAA;CrBklGP;AqBhlGC;;;EAGE,YAAA;EACA,0BAAA;EACI,sBAAA;CrBklGP;AqBhlGG;;;;;;;;;EAGE,YAAA;EACA,0BAAA;EACI,sBAAA;CrBwlGT;AqBrlGC;;;EAGE,uBAAA;CrBulGH;AqBllGG;;;;;;;;;EAGE,0BAAA;EACI,sBAAA;CrB0lGT;AoBlkGD;ECnBI,eAAA;EACA,uBAAA;CrBwlGH;AoBlkGD;ECtEE,YAAA;EACA,0BAAA;EACA,sBAAA;CrB2oGD;AqBzoGC;;EAEE,YAAA;EACA,0BAAA;EACI,sBAAA;CrB2oGP;AqBzoGC;EACE,YAAA;EACA,0BAAA;EACI,sBAAA;CrB2oGP;AqBzoGC;;;EAGE,YAAA;EACA,0BAAA;EACI,sBAAA;CrB2oGP;AqBzoGG;;;;;;;;;EAGE,YAAA;EACA,0BAAA;EACI,sBAAA;CrBipGT;AqB9oGC;;;EAGE,uBAAA;CrBgpGH;AqB3oGG;;;;;;;;;EAGE,0BAAA;EACI,sBAAA;CrBmpGT;AoBvnGD;ECvBI,eAAA;EACA,uBAAA;CrBipGH;AoBvnGD;EC1EE,YAAA;EACA,0BAAA;EACA,sBAAA;CrBosGD;AqBlsGC;;EAEE,YAAA;EACA,0BAAA;EACI,sBAAA;CrBosGP;AqBlsGC;EACE,YAAA;EACA,0BAAA;EACI,sBAAA;CrBosGP;AqBlsGC;;;EAGE,YAAA;EACA,0BAAA;EACI,sBAAA;CrBosGP;AqBlsGG;;;;;;;;;EAGE,YAAA;EACA,0BAAA;EACI,sBAAA;CrB0sGT;AqBvsGC;;;EAGE,uBAAA;CrBysGH;AqBpsGG;;;;;;;;;EAGE,0BAAA;EACI,sBAAA;CrB4sGT;AoB5qGD;EC3BI,eAAA;EACA,uBAAA;CrB0sGH;AoB5qGD;EC9EE,YAAA;EACA,0BAAA;EACA,sBAAA;CrB6vGD;AqB3vGC;;EAEE,YAAA;EACA,0BAAA;EACI,sBAAA;CrB6vGP;AqB3vGC;EACE,YAAA;EACA,0BAAA;EACI,sBAAA;CrB6vGP;AqB3vGC;;;EAGE,YAAA;EACA,0BAAA;EACI,sBAAA;CrB6vGP;AqB3vGG;;;;;;;;;EAGE,YAAA;EACA,0BAAA;EACI,sBAAA;CrBmwGT;AqBhwGC;;;EAGE,uBAAA;CrBkwGH;AqB7vGG;;;;;;;;;EAGE,0BAAA;EACI,sBAAA;CrBqwGT;AoBjuGD;EC/BI,eAAA;EACA,uBAAA;CrBmwGH;AoB5tGD;EACE,eAAA;EACA,oBAAA;EACA,iBAAA;CpB8tGD;AoB5tGC;;;;;EAKE,8BAAA;EfnCF,yBAAA;EACQ,iBAAA;CLkwGT;AoB7tGC;;;;EAIE,0BAAA;CpB+tGH;AoB7tGC;;EAEE,eAAA;EACA,2BAAA;EACA,8BAAA;CpB+tGH;AoB3tGG;;;;EAEE,eAAA;EACA,sBAAA;CpB+tGL;AoBttGD;;ECxEE,mBAAA;EACA,gBAAA;EACA,uBAAA;EACA,mBAAA;CrBkyGD;AoBztGD;;EC5EE,kBAAA;EACA,gBAAA;EACA,iBAAA;EACA,mBAAA;CrByyGD;AoB5tGD;;EChFE,iBAAA;EACA,gBAAA;EACA,iBAAA;EACA,mBAAA;CrBgzGD;AoB3tGD;EACE,eAAA;EACA,YAAA;CpB6tGD;AoBztGD;EACE,gBAAA;CpB2tGD;AoBptGC;;;EACE,YAAA;CpBwtGH;AuBl3GD;EACE,WAAA;ElBoLA,yCAAA;EACK,oCAAA;EACG,iCAAA;CLisGT;AuBr3GC;EACE,WAAA;CvBu3GH;AuBn3GD;EACE,cAAA;CvBq3GD;AuBn3GC;EAAY,eAAA;CvBs3Gb;AuBr3GC;EAAY,mBAAA;CvBw3Gb;AuBv3GC;EAAY,yBAAA;CvB03Gb;AuBv3GD;EACE,mBAAA;EACA,UAAA;EACA,iBAAA;ElBuKA,gDAAA;EACQ,2CAAA;KAAA,wCAAA;EAOR,mCAAA;EACQ,8BAAA;KAAA,2BAAA;EAGR,yCAAA;EACQ,oCAAA;KAAA,iCAAA;CL2sGT;AwBr5GD;EACE,sBAAA;EACA,SAAA;EACA,UAAA;EACA,iBAAA;EACA,uBAAA;EACA,uBAAA;EACA,yBAAA;EACA,oCAAA;EACA,mCAAA;CxBu5GD;AwBn5GD;;EAEE,mBAAA;CxBq5GD;AwBj5GD;EACE,WAAA;CxBm5GD;AwB/4GD;EACE,mBAAA;EACA,UAAA;EACA,QAAA;EACA,cAAA;EACA,cAAA;EACA,YAAA;EACA,iBAAA;EACA,eAAA;EACA,gBAAA;EACA,iBAAA;EACA,gBAAA;EACA,iBAAA;EACA,uBAAA;EACA,uBAAA;EACA,sCAAA;EACA,mBAAA;EnBsBA,oDAAA;EACQ,4CAAA;EmBrBR,qCAAA;UAAA,6BAAA;CxBk5GD;AwB74GC;EACE,SAAA;EACA,WAAA;CxB+4GH;AwBx6GD;ECzBE,YAAA;EACA,cAAA;EACA,iBAAA;EACA,0BAAA;CzBo8GD;AwB96GD;EAmCI,eAAA;EACA,kBAAA;EACA,YAAA;EACA,oBAAA;EACA,wBAAA;EACA,eAAA;EACA,oBAAA;CxB84GH;AwBx4GC;;EAEE,sBAAA;EACA,eAAA;EACA,0BAAA;CxB04GH;AwBp4GC;;;EAGE,YAAA;EACA,sBAAA;EACA,WAAA;EACA,0BAAA;CxBs4GH;AwB73GC;;;EAGE,eAAA;CxB+3GH;AwB33GC;;EAEE,sBAAA;EACA,8BAAA;EACA,uBAAA;EE3GF,oEAAA;EF6GE,oBAAA;CxB63GH;AwBx3GD;EAGI,eAAA;CxBw3GH;AwB33GD;EAQI,WAAA;CxBs3GH;AwB92GD;EACE,WAAA;EACA,SAAA;CxBg3GD;AwBx2GD;EACE,QAAA;EACA,YAAA;CxB02GD;AwBt2GD;EACE,eAAA;EACA,kBAAA;EACA,gBAAA;EACA,wBAAA;EACA,eAAA;EACA,oBAAA;CxBw2GD;AwBp2GD;EACE,gBAAA;EACA,QAAA;EACA,SAAA;EACA,UAAA;EACA,OAAA;EACA,aAAA;CxBs2GD;AwBl2GD;EACE,SAAA;EACA,WAAA;CxBo2GD;AwB51GD;;EAII,cAAA;EACA,0BAAA;EACA,4BAAA;EACA,YAAA;CxB41GH;AwBn2GD;;EAWI,UAAA;EACA,aAAA;EACA,mBAAA;CxB41GH;AwBv0GD;EAXE;IApEA,WAAA;IACA,SAAA;GxB05GC;EwBv1GD;IA1DA,QAAA;IACA,YAAA;GxBo5GC;CACF;A2BpiHD;;EAEE,mBAAA;EACA,sBAAA;EACA,uBAAA;C3BsiHD;A2B1iHD;;EAMI,mBAAA;EACA,YAAA;C3BwiHH;A2BtiHG;;;;;;;;EAIE,WAAA;C3B4iHL;A2BtiHD;;;;EAKI,kBAAA;C3BuiHH;A2BliHD;EACE,kBAAA;C3BoiHD;A2BriHD;;;EAOI,YAAA;C3BmiHH;A2B1iHD;;;EAYI,iBAAA;C3BmiHH;A2B/hHD;EACE,iBAAA;C3BiiHD;A2B7hHD;EACE,eAAA;C3B+hHD;A2B9hHC;EClDA,8BAAA;EACG,2BAAA;C5BmlHJ;A2B7hHD;;EC/CE,6BAAA;EACG,0BAAA;C5BglHJ;A2B5hHD;EACE,YAAA;C3B8hHD;A2B5hHD;EACE,iBAAA;C3B8hHD;A2B5hHD;;ECnEE,8BAAA;EACG,2BAAA;C5BmmHJ;A2B3hHD;ECjEE,6BAAA;EACG,0BAAA;C5B+lHJ;A2B1hHD;;EAEE,WAAA;C3B4hHD;A2B3gHD;EACE,kBAAA;EACA,mBAAA;C3B6gHD;A2B3gHD;EACE,mBAAA;EACA,oBAAA;C3B6gHD;A2BxgHD;EtB/CE,yDAAA;EACQ,iDAAA;CL0jHT;A2BxgHC;EtBnDA,yBAAA;EACQ,iBAAA;CL8jHT;A2BrgHD;EACE,eAAA;C3BugHD;A2BpgHD;EACE,wBAAA;EACA,uBAAA;C3BsgHD;A2BngHD;EACE,wBAAA;C3BqgHD;A2B9/GD;;;EAII,eAAA;EACA,YAAA;EACA,YAAA;EACA,gBAAA;C3B+/GH;A2BtgHD;EAcM,YAAA;C3B2/GL;A2BzgHD;;;;EAsBI,iBAAA;EACA,eAAA;C3By/GH;A2Bp/GC;EACE,iBAAA;C3Bs/GH;A2Bp/GC;EC3KA,6BAAA;EACC,4BAAA;EAOD,8BAAA;EACC,6BAAA;C5B4pHF;A2Bt/GC;EC/KA,2BAAA;EACC,0BAAA;EAOD,gCAAA;EACC,+BAAA;C5BkqHF;A2Bv/GD;EACE,iBAAA;C3By/GD;A2Bv/GD;;EC/KE,8BAAA;EACC,6BAAA;C5B0qHF;A2Bt/GD;EC7LE,2BAAA;EACC,0BAAA;C5BsrHF;A2Bl/GD;EACE,eAAA;EACA,YAAA;EACA,oBAAA;EACA,0BAAA;C3Bo/GD;A2Bx/GD;;EAOI,YAAA;EACA,oBAAA;EACA,UAAA;C3Bq/GH;A2B9/GD;EAYI,YAAA;C3Bq/GH;A2BjgHD;EAgBI,WAAA;C3Bo/GH;A2Bn+GD;;;;EAKM,mBAAA;EACA,uBAAA;EACA,qBAAA;C3Bo+GL;A6B9sHD;EACE,mBAAA;EACA,eAAA;EACA,0BAAA;C7BgtHD;A6B7sHC;EACE,YAAA;EACA,gBAAA;EACA,iBAAA;C7B+sHH;A6BxtHD;EAeI,mBAAA;EACA,WAAA;EAKA,YAAA;EAEA,YAAA;EACA,iBAAA;C7BusHH;A6BrsHG;EACE,WAAA;C7BusHL;A6B7rHD;;;EV0BE,aAAA;EACA,mBAAA;EACA,gBAAA;EACA,uBAAA;EACA,mBAAA;CnBwqHD;AmBtqHC;;;EACE,aAAA;EACA,kBAAA;CnB0qHH;AmBvqHC;;;;;;EAEE,aAAA;CnB6qHH;A6B/sHD;;;EVqBE,aAAA;EACA,kBAAA;EACA,gBAAA;EACA,iBAAA;EACA,mBAAA;CnB+rHD;AmB7rHC;;;EACE,aAAA;EACA,kBAAA;CnBisHH;AmB9rHC;;;;;;EAEE,aAAA;CnBosHH;A6B7tHD;;;EAGE,oBAAA;C7B+tHD;A6B7tHC;;;EACE,iBAAA;C7BiuHH;A6B7tHD;;EAEE,UAAA;EACA,oBAAA;EACA,uBAAA;C7B+tHD;A6B1tHD;EACE,kBAAA;EACA,gBAAA;EACA,oBAAA;EACA,eAAA;EACA,eAAA;EACA,mBAAA;EACA,0BAAA;EACA,uBAAA;EACA,mBAAA;C7B4tHD;A6BztHC;EACE,kBAAA;EACA,gBAAA;EACA,mBAAA;C7B2tHH;A6BztHC;EACE,mBAAA;EACA,gBAAA;EACA,mBAAA;C7B2tHH;A6B/uHD;;EA0BI,cAAA;C7BytHH;A6BptHD;;;;;;;EDpGE,8BAAA;EACG,2BAAA;C5Bi0HJ;A6BrtHD;EACE,gBAAA;C7ButHD;A6BrtHD;;;;;;;EDxGE,6BAAA;EACG,0BAAA;C5Bs0HJ;A6BttHD;EACE,eAAA;C7BwtHD;A6BntHD;EACE,mBAAA;EAGA,aAAA;EACA,oBAAA;C7BmtHD;A6BxtHD;EAUI,mBAAA;C7BitHH;A6B3tHD;EAYM,kBAAA;C7BktHL;A6B/sHG;;;EAGE,WAAA;C7BitHL;A6B5sHC;;EAGI,mBAAA;C7B6sHL;A6B1sHC;;EAGI,WAAA;EACA,kBAAA;C7B2sHL;A8B12HD;EACE,iBAAA;EACA,gBAAA;EACA,iBAAA;C9B42HD;A8B/2HD;EAOI,mBAAA;EACA,eAAA;C9B22HH;A8Bn3HD;EAWM,mBAAA;EACA,eAAA;EACA,mBAAA;C9B22HL;A8B12HK;;EAEE,sBAAA;EACA,0BAAA;C9B42HP;A8Bv2HG;EACE,eAAA;C9By2HL;A8Bv2HK;;EAEE,eAAA;EACA,sBAAA;EACA,8BAAA;EACA,oBAAA;C9By2HP;A8Bl2HG;;;EAGE,0BAAA;EACA,sBAAA;C9Bo2HL;A8B74HD;ELHE,YAAA;EACA,cAAA;EACA,iBAAA;EACA,0BAAA;CzBm5HD;A8Bn5HD;EA0DI,gBAAA;C9B41HH;A8Bn1HD;EACE,8BAAA;C9Bq1HD;A8Bt1HD;EAGI,YAAA;EAEA,oBAAA;C9Bq1HH;A8B11HD;EASM,kBAAA;EACA,wBAAA;EACA,8BAAA;EACA,2BAAA;C9Bo1HL;A8Bn1HK;EACE,mCAAA;C9Bq1HP;A8B/0HK;;;EAGE,eAAA;EACA,uBAAA;EACA,uBAAA;EACA,iCAAA;EACA,gBAAA;C9Bi1HP;A8B50HC;EAqDA,YAAA;EA8BA,iBAAA;C9B6vHD;A8Bh1HC;EAwDE,YAAA;C9B2xHH;A8Bn1HC;EA0DI,mBAAA;EACA,mBAAA;C9B4xHL;A8Bv1HC;EAgEE,UAAA;EACA,WAAA;C9B0xHH;A8B9wHD;EA0DA;IAjEM,oBAAA;IACA,UAAA;G9ByxHH;E8BztHH;IA9DQ,iBAAA;G9B0xHL;CACF;A8Bp2HC;EAuFE,gBAAA;EACA,mBAAA;C9BgxHH;A8Bx2HC;;;EA8FE,uBAAA;C9B+wHH;A8BjwHD;EA2BA;IApCM,8BAAA;IACA,2BAAA;G9B8wHH;E8B3uHH;;;IA9BM,0BAAA;G9B8wHH;CACF;A8B/2HD;EAEI,YAAA;C9Bg3HH;A8Bl3HD;EAMM,mBAAA;C9B+2HL;A8Br3HD;EASM,iBAAA;C9B+2HL;A8B12HK;;;EAGE,YAAA;EACA,0BAAA;C9B42HP;A8Bp2HD;EAEI,YAAA;C9Bq2HH;A8Bv2HD;EAIM,gBAAA;EACA,eAAA;C9Bs2HL;A8B11HD;EACE,YAAA;C9B41HD;A8B71HD;EAII,YAAA;C9B41HH;A8Bh2HD;EAMM,mBAAA;EACA,mBAAA;C9B61HL;A8Bp2HD;EAYI,UAAA;EACA,WAAA;C9B21HH;A8B/0HD;EA0DA;IAjEM,oBAAA;IACA,UAAA;G9B01HH;E8B1xHH;IA9DQ,iBAAA;G9B21HL;CACF;A8Bn1HD;EACE,iBAAA;C9Bq1HD;A8Bt1HD;EAKI,gBAAA;EACA,mBAAA;C9Bo1HH;A8B11HD;;;EAYI,uBAAA;C9Bm1HH;A8Br0HD;EA2BA;IApCM,8BAAA;IACA,2BAAA;G9Bk1HH;E8B/yHH;;;IA9BM,0BAAA;G9Bk1HH;CACF;A8Bz0HD;EAEI,cAAA;C9B00HH;A8B50HD;EAKI,eAAA;C9B00HH;A8Bj0HD;EAEE,iBAAA;EF3OA,2BAAA;EACC,0BAAA;C5B8iIF;A+BxiID;EACE,mBAAA;EACA,iBAAA;EACA,oBAAA;EACA,8BAAA;C/B0iID;A+BliID;EA8nBA;IAhoBI,mBAAA;G/BwiID;CACF;A+BzhID;EAgnBA;IAlnBI,YAAA;G/B+hID;CACF;A+BjhID;EACE,oBAAA;EACA,oBAAA;EACA,mBAAA;EACA,kCAAA;EACA,2DAAA;UAAA,mDAAA;EAEA,kCAAA;C/BkhID;A+BhhIC;EACE,iBAAA;C/BkhIH;A+Bt/HD;EA6jBA;IArlBI,YAAA;IACA,cAAA;IACA,yBAAA;YAAA,iBAAA;G/BkhID;E+BhhIC;IACE,0BAAA;IACA,wBAAA;IACA,kBAAA;IACA,6BAAA;G/BkhIH;E+B/gIC;IACE,oBAAA;G/BihIH;E+B5gIC;;;IAGE,gBAAA;IACA,iBAAA;G/B8gIH;CACF;A+B1gID;;EAGI,kBAAA;C/B2gIH;A+BtgIC;EAmjBF;;IArjBM,kBAAA;G/B6gIH;CACF;A+BpgID;;;;EAII,oBAAA;EACA,mBAAA;C/BsgIH;A+BhgIC;EAgiBF;;;;IAniBM,gBAAA;IACA,eAAA;G/B0gIH;CACF;A+B9/HD;EACE,cAAA;EACA,sBAAA;C/BggID;A+B3/HD;EA8gBA;IAhhBI,iBAAA;G/BigID;CACF;A+B7/HD;;EAEE,gBAAA;EACA,SAAA;EACA,QAAA;EACA,cAAA;C/B+/HD;A+Bz/HD;EAggBA;;IAlgBI,iBAAA;G/BggID;CACF;A+B9/HD;EACE,OAAA;EACA,sBAAA;C/BggID;A+B9/HD;EACE,UAAA;EACA,iBAAA;EACA,sBAAA;C/BggID;A+B1/HD;EACE,YAAA;EACA,mBAAA;EACA,gBAAA;EACA,kBAAA;EACA,aAAA;C/B4/HD;A+B1/HC;;EAEE,sBAAA;C/B4/HH;A+BrgID;EAaI,eAAA;C/B2/HH;A+Bl/HD;EALI;;IAEE,mBAAA;G/B0/HH;CACF;A+Bh/HD;EACE,mBAAA;EACA,aAAA;EACA,mBAAA;EACA,kBAAA;EC9LA,gBAAA;EACA,mBAAA;ED+LA,8BAAA;EACA,uBAAA;EACA,8BAAA;EACA,mBAAA;C/Bm/HD;A+B/+HC;EACE,WAAA;C/Bi/HH;A+B//HD;EAmBI,eAAA;EACA,YAAA;EACA,YAAA;EACA,mBAAA;C/B++HH;A+BrgID;EAyBI,gBAAA;C/B++HH;A+Bz+HD;EAqbA;IAvbI,cAAA;G/B++HD;CACF;A+Bt+HD;EACE,oBAAA;C/Bw+HD;A+Bz+HD;EAII,kBAAA;EACA,qBAAA;EACA,kBAAA;C/Bw+HH;A+B58HC;EA2YF;IAjaM,iBAAA;IACA,YAAA;IACA,YAAA;IACA,cAAA;IACA,8BAAA;IACA,UAAA;IACA,yBAAA;YAAA,iBAAA;G/Bs+HH;E+B3kHH;;IAxZQ,2BAAA;G/Bu+HL;E+B/kHH;IArZQ,kBAAA;G/Bu+HL;E+Bt+HK;;IAEE,uBAAA;G/Bw+HP;CACF;A+Bt9HD;EA+XA;IA1YI,YAAA;IACA,UAAA;G/Bq+HD;E+B5lHH;IAtYM,YAAA;G/Bq+HH;E+B/lHH;IApYQ,kBAAA;IACA,qBAAA;G/Bs+HL;CACF;A+B39HD;EACE,mBAAA;EACA,oBAAA;EACA,mBAAA;EACA,kCAAA;EACA,qCAAA;E1B9NA,6FAAA;EACQ,qFAAA;E2B/DR,gBAAA;EACA,mBAAA;ChC4vID;AkBtuHD;EAwEA;IAtIM,sBAAA;IACA,iBAAA;IACA,uBAAA;GlBwyHH;EkBpqHH;IA/HM,sBAAA;IACA,YAAA;IACA,uBAAA;GlBsyHH;EkBzqHH;IAxHM,sBAAA;GlBoyHH;EkB5qHH;IApHM,sBAAA;IACA,uBAAA;GlBmyHH;EkBhrHH;;;IA9GQ,YAAA;GlBmyHL;EkBrrHH;IAxGM,YAAA;GlBgyHH;EkBxrHH;IApGM,iBAAA;IACA,uBAAA;GlB+xHH;EkB5rHH;;IA5FM,sBAAA;IACA,cAAA;IACA,iBAAA;IACA,uBAAA;GlB4xHH;EkBnsHH;;IAtFQ,gBAAA;GlB6xHL;EkBvsHH;;IAjFM,mBAAA;IACA,eAAA;GlB4xHH;EkB5sHH;IA3EM,OAAA;GlB0xHH;CACF;A+BpgIC;EAmWF;IAzWM,mBAAA;G/B8gIH;E+B5gIG;IACE,iBAAA;G/B8gIL;CACF;A+B7/HD;EAoVA;IA5VI,YAAA;IACA,UAAA;IACA,eAAA;IACA,gBAAA;IACA,eAAA;IACA,kBAAA;I1BzPF,yBAAA;IACQ,iBAAA;GLmwIP;CACF;A+BngID;EACE,cAAA;EHpUA,2BAAA;EACC,0BAAA;C5B00IF;A+BngID;EACE,iBAAA;EHzUA,6BAAA;EACC,4BAAA;EAOD,8BAAA;EACC,6BAAA;C5By0IF;A+B//HD;EChVE,gBAAA;EACA,mBAAA;ChCk1ID;A+BhgIC;ECnVA,iBAAA;EACA,oBAAA;ChCs1ID;A+BjgIC;ECtVA,iBAAA;EACA,oBAAA;ChC01ID;A+B3/HD;EChWE,iBAAA;EACA,oBAAA;ChC81ID;A+Bv/HD;EAsSA;IA1SI,YAAA;IACA,kBAAA;IACA,mBAAA;G/B+/HD;CACF;A+Bl+HD;EAhBE;IExWA,uBAAA;GjC81IC;E+Br/HD;IE5WA,wBAAA;IF8WE,oBAAA;G/Bu/HD;E+Bz/HD;IAKI,gBAAA;G/Bu/HH;CACF;A+B9+HD;EACE,0BAAA;EACA,sBAAA;C/Bg/HD;A+Bl/HD;EAKI,YAAA;C/Bg/HH;A+B/+HG;;EAEE,eAAA;EACA,8BAAA;C/Bi/HL;A+B1/HD;EAcI,YAAA;C/B++HH;A+B7/HD;EAmBM,YAAA;C/B6+HL;A+B3+HK;;EAEE,YAAA;EACA,8BAAA;C/B6+HP;A+Bz+HK;;;EAGE,YAAA;EACA,0BAAA;C/B2+HP;A+Bv+HK;;;EAGE,YAAA;EACA,8BAAA;C/By+HP;A+BjhID;EA8CI,mBAAA;C/Bs+HH;A+Br+HG;;EAEE,uBAAA;C/Bu+HL;A+BxhID;EAoDM,uBAAA;C/Bu+HL;A+B3hID;;EA0DI,sBAAA;C/Bq+HH;A+B99HK;;;EAGE,0BAAA;EACA,YAAA;C/Bg+HP;A+B/7HC;EAoKF;IA7LU,YAAA;G/B49HP;E+B39HO;;IAEE,YAAA;IACA,8BAAA;G/B69HT;E+Bz9HO;;;IAGE,YAAA;IACA,0BAAA;G/B29HT;E+Bv9HO;;;IAGE,YAAA;IACA,8BAAA;G/By9HT;CACF;A+B3jID;EA8GI,YAAA;C/Bg9HH;A+B/8HG;EACE,YAAA;C/Bi9HL;A+BjkID;EAqHI,YAAA;C/B+8HH;A+B98HG;;EAEE,YAAA;C/Bg9HL;A+B58HK;;;;EAEE,YAAA;C/Bg9HP;A+Bx8HD;EACE,uBAAA;EACA,sBAAA;C/B08HD;A+B58HD;EAKI,eAAA;C/B08HH;A+Bz8HG;;EAEE,YAAA;EACA,8BAAA;C/B28HL;A+Bp9HD;EAcI,eAAA;C/By8HH;A+Bv9HD;EAmBM,eAAA;C/Bu8HL;A+Br8HK;;EAEE,YAAA;EACA,8BAAA;C/Bu8HP;A+Bn8HK;;;EAGE,YAAA;EACA,0BAAA;C/Bq8HP;A+Bj8HK;;;EAGE,YAAA;EACA,8BAAA;C/Bm8HP;A+B3+HD;EA+CI,mBAAA;C/B+7HH;A+B97HG;;EAEE,uBAAA;C/Bg8HL;A+Bl/HD;EAqDM,uBAAA;C/Bg8HL;A+Br/HD;;EA2DI,sBAAA;C/B87HH;A+Bx7HK;;;EAGE,0BAAA;EACA,YAAA;C/B07HP;A+Bn5HC;EAwBF;IAvDU,sBAAA;G/Bs7HP;E+B/3HH;IApDU,0BAAA;G/Bs7HP;E+Bl4HH;IAjDU,eAAA;G/Bs7HP;E+Br7HO;;IAEE,YAAA;IACA,8BAAA;G/Bu7HT;E+Bn7HO;;;IAGE,YAAA;IACA,0BAAA;G/Bq7HT;E+Bj7HO;;;IAGE,YAAA;IACA,8BAAA;G/Bm7HT;CACF;A+B3hID;EA+GI,eAAA;C/B+6HH;A+B96HG;EACE,YAAA;C/Bg7HL;A+BjiID;EAsHI,eAAA;C/B86HH;A+B76HG;;EAEE,YAAA;C/B+6HL;A+B36HK;;;;EAEE,YAAA;C/B+6HP;AkCzjJD;EACE,kBAAA;EACA,oBAAA;EACA,iBAAA;EACA,0BAAA;EACA,mBAAA;ClC2jJD;AkChkJD;EAQI,sBAAA;ClC2jJH;AkCnkJD;EAWM,kBAAA;EACA,eAAA;EACA,YAAA;ClC2jJL;AkCxkJD;EAkBI,eAAA;ClCyjJH;AmC7kJD;EACE,sBAAA;EACA,gBAAA;EACA,eAAA;EACA,mBAAA;CnC+kJD;AmCnlJD;EAOI,gBAAA;CnC+kJH;AmCtlJD;;EAUM,mBAAA;EACA,YAAA;EACA,kBAAA;EACA,wBAAA;EACA,sBAAA;EACA,eAAA;EACA,uBAAA;EACA,uBAAA;EACA,kBAAA;CnCglJL;AmC9kJG;;EAGI,eAAA;EPXN,+BAAA;EACG,4BAAA;C5B2lJJ;AmC7kJG;;EPvBF,gCAAA;EACG,6BAAA;C5BwmJJ;AmCxkJG;;;;EAEE,WAAA;EACA,eAAA;EACA,0BAAA;EACA,mBAAA;CnC4kJL;AmCtkJG;;;;;;EAGE,WAAA;EACA,YAAA;EACA,0BAAA;EACA,sBAAA;EACA,gBAAA;CnC2kJL;AmCloJD;;;;;;EAkEM,eAAA;EACA,uBAAA;EACA,mBAAA;EACA,oBAAA;CnCwkJL;AmC/jJD;;EC3EM,mBAAA;EACA,gBAAA;EACA,uBAAA;CpC8oJL;AoC5oJG;;ERKF,+BAAA;EACG,4BAAA;C5B2oJJ;AoC3oJG;;ERTF,gCAAA;EACG,6BAAA;C5BwpJJ;AmC1kJD;;EChFM,kBAAA;EACA,gBAAA;EACA,iBAAA;CpC8pJL;AoC5pJG;;ERKF,+BAAA;EACG,4BAAA;C5B2pJJ;AoC3pJG;;ERTF,gCAAA;EACG,6BAAA;C5BwqJJ;AqC3qJD;EACE,gBAAA;EACA,eAAA;EACA,iBAAA;EACA,mBAAA;CrC6qJD;AqCjrJD;EAOI,gBAAA;CrC6qJH;AqCprJD;;EAUM,sBAAA;EACA,kBAAA;EACA,uBAAA;EACA,uBAAA;EACA,oBAAA;CrC8qJL;AqC5rJD;;EAmBM,sBAAA;EACA,0BAAA;CrC6qJL;AqCjsJD;;EA2BM,aAAA;CrC0qJL;AqCrsJD;;EAkCM,YAAA;CrCuqJL;AqCzsJD;;;;EA2CM,eAAA;EACA,uBAAA;EACA,oBAAA;CrCoqJL;AsCltJD;EACE,gBAAA;EACA,wBAAA;EACA,eAAA;EACA,kBAAA;EACA,eAAA;EACA,YAAA;EACA,mBAAA;EACA,oBAAA;EACA,yBAAA;EACA,qBAAA;CtCotJD;AsChtJG;;EAEE,YAAA;EACA,sBAAA;EACA,gBAAA;CtCktJL;AsC7sJC;EACE,cAAA;CtC+sJH;AsC3sJC;EACE,mBAAA;EACA,UAAA;CtC6sJH;AsCtsJD;ECtCE,0BAAA;CvC+uJD;AuC5uJG;;EAEE,0BAAA;CvC8uJL;AsCzsJD;EC1CE,0BAAA;CvCsvJD;AuCnvJG;;EAEE,0BAAA;CvCqvJL;AsC5sJD;EC9CE,0BAAA;CvC6vJD;AuC1vJG;;EAEE,0BAAA;CvC4vJL;AsC/sJD;EClDE,0BAAA;CvCowJD;AuCjwJG;;EAEE,0BAAA;CvCmwJL;AsCltJD;ECtDE,0BAAA;CvC2wJD;AuCxwJG;;EAEE,0BAAA;CvC0wJL;AsCrtJD;EC1DE,0BAAA;CvCkxJD;AuC/wJG;;EAEE,0BAAA;CvCixJL;AwCnxJD;EACE,sBAAA;EACA,gBAAA;EACA,iBAAA;EACA,gBAAA;EACA,kBAAA;EACA,YAAA;EACA,eAAA;EACA,uBAAA;EACA,oBAAA;EACA,mBAAA;EACA,0BAAA;EACA,oBAAA;CxCqxJD;AwClxJC;EACE,cAAA;CxCoxJH;AwChxJC;EACE,mBAAA;EACA,UAAA;CxCkxJH;AwC/wJC;;EAEE,OAAA;EACA,iBAAA;CxCixJH;AwC5wJG;;EAEE,YAAA;EACA,sBAAA;EACA,gBAAA;CxC8wJL;AwCzwJC;;EAEE,eAAA;EACA,uBAAA;CxC2wJH;AwCxwJC;EACE,aAAA;CxC0wJH;AwCvwJC;EACE,kBAAA;CxCywJH;AwCtwJC;EACE,iBAAA;CxCwwJH;AyCl0JD;EACE,kBAAA;EACA,qBAAA;EACA,oBAAA;EACA,eAAA;EACA,0BAAA;CzCo0JD;AyCz0JD;;EASI,eAAA;CzCo0JH;AyC70JD;EAaI,oBAAA;EACA,gBAAA;EACA,iBAAA;CzCm0JH;AyCl1JD;EAmBI,0BAAA;CzCk0JH;AyC/zJC;;EAEE,mBAAA;EACA,mBAAA;EACA,oBAAA;CzCi0JH;AyC31JD;EA8BI,gBAAA;CzCg0JH;AyC9yJD;EACA;IAfI,kBAAA;IACA,qBAAA;GzCg0JD;EyC9zJC;;IAEE,mBAAA;IACA,oBAAA;GzCg0JH;EyCvzJH;;IAJM,gBAAA;GzC+zJH;CACF;A0C52JD;EACE,eAAA;EACA,aAAA;EACA,oBAAA;EACA,wBAAA;EACA,uBAAA;EACA,uBAAA;EACA,mBAAA;ErCiLA,4CAAA;EACK,uCAAA;EACG,oCAAA;CL8rJT;A0Cx3JD;;EAaI,kBAAA;EACA,mBAAA;C1C+2JH;A0C32JC;;;EAGE,sBAAA;C1C62JH;A0Cl4JD;EA0BI,aAAA;EACA,eAAA;C1C22JH;A2Cp4JD;EACE,cAAA;EACA,oBAAA;EACA,8BAAA;EACA,mBAAA;C3Cs4JD;A2C14JD;EAQI,cAAA;EAEA,eAAA;C3Co4JH;A2C94JD;EAeI,kBAAA;C3Ck4JH;A2Cj5JD;;EAqBI,iBAAA;C3Cg4JH;A2Cr5JD;EAyBI,gBAAA;C3C+3JH;A2Cv3JD;;EAEE,oBAAA;C3Cy3JD;A2C33JD;;EAMI,mBAAA;EACA,UAAA;EACA,aAAA;EACA,eAAA;C3Cy3JH;A2Cj3JD;ECvDE,0BAAA;EACA,sBAAA;EACA,eAAA;C5C26JD;A2Ct3JD;EClDI,0BAAA;C5C26JH;A2Cz3JD;EC/CI,eAAA;C5C26JH;A2Cx3JD;EC3DE,0BAAA;EACA,sBAAA;EACA,eAAA;C5Cs7JD;A2C73JD;ECtDI,0BAAA;C5Cs7JH;A2Ch4JD;ECnDI,eAAA;C5Cs7JH;A2C/3JD;EC/DE,0BAAA;EACA,sBAAA;EACA,eAAA;C5Ci8JD;A2Cp4JD;EC1DI,0BAAA;C5Ci8JH;A2Cv4JD;ECvDI,eAAA;C5Ci8JH;A2Ct4JD;ECnEE,0BAAA;EACA,sBAAA;EACA,eAAA;C5C48JD;A2C34JD;EC9DI,0BAAA;C5C48JH;A2C94JD;EC3DI,eAAA;C5C48JH;A6C98JD;EACE;IAAQ,4BAAA;G7Ci9JP;E6Ch9JD;IAAQ,yBAAA;G7Cm9JP;CACF;A6Ch9JD;EACE;IAAQ,4BAAA;G7Cm9JP;E6Cl9JD;IAAQ,yBAAA;G7Cq9JP;CACF;A6Cx9JD;EACE;IAAQ,4BAAA;G7Cm9JP;E6Cl9JD;IAAQ,yBAAA;G7Cq9JP;CACF;A6C98JD;EACE,iBAAA;EACA,aAAA;EACA,oBAAA;EACA,0BAAA;EACA,mBAAA;ExCsCA,uDAAA;EACQ,+CAAA;CL26JT;A6C78JD;EACE,YAAA;EACA,UAAA;EACA,aAAA;EACA,gBAAA;EACA,kBAAA;EACA,YAAA;EACA,mBAAA;EACA,0BAAA;ExCyBA,uDAAA;EACQ,+CAAA;EAyHR,oCAAA;EACK,+BAAA;EACG,4BAAA;CL+zJT;A6C18JD;;ECCI,8MAAA;EACA,yMAAA;EACA,sMAAA;EDAF,mCAAA;UAAA,2BAAA;C7C88JD;A6Cv8JD;;ExC5CE,2DAAA;EACK,sDAAA;EACG,mDAAA;CLu/JT;A6Cp8JD;EErEE,0BAAA;C/C4gKD;A+CzgKC;EDgDE,8MAAA;EACA,yMAAA;EACA,sMAAA;C9C49JH;A6Cx8JD;EEzEE,0BAAA;C/CohKD;A+CjhKC;EDgDE,8MAAA;EACA,yMAAA;EACA,sMAAA;C9Co+JH;A6C58JD;EE7EE,0BAAA;C/C4hKD;A+CzhKC;EDgDE,8MAAA;EACA,yMAAA;EACA,sMAAA;C9C4+JH;A6Ch9JD;EEjFE,0BAAA;C/CoiKD;A+CjiKC;EDgDE,8MAAA;EACA,yMAAA;EACA,sMAAA;C9Co/JH;AgD5iKD;EAEE,iBAAA;ChD6iKD;AgD3iKC;EACE,cAAA;ChD6iKH;AgDziKD;;EAEE,QAAA;EACA,iBAAA;ChD2iKD;AgDxiKD;EACE,eAAA;ChD0iKD;AgDviKD;EACE,eAAA;ChDyiKD;AgDtiKC;EACE,gBAAA;ChDwiKH;AgDpiKD;;EAEE,mBAAA;ChDsiKD;AgDniKD;;EAEE,oBAAA;ChDqiKD;AgDliKD;;;EAGE,oBAAA;EACA,oBAAA;ChDoiKD;AgDjiKD;EACE,uBAAA;ChDmiKD;AgDhiKD;EACE,uBAAA;ChDkiKD;AgD9hKD;EACE,cAAA;EACA,mBAAA;ChDgiKD;AgD1hKD;EACE,gBAAA;EACA,iBAAA;ChD4hKD;AiDnlKD;EAEE,oBAAA;EACA,gBAAA;CjDolKD;AiD5kKD;EACE,mBAAA;EACA,eAAA;EACA,mBAAA;EAEA,oBAAA;EACA,uBAAA;EACA,uBAAA;CjD6kKD;AiD1kKC;ErB3BA,6BAAA;EACC,4BAAA;C5BwmKF;AiD3kKC;EACE,iBAAA;ErBvBF,gCAAA;EACC,+BAAA;C5BqmKF;AiDpkKD;;EAEE,YAAA;CjDskKD;AiDxkKD;;EAKI,YAAA;CjDukKH;AiDnkKC;;;;EAEE,sBAAA;EACA,YAAA;EACA,0BAAA;CjDukKH;AiDnkKD;EACE,YAAA;EACA,iBAAA;CjDqkKD;AiDhkKC;;;EAGE,0BAAA;EACA,eAAA;EACA,oBAAA;CjDkkKH;AiDvkKC;;;EASI,eAAA;CjDmkKL;AiD5kKC;;;EAYI,eAAA;CjDqkKL;AiDhkKC;;;EAGE,WAAA;EACA,YAAA;EACA,0BAAA;EACA,sBAAA;CjDkkKH;AiDxkKC;;;;;;;;;EAYI,eAAA;CjDukKL;AiDnlKC;;;EAeI,eAAA;CjDykKL;AkD3qKC;EACE,eAAA;EACA,0BAAA;ClD6qKH;AkD3qKG;;EAEE,eAAA;ClD6qKL;AkD/qKG;;EAKI,eAAA;ClD8qKP;AkD3qKK;;;;EAEE,eAAA;EACA,0BAAA;ClD+qKP;AkD7qKK;;;;;;EAGE,YAAA;EACA,0BAAA;EACA,sBAAA;ClDkrKP;AkDxsKC;EACE,eAAA;EACA,0BAAA;ClD0sKH;AkDxsKG;;EAEE,eAAA;ClD0sKL;AkD5sKG;;EAKI,eAAA;ClD2sKP;AkDxsKK;;;;EAEE,eAAA;EACA,0BAAA;ClD4sKP;AkD1sKK;;;;;;EAGE,YAAA;EACA,0BAAA;EACA,sBAAA;ClD+sKP;AkDruKC;EACE,eAAA;EACA,0BAAA;ClDuuKH;AkDruKG;;EAEE,eAAA;ClDuuKL;AkDzuKG;;EAKI,eAAA;ClDwuKP;AkDruKK;;;;EAEE,eAAA;EACA,0BAAA;ClDyuKP;AkDvuKK;;;;;;EAGE,YAAA;EACA,0BAAA;EACA,sBAAA;ClD4uKP;AkDlwKC;EACE,eAAA;EACA,0BAAA;ClDowKH;AkDlwKG;;EAEE,eAAA;ClDowKL;AkDtwKG;;EAKI,eAAA;ClDqwKP;AkDlwKK;;;;EAEE,eAAA;EACA,0BAAA;ClDswKP;AkDpwKK;;;;;;EAGE,YAAA;EACA,0BAAA;EACA,sBAAA;ClDywKP;AiDxqKD;EACE,cAAA;EACA,mBAAA;CjD0qKD;AiDxqKD;EACE,iBAAA;EACA,iBAAA;CjD0qKD;AmDpyKD;EACE,oBAAA;EACA,uBAAA;EACA,8BAAA;EACA,mBAAA;E9C0DA,kDAAA;EACQ,0CAAA;CL6uKT;AmDnyKD;EACE,cAAA;CnDqyKD;AmDhyKD;EACE,mBAAA;EACA,qCAAA;EvBpBA,6BAAA;EACC,4BAAA;C5BuzKF;AmDtyKD;EAMI,eAAA;CnDmyKH;AmD9xKD;EACE,cAAA;EACA,iBAAA;EACA,gBAAA;EACA,eAAA;CnDgyKD;AmDpyKD;;;;;EAWI,eAAA;CnDgyKH;AmD3xKD;EACE,mBAAA;EACA,0BAAA;EACA,2BAAA;EvBxCA,gCAAA;EACC,+BAAA;C5Bs0KF;AmDrxKD;;EAGI,iBAAA;CnDsxKH;AmDzxKD;;EAMM,oBAAA;EACA,iBAAA;CnDuxKL;AmDnxKG;;EAEI,cAAA;EvBvEN,6BAAA;EACC,4BAAA;C5B61KF;AmDjxKG;;EAEI,iBAAA;EvBvEN,gCAAA;EACC,+BAAA;C5B21KF;AmD1yKD;EvB1DE,2BAAA;EACC,0BAAA;C5Bu2KF;AmD7wKD;EAEI,oBAAA;CnD8wKH;AmD3wKD;EACE,oBAAA;CnD6wKD;AmDrwKD;;;EAII,iBAAA;CnDswKH;AmD1wKD;;;EAOM,mBAAA;EACA,oBAAA;CnDwwKL;AmDhxKD;;EvBzGE,6BAAA;EACC,4BAAA;C5B63KF;AmDrxKD;;;;EAmBQ,4BAAA;EACA,6BAAA;CnDwwKP;AmD5xKD;;;;;;;;EAwBU,4BAAA;CnD8wKT;AmDtyKD;;;;;;;;EA4BU,6BAAA;CnDoxKT;AmDhzKD;;EvBjGE,gCAAA;EACC,+BAAA;C5Bq5KF;AmDrzKD;;;;EAyCQ,+BAAA;EACA,gCAAA;CnDkxKP;AmD5zKD;;;;;;;;EA8CU,+BAAA;CnDwxKT;AmDt0KD;;;;;;;;EAkDU,gCAAA;CnD8xKT;AmDh1KD;;;;EA2DI,2BAAA;CnD2xKH;AmDt1KD;;EA+DI,cAAA;CnD2xKH;AmD11KD;;EAmEI,UAAA;CnD2xKH;AmD91KD;;;;;;;;;;;;EA0EU,eAAA;CnDkyKT;AmD52KD;;;;;;;;;;;;EA8EU,gBAAA;CnD4yKT;AmD13KD;;;;;;;;EAuFU,iBAAA;CnD6yKT;AmDp4KD;;;;;;;;EAgGU,iBAAA;CnD8yKT;AmD94KD;EAsGI,UAAA;EACA,iBAAA;CnD2yKH;AmDjyKD;EACE,oBAAA;CnDmyKD;AmDpyKD;EAKI,iBAAA;EACA,mBAAA;CnDkyKH;AmDxyKD;EASM,gBAAA;CnDkyKL;AmD3yKD;EAcI,iBAAA;CnDgyKH;AmD9yKD;;EAkBM,2BAAA;CnDgyKL;AmDlzKD;EAuBI,cAAA;CnD8xKH;AmDrzKD;EAyBM,8BAAA;CnD+xKL;AmDxxKD;EC1PE,mBAAA;CpDqhLD;AoDnhLC;EACE,eAAA;EACA,0BAAA;EACA,mBAAA;CpDqhLH;AoDxhLC;EAMI,uBAAA;CpDqhLL;AoD3hLC;EASI,eAAA;EACA,0BAAA;CpDqhLL;AoDlhLC;EAEI,0BAAA;CpDmhLL;AmDvyKD;EC7PE,sBAAA;CpDuiLD;AoDriLC;EACE,YAAA;EACA,0BAAA;EACA,sBAAA;CpDuiLH;AoD1iLC;EAMI,0BAAA;CpDuiLL;AoD7iLC;EASI,eAAA;EACA,uBAAA;CpDuiLL;AoDpiLC;EAEI,6BAAA;CpDqiLL;AmDtzKD;EChQE,sBAAA;CpDyjLD;AoDvjLC;EACE,eAAA;EACA,0BAAA;EACA,sBAAA;CpDyjLH;AoD5jLC;EAMI,0BAAA;CpDyjLL;AoD/jLC;EASI,eAAA;EACA,0BAAA;CpDyjLL;AoDtjLC;EAEI,6BAAA;CpDujLL;AmDr0KD;ECnQE,sBAAA;CpD2kLD;AoDzkLC;EACE,eAAA;EACA,0BAAA;EACA,sBAAA;CpD2kLH;AoD9kLC;EAMI,0BAAA;CpD2kLL;AoDjlLC;EASI,eAAA;EACA,0BAAA;CpD2kLL;AoDxkLC;EAEI,6BAAA;CpDykLL;AmDp1KD;ECtQE,sBAAA;CpD6lLD;AoD3lLC;EACE,eAAA;EACA,0BAAA;EACA,sBAAA;CpD6lLH;AoDhmLC;EAMI,0BAAA;CpD6lLL;AoDnmLC;EASI,eAAA;EACA,0BAAA;CpD6lLL;AoD1lLC;EAEI,6BAAA;CpD2lLL;AmDn2KD;ECzQE,sBAAA;CpD+mLD;AoD7mLC;EACE,eAAA;EACA,0BAAA;EACA,sBAAA;CpD+mLH;AoDlnLC;EAMI,0BAAA;CpD+mLL;AoDrnLC;EASI,eAAA;EACA,0BAAA;CpD+mLL;AoD5mLC;EAEI,6BAAA;CpD6mLL;AqD7nLD;EACE,mBAAA;EACA,eAAA;EACA,UAAA;EACA,WAAA;EACA,iBAAA;CrD+nLD;AqDpoLD;;;;;EAYI,mBAAA;EACA,OAAA;EACA,QAAA;EACA,UAAA;EACA,aAAA;EACA,YAAA;EACA,UAAA;CrD+nLH;AqD1nLD;EACE,uBAAA;CrD4nLD;AqDxnLD;EACE,oBAAA;CrD0nLD;AsDrpLD;EACE,iBAAA;EACA,cAAA;EACA,oBAAA;EACA,0BAAA;EACA,0BAAA;EACA,mBAAA;EjDwDA,wDAAA;EACQ,gDAAA;CLgmLT;AsD/pLD;EASI,mBAAA;EACA,kCAAA;CtDypLH;AsDppLD;EACE,cAAA;EACA,mBAAA;CtDspLD;AsDppLD;EACE,aAAA;EACA,mBAAA;CtDspLD;AuD5qLD;EACE,aAAA;EACA,gBAAA;EACA,kBAAA;EACA,eAAA;EACA,YAAA;EACA,0BAAA;EjCRA,aAAA;EAGA,0BAAA;CtBqrLD;AuD7qLC;;EAEE,YAAA;EACA,sBAAA;EACA,gBAAA;EjCfF,aAAA;EAGA,0BAAA;CtB6rLD;AuDzqLC;EACE,WAAA;EACA,gBAAA;EACA,wBAAA;EACA,UAAA;EACA,yBAAA;CvD2qLH;AwDhsLD;EACE,iBAAA;CxDksLD;AwD9rLD;EACE,cAAA;EACA,iBAAA;EACA,gBAAA;EACA,OAAA;EACA,SAAA;EACA,UAAA;EACA,QAAA;EACA,cAAA;EACA,kCAAA;EAIA,WAAA;CxD6rLD;AwD1rLC;EnD+GA,sCAAA;EACI,kCAAA;EACC,iCAAA;EACG,8BAAA;EAkER,oDAAA;EAEK,0CAAA;EACG,oCAAA;CL6gLT;AwDhsLC;EnD2GA,mCAAA;EACI,+BAAA;EACC,8BAAA;EACG,2BAAA;CLwlLT;AwDpsLD;EACE,mBAAA;EACA,iBAAA;CxDssLD;AwDlsLD;EACE,mBAAA;EACA,YAAA;EACA,aAAA;CxDosLD;AwDhsLD;EACE,mBAAA;EACA,uBAAA;EACA,uBAAA;EACA,qCAAA;EACA,mBAAA;EnDaA,iDAAA;EACQ,yCAAA;EmDZR,qCAAA;UAAA,6BAAA;EAEA,WAAA;CxDksLD;AwD9rLD;EACE,gBAAA;EACA,OAAA;EACA,SAAA;EACA,UAAA;EACA,QAAA;EACA,cAAA;EACA,uBAAA;CxDgsLD;AwD9rLC;ElCrEA,WAAA;EAGA,yBAAA;CtBowLD;AwDjsLC;ElCtEA,aAAA;EAGA,0BAAA;CtBwwLD;AwDhsLD;EACE,cAAA;EACA,iCAAA;CxDksLD;AwD9rLD;EACE,iBAAA;CxDgsLD;AwD5rLD;EACE,UAAA;EACA,wBAAA;CxD8rLD;AwDzrLD;EACE,mBAAA;EACA,cAAA;CxD2rLD;AwDvrLD;EACE,cAAA;EACA,kBAAA;EACA,8BAAA;CxDyrLD;AwD5rLD;EAQI,iBAAA;EACA,iBAAA;CxDurLH;AwDhsLD;EAaI,kBAAA;CxDsrLH;AwDnsLD;EAiBI,eAAA;CxDqrLH;AwDhrLD;EACE,mBAAA;EACA,aAAA;EACA,YAAA;EACA,aAAA;EACA,iBAAA;CxDkrLD;AwDhqLD;EAZE;IACE,aAAA;IACA,kBAAA;GxD+qLD;EwD7qLD;InDvEA,kDAAA;IACQ,0CAAA;GLuvLP;EwD5qLD;IAAY,aAAA;GxD+qLX;CACF;AwD1qLD;EAFE;IAAY,aAAA;GxDgrLX;CACF;AyD/zLD;EACE,mBAAA;EACA,cAAA;EACA,eAAA;ECRA,4DAAA;EAEA,mBAAA;EACA,oBAAA;EACA,uBAAA;EACA,iBAAA;EACA,wBAAA;EACA,iBAAA;EACA,kBAAA;EACA,sBAAA;EACA,kBAAA;EACA,qBAAA;EACA,oBAAA;EACA,mBAAA;EACA,qBAAA;EACA,kBAAA;EDHA,gBAAA;EnCVA,WAAA;EAGA,yBAAA;CtBs1LD;AyD30LC;EnCdA,aAAA;EAGA,0BAAA;CtB01LD;AyD90LC;EAAW,iBAAA;EAAmB,eAAA;CzDk1L/B;AyDj1LC;EAAW,iBAAA;EAAmB,eAAA;CzDq1L/B;AyDp1LC;EAAW,gBAAA;EAAmB,eAAA;CzDw1L/B;AyDv1LC;EAAW,kBAAA;EAAmB,eAAA;CzD21L/B;AyDv1LD;EACE,iBAAA;EACA,iBAAA;EACA,YAAA;EACA,mBAAA;EACA,uBAAA;EACA,mBAAA;CzDy1LD;AyDr1LD;EACE,mBAAA;EACA,SAAA;EACA,UAAA;EACA,0BAAA;EACA,oBAAA;CzDu1LD;AyDn1LC;EACE,UAAA;EACA,UAAA;EACA,kBAAA;EACA,wBAAA;EACA,uBAAA;CzDq1LH;AyDn1LC;EACE,UAAA;EACA,WAAA;EACA,oBAAA;EACA,wBAAA;EACA,uBAAA;CzDq1LH;AyDn1LC;EACE,UAAA;EACA,UAAA;EACA,oBAAA;EACA,wBAAA;EACA,uBAAA;CzDq1LH;AyDn1LC;EACE,SAAA;EACA,QAAA;EACA,iBAAA;EACA,4BAAA;EACA,yBAAA;CzDq1LH;AyDn1LC;EACE,SAAA;EACA,SAAA;EACA,iBAAA;EACA,4BAAA;EACA,wBAAA;CzDq1LH;AyDn1LC;EACE,OAAA;EACA,UAAA;EACA,kBAAA;EACA,wBAAA;EACA,0BAAA;CzDq1LH;AyDn1LC;EACE,OAAA;EACA,WAAA;EACA,iBAAA;EACA,wBAAA;EACA,0BAAA;CzDq1LH;AyDn1LC;EACE,OAAA;EACA,UAAA;EACA,iBAAA;EACA,wBAAA;EACA,0BAAA;CzDq1LH;A2Dl7LD;EACE,mBAAA;EACA,OAAA;EACA,QAAA;EACA,cAAA;EACA,cAAA;EACA,iBAAA;EACA,aAAA;EDXA,4DAAA;EAEA,mBAAA;EACA,oBAAA;EACA,uBAAA;EACA,iBAAA;EACA,wBAAA;EACA,iBAAA;EACA,kBAAA;EACA,sBAAA;EACA,kBAAA;EACA,qBAAA;EACA,oBAAA;EACA,mBAAA;EACA,qBAAA;EACA,kBAAA;ECAA,gBAAA;EAEA,uBAAA;EACA,qCAAA;UAAA,6BAAA;EACA,uBAAA;EACA,qCAAA;EACA,mBAAA;EtD8CA,kDAAA;EACQ,0CAAA;CLk5LT;A2D77LC;EAAY,kBAAA;C3Dg8Lb;A2D/7LC;EAAY,kBAAA;C3Dk8Lb;A2Dj8LC;EAAY,iBAAA;C3Do8Lb;A2Dn8LC;EAAY,mBAAA;C3Ds8Lb;A2Dn8LD;EACE,UAAA;EACA,kBAAA;EACA,gBAAA;EACA,0BAAA;EACA,iCAAA;EACA,2BAAA;C3Dq8LD;A2Dl8LD;EACE,kBAAA;C3Do8LD;A2D57LC;;EAEE,mBAAA;EACA,eAAA;EACA,SAAA;EACA,UAAA;EACA,0BAAA;EACA,oBAAA;C3D87LH;A2D37LD;EACE,mBAAA;C3D67LD;A2D37LD;EACE,mBAAA;EACA,YAAA;C3D67LD;A2Dz7LC;EACE,UAAA;EACA,mBAAA;EACA,uBAAA;EACA,0BAAA;EACA,sCAAA;EACA,cAAA;C3D27LH;A2D17LG;EACE,aAAA;EACA,YAAA;EACA,mBAAA;EACA,uBAAA;EACA,uBAAA;C3D47LL;A2Dz7LC;EACE,SAAA;EACA,YAAA;EACA,kBAAA;EACA,qBAAA;EACA,4BAAA;EACA,wCAAA;C3D27LH;A2D17LG;EACE,aAAA;EACA,UAAA;EACA,cAAA;EACA,qBAAA;EACA,yBAAA;C3D47LL;A2Dz7LC;EACE,UAAA;EACA,mBAAA;EACA,oBAAA;EACA,6BAAA;EACA,yCAAA;EACA,WAAA;C3D27LH;A2D17LG;EACE,aAAA;EACA,SAAA;EACA,mBAAA;EACA,oBAAA;EACA,0BAAA;C3D47LL;A2Dx7LC;EACE,SAAA;EACA,aAAA;EACA,kBAAA;EACA,sBAAA;EACA,2BAAA;EACA,uCAAA;C3D07LH;A2Dz7LG;EACE,aAAA;EACA,WAAA;EACA,sBAAA;EACA,wBAAA;EACA,cAAA;C3D27LL;A4DpjMD;EACE,mBAAA;C5DsjMD;A4DnjMD;EACE,mBAAA;EACA,iBAAA;EACA,YAAA;C5DqjMD;A4DxjMD;EAMI,cAAA;EACA,mBAAA;EvD6KF,0CAAA;EACK,qCAAA;EACG,kCAAA;CLy4LT;A4D/jMD;;EAcM,eAAA;C5DqjML;A4D3hMC;EA4NF;IvD3DE,uDAAA;IAEK,6CAAA;IACG,uCAAA;IA7JR,oCAAA;IAEQ,4BAAA;IA+GR,4BAAA;IAEQ,oBAAA;GL86LP;E4DzjMG;;IvDmHJ,2CAAA;IACQ,mCAAA;IuDjHF,QAAA;G5D4jML;E4D1jMG;;IvD8GJ,4CAAA;IACQ,oCAAA;IuD5GF,QAAA;G5D6jML;E4D3jMG;;;IvDyGJ,wCAAA;IACQ,gCAAA;IuDtGF,QAAA;G5D8jML;CACF;A4DpmMD;;;EA6CI,eAAA;C5D4jMH;A4DzmMD;EAiDI,QAAA;C5D2jMH;A4D5mMD;;EAsDI,mBAAA;EACA,OAAA;EACA,YAAA;C5D0jMH;A4DlnMD;EA4DI,WAAA;C5DyjMH;A4DrnMD;EA+DI,YAAA;C5DyjMH;A4DxnMD;;EAmEI,QAAA;C5DyjMH;A4D5nMD;EAuEI,YAAA;C5DwjMH;A4D/nMD;EA0EI,WAAA;C5DwjMH;A4DhjMD;EACE,mBAAA;EACA,OAAA;EACA,QAAA;EACA,UAAA;EACA,WAAA;EtC9FA,aAAA;EAGA,0BAAA;EsC6FA,gBAAA;EACA,YAAA;EACA,mBAAA;EACA,0CAAA;EACA,mCAAA;C5DmjMD;A4D9iMC;EdnGE,mGAAA;EACA,8FAAA;EACA,qHAAA;EAAA,+FAAA;EACA,4BAAA;EACA,uHAAA;C9CopMH;A4DljMC;EACE,WAAA;EACA,SAAA;EdxGA,mGAAA;EACA,8FAAA;EACA,qHAAA;EAAA,+FAAA;EACA,4BAAA;EACA,uHAAA;C9C6pMH;A4DpjMC;;EAEE,WAAA;EACA,YAAA;EACA,sBAAA;EtCvHF,aAAA;EAGA,0BAAA;CtB4qMD;A4DtlMD;;;;EAuCI,mBAAA;EACA,SAAA;EACA,kBAAA;EACA,WAAA;EACA,sBAAA;C5DqjMH;A4DhmMD;;EA+CI,UAAA;EACA,mBAAA;C5DqjMH;A4DrmMD;;EAoDI,WAAA;EACA,oBAAA;C5DqjMH;A4D1mMD;;EAyDI,YAAA;EACA,aAAA;EACA,eAAA;EACA,mBAAA;C5DqjMH;A4DhjMG;EACE,iBAAA;C5DkjML;A4D9iMG;EACE,iBAAA;C5DgjML;A4DtiMD;EACE,mBAAA;EACA,aAAA;EACA,UAAA;EACA,YAAA;EACA,WAAA;EACA,kBAAA;EACA,gBAAA;EACA,iBAAA;EACA,mBAAA;C5DwiMD;A4DjjMD;EAYI,sBAAA;EACA,YAAA;EACA,aAAA;EACA,YAAA;EACA,oBAAA;EACA,uBAAA;EACA,oBAAA;EACA,gBAAA;EAWA,0BAAA;EACA,mCAAA;C5D8hMH;A4D7jMD;EAkCI,UAAA;EACA,YAAA;EACA,aAAA;EACA,uBAAA;C5D8hMH;A4DvhMD;EACE,mBAAA;EACA,UAAA;EACA,WAAA;EACA,aAAA;EACA,YAAA;EACA,kBAAA;EACA,qBAAA;EACA,YAAA;EACA,mBAAA;EACA,0CAAA;C5DyhMD;A4DxhMC;EACE,kBAAA;C5D0hMH;A4Dj/LD;EAhCE;;;;IAKI,YAAA;IACA,aAAA;IACA,kBAAA;IACA,gBAAA;G5DmhMH;E4D3hMD;;IAYI,mBAAA;G5DmhMH;E4D/hMD;;IAgBI,oBAAA;G5DmhMH;E4D9gMD;IACE,UAAA;IACA,WAAA;IACA,qBAAA;G5DghMD;E4D5gMD;IACE,aAAA;G5D8gMD;CACF;A6D7wMC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAEE,aAAA;EACA,eAAA;C7D6yMH;A6D3yMC;;;;;;;;;;;;;;;;EACE,YAAA;C7D4zMH;AiCp0MD;E6BRE,eAAA;EACA,kBAAA;EACA,mBAAA;C9D+0MD;AiCt0MD;EACE,wBAAA;CjCw0MD;AiCt0MD;EACE,uBAAA;CjCw0MD;AiCh0MD;EACE,yBAAA;CjCk0MD;AiCh0MD;EACE,0BAAA;CjCk0MD;AiCh0MD;EACE,mBAAA;CjCk0MD;AiCh0MD;E8BzBE,YAAA;EACA,mBAAA;EACA,kBAAA;EACA,8BAAA;EACA,UAAA;C/D41MD;AiC9zMD;EACE,yBAAA;CjCg0MD;AiCzzMD;EACE,gBAAA;CjC2zMD;AgE51MD;EACE,oBAAA;ChE81MD;AgEx1MD;;;;ECdE,yBAAA;CjE42MD;AgEv1MD;;;;;;;;;;;;EAYE,yBAAA;ChEy1MD;AgEl1MD;EA6IA;IC7LE,0BAAA;GjEs4MC;EiEr4MD;IAAU,0BAAA;GjEw4MT;EiEv4MD;IAAU,8BAAA;GjE04MT;EiEz4MD;;IACU,+BAAA;GjE44MT;CACF;AgE51MD;EAwIA;IA1II,0BAAA;GhEk2MD;CACF;AgE51MD;EAmIA;IArII,2BAAA;GhEk2MD;CACF;AgE51MD;EA8HA;IAhII,iCAAA;GhEk2MD;CACF;AgE31MD;EAwHA;IC7LE,0BAAA;GjEo6MC;EiEn6MD;IAAU,0BAAA;GjEs6MT;EiEr6MD;IAAU,8BAAA;GjEw6MT;EiEv6MD;;IACU,+BAAA;GjE06MT;CACF;AgEr2MD;EAmHA;IArHI,0BAAA;GhE22MD;CACF;AgEr2MD;EA8GA;IAhHI,2BAAA;GhE22MD;CACF;AgEr2MD;EAyGA;IA3GI,iCAAA;GhE22MD;CACF;AgEp2MD;EAmGA;IC7LE,0BAAA;GjEk8MC;EiEj8MD;IAAU,0BAAA;GjEo8MT;EiEn8MD;IAAU,8BAAA;GjEs8MT;EiEr8MD;;IACU,+BAAA;GjEw8MT;CACF;AgE92MD;EA8FA;IAhGI,0BAAA;GhEo3MD;CACF;AgE92MD;EAyFA;IA3FI,2BAAA;GhEo3MD;CACF;AgE92MD;EAoFA;IAtFI,iCAAA;GhEo3MD;CACF;AgE72MD;EA8EA;IC7LE,0BAAA;GjEg+MC;EiE/9MD;IAAU,0BAAA;GjEk+MT;EiEj+MD;IAAU,8BAAA;GjEo+MT;EiEn+MD;;IACU,+BAAA;GjEs+MT;CACF;AgEv3MD;EAyEA;IA3EI,0BAAA;GhE63MD;CACF;AgEv3MD;EAoEA;IAtEI,2BAAA;GhE63MD;CACF;AgEv3MD;EA+DA;IAjEI,iCAAA;GhE63MD;CACF;AgEt3MD;EAyDA;ICrLE,yBAAA;GjEs/MC;CACF;AgEt3MD;EAoDA;ICrLE,yBAAA;GjE2/MC;CACF;AgEt3MD;EA+CA;ICrLE,yBAAA;GjEggNC;CACF;AgEt3MD;EA0CA;ICrLE,yBAAA;GjEqgNC;CACF;AgEn3MD;ECnJE,yBAAA;CjEygND;AgEh3MD;EA4BA;IC7LE,0BAAA;GjEqhNC;EiEphND;IAAU,0BAAA;GjEuhNT;EiEthND;IAAU,8BAAA;GjEyhNT;EiExhND;;IACU,+BAAA;GjE2hNT;CACF;AgE93MD;EACE,yBAAA;ChEg4MD;AgE33MD;EAqBA;IAvBI,0BAAA;GhEi4MD;CACF;AgE/3MD;EACE,yBAAA;ChEi4MD;AgE53MD;EAcA;IAhBI,2BAAA;GhEk4MD;CACF;AgEh4MD;EACE,yBAAA;ChEk4MD;AgE73MD;EAOA;IATI,iCAAA;GhEm4MD;CACF;AgE53MD;EACA;ICrLE,yBAAA;GjEojNC;CACF","file":"bootstrap.css","sourcesContent":["/*!\n * Bootstrap v3.3.7 (http://getbootstrap.com)\n * Copyright 2011-2016 Twitter, Inc.\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n */\n/*! normalize.css v3.0.3 | MIT License | github.com/necolas/normalize.css */\nhtml {\n font-family: sans-serif;\n -ms-text-size-adjust: 100%;\n -webkit-text-size-adjust: 100%;\n}\nbody {\n margin: 0;\n}\narticle,\naside,\ndetails,\nfigcaption,\nfigure,\nfooter,\nheader,\nhgroup,\nmain,\nmenu,\nnav,\nsection,\nsummary {\n display: block;\n}\naudio,\ncanvas,\nprogress,\nvideo {\n display: inline-block;\n vertical-align: baseline;\n}\naudio:not([controls]) {\n display: none;\n height: 0;\n}\n[hidden],\ntemplate {\n display: none;\n}\na {\n background-color: transparent;\n}\na:active,\na:hover {\n outline: 0;\n}\nabbr[title] {\n border-bottom: 1px dotted;\n}\nb,\nstrong {\n font-weight: bold;\n}\ndfn {\n font-style: italic;\n}\nh1 {\n font-size: 2em;\n margin: 0.67em 0;\n}\nmark {\n background: #ff0;\n color: #000;\n}\nsmall {\n font-size: 80%;\n}\nsub,\nsup {\n font-size: 75%;\n line-height: 0;\n position: relative;\n vertical-align: baseline;\n}\nsup {\n top: -0.5em;\n}\nsub {\n bottom: -0.25em;\n}\nimg {\n border: 0;\n}\nsvg:not(:root) {\n overflow: hidden;\n}\nfigure {\n margin: 1em 40px;\n}\nhr {\n box-sizing: content-box;\n height: 0;\n}\npre {\n overflow: auto;\n}\ncode,\nkbd,\npre,\nsamp {\n font-family: monospace, monospace;\n font-size: 1em;\n}\nbutton,\ninput,\noptgroup,\nselect,\ntextarea {\n color: inherit;\n font: inherit;\n margin: 0;\n}\nbutton {\n overflow: visible;\n}\nbutton,\nselect {\n text-transform: none;\n}\nbutton,\nhtml input[type=\"button\"],\ninput[type=\"reset\"],\ninput[type=\"submit\"] {\n -webkit-appearance: button;\n cursor: pointer;\n}\nbutton[disabled],\nhtml input[disabled] {\n cursor: default;\n}\nbutton::-moz-focus-inner,\ninput::-moz-focus-inner {\n border: 0;\n padding: 0;\n}\ninput {\n line-height: normal;\n}\ninput[type=\"checkbox\"],\ninput[type=\"radio\"] {\n box-sizing: border-box;\n padding: 0;\n}\ninput[type=\"number\"]::-webkit-inner-spin-button,\ninput[type=\"number\"]::-webkit-outer-spin-button {\n height: auto;\n}\ninput[type=\"search\"] {\n -webkit-appearance: textfield;\n box-sizing: content-box;\n}\ninput[type=\"search\"]::-webkit-search-cancel-button,\ninput[type=\"search\"]::-webkit-search-decoration {\n -webkit-appearance: none;\n}\nfieldset {\n border: 1px solid #c0c0c0;\n margin: 0 2px;\n padding: 0.35em 0.625em 0.75em;\n}\nlegend {\n border: 0;\n padding: 0;\n}\ntextarea {\n overflow: auto;\n}\noptgroup {\n font-weight: bold;\n}\ntable {\n border-collapse: collapse;\n border-spacing: 0;\n}\ntd,\nth {\n padding: 0;\n}\n/*! Source: https://github.com/h5bp/html5-boilerplate/blob/master/src/css/main.css */\n@media print {\n *,\n *:before,\n *:after {\n background: transparent !important;\n color: #000 !important;\n box-shadow: none !important;\n text-shadow: none !important;\n }\n a,\n a:visited {\n text-decoration: underline;\n }\n a[href]:after {\n content: \" (\" attr(href) \")\";\n }\n abbr[title]:after {\n content: \" (\" attr(title) \")\";\n }\n a[href^=\"#\"]:after,\n a[href^=\"javascript:\"]:after {\n content: \"\";\n }\n pre,\n blockquote {\n border: 1px solid #999;\n page-break-inside: avoid;\n }\n thead {\n display: table-header-group;\n }\n tr,\n img {\n page-break-inside: avoid;\n }\n img {\n max-width: 100% !important;\n }\n p,\n h2,\n h3 {\n orphans: 3;\n widows: 3;\n }\n h2,\n h3 {\n page-break-after: avoid;\n }\n .navbar {\n display: none;\n }\n .btn > .caret,\n .dropup > .btn > .caret {\n border-top-color: #000 !important;\n }\n .label {\n border: 1px solid #000;\n }\n .table {\n border-collapse: collapse !important;\n }\n .table td,\n .table th {\n background-color: #fff !important;\n }\n .table-bordered th,\n .table-bordered td {\n border: 1px solid #ddd !important;\n }\n}\n@font-face {\n font-family: 'Glyphicons Halflings';\n src: url('../fonts/glyphicons-halflings-regular.eot');\n src: url('../fonts/glyphicons-halflings-regular.eot?#iefix') format('embedded-opentype'), url('../fonts/glyphicons-halflings-regular.woff2') format('woff2'), url('../fonts/glyphicons-halflings-regular.woff') format('woff'), url('../fonts/glyphicons-halflings-regular.ttf') format('truetype'), url('../fonts/glyphicons-halflings-regular.svg#glyphicons_halflingsregular') format('svg');\n}\n.glyphicon {\n position: relative;\n top: 1px;\n display: inline-block;\n font-family: 'Glyphicons Halflings';\n font-style: normal;\n font-weight: normal;\n line-height: 1;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n}\n.glyphicon-asterisk:before {\n content: \"\\002a\";\n}\n.glyphicon-plus:before {\n content: \"\\002b\";\n}\n.glyphicon-euro:before,\n.glyphicon-eur:before {\n content: \"\\20ac\";\n}\n.glyphicon-minus:before {\n content: \"\\2212\";\n}\n.glyphicon-cloud:before {\n content: \"\\2601\";\n}\n.glyphicon-envelope:before {\n content: \"\\2709\";\n}\n.glyphicon-pencil:before {\n content: \"\\270f\";\n}\n.glyphicon-glass:before {\n content: \"\\e001\";\n}\n.glyphicon-music:before {\n content: \"\\e002\";\n}\n.glyphicon-search:before {\n content: \"\\e003\";\n}\n.glyphicon-heart:before {\n content: \"\\e005\";\n}\n.glyphicon-star:before {\n content: \"\\e006\";\n}\n.glyphicon-star-empty:before {\n content: \"\\e007\";\n}\n.glyphicon-user:before {\n content: \"\\e008\";\n}\n.glyphicon-film:before {\n content: \"\\e009\";\n}\n.glyphicon-th-large:before {\n content: \"\\e010\";\n}\n.glyphicon-th:before {\n content: \"\\e011\";\n}\n.glyphicon-th-list:before {\n content: \"\\e012\";\n}\n.glyphicon-ok:before {\n content: \"\\e013\";\n}\n.glyphicon-remove:before {\n content: \"\\e014\";\n}\n.glyphicon-zoom-in:before {\n content: \"\\e015\";\n}\n.glyphicon-zoom-out:before {\n content: \"\\e016\";\n}\n.glyphicon-off:before {\n content: \"\\e017\";\n}\n.glyphicon-signal:before {\n content: \"\\e018\";\n}\n.glyphicon-cog:before {\n content: \"\\e019\";\n}\n.glyphicon-trash:before {\n content: \"\\e020\";\n}\n.glyphicon-home:before {\n content: \"\\e021\";\n}\n.glyphicon-file:before {\n content: \"\\e022\";\n}\n.glyphicon-time:before {\n content: \"\\e023\";\n}\n.glyphicon-road:before {\n content: \"\\e024\";\n}\n.glyphicon-download-alt:before {\n content: \"\\e025\";\n}\n.glyphicon-download:before {\n content: \"\\e026\";\n}\n.glyphicon-upload:before {\n content: \"\\e027\";\n}\n.glyphicon-inbox:before {\n content: \"\\e028\";\n}\n.glyphicon-play-circle:before {\n content: \"\\e029\";\n}\n.glyphicon-repeat:before {\n content: \"\\e030\";\n}\n.glyphicon-refresh:before {\n content: \"\\e031\";\n}\n.glyphicon-list-alt:before {\n content: \"\\e032\";\n}\n.glyphicon-lock:before {\n content: \"\\e033\";\n}\n.glyphicon-flag:before {\n content: \"\\e034\";\n}\n.glyphicon-headphones:before {\n content: \"\\e035\";\n}\n.glyphicon-volume-off:before {\n content: \"\\e036\";\n}\n.glyphicon-volume-down:before {\n content: \"\\e037\";\n}\n.glyphicon-volume-up:before {\n content: \"\\e038\";\n}\n.glyphicon-qrcode:before {\n content: \"\\e039\";\n}\n.glyphicon-barcode:before {\n content: \"\\e040\";\n}\n.glyphicon-tag:before {\n content: \"\\e041\";\n}\n.glyphicon-tags:before {\n content: \"\\e042\";\n}\n.glyphicon-book:before {\n content: \"\\e043\";\n}\n.glyphicon-bookmark:before {\n content: \"\\e044\";\n}\n.glyphicon-print:before {\n content: \"\\e045\";\n}\n.glyphicon-camera:before {\n content: \"\\e046\";\n}\n.glyphicon-font:before {\n content: \"\\e047\";\n}\n.glyphicon-bold:before {\n content: \"\\e048\";\n}\n.glyphicon-italic:before {\n content: \"\\e049\";\n}\n.glyphicon-text-height:before {\n content: \"\\e050\";\n}\n.glyphicon-text-width:before {\n content: \"\\e051\";\n}\n.glyphicon-align-left:before {\n content: \"\\e052\";\n}\n.glyphicon-align-center:before {\n content: \"\\e053\";\n}\n.glyphicon-align-right:before {\n content: \"\\e054\";\n}\n.glyphicon-align-justify:before {\n content: \"\\e055\";\n}\n.glyphicon-list:before {\n content: \"\\e056\";\n}\n.glyphicon-indent-left:before {\n content: \"\\e057\";\n}\n.glyphicon-indent-right:before {\n content: \"\\e058\";\n}\n.glyphicon-facetime-video:before {\n content: \"\\e059\";\n}\n.glyphicon-picture:before {\n content: \"\\e060\";\n}\n.glyphicon-map-marker:before {\n content: \"\\e062\";\n}\n.glyphicon-adjust:before {\n content: \"\\e063\";\n}\n.glyphicon-tint:before {\n content: \"\\e064\";\n}\n.glyphicon-edit:before {\n content: \"\\e065\";\n}\n.glyphicon-share:before {\n content: \"\\e066\";\n}\n.glyphicon-check:before {\n content: \"\\e067\";\n}\n.glyphicon-move:before {\n content: \"\\e068\";\n}\n.glyphicon-step-backward:before {\n content: \"\\e069\";\n}\n.glyphicon-fast-backward:before {\n content: \"\\e070\";\n}\n.glyphicon-backward:before {\n content: \"\\e071\";\n}\n.glyphicon-play:before {\n content: \"\\e072\";\n}\n.glyphicon-pause:before {\n content: \"\\e073\";\n}\n.glyphicon-stop:before {\n content: \"\\e074\";\n}\n.glyphicon-forward:before {\n content: \"\\e075\";\n}\n.glyphicon-fast-forward:before {\n content: \"\\e076\";\n}\n.glyphicon-step-forward:before {\n content: \"\\e077\";\n}\n.glyphicon-eject:before {\n content: \"\\e078\";\n}\n.glyphicon-chevron-left:before {\n content: \"\\e079\";\n}\n.glyphicon-chevron-right:before {\n content: \"\\e080\";\n}\n.glyphicon-plus-sign:before {\n content: \"\\e081\";\n}\n.glyphicon-minus-sign:before {\n content: \"\\e082\";\n}\n.glyphicon-remove-sign:before {\n content: \"\\e083\";\n}\n.glyphicon-ok-sign:before {\n content: \"\\e084\";\n}\n.glyphicon-question-sign:before {\n content: \"\\e085\";\n}\n.glyphicon-info-sign:before {\n content: \"\\e086\";\n}\n.glyphicon-screenshot:before {\n content: \"\\e087\";\n}\n.glyphicon-remove-circle:before {\n content: \"\\e088\";\n}\n.glyphicon-ok-circle:before {\n content: \"\\e089\";\n}\n.glyphicon-ban-circle:before {\n content: \"\\e090\";\n}\n.glyphicon-arrow-left:before {\n content: \"\\e091\";\n}\n.glyphicon-arrow-right:before {\n content: \"\\e092\";\n}\n.glyphicon-arrow-up:before {\n content: \"\\e093\";\n}\n.glyphicon-arrow-down:before {\n content: \"\\e094\";\n}\n.glyphicon-share-alt:before {\n content: \"\\e095\";\n}\n.glyphicon-resize-full:before {\n content: \"\\e096\";\n}\n.glyphicon-resize-small:before {\n content: \"\\e097\";\n}\n.glyphicon-exclamation-sign:before {\n content: \"\\e101\";\n}\n.glyphicon-gift:before {\n content: \"\\e102\";\n}\n.glyphicon-leaf:before {\n content: \"\\e103\";\n}\n.glyphicon-fire:before {\n content: \"\\e104\";\n}\n.glyphicon-eye-open:before {\n content: \"\\e105\";\n}\n.glyphicon-eye-close:before {\n content: \"\\e106\";\n}\n.glyphicon-warning-sign:before {\n content: \"\\e107\";\n}\n.glyphicon-plane:before {\n content: \"\\e108\";\n}\n.glyphicon-calendar:before {\n content: \"\\e109\";\n}\n.glyphicon-random:before {\n content: \"\\e110\";\n}\n.glyphicon-comment:before {\n content: \"\\e111\";\n}\n.glyphicon-magnet:before {\n content: \"\\e112\";\n}\n.glyphicon-chevron-up:before {\n content: \"\\e113\";\n}\n.glyphicon-chevron-down:before {\n content: \"\\e114\";\n}\n.glyphicon-retweet:before {\n content: \"\\e115\";\n}\n.glyphicon-shopping-cart:before {\n content: \"\\e116\";\n}\n.glyphicon-folder-close:before {\n content: \"\\e117\";\n}\n.glyphicon-folder-open:before {\n content: \"\\e118\";\n}\n.glyphicon-resize-vertical:before {\n content: \"\\e119\";\n}\n.glyphicon-resize-horizontal:before {\n content: \"\\e120\";\n}\n.glyphicon-hdd:before {\n content: \"\\e121\";\n}\n.glyphicon-bullhorn:before {\n content: \"\\e122\";\n}\n.glyphicon-bell:before {\n content: \"\\e123\";\n}\n.glyphicon-certificate:before {\n content: \"\\e124\";\n}\n.glyphicon-thumbs-up:before {\n content: \"\\e125\";\n}\n.glyphicon-thumbs-down:before {\n content: \"\\e126\";\n}\n.glyphicon-hand-right:before {\n content: \"\\e127\";\n}\n.glyphicon-hand-left:before {\n content: \"\\e128\";\n}\n.glyphicon-hand-up:before {\n content: \"\\e129\";\n}\n.glyphicon-hand-down:before {\n content: \"\\e130\";\n}\n.glyphicon-circle-arrow-right:before {\n content: \"\\e131\";\n}\n.glyphicon-circle-arrow-left:before {\n content: \"\\e132\";\n}\n.glyphicon-circle-arrow-up:before {\n content: \"\\e133\";\n}\n.glyphicon-circle-arrow-down:before {\n content: \"\\e134\";\n}\n.glyphicon-globe:before {\n content: \"\\e135\";\n}\n.glyphicon-wrench:before {\n content: \"\\e136\";\n}\n.glyphicon-tasks:before {\n content: \"\\e137\";\n}\n.glyphicon-filter:before {\n content: \"\\e138\";\n}\n.glyphicon-briefcase:before {\n content: \"\\e139\";\n}\n.glyphicon-fullscreen:before {\n content: \"\\e140\";\n}\n.glyphicon-dashboard:before {\n content: \"\\e141\";\n}\n.glyphicon-paperclip:before {\n content: \"\\e142\";\n}\n.glyphicon-heart-empty:before {\n content: \"\\e143\";\n}\n.glyphicon-link:before {\n content: \"\\e144\";\n}\n.glyphicon-phone:before {\n content: \"\\e145\";\n}\n.glyphicon-pushpin:before {\n content: \"\\e146\";\n}\n.glyphicon-usd:before {\n content: \"\\e148\";\n}\n.glyphicon-gbp:before {\n content: \"\\e149\";\n}\n.glyphicon-sort:before {\n content: \"\\e150\";\n}\n.glyphicon-sort-by-alphabet:before {\n content: \"\\e151\";\n}\n.glyphicon-sort-by-alphabet-alt:before {\n content: \"\\e152\";\n}\n.glyphicon-sort-by-order:before {\n content: \"\\e153\";\n}\n.glyphicon-sort-by-order-alt:before {\n content: \"\\e154\";\n}\n.glyphicon-sort-by-attributes:before {\n content: \"\\e155\";\n}\n.glyphicon-sort-by-attributes-alt:before {\n content: \"\\e156\";\n}\n.glyphicon-unchecked:before {\n content: \"\\e157\";\n}\n.glyphicon-expand:before {\n content: \"\\e158\";\n}\n.glyphicon-collapse-down:before {\n content: \"\\e159\";\n}\n.glyphicon-collapse-up:before {\n content: \"\\e160\";\n}\n.glyphicon-log-in:before {\n content: \"\\e161\";\n}\n.glyphicon-flash:before {\n content: \"\\e162\";\n}\n.glyphicon-log-out:before {\n content: \"\\e163\";\n}\n.glyphicon-new-window:before {\n content: \"\\e164\";\n}\n.glyphicon-record:before {\n content: \"\\e165\";\n}\n.glyphicon-save:before {\n content: \"\\e166\";\n}\n.glyphicon-open:before {\n content: \"\\e167\";\n}\n.glyphicon-saved:before {\n content: \"\\e168\";\n}\n.glyphicon-import:before {\n content: \"\\e169\";\n}\n.glyphicon-export:before {\n content: \"\\e170\";\n}\n.glyphicon-send:before {\n content: \"\\e171\";\n}\n.glyphicon-floppy-disk:before {\n content: \"\\e172\";\n}\n.glyphicon-floppy-saved:before {\n content: \"\\e173\";\n}\n.glyphicon-floppy-remove:before {\n content: \"\\e174\";\n}\n.glyphicon-floppy-save:before {\n content: \"\\e175\";\n}\n.glyphicon-floppy-open:before {\n content: \"\\e176\";\n}\n.glyphicon-credit-card:before {\n content: \"\\e177\";\n}\n.glyphicon-transfer:before {\n content: \"\\e178\";\n}\n.glyphicon-cutlery:before {\n content: \"\\e179\";\n}\n.glyphicon-header:before {\n content: \"\\e180\";\n}\n.glyphicon-compressed:before {\n content: \"\\e181\";\n}\n.glyphicon-earphone:before {\n content: \"\\e182\";\n}\n.glyphicon-phone-alt:before {\n content: \"\\e183\";\n}\n.glyphicon-tower:before {\n content: \"\\e184\";\n}\n.glyphicon-stats:before {\n content: \"\\e185\";\n}\n.glyphicon-sd-video:before {\n content: \"\\e186\";\n}\n.glyphicon-hd-video:before {\n content: \"\\e187\";\n}\n.glyphicon-subtitles:before {\n content: \"\\e188\";\n}\n.glyphicon-sound-stereo:before {\n content: \"\\e189\";\n}\n.glyphicon-sound-dolby:before {\n content: \"\\e190\";\n}\n.glyphicon-sound-5-1:before {\n content: \"\\e191\";\n}\n.glyphicon-sound-6-1:before {\n content: \"\\e192\";\n}\n.glyphicon-sound-7-1:before {\n content: \"\\e193\";\n}\n.glyphicon-copyright-mark:before {\n content: \"\\e194\";\n}\n.glyphicon-registration-mark:before {\n content: \"\\e195\";\n}\n.glyphicon-cloud-download:before {\n content: \"\\e197\";\n}\n.glyphicon-cloud-upload:before {\n content: \"\\e198\";\n}\n.glyphicon-tree-conifer:before {\n content: \"\\e199\";\n}\n.glyphicon-tree-deciduous:before {\n content: \"\\e200\";\n}\n.glyphicon-cd:before {\n content: \"\\e201\";\n}\n.glyphicon-save-file:before {\n content: \"\\e202\";\n}\n.glyphicon-open-file:before {\n content: \"\\e203\";\n}\n.glyphicon-level-up:before {\n content: \"\\e204\";\n}\n.glyphicon-copy:before {\n content: \"\\e205\";\n}\n.glyphicon-paste:before {\n content: \"\\e206\";\n}\n.glyphicon-alert:before {\n content: \"\\e209\";\n}\n.glyphicon-equalizer:before {\n content: \"\\e210\";\n}\n.glyphicon-king:before {\n content: \"\\e211\";\n}\n.glyphicon-queen:before {\n content: \"\\e212\";\n}\n.glyphicon-pawn:before {\n content: \"\\e213\";\n}\n.glyphicon-bishop:before {\n content: \"\\e214\";\n}\n.glyphicon-knight:before {\n content: \"\\e215\";\n}\n.glyphicon-baby-formula:before {\n content: \"\\e216\";\n}\n.glyphicon-tent:before {\n content: \"\\26fa\";\n}\n.glyphicon-blackboard:before {\n content: \"\\e218\";\n}\n.glyphicon-bed:before {\n content: \"\\e219\";\n}\n.glyphicon-apple:before {\n content: \"\\f8ff\";\n}\n.glyphicon-erase:before {\n content: \"\\e221\";\n}\n.glyphicon-hourglass:before {\n content: \"\\231b\";\n}\n.glyphicon-lamp:before {\n content: \"\\e223\";\n}\n.glyphicon-duplicate:before {\n content: \"\\e224\";\n}\n.glyphicon-piggy-bank:before {\n content: \"\\e225\";\n}\n.glyphicon-scissors:before {\n content: \"\\e226\";\n}\n.glyphicon-bitcoin:before {\n content: \"\\e227\";\n}\n.glyphicon-btc:before {\n content: \"\\e227\";\n}\n.glyphicon-xbt:before {\n content: \"\\e227\";\n}\n.glyphicon-yen:before {\n content: \"\\00a5\";\n}\n.glyphicon-jpy:before {\n content: \"\\00a5\";\n}\n.glyphicon-ruble:before {\n content: \"\\20bd\";\n}\n.glyphicon-rub:before {\n content: \"\\20bd\";\n}\n.glyphicon-scale:before {\n content: \"\\e230\";\n}\n.glyphicon-ice-lolly:before {\n content: \"\\e231\";\n}\n.glyphicon-ice-lolly-tasted:before {\n content: \"\\e232\";\n}\n.glyphicon-education:before {\n content: \"\\e233\";\n}\n.glyphicon-option-horizontal:before {\n content: \"\\e234\";\n}\n.glyphicon-option-vertical:before {\n content: \"\\e235\";\n}\n.glyphicon-menu-hamburger:before {\n content: \"\\e236\";\n}\n.glyphicon-modal-window:before {\n content: \"\\e237\";\n}\n.glyphicon-oil:before {\n content: \"\\e238\";\n}\n.glyphicon-grain:before {\n content: \"\\e239\";\n}\n.glyphicon-sunglasses:before {\n content: \"\\e240\";\n}\n.glyphicon-text-size:before {\n content: \"\\e241\";\n}\n.glyphicon-text-color:before {\n content: \"\\e242\";\n}\n.glyphicon-text-background:before {\n content: \"\\e243\";\n}\n.glyphicon-object-align-top:before {\n content: \"\\e244\";\n}\n.glyphicon-object-align-bottom:before {\n content: \"\\e245\";\n}\n.glyphicon-object-align-horizontal:before {\n content: \"\\e246\";\n}\n.glyphicon-object-align-left:before {\n content: \"\\e247\";\n}\n.glyphicon-object-align-vertical:before {\n content: \"\\e248\";\n}\n.glyphicon-object-align-right:before {\n content: \"\\e249\";\n}\n.glyphicon-triangle-right:before {\n content: \"\\e250\";\n}\n.glyphicon-triangle-left:before {\n content: \"\\e251\";\n}\n.glyphicon-triangle-bottom:before {\n content: \"\\e252\";\n}\n.glyphicon-triangle-top:before {\n content: \"\\e253\";\n}\n.glyphicon-console:before {\n content: \"\\e254\";\n}\n.glyphicon-superscript:before {\n content: \"\\e255\";\n}\n.glyphicon-subscript:before {\n content: \"\\e256\";\n}\n.glyphicon-menu-left:before {\n content: \"\\e257\";\n}\n.glyphicon-menu-right:before {\n content: \"\\e258\";\n}\n.glyphicon-menu-down:before {\n content: \"\\e259\";\n}\n.glyphicon-menu-up:before {\n content: \"\\e260\";\n}\n* {\n -webkit-box-sizing: border-box;\n -moz-box-sizing: border-box;\n box-sizing: border-box;\n}\n*:before,\n*:after {\n -webkit-box-sizing: border-box;\n -moz-box-sizing: border-box;\n box-sizing: border-box;\n}\nhtml {\n font-size: 10px;\n -webkit-tap-highlight-color: rgba(0, 0, 0, 0);\n}\nbody {\n font-family: \"Helvetica Neue\", Helvetica, Arial, sans-serif;\n font-size: 14px;\n line-height: 1.42857143;\n color: #333333;\n background-color: #fff;\n}\ninput,\nbutton,\nselect,\ntextarea {\n font-family: inherit;\n font-size: inherit;\n line-height: inherit;\n}\na {\n color: #337ab7;\n text-decoration: none;\n}\na:hover,\na:focus {\n color: #23527c;\n text-decoration: underline;\n}\na:focus {\n outline: 5px auto -webkit-focus-ring-color;\n outline-offset: -2px;\n}\nfigure {\n margin: 0;\n}\nimg {\n vertical-align: middle;\n}\n.img-responsive,\n.thumbnail > img,\n.thumbnail a > img,\n.carousel-inner > .item > img,\n.carousel-inner > .item > a > img {\n display: block;\n max-width: 100%;\n height: auto;\n}\n.img-rounded {\n border-radius: 6px;\n}\n.img-thumbnail {\n padding: 4px;\n line-height: 1.42857143;\n background-color: #fff;\n border: 1px solid #ddd;\n border-radius: 4px;\n -webkit-transition: all 0.2s ease-in-out;\n -o-transition: all 0.2s ease-in-out;\n transition: all 0.2s ease-in-out;\n display: inline-block;\n max-width: 100%;\n height: auto;\n}\n.img-circle {\n border-radius: 50%;\n}\nhr {\n margin-top: 20px;\n margin-bottom: 20px;\n border: 0;\n border-top: 1px solid #eeeeee;\n}\n.sr-only {\n position: absolute;\n width: 1px;\n height: 1px;\n margin: -1px;\n padding: 0;\n overflow: hidden;\n clip: rect(0, 0, 0, 0);\n border: 0;\n}\n.sr-only-focusable:active,\n.sr-only-focusable:focus {\n position: static;\n width: auto;\n height: auto;\n margin: 0;\n overflow: visible;\n clip: auto;\n}\n[role=\"button\"] {\n cursor: pointer;\n}\nh1,\nh2,\nh3,\nh4,\nh5,\nh6,\n.h1,\n.h2,\n.h3,\n.h4,\n.h5,\n.h6 {\n font-family: inherit;\n font-weight: 500;\n line-height: 1.1;\n color: inherit;\n}\nh1 small,\nh2 small,\nh3 small,\nh4 small,\nh5 small,\nh6 small,\n.h1 small,\n.h2 small,\n.h3 small,\n.h4 small,\n.h5 small,\n.h6 small,\nh1 .small,\nh2 .small,\nh3 .small,\nh4 .small,\nh5 .small,\nh6 .small,\n.h1 .small,\n.h2 .small,\n.h3 .small,\n.h4 .small,\n.h5 .small,\n.h6 .small {\n font-weight: normal;\n line-height: 1;\n color: #777777;\n}\nh1,\n.h1,\nh2,\n.h2,\nh3,\n.h3 {\n margin-top: 20px;\n margin-bottom: 10px;\n}\nh1 small,\n.h1 small,\nh2 small,\n.h2 small,\nh3 small,\n.h3 small,\nh1 .small,\n.h1 .small,\nh2 .small,\n.h2 .small,\nh3 .small,\n.h3 .small {\n font-size: 65%;\n}\nh4,\n.h4,\nh5,\n.h5,\nh6,\n.h6 {\n margin-top: 10px;\n margin-bottom: 10px;\n}\nh4 small,\n.h4 small,\nh5 small,\n.h5 small,\nh6 small,\n.h6 small,\nh4 .small,\n.h4 .small,\nh5 .small,\n.h5 .small,\nh6 .small,\n.h6 .small {\n font-size: 75%;\n}\nh1,\n.h1 {\n font-size: 36px;\n}\nh2,\n.h2 {\n font-size: 30px;\n}\nh3,\n.h3 {\n font-size: 24px;\n}\nh4,\n.h4 {\n font-size: 18px;\n}\nh5,\n.h5 {\n font-size: 14px;\n}\nh6,\n.h6 {\n font-size: 12px;\n}\np {\n margin: 0 0 10px;\n}\n.lead {\n margin-bottom: 20px;\n font-size: 16px;\n font-weight: 300;\n line-height: 1.4;\n}\n@media (min-width: 768px) {\n .lead {\n font-size: 21px;\n }\n}\nsmall,\n.small {\n font-size: 85%;\n}\nmark,\n.mark {\n background-color: #fcf8e3;\n padding: .2em;\n}\n.text-left {\n text-align: left;\n}\n.text-right {\n text-align: right;\n}\n.text-center {\n text-align: center;\n}\n.text-justify {\n text-align: justify;\n}\n.text-nowrap {\n white-space: nowrap;\n}\n.text-lowercase {\n text-transform: lowercase;\n}\n.text-uppercase {\n text-transform: uppercase;\n}\n.text-capitalize {\n text-transform: capitalize;\n}\n.text-muted {\n color: #777777;\n}\n.text-primary {\n color: #337ab7;\n}\na.text-primary:hover,\na.text-primary:focus {\n color: #286090;\n}\n.text-success {\n color: #3c763d;\n}\na.text-success:hover,\na.text-success:focus {\n color: #2b542c;\n}\n.text-info {\n color: #31708f;\n}\na.text-info:hover,\na.text-info:focus {\n color: #245269;\n}\n.text-warning {\n color: #8a6d3b;\n}\na.text-warning:hover,\na.text-warning:focus {\n color: #66512c;\n}\n.text-danger {\n color: #a94442;\n}\na.text-danger:hover,\na.text-danger:focus {\n color: #843534;\n}\n.bg-primary {\n color: #fff;\n background-color: #337ab7;\n}\na.bg-primary:hover,\na.bg-primary:focus {\n background-color: #286090;\n}\n.bg-success {\n background-color: #dff0d8;\n}\na.bg-success:hover,\na.bg-success:focus {\n background-color: #c1e2b3;\n}\n.bg-info {\n background-color: #d9edf7;\n}\na.bg-info:hover,\na.bg-info:focus {\n background-color: #afd9ee;\n}\n.bg-warning {\n background-color: #fcf8e3;\n}\na.bg-warning:hover,\na.bg-warning:focus {\n background-color: #f7ecb5;\n}\n.bg-danger {\n background-color: #f2dede;\n}\na.bg-danger:hover,\na.bg-danger:focus {\n background-color: #e4b9b9;\n}\n.page-header {\n padding-bottom: 9px;\n margin: 40px 0 20px;\n border-bottom: 1px solid #eeeeee;\n}\nul,\nol {\n margin-top: 0;\n margin-bottom: 10px;\n}\nul ul,\nol ul,\nul ol,\nol ol {\n margin-bottom: 0;\n}\n.list-unstyled {\n padding-left: 0;\n list-style: none;\n}\n.list-inline {\n padding-left: 0;\n list-style: none;\n margin-left: -5px;\n}\n.list-inline > li {\n display: inline-block;\n padding-left: 5px;\n padding-right: 5px;\n}\ndl {\n margin-top: 0;\n margin-bottom: 20px;\n}\ndt,\ndd {\n line-height: 1.42857143;\n}\ndt {\n font-weight: bold;\n}\ndd {\n margin-left: 0;\n}\n@media (min-width: 768px) {\n .dl-horizontal dt {\n float: left;\n width: 160px;\n clear: left;\n text-align: right;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n }\n .dl-horizontal dd {\n margin-left: 180px;\n }\n}\nabbr[title],\nabbr[data-original-title] {\n cursor: help;\n border-bottom: 1px dotted #777777;\n}\n.initialism {\n font-size: 90%;\n text-transform: uppercase;\n}\nblockquote {\n padding: 10px 20px;\n margin: 0 0 20px;\n font-size: 17.5px;\n border-left: 5px solid #eeeeee;\n}\nblockquote p:last-child,\nblockquote ul:last-child,\nblockquote ol:last-child {\n margin-bottom: 0;\n}\nblockquote footer,\nblockquote small,\nblockquote .small {\n display: block;\n font-size: 80%;\n line-height: 1.42857143;\n color: #777777;\n}\nblockquote footer:before,\nblockquote small:before,\nblockquote .small:before {\n content: '\\2014 \\00A0';\n}\n.blockquote-reverse,\nblockquote.pull-right {\n padding-right: 15px;\n padding-left: 0;\n border-right: 5px solid #eeeeee;\n border-left: 0;\n text-align: right;\n}\n.blockquote-reverse footer:before,\nblockquote.pull-right footer:before,\n.blockquote-reverse small:before,\nblockquote.pull-right small:before,\n.blockquote-reverse .small:before,\nblockquote.pull-right .small:before {\n content: '';\n}\n.blockquote-reverse footer:after,\nblockquote.pull-right footer:after,\n.blockquote-reverse small:after,\nblockquote.pull-right small:after,\n.blockquote-reverse .small:after,\nblockquote.pull-right .small:after {\n content: '\\00A0 \\2014';\n}\naddress {\n margin-bottom: 20px;\n font-style: normal;\n line-height: 1.42857143;\n}\ncode,\nkbd,\npre,\nsamp {\n font-family: Menlo, Monaco, Consolas, \"Courier New\", monospace;\n}\ncode {\n padding: 2px 4px;\n font-size: 90%;\n color: #c7254e;\n background-color: #f9f2f4;\n border-radius: 4px;\n}\nkbd {\n padding: 2px 4px;\n font-size: 90%;\n color: #fff;\n background-color: #333;\n border-radius: 3px;\n box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.25);\n}\nkbd kbd {\n padding: 0;\n font-size: 100%;\n font-weight: bold;\n box-shadow: none;\n}\npre {\n display: block;\n padding: 9.5px;\n margin: 0 0 10px;\n font-size: 13px;\n line-height: 1.42857143;\n word-break: break-all;\n word-wrap: break-word;\n color: #333333;\n background-color: #f5f5f5;\n border: 1px solid #ccc;\n border-radius: 4px;\n}\npre code {\n padding: 0;\n font-size: inherit;\n color: inherit;\n white-space: pre-wrap;\n background-color: transparent;\n border-radius: 0;\n}\n.pre-scrollable {\n max-height: 340px;\n overflow-y: scroll;\n}\n.container {\n margin-right: auto;\n margin-left: auto;\n padding-left: 15px;\n padding-right: 15px;\n}\n@media (min-width: 768px) {\n .container {\n width: 750px;\n }\n}\n@media (min-width: 992px) {\n .container {\n width: 970px;\n }\n}\n@media (min-width: 1200px) {\n .container {\n width: 1170px;\n }\n}\n.container-fluid {\n margin-right: auto;\n margin-left: auto;\n padding-left: 15px;\n padding-right: 15px;\n}\n.row {\n margin-left: -15px;\n margin-right: -15px;\n}\n.col-xs-1, .col-sm-1, .col-md-1, .col-lg-1, .col-xs-2, .col-sm-2, .col-md-2, .col-lg-2, .col-xs-3, .col-sm-3, .col-md-3, .col-lg-3, .col-xs-4, .col-sm-4, .col-md-4, .col-lg-4, .col-xs-5, .col-sm-5, .col-md-5, .col-lg-5, .col-xs-6, .col-sm-6, .col-md-6, .col-lg-6, .col-xs-7, .col-sm-7, .col-md-7, .col-lg-7, .col-xs-8, .col-sm-8, .col-md-8, .col-lg-8, .col-xs-9, .col-sm-9, .col-md-9, .col-lg-9, .col-xs-10, .col-sm-10, .col-md-10, .col-lg-10, .col-xs-11, .col-sm-11, .col-md-11, .col-lg-11, .col-xs-12, .col-sm-12, .col-md-12, .col-lg-12 {\n position: relative;\n min-height: 1px;\n padding-left: 15px;\n padding-right: 15px;\n}\n.col-xs-1, .col-xs-2, .col-xs-3, .col-xs-4, .col-xs-5, .col-xs-6, .col-xs-7, .col-xs-8, .col-xs-9, .col-xs-10, .col-xs-11, .col-xs-12 {\n float: left;\n}\n.col-xs-12 {\n width: 100%;\n}\n.col-xs-11 {\n width: 91.66666667%;\n}\n.col-xs-10 {\n width: 83.33333333%;\n}\n.col-xs-9 {\n width: 75%;\n}\n.col-xs-8 {\n width: 66.66666667%;\n}\n.col-xs-7 {\n width: 58.33333333%;\n}\n.col-xs-6 {\n width: 50%;\n}\n.col-xs-5 {\n width: 41.66666667%;\n}\n.col-xs-4 {\n width: 33.33333333%;\n}\n.col-xs-3 {\n width: 25%;\n}\n.col-xs-2 {\n width: 16.66666667%;\n}\n.col-xs-1 {\n width: 8.33333333%;\n}\n.col-xs-pull-12 {\n right: 100%;\n}\n.col-xs-pull-11 {\n right: 91.66666667%;\n}\n.col-xs-pull-10 {\n right: 83.33333333%;\n}\n.col-xs-pull-9 {\n right: 75%;\n}\n.col-xs-pull-8 {\n right: 66.66666667%;\n}\n.col-xs-pull-7 {\n right: 58.33333333%;\n}\n.col-xs-pull-6 {\n right: 50%;\n}\n.col-xs-pull-5 {\n right: 41.66666667%;\n}\n.col-xs-pull-4 {\n right: 33.33333333%;\n}\n.col-xs-pull-3 {\n right: 25%;\n}\n.col-xs-pull-2 {\n right: 16.66666667%;\n}\n.col-xs-pull-1 {\n right: 8.33333333%;\n}\n.col-xs-pull-0 {\n right: auto;\n}\n.col-xs-push-12 {\n left: 100%;\n}\n.col-xs-push-11 {\n left: 91.66666667%;\n}\n.col-xs-push-10 {\n left: 83.33333333%;\n}\n.col-xs-push-9 {\n left: 75%;\n}\n.col-xs-push-8 {\n left: 66.66666667%;\n}\n.col-xs-push-7 {\n left: 58.33333333%;\n}\n.col-xs-push-6 {\n left: 50%;\n}\n.col-xs-push-5 {\n left: 41.66666667%;\n}\n.col-xs-push-4 {\n left: 33.33333333%;\n}\n.col-xs-push-3 {\n left: 25%;\n}\n.col-xs-push-2 {\n left: 16.66666667%;\n}\n.col-xs-push-1 {\n left: 8.33333333%;\n}\n.col-xs-push-0 {\n left: auto;\n}\n.col-xs-offset-12 {\n margin-left: 100%;\n}\n.col-xs-offset-11 {\n margin-left: 91.66666667%;\n}\n.col-xs-offset-10 {\n margin-left: 83.33333333%;\n}\n.col-xs-offset-9 {\n margin-left: 75%;\n}\n.col-xs-offset-8 {\n margin-left: 66.66666667%;\n}\n.col-xs-offset-7 {\n margin-left: 58.33333333%;\n}\n.col-xs-offset-6 {\n margin-left: 50%;\n}\n.col-xs-offset-5 {\n margin-left: 41.66666667%;\n}\n.col-xs-offset-4 {\n margin-left: 33.33333333%;\n}\n.col-xs-offset-3 {\n margin-left: 25%;\n}\n.col-xs-offset-2 {\n margin-left: 16.66666667%;\n}\n.col-xs-offset-1 {\n margin-left: 8.33333333%;\n}\n.col-xs-offset-0 {\n margin-left: 0%;\n}\n@media (min-width: 768px) {\n .col-sm-1, .col-sm-2, .col-sm-3, .col-sm-4, .col-sm-5, .col-sm-6, .col-sm-7, .col-sm-8, .col-sm-9, .col-sm-10, .col-sm-11, .col-sm-12 {\n float: left;\n }\n .col-sm-12 {\n width: 100%;\n }\n .col-sm-11 {\n width: 91.66666667%;\n }\n .col-sm-10 {\n width: 83.33333333%;\n }\n .col-sm-9 {\n width: 75%;\n }\n .col-sm-8 {\n width: 66.66666667%;\n }\n .col-sm-7 {\n width: 58.33333333%;\n }\n .col-sm-6 {\n width: 50%;\n }\n .col-sm-5 {\n width: 41.66666667%;\n }\n .col-sm-4 {\n width: 33.33333333%;\n }\n .col-sm-3 {\n width: 25%;\n }\n .col-sm-2 {\n width: 16.66666667%;\n }\n .col-sm-1 {\n width: 8.33333333%;\n }\n .col-sm-pull-12 {\n right: 100%;\n }\n .col-sm-pull-11 {\n right: 91.66666667%;\n }\n .col-sm-pull-10 {\n right: 83.33333333%;\n }\n .col-sm-pull-9 {\n right: 75%;\n }\n .col-sm-pull-8 {\n right: 66.66666667%;\n }\n .col-sm-pull-7 {\n right: 58.33333333%;\n }\n .col-sm-pull-6 {\n right: 50%;\n }\n .col-sm-pull-5 {\n right: 41.66666667%;\n }\n .col-sm-pull-4 {\n right: 33.33333333%;\n }\n .col-sm-pull-3 {\n right: 25%;\n }\n .col-sm-pull-2 {\n right: 16.66666667%;\n }\n .col-sm-pull-1 {\n right: 8.33333333%;\n }\n .col-sm-pull-0 {\n right: auto;\n }\n .col-sm-push-12 {\n left: 100%;\n }\n .col-sm-push-11 {\n left: 91.66666667%;\n }\n .col-sm-push-10 {\n left: 83.33333333%;\n }\n .col-sm-push-9 {\n left: 75%;\n }\n .col-sm-push-8 {\n left: 66.66666667%;\n }\n .col-sm-push-7 {\n left: 58.33333333%;\n }\n .col-sm-push-6 {\n left: 50%;\n }\n .col-sm-push-5 {\n left: 41.66666667%;\n }\n .col-sm-push-4 {\n left: 33.33333333%;\n }\n .col-sm-push-3 {\n left: 25%;\n }\n .col-sm-push-2 {\n left: 16.66666667%;\n }\n .col-sm-push-1 {\n left: 8.33333333%;\n }\n .col-sm-push-0 {\n left: auto;\n }\n .col-sm-offset-12 {\n margin-left: 100%;\n }\n .col-sm-offset-11 {\n margin-left: 91.66666667%;\n }\n .col-sm-offset-10 {\n margin-left: 83.33333333%;\n }\n .col-sm-offset-9 {\n margin-left: 75%;\n }\n .col-sm-offset-8 {\n margin-left: 66.66666667%;\n }\n .col-sm-offset-7 {\n margin-left: 58.33333333%;\n }\n .col-sm-offset-6 {\n margin-left: 50%;\n }\n .col-sm-offset-5 {\n margin-left: 41.66666667%;\n }\n .col-sm-offset-4 {\n margin-left: 33.33333333%;\n }\n .col-sm-offset-3 {\n margin-left: 25%;\n }\n .col-sm-offset-2 {\n margin-left: 16.66666667%;\n }\n .col-sm-offset-1 {\n margin-left: 8.33333333%;\n }\n .col-sm-offset-0 {\n margin-left: 0%;\n }\n}\n@media (min-width: 992px) {\n .col-md-1, .col-md-2, .col-md-3, .col-md-4, .col-md-5, .col-md-6, .col-md-7, .col-md-8, .col-md-9, .col-md-10, .col-md-11, .col-md-12 {\n float: left;\n }\n .col-md-12 {\n width: 100%;\n }\n .col-md-11 {\n width: 91.66666667%;\n }\n .col-md-10 {\n width: 83.33333333%;\n }\n .col-md-9 {\n width: 75%;\n }\n .col-md-8 {\n width: 66.66666667%;\n }\n .col-md-7 {\n width: 58.33333333%;\n }\n .col-md-6 {\n width: 50%;\n }\n .col-md-5 {\n width: 41.66666667%;\n }\n .col-md-4 {\n width: 33.33333333%;\n }\n .col-md-3 {\n width: 25%;\n }\n .col-md-2 {\n width: 16.66666667%;\n }\n .col-md-1 {\n width: 8.33333333%;\n }\n .col-md-pull-12 {\n right: 100%;\n }\n .col-md-pull-11 {\n right: 91.66666667%;\n }\n .col-md-pull-10 {\n right: 83.33333333%;\n }\n .col-md-pull-9 {\n right: 75%;\n }\n .col-md-pull-8 {\n right: 66.66666667%;\n }\n .col-md-pull-7 {\n right: 58.33333333%;\n }\n .col-md-pull-6 {\n right: 50%;\n }\n .col-md-pull-5 {\n right: 41.66666667%;\n }\n .col-md-pull-4 {\n right: 33.33333333%;\n }\n .col-md-pull-3 {\n right: 25%;\n }\n .col-md-pull-2 {\n right: 16.66666667%;\n }\n .col-md-pull-1 {\n right: 8.33333333%;\n }\n .col-md-pull-0 {\n right: auto;\n }\n .col-md-push-12 {\n left: 100%;\n }\n .col-md-push-11 {\n left: 91.66666667%;\n }\n .col-md-push-10 {\n left: 83.33333333%;\n }\n .col-md-push-9 {\n left: 75%;\n }\n .col-md-push-8 {\n left: 66.66666667%;\n }\n .col-md-push-7 {\n left: 58.33333333%;\n }\n .col-md-push-6 {\n left: 50%;\n }\n .col-md-push-5 {\n left: 41.66666667%;\n }\n .col-md-push-4 {\n left: 33.33333333%;\n }\n .col-md-push-3 {\n left: 25%;\n }\n .col-md-push-2 {\n left: 16.66666667%;\n }\n .col-md-push-1 {\n left: 8.33333333%;\n }\n .col-md-push-0 {\n left: auto;\n }\n .col-md-offset-12 {\n margin-left: 100%;\n }\n .col-md-offset-11 {\n margin-left: 91.66666667%;\n }\n .col-md-offset-10 {\n margin-left: 83.33333333%;\n }\n .col-md-offset-9 {\n margin-left: 75%;\n }\n .col-md-offset-8 {\n margin-left: 66.66666667%;\n }\n .col-md-offset-7 {\n margin-left: 58.33333333%;\n }\n .col-md-offset-6 {\n margin-left: 50%;\n }\n .col-md-offset-5 {\n margin-left: 41.66666667%;\n }\n .col-md-offset-4 {\n margin-left: 33.33333333%;\n }\n .col-md-offset-3 {\n margin-left: 25%;\n }\n .col-md-offset-2 {\n margin-left: 16.66666667%;\n }\n .col-md-offset-1 {\n margin-left: 8.33333333%;\n }\n .col-md-offset-0 {\n margin-left: 0%;\n }\n}\n@media (min-width: 1200px) {\n .col-lg-1, .col-lg-2, .col-lg-3, .col-lg-4, .col-lg-5, .col-lg-6, .col-lg-7, .col-lg-8, .col-lg-9, .col-lg-10, .col-lg-11, .col-lg-12 {\n float: left;\n }\n .col-lg-12 {\n width: 100%;\n }\n .col-lg-11 {\n width: 91.66666667%;\n }\n .col-lg-10 {\n width: 83.33333333%;\n }\n .col-lg-9 {\n width: 75%;\n }\n .col-lg-8 {\n width: 66.66666667%;\n }\n .col-lg-7 {\n width: 58.33333333%;\n }\n .col-lg-6 {\n width: 50%;\n }\n .col-lg-5 {\n width: 41.66666667%;\n }\n .col-lg-4 {\n width: 33.33333333%;\n }\n .col-lg-3 {\n width: 25%;\n }\n .col-lg-2 {\n width: 16.66666667%;\n }\n .col-lg-1 {\n width: 8.33333333%;\n }\n .col-lg-pull-12 {\n right: 100%;\n }\n .col-lg-pull-11 {\n right: 91.66666667%;\n }\n .col-lg-pull-10 {\n right: 83.33333333%;\n }\n .col-lg-pull-9 {\n right: 75%;\n }\n .col-lg-pull-8 {\n right: 66.66666667%;\n }\n .col-lg-pull-7 {\n right: 58.33333333%;\n }\n .col-lg-pull-6 {\n right: 50%;\n }\n .col-lg-pull-5 {\n right: 41.66666667%;\n }\n .col-lg-pull-4 {\n right: 33.33333333%;\n }\n .col-lg-pull-3 {\n right: 25%;\n }\n .col-lg-pull-2 {\n right: 16.66666667%;\n }\n .col-lg-pull-1 {\n right: 8.33333333%;\n }\n .col-lg-pull-0 {\n right: auto;\n }\n .col-lg-push-12 {\n left: 100%;\n }\n .col-lg-push-11 {\n left: 91.66666667%;\n }\n .col-lg-push-10 {\n left: 83.33333333%;\n }\n .col-lg-push-9 {\n left: 75%;\n }\n .col-lg-push-8 {\n left: 66.66666667%;\n }\n .col-lg-push-7 {\n left: 58.33333333%;\n }\n .col-lg-push-6 {\n left: 50%;\n }\n .col-lg-push-5 {\n left: 41.66666667%;\n }\n .col-lg-push-4 {\n left: 33.33333333%;\n }\n .col-lg-push-3 {\n left: 25%;\n }\n .col-lg-push-2 {\n left: 16.66666667%;\n }\n .col-lg-push-1 {\n left: 8.33333333%;\n }\n .col-lg-push-0 {\n left: auto;\n }\n .col-lg-offset-12 {\n margin-left: 100%;\n }\n .col-lg-offset-11 {\n margin-left: 91.66666667%;\n }\n .col-lg-offset-10 {\n margin-left: 83.33333333%;\n }\n .col-lg-offset-9 {\n margin-left: 75%;\n }\n .col-lg-offset-8 {\n margin-left: 66.66666667%;\n }\n .col-lg-offset-7 {\n margin-left: 58.33333333%;\n }\n .col-lg-offset-6 {\n margin-left: 50%;\n }\n .col-lg-offset-5 {\n margin-left: 41.66666667%;\n }\n .col-lg-offset-4 {\n margin-left: 33.33333333%;\n }\n .col-lg-offset-3 {\n margin-left: 25%;\n }\n .col-lg-offset-2 {\n margin-left: 16.66666667%;\n }\n .col-lg-offset-1 {\n margin-left: 8.33333333%;\n }\n .col-lg-offset-0 {\n margin-left: 0%;\n }\n}\ntable {\n background-color: transparent;\n}\ncaption {\n padding-top: 8px;\n padding-bottom: 8px;\n color: #777777;\n text-align: left;\n}\nth {\n text-align: left;\n}\n.table {\n width: 100%;\n max-width: 100%;\n margin-bottom: 20px;\n}\n.table > thead > tr > th,\n.table > tbody > tr > th,\n.table > tfoot > tr > th,\n.table > thead > tr > td,\n.table > tbody > tr > td,\n.table > tfoot > tr > td {\n padding: 8px;\n line-height: 1.42857143;\n vertical-align: top;\n border-top: 1px solid #ddd;\n}\n.table > thead > tr > th {\n vertical-align: bottom;\n border-bottom: 2px solid #ddd;\n}\n.table > caption + thead > tr:first-child > th,\n.table > colgroup + thead > tr:first-child > th,\n.table > thead:first-child > tr:first-child > th,\n.table > caption + thead > tr:first-child > td,\n.table > colgroup + thead > tr:first-child > td,\n.table > thead:first-child > tr:first-child > td {\n border-top: 0;\n}\n.table > tbody + tbody {\n border-top: 2px solid #ddd;\n}\n.table .table {\n background-color: #fff;\n}\n.table-condensed > thead > tr > th,\n.table-condensed > tbody > tr > th,\n.table-condensed > tfoot > tr > th,\n.table-condensed > thead > tr > td,\n.table-condensed > tbody > tr > td,\n.table-condensed > tfoot > tr > td {\n padding: 5px;\n}\n.table-bordered {\n border: 1px solid #ddd;\n}\n.table-bordered > thead > tr > th,\n.table-bordered > tbody > tr > th,\n.table-bordered > tfoot > tr > th,\n.table-bordered > thead > tr > td,\n.table-bordered > tbody > tr > td,\n.table-bordered > tfoot > tr > td {\n border: 1px solid #ddd;\n}\n.table-bordered > thead > tr > th,\n.table-bordered > thead > tr > td {\n border-bottom-width: 2px;\n}\n.table-striped > tbody > tr:nth-of-type(odd) {\n background-color: #f9f9f9;\n}\n.table-hover > tbody > tr:hover {\n background-color: #f5f5f5;\n}\ntable col[class*=\"col-\"] {\n position: static;\n float: none;\n display: table-column;\n}\ntable td[class*=\"col-\"],\ntable th[class*=\"col-\"] {\n position: static;\n float: none;\n display: table-cell;\n}\n.table > thead > tr > td.active,\n.table > tbody > tr > td.active,\n.table > tfoot > tr > td.active,\n.table > thead > tr > th.active,\n.table > tbody > tr > th.active,\n.table > tfoot > tr > th.active,\n.table > thead > tr.active > td,\n.table > tbody > tr.active > td,\n.table > tfoot > tr.active > td,\n.table > thead > tr.active > th,\n.table > tbody > tr.active > th,\n.table > tfoot > tr.active > th {\n background-color: #f5f5f5;\n}\n.table-hover > tbody > tr > td.active:hover,\n.table-hover > tbody > tr > th.active:hover,\n.table-hover > tbody > tr.active:hover > td,\n.table-hover > tbody > tr:hover > .active,\n.table-hover > tbody > tr.active:hover > th {\n background-color: #e8e8e8;\n}\n.table > thead > tr > td.success,\n.table > tbody > tr > td.success,\n.table > tfoot > tr > td.success,\n.table > thead > tr > th.success,\n.table > tbody > tr > th.success,\n.table > tfoot > tr > th.success,\n.table > thead > tr.success > td,\n.table > tbody > tr.success > td,\n.table > tfoot > tr.success > td,\n.table > thead > tr.success > th,\n.table > tbody > tr.success > th,\n.table > tfoot > tr.success > th {\n background-color: #dff0d8;\n}\n.table-hover > tbody > tr > td.success:hover,\n.table-hover > tbody > tr > th.success:hover,\n.table-hover > tbody > tr.success:hover > td,\n.table-hover > tbody > tr:hover > .success,\n.table-hover > tbody > tr.success:hover > th {\n background-color: #d0e9c6;\n}\n.table > thead > tr > td.info,\n.table > tbody > tr > td.info,\n.table > tfoot > tr > td.info,\n.table > thead > tr > th.info,\n.table > tbody > tr > th.info,\n.table > tfoot > tr > th.info,\n.table > thead > tr.info > td,\n.table > tbody > tr.info > td,\n.table > tfoot > tr.info > td,\n.table > thead > tr.info > th,\n.table > tbody > tr.info > th,\n.table > tfoot > tr.info > th {\n background-color: #d9edf7;\n}\n.table-hover > tbody > tr > td.info:hover,\n.table-hover > tbody > tr > th.info:hover,\n.table-hover > tbody > tr.info:hover > td,\n.table-hover > tbody > tr:hover > .info,\n.table-hover > tbody > tr.info:hover > th {\n background-color: #c4e3f3;\n}\n.table > thead > tr > td.warning,\n.table > tbody > tr > td.warning,\n.table > tfoot > tr > td.warning,\n.table > thead > tr > th.warning,\n.table > tbody > tr > th.warning,\n.table > tfoot > tr > th.warning,\n.table > thead > tr.warning > td,\n.table > tbody > tr.warning > td,\n.table > tfoot > tr.warning > td,\n.table > thead > tr.warning > th,\n.table > tbody > tr.warning > th,\n.table > tfoot > tr.warning > th {\n background-color: #fcf8e3;\n}\n.table-hover > tbody > tr > td.warning:hover,\n.table-hover > tbody > tr > th.warning:hover,\n.table-hover > tbody > tr.warning:hover > td,\n.table-hover > tbody > tr:hover > .warning,\n.table-hover > tbody > tr.warning:hover > th {\n background-color: #faf2cc;\n}\n.table > thead > tr > td.danger,\n.table > tbody > tr > td.danger,\n.table > tfoot > tr > td.danger,\n.table > thead > tr > th.danger,\n.table > tbody > tr > th.danger,\n.table > tfoot > tr > th.danger,\n.table > thead > tr.danger > td,\n.table > tbody > tr.danger > td,\n.table > tfoot > tr.danger > td,\n.table > thead > tr.danger > th,\n.table > tbody > tr.danger > th,\n.table > tfoot > tr.danger > th {\n background-color: #f2dede;\n}\n.table-hover > tbody > tr > td.danger:hover,\n.table-hover > tbody > tr > th.danger:hover,\n.table-hover > tbody > tr.danger:hover > td,\n.table-hover > tbody > tr:hover > .danger,\n.table-hover > tbody > tr.danger:hover > th {\n background-color: #ebcccc;\n}\n.table-responsive {\n overflow-x: auto;\n min-height: 0.01%;\n}\n@media screen and (max-width: 767px) {\n .table-responsive {\n width: 100%;\n margin-bottom: 15px;\n overflow-y: hidden;\n -ms-overflow-style: -ms-autohiding-scrollbar;\n border: 1px solid #ddd;\n }\n .table-responsive > .table {\n margin-bottom: 0;\n }\n .table-responsive > .table > thead > tr > th,\n .table-responsive > .table > tbody > tr > th,\n .table-responsive > .table > tfoot > tr > th,\n .table-responsive > .table > thead > tr > td,\n .table-responsive > .table > tbody > tr > td,\n .table-responsive > .table > tfoot > tr > td {\n white-space: nowrap;\n }\n .table-responsive > .table-bordered {\n border: 0;\n }\n .table-responsive > .table-bordered > thead > tr > th:first-child,\n .table-responsive > .table-bordered > tbody > tr > th:first-child,\n .table-responsive > .table-bordered > tfoot > tr > th:first-child,\n .table-responsive > .table-bordered > thead > tr > td:first-child,\n .table-responsive > .table-bordered > tbody > tr > td:first-child,\n .table-responsive > .table-bordered > tfoot > tr > td:first-child {\n border-left: 0;\n }\n .table-responsive > .table-bordered > thead > tr > th:last-child,\n .table-responsive > .table-bordered > tbody > tr > th:last-child,\n .table-responsive > .table-bordered > tfoot > tr > th:last-child,\n .table-responsive > .table-bordered > thead > tr > td:last-child,\n .table-responsive > .table-bordered > tbody > tr > td:last-child,\n .table-responsive > .table-bordered > tfoot > tr > td:last-child {\n border-right: 0;\n }\n .table-responsive > .table-bordered > tbody > tr:last-child > th,\n .table-responsive > .table-bordered > tfoot > tr:last-child > th,\n .table-responsive > .table-bordered > tbody > tr:last-child > td,\n .table-responsive > .table-bordered > tfoot > tr:last-child > td {\n border-bottom: 0;\n }\n}\nfieldset {\n padding: 0;\n margin: 0;\n border: 0;\n min-width: 0;\n}\nlegend {\n display: block;\n width: 100%;\n padding: 0;\n margin-bottom: 20px;\n font-size: 21px;\n line-height: inherit;\n color: #333333;\n border: 0;\n border-bottom: 1px solid #e5e5e5;\n}\nlabel {\n display: inline-block;\n max-width: 100%;\n margin-bottom: 5px;\n font-weight: bold;\n}\ninput[type=\"search\"] {\n -webkit-box-sizing: border-box;\n -moz-box-sizing: border-box;\n box-sizing: border-box;\n}\ninput[type=\"radio\"],\ninput[type=\"checkbox\"] {\n margin: 4px 0 0;\n margin-top: 1px \\9;\n line-height: normal;\n}\ninput[type=\"file\"] {\n display: block;\n}\ninput[type=\"range\"] {\n display: block;\n width: 100%;\n}\nselect[multiple],\nselect[size] {\n height: auto;\n}\ninput[type=\"file\"]:focus,\ninput[type=\"radio\"]:focus,\ninput[type=\"checkbox\"]:focus {\n outline: 5px auto -webkit-focus-ring-color;\n outline-offset: -2px;\n}\noutput {\n display: block;\n padding-top: 7px;\n font-size: 14px;\n line-height: 1.42857143;\n color: #555555;\n}\n.form-control {\n display: block;\n width: 100%;\n height: 34px;\n padding: 6px 12px;\n font-size: 14px;\n line-height: 1.42857143;\n color: #555555;\n background-color: #fff;\n background-image: none;\n border: 1px solid #ccc;\n border-radius: 4px;\n -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);\n box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);\n -webkit-transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;\n -o-transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;\n transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;\n}\n.form-control:focus {\n border-color: #66afe9;\n outline: 0;\n -webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(102, 175, 233, 0.6);\n box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(102, 175, 233, 0.6);\n}\n.form-control::-moz-placeholder {\n color: #999;\n opacity: 1;\n}\n.form-control:-ms-input-placeholder {\n color: #999;\n}\n.form-control::-webkit-input-placeholder {\n color: #999;\n}\n.form-control::-ms-expand {\n border: 0;\n background-color: transparent;\n}\n.form-control[disabled],\n.form-control[readonly],\nfieldset[disabled] .form-control {\n background-color: #eeeeee;\n opacity: 1;\n}\n.form-control[disabled],\nfieldset[disabled] .form-control {\n cursor: not-allowed;\n}\ntextarea.form-control {\n height: auto;\n}\ninput[type=\"search\"] {\n -webkit-appearance: none;\n}\n@media screen and (-webkit-min-device-pixel-ratio: 0) {\n input[type=\"date\"].form-control,\n input[type=\"time\"].form-control,\n input[type=\"datetime-local\"].form-control,\n input[type=\"month\"].form-control {\n line-height: 34px;\n }\n input[type=\"date\"].input-sm,\n input[type=\"time\"].input-sm,\n input[type=\"datetime-local\"].input-sm,\n input[type=\"month\"].input-sm,\n .input-group-sm input[type=\"date\"],\n .input-group-sm input[type=\"time\"],\n .input-group-sm input[type=\"datetime-local\"],\n .input-group-sm input[type=\"month\"] {\n line-height: 30px;\n }\n input[type=\"date\"].input-lg,\n input[type=\"time\"].input-lg,\n input[type=\"datetime-local\"].input-lg,\n input[type=\"month\"].input-lg,\n .input-group-lg input[type=\"date\"],\n .input-group-lg input[type=\"time\"],\n .input-group-lg input[type=\"datetime-local\"],\n .input-group-lg input[type=\"month\"] {\n line-height: 46px;\n }\n}\n.form-group {\n margin-bottom: 15px;\n}\n.radio,\n.checkbox {\n position: relative;\n display: block;\n margin-top: 10px;\n margin-bottom: 10px;\n}\n.radio label,\n.checkbox label {\n min-height: 20px;\n padding-left: 20px;\n margin-bottom: 0;\n font-weight: normal;\n cursor: pointer;\n}\n.radio input[type=\"radio\"],\n.radio-inline input[type=\"radio\"],\n.checkbox input[type=\"checkbox\"],\n.checkbox-inline input[type=\"checkbox\"] {\n position: absolute;\n margin-left: -20px;\n margin-top: 4px \\9;\n}\n.radio + .radio,\n.checkbox + .checkbox {\n margin-top: -5px;\n}\n.radio-inline,\n.checkbox-inline {\n position: relative;\n display: inline-block;\n padding-left: 20px;\n margin-bottom: 0;\n vertical-align: middle;\n font-weight: normal;\n cursor: pointer;\n}\n.radio-inline + .radio-inline,\n.checkbox-inline + .checkbox-inline {\n margin-top: 0;\n margin-left: 10px;\n}\ninput[type=\"radio\"][disabled],\ninput[type=\"checkbox\"][disabled],\ninput[type=\"radio\"].disabled,\ninput[type=\"checkbox\"].disabled,\nfieldset[disabled] input[type=\"radio\"],\nfieldset[disabled] input[type=\"checkbox\"] {\n cursor: not-allowed;\n}\n.radio-inline.disabled,\n.checkbox-inline.disabled,\nfieldset[disabled] .radio-inline,\nfieldset[disabled] .checkbox-inline {\n cursor: not-allowed;\n}\n.radio.disabled label,\n.checkbox.disabled label,\nfieldset[disabled] .radio label,\nfieldset[disabled] .checkbox label {\n cursor: not-allowed;\n}\n.form-control-static {\n padding-top: 7px;\n padding-bottom: 7px;\n margin-bottom: 0;\n min-height: 34px;\n}\n.form-control-static.input-lg,\n.form-control-static.input-sm {\n padding-left: 0;\n padding-right: 0;\n}\n.input-sm {\n height: 30px;\n padding: 5px 10px;\n font-size: 12px;\n line-height: 1.5;\n border-radius: 3px;\n}\nselect.input-sm {\n height: 30px;\n line-height: 30px;\n}\ntextarea.input-sm,\nselect[multiple].input-sm {\n height: auto;\n}\n.form-group-sm .form-control {\n height: 30px;\n padding: 5px 10px;\n font-size: 12px;\n line-height: 1.5;\n border-radius: 3px;\n}\n.form-group-sm select.form-control {\n height: 30px;\n line-height: 30px;\n}\n.form-group-sm textarea.form-control,\n.form-group-sm select[multiple].form-control {\n height: auto;\n}\n.form-group-sm .form-control-static {\n height: 30px;\n min-height: 32px;\n padding: 6px 10px;\n font-size: 12px;\n line-height: 1.5;\n}\n.input-lg {\n height: 46px;\n padding: 10px 16px;\n font-size: 18px;\n line-height: 1.3333333;\n border-radius: 6px;\n}\nselect.input-lg {\n height: 46px;\n line-height: 46px;\n}\ntextarea.input-lg,\nselect[multiple].input-lg {\n height: auto;\n}\n.form-group-lg .form-control {\n height: 46px;\n padding: 10px 16px;\n font-size: 18px;\n line-height: 1.3333333;\n border-radius: 6px;\n}\n.form-group-lg select.form-control {\n height: 46px;\n line-height: 46px;\n}\n.form-group-lg textarea.form-control,\n.form-group-lg select[multiple].form-control {\n height: auto;\n}\n.form-group-lg .form-control-static {\n height: 46px;\n min-height: 38px;\n padding: 11px 16px;\n font-size: 18px;\n line-height: 1.3333333;\n}\n.has-feedback {\n position: relative;\n}\n.has-feedback .form-control {\n padding-right: 42.5px;\n}\n.form-control-feedback {\n position: absolute;\n top: 0;\n right: 0;\n z-index: 2;\n display: block;\n width: 34px;\n height: 34px;\n line-height: 34px;\n text-align: center;\n pointer-events: none;\n}\n.input-lg + .form-control-feedback,\n.input-group-lg + .form-control-feedback,\n.form-group-lg .form-control + .form-control-feedback {\n width: 46px;\n height: 46px;\n line-height: 46px;\n}\n.input-sm + .form-control-feedback,\n.input-group-sm + .form-control-feedback,\n.form-group-sm .form-control + .form-control-feedback {\n width: 30px;\n height: 30px;\n line-height: 30px;\n}\n.has-success .help-block,\n.has-success .control-label,\n.has-success .radio,\n.has-success .checkbox,\n.has-success .radio-inline,\n.has-success .checkbox-inline,\n.has-success.radio label,\n.has-success.checkbox label,\n.has-success.radio-inline label,\n.has-success.checkbox-inline label {\n color: #3c763d;\n}\n.has-success .form-control {\n border-color: #3c763d;\n -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);\n box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);\n}\n.has-success .form-control:focus {\n border-color: #2b542c;\n -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #67b168;\n box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #67b168;\n}\n.has-success .input-group-addon {\n color: #3c763d;\n border-color: #3c763d;\n background-color: #dff0d8;\n}\n.has-success .form-control-feedback {\n color: #3c763d;\n}\n.has-warning .help-block,\n.has-warning .control-label,\n.has-warning .radio,\n.has-warning .checkbox,\n.has-warning .radio-inline,\n.has-warning .checkbox-inline,\n.has-warning.radio label,\n.has-warning.checkbox label,\n.has-warning.radio-inline label,\n.has-warning.checkbox-inline label {\n color: #8a6d3b;\n}\n.has-warning .form-control {\n border-color: #8a6d3b;\n -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);\n box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);\n}\n.has-warning .form-control:focus {\n border-color: #66512c;\n -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #c0a16b;\n box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #c0a16b;\n}\n.has-warning .input-group-addon {\n color: #8a6d3b;\n border-color: #8a6d3b;\n background-color: #fcf8e3;\n}\n.has-warning .form-control-feedback {\n color: #8a6d3b;\n}\n.has-error .help-block,\n.has-error .control-label,\n.has-error .radio,\n.has-error .checkbox,\n.has-error .radio-inline,\n.has-error .checkbox-inline,\n.has-error.radio label,\n.has-error.checkbox label,\n.has-error.radio-inline label,\n.has-error.checkbox-inline label {\n color: #a94442;\n}\n.has-error .form-control {\n border-color: #a94442;\n -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);\n box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);\n}\n.has-error .form-control:focus {\n border-color: #843534;\n -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #ce8483;\n box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #ce8483;\n}\n.has-error .input-group-addon {\n color: #a94442;\n border-color: #a94442;\n background-color: #f2dede;\n}\n.has-error .form-control-feedback {\n color: #a94442;\n}\n.has-feedback label ~ .form-control-feedback {\n top: 25px;\n}\n.has-feedback label.sr-only ~ .form-control-feedback {\n top: 0;\n}\n.help-block {\n display: block;\n margin-top: 5px;\n margin-bottom: 10px;\n color: #737373;\n}\n@media (min-width: 768px) {\n .form-inline .form-group {\n display: inline-block;\n margin-bottom: 0;\n vertical-align: middle;\n }\n .form-inline .form-control {\n display: inline-block;\n width: auto;\n vertical-align: middle;\n }\n .form-inline .form-control-static {\n display: inline-block;\n }\n .form-inline .input-group {\n display: inline-table;\n vertical-align: middle;\n }\n .form-inline .input-group .input-group-addon,\n .form-inline .input-group .input-group-btn,\n .form-inline .input-group .form-control {\n width: auto;\n }\n .form-inline .input-group > .form-control {\n width: 100%;\n }\n .form-inline .control-label {\n margin-bottom: 0;\n vertical-align: middle;\n }\n .form-inline .radio,\n .form-inline .checkbox {\n display: inline-block;\n margin-top: 0;\n margin-bottom: 0;\n vertical-align: middle;\n }\n .form-inline .radio label,\n .form-inline .checkbox label {\n padding-left: 0;\n }\n .form-inline .radio input[type=\"radio\"],\n .form-inline .checkbox input[type=\"checkbox\"] {\n position: relative;\n margin-left: 0;\n }\n .form-inline .has-feedback .form-control-feedback {\n top: 0;\n }\n}\n.form-horizontal .radio,\n.form-horizontal .checkbox,\n.form-horizontal .radio-inline,\n.form-horizontal .checkbox-inline {\n margin-top: 0;\n margin-bottom: 0;\n padding-top: 7px;\n}\n.form-horizontal .radio,\n.form-horizontal .checkbox {\n min-height: 27px;\n}\n.form-horizontal .form-group {\n margin-left: -15px;\n margin-right: -15px;\n}\n@media (min-width: 768px) {\n .form-horizontal .control-label {\n text-align: right;\n margin-bottom: 0;\n padding-top: 7px;\n }\n}\n.form-horizontal .has-feedback .form-control-feedback {\n right: 15px;\n}\n@media (min-width: 768px) {\n .form-horizontal .form-group-lg .control-label {\n padding-top: 11px;\n font-size: 18px;\n }\n}\n@media (min-width: 768px) {\n .form-horizontal .form-group-sm .control-label {\n padding-top: 6px;\n font-size: 12px;\n }\n}\n.btn {\n display: inline-block;\n margin-bottom: 0;\n font-weight: normal;\n text-align: center;\n vertical-align: middle;\n touch-action: manipulation;\n cursor: pointer;\n background-image: none;\n border: 1px solid transparent;\n white-space: nowrap;\n padding: 6px 12px;\n font-size: 14px;\n line-height: 1.42857143;\n border-radius: 4px;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n}\n.btn:focus,\n.btn:active:focus,\n.btn.active:focus,\n.btn.focus,\n.btn:active.focus,\n.btn.active.focus {\n outline: 5px auto -webkit-focus-ring-color;\n outline-offset: -2px;\n}\n.btn:hover,\n.btn:focus,\n.btn.focus {\n color: #333;\n text-decoration: none;\n}\n.btn:active,\n.btn.active {\n outline: 0;\n background-image: none;\n -webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);\n box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);\n}\n.btn.disabled,\n.btn[disabled],\nfieldset[disabled] .btn {\n cursor: not-allowed;\n opacity: 0.65;\n filter: alpha(opacity=65);\n -webkit-box-shadow: none;\n box-shadow: none;\n}\na.btn.disabled,\nfieldset[disabled] a.btn {\n pointer-events: none;\n}\n.btn-default {\n color: #333;\n background-color: #fff;\n border-color: #ccc;\n}\n.btn-default:focus,\n.btn-default.focus {\n color: #333;\n background-color: #e6e6e6;\n border-color: #8c8c8c;\n}\n.btn-default:hover {\n color: #333;\n background-color: #e6e6e6;\n border-color: #adadad;\n}\n.btn-default:active,\n.btn-default.active,\n.open > .dropdown-toggle.btn-default {\n color: #333;\n background-color: #e6e6e6;\n border-color: #adadad;\n}\n.btn-default:active:hover,\n.btn-default.active:hover,\n.open > .dropdown-toggle.btn-default:hover,\n.btn-default:active:focus,\n.btn-default.active:focus,\n.open > .dropdown-toggle.btn-default:focus,\n.btn-default:active.focus,\n.btn-default.active.focus,\n.open > .dropdown-toggle.btn-default.focus {\n color: #333;\n background-color: #d4d4d4;\n border-color: #8c8c8c;\n}\n.btn-default:active,\n.btn-default.active,\n.open > .dropdown-toggle.btn-default {\n background-image: none;\n}\n.btn-default.disabled:hover,\n.btn-default[disabled]:hover,\nfieldset[disabled] .btn-default:hover,\n.btn-default.disabled:focus,\n.btn-default[disabled]:focus,\nfieldset[disabled] .btn-default:focus,\n.btn-default.disabled.focus,\n.btn-default[disabled].focus,\nfieldset[disabled] .btn-default.focus {\n background-color: #fff;\n border-color: #ccc;\n}\n.btn-default .badge {\n color: #fff;\n background-color: #333;\n}\n.btn-primary {\n color: #fff;\n background-color: #337ab7;\n border-color: #2e6da4;\n}\n.btn-primary:focus,\n.btn-primary.focus {\n color: #fff;\n background-color: #286090;\n border-color: #122b40;\n}\n.btn-primary:hover {\n color: #fff;\n background-color: #286090;\n border-color: #204d74;\n}\n.btn-primary:active,\n.btn-primary.active,\n.open > .dropdown-toggle.btn-primary {\n color: #fff;\n background-color: #286090;\n border-color: #204d74;\n}\n.btn-primary:active:hover,\n.btn-primary.active:hover,\n.open > .dropdown-toggle.btn-primary:hover,\n.btn-primary:active:focus,\n.btn-primary.active:focus,\n.open > .dropdown-toggle.btn-primary:focus,\n.btn-primary:active.focus,\n.btn-primary.active.focus,\n.open > .dropdown-toggle.btn-primary.focus {\n color: #fff;\n background-color: #204d74;\n border-color: #122b40;\n}\n.btn-primary:active,\n.btn-primary.active,\n.open > .dropdown-toggle.btn-primary {\n background-image: none;\n}\n.btn-primary.disabled:hover,\n.btn-primary[disabled]:hover,\nfieldset[disabled] .btn-primary:hover,\n.btn-primary.disabled:focus,\n.btn-primary[disabled]:focus,\nfieldset[disabled] .btn-primary:focus,\n.btn-primary.disabled.focus,\n.btn-primary[disabled].focus,\nfieldset[disabled] .btn-primary.focus {\n background-color: #337ab7;\n border-color: #2e6da4;\n}\n.btn-primary .badge {\n color: #337ab7;\n background-color: #fff;\n}\n.btn-success {\n color: #fff;\n background-color: #5cb85c;\n border-color: #4cae4c;\n}\n.btn-success:focus,\n.btn-success.focus {\n color: #fff;\n background-color: #449d44;\n border-color: #255625;\n}\n.btn-success:hover {\n color: #fff;\n background-color: #449d44;\n border-color: #398439;\n}\n.btn-success:active,\n.btn-success.active,\n.open > .dropdown-toggle.btn-success {\n color: #fff;\n background-color: #449d44;\n border-color: #398439;\n}\n.btn-success:active:hover,\n.btn-success.active:hover,\n.open > .dropdown-toggle.btn-success:hover,\n.btn-success:active:focus,\n.btn-success.active:focus,\n.open > .dropdown-toggle.btn-success:focus,\n.btn-success:active.focus,\n.btn-success.active.focus,\n.open > .dropdown-toggle.btn-success.focus {\n color: #fff;\n background-color: #398439;\n border-color: #255625;\n}\n.btn-success:active,\n.btn-success.active,\n.open > .dropdown-toggle.btn-success {\n background-image: none;\n}\n.btn-success.disabled:hover,\n.btn-success[disabled]:hover,\nfieldset[disabled] .btn-success:hover,\n.btn-success.disabled:focus,\n.btn-success[disabled]:focus,\nfieldset[disabled] .btn-success:focus,\n.btn-success.disabled.focus,\n.btn-success[disabled].focus,\nfieldset[disabled] .btn-success.focus {\n background-color: #5cb85c;\n border-color: #4cae4c;\n}\n.btn-success .badge {\n color: #5cb85c;\n background-color: #fff;\n}\n.btn-info {\n color: #fff;\n background-color: #5bc0de;\n border-color: #46b8da;\n}\n.btn-info:focus,\n.btn-info.focus {\n color: #fff;\n background-color: #31b0d5;\n border-color: #1b6d85;\n}\n.btn-info:hover {\n color: #fff;\n background-color: #31b0d5;\n border-color: #269abc;\n}\n.btn-info:active,\n.btn-info.active,\n.open > .dropdown-toggle.btn-info {\n color: #fff;\n background-color: #31b0d5;\n border-color: #269abc;\n}\n.btn-info:active:hover,\n.btn-info.active:hover,\n.open > .dropdown-toggle.btn-info:hover,\n.btn-info:active:focus,\n.btn-info.active:focus,\n.open > .dropdown-toggle.btn-info:focus,\n.btn-info:active.focus,\n.btn-info.active.focus,\n.open > .dropdown-toggle.btn-info.focus {\n color: #fff;\n background-color: #269abc;\n border-color: #1b6d85;\n}\n.btn-info:active,\n.btn-info.active,\n.open > .dropdown-toggle.btn-info {\n background-image: none;\n}\n.btn-info.disabled:hover,\n.btn-info[disabled]:hover,\nfieldset[disabled] .btn-info:hover,\n.btn-info.disabled:focus,\n.btn-info[disabled]:focus,\nfieldset[disabled] .btn-info:focus,\n.btn-info.disabled.focus,\n.btn-info[disabled].focus,\nfieldset[disabled] .btn-info.focus {\n background-color: #5bc0de;\n border-color: #46b8da;\n}\n.btn-info .badge {\n color: #5bc0de;\n background-color: #fff;\n}\n.btn-warning {\n color: #fff;\n background-color: #f0ad4e;\n border-color: #eea236;\n}\n.btn-warning:focus,\n.btn-warning.focus {\n color: #fff;\n background-color: #ec971f;\n border-color: #985f0d;\n}\n.btn-warning:hover {\n color: #fff;\n background-color: #ec971f;\n border-color: #d58512;\n}\n.btn-warning:active,\n.btn-warning.active,\n.open > .dropdown-toggle.btn-warning {\n color: #fff;\n background-color: #ec971f;\n border-color: #d58512;\n}\n.btn-warning:active:hover,\n.btn-warning.active:hover,\n.open > .dropdown-toggle.btn-warning:hover,\n.btn-warning:active:focus,\n.btn-warning.active:focus,\n.open > .dropdown-toggle.btn-warning:focus,\n.btn-warning:active.focus,\n.btn-warning.active.focus,\n.open > .dropdown-toggle.btn-warning.focus {\n color: #fff;\n background-color: #d58512;\n border-color: #985f0d;\n}\n.btn-warning:active,\n.btn-warning.active,\n.open > .dropdown-toggle.btn-warning {\n background-image: none;\n}\n.btn-warning.disabled:hover,\n.btn-warning[disabled]:hover,\nfieldset[disabled] .btn-warning:hover,\n.btn-warning.disabled:focus,\n.btn-warning[disabled]:focus,\nfieldset[disabled] .btn-warning:focus,\n.btn-warning.disabled.focus,\n.btn-warning[disabled].focus,\nfieldset[disabled] .btn-warning.focus {\n background-color: #f0ad4e;\n border-color: #eea236;\n}\n.btn-warning .badge {\n color: #f0ad4e;\n background-color: #fff;\n}\n.btn-danger {\n color: #fff;\n background-color: #d9534f;\n border-color: #d43f3a;\n}\n.btn-danger:focus,\n.btn-danger.focus {\n color: #fff;\n background-color: #c9302c;\n border-color: #761c19;\n}\n.btn-danger:hover {\n color: #fff;\n background-color: #c9302c;\n border-color: #ac2925;\n}\n.btn-danger:active,\n.btn-danger.active,\n.open > .dropdown-toggle.btn-danger {\n color: #fff;\n background-color: #c9302c;\n border-color: #ac2925;\n}\n.btn-danger:active:hover,\n.btn-danger.active:hover,\n.open > .dropdown-toggle.btn-danger:hover,\n.btn-danger:active:focus,\n.btn-danger.active:focus,\n.open > .dropdown-toggle.btn-danger:focus,\n.btn-danger:active.focus,\n.btn-danger.active.focus,\n.open > .dropdown-toggle.btn-danger.focus {\n color: #fff;\n background-color: #ac2925;\n border-color: #761c19;\n}\n.btn-danger:active,\n.btn-danger.active,\n.open > .dropdown-toggle.btn-danger {\n background-image: none;\n}\n.btn-danger.disabled:hover,\n.btn-danger[disabled]:hover,\nfieldset[disabled] .btn-danger:hover,\n.btn-danger.disabled:focus,\n.btn-danger[disabled]:focus,\nfieldset[disabled] .btn-danger:focus,\n.btn-danger.disabled.focus,\n.btn-danger[disabled].focus,\nfieldset[disabled] .btn-danger.focus {\n background-color: #d9534f;\n border-color: #d43f3a;\n}\n.btn-danger .badge {\n color: #d9534f;\n background-color: #fff;\n}\n.btn-link {\n color: #337ab7;\n font-weight: normal;\n border-radius: 0;\n}\n.btn-link,\n.btn-link:active,\n.btn-link.active,\n.btn-link[disabled],\nfieldset[disabled] .btn-link {\n background-color: transparent;\n -webkit-box-shadow: none;\n box-shadow: none;\n}\n.btn-link,\n.btn-link:hover,\n.btn-link:focus,\n.btn-link:active {\n border-color: transparent;\n}\n.btn-link:hover,\n.btn-link:focus {\n color: #23527c;\n text-decoration: underline;\n background-color: transparent;\n}\n.btn-link[disabled]:hover,\nfieldset[disabled] .btn-link:hover,\n.btn-link[disabled]:focus,\nfieldset[disabled] .btn-link:focus {\n color: #777777;\n text-decoration: none;\n}\n.btn-lg,\n.btn-group-lg > .btn {\n padding: 10px 16px;\n font-size: 18px;\n line-height: 1.3333333;\n border-radius: 6px;\n}\n.btn-sm,\n.btn-group-sm > .btn {\n padding: 5px 10px;\n font-size: 12px;\n line-height: 1.5;\n border-radius: 3px;\n}\n.btn-xs,\n.btn-group-xs > .btn {\n padding: 1px 5px;\n font-size: 12px;\n line-height: 1.5;\n border-radius: 3px;\n}\n.btn-block {\n display: block;\n width: 100%;\n}\n.btn-block + .btn-block {\n margin-top: 5px;\n}\ninput[type=\"submit\"].btn-block,\ninput[type=\"reset\"].btn-block,\ninput[type=\"button\"].btn-block {\n width: 100%;\n}\n.fade {\n opacity: 0;\n -webkit-transition: opacity 0.15s linear;\n -o-transition: opacity 0.15s linear;\n transition: opacity 0.15s linear;\n}\n.fade.in {\n opacity: 1;\n}\n.collapse {\n display: none;\n}\n.collapse.in {\n display: block;\n}\ntr.collapse.in {\n display: table-row;\n}\ntbody.collapse.in {\n display: table-row-group;\n}\n.collapsing {\n position: relative;\n height: 0;\n overflow: hidden;\n -webkit-transition-property: height, visibility;\n transition-property: height, visibility;\n -webkit-transition-duration: 0.35s;\n transition-duration: 0.35s;\n -webkit-transition-timing-function: ease;\n transition-timing-function: ease;\n}\n.caret {\n display: inline-block;\n width: 0;\n height: 0;\n margin-left: 2px;\n vertical-align: middle;\n border-top: 4px dashed;\n border-top: 4px solid \\9;\n border-right: 4px solid transparent;\n border-left: 4px solid transparent;\n}\n.dropup,\n.dropdown {\n position: relative;\n}\n.dropdown-toggle:focus {\n outline: 0;\n}\n.dropdown-menu {\n position: absolute;\n top: 100%;\n left: 0;\n z-index: 1000;\n display: none;\n float: left;\n min-width: 160px;\n padding: 5px 0;\n margin: 2px 0 0;\n list-style: none;\n font-size: 14px;\n text-align: left;\n background-color: #fff;\n border: 1px solid #ccc;\n border: 1px solid rgba(0, 0, 0, 0.15);\n border-radius: 4px;\n -webkit-box-shadow: 0 6px 12px rgba(0, 0, 0, 0.175);\n box-shadow: 0 6px 12px rgba(0, 0, 0, 0.175);\n background-clip: padding-box;\n}\n.dropdown-menu.pull-right {\n right: 0;\n left: auto;\n}\n.dropdown-menu .divider {\n height: 1px;\n margin: 9px 0;\n overflow: hidden;\n background-color: #e5e5e5;\n}\n.dropdown-menu > li > a {\n display: block;\n padding: 3px 20px;\n clear: both;\n font-weight: normal;\n line-height: 1.42857143;\n color: #333333;\n white-space: nowrap;\n}\n.dropdown-menu > li > a:hover,\n.dropdown-menu > li > a:focus {\n text-decoration: none;\n color: #262626;\n background-color: #f5f5f5;\n}\n.dropdown-menu > .active > a,\n.dropdown-menu > .active > a:hover,\n.dropdown-menu > .active > a:focus {\n color: #fff;\n text-decoration: none;\n outline: 0;\n background-color: #337ab7;\n}\n.dropdown-menu > .disabled > a,\n.dropdown-menu > .disabled > a:hover,\n.dropdown-menu > .disabled > a:focus {\n color: #777777;\n}\n.dropdown-menu > .disabled > a:hover,\n.dropdown-menu > .disabled > a:focus {\n text-decoration: none;\n background-color: transparent;\n background-image: none;\n filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);\n cursor: not-allowed;\n}\n.open > .dropdown-menu {\n display: block;\n}\n.open > a {\n outline: 0;\n}\n.dropdown-menu-right {\n left: auto;\n right: 0;\n}\n.dropdown-menu-left {\n left: 0;\n right: auto;\n}\n.dropdown-header {\n display: block;\n padding: 3px 20px;\n font-size: 12px;\n line-height: 1.42857143;\n color: #777777;\n white-space: nowrap;\n}\n.dropdown-backdrop {\n position: fixed;\n left: 0;\n right: 0;\n bottom: 0;\n top: 0;\n z-index: 990;\n}\n.pull-right > .dropdown-menu {\n right: 0;\n left: auto;\n}\n.dropup .caret,\n.navbar-fixed-bottom .dropdown .caret {\n border-top: 0;\n border-bottom: 4px dashed;\n border-bottom: 4px solid \\9;\n content: \"\";\n}\n.dropup .dropdown-menu,\n.navbar-fixed-bottom .dropdown .dropdown-menu {\n top: auto;\n bottom: 100%;\n margin-bottom: 2px;\n}\n@media (min-width: 768px) {\n .navbar-right .dropdown-menu {\n left: auto;\n right: 0;\n }\n .navbar-right .dropdown-menu-left {\n left: 0;\n right: auto;\n }\n}\n.btn-group,\n.btn-group-vertical {\n position: relative;\n display: inline-block;\n vertical-align: middle;\n}\n.btn-group > .btn,\n.btn-group-vertical > .btn {\n position: relative;\n float: left;\n}\n.btn-group > .btn:hover,\n.btn-group-vertical > .btn:hover,\n.btn-group > .btn:focus,\n.btn-group-vertical > .btn:focus,\n.btn-group > .btn:active,\n.btn-group-vertical > .btn:active,\n.btn-group > .btn.active,\n.btn-group-vertical > .btn.active {\n z-index: 2;\n}\n.btn-group .btn + .btn,\n.btn-group .btn + .btn-group,\n.btn-group .btn-group + .btn,\n.btn-group .btn-group + .btn-group {\n margin-left: -1px;\n}\n.btn-toolbar {\n margin-left: -5px;\n}\n.btn-toolbar .btn,\n.btn-toolbar .btn-group,\n.btn-toolbar .input-group {\n float: left;\n}\n.btn-toolbar > .btn,\n.btn-toolbar > .btn-group,\n.btn-toolbar > .input-group {\n margin-left: 5px;\n}\n.btn-group > .btn:not(:first-child):not(:last-child):not(.dropdown-toggle) {\n border-radius: 0;\n}\n.btn-group > .btn:first-child {\n margin-left: 0;\n}\n.btn-group > .btn:first-child:not(:last-child):not(.dropdown-toggle) {\n border-bottom-right-radius: 0;\n border-top-right-radius: 0;\n}\n.btn-group > .btn:last-child:not(:first-child),\n.btn-group > .dropdown-toggle:not(:first-child) {\n border-bottom-left-radius: 0;\n border-top-left-radius: 0;\n}\n.btn-group > .btn-group {\n float: left;\n}\n.btn-group > .btn-group:not(:first-child):not(:last-child) > .btn {\n border-radius: 0;\n}\n.btn-group > .btn-group:first-child:not(:last-child) > .btn:last-child,\n.btn-group > .btn-group:first-child:not(:last-child) > .dropdown-toggle {\n border-bottom-right-radius: 0;\n border-top-right-radius: 0;\n}\n.btn-group > .btn-group:last-child:not(:first-child) > .btn:first-child {\n border-bottom-left-radius: 0;\n border-top-left-radius: 0;\n}\n.btn-group .dropdown-toggle:active,\n.btn-group.open .dropdown-toggle {\n outline: 0;\n}\n.btn-group > .btn + .dropdown-toggle {\n padding-left: 8px;\n padding-right: 8px;\n}\n.btn-group > .btn-lg + .dropdown-toggle {\n padding-left: 12px;\n padding-right: 12px;\n}\n.btn-group.open .dropdown-toggle {\n -webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);\n box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);\n}\n.btn-group.open .dropdown-toggle.btn-link {\n -webkit-box-shadow: none;\n box-shadow: none;\n}\n.btn .caret {\n margin-left: 0;\n}\n.btn-lg .caret {\n border-width: 5px 5px 0;\n border-bottom-width: 0;\n}\n.dropup .btn-lg .caret {\n border-width: 0 5px 5px;\n}\n.btn-group-vertical > .btn,\n.btn-group-vertical > .btn-group,\n.btn-group-vertical > .btn-group > .btn {\n display: block;\n float: none;\n width: 100%;\n max-width: 100%;\n}\n.btn-group-vertical > .btn-group > .btn {\n float: none;\n}\n.btn-group-vertical > .btn + .btn,\n.btn-group-vertical > .btn + .btn-group,\n.btn-group-vertical > .btn-group + .btn,\n.btn-group-vertical > .btn-group + .btn-group {\n margin-top: -1px;\n margin-left: 0;\n}\n.btn-group-vertical > .btn:not(:first-child):not(:last-child) {\n border-radius: 0;\n}\n.btn-group-vertical > .btn:first-child:not(:last-child) {\n border-top-right-radius: 4px;\n border-top-left-radius: 4px;\n border-bottom-right-radius: 0;\n border-bottom-left-radius: 0;\n}\n.btn-group-vertical > .btn:last-child:not(:first-child) {\n border-top-right-radius: 0;\n border-top-left-radius: 0;\n border-bottom-right-radius: 4px;\n border-bottom-left-radius: 4px;\n}\n.btn-group-vertical > .btn-group:not(:first-child):not(:last-child) > .btn {\n border-radius: 0;\n}\n.btn-group-vertical > .btn-group:first-child:not(:last-child) > .btn:last-child,\n.btn-group-vertical > .btn-group:first-child:not(:last-child) > .dropdown-toggle {\n border-bottom-right-radius: 0;\n border-bottom-left-radius: 0;\n}\n.btn-group-vertical > .btn-group:last-child:not(:first-child) > .btn:first-child {\n border-top-right-radius: 0;\n border-top-left-radius: 0;\n}\n.btn-group-justified {\n display: table;\n width: 100%;\n table-layout: fixed;\n border-collapse: separate;\n}\n.btn-group-justified > .btn,\n.btn-group-justified > .btn-group {\n float: none;\n display: table-cell;\n width: 1%;\n}\n.btn-group-justified > .btn-group .btn {\n width: 100%;\n}\n.btn-group-justified > .btn-group .dropdown-menu {\n left: auto;\n}\n[data-toggle=\"buttons\"] > .btn input[type=\"radio\"],\n[data-toggle=\"buttons\"] > .btn-group > .btn input[type=\"radio\"],\n[data-toggle=\"buttons\"] > .btn input[type=\"checkbox\"],\n[data-toggle=\"buttons\"] > .btn-group > .btn input[type=\"checkbox\"] {\n position: absolute;\n clip: rect(0, 0, 0, 0);\n pointer-events: none;\n}\n.input-group {\n position: relative;\n display: table;\n border-collapse: separate;\n}\n.input-group[class*=\"col-\"] {\n float: none;\n padding-left: 0;\n padding-right: 0;\n}\n.input-group .form-control {\n position: relative;\n z-index: 2;\n float: left;\n width: 100%;\n margin-bottom: 0;\n}\n.input-group .form-control:focus {\n z-index: 3;\n}\n.input-group-lg > .form-control,\n.input-group-lg > .input-group-addon,\n.input-group-lg > .input-group-btn > .btn {\n height: 46px;\n padding: 10px 16px;\n font-size: 18px;\n line-height: 1.3333333;\n border-radius: 6px;\n}\nselect.input-group-lg > .form-control,\nselect.input-group-lg > .input-group-addon,\nselect.input-group-lg > .input-group-btn > .btn {\n height: 46px;\n line-height: 46px;\n}\ntextarea.input-group-lg > .form-control,\ntextarea.input-group-lg > .input-group-addon,\ntextarea.input-group-lg > .input-group-btn > .btn,\nselect[multiple].input-group-lg > .form-control,\nselect[multiple].input-group-lg > .input-group-addon,\nselect[multiple].input-group-lg > .input-group-btn > .btn {\n height: auto;\n}\n.input-group-sm > .form-control,\n.input-group-sm > .input-group-addon,\n.input-group-sm > .input-group-btn > .btn {\n height: 30px;\n padding: 5px 10px;\n font-size: 12px;\n line-height: 1.5;\n border-radius: 3px;\n}\nselect.input-group-sm > .form-control,\nselect.input-group-sm > .input-group-addon,\nselect.input-group-sm > .input-group-btn > .btn {\n height: 30px;\n line-height: 30px;\n}\ntextarea.input-group-sm > .form-control,\ntextarea.input-group-sm > .input-group-addon,\ntextarea.input-group-sm > .input-group-btn > .btn,\nselect[multiple].input-group-sm > .form-control,\nselect[multiple].input-group-sm > .input-group-addon,\nselect[multiple].input-group-sm > .input-group-btn > .btn {\n height: auto;\n}\n.input-group-addon,\n.input-group-btn,\n.input-group .form-control {\n display: table-cell;\n}\n.input-group-addon:not(:first-child):not(:last-child),\n.input-group-btn:not(:first-child):not(:last-child),\n.input-group .form-control:not(:first-child):not(:last-child) {\n border-radius: 0;\n}\n.input-group-addon,\n.input-group-btn {\n width: 1%;\n white-space: nowrap;\n vertical-align: middle;\n}\n.input-group-addon {\n padding: 6px 12px;\n font-size: 14px;\n font-weight: normal;\n line-height: 1;\n color: #555555;\n text-align: center;\n background-color: #eeeeee;\n border: 1px solid #ccc;\n border-radius: 4px;\n}\n.input-group-addon.input-sm {\n padding: 5px 10px;\n font-size: 12px;\n border-radius: 3px;\n}\n.input-group-addon.input-lg {\n padding: 10px 16px;\n font-size: 18px;\n border-radius: 6px;\n}\n.input-group-addon input[type=\"radio\"],\n.input-group-addon input[type=\"checkbox\"] {\n margin-top: 0;\n}\n.input-group .form-control:first-child,\n.input-group-addon:first-child,\n.input-group-btn:first-child > .btn,\n.input-group-btn:first-child > .btn-group > .btn,\n.input-group-btn:first-child > .dropdown-toggle,\n.input-group-btn:last-child > .btn:not(:last-child):not(.dropdown-toggle),\n.input-group-btn:last-child > .btn-group:not(:last-child) > .btn {\n border-bottom-right-radius: 0;\n border-top-right-radius: 0;\n}\n.input-group-addon:first-child {\n border-right: 0;\n}\n.input-group .form-control:last-child,\n.input-group-addon:last-child,\n.input-group-btn:last-child > .btn,\n.input-group-btn:last-child > .btn-group > .btn,\n.input-group-btn:last-child > .dropdown-toggle,\n.input-group-btn:first-child > .btn:not(:first-child),\n.input-group-btn:first-child > .btn-group:not(:first-child) > .btn {\n border-bottom-left-radius: 0;\n border-top-left-radius: 0;\n}\n.input-group-addon:last-child {\n border-left: 0;\n}\n.input-group-btn {\n position: relative;\n font-size: 0;\n white-space: nowrap;\n}\n.input-group-btn > .btn {\n position: relative;\n}\n.input-group-btn > .btn + .btn {\n margin-left: -1px;\n}\n.input-group-btn > .btn:hover,\n.input-group-btn > .btn:focus,\n.input-group-btn > .btn:active {\n z-index: 2;\n}\n.input-group-btn:first-child > .btn,\n.input-group-btn:first-child > .btn-group {\n margin-right: -1px;\n}\n.input-group-btn:last-child > .btn,\n.input-group-btn:last-child > .btn-group {\n z-index: 2;\n margin-left: -1px;\n}\n.nav {\n margin-bottom: 0;\n padding-left: 0;\n list-style: none;\n}\n.nav > li {\n position: relative;\n display: block;\n}\n.nav > li > a {\n position: relative;\n display: block;\n padding: 10px 15px;\n}\n.nav > li > a:hover,\n.nav > li > a:focus {\n text-decoration: none;\n background-color: #eeeeee;\n}\n.nav > li.disabled > a {\n color: #777777;\n}\n.nav > li.disabled > a:hover,\n.nav > li.disabled > a:focus {\n color: #777777;\n text-decoration: none;\n background-color: transparent;\n cursor: not-allowed;\n}\n.nav .open > a,\n.nav .open > a:hover,\n.nav .open > a:focus {\n background-color: #eeeeee;\n border-color: #337ab7;\n}\n.nav .nav-divider {\n height: 1px;\n margin: 9px 0;\n overflow: hidden;\n background-color: #e5e5e5;\n}\n.nav > li > a > img {\n max-width: none;\n}\n.nav-tabs {\n border-bottom: 1px solid #ddd;\n}\n.nav-tabs > li {\n float: left;\n margin-bottom: -1px;\n}\n.nav-tabs > li > a {\n margin-right: 2px;\n line-height: 1.42857143;\n border: 1px solid transparent;\n border-radius: 4px 4px 0 0;\n}\n.nav-tabs > li > a:hover {\n border-color: #eeeeee #eeeeee #ddd;\n}\n.nav-tabs > li.active > a,\n.nav-tabs > li.active > a:hover,\n.nav-tabs > li.active > a:focus {\n color: #555555;\n background-color: #fff;\n border: 1px solid #ddd;\n border-bottom-color: transparent;\n cursor: default;\n}\n.nav-tabs.nav-justified {\n width: 100%;\n border-bottom: 0;\n}\n.nav-tabs.nav-justified > li {\n float: none;\n}\n.nav-tabs.nav-justified > li > a {\n text-align: center;\n margin-bottom: 5px;\n}\n.nav-tabs.nav-justified > .dropdown .dropdown-menu {\n top: auto;\n left: auto;\n}\n@media (min-width: 768px) {\n .nav-tabs.nav-justified > li {\n display: table-cell;\n width: 1%;\n }\n .nav-tabs.nav-justified > li > a {\n margin-bottom: 0;\n }\n}\n.nav-tabs.nav-justified > li > a {\n margin-right: 0;\n border-radius: 4px;\n}\n.nav-tabs.nav-justified > .active > a,\n.nav-tabs.nav-justified > .active > a:hover,\n.nav-tabs.nav-justified > .active > a:focus {\n border: 1px solid #ddd;\n}\n@media (min-width: 768px) {\n .nav-tabs.nav-justified > li > a {\n border-bottom: 1px solid #ddd;\n border-radius: 4px 4px 0 0;\n }\n .nav-tabs.nav-justified > .active > a,\n .nav-tabs.nav-justified > .active > a:hover,\n .nav-tabs.nav-justified > .active > a:focus {\n border-bottom-color: #fff;\n }\n}\n.nav-pills > li {\n float: left;\n}\n.nav-pills > li > a {\n border-radius: 4px;\n}\n.nav-pills > li + li {\n margin-left: 2px;\n}\n.nav-pills > li.active > a,\n.nav-pills > li.active > a:hover,\n.nav-pills > li.active > a:focus {\n color: #fff;\n background-color: #337ab7;\n}\n.nav-stacked > li {\n float: none;\n}\n.nav-stacked > li + li {\n margin-top: 2px;\n margin-left: 0;\n}\n.nav-justified {\n width: 100%;\n}\n.nav-justified > li {\n float: none;\n}\n.nav-justified > li > a {\n text-align: center;\n margin-bottom: 5px;\n}\n.nav-justified > .dropdown .dropdown-menu {\n top: auto;\n left: auto;\n}\n@media (min-width: 768px) {\n .nav-justified > li {\n display: table-cell;\n width: 1%;\n }\n .nav-justified > li > a {\n margin-bottom: 0;\n }\n}\n.nav-tabs-justified {\n border-bottom: 0;\n}\n.nav-tabs-justified > li > a {\n margin-right: 0;\n border-radius: 4px;\n}\n.nav-tabs-justified > .active > a,\n.nav-tabs-justified > .active > a:hover,\n.nav-tabs-justified > .active > a:focus {\n border: 1px solid #ddd;\n}\n@media (min-width: 768px) {\n .nav-tabs-justified > li > a {\n border-bottom: 1px solid #ddd;\n border-radius: 4px 4px 0 0;\n }\n .nav-tabs-justified > .active > a,\n .nav-tabs-justified > .active > a:hover,\n .nav-tabs-justified > .active > a:focus {\n border-bottom-color: #fff;\n }\n}\n.tab-content > .tab-pane {\n display: none;\n}\n.tab-content > .active {\n display: block;\n}\n.nav-tabs .dropdown-menu {\n margin-top: -1px;\n border-top-right-radius: 0;\n border-top-left-radius: 0;\n}\n.navbar {\n position: relative;\n min-height: 50px;\n margin-bottom: 20px;\n border: 1px solid transparent;\n}\n@media (min-width: 768px) {\n .navbar {\n border-radius: 4px;\n }\n}\n@media (min-width: 768px) {\n .navbar-header {\n float: left;\n }\n}\n.navbar-collapse {\n overflow-x: visible;\n padding-right: 15px;\n padding-left: 15px;\n border-top: 1px solid transparent;\n box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);\n -webkit-overflow-scrolling: touch;\n}\n.navbar-collapse.in {\n overflow-y: auto;\n}\n@media (min-width: 768px) {\n .navbar-collapse {\n width: auto;\n border-top: 0;\n box-shadow: none;\n }\n .navbar-collapse.collapse {\n display: block !important;\n height: auto !important;\n padding-bottom: 0;\n overflow: visible !important;\n }\n .navbar-collapse.in {\n overflow-y: visible;\n }\n .navbar-fixed-top .navbar-collapse,\n .navbar-static-top .navbar-collapse,\n .navbar-fixed-bottom .navbar-collapse {\n padding-left: 0;\n padding-right: 0;\n }\n}\n.navbar-fixed-top .navbar-collapse,\n.navbar-fixed-bottom .navbar-collapse {\n max-height: 340px;\n}\n@media (max-device-width: 480px) and (orientation: landscape) {\n .navbar-fixed-top .navbar-collapse,\n .navbar-fixed-bottom .navbar-collapse {\n max-height: 200px;\n }\n}\n.container > .navbar-header,\n.container-fluid > .navbar-header,\n.container > .navbar-collapse,\n.container-fluid > .navbar-collapse {\n margin-right: -15px;\n margin-left: -15px;\n}\n@media (min-width: 768px) {\n .container > .navbar-header,\n .container-fluid > .navbar-header,\n .container > .navbar-collapse,\n .container-fluid > .navbar-collapse {\n margin-right: 0;\n margin-left: 0;\n }\n}\n.navbar-static-top {\n z-index: 1000;\n border-width: 0 0 1px;\n}\n@media (min-width: 768px) {\n .navbar-static-top {\n border-radius: 0;\n }\n}\n.navbar-fixed-top,\n.navbar-fixed-bottom {\n position: fixed;\n right: 0;\n left: 0;\n z-index: 1030;\n}\n@media (min-width: 768px) {\n .navbar-fixed-top,\n .navbar-fixed-bottom {\n border-radius: 0;\n }\n}\n.navbar-fixed-top {\n top: 0;\n border-width: 0 0 1px;\n}\n.navbar-fixed-bottom {\n bottom: 0;\n margin-bottom: 0;\n border-width: 1px 0 0;\n}\n.navbar-brand {\n float: left;\n padding: 15px 15px;\n font-size: 18px;\n line-height: 20px;\n height: 50px;\n}\n.navbar-brand:hover,\n.navbar-brand:focus {\n text-decoration: none;\n}\n.navbar-brand > img {\n display: block;\n}\n@media (min-width: 768px) {\n .navbar > .container .navbar-brand,\n .navbar > .container-fluid .navbar-brand {\n margin-left: -15px;\n }\n}\n.navbar-toggle {\n position: relative;\n float: right;\n margin-right: 15px;\n padding: 9px 10px;\n margin-top: 8px;\n margin-bottom: 8px;\n background-color: transparent;\n background-image: none;\n border: 1px solid transparent;\n border-radius: 4px;\n}\n.navbar-toggle:focus {\n outline: 0;\n}\n.navbar-toggle .icon-bar {\n display: block;\n width: 22px;\n height: 2px;\n border-radius: 1px;\n}\n.navbar-toggle .icon-bar + .icon-bar {\n margin-top: 4px;\n}\n@media (min-width: 768px) {\n .navbar-toggle {\n display: none;\n }\n}\n.navbar-nav {\n margin: 7.5px -15px;\n}\n.navbar-nav > li > a {\n padding-top: 10px;\n padding-bottom: 10px;\n line-height: 20px;\n}\n@media (max-width: 767px) {\n .navbar-nav .open .dropdown-menu {\n position: static;\n float: none;\n width: auto;\n margin-top: 0;\n background-color: transparent;\n border: 0;\n box-shadow: none;\n }\n .navbar-nav .open .dropdown-menu > li > a,\n .navbar-nav .open .dropdown-menu .dropdown-header {\n padding: 5px 15px 5px 25px;\n }\n .navbar-nav .open .dropdown-menu > li > a {\n line-height: 20px;\n }\n .navbar-nav .open .dropdown-menu > li > a:hover,\n .navbar-nav .open .dropdown-menu > li > a:focus {\n background-image: none;\n }\n}\n@media (min-width: 768px) {\n .navbar-nav {\n float: left;\n margin: 0;\n }\n .navbar-nav > li {\n float: left;\n }\n .navbar-nav > li > a {\n padding-top: 15px;\n padding-bottom: 15px;\n }\n}\n.navbar-form {\n margin-left: -15px;\n margin-right: -15px;\n padding: 10px 15px;\n border-top: 1px solid transparent;\n border-bottom: 1px solid transparent;\n -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 0 rgba(255, 255, 255, 0.1);\n box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 0 rgba(255, 255, 255, 0.1);\n margin-top: 8px;\n margin-bottom: 8px;\n}\n@media (min-width: 768px) {\n .navbar-form .form-group {\n display: inline-block;\n margin-bottom: 0;\n vertical-align: middle;\n }\n .navbar-form .form-control {\n display: inline-block;\n width: auto;\n vertical-align: middle;\n }\n .navbar-form .form-control-static {\n display: inline-block;\n }\n .navbar-form .input-group {\n display: inline-table;\n vertical-align: middle;\n }\n .navbar-form .input-group .input-group-addon,\n .navbar-form .input-group .input-group-btn,\n .navbar-form .input-group .form-control {\n width: auto;\n }\n .navbar-form .input-group > .form-control {\n width: 100%;\n }\n .navbar-form .control-label {\n margin-bottom: 0;\n vertical-align: middle;\n }\n .navbar-form .radio,\n .navbar-form .checkbox {\n display: inline-block;\n margin-top: 0;\n margin-bottom: 0;\n vertical-align: middle;\n }\n .navbar-form .radio label,\n .navbar-form .checkbox label {\n padding-left: 0;\n }\n .navbar-form .radio input[type=\"radio\"],\n .navbar-form .checkbox input[type=\"checkbox\"] {\n position: relative;\n margin-left: 0;\n }\n .navbar-form .has-feedback .form-control-feedback {\n top: 0;\n }\n}\n@media (max-width: 767px) {\n .navbar-form .form-group {\n margin-bottom: 5px;\n }\n .navbar-form .form-group:last-child {\n margin-bottom: 0;\n }\n}\n@media (min-width: 768px) {\n .navbar-form {\n width: auto;\n border: 0;\n margin-left: 0;\n margin-right: 0;\n padding-top: 0;\n padding-bottom: 0;\n -webkit-box-shadow: none;\n box-shadow: none;\n }\n}\n.navbar-nav > li > .dropdown-menu {\n margin-top: 0;\n border-top-right-radius: 0;\n border-top-left-radius: 0;\n}\n.navbar-fixed-bottom .navbar-nav > li > .dropdown-menu {\n margin-bottom: 0;\n border-top-right-radius: 4px;\n border-top-left-radius: 4px;\n border-bottom-right-radius: 0;\n border-bottom-left-radius: 0;\n}\n.navbar-btn {\n margin-top: 8px;\n margin-bottom: 8px;\n}\n.navbar-btn.btn-sm {\n margin-top: 10px;\n margin-bottom: 10px;\n}\n.navbar-btn.btn-xs {\n margin-top: 14px;\n margin-bottom: 14px;\n}\n.navbar-text {\n margin-top: 15px;\n margin-bottom: 15px;\n}\n@media (min-width: 768px) {\n .navbar-text {\n float: left;\n margin-left: 15px;\n margin-right: 15px;\n }\n}\n@media (min-width: 768px) {\n .navbar-left {\n float: left !important;\n }\n .navbar-right {\n float: right !important;\n margin-right: -15px;\n }\n .navbar-right ~ .navbar-right {\n margin-right: 0;\n }\n}\n.navbar-default {\n background-color: #f8f8f8;\n border-color: #e7e7e7;\n}\n.navbar-default .navbar-brand {\n color: #777;\n}\n.navbar-default .navbar-brand:hover,\n.navbar-default .navbar-brand:focus {\n color: #5e5e5e;\n background-color: transparent;\n}\n.navbar-default .navbar-text {\n color: #777;\n}\n.navbar-default .navbar-nav > li > a {\n color: #777;\n}\n.navbar-default .navbar-nav > li > a:hover,\n.navbar-default .navbar-nav > li > a:focus {\n color: #333;\n background-color: transparent;\n}\n.navbar-default .navbar-nav > .active > a,\n.navbar-default .navbar-nav > .active > a:hover,\n.navbar-default .navbar-nav > .active > a:focus {\n color: #555;\n background-color: #e7e7e7;\n}\n.navbar-default .navbar-nav > .disabled > a,\n.navbar-default .navbar-nav > .disabled > a:hover,\n.navbar-default .navbar-nav > .disabled > a:focus {\n color: #ccc;\n background-color: transparent;\n}\n.navbar-default .navbar-toggle {\n border-color: #ddd;\n}\n.navbar-default .navbar-toggle:hover,\n.navbar-default .navbar-toggle:focus {\n background-color: #ddd;\n}\n.navbar-default .navbar-toggle .icon-bar {\n background-color: #888;\n}\n.navbar-default .navbar-collapse,\n.navbar-default .navbar-form {\n border-color: #e7e7e7;\n}\n.navbar-default .navbar-nav > .open > a,\n.navbar-default .navbar-nav > .open > a:hover,\n.navbar-default .navbar-nav > .open > a:focus {\n background-color: #e7e7e7;\n color: #555;\n}\n@media (max-width: 767px) {\n .navbar-default .navbar-nav .open .dropdown-menu > li > a {\n color: #777;\n }\n .navbar-default .navbar-nav .open .dropdown-menu > li > a:hover,\n .navbar-default .navbar-nav .open .dropdown-menu > li > a:focus {\n color: #333;\n background-color: transparent;\n }\n .navbar-default .navbar-nav .open .dropdown-menu > .active > a,\n .navbar-default .navbar-nav .open .dropdown-menu > .active > a:hover,\n .navbar-default .navbar-nav .open .dropdown-menu > .active > a:focus {\n color: #555;\n background-color: #e7e7e7;\n }\n .navbar-default .navbar-nav .open .dropdown-menu > .disabled > a,\n .navbar-default .navbar-nav .open .dropdown-menu > .disabled > a:hover,\n .navbar-default .navbar-nav .open .dropdown-menu > .disabled > a:focus {\n color: #ccc;\n background-color: transparent;\n }\n}\n.navbar-default .navbar-link {\n color: #777;\n}\n.navbar-default .navbar-link:hover {\n color: #333;\n}\n.navbar-default .btn-link {\n color: #777;\n}\n.navbar-default .btn-link:hover,\n.navbar-default .btn-link:focus {\n color: #333;\n}\n.navbar-default .btn-link[disabled]:hover,\nfieldset[disabled] .navbar-default .btn-link:hover,\n.navbar-default .btn-link[disabled]:focus,\nfieldset[disabled] .navbar-default .btn-link:focus {\n color: #ccc;\n}\n.navbar-inverse {\n background-color: #222;\n border-color: #080808;\n}\n.navbar-inverse .navbar-brand {\n color: #9d9d9d;\n}\n.navbar-inverse .navbar-brand:hover,\n.navbar-inverse .navbar-brand:focus {\n color: #fff;\n background-color: transparent;\n}\n.navbar-inverse .navbar-text {\n color: #9d9d9d;\n}\n.navbar-inverse .navbar-nav > li > a {\n color: #9d9d9d;\n}\n.navbar-inverse .navbar-nav > li > a:hover,\n.navbar-inverse .navbar-nav > li > a:focus {\n color: #fff;\n background-color: transparent;\n}\n.navbar-inverse .navbar-nav > .active > a,\n.navbar-inverse .navbar-nav > .active > a:hover,\n.navbar-inverse .navbar-nav > .active > a:focus {\n color: #fff;\n background-color: #080808;\n}\n.navbar-inverse .navbar-nav > .disabled > a,\n.navbar-inverse .navbar-nav > .disabled > a:hover,\n.navbar-inverse .navbar-nav > .disabled > a:focus {\n color: #444;\n background-color: transparent;\n}\n.navbar-inverse .navbar-toggle {\n border-color: #333;\n}\n.navbar-inverse .navbar-toggle:hover,\n.navbar-inverse .navbar-toggle:focus {\n background-color: #333;\n}\n.navbar-inverse .navbar-toggle .icon-bar {\n background-color: #fff;\n}\n.navbar-inverse .navbar-collapse,\n.navbar-inverse .navbar-form {\n border-color: #101010;\n}\n.navbar-inverse .navbar-nav > .open > a,\n.navbar-inverse .navbar-nav > .open > a:hover,\n.navbar-inverse .navbar-nav > .open > a:focus {\n background-color: #080808;\n color: #fff;\n}\n@media (max-width: 767px) {\n .navbar-inverse .navbar-nav .open .dropdown-menu > .dropdown-header {\n border-color: #080808;\n }\n .navbar-inverse .navbar-nav .open .dropdown-menu .divider {\n background-color: #080808;\n }\n .navbar-inverse .navbar-nav .open .dropdown-menu > li > a {\n color: #9d9d9d;\n }\n .navbar-inverse .navbar-nav .open .dropdown-menu > li > a:hover,\n .navbar-inverse .navbar-nav .open .dropdown-menu > li > a:focus {\n color: #fff;\n background-color: transparent;\n }\n .navbar-inverse .navbar-nav .open .dropdown-menu > .active > a,\n .navbar-inverse .navbar-nav .open .dropdown-menu > .active > a:hover,\n .navbar-inverse .navbar-nav .open .dropdown-menu > .active > a:focus {\n color: #fff;\n background-color: #080808;\n }\n .navbar-inverse .navbar-nav .open .dropdown-menu > .disabled > a,\n .navbar-inverse .navbar-nav .open .dropdown-menu > .disabled > a:hover,\n .navbar-inverse .navbar-nav .open .dropdown-menu > .disabled > a:focus {\n color: #444;\n background-color: transparent;\n }\n}\n.navbar-inverse .navbar-link {\n color: #9d9d9d;\n}\n.navbar-inverse .navbar-link:hover {\n color: #fff;\n}\n.navbar-inverse .btn-link {\n color: #9d9d9d;\n}\n.navbar-inverse .btn-link:hover,\n.navbar-inverse .btn-link:focus {\n color: #fff;\n}\n.navbar-inverse .btn-link[disabled]:hover,\nfieldset[disabled] .navbar-inverse .btn-link:hover,\n.navbar-inverse .btn-link[disabled]:focus,\nfieldset[disabled] .navbar-inverse .btn-link:focus {\n color: #444;\n}\n.breadcrumb {\n padding: 8px 15px;\n margin-bottom: 20px;\n list-style: none;\n background-color: #f5f5f5;\n border-radius: 4px;\n}\n.breadcrumb > li {\n display: inline-block;\n}\n.breadcrumb > li + li:before {\n content: \"/\\00a0\";\n padding: 0 5px;\n color: #ccc;\n}\n.breadcrumb > .active {\n color: #777777;\n}\n.pagination {\n display: inline-block;\n padding-left: 0;\n margin: 20px 0;\n border-radius: 4px;\n}\n.pagination > li {\n display: inline;\n}\n.pagination > li > a,\n.pagination > li > span {\n position: relative;\n float: left;\n padding: 6px 12px;\n line-height: 1.42857143;\n text-decoration: none;\n color: #337ab7;\n background-color: #fff;\n border: 1px solid #ddd;\n margin-left: -1px;\n}\n.pagination > li:first-child > a,\n.pagination > li:first-child > span {\n margin-left: 0;\n border-bottom-left-radius: 4px;\n border-top-left-radius: 4px;\n}\n.pagination > li:last-child > a,\n.pagination > li:last-child > span {\n border-bottom-right-radius: 4px;\n border-top-right-radius: 4px;\n}\n.pagination > li > a:hover,\n.pagination > li > span:hover,\n.pagination > li > a:focus,\n.pagination > li > span:focus {\n z-index: 2;\n color: #23527c;\n background-color: #eeeeee;\n border-color: #ddd;\n}\n.pagination > .active > a,\n.pagination > .active > span,\n.pagination > .active > a:hover,\n.pagination > .active > span:hover,\n.pagination > .active > a:focus,\n.pagination > .active > span:focus {\n z-index: 3;\n color: #fff;\n background-color: #337ab7;\n border-color: #337ab7;\n cursor: default;\n}\n.pagination > .disabled > span,\n.pagination > .disabled > span:hover,\n.pagination > .disabled > span:focus,\n.pagination > .disabled > a,\n.pagination > .disabled > a:hover,\n.pagination > .disabled > a:focus {\n color: #777777;\n background-color: #fff;\n border-color: #ddd;\n cursor: not-allowed;\n}\n.pagination-lg > li > a,\n.pagination-lg > li > span {\n padding: 10px 16px;\n font-size: 18px;\n line-height: 1.3333333;\n}\n.pagination-lg > li:first-child > a,\n.pagination-lg > li:first-child > span {\n border-bottom-left-radius: 6px;\n border-top-left-radius: 6px;\n}\n.pagination-lg > li:last-child > a,\n.pagination-lg > li:last-child > span {\n border-bottom-right-radius: 6px;\n border-top-right-radius: 6px;\n}\n.pagination-sm > li > a,\n.pagination-sm > li > span {\n padding: 5px 10px;\n font-size: 12px;\n line-height: 1.5;\n}\n.pagination-sm > li:first-child > a,\n.pagination-sm > li:first-child > span {\n border-bottom-left-radius: 3px;\n border-top-left-radius: 3px;\n}\n.pagination-sm > li:last-child > a,\n.pagination-sm > li:last-child > span {\n border-bottom-right-radius: 3px;\n border-top-right-radius: 3px;\n}\n.pager {\n padding-left: 0;\n margin: 20px 0;\n list-style: none;\n text-align: center;\n}\n.pager li {\n display: inline;\n}\n.pager li > a,\n.pager li > span {\n display: inline-block;\n padding: 5px 14px;\n background-color: #fff;\n border: 1px solid #ddd;\n border-radius: 15px;\n}\n.pager li > a:hover,\n.pager li > a:focus {\n text-decoration: none;\n background-color: #eeeeee;\n}\n.pager .next > a,\n.pager .next > span {\n float: right;\n}\n.pager .previous > a,\n.pager .previous > span {\n float: left;\n}\n.pager .disabled > a,\n.pager .disabled > a:hover,\n.pager .disabled > a:focus,\n.pager .disabled > span {\n color: #777777;\n background-color: #fff;\n cursor: not-allowed;\n}\n.label {\n display: inline;\n padding: .2em .6em .3em;\n font-size: 75%;\n font-weight: bold;\n line-height: 1;\n color: #fff;\n text-align: center;\n white-space: nowrap;\n vertical-align: baseline;\n border-radius: .25em;\n}\na.label:hover,\na.label:focus {\n color: #fff;\n text-decoration: none;\n cursor: pointer;\n}\n.label:empty {\n display: none;\n}\n.btn .label {\n position: relative;\n top: -1px;\n}\n.label-default {\n background-color: #777777;\n}\n.label-default[href]:hover,\n.label-default[href]:focus {\n background-color: #5e5e5e;\n}\n.label-primary {\n background-color: #337ab7;\n}\n.label-primary[href]:hover,\n.label-primary[href]:focus {\n background-color: #286090;\n}\n.label-success {\n background-color: #5cb85c;\n}\n.label-success[href]:hover,\n.label-success[href]:focus {\n background-color: #449d44;\n}\n.label-info {\n background-color: #5bc0de;\n}\n.label-info[href]:hover,\n.label-info[href]:focus {\n background-color: #31b0d5;\n}\n.label-warning {\n background-color: #f0ad4e;\n}\n.label-warning[href]:hover,\n.label-warning[href]:focus {\n background-color: #ec971f;\n}\n.label-danger {\n background-color: #d9534f;\n}\n.label-danger[href]:hover,\n.label-danger[href]:focus {\n background-color: #c9302c;\n}\n.badge {\n display: inline-block;\n min-width: 10px;\n padding: 3px 7px;\n font-size: 12px;\n font-weight: bold;\n color: #fff;\n line-height: 1;\n vertical-align: middle;\n white-space: nowrap;\n text-align: center;\n background-color: #777777;\n border-radius: 10px;\n}\n.badge:empty {\n display: none;\n}\n.btn .badge {\n position: relative;\n top: -1px;\n}\n.btn-xs .badge,\n.btn-group-xs > .btn .badge {\n top: 0;\n padding: 1px 5px;\n}\na.badge:hover,\na.badge:focus {\n color: #fff;\n text-decoration: none;\n cursor: pointer;\n}\n.list-group-item.active > .badge,\n.nav-pills > .active > a > .badge {\n color: #337ab7;\n background-color: #fff;\n}\n.list-group-item > .badge {\n float: right;\n}\n.list-group-item > .badge + .badge {\n margin-right: 5px;\n}\n.nav-pills > li > a > .badge {\n margin-left: 3px;\n}\n.jumbotron {\n padding-top: 30px;\n padding-bottom: 30px;\n margin-bottom: 30px;\n color: inherit;\n background-color: #eeeeee;\n}\n.jumbotron h1,\n.jumbotron .h1 {\n color: inherit;\n}\n.jumbotron p {\n margin-bottom: 15px;\n font-size: 21px;\n font-weight: 200;\n}\n.jumbotron > hr {\n border-top-color: #d5d5d5;\n}\n.container .jumbotron,\n.container-fluid .jumbotron {\n border-radius: 6px;\n padding-left: 15px;\n padding-right: 15px;\n}\n.jumbotron .container {\n max-width: 100%;\n}\n@media screen and (min-width: 768px) {\n .jumbotron {\n padding-top: 48px;\n padding-bottom: 48px;\n }\n .container .jumbotron,\n .container-fluid .jumbotron {\n padding-left: 60px;\n padding-right: 60px;\n }\n .jumbotron h1,\n .jumbotron .h1 {\n font-size: 63px;\n }\n}\n.thumbnail {\n display: block;\n padding: 4px;\n margin-bottom: 20px;\n line-height: 1.42857143;\n background-color: #fff;\n border: 1px solid #ddd;\n border-radius: 4px;\n -webkit-transition: border 0.2s ease-in-out;\n -o-transition: border 0.2s ease-in-out;\n transition: border 0.2s ease-in-out;\n}\n.thumbnail > img,\n.thumbnail a > img {\n margin-left: auto;\n margin-right: auto;\n}\na.thumbnail:hover,\na.thumbnail:focus,\na.thumbnail.active {\n border-color: #337ab7;\n}\n.thumbnail .caption {\n padding: 9px;\n color: #333333;\n}\n.alert {\n padding: 15px;\n margin-bottom: 20px;\n border: 1px solid transparent;\n border-radius: 4px;\n}\n.alert h4 {\n margin-top: 0;\n color: inherit;\n}\n.alert .alert-link {\n font-weight: bold;\n}\n.alert > p,\n.alert > ul {\n margin-bottom: 0;\n}\n.alert > p + p {\n margin-top: 5px;\n}\n.alert-dismissable,\n.alert-dismissible {\n padding-right: 35px;\n}\n.alert-dismissable .close,\n.alert-dismissible .close {\n position: relative;\n top: -2px;\n right: -21px;\n color: inherit;\n}\n.alert-success {\n background-color: #dff0d8;\n border-color: #d6e9c6;\n color: #3c763d;\n}\n.alert-success hr {\n border-top-color: #c9e2b3;\n}\n.alert-success .alert-link {\n color: #2b542c;\n}\n.alert-info {\n background-color: #d9edf7;\n border-color: #bce8f1;\n color: #31708f;\n}\n.alert-info hr {\n border-top-color: #a6e1ec;\n}\n.alert-info .alert-link {\n color: #245269;\n}\n.alert-warning {\n background-color: #fcf8e3;\n border-color: #faebcc;\n color: #8a6d3b;\n}\n.alert-warning hr {\n border-top-color: #f7e1b5;\n}\n.alert-warning .alert-link {\n color: #66512c;\n}\n.alert-danger {\n background-color: #f2dede;\n border-color: #ebccd1;\n color: #a94442;\n}\n.alert-danger hr {\n border-top-color: #e4b9c0;\n}\n.alert-danger .alert-link {\n color: #843534;\n}\n@-webkit-keyframes progress-bar-stripes {\n from {\n background-position: 40px 0;\n }\n to {\n background-position: 0 0;\n }\n}\n@keyframes progress-bar-stripes {\n from {\n background-position: 40px 0;\n }\n to {\n background-position: 0 0;\n }\n}\n.progress {\n overflow: hidden;\n height: 20px;\n margin-bottom: 20px;\n background-color: #f5f5f5;\n border-radius: 4px;\n -webkit-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);\n box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);\n}\n.progress-bar {\n float: left;\n width: 0%;\n height: 100%;\n font-size: 12px;\n line-height: 20px;\n color: #fff;\n text-align: center;\n background-color: #337ab7;\n -webkit-box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.15);\n box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.15);\n -webkit-transition: width 0.6s ease;\n -o-transition: width 0.6s ease;\n transition: width 0.6s ease;\n}\n.progress-striped .progress-bar,\n.progress-bar-striped {\n background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);\n background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);\n background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);\n background-size: 40px 40px;\n}\n.progress.active .progress-bar,\n.progress-bar.active {\n -webkit-animation: progress-bar-stripes 2s linear infinite;\n -o-animation: progress-bar-stripes 2s linear infinite;\n animation: progress-bar-stripes 2s linear infinite;\n}\n.progress-bar-success {\n background-color: #5cb85c;\n}\n.progress-striped .progress-bar-success {\n background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);\n background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);\n background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);\n}\n.progress-bar-info {\n background-color: #5bc0de;\n}\n.progress-striped .progress-bar-info {\n background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);\n background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);\n background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);\n}\n.progress-bar-warning {\n background-color: #f0ad4e;\n}\n.progress-striped .progress-bar-warning {\n background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);\n background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);\n background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);\n}\n.progress-bar-danger {\n background-color: #d9534f;\n}\n.progress-striped .progress-bar-danger {\n background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);\n background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);\n background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);\n}\n.media {\n margin-top: 15px;\n}\n.media:first-child {\n margin-top: 0;\n}\n.media,\n.media-body {\n zoom: 1;\n overflow: hidden;\n}\n.media-body {\n width: 10000px;\n}\n.media-object {\n display: block;\n}\n.media-object.img-thumbnail {\n max-width: none;\n}\n.media-right,\n.media > .pull-right {\n padding-left: 10px;\n}\n.media-left,\n.media > .pull-left {\n padding-right: 10px;\n}\n.media-left,\n.media-right,\n.media-body {\n display: table-cell;\n vertical-align: top;\n}\n.media-middle {\n vertical-align: middle;\n}\n.media-bottom {\n vertical-align: bottom;\n}\n.media-heading {\n margin-top: 0;\n margin-bottom: 5px;\n}\n.media-list {\n padding-left: 0;\n list-style: none;\n}\n.list-group {\n margin-bottom: 20px;\n padding-left: 0;\n}\n.list-group-item {\n position: relative;\n display: block;\n padding: 10px 15px;\n margin-bottom: -1px;\n background-color: #fff;\n border: 1px solid #ddd;\n}\n.list-group-item:first-child {\n border-top-right-radius: 4px;\n border-top-left-radius: 4px;\n}\n.list-group-item:last-child {\n margin-bottom: 0;\n border-bottom-right-radius: 4px;\n border-bottom-left-radius: 4px;\n}\na.list-group-item,\nbutton.list-group-item {\n color: #555;\n}\na.list-group-item .list-group-item-heading,\nbutton.list-group-item .list-group-item-heading {\n color: #333;\n}\na.list-group-item:hover,\nbutton.list-group-item:hover,\na.list-group-item:focus,\nbutton.list-group-item:focus {\n text-decoration: none;\n color: #555;\n background-color: #f5f5f5;\n}\nbutton.list-group-item {\n width: 100%;\n text-align: left;\n}\n.list-group-item.disabled,\n.list-group-item.disabled:hover,\n.list-group-item.disabled:focus {\n background-color: #eeeeee;\n color: #777777;\n cursor: not-allowed;\n}\n.list-group-item.disabled .list-group-item-heading,\n.list-group-item.disabled:hover .list-group-item-heading,\n.list-group-item.disabled:focus .list-group-item-heading {\n color: inherit;\n}\n.list-group-item.disabled .list-group-item-text,\n.list-group-item.disabled:hover .list-group-item-text,\n.list-group-item.disabled:focus .list-group-item-text {\n color: #777777;\n}\n.list-group-item.active,\n.list-group-item.active:hover,\n.list-group-item.active:focus {\n z-index: 2;\n color: #fff;\n background-color: #337ab7;\n border-color: #337ab7;\n}\n.list-group-item.active .list-group-item-heading,\n.list-group-item.active:hover .list-group-item-heading,\n.list-group-item.active:focus .list-group-item-heading,\n.list-group-item.active .list-group-item-heading > small,\n.list-group-item.active:hover .list-group-item-heading > small,\n.list-group-item.active:focus .list-group-item-heading > small,\n.list-group-item.active .list-group-item-heading > .small,\n.list-group-item.active:hover .list-group-item-heading > .small,\n.list-group-item.active:focus .list-group-item-heading > .small {\n color: inherit;\n}\n.list-group-item.active .list-group-item-text,\n.list-group-item.active:hover .list-group-item-text,\n.list-group-item.active:focus .list-group-item-text {\n color: #c7ddef;\n}\n.list-group-item-success {\n color: #3c763d;\n background-color: #dff0d8;\n}\na.list-group-item-success,\nbutton.list-group-item-success {\n color: #3c763d;\n}\na.list-group-item-success .list-group-item-heading,\nbutton.list-group-item-success .list-group-item-heading {\n color: inherit;\n}\na.list-group-item-success:hover,\nbutton.list-group-item-success:hover,\na.list-group-item-success:focus,\nbutton.list-group-item-success:focus {\n color: #3c763d;\n background-color: #d0e9c6;\n}\na.list-group-item-success.active,\nbutton.list-group-item-success.active,\na.list-group-item-success.active:hover,\nbutton.list-group-item-success.active:hover,\na.list-group-item-success.active:focus,\nbutton.list-group-item-success.active:focus {\n color: #fff;\n background-color: #3c763d;\n border-color: #3c763d;\n}\n.list-group-item-info {\n color: #31708f;\n background-color: #d9edf7;\n}\na.list-group-item-info,\nbutton.list-group-item-info {\n color: #31708f;\n}\na.list-group-item-info .list-group-item-heading,\nbutton.list-group-item-info .list-group-item-heading {\n color: inherit;\n}\na.list-group-item-info:hover,\nbutton.list-group-item-info:hover,\na.list-group-item-info:focus,\nbutton.list-group-item-info:focus {\n color: #31708f;\n background-color: #c4e3f3;\n}\na.list-group-item-info.active,\nbutton.list-group-item-info.active,\na.list-group-item-info.active:hover,\nbutton.list-group-item-info.active:hover,\na.list-group-item-info.active:focus,\nbutton.list-group-item-info.active:focus {\n color: #fff;\n background-color: #31708f;\n border-color: #31708f;\n}\n.list-group-item-warning {\n color: #8a6d3b;\n background-color: #fcf8e3;\n}\na.list-group-item-warning,\nbutton.list-group-item-warning {\n color: #8a6d3b;\n}\na.list-group-item-warning .list-group-item-heading,\nbutton.list-group-item-warning .list-group-item-heading {\n color: inherit;\n}\na.list-group-item-warning:hover,\nbutton.list-group-item-warning:hover,\na.list-group-item-warning:focus,\nbutton.list-group-item-warning:focus {\n color: #8a6d3b;\n background-color: #faf2cc;\n}\na.list-group-item-warning.active,\nbutton.list-group-item-warning.active,\na.list-group-item-warning.active:hover,\nbutton.list-group-item-warning.active:hover,\na.list-group-item-warning.active:focus,\nbutton.list-group-item-warning.active:focus {\n color: #fff;\n background-color: #8a6d3b;\n border-color: #8a6d3b;\n}\n.list-group-item-danger {\n color: #a94442;\n background-color: #f2dede;\n}\na.list-group-item-danger,\nbutton.list-group-item-danger {\n color: #a94442;\n}\na.list-group-item-danger .list-group-item-heading,\nbutton.list-group-item-danger .list-group-item-heading {\n color: inherit;\n}\na.list-group-item-danger:hover,\nbutton.list-group-item-danger:hover,\na.list-group-item-danger:focus,\nbutton.list-group-item-danger:focus {\n color: #a94442;\n background-color: #ebcccc;\n}\na.list-group-item-danger.active,\nbutton.list-group-item-danger.active,\na.list-group-item-danger.active:hover,\nbutton.list-group-item-danger.active:hover,\na.list-group-item-danger.active:focus,\nbutton.list-group-item-danger.active:focus {\n color: #fff;\n background-color: #a94442;\n border-color: #a94442;\n}\n.list-group-item-heading {\n margin-top: 0;\n margin-bottom: 5px;\n}\n.list-group-item-text {\n margin-bottom: 0;\n line-height: 1.3;\n}\n.panel {\n margin-bottom: 20px;\n background-color: #fff;\n border: 1px solid transparent;\n border-radius: 4px;\n -webkit-box-shadow: 0 1px 1px rgba(0, 0, 0, 0.05);\n box-shadow: 0 1px 1px rgba(0, 0, 0, 0.05);\n}\n.panel-body {\n padding: 15px;\n}\n.panel-heading {\n padding: 10px 15px;\n border-bottom: 1px solid transparent;\n border-top-right-radius: 3px;\n border-top-left-radius: 3px;\n}\n.panel-heading > .dropdown .dropdown-toggle {\n color: inherit;\n}\n.panel-title {\n margin-top: 0;\n margin-bottom: 0;\n font-size: 16px;\n color: inherit;\n}\n.panel-title > a,\n.panel-title > small,\n.panel-title > .small,\n.panel-title > small > a,\n.panel-title > .small > a {\n color: inherit;\n}\n.panel-footer {\n padding: 10px 15px;\n background-color: #f5f5f5;\n border-top: 1px solid #ddd;\n border-bottom-right-radius: 3px;\n border-bottom-left-radius: 3px;\n}\n.panel > .list-group,\n.panel > .panel-collapse > .list-group {\n margin-bottom: 0;\n}\n.panel > .list-group .list-group-item,\n.panel > .panel-collapse > .list-group .list-group-item {\n border-width: 1px 0;\n border-radius: 0;\n}\n.panel > .list-group:first-child .list-group-item:first-child,\n.panel > .panel-collapse > .list-group:first-child .list-group-item:first-child {\n border-top: 0;\n border-top-right-radius: 3px;\n border-top-left-radius: 3px;\n}\n.panel > .list-group:last-child .list-group-item:last-child,\n.panel > .panel-collapse > .list-group:last-child .list-group-item:last-child {\n border-bottom: 0;\n border-bottom-right-radius: 3px;\n border-bottom-left-radius: 3px;\n}\n.panel > .panel-heading + .panel-collapse > .list-group .list-group-item:first-child {\n border-top-right-radius: 0;\n border-top-left-radius: 0;\n}\n.panel-heading + .list-group .list-group-item:first-child {\n border-top-width: 0;\n}\n.list-group + .panel-footer {\n border-top-width: 0;\n}\n.panel > .table,\n.panel > .table-responsive > .table,\n.panel > .panel-collapse > .table {\n margin-bottom: 0;\n}\n.panel > .table caption,\n.panel > .table-responsive > .table caption,\n.panel > .panel-collapse > .table caption {\n padding-left: 15px;\n padding-right: 15px;\n}\n.panel > .table:first-child,\n.panel > .table-responsive:first-child > .table:first-child {\n border-top-right-radius: 3px;\n border-top-left-radius: 3px;\n}\n.panel > .table:first-child > thead:first-child > tr:first-child,\n.panel > .table-responsive:first-child > .table:first-child > thead:first-child > tr:first-child,\n.panel > .table:first-child > tbody:first-child > tr:first-child,\n.panel > .table-responsive:first-child > .table:first-child > tbody:first-child > tr:first-child {\n border-top-left-radius: 3px;\n border-top-right-radius: 3px;\n}\n.panel > .table:first-child > thead:first-child > tr:first-child td:first-child,\n.panel > .table-responsive:first-child > .table:first-child > thead:first-child > tr:first-child td:first-child,\n.panel > .table:first-child > tbody:first-child > tr:first-child td:first-child,\n.panel > .table-responsive:first-child > .table:first-child > tbody:first-child > tr:first-child td:first-child,\n.panel > .table:first-child > thead:first-child > tr:first-child th:first-child,\n.panel > .table-responsive:first-child > .table:first-child > thead:first-child > tr:first-child th:first-child,\n.panel > .table:first-child > tbody:first-child > tr:first-child th:first-child,\n.panel > .table-responsive:first-child > .table:first-child > tbody:first-child > tr:first-child th:first-child {\n border-top-left-radius: 3px;\n}\n.panel > .table:first-child > thead:first-child > tr:first-child td:last-child,\n.panel > .table-responsive:first-child > .table:first-child > thead:first-child > tr:first-child td:last-child,\n.panel > .table:first-child > tbody:first-child > tr:first-child td:last-child,\n.panel > .table-responsive:first-child > .table:first-child > tbody:first-child > tr:first-child td:last-child,\n.panel > .table:first-child > thead:first-child > tr:first-child th:last-child,\n.panel > .table-responsive:first-child > .table:first-child > thead:first-child > tr:first-child th:last-child,\n.panel > .table:first-child > tbody:first-child > tr:first-child th:last-child,\n.panel > .table-responsive:first-child > .table:first-child > tbody:first-child > tr:first-child th:last-child {\n border-top-right-radius: 3px;\n}\n.panel > .table:last-child,\n.panel > .table-responsive:last-child > .table:last-child {\n border-bottom-right-radius: 3px;\n border-bottom-left-radius: 3px;\n}\n.panel > .table:last-child > tbody:last-child > tr:last-child,\n.panel > .table-responsive:last-child > .table:last-child > tbody:last-child > tr:last-child,\n.panel > .table:last-child > tfoot:last-child > tr:last-child,\n.panel > .table-responsive:last-child > .table:last-child > tfoot:last-child > tr:last-child {\n border-bottom-left-radius: 3px;\n border-bottom-right-radius: 3px;\n}\n.panel > .table:last-child > tbody:last-child > tr:last-child td:first-child,\n.panel > .table-responsive:last-child > .table:last-child > tbody:last-child > tr:last-child td:first-child,\n.panel > .table:last-child > tfoot:last-child > tr:last-child td:first-child,\n.panel > .table-responsive:last-child > .table:last-child > tfoot:last-child > tr:last-child td:first-child,\n.panel > .table:last-child > tbody:last-child > tr:last-child th:first-child,\n.panel > .table-responsive:last-child > .table:last-child > tbody:last-child > tr:last-child th:first-child,\n.panel > .table:last-child > tfoot:last-child > tr:last-child th:first-child,\n.panel > .table-responsive:last-child > .table:last-child > tfoot:last-child > tr:last-child th:first-child {\n border-bottom-left-radius: 3px;\n}\n.panel > .table:last-child > tbody:last-child > tr:last-child td:last-child,\n.panel > .table-responsive:last-child > .table:last-child > tbody:last-child > tr:last-child td:last-child,\n.panel > .table:last-child > tfoot:last-child > tr:last-child td:last-child,\n.panel > .table-responsive:last-child > .table:last-child > tfoot:last-child > tr:last-child td:last-child,\n.panel > .table:last-child > tbody:last-child > tr:last-child th:last-child,\n.panel > .table-responsive:last-child > .table:last-child > tbody:last-child > tr:last-child th:last-child,\n.panel > .table:last-child > tfoot:last-child > tr:last-child th:last-child,\n.panel > .table-responsive:last-child > .table:last-child > tfoot:last-child > tr:last-child th:last-child {\n border-bottom-right-radius: 3px;\n}\n.panel > .panel-body + .table,\n.panel > .panel-body + .table-responsive,\n.panel > .table + .panel-body,\n.panel > .table-responsive + .panel-body {\n border-top: 1px solid #ddd;\n}\n.panel > .table > tbody:first-child > tr:first-child th,\n.panel > .table > tbody:first-child > tr:first-child td {\n border-top: 0;\n}\n.panel > .table-bordered,\n.panel > .table-responsive > .table-bordered {\n border: 0;\n}\n.panel > .table-bordered > thead > tr > th:first-child,\n.panel > .table-responsive > .table-bordered > thead > tr > th:first-child,\n.panel > .table-bordered > tbody > tr > th:first-child,\n.panel > .table-responsive > .table-bordered > tbody > tr > th:first-child,\n.panel > .table-bordered > tfoot > tr > th:first-child,\n.panel > .table-responsive > .table-bordered > tfoot > tr > th:first-child,\n.panel > .table-bordered > thead > tr > td:first-child,\n.panel > .table-responsive > .table-bordered > thead > tr > td:first-child,\n.panel > .table-bordered > tbody > tr > td:first-child,\n.panel > .table-responsive > .table-bordered > tbody > tr > td:first-child,\n.panel > .table-bordered > tfoot > tr > td:first-child,\n.panel > .table-responsive > .table-bordered > tfoot > tr > td:first-child {\n border-left: 0;\n}\n.panel > .table-bordered > thead > tr > th:last-child,\n.panel > .table-responsive > .table-bordered > thead > tr > th:last-child,\n.panel > .table-bordered > tbody > tr > th:last-child,\n.panel > .table-responsive > .table-bordered > tbody > tr > th:last-child,\n.panel > .table-bordered > tfoot > tr > th:last-child,\n.panel > .table-responsive > .table-bordered > tfoot > tr > th:last-child,\n.panel > .table-bordered > thead > tr > td:last-child,\n.panel > .table-responsive > .table-bordered > thead > tr > td:last-child,\n.panel > .table-bordered > tbody > tr > td:last-child,\n.panel > .table-responsive > .table-bordered > tbody > tr > td:last-child,\n.panel > .table-bordered > tfoot > tr > td:last-child,\n.panel > .table-responsive > .table-bordered > tfoot > tr > td:last-child {\n border-right: 0;\n}\n.panel > .table-bordered > thead > tr:first-child > td,\n.panel > .table-responsive > .table-bordered > thead > tr:first-child > td,\n.panel > .table-bordered > tbody > tr:first-child > td,\n.panel > .table-responsive > .table-bordered > tbody > tr:first-child > td,\n.panel > .table-bordered > thead > tr:first-child > th,\n.panel > .table-responsive > .table-bordered > thead > tr:first-child > th,\n.panel > .table-bordered > tbody > tr:first-child > th,\n.panel > .table-responsive > .table-bordered > tbody > tr:first-child > th {\n border-bottom: 0;\n}\n.panel > .table-bordered > tbody > tr:last-child > td,\n.panel > .table-responsive > .table-bordered > tbody > tr:last-child > td,\n.panel > .table-bordered > tfoot > tr:last-child > td,\n.panel > .table-responsive > .table-bordered > tfoot > tr:last-child > td,\n.panel > .table-bordered > tbody > tr:last-child > th,\n.panel > .table-responsive > .table-bordered > tbody > tr:last-child > th,\n.panel > .table-bordered > tfoot > tr:last-child > th,\n.panel > .table-responsive > .table-bordered > tfoot > tr:last-child > th {\n border-bottom: 0;\n}\n.panel > .table-responsive {\n border: 0;\n margin-bottom: 0;\n}\n.panel-group {\n margin-bottom: 20px;\n}\n.panel-group .panel {\n margin-bottom: 0;\n border-radius: 4px;\n}\n.panel-group .panel + .panel {\n margin-top: 5px;\n}\n.panel-group .panel-heading {\n border-bottom: 0;\n}\n.panel-group .panel-heading + .panel-collapse > .panel-body,\n.panel-group .panel-heading + .panel-collapse > .list-group {\n border-top: 1px solid #ddd;\n}\n.panel-group .panel-footer {\n border-top: 0;\n}\n.panel-group .panel-footer + .panel-collapse .panel-body {\n border-bottom: 1px solid #ddd;\n}\n.panel-default {\n border-color: #ddd;\n}\n.panel-default > .panel-heading {\n color: #333333;\n background-color: #f5f5f5;\n border-color: #ddd;\n}\n.panel-default > .panel-heading + .panel-collapse > .panel-body {\n border-top-color: #ddd;\n}\n.panel-default > .panel-heading .badge {\n color: #f5f5f5;\n background-color: #333333;\n}\n.panel-default > .panel-footer + .panel-collapse > .panel-body {\n border-bottom-color: #ddd;\n}\n.panel-primary {\n border-color: #337ab7;\n}\n.panel-primary > .panel-heading {\n color: #fff;\n background-color: #337ab7;\n border-color: #337ab7;\n}\n.panel-primary > .panel-heading + .panel-collapse > .panel-body {\n border-top-color: #337ab7;\n}\n.panel-primary > .panel-heading .badge {\n color: #337ab7;\n background-color: #fff;\n}\n.panel-primary > .panel-footer + .panel-collapse > .panel-body {\n border-bottom-color: #337ab7;\n}\n.panel-success {\n border-color: #d6e9c6;\n}\n.panel-success > .panel-heading {\n color: #3c763d;\n background-color: #dff0d8;\n border-color: #d6e9c6;\n}\n.panel-success > .panel-heading + .panel-collapse > .panel-body {\n border-top-color: #d6e9c6;\n}\n.panel-success > .panel-heading .badge {\n color: #dff0d8;\n background-color: #3c763d;\n}\n.panel-success > .panel-footer + .panel-collapse > .panel-body {\n border-bottom-color: #d6e9c6;\n}\n.panel-info {\n border-color: #bce8f1;\n}\n.panel-info > .panel-heading {\n color: #31708f;\n background-color: #d9edf7;\n border-color: #bce8f1;\n}\n.panel-info > .panel-heading + .panel-collapse > .panel-body {\n border-top-color: #bce8f1;\n}\n.panel-info > .panel-heading .badge {\n color: #d9edf7;\n background-color: #31708f;\n}\n.panel-info > .panel-footer + .panel-collapse > .panel-body {\n border-bottom-color: #bce8f1;\n}\n.panel-warning {\n border-color: #faebcc;\n}\n.panel-warning > .panel-heading {\n color: #8a6d3b;\n background-color: #fcf8e3;\n border-color: #faebcc;\n}\n.panel-warning > .panel-heading + .panel-collapse > .panel-body {\n border-top-color: #faebcc;\n}\n.panel-warning > .panel-heading .badge {\n color: #fcf8e3;\n background-color: #8a6d3b;\n}\n.panel-warning > .panel-footer + .panel-collapse > .panel-body {\n border-bottom-color: #faebcc;\n}\n.panel-danger {\n border-color: #ebccd1;\n}\n.panel-danger > .panel-heading {\n color: #a94442;\n background-color: #f2dede;\n border-color: #ebccd1;\n}\n.panel-danger > .panel-heading + .panel-collapse > .panel-body {\n border-top-color: #ebccd1;\n}\n.panel-danger > .panel-heading .badge {\n color: #f2dede;\n background-color: #a94442;\n}\n.panel-danger > .panel-footer + .panel-collapse > .panel-body {\n border-bottom-color: #ebccd1;\n}\n.embed-responsive {\n position: relative;\n display: block;\n height: 0;\n padding: 0;\n overflow: hidden;\n}\n.embed-responsive .embed-responsive-item,\n.embed-responsive iframe,\n.embed-responsive embed,\n.embed-responsive object,\n.embed-responsive video {\n position: absolute;\n top: 0;\n left: 0;\n bottom: 0;\n height: 100%;\n width: 100%;\n border: 0;\n}\n.embed-responsive-16by9 {\n padding-bottom: 56.25%;\n}\n.embed-responsive-4by3 {\n padding-bottom: 75%;\n}\n.well {\n min-height: 20px;\n padding: 19px;\n margin-bottom: 20px;\n background-color: #f5f5f5;\n border: 1px solid #e3e3e3;\n border-radius: 4px;\n -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.05);\n box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.05);\n}\n.well blockquote {\n border-color: #ddd;\n border-color: rgba(0, 0, 0, 0.15);\n}\n.well-lg {\n padding: 24px;\n border-radius: 6px;\n}\n.well-sm {\n padding: 9px;\n border-radius: 3px;\n}\n.close {\n float: right;\n font-size: 21px;\n font-weight: bold;\n line-height: 1;\n color: #000;\n text-shadow: 0 1px 0 #fff;\n opacity: 0.2;\n filter: alpha(opacity=20);\n}\n.close:hover,\n.close:focus {\n color: #000;\n text-decoration: none;\n cursor: pointer;\n opacity: 0.5;\n filter: alpha(opacity=50);\n}\nbutton.close {\n padding: 0;\n cursor: pointer;\n background: transparent;\n border: 0;\n -webkit-appearance: none;\n}\n.modal-open {\n overflow: hidden;\n}\n.modal {\n display: none;\n overflow: hidden;\n position: fixed;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n z-index: 1050;\n -webkit-overflow-scrolling: touch;\n outline: 0;\n}\n.modal.fade .modal-dialog {\n -webkit-transform: translate(0, -25%);\n -ms-transform: translate(0, -25%);\n -o-transform: translate(0, -25%);\n transform: translate(0, -25%);\n -webkit-transition: -webkit-transform 0.3s ease-out;\n -moz-transition: -moz-transform 0.3s ease-out;\n -o-transition: -o-transform 0.3s ease-out;\n transition: transform 0.3s ease-out;\n}\n.modal.in .modal-dialog {\n -webkit-transform: translate(0, 0);\n -ms-transform: translate(0, 0);\n -o-transform: translate(0, 0);\n transform: translate(0, 0);\n}\n.modal-open .modal {\n overflow-x: hidden;\n overflow-y: auto;\n}\n.modal-dialog {\n position: relative;\n width: auto;\n margin: 10px;\n}\n.modal-content {\n position: relative;\n background-color: #fff;\n border: 1px solid #999;\n border: 1px solid rgba(0, 0, 0, 0.2);\n border-radius: 6px;\n -webkit-box-shadow: 0 3px 9px rgba(0, 0, 0, 0.5);\n box-shadow: 0 3px 9px rgba(0, 0, 0, 0.5);\n background-clip: padding-box;\n outline: 0;\n}\n.modal-backdrop {\n position: fixed;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n z-index: 1040;\n background-color: #000;\n}\n.modal-backdrop.fade {\n opacity: 0;\n filter: alpha(opacity=0);\n}\n.modal-backdrop.in {\n opacity: 0.5;\n filter: alpha(opacity=50);\n}\n.modal-header {\n padding: 15px;\n border-bottom: 1px solid #e5e5e5;\n}\n.modal-header .close {\n margin-top: -2px;\n}\n.modal-title {\n margin: 0;\n line-height: 1.42857143;\n}\n.modal-body {\n position: relative;\n padding: 15px;\n}\n.modal-footer {\n padding: 15px;\n text-align: right;\n border-top: 1px solid #e5e5e5;\n}\n.modal-footer .btn + .btn {\n margin-left: 5px;\n margin-bottom: 0;\n}\n.modal-footer .btn-group .btn + .btn {\n margin-left: -1px;\n}\n.modal-footer .btn-block + .btn-block {\n margin-left: 0;\n}\n.modal-scrollbar-measure {\n position: absolute;\n top: -9999px;\n width: 50px;\n height: 50px;\n overflow: scroll;\n}\n@media (min-width: 768px) {\n .modal-dialog {\n width: 600px;\n margin: 30px auto;\n }\n .modal-content {\n -webkit-box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);\n box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);\n }\n .modal-sm {\n width: 300px;\n }\n}\n@media (min-width: 992px) {\n .modal-lg {\n width: 900px;\n }\n}\n.tooltip {\n position: absolute;\n z-index: 1070;\n display: block;\n font-family: \"Helvetica Neue\", Helvetica, Arial, sans-serif;\n font-style: normal;\n font-weight: normal;\n letter-spacing: normal;\n line-break: auto;\n line-height: 1.42857143;\n text-align: left;\n text-align: start;\n text-decoration: none;\n text-shadow: none;\n text-transform: none;\n white-space: normal;\n word-break: normal;\n word-spacing: normal;\n word-wrap: normal;\n font-size: 12px;\n opacity: 0;\n filter: alpha(opacity=0);\n}\n.tooltip.in {\n opacity: 0.9;\n filter: alpha(opacity=90);\n}\n.tooltip.top {\n margin-top: -3px;\n padding: 5px 0;\n}\n.tooltip.right {\n margin-left: 3px;\n padding: 0 5px;\n}\n.tooltip.bottom {\n margin-top: 3px;\n padding: 5px 0;\n}\n.tooltip.left {\n margin-left: -3px;\n padding: 0 5px;\n}\n.tooltip-inner {\n max-width: 200px;\n padding: 3px 8px;\n color: #fff;\n text-align: center;\n background-color: #000;\n border-radius: 4px;\n}\n.tooltip-arrow {\n position: absolute;\n width: 0;\n height: 0;\n border-color: transparent;\n border-style: solid;\n}\n.tooltip.top .tooltip-arrow {\n bottom: 0;\n left: 50%;\n margin-left: -5px;\n border-width: 5px 5px 0;\n border-top-color: #000;\n}\n.tooltip.top-left .tooltip-arrow {\n bottom: 0;\n right: 5px;\n margin-bottom: -5px;\n border-width: 5px 5px 0;\n border-top-color: #000;\n}\n.tooltip.top-right .tooltip-arrow {\n bottom: 0;\n left: 5px;\n margin-bottom: -5px;\n border-width: 5px 5px 0;\n border-top-color: #000;\n}\n.tooltip.right .tooltip-arrow {\n top: 50%;\n left: 0;\n margin-top: -5px;\n border-width: 5px 5px 5px 0;\n border-right-color: #000;\n}\n.tooltip.left .tooltip-arrow {\n top: 50%;\n right: 0;\n margin-top: -5px;\n border-width: 5px 0 5px 5px;\n border-left-color: #000;\n}\n.tooltip.bottom .tooltip-arrow {\n top: 0;\n left: 50%;\n margin-left: -5px;\n border-width: 0 5px 5px;\n border-bottom-color: #000;\n}\n.tooltip.bottom-left .tooltip-arrow {\n top: 0;\n right: 5px;\n margin-top: -5px;\n border-width: 0 5px 5px;\n border-bottom-color: #000;\n}\n.tooltip.bottom-right .tooltip-arrow {\n top: 0;\n left: 5px;\n margin-top: -5px;\n border-width: 0 5px 5px;\n border-bottom-color: #000;\n}\n.popover {\n position: absolute;\n top: 0;\n left: 0;\n z-index: 1060;\n display: none;\n max-width: 276px;\n padding: 1px;\n font-family: \"Helvetica Neue\", Helvetica, Arial, sans-serif;\n font-style: normal;\n font-weight: normal;\n letter-spacing: normal;\n line-break: auto;\n line-height: 1.42857143;\n text-align: left;\n text-align: start;\n text-decoration: none;\n text-shadow: none;\n text-transform: none;\n white-space: normal;\n word-break: normal;\n word-spacing: normal;\n word-wrap: normal;\n font-size: 14px;\n background-color: #fff;\n background-clip: padding-box;\n border: 1px solid #ccc;\n border: 1px solid rgba(0, 0, 0, 0.2);\n border-radius: 6px;\n -webkit-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);\n box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);\n}\n.popover.top {\n margin-top: -10px;\n}\n.popover.right {\n margin-left: 10px;\n}\n.popover.bottom {\n margin-top: 10px;\n}\n.popover.left {\n margin-left: -10px;\n}\n.popover-title {\n margin: 0;\n padding: 8px 14px;\n font-size: 14px;\n background-color: #f7f7f7;\n border-bottom: 1px solid #ebebeb;\n border-radius: 5px 5px 0 0;\n}\n.popover-content {\n padding: 9px 14px;\n}\n.popover > .arrow,\n.popover > .arrow:after {\n position: absolute;\n display: block;\n width: 0;\n height: 0;\n border-color: transparent;\n border-style: solid;\n}\n.popover > .arrow {\n border-width: 11px;\n}\n.popover > .arrow:after {\n border-width: 10px;\n content: \"\";\n}\n.popover.top > .arrow {\n left: 50%;\n margin-left: -11px;\n border-bottom-width: 0;\n border-top-color: #999999;\n border-top-color: rgba(0, 0, 0, 0.25);\n bottom: -11px;\n}\n.popover.top > .arrow:after {\n content: \" \";\n bottom: 1px;\n margin-left: -10px;\n border-bottom-width: 0;\n border-top-color: #fff;\n}\n.popover.right > .arrow {\n top: 50%;\n left: -11px;\n margin-top: -11px;\n border-left-width: 0;\n border-right-color: #999999;\n border-right-color: rgba(0, 0, 0, 0.25);\n}\n.popover.right > .arrow:after {\n content: \" \";\n left: 1px;\n bottom: -10px;\n border-left-width: 0;\n border-right-color: #fff;\n}\n.popover.bottom > .arrow {\n left: 50%;\n margin-left: -11px;\n border-top-width: 0;\n border-bottom-color: #999999;\n border-bottom-color: rgba(0, 0, 0, 0.25);\n top: -11px;\n}\n.popover.bottom > .arrow:after {\n content: \" \";\n top: 1px;\n margin-left: -10px;\n border-top-width: 0;\n border-bottom-color: #fff;\n}\n.popover.left > .arrow {\n top: 50%;\n right: -11px;\n margin-top: -11px;\n border-right-width: 0;\n border-left-color: #999999;\n border-left-color: rgba(0, 0, 0, 0.25);\n}\n.popover.left > .arrow:after {\n content: \" \";\n right: 1px;\n border-right-width: 0;\n border-left-color: #fff;\n bottom: -10px;\n}\n.carousel {\n position: relative;\n}\n.carousel-inner {\n position: relative;\n overflow: hidden;\n width: 100%;\n}\n.carousel-inner > .item {\n display: none;\n position: relative;\n -webkit-transition: 0.6s ease-in-out left;\n -o-transition: 0.6s ease-in-out left;\n transition: 0.6s ease-in-out left;\n}\n.carousel-inner > .item > img,\n.carousel-inner > .item > a > img {\n line-height: 1;\n}\n@media all and (transform-3d), (-webkit-transform-3d) {\n .carousel-inner > .item {\n -webkit-transition: -webkit-transform 0.6s ease-in-out;\n -moz-transition: -moz-transform 0.6s ease-in-out;\n -o-transition: -o-transform 0.6s ease-in-out;\n transition: transform 0.6s ease-in-out;\n -webkit-backface-visibility: hidden;\n -moz-backface-visibility: hidden;\n backface-visibility: hidden;\n -webkit-perspective: 1000px;\n -moz-perspective: 1000px;\n perspective: 1000px;\n }\n .carousel-inner > .item.next,\n .carousel-inner > .item.active.right {\n -webkit-transform: translate3d(100%, 0, 0);\n transform: translate3d(100%, 0, 0);\n left: 0;\n }\n .carousel-inner > .item.prev,\n .carousel-inner > .item.active.left {\n -webkit-transform: translate3d(-100%, 0, 0);\n transform: translate3d(-100%, 0, 0);\n left: 0;\n }\n .carousel-inner > .item.next.left,\n .carousel-inner > .item.prev.right,\n .carousel-inner > .item.active {\n -webkit-transform: translate3d(0, 0, 0);\n transform: translate3d(0, 0, 0);\n left: 0;\n }\n}\n.carousel-inner > .active,\n.carousel-inner > .next,\n.carousel-inner > .prev {\n display: block;\n}\n.carousel-inner > .active {\n left: 0;\n}\n.carousel-inner > .next,\n.carousel-inner > .prev {\n position: absolute;\n top: 0;\n width: 100%;\n}\n.carousel-inner > .next {\n left: 100%;\n}\n.carousel-inner > .prev {\n left: -100%;\n}\n.carousel-inner > .next.left,\n.carousel-inner > .prev.right {\n left: 0;\n}\n.carousel-inner > .active.left {\n left: -100%;\n}\n.carousel-inner > .active.right {\n left: 100%;\n}\n.carousel-control {\n position: absolute;\n top: 0;\n left: 0;\n bottom: 0;\n width: 15%;\n opacity: 0.5;\n filter: alpha(opacity=50);\n font-size: 20px;\n color: #fff;\n text-align: center;\n text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);\n background-color: rgba(0, 0, 0, 0);\n}\n.carousel-control.left {\n background-image: -webkit-linear-gradient(left, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0.0001) 100%);\n background-image: -o-linear-gradient(left, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0.0001) 100%);\n background-image: linear-gradient(to right, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0.0001) 100%);\n background-repeat: repeat-x;\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#80000000', endColorstr='#00000000', GradientType=1);\n}\n.carousel-control.right {\n left: auto;\n right: 0;\n background-image: -webkit-linear-gradient(left, rgba(0, 0, 0, 0.0001) 0%, rgba(0, 0, 0, 0.5) 100%);\n background-image: -o-linear-gradient(left, rgba(0, 0, 0, 0.0001) 0%, rgba(0, 0, 0, 0.5) 100%);\n background-image: linear-gradient(to right, rgba(0, 0, 0, 0.0001) 0%, rgba(0, 0, 0, 0.5) 100%);\n background-repeat: repeat-x;\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#00000000', endColorstr='#80000000', GradientType=1);\n}\n.carousel-control:hover,\n.carousel-control:focus {\n outline: 0;\n color: #fff;\n text-decoration: none;\n opacity: 0.9;\n filter: alpha(opacity=90);\n}\n.carousel-control .icon-prev,\n.carousel-control .icon-next,\n.carousel-control .glyphicon-chevron-left,\n.carousel-control .glyphicon-chevron-right {\n position: absolute;\n top: 50%;\n margin-top: -10px;\n z-index: 5;\n display: inline-block;\n}\n.carousel-control .icon-prev,\n.carousel-control .glyphicon-chevron-left {\n left: 50%;\n margin-left: -10px;\n}\n.carousel-control .icon-next,\n.carousel-control .glyphicon-chevron-right {\n right: 50%;\n margin-right: -10px;\n}\n.carousel-control .icon-prev,\n.carousel-control .icon-next {\n width: 20px;\n height: 20px;\n line-height: 1;\n font-family: serif;\n}\n.carousel-control .icon-prev:before {\n content: '\\2039';\n}\n.carousel-control .icon-next:before {\n content: '\\203a';\n}\n.carousel-indicators {\n position: absolute;\n bottom: 10px;\n left: 50%;\n z-index: 15;\n width: 60%;\n margin-left: -30%;\n padding-left: 0;\n list-style: none;\n text-align: center;\n}\n.carousel-indicators li {\n display: inline-block;\n width: 10px;\n height: 10px;\n margin: 1px;\n text-indent: -999px;\n border: 1px solid #fff;\n border-radius: 10px;\n cursor: pointer;\n background-color: #000 \\9;\n background-color: rgba(0, 0, 0, 0);\n}\n.carousel-indicators .active {\n margin: 0;\n width: 12px;\n height: 12px;\n background-color: #fff;\n}\n.carousel-caption {\n position: absolute;\n left: 15%;\n right: 15%;\n bottom: 20px;\n z-index: 10;\n padding-top: 20px;\n padding-bottom: 20px;\n color: #fff;\n text-align: center;\n text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);\n}\n.carousel-caption .btn {\n text-shadow: none;\n}\n@media screen and (min-width: 768px) {\n .carousel-control .glyphicon-chevron-left,\n .carousel-control .glyphicon-chevron-right,\n .carousel-control .icon-prev,\n .carousel-control .icon-next {\n width: 30px;\n height: 30px;\n margin-top: -10px;\n font-size: 30px;\n }\n .carousel-control .glyphicon-chevron-left,\n .carousel-control .icon-prev {\n margin-left: -10px;\n }\n .carousel-control .glyphicon-chevron-right,\n .carousel-control .icon-next {\n margin-right: -10px;\n }\n .carousel-caption {\n left: 20%;\n right: 20%;\n padding-bottom: 30px;\n }\n .carousel-indicators {\n bottom: 20px;\n }\n}\n.clearfix:before,\n.clearfix:after,\n.dl-horizontal dd:before,\n.dl-horizontal dd:after,\n.container:before,\n.container:after,\n.container-fluid:before,\n.container-fluid:after,\n.row:before,\n.row:after,\n.form-horizontal .form-group:before,\n.form-horizontal .form-group:after,\n.btn-toolbar:before,\n.btn-toolbar:after,\n.btn-group-vertical > .btn-group:before,\n.btn-group-vertical > .btn-group:after,\n.nav:before,\n.nav:after,\n.navbar:before,\n.navbar:after,\n.navbar-header:before,\n.navbar-header:after,\n.navbar-collapse:before,\n.navbar-collapse:after,\n.pager:before,\n.pager:after,\n.panel-body:before,\n.panel-body:after,\n.modal-header:before,\n.modal-header:after,\n.modal-footer:before,\n.modal-footer:after {\n content: \" \";\n display: table;\n}\n.clearfix:after,\n.dl-horizontal dd:after,\n.container:after,\n.container-fluid:after,\n.row:after,\n.form-horizontal .form-group:after,\n.btn-toolbar:after,\n.btn-group-vertical > .btn-group:after,\n.nav:after,\n.navbar:after,\n.navbar-header:after,\n.navbar-collapse:after,\n.pager:after,\n.panel-body:after,\n.modal-header:after,\n.modal-footer:after {\n clear: both;\n}\n.center-block {\n display: block;\n margin-left: auto;\n margin-right: auto;\n}\n.pull-right {\n float: right !important;\n}\n.pull-left {\n float: left !important;\n}\n.hide {\n display: none !important;\n}\n.show {\n display: block !important;\n}\n.invisible {\n visibility: hidden;\n}\n.text-hide {\n font: 0/0 a;\n color: transparent;\n text-shadow: none;\n background-color: transparent;\n border: 0;\n}\n.hidden {\n display: none !important;\n}\n.affix {\n position: fixed;\n}\n@-ms-viewport {\n width: device-width;\n}\n.visible-xs,\n.visible-sm,\n.visible-md,\n.visible-lg {\n display: none !important;\n}\n.visible-xs-block,\n.visible-xs-inline,\n.visible-xs-inline-block,\n.visible-sm-block,\n.visible-sm-inline,\n.visible-sm-inline-block,\n.visible-md-block,\n.visible-md-inline,\n.visible-md-inline-block,\n.visible-lg-block,\n.visible-lg-inline,\n.visible-lg-inline-block {\n display: none !important;\n}\n@media (max-width: 767px) {\n .visible-xs {\n display: block !important;\n }\n table.visible-xs {\n display: table !important;\n }\n tr.visible-xs {\n display: table-row !important;\n }\n th.visible-xs,\n td.visible-xs {\n display: table-cell !important;\n }\n}\n@media (max-width: 767px) {\n .visible-xs-block {\n display: block !important;\n }\n}\n@media (max-width: 767px) {\n .visible-xs-inline {\n display: inline !important;\n }\n}\n@media (max-width: 767px) {\n .visible-xs-inline-block {\n display: inline-block !important;\n }\n}\n@media (min-width: 768px) and (max-width: 991px) {\n .visible-sm {\n display: block !important;\n }\n table.visible-sm {\n display: table !important;\n }\n tr.visible-sm {\n display: table-row !important;\n }\n th.visible-sm,\n td.visible-sm {\n display: table-cell !important;\n }\n}\n@media (min-width: 768px) and (max-width: 991px) {\n .visible-sm-block {\n display: block !important;\n }\n}\n@media (min-width: 768px) and (max-width: 991px) {\n .visible-sm-inline {\n display: inline !important;\n }\n}\n@media (min-width: 768px) and (max-width: 991px) {\n .visible-sm-inline-block {\n display: inline-block !important;\n }\n}\n@media (min-width: 992px) and (max-width: 1199px) {\n .visible-md {\n display: block !important;\n }\n table.visible-md {\n display: table !important;\n }\n tr.visible-md {\n display: table-row !important;\n }\n th.visible-md,\n td.visible-md {\n display: table-cell !important;\n }\n}\n@media (min-width: 992px) and (max-width: 1199px) {\n .visible-md-block {\n display: block !important;\n }\n}\n@media (min-width: 992px) and (max-width: 1199px) {\n .visible-md-inline {\n display: inline !important;\n }\n}\n@media (min-width: 992px) and (max-width: 1199px) {\n .visible-md-inline-block {\n display: inline-block !important;\n }\n}\n@media (min-width: 1200px) {\n .visible-lg {\n display: block !important;\n }\n table.visible-lg {\n display: table !important;\n }\n tr.visible-lg {\n display: table-row !important;\n }\n th.visible-lg,\n td.visible-lg {\n display: table-cell !important;\n }\n}\n@media (min-width: 1200px) {\n .visible-lg-block {\n display: block !important;\n }\n}\n@media (min-width: 1200px) {\n .visible-lg-inline {\n display: inline !important;\n }\n}\n@media (min-width: 1200px) {\n .visible-lg-inline-block {\n display: inline-block !important;\n }\n}\n@media (max-width: 767px) {\n .hidden-xs {\n display: none !important;\n }\n}\n@media (min-width: 768px) and (max-width: 991px) {\n .hidden-sm {\n display: none !important;\n }\n}\n@media (min-width: 992px) and (max-width: 1199px) {\n .hidden-md {\n display: none !important;\n }\n}\n@media (min-width: 1200px) {\n .hidden-lg {\n display: none !important;\n }\n}\n.visible-print {\n display: none !important;\n}\n@media print {\n .visible-print {\n display: block !important;\n }\n table.visible-print {\n display: table !important;\n }\n tr.visible-print {\n display: table-row !important;\n }\n th.visible-print,\n td.visible-print {\n display: table-cell !important;\n }\n}\n.visible-print-block {\n display: none !important;\n}\n@media print {\n .visible-print-block {\n display: block !important;\n }\n}\n.visible-print-inline {\n display: none !important;\n}\n@media print {\n .visible-print-inline {\n display: inline !important;\n }\n}\n.visible-print-inline-block {\n display: none !important;\n}\n@media print {\n .visible-print-inline-block {\n display: inline-block !important;\n }\n}\n@media print {\n .hidden-print {\n display: none !important;\n }\n}\n/*# sourceMappingURL=bootstrap.css.map */","/*! normalize.css v3.0.3 | MIT License | github.com/necolas/normalize.css */\n\n//\n// 1. Set default font family to sans-serif.\n// 2. Prevent iOS and IE text size adjust after device orientation change,\n// without disabling user zoom.\n//\n\nhtml {\n font-family: sans-serif; // 1\n -ms-text-size-adjust: 100%; // 2\n -webkit-text-size-adjust: 100%; // 2\n}\n\n//\n// Remove default margin.\n//\n\nbody {\n margin: 0;\n}\n\n// HTML5 display definitions\n// ==========================================================================\n\n//\n// Correct `block` display not defined for any HTML5 element in IE 8/9.\n// Correct `block` display not defined for `details` or `summary` in IE 10/11\n// and Firefox.\n// Correct `block` display not defined for `main` in IE 11.\n//\n\narticle,\naside,\ndetails,\nfigcaption,\nfigure,\nfooter,\nheader,\nhgroup,\nmain,\nmenu,\nnav,\nsection,\nsummary {\n display: block;\n}\n\n//\n// 1. Correct `inline-block` display not defined in IE 8/9.\n// 2. Normalize vertical alignment of `progress` in Chrome, Firefox, and Opera.\n//\n\naudio,\ncanvas,\nprogress,\nvideo {\n display: inline-block; // 1\n vertical-align: baseline; // 2\n}\n\n//\n// Prevent modern browsers from displaying `audio` without controls.\n// Remove excess height in iOS 5 devices.\n//\n\naudio:not([controls]) {\n display: none;\n height: 0;\n}\n\n//\n// Address `[hidden]` styling not present in IE 8/9/10.\n// Hide the `template` element in IE 8/9/10/11, Safari, and Firefox < 22.\n//\n\n[hidden],\ntemplate {\n display: none;\n}\n\n// Links\n// ==========================================================================\n\n//\n// Remove the gray background color from active links in IE 10.\n//\n\na {\n background-color: transparent;\n}\n\n//\n// Improve readability of focused elements when they are also in an\n// active/hover state.\n//\n\na:active,\na:hover {\n outline: 0;\n}\n\n// Text-level semantics\n// ==========================================================================\n\n//\n// Address styling not present in IE 8/9/10/11, Safari, and Chrome.\n//\n\nabbr[title] {\n border-bottom: 1px dotted;\n}\n\n//\n// Address style set to `bolder` in Firefox 4+, Safari, and Chrome.\n//\n\nb,\nstrong {\n font-weight: bold;\n}\n\n//\n// Address styling not present in Safari and Chrome.\n//\n\ndfn {\n font-style: italic;\n}\n\n//\n// Address variable `h1` font-size and margin within `section` and `article`\n// contexts in Firefox 4+, Safari, and Chrome.\n//\n\nh1 {\n font-size: 2em;\n margin: 0.67em 0;\n}\n\n//\n// Address styling not present in IE 8/9.\n//\n\nmark {\n background: #ff0;\n color: #000;\n}\n\n//\n// Address inconsistent and variable font size in all browsers.\n//\n\nsmall {\n font-size: 80%;\n}\n\n//\n// Prevent `sub` and `sup` affecting `line-height` in all browsers.\n//\n\nsub,\nsup {\n font-size: 75%;\n line-height: 0;\n position: relative;\n vertical-align: baseline;\n}\n\nsup {\n top: -0.5em;\n}\n\nsub {\n bottom: -0.25em;\n}\n\n// Embedded content\n// ==========================================================================\n\n//\n// Remove border when inside `a` element in IE 8/9/10.\n//\n\nimg {\n border: 0;\n}\n\n//\n// Correct overflow not hidden in IE 9/10/11.\n//\n\nsvg:not(:root) {\n overflow: hidden;\n}\n\n// Grouping content\n// ==========================================================================\n\n//\n// Address margin not present in IE 8/9 and Safari.\n//\n\nfigure {\n margin: 1em 40px;\n}\n\n//\n// Address differences between Firefox and other browsers.\n//\n\nhr {\n box-sizing: content-box;\n height: 0;\n}\n\n//\n// Contain overflow in all browsers.\n//\n\npre {\n overflow: auto;\n}\n\n//\n// Address odd `em`-unit font size rendering in all browsers.\n//\n\ncode,\nkbd,\npre,\nsamp {\n font-family: monospace, monospace;\n font-size: 1em;\n}\n\n// Forms\n// ==========================================================================\n\n//\n// Known limitation: by default, Chrome and Safari on OS X allow very limited\n// styling of `select`, unless a `border` property is set.\n//\n\n//\n// 1. Correct color not being inherited.\n// Known issue: affects color of disabled elements.\n// 2. Correct font properties not being inherited.\n// 3. Address margins set differently in Firefox 4+, Safari, and Chrome.\n//\n\nbutton,\ninput,\noptgroup,\nselect,\ntextarea {\n color: inherit; // 1\n font: inherit; // 2\n margin: 0; // 3\n}\n\n//\n// Address `overflow` set to `hidden` in IE 8/9/10/11.\n//\n\nbutton {\n overflow: visible;\n}\n\n//\n// Address inconsistent `text-transform` inheritance for `button` and `select`.\n// All other form control elements do not inherit `text-transform` values.\n// Correct `button` style inheritance in Firefox, IE 8/9/10/11, and Opera.\n// Correct `select` style inheritance in Firefox.\n//\n\nbutton,\nselect {\n text-transform: none;\n}\n\n//\n// 1. Avoid the WebKit bug in Android 4.0.* where (2) destroys native `audio`\n// and `video` controls.\n// 2. Correct inability to style clickable `input` types in iOS.\n// 3. Improve usability and consistency of cursor style between image-type\n// `input` and others.\n//\n\nbutton,\nhtml input[type=\"button\"], // 1\ninput[type=\"reset\"],\ninput[type=\"submit\"] {\n -webkit-appearance: button; // 2\n cursor: pointer; // 3\n}\n\n//\n// Re-set default cursor for disabled elements.\n//\n\nbutton[disabled],\nhtml input[disabled] {\n cursor: default;\n}\n\n//\n// Remove inner padding and border in Firefox 4+.\n//\n\nbutton::-moz-focus-inner,\ninput::-moz-focus-inner {\n border: 0;\n padding: 0;\n}\n\n//\n// Address Firefox 4+ setting `line-height` on `input` using `!important` in\n// the UA stylesheet.\n//\n\ninput {\n line-height: normal;\n}\n\n//\n// It's recommended that you don't attempt to style these elements.\n// Firefox's implementation doesn't respect box-sizing, padding, or width.\n//\n// 1. Address box sizing set to `content-box` in IE 8/9/10.\n// 2. Remove excess padding in IE 8/9/10.\n//\n\ninput[type=\"checkbox\"],\ninput[type=\"radio\"] {\n box-sizing: border-box; // 1\n padding: 0; // 2\n}\n\n//\n// Fix the cursor style for Chrome's increment/decrement buttons. For certain\n// `font-size` values of the `input`, it causes the cursor style of the\n// decrement button to change from `default` to `text`.\n//\n\ninput[type=\"number\"]::-webkit-inner-spin-button,\ninput[type=\"number\"]::-webkit-outer-spin-button {\n height: auto;\n}\n\n//\n// 1. Address `appearance` set to `searchfield` in Safari and Chrome.\n// 2. Address `box-sizing` set to `border-box` in Safari and Chrome.\n//\n\ninput[type=\"search\"] {\n -webkit-appearance: textfield; // 1\n box-sizing: content-box; //2\n}\n\n//\n// Remove inner padding and search cancel button in Safari and Chrome on OS X.\n// Safari (but not Chrome) clips the cancel button when the search input has\n// padding (and `textfield` appearance).\n//\n\ninput[type=\"search\"]::-webkit-search-cancel-button,\ninput[type=\"search\"]::-webkit-search-decoration {\n -webkit-appearance: none;\n}\n\n//\n// Define consistent border, margin, and padding.\n//\n\nfieldset {\n border: 1px solid #c0c0c0;\n margin: 0 2px;\n padding: 0.35em 0.625em 0.75em;\n}\n\n//\n// 1. Correct `color` not being inherited in IE 8/9/10/11.\n// 2. Remove padding so people aren't caught out if they zero out fieldsets.\n//\n\nlegend {\n border: 0; // 1\n padding: 0; // 2\n}\n\n//\n// Remove default vertical scrollbar in IE 8/9/10/11.\n//\n\ntextarea {\n overflow: auto;\n}\n\n//\n// Don't inherit the `font-weight` (applied by a rule above).\n// NOTE: the default cannot safely be changed in Chrome and Safari on OS X.\n//\n\noptgroup {\n font-weight: bold;\n}\n\n// Tables\n// ==========================================================================\n\n//\n// Remove most spacing between table cells.\n//\n\ntable {\n border-collapse: collapse;\n border-spacing: 0;\n}\n\ntd,\nth {\n padding: 0;\n}\n","/*! Source: https://github.com/h5bp/html5-boilerplate/blob/master/src/css/main.css */\n\n// ==========================================================================\n// Print styles.\n// Inlined to avoid the additional HTTP request: h5bp.com/r\n// ==========================================================================\n\n@media print {\n *,\n *:before,\n *:after {\n background: transparent !important;\n color: #000 !important; // Black prints faster: h5bp.com/s\n box-shadow: none !important;\n text-shadow: none !important;\n }\n\n a,\n a:visited {\n text-decoration: underline;\n }\n\n a[href]:after {\n content: \" (\" attr(href) \")\";\n }\n\n abbr[title]:after {\n content: \" (\" attr(title) \")\";\n }\n\n // Don't show links that are fragment identifiers,\n // or use the `javascript:` pseudo protocol\n a[href^=\"#\"]:after,\n a[href^=\"javascript:\"]:after {\n content: \"\";\n }\n\n pre,\n blockquote {\n border: 1px solid #999;\n page-break-inside: avoid;\n }\n\n thead {\n display: table-header-group; // h5bp.com/t\n }\n\n tr,\n img {\n page-break-inside: avoid;\n }\n\n img {\n max-width: 100% !important;\n }\n\n p,\n h2,\n h3 {\n orphans: 3;\n widows: 3;\n }\n\n h2,\n h3 {\n page-break-after: avoid;\n }\n\n // Bootstrap specific changes start\n\n // Bootstrap components\n .navbar {\n display: none;\n }\n .btn,\n .dropup > .btn {\n > .caret {\n border-top-color: #000 !important;\n }\n }\n .label {\n border: 1px solid #000;\n }\n\n .table {\n border-collapse: collapse !important;\n\n td,\n th {\n background-color: #fff !important;\n }\n }\n .table-bordered {\n th,\n td {\n border: 1px solid #ddd !important;\n }\n }\n\n // Bootstrap specific changes end\n}\n","//\n// Glyphicons for Bootstrap\n//\n// Since icons are fonts, they can be placed anywhere text is placed and are\n// thus automatically sized to match the surrounding child. To use, create an\n// inline element with the appropriate classes, like so:\n//\n// Star\n\n// Import the fonts\n@font-face {\n font-family: 'Glyphicons Halflings';\n src: url('@{icon-font-path}@{icon-font-name}.eot');\n src: url('@{icon-font-path}@{icon-font-name}.eot?#iefix') format('embedded-opentype'),\n url('@{icon-font-path}@{icon-font-name}.woff2') format('woff2'),\n url('@{icon-font-path}@{icon-font-name}.woff') format('woff'),\n url('@{icon-font-path}@{icon-font-name}.ttf') format('truetype'),\n url('@{icon-font-path}@{icon-font-name}.svg#@{icon-font-svg-id}') format('svg');\n}\n\n// Catchall baseclass\n.glyphicon {\n position: relative;\n top: 1px;\n display: inline-block;\n font-family: 'Glyphicons Halflings';\n font-style: normal;\n font-weight: normal;\n line-height: 1;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n}\n\n// Individual icons\n.glyphicon-asterisk { &:before { content: \"\\002a\"; } }\n.glyphicon-plus { &:before { content: \"\\002b\"; } }\n.glyphicon-euro,\n.glyphicon-eur { &:before { content: \"\\20ac\"; } }\n.glyphicon-minus { &:before { content: \"\\2212\"; } }\n.glyphicon-cloud { &:before { content: \"\\2601\"; } }\n.glyphicon-envelope { &:before { content: \"\\2709\"; } }\n.glyphicon-pencil { &:before { content: \"\\270f\"; } }\n.glyphicon-glass { &:before { content: \"\\e001\"; } }\n.glyphicon-music { &:before { content: \"\\e002\"; } }\n.glyphicon-search { &:before { content: \"\\e003\"; } }\n.glyphicon-heart { &:before { content: \"\\e005\"; } }\n.glyphicon-star { &:before { content: \"\\e006\"; } }\n.glyphicon-star-empty { &:before { content: \"\\e007\"; } }\n.glyphicon-user { &:before { content: \"\\e008\"; } }\n.glyphicon-film { &:before { content: \"\\e009\"; } }\n.glyphicon-th-large { &:before { content: \"\\e010\"; } }\n.glyphicon-th { &:before { content: \"\\e011\"; } }\n.glyphicon-th-list { &:before { content: \"\\e012\"; } }\n.glyphicon-ok { &:before { content: \"\\e013\"; } }\n.glyphicon-remove { &:before { content: \"\\e014\"; } }\n.glyphicon-zoom-in { &:before { content: \"\\e015\"; } }\n.glyphicon-zoom-out { &:before { content: \"\\e016\"; } }\n.glyphicon-off { &:before { content: \"\\e017\"; } }\n.glyphicon-signal { &:before { content: \"\\e018\"; } }\n.glyphicon-cog { &:before { content: \"\\e019\"; } }\n.glyphicon-trash { &:before { content: \"\\e020\"; } }\n.glyphicon-home { &:before { content: \"\\e021\"; } }\n.glyphicon-file { &:before { content: \"\\e022\"; } }\n.glyphicon-time { &:before { content: \"\\e023\"; } }\n.glyphicon-road { &:before { content: \"\\e024\"; } }\n.glyphicon-download-alt { &:before { content: \"\\e025\"; } }\n.glyphicon-download { &:before { content: \"\\e026\"; } }\n.glyphicon-upload { &:before { content: \"\\e027\"; } }\n.glyphicon-inbox { &:before { content: \"\\e028\"; } }\n.glyphicon-play-circle { &:before { content: \"\\e029\"; } }\n.glyphicon-repeat { &:before { content: \"\\e030\"; } }\n.glyphicon-refresh { &:before { content: \"\\e031\"; } }\n.glyphicon-list-alt { &:before { content: \"\\e032\"; } }\n.glyphicon-lock { &:before { content: \"\\e033\"; } }\n.glyphicon-flag { &:before { content: \"\\e034\"; } }\n.glyphicon-headphones { &:before { content: \"\\e035\"; } }\n.glyphicon-volume-off { &:before { content: \"\\e036\"; } }\n.glyphicon-volume-down { &:before { content: \"\\e037\"; } }\n.glyphicon-volume-up { &:before { content: \"\\e038\"; } }\n.glyphicon-qrcode { &:before { content: \"\\e039\"; } }\n.glyphicon-barcode { &:before { content: \"\\e040\"; } }\n.glyphicon-tag { &:before { content: \"\\e041\"; } }\n.glyphicon-tags { &:before { content: \"\\e042\"; } }\n.glyphicon-book { &:before { content: \"\\e043\"; } }\n.glyphicon-bookmark { &:before { content: \"\\e044\"; } }\n.glyphicon-print { &:before { content: \"\\e045\"; } }\n.glyphicon-camera { &:before { content: \"\\e046\"; } }\n.glyphicon-font { &:before { content: \"\\e047\"; } }\n.glyphicon-bold { &:before { content: \"\\e048\"; } }\n.glyphicon-italic { &:before { content: \"\\e049\"; } }\n.glyphicon-text-height { &:before { content: \"\\e050\"; } }\n.glyphicon-text-width { &:before { content: \"\\e051\"; } }\n.glyphicon-align-left { &:before { content: \"\\e052\"; } }\n.glyphicon-align-center { &:before { content: \"\\e053\"; } }\n.glyphicon-align-right { &:before { content: \"\\e054\"; } }\n.glyphicon-align-justify { &:before { content: \"\\e055\"; } }\n.glyphicon-list { &:before { content: \"\\e056\"; } }\n.glyphicon-indent-left { &:before { content: \"\\e057\"; } }\n.glyphicon-indent-right { &:before { content: \"\\e058\"; } }\n.glyphicon-facetime-video { &:before { content: \"\\e059\"; } }\n.glyphicon-picture { &:before { content: \"\\e060\"; } }\n.glyphicon-map-marker { &:before { content: \"\\e062\"; } }\n.glyphicon-adjust { &:before { content: \"\\e063\"; } }\n.glyphicon-tint { &:before { content: \"\\e064\"; } }\n.glyphicon-edit { &:before { content: \"\\e065\"; } }\n.glyphicon-share { &:before { content: \"\\e066\"; } }\n.glyphicon-check { &:before { content: \"\\e067\"; } }\n.glyphicon-move { &:before { content: \"\\e068\"; } }\n.glyphicon-step-backward { &:before { content: \"\\e069\"; } }\n.glyphicon-fast-backward { &:before { content: \"\\e070\"; } }\n.glyphicon-backward { &:before { content: \"\\e071\"; } }\n.glyphicon-play { &:before { content: \"\\e072\"; } }\n.glyphicon-pause { &:before { content: \"\\e073\"; } }\n.glyphicon-stop { &:before { content: \"\\e074\"; } }\n.glyphicon-forward { &:before { content: \"\\e075\"; } }\n.glyphicon-fast-forward { &:before { content: \"\\e076\"; } }\n.glyphicon-step-forward { &:before { content: \"\\e077\"; } }\n.glyphicon-eject { &:before { content: \"\\e078\"; } }\n.glyphicon-chevron-left { &:before { content: \"\\e079\"; } }\n.glyphicon-chevron-right { &:before { content: \"\\e080\"; } }\n.glyphicon-plus-sign { &:before { content: \"\\e081\"; } }\n.glyphicon-minus-sign { &:before { content: \"\\e082\"; } }\n.glyphicon-remove-sign { &:before { content: \"\\e083\"; } }\n.glyphicon-ok-sign { &:before { content: \"\\e084\"; } }\n.glyphicon-question-sign { &:before { content: \"\\e085\"; } }\n.glyphicon-info-sign { &:before { content: \"\\e086\"; } }\n.glyphicon-screenshot { &:before { content: \"\\e087\"; } }\n.glyphicon-remove-circle { &:before { content: \"\\e088\"; } }\n.glyphicon-ok-circle { &:before { content: \"\\e089\"; } }\n.glyphicon-ban-circle { &:before { content: \"\\e090\"; } }\n.glyphicon-arrow-left { &:before { content: \"\\e091\"; } }\n.glyphicon-arrow-right { &:before { content: \"\\e092\"; } }\n.glyphicon-arrow-up { &:before { content: \"\\e093\"; } }\n.glyphicon-arrow-down { &:before { content: \"\\e094\"; } }\n.glyphicon-share-alt { &:before { content: \"\\e095\"; } }\n.glyphicon-resize-full { &:before { content: \"\\e096\"; } }\n.glyphicon-resize-small { &:before { content: \"\\e097\"; } }\n.glyphicon-exclamation-sign { &:before { content: \"\\e101\"; } }\n.glyphicon-gift { &:before { content: \"\\e102\"; } }\n.glyphicon-leaf { &:before { content: \"\\e103\"; } }\n.glyphicon-fire { &:before { content: \"\\e104\"; } }\n.glyphicon-eye-open { &:before { content: \"\\e105\"; } }\n.glyphicon-eye-close { &:before { content: \"\\e106\"; } }\n.glyphicon-warning-sign { &:before { content: \"\\e107\"; } }\n.glyphicon-plane { &:before { content: \"\\e108\"; } }\n.glyphicon-calendar { &:before { content: \"\\e109\"; } }\n.glyphicon-random { &:before { content: \"\\e110\"; } }\n.glyphicon-comment { &:before { content: \"\\e111\"; } }\n.glyphicon-magnet { &:before { content: \"\\e112\"; } }\n.glyphicon-chevron-up { &:before { content: \"\\e113\"; } }\n.glyphicon-chevron-down { &:before { content: \"\\e114\"; } }\n.glyphicon-retweet { &:before { content: \"\\e115\"; } }\n.glyphicon-shopping-cart { &:before { content: \"\\e116\"; } }\n.glyphicon-folder-close { &:before { content: \"\\e117\"; } }\n.glyphicon-folder-open { &:before { content: \"\\e118\"; } }\n.glyphicon-resize-vertical { &:before { content: \"\\e119\"; } }\n.glyphicon-resize-horizontal { &:before { content: \"\\e120\"; } }\n.glyphicon-hdd { &:before { content: \"\\e121\"; } }\n.glyphicon-bullhorn { &:before { content: \"\\e122\"; } }\n.glyphicon-bell { &:before { content: \"\\e123\"; } }\n.glyphicon-certificate { &:before { content: \"\\e124\"; } }\n.glyphicon-thumbs-up { &:before { content: \"\\e125\"; } }\n.glyphicon-thumbs-down { &:before { content: \"\\e126\"; } }\n.glyphicon-hand-right { &:before { content: \"\\e127\"; } }\n.glyphicon-hand-left { &:before { content: \"\\e128\"; } }\n.glyphicon-hand-up { &:before { content: \"\\e129\"; } }\n.glyphicon-hand-down { &:before { content: \"\\e130\"; } }\n.glyphicon-circle-arrow-right { &:before { content: \"\\e131\"; } }\n.glyphicon-circle-arrow-left { &:before { content: \"\\e132\"; } }\n.glyphicon-circle-arrow-up { &:before { content: \"\\e133\"; } }\n.glyphicon-circle-arrow-down { &:before { content: \"\\e134\"; } }\n.glyphicon-globe { &:before { content: \"\\e135\"; } }\n.glyphicon-wrench { &:before { content: \"\\e136\"; } }\n.glyphicon-tasks { &:before { content: \"\\e137\"; } }\n.glyphicon-filter { &:before { content: \"\\e138\"; } }\n.glyphicon-briefcase { &:before { content: \"\\e139\"; } }\n.glyphicon-fullscreen { &:before { content: \"\\e140\"; } }\n.glyphicon-dashboard { &:before { content: \"\\e141\"; } }\n.glyphicon-paperclip { &:before { content: \"\\e142\"; } }\n.glyphicon-heart-empty { &:before { content: \"\\e143\"; } }\n.glyphicon-link { &:before { content: \"\\e144\"; } }\n.glyphicon-phone { &:before { content: \"\\e145\"; } }\n.glyphicon-pushpin { &:before { content: \"\\e146\"; } }\n.glyphicon-usd { &:before { content: \"\\e148\"; } }\n.glyphicon-gbp { &:before { content: \"\\e149\"; } }\n.glyphicon-sort { &:before { content: \"\\e150\"; } }\n.glyphicon-sort-by-alphabet { &:before { content: \"\\e151\"; } }\n.glyphicon-sort-by-alphabet-alt { &:before { content: \"\\e152\"; } }\n.glyphicon-sort-by-order { &:before { content: \"\\e153\"; } }\n.glyphicon-sort-by-order-alt { &:before { content: \"\\e154\"; } }\n.glyphicon-sort-by-attributes { &:before { content: \"\\e155\"; } }\n.glyphicon-sort-by-attributes-alt { &:before { content: \"\\e156\"; } }\n.glyphicon-unchecked { &:before { content: \"\\e157\"; } }\n.glyphicon-expand { &:before { content: \"\\e158\"; } }\n.glyphicon-collapse-down { &:before { content: \"\\e159\"; } }\n.glyphicon-collapse-up { &:before { content: \"\\e160\"; } }\n.glyphicon-log-in { &:before { content: \"\\e161\"; } }\n.glyphicon-flash { &:before { content: \"\\e162\"; } }\n.glyphicon-log-out { &:before { content: \"\\e163\"; } }\n.glyphicon-new-window { &:before { content: \"\\e164\"; } }\n.glyphicon-record { &:before { content: \"\\e165\"; } }\n.glyphicon-save { &:before { content: \"\\e166\"; } }\n.glyphicon-open { &:before { content: \"\\e167\"; } }\n.glyphicon-saved { &:before { content: \"\\e168\"; } }\n.glyphicon-import { &:before { content: \"\\e169\"; } }\n.glyphicon-export { &:before { content: \"\\e170\"; } }\n.glyphicon-send { &:before { content: \"\\e171\"; } }\n.glyphicon-floppy-disk { &:before { content: \"\\e172\"; } }\n.glyphicon-floppy-saved { &:before { content: \"\\e173\"; } }\n.glyphicon-floppy-remove { &:before { content: \"\\e174\"; } }\n.glyphicon-floppy-save { &:before { content: \"\\e175\"; } }\n.glyphicon-floppy-open { &:before { content: \"\\e176\"; } }\n.glyphicon-credit-card { &:before { content: \"\\e177\"; } }\n.glyphicon-transfer { &:before { content: \"\\e178\"; } }\n.glyphicon-cutlery { &:before { content: \"\\e179\"; } }\n.glyphicon-header { &:before { content: \"\\e180\"; } }\n.glyphicon-compressed { &:before { content: \"\\e181\"; } }\n.glyphicon-earphone { &:before { content: \"\\e182\"; } }\n.glyphicon-phone-alt { &:before { content: \"\\e183\"; } }\n.glyphicon-tower { &:before { content: \"\\e184\"; } }\n.glyphicon-stats { &:before { content: \"\\e185\"; } }\n.glyphicon-sd-video { &:before { content: \"\\e186\"; } }\n.glyphicon-hd-video { &:before { content: \"\\e187\"; } }\n.glyphicon-subtitles { &:before { content: \"\\e188\"; } }\n.glyphicon-sound-stereo { &:before { content: \"\\e189\"; } }\n.glyphicon-sound-dolby { &:before { content: \"\\e190\"; } }\n.glyphicon-sound-5-1 { &:before { content: \"\\e191\"; } }\n.glyphicon-sound-6-1 { &:before { content: \"\\e192\"; } }\n.glyphicon-sound-7-1 { &:before { content: \"\\e193\"; } }\n.glyphicon-copyright-mark { &:before { content: \"\\e194\"; } }\n.glyphicon-registration-mark { &:before { content: \"\\e195\"; } }\n.glyphicon-cloud-download { &:before { content: \"\\e197\"; } }\n.glyphicon-cloud-upload { &:before { content: \"\\e198\"; } }\n.glyphicon-tree-conifer { &:before { content: \"\\e199\"; } }\n.glyphicon-tree-deciduous { &:before { content: \"\\e200\"; } }\n.glyphicon-cd { &:before { content: \"\\e201\"; } }\n.glyphicon-save-file { &:before { content: \"\\e202\"; } }\n.glyphicon-open-file { &:before { content: \"\\e203\"; } }\n.glyphicon-level-up { &:before { content: \"\\e204\"; } }\n.glyphicon-copy { &:before { content: \"\\e205\"; } }\n.glyphicon-paste { &:before { content: \"\\e206\"; } }\n// The following 2 Glyphicons are omitted for the time being because\n// they currently use Unicode codepoints that are outside the\n// Basic Multilingual Plane (BMP). Older buggy versions of WebKit can't handle\n// non-BMP codepoints in CSS string escapes, and thus can't display these two icons.\n// Notably, the bug affects some older versions of the Android Browser.\n// More info: https://github.com/twbs/bootstrap/issues/10106\n// .glyphicon-door { &:before { content: \"\\1f6aa\"; } }\n// .glyphicon-key { &:before { content: \"\\1f511\"; } }\n.glyphicon-alert { &:before { content: \"\\e209\"; } }\n.glyphicon-equalizer { &:before { content: \"\\e210\"; } }\n.glyphicon-king { &:before { content: \"\\e211\"; } }\n.glyphicon-queen { &:before { content: \"\\e212\"; } }\n.glyphicon-pawn { &:before { content: \"\\e213\"; } }\n.glyphicon-bishop { &:before { content: \"\\e214\"; } }\n.glyphicon-knight { &:before { content: \"\\e215\"; } }\n.glyphicon-baby-formula { &:before { content: \"\\e216\"; } }\n.glyphicon-tent { &:before { content: \"\\26fa\"; } }\n.glyphicon-blackboard { &:before { content: \"\\e218\"; } }\n.glyphicon-bed { &:before { content: \"\\e219\"; } }\n.glyphicon-apple { &:before { content: \"\\f8ff\"; } }\n.glyphicon-erase { &:before { content: \"\\e221\"; } }\n.glyphicon-hourglass { &:before { content: \"\\231b\"; } }\n.glyphicon-lamp { &:before { content: \"\\e223\"; } }\n.glyphicon-duplicate { &:before { content: \"\\e224\"; } }\n.glyphicon-piggy-bank { &:before { content: \"\\e225\"; } }\n.glyphicon-scissors { &:before { content: \"\\e226\"; } }\n.glyphicon-bitcoin { &:before { content: \"\\e227\"; } }\n.glyphicon-btc { &:before { content: \"\\e227\"; } }\n.glyphicon-xbt { &:before { content: \"\\e227\"; } }\n.glyphicon-yen { &:before { content: \"\\00a5\"; } }\n.glyphicon-jpy { &:before { content: \"\\00a5\"; } }\n.glyphicon-ruble { &:before { content: \"\\20bd\"; } }\n.glyphicon-rub { &:before { content: \"\\20bd\"; } }\n.glyphicon-scale { &:before { content: \"\\e230\"; } }\n.glyphicon-ice-lolly { &:before { content: \"\\e231\"; } }\n.glyphicon-ice-lolly-tasted { &:before { content: \"\\e232\"; } }\n.glyphicon-education { &:before { content: \"\\e233\"; } }\n.glyphicon-option-horizontal { &:before { content: \"\\e234\"; } }\n.glyphicon-option-vertical { &:before { content: \"\\e235\"; } }\n.glyphicon-menu-hamburger { &:before { content: \"\\e236\"; } }\n.glyphicon-modal-window { &:before { content: \"\\e237\"; } }\n.glyphicon-oil { &:before { content: \"\\e238\"; } }\n.glyphicon-grain { &:before { content: \"\\e239\"; } }\n.glyphicon-sunglasses { &:before { content: \"\\e240\"; } }\n.glyphicon-text-size { &:before { content: \"\\e241\"; } }\n.glyphicon-text-color { &:before { content: \"\\e242\"; } }\n.glyphicon-text-background { &:before { content: \"\\e243\"; } }\n.glyphicon-object-align-top { &:before { content: \"\\e244\"; } }\n.glyphicon-object-align-bottom { &:before { content: \"\\e245\"; } }\n.glyphicon-object-align-horizontal{ &:before { content: \"\\e246\"; } }\n.glyphicon-object-align-left { &:before { content: \"\\e247\"; } }\n.glyphicon-object-align-vertical { &:before { content: \"\\e248\"; } }\n.glyphicon-object-align-right { &:before { content: \"\\e249\"; } }\n.glyphicon-triangle-right { &:before { content: \"\\e250\"; } }\n.glyphicon-triangle-left { &:before { content: \"\\e251\"; } }\n.glyphicon-triangle-bottom { &:before { content: \"\\e252\"; } }\n.glyphicon-triangle-top { &:before { content: \"\\e253\"; } }\n.glyphicon-console { &:before { content: \"\\e254\"; } }\n.glyphicon-superscript { &:before { content: \"\\e255\"; } }\n.glyphicon-subscript { &:before { content: \"\\e256\"; } }\n.glyphicon-menu-left { &:before { content: \"\\e257\"; } }\n.glyphicon-menu-right { &:before { content: \"\\e258\"; } }\n.glyphicon-menu-down { &:before { content: \"\\e259\"; } }\n.glyphicon-menu-up { &:before { content: \"\\e260\"; } }\n","//\n// Scaffolding\n// --------------------------------------------------\n\n\n// Reset the box-sizing\n//\n// Heads up! This reset may cause conflicts with some third-party widgets.\n// For recommendations on resolving such conflicts, see\n// http://getbootstrap.com/getting-started/#third-box-sizing\n* {\n .box-sizing(border-box);\n}\n*:before,\n*:after {\n .box-sizing(border-box);\n}\n\n\n// Body reset\n\nhtml {\n font-size: 10px;\n -webkit-tap-highlight-color: rgba(0,0,0,0);\n}\n\nbody {\n font-family: @font-family-base;\n font-size: @font-size-base;\n line-height: @line-height-base;\n color: @text-color;\n background-color: @body-bg;\n}\n\n// Reset fonts for relevant elements\ninput,\nbutton,\nselect,\ntextarea {\n font-family: inherit;\n font-size: inherit;\n line-height: inherit;\n}\n\n\n// Links\n\na {\n color: @link-color;\n text-decoration: none;\n\n &:hover,\n &:focus {\n color: @link-hover-color;\n text-decoration: @link-hover-decoration;\n }\n\n &:focus {\n .tab-focus();\n }\n}\n\n\n// Figures\n//\n// We reset this here because previously Normalize had no `figure` margins. This\n// ensures we don't break anyone's use of the element.\n\nfigure {\n margin: 0;\n}\n\n\n// Images\n\nimg {\n vertical-align: middle;\n}\n\n// Responsive images (ensure images don't scale beyond their parents)\n.img-responsive {\n .img-responsive();\n}\n\n// Rounded corners\n.img-rounded {\n border-radius: @border-radius-large;\n}\n\n// Image thumbnails\n//\n// Heads up! This is mixin-ed into thumbnails.less for `.thumbnail`.\n.img-thumbnail {\n padding: @thumbnail-padding;\n line-height: @line-height-base;\n background-color: @thumbnail-bg;\n border: 1px solid @thumbnail-border;\n border-radius: @thumbnail-border-radius;\n .transition(all .2s ease-in-out);\n\n // Keep them at most 100% wide\n .img-responsive(inline-block);\n}\n\n// Perfect circle\n.img-circle {\n border-radius: 50%; // set radius in percents\n}\n\n\n// Horizontal rules\n\nhr {\n margin-top: @line-height-computed;\n margin-bottom: @line-height-computed;\n border: 0;\n border-top: 1px solid @hr-border;\n}\n\n\n// Only display content to screen readers\n//\n// See: http://a11yproject.com/posts/how-to-hide-content\n\n.sr-only {\n position: absolute;\n width: 1px;\n height: 1px;\n margin: -1px;\n padding: 0;\n overflow: hidden;\n clip: rect(0,0,0,0);\n border: 0;\n}\n\n// Use in conjunction with .sr-only to only display content when it's focused.\n// Useful for \"Skip to main content\" links; see http://www.w3.org/TR/2013/NOTE-WCAG20-TECHS-20130905/G1\n// Credit: HTML5 Boilerplate\n\n.sr-only-focusable {\n &:active,\n &:focus {\n position: static;\n width: auto;\n height: auto;\n margin: 0;\n overflow: visible;\n clip: auto;\n }\n}\n\n\n// iOS \"clickable elements\" fix for role=\"button\"\n//\n// Fixes \"clickability\" issue (and more generally, the firing of events such as focus as well)\n// for traditionally non-focusable elements with role=\"button\"\n// see https://developer.mozilla.org/en-US/docs/Web/Events/click#Safari_Mobile\n\n[role=\"button\"] {\n cursor: pointer;\n}\n","// Vendor Prefixes\n//\n// All vendor mixins are deprecated as of v3.2.0 due to the introduction of\n// Autoprefixer in our Gruntfile. They have been removed in v4.\n\n// - Animations\n// - Backface visibility\n// - Box shadow\n// - Box sizing\n// - Content columns\n// - Hyphens\n// - Placeholder text\n// - Transformations\n// - Transitions\n// - User Select\n\n\n// Animations\n.animation(@animation) {\n -webkit-animation: @animation;\n -o-animation: @animation;\n animation: @animation;\n}\n.animation-name(@name) {\n -webkit-animation-name: @name;\n animation-name: @name;\n}\n.animation-duration(@duration) {\n -webkit-animation-duration: @duration;\n animation-duration: @duration;\n}\n.animation-timing-function(@timing-function) {\n -webkit-animation-timing-function: @timing-function;\n animation-timing-function: @timing-function;\n}\n.animation-delay(@delay) {\n -webkit-animation-delay: @delay;\n animation-delay: @delay;\n}\n.animation-iteration-count(@iteration-count) {\n -webkit-animation-iteration-count: @iteration-count;\n animation-iteration-count: @iteration-count;\n}\n.animation-direction(@direction) {\n -webkit-animation-direction: @direction;\n animation-direction: @direction;\n}\n.animation-fill-mode(@fill-mode) {\n -webkit-animation-fill-mode: @fill-mode;\n animation-fill-mode: @fill-mode;\n}\n\n// Backface visibility\n// Prevent browsers from flickering when using CSS 3D transforms.\n// Default value is `visible`, but can be changed to `hidden`\n\n.backface-visibility(@visibility) {\n -webkit-backface-visibility: @visibility;\n -moz-backface-visibility: @visibility;\n backface-visibility: @visibility;\n}\n\n// Drop shadows\n//\n// Note: Deprecated `.box-shadow()` as of v3.1.0 since all of Bootstrap's\n// supported browsers that have box shadow capabilities now support it.\n\n.box-shadow(@shadow) {\n -webkit-box-shadow: @shadow; // iOS <4.3 & Android <4.1\n box-shadow: @shadow;\n}\n\n// Box sizing\n.box-sizing(@boxmodel) {\n -webkit-box-sizing: @boxmodel;\n -moz-box-sizing: @boxmodel;\n box-sizing: @boxmodel;\n}\n\n// CSS3 Content Columns\n.content-columns(@column-count; @column-gap: @grid-gutter-width) {\n -webkit-column-count: @column-count;\n -moz-column-count: @column-count;\n column-count: @column-count;\n -webkit-column-gap: @column-gap;\n -moz-column-gap: @column-gap;\n column-gap: @column-gap;\n}\n\n// Optional hyphenation\n.hyphens(@mode: auto) {\n word-wrap: break-word;\n -webkit-hyphens: @mode;\n -moz-hyphens: @mode;\n -ms-hyphens: @mode; // IE10+\n -o-hyphens: @mode;\n hyphens: @mode;\n}\n\n// Placeholder text\n.placeholder(@color: @input-color-placeholder) {\n // Firefox\n &::-moz-placeholder {\n color: @color;\n opacity: 1; // Override Firefox's unusual default opacity; see https://github.com/twbs/bootstrap/pull/11526\n }\n &:-ms-input-placeholder { color: @color; } // Internet Explorer 10+\n &::-webkit-input-placeholder { color: @color; } // Safari and Chrome\n}\n\n// Transformations\n.scale(@ratio) {\n -webkit-transform: scale(@ratio);\n -ms-transform: scale(@ratio); // IE9 only\n -o-transform: scale(@ratio);\n transform: scale(@ratio);\n}\n.scale(@ratioX; @ratioY) {\n -webkit-transform: scale(@ratioX, @ratioY);\n -ms-transform: scale(@ratioX, @ratioY); // IE9 only\n -o-transform: scale(@ratioX, @ratioY);\n transform: scale(@ratioX, @ratioY);\n}\n.scaleX(@ratio) {\n -webkit-transform: scaleX(@ratio);\n -ms-transform: scaleX(@ratio); // IE9 only\n -o-transform: scaleX(@ratio);\n transform: scaleX(@ratio);\n}\n.scaleY(@ratio) {\n -webkit-transform: scaleY(@ratio);\n -ms-transform: scaleY(@ratio); // IE9 only\n -o-transform: scaleY(@ratio);\n transform: scaleY(@ratio);\n}\n.skew(@x; @y) {\n -webkit-transform: skewX(@x) skewY(@y);\n -ms-transform: skewX(@x) skewY(@y); // See https://github.com/twbs/bootstrap/issues/4885; IE9+\n -o-transform: skewX(@x) skewY(@y);\n transform: skewX(@x) skewY(@y);\n}\n.translate(@x; @y) {\n -webkit-transform: translate(@x, @y);\n -ms-transform: translate(@x, @y); // IE9 only\n -o-transform: translate(@x, @y);\n transform: translate(@x, @y);\n}\n.translate3d(@x; @y; @z) {\n -webkit-transform: translate3d(@x, @y, @z);\n transform: translate3d(@x, @y, @z);\n}\n.rotate(@degrees) {\n -webkit-transform: rotate(@degrees);\n -ms-transform: rotate(@degrees); // IE9 only\n -o-transform: rotate(@degrees);\n transform: rotate(@degrees);\n}\n.rotateX(@degrees) {\n -webkit-transform: rotateX(@degrees);\n -ms-transform: rotateX(@degrees); // IE9 only\n -o-transform: rotateX(@degrees);\n transform: rotateX(@degrees);\n}\n.rotateY(@degrees) {\n -webkit-transform: rotateY(@degrees);\n -ms-transform: rotateY(@degrees); // IE9 only\n -o-transform: rotateY(@degrees);\n transform: rotateY(@degrees);\n}\n.perspective(@perspective) {\n -webkit-perspective: @perspective;\n -moz-perspective: @perspective;\n perspective: @perspective;\n}\n.perspective-origin(@perspective) {\n -webkit-perspective-origin: @perspective;\n -moz-perspective-origin: @perspective;\n perspective-origin: @perspective;\n}\n.transform-origin(@origin) {\n -webkit-transform-origin: @origin;\n -moz-transform-origin: @origin;\n -ms-transform-origin: @origin; // IE9 only\n transform-origin: @origin;\n}\n\n\n// Transitions\n\n.transition(@transition) {\n -webkit-transition: @transition;\n -o-transition: @transition;\n transition: @transition;\n}\n.transition-property(@transition-property) {\n -webkit-transition-property: @transition-property;\n transition-property: @transition-property;\n}\n.transition-delay(@transition-delay) {\n -webkit-transition-delay: @transition-delay;\n transition-delay: @transition-delay;\n}\n.transition-duration(@transition-duration) {\n -webkit-transition-duration: @transition-duration;\n transition-duration: @transition-duration;\n}\n.transition-timing-function(@timing-function) {\n -webkit-transition-timing-function: @timing-function;\n transition-timing-function: @timing-function;\n}\n.transition-transform(@transition) {\n -webkit-transition: -webkit-transform @transition;\n -moz-transition: -moz-transform @transition;\n -o-transition: -o-transform @transition;\n transition: transform @transition;\n}\n\n\n// User select\n// For selecting text on the page\n\n.user-select(@select) {\n -webkit-user-select: @select;\n -moz-user-select: @select;\n -ms-user-select: @select; // IE10+\n user-select: @select;\n}\n","// WebKit-style focus\n\n.tab-focus() {\n // WebKit-specific. Other browsers will keep their default outline style.\n // (Initially tried to also force default via `outline: initial`,\n // but that seems to erroneously remove the outline in Firefox altogether.)\n outline: 5px auto -webkit-focus-ring-color;\n outline-offset: -2px;\n}\n","// Image Mixins\n// - Responsive image\n// - Retina image\n\n\n// Responsive image\n//\n// Keep images from scaling beyond the width of their parents.\n.img-responsive(@display: block) {\n display: @display;\n max-width: 100%; // Part 1: Set a maximum relative to the parent\n height: auto; // Part 2: Scale the height according to the width, otherwise you get stretching\n}\n\n\n// Retina image\n//\n// Short retina mixin for setting background-image and -size. Note that the\n// spelling of `min--moz-device-pixel-ratio` is intentional.\n.img-retina(@file-1x; @file-2x; @width-1x; @height-1x) {\n background-image: url(\"@{file-1x}\");\n\n @media\n only screen and (-webkit-min-device-pixel-ratio: 2),\n only screen and ( min--moz-device-pixel-ratio: 2),\n only screen and ( -o-min-device-pixel-ratio: 2/1),\n only screen and ( min-device-pixel-ratio: 2),\n only screen and ( min-resolution: 192dpi),\n only screen and ( min-resolution: 2dppx) {\n background-image: url(\"@{file-2x}\");\n background-size: @width-1x @height-1x;\n }\n}\n","//\n// Typography\n// --------------------------------------------------\n\n\n// Headings\n// -------------------------\n\nh1, h2, h3, h4, h5, h6,\n.h1, .h2, .h3, .h4, .h5, .h6 {\n font-family: @headings-font-family;\n font-weight: @headings-font-weight;\n line-height: @headings-line-height;\n color: @headings-color;\n\n small,\n .small {\n font-weight: normal;\n line-height: 1;\n color: @headings-small-color;\n }\n}\n\nh1, .h1,\nh2, .h2,\nh3, .h3 {\n margin-top: @line-height-computed;\n margin-bottom: (@line-height-computed / 2);\n\n small,\n .small {\n font-size: 65%;\n }\n}\nh4, .h4,\nh5, .h5,\nh6, .h6 {\n margin-top: (@line-height-computed / 2);\n margin-bottom: (@line-height-computed / 2);\n\n small,\n .small {\n font-size: 75%;\n }\n}\n\nh1, .h1 { font-size: @font-size-h1; }\nh2, .h2 { font-size: @font-size-h2; }\nh3, .h3 { font-size: @font-size-h3; }\nh4, .h4 { font-size: @font-size-h4; }\nh5, .h5 { font-size: @font-size-h5; }\nh6, .h6 { font-size: @font-size-h6; }\n\n\n// Body text\n// -------------------------\n\np {\n margin: 0 0 (@line-height-computed / 2);\n}\n\n.lead {\n margin-bottom: @line-height-computed;\n font-size: floor((@font-size-base * 1.15));\n font-weight: 300;\n line-height: 1.4;\n\n @media (min-width: @screen-sm-min) {\n font-size: (@font-size-base * 1.5);\n }\n}\n\n\n// Emphasis & misc\n// -------------------------\n\n// Ex: (12px small font / 14px base font) * 100% = about 85%\nsmall,\n.small {\n font-size: floor((100% * @font-size-small / @font-size-base));\n}\n\nmark,\n.mark {\n background-color: @state-warning-bg;\n padding: .2em;\n}\n\n// Alignment\n.text-left { text-align: left; }\n.text-right { text-align: right; }\n.text-center { text-align: center; }\n.text-justify { text-align: justify; }\n.text-nowrap { white-space: nowrap; }\n\n// Transformation\n.text-lowercase { text-transform: lowercase; }\n.text-uppercase { text-transform: uppercase; }\n.text-capitalize { text-transform: capitalize; }\n\n// Contextual colors\n.text-muted {\n color: @text-muted;\n}\n.text-primary {\n .text-emphasis-variant(@brand-primary);\n}\n.text-success {\n .text-emphasis-variant(@state-success-text);\n}\n.text-info {\n .text-emphasis-variant(@state-info-text);\n}\n.text-warning {\n .text-emphasis-variant(@state-warning-text);\n}\n.text-danger {\n .text-emphasis-variant(@state-danger-text);\n}\n\n// Contextual backgrounds\n// For now we'll leave these alongside the text classes until v4 when we can\n// safely shift things around (per SemVer rules).\n.bg-primary {\n // Given the contrast here, this is the only class to have its color inverted\n // automatically.\n color: #fff;\n .bg-variant(@brand-primary);\n}\n.bg-success {\n .bg-variant(@state-success-bg);\n}\n.bg-info {\n .bg-variant(@state-info-bg);\n}\n.bg-warning {\n .bg-variant(@state-warning-bg);\n}\n.bg-danger {\n .bg-variant(@state-danger-bg);\n}\n\n\n// Page header\n// -------------------------\n\n.page-header {\n padding-bottom: ((@line-height-computed / 2) - 1);\n margin: (@line-height-computed * 2) 0 @line-height-computed;\n border-bottom: 1px solid @page-header-border-color;\n}\n\n\n// Lists\n// -------------------------\n\n// Unordered and Ordered lists\nul,\nol {\n margin-top: 0;\n margin-bottom: (@line-height-computed / 2);\n ul,\n ol {\n margin-bottom: 0;\n }\n}\n\n// List options\n\n// Unstyled keeps list items block level, just removes default browser padding and list-style\n.list-unstyled {\n padding-left: 0;\n list-style: none;\n}\n\n// Inline turns list items into inline-block\n.list-inline {\n .list-unstyled();\n margin-left: -5px;\n\n > li {\n display: inline-block;\n padding-left: 5px;\n padding-right: 5px;\n }\n}\n\n// Description Lists\ndl {\n margin-top: 0; // Remove browser default\n margin-bottom: @line-height-computed;\n}\ndt,\ndd {\n line-height: @line-height-base;\n}\ndt {\n font-weight: bold;\n}\ndd {\n margin-left: 0; // Undo browser default\n}\n\n// Horizontal description lists\n//\n// Defaults to being stacked without any of the below styles applied, until the\n// grid breakpoint is reached (default of ~768px).\n\n.dl-horizontal {\n dd {\n &:extend(.clearfix all); // Clear the floated `dt` if an empty `dd` is present\n }\n\n @media (min-width: @dl-horizontal-breakpoint) {\n dt {\n float: left;\n width: (@dl-horizontal-offset - 20);\n clear: left;\n text-align: right;\n .text-overflow();\n }\n dd {\n margin-left: @dl-horizontal-offset;\n }\n }\n}\n\n\n// Misc\n// -------------------------\n\n// Abbreviations and acronyms\nabbr[title],\n// Add data-* attribute to help out our tooltip plugin, per https://github.com/twbs/bootstrap/issues/5257\nabbr[data-original-title] {\n cursor: help;\n border-bottom: 1px dotted @abbr-border-color;\n}\n.initialism {\n font-size: 90%;\n .text-uppercase();\n}\n\n// Blockquotes\nblockquote {\n padding: (@line-height-computed / 2) @line-height-computed;\n margin: 0 0 @line-height-computed;\n font-size: @blockquote-font-size;\n border-left: 5px solid @blockquote-border-color;\n\n p,\n ul,\n ol {\n &:last-child {\n margin-bottom: 0;\n }\n }\n\n // Note: Deprecated small and .small as of v3.1.0\n // Context: https://github.com/twbs/bootstrap/issues/11660\n footer,\n small,\n .small {\n display: block;\n font-size: 80%; // back to default font-size\n line-height: @line-height-base;\n color: @blockquote-small-color;\n\n &:before {\n content: '\\2014 \\00A0'; // em dash, nbsp\n }\n }\n}\n\n// Opposite alignment of blockquote\n//\n// Heads up: `blockquote.pull-right` has been deprecated as of v3.1.0.\n.blockquote-reverse,\nblockquote.pull-right {\n padding-right: 15px;\n padding-left: 0;\n border-right: 5px solid @blockquote-border-color;\n border-left: 0;\n text-align: right;\n\n // Account for citation\n footer,\n small,\n .small {\n &:before { content: ''; }\n &:after {\n content: '\\00A0 \\2014'; // nbsp, em dash\n }\n }\n}\n\n// Addresses\naddress {\n margin-bottom: @line-height-computed;\n font-style: normal;\n line-height: @line-height-base;\n}\n","// Typography\n\n.text-emphasis-variant(@color) {\n color: @color;\n a&:hover,\n a&:focus {\n color: darken(@color, 10%);\n }\n}\n","// Contextual backgrounds\n\n.bg-variant(@color) {\n background-color: @color;\n a&:hover,\n a&:focus {\n background-color: darken(@color, 10%);\n }\n}\n","// Text overflow\n// Requires inline-block or block for proper styling\n\n.text-overflow() {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n","//\n// Code (inline and block)\n// --------------------------------------------------\n\n\n// Inline and block code styles\ncode,\nkbd,\npre,\nsamp {\n font-family: @font-family-monospace;\n}\n\n// Inline code\ncode {\n padding: 2px 4px;\n font-size: 90%;\n color: @code-color;\n background-color: @code-bg;\n border-radius: @border-radius-base;\n}\n\n// User input typically entered via keyboard\nkbd {\n padding: 2px 4px;\n font-size: 90%;\n color: @kbd-color;\n background-color: @kbd-bg;\n border-radius: @border-radius-small;\n box-shadow: inset 0 -1px 0 rgba(0,0,0,.25);\n\n kbd {\n padding: 0;\n font-size: 100%;\n font-weight: bold;\n box-shadow: none;\n }\n}\n\n// Blocks of code\npre {\n display: block;\n padding: ((@line-height-computed - 1) / 2);\n margin: 0 0 (@line-height-computed / 2);\n font-size: (@font-size-base - 1); // 14px to 13px\n line-height: @line-height-base;\n word-break: break-all;\n word-wrap: break-word;\n color: @pre-color;\n background-color: @pre-bg;\n border: 1px solid @pre-border-color;\n border-radius: @border-radius-base;\n\n // Account for some code outputs that place code tags in pre tags\n code {\n padding: 0;\n font-size: inherit;\n color: inherit;\n white-space: pre-wrap;\n background-color: transparent;\n border-radius: 0;\n }\n}\n\n// Enable scrollable blocks of code\n.pre-scrollable {\n max-height: @pre-scrollable-max-height;\n overflow-y: scroll;\n}\n","//\n// Grid system\n// --------------------------------------------------\n\n\n// Container widths\n//\n// Set the container width, and override it for fixed navbars in media queries.\n\n.container {\n .container-fixed();\n\n @media (min-width: @screen-sm-min) {\n width: @container-sm;\n }\n @media (min-width: @screen-md-min) {\n width: @container-md;\n }\n @media (min-width: @screen-lg-min) {\n width: @container-lg;\n }\n}\n\n\n// Fluid container\n//\n// Utilizes the mixin meant for fixed width containers, but without any defined\n// width for fluid, full width layouts.\n\n.container-fluid {\n .container-fixed();\n}\n\n\n// Row\n//\n// Rows contain and clear the floats of your columns.\n\n.row {\n .make-row();\n}\n\n\n// Columns\n//\n// Common styles for small and large grid columns\n\n.make-grid-columns();\n\n\n// Extra small grid\n//\n// Columns, offsets, pushes, and pulls for extra small devices like\n// smartphones.\n\n.make-grid(xs);\n\n\n// Small grid\n//\n// Columns, offsets, pushes, and pulls for the small device range, from phones\n// to tablets.\n\n@media (min-width: @screen-sm-min) {\n .make-grid(sm);\n}\n\n\n// Medium grid\n//\n// Columns, offsets, pushes, and pulls for the desktop device range.\n\n@media (min-width: @screen-md-min) {\n .make-grid(md);\n}\n\n\n// Large grid\n//\n// Columns, offsets, pushes, and pulls for the large desktop device range.\n\n@media (min-width: @screen-lg-min) {\n .make-grid(lg);\n}\n","// Grid system\n//\n// Generate semantic grid columns with these mixins.\n\n// Centered container element\n.container-fixed(@gutter: @grid-gutter-width) {\n margin-right: auto;\n margin-left: auto;\n padding-left: floor((@gutter / 2));\n padding-right: ceil((@gutter / 2));\n &:extend(.clearfix all);\n}\n\n// Creates a wrapper for a series of columns\n.make-row(@gutter: @grid-gutter-width) {\n margin-left: ceil((@gutter / -2));\n margin-right: floor((@gutter / -2));\n &:extend(.clearfix all);\n}\n\n// Generate the extra small columns\n.make-xs-column(@columns; @gutter: @grid-gutter-width) {\n position: relative;\n float: left;\n width: percentage((@columns / @grid-columns));\n min-height: 1px;\n padding-left: (@gutter / 2);\n padding-right: (@gutter / 2);\n}\n.make-xs-column-offset(@columns) {\n margin-left: percentage((@columns / @grid-columns));\n}\n.make-xs-column-push(@columns) {\n left: percentage((@columns / @grid-columns));\n}\n.make-xs-column-pull(@columns) {\n right: percentage((@columns / @grid-columns));\n}\n\n// Generate the small columns\n.make-sm-column(@columns; @gutter: @grid-gutter-width) {\n position: relative;\n min-height: 1px;\n padding-left: (@gutter / 2);\n padding-right: (@gutter / 2);\n\n @media (min-width: @screen-sm-min) {\n float: left;\n width: percentage((@columns / @grid-columns));\n }\n}\n.make-sm-column-offset(@columns) {\n @media (min-width: @screen-sm-min) {\n margin-left: percentage((@columns / @grid-columns));\n }\n}\n.make-sm-column-push(@columns) {\n @media (min-width: @screen-sm-min) {\n left: percentage((@columns / @grid-columns));\n }\n}\n.make-sm-column-pull(@columns) {\n @media (min-width: @screen-sm-min) {\n right: percentage((@columns / @grid-columns));\n }\n}\n\n// Generate the medium columns\n.make-md-column(@columns; @gutter: @grid-gutter-width) {\n position: relative;\n min-height: 1px;\n padding-left: (@gutter / 2);\n padding-right: (@gutter / 2);\n\n @media (min-width: @screen-md-min) {\n float: left;\n width: percentage((@columns / @grid-columns));\n }\n}\n.make-md-column-offset(@columns) {\n @media (min-width: @screen-md-min) {\n margin-left: percentage((@columns / @grid-columns));\n }\n}\n.make-md-column-push(@columns) {\n @media (min-width: @screen-md-min) {\n left: percentage((@columns / @grid-columns));\n }\n}\n.make-md-column-pull(@columns) {\n @media (min-width: @screen-md-min) {\n right: percentage((@columns / @grid-columns));\n }\n}\n\n// Generate the large columns\n.make-lg-column(@columns; @gutter: @grid-gutter-width) {\n position: relative;\n min-height: 1px;\n padding-left: (@gutter / 2);\n padding-right: (@gutter / 2);\n\n @media (min-width: @screen-lg-min) {\n float: left;\n width: percentage((@columns / @grid-columns));\n }\n}\n.make-lg-column-offset(@columns) {\n @media (min-width: @screen-lg-min) {\n margin-left: percentage((@columns / @grid-columns));\n }\n}\n.make-lg-column-push(@columns) {\n @media (min-width: @screen-lg-min) {\n left: percentage((@columns / @grid-columns));\n }\n}\n.make-lg-column-pull(@columns) {\n @media (min-width: @screen-lg-min) {\n right: percentage((@columns / @grid-columns));\n }\n}\n","// Framework grid generation\n//\n// Used only by Bootstrap to generate the correct number of grid classes given\n// any value of `@grid-columns`.\n\n.make-grid-columns() {\n // Common styles for all sizes of grid columns, widths 1-12\n .col(@index) { // initial\n @item: ~\".col-xs-@{index}, .col-sm-@{index}, .col-md-@{index}, .col-lg-@{index}\";\n .col((@index + 1), @item);\n }\n .col(@index, @list) when (@index =< @grid-columns) { // general; \"=<\" isn't a typo\n @item: ~\".col-xs-@{index}, .col-sm-@{index}, .col-md-@{index}, .col-lg-@{index}\";\n .col((@index + 1), ~\"@{list}, @{item}\");\n }\n .col(@index, @list) when (@index > @grid-columns) { // terminal\n @{list} {\n position: relative;\n // Prevent columns from collapsing when empty\n min-height: 1px;\n // Inner gutter via padding\n padding-left: ceil((@grid-gutter-width / 2));\n padding-right: floor((@grid-gutter-width / 2));\n }\n }\n .col(1); // kickstart it\n}\n\n.float-grid-columns(@class) {\n .col(@index) { // initial\n @item: ~\".col-@{class}-@{index}\";\n .col((@index + 1), @item);\n }\n .col(@index, @list) when (@index =< @grid-columns) { // general\n @item: ~\".col-@{class}-@{index}\";\n .col((@index + 1), ~\"@{list}, @{item}\");\n }\n .col(@index, @list) when (@index > @grid-columns) { // terminal\n @{list} {\n float: left;\n }\n }\n .col(1); // kickstart it\n}\n\n.calc-grid-column(@index, @class, @type) when (@type = width) and (@index > 0) {\n .col-@{class}-@{index} {\n width: percentage((@index / @grid-columns));\n }\n}\n.calc-grid-column(@index, @class, @type) when (@type = push) and (@index > 0) {\n .col-@{class}-push-@{index} {\n left: percentage((@index / @grid-columns));\n }\n}\n.calc-grid-column(@index, @class, @type) when (@type = push) and (@index = 0) {\n .col-@{class}-push-0 {\n left: auto;\n }\n}\n.calc-grid-column(@index, @class, @type) when (@type = pull) and (@index > 0) {\n .col-@{class}-pull-@{index} {\n right: percentage((@index / @grid-columns));\n }\n}\n.calc-grid-column(@index, @class, @type) when (@type = pull) and (@index = 0) {\n .col-@{class}-pull-0 {\n right: auto;\n }\n}\n.calc-grid-column(@index, @class, @type) when (@type = offset) {\n .col-@{class}-offset-@{index} {\n margin-left: percentage((@index / @grid-columns));\n }\n}\n\n// Basic looping in LESS\n.loop-grid-columns(@index, @class, @type) when (@index >= 0) {\n .calc-grid-column(@index, @class, @type);\n // next iteration\n .loop-grid-columns((@index - 1), @class, @type);\n}\n\n// Create grid for specific class\n.make-grid(@class) {\n .float-grid-columns(@class);\n .loop-grid-columns(@grid-columns, @class, width);\n .loop-grid-columns(@grid-columns, @class, pull);\n .loop-grid-columns(@grid-columns, @class, push);\n .loop-grid-columns(@grid-columns, @class, offset);\n}\n","//\n// Tables\n// --------------------------------------------------\n\n\ntable {\n background-color: @table-bg;\n}\ncaption {\n padding-top: @table-cell-padding;\n padding-bottom: @table-cell-padding;\n color: @text-muted;\n text-align: left;\n}\nth {\n text-align: left;\n}\n\n\n// Baseline styles\n\n.table {\n width: 100%;\n max-width: 100%;\n margin-bottom: @line-height-computed;\n // Cells\n > thead,\n > tbody,\n > tfoot {\n > tr {\n > th,\n > td {\n padding: @table-cell-padding;\n line-height: @line-height-base;\n vertical-align: top;\n border-top: 1px solid @table-border-color;\n }\n }\n }\n // Bottom align for column headings\n > thead > tr > th {\n vertical-align: bottom;\n border-bottom: 2px solid @table-border-color;\n }\n // Remove top border from thead by default\n > caption + thead,\n > colgroup + thead,\n > thead:first-child {\n > tr:first-child {\n > th,\n > td {\n border-top: 0;\n }\n }\n }\n // Account for multiple tbody instances\n > tbody + tbody {\n border-top: 2px solid @table-border-color;\n }\n\n // Nesting\n .table {\n background-color: @body-bg;\n }\n}\n\n\n// Condensed table w/ half padding\n\n.table-condensed {\n > thead,\n > tbody,\n > tfoot {\n > tr {\n > th,\n > td {\n padding: @table-condensed-cell-padding;\n }\n }\n }\n}\n\n\n// Bordered version\n//\n// Add borders all around the table and between all the columns.\n\n.table-bordered {\n border: 1px solid @table-border-color;\n > thead,\n > tbody,\n > tfoot {\n > tr {\n > th,\n > td {\n border: 1px solid @table-border-color;\n }\n }\n }\n > thead > tr {\n > th,\n > td {\n border-bottom-width: 2px;\n }\n }\n}\n\n\n// Zebra-striping\n//\n// Default zebra-stripe styles (alternating gray and transparent backgrounds)\n\n.table-striped {\n > tbody > tr:nth-of-type(odd) {\n background-color: @table-bg-accent;\n }\n}\n\n\n// Hover effect\n//\n// Placed here since it has to come after the potential zebra striping\n\n.table-hover {\n > tbody > tr:hover {\n background-color: @table-bg-hover;\n }\n}\n\n\n// Table cell sizing\n//\n// Reset default table behavior\n\ntable col[class*=\"col-\"] {\n position: static; // Prevent border hiding in Firefox and IE9-11 (see https://github.com/twbs/bootstrap/issues/11623)\n float: none;\n display: table-column;\n}\ntable {\n td,\n th {\n &[class*=\"col-\"] {\n position: static; // Prevent border hiding in Firefox and IE9-11 (see https://github.com/twbs/bootstrap/issues/11623)\n float: none;\n display: table-cell;\n }\n }\n}\n\n\n// Table backgrounds\n//\n// Exact selectors below required to override `.table-striped` and prevent\n// inheritance to nested tables.\n\n// Generate the contextual variants\n.table-row-variant(active; @table-bg-active);\n.table-row-variant(success; @state-success-bg);\n.table-row-variant(info; @state-info-bg);\n.table-row-variant(warning; @state-warning-bg);\n.table-row-variant(danger; @state-danger-bg);\n\n\n// Responsive tables\n//\n// Wrap your tables in `.table-responsive` and we'll make them mobile friendly\n// by enabling horizontal scrolling. Only applies <768px. Everything above that\n// will display normally.\n\n.table-responsive {\n overflow-x: auto;\n min-height: 0.01%; // Workaround for IE9 bug (see https://github.com/twbs/bootstrap/issues/14837)\n\n @media screen and (max-width: @screen-xs-max) {\n width: 100%;\n margin-bottom: (@line-height-computed * 0.75);\n overflow-y: hidden;\n -ms-overflow-style: -ms-autohiding-scrollbar;\n border: 1px solid @table-border-color;\n\n // Tighten up spacing\n > .table {\n margin-bottom: 0;\n\n // Ensure the content doesn't wrap\n > thead,\n > tbody,\n > tfoot {\n > tr {\n > th,\n > td {\n white-space: nowrap;\n }\n }\n }\n }\n\n // Special overrides for the bordered tables\n > .table-bordered {\n border: 0;\n\n // Nuke the appropriate borders so that the parent can handle them\n > thead,\n > tbody,\n > tfoot {\n > tr {\n > th:first-child,\n > td:first-child {\n border-left: 0;\n }\n > th:last-child,\n > td:last-child {\n border-right: 0;\n }\n }\n }\n\n // Only nuke the last row's bottom-border in `tbody` and `tfoot` since\n // chances are there will be only one `tr` in a `thead` and that would\n // remove the border altogether.\n > tbody,\n > tfoot {\n > tr:last-child {\n > th,\n > td {\n border-bottom: 0;\n }\n }\n }\n\n }\n }\n}\n","// Tables\n\n.table-row-variant(@state; @background) {\n // Exact selectors below required to override `.table-striped` and prevent\n // inheritance to nested tables.\n .table > thead > tr,\n .table > tbody > tr,\n .table > tfoot > tr {\n > td.@{state},\n > th.@{state},\n &.@{state} > td,\n &.@{state} > th {\n background-color: @background;\n }\n }\n\n // Hover states for `.table-hover`\n // Note: this is not available for cells or rows within `thead` or `tfoot`.\n .table-hover > tbody > tr {\n > td.@{state}:hover,\n > th.@{state}:hover,\n &.@{state}:hover > td,\n &:hover > .@{state},\n &.@{state}:hover > th {\n background-color: darken(@background, 5%);\n }\n }\n}\n","//\n// Forms\n// --------------------------------------------------\n\n\n// Normalize non-controls\n//\n// Restyle and baseline non-control form elements.\n\nfieldset {\n padding: 0;\n margin: 0;\n border: 0;\n // Chrome and Firefox set a `min-width: min-content;` on fieldsets,\n // so we reset that to ensure it behaves more like a standard block element.\n // See https://github.com/twbs/bootstrap/issues/12359.\n min-width: 0;\n}\n\nlegend {\n display: block;\n width: 100%;\n padding: 0;\n margin-bottom: @line-height-computed;\n font-size: (@font-size-base * 1.5);\n line-height: inherit;\n color: @legend-color;\n border: 0;\n border-bottom: 1px solid @legend-border-color;\n}\n\nlabel {\n display: inline-block;\n max-width: 100%; // Force IE8 to wrap long content (see https://github.com/twbs/bootstrap/issues/13141)\n margin-bottom: 5px;\n font-weight: bold;\n}\n\n\n// Normalize form controls\n//\n// While most of our form styles require extra classes, some basic normalization\n// is required to ensure optimum display with or without those classes to better\n// address browser inconsistencies.\n\n// Override content-box in Normalize (* isn't specific enough)\ninput[type=\"search\"] {\n .box-sizing(border-box);\n}\n\n// Position radios and checkboxes better\ninput[type=\"radio\"],\ninput[type=\"checkbox\"] {\n margin: 4px 0 0;\n margin-top: 1px \\9; // IE8-9\n line-height: normal;\n}\n\ninput[type=\"file\"] {\n display: block;\n}\n\n// Make range inputs behave like textual form controls\ninput[type=\"range\"] {\n display: block;\n width: 100%;\n}\n\n// Make multiple select elements height not fixed\nselect[multiple],\nselect[size] {\n height: auto;\n}\n\n// Focus for file, radio, and checkbox\ninput[type=\"file\"]:focus,\ninput[type=\"radio\"]:focus,\ninput[type=\"checkbox\"]:focus {\n .tab-focus();\n}\n\n// Adjust output element\noutput {\n display: block;\n padding-top: (@padding-base-vertical + 1);\n font-size: @font-size-base;\n line-height: @line-height-base;\n color: @input-color;\n}\n\n\n// Common form controls\n//\n// Shared size and type resets for form controls. Apply `.form-control` to any\n// of the following form controls:\n//\n// select\n// textarea\n// input[type=\"text\"]\n// input[type=\"password\"]\n// input[type=\"datetime\"]\n// input[type=\"datetime-local\"]\n// input[type=\"date\"]\n// input[type=\"month\"]\n// input[type=\"time\"]\n// input[type=\"week\"]\n// input[type=\"number\"]\n// input[type=\"email\"]\n// input[type=\"url\"]\n// input[type=\"search\"]\n// input[type=\"tel\"]\n// input[type=\"color\"]\n\n.form-control {\n display: block;\n width: 100%;\n height: @input-height-base; // Make inputs at least the height of their button counterpart (base line-height + padding + border)\n padding: @padding-base-vertical @padding-base-horizontal;\n font-size: @font-size-base;\n line-height: @line-height-base;\n color: @input-color;\n background-color: @input-bg;\n background-image: none; // Reset unusual Firefox-on-Android default style; see https://github.com/necolas/normalize.css/issues/214\n border: 1px solid @input-border;\n border-radius: @input-border-radius; // Note: This has no effect on s in CSS.\n .box-shadow(inset 0 1px 1px rgba(0,0,0,.075));\n .transition(~\"border-color ease-in-out .15s, box-shadow ease-in-out .15s\");\n\n // Customize the `:focus` state to imitate native WebKit styles.\n .form-control-focus();\n\n // Placeholder\n .placeholder();\n\n // Unstyle the caret on ``\n// element gets special love because it's special, and that's a fact!\n.input-size(@input-height; @padding-vertical; @padding-horizontal; @font-size; @line-height; @border-radius) {\n height: @input-height;\n padding: @padding-vertical @padding-horizontal;\n font-size: @font-size;\n line-height: @line-height;\n border-radius: @border-radius;\n\n select& {\n height: @input-height;\n line-height: @input-height;\n }\n\n textarea&,\n select[multiple]& {\n height: auto;\n }\n}\n","//\n// Buttons\n// --------------------------------------------------\n\n\n// Base styles\n// --------------------------------------------------\n\n.btn {\n display: inline-block;\n margin-bottom: 0; // For input.btn\n font-weight: @btn-font-weight;\n text-align: center;\n vertical-align: middle;\n touch-action: manipulation;\n cursor: pointer;\n background-image: none; // Reset unusual Firefox-on-Android default style; see https://github.com/necolas/normalize.css/issues/214\n border: 1px solid transparent;\n white-space: nowrap;\n .button-size(@padding-base-vertical; @padding-base-horizontal; @font-size-base; @line-height-base; @btn-border-radius-base);\n .user-select(none);\n\n &,\n &:active,\n &.active {\n &:focus,\n &.focus {\n .tab-focus();\n }\n }\n\n &:hover,\n &:focus,\n &.focus {\n color: @btn-default-color;\n text-decoration: none;\n }\n\n &:active,\n &.active {\n outline: 0;\n background-image: none;\n .box-shadow(inset 0 3px 5px rgba(0,0,0,.125));\n }\n\n &.disabled,\n &[disabled],\n fieldset[disabled] & {\n cursor: @cursor-disabled;\n .opacity(.65);\n .box-shadow(none);\n }\n\n a& {\n &.disabled,\n fieldset[disabled] & {\n pointer-events: none; // Future-proof disabling of clicks on `` elements\n }\n }\n}\n\n\n// Alternate buttons\n// --------------------------------------------------\n\n.btn-default {\n .button-variant(@btn-default-color; @btn-default-bg; @btn-default-border);\n}\n.btn-primary {\n .button-variant(@btn-primary-color; @btn-primary-bg; @btn-primary-border);\n}\n// Success appears as green\n.btn-success {\n .button-variant(@btn-success-color; @btn-success-bg; @btn-success-border);\n}\n// Info appears as blue-green\n.btn-info {\n .button-variant(@btn-info-color; @btn-info-bg; @btn-info-border);\n}\n// Warning appears as orange\n.btn-warning {\n .button-variant(@btn-warning-color; @btn-warning-bg; @btn-warning-border);\n}\n// Danger and error appear as red\n.btn-danger {\n .button-variant(@btn-danger-color; @btn-danger-bg; @btn-danger-border);\n}\n\n\n// Link buttons\n// -------------------------\n\n// Make a button look and behave like a link\n.btn-link {\n color: @link-color;\n font-weight: normal;\n border-radius: 0;\n\n &,\n &:active,\n &.active,\n &[disabled],\n fieldset[disabled] & {\n background-color: transparent;\n .box-shadow(none);\n }\n &,\n &:hover,\n &:focus,\n &:active {\n border-color: transparent;\n }\n &:hover,\n &:focus {\n color: @link-hover-color;\n text-decoration: @link-hover-decoration;\n background-color: transparent;\n }\n &[disabled],\n fieldset[disabled] & {\n &:hover,\n &:focus {\n color: @btn-link-disabled-color;\n text-decoration: none;\n }\n }\n}\n\n\n// Button Sizes\n// --------------------------------------------------\n\n.btn-lg {\n // line-height: ensure even-numbered height of button next to large input\n .button-size(@padding-large-vertical; @padding-large-horizontal; @font-size-large; @line-height-large; @btn-border-radius-large);\n}\n.btn-sm {\n // line-height: ensure proper height of button next to small input\n .button-size(@padding-small-vertical; @padding-small-horizontal; @font-size-small; @line-height-small; @btn-border-radius-small);\n}\n.btn-xs {\n .button-size(@padding-xs-vertical; @padding-xs-horizontal; @font-size-small; @line-height-small; @btn-border-radius-small);\n}\n\n\n// Block button\n// --------------------------------------------------\n\n.btn-block {\n display: block;\n width: 100%;\n}\n\n// Vertically space out multiple block buttons\n.btn-block + .btn-block {\n margin-top: 5px;\n}\n\n// Specificity overrides\ninput[type=\"submit\"],\ninput[type=\"reset\"],\ninput[type=\"button\"] {\n &.btn-block {\n width: 100%;\n }\n}\n","// Button variants\n//\n// Easily pump out default styles, as well as :hover, :focus, :active,\n// and disabled options for all buttons\n\n.button-variant(@color; @background; @border) {\n color: @color;\n background-color: @background;\n border-color: @border;\n\n &:focus,\n &.focus {\n color: @color;\n background-color: darken(@background, 10%);\n border-color: darken(@border, 25%);\n }\n &:hover {\n color: @color;\n background-color: darken(@background, 10%);\n border-color: darken(@border, 12%);\n }\n &:active,\n &.active,\n .open > .dropdown-toggle& {\n color: @color;\n background-color: darken(@background, 10%);\n border-color: darken(@border, 12%);\n\n &:hover,\n &:focus,\n &.focus {\n color: @color;\n background-color: darken(@background, 17%);\n border-color: darken(@border, 25%);\n }\n }\n &:active,\n &.active,\n .open > .dropdown-toggle& {\n background-image: none;\n }\n &.disabled,\n &[disabled],\n fieldset[disabled] & {\n &:hover,\n &:focus,\n &.focus {\n background-color: @background;\n border-color: @border;\n }\n }\n\n .badge {\n color: @background;\n background-color: @color;\n }\n}\n\n// Button sizes\n.button-size(@padding-vertical; @padding-horizontal; @font-size; @line-height; @border-radius) {\n padding: @padding-vertical @padding-horizontal;\n font-size: @font-size;\n line-height: @line-height;\n border-radius: @border-radius;\n}\n","// Opacity\n\n.opacity(@opacity) {\n opacity: @opacity;\n // IE8 filter\n @opacity-ie: (@opacity * 100);\n filter: ~\"alpha(opacity=@{opacity-ie})\";\n}\n","//\n// Component animations\n// --------------------------------------------------\n\n// Heads up!\n//\n// We don't use the `.opacity()` mixin here since it causes a bug with text\n// fields in IE7-8. Source: https://github.com/twbs/bootstrap/pull/3552.\n\n.fade {\n opacity: 0;\n .transition(opacity .15s linear);\n &.in {\n opacity: 1;\n }\n}\n\n.collapse {\n display: none;\n\n &.in { display: block; }\n tr&.in { display: table-row; }\n tbody&.in { display: table-row-group; }\n}\n\n.collapsing {\n position: relative;\n height: 0;\n overflow: hidden;\n .transition-property(~\"height, visibility\");\n .transition-duration(.35s);\n .transition-timing-function(ease);\n}\n","//\n// Dropdown menus\n// --------------------------------------------------\n\n\n// Dropdown arrow/caret\n.caret {\n display: inline-block;\n width: 0;\n height: 0;\n margin-left: 2px;\n vertical-align: middle;\n border-top: @caret-width-base dashed;\n border-top: @caret-width-base solid ~\"\\9\"; // IE8\n border-right: @caret-width-base solid transparent;\n border-left: @caret-width-base solid transparent;\n}\n\n// The dropdown wrapper (div)\n.dropup,\n.dropdown {\n position: relative;\n}\n\n// Prevent the focus on the dropdown toggle when closing dropdowns\n.dropdown-toggle:focus {\n outline: 0;\n}\n\n// The dropdown menu (ul)\n.dropdown-menu {\n position: absolute;\n top: 100%;\n left: 0;\n z-index: @zindex-dropdown;\n display: none; // none by default, but block on \"open\" of the menu\n float: left;\n min-width: 160px;\n padding: 5px 0;\n margin: 2px 0 0; // override default ul\n list-style: none;\n font-size: @font-size-base;\n text-align: left; // Ensures proper alignment if parent has it changed (e.g., modal footer)\n background-color: @dropdown-bg;\n border: 1px solid @dropdown-fallback-border; // IE8 fallback\n border: 1px solid @dropdown-border;\n border-radius: @border-radius-base;\n .box-shadow(0 6px 12px rgba(0,0,0,.175));\n background-clip: padding-box;\n\n // Aligns the dropdown menu to right\n //\n // Deprecated as of 3.1.0 in favor of `.dropdown-menu-[dir]`\n &.pull-right {\n right: 0;\n left: auto;\n }\n\n // Dividers (basically an hr) within the dropdown\n .divider {\n .nav-divider(@dropdown-divider-bg);\n }\n\n // Links within the dropdown menu\n > li > a {\n display: block;\n padding: 3px 20px;\n clear: both;\n font-weight: normal;\n line-height: @line-height-base;\n color: @dropdown-link-color;\n white-space: nowrap; // prevent links from randomly breaking onto new lines\n }\n}\n\n// Hover/Focus state\n.dropdown-menu > li > a {\n &:hover,\n &:focus {\n text-decoration: none;\n color: @dropdown-link-hover-color;\n background-color: @dropdown-link-hover-bg;\n }\n}\n\n// Active state\n.dropdown-menu > .active > a {\n &,\n &:hover,\n &:focus {\n color: @dropdown-link-active-color;\n text-decoration: none;\n outline: 0;\n background-color: @dropdown-link-active-bg;\n }\n}\n\n// Disabled state\n//\n// Gray out text and ensure the hover/focus state remains gray\n\n.dropdown-menu > .disabled > a {\n &,\n &:hover,\n &:focus {\n color: @dropdown-link-disabled-color;\n }\n\n // Nuke hover/focus effects\n &:hover,\n &:focus {\n text-decoration: none;\n background-color: transparent;\n background-image: none; // Remove CSS gradient\n .reset-filter();\n cursor: @cursor-disabled;\n }\n}\n\n// Open state for the dropdown\n.open {\n // Show the menu\n > .dropdown-menu {\n display: block;\n }\n\n // Remove the outline when :focus is triggered\n > a {\n outline: 0;\n }\n}\n\n// Menu positioning\n//\n// Add extra class to `.dropdown-menu` to flip the alignment of the dropdown\n// menu with the parent.\n.dropdown-menu-right {\n left: auto; // Reset the default from `.dropdown-menu`\n right: 0;\n}\n// With v3, we enabled auto-flipping if you have a dropdown within a right\n// aligned nav component. To enable the undoing of that, we provide an override\n// to restore the default dropdown menu alignment.\n//\n// This is only for left-aligning a dropdown menu within a `.navbar-right` or\n// `.pull-right` nav component.\n.dropdown-menu-left {\n left: 0;\n right: auto;\n}\n\n// Dropdown section headers\n.dropdown-header {\n display: block;\n padding: 3px 20px;\n font-size: @font-size-small;\n line-height: @line-height-base;\n color: @dropdown-header-color;\n white-space: nowrap; // as with > li > a\n}\n\n// Backdrop to catch body clicks on mobile, etc.\n.dropdown-backdrop {\n position: fixed;\n left: 0;\n right: 0;\n bottom: 0;\n top: 0;\n z-index: (@zindex-dropdown - 10);\n}\n\n// Right aligned dropdowns\n.pull-right > .dropdown-menu {\n right: 0;\n left: auto;\n}\n\n// Allow for dropdowns to go bottom up (aka, dropup-menu)\n//\n// Just add .dropup after the standard .dropdown class and you're set, bro.\n// TODO: abstract this so that the navbar fixed styles are not placed here?\n\n.dropup,\n.navbar-fixed-bottom .dropdown {\n // Reverse the caret\n .caret {\n border-top: 0;\n border-bottom: @caret-width-base dashed;\n border-bottom: @caret-width-base solid ~\"\\9\"; // IE8\n content: \"\";\n }\n // Different positioning for bottom up menu\n .dropdown-menu {\n top: auto;\n bottom: 100%;\n margin-bottom: 2px;\n }\n}\n\n\n// Component alignment\n//\n// Reiterate per navbar.less and the modified component alignment there.\n\n@media (min-width: @grid-float-breakpoint) {\n .navbar-right {\n .dropdown-menu {\n .dropdown-menu-right();\n }\n // Necessary for overrides of the default right aligned menu.\n // Will remove come v4 in all likelihood.\n .dropdown-menu-left {\n .dropdown-menu-left();\n }\n }\n}\n","// Horizontal dividers\n//\n// Dividers (basically an hr) within dropdowns and nav lists\n\n.nav-divider(@color: #e5e5e5) {\n height: 1px;\n margin: ((@line-height-computed / 2) - 1) 0;\n overflow: hidden;\n background-color: @color;\n}\n","// Reset filters for IE\n//\n// When you need to remove a gradient background, do not forget to use this to reset\n// the IE filter for IE9 and below.\n\n.reset-filter() {\n filter: e(%(\"progid:DXImageTransform.Microsoft.gradient(enabled = false)\"));\n}\n","//\n// Button groups\n// --------------------------------------------------\n\n// Make the div behave like a button\n.btn-group,\n.btn-group-vertical {\n position: relative;\n display: inline-block;\n vertical-align: middle; // match .btn alignment given font-size hack above\n > .btn {\n position: relative;\n float: left;\n // Bring the \"active\" button to the front\n &:hover,\n &:focus,\n &:active,\n &.active {\n z-index: 2;\n }\n }\n}\n\n// Prevent double borders when buttons are next to each other\n.btn-group {\n .btn + .btn,\n .btn + .btn-group,\n .btn-group + .btn,\n .btn-group + .btn-group {\n margin-left: -1px;\n }\n}\n\n// Optional: Group multiple button groups together for a toolbar\n.btn-toolbar {\n margin-left: -5px; // Offset the first child's margin\n &:extend(.clearfix all);\n\n .btn,\n .btn-group,\n .input-group {\n float: left;\n }\n > .btn,\n > .btn-group,\n > .input-group {\n margin-left: 5px;\n }\n}\n\n.btn-group > .btn:not(:first-child):not(:last-child):not(.dropdown-toggle) {\n border-radius: 0;\n}\n\n// Set corners individual because sometimes a single button can be in a .btn-group and we need :first-child and :last-child to both match\n.btn-group > .btn:first-child {\n margin-left: 0;\n &:not(:last-child):not(.dropdown-toggle) {\n .border-right-radius(0);\n }\n}\n// Need .dropdown-toggle since :last-child doesn't apply, given that a .dropdown-menu is used immediately after it\n.btn-group > .btn:last-child:not(:first-child),\n.btn-group > .dropdown-toggle:not(:first-child) {\n .border-left-radius(0);\n}\n\n// Custom edits for including btn-groups within btn-groups (useful for including dropdown buttons within a btn-group)\n.btn-group > .btn-group {\n float: left;\n}\n.btn-group > .btn-group:not(:first-child):not(:last-child) > .btn {\n border-radius: 0;\n}\n.btn-group > .btn-group:first-child:not(:last-child) {\n > .btn:last-child,\n > .dropdown-toggle {\n .border-right-radius(0);\n }\n}\n.btn-group > .btn-group:last-child:not(:first-child) > .btn:first-child {\n .border-left-radius(0);\n}\n\n// On active and open, don't show outline\n.btn-group .dropdown-toggle:active,\n.btn-group.open .dropdown-toggle {\n outline: 0;\n}\n\n\n// Sizing\n//\n// Remix the default button sizing classes into new ones for easier manipulation.\n\n.btn-group-xs > .btn { &:extend(.btn-xs); }\n.btn-group-sm > .btn { &:extend(.btn-sm); }\n.btn-group-lg > .btn { &:extend(.btn-lg); }\n\n\n// Split button dropdowns\n// ----------------------\n\n// Give the line between buttons some depth\n.btn-group > .btn + .dropdown-toggle {\n padding-left: 8px;\n padding-right: 8px;\n}\n.btn-group > .btn-lg + .dropdown-toggle {\n padding-left: 12px;\n padding-right: 12px;\n}\n\n// The clickable button for toggling the menu\n// Remove the gradient and set the same inset shadow as the :active state\n.btn-group.open .dropdown-toggle {\n .box-shadow(inset 0 3px 5px rgba(0,0,0,.125));\n\n // Show no shadow for `.btn-link` since it has no other button styles.\n &.btn-link {\n .box-shadow(none);\n }\n}\n\n\n// Reposition the caret\n.btn .caret {\n margin-left: 0;\n}\n// Carets in other button sizes\n.btn-lg .caret {\n border-width: @caret-width-large @caret-width-large 0;\n border-bottom-width: 0;\n}\n// Upside down carets for .dropup\n.dropup .btn-lg .caret {\n border-width: 0 @caret-width-large @caret-width-large;\n}\n\n\n// Vertical button groups\n// ----------------------\n\n.btn-group-vertical {\n > .btn,\n > .btn-group,\n > .btn-group > .btn {\n display: block;\n float: none;\n width: 100%;\n max-width: 100%;\n }\n\n // Clear floats so dropdown menus can be properly placed\n > .btn-group {\n &:extend(.clearfix all);\n > .btn {\n float: none;\n }\n }\n\n > .btn + .btn,\n > .btn + .btn-group,\n > .btn-group + .btn,\n > .btn-group + .btn-group {\n margin-top: -1px;\n margin-left: 0;\n }\n}\n\n.btn-group-vertical > .btn {\n &:not(:first-child):not(:last-child) {\n border-radius: 0;\n }\n &:first-child:not(:last-child) {\n .border-top-radius(@btn-border-radius-base);\n .border-bottom-radius(0);\n }\n &:last-child:not(:first-child) {\n .border-top-radius(0);\n .border-bottom-radius(@btn-border-radius-base);\n }\n}\n.btn-group-vertical > .btn-group:not(:first-child):not(:last-child) > .btn {\n border-radius: 0;\n}\n.btn-group-vertical > .btn-group:first-child:not(:last-child) {\n > .btn:last-child,\n > .dropdown-toggle {\n .border-bottom-radius(0);\n }\n}\n.btn-group-vertical > .btn-group:last-child:not(:first-child) > .btn:first-child {\n .border-top-radius(0);\n}\n\n\n// Justified button groups\n// ----------------------\n\n.btn-group-justified {\n display: table;\n width: 100%;\n table-layout: fixed;\n border-collapse: separate;\n > .btn,\n > .btn-group {\n float: none;\n display: table-cell;\n width: 1%;\n }\n > .btn-group .btn {\n width: 100%;\n }\n\n > .btn-group .dropdown-menu {\n left: auto;\n }\n}\n\n\n// Checkbox and radio options\n//\n// In order to support the browser's form validation feedback, powered by the\n// `required` attribute, we have to \"hide\" the inputs via `clip`. We cannot use\n// `display: none;` or `visibility: hidden;` as that also hides the popover.\n// Simply visually hiding the inputs via `opacity` would leave them clickable in\n// certain cases which is prevented by using `clip` and `pointer-events`.\n// This way, we ensure a DOM element is visible to position the popover from.\n//\n// See https://github.com/twbs/bootstrap/pull/12794 and\n// https://github.com/twbs/bootstrap/pull/14559 for more information.\n\n[data-toggle=\"buttons\"] {\n > .btn,\n > .btn-group > .btn {\n input[type=\"radio\"],\n input[type=\"checkbox\"] {\n position: absolute;\n clip: rect(0,0,0,0);\n pointer-events: none;\n }\n }\n}\n","// Single side border-radius\n\n.border-top-radius(@radius) {\n border-top-right-radius: @radius;\n border-top-left-radius: @radius;\n}\n.border-right-radius(@radius) {\n border-bottom-right-radius: @radius;\n border-top-right-radius: @radius;\n}\n.border-bottom-radius(@radius) {\n border-bottom-right-radius: @radius;\n border-bottom-left-radius: @radius;\n}\n.border-left-radius(@radius) {\n border-bottom-left-radius: @radius;\n border-top-left-radius: @radius;\n}\n","//\n// Input groups\n// --------------------------------------------------\n\n// Base styles\n// -------------------------\n.input-group {\n position: relative; // For dropdowns\n display: table;\n border-collapse: separate; // prevent input groups from inheriting border styles from table cells when placed within a table\n\n // Undo padding and float of grid classes\n &[class*=\"col-\"] {\n float: none;\n padding-left: 0;\n padding-right: 0;\n }\n\n .form-control {\n // Ensure that the input is always above the *appended* addon button for\n // proper border colors.\n position: relative;\n z-index: 2;\n\n // IE9 fubars the placeholder attribute in text inputs and the arrows on\n // select elements in input groups. To fix it, we float the input. Details:\n // https://github.com/twbs/bootstrap/issues/11561#issuecomment-28936855\n float: left;\n\n width: 100%;\n margin-bottom: 0;\n\n &:focus {\n z-index: 3;\n }\n }\n}\n\n// Sizing options\n//\n// Remix the default form control sizing classes into new ones for easier\n// manipulation.\n\n.input-group-lg > .form-control,\n.input-group-lg > .input-group-addon,\n.input-group-lg > .input-group-btn > .btn {\n .input-lg();\n}\n.input-group-sm > .form-control,\n.input-group-sm > .input-group-addon,\n.input-group-sm > .input-group-btn > .btn {\n .input-sm();\n}\n\n\n// Display as table-cell\n// -------------------------\n.input-group-addon,\n.input-group-btn,\n.input-group .form-control {\n display: table-cell;\n\n &:not(:first-child):not(:last-child) {\n border-radius: 0;\n }\n}\n// Addon and addon wrapper for buttons\n.input-group-addon,\n.input-group-btn {\n width: 1%;\n white-space: nowrap;\n vertical-align: middle; // Match the inputs\n}\n\n// Text input groups\n// -------------------------\n.input-group-addon {\n padding: @padding-base-vertical @padding-base-horizontal;\n font-size: @font-size-base;\n font-weight: normal;\n line-height: 1;\n color: @input-color;\n text-align: center;\n background-color: @input-group-addon-bg;\n border: 1px solid @input-group-addon-border-color;\n border-radius: @input-border-radius;\n\n // Sizing\n &.input-sm {\n padding: @padding-small-vertical @padding-small-horizontal;\n font-size: @font-size-small;\n border-radius: @input-border-radius-small;\n }\n &.input-lg {\n padding: @padding-large-vertical @padding-large-horizontal;\n font-size: @font-size-large;\n border-radius: @input-border-radius-large;\n }\n\n // Nuke default margins from checkboxes and radios to vertically center within.\n input[type=\"radio\"],\n input[type=\"checkbox\"] {\n margin-top: 0;\n }\n}\n\n// Reset rounded corners\n.input-group .form-control:first-child,\n.input-group-addon:first-child,\n.input-group-btn:first-child > .btn,\n.input-group-btn:first-child > .btn-group > .btn,\n.input-group-btn:first-child > .dropdown-toggle,\n.input-group-btn:last-child > .btn:not(:last-child):not(.dropdown-toggle),\n.input-group-btn:last-child > .btn-group:not(:last-child) > .btn {\n .border-right-radius(0);\n}\n.input-group-addon:first-child {\n border-right: 0;\n}\n.input-group .form-control:last-child,\n.input-group-addon:last-child,\n.input-group-btn:last-child > .btn,\n.input-group-btn:last-child > .btn-group > .btn,\n.input-group-btn:last-child > .dropdown-toggle,\n.input-group-btn:first-child > .btn:not(:first-child),\n.input-group-btn:first-child > .btn-group:not(:first-child) > .btn {\n .border-left-radius(0);\n}\n.input-group-addon:last-child {\n border-left: 0;\n}\n\n// Button input groups\n// -------------------------\n.input-group-btn {\n position: relative;\n // Jankily prevent input button groups from wrapping with `white-space` and\n // `font-size` in combination with `inline-block` on buttons.\n font-size: 0;\n white-space: nowrap;\n\n // Negative margin for spacing, position for bringing hovered/focused/actived\n // element above the siblings.\n > .btn {\n position: relative;\n + .btn {\n margin-left: -1px;\n }\n // Bring the \"active\" button to the front\n &:hover,\n &:focus,\n &:active {\n z-index: 2;\n }\n }\n\n // Negative margin to only have a 1px border between the two\n &:first-child {\n > .btn,\n > .btn-group {\n margin-right: -1px;\n }\n }\n &:last-child {\n > .btn,\n > .btn-group {\n z-index: 2;\n margin-left: -1px;\n }\n }\n}\n","//\n// Navs\n// --------------------------------------------------\n\n\n// Base class\n// --------------------------------------------------\n\n.nav {\n margin-bottom: 0;\n padding-left: 0; // Override default ul/ol\n list-style: none;\n &:extend(.clearfix all);\n\n > li {\n position: relative;\n display: block;\n\n > a {\n position: relative;\n display: block;\n padding: @nav-link-padding;\n &:hover,\n &:focus {\n text-decoration: none;\n background-color: @nav-link-hover-bg;\n }\n }\n\n // Disabled state sets text to gray and nukes hover/tab effects\n &.disabled > a {\n color: @nav-disabled-link-color;\n\n &:hover,\n &:focus {\n color: @nav-disabled-link-hover-color;\n text-decoration: none;\n background-color: transparent;\n cursor: @cursor-disabled;\n }\n }\n }\n\n // Open dropdowns\n .open > a {\n &,\n &:hover,\n &:focus {\n background-color: @nav-link-hover-bg;\n border-color: @link-color;\n }\n }\n\n // Nav dividers (deprecated with v3.0.1)\n //\n // This should have been removed in v3 with the dropping of `.nav-list`, but\n // we missed it. We don't currently support this anywhere, but in the interest\n // of maintaining backward compatibility in case you use it, it's deprecated.\n .nav-divider {\n .nav-divider();\n }\n\n // Prevent IE8 from misplacing imgs\n //\n // See https://github.com/h5bp/html5-boilerplate/issues/984#issuecomment-3985989\n > li > a > img {\n max-width: none;\n }\n}\n\n\n// Tabs\n// -------------------------\n\n// Give the tabs something to sit on\n.nav-tabs {\n border-bottom: 1px solid @nav-tabs-border-color;\n > li {\n float: left;\n // Make the list-items overlay the bottom border\n margin-bottom: -1px;\n\n // Actual tabs (as links)\n > a {\n margin-right: 2px;\n line-height: @line-height-base;\n border: 1px solid transparent;\n border-radius: @border-radius-base @border-radius-base 0 0;\n &:hover {\n border-color: @nav-tabs-link-hover-border-color @nav-tabs-link-hover-border-color @nav-tabs-border-color;\n }\n }\n\n // Active state, and its :hover to override normal :hover\n &.active > a {\n &,\n &:hover,\n &:focus {\n color: @nav-tabs-active-link-hover-color;\n background-color: @nav-tabs-active-link-hover-bg;\n border: 1px solid @nav-tabs-active-link-hover-border-color;\n border-bottom-color: transparent;\n cursor: default;\n }\n }\n }\n // pulling this in mainly for less shorthand\n &.nav-justified {\n .nav-justified();\n .nav-tabs-justified();\n }\n}\n\n\n// Pills\n// -------------------------\n.nav-pills {\n > li {\n float: left;\n\n // Links rendered as pills\n > a {\n border-radius: @nav-pills-border-radius;\n }\n + li {\n margin-left: 2px;\n }\n\n // Active state\n &.active > a {\n &,\n &:hover,\n &:focus {\n color: @nav-pills-active-link-hover-color;\n background-color: @nav-pills-active-link-hover-bg;\n }\n }\n }\n}\n\n\n// Stacked pills\n.nav-stacked {\n > li {\n float: none;\n + li {\n margin-top: 2px;\n margin-left: 0; // no need for this gap between nav items\n }\n }\n}\n\n\n// Nav variations\n// --------------------------------------------------\n\n// Justified nav links\n// -------------------------\n\n.nav-justified {\n width: 100%;\n\n > li {\n float: none;\n > a {\n text-align: center;\n margin-bottom: 5px;\n }\n }\n\n > .dropdown .dropdown-menu {\n top: auto;\n left: auto;\n }\n\n @media (min-width: @screen-sm-min) {\n > li {\n display: table-cell;\n width: 1%;\n > a {\n margin-bottom: 0;\n }\n }\n }\n}\n\n// Move borders to anchors instead of bottom of list\n//\n// Mixin for adding on top the shared `.nav-justified` styles for our tabs\n.nav-tabs-justified {\n border-bottom: 0;\n\n > li > a {\n // Override margin from .nav-tabs\n margin-right: 0;\n border-radius: @border-radius-base;\n }\n\n > .active > a,\n > .active > a:hover,\n > .active > a:focus {\n border: 1px solid @nav-tabs-justified-link-border-color;\n }\n\n @media (min-width: @screen-sm-min) {\n > li > a {\n border-bottom: 1px solid @nav-tabs-justified-link-border-color;\n border-radius: @border-radius-base @border-radius-base 0 0;\n }\n > .active > a,\n > .active > a:hover,\n > .active > a:focus {\n border-bottom-color: @nav-tabs-justified-active-link-border-color;\n }\n }\n}\n\n\n// Tabbable tabs\n// -------------------------\n\n// Hide tabbable panes to start, show them when `.active`\n.tab-content {\n > .tab-pane {\n display: none;\n }\n > .active {\n display: block;\n }\n}\n\n\n// Dropdowns\n// -------------------------\n\n// Specific dropdowns\n.nav-tabs .dropdown-menu {\n // make dropdown border overlap tab border\n margin-top: -1px;\n // Remove the top rounded corners here since there is a hard edge above the menu\n .border-top-radius(0);\n}\n","//\n// Navbars\n// --------------------------------------------------\n\n\n// Wrapper and base class\n//\n// Provide a static navbar from which we expand to create full-width, fixed, and\n// other navbar variations.\n\n.navbar {\n position: relative;\n min-height: @navbar-height; // Ensure a navbar always shows (e.g., without a .navbar-brand in collapsed mode)\n margin-bottom: @navbar-margin-bottom;\n border: 1px solid transparent;\n\n // Prevent floats from breaking the navbar\n &:extend(.clearfix all);\n\n @media (min-width: @grid-float-breakpoint) {\n border-radius: @navbar-border-radius;\n }\n}\n\n\n// Navbar heading\n//\n// Groups `.navbar-brand` and `.navbar-toggle` into a single component for easy\n// styling of responsive aspects.\n\n.navbar-header {\n &:extend(.clearfix all);\n\n @media (min-width: @grid-float-breakpoint) {\n float: left;\n }\n}\n\n\n// Navbar collapse (body)\n//\n// Group your navbar content into this for easy collapsing and expanding across\n// various device sizes. By default, this content is collapsed when <768px, but\n// will expand past that for a horizontal display.\n//\n// To start (on mobile devices) the navbar links, forms, and buttons are stacked\n// vertically and include a `max-height` to overflow in case you have too much\n// content for the user's viewport.\n\n.navbar-collapse {\n overflow-x: visible;\n padding-right: @navbar-padding-horizontal;\n padding-left: @navbar-padding-horizontal;\n border-top: 1px solid transparent;\n box-shadow: inset 0 1px 0 rgba(255,255,255,.1);\n &:extend(.clearfix all);\n -webkit-overflow-scrolling: touch;\n\n &.in {\n overflow-y: auto;\n }\n\n @media (min-width: @grid-float-breakpoint) {\n width: auto;\n border-top: 0;\n box-shadow: none;\n\n &.collapse {\n display: block !important;\n height: auto !important;\n padding-bottom: 0; // Override default setting\n overflow: visible !important;\n }\n\n &.in {\n overflow-y: visible;\n }\n\n // Undo the collapse side padding for navbars with containers to ensure\n // alignment of right-aligned contents.\n .navbar-fixed-top &,\n .navbar-static-top &,\n .navbar-fixed-bottom & {\n padding-left: 0;\n padding-right: 0;\n }\n }\n}\n\n.navbar-fixed-top,\n.navbar-fixed-bottom {\n .navbar-collapse {\n max-height: @navbar-collapse-max-height;\n\n @media (max-device-width: @screen-xs-min) and (orientation: landscape) {\n max-height: 200px;\n }\n }\n}\n\n\n// Both navbar header and collapse\n//\n// When a container is present, change the behavior of the header and collapse.\n\n.container,\n.container-fluid {\n > .navbar-header,\n > .navbar-collapse {\n margin-right: -@navbar-padding-horizontal;\n margin-left: -@navbar-padding-horizontal;\n\n @media (min-width: @grid-float-breakpoint) {\n margin-right: 0;\n margin-left: 0;\n }\n }\n}\n\n\n//\n// Navbar alignment options\n//\n// Display the navbar across the entirety of the page or fixed it to the top or\n// bottom of the page.\n\n// Static top (unfixed, but 100% wide) navbar\n.navbar-static-top {\n z-index: @zindex-navbar;\n border-width: 0 0 1px;\n\n @media (min-width: @grid-float-breakpoint) {\n border-radius: 0;\n }\n}\n\n// Fix the top/bottom navbars when screen real estate supports it\n.navbar-fixed-top,\n.navbar-fixed-bottom {\n position: fixed;\n right: 0;\n left: 0;\n z-index: @zindex-navbar-fixed;\n\n // Undo the rounded corners\n @media (min-width: @grid-float-breakpoint) {\n border-radius: 0;\n }\n}\n.navbar-fixed-top {\n top: 0;\n border-width: 0 0 1px;\n}\n.navbar-fixed-bottom {\n bottom: 0;\n margin-bottom: 0; // override .navbar defaults\n border-width: 1px 0 0;\n}\n\n\n// Brand/project name\n\n.navbar-brand {\n float: left;\n padding: @navbar-padding-vertical @navbar-padding-horizontal;\n font-size: @font-size-large;\n line-height: @line-height-computed;\n height: @navbar-height;\n\n &:hover,\n &:focus {\n text-decoration: none;\n }\n\n > img {\n display: block;\n }\n\n @media (min-width: @grid-float-breakpoint) {\n .navbar > .container &,\n .navbar > .container-fluid & {\n margin-left: -@navbar-padding-horizontal;\n }\n }\n}\n\n\n// Navbar toggle\n//\n// Custom button for toggling the `.navbar-collapse`, powered by the collapse\n// JavaScript plugin.\n\n.navbar-toggle {\n position: relative;\n float: right;\n margin-right: @navbar-padding-horizontal;\n padding: 9px 10px;\n .navbar-vertical-align(34px);\n background-color: transparent;\n background-image: none; // Reset unusual Firefox-on-Android default style; see https://github.com/necolas/normalize.css/issues/214\n border: 1px solid transparent;\n border-radius: @border-radius-base;\n\n // We remove the `outline` here, but later compensate by attaching `:hover`\n // styles to `:focus`.\n &:focus {\n outline: 0;\n }\n\n // Bars\n .icon-bar {\n display: block;\n width: 22px;\n height: 2px;\n border-radius: 1px;\n }\n .icon-bar + .icon-bar {\n margin-top: 4px;\n }\n\n @media (min-width: @grid-float-breakpoint) {\n display: none;\n }\n}\n\n\n// Navbar nav links\n//\n// Builds on top of the `.nav` components with its own modifier class to make\n// the nav the full height of the horizontal nav (above 768px).\n\n.navbar-nav {\n margin: (@navbar-padding-vertical / 2) -@navbar-padding-horizontal;\n\n > li > a {\n padding-top: 10px;\n padding-bottom: 10px;\n line-height: @line-height-computed;\n }\n\n @media (max-width: @grid-float-breakpoint-max) {\n // Dropdowns get custom display when collapsed\n .open .dropdown-menu {\n position: static;\n float: none;\n width: auto;\n margin-top: 0;\n background-color: transparent;\n border: 0;\n box-shadow: none;\n > li > a,\n .dropdown-header {\n padding: 5px 15px 5px 25px;\n }\n > li > a {\n line-height: @line-height-computed;\n &:hover,\n &:focus {\n background-image: none;\n }\n }\n }\n }\n\n // Uncollapse the nav\n @media (min-width: @grid-float-breakpoint) {\n float: left;\n margin: 0;\n\n > li {\n float: left;\n > a {\n padding-top: @navbar-padding-vertical;\n padding-bottom: @navbar-padding-vertical;\n }\n }\n }\n}\n\n\n// Navbar form\n//\n// Extension of the `.form-inline` with some extra flavor for optimum display in\n// our navbars.\n\n.navbar-form {\n margin-left: -@navbar-padding-horizontal;\n margin-right: -@navbar-padding-horizontal;\n padding: 10px @navbar-padding-horizontal;\n border-top: 1px solid transparent;\n border-bottom: 1px solid transparent;\n @shadow: inset 0 1px 0 rgba(255,255,255,.1), 0 1px 0 rgba(255,255,255,.1);\n .box-shadow(@shadow);\n\n // Mixin behavior for optimum display\n .form-inline();\n\n .form-group {\n @media (max-width: @grid-float-breakpoint-max) {\n margin-bottom: 5px;\n\n &:last-child {\n margin-bottom: 0;\n }\n }\n }\n\n // Vertically center in expanded, horizontal navbar\n .navbar-vertical-align(@input-height-base);\n\n // Undo 100% width for pull classes\n @media (min-width: @grid-float-breakpoint) {\n width: auto;\n border: 0;\n margin-left: 0;\n margin-right: 0;\n padding-top: 0;\n padding-bottom: 0;\n .box-shadow(none);\n }\n}\n\n\n// Dropdown menus\n\n// Menu position and menu carets\n.navbar-nav > li > .dropdown-menu {\n margin-top: 0;\n .border-top-radius(0);\n}\n// Menu position and menu caret support for dropups via extra dropup class\n.navbar-fixed-bottom .navbar-nav > li > .dropdown-menu {\n margin-bottom: 0;\n .border-top-radius(@navbar-border-radius);\n .border-bottom-radius(0);\n}\n\n\n// Buttons in navbars\n//\n// Vertically center a button within a navbar (when *not* in a form).\n\n.navbar-btn {\n .navbar-vertical-align(@input-height-base);\n\n &.btn-sm {\n .navbar-vertical-align(@input-height-small);\n }\n &.btn-xs {\n .navbar-vertical-align(22);\n }\n}\n\n\n// Text in navbars\n//\n// Add a class to make any element properly align itself vertically within the navbars.\n\n.navbar-text {\n .navbar-vertical-align(@line-height-computed);\n\n @media (min-width: @grid-float-breakpoint) {\n float: left;\n margin-left: @navbar-padding-horizontal;\n margin-right: @navbar-padding-horizontal;\n }\n}\n\n\n// Component alignment\n//\n// Repurpose the pull utilities as their own navbar utilities to avoid specificity\n// issues with parents and chaining. Only do this when the navbar is uncollapsed\n// though so that navbar contents properly stack and align in mobile.\n//\n// Declared after the navbar components to ensure more specificity on the margins.\n\n@media (min-width: @grid-float-breakpoint) {\n .navbar-left { .pull-left(); }\n .navbar-right {\n .pull-right();\n margin-right: -@navbar-padding-horizontal;\n\n ~ .navbar-right {\n margin-right: 0;\n }\n }\n}\n\n\n// Alternate navbars\n// --------------------------------------------------\n\n// Default navbar\n.navbar-default {\n background-color: @navbar-default-bg;\n border-color: @navbar-default-border;\n\n .navbar-brand {\n color: @navbar-default-brand-color;\n &:hover,\n &:focus {\n color: @navbar-default-brand-hover-color;\n background-color: @navbar-default-brand-hover-bg;\n }\n }\n\n .navbar-text {\n color: @navbar-default-color;\n }\n\n .navbar-nav {\n > li > a {\n color: @navbar-default-link-color;\n\n &:hover,\n &:focus {\n color: @navbar-default-link-hover-color;\n background-color: @navbar-default-link-hover-bg;\n }\n }\n > .active > a {\n &,\n &:hover,\n &:focus {\n color: @navbar-default-link-active-color;\n background-color: @navbar-default-link-active-bg;\n }\n }\n > .disabled > a {\n &,\n &:hover,\n &:focus {\n color: @navbar-default-link-disabled-color;\n background-color: @navbar-default-link-disabled-bg;\n }\n }\n }\n\n .navbar-toggle {\n border-color: @navbar-default-toggle-border-color;\n &:hover,\n &:focus {\n background-color: @navbar-default-toggle-hover-bg;\n }\n .icon-bar {\n background-color: @navbar-default-toggle-icon-bar-bg;\n }\n }\n\n .navbar-collapse,\n .navbar-form {\n border-color: @navbar-default-border;\n }\n\n // Dropdown menu items\n .navbar-nav {\n // Remove background color from open dropdown\n > .open > a {\n &,\n &:hover,\n &:focus {\n background-color: @navbar-default-link-active-bg;\n color: @navbar-default-link-active-color;\n }\n }\n\n @media (max-width: @grid-float-breakpoint-max) {\n // Dropdowns get custom display when collapsed\n .open .dropdown-menu {\n > li > a {\n color: @navbar-default-link-color;\n &:hover,\n &:focus {\n color: @navbar-default-link-hover-color;\n background-color: @navbar-default-link-hover-bg;\n }\n }\n > .active > a {\n &,\n &:hover,\n &:focus {\n color: @navbar-default-link-active-color;\n background-color: @navbar-default-link-active-bg;\n }\n }\n > .disabled > a {\n &,\n &:hover,\n &:focus {\n color: @navbar-default-link-disabled-color;\n background-color: @navbar-default-link-disabled-bg;\n }\n }\n }\n }\n }\n\n\n // Links in navbars\n //\n // Add a class to ensure links outside the navbar nav are colored correctly.\n\n .navbar-link {\n color: @navbar-default-link-color;\n &:hover {\n color: @navbar-default-link-hover-color;\n }\n }\n\n .btn-link {\n color: @navbar-default-link-color;\n &:hover,\n &:focus {\n color: @navbar-default-link-hover-color;\n }\n &[disabled],\n fieldset[disabled] & {\n &:hover,\n &:focus {\n color: @navbar-default-link-disabled-color;\n }\n }\n }\n}\n\n// Inverse navbar\n\n.navbar-inverse {\n background-color: @navbar-inverse-bg;\n border-color: @navbar-inverse-border;\n\n .navbar-brand {\n color: @navbar-inverse-brand-color;\n &:hover,\n &:focus {\n color: @navbar-inverse-brand-hover-color;\n background-color: @navbar-inverse-brand-hover-bg;\n }\n }\n\n .navbar-text {\n color: @navbar-inverse-color;\n }\n\n .navbar-nav {\n > li > a {\n color: @navbar-inverse-link-color;\n\n &:hover,\n &:focus {\n color: @navbar-inverse-link-hover-color;\n background-color: @navbar-inverse-link-hover-bg;\n }\n }\n > .active > a {\n &,\n &:hover,\n &:focus {\n color: @navbar-inverse-link-active-color;\n background-color: @navbar-inverse-link-active-bg;\n }\n }\n > .disabled > a {\n &,\n &:hover,\n &:focus {\n color: @navbar-inverse-link-disabled-color;\n background-color: @navbar-inverse-link-disabled-bg;\n }\n }\n }\n\n // Darken the responsive nav toggle\n .navbar-toggle {\n border-color: @navbar-inverse-toggle-border-color;\n &:hover,\n &:focus {\n background-color: @navbar-inverse-toggle-hover-bg;\n }\n .icon-bar {\n background-color: @navbar-inverse-toggle-icon-bar-bg;\n }\n }\n\n .navbar-collapse,\n .navbar-form {\n border-color: darken(@navbar-inverse-bg, 7%);\n }\n\n // Dropdowns\n .navbar-nav {\n > .open > a {\n &,\n &:hover,\n &:focus {\n background-color: @navbar-inverse-link-active-bg;\n color: @navbar-inverse-link-active-color;\n }\n }\n\n @media (max-width: @grid-float-breakpoint-max) {\n // Dropdowns get custom display\n .open .dropdown-menu {\n > .dropdown-header {\n border-color: @navbar-inverse-border;\n }\n .divider {\n background-color: @navbar-inverse-border;\n }\n > li > a {\n color: @navbar-inverse-link-color;\n &:hover,\n &:focus {\n color: @navbar-inverse-link-hover-color;\n background-color: @navbar-inverse-link-hover-bg;\n }\n }\n > .active > a {\n &,\n &:hover,\n &:focus {\n color: @navbar-inverse-link-active-color;\n background-color: @navbar-inverse-link-active-bg;\n }\n }\n > .disabled > a {\n &,\n &:hover,\n &:focus {\n color: @navbar-inverse-link-disabled-color;\n background-color: @navbar-inverse-link-disabled-bg;\n }\n }\n }\n }\n }\n\n .navbar-link {\n color: @navbar-inverse-link-color;\n &:hover {\n color: @navbar-inverse-link-hover-color;\n }\n }\n\n .btn-link {\n color: @navbar-inverse-link-color;\n &:hover,\n &:focus {\n color: @navbar-inverse-link-hover-color;\n }\n &[disabled],\n fieldset[disabled] & {\n &:hover,\n &:focus {\n color: @navbar-inverse-link-disabled-color;\n }\n }\n }\n}\n","// Navbar vertical align\n//\n// Vertically center elements in the navbar.\n// Example: an element has a height of 30px, so write out `.navbar-vertical-align(30px);` to calculate the appropriate top margin.\n\n.navbar-vertical-align(@element-height) {\n margin-top: ((@navbar-height - @element-height) / 2);\n margin-bottom: ((@navbar-height - @element-height) / 2);\n}\n","//\n// Utility classes\n// --------------------------------------------------\n\n\n// Floats\n// -------------------------\n\n.clearfix {\n .clearfix();\n}\n.center-block {\n .center-block();\n}\n.pull-right {\n float: right !important;\n}\n.pull-left {\n float: left !important;\n}\n\n\n// Toggling content\n// -------------------------\n\n// Note: Deprecated .hide in favor of .hidden or .sr-only (as appropriate) in v3.0.1\n.hide {\n display: none !important;\n}\n.show {\n display: block !important;\n}\n.invisible {\n visibility: hidden;\n}\n.text-hide {\n .text-hide();\n}\n\n\n// Hide from screenreaders and browsers\n//\n// Credit: HTML5 Boilerplate\n\n.hidden {\n display: none !important;\n}\n\n\n// For Affix plugin\n// -------------------------\n\n.affix {\n position: fixed;\n}\n","//\n// Breadcrumbs\n// --------------------------------------------------\n\n\n.breadcrumb {\n padding: @breadcrumb-padding-vertical @breadcrumb-padding-horizontal;\n margin-bottom: @line-height-computed;\n list-style: none;\n background-color: @breadcrumb-bg;\n border-radius: @border-radius-base;\n\n > li {\n display: inline-block;\n\n + li:before {\n content: \"@{breadcrumb-separator}\\00a0\"; // Unicode space added since inline-block means non-collapsing white-space\n padding: 0 5px;\n color: @breadcrumb-color;\n }\n }\n\n > .active {\n color: @breadcrumb-active-color;\n }\n}\n","//\n// Pagination (multiple pages)\n// --------------------------------------------------\n.pagination {\n display: inline-block;\n padding-left: 0;\n margin: @line-height-computed 0;\n border-radius: @border-radius-base;\n\n > li {\n display: inline; // Remove list-style and block-level defaults\n > a,\n > span {\n position: relative;\n float: left; // Collapse white-space\n padding: @padding-base-vertical @padding-base-horizontal;\n line-height: @line-height-base;\n text-decoration: none;\n color: @pagination-color;\n background-color: @pagination-bg;\n border: 1px solid @pagination-border;\n margin-left: -1px;\n }\n &:first-child {\n > a,\n > span {\n margin-left: 0;\n .border-left-radius(@border-radius-base);\n }\n }\n &:last-child {\n > a,\n > span {\n .border-right-radius(@border-radius-base);\n }\n }\n }\n\n > li > a,\n > li > span {\n &:hover,\n &:focus {\n z-index: 2;\n color: @pagination-hover-color;\n background-color: @pagination-hover-bg;\n border-color: @pagination-hover-border;\n }\n }\n\n > .active > a,\n > .active > span {\n &,\n &:hover,\n &:focus {\n z-index: 3;\n color: @pagination-active-color;\n background-color: @pagination-active-bg;\n border-color: @pagination-active-border;\n cursor: default;\n }\n }\n\n > .disabled {\n > span,\n > span:hover,\n > span:focus,\n > a,\n > a:hover,\n > a:focus {\n color: @pagination-disabled-color;\n background-color: @pagination-disabled-bg;\n border-color: @pagination-disabled-border;\n cursor: @cursor-disabled;\n }\n }\n}\n\n// Sizing\n// --------------------------------------------------\n\n// Large\n.pagination-lg {\n .pagination-size(@padding-large-vertical; @padding-large-horizontal; @font-size-large; @line-height-large; @border-radius-large);\n}\n\n// Small\n.pagination-sm {\n .pagination-size(@padding-small-vertical; @padding-small-horizontal; @font-size-small; @line-height-small; @border-radius-small);\n}\n","// Pagination\n\n.pagination-size(@padding-vertical; @padding-horizontal; @font-size; @line-height; @border-radius) {\n > li {\n > a,\n > span {\n padding: @padding-vertical @padding-horizontal;\n font-size: @font-size;\n line-height: @line-height;\n }\n &:first-child {\n > a,\n > span {\n .border-left-radius(@border-radius);\n }\n }\n &:last-child {\n > a,\n > span {\n .border-right-radius(@border-radius);\n }\n }\n }\n}\n","//\n// Pager pagination\n// --------------------------------------------------\n\n\n.pager {\n padding-left: 0;\n margin: @line-height-computed 0;\n list-style: none;\n text-align: center;\n &:extend(.clearfix all);\n li {\n display: inline;\n > a,\n > span {\n display: inline-block;\n padding: 5px 14px;\n background-color: @pager-bg;\n border: 1px solid @pager-border;\n border-radius: @pager-border-radius;\n }\n\n > a:hover,\n > a:focus {\n text-decoration: none;\n background-color: @pager-hover-bg;\n }\n }\n\n .next {\n > a,\n > span {\n float: right;\n }\n }\n\n .previous {\n > a,\n > span {\n float: left;\n }\n }\n\n .disabled {\n > a,\n > a:hover,\n > a:focus,\n > span {\n color: @pager-disabled-color;\n background-color: @pager-bg;\n cursor: @cursor-disabled;\n }\n }\n}\n","//\n// Labels\n// --------------------------------------------------\n\n.label {\n display: inline;\n padding: .2em .6em .3em;\n font-size: 75%;\n font-weight: bold;\n line-height: 1;\n color: @label-color;\n text-align: center;\n white-space: nowrap;\n vertical-align: baseline;\n border-radius: .25em;\n\n // Add hover effects, but only for links\n a& {\n &:hover,\n &:focus {\n color: @label-link-hover-color;\n text-decoration: none;\n cursor: pointer;\n }\n }\n\n // Empty labels collapse automatically (not available in IE8)\n &:empty {\n display: none;\n }\n\n // Quick fix for labels in buttons\n .btn & {\n position: relative;\n top: -1px;\n }\n}\n\n// Colors\n// Contextual variations (linked labels get darker on :hover)\n\n.label-default {\n .label-variant(@label-default-bg);\n}\n\n.label-primary {\n .label-variant(@label-primary-bg);\n}\n\n.label-success {\n .label-variant(@label-success-bg);\n}\n\n.label-info {\n .label-variant(@label-info-bg);\n}\n\n.label-warning {\n .label-variant(@label-warning-bg);\n}\n\n.label-danger {\n .label-variant(@label-danger-bg);\n}\n","// Labels\n\n.label-variant(@color) {\n background-color: @color;\n\n &[href] {\n &:hover,\n &:focus {\n background-color: darken(@color, 10%);\n }\n }\n}\n","//\n// Badges\n// --------------------------------------------------\n\n\n// Base class\n.badge {\n display: inline-block;\n min-width: 10px;\n padding: 3px 7px;\n font-size: @font-size-small;\n font-weight: @badge-font-weight;\n color: @badge-color;\n line-height: @badge-line-height;\n vertical-align: middle;\n white-space: nowrap;\n text-align: center;\n background-color: @badge-bg;\n border-radius: @badge-border-radius;\n\n // Empty badges collapse automatically (not available in IE8)\n &:empty {\n display: none;\n }\n\n // Quick fix for badges in buttons\n .btn & {\n position: relative;\n top: -1px;\n }\n\n .btn-xs &,\n .btn-group-xs > .btn & {\n top: 0;\n padding: 1px 5px;\n }\n\n // Hover state, but only for links\n a& {\n &:hover,\n &:focus {\n color: @badge-link-hover-color;\n text-decoration: none;\n cursor: pointer;\n }\n }\n\n // Account for badges in navs\n .list-group-item.active > &,\n .nav-pills > .active > a > & {\n color: @badge-active-color;\n background-color: @badge-active-bg;\n }\n\n .list-group-item > & {\n float: right;\n }\n\n .list-group-item > & + & {\n margin-right: 5px;\n }\n\n .nav-pills > li > a > & {\n margin-left: 3px;\n }\n}\n","//\n// Jumbotron\n// --------------------------------------------------\n\n\n.jumbotron {\n padding-top: @jumbotron-padding;\n padding-bottom: @jumbotron-padding;\n margin-bottom: @jumbotron-padding;\n color: @jumbotron-color;\n background-color: @jumbotron-bg;\n\n h1,\n .h1 {\n color: @jumbotron-heading-color;\n }\n\n p {\n margin-bottom: (@jumbotron-padding / 2);\n font-size: @jumbotron-font-size;\n font-weight: 200;\n }\n\n > hr {\n border-top-color: darken(@jumbotron-bg, 10%);\n }\n\n .container &,\n .container-fluid & {\n border-radius: @border-radius-large; // Only round corners at higher resolutions if contained in a container\n padding-left: (@grid-gutter-width / 2);\n padding-right: (@grid-gutter-width / 2);\n }\n\n .container {\n max-width: 100%;\n }\n\n @media screen and (min-width: @screen-sm-min) {\n padding-top: (@jumbotron-padding * 1.6);\n padding-bottom: (@jumbotron-padding * 1.6);\n\n .container &,\n .container-fluid & {\n padding-left: (@jumbotron-padding * 2);\n padding-right: (@jumbotron-padding * 2);\n }\n\n h1,\n .h1 {\n font-size: @jumbotron-heading-font-size;\n }\n }\n}\n","//\n// Thumbnails\n// --------------------------------------------------\n\n\n// Mixin and adjust the regular image class\n.thumbnail {\n display: block;\n padding: @thumbnail-padding;\n margin-bottom: @line-height-computed;\n line-height: @line-height-base;\n background-color: @thumbnail-bg;\n border: 1px solid @thumbnail-border;\n border-radius: @thumbnail-border-radius;\n .transition(border .2s ease-in-out);\n\n > img,\n a > img {\n &:extend(.img-responsive);\n margin-left: auto;\n margin-right: auto;\n }\n\n // Add a hover state for linked versions only\n a&:hover,\n a&:focus,\n a&.active {\n border-color: @link-color;\n }\n\n // Image captions\n .caption {\n padding: @thumbnail-caption-padding;\n color: @thumbnail-caption-color;\n }\n}\n","//\n// Alerts\n// --------------------------------------------------\n\n\n// Base styles\n// -------------------------\n\n.alert {\n padding: @alert-padding;\n margin-bottom: @line-height-computed;\n border: 1px solid transparent;\n border-radius: @alert-border-radius;\n\n // Headings for larger alerts\n h4 {\n margin-top: 0;\n // Specified for the h4 to prevent conflicts of changing @headings-color\n color: inherit;\n }\n\n // Provide class for links that match alerts\n .alert-link {\n font-weight: @alert-link-font-weight;\n }\n\n // Improve alignment and spacing of inner content\n > p,\n > ul {\n margin-bottom: 0;\n }\n\n > p + p {\n margin-top: 5px;\n }\n}\n\n// Dismissible alerts\n//\n// Expand the right padding and account for the close button's positioning.\n\n.alert-dismissable, // The misspelled .alert-dismissable was deprecated in 3.2.0.\n.alert-dismissible {\n padding-right: (@alert-padding + 20);\n\n // Adjust close link position\n .close {\n position: relative;\n top: -2px;\n right: -21px;\n color: inherit;\n }\n}\n\n// Alternate styles\n//\n// Generate contextual modifier classes for colorizing the alert.\n\n.alert-success {\n .alert-variant(@alert-success-bg; @alert-success-border; @alert-success-text);\n}\n\n.alert-info {\n .alert-variant(@alert-info-bg; @alert-info-border; @alert-info-text);\n}\n\n.alert-warning {\n .alert-variant(@alert-warning-bg; @alert-warning-border; @alert-warning-text);\n}\n\n.alert-danger {\n .alert-variant(@alert-danger-bg; @alert-danger-border; @alert-danger-text);\n}\n","// Alerts\n\n.alert-variant(@background; @border; @text-color) {\n background-color: @background;\n border-color: @border;\n color: @text-color;\n\n hr {\n border-top-color: darken(@border, 5%);\n }\n .alert-link {\n color: darken(@text-color, 10%);\n }\n}\n","//\n// Progress bars\n// --------------------------------------------------\n\n\n// Bar animations\n// -------------------------\n\n// WebKit\n@-webkit-keyframes progress-bar-stripes {\n from { background-position: 40px 0; }\n to { background-position: 0 0; }\n}\n\n// Spec and IE10+\n@keyframes progress-bar-stripes {\n from { background-position: 40px 0; }\n to { background-position: 0 0; }\n}\n\n\n// Bar itself\n// -------------------------\n\n// Outer container\n.progress {\n overflow: hidden;\n height: @line-height-computed;\n margin-bottom: @line-height-computed;\n background-color: @progress-bg;\n border-radius: @progress-border-radius;\n .box-shadow(inset 0 1px 2px rgba(0,0,0,.1));\n}\n\n// Bar of progress\n.progress-bar {\n float: left;\n width: 0%;\n height: 100%;\n font-size: @font-size-small;\n line-height: @line-height-computed;\n color: @progress-bar-color;\n text-align: center;\n background-color: @progress-bar-bg;\n .box-shadow(inset 0 -1px 0 rgba(0,0,0,.15));\n .transition(width .6s ease);\n}\n\n// Striped bars\n//\n// `.progress-striped .progress-bar` is deprecated as of v3.2.0 in favor of the\n// `.progress-bar-striped` class, which you just add to an existing\n// `.progress-bar`.\n.progress-striped .progress-bar,\n.progress-bar-striped {\n #gradient > .striped();\n background-size: 40px 40px;\n}\n\n// Call animation for the active one\n//\n// `.progress.active .progress-bar` is deprecated as of v3.2.0 in favor of the\n// `.progress-bar.active` approach.\n.progress.active .progress-bar,\n.progress-bar.active {\n .animation(progress-bar-stripes 2s linear infinite);\n}\n\n\n// Variations\n// -------------------------\n\n.progress-bar-success {\n .progress-bar-variant(@progress-bar-success-bg);\n}\n\n.progress-bar-info {\n .progress-bar-variant(@progress-bar-info-bg);\n}\n\n.progress-bar-warning {\n .progress-bar-variant(@progress-bar-warning-bg);\n}\n\n.progress-bar-danger {\n .progress-bar-variant(@progress-bar-danger-bg);\n}\n","// Gradients\n\n#gradient {\n\n // Horizontal gradient, from left to right\n //\n // Creates two color stops, start and end, by specifying a color and position for each color stop.\n // Color stops are not available in IE9 and below.\n .horizontal(@start-color: #555; @end-color: #333; @start-percent: 0%; @end-percent: 100%) {\n background-image: -webkit-linear-gradient(left, @start-color @start-percent, @end-color @end-percent); // Safari 5.1-6, Chrome 10+\n background-image: -o-linear-gradient(left, @start-color @start-percent, @end-color @end-percent); // Opera 12\n background-image: linear-gradient(to right, @start-color @start-percent, @end-color @end-percent); // Standard, IE10, Firefox 16+, Opera 12.10+, Safari 7+, Chrome 26+\n background-repeat: repeat-x;\n filter: e(%(\"progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=1)\",argb(@start-color),argb(@end-color))); // IE9 and down\n }\n\n // Vertical gradient, from top to bottom\n //\n // Creates two color stops, start and end, by specifying a color and position for each color stop.\n // Color stops are not available in IE9 and below.\n .vertical(@start-color: #555; @end-color: #333; @start-percent: 0%; @end-percent: 100%) {\n background-image: -webkit-linear-gradient(top, @start-color @start-percent, @end-color @end-percent); // Safari 5.1-6, Chrome 10+\n background-image: -o-linear-gradient(top, @start-color @start-percent, @end-color @end-percent); // Opera 12\n background-image: linear-gradient(to bottom, @start-color @start-percent, @end-color @end-percent); // Standard, IE10, Firefox 16+, Opera 12.10+, Safari 7+, Chrome 26+\n background-repeat: repeat-x;\n filter: e(%(\"progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=0)\",argb(@start-color),argb(@end-color))); // IE9 and down\n }\n\n .directional(@start-color: #555; @end-color: #333; @deg: 45deg) {\n background-repeat: repeat-x;\n background-image: -webkit-linear-gradient(@deg, @start-color, @end-color); // Safari 5.1-6, Chrome 10+\n background-image: -o-linear-gradient(@deg, @start-color, @end-color); // Opera 12\n background-image: linear-gradient(@deg, @start-color, @end-color); // Standard, IE10, Firefox 16+, Opera 12.10+, Safari 7+, Chrome 26+\n }\n .horizontal-three-colors(@start-color: #00b3ee; @mid-color: #7a43b6; @color-stop: 50%; @end-color: #c3325f) {\n background-image: -webkit-linear-gradient(left, @start-color, @mid-color @color-stop, @end-color);\n background-image: -o-linear-gradient(left, @start-color, @mid-color @color-stop, @end-color);\n background-image: linear-gradient(to right, @start-color, @mid-color @color-stop, @end-color);\n background-repeat: no-repeat;\n filter: e(%(\"progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=1)\",argb(@start-color),argb(@end-color))); // IE9 and down, gets no color-stop at all for proper fallback\n }\n .vertical-three-colors(@start-color: #00b3ee; @mid-color: #7a43b6; @color-stop: 50%; @end-color: #c3325f) {\n background-image: -webkit-linear-gradient(@start-color, @mid-color @color-stop, @end-color);\n background-image: -o-linear-gradient(@start-color, @mid-color @color-stop, @end-color);\n background-image: linear-gradient(@start-color, @mid-color @color-stop, @end-color);\n background-repeat: no-repeat;\n filter: e(%(\"progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=0)\",argb(@start-color),argb(@end-color))); // IE9 and down, gets no color-stop at all for proper fallback\n }\n .radial(@inner-color: #555; @outer-color: #333) {\n background-image: -webkit-radial-gradient(circle, @inner-color, @outer-color);\n background-image: radial-gradient(circle, @inner-color, @outer-color);\n background-repeat: no-repeat;\n }\n .striped(@color: rgba(255,255,255,.15); @angle: 45deg) {\n background-image: -webkit-linear-gradient(@angle, @color 25%, transparent 25%, transparent 50%, @color 50%, @color 75%, transparent 75%, transparent);\n background-image: -o-linear-gradient(@angle, @color 25%, transparent 25%, transparent 50%, @color 50%, @color 75%, transparent 75%, transparent);\n background-image: linear-gradient(@angle, @color 25%, transparent 25%, transparent 50%, @color 50%, @color 75%, transparent 75%, transparent);\n }\n}\n","// Progress bars\n\n.progress-bar-variant(@color) {\n background-color: @color;\n\n // Deprecated parent class requirement as of v3.2.0\n .progress-striped & {\n #gradient > .striped();\n }\n}\n",".media {\n // Proper spacing between instances of .media\n margin-top: 15px;\n\n &:first-child {\n margin-top: 0;\n }\n}\n\n.media,\n.media-body {\n zoom: 1;\n overflow: hidden;\n}\n\n.media-body {\n width: 10000px;\n}\n\n.media-object {\n display: block;\n\n // Fix collapse in webkit from max-width: 100% and display: table-cell.\n &.img-thumbnail {\n max-width: none;\n }\n}\n\n.media-right,\n.media > .pull-right {\n padding-left: 10px;\n}\n\n.media-left,\n.media > .pull-left {\n padding-right: 10px;\n}\n\n.media-left,\n.media-right,\n.media-body {\n display: table-cell;\n vertical-align: top;\n}\n\n.media-middle {\n vertical-align: middle;\n}\n\n.media-bottom {\n vertical-align: bottom;\n}\n\n// Reset margins on headings for tighter default spacing\n.media-heading {\n margin-top: 0;\n margin-bottom: 5px;\n}\n\n// Media list variation\n//\n// Undo default ul/ol styles\n.media-list {\n padding-left: 0;\n list-style: none;\n}\n","//\n// List groups\n// --------------------------------------------------\n\n\n// Base class\n//\n// Easily usable on
    • or other required elements. + thead: [ 1, "
      ", "
      " ], + col: [ 2, "", "
      " ], + tr: [ 2, "", "
      " ], + td: [ 3, "", "
      " ], + + _default: [ 0, "", "" ] +}; + +// Support: IE <=9 only +wrapMap.optgroup = wrapMap.option; + +wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead; +wrapMap.th = wrapMap.td; + + +function getAll( context, tag ) { + + // Support: IE <=9 - 11 only + // Use typeof to avoid zero-argument method invocation on host objects (#15151) + var ret; + + if ( typeof context.getElementsByTagName !== "undefined" ) { + ret = context.getElementsByTagName( tag || "*" ); + + } else if ( typeof context.querySelectorAll !== "undefined" ) { + ret = context.querySelectorAll( tag || "*" ); + + } else { + ret = []; + } + + if ( tag === undefined || tag && nodeName( context, tag ) ) { + return jQuery.merge( [ context ], ret ); + } + + return ret; +} + + +// Mark scripts as having already been evaluated +function setGlobalEval( elems, refElements ) { + var i = 0, + l = elems.length; + + for ( ; i < l; i++ ) { + dataPriv.set( + elems[ i ], + "globalEval", + !refElements || dataPriv.get( refElements[ i ], "globalEval" ) + ); + } +} + + +var rhtml = /<|&#?\w+;/; + +function buildFragment( elems, context, scripts, selection, ignored ) { + var elem, tmp, tag, wrap, contains, j, + fragment = context.createDocumentFragment(), + nodes = [], + i = 0, + l = elems.length; + + for ( ; i < l; i++ ) { + elem = elems[ i ]; + + if ( elem || elem === 0 ) { + + // Add nodes directly + if ( jQuery.type( elem ) === "object" ) { + + // Support: Android <=4.0 only, PhantomJS 1 only + // push.apply(_, arraylike) throws on ancient WebKit + jQuery.merge( nodes, elem.nodeType ? [ elem ] : elem ); + + // Convert non-html into a text node + } else if ( !rhtml.test( elem ) ) { + nodes.push( context.createTextNode( elem ) ); + + // Convert html into DOM nodes + } else { + tmp = tmp || fragment.appendChild( context.createElement( "div" ) ); + + // Deserialize a standard representation + tag = ( rtagName.exec( elem ) || [ "", "" ] )[ 1 ].toLowerCase(); + wrap = wrapMap[ tag ] || wrapMap._default; + tmp.innerHTML = wrap[ 1 ] + jQuery.htmlPrefilter( elem ) + wrap[ 2 ]; + + // Descend through wrappers to the right content + j = wrap[ 0 ]; + while ( j-- ) { + tmp = tmp.lastChild; + } + + // Support: Android <=4.0 only, PhantomJS 1 only + // push.apply(_, arraylike) throws on ancient WebKit + jQuery.merge( nodes, tmp.childNodes ); + + // Remember the top-level container + tmp = fragment.firstChild; + + // Ensure the created nodes are orphaned (#12392) + tmp.textContent = ""; + } + } + } + + // Remove wrapper from fragment + fragment.textContent = ""; + + i = 0; + while ( ( elem = nodes[ i++ ] ) ) { + + // Skip elements already in the context collection (trac-4087) + if ( selection && jQuery.inArray( elem, selection ) > -1 ) { + if ( ignored ) { + ignored.push( elem ); + } + continue; + } + + contains = jQuery.contains( elem.ownerDocument, elem ); + + // Append to fragment + tmp = getAll( fragment.appendChild( elem ), "script" ); + + // Preserve script evaluation history + if ( contains ) { + setGlobalEval( tmp ); + } + + // Capture executables + if ( scripts ) { + j = 0; + while ( ( elem = tmp[ j++ ] ) ) { + if ( rscriptType.test( elem.type || "" ) ) { + scripts.push( elem ); + } + } + } + } + + return fragment; +} + + +( function() { + var fragment = document.createDocumentFragment(), + div = fragment.appendChild( document.createElement( "div" ) ), + input = document.createElement( "input" ); + + // Support: Android 4.0 - 4.3 only + // Check state lost if the name is set (#11217) + // Support: Windows Web Apps (WWA) + // `name` and `type` must use .setAttribute for WWA (#14901) + input.setAttribute( "type", "radio" ); + input.setAttribute( "checked", "checked" ); + input.setAttribute( "name", "t" ); + + div.appendChild( input ); + + // Support: Android <=4.1 only + // Older WebKit doesn't clone checked state correctly in fragments + support.checkClone = div.cloneNode( true ).cloneNode( true ).lastChild.checked; + + // Support: IE <=11 only + // Make sure textarea (and checkbox) defaultValue is properly cloned + div.innerHTML = ""; + support.noCloneChecked = !!div.cloneNode( true ).lastChild.defaultValue; +} )(); +var documentElement = document.documentElement; + + + +var + rkeyEvent = /^key/, + rmouseEvent = /^(?:mouse|pointer|contextmenu|drag|drop)|click/, + rtypenamespace = /^([^.]*)(?:\.(.+)|)/; + +function returnTrue() { + return true; +} + +function returnFalse() { + return false; +} + +// Support: IE <=9 only +// See #13393 for more info +function safeActiveElement() { + try { + return document.activeElement; + } catch ( err ) { } +} + +function on( elem, types, selector, data, fn, one ) { + var origFn, type; + + // Types can be a map of types/handlers + if ( typeof types === "object" ) { + + // ( types-Object, selector, data ) + if ( typeof selector !== "string" ) { + + // ( types-Object, data ) + data = data || selector; + selector = undefined; + } + for ( type in types ) { + on( elem, type, selector, data, types[ type ], one ); + } + return elem; + } + + if ( data == null && fn == null ) { + + // ( types, fn ) + fn = selector; + data = selector = undefined; + } else if ( fn == null ) { + if ( typeof selector === "string" ) { + + // ( types, selector, fn ) + fn = data; + data = undefined; + } else { + + // ( types, data, fn ) + fn = data; + data = selector; + selector = undefined; + } + } + if ( fn === false ) { + fn = returnFalse; + } else if ( !fn ) { + return elem; + } + + if ( one === 1 ) { + origFn = fn; + fn = function( event ) { + + // Can use an empty set, since event contains the info + jQuery().off( event ); + return origFn.apply( this, arguments ); + }; + + // Use same guid so caller can remove using origFn + fn.guid = origFn.guid || ( origFn.guid = jQuery.guid++ ); + } + return elem.each( function() { + jQuery.event.add( this, types, fn, data, selector ); + } ); +} + +/* + * Helper functions for managing events -- not part of the public interface. + * Props to Dean Edwards' addEvent library for many of the ideas. + */ +jQuery.event = { + + global: {}, + + add: function( elem, types, handler, data, selector ) { + + var handleObjIn, eventHandle, tmp, + events, t, handleObj, + special, handlers, type, namespaces, origType, + elemData = dataPriv.get( elem ); + + // Don't attach events to noData or text/comment nodes (but allow plain objects) + if ( !elemData ) { + return; + } + + // Caller can pass in an object of custom data in lieu of the handler + if ( handler.handler ) { + handleObjIn = handler; + handler = handleObjIn.handler; + selector = handleObjIn.selector; + } + + // Ensure that invalid selectors throw exceptions at attach time + // Evaluate against documentElement in case elem is a non-element node (e.g., document) + if ( selector ) { + jQuery.find.matchesSelector( documentElement, selector ); + } + + // Make sure that the handler has a unique ID, used to find/remove it later + if ( !handler.guid ) { + handler.guid = jQuery.guid++; + } + + // Init the element's event structure and main handler, if this is the first + if ( !( events = elemData.events ) ) { + events = elemData.events = {}; + } + if ( !( eventHandle = elemData.handle ) ) { + eventHandle = elemData.handle = function( e ) { + + // Discard the second event of a jQuery.event.trigger() and + // when an event is called after a page has unloaded + return typeof jQuery !== "undefined" && jQuery.event.triggered !== e.type ? + jQuery.event.dispatch.apply( elem, arguments ) : undefined; + }; + } + + // Handle multiple events separated by a space + types = ( types || "" ).match( rnothtmlwhite ) || [ "" ]; + t = types.length; + while ( t-- ) { + tmp = rtypenamespace.exec( types[ t ] ) || []; + type = origType = tmp[ 1 ]; + namespaces = ( tmp[ 2 ] || "" ).split( "." ).sort(); + + // There *must* be a type, no attaching namespace-only handlers + if ( !type ) { + continue; + } + + // If event changes its type, use the special event handlers for the changed type + special = jQuery.event.special[ type ] || {}; + + // If selector defined, determine special event api type, otherwise given type + type = ( selector ? special.delegateType : special.bindType ) || type; + + // Update special based on newly reset type + special = jQuery.event.special[ type ] || {}; + + // handleObj is passed to all event handlers + handleObj = jQuery.extend( { + type: type, + origType: origType, + data: data, + handler: handler, + guid: handler.guid, + selector: selector, + needsContext: selector && jQuery.expr.match.needsContext.test( selector ), + namespace: namespaces.join( "." ) + }, handleObjIn ); + + // Init the event handler queue if we're the first + if ( !( handlers = events[ type ] ) ) { + handlers = events[ type ] = []; + handlers.delegateCount = 0; + + // Only use addEventListener if the special events handler returns false + if ( !special.setup || + special.setup.call( elem, data, namespaces, eventHandle ) === false ) { + + if ( elem.addEventListener ) { + elem.addEventListener( type, eventHandle ); + } + } + } + + if ( special.add ) { + special.add.call( elem, handleObj ); + + if ( !handleObj.handler.guid ) { + handleObj.handler.guid = handler.guid; + } + } + + // Add to the element's handler list, delegates in front + if ( selector ) { + handlers.splice( handlers.delegateCount++, 0, handleObj ); + } else { + handlers.push( handleObj ); + } + + // Keep track of which events have ever been used, for event optimization + jQuery.event.global[ type ] = true; + } + + }, + + // Detach an event or set of events from an element + remove: function( elem, types, handler, selector, mappedTypes ) { + + var j, origCount, tmp, + events, t, handleObj, + special, handlers, type, namespaces, origType, + elemData = dataPriv.hasData( elem ) && dataPriv.get( elem ); + + if ( !elemData || !( events = elemData.events ) ) { + return; + } + + // Once for each type.namespace in types; type may be omitted + types = ( types || "" ).match( rnothtmlwhite ) || [ "" ]; + t = types.length; + while ( t-- ) { + tmp = rtypenamespace.exec( types[ t ] ) || []; + type = origType = tmp[ 1 ]; + namespaces = ( tmp[ 2 ] || "" ).split( "." ).sort(); + + // Unbind all events (on this namespace, if provided) for the element + if ( !type ) { + for ( type in events ) { + jQuery.event.remove( elem, type + types[ t ], handler, selector, true ); + } + continue; + } + + special = jQuery.event.special[ type ] || {}; + type = ( selector ? special.delegateType : special.bindType ) || type; + handlers = events[ type ] || []; + tmp = tmp[ 2 ] && + new RegExp( "(^|\\.)" + namespaces.join( "\\.(?:.*\\.|)" ) + "(\\.|$)" ); + + // Remove matching events + origCount = j = handlers.length; + while ( j-- ) { + handleObj = handlers[ j ]; + + if ( ( mappedTypes || origType === handleObj.origType ) && + ( !handler || handler.guid === handleObj.guid ) && + ( !tmp || tmp.test( handleObj.namespace ) ) && + ( !selector || selector === handleObj.selector || + selector === "**" && handleObj.selector ) ) { + handlers.splice( j, 1 ); + + if ( handleObj.selector ) { + handlers.delegateCount--; + } + if ( special.remove ) { + special.remove.call( elem, handleObj ); + } + } + } + + // Remove generic event handler if we removed something and no more handlers exist + // (avoids potential for endless recursion during removal of special event handlers) + if ( origCount && !handlers.length ) { + if ( !special.teardown || + special.teardown.call( elem, namespaces, elemData.handle ) === false ) { + + jQuery.removeEvent( elem, type, elemData.handle ); + } + + delete events[ type ]; + } + } + + // Remove data and the expando if it's no longer used + if ( jQuery.isEmptyObject( events ) ) { + dataPriv.remove( elem, "handle events" ); + } + }, + + dispatch: function( nativeEvent ) { + + // Make a writable jQuery.Event from the native event object + var event = jQuery.event.fix( nativeEvent ); + + var i, j, ret, matched, handleObj, handlerQueue, + args = new Array( arguments.length ), + handlers = ( dataPriv.get( this, "events" ) || {} )[ event.type ] || [], + special = jQuery.event.special[ event.type ] || {}; + + // Use the fix-ed jQuery.Event rather than the (read-only) native event + args[ 0 ] = event; + + for ( i = 1; i < arguments.length; i++ ) { + args[ i ] = arguments[ i ]; + } + + event.delegateTarget = this; + + // Call the preDispatch hook for the mapped type, and let it bail if desired + if ( special.preDispatch && special.preDispatch.call( this, event ) === false ) { + return; + } + + // Determine handlers + handlerQueue = jQuery.event.handlers.call( this, event, handlers ); + + // Run delegates first; they may want to stop propagation beneath us + i = 0; + while ( ( matched = handlerQueue[ i++ ] ) && !event.isPropagationStopped() ) { + event.currentTarget = matched.elem; + + j = 0; + while ( ( handleObj = matched.handlers[ j++ ] ) && + !event.isImmediatePropagationStopped() ) { + + // Triggered event must either 1) have no namespace, or 2) have namespace(s) + // a subset or equal to those in the bound event (both can have no namespace). + if ( !event.rnamespace || event.rnamespace.test( handleObj.namespace ) ) { + + event.handleObj = handleObj; + event.data = handleObj.data; + + ret = ( ( jQuery.event.special[ handleObj.origType ] || {} ).handle || + handleObj.handler ).apply( matched.elem, args ); + + if ( ret !== undefined ) { + if ( ( event.result = ret ) === false ) { + event.preventDefault(); + event.stopPropagation(); + } + } + } + } + } + + // Call the postDispatch hook for the mapped type + if ( special.postDispatch ) { + special.postDispatch.call( this, event ); + } + + return event.result; + }, + + handlers: function( event, handlers ) { + var i, handleObj, sel, matchedHandlers, matchedSelectors, + handlerQueue = [], + delegateCount = handlers.delegateCount, + cur = event.target; + + // Find delegate handlers + if ( delegateCount && + + // Support: IE <=9 + // Black-hole SVG instance trees (trac-13180) + cur.nodeType && + + // Support: Firefox <=42 + // Suppress spec-violating clicks indicating a non-primary pointer button (trac-3861) + // https://www.w3.org/TR/DOM-Level-3-Events/#event-type-click + // Support: IE 11 only + // ...but not arrow key "clicks" of radio inputs, which can have `button` -1 (gh-2343) + !( event.type === "click" && event.button >= 1 ) ) { + + for ( ; cur !== this; cur = cur.parentNode || this ) { + + // Don't check non-elements (#13208) + // Don't process clicks on disabled elements (#6911, #8165, #11382, #11764) + if ( cur.nodeType === 1 && !( event.type === "click" && cur.disabled === true ) ) { + matchedHandlers = []; + matchedSelectors = {}; + for ( i = 0; i < delegateCount; i++ ) { + handleObj = handlers[ i ]; + + // Don't conflict with Object.prototype properties (#13203) + sel = handleObj.selector + " "; + + if ( matchedSelectors[ sel ] === undefined ) { + matchedSelectors[ sel ] = handleObj.needsContext ? + jQuery( sel, this ).index( cur ) > -1 : + jQuery.find( sel, this, null, [ cur ] ).length; + } + if ( matchedSelectors[ sel ] ) { + matchedHandlers.push( handleObj ); + } + } + if ( matchedHandlers.length ) { + handlerQueue.push( { elem: cur, handlers: matchedHandlers } ); + } + } + } + } + + // Add the remaining (directly-bound) handlers + cur = this; + if ( delegateCount < handlers.length ) { + handlerQueue.push( { elem: cur, handlers: handlers.slice( delegateCount ) } ); + } + + return handlerQueue; + }, + + addProp: function( name, hook ) { + Object.defineProperty( jQuery.Event.prototype, name, { + enumerable: true, + configurable: true, + + get: jQuery.isFunction( hook ) ? + function() { + if ( this.originalEvent ) { + return hook( this.originalEvent ); + } + } : + function() { + if ( this.originalEvent ) { + return this.originalEvent[ name ]; + } + }, + + set: function( value ) { + Object.defineProperty( this, name, { + enumerable: true, + configurable: true, + writable: true, + value: value + } ); + } + } ); + }, + + fix: function( originalEvent ) { + return originalEvent[ jQuery.expando ] ? + originalEvent : + new jQuery.Event( originalEvent ); + }, + + special: { + load: { + + // Prevent triggered image.load events from bubbling to window.load + noBubble: true + }, + focus: { + + // Fire native event if possible so blur/focus sequence is correct + trigger: function() { + if ( this !== safeActiveElement() && this.focus ) { + this.focus(); + return false; + } + }, + delegateType: "focusin" + }, + blur: { + trigger: function() { + if ( this === safeActiveElement() && this.blur ) { + this.blur(); + return false; + } + }, + delegateType: "focusout" + }, + click: { + + // For checkbox, fire native event so checked state will be right + trigger: function() { + if ( this.type === "checkbox" && this.click && nodeName( this, "input" ) ) { + this.click(); + return false; + } + }, + + // For cross-browser consistency, don't fire native .click() on links + _default: function( event ) { + return nodeName( event.target, "a" ); + } + }, + + beforeunload: { + postDispatch: function( event ) { + + // Support: Firefox 20+ + // Firefox doesn't alert if the returnValue field is not set. + if ( event.result !== undefined && event.originalEvent ) { + event.originalEvent.returnValue = event.result; + } + } + } + } +}; + +jQuery.removeEvent = function( elem, type, handle ) { + + // This "if" is needed for plain objects + if ( elem.removeEventListener ) { + elem.removeEventListener( type, handle ); + } +}; + +jQuery.Event = function( src, props ) { + + // Allow instantiation without the 'new' keyword + if ( !( this instanceof jQuery.Event ) ) { + return new jQuery.Event( src, props ); + } + + // Event object + if ( src && src.type ) { + this.originalEvent = src; + this.type = src.type; + + // Events bubbling up the document may have been marked as prevented + // by a handler lower down the tree; reflect the correct value. + this.isDefaultPrevented = src.defaultPrevented || + src.defaultPrevented === undefined && + + // Support: Android <=2.3 only + src.returnValue === false ? + returnTrue : + returnFalse; + + // Create target properties + // Support: Safari <=6 - 7 only + // Target should not be a text node (#504, #13143) + this.target = ( src.target && src.target.nodeType === 3 ) ? + src.target.parentNode : + src.target; + + this.currentTarget = src.currentTarget; + this.relatedTarget = src.relatedTarget; + + // Event type + } else { + this.type = src; + } + + // Put explicitly provided properties onto the event object + if ( props ) { + jQuery.extend( this, props ); + } + + // Create a timestamp if incoming event doesn't have one + this.timeStamp = src && src.timeStamp || jQuery.now(); + + // Mark it as fixed + this[ jQuery.expando ] = true; +}; + +// jQuery.Event is based on DOM3 Events as specified by the ECMAScript Language Binding +// https://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html +jQuery.Event.prototype = { + constructor: jQuery.Event, + isDefaultPrevented: returnFalse, + isPropagationStopped: returnFalse, + isImmediatePropagationStopped: returnFalse, + isSimulated: false, + + preventDefault: function() { + var e = this.originalEvent; + + this.isDefaultPrevented = returnTrue; + + if ( e && !this.isSimulated ) { + e.preventDefault(); + } + }, + stopPropagation: function() { + var e = this.originalEvent; + + this.isPropagationStopped = returnTrue; + + if ( e && !this.isSimulated ) { + e.stopPropagation(); + } + }, + stopImmediatePropagation: function() { + var e = this.originalEvent; + + this.isImmediatePropagationStopped = returnTrue; + + if ( e && !this.isSimulated ) { + e.stopImmediatePropagation(); + } + + this.stopPropagation(); + } +}; + +// Includes all common event props including KeyEvent and MouseEvent specific props +jQuery.each( { + altKey: true, + bubbles: true, + cancelable: true, + changedTouches: true, + ctrlKey: true, + detail: true, + eventPhase: true, + metaKey: true, + pageX: true, + pageY: true, + shiftKey: true, + view: true, + "char": true, + charCode: true, + key: true, + keyCode: true, + button: true, + buttons: true, + clientX: true, + clientY: true, + offsetX: true, + offsetY: true, + pointerId: true, + pointerType: true, + screenX: true, + screenY: true, + targetTouches: true, + toElement: true, + touches: true, + + which: function( event ) { + var button = event.button; + + // Add which for key events + if ( event.which == null && rkeyEvent.test( event.type ) ) { + return event.charCode != null ? event.charCode : event.keyCode; + } + + // Add which for click: 1 === left; 2 === middle; 3 === right + if ( !event.which && button !== undefined && rmouseEvent.test( event.type ) ) { + if ( button & 1 ) { + return 1; + } + + if ( button & 2 ) { + return 3; + } + + if ( button & 4 ) { + return 2; + } + + return 0; + } + + return event.which; + } +}, jQuery.event.addProp ); + +// Create mouseenter/leave events using mouseover/out and event-time checks +// so that event delegation works in jQuery. +// Do the same for pointerenter/pointerleave and pointerover/pointerout +// +// Support: Safari 7 only +// Safari sends mouseenter too often; see: +// https://bugs.chromium.org/p/chromium/issues/detail?id=470258 +// for the description of the bug (it existed in older Chrome versions as well). +jQuery.each( { + mouseenter: "mouseover", + mouseleave: "mouseout", + pointerenter: "pointerover", + pointerleave: "pointerout" +}, function( orig, fix ) { + jQuery.event.special[ orig ] = { + delegateType: fix, + bindType: fix, + + handle: function( event ) { + var ret, + target = this, + related = event.relatedTarget, + handleObj = event.handleObj; + + // For mouseenter/leave call the handler if related is outside the target. + // NB: No relatedTarget if the mouse left/entered the browser window + if ( !related || ( related !== target && !jQuery.contains( target, related ) ) ) { + event.type = handleObj.origType; + ret = handleObj.handler.apply( this, arguments ); + event.type = fix; + } + return ret; + } + }; +} ); + +jQuery.fn.extend( { + + on: function( types, selector, data, fn ) { + return on( this, types, selector, data, fn ); + }, + one: function( types, selector, data, fn ) { + return on( this, types, selector, data, fn, 1 ); + }, + off: function( types, selector, fn ) { + var handleObj, type; + if ( types && types.preventDefault && types.handleObj ) { + + // ( event ) dispatched jQuery.Event + handleObj = types.handleObj; + jQuery( types.delegateTarget ).off( + handleObj.namespace ? + handleObj.origType + "." + handleObj.namespace : + handleObj.origType, + handleObj.selector, + handleObj.handler + ); + return this; + } + if ( typeof types === "object" ) { + + // ( types-object [, selector] ) + for ( type in types ) { + this.off( type, selector, types[ type ] ); + } + return this; + } + if ( selector === false || typeof selector === "function" ) { + + // ( types [, fn] ) + fn = selector; + selector = undefined; + } + if ( fn === false ) { + fn = returnFalse; + } + return this.each( function() { + jQuery.event.remove( this, types, fn, selector ); + } ); + } +} ); + + +var + + /* eslint-disable max-len */ + + // See https://github.com/eslint/eslint/issues/3229 + rxhtmlTag = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([a-z][^\/\0>\x20\t\r\n\f]*)[^>]*)\/>/gi, + + /* eslint-enable */ + + // Support: IE <=10 - 11, Edge 12 - 13 + // In IE/Edge using regex groups here causes severe slowdowns. + // See https://connect.microsoft.com/IE/feedback/details/1736512/ + rnoInnerhtml = /\s*$/g; + +// Prefer a tbody over its parent table for containing new rows +function manipulationTarget( elem, content ) { + if ( nodeName( elem, "table" ) && + nodeName( content.nodeType !== 11 ? content : content.firstChild, "tr" ) ) { + + return jQuery( ">tbody", elem )[ 0 ] || elem; + } + + return elem; +} + +// Replace/restore the type attribute of script elements for safe DOM manipulation +function disableScript( elem ) { + elem.type = ( elem.getAttribute( "type" ) !== null ) + "/" + elem.type; + return elem; +} +function restoreScript( elem ) { + var match = rscriptTypeMasked.exec( elem.type ); + + if ( match ) { + elem.type = match[ 1 ]; + } else { + elem.removeAttribute( "type" ); + } + + return elem; +} + +function cloneCopyEvent( src, dest ) { + var i, l, type, pdataOld, pdataCur, udataOld, udataCur, events; + + if ( dest.nodeType !== 1 ) { + return; + } + + // 1. Copy private data: events, handlers, etc. + if ( dataPriv.hasData( src ) ) { + pdataOld = dataPriv.access( src ); + pdataCur = dataPriv.set( dest, pdataOld ); + events = pdataOld.events; + + if ( events ) { + delete pdataCur.handle; + pdataCur.events = {}; + + for ( type in events ) { + for ( i = 0, l = events[ type ].length; i < l; i++ ) { + jQuery.event.add( dest, type, events[ type ][ i ] ); + } + } + } + } + + // 2. Copy user data + if ( dataUser.hasData( src ) ) { + udataOld = dataUser.access( src ); + udataCur = jQuery.extend( {}, udataOld ); + + dataUser.set( dest, udataCur ); + } +} + +// Fix IE bugs, see support tests +function fixInput( src, dest ) { + var nodeName = dest.nodeName.toLowerCase(); + + // Fails to persist the checked state of a cloned checkbox or radio button. + if ( nodeName === "input" && rcheckableType.test( src.type ) ) { + dest.checked = src.checked; + + // Fails to return the selected option to the default selected state when cloning options + } else if ( nodeName === "input" || nodeName === "textarea" ) { + dest.defaultValue = src.defaultValue; + } +} + +function domManip( collection, args, callback, ignored ) { + + // Flatten any nested arrays + args = concat.apply( [], args ); + + var fragment, first, scripts, hasScripts, node, doc, + i = 0, + l = collection.length, + iNoClone = l - 1, + value = args[ 0 ], + isFunction = jQuery.isFunction( value ); + + // We can't cloneNode fragments that contain checked, in WebKit + if ( isFunction || + ( l > 1 && typeof value === "string" && + !support.checkClone && rchecked.test( value ) ) ) { + return collection.each( function( index ) { + var self = collection.eq( index ); + if ( isFunction ) { + args[ 0 ] = value.call( this, index, self.html() ); + } + domManip( self, args, callback, ignored ); + } ); + } + + if ( l ) { + fragment = buildFragment( args, collection[ 0 ].ownerDocument, false, collection, ignored ); + first = fragment.firstChild; + + if ( fragment.childNodes.length === 1 ) { + fragment = first; + } + + // Require either new content or an interest in ignored elements to invoke the callback + if ( first || ignored ) { + scripts = jQuery.map( getAll( fragment, "script" ), disableScript ); + hasScripts = scripts.length; + + // Use the original fragment for the last item + // instead of the first because it can end up + // being emptied incorrectly in certain situations (#8070). + for ( ; i < l; i++ ) { + node = fragment; + + if ( i !== iNoClone ) { + node = jQuery.clone( node, true, true ); + + // Keep references to cloned scripts for later restoration + if ( hasScripts ) { + + // Support: Android <=4.0 only, PhantomJS 1 only + // push.apply(_, arraylike) throws on ancient WebKit + jQuery.merge( scripts, getAll( node, "script" ) ); + } + } + + callback.call( collection[ i ], node, i ); + } + + if ( hasScripts ) { + doc = scripts[ scripts.length - 1 ].ownerDocument; + + // Reenable scripts + jQuery.map( scripts, restoreScript ); + + // Evaluate executable scripts on first document insertion + for ( i = 0; i < hasScripts; i++ ) { + node = scripts[ i ]; + if ( rscriptType.test( node.type || "" ) && + !dataPriv.access( node, "globalEval" ) && + jQuery.contains( doc, node ) ) { + + if ( node.src ) { + + // Optional AJAX dependency, but won't run scripts if not present + if ( jQuery._evalUrl ) { + jQuery._evalUrl( node.src ); + } + } else { + DOMEval( node.textContent.replace( rcleanScript, "" ), doc ); + } + } + } + } + } + } + + return collection; +} + +function remove( elem, selector, keepData ) { + var node, + nodes = selector ? jQuery.filter( selector, elem ) : elem, + i = 0; + + for ( ; ( node = nodes[ i ] ) != null; i++ ) { + if ( !keepData && node.nodeType === 1 ) { + jQuery.cleanData( getAll( node ) ); + } + + if ( node.parentNode ) { + if ( keepData && jQuery.contains( node.ownerDocument, node ) ) { + setGlobalEval( getAll( node, "script" ) ); + } + node.parentNode.removeChild( node ); + } + } + + return elem; +} + +jQuery.extend( { + htmlPrefilter: function( html ) { + return html.replace( rxhtmlTag, "<$1>" ); + }, + + clone: function( elem, dataAndEvents, deepDataAndEvents ) { + var i, l, srcElements, destElements, + clone = elem.cloneNode( true ), + inPage = jQuery.contains( elem.ownerDocument, elem ); + + // Fix IE cloning issues + if ( !support.noCloneChecked && ( elem.nodeType === 1 || elem.nodeType === 11 ) && + !jQuery.isXMLDoc( elem ) ) { + + // We eschew Sizzle here for performance reasons: https://jsperf.com/getall-vs-sizzle/2 + destElements = getAll( clone ); + srcElements = getAll( elem ); + + for ( i = 0, l = srcElements.length; i < l; i++ ) { + fixInput( srcElements[ i ], destElements[ i ] ); + } + } + + // Copy the events from the original to the clone + if ( dataAndEvents ) { + if ( deepDataAndEvents ) { + srcElements = srcElements || getAll( elem ); + destElements = destElements || getAll( clone ); + + for ( i = 0, l = srcElements.length; i < l; i++ ) { + cloneCopyEvent( srcElements[ i ], destElements[ i ] ); + } + } else { + cloneCopyEvent( elem, clone ); + } + } + + // Preserve script evaluation history + destElements = getAll( clone, "script" ); + if ( destElements.length > 0 ) { + setGlobalEval( destElements, !inPage && getAll( elem, "script" ) ); + } + + // Return the cloned set + return clone; + }, + + cleanData: function( elems ) { + var data, elem, type, + special = jQuery.event.special, + i = 0; + + for ( ; ( elem = elems[ i ] ) !== undefined; i++ ) { + if ( acceptData( elem ) ) { + if ( ( data = elem[ dataPriv.expando ] ) ) { + if ( data.events ) { + for ( type in data.events ) { + if ( special[ type ] ) { + jQuery.event.remove( elem, type ); + + // This is a shortcut to avoid jQuery.event.remove's overhead + } else { + jQuery.removeEvent( elem, type, data.handle ); + } + } + } + + // Support: Chrome <=35 - 45+ + // Assign undefined instead of using delete, see Data#remove + elem[ dataPriv.expando ] = undefined; + } + if ( elem[ dataUser.expando ] ) { + + // Support: Chrome <=35 - 45+ + // Assign undefined instead of using delete, see Data#remove + elem[ dataUser.expando ] = undefined; + } + } + } + } +} ); + +jQuery.fn.extend( { + detach: function( selector ) { + return remove( this, selector, true ); + }, + + remove: function( selector ) { + return remove( this, selector ); + }, + + text: function( value ) { + return access( this, function( value ) { + return value === undefined ? + jQuery.text( this ) : + this.empty().each( function() { + if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) { + this.textContent = value; + } + } ); + }, null, value, arguments.length ); + }, + + append: function() { + return domManip( this, arguments, function( elem ) { + if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) { + var target = manipulationTarget( this, elem ); + target.appendChild( elem ); + } + } ); + }, + + prepend: function() { + return domManip( this, arguments, function( elem ) { + if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) { + var target = manipulationTarget( this, elem ); + target.insertBefore( elem, target.firstChild ); + } + } ); + }, + + before: function() { + return domManip( this, arguments, function( elem ) { + if ( this.parentNode ) { + this.parentNode.insertBefore( elem, this ); + } + } ); + }, + + after: function() { + return domManip( this, arguments, function( elem ) { + if ( this.parentNode ) { + this.parentNode.insertBefore( elem, this.nextSibling ); + } + } ); + }, + + empty: function() { + var elem, + i = 0; + + for ( ; ( elem = this[ i ] ) != null; i++ ) { + if ( elem.nodeType === 1 ) { + + // Prevent memory leaks + jQuery.cleanData( getAll( elem, false ) ); + + // Remove any remaining nodes + elem.textContent = ""; + } + } + + return this; + }, + + clone: function( dataAndEvents, deepDataAndEvents ) { + dataAndEvents = dataAndEvents == null ? false : dataAndEvents; + deepDataAndEvents = deepDataAndEvents == null ? dataAndEvents : deepDataAndEvents; + + return this.map( function() { + return jQuery.clone( this, dataAndEvents, deepDataAndEvents ); + } ); + }, + + html: function( value ) { + return access( this, function( value ) { + var elem = this[ 0 ] || {}, + i = 0, + l = this.length; + + if ( value === undefined && elem.nodeType === 1 ) { + return elem.innerHTML; + } + + // See if we can take a shortcut and just use innerHTML + if ( typeof value === "string" && !rnoInnerhtml.test( value ) && + !wrapMap[ ( rtagName.exec( value ) || [ "", "" ] )[ 1 ].toLowerCase() ] ) { + + value = jQuery.htmlPrefilter( value ); + + try { + for ( ; i < l; i++ ) { + elem = this[ i ] || {}; + + // Remove element nodes and prevent memory leaks + if ( elem.nodeType === 1 ) { + jQuery.cleanData( getAll( elem, false ) ); + elem.innerHTML = value; + } + } + + elem = 0; + + // If using innerHTML throws an exception, use the fallback method + } catch ( e ) {} + } + + if ( elem ) { + this.empty().append( value ); + } + }, null, value, arguments.length ); + }, + + replaceWith: function() { + var ignored = []; + + // Make the changes, replacing each non-ignored context element with the new content + return domManip( this, arguments, function( elem ) { + var parent = this.parentNode; + + if ( jQuery.inArray( this, ignored ) < 0 ) { + jQuery.cleanData( getAll( this ) ); + if ( parent ) { + parent.replaceChild( elem, this ); + } + } + + // Force callback invocation + }, ignored ); + } +} ); + +jQuery.each( { + appendTo: "append", + prependTo: "prepend", + insertBefore: "before", + insertAfter: "after", + replaceAll: "replaceWith" +}, function( name, original ) { + jQuery.fn[ name ] = function( selector ) { + var elems, + ret = [], + insert = jQuery( selector ), + last = insert.length - 1, + i = 0; + + for ( ; i <= last; i++ ) { + elems = i === last ? this : this.clone( true ); + jQuery( insert[ i ] )[ original ]( elems ); + + // Support: Android <=4.0 only, PhantomJS 1 only + // .get() because push.apply(_, arraylike) throws on ancient WebKit + push.apply( ret, elems.get() ); + } + + return this.pushStack( ret ); + }; +} ); +var rmargin = ( /^margin/ ); + +var rnumnonpx = new RegExp( "^(" + pnum + ")(?!px)[a-z%]+$", "i" ); + +var getStyles = function( elem ) { + + // Support: IE <=11 only, Firefox <=30 (#15098, #14150) + // IE throws on elements created in popups + // FF meanwhile throws on frame elements through "defaultView.getComputedStyle" + var view = elem.ownerDocument.defaultView; + + if ( !view || !view.opener ) { + view = window; + } + + return view.getComputedStyle( elem ); + }; + + + +( function() { + + // Executing both pixelPosition & boxSizingReliable tests require only one layout + // so they're executed at the same time to save the second computation. + function computeStyleTests() { + + // This is a singleton, we need to execute it only once + if ( !div ) { + return; + } + + div.style.cssText = + "box-sizing:border-box;" + + "position:relative;display:block;" + + "margin:auto;border:1px;padding:1px;" + + "top:1%;width:50%"; + div.innerHTML = ""; + documentElement.appendChild( container ); + + var divStyle = window.getComputedStyle( div ); + pixelPositionVal = divStyle.top !== "1%"; + + // Support: Android 4.0 - 4.3 only, Firefox <=3 - 44 + reliableMarginLeftVal = divStyle.marginLeft === "2px"; + boxSizingReliableVal = divStyle.width === "4px"; + + // Support: Android 4.0 - 4.3 only + // Some styles come back with percentage values, even though they shouldn't + div.style.marginRight = "50%"; + pixelMarginRightVal = divStyle.marginRight === "4px"; + + documentElement.removeChild( container ); + + // Nullify the div so it wouldn't be stored in the memory and + // it will also be a sign that checks already performed + div = null; + } + + var pixelPositionVal, boxSizingReliableVal, pixelMarginRightVal, reliableMarginLeftVal, + container = document.createElement( "div" ), + div = document.createElement( "div" ); + + // Finish early in limited (non-browser) environments + if ( !div.style ) { + return; + } + + // Support: IE <=9 - 11 only + // Style of cloned element affects source element cloned (#8908) + div.style.backgroundClip = "content-box"; + div.cloneNode( true ).style.backgroundClip = ""; + support.clearCloneStyle = div.style.backgroundClip === "content-box"; + + container.style.cssText = "border:0;width:8px;height:0;top:0;left:-9999px;" + + "padding:0;margin-top:1px;position:absolute"; + container.appendChild( div ); + + jQuery.extend( support, { + pixelPosition: function() { + computeStyleTests(); + return pixelPositionVal; + }, + boxSizingReliable: function() { + computeStyleTests(); + return boxSizingReliableVal; + }, + pixelMarginRight: function() { + computeStyleTests(); + return pixelMarginRightVal; + }, + reliableMarginLeft: function() { + computeStyleTests(); + return reliableMarginLeftVal; + } + } ); +} )(); + + +function curCSS( elem, name, computed ) { + var width, minWidth, maxWidth, ret, + + // Support: Firefox 51+ + // Retrieving style before computed somehow + // fixes an issue with getting wrong values + // on detached elements + style = elem.style; + + computed = computed || getStyles( elem ); + + // getPropertyValue is needed for: + // .css('filter') (IE 9 only, #12537) + // .css('--customProperty) (#3144) + if ( computed ) { + ret = computed.getPropertyValue( name ) || computed[ name ]; + + if ( ret === "" && !jQuery.contains( elem.ownerDocument, elem ) ) { + ret = jQuery.style( elem, name ); + } + + // A tribute to the "awesome hack by Dean Edwards" + // Android Browser returns percentage for some values, + // but width seems to be reliably pixels. + // This is against the CSSOM draft spec: + // https://drafts.csswg.org/cssom/#resolved-values + if ( !support.pixelMarginRight() && rnumnonpx.test( ret ) && rmargin.test( name ) ) { + + // Remember the original values + width = style.width; + minWidth = style.minWidth; + maxWidth = style.maxWidth; + + // Put in the new values to get a computed value out + style.minWidth = style.maxWidth = style.width = ret; + ret = computed.width; + + // Revert the changed values + style.width = width; + style.minWidth = minWidth; + style.maxWidth = maxWidth; + } + } + + return ret !== undefined ? + + // Support: IE <=9 - 11 only + // IE returns zIndex value as an integer. + ret + "" : + ret; +} + + +function addGetHookIf( conditionFn, hookFn ) { + + // Define the hook, we'll check on the first run if it's really needed. + return { + get: function() { + if ( conditionFn() ) { + + // Hook not needed (or it's not possible to use it due + // to missing dependency), remove it. + delete this.get; + return; + } + + // Hook needed; redefine it so that the support test is not executed again. + return ( this.get = hookFn ).apply( this, arguments ); + } + }; +} + + +var + + // Swappable if display is none or starts with table + // except "table", "table-cell", or "table-caption" + // See here for display values: https://developer.mozilla.org/en-US/docs/CSS/display + rdisplayswap = /^(none|table(?!-c[ea]).+)/, + rcustomProp = /^--/, + cssShow = { position: "absolute", visibility: "hidden", display: "block" }, + cssNormalTransform = { + letterSpacing: "0", + fontWeight: "400" + }, + + cssPrefixes = [ "Webkit", "Moz", "ms" ], + emptyStyle = document.createElement( "div" ).style; + +// Return a css property mapped to a potentially vendor prefixed property +function vendorPropName( name ) { + + // Shortcut for names that are not vendor prefixed + if ( name in emptyStyle ) { + return name; + } + + // Check for vendor prefixed names + var capName = name[ 0 ].toUpperCase() + name.slice( 1 ), + i = cssPrefixes.length; + + while ( i-- ) { + name = cssPrefixes[ i ] + capName; + if ( name in emptyStyle ) { + return name; + } + } +} + +// Return a property mapped along what jQuery.cssProps suggests or to +// a vendor prefixed property. +function finalPropName( name ) { + var ret = jQuery.cssProps[ name ]; + if ( !ret ) { + ret = jQuery.cssProps[ name ] = vendorPropName( name ) || name; + } + return ret; +} + +function setPositiveNumber( elem, value, subtract ) { + + // Any relative (+/-) values have already been + // normalized at this point + var matches = rcssNum.exec( value ); + return matches ? + + // Guard against undefined "subtract", e.g., when used as in cssHooks + Math.max( 0, matches[ 2 ] - ( subtract || 0 ) ) + ( matches[ 3 ] || "px" ) : + value; +} + +function augmentWidthOrHeight( elem, name, extra, isBorderBox, styles ) { + var i, + val = 0; + + // If we already have the right measurement, avoid augmentation + if ( extra === ( isBorderBox ? "border" : "content" ) ) { + i = 4; + + // Otherwise initialize for horizontal or vertical properties + } else { + i = name === "width" ? 1 : 0; + } + + for ( ; i < 4; i += 2 ) { + + // Both box models exclude margin, so add it if we want it + if ( extra === "margin" ) { + val += jQuery.css( elem, extra + cssExpand[ i ], true, styles ); + } + + if ( isBorderBox ) { + + // border-box includes padding, so remove it if we want content + if ( extra === "content" ) { + val -= jQuery.css( elem, "padding" + cssExpand[ i ], true, styles ); + } + + // At this point, extra isn't border nor margin, so remove border + if ( extra !== "margin" ) { + val -= jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles ); + } + } else { + + // At this point, extra isn't content, so add padding + val += jQuery.css( elem, "padding" + cssExpand[ i ], true, styles ); + + // At this point, extra isn't content nor padding, so add border + if ( extra !== "padding" ) { + val += jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles ); + } + } + } + + return val; +} + +function getWidthOrHeight( elem, name, extra ) { + + // Start with computed style + var valueIsBorderBox, + styles = getStyles( elem ), + val = curCSS( elem, name, styles ), + isBorderBox = jQuery.css( elem, "boxSizing", false, styles ) === "border-box"; + + // Computed unit is not pixels. Stop here and return. + if ( rnumnonpx.test( val ) ) { + return val; + } + + // Check for style in case a browser which returns unreliable values + // for getComputedStyle silently falls back to the reliable elem.style + valueIsBorderBox = isBorderBox && + ( support.boxSizingReliable() || val === elem.style[ name ] ); + + // Fall back to offsetWidth/Height when value is "auto" + // This happens for inline elements with no explicit setting (gh-3571) + if ( val === "auto" ) { + val = elem[ "offset" + name[ 0 ].toUpperCase() + name.slice( 1 ) ]; + } + + // Normalize "", auto, and prepare for extra + val = parseFloat( val ) || 0; + + // Use the active box-sizing model to add/subtract irrelevant styles + return ( val + + augmentWidthOrHeight( + elem, + name, + extra || ( isBorderBox ? "border" : "content" ), + valueIsBorderBox, + styles + ) + ) + "px"; +} + +jQuery.extend( { + + // Add in style property hooks for overriding the default + // behavior of getting and setting a style property + cssHooks: { + opacity: { + get: function( elem, computed ) { + if ( computed ) { + + // We should always get a number back from opacity + var ret = curCSS( elem, "opacity" ); + return ret === "" ? "1" : ret; + } + } + } + }, + + // Don't automatically add "px" to these possibly-unitless properties + cssNumber: { + "animationIterationCount": true, + "columnCount": true, + "fillOpacity": true, + "flexGrow": true, + "flexShrink": true, + "fontWeight": true, + "lineHeight": true, + "opacity": true, + "order": true, + "orphans": true, + "widows": true, + "zIndex": true, + "zoom": true + }, + + // Add in properties whose names you wish to fix before + // setting or getting the value + cssProps: { + "float": "cssFloat" + }, + + // Get and set the style property on a DOM Node + style: function( elem, name, value, extra ) { + + // Don't set styles on text and comment nodes + if ( !elem || elem.nodeType === 3 || elem.nodeType === 8 || !elem.style ) { + return; + } + + // Make sure that we're working with the right name + var ret, type, hooks, + origName = jQuery.camelCase( name ), + isCustomProp = rcustomProp.test( name ), + style = elem.style; + + // Make sure that we're working with the right name. We don't + // want to query the value if it is a CSS custom property + // since they are user-defined. + if ( !isCustomProp ) { + name = finalPropName( origName ); + } + + // Gets hook for the prefixed version, then unprefixed version + hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ]; + + // Check if we're setting a value + if ( value !== undefined ) { + type = typeof value; + + // Convert "+=" or "-=" to relative numbers (#7345) + if ( type === "string" && ( ret = rcssNum.exec( value ) ) && ret[ 1 ] ) { + value = adjustCSS( elem, name, ret ); + + // Fixes bug #9237 + type = "number"; + } + + // Make sure that null and NaN values aren't set (#7116) + if ( value == null || value !== value ) { + return; + } + + // If a number was passed in, add the unit (except for certain CSS properties) + if ( type === "number" ) { + value += ret && ret[ 3 ] || ( jQuery.cssNumber[ origName ] ? "" : "px" ); + } + + // background-* props affect original clone's values + if ( !support.clearCloneStyle && value === "" && name.indexOf( "background" ) === 0 ) { + style[ name ] = "inherit"; + } + + // If a hook was provided, use that value, otherwise just set the specified value + if ( !hooks || !( "set" in hooks ) || + ( value = hooks.set( elem, value, extra ) ) !== undefined ) { + + if ( isCustomProp ) { + style.setProperty( name, value ); + } else { + style[ name ] = value; + } + } + + } else { + + // If a hook was provided get the non-computed value from there + if ( hooks && "get" in hooks && + ( ret = hooks.get( elem, false, extra ) ) !== undefined ) { + + return ret; + } + + // Otherwise just get the value from the style object + return style[ name ]; + } + }, + + css: function( elem, name, extra, styles ) { + var val, num, hooks, + origName = jQuery.camelCase( name ), + isCustomProp = rcustomProp.test( name ); + + // Make sure that we're working with the right name. We don't + // want to modify the value if it is a CSS custom property + // since they are user-defined. + if ( !isCustomProp ) { + name = finalPropName( origName ); + } + + // Try prefixed name followed by the unprefixed name + hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ]; + + // If a hook was provided get the computed value from there + if ( hooks && "get" in hooks ) { + val = hooks.get( elem, true, extra ); + } + + // Otherwise, if a way to get the computed value exists, use that + if ( val === undefined ) { + val = curCSS( elem, name, styles ); + } + + // Convert "normal" to computed value + if ( val === "normal" && name in cssNormalTransform ) { + val = cssNormalTransform[ name ]; + } + + // Make numeric if forced or a qualifier was provided and val looks numeric + if ( extra === "" || extra ) { + num = parseFloat( val ); + return extra === true || isFinite( num ) ? num || 0 : val; + } + + return val; + } +} ); + +jQuery.each( [ "height", "width" ], function( i, name ) { + jQuery.cssHooks[ name ] = { + get: function( elem, computed, extra ) { + if ( computed ) { + + // Certain elements can have dimension info if we invisibly show them + // but it must have a current display style that would benefit + return rdisplayswap.test( jQuery.css( elem, "display" ) ) && + + // Support: Safari 8+ + // Table columns in Safari have non-zero offsetWidth & zero + // getBoundingClientRect().width unless display is changed. + // Support: IE <=11 only + // Running getBoundingClientRect on a disconnected node + // in IE throws an error. + ( !elem.getClientRects().length || !elem.getBoundingClientRect().width ) ? + swap( elem, cssShow, function() { + return getWidthOrHeight( elem, name, extra ); + } ) : + getWidthOrHeight( elem, name, extra ); + } + }, + + set: function( elem, value, extra ) { + var matches, + styles = extra && getStyles( elem ), + subtract = extra && augmentWidthOrHeight( + elem, + name, + extra, + jQuery.css( elem, "boxSizing", false, styles ) === "border-box", + styles + ); + + // Convert to pixels if value adjustment is needed + if ( subtract && ( matches = rcssNum.exec( value ) ) && + ( matches[ 3 ] || "px" ) !== "px" ) { + + elem.style[ name ] = value; + value = jQuery.css( elem, name ); + } + + return setPositiveNumber( elem, value, subtract ); + } + }; +} ); + +jQuery.cssHooks.marginLeft = addGetHookIf( support.reliableMarginLeft, + function( elem, computed ) { + if ( computed ) { + return ( parseFloat( curCSS( elem, "marginLeft" ) ) || + elem.getBoundingClientRect().left - + swap( elem, { marginLeft: 0 }, function() { + return elem.getBoundingClientRect().left; + } ) + ) + "px"; + } + } +); + +// These hooks are used by animate to expand properties +jQuery.each( { + margin: "", + padding: "", + border: "Width" +}, function( prefix, suffix ) { + jQuery.cssHooks[ prefix + suffix ] = { + expand: function( value ) { + var i = 0, + expanded = {}, + + // Assumes a single number if not a string + parts = typeof value === "string" ? value.split( " " ) : [ value ]; + + for ( ; i < 4; i++ ) { + expanded[ prefix + cssExpand[ i ] + suffix ] = + parts[ i ] || parts[ i - 2 ] || parts[ 0 ]; + } + + return expanded; + } + }; + + if ( !rmargin.test( prefix ) ) { + jQuery.cssHooks[ prefix + suffix ].set = setPositiveNumber; + } +} ); + +jQuery.fn.extend( { + css: function( name, value ) { + return access( this, function( elem, name, value ) { + var styles, len, + map = {}, + i = 0; + + if ( Array.isArray( name ) ) { + styles = getStyles( elem ); + len = name.length; + + for ( ; i < len; i++ ) { + map[ name[ i ] ] = jQuery.css( elem, name[ i ], false, styles ); + } + + return map; + } + + return value !== undefined ? + jQuery.style( elem, name, value ) : + jQuery.css( elem, name ); + }, name, value, arguments.length > 1 ); + } +} ); + + +function Tween( elem, options, prop, end, easing ) { + return new Tween.prototype.init( elem, options, prop, end, easing ); +} +jQuery.Tween = Tween; + +Tween.prototype = { + constructor: Tween, + init: function( elem, options, prop, end, easing, unit ) { + this.elem = elem; + this.prop = prop; + this.easing = easing || jQuery.easing._default; + this.options = options; + this.start = this.now = this.cur(); + this.end = end; + this.unit = unit || ( jQuery.cssNumber[ prop ] ? "" : "px" ); + }, + cur: function() { + var hooks = Tween.propHooks[ this.prop ]; + + return hooks && hooks.get ? + hooks.get( this ) : + Tween.propHooks._default.get( this ); + }, + run: function( percent ) { + var eased, + hooks = Tween.propHooks[ this.prop ]; + + if ( this.options.duration ) { + this.pos = eased = jQuery.easing[ this.easing ]( + percent, this.options.duration * percent, 0, 1, this.options.duration + ); + } else { + this.pos = eased = percent; + } + this.now = ( this.end - this.start ) * eased + this.start; + + if ( this.options.step ) { + this.options.step.call( this.elem, this.now, this ); + } + + if ( hooks && hooks.set ) { + hooks.set( this ); + } else { + Tween.propHooks._default.set( this ); + } + return this; + } +}; + +Tween.prototype.init.prototype = Tween.prototype; + +Tween.propHooks = { + _default: { + get: function( tween ) { + var result; + + // Use a property on the element directly when it is not a DOM element, + // or when there is no matching style property that exists. + if ( tween.elem.nodeType !== 1 || + tween.elem[ tween.prop ] != null && tween.elem.style[ tween.prop ] == null ) { + return tween.elem[ tween.prop ]; + } + + // Passing an empty string as a 3rd parameter to .css will automatically + // attempt a parseFloat and fallback to a string if the parse fails. + // Simple values such as "10px" are parsed to Float; + // complex values such as "rotate(1rad)" are returned as-is. + result = jQuery.css( tween.elem, tween.prop, "" ); + + // Empty strings, null, undefined and "auto" are converted to 0. + return !result || result === "auto" ? 0 : result; + }, + set: function( tween ) { + + // Use step hook for back compat. + // Use cssHook if its there. + // Use .style if available and use plain properties where available. + if ( jQuery.fx.step[ tween.prop ] ) { + jQuery.fx.step[ tween.prop ]( tween ); + } else if ( tween.elem.nodeType === 1 && + ( tween.elem.style[ jQuery.cssProps[ tween.prop ] ] != null || + jQuery.cssHooks[ tween.prop ] ) ) { + jQuery.style( tween.elem, tween.prop, tween.now + tween.unit ); + } else { + tween.elem[ tween.prop ] = tween.now; + } + } + } +}; + +// Support: IE <=9 only +// Panic based approach to setting things on disconnected nodes +Tween.propHooks.scrollTop = Tween.propHooks.scrollLeft = { + set: function( tween ) { + if ( tween.elem.nodeType && tween.elem.parentNode ) { + tween.elem[ tween.prop ] = tween.now; + } + } +}; + +jQuery.easing = { + linear: function( p ) { + return p; + }, + swing: function( p ) { + return 0.5 - Math.cos( p * Math.PI ) / 2; + }, + _default: "swing" +}; + +jQuery.fx = Tween.prototype.init; + +// Back compat <1.8 extension point +jQuery.fx.step = {}; + + + + +var + fxNow, inProgress, + rfxtypes = /^(?:toggle|show|hide)$/, + rrun = /queueHooks$/; + +function schedule() { + if ( inProgress ) { + if ( document.hidden === false && window.requestAnimationFrame ) { + window.requestAnimationFrame( schedule ); + } else { + window.setTimeout( schedule, jQuery.fx.interval ); + } + + jQuery.fx.tick(); + } +} + +// Animations created synchronously will run synchronously +function createFxNow() { + window.setTimeout( function() { + fxNow = undefined; + } ); + return ( fxNow = jQuery.now() ); +} + +// Generate parameters to create a standard animation +function genFx( type, includeWidth ) { + var which, + i = 0, + attrs = { height: type }; + + // If we include width, step value is 1 to do all cssExpand values, + // otherwise step value is 2 to skip over Left and Right + includeWidth = includeWidth ? 1 : 0; + for ( ; i < 4; i += 2 - includeWidth ) { + which = cssExpand[ i ]; + attrs[ "margin" + which ] = attrs[ "padding" + which ] = type; + } + + if ( includeWidth ) { + attrs.opacity = attrs.width = type; + } + + return attrs; +} + +function createTween( value, prop, animation ) { + var tween, + collection = ( Animation.tweeners[ prop ] || [] ).concat( Animation.tweeners[ "*" ] ), + index = 0, + length = collection.length; + for ( ; index < length; index++ ) { + if ( ( tween = collection[ index ].call( animation, prop, value ) ) ) { + + // We're done with this property + return tween; + } + } +} + +function defaultPrefilter( elem, props, opts ) { + var prop, value, toggle, hooks, oldfire, propTween, restoreDisplay, display, + isBox = "width" in props || "height" in props, + anim = this, + orig = {}, + style = elem.style, + hidden = elem.nodeType && isHiddenWithinTree( elem ), + dataShow = dataPriv.get( elem, "fxshow" ); + + // Queue-skipping animations hijack the fx hooks + if ( !opts.queue ) { + hooks = jQuery._queueHooks( elem, "fx" ); + if ( hooks.unqueued == null ) { + hooks.unqueued = 0; + oldfire = hooks.empty.fire; + hooks.empty.fire = function() { + if ( !hooks.unqueued ) { + oldfire(); + } + }; + } + hooks.unqueued++; + + anim.always( function() { + + // Ensure the complete handler is called before this completes + anim.always( function() { + hooks.unqueued--; + if ( !jQuery.queue( elem, "fx" ).length ) { + hooks.empty.fire(); + } + } ); + } ); + } + + // Detect show/hide animations + for ( prop in props ) { + value = props[ prop ]; + if ( rfxtypes.test( value ) ) { + delete props[ prop ]; + toggle = toggle || value === "toggle"; + if ( value === ( hidden ? "hide" : "show" ) ) { + + // Pretend to be hidden if this is a "show" and + // there is still data from a stopped show/hide + if ( value === "show" && dataShow && dataShow[ prop ] !== undefined ) { + hidden = true; + + // Ignore all other no-op show/hide data + } else { + continue; + } + } + orig[ prop ] = dataShow && dataShow[ prop ] || jQuery.style( elem, prop ); + } + } + + // Bail out if this is a no-op like .hide().hide() + propTween = !jQuery.isEmptyObject( props ); + if ( !propTween && jQuery.isEmptyObject( orig ) ) { + return; + } + + // Restrict "overflow" and "display" styles during box animations + if ( isBox && elem.nodeType === 1 ) { + + // Support: IE <=9 - 11, Edge 12 - 13 + // Record all 3 overflow attributes because IE does not infer the shorthand + // from identically-valued overflowX and overflowY + opts.overflow = [ style.overflow, style.overflowX, style.overflowY ]; + + // Identify a display type, preferring old show/hide data over the CSS cascade + restoreDisplay = dataShow && dataShow.display; + if ( restoreDisplay == null ) { + restoreDisplay = dataPriv.get( elem, "display" ); + } + display = jQuery.css( elem, "display" ); + if ( display === "none" ) { + if ( restoreDisplay ) { + display = restoreDisplay; + } else { + + // Get nonempty value(s) by temporarily forcing visibility + showHide( [ elem ], true ); + restoreDisplay = elem.style.display || restoreDisplay; + display = jQuery.css( elem, "display" ); + showHide( [ elem ] ); + } + } + + // Animate inline elements as inline-block + if ( display === "inline" || display === "inline-block" && restoreDisplay != null ) { + if ( jQuery.css( elem, "float" ) === "none" ) { + + // Restore the original display value at the end of pure show/hide animations + if ( !propTween ) { + anim.done( function() { + style.display = restoreDisplay; + } ); + if ( restoreDisplay == null ) { + display = style.display; + restoreDisplay = display === "none" ? "" : display; + } + } + style.display = "inline-block"; + } + } + } + + if ( opts.overflow ) { + style.overflow = "hidden"; + anim.always( function() { + style.overflow = opts.overflow[ 0 ]; + style.overflowX = opts.overflow[ 1 ]; + style.overflowY = opts.overflow[ 2 ]; + } ); + } + + // Implement show/hide animations + propTween = false; + for ( prop in orig ) { + + // General show/hide setup for this element animation + if ( !propTween ) { + if ( dataShow ) { + if ( "hidden" in dataShow ) { + hidden = dataShow.hidden; + } + } else { + dataShow = dataPriv.access( elem, "fxshow", { display: restoreDisplay } ); + } + + // Store hidden/visible for toggle so `.stop().toggle()` "reverses" + if ( toggle ) { + dataShow.hidden = !hidden; + } + + // Show elements before animating them + if ( hidden ) { + showHide( [ elem ], true ); + } + + /* eslint-disable no-loop-func */ + + anim.done( function() { + + /* eslint-enable no-loop-func */ + + // The final step of a "hide" animation is actually hiding the element + if ( !hidden ) { + showHide( [ elem ] ); + } + dataPriv.remove( elem, "fxshow" ); + for ( prop in orig ) { + jQuery.style( elem, prop, orig[ prop ] ); + } + } ); + } + + // Per-property setup + propTween = createTween( hidden ? dataShow[ prop ] : 0, prop, anim ); + if ( !( prop in dataShow ) ) { + dataShow[ prop ] = propTween.start; + if ( hidden ) { + propTween.end = propTween.start; + propTween.start = 0; + } + } + } +} + +function propFilter( props, specialEasing ) { + var index, name, easing, value, hooks; + + // camelCase, specialEasing and expand cssHook pass + for ( index in props ) { + name = jQuery.camelCase( index ); + easing = specialEasing[ name ]; + value = props[ index ]; + if ( Array.isArray( value ) ) { + easing = value[ 1 ]; + value = props[ index ] = value[ 0 ]; + } + + if ( index !== name ) { + props[ name ] = value; + delete props[ index ]; + } + + hooks = jQuery.cssHooks[ name ]; + if ( hooks && "expand" in hooks ) { + value = hooks.expand( value ); + delete props[ name ]; + + // Not quite $.extend, this won't overwrite existing keys. + // Reusing 'index' because we have the correct "name" + for ( index in value ) { + if ( !( index in props ) ) { + props[ index ] = value[ index ]; + specialEasing[ index ] = easing; + } + } + } else { + specialEasing[ name ] = easing; + } + } +} + +function Animation( elem, properties, options ) { + var result, + stopped, + index = 0, + length = Animation.prefilters.length, + deferred = jQuery.Deferred().always( function() { + + // Don't match elem in the :animated selector + delete tick.elem; + } ), + tick = function() { + if ( stopped ) { + return false; + } + var currentTime = fxNow || createFxNow(), + remaining = Math.max( 0, animation.startTime + animation.duration - currentTime ), + + // Support: Android 2.3 only + // Archaic crash bug won't allow us to use `1 - ( 0.5 || 0 )` (#12497) + temp = remaining / animation.duration || 0, + percent = 1 - temp, + index = 0, + length = animation.tweens.length; + + for ( ; index < length; index++ ) { + animation.tweens[ index ].run( percent ); + } + + deferred.notifyWith( elem, [ animation, percent, remaining ] ); + + // If there's more to do, yield + if ( percent < 1 && length ) { + return remaining; + } + + // If this was an empty animation, synthesize a final progress notification + if ( !length ) { + deferred.notifyWith( elem, [ animation, 1, 0 ] ); + } + + // Resolve the animation and report its conclusion + deferred.resolveWith( elem, [ animation ] ); + return false; + }, + animation = deferred.promise( { + elem: elem, + props: jQuery.extend( {}, properties ), + opts: jQuery.extend( true, { + specialEasing: {}, + easing: jQuery.easing._default + }, options ), + originalProperties: properties, + originalOptions: options, + startTime: fxNow || createFxNow(), + duration: options.duration, + tweens: [], + createTween: function( prop, end ) { + var tween = jQuery.Tween( elem, animation.opts, prop, end, + animation.opts.specialEasing[ prop ] || animation.opts.easing ); + animation.tweens.push( tween ); + return tween; + }, + stop: function( gotoEnd ) { + var index = 0, + + // If we are going to the end, we want to run all the tweens + // otherwise we skip this part + length = gotoEnd ? animation.tweens.length : 0; + if ( stopped ) { + return this; + } + stopped = true; + for ( ; index < length; index++ ) { + animation.tweens[ index ].run( 1 ); + } + + // Resolve when we played the last frame; otherwise, reject + if ( gotoEnd ) { + deferred.notifyWith( elem, [ animation, 1, 0 ] ); + deferred.resolveWith( elem, [ animation, gotoEnd ] ); + } else { + deferred.rejectWith( elem, [ animation, gotoEnd ] ); + } + return this; + } + } ), + props = animation.props; + + propFilter( props, animation.opts.specialEasing ); + + for ( ; index < length; index++ ) { + result = Animation.prefilters[ index ].call( animation, elem, props, animation.opts ); + if ( result ) { + if ( jQuery.isFunction( result.stop ) ) { + jQuery._queueHooks( animation.elem, animation.opts.queue ).stop = + jQuery.proxy( result.stop, result ); + } + return result; + } + } + + jQuery.map( props, createTween, animation ); + + if ( jQuery.isFunction( animation.opts.start ) ) { + animation.opts.start.call( elem, animation ); + } + + // Attach callbacks from options + animation + .progress( animation.opts.progress ) + .done( animation.opts.done, animation.opts.complete ) + .fail( animation.opts.fail ) + .always( animation.opts.always ); + + jQuery.fx.timer( + jQuery.extend( tick, { + elem: elem, + anim: animation, + queue: animation.opts.queue + } ) + ); + + return animation; +} + +jQuery.Animation = jQuery.extend( Animation, { + + tweeners: { + "*": [ function( prop, value ) { + var tween = this.createTween( prop, value ); + adjustCSS( tween.elem, prop, rcssNum.exec( value ), tween ); + return tween; + } ] + }, + + tweener: function( props, callback ) { + if ( jQuery.isFunction( props ) ) { + callback = props; + props = [ "*" ]; + } else { + props = props.match( rnothtmlwhite ); + } + + var prop, + index = 0, + length = props.length; + + for ( ; index < length; index++ ) { + prop = props[ index ]; + Animation.tweeners[ prop ] = Animation.tweeners[ prop ] || []; + Animation.tweeners[ prop ].unshift( callback ); + } + }, + + prefilters: [ defaultPrefilter ], + + prefilter: function( callback, prepend ) { + if ( prepend ) { + Animation.prefilters.unshift( callback ); + } else { + Animation.prefilters.push( callback ); + } + } +} ); + +jQuery.speed = function( speed, easing, fn ) { + var opt = speed && typeof speed === "object" ? jQuery.extend( {}, speed ) : { + complete: fn || !fn && easing || + jQuery.isFunction( speed ) && speed, + duration: speed, + easing: fn && easing || easing && !jQuery.isFunction( easing ) && easing + }; + + // Go to the end state if fx are off + if ( jQuery.fx.off ) { + opt.duration = 0; + + } else { + if ( typeof opt.duration !== "number" ) { + if ( opt.duration in jQuery.fx.speeds ) { + opt.duration = jQuery.fx.speeds[ opt.duration ]; + + } else { + opt.duration = jQuery.fx.speeds._default; + } + } + } + + // Normalize opt.queue - true/undefined/null -> "fx" + if ( opt.queue == null || opt.queue === true ) { + opt.queue = "fx"; + } + + // Queueing + opt.old = opt.complete; + + opt.complete = function() { + if ( jQuery.isFunction( opt.old ) ) { + opt.old.call( this ); + } + + if ( opt.queue ) { + jQuery.dequeue( this, opt.queue ); + } + }; + + return opt; +}; + +jQuery.fn.extend( { + fadeTo: function( speed, to, easing, callback ) { + + // Show any hidden elements after setting opacity to 0 + return this.filter( isHiddenWithinTree ).css( "opacity", 0 ).show() + + // Animate to the value specified + .end().animate( { opacity: to }, speed, easing, callback ); + }, + animate: function( prop, speed, easing, callback ) { + var empty = jQuery.isEmptyObject( prop ), + optall = jQuery.speed( speed, easing, callback ), + doAnimation = function() { + + // Operate on a copy of prop so per-property easing won't be lost + var anim = Animation( this, jQuery.extend( {}, prop ), optall ); + + // Empty animations, or finishing resolves immediately + if ( empty || dataPriv.get( this, "finish" ) ) { + anim.stop( true ); + } + }; + doAnimation.finish = doAnimation; + + return empty || optall.queue === false ? + this.each( doAnimation ) : + this.queue( optall.queue, doAnimation ); + }, + stop: function( type, clearQueue, gotoEnd ) { + var stopQueue = function( hooks ) { + var stop = hooks.stop; + delete hooks.stop; + stop( gotoEnd ); + }; + + if ( typeof type !== "string" ) { + gotoEnd = clearQueue; + clearQueue = type; + type = undefined; + } + if ( clearQueue && type !== false ) { + this.queue( type || "fx", [] ); + } + + return this.each( function() { + var dequeue = true, + index = type != null && type + "queueHooks", + timers = jQuery.timers, + data = dataPriv.get( this ); + + if ( index ) { + if ( data[ index ] && data[ index ].stop ) { + stopQueue( data[ index ] ); + } + } else { + for ( index in data ) { + if ( data[ index ] && data[ index ].stop && rrun.test( index ) ) { + stopQueue( data[ index ] ); + } + } + } + + for ( index = timers.length; index--; ) { + if ( timers[ index ].elem === this && + ( type == null || timers[ index ].queue === type ) ) { + + timers[ index ].anim.stop( gotoEnd ); + dequeue = false; + timers.splice( index, 1 ); + } + } + + // Start the next in the queue if the last step wasn't forced. + // Timers currently will call their complete callbacks, which + // will dequeue but only if they were gotoEnd. + if ( dequeue || !gotoEnd ) { + jQuery.dequeue( this, type ); + } + } ); + }, + finish: function( type ) { + if ( type !== false ) { + type = type || "fx"; + } + return this.each( function() { + var index, + data = dataPriv.get( this ), + queue = data[ type + "queue" ], + hooks = data[ type + "queueHooks" ], + timers = jQuery.timers, + length = queue ? queue.length : 0; + + // Enable finishing flag on private data + data.finish = true; + + // Empty the queue first + jQuery.queue( this, type, [] ); + + if ( hooks && hooks.stop ) { + hooks.stop.call( this, true ); + } + + // Look for any active animations, and finish them + for ( index = timers.length; index--; ) { + if ( timers[ index ].elem === this && timers[ index ].queue === type ) { + timers[ index ].anim.stop( true ); + timers.splice( index, 1 ); + } + } + + // Look for any animations in the old queue and finish them + for ( index = 0; index < length; index++ ) { + if ( queue[ index ] && queue[ index ].finish ) { + queue[ index ].finish.call( this ); + } + } + + // Turn off finishing flag + delete data.finish; + } ); + } +} ); + +jQuery.each( [ "toggle", "show", "hide" ], function( i, name ) { + var cssFn = jQuery.fn[ name ]; + jQuery.fn[ name ] = function( speed, easing, callback ) { + return speed == null || typeof speed === "boolean" ? + cssFn.apply( this, arguments ) : + this.animate( genFx( name, true ), speed, easing, callback ); + }; +} ); + +// Generate shortcuts for custom animations +jQuery.each( { + slideDown: genFx( "show" ), + slideUp: genFx( "hide" ), + slideToggle: genFx( "toggle" ), + fadeIn: { opacity: "show" }, + fadeOut: { opacity: "hide" }, + fadeToggle: { opacity: "toggle" } +}, function( name, props ) { + jQuery.fn[ name ] = function( speed, easing, callback ) { + return this.animate( props, speed, easing, callback ); + }; +} ); + +jQuery.timers = []; +jQuery.fx.tick = function() { + var timer, + i = 0, + timers = jQuery.timers; + + fxNow = jQuery.now(); + + for ( ; i < timers.length; i++ ) { + timer = timers[ i ]; + + // Run the timer and safely remove it when done (allowing for external removal) + if ( !timer() && timers[ i ] === timer ) { + timers.splice( i--, 1 ); + } + } + + if ( !timers.length ) { + jQuery.fx.stop(); + } + fxNow = undefined; +}; + +jQuery.fx.timer = function( timer ) { + jQuery.timers.push( timer ); + jQuery.fx.start(); +}; + +jQuery.fx.interval = 13; +jQuery.fx.start = function() { + if ( inProgress ) { + return; + } + + inProgress = true; + schedule(); +}; + +jQuery.fx.stop = function() { + inProgress = null; +}; + +jQuery.fx.speeds = { + slow: 600, + fast: 200, + + // Default speed + _default: 400 +}; + + +// Based off of the plugin by Clint Helfers, with permission. +// https://web.archive.org/web/20100324014747/http://blindsignals.com/index.php/2009/07/jquery-delay/ +jQuery.fn.delay = function( time, type ) { + time = jQuery.fx ? jQuery.fx.speeds[ time ] || time : time; + type = type || "fx"; + + return this.queue( type, function( next, hooks ) { + var timeout = window.setTimeout( next, time ); + hooks.stop = function() { + window.clearTimeout( timeout ); + }; + } ); +}; + + +( function() { + var input = document.createElement( "input" ), + select = document.createElement( "select" ), + opt = select.appendChild( document.createElement( "option" ) ); + + input.type = "checkbox"; + + // Support: Android <=4.3 only + // Default value for a checkbox should be "on" + support.checkOn = input.value !== ""; + + // Support: IE <=11 only + // Must access selectedIndex to make default options select + support.optSelected = opt.selected; + + // Support: IE <=11 only + // An input loses its value after becoming a radio + input = document.createElement( "input" ); + input.value = "t"; + input.type = "radio"; + support.radioValue = input.value === "t"; +} )(); + + +var boolHook, + attrHandle = jQuery.expr.attrHandle; + +jQuery.fn.extend( { + attr: function( name, value ) { + return access( this, jQuery.attr, name, value, arguments.length > 1 ); + }, + + removeAttr: function( name ) { + return this.each( function() { + jQuery.removeAttr( this, name ); + } ); + } +} ); + +jQuery.extend( { + attr: function( elem, name, value ) { + var ret, hooks, + nType = elem.nodeType; + + // Don't get/set attributes on text, comment and attribute nodes + if ( nType === 3 || nType === 8 || nType === 2 ) { + return; + } + + // Fallback to prop when attributes are not supported + if ( typeof elem.getAttribute === "undefined" ) { + return jQuery.prop( elem, name, value ); + } + + // Attribute hooks are determined by the lowercase version + // Grab necessary hook if one is defined + if ( nType !== 1 || !jQuery.isXMLDoc( elem ) ) { + hooks = jQuery.attrHooks[ name.toLowerCase() ] || + ( jQuery.expr.match.bool.test( name ) ? boolHook : undefined ); + } + + if ( value !== undefined ) { + if ( value === null ) { + jQuery.removeAttr( elem, name ); + return; + } + + if ( hooks && "set" in hooks && + ( ret = hooks.set( elem, value, name ) ) !== undefined ) { + return ret; + } + + elem.setAttribute( name, value + "" ); + return value; + } + + if ( hooks && "get" in hooks && ( ret = hooks.get( elem, name ) ) !== null ) { + return ret; + } + + ret = jQuery.find.attr( elem, name ); + + // Non-existent attributes return null, we normalize to undefined + return ret == null ? undefined : ret; + }, + + attrHooks: { + type: { + set: function( elem, value ) { + if ( !support.radioValue && value === "radio" && + nodeName( elem, "input" ) ) { + var val = elem.value; + elem.setAttribute( "type", value ); + if ( val ) { + elem.value = val; + } + return value; + } + } + } + }, + + removeAttr: function( elem, value ) { + var name, + i = 0, + + // Attribute names can contain non-HTML whitespace characters + // https://html.spec.whatwg.org/multipage/syntax.html#attributes-2 + attrNames = value && value.match( rnothtmlwhite ); + + if ( attrNames && elem.nodeType === 1 ) { + while ( ( name = attrNames[ i++ ] ) ) { + elem.removeAttribute( name ); + } + } + } +} ); + +// Hooks for boolean attributes +boolHook = { + set: function( elem, value, name ) { + if ( value === false ) { + + // Remove boolean attributes when set to false + jQuery.removeAttr( elem, name ); + } else { + elem.setAttribute( name, name ); + } + return name; + } +}; + +jQuery.each( jQuery.expr.match.bool.source.match( /\w+/g ), function( i, name ) { + var getter = attrHandle[ name ] || jQuery.find.attr; + + attrHandle[ name ] = function( elem, name, isXML ) { + var ret, handle, + lowercaseName = name.toLowerCase(); + + if ( !isXML ) { + + // Avoid an infinite loop by temporarily removing this function from the getter + handle = attrHandle[ lowercaseName ]; + attrHandle[ lowercaseName ] = ret; + ret = getter( elem, name, isXML ) != null ? + lowercaseName : + null; + attrHandle[ lowercaseName ] = handle; + } + return ret; + }; +} ); + + + + +var rfocusable = /^(?:input|select|textarea|button)$/i, + rclickable = /^(?:a|area)$/i; + +jQuery.fn.extend( { + prop: function( name, value ) { + return access( this, jQuery.prop, name, value, arguments.length > 1 ); + }, + + removeProp: function( name ) { + return this.each( function() { + delete this[ jQuery.propFix[ name ] || name ]; + } ); + } +} ); + +jQuery.extend( { + prop: function( elem, name, value ) { + var ret, hooks, + nType = elem.nodeType; + + // Don't get/set properties on text, comment and attribute nodes + if ( nType === 3 || nType === 8 || nType === 2 ) { + return; + } + + if ( nType !== 1 || !jQuery.isXMLDoc( elem ) ) { + + // Fix name and attach hooks + name = jQuery.propFix[ name ] || name; + hooks = jQuery.propHooks[ name ]; + } + + if ( value !== undefined ) { + if ( hooks && "set" in hooks && + ( ret = hooks.set( elem, value, name ) ) !== undefined ) { + return ret; + } + + return ( elem[ name ] = value ); + } + + if ( hooks && "get" in hooks && ( ret = hooks.get( elem, name ) ) !== null ) { + return ret; + } + + return elem[ name ]; + }, + + propHooks: { + tabIndex: { + get: function( elem ) { + + // Support: IE <=9 - 11 only + // elem.tabIndex doesn't always return the + // correct value when it hasn't been explicitly set + // https://web.archive.org/web/20141116233347/http://fluidproject.org/blog/2008/01/09/getting-setting-and-removing-tabindex-values-with-javascript/ + // Use proper attribute retrieval(#12072) + var tabindex = jQuery.find.attr( elem, "tabindex" ); + + if ( tabindex ) { + return parseInt( tabindex, 10 ); + } + + if ( + rfocusable.test( elem.nodeName ) || + rclickable.test( elem.nodeName ) && + elem.href + ) { + return 0; + } + + return -1; + } + } + }, + + propFix: { + "for": "htmlFor", + "class": "className" + } +} ); + +// Support: IE <=11 only +// Accessing the selectedIndex property +// forces the browser to respect setting selected +// on the option +// The getter ensures a default option is selected +// when in an optgroup +// eslint rule "no-unused-expressions" is disabled for this code +// since it considers such accessions noop +if ( !support.optSelected ) { + jQuery.propHooks.selected = { + get: function( elem ) { + + /* eslint no-unused-expressions: "off" */ + + var parent = elem.parentNode; + if ( parent && parent.parentNode ) { + parent.parentNode.selectedIndex; + } + return null; + }, + set: function( elem ) { + + /* eslint no-unused-expressions: "off" */ + + var parent = elem.parentNode; + if ( parent ) { + parent.selectedIndex; + + if ( parent.parentNode ) { + parent.parentNode.selectedIndex; + } + } + } + }; +} + +jQuery.each( [ + "tabIndex", + "readOnly", + "maxLength", + "cellSpacing", + "cellPadding", + "rowSpan", + "colSpan", + "useMap", + "frameBorder", + "contentEditable" +], function() { + jQuery.propFix[ this.toLowerCase() ] = this; +} ); + + + + + // Strip and collapse whitespace according to HTML spec + // https://html.spec.whatwg.org/multipage/infrastructure.html#strip-and-collapse-whitespace + function stripAndCollapse( value ) { + var tokens = value.match( rnothtmlwhite ) || []; + return tokens.join( " " ); + } + + +function getClass( elem ) { + return elem.getAttribute && elem.getAttribute( "class" ) || ""; +} + +jQuery.fn.extend( { + addClass: function( value ) { + var classes, elem, cur, curValue, clazz, j, finalValue, + i = 0; + + if ( jQuery.isFunction( value ) ) { + return this.each( function( j ) { + jQuery( this ).addClass( value.call( this, j, getClass( this ) ) ); + } ); + } + + if ( typeof value === "string" && value ) { + classes = value.match( rnothtmlwhite ) || []; + + while ( ( elem = this[ i++ ] ) ) { + curValue = getClass( elem ); + cur = elem.nodeType === 1 && ( " " + stripAndCollapse( curValue ) + " " ); + + if ( cur ) { + j = 0; + while ( ( clazz = classes[ j++ ] ) ) { + if ( cur.indexOf( " " + clazz + " " ) < 0 ) { + cur += clazz + " "; + } + } + + // Only assign if different to avoid unneeded rendering. + finalValue = stripAndCollapse( cur ); + if ( curValue !== finalValue ) { + elem.setAttribute( "class", finalValue ); + } + } + } + } + + return this; + }, + + removeClass: function( value ) { + var classes, elem, cur, curValue, clazz, j, finalValue, + i = 0; + + if ( jQuery.isFunction( value ) ) { + return this.each( function( j ) { + jQuery( this ).removeClass( value.call( this, j, getClass( this ) ) ); + } ); + } + + if ( !arguments.length ) { + return this.attr( "class", "" ); + } + + if ( typeof value === "string" && value ) { + classes = value.match( rnothtmlwhite ) || []; + + while ( ( elem = this[ i++ ] ) ) { + curValue = getClass( elem ); + + // This expression is here for better compressibility (see addClass) + cur = elem.nodeType === 1 && ( " " + stripAndCollapse( curValue ) + " " ); + + if ( cur ) { + j = 0; + while ( ( clazz = classes[ j++ ] ) ) { + + // Remove *all* instances + while ( cur.indexOf( " " + clazz + " " ) > -1 ) { + cur = cur.replace( " " + clazz + " ", " " ); + } + } + + // Only assign if different to avoid unneeded rendering. + finalValue = stripAndCollapse( cur ); + if ( curValue !== finalValue ) { + elem.setAttribute( "class", finalValue ); + } + } + } + } + + return this; + }, + + toggleClass: function( value, stateVal ) { + var type = typeof value; + + if ( typeof stateVal === "boolean" && type === "string" ) { + return stateVal ? this.addClass( value ) : this.removeClass( value ); + } + + if ( jQuery.isFunction( value ) ) { + return this.each( function( i ) { + jQuery( this ).toggleClass( + value.call( this, i, getClass( this ), stateVal ), + stateVal + ); + } ); + } + + return this.each( function() { + var className, i, self, classNames; + + if ( type === "string" ) { + + // Toggle individual class names + i = 0; + self = jQuery( this ); + classNames = value.match( rnothtmlwhite ) || []; + + while ( ( className = classNames[ i++ ] ) ) { + + // Check each className given, space separated list + if ( self.hasClass( className ) ) { + self.removeClass( className ); + } else { + self.addClass( className ); + } + } + + // Toggle whole class name + } else if ( value === undefined || type === "boolean" ) { + className = getClass( this ); + if ( className ) { + + // Store className if set + dataPriv.set( this, "__className__", className ); + } + + // If the element has a class name or if we're passed `false`, + // then remove the whole classname (if there was one, the above saved it). + // Otherwise bring back whatever was previously saved (if anything), + // falling back to the empty string if nothing was stored. + if ( this.setAttribute ) { + this.setAttribute( "class", + className || value === false ? + "" : + dataPriv.get( this, "__className__" ) || "" + ); + } + } + } ); + }, + + hasClass: function( selector ) { + var className, elem, + i = 0; + + className = " " + selector + " "; + while ( ( elem = this[ i++ ] ) ) { + if ( elem.nodeType === 1 && + ( " " + stripAndCollapse( getClass( elem ) ) + " " ).indexOf( className ) > -1 ) { + return true; + } + } + + return false; + } +} ); + + + + +var rreturn = /\r/g; + +jQuery.fn.extend( { + val: function( value ) { + var hooks, ret, isFunction, + elem = this[ 0 ]; + + if ( !arguments.length ) { + if ( elem ) { + hooks = jQuery.valHooks[ elem.type ] || + jQuery.valHooks[ elem.nodeName.toLowerCase() ]; + + if ( hooks && + "get" in hooks && + ( ret = hooks.get( elem, "value" ) ) !== undefined + ) { + return ret; + } + + ret = elem.value; + + // Handle most common string cases + if ( typeof ret === "string" ) { + return ret.replace( rreturn, "" ); + } + + // Handle cases where value is null/undef or number + return ret == null ? "" : ret; + } + + return; + } + + isFunction = jQuery.isFunction( value ); + + return this.each( function( i ) { + var val; + + if ( this.nodeType !== 1 ) { + return; + } + + if ( isFunction ) { + val = value.call( this, i, jQuery( this ).val() ); + } else { + val = value; + } + + // Treat null/undefined as ""; convert numbers to string + if ( val == null ) { + val = ""; + + } else if ( typeof val === "number" ) { + val += ""; + + } else if ( Array.isArray( val ) ) { + val = jQuery.map( val, function( value ) { + return value == null ? "" : value + ""; + } ); + } + + hooks = jQuery.valHooks[ this.type ] || jQuery.valHooks[ this.nodeName.toLowerCase() ]; + + // If set returns undefined, fall back to normal setting + if ( !hooks || !( "set" in hooks ) || hooks.set( this, val, "value" ) === undefined ) { + this.value = val; + } + } ); + } +} ); + +jQuery.extend( { + valHooks: { + option: { + get: function( elem ) { + + var val = jQuery.find.attr( elem, "value" ); + return val != null ? + val : + + // Support: IE <=10 - 11 only + // option.text throws exceptions (#14686, #14858) + // Strip and collapse whitespace + // https://html.spec.whatwg.org/#strip-and-collapse-whitespace + stripAndCollapse( jQuery.text( elem ) ); + } + }, + select: { + get: function( elem ) { + var value, option, i, + options = elem.options, + index = elem.selectedIndex, + one = elem.type === "select-one", + values = one ? null : [], + max = one ? index + 1 : options.length; + + if ( index < 0 ) { + i = max; + + } else { + i = one ? index : 0; + } + + // Loop through all the selected options + for ( ; i < max; i++ ) { + option = options[ i ]; + + // Support: IE <=9 only + // IE8-9 doesn't update selected after form reset (#2551) + if ( ( option.selected || i === index ) && + + // Don't return options that are disabled or in a disabled optgroup + !option.disabled && + ( !option.parentNode.disabled || + !nodeName( option.parentNode, "optgroup" ) ) ) { + + // Get the specific value for the option + value = jQuery( option ).val(); + + // We don't need an array for one selects + if ( one ) { + return value; + } + + // Multi-Selects return an array + values.push( value ); + } + } + + return values; + }, + + set: function( elem, value ) { + var optionSet, option, + options = elem.options, + values = jQuery.makeArray( value ), + i = options.length; + + while ( i-- ) { + option = options[ i ]; + + /* eslint-disable no-cond-assign */ + + if ( option.selected = + jQuery.inArray( jQuery.valHooks.option.get( option ), values ) > -1 + ) { + optionSet = true; + } + + /* eslint-enable no-cond-assign */ + } + + // Force browsers to behave consistently when non-matching value is set + if ( !optionSet ) { + elem.selectedIndex = -1; + } + return values; + } + } + } +} ); + +// Radios and checkboxes getter/setter +jQuery.each( [ "radio", "checkbox" ], function() { + jQuery.valHooks[ this ] = { + set: function( elem, value ) { + if ( Array.isArray( value ) ) { + return ( elem.checked = jQuery.inArray( jQuery( elem ).val(), value ) > -1 ); + } + } + }; + if ( !support.checkOn ) { + jQuery.valHooks[ this ].get = function( elem ) { + return elem.getAttribute( "value" ) === null ? "on" : elem.value; + }; + } +} ); + + + + +// Return jQuery for attributes-only inclusion + + +var rfocusMorph = /^(?:focusinfocus|focusoutblur)$/; + +jQuery.extend( jQuery.event, { + + trigger: function( event, data, elem, onlyHandlers ) { + + var i, cur, tmp, bubbleType, ontype, handle, special, + eventPath = [ elem || document ], + type = hasOwn.call( event, "type" ) ? event.type : event, + namespaces = hasOwn.call( event, "namespace" ) ? event.namespace.split( "." ) : []; + + cur = tmp = elem = elem || document; + + // Don't do events on text and comment nodes + if ( elem.nodeType === 3 || elem.nodeType === 8 ) { + return; + } + + // focus/blur morphs to focusin/out; ensure we're not firing them right now + if ( rfocusMorph.test( type + jQuery.event.triggered ) ) { + return; + } + + if ( type.indexOf( "." ) > -1 ) { + + // Namespaced trigger; create a regexp to match event type in handle() + namespaces = type.split( "." ); + type = namespaces.shift(); + namespaces.sort(); + } + ontype = type.indexOf( ":" ) < 0 && "on" + type; + + // Caller can pass in a jQuery.Event object, Object, or just an event type string + event = event[ jQuery.expando ] ? + event : + new jQuery.Event( type, typeof event === "object" && event ); + + // Trigger bitmask: & 1 for native handlers; & 2 for jQuery (always true) + event.isTrigger = onlyHandlers ? 2 : 3; + event.namespace = namespaces.join( "." ); + event.rnamespace = event.namespace ? + new RegExp( "(^|\\.)" + namespaces.join( "\\.(?:.*\\.|)" ) + "(\\.|$)" ) : + null; + + // Clean up the event in case it is being reused + event.result = undefined; + if ( !event.target ) { + event.target = elem; + } + + // Clone any incoming data and prepend the event, creating the handler arg list + data = data == null ? + [ event ] : + jQuery.makeArray( data, [ event ] ); + + // Allow special events to draw outside the lines + special = jQuery.event.special[ type ] || {}; + if ( !onlyHandlers && special.trigger && special.trigger.apply( elem, data ) === false ) { + return; + } + + // Determine event propagation path in advance, per W3C events spec (#9951) + // Bubble up to document, then to window; watch for a global ownerDocument var (#9724) + if ( !onlyHandlers && !special.noBubble && !jQuery.isWindow( elem ) ) { + + bubbleType = special.delegateType || type; + if ( !rfocusMorph.test( bubbleType + type ) ) { + cur = cur.parentNode; + } + for ( ; cur; cur = cur.parentNode ) { + eventPath.push( cur ); + tmp = cur; + } + + // Only add window if we got to document (e.g., not plain obj or detached DOM) + if ( tmp === ( elem.ownerDocument || document ) ) { + eventPath.push( tmp.defaultView || tmp.parentWindow || window ); + } + } + + // Fire handlers on the event path + i = 0; + while ( ( cur = eventPath[ i++ ] ) && !event.isPropagationStopped() ) { + + event.type = i > 1 ? + bubbleType : + special.bindType || type; + + // jQuery handler + handle = ( dataPriv.get( cur, "events" ) || {} )[ event.type ] && + dataPriv.get( cur, "handle" ); + if ( handle ) { + handle.apply( cur, data ); + } + + // Native handler + handle = ontype && cur[ ontype ]; + if ( handle && handle.apply && acceptData( cur ) ) { + event.result = handle.apply( cur, data ); + if ( event.result === false ) { + event.preventDefault(); + } + } + } + event.type = type; + + // If nobody prevented the default action, do it now + if ( !onlyHandlers && !event.isDefaultPrevented() ) { + + if ( ( !special._default || + special._default.apply( eventPath.pop(), data ) === false ) && + acceptData( elem ) ) { + + // Call a native DOM method on the target with the same name as the event. + // Don't do default actions on window, that's where global variables be (#6170) + if ( ontype && jQuery.isFunction( elem[ type ] ) && !jQuery.isWindow( elem ) ) { + + // Don't re-trigger an onFOO event when we call its FOO() method + tmp = elem[ ontype ]; + + if ( tmp ) { + elem[ ontype ] = null; + } + + // Prevent re-triggering of the same event, since we already bubbled it above + jQuery.event.triggered = type; + elem[ type ](); + jQuery.event.triggered = undefined; + + if ( tmp ) { + elem[ ontype ] = tmp; + } + } + } + } + + return event.result; + }, + + // Piggyback on a donor event to simulate a different one + // Used only for `focus(in | out)` events + simulate: function( type, elem, event ) { + var e = jQuery.extend( + new jQuery.Event(), + event, + { + type: type, + isSimulated: true + } + ); + + jQuery.event.trigger( e, null, elem ); + } + +} ); + +jQuery.fn.extend( { + + trigger: function( type, data ) { + return this.each( function() { + jQuery.event.trigger( type, data, this ); + } ); + }, + triggerHandler: function( type, data ) { + var elem = this[ 0 ]; + if ( elem ) { + return jQuery.event.trigger( type, data, elem, true ); + } + } +} ); + + +jQuery.each( ( "blur focus focusin focusout resize scroll click dblclick " + + "mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave " + + "change select submit keydown keypress keyup contextmenu" ).split( " " ), + function( i, name ) { + + // Handle event binding + jQuery.fn[ name ] = function( data, fn ) { + return arguments.length > 0 ? + this.on( name, null, data, fn ) : + this.trigger( name ); + }; +} ); + +jQuery.fn.extend( { + hover: function( fnOver, fnOut ) { + return this.mouseenter( fnOver ).mouseleave( fnOut || fnOver ); + } +} ); + + + + +support.focusin = "onfocusin" in window; + + +// Support: Firefox <=44 +// Firefox doesn't have focus(in | out) events +// Related ticket - https://bugzilla.mozilla.org/show_bug.cgi?id=687787 +// +// Support: Chrome <=48 - 49, Safari <=9.0 - 9.1 +// focus(in | out) events fire after focus & blur events, +// which is spec violation - http://www.w3.org/TR/DOM-Level-3-Events/#events-focusevent-event-order +// Related ticket - https://bugs.chromium.org/p/chromium/issues/detail?id=449857 +if ( !support.focusin ) { + jQuery.each( { focus: "focusin", blur: "focusout" }, function( orig, fix ) { + + // Attach a single capturing handler on the document while someone wants focusin/focusout + var handler = function( event ) { + jQuery.event.simulate( fix, event.target, jQuery.event.fix( event ) ); + }; + + jQuery.event.special[ fix ] = { + setup: function() { + var doc = this.ownerDocument || this, + attaches = dataPriv.access( doc, fix ); + + if ( !attaches ) { + doc.addEventListener( orig, handler, true ); + } + dataPriv.access( doc, fix, ( attaches || 0 ) + 1 ); + }, + teardown: function() { + var doc = this.ownerDocument || this, + attaches = dataPriv.access( doc, fix ) - 1; + + if ( !attaches ) { + doc.removeEventListener( orig, handler, true ); + dataPriv.remove( doc, fix ); + + } else { + dataPriv.access( doc, fix, attaches ); + } + } + }; + } ); +} +var location = window.location; + +var nonce = jQuery.now(); + +var rquery = ( /\?/ ); + + + +// Cross-browser xml parsing +jQuery.parseXML = function( data ) { + var xml; + if ( !data || typeof data !== "string" ) { + return null; + } + + // Support: IE 9 - 11 only + // IE throws on parseFromString with invalid input. + try { + xml = ( new window.DOMParser() ).parseFromString( data, "text/xml" ); + } catch ( e ) { + xml = undefined; + } + + if ( !xml || xml.getElementsByTagName( "parsererror" ).length ) { + jQuery.error( "Invalid XML: " + data ); + } + return xml; +}; + + +var + rbracket = /\[\]$/, + rCRLF = /\r?\n/g, + rsubmitterTypes = /^(?:submit|button|image|reset|file)$/i, + rsubmittable = /^(?:input|select|textarea|keygen)/i; + +function buildParams( prefix, obj, traditional, add ) { + var name; + + if ( Array.isArray( obj ) ) { + + // Serialize array item. + jQuery.each( obj, function( i, v ) { + if ( traditional || rbracket.test( prefix ) ) { + + // Treat each array item as a scalar. + add( prefix, v ); + + } else { + + // Item is non-scalar (array or object), encode its numeric index. + buildParams( + prefix + "[" + ( typeof v === "object" && v != null ? i : "" ) + "]", + v, + traditional, + add + ); + } + } ); + + } else if ( !traditional && jQuery.type( obj ) === "object" ) { + + // Serialize object item. + for ( name in obj ) { + buildParams( prefix + "[" + name + "]", obj[ name ], traditional, add ); + } + + } else { + + // Serialize scalar item. + add( prefix, obj ); + } +} + +// Serialize an array of form elements or a set of +// key/values into a query string +jQuery.param = function( a, traditional ) { + var prefix, + s = [], + add = function( key, valueOrFunction ) { + + // If value is a function, invoke it and use its return value + var value = jQuery.isFunction( valueOrFunction ) ? + valueOrFunction() : + valueOrFunction; + + s[ s.length ] = encodeURIComponent( key ) + "=" + + encodeURIComponent( value == null ? "" : value ); + }; + + // If an array was passed in, assume that it is an array of form elements. + if ( Array.isArray( a ) || ( a.jquery && !jQuery.isPlainObject( a ) ) ) { + + // Serialize the form elements + jQuery.each( a, function() { + add( this.name, this.value ); + } ); + + } else { + + // If traditional, encode the "old" way (the way 1.3.2 or older + // did it), otherwise encode params recursively. + for ( prefix in a ) { + buildParams( prefix, a[ prefix ], traditional, add ); + } + } + + // Return the resulting serialization + return s.join( "&" ); +}; + +jQuery.fn.extend( { + serialize: function() { + return jQuery.param( this.serializeArray() ); + }, + serializeArray: function() { + return this.map( function() { + + // Can add propHook for "elements" to filter or add form elements + var elements = jQuery.prop( this, "elements" ); + return elements ? jQuery.makeArray( elements ) : this; + } ) + .filter( function() { + var type = this.type; + + // Use .is( ":disabled" ) so that fieldset[disabled] works + return this.name && !jQuery( this ).is( ":disabled" ) && + rsubmittable.test( this.nodeName ) && !rsubmitterTypes.test( type ) && + ( this.checked || !rcheckableType.test( type ) ); + } ) + .map( function( i, elem ) { + var val = jQuery( this ).val(); + + if ( val == null ) { + return null; + } + + if ( Array.isArray( val ) ) { + return jQuery.map( val, function( val ) { + return { name: elem.name, value: val.replace( rCRLF, "\r\n" ) }; + } ); + } + + return { name: elem.name, value: val.replace( rCRLF, "\r\n" ) }; + } ).get(); + } +} ); + + +var + r20 = /%20/g, + rhash = /#.*$/, + rantiCache = /([?&])_=[^&]*/, + rheaders = /^(.*?):[ \t]*([^\r\n]*)$/mg, + + // #7653, #8125, #8152: local protocol detection + rlocalProtocol = /^(?:about|app|app-storage|.+-extension|file|res|widget):$/, + rnoContent = /^(?:GET|HEAD)$/, + rprotocol = /^\/\//, + + /* Prefilters + * 1) They are useful to introduce custom dataTypes (see ajax/jsonp.js for an example) + * 2) These are called: + * - BEFORE asking for a transport + * - AFTER param serialization (s.data is a string if s.processData is true) + * 3) key is the dataType + * 4) the catchall symbol "*" can be used + * 5) execution will start with transport dataType and THEN continue down to "*" if needed + */ + prefilters = {}, + + /* Transports bindings + * 1) key is the dataType + * 2) the catchall symbol "*" can be used + * 3) selection will start with transport dataType and THEN go to "*" if needed + */ + transports = {}, + + // Avoid comment-prolog char sequence (#10098); must appease lint and evade compression + allTypes = "*/".concat( "*" ), + + // Anchor tag for parsing the document origin + originAnchor = document.createElement( "a" ); + originAnchor.href = location.href; + +// Base "constructor" for jQuery.ajaxPrefilter and jQuery.ajaxTransport +function addToPrefiltersOrTransports( structure ) { + + // dataTypeExpression is optional and defaults to "*" + return function( dataTypeExpression, func ) { + + if ( typeof dataTypeExpression !== "string" ) { + func = dataTypeExpression; + dataTypeExpression = "*"; + } + + var dataType, + i = 0, + dataTypes = dataTypeExpression.toLowerCase().match( rnothtmlwhite ) || []; + + if ( jQuery.isFunction( func ) ) { + + // For each dataType in the dataTypeExpression + while ( ( dataType = dataTypes[ i++ ] ) ) { + + // Prepend if requested + if ( dataType[ 0 ] === "+" ) { + dataType = dataType.slice( 1 ) || "*"; + ( structure[ dataType ] = structure[ dataType ] || [] ).unshift( func ); + + // Otherwise append + } else { + ( structure[ dataType ] = structure[ dataType ] || [] ).push( func ); + } + } + } + }; +} + +// Base inspection function for prefilters and transports +function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) { + + var inspected = {}, + seekingTransport = ( structure === transports ); + + function inspect( dataType ) { + var selected; + inspected[ dataType ] = true; + jQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) { + var dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR ); + if ( typeof dataTypeOrTransport === "string" && + !seekingTransport && !inspected[ dataTypeOrTransport ] ) { + + options.dataTypes.unshift( dataTypeOrTransport ); + inspect( dataTypeOrTransport ); + return false; + } else if ( seekingTransport ) { + return !( selected = dataTypeOrTransport ); + } + } ); + return selected; + } + + return inspect( options.dataTypes[ 0 ] ) || !inspected[ "*" ] && inspect( "*" ); +} + +// A special extend for ajax options +// that takes "flat" options (not to be deep extended) +// Fixes #9887 +function ajaxExtend( target, src ) { + var key, deep, + flatOptions = jQuery.ajaxSettings.flatOptions || {}; + + for ( key in src ) { + if ( src[ key ] !== undefined ) { + ( flatOptions[ key ] ? target : ( deep || ( deep = {} ) ) )[ key ] = src[ key ]; + } + } + if ( deep ) { + jQuery.extend( true, target, deep ); + } + + return target; +} + +/* Handles responses to an ajax request: + * - finds the right dataType (mediates between content-type and expected dataType) + * - returns the corresponding response + */ +function ajaxHandleResponses( s, jqXHR, responses ) { + + var ct, type, finalDataType, firstDataType, + contents = s.contents, + dataTypes = s.dataTypes; + + // Remove auto dataType and get content-type in the process + while ( dataTypes[ 0 ] === "*" ) { + dataTypes.shift(); + if ( ct === undefined ) { + ct = s.mimeType || jqXHR.getResponseHeader( "Content-Type" ); + } + } + + // Check if we're dealing with a known content-type + if ( ct ) { + for ( type in contents ) { + if ( contents[ type ] && contents[ type ].test( ct ) ) { + dataTypes.unshift( type ); + break; + } + } + } + + // Check to see if we have a response for the expected dataType + if ( dataTypes[ 0 ] in responses ) { + finalDataType = dataTypes[ 0 ]; + } else { + + // Try convertible dataTypes + for ( type in responses ) { + if ( !dataTypes[ 0 ] || s.converters[ type + " " + dataTypes[ 0 ] ] ) { + finalDataType = type; + break; + } + if ( !firstDataType ) { + firstDataType = type; + } + } + + // Or just use first one + finalDataType = finalDataType || firstDataType; + } + + // If we found a dataType + // We add the dataType to the list if needed + // and return the corresponding response + if ( finalDataType ) { + if ( finalDataType !== dataTypes[ 0 ] ) { + dataTypes.unshift( finalDataType ); + } + return responses[ finalDataType ]; + } +} + +/* Chain conversions given the request and the original response + * Also sets the responseXXX fields on the jqXHR instance + */ +function ajaxConvert( s, response, jqXHR, isSuccess ) { + var conv2, current, conv, tmp, prev, + converters = {}, + + // Work with a copy of dataTypes in case we need to modify it for conversion + dataTypes = s.dataTypes.slice(); + + // Create converters map with lowercased keys + if ( dataTypes[ 1 ] ) { + for ( conv in s.converters ) { + converters[ conv.toLowerCase() ] = s.converters[ conv ]; + } + } + + current = dataTypes.shift(); + + // Convert to each sequential dataType + while ( current ) { + + if ( s.responseFields[ current ] ) { + jqXHR[ s.responseFields[ current ] ] = response; + } + + // Apply the dataFilter if provided + if ( !prev && isSuccess && s.dataFilter ) { + response = s.dataFilter( response, s.dataType ); + } + + prev = current; + current = dataTypes.shift(); + + if ( current ) { + + // There's only work to do if current dataType is non-auto + if ( current === "*" ) { + + current = prev; + + // Convert response if prev dataType is non-auto and differs from current + } else if ( prev !== "*" && prev !== current ) { + + // Seek a direct converter + conv = converters[ prev + " " + current ] || converters[ "* " + current ]; + + // If none found, seek a pair + if ( !conv ) { + for ( conv2 in converters ) { + + // If conv2 outputs current + tmp = conv2.split( " " ); + if ( tmp[ 1 ] === current ) { + + // If prev can be converted to accepted input + conv = converters[ prev + " " + tmp[ 0 ] ] || + converters[ "* " + tmp[ 0 ] ]; + if ( conv ) { + + // Condense equivalence converters + if ( conv === true ) { + conv = converters[ conv2 ]; + + // Otherwise, insert the intermediate dataType + } else if ( converters[ conv2 ] !== true ) { + current = tmp[ 0 ]; + dataTypes.unshift( tmp[ 1 ] ); + } + break; + } + } + } + } + + // Apply converter (if not an equivalence) + if ( conv !== true ) { + + // Unless errors are allowed to bubble, catch and return them + if ( conv && s.throws ) { + response = conv( response ); + } else { + try { + response = conv( response ); + } catch ( e ) { + return { + state: "parsererror", + error: conv ? e : "No conversion from " + prev + " to " + current + }; + } + } + } + } + } + } + + return { state: "success", data: response }; +} + +jQuery.extend( { + + // Counter for holding the number of active queries + active: 0, + + // Last-Modified header cache for next request + lastModified: {}, + etag: {}, + + ajaxSettings: { + url: location.href, + type: "GET", + isLocal: rlocalProtocol.test( location.protocol ), + global: true, + processData: true, + async: true, + contentType: "application/x-www-form-urlencoded; charset=UTF-8", + + /* + timeout: 0, + data: null, + dataType: null, + username: null, + password: null, + cache: null, + throws: false, + traditional: false, + headers: {}, + */ + + accepts: { + "*": allTypes, + text: "text/plain", + html: "text/html", + xml: "application/xml, text/xml", + json: "application/json, text/javascript" + }, + + contents: { + xml: /\bxml\b/, + html: /\bhtml/, + json: /\bjson\b/ + }, + + responseFields: { + xml: "responseXML", + text: "responseText", + json: "responseJSON" + }, + + // Data converters + // Keys separate source (or catchall "*") and destination types with a single space + converters: { + + // Convert anything to text + "* text": String, + + // Text to html (true = no transformation) + "text html": true, + + // Evaluate text as a json expression + "text json": JSON.parse, + + // Parse text as xml + "text xml": jQuery.parseXML + }, + + // For options that shouldn't be deep extended: + // you can add your own custom options here if + // and when you create one that shouldn't be + // deep extended (see ajaxExtend) + flatOptions: { + url: true, + context: true + } + }, + + // Creates a full fledged settings object into target + // with both ajaxSettings and settings fields. + // If target is omitted, writes into ajaxSettings. + ajaxSetup: function( target, settings ) { + return settings ? + + // Building a settings object + ajaxExtend( ajaxExtend( target, jQuery.ajaxSettings ), settings ) : + + // Extending ajaxSettings + ajaxExtend( jQuery.ajaxSettings, target ); + }, + + ajaxPrefilter: addToPrefiltersOrTransports( prefilters ), + ajaxTransport: addToPrefiltersOrTransports( transports ), + + // Main method + ajax: function( url, options ) { + + // If url is an object, simulate pre-1.5 signature + if ( typeof url === "object" ) { + options = url; + url = undefined; + } + + // Force options to be an object + options = options || {}; + + var transport, + + // URL without anti-cache param + cacheURL, + + // Response headers + responseHeadersString, + responseHeaders, + + // timeout handle + timeoutTimer, + + // Url cleanup var + urlAnchor, + + // Request state (becomes false upon send and true upon completion) + completed, + + // To know if global events are to be dispatched + fireGlobals, + + // Loop variable + i, + + // uncached part of the url + uncached, + + // Create the final options object + s = jQuery.ajaxSetup( {}, options ), + + // Callbacks context + callbackContext = s.context || s, + + // Context for global events is callbackContext if it is a DOM node or jQuery collection + globalEventContext = s.context && + ( callbackContext.nodeType || callbackContext.jquery ) ? + jQuery( callbackContext ) : + jQuery.event, + + // Deferreds + deferred = jQuery.Deferred(), + completeDeferred = jQuery.Callbacks( "once memory" ), + + // Status-dependent callbacks + statusCode = s.statusCode || {}, + + // Headers (they are sent all at once) + requestHeaders = {}, + requestHeadersNames = {}, + + // Default abort message + strAbort = "canceled", + + // Fake xhr + jqXHR = { + readyState: 0, + + // Builds headers hashtable if needed + getResponseHeader: function( key ) { + var match; + if ( completed ) { + if ( !responseHeaders ) { + responseHeaders = {}; + while ( ( match = rheaders.exec( responseHeadersString ) ) ) { + responseHeaders[ match[ 1 ].toLowerCase() ] = match[ 2 ]; + } + } + match = responseHeaders[ key.toLowerCase() ]; + } + return match == null ? null : match; + }, + + // Raw string + getAllResponseHeaders: function() { + return completed ? responseHeadersString : null; + }, + + // Caches the header + setRequestHeader: function( name, value ) { + if ( completed == null ) { + name = requestHeadersNames[ name.toLowerCase() ] = + requestHeadersNames[ name.toLowerCase() ] || name; + requestHeaders[ name ] = value; + } + return this; + }, + + // Overrides response content-type header + overrideMimeType: function( type ) { + if ( completed == null ) { + s.mimeType = type; + } + return this; + }, + + // Status-dependent callbacks + statusCode: function( map ) { + var code; + if ( map ) { + if ( completed ) { + + // Execute the appropriate callbacks + jqXHR.always( map[ jqXHR.status ] ); + } else { + + // Lazy-add the new callbacks in a way that preserves old ones + for ( code in map ) { + statusCode[ code ] = [ statusCode[ code ], map[ code ] ]; + } + } + } + return this; + }, + + // Cancel the request + abort: function( statusText ) { + var finalText = statusText || strAbort; + if ( transport ) { + transport.abort( finalText ); + } + done( 0, finalText ); + return this; + } + }; + + // Attach deferreds + deferred.promise( jqXHR ); + + // Add protocol if not provided (prefilters might expect it) + // Handle falsy url in the settings object (#10093: consistency with old signature) + // We also use the url parameter if available + s.url = ( ( url || s.url || location.href ) + "" ) + .replace( rprotocol, location.protocol + "//" ); + + // Alias method option to type as per ticket #12004 + s.type = options.method || options.type || s.method || s.type; + + // Extract dataTypes list + s.dataTypes = ( s.dataType || "*" ).toLowerCase().match( rnothtmlwhite ) || [ "" ]; + + // A cross-domain request is in order when the origin doesn't match the current origin. + if ( s.crossDomain == null ) { + urlAnchor = document.createElement( "a" ); + + // Support: IE <=8 - 11, Edge 12 - 13 + // IE throws exception on accessing the href property if url is malformed, + // e.g. http://example.com:80x/ + try { + urlAnchor.href = s.url; + + // Support: IE <=8 - 11 only + // Anchor's host property isn't correctly set when s.url is relative + urlAnchor.href = urlAnchor.href; + s.crossDomain = originAnchor.protocol + "//" + originAnchor.host !== + urlAnchor.protocol + "//" + urlAnchor.host; + } catch ( e ) { + + // If there is an error parsing the URL, assume it is crossDomain, + // it can be rejected by the transport if it is invalid + s.crossDomain = true; + } + } + + // Convert data if not already a string + if ( s.data && s.processData && typeof s.data !== "string" ) { + s.data = jQuery.param( s.data, s.traditional ); + } + + // Apply prefilters + inspectPrefiltersOrTransports( prefilters, s, options, jqXHR ); + + // If request was aborted inside a prefilter, stop there + if ( completed ) { + return jqXHR; + } + + // We can fire global events as of now if asked to + // Don't fire events if jQuery.event is undefined in an AMD-usage scenario (#15118) + fireGlobals = jQuery.event && s.global; + + // Watch for a new set of requests + if ( fireGlobals && jQuery.active++ === 0 ) { + jQuery.event.trigger( "ajaxStart" ); + } + + // Uppercase the type + s.type = s.type.toUpperCase(); + + // Determine if request has content + s.hasContent = !rnoContent.test( s.type ); + + // Save the URL in case we're toying with the If-Modified-Since + // and/or If-None-Match header later on + // Remove hash to simplify url manipulation + cacheURL = s.url.replace( rhash, "" ); + + // More options handling for requests with no content + if ( !s.hasContent ) { + + // Remember the hash so we can put it back + uncached = s.url.slice( cacheURL.length ); + + // If data is available, append data to url + if ( s.data ) { + cacheURL += ( rquery.test( cacheURL ) ? "&" : "?" ) + s.data; + + // #9682: remove data so that it's not used in an eventual retry + delete s.data; + } + + // Add or update anti-cache param if needed + if ( s.cache === false ) { + cacheURL = cacheURL.replace( rantiCache, "$1" ); + uncached = ( rquery.test( cacheURL ) ? "&" : "?" ) + "_=" + ( nonce++ ) + uncached; + } + + // Put hash and anti-cache on the URL that will be requested (gh-1732) + s.url = cacheURL + uncached; + + // Change '%20' to '+' if this is encoded form body content (gh-2658) + } else if ( s.data && s.processData && + ( s.contentType || "" ).indexOf( "application/x-www-form-urlencoded" ) === 0 ) { + s.data = s.data.replace( r20, "+" ); + } + + // Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode. + if ( s.ifModified ) { + if ( jQuery.lastModified[ cacheURL ] ) { + jqXHR.setRequestHeader( "If-Modified-Since", jQuery.lastModified[ cacheURL ] ); + } + if ( jQuery.etag[ cacheURL ] ) { + jqXHR.setRequestHeader( "If-None-Match", jQuery.etag[ cacheURL ] ); + } + } + + // Set the correct header, if data is being sent + if ( s.data && s.hasContent && s.contentType !== false || options.contentType ) { + jqXHR.setRequestHeader( "Content-Type", s.contentType ); + } + + // Set the Accepts header for the server, depending on the dataType + jqXHR.setRequestHeader( + "Accept", + s.dataTypes[ 0 ] && s.accepts[ s.dataTypes[ 0 ] ] ? + s.accepts[ s.dataTypes[ 0 ] ] + + ( s.dataTypes[ 0 ] !== "*" ? ", " + allTypes + "; q=0.01" : "" ) : + s.accepts[ "*" ] + ); + + // Check for headers option + for ( i in s.headers ) { + jqXHR.setRequestHeader( i, s.headers[ i ] ); + } + + // Allow custom headers/mimetypes and early abort + if ( s.beforeSend && + ( s.beforeSend.call( callbackContext, jqXHR, s ) === false || completed ) ) { + + // Abort if not done already and return + return jqXHR.abort(); + } + + // Aborting is no longer a cancellation + strAbort = "abort"; + + // Install callbacks on deferreds + completeDeferred.add( s.complete ); + jqXHR.done( s.success ); + jqXHR.fail( s.error ); + + // Get transport + transport = inspectPrefiltersOrTransports( transports, s, options, jqXHR ); + + // If no transport, we auto-abort + if ( !transport ) { + done( -1, "No Transport" ); + } else { + jqXHR.readyState = 1; + + // Send global event + if ( fireGlobals ) { + globalEventContext.trigger( "ajaxSend", [ jqXHR, s ] ); + } + + // If request was aborted inside ajaxSend, stop there + if ( completed ) { + return jqXHR; + } + + // Timeout + if ( s.async && s.timeout > 0 ) { + timeoutTimer = window.setTimeout( function() { + jqXHR.abort( "timeout" ); + }, s.timeout ); + } + + try { + completed = false; + transport.send( requestHeaders, done ); + } catch ( e ) { + + // Rethrow post-completion exceptions + if ( completed ) { + throw e; + } + + // Propagate others as results + done( -1, e ); + } + } + + // Callback for when everything is done + function done( status, nativeStatusText, responses, headers ) { + var isSuccess, success, error, response, modified, + statusText = nativeStatusText; + + // Ignore repeat invocations + if ( completed ) { + return; + } + + completed = true; + + // Clear timeout if it exists + if ( timeoutTimer ) { + window.clearTimeout( timeoutTimer ); + } + + // Dereference transport for early garbage collection + // (no matter how long the jqXHR object will be used) + transport = undefined; + + // Cache response headers + responseHeadersString = headers || ""; + + // Set readyState + jqXHR.readyState = status > 0 ? 4 : 0; + + // Determine if successful + isSuccess = status >= 200 && status < 300 || status === 304; + + // Get response data + if ( responses ) { + response = ajaxHandleResponses( s, jqXHR, responses ); + } + + // Convert no matter what (that way responseXXX fields are always set) + response = ajaxConvert( s, response, jqXHR, isSuccess ); + + // If successful, handle type chaining + if ( isSuccess ) { + + // Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode. + if ( s.ifModified ) { + modified = jqXHR.getResponseHeader( "Last-Modified" ); + if ( modified ) { + jQuery.lastModified[ cacheURL ] = modified; + } + modified = jqXHR.getResponseHeader( "etag" ); + if ( modified ) { + jQuery.etag[ cacheURL ] = modified; + } + } + + // if no content + if ( status === 204 || s.type === "HEAD" ) { + statusText = "nocontent"; + + // if not modified + } else if ( status === 304 ) { + statusText = "notmodified"; + + // If we have data, let's convert it + } else { + statusText = response.state; + success = response.data; + error = response.error; + isSuccess = !error; + } + } else { + + // Extract error from statusText and normalize for non-aborts + error = statusText; + if ( status || !statusText ) { + statusText = "error"; + if ( status < 0 ) { + status = 0; + } + } + } + + // Set data for the fake xhr object + jqXHR.status = status; + jqXHR.statusText = ( nativeStatusText || statusText ) + ""; + + // Success/Error + if ( isSuccess ) { + deferred.resolveWith( callbackContext, [ success, statusText, jqXHR ] ); + } else { + deferred.rejectWith( callbackContext, [ jqXHR, statusText, error ] ); + } + + // Status-dependent callbacks + jqXHR.statusCode( statusCode ); + statusCode = undefined; + + if ( fireGlobals ) { + globalEventContext.trigger( isSuccess ? "ajaxSuccess" : "ajaxError", + [ jqXHR, s, isSuccess ? success : error ] ); + } + + // Complete + completeDeferred.fireWith( callbackContext, [ jqXHR, statusText ] ); + + if ( fireGlobals ) { + globalEventContext.trigger( "ajaxComplete", [ jqXHR, s ] ); + + // Handle the global AJAX counter + if ( !( --jQuery.active ) ) { + jQuery.event.trigger( "ajaxStop" ); + } + } + } + + return jqXHR; + }, + + getJSON: function( url, data, callback ) { + return jQuery.get( url, data, callback, "json" ); + }, + + getScript: function( url, callback ) { + return jQuery.get( url, undefined, callback, "script" ); + } +} ); + +jQuery.each( [ "get", "post" ], function( i, method ) { + jQuery[ method ] = function( url, data, callback, type ) { + + // Shift arguments if data argument was omitted + if ( jQuery.isFunction( data ) ) { + type = type || callback; + callback = data; + data = undefined; + } + + // The url can be an options object (which then must have .url) + return jQuery.ajax( jQuery.extend( { + url: url, + type: method, + dataType: type, + data: data, + success: callback + }, jQuery.isPlainObject( url ) && url ) ); + }; +} ); + + +jQuery._evalUrl = function( url ) { + return jQuery.ajax( { + url: url, + + // Make this explicit, since user can override this through ajaxSetup (#11264) + type: "GET", + dataType: "script", + cache: true, + async: false, + global: false, + "throws": true + } ); +}; + + +jQuery.fn.extend( { + wrapAll: function( html ) { + var wrap; + + if ( this[ 0 ] ) { + if ( jQuery.isFunction( html ) ) { + html = html.call( this[ 0 ] ); + } + + // The elements to wrap the target around + wrap = jQuery( html, this[ 0 ].ownerDocument ).eq( 0 ).clone( true ); + + if ( this[ 0 ].parentNode ) { + wrap.insertBefore( this[ 0 ] ); + } + + wrap.map( function() { + var elem = this; + + while ( elem.firstElementChild ) { + elem = elem.firstElementChild; + } + + return elem; + } ).append( this ); + } + + return this; + }, + + wrapInner: function( html ) { + if ( jQuery.isFunction( html ) ) { + return this.each( function( i ) { + jQuery( this ).wrapInner( html.call( this, i ) ); + } ); + } + + return this.each( function() { + var self = jQuery( this ), + contents = self.contents(); + + if ( contents.length ) { + contents.wrapAll( html ); + + } else { + self.append( html ); + } + } ); + }, + + wrap: function( html ) { + var isFunction = jQuery.isFunction( html ); + + return this.each( function( i ) { + jQuery( this ).wrapAll( isFunction ? html.call( this, i ) : html ); + } ); + }, + + unwrap: function( selector ) { + this.parent( selector ).not( "body" ).each( function() { + jQuery( this ).replaceWith( this.childNodes ); + } ); + return this; + } +} ); + + +jQuery.expr.pseudos.hidden = function( elem ) { + return !jQuery.expr.pseudos.visible( elem ); +}; +jQuery.expr.pseudos.visible = function( elem ) { + return !!( elem.offsetWidth || elem.offsetHeight || elem.getClientRects().length ); +}; + + + + +jQuery.ajaxSettings.xhr = function() { + try { + return new window.XMLHttpRequest(); + } catch ( e ) {} +}; + +var xhrSuccessStatus = { + + // File protocol always yields status code 0, assume 200 + 0: 200, + + // Support: IE <=9 only + // #1450: sometimes IE returns 1223 when it should be 204 + 1223: 204 + }, + xhrSupported = jQuery.ajaxSettings.xhr(); + +support.cors = !!xhrSupported && ( "withCredentials" in xhrSupported ); +support.ajax = xhrSupported = !!xhrSupported; + +jQuery.ajaxTransport( function( options ) { + var callback, errorCallback; + + // Cross domain only allowed if supported through XMLHttpRequest + if ( support.cors || xhrSupported && !options.crossDomain ) { + return { + send: function( headers, complete ) { + var i, + xhr = options.xhr(); + + xhr.open( + options.type, + options.url, + options.async, + options.username, + options.password + ); + + // Apply custom fields if provided + if ( options.xhrFields ) { + for ( i in options.xhrFields ) { + xhr[ i ] = options.xhrFields[ i ]; + } + } + + // Override mime type if needed + if ( options.mimeType && xhr.overrideMimeType ) { + xhr.overrideMimeType( options.mimeType ); + } + + // X-Requested-With header + // For cross-domain requests, seeing as conditions for a preflight are + // akin to a jigsaw puzzle, we simply never set it to be sure. + // (it can always be set on a per-request basis or even using ajaxSetup) + // For same-domain requests, won't change header if already provided. + if ( !options.crossDomain && !headers[ "X-Requested-With" ] ) { + headers[ "X-Requested-With" ] = "XMLHttpRequest"; + } + + // Set headers + for ( i in headers ) { + xhr.setRequestHeader( i, headers[ i ] ); + } + + // Callback + callback = function( type ) { + return function() { + if ( callback ) { + callback = errorCallback = xhr.onload = + xhr.onerror = xhr.onabort = xhr.onreadystatechange = null; + + if ( type === "abort" ) { + xhr.abort(); + } else if ( type === "error" ) { + + // Support: IE <=9 only + // On a manual native abort, IE9 throws + // errors on any property access that is not readyState + if ( typeof xhr.status !== "number" ) { + complete( 0, "error" ); + } else { + complete( + + // File: protocol always yields status 0; see #8605, #14207 + xhr.status, + xhr.statusText + ); + } + } else { + complete( + xhrSuccessStatus[ xhr.status ] || xhr.status, + xhr.statusText, + + // Support: IE <=9 only + // IE9 has no XHR2 but throws on binary (trac-11426) + // For XHR2 non-text, let the caller handle it (gh-2498) + ( xhr.responseType || "text" ) !== "text" || + typeof xhr.responseText !== "string" ? + { binary: xhr.response } : + { text: xhr.responseText }, + xhr.getAllResponseHeaders() + ); + } + } + }; + }; + + // Listen to events + xhr.onload = callback(); + errorCallback = xhr.onerror = callback( "error" ); + + // Support: IE 9 only + // Use onreadystatechange to replace onabort + // to handle uncaught aborts + if ( xhr.onabort !== undefined ) { + xhr.onabort = errorCallback; + } else { + xhr.onreadystatechange = function() { + + // Check readyState before timeout as it changes + if ( xhr.readyState === 4 ) { + + // Allow onerror to be called first, + // but that will not handle a native abort + // Also, save errorCallback to a variable + // as xhr.onerror cannot be accessed + window.setTimeout( function() { + if ( callback ) { + errorCallback(); + } + } ); + } + }; + } + + // Create the abort callback + callback = callback( "abort" ); + + try { + + // Do send the request (this may raise an exception) + xhr.send( options.hasContent && options.data || null ); + } catch ( e ) { + + // #14683: Only rethrow if this hasn't been notified as an error yet + if ( callback ) { + throw e; + } + } + }, + + abort: function() { + if ( callback ) { + callback(); + } + } + }; + } +} ); + + + + +// Prevent auto-execution of scripts when no explicit dataType was provided (See gh-2432) +jQuery.ajaxPrefilter( function( s ) { + if ( s.crossDomain ) { + s.contents.script = false; + } +} ); + +// Install script dataType +jQuery.ajaxSetup( { + accepts: { + script: "text/javascript, application/javascript, " + + "application/ecmascript, application/x-ecmascript" + }, + contents: { + script: /\b(?:java|ecma)script\b/ + }, + converters: { + "text script": function( text ) { + jQuery.globalEval( text ); + return text; + } + } +} ); + +// Handle cache's special case and crossDomain +jQuery.ajaxPrefilter( "script", function( s ) { + if ( s.cache === undefined ) { + s.cache = false; + } + if ( s.crossDomain ) { + s.type = "GET"; + } +} ); + +// Bind script tag hack transport +jQuery.ajaxTransport( "script", function( s ) { + + // This transport only deals with cross domain requests + if ( s.crossDomain ) { + var script, callback; + return { + send: function( _, complete ) { + script = jQuery( " + var link = document.createElement('link'); + link.setAttribute('rel', 'stylesheet'); + link.setAttribute('href', 'static/js/google-prettify/prettify.css'); + document.head.appendChild(link); + var script = document.createElement('script'); + script.setAttribute('src', 'static/js/google-prettify/prettify.js'); + document.head.appendChild(script); +}; + + +/** + * Compute the absolute coordinates and dimensions of an HTML element. + * @param {!Element} element Element to match. + * @return {!Object} Contains height, width, x, and y properties. + * @private + */ +Code.getBBox_ = function(element) { + var height = element.offsetHeight; + var width = element.offsetWidth; + var x = 0; + var y = 0; + do { + x += element.offsetLeft; + y += element.offsetTop; + element = element.offsetParent; + } while (element); + return { + height: height, + width: width, + x: x, + y: y + }; +}; + + +/** + * Init on window load + * */ +window.addEventListener('load', Code.init); + diff --git a/blockly/_pv_1_4_0/webif/static/js/npm.js b/blockly/_pv_1_4_0/webif/static/js/npm.js new file mode 100755 index 000000000..bf6aa8060 --- /dev/null +++ b/blockly/_pv_1_4_0/webif/static/js/npm.js @@ -0,0 +1,13 @@ +// This file is autogenerated via the `commonjs` Grunt task. You can require() this file in a CommonJS environment. +require('../../js/transition.js') +require('../../js/alert.js') +require('../../js/button.js') +require('../../js/carousel.js') +require('../../js/collapse.js') +require('../../js/dropdown.js') +require('../../js/modal.js') +require('../../js/tooltip.js') +require('../../js/popover.js') +require('../../js/scrollspy.js') +require('../../js/tab.js') +require('../../js/affix.js') \ No newline at end of file diff --git a/blockly/_pv_1_4_0/webif/static/shblocks/sh_items.js b/blockly/_pv_1_4_0/webif/static/shblocks/sh_items.js new file mode 100755 index 000000000..c630e15ec --- /dev/null +++ b/blockly/_pv_1_4_0/webif/static/shblocks/sh_items.js @@ -0,0 +1,211 @@ +/** + * @license + * Visual Blocks Editor for smarthome.py + * + * Copyright 2015 Dirk Wallmeier + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * @fileoverview Variable blocks for Blockly. + * @author DW + */ +'use strict'; + +//goog.provide('Blockly.Blocks.sh_items'); +//goog.require('Blockly.Blocks'); + +Blockly.Blocks['sh_item_obj'] = { + init: function() { + var hiddenFieldPath = new Blockly.FieldTextInput("Path"); + hiddenFieldPath.setVisible(false); + var hiddenFieldType = new Blockly.FieldTextInput("Type"); + hiddenFieldType.setVisible(false); + var fixedFieldName = new Blockly.FieldTextInput("Name"); + this.appendDummyInput() + //.appendField("Item: ") + .appendField(fixedFieldName, "N") + .appendField(hiddenFieldPath, "P") + .appendField(hiddenFieldType, "T") + this.setOutput(true, "shItemType"); + this.setColour(210); + this.setTooltip(this.getFieldValue('P')); + this.setHelpUrl('http://www.example.com/'); + this.setEditable(false); + } +}; + +Blockly.Python['sh_item_obj'] = function(block) { + var iName = block.getFieldValue('N'); + var iPath = block.getFieldValue('P'); + + // TODO: Assemble Python into code variable. +// var code = 'sh.return_item("' + iPath + '")'; + var code = 'sh.items.return_item("' + iPath + '")'; + // TODO: Change ORDER_NONE to the correct strength. + return [code, Blockly.Python.ORDER_ATOMIC]; + //return code; +}; + + + +/*Blockly.Blocks['sh_item'] = { + /** + * Block for item + * @this Blockly.Block + * / + init: function() { + var itemlist = new Blockly.FieldTextInput('0'); + itemlist.setVisible(false); + var dropdown = new Blockly.FieldDropdown( function () { + var il = new Array(); + il = itemlist.getValue(); + if (il != '0') { il = eval("(function(){return " + il + ";})()");}; + return il; + } ); + this.setColour(340); + this.appendDummyInput() + .appendField(itemlist, 'ITEMLIST') + .appendField('Item') + .appendField(dropdown, 'ITEM'); + this.setOutput(true, "SHITEM"); + this.setTooltip('Gibt ein Item Objekt zurück.'); + }, +}; + +Blockly.Python['sh_item'] = function(block) { + // Variable getter. + var code = 'sh.' + block.getFieldValue('ITEM'); + return [code, Blockly.Python.ORDER_ATOMIC]; +}; +*/ + +Blockly.Blocks['sh_item_get'] = { + /** + * Block for item getter. -> this is a "Sensor" + * @this Blockly.Block + */ + init: function() { + this.setHelpUrl(''); + this.setColour(260); + this.appendValueInput("ITEMOBJECT") + .setCheck("shItemType") + .appendField("Wert von"); + this.setInputsInline(true); + this.setOutput(true); + this.setTooltip('Gibt den Wert des Items zurück.'); + } +}; + +Blockly.Python['sh_item_get'] = function(block) { + var itemobj = Blockly.Python.valueToCode(block, 'ITEMOBJECT', Blockly.Python.ORDER_ATOMIC) || 'item'; + var code = itemobj + '()'; + //return [code, Blockly.Python.ORDER_NONE]; + return code; +}; + + +Blockly.Blocks['sh_item_set'] = { + /** + * Block for item setter. + * https://blockly-demo.appspot.com/static/demos/blockfactory/index.html#7wv5ve + */ + init: function() { + this.setHelpUrl('http://www.example.com/'); + this.setColour(260); + this.appendValueInput("ITEMOJECT") + .setCheck("shItemType") + .appendField("setze"); + this.appendValueInput("VALUE") + .appendField("auf den Wert"); + this.setInputsInline(true); + this.setPreviousStatement(true); + this.setNextStatement(true); + this.setTooltip(''); + } +}; + +Blockly.Python['sh_item_set'] = function(block) { + var itemobject = Blockly.Python.valueToCode(block, 'ITEMOJECT', Blockly.Python.ORDER_ATOMIC) || 'item'; + var value = Blockly.Python.valueToCode(block, 'VALUE', Blockly.Python.ORDER_ATOMIC) || '0'; + // TODO: Assemble Python into code variable. + //var code = '...'; + var code = itemobject + '(' + value + ')\n'; + //return [code, Blockly.Python.ORDER_FUNCTION_CALL]; + return code; +}; + +Blockly.Blocks['sh_item_hasattr'] = { + init: function() { + this.appendDummyInput() + .appendField("das Item"); + this.appendValueInput("ITEM") + .setCheck("shItemType"); + this.appendDummyInput() + .appendField("hat das Attribut") + .appendField(new Blockly.FieldTextInput("default"), "ATTR"); + this.setInputsInline(true); + this.setOutput(true, "Boolean"); + this.setColour(120); + this.setTooltip(''); + this.setHelpUrl('http://www.example.com/'); + } +}; + +Blockly.Python['sh_item_hasattr'] = function(block) { + var value_item = Blockly.Python.valueToCode(block, 'ITEM', Blockly.Python.ORDER_ATOMIC); + var text_attr = block.getFieldValue('ATTR'); + // TODO: Assemble Python into code variable. + var code = '...'; + // TODO: Change ORDER_NONE to the correct strength. + var code = 'sh.iHasAttr(' + value_item + ', ' + text_attr +' )'; + return [code, Blockly.Python.ORDER_NONE]; + +}; + +/** +Blockly.Blocks['sh_item_attr'] = { + init: function() { + var attrlist = new Blockly.FieldTextInput('0'); + attrlist.setVisible(false); + var dropdown = new Blockly.FieldDropdown( function () { + var al = new Array(); + al = attrlist.getValue(); + if (al != '0') { al = eval("(function(){return " + al + ";})()");}; + return al; + } ); + this.appendDummyInput() + .appendField("Attribut") + .appendField(dropdown, "ATTR") + .appendField("von Item"); + this.appendValueInput("ITEM") + .setCheck("shItemType"); + this.setInputsInline(true); + this.setOutput(true, null); + this.setColour(120); + this.setTooltip(''); + this.setHelpUrl('http://www.example.com/'); + } +}; + +Blockly.Python['sh_item_attr'] = function(block) { + var dropdown_attr = block.getFieldValue('ATTR'); + var value_item = Blockly.Python.valueToCode(block, 'ITEM', Blockly.Python.ORDER_ATOMIC); + // TODO: Assemble Python into code variable. + var code = '...'; + // TODO: Change ORDER_NONE to the correct strength. + return [code, Blockly.Python.ORDER_NONE]; +}; + +*/ \ No newline at end of file diff --git a/blockly/_pv_1_4_0/webif/static/shblocks/sh_logic.js b/blockly/_pv_1_4_0/webif/static/shblocks/sh_logic.js new file mode 100755 index 000000000..28f7b64eb --- /dev/null +++ b/blockly/_pv_1_4_0/webif/static/shblocks/sh_logic.js @@ -0,0 +1,117 @@ +/** + * @license + + + + + */ +'use strict'; +//goog.provide('Blockly.Blocks.sh_logic'); +//goog.require('Blockly.Blocks'); + + +/** + * https://blockly-demo.appspot.com/static/demos/blockfactory/index.html#ojesy8 + */ +Blockly.Blocks['shlogic_by'] = { + init: function() { + this.setHelpUrl('http://www.example.com/'); + this.setColour(210); + this.appendDummyInput() + .appendField("Auslöser (trigger['by'])"); + this.setOutput(true); + this.setTooltip(''); + } +}; +Blockly.Python['shlogic_by'] = function(block) { + var code = "trigger['by']"; + // TODO: Change ORDER_NONE to the correct strength. + return [code, Blockly.Python.ORDER_NONE]; +}; + + +/** + * https://blockly-demo.appspot.com/static/demos/blockfactory/index.html#umj2u6 + */ +Blockly.Blocks['shlogic_value'] = { + init: function() { + this.setHelpUrl('http://www.example.com/'); + this.setColour(210); + this.appendDummyInput() + .appendField("Auslöser (trigger['value'])"); + this.setOutput(true); + this.setTooltip(''); + } +}; +Blockly.Python['shlogic_value'] = function(block) { + var code = "trigger['value']"; + // TODO: Change ORDER_NONE to the correct strength. + return [code, Blockly.Python.ORDER_NONE]; +}; + + +/** + * https://blockly-demo.appspot.com/static/demos/blockfactory/index.html#p3ajqk + */ +Blockly.Blocks['shlogic_source'] = { + init: function() { + this.setHelpUrl('http://www.example.com/'); + this.setColour(210); + this.appendDummyInput() + .appendField("Auslöser (trigger['Source'])"); + this.setOutput(true); + this.setTooltip(''); + } +}; +Blockly.Python['shlogic_source'] = function(block) { + var code = "trigger['source']"; + // TODO: Change ORDER_NONE to the correct strength. + return [code, Blockly.Python.ORDER_NONE]; +}; + + +/** + * https://blockly-demo.appspot.com/static/demos/blockfactory/index.html#8jdhtt + */ +Blockly.Blocks['shlogic_dest'] = { + init: function() { + this.setHelpUrl('http://www.example.com/'); + this.setColour(210); + this.appendDummyInput() + .appendField("Auslöser (trigger['Dest'])"); + this.setOutput(true); + this.setTooltip(''); + } +}; +Blockly.Python['shlogic_dest'] = function(block) { + var code = "trigger['dest']"; + // TODO: Change ORDER_NONE to the correct strength. + return [code, Blockly.Python.ORDER_NONE]; +}; + + +/** + * https://blockly-demo.appspot.com/static/demos/blockfactory/index.html#r74ibg + */ +/** +Blockly.Blocks['shlogic_trigger'] = { + init: function() { + this.setHelpUrl('http://www.example.com/'); + this.setColour(210); + this.appendDummyInput() + .appendField("diese Logik auslösen um "); + this.appendValueInput("DATETIME"); + this.setInputsInline(true); + this.setPreviousStatement(true); + this.setNextStatement(true); + this.setTooltip(''); + } +}; +Blockly.Python['shlogic_trigger'] = function(block) { + var value_datetime = Blockly.Python.valueToCode(block, 'DATETIME', Blockly.Python.ORDER_ATOMIC); + // TODO: Assemble Python into code variable. + var code = '...'; + return code; +}; + */ + diff --git a/blockly/_pv_1_4_0/webif/static/shblocks/sh_logics.js b/blockly/_pv_1_4_0/webif/static/shblocks/sh_logics.js new file mode 100755 index 000000000..4d0392e38 --- /dev/null +++ b/blockly/_pv_1_4_0/webif/static/shblocks/sh_logics.js @@ -0,0 +1,476 @@ +/** + * @license + * Visual Blocks Editor + * + * Copyright 2012 Google Inc. + * https://developers.google.com/blockly/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * @fileoverview Logic blocks for Blockly. + * @author q.neutron@gmail.com (Quynh Neutron) + */ +'use strict'; + +//goog.provide('Blockly.Blocks.sh_trigger'); +//goog.require('Blockly.Blocks'); + + +/** + * Logic main block + */ +Blockly.Blocks['sh_logic_main'] = { + /** + * Block for if/elseif/else condition. + * @this Blockly.Block + */ + init: function() { +/** + Blockly.HSV_SATURATION = 0.45; + Blockly.HSV_VALUE = 0.65; + */ + this.setColour(125); + this.appendValueInput("LOGIC") + .setCheck("shItemType") + .setAlign(Blockly.ALIGN_LEFT) + .appendField("Logik") + .appendField(new Blockly.FieldTextInput("new_logic"), 'LOGIC_NAME') + .appendField('(Dateiname zum speichern ohne Extension)'); + this.appendStatementInput('DO'); +// this.appendStatementInput('DO') +// .appendField('starte'); + this.appendDummyInput() + .appendField(new Blockly.FieldCheckbox("TRUE"), "ACTIVE") + .appendField(new Blockly.FieldTextInput("Kommentar"), "COMMENT"); + + this.setPreviousStatement(false); + this.setNextStatement(false); + this.setTooltip('Block wird ausgeführt, sobald sich der Wert des Triggers ändert.'); + } +}; + + +function GetTriggerComment(trigger_block) +{ + var comment = ''; + var trigger_comment = trigger_block.getFieldValue('COMMENT'); + if (trigger_comment != 'Kommentar') { + comment += trigger_comment; + }; + return comment.trim(); +}; + +function GetTrigger(trigger_block) +{ + var trigger = ''; + var trigger_id = trigger_block.getFieldValue('NAME'); + if (trigger_block.data == 'sh_trigger_cycle') { + var trigger_id= trigger_block.getFieldValue('NAME'); + trigger += ' cycle: ' + trigger_block.getFieldValue('TRIG_CYCLE'); + }; + if (trigger_block.data == 'sh_trigger_item') { + var trigger_id= trigger_block.getFieldValue('NAME'); + var itemcode = Blockly.Python.valueToCode(trigger_block, 'TRIG_ITEM', Blockly.Python.ORDER_ATOMIC); + var itemid = itemcode.split('"')[1] + trigger += ' watch_item: ' + itemid; + }; + if (trigger_block.data == 'sh_trigger_sun') { + var offset = trigger_block.getFieldValue('OFFSET'); + var plusminus = trigger_block.getFieldValue('PLUSMINUS'); + var sun = trigger_block.getFieldValue('SUN'); + trigger += ' crontab: ' + sun + plusminus + offset; + }; + if (trigger_block.data == 'sh_trigger_daily') { +// var trigger_id= trigger_block.getFieldValue('NAME'); + var hh = trigger_block.getFieldValue('HH'); + var mm = trigger_block.getFieldValue('MM'); + trigger += ' crontab: ' + + mm + ' ' + hh + ' * *'; + }; + if (trigger_block.data == 'sh_trigger_init') { + trigger += ' crontab: init'; + }; + if (trigger_id != '' && trigger_id != 'trigger_id') + { + trigger += ' = ' + trigger_id + }; + return trigger; +}; + +function GetMultiTriggers(trigger_block) +{ + var cr_list = []; + var crc_list = []; + var wi_list = []; + var wic_list = []; + var contab_triggers = ['sh_trigger_sun', 'sh_trigger_daily', 'sh_trigger_init']; + var next_block = trigger_block; + + while (next_block != null) { + if (next_block.data != '') + { + if (contab_triggers.indexOf(next_block.data) > -1) + { + var trigger = GetTrigger(next_block); + if (trigger.trim() != '') { + cr_list.push(trigger.split(':')[1].trim()); + }; + crc_list.push(GetTriggerComment(next_block)); + }; + if (next_block.data == 'sh_trigger_item') + { + var trigger = GetTrigger(next_block); + if (trigger.trim() != '') { + wi_list.push(trigger.split(':')[1].trim()); + }; + wic_list.push(GetTriggerComment(next_block)); + }; + }; + var next_block = next_block.getNextBlock(); + }; + return [cr_list, crc_list, wi_list, wic_list]; +}; + +function NextLevel(trigger_block, logicname, ignore_crontab, ignore_watchitem) +{ + var tr_insert = '' + var tr_comment = '' + if (trigger_block != null) { + if (trigger_block.data != null) { + var comment = GetTriggerComment(trigger_block) + var trigger = GetTrigger(trigger_block); + if (ignore_crontab && (trigger.trim().substring(0,8) == 'crontab:')) + { + trigger = ''; + }; + if (ignore_watchitem && (trigger.trim().substring(0,11) == 'watch_item:')) + { + trigger = ''; + }; + if (trigger.trim() != '') { + tr_insert += '#trigger#'+logicname+'#filename: '+logicname+'.py#' + trigger.trim() + '#' + comment + '\n'; + var line = trigger; + if (comment != '') { + line = line.padEnd(50) + ' # ' + comment + }; + tr_comment += line + '\n'; + }; + + var next_block = trigger_block.getNextBlock(); + var next = NextLevel(next_block, logicname, ignore_crontab, ignore_watchitem); + tr_insert += next[0]; + tr_comment += next[1]; + }; + return [tr_insert, tr_comment]; + }; +}; + +Blockly.Python['sh_logic_main'] = function(block) +{ + this.data = 'sh_logic_main' + var trigger_block = block.getChildren(); + var triggerid = Blockly.Python.variableDB_.getDistinctName('trigger_id', Blockly.Variables.NAME_TYPE); + var itemcode = Blockly.Python.valueToCode(block, 'TRIG_ITEM', Blockly.Python.ORDER_ATOMIC); + var itemid = itemcode.split('"')[1] + //var item = block.getFieldValue('TRIG_ITEM'); + var branch = Blockly.Python.statementToCode(block, 'DO') ; + //var branch = Blockly.Python.statementToCode(block, 'DO') || ' pass\n'; + var checkbox_active = (block.getFieldValue('ACTIVE') == 'TRUE') ? 'True' : 'False'; + var text_comment = block.getFieldValue('COMMENT'); + + var triggerid = block.getFieldValue('NAME'); + var itemcode = Blockly.Python.valueToCode(block, 'TRIG_ITEM', Blockly.Python.ORDER_ATOMIC); + var itemid = itemcode.split('"')[1] + + var code = ''; + var trigger = ''; + var logicname = block.getFieldValue('LOGIC_NAME').toLowerCase().replace(" ", "_"); + block.setFieldValue(logicname, 'LOGIC_NAME'); + + var active = block.getFieldValue('ACTIVE'); + if (active == 'TRUE') { + active = 'True'; + } else { + active = 'False'; + }; + + if (text_comment.length > 0) { + code += '#comment#'+logicname+'#filename: '+logicname+'.py#active: ' + active + '#' + text_comment + '\n'; + }; + + var tr_list = GetMultiTriggers(trigger_block[0]); + var tr_crontab_list = tr_list[0]; + var tr_crontabc_list = tr_list[1]; + var tr_watchitem_list = tr_list[2]; + var tr_watchitemc_list = tr_list[3]; + + if (trigger_block.length > 0) { + var next = NextLevel(trigger_block[0], logicname, (tr_crontab_list.length > 1), (tr_watchitem_list.length > 1)); + code += next[0]; + }; + + if (tr_crontab_list.length > 1) + { + var tr_list = ''; + var co_list = ''; + for (var t in tr_crontab_list) { + if (t > 0) { + tr_list += ','; + co_list += ','; + }; + tr_list += "'"+tr_crontab_list[t]+"'"; + co_list += "'"+tr_crontabc_list[t]+"'"; + }; + code += '#trigger#'+logicname+'#filename: '+logicname+'.py#crontab: [' + tr_list + ']#[' + co_list + ']\n'; + }; + + if (tr_watchitem_list.length > 1) + { + var tr_list = ''; + var co_list = ''; + for (var t in tr_watchitem_list) { + if (t > 0) { + tr_list += ','; + co_list += ','; + }; + tr_list += "'"+tr_watchitem_list[t]+"'"; + co_list += "'"+tr_watchitemc_list[t]+"'"; + }; + code += '#trigger#'+logicname+'#filename: '+logicname+'.py#watch_item: [' + tr_list + ']#[' + co_list + ']\n'; + }; + + code += '"""\n' + 'Logic '+ logicname + '.py\n'; + code += '\n' + text_comment + '\n'; + + code += "\nTHIS FILE WAS GENERATED FROM A BLOCKY LOGIC WORKSHEET - DON'T EDIT THIS FILE, use the Blockly plugin instead !\n" + if (next[1] != '') { + var trigger_comment = trigger_block[0].getFieldValue('COMMENT'); + code += '\nto be configured in /etc/logic.yaml:\n'; + code += "\n"+logicname+":\n"; + var line = " filename: "+logicname+".py" + if (text_comment != '') { + line = line.padEnd(50) + ' # ' + text_comment + }; + code += line + '\n'; + code += next[1]; + }; + + if (tr_watchitem_list.length > 1) + { + code += ' watch_item:\n' + for (var t in tr_watchitem_list) { + code += ' - ' + tr_watchitem_list[t] + '\n'; + }; + }; + if (tr_crontab_list.length > 1) + { + code += ' crontab:\n' + for (var t in tr_crontab_list) { + code += ' - ' + tr_crontab_list[t] + '\n'; + }; + }; + code += '"""\n'; + + code += "logic_active = "+ active +"\n"; + code += "if (logic_active == True):\n"; + //code += " logger.info('ITEM TRIGGER id: \{\}, value: \{\}'.format(logic.name, trigger['value'] )) \n"; + code += branch; + return code + "\n\n"; +}; + + +/** + * Trigger die Logic bei Änderung des Items + */ +Blockly.Blocks['sh_trigger_item'] = { + /** + * Block for if/elseif/else condition. + * @this Blockly.Block + */ + init: function() { + this.data = 'sh_trigger_item' + this.setColour(190); + this.appendValueInput("TRIG_ITEM") + .setCheck("shItemType") + .setAlign(Blockly.ALIGN_LEFT) + .appendField("Trigger: Auslösen bei Änderung von"); +// this.appendStatementInput('DO') +// .appendField('starte'); +// this.appendDummyInput() +// .appendField(new Blockly.FieldCheckbox("TRUE"), "ACTIVE") + this.appendDummyInput() + .appendField("als Trigger") + .appendField(new Blockly.FieldTextInput("trigger_id"), "NAME"); + this.appendDummyInput() + .appendField("Kommentar") + .appendField(new Blockly.FieldTextInput(""), "COMMENT"); + + this.setInputsInline(false); + this.setPreviousStatement(true); + this.setNextStatement(true); + this.setTooltip('Block wird ausgeführt, sobald sich der Wert des Triggers ändert.'); + } +}; + +Blockly.Python['sh_trigger_item'] = function(block) +{ + var code = ''; + return code; +}; + + +/** + * Trigger ... alle x sec. + */ +Blockly.Blocks['sh_trigger_cycle'] = { + /** + * Block for + * @this Blockly.Block + */ + init: function() { + this.data = 'sh_trigger_cycle'; + this.setColour(190); + this.appendDummyInput() + .appendField('Trigger: alle') +// .appendField(new Blockly.FieldTextInput('60', +// Blockly.FieldTextInput.nonnegativeIntegerValidator), 'TRIG_CYCLE') + .appendField(new Blockly.FieldNumber(60, 0), 'TRIG_CYCLE') + .appendField('Sekunden auslösen') +// this.appendDummyInput() + .appendField("als Trigger") + .appendField(new Blockly.FieldTextInput("trigger_id"), "NAME"); + this.appendDummyInput() + .appendField("Kommentar") + .appendField(new Blockly.FieldTextInput(""), "COMMENT"); + this.setInputsInline(false); + this.setPreviousStatement(true); + this.setNextStatement(true); + this.setTooltip('Block wird nach vorgegebener Zeit wiederholt ausgeführt.'); + } +}; + +Blockly.Python['sh_trigger_cycle'] = function(block) { + var code = '' + return code; +}; + +/** + * Trigger vor/nach Sonnen-Auf-/Untergang. + */ +Blockly.Blocks['sh_trigger_sun'] = { + /** + * Block for + * @this Blockly.Block + */ + init: function() { + this.data = 'sh_trigger_sun'; + this.setColour(190); + this.appendDummyInput() + .appendField('Trigger (crontab): Auslösen') +// .appendField(new Blockly.FieldTextInput('0', Blockly.FieldTextInput.nonnegativeIntegerValidator), 'OFFSET') + .appendField(new Blockly.FieldNumber(0, 0), 'OFFSET') + .appendField('Minuten') + .appendField(new Blockly.FieldDropdown( [['vor', '-'], ['nach', '+']] ), 'PLUSMINUS') + .appendField('Sonnen-') + .appendField(new Blockly.FieldDropdown( [['Aufgang', 'sunrise'], ['Untergang', 'sunset']] ), 'SUN') + .appendField("als Trigger") + .appendField(new Blockly.FieldTextInput("trigger_id"), "NAME"); + this.appendDummyInput() + .appendField("Kommentar") + .appendField(new Blockly.FieldTextInput(""), "COMMENT"); + this.setInputsInline(false); + this.setPreviousStatement(true); + this.setNextStatement(true); + this.setTooltip('Block wird vor/nach Sonnenaufgang/Sonnenuntergang ausgeführt.'); + } +}; + +Blockly.Python['sh_trigger_sun'] = function(block) +{ + var code = ''; + return code; +}; + + +/** + * Trigger taeglich um HH:MM Uhr + */ +Blockly.Blocks['sh_trigger_daily'] = { + /** + * Block for + * @this Blockly.Block + */ + init: function() { + this.data = 'sh_trigger_daily'; + this.setColour(190); + this.appendDummyInput() + .appendField('Trigger (crontab): Jeden Tag ') + .appendField('um') +// .appendField(new Blockly.FieldTextInput('0', Blockly.FieldTextInput.nonnegativeIntegerValidator), 'HH') + .appendField(new Blockly.FieldNumber(0, 0), 'HH') + .appendField(':') +// .appendField(new Blockly.FieldTextInput('0', Blockly.FieldTextInput.nonnegativeIntegerValidator), 'MM') + .appendField(new Blockly.FieldNumber(0, 0), 'MM') + .appendField('Uhr') +// this.appendDummyInput() +// .appendField(new Blockly.FieldCheckbox("TRUE"), "ACTIVE"); + .appendField("als Trigger") + .appendField(new Blockly.FieldTextInput("trigger_id"), "NAME"); + this.appendDummyInput() + .appendField("Kommentar") + .appendField(new Blockly.FieldTextInput(""), "COMMENT"); + this.setInputsInline(false); + this.setPreviousStatement(true); + this.setNextStatement(true); + this.setTooltip('Block wird täglich zur gegebenen Stunde ausgeführt.'); + } +}; + +Blockly.Python['sh_trigger_daily'] = function(block) +{ + var code = ''; + return code; +}; + + +/** + * Trigger bei Initialisierung auslösen + */ +Blockly.Blocks['sh_trigger_init'] = { + /** + * Block for + * @this Blockly.Block + */ + init: function() { + this.data = 'sh_trigger_init'; + this.setColour(190); + this.appendDummyInput() + .appendField('Trigger (crontab): Bei Initialisierung auslosen, ') + .appendField("als Trigger") + .appendField(new Blockly.FieldTextInput("Init"), "NAME"); + this.appendDummyInput() + .appendField("Kommentar") + .appendField(new Blockly.FieldTextInput(""), "COMMENT"); + this.setInputsInline(false); + this.setPreviousStatement(true); + this.setNextStatement(true); + this.setTooltip('Block wird bei der Initialisierung ausgeführt.'); + } +}; + +Blockly.Python['sh_trigger_init'] = function(block) +{ + var code = ''; + return code; +}; diff --git a/blockly/_pv_1_4_0/webif/static/shblocks/sh_notify.js b/blockly/_pv_1_4_0/webif/static/shblocks/sh_notify.js new file mode 100755 index 000000000..b62facb43 --- /dev/null +++ b/blockly/_pv_1_4_0/webif/static/shblocks/sh_notify.js @@ -0,0 +1,95 @@ +/** + * @license + + + + + */ +'use strict'; +//goog.provide('Blockly.Blocks.sh_logic'); +//goog.require('Blockly.Blocks'); + +/** + * https://blockly-demo.appspot.com/static/demos/blockfactory/index.html#c2zkf2 + */ +Blockly.Blocks['shnotify_email'] = { + init: function() { + this.setHelpUrl('http://www.example.com/'); + this.setColour(210); + this.appendDummyInput() + .appendField("eine eMail senden an") + .appendField(new Blockly.FieldTextInput("mail@smarthome.py"), "TO") + .appendField("mit Betreff") + .appendField(new Blockly.FieldTextInput("Nachricht von SmartHome"), "SUBJECT") + .appendField("und Text:"); + this.appendValueInput("TEXT") + .setCheck("String"); + this.setInputsInline(true); + this.setPreviousStatement(true); + this.setNextStatement(true); + this.setTooltip(''); + } +}; +Blockly.Python['shnotify_email'] = function(block) { + var to = block.getFieldValue('TO'); + var subject = block.getFieldValue('SUBJECT'); + var text = Blockly.Python.valueToCode(block, 'TO', Blockly.Python.ORDER_ATOMIC); + // TODO: Assemble Python into code variable. + var code = 'if sh.mail: sh.mail('+to+', '+subject+', '+text+')'; + return code; +}; + + +Blockly.Blocks['shnotify_prowl'] = { + /** + * Block for + */ + init: function() { + this.setColour(340); + this.appendDummyInput().appendField('Sende Nachricht mit PROWL:'); + }, +}; + + +/** + * https://blockly-demo.appspot.com/static/demos/blockfactory/index.html#ptwi98 + */ +Blockly.Blocks['shnotify_nma'] = { + init: function() { + this.setHelpUrl('http://www.example.com/'); + this.setColour(210); + this.appendDummyInput() + .appendField("eine NMA Nachricht senden") + .appendField("mit Betreff") + .appendField(new Blockly.FieldTextInput("Nachricht von SmartHome"), "SUBJECT") + .appendField("und Text:"); + this.appendValueInput("TEXT") + .setCheck("String"); + this.setInputsInline(true); + this.setPreviousStatement(true); + this.setNextStatement(true); + this.setTooltip(''); + } +}; +Blockly.Python['shnotify_nma'] = function(block) { + var text_subject = block.getFieldValue('SUBJECT'); + var value_text = Blockly.Python.valueToCode(block, 'TEXT', Blockly.Python.ORDER_ATOMIC); + // TODO: Assemble Python into code variable. + var code = '...'; + return code; +}; + + +/** + * https:// + */ +Blockly.Blocks['shnotify_pushbullit'] = { + /** + * Block for + */ + init: function() { + this.setColour(340); + this.appendDummyInput().appendField('Sende Nachricht mit Pushbullit:'); + }, +}; + diff --git a/blockly/_pv_1_4_0/webif/static/shblocks/sh_time.js b/blockly/_pv_1_4_0/webif/static/shblocks/sh_time.js new file mode 100755 index 000000000..be835843a --- /dev/null +++ b/blockly/_pv_1_4_0/webif/static/shblocks/sh_time.js @@ -0,0 +1,123 @@ +/** + * @license + + + + + + */ +'use strict'; +//goog.provide('Blockly.Blocks.sh_logic'); +//goog.require('Blockly.Blocks'); + + +/** + * https://blockly-demo.appspot.com/static/demos/blockfactory/index.html#dngzfj + */ +Blockly.Blocks['shtime_now'] = { + init: function() { + this.setHelpUrl('http://www.example.com/'); + this.setColour(210); + this.appendDummyInput() + .appendField("Zeit: jetzt"); + this.setInputsInline(true); + this.setOutput(true, "DateTime"); + this.setTooltip(''); + } +}; +Blockly.Python['shtime_now'] = function(block) { +// var code = 'sh.now()'; + var code = 'sh.shtime.now()'; + // TODO: Change ORDER_NONE to the correct strength. + return [code, Blockly.Python.ORDER_NONE]; +}; + + +/** + * https://blockly-demo.appspot.com/static/demos/blockfactory/index.html#rvch7e + */ +Blockly.Blocks['shtime_time'] = { + init: function() { + var hh_mmValidator = function(text) { + if(text === null) { + return null; + } + text = text.replace(/O/ig, '0'); + text = text.replace(/,/g, ':'); + var hh_mm = text.split(':'); + if (hh_mm.length !== 2) { + return null; + } + return String('00'+hh_mm[0]).slice(-2) + ':' + String('00'+hh_mm[1]).slice(-2); + }; + this.setHelpUrl('http://www.example.com/'); + this.setColour(210); + this.appendDummyInput() + .appendField(new Blockly.FieldTextInput("12:00", hh_mmValidator ), "TIME") + .appendField("Uhr"); + this.setInputsInline(true); + this.setOutput(true, "DateTime"); + this.setTooltip(''); + } +}; + +Blockly.Python['shtime_time'] = function(block) { + var text_time = block.getFieldValue('TIME'); + var code = 'datetime.strptime("'+text_time+'", "%H:%M")'; + // TODO: Change ORDER_NONE to the correct strength. + return [code, Blockly.Python.ORDER_NONE]; +}; + + +/** + * https://blockly-demo.appspot.com/static/demos/blockfactory/index.html#5yobn6 + */ +Blockly.Blocks['shtime_sunpos'] = { + init: function() { + this.setHelpUrl('http://www.example.com/'); + this.setColour(300); + this.appendValueInput("DELTA") + .appendField(new Blockly.FieldDropdown([["Azimut Winkel des Sonnenstands", "0"], + ["Altitude Winkel des Sonnenstands", "1"]]), + "AA") + .appendField(new Blockly.FieldDropdown([["+", "+"], + ["-", "-"]]), "PM"); + this.appendDummyInput() + .appendField("Minuten"); + this.setInputsInline(true); + this.setOutput(true, "Number"); + this.setTooltip(''); + } +}; +Blockly.Python['shtime_sunpos'] = function(block) { + var delta = Blockly.Python.valueToCode(block, 'DELTA', Blockly.Python.ORDER_ATOMIC); + var aa = block.getFieldValue('AA'); + var pm = block.getFieldValue('PM'); + if (delta === '') { pm = ''; }; + var code = 'sh.sun.pos('+pm+delta+')['+aa+']'; + // TODO: Change ORDER_NONE to the correct strength. + return [code, Blockly.Python.ORDER_NONE]; +}; + + + +Blockly.Blocks['shtime_moon'] = { + /** + * Block for + */ + init: function() { + this.setColour(340); + this.appendDummyInput().appendField('Mond:'); + }, +}; + +Blockly.Blocks['shtime_auto'] = { + /** + * Block for + */ + init: function() { + this.setColour(340); + this.appendDummyInput().appendField('Autotimer:'); + }, +}; + diff --git a/blockly/_pv_1_4_0/webif/static/shblocks/sh_tools.js b/blockly/_pv_1_4_0/webif/static/shblocks/sh_tools.js new file mode 100755 index 000000000..aa6773a3f --- /dev/null +++ b/blockly/_pv_1_4_0/webif/static/shblocks/sh_tools.js @@ -0,0 +1,115 @@ +/** + * @license + + + + */ +'use strict'; +//goog.provide('Blockly.Blocks.sh_tools'); +//goog.require('Blockly.Blocks'); + +/** + * https://blockly-demo.appspot.com/static/demos/blockfactory/index.html#prgbjr + */ +Blockly.Blocks['shtools_logger'] = { + init: function() { + this.setHelpUrl('http://www.example.com/'); + this.setColour(45); + this.appendDummyInput() + .appendField("schreibe ins Log"); + this.appendValueInput("LOGTEXT") + .setCheck("String"); + this.appendDummyInput() + .appendField("mit log-level") + .appendField(new Blockly.FieldDropdown([["debug", "DEBUG"], ["info", "INFO"], ["warning", "WARNING"], ["error", "ERROR"], ["critical", "CRITICAL"]]), "LOGLEVEL"); + this.setInputsInline(true); + this.setPreviousStatement(true); + this.setNextStatement(true); + this.setTooltip(''); + } +}; +Blockly.Python['shtools_logger'] = function(block) { + var loglevel = block.getFieldValue('LOGLEVEL').toLowerCase(); + var logtext = Blockly.Python.valueToCode(block, 'LOGTEXT', Blockly.Python.ORDER_NONE) || '\'\''; + var code = "logger." + loglevel + "(" + logtext + ")\n"; + return code; +}; + + +/** + * https://blockly-demo.appspot.com/static/demos/blockfactory/index.html#ipzxr2 + */ +Blockly.Blocks['shtools_dewpoint'] = { + init: function() { + this.setHelpUrl('http://www.example.com/'); + this.setColour(210); + this.appendDummyInput() + .appendField("Taupunkt bei") + this.appendValueInput("TEMP") + .appendField("°C Temperatur und ") + this.appendValueInput("HUM") + .appendField("% rel.Feuchtigkeit"); + this.setInputsInline(true); + this.setOutput(true, "Number"); + this.setTooltip(''); + } +}; +Blockly.Python['shtools_dewpoint'] = function(block) { + var value_hum = Blockly.Python.valueToCode(block, 'HUM', Blockly.Python.ORDER_ATOMIC); + var value_temp = Blockly.Python.valueToCode(block, 'TEMP', Blockly.Python.ORDER_ATOMIC); + var code = 'sh.tools.dewpoint(' + value_temp + ', ' + value_hum + ')'; + // TODO: Change ORDER_NONE to the correct strength. + return [code, Blockly.Python.ORDER_NONE]; +}; + + +/** + * https://blockly-demo.appspot.com/static/demos/blockfactory/index.html#onut2y + */ +Blockly.Blocks['shtools_fetchurl'] = { + init: function() { + this.setHelpUrl('http://www.example.com/'); + this.setColour(210); + this.appendDummyInput() + .appendField("open URL") + .appendField(new Blockly.FieldTextInput("http://"), "URL"); + this.setInputsInline(true); + this.setOutput(true, "String"); + this.setTooltip(''); + } +}; +Blockly.Python['shtools_fetchurl'] = function(block) { + var text_url = block.getFieldValue('URL'); + var code = 'sh.tools.fetch_url("' + text_url + '")' ; + // TODO: Change ORDER_NONE to the correct strength. + return [code, Blockly.Python.ORDER_NONE]; +}; + +/** + * https://blockly-demo.appspot.com/static/demos/blockfactory/index.html#eqhv9d + */ +Blockly.Blocks['shtools_fetchurl2'] = { + init: function() { + this.setHelpUrl('http://www.example.com/'); + this.setColour(210); + this.appendDummyInput() + .appendField("open URL") + .appendField(new Blockly.FieldTextInput("http://"), "URL") + .appendField(" mit username") + .appendField(new Blockly.FieldTextInput(""), "USER") + .appendField(": password") + .appendField(new Blockly.FieldTextInput(""), "PASSWORD"); + this.setInputsInline(true); + this.setOutput(true, "String"); + this.setTooltip(''); + } +}; +Blockly.Python['shtools_fetchurl2'] = function(block) { + var text_url = block.getFieldValue('URL'); + var text_user = block.getFieldValue('USER'); + var text_password = block.getFieldValue('PASSWORD'); + var code = 'sh.tools.fetch_url("' + text_url + '", "' + text_user + '", "' + text_password + '")'; + // TODO: Change ORDER_NONE to the correct strength. + return [code, Blockly.Python.ORDER_NONE]; +}; + diff --git a/blockly/_pv_1_4_0/webif/templates/base.html b/blockly/_pv_1_4_0/webif/templates/base.html new file mode 100755 index 000000000..4e7ea69e1 --- /dev/null +++ b/blockly/_pv_1_4_0/webif/templates/base.html @@ -0,0 +1,57 @@ +{% block doc -%} + + + + + + + +{% endblock html_attribs %} +{%- block html %} + + {%- block head %} + {% block title %}{% endblock title %} + + {%- block metas %} + + {# + + + #} + {%- endblock metas %} + + {%- block styles %} + + + + + + + + + + + + {%- endblock styles %} + {% block scripts %} + + + + + + {%- endblock scripts %} + {%- endblock head %} + + + {% block body -%} + {% block navbar %} + {%- endblock navbar %} + {% block content -%} + {%- endblock content %} + + {%- endblock body %} + +{%- endblock html %} + +{% endblock doc -%} diff --git a/blockly/_pv_1_4_0/webif/templates/blockly.html b/blockly/_pv_1_4_0/webif/templates/blockly.html new file mode 100755 index 000000000..ec829f053 --- /dev/null +++ b/blockly/_pv_1_4_0/webif/templates/blockly.html @@ -0,0 +1,108 @@ + + +{% extends "base.html" %} + +{% block content %} + +{% include "logics_blockly_toolbox.html" %} + + + + + + + + + + + + + + + + +
      +

      Blockly {{ _('Logik-Editor') }} {{ _('für SmartHomeNG') }} +

      +
      + + + + + + + + +
      Blocks Python +
      + {% if cmd != 'edit' and cmd != 'new' %} + + + + + + + {% else %} + + + + + {% endif %} + +
      +
      +
      +
      +
      +
      
      +  
      +  
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +{% endblock %}
      diff --git a/blockly/_pv_1_4_0/webif/templates/logics_blockly_toolbox.html b/blockly/_pv_1_4_0/webif/templates/logics_blockly_toolbox.html
      new file mode 100755
      index 000000000..6193b5890
      --- /dev/null
      +++ b/blockly/_pv_1_4_0/webif/templates/logics_blockly_toolbox.html
      @@ -0,0 +1,292 @@
      +
      diff --git a/blockly/_pv_1_4_0/webif/templates/new.blockly b/blockly/_pv_1_4_0/webif/templates/new.blockly
      new file mode 100755
      index 000000000..95b741298
      --- /dev/null
      +++ b/blockly/_pv_1_4_0/webif/templates/new.blockly
      @@ -0,0 +1 @@
      +newFALSEVorlage für eine neue Logiksh_logic_mainInitTrigger Beispiel: Bei der Initialisierung auslösensh_trigger_initWARNINGBeispiel: Logeintrag der Logik
      \ No newline at end of file
      
      From bcc7fe9b562091f8184b918094ce381ccc160c98 Mon Sep 17 00:00:00 2001
      From: Onkel Andy 
      Date: Wed, 25 Oct 2023 22:12:50 +0200
      Subject: [PATCH 33/41] blockly plugin: remove unused css
      
      ---
       blockly/webif/static/css/bootstrap-reload.css |   20 -
       blockly/webif/static/css/bootstrap-theme.css  |  587 --
       .../webif/static/css/bootstrap-theme.css.map  |    1 -
       .../webif/static/css/bootstrap-theme.min.css  |    6 -
       .../static/css/bootstrap-theme.min.css.map    |    1 -
       .../webif/static/css/bootstrap-treeview.css   |   37 -
       .../static/css/bootstrap-treeview.min.css     |    1 -
       blockly/webif/static/css/bootstrap.css        | 6757 -----------------
       blockly/webif/static/css/bootstrap.css.map    |    1 -
       blockly/webif/static/css/bootstrap.min.css    |    6 -
       .../webif/static/css/bootstrap.min.css.map    |    1 -
       blockly/webif/static/css/font-awesome.css     | 2337 ------
       blockly/webif/static/css/font-awesome.min.css |    4 -
       13 files changed, 9759 deletions(-)
       delete mode 100755 blockly/webif/static/css/bootstrap-reload.css
       delete mode 100755 blockly/webif/static/css/bootstrap-theme.css
       delete mode 100755 blockly/webif/static/css/bootstrap-theme.css.map
       delete mode 100755 blockly/webif/static/css/bootstrap-theme.min.css
       delete mode 100755 blockly/webif/static/css/bootstrap-theme.min.css.map
       delete mode 100755 blockly/webif/static/css/bootstrap-treeview.css
       delete mode 100755 blockly/webif/static/css/bootstrap-treeview.min.css
       delete mode 100755 blockly/webif/static/css/bootstrap.css
       delete mode 100755 blockly/webif/static/css/bootstrap.css.map
       delete mode 100755 blockly/webif/static/css/bootstrap.min.css
       delete mode 100755 blockly/webif/static/css/bootstrap.min.css.map
       delete mode 100755 blockly/webif/static/css/font-awesome.css
       delete mode 100755 blockly/webif/static/css/font-awesome.min.css
      
      diff --git a/blockly/webif/static/css/bootstrap-reload.css b/blockly/webif/static/css/bootstrap-reload.css
      deleted file mode 100755
      index 0fd748a6d..000000000
      --- a/blockly/webif/static/css/bootstrap-reload.css
      +++ /dev/null
      @@ -1,20 +0,0 @@
      -.panel-refresh {
      - 	min-height:250px;
      - 	position:relative;
      -}
      - 
      -.refresh-container {
      -	 position:absolute;
      -	 top:0;
      -	 right:0;
      -	 background:rgba(0, 0, 0, 0.5);
      -	 width:100%;
      -	 height:100%;
      -	 display: none;
      -	 text-align:center;
      -	 z-index:4;
      -}
      -.refresh-spinner {
      -	 padding: 30px;
      -	 opacity: 0.8;
      -}
      \ No newline at end of file
      diff --git a/blockly/webif/static/css/bootstrap-theme.css b/blockly/webif/static/css/bootstrap-theme.css
      deleted file mode 100755
      index 31d888266..000000000
      --- a/blockly/webif/static/css/bootstrap-theme.css
      +++ /dev/null
      @@ -1,587 +0,0 @@
      -/*!
      - * Bootstrap v3.3.7 (http://getbootstrap.com)
      - * Copyright 2011-2016 Twitter, Inc.
      - * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
      - */
      -.btn-default,
      -.btn-primary,
      -.btn-success,
      -.btn-info,
      -.btn-warning,
      -.btn-danger {
      -  text-shadow: 0 -1px 0 rgba(0, 0, 0, .2);
      -  -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, .15), 0 1px 1px rgba(0, 0, 0, .075);
      -          box-shadow: inset 0 1px 0 rgba(255, 255, 255, .15), 0 1px 1px rgba(0, 0, 0, .075);
      -}
      -.btn-default:active,
      -.btn-primary:active,
      -.btn-success:active,
      -.btn-info:active,
      -.btn-warning:active,
      -.btn-danger:active,
      -.btn-default.active,
      -.btn-primary.active,
      -.btn-success.active,
      -.btn-info.active,
      -.btn-warning.active,
      -.btn-danger.active {
      -  -webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125);
      -          box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125);
      -}
      -.btn-default.disabled,
      -.btn-primary.disabled,
      -.btn-success.disabled,
      -.btn-info.disabled,
      -.btn-warning.disabled,
      -.btn-danger.disabled,
      -.btn-default[disabled],
      -.btn-primary[disabled],
      -.btn-success[disabled],
      -.btn-info[disabled],
      -.btn-warning[disabled],
      -.btn-danger[disabled],
      -fieldset[disabled] .btn-default,
      -fieldset[disabled] .btn-primary,
      -fieldset[disabled] .btn-success,
      -fieldset[disabled] .btn-info,
      -fieldset[disabled] .btn-warning,
      -fieldset[disabled] .btn-danger {
      -  -webkit-box-shadow: none;
      -          box-shadow: none;
      -}
      -.btn-default .badge,
      -.btn-primary .badge,
      -.btn-success .badge,
      -.btn-info .badge,
      -.btn-warning .badge,
      -.btn-danger .badge {
      -  text-shadow: none;
      -}
      -.btn:active,
      -.btn.active {
      -  background-image: none;
      -}
      -.btn-default {
      -  text-shadow: 0 1px 0 #fff;
      -  background-image: -webkit-linear-gradient(top, #fff 0%, #e0e0e0 100%);
      -  background-image:      -o-linear-gradient(top, #fff 0%, #e0e0e0 100%);
      -  background-image: -webkit-gradient(linear, left top, left bottom, from(#fff), to(#e0e0e0));
      -  background-image:         linear-gradient(to bottom, #fff 0%, #e0e0e0 100%);
      -  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#ffe0e0e0', GradientType=0);
      -  filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
      -  background-repeat: repeat-x;
      -  border-color: #dbdbdb;
      -  border-color: #ccc;
      -}
      -.btn-default:hover,
      -.btn-default:focus {
      -  background-color: #e0e0e0;
      -  background-position: 0 -15px;
      -}
      -.btn-default:active,
      -.btn-default.active {
      -  background-color: #e0e0e0;
      -  border-color: #dbdbdb;
      -}
      -.btn-default.disabled,
      -.btn-default[disabled],
      -fieldset[disabled] .btn-default,
      -.btn-default.disabled:hover,
      -.btn-default[disabled]:hover,
      -fieldset[disabled] .btn-default:hover,
      -.btn-default.disabled:focus,
      -.btn-default[disabled]:focus,
      -fieldset[disabled] .btn-default:focus,
      -.btn-default.disabled.focus,
      -.btn-default[disabled].focus,
      -fieldset[disabled] .btn-default.focus,
      -.btn-default.disabled:active,
      -.btn-default[disabled]:active,
      -fieldset[disabled] .btn-default:active,
      -.btn-default.disabled.active,
      -.btn-default[disabled].active,
      -fieldset[disabled] .btn-default.active {
      -  background-color: #e0e0e0;
      -  background-image: none;
      -}
      -.btn-primary {
      -  background-image: -webkit-linear-gradient(top, #337ab7 0%, #265a88 100%);
      -  background-image:      -o-linear-gradient(top, #337ab7 0%, #265a88 100%);
      -  background-image: -webkit-gradient(linear, left top, left bottom, from(#337ab7), to(#265a88));
      -  background-image:         linear-gradient(to bottom, #337ab7 0%, #265a88 100%);
      -  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff265a88', GradientType=0);
      -  filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
      -  background-repeat: repeat-x;
      -  border-color: #245580;
      -}
      -.btn-primary:hover,
      -.btn-primary:focus {
      -  background-color: #265a88;
      -  background-position: 0 -15px;
      -}
      -.btn-primary:active,
      -.btn-primary.active {
      -  background-color: #265a88;
      -  border-color: #245580;
      -}
      -.btn-primary.disabled,
      -.btn-primary[disabled],
      -fieldset[disabled] .btn-primary,
      -.btn-primary.disabled:hover,
      -.btn-primary[disabled]:hover,
      -fieldset[disabled] .btn-primary:hover,
      -.btn-primary.disabled:focus,
      -.btn-primary[disabled]:focus,
      -fieldset[disabled] .btn-primary:focus,
      -.btn-primary.disabled.focus,
      -.btn-primary[disabled].focus,
      -fieldset[disabled] .btn-primary.focus,
      -.btn-primary.disabled:active,
      -.btn-primary[disabled]:active,
      -fieldset[disabled] .btn-primary:active,
      -.btn-primary.disabled.active,
      -.btn-primary[disabled].active,
      -fieldset[disabled] .btn-primary.active {
      -  background-color: #265a88;
      -  background-image: none;
      -}
      -.btn-success {
      -  background-image: -webkit-linear-gradient(top, #5cb85c 0%, #419641 100%);
      -  background-image:      -o-linear-gradient(top, #5cb85c 0%, #419641 100%);
      -  background-image: -webkit-gradient(linear, left top, left bottom, from(#5cb85c), to(#419641));
      -  background-image:         linear-gradient(to bottom, #5cb85c 0%, #419641 100%);
      -  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5cb85c', endColorstr='#ff419641', GradientType=0);
      -  filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
      -  background-repeat: repeat-x;
      -  border-color: #3e8f3e;
      -}
      -.btn-success:hover,
      -.btn-success:focus {
      -  background-color: #419641;
      -  background-position: 0 -15px;
      -}
      -.btn-success:active,
      -.btn-success.active {
      -  background-color: #419641;
      -  border-color: #3e8f3e;
      -}
      -.btn-success.disabled,
      -.btn-success[disabled],
      -fieldset[disabled] .btn-success,
      -.btn-success.disabled:hover,
      -.btn-success[disabled]:hover,
      -fieldset[disabled] .btn-success:hover,
      -.btn-success.disabled:focus,
      -.btn-success[disabled]:focus,
      -fieldset[disabled] .btn-success:focus,
      -.btn-success.disabled.focus,
      -.btn-success[disabled].focus,
      -fieldset[disabled] .btn-success.focus,
      -.btn-success.disabled:active,
      -.btn-success[disabled]:active,
      -fieldset[disabled] .btn-success:active,
      -.btn-success.disabled.active,
      -.btn-success[disabled].active,
      -fieldset[disabled] .btn-success.active {
      -  background-color: #419641;
      -  background-image: none;
      -}
      -.btn-info {
      -  background-image: -webkit-linear-gradient(top, #5bc0de 0%, #2aabd2 100%);
      -  background-image:      -o-linear-gradient(top, #5bc0de 0%, #2aabd2 100%);
      -  background-image: -webkit-gradient(linear, left top, left bottom, from(#5bc0de), to(#2aabd2));
      -  background-image:         linear-gradient(to bottom, #5bc0de 0%, #2aabd2 100%);
      -  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de', endColorstr='#ff2aabd2', GradientType=0);
      -  filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
      -  background-repeat: repeat-x;
      -  border-color: #28a4c9;
      -}
      -.btn-info:hover,
      -.btn-info:focus {
      -  background-color: #2aabd2;
      -  background-position: 0 -15px;
      -}
      -.btn-info:active,
      -.btn-info.active {
      -  background-color: #2aabd2;
      -  border-color: #28a4c9;
      -}
      -.btn-info.disabled,
      -.btn-info[disabled],
      -fieldset[disabled] .btn-info,
      -.btn-info.disabled:hover,
      -.btn-info[disabled]:hover,
      -fieldset[disabled] .btn-info:hover,
      -.btn-info.disabled:focus,
      -.btn-info[disabled]:focus,
      -fieldset[disabled] .btn-info:focus,
      -.btn-info.disabled.focus,
      -.btn-info[disabled].focus,
      -fieldset[disabled] .btn-info.focus,
      -.btn-info.disabled:active,
      -.btn-info[disabled]:active,
      -fieldset[disabled] .btn-info:active,
      -.btn-info.disabled.active,
      -.btn-info[disabled].active,
      -fieldset[disabled] .btn-info.active {
      -  background-color: #2aabd2;
      -  background-image: none;
      -}
      -.btn-warning {
      -  background-image: -webkit-linear-gradient(top, #f0ad4e 0%, #eb9316 100%);
      -  background-image:      -o-linear-gradient(top, #f0ad4e 0%, #eb9316 100%);
      -  background-image: -webkit-gradient(linear, left top, left bottom, from(#f0ad4e), to(#eb9316));
      -  background-image:         linear-gradient(to bottom, #f0ad4e 0%, #eb9316 100%);
      -  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff0ad4e', endColorstr='#ffeb9316', GradientType=0);
      -  filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
      -  background-repeat: repeat-x;
      -  border-color: #e38d13;
      -}
      -.btn-warning:hover,
      -.btn-warning:focus {
      -  background-color: #eb9316;
      -  background-position: 0 -15px;
      -}
      -.btn-warning:active,
      -.btn-warning.active {
      -  background-color: #eb9316;
      -  border-color: #e38d13;
      -}
      -.btn-warning.disabled,
      -.btn-warning[disabled],
      -fieldset[disabled] .btn-warning,
      -.btn-warning.disabled:hover,
      -.btn-warning[disabled]:hover,
      -fieldset[disabled] .btn-warning:hover,
      -.btn-warning.disabled:focus,
      -.btn-warning[disabled]:focus,
      -fieldset[disabled] .btn-warning:focus,
      -.btn-warning.disabled.focus,
      -.btn-warning[disabled].focus,
      -fieldset[disabled] .btn-warning.focus,
      -.btn-warning.disabled:active,
      -.btn-warning[disabled]:active,
      -fieldset[disabled] .btn-warning:active,
      -.btn-warning.disabled.active,
      -.btn-warning[disabled].active,
      -fieldset[disabled] .btn-warning.active {
      -  background-color: #eb9316;
      -  background-image: none;
      -}
      -.btn-danger {
      -  background-image: -webkit-linear-gradient(top, #d9534f 0%, #c12e2a 100%);
      -  background-image:      -o-linear-gradient(top, #d9534f 0%, #c12e2a 100%);
      -  background-image: -webkit-gradient(linear, left top, left bottom, from(#d9534f), to(#c12e2a));
      -  background-image:         linear-gradient(to bottom, #d9534f 0%, #c12e2a 100%);
      -  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9534f', endColorstr='#ffc12e2a', GradientType=0);
      -  filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
      -  background-repeat: repeat-x;
      -  border-color: #b92c28;
      -}
      -.btn-danger:hover,
      -.btn-danger:focus {
      -  background-color: #c12e2a;
      -  background-position: 0 -15px;
      -}
      -.btn-danger:active,
      -.btn-danger.active {
      -  background-color: #c12e2a;
      -  border-color: #b92c28;
      -}
      -.btn-danger.disabled,
      -.btn-danger[disabled],
      -fieldset[disabled] .btn-danger,
      -.btn-danger.disabled:hover,
      -.btn-danger[disabled]:hover,
      -fieldset[disabled] .btn-danger:hover,
      -.btn-danger.disabled:focus,
      -.btn-danger[disabled]:focus,
      -fieldset[disabled] .btn-danger:focus,
      -.btn-danger.disabled.focus,
      -.btn-danger[disabled].focus,
      -fieldset[disabled] .btn-danger.focus,
      -.btn-danger.disabled:active,
      -.btn-danger[disabled]:active,
      -fieldset[disabled] .btn-danger:active,
      -.btn-danger.disabled.active,
      -.btn-danger[disabled].active,
      -fieldset[disabled] .btn-danger.active {
      -  background-color: #c12e2a;
      -  background-image: none;
      -}
      -.thumbnail,
      -.img-thumbnail {
      -  -webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, .075);
      -          box-shadow: 0 1px 2px rgba(0, 0, 0, .075);
      -}
      -.dropdown-menu > li > a:hover,
      -.dropdown-menu > li > a:focus {
      -  background-color: #e8e8e8;
      -  background-image: -webkit-linear-gradient(top, #f5f5f5 0%, #e8e8e8 100%);
      -  background-image:      -o-linear-gradient(top, #f5f5f5 0%, #e8e8e8 100%);
      -  background-image: -webkit-gradient(linear, left top, left bottom, from(#f5f5f5), to(#e8e8e8));
      -  background-image:         linear-gradient(to bottom, #f5f5f5 0%, #e8e8e8 100%);
      -  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff5f5f5', endColorstr='#ffe8e8e8', GradientType=0);
      -  background-repeat: repeat-x;
      -}
      -.dropdown-menu > .active > a,
      -.dropdown-menu > .active > a:hover,
      -.dropdown-menu > .active > a:focus {
      -  background-color: #2e6da4;
      -  background-image: -webkit-linear-gradient(top, #337ab7 0%, #2e6da4 100%);
      -  background-image:      -o-linear-gradient(top, #337ab7 0%, #2e6da4 100%);
      -  background-image: -webkit-gradient(linear, left top, left bottom, from(#337ab7), to(#2e6da4));
      -  background-image:         linear-gradient(to bottom, #337ab7 0%, #2e6da4 100%);
      -  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff2e6da4', GradientType=0);
      -  background-repeat: repeat-x;
      -}
      -.navbar-default {
      -  background-image: -webkit-linear-gradient(top, #fff 0%, #f8f8f8 100%);
      -  background-image:      -o-linear-gradient(top, #fff 0%, #f8f8f8 100%);
      -  background-image: -webkit-gradient(linear, left top, left bottom, from(#fff), to(#f8f8f8));
      -  background-image:         linear-gradient(to bottom, #fff 0%, #f8f8f8 100%);
      -  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#fff8f8f8', GradientType=0);
      -  filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
      -  background-repeat: repeat-x;
      -  border-radius: 4px;
      -  -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, .15), 0 1px 5px rgba(0, 0, 0, .075);
      -          box-shadow: inset 0 1px 0 rgba(255, 255, 255, .15), 0 1px 5px rgba(0, 0, 0, .075);
      -}
      -.navbar-default .navbar-nav > .open > a,
      -.navbar-default .navbar-nav > .active > a {
      -  background-image: -webkit-linear-gradient(top, #dbdbdb 0%, #e2e2e2 100%);
      -  background-image:      -o-linear-gradient(top, #dbdbdb 0%, #e2e2e2 100%);
      -  background-image: -webkit-gradient(linear, left top, left bottom, from(#dbdbdb), to(#e2e2e2));
      -  background-image:         linear-gradient(to bottom, #dbdbdb 0%, #e2e2e2 100%);
      -  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffdbdbdb', endColorstr='#ffe2e2e2', GradientType=0);
      -  background-repeat: repeat-x;
      -  -webkit-box-shadow: inset 0 3px 9px rgba(0, 0, 0, .075);
      -          box-shadow: inset 0 3px 9px rgba(0, 0, 0, .075);
      -}
      -.navbar-brand,
      -.navbar-nav > li > a {
      -  text-shadow: 0 1px 0 rgba(255, 255, 255, .25);
      -}
      -.navbar-inverse {
      -  background-image: -webkit-linear-gradient(top, #3c3c3c 0%, #222 100%);
      -  background-image:      -o-linear-gradient(top, #3c3c3c 0%, #222 100%);
      -  background-image: -webkit-gradient(linear, left top, left bottom, from(#3c3c3c), to(#222));
      -  background-image:         linear-gradient(to bottom, #3c3c3c 0%, #222 100%);
      -  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff3c3c3c', endColorstr='#ff222222', GradientType=0);
      -  filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
      -  background-repeat: repeat-x;
      -  border-radius: 4px;
      -}
      -.navbar-inverse .navbar-nav > .open > a,
      -.navbar-inverse .navbar-nav > .active > a {
      -  background-image: -webkit-linear-gradient(top, #080808 0%, #0f0f0f 100%);
      -  background-image:      -o-linear-gradient(top, #080808 0%, #0f0f0f 100%);
      -  background-image: -webkit-gradient(linear, left top, left bottom, from(#080808), to(#0f0f0f));
      -  background-image:         linear-gradient(to bottom, #080808 0%, #0f0f0f 100%);
      -  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff080808', endColorstr='#ff0f0f0f', GradientType=0);
      -  background-repeat: repeat-x;
      -  -webkit-box-shadow: inset 0 3px 9px rgba(0, 0, 0, .25);
      -          box-shadow: inset 0 3px 9px rgba(0, 0, 0, .25);
      -}
      -.navbar-inverse .navbar-brand,
      -.navbar-inverse .navbar-nav > li > a {
      -  text-shadow: 0 -1px 0 rgba(0, 0, 0, .25);
      -}
      -.navbar-static-top,
      -.navbar-fixed-top,
      -.navbar-fixed-bottom {
      -  border-radius: 0;
      -}
      -@media (max-width: 767px) {
      -  .navbar .navbar-nav .open .dropdown-menu > .active > a,
      -  .navbar .navbar-nav .open .dropdown-menu > .active > a:hover,
      -  .navbar .navbar-nav .open .dropdown-menu > .active > a:focus {
      -    color: #fff;
      -    background-image: -webkit-linear-gradient(top, #337ab7 0%, #2e6da4 100%);
      -    background-image:      -o-linear-gradient(top, #337ab7 0%, #2e6da4 100%);
      -    background-image: -webkit-gradient(linear, left top, left bottom, from(#337ab7), to(#2e6da4));
      -    background-image:         linear-gradient(to bottom, #337ab7 0%, #2e6da4 100%);
      -    filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff2e6da4', GradientType=0);
      -    background-repeat: repeat-x;
      -  }
      -}
      -.alert {
      -  text-shadow: 0 1px 0 rgba(255, 255, 255, .2);
      -  -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), 0 1px 2px rgba(0, 0, 0, .05);
      -          box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), 0 1px 2px rgba(0, 0, 0, .05);
      -}
      -.alert-success {
      -  background-image: -webkit-linear-gradient(top, #dff0d8 0%, #c8e5bc 100%);
      -  background-image:      -o-linear-gradient(top, #dff0d8 0%, #c8e5bc 100%);
      -  background-image: -webkit-gradient(linear, left top, left bottom, from(#dff0d8), to(#c8e5bc));
      -  background-image:         linear-gradient(to bottom, #dff0d8 0%, #c8e5bc 100%);
      -  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffdff0d8', endColorstr='#ffc8e5bc', GradientType=0);
      -  background-repeat: repeat-x;
      -  border-color: #b2dba1;
      -}
      -.alert-info {
      -  background-image: -webkit-linear-gradient(top, #d9edf7 0%, #b9def0 100%);
      -  background-image:      -o-linear-gradient(top, #d9edf7 0%, #b9def0 100%);
      -  background-image: -webkit-gradient(linear, left top, left bottom, from(#d9edf7), to(#b9def0));
      -  background-image:         linear-gradient(to bottom, #d9edf7 0%, #b9def0 100%);
      -  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9edf7', endColorstr='#ffb9def0', GradientType=0);
      -  background-repeat: repeat-x;
      -  border-color: #9acfea;
      -}
      -.alert-warning {
      -  background-image: -webkit-linear-gradient(top, #fcf8e3 0%, #f8efc0 100%);
      -  background-image:      -o-linear-gradient(top, #fcf8e3 0%, #f8efc0 100%);
      -  background-image: -webkit-gradient(linear, left top, left bottom, from(#fcf8e3), to(#f8efc0));
      -  background-image:         linear-gradient(to bottom, #fcf8e3 0%, #f8efc0 100%);
      -  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffcf8e3', endColorstr='#fff8efc0', GradientType=0);
      -  background-repeat: repeat-x;
      -  border-color: #f5e79e;
      -}
      -.alert-danger {
      -  background-image: -webkit-linear-gradient(top, #f2dede 0%, #e7c3c3 100%);
      -  background-image:      -o-linear-gradient(top, #f2dede 0%, #e7c3c3 100%);
      -  background-image: -webkit-gradient(linear, left top, left bottom, from(#f2dede), to(#e7c3c3));
      -  background-image:         linear-gradient(to bottom, #f2dede 0%, #e7c3c3 100%);
      -  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff2dede', endColorstr='#ffe7c3c3', GradientType=0);
      -  background-repeat: repeat-x;
      -  border-color: #dca7a7;
      -}
      -.progress {
      -  background-image: -webkit-linear-gradient(top, #ebebeb 0%, #f5f5f5 100%);
      -  background-image:      -o-linear-gradient(top, #ebebeb 0%, #f5f5f5 100%);
      -  background-image: -webkit-gradient(linear, left top, left bottom, from(#ebebeb), to(#f5f5f5));
      -  background-image:         linear-gradient(to bottom, #ebebeb 0%, #f5f5f5 100%);
      -  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffebebeb', endColorstr='#fff5f5f5', GradientType=0);
      -  background-repeat: repeat-x;
      -}
      -.progress-bar {
      -  background-image: -webkit-linear-gradient(top, #337ab7 0%, #286090 100%);
      -  background-image:      -o-linear-gradient(top, #337ab7 0%, #286090 100%);
      -  background-image: -webkit-gradient(linear, left top, left bottom, from(#337ab7), to(#286090));
      -  background-image:         linear-gradient(to bottom, #337ab7 0%, #286090 100%);
      -  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff286090', GradientType=0);
      -  background-repeat: repeat-x;
      -}
      -.progress-bar-success {
      -  background-image: -webkit-linear-gradient(top, #5cb85c 0%, #449d44 100%);
      -  background-image:      -o-linear-gradient(top, #5cb85c 0%, #449d44 100%);
      -  background-image: -webkit-gradient(linear, left top, left bottom, from(#5cb85c), to(#449d44));
      -  background-image:         linear-gradient(to bottom, #5cb85c 0%, #449d44 100%);
      -  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5cb85c', endColorstr='#ff449d44', GradientType=0);
      -  background-repeat: repeat-x;
      -}
      -.progress-bar-info {
      -  background-image: -webkit-linear-gradient(top, #5bc0de 0%, #31b0d5 100%);
      -  background-image:      -o-linear-gradient(top, #5bc0de 0%, #31b0d5 100%);
      -  background-image: -webkit-gradient(linear, left top, left bottom, from(#5bc0de), to(#31b0d5));
      -  background-image:         linear-gradient(to bottom, #5bc0de 0%, #31b0d5 100%);
      -  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de', endColorstr='#ff31b0d5', GradientType=0);
      -  background-repeat: repeat-x;
      -}
      -.progress-bar-warning {
      -  background-image: -webkit-linear-gradient(top, #f0ad4e 0%, #ec971f 100%);
      -  background-image:      -o-linear-gradient(top, #f0ad4e 0%, #ec971f 100%);
      -  background-image: -webkit-gradient(linear, left top, left bottom, from(#f0ad4e), to(#ec971f));
      -  background-image:         linear-gradient(to bottom, #f0ad4e 0%, #ec971f 100%);
      -  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff0ad4e', endColorstr='#ffec971f', GradientType=0);
      -  background-repeat: repeat-x;
      -}
      -.progress-bar-danger {
      -  background-image: -webkit-linear-gradient(top, #d9534f 0%, #c9302c 100%);
      -  background-image:      -o-linear-gradient(top, #d9534f 0%, #c9302c 100%);
      -  background-image: -webkit-gradient(linear, left top, left bottom, from(#d9534f), to(#c9302c));
      -  background-image:         linear-gradient(to bottom, #d9534f 0%, #c9302c 100%);
      -  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9534f', endColorstr='#ffc9302c', GradientType=0);
      -  background-repeat: repeat-x;
      -}
      -.progress-bar-striped {
      -  background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);
      -  background-image:      -o-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);
      -  background-image:         linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);
      -}
      -.list-group {
      -  border-radius: 4px;
      -  -webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, .075);
      -          box-shadow: 0 1px 2px rgba(0, 0, 0, .075);
      -}
      -.list-group-item.active,
      -.list-group-item.active:hover,
      -.list-group-item.active:focus {
      -  text-shadow: 0 -1px 0 #286090;
      -  background-image: -webkit-linear-gradient(top, #337ab7 0%, #2b669a 100%);
      -  background-image:      -o-linear-gradient(top, #337ab7 0%, #2b669a 100%);
      -  background-image: -webkit-gradient(linear, left top, left bottom, from(#337ab7), to(#2b669a));
      -  background-image:         linear-gradient(to bottom, #337ab7 0%, #2b669a 100%);
      -  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff2b669a', GradientType=0);
      -  background-repeat: repeat-x;
      -  border-color: #2b669a;
      -}
      -.list-group-item.active .badge,
      -.list-group-item.active:hover .badge,
      -.list-group-item.active:focus .badge {
      -  text-shadow: none;
      -}
      -.panel {
      -  -webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, .05);
      -          box-shadow: 0 1px 2px rgba(0, 0, 0, .05);
      -}
      -.panel-default > .panel-heading {
      -  background-image: -webkit-linear-gradient(top, #f5f5f5 0%, #e8e8e8 100%);
      -  background-image:      -o-linear-gradient(top, #f5f5f5 0%, #e8e8e8 100%);
      -  background-image: -webkit-gradient(linear, left top, left bottom, from(#f5f5f5), to(#e8e8e8));
      -  background-image:         linear-gradient(to bottom, #f5f5f5 0%, #e8e8e8 100%);
      -  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff5f5f5', endColorstr='#ffe8e8e8', GradientType=0);
      -  background-repeat: repeat-x;
      -}
      -.panel-primary > .panel-heading {
      -  background-image: -webkit-linear-gradient(top, #337ab7 0%, #2e6da4 100%);
      -  background-image:      -o-linear-gradient(top, #337ab7 0%, #2e6da4 100%);
      -  background-image: -webkit-gradient(linear, left top, left bottom, from(#337ab7), to(#2e6da4));
      -  background-image:         linear-gradient(to bottom, #337ab7 0%, #2e6da4 100%);
      -  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff2e6da4', GradientType=0);
      -  background-repeat: repeat-x;
      -}
      -.panel-success > .panel-heading {
      -  background-image: -webkit-linear-gradient(top, #dff0d8 0%, #d0e9c6 100%);
      -  background-image:      -o-linear-gradient(top, #dff0d8 0%, #d0e9c6 100%);
      -  background-image: -webkit-gradient(linear, left top, left bottom, from(#dff0d8), to(#d0e9c6));
      -  background-image:         linear-gradient(to bottom, #dff0d8 0%, #d0e9c6 100%);
      -  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffdff0d8', endColorstr='#ffd0e9c6', GradientType=0);
      -  background-repeat: repeat-x;
      -}
      -.panel-info > .panel-heading {
      -  background-image: -webkit-linear-gradient(top, #d9edf7 0%, #c4e3f3 100%);
      -  background-image:      -o-linear-gradient(top, #d9edf7 0%, #c4e3f3 100%);
      -  background-image: -webkit-gradient(linear, left top, left bottom, from(#d9edf7), to(#c4e3f3));
      -  background-image:         linear-gradient(to bottom, #d9edf7 0%, #c4e3f3 100%);
      -  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9edf7', endColorstr='#ffc4e3f3', GradientType=0);
      -  background-repeat: repeat-x;
      -}
      -.panel-warning > .panel-heading {
      -  background-image: -webkit-linear-gradient(top, #fcf8e3 0%, #faf2cc 100%);
      -  background-image:      -o-linear-gradient(top, #fcf8e3 0%, #faf2cc 100%);
      -  background-image: -webkit-gradient(linear, left top, left bottom, from(#fcf8e3), to(#faf2cc));
      -  background-image:         linear-gradient(to bottom, #fcf8e3 0%, #faf2cc 100%);
      -  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffcf8e3', endColorstr='#fffaf2cc', GradientType=0);
      -  background-repeat: repeat-x;
      -}
      -.panel-danger > .panel-heading {
      -  background-image: -webkit-linear-gradient(top, #f2dede 0%, #ebcccc 100%);
      -  background-image:      -o-linear-gradient(top, #f2dede 0%, #ebcccc 100%);
      -  background-image: -webkit-gradient(linear, left top, left bottom, from(#f2dede), to(#ebcccc));
      -  background-image:         linear-gradient(to bottom, #f2dede 0%, #ebcccc 100%);
      -  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff2dede', endColorstr='#ffebcccc', GradientType=0);
      -  background-repeat: repeat-x;
      -}
      -.well {
      -  background-image: -webkit-linear-gradient(top, #e8e8e8 0%, #f5f5f5 100%);
      -  background-image:      -o-linear-gradient(top, #e8e8e8 0%, #f5f5f5 100%);
      -  background-image: -webkit-gradient(linear, left top, left bottom, from(#e8e8e8), to(#f5f5f5));
      -  background-image:         linear-gradient(to bottom, #e8e8e8 0%, #f5f5f5 100%);
      -  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffe8e8e8', endColorstr='#fff5f5f5', GradientType=0);
      -  background-repeat: repeat-x;
      -  border-color: #dcdcdc;
      -  -webkit-box-shadow: inset 0 1px 3px rgba(0, 0, 0, .05), 0 1px 0 rgba(255, 255, 255, .1);
      -          box-shadow: inset 0 1px 3px rgba(0, 0, 0, .05), 0 1px 0 rgba(255, 255, 255, .1);
      -}
      -/*# sourceMappingURL=bootstrap-theme.css.map */
      diff --git a/blockly/webif/static/css/bootstrap-theme.css.map b/blockly/webif/static/css/bootstrap-theme.css.map
      deleted file mode 100755
      index d876f60fb..000000000
      --- a/blockly/webif/static/css/bootstrap-theme.css.map
      +++ /dev/null
      @@ -1 +0,0 @@
      -{"version":3,"sources":["bootstrap-theme.css","less/theme.less","less/mixins/vendor-prefixes.less","less/mixins/gradients.less","less/mixins/reset-filter.less"],"names":[],"mappings":"AAAA;;;;GAIG;ACeH;;;;;;EAME,yCAAA;EC2CA,4FAAA;EACQ,oFAAA;CFvDT;ACgBC;;;;;;;;;;;;ECsCA,yDAAA;EACQ,iDAAA;CFxCT;ACMC;;;;;;;;;;;;;;;;;;ECiCA,yBAAA;EACQ,iBAAA;CFnBT;AC/BD;;;;;;EAuBI,kBAAA;CDgBH;ACyBC;;EAEE,uBAAA;CDvBH;AC4BD;EErEI,sEAAA;EACA,iEAAA;EACA,2FAAA;EAAA,oEAAA;EAEA,uHAAA;ECnBF,oEAAA;EH4CA,4BAAA;EACA,sBAAA;EAuC2C,0BAAA;EAA2B,mBAAA;CDjBvE;ACpBC;;EAEE,0BAAA;EACA,6BAAA;CDsBH;ACnBC;;EAEE,0BAAA;EACA,sBAAA;CDqBH;ACfG;;;;;;;;;;;;;;;;;;EAME,0BAAA;EACA,uBAAA;CD6BL;ACbD;EEtEI,yEAAA;EACA,oEAAA;EACA,8FAAA;EAAA,uEAAA;EAEA,uHAAA;ECnBF,oEAAA;EH4CA,4BAAA;EACA,sBAAA;CD8DD;AC5DC;;EAEE,0BAAA;EACA,6BAAA;CD8DH;AC3DC;;EAEE,0BAAA;EACA,sBAAA;CD6DH;ACvDG;;;;;;;;;;;;;;;;;;EAME,0BAAA;EACA,uBAAA;CDqEL;ACpDD;EEvEI,yEAAA;EACA,oEAAA;EACA,8FAAA;EAAA,uEAAA;EAEA,uHAAA;ECnBF,oEAAA;EH4CA,4BAAA;EACA,sBAAA;CDsGD;ACpGC;;EAEE,0BAAA;EACA,6BAAA;CDsGH;ACnGC;;EAEE,0BAAA;EACA,sBAAA;CDqGH;AC/FG;;;;;;;;;;;;;;;;;;EAME,0BAAA;EACA,uBAAA;CD6GL;AC3FD;EExEI,yEAAA;EACA,oEAAA;EACA,8FAAA;EAAA,uEAAA;EAEA,uHAAA;ECnBF,oEAAA;EH4CA,4BAAA;EACA,sBAAA;CD8ID;AC5IC;;EAEE,0BAAA;EACA,6BAAA;CD8IH;AC3IC;;EAEE,0BAAA;EACA,sBAAA;CD6IH;ACvIG;;;;;;;;;;;;;;;;;;EAME,0BAAA;EACA,uBAAA;CDqJL;AClID;EEzEI,yEAAA;EACA,oEAAA;EACA,8FAAA;EAAA,uEAAA;EAEA,uHAAA;ECnBF,oEAAA;EH4CA,4BAAA;EACA,sBAAA;CDsLD;ACpLC;;EAEE,0BAAA;EACA,6BAAA;CDsLH;ACnLC;;EAEE,0BAAA;EACA,sBAAA;CDqLH;AC/KG;;;;;;;;;;;;;;;;;;EAME,0BAAA;EACA,uBAAA;CD6LL;ACzKD;EE1EI,yEAAA;EACA,oEAAA;EACA,8FAAA;EAAA,uEAAA;EAEA,uHAAA;ECnBF,oEAAA;EH4CA,4BAAA;EACA,sBAAA;CD8ND;AC5NC;;EAEE,0BAAA;EACA,6BAAA;CD8NH;AC3NC;;EAEE,0BAAA;EACA,sBAAA;CD6NH;ACvNG;;;;;;;;;;;;;;;;;;EAME,0BAAA;EACA,uBAAA;CDqOL;AC1MD;;EClCE,mDAAA;EACQ,2CAAA;CFgPT;ACrMD;;EE3FI,yEAAA;EACA,oEAAA;EACA,8FAAA;EAAA,uEAAA;EACA,4BAAA;EACA,uHAAA;EF0FF,0BAAA;CD2MD;ACzMD;;;EEhGI,yEAAA;EACA,oEAAA;EACA,8FAAA;EAAA,uEAAA;EACA,4BAAA;EACA,uHAAA;EFgGF,0BAAA;CD+MD;ACtMD;EE7GI,yEAAA;EACA,oEAAA;EACA,8FAAA;EAAA,uEAAA;EACA,4BAAA;EACA,uHAAA;ECnBF,oEAAA;EH+HA,mBAAA;ECjEA,4FAAA;EACQ,oFAAA;CF8QT;ACjND;;EE7GI,yEAAA;EACA,oEAAA;EACA,8FAAA;EAAA,uEAAA;EACA,4BAAA;EACA,uHAAA;ED2CF,yDAAA;EACQ,iDAAA;CFwRT;AC9MD;;EAEE,+CAAA;CDgND;AC5MD;EEhII,sEAAA;EACA,iEAAA;EACA,2FAAA;EAAA,oEAAA;EACA,4BAAA;EACA,uHAAA;ECnBF,oEAAA;EHkJA,mBAAA;CDkND;ACrND;;EEhII,yEAAA;EACA,oEAAA;EACA,8FAAA;EAAA,uEAAA;EACA,4BAAA;EACA,uHAAA;ED2CF,wDAAA;EACQ,gDAAA;CF+ST;AC/ND;;EAYI,0CAAA;CDuNH;AClND;;;EAGE,iBAAA;CDoND;AC/LD;EAfI;;;IAGE,YAAA;IE7JF,yEAAA;IACA,oEAAA;IACA,8FAAA;IAAA,uEAAA;IACA,4BAAA;IACA,uHAAA;GH+WD;CACF;AC3MD;EACE,8CAAA;EC3HA,2FAAA;EACQ,mFAAA;CFyUT;ACnMD;EEtLI,yEAAA;EACA,oEAAA;EACA,8FAAA;EAAA,uEAAA;EACA,4BAAA;EACA,uHAAA;EF8KF,sBAAA;CD+MD;AC1MD;EEvLI,yEAAA;EACA,oEAAA;EACA,8FAAA;EAAA,uEAAA;EACA,4BAAA;EACA,uHAAA;EF8KF,sBAAA;CDuND;ACjND;EExLI,yEAAA;EACA,oEAAA;EACA,8FAAA;EAAA,uEAAA;EACA,4BAAA;EACA,uHAAA;EF8KF,sBAAA;CD+ND;ACxND;EEzLI,yEAAA;EACA,oEAAA;EACA,8FAAA;EAAA,uEAAA;EACA,4BAAA;EACA,uHAAA;EF8KF,sBAAA;CDuOD;ACxND;EEjMI,yEAAA;EACA,oEAAA;EACA,8FAAA;EAAA,uEAAA;EACA,4BAAA;EACA,uHAAA;CH4ZH;ACrND;EE3MI,yEAAA;EACA,oEAAA;EACA,8FAAA;EAAA,uEAAA;EACA,4BAAA;EACA,uHAAA;CHmaH;AC3ND;EE5MI,yEAAA;EACA,oEAAA;EACA,8FAAA;EAAA,uEAAA;EACA,4BAAA;EACA,uHAAA;CH0aH;ACjOD;EE7MI,yEAAA;EACA,oEAAA;EACA,8FAAA;EAAA,uEAAA;EACA,4BAAA;EACA,uHAAA;CHibH;ACvOD;EE9MI,yEAAA;EACA,oEAAA;EACA,8FAAA;EAAA,uEAAA;EACA,4BAAA;EACA,uHAAA;CHwbH;AC7OD;EE/MI,yEAAA;EACA,oEAAA;EACA,8FAAA;EAAA,uEAAA;EACA,4BAAA;EACA,uHAAA;CH+bH;AChPD;EElLI,8MAAA;EACA,yMAAA;EACA,sMAAA;CHqaH;AC5OD;EACE,mBAAA;EC9KA,mDAAA;EACQ,2CAAA;CF6ZT;AC7OD;;;EAGE,8BAAA;EEnOE,yEAAA;EACA,oEAAA;EACA,8FAAA;EAAA,uEAAA;EACA,4BAAA;EACA,uHAAA;EFiOF,sBAAA;CDmPD;ACxPD;;;EAQI,kBAAA;CDqPH;AC3OD;ECnME,kDAAA;EACQ,0CAAA;CFibT;ACrOD;EE5PI,yEAAA;EACA,oEAAA;EACA,8FAAA;EAAA,uEAAA;EACA,4BAAA;EACA,uHAAA;CHoeH;AC3OD;EE7PI,yEAAA;EACA,oEAAA;EACA,8FAAA;EAAA,uEAAA;EACA,4BAAA;EACA,uHAAA;CH2eH;ACjPD;EE9PI,yEAAA;EACA,oEAAA;EACA,8FAAA;EAAA,uEAAA;EACA,4BAAA;EACA,uHAAA;CHkfH;ACvPD;EE/PI,yEAAA;EACA,oEAAA;EACA,8FAAA;EAAA,uEAAA;EACA,4BAAA;EACA,uHAAA;CHyfH;AC7PD;EEhQI,yEAAA;EACA,oEAAA;EACA,8FAAA;EAAA,uEAAA;EACA,4BAAA;EACA,uHAAA;CHggBH;ACnQD;EEjQI,yEAAA;EACA,oEAAA;EACA,8FAAA;EAAA,uEAAA;EACA,4BAAA;EACA,uHAAA;CHugBH;ACnQD;EExQI,yEAAA;EACA,oEAAA;EACA,8FAAA;EAAA,uEAAA;EACA,4BAAA;EACA,uHAAA;EFsQF,sBAAA;EC3NA,0FAAA;EACQ,kFAAA;CFqeT","file":"bootstrap-theme.css","sourcesContent":["/*!\n * Bootstrap v3.3.7 (http://getbootstrap.com)\n * Copyright 2011-2016 Twitter, Inc.\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n */\n.btn-default,\n.btn-primary,\n.btn-success,\n.btn-info,\n.btn-warning,\n.btn-danger {\n  text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.2);\n  -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15), 0 1px 1px rgba(0, 0, 0, 0.075);\n  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15), 0 1px 1px rgba(0, 0, 0, 0.075);\n}\n.btn-default:active,\n.btn-primary:active,\n.btn-success:active,\n.btn-info:active,\n.btn-warning:active,\n.btn-danger:active,\n.btn-default.active,\n.btn-primary.active,\n.btn-success.active,\n.btn-info.active,\n.btn-warning.active,\n.btn-danger.active {\n  -webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);\n  box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);\n}\n.btn-default.disabled,\n.btn-primary.disabled,\n.btn-success.disabled,\n.btn-info.disabled,\n.btn-warning.disabled,\n.btn-danger.disabled,\n.btn-default[disabled],\n.btn-primary[disabled],\n.btn-success[disabled],\n.btn-info[disabled],\n.btn-warning[disabled],\n.btn-danger[disabled],\nfieldset[disabled] .btn-default,\nfieldset[disabled] .btn-primary,\nfieldset[disabled] .btn-success,\nfieldset[disabled] .btn-info,\nfieldset[disabled] .btn-warning,\nfieldset[disabled] .btn-danger {\n  -webkit-box-shadow: none;\n  box-shadow: none;\n}\n.btn-default .badge,\n.btn-primary .badge,\n.btn-success .badge,\n.btn-info .badge,\n.btn-warning .badge,\n.btn-danger .badge {\n  text-shadow: none;\n}\n.btn:active,\n.btn.active {\n  background-image: none;\n}\n.btn-default {\n  background-image: -webkit-linear-gradient(top, #fff 0%, #e0e0e0 100%);\n  background-image: -o-linear-gradient(top, #fff 0%, #e0e0e0 100%);\n  background-image: linear-gradient(to bottom, #fff 0%, #e0e0e0 100%);\n  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#ffe0e0e0', GradientType=0);\n  filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);\n  background-repeat: repeat-x;\n  border-color: #dbdbdb;\n  text-shadow: 0 1px 0 #fff;\n  border-color: #ccc;\n}\n.btn-default:hover,\n.btn-default:focus {\n  background-color: #e0e0e0;\n  background-position: 0 -15px;\n}\n.btn-default:active,\n.btn-default.active {\n  background-color: #e0e0e0;\n  border-color: #dbdbdb;\n}\n.btn-default.disabled,\n.btn-default[disabled],\nfieldset[disabled] .btn-default,\n.btn-default.disabled:hover,\n.btn-default[disabled]:hover,\nfieldset[disabled] .btn-default:hover,\n.btn-default.disabled:focus,\n.btn-default[disabled]:focus,\nfieldset[disabled] .btn-default:focus,\n.btn-default.disabled.focus,\n.btn-default[disabled].focus,\nfieldset[disabled] .btn-default.focus,\n.btn-default.disabled:active,\n.btn-default[disabled]:active,\nfieldset[disabled] .btn-default:active,\n.btn-default.disabled.active,\n.btn-default[disabled].active,\nfieldset[disabled] .btn-default.active {\n  background-color: #e0e0e0;\n  background-image: none;\n}\n.btn-primary {\n  background-image: -webkit-linear-gradient(top, #337ab7 0%, #265a88 100%);\n  background-image: -o-linear-gradient(top, #337ab7 0%, #265a88 100%);\n  background-image: linear-gradient(to bottom, #337ab7 0%, #265a88 100%);\n  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff265a88', GradientType=0);\n  filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);\n  background-repeat: repeat-x;\n  border-color: #245580;\n}\n.btn-primary:hover,\n.btn-primary:focus {\n  background-color: #265a88;\n  background-position: 0 -15px;\n}\n.btn-primary:active,\n.btn-primary.active {\n  background-color: #265a88;\n  border-color: #245580;\n}\n.btn-primary.disabled,\n.btn-primary[disabled],\nfieldset[disabled] .btn-primary,\n.btn-primary.disabled:hover,\n.btn-primary[disabled]:hover,\nfieldset[disabled] .btn-primary:hover,\n.btn-primary.disabled:focus,\n.btn-primary[disabled]:focus,\nfieldset[disabled] .btn-primary:focus,\n.btn-primary.disabled.focus,\n.btn-primary[disabled].focus,\nfieldset[disabled] .btn-primary.focus,\n.btn-primary.disabled:active,\n.btn-primary[disabled]:active,\nfieldset[disabled] .btn-primary:active,\n.btn-primary.disabled.active,\n.btn-primary[disabled].active,\nfieldset[disabled] .btn-primary.active {\n  background-color: #265a88;\n  background-image: none;\n}\n.btn-success {\n  background-image: -webkit-linear-gradient(top, #5cb85c 0%, #419641 100%);\n  background-image: -o-linear-gradient(top, #5cb85c 0%, #419641 100%);\n  background-image: linear-gradient(to bottom, #5cb85c 0%, #419641 100%);\n  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5cb85c', endColorstr='#ff419641', GradientType=0);\n  filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);\n  background-repeat: repeat-x;\n  border-color: #3e8f3e;\n}\n.btn-success:hover,\n.btn-success:focus {\n  background-color: #419641;\n  background-position: 0 -15px;\n}\n.btn-success:active,\n.btn-success.active {\n  background-color: #419641;\n  border-color: #3e8f3e;\n}\n.btn-success.disabled,\n.btn-success[disabled],\nfieldset[disabled] .btn-success,\n.btn-success.disabled:hover,\n.btn-success[disabled]:hover,\nfieldset[disabled] .btn-success:hover,\n.btn-success.disabled:focus,\n.btn-success[disabled]:focus,\nfieldset[disabled] .btn-success:focus,\n.btn-success.disabled.focus,\n.btn-success[disabled].focus,\nfieldset[disabled] .btn-success.focus,\n.btn-success.disabled:active,\n.btn-success[disabled]:active,\nfieldset[disabled] .btn-success:active,\n.btn-success.disabled.active,\n.btn-success[disabled].active,\nfieldset[disabled] .btn-success.active {\n  background-color: #419641;\n  background-image: none;\n}\n.btn-info {\n  background-image: -webkit-linear-gradient(top, #5bc0de 0%, #2aabd2 100%);\n  background-image: -o-linear-gradient(top, #5bc0de 0%, #2aabd2 100%);\n  background-image: linear-gradient(to bottom, #5bc0de 0%, #2aabd2 100%);\n  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de', endColorstr='#ff2aabd2', GradientType=0);\n  filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);\n  background-repeat: repeat-x;\n  border-color: #28a4c9;\n}\n.btn-info:hover,\n.btn-info:focus {\n  background-color: #2aabd2;\n  background-position: 0 -15px;\n}\n.btn-info:active,\n.btn-info.active {\n  background-color: #2aabd2;\n  border-color: #28a4c9;\n}\n.btn-info.disabled,\n.btn-info[disabled],\nfieldset[disabled] .btn-info,\n.btn-info.disabled:hover,\n.btn-info[disabled]:hover,\nfieldset[disabled] .btn-info:hover,\n.btn-info.disabled:focus,\n.btn-info[disabled]:focus,\nfieldset[disabled] .btn-info:focus,\n.btn-info.disabled.focus,\n.btn-info[disabled].focus,\nfieldset[disabled] .btn-info.focus,\n.btn-info.disabled:active,\n.btn-info[disabled]:active,\nfieldset[disabled] .btn-info:active,\n.btn-info.disabled.active,\n.btn-info[disabled].active,\nfieldset[disabled] .btn-info.active {\n  background-color: #2aabd2;\n  background-image: none;\n}\n.btn-warning {\n  background-image: -webkit-linear-gradient(top, #f0ad4e 0%, #eb9316 100%);\n  background-image: -o-linear-gradient(top, #f0ad4e 0%, #eb9316 100%);\n  background-image: linear-gradient(to bottom, #f0ad4e 0%, #eb9316 100%);\n  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff0ad4e', endColorstr='#ffeb9316', GradientType=0);\n  filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);\n  background-repeat: repeat-x;\n  border-color: #e38d13;\n}\n.btn-warning:hover,\n.btn-warning:focus {\n  background-color: #eb9316;\n  background-position: 0 -15px;\n}\n.btn-warning:active,\n.btn-warning.active {\n  background-color: #eb9316;\n  border-color: #e38d13;\n}\n.btn-warning.disabled,\n.btn-warning[disabled],\nfieldset[disabled] .btn-warning,\n.btn-warning.disabled:hover,\n.btn-warning[disabled]:hover,\nfieldset[disabled] .btn-warning:hover,\n.btn-warning.disabled:focus,\n.btn-warning[disabled]:focus,\nfieldset[disabled] .btn-warning:focus,\n.btn-warning.disabled.focus,\n.btn-warning[disabled].focus,\nfieldset[disabled] .btn-warning.focus,\n.btn-warning.disabled:active,\n.btn-warning[disabled]:active,\nfieldset[disabled] .btn-warning:active,\n.btn-warning.disabled.active,\n.btn-warning[disabled].active,\nfieldset[disabled] .btn-warning.active {\n  background-color: #eb9316;\n  background-image: none;\n}\n.btn-danger {\n  background-image: -webkit-linear-gradient(top, #d9534f 0%, #c12e2a 100%);\n  background-image: -o-linear-gradient(top, #d9534f 0%, #c12e2a 100%);\n  background-image: linear-gradient(to bottom, #d9534f 0%, #c12e2a 100%);\n  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9534f', endColorstr='#ffc12e2a', GradientType=0);\n  filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);\n  background-repeat: repeat-x;\n  border-color: #b92c28;\n}\n.btn-danger:hover,\n.btn-danger:focus {\n  background-color: #c12e2a;\n  background-position: 0 -15px;\n}\n.btn-danger:active,\n.btn-danger.active {\n  background-color: #c12e2a;\n  border-color: #b92c28;\n}\n.btn-danger.disabled,\n.btn-danger[disabled],\nfieldset[disabled] .btn-danger,\n.btn-danger.disabled:hover,\n.btn-danger[disabled]:hover,\nfieldset[disabled] .btn-danger:hover,\n.btn-danger.disabled:focus,\n.btn-danger[disabled]:focus,\nfieldset[disabled] .btn-danger:focus,\n.btn-danger.disabled.focus,\n.btn-danger[disabled].focus,\nfieldset[disabled] .btn-danger.focus,\n.btn-danger.disabled:active,\n.btn-danger[disabled]:active,\nfieldset[disabled] .btn-danger:active,\n.btn-danger.disabled.active,\n.btn-danger[disabled].active,\nfieldset[disabled] .btn-danger.active {\n  background-color: #c12e2a;\n  background-image: none;\n}\n.thumbnail,\n.img-thumbnail {\n  -webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.075);\n  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.075);\n}\n.dropdown-menu > li > a:hover,\n.dropdown-menu > li > a:focus {\n  background-image: -webkit-linear-gradient(top, #f5f5f5 0%, #e8e8e8 100%);\n  background-image: -o-linear-gradient(top, #f5f5f5 0%, #e8e8e8 100%);\n  background-image: linear-gradient(to bottom, #f5f5f5 0%, #e8e8e8 100%);\n  background-repeat: repeat-x;\n  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff5f5f5', endColorstr='#ffe8e8e8', GradientType=0);\n  background-color: #e8e8e8;\n}\n.dropdown-menu > .active > a,\n.dropdown-menu > .active > a:hover,\n.dropdown-menu > .active > a:focus {\n  background-image: -webkit-linear-gradient(top, #337ab7 0%, #2e6da4 100%);\n  background-image: -o-linear-gradient(top, #337ab7 0%, #2e6da4 100%);\n  background-image: linear-gradient(to bottom, #337ab7 0%, #2e6da4 100%);\n  background-repeat: repeat-x;\n  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff2e6da4', GradientType=0);\n  background-color: #2e6da4;\n}\n.navbar-default {\n  background-image: -webkit-linear-gradient(top, #ffffff 0%, #f8f8f8 100%);\n  background-image: -o-linear-gradient(top, #ffffff 0%, #f8f8f8 100%);\n  background-image: linear-gradient(to bottom, #ffffff 0%, #f8f8f8 100%);\n  background-repeat: repeat-x;\n  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#fff8f8f8', GradientType=0);\n  filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);\n  border-radius: 4px;\n  -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15), 0 1px 5px rgba(0, 0, 0, 0.075);\n  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15), 0 1px 5px rgba(0, 0, 0, 0.075);\n}\n.navbar-default .navbar-nav > .open > a,\n.navbar-default .navbar-nav > .active > a {\n  background-image: -webkit-linear-gradient(top, #dbdbdb 0%, #e2e2e2 100%);\n  background-image: -o-linear-gradient(top, #dbdbdb 0%, #e2e2e2 100%);\n  background-image: linear-gradient(to bottom, #dbdbdb 0%, #e2e2e2 100%);\n  background-repeat: repeat-x;\n  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffdbdbdb', endColorstr='#ffe2e2e2', GradientType=0);\n  -webkit-box-shadow: inset 0 3px 9px rgba(0, 0, 0, 0.075);\n  box-shadow: inset 0 3px 9px rgba(0, 0, 0, 0.075);\n}\n.navbar-brand,\n.navbar-nav > li > a {\n  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.25);\n}\n.navbar-inverse {\n  background-image: -webkit-linear-gradient(top, #3c3c3c 0%, #222 100%);\n  background-image: -o-linear-gradient(top, #3c3c3c 0%, #222 100%);\n  background-image: linear-gradient(to bottom, #3c3c3c 0%, #222 100%);\n  background-repeat: repeat-x;\n  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff3c3c3c', endColorstr='#ff222222', GradientType=0);\n  filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);\n  border-radius: 4px;\n}\n.navbar-inverse .navbar-nav > .open > a,\n.navbar-inverse .navbar-nav > .active > a {\n  background-image: -webkit-linear-gradient(top, #080808 0%, #0f0f0f 100%);\n  background-image: -o-linear-gradient(top, #080808 0%, #0f0f0f 100%);\n  background-image: linear-gradient(to bottom, #080808 0%, #0f0f0f 100%);\n  background-repeat: repeat-x;\n  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff080808', endColorstr='#ff0f0f0f', GradientType=0);\n  -webkit-box-shadow: inset 0 3px 9px rgba(0, 0, 0, 0.25);\n  box-shadow: inset 0 3px 9px rgba(0, 0, 0, 0.25);\n}\n.navbar-inverse .navbar-brand,\n.navbar-inverse .navbar-nav > li > a {\n  text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);\n}\n.navbar-static-top,\n.navbar-fixed-top,\n.navbar-fixed-bottom {\n  border-radius: 0;\n}\n@media (max-width: 767px) {\n  .navbar .navbar-nav .open .dropdown-menu > .active > a,\n  .navbar .navbar-nav .open .dropdown-menu > .active > a:hover,\n  .navbar .navbar-nav .open .dropdown-menu > .active > a:focus {\n    color: #fff;\n    background-image: -webkit-linear-gradient(top, #337ab7 0%, #2e6da4 100%);\n    background-image: -o-linear-gradient(top, #337ab7 0%, #2e6da4 100%);\n    background-image: linear-gradient(to bottom, #337ab7 0%, #2e6da4 100%);\n    background-repeat: repeat-x;\n    filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff2e6da4', GradientType=0);\n  }\n}\n.alert {\n  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.2);\n  -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 1px 2px rgba(0, 0, 0, 0.05);\n  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 1px 2px rgba(0, 0, 0, 0.05);\n}\n.alert-success {\n  background-image: -webkit-linear-gradient(top, #dff0d8 0%, #c8e5bc 100%);\n  background-image: -o-linear-gradient(top, #dff0d8 0%, #c8e5bc 100%);\n  background-image: linear-gradient(to bottom, #dff0d8 0%, #c8e5bc 100%);\n  background-repeat: repeat-x;\n  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffdff0d8', endColorstr='#ffc8e5bc', GradientType=0);\n  border-color: #b2dba1;\n}\n.alert-info {\n  background-image: -webkit-linear-gradient(top, #d9edf7 0%, #b9def0 100%);\n  background-image: -o-linear-gradient(top, #d9edf7 0%, #b9def0 100%);\n  background-image: linear-gradient(to bottom, #d9edf7 0%, #b9def0 100%);\n  background-repeat: repeat-x;\n  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9edf7', endColorstr='#ffb9def0', GradientType=0);\n  border-color: #9acfea;\n}\n.alert-warning {\n  background-image: -webkit-linear-gradient(top, #fcf8e3 0%, #f8efc0 100%);\n  background-image: -o-linear-gradient(top, #fcf8e3 0%, #f8efc0 100%);\n  background-image: linear-gradient(to bottom, #fcf8e3 0%, #f8efc0 100%);\n  background-repeat: repeat-x;\n  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffcf8e3', endColorstr='#fff8efc0', GradientType=0);\n  border-color: #f5e79e;\n}\n.alert-danger {\n  background-image: -webkit-linear-gradient(top, #f2dede 0%, #e7c3c3 100%);\n  background-image: -o-linear-gradient(top, #f2dede 0%, #e7c3c3 100%);\n  background-image: linear-gradient(to bottom, #f2dede 0%, #e7c3c3 100%);\n  background-repeat: repeat-x;\n  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff2dede', endColorstr='#ffe7c3c3', GradientType=0);\n  border-color: #dca7a7;\n}\n.progress {\n  background-image: -webkit-linear-gradient(top, #ebebeb 0%, #f5f5f5 100%);\n  background-image: -o-linear-gradient(top, #ebebeb 0%, #f5f5f5 100%);\n  background-image: linear-gradient(to bottom, #ebebeb 0%, #f5f5f5 100%);\n  background-repeat: repeat-x;\n  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffebebeb', endColorstr='#fff5f5f5', GradientType=0);\n}\n.progress-bar {\n  background-image: -webkit-linear-gradient(top, #337ab7 0%, #286090 100%);\n  background-image: -o-linear-gradient(top, #337ab7 0%, #286090 100%);\n  background-image: linear-gradient(to bottom, #337ab7 0%, #286090 100%);\n  background-repeat: repeat-x;\n  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff286090', GradientType=0);\n}\n.progress-bar-success {\n  background-image: -webkit-linear-gradient(top, #5cb85c 0%, #449d44 100%);\n  background-image: -o-linear-gradient(top, #5cb85c 0%, #449d44 100%);\n  background-image: linear-gradient(to bottom, #5cb85c 0%, #449d44 100%);\n  background-repeat: repeat-x;\n  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5cb85c', endColorstr='#ff449d44', GradientType=0);\n}\n.progress-bar-info {\n  background-image: -webkit-linear-gradient(top, #5bc0de 0%, #31b0d5 100%);\n  background-image: -o-linear-gradient(top, #5bc0de 0%, #31b0d5 100%);\n  background-image: linear-gradient(to bottom, #5bc0de 0%, #31b0d5 100%);\n  background-repeat: repeat-x;\n  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de', endColorstr='#ff31b0d5', GradientType=0);\n}\n.progress-bar-warning {\n  background-image: -webkit-linear-gradient(top, #f0ad4e 0%, #ec971f 100%);\n  background-image: -o-linear-gradient(top, #f0ad4e 0%, #ec971f 100%);\n  background-image: linear-gradient(to bottom, #f0ad4e 0%, #ec971f 100%);\n  background-repeat: repeat-x;\n  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff0ad4e', endColorstr='#ffec971f', GradientType=0);\n}\n.progress-bar-danger {\n  background-image: -webkit-linear-gradient(top, #d9534f 0%, #c9302c 100%);\n  background-image: -o-linear-gradient(top, #d9534f 0%, #c9302c 100%);\n  background-image: linear-gradient(to bottom, #d9534f 0%, #c9302c 100%);\n  background-repeat: repeat-x;\n  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9534f', endColorstr='#ffc9302c', GradientType=0);\n}\n.progress-bar-striped {\n  background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);\n  background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);\n  background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);\n}\n.list-group {\n  border-radius: 4px;\n  -webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.075);\n  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.075);\n}\n.list-group-item.active,\n.list-group-item.active:hover,\n.list-group-item.active:focus {\n  text-shadow: 0 -1px 0 #286090;\n  background-image: -webkit-linear-gradient(top, #337ab7 0%, #2b669a 100%);\n  background-image: -o-linear-gradient(top, #337ab7 0%, #2b669a 100%);\n  background-image: linear-gradient(to bottom, #337ab7 0%, #2b669a 100%);\n  background-repeat: repeat-x;\n  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff2b669a', GradientType=0);\n  border-color: #2b669a;\n}\n.list-group-item.active .badge,\n.list-group-item.active:hover .badge,\n.list-group-item.active:focus .badge {\n  text-shadow: none;\n}\n.panel {\n  -webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);\n  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);\n}\n.panel-default > .panel-heading {\n  background-image: -webkit-linear-gradient(top, #f5f5f5 0%, #e8e8e8 100%);\n  background-image: -o-linear-gradient(top, #f5f5f5 0%, #e8e8e8 100%);\n  background-image: linear-gradient(to bottom, #f5f5f5 0%, #e8e8e8 100%);\n  background-repeat: repeat-x;\n  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff5f5f5', endColorstr='#ffe8e8e8', GradientType=0);\n}\n.panel-primary > .panel-heading {\n  background-image: -webkit-linear-gradient(top, #337ab7 0%, #2e6da4 100%);\n  background-image: -o-linear-gradient(top, #337ab7 0%, #2e6da4 100%);\n  background-image: linear-gradient(to bottom, #337ab7 0%, #2e6da4 100%);\n  background-repeat: repeat-x;\n  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff2e6da4', GradientType=0);\n}\n.panel-success > .panel-heading {\n  background-image: -webkit-linear-gradient(top, #dff0d8 0%, #d0e9c6 100%);\n  background-image: -o-linear-gradient(top, #dff0d8 0%, #d0e9c6 100%);\n  background-image: linear-gradient(to bottom, #dff0d8 0%, #d0e9c6 100%);\n  background-repeat: repeat-x;\n  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffdff0d8', endColorstr='#ffd0e9c6', GradientType=0);\n}\n.panel-info > .panel-heading {\n  background-image: -webkit-linear-gradient(top, #d9edf7 0%, #c4e3f3 100%);\n  background-image: -o-linear-gradient(top, #d9edf7 0%, #c4e3f3 100%);\n  background-image: linear-gradient(to bottom, #d9edf7 0%, #c4e3f3 100%);\n  background-repeat: repeat-x;\n  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9edf7', endColorstr='#ffc4e3f3', GradientType=0);\n}\n.panel-warning > .panel-heading {\n  background-image: -webkit-linear-gradient(top, #fcf8e3 0%, #faf2cc 100%);\n  background-image: -o-linear-gradient(top, #fcf8e3 0%, #faf2cc 100%);\n  background-image: linear-gradient(to bottom, #fcf8e3 0%, #faf2cc 100%);\n  background-repeat: repeat-x;\n  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffcf8e3', endColorstr='#fffaf2cc', GradientType=0);\n}\n.panel-danger > .panel-heading {\n  background-image: -webkit-linear-gradient(top, #f2dede 0%, #ebcccc 100%);\n  background-image: -o-linear-gradient(top, #f2dede 0%, #ebcccc 100%);\n  background-image: linear-gradient(to bottom, #f2dede 0%, #ebcccc 100%);\n  background-repeat: repeat-x;\n  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff2dede', endColorstr='#ffebcccc', GradientType=0);\n}\n.well {\n  background-image: -webkit-linear-gradient(top, #e8e8e8 0%, #f5f5f5 100%);\n  background-image: -o-linear-gradient(top, #e8e8e8 0%, #f5f5f5 100%);\n  background-image: linear-gradient(to bottom, #e8e8e8 0%, #f5f5f5 100%);\n  background-repeat: repeat-x;\n  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffe8e8e8', endColorstr='#fff5f5f5', GradientType=0);\n  border-color: #dcdcdc;\n  -webkit-box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.05), 0 1px 0 rgba(255, 255, 255, 0.1);\n  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.05), 0 1px 0 rgba(255, 255, 255, 0.1);\n}\n/*# sourceMappingURL=bootstrap-theme.css.map */","/*!\n * Bootstrap v3.3.7 (http://getbootstrap.com)\n * Copyright 2011-2016 Twitter, Inc.\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n */\n\n//\n// Load core variables and mixins\n// --------------------------------------------------\n\n@import \"variables.less\";\n@import \"mixins.less\";\n\n\n//\n// Buttons\n// --------------------------------------------------\n\n// Common styles\n.btn-default,\n.btn-primary,\n.btn-success,\n.btn-info,\n.btn-warning,\n.btn-danger {\n  text-shadow: 0 -1px 0 rgba(0,0,0,.2);\n  @shadow: inset 0 1px 0 rgba(255,255,255,.15), 0 1px 1px rgba(0,0,0,.075);\n  .box-shadow(@shadow);\n\n  // Reset the shadow\n  &:active,\n  &.active {\n    .box-shadow(inset 0 3px 5px rgba(0,0,0,.125));\n  }\n\n  &.disabled,\n  &[disabled],\n  fieldset[disabled] & {\n    .box-shadow(none);\n  }\n\n  .badge {\n    text-shadow: none;\n  }\n}\n\n// Mixin for generating new styles\n.btn-styles(@btn-color: #555) {\n  #gradient > .vertical(@start-color: @btn-color; @end-color: darken(@btn-color, 12%));\n  .reset-filter(); // Disable gradients for IE9 because filter bleeds through rounded corners; see https://github.com/twbs/bootstrap/issues/10620\n  background-repeat: repeat-x;\n  border-color: darken(@btn-color, 14%);\n\n  &:hover,\n  &:focus  {\n    background-color: darken(@btn-color, 12%);\n    background-position: 0 -15px;\n  }\n\n  &:active,\n  &.active {\n    background-color: darken(@btn-color, 12%);\n    border-color: darken(@btn-color, 14%);\n  }\n\n  &.disabled,\n  &[disabled],\n  fieldset[disabled] & {\n    &,\n    &:hover,\n    &:focus,\n    &.focus,\n    &:active,\n    &.active {\n      background-color: darken(@btn-color, 12%);\n      background-image: none;\n    }\n  }\n}\n\n// Common styles\n.btn {\n  // Remove the gradient for the pressed/active state\n  &:active,\n  &.active {\n    background-image: none;\n  }\n}\n\n// Apply the mixin to the buttons\n.btn-default { .btn-styles(@btn-default-bg); text-shadow: 0 1px 0 #fff; border-color: #ccc; }\n.btn-primary { .btn-styles(@btn-primary-bg); }\n.btn-success { .btn-styles(@btn-success-bg); }\n.btn-info    { .btn-styles(@btn-info-bg); }\n.btn-warning { .btn-styles(@btn-warning-bg); }\n.btn-danger  { .btn-styles(@btn-danger-bg); }\n\n\n//\n// Images\n// --------------------------------------------------\n\n.thumbnail,\n.img-thumbnail {\n  .box-shadow(0 1px 2px rgba(0,0,0,.075));\n}\n\n\n//\n// Dropdowns\n// --------------------------------------------------\n\n.dropdown-menu > li > a:hover,\n.dropdown-menu > li > a:focus {\n  #gradient > .vertical(@start-color: @dropdown-link-hover-bg; @end-color: darken(@dropdown-link-hover-bg, 5%));\n  background-color: darken(@dropdown-link-hover-bg, 5%);\n}\n.dropdown-menu > .active > a,\n.dropdown-menu > .active > a:hover,\n.dropdown-menu > .active > a:focus {\n  #gradient > .vertical(@start-color: @dropdown-link-active-bg; @end-color: darken(@dropdown-link-active-bg, 5%));\n  background-color: darken(@dropdown-link-active-bg, 5%);\n}\n\n\n//\n// Navbar\n// --------------------------------------------------\n\n// Default navbar\n.navbar-default {\n  #gradient > .vertical(@start-color: lighten(@navbar-default-bg, 10%); @end-color: @navbar-default-bg);\n  .reset-filter(); // Remove gradient in IE<10 to fix bug where dropdowns don't get triggered\n  border-radius: @navbar-border-radius;\n  @shadow: inset 0 1px 0 rgba(255,255,255,.15), 0 1px 5px rgba(0,0,0,.075);\n  .box-shadow(@shadow);\n\n  .navbar-nav > .open > a,\n  .navbar-nav > .active > a {\n    #gradient > .vertical(@start-color: darken(@navbar-default-link-active-bg, 5%); @end-color: darken(@navbar-default-link-active-bg, 2%));\n    .box-shadow(inset 0 3px 9px rgba(0,0,0,.075));\n  }\n}\n.navbar-brand,\n.navbar-nav > li > a {\n  text-shadow: 0 1px 0 rgba(255,255,255,.25);\n}\n\n// Inverted navbar\n.navbar-inverse {\n  #gradient > .vertical(@start-color: lighten(@navbar-inverse-bg, 10%); @end-color: @navbar-inverse-bg);\n  .reset-filter(); // Remove gradient in IE<10 to fix bug where dropdowns don't get triggered; see https://github.com/twbs/bootstrap/issues/10257\n  border-radius: @navbar-border-radius;\n  .navbar-nav > .open > a,\n  .navbar-nav > .active > a {\n    #gradient > .vertical(@start-color: @navbar-inverse-link-active-bg; @end-color: lighten(@navbar-inverse-link-active-bg, 2.5%));\n    .box-shadow(inset 0 3px 9px rgba(0,0,0,.25));\n  }\n\n  .navbar-brand,\n  .navbar-nav > li > a {\n    text-shadow: 0 -1px 0 rgba(0,0,0,.25);\n  }\n}\n\n// Undo rounded corners in static and fixed navbars\n.navbar-static-top,\n.navbar-fixed-top,\n.navbar-fixed-bottom {\n  border-radius: 0;\n}\n\n// Fix active state of dropdown items in collapsed mode\n@media (max-width: @grid-float-breakpoint-max) {\n  .navbar .navbar-nav .open .dropdown-menu > .active > a {\n    &,\n    &:hover,\n    &:focus {\n      color: #fff;\n      #gradient > .vertical(@start-color: @dropdown-link-active-bg; @end-color: darken(@dropdown-link-active-bg, 5%));\n    }\n  }\n}\n\n\n//\n// Alerts\n// --------------------------------------------------\n\n// Common styles\n.alert {\n  text-shadow: 0 1px 0 rgba(255,255,255,.2);\n  @shadow: inset 0 1px 0 rgba(255,255,255,.25), 0 1px 2px rgba(0,0,0,.05);\n  .box-shadow(@shadow);\n}\n\n// Mixin for generating new styles\n.alert-styles(@color) {\n  #gradient > .vertical(@start-color: @color; @end-color: darken(@color, 7.5%));\n  border-color: darken(@color, 15%);\n}\n\n// Apply the mixin to the alerts\n.alert-success    { .alert-styles(@alert-success-bg); }\n.alert-info       { .alert-styles(@alert-info-bg); }\n.alert-warning    { .alert-styles(@alert-warning-bg); }\n.alert-danger     { .alert-styles(@alert-danger-bg); }\n\n\n//\n// Progress bars\n// --------------------------------------------------\n\n// Give the progress background some depth\n.progress {\n  #gradient > .vertical(@start-color: darken(@progress-bg, 4%); @end-color: @progress-bg)\n}\n\n// Mixin for generating new styles\n.progress-bar-styles(@color) {\n  #gradient > .vertical(@start-color: @color; @end-color: darken(@color, 10%));\n}\n\n// Apply the mixin to the progress bars\n.progress-bar            { .progress-bar-styles(@progress-bar-bg); }\n.progress-bar-success    { .progress-bar-styles(@progress-bar-success-bg); }\n.progress-bar-info       { .progress-bar-styles(@progress-bar-info-bg); }\n.progress-bar-warning    { .progress-bar-styles(@progress-bar-warning-bg); }\n.progress-bar-danger     { .progress-bar-styles(@progress-bar-danger-bg); }\n\n// Reset the striped class because our mixins don't do multiple gradients and\n// the above custom styles override the new `.progress-bar-striped` in v3.2.0.\n.progress-bar-striped {\n  #gradient > .striped();\n}\n\n\n//\n// List groups\n// --------------------------------------------------\n\n.list-group {\n  border-radius: @border-radius-base;\n  .box-shadow(0 1px 2px rgba(0,0,0,.075));\n}\n.list-group-item.active,\n.list-group-item.active:hover,\n.list-group-item.active:focus {\n  text-shadow: 0 -1px 0 darken(@list-group-active-bg, 10%);\n  #gradient > .vertical(@start-color: @list-group-active-bg; @end-color: darken(@list-group-active-bg, 7.5%));\n  border-color: darken(@list-group-active-border, 7.5%);\n\n  .badge {\n    text-shadow: none;\n  }\n}\n\n\n//\n// Panels\n// --------------------------------------------------\n\n// Common styles\n.panel {\n  .box-shadow(0 1px 2px rgba(0,0,0,.05));\n}\n\n// Mixin for generating new styles\n.panel-heading-styles(@color) {\n  #gradient > .vertical(@start-color: @color; @end-color: darken(@color, 5%));\n}\n\n// Apply the mixin to the panel headings only\n.panel-default > .panel-heading   { .panel-heading-styles(@panel-default-heading-bg); }\n.panel-primary > .panel-heading   { .panel-heading-styles(@panel-primary-heading-bg); }\n.panel-success > .panel-heading   { .panel-heading-styles(@panel-success-heading-bg); }\n.panel-info > .panel-heading      { .panel-heading-styles(@panel-info-heading-bg); }\n.panel-warning > .panel-heading   { .panel-heading-styles(@panel-warning-heading-bg); }\n.panel-danger > .panel-heading    { .panel-heading-styles(@panel-danger-heading-bg); }\n\n\n//\n// Wells\n// --------------------------------------------------\n\n.well {\n  #gradient > .vertical(@start-color: darken(@well-bg, 5%); @end-color: @well-bg);\n  border-color: darken(@well-bg, 10%);\n  @shadow: inset 0 1px 3px rgba(0,0,0,.05), 0 1px 0 rgba(255,255,255,.1);\n  .box-shadow(@shadow);\n}\n","// Vendor Prefixes\n//\n// All vendor mixins are deprecated as of v3.2.0 due to the introduction of\n// Autoprefixer in our Gruntfile. They have been removed in v4.\n\n// - Animations\n// - Backface visibility\n// - Box shadow\n// - Box sizing\n// - Content columns\n// - Hyphens\n// - Placeholder text\n// - Transformations\n// - Transitions\n// - User Select\n\n\n// Animations\n.animation(@animation) {\n  -webkit-animation: @animation;\n       -o-animation: @animation;\n          animation: @animation;\n}\n.animation-name(@name) {\n  -webkit-animation-name: @name;\n          animation-name: @name;\n}\n.animation-duration(@duration) {\n  -webkit-animation-duration: @duration;\n          animation-duration: @duration;\n}\n.animation-timing-function(@timing-function) {\n  -webkit-animation-timing-function: @timing-function;\n          animation-timing-function: @timing-function;\n}\n.animation-delay(@delay) {\n  -webkit-animation-delay: @delay;\n          animation-delay: @delay;\n}\n.animation-iteration-count(@iteration-count) {\n  -webkit-animation-iteration-count: @iteration-count;\n          animation-iteration-count: @iteration-count;\n}\n.animation-direction(@direction) {\n  -webkit-animation-direction: @direction;\n          animation-direction: @direction;\n}\n.animation-fill-mode(@fill-mode) {\n  -webkit-animation-fill-mode: @fill-mode;\n          animation-fill-mode: @fill-mode;\n}\n\n// Backface visibility\n// Prevent browsers from flickering when using CSS 3D transforms.\n// Default value is `visible`, but can be changed to `hidden`\n\n.backface-visibility(@visibility) {\n  -webkit-backface-visibility: @visibility;\n     -moz-backface-visibility: @visibility;\n          backface-visibility: @visibility;\n}\n\n// Drop shadows\n//\n// Note: Deprecated `.box-shadow()` as of v3.1.0 since all of Bootstrap's\n// supported browsers that have box shadow capabilities now support it.\n\n.box-shadow(@shadow) {\n  -webkit-box-shadow: @shadow; // iOS <4.3 & Android <4.1\n          box-shadow: @shadow;\n}\n\n// Box sizing\n.box-sizing(@boxmodel) {\n  -webkit-box-sizing: @boxmodel;\n     -moz-box-sizing: @boxmodel;\n          box-sizing: @boxmodel;\n}\n\n// CSS3 Content Columns\n.content-columns(@column-count; @column-gap: @grid-gutter-width) {\n  -webkit-column-count: @column-count;\n     -moz-column-count: @column-count;\n          column-count: @column-count;\n  -webkit-column-gap: @column-gap;\n     -moz-column-gap: @column-gap;\n          column-gap: @column-gap;\n}\n\n// Optional hyphenation\n.hyphens(@mode: auto) {\n  word-wrap: break-word;\n  -webkit-hyphens: @mode;\n     -moz-hyphens: @mode;\n      -ms-hyphens: @mode; // IE10+\n       -o-hyphens: @mode;\n          hyphens: @mode;\n}\n\n// Placeholder text\n.placeholder(@color: @input-color-placeholder) {\n  // Firefox\n  &::-moz-placeholder {\n    color: @color;\n    opacity: 1; // Override Firefox's unusual default opacity; see https://github.com/twbs/bootstrap/pull/11526\n  }\n  &:-ms-input-placeholder { color: @color; } // Internet Explorer 10+\n  &::-webkit-input-placeholder  { color: @color; } // Safari and Chrome\n}\n\n// Transformations\n.scale(@ratio) {\n  -webkit-transform: scale(@ratio);\n      -ms-transform: scale(@ratio); // IE9 only\n       -o-transform: scale(@ratio);\n          transform: scale(@ratio);\n}\n.scale(@ratioX; @ratioY) {\n  -webkit-transform: scale(@ratioX, @ratioY);\n      -ms-transform: scale(@ratioX, @ratioY); // IE9 only\n       -o-transform: scale(@ratioX, @ratioY);\n          transform: scale(@ratioX, @ratioY);\n}\n.scaleX(@ratio) {\n  -webkit-transform: scaleX(@ratio);\n      -ms-transform: scaleX(@ratio); // IE9 only\n       -o-transform: scaleX(@ratio);\n          transform: scaleX(@ratio);\n}\n.scaleY(@ratio) {\n  -webkit-transform: scaleY(@ratio);\n      -ms-transform: scaleY(@ratio); // IE9 only\n       -o-transform: scaleY(@ratio);\n          transform: scaleY(@ratio);\n}\n.skew(@x; @y) {\n  -webkit-transform: skewX(@x) skewY(@y);\n      -ms-transform: skewX(@x) skewY(@y); // See https://github.com/twbs/bootstrap/issues/4885; IE9+\n       -o-transform: skewX(@x) skewY(@y);\n          transform: skewX(@x) skewY(@y);\n}\n.translate(@x; @y) {\n  -webkit-transform: translate(@x, @y);\n      -ms-transform: translate(@x, @y); // IE9 only\n       -o-transform: translate(@x, @y);\n          transform: translate(@x, @y);\n}\n.translate3d(@x; @y; @z) {\n  -webkit-transform: translate3d(@x, @y, @z);\n          transform: translate3d(@x, @y, @z);\n}\n.rotate(@degrees) {\n  -webkit-transform: rotate(@degrees);\n      -ms-transform: rotate(@degrees); // IE9 only\n       -o-transform: rotate(@degrees);\n          transform: rotate(@degrees);\n}\n.rotateX(@degrees) {\n  -webkit-transform: rotateX(@degrees);\n      -ms-transform: rotateX(@degrees); // IE9 only\n       -o-transform: rotateX(@degrees);\n          transform: rotateX(@degrees);\n}\n.rotateY(@degrees) {\n  -webkit-transform: rotateY(@degrees);\n      -ms-transform: rotateY(@degrees); // IE9 only\n       -o-transform: rotateY(@degrees);\n          transform: rotateY(@degrees);\n}\n.perspective(@perspective) {\n  -webkit-perspective: @perspective;\n     -moz-perspective: @perspective;\n          perspective: @perspective;\n}\n.perspective-origin(@perspective) {\n  -webkit-perspective-origin: @perspective;\n     -moz-perspective-origin: @perspective;\n          perspective-origin: @perspective;\n}\n.transform-origin(@origin) {\n  -webkit-transform-origin: @origin;\n     -moz-transform-origin: @origin;\n      -ms-transform-origin: @origin; // IE9 only\n          transform-origin: @origin;\n}\n\n\n// Transitions\n\n.transition(@transition) {\n  -webkit-transition: @transition;\n       -o-transition: @transition;\n          transition: @transition;\n}\n.transition-property(@transition-property) {\n  -webkit-transition-property: @transition-property;\n          transition-property: @transition-property;\n}\n.transition-delay(@transition-delay) {\n  -webkit-transition-delay: @transition-delay;\n          transition-delay: @transition-delay;\n}\n.transition-duration(@transition-duration) {\n  -webkit-transition-duration: @transition-duration;\n          transition-duration: @transition-duration;\n}\n.transition-timing-function(@timing-function) {\n  -webkit-transition-timing-function: @timing-function;\n          transition-timing-function: @timing-function;\n}\n.transition-transform(@transition) {\n  -webkit-transition: -webkit-transform @transition;\n     -moz-transition: -moz-transform @transition;\n       -o-transition: -o-transform @transition;\n          transition: transform @transition;\n}\n\n\n// User select\n// For selecting text on the page\n\n.user-select(@select) {\n  -webkit-user-select: @select;\n     -moz-user-select: @select;\n      -ms-user-select: @select; // IE10+\n          user-select: @select;\n}\n","// Gradients\n\n#gradient {\n\n  // Horizontal gradient, from left to right\n  //\n  // Creates two color stops, start and end, by specifying a color and position for each color stop.\n  // Color stops are not available in IE9 and below.\n  .horizontal(@start-color: #555; @end-color: #333; @start-percent: 0%; @end-percent: 100%) {\n    background-image: -webkit-linear-gradient(left, @start-color @start-percent, @end-color @end-percent); // Safari 5.1-6, Chrome 10+\n    background-image: -o-linear-gradient(left, @start-color @start-percent, @end-color @end-percent); // Opera 12\n    background-image: linear-gradient(to right, @start-color @start-percent, @end-color @end-percent); // Standard, IE10, Firefox 16+, Opera 12.10+, Safari 7+, Chrome 26+\n    background-repeat: repeat-x;\n    filter: e(%(\"progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=1)\",argb(@start-color),argb(@end-color))); // IE9 and down\n  }\n\n  // Vertical gradient, from top to bottom\n  //\n  // Creates two color stops, start and end, by specifying a color and position for each color stop.\n  // Color stops are not available in IE9 and below.\n  .vertical(@start-color: #555; @end-color: #333; @start-percent: 0%; @end-percent: 100%) {\n    background-image: -webkit-linear-gradient(top, @start-color @start-percent, @end-color @end-percent);  // Safari 5.1-6, Chrome 10+\n    background-image: -o-linear-gradient(top, @start-color @start-percent, @end-color @end-percent);  // Opera 12\n    background-image: linear-gradient(to bottom, @start-color @start-percent, @end-color @end-percent); // Standard, IE10, Firefox 16+, Opera 12.10+, Safari 7+, Chrome 26+\n    background-repeat: repeat-x;\n    filter: e(%(\"progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=0)\",argb(@start-color),argb(@end-color))); // IE9 and down\n  }\n\n  .directional(@start-color: #555; @end-color: #333; @deg: 45deg) {\n    background-repeat: repeat-x;\n    background-image: -webkit-linear-gradient(@deg, @start-color, @end-color); // Safari 5.1-6, Chrome 10+\n    background-image: -o-linear-gradient(@deg, @start-color, @end-color); // Opera 12\n    background-image: linear-gradient(@deg, @start-color, @end-color); // Standard, IE10, Firefox 16+, Opera 12.10+, Safari 7+, Chrome 26+\n  }\n  .horizontal-three-colors(@start-color: #00b3ee; @mid-color: #7a43b6; @color-stop: 50%; @end-color: #c3325f) {\n    background-image: -webkit-linear-gradient(left, @start-color, @mid-color @color-stop, @end-color);\n    background-image: -o-linear-gradient(left, @start-color, @mid-color @color-stop, @end-color);\n    background-image: linear-gradient(to right, @start-color, @mid-color @color-stop, @end-color);\n    background-repeat: no-repeat;\n    filter: e(%(\"progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=1)\",argb(@start-color),argb(@end-color))); // IE9 and down, gets no color-stop at all for proper fallback\n  }\n  .vertical-three-colors(@start-color: #00b3ee; @mid-color: #7a43b6; @color-stop: 50%; @end-color: #c3325f) {\n    background-image: -webkit-linear-gradient(@start-color, @mid-color @color-stop, @end-color);\n    background-image: -o-linear-gradient(@start-color, @mid-color @color-stop, @end-color);\n    background-image: linear-gradient(@start-color, @mid-color @color-stop, @end-color);\n    background-repeat: no-repeat;\n    filter: e(%(\"progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=0)\",argb(@start-color),argb(@end-color))); // IE9 and down, gets no color-stop at all for proper fallback\n  }\n  .radial(@inner-color: #555; @outer-color: #333) {\n    background-image: -webkit-radial-gradient(circle, @inner-color, @outer-color);\n    background-image: radial-gradient(circle, @inner-color, @outer-color);\n    background-repeat: no-repeat;\n  }\n  .striped(@color: rgba(255,255,255,.15); @angle: 45deg) {\n    background-image: -webkit-linear-gradient(@angle, @color 25%, transparent 25%, transparent 50%, @color 50%, @color 75%, transparent 75%, transparent);\n    background-image: -o-linear-gradient(@angle, @color 25%, transparent 25%, transparent 50%, @color 50%, @color 75%, transparent 75%, transparent);\n    background-image: linear-gradient(@angle, @color 25%, transparent 25%, transparent 50%, @color 50%, @color 75%, transparent 75%, transparent);\n  }\n}\n","// Reset filters for IE\n//\n// When you need to remove a gradient background, do not forget to use this to reset\n// the IE filter for IE9 and below.\n\n.reset-filter() {\n  filter: e(%(\"progid:DXImageTransform.Microsoft.gradient(enabled = false)\"));\n}\n"]}
      \ No newline at end of file
      diff --git a/blockly/webif/static/css/bootstrap-theme.min.css b/blockly/webif/static/css/bootstrap-theme.min.css
      deleted file mode 100755
      index 5e3940195..000000000
      --- a/blockly/webif/static/css/bootstrap-theme.min.css
      +++ /dev/null
      @@ -1,6 +0,0 @@
      -/*!
      - * Bootstrap v3.3.7 (http://getbootstrap.com)
      - * Copyright 2011-2016 Twitter, Inc.
      - * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
      - */.btn-danger,.btn-default,.btn-info,.btn-primary,.btn-success,.btn-warning{text-shadow:0 -1px 0 rgba(0,0,0,.2);-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.15),0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 0 rgba(255,255,255,.15),0 1px 1px rgba(0,0,0,.075)}.btn-danger.active,.btn-danger:active,.btn-default.active,.btn-default:active,.btn-info.active,.btn-info:active,.btn-primary.active,.btn-primary:active,.btn-success.active,.btn-success:active,.btn-warning.active,.btn-warning:active{-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,.125);box-shadow:inset 0 3px 5px rgba(0,0,0,.125)}.btn-danger.disabled,.btn-danger[disabled],.btn-default.disabled,.btn-default[disabled],.btn-info.disabled,.btn-info[disabled],.btn-primary.disabled,.btn-primary[disabled],.btn-success.disabled,.btn-success[disabled],.btn-warning.disabled,.btn-warning[disabled],fieldset[disabled] .btn-danger,fieldset[disabled] .btn-default,fieldset[disabled] .btn-info,fieldset[disabled] .btn-primary,fieldset[disabled] .btn-success,fieldset[disabled] .btn-warning{-webkit-box-shadow:none;box-shadow:none}.btn-danger .badge,.btn-default .badge,.btn-info .badge,.btn-primary .badge,.btn-success .badge,.btn-warning .badge{text-shadow:none}.btn.active,.btn:active{background-image:none}.btn-default{text-shadow:0 1px 0 #fff;background-image:-webkit-linear-gradient(top,#fff 0,#e0e0e0 100%);background-image:-o-linear-gradient(top,#fff 0,#e0e0e0 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#fff),to(#e0e0e0));background-image:linear-gradient(to bottom,#fff 0,#e0e0e0 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#ffe0e0e0', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);background-repeat:repeat-x;border-color:#dbdbdb;border-color:#ccc}.btn-default:focus,.btn-default:hover{background-color:#e0e0e0;background-position:0 -15px}.btn-default.active,.btn-default:active{background-color:#e0e0e0;border-color:#dbdbdb}.btn-default.disabled,.btn-default.disabled.active,.btn-default.disabled.focus,.btn-default.disabled:active,.btn-default.disabled:focus,.btn-default.disabled:hover,.btn-default[disabled],.btn-default[disabled].active,.btn-default[disabled].focus,.btn-default[disabled]:active,.btn-default[disabled]:focus,.btn-default[disabled]:hover,fieldset[disabled] .btn-default,fieldset[disabled] .btn-default.active,fieldset[disabled] .btn-default.focus,fieldset[disabled] .btn-default:active,fieldset[disabled] .btn-default:focus,fieldset[disabled] .btn-default:hover{background-color:#e0e0e0;background-image:none}.btn-primary{background-image:-webkit-linear-gradient(top,#337ab7 0,#265a88 100%);background-image:-o-linear-gradient(top,#337ab7 0,#265a88 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#337ab7),to(#265a88));background-image:linear-gradient(to bottom,#337ab7 0,#265a88 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff265a88', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);background-repeat:repeat-x;border-color:#245580}.btn-primary:focus,.btn-primary:hover{background-color:#265a88;background-position:0 -15px}.btn-primary.active,.btn-primary:active{background-color:#265a88;border-color:#245580}.btn-primary.disabled,.btn-primary.disabled.active,.btn-primary.disabled.focus,.btn-primary.disabled:active,.btn-primary.disabled:focus,.btn-primary.disabled:hover,.btn-primary[disabled],.btn-primary[disabled].active,.btn-primary[disabled].focus,.btn-primary[disabled]:active,.btn-primary[disabled]:focus,.btn-primary[disabled]:hover,fieldset[disabled] .btn-primary,fieldset[disabled] .btn-primary.active,fieldset[disabled] .btn-primary.focus,fieldset[disabled] .btn-primary:active,fieldset[disabled] .btn-primary:focus,fieldset[disabled] .btn-primary:hover{background-color:#265a88;background-image:none}.btn-success{background-image:-webkit-linear-gradient(top,#5cb85c 0,#419641 100%);background-image:-o-linear-gradient(top,#5cb85c 0,#419641 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#5cb85c),to(#419641));background-image:linear-gradient(to bottom,#5cb85c 0,#419641 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5cb85c', endColorstr='#ff419641', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);background-repeat:repeat-x;border-color:#3e8f3e}.btn-success:focus,.btn-success:hover{background-color:#419641;background-position:0 -15px}.btn-success.active,.btn-success:active{background-color:#419641;border-color:#3e8f3e}.btn-success.disabled,.btn-success.disabled.active,.btn-success.disabled.focus,.btn-success.disabled:active,.btn-success.disabled:focus,.btn-success.disabled:hover,.btn-success[disabled],.btn-success[disabled].active,.btn-success[disabled].focus,.btn-success[disabled]:active,.btn-success[disabled]:focus,.btn-success[disabled]:hover,fieldset[disabled] .btn-success,fieldset[disabled] .btn-success.active,fieldset[disabled] .btn-success.focus,fieldset[disabled] .btn-success:active,fieldset[disabled] .btn-success:focus,fieldset[disabled] .btn-success:hover{background-color:#419641;background-image:none}.btn-info{background-image:-webkit-linear-gradient(top,#5bc0de 0,#2aabd2 100%);background-image:-o-linear-gradient(top,#5bc0de 0,#2aabd2 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#5bc0de),to(#2aabd2));background-image:linear-gradient(to bottom,#5bc0de 0,#2aabd2 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de', endColorstr='#ff2aabd2', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);background-repeat:repeat-x;border-color:#28a4c9}.btn-info:focus,.btn-info:hover{background-color:#2aabd2;background-position:0 -15px}.btn-info.active,.btn-info:active{background-color:#2aabd2;border-color:#28a4c9}.btn-info.disabled,.btn-info.disabled.active,.btn-info.disabled.focus,.btn-info.disabled:active,.btn-info.disabled:focus,.btn-info.disabled:hover,.btn-info[disabled],.btn-info[disabled].active,.btn-info[disabled].focus,.btn-info[disabled]:active,.btn-info[disabled]:focus,.btn-info[disabled]:hover,fieldset[disabled] .btn-info,fieldset[disabled] .btn-info.active,fieldset[disabled] .btn-info.focus,fieldset[disabled] .btn-info:active,fieldset[disabled] .btn-info:focus,fieldset[disabled] .btn-info:hover{background-color:#2aabd2;background-image:none}.btn-warning{background-image:-webkit-linear-gradient(top,#f0ad4e 0,#eb9316 100%);background-image:-o-linear-gradient(top,#f0ad4e 0,#eb9316 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#f0ad4e),to(#eb9316));background-image:linear-gradient(to bottom,#f0ad4e 0,#eb9316 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff0ad4e', endColorstr='#ffeb9316', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);background-repeat:repeat-x;border-color:#e38d13}.btn-warning:focus,.btn-warning:hover{background-color:#eb9316;background-position:0 -15px}.btn-warning.active,.btn-warning:active{background-color:#eb9316;border-color:#e38d13}.btn-warning.disabled,.btn-warning.disabled.active,.btn-warning.disabled.focus,.btn-warning.disabled:active,.btn-warning.disabled:focus,.btn-warning.disabled:hover,.btn-warning[disabled],.btn-warning[disabled].active,.btn-warning[disabled].focus,.btn-warning[disabled]:active,.btn-warning[disabled]:focus,.btn-warning[disabled]:hover,fieldset[disabled] .btn-warning,fieldset[disabled] .btn-warning.active,fieldset[disabled] .btn-warning.focus,fieldset[disabled] .btn-warning:active,fieldset[disabled] .btn-warning:focus,fieldset[disabled] .btn-warning:hover{background-color:#eb9316;background-image:none}.btn-danger{background-image:-webkit-linear-gradient(top,#d9534f 0,#c12e2a 100%);background-image:-o-linear-gradient(top,#d9534f 0,#c12e2a 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#d9534f),to(#c12e2a));background-image:linear-gradient(to bottom,#d9534f 0,#c12e2a 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9534f', endColorstr='#ffc12e2a', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);background-repeat:repeat-x;border-color:#b92c28}.btn-danger:focus,.btn-danger:hover{background-color:#c12e2a;background-position:0 -15px}.btn-danger.active,.btn-danger:active{background-color:#c12e2a;border-color:#b92c28}.btn-danger.disabled,.btn-danger.disabled.active,.btn-danger.disabled.focus,.btn-danger.disabled:active,.btn-danger.disabled:focus,.btn-danger.disabled:hover,.btn-danger[disabled],.btn-danger[disabled].active,.btn-danger[disabled].focus,.btn-danger[disabled]:active,.btn-danger[disabled]:focus,.btn-danger[disabled]:hover,fieldset[disabled] .btn-danger,fieldset[disabled] .btn-danger.active,fieldset[disabled] .btn-danger.focus,fieldset[disabled] .btn-danger:active,fieldset[disabled] .btn-danger:focus,fieldset[disabled] .btn-danger:hover{background-color:#c12e2a;background-image:none}.img-thumbnail,.thumbnail{-webkit-box-shadow:0 1px 2px rgba(0,0,0,.075);box-shadow:0 1px 2px rgba(0,0,0,.075)}.dropdown-menu>li>a:focus,.dropdown-menu>li>a:hover{background-color:#e8e8e8;background-image:-webkit-linear-gradient(top,#f5f5f5 0,#e8e8e8 100%);background-image:-o-linear-gradient(top,#f5f5f5 0,#e8e8e8 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#f5f5f5),to(#e8e8e8));background-image:linear-gradient(to bottom,#f5f5f5 0,#e8e8e8 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff5f5f5', endColorstr='#ffe8e8e8', GradientType=0);background-repeat:repeat-x}.dropdown-menu>.active>a,.dropdown-menu>.active>a:focus,.dropdown-menu>.active>a:hover{background-color:#2e6da4;background-image:-webkit-linear-gradient(top,#337ab7 0,#2e6da4 100%);background-image:-o-linear-gradient(top,#337ab7 0,#2e6da4 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#337ab7),to(#2e6da4));background-image:linear-gradient(to bottom,#337ab7 0,#2e6da4 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff2e6da4', GradientType=0);background-repeat:repeat-x}.navbar-default{background-image:-webkit-linear-gradient(top,#fff 0,#f8f8f8 100%);background-image:-o-linear-gradient(top,#fff 0,#f8f8f8 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#fff),to(#f8f8f8));background-image:linear-gradient(to bottom,#fff 0,#f8f8f8 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#fff8f8f8', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);background-repeat:repeat-x;border-radius:4px;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.15),0 1px 5px rgba(0,0,0,.075);box-shadow:inset 0 1px 0 rgba(255,255,255,.15),0 1px 5px rgba(0,0,0,.075)}.navbar-default .navbar-nav>.active>a,.navbar-default .navbar-nav>.open>a{background-image:-webkit-linear-gradient(top,#dbdbdb 0,#e2e2e2 100%);background-image:-o-linear-gradient(top,#dbdbdb 0,#e2e2e2 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#dbdbdb),to(#e2e2e2));background-image:linear-gradient(to bottom,#dbdbdb 0,#e2e2e2 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffdbdbdb', endColorstr='#ffe2e2e2', GradientType=0);background-repeat:repeat-x;-webkit-box-shadow:inset 0 3px 9px rgba(0,0,0,.075);box-shadow:inset 0 3px 9px rgba(0,0,0,.075)}.navbar-brand,.navbar-nav>li>a{text-shadow:0 1px 0 rgba(255,255,255,.25)}.navbar-inverse{background-image:-webkit-linear-gradient(top,#3c3c3c 0,#222 100%);background-image:-o-linear-gradient(top,#3c3c3c 0,#222 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#3c3c3c),to(#222));background-image:linear-gradient(to bottom,#3c3c3c 0,#222 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff3c3c3c', endColorstr='#ff222222', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);background-repeat:repeat-x;border-radius:4px}.navbar-inverse .navbar-nav>.active>a,.navbar-inverse .navbar-nav>.open>a{background-image:-webkit-linear-gradient(top,#080808 0,#0f0f0f 100%);background-image:-o-linear-gradient(top,#080808 0,#0f0f0f 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#080808),to(#0f0f0f));background-image:linear-gradient(to bottom,#080808 0,#0f0f0f 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff080808', endColorstr='#ff0f0f0f', GradientType=0);background-repeat:repeat-x;-webkit-box-shadow:inset 0 3px 9px rgba(0,0,0,.25);box-shadow:inset 0 3px 9px rgba(0,0,0,.25)}.navbar-inverse .navbar-brand,.navbar-inverse .navbar-nav>li>a{text-shadow:0 -1px 0 rgba(0,0,0,.25)}.navbar-fixed-bottom,.navbar-fixed-top,.navbar-static-top{border-radius:0}@media (max-width:767px){.navbar .navbar-nav .open .dropdown-menu>.active>a,.navbar .navbar-nav .open .dropdown-menu>.active>a:focus,.navbar .navbar-nav .open .dropdown-menu>.active>a:hover{color:#fff;background-image:-webkit-linear-gradient(top,#337ab7 0,#2e6da4 100%);background-image:-o-linear-gradient(top,#337ab7 0,#2e6da4 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#337ab7),to(#2e6da4));background-image:linear-gradient(to bottom,#337ab7 0,#2e6da4 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff2e6da4', GradientType=0);background-repeat:repeat-x}}.alert{text-shadow:0 1px 0 rgba(255,255,255,.2);-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.25),0 1px 2px rgba(0,0,0,.05);box-shadow:inset 0 1px 0 rgba(255,255,255,.25),0 1px 2px rgba(0,0,0,.05)}.alert-success{background-image:-webkit-linear-gradient(top,#dff0d8 0,#c8e5bc 100%);background-image:-o-linear-gradient(top,#dff0d8 0,#c8e5bc 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#dff0d8),to(#c8e5bc));background-image:linear-gradient(to bottom,#dff0d8 0,#c8e5bc 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffdff0d8', endColorstr='#ffc8e5bc', GradientType=0);background-repeat:repeat-x;border-color:#b2dba1}.alert-info{background-image:-webkit-linear-gradient(top,#d9edf7 0,#b9def0 100%);background-image:-o-linear-gradient(top,#d9edf7 0,#b9def0 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#d9edf7),to(#b9def0));background-image:linear-gradient(to bottom,#d9edf7 0,#b9def0 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9edf7', endColorstr='#ffb9def0', GradientType=0);background-repeat:repeat-x;border-color:#9acfea}.alert-warning{background-image:-webkit-linear-gradient(top,#fcf8e3 0,#f8efc0 100%);background-image:-o-linear-gradient(top,#fcf8e3 0,#f8efc0 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#fcf8e3),to(#f8efc0));background-image:linear-gradient(to bottom,#fcf8e3 0,#f8efc0 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffcf8e3', endColorstr='#fff8efc0', GradientType=0);background-repeat:repeat-x;border-color:#f5e79e}.alert-danger{background-image:-webkit-linear-gradient(top,#f2dede 0,#e7c3c3 100%);background-image:-o-linear-gradient(top,#f2dede 0,#e7c3c3 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#f2dede),to(#e7c3c3));background-image:linear-gradient(to bottom,#f2dede 0,#e7c3c3 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff2dede', endColorstr='#ffe7c3c3', GradientType=0);background-repeat:repeat-x;border-color:#dca7a7}.progress{background-image:-webkit-linear-gradient(top,#ebebeb 0,#f5f5f5 100%);background-image:-o-linear-gradient(top,#ebebeb 0,#f5f5f5 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#ebebeb),to(#f5f5f5));background-image:linear-gradient(to bottom,#ebebeb 0,#f5f5f5 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffebebeb', endColorstr='#fff5f5f5', GradientType=0);background-repeat:repeat-x}.progress-bar{background-image:-webkit-linear-gradient(top,#337ab7 0,#286090 100%);background-image:-o-linear-gradient(top,#337ab7 0,#286090 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#337ab7),to(#286090));background-image:linear-gradient(to bottom,#337ab7 0,#286090 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff286090', GradientType=0);background-repeat:repeat-x}.progress-bar-success{background-image:-webkit-linear-gradient(top,#5cb85c 0,#449d44 100%);background-image:-o-linear-gradient(top,#5cb85c 0,#449d44 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#5cb85c),to(#449d44));background-image:linear-gradient(to bottom,#5cb85c 0,#449d44 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5cb85c', endColorstr='#ff449d44', GradientType=0);background-repeat:repeat-x}.progress-bar-info{background-image:-webkit-linear-gradient(top,#5bc0de 0,#31b0d5 100%);background-image:-o-linear-gradient(top,#5bc0de 0,#31b0d5 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#5bc0de),to(#31b0d5));background-image:linear-gradient(to bottom,#5bc0de 0,#31b0d5 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de', endColorstr='#ff31b0d5', GradientType=0);background-repeat:repeat-x}.progress-bar-warning{background-image:-webkit-linear-gradient(top,#f0ad4e 0,#ec971f 100%);background-image:-o-linear-gradient(top,#f0ad4e 0,#ec971f 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#f0ad4e),to(#ec971f));background-image:linear-gradient(to bottom,#f0ad4e 0,#ec971f 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff0ad4e', endColorstr='#ffec971f', GradientType=0);background-repeat:repeat-x}.progress-bar-danger{background-image:-webkit-linear-gradient(top,#d9534f 0,#c9302c 100%);background-image:-o-linear-gradient(top,#d9534f 0,#c9302c 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#d9534f),to(#c9302c));background-image:linear-gradient(to bottom,#d9534f 0,#c9302c 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9534f', endColorstr='#ffc9302c', GradientType=0);background-repeat:repeat-x}.progress-bar-striped{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.list-group{border-radius:4px;-webkit-box-shadow:0 1px 2px rgba(0,0,0,.075);box-shadow:0 1px 2px rgba(0,0,0,.075)}.list-group-item.active,.list-group-item.active:focus,.list-group-item.active:hover{text-shadow:0 -1px 0 #286090;background-image:-webkit-linear-gradient(top,#337ab7 0,#2b669a 100%);background-image:-o-linear-gradient(top,#337ab7 0,#2b669a 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#337ab7),to(#2b669a));background-image:linear-gradient(to bottom,#337ab7 0,#2b669a 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff2b669a', GradientType=0);background-repeat:repeat-x;border-color:#2b669a}.list-group-item.active .badge,.list-group-item.active:focus .badge,.list-group-item.active:hover .badge{text-shadow:none}.panel{-webkit-box-shadow:0 1px 2px rgba(0,0,0,.05);box-shadow:0 1px 2px rgba(0,0,0,.05)}.panel-default>.panel-heading{background-image:-webkit-linear-gradient(top,#f5f5f5 0,#e8e8e8 100%);background-image:-o-linear-gradient(top,#f5f5f5 0,#e8e8e8 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#f5f5f5),to(#e8e8e8));background-image:linear-gradient(to bottom,#f5f5f5 0,#e8e8e8 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff5f5f5', endColorstr='#ffe8e8e8', GradientType=0);background-repeat:repeat-x}.panel-primary>.panel-heading{background-image:-webkit-linear-gradient(top,#337ab7 0,#2e6da4 100%);background-image:-o-linear-gradient(top,#337ab7 0,#2e6da4 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#337ab7),to(#2e6da4));background-image:linear-gradient(to bottom,#337ab7 0,#2e6da4 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff2e6da4', GradientType=0);background-repeat:repeat-x}.panel-success>.panel-heading{background-image:-webkit-linear-gradient(top,#dff0d8 0,#d0e9c6 100%);background-image:-o-linear-gradient(top,#dff0d8 0,#d0e9c6 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#dff0d8),to(#d0e9c6));background-image:linear-gradient(to bottom,#dff0d8 0,#d0e9c6 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffdff0d8', endColorstr='#ffd0e9c6', GradientType=0);background-repeat:repeat-x}.panel-info>.panel-heading{background-image:-webkit-linear-gradient(top,#d9edf7 0,#c4e3f3 100%);background-image:-o-linear-gradient(top,#d9edf7 0,#c4e3f3 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#d9edf7),to(#c4e3f3));background-image:linear-gradient(to bottom,#d9edf7 0,#c4e3f3 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9edf7', endColorstr='#ffc4e3f3', GradientType=0);background-repeat:repeat-x}.panel-warning>.panel-heading{background-image:-webkit-linear-gradient(top,#fcf8e3 0,#faf2cc 100%);background-image:-o-linear-gradient(top,#fcf8e3 0,#faf2cc 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#fcf8e3),to(#faf2cc));background-image:linear-gradient(to bottom,#fcf8e3 0,#faf2cc 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffcf8e3', endColorstr='#fffaf2cc', GradientType=0);background-repeat:repeat-x}.panel-danger>.panel-heading{background-image:-webkit-linear-gradient(top,#f2dede 0,#ebcccc 100%);background-image:-o-linear-gradient(top,#f2dede 0,#ebcccc 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#f2dede),to(#ebcccc));background-image:linear-gradient(to bottom,#f2dede 0,#ebcccc 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff2dede', endColorstr='#ffebcccc', GradientType=0);background-repeat:repeat-x}.well{background-image:-webkit-linear-gradient(top,#e8e8e8 0,#f5f5f5 100%);background-image:-o-linear-gradient(top,#e8e8e8 0,#f5f5f5 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#e8e8e8),to(#f5f5f5));background-image:linear-gradient(to bottom,#e8e8e8 0,#f5f5f5 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffe8e8e8', endColorstr='#fff5f5f5', GradientType=0);background-repeat:repeat-x;border-color:#dcdcdc;-webkit-box-shadow:inset 0 1px 3px rgba(0,0,0,.05),0 1px 0 rgba(255,255,255,.1);box-shadow:inset 0 1px 3px rgba(0,0,0,.05),0 1px 0 rgba(255,255,255,.1)}
      -/*# sourceMappingURL=bootstrap-theme.min.css.map */
      \ No newline at end of file
      diff --git a/blockly/webif/static/css/bootstrap-theme.min.css.map b/blockly/webif/static/css/bootstrap-theme.min.css.map
      deleted file mode 100755
      index 94813e900..000000000
      --- a/blockly/webif/static/css/bootstrap-theme.min.css.map
      +++ /dev/null
      @@ -1 +0,0 @@
      -{"version":3,"sources":["less/theme.less","less/mixins/vendor-prefixes.less","less/mixins/gradients.less","less/mixins/reset-filter.less"],"names":[],"mappings":";;;;AAmBA,YAAA,aAAA,UAAA,aAAA,aAAA,aAME,YAAA,EAAA,KAAA,EAAA,eC2CA,mBAAA,MAAA,EAAA,IAAA,EAAA,sBAAA,EAAA,IAAA,IAAA,iBACQ,WAAA,MAAA,EAAA,IAAA,EAAA,sBAAA,EAAA,IAAA,IAAA,iBDvCR,mBAAA,mBAAA,oBAAA,oBAAA,iBAAA,iBAAA,oBAAA,oBAAA,oBAAA,oBAAA,oBAAA,oBCsCA,mBAAA,MAAA,EAAA,IAAA,IAAA,iBACQ,WAAA,MAAA,EAAA,IAAA,IAAA,iBDlCR,qBAAA,sBAAA,sBAAA,uBAAA,mBAAA,oBAAA,sBAAA,uBAAA,sBAAA,uBAAA,sBAAA,uBAAA,+BAAA,gCAAA,6BAAA,gCAAA,gCAAA,gCCiCA,mBAAA,KACQ,WAAA,KDlDV,mBAAA,oBAAA,iBAAA,oBAAA,oBAAA,oBAuBI,YAAA,KAyCF,YAAA,YAEE,iBAAA,KAKJ,aErEI,YAAA,EAAA,IAAA,EAAA,KACA,iBAAA,iDACA,iBAAA,4CAAA,iBAAA,qEAEA,iBAAA,+CCnBF,OAAA,+GH4CA,OAAA,0DACA,kBAAA,SAuC2C,aAAA,QAA2B,aAAA,KArCtE,mBAAA,mBAEE,iBAAA,QACA,oBAAA,EAAA,MAGF,oBAAA,oBAEE,iBAAA,QACA,aAAA,QAMA,sBAAA,6BAAA,4BAAA,6BAAA,4BAAA,4BAAA,uBAAA,8BAAA,6BAAA,8BAAA,6BAAA,6BAAA,gCAAA,uCAAA,sCAAA,uCAAA,sCAAA,sCAME,iBAAA,QACA,iBAAA,KAgBN,aEtEI,iBAAA,oDACA,iBAAA,+CACA,iBAAA,wEAAA,iBAAA,kDAEA,OAAA,+GCnBF,OAAA,0DH4CA,kBAAA,SACA,aAAA,QAEA,mBAAA,mBAEE,iBAAA,QACA,oBAAA,EAAA,MAGF,oBAAA,oBAEE,iBAAA,QACA,aAAA,QAMA,sBAAA,6BAAA,4BAAA,6BAAA,4BAAA,4BAAA,uBAAA,8BAAA,6BAAA,8BAAA,6BAAA,6BAAA,gCAAA,uCAAA,sCAAA,uCAAA,sCAAA,sCAME,iBAAA,QACA,iBAAA,KAiBN,aEvEI,iBAAA,oDACA,iBAAA,+CACA,iBAAA,wEAAA,iBAAA,kDAEA,OAAA,+GCnBF,OAAA,0DH4CA,kBAAA,SACA,aAAA,QAEA,mBAAA,mBAEE,iBAAA,QACA,oBAAA,EAAA,MAGF,oBAAA,oBAEE,iBAAA,QACA,aAAA,QAMA,sBAAA,6BAAA,4BAAA,6BAAA,4BAAA,4BAAA,uBAAA,8BAAA,6BAAA,8BAAA,6BAAA,6BAAA,gCAAA,uCAAA,sCAAA,uCAAA,sCAAA,sCAME,iBAAA,QACA,iBAAA,KAkBN,UExEI,iBAAA,oDACA,iBAAA,+CACA,iBAAA,wEAAA,iBAAA,kDAEA,OAAA,+GCnBF,OAAA,0DH4CA,kBAAA,SACA,aAAA,QAEA,gBAAA,gBAEE,iBAAA,QACA,oBAAA,EAAA,MAGF,iBAAA,iBAEE,iBAAA,QACA,aAAA,QAMA,mBAAA,0BAAA,yBAAA,0BAAA,yBAAA,yBAAA,oBAAA,2BAAA,0BAAA,2BAAA,0BAAA,0BAAA,6BAAA,oCAAA,mCAAA,oCAAA,mCAAA,mCAME,iBAAA,QACA,iBAAA,KAmBN,aEzEI,iBAAA,oDACA,iBAAA,+CACA,iBAAA,wEAAA,iBAAA,kDAEA,OAAA,+GCnBF,OAAA,0DH4CA,kBAAA,SACA,aAAA,QAEA,mBAAA,mBAEE,iBAAA,QACA,oBAAA,EAAA,MAGF,oBAAA,oBAEE,iBAAA,QACA,aAAA,QAMA,sBAAA,6BAAA,4BAAA,6BAAA,4BAAA,4BAAA,uBAAA,8BAAA,6BAAA,8BAAA,6BAAA,6BAAA,gCAAA,uCAAA,sCAAA,uCAAA,sCAAA,sCAME,iBAAA,QACA,iBAAA,KAoBN,YE1EI,iBAAA,oDACA,iBAAA,+CACA,iBAAA,wEAAA,iBAAA,kDAEA,OAAA,+GCnBF,OAAA,0DH4CA,kBAAA,SACA,aAAA,QAEA,kBAAA,kBAEE,iBAAA,QACA,oBAAA,EAAA,MAGF,mBAAA,mBAEE,iBAAA,QACA,aAAA,QAMA,qBAAA,4BAAA,2BAAA,4BAAA,2BAAA,2BAAA,sBAAA,6BAAA,4BAAA,6BAAA,4BAAA,4BAAA,+BAAA,sCAAA,qCAAA,sCAAA,qCAAA,qCAME,iBAAA,QACA,iBAAA,KA2BN,eAAA,WClCE,mBAAA,EAAA,IAAA,IAAA,iBACQ,WAAA,EAAA,IAAA,IAAA,iBD2CV,0BAAA,0BE3FI,iBAAA,QACA,iBAAA,oDACA,iBAAA,+CAAA,iBAAA,wEACA,iBAAA,kDACA,OAAA,+GF0FF,kBAAA,SAEF,yBAAA,+BAAA,+BEhGI,iBAAA,QACA,iBAAA,oDACA,iBAAA,+CAAA,iBAAA,wEACA,iBAAA,kDACA,OAAA,+GFgGF,kBAAA,SASF,gBE7GI,iBAAA,iDACA,iBAAA,4CACA,iBAAA,qEAAA,iBAAA,+CACA,OAAA,+GACA,OAAA,0DCnBF,kBAAA,SH+HA,cAAA,ICjEA,mBAAA,MAAA,EAAA,IAAA,EAAA,sBAAA,EAAA,IAAA,IAAA,iBACQ,WAAA,MAAA,EAAA,IAAA,EAAA,sBAAA,EAAA,IAAA,IAAA,iBD6DV,sCAAA,oCE7GI,iBAAA,oDACA,iBAAA,+CACA,iBAAA,wEAAA,iBAAA,kDACA,OAAA,+GACA,kBAAA,SD2CF,mBAAA,MAAA,EAAA,IAAA,IAAA,iBACQ,WAAA,MAAA,EAAA,IAAA,IAAA,iBD0EV,cAAA,iBAEE,YAAA,EAAA,IAAA,EAAA,sBAIF,gBEhII,iBAAA,iDACA,iBAAA,4CACA,iBAAA,qEAAA,iBAAA,+CACA,OAAA,+GACA,OAAA,0DCnBF,kBAAA,SHkJA,cAAA,IAHF,sCAAA,oCEhII,iBAAA,oDACA,iBAAA,+CACA,iBAAA,wEAAA,iBAAA,kDACA,OAAA,+GACA,kBAAA,SD2CF,mBAAA,MAAA,EAAA,IAAA,IAAA,gBACQ,WAAA,MAAA,EAAA,IAAA,IAAA,gBDgFV,8BAAA,iCAYI,YAAA,EAAA,KAAA,EAAA,gBAKJ,qBAAA,kBAAA,mBAGE,cAAA,EAqBF,yBAfI,mDAAA,yDAAA,yDAGE,MAAA,KE7JF,iBAAA,oDACA,iBAAA,+CACA,iBAAA,wEAAA,iBAAA,kDACA,OAAA,+GACA,kBAAA,UFqKJ,OACE,YAAA,EAAA,IAAA,EAAA,qBC3HA,mBAAA,MAAA,EAAA,IAAA,EAAA,sBAAA,EAAA,IAAA,IAAA,gBACQ,WAAA,MAAA,EAAA,IAAA,EAAA,sBAAA,EAAA,IAAA,IAAA,gBDsIV,eEtLI,iBAAA,oDACA,iBAAA,+CACA,iBAAA,wEAAA,iBAAA,kDACA,OAAA,+GACA,kBAAA,SF8KF,aAAA,QAKF,YEvLI,iBAAA,oDACA,iBAAA,+CACA,iBAAA,wEAAA,iBAAA,kDACA,OAAA,+GACA,kBAAA,SF8KF,aAAA,QAMF,eExLI,iBAAA,oDACA,iBAAA,+CACA,iBAAA,wEAAA,iBAAA,kDACA,OAAA,+GACA,kBAAA,SF8KF,aAAA,QAOF,cEzLI,iBAAA,oDACA,iBAAA,+CACA,iBAAA,wEAAA,iBAAA,kDACA,OAAA,+GACA,kBAAA,SF8KF,aAAA,QAeF,UEjMI,iBAAA,oDACA,iBAAA,+CACA,iBAAA,wEAAA,iBAAA,kDACA,OAAA,+GACA,kBAAA,SFuMJ,cE3MI,iBAAA,oDACA,iBAAA,+CACA,iBAAA,wEAAA,iBAAA,kDACA,OAAA,+GACA,kBAAA,SFwMJ,sBE5MI,iBAAA,oDACA,iBAAA,+CACA,iBAAA,wEAAA,iBAAA,kDACA,OAAA,+GACA,kBAAA,SFyMJ,mBE7MI,iBAAA,oDACA,iBAAA,+CACA,iBAAA,wEAAA,iBAAA,kDACA,OAAA,+GACA,kBAAA,SF0MJ,sBE9MI,iBAAA,oDACA,iBAAA,+CACA,iBAAA,wEAAA,iBAAA,kDACA,OAAA,+GACA,kBAAA,SF2MJ,qBE/MI,iBAAA,oDACA,iBAAA,+CACA,iBAAA,wEAAA,iBAAA,kDACA,OAAA,+GACA,kBAAA,SF+MJ,sBElLI,iBAAA,yKACA,iBAAA,oKACA,iBAAA,iKFyLJ,YACE,cAAA,IC9KA,mBAAA,EAAA,IAAA,IAAA,iBACQ,WAAA,EAAA,IAAA,IAAA,iBDgLV,wBAAA,8BAAA,8BAGE,YAAA,EAAA,KAAA,EAAA,QEnOE,iBAAA,oDACA,iBAAA,+CACA,iBAAA,wEAAA,iBAAA,kDACA,OAAA,+GACA,kBAAA,SFiOF,aAAA,QALF,+BAAA,qCAAA,qCAQI,YAAA,KAUJ,OCnME,mBAAA,EAAA,IAAA,IAAA,gBACQ,WAAA,EAAA,IAAA,IAAA,gBD4MV,8BE5PI,iBAAA,oDACA,iBAAA,+CACA,iBAAA,wEAAA,iBAAA,kDACA,OAAA,+GACA,kBAAA,SFyPJ,8BE7PI,iBAAA,oDACA,iBAAA,+CACA,iBAAA,wEAAA,iBAAA,kDACA,OAAA,+GACA,kBAAA,SF0PJ,8BE9PI,iBAAA,oDACA,iBAAA,+CACA,iBAAA,wEAAA,iBAAA,kDACA,OAAA,+GACA,kBAAA,SF2PJ,2BE/PI,iBAAA,oDACA,iBAAA,+CACA,iBAAA,wEAAA,iBAAA,kDACA,OAAA,+GACA,kBAAA,SF4PJ,8BEhQI,iBAAA,oDACA,iBAAA,+CACA,iBAAA,wEAAA,iBAAA,kDACA,OAAA,+GACA,kBAAA,SF6PJ,6BEjQI,iBAAA,oDACA,iBAAA,+CACA,iBAAA,wEAAA,iBAAA,kDACA,OAAA,+GACA,kBAAA,SFoQJ,MExQI,iBAAA,oDACA,iBAAA,+CACA,iBAAA,wEAAA,iBAAA,kDACA,OAAA,+GACA,kBAAA,SFsQF,aAAA,QC3NA,mBAAA,MAAA,EAAA,IAAA,IAAA,gBAAA,EAAA,IAAA,EAAA,qBACQ,WAAA,MAAA,EAAA,IAAA,IAAA,gBAAA,EAAA,IAAA,EAAA","sourcesContent":["/*!\n * Bootstrap v3.3.7 (http://getbootstrap.com)\n * Copyright 2011-2016 Twitter, Inc.\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n */\n\n//\n// Load core variables and mixins\n// --------------------------------------------------\n\n@import \"variables.less\";\n@import \"mixins.less\";\n\n\n//\n// Buttons\n// --------------------------------------------------\n\n// Common styles\n.btn-default,\n.btn-primary,\n.btn-success,\n.btn-info,\n.btn-warning,\n.btn-danger {\n  text-shadow: 0 -1px 0 rgba(0,0,0,.2);\n  @shadow: inset 0 1px 0 rgba(255,255,255,.15), 0 1px 1px rgba(0,0,0,.075);\n  .box-shadow(@shadow);\n\n  // Reset the shadow\n  &:active,\n  &.active {\n    .box-shadow(inset 0 3px 5px rgba(0,0,0,.125));\n  }\n\n  &.disabled,\n  &[disabled],\n  fieldset[disabled] & {\n    .box-shadow(none);\n  }\n\n  .badge {\n    text-shadow: none;\n  }\n}\n\n// Mixin for generating new styles\n.btn-styles(@btn-color: #555) {\n  #gradient > .vertical(@start-color: @btn-color; @end-color: darken(@btn-color, 12%));\n  .reset-filter(); // Disable gradients for IE9 because filter bleeds through rounded corners; see https://github.com/twbs/bootstrap/issues/10620\n  background-repeat: repeat-x;\n  border-color: darken(@btn-color, 14%);\n\n  &:hover,\n  &:focus  {\n    background-color: darken(@btn-color, 12%);\n    background-position: 0 -15px;\n  }\n\n  &:active,\n  &.active {\n    background-color: darken(@btn-color, 12%);\n    border-color: darken(@btn-color, 14%);\n  }\n\n  &.disabled,\n  &[disabled],\n  fieldset[disabled] & {\n    &,\n    &:hover,\n    &:focus,\n    &.focus,\n    &:active,\n    &.active {\n      background-color: darken(@btn-color, 12%);\n      background-image: none;\n    }\n  }\n}\n\n// Common styles\n.btn {\n  // Remove the gradient for the pressed/active state\n  &:active,\n  &.active {\n    background-image: none;\n  }\n}\n\n// Apply the mixin to the buttons\n.btn-default { .btn-styles(@btn-default-bg); text-shadow: 0 1px 0 #fff; border-color: #ccc; }\n.btn-primary { .btn-styles(@btn-primary-bg); }\n.btn-success { .btn-styles(@btn-success-bg); }\n.btn-info    { .btn-styles(@btn-info-bg); }\n.btn-warning { .btn-styles(@btn-warning-bg); }\n.btn-danger  { .btn-styles(@btn-danger-bg); }\n\n\n//\n// Images\n// --------------------------------------------------\n\n.thumbnail,\n.img-thumbnail {\n  .box-shadow(0 1px 2px rgba(0,0,0,.075));\n}\n\n\n//\n// Dropdowns\n// --------------------------------------------------\n\n.dropdown-menu > li > a:hover,\n.dropdown-menu > li > a:focus {\n  #gradient > .vertical(@start-color: @dropdown-link-hover-bg; @end-color: darken(@dropdown-link-hover-bg, 5%));\n  background-color: darken(@dropdown-link-hover-bg, 5%);\n}\n.dropdown-menu > .active > a,\n.dropdown-menu > .active > a:hover,\n.dropdown-menu > .active > a:focus {\n  #gradient > .vertical(@start-color: @dropdown-link-active-bg; @end-color: darken(@dropdown-link-active-bg, 5%));\n  background-color: darken(@dropdown-link-active-bg, 5%);\n}\n\n\n//\n// Navbar\n// --------------------------------------------------\n\n// Default navbar\n.navbar-default {\n  #gradient > .vertical(@start-color: lighten(@navbar-default-bg, 10%); @end-color: @navbar-default-bg);\n  .reset-filter(); // Remove gradient in IE<10 to fix bug where dropdowns don't get triggered\n  border-radius: @navbar-border-radius;\n  @shadow: inset 0 1px 0 rgba(255,255,255,.15), 0 1px 5px rgba(0,0,0,.075);\n  .box-shadow(@shadow);\n\n  .navbar-nav > .open > a,\n  .navbar-nav > .active > a {\n    #gradient > .vertical(@start-color: darken(@navbar-default-link-active-bg, 5%); @end-color: darken(@navbar-default-link-active-bg, 2%));\n    .box-shadow(inset 0 3px 9px rgba(0,0,0,.075));\n  }\n}\n.navbar-brand,\n.navbar-nav > li > a {\n  text-shadow: 0 1px 0 rgba(255,255,255,.25);\n}\n\n// Inverted navbar\n.navbar-inverse {\n  #gradient > .vertical(@start-color: lighten(@navbar-inverse-bg, 10%); @end-color: @navbar-inverse-bg);\n  .reset-filter(); // Remove gradient in IE<10 to fix bug where dropdowns don't get triggered; see https://github.com/twbs/bootstrap/issues/10257\n  border-radius: @navbar-border-radius;\n  .navbar-nav > .open > a,\n  .navbar-nav > .active > a {\n    #gradient > .vertical(@start-color: @navbar-inverse-link-active-bg; @end-color: lighten(@navbar-inverse-link-active-bg, 2.5%));\n    .box-shadow(inset 0 3px 9px rgba(0,0,0,.25));\n  }\n\n  .navbar-brand,\n  .navbar-nav > li > a {\n    text-shadow: 0 -1px 0 rgba(0,0,0,.25);\n  }\n}\n\n// Undo rounded corners in static and fixed navbars\n.navbar-static-top,\n.navbar-fixed-top,\n.navbar-fixed-bottom {\n  border-radius: 0;\n}\n\n// Fix active state of dropdown items in collapsed mode\n@media (max-width: @grid-float-breakpoint-max) {\n  .navbar .navbar-nav .open .dropdown-menu > .active > a {\n    &,\n    &:hover,\n    &:focus {\n      color: #fff;\n      #gradient > .vertical(@start-color: @dropdown-link-active-bg; @end-color: darken(@dropdown-link-active-bg, 5%));\n    }\n  }\n}\n\n\n//\n// Alerts\n// --------------------------------------------------\n\n// Common styles\n.alert {\n  text-shadow: 0 1px 0 rgba(255,255,255,.2);\n  @shadow: inset 0 1px 0 rgba(255,255,255,.25), 0 1px 2px rgba(0,0,0,.05);\n  .box-shadow(@shadow);\n}\n\n// Mixin for generating new styles\n.alert-styles(@color) {\n  #gradient > .vertical(@start-color: @color; @end-color: darken(@color, 7.5%));\n  border-color: darken(@color, 15%);\n}\n\n// Apply the mixin to the alerts\n.alert-success    { .alert-styles(@alert-success-bg); }\n.alert-info       { .alert-styles(@alert-info-bg); }\n.alert-warning    { .alert-styles(@alert-warning-bg); }\n.alert-danger     { .alert-styles(@alert-danger-bg); }\n\n\n//\n// Progress bars\n// --------------------------------------------------\n\n// Give the progress background some depth\n.progress {\n  #gradient > .vertical(@start-color: darken(@progress-bg, 4%); @end-color: @progress-bg)\n}\n\n// Mixin for generating new styles\n.progress-bar-styles(@color) {\n  #gradient > .vertical(@start-color: @color; @end-color: darken(@color, 10%));\n}\n\n// Apply the mixin to the progress bars\n.progress-bar            { .progress-bar-styles(@progress-bar-bg); }\n.progress-bar-success    { .progress-bar-styles(@progress-bar-success-bg); }\n.progress-bar-info       { .progress-bar-styles(@progress-bar-info-bg); }\n.progress-bar-warning    { .progress-bar-styles(@progress-bar-warning-bg); }\n.progress-bar-danger     { .progress-bar-styles(@progress-bar-danger-bg); }\n\n// Reset the striped class because our mixins don't do multiple gradients and\n// the above custom styles override the new `.progress-bar-striped` in v3.2.0.\n.progress-bar-striped {\n  #gradient > .striped();\n}\n\n\n//\n// List groups\n// --------------------------------------------------\n\n.list-group {\n  border-radius: @border-radius-base;\n  .box-shadow(0 1px 2px rgba(0,0,0,.075));\n}\n.list-group-item.active,\n.list-group-item.active:hover,\n.list-group-item.active:focus {\n  text-shadow: 0 -1px 0 darken(@list-group-active-bg, 10%);\n  #gradient > .vertical(@start-color: @list-group-active-bg; @end-color: darken(@list-group-active-bg, 7.5%));\n  border-color: darken(@list-group-active-border, 7.5%);\n\n  .badge {\n    text-shadow: none;\n  }\n}\n\n\n//\n// Panels\n// --------------------------------------------------\n\n// Common styles\n.panel {\n  .box-shadow(0 1px 2px rgba(0,0,0,.05));\n}\n\n// Mixin for generating new styles\n.panel-heading-styles(@color) {\n  #gradient > .vertical(@start-color: @color; @end-color: darken(@color, 5%));\n}\n\n// Apply the mixin to the panel headings only\n.panel-default > .panel-heading   { .panel-heading-styles(@panel-default-heading-bg); }\n.panel-primary > .panel-heading   { .panel-heading-styles(@panel-primary-heading-bg); }\n.panel-success > .panel-heading   { .panel-heading-styles(@panel-success-heading-bg); }\n.panel-info > .panel-heading      { .panel-heading-styles(@panel-info-heading-bg); }\n.panel-warning > .panel-heading   { .panel-heading-styles(@panel-warning-heading-bg); }\n.panel-danger > .panel-heading    { .panel-heading-styles(@panel-danger-heading-bg); }\n\n\n//\n// Wells\n// --------------------------------------------------\n\n.well {\n  #gradient > .vertical(@start-color: darken(@well-bg, 5%); @end-color: @well-bg);\n  border-color: darken(@well-bg, 10%);\n  @shadow: inset 0 1px 3px rgba(0,0,0,.05), 0 1px 0 rgba(255,255,255,.1);\n  .box-shadow(@shadow);\n}\n","// Vendor Prefixes\n//\n// All vendor mixins are deprecated as of v3.2.0 due to the introduction of\n// Autoprefixer in our Gruntfile. They have been removed in v4.\n\n// - Animations\n// - Backface visibility\n// - Box shadow\n// - Box sizing\n// - Content columns\n// - Hyphens\n// - Placeholder text\n// - Transformations\n// - Transitions\n// - User Select\n\n\n// Animations\n.animation(@animation) {\n  -webkit-animation: @animation;\n       -o-animation: @animation;\n          animation: @animation;\n}\n.animation-name(@name) {\n  -webkit-animation-name: @name;\n          animation-name: @name;\n}\n.animation-duration(@duration) {\n  -webkit-animation-duration: @duration;\n          animation-duration: @duration;\n}\n.animation-timing-function(@timing-function) {\n  -webkit-animation-timing-function: @timing-function;\n          animation-timing-function: @timing-function;\n}\n.animation-delay(@delay) {\n  -webkit-animation-delay: @delay;\n          animation-delay: @delay;\n}\n.animation-iteration-count(@iteration-count) {\n  -webkit-animation-iteration-count: @iteration-count;\n          animation-iteration-count: @iteration-count;\n}\n.animation-direction(@direction) {\n  -webkit-animation-direction: @direction;\n          animation-direction: @direction;\n}\n.animation-fill-mode(@fill-mode) {\n  -webkit-animation-fill-mode: @fill-mode;\n          animation-fill-mode: @fill-mode;\n}\n\n// Backface visibility\n// Prevent browsers from flickering when using CSS 3D transforms.\n// Default value is `visible`, but can be changed to `hidden`\n\n.backface-visibility(@visibility) {\n  -webkit-backface-visibility: @visibility;\n     -moz-backface-visibility: @visibility;\n          backface-visibility: @visibility;\n}\n\n// Drop shadows\n//\n// Note: Deprecated `.box-shadow()` as of v3.1.0 since all of Bootstrap's\n// supported browsers that have box shadow capabilities now support it.\n\n.box-shadow(@shadow) {\n  -webkit-box-shadow: @shadow; // iOS <4.3 & Android <4.1\n          box-shadow: @shadow;\n}\n\n// Box sizing\n.box-sizing(@boxmodel) {\n  -webkit-box-sizing: @boxmodel;\n     -moz-box-sizing: @boxmodel;\n          box-sizing: @boxmodel;\n}\n\n// CSS3 Content Columns\n.content-columns(@column-count; @column-gap: @grid-gutter-width) {\n  -webkit-column-count: @column-count;\n     -moz-column-count: @column-count;\n          column-count: @column-count;\n  -webkit-column-gap: @column-gap;\n     -moz-column-gap: @column-gap;\n          column-gap: @column-gap;\n}\n\n// Optional hyphenation\n.hyphens(@mode: auto) {\n  word-wrap: break-word;\n  -webkit-hyphens: @mode;\n     -moz-hyphens: @mode;\n      -ms-hyphens: @mode; // IE10+\n       -o-hyphens: @mode;\n          hyphens: @mode;\n}\n\n// Placeholder text\n.placeholder(@color: @input-color-placeholder) {\n  // Firefox\n  &::-moz-placeholder {\n    color: @color;\n    opacity: 1; // Override Firefox's unusual default opacity; see https://github.com/twbs/bootstrap/pull/11526\n  }\n  &:-ms-input-placeholder { color: @color; } // Internet Explorer 10+\n  &::-webkit-input-placeholder  { color: @color; } // Safari and Chrome\n}\n\n// Transformations\n.scale(@ratio) {\n  -webkit-transform: scale(@ratio);\n      -ms-transform: scale(@ratio); // IE9 only\n       -o-transform: scale(@ratio);\n          transform: scale(@ratio);\n}\n.scale(@ratioX; @ratioY) {\n  -webkit-transform: scale(@ratioX, @ratioY);\n      -ms-transform: scale(@ratioX, @ratioY); // IE9 only\n       -o-transform: scale(@ratioX, @ratioY);\n          transform: scale(@ratioX, @ratioY);\n}\n.scaleX(@ratio) {\n  -webkit-transform: scaleX(@ratio);\n      -ms-transform: scaleX(@ratio); // IE9 only\n       -o-transform: scaleX(@ratio);\n          transform: scaleX(@ratio);\n}\n.scaleY(@ratio) {\n  -webkit-transform: scaleY(@ratio);\n      -ms-transform: scaleY(@ratio); // IE9 only\n       -o-transform: scaleY(@ratio);\n          transform: scaleY(@ratio);\n}\n.skew(@x; @y) {\n  -webkit-transform: skewX(@x) skewY(@y);\n      -ms-transform: skewX(@x) skewY(@y); // See https://github.com/twbs/bootstrap/issues/4885; IE9+\n       -o-transform: skewX(@x) skewY(@y);\n          transform: skewX(@x) skewY(@y);\n}\n.translate(@x; @y) {\n  -webkit-transform: translate(@x, @y);\n      -ms-transform: translate(@x, @y); // IE9 only\n       -o-transform: translate(@x, @y);\n          transform: translate(@x, @y);\n}\n.translate3d(@x; @y; @z) {\n  -webkit-transform: translate3d(@x, @y, @z);\n          transform: translate3d(@x, @y, @z);\n}\n.rotate(@degrees) {\n  -webkit-transform: rotate(@degrees);\n      -ms-transform: rotate(@degrees); // IE9 only\n       -o-transform: rotate(@degrees);\n          transform: rotate(@degrees);\n}\n.rotateX(@degrees) {\n  -webkit-transform: rotateX(@degrees);\n      -ms-transform: rotateX(@degrees); // IE9 only\n       -o-transform: rotateX(@degrees);\n          transform: rotateX(@degrees);\n}\n.rotateY(@degrees) {\n  -webkit-transform: rotateY(@degrees);\n      -ms-transform: rotateY(@degrees); // IE9 only\n       -o-transform: rotateY(@degrees);\n          transform: rotateY(@degrees);\n}\n.perspective(@perspective) {\n  -webkit-perspective: @perspective;\n     -moz-perspective: @perspective;\n          perspective: @perspective;\n}\n.perspective-origin(@perspective) {\n  -webkit-perspective-origin: @perspective;\n     -moz-perspective-origin: @perspective;\n          perspective-origin: @perspective;\n}\n.transform-origin(@origin) {\n  -webkit-transform-origin: @origin;\n     -moz-transform-origin: @origin;\n      -ms-transform-origin: @origin; // IE9 only\n          transform-origin: @origin;\n}\n\n\n// Transitions\n\n.transition(@transition) {\n  -webkit-transition: @transition;\n       -o-transition: @transition;\n          transition: @transition;\n}\n.transition-property(@transition-property) {\n  -webkit-transition-property: @transition-property;\n          transition-property: @transition-property;\n}\n.transition-delay(@transition-delay) {\n  -webkit-transition-delay: @transition-delay;\n          transition-delay: @transition-delay;\n}\n.transition-duration(@transition-duration) {\n  -webkit-transition-duration: @transition-duration;\n          transition-duration: @transition-duration;\n}\n.transition-timing-function(@timing-function) {\n  -webkit-transition-timing-function: @timing-function;\n          transition-timing-function: @timing-function;\n}\n.transition-transform(@transition) {\n  -webkit-transition: -webkit-transform @transition;\n     -moz-transition: -moz-transform @transition;\n       -o-transition: -o-transform @transition;\n          transition: transform @transition;\n}\n\n\n// User select\n// For selecting text on the page\n\n.user-select(@select) {\n  -webkit-user-select: @select;\n     -moz-user-select: @select;\n      -ms-user-select: @select; // IE10+\n          user-select: @select;\n}\n","// Gradients\n\n#gradient {\n\n  // Horizontal gradient, from left to right\n  //\n  // Creates two color stops, start and end, by specifying a color and position for each color stop.\n  // Color stops are not available in IE9 and below.\n  .horizontal(@start-color: #555; @end-color: #333; @start-percent: 0%; @end-percent: 100%) {\n    background-image: -webkit-linear-gradient(left, @start-color @start-percent, @end-color @end-percent); // Safari 5.1-6, Chrome 10+\n    background-image: -o-linear-gradient(left, @start-color @start-percent, @end-color @end-percent); // Opera 12\n    background-image: linear-gradient(to right, @start-color @start-percent, @end-color @end-percent); // Standard, IE10, Firefox 16+, Opera 12.10+, Safari 7+, Chrome 26+\n    background-repeat: repeat-x;\n    filter: e(%(\"progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=1)\",argb(@start-color),argb(@end-color))); // IE9 and down\n  }\n\n  // Vertical gradient, from top to bottom\n  //\n  // Creates two color stops, start and end, by specifying a color and position for each color stop.\n  // Color stops are not available in IE9 and below.\n  .vertical(@start-color: #555; @end-color: #333; @start-percent: 0%; @end-percent: 100%) {\n    background-image: -webkit-linear-gradient(top, @start-color @start-percent, @end-color @end-percent);  // Safari 5.1-6, Chrome 10+\n    background-image: -o-linear-gradient(top, @start-color @start-percent, @end-color @end-percent);  // Opera 12\n    background-image: linear-gradient(to bottom, @start-color @start-percent, @end-color @end-percent); // Standard, IE10, Firefox 16+, Opera 12.10+, Safari 7+, Chrome 26+\n    background-repeat: repeat-x;\n    filter: e(%(\"progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=0)\",argb(@start-color),argb(@end-color))); // IE9 and down\n  }\n\n  .directional(@start-color: #555; @end-color: #333; @deg: 45deg) {\n    background-repeat: repeat-x;\n    background-image: -webkit-linear-gradient(@deg, @start-color, @end-color); // Safari 5.1-6, Chrome 10+\n    background-image: -o-linear-gradient(@deg, @start-color, @end-color); // Opera 12\n    background-image: linear-gradient(@deg, @start-color, @end-color); // Standard, IE10, Firefox 16+, Opera 12.10+, Safari 7+, Chrome 26+\n  }\n  .horizontal-three-colors(@start-color: #00b3ee; @mid-color: #7a43b6; @color-stop: 50%; @end-color: #c3325f) {\n    background-image: -webkit-linear-gradient(left, @start-color, @mid-color @color-stop, @end-color);\n    background-image: -o-linear-gradient(left, @start-color, @mid-color @color-stop, @end-color);\n    background-image: linear-gradient(to right, @start-color, @mid-color @color-stop, @end-color);\n    background-repeat: no-repeat;\n    filter: e(%(\"progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=1)\",argb(@start-color),argb(@end-color))); // IE9 and down, gets no color-stop at all for proper fallback\n  }\n  .vertical-three-colors(@start-color: #00b3ee; @mid-color: #7a43b6; @color-stop: 50%; @end-color: #c3325f) {\n    background-image: -webkit-linear-gradient(@start-color, @mid-color @color-stop, @end-color);\n    background-image: -o-linear-gradient(@start-color, @mid-color @color-stop, @end-color);\n    background-image: linear-gradient(@start-color, @mid-color @color-stop, @end-color);\n    background-repeat: no-repeat;\n    filter: e(%(\"progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=0)\",argb(@start-color),argb(@end-color))); // IE9 and down, gets no color-stop at all for proper fallback\n  }\n  .radial(@inner-color: #555; @outer-color: #333) {\n    background-image: -webkit-radial-gradient(circle, @inner-color, @outer-color);\n    background-image: radial-gradient(circle, @inner-color, @outer-color);\n    background-repeat: no-repeat;\n  }\n  .striped(@color: rgba(255,255,255,.15); @angle: 45deg) {\n    background-image: -webkit-linear-gradient(@angle, @color 25%, transparent 25%, transparent 50%, @color 50%, @color 75%, transparent 75%, transparent);\n    background-image: -o-linear-gradient(@angle, @color 25%, transparent 25%, transparent 50%, @color 50%, @color 75%, transparent 75%, transparent);\n    background-image: linear-gradient(@angle, @color 25%, transparent 25%, transparent 50%, @color 50%, @color 75%, transparent 75%, transparent);\n  }\n}\n","// Reset filters for IE\n//\n// When you need to remove a gradient background, do not forget to use this to reset\n// the IE filter for IE9 and below.\n\n.reset-filter() {\n  filter: e(%(\"progid:DXImageTransform.Microsoft.gradient(enabled = false)\"));\n}\n"]}
      \ No newline at end of file
      diff --git a/blockly/webif/static/css/bootstrap-treeview.css b/blockly/webif/static/css/bootstrap-treeview.css
      deleted file mode 100755
      index 23c6cf066..000000000
      --- a/blockly/webif/static/css/bootstrap-treeview.css
      +++ /dev/null
      @@ -1,37 +0,0 @@
      -/* =========================================================
      - * bootstrap-treeview.css v1.2.0
      - * =========================================================
      - * Copyright 2013 Jonathan Miles 
      - * Project URL : http://www.jondmiles.com/bootstrap-treeview
      - *	
      - * Licensed under the Apache License, Version 2.0 (the "License");
      - * you may not use this file except in compliance with the License.
      - * You may obtain a copy of the License at
      - *
      - * http://www.apache.org/licenses/LICENSE-2.0
      - *
      - * Unless required by applicable law or agreed to in writing, software
      - * distributed under the License is distributed on an "AS IS" BASIS,
      - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      - * See the License for the specific language governing permissions and
      - * limitations under the License.
      - * ========================================================= */
      -
      -.treeview .list-group-item {
      -	cursor: pointer;
      -}
      -
      -.treeview span.indent {
      -	margin-left: 10px;
      -	margin-right: 10px;
      -}
      -
      -.treeview span.icon {
      -	width: 12px;
      -	margin-right: 5px;
      -}
      -
      -.treeview .node-disabled {
      -	color: silver;
      -	cursor: not-allowed;
      -}
      \ No newline at end of file
      diff --git a/blockly/webif/static/css/bootstrap-treeview.min.css b/blockly/webif/static/css/bootstrap-treeview.min.css
      deleted file mode 100755
      index 57a348a87..000000000
      --- a/blockly/webif/static/css/bootstrap-treeview.min.css
      +++ /dev/null
      @@ -1 +0,0 @@
      -.treeview .list-group-item{cursor:pointer}.treeview span.indent{margin-left:10px;margin-right:10px}.treeview span.icon{width:12px;margin-right:5px}.treeview .node-disabled{color:silver;cursor:not-allowed}
      \ No newline at end of file
      diff --git a/blockly/webif/static/css/bootstrap.css b/blockly/webif/static/css/bootstrap.css
      deleted file mode 100755
      index 6167622ce..000000000
      --- a/blockly/webif/static/css/bootstrap.css
      +++ /dev/null
      @@ -1,6757 +0,0 @@
      -/*!
      - * Bootstrap v3.3.7 (http://getbootstrap.com)
      - * Copyright 2011-2016 Twitter, Inc.
      - * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
      - */
      -/*! normalize.css v3.0.3 | MIT License | github.com/necolas/normalize.css */
      -html {
      -  font-family: sans-serif;
      -  -webkit-text-size-adjust: 100%;
      -      -ms-text-size-adjust: 100%;
      -}
      -body {
      -  margin: 0;
      -}
      -article,
      -aside,
      -details,
      -figcaption,
      -figure,
      -footer,
      -header,
      -hgroup,
      -main,
      -menu,
      -nav,
      -section,
      -summary {
      -  display: block;
      -}
      -audio,
      -canvas,
      -progress,
      -video {
      -  display: inline-block;
      -  vertical-align: baseline;
      -}
      -audio:not([controls]) {
      -  display: none;
      -  height: 0;
      -}
      -[hidden],
      -template {
      -  display: none;
      -}
      -a {
      -  background-color: transparent;
      -}
      -a:active,
      -a:hover {
      -  outline: 0;
      -}
      -abbr[title] {
      -  border-bottom: 1px dotted;
      -}
      -b,
      -strong {
      -  font-weight: bold;
      -}
      -dfn {
      -  font-style: italic;
      -}
      -h1 {
      -  margin: .67em 0;
      -  font-size: 2em;
      -}
      -mark {
      -  color: #000;
      -  background: #ff0;
      -}
      -small {
      -  font-size: 80%;
      -}
      -sub,
      -sup {
      -  position: relative;
      -  font-size: 75%;
      -  line-height: 0;
      -  vertical-align: baseline;
      -}
      -sup {
      -  top: -.5em;
      -}
      -sub {
      -  bottom: -.25em;
      -}
      -img {
      -  border: 0;
      -}
      -svg:not(:root) {
      -  overflow: hidden;
      -}
      -figure {
      -  margin: 1em 40px;
      -}
      -hr {
      -  height: 0;
      -  -webkit-box-sizing: content-box;
      -     -moz-box-sizing: content-box;
      -          box-sizing: content-box;
      -}
      -pre {
      -  overflow: auto;
      -}
      -code,
      -kbd,
      -pre,
      -samp {
      -  font-family: monospace, monospace;
      -  font-size: 1em;
      -}
      -button,
      -input,
      -optgroup,
      -select,
      -textarea {
      -  margin: 0;
      -  font: inherit;
      -  color: inherit;
      -}
      -button {
      -  overflow: visible;
      -}
      -button,
      -select {
      -  text-transform: none;
      -}
      -button,
      -html input[type="button"],
      -input[type="reset"],
      -input[type="submit"] {
      -  -webkit-appearance: button;
      -  cursor: pointer;
      -}
      -button[disabled],
      -html input[disabled] {
      -  cursor: default;
      -}
      -button::-moz-focus-inner,
      -input::-moz-focus-inner {
      -  padding: 0;
      -  border: 0;
      -}
      -input {
      -  line-height: normal;
      -}
      -input[type="checkbox"],
      -input[type="radio"] {
      -  -webkit-box-sizing: border-box;
      -     -moz-box-sizing: border-box;
      -          box-sizing: border-box;
      -  padding: 0;
      -}
      -input[type="number"]::-webkit-inner-spin-button,
      -input[type="number"]::-webkit-outer-spin-button {
      -  height: auto;
      -}
      -input[type="search"] {
      -  -webkit-box-sizing: content-box;
      -     -moz-box-sizing: content-box;
      -          box-sizing: content-box;
      -  -webkit-appearance: textfield;
      -}
      -input[type="search"]::-webkit-search-cancel-button,
      -input[type="search"]::-webkit-search-decoration {
      -  -webkit-appearance: none;
      -}
      -fieldset {
      -  padding: .35em .625em .75em;
      -  margin: 0 2px;
      -  border: 1px solid #c0c0c0;
      -}
      -legend {
      -  padding: 0;
      -  border: 0;
      -}
      -textarea {
      -  overflow: auto;
      -}
      -optgroup {
      -  font-weight: bold;
      -}
      -table {
      -  border-spacing: 0;
      -  border-collapse: collapse;
      -}
      -td,
      -th {
      -  padding: 0;
      -}
      -/*! Source: https://github.com/h5bp/html5-boilerplate/blob/master/src/css/main.css */
      -@media print {
      -  *,
      -  *:before,
      -  *:after {
      -    color: #000 !important;
      -    text-shadow: none !important;
      -    background: transparent !important;
      -    -webkit-box-shadow: none !important;
      -            box-shadow: none !important;
      -  }
      -  a,
      -  a:visited {
      -    text-decoration: underline;
      -  }
      -  a[href]:after {
      -    content: " (" attr(href) ")";
      -  }
      -  abbr[title]:after {
      -    content: " (" attr(title) ")";
      -  }
      -  a[href^="#"]:after,
      -  a[href^="javascript:"]:after {
      -    content: "";
      -  }
      -  pre,
      -  blockquote {
      -    border: 1px solid #999;
      -
      -    page-break-inside: avoid;
      -  }
      -  thead {
      -    display: table-header-group;
      -  }
      -  tr,
      -  img {
      -    page-break-inside: avoid;
      -  }
      -  img {
      -    max-width: 100% !important;
      -  }
      -  p,
      -  h2,
      -  h3 {
      -    orphans: 3;
      -    widows: 3;
      -  }
      -  h2,
      -  h3 {
      -    page-break-after: avoid;
      -  }
      -  .navbar {
      -    display: none;
      -  }
      -  .btn > .caret,
      -  .dropup > .btn > .caret {
      -    border-top-color: #000 !important;
      -  }
      -  .label {
      -    border: 1px solid #000;
      -  }
      -  .table {
      -    border-collapse: collapse !important;
      -  }
      -  .table td,
      -  .table th {
      -    background-color: #fff !important;
      -  }
      -  .table-bordered th,
      -  .table-bordered td {
      -    border: 1px solid #ddd !important;
      -  }
      -}
      -@font-face {
      -  font-family: 'Glyphicons Halflings';
      -
      -  src: url('../fonts/glyphicons-halflings-regular.eot');
      -  src: url('../fonts/glyphicons-halflings-regular.eot?#iefix') format('embedded-opentype'), url('../fonts/glyphicons-halflings-regular.woff2') format('woff2'), url('../fonts/glyphicons-halflings-regular.woff') format('woff'), url('../fonts/glyphicons-halflings-regular.ttf') format('truetype'), url('../fonts/glyphicons-halflings-regular.svg#glyphicons_halflingsregular') format('svg');
      -}
      -.glyphicon {
      -  position: relative;
      -  top: 1px;
      -  display: inline-block;
      -  font-family: 'Glyphicons Halflings';
      -  font-style: normal;
      -  font-weight: normal;
      -  line-height: 1;
      -
      -  -webkit-font-smoothing: antialiased;
      -  -moz-osx-font-smoothing: grayscale;
      -}
      -.glyphicon-asterisk:before {
      -  content: "\002a";
      -}
      -.glyphicon-plus:before {
      -  content: "\002b";
      -}
      -.glyphicon-euro:before,
      -.glyphicon-eur:before {
      -  content: "\20ac";
      -}
      -.glyphicon-minus:before {
      -  content: "\2212";
      -}
      -.glyphicon-cloud:before {
      -  content: "\2601";
      -}
      -.glyphicon-envelope:before {
      -  content: "\2709";
      -}
      -.glyphicon-pencil:before {
      -  content: "\270f";
      -}
      -.glyphicon-glass:before {
      -  content: "\e001";
      -}
      -.glyphicon-music:before {
      -  content: "\e002";
      -}
      -.glyphicon-search:before {
      -  content: "\e003";
      -}
      -.glyphicon-heart:before {
      -  content: "\e005";
      -}
      -.glyphicon-star:before {
      -  content: "\e006";
      -}
      -.glyphicon-star-empty:before {
      -  content: "\e007";
      -}
      -.glyphicon-user:before {
      -  content: "\e008";
      -}
      -.glyphicon-film:before {
      -  content: "\e009";
      -}
      -.glyphicon-th-large:before {
      -  content: "\e010";
      -}
      -.glyphicon-th:before {
      -  content: "\e011";
      -}
      -.glyphicon-th-list:before {
      -  content: "\e012";
      -}
      -.glyphicon-ok:before {
      -  content: "\e013";
      -}
      -.glyphicon-remove:before {
      -  content: "\e014";
      -}
      -.glyphicon-zoom-in:before {
      -  content: "\e015";
      -}
      -.glyphicon-zoom-out:before {
      -  content: "\e016";
      -}
      -.glyphicon-off:before {
      -  content: "\e017";
      -}
      -.glyphicon-signal:before {
      -  content: "\e018";
      -}
      -.glyphicon-cog:before {
      -  content: "\e019";
      -}
      -.glyphicon-trash:before {
      -  content: "\e020";
      -}
      -.glyphicon-home:before {
      -  content: "\e021";
      -}
      -.glyphicon-file:before {
      -  content: "\e022";
      -}
      -.glyphicon-time:before {
      -  content: "\e023";
      -}
      -.glyphicon-road:before {
      -  content: "\e024";
      -}
      -.glyphicon-download-alt:before {
      -  content: "\e025";
      -}
      -.glyphicon-download:before {
      -  content: "\e026";
      -}
      -.glyphicon-upload:before {
      -  content: "\e027";
      -}
      -.glyphicon-inbox:before {
      -  content: "\e028";
      -}
      -.glyphicon-play-circle:before {
      -  content: "\e029";
      -}
      -.glyphicon-repeat:before {
      -  content: "\e030";
      -}
      -.glyphicon-refresh:before {
      -  content: "\e031";
      -}
      -.glyphicon-list-alt:before {
      -  content: "\e032";
      -}
      -.glyphicon-lock:before {
      -  content: "\e033";
      -}
      -.glyphicon-flag:before {
      -  content: "\e034";
      -}
      -.glyphicon-headphones:before {
      -  content: "\e035";
      -}
      -.glyphicon-volume-off:before {
      -  content: "\e036";
      -}
      -.glyphicon-volume-down:before {
      -  content: "\e037";
      -}
      -.glyphicon-volume-up:before {
      -  content: "\e038";
      -}
      -.glyphicon-qrcode:before {
      -  content: "\e039";
      -}
      -.glyphicon-barcode:before {
      -  content: "\e040";
      -}
      -.glyphicon-tag:before {
      -  content: "\e041";
      -}
      -.glyphicon-tags:before {
      -  content: "\e042";
      -}
      -.glyphicon-book:before {
      -  content: "\e043";
      -}
      -.glyphicon-bookmark:before {
      -  content: "\e044";
      -}
      -.glyphicon-print:before {
      -  content: "\e045";
      -}
      -.glyphicon-camera:before {
      -  content: "\e046";
      -}
      -.glyphicon-font:before {
      -  content: "\e047";
      -}
      -.glyphicon-bold:before {
      -  content: "\e048";
      -}
      -.glyphicon-italic:before {
      -  content: "\e049";
      -}
      -.glyphicon-text-height:before {
      -  content: "\e050";
      -}
      -.glyphicon-text-width:before {
      -  content: "\e051";
      -}
      -.glyphicon-align-left:before {
      -  content: "\e052";
      -}
      -.glyphicon-align-center:before {
      -  content: "\e053";
      -}
      -.glyphicon-align-right:before {
      -  content: "\e054";
      -}
      -.glyphicon-align-justify:before {
      -  content: "\e055";
      -}
      -.glyphicon-list:before {
      -  content: "\e056";
      -}
      -.glyphicon-indent-left:before {
      -  content: "\e057";
      -}
      -.glyphicon-indent-right:before {
      -  content: "\e058";
      -}
      -.glyphicon-facetime-video:before {
      -  content: "\e059";
      -}
      -.glyphicon-picture:before {
      -  content: "\e060";
      -}
      -.glyphicon-map-marker:before {
      -  content: "\e062";
      -}
      -.glyphicon-adjust:before {
      -  content: "\e063";
      -}
      -.glyphicon-tint:before {
      -  content: "\e064";
      -}
      -.glyphicon-edit:before {
      -  content: "\e065";
      -}
      -.glyphicon-share:before {
      -  content: "\e066";
      -}
      -.glyphicon-check:before {
      -  content: "\e067";
      -}
      -.glyphicon-move:before {
      -  content: "\e068";
      -}
      -.glyphicon-step-backward:before {
      -  content: "\e069";
      -}
      -.glyphicon-fast-backward:before {
      -  content: "\e070";
      -}
      -.glyphicon-backward:before {
      -  content: "\e071";
      -}
      -.glyphicon-play:before {
      -  content: "\e072";
      -}
      -.glyphicon-pause:before {
      -  content: "\e073";
      -}
      -.glyphicon-stop:before {
      -  content: "\e074";
      -}
      -.glyphicon-forward:before {
      -  content: "\e075";
      -}
      -.glyphicon-fast-forward:before {
      -  content: "\e076";
      -}
      -.glyphicon-step-forward:before {
      -  content: "\e077";
      -}
      -.glyphicon-eject:before {
      -  content: "\e078";
      -}
      -.glyphicon-chevron-left:before {
      -  content: "\e079";
      -}
      -.glyphicon-chevron-right:before {
      -  content: "\e080";
      -}
      -.glyphicon-plus-sign:before {
      -  content: "\e081";
      -}
      -.glyphicon-minus-sign:before {
      -  content: "\e082";
      -}
      -.glyphicon-remove-sign:before {
      -  content: "\e083";
      -}
      -.glyphicon-ok-sign:before {
      -  content: "\e084";
      -}
      -.glyphicon-question-sign:before {
      -  content: "\e085";
      -}
      -.glyphicon-info-sign:before {
      -  content: "\e086";
      -}
      -.glyphicon-screenshot:before {
      -  content: "\e087";
      -}
      -.glyphicon-remove-circle:before {
      -  content: "\e088";
      -}
      -.glyphicon-ok-circle:before {
      -  content: "\e089";
      -}
      -.glyphicon-ban-circle:before {
      -  content: "\e090";
      -}
      -.glyphicon-arrow-left:before {
      -  content: "\e091";
      -}
      -.glyphicon-arrow-right:before {
      -  content: "\e092";
      -}
      -.glyphicon-arrow-up:before {
      -  content: "\e093";
      -}
      -.glyphicon-arrow-down:before {
      -  content: "\e094";
      -}
      -.glyphicon-share-alt:before {
      -  content: "\e095";
      -}
      -.glyphicon-resize-full:before {
      -  content: "\e096";
      -}
      -.glyphicon-resize-small:before {
      -  content: "\e097";
      -}
      -.glyphicon-exclamation-sign:before {
      -  content: "\e101";
      -}
      -.glyphicon-gift:before {
      -  content: "\e102";
      -}
      -.glyphicon-leaf:before {
      -  content: "\e103";
      -}
      -.glyphicon-fire:before {
      -  content: "\e104";
      -}
      -.glyphicon-eye-open:before {
      -  content: "\e105";
      -}
      -.glyphicon-eye-close:before {
      -  content: "\e106";
      -}
      -.glyphicon-warning-sign:before {
      -  content: "\e107";
      -}
      -.glyphicon-plane:before {
      -  content: "\e108";
      -}
      -.glyphicon-calendar:before {
      -  content: "\e109";
      -}
      -.glyphicon-random:before {
      -  content: "\e110";
      -}
      -.glyphicon-comment:before {
      -  content: "\e111";
      -}
      -.glyphicon-magnet:before {
      -  content: "\e112";
      -}
      -.glyphicon-chevron-up:before {
      -  content: "\e113";
      -}
      -.glyphicon-chevron-down:before {
      -  content: "\e114";
      -}
      -.glyphicon-retweet:before {
      -  content: "\e115";
      -}
      -.glyphicon-shopping-cart:before {
      -  content: "\e116";
      -}
      -.glyphicon-folder-close:before {
      -  content: "\e117";
      -}
      -.glyphicon-folder-open:before {
      -  content: "\e118";
      -}
      -.glyphicon-resize-vertical:before {
      -  content: "\e119";
      -}
      -.glyphicon-resize-horizontal:before {
      -  content: "\e120";
      -}
      -.glyphicon-hdd:before {
      -  content: "\e121";
      -}
      -.glyphicon-bullhorn:before {
      -  content: "\e122";
      -}
      -.glyphicon-bell:before {
      -  content: "\e123";
      -}
      -.glyphicon-certificate:before {
      -  content: "\e124";
      -}
      -.glyphicon-thumbs-up:before {
      -  content: "\e125";
      -}
      -.glyphicon-thumbs-down:before {
      -  content: "\e126";
      -}
      -.glyphicon-hand-right:before {
      -  content: "\e127";
      -}
      -.glyphicon-hand-left:before {
      -  content: "\e128";
      -}
      -.glyphicon-hand-up:before {
      -  content: "\e129";
      -}
      -.glyphicon-hand-down:before {
      -  content: "\e130";
      -}
      -.glyphicon-circle-arrow-right:before {
      -  content: "\e131";
      -}
      -.glyphicon-circle-arrow-left:before {
      -  content: "\e132";
      -}
      -.glyphicon-circle-arrow-up:before {
      -  content: "\e133";
      -}
      -.glyphicon-circle-arrow-down:before {
      -  content: "\e134";
      -}
      -.glyphicon-globe:before {
      -  content: "\e135";
      -}
      -.glyphicon-wrench:before {
      -  content: "\e136";
      -}
      -.glyphicon-tasks:before {
      -  content: "\e137";
      -}
      -.glyphicon-filter:before {
      -  content: "\e138";
      -}
      -.glyphicon-briefcase:before {
      -  content: "\e139";
      -}
      -.glyphicon-fullscreen:before {
      -  content: "\e140";
      -}
      -.glyphicon-dashboard:before {
      -  content: "\e141";
      -}
      -.glyphicon-paperclip:before {
      -  content: "\e142";
      -}
      -.glyphicon-heart-empty:before {
      -  content: "\e143";
      -}
      -.glyphicon-link:before {
      -  content: "\e144";
      -}
      -.glyphicon-phone:before {
      -  content: "\e145";
      -}
      -.glyphicon-pushpin:before {
      -  content: "\e146";
      -}
      -.glyphicon-usd:before {
      -  content: "\e148";
      -}
      -.glyphicon-gbp:before {
      -  content: "\e149";
      -}
      -.glyphicon-sort:before {
      -  content: "\e150";
      -}
      -.glyphicon-sort-by-alphabet:before {
      -  content: "\e151";
      -}
      -.glyphicon-sort-by-alphabet-alt:before {
      -  content: "\e152";
      -}
      -.glyphicon-sort-by-order:before {
      -  content: "\e153";
      -}
      -.glyphicon-sort-by-order-alt:before {
      -  content: "\e154";
      -}
      -.glyphicon-sort-by-attributes:before {
      -  content: "\e155";
      -}
      -.glyphicon-sort-by-attributes-alt:before {
      -  content: "\e156";
      -}
      -.glyphicon-unchecked:before {
      -  content: "\e157";
      -}
      -.glyphicon-expand:before {
      -  content: "\e158";
      -}
      -.glyphicon-collapse-down:before {
      -  content: "\e159";
      -}
      -.glyphicon-collapse-up:before {
      -  content: "\e160";
      -}
      -.glyphicon-log-in:before {
      -  content: "\e161";
      -}
      -.glyphicon-flash:before {
      -  content: "\e162";
      -}
      -.glyphicon-log-out:before {
      -  content: "\e163";
      -}
      -.glyphicon-new-window:before {
      -  content: "\e164";
      -}
      -.glyphicon-record:before {
      -  content: "\e165";
      -}
      -.glyphicon-save:before {
      -  content: "\e166";
      -}
      -.glyphicon-open:before {
      -  content: "\e167";
      -}
      -.glyphicon-saved:before {
      -  content: "\e168";
      -}
      -.glyphicon-import:before {
      -  content: "\e169";
      -}
      -.glyphicon-export:before {
      -  content: "\e170";
      -}
      -.glyphicon-send:before {
      -  content: "\e171";
      -}
      -.glyphicon-floppy-disk:before {
      -  content: "\e172";
      -}
      -.glyphicon-floppy-saved:before {
      -  content: "\e173";
      -}
      -.glyphicon-floppy-remove:before {
      -  content: "\e174";
      -}
      -.glyphicon-floppy-save:before {
      -  content: "\e175";
      -}
      -.glyphicon-floppy-open:before {
      -  content: "\e176";
      -}
      -.glyphicon-credit-card:before {
      -  content: "\e177";
      -}
      -.glyphicon-transfer:before {
      -  content: "\e178";
      -}
      -.glyphicon-cutlery:before {
      -  content: "\e179";
      -}
      -.glyphicon-header:before {
      -  content: "\e180";
      -}
      -.glyphicon-compressed:before {
      -  content: "\e181";
      -}
      -.glyphicon-earphone:before {
      -  content: "\e182";
      -}
      -.glyphicon-phone-alt:before {
      -  content: "\e183";
      -}
      -.glyphicon-tower:before {
      -  content: "\e184";
      -}
      -.glyphicon-stats:before {
      -  content: "\e185";
      -}
      -.glyphicon-sd-video:before {
      -  content: "\e186";
      -}
      -.glyphicon-hd-video:before {
      -  content: "\e187";
      -}
      -.glyphicon-subtitles:before {
      -  content: "\e188";
      -}
      -.glyphicon-sound-stereo:before {
      -  content: "\e189";
      -}
      -.glyphicon-sound-dolby:before {
      -  content: "\e190";
      -}
      -.glyphicon-sound-5-1:before {
      -  content: "\e191";
      -}
      -.glyphicon-sound-6-1:before {
      -  content: "\e192";
      -}
      -.glyphicon-sound-7-1:before {
      -  content: "\e193";
      -}
      -.glyphicon-copyright-mark:before {
      -  content: "\e194";
      -}
      -.glyphicon-registration-mark:before {
      -  content: "\e195";
      -}
      -.glyphicon-cloud-download:before {
      -  content: "\e197";
      -}
      -.glyphicon-cloud-upload:before {
      -  content: "\e198";
      -}
      -.glyphicon-tree-conifer:before {
      -  content: "\e199";
      -}
      -.glyphicon-tree-deciduous:before {
      -  content: "\e200";
      -}
      -.glyphicon-cd:before {
      -  content: "\e201";
      -}
      -.glyphicon-save-file:before {
      -  content: "\e202";
      -}
      -.glyphicon-open-file:before {
      -  content: "\e203";
      -}
      -.glyphicon-level-up:before {
      -  content: "\e204";
      -}
      -.glyphicon-copy:before {
      -  content: "\e205";
      -}
      -.glyphicon-paste:before {
      -  content: "\e206";
      -}
      -.glyphicon-alert:before {
      -  content: "\e209";
      -}
      -.glyphicon-equalizer:before {
      -  content: "\e210";
      -}
      -.glyphicon-king:before {
      -  content: "\e211";
      -}
      -.glyphicon-queen:before {
      -  content: "\e212";
      -}
      -.glyphicon-pawn:before {
      -  content: "\e213";
      -}
      -.glyphicon-bishop:before {
      -  content: "\e214";
      -}
      -.glyphicon-knight:before {
      -  content: "\e215";
      -}
      -.glyphicon-baby-formula:before {
      -  content: "\e216";
      -}
      -.glyphicon-tent:before {
      -  content: "\26fa";
      -}
      -.glyphicon-blackboard:before {
      -  content: "\e218";
      -}
      -.glyphicon-bed:before {
      -  content: "\e219";
      -}
      -.glyphicon-apple:before {
      -  content: "\f8ff";
      -}
      -.glyphicon-erase:before {
      -  content: "\e221";
      -}
      -.glyphicon-hourglass:before {
      -  content: "\231b";
      -}
      -.glyphicon-lamp:before {
      -  content: "\e223";
      -}
      -.glyphicon-duplicate:before {
      -  content: "\e224";
      -}
      -.glyphicon-piggy-bank:before {
      -  content: "\e225";
      -}
      -.glyphicon-scissors:before {
      -  content: "\e226";
      -}
      -.glyphicon-bitcoin:before {
      -  content: "\e227";
      -}
      -.glyphicon-btc:before {
      -  content: "\e227";
      -}
      -.glyphicon-xbt:before {
      -  content: "\e227";
      -}
      -.glyphicon-yen:before {
      -  content: "\00a5";
      -}
      -.glyphicon-jpy:before {
      -  content: "\00a5";
      -}
      -.glyphicon-ruble:before {
      -  content: "\20bd";
      -}
      -.glyphicon-rub:before {
      -  content: "\20bd";
      -}
      -.glyphicon-scale:before {
      -  content: "\e230";
      -}
      -.glyphicon-ice-lolly:before {
      -  content: "\e231";
      -}
      -.glyphicon-ice-lolly-tasted:before {
      -  content: "\e232";
      -}
      -.glyphicon-education:before {
      -  content: "\e233";
      -}
      -.glyphicon-option-horizontal:before {
      -  content: "\e234";
      -}
      -.glyphicon-option-vertical:before {
      -  content: "\e235";
      -}
      -.glyphicon-menu-hamburger:before {
      -  content: "\e236";
      -}
      -.glyphicon-modal-window:before {
      -  content: "\e237";
      -}
      -.glyphicon-oil:before {
      -  content: "\e238";
      -}
      -.glyphicon-grain:before {
      -  content: "\e239";
      -}
      -.glyphicon-sunglasses:before {
      -  content: "\e240";
      -}
      -.glyphicon-text-size:before {
      -  content: "\e241";
      -}
      -.glyphicon-text-color:before {
      -  content: "\e242";
      -}
      -.glyphicon-text-background:before {
      -  content: "\e243";
      -}
      -.glyphicon-object-align-top:before {
      -  content: "\e244";
      -}
      -.glyphicon-object-align-bottom:before {
      -  content: "\e245";
      -}
      -.glyphicon-object-align-horizontal:before {
      -  content: "\e246";
      -}
      -.glyphicon-object-align-left:before {
      -  content: "\e247";
      -}
      -.glyphicon-object-align-vertical:before {
      -  content: "\e248";
      -}
      -.glyphicon-object-align-right:before {
      -  content: "\e249";
      -}
      -.glyphicon-triangle-right:before {
      -  content: "\e250";
      -}
      -.glyphicon-triangle-left:before {
      -  content: "\e251";
      -}
      -.glyphicon-triangle-bottom:before {
      -  content: "\e252";
      -}
      -.glyphicon-triangle-top:before {
      -  content: "\e253";
      -}
      -.glyphicon-console:before {
      -  content: "\e254";
      -}
      -.glyphicon-superscript:before {
      -  content: "\e255";
      -}
      -.glyphicon-subscript:before {
      -  content: "\e256";
      -}
      -.glyphicon-menu-left:before {
      -  content: "\e257";
      -}
      -.glyphicon-menu-right:before {
      -  content: "\e258";
      -}
      -.glyphicon-menu-down:before {
      -  content: "\e259";
      -}
      -.glyphicon-menu-up:before {
      -  content: "\e260";
      -}
      -* {
      -  -webkit-box-sizing: border-box;
      -     -moz-box-sizing: border-box;
      -          box-sizing: border-box;
      -}
      -*:before,
      -*:after {
      -  -webkit-box-sizing: border-box;
      -     -moz-box-sizing: border-box;
      -          box-sizing: border-box;
      -}
      -html {
      -  font-size: 10px;
      -
      -  -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
      -}
      -body {
      -  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
      -  font-size: 14px;
      -  line-height: 1.42857143;
      -  color: #333;
      -  background-color: #fff;
      -}
      -input,
      -button,
      -select,
      -textarea {
      -  font-family: inherit;
      -  font-size: inherit;
      -  line-height: inherit;
      -}
      -a {
      -  color: #337ab7;
      -  text-decoration: none;
      -}
      -a:hover,
      -a:focus {
      -  color: #23527c;
      -  text-decoration: underline;
      -}
      -a:focus {
      -  outline: 5px auto -webkit-focus-ring-color;
      -  outline-offset: -2px;
      -}
      -figure {
      -  margin: 0;
      -}
      -img {
      -  vertical-align: middle;
      -}
      -.img-responsive,
      -.thumbnail > img,
      -.thumbnail a > img,
      -.carousel-inner > .item > img,
      -.carousel-inner > .item > a > img {
      -  display: block;
      -  max-width: 100%;
      -  height: auto;
      -}
      -.img-rounded {
      -  border-radius: 6px;
      -}
      -.img-thumbnail {
      -  display: inline-block;
      -  max-width: 100%;
      -  height: auto;
      -  padding: 4px;
      -  line-height: 1.42857143;
      -  background-color: #fff;
      -  border: 1px solid #ddd;
      -  border-radius: 4px;
      -  -webkit-transition: all .2s ease-in-out;
      -       -o-transition: all .2s ease-in-out;
      -          transition: all .2s ease-in-out;
      -}
      -.img-circle {
      -  border-radius: 50%;
      -}
      -hr {
      -  margin-top: 20px;
      -  margin-bottom: 20px;
      -  border: 0;
      -  border-top: 1px solid #eee;
      -}
      -.sr-only {
      -  position: absolute;
      -  width: 1px;
      -  height: 1px;
      -  padding: 0;
      -  margin: -1px;
      -  overflow: hidden;
      -  clip: rect(0, 0, 0, 0);
      -  border: 0;
      -}
      -.sr-only-focusable:active,
      -.sr-only-focusable:focus {
      -  position: static;
      -  width: auto;
      -  height: auto;
      -  margin: 0;
      -  overflow: visible;
      -  clip: auto;
      -}
      -[role="button"] {
      -  cursor: pointer;
      -}
      -h1,
      -h2,
      -h3,
      -h4,
      -h5,
      -h6,
      -.h1,
      -.h2,
      -.h3,
      -.h4,
      -.h5,
      -.h6 {
      -  font-family: inherit;
      -  font-weight: 500;
      -  line-height: 1.1;
      -  color: inherit;
      -}
      -h1 small,
      -h2 small,
      -h3 small,
      -h4 small,
      -h5 small,
      -h6 small,
      -.h1 small,
      -.h2 small,
      -.h3 small,
      -.h4 small,
      -.h5 small,
      -.h6 small,
      -h1 .small,
      -h2 .small,
      -h3 .small,
      -h4 .small,
      -h5 .small,
      -h6 .small,
      -.h1 .small,
      -.h2 .small,
      -.h3 .small,
      -.h4 .small,
      -.h5 .small,
      -.h6 .small {
      -  font-weight: normal;
      -  line-height: 1;
      -  color: #777;
      -}
      -h1,
      -.h1,
      -h2,
      -.h2,
      -h3,
      -.h3 {
      -  margin-top: 20px;
      -  margin-bottom: 10px;
      -}
      -h1 small,
      -.h1 small,
      -h2 small,
      -.h2 small,
      -h3 small,
      -.h3 small,
      -h1 .small,
      -.h1 .small,
      -h2 .small,
      -.h2 .small,
      -h3 .small,
      -.h3 .small {
      -  font-size: 65%;
      -}
      -h4,
      -.h4,
      -h5,
      -.h5,
      -h6,
      -.h6 {
      -  margin-top: 10px;
      -  margin-bottom: 10px;
      -}
      -h4 small,
      -.h4 small,
      -h5 small,
      -.h5 small,
      -h6 small,
      -.h6 small,
      -h4 .small,
      -.h4 .small,
      -h5 .small,
      -.h5 .small,
      -h6 .small,
      -.h6 .small {
      -  font-size: 75%;
      -}
      -h1,
      -.h1 {
      -  font-size: 36px;
      -}
      -h2,
      -.h2 {
      -  font-size: 30px;
      -}
      -h3,
      -.h3 {
      -  font-size: 24px;
      -}
      -h4,
      -.h4 {
      -  font-size: 18px;
      -}
      -h5,
      -.h5 {
      -  font-size: 14px;
      -}
      -h6,
      -.h6 {
      -  font-size: 12px;
      -}
      -p {
      -  margin: 0 0 10px;
      -}
      -.lead {
      -  margin-bottom: 20px;
      -  font-size: 16px;
      -  font-weight: 300;
      -  line-height: 1.4;
      -}
      -@media (min-width: 768px) {
      -  .lead {
      -    font-size: 21px;
      -  }
      -}
      -small,
      -.small {
      -  font-size: 85%;
      -}
      -mark,
      -.mark {
      -  padding: .2em;
      -  background-color: #fcf8e3;
      -}
      -.text-left {
      -  text-align: left;
      -}
      -.text-right {
      -  text-align: right;
      -}
      -.text-center {
      -  text-align: center;
      -}
      -.text-justify {
      -  text-align: justify;
      -}
      -.text-nowrap {
      -  white-space: nowrap;
      -}
      -.text-lowercase {
      -  text-transform: lowercase;
      -}
      -.text-uppercase {
      -  text-transform: uppercase;
      -}
      -.text-capitalize {
      -  text-transform: capitalize;
      -}
      -.text-muted {
      -  color: #777;
      -}
      -.text-primary {
      -  color: #337ab7;
      -}
      -a.text-primary:hover,
      -a.text-primary:focus {
      -  color: #286090;
      -}
      -.text-success {
      -  color: #3c763d;
      -}
      -a.text-success:hover,
      -a.text-success:focus {
      -  color: #2b542c;
      -}
      -.text-info {
      -  color: #31708f;
      -}
      -a.text-info:hover,
      -a.text-info:focus {
      -  color: #245269;
      -}
      -.text-warning {
      -  color: #8a6d3b;
      -}
      -a.text-warning:hover,
      -a.text-warning:focus {
      -  color: #66512c;
      -}
      -.text-danger {
      -  color: #a94442;
      -}
      -a.text-danger:hover,
      -a.text-danger:focus {
      -  color: #843534;
      -}
      -.bg-primary {
      -  color: #fff;
      -  background-color: #337ab7;
      -}
      -a.bg-primary:hover,
      -a.bg-primary:focus {
      -  background-color: #286090;
      -}
      -.bg-success {
      -  background-color: #dff0d8;
      -}
      -a.bg-success:hover,
      -a.bg-success:focus {
      -  background-color: #c1e2b3;
      -}
      -.bg-info {
      -  background-color: #d9edf7;
      -}
      -a.bg-info:hover,
      -a.bg-info:focus {
      -  background-color: #afd9ee;
      -}
      -.bg-warning {
      -  background-color: #fcf8e3;
      -}
      -a.bg-warning:hover,
      -a.bg-warning:focus {
      -  background-color: #f7ecb5;
      -}
      -.bg-danger {
      -  background-color: #f2dede;
      -}
      -a.bg-danger:hover,
      -a.bg-danger:focus {
      -  background-color: #e4b9b9;
      -}
      -.page-header {
      -  padding-bottom: 9px;
      -  margin: 40px 0 20px;
      -  border-bottom: 1px solid #eee;
      -}
      -ul,
      -ol {
      -  margin-top: 0;
      -  margin-bottom: 10px;
      -}
      -ul ul,
      -ol ul,
      -ul ol,
      -ol ol {
      -  margin-bottom: 0;
      -}
      -.list-unstyled {
      -  padding-left: 0;
      -  list-style: none;
      -}
      -.list-inline {
      -  padding-left: 0;
      -  margin-left: -5px;
      -  list-style: none;
      -}
      -.list-inline > li {
      -  display: inline-block;
      -  padding-right: 5px;
      -  padding-left: 5px;
      -}
      -dl {
      -  margin-top: 0;
      -  margin-bottom: 20px;
      -}
      -dt,
      -dd {
      -  line-height: 1.42857143;
      -}
      -dt {
      -  font-weight: bold;
      -}
      -dd {
      -  margin-left: 0;
      -}
      -@media (min-width: 768px) {
      -  .dl-horizontal dt {
      -    float: left;
      -    width: 160px;
      -    overflow: hidden;
      -    clear: left;
      -    text-align: right;
      -    text-overflow: ellipsis;
      -    white-space: nowrap;
      -  }
      -  .dl-horizontal dd {
      -    margin-left: 180px;
      -  }
      -}
      -abbr[title],
      -abbr[data-original-title] {
      -  cursor: help;
      -  border-bottom: 1px dotted #777;
      -}
      -.initialism {
      -  font-size: 90%;
      -  text-transform: uppercase;
      -}
      -blockquote {
      -  padding: 10px 20px;
      -  margin: 0 0 20px;
      -  font-size: 17.5px;
      -  border-left: 5px solid #eee;
      -}
      -blockquote p:last-child,
      -blockquote ul:last-child,
      -blockquote ol:last-child {
      -  margin-bottom: 0;
      -}
      -blockquote footer,
      -blockquote small,
      -blockquote .small {
      -  display: block;
      -  font-size: 80%;
      -  line-height: 1.42857143;
      -  color: #777;
      -}
      -blockquote footer:before,
      -blockquote small:before,
      -blockquote .small:before {
      -  content: '\2014 \00A0';
      -}
      -.blockquote-reverse,
      -blockquote.pull-right {
      -  padding-right: 15px;
      -  padding-left: 0;
      -  text-align: right;
      -  border-right: 5px solid #eee;
      -  border-left: 0;
      -}
      -.blockquote-reverse footer:before,
      -blockquote.pull-right footer:before,
      -.blockquote-reverse small:before,
      -blockquote.pull-right small:before,
      -.blockquote-reverse .small:before,
      -blockquote.pull-right .small:before {
      -  content: '';
      -}
      -.blockquote-reverse footer:after,
      -blockquote.pull-right footer:after,
      -.blockquote-reverse small:after,
      -blockquote.pull-right small:after,
      -.blockquote-reverse .small:after,
      -blockquote.pull-right .small:after {
      -  content: '\00A0 \2014';
      -}
      -address {
      -  margin-bottom: 20px;
      -  font-style: normal;
      -  line-height: 1.42857143;
      -}
      -code,
      -kbd,
      -pre,
      -samp {
      -  font-family: Menlo, Monaco, Consolas, "Courier New", monospace;
      -}
      -code {
      -  padding: 2px 4px;
      -  font-size: 90%;
      -  color: #c7254e;
      -  background-color: #f9f2f4;
      -  border-radius: 4px;
      -}
      -kbd {
      -  padding: 2px 4px;
      -  font-size: 90%;
      -  color: #fff;
      -  background-color: #333;
      -  border-radius: 3px;
      -  -webkit-box-shadow: inset 0 -1px 0 rgba(0, 0, 0, .25);
      -          box-shadow: inset 0 -1px 0 rgba(0, 0, 0, .25);
      -}
      -kbd kbd {
      -  padding: 0;
      -  font-size: 100%;
      -  font-weight: bold;
      -  -webkit-box-shadow: none;
      -          box-shadow: none;
      -}
      -pre {
      -  display: block;
      -  padding: 9.5px;
      -  margin: 0 0 10px;
      -  font-size: 13px;
      -  line-height: 1.42857143;
      -  color: #333;
      -  word-break: break-all;
      -  word-wrap: break-word;
      -  background-color: #f5f5f5;
      -  border: 1px solid #ccc;
      -  border-radius: 4px;
      -}
      -pre code {
      -  padding: 0;
      -  font-size: inherit;
      -  color: inherit;
      -  white-space: pre-wrap;
      -  background-color: transparent;
      -  border-radius: 0;
      -}
      -.pre-scrollable {
      -  max-height: 340px;
      -  overflow-y: scroll;
      -}
      -.container {
      -  padding-right: 15px;
      -  padding-left: 15px;
      -  margin-right: auto;
      -  margin-left: auto;
      -}
      -@media (min-width: 768px) {
      -  .container {
      -    width: 750px;
      -  }
      -}
      -@media (min-width: 992px) {
      -  .container {
      -    width: 970px;
      -  }
      -}
      -@media (min-width: 1200px) {
      -  .container {
      -    width: 1170px;
      -  }
      -}
      -.container-fluid {
      -  padding-right: 15px;
      -  padding-left: 15px;
      -  margin-right: auto;
      -  margin-left: auto;
      -}
      -.row {
      -  margin-right: -15px;
      -  margin-left: -15px;
      -}
      -.col-xs-1, .col-sm-1, .col-md-1, .col-lg-1, .col-xs-2, .col-sm-2, .col-md-2, .col-lg-2, .col-xs-3, .col-sm-3, .col-md-3, .col-lg-3, .col-xs-4, .col-sm-4, .col-md-4, .col-lg-4, .col-xs-5, .col-sm-5, .col-md-5, .col-lg-5, .col-xs-6, .col-sm-6, .col-md-6, .col-lg-6, .col-xs-7, .col-sm-7, .col-md-7, .col-lg-7, .col-xs-8, .col-sm-8, .col-md-8, .col-lg-8, .col-xs-9, .col-sm-9, .col-md-9, .col-lg-9, .col-xs-10, .col-sm-10, .col-md-10, .col-lg-10, .col-xs-11, .col-sm-11, .col-md-11, .col-lg-11, .col-xs-12, .col-sm-12, .col-md-12, .col-lg-12 {
      -  position: relative;
      -  min-height: 1px;
      -  padding-right: 15px;
      -  padding-left: 15px;
      -}
      -.col-xs-1, .col-xs-2, .col-xs-3, .col-xs-4, .col-xs-5, .col-xs-6, .col-xs-7, .col-xs-8, .col-xs-9, .col-xs-10, .col-xs-11, .col-xs-12 {
      -  float: left;
      -}
      -.col-xs-12 {
      -  width: 100%;
      -}
      -.col-xs-11 {
      -  width: 91.66666667%;
      -}
      -.col-xs-10 {
      -  width: 83.33333333%;
      -}
      -.col-xs-9 {
      -  width: 75%;
      -}
      -.col-xs-8 {
      -  width: 66.66666667%;
      -}
      -.col-xs-7 {
      -  width: 58.33333333%;
      -}
      -.col-xs-6 {
      -  width: 50%;
      -}
      -.col-xs-5 {
      -  width: 41.66666667%;
      -}
      -.col-xs-4 {
      -  width: 33.33333333%;
      -}
      -.col-xs-3 {
      -  width: 25%;
      -}
      -.col-xs-2 {
      -  width: 16.66666667%;
      -}
      -.col-xs-1 {
      -  width: 8.33333333%;
      -}
      -.col-xs-pull-12 {
      -  right: 100%;
      -}
      -.col-xs-pull-11 {
      -  right: 91.66666667%;
      -}
      -.col-xs-pull-10 {
      -  right: 83.33333333%;
      -}
      -.col-xs-pull-9 {
      -  right: 75%;
      -}
      -.col-xs-pull-8 {
      -  right: 66.66666667%;
      -}
      -.col-xs-pull-7 {
      -  right: 58.33333333%;
      -}
      -.col-xs-pull-6 {
      -  right: 50%;
      -}
      -.col-xs-pull-5 {
      -  right: 41.66666667%;
      -}
      -.col-xs-pull-4 {
      -  right: 33.33333333%;
      -}
      -.col-xs-pull-3 {
      -  right: 25%;
      -}
      -.col-xs-pull-2 {
      -  right: 16.66666667%;
      -}
      -.col-xs-pull-1 {
      -  right: 8.33333333%;
      -}
      -.col-xs-pull-0 {
      -  right: auto;
      -}
      -.col-xs-push-12 {
      -  left: 100%;
      -}
      -.col-xs-push-11 {
      -  left: 91.66666667%;
      -}
      -.col-xs-push-10 {
      -  left: 83.33333333%;
      -}
      -.col-xs-push-9 {
      -  left: 75%;
      -}
      -.col-xs-push-8 {
      -  left: 66.66666667%;
      -}
      -.col-xs-push-7 {
      -  left: 58.33333333%;
      -}
      -.col-xs-push-6 {
      -  left: 50%;
      -}
      -.col-xs-push-5 {
      -  left: 41.66666667%;
      -}
      -.col-xs-push-4 {
      -  left: 33.33333333%;
      -}
      -.col-xs-push-3 {
      -  left: 25%;
      -}
      -.col-xs-push-2 {
      -  left: 16.66666667%;
      -}
      -.col-xs-push-1 {
      -  left: 8.33333333%;
      -}
      -.col-xs-push-0 {
      -  left: auto;
      -}
      -.col-xs-offset-12 {
      -  margin-left: 100%;
      -}
      -.col-xs-offset-11 {
      -  margin-left: 91.66666667%;
      -}
      -.col-xs-offset-10 {
      -  margin-left: 83.33333333%;
      -}
      -.col-xs-offset-9 {
      -  margin-left: 75%;
      -}
      -.col-xs-offset-8 {
      -  margin-left: 66.66666667%;
      -}
      -.col-xs-offset-7 {
      -  margin-left: 58.33333333%;
      -}
      -.col-xs-offset-6 {
      -  margin-left: 50%;
      -}
      -.col-xs-offset-5 {
      -  margin-left: 41.66666667%;
      -}
      -.col-xs-offset-4 {
      -  margin-left: 33.33333333%;
      -}
      -.col-xs-offset-3 {
      -  margin-left: 25%;
      -}
      -.col-xs-offset-2 {
      -  margin-left: 16.66666667%;
      -}
      -.col-xs-offset-1 {
      -  margin-left: 8.33333333%;
      -}
      -.col-xs-offset-0 {
      -  margin-left: 0;
      -}
      -@media (min-width: 768px) {
      -  .col-sm-1, .col-sm-2, .col-sm-3, .col-sm-4, .col-sm-5, .col-sm-6, .col-sm-7, .col-sm-8, .col-sm-9, .col-sm-10, .col-sm-11, .col-sm-12 {
      -    float: left;
      -  }
      -  .col-sm-12 {
      -    width: 100%;
      -  }
      -  .col-sm-11 {
      -    width: 91.66666667%;
      -  }
      -  .col-sm-10 {
      -    width: 83.33333333%;
      -  }
      -  .col-sm-9 {
      -    width: 75%;
      -  }
      -  .col-sm-8 {
      -    width: 66.66666667%;
      -  }
      -  .col-sm-7 {
      -    width: 58.33333333%;
      -  }
      -  .col-sm-6 {
      -    width: 50%;
      -  }
      -  .col-sm-5 {
      -    width: 41.66666667%;
      -  }
      -  .col-sm-4 {
      -    width: 33.33333333%;
      -  }
      -  .col-sm-3 {
      -    width: 25%;
      -  }
      -  .col-sm-2 {
      -    width: 16.66666667%;
      -  }
      -  .col-sm-1 {
      -    width: 8.33333333%;
      -  }
      -  .col-sm-pull-12 {
      -    right: 100%;
      -  }
      -  .col-sm-pull-11 {
      -    right: 91.66666667%;
      -  }
      -  .col-sm-pull-10 {
      -    right: 83.33333333%;
      -  }
      -  .col-sm-pull-9 {
      -    right: 75%;
      -  }
      -  .col-sm-pull-8 {
      -    right: 66.66666667%;
      -  }
      -  .col-sm-pull-7 {
      -    right: 58.33333333%;
      -  }
      -  .col-sm-pull-6 {
      -    right: 50%;
      -  }
      -  .col-sm-pull-5 {
      -    right: 41.66666667%;
      -  }
      -  .col-sm-pull-4 {
      -    right: 33.33333333%;
      -  }
      -  .col-sm-pull-3 {
      -    right: 25%;
      -  }
      -  .col-sm-pull-2 {
      -    right: 16.66666667%;
      -  }
      -  .col-sm-pull-1 {
      -    right: 8.33333333%;
      -  }
      -  .col-sm-pull-0 {
      -    right: auto;
      -  }
      -  .col-sm-push-12 {
      -    left: 100%;
      -  }
      -  .col-sm-push-11 {
      -    left: 91.66666667%;
      -  }
      -  .col-sm-push-10 {
      -    left: 83.33333333%;
      -  }
      -  .col-sm-push-9 {
      -    left: 75%;
      -  }
      -  .col-sm-push-8 {
      -    left: 66.66666667%;
      -  }
      -  .col-sm-push-7 {
      -    left: 58.33333333%;
      -  }
      -  .col-sm-push-6 {
      -    left: 50%;
      -  }
      -  .col-sm-push-5 {
      -    left: 41.66666667%;
      -  }
      -  .col-sm-push-4 {
      -    left: 33.33333333%;
      -  }
      -  .col-sm-push-3 {
      -    left: 25%;
      -  }
      -  .col-sm-push-2 {
      -    left: 16.66666667%;
      -  }
      -  .col-sm-push-1 {
      -    left: 8.33333333%;
      -  }
      -  .col-sm-push-0 {
      -    left: auto;
      -  }
      -  .col-sm-offset-12 {
      -    margin-left: 100%;
      -  }
      -  .col-sm-offset-11 {
      -    margin-left: 91.66666667%;
      -  }
      -  .col-sm-offset-10 {
      -    margin-left: 83.33333333%;
      -  }
      -  .col-sm-offset-9 {
      -    margin-left: 75%;
      -  }
      -  .col-sm-offset-8 {
      -    margin-left: 66.66666667%;
      -  }
      -  .col-sm-offset-7 {
      -    margin-left: 58.33333333%;
      -  }
      -  .col-sm-offset-6 {
      -    margin-left: 50%;
      -  }
      -  .col-sm-offset-5 {
      -    margin-left: 41.66666667%;
      -  }
      -  .col-sm-offset-4 {
      -    margin-left: 33.33333333%;
      -  }
      -  .col-sm-offset-3 {
      -    margin-left: 25%;
      -  }
      -  .col-sm-offset-2 {
      -    margin-left: 16.66666667%;
      -  }
      -  .col-sm-offset-1 {
      -    margin-left: 8.33333333%;
      -  }
      -  .col-sm-offset-0 {
      -    margin-left: 0;
      -  }
      -}
      -@media (min-width: 992px) {
      -  .col-md-1, .col-md-2, .col-md-3, .col-md-4, .col-md-5, .col-md-6, .col-md-7, .col-md-8, .col-md-9, .col-md-10, .col-md-11, .col-md-12 {
      -    float: left;
      -  }
      -  .col-md-12 {
      -    width: 100%;
      -  }
      -  .col-md-11 {
      -    width: 91.66666667%;
      -  }
      -  .col-md-10 {
      -    width: 83.33333333%;
      -  }
      -  .col-md-9 {
      -    width: 75%;
      -  }
      -  .col-md-8 {
      -    width: 66.66666667%;
      -  }
      -  .col-md-7 {
      -    width: 58.33333333%;
      -  }
      -  .col-md-6 {
      -    width: 50%;
      -  }
      -  .col-md-5 {
      -    width: 41.66666667%;
      -  }
      -  .col-md-4 {
      -    width: 33.33333333%;
      -  }
      -  .col-md-3 {
      -    width: 25%;
      -  }
      -  .col-md-2 {
      -    width: 16.66666667%;
      -  }
      -  .col-md-1 {
      -    width: 8.33333333%;
      -  }
      -  .col-md-pull-12 {
      -    right: 100%;
      -  }
      -  .col-md-pull-11 {
      -    right: 91.66666667%;
      -  }
      -  .col-md-pull-10 {
      -    right: 83.33333333%;
      -  }
      -  .col-md-pull-9 {
      -    right: 75%;
      -  }
      -  .col-md-pull-8 {
      -    right: 66.66666667%;
      -  }
      -  .col-md-pull-7 {
      -    right: 58.33333333%;
      -  }
      -  .col-md-pull-6 {
      -    right: 50%;
      -  }
      -  .col-md-pull-5 {
      -    right: 41.66666667%;
      -  }
      -  .col-md-pull-4 {
      -    right: 33.33333333%;
      -  }
      -  .col-md-pull-3 {
      -    right: 25%;
      -  }
      -  .col-md-pull-2 {
      -    right: 16.66666667%;
      -  }
      -  .col-md-pull-1 {
      -    right: 8.33333333%;
      -  }
      -  .col-md-pull-0 {
      -    right: auto;
      -  }
      -  .col-md-push-12 {
      -    left: 100%;
      -  }
      -  .col-md-push-11 {
      -    left: 91.66666667%;
      -  }
      -  .col-md-push-10 {
      -    left: 83.33333333%;
      -  }
      -  .col-md-push-9 {
      -    left: 75%;
      -  }
      -  .col-md-push-8 {
      -    left: 66.66666667%;
      -  }
      -  .col-md-push-7 {
      -    left: 58.33333333%;
      -  }
      -  .col-md-push-6 {
      -    left: 50%;
      -  }
      -  .col-md-push-5 {
      -    left: 41.66666667%;
      -  }
      -  .col-md-push-4 {
      -    left: 33.33333333%;
      -  }
      -  .col-md-push-3 {
      -    left: 25%;
      -  }
      -  .col-md-push-2 {
      -    left: 16.66666667%;
      -  }
      -  .col-md-push-1 {
      -    left: 8.33333333%;
      -  }
      -  .col-md-push-0 {
      -    left: auto;
      -  }
      -  .col-md-offset-12 {
      -    margin-left: 100%;
      -  }
      -  .col-md-offset-11 {
      -    margin-left: 91.66666667%;
      -  }
      -  .col-md-offset-10 {
      -    margin-left: 83.33333333%;
      -  }
      -  .col-md-offset-9 {
      -    margin-left: 75%;
      -  }
      -  .col-md-offset-8 {
      -    margin-left: 66.66666667%;
      -  }
      -  .col-md-offset-7 {
      -    margin-left: 58.33333333%;
      -  }
      -  .col-md-offset-6 {
      -    margin-left: 50%;
      -  }
      -  .col-md-offset-5 {
      -    margin-left: 41.66666667%;
      -  }
      -  .col-md-offset-4 {
      -    margin-left: 33.33333333%;
      -  }
      -  .col-md-offset-3 {
      -    margin-left: 25%;
      -  }
      -  .col-md-offset-2 {
      -    margin-left: 16.66666667%;
      -  }
      -  .col-md-offset-1 {
      -    margin-left: 8.33333333%;
      -  }
      -  .col-md-offset-0 {
      -    margin-left: 0;
      -  }
      -}
      -@media (min-width: 1200px) {
      -  .col-lg-1, .col-lg-2, .col-lg-3, .col-lg-4, .col-lg-5, .col-lg-6, .col-lg-7, .col-lg-8, .col-lg-9, .col-lg-10, .col-lg-11, .col-lg-12 {
      -    float: left;
      -  }
      -  .col-lg-12 {
      -    width: 100%;
      -  }
      -  .col-lg-11 {
      -    width: 91.66666667%;
      -  }
      -  .col-lg-10 {
      -    width: 83.33333333%;
      -  }
      -  .col-lg-9 {
      -    width: 75%;
      -  }
      -  .col-lg-8 {
      -    width: 66.66666667%;
      -  }
      -  .col-lg-7 {
      -    width: 58.33333333%;
      -  }
      -  .col-lg-6 {
      -    width: 50%;
      -  }
      -  .col-lg-5 {
      -    width: 41.66666667%;
      -  }
      -  .col-lg-4 {
      -    width: 33.33333333%;
      -  }
      -  .col-lg-3 {
      -    width: 25%;
      -  }
      -  .col-lg-2 {
      -    width: 16.66666667%;
      -  }
      -  .col-lg-1 {
      -    width: 8.33333333%;
      -  }
      -  .col-lg-pull-12 {
      -    right: 100%;
      -  }
      -  .col-lg-pull-11 {
      -    right: 91.66666667%;
      -  }
      -  .col-lg-pull-10 {
      -    right: 83.33333333%;
      -  }
      -  .col-lg-pull-9 {
      -    right: 75%;
      -  }
      -  .col-lg-pull-8 {
      -    right: 66.66666667%;
      -  }
      -  .col-lg-pull-7 {
      -    right: 58.33333333%;
      -  }
      -  .col-lg-pull-6 {
      -    right: 50%;
      -  }
      -  .col-lg-pull-5 {
      -    right: 41.66666667%;
      -  }
      -  .col-lg-pull-4 {
      -    right: 33.33333333%;
      -  }
      -  .col-lg-pull-3 {
      -    right: 25%;
      -  }
      -  .col-lg-pull-2 {
      -    right: 16.66666667%;
      -  }
      -  .col-lg-pull-1 {
      -    right: 8.33333333%;
      -  }
      -  .col-lg-pull-0 {
      -    right: auto;
      -  }
      -  .col-lg-push-12 {
      -    left: 100%;
      -  }
      -  .col-lg-push-11 {
      -    left: 91.66666667%;
      -  }
      -  .col-lg-push-10 {
      -    left: 83.33333333%;
      -  }
      -  .col-lg-push-9 {
      -    left: 75%;
      -  }
      -  .col-lg-push-8 {
      -    left: 66.66666667%;
      -  }
      -  .col-lg-push-7 {
      -    left: 58.33333333%;
      -  }
      -  .col-lg-push-6 {
      -    left: 50%;
      -  }
      -  .col-lg-push-5 {
      -    left: 41.66666667%;
      -  }
      -  .col-lg-push-4 {
      -    left: 33.33333333%;
      -  }
      -  .col-lg-push-3 {
      -    left: 25%;
      -  }
      -  .col-lg-push-2 {
      -    left: 16.66666667%;
      -  }
      -  .col-lg-push-1 {
      -    left: 8.33333333%;
      -  }
      -  .col-lg-push-0 {
      -    left: auto;
      -  }
      -  .col-lg-offset-12 {
      -    margin-left: 100%;
      -  }
      -  .col-lg-offset-11 {
      -    margin-left: 91.66666667%;
      -  }
      -  .col-lg-offset-10 {
      -    margin-left: 83.33333333%;
      -  }
      -  .col-lg-offset-9 {
      -    margin-left: 75%;
      -  }
      -  .col-lg-offset-8 {
      -    margin-left: 66.66666667%;
      -  }
      -  .col-lg-offset-7 {
      -    margin-left: 58.33333333%;
      -  }
      -  .col-lg-offset-6 {
      -    margin-left: 50%;
      -  }
      -  .col-lg-offset-5 {
      -    margin-left: 41.66666667%;
      -  }
      -  .col-lg-offset-4 {
      -    margin-left: 33.33333333%;
      -  }
      -  .col-lg-offset-3 {
      -    margin-left: 25%;
      -  }
      -  .col-lg-offset-2 {
      -    margin-left: 16.66666667%;
      -  }
      -  .col-lg-offset-1 {
      -    margin-left: 8.33333333%;
      -  }
      -  .col-lg-offset-0 {
      -    margin-left: 0;
      -  }
      -}
      -table {
      -  background-color: transparent;
      -}
      -caption {
      -  padding-top: 8px;
      -  padding-bottom: 8px;
      -  color: #777;
      -  text-align: left;
      -}
      -th {
      -  text-align: left;
      -}
      -.table {
      -  width: 100%;
      -  max-width: 100%;
      -  margin-bottom: 20px;
      -}
      -.table > thead > tr > th,
      -.table > tbody > tr > th,
      -.table > tfoot > tr > th,
      -.table > thead > tr > td,
      -.table > tbody > tr > td,
      -.table > tfoot > tr > td {
      -  padding: 8px;
      -  line-height: 1.42857143;
      -  vertical-align: top;
      -  border-top: 1px solid #ddd;
      -}
      -.table > thead > tr > th {
      -  vertical-align: bottom;
      -  border-bottom: 2px solid #ddd;
      -}
      -.table > caption + thead > tr:first-child > th,
      -.table > colgroup + thead > tr:first-child > th,
      -.table > thead:first-child > tr:first-child > th,
      -.table > caption + thead > tr:first-child > td,
      -.table > colgroup + thead > tr:first-child > td,
      -.table > thead:first-child > tr:first-child > td {
      -  border-top: 0;
      -}
      -.table > tbody + tbody {
      -  border-top: 2px solid #ddd;
      -}
      -.table .table {
      -  background-color: #fff;
      -}
      -.table-condensed > thead > tr > th,
      -.table-condensed > tbody > tr > th,
      -.table-condensed > tfoot > tr > th,
      -.table-condensed > thead > tr > td,
      -.table-condensed > tbody > tr > td,
      -.table-condensed > tfoot > tr > td {
      -  padding: 5px;
      -}
      -.table-bordered {
      -  border: 1px solid #ddd;
      -}
      -.table-bordered > thead > tr > th,
      -.table-bordered > tbody > tr > th,
      -.table-bordered > tfoot > tr > th,
      -.table-bordered > thead > tr > td,
      -.table-bordered > tbody > tr > td,
      -.table-bordered > tfoot > tr > td {
      -  border: 1px solid #ddd;
      -}
      -.table-bordered > thead > tr > th,
      -.table-bordered > thead > tr > td {
      -  border-bottom-width: 2px;
      -}
      -.table-striped > tbody > tr:nth-of-type(odd) {
      -  background-color: #f9f9f9;
      -}
      -.table-hover > tbody > tr:hover {
      -  background-color: #f5f5f5;
      -}
      -table col[class*="col-"] {
      -  position: static;
      -  display: table-column;
      -  float: none;
      -}
      -table td[class*="col-"],
      -table th[class*="col-"] {
      -  position: static;
      -  display: table-cell;
      -  float: none;
      -}
      -.table > thead > tr > td.active,
      -.table > tbody > tr > td.active,
      -.table > tfoot > tr > td.active,
      -.table > thead > tr > th.active,
      -.table > tbody > tr > th.active,
      -.table > tfoot > tr > th.active,
      -.table > thead > tr.active > td,
      -.table > tbody > tr.active > td,
      -.table > tfoot > tr.active > td,
      -.table > thead > tr.active > th,
      -.table > tbody > tr.active > th,
      -.table > tfoot > tr.active > th {
      -  background-color: #f5f5f5;
      -}
      -.table-hover > tbody > tr > td.active:hover,
      -.table-hover > tbody > tr > th.active:hover,
      -.table-hover > tbody > tr.active:hover > td,
      -.table-hover > tbody > tr:hover > .active,
      -.table-hover > tbody > tr.active:hover > th {
      -  background-color: #e8e8e8;
      -}
      -.table > thead > tr > td.success,
      -.table > tbody > tr > td.success,
      -.table > tfoot > tr > td.success,
      -.table > thead > tr > th.success,
      -.table > tbody > tr > th.success,
      -.table > tfoot > tr > th.success,
      -.table > thead > tr.success > td,
      -.table > tbody > tr.success > td,
      -.table > tfoot > tr.success > td,
      -.table > thead > tr.success > th,
      -.table > tbody > tr.success > th,
      -.table > tfoot > tr.success > th {
      -  background-color: #dff0d8;
      -}
      -.table-hover > tbody > tr > td.success:hover,
      -.table-hover > tbody > tr > th.success:hover,
      -.table-hover > tbody > tr.success:hover > td,
      -.table-hover > tbody > tr:hover > .success,
      -.table-hover > tbody > tr.success:hover > th {
      -  background-color: #d0e9c6;
      -}
      -.table > thead > tr > td.info,
      -.table > tbody > tr > td.info,
      -.table > tfoot > tr > td.info,
      -.table > thead > tr > th.info,
      -.table > tbody > tr > th.info,
      -.table > tfoot > tr > th.info,
      -.table > thead > tr.info > td,
      -.table > tbody > tr.info > td,
      -.table > tfoot > tr.info > td,
      -.table > thead > tr.info > th,
      -.table > tbody > tr.info > th,
      -.table > tfoot > tr.info > th {
      -  background-color: #d9edf7;
      -}
      -.table-hover > tbody > tr > td.info:hover,
      -.table-hover > tbody > tr > th.info:hover,
      -.table-hover > tbody > tr.info:hover > td,
      -.table-hover > tbody > tr:hover > .info,
      -.table-hover > tbody > tr.info:hover > th {
      -  background-color: #c4e3f3;
      -}
      -.table > thead > tr > td.warning,
      -.table > tbody > tr > td.warning,
      -.table > tfoot > tr > td.warning,
      -.table > thead > tr > th.warning,
      -.table > tbody > tr > th.warning,
      -.table > tfoot > tr > th.warning,
      -.table > thead > tr.warning > td,
      -.table > tbody > tr.warning > td,
      -.table > tfoot > tr.warning > td,
      -.table > thead > tr.warning > th,
      -.table > tbody > tr.warning > th,
      -.table > tfoot > tr.warning > th {
      -  background-color: #fcf8e3;
      -}
      -.table-hover > tbody > tr > td.warning:hover,
      -.table-hover > tbody > tr > th.warning:hover,
      -.table-hover > tbody > tr.warning:hover > td,
      -.table-hover > tbody > tr:hover > .warning,
      -.table-hover > tbody > tr.warning:hover > th {
      -  background-color: #faf2cc;
      -}
      -.table > thead > tr > td.danger,
      -.table > tbody > tr > td.danger,
      -.table > tfoot > tr > td.danger,
      -.table > thead > tr > th.danger,
      -.table > tbody > tr > th.danger,
      -.table > tfoot > tr > th.danger,
      -.table > thead > tr.danger > td,
      -.table > tbody > tr.danger > td,
      -.table > tfoot > tr.danger > td,
      -.table > thead > tr.danger > th,
      -.table > tbody > tr.danger > th,
      -.table > tfoot > tr.danger > th {
      -  background-color: #f2dede;
      -}
      -.table-hover > tbody > tr > td.danger:hover,
      -.table-hover > tbody > tr > th.danger:hover,
      -.table-hover > tbody > tr.danger:hover > td,
      -.table-hover > tbody > tr:hover > .danger,
      -.table-hover > tbody > tr.danger:hover > th {
      -  background-color: #ebcccc;
      -}
      -.table-responsive {
      -  min-height: .01%;
      -  overflow-x: auto;
      -}
      -@media screen and (max-width: 767px) {
      -  .table-responsive {
      -    width: 100%;
      -    margin-bottom: 15px;
      -    overflow-y: hidden;
      -    -ms-overflow-style: -ms-autohiding-scrollbar;
      -    border: 1px solid #ddd;
      -  }
      -  .table-responsive > .table {
      -    margin-bottom: 0;
      -  }
      -  .table-responsive > .table > thead > tr > th,
      -  .table-responsive > .table > tbody > tr > th,
      -  .table-responsive > .table > tfoot > tr > th,
      -  .table-responsive > .table > thead > tr > td,
      -  .table-responsive > .table > tbody > tr > td,
      -  .table-responsive > .table > tfoot > tr > td {
      -    white-space: nowrap;
      -  }
      -  .table-responsive > .table-bordered {
      -    border: 0;
      -  }
      -  .table-responsive > .table-bordered > thead > tr > th:first-child,
      -  .table-responsive > .table-bordered > tbody > tr > th:first-child,
      -  .table-responsive > .table-bordered > tfoot > tr > th:first-child,
      -  .table-responsive > .table-bordered > thead > tr > td:first-child,
      -  .table-responsive > .table-bordered > tbody > tr > td:first-child,
      -  .table-responsive > .table-bordered > tfoot > tr > td:first-child {
      -    border-left: 0;
      -  }
      -  .table-responsive > .table-bordered > thead > tr > th:last-child,
      -  .table-responsive > .table-bordered > tbody > tr > th:last-child,
      -  .table-responsive > .table-bordered > tfoot > tr > th:last-child,
      -  .table-responsive > .table-bordered > thead > tr > td:last-child,
      -  .table-responsive > .table-bordered > tbody > tr > td:last-child,
      -  .table-responsive > .table-bordered > tfoot > tr > td:last-child {
      -    border-right: 0;
      -  }
      -  .table-responsive > .table-bordered > tbody > tr:last-child > th,
      -  .table-responsive > .table-bordered > tfoot > tr:last-child > th,
      -  .table-responsive > .table-bordered > tbody > tr:last-child > td,
      -  .table-responsive > .table-bordered > tfoot > tr:last-child > td {
      -    border-bottom: 0;
      -  }
      -}
      -fieldset {
      -  min-width: 0;
      -  padding: 0;
      -  margin: 0;
      -  border: 0;
      -}
      -legend {
      -  display: block;
      -  width: 100%;
      -  padding: 0;
      -  margin-bottom: 20px;
      -  font-size: 21px;
      -  line-height: inherit;
      -  color: #333;
      -  border: 0;
      -  border-bottom: 1px solid #e5e5e5;
      -}
      -label {
      -  display: inline-block;
      -  max-width: 100%;
      -  margin-bottom: 5px;
      -  font-weight: bold;
      -}
      -input[type="search"] {
      -  -webkit-box-sizing: border-box;
      -     -moz-box-sizing: border-box;
      -          box-sizing: border-box;
      -}
      -input[type="radio"],
      -input[type="checkbox"] {
      -  margin: 4px 0 0;
      -  margin-top: 1px \9;
      -  line-height: normal;
      -}
      -input[type="file"] {
      -  display: block;
      -}
      -input[type="range"] {
      -  display: block;
      -  width: 100%;
      -}
      -select[multiple],
      -select[size] {
      -  height: auto;
      -}
      -input[type="file"]:focus,
      -input[type="radio"]:focus,
      -input[type="checkbox"]:focus {
      -  outline: 5px auto -webkit-focus-ring-color;
      -  outline-offset: -2px;
      -}
      -output {
      -  display: block;
      -  padding-top: 7px;
      -  font-size: 14px;
      -  line-height: 1.42857143;
      -  color: #555;
      -}
      -.form-control {
      -  display: block;
      -  width: 100%;
      -  height: 34px;
      -  padding: 6px 12px;
      -  font-size: 14px;
      -  line-height: 1.42857143;
      -  color: #555;
      -  background-color: #fff;
      -  background-image: none;
      -  border: 1px solid #ccc;
      -  border-radius: 4px;
      -  -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075);
      -          box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075);
      -  -webkit-transition: border-color ease-in-out .15s, -webkit-box-shadow ease-in-out .15s;
      -       -o-transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;
      -          transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;
      -}
      -.form-control:focus {
      -  border-color: #66afe9;
      -  outline: 0;
      -  -webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(102, 175, 233, .6);
      -          box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(102, 175, 233, .6);
      -}
      -.form-control::-moz-placeholder {
      -  color: #999;
      -  opacity: 1;
      -}
      -.form-control:-ms-input-placeholder {
      -  color: #999;
      -}
      -.form-control::-webkit-input-placeholder {
      -  color: #999;
      -}
      -.form-control::-ms-expand {
      -  background-color: transparent;
      -  border: 0;
      -}
      -.form-control[disabled],
      -.form-control[readonly],
      -fieldset[disabled] .form-control {
      -  background-color: #eee;
      -  opacity: 1;
      -}
      -.form-control[disabled],
      -fieldset[disabled] .form-control {
      -  cursor: not-allowed;
      -}
      -textarea.form-control {
      -  height: auto;
      -}
      -input[type="search"] {
      -  -webkit-appearance: none;
      -}
      -@media screen and (-webkit-min-device-pixel-ratio: 0) {
      -  input[type="date"].form-control,
      -  input[type="time"].form-control,
      -  input[type="datetime-local"].form-control,
      -  input[type="month"].form-control {
      -    line-height: 34px;
      -  }
      -  input[type="date"].input-sm,
      -  input[type="time"].input-sm,
      -  input[type="datetime-local"].input-sm,
      -  input[type="month"].input-sm,
      -  .input-group-sm input[type="date"],
      -  .input-group-sm input[type="time"],
      -  .input-group-sm input[type="datetime-local"],
      -  .input-group-sm input[type="month"] {
      -    line-height: 30px;
      -  }
      -  input[type="date"].input-lg,
      -  input[type="time"].input-lg,
      -  input[type="datetime-local"].input-lg,
      -  input[type="month"].input-lg,
      -  .input-group-lg input[type="date"],
      -  .input-group-lg input[type="time"],
      -  .input-group-lg input[type="datetime-local"],
      -  .input-group-lg input[type="month"] {
      -    line-height: 46px;
      -  }
      -}
      -.form-group {
      -  margin-bottom: 15px;
      -}
      -.radio,
      -.checkbox {
      -  position: relative;
      -  display: block;
      -  margin-top: 10px;
      -  margin-bottom: 10px;
      -}
      -.radio label,
      -.checkbox label {
      -  min-height: 20px;
      -  padding-left: 20px;
      -  margin-bottom: 0;
      -  font-weight: normal;
      -  cursor: pointer;
      -}
      -.radio input[type="radio"],
      -.radio-inline input[type="radio"],
      -.checkbox input[type="checkbox"],
      -.checkbox-inline input[type="checkbox"] {
      -  position: absolute;
      -  margin-top: 4px \9;
      -  margin-left: -20px;
      -}
      -.radio + .radio,
      -.checkbox + .checkbox {
      -  margin-top: -5px;
      -}
      -.radio-inline,
      -.checkbox-inline {
      -  position: relative;
      -  display: inline-block;
      -  padding-left: 20px;
      -  margin-bottom: 0;
      -  font-weight: normal;
      -  vertical-align: middle;
      -  cursor: pointer;
      -}
      -.radio-inline + .radio-inline,
      -.checkbox-inline + .checkbox-inline {
      -  margin-top: 0;
      -  margin-left: 10px;
      -}
      -input[type="radio"][disabled],
      -input[type="checkbox"][disabled],
      -input[type="radio"].disabled,
      -input[type="checkbox"].disabled,
      -fieldset[disabled] input[type="radio"],
      -fieldset[disabled] input[type="checkbox"] {
      -  cursor: not-allowed;
      -}
      -.radio-inline.disabled,
      -.checkbox-inline.disabled,
      -fieldset[disabled] .radio-inline,
      -fieldset[disabled] .checkbox-inline {
      -  cursor: not-allowed;
      -}
      -.radio.disabled label,
      -.checkbox.disabled label,
      -fieldset[disabled] .radio label,
      -fieldset[disabled] .checkbox label {
      -  cursor: not-allowed;
      -}
      -.form-control-static {
      -  min-height: 34px;
      -  padding-top: 7px;
      -  padding-bottom: 7px;
      -  margin-bottom: 0;
      -}
      -.form-control-static.input-lg,
      -.form-control-static.input-sm {
      -  padding-right: 0;
      -  padding-left: 0;
      -}
      -.input-sm {
      -  height: 30px;
      -  padding: 5px 10px;
      -  font-size: 12px;
      -  line-height: 1.5;
      -  border-radius: 3px;
      -}
      -select.input-sm {
      -  height: 30px;
      -  line-height: 30px;
      -}
      -textarea.input-sm,
      -select[multiple].input-sm {
      -  height: auto;
      -}
      -.form-group-sm .form-control {
      -  height: 30px;
      -  padding: 5px 10px;
      -  font-size: 12px;
      -  line-height: 1.5;
      -  border-radius: 3px;
      -}
      -.form-group-sm select.form-control {
      -  height: 30px;
      -  line-height: 30px;
      -}
      -.form-group-sm textarea.form-control,
      -.form-group-sm select[multiple].form-control {
      -  height: auto;
      -}
      -.form-group-sm .form-control-static {
      -  height: 30px;
      -  min-height: 32px;
      -  padding: 6px 10px;
      -  font-size: 12px;
      -  line-height: 1.5;
      -}
      -.input-lg {
      -  height: 46px;
      -  padding: 10px 16px;
      -  font-size: 18px;
      -  line-height: 1.3333333;
      -  border-radius: 6px;
      -}
      -select.input-lg {
      -  height: 46px;
      -  line-height: 46px;
      -}
      -textarea.input-lg,
      -select[multiple].input-lg {
      -  height: auto;
      -}
      -.form-group-lg .form-control {
      -  height: 46px;
      -  padding: 10px 16px;
      -  font-size: 18px;
      -  line-height: 1.3333333;
      -  border-radius: 6px;
      -}
      -.form-group-lg select.form-control {
      -  height: 46px;
      -  line-height: 46px;
      -}
      -.form-group-lg textarea.form-control,
      -.form-group-lg select[multiple].form-control {
      -  height: auto;
      -}
      -.form-group-lg .form-control-static {
      -  height: 46px;
      -  min-height: 38px;
      -  padding: 11px 16px;
      -  font-size: 18px;
      -  line-height: 1.3333333;
      -}
      -.has-feedback {
      -  position: relative;
      -}
      -.has-feedback .form-control {
      -  padding-right: 42.5px;
      -}
      -.form-control-feedback {
      -  position: absolute;
      -  top: 0;
      -  right: 0;
      -  z-index: 2;
      -  display: block;
      -  width: 34px;
      -  height: 34px;
      -  line-height: 34px;
      -  text-align: center;
      -  pointer-events: none;
      -}
      -.input-lg + .form-control-feedback,
      -.input-group-lg + .form-control-feedback,
      -.form-group-lg .form-control + .form-control-feedback {
      -  width: 46px;
      -  height: 46px;
      -  line-height: 46px;
      -}
      -.input-sm + .form-control-feedback,
      -.input-group-sm + .form-control-feedback,
      -.form-group-sm .form-control + .form-control-feedback {
      -  width: 30px;
      -  height: 30px;
      -  line-height: 30px;
      -}
      -.has-success .help-block,
      -.has-success .control-label,
      -.has-success .radio,
      -.has-success .checkbox,
      -.has-success .radio-inline,
      -.has-success .checkbox-inline,
      -.has-success.radio label,
      -.has-success.checkbox label,
      -.has-success.radio-inline label,
      -.has-success.checkbox-inline label {
      -  color: #3c763d;
      -}
      -.has-success .form-control {
      -  border-color: #3c763d;
      -  -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075);
      -          box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075);
      -}
      -.has-success .form-control:focus {
      -  border-color: #2b542c;
      -  -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 6px #67b168;
      -          box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 6px #67b168;
      -}
      -.has-success .input-group-addon {
      -  color: #3c763d;
      -  background-color: #dff0d8;
      -  border-color: #3c763d;
      -}
      -.has-success .form-control-feedback {
      -  color: #3c763d;
      -}
      -.has-warning .help-block,
      -.has-warning .control-label,
      -.has-warning .radio,
      -.has-warning .checkbox,
      -.has-warning .radio-inline,
      -.has-warning .checkbox-inline,
      -.has-warning.radio label,
      -.has-warning.checkbox label,
      -.has-warning.radio-inline label,
      -.has-warning.checkbox-inline label {
      -  color: #8a6d3b;
      -}
      -.has-warning .form-control {
      -  border-color: #8a6d3b;
      -  -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075);
      -          box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075);
      -}
      -.has-warning .form-control:focus {
      -  border-color: #66512c;
      -  -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 6px #c0a16b;
      -          box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 6px #c0a16b;
      -}
      -.has-warning .input-group-addon {
      -  color: #8a6d3b;
      -  background-color: #fcf8e3;
      -  border-color: #8a6d3b;
      -}
      -.has-warning .form-control-feedback {
      -  color: #8a6d3b;
      -}
      -.has-error .help-block,
      -.has-error .control-label,
      -.has-error .radio,
      -.has-error .checkbox,
      -.has-error .radio-inline,
      -.has-error .checkbox-inline,
      -.has-error.radio label,
      -.has-error.checkbox label,
      -.has-error.radio-inline label,
      -.has-error.checkbox-inline label {
      -  color: #a94442;
      -}
      -.has-error .form-control {
      -  border-color: #a94442;
      -  -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075);
      -          box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075);
      -}
      -.has-error .form-control:focus {
      -  border-color: #843534;
      -  -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 6px #ce8483;
      -          box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 6px #ce8483;
      -}
      -.has-error .input-group-addon {
      -  color: #a94442;
      -  background-color: #f2dede;
      -  border-color: #a94442;
      -}
      -.has-error .form-control-feedback {
      -  color: #a94442;
      -}
      -.has-feedback label ~ .form-control-feedback {
      -  top: 25px;
      -}
      -.has-feedback label.sr-only ~ .form-control-feedback {
      -  top: 0;
      -}
      -.help-block {
      -  display: block;
      -  margin-top: 5px;
      -  margin-bottom: 10px;
      -  color: #737373;
      -}
      -@media (min-width: 768px) {
      -  .form-inline .form-group {
      -    display: inline-block;
      -    margin-bottom: 0;
      -    vertical-align: middle;
      -  }
      -  .form-inline .form-control {
      -    display: inline-block;
      -    width: auto;
      -    vertical-align: middle;
      -  }
      -  .form-inline .form-control-static {
      -    display: inline-block;
      -  }
      -  .form-inline .input-group {
      -    display: inline-table;
      -    vertical-align: middle;
      -  }
      -  .form-inline .input-group .input-group-addon,
      -  .form-inline .input-group .input-group-btn,
      -  .form-inline .input-group .form-control {
      -    width: auto;
      -  }
      -  .form-inline .input-group > .form-control {
      -    width: 100%;
      -  }
      -  .form-inline .control-label {
      -    margin-bottom: 0;
      -    vertical-align: middle;
      -  }
      -  .form-inline .radio,
      -  .form-inline .checkbox {
      -    display: inline-block;
      -    margin-top: 0;
      -    margin-bottom: 0;
      -    vertical-align: middle;
      -  }
      -  .form-inline .radio label,
      -  .form-inline .checkbox label {
      -    padding-left: 0;
      -  }
      -  .form-inline .radio input[type="radio"],
      -  .form-inline .checkbox input[type="checkbox"] {
      -    position: relative;
      -    margin-left: 0;
      -  }
      -  .form-inline .has-feedback .form-control-feedback {
      -    top: 0;
      -  }
      -}
      -.form-horizontal .radio,
      -.form-horizontal .checkbox,
      -.form-horizontal .radio-inline,
      -.form-horizontal .checkbox-inline {
      -  padding-top: 7px;
      -  margin-top: 0;
      -  margin-bottom: 0;
      -}
      -.form-horizontal .radio,
      -.form-horizontal .checkbox {
      -  min-height: 27px;
      -}
      -.form-horizontal .form-group {
      -  margin-right: -15px;
      -  margin-left: -15px;
      -}
      -@media (min-width: 768px) {
      -  .form-horizontal .control-label {
      -    padding-top: 7px;
      -    margin-bottom: 0;
      -    text-align: right;
      -  }
      -}
      -.form-horizontal .has-feedback .form-control-feedback {
      -  right: 15px;
      -}
      -@media (min-width: 768px) {
      -  .form-horizontal .form-group-lg .control-label {
      -    padding-top: 11px;
      -    font-size: 18px;
      -  }
      -}
      -@media (min-width: 768px) {
      -  .form-horizontal .form-group-sm .control-label {
      -    padding-top: 6px;
      -    font-size: 12px;
      -  }
      -}
      -.btn {
      -  display: inline-block;
      -  padding: 6px 12px;
      -  margin-bottom: 0;
      -  font-size: 14px;
      -  font-weight: normal;
      -  line-height: 1.42857143;
      -  text-align: center;
      -  white-space: nowrap;
      -  vertical-align: middle;
      -  -ms-touch-action: manipulation;
      -      touch-action: manipulation;
      -  cursor: pointer;
      -  -webkit-user-select: none;
      -     -moz-user-select: none;
      -      -ms-user-select: none;
      -          user-select: none;
      -  background-image: none;
      -  border: 1px solid transparent;
      -  border-radius: 4px;
      -}
      -.btn:focus,
      -.btn:active:focus,
      -.btn.active:focus,
      -.btn.focus,
      -.btn:active.focus,
      -.btn.active.focus {
      -  outline: 5px auto -webkit-focus-ring-color;
      -  outline-offset: -2px;
      -}
      -.btn:hover,
      -.btn:focus,
      -.btn.focus {
      -  color: #333;
      -  text-decoration: none;
      -}
      -.btn:active,
      -.btn.active {
      -  background-image: none;
      -  outline: 0;
      -  -webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125);
      -          box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125);
      -}
      -.btn.disabled,
      -.btn[disabled],
      -fieldset[disabled] .btn {
      -  cursor: not-allowed;
      -  filter: alpha(opacity=65);
      -  -webkit-box-shadow: none;
      -          box-shadow: none;
      -  opacity: .65;
      -}
      -a.btn.disabled,
      -fieldset[disabled] a.btn {
      -  pointer-events: none;
      -}
      -.btn-default {
      -  color: #333;
      -  background-color: #fff;
      -  border-color: #ccc;
      -}
      -.btn-default:focus,
      -.btn-default.focus {
      -  color: #333;
      -  background-color: #e6e6e6;
      -  border-color: #8c8c8c;
      -}
      -.btn-default:hover {
      -  color: #333;
      -  background-color: #e6e6e6;
      -  border-color: #adadad;
      -}
      -.btn-default:active,
      -.btn-default.active,
      -.open > .dropdown-toggle.btn-default {
      -  color: #333;
      -  background-color: #e6e6e6;
      -  border-color: #adadad;
      -}
      -.btn-default:active:hover,
      -.btn-default.active:hover,
      -.open > .dropdown-toggle.btn-default:hover,
      -.btn-default:active:focus,
      -.btn-default.active:focus,
      -.open > .dropdown-toggle.btn-default:focus,
      -.btn-default:active.focus,
      -.btn-default.active.focus,
      -.open > .dropdown-toggle.btn-default.focus {
      -  color: #333;
      -  background-color: #d4d4d4;
      -  border-color: #8c8c8c;
      -}
      -.btn-default:active,
      -.btn-default.active,
      -.open > .dropdown-toggle.btn-default {
      -  background-image: none;
      -}
      -.btn-default.disabled:hover,
      -.btn-default[disabled]:hover,
      -fieldset[disabled] .btn-default:hover,
      -.btn-default.disabled:focus,
      -.btn-default[disabled]:focus,
      -fieldset[disabled] .btn-default:focus,
      -.btn-default.disabled.focus,
      -.btn-default[disabled].focus,
      -fieldset[disabled] .btn-default.focus {
      -  background-color: #fff;
      -  border-color: #ccc;
      -}
      -.btn-default .badge {
      -  color: #fff;
      -  background-color: #333;
      -}
      -.btn-primary {
      -  color: #fff;
      -  background-color: #337ab7;
      -  border-color: #2e6da4;
      -}
      -.btn-primary:focus,
      -.btn-primary.focus {
      -  color: #fff;
      -  background-color: #286090;
      -  border-color: #122b40;
      -}
      -.btn-primary:hover {
      -  color: #fff;
      -  background-color: #286090;
      -  border-color: #204d74;
      -}
      -.btn-primary:active,
      -.btn-primary.active,
      -.open > .dropdown-toggle.btn-primary {
      -  color: #fff;
      -  background-color: #286090;
      -  border-color: #204d74;
      -}
      -.btn-primary:active:hover,
      -.btn-primary.active:hover,
      -.open > .dropdown-toggle.btn-primary:hover,
      -.btn-primary:active:focus,
      -.btn-primary.active:focus,
      -.open > .dropdown-toggle.btn-primary:focus,
      -.btn-primary:active.focus,
      -.btn-primary.active.focus,
      -.open > .dropdown-toggle.btn-primary.focus {
      -  color: #fff;
      -  background-color: #204d74;
      -  border-color: #122b40;
      -}
      -.btn-primary:active,
      -.btn-primary.active,
      -.open > .dropdown-toggle.btn-primary {
      -  background-image: none;
      -}
      -.btn-primary.disabled:hover,
      -.btn-primary[disabled]:hover,
      -fieldset[disabled] .btn-primary:hover,
      -.btn-primary.disabled:focus,
      -.btn-primary[disabled]:focus,
      -fieldset[disabled] .btn-primary:focus,
      -.btn-primary.disabled.focus,
      -.btn-primary[disabled].focus,
      -fieldset[disabled] .btn-primary.focus {
      -  background-color: #337ab7;
      -  border-color: #2e6da4;
      -}
      -.btn-primary .badge {
      -  color: #337ab7;
      -  background-color: #fff;
      -}
      -.btn-success {
      -  color: #fff;
      -  background-color: #5cb85c;
      -  border-color: #4cae4c;
      -}
      -.btn-success:focus,
      -.btn-success.focus {
      -  color: #fff;
      -  background-color: #449d44;
      -  border-color: #255625;
      -}
      -.btn-success:hover {
      -  color: #fff;
      -  background-color: #449d44;
      -  border-color: #398439;
      -}
      -.btn-success:active,
      -.btn-success.active,
      -.open > .dropdown-toggle.btn-success {
      -  color: #fff;
      -  background-color: #449d44;
      -  border-color: #398439;
      -}
      -.btn-success:active:hover,
      -.btn-success.active:hover,
      -.open > .dropdown-toggle.btn-success:hover,
      -.btn-success:active:focus,
      -.btn-success.active:focus,
      -.open > .dropdown-toggle.btn-success:focus,
      -.btn-success:active.focus,
      -.btn-success.active.focus,
      -.open > .dropdown-toggle.btn-success.focus {
      -  color: #fff;
      -  background-color: #398439;
      -  border-color: #255625;
      -}
      -.btn-success:active,
      -.btn-success.active,
      -.open > .dropdown-toggle.btn-success {
      -  background-image: none;
      -}
      -.btn-success.disabled:hover,
      -.btn-success[disabled]:hover,
      -fieldset[disabled] .btn-success:hover,
      -.btn-success.disabled:focus,
      -.btn-success[disabled]:focus,
      -fieldset[disabled] .btn-success:focus,
      -.btn-success.disabled.focus,
      -.btn-success[disabled].focus,
      -fieldset[disabled] .btn-success.focus {
      -  background-color: #5cb85c;
      -  border-color: #4cae4c;
      -}
      -.btn-success .badge {
      -  color: #5cb85c;
      -  background-color: #fff;
      -}
      -.btn-info {
      -  color: #fff;
      -  background-color: #5bc0de;
      -  border-color: #46b8da;
      -}
      -.btn-info:focus,
      -.btn-info.focus {
      -  color: #fff;
      -  background-color: #31b0d5;
      -  border-color: #1b6d85;
      -}
      -.btn-info:hover {
      -  color: #fff;
      -  background-color: #31b0d5;
      -  border-color: #269abc;
      -}
      -.btn-info:active,
      -.btn-info.active,
      -.open > .dropdown-toggle.btn-info {
      -  color: #fff;
      -  background-color: #31b0d5;
      -  border-color: #269abc;
      -}
      -.btn-info:active:hover,
      -.btn-info.active:hover,
      -.open > .dropdown-toggle.btn-info:hover,
      -.btn-info:active:focus,
      -.btn-info.active:focus,
      -.open > .dropdown-toggle.btn-info:focus,
      -.btn-info:active.focus,
      -.btn-info.active.focus,
      -.open > .dropdown-toggle.btn-info.focus {
      -  color: #fff;
      -  background-color: #269abc;
      -  border-color: #1b6d85;
      -}
      -.btn-info:active,
      -.btn-info.active,
      -.open > .dropdown-toggle.btn-info {
      -  background-image: none;
      -}
      -.btn-info.disabled:hover,
      -.btn-info[disabled]:hover,
      -fieldset[disabled] .btn-info:hover,
      -.btn-info.disabled:focus,
      -.btn-info[disabled]:focus,
      -fieldset[disabled] .btn-info:focus,
      -.btn-info.disabled.focus,
      -.btn-info[disabled].focus,
      -fieldset[disabled] .btn-info.focus {
      -  background-color: #5bc0de;
      -  border-color: #46b8da;
      -}
      -.btn-info .badge {
      -  color: #5bc0de;
      -  background-color: #fff;
      -}
      -.btn-warning {
      -  color: #fff;
      -  background-color: #f0ad4e;
      -  border-color: #eea236;
      -}
      -.btn-warning:focus,
      -.btn-warning.focus {
      -  color: #fff;
      -  background-color: #ec971f;
      -  border-color: #985f0d;
      -}
      -.btn-warning:hover {
      -  color: #fff;
      -  background-color: #ec971f;
      -  border-color: #d58512;
      -}
      -.btn-warning:active,
      -.btn-warning.active,
      -.open > .dropdown-toggle.btn-warning {
      -  color: #fff;
      -  background-color: #ec971f;
      -  border-color: #d58512;
      -}
      -.btn-warning:active:hover,
      -.btn-warning.active:hover,
      -.open > .dropdown-toggle.btn-warning:hover,
      -.btn-warning:active:focus,
      -.btn-warning.active:focus,
      -.open > .dropdown-toggle.btn-warning:focus,
      -.btn-warning:active.focus,
      -.btn-warning.active.focus,
      -.open > .dropdown-toggle.btn-warning.focus {
      -  color: #fff;
      -  background-color: #d58512;
      -  border-color: #985f0d;
      -}
      -.btn-warning:active,
      -.btn-warning.active,
      -.open > .dropdown-toggle.btn-warning {
      -  background-image: none;
      -}
      -.btn-warning.disabled:hover,
      -.btn-warning[disabled]:hover,
      -fieldset[disabled] .btn-warning:hover,
      -.btn-warning.disabled:focus,
      -.btn-warning[disabled]:focus,
      -fieldset[disabled] .btn-warning:focus,
      -.btn-warning.disabled.focus,
      -.btn-warning[disabled].focus,
      -fieldset[disabled] .btn-warning.focus {
      -  background-color: #f0ad4e;
      -  border-color: #eea236;
      -}
      -.btn-warning .badge {
      -  color: #f0ad4e;
      -  background-color: #fff;
      -}
      -.btn-danger {
      -  color: #fff;
      -  background-color: #d9534f;
      -  border-color: #d43f3a;
      -}
      -.btn-danger:focus,
      -.btn-danger.focus {
      -  color: #fff;
      -  background-color: #c9302c;
      -  border-color: #761c19;
      -}
      -.btn-danger:hover {
      -  color: #fff;
      -  background-color: #c9302c;
      -  border-color: #ac2925;
      -}
      -.btn-danger:active,
      -.btn-danger.active,
      -.open > .dropdown-toggle.btn-danger {
      -  color: #fff;
      -  background-color: #c9302c;
      -  border-color: #ac2925;
      -}
      -.btn-danger:active:hover,
      -.btn-danger.active:hover,
      -.open > .dropdown-toggle.btn-danger:hover,
      -.btn-danger:active:focus,
      -.btn-danger.active:focus,
      -.open > .dropdown-toggle.btn-danger:focus,
      -.btn-danger:active.focus,
      -.btn-danger.active.focus,
      -.open > .dropdown-toggle.btn-danger.focus {
      -  color: #fff;
      -  background-color: #ac2925;
      -  border-color: #761c19;
      -}
      -.btn-danger:active,
      -.btn-danger.active,
      -.open > .dropdown-toggle.btn-danger {
      -  background-image: none;
      -}
      -.btn-danger.disabled:hover,
      -.btn-danger[disabled]:hover,
      -fieldset[disabled] .btn-danger:hover,
      -.btn-danger.disabled:focus,
      -.btn-danger[disabled]:focus,
      -fieldset[disabled] .btn-danger:focus,
      -.btn-danger.disabled.focus,
      -.btn-danger[disabled].focus,
      -fieldset[disabled] .btn-danger.focus {
      -  background-color: #d9534f;
      -  border-color: #d43f3a;
      -}
      -.btn-danger .badge {
      -  color: #d9534f;
      -  background-color: #fff;
      -}
      -.btn-link {
      -  font-weight: normal;
      -  color: #337ab7;
      -  border-radius: 0;
      -}
      -.btn-link,
      -.btn-link:active,
      -.btn-link.active,
      -.btn-link[disabled],
      -fieldset[disabled] .btn-link {
      -  background-color: transparent;
      -  -webkit-box-shadow: none;
      -          box-shadow: none;
      -}
      -.btn-link,
      -.btn-link:hover,
      -.btn-link:focus,
      -.btn-link:active {
      -  border-color: transparent;
      -}
      -.btn-link:hover,
      -.btn-link:focus {
      -  color: #23527c;
      -  text-decoration: underline;
      -  background-color: transparent;
      -}
      -.btn-link[disabled]:hover,
      -fieldset[disabled] .btn-link:hover,
      -.btn-link[disabled]:focus,
      -fieldset[disabled] .btn-link:focus {
      -  color: #777;
      -  text-decoration: none;
      -}
      -.btn-lg,
      -.btn-group-lg > .btn {
      -  padding: 10px 16px;
      -  font-size: 18px;
      -  line-height: 1.3333333;
      -  border-radius: 6px;
      -}
      -.btn-sm,
      -.btn-group-sm > .btn {
      -  padding: 5px 10px;
      -  font-size: 12px;
      -  line-height: 1.5;
      -  border-radius: 3px;
      -}
      -.btn-xs,
      -.btn-group-xs > .btn {
      -  padding: 1px 5px;
      -  font-size: 12px;
      -  line-height: 1.5;
      -  border-radius: 3px;
      -}
      -.btn-block {
      -  display: block;
      -  width: 100%;
      -}
      -.btn-block + .btn-block {
      -  margin-top: 5px;
      -}
      -input[type="submit"].btn-block,
      -input[type="reset"].btn-block,
      -input[type="button"].btn-block {
      -  width: 100%;
      -}
      -.fade {
      -  opacity: 0;
      -  -webkit-transition: opacity .15s linear;
      -       -o-transition: opacity .15s linear;
      -          transition: opacity .15s linear;
      -}
      -.fade.in {
      -  opacity: 1;
      -}
      -.collapse {
      -  display: none;
      -}
      -.collapse.in {
      -  display: block;
      -}
      -tr.collapse.in {
      -  display: table-row;
      -}
      -tbody.collapse.in {
      -  display: table-row-group;
      -}
      -.collapsing {
      -  position: relative;
      -  height: 0;
      -  overflow: hidden;
      -  -webkit-transition-timing-function: ease;
      -       -o-transition-timing-function: ease;
      -          transition-timing-function: ease;
      -  -webkit-transition-duration: .35s;
      -       -o-transition-duration: .35s;
      -          transition-duration: .35s;
      -  -webkit-transition-property: height, visibility;
      -       -o-transition-property: height, visibility;
      -          transition-property: height, visibility;
      -}
      -.caret {
      -  display: inline-block;
      -  width: 0;
      -  height: 0;
      -  margin-left: 2px;
      -  vertical-align: middle;
      -  border-top: 4px dashed;
      -  border-top: 4px solid \9;
      -  border-right: 4px solid transparent;
      -  border-left: 4px solid transparent;
      -}
      -.dropup,
      -.dropdown {
      -  position: relative;
      -}
      -.dropdown-toggle:focus {
      -  outline: 0;
      -}
      -.dropdown-menu {
      -  position: absolute;
      -  top: 100%;
      -  left: 0;
      -  z-index: 1000;
      -  display: none;
      -  float: left;
      -  min-width: 160px;
      -  padding: 5px 0;
      -  margin: 2px 0 0;
      -  font-size: 14px;
      -  text-align: left;
      -  list-style: none;
      -  background-color: #fff;
      -  -webkit-background-clip: padding-box;
      -          background-clip: padding-box;
      -  border: 1px solid #ccc;
      -  border: 1px solid rgba(0, 0, 0, .15);
      -  border-radius: 4px;
      -  -webkit-box-shadow: 0 6px 12px rgba(0, 0, 0, .175);
      -          box-shadow: 0 6px 12px rgba(0, 0, 0, .175);
      -}
      -.dropdown-menu.pull-right {
      -  right: 0;
      -  left: auto;
      -}
      -.dropdown-menu .divider {
      -  height: 1px;
      -  margin: 9px 0;
      -  overflow: hidden;
      -  background-color: #e5e5e5;
      -}
      -.dropdown-menu > li > a {
      -  display: block;
      -  padding: 3px 20px;
      -  clear: both;
      -  font-weight: normal;
      -  line-height: 1.42857143;
      -  color: #333;
      -  white-space: nowrap;
      -}
      -.dropdown-menu > li > a:hover,
      -.dropdown-menu > li > a:focus {
      -  color: #262626;
      -  text-decoration: none;
      -  background-color: #f5f5f5;
      -}
      -.dropdown-menu > .active > a,
      -.dropdown-menu > .active > a:hover,
      -.dropdown-menu > .active > a:focus {
      -  color: #fff;
      -  text-decoration: none;
      -  background-color: #337ab7;
      -  outline: 0;
      -}
      -.dropdown-menu > .disabled > a,
      -.dropdown-menu > .disabled > a:hover,
      -.dropdown-menu > .disabled > a:focus {
      -  color: #777;
      -}
      -.dropdown-menu > .disabled > a:hover,
      -.dropdown-menu > .disabled > a:focus {
      -  text-decoration: none;
      -  cursor: not-allowed;
      -  background-color: transparent;
      -  background-image: none;
      -  filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
      -}
      -.open > .dropdown-menu {
      -  display: block;
      -}
      -.open > a {
      -  outline: 0;
      -}
      -.dropdown-menu-right {
      -  right: 0;
      -  left: auto;
      -}
      -.dropdown-menu-left {
      -  right: auto;
      -  left: 0;
      -}
      -.dropdown-header {
      -  display: block;
      -  padding: 3px 20px;
      -  font-size: 12px;
      -  line-height: 1.42857143;
      -  color: #777;
      -  white-space: nowrap;
      -}
      -.dropdown-backdrop {
      -  position: fixed;
      -  top: 0;
      -  right: 0;
      -  bottom: 0;
      -  left: 0;
      -  z-index: 990;
      -}
      -.pull-right > .dropdown-menu {
      -  right: 0;
      -  left: auto;
      -}
      -.dropup .caret,
      -.navbar-fixed-bottom .dropdown .caret {
      -  content: "";
      -  border-top: 0;
      -  border-bottom: 4px dashed;
      -  border-bottom: 4px solid \9;
      -}
      -.dropup .dropdown-menu,
      -.navbar-fixed-bottom .dropdown .dropdown-menu {
      -  top: auto;
      -  bottom: 100%;
      -  margin-bottom: 2px;
      -}
      -@media (min-width: 768px) {
      -  .navbar-right .dropdown-menu {
      -    right: 0;
      -    left: auto;
      -  }
      -  .navbar-right .dropdown-menu-left {
      -    right: auto;
      -    left: 0;
      -  }
      -}
      -.btn-group,
      -.btn-group-vertical {
      -  position: relative;
      -  display: inline-block;
      -  vertical-align: middle;
      -}
      -.btn-group > .btn,
      -.btn-group-vertical > .btn {
      -  position: relative;
      -  float: left;
      -}
      -.btn-group > .btn:hover,
      -.btn-group-vertical > .btn:hover,
      -.btn-group > .btn:focus,
      -.btn-group-vertical > .btn:focus,
      -.btn-group > .btn:active,
      -.btn-group-vertical > .btn:active,
      -.btn-group > .btn.active,
      -.btn-group-vertical > .btn.active {
      -  z-index: 2;
      -}
      -.btn-group .btn + .btn,
      -.btn-group .btn + .btn-group,
      -.btn-group .btn-group + .btn,
      -.btn-group .btn-group + .btn-group {
      -  margin-left: -1px;
      -}
      -.btn-toolbar {
      -  margin-left: -5px;
      -}
      -.btn-toolbar .btn,
      -.btn-toolbar .btn-group,
      -.btn-toolbar .input-group {
      -  float: left;
      -}
      -.btn-toolbar > .btn,
      -.btn-toolbar > .btn-group,
      -.btn-toolbar > .input-group {
      -  margin-left: 5px;
      -}
      -.btn-group > .btn:not(:first-child):not(:last-child):not(.dropdown-toggle) {
      -  border-radius: 0;
      -}
      -.btn-group > .btn:first-child {
      -  margin-left: 0;
      -}
      -.btn-group > .btn:first-child:not(:last-child):not(.dropdown-toggle) {
      -  border-top-right-radius: 0;
      -  border-bottom-right-radius: 0;
      -}
      -.btn-group > .btn:last-child:not(:first-child),
      -.btn-group > .dropdown-toggle:not(:first-child) {
      -  border-top-left-radius: 0;
      -  border-bottom-left-radius: 0;
      -}
      -.btn-group > .btn-group {
      -  float: left;
      -}
      -.btn-group > .btn-group:not(:first-child):not(:last-child) > .btn {
      -  border-radius: 0;
      -}
      -.btn-group > .btn-group:first-child:not(:last-child) > .btn:last-child,
      -.btn-group > .btn-group:first-child:not(:last-child) > .dropdown-toggle {
      -  border-top-right-radius: 0;
      -  border-bottom-right-radius: 0;
      -}
      -.btn-group > .btn-group:last-child:not(:first-child) > .btn:first-child {
      -  border-top-left-radius: 0;
      -  border-bottom-left-radius: 0;
      -}
      -.btn-group .dropdown-toggle:active,
      -.btn-group.open .dropdown-toggle {
      -  outline: 0;
      -}
      -.btn-group > .btn + .dropdown-toggle {
      -  padding-right: 8px;
      -  padding-left: 8px;
      -}
      -.btn-group > .btn-lg + .dropdown-toggle {
      -  padding-right: 12px;
      -  padding-left: 12px;
      -}
      -.btn-group.open .dropdown-toggle {
      -  -webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125);
      -          box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125);
      -}
      -.btn-group.open .dropdown-toggle.btn-link {
      -  -webkit-box-shadow: none;
      -          box-shadow: none;
      -}
      -.btn .caret {
      -  margin-left: 0;
      -}
      -.btn-lg .caret {
      -  border-width: 5px 5px 0;
      -  border-bottom-width: 0;
      -}
      -.dropup .btn-lg .caret {
      -  border-width: 0 5px 5px;
      -}
      -.btn-group-vertical > .btn,
      -.btn-group-vertical > .btn-group,
      -.btn-group-vertical > .btn-group > .btn {
      -  display: block;
      -  float: none;
      -  width: 100%;
      -  max-width: 100%;
      -}
      -.btn-group-vertical > .btn-group > .btn {
      -  float: none;
      -}
      -.btn-group-vertical > .btn + .btn,
      -.btn-group-vertical > .btn + .btn-group,
      -.btn-group-vertical > .btn-group + .btn,
      -.btn-group-vertical > .btn-group + .btn-group {
      -  margin-top: -1px;
      -  margin-left: 0;
      -}
      -.btn-group-vertical > .btn:not(:first-child):not(:last-child) {
      -  border-radius: 0;
      -}
      -.btn-group-vertical > .btn:first-child:not(:last-child) {
      -  border-top-left-radius: 4px;
      -  border-top-right-radius: 4px;
      -  border-bottom-right-radius: 0;
      -  border-bottom-left-radius: 0;
      -}
      -.btn-group-vertical > .btn:last-child:not(:first-child) {
      -  border-top-left-radius: 0;
      -  border-top-right-radius: 0;
      -  border-bottom-right-radius: 4px;
      -  border-bottom-left-radius: 4px;
      -}
      -.btn-group-vertical > .btn-group:not(:first-child):not(:last-child) > .btn {
      -  border-radius: 0;
      -}
      -.btn-group-vertical > .btn-group:first-child:not(:last-child) > .btn:last-child,
      -.btn-group-vertical > .btn-group:first-child:not(:last-child) > .dropdown-toggle {
      -  border-bottom-right-radius: 0;
      -  border-bottom-left-radius: 0;
      -}
      -.btn-group-vertical > .btn-group:last-child:not(:first-child) > .btn:first-child {
      -  border-top-left-radius: 0;
      -  border-top-right-radius: 0;
      -}
      -.btn-group-justified {
      -  display: table;
      -  width: 100%;
      -  table-layout: fixed;
      -  border-collapse: separate;
      -}
      -.btn-group-justified > .btn,
      -.btn-group-justified > .btn-group {
      -  display: table-cell;
      -  float: none;
      -  width: 1%;
      -}
      -.btn-group-justified > .btn-group .btn {
      -  width: 100%;
      -}
      -.btn-group-justified > .btn-group .dropdown-menu {
      -  left: auto;
      -}
      -[data-toggle="buttons"] > .btn input[type="radio"],
      -[data-toggle="buttons"] > .btn-group > .btn input[type="radio"],
      -[data-toggle="buttons"] > .btn input[type="checkbox"],
      -[data-toggle="buttons"] > .btn-group > .btn input[type="checkbox"] {
      -  position: absolute;
      -  clip: rect(0, 0, 0, 0);
      -  pointer-events: none;
      -}
      -.input-group {
      -  position: relative;
      -  display: table;
      -  border-collapse: separate;
      -}
      -.input-group[class*="col-"] {
      -  float: none;
      -  padding-right: 0;
      -  padding-left: 0;
      -}
      -.input-group .form-control {
      -  position: relative;
      -  z-index: 2;
      -  float: left;
      -  width: 100%;
      -  margin-bottom: 0;
      -}
      -.input-group .form-control:focus {
      -  z-index: 3;
      -}
      -.input-group-lg > .form-control,
      -.input-group-lg > .input-group-addon,
      -.input-group-lg > .input-group-btn > .btn {
      -  height: 46px;
      -  padding: 10px 16px;
      -  font-size: 18px;
      -  line-height: 1.3333333;
      -  border-radius: 6px;
      -}
      -select.input-group-lg > .form-control,
      -select.input-group-lg > .input-group-addon,
      -select.input-group-lg > .input-group-btn > .btn {
      -  height: 46px;
      -  line-height: 46px;
      -}
      -textarea.input-group-lg > .form-control,
      -textarea.input-group-lg > .input-group-addon,
      -textarea.input-group-lg > .input-group-btn > .btn,
      -select[multiple].input-group-lg > .form-control,
      -select[multiple].input-group-lg > .input-group-addon,
      -select[multiple].input-group-lg > .input-group-btn > .btn {
      -  height: auto;
      -}
      -.input-group-sm > .form-control,
      -.input-group-sm > .input-group-addon,
      -.input-group-sm > .input-group-btn > .btn {
      -  height: 30px;
      -  padding: 5px 10px;
      -  font-size: 12px;
      -  line-height: 1.5;
      -  border-radius: 3px;
      -}
      -select.input-group-sm > .form-control,
      -select.input-group-sm > .input-group-addon,
      -select.input-group-sm > .input-group-btn > .btn {
      -  height: 30px;
      -  line-height: 30px;
      -}
      -textarea.input-group-sm > .form-control,
      -textarea.input-group-sm > .input-group-addon,
      -textarea.input-group-sm > .input-group-btn > .btn,
      -select[multiple].input-group-sm > .form-control,
      -select[multiple].input-group-sm > .input-group-addon,
      -select[multiple].input-group-sm > .input-group-btn > .btn {
      -  height: auto;
      -}
      -.input-group-addon,
      -.input-group-btn,
      -.input-group .form-control {
      -  display: table-cell;
      -}
      -.input-group-addon:not(:first-child):not(:last-child),
      -.input-group-btn:not(:first-child):not(:last-child),
      -.input-group .form-control:not(:first-child):not(:last-child) {
      -  border-radius: 0;
      -}
      -.input-group-addon,
      -.input-group-btn {
      -  width: 1%;
      -  white-space: nowrap;
      -  vertical-align: middle;
      -}
      -.input-group-addon {
      -  padding: 6px 12px;
      -  font-size: 14px;
      -  font-weight: normal;
      -  line-height: 1;
      -  color: #555;
      -  text-align: center;
      -  background-color: #eee;
      -  border: 1px solid #ccc;
      -  border-radius: 4px;
      -}
      -.input-group-addon.input-sm {
      -  padding: 5px 10px;
      -  font-size: 12px;
      -  border-radius: 3px;
      -}
      -.input-group-addon.input-lg {
      -  padding: 10px 16px;
      -  font-size: 18px;
      -  border-radius: 6px;
      -}
      -.input-group-addon input[type="radio"],
      -.input-group-addon input[type="checkbox"] {
      -  margin-top: 0;
      -}
      -.input-group .form-control:first-child,
      -.input-group-addon:first-child,
      -.input-group-btn:first-child > .btn,
      -.input-group-btn:first-child > .btn-group > .btn,
      -.input-group-btn:first-child > .dropdown-toggle,
      -.input-group-btn:last-child > .btn:not(:last-child):not(.dropdown-toggle),
      -.input-group-btn:last-child > .btn-group:not(:last-child) > .btn {
      -  border-top-right-radius: 0;
      -  border-bottom-right-radius: 0;
      -}
      -.input-group-addon:first-child {
      -  border-right: 0;
      -}
      -.input-group .form-control:last-child,
      -.input-group-addon:last-child,
      -.input-group-btn:last-child > .btn,
      -.input-group-btn:last-child > .btn-group > .btn,
      -.input-group-btn:last-child > .dropdown-toggle,
      -.input-group-btn:first-child > .btn:not(:first-child),
      -.input-group-btn:first-child > .btn-group:not(:first-child) > .btn {
      -  border-top-left-radius: 0;
      -  border-bottom-left-radius: 0;
      -}
      -.input-group-addon:last-child {
      -  border-left: 0;
      -}
      -.input-group-btn {
      -  position: relative;
      -  font-size: 0;
      -  white-space: nowrap;
      -}
      -.input-group-btn > .btn {
      -  position: relative;
      -}
      -.input-group-btn > .btn + .btn {
      -  margin-left: -1px;
      -}
      -.input-group-btn > .btn:hover,
      -.input-group-btn > .btn:focus,
      -.input-group-btn > .btn:active {
      -  z-index: 2;
      -}
      -.input-group-btn:first-child > .btn,
      -.input-group-btn:first-child > .btn-group {
      -  margin-right: -1px;
      -}
      -.input-group-btn:last-child > .btn,
      -.input-group-btn:last-child > .btn-group {
      -  z-index: 2;
      -  margin-left: -1px;
      -}
      -.nav {
      -  padding-left: 0;
      -  margin-bottom: 0;
      -  list-style: none;
      -}
      -.nav > li {
      -  position: relative;
      -  display: block;
      -}
      -.nav > li > a {
      -  position: relative;
      -  display: block;
      -  padding: 10px 15px;
      -}
      -.nav > li > a:hover,
      -.nav > li > a:focus {
      -  text-decoration: none;
      -  background-color: #eee;
      -}
      -.nav > li.disabled > a {
      -  color: #777;
      -}
      -.nav > li.disabled > a:hover,
      -.nav > li.disabled > a:focus {
      -  color: #777;
      -  text-decoration: none;
      -  cursor: not-allowed;
      -  background-color: transparent;
      -}
      -.nav .open > a,
      -.nav .open > a:hover,
      -.nav .open > a:focus {
      -  background-color: #eee;
      -  border-color: #337ab7;
      -}
      -.nav .nav-divider {
      -  height: 1px;
      -  margin: 9px 0;
      -  overflow: hidden;
      -  background-color: #e5e5e5;
      -}
      -.nav > li > a > img {
      -  max-width: none;
      -}
      -.nav-tabs {
      -  border-bottom: 1px solid #ddd;
      -}
      -.nav-tabs > li {
      -  float: left;
      -  margin-bottom: -1px;
      -}
      -.nav-tabs > li > a {
      -  margin-right: 2px;
      -  line-height: 1.42857143;
      -  border: 1px solid transparent;
      -  border-radius: 4px 4px 0 0;
      -}
      -.nav-tabs > li > a:hover {
      -  border-color: #eee #eee #ddd;
      -}
      -.nav-tabs > li.active > a,
      -.nav-tabs > li.active > a:hover,
      -.nav-tabs > li.active > a:focus {
      -  color: #555;
      -  cursor: default;
      -  background-color: #fff;
      -  border: 1px solid #ddd;
      -  border-bottom-color: transparent;
      -}
      -.nav-tabs.nav-justified {
      -  width: 100%;
      -  border-bottom: 0;
      -}
      -.nav-tabs.nav-justified > li {
      -  float: none;
      -}
      -.nav-tabs.nav-justified > li > a {
      -  margin-bottom: 5px;
      -  text-align: center;
      -}
      -.nav-tabs.nav-justified > .dropdown .dropdown-menu {
      -  top: auto;
      -  left: auto;
      -}
      -@media (min-width: 768px) {
      -  .nav-tabs.nav-justified > li {
      -    display: table-cell;
      -    width: 1%;
      -  }
      -  .nav-tabs.nav-justified > li > a {
      -    margin-bottom: 0;
      -  }
      -}
      -.nav-tabs.nav-justified > li > a {
      -  margin-right: 0;
      -  border-radius: 4px;
      -}
      -.nav-tabs.nav-justified > .active > a,
      -.nav-tabs.nav-justified > .active > a:hover,
      -.nav-tabs.nav-justified > .active > a:focus {
      -  border: 1px solid #ddd;
      -}
      -@media (min-width: 768px) {
      -  .nav-tabs.nav-justified > li > a {
      -    border-bottom: 1px solid #ddd;
      -    border-radius: 4px 4px 0 0;
      -  }
      -  .nav-tabs.nav-justified > .active > a,
      -  .nav-tabs.nav-justified > .active > a:hover,
      -  .nav-tabs.nav-justified > .active > a:focus {
      -    border-bottom-color: #fff;
      -  }
      -}
      -.nav-pills > li {
      -  float: left;
      -}
      -.nav-pills > li > a {
      -  border-radius: 4px;
      -}
      -.nav-pills > li + li {
      -  margin-left: 2px;
      -}
      -.nav-pills > li.active > a,
      -.nav-pills > li.active > a:hover,
      -.nav-pills > li.active > a:focus {
      -  color: #fff;
      -  background-color: #337ab7;
      -}
      -.nav-stacked > li {
      -  float: none;
      -}
      -.nav-stacked > li + li {
      -  margin-top: 2px;
      -  margin-left: 0;
      -}
      -.nav-justified {
      -  width: 100%;
      -}
      -.nav-justified > li {
      -  float: none;
      -}
      -.nav-justified > li > a {
      -  margin-bottom: 5px;
      -  text-align: center;
      -}
      -.nav-justified > .dropdown .dropdown-menu {
      -  top: auto;
      -  left: auto;
      -}
      -@media (min-width: 768px) {
      -  .nav-justified > li {
      -    display: table-cell;
      -    width: 1%;
      -  }
      -  .nav-justified > li > a {
      -    margin-bottom: 0;
      -  }
      -}
      -.nav-tabs-justified {
      -  border-bottom: 0;
      -}
      -.nav-tabs-justified > li > a {
      -  margin-right: 0;
      -  border-radius: 4px;
      -}
      -.nav-tabs-justified > .active > a,
      -.nav-tabs-justified > .active > a:hover,
      -.nav-tabs-justified > .active > a:focus {
      -  border: 1px solid #ddd;
      -}
      -@media (min-width: 768px) {
      -  .nav-tabs-justified > li > a {
      -    border-bottom: 1px solid #ddd;
      -    border-radius: 4px 4px 0 0;
      -  }
      -  .nav-tabs-justified > .active > a,
      -  .nav-tabs-justified > .active > a:hover,
      -  .nav-tabs-justified > .active > a:focus {
      -    border-bottom-color: #fff;
      -  }
      -}
      -.tab-content > .tab-pane {
      -  display: none;
      -}
      -.tab-content > .active {
      -  display: block;
      -}
      -.nav-tabs .dropdown-menu {
      -  margin-top: -1px;
      -  border-top-left-radius: 0;
      -  border-top-right-radius: 0;
      -}
      -.navbar {
      -  position: relative;
      -  min-height: 50px;
      -  margin-bottom: 20px;
      -  border: 1px solid transparent;
      -}
      -@media (min-width: 768px) {
      -  .navbar {
      -    border-radius: 4px;
      -  }
      -}
      -@media (min-width: 768px) {
      -  .navbar-header {
      -    float: left;
      -  }
      -}
      -.navbar-collapse {
      -  padding-right: 15px;
      -  padding-left: 15px;
      -  overflow-x: visible;
      -  -webkit-overflow-scrolling: touch;
      -  border-top: 1px solid transparent;
      -  -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1);
      -          box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1);
      -}
      -.navbar-collapse.in {
      -  overflow-y: auto;
      -}
      -@media (min-width: 768px) {
      -  .navbar-collapse {
      -    width: auto;
      -    border-top: 0;
      -    -webkit-box-shadow: none;
      -            box-shadow: none;
      -  }
      -  .navbar-collapse.collapse {
      -    display: block !important;
      -    height: auto !important;
      -    padding-bottom: 0;
      -    overflow: visible !important;
      -  }
      -  .navbar-collapse.in {
      -    overflow-y: visible;
      -  }
      -  .navbar-fixed-top .navbar-collapse,
      -  .navbar-static-top .navbar-collapse,
      -  .navbar-fixed-bottom .navbar-collapse {
      -    padding-right: 0;
      -    padding-left: 0;
      -  }
      -}
      -.navbar-fixed-top .navbar-collapse,
      -.navbar-fixed-bottom .navbar-collapse {
      -  max-height: 340px;
      -}
      -@media (max-device-width: 480px) and (orientation: landscape) {
      -  .navbar-fixed-top .navbar-collapse,
      -  .navbar-fixed-bottom .navbar-collapse {
      -    max-height: 200px;
      -  }
      -}
      -.container > .navbar-header,
      -.container-fluid > .navbar-header,
      -.container > .navbar-collapse,
      -.container-fluid > .navbar-collapse {
      -  margin-right: -15px;
      -  margin-left: -15px;
      -}
      -@media (min-width: 768px) {
      -  .container > .navbar-header,
      -  .container-fluid > .navbar-header,
      -  .container > .navbar-collapse,
      -  .container-fluid > .navbar-collapse {
      -    margin-right: 0;
      -    margin-left: 0;
      -  }
      -}
      -.navbar-static-top {
      -  z-index: 1000;
      -  border-width: 0 0 1px;
      -}
      -@media (min-width: 768px) {
      -  .navbar-static-top {
      -    border-radius: 0;
      -  }
      -}
      -.navbar-fixed-top,
      -.navbar-fixed-bottom {
      -  position: fixed;
      -  right: 0;
      -  left: 0;
      -  z-index: 1030;
      -}
      -@media (min-width: 768px) {
      -  .navbar-fixed-top,
      -  .navbar-fixed-bottom {
      -    border-radius: 0;
      -  }
      -}
      -.navbar-fixed-top {
      -  top: 0;
      -  border-width: 0 0 1px;
      -}
      -.navbar-fixed-bottom {
      -  bottom: 0;
      -  margin-bottom: 0;
      -  border-width: 1px 0 0;
      -}
      -.navbar-brand {
      -  float: left;
      -  height: 50px;
      -  padding: 15px 15px;
      -  font-size: 18px;
      -  line-height: 20px;
      -}
      -.navbar-brand:hover,
      -.navbar-brand:focus {
      -  text-decoration: none;
      -}
      -.navbar-brand > img {
      -  display: block;
      -}
      -@media (min-width: 768px) {
      -  .navbar > .container .navbar-brand,
      -  .navbar > .container-fluid .navbar-brand {
      -    margin-left: -15px;
      -  }
      -}
      -.navbar-toggle {
      -  position: relative;
      -  float: right;
      -  padding: 9px 10px;
      -  margin-top: 8px;
      -  margin-right: 15px;
      -  margin-bottom: 8px;
      -  background-color: transparent;
      -  background-image: none;
      -  border: 1px solid transparent;
      -  border-radius: 4px;
      -}
      -.navbar-toggle:focus {
      -  outline: 0;
      -}
      -.navbar-toggle .icon-bar {
      -  display: block;
      -  width: 22px;
      -  height: 2px;
      -  border-radius: 1px;
      -}
      -.navbar-toggle .icon-bar + .icon-bar {
      -  margin-top: 4px;
      -}
      -@media (min-width: 768px) {
      -  .navbar-toggle {
      -    display: none;
      -  }
      -}
      -.navbar-nav {
      -  margin: 7.5px -15px;
      -}
      -.navbar-nav > li > a {
      -  padding-top: 10px;
      -  padding-bottom: 10px;
      -  line-height: 20px;
      -}
      -@media (max-width: 767px) {
      -  .navbar-nav .open .dropdown-menu {
      -    position: static;
      -    float: none;
      -    width: auto;
      -    margin-top: 0;
      -    background-color: transparent;
      -    border: 0;
      -    -webkit-box-shadow: none;
      -            box-shadow: none;
      -  }
      -  .navbar-nav .open .dropdown-menu > li > a,
      -  .navbar-nav .open .dropdown-menu .dropdown-header {
      -    padding: 5px 15px 5px 25px;
      -  }
      -  .navbar-nav .open .dropdown-menu > li > a {
      -    line-height: 20px;
      -  }
      -  .navbar-nav .open .dropdown-menu > li > a:hover,
      -  .navbar-nav .open .dropdown-menu > li > a:focus {
      -    background-image: none;
      -  }
      -}
      -@media (min-width: 768px) {
      -  .navbar-nav {
      -    float: left;
      -    margin: 0;
      -  }
      -  .navbar-nav > li {
      -    float: left;
      -  }
      -  .navbar-nav > li > a {
      -    padding-top: 15px;
      -    padding-bottom: 15px;
      -  }
      -}
      -.navbar-form {
      -  padding: 10px 15px;
      -  margin-top: 8px;
      -  margin-right: -15px;
      -  margin-bottom: 8px;
      -  margin-left: -15px;
      -  border-top: 1px solid transparent;
      -  border-bottom: 1px solid transparent;
      -  -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1), 0 1px 0 rgba(255, 255, 255, .1);
      -          box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1), 0 1px 0 rgba(255, 255, 255, .1);
      -}
      -@media (min-width: 768px) {
      -  .navbar-form .form-group {
      -    display: inline-block;
      -    margin-bottom: 0;
      -    vertical-align: middle;
      -  }
      -  .navbar-form .form-control {
      -    display: inline-block;
      -    width: auto;
      -    vertical-align: middle;
      -  }
      -  .navbar-form .form-control-static {
      -    display: inline-block;
      -  }
      -  .navbar-form .input-group {
      -    display: inline-table;
      -    vertical-align: middle;
      -  }
      -  .navbar-form .input-group .input-group-addon,
      -  .navbar-form .input-group .input-group-btn,
      -  .navbar-form .input-group .form-control {
      -    width: auto;
      -  }
      -  .navbar-form .input-group > .form-control {
      -    width: 100%;
      -  }
      -  .navbar-form .control-label {
      -    margin-bottom: 0;
      -    vertical-align: middle;
      -  }
      -  .navbar-form .radio,
      -  .navbar-form .checkbox {
      -    display: inline-block;
      -    margin-top: 0;
      -    margin-bottom: 0;
      -    vertical-align: middle;
      -  }
      -  .navbar-form .radio label,
      -  .navbar-form .checkbox label {
      -    padding-left: 0;
      -  }
      -  .navbar-form .radio input[type="radio"],
      -  .navbar-form .checkbox input[type="checkbox"] {
      -    position: relative;
      -    margin-left: 0;
      -  }
      -  .navbar-form .has-feedback .form-control-feedback {
      -    top: 0;
      -  }
      -}
      -@media (max-width: 767px) {
      -  .navbar-form .form-group {
      -    margin-bottom: 5px;
      -  }
      -  .navbar-form .form-group:last-child {
      -    margin-bottom: 0;
      -  }
      -}
      -@media (min-width: 768px) {
      -  .navbar-form {
      -    width: auto;
      -    padding-top: 0;
      -    padding-bottom: 0;
      -    margin-right: 0;
      -    margin-left: 0;
      -    border: 0;
      -    -webkit-box-shadow: none;
      -            box-shadow: none;
      -  }
      -}
      -.navbar-nav > li > .dropdown-menu {
      -  margin-top: 0;
      -  border-top-left-radius: 0;
      -  border-top-right-radius: 0;
      -}
      -.navbar-fixed-bottom .navbar-nav > li > .dropdown-menu {
      -  margin-bottom: 0;
      -  border-top-left-radius: 4px;
      -  border-top-right-radius: 4px;
      -  border-bottom-right-radius: 0;
      -  border-bottom-left-radius: 0;
      -}
      -.navbar-btn {
      -  margin-top: 8px;
      -  margin-bottom: 8px;
      -}
      -.navbar-btn.btn-sm {
      -  margin-top: 10px;
      -  margin-bottom: 10px;
      -}
      -.navbar-btn.btn-xs {
      -  margin-top: 14px;
      -  margin-bottom: 14px;
      -}
      -.navbar-text {
      -  margin-top: 15px;
      -  margin-bottom: 15px;
      -}
      -@media (min-width: 768px) {
      -  .navbar-text {
      -    float: left;
      -    margin-right: 15px;
      -    margin-left: 15px;
      -  }
      -}
      -@media (min-width: 768px) {
      -  .navbar-left {
      -    float: left !important;
      -  }
      -  .navbar-right {
      -    float: right !important;
      -    margin-right: -15px;
      -  }
      -  .navbar-right ~ .navbar-right {
      -    margin-right: 0;
      -  }
      -}
      -.navbar-default {
      -  background-color: #f8f8f8;
      -  border-color: #e7e7e7;
      -}
      -.navbar-default .navbar-brand {
      -  color: #777;
      -}
      -.navbar-default .navbar-brand:hover,
      -.navbar-default .navbar-brand:focus {
      -  color: #5e5e5e;
      -  background-color: transparent;
      -}
      -.navbar-default .navbar-text {
      -  color: #777;
      -}
      -.navbar-default .navbar-nav > li > a {
      -  color: #777;
      -}
      -.navbar-default .navbar-nav > li > a:hover,
      -.navbar-default .navbar-nav > li > a:focus {
      -  color: #333;
      -  background-color: transparent;
      -}
      -.navbar-default .navbar-nav > .active > a,
      -.navbar-default .navbar-nav > .active > a:hover,
      -.navbar-default .navbar-nav > .active > a:focus {
      -  color: #555;
      -  background-color: #e7e7e7;
      -}
      -.navbar-default .navbar-nav > .disabled > a,
      -.navbar-default .navbar-nav > .disabled > a:hover,
      -.navbar-default .navbar-nav > .disabled > a:focus {
      -  color: #ccc;
      -  background-color: transparent;
      -}
      -.navbar-default .navbar-toggle {
      -  border-color: #ddd;
      -}
      -.navbar-default .navbar-toggle:hover,
      -.navbar-default .navbar-toggle:focus {
      -  background-color: #ddd;
      -}
      -.navbar-default .navbar-toggle .icon-bar {
      -  background-color: #888;
      -}
      -.navbar-default .navbar-collapse,
      -.navbar-default .navbar-form {
      -  border-color: #e7e7e7;
      -}
      -.navbar-default .navbar-nav > .open > a,
      -.navbar-default .navbar-nav > .open > a:hover,
      -.navbar-default .navbar-nav > .open > a:focus {
      -  color: #555;
      -  background-color: #e7e7e7;
      -}
      -@media (max-width: 767px) {
      -  .navbar-default .navbar-nav .open .dropdown-menu > li > a {
      -    color: #777;
      -  }
      -  .navbar-default .navbar-nav .open .dropdown-menu > li > a:hover,
      -  .navbar-default .navbar-nav .open .dropdown-menu > li > a:focus {
      -    color: #333;
      -    background-color: transparent;
      -  }
      -  .navbar-default .navbar-nav .open .dropdown-menu > .active > a,
      -  .navbar-default .navbar-nav .open .dropdown-menu > .active > a:hover,
      -  .navbar-default .navbar-nav .open .dropdown-menu > .active > a:focus {
      -    color: #555;
      -    background-color: #e7e7e7;
      -  }
      -  .navbar-default .navbar-nav .open .dropdown-menu > .disabled > a,
      -  .navbar-default .navbar-nav .open .dropdown-menu > .disabled > a:hover,
      -  .navbar-default .navbar-nav .open .dropdown-menu > .disabled > a:focus {
      -    color: #ccc;
      -    background-color: transparent;
      -  }
      -}
      -.navbar-default .navbar-link {
      -  color: #777;
      -}
      -.navbar-default .navbar-link:hover {
      -  color: #333;
      -}
      -.navbar-default .btn-link {
      -  color: #777;
      -}
      -.navbar-default .btn-link:hover,
      -.navbar-default .btn-link:focus {
      -  color: #333;
      -}
      -.navbar-default .btn-link[disabled]:hover,
      -fieldset[disabled] .navbar-default .btn-link:hover,
      -.navbar-default .btn-link[disabled]:focus,
      -fieldset[disabled] .navbar-default .btn-link:focus {
      -  color: #ccc;
      -}
      -.navbar-inverse {
      -  background-color: #222;
      -  border-color: #080808;
      -}
      -.navbar-inverse .navbar-brand {
      -  color: #9d9d9d;
      -}
      -.navbar-inverse .navbar-brand:hover,
      -.navbar-inverse .navbar-brand:focus {
      -  color: #fff;
      -  background-color: transparent;
      -}
      -.navbar-inverse .navbar-text {
      -  color: #9d9d9d;
      -}
      -.navbar-inverse .navbar-nav > li > a {
      -  color: #9d9d9d;
      -}
      -.navbar-inverse .navbar-nav > li > a:hover,
      -.navbar-inverse .navbar-nav > li > a:focus {
      -  color: #fff;
      -  background-color: transparent;
      -}
      -.navbar-inverse .navbar-nav > .active > a,
      -.navbar-inverse .navbar-nav > .active > a:hover,
      -.navbar-inverse .navbar-nav > .active > a:focus {
      -  color: #fff;
      -  background-color: #080808;
      -}
      -.navbar-inverse .navbar-nav > .disabled > a,
      -.navbar-inverse .navbar-nav > .disabled > a:hover,
      -.navbar-inverse .navbar-nav > .disabled > a:focus {
      -  color: #444;
      -  background-color: transparent;
      -}
      -.navbar-inverse .navbar-toggle {
      -  border-color: #333;
      -}
      -.navbar-inverse .navbar-toggle:hover,
      -.navbar-inverse .navbar-toggle:focus {
      -  background-color: #333;
      -}
      -.navbar-inverse .navbar-toggle .icon-bar {
      -  background-color: #fff;
      -}
      -.navbar-inverse .navbar-collapse,
      -.navbar-inverse .navbar-form {
      -  border-color: #101010;
      -}
      -.navbar-inverse .navbar-nav > .open > a,
      -.navbar-inverse .navbar-nav > .open > a:hover,
      -.navbar-inverse .navbar-nav > .open > a:focus {
      -  color: #fff;
      -  background-color: #080808;
      -}
      -@media (max-width: 767px) {
      -  .navbar-inverse .navbar-nav .open .dropdown-menu > .dropdown-header {
      -    border-color: #080808;
      -  }
      -  .navbar-inverse .navbar-nav .open .dropdown-menu .divider {
      -    background-color: #080808;
      -  }
      -  .navbar-inverse .navbar-nav .open .dropdown-menu > li > a {
      -    color: #9d9d9d;
      -  }
      -  .navbar-inverse .navbar-nav .open .dropdown-menu > li > a:hover,
      -  .navbar-inverse .navbar-nav .open .dropdown-menu > li > a:focus {
      -    color: #fff;
      -    background-color: transparent;
      -  }
      -  .navbar-inverse .navbar-nav .open .dropdown-menu > .active > a,
      -  .navbar-inverse .navbar-nav .open .dropdown-menu > .active > a:hover,
      -  .navbar-inverse .navbar-nav .open .dropdown-menu > .active > a:focus {
      -    color: #fff;
      -    background-color: #080808;
      -  }
      -  .navbar-inverse .navbar-nav .open .dropdown-menu > .disabled > a,
      -  .navbar-inverse .navbar-nav .open .dropdown-menu > .disabled > a:hover,
      -  .navbar-inverse .navbar-nav .open .dropdown-menu > .disabled > a:focus {
      -    color: #444;
      -    background-color: transparent;
      -  }
      -}
      -.navbar-inverse .navbar-link {
      -  color: #9d9d9d;
      -}
      -.navbar-inverse .navbar-link:hover {
      -  color: #fff;
      -}
      -.navbar-inverse .btn-link {
      -  color: #9d9d9d;
      -}
      -.navbar-inverse .btn-link:hover,
      -.navbar-inverse .btn-link:focus {
      -  color: #fff;
      -}
      -.navbar-inverse .btn-link[disabled]:hover,
      -fieldset[disabled] .navbar-inverse .btn-link:hover,
      -.navbar-inverse .btn-link[disabled]:focus,
      -fieldset[disabled] .navbar-inverse .btn-link:focus {
      -  color: #444;
      -}
      -.breadcrumb {
      -  padding: 8px 15px;
      -  margin-bottom: 20px;
      -  list-style: none;
      -  background-color: #f5f5f5;
      -  border-radius: 4px;
      -}
      -.breadcrumb > li {
      -  display: inline-block;
      -}
      -.breadcrumb > li + li:before {
      -  padding: 0 5px;
      -  color: #ccc;
      -  content: "/\00a0";
      -}
      -.breadcrumb > .active {
      -  color: #777;
      -}
      -.pagination {
      -  display: inline-block;
      -  padding-left: 0;
      -  margin: 20px 0;
      -  border-radius: 4px;
      -}
      -.pagination > li {
      -  display: inline;
      -}
      -.pagination > li > a,
      -.pagination > li > span {
      -  position: relative;
      -  float: left;
      -  padding: 6px 12px;
      -  margin-left: -1px;
      -  line-height: 1.42857143;
      -  color: #337ab7;
      -  text-decoration: none;
      -  background-color: #fff;
      -  border: 1px solid #ddd;
      -}
      -.pagination > li:first-child > a,
      -.pagination > li:first-child > span {
      -  margin-left: 0;
      -  border-top-left-radius: 4px;
      -  border-bottom-left-radius: 4px;
      -}
      -.pagination > li:last-child > a,
      -.pagination > li:last-child > span {
      -  border-top-right-radius: 4px;
      -  border-bottom-right-radius: 4px;
      -}
      -.pagination > li > a:hover,
      -.pagination > li > span:hover,
      -.pagination > li > a:focus,
      -.pagination > li > span:focus {
      -  z-index: 2;
      -  color: #23527c;
      -  background-color: #eee;
      -  border-color: #ddd;
      -}
      -.pagination > .active > a,
      -.pagination > .active > span,
      -.pagination > .active > a:hover,
      -.pagination > .active > span:hover,
      -.pagination > .active > a:focus,
      -.pagination > .active > span:focus {
      -  z-index: 3;
      -  color: #fff;
      -  cursor: default;
      -  background-color: #337ab7;
      -  border-color: #337ab7;
      -}
      -.pagination > .disabled > span,
      -.pagination > .disabled > span:hover,
      -.pagination > .disabled > span:focus,
      -.pagination > .disabled > a,
      -.pagination > .disabled > a:hover,
      -.pagination > .disabled > a:focus {
      -  color: #777;
      -  cursor: not-allowed;
      -  background-color: #fff;
      -  border-color: #ddd;
      -}
      -.pagination-lg > li > a,
      -.pagination-lg > li > span {
      -  padding: 10px 16px;
      -  font-size: 18px;
      -  line-height: 1.3333333;
      -}
      -.pagination-lg > li:first-child > a,
      -.pagination-lg > li:first-child > span {
      -  border-top-left-radius: 6px;
      -  border-bottom-left-radius: 6px;
      -}
      -.pagination-lg > li:last-child > a,
      -.pagination-lg > li:last-child > span {
      -  border-top-right-radius: 6px;
      -  border-bottom-right-radius: 6px;
      -}
      -.pagination-sm > li > a,
      -.pagination-sm > li > span {
      -  padding: 5px 10px;
      -  font-size: 12px;
      -  line-height: 1.5;
      -}
      -.pagination-sm > li:first-child > a,
      -.pagination-sm > li:first-child > span {
      -  border-top-left-radius: 3px;
      -  border-bottom-left-radius: 3px;
      -}
      -.pagination-sm > li:last-child > a,
      -.pagination-sm > li:last-child > span {
      -  border-top-right-radius: 3px;
      -  border-bottom-right-radius: 3px;
      -}
      -.pager {
      -  padding-left: 0;
      -  margin: 20px 0;
      -  text-align: center;
      -  list-style: none;
      -}
      -.pager li {
      -  display: inline;
      -}
      -.pager li > a,
      -.pager li > span {
      -  display: inline-block;
      -  padding: 5px 14px;
      -  background-color: #fff;
      -  border: 1px solid #ddd;
      -  border-radius: 15px;
      -}
      -.pager li > a:hover,
      -.pager li > a:focus {
      -  text-decoration: none;
      -  background-color: #eee;
      -}
      -.pager .next > a,
      -.pager .next > span {
      -  float: right;
      -}
      -.pager .previous > a,
      -.pager .previous > span {
      -  float: left;
      -}
      -.pager .disabled > a,
      -.pager .disabled > a:hover,
      -.pager .disabled > a:focus,
      -.pager .disabled > span {
      -  color: #777;
      -  cursor: not-allowed;
      -  background-color: #fff;
      -}
      -.label {
      -  display: inline;
      -  padding: .2em .6em .3em;
      -  font-size: 75%;
      -  font-weight: bold;
      -  line-height: 1;
      -  color: #fff;
      -  text-align: center;
      -  white-space: nowrap;
      -  vertical-align: baseline;
      -  border-radius: .25em;
      -}
      -a.label:hover,
      -a.label:focus {
      -  color: #fff;
      -  text-decoration: none;
      -  cursor: pointer;
      -}
      -.label:empty {
      -  display: none;
      -}
      -.btn .label {
      -  position: relative;
      -  top: -1px;
      -}
      -.label-default {
      -  background-color: #777;
      -}
      -.label-default[href]:hover,
      -.label-default[href]:focus {
      -  background-color: #5e5e5e;
      -}
      -.label-primary {
      -  background-color: #337ab7;
      -}
      -.label-primary[href]:hover,
      -.label-primary[href]:focus {
      -  background-color: #286090;
      -}
      -.label-success {
      -  background-color: #5cb85c;
      -}
      -.label-success[href]:hover,
      -.label-success[href]:focus {
      -  background-color: #449d44;
      -}
      -.label-info {
      -  background-color: #5bc0de;
      -}
      -.label-info[href]:hover,
      -.label-info[href]:focus {
      -  background-color: #31b0d5;
      -}
      -.label-warning {
      -  background-color: #f0ad4e;
      -}
      -.label-warning[href]:hover,
      -.label-warning[href]:focus {
      -  background-color: #ec971f;
      -}
      -.label-danger {
      -  background-color: #d9534f;
      -}
      -.label-danger[href]:hover,
      -.label-danger[href]:focus {
      -  background-color: #c9302c;
      -}
      -.badge {
      -  display: inline-block;
      -  min-width: 10px;
      -  padding: 3px 7px;
      -  font-size: 12px;
      -  font-weight: bold;
      -  line-height: 1;
      -  color: #fff;
      -  text-align: center;
      -  white-space: nowrap;
      -  vertical-align: middle;
      -  background-color: #777;
      -  border-radius: 10px;
      -}
      -.badge:empty {
      -  display: none;
      -}
      -.btn .badge {
      -  position: relative;
      -  top: -1px;
      -}
      -.btn-xs .badge,
      -.btn-group-xs > .btn .badge {
      -  top: 0;
      -  padding: 1px 5px;
      -}
      -a.badge:hover,
      -a.badge:focus {
      -  color: #fff;
      -  text-decoration: none;
      -  cursor: pointer;
      -}
      -.list-group-item.active > .badge,
      -.nav-pills > .active > a > .badge {
      -  color: #337ab7;
      -  background-color: #fff;
      -}
      -.list-group-item > .badge {
      -  float: right;
      -}
      -.list-group-item > .badge + .badge {
      -  margin-right: 5px;
      -}
      -.nav-pills > li > a > .badge {
      -  margin-left: 3px;
      -}
      -.jumbotron {
      -  padding-top: 30px;
      -  padding-bottom: 30px;
      -  margin-bottom: 30px;
      -  color: inherit;
      -  background-color: #eee;
      -}
      -.jumbotron h1,
      -.jumbotron .h1 {
      -  color: inherit;
      -}
      -.jumbotron p {
      -  margin-bottom: 15px;
      -  font-size: 21px;
      -  font-weight: 200;
      -}
      -.jumbotron > hr {
      -  border-top-color: #d5d5d5;
      -}
      -.container .jumbotron,
      -.container-fluid .jumbotron {
      -  padding-right: 15px;
      -  padding-left: 15px;
      -  border-radius: 6px;
      -}
      -.jumbotron .container {
      -  max-width: 100%;
      -}
      -@media screen and (min-width: 768px) {
      -  .jumbotron {
      -    padding-top: 48px;
      -    padding-bottom: 48px;
      -  }
      -  .container .jumbotron,
      -  .container-fluid .jumbotron {
      -    padding-right: 60px;
      -    padding-left: 60px;
      -  }
      -  .jumbotron h1,
      -  .jumbotron .h1 {
      -    font-size: 63px;
      -  }
      -}
      -.thumbnail {
      -  display: block;
      -  padding: 4px;
      -  margin-bottom: 20px;
      -  line-height: 1.42857143;
      -  background-color: #fff;
      -  border: 1px solid #ddd;
      -  border-radius: 4px;
      -  -webkit-transition: border .2s ease-in-out;
      -       -o-transition: border .2s ease-in-out;
      -          transition: border .2s ease-in-out;
      -}
      -.thumbnail > img,
      -.thumbnail a > img {
      -  margin-right: auto;
      -  margin-left: auto;
      -}
      -a.thumbnail:hover,
      -a.thumbnail:focus,
      -a.thumbnail.active {
      -  border-color: #337ab7;
      -}
      -.thumbnail .caption {
      -  padding: 9px;
      -  color: #333;
      -}
      -.alert {
      -  padding: 15px;
      -  margin-bottom: 20px;
      -  border: 1px solid transparent;
      -  border-radius: 4px;
      -}
      -.alert h4 {
      -  margin-top: 0;
      -  color: inherit;
      -}
      -.alert .alert-link {
      -  font-weight: bold;
      -}
      -.alert > p,
      -.alert > ul {
      -  margin-bottom: 0;
      -}
      -.alert > p + p {
      -  margin-top: 5px;
      -}
      -.alert-dismissable,
      -.alert-dismissible {
      -  padding-right: 35px;
      -}
      -.alert-dismissable .close,
      -.alert-dismissible .close {
      -  position: relative;
      -  top: -2px;
      -  right: -21px;
      -  color: inherit;
      -}
      -.alert-success {
      -  color: #3c763d;
      -  background-color: #dff0d8;
      -  border-color: #d6e9c6;
      -}
      -.alert-success hr {
      -  border-top-color: #c9e2b3;
      -}
      -.alert-success .alert-link {
      -  color: #2b542c;
      -}
      -.alert-info {
      -  color: #31708f;
      -  background-color: #d9edf7;
      -  border-color: #bce8f1;
      -}
      -.alert-info hr {
      -  border-top-color: #a6e1ec;
      -}
      -.alert-info .alert-link {
      -  color: #245269;
      -}
      -.alert-warning {
      -  color: #8a6d3b;
      -  background-color: #fcf8e3;
      -  border-color: #faebcc;
      -}
      -.alert-warning hr {
      -  border-top-color: #f7e1b5;
      -}
      -.alert-warning .alert-link {
      -  color: #66512c;
      -}
      -.alert-danger {
      -  color: #a94442;
      -  background-color: #f2dede;
      -  border-color: #ebccd1;
      -}
      -.alert-danger hr {
      -  border-top-color: #e4b9c0;
      -}
      -.alert-danger .alert-link {
      -  color: #843534;
      -}
      -@-webkit-keyframes progress-bar-stripes {
      -  from {
      -    background-position: 40px 0;
      -  }
      -  to {
      -    background-position: 0 0;
      -  }
      -}
      -@-o-keyframes progress-bar-stripes {
      -  from {
      -    background-position: 40px 0;
      -  }
      -  to {
      -    background-position: 0 0;
      -  }
      -}
      -@keyframes progress-bar-stripes {
      -  from {
      -    background-position: 40px 0;
      -  }
      -  to {
      -    background-position: 0 0;
      -  }
      -}
      -.progress {
      -  height: 20px;
      -  margin-bottom: 20px;
      -  overflow: hidden;
      -  background-color: #f5f5f5;
      -  border-radius: 4px;
      -  -webkit-box-shadow: inset 0 1px 2px rgba(0, 0, 0, .1);
      -          box-shadow: inset 0 1px 2px rgba(0, 0, 0, .1);
      -}
      -.progress-bar {
      -  float: left;
      -  width: 0;
      -  height: 100%;
      -  font-size: 12px;
      -  line-height: 20px;
      -  color: #fff;
      -  text-align: center;
      -  background-color: #337ab7;
      -  -webkit-box-shadow: inset 0 -1px 0 rgba(0, 0, 0, .15);
      -          box-shadow: inset 0 -1px 0 rgba(0, 0, 0, .15);
      -  -webkit-transition: width .6s ease;
      -       -o-transition: width .6s ease;
      -          transition: width .6s ease;
      -}
      -.progress-striped .progress-bar,
      -.progress-bar-striped {
      -  background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);
      -  background-image:      -o-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);
      -  background-image:         linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);
      -  -webkit-background-size: 40px 40px;
      -          background-size: 40px 40px;
      -}
      -.progress.active .progress-bar,
      -.progress-bar.active {
      -  -webkit-animation: progress-bar-stripes 2s linear infinite;
      -       -o-animation: progress-bar-stripes 2s linear infinite;
      -          animation: progress-bar-stripes 2s linear infinite;
      -}
      -.progress-bar-success {
      -  background-color: #5cb85c;
      -}
      -.progress-striped .progress-bar-success {
      -  background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);
      -  background-image:      -o-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);
      -  background-image:         linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);
      -}
      -.progress-bar-info {
      -  background-color: #5bc0de;
      -}
      -.progress-striped .progress-bar-info {
      -  background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);
      -  background-image:      -o-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);
      -  background-image:         linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);
      -}
      -.progress-bar-warning {
      -  background-color: #f0ad4e;
      -}
      -.progress-striped .progress-bar-warning {
      -  background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);
      -  background-image:      -o-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);
      -  background-image:         linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);
      -}
      -.progress-bar-danger {
      -  background-color: #d9534f;
      -}
      -.progress-striped .progress-bar-danger {
      -  background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);
      -  background-image:      -o-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);
      -  background-image:         linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);
      -}
      -.media {
      -  margin-top: 15px;
      -}
      -.media:first-child {
      -  margin-top: 0;
      -}
      -.media,
      -.media-body {
      -  overflow: hidden;
      -  zoom: 1;
      -}
      -.media-body {
      -  width: 10000px;
      -}
      -.media-object {
      -  display: block;
      -}
      -.media-object.img-thumbnail {
      -  max-width: none;
      -}
      -.media-right,
      -.media > .pull-right {
      -  padding-left: 10px;
      -}
      -.media-left,
      -.media > .pull-left {
      -  padding-right: 10px;
      -}
      -.media-left,
      -.media-right,
      -.media-body {
      -  display: table-cell;
      -  vertical-align: top;
      -}
      -.media-middle {
      -  vertical-align: middle;
      -}
      -.media-bottom {
      -  vertical-align: bottom;
      -}
      -.media-heading {
      -  margin-top: 0;
      -  margin-bottom: 5px;
      -}
      -.media-list {
      -  padding-left: 0;
      -  list-style: none;
      -}
      -.list-group {
      -  padding-left: 0;
      -  margin-bottom: 20px;
      -}
      -.list-group-item {
      -  position: relative;
      -  display: block;
      -  padding: 10px 15px;
      -  margin-bottom: -1px;
      -  background-color: #fff;
      -  border: 1px solid #ddd;
      -}
      -.list-group-item:first-child {
      -  border-top-left-radius: 4px;
      -  border-top-right-radius: 4px;
      -}
      -.list-group-item:last-child {
      -  margin-bottom: 0;
      -  border-bottom-right-radius: 4px;
      -  border-bottom-left-radius: 4px;
      -}
      -a.list-group-item,
      -button.list-group-item {
      -  color: #555;
      -}
      -a.list-group-item .list-group-item-heading,
      -button.list-group-item .list-group-item-heading {
      -  color: #333;
      -}
      -a.list-group-item:hover,
      -button.list-group-item:hover,
      -a.list-group-item:focus,
      -button.list-group-item:focus {
      -  color: #555;
      -  text-decoration: none;
      -  background-color: #f5f5f5;
      -}
      -button.list-group-item {
      -  width: 100%;
      -  text-align: left;
      -}
      -.list-group-item.disabled,
      -.list-group-item.disabled:hover,
      -.list-group-item.disabled:focus {
      -  color: #777;
      -  cursor: not-allowed;
      -  background-color: #eee;
      -}
      -.list-group-item.disabled .list-group-item-heading,
      -.list-group-item.disabled:hover .list-group-item-heading,
      -.list-group-item.disabled:focus .list-group-item-heading {
      -  color: inherit;
      -}
      -.list-group-item.disabled .list-group-item-text,
      -.list-group-item.disabled:hover .list-group-item-text,
      -.list-group-item.disabled:focus .list-group-item-text {
      -  color: #777;
      -}
      -.list-group-item.active,
      -.list-group-item.active:hover,
      -.list-group-item.active:focus {
      -  z-index: 2;
      -  color: #fff;
      -  background-color: #337ab7;
      -  border-color: #337ab7;
      -}
      -.list-group-item.active .list-group-item-heading,
      -.list-group-item.active:hover .list-group-item-heading,
      -.list-group-item.active:focus .list-group-item-heading,
      -.list-group-item.active .list-group-item-heading > small,
      -.list-group-item.active:hover .list-group-item-heading > small,
      -.list-group-item.active:focus .list-group-item-heading > small,
      -.list-group-item.active .list-group-item-heading > .small,
      -.list-group-item.active:hover .list-group-item-heading > .small,
      -.list-group-item.active:focus .list-group-item-heading > .small {
      -  color: inherit;
      -}
      -.list-group-item.active .list-group-item-text,
      -.list-group-item.active:hover .list-group-item-text,
      -.list-group-item.active:focus .list-group-item-text {
      -  color: #c7ddef;
      -}
      -.list-group-item-success {
      -  color: #3c763d;
      -  background-color: #dff0d8;
      -}
      -a.list-group-item-success,
      -button.list-group-item-success {
      -  color: #3c763d;
      -}
      -a.list-group-item-success .list-group-item-heading,
      -button.list-group-item-success .list-group-item-heading {
      -  color: inherit;
      -}
      -a.list-group-item-success:hover,
      -button.list-group-item-success:hover,
      -a.list-group-item-success:focus,
      -button.list-group-item-success:focus {
      -  color: #3c763d;
      -  background-color: #d0e9c6;
      -}
      -a.list-group-item-success.active,
      -button.list-group-item-success.active,
      -a.list-group-item-success.active:hover,
      -button.list-group-item-success.active:hover,
      -a.list-group-item-success.active:focus,
      -button.list-group-item-success.active:focus {
      -  color: #fff;
      -  background-color: #3c763d;
      -  border-color: #3c763d;
      -}
      -.list-group-item-info {
      -  color: #31708f;
      -  background-color: #d9edf7;
      -}
      -a.list-group-item-info,
      -button.list-group-item-info {
      -  color: #31708f;
      -}
      -a.list-group-item-info .list-group-item-heading,
      -button.list-group-item-info .list-group-item-heading {
      -  color: inherit;
      -}
      -a.list-group-item-info:hover,
      -button.list-group-item-info:hover,
      -a.list-group-item-info:focus,
      -button.list-group-item-info:focus {
      -  color: #31708f;
      -  background-color: #c4e3f3;
      -}
      -a.list-group-item-info.active,
      -button.list-group-item-info.active,
      -a.list-group-item-info.active:hover,
      -button.list-group-item-info.active:hover,
      -a.list-group-item-info.active:focus,
      -button.list-group-item-info.active:focus {
      -  color: #fff;
      -  background-color: #31708f;
      -  border-color: #31708f;
      -}
      -.list-group-item-warning {
      -  color: #8a6d3b;
      -  background-color: #fcf8e3;
      -}
      -a.list-group-item-warning,
      -button.list-group-item-warning {
      -  color: #8a6d3b;
      -}
      -a.list-group-item-warning .list-group-item-heading,
      -button.list-group-item-warning .list-group-item-heading {
      -  color: inherit;
      -}
      -a.list-group-item-warning:hover,
      -button.list-group-item-warning:hover,
      -a.list-group-item-warning:focus,
      -button.list-group-item-warning:focus {
      -  color: #8a6d3b;
      -  background-color: #faf2cc;
      -}
      -a.list-group-item-warning.active,
      -button.list-group-item-warning.active,
      -a.list-group-item-warning.active:hover,
      -button.list-group-item-warning.active:hover,
      -a.list-group-item-warning.active:focus,
      -button.list-group-item-warning.active:focus {
      -  color: #fff;
      -  background-color: #8a6d3b;
      -  border-color: #8a6d3b;
      -}
      -.list-group-item-danger {
      -  color: #a94442;
      -  background-color: #f2dede;
      -}
      -a.list-group-item-danger,
      -button.list-group-item-danger {
      -  color: #a94442;
      -}
      -a.list-group-item-danger .list-group-item-heading,
      -button.list-group-item-danger .list-group-item-heading {
      -  color: inherit;
      -}
      -a.list-group-item-danger:hover,
      -button.list-group-item-danger:hover,
      -a.list-group-item-danger:focus,
      -button.list-group-item-danger:focus {
      -  color: #a94442;
      -  background-color: #ebcccc;
      -}
      -a.list-group-item-danger.active,
      -button.list-group-item-danger.active,
      -a.list-group-item-danger.active:hover,
      -button.list-group-item-danger.active:hover,
      -a.list-group-item-danger.active:focus,
      -button.list-group-item-danger.active:focus {
      -  color: #fff;
      -  background-color: #a94442;
      -  border-color: #a94442;
      -}
      -.list-group-item-heading {
      -  margin-top: 0;
      -  margin-bottom: 5px;
      -}
      -.list-group-item-text {
      -  margin-bottom: 0;
      -  line-height: 1.3;
      -}
      -.panel {
      -  margin-bottom: 20px;
      -  background-color: #fff;
      -  border: 1px solid transparent;
      -  border-radius: 4px;
      -  -webkit-box-shadow: 0 1px 1px rgba(0, 0, 0, .05);
      -          box-shadow: 0 1px 1px rgba(0, 0, 0, .05);
      -}
      -.panel-body {
      -  padding: 15px;
      -}
      -.panel-heading {
      -  padding: 10px 15px;
      -  border-bottom: 1px solid transparent;
      -  border-top-left-radius: 3px;
      -  border-top-right-radius: 3px;
      -}
      -.panel-heading > .dropdown .dropdown-toggle {
      -  color: inherit;
      -}
      -.panel-title {
      -  margin-top: 0;
      -  margin-bottom: 0;
      -  font-size: 16px;
      -  color: inherit;
      -}
      -.panel-title > a,
      -.panel-title > small,
      -.panel-title > .small,
      -.panel-title > small > a,
      -.panel-title > .small > a {
      -  color: inherit;
      -}
      -.panel-footer {
      -  padding: 10px 15px;
      -  background-color: #f5f5f5;
      -  border-top: 1px solid #ddd;
      -  border-bottom-right-radius: 3px;
      -  border-bottom-left-radius: 3px;
      -}
      -.panel > .list-group,
      -.panel > .panel-collapse > .list-group {
      -  margin-bottom: 0;
      -}
      -.panel > .list-group .list-group-item,
      -.panel > .panel-collapse > .list-group .list-group-item {
      -  border-width: 1px 0;
      -  border-radius: 0;
      -}
      -.panel > .list-group:first-child .list-group-item:first-child,
      -.panel > .panel-collapse > .list-group:first-child .list-group-item:first-child {
      -  border-top: 0;
      -  border-top-left-radius: 3px;
      -  border-top-right-radius: 3px;
      -}
      -.panel > .list-group:last-child .list-group-item:last-child,
      -.panel > .panel-collapse > .list-group:last-child .list-group-item:last-child {
      -  border-bottom: 0;
      -  border-bottom-right-radius: 3px;
      -  border-bottom-left-radius: 3px;
      -}
      -.panel > .panel-heading + .panel-collapse > .list-group .list-group-item:first-child {
      -  border-top-left-radius: 0;
      -  border-top-right-radius: 0;
      -}
      -.panel-heading + .list-group .list-group-item:first-child {
      -  border-top-width: 0;
      -}
      -.list-group + .panel-footer {
      -  border-top-width: 0;
      -}
      -.panel > .table,
      -.panel > .table-responsive > .table,
      -.panel > .panel-collapse > .table {
      -  margin-bottom: 0;
      -}
      -.panel > .table caption,
      -.panel > .table-responsive > .table caption,
      -.panel > .panel-collapse > .table caption {
      -  padding-right: 15px;
      -  padding-left: 15px;
      -}
      -.panel > .table:first-child,
      -.panel > .table-responsive:first-child > .table:first-child {
      -  border-top-left-radius: 3px;
      -  border-top-right-radius: 3px;
      -}
      -.panel > .table:first-child > thead:first-child > tr:first-child,
      -.panel > .table-responsive:first-child > .table:first-child > thead:first-child > tr:first-child,
      -.panel > .table:first-child > tbody:first-child > tr:first-child,
      -.panel > .table-responsive:first-child > .table:first-child > tbody:first-child > tr:first-child {
      -  border-top-left-radius: 3px;
      -  border-top-right-radius: 3px;
      -}
      -.panel > .table:first-child > thead:first-child > tr:first-child td:first-child,
      -.panel > .table-responsive:first-child > .table:first-child > thead:first-child > tr:first-child td:first-child,
      -.panel > .table:first-child > tbody:first-child > tr:first-child td:first-child,
      -.panel > .table-responsive:first-child > .table:first-child > tbody:first-child > tr:first-child td:first-child,
      -.panel > .table:first-child > thead:first-child > tr:first-child th:first-child,
      -.panel > .table-responsive:first-child > .table:first-child > thead:first-child > tr:first-child th:first-child,
      -.panel > .table:first-child > tbody:first-child > tr:first-child th:first-child,
      -.panel > .table-responsive:first-child > .table:first-child > tbody:first-child > tr:first-child th:first-child {
      -  border-top-left-radius: 3px;
      -}
      -.panel > .table:first-child > thead:first-child > tr:first-child td:last-child,
      -.panel > .table-responsive:first-child > .table:first-child > thead:first-child > tr:first-child td:last-child,
      -.panel > .table:first-child > tbody:first-child > tr:first-child td:last-child,
      -.panel > .table-responsive:first-child > .table:first-child > tbody:first-child > tr:first-child td:last-child,
      -.panel > .table:first-child > thead:first-child > tr:first-child th:last-child,
      -.panel > .table-responsive:first-child > .table:first-child > thead:first-child > tr:first-child th:last-child,
      -.panel > .table:first-child > tbody:first-child > tr:first-child th:last-child,
      -.panel > .table-responsive:first-child > .table:first-child > tbody:first-child > tr:first-child th:last-child {
      -  border-top-right-radius: 3px;
      -}
      -.panel > .table:last-child,
      -.panel > .table-responsive:last-child > .table:last-child {
      -  border-bottom-right-radius: 3px;
      -  border-bottom-left-radius: 3px;
      -}
      -.panel > .table:last-child > tbody:last-child > tr:last-child,
      -.panel > .table-responsive:last-child > .table:last-child > tbody:last-child > tr:last-child,
      -.panel > .table:last-child > tfoot:last-child > tr:last-child,
      -.panel > .table-responsive:last-child > .table:last-child > tfoot:last-child > tr:last-child {
      -  border-bottom-right-radius: 3px;
      -  border-bottom-left-radius: 3px;
      -}
      -.panel > .table:last-child > tbody:last-child > tr:last-child td:first-child,
      -.panel > .table-responsive:last-child > .table:last-child > tbody:last-child > tr:last-child td:first-child,
      -.panel > .table:last-child > tfoot:last-child > tr:last-child td:first-child,
      -.panel > .table-responsive:last-child > .table:last-child > tfoot:last-child > tr:last-child td:first-child,
      -.panel > .table:last-child > tbody:last-child > tr:last-child th:first-child,
      -.panel > .table-responsive:last-child > .table:last-child > tbody:last-child > tr:last-child th:first-child,
      -.panel > .table:last-child > tfoot:last-child > tr:last-child th:first-child,
      -.panel > .table-responsive:last-child > .table:last-child > tfoot:last-child > tr:last-child th:first-child {
      -  border-bottom-left-radius: 3px;
      -}
      -.panel > .table:last-child > tbody:last-child > tr:last-child td:last-child,
      -.panel > .table-responsive:last-child > .table:last-child > tbody:last-child > tr:last-child td:last-child,
      -.panel > .table:last-child > tfoot:last-child > tr:last-child td:last-child,
      -.panel > .table-responsive:last-child > .table:last-child > tfoot:last-child > tr:last-child td:last-child,
      -.panel > .table:last-child > tbody:last-child > tr:last-child th:last-child,
      -.panel > .table-responsive:last-child > .table:last-child > tbody:last-child > tr:last-child th:last-child,
      -.panel > .table:last-child > tfoot:last-child > tr:last-child th:last-child,
      -.panel > .table-responsive:last-child > .table:last-child > tfoot:last-child > tr:last-child th:last-child {
      -  border-bottom-right-radius: 3px;
      -}
      -.panel > .panel-body + .table,
      -.panel > .panel-body + .table-responsive,
      -.panel > .table + .panel-body,
      -.panel > .table-responsive + .panel-body {
      -  border-top: 1px solid #ddd;
      -}
      -.panel > .table > tbody:first-child > tr:first-child th,
      -.panel > .table > tbody:first-child > tr:first-child td {
      -  border-top: 0;
      -}
      -.panel > .table-bordered,
      -.panel > .table-responsive > .table-bordered {
      -  border: 0;
      -}
      -.panel > .table-bordered > thead > tr > th:first-child,
      -.panel > .table-responsive > .table-bordered > thead > tr > th:first-child,
      -.panel > .table-bordered > tbody > tr > th:first-child,
      -.panel > .table-responsive > .table-bordered > tbody > tr > th:first-child,
      -.panel > .table-bordered > tfoot > tr > th:first-child,
      -.panel > .table-responsive > .table-bordered > tfoot > tr > th:first-child,
      -.panel > .table-bordered > thead > tr > td:first-child,
      -.panel > .table-responsive > .table-bordered > thead > tr > td:first-child,
      -.panel > .table-bordered > tbody > tr > td:first-child,
      -.panel > .table-responsive > .table-bordered > tbody > tr > td:first-child,
      -.panel > .table-bordered > tfoot > tr > td:first-child,
      -.panel > .table-responsive > .table-bordered > tfoot > tr > td:first-child {
      -  border-left: 0;
      -}
      -.panel > .table-bordered > thead > tr > th:last-child,
      -.panel > .table-responsive > .table-bordered > thead > tr > th:last-child,
      -.panel > .table-bordered > tbody > tr > th:last-child,
      -.panel > .table-responsive > .table-bordered > tbody > tr > th:last-child,
      -.panel > .table-bordered > tfoot > tr > th:last-child,
      -.panel > .table-responsive > .table-bordered > tfoot > tr > th:last-child,
      -.panel > .table-bordered > thead > tr > td:last-child,
      -.panel > .table-responsive > .table-bordered > thead > tr > td:last-child,
      -.panel > .table-bordered > tbody > tr > td:last-child,
      -.panel > .table-responsive > .table-bordered > tbody > tr > td:last-child,
      -.panel > .table-bordered > tfoot > tr > td:last-child,
      -.panel > .table-responsive > .table-bordered > tfoot > tr > td:last-child {
      -  border-right: 0;
      -}
      -.panel > .table-bordered > thead > tr:first-child > td,
      -.panel > .table-responsive > .table-bordered > thead > tr:first-child > td,
      -.panel > .table-bordered > tbody > tr:first-child > td,
      -.panel > .table-responsive > .table-bordered > tbody > tr:first-child > td,
      -.panel > .table-bordered > thead > tr:first-child > th,
      -.panel > .table-responsive > .table-bordered > thead > tr:first-child > th,
      -.panel > .table-bordered > tbody > tr:first-child > th,
      -.panel > .table-responsive > .table-bordered > tbody > tr:first-child > th {
      -  border-bottom: 0;
      -}
      -.panel > .table-bordered > tbody > tr:last-child > td,
      -.panel > .table-responsive > .table-bordered > tbody > tr:last-child > td,
      -.panel > .table-bordered > tfoot > tr:last-child > td,
      -.panel > .table-responsive > .table-bordered > tfoot > tr:last-child > td,
      -.panel > .table-bordered > tbody > tr:last-child > th,
      -.panel > .table-responsive > .table-bordered > tbody > tr:last-child > th,
      -.panel > .table-bordered > tfoot > tr:last-child > th,
      -.panel > .table-responsive > .table-bordered > tfoot > tr:last-child > th {
      -  border-bottom: 0;
      -}
      -.panel > .table-responsive {
      -  margin-bottom: 0;
      -  border: 0;
      -}
      -.panel-group {
      -  margin-bottom: 20px;
      -}
      -.panel-group .panel {
      -  margin-bottom: 0;
      -  border-radius: 4px;
      -}
      -.panel-group .panel + .panel {
      -  margin-top: 5px;
      -}
      -.panel-group .panel-heading {
      -  border-bottom: 0;
      -}
      -.panel-group .panel-heading + .panel-collapse > .panel-body,
      -.panel-group .panel-heading + .panel-collapse > .list-group {
      -  border-top: 1px solid #ddd;
      -}
      -.panel-group .panel-footer {
      -  border-top: 0;
      -}
      -.panel-group .panel-footer + .panel-collapse .panel-body {
      -  border-bottom: 1px solid #ddd;
      -}
      -.panel-default {
      -  border-color: #ddd;
      -}
      -.panel-default > .panel-heading {
      -  color: #333;
      -  background-color: #f5f5f5;
      -  border-color: #ddd;
      -}
      -.panel-default > .panel-heading + .panel-collapse > .panel-body {
      -  border-top-color: #ddd;
      -}
      -.panel-default > .panel-heading .badge {
      -  color: #f5f5f5;
      -  background-color: #333;
      -}
      -.panel-default > .panel-footer + .panel-collapse > .panel-body {
      -  border-bottom-color: #ddd;
      -}
      -.panel-primary {
      -  border-color: #337ab7;
      -}
      -.panel-primary > .panel-heading {
      -  color: #fff;
      -  background-color: #337ab7;
      -  border-color: #337ab7;
      -}
      -.panel-primary > .panel-heading + .panel-collapse > .panel-body {
      -  border-top-color: #337ab7;
      -}
      -.panel-primary > .panel-heading .badge {
      -  color: #337ab7;
      -  background-color: #fff;
      -}
      -.panel-primary > .panel-footer + .panel-collapse > .panel-body {
      -  border-bottom-color: #337ab7;
      -}
      -.panel-success {
      -  border-color: #d6e9c6;
      -}
      -.panel-success > .panel-heading {
      -  color: #3c763d;
      -  background-color: #dff0d8;
      -  border-color: #d6e9c6;
      -}
      -.panel-success > .panel-heading + .panel-collapse > .panel-body {
      -  border-top-color: #d6e9c6;
      -}
      -.panel-success > .panel-heading .badge {
      -  color: #dff0d8;
      -  background-color: #3c763d;
      -}
      -.panel-success > .panel-footer + .panel-collapse > .panel-body {
      -  border-bottom-color: #d6e9c6;
      -}
      -.panel-info {
      -  border-color: #bce8f1;
      -}
      -.panel-info > .panel-heading {
      -  color: #31708f;
      -  background-color: #d9edf7;
      -  border-color: #bce8f1;
      -}
      -.panel-info > .panel-heading + .panel-collapse > .panel-body {
      -  border-top-color: #bce8f1;
      -}
      -.panel-info > .panel-heading .badge {
      -  color: #d9edf7;
      -  background-color: #31708f;
      -}
      -.panel-info > .panel-footer + .panel-collapse > .panel-body {
      -  border-bottom-color: #bce8f1;
      -}
      -.panel-warning {
      -  border-color: #faebcc;
      -}
      -.panel-warning > .panel-heading {
      -  color: #8a6d3b;
      -  background-color: #fcf8e3;
      -  border-color: #faebcc;
      -}
      -.panel-warning > .panel-heading + .panel-collapse > .panel-body {
      -  border-top-color: #faebcc;
      -}
      -.panel-warning > .panel-heading .badge {
      -  color: #fcf8e3;
      -  background-color: #8a6d3b;
      -}
      -.panel-warning > .panel-footer + .panel-collapse > .panel-body {
      -  border-bottom-color: #faebcc;
      -}
      -.panel-danger {
      -  border-color: #ebccd1;
      -}
      -.panel-danger > .panel-heading {
      -  color: #a94442;
      -  background-color: #f2dede;
      -  border-color: #ebccd1;
      -}
      -.panel-danger > .panel-heading + .panel-collapse > .panel-body {
      -  border-top-color: #ebccd1;
      -}
      -.panel-danger > .panel-heading .badge {
      -  color: #f2dede;
      -  background-color: #a94442;
      -}
      -.panel-danger > .panel-footer + .panel-collapse > .panel-body {
      -  border-bottom-color: #ebccd1;
      -}
      -.embed-responsive {
      -  position: relative;
      -  display: block;
      -  height: 0;
      -  padding: 0;
      -  overflow: hidden;
      -}
      -.embed-responsive .embed-responsive-item,
      -.embed-responsive iframe,
      -.embed-responsive embed,
      -.embed-responsive object,
      -.embed-responsive video {
      -  position: absolute;
      -  top: 0;
      -  bottom: 0;
      -  left: 0;
      -  width: 100%;
      -  height: 100%;
      -  border: 0;
      -}
      -.embed-responsive-16by9 {
      -  padding-bottom: 56.25%;
      -}
      -.embed-responsive-4by3 {
      -  padding-bottom: 75%;
      -}
      -.well {
      -  min-height: 20px;
      -  padding: 19px;
      -  margin-bottom: 20px;
      -  background-color: #f5f5f5;
      -  border: 1px solid #e3e3e3;
      -  border-radius: 4px;
      -  -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .05);
      -          box-shadow: inset 0 1px 1px rgba(0, 0, 0, .05);
      -}
      -.well blockquote {
      -  border-color: #ddd;
      -  border-color: rgba(0, 0, 0, .15);
      -}
      -.well-lg {
      -  padding: 24px;
      -  border-radius: 6px;
      -}
      -.well-sm {
      -  padding: 9px;
      -  border-radius: 3px;
      -}
      -.close {
      -  float: right;
      -  font-size: 21px;
      -  font-weight: bold;
      -  line-height: 1;
      -  color: #000;
      -  text-shadow: 0 1px 0 #fff;
      -  filter: alpha(opacity=20);
      -  opacity: .2;
      -}
      -.close:hover,
      -.close:focus {
      -  color: #000;
      -  text-decoration: none;
      -  cursor: pointer;
      -  filter: alpha(opacity=50);
      -  opacity: .5;
      -}
      -button.close {
      -  -webkit-appearance: none;
      -  padding: 0;
      -  cursor: pointer;
      -  background: transparent;
      -  border: 0;
      -}
      -.modal-open {
      -  overflow: hidden;
      -}
      -.modal {
      -  position: fixed;
      -  top: 0;
      -  right: 0;
      -  bottom: 0;
      -  left: 0;
      -  z-index: 1050;
      -  display: none;
      -  overflow: hidden;
      -  -webkit-overflow-scrolling: touch;
      -  outline: 0;
      -}
      -.modal.fade .modal-dialog {
      -  -webkit-transition: -webkit-transform .3s ease-out;
      -       -o-transition:      -o-transform .3s ease-out;
      -          transition:         transform .3s ease-out;
      -  -webkit-transform: translate(0, -25%);
      -      -ms-transform: translate(0, -25%);
      -       -o-transform: translate(0, -25%);
      -          transform: translate(0, -25%);
      -}
      -.modal.in .modal-dialog {
      -  -webkit-transform: translate(0, 0);
      -      -ms-transform: translate(0, 0);
      -       -o-transform: translate(0, 0);
      -          transform: translate(0, 0);
      -}
      -.modal-open .modal {
      -  overflow-x: hidden;
      -  overflow-y: auto;
      -}
      -.modal-dialog {
      -  position: relative;
      -  width: auto;
      -  margin: 10px;
      -}
      -.modal-content {
      -  position: relative;
      -  background-color: #fff;
      -  -webkit-background-clip: padding-box;
      -          background-clip: padding-box;
      -  border: 1px solid #999;
      -  border: 1px solid rgba(0, 0, 0, .2);
      -  border-radius: 6px;
      -  outline: 0;
      -  -webkit-box-shadow: 0 3px 9px rgba(0, 0, 0, .5);
      -          box-shadow: 0 3px 9px rgba(0, 0, 0, .5);
      -}
      -.modal-backdrop {
      -  position: fixed;
      -  top: 0;
      -  right: 0;
      -  bottom: 0;
      -  left: 0;
      -  z-index: 1040;
      -  background-color: #000;
      -}
      -.modal-backdrop.fade {
      -  filter: alpha(opacity=0);
      -  opacity: 0;
      -}
      -.modal-backdrop.in {
      -  filter: alpha(opacity=50);
      -  opacity: .5;
      -}
      -.modal-header {
      -  padding: 15px;
      -  border-bottom: 1px solid #e5e5e5;
      -}
      -.modal-header .close {
      -  margin-top: -2px;
      -}
      -.modal-title {
      -  margin: 0;
      -  line-height: 1.42857143;
      -}
      -.modal-body {
      -  position: relative;
      -  padding: 15px;
      -}
      -.modal-footer {
      -  padding: 15px;
      -  text-align: right;
      -  border-top: 1px solid #e5e5e5;
      -}
      -.modal-footer .btn + .btn {
      -  margin-bottom: 0;
      -  margin-left: 5px;
      -}
      -.modal-footer .btn-group .btn + .btn {
      -  margin-left: -1px;
      -}
      -.modal-footer .btn-block + .btn-block {
      -  margin-left: 0;
      -}
      -.modal-scrollbar-measure {
      -  position: absolute;
      -  top: -9999px;
      -  width: 50px;
      -  height: 50px;
      -  overflow: scroll;
      -}
      -@media (min-width: 768px) {
      -  .modal-dialog {
      -    width: 600px;
      -    margin: 30px auto;
      -  }
      -  .modal-content {
      -    -webkit-box-shadow: 0 5px 15px rgba(0, 0, 0, .5);
      -            box-shadow: 0 5px 15px rgba(0, 0, 0, .5);
      -  }
      -  .modal-sm {
      -    width: 300px;
      -  }
      -}
      -@media (min-width: 992px) {
      -  .modal-lg {
      -    width: 900px;
      -  }
      -}
      -.tooltip {
      -  position: absolute;
      -  z-index: 1070;
      -  display: block;
      -  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
      -  font-size: 12px;
      -  font-style: normal;
      -  font-weight: normal;
      -  line-height: 1.42857143;
      -  text-align: left;
      -  text-align: start;
      -  text-decoration: none;
      -  text-shadow: none;
      -  text-transform: none;
      -  letter-spacing: normal;
      -  word-break: normal;
      -  word-spacing: normal;
      -  word-wrap: normal;
      -  white-space: normal;
      -  filter: alpha(opacity=0);
      -  opacity: 0;
      -
      -  line-break: auto;
      -}
      -.tooltip.in {
      -  filter: alpha(opacity=90);
      -  opacity: .9;
      -}
      -.tooltip.top {
      -  padding: 5px 0;
      -  margin-top: -3px;
      -}
      -.tooltip.right {
      -  padding: 0 5px;
      -  margin-left: 3px;
      -}
      -.tooltip.bottom {
      -  padding: 5px 0;
      -  margin-top: 3px;
      -}
      -.tooltip.left {
      -  padding: 0 5px;
      -  margin-left: -3px;
      -}
      -.tooltip-inner {
      -  max-width: 200px;
      -  padding: 3px 8px;
      -  color: #fff;
      -  text-align: center;
      -  background-color: #000;
      -  border-radius: 4px;
      -}
      -.tooltip-arrow {
      -  position: absolute;
      -  width: 0;
      -  height: 0;
      -  border-color: transparent;
      -  border-style: solid;
      -}
      -.tooltip.top .tooltip-arrow {
      -  bottom: 0;
      -  left: 50%;
      -  margin-left: -5px;
      -  border-width: 5px 5px 0;
      -  border-top-color: #000;
      -}
      -.tooltip.top-left .tooltip-arrow {
      -  right: 5px;
      -  bottom: 0;
      -  margin-bottom: -5px;
      -  border-width: 5px 5px 0;
      -  border-top-color: #000;
      -}
      -.tooltip.top-right .tooltip-arrow {
      -  bottom: 0;
      -  left: 5px;
      -  margin-bottom: -5px;
      -  border-width: 5px 5px 0;
      -  border-top-color: #000;
      -}
      -.tooltip.right .tooltip-arrow {
      -  top: 50%;
      -  left: 0;
      -  margin-top: -5px;
      -  border-width: 5px 5px 5px 0;
      -  border-right-color: #000;
      -}
      -.tooltip.left .tooltip-arrow {
      -  top: 50%;
      -  right: 0;
      -  margin-top: -5px;
      -  border-width: 5px 0 5px 5px;
      -  border-left-color: #000;
      -}
      -.tooltip.bottom .tooltip-arrow {
      -  top: 0;
      -  left: 50%;
      -  margin-left: -5px;
      -  border-width: 0 5px 5px;
      -  border-bottom-color: #000;
      -}
      -.tooltip.bottom-left .tooltip-arrow {
      -  top: 0;
      -  right: 5px;
      -  margin-top: -5px;
      -  border-width: 0 5px 5px;
      -  border-bottom-color: #000;
      -}
      -.tooltip.bottom-right .tooltip-arrow {
      -  top: 0;
      -  left: 5px;
      -  margin-top: -5px;
      -  border-width: 0 5px 5px;
      -  border-bottom-color: #000;
      -}
      -.popover {
      -  position: absolute;
      -  top: 0;
      -  left: 0;
      -  z-index: 1060;
      -  display: none;
      -  max-width: 276px;
      -  padding: 1px;
      -  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
      -  font-size: 14px;
      -  font-style: normal;
      -  font-weight: normal;
      -  line-height: 1.42857143;
      -  text-align: left;
      -  text-align: start;
      -  text-decoration: none;
      -  text-shadow: none;
      -  text-transform: none;
      -  letter-spacing: normal;
      -  word-break: normal;
      -  word-spacing: normal;
      -  word-wrap: normal;
      -  white-space: normal;
      -  background-color: #fff;
      -  -webkit-background-clip: padding-box;
      -          background-clip: padding-box;
      -  border: 1px solid #ccc;
      -  border: 1px solid rgba(0, 0, 0, .2);
      -  border-radius: 6px;
      -  -webkit-box-shadow: 0 5px 10px rgba(0, 0, 0, .2);
      -          box-shadow: 0 5px 10px rgba(0, 0, 0, .2);
      -
      -  line-break: auto;
      -}
      -.popover.top {
      -  margin-top: -10px;
      -}
      -.popover.right {
      -  margin-left: 10px;
      -}
      -.popover.bottom {
      -  margin-top: 10px;
      -}
      -.popover.left {
      -  margin-left: -10px;
      -}
      -.popover-title {
      -  padding: 8px 14px;
      -  margin: 0;
      -  font-size: 14px;
      -  background-color: #f7f7f7;
      -  border-bottom: 1px solid #ebebeb;
      -  border-radius: 5px 5px 0 0;
      -}
      -.popover-content {
      -  padding: 9px 14px;
      -}
      -.popover > .arrow,
      -.popover > .arrow:after {
      -  position: absolute;
      -  display: block;
      -  width: 0;
      -  height: 0;
      -  border-color: transparent;
      -  border-style: solid;
      -}
      -.popover > .arrow {
      -  border-width: 11px;
      -}
      -.popover > .arrow:after {
      -  content: "";
      -  border-width: 10px;
      -}
      -.popover.top > .arrow {
      -  bottom: -11px;
      -  left: 50%;
      -  margin-left: -11px;
      -  border-top-color: #999;
      -  border-top-color: rgba(0, 0, 0, .25);
      -  border-bottom-width: 0;
      -}
      -.popover.top > .arrow:after {
      -  bottom: 1px;
      -  margin-left: -10px;
      -  content: " ";
      -  border-top-color: #fff;
      -  border-bottom-width: 0;
      -}
      -.popover.right > .arrow {
      -  top: 50%;
      -  left: -11px;
      -  margin-top: -11px;
      -  border-right-color: #999;
      -  border-right-color: rgba(0, 0, 0, .25);
      -  border-left-width: 0;
      -}
      -.popover.right > .arrow:after {
      -  bottom: -10px;
      -  left: 1px;
      -  content: " ";
      -  border-right-color: #fff;
      -  border-left-width: 0;
      -}
      -.popover.bottom > .arrow {
      -  top: -11px;
      -  left: 50%;
      -  margin-left: -11px;
      -  border-top-width: 0;
      -  border-bottom-color: #999;
      -  border-bottom-color: rgba(0, 0, 0, .25);
      -}
      -.popover.bottom > .arrow:after {
      -  top: 1px;
      -  margin-left: -10px;
      -  content: " ";
      -  border-top-width: 0;
      -  border-bottom-color: #fff;
      -}
      -.popover.left > .arrow {
      -  top: 50%;
      -  right: -11px;
      -  margin-top: -11px;
      -  border-right-width: 0;
      -  border-left-color: #999;
      -  border-left-color: rgba(0, 0, 0, .25);
      -}
      -.popover.left > .arrow:after {
      -  right: 1px;
      -  bottom: -10px;
      -  content: " ";
      -  border-right-width: 0;
      -  border-left-color: #fff;
      -}
      -.carousel {
      -  position: relative;
      -}
      -.carousel-inner {
      -  position: relative;
      -  width: 100%;
      -  overflow: hidden;
      -}
      -.carousel-inner > .item {
      -  position: relative;
      -  display: none;
      -  -webkit-transition: .6s ease-in-out left;
      -       -o-transition: .6s ease-in-out left;
      -          transition: .6s ease-in-out left;
      -}
      -.carousel-inner > .item > img,
      -.carousel-inner > .item > a > img {
      -  line-height: 1;
      -}
      -@media all and (transform-3d), (-webkit-transform-3d) {
      -  .carousel-inner > .item {
      -    -webkit-transition: -webkit-transform .6s ease-in-out;
      -         -o-transition:      -o-transform .6s ease-in-out;
      -            transition:         transform .6s ease-in-out;
      -
      -    -webkit-backface-visibility: hidden;
      -            backface-visibility: hidden;
      -    -webkit-perspective: 1000px;
      -            perspective: 1000px;
      -  }
      -  .carousel-inner > .item.next,
      -  .carousel-inner > .item.active.right {
      -    left: 0;
      -    -webkit-transform: translate3d(100%, 0, 0);
      -            transform: translate3d(100%, 0, 0);
      -  }
      -  .carousel-inner > .item.prev,
      -  .carousel-inner > .item.active.left {
      -    left: 0;
      -    -webkit-transform: translate3d(-100%, 0, 0);
      -            transform: translate3d(-100%, 0, 0);
      -  }
      -  .carousel-inner > .item.next.left,
      -  .carousel-inner > .item.prev.right,
      -  .carousel-inner > .item.active {
      -    left: 0;
      -    -webkit-transform: translate3d(0, 0, 0);
      -            transform: translate3d(0, 0, 0);
      -  }
      -}
      -.carousel-inner > .active,
      -.carousel-inner > .next,
      -.carousel-inner > .prev {
      -  display: block;
      -}
      -.carousel-inner > .active {
      -  left: 0;
      -}
      -.carousel-inner > .next,
      -.carousel-inner > .prev {
      -  position: absolute;
      -  top: 0;
      -  width: 100%;
      -}
      -.carousel-inner > .next {
      -  left: 100%;
      -}
      -.carousel-inner > .prev {
      -  left: -100%;
      -}
      -.carousel-inner > .next.left,
      -.carousel-inner > .prev.right {
      -  left: 0;
      -}
      -.carousel-inner > .active.left {
      -  left: -100%;
      -}
      -.carousel-inner > .active.right {
      -  left: 100%;
      -}
      -.carousel-control {
      -  position: absolute;
      -  top: 0;
      -  bottom: 0;
      -  left: 0;
      -  width: 15%;
      -  font-size: 20px;
      -  color: #fff;
      -  text-align: center;
      -  text-shadow: 0 1px 2px rgba(0, 0, 0, .6);
      -  background-color: rgba(0, 0, 0, 0);
      -  filter: alpha(opacity=50);
      -  opacity: .5;
      -}
      -.carousel-control.left {
      -  background-image: -webkit-linear-gradient(left, rgba(0, 0, 0, .5) 0%, rgba(0, 0, 0, .0001) 100%);
      -  background-image:      -o-linear-gradient(left, rgba(0, 0, 0, .5) 0%, rgba(0, 0, 0, .0001) 100%);
      -  background-image: -webkit-gradient(linear, left top, right top, from(rgba(0, 0, 0, .5)), to(rgba(0, 0, 0, .0001)));
      -  background-image:         linear-gradient(to right, rgba(0, 0, 0, .5) 0%, rgba(0, 0, 0, .0001) 100%);
      -  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#80000000', endColorstr='#00000000', GradientType=1);
      -  background-repeat: repeat-x;
      -}
      -.carousel-control.right {
      -  right: 0;
      -  left: auto;
      -  background-image: -webkit-linear-gradient(left, rgba(0, 0, 0, .0001) 0%, rgba(0, 0, 0, .5) 100%);
      -  background-image:      -o-linear-gradient(left, rgba(0, 0, 0, .0001) 0%, rgba(0, 0, 0, .5) 100%);
      -  background-image: -webkit-gradient(linear, left top, right top, from(rgba(0, 0, 0, .0001)), to(rgba(0, 0, 0, .5)));
      -  background-image:         linear-gradient(to right, rgba(0, 0, 0, .0001) 0%, rgba(0, 0, 0, .5) 100%);
      -  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#00000000', endColorstr='#80000000', GradientType=1);
      -  background-repeat: repeat-x;
      -}
      -.carousel-control:hover,
      -.carousel-control:focus {
      -  color: #fff;
      -  text-decoration: none;
      -  filter: alpha(opacity=90);
      -  outline: 0;
      -  opacity: .9;
      -}
      -.carousel-control .icon-prev,
      -.carousel-control .icon-next,
      -.carousel-control .glyphicon-chevron-left,
      -.carousel-control .glyphicon-chevron-right {
      -  position: absolute;
      -  top: 50%;
      -  z-index: 5;
      -  display: inline-block;
      -  margin-top: -10px;
      -}
      -.carousel-control .icon-prev,
      -.carousel-control .glyphicon-chevron-left {
      -  left: 50%;
      -  margin-left: -10px;
      -}
      -.carousel-control .icon-next,
      -.carousel-control .glyphicon-chevron-right {
      -  right: 50%;
      -  margin-right: -10px;
      -}
      -.carousel-control .icon-prev,
      -.carousel-control .icon-next {
      -  width: 20px;
      -  height: 20px;
      -  font-family: serif;
      -  line-height: 1;
      -}
      -.carousel-control .icon-prev:before {
      -  content: '\2039';
      -}
      -.carousel-control .icon-next:before {
      -  content: '\203a';
      -}
      -.carousel-indicators {
      -  position: absolute;
      -  bottom: 10px;
      -  left: 50%;
      -  z-index: 15;
      -  width: 60%;
      -  padding-left: 0;
      -  margin-left: -30%;
      -  text-align: center;
      -  list-style: none;
      -}
      -.carousel-indicators li {
      -  display: inline-block;
      -  width: 10px;
      -  height: 10px;
      -  margin: 1px;
      -  text-indent: -999px;
      -  cursor: pointer;
      -  background-color: #000 \9;
      -  background-color: rgba(0, 0, 0, 0);
      -  border: 1px solid #fff;
      -  border-radius: 10px;
      -}
      -.carousel-indicators .active {
      -  width: 12px;
      -  height: 12px;
      -  margin: 0;
      -  background-color: #fff;
      -}
      -.carousel-caption {
      -  position: absolute;
      -  right: 15%;
      -  bottom: 20px;
      -  left: 15%;
      -  z-index: 10;
      -  padding-top: 20px;
      -  padding-bottom: 20px;
      -  color: #fff;
      -  text-align: center;
      -  text-shadow: 0 1px 2px rgba(0, 0, 0, .6);
      -}
      -.carousel-caption .btn {
      -  text-shadow: none;
      -}
      -@media screen and (min-width: 768px) {
      -  .carousel-control .glyphicon-chevron-left,
      -  .carousel-control .glyphicon-chevron-right,
      -  .carousel-control .icon-prev,
      -  .carousel-control .icon-next {
      -    width: 30px;
      -    height: 30px;
      -    margin-top: -10px;
      -    font-size: 30px;
      -  }
      -  .carousel-control .glyphicon-chevron-left,
      -  .carousel-control .icon-prev {
      -    margin-left: -10px;
      -  }
      -  .carousel-control .glyphicon-chevron-right,
      -  .carousel-control .icon-next {
      -    margin-right: -10px;
      -  }
      -  .carousel-caption {
      -    right: 20%;
      -    left: 20%;
      -    padding-bottom: 30px;
      -  }
      -  .carousel-indicators {
      -    bottom: 20px;
      -  }
      -}
      -.clearfix:before,
      -.clearfix:after,
      -.dl-horizontal dd:before,
      -.dl-horizontal dd:after,
      -.container:before,
      -.container:after,
      -.container-fluid:before,
      -.container-fluid:after,
      -.row:before,
      -.row:after,
      -.form-horizontal .form-group:before,
      -.form-horizontal .form-group:after,
      -.btn-toolbar:before,
      -.btn-toolbar:after,
      -.btn-group-vertical > .btn-group:before,
      -.btn-group-vertical > .btn-group:after,
      -.nav:before,
      -.nav:after,
      -.navbar:before,
      -.navbar:after,
      -.navbar-header:before,
      -.navbar-header:after,
      -.navbar-collapse:before,
      -.navbar-collapse:after,
      -.pager:before,
      -.pager:after,
      -.panel-body:before,
      -.panel-body:after,
      -.modal-header:before,
      -.modal-header:after,
      -.modal-footer:before,
      -.modal-footer:after {
      -  display: table;
      -  content: " ";
      -}
      -.clearfix:after,
      -.dl-horizontal dd:after,
      -.container:after,
      -.container-fluid:after,
      -.row:after,
      -.form-horizontal .form-group:after,
      -.btn-toolbar:after,
      -.btn-group-vertical > .btn-group:after,
      -.nav:after,
      -.navbar:after,
      -.navbar-header:after,
      -.navbar-collapse:after,
      -.pager:after,
      -.panel-body:after,
      -.modal-header:after,
      -.modal-footer:after {
      -  clear: both;
      -}
      -.center-block {
      -  display: block;
      -  margin-right: auto;
      -  margin-left: auto;
      -}
      -.pull-right {
      -  float: right !important;
      -}
      -.pull-left {
      -  float: left !important;
      -}
      -.hide {
      -  display: none !important;
      -}
      -.show {
      -  display: block !important;
      -}
      -.invisible {
      -  visibility: hidden;
      -}
      -.text-hide {
      -  font: 0/0 a;
      -  color: transparent;
      -  text-shadow: none;
      -  background-color: transparent;
      -  border: 0;
      -}
      -.hidden {
      -  display: none !important;
      -}
      -.affix {
      -  position: fixed;
      -}
      -@-ms-viewport {
      -  width: device-width;
      -}
      -.visible-xs,
      -.visible-sm,
      -.visible-md,
      -.visible-lg {
      -  display: none !important;
      -}
      -.visible-xs-block,
      -.visible-xs-inline,
      -.visible-xs-inline-block,
      -.visible-sm-block,
      -.visible-sm-inline,
      -.visible-sm-inline-block,
      -.visible-md-block,
      -.visible-md-inline,
      -.visible-md-inline-block,
      -.visible-lg-block,
      -.visible-lg-inline,
      -.visible-lg-inline-block {
      -  display: none !important;
      -}
      -@media (max-width: 767px) {
      -  .visible-xs {
      -    display: block !important;
      -  }
      -  table.visible-xs {
      -    display: table !important;
      -  }
      -  tr.visible-xs {
      -    display: table-row !important;
      -  }
      -  th.visible-xs,
      -  td.visible-xs {
      -    display: table-cell !important;
      -  }
      -}
      -@media (max-width: 767px) {
      -  .visible-xs-block {
      -    display: block !important;
      -  }
      -}
      -@media (max-width: 767px) {
      -  .visible-xs-inline {
      -    display: inline !important;
      -  }
      -}
      -@media (max-width: 767px) {
      -  .visible-xs-inline-block {
      -    display: inline-block !important;
      -  }
      -}
      -@media (min-width: 768px) and (max-width: 991px) {
      -  .visible-sm {
      -    display: block !important;
      -  }
      -  table.visible-sm {
      -    display: table !important;
      -  }
      -  tr.visible-sm {
      -    display: table-row !important;
      -  }
      -  th.visible-sm,
      -  td.visible-sm {
      -    display: table-cell !important;
      -  }
      -}
      -@media (min-width: 768px) and (max-width: 991px) {
      -  .visible-sm-block {
      -    display: block !important;
      -  }
      -}
      -@media (min-width: 768px) and (max-width: 991px) {
      -  .visible-sm-inline {
      -    display: inline !important;
      -  }
      -}
      -@media (min-width: 768px) and (max-width: 991px) {
      -  .visible-sm-inline-block {
      -    display: inline-block !important;
      -  }
      -}
      -@media (min-width: 992px) and (max-width: 1199px) {
      -  .visible-md {
      -    display: block !important;
      -  }
      -  table.visible-md {
      -    display: table !important;
      -  }
      -  tr.visible-md {
      -    display: table-row !important;
      -  }
      -  th.visible-md,
      -  td.visible-md {
      -    display: table-cell !important;
      -  }
      -}
      -@media (min-width: 992px) and (max-width: 1199px) {
      -  .visible-md-block {
      -    display: block !important;
      -  }
      -}
      -@media (min-width: 992px) and (max-width: 1199px) {
      -  .visible-md-inline {
      -    display: inline !important;
      -  }
      -}
      -@media (min-width: 992px) and (max-width: 1199px) {
      -  .visible-md-inline-block {
      -    display: inline-block !important;
      -  }
      -}
      -@media (min-width: 1200px) {
      -  .visible-lg {
      -    display: block !important;
      -  }
      -  table.visible-lg {
      -    display: table !important;
      -  }
      -  tr.visible-lg {
      -    display: table-row !important;
      -  }
      -  th.visible-lg,
      -  td.visible-lg {
      -    display: table-cell !important;
      -  }
      -}
      -@media (min-width: 1200px) {
      -  .visible-lg-block {
      -    display: block !important;
      -  }
      -}
      -@media (min-width: 1200px) {
      -  .visible-lg-inline {
      -    display: inline !important;
      -  }
      -}
      -@media (min-width: 1200px) {
      -  .visible-lg-inline-block {
      -    display: inline-block !important;
      -  }
      -}
      -@media (max-width: 767px) {
      -  .hidden-xs {
      -    display: none !important;
      -  }
      -}
      -@media (min-width: 768px) and (max-width: 991px) {
      -  .hidden-sm {
      -    display: none !important;
      -  }
      -}
      -@media (min-width: 992px) and (max-width: 1199px) {
      -  .hidden-md {
      -    display: none !important;
      -  }
      -}
      -@media (min-width: 1200px) {
      -  .hidden-lg {
      -    display: none !important;
      -  }
      -}
      -.visible-print {
      -  display: none !important;
      -}
      -@media print {
      -  .visible-print {
      -    display: block !important;
      -  }
      -  table.visible-print {
      -    display: table !important;
      -  }
      -  tr.visible-print {
      -    display: table-row !important;
      -  }
      -  th.visible-print,
      -  td.visible-print {
      -    display: table-cell !important;
      -  }
      -}
      -.visible-print-block {
      -  display: none !important;
      -}
      -@media print {
      -  .visible-print-block {
      -    display: block !important;
      -  }
      -}
      -.visible-print-inline {
      -  display: none !important;
      -}
      -@media print {
      -  .visible-print-inline {
      -    display: inline !important;
      -  }
      -}
      -.visible-print-inline-block {
      -  display: none !important;
      -}
      -@media print {
      -  .visible-print-inline-block {
      -    display: inline-block !important;
      -  }
      -}
      -@media print {
      -  .hidden-print {
      -    display: none !important;
      -  }
      -}
      -/*# sourceMappingURL=bootstrap.css.map */
      diff --git a/blockly/webif/static/css/bootstrap.css.map b/blockly/webif/static/css/bootstrap.css.map
      deleted file mode 100755
      index f010c82d1..000000000
      --- a/blockly/webif/static/css/bootstrap.css.map
      +++ /dev/null
      @@ -1 +0,0 @@
      -{"version":3,"sources":["bootstrap.css","less/normalize.less","less/print.less","less/glyphicons.less","less/scaffolding.less","less/mixins/vendor-prefixes.less","less/mixins/tab-focus.less","less/mixins/image.less","less/type.less","less/mixins/text-emphasis.less","less/mixins/background-variant.less","less/mixins/text-overflow.less","less/code.less","less/grid.less","less/mixins/grid.less","less/mixins/grid-framework.less","less/tables.less","less/mixins/table-row.less","less/forms.less","less/mixins/forms.less","less/buttons.less","less/mixins/buttons.less","less/mixins/opacity.less","less/component-animations.less","less/dropdowns.less","less/mixins/nav-divider.less","less/mixins/reset-filter.less","less/button-groups.less","less/mixins/border-radius.less","less/input-groups.less","less/navs.less","less/navbar.less","less/mixins/nav-vertical-align.less","less/utilities.less","less/breadcrumbs.less","less/pagination.less","less/mixins/pagination.less","less/pager.less","less/labels.less","less/mixins/labels.less","less/badges.less","less/jumbotron.less","less/thumbnails.less","less/alerts.less","less/mixins/alerts.less","less/progress-bars.less","less/mixins/gradients.less","less/mixins/progress-bar.less","less/media.less","less/list-group.less","less/mixins/list-group.less","less/panels.less","less/mixins/panels.less","less/responsive-embed.less","less/wells.less","less/close.less","less/modals.less","less/tooltip.less","less/mixins/reset-text.less","less/popovers.less","less/carousel.less","less/mixins/clearfix.less","less/mixins/center-block.less","less/mixins/hide-text.less","less/responsive-utilities.less","less/mixins/responsive-visibility.less"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,4EAA4E;ACG5E;EACE,wBAAA;EACA,2BAAA;EACA,+BAAA;CDDD;ACQD;EACE,UAAA;CDND;ACmBD;;;;;;;;;;;;;EAaE,eAAA;CDjBD;ACyBD;;;;EAIE,sBAAA;EACA,yBAAA;CDvBD;AC+BD;EACE,cAAA;EACA,UAAA;CD7BD;ACqCD;;EAEE,cAAA;CDnCD;AC6CD;EACE,8BAAA;CD3CD;ACmDD;;EAEE,WAAA;CDjDD;AC2DD;EACE,0BAAA;CDzDD;ACgED;;EAEE,kBAAA;CD9DD;ACqED;EACE,mBAAA;CDnED;AC2ED;EACE,eAAA;EACA,iBAAA;CDzED;ACgFD;EACE,iBAAA;EACA,YAAA;CD9ED;ACqFD;EACE,eAAA;CDnFD;AC0FD;;EAEE,eAAA;EACA,eAAA;EACA,mBAAA;EACA,yBAAA;CDxFD;AC2FD;EACE,YAAA;CDzFD;AC4FD;EACE,gBAAA;CD1FD;ACoGD;EACE,UAAA;CDlGD;ACyGD;EACE,iBAAA;CDvGD;ACiHD;EACE,iBAAA;CD/GD;ACsHD;EACE,gCAAA;KAAA,6BAAA;UAAA,wBAAA;EACA,UAAA;CDpHD;AC2HD;EACE,eAAA;CDzHD;ACgID;;;;EAIE,kCAAA;EACA,eAAA;CD9HD;ACgJD;;;;;EAKE,eAAA;EACA,cAAA;EACA,UAAA;CD9ID;ACqJD;EACE,kBAAA;CDnJD;AC6JD;;EAEE,qBAAA;CD3JD;ACsKD;;;;EAIE,2BAAA;EACA,gBAAA;CDpKD;AC2KD;;EAEE,gBAAA;CDzKD;ACgLD;;EAEE,UAAA;EACA,WAAA;CD9KD;ACsLD;EACE,oBAAA;CDpLD;AC+LD;;EAEE,+BAAA;KAAA,4BAAA;UAAA,uBAAA;EACA,WAAA;CD7LD;ACsMD;;EAEE,aAAA;CDpMD;AC4MD;EACE,8BAAA;EACA,gCAAA;KAAA,6BAAA;UAAA,wBAAA;CD1MD;ACmND;;EAEE,yBAAA;CDjND;ACwND;EACE,0BAAA;EACA,cAAA;EACA,+BAAA;CDtND;AC8ND;EACE,UAAA;EACA,WAAA;CD5ND;ACmOD;EACE,eAAA;CDjOD;ACyOD;EACE,kBAAA;CDvOD;ACiPD;EACE,0BAAA;EACA,kBAAA;CD/OD;ACkPD;;EAEE,WAAA;CDhPD;AACD,qFAAqF;AElFrF;EA7FI;;;IAGI,mCAAA;IACA,uBAAA;IACA,oCAAA;YAAA,4BAAA;IACA,6BAAA;GFkLL;EE/KC;;IAEI,2BAAA;GFiLL;EE9KC;IACI,6BAAA;GFgLL;EE7KC;IACI,8BAAA;GF+KL;EE1KC;;IAEI,YAAA;GF4KL;EEzKC;;IAEI,uBAAA;IACA,yBAAA;GF2KL;EExKC;IACI,4BAAA;GF0KL;EEvKC;;IAEI,yBAAA;GFyKL;EEtKC;IACI,2BAAA;GFwKL;EErKC;;;IAGI,WAAA;IACA,UAAA;GFuKL;EEpKC;;IAEI,wBAAA;GFsKL;EEhKC;IACI,cAAA;GFkKL;EEhKC;;IAGQ,kCAAA;GFiKT;EE9JC;IACI,uBAAA;GFgKL;EE7JC;IACI,qCAAA;GF+JL;EEhKC;;IAKQ,kCAAA;GF+JT;EE5JC;;IAGQ,kCAAA;GF6JT;CACF;AGnPD;EACE,oCAAA;EACA,sDAAA;EACA,gYAAA;CHqPD;AG7OD;EACE,mBAAA;EACA,SAAA;EACA,sBAAA;EACA,oCAAA;EACA,mBAAA;EACA,oBAAA;EACA,eAAA;EACA,oCAAA;EACA,mCAAA;CH+OD;AG3OmC;EAAW,iBAAA;CH8O9C;AG7OmC;EAAW,iBAAA;CHgP9C;AG9OmC;;EAAW,iBAAA;CHkP9C;AGjPmC;EAAW,iBAAA;CHoP9C;AGnPmC;EAAW,iBAAA;CHsP9C;AGrPmC;EAAW,iBAAA;CHwP9C;AGvPmC;EAAW,iBAAA;CH0P9C;AGzPmC;EAAW,iBAAA;CH4P9C;AG3PmC;EAAW,iBAAA;CH8P9C;AG7PmC;EAAW,iBAAA;CHgQ9C;AG/PmC;EAAW,iBAAA;CHkQ9C;AGjQmC;EAAW,iBAAA;CHoQ9C;AGnQmC;EAAW,iBAAA;CHsQ9C;AGrQmC;EAAW,iBAAA;CHwQ9C;AGvQmC;EAAW,iBAAA;CH0Q9C;AGzQmC;EAAW,iBAAA;CH4Q9C;AG3QmC;EAAW,iBAAA;CH8Q9C;AG7QmC;EAAW,iBAAA;CHgR9C;AG/QmC;EAAW,iBAAA;CHkR9C;AGjRmC;EAAW,iBAAA;CHoR9C;AGnRmC;EAAW,iBAAA;CHsR9C;AGrRmC;EAAW,iBAAA;CHwR9C;AGvRmC;EAAW,iBAAA;CH0R9C;AGzRmC;EAAW,iBAAA;CH4R9C;AG3RmC;EAAW,iBAAA;CH8R9C;AG7RmC;EAAW,iBAAA;CHgS9C;AG/RmC;EAAW,iBAAA;CHkS9C;AGjSmC;EAAW,iBAAA;CHoS9C;AGnSmC;EAAW,iBAAA;CHsS9C;AGrSmC;EAAW,iBAAA;CHwS9C;AGvSmC;EAAW,iBAAA;CH0S9C;AGzSmC;EAAW,iBAAA;CH4S9C;AG3SmC;EAAW,iBAAA;CH8S9C;AG7SmC;EAAW,iBAAA;CHgT9C;AG/SmC;EAAW,iBAAA;CHkT9C;AGjTmC;EAAW,iBAAA;CHoT9C;AGnTmC;EAAW,iBAAA;CHsT9C;AGrTmC;EAAW,iBAAA;CHwT9C;AGvTmC;EAAW,iBAAA;CH0T9C;AGzTmC;EAAW,iBAAA;CH4T9C;AG3TmC;EAAW,iBAAA;CH8T9C;AG7TmC;EAAW,iBAAA;CHgU9C;AG/TmC;EAAW,iBAAA;CHkU9C;AGjUmC;EAAW,iBAAA;CHoU9C;AGnUmC;EAAW,iBAAA;CHsU9C;AGrUmC;EAAW,iBAAA;CHwU9C;AGvUmC;EAAW,iBAAA;CH0U9C;AGzUmC;EAAW,iBAAA;CH4U9C;AG3UmC;EAAW,iBAAA;CH8U9C;AG7UmC;EAAW,iBAAA;CHgV9C;AG/UmC;EAAW,iBAAA;CHkV9C;AGjVmC;EAAW,iBAAA;CHoV9C;AGnVmC;EAAW,iBAAA;CHsV9C;AGrVmC;EAAW,iBAAA;CHwV9C;AGvVmC;EAAW,iBAAA;CH0V9C;AGzVmC;EAAW,iBAAA;CH4V9C;AG3VmC;EAAW,iBAAA;CH8V9C;AG7VmC;EAAW,iBAAA;CHgW9C;AG/VmC;EAAW,iBAAA;CHkW9C;AGjWmC;EAAW,iBAAA;CHoW9C;AGnWmC;EAAW,iBAAA;CHsW9C;AGrWmC;EAAW,iBAAA;CHwW9C;AGvWmC;EAAW,iBAAA;CH0W9C;AGzWmC;EAAW,iBAAA;CH4W9C;AG3WmC;EAAW,iBAAA;CH8W9C;AG7WmC;EAAW,iBAAA;CHgX9C;AG/WmC;EAAW,iBAAA;CHkX9C;AGjXmC;EAAW,iBAAA;CHoX9C;AGnXmC;EAAW,iBAAA;CHsX9C;AGrXmC;EAAW,iBAAA;CHwX9C;AGvXmC;EAAW,iBAAA;CH0X9C;AGzXmC;EAAW,iBAAA;CH4X9C;AG3XmC;EAAW,iBAAA;CH8X9C;AG7XmC;EAAW,iBAAA;CHgY9C;AG/XmC;EAAW,iBAAA;CHkY9C;AGjYmC;EAAW,iBAAA;CHoY9C;AGnYmC;EAAW,iBAAA;CHsY9C;AGrYmC;EAAW,iBAAA;CHwY9C;AGvYmC;EAAW,iBAAA;CH0Y9C;AGzYmC;EAAW,iBAAA;CH4Y9C;AG3YmC;EAAW,iBAAA;CH8Y9C;AG7YmC;EAAW,iBAAA;CHgZ9C;AG/YmC;EAAW,iBAAA;CHkZ9C;AGjZmC;EAAW,iBAAA;CHoZ9C;AGnZmC;EAAW,iBAAA;CHsZ9C;AGrZmC;EAAW,iBAAA;CHwZ9C;AGvZmC;EAAW,iBAAA;CH0Z9C;AGzZmC;EAAW,iBAAA;CH4Z9C;AG3ZmC;EAAW,iBAAA;CH8Z9C;AG7ZmC;EAAW,iBAAA;CHga9C;AG/ZmC;EAAW,iBAAA;CHka9C;AGjamC;EAAW,iBAAA;CHoa9C;AGnamC;EAAW,iBAAA;CHsa9C;AGramC;EAAW,iBAAA;CHwa9C;AGvamC;EAAW,iBAAA;CH0a9C;AGzamC;EAAW,iBAAA;CH4a9C;AG3amC;EAAW,iBAAA;CH8a9C;AG7amC;EAAW,iBAAA;CHgb9C;AG/amC;EAAW,iBAAA;CHkb9C;AGjbmC;EAAW,iBAAA;CHob9C;AGnbmC;EAAW,iBAAA;CHsb9C;AGrbmC;EAAW,iBAAA;CHwb9C;AGvbmC;EAAW,iBAAA;CH0b9C;AGzbmC;EAAW,iBAAA;CH4b9C;AG3bmC;EAAW,iBAAA;CH8b9C;AG7bmC;EAAW,iBAAA;CHgc9C;AG/bmC;EAAW,iBAAA;CHkc9C;AGjcmC;EAAW,iBAAA;CHoc9C;AGncmC;EAAW,iBAAA;CHsc9C;AGrcmC;EAAW,iBAAA;CHwc9C;AGvcmC;EAAW,iBAAA;CH0c9C;AGzcmC;EAAW,iBAAA;CH4c9C;AG3cmC;EAAW,iBAAA;CH8c9C;AG7cmC;EAAW,iBAAA;CHgd9C;AG/cmC;EAAW,iBAAA;CHkd9C;AGjdmC;EAAW,iBAAA;CHod9C;AGndmC;EAAW,iBAAA;CHsd9C;AGrdmC;EAAW,iBAAA;CHwd9C;AGvdmC;EAAW,iBAAA;CH0d9C;AGzdmC;EAAW,iBAAA;CH4d9C;AG3dmC;EAAW,iBAAA;CH8d9C;AG7dmC;EAAW,iBAAA;CHge9C;AG/dmC;EAAW,iBAAA;CHke9C;AGjemC;EAAW,iBAAA;CHoe9C;AGnemC;EAAW,iBAAA;CHse9C;AGremC;EAAW,iBAAA;CHwe9C;AGvemC;EAAW,iBAAA;CH0e9C;AGzemC;EAAW,iBAAA;CH4e9C;AG3emC;EAAW,iBAAA;CH8e9C;AG7emC;EAAW,iBAAA;CHgf9C;AG/emC;EAAW,iBAAA;CHkf9C;AGjfmC;EAAW,iBAAA;CHof9C;AGnfmC;EAAW,iBAAA;CHsf9C;AGrfmC;EAAW,iBAAA;CHwf9C;AGvfmC;EAAW,iBAAA;CH0f9C;AGzfmC;EAAW,iBAAA;CH4f9C;AG3fmC;EAAW,iBAAA;CH8f9C;AG7fmC;EAAW,iBAAA;CHggB9C;AG/fmC;EAAW,iBAAA;CHkgB9C;AGjgBmC;EAAW,iBAAA;CHogB9C;AGngBmC;EAAW,iBAAA;CHsgB9C;AGrgBmC;EAAW,iBAAA;CHwgB9C;AGvgBmC;EAAW,iBAAA;CH0gB9C;AGzgBmC;EAAW,iBAAA;CH4gB9C;AG3gBmC;EAAW,iBAAA;CH8gB9C;AG7gBmC;EAAW,iBAAA;CHghB9C;AG/gBmC;EAAW,iBAAA;CHkhB9C;AGjhBmC;EAAW,iBAAA;CHohB9C;AGnhBmC;EAAW,iBAAA;CHshB9C;AGrhBmC;EAAW,iBAAA;CHwhB9C;AGvhBmC;EAAW,iBAAA;CH0hB9C;AGzhBmC;EAAW,iBAAA;CH4hB9C;AG3hBmC;EAAW,iBAAA;CH8hB9C;AG7hBmC;EAAW,iBAAA;CHgiB9C;AG/hBmC;EAAW,iBAAA;CHkiB9C;AGjiBmC;EAAW,iBAAA;CHoiB9C;AGniBmC;EAAW,iBAAA;CHsiB9C;AGriBmC;EAAW,iBAAA;CHwiB9C;AGviBmC;EAAW,iBAAA;CH0iB9C;AGziBmC;EAAW,iBAAA;CH4iB9C;AG3iBmC;EAAW,iBAAA;CH8iB9C;AG7iBmC;EAAW,iBAAA;CHgjB9C;AG/iBmC;EAAW,iBAAA;CHkjB9C;AGjjBmC;EAAW,iBAAA;CHojB9C;AGnjBmC;EAAW,iBAAA;CHsjB9C;AGrjBmC;EAAW,iBAAA;CHwjB9C;AGvjBmC;EAAW,iBAAA;CH0jB9C;AGzjBmC;EAAW,iBAAA;CH4jB9C;AG3jBmC;EAAW,iBAAA;CH8jB9C;AG7jBmC;EAAW,iBAAA;CHgkB9C;AG/jBmC;EAAW,iBAAA;CHkkB9C;AGjkBmC;EAAW,iBAAA;CHokB9C;AGnkBmC;EAAW,iBAAA;CHskB9C;AGrkBmC;EAAW,iBAAA;CHwkB9C;AGvkBmC;EAAW,iBAAA;CH0kB9C;AGzkBmC;EAAW,iBAAA;CH4kB9C;AG3kBmC;EAAW,iBAAA;CH8kB9C;AG7kBmC;EAAW,iBAAA;CHglB9C;AG/kBmC;EAAW,iBAAA;CHklB9C;AGjlBmC;EAAW,iBAAA;CHolB9C;AGnlBmC;EAAW,iBAAA;CHslB9C;AGrlBmC;EAAW,iBAAA;CHwlB9C;AGvlBmC;EAAW,iBAAA;CH0lB9C;AGzlBmC;EAAW,iBAAA;CH4lB9C;AG3lBmC;EAAW,iBAAA;CH8lB9C;AG7lBmC;EAAW,iBAAA;CHgmB9C;AG/lBmC;EAAW,iBAAA;CHkmB9C;AGjmBmC;EAAW,iBAAA;CHomB9C;AGnmBmC;EAAW,iBAAA;CHsmB9C;AGrmBmC;EAAW,iBAAA;CHwmB9C;AGvmBmC;EAAW,iBAAA;CH0mB9C;AGzmBmC;EAAW,iBAAA;CH4mB9C;AG3mBmC;EAAW,iBAAA;CH8mB9C;AG7mBmC;EAAW,iBAAA;CHgnB9C;AG/mBmC;EAAW,iBAAA;CHknB9C;AGjnBmC;EAAW,iBAAA;CHonB9C;AGnnBmC;EAAW,iBAAA;CHsnB9C;AGrnBmC;EAAW,iBAAA;CHwnB9C;AGvnBmC;EAAW,iBAAA;CH0nB9C;AGznBmC;EAAW,iBAAA;CH4nB9C;AG3nBmC;EAAW,iBAAA;CH8nB9C;AG7nBmC;EAAW,iBAAA;CHgoB9C;AG/nBmC;EAAW,iBAAA;CHkoB9C;AGjoBmC;EAAW,iBAAA;CHooB9C;AGnoBmC;EAAW,iBAAA;CHsoB9C;AGroBmC;EAAW,iBAAA;CHwoB9C;AG/nBmC;EAAW,iBAAA;CHkoB9C;AGjoBmC;EAAW,iBAAA;CHooB9C;AGnoBmC;EAAW,iBAAA;CHsoB9C;AGroBmC;EAAW,iBAAA;CHwoB9C;AGvoBmC;EAAW,iBAAA;CH0oB9C;AGzoBmC;EAAW,iBAAA;CH4oB9C;AG3oBmC;EAAW,iBAAA;CH8oB9C;AG7oBmC;EAAW,iBAAA;CHgpB9C;AG/oBmC;EAAW,iBAAA;CHkpB9C;AGjpBmC;EAAW,iBAAA;CHopB9C;AGnpBmC;EAAW,iBAAA;CHspB9C;AGrpBmC;EAAW,iBAAA;CHwpB9C;AGvpBmC;EAAW,iBAAA;CH0pB9C;AGzpBmC;EAAW,iBAAA;CH4pB9C;AG3pBmC;EAAW,iBAAA;CH8pB9C;AG7pBmC;EAAW,iBAAA;CHgqB9C;AG/pBmC;EAAW,iBAAA;CHkqB9C;AGjqBmC;EAAW,iBAAA;CHoqB9C;AGnqBmC;EAAW,iBAAA;CHsqB9C;AGrqBmC;EAAW,iBAAA;CHwqB9C;AGvqBmC;EAAW,iBAAA;CH0qB9C;AGzqBmC;EAAW,iBAAA;CH4qB9C;AG3qBmC;EAAW,iBAAA;CH8qB9C;AG7qBmC;EAAW,iBAAA;CHgrB9C;AG/qBmC;EAAW,iBAAA;CHkrB9C;AGjrBmC;EAAW,iBAAA;CHorB9C;AGnrBmC;EAAW,iBAAA;CHsrB9C;AGrrBmC;EAAW,iBAAA;CHwrB9C;AGvrBmC;EAAW,iBAAA;CH0rB9C;AGzrBmC;EAAW,iBAAA;CH4rB9C;AG3rBmC;EAAW,iBAAA;CH8rB9C;AG7rBmC;EAAW,iBAAA;CHgsB9C;AG/rBmC;EAAW,iBAAA;CHksB9C;AGjsBmC;EAAW,iBAAA;CHosB9C;AGnsBmC;EAAW,iBAAA;CHssB9C;AGrsBmC;EAAW,iBAAA;CHwsB9C;AGvsBmC;EAAW,iBAAA;CH0sB9C;AGzsBmC;EAAW,iBAAA;CH4sB9C;AG3sBmC;EAAW,iBAAA;CH8sB9C;AG7sBmC;EAAW,iBAAA;CHgtB9C;AG/sBmC;EAAW,iBAAA;CHktB9C;AGjtBmC;EAAW,iBAAA;CHotB9C;AGntBmC;EAAW,iBAAA;CHstB9C;AGrtBmC;EAAW,iBAAA;CHwtB9C;AGvtBmC;EAAW,iBAAA;CH0tB9C;AGztBmC;EAAW,iBAAA;CH4tB9C;AG3tBmC;EAAW,iBAAA;CH8tB9C;AG7tBmC;EAAW,iBAAA;CHguB9C;AG/tBmC;EAAW,iBAAA;CHkuB9C;AGjuBmC;EAAW,iBAAA;CHouB9C;AGnuBmC;EAAW,iBAAA;CHsuB9C;AGruBmC;EAAW,iBAAA;CHwuB9C;AGvuBmC;EAAW,iBAAA;CH0uB9C;AGzuBmC;EAAW,iBAAA;CH4uB9C;AG3uBmC;EAAW,iBAAA;CH8uB9C;AG7uBmC;EAAW,iBAAA;CHgvB9C;AIthCD;ECgEE,+BAAA;EACG,4BAAA;EACK,uBAAA;CLy9BT;AIxhCD;;EC6DE,+BAAA;EACG,4BAAA;EACK,uBAAA;CL+9BT;AIthCD;EACE,gBAAA;EACA,8CAAA;CJwhCD;AIrhCD;EACE,4DAAA;EACA,gBAAA;EACA,wBAAA;EACA,eAAA;EACA,uBAAA;CJuhCD;AInhCD;;;;EAIE,qBAAA;EACA,mBAAA;EACA,qBAAA;CJqhCD;AI/gCD;EACE,eAAA;EACA,sBAAA;CJihCD;AI/gCC;;EAEE,eAAA;EACA,2BAAA;CJihCH;AI9gCC;EEnDA,2CAAA;EACA,qBAAA;CNokCD;AIvgCD;EACE,UAAA;CJygCD;AIngCD;EACE,uBAAA;CJqgCD;AIjgCD;;;;;EGvEE,eAAA;EACA,gBAAA;EACA,aAAA;CP+kCD;AIrgCD;EACE,mBAAA;CJugCD;AIjgCD;EACE,aAAA;EACA,wBAAA;EACA,uBAAA;EACA,uBAAA;EACA,mBAAA;EC6FA,yCAAA;EACK,oCAAA;EACG,iCAAA;EEvLR,sBAAA;EACA,gBAAA;EACA,aAAA;CP+lCD;AIjgCD;EACE,mBAAA;CJmgCD;AI7/BD;EACE,iBAAA;EACA,oBAAA;EACA,UAAA;EACA,8BAAA;CJ+/BD;AIv/BD;EACE,mBAAA;EACA,WAAA;EACA,YAAA;EACA,aAAA;EACA,WAAA;EACA,iBAAA;EACA,uBAAA;EACA,UAAA;CJy/BD;AIj/BC;;EAEE,iBAAA;EACA,YAAA;EACA,aAAA;EACA,UAAA;EACA,kBAAA;EACA,WAAA;CJm/BH;AIx+BD;EACE,gBAAA;CJ0+BD;AQjoCD;;;;;;;;;;;;EAEE,qBAAA;EACA,iBAAA;EACA,iBAAA;EACA,eAAA;CR6oCD;AQlpCD;;;;;;;;;;;;;;;;;;;;;;;;EASI,oBAAA;EACA,eAAA;EACA,eAAA;CRmqCH;AQ/pCD;;;;;;EAGE,iBAAA;EACA,oBAAA;CRoqCD;AQxqCD;;;;;;;;;;;;EAQI,eAAA;CR8qCH;AQ3qCD;;;;;;EAGE,iBAAA;EACA,oBAAA;CRgrCD;AQprCD;;;;;;;;;;;;EAQI,eAAA;CR0rCH;AQtrCD;;EAAU,gBAAA;CR0rCT;AQzrCD;;EAAU,gBAAA;CR6rCT;AQ5rCD;;EAAU,gBAAA;CRgsCT;AQ/rCD;;EAAU,gBAAA;CRmsCT;AQlsCD;;EAAU,gBAAA;CRssCT;AQrsCD;;EAAU,gBAAA;CRysCT;AQnsCD;EACE,iBAAA;CRqsCD;AQlsCD;EACE,oBAAA;EACA,gBAAA;EACA,iBAAA;EACA,iBAAA;CRosCD;AQ/rCD;EAwOA;IA1OI,gBAAA;GRqsCD;CACF;AQ7rCD;;EAEE,eAAA;CR+rCD;AQ5rCD;;EAEE,0BAAA;EACA,cAAA;CR8rCD;AQ1rCD;EAAuB,iBAAA;CR6rCtB;AQ5rCD;EAAuB,kBAAA;CR+rCtB;AQ9rCD;EAAuB,mBAAA;CRisCtB;AQhsCD;EAAuB,oBAAA;CRmsCtB;AQlsCD;EAAuB,oBAAA;CRqsCtB;AQlsCD;EAAuB,0BAAA;CRqsCtB;AQpsCD;EAAuB,0BAAA;CRusCtB;AQtsCD;EAAuB,2BAAA;CRysCtB;AQtsCD;EACE,eAAA;CRwsCD;AQtsCD;ECrGE,eAAA;CT8yCD;AS7yCC;;EAEE,eAAA;CT+yCH;AQ1sCD;ECxGE,eAAA;CTqzCD;ASpzCC;;EAEE,eAAA;CTszCH;AQ9sCD;EC3GE,eAAA;CT4zCD;AS3zCC;;EAEE,eAAA;CT6zCH;AQltCD;EC9GE,eAAA;CTm0CD;ASl0CC;;EAEE,eAAA;CTo0CH;AQttCD;ECjHE,eAAA;CT00CD;ASz0CC;;EAEE,eAAA;CT20CH;AQttCD;EAGE,YAAA;EE3HA,0BAAA;CVk1CD;AUj1CC;;EAEE,0BAAA;CVm1CH;AQxtCD;EE9HE,0BAAA;CVy1CD;AUx1CC;;EAEE,0BAAA;CV01CH;AQ5tCD;EEjIE,0BAAA;CVg2CD;AU/1CC;;EAEE,0BAAA;CVi2CH;AQhuCD;EEpIE,0BAAA;CVu2CD;AUt2CC;;EAEE,0BAAA;CVw2CH;AQpuCD;EEvIE,0BAAA;CV82CD;AU72CC;;EAEE,0BAAA;CV+2CH;AQnuCD;EACE,oBAAA;EACA,oBAAA;EACA,iCAAA;CRquCD;AQ7tCD;;EAEE,cAAA;EACA,oBAAA;CR+tCD;AQluCD;;;;EAMI,iBAAA;CRkuCH;AQ3tCD;EACE,gBAAA;EACA,iBAAA;CR6tCD;AQztCD;EALE,gBAAA;EACA,iBAAA;EAMA,kBAAA;CR4tCD;AQ9tCD;EAKI,sBAAA;EACA,kBAAA;EACA,mBAAA;CR4tCH;AQvtCD;EACE,cAAA;EACA,oBAAA;CRytCD;AQvtCD;;EAEE,wBAAA;CRytCD;AQvtCD;EACE,kBAAA;CRytCD;AQvtCD;EACE,eAAA;CRytCD;AQhsCD;EA6EA;IAvFM,YAAA;IACA,aAAA;IACA,YAAA;IACA,kBAAA;IGtNJ,iBAAA;IACA,wBAAA;IACA,oBAAA;GXq6CC;EQ7nCH;IAhFM,mBAAA;GRgtCH;CACF;AQvsCD;;EAGE,aAAA;EACA,kCAAA;CRwsCD;AQtsCD;EACE,eAAA;EA9IqB,0BAAA;CRu1CtB;AQpsCD;EACE,mBAAA;EACA,iBAAA;EACA,kBAAA;EACA,+BAAA;CRssCD;AQjsCG;;;EACE,iBAAA;CRqsCL;AQ/sCD;;;EAmBI,eAAA;EACA,eAAA;EACA,wBAAA;EACA,eAAA;CRisCH;AQ/rCG;;;EACE,uBAAA;CRmsCL;AQ3rCD;;EAEE,oBAAA;EACA,gBAAA;EACA,gCAAA;EACA,eAAA;EACA,kBAAA;CR6rCD;AQvrCG;;;;;;EAAW,YAAA;CR+rCd;AQ9rCG;;;;;;EACE,uBAAA;CRqsCL;AQ/rCD;EACE,oBAAA;EACA,mBAAA;EACA,wBAAA;CRisCD;AYv+CD;;;;EAIE,+DAAA;CZy+CD;AYr+CD;EACE,iBAAA;EACA,eAAA;EACA,eAAA;EACA,0BAAA;EACA,mBAAA;CZu+CD;AYn+CD;EACE,iBAAA;EACA,eAAA;EACA,YAAA;EACA,uBAAA;EACA,mBAAA;EACA,uDAAA;UAAA,+CAAA;CZq+CD;AY3+CD;EASI,WAAA;EACA,gBAAA;EACA,kBAAA;EACA,yBAAA;UAAA,iBAAA;CZq+CH;AYh+CD;EACE,eAAA;EACA,eAAA;EACA,iBAAA;EACA,gBAAA;EACA,wBAAA;EACA,sBAAA;EACA,sBAAA;EACA,eAAA;EACA,0BAAA;EACA,uBAAA;EACA,mBAAA;CZk+CD;AY7+CD;EAeI,WAAA;EACA,mBAAA;EACA,eAAA;EACA,sBAAA;EACA,8BAAA;EACA,iBAAA;CZi+CH;AY59CD;EACE,kBAAA;EACA,mBAAA;CZ89CD;AaxhDD;ECHE,mBAAA;EACA,kBAAA;EACA,mBAAA;EACA,oBAAA;Cd8hDD;AaxhDC;EAqEF;IAvEI,aAAA;Gb8hDD;CACF;Aa1hDC;EAkEF;IApEI,aAAA;GbgiDD;CACF;Aa5hDD;EA+DA;IAjEI,cAAA;GbkiDD;CACF;AazhDD;ECvBE,mBAAA;EACA,kBAAA;EACA,mBAAA;EACA,oBAAA;CdmjDD;AathDD;ECvBE,mBAAA;EACA,oBAAA;CdgjDD;AehjDG;EACE,mBAAA;EAEA,gBAAA;EAEA,mBAAA;EACA,oBAAA;CfgjDL;AehiDG;EACE,YAAA;CfkiDL;Ae3hDC;EACE,YAAA;Cf6hDH;Ae9hDC;EACE,oBAAA;CfgiDH;AejiDC;EACE,oBAAA;CfmiDH;AepiDC;EACE,WAAA;CfsiDH;AeviDC;EACE,oBAAA;CfyiDH;Ae1iDC;EACE,oBAAA;Cf4iDH;Ae7iDC;EACE,WAAA;Cf+iDH;AehjDC;EACE,oBAAA;CfkjDH;AenjDC;EACE,oBAAA;CfqjDH;AetjDC;EACE,WAAA;CfwjDH;AezjDC;EACE,oBAAA;Cf2jDH;Ae5jDC;EACE,mBAAA;Cf8jDH;AehjDC;EACE,YAAA;CfkjDH;AenjDC;EACE,oBAAA;CfqjDH;AetjDC;EACE,oBAAA;CfwjDH;AezjDC;EACE,WAAA;Cf2jDH;Ae5jDC;EACE,oBAAA;Cf8jDH;Ae/jDC;EACE,oBAAA;CfikDH;AelkDC;EACE,WAAA;CfokDH;AerkDC;EACE,oBAAA;CfukDH;AexkDC;EACE,oBAAA;Cf0kDH;Ae3kDC;EACE,WAAA;Cf6kDH;Ae9kDC;EACE,oBAAA;CfglDH;AejlDC;EACE,mBAAA;CfmlDH;Ae/kDC;EACE,YAAA;CfilDH;AejmDC;EACE,WAAA;CfmmDH;AepmDC;EACE,mBAAA;CfsmDH;AevmDC;EACE,mBAAA;CfymDH;Ae1mDC;EACE,UAAA;Cf4mDH;Ae7mDC;EACE,mBAAA;Cf+mDH;AehnDC;EACE,mBAAA;CfknDH;AennDC;EACE,UAAA;CfqnDH;AetnDC;EACE,mBAAA;CfwnDH;AeznDC;EACE,mBAAA;Cf2nDH;Ae5nDC;EACE,UAAA;Cf8nDH;Ae/nDC;EACE,mBAAA;CfioDH;AeloDC;EACE,kBAAA;CfooDH;AehoDC;EACE,WAAA;CfkoDH;AepnDC;EACE,kBAAA;CfsnDH;AevnDC;EACE,0BAAA;CfynDH;Ae1nDC;EACE,0BAAA;Cf4nDH;Ae7nDC;EACE,iBAAA;Cf+nDH;AehoDC;EACE,0BAAA;CfkoDH;AenoDC;EACE,0BAAA;CfqoDH;AetoDC;EACE,iBAAA;CfwoDH;AezoDC;EACE,0BAAA;Cf2oDH;Ae5oDC;EACE,0BAAA;Cf8oDH;Ae/oDC;EACE,iBAAA;CfipDH;AelpDC;EACE,0BAAA;CfopDH;AerpDC;EACE,yBAAA;CfupDH;AexpDC;EACE,gBAAA;Cf0pDH;Aa1pDD;EElCI;IACE,YAAA;Gf+rDH;EexrDD;IACE,YAAA;Gf0rDD;Ee3rDD;IACE,oBAAA;Gf6rDD;Ee9rDD;IACE,oBAAA;GfgsDD;EejsDD;IACE,WAAA;GfmsDD;EepsDD;IACE,oBAAA;GfssDD;EevsDD;IACE,oBAAA;GfysDD;Ee1sDD;IACE,WAAA;Gf4sDD;Ee7sDD;IACE,oBAAA;Gf+sDD;EehtDD;IACE,oBAAA;GfktDD;EentDD;IACE,WAAA;GfqtDD;EettDD;IACE,oBAAA;GfwtDD;EeztDD;IACE,mBAAA;Gf2tDD;Ee7sDD;IACE,YAAA;Gf+sDD;EehtDD;IACE,oBAAA;GfktDD;EentDD;IACE,oBAAA;GfqtDD;EettDD;IACE,WAAA;GfwtDD;EeztDD;IACE,oBAAA;Gf2tDD;Ee5tDD;IACE,oBAAA;Gf8tDD;Ee/tDD;IACE,WAAA;GfiuDD;EeluDD;IACE,oBAAA;GfouDD;EeruDD;IACE,oBAAA;GfuuDD;EexuDD;IACE,WAAA;Gf0uDD;Ee3uDD;IACE,oBAAA;Gf6uDD;Ee9uDD;IACE,mBAAA;GfgvDD;Ee5uDD;IACE,YAAA;Gf8uDD;Ee9vDD;IACE,WAAA;GfgwDD;EejwDD;IACE,mBAAA;GfmwDD;EepwDD;IACE,mBAAA;GfswDD;EevwDD;IACE,UAAA;GfywDD;Ee1wDD;IACE,mBAAA;Gf4wDD;Ee7wDD;IACE,mBAAA;Gf+wDD;EehxDD;IACE,UAAA;GfkxDD;EenxDD;IACE,mBAAA;GfqxDD;EetxDD;IACE,mBAAA;GfwxDD;EezxDD;IACE,UAAA;Gf2xDD;Ee5xDD;IACE,mBAAA;Gf8xDD;Ee/xDD;IACE,kBAAA;GfiyDD;Ee7xDD;IACE,WAAA;Gf+xDD;EejxDD;IACE,kBAAA;GfmxDD;EepxDD;IACE,0BAAA;GfsxDD;EevxDD;IACE,0BAAA;GfyxDD;Ee1xDD;IACE,iBAAA;Gf4xDD;Ee7xDD;IACE,0BAAA;Gf+xDD;EehyDD;IACE,0BAAA;GfkyDD;EenyDD;IACE,iBAAA;GfqyDD;EetyDD;IACE,0BAAA;GfwyDD;EezyDD;IACE,0BAAA;Gf2yDD;Ee5yDD;IACE,iBAAA;Gf8yDD;Ee/yDD;IACE,0BAAA;GfizDD;EelzDD;IACE,yBAAA;GfozDD;EerzDD;IACE,gBAAA;GfuzDD;CACF;Aa/yDD;EE3CI;IACE,YAAA;Gf61DH;Eet1DD;IACE,YAAA;Gfw1DD;Eez1DD;IACE,oBAAA;Gf21DD;Ee51DD;IACE,oBAAA;Gf81DD;Ee/1DD;IACE,WAAA;Gfi2DD;Eel2DD;IACE,oBAAA;Gfo2DD;Eer2DD;IACE,oBAAA;Gfu2DD;Eex2DD;IACE,WAAA;Gf02DD;Ee32DD;IACE,oBAAA;Gf62DD;Ee92DD;IACE,oBAAA;Gfg3DD;Eej3DD;IACE,WAAA;Gfm3DD;Eep3DD;IACE,oBAAA;Gfs3DD;Eev3DD;IACE,mBAAA;Gfy3DD;Ee32DD;IACE,YAAA;Gf62DD;Ee92DD;IACE,oBAAA;Gfg3DD;Eej3DD;IACE,oBAAA;Gfm3DD;Eep3DD;IACE,WAAA;Gfs3DD;Eev3DD;IACE,oBAAA;Gfy3DD;Ee13DD;IACE,oBAAA;Gf43DD;Ee73DD;IACE,WAAA;Gf+3DD;Eeh4DD;IACE,oBAAA;Gfk4DD;Een4DD;IACE,oBAAA;Gfq4DD;Eet4DD;IACE,WAAA;Gfw4DD;Eez4DD;IACE,oBAAA;Gf24DD;Ee54DD;IACE,mBAAA;Gf84DD;Ee14DD;IACE,YAAA;Gf44DD;Ee55DD;IACE,WAAA;Gf85DD;Ee/5DD;IACE,mBAAA;Gfi6DD;Eel6DD;IACE,mBAAA;Gfo6DD;Eer6DD;IACE,UAAA;Gfu6DD;Eex6DD;IACE,mBAAA;Gf06DD;Ee36DD;IACE,mBAAA;Gf66DD;Ee96DD;IACE,UAAA;Gfg7DD;Eej7DD;IACE,mBAAA;Gfm7DD;Eep7DD;IACE,mBAAA;Gfs7DD;Eev7DD;IACE,UAAA;Gfy7DD;Ee17DD;IACE,mBAAA;Gf47DD;Ee77DD;IACE,kBAAA;Gf+7DD;Ee37DD;IACE,WAAA;Gf67DD;Ee/6DD;IACE,kBAAA;Gfi7DD;Eel7DD;IACE,0BAAA;Gfo7DD;Eer7DD;IACE,0BAAA;Gfu7DD;Eex7DD;IACE,iBAAA;Gf07DD;Ee37DD;IACE,0BAAA;Gf67DD;Ee97DD;IACE,0BAAA;Gfg8DD;Eej8DD;IACE,iBAAA;Gfm8DD;Eep8DD;IACE,0BAAA;Gfs8DD;Eev8DD;IACE,0BAAA;Gfy8DD;Ee18DD;IACE,iBAAA;Gf48DD;Ee78DD;IACE,0BAAA;Gf+8DD;Eeh9DD;IACE,yBAAA;Gfk9DD;Een9DD;IACE,gBAAA;Gfq9DD;CACF;Aa18DD;EE9CI;IACE,YAAA;Gf2/DH;Eep/DD;IACE,YAAA;Gfs/DD;Eev/DD;IACE,oBAAA;Gfy/DD;Ee1/DD;IACE,oBAAA;Gf4/DD;Ee7/DD;IACE,WAAA;Gf+/DD;EehgED;IACE,oBAAA;GfkgED;EengED;IACE,oBAAA;GfqgED;EetgED;IACE,WAAA;GfwgED;EezgED;IACE,oBAAA;Gf2gED;Ee5gED;IACE,oBAAA;Gf8gED;Ee/gED;IACE,WAAA;GfihED;EelhED;IACE,oBAAA;GfohED;EerhED;IACE,mBAAA;GfuhED;EezgED;IACE,YAAA;Gf2gED;Ee5gED;IACE,oBAAA;Gf8gED;Ee/gED;IACE,oBAAA;GfihED;EelhED;IACE,WAAA;GfohED;EerhED;IACE,oBAAA;GfuhED;EexhED;IACE,oBAAA;Gf0hED;Ee3hED;IACE,WAAA;Gf6hED;Ee9hED;IACE,oBAAA;GfgiED;EejiED;IACE,oBAAA;GfmiED;EepiED;IACE,WAAA;GfsiED;EeviED;IACE,oBAAA;GfyiED;Ee1iED;IACE,mBAAA;Gf4iED;EexiED;IACE,YAAA;Gf0iED;Ee1jED;IACE,WAAA;Gf4jED;Ee7jED;IACE,mBAAA;Gf+jED;EehkED;IACE,mBAAA;GfkkED;EenkED;IACE,UAAA;GfqkED;EetkED;IACE,mBAAA;GfwkED;EezkED;IACE,mBAAA;Gf2kED;Ee5kED;IACE,UAAA;Gf8kED;Ee/kED;IACE,mBAAA;GfilED;EellED;IACE,mBAAA;GfolED;EerlED;IACE,UAAA;GfulED;EexlED;IACE,mBAAA;Gf0lED;Ee3lED;IACE,kBAAA;Gf6lED;EezlED;IACE,WAAA;Gf2lED;Ee7kED;IACE,kBAAA;Gf+kED;EehlED;IACE,0BAAA;GfklED;EenlED;IACE,0BAAA;GfqlED;EetlED;IACE,iBAAA;GfwlED;EezlED;IACE,0BAAA;Gf2lED;Ee5lED;IACE,0BAAA;Gf8lED;Ee/lED;IACE,iBAAA;GfimED;EelmED;IACE,0BAAA;GfomED;EermED;IACE,0BAAA;GfumED;EexmED;IACE,iBAAA;Gf0mED;Ee3mED;IACE,0BAAA;Gf6mED;Ee9mED;IACE,yBAAA;GfgnED;EejnED;IACE,gBAAA;GfmnED;CACF;AgBvrED;EACE,8BAAA;ChByrED;AgBvrED;EACE,iBAAA;EACA,oBAAA;EACA,eAAA;EACA,iBAAA;ChByrED;AgBvrED;EACE,iBAAA;ChByrED;AgBnrED;EACE,YAAA;EACA,gBAAA;EACA,oBAAA;ChBqrED;AgBxrED;;;;;;EAWQ,aAAA;EACA,wBAAA;EACA,oBAAA;EACA,2BAAA;ChBqrEP;AgBnsED;EAoBI,uBAAA;EACA,8BAAA;ChBkrEH;AgBvsED;;;;;;EA8BQ,cAAA;ChBirEP;AgB/sED;EAoCI,2BAAA;ChB8qEH;AgBltED;EAyCI,uBAAA;ChB4qEH;AgBrqED;;;;;;EAOQ,aAAA;ChBsqEP;AgB3pED;EACE,uBAAA;ChB6pED;AgB9pED;;;;;;EAQQ,uBAAA;ChB8pEP;AgBtqED;;EAeM,yBAAA;ChB2pEL;AgBjpED;EAEI,0BAAA;ChBkpEH;AgBzoED;EAEI,0BAAA;ChB0oEH;AgBjoED;EACE,iBAAA;EACA,YAAA;EACA,sBAAA;ChBmoED;AgB9nEG;;EACE,iBAAA;EACA,YAAA;EACA,oBAAA;ChBioEL;AiB7wEC;;;;;;;;;;;;EAOI,0BAAA;CjBoxEL;AiB9wEC;;;;;EAMI,0BAAA;CjB+wEL;AiBlyEC;;;;;;;;;;;;EAOI,0BAAA;CjByyEL;AiBnyEC;;;;;EAMI,0BAAA;CjBoyEL;AiBvzEC;;;;;;;;;;;;EAOI,0BAAA;CjB8zEL;AiBxzEC;;;;;EAMI,0BAAA;CjByzEL;AiB50EC;;;;;;;;;;;;EAOI,0BAAA;CjBm1EL;AiB70EC;;;;;EAMI,0BAAA;CjB80EL;AiBj2EC;;;;;;;;;;;;EAOI,0BAAA;CjBw2EL;AiBl2EC;;;;;EAMI,0BAAA;CjBm2EL;AgBjtED;EACE,iBAAA;EACA,kBAAA;ChBmtED;AgBtpED;EACA;IA3DI,YAAA;IACA,oBAAA;IACA,mBAAA;IACA,6CAAA;IACA,uBAAA;GhBotED;EgB7pEH;IAnDM,iBAAA;GhBmtEH;EgBhqEH;;;;;;IA1CY,oBAAA;GhBktET;EgBxqEH;IAlCM,UAAA;GhB6sEH;EgB3qEH;;;;;;IAzBY,eAAA;GhB4sET;EgBnrEH;;;;;;IArBY,gBAAA;GhBgtET;EgB3rEH;;;;IARY,iBAAA;GhBysET;CACF;AkBn6ED;EACE,WAAA;EACA,UAAA;EACA,UAAA;EAIA,aAAA;ClBk6ED;AkB/5ED;EACE,eAAA;EACA,YAAA;EACA,WAAA;EACA,oBAAA;EACA,gBAAA;EACA,qBAAA;EACA,eAAA;EACA,UAAA;EACA,iCAAA;ClBi6ED;AkB95ED;EACE,sBAAA;EACA,gBAAA;EACA,mBAAA;EACA,kBAAA;ClBg6ED;AkBr5ED;Eb4BE,+BAAA;EACG,4BAAA;EACK,uBAAA;CL43ET;AkBr5ED;;EAEE,gBAAA;EACA,mBAAA;EACA,oBAAA;ClBu5ED;AkBp5ED;EACE,eAAA;ClBs5ED;AkBl5ED;EACE,eAAA;EACA,YAAA;ClBo5ED;AkBh5ED;;EAEE,aAAA;ClBk5ED;AkB94ED;;;EZrEE,2CAAA;EACA,qBAAA;CNw9ED;AkB74ED;EACE,eAAA;EACA,iBAAA;EACA,gBAAA;EACA,wBAAA;EACA,eAAA;ClB+4ED;AkBr3ED;EACE,eAAA;EACA,YAAA;EACA,aAAA;EACA,kBAAA;EACA,gBAAA;EACA,wBAAA;EACA,eAAA;EACA,uBAAA;EACA,uBAAA;EACA,uBAAA;EACA,mBAAA;EbxDA,yDAAA;EACQ,iDAAA;EAyHR,uFAAA;EACK,0EAAA;EACG,uEAAA;CLwzET;AmBh8EC;EACE,sBAAA;EACA,WAAA;EdUF,uFAAA;EACQ,+EAAA;CLy7ET;AKx5EC;EACE,YAAA;EACA,WAAA;CL05EH;AKx5EC;EAA0B,YAAA;CL25E3B;AK15EC;EAAgC,YAAA;CL65EjC;AkBj4EC;EACE,UAAA;EACA,8BAAA;ClBm4EH;AkB33EC;;;EAGE,0BAAA;EACA,WAAA;ClB63EH;AkB13EC;;EAEE,oBAAA;ClB43EH;AkBx3EC;EACE,aAAA;ClB03EH;AkB92ED;EACE,yBAAA;ClBg3ED;AkBx0ED;EAtBI;;;;IACE,kBAAA;GlBo2EH;EkBj2EC;;;;;;;;IAEE,kBAAA;GlBy2EH;EkBt2EC;;;;;;;;IAEE,kBAAA;GlB82EH;CACF;AkBp2ED;EACE,oBAAA;ClBs2ED;AkB91ED;;EAEE,mBAAA;EACA,eAAA;EACA,iBAAA;EACA,oBAAA;ClBg2ED;AkBr2ED;;EAQI,iBAAA;EACA,mBAAA;EACA,iBAAA;EACA,oBAAA;EACA,gBAAA;ClBi2EH;AkB91ED;;;;EAIE,mBAAA;EACA,mBAAA;EACA,mBAAA;ClBg2ED;AkB71ED;;EAEE,iBAAA;ClB+1ED;AkB31ED;;EAEE,mBAAA;EACA,sBAAA;EACA,mBAAA;EACA,iBAAA;EACA,uBAAA;EACA,oBAAA;EACA,gBAAA;ClB61ED;AkB31ED;;EAEE,cAAA;EACA,kBAAA;ClB61ED;AkBp1EC;;;;;;EAGE,oBAAA;ClBy1EH;AkBn1EC;;;;EAEE,oBAAA;ClBu1EH;AkBj1EC;;;;EAGI,oBAAA;ClBo1EL;AkBz0ED;EAEE,iBAAA;EACA,oBAAA;EAEA,iBAAA;EACA,iBAAA;ClBy0ED;AkBv0EC;;EAEE,gBAAA;EACA,iBAAA;ClBy0EH;AkB5zED;ECnQE,aAAA;EACA,kBAAA;EACA,gBAAA;EACA,iBAAA;EACA,mBAAA;CnBkkFD;AmBhkFC;EACE,aAAA;EACA,kBAAA;CnBkkFH;AmB/jFC;;EAEE,aAAA;CnBikFH;AkBx0ED;EAEI,aAAA;EACA,kBAAA;EACA,gBAAA;EACA,iBAAA;EACA,mBAAA;ClBy0EH;AkB/0ED;EASI,aAAA;EACA,kBAAA;ClBy0EH;AkBn1ED;;EAcI,aAAA;ClBy0EH;AkBv1ED;EAiBI,aAAA;EACA,iBAAA;EACA,kBAAA;EACA,gBAAA;EACA,iBAAA;ClBy0EH;AkBr0ED;EC/RE,aAAA;EACA,mBAAA;EACA,gBAAA;EACA,uBAAA;EACA,mBAAA;CnBumFD;AmBrmFC;EACE,aAAA;EACA,kBAAA;CnBumFH;AmBpmFC;;EAEE,aAAA;CnBsmFH;AkBj1ED;EAEI,aAAA;EACA,mBAAA;EACA,gBAAA;EACA,uBAAA;EACA,mBAAA;ClBk1EH;AkBx1ED;EASI,aAAA;EACA,kBAAA;ClBk1EH;AkB51ED;;EAcI,aAAA;ClBk1EH;AkBh2ED;EAiBI,aAAA;EACA,iBAAA;EACA,mBAAA;EACA,gBAAA;EACA,uBAAA;ClBk1EH;AkBz0ED;EAEE,mBAAA;ClB00ED;AkB50ED;EAMI,sBAAA;ClBy0EH;AkBr0ED;EACE,mBAAA;EACA,OAAA;EACA,SAAA;EACA,WAAA;EACA,eAAA;EACA,YAAA;EACA,aAAA;EACA,kBAAA;EACA,mBAAA;EACA,qBAAA;ClBu0ED;AkBr0ED;;;EAGE,YAAA;EACA,aAAA;EACA,kBAAA;ClBu0ED;AkBr0ED;;;EAGE,YAAA;EACA,aAAA;EACA,kBAAA;ClBu0ED;AkBn0ED;;;;;;;;;;EC1ZI,eAAA;CnByuFH;AkB/0ED;ECtZI,sBAAA;Ed+CF,yDAAA;EACQ,iDAAA;CL0rFT;AmBxuFG;EACE,sBAAA;Ed4CJ,0EAAA;EACQ,kEAAA;CL+rFT;AkBz1ED;EC5YI,eAAA;EACA,sBAAA;EACA,0BAAA;CnBwuFH;AkB91ED;ECtYI,eAAA;CnBuuFH;AkB91ED;;;;;;;;;;EC7ZI,eAAA;CnBuwFH;AkB12ED;ECzZI,sBAAA;Ed+CF,yDAAA;EACQ,iDAAA;CLwtFT;AmBtwFG;EACE,sBAAA;Ed4CJ,0EAAA;EACQ,kEAAA;CL6tFT;AkBp3ED;EC/YI,eAAA;EACA,sBAAA;EACA,0BAAA;CnBswFH;AkBz3ED;ECzYI,eAAA;CnBqwFH;AkBz3ED;;;;;;;;;;EChaI,eAAA;CnBqyFH;AkBr4ED;EC5ZI,sBAAA;Ed+CF,yDAAA;EACQ,iDAAA;CLsvFT;AmBpyFG;EACE,sBAAA;Ed4CJ,0EAAA;EACQ,kEAAA;CL2vFT;AkB/4ED;EClZI,eAAA;EACA,sBAAA;EACA,0BAAA;CnBoyFH;AkBp5ED;EC5YI,eAAA;CnBmyFH;AkBh5EC;EACE,UAAA;ClBk5EH;AkBh5EC;EACE,OAAA;ClBk5EH;AkBx4ED;EACE,eAAA;EACA,gBAAA;EACA,oBAAA;EACA,eAAA;ClB04ED;AkBvzED;EAwEA;IAtIM,sBAAA;IACA,iBAAA;IACA,uBAAA;GlBy3EH;EkBrvEH;IA/HM,sBAAA;IACA,YAAA;IACA,uBAAA;GlBu3EH;EkB1vEH;IAxHM,sBAAA;GlBq3EH;EkB7vEH;IApHM,sBAAA;IACA,uBAAA;GlBo3EH;EkBjwEH;;;IA9GQ,YAAA;GlBo3EL;EkBtwEH;IAxGM,YAAA;GlBi3EH;EkBzwEH;IApGM,iBAAA;IACA,uBAAA;GlBg3EH;EkB7wEH;;IA5FM,sBAAA;IACA,cAAA;IACA,iBAAA;IACA,uBAAA;GlB62EH;EkBpxEH;;IAtFQ,gBAAA;GlB82EL;EkBxxEH;;IAjFM,mBAAA;IACA,eAAA;GlB62EH;EkB7xEH;IA3EM,OAAA;GlB22EH;CACF;AkBj2ED;;;;EASI,cAAA;EACA,iBAAA;EACA,iBAAA;ClB81EH;AkBz2ED;;EAiBI,iBAAA;ClB41EH;AkB72ED;EJthBE,mBAAA;EACA,oBAAA;Cds4FD;AkB10EC;EAyBF;IAnCM,kBAAA;IACA,iBAAA;IACA,iBAAA;GlBw1EH;CACF;AkBx3ED;EAwCI,YAAA;ClBm1EH;AkBr0EC;EAUF;IAdQ,kBAAA;IACA,gBAAA;GlB60EL;CACF;AkBn0EC;EAEF;IANQ,iBAAA;IACA,gBAAA;GlB20EL;CACF;AoBp6FD;EACE,sBAAA;EACA,iBAAA;EACA,oBAAA;EACA,mBAAA;EACA,uBAAA;EACA,+BAAA;MAAA,2BAAA;EACA,gBAAA;EACA,uBAAA;EACA,8BAAA;EACA,oBAAA;EC0CA,kBAAA;EACA,gBAAA;EACA,wBAAA;EACA,mBAAA;EhB+JA,0BAAA;EACG,uBAAA;EACC,sBAAA;EACI,kBAAA;CL+tFT;AoBv6FG;;;;;;EdnBF,2CAAA;EACA,qBAAA;CNk8FD;AoB16FC;;;EAGE,YAAA;EACA,sBAAA;CpB46FH;AoBz6FC;;EAEE,WAAA;EACA,uBAAA;Ef2BF,yDAAA;EACQ,iDAAA;CLi5FT;AoBz6FC;;;EAGE,oBAAA;EE7CF,cAAA;EAGA,0BAAA;EjB8DA,yBAAA;EACQ,iBAAA;CL05FT;AoBz6FG;;EAEE,qBAAA;CpB26FL;AoBl6FD;EC3DE,YAAA;EACA,uBAAA;EACA,mBAAA;CrBg+FD;AqB99FC;;EAEE,YAAA;EACA,0BAAA;EACI,sBAAA;CrBg+FP;AqB99FC;EACE,YAAA;EACA,0BAAA;EACI,sBAAA;CrBg+FP;AqB99FC;;;EAGE,YAAA;EACA,0BAAA;EACI,sBAAA;CrBg+FP;AqB99FG;;;;;;;;;EAGE,YAAA;EACA,0BAAA;EACI,sBAAA;CrBs+FT;AqBn+FC;;;EAGE,uBAAA;CrBq+FH;AqBh+FG;;;;;;;;;EAGE,uBAAA;EACI,mBAAA;CrBw+FT;AoBv9FD;ECZI,YAAA;EACA,uBAAA;CrBs+FH;AoBx9FD;EC9DE,YAAA;EACA,0BAAA;EACA,sBAAA;CrByhGD;AqBvhGC;;EAEE,YAAA;EACA,0BAAA;EACI,sBAAA;CrByhGP;AqBvhGC;EACE,YAAA;EACA,0BAAA;EACI,sBAAA;CrByhGP;AqBvhGC;;;EAGE,YAAA;EACA,0BAAA;EACI,sBAAA;CrByhGP;AqBvhGG;;;;;;;;;EAGE,YAAA;EACA,0BAAA;EACI,sBAAA;CrB+hGT;AqB5hGC;;;EAGE,uBAAA;CrB8hGH;AqBzhGG;;;;;;;;;EAGE,0BAAA;EACI,sBAAA;CrBiiGT;AoB7gGD;ECfI,eAAA;EACA,uBAAA;CrB+hGH;AoB7gGD;EClEE,YAAA;EACA,0BAAA;EACA,sBAAA;CrBklGD;AqBhlGC;;EAEE,YAAA;EACA,0BAAA;EACI,sBAAA;CrBklGP;AqBhlGC;EACE,YAAA;EACA,0BAAA;EACI,sBAAA;CrBklGP;AqBhlGC;;;EAGE,YAAA;EACA,0BAAA;EACI,sBAAA;CrBklGP;AqBhlGG;;;;;;;;;EAGE,YAAA;EACA,0BAAA;EACI,sBAAA;CrBwlGT;AqBrlGC;;;EAGE,uBAAA;CrBulGH;AqBllGG;;;;;;;;;EAGE,0BAAA;EACI,sBAAA;CrB0lGT;AoBlkGD;ECnBI,eAAA;EACA,uBAAA;CrBwlGH;AoBlkGD;ECtEE,YAAA;EACA,0BAAA;EACA,sBAAA;CrB2oGD;AqBzoGC;;EAEE,YAAA;EACA,0BAAA;EACI,sBAAA;CrB2oGP;AqBzoGC;EACE,YAAA;EACA,0BAAA;EACI,sBAAA;CrB2oGP;AqBzoGC;;;EAGE,YAAA;EACA,0BAAA;EACI,sBAAA;CrB2oGP;AqBzoGG;;;;;;;;;EAGE,YAAA;EACA,0BAAA;EACI,sBAAA;CrBipGT;AqB9oGC;;;EAGE,uBAAA;CrBgpGH;AqB3oGG;;;;;;;;;EAGE,0BAAA;EACI,sBAAA;CrBmpGT;AoBvnGD;ECvBI,eAAA;EACA,uBAAA;CrBipGH;AoBvnGD;EC1EE,YAAA;EACA,0BAAA;EACA,sBAAA;CrBosGD;AqBlsGC;;EAEE,YAAA;EACA,0BAAA;EACI,sBAAA;CrBosGP;AqBlsGC;EACE,YAAA;EACA,0BAAA;EACI,sBAAA;CrBosGP;AqBlsGC;;;EAGE,YAAA;EACA,0BAAA;EACI,sBAAA;CrBosGP;AqBlsGG;;;;;;;;;EAGE,YAAA;EACA,0BAAA;EACI,sBAAA;CrB0sGT;AqBvsGC;;;EAGE,uBAAA;CrBysGH;AqBpsGG;;;;;;;;;EAGE,0BAAA;EACI,sBAAA;CrB4sGT;AoB5qGD;EC3BI,eAAA;EACA,uBAAA;CrB0sGH;AoB5qGD;EC9EE,YAAA;EACA,0BAAA;EACA,sBAAA;CrB6vGD;AqB3vGC;;EAEE,YAAA;EACA,0BAAA;EACI,sBAAA;CrB6vGP;AqB3vGC;EACE,YAAA;EACA,0BAAA;EACI,sBAAA;CrB6vGP;AqB3vGC;;;EAGE,YAAA;EACA,0BAAA;EACI,sBAAA;CrB6vGP;AqB3vGG;;;;;;;;;EAGE,YAAA;EACA,0BAAA;EACI,sBAAA;CrBmwGT;AqBhwGC;;;EAGE,uBAAA;CrBkwGH;AqB7vGG;;;;;;;;;EAGE,0BAAA;EACI,sBAAA;CrBqwGT;AoBjuGD;EC/BI,eAAA;EACA,uBAAA;CrBmwGH;AoB5tGD;EACE,eAAA;EACA,oBAAA;EACA,iBAAA;CpB8tGD;AoB5tGC;;;;;EAKE,8BAAA;EfnCF,yBAAA;EACQ,iBAAA;CLkwGT;AoB7tGC;;;;EAIE,0BAAA;CpB+tGH;AoB7tGC;;EAEE,eAAA;EACA,2BAAA;EACA,8BAAA;CpB+tGH;AoB3tGG;;;;EAEE,eAAA;EACA,sBAAA;CpB+tGL;AoBttGD;;ECxEE,mBAAA;EACA,gBAAA;EACA,uBAAA;EACA,mBAAA;CrBkyGD;AoBztGD;;EC5EE,kBAAA;EACA,gBAAA;EACA,iBAAA;EACA,mBAAA;CrByyGD;AoB5tGD;;EChFE,iBAAA;EACA,gBAAA;EACA,iBAAA;EACA,mBAAA;CrBgzGD;AoB3tGD;EACE,eAAA;EACA,YAAA;CpB6tGD;AoBztGD;EACE,gBAAA;CpB2tGD;AoBptGC;;;EACE,YAAA;CpBwtGH;AuBl3GD;EACE,WAAA;ElBoLA,yCAAA;EACK,oCAAA;EACG,iCAAA;CLisGT;AuBr3GC;EACE,WAAA;CvBu3GH;AuBn3GD;EACE,cAAA;CvBq3GD;AuBn3GC;EAAY,eAAA;CvBs3Gb;AuBr3GC;EAAY,mBAAA;CvBw3Gb;AuBv3GC;EAAY,yBAAA;CvB03Gb;AuBv3GD;EACE,mBAAA;EACA,UAAA;EACA,iBAAA;ElBuKA,gDAAA;EACQ,2CAAA;KAAA,wCAAA;EAOR,mCAAA;EACQ,8BAAA;KAAA,2BAAA;EAGR,yCAAA;EACQ,oCAAA;KAAA,iCAAA;CL2sGT;AwBr5GD;EACE,sBAAA;EACA,SAAA;EACA,UAAA;EACA,iBAAA;EACA,uBAAA;EACA,uBAAA;EACA,yBAAA;EACA,oCAAA;EACA,mCAAA;CxBu5GD;AwBn5GD;;EAEE,mBAAA;CxBq5GD;AwBj5GD;EACE,WAAA;CxBm5GD;AwB/4GD;EACE,mBAAA;EACA,UAAA;EACA,QAAA;EACA,cAAA;EACA,cAAA;EACA,YAAA;EACA,iBAAA;EACA,eAAA;EACA,gBAAA;EACA,iBAAA;EACA,gBAAA;EACA,iBAAA;EACA,uBAAA;EACA,uBAAA;EACA,sCAAA;EACA,mBAAA;EnBsBA,oDAAA;EACQ,4CAAA;EmBrBR,qCAAA;UAAA,6BAAA;CxBk5GD;AwB74GC;EACE,SAAA;EACA,WAAA;CxB+4GH;AwBx6GD;ECzBE,YAAA;EACA,cAAA;EACA,iBAAA;EACA,0BAAA;CzBo8GD;AwB96GD;EAmCI,eAAA;EACA,kBAAA;EACA,YAAA;EACA,oBAAA;EACA,wBAAA;EACA,eAAA;EACA,oBAAA;CxB84GH;AwBx4GC;;EAEE,sBAAA;EACA,eAAA;EACA,0BAAA;CxB04GH;AwBp4GC;;;EAGE,YAAA;EACA,sBAAA;EACA,WAAA;EACA,0BAAA;CxBs4GH;AwB73GC;;;EAGE,eAAA;CxB+3GH;AwB33GC;;EAEE,sBAAA;EACA,8BAAA;EACA,uBAAA;EE3GF,oEAAA;EF6GE,oBAAA;CxB63GH;AwBx3GD;EAGI,eAAA;CxBw3GH;AwB33GD;EAQI,WAAA;CxBs3GH;AwB92GD;EACE,WAAA;EACA,SAAA;CxBg3GD;AwBx2GD;EACE,QAAA;EACA,YAAA;CxB02GD;AwBt2GD;EACE,eAAA;EACA,kBAAA;EACA,gBAAA;EACA,wBAAA;EACA,eAAA;EACA,oBAAA;CxBw2GD;AwBp2GD;EACE,gBAAA;EACA,QAAA;EACA,SAAA;EACA,UAAA;EACA,OAAA;EACA,aAAA;CxBs2GD;AwBl2GD;EACE,SAAA;EACA,WAAA;CxBo2GD;AwB51GD;;EAII,cAAA;EACA,0BAAA;EACA,4BAAA;EACA,YAAA;CxB41GH;AwBn2GD;;EAWI,UAAA;EACA,aAAA;EACA,mBAAA;CxB41GH;AwBv0GD;EAXE;IApEA,WAAA;IACA,SAAA;GxB05GC;EwBv1GD;IA1DA,QAAA;IACA,YAAA;GxBo5GC;CACF;A2BpiHD;;EAEE,mBAAA;EACA,sBAAA;EACA,uBAAA;C3BsiHD;A2B1iHD;;EAMI,mBAAA;EACA,YAAA;C3BwiHH;A2BtiHG;;;;;;;;EAIE,WAAA;C3B4iHL;A2BtiHD;;;;EAKI,kBAAA;C3BuiHH;A2BliHD;EACE,kBAAA;C3BoiHD;A2BriHD;;;EAOI,YAAA;C3BmiHH;A2B1iHD;;;EAYI,iBAAA;C3BmiHH;A2B/hHD;EACE,iBAAA;C3BiiHD;A2B7hHD;EACE,eAAA;C3B+hHD;A2B9hHC;EClDA,8BAAA;EACG,2BAAA;C5BmlHJ;A2B7hHD;;EC/CE,6BAAA;EACG,0BAAA;C5BglHJ;A2B5hHD;EACE,YAAA;C3B8hHD;A2B5hHD;EACE,iBAAA;C3B8hHD;A2B5hHD;;ECnEE,8BAAA;EACG,2BAAA;C5BmmHJ;A2B3hHD;ECjEE,6BAAA;EACG,0BAAA;C5B+lHJ;A2B1hHD;;EAEE,WAAA;C3B4hHD;A2B3gHD;EACE,kBAAA;EACA,mBAAA;C3B6gHD;A2B3gHD;EACE,mBAAA;EACA,oBAAA;C3B6gHD;A2BxgHD;EtB/CE,yDAAA;EACQ,iDAAA;CL0jHT;A2BxgHC;EtBnDA,yBAAA;EACQ,iBAAA;CL8jHT;A2BrgHD;EACE,eAAA;C3BugHD;A2BpgHD;EACE,wBAAA;EACA,uBAAA;C3BsgHD;A2BngHD;EACE,wBAAA;C3BqgHD;A2B9/GD;;;EAII,eAAA;EACA,YAAA;EACA,YAAA;EACA,gBAAA;C3B+/GH;A2BtgHD;EAcM,YAAA;C3B2/GL;A2BzgHD;;;;EAsBI,iBAAA;EACA,eAAA;C3By/GH;A2Bp/GC;EACE,iBAAA;C3Bs/GH;A2Bp/GC;EC3KA,6BAAA;EACC,4BAAA;EAOD,8BAAA;EACC,6BAAA;C5B4pHF;A2Bt/GC;EC/KA,2BAAA;EACC,0BAAA;EAOD,gCAAA;EACC,+BAAA;C5BkqHF;A2Bv/GD;EACE,iBAAA;C3By/GD;A2Bv/GD;;EC/KE,8BAAA;EACC,6BAAA;C5B0qHF;A2Bt/GD;EC7LE,2BAAA;EACC,0BAAA;C5BsrHF;A2Bl/GD;EACE,eAAA;EACA,YAAA;EACA,oBAAA;EACA,0BAAA;C3Bo/GD;A2Bx/GD;;EAOI,YAAA;EACA,oBAAA;EACA,UAAA;C3Bq/GH;A2B9/GD;EAYI,YAAA;C3Bq/GH;A2BjgHD;EAgBI,WAAA;C3Bo/GH;A2Bn+GD;;;;EAKM,mBAAA;EACA,uBAAA;EACA,qBAAA;C3Bo+GL;A6B9sHD;EACE,mBAAA;EACA,eAAA;EACA,0BAAA;C7BgtHD;A6B7sHC;EACE,YAAA;EACA,gBAAA;EACA,iBAAA;C7B+sHH;A6BxtHD;EAeI,mBAAA;EACA,WAAA;EAKA,YAAA;EAEA,YAAA;EACA,iBAAA;C7BusHH;A6BrsHG;EACE,WAAA;C7BusHL;A6B7rHD;;;EV0BE,aAAA;EACA,mBAAA;EACA,gBAAA;EACA,uBAAA;EACA,mBAAA;CnBwqHD;AmBtqHC;;;EACE,aAAA;EACA,kBAAA;CnB0qHH;AmBvqHC;;;;;;EAEE,aAAA;CnB6qHH;A6B/sHD;;;EVqBE,aAAA;EACA,kBAAA;EACA,gBAAA;EACA,iBAAA;EACA,mBAAA;CnB+rHD;AmB7rHC;;;EACE,aAAA;EACA,kBAAA;CnBisHH;AmB9rHC;;;;;;EAEE,aAAA;CnBosHH;A6B7tHD;;;EAGE,oBAAA;C7B+tHD;A6B7tHC;;;EACE,iBAAA;C7BiuHH;A6B7tHD;;EAEE,UAAA;EACA,oBAAA;EACA,uBAAA;C7B+tHD;A6B1tHD;EACE,kBAAA;EACA,gBAAA;EACA,oBAAA;EACA,eAAA;EACA,eAAA;EACA,mBAAA;EACA,0BAAA;EACA,uBAAA;EACA,mBAAA;C7B4tHD;A6BztHC;EACE,kBAAA;EACA,gBAAA;EACA,mBAAA;C7B2tHH;A6BztHC;EACE,mBAAA;EACA,gBAAA;EACA,mBAAA;C7B2tHH;A6B/uHD;;EA0BI,cAAA;C7BytHH;A6BptHD;;;;;;;EDpGE,8BAAA;EACG,2BAAA;C5Bi0HJ;A6BrtHD;EACE,gBAAA;C7ButHD;A6BrtHD;;;;;;;EDxGE,6BAAA;EACG,0BAAA;C5Bs0HJ;A6BttHD;EACE,eAAA;C7BwtHD;A6BntHD;EACE,mBAAA;EAGA,aAAA;EACA,oBAAA;C7BmtHD;A6BxtHD;EAUI,mBAAA;C7BitHH;A6B3tHD;EAYM,kBAAA;C7BktHL;A6B/sHG;;;EAGE,WAAA;C7BitHL;A6B5sHC;;EAGI,mBAAA;C7B6sHL;A6B1sHC;;EAGI,WAAA;EACA,kBAAA;C7B2sHL;A8B12HD;EACE,iBAAA;EACA,gBAAA;EACA,iBAAA;C9B42HD;A8B/2HD;EAOI,mBAAA;EACA,eAAA;C9B22HH;A8Bn3HD;EAWM,mBAAA;EACA,eAAA;EACA,mBAAA;C9B22HL;A8B12HK;;EAEE,sBAAA;EACA,0BAAA;C9B42HP;A8Bv2HG;EACE,eAAA;C9By2HL;A8Bv2HK;;EAEE,eAAA;EACA,sBAAA;EACA,8BAAA;EACA,oBAAA;C9By2HP;A8Bl2HG;;;EAGE,0BAAA;EACA,sBAAA;C9Bo2HL;A8B74HD;ELHE,YAAA;EACA,cAAA;EACA,iBAAA;EACA,0BAAA;CzBm5HD;A8Bn5HD;EA0DI,gBAAA;C9B41HH;A8Bn1HD;EACE,8BAAA;C9Bq1HD;A8Bt1HD;EAGI,YAAA;EAEA,oBAAA;C9Bq1HH;A8B11HD;EASM,kBAAA;EACA,wBAAA;EACA,8BAAA;EACA,2BAAA;C9Bo1HL;A8Bn1HK;EACE,mCAAA;C9Bq1HP;A8B/0HK;;;EAGE,eAAA;EACA,uBAAA;EACA,uBAAA;EACA,iCAAA;EACA,gBAAA;C9Bi1HP;A8B50HC;EAqDA,YAAA;EA8BA,iBAAA;C9B6vHD;A8Bh1HC;EAwDE,YAAA;C9B2xHH;A8Bn1HC;EA0DI,mBAAA;EACA,mBAAA;C9B4xHL;A8Bv1HC;EAgEE,UAAA;EACA,WAAA;C9B0xHH;A8B9wHD;EA0DA;IAjEM,oBAAA;IACA,UAAA;G9ByxHH;E8BztHH;IA9DQ,iBAAA;G9B0xHL;CACF;A8Bp2HC;EAuFE,gBAAA;EACA,mBAAA;C9BgxHH;A8Bx2HC;;;EA8FE,uBAAA;C9B+wHH;A8BjwHD;EA2BA;IApCM,8BAAA;IACA,2BAAA;G9B8wHH;E8B3uHH;;;IA9BM,0BAAA;G9B8wHH;CACF;A8B/2HD;EAEI,YAAA;C9Bg3HH;A8Bl3HD;EAMM,mBAAA;C9B+2HL;A8Br3HD;EASM,iBAAA;C9B+2HL;A8B12HK;;;EAGE,YAAA;EACA,0BAAA;C9B42HP;A8Bp2HD;EAEI,YAAA;C9Bq2HH;A8Bv2HD;EAIM,gBAAA;EACA,eAAA;C9Bs2HL;A8B11HD;EACE,YAAA;C9B41HD;A8B71HD;EAII,YAAA;C9B41HH;A8Bh2HD;EAMM,mBAAA;EACA,mBAAA;C9B61HL;A8Bp2HD;EAYI,UAAA;EACA,WAAA;C9B21HH;A8B/0HD;EA0DA;IAjEM,oBAAA;IACA,UAAA;G9B01HH;E8B1xHH;IA9DQ,iBAAA;G9B21HL;CACF;A8Bn1HD;EACE,iBAAA;C9Bq1HD;A8Bt1HD;EAKI,gBAAA;EACA,mBAAA;C9Bo1HH;A8B11HD;;;EAYI,uBAAA;C9Bm1HH;A8Br0HD;EA2BA;IApCM,8BAAA;IACA,2BAAA;G9Bk1HH;E8B/yHH;;;IA9BM,0BAAA;G9Bk1HH;CACF;A8Bz0HD;EAEI,cAAA;C9B00HH;A8B50HD;EAKI,eAAA;C9B00HH;A8Bj0HD;EAEE,iBAAA;EF3OA,2BAAA;EACC,0BAAA;C5B8iIF;A+BxiID;EACE,mBAAA;EACA,iBAAA;EACA,oBAAA;EACA,8BAAA;C/B0iID;A+BliID;EA8nBA;IAhoBI,mBAAA;G/BwiID;CACF;A+BzhID;EAgnBA;IAlnBI,YAAA;G/B+hID;CACF;A+BjhID;EACE,oBAAA;EACA,oBAAA;EACA,mBAAA;EACA,kCAAA;EACA,2DAAA;UAAA,mDAAA;EAEA,kCAAA;C/BkhID;A+BhhIC;EACE,iBAAA;C/BkhIH;A+Bt/HD;EA6jBA;IArlBI,YAAA;IACA,cAAA;IACA,yBAAA;YAAA,iBAAA;G/BkhID;E+BhhIC;IACE,0BAAA;IACA,wBAAA;IACA,kBAAA;IACA,6BAAA;G/BkhIH;E+B/gIC;IACE,oBAAA;G/BihIH;E+B5gIC;;;IAGE,gBAAA;IACA,iBAAA;G/B8gIH;CACF;A+B1gID;;EAGI,kBAAA;C/B2gIH;A+BtgIC;EAmjBF;;IArjBM,kBAAA;G/B6gIH;CACF;A+BpgID;;;;EAII,oBAAA;EACA,mBAAA;C/BsgIH;A+BhgIC;EAgiBF;;;;IAniBM,gBAAA;IACA,eAAA;G/B0gIH;CACF;A+B9/HD;EACE,cAAA;EACA,sBAAA;C/BggID;A+B3/HD;EA8gBA;IAhhBI,iBAAA;G/BigID;CACF;A+B7/HD;;EAEE,gBAAA;EACA,SAAA;EACA,QAAA;EACA,cAAA;C/B+/HD;A+Bz/HD;EAggBA;;IAlgBI,iBAAA;G/BggID;CACF;A+B9/HD;EACE,OAAA;EACA,sBAAA;C/BggID;A+B9/HD;EACE,UAAA;EACA,iBAAA;EACA,sBAAA;C/BggID;A+B1/HD;EACE,YAAA;EACA,mBAAA;EACA,gBAAA;EACA,kBAAA;EACA,aAAA;C/B4/HD;A+B1/HC;;EAEE,sBAAA;C/B4/HH;A+BrgID;EAaI,eAAA;C/B2/HH;A+Bl/HD;EALI;;IAEE,mBAAA;G/B0/HH;CACF;A+Bh/HD;EACE,mBAAA;EACA,aAAA;EACA,mBAAA;EACA,kBAAA;EC9LA,gBAAA;EACA,mBAAA;ED+LA,8BAAA;EACA,uBAAA;EACA,8BAAA;EACA,mBAAA;C/Bm/HD;A+B/+HC;EACE,WAAA;C/Bi/HH;A+B//HD;EAmBI,eAAA;EACA,YAAA;EACA,YAAA;EACA,mBAAA;C/B++HH;A+BrgID;EAyBI,gBAAA;C/B++HH;A+Bz+HD;EAqbA;IAvbI,cAAA;G/B++HD;CACF;A+Bt+HD;EACE,oBAAA;C/Bw+HD;A+Bz+HD;EAII,kBAAA;EACA,qBAAA;EACA,kBAAA;C/Bw+HH;A+B58HC;EA2YF;IAjaM,iBAAA;IACA,YAAA;IACA,YAAA;IACA,cAAA;IACA,8BAAA;IACA,UAAA;IACA,yBAAA;YAAA,iBAAA;G/Bs+HH;E+B3kHH;;IAxZQ,2BAAA;G/Bu+HL;E+B/kHH;IArZQ,kBAAA;G/Bu+HL;E+Bt+HK;;IAEE,uBAAA;G/Bw+HP;CACF;A+Bt9HD;EA+XA;IA1YI,YAAA;IACA,UAAA;G/Bq+HD;E+B5lHH;IAtYM,YAAA;G/Bq+HH;E+B/lHH;IApYQ,kBAAA;IACA,qBAAA;G/Bs+HL;CACF;A+B39HD;EACE,mBAAA;EACA,oBAAA;EACA,mBAAA;EACA,kCAAA;EACA,qCAAA;E1B9NA,6FAAA;EACQ,qFAAA;E2B/DR,gBAAA;EACA,mBAAA;ChC4vID;AkBtuHD;EAwEA;IAtIM,sBAAA;IACA,iBAAA;IACA,uBAAA;GlBwyHH;EkBpqHH;IA/HM,sBAAA;IACA,YAAA;IACA,uBAAA;GlBsyHH;EkBzqHH;IAxHM,sBAAA;GlBoyHH;EkB5qHH;IApHM,sBAAA;IACA,uBAAA;GlBmyHH;EkBhrHH;;;IA9GQ,YAAA;GlBmyHL;EkBrrHH;IAxGM,YAAA;GlBgyHH;EkBxrHH;IApGM,iBAAA;IACA,uBAAA;GlB+xHH;EkB5rHH;;IA5FM,sBAAA;IACA,cAAA;IACA,iBAAA;IACA,uBAAA;GlB4xHH;EkBnsHH;;IAtFQ,gBAAA;GlB6xHL;EkBvsHH;;IAjFM,mBAAA;IACA,eAAA;GlB4xHH;EkB5sHH;IA3EM,OAAA;GlB0xHH;CACF;A+BpgIC;EAmWF;IAzWM,mBAAA;G/B8gIH;E+B5gIG;IACE,iBAAA;G/B8gIL;CACF;A+B7/HD;EAoVA;IA5VI,YAAA;IACA,UAAA;IACA,eAAA;IACA,gBAAA;IACA,eAAA;IACA,kBAAA;I1BzPF,yBAAA;IACQ,iBAAA;GLmwIP;CACF;A+BngID;EACE,cAAA;EHpUA,2BAAA;EACC,0BAAA;C5B00IF;A+BngID;EACE,iBAAA;EHzUA,6BAAA;EACC,4BAAA;EAOD,8BAAA;EACC,6BAAA;C5By0IF;A+B//HD;EChVE,gBAAA;EACA,mBAAA;ChCk1ID;A+BhgIC;ECnVA,iBAAA;EACA,oBAAA;ChCs1ID;A+BjgIC;ECtVA,iBAAA;EACA,oBAAA;ChC01ID;A+B3/HD;EChWE,iBAAA;EACA,oBAAA;ChC81ID;A+Bv/HD;EAsSA;IA1SI,YAAA;IACA,kBAAA;IACA,mBAAA;G/B+/HD;CACF;A+Bl+HD;EAhBE;IExWA,uBAAA;GjC81IC;E+Br/HD;IE5WA,wBAAA;IF8WE,oBAAA;G/Bu/HD;E+Bz/HD;IAKI,gBAAA;G/Bu/HH;CACF;A+B9+HD;EACE,0BAAA;EACA,sBAAA;C/Bg/HD;A+Bl/HD;EAKI,YAAA;C/Bg/HH;A+B/+HG;;EAEE,eAAA;EACA,8BAAA;C/Bi/HL;A+B1/HD;EAcI,YAAA;C/B++HH;A+B7/HD;EAmBM,YAAA;C/B6+HL;A+B3+HK;;EAEE,YAAA;EACA,8BAAA;C/B6+HP;A+Bz+HK;;;EAGE,YAAA;EACA,0BAAA;C/B2+HP;A+Bv+HK;;;EAGE,YAAA;EACA,8BAAA;C/By+HP;A+BjhID;EA8CI,mBAAA;C/Bs+HH;A+Br+HG;;EAEE,uBAAA;C/Bu+HL;A+BxhID;EAoDM,uBAAA;C/Bu+HL;A+B3hID;;EA0DI,sBAAA;C/Bq+HH;A+B99HK;;;EAGE,0BAAA;EACA,YAAA;C/Bg+HP;A+B/7HC;EAoKF;IA7LU,YAAA;G/B49HP;E+B39HO;;IAEE,YAAA;IACA,8BAAA;G/B69HT;E+Bz9HO;;;IAGE,YAAA;IACA,0BAAA;G/B29HT;E+Bv9HO;;;IAGE,YAAA;IACA,8BAAA;G/By9HT;CACF;A+B3jID;EA8GI,YAAA;C/Bg9HH;A+B/8HG;EACE,YAAA;C/Bi9HL;A+BjkID;EAqHI,YAAA;C/B+8HH;A+B98HG;;EAEE,YAAA;C/Bg9HL;A+B58HK;;;;EAEE,YAAA;C/Bg9HP;A+Bx8HD;EACE,uBAAA;EACA,sBAAA;C/B08HD;A+B58HD;EAKI,eAAA;C/B08HH;A+Bz8HG;;EAEE,YAAA;EACA,8BAAA;C/B28HL;A+Bp9HD;EAcI,eAAA;C/By8HH;A+Bv9HD;EAmBM,eAAA;C/Bu8HL;A+Br8HK;;EAEE,YAAA;EACA,8BAAA;C/Bu8HP;A+Bn8HK;;;EAGE,YAAA;EACA,0BAAA;C/Bq8HP;A+Bj8HK;;;EAGE,YAAA;EACA,8BAAA;C/Bm8HP;A+B3+HD;EA+CI,mBAAA;C/B+7HH;A+B97HG;;EAEE,uBAAA;C/Bg8HL;A+Bl/HD;EAqDM,uBAAA;C/Bg8HL;A+Br/HD;;EA2DI,sBAAA;C/B87HH;A+Bx7HK;;;EAGE,0BAAA;EACA,YAAA;C/B07HP;A+Bn5HC;EAwBF;IAvDU,sBAAA;G/Bs7HP;E+B/3HH;IApDU,0BAAA;G/Bs7HP;E+Bl4HH;IAjDU,eAAA;G/Bs7HP;E+Br7HO;;IAEE,YAAA;IACA,8BAAA;G/Bu7HT;E+Bn7HO;;;IAGE,YAAA;IACA,0BAAA;G/Bq7HT;E+Bj7HO;;;IAGE,YAAA;IACA,8BAAA;G/Bm7HT;CACF;A+B3hID;EA+GI,eAAA;C/B+6HH;A+B96HG;EACE,YAAA;C/Bg7HL;A+BjiID;EAsHI,eAAA;C/B86HH;A+B76HG;;EAEE,YAAA;C/B+6HL;A+B36HK;;;;EAEE,YAAA;C/B+6HP;AkCzjJD;EACE,kBAAA;EACA,oBAAA;EACA,iBAAA;EACA,0BAAA;EACA,mBAAA;ClC2jJD;AkChkJD;EAQI,sBAAA;ClC2jJH;AkCnkJD;EAWM,kBAAA;EACA,eAAA;EACA,YAAA;ClC2jJL;AkCxkJD;EAkBI,eAAA;ClCyjJH;AmC7kJD;EACE,sBAAA;EACA,gBAAA;EACA,eAAA;EACA,mBAAA;CnC+kJD;AmCnlJD;EAOI,gBAAA;CnC+kJH;AmCtlJD;;EAUM,mBAAA;EACA,YAAA;EACA,kBAAA;EACA,wBAAA;EACA,sBAAA;EACA,eAAA;EACA,uBAAA;EACA,uBAAA;EACA,kBAAA;CnCglJL;AmC9kJG;;EAGI,eAAA;EPXN,+BAAA;EACG,4BAAA;C5B2lJJ;AmC7kJG;;EPvBF,gCAAA;EACG,6BAAA;C5BwmJJ;AmCxkJG;;;;EAEE,WAAA;EACA,eAAA;EACA,0BAAA;EACA,mBAAA;CnC4kJL;AmCtkJG;;;;;;EAGE,WAAA;EACA,YAAA;EACA,0BAAA;EACA,sBAAA;EACA,gBAAA;CnC2kJL;AmCloJD;;;;;;EAkEM,eAAA;EACA,uBAAA;EACA,mBAAA;EACA,oBAAA;CnCwkJL;AmC/jJD;;EC3EM,mBAAA;EACA,gBAAA;EACA,uBAAA;CpC8oJL;AoC5oJG;;ERKF,+BAAA;EACG,4BAAA;C5B2oJJ;AoC3oJG;;ERTF,gCAAA;EACG,6BAAA;C5BwpJJ;AmC1kJD;;EChFM,kBAAA;EACA,gBAAA;EACA,iBAAA;CpC8pJL;AoC5pJG;;ERKF,+BAAA;EACG,4BAAA;C5B2pJJ;AoC3pJG;;ERTF,gCAAA;EACG,6BAAA;C5BwqJJ;AqC3qJD;EACE,gBAAA;EACA,eAAA;EACA,iBAAA;EACA,mBAAA;CrC6qJD;AqCjrJD;EAOI,gBAAA;CrC6qJH;AqCprJD;;EAUM,sBAAA;EACA,kBAAA;EACA,uBAAA;EACA,uBAAA;EACA,oBAAA;CrC8qJL;AqC5rJD;;EAmBM,sBAAA;EACA,0BAAA;CrC6qJL;AqCjsJD;;EA2BM,aAAA;CrC0qJL;AqCrsJD;;EAkCM,YAAA;CrCuqJL;AqCzsJD;;;;EA2CM,eAAA;EACA,uBAAA;EACA,oBAAA;CrCoqJL;AsCltJD;EACE,gBAAA;EACA,wBAAA;EACA,eAAA;EACA,kBAAA;EACA,eAAA;EACA,YAAA;EACA,mBAAA;EACA,oBAAA;EACA,yBAAA;EACA,qBAAA;CtCotJD;AsChtJG;;EAEE,YAAA;EACA,sBAAA;EACA,gBAAA;CtCktJL;AsC7sJC;EACE,cAAA;CtC+sJH;AsC3sJC;EACE,mBAAA;EACA,UAAA;CtC6sJH;AsCtsJD;ECtCE,0BAAA;CvC+uJD;AuC5uJG;;EAEE,0BAAA;CvC8uJL;AsCzsJD;EC1CE,0BAAA;CvCsvJD;AuCnvJG;;EAEE,0BAAA;CvCqvJL;AsC5sJD;EC9CE,0BAAA;CvC6vJD;AuC1vJG;;EAEE,0BAAA;CvC4vJL;AsC/sJD;EClDE,0BAAA;CvCowJD;AuCjwJG;;EAEE,0BAAA;CvCmwJL;AsCltJD;ECtDE,0BAAA;CvC2wJD;AuCxwJG;;EAEE,0BAAA;CvC0wJL;AsCrtJD;EC1DE,0BAAA;CvCkxJD;AuC/wJG;;EAEE,0BAAA;CvCixJL;AwCnxJD;EACE,sBAAA;EACA,gBAAA;EACA,iBAAA;EACA,gBAAA;EACA,kBAAA;EACA,YAAA;EACA,eAAA;EACA,uBAAA;EACA,oBAAA;EACA,mBAAA;EACA,0BAAA;EACA,oBAAA;CxCqxJD;AwClxJC;EACE,cAAA;CxCoxJH;AwChxJC;EACE,mBAAA;EACA,UAAA;CxCkxJH;AwC/wJC;;EAEE,OAAA;EACA,iBAAA;CxCixJH;AwC5wJG;;EAEE,YAAA;EACA,sBAAA;EACA,gBAAA;CxC8wJL;AwCzwJC;;EAEE,eAAA;EACA,uBAAA;CxC2wJH;AwCxwJC;EACE,aAAA;CxC0wJH;AwCvwJC;EACE,kBAAA;CxCywJH;AwCtwJC;EACE,iBAAA;CxCwwJH;AyCl0JD;EACE,kBAAA;EACA,qBAAA;EACA,oBAAA;EACA,eAAA;EACA,0BAAA;CzCo0JD;AyCz0JD;;EASI,eAAA;CzCo0JH;AyC70JD;EAaI,oBAAA;EACA,gBAAA;EACA,iBAAA;CzCm0JH;AyCl1JD;EAmBI,0BAAA;CzCk0JH;AyC/zJC;;EAEE,mBAAA;EACA,mBAAA;EACA,oBAAA;CzCi0JH;AyC31JD;EA8BI,gBAAA;CzCg0JH;AyC9yJD;EACA;IAfI,kBAAA;IACA,qBAAA;GzCg0JD;EyC9zJC;;IAEE,mBAAA;IACA,oBAAA;GzCg0JH;EyCvzJH;;IAJM,gBAAA;GzC+zJH;CACF;A0C52JD;EACE,eAAA;EACA,aAAA;EACA,oBAAA;EACA,wBAAA;EACA,uBAAA;EACA,uBAAA;EACA,mBAAA;ErCiLA,4CAAA;EACK,uCAAA;EACG,oCAAA;CL8rJT;A0Cx3JD;;EAaI,kBAAA;EACA,mBAAA;C1C+2JH;A0C32JC;;;EAGE,sBAAA;C1C62JH;A0Cl4JD;EA0BI,aAAA;EACA,eAAA;C1C22JH;A2Cp4JD;EACE,cAAA;EACA,oBAAA;EACA,8BAAA;EACA,mBAAA;C3Cs4JD;A2C14JD;EAQI,cAAA;EAEA,eAAA;C3Co4JH;A2C94JD;EAeI,kBAAA;C3Ck4JH;A2Cj5JD;;EAqBI,iBAAA;C3Cg4JH;A2Cr5JD;EAyBI,gBAAA;C3C+3JH;A2Cv3JD;;EAEE,oBAAA;C3Cy3JD;A2C33JD;;EAMI,mBAAA;EACA,UAAA;EACA,aAAA;EACA,eAAA;C3Cy3JH;A2Cj3JD;ECvDE,0BAAA;EACA,sBAAA;EACA,eAAA;C5C26JD;A2Ct3JD;EClDI,0BAAA;C5C26JH;A2Cz3JD;EC/CI,eAAA;C5C26JH;A2Cx3JD;EC3DE,0BAAA;EACA,sBAAA;EACA,eAAA;C5Cs7JD;A2C73JD;ECtDI,0BAAA;C5Cs7JH;A2Ch4JD;ECnDI,eAAA;C5Cs7JH;A2C/3JD;EC/DE,0BAAA;EACA,sBAAA;EACA,eAAA;C5Ci8JD;A2Cp4JD;EC1DI,0BAAA;C5Ci8JH;A2Cv4JD;ECvDI,eAAA;C5Ci8JH;A2Ct4JD;ECnEE,0BAAA;EACA,sBAAA;EACA,eAAA;C5C48JD;A2C34JD;EC9DI,0BAAA;C5C48JH;A2C94JD;EC3DI,eAAA;C5C48JH;A6C98JD;EACE;IAAQ,4BAAA;G7Ci9JP;E6Ch9JD;IAAQ,yBAAA;G7Cm9JP;CACF;A6Ch9JD;EACE;IAAQ,4BAAA;G7Cm9JP;E6Cl9JD;IAAQ,yBAAA;G7Cq9JP;CACF;A6Cx9JD;EACE;IAAQ,4BAAA;G7Cm9JP;E6Cl9JD;IAAQ,yBAAA;G7Cq9JP;CACF;A6C98JD;EACE,iBAAA;EACA,aAAA;EACA,oBAAA;EACA,0BAAA;EACA,mBAAA;ExCsCA,uDAAA;EACQ,+CAAA;CL26JT;A6C78JD;EACE,YAAA;EACA,UAAA;EACA,aAAA;EACA,gBAAA;EACA,kBAAA;EACA,YAAA;EACA,mBAAA;EACA,0BAAA;ExCyBA,uDAAA;EACQ,+CAAA;EAyHR,oCAAA;EACK,+BAAA;EACG,4BAAA;CL+zJT;A6C18JD;;ECCI,8MAAA;EACA,yMAAA;EACA,sMAAA;EDAF,mCAAA;UAAA,2BAAA;C7C88JD;A6Cv8JD;;ExC5CE,2DAAA;EACK,sDAAA;EACG,mDAAA;CLu/JT;A6Cp8JD;EErEE,0BAAA;C/C4gKD;A+CzgKC;EDgDE,8MAAA;EACA,yMAAA;EACA,sMAAA;C9C49JH;A6Cx8JD;EEzEE,0BAAA;C/CohKD;A+CjhKC;EDgDE,8MAAA;EACA,yMAAA;EACA,sMAAA;C9Co+JH;A6C58JD;EE7EE,0BAAA;C/C4hKD;A+CzhKC;EDgDE,8MAAA;EACA,yMAAA;EACA,sMAAA;C9C4+JH;A6Ch9JD;EEjFE,0BAAA;C/CoiKD;A+CjiKC;EDgDE,8MAAA;EACA,yMAAA;EACA,sMAAA;C9Co/JH;AgD5iKD;EAEE,iBAAA;ChD6iKD;AgD3iKC;EACE,cAAA;ChD6iKH;AgDziKD;;EAEE,QAAA;EACA,iBAAA;ChD2iKD;AgDxiKD;EACE,eAAA;ChD0iKD;AgDviKD;EACE,eAAA;ChDyiKD;AgDtiKC;EACE,gBAAA;ChDwiKH;AgDpiKD;;EAEE,mBAAA;ChDsiKD;AgDniKD;;EAEE,oBAAA;ChDqiKD;AgDliKD;;;EAGE,oBAAA;EACA,oBAAA;ChDoiKD;AgDjiKD;EACE,uBAAA;ChDmiKD;AgDhiKD;EACE,uBAAA;ChDkiKD;AgD9hKD;EACE,cAAA;EACA,mBAAA;ChDgiKD;AgD1hKD;EACE,gBAAA;EACA,iBAAA;ChD4hKD;AiDnlKD;EAEE,oBAAA;EACA,gBAAA;CjDolKD;AiD5kKD;EACE,mBAAA;EACA,eAAA;EACA,mBAAA;EAEA,oBAAA;EACA,uBAAA;EACA,uBAAA;CjD6kKD;AiD1kKC;ErB3BA,6BAAA;EACC,4BAAA;C5BwmKF;AiD3kKC;EACE,iBAAA;ErBvBF,gCAAA;EACC,+BAAA;C5BqmKF;AiDpkKD;;EAEE,YAAA;CjDskKD;AiDxkKD;;EAKI,YAAA;CjDukKH;AiDnkKC;;;;EAEE,sBAAA;EACA,YAAA;EACA,0BAAA;CjDukKH;AiDnkKD;EACE,YAAA;EACA,iBAAA;CjDqkKD;AiDhkKC;;;EAGE,0BAAA;EACA,eAAA;EACA,oBAAA;CjDkkKH;AiDvkKC;;;EASI,eAAA;CjDmkKL;AiD5kKC;;;EAYI,eAAA;CjDqkKL;AiDhkKC;;;EAGE,WAAA;EACA,YAAA;EACA,0BAAA;EACA,sBAAA;CjDkkKH;AiDxkKC;;;;;;;;;EAYI,eAAA;CjDukKL;AiDnlKC;;;EAeI,eAAA;CjDykKL;AkD3qKC;EACE,eAAA;EACA,0BAAA;ClD6qKH;AkD3qKG;;EAEE,eAAA;ClD6qKL;AkD/qKG;;EAKI,eAAA;ClD8qKP;AkD3qKK;;;;EAEE,eAAA;EACA,0BAAA;ClD+qKP;AkD7qKK;;;;;;EAGE,YAAA;EACA,0BAAA;EACA,sBAAA;ClDkrKP;AkDxsKC;EACE,eAAA;EACA,0BAAA;ClD0sKH;AkDxsKG;;EAEE,eAAA;ClD0sKL;AkD5sKG;;EAKI,eAAA;ClD2sKP;AkDxsKK;;;;EAEE,eAAA;EACA,0BAAA;ClD4sKP;AkD1sKK;;;;;;EAGE,YAAA;EACA,0BAAA;EACA,sBAAA;ClD+sKP;AkDruKC;EACE,eAAA;EACA,0BAAA;ClDuuKH;AkDruKG;;EAEE,eAAA;ClDuuKL;AkDzuKG;;EAKI,eAAA;ClDwuKP;AkDruKK;;;;EAEE,eAAA;EACA,0BAAA;ClDyuKP;AkDvuKK;;;;;;EAGE,YAAA;EACA,0BAAA;EACA,sBAAA;ClD4uKP;AkDlwKC;EACE,eAAA;EACA,0BAAA;ClDowKH;AkDlwKG;;EAEE,eAAA;ClDowKL;AkDtwKG;;EAKI,eAAA;ClDqwKP;AkDlwKK;;;;EAEE,eAAA;EACA,0BAAA;ClDswKP;AkDpwKK;;;;;;EAGE,YAAA;EACA,0BAAA;EACA,sBAAA;ClDywKP;AiDxqKD;EACE,cAAA;EACA,mBAAA;CjD0qKD;AiDxqKD;EACE,iBAAA;EACA,iBAAA;CjD0qKD;AmDpyKD;EACE,oBAAA;EACA,uBAAA;EACA,8BAAA;EACA,mBAAA;E9C0DA,kDAAA;EACQ,0CAAA;CL6uKT;AmDnyKD;EACE,cAAA;CnDqyKD;AmDhyKD;EACE,mBAAA;EACA,qCAAA;EvBpBA,6BAAA;EACC,4BAAA;C5BuzKF;AmDtyKD;EAMI,eAAA;CnDmyKH;AmD9xKD;EACE,cAAA;EACA,iBAAA;EACA,gBAAA;EACA,eAAA;CnDgyKD;AmDpyKD;;;;;EAWI,eAAA;CnDgyKH;AmD3xKD;EACE,mBAAA;EACA,0BAAA;EACA,2BAAA;EvBxCA,gCAAA;EACC,+BAAA;C5Bs0KF;AmDrxKD;;EAGI,iBAAA;CnDsxKH;AmDzxKD;;EAMM,oBAAA;EACA,iBAAA;CnDuxKL;AmDnxKG;;EAEI,cAAA;EvBvEN,6BAAA;EACC,4BAAA;C5B61KF;AmDjxKG;;EAEI,iBAAA;EvBvEN,gCAAA;EACC,+BAAA;C5B21KF;AmD1yKD;EvB1DE,2BAAA;EACC,0BAAA;C5Bu2KF;AmD7wKD;EAEI,oBAAA;CnD8wKH;AmD3wKD;EACE,oBAAA;CnD6wKD;AmDrwKD;;;EAII,iBAAA;CnDswKH;AmD1wKD;;;EAOM,mBAAA;EACA,oBAAA;CnDwwKL;AmDhxKD;;EvBzGE,6BAAA;EACC,4BAAA;C5B63KF;AmDrxKD;;;;EAmBQ,4BAAA;EACA,6BAAA;CnDwwKP;AmD5xKD;;;;;;;;EAwBU,4BAAA;CnD8wKT;AmDtyKD;;;;;;;;EA4BU,6BAAA;CnDoxKT;AmDhzKD;;EvBjGE,gCAAA;EACC,+BAAA;C5Bq5KF;AmDrzKD;;;;EAyCQ,+BAAA;EACA,gCAAA;CnDkxKP;AmD5zKD;;;;;;;;EA8CU,+BAAA;CnDwxKT;AmDt0KD;;;;;;;;EAkDU,gCAAA;CnD8xKT;AmDh1KD;;;;EA2DI,2BAAA;CnD2xKH;AmDt1KD;;EA+DI,cAAA;CnD2xKH;AmD11KD;;EAmEI,UAAA;CnD2xKH;AmD91KD;;;;;;;;;;;;EA0EU,eAAA;CnDkyKT;AmD52KD;;;;;;;;;;;;EA8EU,gBAAA;CnD4yKT;AmD13KD;;;;;;;;EAuFU,iBAAA;CnD6yKT;AmDp4KD;;;;;;;;EAgGU,iBAAA;CnD8yKT;AmD94KD;EAsGI,UAAA;EACA,iBAAA;CnD2yKH;AmDjyKD;EACE,oBAAA;CnDmyKD;AmDpyKD;EAKI,iBAAA;EACA,mBAAA;CnDkyKH;AmDxyKD;EASM,gBAAA;CnDkyKL;AmD3yKD;EAcI,iBAAA;CnDgyKH;AmD9yKD;;EAkBM,2BAAA;CnDgyKL;AmDlzKD;EAuBI,cAAA;CnD8xKH;AmDrzKD;EAyBM,8BAAA;CnD+xKL;AmDxxKD;EC1PE,mBAAA;CpDqhLD;AoDnhLC;EACE,eAAA;EACA,0BAAA;EACA,mBAAA;CpDqhLH;AoDxhLC;EAMI,uBAAA;CpDqhLL;AoD3hLC;EASI,eAAA;EACA,0BAAA;CpDqhLL;AoDlhLC;EAEI,0BAAA;CpDmhLL;AmDvyKD;EC7PE,sBAAA;CpDuiLD;AoDriLC;EACE,YAAA;EACA,0BAAA;EACA,sBAAA;CpDuiLH;AoD1iLC;EAMI,0BAAA;CpDuiLL;AoD7iLC;EASI,eAAA;EACA,uBAAA;CpDuiLL;AoDpiLC;EAEI,6BAAA;CpDqiLL;AmDtzKD;EChQE,sBAAA;CpDyjLD;AoDvjLC;EACE,eAAA;EACA,0BAAA;EACA,sBAAA;CpDyjLH;AoD5jLC;EAMI,0BAAA;CpDyjLL;AoD/jLC;EASI,eAAA;EACA,0BAAA;CpDyjLL;AoDtjLC;EAEI,6BAAA;CpDujLL;AmDr0KD;ECnQE,sBAAA;CpD2kLD;AoDzkLC;EACE,eAAA;EACA,0BAAA;EACA,sBAAA;CpD2kLH;AoD9kLC;EAMI,0BAAA;CpD2kLL;AoDjlLC;EASI,eAAA;EACA,0BAAA;CpD2kLL;AoDxkLC;EAEI,6BAAA;CpDykLL;AmDp1KD;ECtQE,sBAAA;CpD6lLD;AoD3lLC;EACE,eAAA;EACA,0BAAA;EACA,sBAAA;CpD6lLH;AoDhmLC;EAMI,0BAAA;CpD6lLL;AoDnmLC;EASI,eAAA;EACA,0BAAA;CpD6lLL;AoD1lLC;EAEI,6BAAA;CpD2lLL;AmDn2KD;ECzQE,sBAAA;CpD+mLD;AoD7mLC;EACE,eAAA;EACA,0BAAA;EACA,sBAAA;CpD+mLH;AoDlnLC;EAMI,0BAAA;CpD+mLL;AoDrnLC;EASI,eAAA;EACA,0BAAA;CpD+mLL;AoD5mLC;EAEI,6BAAA;CpD6mLL;AqD7nLD;EACE,mBAAA;EACA,eAAA;EACA,UAAA;EACA,WAAA;EACA,iBAAA;CrD+nLD;AqDpoLD;;;;;EAYI,mBAAA;EACA,OAAA;EACA,QAAA;EACA,UAAA;EACA,aAAA;EACA,YAAA;EACA,UAAA;CrD+nLH;AqD1nLD;EACE,uBAAA;CrD4nLD;AqDxnLD;EACE,oBAAA;CrD0nLD;AsDrpLD;EACE,iBAAA;EACA,cAAA;EACA,oBAAA;EACA,0BAAA;EACA,0BAAA;EACA,mBAAA;EjDwDA,wDAAA;EACQ,gDAAA;CLgmLT;AsD/pLD;EASI,mBAAA;EACA,kCAAA;CtDypLH;AsDppLD;EACE,cAAA;EACA,mBAAA;CtDspLD;AsDppLD;EACE,aAAA;EACA,mBAAA;CtDspLD;AuD5qLD;EACE,aAAA;EACA,gBAAA;EACA,kBAAA;EACA,eAAA;EACA,YAAA;EACA,0BAAA;EjCRA,aAAA;EAGA,0BAAA;CtBqrLD;AuD7qLC;;EAEE,YAAA;EACA,sBAAA;EACA,gBAAA;EjCfF,aAAA;EAGA,0BAAA;CtB6rLD;AuDzqLC;EACE,WAAA;EACA,gBAAA;EACA,wBAAA;EACA,UAAA;EACA,yBAAA;CvD2qLH;AwDhsLD;EACE,iBAAA;CxDksLD;AwD9rLD;EACE,cAAA;EACA,iBAAA;EACA,gBAAA;EACA,OAAA;EACA,SAAA;EACA,UAAA;EACA,QAAA;EACA,cAAA;EACA,kCAAA;EAIA,WAAA;CxD6rLD;AwD1rLC;EnD+GA,sCAAA;EACI,kCAAA;EACC,iCAAA;EACG,8BAAA;EAkER,oDAAA;EAEK,0CAAA;EACG,oCAAA;CL6gLT;AwDhsLC;EnD2GA,mCAAA;EACI,+BAAA;EACC,8BAAA;EACG,2BAAA;CLwlLT;AwDpsLD;EACE,mBAAA;EACA,iBAAA;CxDssLD;AwDlsLD;EACE,mBAAA;EACA,YAAA;EACA,aAAA;CxDosLD;AwDhsLD;EACE,mBAAA;EACA,uBAAA;EACA,uBAAA;EACA,qCAAA;EACA,mBAAA;EnDaA,iDAAA;EACQ,yCAAA;EmDZR,qCAAA;UAAA,6BAAA;EAEA,WAAA;CxDksLD;AwD9rLD;EACE,gBAAA;EACA,OAAA;EACA,SAAA;EACA,UAAA;EACA,QAAA;EACA,cAAA;EACA,uBAAA;CxDgsLD;AwD9rLC;ElCrEA,WAAA;EAGA,yBAAA;CtBowLD;AwDjsLC;ElCtEA,aAAA;EAGA,0BAAA;CtBwwLD;AwDhsLD;EACE,cAAA;EACA,iCAAA;CxDksLD;AwD9rLD;EACE,iBAAA;CxDgsLD;AwD5rLD;EACE,UAAA;EACA,wBAAA;CxD8rLD;AwDzrLD;EACE,mBAAA;EACA,cAAA;CxD2rLD;AwDvrLD;EACE,cAAA;EACA,kBAAA;EACA,8BAAA;CxDyrLD;AwD5rLD;EAQI,iBAAA;EACA,iBAAA;CxDurLH;AwDhsLD;EAaI,kBAAA;CxDsrLH;AwDnsLD;EAiBI,eAAA;CxDqrLH;AwDhrLD;EACE,mBAAA;EACA,aAAA;EACA,YAAA;EACA,aAAA;EACA,iBAAA;CxDkrLD;AwDhqLD;EAZE;IACE,aAAA;IACA,kBAAA;GxD+qLD;EwD7qLD;InDvEA,kDAAA;IACQ,0CAAA;GLuvLP;EwD5qLD;IAAY,aAAA;GxD+qLX;CACF;AwD1qLD;EAFE;IAAY,aAAA;GxDgrLX;CACF;AyD/zLD;EACE,mBAAA;EACA,cAAA;EACA,eAAA;ECRA,4DAAA;EAEA,mBAAA;EACA,oBAAA;EACA,uBAAA;EACA,iBAAA;EACA,wBAAA;EACA,iBAAA;EACA,kBAAA;EACA,sBAAA;EACA,kBAAA;EACA,qBAAA;EACA,oBAAA;EACA,mBAAA;EACA,qBAAA;EACA,kBAAA;EDHA,gBAAA;EnCVA,WAAA;EAGA,yBAAA;CtBs1LD;AyD30LC;EnCdA,aAAA;EAGA,0BAAA;CtB01LD;AyD90LC;EAAW,iBAAA;EAAmB,eAAA;CzDk1L/B;AyDj1LC;EAAW,iBAAA;EAAmB,eAAA;CzDq1L/B;AyDp1LC;EAAW,gBAAA;EAAmB,eAAA;CzDw1L/B;AyDv1LC;EAAW,kBAAA;EAAmB,eAAA;CzD21L/B;AyDv1LD;EACE,iBAAA;EACA,iBAAA;EACA,YAAA;EACA,mBAAA;EACA,uBAAA;EACA,mBAAA;CzDy1LD;AyDr1LD;EACE,mBAAA;EACA,SAAA;EACA,UAAA;EACA,0BAAA;EACA,oBAAA;CzDu1LD;AyDn1LC;EACE,UAAA;EACA,UAAA;EACA,kBAAA;EACA,wBAAA;EACA,uBAAA;CzDq1LH;AyDn1LC;EACE,UAAA;EACA,WAAA;EACA,oBAAA;EACA,wBAAA;EACA,uBAAA;CzDq1LH;AyDn1LC;EACE,UAAA;EACA,UAAA;EACA,oBAAA;EACA,wBAAA;EACA,uBAAA;CzDq1LH;AyDn1LC;EACE,SAAA;EACA,QAAA;EACA,iBAAA;EACA,4BAAA;EACA,yBAAA;CzDq1LH;AyDn1LC;EACE,SAAA;EACA,SAAA;EACA,iBAAA;EACA,4BAAA;EACA,wBAAA;CzDq1LH;AyDn1LC;EACE,OAAA;EACA,UAAA;EACA,kBAAA;EACA,wBAAA;EACA,0BAAA;CzDq1LH;AyDn1LC;EACE,OAAA;EACA,WAAA;EACA,iBAAA;EACA,wBAAA;EACA,0BAAA;CzDq1LH;AyDn1LC;EACE,OAAA;EACA,UAAA;EACA,iBAAA;EACA,wBAAA;EACA,0BAAA;CzDq1LH;A2Dl7LD;EACE,mBAAA;EACA,OAAA;EACA,QAAA;EACA,cAAA;EACA,cAAA;EACA,iBAAA;EACA,aAAA;EDXA,4DAAA;EAEA,mBAAA;EACA,oBAAA;EACA,uBAAA;EACA,iBAAA;EACA,wBAAA;EACA,iBAAA;EACA,kBAAA;EACA,sBAAA;EACA,kBAAA;EACA,qBAAA;EACA,oBAAA;EACA,mBAAA;EACA,qBAAA;EACA,kBAAA;ECAA,gBAAA;EAEA,uBAAA;EACA,qCAAA;UAAA,6BAAA;EACA,uBAAA;EACA,qCAAA;EACA,mBAAA;EtD8CA,kDAAA;EACQ,0CAAA;CLk5LT;A2D77LC;EAAY,kBAAA;C3Dg8Lb;A2D/7LC;EAAY,kBAAA;C3Dk8Lb;A2Dj8LC;EAAY,iBAAA;C3Do8Lb;A2Dn8LC;EAAY,mBAAA;C3Ds8Lb;A2Dn8LD;EACE,UAAA;EACA,kBAAA;EACA,gBAAA;EACA,0BAAA;EACA,iCAAA;EACA,2BAAA;C3Dq8LD;A2Dl8LD;EACE,kBAAA;C3Do8LD;A2D57LC;;EAEE,mBAAA;EACA,eAAA;EACA,SAAA;EACA,UAAA;EACA,0BAAA;EACA,oBAAA;C3D87LH;A2D37LD;EACE,mBAAA;C3D67LD;A2D37LD;EACE,mBAAA;EACA,YAAA;C3D67LD;A2Dz7LC;EACE,UAAA;EACA,mBAAA;EACA,uBAAA;EACA,0BAAA;EACA,sCAAA;EACA,cAAA;C3D27LH;A2D17LG;EACE,aAAA;EACA,YAAA;EACA,mBAAA;EACA,uBAAA;EACA,uBAAA;C3D47LL;A2Dz7LC;EACE,SAAA;EACA,YAAA;EACA,kBAAA;EACA,qBAAA;EACA,4BAAA;EACA,wCAAA;C3D27LH;A2D17LG;EACE,aAAA;EACA,UAAA;EACA,cAAA;EACA,qBAAA;EACA,yBAAA;C3D47LL;A2Dz7LC;EACE,UAAA;EACA,mBAAA;EACA,oBAAA;EACA,6BAAA;EACA,yCAAA;EACA,WAAA;C3D27LH;A2D17LG;EACE,aAAA;EACA,SAAA;EACA,mBAAA;EACA,oBAAA;EACA,0BAAA;C3D47LL;A2Dx7LC;EACE,SAAA;EACA,aAAA;EACA,kBAAA;EACA,sBAAA;EACA,2BAAA;EACA,uCAAA;C3D07LH;A2Dz7LG;EACE,aAAA;EACA,WAAA;EACA,sBAAA;EACA,wBAAA;EACA,cAAA;C3D27LL;A4DpjMD;EACE,mBAAA;C5DsjMD;A4DnjMD;EACE,mBAAA;EACA,iBAAA;EACA,YAAA;C5DqjMD;A4DxjMD;EAMI,cAAA;EACA,mBAAA;EvD6KF,0CAAA;EACK,qCAAA;EACG,kCAAA;CLy4LT;A4D/jMD;;EAcM,eAAA;C5DqjML;A4D3hMC;EA4NF;IvD3DE,uDAAA;IAEK,6CAAA;IACG,uCAAA;IA7JR,oCAAA;IAEQ,4BAAA;IA+GR,4BAAA;IAEQ,oBAAA;GL86LP;E4DzjMG;;IvDmHJ,2CAAA;IACQ,mCAAA;IuDjHF,QAAA;G5D4jML;E4D1jMG;;IvD8GJ,4CAAA;IACQ,oCAAA;IuD5GF,QAAA;G5D6jML;E4D3jMG;;;IvDyGJ,wCAAA;IACQ,gCAAA;IuDtGF,QAAA;G5D8jML;CACF;A4DpmMD;;;EA6CI,eAAA;C5D4jMH;A4DzmMD;EAiDI,QAAA;C5D2jMH;A4D5mMD;;EAsDI,mBAAA;EACA,OAAA;EACA,YAAA;C5D0jMH;A4DlnMD;EA4DI,WAAA;C5DyjMH;A4DrnMD;EA+DI,YAAA;C5DyjMH;A4DxnMD;;EAmEI,QAAA;C5DyjMH;A4D5nMD;EAuEI,YAAA;C5DwjMH;A4D/nMD;EA0EI,WAAA;C5DwjMH;A4DhjMD;EACE,mBAAA;EACA,OAAA;EACA,QAAA;EACA,UAAA;EACA,WAAA;EtC9FA,aAAA;EAGA,0BAAA;EsC6FA,gBAAA;EACA,YAAA;EACA,mBAAA;EACA,0CAAA;EACA,mCAAA;C5DmjMD;A4D9iMC;EdnGE,mGAAA;EACA,8FAAA;EACA,qHAAA;EAAA,+FAAA;EACA,4BAAA;EACA,uHAAA;C9CopMH;A4DljMC;EACE,WAAA;EACA,SAAA;EdxGA,mGAAA;EACA,8FAAA;EACA,qHAAA;EAAA,+FAAA;EACA,4BAAA;EACA,uHAAA;C9C6pMH;A4DpjMC;;EAEE,WAAA;EACA,YAAA;EACA,sBAAA;EtCvHF,aAAA;EAGA,0BAAA;CtB4qMD;A4DtlMD;;;;EAuCI,mBAAA;EACA,SAAA;EACA,kBAAA;EACA,WAAA;EACA,sBAAA;C5DqjMH;A4DhmMD;;EA+CI,UAAA;EACA,mBAAA;C5DqjMH;A4DrmMD;;EAoDI,WAAA;EACA,oBAAA;C5DqjMH;A4D1mMD;;EAyDI,YAAA;EACA,aAAA;EACA,eAAA;EACA,mBAAA;C5DqjMH;A4DhjMG;EACE,iBAAA;C5DkjML;A4D9iMG;EACE,iBAAA;C5DgjML;A4DtiMD;EACE,mBAAA;EACA,aAAA;EACA,UAAA;EACA,YAAA;EACA,WAAA;EACA,kBAAA;EACA,gBAAA;EACA,iBAAA;EACA,mBAAA;C5DwiMD;A4DjjMD;EAYI,sBAAA;EACA,YAAA;EACA,aAAA;EACA,YAAA;EACA,oBAAA;EACA,uBAAA;EACA,oBAAA;EACA,gBAAA;EAWA,0BAAA;EACA,mCAAA;C5D8hMH;A4D7jMD;EAkCI,UAAA;EACA,YAAA;EACA,aAAA;EACA,uBAAA;C5D8hMH;A4DvhMD;EACE,mBAAA;EACA,UAAA;EACA,WAAA;EACA,aAAA;EACA,YAAA;EACA,kBAAA;EACA,qBAAA;EACA,YAAA;EACA,mBAAA;EACA,0CAAA;C5DyhMD;A4DxhMC;EACE,kBAAA;C5D0hMH;A4Dj/LD;EAhCE;;;;IAKI,YAAA;IACA,aAAA;IACA,kBAAA;IACA,gBAAA;G5DmhMH;E4D3hMD;;IAYI,mBAAA;G5DmhMH;E4D/hMD;;IAgBI,oBAAA;G5DmhMH;E4D9gMD;IACE,UAAA;IACA,WAAA;IACA,qBAAA;G5DghMD;E4D5gMD;IACE,aAAA;G5D8gMD;CACF;A6D7wMC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAEE,aAAA;EACA,eAAA;C7D6yMH;A6D3yMC;;;;;;;;;;;;;;;;EACE,YAAA;C7D4zMH;AiCp0MD;E6BRE,eAAA;EACA,kBAAA;EACA,mBAAA;C9D+0MD;AiCt0MD;EACE,wBAAA;CjCw0MD;AiCt0MD;EACE,uBAAA;CjCw0MD;AiCh0MD;EACE,yBAAA;CjCk0MD;AiCh0MD;EACE,0BAAA;CjCk0MD;AiCh0MD;EACE,mBAAA;CjCk0MD;AiCh0MD;E8BzBE,YAAA;EACA,mBAAA;EACA,kBAAA;EACA,8BAAA;EACA,UAAA;C/D41MD;AiC9zMD;EACE,yBAAA;CjCg0MD;AiCzzMD;EACE,gBAAA;CjC2zMD;AgE51MD;EACE,oBAAA;ChE81MD;AgEx1MD;;;;ECdE,yBAAA;CjE42MD;AgEv1MD;;;;;;;;;;;;EAYE,yBAAA;ChEy1MD;AgEl1MD;EA6IA;IC7LE,0BAAA;GjEs4MC;EiEr4MD;IAAU,0BAAA;GjEw4MT;EiEv4MD;IAAU,8BAAA;GjE04MT;EiEz4MD;;IACU,+BAAA;GjE44MT;CACF;AgE51MD;EAwIA;IA1II,0BAAA;GhEk2MD;CACF;AgE51MD;EAmIA;IArII,2BAAA;GhEk2MD;CACF;AgE51MD;EA8HA;IAhII,iCAAA;GhEk2MD;CACF;AgE31MD;EAwHA;IC7LE,0BAAA;GjEo6MC;EiEn6MD;IAAU,0BAAA;GjEs6MT;EiEr6MD;IAAU,8BAAA;GjEw6MT;EiEv6MD;;IACU,+BAAA;GjE06MT;CACF;AgEr2MD;EAmHA;IArHI,0BAAA;GhE22MD;CACF;AgEr2MD;EA8GA;IAhHI,2BAAA;GhE22MD;CACF;AgEr2MD;EAyGA;IA3GI,iCAAA;GhE22MD;CACF;AgEp2MD;EAmGA;IC7LE,0BAAA;GjEk8MC;EiEj8MD;IAAU,0BAAA;GjEo8MT;EiEn8MD;IAAU,8BAAA;GjEs8MT;EiEr8MD;;IACU,+BAAA;GjEw8MT;CACF;AgE92MD;EA8FA;IAhGI,0BAAA;GhEo3MD;CACF;AgE92MD;EAyFA;IA3FI,2BAAA;GhEo3MD;CACF;AgE92MD;EAoFA;IAtFI,iCAAA;GhEo3MD;CACF;AgE72MD;EA8EA;IC7LE,0BAAA;GjEg+MC;EiE/9MD;IAAU,0BAAA;GjEk+MT;EiEj+MD;IAAU,8BAAA;GjEo+MT;EiEn+MD;;IACU,+BAAA;GjEs+MT;CACF;AgEv3MD;EAyEA;IA3EI,0BAAA;GhE63MD;CACF;AgEv3MD;EAoEA;IAtEI,2BAAA;GhE63MD;CACF;AgEv3MD;EA+DA;IAjEI,iCAAA;GhE63MD;CACF;AgEt3MD;EAyDA;ICrLE,yBAAA;GjEs/MC;CACF;AgEt3MD;EAoDA;ICrLE,yBAAA;GjE2/MC;CACF;AgEt3MD;EA+CA;ICrLE,yBAAA;GjEggNC;CACF;AgEt3MD;EA0CA;ICrLE,yBAAA;GjEqgNC;CACF;AgEn3MD;ECnJE,yBAAA;CjEygND;AgEh3MD;EA4BA;IC7LE,0BAAA;GjEqhNC;EiEphND;IAAU,0BAAA;GjEuhNT;EiEthND;IAAU,8BAAA;GjEyhNT;EiExhND;;IACU,+BAAA;GjE2hNT;CACF;AgE93MD;EACE,yBAAA;ChEg4MD;AgE33MD;EAqBA;IAvBI,0BAAA;GhEi4MD;CACF;AgE/3MD;EACE,yBAAA;ChEi4MD;AgE53MD;EAcA;IAhBI,2BAAA;GhEk4MD;CACF;AgEh4MD;EACE,yBAAA;ChEk4MD;AgE73MD;EAOA;IATI,iCAAA;GhEm4MD;CACF;AgE53MD;EACA;ICrLE,yBAAA;GjEojNC;CACF","file":"bootstrap.css","sourcesContent":["/*!\n * Bootstrap v3.3.7 (http://getbootstrap.com)\n * Copyright 2011-2016 Twitter, Inc.\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n */\n/*! normalize.css v3.0.3 | MIT License | github.com/necolas/normalize.css */\nhtml {\n  font-family: sans-serif;\n  -ms-text-size-adjust: 100%;\n  -webkit-text-size-adjust: 100%;\n}\nbody {\n  margin: 0;\n}\narticle,\naside,\ndetails,\nfigcaption,\nfigure,\nfooter,\nheader,\nhgroup,\nmain,\nmenu,\nnav,\nsection,\nsummary {\n  display: block;\n}\naudio,\ncanvas,\nprogress,\nvideo {\n  display: inline-block;\n  vertical-align: baseline;\n}\naudio:not([controls]) {\n  display: none;\n  height: 0;\n}\n[hidden],\ntemplate {\n  display: none;\n}\na {\n  background-color: transparent;\n}\na:active,\na:hover {\n  outline: 0;\n}\nabbr[title] {\n  border-bottom: 1px dotted;\n}\nb,\nstrong {\n  font-weight: bold;\n}\ndfn {\n  font-style: italic;\n}\nh1 {\n  font-size: 2em;\n  margin: 0.67em 0;\n}\nmark {\n  background: #ff0;\n  color: #000;\n}\nsmall {\n  font-size: 80%;\n}\nsub,\nsup {\n  font-size: 75%;\n  line-height: 0;\n  position: relative;\n  vertical-align: baseline;\n}\nsup {\n  top: -0.5em;\n}\nsub {\n  bottom: -0.25em;\n}\nimg {\n  border: 0;\n}\nsvg:not(:root) {\n  overflow: hidden;\n}\nfigure {\n  margin: 1em 40px;\n}\nhr {\n  box-sizing: content-box;\n  height: 0;\n}\npre {\n  overflow: auto;\n}\ncode,\nkbd,\npre,\nsamp {\n  font-family: monospace, monospace;\n  font-size: 1em;\n}\nbutton,\ninput,\noptgroup,\nselect,\ntextarea {\n  color: inherit;\n  font: inherit;\n  margin: 0;\n}\nbutton {\n  overflow: visible;\n}\nbutton,\nselect {\n  text-transform: none;\n}\nbutton,\nhtml input[type=\"button\"],\ninput[type=\"reset\"],\ninput[type=\"submit\"] {\n  -webkit-appearance: button;\n  cursor: pointer;\n}\nbutton[disabled],\nhtml input[disabled] {\n  cursor: default;\n}\nbutton::-moz-focus-inner,\ninput::-moz-focus-inner {\n  border: 0;\n  padding: 0;\n}\ninput {\n  line-height: normal;\n}\ninput[type=\"checkbox\"],\ninput[type=\"radio\"] {\n  box-sizing: border-box;\n  padding: 0;\n}\ninput[type=\"number\"]::-webkit-inner-spin-button,\ninput[type=\"number\"]::-webkit-outer-spin-button {\n  height: auto;\n}\ninput[type=\"search\"] {\n  -webkit-appearance: textfield;\n  box-sizing: content-box;\n}\ninput[type=\"search\"]::-webkit-search-cancel-button,\ninput[type=\"search\"]::-webkit-search-decoration {\n  -webkit-appearance: none;\n}\nfieldset {\n  border: 1px solid #c0c0c0;\n  margin: 0 2px;\n  padding: 0.35em 0.625em 0.75em;\n}\nlegend {\n  border: 0;\n  padding: 0;\n}\ntextarea {\n  overflow: auto;\n}\noptgroup {\n  font-weight: bold;\n}\ntable {\n  border-collapse: collapse;\n  border-spacing: 0;\n}\ntd,\nth {\n  padding: 0;\n}\n/*! Source: https://github.com/h5bp/html5-boilerplate/blob/master/src/css/main.css */\n@media print {\n  *,\n  *:before,\n  *:after {\n    background: transparent !important;\n    color: #000 !important;\n    box-shadow: none !important;\n    text-shadow: none !important;\n  }\n  a,\n  a:visited {\n    text-decoration: underline;\n  }\n  a[href]:after {\n    content: \" (\" attr(href) \")\";\n  }\n  abbr[title]:after {\n    content: \" (\" attr(title) \")\";\n  }\n  a[href^=\"#\"]:after,\n  a[href^=\"javascript:\"]:after {\n    content: \"\";\n  }\n  pre,\n  blockquote {\n    border: 1px solid #999;\n    page-break-inside: avoid;\n  }\n  thead {\n    display: table-header-group;\n  }\n  tr,\n  img {\n    page-break-inside: avoid;\n  }\n  img {\n    max-width: 100% !important;\n  }\n  p,\n  h2,\n  h3 {\n    orphans: 3;\n    widows: 3;\n  }\n  h2,\n  h3 {\n    page-break-after: avoid;\n  }\n  .navbar {\n    display: none;\n  }\n  .btn > .caret,\n  .dropup > .btn > .caret {\n    border-top-color: #000 !important;\n  }\n  .label {\n    border: 1px solid #000;\n  }\n  .table {\n    border-collapse: collapse !important;\n  }\n  .table td,\n  .table th {\n    background-color: #fff !important;\n  }\n  .table-bordered th,\n  .table-bordered td {\n    border: 1px solid #ddd !important;\n  }\n}\n@font-face {\n  font-family: 'Glyphicons Halflings';\n  src: url('../fonts/glyphicons-halflings-regular.eot');\n  src: url('../fonts/glyphicons-halflings-regular.eot?#iefix') format('embedded-opentype'), url('../fonts/glyphicons-halflings-regular.woff2') format('woff2'), url('../fonts/glyphicons-halflings-regular.woff') format('woff'), url('../fonts/glyphicons-halflings-regular.ttf') format('truetype'), url('../fonts/glyphicons-halflings-regular.svg#glyphicons_halflingsregular') format('svg');\n}\n.glyphicon {\n  position: relative;\n  top: 1px;\n  display: inline-block;\n  font-family: 'Glyphicons Halflings';\n  font-style: normal;\n  font-weight: normal;\n  line-height: 1;\n  -webkit-font-smoothing: antialiased;\n  -moz-osx-font-smoothing: grayscale;\n}\n.glyphicon-asterisk:before {\n  content: \"\\002a\";\n}\n.glyphicon-plus:before {\n  content: \"\\002b\";\n}\n.glyphicon-euro:before,\n.glyphicon-eur:before {\n  content: \"\\20ac\";\n}\n.glyphicon-minus:before {\n  content: \"\\2212\";\n}\n.glyphicon-cloud:before {\n  content: \"\\2601\";\n}\n.glyphicon-envelope:before {\n  content: \"\\2709\";\n}\n.glyphicon-pencil:before {\n  content: \"\\270f\";\n}\n.glyphicon-glass:before {\n  content: \"\\e001\";\n}\n.glyphicon-music:before {\n  content: \"\\e002\";\n}\n.glyphicon-search:before {\n  content: \"\\e003\";\n}\n.glyphicon-heart:before {\n  content: \"\\e005\";\n}\n.glyphicon-star:before {\n  content: \"\\e006\";\n}\n.glyphicon-star-empty:before {\n  content: \"\\e007\";\n}\n.glyphicon-user:before {\n  content: \"\\e008\";\n}\n.glyphicon-film:before {\n  content: \"\\e009\";\n}\n.glyphicon-th-large:before {\n  content: \"\\e010\";\n}\n.glyphicon-th:before {\n  content: \"\\e011\";\n}\n.glyphicon-th-list:before {\n  content: \"\\e012\";\n}\n.glyphicon-ok:before {\n  content: \"\\e013\";\n}\n.glyphicon-remove:before {\n  content: \"\\e014\";\n}\n.glyphicon-zoom-in:before {\n  content: \"\\e015\";\n}\n.glyphicon-zoom-out:before {\n  content: \"\\e016\";\n}\n.glyphicon-off:before {\n  content: \"\\e017\";\n}\n.glyphicon-signal:before {\n  content: \"\\e018\";\n}\n.glyphicon-cog:before {\n  content: \"\\e019\";\n}\n.glyphicon-trash:before {\n  content: \"\\e020\";\n}\n.glyphicon-home:before {\n  content: \"\\e021\";\n}\n.glyphicon-file:before {\n  content: \"\\e022\";\n}\n.glyphicon-time:before {\n  content: \"\\e023\";\n}\n.glyphicon-road:before {\n  content: \"\\e024\";\n}\n.glyphicon-download-alt:before {\n  content: \"\\e025\";\n}\n.glyphicon-download:before {\n  content: \"\\e026\";\n}\n.glyphicon-upload:before {\n  content: \"\\e027\";\n}\n.glyphicon-inbox:before {\n  content: \"\\e028\";\n}\n.glyphicon-play-circle:before {\n  content: \"\\e029\";\n}\n.glyphicon-repeat:before {\n  content: \"\\e030\";\n}\n.glyphicon-refresh:before {\n  content: \"\\e031\";\n}\n.glyphicon-list-alt:before {\n  content: \"\\e032\";\n}\n.glyphicon-lock:before {\n  content: \"\\e033\";\n}\n.glyphicon-flag:before {\n  content: \"\\e034\";\n}\n.glyphicon-headphones:before {\n  content: \"\\e035\";\n}\n.glyphicon-volume-off:before {\n  content: \"\\e036\";\n}\n.glyphicon-volume-down:before {\n  content: \"\\e037\";\n}\n.glyphicon-volume-up:before {\n  content: \"\\e038\";\n}\n.glyphicon-qrcode:before {\n  content: \"\\e039\";\n}\n.glyphicon-barcode:before {\n  content: \"\\e040\";\n}\n.glyphicon-tag:before {\n  content: \"\\e041\";\n}\n.glyphicon-tags:before {\n  content: \"\\e042\";\n}\n.glyphicon-book:before {\n  content: \"\\e043\";\n}\n.glyphicon-bookmark:before {\n  content: \"\\e044\";\n}\n.glyphicon-print:before {\n  content: \"\\e045\";\n}\n.glyphicon-camera:before {\n  content: \"\\e046\";\n}\n.glyphicon-font:before {\n  content: \"\\e047\";\n}\n.glyphicon-bold:before {\n  content: \"\\e048\";\n}\n.glyphicon-italic:before {\n  content: \"\\e049\";\n}\n.glyphicon-text-height:before {\n  content: \"\\e050\";\n}\n.glyphicon-text-width:before {\n  content: \"\\e051\";\n}\n.glyphicon-align-left:before {\n  content: \"\\e052\";\n}\n.glyphicon-align-center:before {\n  content: \"\\e053\";\n}\n.glyphicon-align-right:before {\n  content: \"\\e054\";\n}\n.glyphicon-align-justify:before {\n  content: \"\\e055\";\n}\n.glyphicon-list:before {\n  content: \"\\e056\";\n}\n.glyphicon-indent-left:before {\n  content: \"\\e057\";\n}\n.glyphicon-indent-right:before {\n  content: \"\\e058\";\n}\n.glyphicon-facetime-video:before {\n  content: \"\\e059\";\n}\n.glyphicon-picture:before {\n  content: \"\\e060\";\n}\n.glyphicon-map-marker:before {\n  content: \"\\e062\";\n}\n.glyphicon-adjust:before {\n  content: \"\\e063\";\n}\n.glyphicon-tint:before {\n  content: \"\\e064\";\n}\n.glyphicon-edit:before {\n  content: \"\\e065\";\n}\n.glyphicon-share:before {\n  content: \"\\e066\";\n}\n.glyphicon-check:before {\n  content: \"\\e067\";\n}\n.glyphicon-move:before {\n  content: \"\\e068\";\n}\n.glyphicon-step-backward:before {\n  content: \"\\e069\";\n}\n.glyphicon-fast-backward:before {\n  content: \"\\e070\";\n}\n.glyphicon-backward:before {\n  content: \"\\e071\";\n}\n.glyphicon-play:before {\n  content: \"\\e072\";\n}\n.glyphicon-pause:before {\n  content: \"\\e073\";\n}\n.glyphicon-stop:before {\n  content: \"\\e074\";\n}\n.glyphicon-forward:before {\n  content: \"\\e075\";\n}\n.glyphicon-fast-forward:before {\n  content: \"\\e076\";\n}\n.glyphicon-step-forward:before {\n  content: \"\\e077\";\n}\n.glyphicon-eject:before {\n  content: \"\\e078\";\n}\n.glyphicon-chevron-left:before {\n  content: \"\\e079\";\n}\n.glyphicon-chevron-right:before {\n  content: \"\\e080\";\n}\n.glyphicon-plus-sign:before {\n  content: \"\\e081\";\n}\n.glyphicon-minus-sign:before {\n  content: \"\\e082\";\n}\n.glyphicon-remove-sign:before {\n  content: \"\\e083\";\n}\n.glyphicon-ok-sign:before {\n  content: \"\\e084\";\n}\n.glyphicon-question-sign:before {\n  content: \"\\e085\";\n}\n.glyphicon-info-sign:before {\n  content: \"\\e086\";\n}\n.glyphicon-screenshot:before {\n  content: \"\\e087\";\n}\n.glyphicon-remove-circle:before {\n  content: \"\\e088\";\n}\n.glyphicon-ok-circle:before {\n  content: \"\\e089\";\n}\n.glyphicon-ban-circle:before {\n  content: \"\\e090\";\n}\n.glyphicon-arrow-left:before {\n  content: \"\\e091\";\n}\n.glyphicon-arrow-right:before {\n  content: \"\\e092\";\n}\n.glyphicon-arrow-up:before {\n  content: \"\\e093\";\n}\n.glyphicon-arrow-down:before {\n  content: \"\\e094\";\n}\n.glyphicon-share-alt:before {\n  content: \"\\e095\";\n}\n.glyphicon-resize-full:before {\n  content: \"\\e096\";\n}\n.glyphicon-resize-small:before {\n  content: \"\\e097\";\n}\n.glyphicon-exclamation-sign:before {\n  content: \"\\e101\";\n}\n.glyphicon-gift:before {\n  content: \"\\e102\";\n}\n.glyphicon-leaf:before {\n  content: \"\\e103\";\n}\n.glyphicon-fire:before {\n  content: \"\\e104\";\n}\n.glyphicon-eye-open:before {\n  content: \"\\e105\";\n}\n.glyphicon-eye-close:before {\n  content: \"\\e106\";\n}\n.glyphicon-warning-sign:before {\n  content: \"\\e107\";\n}\n.glyphicon-plane:before {\n  content: \"\\e108\";\n}\n.glyphicon-calendar:before {\n  content: \"\\e109\";\n}\n.glyphicon-random:before {\n  content: \"\\e110\";\n}\n.glyphicon-comment:before {\n  content: \"\\e111\";\n}\n.glyphicon-magnet:before {\n  content: \"\\e112\";\n}\n.glyphicon-chevron-up:before {\n  content: \"\\e113\";\n}\n.glyphicon-chevron-down:before {\n  content: \"\\e114\";\n}\n.glyphicon-retweet:before {\n  content: \"\\e115\";\n}\n.glyphicon-shopping-cart:before {\n  content: \"\\e116\";\n}\n.glyphicon-folder-close:before {\n  content: \"\\e117\";\n}\n.glyphicon-folder-open:before {\n  content: \"\\e118\";\n}\n.glyphicon-resize-vertical:before {\n  content: \"\\e119\";\n}\n.glyphicon-resize-horizontal:before {\n  content: \"\\e120\";\n}\n.glyphicon-hdd:before {\n  content: \"\\e121\";\n}\n.glyphicon-bullhorn:before {\n  content: \"\\e122\";\n}\n.glyphicon-bell:before {\n  content: \"\\e123\";\n}\n.glyphicon-certificate:before {\n  content: \"\\e124\";\n}\n.glyphicon-thumbs-up:before {\n  content: \"\\e125\";\n}\n.glyphicon-thumbs-down:before {\n  content: \"\\e126\";\n}\n.glyphicon-hand-right:before {\n  content: \"\\e127\";\n}\n.glyphicon-hand-left:before {\n  content: \"\\e128\";\n}\n.glyphicon-hand-up:before {\n  content: \"\\e129\";\n}\n.glyphicon-hand-down:before {\n  content: \"\\e130\";\n}\n.glyphicon-circle-arrow-right:before {\n  content: \"\\e131\";\n}\n.glyphicon-circle-arrow-left:before {\n  content: \"\\e132\";\n}\n.glyphicon-circle-arrow-up:before {\n  content: \"\\e133\";\n}\n.glyphicon-circle-arrow-down:before {\n  content: \"\\e134\";\n}\n.glyphicon-globe:before {\n  content: \"\\e135\";\n}\n.glyphicon-wrench:before {\n  content: \"\\e136\";\n}\n.glyphicon-tasks:before {\n  content: \"\\e137\";\n}\n.glyphicon-filter:before {\n  content: \"\\e138\";\n}\n.glyphicon-briefcase:before {\n  content: \"\\e139\";\n}\n.glyphicon-fullscreen:before {\n  content: \"\\e140\";\n}\n.glyphicon-dashboard:before {\n  content: \"\\e141\";\n}\n.glyphicon-paperclip:before {\n  content: \"\\e142\";\n}\n.glyphicon-heart-empty:before {\n  content: \"\\e143\";\n}\n.glyphicon-link:before {\n  content: \"\\e144\";\n}\n.glyphicon-phone:before {\n  content: \"\\e145\";\n}\n.glyphicon-pushpin:before {\n  content: \"\\e146\";\n}\n.glyphicon-usd:before {\n  content: \"\\e148\";\n}\n.glyphicon-gbp:before {\n  content: \"\\e149\";\n}\n.glyphicon-sort:before {\n  content: \"\\e150\";\n}\n.glyphicon-sort-by-alphabet:before {\n  content: \"\\e151\";\n}\n.glyphicon-sort-by-alphabet-alt:before {\n  content: \"\\e152\";\n}\n.glyphicon-sort-by-order:before {\n  content: \"\\e153\";\n}\n.glyphicon-sort-by-order-alt:before {\n  content: \"\\e154\";\n}\n.glyphicon-sort-by-attributes:before {\n  content: \"\\e155\";\n}\n.glyphicon-sort-by-attributes-alt:before {\n  content: \"\\e156\";\n}\n.glyphicon-unchecked:before {\n  content: \"\\e157\";\n}\n.glyphicon-expand:before {\n  content: \"\\e158\";\n}\n.glyphicon-collapse-down:before {\n  content: \"\\e159\";\n}\n.glyphicon-collapse-up:before {\n  content: \"\\e160\";\n}\n.glyphicon-log-in:before {\n  content: \"\\e161\";\n}\n.glyphicon-flash:before {\n  content: \"\\e162\";\n}\n.glyphicon-log-out:before {\n  content: \"\\e163\";\n}\n.glyphicon-new-window:before {\n  content: \"\\e164\";\n}\n.glyphicon-record:before {\n  content: \"\\e165\";\n}\n.glyphicon-save:before {\n  content: \"\\e166\";\n}\n.glyphicon-open:before {\n  content: \"\\e167\";\n}\n.glyphicon-saved:before {\n  content: \"\\e168\";\n}\n.glyphicon-import:before {\n  content: \"\\e169\";\n}\n.glyphicon-export:before {\n  content: \"\\e170\";\n}\n.glyphicon-send:before {\n  content: \"\\e171\";\n}\n.glyphicon-floppy-disk:before {\n  content: \"\\e172\";\n}\n.glyphicon-floppy-saved:before {\n  content: \"\\e173\";\n}\n.glyphicon-floppy-remove:before {\n  content: \"\\e174\";\n}\n.glyphicon-floppy-save:before {\n  content: \"\\e175\";\n}\n.glyphicon-floppy-open:before {\n  content: \"\\e176\";\n}\n.glyphicon-credit-card:before {\n  content: \"\\e177\";\n}\n.glyphicon-transfer:before {\n  content: \"\\e178\";\n}\n.glyphicon-cutlery:before {\n  content: \"\\e179\";\n}\n.glyphicon-header:before {\n  content: \"\\e180\";\n}\n.glyphicon-compressed:before {\n  content: \"\\e181\";\n}\n.glyphicon-earphone:before {\n  content: \"\\e182\";\n}\n.glyphicon-phone-alt:before {\n  content: \"\\e183\";\n}\n.glyphicon-tower:before {\n  content: \"\\e184\";\n}\n.glyphicon-stats:before {\n  content: \"\\e185\";\n}\n.glyphicon-sd-video:before {\n  content: \"\\e186\";\n}\n.glyphicon-hd-video:before {\n  content: \"\\e187\";\n}\n.glyphicon-subtitles:before {\n  content: \"\\e188\";\n}\n.glyphicon-sound-stereo:before {\n  content: \"\\e189\";\n}\n.glyphicon-sound-dolby:before {\n  content: \"\\e190\";\n}\n.glyphicon-sound-5-1:before {\n  content: \"\\e191\";\n}\n.glyphicon-sound-6-1:before {\n  content: \"\\e192\";\n}\n.glyphicon-sound-7-1:before {\n  content: \"\\e193\";\n}\n.glyphicon-copyright-mark:before {\n  content: \"\\e194\";\n}\n.glyphicon-registration-mark:before {\n  content: \"\\e195\";\n}\n.glyphicon-cloud-download:before {\n  content: \"\\e197\";\n}\n.glyphicon-cloud-upload:before {\n  content: \"\\e198\";\n}\n.glyphicon-tree-conifer:before {\n  content: \"\\e199\";\n}\n.glyphicon-tree-deciduous:before {\n  content: \"\\e200\";\n}\n.glyphicon-cd:before {\n  content: \"\\e201\";\n}\n.glyphicon-save-file:before {\n  content: \"\\e202\";\n}\n.glyphicon-open-file:before {\n  content: \"\\e203\";\n}\n.glyphicon-level-up:before {\n  content: \"\\e204\";\n}\n.glyphicon-copy:before {\n  content: \"\\e205\";\n}\n.glyphicon-paste:before {\n  content: \"\\e206\";\n}\n.glyphicon-alert:before {\n  content: \"\\e209\";\n}\n.glyphicon-equalizer:before {\n  content: \"\\e210\";\n}\n.glyphicon-king:before {\n  content: \"\\e211\";\n}\n.glyphicon-queen:before {\n  content: \"\\e212\";\n}\n.glyphicon-pawn:before {\n  content: \"\\e213\";\n}\n.glyphicon-bishop:before {\n  content: \"\\e214\";\n}\n.glyphicon-knight:before {\n  content: \"\\e215\";\n}\n.glyphicon-baby-formula:before {\n  content: \"\\e216\";\n}\n.glyphicon-tent:before {\n  content: \"\\26fa\";\n}\n.glyphicon-blackboard:before {\n  content: \"\\e218\";\n}\n.glyphicon-bed:before {\n  content: \"\\e219\";\n}\n.glyphicon-apple:before {\n  content: \"\\f8ff\";\n}\n.glyphicon-erase:before {\n  content: \"\\e221\";\n}\n.glyphicon-hourglass:before {\n  content: \"\\231b\";\n}\n.glyphicon-lamp:before {\n  content: \"\\e223\";\n}\n.glyphicon-duplicate:before {\n  content: \"\\e224\";\n}\n.glyphicon-piggy-bank:before {\n  content: \"\\e225\";\n}\n.glyphicon-scissors:before {\n  content: \"\\e226\";\n}\n.glyphicon-bitcoin:before {\n  content: \"\\e227\";\n}\n.glyphicon-btc:before {\n  content: \"\\e227\";\n}\n.glyphicon-xbt:before {\n  content: \"\\e227\";\n}\n.glyphicon-yen:before {\n  content: \"\\00a5\";\n}\n.glyphicon-jpy:before {\n  content: \"\\00a5\";\n}\n.glyphicon-ruble:before {\n  content: \"\\20bd\";\n}\n.glyphicon-rub:before {\n  content: \"\\20bd\";\n}\n.glyphicon-scale:before {\n  content: \"\\e230\";\n}\n.glyphicon-ice-lolly:before {\n  content: \"\\e231\";\n}\n.glyphicon-ice-lolly-tasted:before {\n  content: \"\\e232\";\n}\n.glyphicon-education:before {\n  content: \"\\e233\";\n}\n.glyphicon-option-horizontal:before {\n  content: \"\\e234\";\n}\n.glyphicon-option-vertical:before {\n  content: \"\\e235\";\n}\n.glyphicon-menu-hamburger:before {\n  content: \"\\e236\";\n}\n.glyphicon-modal-window:before {\n  content: \"\\e237\";\n}\n.glyphicon-oil:before {\n  content: \"\\e238\";\n}\n.glyphicon-grain:before {\n  content: \"\\e239\";\n}\n.glyphicon-sunglasses:before {\n  content: \"\\e240\";\n}\n.glyphicon-text-size:before {\n  content: \"\\e241\";\n}\n.glyphicon-text-color:before {\n  content: \"\\e242\";\n}\n.glyphicon-text-background:before {\n  content: \"\\e243\";\n}\n.glyphicon-object-align-top:before {\n  content: \"\\e244\";\n}\n.glyphicon-object-align-bottom:before {\n  content: \"\\e245\";\n}\n.glyphicon-object-align-horizontal:before {\n  content: \"\\e246\";\n}\n.glyphicon-object-align-left:before {\n  content: \"\\e247\";\n}\n.glyphicon-object-align-vertical:before {\n  content: \"\\e248\";\n}\n.glyphicon-object-align-right:before {\n  content: \"\\e249\";\n}\n.glyphicon-triangle-right:before {\n  content: \"\\e250\";\n}\n.glyphicon-triangle-left:before {\n  content: \"\\e251\";\n}\n.glyphicon-triangle-bottom:before {\n  content: \"\\e252\";\n}\n.glyphicon-triangle-top:before {\n  content: \"\\e253\";\n}\n.glyphicon-console:before {\n  content: \"\\e254\";\n}\n.glyphicon-superscript:before {\n  content: \"\\e255\";\n}\n.glyphicon-subscript:before {\n  content: \"\\e256\";\n}\n.glyphicon-menu-left:before {\n  content: \"\\e257\";\n}\n.glyphicon-menu-right:before {\n  content: \"\\e258\";\n}\n.glyphicon-menu-down:before {\n  content: \"\\e259\";\n}\n.glyphicon-menu-up:before {\n  content: \"\\e260\";\n}\n* {\n  -webkit-box-sizing: border-box;\n  -moz-box-sizing: border-box;\n  box-sizing: border-box;\n}\n*:before,\n*:after {\n  -webkit-box-sizing: border-box;\n  -moz-box-sizing: border-box;\n  box-sizing: border-box;\n}\nhtml {\n  font-size: 10px;\n  -webkit-tap-highlight-color: rgba(0, 0, 0, 0);\n}\nbody {\n  font-family: \"Helvetica Neue\", Helvetica, Arial, sans-serif;\n  font-size: 14px;\n  line-height: 1.42857143;\n  color: #333333;\n  background-color: #fff;\n}\ninput,\nbutton,\nselect,\ntextarea {\n  font-family: inherit;\n  font-size: inherit;\n  line-height: inherit;\n}\na {\n  color: #337ab7;\n  text-decoration: none;\n}\na:hover,\na:focus {\n  color: #23527c;\n  text-decoration: underline;\n}\na:focus {\n  outline: 5px auto -webkit-focus-ring-color;\n  outline-offset: -2px;\n}\nfigure {\n  margin: 0;\n}\nimg {\n  vertical-align: middle;\n}\n.img-responsive,\n.thumbnail > img,\n.thumbnail a > img,\n.carousel-inner > .item > img,\n.carousel-inner > .item > a > img {\n  display: block;\n  max-width: 100%;\n  height: auto;\n}\n.img-rounded {\n  border-radius: 6px;\n}\n.img-thumbnail {\n  padding: 4px;\n  line-height: 1.42857143;\n  background-color: #fff;\n  border: 1px solid #ddd;\n  border-radius: 4px;\n  -webkit-transition: all 0.2s ease-in-out;\n  -o-transition: all 0.2s ease-in-out;\n  transition: all 0.2s ease-in-out;\n  display: inline-block;\n  max-width: 100%;\n  height: auto;\n}\n.img-circle {\n  border-radius: 50%;\n}\nhr {\n  margin-top: 20px;\n  margin-bottom: 20px;\n  border: 0;\n  border-top: 1px solid #eeeeee;\n}\n.sr-only {\n  position: absolute;\n  width: 1px;\n  height: 1px;\n  margin: -1px;\n  padding: 0;\n  overflow: hidden;\n  clip: rect(0, 0, 0, 0);\n  border: 0;\n}\n.sr-only-focusable:active,\n.sr-only-focusable:focus {\n  position: static;\n  width: auto;\n  height: auto;\n  margin: 0;\n  overflow: visible;\n  clip: auto;\n}\n[role=\"button\"] {\n  cursor: pointer;\n}\nh1,\nh2,\nh3,\nh4,\nh5,\nh6,\n.h1,\n.h2,\n.h3,\n.h4,\n.h5,\n.h6 {\n  font-family: inherit;\n  font-weight: 500;\n  line-height: 1.1;\n  color: inherit;\n}\nh1 small,\nh2 small,\nh3 small,\nh4 small,\nh5 small,\nh6 small,\n.h1 small,\n.h2 small,\n.h3 small,\n.h4 small,\n.h5 small,\n.h6 small,\nh1 .small,\nh2 .small,\nh3 .small,\nh4 .small,\nh5 .small,\nh6 .small,\n.h1 .small,\n.h2 .small,\n.h3 .small,\n.h4 .small,\n.h5 .small,\n.h6 .small {\n  font-weight: normal;\n  line-height: 1;\n  color: #777777;\n}\nh1,\n.h1,\nh2,\n.h2,\nh3,\n.h3 {\n  margin-top: 20px;\n  margin-bottom: 10px;\n}\nh1 small,\n.h1 small,\nh2 small,\n.h2 small,\nh3 small,\n.h3 small,\nh1 .small,\n.h1 .small,\nh2 .small,\n.h2 .small,\nh3 .small,\n.h3 .small {\n  font-size: 65%;\n}\nh4,\n.h4,\nh5,\n.h5,\nh6,\n.h6 {\n  margin-top: 10px;\n  margin-bottom: 10px;\n}\nh4 small,\n.h4 small,\nh5 small,\n.h5 small,\nh6 small,\n.h6 small,\nh4 .small,\n.h4 .small,\nh5 .small,\n.h5 .small,\nh6 .small,\n.h6 .small {\n  font-size: 75%;\n}\nh1,\n.h1 {\n  font-size: 36px;\n}\nh2,\n.h2 {\n  font-size: 30px;\n}\nh3,\n.h3 {\n  font-size: 24px;\n}\nh4,\n.h4 {\n  font-size: 18px;\n}\nh5,\n.h5 {\n  font-size: 14px;\n}\nh6,\n.h6 {\n  font-size: 12px;\n}\np {\n  margin: 0 0 10px;\n}\n.lead {\n  margin-bottom: 20px;\n  font-size: 16px;\n  font-weight: 300;\n  line-height: 1.4;\n}\n@media (min-width: 768px) {\n  .lead {\n    font-size: 21px;\n  }\n}\nsmall,\n.small {\n  font-size: 85%;\n}\nmark,\n.mark {\n  background-color: #fcf8e3;\n  padding: .2em;\n}\n.text-left {\n  text-align: left;\n}\n.text-right {\n  text-align: right;\n}\n.text-center {\n  text-align: center;\n}\n.text-justify {\n  text-align: justify;\n}\n.text-nowrap {\n  white-space: nowrap;\n}\n.text-lowercase {\n  text-transform: lowercase;\n}\n.text-uppercase {\n  text-transform: uppercase;\n}\n.text-capitalize {\n  text-transform: capitalize;\n}\n.text-muted {\n  color: #777777;\n}\n.text-primary {\n  color: #337ab7;\n}\na.text-primary:hover,\na.text-primary:focus {\n  color: #286090;\n}\n.text-success {\n  color: #3c763d;\n}\na.text-success:hover,\na.text-success:focus {\n  color: #2b542c;\n}\n.text-info {\n  color: #31708f;\n}\na.text-info:hover,\na.text-info:focus {\n  color: #245269;\n}\n.text-warning {\n  color: #8a6d3b;\n}\na.text-warning:hover,\na.text-warning:focus {\n  color: #66512c;\n}\n.text-danger {\n  color: #a94442;\n}\na.text-danger:hover,\na.text-danger:focus {\n  color: #843534;\n}\n.bg-primary {\n  color: #fff;\n  background-color: #337ab7;\n}\na.bg-primary:hover,\na.bg-primary:focus {\n  background-color: #286090;\n}\n.bg-success {\n  background-color: #dff0d8;\n}\na.bg-success:hover,\na.bg-success:focus {\n  background-color: #c1e2b3;\n}\n.bg-info {\n  background-color: #d9edf7;\n}\na.bg-info:hover,\na.bg-info:focus {\n  background-color: #afd9ee;\n}\n.bg-warning {\n  background-color: #fcf8e3;\n}\na.bg-warning:hover,\na.bg-warning:focus {\n  background-color: #f7ecb5;\n}\n.bg-danger {\n  background-color: #f2dede;\n}\na.bg-danger:hover,\na.bg-danger:focus {\n  background-color: #e4b9b9;\n}\n.page-header {\n  padding-bottom: 9px;\n  margin: 40px 0 20px;\n  border-bottom: 1px solid #eeeeee;\n}\nul,\nol {\n  margin-top: 0;\n  margin-bottom: 10px;\n}\nul ul,\nol ul,\nul ol,\nol ol {\n  margin-bottom: 0;\n}\n.list-unstyled {\n  padding-left: 0;\n  list-style: none;\n}\n.list-inline {\n  padding-left: 0;\n  list-style: none;\n  margin-left: -5px;\n}\n.list-inline > li {\n  display: inline-block;\n  padding-left: 5px;\n  padding-right: 5px;\n}\ndl {\n  margin-top: 0;\n  margin-bottom: 20px;\n}\ndt,\ndd {\n  line-height: 1.42857143;\n}\ndt {\n  font-weight: bold;\n}\ndd {\n  margin-left: 0;\n}\n@media (min-width: 768px) {\n  .dl-horizontal dt {\n    float: left;\n    width: 160px;\n    clear: left;\n    text-align: right;\n    overflow: hidden;\n    text-overflow: ellipsis;\n    white-space: nowrap;\n  }\n  .dl-horizontal dd {\n    margin-left: 180px;\n  }\n}\nabbr[title],\nabbr[data-original-title] {\n  cursor: help;\n  border-bottom: 1px dotted #777777;\n}\n.initialism {\n  font-size: 90%;\n  text-transform: uppercase;\n}\nblockquote {\n  padding: 10px 20px;\n  margin: 0 0 20px;\n  font-size: 17.5px;\n  border-left: 5px solid #eeeeee;\n}\nblockquote p:last-child,\nblockquote ul:last-child,\nblockquote ol:last-child {\n  margin-bottom: 0;\n}\nblockquote footer,\nblockquote small,\nblockquote .small {\n  display: block;\n  font-size: 80%;\n  line-height: 1.42857143;\n  color: #777777;\n}\nblockquote footer:before,\nblockquote small:before,\nblockquote .small:before {\n  content: '\\2014 \\00A0';\n}\n.blockquote-reverse,\nblockquote.pull-right {\n  padding-right: 15px;\n  padding-left: 0;\n  border-right: 5px solid #eeeeee;\n  border-left: 0;\n  text-align: right;\n}\n.blockquote-reverse footer:before,\nblockquote.pull-right footer:before,\n.blockquote-reverse small:before,\nblockquote.pull-right small:before,\n.blockquote-reverse .small:before,\nblockquote.pull-right .small:before {\n  content: '';\n}\n.blockquote-reverse footer:after,\nblockquote.pull-right footer:after,\n.blockquote-reverse small:after,\nblockquote.pull-right small:after,\n.blockquote-reverse .small:after,\nblockquote.pull-right .small:after {\n  content: '\\00A0 \\2014';\n}\naddress {\n  margin-bottom: 20px;\n  font-style: normal;\n  line-height: 1.42857143;\n}\ncode,\nkbd,\npre,\nsamp {\n  font-family: Menlo, Monaco, Consolas, \"Courier New\", monospace;\n}\ncode {\n  padding: 2px 4px;\n  font-size: 90%;\n  color: #c7254e;\n  background-color: #f9f2f4;\n  border-radius: 4px;\n}\nkbd {\n  padding: 2px 4px;\n  font-size: 90%;\n  color: #fff;\n  background-color: #333;\n  border-radius: 3px;\n  box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.25);\n}\nkbd kbd {\n  padding: 0;\n  font-size: 100%;\n  font-weight: bold;\n  box-shadow: none;\n}\npre {\n  display: block;\n  padding: 9.5px;\n  margin: 0 0 10px;\n  font-size: 13px;\n  line-height: 1.42857143;\n  word-break: break-all;\n  word-wrap: break-word;\n  color: #333333;\n  background-color: #f5f5f5;\n  border: 1px solid #ccc;\n  border-radius: 4px;\n}\npre code {\n  padding: 0;\n  font-size: inherit;\n  color: inherit;\n  white-space: pre-wrap;\n  background-color: transparent;\n  border-radius: 0;\n}\n.pre-scrollable {\n  max-height: 340px;\n  overflow-y: scroll;\n}\n.container {\n  margin-right: auto;\n  margin-left: auto;\n  padding-left: 15px;\n  padding-right: 15px;\n}\n@media (min-width: 768px) {\n  .container {\n    width: 750px;\n  }\n}\n@media (min-width: 992px) {\n  .container {\n    width: 970px;\n  }\n}\n@media (min-width: 1200px) {\n  .container {\n    width: 1170px;\n  }\n}\n.container-fluid {\n  margin-right: auto;\n  margin-left: auto;\n  padding-left: 15px;\n  padding-right: 15px;\n}\n.row {\n  margin-left: -15px;\n  margin-right: -15px;\n}\n.col-xs-1, .col-sm-1, .col-md-1, .col-lg-1, .col-xs-2, .col-sm-2, .col-md-2, .col-lg-2, .col-xs-3, .col-sm-3, .col-md-3, .col-lg-3, .col-xs-4, .col-sm-4, .col-md-4, .col-lg-4, .col-xs-5, .col-sm-5, .col-md-5, .col-lg-5, .col-xs-6, .col-sm-6, .col-md-6, .col-lg-6, .col-xs-7, .col-sm-7, .col-md-7, .col-lg-7, .col-xs-8, .col-sm-8, .col-md-8, .col-lg-8, .col-xs-9, .col-sm-9, .col-md-9, .col-lg-9, .col-xs-10, .col-sm-10, .col-md-10, .col-lg-10, .col-xs-11, .col-sm-11, .col-md-11, .col-lg-11, .col-xs-12, .col-sm-12, .col-md-12, .col-lg-12 {\n  position: relative;\n  min-height: 1px;\n  padding-left: 15px;\n  padding-right: 15px;\n}\n.col-xs-1, .col-xs-2, .col-xs-3, .col-xs-4, .col-xs-5, .col-xs-6, .col-xs-7, .col-xs-8, .col-xs-9, .col-xs-10, .col-xs-11, .col-xs-12 {\n  float: left;\n}\n.col-xs-12 {\n  width: 100%;\n}\n.col-xs-11 {\n  width: 91.66666667%;\n}\n.col-xs-10 {\n  width: 83.33333333%;\n}\n.col-xs-9 {\n  width: 75%;\n}\n.col-xs-8 {\n  width: 66.66666667%;\n}\n.col-xs-7 {\n  width: 58.33333333%;\n}\n.col-xs-6 {\n  width: 50%;\n}\n.col-xs-5 {\n  width: 41.66666667%;\n}\n.col-xs-4 {\n  width: 33.33333333%;\n}\n.col-xs-3 {\n  width: 25%;\n}\n.col-xs-2 {\n  width: 16.66666667%;\n}\n.col-xs-1 {\n  width: 8.33333333%;\n}\n.col-xs-pull-12 {\n  right: 100%;\n}\n.col-xs-pull-11 {\n  right: 91.66666667%;\n}\n.col-xs-pull-10 {\n  right: 83.33333333%;\n}\n.col-xs-pull-9 {\n  right: 75%;\n}\n.col-xs-pull-8 {\n  right: 66.66666667%;\n}\n.col-xs-pull-7 {\n  right: 58.33333333%;\n}\n.col-xs-pull-6 {\n  right: 50%;\n}\n.col-xs-pull-5 {\n  right: 41.66666667%;\n}\n.col-xs-pull-4 {\n  right: 33.33333333%;\n}\n.col-xs-pull-3 {\n  right: 25%;\n}\n.col-xs-pull-2 {\n  right: 16.66666667%;\n}\n.col-xs-pull-1 {\n  right: 8.33333333%;\n}\n.col-xs-pull-0 {\n  right: auto;\n}\n.col-xs-push-12 {\n  left: 100%;\n}\n.col-xs-push-11 {\n  left: 91.66666667%;\n}\n.col-xs-push-10 {\n  left: 83.33333333%;\n}\n.col-xs-push-9 {\n  left: 75%;\n}\n.col-xs-push-8 {\n  left: 66.66666667%;\n}\n.col-xs-push-7 {\n  left: 58.33333333%;\n}\n.col-xs-push-6 {\n  left: 50%;\n}\n.col-xs-push-5 {\n  left: 41.66666667%;\n}\n.col-xs-push-4 {\n  left: 33.33333333%;\n}\n.col-xs-push-3 {\n  left: 25%;\n}\n.col-xs-push-2 {\n  left: 16.66666667%;\n}\n.col-xs-push-1 {\n  left: 8.33333333%;\n}\n.col-xs-push-0 {\n  left: auto;\n}\n.col-xs-offset-12 {\n  margin-left: 100%;\n}\n.col-xs-offset-11 {\n  margin-left: 91.66666667%;\n}\n.col-xs-offset-10 {\n  margin-left: 83.33333333%;\n}\n.col-xs-offset-9 {\n  margin-left: 75%;\n}\n.col-xs-offset-8 {\n  margin-left: 66.66666667%;\n}\n.col-xs-offset-7 {\n  margin-left: 58.33333333%;\n}\n.col-xs-offset-6 {\n  margin-left: 50%;\n}\n.col-xs-offset-5 {\n  margin-left: 41.66666667%;\n}\n.col-xs-offset-4 {\n  margin-left: 33.33333333%;\n}\n.col-xs-offset-3 {\n  margin-left: 25%;\n}\n.col-xs-offset-2 {\n  margin-left: 16.66666667%;\n}\n.col-xs-offset-1 {\n  margin-left: 8.33333333%;\n}\n.col-xs-offset-0 {\n  margin-left: 0%;\n}\n@media (min-width: 768px) {\n  .col-sm-1, .col-sm-2, .col-sm-3, .col-sm-4, .col-sm-5, .col-sm-6, .col-sm-7, .col-sm-8, .col-sm-9, .col-sm-10, .col-sm-11, .col-sm-12 {\n    float: left;\n  }\n  .col-sm-12 {\n    width: 100%;\n  }\n  .col-sm-11 {\n    width: 91.66666667%;\n  }\n  .col-sm-10 {\n    width: 83.33333333%;\n  }\n  .col-sm-9 {\n    width: 75%;\n  }\n  .col-sm-8 {\n    width: 66.66666667%;\n  }\n  .col-sm-7 {\n    width: 58.33333333%;\n  }\n  .col-sm-6 {\n    width: 50%;\n  }\n  .col-sm-5 {\n    width: 41.66666667%;\n  }\n  .col-sm-4 {\n    width: 33.33333333%;\n  }\n  .col-sm-3 {\n    width: 25%;\n  }\n  .col-sm-2 {\n    width: 16.66666667%;\n  }\n  .col-sm-1 {\n    width: 8.33333333%;\n  }\n  .col-sm-pull-12 {\n    right: 100%;\n  }\n  .col-sm-pull-11 {\n    right: 91.66666667%;\n  }\n  .col-sm-pull-10 {\n    right: 83.33333333%;\n  }\n  .col-sm-pull-9 {\n    right: 75%;\n  }\n  .col-sm-pull-8 {\n    right: 66.66666667%;\n  }\n  .col-sm-pull-7 {\n    right: 58.33333333%;\n  }\n  .col-sm-pull-6 {\n    right: 50%;\n  }\n  .col-sm-pull-5 {\n    right: 41.66666667%;\n  }\n  .col-sm-pull-4 {\n    right: 33.33333333%;\n  }\n  .col-sm-pull-3 {\n    right: 25%;\n  }\n  .col-sm-pull-2 {\n    right: 16.66666667%;\n  }\n  .col-sm-pull-1 {\n    right: 8.33333333%;\n  }\n  .col-sm-pull-0 {\n    right: auto;\n  }\n  .col-sm-push-12 {\n    left: 100%;\n  }\n  .col-sm-push-11 {\n    left: 91.66666667%;\n  }\n  .col-sm-push-10 {\n    left: 83.33333333%;\n  }\n  .col-sm-push-9 {\n    left: 75%;\n  }\n  .col-sm-push-8 {\n    left: 66.66666667%;\n  }\n  .col-sm-push-7 {\n    left: 58.33333333%;\n  }\n  .col-sm-push-6 {\n    left: 50%;\n  }\n  .col-sm-push-5 {\n    left: 41.66666667%;\n  }\n  .col-sm-push-4 {\n    left: 33.33333333%;\n  }\n  .col-sm-push-3 {\n    left: 25%;\n  }\n  .col-sm-push-2 {\n    left: 16.66666667%;\n  }\n  .col-sm-push-1 {\n    left: 8.33333333%;\n  }\n  .col-sm-push-0 {\n    left: auto;\n  }\n  .col-sm-offset-12 {\n    margin-left: 100%;\n  }\n  .col-sm-offset-11 {\n    margin-left: 91.66666667%;\n  }\n  .col-sm-offset-10 {\n    margin-left: 83.33333333%;\n  }\n  .col-sm-offset-9 {\n    margin-left: 75%;\n  }\n  .col-sm-offset-8 {\n    margin-left: 66.66666667%;\n  }\n  .col-sm-offset-7 {\n    margin-left: 58.33333333%;\n  }\n  .col-sm-offset-6 {\n    margin-left: 50%;\n  }\n  .col-sm-offset-5 {\n    margin-left: 41.66666667%;\n  }\n  .col-sm-offset-4 {\n    margin-left: 33.33333333%;\n  }\n  .col-sm-offset-3 {\n    margin-left: 25%;\n  }\n  .col-sm-offset-2 {\n    margin-left: 16.66666667%;\n  }\n  .col-sm-offset-1 {\n    margin-left: 8.33333333%;\n  }\n  .col-sm-offset-0 {\n    margin-left: 0%;\n  }\n}\n@media (min-width: 992px) {\n  .col-md-1, .col-md-2, .col-md-3, .col-md-4, .col-md-5, .col-md-6, .col-md-7, .col-md-8, .col-md-9, .col-md-10, .col-md-11, .col-md-12 {\n    float: left;\n  }\n  .col-md-12 {\n    width: 100%;\n  }\n  .col-md-11 {\n    width: 91.66666667%;\n  }\n  .col-md-10 {\n    width: 83.33333333%;\n  }\n  .col-md-9 {\n    width: 75%;\n  }\n  .col-md-8 {\n    width: 66.66666667%;\n  }\n  .col-md-7 {\n    width: 58.33333333%;\n  }\n  .col-md-6 {\n    width: 50%;\n  }\n  .col-md-5 {\n    width: 41.66666667%;\n  }\n  .col-md-4 {\n    width: 33.33333333%;\n  }\n  .col-md-3 {\n    width: 25%;\n  }\n  .col-md-2 {\n    width: 16.66666667%;\n  }\n  .col-md-1 {\n    width: 8.33333333%;\n  }\n  .col-md-pull-12 {\n    right: 100%;\n  }\n  .col-md-pull-11 {\n    right: 91.66666667%;\n  }\n  .col-md-pull-10 {\n    right: 83.33333333%;\n  }\n  .col-md-pull-9 {\n    right: 75%;\n  }\n  .col-md-pull-8 {\n    right: 66.66666667%;\n  }\n  .col-md-pull-7 {\n    right: 58.33333333%;\n  }\n  .col-md-pull-6 {\n    right: 50%;\n  }\n  .col-md-pull-5 {\n    right: 41.66666667%;\n  }\n  .col-md-pull-4 {\n    right: 33.33333333%;\n  }\n  .col-md-pull-3 {\n    right: 25%;\n  }\n  .col-md-pull-2 {\n    right: 16.66666667%;\n  }\n  .col-md-pull-1 {\n    right: 8.33333333%;\n  }\n  .col-md-pull-0 {\n    right: auto;\n  }\n  .col-md-push-12 {\n    left: 100%;\n  }\n  .col-md-push-11 {\n    left: 91.66666667%;\n  }\n  .col-md-push-10 {\n    left: 83.33333333%;\n  }\n  .col-md-push-9 {\n    left: 75%;\n  }\n  .col-md-push-8 {\n    left: 66.66666667%;\n  }\n  .col-md-push-7 {\n    left: 58.33333333%;\n  }\n  .col-md-push-6 {\n    left: 50%;\n  }\n  .col-md-push-5 {\n    left: 41.66666667%;\n  }\n  .col-md-push-4 {\n    left: 33.33333333%;\n  }\n  .col-md-push-3 {\n    left: 25%;\n  }\n  .col-md-push-2 {\n    left: 16.66666667%;\n  }\n  .col-md-push-1 {\n    left: 8.33333333%;\n  }\n  .col-md-push-0 {\n    left: auto;\n  }\n  .col-md-offset-12 {\n    margin-left: 100%;\n  }\n  .col-md-offset-11 {\n    margin-left: 91.66666667%;\n  }\n  .col-md-offset-10 {\n    margin-left: 83.33333333%;\n  }\n  .col-md-offset-9 {\n    margin-left: 75%;\n  }\n  .col-md-offset-8 {\n    margin-left: 66.66666667%;\n  }\n  .col-md-offset-7 {\n    margin-left: 58.33333333%;\n  }\n  .col-md-offset-6 {\n    margin-left: 50%;\n  }\n  .col-md-offset-5 {\n    margin-left: 41.66666667%;\n  }\n  .col-md-offset-4 {\n    margin-left: 33.33333333%;\n  }\n  .col-md-offset-3 {\n    margin-left: 25%;\n  }\n  .col-md-offset-2 {\n    margin-left: 16.66666667%;\n  }\n  .col-md-offset-1 {\n    margin-left: 8.33333333%;\n  }\n  .col-md-offset-0 {\n    margin-left: 0%;\n  }\n}\n@media (min-width: 1200px) {\n  .col-lg-1, .col-lg-2, .col-lg-3, .col-lg-4, .col-lg-5, .col-lg-6, .col-lg-7, .col-lg-8, .col-lg-9, .col-lg-10, .col-lg-11, .col-lg-12 {\n    float: left;\n  }\n  .col-lg-12 {\n    width: 100%;\n  }\n  .col-lg-11 {\n    width: 91.66666667%;\n  }\n  .col-lg-10 {\n    width: 83.33333333%;\n  }\n  .col-lg-9 {\n    width: 75%;\n  }\n  .col-lg-8 {\n    width: 66.66666667%;\n  }\n  .col-lg-7 {\n    width: 58.33333333%;\n  }\n  .col-lg-6 {\n    width: 50%;\n  }\n  .col-lg-5 {\n    width: 41.66666667%;\n  }\n  .col-lg-4 {\n    width: 33.33333333%;\n  }\n  .col-lg-3 {\n    width: 25%;\n  }\n  .col-lg-2 {\n    width: 16.66666667%;\n  }\n  .col-lg-1 {\n    width: 8.33333333%;\n  }\n  .col-lg-pull-12 {\n    right: 100%;\n  }\n  .col-lg-pull-11 {\n    right: 91.66666667%;\n  }\n  .col-lg-pull-10 {\n    right: 83.33333333%;\n  }\n  .col-lg-pull-9 {\n    right: 75%;\n  }\n  .col-lg-pull-8 {\n    right: 66.66666667%;\n  }\n  .col-lg-pull-7 {\n    right: 58.33333333%;\n  }\n  .col-lg-pull-6 {\n    right: 50%;\n  }\n  .col-lg-pull-5 {\n    right: 41.66666667%;\n  }\n  .col-lg-pull-4 {\n    right: 33.33333333%;\n  }\n  .col-lg-pull-3 {\n    right: 25%;\n  }\n  .col-lg-pull-2 {\n    right: 16.66666667%;\n  }\n  .col-lg-pull-1 {\n    right: 8.33333333%;\n  }\n  .col-lg-pull-0 {\n    right: auto;\n  }\n  .col-lg-push-12 {\n    left: 100%;\n  }\n  .col-lg-push-11 {\n    left: 91.66666667%;\n  }\n  .col-lg-push-10 {\n    left: 83.33333333%;\n  }\n  .col-lg-push-9 {\n    left: 75%;\n  }\n  .col-lg-push-8 {\n    left: 66.66666667%;\n  }\n  .col-lg-push-7 {\n    left: 58.33333333%;\n  }\n  .col-lg-push-6 {\n    left: 50%;\n  }\n  .col-lg-push-5 {\n    left: 41.66666667%;\n  }\n  .col-lg-push-4 {\n    left: 33.33333333%;\n  }\n  .col-lg-push-3 {\n    left: 25%;\n  }\n  .col-lg-push-2 {\n    left: 16.66666667%;\n  }\n  .col-lg-push-1 {\n    left: 8.33333333%;\n  }\n  .col-lg-push-0 {\n    left: auto;\n  }\n  .col-lg-offset-12 {\n    margin-left: 100%;\n  }\n  .col-lg-offset-11 {\n    margin-left: 91.66666667%;\n  }\n  .col-lg-offset-10 {\n    margin-left: 83.33333333%;\n  }\n  .col-lg-offset-9 {\n    margin-left: 75%;\n  }\n  .col-lg-offset-8 {\n    margin-left: 66.66666667%;\n  }\n  .col-lg-offset-7 {\n    margin-left: 58.33333333%;\n  }\n  .col-lg-offset-6 {\n    margin-left: 50%;\n  }\n  .col-lg-offset-5 {\n    margin-left: 41.66666667%;\n  }\n  .col-lg-offset-4 {\n    margin-left: 33.33333333%;\n  }\n  .col-lg-offset-3 {\n    margin-left: 25%;\n  }\n  .col-lg-offset-2 {\n    margin-left: 16.66666667%;\n  }\n  .col-lg-offset-1 {\n    margin-left: 8.33333333%;\n  }\n  .col-lg-offset-0 {\n    margin-left: 0%;\n  }\n}\ntable {\n  background-color: transparent;\n}\ncaption {\n  padding-top: 8px;\n  padding-bottom: 8px;\n  color: #777777;\n  text-align: left;\n}\nth {\n  text-align: left;\n}\n.table {\n  width: 100%;\n  max-width: 100%;\n  margin-bottom: 20px;\n}\n.table > thead > tr > th,\n.table > tbody > tr > th,\n.table > tfoot > tr > th,\n.table > thead > tr > td,\n.table > tbody > tr > td,\n.table > tfoot > tr > td {\n  padding: 8px;\n  line-height: 1.42857143;\n  vertical-align: top;\n  border-top: 1px solid #ddd;\n}\n.table > thead > tr > th {\n  vertical-align: bottom;\n  border-bottom: 2px solid #ddd;\n}\n.table > caption + thead > tr:first-child > th,\n.table > colgroup + thead > tr:first-child > th,\n.table > thead:first-child > tr:first-child > th,\n.table > caption + thead > tr:first-child > td,\n.table > colgroup + thead > tr:first-child > td,\n.table > thead:first-child > tr:first-child > td {\n  border-top: 0;\n}\n.table > tbody + tbody {\n  border-top: 2px solid #ddd;\n}\n.table .table {\n  background-color: #fff;\n}\n.table-condensed > thead > tr > th,\n.table-condensed > tbody > tr > th,\n.table-condensed > tfoot > tr > th,\n.table-condensed > thead > tr > td,\n.table-condensed > tbody > tr > td,\n.table-condensed > tfoot > tr > td {\n  padding: 5px;\n}\n.table-bordered {\n  border: 1px solid #ddd;\n}\n.table-bordered > thead > tr > th,\n.table-bordered > tbody > tr > th,\n.table-bordered > tfoot > tr > th,\n.table-bordered > thead > tr > td,\n.table-bordered > tbody > tr > td,\n.table-bordered > tfoot > tr > td {\n  border: 1px solid #ddd;\n}\n.table-bordered > thead > tr > th,\n.table-bordered > thead > tr > td {\n  border-bottom-width: 2px;\n}\n.table-striped > tbody > tr:nth-of-type(odd) {\n  background-color: #f9f9f9;\n}\n.table-hover > tbody > tr:hover {\n  background-color: #f5f5f5;\n}\ntable col[class*=\"col-\"] {\n  position: static;\n  float: none;\n  display: table-column;\n}\ntable td[class*=\"col-\"],\ntable th[class*=\"col-\"] {\n  position: static;\n  float: none;\n  display: table-cell;\n}\n.table > thead > tr > td.active,\n.table > tbody > tr > td.active,\n.table > tfoot > tr > td.active,\n.table > thead > tr > th.active,\n.table > tbody > tr > th.active,\n.table > tfoot > tr > th.active,\n.table > thead > tr.active > td,\n.table > tbody > tr.active > td,\n.table > tfoot > tr.active > td,\n.table > thead > tr.active > th,\n.table > tbody > tr.active > th,\n.table > tfoot > tr.active > th {\n  background-color: #f5f5f5;\n}\n.table-hover > tbody > tr > td.active:hover,\n.table-hover > tbody > tr > th.active:hover,\n.table-hover > tbody > tr.active:hover > td,\n.table-hover > tbody > tr:hover > .active,\n.table-hover > tbody > tr.active:hover > th {\n  background-color: #e8e8e8;\n}\n.table > thead > tr > td.success,\n.table > tbody > tr > td.success,\n.table > tfoot > tr > td.success,\n.table > thead > tr > th.success,\n.table > tbody > tr > th.success,\n.table > tfoot > tr > th.success,\n.table > thead > tr.success > td,\n.table > tbody > tr.success > td,\n.table > tfoot > tr.success > td,\n.table > thead > tr.success > th,\n.table > tbody > tr.success > th,\n.table > tfoot > tr.success > th {\n  background-color: #dff0d8;\n}\n.table-hover > tbody > tr > td.success:hover,\n.table-hover > tbody > tr > th.success:hover,\n.table-hover > tbody > tr.success:hover > td,\n.table-hover > tbody > tr:hover > .success,\n.table-hover > tbody > tr.success:hover > th {\n  background-color: #d0e9c6;\n}\n.table > thead > tr > td.info,\n.table > tbody > tr > td.info,\n.table > tfoot > tr > td.info,\n.table > thead > tr > th.info,\n.table > tbody > tr > th.info,\n.table > tfoot > tr > th.info,\n.table > thead > tr.info > td,\n.table > tbody > tr.info > td,\n.table > tfoot > tr.info > td,\n.table > thead > tr.info > th,\n.table > tbody > tr.info > th,\n.table > tfoot > tr.info > th {\n  background-color: #d9edf7;\n}\n.table-hover > tbody > tr > td.info:hover,\n.table-hover > tbody > tr > th.info:hover,\n.table-hover > tbody > tr.info:hover > td,\n.table-hover > tbody > tr:hover > .info,\n.table-hover > tbody > tr.info:hover > th {\n  background-color: #c4e3f3;\n}\n.table > thead > tr > td.warning,\n.table > tbody > tr > td.warning,\n.table > tfoot > tr > td.warning,\n.table > thead > tr > th.warning,\n.table > tbody > tr > th.warning,\n.table > tfoot > tr > th.warning,\n.table > thead > tr.warning > td,\n.table > tbody > tr.warning > td,\n.table > tfoot > tr.warning > td,\n.table > thead > tr.warning > th,\n.table > tbody > tr.warning > th,\n.table > tfoot > tr.warning > th {\n  background-color: #fcf8e3;\n}\n.table-hover > tbody > tr > td.warning:hover,\n.table-hover > tbody > tr > th.warning:hover,\n.table-hover > tbody > tr.warning:hover > td,\n.table-hover > tbody > tr:hover > .warning,\n.table-hover > tbody > tr.warning:hover > th {\n  background-color: #faf2cc;\n}\n.table > thead > tr > td.danger,\n.table > tbody > tr > td.danger,\n.table > tfoot > tr > td.danger,\n.table > thead > tr > th.danger,\n.table > tbody > tr > th.danger,\n.table > tfoot > tr > th.danger,\n.table > thead > tr.danger > td,\n.table > tbody > tr.danger > td,\n.table > tfoot > tr.danger > td,\n.table > thead > tr.danger > th,\n.table > tbody > tr.danger > th,\n.table > tfoot > tr.danger > th {\n  background-color: #f2dede;\n}\n.table-hover > tbody > tr > td.danger:hover,\n.table-hover > tbody > tr > th.danger:hover,\n.table-hover > tbody > tr.danger:hover > td,\n.table-hover > tbody > tr:hover > .danger,\n.table-hover > tbody > tr.danger:hover > th {\n  background-color: #ebcccc;\n}\n.table-responsive {\n  overflow-x: auto;\n  min-height: 0.01%;\n}\n@media screen and (max-width: 767px) {\n  .table-responsive {\n    width: 100%;\n    margin-bottom: 15px;\n    overflow-y: hidden;\n    -ms-overflow-style: -ms-autohiding-scrollbar;\n    border: 1px solid #ddd;\n  }\n  .table-responsive > .table {\n    margin-bottom: 0;\n  }\n  .table-responsive > .table > thead > tr > th,\n  .table-responsive > .table > tbody > tr > th,\n  .table-responsive > .table > tfoot > tr > th,\n  .table-responsive > .table > thead > tr > td,\n  .table-responsive > .table > tbody > tr > td,\n  .table-responsive > .table > tfoot > tr > td {\n    white-space: nowrap;\n  }\n  .table-responsive > .table-bordered {\n    border: 0;\n  }\n  .table-responsive > .table-bordered > thead > tr > th:first-child,\n  .table-responsive > .table-bordered > tbody > tr > th:first-child,\n  .table-responsive > .table-bordered > tfoot > tr > th:first-child,\n  .table-responsive > .table-bordered > thead > tr > td:first-child,\n  .table-responsive > .table-bordered > tbody > tr > td:first-child,\n  .table-responsive > .table-bordered > tfoot > tr > td:first-child {\n    border-left: 0;\n  }\n  .table-responsive > .table-bordered > thead > tr > th:last-child,\n  .table-responsive > .table-bordered > tbody > tr > th:last-child,\n  .table-responsive > .table-bordered > tfoot > tr > th:last-child,\n  .table-responsive > .table-bordered > thead > tr > td:last-child,\n  .table-responsive > .table-bordered > tbody > tr > td:last-child,\n  .table-responsive > .table-bordered > tfoot > tr > td:last-child {\n    border-right: 0;\n  }\n  .table-responsive > .table-bordered > tbody > tr:last-child > th,\n  .table-responsive > .table-bordered > tfoot > tr:last-child > th,\n  .table-responsive > .table-bordered > tbody > tr:last-child > td,\n  .table-responsive > .table-bordered > tfoot > tr:last-child > td {\n    border-bottom: 0;\n  }\n}\nfieldset {\n  padding: 0;\n  margin: 0;\n  border: 0;\n  min-width: 0;\n}\nlegend {\n  display: block;\n  width: 100%;\n  padding: 0;\n  margin-bottom: 20px;\n  font-size: 21px;\n  line-height: inherit;\n  color: #333333;\n  border: 0;\n  border-bottom: 1px solid #e5e5e5;\n}\nlabel {\n  display: inline-block;\n  max-width: 100%;\n  margin-bottom: 5px;\n  font-weight: bold;\n}\ninput[type=\"search\"] {\n  -webkit-box-sizing: border-box;\n  -moz-box-sizing: border-box;\n  box-sizing: border-box;\n}\ninput[type=\"radio\"],\ninput[type=\"checkbox\"] {\n  margin: 4px 0 0;\n  margin-top: 1px \\9;\n  line-height: normal;\n}\ninput[type=\"file\"] {\n  display: block;\n}\ninput[type=\"range\"] {\n  display: block;\n  width: 100%;\n}\nselect[multiple],\nselect[size] {\n  height: auto;\n}\ninput[type=\"file\"]:focus,\ninput[type=\"radio\"]:focus,\ninput[type=\"checkbox\"]:focus {\n  outline: 5px auto -webkit-focus-ring-color;\n  outline-offset: -2px;\n}\noutput {\n  display: block;\n  padding-top: 7px;\n  font-size: 14px;\n  line-height: 1.42857143;\n  color: #555555;\n}\n.form-control {\n  display: block;\n  width: 100%;\n  height: 34px;\n  padding: 6px 12px;\n  font-size: 14px;\n  line-height: 1.42857143;\n  color: #555555;\n  background-color: #fff;\n  background-image: none;\n  border: 1px solid #ccc;\n  border-radius: 4px;\n  -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);\n  box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);\n  -webkit-transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;\n  -o-transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;\n  transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;\n}\n.form-control:focus {\n  border-color: #66afe9;\n  outline: 0;\n  -webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(102, 175, 233, 0.6);\n  box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(102, 175, 233, 0.6);\n}\n.form-control::-moz-placeholder {\n  color: #999;\n  opacity: 1;\n}\n.form-control:-ms-input-placeholder {\n  color: #999;\n}\n.form-control::-webkit-input-placeholder {\n  color: #999;\n}\n.form-control::-ms-expand {\n  border: 0;\n  background-color: transparent;\n}\n.form-control[disabled],\n.form-control[readonly],\nfieldset[disabled] .form-control {\n  background-color: #eeeeee;\n  opacity: 1;\n}\n.form-control[disabled],\nfieldset[disabled] .form-control {\n  cursor: not-allowed;\n}\ntextarea.form-control {\n  height: auto;\n}\ninput[type=\"search\"] {\n  -webkit-appearance: none;\n}\n@media screen and (-webkit-min-device-pixel-ratio: 0) {\n  input[type=\"date\"].form-control,\n  input[type=\"time\"].form-control,\n  input[type=\"datetime-local\"].form-control,\n  input[type=\"month\"].form-control {\n    line-height: 34px;\n  }\n  input[type=\"date\"].input-sm,\n  input[type=\"time\"].input-sm,\n  input[type=\"datetime-local\"].input-sm,\n  input[type=\"month\"].input-sm,\n  .input-group-sm input[type=\"date\"],\n  .input-group-sm input[type=\"time\"],\n  .input-group-sm input[type=\"datetime-local\"],\n  .input-group-sm input[type=\"month\"] {\n    line-height: 30px;\n  }\n  input[type=\"date\"].input-lg,\n  input[type=\"time\"].input-lg,\n  input[type=\"datetime-local\"].input-lg,\n  input[type=\"month\"].input-lg,\n  .input-group-lg input[type=\"date\"],\n  .input-group-lg input[type=\"time\"],\n  .input-group-lg input[type=\"datetime-local\"],\n  .input-group-lg input[type=\"month\"] {\n    line-height: 46px;\n  }\n}\n.form-group {\n  margin-bottom: 15px;\n}\n.radio,\n.checkbox {\n  position: relative;\n  display: block;\n  margin-top: 10px;\n  margin-bottom: 10px;\n}\n.radio label,\n.checkbox label {\n  min-height: 20px;\n  padding-left: 20px;\n  margin-bottom: 0;\n  font-weight: normal;\n  cursor: pointer;\n}\n.radio input[type=\"radio\"],\n.radio-inline input[type=\"radio\"],\n.checkbox input[type=\"checkbox\"],\n.checkbox-inline input[type=\"checkbox\"] {\n  position: absolute;\n  margin-left: -20px;\n  margin-top: 4px \\9;\n}\n.radio + .radio,\n.checkbox + .checkbox {\n  margin-top: -5px;\n}\n.radio-inline,\n.checkbox-inline {\n  position: relative;\n  display: inline-block;\n  padding-left: 20px;\n  margin-bottom: 0;\n  vertical-align: middle;\n  font-weight: normal;\n  cursor: pointer;\n}\n.radio-inline + .radio-inline,\n.checkbox-inline + .checkbox-inline {\n  margin-top: 0;\n  margin-left: 10px;\n}\ninput[type=\"radio\"][disabled],\ninput[type=\"checkbox\"][disabled],\ninput[type=\"radio\"].disabled,\ninput[type=\"checkbox\"].disabled,\nfieldset[disabled] input[type=\"radio\"],\nfieldset[disabled] input[type=\"checkbox\"] {\n  cursor: not-allowed;\n}\n.radio-inline.disabled,\n.checkbox-inline.disabled,\nfieldset[disabled] .radio-inline,\nfieldset[disabled] .checkbox-inline {\n  cursor: not-allowed;\n}\n.radio.disabled label,\n.checkbox.disabled label,\nfieldset[disabled] .radio label,\nfieldset[disabled] .checkbox label {\n  cursor: not-allowed;\n}\n.form-control-static {\n  padding-top: 7px;\n  padding-bottom: 7px;\n  margin-bottom: 0;\n  min-height: 34px;\n}\n.form-control-static.input-lg,\n.form-control-static.input-sm {\n  padding-left: 0;\n  padding-right: 0;\n}\n.input-sm {\n  height: 30px;\n  padding: 5px 10px;\n  font-size: 12px;\n  line-height: 1.5;\n  border-radius: 3px;\n}\nselect.input-sm {\n  height: 30px;\n  line-height: 30px;\n}\ntextarea.input-sm,\nselect[multiple].input-sm {\n  height: auto;\n}\n.form-group-sm .form-control {\n  height: 30px;\n  padding: 5px 10px;\n  font-size: 12px;\n  line-height: 1.5;\n  border-radius: 3px;\n}\n.form-group-sm select.form-control {\n  height: 30px;\n  line-height: 30px;\n}\n.form-group-sm textarea.form-control,\n.form-group-sm select[multiple].form-control {\n  height: auto;\n}\n.form-group-sm .form-control-static {\n  height: 30px;\n  min-height: 32px;\n  padding: 6px 10px;\n  font-size: 12px;\n  line-height: 1.5;\n}\n.input-lg {\n  height: 46px;\n  padding: 10px 16px;\n  font-size: 18px;\n  line-height: 1.3333333;\n  border-radius: 6px;\n}\nselect.input-lg {\n  height: 46px;\n  line-height: 46px;\n}\ntextarea.input-lg,\nselect[multiple].input-lg {\n  height: auto;\n}\n.form-group-lg .form-control {\n  height: 46px;\n  padding: 10px 16px;\n  font-size: 18px;\n  line-height: 1.3333333;\n  border-radius: 6px;\n}\n.form-group-lg select.form-control {\n  height: 46px;\n  line-height: 46px;\n}\n.form-group-lg textarea.form-control,\n.form-group-lg select[multiple].form-control {\n  height: auto;\n}\n.form-group-lg .form-control-static {\n  height: 46px;\n  min-height: 38px;\n  padding: 11px 16px;\n  font-size: 18px;\n  line-height: 1.3333333;\n}\n.has-feedback {\n  position: relative;\n}\n.has-feedback .form-control {\n  padding-right: 42.5px;\n}\n.form-control-feedback {\n  position: absolute;\n  top: 0;\n  right: 0;\n  z-index: 2;\n  display: block;\n  width: 34px;\n  height: 34px;\n  line-height: 34px;\n  text-align: center;\n  pointer-events: none;\n}\n.input-lg + .form-control-feedback,\n.input-group-lg + .form-control-feedback,\n.form-group-lg .form-control + .form-control-feedback {\n  width: 46px;\n  height: 46px;\n  line-height: 46px;\n}\n.input-sm + .form-control-feedback,\n.input-group-sm + .form-control-feedback,\n.form-group-sm .form-control + .form-control-feedback {\n  width: 30px;\n  height: 30px;\n  line-height: 30px;\n}\n.has-success .help-block,\n.has-success .control-label,\n.has-success .radio,\n.has-success .checkbox,\n.has-success .radio-inline,\n.has-success .checkbox-inline,\n.has-success.radio label,\n.has-success.checkbox label,\n.has-success.radio-inline label,\n.has-success.checkbox-inline label {\n  color: #3c763d;\n}\n.has-success .form-control {\n  border-color: #3c763d;\n  -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);\n  box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);\n}\n.has-success .form-control:focus {\n  border-color: #2b542c;\n  -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #67b168;\n  box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #67b168;\n}\n.has-success .input-group-addon {\n  color: #3c763d;\n  border-color: #3c763d;\n  background-color: #dff0d8;\n}\n.has-success .form-control-feedback {\n  color: #3c763d;\n}\n.has-warning .help-block,\n.has-warning .control-label,\n.has-warning .radio,\n.has-warning .checkbox,\n.has-warning .radio-inline,\n.has-warning .checkbox-inline,\n.has-warning.radio label,\n.has-warning.checkbox label,\n.has-warning.radio-inline label,\n.has-warning.checkbox-inline label {\n  color: #8a6d3b;\n}\n.has-warning .form-control {\n  border-color: #8a6d3b;\n  -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);\n  box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);\n}\n.has-warning .form-control:focus {\n  border-color: #66512c;\n  -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #c0a16b;\n  box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #c0a16b;\n}\n.has-warning .input-group-addon {\n  color: #8a6d3b;\n  border-color: #8a6d3b;\n  background-color: #fcf8e3;\n}\n.has-warning .form-control-feedback {\n  color: #8a6d3b;\n}\n.has-error .help-block,\n.has-error .control-label,\n.has-error .radio,\n.has-error .checkbox,\n.has-error .radio-inline,\n.has-error .checkbox-inline,\n.has-error.radio label,\n.has-error.checkbox label,\n.has-error.radio-inline label,\n.has-error.checkbox-inline label {\n  color: #a94442;\n}\n.has-error .form-control {\n  border-color: #a94442;\n  -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);\n  box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);\n}\n.has-error .form-control:focus {\n  border-color: #843534;\n  -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #ce8483;\n  box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #ce8483;\n}\n.has-error .input-group-addon {\n  color: #a94442;\n  border-color: #a94442;\n  background-color: #f2dede;\n}\n.has-error .form-control-feedback {\n  color: #a94442;\n}\n.has-feedback label ~ .form-control-feedback {\n  top: 25px;\n}\n.has-feedback label.sr-only ~ .form-control-feedback {\n  top: 0;\n}\n.help-block {\n  display: block;\n  margin-top: 5px;\n  margin-bottom: 10px;\n  color: #737373;\n}\n@media (min-width: 768px) {\n  .form-inline .form-group {\n    display: inline-block;\n    margin-bottom: 0;\n    vertical-align: middle;\n  }\n  .form-inline .form-control {\n    display: inline-block;\n    width: auto;\n    vertical-align: middle;\n  }\n  .form-inline .form-control-static {\n    display: inline-block;\n  }\n  .form-inline .input-group {\n    display: inline-table;\n    vertical-align: middle;\n  }\n  .form-inline .input-group .input-group-addon,\n  .form-inline .input-group .input-group-btn,\n  .form-inline .input-group .form-control {\n    width: auto;\n  }\n  .form-inline .input-group > .form-control {\n    width: 100%;\n  }\n  .form-inline .control-label {\n    margin-bottom: 0;\n    vertical-align: middle;\n  }\n  .form-inline .radio,\n  .form-inline .checkbox {\n    display: inline-block;\n    margin-top: 0;\n    margin-bottom: 0;\n    vertical-align: middle;\n  }\n  .form-inline .radio label,\n  .form-inline .checkbox label {\n    padding-left: 0;\n  }\n  .form-inline .radio input[type=\"radio\"],\n  .form-inline .checkbox input[type=\"checkbox\"] {\n    position: relative;\n    margin-left: 0;\n  }\n  .form-inline .has-feedback .form-control-feedback {\n    top: 0;\n  }\n}\n.form-horizontal .radio,\n.form-horizontal .checkbox,\n.form-horizontal .radio-inline,\n.form-horizontal .checkbox-inline {\n  margin-top: 0;\n  margin-bottom: 0;\n  padding-top: 7px;\n}\n.form-horizontal .radio,\n.form-horizontal .checkbox {\n  min-height: 27px;\n}\n.form-horizontal .form-group {\n  margin-left: -15px;\n  margin-right: -15px;\n}\n@media (min-width: 768px) {\n  .form-horizontal .control-label {\n    text-align: right;\n    margin-bottom: 0;\n    padding-top: 7px;\n  }\n}\n.form-horizontal .has-feedback .form-control-feedback {\n  right: 15px;\n}\n@media (min-width: 768px) {\n  .form-horizontal .form-group-lg .control-label {\n    padding-top: 11px;\n    font-size: 18px;\n  }\n}\n@media (min-width: 768px) {\n  .form-horizontal .form-group-sm .control-label {\n    padding-top: 6px;\n    font-size: 12px;\n  }\n}\n.btn {\n  display: inline-block;\n  margin-bottom: 0;\n  font-weight: normal;\n  text-align: center;\n  vertical-align: middle;\n  touch-action: manipulation;\n  cursor: pointer;\n  background-image: none;\n  border: 1px solid transparent;\n  white-space: nowrap;\n  padding: 6px 12px;\n  font-size: 14px;\n  line-height: 1.42857143;\n  border-radius: 4px;\n  -webkit-user-select: none;\n  -moz-user-select: none;\n  -ms-user-select: none;\n  user-select: none;\n}\n.btn:focus,\n.btn:active:focus,\n.btn.active:focus,\n.btn.focus,\n.btn:active.focus,\n.btn.active.focus {\n  outline: 5px auto -webkit-focus-ring-color;\n  outline-offset: -2px;\n}\n.btn:hover,\n.btn:focus,\n.btn.focus {\n  color: #333;\n  text-decoration: none;\n}\n.btn:active,\n.btn.active {\n  outline: 0;\n  background-image: none;\n  -webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);\n  box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);\n}\n.btn.disabled,\n.btn[disabled],\nfieldset[disabled] .btn {\n  cursor: not-allowed;\n  opacity: 0.65;\n  filter: alpha(opacity=65);\n  -webkit-box-shadow: none;\n  box-shadow: none;\n}\na.btn.disabled,\nfieldset[disabled] a.btn {\n  pointer-events: none;\n}\n.btn-default {\n  color: #333;\n  background-color: #fff;\n  border-color: #ccc;\n}\n.btn-default:focus,\n.btn-default.focus {\n  color: #333;\n  background-color: #e6e6e6;\n  border-color: #8c8c8c;\n}\n.btn-default:hover {\n  color: #333;\n  background-color: #e6e6e6;\n  border-color: #adadad;\n}\n.btn-default:active,\n.btn-default.active,\n.open > .dropdown-toggle.btn-default {\n  color: #333;\n  background-color: #e6e6e6;\n  border-color: #adadad;\n}\n.btn-default:active:hover,\n.btn-default.active:hover,\n.open > .dropdown-toggle.btn-default:hover,\n.btn-default:active:focus,\n.btn-default.active:focus,\n.open > .dropdown-toggle.btn-default:focus,\n.btn-default:active.focus,\n.btn-default.active.focus,\n.open > .dropdown-toggle.btn-default.focus {\n  color: #333;\n  background-color: #d4d4d4;\n  border-color: #8c8c8c;\n}\n.btn-default:active,\n.btn-default.active,\n.open > .dropdown-toggle.btn-default {\n  background-image: none;\n}\n.btn-default.disabled:hover,\n.btn-default[disabled]:hover,\nfieldset[disabled] .btn-default:hover,\n.btn-default.disabled:focus,\n.btn-default[disabled]:focus,\nfieldset[disabled] .btn-default:focus,\n.btn-default.disabled.focus,\n.btn-default[disabled].focus,\nfieldset[disabled] .btn-default.focus {\n  background-color: #fff;\n  border-color: #ccc;\n}\n.btn-default .badge {\n  color: #fff;\n  background-color: #333;\n}\n.btn-primary {\n  color: #fff;\n  background-color: #337ab7;\n  border-color: #2e6da4;\n}\n.btn-primary:focus,\n.btn-primary.focus {\n  color: #fff;\n  background-color: #286090;\n  border-color: #122b40;\n}\n.btn-primary:hover {\n  color: #fff;\n  background-color: #286090;\n  border-color: #204d74;\n}\n.btn-primary:active,\n.btn-primary.active,\n.open > .dropdown-toggle.btn-primary {\n  color: #fff;\n  background-color: #286090;\n  border-color: #204d74;\n}\n.btn-primary:active:hover,\n.btn-primary.active:hover,\n.open > .dropdown-toggle.btn-primary:hover,\n.btn-primary:active:focus,\n.btn-primary.active:focus,\n.open > .dropdown-toggle.btn-primary:focus,\n.btn-primary:active.focus,\n.btn-primary.active.focus,\n.open > .dropdown-toggle.btn-primary.focus {\n  color: #fff;\n  background-color: #204d74;\n  border-color: #122b40;\n}\n.btn-primary:active,\n.btn-primary.active,\n.open > .dropdown-toggle.btn-primary {\n  background-image: none;\n}\n.btn-primary.disabled:hover,\n.btn-primary[disabled]:hover,\nfieldset[disabled] .btn-primary:hover,\n.btn-primary.disabled:focus,\n.btn-primary[disabled]:focus,\nfieldset[disabled] .btn-primary:focus,\n.btn-primary.disabled.focus,\n.btn-primary[disabled].focus,\nfieldset[disabled] .btn-primary.focus {\n  background-color: #337ab7;\n  border-color: #2e6da4;\n}\n.btn-primary .badge {\n  color: #337ab7;\n  background-color: #fff;\n}\n.btn-success {\n  color: #fff;\n  background-color: #5cb85c;\n  border-color: #4cae4c;\n}\n.btn-success:focus,\n.btn-success.focus {\n  color: #fff;\n  background-color: #449d44;\n  border-color: #255625;\n}\n.btn-success:hover {\n  color: #fff;\n  background-color: #449d44;\n  border-color: #398439;\n}\n.btn-success:active,\n.btn-success.active,\n.open > .dropdown-toggle.btn-success {\n  color: #fff;\n  background-color: #449d44;\n  border-color: #398439;\n}\n.btn-success:active:hover,\n.btn-success.active:hover,\n.open > .dropdown-toggle.btn-success:hover,\n.btn-success:active:focus,\n.btn-success.active:focus,\n.open > .dropdown-toggle.btn-success:focus,\n.btn-success:active.focus,\n.btn-success.active.focus,\n.open > .dropdown-toggle.btn-success.focus {\n  color: #fff;\n  background-color: #398439;\n  border-color: #255625;\n}\n.btn-success:active,\n.btn-success.active,\n.open > .dropdown-toggle.btn-success {\n  background-image: none;\n}\n.btn-success.disabled:hover,\n.btn-success[disabled]:hover,\nfieldset[disabled] .btn-success:hover,\n.btn-success.disabled:focus,\n.btn-success[disabled]:focus,\nfieldset[disabled] .btn-success:focus,\n.btn-success.disabled.focus,\n.btn-success[disabled].focus,\nfieldset[disabled] .btn-success.focus {\n  background-color: #5cb85c;\n  border-color: #4cae4c;\n}\n.btn-success .badge {\n  color: #5cb85c;\n  background-color: #fff;\n}\n.btn-info {\n  color: #fff;\n  background-color: #5bc0de;\n  border-color: #46b8da;\n}\n.btn-info:focus,\n.btn-info.focus {\n  color: #fff;\n  background-color: #31b0d5;\n  border-color: #1b6d85;\n}\n.btn-info:hover {\n  color: #fff;\n  background-color: #31b0d5;\n  border-color: #269abc;\n}\n.btn-info:active,\n.btn-info.active,\n.open > .dropdown-toggle.btn-info {\n  color: #fff;\n  background-color: #31b0d5;\n  border-color: #269abc;\n}\n.btn-info:active:hover,\n.btn-info.active:hover,\n.open > .dropdown-toggle.btn-info:hover,\n.btn-info:active:focus,\n.btn-info.active:focus,\n.open > .dropdown-toggle.btn-info:focus,\n.btn-info:active.focus,\n.btn-info.active.focus,\n.open > .dropdown-toggle.btn-info.focus {\n  color: #fff;\n  background-color: #269abc;\n  border-color: #1b6d85;\n}\n.btn-info:active,\n.btn-info.active,\n.open > .dropdown-toggle.btn-info {\n  background-image: none;\n}\n.btn-info.disabled:hover,\n.btn-info[disabled]:hover,\nfieldset[disabled] .btn-info:hover,\n.btn-info.disabled:focus,\n.btn-info[disabled]:focus,\nfieldset[disabled] .btn-info:focus,\n.btn-info.disabled.focus,\n.btn-info[disabled].focus,\nfieldset[disabled] .btn-info.focus {\n  background-color: #5bc0de;\n  border-color: #46b8da;\n}\n.btn-info .badge {\n  color: #5bc0de;\n  background-color: #fff;\n}\n.btn-warning {\n  color: #fff;\n  background-color: #f0ad4e;\n  border-color: #eea236;\n}\n.btn-warning:focus,\n.btn-warning.focus {\n  color: #fff;\n  background-color: #ec971f;\n  border-color: #985f0d;\n}\n.btn-warning:hover {\n  color: #fff;\n  background-color: #ec971f;\n  border-color: #d58512;\n}\n.btn-warning:active,\n.btn-warning.active,\n.open > .dropdown-toggle.btn-warning {\n  color: #fff;\n  background-color: #ec971f;\n  border-color: #d58512;\n}\n.btn-warning:active:hover,\n.btn-warning.active:hover,\n.open > .dropdown-toggle.btn-warning:hover,\n.btn-warning:active:focus,\n.btn-warning.active:focus,\n.open > .dropdown-toggle.btn-warning:focus,\n.btn-warning:active.focus,\n.btn-warning.active.focus,\n.open > .dropdown-toggle.btn-warning.focus {\n  color: #fff;\n  background-color: #d58512;\n  border-color: #985f0d;\n}\n.btn-warning:active,\n.btn-warning.active,\n.open > .dropdown-toggle.btn-warning {\n  background-image: none;\n}\n.btn-warning.disabled:hover,\n.btn-warning[disabled]:hover,\nfieldset[disabled] .btn-warning:hover,\n.btn-warning.disabled:focus,\n.btn-warning[disabled]:focus,\nfieldset[disabled] .btn-warning:focus,\n.btn-warning.disabled.focus,\n.btn-warning[disabled].focus,\nfieldset[disabled] .btn-warning.focus {\n  background-color: #f0ad4e;\n  border-color: #eea236;\n}\n.btn-warning .badge {\n  color: #f0ad4e;\n  background-color: #fff;\n}\n.btn-danger {\n  color: #fff;\n  background-color: #d9534f;\n  border-color: #d43f3a;\n}\n.btn-danger:focus,\n.btn-danger.focus {\n  color: #fff;\n  background-color: #c9302c;\n  border-color: #761c19;\n}\n.btn-danger:hover {\n  color: #fff;\n  background-color: #c9302c;\n  border-color: #ac2925;\n}\n.btn-danger:active,\n.btn-danger.active,\n.open > .dropdown-toggle.btn-danger {\n  color: #fff;\n  background-color: #c9302c;\n  border-color: #ac2925;\n}\n.btn-danger:active:hover,\n.btn-danger.active:hover,\n.open > .dropdown-toggle.btn-danger:hover,\n.btn-danger:active:focus,\n.btn-danger.active:focus,\n.open > .dropdown-toggle.btn-danger:focus,\n.btn-danger:active.focus,\n.btn-danger.active.focus,\n.open > .dropdown-toggle.btn-danger.focus {\n  color: #fff;\n  background-color: #ac2925;\n  border-color: #761c19;\n}\n.btn-danger:active,\n.btn-danger.active,\n.open > .dropdown-toggle.btn-danger {\n  background-image: none;\n}\n.btn-danger.disabled:hover,\n.btn-danger[disabled]:hover,\nfieldset[disabled] .btn-danger:hover,\n.btn-danger.disabled:focus,\n.btn-danger[disabled]:focus,\nfieldset[disabled] .btn-danger:focus,\n.btn-danger.disabled.focus,\n.btn-danger[disabled].focus,\nfieldset[disabled] .btn-danger.focus {\n  background-color: #d9534f;\n  border-color: #d43f3a;\n}\n.btn-danger .badge {\n  color: #d9534f;\n  background-color: #fff;\n}\n.btn-link {\n  color: #337ab7;\n  font-weight: normal;\n  border-radius: 0;\n}\n.btn-link,\n.btn-link:active,\n.btn-link.active,\n.btn-link[disabled],\nfieldset[disabled] .btn-link {\n  background-color: transparent;\n  -webkit-box-shadow: none;\n  box-shadow: none;\n}\n.btn-link,\n.btn-link:hover,\n.btn-link:focus,\n.btn-link:active {\n  border-color: transparent;\n}\n.btn-link:hover,\n.btn-link:focus {\n  color: #23527c;\n  text-decoration: underline;\n  background-color: transparent;\n}\n.btn-link[disabled]:hover,\nfieldset[disabled] .btn-link:hover,\n.btn-link[disabled]:focus,\nfieldset[disabled] .btn-link:focus {\n  color: #777777;\n  text-decoration: none;\n}\n.btn-lg,\n.btn-group-lg > .btn {\n  padding: 10px 16px;\n  font-size: 18px;\n  line-height: 1.3333333;\n  border-radius: 6px;\n}\n.btn-sm,\n.btn-group-sm > .btn {\n  padding: 5px 10px;\n  font-size: 12px;\n  line-height: 1.5;\n  border-radius: 3px;\n}\n.btn-xs,\n.btn-group-xs > .btn {\n  padding: 1px 5px;\n  font-size: 12px;\n  line-height: 1.5;\n  border-radius: 3px;\n}\n.btn-block {\n  display: block;\n  width: 100%;\n}\n.btn-block + .btn-block {\n  margin-top: 5px;\n}\ninput[type=\"submit\"].btn-block,\ninput[type=\"reset\"].btn-block,\ninput[type=\"button\"].btn-block {\n  width: 100%;\n}\n.fade {\n  opacity: 0;\n  -webkit-transition: opacity 0.15s linear;\n  -o-transition: opacity 0.15s linear;\n  transition: opacity 0.15s linear;\n}\n.fade.in {\n  opacity: 1;\n}\n.collapse {\n  display: none;\n}\n.collapse.in {\n  display: block;\n}\ntr.collapse.in {\n  display: table-row;\n}\ntbody.collapse.in {\n  display: table-row-group;\n}\n.collapsing {\n  position: relative;\n  height: 0;\n  overflow: hidden;\n  -webkit-transition-property: height, visibility;\n  transition-property: height, visibility;\n  -webkit-transition-duration: 0.35s;\n  transition-duration: 0.35s;\n  -webkit-transition-timing-function: ease;\n  transition-timing-function: ease;\n}\n.caret {\n  display: inline-block;\n  width: 0;\n  height: 0;\n  margin-left: 2px;\n  vertical-align: middle;\n  border-top: 4px dashed;\n  border-top: 4px solid \\9;\n  border-right: 4px solid transparent;\n  border-left: 4px solid transparent;\n}\n.dropup,\n.dropdown {\n  position: relative;\n}\n.dropdown-toggle:focus {\n  outline: 0;\n}\n.dropdown-menu {\n  position: absolute;\n  top: 100%;\n  left: 0;\n  z-index: 1000;\n  display: none;\n  float: left;\n  min-width: 160px;\n  padding: 5px 0;\n  margin: 2px 0 0;\n  list-style: none;\n  font-size: 14px;\n  text-align: left;\n  background-color: #fff;\n  border: 1px solid #ccc;\n  border: 1px solid rgba(0, 0, 0, 0.15);\n  border-radius: 4px;\n  -webkit-box-shadow: 0 6px 12px rgba(0, 0, 0, 0.175);\n  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.175);\n  background-clip: padding-box;\n}\n.dropdown-menu.pull-right {\n  right: 0;\n  left: auto;\n}\n.dropdown-menu .divider {\n  height: 1px;\n  margin: 9px 0;\n  overflow: hidden;\n  background-color: #e5e5e5;\n}\n.dropdown-menu > li > a {\n  display: block;\n  padding: 3px 20px;\n  clear: both;\n  font-weight: normal;\n  line-height: 1.42857143;\n  color: #333333;\n  white-space: nowrap;\n}\n.dropdown-menu > li > a:hover,\n.dropdown-menu > li > a:focus {\n  text-decoration: none;\n  color: #262626;\n  background-color: #f5f5f5;\n}\n.dropdown-menu > .active > a,\n.dropdown-menu > .active > a:hover,\n.dropdown-menu > .active > a:focus {\n  color: #fff;\n  text-decoration: none;\n  outline: 0;\n  background-color: #337ab7;\n}\n.dropdown-menu > .disabled > a,\n.dropdown-menu > .disabled > a:hover,\n.dropdown-menu > .disabled > a:focus {\n  color: #777777;\n}\n.dropdown-menu > .disabled > a:hover,\n.dropdown-menu > .disabled > a:focus {\n  text-decoration: none;\n  background-color: transparent;\n  background-image: none;\n  filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);\n  cursor: not-allowed;\n}\n.open > .dropdown-menu {\n  display: block;\n}\n.open > a {\n  outline: 0;\n}\n.dropdown-menu-right {\n  left: auto;\n  right: 0;\n}\n.dropdown-menu-left {\n  left: 0;\n  right: auto;\n}\n.dropdown-header {\n  display: block;\n  padding: 3px 20px;\n  font-size: 12px;\n  line-height: 1.42857143;\n  color: #777777;\n  white-space: nowrap;\n}\n.dropdown-backdrop {\n  position: fixed;\n  left: 0;\n  right: 0;\n  bottom: 0;\n  top: 0;\n  z-index: 990;\n}\n.pull-right > .dropdown-menu {\n  right: 0;\n  left: auto;\n}\n.dropup .caret,\n.navbar-fixed-bottom .dropdown .caret {\n  border-top: 0;\n  border-bottom: 4px dashed;\n  border-bottom: 4px solid \\9;\n  content: \"\";\n}\n.dropup .dropdown-menu,\n.navbar-fixed-bottom .dropdown .dropdown-menu {\n  top: auto;\n  bottom: 100%;\n  margin-bottom: 2px;\n}\n@media (min-width: 768px) {\n  .navbar-right .dropdown-menu {\n    left: auto;\n    right: 0;\n  }\n  .navbar-right .dropdown-menu-left {\n    left: 0;\n    right: auto;\n  }\n}\n.btn-group,\n.btn-group-vertical {\n  position: relative;\n  display: inline-block;\n  vertical-align: middle;\n}\n.btn-group > .btn,\n.btn-group-vertical > .btn {\n  position: relative;\n  float: left;\n}\n.btn-group > .btn:hover,\n.btn-group-vertical > .btn:hover,\n.btn-group > .btn:focus,\n.btn-group-vertical > .btn:focus,\n.btn-group > .btn:active,\n.btn-group-vertical > .btn:active,\n.btn-group > .btn.active,\n.btn-group-vertical > .btn.active {\n  z-index: 2;\n}\n.btn-group .btn + .btn,\n.btn-group .btn + .btn-group,\n.btn-group .btn-group + .btn,\n.btn-group .btn-group + .btn-group {\n  margin-left: -1px;\n}\n.btn-toolbar {\n  margin-left: -5px;\n}\n.btn-toolbar .btn,\n.btn-toolbar .btn-group,\n.btn-toolbar .input-group {\n  float: left;\n}\n.btn-toolbar > .btn,\n.btn-toolbar > .btn-group,\n.btn-toolbar > .input-group {\n  margin-left: 5px;\n}\n.btn-group > .btn:not(:first-child):not(:last-child):not(.dropdown-toggle) {\n  border-radius: 0;\n}\n.btn-group > .btn:first-child {\n  margin-left: 0;\n}\n.btn-group > .btn:first-child:not(:last-child):not(.dropdown-toggle) {\n  border-bottom-right-radius: 0;\n  border-top-right-radius: 0;\n}\n.btn-group > .btn:last-child:not(:first-child),\n.btn-group > .dropdown-toggle:not(:first-child) {\n  border-bottom-left-radius: 0;\n  border-top-left-radius: 0;\n}\n.btn-group > .btn-group {\n  float: left;\n}\n.btn-group > .btn-group:not(:first-child):not(:last-child) > .btn {\n  border-radius: 0;\n}\n.btn-group > .btn-group:first-child:not(:last-child) > .btn:last-child,\n.btn-group > .btn-group:first-child:not(:last-child) > .dropdown-toggle {\n  border-bottom-right-radius: 0;\n  border-top-right-radius: 0;\n}\n.btn-group > .btn-group:last-child:not(:first-child) > .btn:first-child {\n  border-bottom-left-radius: 0;\n  border-top-left-radius: 0;\n}\n.btn-group .dropdown-toggle:active,\n.btn-group.open .dropdown-toggle {\n  outline: 0;\n}\n.btn-group > .btn + .dropdown-toggle {\n  padding-left: 8px;\n  padding-right: 8px;\n}\n.btn-group > .btn-lg + .dropdown-toggle {\n  padding-left: 12px;\n  padding-right: 12px;\n}\n.btn-group.open .dropdown-toggle {\n  -webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);\n  box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);\n}\n.btn-group.open .dropdown-toggle.btn-link {\n  -webkit-box-shadow: none;\n  box-shadow: none;\n}\n.btn .caret {\n  margin-left: 0;\n}\n.btn-lg .caret {\n  border-width: 5px 5px 0;\n  border-bottom-width: 0;\n}\n.dropup .btn-lg .caret {\n  border-width: 0 5px 5px;\n}\n.btn-group-vertical > .btn,\n.btn-group-vertical > .btn-group,\n.btn-group-vertical > .btn-group > .btn {\n  display: block;\n  float: none;\n  width: 100%;\n  max-width: 100%;\n}\n.btn-group-vertical > .btn-group > .btn {\n  float: none;\n}\n.btn-group-vertical > .btn + .btn,\n.btn-group-vertical > .btn + .btn-group,\n.btn-group-vertical > .btn-group + .btn,\n.btn-group-vertical > .btn-group + .btn-group {\n  margin-top: -1px;\n  margin-left: 0;\n}\n.btn-group-vertical > .btn:not(:first-child):not(:last-child) {\n  border-radius: 0;\n}\n.btn-group-vertical > .btn:first-child:not(:last-child) {\n  border-top-right-radius: 4px;\n  border-top-left-radius: 4px;\n  border-bottom-right-radius: 0;\n  border-bottom-left-radius: 0;\n}\n.btn-group-vertical > .btn:last-child:not(:first-child) {\n  border-top-right-radius: 0;\n  border-top-left-radius: 0;\n  border-bottom-right-radius: 4px;\n  border-bottom-left-radius: 4px;\n}\n.btn-group-vertical > .btn-group:not(:first-child):not(:last-child) > .btn {\n  border-radius: 0;\n}\n.btn-group-vertical > .btn-group:first-child:not(:last-child) > .btn:last-child,\n.btn-group-vertical > .btn-group:first-child:not(:last-child) > .dropdown-toggle {\n  border-bottom-right-radius: 0;\n  border-bottom-left-radius: 0;\n}\n.btn-group-vertical > .btn-group:last-child:not(:first-child) > .btn:first-child {\n  border-top-right-radius: 0;\n  border-top-left-radius: 0;\n}\n.btn-group-justified {\n  display: table;\n  width: 100%;\n  table-layout: fixed;\n  border-collapse: separate;\n}\n.btn-group-justified > .btn,\n.btn-group-justified > .btn-group {\n  float: none;\n  display: table-cell;\n  width: 1%;\n}\n.btn-group-justified > .btn-group .btn {\n  width: 100%;\n}\n.btn-group-justified > .btn-group .dropdown-menu {\n  left: auto;\n}\n[data-toggle=\"buttons\"] > .btn input[type=\"radio\"],\n[data-toggle=\"buttons\"] > .btn-group > .btn input[type=\"radio\"],\n[data-toggle=\"buttons\"] > .btn input[type=\"checkbox\"],\n[data-toggle=\"buttons\"] > .btn-group > .btn input[type=\"checkbox\"] {\n  position: absolute;\n  clip: rect(0, 0, 0, 0);\n  pointer-events: none;\n}\n.input-group {\n  position: relative;\n  display: table;\n  border-collapse: separate;\n}\n.input-group[class*=\"col-\"] {\n  float: none;\n  padding-left: 0;\n  padding-right: 0;\n}\n.input-group .form-control {\n  position: relative;\n  z-index: 2;\n  float: left;\n  width: 100%;\n  margin-bottom: 0;\n}\n.input-group .form-control:focus {\n  z-index: 3;\n}\n.input-group-lg > .form-control,\n.input-group-lg > .input-group-addon,\n.input-group-lg > .input-group-btn > .btn {\n  height: 46px;\n  padding: 10px 16px;\n  font-size: 18px;\n  line-height: 1.3333333;\n  border-radius: 6px;\n}\nselect.input-group-lg > .form-control,\nselect.input-group-lg > .input-group-addon,\nselect.input-group-lg > .input-group-btn > .btn {\n  height: 46px;\n  line-height: 46px;\n}\ntextarea.input-group-lg > .form-control,\ntextarea.input-group-lg > .input-group-addon,\ntextarea.input-group-lg > .input-group-btn > .btn,\nselect[multiple].input-group-lg > .form-control,\nselect[multiple].input-group-lg > .input-group-addon,\nselect[multiple].input-group-lg > .input-group-btn > .btn {\n  height: auto;\n}\n.input-group-sm > .form-control,\n.input-group-sm > .input-group-addon,\n.input-group-sm > .input-group-btn > .btn {\n  height: 30px;\n  padding: 5px 10px;\n  font-size: 12px;\n  line-height: 1.5;\n  border-radius: 3px;\n}\nselect.input-group-sm > .form-control,\nselect.input-group-sm > .input-group-addon,\nselect.input-group-sm > .input-group-btn > .btn {\n  height: 30px;\n  line-height: 30px;\n}\ntextarea.input-group-sm > .form-control,\ntextarea.input-group-sm > .input-group-addon,\ntextarea.input-group-sm > .input-group-btn > .btn,\nselect[multiple].input-group-sm > .form-control,\nselect[multiple].input-group-sm > .input-group-addon,\nselect[multiple].input-group-sm > .input-group-btn > .btn {\n  height: auto;\n}\n.input-group-addon,\n.input-group-btn,\n.input-group .form-control {\n  display: table-cell;\n}\n.input-group-addon:not(:first-child):not(:last-child),\n.input-group-btn:not(:first-child):not(:last-child),\n.input-group .form-control:not(:first-child):not(:last-child) {\n  border-radius: 0;\n}\n.input-group-addon,\n.input-group-btn {\n  width: 1%;\n  white-space: nowrap;\n  vertical-align: middle;\n}\n.input-group-addon {\n  padding: 6px 12px;\n  font-size: 14px;\n  font-weight: normal;\n  line-height: 1;\n  color: #555555;\n  text-align: center;\n  background-color: #eeeeee;\n  border: 1px solid #ccc;\n  border-radius: 4px;\n}\n.input-group-addon.input-sm {\n  padding: 5px 10px;\n  font-size: 12px;\n  border-radius: 3px;\n}\n.input-group-addon.input-lg {\n  padding: 10px 16px;\n  font-size: 18px;\n  border-radius: 6px;\n}\n.input-group-addon input[type=\"radio\"],\n.input-group-addon input[type=\"checkbox\"] {\n  margin-top: 0;\n}\n.input-group .form-control:first-child,\n.input-group-addon:first-child,\n.input-group-btn:first-child > .btn,\n.input-group-btn:first-child > .btn-group > .btn,\n.input-group-btn:first-child > .dropdown-toggle,\n.input-group-btn:last-child > .btn:not(:last-child):not(.dropdown-toggle),\n.input-group-btn:last-child > .btn-group:not(:last-child) > .btn {\n  border-bottom-right-radius: 0;\n  border-top-right-radius: 0;\n}\n.input-group-addon:first-child {\n  border-right: 0;\n}\n.input-group .form-control:last-child,\n.input-group-addon:last-child,\n.input-group-btn:last-child > .btn,\n.input-group-btn:last-child > .btn-group > .btn,\n.input-group-btn:last-child > .dropdown-toggle,\n.input-group-btn:first-child > .btn:not(:first-child),\n.input-group-btn:first-child > .btn-group:not(:first-child) > .btn {\n  border-bottom-left-radius: 0;\n  border-top-left-radius: 0;\n}\n.input-group-addon:last-child {\n  border-left: 0;\n}\n.input-group-btn {\n  position: relative;\n  font-size: 0;\n  white-space: nowrap;\n}\n.input-group-btn > .btn {\n  position: relative;\n}\n.input-group-btn > .btn + .btn {\n  margin-left: -1px;\n}\n.input-group-btn > .btn:hover,\n.input-group-btn > .btn:focus,\n.input-group-btn > .btn:active {\n  z-index: 2;\n}\n.input-group-btn:first-child > .btn,\n.input-group-btn:first-child > .btn-group {\n  margin-right: -1px;\n}\n.input-group-btn:last-child > .btn,\n.input-group-btn:last-child > .btn-group {\n  z-index: 2;\n  margin-left: -1px;\n}\n.nav {\n  margin-bottom: 0;\n  padding-left: 0;\n  list-style: none;\n}\n.nav > li {\n  position: relative;\n  display: block;\n}\n.nav > li > a {\n  position: relative;\n  display: block;\n  padding: 10px 15px;\n}\n.nav > li > a:hover,\n.nav > li > a:focus {\n  text-decoration: none;\n  background-color: #eeeeee;\n}\n.nav > li.disabled > a {\n  color: #777777;\n}\n.nav > li.disabled > a:hover,\n.nav > li.disabled > a:focus {\n  color: #777777;\n  text-decoration: none;\n  background-color: transparent;\n  cursor: not-allowed;\n}\n.nav .open > a,\n.nav .open > a:hover,\n.nav .open > a:focus {\n  background-color: #eeeeee;\n  border-color: #337ab7;\n}\n.nav .nav-divider {\n  height: 1px;\n  margin: 9px 0;\n  overflow: hidden;\n  background-color: #e5e5e5;\n}\n.nav > li > a > img {\n  max-width: none;\n}\n.nav-tabs {\n  border-bottom: 1px solid #ddd;\n}\n.nav-tabs > li {\n  float: left;\n  margin-bottom: -1px;\n}\n.nav-tabs > li > a {\n  margin-right: 2px;\n  line-height: 1.42857143;\n  border: 1px solid transparent;\n  border-radius: 4px 4px 0 0;\n}\n.nav-tabs > li > a:hover {\n  border-color: #eeeeee #eeeeee #ddd;\n}\n.nav-tabs > li.active > a,\n.nav-tabs > li.active > a:hover,\n.nav-tabs > li.active > a:focus {\n  color: #555555;\n  background-color: #fff;\n  border: 1px solid #ddd;\n  border-bottom-color: transparent;\n  cursor: default;\n}\n.nav-tabs.nav-justified {\n  width: 100%;\n  border-bottom: 0;\n}\n.nav-tabs.nav-justified > li {\n  float: none;\n}\n.nav-tabs.nav-justified > li > a {\n  text-align: center;\n  margin-bottom: 5px;\n}\n.nav-tabs.nav-justified > .dropdown .dropdown-menu {\n  top: auto;\n  left: auto;\n}\n@media (min-width: 768px) {\n  .nav-tabs.nav-justified > li {\n    display: table-cell;\n    width: 1%;\n  }\n  .nav-tabs.nav-justified > li > a {\n    margin-bottom: 0;\n  }\n}\n.nav-tabs.nav-justified > li > a {\n  margin-right: 0;\n  border-radius: 4px;\n}\n.nav-tabs.nav-justified > .active > a,\n.nav-tabs.nav-justified > .active > a:hover,\n.nav-tabs.nav-justified > .active > a:focus {\n  border: 1px solid #ddd;\n}\n@media (min-width: 768px) {\n  .nav-tabs.nav-justified > li > a {\n    border-bottom: 1px solid #ddd;\n    border-radius: 4px 4px 0 0;\n  }\n  .nav-tabs.nav-justified > .active > a,\n  .nav-tabs.nav-justified > .active > a:hover,\n  .nav-tabs.nav-justified > .active > a:focus {\n    border-bottom-color: #fff;\n  }\n}\n.nav-pills > li {\n  float: left;\n}\n.nav-pills > li > a {\n  border-radius: 4px;\n}\n.nav-pills > li + li {\n  margin-left: 2px;\n}\n.nav-pills > li.active > a,\n.nav-pills > li.active > a:hover,\n.nav-pills > li.active > a:focus {\n  color: #fff;\n  background-color: #337ab7;\n}\n.nav-stacked > li {\n  float: none;\n}\n.nav-stacked > li + li {\n  margin-top: 2px;\n  margin-left: 0;\n}\n.nav-justified {\n  width: 100%;\n}\n.nav-justified > li {\n  float: none;\n}\n.nav-justified > li > a {\n  text-align: center;\n  margin-bottom: 5px;\n}\n.nav-justified > .dropdown .dropdown-menu {\n  top: auto;\n  left: auto;\n}\n@media (min-width: 768px) {\n  .nav-justified > li {\n    display: table-cell;\n    width: 1%;\n  }\n  .nav-justified > li > a {\n    margin-bottom: 0;\n  }\n}\n.nav-tabs-justified {\n  border-bottom: 0;\n}\n.nav-tabs-justified > li > a {\n  margin-right: 0;\n  border-radius: 4px;\n}\n.nav-tabs-justified > .active > a,\n.nav-tabs-justified > .active > a:hover,\n.nav-tabs-justified > .active > a:focus {\n  border: 1px solid #ddd;\n}\n@media (min-width: 768px) {\n  .nav-tabs-justified > li > a {\n    border-bottom: 1px solid #ddd;\n    border-radius: 4px 4px 0 0;\n  }\n  .nav-tabs-justified > .active > a,\n  .nav-tabs-justified > .active > a:hover,\n  .nav-tabs-justified > .active > a:focus {\n    border-bottom-color: #fff;\n  }\n}\n.tab-content > .tab-pane {\n  display: none;\n}\n.tab-content > .active {\n  display: block;\n}\n.nav-tabs .dropdown-menu {\n  margin-top: -1px;\n  border-top-right-radius: 0;\n  border-top-left-radius: 0;\n}\n.navbar {\n  position: relative;\n  min-height: 50px;\n  margin-bottom: 20px;\n  border: 1px solid transparent;\n}\n@media (min-width: 768px) {\n  .navbar {\n    border-radius: 4px;\n  }\n}\n@media (min-width: 768px) {\n  .navbar-header {\n    float: left;\n  }\n}\n.navbar-collapse {\n  overflow-x: visible;\n  padding-right: 15px;\n  padding-left: 15px;\n  border-top: 1px solid transparent;\n  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);\n  -webkit-overflow-scrolling: touch;\n}\n.navbar-collapse.in {\n  overflow-y: auto;\n}\n@media (min-width: 768px) {\n  .navbar-collapse {\n    width: auto;\n    border-top: 0;\n    box-shadow: none;\n  }\n  .navbar-collapse.collapse {\n    display: block !important;\n    height: auto !important;\n    padding-bottom: 0;\n    overflow: visible !important;\n  }\n  .navbar-collapse.in {\n    overflow-y: visible;\n  }\n  .navbar-fixed-top .navbar-collapse,\n  .navbar-static-top .navbar-collapse,\n  .navbar-fixed-bottom .navbar-collapse {\n    padding-left: 0;\n    padding-right: 0;\n  }\n}\n.navbar-fixed-top .navbar-collapse,\n.navbar-fixed-bottom .navbar-collapse {\n  max-height: 340px;\n}\n@media (max-device-width: 480px) and (orientation: landscape) {\n  .navbar-fixed-top .navbar-collapse,\n  .navbar-fixed-bottom .navbar-collapse {\n    max-height: 200px;\n  }\n}\n.container > .navbar-header,\n.container-fluid > .navbar-header,\n.container > .navbar-collapse,\n.container-fluid > .navbar-collapse {\n  margin-right: -15px;\n  margin-left: -15px;\n}\n@media (min-width: 768px) {\n  .container > .navbar-header,\n  .container-fluid > .navbar-header,\n  .container > .navbar-collapse,\n  .container-fluid > .navbar-collapse {\n    margin-right: 0;\n    margin-left: 0;\n  }\n}\n.navbar-static-top {\n  z-index: 1000;\n  border-width: 0 0 1px;\n}\n@media (min-width: 768px) {\n  .navbar-static-top {\n    border-radius: 0;\n  }\n}\n.navbar-fixed-top,\n.navbar-fixed-bottom {\n  position: fixed;\n  right: 0;\n  left: 0;\n  z-index: 1030;\n}\n@media (min-width: 768px) {\n  .navbar-fixed-top,\n  .navbar-fixed-bottom {\n    border-radius: 0;\n  }\n}\n.navbar-fixed-top {\n  top: 0;\n  border-width: 0 0 1px;\n}\n.navbar-fixed-bottom {\n  bottom: 0;\n  margin-bottom: 0;\n  border-width: 1px 0 0;\n}\n.navbar-brand {\n  float: left;\n  padding: 15px 15px;\n  font-size: 18px;\n  line-height: 20px;\n  height: 50px;\n}\n.navbar-brand:hover,\n.navbar-brand:focus {\n  text-decoration: none;\n}\n.navbar-brand > img {\n  display: block;\n}\n@media (min-width: 768px) {\n  .navbar > .container .navbar-brand,\n  .navbar > .container-fluid .navbar-brand {\n    margin-left: -15px;\n  }\n}\n.navbar-toggle {\n  position: relative;\n  float: right;\n  margin-right: 15px;\n  padding: 9px 10px;\n  margin-top: 8px;\n  margin-bottom: 8px;\n  background-color: transparent;\n  background-image: none;\n  border: 1px solid transparent;\n  border-radius: 4px;\n}\n.navbar-toggle:focus {\n  outline: 0;\n}\n.navbar-toggle .icon-bar {\n  display: block;\n  width: 22px;\n  height: 2px;\n  border-radius: 1px;\n}\n.navbar-toggle .icon-bar + .icon-bar {\n  margin-top: 4px;\n}\n@media (min-width: 768px) {\n  .navbar-toggle {\n    display: none;\n  }\n}\n.navbar-nav {\n  margin: 7.5px -15px;\n}\n.navbar-nav > li > a {\n  padding-top: 10px;\n  padding-bottom: 10px;\n  line-height: 20px;\n}\n@media (max-width: 767px) {\n  .navbar-nav .open .dropdown-menu {\n    position: static;\n    float: none;\n    width: auto;\n    margin-top: 0;\n    background-color: transparent;\n    border: 0;\n    box-shadow: none;\n  }\n  .navbar-nav .open .dropdown-menu > li > a,\n  .navbar-nav .open .dropdown-menu .dropdown-header {\n    padding: 5px 15px 5px 25px;\n  }\n  .navbar-nav .open .dropdown-menu > li > a {\n    line-height: 20px;\n  }\n  .navbar-nav .open .dropdown-menu > li > a:hover,\n  .navbar-nav .open .dropdown-menu > li > a:focus {\n    background-image: none;\n  }\n}\n@media (min-width: 768px) {\n  .navbar-nav {\n    float: left;\n    margin: 0;\n  }\n  .navbar-nav > li {\n    float: left;\n  }\n  .navbar-nav > li > a {\n    padding-top: 15px;\n    padding-bottom: 15px;\n  }\n}\n.navbar-form {\n  margin-left: -15px;\n  margin-right: -15px;\n  padding: 10px 15px;\n  border-top: 1px solid transparent;\n  border-bottom: 1px solid transparent;\n  -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 0 rgba(255, 255, 255, 0.1);\n  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 0 rgba(255, 255, 255, 0.1);\n  margin-top: 8px;\n  margin-bottom: 8px;\n}\n@media (min-width: 768px) {\n  .navbar-form .form-group {\n    display: inline-block;\n    margin-bottom: 0;\n    vertical-align: middle;\n  }\n  .navbar-form .form-control {\n    display: inline-block;\n    width: auto;\n    vertical-align: middle;\n  }\n  .navbar-form .form-control-static {\n    display: inline-block;\n  }\n  .navbar-form .input-group {\n    display: inline-table;\n    vertical-align: middle;\n  }\n  .navbar-form .input-group .input-group-addon,\n  .navbar-form .input-group .input-group-btn,\n  .navbar-form .input-group .form-control {\n    width: auto;\n  }\n  .navbar-form .input-group > .form-control {\n    width: 100%;\n  }\n  .navbar-form .control-label {\n    margin-bottom: 0;\n    vertical-align: middle;\n  }\n  .navbar-form .radio,\n  .navbar-form .checkbox {\n    display: inline-block;\n    margin-top: 0;\n    margin-bottom: 0;\n    vertical-align: middle;\n  }\n  .navbar-form .radio label,\n  .navbar-form .checkbox label {\n    padding-left: 0;\n  }\n  .navbar-form .radio input[type=\"radio\"],\n  .navbar-form .checkbox input[type=\"checkbox\"] {\n    position: relative;\n    margin-left: 0;\n  }\n  .navbar-form .has-feedback .form-control-feedback {\n    top: 0;\n  }\n}\n@media (max-width: 767px) {\n  .navbar-form .form-group {\n    margin-bottom: 5px;\n  }\n  .navbar-form .form-group:last-child {\n    margin-bottom: 0;\n  }\n}\n@media (min-width: 768px) {\n  .navbar-form {\n    width: auto;\n    border: 0;\n    margin-left: 0;\n    margin-right: 0;\n    padding-top: 0;\n    padding-bottom: 0;\n    -webkit-box-shadow: none;\n    box-shadow: none;\n  }\n}\n.navbar-nav > li > .dropdown-menu {\n  margin-top: 0;\n  border-top-right-radius: 0;\n  border-top-left-radius: 0;\n}\n.navbar-fixed-bottom .navbar-nav > li > .dropdown-menu {\n  margin-bottom: 0;\n  border-top-right-radius: 4px;\n  border-top-left-radius: 4px;\n  border-bottom-right-radius: 0;\n  border-bottom-left-radius: 0;\n}\n.navbar-btn {\n  margin-top: 8px;\n  margin-bottom: 8px;\n}\n.navbar-btn.btn-sm {\n  margin-top: 10px;\n  margin-bottom: 10px;\n}\n.navbar-btn.btn-xs {\n  margin-top: 14px;\n  margin-bottom: 14px;\n}\n.navbar-text {\n  margin-top: 15px;\n  margin-bottom: 15px;\n}\n@media (min-width: 768px) {\n  .navbar-text {\n    float: left;\n    margin-left: 15px;\n    margin-right: 15px;\n  }\n}\n@media (min-width: 768px) {\n  .navbar-left {\n    float: left !important;\n  }\n  .navbar-right {\n    float: right !important;\n    margin-right: -15px;\n  }\n  .navbar-right ~ .navbar-right {\n    margin-right: 0;\n  }\n}\n.navbar-default {\n  background-color: #f8f8f8;\n  border-color: #e7e7e7;\n}\n.navbar-default .navbar-brand {\n  color: #777;\n}\n.navbar-default .navbar-brand:hover,\n.navbar-default .navbar-brand:focus {\n  color: #5e5e5e;\n  background-color: transparent;\n}\n.navbar-default .navbar-text {\n  color: #777;\n}\n.navbar-default .navbar-nav > li > a {\n  color: #777;\n}\n.navbar-default .navbar-nav > li > a:hover,\n.navbar-default .navbar-nav > li > a:focus {\n  color: #333;\n  background-color: transparent;\n}\n.navbar-default .navbar-nav > .active > a,\n.navbar-default .navbar-nav > .active > a:hover,\n.navbar-default .navbar-nav > .active > a:focus {\n  color: #555;\n  background-color: #e7e7e7;\n}\n.navbar-default .navbar-nav > .disabled > a,\n.navbar-default .navbar-nav > .disabled > a:hover,\n.navbar-default .navbar-nav > .disabled > a:focus {\n  color: #ccc;\n  background-color: transparent;\n}\n.navbar-default .navbar-toggle {\n  border-color: #ddd;\n}\n.navbar-default .navbar-toggle:hover,\n.navbar-default .navbar-toggle:focus {\n  background-color: #ddd;\n}\n.navbar-default .navbar-toggle .icon-bar {\n  background-color: #888;\n}\n.navbar-default .navbar-collapse,\n.navbar-default .navbar-form {\n  border-color: #e7e7e7;\n}\n.navbar-default .navbar-nav > .open > a,\n.navbar-default .navbar-nav > .open > a:hover,\n.navbar-default .navbar-nav > .open > a:focus {\n  background-color: #e7e7e7;\n  color: #555;\n}\n@media (max-width: 767px) {\n  .navbar-default .navbar-nav .open .dropdown-menu > li > a {\n    color: #777;\n  }\n  .navbar-default .navbar-nav .open .dropdown-menu > li > a:hover,\n  .navbar-default .navbar-nav .open .dropdown-menu > li > a:focus {\n    color: #333;\n    background-color: transparent;\n  }\n  .navbar-default .navbar-nav .open .dropdown-menu > .active > a,\n  .navbar-default .navbar-nav .open .dropdown-menu > .active > a:hover,\n  .navbar-default .navbar-nav .open .dropdown-menu > .active > a:focus {\n    color: #555;\n    background-color: #e7e7e7;\n  }\n  .navbar-default .navbar-nav .open .dropdown-menu > .disabled > a,\n  .navbar-default .navbar-nav .open .dropdown-menu > .disabled > a:hover,\n  .navbar-default .navbar-nav .open .dropdown-menu > .disabled > a:focus {\n    color: #ccc;\n    background-color: transparent;\n  }\n}\n.navbar-default .navbar-link {\n  color: #777;\n}\n.navbar-default .navbar-link:hover {\n  color: #333;\n}\n.navbar-default .btn-link {\n  color: #777;\n}\n.navbar-default .btn-link:hover,\n.navbar-default .btn-link:focus {\n  color: #333;\n}\n.navbar-default .btn-link[disabled]:hover,\nfieldset[disabled] .navbar-default .btn-link:hover,\n.navbar-default .btn-link[disabled]:focus,\nfieldset[disabled] .navbar-default .btn-link:focus {\n  color: #ccc;\n}\n.navbar-inverse {\n  background-color: #222;\n  border-color: #080808;\n}\n.navbar-inverse .navbar-brand {\n  color: #9d9d9d;\n}\n.navbar-inverse .navbar-brand:hover,\n.navbar-inverse .navbar-brand:focus {\n  color: #fff;\n  background-color: transparent;\n}\n.navbar-inverse .navbar-text {\n  color: #9d9d9d;\n}\n.navbar-inverse .navbar-nav > li > a {\n  color: #9d9d9d;\n}\n.navbar-inverse .navbar-nav > li > a:hover,\n.navbar-inverse .navbar-nav > li > a:focus {\n  color: #fff;\n  background-color: transparent;\n}\n.navbar-inverse .navbar-nav > .active > a,\n.navbar-inverse .navbar-nav > .active > a:hover,\n.navbar-inverse .navbar-nav > .active > a:focus {\n  color: #fff;\n  background-color: #080808;\n}\n.navbar-inverse .navbar-nav > .disabled > a,\n.navbar-inverse .navbar-nav > .disabled > a:hover,\n.navbar-inverse .navbar-nav > .disabled > a:focus {\n  color: #444;\n  background-color: transparent;\n}\n.navbar-inverse .navbar-toggle {\n  border-color: #333;\n}\n.navbar-inverse .navbar-toggle:hover,\n.navbar-inverse .navbar-toggle:focus {\n  background-color: #333;\n}\n.navbar-inverse .navbar-toggle .icon-bar {\n  background-color: #fff;\n}\n.navbar-inverse .navbar-collapse,\n.navbar-inverse .navbar-form {\n  border-color: #101010;\n}\n.navbar-inverse .navbar-nav > .open > a,\n.navbar-inverse .navbar-nav > .open > a:hover,\n.navbar-inverse .navbar-nav > .open > a:focus {\n  background-color: #080808;\n  color: #fff;\n}\n@media (max-width: 767px) {\n  .navbar-inverse .navbar-nav .open .dropdown-menu > .dropdown-header {\n    border-color: #080808;\n  }\n  .navbar-inverse .navbar-nav .open .dropdown-menu .divider {\n    background-color: #080808;\n  }\n  .navbar-inverse .navbar-nav .open .dropdown-menu > li > a {\n    color: #9d9d9d;\n  }\n  .navbar-inverse .navbar-nav .open .dropdown-menu > li > a:hover,\n  .navbar-inverse .navbar-nav .open .dropdown-menu > li > a:focus {\n    color: #fff;\n    background-color: transparent;\n  }\n  .navbar-inverse .navbar-nav .open .dropdown-menu > .active > a,\n  .navbar-inverse .navbar-nav .open .dropdown-menu > .active > a:hover,\n  .navbar-inverse .navbar-nav .open .dropdown-menu > .active > a:focus {\n    color: #fff;\n    background-color: #080808;\n  }\n  .navbar-inverse .navbar-nav .open .dropdown-menu > .disabled > a,\n  .navbar-inverse .navbar-nav .open .dropdown-menu > .disabled > a:hover,\n  .navbar-inverse .navbar-nav .open .dropdown-menu > .disabled > a:focus {\n    color: #444;\n    background-color: transparent;\n  }\n}\n.navbar-inverse .navbar-link {\n  color: #9d9d9d;\n}\n.navbar-inverse .navbar-link:hover {\n  color: #fff;\n}\n.navbar-inverse .btn-link {\n  color: #9d9d9d;\n}\n.navbar-inverse .btn-link:hover,\n.navbar-inverse .btn-link:focus {\n  color: #fff;\n}\n.navbar-inverse .btn-link[disabled]:hover,\nfieldset[disabled] .navbar-inverse .btn-link:hover,\n.navbar-inverse .btn-link[disabled]:focus,\nfieldset[disabled] .navbar-inverse .btn-link:focus {\n  color: #444;\n}\n.breadcrumb {\n  padding: 8px 15px;\n  margin-bottom: 20px;\n  list-style: none;\n  background-color: #f5f5f5;\n  border-radius: 4px;\n}\n.breadcrumb > li {\n  display: inline-block;\n}\n.breadcrumb > li + li:before {\n  content: \"/\\00a0\";\n  padding: 0 5px;\n  color: #ccc;\n}\n.breadcrumb > .active {\n  color: #777777;\n}\n.pagination {\n  display: inline-block;\n  padding-left: 0;\n  margin: 20px 0;\n  border-radius: 4px;\n}\n.pagination > li {\n  display: inline;\n}\n.pagination > li > a,\n.pagination > li > span {\n  position: relative;\n  float: left;\n  padding: 6px 12px;\n  line-height: 1.42857143;\n  text-decoration: none;\n  color: #337ab7;\n  background-color: #fff;\n  border: 1px solid #ddd;\n  margin-left: -1px;\n}\n.pagination > li:first-child > a,\n.pagination > li:first-child > span {\n  margin-left: 0;\n  border-bottom-left-radius: 4px;\n  border-top-left-radius: 4px;\n}\n.pagination > li:last-child > a,\n.pagination > li:last-child > span {\n  border-bottom-right-radius: 4px;\n  border-top-right-radius: 4px;\n}\n.pagination > li > a:hover,\n.pagination > li > span:hover,\n.pagination > li > a:focus,\n.pagination > li > span:focus {\n  z-index: 2;\n  color: #23527c;\n  background-color: #eeeeee;\n  border-color: #ddd;\n}\n.pagination > .active > a,\n.pagination > .active > span,\n.pagination > .active > a:hover,\n.pagination > .active > span:hover,\n.pagination > .active > a:focus,\n.pagination > .active > span:focus {\n  z-index: 3;\n  color: #fff;\n  background-color: #337ab7;\n  border-color: #337ab7;\n  cursor: default;\n}\n.pagination > .disabled > span,\n.pagination > .disabled > span:hover,\n.pagination > .disabled > span:focus,\n.pagination > .disabled > a,\n.pagination > .disabled > a:hover,\n.pagination > .disabled > a:focus {\n  color: #777777;\n  background-color: #fff;\n  border-color: #ddd;\n  cursor: not-allowed;\n}\n.pagination-lg > li > a,\n.pagination-lg > li > span {\n  padding: 10px 16px;\n  font-size: 18px;\n  line-height: 1.3333333;\n}\n.pagination-lg > li:first-child > a,\n.pagination-lg > li:first-child > span {\n  border-bottom-left-radius: 6px;\n  border-top-left-radius: 6px;\n}\n.pagination-lg > li:last-child > a,\n.pagination-lg > li:last-child > span {\n  border-bottom-right-radius: 6px;\n  border-top-right-radius: 6px;\n}\n.pagination-sm > li > a,\n.pagination-sm > li > span {\n  padding: 5px 10px;\n  font-size: 12px;\n  line-height: 1.5;\n}\n.pagination-sm > li:first-child > a,\n.pagination-sm > li:first-child > span {\n  border-bottom-left-radius: 3px;\n  border-top-left-radius: 3px;\n}\n.pagination-sm > li:last-child > a,\n.pagination-sm > li:last-child > span {\n  border-bottom-right-radius: 3px;\n  border-top-right-radius: 3px;\n}\n.pager {\n  padding-left: 0;\n  margin: 20px 0;\n  list-style: none;\n  text-align: center;\n}\n.pager li {\n  display: inline;\n}\n.pager li > a,\n.pager li > span {\n  display: inline-block;\n  padding: 5px 14px;\n  background-color: #fff;\n  border: 1px solid #ddd;\n  border-radius: 15px;\n}\n.pager li > a:hover,\n.pager li > a:focus {\n  text-decoration: none;\n  background-color: #eeeeee;\n}\n.pager .next > a,\n.pager .next > span {\n  float: right;\n}\n.pager .previous > a,\n.pager .previous > span {\n  float: left;\n}\n.pager .disabled > a,\n.pager .disabled > a:hover,\n.pager .disabled > a:focus,\n.pager .disabled > span {\n  color: #777777;\n  background-color: #fff;\n  cursor: not-allowed;\n}\n.label {\n  display: inline;\n  padding: .2em .6em .3em;\n  font-size: 75%;\n  font-weight: bold;\n  line-height: 1;\n  color: #fff;\n  text-align: center;\n  white-space: nowrap;\n  vertical-align: baseline;\n  border-radius: .25em;\n}\na.label:hover,\na.label:focus {\n  color: #fff;\n  text-decoration: none;\n  cursor: pointer;\n}\n.label:empty {\n  display: none;\n}\n.btn .label {\n  position: relative;\n  top: -1px;\n}\n.label-default {\n  background-color: #777777;\n}\n.label-default[href]:hover,\n.label-default[href]:focus {\n  background-color: #5e5e5e;\n}\n.label-primary {\n  background-color: #337ab7;\n}\n.label-primary[href]:hover,\n.label-primary[href]:focus {\n  background-color: #286090;\n}\n.label-success {\n  background-color: #5cb85c;\n}\n.label-success[href]:hover,\n.label-success[href]:focus {\n  background-color: #449d44;\n}\n.label-info {\n  background-color: #5bc0de;\n}\n.label-info[href]:hover,\n.label-info[href]:focus {\n  background-color: #31b0d5;\n}\n.label-warning {\n  background-color: #f0ad4e;\n}\n.label-warning[href]:hover,\n.label-warning[href]:focus {\n  background-color: #ec971f;\n}\n.label-danger {\n  background-color: #d9534f;\n}\n.label-danger[href]:hover,\n.label-danger[href]:focus {\n  background-color: #c9302c;\n}\n.badge {\n  display: inline-block;\n  min-width: 10px;\n  padding: 3px 7px;\n  font-size: 12px;\n  font-weight: bold;\n  color: #fff;\n  line-height: 1;\n  vertical-align: middle;\n  white-space: nowrap;\n  text-align: center;\n  background-color: #777777;\n  border-radius: 10px;\n}\n.badge:empty {\n  display: none;\n}\n.btn .badge {\n  position: relative;\n  top: -1px;\n}\n.btn-xs .badge,\n.btn-group-xs > .btn .badge {\n  top: 0;\n  padding: 1px 5px;\n}\na.badge:hover,\na.badge:focus {\n  color: #fff;\n  text-decoration: none;\n  cursor: pointer;\n}\n.list-group-item.active > .badge,\n.nav-pills > .active > a > .badge {\n  color: #337ab7;\n  background-color: #fff;\n}\n.list-group-item > .badge {\n  float: right;\n}\n.list-group-item > .badge + .badge {\n  margin-right: 5px;\n}\n.nav-pills > li > a > .badge {\n  margin-left: 3px;\n}\n.jumbotron {\n  padding-top: 30px;\n  padding-bottom: 30px;\n  margin-bottom: 30px;\n  color: inherit;\n  background-color: #eeeeee;\n}\n.jumbotron h1,\n.jumbotron .h1 {\n  color: inherit;\n}\n.jumbotron p {\n  margin-bottom: 15px;\n  font-size: 21px;\n  font-weight: 200;\n}\n.jumbotron > hr {\n  border-top-color: #d5d5d5;\n}\n.container .jumbotron,\n.container-fluid .jumbotron {\n  border-radius: 6px;\n  padding-left: 15px;\n  padding-right: 15px;\n}\n.jumbotron .container {\n  max-width: 100%;\n}\n@media screen and (min-width: 768px) {\n  .jumbotron {\n    padding-top: 48px;\n    padding-bottom: 48px;\n  }\n  .container .jumbotron,\n  .container-fluid .jumbotron {\n    padding-left: 60px;\n    padding-right: 60px;\n  }\n  .jumbotron h1,\n  .jumbotron .h1 {\n    font-size: 63px;\n  }\n}\n.thumbnail {\n  display: block;\n  padding: 4px;\n  margin-bottom: 20px;\n  line-height: 1.42857143;\n  background-color: #fff;\n  border: 1px solid #ddd;\n  border-radius: 4px;\n  -webkit-transition: border 0.2s ease-in-out;\n  -o-transition: border 0.2s ease-in-out;\n  transition: border 0.2s ease-in-out;\n}\n.thumbnail > img,\n.thumbnail a > img {\n  margin-left: auto;\n  margin-right: auto;\n}\na.thumbnail:hover,\na.thumbnail:focus,\na.thumbnail.active {\n  border-color: #337ab7;\n}\n.thumbnail .caption {\n  padding: 9px;\n  color: #333333;\n}\n.alert {\n  padding: 15px;\n  margin-bottom: 20px;\n  border: 1px solid transparent;\n  border-radius: 4px;\n}\n.alert h4 {\n  margin-top: 0;\n  color: inherit;\n}\n.alert .alert-link {\n  font-weight: bold;\n}\n.alert > p,\n.alert > ul {\n  margin-bottom: 0;\n}\n.alert > p + p {\n  margin-top: 5px;\n}\n.alert-dismissable,\n.alert-dismissible {\n  padding-right: 35px;\n}\n.alert-dismissable .close,\n.alert-dismissible .close {\n  position: relative;\n  top: -2px;\n  right: -21px;\n  color: inherit;\n}\n.alert-success {\n  background-color: #dff0d8;\n  border-color: #d6e9c6;\n  color: #3c763d;\n}\n.alert-success hr {\n  border-top-color: #c9e2b3;\n}\n.alert-success .alert-link {\n  color: #2b542c;\n}\n.alert-info {\n  background-color: #d9edf7;\n  border-color: #bce8f1;\n  color: #31708f;\n}\n.alert-info hr {\n  border-top-color: #a6e1ec;\n}\n.alert-info .alert-link {\n  color: #245269;\n}\n.alert-warning {\n  background-color: #fcf8e3;\n  border-color: #faebcc;\n  color: #8a6d3b;\n}\n.alert-warning hr {\n  border-top-color: #f7e1b5;\n}\n.alert-warning .alert-link {\n  color: #66512c;\n}\n.alert-danger {\n  background-color: #f2dede;\n  border-color: #ebccd1;\n  color: #a94442;\n}\n.alert-danger hr {\n  border-top-color: #e4b9c0;\n}\n.alert-danger .alert-link {\n  color: #843534;\n}\n@-webkit-keyframes progress-bar-stripes {\n  from {\n    background-position: 40px 0;\n  }\n  to {\n    background-position: 0 0;\n  }\n}\n@keyframes progress-bar-stripes {\n  from {\n    background-position: 40px 0;\n  }\n  to {\n    background-position: 0 0;\n  }\n}\n.progress {\n  overflow: hidden;\n  height: 20px;\n  margin-bottom: 20px;\n  background-color: #f5f5f5;\n  border-radius: 4px;\n  -webkit-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);\n  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);\n}\n.progress-bar {\n  float: left;\n  width: 0%;\n  height: 100%;\n  font-size: 12px;\n  line-height: 20px;\n  color: #fff;\n  text-align: center;\n  background-color: #337ab7;\n  -webkit-box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.15);\n  box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.15);\n  -webkit-transition: width 0.6s ease;\n  -o-transition: width 0.6s ease;\n  transition: width 0.6s ease;\n}\n.progress-striped .progress-bar,\n.progress-bar-striped {\n  background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);\n  background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);\n  background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);\n  background-size: 40px 40px;\n}\n.progress.active .progress-bar,\n.progress-bar.active {\n  -webkit-animation: progress-bar-stripes 2s linear infinite;\n  -o-animation: progress-bar-stripes 2s linear infinite;\n  animation: progress-bar-stripes 2s linear infinite;\n}\n.progress-bar-success {\n  background-color: #5cb85c;\n}\n.progress-striped .progress-bar-success {\n  background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);\n  background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);\n  background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);\n}\n.progress-bar-info {\n  background-color: #5bc0de;\n}\n.progress-striped .progress-bar-info {\n  background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);\n  background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);\n  background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);\n}\n.progress-bar-warning {\n  background-color: #f0ad4e;\n}\n.progress-striped .progress-bar-warning {\n  background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);\n  background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);\n  background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);\n}\n.progress-bar-danger {\n  background-color: #d9534f;\n}\n.progress-striped .progress-bar-danger {\n  background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);\n  background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);\n  background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);\n}\n.media {\n  margin-top: 15px;\n}\n.media:first-child {\n  margin-top: 0;\n}\n.media,\n.media-body {\n  zoom: 1;\n  overflow: hidden;\n}\n.media-body {\n  width: 10000px;\n}\n.media-object {\n  display: block;\n}\n.media-object.img-thumbnail {\n  max-width: none;\n}\n.media-right,\n.media > .pull-right {\n  padding-left: 10px;\n}\n.media-left,\n.media > .pull-left {\n  padding-right: 10px;\n}\n.media-left,\n.media-right,\n.media-body {\n  display: table-cell;\n  vertical-align: top;\n}\n.media-middle {\n  vertical-align: middle;\n}\n.media-bottom {\n  vertical-align: bottom;\n}\n.media-heading {\n  margin-top: 0;\n  margin-bottom: 5px;\n}\n.media-list {\n  padding-left: 0;\n  list-style: none;\n}\n.list-group {\n  margin-bottom: 20px;\n  padding-left: 0;\n}\n.list-group-item {\n  position: relative;\n  display: block;\n  padding: 10px 15px;\n  margin-bottom: -1px;\n  background-color: #fff;\n  border: 1px solid #ddd;\n}\n.list-group-item:first-child {\n  border-top-right-radius: 4px;\n  border-top-left-radius: 4px;\n}\n.list-group-item:last-child {\n  margin-bottom: 0;\n  border-bottom-right-radius: 4px;\n  border-bottom-left-radius: 4px;\n}\na.list-group-item,\nbutton.list-group-item {\n  color: #555;\n}\na.list-group-item .list-group-item-heading,\nbutton.list-group-item .list-group-item-heading {\n  color: #333;\n}\na.list-group-item:hover,\nbutton.list-group-item:hover,\na.list-group-item:focus,\nbutton.list-group-item:focus {\n  text-decoration: none;\n  color: #555;\n  background-color: #f5f5f5;\n}\nbutton.list-group-item {\n  width: 100%;\n  text-align: left;\n}\n.list-group-item.disabled,\n.list-group-item.disabled:hover,\n.list-group-item.disabled:focus {\n  background-color: #eeeeee;\n  color: #777777;\n  cursor: not-allowed;\n}\n.list-group-item.disabled .list-group-item-heading,\n.list-group-item.disabled:hover .list-group-item-heading,\n.list-group-item.disabled:focus .list-group-item-heading {\n  color: inherit;\n}\n.list-group-item.disabled .list-group-item-text,\n.list-group-item.disabled:hover .list-group-item-text,\n.list-group-item.disabled:focus .list-group-item-text {\n  color: #777777;\n}\n.list-group-item.active,\n.list-group-item.active:hover,\n.list-group-item.active:focus {\n  z-index: 2;\n  color: #fff;\n  background-color: #337ab7;\n  border-color: #337ab7;\n}\n.list-group-item.active .list-group-item-heading,\n.list-group-item.active:hover .list-group-item-heading,\n.list-group-item.active:focus .list-group-item-heading,\n.list-group-item.active .list-group-item-heading > small,\n.list-group-item.active:hover .list-group-item-heading > small,\n.list-group-item.active:focus .list-group-item-heading > small,\n.list-group-item.active .list-group-item-heading > .small,\n.list-group-item.active:hover .list-group-item-heading > .small,\n.list-group-item.active:focus .list-group-item-heading > .small {\n  color: inherit;\n}\n.list-group-item.active .list-group-item-text,\n.list-group-item.active:hover .list-group-item-text,\n.list-group-item.active:focus .list-group-item-text {\n  color: #c7ddef;\n}\n.list-group-item-success {\n  color: #3c763d;\n  background-color: #dff0d8;\n}\na.list-group-item-success,\nbutton.list-group-item-success {\n  color: #3c763d;\n}\na.list-group-item-success .list-group-item-heading,\nbutton.list-group-item-success .list-group-item-heading {\n  color: inherit;\n}\na.list-group-item-success:hover,\nbutton.list-group-item-success:hover,\na.list-group-item-success:focus,\nbutton.list-group-item-success:focus {\n  color: #3c763d;\n  background-color: #d0e9c6;\n}\na.list-group-item-success.active,\nbutton.list-group-item-success.active,\na.list-group-item-success.active:hover,\nbutton.list-group-item-success.active:hover,\na.list-group-item-success.active:focus,\nbutton.list-group-item-success.active:focus {\n  color: #fff;\n  background-color: #3c763d;\n  border-color: #3c763d;\n}\n.list-group-item-info {\n  color: #31708f;\n  background-color: #d9edf7;\n}\na.list-group-item-info,\nbutton.list-group-item-info {\n  color: #31708f;\n}\na.list-group-item-info .list-group-item-heading,\nbutton.list-group-item-info .list-group-item-heading {\n  color: inherit;\n}\na.list-group-item-info:hover,\nbutton.list-group-item-info:hover,\na.list-group-item-info:focus,\nbutton.list-group-item-info:focus {\n  color: #31708f;\n  background-color: #c4e3f3;\n}\na.list-group-item-info.active,\nbutton.list-group-item-info.active,\na.list-group-item-info.active:hover,\nbutton.list-group-item-info.active:hover,\na.list-group-item-info.active:focus,\nbutton.list-group-item-info.active:focus {\n  color: #fff;\n  background-color: #31708f;\n  border-color: #31708f;\n}\n.list-group-item-warning {\n  color: #8a6d3b;\n  background-color: #fcf8e3;\n}\na.list-group-item-warning,\nbutton.list-group-item-warning {\n  color: #8a6d3b;\n}\na.list-group-item-warning .list-group-item-heading,\nbutton.list-group-item-warning .list-group-item-heading {\n  color: inherit;\n}\na.list-group-item-warning:hover,\nbutton.list-group-item-warning:hover,\na.list-group-item-warning:focus,\nbutton.list-group-item-warning:focus {\n  color: #8a6d3b;\n  background-color: #faf2cc;\n}\na.list-group-item-warning.active,\nbutton.list-group-item-warning.active,\na.list-group-item-warning.active:hover,\nbutton.list-group-item-warning.active:hover,\na.list-group-item-warning.active:focus,\nbutton.list-group-item-warning.active:focus {\n  color: #fff;\n  background-color: #8a6d3b;\n  border-color: #8a6d3b;\n}\n.list-group-item-danger {\n  color: #a94442;\n  background-color: #f2dede;\n}\na.list-group-item-danger,\nbutton.list-group-item-danger {\n  color: #a94442;\n}\na.list-group-item-danger .list-group-item-heading,\nbutton.list-group-item-danger .list-group-item-heading {\n  color: inherit;\n}\na.list-group-item-danger:hover,\nbutton.list-group-item-danger:hover,\na.list-group-item-danger:focus,\nbutton.list-group-item-danger:focus {\n  color: #a94442;\n  background-color: #ebcccc;\n}\na.list-group-item-danger.active,\nbutton.list-group-item-danger.active,\na.list-group-item-danger.active:hover,\nbutton.list-group-item-danger.active:hover,\na.list-group-item-danger.active:focus,\nbutton.list-group-item-danger.active:focus {\n  color: #fff;\n  background-color: #a94442;\n  border-color: #a94442;\n}\n.list-group-item-heading {\n  margin-top: 0;\n  margin-bottom: 5px;\n}\n.list-group-item-text {\n  margin-bottom: 0;\n  line-height: 1.3;\n}\n.panel {\n  margin-bottom: 20px;\n  background-color: #fff;\n  border: 1px solid transparent;\n  border-radius: 4px;\n  -webkit-box-shadow: 0 1px 1px rgba(0, 0, 0, 0.05);\n  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.05);\n}\n.panel-body {\n  padding: 15px;\n}\n.panel-heading {\n  padding: 10px 15px;\n  border-bottom: 1px solid transparent;\n  border-top-right-radius: 3px;\n  border-top-left-radius: 3px;\n}\n.panel-heading > .dropdown .dropdown-toggle {\n  color: inherit;\n}\n.panel-title {\n  margin-top: 0;\n  margin-bottom: 0;\n  font-size: 16px;\n  color: inherit;\n}\n.panel-title > a,\n.panel-title > small,\n.panel-title > .small,\n.panel-title > small > a,\n.panel-title > .small > a {\n  color: inherit;\n}\n.panel-footer {\n  padding: 10px 15px;\n  background-color: #f5f5f5;\n  border-top: 1px solid #ddd;\n  border-bottom-right-radius: 3px;\n  border-bottom-left-radius: 3px;\n}\n.panel > .list-group,\n.panel > .panel-collapse > .list-group {\n  margin-bottom: 0;\n}\n.panel > .list-group .list-group-item,\n.panel > .panel-collapse > .list-group .list-group-item {\n  border-width: 1px 0;\n  border-radius: 0;\n}\n.panel > .list-group:first-child .list-group-item:first-child,\n.panel > .panel-collapse > .list-group:first-child .list-group-item:first-child {\n  border-top: 0;\n  border-top-right-radius: 3px;\n  border-top-left-radius: 3px;\n}\n.panel > .list-group:last-child .list-group-item:last-child,\n.panel > .panel-collapse > .list-group:last-child .list-group-item:last-child {\n  border-bottom: 0;\n  border-bottom-right-radius: 3px;\n  border-bottom-left-radius: 3px;\n}\n.panel > .panel-heading + .panel-collapse > .list-group .list-group-item:first-child {\n  border-top-right-radius: 0;\n  border-top-left-radius: 0;\n}\n.panel-heading + .list-group .list-group-item:first-child {\n  border-top-width: 0;\n}\n.list-group + .panel-footer {\n  border-top-width: 0;\n}\n.panel > .table,\n.panel > .table-responsive > .table,\n.panel > .panel-collapse > .table {\n  margin-bottom: 0;\n}\n.panel > .table caption,\n.panel > .table-responsive > .table caption,\n.panel > .panel-collapse > .table caption {\n  padding-left: 15px;\n  padding-right: 15px;\n}\n.panel > .table:first-child,\n.panel > .table-responsive:first-child > .table:first-child {\n  border-top-right-radius: 3px;\n  border-top-left-radius: 3px;\n}\n.panel > .table:first-child > thead:first-child > tr:first-child,\n.panel > .table-responsive:first-child > .table:first-child > thead:first-child > tr:first-child,\n.panel > .table:first-child > tbody:first-child > tr:first-child,\n.panel > .table-responsive:first-child > .table:first-child > tbody:first-child > tr:first-child {\n  border-top-left-radius: 3px;\n  border-top-right-radius: 3px;\n}\n.panel > .table:first-child > thead:first-child > tr:first-child td:first-child,\n.panel > .table-responsive:first-child > .table:first-child > thead:first-child > tr:first-child td:first-child,\n.panel > .table:first-child > tbody:first-child > tr:first-child td:first-child,\n.panel > .table-responsive:first-child > .table:first-child > tbody:first-child > tr:first-child td:first-child,\n.panel > .table:first-child > thead:first-child > tr:first-child th:first-child,\n.panel > .table-responsive:first-child > .table:first-child > thead:first-child > tr:first-child th:first-child,\n.panel > .table:first-child > tbody:first-child > tr:first-child th:first-child,\n.panel > .table-responsive:first-child > .table:first-child > tbody:first-child > tr:first-child th:first-child {\n  border-top-left-radius: 3px;\n}\n.panel > .table:first-child > thead:first-child > tr:first-child td:last-child,\n.panel > .table-responsive:first-child > .table:first-child > thead:first-child > tr:first-child td:last-child,\n.panel > .table:first-child > tbody:first-child > tr:first-child td:last-child,\n.panel > .table-responsive:first-child > .table:first-child > tbody:first-child > tr:first-child td:last-child,\n.panel > .table:first-child > thead:first-child > tr:first-child th:last-child,\n.panel > .table-responsive:first-child > .table:first-child > thead:first-child > tr:first-child th:last-child,\n.panel > .table:first-child > tbody:first-child > tr:first-child th:last-child,\n.panel > .table-responsive:first-child > .table:first-child > tbody:first-child > tr:first-child th:last-child {\n  border-top-right-radius: 3px;\n}\n.panel > .table:last-child,\n.panel > .table-responsive:last-child > .table:last-child {\n  border-bottom-right-radius: 3px;\n  border-bottom-left-radius: 3px;\n}\n.panel > .table:last-child > tbody:last-child > tr:last-child,\n.panel > .table-responsive:last-child > .table:last-child > tbody:last-child > tr:last-child,\n.panel > .table:last-child > tfoot:last-child > tr:last-child,\n.panel > .table-responsive:last-child > .table:last-child > tfoot:last-child > tr:last-child {\n  border-bottom-left-radius: 3px;\n  border-bottom-right-radius: 3px;\n}\n.panel > .table:last-child > tbody:last-child > tr:last-child td:first-child,\n.panel > .table-responsive:last-child > .table:last-child > tbody:last-child > tr:last-child td:first-child,\n.panel > .table:last-child > tfoot:last-child > tr:last-child td:first-child,\n.panel > .table-responsive:last-child > .table:last-child > tfoot:last-child > tr:last-child td:first-child,\n.panel > .table:last-child > tbody:last-child > tr:last-child th:first-child,\n.panel > .table-responsive:last-child > .table:last-child > tbody:last-child > tr:last-child th:first-child,\n.panel > .table:last-child > tfoot:last-child > tr:last-child th:first-child,\n.panel > .table-responsive:last-child > .table:last-child > tfoot:last-child > tr:last-child th:first-child {\n  border-bottom-left-radius: 3px;\n}\n.panel > .table:last-child > tbody:last-child > tr:last-child td:last-child,\n.panel > .table-responsive:last-child > .table:last-child > tbody:last-child > tr:last-child td:last-child,\n.panel > .table:last-child > tfoot:last-child > tr:last-child td:last-child,\n.panel > .table-responsive:last-child > .table:last-child > tfoot:last-child > tr:last-child td:last-child,\n.panel > .table:last-child > tbody:last-child > tr:last-child th:last-child,\n.panel > .table-responsive:last-child > .table:last-child > tbody:last-child > tr:last-child th:last-child,\n.panel > .table:last-child > tfoot:last-child > tr:last-child th:last-child,\n.panel > .table-responsive:last-child > .table:last-child > tfoot:last-child > tr:last-child th:last-child {\n  border-bottom-right-radius: 3px;\n}\n.panel > .panel-body + .table,\n.panel > .panel-body + .table-responsive,\n.panel > .table + .panel-body,\n.panel > .table-responsive + .panel-body {\n  border-top: 1px solid #ddd;\n}\n.panel > .table > tbody:first-child > tr:first-child th,\n.panel > .table > tbody:first-child > tr:first-child td {\n  border-top: 0;\n}\n.panel > .table-bordered,\n.panel > .table-responsive > .table-bordered {\n  border: 0;\n}\n.panel > .table-bordered > thead > tr > th:first-child,\n.panel > .table-responsive > .table-bordered > thead > tr > th:first-child,\n.panel > .table-bordered > tbody > tr > th:first-child,\n.panel > .table-responsive > .table-bordered > tbody > tr > th:first-child,\n.panel > .table-bordered > tfoot > tr > th:first-child,\n.panel > .table-responsive > .table-bordered > tfoot > tr > th:first-child,\n.panel > .table-bordered > thead > tr > td:first-child,\n.panel > .table-responsive > .table-bordered > thead > tr > td:first-child,\n.panel > .table-bordered > tbody > tr > td:first-child,\n.panel > .table-responsive > .table-bordered > tbody > tr > td:first-child,\n.panel > .table-bordered > tfoot > tr > td:first-child,\n.panel > .table-responsive > .table-bordered > tfoot > tr > td:first-child {\n  border-left: 0;\n}\n.panel > .table-bordered > thead > tr > th:last-child,\n.panel > .table-responsive > .table-bordered > thead > tr > th:last-child,\n.panel > .table-bordered > tbody > tr > th:last-child,\n.panel > .table-responsive > .table-bordered > tbody > tr > th:last-child,\n.panel > .table-bordered > tfoot > tr > th:last-child,\n.panel > .table-responsive > .table-bordered > tfoot > tr > th:last-child,\n.panel > .table-bordered > thead > tr > td:last-child,\n.panel > .table-responsive > .table-bordered > thead > tr > td:last-child,\n.panel > .table-bordered > tbody > tr > td:last-child,\n.panel > .table-responsive > .table-bordered > tbody > tr > td:last-child,\n.panel > .table-bordered > tfoot > tr > td:last-child,\n.panel > .table-responsive > .table-bordered > tfoot > tr > td:last-child {\n  border-right: 0;\n}\n.panel > .table-bordered > thead > tr:first-child > td,\n.panel > .table-responsive > .table-bordered > thead > tr:first-child > td,\n.panel > .table-bordered > tbody > tr:first-child > td,\n.panel > .table-responsive > .table-bordered > tbody > tr:first-child > td,\n.panel > .table-bordered > thead > tr:first-child > th,\n.panel > .table-responsive > .table-bordered > thead > tr:first-child > th,\n.panel > .table-bordered > tbody > tr:first-child > th,\n.panel > .table-responsive > .table-bordered > tbody > tr:first-child > th {\n  border-bottom: 0;\n}\n.panel > .table-bordered > tbody > tr:last-child > td,\n.panel > .table-responsive > .table-bordered > tbody > tr:last-child > td,\n.panel > .table-bordered > tfoot > tr:last-child > td,\n.panel > .table-responsive > .table-bordered > tfoot > tr:last-child > td,\n.panel > .table-bordered > tbody > tr:last-child > th,\n.panel > .table-responsive > .table-bordered > tbody > tr:last-child > th,\n.panel > .table-bordered > tfoot > tr:last-child > th,\n.panel > .table-responsive > .table-bordered > tfoot > tr:last-child > th {\n  border-bottom: 0;\n}\n.panel > .table-responsive {\n  border: 0;\n  margin-bottom: 0;\n}\n.panel-group {\n  margin-bottom: 20px;\n}\n.panel-group .panel {\n  margin-bottom: 0;\n  border-radius: 4px;\n}\n.panel-group .panel + .panel {\n  margin-top: 5px;\n}\n.panel-group .panel-heading {\n  border-bottom: 0;\n}\n.panel-group .panel-heading + .panel-collapse > .panel-body,\n.panel-group .panel-heading + .panel-collapse > .list-group {\n  border-top: 1px solid #ddd;\n}\n.panel-group .panel-footer {\n  border-top: 0;\n}\n.panel-group .panel-footer + .panel-collapse .panel-body {\n  border-bottom: 1px solid #ddd;\n}\n.panel-default {\n  border-color: #ddd;\n}\n.panel-default > .panel-heading {\n  color: #333333;\n  background-color: #f5f5f5;\n  border-color: #ddd;\n}\n.panel-default > .panel-heading + .panel-collapse > .panel-body {\n  border-top-color: #ddd;\n}\n.panel-default > .panel-heading .badge {\n  color: #f5f5f5;\n  background-color: #333333;\n}\n.panel-default > .panel-footer + .panel-collapse > .panel-body {\n  border-bottom-color: #ddd;\n}\n.panel-primary {\n  border-color: #337ab7;\n}\n.panel-primary > .panel-heading {\n  color: #fff;\n  background-color: #337ab7;\n  border-color: #337ab7;\n}\n.panel-primary > .panel-heading + .panel-collapse > .panel-body {\n  border-top-color: #337ab7;\n}\n.panel-primary > .panel-heading .badge {\n  color: #337ab7;\n  background-color: #fff;\n}\n.panel-primary > .panel-footer + .panel-collapse > .panel-body {\n  border-bottom-color: #337ab7;\n}\n.panel-success {\n  border-color: #d6e9c6;\n}\n.panel-success > .panel-heading {\n  color: #3c763d;\n  background-color: #dff0d8;\n  border-color: #d6e9c6;\n}\n.panel-success > .panel-heading + .panel-collapse > .panel-body {\n  border-top-color: #d6e9c6;\n}\n.panel-success > .panel-heading .badge {\n  color: #dff0d8;\n  background-color: #3c763d;\n}\n.panel-success > .panel-footer + .panel-collapse > .panel-body {\n  border-bottom-color: #d6e9c6;\n}\n.panel-info {\n  border-color: #bce8f1;\n}\n.panel-info > .panel-heading {\n  color: #31708f;\n  background-color: #d9edf7;\n  border-color: #bce8f1;\n}\n.panel-info > .panel-heading + .panel-collapse > .panel-body {\n  border-top-color: #bce8f1;\n}\n.panel-info > .panel-heading .badge {\n  color: #d9edf7;\n  background-color: #31708f;\n}\n.panel-info > .panel-footer + .panel-collapse > .panel-body {\n  border-bottom-color: #bce8f1;\n}\n.panel-warning {\n  border-color: #faebcc;\n}\n.panel-warning > .panel-heading {\n  color: #8a6d3b;\n  background-color: #fcf8e3;\n  border-color: #faebcc;\n}\n.panel-warning > .panel-heading + .panel-collapse > .panel-body {\n  border-top-color: #faebcc;\n}\n.panel-warning > .panel-heading .badge {\n  color: #fcf8e3;\n  background-color: #8a6d3b;\n}\n.panel-warning > .panel-footer + .panel-collapse > .panel-body {\n  border-bottom-color: #faebcc;\n}\n.panel-danger {\n  border-color: #ebccd1;\n}\n.panel-danger > .panel-heading {\n  color: #a94442;\n  background-color: #f2dede;\n  border-color: #ebccd1;\n}\n.panel-danger > .panel-heading + .panel-collapse > .panel-body {\n  border-top-color: #ebccd1;\n}\n.panel-danger > .panel-heading .badge {\n  color: #f2dede;\n  background-color: #a94442;\n}\n.panel-danger > .panel-footer + .panel-collapse > .panel-body {\n  border-bottom-color: #ebccd1;\n}\n.embed-responsive {\n  position: relative;\n  display: block;\n  height: 0;\n  padding: 0;\n  overflow: hidden;\n}\n.embed-responsive .embed-responsive-item,\n.embed-responsive iframe,\n.embed-responsive embed,\n.embed-responsive object,\n.embed-responsive video {\n  position: absolute;\n  top: 0;\n  left: 0;\n  bottom: 0;\n  height: 100%;\n  width: 100%;\n  border: 0;\n}\n.embed-responsive-16by9 {\n  padding-bottom: 56.25%;\n}\n.embed-responsive-4by3 {\n  padding-bottom: 75%;\n}\n.well {\n  min-height: 20px;\n  padding: 19px;\n  margin-bottom: 20px;\n  background-color: #f5f5f5;\n  border: 1px solid #e3e3e3;\n  border-radius: 4px;\n  -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.05);\n  box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.05);\n}\n.well blockquote {\n  border-color: #ddd;\n  border-color: rgba(0, 0, 0, 0.15);\n}\n.well-lg {\n  padding: 24px;\n  border-radius: 6px;\n}\n.well-sm {\n  padding: 9px;\n  border-radius: 3px;\n}\n.close {\n  float: right;\n  font-size: 21px;\n  font-weight: bold;\n  line-height: 1;\n  color: #000;\n  text-shadow: 0 1px 0 #fff;\n  opacity: 0.2;\n  filter: alpha(opacity=20);\n}\n.close:hover,\n.close:focus {\n  color: #000;\n  text-decoration: none;\n  cursor: pointer;\n  opacity: 0.5;\n  filter: alpha(opacity=50);\n}\nbutton.close {\n  padding: 0;\n  cursor: pointer;\n  background: transparent;\n  border: 0;\n  -webkit-appearance: none;\n}\n.modal-open {\n  overflow: hidden;\n}\n.modal {\n  display: none;\n  overflow: hidden;\n  position: fixed;\n  top: 0;\n  right: 0;\n  bottom: 0;\n  left: 0;\n  z-index: 1050;\n  -webkit-overflow-scrolling: touch;\n  outline: 0;\n}\n.modal.fade .modal-dialog {\n  -webkit-transform: translate(0, -25%);\n  -ms-transform: translate(0, -25%);\n  -o-transform: translate(0, -25%);\n  transform: translate(0, -25%);\n  -webkit-transition: -webkit-transform 0.3s ease-out;\n  -moz-transition: -moz-transform 0.3s ease-out;\n  -o-transition: -o-transform 0.3s ease-out;\n  transition: transform 0.3s ease-out;\n}\n.modal.in .modal-dialog {\n  -webkit-transform: translate(0, 0);\n  -ms-transform: translate(0, 0);\n  -o-transform: translate(0, 0);\n  transform: translate(0, 0);\n}\n.modal-open .modal {\n  overflow-x: hidden;\n  overflow-y: auto;\n}\n.modal-dialog {\n  position: relative;\n  width: auto;\n  margin: 10px;\n}\n.modal-content {\n  position: relative;\n  background-color: #fff;\n  border: 1px solid #999;\n  border: 1px solid rgba(0, 0, 0, 0.2);\n  border-radius: 6px;\n  -webkit-box-shadow: 0 3px 9px rgba(0, 0, 0, 0.5);\n  box-shadow: 0 3px 9px rgba(0, 0, 0, 0.5);\n  background-clip: padding-box;\n  outline: 0;\n}\n.modal-backdrop {\n  position: fixed;\n  top: 0;\n  right: 0;\n  bottom: 0;\n  left: 0;\n  z-index: 1040;\n  background-color: #000;\n}\n.modal-backdrop.fade {\n  opacity: 0;\n  filter: alpha(opacity=0);\n}\n.modal-backdrop.in {\n  opacity: 0.5;\n  filter: alpha(opacity=50);\n}\n.modal-header {\n  padding: 15px;\n  border-bottom: 1px solid #e5e5e5;\n}\n.modal-header .close {\n  margin-top: -2px;\n}\n.modal-title {\n  margin: 0;\n  line-height: 1.42857143;\n}\n.modal-body {\n  position: relative;\n  padding: 15px;\n}\n.modal-footer {\n  padding: 15px;\n  text-align: right;\n  border-top: 1px solid #e5e5e5;\n}\n.modal-footer .btn + .btn {\n  margin-left: 5px;\n  margin-bottom: 0;\n}\n.modal-footer .btn-group .btn + .btn {\n  margin-left: -1px;\n}\n.modal-footer .btn-block + .btn-block {\n  margin-left: 0;\n}\n.modal-scrollbar-measure {\n  position: absolute;\n  top: -9999px;\n  width: 50px;\n  height: 50px;\n  overflow: scroll;\n}\n@media (min-width: 768px) {\n  .modal-dialog {\n    width: 600px;\n    margin: 30px auto;\n  }\n  .modal-content {\n    -webkit-box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);\n    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);\n  }\n  .modal-sm {\n    width: 300px;\n  }\n}\n@media (min-width: 992px) {\n  .modal-lg {\n    width: 900px;\n  }\n}\n.tooltip {\n  position: absolute;\n  z-index: 1070;\n  display: block;\n  font-family: \"Helvetica Neue\", Helvetica, Arial, sans-serif;\n  font-style: normal;\n  font-weight: normal;\n  letter-spacing: normal;\n  line-break: auto;\n  line-height: 1.42857143;\n  text-align: left;\n  text-align: start;\n  text-decoration: none;\n  text-shadow: none;\n  text-transform: none;\n  white-space: normal;\n  word-break: normal;\n  word-spacing: normal;\n  word-wrap: normal;\n  font-size: 12px;\n  opacity: 0;\n  filter: alpha(opacity=0);\n}\n.tooltip.in {\n  opacity: 0.9;\n  filter: alpha(opacity=90);\n}\n.tooltip.top {\n  margin-top: -3px;\n  padding: 5px 0;\n}\n.tooltip.right {\n  margin-left: 3px;\n  padding: 0 5px;\n}\n.tooltip.bottom {\n  margin-top: 3px;\n  padding: 5px 0;\n}\n.tooltip.left {\n  margin-left: -3px;\n  padding: 0 5px;\n}\n.tooltip-inner {\n  max-width: 200px;\n  padding: 3px 8px;\n  color: #fff;\n  text-align: center;\n  background-color: #000;\n  border-radius: 4px;\n}\n.tooltip-arrow {\n  position: absolute;\n  width: 0;\n  height: 0;\n  border-color: transparent;\n  border-style: solid;\n}\n.tooltip.top .tooltip-arrow {\n  bottom: 0;\n  left: 50%;\n  margin-left: -5px;\n  border-width: 5px 5px 0;\n  border-top-color: #000;\n}\n.tooltip.top-left .tooltip-arrow {\n  bottom: 0;\n  right: 5px;\n  margin-bottom: -5px;\n  border-width: 5px 5px 0;\n  border-top-color: #000;\n}\n.tooltip.top-right .tooltip-arrow {\n  bottom: 0;\n  left: 5px;\n  margin-bottom: -5px;\n  border-width: 5px 5px 0;\n  border-top-color: #000;\n}\n.tooltip.right .tooltip-arrow {\n  top: 50%;\n  left: 0;\n  margin-top: -5px;\n  border-width: 5px 5px 5px 0;\n  border-right-color: #000;\n}\n.tooltip.left .tooltip-arrow {\n  top: 50%;\n  right: 0;\n  margin-top: -5px;\n  border-width: 5px 0 5px 5px;\n  border-left-color: #000;\n}\n.tooltip.bottom .tooltip-arrow {\n  top: 0;\n  left: 50%;\n  margin-left: -5px;\n  border-width: 0 5px 5px;\n  border-bottom-color: #000;\n}\n.tooltip.bottom-left .tooltip-arrow {\n  top: 0;\n  right: 5px;\n  margin-top: -5px;\n  border-width: 0 5px 5px;\n  border-bottom-color: #000;\n}\n.tooltip.bottom-right .tooltip-arrow {\n  top: 0;\n  left: 5px;\n  margin-top: -5px;\n  border-width: 0 5px 5px;\n  border-bottom-color: #000;\n}\n.popover {\n  position: absolute;\n  top: 0;\n  left: 0;\n  z-index: 1060;\n  display: none;\n  max-width: 276px;\n  padding: 1px;\n  font-family: \"Helvetica Neue\", Helvetica, Arial, sans-serif;\n  font-style: normal;\n  font-weight: normal;\n  letter-spacing: normal;\n  line-break: auto;\n  line-height: 1.42857143;\n  text-align: left;\n  text-align: start;\n  text-decoration: none;\n  text-shadow: none;\n  text-transform: none;\n  white-space: normal;\n  word-break: normal;\n  word-spacing: normal;\n  word-wrap: normal;\n  font-size: 14px;\n  background-color: #fff;\n  background-clip: padding-box;\n  border: 1px solid #ccc;\n  border: 1px solid rgba(0, 0, 0, 0.2);\n  border-radius: 6px;\n  -webkit-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);\n  box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);\n}\n.popover.top {\n  margin-top: -10px;\n}\n.popover.right {\n  margin-left: 10px;\n}\n.popover.bottom {\n  margin-top: 10px;\n}\n.popover.left {\n  margin-left: -10px;\n}\n.popover-title {\n  margin: 0;\n  padding: 8px 14px;\n  font-size: 14px;\n  background-color: #f7f7f7;\n  border-bottom: 1px solid #ebebeb;\n  border-radius: 5px 5px 0 0;\n}\n.popover-content {\n  padding: 9px 14px;\n}\n.popover > .arrow,\n.popover > .arrow:after {\n  position: absolute;\n  display: block;\n  width: 0;\n  height: 0;\n  border-color: transparent;\n  border-style: solid;\n}\n.popover > .arrow {\n  border-width: 11px;\n}\n.popover > .arrow:after {\n  border-width: 10px;\n  content: \"\";\n}\n.popover.top > .arrow {\n  left: 50%;\n  margin-left: -11px;\n  border-bottom-width: 0;\n  border-top-color: #999999;\n  border-top-color: rgba(0, 0, 0, 0.25);\n  bottom: -11px;\n}\n.popover.top > .arrow:after {\n  content: \" \";\n  bottom: 1px;\n  margin-left: -10px;\n  border-bottom-width: 0;\n  border-top-color: #fff;\n}\n.popover.right > .arrow {\n  top: 50%;\n  left: -11px;\n  margin-top: -11px;\n  border-left-width: 0;\n  border-right-color: #999999;\n  border-right-color: rgba(0, 0, 0, 0.25);\n}\n.popover.right > .arrow:after {\n  content: \" \";\n  left: 1px;\n  bottom: -10px;\n  border-left-width: 0;\n  border-right-color: #fff;\n}\n.popover.bottom > .arrow {\n  left: 50%;\n  margin-left: -11px;\n  border-top-width: 0;\n  border-bottom-color: #999999;\n  border-bottom-color: rgba(0, 0, 0, 0.25);\n  top: -11px;\n}\n.popover.bottom > .arrow:after {\n  content: \" \";\n  top: 1px;\n  margin-left: -10px;\n  border-top-width: 0;\n  border-bottom-color: #fff;\n}\n.popover.left > .arrow {\n  top: 50%;\n  right: -11px;\n  margin-top: -11px;\n  border-right-width: 0;\n  border-left-color: #999999;\n  border-left-color: rgba(0, 0, 0, 0.25);\n}\n.popover.left > .arrow:after {\n  content: \" \";\n  right: 1px;\n  border-right-width: 0;\n  border-left-color: #fff;\n  bottom: -10px;\n}\n.carousel {\n  position: relative;\n}\n.carousel-inner {\n  position: relative;\n  overflow: hidden;\n  width: 100%;\n}\n.carousel-inner > .item {\n  display: none;\n  position: relative;\n  -webkit-transition: 0.6s ease-in-out left;\n  -o-transition: 0.6s ease-in-out left;\n  transition: 0.6s ease-in-out left;\n}\n.carousel-inner > .item > img,\n.carousel-inner > .item > a > img {\n  line-height: 1;\n}\n@media all and (transform-3d), (-webkit-transform-3d) {\n  .carousel-inner > .item {\n    -webkit-transition: -webkit-transform 0.6s ease-in-out;\n    -moz-transition: -moz-transform 0.6s ease-in-out;\n    -o-transition: -o-transform 0.6s ease-in-out;\n    transition: transform 0.6s ease-in-out;\n    -webkit-backface-visibility: hidden;\n    -moz-backface-visibility: hidden;\n    backface-visibility: hidden;\n    -webkit-perspective: 1000px;\n    -moz-perspective: 1000px;\n    perspective: 1000px;\n  }\n  .carousel-inner > .item.next,\n  .carousel-inner > .item.active.right {\n    -webkit-transform: translate3d(100%, 0, 0);\n    transform: translate3d(100%, 0, 0);\n    left: 0;\n  }\n  .carousel-inner > .item.prev,\n  .carousel-inner > .item.active.left {\n    -webkit-transform: translate3d(-100%, 0, 0);\n    transform: translate3d(-100%, 0, 0);\n    left: 0;\n  }\n  .carousel-inner > .item.next.left,\n  .carousel-inner > .item.prev.right,\n  .carousel-inner > .item.active {\n    -webkit-transform: translate3d(0, 0, 0);\n    transform: translate3d(0, 0, 0);\n    left: 0;\n  }\n}\n.carousel-inner > .active,\n.carousel-inner > .next,\n.carousel-inner > .prev {\n  display: block;\n}\n.carousel-inner > .active {\n  left: 0;\n}\n.carousel-inner > .next,\n.carousel-inner > .prev {\n  position: absolute;\n  top: 0;\n  width: 100%;\n}\n.carousel-inner > .next {\n  left: 100%;\n}\n.carousel-inner > .prev {\n  left: -100%;\n}\n.carousel-inner > .next.left,\n.carousel-inner > .prev.right {\n  left: 0;\n}\n.carousel-inner > .active.left {\n  left: -100%;\n}\n.carousel-inner > .active.right {\n  left: 100%;\n}\n.carousel-control {\n  position: absolute;\n  top: 0;\n  left: 0;\n  bottom: 0;\n  width: 15%;\n  opacity: 0.5;\n  filter: alpha(opacity=50);\n  font-size: 20px;\n  color: #fff;\n  text-align: center;\n  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);\n  background-color: rgba(0, 0, 0, 0);\n}\n.carousel-control.left {\n  background-image: -webkit-linear-gradient(left, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0.0001) 100%);\n  background-image: -o-linear-gradient(left, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0.0001) 100%);\n  background-image: linear-gradient(to right, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0.0001) 100%);\n  background-repeat: repeat-x;\n  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#80000000', endColorstr='#00000000', GradientType=1);\n}\n.carousel-control.right {\n  left: auto;\n  right: 0;\n  background-image: -webkit-linear-gradient(left, rgba(0, 0, 0, 0.0001) 0%, rgba(0, 0, 0, 0.5) 100%);\n  background-image: -o-linear-gradient(left, rgba(0, 0, 0, 0.0001) 0%, rgba(0, 0, 0, 0.5) 100%);\n  background-image: linear-gradient(to right, rgba(0, 0, 0, 0.0001) 0%, rgba(0, 0, 0, 0.5) 100%);\n  background-repeat: repeat-x;\n  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#00000000', endColorstr='#80000000', GradientType=1);\n}\n.carousel-control:hover,\n.carousel-control:focus {\n  outline: 0;\n  color: #fff;\n  text-decoration: none;\n  opacity: 0.9;\n  filter: alpha(opacity=90);\n}\n.carousel-control .icon-prev,\n.carousel-control .icon-next,\n.carousel-control .glyphicon-chevron-left,\n.carousel-control .glyphicon-chevron-right {\n  position: absolute;\n  top: 50%;\n  margin-top: -10px;\n  z-index: 5;\n  display: inline-block;\n}\n.carousel-control .icon-prev,\n.carousel-control .glyphicon-chevron-left {\n  left: 50%;\n  margin-left: -10px;\n}\n.carousel-control .icon-next,\n.carousel-control .glyphicon-chevron-right {\n  right: 50%;\n  margin-right: -10px;\n}\n.carousel-control .icon-prev,\n.carousel-control .icon-next {\n  width: 20px;\n  height: 20px;\n  line-height: 1;\n  font-family: serif;\n}\n.carousel-control .icon-prev:before {\n  content: '\\2039';\n}\n.carousel-control .icon-next:before {\n  content: '\\203a';\n}\n.carousel-indicators {\n  position: absolute;\n  bottom: 10px;\n  left: 50%;\n  z-index: 15;\n  width: 60%;\n  margin-left: -30%;\n  padding-left: 0;\n  list-style: none;\n  text-align: center;\n}\n.carousel-indicators li {\n  display: inline-block;\n  width: 10px;\n  height: 10px;\n  margin: 1px;\n  text-indent: -999px;\n  border: 1px solid #fff;\n  border-radius: 10px;\n  cursor: pointer;\n  background-color: #000 \\9;\n  background-color: rgba(0, 0, 0, 0);\n}\n.carousel-indicators .active {\n  margin: 0;\n  width: 12px;\n  height: 12px;\n  background-color: #fff;\n}\n.carousel-caption {\n  position: absolute;\n  left: 15%;\n  right: 15%;\n  bottom: 20px;\n  z-index: 10;\n  padding-top: 20px;\n  padding-bottom: 20px;\n  color: #fff;\n  text-align: center;\n  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);\n}\n.carousel-caption .btn {\n  text-shadow: none;\n}\n@media screen and (min-width: 768px) {\n  .carousel-control .glyphicon-chevron-left,\n  .carousel-control .glyphicon-chevron-right,\n  .carousel-control .icon-prev,\n  .carousel-control .icon-next {\n    width: 30px;\n    height: 30px;\n    margin-top: -10px;\n    font-size: 30px;\n  }\n  .carousel-control .glyphicon-chevron-left,\n  .carousel-control .icon-prev {\n    margin-left: -10px;\n  }\n  .carousel-control .glyphicon-chevron-right,\n  .carousel-control .icon-next {\n    margin-right: -10px;\n  }\n  .carousel-caption {\n    left: 20%;\n    right: 20%;\n    padding-bottom: 30px;\n  }\n  .carousel-indicators {\n    bottom: 20px;\n  }\n}\n.clearfix:before,\n.clearfix:after,\n.dl-horizontal dd:before,\n.dl-horizontal dd:after,\n.container:before,\n.container:after,\n.container-fluid:before,\n.container-fluid:after,\n.row:before,\n.row:after,\n.form-horizontal .form-group:before,\n.form-horizontal .form-group:after,\n.btn-toolbar:before,\n.btn-toolbar:after,\n.btn-group-vertical > .btn-group:before,\n.btn-group-vertical > .btn-group:after,\n.nav:before,\n.nav:after,\n.navbar:before,\n.navbar:after,\n.navbar-header:before,\n.navbar-header:after,\n.navbar-collapse:before,\n.navbar-collapse:after,\n.pager:before,\n.pager:after,\n.panel-body:before,\n.panel-body:after,\n.modal-header:before,\n.modal-header:after,\n.modal-footer:before,\n.modal-footer:after {\n  content: \" \";\n  display: table;\n}\n.clearfix:after,\n.dl-horizontal dd:after,\n.container:after,\n.container-fluid:after,\n.row:after,\n.form-horizontal .form-group:after,\n.btn-toolbar:after,\n.btn-group-vertical > .btn-group:after,\n.nav:after,\n.navbar:after,\n.navbar-header:after,\n.navbar-collapse:after,\n.pager:after,\n.panel-body:after,\n.modal-header:after,\n.modal-footer:after {\n  clear: both;\n}\n.center-block {\n  display: block;\n  margin-left: auto;\n  margin-right: auto;\n}\n.pull-right {\n  float: right !important;\n}\n.pull-left {\n  float: left !important;\n}\n.hide {\n  display: none !important;\n}\n.show {\n  display: block !important;\n}\n.invisible {\n  visibility: hidden;\n}\n.text-hide {\n  font: 0/0 a;\n  color: transparent;\n  text-shadow: none;\n  background-color: transparent;\n  border: 0;\n}\n.hidden {\n  display: none !important;\n}\n.affix {\n  position: fixed;\n}\n@-ms-viewport {\n  width: device-width;\n}\n.visible-xs,\n.visible-sm,\n.visible-md,\n.visible-lg {\n  display: none !important;\n}\n.visible-xs-block,\n.visible-xs-inline,\n.visible-xs-inline-block,\n.visible-sm-block,\n.visible-sm-inline,\n.visible-sm-inline-block,\n.visible-md-block,\n.visible-md-inline,\n.visible-md-inline-block,\n.visible-lg-block,\n.visible-lg-inline,\n.visible-lg-inline-block {\n  display: none !important;\n}\n@media (max-width: 767px) {\n  .visible-xs {\n    display: block !important;\n  }\n  table.visible-xs {\n    display: table !important;\n  }\n  tr.visible-xs {\n    display: table-row !important;\n  }\n  th.visible-xs,\n  td.visible-xs {\n    display: table-cell !important;\n  }\n}\n@media (max-width: 767px) {\n  .visible-xs-block {\n    display: block !important;\n  }\n}\n@media (max-width: 767px) {\n  .visible-xs-inline {\n    display: inline !important;\n  }\n}\n@media (max-width: 767px) {\n  .visible-xs-inline-block {\n    display: inline-block !important;\n  }\n}\n@media (min-width: 768px) and (max-width: 991px) {\n  .visible-sm {\n    display: block !important;\n  }\n  table.visible-sm {\n    display: table !important;\n  }\n  tr.visible-sm {\n    display: table-row !important;\n  }\n  th.visible-sm,\n  td.visible-sm {\n    display: table-cell !important;\n  }\n}\n@media (min-width: 768px) and (max-width: 991px) {\n  .visible-sm-block {\n    display: block !important;\n  }\n}\n@media (min-width: 768px) and (max-width: 991px) {\n  .visible-sm-inline {\n    display: inline !important;\n  }\n}\n@media (min-width: 768px) and (max-width: 991px) {\n  .visible-sm-inline-block {\n    display: inline-block !important;\n  }\n}\n@media (min-width: 992px) and (max-width: 1199px) {\n  .visible-md {\n    display: block !important;\n  }\n  table.visible-md {\n    display: table !important;\n  }\n  tr.visible-md {\n    display: table-row !important;\n  }\n  th.visible-md,\n  td.visible-md {\n    display: table-cell !important;\n  }\n}\n@media (min-width: 992px) and (max-width: 1199px) {\n  .visible-md-block {\n    display: block !important;\n  }\n}\n@media (min-width: 992px) and (max-width: 1199px) {\n  .visible-md-inline {\n    display: inline !important;\n  }\n}\n@media (min-width: 992px) and (max-width: 1199px) {\n  .visible-md-inline-block {\n    display: inline-block !important;\n  }\n}\n@media (min-width: 1200px) {\n  .visible-lg {\n    display: block !important;\n  }\n  table.visible-lg {\n    display: table !important;\n  }\n  tr.visible-lg {\n    display: table-row !important;\n  }\n  th.visible-lg,\n  td.visible-lg {\n    display: table-cell !important;\n  }\n}\n@media (min-width: 1200px) {\n  .visible-lg-block {\n    display: block !important;\n  }\n}\n@media (min-width: 1200px) {\n  .visible-lg-inline {\n    display: inline !important;\n  }\n}\n@media (min-width: 1200px) {\n  .visible-lg-inline-block {\n    display: inline-block !important;\n  }\n}\n@media (max-width: 767px) {\n  .hidden-xs {\n    display: none !important;\n  }\n}\n@media (min-width: 768px) and (max-width: 991px) {\n  .hidden-sm {\n    display: none !important;\n  }\n}\n@media (min-width: 992px) and (max-width: 1199px) {\n  .hidden-md {\n    display: none !important;\n  }\n}\n@media (min-width: 1200px) {\n  .hidden-lg {\n    display: none !important;\n  }\n}\n.visible-print {\n  display: none !important;\n}\n@media print {\n  .visible-print {\n    display: block !important;\n  }\n  table.visible-print {\n    display: table !important;\n  }\n  tr.visible-print {\n    display: table-row !important;\n  }\n  th.visible-print,\n  td.visible-print {\n    display: table-cell !important;\n  }\n}\n.visible-print-block {\n  display: none !important;\n}\n@media print {\n  .visible-print-block {\n    display: block !important;\n  }\n}\n.visible-print-inline {\n  display: none !important;\n}\n@media print {\n  .visible-print-inline {\n    display: inline !important;\n  }\n}\n.visible-print-inline-block {\n  display: none !important;\n}\n@media print {\n  .visible-print-inline-block {\n    display: inline-block !important;\n  }\n}\n@media print {\n  .hidden-print {\n    display: none !important;\n  }\n}\n/*# sourceMappingURL=bootstrap.css.map */","/*! normalize.css v3.0.3 | MIT License | github.com/necolas/normalize.css */\n\n//\n// 1. Set default font family to sans-serif.\n// 2. Prevent iOS and IE text size adjust after device orientation change,\n//    without disabling user zoom.\n//\n\nhtml {\n  font-family: sans-serif; // 1\n  -ms-text-size-adjust: 100%; // 2\n  -webkit-text-size-adjust: 100%; // 2\n}\n\n//\n// Remove default margin.\n//\n\nbody {\n  margin: 0;\n}\n\n// HTML5 display definitions\n// ==========================================================================\n\n//\n// Correct `block` display not defined for any HTML5 element in IE 8/9.\n// Correct `block` display not defined for `details` or `summary` in IE 10/11\n// and Firefox.\n// Correct `block` display not defined for `main` in IE 11.\n//\n\narticle,\naside,\ndetails,\nfigcaption,\nfigure,\nfooter,\nheader,\nhgroup,\nmain,\nmenu,\nnav,\nsection,\nsummary {\n  display: block;\n}\n\n//\n// 1. Correct `inline-block` display not defined in IE 8/9.\n// 2. Normalize vertical alignment of `progress` in Chrome, Firefox, and Opera.\n//\n\naudio,\ncanvas,\nprogress,\nvideo {\n  display: inline-block; // 1\n  vertical-align: baseline; // 2\n}\n\n//\n// Prevent modern browsers from displaying `audio` without controls.\n// Remove excess height in iOS 5 devices.\n//\n\naudio:not([controls]) {\n  display: none;\n  height: 0;\n}\n\n//\n// Address `[hidden]` styling not present in IE 8/9/10.\n// Hide the `template` element in IE 8/9/10/11, Safari, and Firefox < 22.\n//\n\n[hidden],\ntemplate {\n  display: none;\n}\n\n// Links\n// ==========================================================================\n\n//\n// Remove the gray background color from active links in IE 10.\n//\n\na {\n  background-color: transparent;\n}\n\n//\n// Improve readability of focused elements when they are also in an\n// active/hover state.\n//\n\na:active,\na:hover {\n  outline: 0;\n}\n\n// Text-level semantics\n// ==========================================================================\n\n//\n// Address styling not present in IE 8/9/10/11, Safari, and Chrome.\n//\n\nabbr[title] {\n  border-bottom: 1px dotted;\n}\n\n//\n// Address style set to `bolder` in Firefox 4+, Safari, and Chrome.\n//\n\nb,\nstrong {\n  font-weight: bold;\n}\n\n//\n// Address styling not present in Safari and Chrome.\n//\n\ndfn {\n  font-style: italic;\n}\n\n//\n// Address variable `h1` font-size and margin within `section` and `article`\n// contexts in Firefox 4+, Safari, and Chrome.\n//\n\nh1 {\n  font-size: 2em;\n  margin: 0.67em 0;\n}\n\n//\n// Address styling not present in IE 8/9.\n//\n\nmark {\n  background: #ff0;\n  color: #000;\n}\n\n//\n// Address inconsistent and variable font size in all browsers.\n//\n\nsmall {\n  font-size: 80%;\n}\n\n//\n// Prevent `sub` and `sup` affecting `line-height` in all browsers.\n//\n\nsub,\nsup {\n  font-size: 75%;\n  line-height: 0;\n  position: relative;\n  vertical-align: baseline;\n}\n\nsup {\n  top: -0.5em;\n}\n\nsub {\n  bottom: -0.25em;\n}\n\n// Embedded content\n// ==========================================================================\n\n//\n// Remove border when inside `a` element in IE 8/9/10.\n//\n\nimg {\n  border: 0;\n}\n\n//\n// Correct overflow not hidden in IE 9/10/11.\n//\n\nsvg:not(:root) {\n  overflow: hidden;\n}\n\n// Grouping content\n// ==========================================================================\n\n//\n// Address margin not present in IE 8/9 and Safari.\n//\n\nfigure {\n  margin: 1em 40px;\n}\n\n//\n// Address differences between Firefox and other browsers.\n//\n\nhr {\n  box-sizing: content-box;\n  height: 0;\n}\n\n//\n// Contain overflow in all browsers.\n//\n\npre {\n  overflow: auto;\n}\n\n//\n// Address odd `em`-unit font size rendering in all browsers.\n//\n\ncode,\nkbd,\npre,\nsamp {\n  font-family: monospace, monospace;\n  font-size: 1em;\n}\n\n// Forms\n// ==========================================================================\n\n//\n// Known limitation: by default, Chrome and Safari on OS X allow very limited\n// styling of `select`, unless a `border` property is set.\n//\n\n//\n// 1. Correct color not being inherited.\n//    Known issue: affects color of disabled elements.\n// 2. Correct font properties not being inherited.\n// 3. Address margins set differently in Firefox 4+, Safari, and Chrome.\n//\n\nbutton,\ninput,\noptgroup,\nselect,\ntextarea {\n  color: inherit; // 1\n  font: inherit; // 2\n  margin: 0; // 3\n}\n\n//\n// Address `overflow` set to `hidden` in IE 8/9/10/11.\n//\n\nbutton {\n  overflow: visible;\n}\n\n//\n// Address inconsistent `text-transform` inheritance for `button` and `select`.\n// All other form control elements do not inherit `text-transform` values.\n// Correct `button` style inheritance in Firefox, IE 8/9/10/11, and Opera.\n// Correct `select` style inheritance in Firefox.\n//\n\nbutton,\nselect {\n  text-transform: none;\n}\n\n//\n// 1. Avoid the WebKit bug in Android 4.0.* where (2) destroys native `audio`\n//    and `video` controls.\n// 2. Correct inability to style clickable `input` types in iOS.\n// 3. Improve usability and consistency of cursor style between image-type\n//    `input` and others.\n//\n\nbutton,\nhtml input[type=\"button\"], // 1\ninput[type=\"reset\"],\ninput[type=\"submit\"] {\n  -webkit-appearance: button; // 2\n  cursor: pointer; // 3\n}\n\n//\n// Re-set default cursor for disabled elements.\n//\n\nbutton[disabled],\nhtml input[disabled] {\n  cursor: default;\n}\n\n//\n// Remove inner padding and border in Firefox 4+.\n//\n\nbutton::-moz-focus-inner,\ninput::-moz-focus-inner {\n  border: 0;\n  padding: 0;\n}\n\n//\n// Address Firefox 4+ setting `line-height` on `input` using `!important` in\n// the UA stylesheet.\n//\n\ninput {\n  line-height: normal;\n}\n\n//\n// It's recommended that you don't attempt to style these elements.\n// Firefox's implementation doesn't respect box-sizing, padding, or width.\n//\n// 1. Address box sizing set to `content-box` in IE 8/9/10.\n// 2. Remove excess padding in IE 8/9/10.\n//\n\ninput[type=\"checkbox\"],\ninput[type=\"radio\"] {\n  box-sizing: border-box; // 1\n  padding: 0; // 2\n}\n\n//\n// Fix the cursor style for Chrome's increment/decrement buttons. For certain\n// `font-size` values of the `input`, it causes the cursor style of the\n// decrement button to change from `default` to `text`.\n//\n\ninput[type=\"number\"]::-webkit-inner-spin-button,\ninput[type=\"number\"]::-webkit-outer-spin-button {\n  height: auto;\n}\n\n//\n// 1. Address `appearance` set to `searchfield` in Safari and Chrome.\n// 2. Address `box-sizing` set to `border-box` in Safari and Chrome.\n//\n\ninput[type=\"search\"] {\n  -webkit-appearance: textfield; // 1\n  box-sizing: content-box; //2\n}\n\n//\n// Remove inner padding and search cancel button in Safari and Chrome on OS X.\n// Safari (but not Chrome) clips the cancel button when the search input has\n// padding (and `textfield` appearance).\n//\n\ninput[type=\"search\"]::-webkit-search-cancel-button,\ninput[type=\"search\"]::-webkit-search-decoration {\n  -webkit-appearance: none;\n}\n\n//\n// Define consistent border, margin, and padding.\n//\n\nfieldset {\n  border: 1px solid #c0c0c0;\n  margin: 0 2px;\n  padding: 0.35em 0.625em 0.75em;\n}\n\n//\n// 1. Correct `color` not being inherited in IE 8/9/10/11.\n// 2. Remove padding so people aren't caught out if they zero out fieldsets.\n//\n\nlegend {\n  border: 0; // 1\n  padding: 0; // 2\n}\n\n//\n// Remove default vertical scrollbar in IE 8/9/10/11.\n//\n\ntextarea {\n  overflow: auto;\n}\n\n//\n// Don't inherit the `font-weight` (applied by a rule above).\n// NOTE: the default cannot safely be changed in Chrome and Safari on OS X.\n//\n\noptgroup {\n  font-weight: bold;\n}\n\n// Tables\n// ==========================================================================\n\n//\n// Remove most spacing between table cells.\n//\n\ntable {\n  border-collapse: collapse;\n  border-spacing: 0;\n}\n\ntd,\nth {\n  padding: 0;\n}\n","/*! Source: https://github.com/h5bp/html5-boilerplate/blob/master/src/css/main.css */\n\n// ==========================================================================\n// Print styles.\n// Inlined to avoid the additional HTTP request: h5bp.com/r\n// ==========================================================================\n\n@media print {\n    *,\n    *:before,\n    *:after {\n        background: transparent !important;\n        color: #000 !important; // Black prints faster: h5bp.com/s\n        box-shadow: none !important;\n        text-shadow: none !important;\n    }\n\n    a,\n    a:visited {\n        text-decoration: underline;\n    }\n\n    a[href]:after {\n        content: \" (\" attr(href) \")\";\n    }\n\n    abbr[title]:after {\n        content: \" (\" attr(title) \")\";\n    }\n\n    // Don't show links that are fragment identifiers,\n    // or use the `javascript:` pseudo protocol\n    a[href^=\"#\"]:after,\n    a[href^=\"javascript:\"]:after {\n        content: \"\";\n    }\n\n    pre,\n    blockquote {\n        border: 1px solid #999;\n        page-break-inside: avoid;\n    }\n\n    thead {\n        display: table-header-group; // h5bp.com/t\n    }\n\n    tr,\n    img {\n        page-break-inside: avoid;\n    }\n\n    img {\n        max-width: 100% !important;\n    }\n\n    p,\n    h2,\n    h3 {\n        orphans: 3;\n        widows: 3;\n    }\n\n    h2,\n    h3 {\n        page-break-after: avoid;\n    }\n\n    // Bootstrap specific changes start\n\n    // Bootstrap components\n    .navbar {\n        display: none;\n    }\n    .btn,\n    .dropup > .btn {\n        > .caret {\n            border-top-color: #000 !important;\n        }\n    }\n    .label {\n        border: 1px solid #000;\n    }\n\n    .table {\n        border-collapse: collapse !important;\n\n        td,\n        th {\n            background-color: #fff !important;\n        }\n    }\n    .table-bordered {\n        th,\n        td {\n            border: 1px solid #ddd !important;\n        }\n    }\n\n    // Bootstrap specific changes end\n}\n","//\n// Glyphicons for Bootstrap\n//\n// Since icons are fonts, they can be placed anywhere text is placed and are\n// thus automatically sized to match the surrounding child. To use, create an\n// inline element with the appropriate classes, like so:\n//\n//  Star\n\n// Import the fonts\n@font-face {\n  font-family: 'Glyphicons Halflings';\n  src: url('@{icon-font-path}@{icon-font-name}.eot');\n  src: url('@{icon-font-path}@{icon-font-name}.eot?#iefix') format('embedded-opentype'),\n       url('@{icon-font-path}@{icon-font-name}.woff2') format('woff2'),\n       url('@{icon-font-path}@{icon-font-name}.woff') format('woff'),\n       url('@{icon-font-path}@{icon-font-name}.ttf') format('truetype'),\n       url('@{icon-font-path}@{icon-font-name}.svg#@{icon-font-svg-id}') format('svg');\n}\n\n// Catchall baseclass\n.glyphicon {\n  position: relative;\n  top: 1px;\n  display: inline-block;\n  font-family: 'Glyphicons Halflings';\n  font-style: normal;\n  font-weight: normal;\n  line-height: 1;\n  -webkit-font-smoothing: antialiased;\n  -moz-osx-font-smoothing: grayscale;\n}\n\n// Individual icons\n.glyphicon-asterisk               { &:before { content: \"\\002a\"; } }\n.glyphicon-plus                   { &:before { content: \"\\002b\"; } }\n.glyphicon-euro,\n.glyphicon-eur                    { &:before { content: \"\\20ac\"; } }\n.glyphicon-minus                  { &:before { content: \"\\2212\"; } }\n.glyphicon-cloud                  { &:before { content: \"\\2601\"; } }\n.glyphicon-envelope               { &:before { content: \"\\2709\"; } }\n.glyphicon-pencil                 { &:before { content: \"\\270f\"; } }\n.glyphicon-glass                  { &:before { content: \"\\e001\"; } }\n.glyphicon-music                  { &:before { content: \"\\e002\"; } }\n.glyphicon-search                 { &:before { content: \"\\e003\"; } }\n.glyphicon-heart                  { &:before { content: \"\\e005\"; } }\n.glyphicon-star                   { &:before { content: \"\\e006\"; } }\n.glyphicon-star-empty             { &:before { content: \"\\e007\"; } }\n.glyphicon-user                   { &:before { content: \"\\e008\"; } }\n.glyphicon-film                   { &:before { content: \"\\e009\"; } }\n.glyphicon-th-large               { &:before { content: \"\\e010\"; } }\n.glyphicon-th                     { &:before { content: \"\\e011\"; } }\n.glyphicon-th-list                { &:before { content: \"\\e012\"; } }\n.glyphicon-ok                     { &:before { content: \"\\e013\"; } }\n.glyphicon-remove                 { &:before { content: \"\\e014\"; } }\n.glyphicon-zoom-in                { &:before { content: \"\\e015\"; } }\n.glyphicon-zoom-out               { &:before { content: \"\\e016\"; } }\n.glyphicon-off                    { &:before { content: \"\\e017\"; } }\n.glyphicon-signal                 { &:before { content: \"\\e018\"; } }\n.glyphicon-cog                    { &:before { content: \"\\e019\"; } }\n.glyphicon-trash                  { &:before { content: \"\\e020\"; } }\n.glyphicon-home                   { &:before { content: \"\\e021\"; } }\n.glyphicon-file                   { &:before { content: \"\\e022\"; } }\n.glyphicon-time                   { &:before { content: \"\\e023\"; } }\n.glyphicon-road                   { &:before { content: \"\\e024\"; } }\n.glyphicon-download-alt           { &:before { content: \"\\e025\"; } }\n.glyphicon-download               { &:before { content: \"\\e026\"; } }\n.glyphicon-upload                 { &:before { content: \"\\e027\"; } }\n.glyphicon-inbox                  { &:before { content: \"\\e028\"; } }\n.glyphicon-play-circle            { &:before { content: \"\\e029\"; } }\n.glyphicon-repeat                 { &:before { content: \"\\e030\"; } }\n.glyphicon-refresh                { &:before { content: \"\\e031\"; } }\n.glyphicon-list-alt               { &:before { content: \"\\e032\"; } }\n.glyphicon-lock                   { &:before { content: \"\\e033\"; } }\n.glyphicon-flag                   { &:before { content: \"\\e034\"; } }\n.glyphicon-headphones             { &:before { content: \"\\e035\"; } }\n.glyphicon-volume-off             { &:before { content: \"\\e036\"; } }\n.glyphicon-volume-down            { &:before { content: \"\\e037\"; } }\n.glyphicon-volume-up              { &:before { content: \"\\e038\"; } }\n.glyphicon-qrcode                 { &:before { content: \"\\e039\"; } }\n.glyphicon-barcode                { &:before { content: \"\\e040\"; } }\n.glyphicon-tag                    { &:before { content: \"\\e041\"; } }\n.glyphicon-tags                   { &:before { content: \"\\e042\"; } }\n.glyphicon-book                   { &:before { content: \"\\e043\"; } }\n.glyphicon-bookmark               { &:before { content: \"\\e044\"; } }\n.glyphicon-print                  { &:before { content: \"\\e045\"; } }\n.glyphicon-camera                 { &:before { content: \"\\e046\"; } }\n.glyphicon-font                   { &:before { content: \"\\e047\"; } }\n.glyphicon-bold                   { &:before { content: \"\\e048\"; } }\n.glyphicon-italic                 { &:before { content: \"\\e049\"; } }\n.glyphicon-text-height            { &:before { content: \"\\e050\"; } }\n.glyphicon-text-width             { &:before { content: \"\\e051\"; } }\n.glyphicon-align-left             { &:before { content: \"\\e052\"; } }\n.glyphicon-align-center           { &:before { content: \"\\e053\"; } }\n.glyphicon-align-right            { &:before { content: \"\\e054\"; } }\n.glyphicon-align-justify          { &:before { content: \"\\e055\"; } }\n.glyphicon-list                   { &:before { content: \"\\e056\"; } }\n.glyphicon-indent-left            { &:before { content: \"\\e057\"; } }\n.glyphicon-indent-right           { &:before { content: \"\\e058\"; } }\n.glyphicon-facetime-video         { &:before { content: \"\\e059\"; } }\n.glyphicon-picture                { &:before { content: \"\\e060\"; } }\n.glyphicon-map-marker             { &:before { content: \"\\e062\"; } }\n.glyphicon-adjust                 { &:before { content: \"\\e063\"; } }\n.glyphicon-tint                   { &:before { content: \"\\e064\"; } }\n.glyphicon-edit                   { &:before { content: \"\\e065\"; } }\n.glyphicon-share                  { &:before { content: \"\\e066\"; } }\n.glyphicon-check                  { &:before { content: \"\\e067\"; } }\n.glyphicon-move                   { &:before { content: \"\\e068\"; } }\n.glyphicon-step-backward          { &:before { content: \"\\e069\"; } }\n.glyphicon-fast-backward          { &:before { content: \"\\e070\"; } }\n.glyphicon-backward               { &:before { content: \"\\e071\"; } }\n.glyphicon-play                   { &:before { content: \"\\e072\"; } }\n.glyphicon-pause                  { &:before { content: \"\\e073\"; } }\n.glyphicon-stop                   { &:before { content: \"\\e074\"; } }\n.glyphicon-forward                { &:before { content: \"\\e075\"; } }\n.glyphicon-fast-forward           { &:before { content: \"\\e076\"; } }\n.glyphicon-step-forward           { &:before { content: \"\\e077\"; } }\n.glyphicon-eject                  { &:before { content: \"\\e078\"; } }\n.glyphicon-chevron-left           { &:before { content: \"\\e079\"; } }\n.glyphicon-chevron-right          { &:before { content: \"\\e080\"; } }\n.glyphicon-plus-sign              { &:before { content: \"\\e081\"; } }\n.glyphicon-minus-sign             { &:before { content: \"\\e082\"; } }\n.glyphicon-remove-sign            { &:before { content: \"\\e083\"; } }\n.glyphicon-ok-sign                { &:before { content: \"\\e084\"; } }\n.glyphicon-question-sign          { &:before { content: \"\\e085\"; } }\n.glyphicon-info-sign              { &:before { content: \"\\e086\"; } }\n.glyphicon-screenshot             { &:before { content: \"\\e087\"; } }\n.glyphicon-remove-circle          { &:before { content: \"\\e088\"; } }\n.glyphicon-ok-circle              { &:before { content: \"\\e089\"; } }\n.glyphicon-ban-circle             { &:before { content: \"\\e090\"; } }\n.glyphicon-arrow-left             { &:before { content: \"\\e091\"; } }\n.glyphicon-arrow-right            { &:before { content: \"\\e092\"; } }\n.glyphicon-arrow-up               { &:before { content: \"\\e093\"; } }\n.glyphicon-arrow-down             { &:before { content: \"\\e094\"; } }\n.glyphicon-share-alt              { &:before { content: \"\\e095\"; } }\n.glyphicon-resize-full            { &:before { content: \"\\e096\"; } }\n.glyphicon-resize-small           { &:before { content: \"\\e097\"; } }\n.glyphicon-exclamation-sign       { &:before { content: \"\\e101\"; } }\n.glyphicon-gift                   { &:before { content: \"\\e102\"; } }\n.glyphicon-leaf                   { &:before { content: \"\\e103\"; } }\n.glyphicon-fire                   { &:before { content: \"\\e104\"; } }\n.glyphicon-eye-open               { &:before { content: \"\\e105\"; } }\n.glyphicon-eye-close              { &:before { content: \"\\e106\"; } }\n.glyphicon-warning-sign           { &:before { content: \"\\e107\"; } }\n.glyphicon-plane                  { &:before { content: \"\\e108\"; } }\n.glyphicon-calendar               { &:before { content: \"\\e109\"; } }\n.glyphicon-random                 { &:before { content: \"\\e110\"; } }\n.glyphicon-comment                { &:before { content: \"\\e111\"; } }\n.glyphicon-magnet                 { &:before { content: \"\\e112\"; } }\n.glyphicon-chevron-up             { &:before { content: \"\\e113\"; } }\n.glyphicon-chevron-down           { &:before { content: \"\\e114\"; } }\n.glyphicon-retweet                { &:before { content: \"\\e115\"; } }\n.glyphicon-shopping-cart          { &:before { content: \"\\e116\"; } }\n.glyphicon-folder-close           { &:before { content: \"\\e117\"; } }\n.glyphicon-folder-open            { &:before { content: \"\\e118\"; } }\n.glyphicon-resize-vertical        { &:before { content: \"\\e119\"; } }\n.glyphicon-resize-horizontal      { &:before { content: \"\\e120\"; } }\n.glyphicon-hdd                    { &:before { content: \"\\e121\"; } }\n.glyphicon-bullhorn               { &:before { content: \"\\e122\"; } }\n.glyphicon-bell                   { &:before { content: \"\\e123\"; } }\n.glyphicon-certificate            { &:before { content: \"\\e124\"; } }\n.glyphicon-thumbs-up              { &:before { content: \"\\e125\"; } }\n.glyphicon-thumbs-down            { &:before { content: \"\\e126\"; } }\n.glyphicon-hand-right             { &:before { content: \"\\e127\"; } }\n.glyphicon-hand-left              { &:before { content: \"\\e128\"; } }\n.glyphicon-hand-up                { &:before { content: \"\\e129\"; } }\n.glyphicon-hand-down              { &:before { content: \"\\e130\"; } }\n.glyphicon-circle-arrow-right     { &:before { content: \"\\e131\"; } }\n.glyphicon-circle-arrow-left      { &:before { content: \"\\e132\"; } }\n.glyphicon-circle-arrow-up        { &:before { content: \"\\e133\"; } }\n.glyphicon-circle-arrow-down      { &:before { content: \"\\e134\"; } }\n.glyphicon-globe                  { &:before { content: \"\\e135\"; } }\n.glyphicon-wrench                 { &:before { content: \"\\e136\"; } }\n.glyphicon-tasks                  { &:before { content: \"\\e137\"; } }\n.glyphicon-filter                 { &:before { content: \"\\e138\"; } }\n.glyphicon-briefcase              { &:before { content: \"\\e139\"; } }\n.glyphicon-fullscreen             { &:before { content: \"\\e140\"; } }\n.glyphicon-dashboard              { &:before { content: \"\\e141\"; } }\n.glyphicon-paperclip              { &:before { content: \"\\e142\"; } }\n.glyphicon-heart-empty            { &:before { content: \"\\e143\"; } }\n.glyphicon-link                   { &:before { content: \"\\e144\"; } }\n.glyphicon-phone                  { &:before { content: \"\\e145\"; } }\n.glyphicon-pushpin                { &:before { content: \"\\e146\"; } }\n.glyphicon-usd                    { &:before { content: \"\\e148\"; } }\n.glyphicon-gbp                    { &:before { content: \"\\e149\"; } }\n.glyphicon-sort                   { &:before { content: \"\\e150\"; } }\n.glyphicon-sort-by-alphabet       { &:before { content: \"\\e151\"; } }\n.glyphicon-sort-by-alphabet-alt   { &:before { content: \"\\e152\"; } }\n.glyphicon-sort-by-order          { &:before { content: \"\\e153\"; } }\n.glyphicon-sort-by-order-alt      { &:before { content: \"\\e154\"; } }\n.glyphicon-sort-by-attributes     { &:before { content: \"\\e155\"; } }\n.glyphicon-sort-by-attributes-alt { &:before { content: \"\\e156\"; } }\n.glyphicon-unchecked              { &:before { content: \"\\e157\"; } }\n.glyphicon-expand                 { &:before { content: \"\\e158\"; } }\n.glyphicon-collapse-down          { &:before { content: \"\\e159\"; } }\n.glyphicon-collapse-up            { &:before { content: \"\\e160\"; } }\n.glyphicon-log-in                 { &:before { content: \"\\e161\"; } }\n.glyphicon-flash                  { &:before { content: \"\\e162\"; } }\n.glyphicon-log-out                { &:before { content: \"\\e163\"; } }\n.glyphicon-new-window             { &:before { content: \"\\e164\"; } }\n.glyphicon-record                 { &:before { content: \"\\e165\"; } }\n.glyphicon-save                   { &:before { content: \"\\e166\"; } }\n.glyphicon-open                   { &:before { content: \"\\e167\"; } }\n.glyphicon-saved                  { &:before { content: \"\\e168\"; } }\n.glyphicon-import                 { &:before { content: \"\\e169\"; } }\n.glyphicon-export                 { &:before { content: \"\\e170\"; } }\n.glyphicon-send                   { &:before { content: \"\\e171\"; } }\n.glyphicon-floppy-disk            { &:before { content: \"\\e172\"; } }\n.glyphicon-floppy-saved           { &:before { content: \"\\e173\"; } }\n.glyphicon-floppy-remove          { &:before { content: \"\\e174\"; } }\n.glyphicon-floppy-save            { &:before { content: \"\\e175\"; } }\n.glyphicon-floppy-open            { &:before { content: \"\\e176\"; } }\n.glyphicon-credit-card            { &:before { content: \"\\e177\"; } }\n.glyphicon-transfer               { &:before { content: \"\\e178\"; } }\n.glyphicon-cutlery                { &:before { content: \"\\e179\"; } }\n.glyphicon-header                 { &:before { content: \"\\e180\"; } }\n.glyphicon-compressed             { &:before { content: \"\\e181\"; } }\n.glyphicon-earphone               { &:before { content: \"\\e182\"; } }\n.glyphicon-phone-alt              { &:before { content: \"\\e183\"; } }\n.glyphicon-tower                  { &:before { content: \"\\e184\"; } }\n.glyphicon-stats                  { &:before { content: \"\\e185\"; } }\n.glyphicon-sd-video               { &:before { content: \"\\e186\"; } }\n.glyphicon-hd-video               { &:before { content: \"\\e187\"; } }\n.glyphicon-subtitles              { &:before { content: \"\\e188\"; } }\n.glyphicon-sound-stereo           { &:before { content: \"\\e189\"; } }\n.glyphicon-sound-dolby            { &:before { content: \"\\e190\"; } }\n.glyphicon-sound-5-1              { &:before { content: \"\\e191\"; } }\n.glyphicon-sound-6-1              { &:before { content: \"\\e192\"; } }\n.glyphicon-sound-7-1              { &:before { content: \"\\e193\"; } }\n.glyphicon-copyright-mark         { &:before { content: \"\\e194\"; } }\n.glyphicon-registration-mark      { &:before { content: \"\\e195\"; } }\n.glyphicon-cloud-download         { &:before { content: \"\\e197\"; } }\n.glyphicon-cloud-upload           { &:before { content: \"\\e198\"; } }\n.glyphicon-tree-conifer           { &:before { content: \"\\e199\"; } }\n.glyphicon-tree-deciduous         { &:before { content: \"\\e200\"; } }\n.glyphicon-cd                     { &:before { content: \"\\e201\"; } }\n.glyphicon-save-file              { &:before { content: \"\\e202\"; } }\n.glyphicon-open-file              { &:before { content: \"\\e203\"; } }\n.glyphicon-level-up               { &:before { content: \"\\e204\"; } }\n.glyphicon-copy                   { &:before { content: \"\\e205\"; } }\n.glyphicon-paste                  { &:before { content: \"\\e206\"; } }\n// The following 2 Glyphicons are omitted for the time being because\n// they currently use Unicode codepoints that are outside the\n// Basic Multilingual Plane (BMP). Older buggy versions of WebKit can't handle\n// non-BMP codepoints in CSS string escapes, and thus can't display these two icons.\n// Notably, the bug affects some older versions of the Android Browser.\n// More info: https://github.com/twbs/bootstrap/issues/10106\n// .glyphicon-door                   { &:before { content: \"\\1f6aa\"; } }\n// .glyphicon-key                    { &:before { content: \"\\1f511\"; } }\n.glyphicon-alert                  { &:before { content: \"\\e209\"; } }\n.glyphicon-equalizer              { &:before { content: \"\\e210\"; } }\n.glyphicon-king                   { &:before { content: \"\\e211\"; } }\n.glyphicon-queen                  { &:before { content: \"\\e212\"; } }\n.glyphicon-pawn                   { &:before { content: \"\\e213\"; } }\n.glyphicon-bishop                 { &:before { content: \"\\e214\"; } }\n.glyphicon-knight                 { &:before { content: \"\\e215\"; } }\n.glyphicon-baby-formula           { &:before { content: \"\\e216\"; } }\n.glyphicon-tent                   { &:before { content: \"\\26fa\"; } }\n.glyphicon-blackboard             { &:before { content: \"\\e218\"; } }\n.glyphicon-bed                    { &:before { content: \"\\e219\"; } }\n.glyphicon-apple                  { &:before { content: \"\\f8ff\"; } }\n.glyphicon-erase                  { &:before { content: \"\\e221\"; } }\n.glyphicon-hourglass              { &:before { content: \"\\231b\"; } }\n.glyphicon-lamp                   { &:before { content: \"\\e223\"; } }\n.glyphicon-duplicate              { &:before { content: \"\\e224\"; } }\n.glyphicon-piggy-bank             { &:before { content: \"\\e225\"; } }\n.glyphicon-scissors               { &:before { content: \"\\e226\"; } }\n.glyphicon-bitcoin                { &:before { content: \"\\e227\"; } }\n.glyphicon-btc                    { &:before { content: \"\\e227\"; } }\n.glyphicon-xbt                    { &:before { content: \"\\e227\"; } }\n.glyphicon-yen                    { &:before { content: \"\\00a5\"; } }\n.glyphicon-jpy                    { &:before { content: \"\\00a5\"; } }\n.glyphicon-ruble                  { &:before { content: \"\\20bd\"; } }\n.glyphicon-rub                    { &:before { content: \"\\20bd\"; } }\n.glyphicon-scale                  { &:before { content: \"\\e230\"; } }\n.glyphicon-ice-lolly              { &:before { content: \"\\e231\"; } }\n.glyphicon-ice-lolly-tasted       { &:before { content: \"\\e232\"; } }\n.glyphicon-education              { &:before { content: \"\\e233\"; } }\n.glyphicon-option-horizontal      { &:before { content: \"\\e234\"; } }\n.glyphicon-option-vertical        { &:before { content: \"\\e235\"; } }\n.glyphicon-menu-hamburger         { &:before { content: \"\\e236\"; } }\n.glyphicon-modal-window           { &:before { content: \"\\e237\"; } }\n.glyphicon-oil                    { &:before { content: \"\\e238\"; } }\n.glyphicon-grain                  { &:before { content: \"\\e239\"; } }\n.glyphicon-sunglasses             { &:before { content: \"\\e240\"; } }\n.glyphicon-text-size              { &:before { content: \"\\e241\"; } }\n.glyphicon-text-color             { &:before { content: \"\\e242\"; } }\n.glyphicon-text-background        { &:before { content: \"\\e243\"; } }\n.glyphicon-object-align-top       { &:before { content: \"\\e244\"; } }\n.glyphicon-object-align-bottom    { &:before { content: \"\\e245\"; } }\n.glyphicon-object-align-horizontal{ &:before { content: \"\\e246\"; } }\n.glyphicon-object-align-left      { &:before { content: \"\\e247\"; } }\n.glyphicon-object-align-vertical  { &:before { content: \"\\e248\"; } }\n.glyphicon-object-align-right     { &:before { content: \"\\e249\"; } }\n.glyphicon-triangle-right         { &:before { content: \"\\e250\"; } }\n.glyphicon-triangle-left          { &:before { content: \"\\e251\"; } }\n.glyphicon-triangle-bottom        { &:before { content: \"\\e252\"; } }\n.glyphicon-triangle-top           { &:before { content: \"\\e253\"; } }\n.glyphicon-console                { &:before { content: \"\\e254\"; } }\n.glyphicon-superscript            { &:before { content: \"\\e255\"; } }\n.glyphicon-subscript              { &:before { content: \"\\e256\"; } }\n.glyphicon-menu-left              { &:before { content: \"\\e257\"; } }\n.glyphicon-menu-right             { &:before { content: \"\\e258\"; } }\n.glyphicon-menu-down              { &:before { content: \"\\e259\"; } }\n.glyphicon-menu-up                { &:before { content: \"\\e260\"; } }\n","//\n// Scaffolding\n// --------------------------------------------------\n\n\n// Reset the box-sizing\n//\n// Heads up! This reset may cause conflicts with some third-party widgets.\n// For recommendations on resolving such conflicts, see\n// http://getbootstrap.com/getting-started/#third-box-sizing\n* {\n  .box-sizing(border-box);\n}\n*:before,\n*:after {\n  .box-sizing(border-box);\n}\n\n\n// Body reset\n\nhtml {\n  font-size: 10px;\n  -webkit-tap-highlight-color: rgba(0,0,0,0);\n}\n\nbody {\n  font-family: @font-family-base;\n  font-size: @font-size-base;\n  line-height: @line-height-base;\n  color: @text-color;\n  background-color: @body-bg;\n}\n\n// Reset fonts for relevant elements\ninput,\nbutton,\nselect,\ntextarea {\n  font-family: inherit;\n  font-size: inherit;\n  line-height: inherit;\n}\n\n\n// Links\n\na {\n  color: @link-color;\n  text-decoration: none;\n\n  &:hover,\n  &:focus {\n    color: @link-hover-color;\n    text-decoration: @link-hover-decoration;\n  }\n\n  &:focus {\n    .tab-focus();\n  }\n}\n\n\n// Figures\n//\n// We reset this here because previously Normalize had no `figure` margins. This\n// ensures we don't break anyone's use of the element.\n\nfigure {\n  margin: 0;\n}\n\n\n// Images\n\nimg {\n  vertical-align: middle;\n}\n\n// Responsive images (ensure images don't scale beyond their parents)\n.img-responsive {\n  .img-responsive();\n}\n\n// Rounded corners\n.img-rounded {\n  border-radius: @border-radius-large;\n}\n\n// Image thumbnails\n//\n// Heads up! This is mixin-ed into thumbnails.less for `.thumbnail`.\n.img-thumbnail {\n  padding: @thumbnail-padding;\n  line-height: @line-height-base;\n  background-color: @thumbnail-bg;\n  border: 1px solid @thumbnail-border;\n  border-radius: @thumbnail-border-radius;\n  .transition(all .2s ease-in-out);\n\n  // Keep them at most 100% wide\n  .img-responsive(inline-block);\n}\n\n// Perfect circle\n.img-circle {\n  border-radius: 50%; // set radius in percents\n}\n\n\n// Horizontal rules\n\nhr {\n  margin-top:    @line-height-computed;\n  margin-bottom: @line-height-computed;\n  border: 0;\n  border-top: 1px solid @hr-border;\n}\n\n\n// Only display content to screen readers\n//\n// See: http://a11yproject.com/posts/how-to-hide-content\n\n.sr-only {\n  position: absolute;\n  width: 1px;\n  height: 1px;\n  margin: -1px;\n  padding: 0;\n  overflow: hidden;\n  clip: rect(0,0,0,0);\n  border: 0;\n}\n\n// Use in conjunction with .sr-only to only display content when it's focused.\n// Useful for \"Skip to main content\" links; see http://www.w3.org/TR/2013/NOTE-WCAG20-TECHS-20130905/G1\n// Credit: HTML5 Boilerplate\n\n.sr-only-focusable {\n  &:active,\n  &:focus {\n    position: static;\n    width: auto;\n    height: auto;\n    margin: 0;\n    overflow: visible;\n    clip: auto;\n  }\n}\n\n\n// iOS \"clickable elements\" fix for role=\"button\"\n//\n// Fixes \"clickability\" issue (and more generally, the firing of events such as focus as well)\n// for traditionally non-focusable elements with role=\"button\"\n// see https://developer.mozilla.org/en-US/docs/Web/Events/click#Safari_Mobile\n\n[role=\"button\"] {\n  cursor: pointer;\n}\n","// Vendor Prefixes\n//\n// All vendor mixins are deprecated as of v3.2.0 due to the introduction of\n// Autoprefixer in our Gruntfile. They have been removed in v4.\n\n// - Animations\n// - Backface visibility\n// - Box shadow\n// - Box sizing\n// - Content columns\n// - Hyphens\n// - Placeholder text\n// - Transformations\n// - Transitions\n// - User Select\n\n\n// Animations\n.animation(@animation) {\n  -webkit-animation: @animation;\n       -o-animation: @animation;\n          animation: @animation;\n}\n.animation-name(@name) {\n  -webkit-animation-name: @name;\n          animation-name: @name;\n}\n.animation-duration(@duration) {\n  -webkit-animation-duration: @duration;\n          animation-duration: @duration;\n}\n.animation-timing-function(@timing-function) {\n  -webkit-animation-timing-function: @timing-function;\n          animation-timing-function: @timing-function;\n}\n.animation-delay(@delay) {\n  -webkit-animation-delay: @delay;\n          animation-delay: @delay;\n}\n.animation-iteration-count(@iteration-count) {\n  -webkit-animation-iteration-count: @iteration-count;\n          animation-iteration-count: @iteration-count;\n}\n.animation-direction(@direction) {\n  -webkit-animation-direction: @direction;\n          animation-direction: @direction;\n}\n.animation-fill-mode(@fill-mode) {\n  -webkit-animation-fill-mode: @fill-mode;\n          animation-fill-mode: @fill-mode;\n}\n\n// Backface visibility\n// Prevent browsers from flickering when using CSS 3D transforms.\n// Default value is `visible`, but can be changed to `hidden`\n\n.backface-visibility(@visibility) {\n  -webkit-backface-visibility: @visibility;\n     -moz-backface-visibility: @visibility;\n          backface-visibility: @visibility;\n}\n\n// Drop shadows\n//\n// Note: Deprecated `.box-shadow()` as of v3.1.0 since all of Bootstrap's\n// supported browsers that have box shadow capabilities now support it.\n\n.box-shadow(@shadow) {\n  -webkit-box-shadow: @shadow; // iOS <4.3 & Android <4.1\n          box-shadow: @shadow;\n}\n\n// Box sizing\n.box-sizing(@boxmodel) {\n  -webkit-box-sizing: @boxmodel;\n     -moz-box-sizing: @boxmodel;\n          box-sizing: @boxmodel;\n}\n\n// CSS3 Content Columns\n.content-columns(@column-count; @column-gap: @grid-gutter-width) {\n  -webkit-column-count: @column-count;\n     -moz-column-count: @column-count;\n          column-count: @column-count;\n  -webkit-column-gap: @column-gap;\n     -moz-column-gap: @column-gap;\n          column-gap: @column-gap;\n}\n\n// Optional hyphenation\n.hyphens(@mode: auto) {\n  word-wrap: break-word;\n  -webkit-hyphens: @mode;\n     -moz-hyphens: @mode;\n      -ms-hyphens: @mode; // IE10+\n       -o-hyphens: @mode;\n          hyphens: @mode;\n}\n\n// Placeholder text\n.placeholder(@color: @input-color-placeholder) {\n  // Firefox\n  &::-moz-placeholder {\n    color: @color;\n    opacity: 1; // Override Firefox's unusual default opacity; see https://github.com/twbs/bootstrap/pull/11526\n  }\n  &:-ms-input-placeholder { color: @color; } // Internet Explorer 10+\n  &::-webkit-input-placeholder  { color: @color; } // Safari and Chrome\n}\n\n// Transformations\n.scale(@ratio) {\n  -webkit-transform: scale(@ratio);\n      -ms-transform: scale(@ratio); // IE9 only\n       -o-transform: scale(@ratio);\n          transform: scale(@ratio);\n}\n.scale(@ratioX; @ratioY) {\n  -webkit-transform: scale(@ratioX, @ratioY);\n      -ms-transform: scale(@ratioX, @ratioY); // IE9 only\n       -o-transform: scale(@ratioX, @ratioY);\n          transform: scale(@ratioX, @ratioY);\n}\n.scaleX(@ratio) {\n  -webkit-transform: scaleX(@ratio);\n      -ms-transform: scaleX(@ratio); // IE9 only\n       -o-transform: scaleX(@ratio);\n          transform: scaleX(@ratio);\n}\n.scaleY(@ratio) {\n  -webkit-transform: scaleY(@ratio);\n      -ms-transform: scaleY(@ratio); // IE9 only\n       -o-transform: scaleY(@ratio);\n          transform: scaleY(@ratio);\n}\n.skew(@x; @y) {\n  -webkit-transform: skewX(@x) skewY(@y);\n      -ms-transform: skewX(@x) skewY(@y); // See https://github.com/twbs/bootstrap/issues/4885; IE9+\n       -o-transform: skewX(@x) skewY(@y);\n          transform: skewX(@x) skewY(@y);\n}\n.translate(@x; @y) {\n  -webkit-transform: translate(@x, @y);\n      -ms-transform: translate(@x, @y); // IE9 only\n       -o-transform: translate(@x, @y);\n          transform: translate(@x, @y);\n}\n.translate3d(@x; @y; @z) {\n  -webkit-transform: translate3d(@x, @y, @z);\n          transform: translate3d(@x, @y, @z);\n}\n.rotate(@degrees) {\n  -webkit-transform: rotate(@degrees);\n      -ms-transform: rotate(@degrees); // IE9 only\n       -o-transform: rotate(@degrees);\n          transform: rotate(@degrees);\n}\n.rotateX(@degrees) {\n  -webkit-transform: rotateX(@degrees);\n      -ms-transform: rotateX(@degrees); // IE9 only\n       -o-transform: rotateX(@degrees);\n          transform: rotateX(@degrees);\n}\n.rotateY(@degrees) {\n  -webkit-transform: rotateY(@degrees);\n      -ms-transform: rotateY(@degrees); // IE9 only\n       -o-transform: rotateY(@degrees);\n          transform: rotateY(@degrees);\n}\n.perspective(@perspective) {\n  -webkit-perspective: @perspective;\n     -moz-perspective: @perspective;\n          perspective: @perspective;\n}\n.perspective-origin(@perspective) {\n  -webkit-perspective-origin: @perspective;\n     -moz-perspective-origin: @perspective;\n          perspective-origin: @perspective;\n}\n.transform-origin(@origin) {\n  -webkit-transform-origin: @origin;\n     -moz-transform-origin: @origin;\n      -ms-transform-origin: @origin; // IE9 only\n          transform-origin: @origin;\n}\n\n\n// Transitions\n\n.transition(@transition) {\n  -webkit-transition: @transition;\n       -o-transition: @transition;\n          transition: @transition;\n}\n.transition-property(@transition-property) {\n  -webkit-transition-property: @transition-property;\n          transition-property: @transition-property;\n}\n.transition-delay(@transition-delay) {\n  -webkit-transition-delay: @transition-delay;\n          transition-delay: @transition-delay;\n}\n.transition-duration(@transition-duration) {\n  -webkit-transition-duration: @transition-duration;\n          transition-duration: @transition-duration;\n}\n.transition-timing-function(@timing-function) {\n  -webkit-transition-timing-function: @timing-function;\n          transition-timing-function: @timing-function;\n}\n.transition-transform(@transition) {\n  -webkit-transition: -webkit-transform @transition;\n     -moz-transition: -moz-transform @transition;\n       -o-transition: -o-transform @transition;\n          transition: transform @transition;\n}\n\n\n// User select\n// For selecting text on the page\n\n.user-select(@select) {\n  -webkit-user-select: @select;\n     -moz-user-select: @select;\n      -ms-user-select: @select; // IE10+\n          user-select: @select;\n}\n","// WebKit-style focus\n\n.tab-focus() {\n  // WebKit-specific. Other browsers will keep their default outline style.\n  // (Initially tried to also force default via `outline: initial`,\n  // but that seems to erroneously remove the outline in Firefox altogether.)\n  outline: 5px auto -webkit-focus-ring-color;\n  outline-offset: -2px;\n}\n","// Image Mixins\n// - Responsive image\n// - Retina image\n\n\n// Responsive image\n//\n// Keep images from scaling beyond the width of their parents.\n.img-responsive(@display: block) {\n  display: @display;\n  max-width: 100%; // Part 1: Set a maximum relative to the parent\n  height: auto; // Part 2: Scale the height according to the width, otherwise you get stretching\n}\n\n\n// Retina image\n//\n// Short retina mixin for setting background-image and -size. Note that the\n// spelling of `min--moz-device-pixel-ratio` is intentional.\n.img-retina(@file-1x; @file-2x; @width-1x; @height-1x) {\n  background-image: url(\"@{file-1x}\");\n\n  @media\n  only screen and (-webkit-min-device-pixel-ratio: 2),\n  only screen and (   min--moz-device-pixel-ratio: 2),\n  only screen and (     -o-min-device-pixel-ratio: 2/1),\n  only screen and (        min-device-pixel-ratio: 2),\n  only screen and (                min-resolution: 192dpi),\n  only screen and (                min-resolution: 2dppx) {\n    background-image: url(\"@{file-2x}\");\n    background-size: @width-1x @height-1x;\n  }\n}\n","//\n// Typography\n// --------------------------------------------------\n\n\n// Headings\n// -------------------------\n\nh1, h2, h3, h4, h5, h6,\n.h1, .h2, .h3, .h4, .h5, .h6 {\n  font-family: @headings-font-family;\n  font-weight: @headings-font-weight;\n  line-height: @headings-line-height;\n  color: @headings-color;\n\n  small,\n  .small {\n    font-weight: normal;\n    line-height: 1;\n    color: @headings-small-color;\n  }\n}\n\nh1, .h1,\nh2, .h2,\nh3, .h3 {\n  margin-top: @line-height-computed;\n  margin-bottom: (@line-height-computed / 2);\n\n  small,\n  .small {\n    font-size: 65%;\n  }\n}\nh4, .h4,\nh5, .h5,\nh6, .h6 {\n  margin-top: (@line-height-computed / 2);\n  margin-bottom: (@line-height-computed / 2);\n\n  small,\n  .small {\n    font-size: 75%;\n  }\n}\n\nh1, .h1 { font-size: @font-size-h1; }\nh2, .h2 { font-size: @font-size-h2; }\nh3, .h3 { font-size: @font-size-h3; }\nh4, .h4 { font-size: @font-size-h4; }\nh5, .h5 { font-size: @font-size-h5; }\nh6, .h6 { font-size: @font-size-h6; }\n\n\n// Body text\n// -------------------------\n\np {\n  margin: 0 0 (@line-height-computed / 2);\n}\n\n.lead {\n  margin-bottom: @line-height-computed;\n  font-size: floor((@font-size-base * 1.15));\n  font-weight: 300;\n  line-height: 1.4;\n\n  @media (min-width: @screen-sm-min) {\n    font-size: (@font-size-base * 1.5);\n  }\n}\n\n\n// Emphasis & misc\n// -------------------------\n\n// Ex: (12px small font / 14px base font) * 100% = about 85%\nsmall,\n.small {\n  font-size: floor((100% * @font-size-small / @font-size-base));\n}\n\nmark,\n.mark {\n  background-color: @state-warning-bg;\n  padding: .2em;\n}\n\n// Alignment\n.text-left           { text-align: left; }\n.text-right          { text-align: right; }\n.text-center         { text-align: center; }\n.text-justify        { text-align: justify; }\n.text-nowrap         { white-space: nowrap; }\n\n// Transformation\n.text-lowercase      { text-transform: lowercase; }\n.text-uppercase      { text-transform: uppercase; }\n.text-capitalize     { text-transform: capitalize; }\n\n// Contextual colors\n.text-muted {\n  color: @text-muted;\n}\n.text-primary {\n  .text-emphasis-variant(@brand-primary);\n}\n.text-success {\n  .text-emphasis-variant(@state-success-text);\n}\n.text-info {\n  .text-emphasis-variant(@state-info-text);\n}\n.text-warning {\n  .text-emphasis-variant(@state-warning-text);\n}\n.text-danger {\n  .text-emphasis-variant(@state-danger-text);\n}\n\n// Contextual backgrounds\n// For now we'll leave these alongside the text classes until v4 when we can\n// safely shift things around (per SemVer rules).\n.bg-primary {\n  // Given the contrast here, this is the only class to have its color inverted\n  // automatically.\n  color: #fff;\n  .bg-variant(@brand-primary);\n}\n.bg-success {\n  .bg-variant(@state-success-bg);\n}\n.bg-info {\n  .bg-variant(@state-info-bg);\n}\n.bg-warning {\n  .bg-variant(@state-warning-bg);\n}\n.bg-danger {\n  .bg-variant(@state-danger-bg);\n}\n\n\n// Page header\n// -------------------------\n\n.page-header {\n  padding-bottom: ((@line-height-computed / 2) - 1);\n  margin: (@line-height-computed * 2) 0 @line-height-computed;\n  border-bottom: 1px solid @page-header-border-color;\n}\n\n\n// Lists\n// -------------------------\n\n// Unordered and Ordered lists\nul,\nol {\n  margin-top: 0;\n  margin-bottom: (@line-height-computed / 2);\n  ul,\n  ol {\n    margin-bottom: 0;\n  }\n}\n\n// List options\n\n// Unstyled keeps list items block level, just removes default browser padding and list-style\n.list-unstyled {\n  padding-left: 0;\n  list-style: none;\n}\n\n// Inline turns list items into inline-block\n.list-inline {\n  .list-unstyled();\n  margin-left: -5px;\n\n  > li {\n    display: inline-block;\n    padding-left: 5px;\n    padding-right: 5px;\n  }\n}\n\n// Description Lists\ndl {\n  margin-top: 0; // Remove browser default\n  margin-bottom: @line-height-computed;\n}\ndt,\ndd {\n  line-height: @line-height-base;\n}\ndt {\n  font-weight: bold;\n}\ndd {\n  margin-left: 0; // Undo browser default\n}\n\n// Horizontal description lists\n//\n// Defaults to being stacked without any of the below styles applied, until the\n// grid breakpoint is reached (default of ~768px).\n\n.dl-horizontal {\n  dd {\n    &:extend(.clearfix all); // Clear the floated `dt` if an empty `dd` is present\n  }\n\n  @media (min-width: @dl-horizontal-breakpoint) {\n    dt {\n      float: left;\n      width: (@dl-horizontal-offset - 20);\n      clear: left;\n      text-align: right;\n      .text-overflow();\n    }\n    dd {\n      margin-left: @dl-horizontal-offset;\n    }\n  }\n}\n\n\n// Misc\n// -------------------------\n\n// Abbreviations and acronyms\nabbr[title],\n// Add data-* attribute to help out our tooltip plugin, per https://github.com/twbs/bootstrap/issues/5257\nabbr[data-original-title] {\n  cursor: help;\n  border-bottom: 1px dotted @abbr-border-color;\n}\n.initialism {\n  font-size: 90%;\n  .text-uppercase();\n}\n\n// Blockquotes\nblockquote {\n  padding: (@line-height-computed / 2) @line-height-computed;\n  margin: 0 0 @line-height-computed;\n  font-size: @blockquote-font-size;\n  border-left: 5px solid @blockquote-border-color;\n\n  p,\n  ul,\n  ol {\n    &:last-child {\n      margin-bottom: 0;\n    }\n  }\n\n  // Note: Deprecated small and .small as of v3.1.0\n  // Context: https://github.com/twbs/bootstrap/issues/11660\n  footer,\n  small,\n  .small {\n    display: block;\n    font-size: 80%; // back to default font-size\n    line-height: @line-height-base;\n    color: @blockquote-small-color;\n\n    &:before {\n      content: '\\2014 \\00A0'; // em dash, nbsp\n    }\n  }\n}\n\n// Opposite alignment of blockquote\n//\n// Heads up: `blockquote.pull-right` has been deprecated as of v3.1.0.\n.blockquote-reverse,\nblockquote.pull-right {\n  padding-right: 15px;\n  padding-left: 0;\n  border-right: 5px solid @blockquote-border-color;\n  border-left: 0;\n  text-align: right;\n\n  // Account for citation\n  footer,\n  small,\n  .small {\n    &:before { content: ''; }\n    &:after {\n      content: '\\00A0 \\2014'; // nbsp, em dash\n    }\n  }\n}\n\n// Addresses\naddress {\n  margin-bottom: @line-height-computed;\n  font-style: normal;\n  line-height: @line-height-base;\n}\n","// Typography\n\n.text-emphasis-variant(@color) {\n  color: @color;\n  a&:hover,\n  a&:focus {\n    color: darken(@color, 10%);\n  }\n}\n","// Contextual backgrounds\n\n.bg-variant(@color) {\n  background-color: @color;\n  a&:hover,\n  a&:focus {\n    background-color: darken(@color, 10%);\n  }\n}\n","// Text overflow\n// Requires inline-block or block for proper styling\n\n.text-overflow() {\n  overflow: hidden;\n  text-overflow: ellipsis;\n  white-space: nowrap;\n}\n","//\n// Code (inline and block)\n// --------------------------------------------------\n\n\n// Inline and block code styles\ncode,\nkbd,\npre,\nsamp {\n  font-family: @font-family-monospace;\n}\n\n// Inline code\ncode {\n  padding: 2px 4px;\n  font-size: 90%;\n  color: @code-color;\n  background-color: @code-bg;\n  border-radius: @border-radius-base;\n}\n\n// User input typically entered via keyboard\nkbd {\n  padding: 2px 4px;\n  font-size: 90%;\n  color: @kbd-color;\n  background-color: @kbd-bg;\n  border-radius: @border-radius-small;\n  box-shadow: inset 0 -1px 0 rgba(0,0,0,.25);\n\n  kbd {\n    padding: 0;\n    font-size: 100%;\n    font-weight: bold;\n    box-shadow: none;\n  }\n}\n\n// Blocks of code\npre {\n  display: block;\n  padding: ((@line-height-computed - 1) / 2);\n  margin: 0 0 (@line-height-computed / 2);\n  font-size: (@font-size-base - 1); // 14px to 13px\n  line-height: @line-height-base;\n  word-break: break-all;\n  word-wrap: break-word;\n  color: @pre-color;\n  background-color: @pre-bg;\n  border: 1px solid @pre-border-color;\n  border-radius: @border-radius-base;\n\n  // Account for some code outputs that place code tags in pre tags\n  code {\n    padding: 0;\n    font-size: inherit;\n    color: inherit;\n    white-space: pre-wrap;\n    background-color: transparent;\n    border-radius: 0;\n  }\n}\n\n// Enable scrollable blocks of code\n.pre-scrollable {\n  max-height: @pre-scrollable-max-height;\n  overflow-y: scroll;\n}\n","//\n// Grid system\n// --------------------------------------------------\n\n\n// Container widths\n//\n// Set the container width, and override it for fixed navbars in media queries.\n\n.container {\n  .container-fixed();\n\n  @media (min-width: @screen-sm-min) {\n    width: @container-sm;\n  }\n  @media (min-width: @screen-md-min) {\n    width: @container-md;\n  }\n  @media (min-width: @screen-lg-min) {\n    width: @container-lg;\n  }\n}\n\n\n// Fluid container\n//\n// Utilizes the mixin meant for fixed width containers, but without any defined\n// width for fluid, full width layouts.\n\n.container-fluid {\n  .container-fixed();\n}\n\n\n// Row\n//\n// Rows contain and clear the floats of your columns.\n\n.row {\n  .make-row();\n}\n\n\n// Columns\n//\n// Common styles for small and large grid columns\n\n.make-grid-columns();\n\n\n// Extra small grid\n//\n// Columns, offsets, pushes, and pulls for extra small devices like\n// smartphones.\n\n.make-grid(xs);\n\n\n// Small grid\n//\n// Columns, offsets, pushes, and pulls for the small device range, from phones\n// to tablets.\n\n@media (min-width: @screen-sm-min) {\n  .make-grid(sm);\n}\n\n\n// Medium grid\n//\n// Columns, offsets, pushes, and pulls for the desktop device range.\n\n@media (min-width: @screen-md-min) {\n  .make-grid(md);\n}\n\n\n// Large grid\n//\n// Columns, offsets, pushes, and pulls for the large desktop device range.\n\n@media (min-width: @screen-lg-min) {\n  .make-grid(lg);\n}\n","// Grid system\n//\n// Generate semantic grid columns with these mixins.\n\n// Centered container element\n.container-fixed(@gutter: @grid-gutter-width) {\n  margin-right: auto;\n  margin-left: auto;\n  padding-left:  floor((@gutter / 2));\n  padding-right: ceil((@gutter / 2));\n  &:extend(.clearfix all);\n}\n\n// Creates a wrapper for a series of columns\n.make-row(@gutter: @grid-gutter-width) {\n  margin-left:  ceil((@gutter / -2));\n  margin-right: floor((@gutter / -2));\n  &:extend(.clearfix all);\n}\n\n// Generate the extra small columns\n.make-xs-column(@columns; @gutter: @grid-gutter-width) {\n  position: relative;\n  float: left;\n  width: percentage((@columns / @grid-columns));\n  min-height: 1px;\n  padding-left:  (@gutter / 2);\n  padding-right: (@gutter / 2);\n}\n.make-xs-column-offset(@columns) {\n  margin-left: percentage((@columns / @grid-columns));\n}\n.make-xs-column-push(@columns) {\n  left: percentage((@columns / @grid-columns));\n}\n.make-xs-column-pull(@columns) {\n  right: percentage((@columns / @grid-columns));\n}\n\n// Generate the small columns\n.make-sm-column(@columns; @gutter: @grid-gutter-width) {\n  position: relative;\n  min-height: 1px;\n  padding-left:  (@gutter / 2);\n  padding-right: (@gutter / 2);\n\n  @media (min-width: @screen-sm-min) {\n    float: left;\n    width: percentage((@columns / @grid-columns));\n  }\n}\n.make-sm-column-offset(@columns) {\n  @media (min-width: @screen-sm-min) {\n    margin-left: percentage((@columns / @grid-columns));\n  }\n}\n.make-sm-column-push(@columns) {\n  @media (min-width: @screen-sm-min) {\n    left: percentage((@columns / @grid-columns));\n  }\n}\n.make-sm-column-pull(@columns) {\n  @media (min-width: @screen-sm-min) {\n    right: percentage((@columns / @grid-columns));\n  }\n}\n\n// Generate the medium columns\n.make-md-column(@columns; @gutter: @grid-gutter-width) {\n  position: relative;\n  min-height: 1px;\n  padding-left:  (@gutter / 2);\n  padding-right: (@gutter / 2);\n\n  @media (min-width: @screen-md-min) {\n    float: left;\n    width: percentage((@columns / @grid-columns));\n  }\n}\n.make-md-column-offset(@columns) {\n  @media (min-width: @screen-md-min) {\n    margin-left: percentage((@columns / @grid-columns));\n  }\n}\n.make-md-column-push(@columns) {\n  @media (min-width: @screen-md-min) {\n    left: percentage((@columns / @grid-columns));\n  }\n}\n.make-md-column-pull(@columns) {\n  @media (min-width: @screen-md-min) {\n    right: percentage((@columns / @grid-columns));\n  }\n}\n\n// Generate the large columns\n.make-lg-column(@columns; @gutter: @grid-gutter-width) {\n  position: relative;\n  min-height: 1px;\n  padding-left:  (@gutter / 2);\n  padding-right: (@gutter / 2);\n\n  @media (min-width: @screen-lg-min) {\n    float: left;\n    width: percentage((@columns / @grid-columns));\n  }\n}\n.make-lg-column-offset(@columns) {\n  @media (min-width: @screen-lg-min) {\n    margin-left: percentage((@columns / @grid-columns));\n  }\n}\n.make-lg-column-push(@columns) {\n  @media (min-width: @screen-lg-min) {\n    left: percentage((@columns / @grid-columns));\n  }\n}\n.make-lg-column-pull(@columns) {\n  @media (min-width: @screen-lg-min) {\n    right: percentage((@columns / @grid-columns));\n  }\n}\n","// Framework grid generation\n//\n// Used only by Bootstrap to generate the correct number of grid classes given\n// any value of `@grid-columns`.\n\n.make-grid-columns() {\n  // Common styles for all sizes of grid columns, widths 1-12\n  .col(@index) { // initial\n    @item: ~\".col-xs-@{index}, .col-sm-@{index}, .col-md-@{index}, .col-lg-@{index}\";\n    .col((@index + 1), @item);\n  }\n  .col(@index, @list) when (@index =< @grid-columns) { // general; \"=<\" isn't a typo\n    @item: ~\".col-xs-@{index}, .col-sm-@{index}, .col-md-@{index}, .col-lg-@{index}\";\n    .col((@index + 1), ~\"@{list}, @{item}\");\n  }\n  .col(@index, @list) when (@index > @grid-columns) { // terminal\n    @{list} {\n      position: relative;\n      // Prevent columns from collapsing when empty\n      min-height: 1px;\n      // Inner gutter via padding\n      padding-left:  ceil((@grid-gutter-width / 2));\n      padding-right: floor((@grid-gutter-width / 2));\n    }\n  }\n  .col(1); // kickstart it\n}\n\n.float-grid-columns(@class) {\n  .col(@index) { // initial\n    @item: ~\".col-@{class}-@{index}\";\n    .col((@index + 1), @item);\n  }\n  .col(@index, @list) when (@index =< @grid-columns) { // general\n    @item: ~\".col-@{class}-@{index}\";\n    .col((@index + 1), ~\"@{list}, @{item}\");\n  }\n  .col(@index, @list) when (@index > @grid-columns) { // terminal\n    @{list} {\n      float: left;\n    }\n  }\n  .col(1); // kickstart it\n}\n\n.calc-grid-column(@index, @class, @type) when (@type = width) and (@index > 0) {\n  .col-@{class}-@{index} {\n    width: percentage((@index / @grid-columns));\n  }\n}\n.calc-grid-column(@index, @class, @type) when (@type = push) and (@index > 0) {\n  .col-@{class}-push-@{index} {\n    left: percentage((@index / @grid-columns));\n  }\n}\n.calc-grid-column(@index, @class, @type) when (@type = push) and (@index = 0) {\n  .col-@{class}-push-0 {\n    left: auto;\n  }\n}\n.calc-grid-column(@index, @class, @type) when (@type = pull) and (@index > 0) {\n  .col-@{class}-pull-@{index} {\n    right: percentage((@index / @grid-columns));\n  }\n}\n.calc-grid-column(@index, @class, @type) when (@type = pull) and (@index = 0) {\n  .col-@{class}-pull-0 {\n    right: auto;\n  }\n}\n.calc-grid-column(@index, @class, @type) when (@type = offset) {\n  .col-@{class}-offset-@{index} {\n    margin-left: percentage((@index / @grid-columns));\n  }\n}\n\n// Basic looping in LESS\n.loop-grid-columns(@index, @class, @type) when (@index >= 0) {\n  .calc-grid-column(@index, @class, @type);\n  // next iteration\n  .loop-grid-columns((@index - 1), @class, @type);\n}\n\n// Create grid for specific class\n.make-grid(@class) {\n  .float-grid-columns(@class);\n  .loop-grid-columns(@grid-columns, @class, width);\n  .loop-grid-columns(@grid-columns, @class, pull);\n  .loop-grid-columns(@grid-columns, @class, push);\n  .loop-grid-columns(@grid-columns, @class, offset);\n}\n","//\n// Tables\n// --------------------------------------------------\n\n\ntable {\n  background-color: @table-bg;\n}\ncaption {\n  padding-top: @table-cell-padding;\n  padding-bottom: @table-cell-padding;\n  color: @text-muted;\n  text-align: left;\n}\nth {\n  text-align: left;\n}\n\n\n// Baseline styles\n\n.table {\n  width: 100%;\n  max-width: 100%;\n  margin-bottom: @line-height-computed;\n  // Cells\n  > thead,\n  > tbody,\n  > tfoot {\n    > tr {\n      > th,\n      > td {\n        padding: @table-cell-padding;\n        line-height: @line-height-base;\n        vertical-align: top;\n        border-top: 1px solid @table-border-color;\n      }\n    }\n  }\n  // Bottom align for column headings\n  > thead > tr > th {\n    vertical-align: bottom;\n    border-bottom: 2px solid @table-border-color;\n  }\n  // Remove top border from thead by default\n  > caption + thead,\n  > colgroup + thead,\n  > thead:first-child {\n    > tr:first-child {\n      > th,\n      > td {\n        border-top: 0;\n      }\n    }\n  }\n  // Account for multiple tbody instances\n  > tbody + tbody {\n    border-top: 2px solid @table-border-color;\n  }\n\n  // Nesting\n  .table {\n    background-color: @body-bg;\n  }\n}\n\n\n// Condensed table w/ half padding\n\n.table-condensed {\n  > thead,\n  > tbody,\n  > tfoot {\n    > tr {\n      > th,\n      > td {\n        padding: @table-condensed-cell-padding;\n      }\n    }\n  }\n}\n\n\n// Bordered version\n//\n// Add borders all around the table and between all the columns.\n\n.table-bordered {\n  border: 1px solid @table-border-color;\n  > thead,\n  > tbody,\n  > tfoot {\n    > tr {\n      > th,\n      > td {\n        border: 1px solid @table-border-color;\n      }\n    }\n  }\n  > thead > tr {\n    > th,\n    > td {\n      border-bottom-width: 2px;\n    }\n  }\n}\n\n\n// Zebra-striping\n//\n// Default zebra-stripe styles (alternating gray and transparent backgrounds)\n\n.table-striped {\n  > tbody > tr:nth-of-type(odd) {\n    background-color: @table-bg-accent;\n  }\n}\n\n\n// Hover effect\n//\n// Placed here since it has to come after the potential zebra striping\n\n.table-hover {\n  > tbody > tr:hover {\n    background-color: @table-bg-hover;\n  }\n}\n\n\n// Table cell sizing\n//\n// Reset default table behavior\n\ntable col[class*=\"col-\"] {\n  position: static; // Prevent border hiding in Firefox and IE9-11 (see https://github.com/twbs/bootstrap/issues/11623)\n  float: none;\n  display: table-column;\n}\ntable {\n  td,\n  th {\n    &[class*=\"col-\"] {\n      position: static; // Prevent border hiding in Firefox and IE9-11 (see https://github.com/twbs/bootstrap/issues/11623)\n      float: none;\n      display: table-cell;\n    }\n  }\n}\n\n\n// Table backgrounds\n//\n// Exact selectors below required to override `.table-striped` and prevent\n// inheritance to nested tables.\n\n// Generate the contextual variants\n.table-row-variant(active; @table-bg-active);\n.table-row-variant(success; @state-success-bg);\n.table-row-variant(info; @state-info-bg);\n.table-row-variant(warning; @state-warning-bg);\n.table-row-variant(danger; @state-danger-bg);\n\n\n// Responsive tables\n//\n// Wrap your tables in `.table-responsive` and we'll make them mobile friendly\n// by enabling horizontal scrolling. Only applies <768px. Everything above that\n// will display normally.\n\n.table-responsive {\n  overflow-x: auto;\n  min-height: 0.01%; // Workaround for IE9 bug (see https://github.com/twbs/bootstrap/issues/14837)\n\n  @media screen and (max-width: @screen-xs-max) {\n    width: 100%;\n    margin-bottom: (@line-height-computed * 0.75);\n    overflow-y: hidden;\n    -ms-overflow-style: -ms-autohiding-scrollbar;\n    border: 1px solid @table-border-color;\n\n    // Tighten up spacing\n    > .table {\n      margin-bottom: 0;\n\n      // Ensure the content doesn't wrap\n      > thead,\n      > tbody,\n      > tfoot {\n        > tr {\n          > th,\n          > td {\n            white-space: nowrap;\n          }\n        }\n      }\n    }\n\n    // Special overrides for the bordered tables\n    > .table-bordered {\n      border: 0;\n\n      // Nuke the appropriate borders so that the parent can handle them\n      > thead,\n      > tbody,\n      > tfoot {\n        > tr {\n          > th:first-child,\n          > td:first-child {\n            border-left: 0;\n          }\n          > th:last-child,\n          > td:last-child {\n            border-right: 0;\n          }\n        }\n      }\n\n      // Only nuke the last row's bottom-border in `tbody` and `tfoot` since\n      // chances are there will be only one `tr` in a `thead` and that would\n      // remove the border altogether.\n      > tbody,\n      > tfoot {\n        > tr:last-child {\n          > th,\n          > td {\n            border-bottom: 0;\n          }\n        }\n      }\n\n    }\n  }\n}\n","// Tables\n\n.table-row-variant(@state; @background) {\n  // Exact selectors below required to override `.table-striped` and prevent\n  // inheritance to nested tables.\n  .table > thead > tr,\n  .table > tbody > tr,\n  .table > tfoot > tr {\n    > td.@{state},\n    > th.@{state},\n    &.@{state} > td,\n    &.@{state} > th {\n      background-color: @background;\n    }\n  }\n\n  // Hover states for `.table-hover`\n  // Note: this is not available for cells or rows within `thead` or `tfoot`.\n  .table-hover > tbody > tr {\n    > td.@{state}:hover,\n    > th.@{state}:hover,\n    &.@{state}:hover > td,\n    &:hover > .@{state},\n    &.@{state}:hover > th {\n      background-color: darken(@background, 5%);\n    }\n  }\n}\n","//\n// Forms\n// --------------------------------------------------\n\n\n// Normalize non-controls\n//\n// Restyle and baseline non-control form elements.\n\nfieldset {\n  padding: 0;\n  margin: 0;\n  border: 0;\n  // Chrome and Firefox set a `min-width: min-content;` on fieldsets,\n  // so we reset that to ensure it behaves more like a standard block element.\n  // See https://github.com/twbs/bootstrap/issues/12359.\n  min-width: 0;\n}\n\nlegend {\n  display: block;\n  width: 100%;\n  padding: 0;\n  margin-bottom: @line-height-computed;\n  font-size: (@font-size-base * 1.5);\n  line-height: inherit;\n  color: @legend-color;\n  border: 0;\n  border-bottom: 1px solid @legend-border-color;\n}\n\nlabel {\n  display: inline-block;\n  max-width: 100%; // Force IE8 to wrap long content (see https://github.com/twbs/bootstrap/issues/13141)\n  margin-bottom: 5px;\n  font-weight: bold;\n}\n\n\n// Normalize form controls\n//\n// While most of our form styles require extra classes, some basic normalization\n// is required to ensure optimum display with or without those classes to better\n// address browser inconsistencies.\n\n// Override content-box in Normalize (* isn't specific enough)\ninput[type=\"search\"] {\n  .box-sizing(border-box);\n}\n\n// Position radios and checkboxes better\ninput[type=\"radio\"],\ninput[type=\"checkbox\"] {\n  margin: 4px 0 0;\n  margin-top: 1px \\9; // IE8-9\n  line-height: normal;\n}\n\ninput[type=\"file\"] {\n  display: block;\n}\n\n// Make range inputs behave like textual form controls\ninput[type=\"range\"] {\n  display: block;\n  width: 100%;\n}\n\n// Make multiple select elements height not fixed\nselect[multiple],\nselect[size] {\n  height: auto;\n}\n\n// Focus for file, radio, and checkbox\ninput[type=\"file\"]:focus,\ninput[type=\"radio\"]:focus,\ninput[type=\"checkbox\"]:focus {\n  .tab-focus();\n}\n\n// Adjust output element\noutput {\n  display: block;\n  padding-top: (@padding-base-vertical + 1);\n  font-size: @font-size-base;\n  line-height: @line-height-base;\n  color: @input-color;\n}\n\n\n// Common form controls\n//\n// Shared size and type resets for form controls. Apply `.form-control` to any\n// of the following form controls:\n//\n// select\n// textarea\n// input[type=\"text\"]\n// input[type=\"password\"]\n// input[type=\"datetime\"]\n// input[type=\"datetime-local\"]\n// input[type=\"date\"]\n// input[type=\"month\"]\n// input[type=\"time\"]\n// input[type=\"week\"]\n// input[type=\"number\"]\n// input[type=\"email\"]\n// input[type=\"url\"]\n// input[type=\"search\"]\n// input[type=\"tel\"]\n// input[type=\"color\"]\n\n.form-control {\n  display: block;\n  width: 100%;\n  height: @input-height-base; // Make inputs at least the height of their button counterpart (base line-height + padding + border)\n  padding: @padding-base-vertical @padding-base-horizontal;\n  font-size: @font-size-base;\n  line-height: @line-height-base;\n  color: @input-color;\n  background-color: @input-bg;\n  background-image: none; // Reset unusual Firefox-on-Android default style; see https://github.com/necolas/normalize.css/issues/214\n  border: 1px solid @input-border;\n  border-radius: @input-border-radius; // Note: This has no effect on s in CSS.\n  .box-shadow(inset 0 1px 1px rgba(0,0,0,.075));\n  .transition(~\"border-color ease-in-out .15s, box-shadow ease-in-out .15s\");\n\n  // Customize the `:focus` state to imitate native WebKit styles.\n  .form-control-focus();\n\n  // Placeholder\n  .placeholder();\n\n  // Unstyle the caret on ``\n// element gets special love because it's special, and that's a fact!\n.input-size(@input-height; @padding-vertical; @padding-horizontal; @font-size; @line-height; @border-radius) {\n  height: @input-height;\n  padding: @padding-vertical @padding-horizontal;\n  font-size: @font-size;\n  line-height: @line-height;\n  border-radius: @border-radius;\n\n  select& {\n    height: @input-height;\n    line-height: @input-height;\n  }\n\n  textarea&,\n  select[multiple]& {\n    height: auto;\n  }\n}\n","//\n// Buttons\n// --------------------------------------------------\n\n\n// Base styles\n// --------------------------------------------------\n\n.btn {\n  display: inline-block;\n  margin-bottom: 0; // For input.btn\n  font-weight: @btn-font-weight;\n  text-align: center;\n  vertical-align: middle;\n  touch-action: manipulation;\n  cursor: pointer;\n  background-image: none; // Reset unusual Firefox-on-Android default style; see https://github.com/necolas/normalize.css/issues/214\n  border: 1px solid transparent;\n  white-space: nowrap;\n  .button-size(@padding-base-vertical; @padding-base-horizontal; @font-size-base; @line-height-base; @btn-border-radius-base);\n  .user-select(none);\n\n  &,\n  &:active,\n  &.active {\n    &:focus,\n    &.focus {\n      .tab-focus();\n    }\n  }\n\n  &:hover,\n  &:focus,\n  &.focus {\n    color: @btn-default-color;\n    text-decoration: none;\n  }\n\n  &:active,\n  &.active {\n    outline: 0;\n    background-image: none;\n    .box-shadow(inset 0 3px 5px rgba(0,0,0,.125));\n  }\n\n  &.disabled,\n  &[disabled],\n  fieldset[disabled] & {\n    cursor: @cursor-disabled;\n    .opacity(.65);\n    .box-shadow(none);\n  }\n\n  a& {\n    &.disabled,\n    fieldset[disabled] & {\n      pointer-events: none; // Future-proof disabling of clicks on `` elements\n    }\n  }\n}\n\n\n// Alternate buttons\n// --------------------------------------------------\n\n.btn-default {\n  .button-variant(@btn-default-color; @btn-default-bg; @btn-default-border);\n}\n.btn-primary {\n  .button-variant(@btn-primary-color; @btn-primary-bg; @btn-primary-border);\n}\n// Success appears as green\n.btn-success {\n  .button-variant(@btn-success-color; @btn-success-bg; @btn-success-border);\n}\n// Info appears as blue-green\n.btn-info {\n  .button-variant(@btn-info-color; @btn-info-bg; @btn-info-border);\n}\n// Warning appears as orange\n.btn-warning {\n  .button-variant(@btn-warning-color; @btn-warning-bg; @btn-warning-border);\n}\n// Danger and error appear as red\n.btn-danger {\n  .button-variant(@btn-danger-color; @btn-danger-bg; @btn-danger-border);\n}\n\n\n// Link buttons\n// -------------------------\n\n// Make a button look and behave like a link\n.btn-link {\n  color: @link-color;\n  font-weight: normal;\n  border-radius: 0;\n\n  &,\n  &:active,\n  &.active,\n  &[disabled],\n  fieldset[disabled] & {\n    background-color: transparent;\n    .box-shadow(none);\n  }\n  &,\n  &:hover,\n  &:focus,\n  &:active {\n    border-color: transparent;\n  }\n  &:hover,\n  &:focus {\n    color: @link-hover-color;\n    text-decoration: @link-hover-decoration;\n    background-color: transparent;\n  }\n  &[disabled],\n  fieldset[disabled] & {\n    &:hover,\n    &:focus {\n      color: @btn-link-disabled-color;\n      text-decoration: none;\n    }\n  }\n}\n\n\n// Button Sizes\n// --------------------------------------------------\n\n.btn-lg {\n  // line-height: ensure even-numbered height of button next to large input\n  .button-size(@padding-large-vertical; @padding-large-horizontal; @font-size-large; @line-height-large; @btn-border-radius-large);\n}\n.btn-sm {\n  // line-height: ensure proper height of button next to small input\n  .button-size(@padding-small-vertical; @padding-small-horizontal; @font-size-small; @line-height-small; @btn-border-radius-small);\n}\n.btn-xs {\n  .button-size(@padding-xs-vertical; @padding-xs-horizontal; @font-size-small; @line-height-small; @btn-border-radius-small);\n}\n\n\n// Block button\n// --------------------------------------------------\n\n.btn-block {\n  display: block;\n  width: 100%;\n}\n\n// Vertically space out multiple block buttons\n.btn-block + .btn-block {\n  margin-top: 5px;\n}\n\n// Specificity overrides\ninput[type=\"submit\"],\ninput[type=\"reset\"],\ninput[type=\"button\"] {\n  &.btn-block {\n    width: 100%;\n  }\n}\n","// Button variants\n//\n// Easily pump out default styles, as well as :hover, :focus, :active,\n// and disabled options for all buttons\n\n.button-variant(@color; @background; @border) {\n  color: @color;\n  background-color: @background;\n  border-color: @border;\n\n  &:focus,\n  &.focus {\n    color: @color;\n    background-color: darken(@background, 10%);\n        border-color: darken(@border, 25%);\n  }\n  &:hover {\n    color: @color;\n    background-color: darken(@background, 10%);\n        border-color: darken(@border, 12%);\n  }\n  &:active,\n  &.active,\n  .open > .dropdown-toggle& {\n    color: @color;\n    background-color: darken(@background, 10%);\n        border-color: darken(@border, 12%);\n\n    &:hover,\n    &:focus,\n    &.focus {\n      color: @color;\n      background-color: darken(@background, 17%);\n          border-color: darken(@border, 25%);\n    }\n  }\n  &:active,\n  &.active,\n  .open > .dropdown-toggle& {\n    background-image: none;\n  }\n  &.disabled,\n  &[disabled],\n  fieldset[disabled] & {\n    &:hover,\n    &:focus,\n    &.focus {\n      background-color: @background;\n          border-color: @border;\n    }\n  }\n\n  .badge {\n    color: @background;\n    background-color: @color;\n  }\n}\n\n// Button sizes\n.button-size(@padding-vertical; @padding-horizontal; @font-size; @line-height; @border-radius) {\n  padding: @padding-vertical @padding-horizontal;\n  font-size: @font-size;\n  line-height: @line-height;\n  border-radius: @border-radius;\n}\n","// Opacity\n\n.opacity(@opacity) {\n  opacity: @opacity;\n  // IE8 filter\n  @opacity-ie: (@opacity * 100);\n  filter: ~\"alpha(opacity=@{opacity-ie})\";\n}\n","//\n// Component animations\n// --------------------------------------------------\n\n// Heads up!\n//\n// We don't use the `.opacity()` mixin here since it causes a bug with text\n// fields in IE7-8. Source: https://github.com/twbs/bootstrap/pull/3552.\n\n.fade {\n  opacity: 0;\n  .transition(opacity .15s linear);\n  &.in {\n    opacity: 1;\n  }\n}\n\n.collapse {\n  display: none;\n\n  &.in      { display: block; }\n  tr&.in    { display: table-row; }\n  tbody&.in { display: table-row-group; }\n}\n\n.collapsing {\n  position: relative;\n  height: 0;\n  overflow: hidden;\n  .transition-property(~\"height, visibility\");\n  .transition-duration(.35s);\n  .transition-timing-function(ease);\n}\n","//\n// Dropdown menus\n// --------------------------------------------------\n\n\n// Dropdown arrow/caret\n.caret {\n  display: inline-block;\n  width: 0;\n  height: 0;\n  margin-left: 2px;\n  vertical-align: middle;\n  border-top:   @caret-width-base dashed;\n  border-top:   @caret-width-base solid ~\"\\9\"; // IE8\n  border-right: @caret-width-base solid transparent;\n  border-left:  @caret-width-base solid transparent;\n}\n\n// The dropdown wrapper (div)\n.dropup,\n.dropdown {\n  position: relative;\n}\n\n// Prevent the focus on the dropdown toggle when closing dropdowns\n.dropdown-toggle:focus {\n  outline: 0;\n}\n\n// The dropdown menu (ul)\n.dropdown-menu {\n  position: absolute;\n  top: 100%;\n  left: 0;\n  z-index: @zindex-dropdown;\n  display: none; // none by default, but block on \"open\" of the menu\n  float: left;\n  min-width: 160px;\n  padding: 5px 0;\n  margin: 2px 0 0; // override default ul\n  list-style: none;\n  font-size: @font-size-base;\n  text-align: left; // Ensures proper alignment if parent has it changed (e.g., modal footer)\n  background-color: @dropdown-bg;\n  border: 1px solid @dropdown-fallback-border; // IE8 fallback\n  border: 1px solid @dropdown-border;\n  border-radius: @border-radius-base;\n  .box-shadow(0 6px 12px rgba(0,0,0,.175));\n  background-clip: padding-box;\n\n  // Aligns the dropdown menu to right\n  //\n  // Deprecated as of 3.1.0 in favor of `.dropdown-menu-[dir]`\n  &.pull-right {\n    right: 0;\n    left: auto;\n  }\n\n  // Dividers (basically an hr) within the dropdown\n  .divider {\n    .nav-divider(@dropdown-divider-bg);\n  }\n\n  // Links within the dropdown menu\n  > li > a {\n    display: block;\n    padding: 3px 20px;\n    clear: both;\n    font-weight: normal;\n    line-height: @line-height-base;\n    color: @dropdown-link-color;\n    white-space: nowrap; // prevent links from randomly breaking onto new lines\n  }\n}\n\n// Hover/Focus state\n.dropdown-menu > li > a {\n  &:hover,\n  &:focus {\n    text-decoration: none;\n    color: @dropdown-link-hover-color;\n    background-color: @dropdown-link-hover-bg;\n  }\n}\n\n// Active state\n.dropdown-menu > .active > a {\n  &,\n  &:hover,\n  &:focus {\n    color: @dropdown-link-active-color;\n    text-decoration: none;\n    outline: 0;\n    background-color: @dropdown-link-active-bg;\n  }\n}\n\n// Disabled state\n//\n// Gray out text and ensure the hover/focus state remains gray\n\n.dropdown-menu > .disabled > a {\n  &,\n  &:hover,\n  &:focus {\n    color: @dropdown-link-disabled-color;\n  }\n\n  // Nuke hover/focus effects\n  &:hover,\n  &:focus {\n    text-decoration: none;\n    background-color: transparent;\n    background-image: none; // Remove CSS gradient\n    .reset-filter();\n    cursor: @cursor-disabled;\n  }\n}\n\n// Open state for the dropdown\n.open {\n  // Show the menu\n  > .dropdown-menu {\n    display: block;\n  }\n\n  // Remove the outline when :focus is triggered\n  > a {\n    outline: 0;\n  }\n}\n\n// Menu positioning\n//\n// Add extra class to `.dropdown-menu` to flip the alignment of the dropdown\n// menu with the parent.\n.dropdown-menu-right {\n  left: auto; // Reset the default from `.dropdown-menu`\n  right: 0;\n}\n// With v3, we enabled auto-flipping if you have a dropdown within a right\n// aligned nav component. To enable the undoing of that, we provide an override\n// to restore the default dropdown menu alignment.\n//\n// This is only for left-aligning a dropdown menu within a `.navbar-right` or\n// `.pull-right` nav component.\n.dropdown-menu-left {\n  left: 0;\n  right: auto;\n}\n\n// Dropdown section headers\n.dropdown-header {\n  display: block;\n  padding: 3px 20px;\n  font-size: @font-size-small;\n  line-height: @line-height-base;\n  color: @dropdown-header-color;\n  white-space: nowrap; // as with > li > a\n}\n\n// Backdrop to catch body clicks on mobile, etc.\n.dropdown-backdrop {\n  position: fixed;\n  left: 0;\n  right: 0;\n  bottom: 0;\n  top: 0;\n  z-index: (@zindex-dropdown - 10);\n}\n\n// Right aligned dropdowns\n.pull-right > .dropdown-menu {\n  right: 0;\n  left: auto;\n}\n\n// Allow for dropdowns to go bottom up (aka, dropup-menu)\n//\n// Just add .dropup after the standard .dropdown class and you're set, bro.\n// TODO: abstract this so that the navbar fixed styles are not placed here?\n\n.dropup,\n.navbar-fixed-bottom .dropdown {\n  // Reverse the caret\n  .caret {\n    border-top: 0;\n    border-bottom: @caret-width-base dashed;\n    border-bottom: @caret-width-base solid ~\"\\9\"; // IE8\n    content: \"\";\n  }\n  // Different positioning for bottom up menu\n  .dropdown-menu {\n    top: auto;\n    bottom: 100%;\n    margin-bottom: 2px;\n  }\n}\n\n\n// Component alignment\n//\n// Reiterate per navbar.less and the modified component alignment there.\n\n@media (min-width: @grid-float-breakpoint) {\n  .navbar-right {\n    .dropdown-menu {\n      .dropdown-menu-right();\n    }\n    // Necessary for overrides of the default right aligned menu.\n    // Will remove come v4 in all likelihood.\n    .dropdown-menu-left {\n      .dropdown-menu-left();\n    }\n  }\n}\n","// Horizontal dividers\n//\n// Dividers (basically an hr) within dropdowns and nav lists\n\n.nav-divider(@color: #e5e5e5) {\n  height: 1px;\n  margin: ((@line-height-computed / 2) - 1) 0;\n  overflow: hidden;\n  background-color: @color;\n}\n","// Reset filters for IE\n//\n// When you need to remove a gradient background, do not forget to use this to reset\n// the IE filter for IE9 and below.\n\n.reset-filter() {\n  filter: e(%(\"progid:DXImageTransform.Microsoft.gradient(enabled = false)\"));\n}\n","//\n// Button groups\n// --------------------------------------------------\n\n// Make the div behave like a button\n.btn-group,\n.btn-group-vertical {\n  position: relative;\n  display: inline-block;\n  vertical-align: middle; // match .btn alignment given font-size hack above\n  > .btn {\n    position: relative;\n    float: left;\n    // Bring the \"active\" button to the front\n    &:hover,\n    &:focus,\n    &:active,\n    &.active {\n      z-index: 2;\n    }\n  }\n}\n\n// Prevent double borders when buttons are next to each other\n.btn-group {\n  .btn + .btn,\n  .btn + .btn-group,\n  .btn-group + .btn,\n  .btn-group + .btn-group {\n    margin-left: -1px;\n  }\n}\n\n// Optional: Group multiple button groups together for a toolbar\n.btn-toolbar {\n  margin-left: -5px; // Offset the first child's margin\n  &:extend(.clearfix all);\n\n  .btn,\n  .btn-group,\n  .input-group {\n    float: left;\n  }\n  > .btn,\n  > .btn-group,\n  > .input-group {\n    margin-left: 5px;\n  }\n}\n\n.btn-group > .btn:not(:first-child):not(:last-child):not(.dropdown-toggle) {\n  border-radius: 0;\n}\n\n// Set corners individual because sometimes a single button can be in a .btn-group and we need :first-child and :last-child to both match\n.btn-group > .btn:first-child {\n  margin-left: 0;\n  &:not(:last-child):not(.dropdown-toggle) {\n    .border-right-radius(0);\n  }\n}\n// Need .dropdown-toggle since :last-child doesn't apply, given that a .dropdown-menu is used immediately after it\n.btn-group > .btn:last-child:not(:first-child),\n.btn-group > .dropdown-toggle:not(:first-child) {\n  .border-left-radius(0);\n}\n\n// Custom edits for including btn-groups within btn-groups (useful for including dropdown buttons within a btn-group)\n.btn-group > .btn-group {\n  float: left;\n}\n.btn-group > .btn-group:not(:first-child):not(:last-child) > .btn {\n  border-radius: 0;\n}\n.btn-group > .btn-group:first-child:not(:last-child) {\n  > .btn:last-child,\n  > .dropdown-toggle {\n    .border-right-radius(0);\n  }\n}\n.btn-group > .btn-group:last-child:not(:first-child) > .btn:first-child {\n  .border-left-radius(0);\n}\n\n// On active and open, don't show outline\n.btn-group .dropdown-toggle:active,\n.btn-group.open .dropdown-toggle {\n  outline: 0;\n}\n\n\n// Sizing\n//\n// Remix the default button sizing classes into new ones for easier manipulation.\n\n.btn-group-xs > .btn { &:extend(.btn-xs); }\n.btn-group-sm > .btn { &:extend(.btn-sm); }\n.btn-group-lg > .btn { &:extend(.btn-lg); }\n\n\n// Split button dropdowns\n// ----------------------\n\n// Give the line between buttons some depth\n.btn-group > .btn + .dropdown-toggle {\n  padding-left: 8px;\n  padding-right: 8px;\n}\n.btn-group > .btn-lg + .dropdown-toggle {\n  padding-left: 12px;\n  padding-right: 12px;\n}\n\n// The clickable button for toggling the menu\n// Remove the gradient and set the same inset shadow as the :active state\n.btn-group.open .dropdown-toggle {\n  .box-shadow(inset 0 3px 5px rgba(0,0,0,.125));\n\n  // Show no shadow for `.btn-link` since it has no other button styles.\n  &.btn-link {\n    .box-shadow(none);\n  }\n}\n\n\n// Reposition the caret\n.btn .caret {\n  margin-left: 0;\n}\n// Carets in other button sizes\n.btn-lg .caret {\n  border-width: @caret-width-large @caret-width-large 0;\n  border-bottom-width: 0;\n}\n// Upside down carets for .dropup\n.dropup .btn-lg .caret {\n  border-width: 0 @caret-width-large @caret-width-large;\n}\n\n\n// Vertical button groups\n// ----------------------\n\n.btn-group-vertical {\n  > .btn,\n  > .btn-group,\n  > .btn-group > .btn {\n    display: block;\n    float: none;\n    width: 100%;\n    max-width: 100%;\n  }\n\n  // Clear floats so dropdown menus can be properly placed\n  > .btn-group {\n    &:extend(.clearfix all);\n    > .btn {\n      float: none;\n    }\n  }\n\n  > .btn + .btn,\n  > .btn + .btn-group,\n  > .btn-group + .btn,\n  > .btn-group + .btn-group {\n    margin-top: -1px;\n    margin-left: 0;\n  }\n}\n\n.btn-group-vertical > .btn {\n  &:not(:first-child):not(:last-child) {\n    border-radius: 0;\n  }\n  &:first-child:not(:last-child) {\n    .border-top-radius(@btn-border-radius-base);\n    .border-bottom-radius(0);\n  }\n  &:last-child:not(:first-child) {\n    .border-top-radius(0);\n    .border-bottom-radius(@btn-border-radius-base);\n  }\n}\n.btn-group-vertical > .btn-group:not(:first-child):not(:last-child) > .btn {\n  border-radius: 0;\n}\n.btn-group-vertical > .btn-group:first-child:not(:last-child) {\n  > .btn:last-child,\n  > .dropdown-toggle {\n    .border-bottom-radius(0);\n  }\n}\n.btn-group-vertical > .btn-group:last-child:not(:first-child) > .btn:first-child {\n  .border-top-radius(0);\n}\n\n\n// Justified button groups\n// ----------------------\n\n.btn-group-justified {\n  display: table;\n  width: 100%;\n  table-layout: fixed;\n  border-collapse: separate;\n  > .btn,\n  > .btn-group {\n    float: none;\n    display: table-cell;\n    width: 1%;\n  }\n  > .btn-group .btn {\n    width: 100%;\n  }\n\n  > .btn-group .dropdown-menu {\n    left: auto;\n  }\n}\n\n\n// Checkbox and radio options\n//\n// In order to support the browser's form validation feedback, powered by the\n// `required` attribute, we have to \"hide\" the inputs via `clip`. We cannot use\n// `display: none;` or `visibility: hidden;` as that also hides the popover.\n// Simply visually hiding the inputs via `opacity` would leave them clickable in\n// certain cases which is prevented by using `clip` and `pointer-events`.\n// This way, we ensure a DOM element is visible to position the popover from.\n//\n// See https://github.com/twbs/bootstrap/pull/12794 and\n// https://github.com/twbs/bootstrap/pull/14559 for more information.\n\n[data-toggle=\"buttons\"] {\n  > .btn,\n  > .btn-group > .btn {\n    input[type=\"radio\"],\n    input[type=\"checkbox\"] {\n      position: absolute;\n      clip: rect(0,0,0,0);\n      pointer-events: none;\n    }\n  }\n}\n","// Single side border-radius\n\n.border-top-radius(@radius) {\n  border-top-right-radius: @radius;\n   border-top-left-radius: @radius;\n}\n.border-right-radius(@radius) {\n  border-bottom-right-radius: @radius;\n     border-top-right-radius: @radius;\n}\n.border-bottom-radius(@radius) {\n  border-bottom-right-radius: @radius;\n   border-bottom-left-radius: @radius;\n}\n.border-left-radius(@radius) {\n  border-bottom-left-radius: @radius;\n     border-top-left-radius: @radius;\n}\n","//\n// Input groups\n// --------------------------------------------------\n\n// Base styles\n// -------------------------\n.input-group {\n  position: relative; // For dropdowns\n  display: table;\n  border-collapse: separate; // prevent input groups from inheriting border styles from table cells when placed within a table\n\n  // Undo padding and float of grid classes\n  &[class*=\"col-\"] {\n    float: none;\n    padding-left: 0;\n    padding-right: 0;\n  }\n\n  .form-control {\n    // Ensure that the input is always above the *appended* addon button for\n    // proper border colors.\n    position: relative;\n    z-index: 2;\n\n    // IE9 fubars the placeholder attribute in text inputs and the arrows on\n    // select elements in input groups. To fix it, we float the input. Details:\n    // https://github.com/twbs/bootstrap/issues/11561#issuecomment-28936855\n    float: left;\n\n    width: 100%;\n    margin-bottom: 0;\n\n    &:focus {\n      z-index: 3;\n    }\n  }\n}\n\n// Sizing options\n//\n// Remix the default form control sizing classes into new ones for easier\n// manipulation.\n\n.input-group-lg > .form-control,\n.input-group-lg > .input-group-addon,\n.input-group-lg > .input-group-btn > .btn {\n  .input-lg();\n}\n.input-group-sm > .form-control,\n.input-group-sm > .input-group-addon,\n.input-group-sm > .input-group-btn > .btn {\n  .input-sm();\n}\n\n\n// Display as table-cell\n// -------------------------\n.input-group-addon,\n.input-group-btn,\n.input-group .form-control {\n  display: table-cell;\n\n  &:not(:first-child):not(:last-child) {\n    border-radius: 0;\n  }\n}\n// Addon and addon wrapper for buttons\n.input-group-addon,\n.input-group-btn {\n  width: 1%;\n  white-space: nowrap;\n  vertical-align: middle; // Match the inputs\n}\n\n// Text input groups\n// -------------------------\n.input-group-addon {\n  padding: @padding-base-vertical @padding-base-horizontal;\n  font-size: @font-size-base;\n  font-weight: normal;\n  line-height: 1;\n  color: @input-color;\n  text-align: center;\n  background-color: @input-group-addon-bg;\n  border: 1px solid @input-group-addon-border-color;\n  border-radius: @input-border-radius;\n\n  // Sizing\n  &.input-sm {\n    padding: @padding-small-vertical @padding-small-horizontal;\n    font-size: @font-size-small;\n    border-radius: @input-border-radius-small;\n  }\n  &.input-lg {\n    padding: @padding-large-vertical @padding-large-horizontal;\n    font-size: @font-size-large;\n    border-radius: @input-border-radius-large;\n  }\n\n  // Nuke default margins from checkboxes and radios to vertically center within.\n  input[type=\"radio\"],\n  input[type=\"checkbox\"] {\n    margin-top: 0;\n  }\n}\n\n// Reset rounded corners\n.input-group .form-control:first-child,\n.input-group-addon:first-child,\n.input-group-btn:first-child > .btn,\n.input-group-btn:first-child > .btn-group > .btn,\n.input-group-btn:first-child > .dropdown-toggle,\n.input-group-btn:last-child > .btn:not(:last-child):not(.dropdown-toggle),\n.input-group-btn:last-child > .btn-group:not(:last-child) > .btn {\n  .border-right-radius(0);\n}\n.input-group-addon:first-child {\n  border-right: 0;\n}\n.input-group .form-control:last-child,\n.input-group-addon:last-child,\n.input-group-btn:last-child > .btn,\n.input-group-btn:last-child > .btn-group > .btn,\n.input-group-btn:last-child > .dropdown-toggle,\n.input-group-btn:first-child > .btn:not(:first-child),\n.input-group-btn:first-child > .btn-group:not(:first-child) > .btn {\n  .border-left-radius(0);\n}\n.input-group-addon:last-child {\n  border-left: 0;\n}\n\n// Button input groups\n// -------------------------\n.input-group-btn {\n  position: relative;\n  // Jankily prevent input button groups from wrapping with `white-space` and\n  // `font-size` in combination with `inline-block` on buttons.\n  font-size: 0;\n  white-space: nowrap;\n\n  // Negative margin for spacing, position for bringing hovered/focused/actived\n  // element above the siblings.\n  > .btn {\n    position: relative;\n    + .btn {\n      margin-left: -1px;\n    }\n    // Bring the \"active\" button to the front\n    &:hover,\n    &:focus,\n    &:active {\n      z-index: 2;\n    }\n  }\n\n  // Negative margin to only have a 1px border between the two\n  &:first-child {\n    > .btn,\n    > .btn-group {\n      margin-right: -1px;\n    }\n  }\n  &:last-child {\n    > .btn,\n    > .btn-group {\n      z-index: 2;\n      margin-left: -1px;\n    }\n  }\n}\n","//\n// Navs\n// --------------------------------------------------\n\n\n// Base class\n// --------------------------------------------------\n\n.nav {\n  margin-bottom: 0;\n  padding-left: 0; // Override default ul/ol\n  list-style: none;\n  &:extend(.clearfix all);\n\n  > li {\n    position: relative;\n    display: block;\n\n    > a {\n      position: relative;\n      display: block;\n      padding: @nav-link-padding;\n      &:hover,\n      &:focus {\n        text-decoration: none;\n        background-color: @nav-link-hover-bg;\n      }\n    }\n\n    // Disabled state sets text to gray and nukes hover/tab effects\n    &.disabled > a {\n      color: @nav-disabled-link-color;\n\n      &:hover,\n      &:focus {\n        color: @nav-disabled-link-hover-color;\n        text-decoration: none;\n        background-color: transparent;\n        cursor: @cursor-disabled;\n      }\n    }\n  }\n\n  // Open dropdowns\n  .open > a {\n    &,\n    &:hover,\n    &:focus {\n      background-color: @nav-link-hover-bg;\n      border-color: @link-color;\n    }\n  }\n\n  // Nav dividers (deprecated with v3.0.1)\n  //\n  // This should have been removed in v3 with the dropping of `.nav-list`, but\n  // we missed it. We don't currently support this anywhere, but in the interest\n  // of maintaining backward compatibility in case you use it, it's deprecated.\n  .nav-divider {\n    .nav-divider();\n  }\n\n  // Prevent IE8 from misplacing imgs\n  //\n  // See https://github.com/h5bp/html5-boilerplate/issues/984#issuecomment-3985989\n  > li > a > img {\n    max-width: none;\n  }\n}\n\n\n// Tabs\n// -------------------------\n\n// Give the tabs something to sit on\n.nav-tabs {\n  border-bottom: 1px solid @nav-tabs-border-color;\n  > li {\n    float: left;\n    // Make the list-items overlay the bottom border\n    margin-bottom: -1px;\n\n    // Actual tabs (as links)\n    > a {\n      margin-right: 2px;\n      line-height: @line-height-base;\n      border: 1px solid transparent;\n      border-radius: @border-radius-base @border-radius-base 0 0;\n      &:hover {\n        border-color: @nav-tabs-link-hover-border-color @nav-tabs-link-hover-border-color @nav-tabs-border-color;\n      }\n    }\n\n    // Active state, and its :hover to override normal :hover\n    &.active > a {\n      &,\n      &:hover,\n      &:focus {\n        color: @nav-tabs-active-link-hover-color;\n        background-color: @nav-tabs-active-link-hover-bg;\n        border: 1px solid @nav-tabs-active-link-hover-border-color;\n        border-bottom-color: transparent;\n        cursor: default;\n      }\n    }\n  }\n  // pulling this in mainly for less shorthand\n  &.nav-justified {\n    .nav-justified();\n    .nav-tabs-justified();\n  }\n}\n\n\n// Pills\n// -------------------------\n.nav-pills {\n  > li {\n    float: left;\n\n    // Links rendered as pills\n    > a {\n      border-radius: @nav-pills-border-radius;\n    }\n    + li {\n      margin-left: 2px;\n    }\n\n    // Active state\n    &.active > a {\n      &,\n      &:hover,\n      &:focus {\n        color: @nav-pills-active-link-hover-color;\n        background-color: @nav-pills-active-link-hover-bg;\n      }\n    }\n  }\n}\n\n\n// Stacked pills\n.nav-stacked {\n  > li {\n    float: none;\n    + li {\n      margin-top: 2px;\n      margin-left: 0; // no need for this gap between nav items\n    }\n  }\n}\n\n\n// Nav variations\n// --------------------------------------------------\n\n// Justified nav links\n// -------------------------\n\n.nav-justified {\n  width: 100%;\n\n  > li {\n    float: none;\n    > a {\n      text-align: center;\n      margin-bottom: 5px;\n    }\n  }\n\n  > .dropdown .dropdown-menu {\n    top: auto;\n    left: auto;\n  }\n\n  @media (min-width: @screen-sm-min) {\n    > li {\n      display: table-cell;\n      width: 1%;\n      > a {\n        margin-bottom: 0;\n      }\n    }\n  }\n}\n\n// Move borders to anchors instead of bottom of list\n//\n// Mixin for adding on top the shared `.nav-justified` styles for our tabs\n.nav-tabs-justified {\n  border-bottom: 0;\n\n  > li > a {\n    // Override margin from .nav-tabs\n    margin-right: 0;\n    border-radius: @border-radius-base;\n  }\n\n  > .active > a,\n  > .active > a:hover,\n  > .active > a:focus {\n    border: 1px solid @nav-tabs-justified-link-border-color;\n  }\n\n  @media (min-width: @screen-sm-min) {\n    > li > a {\n      border-bottom: 1px solid @nav-tabs-justified-link-border-color;\n      border-radius: @border-radius-base @border-radius-base 0 0;\n    }\n    > .active > a,\n    > .active > a:hover,\n    > .active > a:focus {\n      border-bottom-color: @nav-tabs-justified-active-link-border-color;\n    }\n  }\n}\n\n\n// Tabbable tabs\n// -------------------------\n\n// Hide tabbable panes to start, show them when `.active`\n.tab-content {\n  > .tab-pane {\n    display: none;\n  }\n  > .active {\n    display: block;\n  }\n}\n\n\n// Dropdowns\n// -------------------------\n\n// Specific dropdowns\n.nav-tabs .dropdown-menu {\n  // make dropdown border overlap tab border\n  margin-top: -1px;\n  // Remove the top rounded corners here since there is a hard edge above the menu\n  .border-top-radius(0);\n}\n","//\n// Navbars\n// --------------------------------------------------\n\n\n// Wrapper and base class\n//\n// Provide a static navbar from which we expand to create full-width, fixed, and\n// other navbar variations.\n\n.navbar {\n  position: relative;\n  min-height: @navbar-height; // Ensure a navbar always shows (e.g., without a .navbar-brand in collapsed mode)\n  margin-bottom: @navbar-margin-bottom;\n  border: 1px solid transparent;\n\n  // Prevent floats from breaking the navbar\n  &:extend(.clearfix all);\n\n  @media (min-width: @grid-float-breakpoint) {\n    border-radius: @navbar-border-radius;\n  }\n}\n\n\n// Navbar heading\n//\n// Groups `.navbar-brand` and `.navbar-toggle` into a single component for easy\n// styling of responsive aspects.\n\n.navbar-header {\n  &:extend(.clearfix all);\n\n  @media (min-width: @grid-float-breakpoint) {\n    float: left;\n  }\n}\n\n\n// Navbar collapse (body)\n//\n// Group your navbar content into this for easy collapsing and expanding across\n// various device sizes. By default, this content is collapsed when <768px, but\n// will expand past that for a horizontal display.\n//\n// To start (on mobile devices) the navbar links, forms, and buttons are stacked\n// vertically and include a `max-height` to overflow in case you have too much\n// content for the user's viewport.\n\n.navbar-collapse {\n  overflow-x: visible;\n  padding-right: @navbar-padding-horizontal;\n  padding-left:  @navbar-padding-horizontal;\n  border-top: 1px solid transparent;\n  box-shadow: inset 0 1px 0 rgba(255,255,255,.1);\n  &:extend(.clearfix all);\n  -webkit-overflow-scrolling: touch;\n\n  &.in {\n    overflow-y: auto;\n  }\n\n  @media (min-width: @grid-float-breakpoint) {\n    width: auto;\n    border-top: 0;\n    box-shadow: none;\n\n    &.collapse {\n      display: block !important;\n      height: auto !important;\n      padding-bottom: 0; // Override default setting\n      overflow: visible !important;\n    }\n\n    &.in {\n      overflow-y: visible;\n    }\n\n    // Undo the collapse side padding for navbars with containers to ensure\n    // alignment of right-aligned contents.\n    .navbar-fixed-top &,\n    .navbar-static-top &,\n    .navbar-fixed-bottom & {\n      padding-left: 0;\n      padding-right: 0;\n    }\n  }\n}\n\n.navbar-fixed-top,\n.navbar-fixed-bottom {\n  .navbar-collapse {\n    max-height: @navbar-collapse-max-height;\n\n    @media (max-device-width: @screen-xs-min) and (orientation: landscape) {\n      max-height: 200px;\n    }\n  }\n}\n\n\n// Both navbar header and collapse\n//\n// When a container is present, change the behavior of the header and collapse.\n\n.container,\n.container-fluid {\n  > .navbar-header,\n  > .navbar-collapse {\n    margin-right: -@navbar-padding-horizontal;\n    margin-left:  -@navbar-padding-horizontal;\n\n    @media (min-width: @grid-float-breakpoint) {\n      margin-right: 0;\n      margin-left:  0;\n    }\n  }\n}\n\n\n//\n// Navbar alignment options\n//\n// Display the navbar across the entirety of the page or fixed it to the top or\n// bottom of the page.\n\n// Static top (unfixed, but 100% wide) navbar\n.navbar-static-top {\n  z-index: @zindex-navbar;\n  border-width: 0 0 1px;\n\n  @media (min-width: @grid-float-breakpoint) {\n    border-radius: 0;\n  }\n}\n\n// Fix the top/bottom navbars when screen real estate supports it\n.navbar-fixed-top,\n.navbar-fixed-bottom {\n  position: fixed;\n  right: 0;\n  left: 0;\n  z-index: @zindex-navbar-fixed;\n\n  // Undo the rounded corners\n  @media (min-width: @grid-float-breakpoint) {\n    border-radius: 0;\n  }\n}\n.navbar-fixed-top {\n  top: 0;\n  border-width: 0 0 1px;\n}\n.navbar-fixed-bottom {\n  bottom: 0;\n  margin-bottom: 0; // override .navbar defaults\n  border-width: 1px 0 0;\n}\n\n\n// Brand/project name\n\n.navbar-brand {\n  float: left;\n  padding: @navbar-padding-vertical @navbar-padding-horizontal;\n  font-size: @font-size-large;\n  line-height: @line-height-computed;\n  height: @navbar-height;\n\n  &:hover,\n  &:focus {\n    text-decoration: none;\n  }\n\n  > img {\n    display: block;\n  }\n\n  @media (min-width: @grid-float-breakpoint) {\n    .navbar > .container &,\n    .navbar > .container-fluid & {\n      margin-left: -@navbar-padding-horizontal;\n    }\n  }\n}\n\n\n// Navbar toggle\n//\n// Custom button for toggling the `.navbar-collapse`, powered by the collapse\n// JavaScript plugin.\n\n.navbar-toggle {\n  position: relative;\n  float: right;\n  margin-right: @navbar-padding-horizontal;\n  padding: 9px 10px;\n  .navbar-vertical-align(34px);\n  background-color: transparent;\n  background-image: none; // Reset unusual Firefox-on-Android default style; see https://github.com/necolas/normalize.css/issues/214\n  border: 1px solid transparent;\n  border-radius: @border-radius-base;\n\n  // We remove the `outline` here, but later compensate by attaching `:hover`\n  // styles to `:focus`.\n  &:focus {\n    outline: 0;\n  }\n\n  // Bars\n  .icon-bar {\n    display: block;\n    width: 22px;\n    height: 2px;\n    border-radius: 1px;\n  }\n  .icon-bar + .icon-bar {\n    margin-top: 4px;\n  }\n\n  @media (min-width: @grid-float-breakpoint) {\n    display: none;\n  }\n}\n\n\n// Navbar nav links\n//\n// Builds on top of the `.nav` components with its own modifier class to make\n// the nav the full height of the horizontal nav (above 768px).\n\n.navbar-nav {\n  margin: (@navbar-padding-vertical / 2) -@navbar-padding-horizontal;\n\n  > li > a {\n    padding-top:    10px;\n    padding-bottom: 10px;\n    line-height: @line-height-computed;\n  }\n\n  @media (max-width: @grid-float-breakpoint-max) {\n    // Dropdowns get custom display when collapsed\n    .open .dropdown-menu {\n      position: static;\n      float: none;\n      width: auto;\n      margin-top: 0;\n      background-color: transparent;\n      border: 0;\n      box-shadow: none;\n      > li > a,\n      .dropdown-header {\n        padding: 5px 15px 5px 25px;\n      }\n      > li > a {\n        line-height: @line-height-computed;\n        &:hover,\n        &:focus {\n          background-image: none;\n        }\n      }\n    }\n  }\n\n  // Uncollapse the nav\n  @media (min-width: @grid-float-breakpoint) {\n    float: left;\n    margin: 0;\n\n    > li {\n      float: left;\n      > a {\n        padding-top:    @navbar-padding-vertical;\n        padding-bottom: @navbar-padding-vertical;\n      }\n    }\n  }\n}\n\n\n// Navbar form\n//\n// Extension of the `.form-inline` with some extra flavor for optimum display in\n// our navbars.\n\n.navbar-form {\n  margin-left: -@navbar-padding-horizontal;\n  margin-right: -@navbar-padding-horizontal;\n  padding: 10px @navbar-padding-horizontal;\n  border-top: 1px solid transparent;\n  border-bottom: 1px solid transparent;\n  @shadow: inset 0 1px 0 rgba(255,255,255,.1), 0 1px 0 rgba(255,255,255,.1);\n  .box-shadow(@shadow);\n\n  // Mixin behavior for optimum display\n  .form-inline();\n\n  .form-group {\n    @media (max-width: @grid-float-breakpoint-max) {\n      margin-bottom: 5px;\n\n      &:last-child {\n        margin-bottom: 0;\n      }\n    }\n  }\n\n  // Vertically center in expanded, horizontal navbar\n  .navbar-vertical-align(@input-height-base);\n\n  // Undo 100% width for pull classes\n  @media (min-width: @grid-float-breakpoint) {\n    width: auto;\n    border: 0;\n    margin-left: 0;\n    margin-right: 0;\n    padding-top: 0;\n    padding-bottom: 0;\n    .box-shadow(none);\n  }\n}\n\n\n// Dropdown menus\n\n// Menu position and menu carets\n.navbar-nav > li > .dropdown-menu {\n  margin-top: 0;\n  .border-top-radius(0);\n}\n// Menu position and menu caret support for dropups via extra dropup class\n.navbar-fixed-bottom .navbar-nav > li > .dropdown-menu {\n  margin-bottom: 0;\n  .border-top-radius(@navbar-border-radius);\n  .border-bottom-radius(0);\n}\n\n\n// Buttons in navbars\n//\n// Vertically center a button within a navbar (when *not* in a form).\n\n.navbar-btn {\n  .navbar-vertical-align(@input-height-base);\n\n  &.btn-sm {\n    .navbar-vertical-align(@input-height-small);\n  }\n  &.btn-xs {\n    .navbar-vertical-align(22);\n  }\n}\n\n\n// Text in navbars\n//\n// Add a class to make any element properly align itself vertically within the navbars.\n\n.navbar-text {\n  .navbar-vertical-align(@line-height-computed);\n\n  @media (min-width: @grid-float-breakpoint) {\n    float: left;\n    margin-left: @navbar-padding-horizontal;\n    margin-right: @navbar-padding-horizontal;\n  }\n}\n\n\n// Component alignment\n//\n// Repurpose the pull utilities as their own navbar utilities to avoid specificity\n// issues with parents and chaining. Only do this when the navbar is uncollapsed\n// though so that navbar contents properly stack and align in mobile.\n//\n// Declared after the navbar components to ensure more specificity on the margins.\n\n@media (min-width: @grid-float-breakpoint) {\n  .navbar-left  { .pull-left(); }\n  .navbar-right {\n    .pull-right();\n    margin-right: -@navbar-padding-horizontal;\n\n    ~ .navbar-right {\n      margin-right: 0;\n    }\n  }\n}\n\n\n// Alternate navbars\n// --------------------------------------------------\n\n// Default navbar\n.navbar-default {\n  background-color: @navbar-default-bg;\n  border-color: @navbar-default-border;\n\n  .navbar-brand {\n    color: @navbar-default-brand-color;\n    &:hover,\n    &:focus {\n      color: @navbar-default-brand-hover-color;\n      background-color: @navbar-default-brand-hover-bg;\n    }\n  }\n\n  .navbar-text {\n    color: @navbar-default-color;\n  }\n\n  .navbar-nav {\n    > li > a {\n      color: @navbar-default-link-color;\n\n      &:hover,\n      &:focus {\n        color: @navbar-default-link-hover-color;\n        background-color: @navbar-default-link-hover-bg;\n      }\n    }\n    > .active > a {\n      &,\n      &:hover,\n      &:focus {\n        color: @navbar-default-link-active-color;\n        background-color: @navbar-default-link-active-bg;\n      }\n    }\n    > .disabled > a {\n      &,\n      &:hover,\n      &:focus {\n        color: @navbar-default-link-disabled-color;\n        background-color: @navbar-default-link-disabled-bg;\n      }\n    }\n  }\n\n  .navbar-toggle {\n    border-color: @navbar-default-toggle-border-color;\n    &:hover,\n    &:focus {\n      background-color: @navbar-default-toggle-hover-bg;\n    }\n    .icon-bar {\n      background-color: @navbar-default-toggle-icon-bar-bg;\n    }\n  }\n\n  .navbar-collapse,\n  .navbar-form {\n    border-color: @navbar-default-border;\n  }\n\n  // Dropdown menu items\n  .navbar-nav {\n    // Remove background color from open dropdown\n    > .open > a {\n      &,\n      &:hover,\n      &:focus {\n        background-color: @navbar-default-link-active-bg;\n        color: @navbar-default-link-active-color;\n      }\n    }\n\n    @media (max-width: @grid-float-breakpoint-max) {\n      // Dropdowns get custom display when collapsed\n      .open .dropdown-menu {\n        > li > a {\n          color: @navbar-default-link-color;\n          &:hover,\n          &:focus {\n            color: @navbar-default-link-hover-color;\n            background-color: @navbar-default-link-hover-bg;\n          }\n        }\n        > .active > a {\n          &,\n          &:hover,\n          &:focus {\n            color: @navbar-default-link-active-color;\n            background-color: @navbar-default-link-active-bg;\n          }\n        }\n        > .disabled > a {\n          &,\n          &:hover,\n          &:focus {\n            color: @navbar-default-link-disabled-color;\n            background-color: @navbar-default-link-disabled-bg;\n          }\n        }\n      }\n    }\n  }\n\n\n  // Links in navbars\n  //\n  // Add a class to ensure links outside the navbar nav are colored correctly.\n\n  .navbar-link {\n    color: @navbar-default-link-color;\n    &:hover {\n      color: @navbar-default-link-hover-color;\n    }\n  }\n\n  .btn-link {\n    color: @navbar-default-link-color;\n    &:hover,\n    &:focus {\n      color: @navbar-default-link-hover-color;\n    }\n    &[disabled],\n    fieldset[disabled] & {\n      &:hover,\n      &:focus {\n        color: @navbar-default-link-disabled-color;\n      }\n    }\n  }\n}\n\n// Inverse navbar\n\n.navbar-inverse {\n  background-color: @navbar-inverse-bg;\n  border-color: @navbar-inverse-border;\n\n  .navbar-brand {\n    color: @navbar-inverse-brand-color;\n    &:hover,\n    &:focus {\n      color: @navbar-inverse-brand-hover-color;\n      background-color: @navbar-inverse-brand-hover-bg;\n    }\n  }\n\n  .navbar-text {\n    color: @navbar-inverse-color;\n  }\n\n  .navbar-nav {\n    > li > a {\n      color: @navbar-inverse-link-color;\n\n      &:hover,\n      &:focus {\n        color: @navbar-inverse-link-hover-color;\n        background-color: @navbar-inverse-link-hover-bg;\n      }\n    }\n    > .active > a {\n      &,\n      &:hover,\n      &:focus {\n        color: @navbar-inverse-link-active-color;\n        background-color: @navbar-inverse-link-active-bg;\n      }\n    }\n    > .disabled > a {\n      &,\n      &:hover,\n      &:focus {\n        color: @navbar-inverse-link-disabled-color;\n        background-color: @navbar-inverse-link-disabled-bg;\n      }\n    }\n  }\n\n  // Darken the responsive nav toggle\n  .navbar-toggle {\n    border-color: @navbar-inverse-toggle-border-color;\n    &:hover,\n    &:focus {\n      background-color: @navbar-inverse-toggle-hover-bg;\n    }\n    .icon-bar {\n      background-color: @navbar-inverse-toggle-icon-bar-bg;\n    }\n  }\n\n  .navbar-collapse,\n  .navbar-form {\n    border-color: darken(@navbar-inverse-bg, 7%);\n  }\n\n  // Dropdowns\n  .navbar-nav {\n    > .open > a {\n      &,\n      &:hover,\n      &:focus {\n        background-color: @navbar-inverse-link-active-bg;\n        color: @navbar-inverse-link-active-color;\n      }\n    }\n\n    @media (max-width: @grid-float-breakpoint-max) {\n      // Dropdowns get custom display\n      .open .dropdown-menu {\n        > .dropdown-header {\n          border-color: @navbar-inverse-border;\n        }\n        .divider {\n          background-color: @navbar-inverse-border;\n        }\n        > li > a {\n          color: @navbar-inverse-link-color;\n          &:hover,\n          &:focus {\n            color: @navbar-inverse-link-hover-color;\n            background-color: @navbar-inverse-link-hover-bg;\n          }\n        }\n        > .active > a {\n          &,\n          &:hover,\n          &:focus {\n            color: @navbar-inverse-link-active-color;\n            background-color: @navbar-inverse-link-active-bg;\n          }\n        }\n        > .disabled > a {\n          &,\n          &:hover,\n          &:focus {\n            color: @navbar-inverse-link-disabled-color;\n            background-color: @navbar-inverse-link-disabled-bg;\n          }\n        }\n      }\n    }\n  }\n\n  .navbar-link {\n    color: @navbar-inverse-link-color;\n    &:hover {\n      color: @navbar-inverse-link-hover-color;\n    }\n  }\n\n  .btn-link {\n    color: @navbar-inverse-link-color;\n    &:hover,\n    &:focus {\n      color: @navbar-inverse-link-hover-color;\n    }\n    &[disabled],\n    fieldset[disabled] & {\n      &:hover,\n      &:focus {\n        color: @navbar-inverse-link-disabled-color;\n      }\n    }\n  }\n}\n","// Navbar vertical align\n//\n// Vertically center elements in the navbar.\n// Example: an element has a height of 30px, so write out `.navbar-vertical-align(30px);` to calculate the appropriate top margin.\n\n.navbar-vertical-align(@element-height) {\n  margin-top: ((@navbar-height - @element-height) / 2);\n  margin-bottom: ((@navbar-height - @element-height) / 2);\n}\n","//\n// Utility classes\n// --------------------------------------------------\n\n\n// Floats\n// -------------------------\n\n.clearfix {\n  .clearfix();\n}\n.center-block {\n  .center-block();\n}\n.pull-right {\n  float: right !important;\n}\n.pull-left {\n  float: left !important;\n}\n\n\n// Toggling content\n// -------------------------\n\n// Note: Deprecated .hide in favor of .hidden or .sr-only (as appropriate) in v3.0.1\n.hide {\n  display: none !important;\n}\n.show {\n  display: block !important;\n}\n.invisible {\n  visibility: hidden;\n}\n.text-hide {\n  .text-hide();\n}\n\n\n// Hide from screenreaders and browsers\n//\n// Credit: HTML5 Boilerplate\n\n.hidden {\n  display: none !important;\n}\n\n\n// For Affix plugin\n// -------------------------\n\n.affix {\n  position: fixed;\n}\n","//\n// Breadcrumbs\n// --------------------------------------------------\n\n\n.breadcrumb {\n  padding: @breadcrumb-padding-vertical @breadcrumb-padding-horizontal;\n  margin-bottom: @line-height-computed;\n  list-style: none;\n  background-color: @breadcrumb-bg;\n  border-radius: @border-radius-base;\n\n  > li {\n    display: inline-block;\n\n    + li:before {\n      content: \"@{breadcrumb-separator}\\00a0\"; // Unicode space added since inline-block means non-collapsing white-space\n      padding: 0 5px;\n      color: @breadcrumb-color;\n    }\n  }\n\n  > .active {\n    color: @breadcrumb-active-color;\n  }\n}\n","//\n// Pagination (multiple pages)\n// --------------------------------------------------\n.pagination {\n  display: inline-block;\n  padding-left: 0;\n  margin: @line-height-computed 0;\n  border-radius: @border-radius-base;\n\n  > li {\n    display: inline; // Remove list-style and block-level defaults\n    > a,\n    > span {\n      position: relative;\n      float: left; // Collapse white-space\n      padding: @padding-base-vertical @padding-base-horizontal;\n      line-height: @line-height-base;\n      text-decoration: none;\n      color: @pagination-color;\n      background-color: @pagination-bg;\n      border: 1px solid @pagination-border;\n      margin-left: -1px;\n    }\n    &:first-child {\n      > a,\n      > span {\n        margin-left: 0;\n        .border-left-radius(@border-radius-base);\n      }\n    }\n    &:last-child {\n      > a,\n      > span {\n        .border-right-radius(@border-radius-base);\n      }\n    }\n  }\n\n  > li > a,\n  > li > span {\n    &:hover,\n    &:focus {\n      z-index: 2;\n      color: @pagination-hover-color;\n      background-color: @pagination-hover-bg;\n      border-color: @pagination-hover-border;\n    }\n  }\n\n  > .active > a,\n  > .active > span {\n    &,\n    &:hover,\n    &:focus {\n      z-index: 3;\n      color: @pagination-active-color;\n      background-color: @pagination-active-bg;\n      border-color: @pagination-active-border;\n      cursor: default;\n    }\n  }\n\n  > .disabled {\n    > span,\n    > span:hover,\n    > span:focus,\n    > a,\n    > a:hover,\n    > a:focus {\n      color: @pagination-disabled-color;\n      background-color: @pagination-disabled-bg;\n      border-color: @pagination-disabled-border;\n      cursor: @cursor-disabled;\n    }\n  }\n}\n\n// Sizing\n// --------------------------------------------------\n\n// Large\n.pagination-lg {\n  .pagination-size(@padding-large-vertical; @padding-large-horizontal; @font-size-large; @line-height-large; @border-radius-large);\n}\n\n// Small\n.pagination-sm {\n  .pagination-size(@padding-small-vertical; @padding-small-horizontal; @font-size-small; @line-height-small; @border-radius-small);\n}\n","// Pagination\n\n.pagination-size(@padding-vertical; @padding-horizontal; @font-size; @line-height; @border-radius) {\n  > li {\n    > a,\n    > span {\n      padding: @padding-vertical @padding-horizontal;\n      font-size: @font-size;\n      line-height: @line-height;\n    }\n    &:first-child {\n      > a,\n      > span {\n        .border-left-radius(@border-radius);\n      }\n    }\n    &:last-child {\n      > a,\n      > span {\n        .border-right-radius(@border-radius);\n      }\n    }\n  }\n}\n","//\n// Pager pagination\n// --------------------------------------------------\n\n\n.pager {\n  padding-left: 0;\n  margin: @line-height-computed 0;\n  list-style: none;\n  text-align: center;\n  &:extend(.clearfix all);\n  li {\n    display: inline;\n    > a,\n    > span {\n      display: inline-block;\n      padding: 5px 14px;\n      background-color: @pager-bg;\n      border: 1px solid @pager-border;\n      border-radius: @pager-border-radius;\n    }\n\n    > a:hover,\n    > a:focus {\n      text-decoration: none;\n      background-color: @pager-hover-bg;\n    }\n  }\n\n  .next {\n    > a,\n    > span {\n      float: right;\n    }\n  }\n\n  .previous {\n    > a,\n    > span {\n      float: left;\n    }\n  }\n\n  .disabled {\n    > a,\n    > a:hover,\n    > a:focus,\n    > span {\n      color: @pager-disabled-color;\n      background-color: @pager-bg;\n      cursor: @cursor-disabled;\n    }\n  }\n}\n","//\n// Labels\n// --------------------------------------------------\n\n.label {\n  display: inline;\n  padding: .2em .6em .3em;\n  font-size: 75%;\n  font-weight: bold;\n  line-height: 1;\n  color: @label-color;\n  text-align: center;\n  white-space: nowrap;\n  vertical-align: baseline;\n  border-radius: .25em;\n\n  // Add hover effects, but only for links\n  a& {\n    &:hover,\n    &:focus {\n      color: @label-link-hover-color;\n      text-decoration: none;\n      cursor: pointer;\n    }\n  }\n\n  // Empty labels collapse automatically (not available in IE8)\n  &:empty {\n    display: none;\n  }\n\n  // Quick fix for labels in buttons\n  .btn & {\n    position: relative;\n    top: -1px;\n  }\n}\n\n// Colors\n// Contextual variations (linked labels get darker on :hover)\n\n.label-default {\n  .label-variant(@label-default-bg);\n}\n\n.label-primary {\n  .label-variant(@label-primary-bg);\n}\n\n.label-success {\n  .label-variant(@label-success-bg);\n}\n\n.label-info {\n  .label-variant(@label-info-bg);\n}\n\n.label-warning {\n  .label-variant(@label-warning-bg);\n}\n\n.label-danger {\n  .label-variant(@label-danger-bg);\n}\n","// Labels\n\n.label-variant(@color) {\n  background-color: @color;\n\n  &[href] {\n    &:hover,\n    &:focus {\n      background-color: darken(@color, 10%);\n    }\n  }\n}\n","//\n// Badges\n// --------------------------------------------------\n\n\n// Base class\n.badge {\n  display: inline-block;\n  min-width: 10px;\n  padding: 3px 7px;\n  font-size: @font-size-small;\n  font-weight: @badge-font-weight;\n  color: @badge-color;\n  line-height: @badge-line-height;\n  vertical-align: middle;\n  white-space: nowrap;\n  text-align: center;\n  background-color: @badge-bg;\n  border-radius: @badge-border-radius;\n\n  // Empty badges collapse automatically (not available in IE8)\n  &:empty {\n    display: none;\n  }\n\n  // Quick fix for badges in buttons\n  .btn & {\n    position: relative;\n    top: -1px;\n  }\n\n  .btn-xs &,\n  .btn-group-xs > .btn & {\n    top: 0;\n    padding: 1px 5px;\n  }\n\n  // Hover state, but only for links\n  a& {\n    &:hover,\n    &:focus {\n      color: @badge-link-hover-color;\n      text-decoration: none;\n      cursor: pointer;\n    }\n  }\n\n  // Account for badges in navs\n  .list-group-item.active > &,\n  .nav-pills > .active > a > & {\n    color: @badge-active-color;\n    background-color: @badge-active-bg;\n  }\n\n  .list-group-item > & {\n    float: right;\n  }\n\n  .list-group-item > & + & {\n    margin-right: 5px;\n  }\n\n  .nav-pills > li > a > & {\n    margin-left: 3px;\n  }\n}\n","//\n// Jumbotron\n// --------------------------------------------------\n\n\n.jumbotron {\n  padding-top:    @jumbotron-padding;\n  padding-bottom: @jumbotron-padding;\n  margin-bottom: @jumbotron-padding;\n  color: @jumbotron-color;\n  background-color: @jumbotron-bg;\n\n  h1,\n  .h1 {\n    color: @jumbotron-heading-color;\n  }\n\n  p {\n    margin-bottom: (@jumbotron-padding / 2);\n    font-size: @jumbotron-font-size;\n    font-weight: 200;\n  }\n\n  > hr {\n    border-top-color: darken(@jumbotron-bg, 10%);\n  }\n\n  .container &,\n  .container-fluid & {\n    border-radius: @border-radius-large; // Only round corners at higher resolutions if contained in a container\n    padding-left:  (@grid-gutter-width / 2);\n    padding-right: (@grid-gutter-width / 2);\n  }\n\n  .container {\n    max-width: 100%;\n  }\n\n  @media screen and (min-width: @screen-sm-min) {\n    padding-top:    (@jumbotron-padding * 1.6);\n    padding-bottom: (@jumbotron-padding * 1.6);\n\n    .container &,\n    .container-fluid & {\n      padding-left:  (@jumbotron-padding * 2);\n      padding-right: (@jumbotron-padding * 2);\n    }\n\n    h1,\n    .h1 {\n      font-size: @jumbotron-heading-font-size;\n    }\n  }\n}\n","//\n// Thumbnails\n// --------------------------------------------------\n\n\n// Mixin and adjust the regular image class\n.thumbnail {\n  display: block;\n  padding: @thumbnail-padding;\n  margin-bottom: @line-height-computed;\n  line-height: @line-height-base;\n  background-color: @thumbnail-bg;\n  border: 1px solid @thumbnail-border;\n  border-radius: @thumbnail-border-radius;\n  .transition(border .2s ease-in-out);\n\n  > img,\n  a > img {\n    &:extend(.img-responsive);\n    margin-left: auto;\n    margin-right: auto;\n  }\n\n  // Add a hover state for linked versions only\n  a&:hover,\n  a&:focus,\n  a&.active {\n    border-color: @link-color;\n  }\n\n  // Image captions\n  .caption {\n    padding: @thumbnail-caption-padding;\n    color: @thumbnail-caption-color;\n  }\n}\n","//\n// Alerts\n// --------------------------------------------------\n\n\n// Base styles\n// -------------------------\n\n.alert {\n  padding: @alert-padding;\n  margin-bottom: @line-height-computed;\n  border: 1px solid transparent;\n  border-radius: @alert-border-radius;\n\n  // Headings for larger alerts\n  h4 {\n    margin-top: 0;\n    // Specified for the h4 to prevent conflicts of changing @headings-color\n    color: inherit;\n  }\n\n  // Provide class for links that match alerts\n  .alert-link {\n    font-weight: @alert-link-font-weight;\n  }\n\n  // Improve alignment and spacing of inner content\n  > p,\n  > ul {\n    margin-bottom: 0;\n  }\n\n  > p + p {\n    margin-top: 5px;\n  }\n}\n\n// Dismissible alerts\n//\n// Expand the right padding and account for the close button's positioning.\n\n.alert-dismissable, // The misspelled .alert-dismissable was deprecated in 3.2.0.\n.alert-dismissible {\n  padding-right: (@alert-padding + 20);\n\n  // Adjust close link position\n  .close {\n    position: relative;\n    top: -2px;\n    right: -21px;\n    color: inherit;\n  }\n}\n\n// Alternate styles\n//\n// Generate contextual modifier classes for colorizing the alert.\n\n.alert-success {\n  .alert-variant(@alert-success-bg; @alert-success-border; @alert-success-text);\n}\n\n.alert-info {\n  .alert-variant(@alert-info-bg; @alert-info-border; @alert-info-text);\n}\n\n.alert-warning {\n  .alert-variant(@alert-warning-bg; @alert-warning-border; @alert-warning-text);\n}\n\n.alert-danger {\n  .alert-variant(@alert-danger-bg; @alert-danger-border; @alert-danger-text);\n}\n","// Alerts\n\n.alert-variant(@background; @border; @text-color) {\n  background-color: @background;\n  border-color: @border;\n  color: @text-color;\n\n  hr {\n    border-top-color: darken(@border, 5%);\n  }\n  .alert-link {\n    color: darken(@text-color, 10%);\n  }\n}\n","//\n// Progress bars\n// --------------------------------------------------\n\n\n// Bar animations\n// -------------------------\n\n// WebKit\n@-webkit-keyframes progress-bar-stripes {\n  from  { background-position: 40px 0; }\n  to    { background-position: 0 0; }\n}\n\n// Spec and IE10+\n@keyframes progress-bar-stripes {\n  from  { background-position: 40px 0; }\n  to    { background-position: 0 0; }\n}\n\n\n// Bar itself\n// -------------------------\n\n// Outer container\n.progress {\n  overflow: hidden;\n  height: @line-height-computed;\n  margin-bottom: @line-height-computed;\n  background-color: @progress-bg;\n  border-radius: @progress-border-radius;\n  .box-shadow(inset 0 1px 2px rgba(0,0,0,.1));\n}\n\n// Bar of progress\n.progress-bar {\n  float: left;\n  width: 0%;\n  height: 100%;\n  font-size: @font-size-small;\n  line-height: @line-height-computed;\n  color: @progress-bar-color;\n  text-align: center;\n  background-color: @progress-bar-bg;\n  .box-shadow(inset 0 -1px 0 rgba(0,0,0,.15));\n  .transition(width .6s ease);\n}\n\n// Striped bars\n//\n// `.progress-striped .progress-bar` is deprecated as of v3.2.0 in favor of the\n// `.progress-bar-striped` class, which you just add to an existing\n// `.progress-bar`.\n.progress-striped .progress-bar,\n.progress-bar-striped {\n  #gradient > .striped();\n  background-size: 40px 40px;\n}\n\n// Call animation for the active one\n//\n// `.progress.active .progress-bar` is deprecated as of v3.2.0 in favor of the\n// `.progress-bar.active` approach.\n.progress.active .progress-bar,\n.progress-bar.active {\n  .animation(progress-bar-stripes 2s linear infinite);\n}\n\n\n// Variations\n// -------------------------\n\n.progress-bar-success {\n  .progress-bar-variant(@progress-bar-success-bg);\n}\n\n.progress-bar-info {\n  .progress-bar-variant(@progress-bar-info-bg);\n}\n\n.progress-bar-warning {\n  .progress-bar-variant(@progress-bar-warning-bg);\n}\n\n.progress-bar-danger {\n  .progress-bar-variant(@progress-bar-danger-bg);\n}\n","// Gradients\n\n#gradient {\n\n  // Horizontal gradient, from left to right\n  //\n  // Creates two color stops, start and end, by specifying a color and position for each color stop.\n  // Color stops are not available in IE9 and below.\n  .horizontal(@start-color: #555; @end-color: #333; @start-percent: 0%; @end-percent: 100%) {\n    background-image: -webkit-linear-gradient(left, @start-color @start-percent, @end-color @end-percent); // Safari 5.1-6, Chrome 10+\n    background-image: -o-linear-gradient(left, @start-color @start-percent, @end-color @end-percent); // Opera 12\n    background-image: linear-gradient(to right, @start-color @start-percent, @end-color @end-percent); // Standard, IE10, Firefox 16+, Opera 12.10+, Safari 7+, Chrome 26+\n    background-repeat: repeat-x;\n    filter: e(%(\"progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=1)\",argb(@start-color),argb(@end-color))); // IE9 and down\n  }\n\n  // Vertical gradient, from top to bottom\n  //\n  // Creates two color stops, start and end, by specifying a color and position for each color stop.\n  // Color stops are not available in IE9 and below.\n  .vertical(@start-color: #555; @end-color: #333; @start-percent: 0%; @end-percent: 100%) {\n    background-image: -webkit-linear-gradient(top, @start-color @start-percent, @end-color @end-percent);  // Safari 5.1-6, Chrome 10+\n    background-image: -o-linear-gradient(top, @start-color @start-percent, @end-color @end-percent);  // Opera 12\n    background-image: linear-gradient(to bottom, @start-color @start-percent, @end-color @end-percent); // Standard, IE10, Firefox 16+, Opera 12.10+, Safari 7+, Chrome 26+\n    background-repeat: repeat-x;\n    filter: e(%(\"progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=0)\",argb(@start-color),argb(@end-color))); // IE9 and down\n  }\n\n  .directional(@start-color: #555; @end-color: #333; @deg: 45deg) {\n    background-repeat: repeat-x;\n    background-image: -webkit-linear-gradient(@deg, @start-color, @end-color); // Safari 5.1-6, Chrome 10+\n    background-image: -o-linear-gradient(@deg, @start-color, @end-color); // Opera 12\n    background-image: linear-gradient(@deg, @start-color, @end-color); // Standard, IE10, Firefox 16+, Opera 12.10+, Safari 7+, Chrome 26+\n  }\n  .horizontal-three-colors(@start-color: #00b3ee; @mid-color: #7a43b6; @color-stop: 50%; @end-color: #c3325f) {\n    background-image: -webkit-linear-gradient(left, @start-color, @mid-color @color-stop, @end-color);\n    background-image: -o-linear-gradient(left, @start-color, @mid-color @color-stop, @end-color);\n    background-image: linear-gradient(to right, @start-color, @mid-color @color-stop, @end-color);\n    background-repeat: no-repeat;\n    filter: e(%(\"progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=1)\",argb(@start-color),argb(@end-color))); // IE9 and down, gets no color-stop at all for proper fallback\n  }\n  .vertical-three-colors(@start-color: #00b3ee; @mid-color: #7a43b6; @color-stop: 50%; @end-color: #c3325f) {\n    background-image: -webkit-linear-gradient(@start-color, @mid-color @color-stop, @end-color);\n    background-image: -o-linear-gradient(@start-color, @mid-color @color-stop, @end-color);\n    background-image: linear-gradient(@start-color, @mid-color @color-stop, @end-color);\n    background-repeat: no-repeat;\n    filter: e(%(\"progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=0)\",argb(@start-color),argb(@end-color))); // IE9 and down, gets no color-stop at all for proper fallback\n  }\n  .radial(@inner-color: #555; @outer-color: #333) {\n    background-image: -webkit-radial-gradient(circle, @inner-color, @outer-color);\n    background-image: radial-gradient(circle, @inner-color, @outer-color);\n    background-repeat: no-repeat;\n  }\n  .striped(@color: rgba(255,255,255,.15); @angle: 45deg) {\n    background-image: -webkit-linear-gradient(@angle, @color 25%, transparent 25%, transparent 50%, @color 50%, @color 75%, transparent 75%, transparent);\n    background-image: -o-linear-gradient(@angle, @color 25%, transparent 25%, transparent 50%, @color 50%, @color 75%, transparent 75%, transparent);\n    background-image: linear-gradient(@angle, @color 25%, transparent 25%, transparent 50%, @color 50%, @color 75%, transparent 75%, transparent);\n  }\n}\n","// Progress bars\n\n.progress-bar-variant(@color) {\n  background-color: @color;\n\n  // Deprecated parent class requirement as of v3.2.0\n  .progress-striped & {\n    #gradient > .striped();\n  }\n}\n",".media {\n  // Proper spacing between instances of .media\n  margin-top: 15px;\n\n  &:first-child {\n    margin-top: 0;\n  }\n}\n\n.media,\n.media-body {\n  zoom: 1;\n  overflow: hidden;\n}\n\n.media-body {\n  width: 10000px;\n}\n\n.media-object {\n  display: block;\n\n  // Fix collapse in webkit from max-width: 100% and display: table-cell.\n  &.img-thumbnail {\n    max-width: none;\n  }\n}\n\n.media-right,\n.media > .pull-right {\n  padding-left: 10px;\n}\n\n.media-left,\n.media > .pull-left {\n  padding-right: 10px;\n}\n\n.media-left,\n.media-right,\n.media-body {\n  display: table-cell;\n  vertical-align: top;\n}\n\n.media-middle {\n  vertical-align: middle;\n}\n\n.media-bottom {\n  vertical-align: bottom;\n}\n\n// Reset margins on headings for tighter default spacing\n.media-heading {\n  margin-top: 0;\n  margin-bottom: 5px;\n}\n\n// Media list variation\n//\n// Undo default ul/ol styles\n.media-list {\n  padding-left: 0;\n  list-style: none;\n}\n","//\n// List groups\n// --------------------------------------------------\n\n\n// Base class\n//\n// Easily usable on