diff --git a/README.md b/README.md index 95f2796..3e1ed11 100644 --- a/README.md +++ b/README.md @@ -2,9 +2,16 @@ ## WORK IN PROGRESS -Component is working very well so far with Kobra 3 Combos and Kobra 2s but will still have bugs that I'll need help ironing out. +Component is working very well so far with: +- Kobra 3 Combo +- Kobra 2 +- Photon Mono M5s (Basic support still) -Should also work with multiple printers but untested until someone buys me a second printer :) +If you have success with other printers please report it :) + +It will still have bugs that I'll need help ironing out. + +Should also work with multiple printers now, although I can't test this myself :) ## Gallery diff --git a/Version b/Version index a60f4fc..f7466cc 100644 --- a/Version +++ b/Version @@ -7,3 +7,4 @@ Version: 0.0.9 20240807 - Minor bug fixes Version: 0.0.10 20240811 - Bug fix for config flow, add more frontend buttons / option modals Version: 0.0.11 20240813 - Frontend improvements to panel print pages, data refactor, work on Resin printer bugs Version: 0.0.12 20240816 - Minor bug fix in MQTT reconnect, untested support for multiple ACE units, frontend refactoring +Version: 0.0.13 20240825 - Bug fixes for multiple printers, HomeAssistant 2024.8 and Resin printers diff --git a/custom_components/anycubic_cloud/anycubic_cloud_api/anycubic_api.py b/custom_components/anycubic_cloud/anycubic_cloud_api/anycubic_api.py index 91f4e56..6eb46e5 100644 --- a/custom_components/anycubic_cloud/anycubic_cloud_api/anycubic_api.py +++ b/custom_components/anycubic_cloud/anycubic_cloud_api/anycubic_api.py @@ -2013,16 +2013,30 @@ async def list_all_projects( data = list([AnycubicProject.from_list_json(self, x) for x in resp['data']]) return data - async def project_info_for_id(self, project_id): + async def project_info_for_id( + self, + project_id, + ): query = { 'id': str(project_id) } resp = await self._fetch_api_resp(endpoint=API_ENDPOINT.project_info, query=query) return resp['data'] - async def get_latest_project(self): + async def get_latest_project( + self, + printer_id=None, + ): projects = await self.list_all_projects() - latest_project = projects[0] if projects and len(projects) > 0 else None + + latest_project = None + + if projects and len(projects) > 0: + for proj in projects: + if printer_id is None or proj.printer_id == printer_id: + latest_project = proj + break + if latest_project: extra_proj_data = await self.project_info_for_id(latest_project.id) latest_project.update_extra_data(extra_proj_data) diff --git a/custom_components/anycubic_cloud/anycubic_cloud_api/anycubic_api_mqtt.py b/custom_components/anycubic_cloud/anycubic_cloud_api/anycubic_api_mqtt.py index eed5742..eebb3b5 100644 --- a/custom_components/anycubic_cloud/anycubic_cloud_api/anycubic_api_mqtt.py +++ b/custom_components/anycubic_cloud/anycubic_cloud_api/anycubic_api_mqtt.py @@ -41,6 +41,7 @@ def __init__( self, *args, mqtt_callback_printer_update=None, + mqtt_callback_printer_busy=None, **kwargs, ): self._api_username = None @@ -53,6 +54,7 @@ def __init__( self._mqtt_connected: asyncio.Event | None = None self._mqtt_disconnected: asyncio.Event | None = None self._mqtt_callback_printer_update = mqtt_callback_printer_update + self._mqtt_callback_printer_busy = mqtt_callback_printer_busy super().__init__(*args, **kwargs) @property @@ -144,11 +146,20 @@ def _mqtt_message_router(self, message): printer = self._mqtt_subscribed_printers[printer_key] + printer_was_available = printer.is_available + try: printer.process_mqtt_update(topic, payload) if self._mqtt_callback_printer_update: self._mqtt_callback_printer_update() + + if ( + self._mqtt_callback_printer_busy and + printer_was_available and printer.is_busy + ): + self._mqtt_callback_printer_busy() + except Exception as e: tb = traceback.format_exc() self._log_to_error(f"Anycubic MQTT Message error: {e}\n on MQTT topic: {topic}\n {payload}\n{tb}") diff --git a/custom_components/anycubic_cloud/anycubic_cloud_api/anycubic_data_model_files.py b/custom_components/anycubic_cloud/anycubic_cloud_api/anycubic_data_model_files.py index 5c0e5a8..8fb2d5d 100644 --- a/custom_components/anycubic_cloud/anycubic_cloud_api/anycubic_data_model_files.py +++ b/custom_components/anycubic_cloud/anycubic_cloud_api/anycubic_data_model_files.py @@ -303,8 +303,8 @@ def __init__( is_dir, ): self._filename = str(filename) - self._timestamp = int(timestamp) - self._size = int(size) + self._timestamp = int(timestamp) if timestamp is not None else 0 + self._size = int(size) if size is not None else 0 self._is_dir = bool(is_dir) @classmethod @@ -314,8 +314,8 @@ def from_json(cls, data): return cls( filename=data['filename'], - timestamp=data['timestamp'], - size=data['size'], + timestamp=data.get('timestamp'), + size=data.get('size'), is_dir=data['is_dir'], ) diff --git a/custom_components/anycubic_cloud/anycubic_cloud_api/anycubic_data_model_printer.py b/custom_components/anycubic_cloud/anycubic_cloud_api/anycubic_data_model_printer.py index 576a03e..33b3556 100644 --- a/custom_components/anycubic_cloud/anycubic_cloud_api/anycubic_data_model_printer.py +++ b/custom_components/anycubic_cloud/anycubic_cloud_api/anycubic_data_model_printer.py @@ -23,6 +23,7 @@ from .anycubic_enums import ( AnycubicFunctionID, + AnycubicPrinterMaterialType, AnycubicPrintStatus, ) @@ -112,7 +113,7 @@ def __init__( self._last_update_time = last_update_time self._set_machine_data(machine_data) self._set_type_function_ids(type_function_ids) - self._material_type = material_type + self._set_material_type(material_type) self._set_parameter(parameter) self._set_fw_version(fw_version) self._available = available @@ -151,6 +152,17 @@ def _set_type_function_ids(self, type_function_ids): else: self._type_function_ids = list() + def _set_material_type(self, material_type): + if material_type and isinstance(material_type, str): + try: + self._material_type = AnycubicPrinterMaterialType(material_type.title()) + + except ValueError: + self._material_type = material_type + + else: + self._material_type = None + def _set_local_file_list(self, file_list): if file_list is None: return @@ -413,7 +425,7 @@ def update_from_info_json(self, data): self._create_time = extra_data.get('create_time') self._set_machine_data(data.get('machine_data')) self._set_type_function_ids(data['type_function_ids']) - self._material_type = extra_data.get('material_type') + self._set_material_type(extra_data.get('material_type')) self._set_parameter(data.get('parameter')) self._update_fw_version_from_json(data['version']) self._set_tools(data.get('tools')) @@ -1600,6 +1612,69 @@ def latest_project_available_print_speed_modes_data_object(self): return None + @property + def latest_project_print_model_height(self): + if self.latest_project: + return self.latest_project.print_model_height + + return None + + @property + def latest_project_print_anti_alias_count(self): + if self.latest_project: + return self.latest_project.print_anti_alias_count + + return None + + @property + def latest_project_print_on_time(self): + if self.latest_project: + return self.latest_project.print_on_time + + return None + + @property + def latest_project_print_off_time(self): + if self.latest_project: + return self.latest_project.print_off_time + + return None + + @property + def latest_project_print_bottom_time(self): + if self.latest_project: + return self.latest_project.print_bottom_time + + return None + + @property + def latest_project_print_bottom_layers(self): + if self.latest_project: + return self.latest_project.print_bottom_layers + + return None + + @property + def latest_project_print_z_up_height(self): + if self.latest_project: + return self.latest_project.print_z_up_height + + return None + + @property + def latest_project_print_z_up_speed(self): + if self.latest_project: + return self.latest_project.print_z_up_speed + + return None + + @property + def latest_project_print_z_down_speed(self): + if self.latest_project: + return self.latest_project.print_z_down_speed + + return None + @property def curr_nozzle_temp(self): if self.parameter: @@ -1646,7 +1721,7 @@ async def update_info_from_api(self, with_project=True): await self._api_parent.printer_info_for_id(self._id, self) if with_project: - self._latest_project = await self._api_parent.get_latest_project() + self._latest_project = await self._api_parent.get_latest_project(self.id) async def request_local_file_list( self, diff --git a/custom_components/anycubic_cloud/anycubic_cloud_api/anycubic_data_model_project.py b/custom_components/anycubic_cloud/anycubic_cloud_api/anycubic_data_model_project.py index b29dcdf..58d61c4 100644 --- a/custom_components/anycubic_cloud/anycubic_cloud_api/anycubic_data_model_project.py +++ b/custom_components/anycubic_cloud/anycubic_cloud_api/anycubic_data_model_project.py @@ -10,6 +10,7 @@ ) from .anycubic_exceptions import ( + AnycubicDataParsingError, AnycubicInvalidValue, AnycubicPropertiesNotLoaded, ) @@ -112,13 +113,13 @@ def __init__( self._slice_start_time = int(slice_start_time) if slice_start_time is not None else None self._slice_end_time = int(slice_end_time) if slice_end_time is not None else None self._total_time = str(total_time) if total_time is not None else None - self._print_time = str(print_time) if print_time is not None else None + self._print_time = int(print_time) if print_time is not None else None self._slice_param = slice_param self._delete = int(delete) if delete is not None else None self._auto_operation = auto_operation self._monitor = monitor self._last_update_time = int(last_update_time) if last_update_time is not None else None - self._settings = settings + self._set_settings(settings) self._localtask = str(localtask) if localtask is not None else None self._source = str(source) if source is not None else None self._device_message = device_message @@ -156,11 +157,6 @@ def __init__( self._slice_param = json.loads(str(self._slice_param)) except Exception as e: print(f"Error in json parsing slice_param: {e}\n{self._slice_param}") - if self._settings and isinstance(self._settings, str): - try: - self._settings = json.loads(str(self._settings)) - except Exception as e: - print(f"Error in json parsing settings: {e}\n{self._settings}") if self._slice_result and isinstance(self._slice_result, str): try: self._slice_result = json.loads(str(self._slice_result)) @@ -363,16 +359,74 @@ def update_slice_param( ): self._slice_param = new_slice_param - def update_settings( + def _set_settings( self, new_settings, ): - self._settings = new_settings + self._settings = {} + + if new_settings and isinstance(new_settings, str): + try: + self._settings.update(json.loads(new_settings)) + except Exception as e: + raise AnycubicDataParsingError( + f"Error parsing project settings json: {e}\n{new_settings}" + ) + + elif new_settings and isinstance(new_settings, dict): + self._settings.update(new_settings) + + elif new_settings: + raise AnycubicDataParsingError( + f"Unexpected data for project settings: {new_settings}" + ) + + def _get_print_setting(self, key): + return self._settings.get(key) + + def _get_inner_print_setting(self, key): + return self._settings.get('settings', {}).get(key) + + def _get_print_setting_as_int(self, key): + val = self._get_print_setting(key) + + if val is not None: + return int(val) + + return None + + def _get_print_setting_as_float(self, key): + val = self._get_print_setting(key) + + if val is not None: + return float(val) + + return None + + def _get_inner_print_setting_as_int(self, key): + val = self._get_inner_print_setting(key) + + if val is not None: + return int(val) + + return None + + def _get_inner_print_setting_as_float(self, key): + val = self._get_inner_print_setting(key) + + if val is not None: + return float(val) + + return None @property def id(self): return self._id + @property + def printer_id(self): + return self._printer_id + @property def name(self): return self._gcode_name @@ -441,17 +495,47 @@ def print_is_paused(self): @property def print_current_layer(self): - if not self._settings: - return None - - return self._settings.get('curr_layer') + return self._get_print_setting_as_int('curr_layer') @property def print_total_layers(self): - if not self._settings: - return None + return self._get_print_setting_as_int('total_layers') + + @property + def print_model_height(self): + return self._get_print_setting_as_float('model_hight') - return self._settings.get('total_layers') + @property + def print_anti_alias_count(self): + return self._get_print_setting_as_int('anti_count') + + @property + def print_on_time(self): + return self._get_inner_print_setting_as_float('on_time') + + @property + def print_off_time(self): + return self._get_inner_print_setting_as_float('off_time') + + @property + def print_bottom_time(self): + return self._get_inner_print_setting_as_float('bottom_time') + + @property + def print_bottom_layers(self): + return self._get_inner_print_setting_as_int('bottom_layers') + + @property + def print_z_up_height(self): + return self._get_inner_print_setting_as_float('z_up_height') + + @property + def print_z_up_speed(self): + return self._get_inner_print_setting_as_int('z_up_speed') + + @property + def print_z_down_speed(self): + return self._get_inner_print_setting_as_int('z_down_speed') @property def print_status(self): @@ -641,7 +725,7 @@ def validate_new_print_settings( def __repr__(self): return ( - f"AnycubicProject(id={self._id}, name={self.name},\n " + f"AnycubicProject(id={self._id}, name={self.name}, printer_id={self.printer_id},\n " f"progress_percentage={self.progress_percentage}, print_time_elapsed_minutes={self.print_time_elapsed_minutes}, " f"print_time_remaining_minutes={self.print_time_remaining_minutes}, pause={self._pause}, progress={self._progress}, " f"create_time={self._create_time}, total_time={self._total_time},\n " diff --git a/custom_components/anycubic_cloud/anycubic_cloud_api/anycubic_enums.py b/custom_components/anycubic_cloud/anycubic_cloud_api/anycubic_enums.py index 9ec9b8b..0f23e47 100644 --- a/custom_components/anycubic_cloud/anycubic_cloud_api/anycubic_enums.py +++ b/custom_components/anycubic_cloud/anycubic_cloud_api/anycubic_enums.py @@ -1,4 +1,4 @@ -from enum import IntEnum +from enum import IntEnum, StrEnum class AnycubicFeedType(IntEnum): @@ -90,3 +90,8 @@ class AnycubicFunctionID(IntEnum): VIDEO_LIGHT = 40 BOX_LIGHT = 41 MULTI_COLOR_BOX = 2006 + + +class AnycubicPrinterMaterialType(StrEnum): + FILAMENT = "Filament" + RESIN = "Resin" diff --git a/custom_components/anycubic_cloud/anycubic_cloud_api/anycubic_exceptions.py b/custom_components/anycubic_cloud/anycubic_cloud_api/anycubic_exceptions.py index 3119cda..a4e5d5f 100644 --- a/custom_components/anycubic_cloud/anycubic_cloud_api/anycubic_exceptions.py +++ b/custom_components/anycubic_cloud/anycubic_cloud_api/anycubic_exceptions.py @@ -22,6 +22,10 @@ class AnycubicInvalidValue(AnycubicAPIError): pass +class AnycubicDataParsingError(AnycubicAPIError): + pass + + class AnycubicErrorMessage: no_printer_to_print = AnycubicAPIError('No printer to print with.') no_multi_color_box_for_map = AnycubicAPIError('No multi color box found for supplied box mapping.') diff --git a/custom_components/anycubic_cloud/coordinator.py b/custom_components/anycubic_cloud/coordinator.py index 1c863bc..ec0e382 100644 --- a/custom_components/anycubic_cloud/coordinator.py +++ b/custom_components/anycubic_cloud/coordinator.py @@ -251,6 +251,15 @@ def _build_printer_dict(self, printer) -> dict[str, Any]: "print_speed_pct": printer.latest_project_print_speed_pct, "print_z_thick": printer.latest_project_z_thick, "fan_speed_pct": printer.latest_project_fan_speed_pct, + "print_model_height": printer.latest_project_print_model_height, + "print_anti_alias_count": printer.latest_project_print_anti_alias_count, + "print_on_time": printer.latest_project_print_on_time, + "print_off_time": printer.latest_project_print_off_time, + "print_bottom_time": printer.latest_project_print_bottom_time, + "print_bottom_layers": printer.latest_project_print_bottom_layers, + "print_z_up_height": printer.latest_project_print_z_up_height, + "print_z_up_speed": printer.latest_project_print_z_up_speed, + "print_z_down_speed": printer.latest_project_print_z_down_speed, "raw_print_status": printer.latest_project_raw_print_status, "manual_mqtt_connection_enabled": self._mqtt_manually_connected, "mqtt_connection_active": self._anycubic_api.mqtt_is_started, @@ -287,6 +296,7 @@ def _build_printer_dict(self, printer) -> dict[str, Any]: "model": printer.model, "machine_type": printer.machine_type, "supported_functions": printer.supported_function_strings, + "material_type": printer.material_type, }, "fw_version": { "latest_version": printer.fw_version.available_version, @@ -345,6 +355,9 @@ async def _async_update_data(self) -> dict[str, Any]: async def _async_force_data_refresh(self): self.async_set_updated_data(self._build_coordinator_data()) + async def _async_print_job_started(self): + await self.force_state_update() + @callback def _mqtt_callback_data_updated(self): self.hass.create_task( @@ -352,6 +365,15 @@ def _mqtt_callback_data_updated(self): f"Anycubic coordinator {self.entry.entry_id} data refresh", ) + @callback + def _mqtt_callback_print_job_started( + self, + ): + self.hass.create_task( + self._async_print_job_started(), + f"Anycubic coordinator {self.entry.entry_id} print job started", + ) + def _anycubic_mqtt_connection_should_start(self): return ( @@ -445,7 +467,8 @@ async def _setup_anycubic_api_connection(self, start_up: bool = False): session=websession, cookie_jar=cookie_jar, debug_logger=LOGGER, - mqtt_callback_printer_update=self._mqtt_callback_data_updated + mqtt_callback_printer_update=self._mqtt_callback_data_updated, + mqtt_callback_printer_busy=self._mqtt_callback_print_job_started, ) self._anycubic_api.set_mqtt_log_all_messages(self.entry.options.get(CONF_DEBUG)) diff --git a/custom_components/anycubic_cloud/diagnostics.py b/custom_components/anycubic_cloud/diagnostics.py index 66b1747..7672b19 100644 --- a/custom_components/anycubic_cloud/diagnostics.py +++ b/custom_components/anycubic_cloud/diagnostics.py @@ -24,16 +24,15 @@ "ip_city", "create_time", "create_day_time", - "id", "last_login_time", } PRINTER_TO_REDACT = { - "id", - "user_id", - "key", "machine_mac", } PROJECT_TO_REDACT = { +} + +TO_TAGGED_REDACT = { "id", "taskid", "user_id", @@ -43,6 +42,45 @@ } +class TaggedRedacter: + def __init__(self): + self.redacted_values = dict() + + def _get_redacted_name(self, value): + if value not in self.redacted_values: + num = len(self.redacted_values) + 1 + self.redacted_values[value] = f"**REDACTED_{num}**" + + return self.redacted_values[value] + + def redact_data( + self, + data, + to_redact, + ): + if not isinstance(data, (dict, list)): + return data + + if isinstance(data, list): + return list([self.redact_data(val, to_redact) for val in data]) + + redacted = {**data} + + for key, value in redacted.items(): + if value is None: + continue + if isinstance(value, str) and not value: + continue + if key in to_redact: + redacted[key] = self._get_redacted_name(value) + elif isinstance(value, dict): + redacted[key] = self.redact_data(value, to_redact) + elif isinstance(value, list): + redacted[key] = list([self.redact_data(item, to_redact) for item in value]) + + return redacted + + async def async_get_config_entry_diagnostics( hass: HomeAssistant, entry: ConfigEntry ) -> dict[str, Any]: @@ -51,10 +89,19 @@ async def async_get_config_entry_diagnostics( COORDINATOR ] + tRedacter = TaggedRedacter() + assert coordinator.anycubic_api user_info = await coordinator.anycubic_api.get_user_info(raw_data=True) printer_info = await coordinator.anycubic_api.list_my_printers(raw_data=True) projects_info = await coordinator.anycubic_api.list_all_projects(raw_data=True) + latest_project_info = {} + + if projects_info['data'] and len(projects_info['data']) > 0: + latest_project_info = await coordinator.anycubic_api.project_info_for_id( + project_id=projects_info['data'][0]['id'], + ) + detailed_printer_info = list() if printer_info.get('data') is not None: for printer in printer_info['data']: @@ -66,14 +113,32 @@ async def async_get_config_entry_diagnostics( ) ) return { - "user_info": async_redact_data(user_info, USER_TO_REDACT), + "user_info": tRedacter.redact_data( + async_redact_data(user_info, USER_TO_REDACT), + TO_TAGGED_REDACT + ), "printer_info": { **printer_info, - 'data': async_redact_data(printer_info['data'], PRINTER_TO_REDACT), + 'data': tRedacter.redact_data( + async_redact_data(printer_info['data'], PRINTER_TO_REDACT), + TO_TAGGED_REDACT + ), }, "projects_info": { **projects_info, - 'data': [async_redact_data(x, PROJECT_TO_REDACT) for x in projects_info['data']], + 'data': [ + tRedacter.redact_data( + async_redact_data(x, PROJECT_TO_REDACT), + TO_TAGGED_REDACT + ) for x in projects_info['data'] + ], }, - "detailed_printer_info": async_redact_data(detailed_printer_info, PRINTER_TO_REDACT), + "detailed_printer_info": tRedacter.redact_data( + async_redact_data(detailed_printer_info, PRINTER_TO_REDACT), + TO_TAGGED_REDACT + ), + "latest_project_info": tRedacter.redact_data( + async_redact_data(latest_project_info, PROJECT_TO_REDACT), + TO_TAGGED_REDACT + ), } diff --git a/custom_components/anycubic_cloud/frontend_panel/dist/anycubic-card.js b/custom_components/anycubic_cloud/frontend_panel/dist/anycubic-card.js index c1a0c30..e73a7e0 100644 --- a/custom_components/anycubic_cloud/frontend_panel/dist/anycubic-card.js +++ b/custom_components/anycubic_cloud/frontend_panel/dist/anycubic-card.js @@ -124,13 +124,13 @@ return i; } }, - C = (t, e) => !m(t, e), - $ = { + $ = (t, e) => !m(t, e), + C = { attribute: !0, type: String, converter: A, reflect: !1, - hasChanged: C + hasChanged: $ }; Symbol.metadata ??= Symbol("metadata"), v.litPropertyMetadata ??= new WeakMap(); class P extends HTMLElement { @@ -140,7 +140,7 @@ static get observedAttributes() { return this.finalize(), this._$Eh && [...this._$Eh.keys()]; } - static createProperty(t, e = $) { + static createProperty(t, e = C) { if (e.state && (e.attribute = !1), this._$Ei(), this.elementProperties.set(t, e), !e.noAccessor) { const i = Symbol(), r = this.getPropertyDescriptor(t, i, e); @@ -172,7 +172,7 @@ }; } static getPropertyOptions(t) { - return this.elementProperties.get(t) ?? $; + return this.elementProperties.get(t) ?? C; } static _$Ei() { if (this.hasOwnProperty(S("elementProperties"))) return; @@ -269,7 +269,7 @@ } requestUpdate(t, e, i) { if (void 0 !== t) { - if (i ??= this.constructor.getPropertyOptions(t), !(i.hasChanged ?? C)(this[t], e)) return; + if (i ??= this.constructor.getPropertyOptions(t), !(i.hasChanged ?? $)(this[t], e)) return; this.P(t, e, i); } !1 === this.isUpdatePending && (this._$ES = this._$ET()); @@ -346,12 +346,12 @@ M = T ? T.createPolicy("lit-html", { createHTML: t => t }) : void 0, - H = "$lit$", - D = `lit$${Math.random().toFixed(9).slice(2)}$`, - O = "?" + D, + D = "$lit$", + H = `lit$${Math.random().toFixed(9).slice(2)}$`, + O = "?" + H, I = `<${O}>`, - N = document, - F = () => N.createComment(""), + F = document, + N = () => F.createComment(""), B = t => null === t || "object" != typeof t && "function" != typeof t, L = Array.isArray, U = t => L(t) || "function" == typeof t?.[Symbol.iterator], @@ -362,8 +362,8 @@ G = RegExp(`>|${R}(?:([^\\s"'>=/]+)(${R}*=${R}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`, "g"), V = /'/g, W = /"/g, - X = /^(?:script|style|textarea|title)$/i, - Z = (t => (e, ...i) => ({ + Z = /^(?:script|style|textarea|title)$/i, + X = (t => (e, ...i) => ({ _$litType$: t, strings: e, values: i @@ -371,7 +371,7 @@ K = Symbol.for("lit-noChange"), q = Symbol.for("lit-nothing"), J = new WeakMap(), - Q = N.createTreeWalker(N, 129); + Q = F.createTreeWalker(F, 129); function tt(t, e) { if (!Array.isArray(t) || !t.hasOwnProperty("raw")) throw Error("invalid template strings array"); return void 0 !== M ? M.createHTML(e) : e; @@ -388,9 +388,9 @@ h, l = -1, c = 0; - for (; c < i.length && (o.lastIndex = c, h = o.exec(i), null !== h);) c = o.lastIndex, o === Y ? "!--" === h[1] ? o = z : void 0 !== h[1] ? o = j : void 0 !== h[2] ? (X.test(h[2]) && (s = RegExp("" === h[0] ? (o = s ?? Y, l = -1) : void 0 === h[1] ? l = -2 : (l = o.lastIndex - h[2].length, a = h[1], o = void 0 === h[3] ? G : '"' === h[3] ? W : V) : o === W || o === V ? o = G : o === z || o === j ? o = Y : (o = G, s = void 0); + for (; c < i.length && (o.lastIndex = c, h = o.exec(i), null !== h);) c = o.lastIndex, o === Y ? "!--" === h[1] ? o = z : void 0 !== h[1] ? o = j : void 0 !== h[2] ? (Z.test(h[2]) && (s = RegExp("" === h[0] ? (o = s ?? Y, l = -1) : void 0 === h[1] ? l = -2 : (l = o.lastIndex - h[2].length, a = h[1], o = void 0 === h[3] ? G : '"' === h[3] ? W : V) : o === W || o === V ? o = G : o === z || o === j ? o = Y : (o = G, s = void 0); const d = o === G && t[e + 1].startsWith("/>") ? " " : ""; - n += o === Y ? i + I : l >= 0 ? (r.push(a), i.slice(0, l) + H + i.slice(l) + D + d) : i + D + (-2 === l ? e : d); + n += o === Y ? i + I : l >= 0 ? (r.push(a), i.slice(0, l) + D + i.slice(l) + H + d) : i + H + (-2 === l ? e : d); } return [tt(t, n + (t[i] || "") + (2 === e ? "" : "")), r]; }; @@ -412,9 +412,9 @@ } for (; null !== (r = Q.nextNode()) && a.length < o;) { if (1 === r.nodeType) { - if (r.hasAttributes()) for (const t of r.getAttributeNames()) if (t.endsWith(H)) { + if (r.hasAttributes()) for (const t of r.getAttributeNames()) if (t.endsWith(D)) { const e = l[n++], - i = r.getAttribute(t).split(D), + i = r.getAttribute(t).split(H), o = /([.?@])?(.*)/.exec(e); a.push({ type: 1, @@ -423,20 +423,20 @@ strings: i, ctor: "." === o[1] ? at : "?" === o[1] ? ht : "@" === o[1] ? lt : ot }), r.removeAttribute(t); - } else t.startsWith(D) && (a.push({ + } else t.startsWith(H) && (a.push({ type: 6, index: s }), r.removeAttribute(t)); - if (X.test(r.tagName)) { - const t = r.textContent.split(D), + if (Z.test(r.tagName)) { + const t = r.textContent.split(H), e = t.length - 1; if (e > 0) { r.textContent = T ? T.emptyScript : ""; - for (let i = 0; i < e; i++) r.append(t[i], F()), Q.nextNode(), a.push({ + for (let i = 0; i < e; i++) r.append(t[i], N()), Q.nextNode(), a.push({ type: 2, index: ++s }); - r.append(t[e], F()); + r.append(t[e], N()); } } } else if (8 === r.nodeType) if (r.data === O) a.push({ @@ -444,16 +444,16 @@ index: s });else { let t = -1; - for (; -1 !== (t = r.data.indexOf(D, t + 1));) a.push({ + for (; -1 !== (t = r.data.indexOf(H, t + 1));) a.push({ type: 7, index: s - }), t += D.length - 1; + }), t += H.length - 1; } s++; } } static createElement(t, e) { - const i = N.createElement("template"); + const i = F.createElement("template"); return i.innerHTML = t, i; } } @@ -480,7 +480,7 @@ }, parts: i } = this._$AD, - r = (t?.creationScope ?? N).importNode(e, !0); + r = (t?.creationScope ?? F).importNode(e, !0); Q.currentNode = r; let s = Q.nextNode(), n = 0, @@ -493,7 +493,7 @@ } n !== a?.index && (s = Q.nextNode(), n++); } - return Q.currentNode = N, r; + return Q.currentNode = F, r; } p(t) { let e = 0; @@ -528,7 +528,7 @@ this._$AH !== t && (this._$AR(), this._$AH = this.S(t)); } _(t) { - this._$AH !== q && B(this._$AH) ? this._$AA.nextSibling.data = t : this.T(N.createTextNode(t)), this._$AH = t; + this._$AH !== q && B(this._$AH) ? this._$AA.nextSibling.data = t : this.T(F.createTextNode(t)), this._$AH = t; } $(t) { const { @@ -551,7 +551,7 @@ const e = this._$AH; let i, r = 0; - for (const s of t) r === e.length ? e.push(i = new nt(this.S(F()), this.S(F()), this, this.options)) : i = e[r], i._$AI(s), r++; + for (const s of t) r === e.length ? e.push(i = new nt(this.S(N()), this.S(N()), this, this.options)) : i = e[r], i._$AI(s), r++; r < e.length && (this._$AR(i && i._$AB.nextSibling, r), e.length = r); } _$AR(t = this._$AA.nextSibling, e) { @@ -631,8 +631,8 @@ } } const dt = { - P: H, - A: D, + P: D, + A: H, C: O, M: 1, L: et, @@ -670,7 +670,7 @@ let s = r._$litPart$; if (void 0 === s) { const t = i?.renderBefore ?? null; - r._$litPart$ = s = new nt(e.insertBefore(F(), t), t, void 0, i ?? {}); + r._$litPart$ = s = new nt(e.insertBefore(N(), t), t, void 0, i ?? {}); } return s._$AI(t), s; })(e, this.renderRoot, this.renderOptions); @@ -712,7 +712,7 @@ type: String, converter: A, reflect: !1, - hasChanged: C + hasChanged: $ }, yt = (t = ft, e, i) => { const { @@ -864,7 +864,7 @@ return o(e, "toString") && (t.toString = e.toString), o(e, "valueOf") && (t.valueOf = e.valueOf), t; } function p(t, e, i, r) { - return Xi(t, e, i, r, !0).utc(); + return Zi(t, e, i, r, !0).utc(); } function m() { return { @@ -949,9 +949,9 @@ }, e); } var A, - C = {}; - function $(t, e) { - null != i.deprecationHandler && i.deprecationHandler(t, e), C[t] || (E(e), C[t] = !0); + $ = {}; + function C(t, e) { + null != i.deprecationHandler && i.deprecationHandler(t, e), $[t] || (E(e), $[t] = !0); } function P(t) { return "undefined" != typeof Function && t instanceof Function || "[object Function]" === Object.prototype.toString.call(t); @@ -977,7 +977,7 @@ for (e in t) o(t, e) && i.push(e); return i; }; - var H = { + var D = { sameDay: "[Today at] LT", nextDay: "[Tomorrow at] LT", nextWeek: "dddd [at] LT", @@ -985,7 +985,7 @@ lastWeek: "[Last] dddd [at] LT", sameElse: "L" }; - function D(t, e, i) { + function H(t, e, i) { var r = this._calendar[t] || this._calendar.sameElse; return P(r) ? r.call(e, i) : r; } @@ -995,8 +995,8 @@ return (t >= 0 ? i ? "+" : "" : "-") + Math.pow(10, Math.max(0, s)).toString().substr(1) + r; } var I = /(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g, - N = /(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g, - F = {}, + F = /(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g, + N = {}, B = {}; function L(t, e, i, r) { var s = r; @@ -1024,14 +1024,14 @@ }; } function Y(t, e) { - return t.isValid() ? (e = z(e, t.localeData()), F[e] = F[e] || R(e), F[e](t)) : t.localeData().invalidDate(); + return t.isValid() ? (e = z(e, t.localeData()), N[e] = N[e] || R(e), N[e](t)) : t.localeData().invalidDate(); } function z(t, e) { var i = 5; function r(t) { return e.longDateFormat(t) || t; } - for (N.lastIndex = 0; i >= 0 && N.test(t);) t = t.replace(N, r), N.lastIndex = 0, i -= 1; + for (F.lastIndex = 0; i >= 0 && F.test(t);) t = t.replace(F, r), F.lastIndex = 0, i -= 1; return t; } var j = { @@ -1053,8 +1053,8 @@ function W() { return this._invalidDate; } - var X = "%d", - Z = /\d{1,2}/; + var Z = "%d", + X = /\d{1,2}/; function K(t) { return this._ordinal.replace("%d", t); } @@ -1192,8 +1192,8 @@ xt = /[+-]?\d+(\.\d{1,3})?/, wt = /[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i, At = /^[1-9]\d?/, - Ct = /^([1-9]\d|\d)/; - function $t(t, e, i) { + $t = /^([1-9]\d|\d)/; + function Ct(t, e, i) { nt[t] = P(e) ? e : function (t, r) { return t && i ? i : e; }; @@ -1212,30 +1212,30 @@ function Mt(t) { return t < 0 ? Math.ceil(t) || 0 : Math.floor(t); } - function Ht(t) { + function Dt(t) { var e = +t, i = 0; return 0 !== e && isFinite(e) && (i = Mt(e)), i; } nt = {}; - var Dt = {}; + var Ht = {}; function Ot(t, e) { var i, r, s = e; for ("string" == typeof t && (t = [t]), l(e) && (s = function (t, i) { - i[e] = Ht(t); - }), r = t.length, i = 0; i < r; i++) Dt[t[i]] = s; + i[e] = Dt(t); + }), r = t.length, i = 0; i < r; i++) Ht[t[i]] = s; } function It(t, e) { Ot(t, function (t, i, r, s) { r._w = r._w || {}, e(t, r._w, r, s); }); } - function Nt(t, e, i) { - null != e && o(Dt, t) && Dt[t](e, i._a, i, t); + function Ft(t, e, i) { + null != e && o(Ht, t) && Ht[t](e, i._a, i, t); } - function Ft(t) { + function Nt(t) { return t % 4 == 0 && t % 100 != 0 || t % 400 == 0; } var Bt = 0, @@ -1248,26 +1248,26 @@ Gt = 7, Vt = 8; function Wt(t) { - return Ft(t) ? 366 : 365; + return Nt(t) ? 366 : 365; } L("Y", 0, 0, function () { var t = this.year(); return t <= 9999 ? O(t, 4) : "+" + t; }), L(0, ["YY", 2], 0, function () { return this.year() % 100; - }), L(0, ["YYYY", 4], 0, "year"), L(0, ["YYYYY", 5], 0, "year"), L(0, ["YYYYYY", 6, !0], 0, "year"), $t("Y", bt), $t("YY", dt, at), $t("YYYY", gt, lt), $t("YYYYY", ft, ct), $t("YYYYYY", ft, ct), Ot(["YYYYY", "YYYYYY"], Bt), Ot("YYYY", function (t, e) { - e[Bt] = 2 === t.length ? i.parseTwoDigitYear(t) : Ht(t); + }), L(0, ["YYYY", 4], 0, "year"), L(0, ["YYYYY", 5], 0, "year"), L(0, ["YYYYYY", 6, !0], 0, "year"), Ct("Y", bt), Ct("YY", dt, at), Ct("YYYY", gt, lt), Ct("YYYYY", ft, ct), Ct("YYYYYY", ft, ct), Ot(["YYYYY", "YYYYYY"], Bt), Ot("YYYY", function (t, e) { + e[Bt] = 2 === t.length ? i.parseTwoDigitYear(t) : Dt(t); }), Ot("YY", function (t, e) { e[Bt] = i.parseTwoDigitYear(t); }), Ot("Y", function (t, e) { e[Bt] = parseInt(t, 10); }), i.parseTwoDigitYear = function (t) { - return Ht(t) + (Ht(t) > 68 ? 1900 : 2e3); + return Dt(t) + (Dt(t) > 68 ? 1900 : 2e3); }; - var Xt, - Zt = qt("FullYear", !0); + var Zt, + Xt = qt("FullYear", !0); function Kt() { - return Ft(this.year()); + return Nt(this.year()); } function qt(t, e) { return function (r) { @@ -1318,7 +1318,7 @@ default: return; } - n = i, o = t.month(), a = 29 !== (a = t.date()) || 1 !== o || Ft(n) ? a : 28, s ? r.setUTCFullYear(n, o, a) : r.setFullYear(n, o, a); + n = i, o = t.month(), a = 29 !== (a = t.date()) || 1 !== o || Nt(n) ? a : 28, s ? r.setUTCFullYear(n, o, a) : r.setFullYear(n, o, a); } } function te(t) { @@ -1339,9 +1339,9 @@ function re(t, e) { if (isNaN(t) || isNaN(e)) return NaN; var i = ie(e, 12); - return t += (e - i) / 12, 1 === i ? Ft(t) ? 29 : 28 : 31 - i % 7 % 2; + return t += (e - i) / 12, 1 === i ? Nt(t) ? 29 : 28 : 31 - i % 7 % 2; } - Xt = Array.prototype.indexOf ? Array.prototype.indexOf : function (t) { + Zt = Array.prototype.indexOf ? Array.prototype.indexOf : function (t) { var e; for (e = 0; e < this.length; ++e) if (this[e] === t) return e; return -1; @@ -1351,12 +1351,12 @@ return this.localeData().monthsShort(this, t); }), L("MMMM", 0, 0, function (t) { return this.localeData().months(this, t); - }), $t("M", dt, At), $t("MM", dt, at), $t("MMM", function (t, e) { + }), Ct("M", dt, At), Ct("MM", dt, at), Ct("MMM", function (t, e) { return e.monthsShortRegex(t); - }), $t("MMMM", function (t, e) { + }), Ct("MMMM", function (t, e) { return e.monthsRegex(t); }), Ot(["M", "MM"], function (t, e) { - e[Lt] = Ht(t) - 1; + e[Lt] = Dt(t) - 1; }), Ot(["MMM", "MMMM"], function (t, e, i, r) { var s = i._locale.monthsParse(t, r, i._strict); null != s ? e[Lt] = s : g(i).invalidMonth = t; @@ -1378,7 +1378,7 @@ n, o = t.toLocaleLowerCase(); if (!this._monthsParse) for (this._monthsParse = [], this._longMonthsParse = [], this._shortMonthsParse = [], r = 0; r < 12; ++r) n = p([2e3, r]), this._shortMonthsParse[r] = this.monthsShort(n, "").toLocaleLowerCase(), this._longMonthsParse[r] = this.months(n, "").toLocaleLowerCase(); - return i ? "MMM" === e ? -1 !== (s = Xt.call(this._shortMonthsParse, o)) ? s : null : -1 !== (s = Xt.call(this._longMonthsParse, o)) ? s : null : "MMM" === e ? -1 !== (s = Xt.call(this._shortMonthsParse, o)) || -1 !== (s = Xt.call(this._longMonthsParse, o)) ? s : null : -1 !== (s = Xt.call(this._longMonthsParse, o)) || -1 !== (s = Xt.call(this._shortMonthsParse, o)) ? s : null; + return i ? "MMM" === e ? -1 !== (s = Zt.call(this._shortMonthsParse, o)) ? s : null : -1 !== (s = Zt.call(this._longMonthsParse, o)) ? s : null : "MMM" === e ? -1 !== (s = Zt.call(this._shortMonthsParse, o)) || -1 !== (s = Zt.call(this._longMonthsParse, o)) ? s : null : -1 !== (s = Zt.call(this._longMonthsParse, o)) || -1 !== (s = Zt.call(this._shortMonthsParse, o)) ? s : null; } function ue(t, e, i) { var r, s, n; @@ -1391,7 +1391,7 @@ } function pe(t, e) { if (!t.isValid()) return t; - if ("string" == typeof e) if (/^\d+$/.test(e)) e = Ht(e);else if (!l(e = t.localeData().monthsParse(e))) return t; + if ("string" == typeof e) if (/^\d+$/.test(e)) e = Dt(e);else if (!l(e = t.localeData().monthsParse(e))) return t; var i = e, r = t.date(); return r = r < 29 ? r : Math.min(r, re(t.year(), i)), t._isUTC ? t._d.setUTCMonth(i, r) : t._d.setMonth(i, r), t; @@ -1461,14 +1461,14 @@ function Ae(t) { return Ee(t, this._week.dow, this._week.doy).week; } - L("w", ["ww", 2], "wo", "week"), L("W", ["WW", 2], "Wo", "isoWeek"), $t("w", dt, At), $t("ww", dt, at), $t("W", dt, At), $t("WW", dt, at), It(["w", "ww", "W", "WW"], function (t, e, i, r) { - e[r.substr(0, 1)] = Ht(t); + L("w", ["ww", 2], "wo", "week"), L("W", ["WW", 2], "Wo", "isoWeek"), Ct("w", dt, At), Ct("ww", dt, at), Ct("W", dt, At), Ct("WW", dt, at), It(["w", "ww", "W", "WW"], function (t, e, i, r) { + e[r.substr(0, 1)] = Dt(t); }); - var Ce = { + var $e = { dow: 0, doy: 6 }; - function $e() { + function Ce() { return this._week.dow; } function Pe() { @@ -1485,10 +1485,10 @@ function Me(t, e) { return "string" != typeof t ? t : isNaN(t) ? "number" == typeof (t = e.weekdaysParse(t)) ? t : null : parseInt(t, 10); } - function He(t, e) { + function De(t, e) { return "string" == typeof t ? e.weekdaysParse(t) % 7 || 7 : isNaN(t) ? null : t; } - function De(t, e) { + function He(t, e) { return t.slice(e, 7).concat(t.slice(0, e)); } L("d", 0, "do", "day"), L("dd", 0, 0, function (t) { @@ -1497,33 +1497,33 @@ return this.localeData().weekdaysShort(this, t); }), L("dddd", 0, 0, function (t) { return this.localeData().weekdays(this, t); - }), L("e", 0, 0, "weekday"), L("E", 0, 0, "isoWeekday"), $t("d", dt), $t("e", dt), $t("E", dt), $t("dd", function (t, e) { + }), L("e", 0, 0, "weekday"), L("E", 0, 0, "isoWeekday"), Ct("d", dt), Ct("e", dt), Ct("E", dt), Ct("dd", function (t, e) { return e.weekdaysMinRegex(t); - }), $t("ddd", function (t, e) { + }), Ct("ddd", function (t, e) { return e.weekdaysShortRegex(t); - }), $t("dddd", function (t, e) { + }), Ct("dddd", function (t, e) { return e.weekdaysRegex(t); }), It(["dd", "ddd", "dddd"], function (t, e, i, r) { var s = i._locale.weekdaysParse(t, r, i._strict); null != s ? e.d = s : g(i).invalidWeekday = t; }), It(["d", "e", "E"], function (t, e, i, r) { - e[r] = Ht(t); + e[r] = Dt(t); }); var Oe = "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"), Ie = "Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"), - Ne = "Su_Mo_Tu_We_Th_Fr_Sa".split("_"), - Fe = wt, + Fe = "Su_Mo_Tu_We_Th_Fr_Sa".split("_"), + Ne = wt, Be = wt, Le = wt; function Ue(t, e) { var i = s(this._weekdays) ? this._weekdays : this._weekdays[t && !0 !== t && this._weekdays.isFormat.test(e) ? "format" : "standalone"]; - return !0 === t ? De(i, this._week.dow) : t ? i[t.day()] : i; + return !0 === t ? He(i, this._week.dow) : t ? i[t.day()] : i; } function Re(t) { - return !0 === t ? De(this._weekdaysShort, this._week.dow) : t ? this._weekdaysShort[t.day()] : this._weekdaysShort; + return !0 === t ? He(this._weekdaysShort, this._week.dow) : t ? this._weekdaysShort[t.day()] : this._weekdaysShort; } function Ye(t) { - return !0 === t ? De(this._weekdaysMin, this._week.dow) : t ? this._weekdaysMin[t.day()] : this._weekdaysMin; + return !0 === t ? He(this._weekdaysMin, this._week.dow) : t ? this._weekdaysMin[t.day()] : this._weekdaysMin; } function ze(t, e, i) { var r, @@ -1531,7 +1531,7 @@ n, o = t.toLocaleLowerCase(); if (!this._weekdaysParse) for (this._weekdaysParse = [], this._shortWeekdaysParse = [], this._minWeekdaysParse = [], r = 0; r < 7; ++r) n = p([2e3, 1]).day(r), this._minWeekdaysParse[r] = this.weekdaysMin(n, "").toLocaleLowerCase(), this._shortWeekdaysParse[r] = this.weekdaysShort(n, "").toLocaleLowerCase(), this._weekdaysParse[r] = this.weekdays(n, "").toLocaleLowerCase(); - return i ? "dddd" === e ? -1 !== (s = Xt.call(this._weekdaysParse, o)) ? s : null : "ddd" === e ? -1 !== (s = Xt.call(this._shortWeekdaysParse, o)) ? s : null : -1 !== (s = Xt.call(this._minWeekdaysParse, o)) ? s : null : "dddd" === e ? -1 !== (s = Xt.call(this._weekdaysParse, o)) || -1 !== (s = Xt.call(this._shortWeekdaysParse, o)) || -1 !== (s = Xt.call(this._minWeekdaysParse, o)) ? s : null : "ddd" === e ? -1 !== (s = Xt.call(this._shortWeekdaysParse, o)) || -1 !== (s = Xt.call(this._weekdaysParse, o)) || -1 !== (s = Xt.call(this._minWeekdaysParse, o)) ? s : null : -1 !== (s = Xt.call(this._minWeekdaysParse, o)) || -1 !== (s = Xt.call(this._weekdaysParse, o)) || -1 !== (s = Xt.call(this._shortWeekdaysParse, o)) ? s : null; + return i ? "dddd" === e ? -1 !== (s = Zt.call(this._weekdaysParse, o)) ? s : null : "ddd" === e ? -1 !== (s = Zt.call(this._shortWeekdaysParse, o)) ? s : null : -1 !== (s = Zt.call(this._minWeekdaysParse, o)) ? s : null : "dddd" === e ? -1 !== (s = Zt.call(this._weekdaysParse, o)) || -1 !== (s = Zt.call(this._shortWeekdaysParse, o)) || -1 !== (s = Zt.call(this._minWeekdaysParse, o)) ? s : null : "ddd" === e ? -1 !== (s = Zt.call(this._shortWeekdaysParse, o)) || -1 !== (s = Zt.call(this._weekdaysParse, o)) || -1 !== (s = Zt.call(this._minWeekdaysParse, o)) ? s : null : -1 !== (s = Zt.call(this._minWeekdaysParse, o)) || -1 !== (s = Zt.call(this._weekdaysParse, o)) || -1 !== (s = Zt.call(this._shortWeekdaysParse, o)) ? s : null; } function je(t, e, i) { var r, s, n; @@ -1556,15 +1556,15 @@ function We(t) { if (!this.isValid()) return null != t ? this : NaN; if (null != t) { - var e = He(t, this.localeData()); + var e = De(t, this.localeData()); return this.day(this.day() % 7 ? e : e - 7); } return this.day() || 7; } - function Xe(t) { - return this._weekdaysParseExact ? (o(this, "_weekdaysRegex") || qe.call(this), t ? this._weekdaysStrictRegex : this._weekdaysRegex) : (o(this, "_weekdaysRegex") || (this._weekdaysRegex = Fe), this._weekdaysStrictRegex && t ? this._weekdaysStrictRegex : this._weekdaysRegex); - } function Ze(t) { + return this._weekdaysParseExact ? (o(this, "_weekdaysRegex") || qe.call(this), t ? this._weekdaysStrictRegex : this._weekdaysRegex) : (o(this, "_weekdaysRegex") || (this._weekdaysRegex = Ne), this._weekdaysStrictRegex && t ? this._weekdaysStrictRegex : this._weekdaysRegex); + } + function Xe(t) { return this._weekdaysParseExact ? (o(this, "_weekdaysRegex") || qe.call(this), t ? this._weekdaysShortStrictRegex : this._weekdaysShortRegex) : (o(this, "_weekdaysShortRegex") || (this._weekdaysShortRegex = Be), this._weekdaysShortStrictRegex && t ? this._weekdaysShortStrictRegex : this._weekdaysShortRegex); } function Ke(t) { @@ -1611,27 +1611,27 @@ return "" + this.hours() + O(this.minutes(), 2); }), L("Hmmss", 0, 0, function () { return "" + this.hours() + O(this.minutes(), 2) + O(this.seconds(), 2); - }), ti("a", !0), ti("A", !1), $t("a", ei), $t("A", ei), $t("H", dt, Ct), $t("h", dt, At), $t("k", dt, At), $t("HH", dt, at), $t("hh", dt, at), $t("kk", dt, at), $t("hmm", ut), $t("hmmss", pt), $t("Hmm", ut), $t("Hmmss", pt), Ot(["H", "HH"], Rt), Ot(["k", "kk"], function (t, e, i) { - var r = Ht(t); + }), ti("a", !0), ti("A", !1), Ct("a", ei), Ct("A", ei), Ct("H", dt, $t), Ct("h", dt, At), Ct("k", dt, At), Ct("HH", dt, at), Ct("hh", dt, at), Ct("kk", dt, at), Ct("hmm", ut), Ct("hmmss", pt), Ct("Hmm", ut), Ct("Hmmss", pt), Ot(["H", "HH"], Rt), Ot(["k", "kk"], function (t, e, i) { + var r = Dt(t); e[Rt] = 24 === r ? 0 : r; }), Ot(["a", "A"], function (t, e, i) { i._isPm = i._locale.isPM(t), i._meridiem = t; }), Ot(["h", "hh"], function (t, e, i) { - e[Rt] = Ht(t), g(i).bigHour = !0; + e[Rt] = Dt(t), g(i).bigHour = !0; }), Ot("hmm", function (t, e, i) { var r = t.length - 2; - e[Rt] = Ht(t.substr(0, r)), e[Yt] = Ht(t.substr(r)), g(i).bigHour = !0; + e[Rt] = Dt(t.substr(0, r)), e[Yt] = Dt(t.substr(r)), g(i).bigHour = !0; }), Ot("hmmss", function (t, e, i) { var r = t.length - 4, s = t.length - 2; - e[Rt] = Ht(t.substr(0, r)), e[Yt] = Ht(t.substr(r, 2)), e[zt] = Ht(t.substr(s)), g(i).bigHour = !0; + e[Rt] = Dt(t.substr(0, r)), e[Yt] = Dt(t.substr(r, 2)), e[zt] = Dt(t.substr(s)), g(i).bigHour = !0; }), Ot("Hmm", function (t, e, i) { var r = t.length - 2; - e[Rt] = Ht(t.substr(0, r)), e[Yt] = Ht(t.substr(r)); + e[Rt] = Dt(t.substr(0, r)), e[Yt] = Dt(t.substr(r)); }), Ot("Hmmss", function (t, e, i) { var r = t.length - 4, s = t.length - 2; - e[Rt] = Ht(t.substr(0, r)), e[Yt] = Ht(t.substr(r, 2)), e[zt] = Ht(t.substr(s)); + e[Rt] = Dt(t.substr(0, r)), e[Yt] = Dt(t.substr(r, 2)), e[zt] = Dt(t.substr(s)); }); var ri = /[ap]\.?m?\.?/i, si = qt("Hours", !0); @@ -1640,17 +1640,17 @@ } var oi, ai = { - calendar: H, + calendar: D, longDateFormat: j, invalidDate: V, - ordinal: X, - dayOfMonthOrdinalParse: Z, + ordinal: Z, + dayOfMonthOrdinalParse: X, relativeTime: q, months: se, monthsShort: ne, - week: Ce, + week: $e, weekdays: Oe, - weekdaysMin: Ne, + weekdaysMin: Fe, weekdaysShort: Ie, meridiemParse: ri }, @@ -1696,7 +1696,7 @@ if (null !== e) { var i, r = ai; - if (e.abbr = t, null != hi[t]) $("defineLocaleOverride", "use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."), r = hi[t]._config;else if (null != e.parentLocale) if (null != hi[e.parentLocale]) r = hi[e.parentLocale]._config;else { + if (e.abbr = t, null != hi[t]) C("defineLocaleOverride", "use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."), r = hi[t]._config;else if (null != e.parentLocale) if (null != hi[e.parentLocale]) r = hi[e.parentLocale]._config;else { if (null == (i = mi(e.parentLocale))) return li[e.parentLocale] || (li[e.parentLocale] = []), li[e.parentLocale].push({ name: t, config: e @@ -1740,8 +1740,8 @@ Ei = /Z|[+-]\d\d(?::?\d\d)?/, Si = [["YYYYYY-MM-DD", /[+-]\d{6}-\d\d-\d\d/], ["YYYY-MM-DD", /\d{4}-\d\d-\d\d/], ["GGGG-[W]WW-E", /\d{4}-W\d\d-\d/], ["GGGG-[W]WW", /\d{4}-W\d\d/, !1], ["YYYY-DDD", /\d{4}-\d{3}/], ["YYYY-MM", /\d{4}-\d\d/, !1], ["YYYYYYMMDD", /[+-]\d{10}/], ["YYYYMMDD", /\d{8}/], ["GGGG[W]WWE", /\d{4}W\d{3}/], ["GGGG[W]WW", /\d{4}W\d{2}/, !1], ["YYYYDDD", /\d{7}/], ["YYYYMM", /\d{6}/, !1], ["YYYY", /\d{4}/, !1]], Ai = [["HH:mm:ss.SSSS", /\d\d:\d\d:\d\d\.\d+/], ["HH:mm:ss,SSSS", /\d\d:\d\d:\d\d,\d+/], ["HH:mm:ss", /\d\d:\d\d:\d\d/], ["HH:mm", /\d\d:\d\d/], ["HHmmss.SSSS", /\d\d\d\d\d\d\.\d+/], ["HHmmss,SSSS", /\d\d\d\d\d\d,\d+/], ["HHmmss", /\d\d\d\d\d\d/], ["HHmm", /\d\d\d\d/], ["HH", /\d\d/]], - Ci = /^\/?Date\((-?\d+)/i, - $i = /^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/, + $i = /^\/?Date\((-?\d+)/i, + Ci = /^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/, Pi = { UT: 0, GMT: 0, @@ -1794,10 +1794,10 @@ var e = parseInt(t, 10); return e <= 49 ? 2e3 + e : e <= 999 ? 1900 + e : e; } - function Hi(t) { + function Di(t) { return t.replace(/\([^()]*\)|[\n\t]/g, " ").replace(/(\s\s+)/g, " ").replace(/^\s\s*/, "").replace(/\s\s*$/, ""); } - function Di(t, e, i) { + function Hi(t, e, i) { return !t || Ie.indexOf(t) === new Date(e[0], e[1], e[2]).getDay() || (g(i).weekdayMismatch = !0, i._isValid = !1, !1); } function Oi(t, e, i) { @@ -1809,17 +1809,17 @@ } function Ii(t) { var e, - i = $i.exec(Hi(t._i)); + i = Ci.exec(Di(t._i)); if (i) { - if (e = Ti(i[4], i[3], i[2], i[5], i[6], i[7]), !Di(i[1], e, t)) return; + if (e = Ti(i[4], i[3], i[2], i[5], i[6], i[7]), !Hi(i[1], e, t)) return; t._a = e, t._tzm = Oi(i[8], i[9], i[10]), t._d = ve.apply(null, t._a), t._d.setUTCMinutes(t._d.getUTCMinutes() - t._tzm), g(t).rfc2822 = !0; } else t._isValid = !1; } - function Ni(t) { - var e = Ci.exec(t._i); + function Fi(t) { + var e = $i.exec(t._i); null === e ? (ki(t), !1 === t._isValid && (delete t._isValid, Ii(t), !1 === t._isValid && (delete t._isValid, t._strict ? t._isValid = !1 : i.createFromInputFallback(t)))) : t._d = new Date(+e[1]); } - function Fi(t, e, i) { + function Ni(t, e, i) { return null != t ? t : null != e ? e : i; } function Bi(t) { @@ -1834,14 +1834,14 @@ n, o = []; if (!t._d) { - for (r = Bi(t), t._w && null == t._a[Ut] && null == t._a[Lt] && Ui(t), null != t._dayOfYear && (n = Fi(t._a[Bt], r[Bt]), (t._dayOfYear > Wt(n) || 0 === t._dayOfYear) && (g(t)._overflowDayOfYear = !0), i = ve(n, 0, t._dayOfYear), t._a[Lt] = i.getUTCMonth(), t._a[Ut] = i.getUTCDate()), e = 0; e < 3 && null == t._a[e]; ++e) t._a[e] = o[e] = r[e]; + for (r = Bi(t), t._w && null == t._a[Ut] && null == t._a[Lt] && Ui(t), null != t._dayOfYear && (n = Ni(t._a[Bt], r[Bt]), (t._dayOfYear > Wt(n) || 0 === t._dayOfYear) && (g(t)._overflowDayOfYear = !0), i = ve(n, 0, t._dayOfYear), t._a[Lt] = i.getUTCMonth(), t._a[Ut] = i.getUTCDate()), e = 0; e < 3 && null == t._a[e]; ++e) t._a[e] = o[e] = r[e]; for (; e < 7; e++) t._a[e] = o[e] = null == t._a[e] ? 2 === e ? 1 : 0 : t._a[e]; 24 === t._a[Rt] && 0 === t._a[Yt] && 0 === t._a[zt] && 0 === t._a[jt] && (t._nextDay = !0, t._a[Rt] = 0), t._d = (t._useUTC ? ve : _e).apply(null, o), s = t._useUTC ? t._d.getUTCDay() : t._d.getDay(), null != t._tzm && t._d.setUTCMinutes(t._d.getUTCMinutes() - t._tzm), t._nextDay && (t._a[Rt] = 24), t._w && void 0 !== t._w.d && t._w.d !== s && (g(t).weekdayMismatch = !0); } } function Ui(t) { var e, i, r, s, n, o, a, h, l; - null != (e = t._w).GG || null != e.W || null != e.E ? (n = 1, o = 4, i = Fi(e.GG, t._a[Bt], Ee(Zi(), 1, 4).year), r = Fi(e.W, 1), ((s = Fi(e.E, 1)) < 1 || s > 7) && (h = !0)) : (n = t._locale._week.dow, o = t._locale._week.doy, l = Ee(Zi(), n, o), i = Fi(e.gg, t._a[Bt], l.year), r = Fi(e.w, l.week), null != e.d ? ((s = e.d) < 0 || s > 6) && (h = !0) : null != e.e ? (s = e.e + n, (e.e < 0 || e.e > 6) && (h = !0)) : s = n), r < 1 || r > Se(i, n, o) ? g(t)._overflowWeeks = !0 : null != h ? g(t)._overflowWeekday = !0 : (a = we(i, r, s, n, o), t._a[Bt] = a.year, t._dayOfYear = a.dayOfYear); + null != (e = t._w).GG || null != e.W || null != e.E ? (n = 1, o = 4, i = Ni(e.GG, t._a[Bt], Ee(Xi(), 1, 4).year), r = Ni(e.W, 1), ((s = Ni(e.E, 1)) < 1 || s > 7) && (h = !0)) : (n = t._locale._week.dow, o = t._locale._week.doy, l = Ee(Xi(), n, o), i = Ni(e.gg, t._a[Bt], l.year), r = Ni(e.w, l.week), null != e.d ? ((s = e.d) < 0 || s > 6) && (h = !0) : null != e.e ? (s = e.e + n, (e.e < 0 || e.e > 6) && (h = !0)) : s = n), r < 1 || r > Se(i, n, o) ? g(t)._overflowWeeks = !0 : null != h ? g(t)._overflowWeekday = !0 : (a = we(i, r, s, n, o), t._a[Bt] = a.year, t._dayOfYear = a.dayOfYear); } function Ri(t) { if (t._f !== i.ISO_8601) { @@ -1857,7 +1857,7 @@ l = "" + t._i, c = l.length, d = 0; - for (h = (s = z(t._f, t._locale).match(I) || []).length, e = 0; e < h; e++) n = s[e], (r = (l.match(Pt(n, t)) || [])[0]) && ((o = l.substr(0, l.indexOf(r))).length > 0 && g(t).unusedInput.push(o), l = l.slice(l.indexOf(r) + r.length), d += r.length), B[n] ? (r ? g(t).empty = !1 : g(t).unusedTokens.push(n), Nt(n, r, t)) : t._strict && !r && g(t).unusedTokens.push(n); + for (h = (s = z(t._f, t._locale).match(I) || []).length, e = 0; e < h; e++) n = s[e], (r = (l.match(Pt(n, t)) || [])[0]) && ((o = l.substr(0, l.indexOf(r))).length > 0 && g(t).unusedInput.push(o), l = l.slice(l.indexOf(r) + r.length), d += r.length), B[n] ? (r ? g(t).empty = !1 : g(t).unusedTokens.push(n), Ft(n, r, t)) : t._strict && !r && g(t).unusedTokens.push(n); g(t).charsLeftOver = c - d, l.length > 0 && g(t).unusedInput.push(l), t._a[Rt] <= 12 && !0 === g(t).bigHour && t._a[Rt] > 0 && (g(t).bigHour = void 0), g(t).parsedDateParts = t._a.slice(0), g(t).meridiem = t._meridiem, t._a[Rt] = Yi(t._locale, t._a[Rt], t._meridiem), null !== (a = g(t).era) && (t._a[Bt] = t._locale.erasConvertYear(a, t._a[Bt])), Li(t), vi(t); } else Ii(t); } else ki(t); @@ -1901,31 +1901,31 @@ } function Wi(t) { var e = t._i; - h(e) ? t._d = new Date(i.now()) : c(e) ? t._d = new Date(e.valueOf()) : "string" == typeof e ? Ni(t) : s(e) ? (t._a = d(e.slice(0), function (t) { + h(e) ? t._d = new Date(i.now()) : c(e) ? t._d = new Date(e.valueOf()) : "string" == typeof e ? Fi(t) : s(e) ? (t._a = d(e.slice(0), function (t) { return parseInt(t, 10); }), Li(t)) : n(e) ? ji(t) : l(e) ? t._d = new Date(e) : i.createFromInputFallback(t); } - function Xi(t, e, i, r, o) { + function Zi(t, e, i, r, o) { var h = {}; return !0 !== e && !1 !== e || (r = e, e = void 0), !0 !== i && !1 !== i || (r = i, i = void 0), (n(t) && a(t) || s(t) && 0 === t.length) && (t = void 0), h._isAMomentObject = !0, h._useUTC = h._isUTC = o, h._l = i, h._i = t, h._f = e, h._strict = r, Gi(h); } - function Zi(t, e, i, r) { - return Xi(t, e, i, r, !1); + function Xi(t, e, i, r) { + return Zi(t, e, i, r, !1); } i.createFromInputFallback = S("value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.", function (t) { t._d = new Date(t._i + (t._useUTC ? " UTC" : "")); }), i.ISO_8601 = function () {}, i.RFC_2822 = function () {}; var Ki = S("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/", function () { - var t = Zi.apply(null, arguments); + var t = Xi.apply(null, arguments); return this.isValid() && t.isValid() ? t < this ? this : t : y(); }), qi = S("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/", function () { - var t = Zi.apply(null, arguments); + var t = Xi.apply(null, arguments); return this.isValid() && t.isValid() ? t > this ? this : t : y(); }); function Ji(t, e) { var i, r; - if (1 === e.length && s(e[0]) && (e = e[0]), !e.length) return Zi(); + if (1 === e.length && s(e[0]) && (e = e[0]), !e.length) return Xi(); for (i = e[0], r = 1; r < e.length; ++r) e[r].isValid() && !e[r][t](i) || (i = e[r]); return i; } @@ -1944,10 +1944,10 @@ i, r = !1, s = ir.length; - for (e in t) if (o(t, e) && (-1 === Xt.call(ir, e) || null != t[e] && isNaN(t[e]))) return !1; + for (e in t) if (o(t, e) && (-1 === Zt.call(ir, e) || null != t[e] && isNaN(t[e]))) return !1; for (i = 0; i < s; ++i) if (t[ir[i]]) { if (r) return !1; - parseFloat(t[ir[i]]) !== Ht(t[ir[i]]) && (r = !0); + parseFloat(t[ir[i]]) !== Dt(t[ir[i]]) && (r = !0); } return !0; } @@ -1981,7 +1981,7 @@ s = Math.min(t.length, e.length), n = Math.abs(t.length - e.length), o = 0; - for (r = 0; r < s; r++) (i && t[r] !== e[r] || !i && Ht(t[r]) !== Ht(e[r])) && o++; + for (r = 0; r < s; r++) (i && t[r] !== e[r] || !i && Dt(t[r]) !== Dt(e[r])) && o++; return o + n; } function cr(t, e) { @@ -1991,7 +1991,7 @@ return t < 0 && (t = -t, i = "-"), i + O(~~(t / 60), 2) + e + O(~~t % 60, 2); }); } - cr("Z", ":"), cr("ZZ", ""), $t("Z", vt), $t("ZZ", vt), Ot(["Z", "ZZ"], function (t, e, i) { + cr("Z", ":"), cr("ZZ", ""), Ct("Z", vt), Ct("ZZ", vt), Ot(["Z", "ZZ"], function (t, e, i) { i._useUTC = !0, i._tzm = ur(vt, t); }); var dr = /([\+\-]|\d\d)/gi; @@ -1999,11 +1999,11 @@ var i, r, s = (e || "").match(t); - return null === s ? null : 0 === (r = 60 * (i = ((s[s.length - 1] || []) + "").match(dr) || ["-", 0, 0])[1] + Ht(i[2])) ? 0 : "+" === i[0] ? r : -r; + return null === s ? null : 0 === (r = 60 * (i = ((s[s.length - 1] || []) + "").match(dr) || ["-", 0, 0])[1] + Dt(i[2])) ? 0 : "+" === i[0] ? r : -r; } function pr(t, e) { var r, s; - return e._isUTC ? (r = e.clone(), s = (w(t) || c(t) ? t.valueOf() : Zi(t).valueOf()) - r.valueOf(), r._d.setTime(r._d.valueOf() + s), i.updateOffset(r, !1), r) : Zi(t).local(); + return e._isUTC ? (r = e.clone(), s = (w(t) || c(t) ? t.valueOf() : Xi(t).valueOf()) - r.valueOf(), r._d.setTime(r._d.valueOf() + s), i.updateOffset(r, !1), r) : Xi(t).local(); } function mr(t) { return -Math.round(t._d.getTimezoneOffset()); @@ -2016,7 +2016,7 @@ if ("string" == typeof t) { if (null === (t = ur(vt, t))) return this; } else Math.abs(t) < 16 && !r && (t *= 60); - return !this._isUTC && e && (s = mr(this)), this._offset = t, this._isUTC = !0, null != s && this.add(s, "m"), n !== t && (!e || this._changeInProgress ? Dr(this, Pr(t - n, "m"), 1, !1) : this._changeInProgress || (this._changeInProgress = !0, i.updateOffset(this, !0), this._changeInProgress = null)), this; + return !this._isUTC && e && (s = mr(this)), this._offset = t, this._isUTC = !0, null != s && this.add(s, "m"), n !== t && (!e || this._changeInProgress ? Hr(this, Pr(t - n, "m"), 1, !1) : this._changeInProgress || (this._changeInProgress = !0, i.updateOffset(this, !0), this._changeInProgress = null)), this; } return this._isUTC ? n : mr(this); } @@ -2037,7 +2037,7 @@ return this; } function vr(t) { - return !!this.isValid() && (t = t ? Zi(t).utcOffset() : 0, (this.utcOffset() - t) % 60 == 0); + return !!this.isValid() && (t = t ? Xi(t).utcOffset() : 0, (this.utcOffset() - t) % 60 == 0); } function xr() { return this.utcOffset() > this.clone().month(0).utcOffset() || this.utcOffset() > this.clone().month(5).utcOffset(); @@ -2046,7 +2046,7 @@ if (!h(this._isDSTShifted)) return this._isDSTShifted; var t, e = {}; - return v(e, this), (e = Vi(e))._a ? (t = e._isUTC ? p(e._a) : Zi(e._a), this._isDSTShifted = this.isValid() && lr(e._a, t.toArray()) > 0) : this._isDSTShifted = !1, this._isDSTShifted; + return v(e, this), (e = Vi(e))._a ? (t = e._isUTC ? p(e._a) : Xi(e._a), this._isDSTShifted = this.isValid() && lr(e._a, t.toArray()) > 0) : this._isDSTShifted = !1, this._isDSTShifted; } function Er() { return !!this.isValid() && !this._isUTC; @@ -2058,8 +2058,8 @@ return !!this.isValid() && this._isUTC && 0 === this._offset; } i.updateOffset = function () {}; - var Cr = /^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/, - $r = /^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/; + var $r = /^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/, + Cr = /^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/; function Pr(t, e) { var i, r, @@ -2070,14 +2070,14 @@ ms: t._milliseconds, d: t._days, M: t._months - } : l(t) || !isNaN(+t) ? (n = {}, e ? n[e] = +t : n.milliseconds = +t) : (a = Cr.exec(t)) ? (i = "-" === a[1] ? -1 : 1, n = { + } : l(t) || !isNaN(+t) ? (n = {}, e ? n[e] = +t : n.milliseconds = +t) : (a = $r.exec(t)) ? (i = "-" === a[1] ? -1 : 1, n = { y: 0, - d: Ht(a[Ut]) * i, - h: Ht(a[Rt]) * i, - m: Ht(a[Yt]) * i, - s: Ht(a[zt]) * i, - ms: Ht(hr(1e3 * a[jt])) * i - }) : (a = $r.exec(t)) ? (i = "-" === a[1] ? -1 : 1, n = { + d: Dt(a[Ut]) * i, + h: Dt(a[Rt]) * i, + m: Dt(a[Yt]) * i, + s: Dt(a[zt]) * i, + ms: Dt(hr(1e3 * a[jt])) * i + }) : (a = Cr.exec(t)) ? (i = "-" === a[1] ? -1 : 1, n = { y: kr(a[2], i), M: kr(a[3], i), w: kr(a[4], i), @@ -2085,7 +2085,7 @@ h: kr(a[6], i), m: kr(a[7], i), s: kr(a[8], i) - }) : null == n ? n = {} : "object" == typeof n && ("from" in n || "to" in n) && (s = Mr(Zi(n.from), Zi(n.to)), (n = {}).ms = s.milliseconds, n.M = s.months), r = new or(n), ar(t) && o(t, "_locale") && (r._locale = t._locale), ar(t) && o(t, "_isValid") && (r._isValid = t._isValid), r; + }) : null == n ? n = {} : "object" == typeof n && ("from" in n || "to" in n) && (s = Mr(Xi(n.from), Xi(n.to)), (n = {}).ms = s.milliseconds, n.M = s.months), r = new or(n), ar(t) && o(t, "_locale") && (r._locale = t._locale), ar(t) && o(t, "_isValid") && (r._isValid = t._isValid), r; } function kr(t, e) { var i = t && parseFloat(t.replace(",", ".")); @@ -2102,26 +2102,26 @@ months: 0 }; } - function Hr(t, e) { + function Dr(t, e) { return function (i, r) { var s; - return null === r || isNaN(+r) || ($(e, "moment()." + e + "(period, number) is deprecated. Please use moment()." + e + "(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."), s = i, i = r, r = s), Dr(this, Pr(i, r), t), this; + return null === r || isNaN(+r) || (C(e, "moment()." + e + "(period, number) is deprecated. Please use moment()." + e + "(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."), s = i, i = r, r = s), Hr(this, Pr(i, r), t), this; }; } - function Dr(t, e, r, s) { + function Hr(t, e, r, s) { var n = e._milliseconds, o = hr(e._days), a = hr(e._months); t.isValid() && (s = s ?? !0, a && pe(t, Jt(t, "Month") + a * r), o && Qt(t, "Date", Jt(t, "Date") + o * r), n && t._d.setTime(t._d.valueOf() + n * r), s && i.updateOffset(t, o || a)); } Pr.fn = or.prototype, Pr.invalid = nr; - var Or = Hr(1, "add"), - Ir = Hr(-1, "subtract"); - function Nr(t) { + var Or = Dr(1, "add"), + Ir = Dr(-1, "subtract"); + function Fr(t) { return "string" == typeof t || t instanceof String; } - function Fr(t) { - return w(t) || c(t) || Nr(t) || l(t) || Lr(t) || Br(t) || null == t; + function Nr(t) { + return w(t) || c(t) || Fr(t) || l(t) || Lr(t) || Br(t) || null == t; } function Br(t) { var e, @@ -2137,7 +2137,7 @@ var e = s(t), i = !1; return e && (i = 0 === t.filter(function (e) { - return !l(e) && Nr(t); + return !l(e) && Fr(t); }).length), e && i; } function Ur(t) { @@ -2154,38 +2154,38 @@ return i < -6 ? "sameElse" : i < -1 ? "lastWeek" : i < 0 ? "lastDay" : i < 1 ? "sameDay" : i < 2 ? "nextDay" : i < 7 ? "nextWeek" : "sameElse"; } function Yr(t, e) { - 1 === arguments.length && (arguments[0] ? Fr(arguments[0]) ? (t = arguments[0], e = void 0) : Ur(arguments[0]) && (e = arguments[0], t = void 0) : (t = void 0, e = void 0)); - var r = t || Zi(), + 1 === arguments.length && (arguments[0] ? Nr(arguments[0]) ? (t = arguments[0], e = void 0) : Ur(arguments[0]) && (e = arguments[0], t = void 0) : (t = void 0, e = void 0)); + var r = t || Xi(), s = pr(r, this).startOf("day"), n = i.calendarFormat(this, s) || "sameElse", o = e && (P(e[n]) ? e[n].call(this, r) : e[n]); - return this.format(o || this.localeData().calendar(n, this, Zi(r))); + return this.format(o || this.localeData().calendar(n, this, Xi(r))); } function zr() { return new x(this); } function jr(t, e) { - var i = w(t) ? t : Zi(t); + var i = w(t) ? t : Xi(t); return !(!this.isValid() || !i.isValid()) && ("millisecond" === (e = et(e) || "millisecond") ? this.valueOf() > i.valueOf() : i.valueOf() < this.clone().startOf(e).valueOf()); } function Gr(t, e) { - var i = w(t) ? t : Zi(t); + var i = w(t) ? t : Xi(t); return !(!this.isValid() || !i.isValid()) && ("millisecond" === (e = et(e) || "millisecond") ? this.valueOf() < i.valueOf() : this.clone().endOf(e).valueOf() < i.valueOf()); } function Vr(t, e, i, r) { - var s = w(t) ? t : Zi(t), - n = w(e) ? e : Zi(e); + var s = w(t) ? t : Xi(t), + n = w(e) ? e : Xi(e); return !!(this.isValid() && s.isValid() && n.isValid()) && ("(" === (r = r || "()")[0] ? this.isAfter(s, i) : !this.isBefore(s, i)) && (")" === r[1] ? this.isBefore(n, i) : !this.isAfter(n, i)); } function Wr(t, e) { var i, - r = w(t) ? t : Zi(t); + r = w(t) ? t : Xi(t); return !(!this.isValid() || !r.isValid()) && ("millisecond" === (e = et(e) || "millisecond") ? this.valueOf() === r.valueOf() : (i = r.valueOf(), this.clone().startOf(e).valueOf() <= i && i <= this.clone().endOf(e).valueOf())); } - function Xr(t, e) { + function Zr(t, e) { return this.isSame(t, e) || this.isAfter(t, e); } - function Zr(t, e) { + function Xr(t, e) { return this.isSame(t, e) || this.isBefore(t, e); } function Kr(t, e, i) { @@ -2253,22 +2253,22 @@ return this.localeData().postformat(e); } function is(t, e) { - return this.isValid() && (w(t) && t.isValid() || Zi(t).isValid()) ? Pr({ + return this.isValid() && (w(t) && t.isValid() || Xi(t).isValid()) ? Pr({ to: this, from: t }).locale(this.locale()).humanize(!e) : this.localeData().invalidDate(); } function rs(t) { - return this.from(Zi(), t); + return this.from(Xi(), t); } function ss(t, e) { - return this.isValid() && (w(t) && t.isValid() || Zi(t).isValid()) ? Pr({ + return this.isValid() && (w(t) && t.isValid() || Xi(t).isValid()) ? Pr({ from: this, to: t }).locale(this.locale()).humanize(!e) : this.localeData().invalidDate(); } function ns(t) { - return this.to(Zi(), t); + return this.to(Xi(), t); } function os(t) { var e; @@ -2396,10 +2396,10 @@ function As() { return u({}, g(this)); } - function Cs() { + function $s() { return g(this).overflow; } - function $s() { + function Cs() { return { input: this._i, format: this._f, @@ -2457,7 +2457,7 @@ } return ""; } - function Hs() { + function Ds() { var t, e, i, @@ -2468,7 +2468,7 @@ } return ""; } - function Ds() { + function Hs() { var t, e, i, @@ -2491,10 +2491,10 @@ function Is(t) { return o(this, "_erasNameRegex") || Ys.call(this), t ? this._erasNameRegex : this._erasRegex; } - function Ns(t) { + function Fs(t) { return o(this, "_erasAbbrRegex") || Ys.call(this), t ? this._erasAbbrRegex : this._erasRegex; } - function Fs(t) { + function Ns(t) { return o(this, "_erasNarrowRegex") || Ys.call(this), t ? this._erasNarrowRegex : this._erasRegex; } function Bs(t, e) { @@ -2538,11 +2538,11 @@ function Ws() { return Se(this.isoWeekYear(), 1, 4); } - function Xs() { + function Zs() { var t = this.localeData()._week; return Se(this.year(), t.dow, t.doy); } - function Zs() { + function Xs() { var t = this.localeData()._week; return Se(this.weekYear(), t.dow, t.doy); } @@ -2558,37 +2558,37 @@ function Js(t) { return null == t ? Math.ceil((this.month() + 1) / 3) : this.month(3 * (t - 1) + this.month() % 3); } - L("N", 0, 0, "eraAbbr"), L("NN", 0, 0, "eraAbbr"), L("NNN", 0, 0, "eraAbbr"), L("NNNN", 0, 0, "eraName"), L("NNNNN", 0, 0, "eraNarrow"), L("y", ["y", 1], "yo", "eraYear"), L("y", ["yy", 2], 0, "eraYear"), L("y", ["yyy", 3], 0, "eraYear"), L("y", ["yyyy", 4], 0, "eraYear"), $t("N", Bs), $t("NN", Bs), $t("NNN", Bs), $t("NNNN", Ls), $t("NNNNN", Us), Ot(["N", "NN", "NNN", "NNNN", "NNNNN"], function (t, e, i, r) { + L("N", 0, 0, "eraAbbr"), L("NN", 0, 0, "eraAbbr"), L("NNN", 0, 0, "eraAbbr"), L("NNNN", 0, 0, "eraName"), L("NNNNN", 0, 0, "eraNarrow"), L("y", ["y", 1], "yo", "eraYear"), L("y", ["yy", 2], 0, "eraYear"), L("y", ["yyy", 3], 0, "eraYear"), L("y", ["yyyy", 4], 0, "eraYear"), Ct("N", Bs), Ct("NN", Bs), Ct("NNN", Bs), Ct("NNNN", Ls), Ct("NNNNN", Us), Ot(["N", "NN", "NNN", "NNNN", "NNNNN"], function (t, e, i, r) { var s = i._locale.erasParse(t, r, i._strict); s ? g(i).era = s : g(i).invalidEra = t; - }), $t("y", yt), $t("yy", yt), $t("yyy", yt), $t("yyyy", yt), $t("yo", Rs), Ot(["y", "yy", "yyy", "yyyy"], Bt), Ot(["yo"], function (t, e, i, r) { + }), Ct("y", yt), Ct("yy", yt), Ct("yyy", yt), Ct("yyyy", yt), Ct("yo", Rs), Ot(["y", "yy", "yyy", "yyyy"], Bt), Ot(["yo"], function (t, e, i, r) { var s; i._locale._eraYearOrdinalRegex && (s = t.match(i._locale._eraYearOrdinalRegex)), i._locale.eraYearOrdinalParse ? e[Bt] = i._locale.eraYearOrdinalParse(t, s) : e[Bt] = parseInt(t, 10); }), L(0, ["gg", 2], 0, function () { return this.weekYear() % 100; }), L(0, ["GG", 2], 0, function () { return this.isoWeekYear() % 100; - }), zs("gggg", "weekYear"), zs("ggggg", "weekYear"), zs("GGGG", "isoWeekYear"), zs("GGGGG", "isoWeekYear"), $t("G", bt), $t("g", bt), $t("GG", dt, at), $t("gg", dt, at), $t("GGGG", gt, lt), $t("gggg", gt, lt), $t("GGGGG", ft, ct), $t("ggggg", ft, ct), It(["gggg", "ggggg", "GGGG", "GGGGG"], function (t, e, i, r) { - e[r.substr(0, 2)] = Ht(t); + }), zs("gggg", "weekYear"), zs("ggggg", "weekYear"), zs("GGGG", "isoWeekYear"), zs("GGGGG", "isoWeekYear"), Ct("G", bt), Ct("g", bt), Ct("GG", dt, at), Ct("gg", dt, at), Ct("GGGG", gt, lt), Ct("gggg", gt, lt), Ct("GGGGG", ft, ct), Ct("ggggg", ft, ct), It(["gggg", "ggggg", "GGGG", "GGGGG"], function (t, e, i, r) { + e[r.substr(0, 2)] = Dt(t); }), It(["gg", "GG"], function (t, e, r, s) { e[s] = i.parseTwoDigitYear(t); - }), L("Q", 0, "Qo", "quarter"), $t("Q", ot), Ot("Q", function (t, e) { - e[Lt] = 3 * (Ht(t) - 1); - }), L("D", ["DD", 2], "Do", "date"), $t("D", dt, At), $t("DD", dt, at), $t("Do", function (t, e) { + }), L("Q", 0, "Qo", "quarter"), Ct("Q", ot), Ot("Q", function (t, e) { + e[Lt] = 3 * (Dt(t) - 1); + }), L("D", ["DD", 2], "Do", "date"), Ct("D", dt, At), Ct("DD", dt, at), Ct("Do", function (t, e) { return t ? e._dayOfMonthOrdinalParse || e._ordinalParse : e._dayOfMonthOrdinalParseLenient; }), Ot(["D", "DD"], Ut), Ot("Do", function (t, e) { - e[Ut] = Ht(t.match(dt)[0]); + e[Ut] = Dt(t.match(dt)[0]); }); var Qs = qt("Date", !0); function tn(t) { var e = Math.round((this.clone().startOf("day") - this.clone().startOf("year")) / 864e5) + 1; return null == t ? e : this.add(t - e, "d"); } - L("DDD", ["DDDD", 3], "DDDo", "dayOfYear"), $t("DDD", mt), $t("DDDD", ht), Ot(["DDD", "DDDD"], function (t, e, i) { - i._dayOfYear = Ht(t); - }), L("m", ["mm", 2], 0, "minute"), $t("m", dt, Ct), $t("mm", dt, at), Ot(["m", "mm"], Yt); + L("DDD", ["DDDD", 3], "DDDo", "dayOfYear"), Ct("DDD", mt), Ct("DDDD", ht), Ot(["DDD", "DDDD"], function (t, e, i) { + i._dayOfYear = Dt(t); + }), L("m", ["mm", 2], 0, "minute"), Ct("m", dt, $t), Ct("mm", dt, at), Ot(["m", "mm"], Yt); var en = qt("Minutes", !1); - L("s", ["ss", 2], 0, "second"), $t("s", dt, Ct), $t("ss", dt, at), Ot(["s", "ss"], zt); + L("s", ["ss", 2], 0, "second"), Ct("s", dt, $t), Ct("ss", dt, at), Ot(["s", "ss"], zt); var rn, sn, nn = qt("Seconds", !1); @@ -2608,9 +2608,9 @@ return 1e5 * this.millisecond(); }), L(0, ["SSSSSSSSS", 9], 0, function () { return 1e6 * this.millisecond(); - }), $t("S", mt, ot), $t("SS", mt, at), $t("SSS", mt, ht), rn = "SSSS"; rn.length <= 9; rn += "S") $t(rn, yt); + }), Ct("S", mt, ot), Ct("SS", mt, at), Ct("SSS", mt, ht), rn = "SSSS"; rn.length <= 9; rn += "S") Ct(rn, yt); function on(t, e) { - e[jt] = Ht(1e3 * ("0." + t)); + e[jt] = Dt(1e3 * ("0." + t)); } for (rn = "S"; rn.length <= 9; rn += "S") Ot(rn, on); function an() { @@ -2622,17 +2622,17 @@ sn = qt("Milliseconds", !1), L("z", 0, 0, "zoneAbbr"), L("zz", 0, 0, "zoneName"); var ln = x.prototype; function cn(t) { - return Zi(1e3 * t); + return Xi(1e3 * t); } function dn() { - return Zi.apply(null, arguments).parseZone(); + return Xi.apply(null, arguments).parseZone(); } function un(t) { return t; } - ln.add = Or, ln.calendar = Yr, ln.clone = zr, ln.diff = Kr, ln.endOf = ys, ln.format = es, ln.from = is, ln.fromNow = rs, ln.to = ss, ln.toNow = ns, ln.get = te, ln.invalidAt = Cs, ln.isAfter = jr, ln.isBefore = Gr, ln.isBetween = Vr, ln.isSame = Wr, ln.isSameOrAfter = Xr, ln.isSameOrBefore = Zr, ln.isValid = Ss, ln.lang = as, ln.locale = os, ln.localeData = hs, ln.max = qi, ln.min = Ki, ln.parsingFlags = As, ln.set = ee, ln.startOf = fs, ln.subtract = Ir, ln.toArray = xs, ln.toObject = ws, ln.toDate = vs, ln.toISOString = Qr, ln.inspect = ts, "undefined" != typeof Symbol && null != Symbol.for && (ln[Symbol.for("nodejs.util.inspect.custom")] = function () { + ln.add = Or, ln.calendar = Yr, ln.clone = zr, ln.diff = Kr, ln.endOf = ys, ln.format = es, ln.from = is, ln.fromNow = rs, ln.to = ss, ln.toNow = ns, ln.get = te, ln.invalidAt = $s, ln.isAfter = jr, ln.isBefore = Gr, ln.isBetween = Vr, ln.isSame = Wr, ln.isSameOrAfter = Zr, ln.isSameOrBefore = Xr, ln.isValid = Ss, ln.lang = as, ln.locale = os, ln.localeData = hs, ln.max = qi, ln.min = Ki, ln.parsingFlags = As, ln.set = ee, ln.startOf = fs, ln.subtract = Ir, ln.toArray = xs, ln.toObject = ws, ln.toDate = vs, ln.toISOString = Qr, ln.inspect = ts, "undefined" != typeof Symbol && null != Symbol.for && (ln[Symbol.for("nodejs.util.inspect.custom")] = function () { return "Moment<" + this.format() + ">"; - }), ln.toJSON = Es, ln.toString = Jr, ln.unix = _s, ln.valueOf = bs, ln.creationData = $s, ln.eraName = Ms, ln.eraNarrow = Hs, ln.eraAbbr = Ds, ln.eraYear = Os, ln.year = Zt, ln.isLeapYear = Kt, ln.weekYear = js, ln.isoWeekYear = Gs, ln.quarter = ln.quarters = Js, ln.month = me, ln.daysInMonth = ge, ln.week = ln.weeks = ke, ln.isoWeek = ln.isoWeeks = Te, ln.weeksInYear = Xs, ln.weeksInWeekYear = Zs, ln.isoWeeksInYear = Vs, ln.isoWeeksInISOWeekYear = Ws, ln.date = Qs, ln.day = ln.days = Ge, ln.weekday = Ve, ln.isoWeekday = We, ln.dayOfYear = tn, ln.hour = ln.hours = si, ln.minute = ln.minutes = en, ln.second = ln.seconds = nn, ln.millisecond = ln.milliseconds = sn, ln.utcOffset = gr, ln.utc = yr, ln.local = br, ln.parseZone = _r, ln.hasAlignedHourOffset = vr, ln.isDST = xr, ln.isLocal = Er, ln.isUtcOffset = Sr, ln.isUtc = Ar, ln.isUTC = Ar, ln.zoneAbbr = an, ln.zoneName = hn, ln.dates = S("dates accessor is deprecated. Use date instead.", Qs), ln.months = S("months accessor is deprecated. Use month instead", me), ln.years = S("years accessor is deprecated. Use year instead", Zt), ln.zone = S("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/", fr), ln.isDSTShifted = S("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information", wr); + }), ln.toJSON = Es, ln.toString = Jr, ln.unix = _s, ln.valueOf = bs, ln.creationData = Cs, ln.eraName = Ms, ln.eraNarrow = Ds, ln.eraAbbr = Hs, ln.eraYear = Os, ln.year = Xt, ln.isLeapYear = Kt, ln.weekYear = js, ln.isoWeekYear = Gs, ln.quarter = ln.quarters = Js, ln.month = me, ln.daysInMonth = ge, ln.week = ln.weeks = ke, ln.isoWeek = ln.isoWeeks = Te, ln.weeksInYear = Zs, ln.weeksInWeekYear = Xs, ln.isoWeeksInYear = Vs, ln.isoWeeksInISOWeekYear = Ws, ln.date = Qs, ln.day = ln.days = Ge, ln.weekday = Ve, ln.isoWeekday = We, ln.dayOfYear = tn, ln.hour = ln.hours = si, ln.minute = ln.minutes = en, ln.second = ln.seconds = nn, ln.millisecond = ln.milliseconds = sn, ln.utcOffset = gr, ln.utc = yr, ln.local = br, ln.parseZone = _r, ln.hasAlignedHourOffset = vr, ln.isDST = xr, ln.isLocal = Er, ln.isUtcOffset = Sr, ln.isUtc = Ar, ln.isUTC = Ar, ln.zoneAbbr = an, ln.zoneName = hn, ln.dates = S("dates accessor is deprecated. Use date instead.", Qs), ln.months = S("months accessor is deprecated. Use month instead", me), ln.years = S("years accessor is deprecated. Use year instead", Xt), ln.zone = S("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/", fr), ln.isDSTShifted = S("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information", wr); var pn = M.prototype; function mn(t, e, i, r) { var s = bi(), @@ -2671,7 +2671,7 @@ function xn(t, e, i) { return fn(t, e, i, "weekdaysMin"); } - pn.calendar = D, pn.longDateFormat = G, pn.invalidDate = W, pn.ordinal = K, pn.preparse = un, pn.postformat = un, pn.relativeTime = J, pn.pastFuture = Q, pn.set = k, pn.eras = Ps, pn.erasParse = ks, pn.erasConvertYear = Ts, pn.erasAbbrRegex = Ns, pn.erasNameRegex = Is, pn.erasNarrowRegex = Fs, pn.months = le, pn.monthsShort = ce, pn.monthsParse = ue, pn.monthsRegex = ye, pn.monthsShortRegex = fe, pn.week = Ae, pn.firstDayOfYear = Pe, pn.firstDayOfWeek = $e, pn.weekdays = Ue, pn.weekdaysMin = Ye, pn.weekdaysShort = Re, pn.weekdaysParse = je, pn.weekdaysRegex = Xe, pn.weekdaysShortRegex = Ze, pn.weekdaysMinRegex = Ke, pn.isPM = ii, pn.meridiem = ni, gi("en", { + pn.calendar = H, pn.longDateFormat = G, pn.invalidDate = W, pn.ordinal = K, pn.preparse = un, pn.postformat = un, pn.relativeTime = J, pn.pastFuture = Q, pn.set = k, pn.eras = Ps, pn.erasParse = ks, pn.erasConvertYear = Ts, pn.erasAbbrRegex = Fs, pn.erasNameRegex = Is, pn.erasNarrowRegex = Ns, pn.months = le, pn.monthsShort = ce, pn.monthsParse = ue, pn.monthsRegex = ye, pn.monthsShortRegex = fe, pn.week = Ae, pn.firstDayOfYear = Pe, pn.firstDayOfWeek = Ce, pn.weekdays = Ue, pn.weekdaysMin = Ye, pn.weekdaysShort = Re, pn.weekdaysParse = je, pn.weekdaysRegex = Ze, pn.weekdaysShortRegex = Xe, pn.weekdaysMinRegex = Ke, pn.isPM = ii, pn.meridiem = ni, gi("en", { eras: [{ since: "0001-01-01", until: 1 / 0, @@ -2690,7 +2690,7 @@ dayOfMonthOrdinalParse: /\d{1,2}(th|st|nd|rd)/, ordinal: function (t) { var e = t % 10; - return t + (1 === Ht(t % 100 / 10) ? "th" : 1 === e ? "st" : 2 === e ? "nd" : 3 === e ? "rd" : "th"); + return t + (1 === Dt(t % 100 / 10) ? "th" : 1 === e ? "st" : 2 === e ? "nd" : 3 === e ? "rd" : "th"); } }), i.lang = S("moment.lang is deprecated. Use moment.locale instead.", gi), i.langData = S("moment.langData is deprecated. Use moment.localeData instead.", bi); var wn = Math.abs; @@ -2705,10 +2705,10 @@ function An(t, e) { return Sn(this, t, e, 1); } - function Cn(t, e) { + function $n(t, e) { return Sn(this, t, e, -1); } - function $n(t) { + function Cn(t) { return t < 0 ? Math.floor(t) : Math.ceil(t); } function Pn() { @@ -2721,7 +2721,7 @@ o = this._days, a = this._months, h = this._data; - return n >= 0 && o >= 0 && a >= 0 || n <= 0 && o <= 0 && a <= 0 || (n += 864e5 * $n(Tn(a) + o), o = 0, a = 0), h.milliseconds = n % 1e3, t = Mt(n / 1e3), h.seconds = t % 60, e = Mt(t / 60), h.minutes = e % 60, i = Mt(e / 60), h.hours = i % 24, o += Mt(i / 24), a += s = Mt(kn(o)), o -= $n(Tn(s)), r = Mt(a / 12), a %= 12, h.days = o, h.months = a, h.years = r, this; + return n >= 0 && o >= 0 && a >= 0 || n <= 0 && o <= 0 && a <= 0 || (n += 864e5 * Cn(Tn(a) + o), o = 0, a = 0), h.milliseconds = n % 1e3, t = Mt(n / 1e3), h.seconds = t % 60, e = Mt(t / 60), h.minutes = e % 60, i = Mt(e / 60), h.hours = i % 24, o += Mt(i / 24), a += s = Mt(kn(o)), o -= Cn(Tn(s)), r = Mt(a / 12), a %= 12, h.days = o, h.months = a, h.years = r, this; } function kn(t) { return 4800 * t / 146097; @@ -2758,21 +2758,21 @@ throw new Error("Unknown unit " + t); } } - function Hn(t) { + function Dn(t) { return function () { return this.as(t); }; } - var Dn = Hn("ms"), - On = Hn("s"), - In = Hn("m"), - Nn = Hn("h"), - Fn = Hn("d"), - Bn = Hn("w"), - Ln = Hn("M"), - Un = Hn("Q"), - Rn = Hn("y"), - Yn = Dn; + var Hn = Dn("ms"), + On = Dn("s"), + In = Dn("m"), + Fn = Dn("h"), + Nn = Dn("d"), + Bn = Dn("w"), + Ln = Dn("M"), + Un = Dn("Q"), + Rn = Dn("y"), + Yn = Hn; function zn() { return Pr(this); } @@ -2786,8 +2786,8 @@ } var Vn = Gn("milliseconds"), Wn = Gn("seconds"), - Xn = Gn("minutes"), - Zn = Gn("hours"), + Zn = Gn("minutes"), + Xn = Gn("hours"), Kn = Gn("days"), qn = Gn("months"), Jn = Gn("years"); @@ -2854,13 +2854,13 @@ return d ? (t = Mt(h / 60), e = Mt(t / 60), h %= 60, t %= 60, i = Mt(c / 12), c %= 12, r = h ? h.toFixed(3).replace(/\.?0+$/, "") : "", s = d < 0 ? "-" : "", n = ho(this._months) !== ho(d) ? "-" : "", o = ho(this._days) !== ho(d) ? "-" : "", a = ho(this._milliseconds) !== ho(d) ? "-" : "", s + "P" + (i ? n + i + "Y" : "") + (c ? n + c + "M" : "") + (l ? o + l + "D" : "") + (e || t || h ? "T" : "") + (e ? a + e + "H" : "") + (t ? a + t + "M" : "") + (h ? a + r + "S" : "")) : "P0D"; } var co = or.prototype; - return co.isValid = sr, co.abs = En, co.add = An, co.subtract = Cn, co.as = Mn, co.asMilliseconds = Dn, co.asSeconds = On, co.asMinutes = In, co.asHours = Nn, co.asDays = Fn, co.asWeeks = Bn, co.asMonths = Ln, co.asQuarters = Un, co.asYears = Rn, co.valueOf = Yn, co._bubble = Pn, co.clone = zn, co.get = jn, co.milliseconds = Vn, co.seconds = Wn, co.minutes = Xn, co.hours = Zn, co.days = Kn, co.weeks = Qn, co.months = qn, co.years = Jn, co.humanize = oo, co.toISOString = lo, co.toString = lo, co.toJSON = lo, co.locale = os, co.localeData = hs, co.toIsoString = S("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)", lo), co.lang = as, L("X", 0, 0, "unix"), L("x", 0, 0, "valueOf"), $t("x", bt), $t("X", xt), Ot("X", function (t, e, i) { + return co.isValid = sr, co.abs = En, co.add = An, co.subtract = $n, co.as = Mn, co.asMilliseconds = Hn, co.asSeconds = On, co.asMinutes = In, co.asHours = Fn, co.asDays = Nn, co.asWeeks = Bn, co.asMonths = Ln, co.asQuarters = Un, co.asYears = Rn, co.valueOf = Yn, co._bubble = Pn, co.clone = zn, co.get = jn, co.milliseconds = Vn, co.seconds = Wn, co.minutes = Zn, co.hours = Xn, co.days = Kn, co.weeks = Qn, co.months = qn, co.years = Jn, co.humanize = oo, co.toISOString = lo, co.toString = lo, co.toJSON = lo, co.locale = os, co.localeData = hs, co.toIsoString = S("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)", lo), co.lang = as, L("X", 0, 0, "unix"), L("x", 0, 0, "valueOf"), Ct("x", bt), Ct("X", xt), Ot("X", function (t, e, i) { i._d = new Date(1e3 * parseFloat(t)); }), Ot("x", function (t, e, i) { - i._d = new Date(Ht(t)); + i._d = new Date(Dt(t)); }), //! moment.js - i.version = "2.30.1", r(Zi), i.fn = ln, i.min = Qi, i.max = tr, i.now = er, i.utc = p, i.unix = cn, i.months = yn, i.isDate = c, i.locale = gi, i.invalid = y, i.duration = Pr, i.isMoment = w, i.weekdays = _n, i.parseZone = dn, i.localeData = bi, i.isDuration = ar, i.monthsShort = bn, i.weekdaysMin = xn, i.defineLocale = fi, i.updateLocale = yi, i.locales = _i, i.weekdaysShort = vn, i.normalizeUnits = et, i.relativeTimeRounding = so, i.relativeTimeThreshold = no, i.calendarFormat = Rr, i.prototype = ln, i.HTML5_FMT = { + i.version = "2.30.1", r(Xi), i.fn = ln, i.min = Qi, i.max = tr, i.now = er, i.utc = p, i.unix = cn, i.months = yn, i.isDate = c, i.locale = gi, i.invalid = y, i.duration = Pr, i.isMoment = w, i.weekdays = _n, i.parseZone = dn, i.localeData = bi, i.isDuration = ar, i.monthsShort = bn, i.weekdaysMin = xn, i.defineLocale = fi, i.updateLocale = yi, i.locales = _i, i.weekdaysShort = vn, i.normalizeUnits = et, i.relativeTimeRounding = so, i.relativeTimeThreshold = no, i.calendarFormat = Rr, i.prototype = ln, i.HTML5_FMT = { DATETIME_LOCAL: "YYYY-MM-DDTHH:mm", DATETIME_LOCAL_SECONDS: "YYYY-MM-DDTHH:mm:ss", DATETIME_LOCAL_MS: "YYYY-MM-DDTHH:mm:ss.SSS", @@ -2872,8 +2872,8 @@ MONTH: "YYYY-MM" }, i; }(); - var Ct = wt(At.exports); - const $t = (t, e, i, r) => { + var $t = wt(At.exports); + const Ct = (t, e, i, r) => { r = r || {}, i = i ?? {}; const s = new Event(e, { bubbles: void 0 === r.bubbles || r.bubbles, @@ -2888,30 +2888,30 @@ }(Pt || (Pt = {})), function (t) { t.F = "F", t.C = "C"; }(kt || (kt = {})), function (t) { - t.Status = "Status", t.HotendCurrent = "Hotend", t.BedCurrent = "Bed", t.HotendTarget = "T Hotend", t.BedTarget = "T Bed", t.PrinterOnline = "Online", t.Availability = "Availability", t.ProjectName = "Project", t.CurrentLayer = "Layer", t.DryingStatus = "Dry Status", t.DryingTime = "Dry Time", t.SpeedMode = "Speed Mode", t.FanSpeed = "Fan Speed"; + t.Status = "Status", t.HotendCurrent = "Hotend", t.BedCurrent = "Bed", t.HotendTarget = "T Hotend", t.BedTarget = "T Bed", t.PrinterOnline = "Online", t.Availability = "Availability", t.ProjectName = "Project", t.CurrentLayer = "Layer", t.DryingStatus = "Dry Status", t.DryingTime = "Dry Time", t.SpeedMode = "Speed Mode", t.FanSpeed = "Fan Speed", t.OnTime = "On Time", t.OffTime = "Off Time", t.BottomTime = "Bottom Time", t.ModelHeight = "Model Height", t.BottomLayers = "Bottom Layers", t.ZUpHeight = "Z Up Height", t.ZUpSpeed = "Z Up Speed", t.ZDownSpeed = "Z Down Speed"; }(Tt || (Tt = {})); const Mt = Object.assign(Object.assign({}, Pt), Tt); - var Ht, Dt; + var Dt, Ht; !function (t) { t.PLA = "PLA", t.PETG = "PETG", t.ABS = "ABS", t.PACF = "PACF", t.PC = "PC", t.ASA = "ASA", t.HIPS = "HIPS", t.PA = "PA", t.PLA_SE = "PLA_SE"; - }(Ht || (Ht = {})), function (t) { + }(Dt || (Dt = {})), function (t) { t.PAUSE = "Pause", t.RESUME = "Resume", t.CANCEL = "Cancel"; - }(Dt || (Dt = {})); + }(Ht || (Ht = {})); const Ot = ["width", "height", "left", "top"]; function It(t, e) { Object.keys(e).forEach(t => { Ot.includes(t) && !isNaN(e[t]) && (e[t] = e[t].toString() + "px"); }), t && Object.assign(t.style, e); } - function Nt(t) { + function Ft(t) { return t.toLowerCase().split(" ").map(t => t.charAt(0).toUpperCase() + t.slice(1)).join(" "); } - function Ft(t, e) { + function Nt(t, e) { return e ? t.states[e.entity_id] : void 0; } function Bt(t, e, i, r) { const s = function (t, e) { - const i = Ft(t, e); + const i = Nt(t, e); return i ? String(i.state) : ""; }(t, e); return "on" === s ? i : r; @@ -2938,7 +2938,7 @@ } function Yt(t, e, i, r) { return function (t, e, i, r, s = "unavailable", n = {}) { - return Ft(t, Rt(e, i, "button", r)) || { + return Nt(t, Rt(e, i, "button", r)) || { state: s, attributes: n }; @@ -2951,7 +2951,7 @@ return !["unavailable"].includes(t.state); } function jt(t, e, i, r, s = "unavailable", n = {}) { - return Ft(t, Rt(e, i, "sensor", r)) || { + return Nt(t, Rt(e, i, "sensor", r)) || { state: s, attributes: n }; @@ -2963,15 +2963,15 @@ function Vt(t) { return ["printing", "preheating"].includes(t); } - const Wt = (t, e) => e ? Ct.duration(t, "seconds").humanize() : (() => { - const e = Ct.duration(t, "seconds"), + const Wt = (t, e) => e ? $t.duration(t, "seconds").humanize() : (() => { + const e = $t.duration(t, "seconds"), i = e.days(), r = e.hours(), s = e.minutes(), n = e.seconds(); return `${i > 0 ? `${i}d` : ""}${r > 0 ? ` ${r}h` : ""}${s > 0 ? ` ${s}m` : ""}${n > 0 ? ` ${n}s` : ""}`; })(); - const Xt = { + const Zt = { [kt.C]: { [kt.C]: t => t, [kt.F]: t => 9 * t / 5 + 32 @@ -2981,7 +2981,7 @@ [kt.F]: t => t } }, - Zt = (t, e, i = !1) => { + Xt = (t, e, i = !1) => { const r = parseFloat(t.state), s = (t => { var e; @@ -2993,12 +2993,12 @@ return kt.F; } })(t), - n = (o = r, h = e || s, Xt[a = s] && Xt[a][h] ? Xt[a][h](o) : -1); + n = (o = r, h = e || s, Zt[a = s] && Zt[a][h] ? Zt[a][h](o) : -1); var o, a, h; return `${i ? Math.round(n) : n.toFixed(2)}°${e || s}`; }; function Kt() { - return [Mt.Status, Mt.ETA, Mt.Elapsed, Mt.HotendCurrent, Mt.BedCurrent, Mt.Remaining, Mt.HotendTarget, Mt.BedTarget]; + return [Mt.Status, Mt.ETA, Mt.Elapsed, Mt.Remaining]; } function qt(t, e) { return void 0 === t ? e : t; @@ -3193,24 +3193,24 @@ const Ee = new Map(), Se = new WeakSet(), Ae = () => new Promise(t => requestAnimationFrame(t)), - Ce = (t, e) => { + $e = (t, e) => { const i = t - e; return 0 === i ? void 0 : i; }, - $e = (t, e) => { + Ce = (t, e) => { const i = t / e; return 1 === i ? void 0 : i; }, Pe = { left: (t, e) => { - const i = Ce(t, e); + const i = $e(t, e); return { value: i, transform: null == i || isNaN(i) ? void 0 : `translateX(${i}px)` }; }, top: (t, e) => { - const i = Ce(t, e); + const i = $e(t, e); return { value: i, transform: null == i || isNaN(i) ? void 0 : `translateY(${i}px)` @@ -3221,7 +3221,7 @@ 0 === e && (e = 1, i = { width: "1px" }); - const r = $e(t, e); + const r = Ce(t, e); return { value: r, overrideFrom: i, @@ -3233,7 +3233,7 @@ 0 === e && (e = 1, i = { height: "1px" }); - const r = $e(t, e); + const r = Ce(t, e); return { value: r, overrideFrom: i, @@ -3247,7 +3247,7 @@ }, Te = ["left", "top", "width", "height", "opacity", "color", "background"], Me = new WeakMap(); - const He = ie(class extends ve { + const De = ie(class extends ve { constructor(t) { if (super(t), this.t = !1, this.i = null, this.o = null, this.h = !0, this.shouldLog = !1, t.type === ee) throw Error("The `animate` directive must be used in attribute position."); this.createFinished(); @@ -3442,11 +3442,11 @@ this.shouldLog && !this.isDisabled() && console.log(t, this.options.id, e); } }); - var De, + var He, Oe, Ie, - Ne = "Anycubic Cloud", - Fe = { + Fe = "Anycubic Cloud", + Ne = { actions: { print: "Print", yes: "Yes", @@ -3575,15 +3575,15 @@ } }, Ue = { - title: Ne, - common: Fe, + title: Fe, + common: Ne, card: Be, panels: Le }, Re = Object.freeze({ __proto__: null, - title: Ne, - common: Fe, + title: Fe, + common: Ne, card: Be, panels: Le, default: Ue @@ -3606,10 +3606,10 @@ function We(t) { return t.type === Oe.select; } - function Xe(t) { + function Ze(t) { return t.type === Oe.plural; } - function Ze(t) { + function Xe(t) { return t.type === Oe.pound; } function Ke(t) { @@ -3623,7 +3623,7 @@ } !function (t) { t[t.EXPECT_ARGUMENT_CLOSING_BRACE = 1] = "EXPECT_ARGUMENT_CLOSING_BRACE", t[t.EMPTY_ARGUMENT = 2] = "EMPTY_ARGUMENT", t[t.MALFORMED_ARGUMENT = 3] = "MALFORMED_ARGUMENT", t[t.EXPECT_ARGUMENT_TYPE = 4] = "EXPECT_ARGUMENT_TYPE", t[t.INVALID_ARGUMENT_TYPE = 5] = "INVALID_ARGUMENT_TYPE", t[t.EXPECT_ARGUMENT_STYLE = 6] = "EXPECT_ARGUMENT_STYLE", t[t.INVALID_NUMBER_SKELETON = 7] = "INVALID_NUMBER_SKELETON", t[t.INVALID_DATE_TIME_SKELETON = 8] = "INVALID_DATE_TIME_SKELETON", t[t.EXPECT_NUMBER_SKELETON = 9] = "EXPECT_NUMBER_SKELETON", t[t.EXPECT_DATE_TIME_SKELETON = 10] = "EXPECT_DATE_TIME_SKELETON", t[t.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE = 11] = "UNCLOSED_QUOTE_IN_ARGUMENT_STYLE", t[t.EXPECT_SELECT_ARGUMENT_OPTIONS = 12] = "EXPECT_SELECT_ARGUMENT_OPTIONS", t[t.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE = 13] = "EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE", t[t.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE = 14] = "INVALID_PLURAL_ARGUMENT_OFFSET_VALUE", t[t.EXPECT_SELECT_ARGUMENT_SELECTOR = 15] = "EXPECT_SELECT_ARGUMENT_SELECTOR", t[t.EXPECT_PLURAL_ARGUMENT_SELECTOR = 16] = "EXPECT_PLURAL_ARGUMENT_SELECTOR", t[t.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT = 17] = "EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT", t[t.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT = 18] = "EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT", t[t.INVALID_PLURAL_ARGUMENT_SELECTOR = 19] = "INVALID_PLURAL_ARGUMENT_SELECTOR", t[t.DUPLICATE_PLURAL_ARGUMENT_SELECTOR = 20] = "DUPLICATE_PLURAL_ARGUMENT_SELECTOR", t[t.DUPLICATE_SELECT_ARGUMENT_SELECTOR = 21] = "DUPLICATE_SELECT_ARGUMENT_SELECTOR", t[t.MISSING_OTHER_CLAUSE = 22] = "MISSING_OTHER_CLAUSE", t[t.INVALID_TAG = 23] = "INVALID_TAG", t[t.INVALID_TAG_NAME = 25] = "INVALID_TAG_NAME", t[t.UNMATCHED_CLOSING_TAG = 26] = "UNMATCHED_CLOSING_TAG", t[t.UNCLOSED_TAG = 27] = "UNCLOSED_TAG"; - }(De || (De = {})), function (t) { + }(He || (He = {})), function (t) { t[t.literal = 0] = "literal", t[t.argument = 1] = "argument", t[t.number = 2] = "number", t[t.date = 3] = "date", t[t.time = 4] = "time", t[t.select = 5] = "select", t[t.plural = 6] = "plural", t[t.pound = 7] = "pound", t[t.tag = 8] = "tag"; }(Oe || (Oe = {})), function (t) { t[t.number = 0] = "number", t[t.dateTime = 1] = "dateTime"; @@ -4216,12 +4216,12 @@ }, Ai = !0; try { - Ai = "a" === (null === (ui = Di("([^\\p{White_Space}\\p{Pattern_Syntax}]*)", "yu").exec("a")) || void 0 === ui ? void 0 : ui[0]); + Ai = "a" === (null === (ui = Hi("([^\\p{White_Space}\\p{Pattern_Syntax}]*)", "yu").exec("a")) || void 0 === ui ? void 0 : ui[0]); } catch (j) { Ai = !1; } - var Ci, - $i = bi ? function (t, e, i) { + var $i, + Ci = bi ? function (t, e, i) { return t.startsWith(e, i); } : function (t, e, i) { return t.slice(i, i + e.length) === e; @@ -4258,21 +4258,21 @@ } : function (t) { return t.replace(gi, ""); }, - Hi = Ei ? function (t) { + Di = Ei ? function (t) { return t.trimEnd(); } : function (t) { return t.replace(fi, ""); }; - function Di(t, e) { + function Hi(t, e) { return new RegExp(t, e); } if (Ai) { - var Oi = Di("([^\\p{White_Space}\\p{Pattern_Syntax}]*)", "yu"); - Ci = function (t, e) { + var Oi = Hi("([^\\p{White_Space}\\p{Pattern_Syntax}]*)", "yu"); + $i = function (t, e) { var i; return Oi.lastIndex = e, null !== (i = Oi.exec(t)[1]) && void 0 !== i ? i : ""; }; - } else Ci = function (t, e) { + } else $i = function (t, e) { for (var i = [];;) { var r = Ti(t, e); if (void 0 === r || Bi(r) || Li(r)) break; @@ -4302,9 +4302,9 @@ if (35 !== s || "plural" !== e && "selectordinal" !== e) { if (60 === s && !this.ignoreTag && 47 === this.peek()) { if (i) break; - return this.error(De.UNMATCHED_CLOSING_TAG, yi(this.clonePosition(), this.clonePosition())); + return this.error(He.UNMATCHED_CLOSING_TAG, yi(this.clonePosition(), this.clonePosition())); } - if (60 === s && !this.ignoreTag && Ni(this.peek() || 0)) { + if (60 === s && !this.ignoreTag && Fi(this.peek() || 0)) { if ((n = this.parseTag(t, e)).err) return n; r.push(n.val); } else { @@ -4343,9 +4343,9 @@ var n = s.val, o = this.clonePosition(); if (this.bumpIf("") ? { + return r !== this.parseTagName() ? this.error(He.UNMATCHED_CLOSING_TAG, yi(a, this.clonePosition())) : (this.bumpSpace(), this.bumpIf(">") ? { val: { type: Oe.tag, value: r, @@ -4353,14 +4353,14 @@ location: yi(i, this.clonePosition()) }, err: null - } : this.error(De.INVALID_TAG, yi(o, this.clonePosition()))); + } : this.error(He.INVALID_TAG, yi(o, this.clonePosition()))); } - return this.error(De.UNCLOSED_TAG, yi(i, this.clonePosition())); + return this.error(He.UNCLOSED_TAG, yi(i, this.clonePosition())); } - return this.error(De.INVALID_TAG, yi(i, this.clonePosition())); + return this.error(He.INVALID_TAG, yi(i, this.clonePosition())); }, t.prototype.parseTagName = function () { var t = this.offset(); - for (this.bump(); !this.isEOF() && Fi(this.char());) this.bump(); + for (this.bump(); !this.isEOF() && Ni(this.char());) this.bump(); return this.message.slice(t, this.offset()); }, t.prototype.parseLiteral = function (t, e) { for (var i = this.clonePosition(), r = "";;) { @@ -4384,7 +4384,7 @@ err: null }; }, t.prototype.tryParseLeftAngleBracket = function () { - return this.isEOF() || 60 !== this.char() || !this.ignoreTag && (Ni(t = this.peek() || 0) || 47 === t) ? null : (this.bump(), "<"); + return this.isEOF() || 60 !== this.char() || !this.ignoreTag && (Fi(t = this.peek() || 0) || 47 === t) ? null : (this.bump(), "<"); var t; }, t.prototype.tryParseQuote = function (t) { if (this.isEOF() || 39 !== this.char()) return null; @@ -4422,11 +4422,11 @@ return 60 === i || 123 === i || 35 === i && ("plural" === e || "selectordinal" === e) || 125 === i && t > 0 ? null : (this.bump(), Pi(i)); }, t.prototype.parseArgument = function (t, e) { var i = this.clonePosition(); - if (this.bump(), this.bumpSpace(), this.isEOF()) return this.error(De.EXPECT_ARGUMENT_CLOSING_BRACE, yi(i, this.clonePosition())); - if (125 === this.char()) return this.bump(), this.error(De.EMPTY_ARGUMENT, yi(i, this.clonePosition())); + if (this.bump(), this.bumpSpace(), this.isEOF()) return this.error(He.EXPECT_ARGUMENT_CLOSING_BRACE, yi(i, this.clonePosition())); + if (125 === this.char()) return this.bump(), this.error(He.EMPTY_ARGUMENT, yi(i, this.clonePosition())); var r = this.parseIdentifierIfPossible().value; - if (!r) return this.error(De.MALFORMED_ARGUMENT, yi(i, this.clonePosition())); - if (this.bumpSpace(), this.isEOF()) return this.error(De.EXPECT_ARGUMENT_CLOSING_BRACE, yi(i, this.clonePosition())); + if (!r) return this.error(He.MALFORMED_ARGUMENT, yi(i, this.clonePosition())); + if (this.bumpSpace(), this.isEOF()) return this.error(He.EXPECT_ARGUMENT_CLOSING_BRACE, yi(i, this.clonePosition())); switch (this.char()) { case 125: return this.bump(), { @@ -4438,14 +4438,14 @@ err: null }; case 44: - return this.bump(), this.bumpSpace(), this.isEOF() ? this.error(De.EXPECT_ARGUMENT_CLOSING_BRACE, yi(i, this.clonePosition())) : this.parseArgumentOptions(t, e, r, i); + return this.bump(), this.bumpSpace(), this.isEOF() ? this.error(He.EXPECT_ARGUMENT_CLOSING_BRACE, yi(i, this.clonePosition())) : this.parseArgumentOptions(t, e, r, i); default: - return this.error(De.MALFORMED_ARGUMENT, yi(i, this.clonePosition())); + return this.error(He.MALFORMED_ARGUMENT, yi(i, this.clonePosition())); } }, t.prototype.parseIdentifierIfPossible = function () { var t = this.clonePosition(), e = this.offset(), - i = Ci(this.message, e), + i = $i(this.message, e), r = e + i.length; return this.bumpTo(r), { value: i, @@ -4458,7 +4458,7 @@ h = this.clonePosition(); switch (a) { case "": - return this.error(De.EXPECT_ARGUMENT_TYPE, yi(o, h)); + return this.error(He.EXPECT_ARGUMENT_TYPE, yi(o, h)); case "number": case "date": case "time": @@ -4468,7 +4468,7 @@ this.bumpSpace(); var c = this.clonePosition(); if ((b = this.parseSimpleArgStyleIfPossible()).err) return b; - if (0 === (m = Hi(b.val)).length) return this.error(De.EXPECT_ARGUMENT_STYLE, yi(this.clonePosition(), this.clonePosition())); + if (0 === (m = Di(b.val)).length) return this.error(He.EXPECT_ARGUMENT_STYLE, yi(this.clonePosition(), this.clonePosition())); l = { style: m, styleLocation: yi(c, this.clonePosition()) @@ -4476,7 +4476,7 @@ } if ((_ = this.tryParseArgumentClose(s)).err) return _; var d = yi(s, this.clonePosition()); - if (l && $i(null == l ? void 0 : l.style, "::", 0)) { + if (l && Ci(null == l ? void 0 : l.style, "::", 0)) { var u = Mi(l.style.slice(2)); if ("number" === a) return (b = this.parseNumberSkeletonFromString(u, l.styleLocation)).err ? b : { val: { @@ -4487,7 +4487,7 @@ }, err: null }; - if (0 === u.length) return this.error(De.EXPECT_DATE_TIME_SKELETON, d); + if (0 === u.length) return this.error(He.EXPECT_DATE_TIME_SKELETON, d); var p = u; this.locale && (p = function (t, e) { for (var i = "", r = 0; r < t.length; r++) { @@ -4532,14 +4532,14 @@ case "selectordinal": case "select": var g = this.clonePosition(); - if (this.bumpSpace(), !this.bumpIf(",")) return this.error(De.EXPECT_SELECT_ARGUMENT_OPTIONS, yi(g, r({}, g))); + if (this.bumpSpace(), !this.bumpIf(",")) return this.error(He.EXPECT_SELECT_ARGUMENT_OPTIONS, yi(g, r({}, g))); this.bumpSpace(); var f = this.parseIdentifierIfPossible(), y = 0; if ("select" !== a && "offset" === f.value) { - if (!this.bumpIf(":")) return this.error(De.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE, yi(this.clonePosition(), this.clonePosition())); + if (!this.bumpIf(":")) return this.error(He.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE, yi(this.clonePosition(), this.clonePosition())); var b; - if (this.bumpSpace(), (b = this.tryParseDecimalInteger(De.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE, De.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE)).err) return b; + if (this.bumpSpace(), (b = this.tryParseDecimalInteger(He.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE, He.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE)).err) return b; this.bumpSpace(), f = this.parseIdentifierIfPossible(), y = b.val; } var _, @@ -4567,10 +4567,10 @@ err: null }; default: - return this.error(De.INVALID_ARGUMENT_TYPE, yi(o, h)); + return this.error(He.INVALID_ARGUMENT_TYPE, yi(o, h)); } }, t.prototype.tryParseArgumentClose = function (t) { - return this.isEOF() || 125 !== this.char() ? this.error(De.EXPECT_ARGUMENT_CLOSING_BRACE, yi(t, this.clonePosition())) : (this.bump(), { + return this.isEOF() || 125 !== this.char() ? this.error(He.EXPECT_ARGUMENT_CLOSING_BRACE, yi(t, this.clonePosition())) : (this.bump(), { val: !0, err: null }); @@ -4580,7 +4580,7 @@ case 39: this.bump(); var i = this.clonePosition(); - if (!this.bumpUntil("'")) return this.error(De.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE, yi(i, this.clonePosition())); + if (!this.bumpUntil("'")) return this.error(He.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE, yi(i, this.clonePosition())); this.bump(); break; case 123: @@ -4620,7 +4620,7 @@ return i; }(t); } catch (t) { - return this.error(De.INVALID_NUMBER_SKELETON, e); + return this.error(He.INVALID_NUMBER_SKELETON, e); } return { val: { @@ -4636,14 +4636,14 @@ if (0 === h.length) { var c = this.clonePosition(); if ("select" === e || !this.bumpIf("=")) break; - var d = this.tryParseDecimalInteger(De.EXPECT_PLURAL_ARGUMENT_SELECTOR, De.INVALID_PLURAL_ARGUMENT_SELECTOR); + var d = this.tryParseDecimalInteger(He.EXPECT_PLURAL_ARGUMENT_SELECTOR, He.INVALID_PLURAL_ARGUMENT_SELECTOR); if (d.err) return d; l = yi(c, this.clonePosition()), h = this.message.slice(c.offset, this.offset()); } - if (a.has(h)) return this.error("select" === e ? De.DUPLICATE_SELECT_ARGUMENT_SELECTOR : De.DUPLICATE_PLURAL_ARGUMENT_SELECTOR, l); + if (a.has(h)) return this.error("select" === e ? He.DUPLICATE_SELECT_ARGUMENT_SELECTOR : He.DUPLICATE_PLURAL_ARGUMENT_SELECTOR, l); "other" === h && (n = !0), this.bumpSpace(); var u = this.clonePosition(); - if (!this.bumpIf("{")) return this.error("select" === e ? De.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT : De.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT, yi(this.clonePosition(), this.clonePosition())); + if (!this.bumpIf("{")) return this.error("select" === e ? He.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT : He.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT, yi(this.clonePosition(), this.clonePosition())); var p = this.parseMessage(t + 1, e, i); if (p.err) return p; var m = this.tryParseArgumentClose(u); @@ -4653,7 +4653,7 @@ location: yi(u, this.clonePosition()) }]), a.add(h), this.bumpSpace(), h = (s = this.parseIdentifierIfPossible()).value, l = s.location; } - return 0 === o.length ? this.error("select" === e ? De.EXPECT_SELECT_ARGUMENT_SELECTOR : De.EXPECT_PLURAL_ARGUMENT_SELECTOR, yi(this.clonePosition(), this.clonePosition())) : this.requiresOtherClause && !n ? this.error(De.MISSING_OTHER_CLAUSE, yi(this.clonePosition(), this.clonePosition())) : { + return 0 === o.length ? this.error("select" === e ? He.EXPECT_SELECT_ARGUMENT_SELECTOR : He.EXPECT_PLURAL_ARGUMENT_SELECTOR, yi(this.clonePosition(), this.clonePosition())) : this.requiresOtherClause && !n ? this.error(He.MISSING_OTHER_CLAUSE, yi(this.clonePosition(), this.clonePosition())) : { val: o, err: null }; @@ -4702,7 +4702,7 @@ 10 === t ? (this.position.line += 1, this.position.column = 1, this.position.offset += 1) : (this.position.column += 1, this.position.offset += t < 65536 ? 1 : 2); } }, t.prototype.bumpIf = function (t) { - if ($i(this.message, t, this.offset())) { + if (Ci(this.message, t, this.offset())) { for (var e = 0; e < t.length; e++) this.bump(); return !0; } @@ -4729,10 +4729,10 @@ return null != i ? i : null; }, t; }(); - function Ni(t) { + function Fi(t) { return t >= 97 && t <= 122 || t >= 65 && t <= 90; } - function Fi(t) { + function Ni(t) { return 45 === t || 46 === t || t >= 48 && t <= 57 || 95 === t || t >= 97 && t <= 122 || t >= 65 && t <= 90 || 183 == t || t >= 192 && t <= 214 || t >= 216 && t <= 246 || t >= 248 && t <= 893 || t >= 895 && t <= 8191 || t >= 8204 && t <= 8205 || t >= 8255 && t <= 8256 || t >= 8304 && t <= 8591 || t >= 11264 && t <= 12271 || t >= 12289 && t <= 55295 || t >= 63744 && t <= 64975 || t >= 65008 && t <= 65533 || t >= 65536 && t <= 983039; } function Bi(t) { @@ -4743,7 +4743,7 @@ } function Ui(t) { t.forEach(function (t) { - if (delete t.location, We(t) || Xe(t)) for (var e in t.options) delete t.options[e].location, Ui(t.options[e].value);else je(t) && qe(t.style) || (Ge(t) || Ve(t)) && Je(t.style) ? delete t.style.location : Ke(t) && Ui(t.children); + if (delete t.location, We(t) || Ze(t)) for (var e in t.options) delete t.options[e].location, Ui(t.options[e].value);else je(t) && qe(t.style) || (Ge(t) || Ve(t)) && Je(t.style) ? delete t.style.location : Ke(t) && Ui(t.children); }); } function Ri(t, e) { @@ -4753,7 +4753,7 @@ }, e); var i = new Ii(t, e).parse(); if (i.err) { - var s = SyntaxError(De[i.err.kind]); + var s = SyntaxError(He[i.err.kind]); throw s.location = i.err.location, s.originalMessage = i.err.message, s; } return (null == e ? void 0 : e.captureLocation) || Ui(i.val), i.val; @@ -4787,18 +4787,18 @@ var Wi = function () { return JSON.stringify(arguments); }; - function Xi() { + function Zi() { this.cache = Object.create(null); } - Xi.prototype.get = function (t) { + Zi.prototype.get = function (t) { return this.cache[t]; - }, Xi.prototype.set = function (t, e) { + }, Zi.prototype.set = function (t, e) { this.cache[t] = e; }; - var Zi, + var Xi, Ki = { create: function () { - return new Xi(); + return new Zi(); } }, qi = { @@ -4811,7 +4811,7 @@ }; !function (t) { t.MISSING_VALUE = "MISSING_VALUE", t.INVALID_VALUE = "INVALID_VALUE", t.MISSING_INTL_API = "MISSING_INTL_API"; - }(Zi || (Zi = {})); + }(Xi || (Xi = {})); var Ji, Qi = function (t) { function e(e, i, r) { @@ -4824,19 +4824,19 @@ }(Error), tr = function (t) { function e(e, i, r, s) { - return t.call(this, 'Invalid values for "'.concat(e, '": "').concat(i, '". Options are "').concat(Object.keys(r).join('", "'), '"'), Zi.INVALID_VALUE, s) || this; + return t.call(this, 'Invalid values for "'.concat(e, '": "').concat(i, '". Options are "').concat(Object.keys(r).join('", "'), '"'), Xi.INVALID_VALUE, s) || this; } return i(e, t), e; }(Qi), er = function (t) { function e(e, i, r) { - return t.call(this, 'Value for "'.concat(e, '" must be of type ').concat(i), Zi.INVALID_VALUE, r) || this; + return t.call(this, 'Value for "'.concat(e, '" must be of type ').concat(i), Xi.INVALID_VALUE, r) || this; } return i(e, t), e; }(Qi), ir = function (t) { function e(e, i) { - return t.call(this, 'The intl string context variable "'.concat(e, '" was not provided to the string "').concat(i, '"'), Zi.MISSING_VALUE, i) || this; + return t.call(this, 'The intl string context variable "'.concat(e, '" was not provided to the string "').concat(i, '"'), Xi.MISSING_VALUE, i) || this; } return i(e, t), e; }(Qi); @@ -4853,7 +4853,7 @@ if (Ye(c)) a.push({ type: Ji.literal, value: c.value - });else if (Ze(c)) "number" == typeof n && a.push({ + });else if (Xe(c)) "number" == typeof n && a.push({ type: Ji.literal, value: i.getNumberFormat(e).format(n) });else { @@ -4899,10 +4899,10 @@ if (We(c)) { if (!(b = c.options[u] || c.options.other)) throw new tr(c.value, u, Object.keys(c.options), o); a.push.apply(a, sr(b.value, e, i, r, s)); - } else if (Xe(c)) { + } else if (Ze(c)) { var b; if (!(b = c.options["=".concat(u)])) { - if (!Intl.PluralRules) throw new Qi('Intl.PluralRules is not available in this environment.\nTry polyfilling it using "@formatjs/intl-pluralrules"\n', Zi.MISSING_INTL_API, o); + if (!Intl.PluralRules) throw new Qi('Intl.PluralRules is not available in this environment.\nTry polyfilling it using "@formatjs/intl-pluralrules"\n', Xi.MISSING_INTL_API, o); var _ = i.getPluralRules(e, { type: c.pluralType }).select(u - (c.offset || 0)); @@ -5135,7 +5135,7 @@ const t = { display: this.showVideo ? "block" : "none" }; - return Z` + return X`
`; @@ -5217,10 +5217,10 @@ var e, i, r, s; super.willUpdate(t), t.has("hass") && this.hass.language !== this.language && (this.language = this.hass.language), t.has("box_id") && (1 === this.box_id ? (this._runoutRefillId = fr, this._spoolsEntityId = br) : (this._runoutRefillId = gr, this._spoolsEntityId = yr)), (t.has("hass") || t.has("printerEntities") || t.has("printerEntityIdPart")) && (this.spoolList = jt(this.hass, this.printerEntities, this.printerEntityIdPart, this._spoolsEntityId, "not loaded", { spool_info: [] - }).attributes.spool_info, this._runoutRefillState = (e = this.hass, i = this.printerEntities, r = this.printerEntityIdPart, s = this._runoutRefillId, Ft(e, Rt(i, r, "switch", s)))); + }).attributes.spool_info, this._runoutRefillState = (e = this.hass, i = this.printerEntities, r = this.printerEntityIdPart, s = this._runoutRefillId, Nt(e, Rt(i, r, "switch", s)))); } render() { - return Z` + return X`
@@ -5252,7 +5252,7 @@ const i = { "background-color": t.spool_loaded ? `rgb(${t.color[0]}, ${t.color[1]}, ${t.color[2]})` : "#aaa" }; - return Z` + return X`
- ${this.dimensions ? Z`
+ ${this.dimensions ? X`
@@ -5533,12 +5533,12 @@
this._moveGantry() })) : null} > @@ -5573,13 +5573,13 @@ E = n.val(t.xAxis.offsetLeft), S = x, A = w, - C = n.val(t.xAxis.extruder.width), - $ = n.val(t.xAxis.extruder.height), - P = _ - C / 2, + $ = n.val(t.xAxis.extruder.width), + C = n.val(t.xAxis.extruder.height), + P = _ - $ / 2, k = P + m, T = n.val(12), M = n.val(12), - H = v - $ - M; + D = v - C - M; return { Scalable: { width: o, @@ -5610,7 +5610,7 @@ width: x, height: w, left: E, - top: H + .7 * $ - w / 2 + top: D + .7 * C - w / 2 }, Track: { width: S, @@ -5621,16 +5621,16 @@ X: p }, Gantry: { - width: C, - height: $, + width: $, + height: C, left: P, - top: H + top: D }, Nozzle: { width: T, height: M, - left: (C - T) / 2, - top: $ + left: ($ - T) / 2, + top: C }, GantryMaxLeft: k }; @@ -5736,9 +5736,9 @@ })], Ar.prototype, "animKeyframeGantry", void 0), s([_t({ type: Boolean })], Ar.prototype, "_isPrinting", void 0), Ar = s([dr("anycubic-printercard-animated_printer")], Ar); - let Cr = class extends pt { + let $r = class extends pt { render() { - return Z` + return X`
{ + const Cr = (t, e, i) => { const r = new Map(); for (let s = e; s <= i; s++) r.set(t[s], s); return r; @@ -5819,7 +5819,7 @@ u = s.length - 1, p = 0, m = n.length - 1; - for (; d <= u && p <= m;) if (null === s[d]) d++;else if (null === s[u]) u--;else if (a[d] === o[p]) h[p] = de(s[d], n[p]), d++, p++;else if (a[u] === o[m]) h[m] = de(s[u], n[m]), u--, m--;else if (a[d] === o[m]) h[m] = de(s[d], n[m]), ce(t, h[m + 1], s[d]), d++, m--;else if (a[u] === o[p]) h[p] = de(s[u], n[p]), ce(t, s[d], s[u]), u--, p++;else if (void 0 === l && (l = $r(o, p, m), c = $r(a, d, u)), l.has(a[d])) { + for (; d <= u && p <= m;) if (null === s[d]) d++;else if (null === s[u]) u--;else if (a[d] === o[p]) h[p] = de(s[d], n[p]), d++, p++;else if (a[u] === o[m]) h[m] = de(s[u], n[m]), u--, m--;else if (a[d] === o[m]) h[m] = de(s[d], n[m]), ce(t, h[m + 1], s[d]), d++, m--;else if (a[u] === o[p]) h[p] = de(s[u], n[p]), ce(t, s[d], s[u]), u--, p++;else if (void 0 === l && (l = Cr(o, p, m), c = Cr(a, d, u)), l.has(a[d])) { if (l.has(a[u])) { const e = c.get(o[p]), i = void 0 !== e ? s[e] : null; @@ -5848,7 +5848,7 @@ const t = { width: String(this.progress) + "%" }; - return Z` + return X`

${this.name}

@@ -5939,7 +5939,7 @@ super(...arguments), this.unit = ""; } render() { - return Z` + return X`

${this.name}

${this.value}${this.unit}

@@ -5988,9 +5988,9 @@ })], Tr.prototype, "unit", void 0), Tr = s([dr("anycubic-printercard-stat-line")], Tr); let Mr = class extends pt { render() { - return Z``; } static get styles() { @@ -6009,7 +6009,7 @@ })], Mr.prototype, "round", void 0), s([bt({ type: String })], Mr.prototype, "temperatureUnit", void 0), Mr = s([dr("anycubic-printercard-stat-temperature")], Mr); - let Hr = class extends pt { + let Dr = class extends pt { constructor() { super(...arguments), this.currentTime = 0, this.lastIntervalId = -1; } @@ -6033,14 +6033,14 @@ super.disconnectedCallback(), clearInterval(this.lastIntervalId); } render() { - return Z` { switch (e) { case Pt.Remaining: return Wt(t, i); case Pt.ETA: - return Ct().add(t, "seconds").format(r ? "HH:mm" : "h:mm a"); + return $t().add(t, "seconds").format(r ? "HH:mm" : "h:mm a"); case Pt.Elapsed: return Wt(t, i); default: @@ -6061,27 +6061,27 @@ `; } }; - s([bt()], Hr.prototype, "timeEntity", void 0), s([bt()], Hr.prototype, "timeType", void 0), s([bt({ + s([bt()], Dr.prototype, "timeEntity", void 0), s([bt()], Dr.prototype, "timeType", void 0), s([bt({ type: Number - })], Hr.prototype, "direction", void 0), s([bt({ + })], Dr.prototype, "direction", void 0), s([bt({ type: Boolean - })], Hr.prototype, "round", void 0), s([bt({ + })], Dr.prototype, "round", void 0), s([bt({ type: Boolean - })], Hr.prototype, "use_24hr", void 0), s([bt({ + })], Dr.prototype, "use_24hr", void 0), s([bt({ type: Boolean - })], Hr.prototype, "isSeconds", void 0), s([_t({ + })], Dr.prototype, "isSeconds", void 0), s([_t({ type: Number - })], Hr.prototype, "currentTime", void 0), s([_t({ + })], Dr.prototype, "currentTime", void 0), s([_t({ type: Number - })], Hr.prototype, "lastIntervalId", void 0), Hr = s([dr("anycubic-printercard-stat-time")], Hr); - let Dr = class extends pt { + })], Dr.prototype, "lastIntervalId", void 0), Dr = s([dr("anycubic-printercard-stat-time")], Dr); + let Hr = class extends pt { constructor() { super(...arguments), this.round = !0, this.temperatureUnit = kt.C, this.progressPercent = 0; } render() { - return Z` + return X`
- ${this.showPercent ? Z` + ${this.showPercent ? X`

${this.round ? Math.round(this.progressPercent) : this.progressPercent}% @@ -6096,14 +6096,14 @@ return Pr(this.monitoredStats, t => t, (t, e) => { switch (t) { case Mt.Status: - return Z` + return X` `; case Mt.ETA: - return Z` + return X` `; case Mt.Elapsed: - return Z` + return X` `; case Mt.Remaining: - return Z` + return X` `; case Mt.BedCurrent: - return Z` + return X` `; case Mt.HotendCurrent: - return Z` + return X` `; case Mt.BedTarget: - return Z` + return X` `; case Mt.HotendTarget: - return Z` + return X` `; case Mt.PrinterOnline: - return Z` + return X` `; case Mt.Availability: - return Z` + return X` `; case Mt.ProjectName: - return Z` + return X` 0 ? [t.slice(0, e), t.slice(e + 1)] : [t], - r = i[0].match(/.{1,10}/g).join("\n"); - return i.length > 1 ? r + "-" + i.slice(1) : r; - }(jt(this.hass, this.printerEntities, this.printerEntityIdPart, "project_name").state)} + .value=${jt(this.hass, this.printerEntities, this.printerEntityIdPart, "project_name").state} > `; case Mt.CurrentLayer: - return Z` + return X` = 0 && r in i ? i[r] : "Unknown"; - return Z` + return X` `; case Mt.DryingStatus: - return Z` + return X` 0 ? i / e * 100 : 0; - return Z` + return X` `; } + case Mt.OnTime: + return X` + + `; + case Mt.OffTime: + return X` + + `; + case Mt.BottomTime: + return X` + + `; + case Mt.ModelHeight: + return X` + + `; + case Mt.BottomLayers: + return X` + + `; + case Mt.ZUpHeight: + return X` + + `; + case Mt.ZUpSpeed: + return X` + + `; + case Mt.ZDownSpeed: + return X` + + `; default: - return Z` + return X` "} @@ -6289,15 +6346,15 @@ `; } }; - s([bt()], Dr.prototype, "hass", void 0), s([bt()], Dr.prototype, "monitoredStats", void 0), s([bt({ + s([bt()], Hr.prototype, "hass", void 0), s([bt()], Hr.prototype, "monitoredStats", void 0), s([bt({ type: Boolean - })], Dr.prototype, "showPercent", void 0), s([bt({ + })], Hr.prototype, "showPercent", void 0), s([bt({ type: Boolean - })], Dr.prototype, "round", void 0), s([bt({ + })], Hr.prototype, "round", void 0), s([bt({ type: Boolean - })], Dr.prototype, "use_24hr", void 0), s([bt({ + })], Hr.prototype, "use_24hr", void 0), s([bt({ type: String - })], Dr.prototype, "temperatureUnit", void 0), s([bt()], Dr.prototype, "printerEntities", void 0), s([bt()], Dr.prototype, "printerEntityIdPart", void 0), s([bt()], Dr.prototype, "progressPercent", void 0), Dr = s([dr("anycubic-printercard-stats-component")], Dr); + })], Hr.prototype, "temperatureUnit", void 0), s([bt()], Hr.prototype, "printerEntities", void 0), s([bt()], Hr.prototype, "printerEntityIdPart", void 0), s([bt()], Hr.prototype, "progressPercent", void 0), Hr = s([dr("anycubic-printercard-stats-component")], Hr); const Or = u` :host { display: none; @@ -6353,7 +6410,7 @@ const t = { filter: this._isActive ? "brightness(80%)" : "brightness(100%)" }; - return Z` + return X`

${this.item} @@ -9936,8 +10001,8 @@ `; } }; - s([bt()], Hs.prototype, "item", void 0), s([bt()], Hs.prototype, "selectedItems", void 0), s([bt()], Hs.prototype, "unusedItems", void 0), s([bt()], Hs.prototype, "reorder", void 0), s([bt()], Hs.prototype, "toggle", void 0), s([_t()], Hs.prototype, "_isActive", void 0), Hs = s([dr("anycubic-ui-multi-select-reorder-item")], Hs); - let Ds = class extends pt { + s([bt()], Ds.prototype, "item", void 0), s([bt()], Ds.prototype, "selectedItems", void 0), s([bt()], Ds.prototype, "unusedItems", void 0), s([bt()], Ds.prototype, "reorder", void 0), s([bt()], Ds.prototype, "toggle", void 0), s([_t()], Ds.prototype, "_isActive", void 0), Ds = s([dr("anycubic-ui-multi-select-reorder-item")], Ds); + let Hs = class extends pt { async firstUpdated() { this._allOptions = Object.values(this.availableOptions), this._selectedItems = [...this.initialItems], this._unusedItems = this._allOptions.filter(t => !this.initialItems.includes(t)), this.requestUpdate(); } @@ -9948,9 +10013,9 @@ const t = { height: this._allOptions ? String(56 * this._allOptions.length) + "px" : "0px" }; - return this._allOptions ? Z` + return this._allOptions ? X`

- ${pr(this._allOptions, (t, e) => Z` + ${pr(this._allOptions, (t, e) => X` { @@ -10026,7 +10091,7 @@ super.willUpdate(t), t.has("printers") && (this.formSchema = this._computeSchema()); } render() { - return Z` + return X`
t, - P = { + $ = { toAttribute(t, e) { switch (e) { case Boolean: @@ -124,13 +124,13 @@ return i; } }, - $ = (t, e) => !g(t, e), + P = (t, e) => !g(t, e), A = { attribute: !0, type: String, - converter: P, + converter: $, reflect: !1, - hasChanged: $ + hasChanged: P }; Symbol.metadata ??= Symbol("metadata"), b.litPropertyMetadata ??= new WeakMap(); class k extends HTMLElement { @@ -144,14 +144,14 @@ if (e.state && (e.attribute = !1), this._$Ei(), this.elementProperties.set(t, e), !e.noAccessor) { const i = Symbol(), r = this.getPropertyDescriptor(t, i, e); - void 0 !== r && f(this.prototype, t, r); + void 0 !== r && m(this.prototype, t, r); } } static getPropertyDescriptor(t, e, i) { const { get: r, set: s - } = m(this.prototype, t) ?? { + } = f(this.prototype, t) ?? { get() { return this[e]; }, @@ -252,7 +252,7 @@ const i = this.constructor.elementProperties.get(t), r = this.constructor._$Eu(t, i); if (void 0 !== r && !0 === i.reflect) { - const s = (void 0 !== i.converter?.toAttribute ? i.converter : P).toAttribute(e, i.type); + const s = (void 0 !== i.converter?.toAttribute ? i.converter : $).toAttribute(e, i.type); this._$Em = t, null == s ? this.removeAttribute(r) : this.setAttribute(r, s), this._$Em = null; } } @@ -263,13 +263,13 @@ const t = i.getPropertyOptions(r), s = "function" == typeof t.converter ? { fromAttribute: t.converter - } : void 0 !== t.converter?.fromAttribute ? t.converter : P; + } : void 0 !== t.converter?.fromAttribute ? t.converter : $; this._$Em = r, this[r] = s.fromAttribute(e, t.type), this._$Em = null; } } requestUpdate(t, e, i) { if (void 0 !== t) { - if (i ??= this.constructor.getPropertyOptions(t), !(i.hasChanged ?? $)(this[t], e)) return; + if (i ??= this.constructor.getPropertyOptions(t), !(i.hasChanged ?? P)(this[t], e)) return; this.P(t, e, i); } !1 === this.isUpdatePending && (this._$ES = this._$ET()); @@ -342,39 +342,39 @@ * SPDX-License-Identifier: BSD-3-Clause */ const T = globalThis, - C = T.trustedTypes, - D = C ? C.createPolicy("lit-html", { + D = T.trustedTypes, + C = D ? D.createPolicy("lit-html", { createHTML: t => t }) : void 0, M = "$lit$", H = `lit$${Math.random().toFixed(9).slice(2)}$`, O = "?" + H, - N = `<${O}>`, - I = document, - F = () => I.createComment(""), + I = `<${O}>`, + N = document, + F = () => N.createComment(""), B = t => null === t || "object" != typeof t && "function" != typeof t, L = Array.isArray, - R = t => L(t) || "function" == typeof t?.[Symbol.iterator], - U = "[ \t\n\f\r]", + U = t => L(t) || "function" == typeof t?.[Symbol.iterator], + R = "[ \t\n\f\r]", Y = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, z = /-->/g, j = />/g, - G = RegExp(`>|${U}(?:([^\\s"'>=/]+)(${U}*=${U}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`, "g"), + G = RegExp(`>|${R}(?:([^\\s"'>=/]+)(${R}*=${R}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`, "g"), V = /'/g, W = /"/g, - X = /^(?:script|style|textarea|title)$/i, - K = (t => (e, ...i) => ({ + Z = /^(?:script|style|textarea|title)$/i, + X = (t => (e, ...i) => ({ _$litType$: t, strings: e, values: i }))(1), - Z = Symbol.for("lit-noChange"), + K = Symbol.for("lit-noChange"), q = Symbol.for("lit-nothing"), J = new WeakMap(), - Q = I.createTreeWalker(I, 129); + Q = N.createTreeWalker(N, 129); function tt(t, e) { if (!Array.isArray(t) || !t.hasOwnProperty("raw")) throw Error("invalid template strings array"); - return void 0 !== D ? D.createHTML(e) : e; + return void 0 !== C ? C.createHTML(e) : e; } const et = (t, e) => { const i = t.length - 1, @@ -388,9 +388,9 @@ l, h = -1, c = 0; - for (; c < i.length && (o.lastIndex = c, l = o.exec(i), null !== l);) c = o.lastIndex, o === Y ? "!--" === l[1] ? o = z : void 0 !== l[1] ? o = j : void 0 !== l[2] ? (X.test(l[2]) && (s = RegExp("" === l[0] ? (o = s ?? Y, h = -1) : void 0 === l[1] ? h = -2 : (h = o.lastIndex - l[2].length, a = l[1], o = void 0 === l[3] ? G : '"' === l[3] ? W : V) : o === W || o === V ? o = G : o === z || o === j ? o = Y : (o = G, s = void 0); + for (; c < i.length && (o.lastIndex = c, l = o.exec(i), null !== l);) c = o.lastIndex, o === Y ? "!--" === l[1] ? o = z : void 0 !== l[1] ? o = j : void 0 !== l[2] ? (Z.test(l[2]) && (s = RegExp("" === l[0] ? (o = s ?? Y, h = -1) : void 0 === l[1] ? h = -2 : (h = o.lastIndex - l[2].length, a = l[1], o = void 0 === l[3] ? G : '"' === l[3] ? W : V) : o === W || o === V ? o = G : o === z || o === j ? o = Y : (o = G, s = void 0); const d = o === G && t[e + 1].startsWith("/>") ? " " : ""; - n += o === Y ? i + N : h >= 0 ? (r.push(a), i.slice(0, h) + M + i.slice(h) + H + d) : i + H + (-2 === h ? e : d); + n += o === Y ? i + I : h >= 0 ? (r.push(a), i.slice(0, h) + M + i.slice(h) + H + d) : i + H + (-2 === h ? e : d); } return [tt(t, n + (t[i] || "") + (2 === e ? "" : "")), r]; }; @@ -427,11 +427,11 @@ type: 6, index: s }), r.removeAttribute(t)); - if (X.test(r.tagName)) { + if (Z.test(r.tagName)) { const t = r.textContent.split(H), e = t.length - 1; if (e > 0) { - r.textContent = C ? C.emptyScript : ""; + r.textContent = D ? D.emptyScript : ""; for (let i = 0; i < e; i++) r.append(t[i], F()), Q.nextNode(), a.push({ type: 2, index: ++s @@ -453,12 +453,12 @@ } } static createElement(t, e) { - const i = I.createElement("template"); + const i = N.createElement("template"); return i.innerHTML = t, i; } } function rt(t, e, i = t, r) { - if (e === Z) return e; + if (e === K) return e; let s = void 0 !== r ? i._$Co?.[r] : i._$Cl; const n = B(e) ? void 0 : e._$litDirective$; return s?.constructor !== n && (s?._$AO?.(!1), void 0 === n ? s = void 0 : (s = new n(t), s._$AT(t, i, r)), void 0 !== r ? (i._$Co ??= [])[r] = s : i._$Cl = s), void 0 !== s && (e = rt(t, s._$AS(t, e.values), s, r)), e; @@ -480,7 +480,7 @@ }, parts: i } = this._$AD, - r = (t?.creationScope ?? I).importNode(e, !0); + r = (t?.creationScope ?? N).importNode(e, !0); Q.currentNode = r; let s = Q.nextNode(), n = 0, @@ -493,7 +493,7 @@ } n !== a?.index && (s = Q.nextNode(), n++); } - return Q.currentNode = I, r; + return Q.currentNode = N, r; } p(t) { let e = 0; @@ -519,7 +519,7 @@ return this._$AB; } _$AI(t, e = this) { - t = rt(this, t, e), B(t) ? t === q || null == t || "" === t ? (this._$AH !== q && this._$AR(), this._$AH = q) : t !== this._$AH && t !== Z && this._(t) : void 0 !== t._$litType$ ? this.$(t) : void 0 !== t.nodeType ? this.T(t) : R(t) ? this.k(t) : this._(t); + t = rt(this, t, e), B(t) ? t === q || null == t || "" === t ? (this._$AH !== q && this._$AR(), this._$AH = q) : t !== this._$AH && t !== K && this._(t) : void 0 !== t._$litType$ ? this.$(t) : void 0 !== t.nodeType ? this.T(t) : U(t) ? this.k(t) : this._(t); } S(t) { return this._$AA.parentNode.insertBefore(t, this._$AB); @@ -528,7 +528,7 @@ this._$AH !== t && (this._$AR(), this._$AH = this.S(t)); } _(t) { - this._$AH !== q && B(this._$AH) ? this._$AA.nextSibling.data = t : this.T(I.createTextNode(t)), this._$AH = t; + this._$AH !== q && B(this._$AH) ? this._$AA.nextSibling.data = t : this.T(N.createTextNode(t)), this._$AH = t; } $(t) { const { @@ -577,10 +577,10 @@ _$AI(t, e = this, i, r) { const s = this.strings; let n = !1; - if (void 0 === s) t = rt(this, t, e, 0), n = !B(t) || t !== this._$AH && t !== Z, n && (this._$AH = t);else { + if (void 0 === s) t = rt(this, t, e, 0), n = !B(t) || t !== this._$AH && t !== K, n && (this._$AH = t);else { const r = t; let o, a; - for (t = s[0], o = 0; o < s.length - 1; o++) a = rt(this, r[i + o], e, o), a === Z && (a = this._$AH[o]), n ||= !B(a) || a !== this._$AH[o], a === q ? t = q : t !== q && (t += (a ?? "") + s[o + 1]), this._$AH[o] = a; + for (t = s[0], o = 0; o < s.length - 1; o++) a = rt(this, r[i + o], e, o), a === K && (a = this._$AH[o]), n ||= !B(a) || a !== this._$AH[o], a === q ? t = q : t !== q && (t += (a ?? "") + s[o + 1]), this._$AH[o] = a; } n && !r && this.j(t); } @@ -609,7 +609,7 @@ super(t, e, i, r, s), this.type = 5; } _$AI(t, e = this) { - if ((t = rt(this, t, e, 0) ?? q) === Z) return; + if ((t = rt(this, t, e, 0) ?? q) === K) return; const i = this._$AH, r = t === q && i !== q || t.capture !== i.capture || t.once !== i.once || t.passive !== i.passive, s = t !== q && (i === q || r); @@ -637,7 +637,7 @@ M: 1, L: et, R: st, - D: R, + D: U, V: rt, I: nt, H: ot, @@ -682,7 +682,7 @@ super.disconnectedCallback(), this._$Do?.setConnected(!1); } render() { - return Z; + return K; } } pt._$litElement$ = !0, pt.finalized = !0, globalThis.litElementHydrateSupport?.({ @@ -697,7 +697,7 @@ * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause */ - const ft = t => (e, i) => { + const mt = t => (e, i) => { void 0 !== i ? i.addInitializer(() => { customElements.define(t, e); }) : customElements.define(t, e); @@ -707,14 +707,14 @@ * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause */, - mt = { + ft = { attribute: !0, type: String, - converter: P, + converter: $, reflect: !1, - hasChanged: $ + hasChanged: P }, - yt = (t = mt, e, i) => { + yt = (t = ft, e, i) => { const { kind: r, metadata: s @@ -817,10 +817,10 @@ throw new Error('Could not dynamically require "' + t + '". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.'); } var St, - Pt = { + $t = { exports: {} }; - (St = Pt).exports = function () { + (St = $t).exports = function () { var t, e; function i() { return t.apply(null, arguments); @@ -864,7 +864,7 @@ return o(e, "toString") && (t.toString = e.toString), o(e, "valueOf") && (t.valueOf = e.valueOf), t; } function p(t, e, i, r) { - return Xi(t, e, i, r, !0).utc(); + return Zi(t, e, i, r, !0).utc(); } function g() { return { @@ -886,20 +886,20 @@ weekdayMismatch: !1 }; } - function f(t) { + function m(t) { return null == t._pf && (t._pf = g()), t._pf; } - function m(t) { + function f(t) { var i = null, r = !1, s = t._d && !isNaN(t._d.getTime()); - return s && (i = f(t), r = e.call(i.parsedDateParts, function (t) { + return s && (i = m(t), r = e.call(i.parsedDateParts, function (t) { return null != t; }), s = i.overflow < 0 && !i.empty && !i.invalidEra && !i.invalidMonth && !i.invalidWeekday && !i.weekdayMismatch && !i.nullInput && !i.invalidFormat && !i.userInvalidated && (!i.meridiem || i.meridiem && r), t._strict && (s = s && 0 === i.charsLeftOver && 0 === i.unusedTokens.length && void 0 === i.bigHour)), null != Object.isFrozen && Object.isFrozen(t) ? s : (t._isValid = s, t._isValid); } function y(t) { var e = p(NaN); - return null != t ? u(f(e), t) : f(e).userInvalidated = !0, e; + return null != t ? u(m(e), t) : m(e).userInvalidated = !0, e; } e = Array.prototype.some ? Array.prototype.some : function (t) { var e, @@ -915,7 +915,7 @@ r, s, n = v.length; - if (l(e._isAMomentObject) || (t._isAMomentObject = e._isAMomentObject), l(e._i) || (t._i = e._i), l(e._f) || (t._f = e._f), l(e._l) || (t._l = e._l), l(e._strict) || (t._strict = e._strict), l(e._tzm) || (t._tzm = e._tzm), l(e._isUTC) || (t._isUTC = e._isUTC), l(e._offset) || (t._offset = e._offset), l(e._pf) || (t._pf = f(e)), l(e._locale) || (t._locale = e._locale), n > 0) for (i = 0; i < n; i++) l(s = e[r = v[i]]) || (t[r] = s); + if (l(e._isAMomentObject) || (t._isAMomentObject = e._isAMomentObject), l(e._i) || (t._i = e._i), l(e._f) || (t._f = e._f), l(e._l) || (t._l = e._l), l(e._strict) || (t._strict = e._strict), l(e._tzm) || (t._tzm = e._tzm), l(e._isUTC) || (t._isUTC = e._isUTC), l(e._offset) || (t._offset = e._offset), l(e._pf) || (t._pf = m(e)), l(e._locale) || (t._locale = e._locale), n > 0) for (i = 0; i < n; i++) l(s = e[r = v[i]]) || (t[r] = s); return t; } function w(t) { @@ -948,10 +948,10 @@ return e.apply(this, arguments); }, e); } - var P, - $ = {}; + var $, + P = {}; function A(t, e) { - null != i.deprecationHandler && i.deprecationHandler(t, e), $[t] || (E(e), $[t] = !0); + null != i.deprecationHandler && i.deprecationHandler(t, e), P[t] || (E(e), P[t] = !0); } function k(t) { return "undefined" != typeof Function && t instanceof Function || "[object Function]" === Object.prototype.toString.call(t); @@ -961,17 +961,17 @@ for (i in t) o(t, i) && (k(e = t[i]) ? this[i] = e : this["_" + i] = e); this._config = t, this._dayOfMonthOrdinalParseLenient = new RegExp((this._dayOfMonthOrdinalParse.source || this._ordinalParse.source) + "|" + /\d{1,2}/.source); } - function C(t, e) { + function D(t, e) { var i, r = u({}, t); for (i in e) o(e, i) && (n(t[i]) && n(e[i]) ? (r[i] = {}, u(r[i], t[i]), u(r[i], e[i])) : null != e[i] ? r[i] = e[i] : delete r[i]); for (i in t) o(t, i) && !o(e, i) && n(t[i]) && (r[i] = u({}, r[i])); return r; } - function D(t) { + function C(t) { null != t && this.set(t); } - i.suppressDeprecationWarnings = !1, i.deprecationHandler = null, P = Object.keys ? Object.keys : function (t) { + i.suppressDeprecationWarnings = !1, i.deprecationHandler = null, $ = Object.keys ? Object.keys : function (t) { var e, i = []; for (e in t) o(t, e) && i.push(e); @@ -994,8 +994,8 @@ s = e - r.length; return (t >= 0 ? i ? "+" : "" : "-") + Math.pow(10, Math.max(0, s)).toString().substr(1) + r; } - var N = /(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g, - I = /(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g, + var I = /(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g, + N = /(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g, F = {}, B = {}; function L(t, e, i, r) { @@ -1008,14 +1008,14 @@ return this.localeData().ordinal(s.apply(this, arguments), t); }); } - function R(t) { + function U(t) { return t.match(/\[[\s\S]/) ? t.replace(/^\[|\]$/g, "") : t.replace(/\\/g, ""); } - function U(t) { + function R(t) { var e, i, - r = t.match(N); - for (e = 0, i = r.length; e < i; e++) B[r[e]] ? r[e] = B[r[e]] : r[e] = R(r[e]); + r = t.match(I); + for (e = 0, i = r.length; e < i; e++) B[r[e]] ? r[e] = B[r[e]] : r[e] = U(r[e]); return function (e) { var s, n = ""; @@ -1024,14 +1024,14 @@ }; } function Y(t, e) { - return t.isValid() ? (e = z(e, t.localeData()), F[e] = F[e] || U(e), F[e](t)) : t.localeData().invalidDate(); + return t.isValid() ? (e = z(e, t.localeData()), F[e] = F[e] || R(e), F[e](t)) : t.localeData().invalidDate(); } function z(t, e) { var i = 5; function r(t) { return e.longDateFormat(t) || t; } - for (I.lastIndex = 0; i >= 0 && I.test(t);) t = t.replace(I, r), I.lastIndex = 0, i -= 1; + for (N.lastIndex = 0; i >= 0 && N.test(t);) t = t.replace(N, r), N.lastIndex = 0, i -= 1; return t; } var j = { @@ -1045,7 +1045,7 @@ function G(t) { var e = this._longDateFormat[t], i = this._longDateFormat[t.toUpperCase()]; - return e || !i ? e : (this._longDateFormat[t] = i.match(N).map(function (t) { + return e || !i ? e : (this._longDateFormat[t] = i.match(I).map(function (t) { return "MMMM" === t || "MM" === t || "DD" === t || "dddd" === t ? t.slice(1) : t; }).join(""), this._longDateFormat[t]); } @@ -1053,9 +1053,9 @@ function W() { return this._invalidDate; } - var X = "%d", - K = /\d{1,2}/; - function Z(t) { + var Z = "%d", + X = /\d{1,2}/; + function K(t) { return this._ordinal.replace("%d", t); } var q = { @@ -1183,16 +1183,16 @@ ut = /\d\d\d\d?/, pt = /\d\d\d\d\d\d?/, gt = /\d{1,3}/, - ft = /\d{1,4}/, - mt = /[+-]?\d{1,6}/, + mt = /\d{1,4}/, + ft = /[+-]?\d{1,6}/, yt = /\d+/, vt = /[+-]?\d+/, _t = /Z|[+-]\d\d:?\d\d/gi, bt = /Z|[+-]\d\d(?::?\d\d)?/gi, wt = /[+-]?\d+(\.\d{1,3})?/, xt = /[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i, - Pt = /^[1-9]\d?/, - $t = /^([1-9]\d|\d)/; + $t = /^[1-9]\d?/, + Pt = /^([1-9]\d|\d)/; function At(t, e, i) { nt[t] = k(e) ? e : function (t, r) { return t && i ? i : e; @@ -1202,20 +1202,20 @@ return o(nt, t) ? nt[t](e._strict, e._locale) : new RegExp(Tt(t)); } function Tt(t) { - return Ct(t.replace("\\", "").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g, function (t, e, i, r, s) { + return Dt(t.replace("\\", "").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g, function (t, e, i, r, s) { return e || i || r || s; })); } - function Ct(t) { + function Dt(t) { return t.replace(/[-\/\\^$*+?.()|[\]{}]/g, "\\$&"); } - function Dt(t) { + function Ct(t) { return t < 0 ? Math.ceil(t) || 0 : Math.floor(t); } function Mt(t) { var e = +t, i = 0; - return 0 !== e && isFinite(e) && (i = Dt(e)), i; + return 0 !== e && isFinite(e) && (i = Ct(e)), i; } nt = {}; var Ht = {}; @@ -1227,12 +1227,12 @@ i[e] = Mt(t); }), r = t.length, i = 0; i < r; i++) Ht[t[i]] = s; } - function Nt(t, e) { + function It(t, e) { Ot(t, function (t, i, r, s) { r._w = r._w || {}, e(t, r._w, r, s); }); } - function It(t, e, i) { + function Nt(t, e, i) { null != e && o(Ht, t) && Ht[t](e, i._a, i, t); } function Ft(t) { @@ -1240,8 +1240,8 @@ } var Bt = 0, Lt = 1, - Rt = 2, - Ut = 3, + Ut = 2, + Rt = 3, Yt = 4, zt = 5, jt = 6, @@ -1255,7 +1255,7 @@ return t <= 9999 ? O(t, 4) : "+" + t; }), L(0, ["YY", 2], 0, function () { return this.year() % 100; - }), L(0, ["YYYY", 4], 0, "year"), L(0, ["YYYYY", 5], 0, "year"), L(0, ["YYYYYY", 6, !0], 0, "year"), At("Y", vt), At("YY", dt, at), At("YYYY", ft, ht), At("YYYYY", mt, ct), At("YYYYYY", mt, ct), Ot(["YYYYY", "YYYYYY"], Bt), Ot("YYYY", function (t, e) { + }), L(0, ["YYYY", 4], 0, "year"), L(0, ["YYYYY", 5], 0, "year"), L(0, ["YYYYYY", 6, !0], 0, "year"), At("Y", vt), At("YY", dt, at), At("YYYY", mt, ht), At("YYYYY", ft, ct), At("YYYYYY", ft, ct), Ot(["YYYYY", "YYYYYY"], Bt), Ot("YYYY", function (t, e) { e[Bt] = 2 === t.length ? i.parseTwoDigitYear(t) : Mt(t); }), Ot("YY", function (t, e) { e[Bt] = i.parseTwoDigitYear(t); @@ -1264,9 +1264,9 @@ }), i.parseTwoDigitYear = function (t) { return Mt(t) + (Mt(t) > 68 ? 1900 : 2e3); }; - var Xt, - Kt = qt("FullYear", !0); - function Zt() { + var Zt, + Xt = qt("FullYear", !0); + function Kt() { return Ft(this.year()); } function qt(t, e) { @@ -1341,7 +1341,7 @@ var i = ie(e, 12); return t += (e - i) / 12, 1 === i ? Ft(t) ? 29 : 28 : 31 - i % 7 % 2; } - Xt = Array.prototype.indexOf ? Array.prototype.indexOf : function (t) { + Zt = Array.prototype.indexOf ? Array.prototype.indexOf : function (t) { var e; for (e = 0; e < this.length; ++e) if (this[e] === t) return e; return -1; @@ -1351,7 +1351,7 @@ return this.localeData().monthsShort(this, t); }), L("MMMM", 0, 0, function (t) { return this.localeData().months(this, t); - }), At("M", dt, Pt), At("MM", dt, at), At("MMM", function (t, e) { + }), At("M", dt, $t), At("MM", dt, at), At("MMM", function (t, e) { return e.monthsShortRegex(t); }), At("MMMM", function (t, e) { return e.monthsRegex(t); @@ -1359,7 +1359,7 @@ e[Lt] = Mt(t) - 1; }), Ot(["MMM", "MMMM"], function (t, e, i, r) { var s = i._locale.monthsParse(t, r, i._strict); - null != s ? e[Lt] = s : f(i).invalidMonth = t; + null != s ? e[Lt] = s : m(i).invalidMonth = t; }); var se = "January_February_March_April_May_June_July_August_September_October_November_December".split("_"), ne = "Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"), @@ -1378,7 +1378,7 @@ n, o = t.toLocaleLowerCase(); if (!this._monthsParse) for (this._monthsParse = [], this._longMonthsParse = [], this._shortMonthsParse = [], r = 0; r < 12; ++r) n = p([2e3, r]), this._shortMonthsParse[r] = this.monthsShort(n, "").toLocaleLowerCase(), this._longMonthsParse[r] = this.months(n, "").toLocaleLowerCase(); - return i ? "MMM" === e ? -1 !== (s = Xt.call(this._shortMonthsParse, o)) ? s : null : -1 !== (s = Xt.call(this._longMonthsParse, o)) ? s : null : "MMM" === e ? -1 !== (s = Xt.call(this._shortMonthsParse, o)) || -1 !== (s = Xt.call(this._longMonthsParse, o)) ? s : null : -1 !== (s = Xt.call(this._longMonthsParse, o)) || -1 !== (s = Xt.call(this._shortMonthsParse, o)) ? s : null; + return i ? "MMM" === e ? -1 !== (s = Zt.call(this._shortMonthsParse, o)) ? s : null : -1 !== (s = Zt.call(this._longMonthsParse, o)) ? s : null : "MMM" === e ? -1 !== (s = Zt.call(this._shortMonthsParse, o)) || -1 !== (s = Zt.call(this._longMonthsParse, o)) ? s : null : -1 !== (s = Zt.call(this._longMonthsParse, o)) || -1 !== (s = Zt.call(this._shortMonthsParse, o)) ? s : null; } function ue(t, e, i) { var r, s, n; @@ -1399,10 +1399,10 @@ function ge(t) { return null != t ? (pe(this, t), i.updateOffset(this, !0), this) : Jt(this, "Month"); } - function fe() { + function me() { return re(this.year(), this.month()); } - function me(t) { + function fe(t) { return this._monthsParseExact ? (o(this, "_monthsRegex") || ve.call(this), t ? this._monthsShortStrictRegex : this._monthsShortRegex) : (o(this, "_monthsShortRegex") || (this._monthsShortRegex = ae), this._monthsShortStrictRegex && t ? this._monthsShortStrictRegex : this._monthsShortRegex); } function ye(t) { @@ -1419,7 +1419,7 @@ n = [], o = [], a = []; - for (e = 0; e < 12; e++) i = p([2e3, e]), r = Ct(this.monthsShort(i, "")), s = Ct(this.months(i, "")), n.push(r), o.push(s), a.push(s), a.push(r); + for (e = 0; e < 12; e++) i = p([2e3, e]), r = Dt(this.monthsShort(i, "")), s = Dt(this.months(i, "")), n.push(r), o.push(s), a.push(s), a.push(r); n.sort(t), o.sort(t), a.sort(t), this._monthsRegex = new RegExp("^(" + a.join("|") + ")", "i"), this._monthsShortRegex = this._monthsRegex, this._monthsStrictRegex = new RegExp("^(" + o.join("|") + ")", "i"), this._monthsShortStrictRegex = new RegExp("^(" + n.join("|") + ")", "i"); } function _e(t, e, i, r, s, n, o) { @@ -1458,13 +1458,13 @@ s = we(t + 1, e, i); return (Wt(t) - r + s) / 7; } - function Pe(t) { + function $e(t) { return Ee(t, this._week.dow, this._week.doy).week; } - L("w", ["ww", 2], "wo", "week"), L("W", ["WW", 2], "Wo", "isoWeek"), At("w", dt, Pt), At("ww", dt, at), At("W", dt, Pt), At("WW", dt, at), Nt(["w", "ww", "W", "WW"], function (t, e, i, r) { + L("w", ["ww", 2], "wo", "week"), L("W", ["WW", 2], "Wo", "isoWeek"), At("w", dt, $t), At("ww", dt, at), At("W", dt, $t), At("WW", dt, at), It(["w", "ww", "W", "WW"], function (t, e, i, r) { e[r.substr(0, 1)] = Mt(t); }); - var $e = { + var Pe = { dow: 0, doy: 6 }; @@ -1478,11 +1478,11 @@ var e = this.localeData().week(this); return null == t ? e : this.add(7 * (t - e), "d"); } - function Ce(t) { + function De(t) { var e = Ee(this, 1, 4).week; return null == t ? e : this.add(7 * (t - e), "d"); } - function De(t, e) { + function Ce(t, e) { return "string" != typeof t ? t : isNaN(t) ? "number" == typeof (t = e.weekdaysParse(t)) ? t : null : parseInt(t, 10); } function Me(t, e) { @@ -1503,23 +1503,23 @@ return e.weekdaysShortRegex(t); }), At("dddd", function (t, e) { return e.weekdaysRegex(t); - }), Nt(["dd", "ddd", "dddd"], function (t, e, i, r) { + }), It(["dd", "ddd", "dddd"], function (t, e, i, r) { var s = i._locale.weekdaysParse(t, r, i._strict); - null != s ? e.d = s : f(i).invalidWeekday = t; - }), Nt(["d", "e", "E"], function (t, e, i, r) { + null != s ? e.d = s : m(i).invalidWeekday = t; + }), It(["d", "e", "E"], function (t, e, i, r) { e[r] = Mt(t); }); var Oe = "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"), - Ne = "Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"), - Ie = "Su_Mo_Tu_We_Th_Fr_Sa".split("_"), + Ie = "Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"), + Ne = "Su_Mo_Tu_We_Th_Fr_Sa".split("_"), Fe = xt, Be = xt, Le = xt; - function Re(t, e) { + function Ue(t, e) { var i = s(this._weekdays) ? this._weekdays : this._weekdays[t && !0 !== t && this._weekdays.isFormat.test(e) ? "format" : "standalone"]; return !0 === t ? He(i, this._week.dow) : t ? i[t.day()] : i; } - function Ue(t) { + function Re(t) { return !0 === t ? He(this._weekdaysShort, this._week.dow) : t ? this._weekdaysShort[t.day()] : this._weekdaysShort; } function Ye(t) { @@ -1531,7 +1531,7 @@ n, o = t.toLocaleLowerCase(); if (!this._weekdaysParse) for (this._weekdaysParse = [], this._shortWeekdaysParse = [], this._minWeekdaysParse = [], r = 0; r < 7; ++r) n = p([2e3, 1]).day(r), this._minWeekdaysParse[r] = this.weekdaysMin(n, "").toLocaleLowerCase(), this._shortWeekdaysParse[r] = this.weekdaysShort(n, "").toLocaleLowerCase(), this._weekdaysParse[r] = this.weekdays(n, "").toLocaleLowerCase(); - return i ? "dddd" === e ? -1 !== (s = Xt.call(this._weekdaysParse, o)) ? s : null : "ddd" === e ? -1 !== (s = Xt.call(this._shortWeekdaysParse, o)) ? s : null : -1 !== (s = Xt.call(this._minWeekdaysParse, o)) ? s : null : "dddd" === e ? -1 !== (s = Xt.call(this._weekdaysParse, o)) || -1 !== (s = Xt.call(this._shortWeekdaysParse, o)) || -1 !== (s = Xt.call(this._minWeekdaysParse, o)) ? s : null : "ddd" === e ? -1 !== (s = Xt.call(this._shortWeekdaysParse, o)) || -1 !== (s = Xt.call(this._weekdaysParse, o)) || -1 !== (s = Xt.call(this._minWeekdaysParse, o)) ? s : null : -1 !== (s = Xt.call(this._minWeekdaysParse, o)) || -1 !== (s = Xt.call(this._weekdaysParse, o)) || -1 !== (s = Xt.call(this._shortWeekdaysParse, o)) ? s : null; + return i ? "dddd" === e ? -1 !== (s = Zt.call(this._weekdaysParse, o)) ? s : null : "ddd" === e ? -1 !== (s = Zt.call(this._shortWeekdaysParse, o)) ? s : null : -1 !== (s = Zt.call(this._minWeekdaysParse, o)) ? s : null : "dddd" === e ? -1 !== (s = Zt.call(this._weekdaysParse, o)) || -1 !== (s = Zt.call(this._shortWeekdaysParse, o)) || -1 !== (s = Zt.call(this._minWeekdaysParse, o)) ? s : null : "ddd" === e ? -1 !== (s = Zt.call(this._shortWeekdaysParse, o)) || -1 !== (s = Zt.call(this._weekdaysParse, o)) || -1 !== (s = Zt.call(this._minWeekdaysParse, o)) ? s : null : -1 !== (s = Zt.call(this._minWeekdaysParse, o)) || -1 !== (s = Zt.call(this._weekdaysParse, o)) || -1 !== (s = Zt.call(this._shortWeekdaysParse, o)) ? s : null; } function je(t, e, i) { var r, s, n; @@ -1546,7 +1546,7 @@ function Ge(t) { if (!this.isValid()) return null != t ? this : NaN; var e = Jt(this, "Day"); - return null != t ? (t = De(t, this.localeData()), this.add(t - e, "d")) : e; + return null != t ? (t = Ce(t, this.localeData()), this.add(t - e, "d")) : e; } function Ve(t) { if (!this.isValid()) return null != t ? this : NaN; @@ -1561,13 +1561,13 @@ } return this.day() || 7; } - function Xe(t) { + function Ze(t) { return this._weekdaysParseExact ? (o(this, "_weekdaysRegex") || qe.call(this), t ? this._weekdaysStrictRegex : this._weekdaysRegex) : (o(this, "_weekdaysRegex") || (this._weekdaysRegex = Fe), this._weekdaysStrictRegex && t ? this._weekdaysStrictRegex : this._weekdaysRegex); } - function Ke(t) { + function Xe(t) { return this._weekdaysParseExact ? (o(this, "_weekdaysRegex") || qe.call(this), t ? this._weekdaysShortStrictRegex : this._weekdaysShortRegex) : (o(this, "_weekdaysShortRegex") || (this._weekdaysShortRegex = Be), this._weekdaysShortStrictRegex && t ? this._weekdaysShortStrictRegex : this._weekdaysShortRegex); } - function Ze(t) { + function Ke(t) { return this._weekdaysParseExact ? (o(this, "_weekdaysRegex") || qe.call(this), t ? this._weekdaysMinStrictRegex : this._weekdaysMinRegex) : (o(this, "_weekdaysMinRegex") || (this._weekdaysMinRegex = Le), this._weekdaysMinStrictRegex && t ? this._weekdaysMinStrictRegex : this._weekdaysMinRegex); } function qe() { @@ -1583,7 +1583,7 @@ a = [], l = [], h = []; - for (e = 0; e < 7; e++) i = p([2e3, 1]).day(e), r = Ct(this.weekdaysMin(i, "")), s = Ct(this.weekdaysShort(i, "")), n = Ct(this.weekdays(i, "")), o.push(r), a.push(s), l.push(n), h.push(r), h.push(s), h.push(n); + for (e = 0; e < 7; e++) i = p([2e3, 1]).day(e), r = Dt(this.weekdaysMin(i, "")), s = Dt(this.weekdaysShort(i, "")), n = Dt(this.weekdays(i, "")), o.push(r), a.push(s), l.push(n), h.push(r), h.push(s), h.push(n); o.sort(t), a.sort(t), l.sort(t), h.sort(t), this._weekdaysRegex = new RegExp("^(" + h.join("|") + ")", "i"), this._weekdaysShortRegex = this._weekdaysRegex, this._weekdaysMinRegex = this._weekdaysRegex, this._weekdaysStrictRegex = new RegExp("^(" + l.join("|") + ")", "i"), this._weekdaysShortStrictRegex = new RegExp("^(" + a.join("|") + ")", "i"), this._weekdaysMinStrictRegex = new RegExp("^(" + o.join("|") + ")", "i"); } function Je() { @@ -1611,27 +1611,27 @@ return "" + this.hours() + O(this.minutes(), 2); }), L("Hmmss", 0, 0, function () { return "" + this.hours() + O(this.minutes(), 2) + O(this.seconds(), 2); - }), ti("a", !0), ti("A", !1), At("a", ei), At("A", ei), At("H", dt, $t), At("h", dt, Pt), At("k", dt, Pt), At("HH", dt, at), At("hh", dt, at), At("kk", dt, at), At("hmm", ut), At("hmmss", pt), At("Hmm", ut), At("Hmmss", pt), Ot(["H", "HH"], Ut), Ot(["k", "kk"], function (t, e, i) { + }), ti("a", !0), ti("A", !1), At("a", ei), At("A", ei), At("H", dt, Pt), At("h", dt, $t), At("k", dt, $t), At("HH", dt, at), At("hh", dt, at), At("kk", dt, at), At("hmm", ut), At("hmmss", pt), At("Hmm", ut), At("Hmmss", pt), Ot(["H", "HH"], Rt), Ot(["k", "kk"], function (t, e, i) { var r = Mt(t); - e[Ut] = 24 === r ? 0 : r; + e[Rt] = 24 === r ? 0 : r; }), Ot(["a", "A"], function (t, e, i) { i._isPm = i._locale.isPM(t), i._meridiem = t; }), Ot(["h", "hh"], function (t, e, i) { - e[Ut] = Mt(t), f(i).bigHour = !0; + e[Rt] = Mt(t), m(i).bigHour = !0; }), Ot("hmm", function (t, e, i) { var r = t.length - 2; - e[Ut] = Mt(t.substr(0, r)), e[Yt] = Mt(t.substr(r)), f(i).bigHour = !0; + e[Rt] = Mt(t.substr(0, r)), e[Yt] = Mt(t.substr(r)), m(i).bigHour = !0; }), Ot("hmmss", function (t, e, i) { var r = t.length - 4, s = t.length - 2; - e[Ut] = Mt(t.substr(0, r)), e[Yt] = Mt(t.substr(r, 2)), e[zt] = Mt(t.substr(s)), f(i).bigHour = !0; + e[Rt] = Mt(t.substr(0, r)), e[Yt] = Mt(t.substr(r, 2)), e[zt] = Mt(t.substr(s)), m(i).bigHour = !0; }), Ot("Hmm", function (t, e, i) { var r = t.length - 2; - e[Ut] = Mt(t.substr(0, r)), e[Yt] = Mt(t.substr(r)); + e[Rt] = Mt(t.substr(0, r)), e[Yt] = Mt(t.substr(r)); }), Ot("Hmmss", function (t, e, i) { var r = t.length - 4, s = t.length - 2; - e[Ut] = Mt(t.substr(0, r)), e[Yt] = Mt(t.substr(r, 2)), e[zt] = Mt(t.substr(s)); + e[Rt] = Mt(t.substr(0, r)), e[Yt] = Mt(t.substr(r, 2)), e[zt] = Mt(t.substr(s)); }); var ri = /[ap]\.?m?\.?/i, si = qt("Hours", !0); @@ -1643,15 +1643,15 @@ calendar: M, longDateFormat: j, invalidDate: V, - ordinal: X, - dayOfMonthOrdinalParse: K, + ordinal: Z, + dayOfMonthOrdinalParse: X, relativeTime: q, months: se, monthsShort: ne, - week: $e, + week: Pe, weekdays: Oe, - weekdaysMin: Ie, - weekdaysShort: Ne, + weekdaysMin: Ne, + weekdaysShort: Ie, meridiemParse: ri }, li = {}, @@ -1682,17 +1682,17 @@ function gi(t) { var e = null; if (void 0 === li[t] && St && St.exports && pi(t)) try { - e = oi._abbr, Et("./locale/" + t), fi(e); + e = oi._abbr, Et("./locale/" + t), mi(e); } catch (e) { li[t] = null; } return li[t]; } - function fi(t, e) { + function mi(t, e) { var i; - return t && ((i = l(e) ? vi(t) : mi(t, e)) ? oi = i : "undefined" != typeof console && console.warn && console.warn("Locale " + t + " not found. Did you forget to load it?")), oi._abbr; + return t && ((i = l(e) ? vi(t) : fi(t, e)) ? oi = i : "undefined" != typeof console && console.warn && console.warn("Locale " + t + " not found. Did you forget to load it?")), oi._abbr; } - function mi(t, e) { + function fi(t, e) { if (null !== e) { var i, r = ai; @@ -1703,9 +1703,9 @@ }), null; r = i._config; } - return li[t] = new D(C(r, e)), hi[t] && hi[t].forEach(function (t) { - mi(t.name, t.config); - }), fi(t), li[t]; + return li[t] = new C(D(r, e)), hi[t] && hi[t].forEach(function (t) { + fi(t.name, t.config); + }), mi(t), li[t]; } return delete li[t], null; } @@ -1714,8 +1714,8 @@ var i, r, s = ai; - null != li[t] && null != li[t].parentLocale ? li[t].set(C(li[t]._config, e)) : (null != (r = gi(t)) && (s = r._config), e = C(s, e), null == r && (e.abbr = t), (i = new D(e)).parentLocale = li[t], li[t] = i), fi(t); - } else null != li[t] && (null != li[t].parentLocale ? (li[t] = li[t].parentLocale, t === fi() && fi(t)) : null != li[t] && delete li[t]); + null != li[t] && null != li[t].parentLocale ? li[t].set(D(li[t]._config, e)) : (null != (r = gi(t)) && (s = r._config), e = D(s, e), null == r && (e.abbr = t), (i = new C(e)).parentLocale = li[t], li[t] = i), mi(t); + } else null != li[t] && (null != li[t].parentLocale ? (li[t] = li[t].parentLocale, t === mi() && mi(t)) : null != li[t] && delete li[t]); return li[t]; } function vi(t) { @@ -1728,19 +1728,19 @@ return ui(t); } function _i() { - return P(li); + return $(li); } function bi(t) { var e, i = t._a; - return i && -2 === f(t).overflow && (e = i[Lt] < 0 || i[Lt] > 11 ? Lt : i[Rt] < 1 || i[Rt] > re(i[Bt], i[Lt]) ? Rt : i[Ut] < 0 || i[Ut] > 24 || 24 === i[Ut] && (0 !== i[Yt] || 0 !== i[zt] || 0 !== i[jt]) ? Ut : i[Yt] < 0 || i[Yt] > 59 ? Yt : i[zt] < 0 || i[zt] > 59 ? zt : i[jt] < 0 || i[jt] > 999 ? jt : -1, f(t)._overflowDayOfYear && (e < Bt || e > Rt) && (e = Rt), f(t)._overflowWeeks && -1 === e && (e = Gt), f(t)._overflowWeekday && -1 === e && (e = Vt), f(t).overflow = e), t; + return i && -2 === m(t).overflow && (e = i[Lt] < 0 || i[Lt] > 11 ? Lt : i[Ut] < 1 || i[Ut] > re(i[Bt], i[Lt]) ? Ut : i[Rt] < 0 || i[Rt] > 24 || 24 === i[Rt] && (0 !== i[Yt] || 0 !== i[zt] || 0 !== i[jt]) ? Rt : i[Yt] < 0 || i[Yt] > 59 ? Yt : i[zt] < 0 || i[zt] > 59 ? zt : i[jt] < 0 || i[jt] > 999 ? jt : -1, m(t)._overflowDayOfYear && (e < Bt || e > Ut) && (e = Ut), m(t)._overflowWeeks && -1 === e && (e = Gt), m(t)._overflowWeekday && -1 === e && (e = Vt), m(t).overflow = e), t; } var wi = /^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/, xi = /^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/, Ei = /Z|[+-]\d\d(?::?\d\d)?/, Si = [["YYYYYY-MM-DD", /[+-]\d{6}-\d\d-\d\d/], ["YYYY-MM-DD", /\d{4}-\d\d-\d\d/], ["GGGG-[W]WW-E", /\d{4}-W\d\d-\d/], ["GGGG-[W]WW", /\d{4}-W\d\d/, !1], ["YYYY-DDD", /\d{4}-\d{3}/], ["YYYY-MM", /\d{4}-\d\d/, !1], ["YYYYYYMMDD", /[+-]\d{10}/], ["YYYYMMDD", /\d{8}/], ["GGGG[W]WWE", /\d{4}W\d{3}/], ["GGGG[W]WW", /\d{4}W\d{2}/, !1], ["YYYYDDD", /\d{7}/], ["YYYYMM", /\d{6}/, !1], ["YYYY", /\d{4}/, !1]], - Pi = [["HH:mm:ss.SSSS", /\d\d:\d\d:\d\d\.\d+/], ["HH:mm:ss,SSSS", /\d\d:\d\d:\d\d,\d+/], ["HH:mm:ss", /\d\d:\d\d:\d\d/], ["HH:mm", /\d\d:\d\d/], ["HHmmss.SSSS", /\d\d\d\d\d\d\.\d+/], ["HHmmss,SSSS", /\d\d\d\d\d\d,\d+/], ["HHmmss", /\d\d\d\d\d\d/], ["HHmm", /\d\d\d\d/], ["HH", /\d\d/]], - $i = /^\/?Date\((-?\d+)/i, + $i = [["HH:mm:ss.SSSS", /\d\d:\d\d:\d\d\.\d+/], ["HH:mm:ss,SSSS", /\d\d:\d\d:\d\d,\d+/], ["HH:mm:ss", /\d\d:\d\d:\d\d/], ["HH:mm", /\d\d:\d\d/], ["HHmmss.SSSS", /\d\d\d\d\d\d\.\d+/], ["HHmmss,SSSS", /\d\d\d\d\d\d,\d+/], ["HHmmss", /\d\d\d\d\d\d/], ["HHmm", /\d\d\d\d/], ["HH", /\d\d/]], + Pi = /^\/?Date\((-?\d+)/i, Ai = /^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/, ki = { UT: 0, @@ -1764,16 +1764,16 @@ a = t._i, l = wi.exec(a) || xi.exec(a), h = Si.length, - c = Pi.length; + c = $i.length; if (l) { - for (f(t).iso = !0, e = 0, i = h; e < i; e++) if (Si[e][1].exec(l[1])) { + for (m(t).iso = !0, e = 0, i = h; e < i; e++) if (Si[e][1].exec(l[1])) { s = Si[e][0], r = !1 !== Si[e][2]; break; } if (null == s) return void (t._isValid = !1); if (l[3]) { - for (e = 0, i = c; e < i; e++) if (Pi[e][1].exec(l[3])) { - n = (l[2] || " ") + Pi[e][0]; + for (e = 0, i = c; e < i; e++) if ($i[e][1].exec(l[3])) { + n = (l[2] || " ") + $i[e][0]; break; } if (null == n) return void (t._isValid = !1); @@ -1783,14 +1783,14 @@ if (!Ei.exec(l[4])) return void (t._isValid = !1); o = "Z"; } - t._f = s + (n || "") + (o || ""), Ui(t); + t._f = s + (n || "") + (o || ""), Ri(t); } else t._isValid = !1; } - function Ci(t, e, i, r, s, n) { - var o = [Di(t), ne.indexOf(e), parseInt(i, 10), parseInt(r, 10), parseInt(s, 10)]; + function Di(t, e, i, r, s, n) { + var o = [Ci(t), ne.indexOf(e), parseInt(i, 10), parseInt(r, 10), parseInt(s, 10)]; return n && o.push(parseInt(n, 10)), o; } - function Di(t) { + function Ci(t) { var e = parseInt(t, 10); return e <= 49 ? 2e3 + e : e <= 999 ? 1900 + e : e; } @@ -1798,7 +1798,7 @@ return t.replace(/\([^()]*\)|[\n\t]/g, " ").replace(/(\s\s+)/g, " ").replace(/^\s\s*/, "").replace(/\s\s*$/, ""); } function Hi(t, e, i) { - return !t || Ne.indexOf(t) === new Date(e[0], e[1], e[2]).getDay() || (f(i).weekdayMismatch = !0, i._isValid = !1, !1); + return !t || Ie.indexOf(t) === new Date(e[0], e[1], e[2]).getDay() || (m(i).weekdayMismatch = !0, i._isValid = !1, !1); } function Oi(t, e, i) { if (t) return ki[t]; @@ -1807,17 +1807,17 @@ s = r % 100; return (r - s) / 100 * 60 + s; } - function Ni(t) { + function Ii(t) { var e, i = Ai.exec(Mi(t._i)); if (i) { - if (e = Ci(i[4], i[3], i[2], i[5], i[6], i[7]), !Hi(i[1], e, t)) return; - t._a = e, t._tzm = Oi(i[8], i[9], i[10]), t._d = be.apply(null, t._a), t._d.setUTCMinutes(t._d.getUTCMinutes() - t._tzm), f(t).rfc2822 = !0; + if (e = Di(i[4], i[3], i[2], i[5], i[6], i[7]), !Hi(i[1], e, t)) return; + t._a = e, t._tzm = Oi(i[8], i[9], i[10]), t._d = be.apply(null, t._a), t._d.setUTCMinutes(t._d.getUTCMinutes() - t._tzm), m(t).rfc2822 = !0; } else t._isValid = !1; } - function Ii(t) { - var e = $i.exec(t._i); - null === e ? (Ti(t), !1 === t._isValid && (delete t._isValid, Ni(t), !1 === t._isValid && (delete t._isValid, t._strict ? t._isValid = !1 : i.createFromInputFallback(t)))) : t._d = new Date(+e[1]); + function Ni(t) { + var e = Pi.exec(t._i); + null === e ? (Ti(t), !1 === t._isValid && (delete t._isValid, Ii(t), !1 === t._isValid && (delete t._isValid, t._strict ? t._isValid = !1 : i.createFromInputFallback(t)))) : t._d = new Date(+e[1]); } function Fi(t, e, i) { return null != t ? t : null != e ? e : i; @@ -1834,19 +1834,19 @@ n, o = []; if (!t._d) { - for (r = Bi(t), t._w && null == t._a[Rt] && null == t._a[Lt] && Ri(t), null != t._dayOfYear && (n = Fi(t._a[Bt], r[Bt]), (t._dayOfYear > Wt(n) || 0 === t._dayOfYear) && (f(t)._overflowDayOfYear = !0), i = be(n, 0, t._dayOfYear), t._a[Lt] = i.getUTCMonth(), t._a[Rt] = i.getUTCDate()), e = 0; e < 3 && null == t._a[e]; ++e) t._a[e] = o[e] = r[e]; + for (r = Bi(t), t._w && null == t._a[Ut] && null == t._a[Lt] && Ui(t), null != t._dayOfYear && (n = Fi(t._a[Bt], r[Bt]), (t._dayOfYear > Wt(n) || 0 === t._dayOfYear) && (m(t)._overflowDayOfYear = !0), i = be(n, 0, t._dayOfYear), t._a[Lt] = i.getUTCMonth(), t._a[Ut] = i.getUTCDate()), e = 0; e < 3 && null == t._a[e]; ++e) t._a[e] = o[e] = r[e]; for (; e < 7; e++) t._a[e] = o[e] = null == t._a[e] ? 2 === e ? 1 : 0 : t._a[e]; - 24 === t._a[Ut] && 0 === t._a[Yt] && 0 === t._a[zt] && 0 === t._a[jt] && (t._nextDay = !0, t._a[Ut] = 0), t._d = (t._useUTC ? be : _e).apply(null, o), s = t._useUTC ? t._d.getUTCDay() : t._d.getDay(), null != t._tzm && t._d.setUTCMinutes(t._d.getUTCMinutes() - t._tzm), t._nextDay && (t._a[Ut] = 24), t._w && void 0 !== t._w.d && t._w.d !== s && (f(t).weekdayMismatch = !0); + 24 === t._a[Rt] && 0 === t._a[Yt] && 0 === t._a[zt] && 0 === t._a[jt] && (t._nextDay = !0, t._a[Rt] = 0), t._d = (t._useUTC ? be : _e).apply(null, o), s = t._useUTC ? t._d.getUTCDay() : t._d.getDay(), null != t._tzm && t._d.setUTCMinutes(t._d.getUTCMinutes() - t._tzm), t._nextDay && (t._a[Rt] = 24), t._w && void 0 !== t._w.d && t._w.d !== s && (m(t).weekdayMismatch = !0); } } - function Ri(t) { + function Ui(t) { var e, i, r, s, n, o, a, l, h; - null != (e = t._w).GG || null != e.W || null != e.E ? (n = 1, o = 4, i = Fi(e.GG, t._a[Bt], Ee(Ki(), 1, 4).year), r = Fi(e.W, 1), ((s = Fi(e.E, 1)) < 1 || s > 7) && (l = !0)) : (n = t._locale._week.dow, o = t._locale._week.doy, h = Ee(Ki(), n, o), i = Fi(e.gg, t._a[Bt], h.year), r = Fi(e.w, h.week), null != e.d ? ((s = e.d) < 0 || s > 6) && (l = !0) : null != e.e ? (s = e.e + n, (e.e < 0 || e.e > 6) && (l = !0)) : s = n), r < 1 || r > Se(i, n, o) ? f(t)._overflowWeeks = !0 : null != l ? f(t)._overflowWeekday = !0 : (a = xe(i, r, s, n, o), t._a[Bt] = a.year, t._dayOfYear = a.dayOfYear); + null != (e = t._w).GG || null != e.W || null != e.E ? (n = 1, o = 4, i = Fi(e.GG, t._a[Bt], Ee(Xi(), 1, 4).year), r = Fi(e.W, 1), ((s = Fi(e.E, 1)) < 1 || s > 7) && (l = !0)) : (n = t._locale._week.dow, o = t._locale._week.doy, h = Ee(Xi(), n, o), i = Fi(e.gg, t._a[Bt], h.year), r = Fi(e.w, h.week), null != e.d ? ((s = e.d) < 0 || s > 6) && (l = !0) : null != e.e ? (s = e.e + n, (e.e < 0 || e.e > 6) && (l = !0)) : s = n), r < 1 || r > Se(i, n, o) ? m(t)._overflowWeeks = !0 : null != l ? m(t)._overflowWeekday = !0 : (a = xe(i, r, s, n, o), t._a[Bt] = a.year, t._dayOfYear = a.dayOfYear); } - function Ui(t) { + function Ri(t) { if (t._f !== i.ISO_8601) { if (t._f !== i.RFC_2822) { - t._a = [], f(t).empty = !0; + t._a = [], m(t).empty = !0; var e, r, s, @@ -1857,9 +1857,9 @@ h = "" + t._i, c = h.length, d = 0; - for (l = (s = z(t._f, t._locale).match(N) || []).length, e = 0; e < l; e++) n = s[e], (r = (h.match(kt(n, t)) || [])[0]) && ((o = h.substr(0, h.indexOf(r))).length > 0 && f(t).unusedInput.push(o), h = h.slice(h.indexOf(r) + r.length), d += r.length), B[n] ? (r ? f(t).empty = !1 : f(t).unusedTokens.push(n), It(n, r, t)) : t._strict && !r && f(t).unusedTokens.push(n); - f(t).charsLeftOver = c - d, h.length > 0 && f(t).unusedInput.push(h), t._a[Ut] <= 12 && !0 === f(t).bigHour && t._a[Ut] > 0 && (f(t).bigHour = void 0), f(t).parsedDateParts = t._a.slice(0), f(t).meridiem = t._meridiem, t._a[Ut] = Yi(t._locale, t._a[Ut], t._meridiem), null !== (a = f(t).era) && (t._a[Bt] = t._locale.erasConvertYear(a, t._a[Bt])), Li(t), bi(t); - } else Ni(t); + for (l = (s = z(t._f, t._locale).match(I) || []).length, e = 0; e < l; e++) n = s[e], (r = (h.match(kt(n, t)) || [])[0]) && ((o = h.substr(0, h.indexOf(r))).length > 0 && m(t).unusedInput.push(o), h = h.slice(h.indexOf(r) + r.length), d += r.length), B[n] ? (r ? m(t).empty = !1 : m(t).unusedTokens.push(n), Nt(n, r, t)) : t._strict && !r && m(t).unusedTokens.push(n); + m(t).charsLeftOver = c - d, h.length > 0 && m(t).unusedInput.push(h), t._a[Rt] <= 12 && !0 === m(t).bigHour && t._a[Rt] > 0 && (m(t).bigHour = void 0), m(t).parsedDateParts = t._a.slice(0), m(t).meridiem = t._meridiem, t._a[Rt] = Yi(t._locale, t._a[Rt], t._meridiem), null !== (a = m(t).era) && (t._a[Bt] = t._locale.erasConvertYear(a, t._a[Bt])), Li(t), bi(t); + } else Ii(t); } else Ti(t); } function Yi(t, e, i) { @@ -1875,8 +1875,8 @@ o, a = !1, l = t._f.length; - if (0 === l) return f(t).invalidFormat = !0, void (t._d = new Date(NaN)); - for (s = 0; s < l; s++) n = 0, o = !1, e = b({}, t), null != t._useUTC && (e._useUTC = t._useUTC), e._f = t._f[s], Ui(e), m(e) && (o = !0), n += f(e).charsLeftOver, n += 10 * f(e).unusedTokens.length, f(e).score = n, a ? n < r && (r = n, i = e) : (null == r || n < r || o) && (r = n, i = e, o && (a = !0)); + if (0 === l) return m(t).invalidFormat = !0, void (t._d = new Date(NaN)); + for (s = 0; s < l; s++) n = 0, o = !1, e = b({}, t), null != t._useUTC && (e._useUTC = t._useUTC), e._f = t._f[s], Ri(e), f(e) && (o = !0), n += m(e).charsLeftOver, n += 10 * m(e).unusedTokens.length, m(e).score = n, a ? n < r && (r = n, i = e) : (null == r || n < r || o) && (r = n, i = e, o && (a = !0)); u(t, i || e); } function ji(t) { @@ -1897,35 +1897,35 @@ i = t._f; return t._locale = t._locale || vi(t._l), null === e || void 0 === i && "" === e ? y({ nullInput: !0 - }) : ("string" == typeof e && (t._i = e = t._locale.preparse(e)), x(e) ? new w(bi(e)) : (c(e) ? t._d = e : s(i) ? zi(t) : i ? Ui(t) : Wi(t), m(t) || (t._d = null), t)); + }) : ("string" == typeof e && (t._i = e = t._locale.preparse(e)), x(e) ? new w(bi(e)) : (c(e) ? t._d = e : s(i) ? zi(t) : i ? Ri(t) : Wi(t), f(t) || (t._d = null), t)); } function Wi(t) { var e = t._i; - l(e) ? t._d = new Date(i.now()) : c(e) ? t._d = new Date(e.valueOf()) : "string" == typeof e ? Ii(t) : s(e) ? (t._a = d(e.slice(0), function (t) { + l(e) ? t._d = new Date(i.now()) : c(e) ? t._d = new Date(e.valueOf()) : "string" == typeof e ? Ni(t) : s(e) ? (t._a = d(e.slice(0), function (t) { return parseInt(t, 10); }), Li(t)) : n(e) ? ji(t) : h(e) ? t._d = new Date(e) : i.createFromInputFallback(t); } - function Xi(t, e, i, r, o) { + function Zi(t, e, i, r, o) { var l = {}; return !0 !== e && !1 !== e || (r = e, e = void 0), !0 !== i && !1 !== i || (r = i, i = void 0), (n(t) && a(t) || s(t) && 0 === t.length) && (t = void 0), l._isAMomentObject = !0, l._useUTC = l._isUTC = o, l._l = i, l._i = t, l._f = e, l._strict = r, Gi(l); } - function Ki(t, e, i, r) { - return Xi(t, e, i, r, !1); + function Xi(t, e, i, r) { + return Zi(t, e, i, r, !1); } i.createFromInputFallback = S("value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.", function (t) { t._d = new Date(t._i + (t._useUTC ? " UTC" : "")); }), i.ISO_8601 = function () {}, i.RFC_2822 = function () {}; - var Zi = S("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/", function () { - var t = Ki.apply(null, arguments); + var Ki = S("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/", function () { + var t = Xi.apply(null, arguments); return this.isValid() && t.isValid() ? t < this ? this : t : y(); }), qi = S("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/", function () { - var t = Ki.apply(null, arguments); + var t = Xi.apply(null, arguments); return this.isValid() && t.isValid() ? t > this ? this : t : y(); }); function Ji(t, e) { var i, r; - if (1 === e.length && s(e[0]) && (e = e[0]), !e.length) return Ki(); + if (1 === e.length && s(e[0]) && (e = e[0]), !e.length) return Xi(); for (i = e[0], r = 1; r < e.length; ++r) e[r].isValid() && !e[r][t](i) || (i = e[r]); return i; } @@ -1944,7 +1944,7 @@ i, r = !1, s = ir.length; - for (e in t) if (o(t, e) && (-1 === Xt.call(ir, e) || null != t[e] && isNaN(t[e]))) return !1; + for (e in t) if (o(t, e) && (-1 === Zt.call(ir, e) || null != t[e] && isNaN(t[e]))) return !1; for (i = 0; i < s; ++i) if (t[ir[i]]) { if (r) return !1; parseFloat(t[ir[i]]) !== Mt(t[ir[i]]) && (r = !0); @@ -2003,12 +2003,12 @@ } function pr(t, e) { var r, s; - return e._isUTC ? (r = e.clone(), s = (x(t) || c(t) ? t.valueOf() : Ki(t).valueOf()) - r.valueOf(), r._d.setTime(r._d.valueOf() + s), i.updateOffset(r, !1), r) : Ki(t).local(); + return e._isUTC ? (r = e.clone(), s = (x(t) || c(t) ? t.valueOf() : Xi(t).valueOf()) - r.valueOf(), r._d.setTime(r._d.valueOf() + s), i.updateOffset(r, !1), r) : Xi(t).local(); } function gr(t) { return -Math.round(t._d.getTimezoneOffset()); } - function fr(t, e, r) { + function mr(t, e, r) { var s, n = this._offset || 0; if (!this.isValid()) return null != t ? this : NaN; @@ -2020,7 +2020,7 @@ } return this._isUTC ? n : gr(this); } - function mr(t, e) { + function fr(t, e) { return null != t ? ("string" != typeof t && (t = -t), this.utcOffset(t, e), this) : -this.utcOffset(); } function yr(t) { @@ -2037,7 +2037,7 @@ return this; } function br(t) { - return !!this.isValid() && (t = t ? Ki(t).utcOffset() : 0, (this.utcOffset() - t) % 60 == 0); + return !!this.isValid() && (t = t ? Xi(t).utcOffset() : 0, (this.utcOffset() - t) % 60 == 0); } function wr() { return this.utcOffset() > this.clone().month(0).utcOffset() || this.utcOffset() > this.clone().month(5).utcOffset(); @@ -2046,7 +2046,7 @@ if (!l(this._isDSTShifted)) return this._isDSTShifted; var t, e = {}; - return b(e, this), (e = Vi(e))._a ? (t = e._isUTC ? p(e._a) : Ki(e._a), this._isDSTShifted = this.isValid() && hr(e._a, t.toArray()) > 0) : this._isDSTShifted = !1, this._isDSTShifted; + return b(e, this), (e = Vi(e))._a ? (t = e._isUTC ? p(e._a) : Xi(e._a), this._isDSTShifted = this.isValid() && hr(e._a, t.toArray()) > 0) : this._isDSTShifted = !1, this._isDSTShifted; } function Er() { return !!this.isValid() && !this._isUTC; @@ -2054,11 +2054,11 @@ function Sr() { return !!this.isValid() && this._isUTC; } - function Pr() { + function $r() { return !!this.isValid() && this._isUTC && 0 === this._offset; } i.updateOffset = function () {}; - var $r = /^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/, + var Pr = /^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/, Ar = /^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/; function kr(t, e) { var i, @@ -2070,10 +2070,10 @@ ms: t._milliseconds, d: t._days, M: t._months - } : h(t) || !isNaN(+t) ? (n = {}, e ? n[e] = +t : n.milliseconds = +t) : (a = $r.exec(t)) ? (i = "-" === a[1] ? -1 : 1, n = { + } : h(t) || !isNaN(+t) ? (n = {}, e ? n[e] = +t : n.milliseconds = +t) : (a = Pr.exec(t)) ? (i = "-" === a[1] ? -1 : 1, n = { y: 0, - d: Mt(a[Rt]) * i, - h: Mt(a[Ut]) * i, + d: Mt(a[Ut]) * i, + h: Mt(a[Rt]) * i, m: Mt(a[Yt]) * i, s: Mt(a[zt]) * i, ms: Mt(lr(1e3 * a[jt])) * i @@ -2085,19 +2085,19 @@ h: Tr(a[6], i), m: Tr(a[7], i), s: Tr(a[8], i) - }) : null == n ? n = {} : "object" == typeof n && ("from" in n || "to" in n) && (s = Dr(Ki(n.from), Ki(n.to)), (n = {}).ms = s.milliseconds, n.M = s.months), r = new or(n), ar(t) && o(t, "_locale") && (r._locale = t._locale), ar(t) && o(t, "_isValid") && (r._isValid = t._isValid), r; + }) : null == n ? n = {} : "object" == typeof n && ("from" in n || "to" in n) && (s = Cr(Xi(n.from), Xi(n.to)), (n = {}).ms = s.milliseconds, n.M = s.months), r = new or(n), ar(t) && o(t, "_locale") && (r._locale = t._locale), ar(t) && o(t, "_isValid") && (r._isValid = t._isValid), r; } function Tr(t, e) { var i = t && parseFloat(t.replace(",", ".")); return (isNaN(i) ? 0 : i) * e; } - function Cr(t, e) { + function Dr(t, e) { var i = {}; return i.months = e.month() - t.month() + 12 * (e.year() - t.year()), t.clone().add(i.months, "M").isAfter(e) && --i.months, i.milliseconds = +e - +t.clone().add(i.months, "M"), i; } - function Dr(t, e) { + function Cr(t, e) { var i; - return t.isValid() && e.isValid() ? (e = pr(e, t), t.isBefore(e) ? i = Cr(t, e) : ((i = Cr(e, t)).milliseconds = -i.milliseconds, i.months = -i.months), i) : { + return t.isValid() && e.isValid() ? (e = pr(e, t), t.isBefore(e) ? i = Dr(t, e) : ((i = Dr(e, t)).milliseconds = -i.milliseconds, i.months = -i.months), i) : { milliseconds: 0, months: 0 }; @@ -2116,12 +2116,12 @@ } kr.fn = or.prototype, kr.invalid = nr; var Or = Mr(1, "add"), - Nr = Mr(-1, "subtract"); - function Ir(t) { + Ir = Mr(-1, "subtract"); + function Nr(t) { return "string" == typeof t || t instanceof String; } function Fr(t) { - return x(t) || c(t) || Ir(t) || h(t) || Lr(t) || Br(t) || null == t; + return x(t) || c(t) || Nr(t) || h(t) || Lr(t) || Br(t) || null == t; } function Br(t) { var e, @@ -2137,10 +2137,10 @@ var e = s(t), i = !1; return e && (i = 0 === t.filter(function (e) { - return !h(e) && Ir(t); + return !h(e) && Nr(t); }).length), e && i; } - function Rr(t) { + function Ur(t) { var e, i, r = n(t) && !a(t), @@ -2149,46 +2149,46 @@ for (e = 0; e < l.length; e += 1) i = l[e], s = s || o(t, i); return r && s; } - function Ur(t, e) { + function Rr(t, e) { var i = t.diff(e, "days", !0); return i < -6 ? "sameElse" : i < -1 ? "lastWeek" : i < 0 ? "lastDay" : i < 1 ? "sameDay" : i < 2 ? "nextDay" : i < 7 ? "nextWeek" : "sameElse"; } function Yr(t, e) { - 1 === arguments.length && (arguments[0] ? Fr(arguments[0]) ? (t = arguments[0], e = void 0) : Rr(arguments[0]) && (e = arguments[0], t = void 0) : (t = void 0, e = void 0)); - var r = t || Ki(), + 1 === arguments.length && (arguments[0] ? Fr(arguments[0]) ? (t = arguments[0], e = void 0) : Ur(arguments[0]) && (e = arguments[0], t = void 0) : (t = void 0, e = void 0)); + var r = t || Xi(), s = pr(r, this).startOf("day"), n = i.calendarFormat(this, s) || "sameElse", o = e && (k(e[n]) ? e[n].call(this, r) : e[n]); - return this.format(o || this.localeData().calendar(n, this, Ki(r))); + return this.format(o || this.localeData().calendar(n, this, Xi(r))); } function zr() { return new w(this); } function jr(t, e) { - var i = x(t) ? t : Ki(t); + var i = x(t) ? t : Xi(t); return !(!this.isValid() || !i.isValid()) && ("millisecond" === (e = et(e) || "millisecond") ? this.valueOf() > i.valueOf() : i.valueOf() < this.clone().startOf(e).valueOf()); } function Gr(t, e) { - var i = x(t) ? t : Ki(t); + var i = x(t) ? t : Xi(t); return !(!this.isValid() || !i.isValid()) && ("millisecond" === (e = et(e) || "millisecond") ? this.valueOf() < i.valueOf() : this.clone().endOf(e).valueOf() < i.valueOf()); } function Vr(t, e, i, r) { - var s = x(t) ? t : Ki(t), - n = x(e) ? e : Ki(e); + var s = x(t) ? t : Xi(t), + n = x(e) ? e : Xi(e); return !!(this.isValid() && s.isValid() && n.isValid()) && ("(" === (r = r || "()")[0] ? this.isAfter(s, i) : !this.isBefore(s, i)) && (")" === r[1] ? this.isBefore(n, i) : !this.isAfter(n, i)); } function Wr(t, e) { var i, - r = x(t) ? t : Ki(t); + r = x(t) ? t : Xi(t); return !(!this.isValid() || !r.isValid()) && ("millisecond" === (e = et(e) || "millisecond") ? this.valueOf() === r.valueOf() : (i = r.valueOf(), this.clone().startOf(e).valueOf() <= i && i <= this.clone().endOf(e).valueOf())); } - function Xr(t, e) { + function Zr(t, e) { return this.isSame(t, e) || this.isAfter(t, e); } - function Kr(t, e) { + function Xr(t, e) { return this.isSame(t, e) || this.isBefore(t, e); } - function Zr(t, e, i) { + function Kr(t, e, i) { var r, s, n; if (!this.isValid()) return NaN; if (!(r = pr(t, this)).isValid()) return NaN; @@ -2220,7 +2220,7 @@ default: n = this - r; } - return i ? n : Dt(n); + return i ? n : Ct(n); } function qr(t, e) { if (t.date() < e.date()) return -qr(e, t); @@ -2253,22 +2253,22 @@ return this.localeData().postformat(e); } function is(t, e) { - return this.isValid() && (x(t) && t.isValid() || Ki(t).isValid()) ? kr({ + return this.isValid() && (x(t) && t.isValid() || Xi(t).isValid()) ? kr({ to: this, from: t }).locale(this.locale()).humanize(!e) : this.localeData().invalidDate(); } function rs(t) { - return this.from(Ki(), t); + return this.from(Xi(), t); } function ss(t, e) { - return this.isValid() && (x(t) && t.isValid() || Ki(t).isValid()) ? kr({ + return this.isValid() && (x(t) && t.isValid() || Xi(t).isValid()) ? kr({ from: this, to: t }).locale(this.locale()).humanize(!e) : this.localeData().invalidDate(); } function ns(t) { - return this.to(Ki(), t); + return this.to(Xi(), t); } function os(t) { var e; @@ -2291,13 +2291,13 @@ function gs(t, e, i) { return t < 100 && t >= 0 ? new Date(t + 400, e, i) - us : new Date(t, e, i).valueOf(); } - function fs(t, e, i) { + function ms(t, e, i) { return t < 100 && t >= 0 ? Date.UTC(t + 400, e, i) - us : Date.UTC(t, e, i); } - function ms(t) { + function fs(t) { var e, r; if (void 0 === (t = et(t)) || "millisecond" === t || !this.isValid()) return this; - switch (r = this._isUTC ? fs : gs, t) { + switch (r = this._isUTC ? ms : gs, t) { case "year": e = r(this.year(), 0, 1); break; @@ -2331,7 +2331,7 @@ function ys(t) { var e, r; if (void 0 === (t = et(t)) || "millisecond" === t || !this.isValid()) return this; - switch (r = this._isUTC ? fs : gs, t) { + switch (r = this._isUTC ? ms : gs, t) { case "year": e = r(this.year() + 1, 0, 1) - 1; break; @@ -2391,13 +2391,13 @@ return this.isValid() ? this.toISOString() : null; } function Ss() { - return m(this); - } - function Ps() { - return u({}, f(this)); + return f(this); } function $s() { - return f(this).overflow; + return u({}, m(this)); + } + function Ps() { + return m(this).overflow; } function As() { return { @@ -2442,11 +2442,11 @@ if (a === t) return l[r]; } else if ([n, o, a].indexOf(t) >= 0) return l[r]; } - function Cs(t, e) { + function Ds(t, e) { var r = t.since <= t.until ? 1 : -1; return void 0 === e ? i(t.since).year() : i(t.since).year() + (e - t.offset) * r; } - function Ds() { + function Cs() { var t, e, i, @@ -2488,10 +2488,10 @@ for (t = 0, e = n.length; t < e; ++t) if (r = n[t].since <= n[t].until ? 1 : -1, s = this.clone().startOf("day").valueOf(), n[t].since <= s && s <= n[t].until || n[t].until <= s && s <= n[t].since) return (this.year() - i(n[t].since).year()) * r + n[t].offset; return this.year(); } - function Ns(t) { + function Is(t) { return o(this, "_erasNameRegex") || Ys.call(this), t ? this._erasNameRegex : this._erasRegex; } - function Is(t) { + function Ns(t) { return o(this, "_erasAbbrRegex") || Ys.call(this), t ? this._erasAbbrRegex : this._erasRegex; } function Fs(t) { @@ -2503,10 +2503,10 @@ function Ls(t, e) { return e.erasNameRegex(t); } - function Rs(t, e) { + function Us(t, e) { return e.erasNarrowRegex(t); } - function Us(t, e) { + function Rs(t, e) { return e._eraYearOrdinalRegex || yt; } function Ys() { @@ -2520,17 +2520,17 @@ a = [], l = [], h = this.eras(); - for (t = 0, e = h.length; t < e; ++t) i = Ct(h[t].name), r = Ct(h[t].abbr), s = Ct(h[t].narrow), o.push(i), n.push(r), a.push(s), l.push(i), l.push(r), l.push(s); + for (t = 0, e = h.length; t < e; ++t) i = Dt(h[t].name), r = Dt(h[t].abbr), s = Dt(h[t].narrow), o.push(i), n.push(r), a.push(s), l.push(i), l.push(r), l.push(s); this._erasRegex = new RegExp("^(" + l.join("|") + ")", "i"), this._erasNameRegex = new RegExp("^(" + o.join("|") + ")", "i"), this._erasAbbrRegex = new RegExp("^(" + n.join("|") + ")", "i"), this._erasNarrowRegex = new RegExp("^(" + a.join("|") + ")", "i"); } function zs(t, e) { L(0, [t, t.length], 0, e); } function js(t) { - return Zs.call(this, t, this.week(), this.weekday() + this.localeData()._week.dow, this.localeData()._week.dow, this.localeData()._week.doy); + return Ks.call(this, t, this.week(), this.weekday() + this.localeData()._week.dow, this.localeData()._week.dow, this.localeData()._week.doy); } function Gs(t) { - return Zs.call(this, t, this.isoWeek(), this.isoWeekday(), 1, 4); + return Ks.call(this, t, this.isoWeek(), this.isoWeekday(), 1, 4); } function Vs() { return Se(this.year(), 1, 4); @@ -2538,15 +2538,15 @@ function Ws() { return Se(this.isoWeekYear(), 1, 4); } - function Xs() { + function Zs() { var t = this.localeData()._week; return Se(this.year(), t.dow, t.doy); } - function Ks() { + function Xs() { var t = this.localeData()._week; return Se(this.weekYear(), t.dow, t.doy); } - function Zs(t, e, i, r, s) { + function Ks(t, e, i, r, s) { var n; return null == t ? Ee(this, r, s).year : (e > (n = Se(t, r, s)) && (e = n), qs.call(this, t, e, i, r, s)); } @@ -2558,26 +2558,26 @@ function Js(t) { return null == t ? Math.ceil((this.month() + 1) / 3) : this.month(3 * (t - 1) + this.month() % 3); } - L("N", 0, 0, "eraAbbr"), L("NN", 0, 0, "eraAbbr"), L("NNN", 0, 0, "eraAbbr"), L("NNNN", 0, 0, "eraName"), L("NNNNN", 0, 0, "eraNarrow"), L("y", ["y", 1], "yo", "eraYear"), L("y", ["yy", 2], 0, "eraYear"), L("y", ["yyy", 3], 0, "eraYear"), L("y", ["yyyy", 4], 0, "eraYear"), At("N", Bs), At("NN", Bs), At("NNN", Bs), At("NNNN", Ls), At("NNNNN", Rs), Ot(["N", "NN", "NNN", "NNNN", "NNNNN"], function (t, e, i, r) { + L("N", 0, 0, "eraAbbr"), L("NN", 0, 0, "eraAbbr"), L("NNN", 0, 0, "eraAbbr"), L("NNNN", 0, 0, "eraName"), L("NNNNN", 0, 0, "eraNarrow"), L("y", ["y", 1], "yo", "eraYear"), L("y", ["yy", 2], 0, "eraYear"), L("y", ["yyy", 3], 0, "eraYear"), L("y", ["yyyy", 4], 0, "eraYear"), At("N", Bs), At("NN", Bs), At("NNN", Bs), At("NNNN", Ls), At("NNNNN", Us), Ot(["N", "NN", "NNN", "NNNN", "NNNNN"], function (t, e, i, r) { var s = i._locale.erasParse(t, r, i._strict); - s ? f(i).era = s : f(i).invalidEra = t; - }), At("y", yt), At("yy", yt), At("yyy", yt), At("yyyy", yt), At("yo", Us), Ot(["y", "yy", "yyy", "yyyy"], Bt), Ot(["yo"], function (t, e, i, r) { + s ? m(i).era = s : m(i).invalidEra = t; + }), At("y", yt), At("yy", yt), At("yyy", yt), At("yyyy", yt), At("yo", Rs), Ot(["y", "yy", "yyy", "yyyy"], Bt), Ot(["yo"], function (t, e, i, r) { var s; i._locale._eraYearOrdinalRegex && (s = t.match(i._locale._eraYearOrdinalRegex)), i._locale.eraYearOrdinalParse ? e[Bt] = i._locale.eraYearOrdinalParse(t, s) : e[Bt] = parseInt(t, 10); }), L(0, ["gg", 2], 0, function () { return this.weekYear() % 100; }), L(0, ["GG", 2], 0, function () { return this.isoWeekYear() % 100; - }), zs("gggg", "weekYear"), zs("ggggg", "weekYear"), zs("GGGG", "isoWeekYear"), zs("GGGGG", "isoWeekYear"), At("G", vt), At("g", vt), At("GG", dt, at), At("gg", dt, at), At("GGGG", ft, ht), At("gggg", ft, ht), At("GGGGG", mt, ct), At("ggggg", mt, ct), Nt(["gggg", "ggggg", "GGGG", "GGGGG"], function (t, e, i, r) { + }), zs("gggg", "weekYear"), zs("ggggg", "weekYear"), zs("GGGG", "isoWeekYear"), zs("GGGGG", "isoWeekYear"), At("G", vt), At("g", vt), At("GG", dt, at), At("gg", dt, at), At("GGGG", mt, ht), At("gggg", mt, ht), At("GGGGG", ft, ct), At("ggggg", ft, ct), It(["gggg", "ggggg", "GGGG", "GGGGG"], function (t, e, i, r) { e[r.substr(0, 2)] = Mt(t); - }), Nt(["gg", "GG"], function (t, e, r, s) { + }), It(["gg", "GG"], function (t, e, r, s) { e[s] = i.parseTwoDigitYear(t); }), L("Q", 0, "Qo", "quarter"), At("Q", ot), Ot("Q", function (t, e) { e[Lt] = 3 * (Mt(t) - 1); - }), L("D", ["DD", 2], "Do", "date"), At("D", dt, Pt), At("DD", dt, at), At("Do", function (t, e) { + }), L("D", ["DD", 2], "Do", "date"), At("D", dt, $t), At("DD", dt, at), At("Do", function (t, e) { return t ? e._dayOfMonthOrdinalParse || e._ordinalParse : e._dayOfMonthOrdinalParseLenient; - }), Ot(["D", "DD"], Rt), Ot("Do", function (t, e) { - e[Rt] = Mt(t.match(dt)[0]); + }), Ot(["D", "DD"], Ut), Ot("Do", function (t, e) { + e[Ut] = Mt(t.match(dt)[0]); }); var Qs = qt("Date", !0); function tn(t) { @@ -2586,9 +2586,9 @@ } L("DDD", ["DDDD", 3], "DDDo", "dayOfYear"), At("DDD", gt), At("DDDD", lt), Ot(["DDD", "DDDD"], function (t, e, i) { i._dayOfYear = Mt(t); - }), L("m", ["mm", 2], 0, "minute"), At("m", dt, $t), At("mm", dt, at), Ot(["m", "mm"], Yt); + }), L("m", ["mm", 2], 0, "minute"), At("m", dt, Pt), At("mm", dt, at), Ot(["m", "mm"], Yt); var en = qt("Minutes", !1); - L("s", ["ss", 2], 0, "second"), At("s", dt, $t), At("ss", dt, at), Ot(["s", "ss"], zt); + L("s", ["ss", 2], 0, "second"), At("s", dt, Pt), At("ss", dt, at), Ot(["s", "ss"], zt); var rn, sn, nn = qt("Seconds", !1); @@ -2622,31 +2622,31 @@ sn = qt("Milliseconds", !1), L("z", 0, 0, "zoneAbbr"), L("zz", 0, 0, "zoneName"); var hn = w.prototype; function cn(t) { - return Ki(1e3 * t); + return Xi(1e3 * t); } function dn() { - return Ki.apply(null, arguments).parseZone(); + return Xi.apply(null, arguments).parseZone(); } function un(t) { return t; } - hn.add = Or, hn.calendar = Yr, hn.clone = zr, hn.diff = Zr, hn.endOf = ys, hn.format = es, hn.from = is, hn.fromNow = rs, hn.to = ss, hn.toNow = ns, hn.get = te, hn.invalidAt = $s, hn.isAfter = jr, hn.isBefore = Gr, hn.isBetween = Vr, hn.isSame = Wr, hn.isSameOrAfter = Xr, hn.isSameOrBefore = Kr, hn.isValid = Ss, hn.lang = as, hn.locale = os, hn.localeData = ls, hn.max = qi, hn.min = Zi, hn.parsingFlags = Ps, hn.set = ee, hn.startOf = ms, hn.subtract = Nr, hn.toArray = ws, hn.toObject = xs, hn.toDate = bs, hn.toISOString = Qr, hn.inspect = ts, "undefined" != typeof Symbol && null != Symbol.for && (hn[Symbol.for("nodejs.util.inspect.custom")] = function () { + hn.add = Or, hn.calendar = Yr, hn.clone = zr, hn.diff = Kr, hn.endOf = ys, hn.format = es, hn.from = is, hn.fromNow = rs, hn.to = ss, hn.toNow = ns, hn.get = te, hn.invalidAt = Ps, hn.isAfter = jr, hn.isBefore = Gr, hn.isBetween = Vr, hn.isSame = Wr, hn.isSameOrAfter = Zr, hn.isSameOrBefore = Xr, hn.isValid = Ss, hn.lang = as, hn.locale = os, hn.localeData = ls, hn.max = qi, hn.min = Ki, hn.parsingFlags = $s, hn.set = ee, hn.startOf = fs, hn.subtract = Ir, hn.toArray = ws, hn.toObject = xs, hn.toDate = bs, hn.toISOString = Qr, hn.inspect = ts, "undefined" != typeof Symbol && null != Symbol.for && (hn[Symbol.for("nodejs.util.inspect.custom")] = function () { return "Moment<" + this.format() + ">"; - }), hn.toJSON = Es, hn.toString = Jr, hn.unix = _s, hn.valueOf = vs, hn.creationData = As, hn.eraName = Ds, hn.eraNarrow = Ms, hn.eraAbbr = Hs, hn.eraYear = Os, hn.year = Kt, hn.isLeapYear = Zt, hn.weekYear = js, hn.isoWeekYear = Gs, hn.quarter = hn.quarters = Js, hn.month = ge, hn.daysInMonth = fe, hn.week = hn.weeks = Te, hn.isoWeek = hn.isoWeeks = Ce, hn.weeksInYear = Xs, hn.weeksInWeekYear = Ks, hn.isoWeeksInYear = Vs, hn.isoWeeksInISOWeekYear = Ws, hn.date = Qs, hn.day = hn.days = Ge, hn.weekday = Ve, hn.isoWeekday = We, hn.dayOfYear = tn, hn.hour = hn.hours = si, hn.minute = hn.minutes = en, hn.second = hn.seconds = nn, hn.millisecond = hn.milliseconds = sn, hn.utcOffset = fr, hn.utc = yr, hn.local = vr, hn.parseZone = _r, hn.hasAlignedHourOffset = br, hn.isDST = wr, hn.isLocal = Er, hn.isUtcOffset = Sr, hn.isUtc = Pr, hn.isUTC = Pr, hn.zoneAbbr = an, hn.zoneName = ln, hn.dates = S("dates accessor is deprecated. Use date instead.", Qs), hn.months = S("months accessor is deprecated. Use month instead", ge), hn.years = S("years accessor is deprecated. Use year instead", Kt), hn.zone = S("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/", mr), hn.isDSTShifted = S("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information", xr); - var pn = D.prototype; + }), hn.toJSON = Es, hn.toString = Jr, hn.unix = _s, hn.valueOf = vs, hn.creationData = As, hn.eraName = Cs, hn.eraNarrow = Ms, hn.eraAbbr = Hs, hn.eraYear = Os, hn.year = Xt, hn.isLeapYear = Kt, hn.weekYear = js, hn.isoWeekYear = Gs, hn.quarter = hn.quarters = Js, hn.month = ge, hn.daysInMonth = me, hn.week = hn.weeks = Te, hn.isoWeek = hn.isoWeeks = De, hn.weeksInYear = Zs, hn.weeksInWeekYear = Xs, hn.isoWeeksInYear = Vs, hn.isoWeeksInISOWeekYear = Ws, hn.date = Qs, hn.day = hn.days = Ge, hn.weekday = Ve, hn.isoWeekday = We, hn.dayOfYear = tn, hn.hour = hn.hours = si, hn.minute = hn.minutes = en, hn.second = hn.seconds = nn, hn.millisecond = hn.milliseconds = sn, hn.utcOffset = mr, hn.utc = yr, hn.local = vr, hn.parseZone = _r, hn.hasAlignedHourOffset = br, hn.isDST = wr, hn.isLocal = Er, hn.isUtcOffset = Sr, hn.isUtc = $r, hn.isUTC = $r, hn.zoneAbbr = an, hn.zoneName = ln, hn.dates = S("dates accessor is deprecated. Use date instead.", Qs), hn.months = S("months accessor is deprecated. Use month instead", ge), hn.years = S("years accessor is deprecated. Use year instead", Xt), hn.zone = S("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/", fr), hn.isDSTShifted = S("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information", xr); + var pn = C.prototype; function gn(t, e, i, r) { var s = vi(), n = p().set(r, e); return s[i](n, t); } - function fn(t, e, i) { + function mn(t, e, i) { if (h(t) && (e = t, t = void 0), t = t || "", null != e) return gn(t, e, i, "month"); var r, s = []; for (r = 0; r < 12; r++) s[r] = gn(t, r, i, "month"); return s; } - function mn(t, e, i, r) { + function fn(t, e, i, r) { "boolean" == typeof t ? (h(e) && (i = e, e = void 0), e = e || "") : (i = e = t, t = !1, h(e) && (i = e, e = void 0), e = e || ""); var s, n = vi(), @@ -2657,21 +2657,21 @@ return a; } function yn(t, e) { - return fn(t, e, "months"); + return mn(t, e, "months"); } function vn(t, e) { - return fn(t, e, "monthsShort"); + return mn(t, e, "monthsShort"); } function _n(t, e, i) { - return mn(t, e, i, "weekdays"); + return fn(t, e, i, "weekdays"); } function bn(t, e, i) { - return mn(t, e, i, "weekdaysShort"); + return fn(t, e, i, "weekdaysShort"); } function wn(t, e, i) { - return mn(t, e, i, "weekdaysMin"); + return fn(t, e, i, "weekdaysMin"); } - pn.calendar = H, pn.longDateFormat = G, pn.invalidDate = W, pn.ordinal = Z, pn.preparse = un, pn.postformat = un, pn.relativeTime = J, pn.pastFuture = Q, pn.set = T, pn.eras = ks, pn.erasParse = Ts, pn.erasConvertYear = Cs, pn.erasAbbrRegex = Is, pn.erasNameRegex = Ns, pn.erasNarrowRegex = Fs, pn.months = he, pn.monthsShort = ce, pn.monthsParse = ue, pn.monthsRegex = ye, pn.monthsShortRegex = me, pn.week = Pe, pn.firstDayOfYear = ke, pn.firstDayOfWeek = Ae, pn.weekdays = Re, pn.weekdaysMin = Ye, pn.weekdaysShort = Ue, pn.weekdaysParse = je, pn.weekdaysRegex = Xe, pn.weekdaysShortRegex = Ke, pn.weekdaysMinRegex = Ze, pn.isPM = ii, pn.meridiem = ni, fi("en", { + pn.calendar = H, pn.longDateFormat = G, pn.invalidDate = W, pn.ordinal = K, pn.preparse = un, pn.postformat = un, pn.relativeTime = J, pn.pastFuture = Q, pn.set = T, pn.eras = ks, pn.erasParse = Ts, pn.erasConvertYear = Ds, pn.erasAbbrRegex = Ns, pn.erasNameRegex = Is, pn.erasNarrowRegex = Fs, pn.months = he, pn.monthsShort = ce, pn.monthsParse = ue, pn.monthsRegex = ye, pn.monthsShortRegex = fe, pn.week = $e, pn.firstDayOfYear = ke, pn.firstDayOfWeek = Ae, pn.weekdays = Ue, pn.weekdaysMin = Ye, pn.weekdaysShort = Re, pn.weekdaysParse = je, pn.weekdaysRegex = Ze, pn.weekdaysShortRegex = Xe, pn.weekdaysMinRegex = Ke, pn.isPM = ii, pn.meridiem = ni, mi("en", { eras: [{ since: "0001-01-01", until: 1 / 0, @@ -2692,7 +2692,7 @@ var e = t % 10; return t + (1 === Mt(t % 100 / 10) ? "th" : 1 === e ? "st" : 2 === e ? "nd" : 3 === e ? "rd" : "th"); } - }), i.lang = S("moment.lang is deprecated. Use moment.locale instead.", fi), i.langData = S("moment.langData is deprecated. Use moment.localeData instead.", vi); + }), i.lang = S("moment.lang is deprecated. Use moment.locale instead.", mi), i.langData = S("moment.langData is deprecated. Use moment.localeData instead.", vi); var xn = Math.abs; function En() { var t = this._data; @@ -2702,10 +2702,10 @@ var s = kr(e, i); return t._milliseconds += r * s._milliseconds, t._days += r * s._days, t._months += r * s._months, t._bubble(); } - function Pn(t, e) { + function $n(t, e) { return Sn(this, t, e, 1); } - function $n(t, e) { + function Pn(t, e) { return Sn(this, t, e, -1); } function An(t) { @@ -2721,15 +2721,15 @@ o = this._days, a = this._months, l = this._data; - return n >= 0 && o >= 0 && a >= 0 || n <= 0 && o <= 0 && a <= 0 || (n += 864e5 * An(Cn(a) + o), o = 0, a = 0), l.milliseconds = n % 1e3, t = Dt(n / 1e3), l.seconds = t % 60, e = Dt(t / 60), l.minutes = e % 60, i = Dt(e / 60), l.hours = i % 24, o += Dt(i / 24), a += s = Dt(Tn(o)), o -= An(Cn(s)), r = Dt(a / 12), a %= 12, l.days = o, l.months = a, l.years = r, this; + return n >= 0 && o >= 0 && a >= 0 || n <= 0 && o <= 0 && a <= 0 || (n += 864e5 * An(Dn(a) + o), o = 0, a = 0), l.milliseconds = n % 1e3, t = Ct(n / 1e3), l.seconds = t % 60, e = Ct(t / 60), l.minutes = e % 60, i = Ct(e / 60), l.hours = i % 24, o += Ct(i / 24), a += s = Ct(Tn(o)), o -= An(Dn(s)), r = Ct(a / 12), a %= 12, l.days = o, l.months = a, l.years = r, this; } function Tn(t) { return 4800 * t / 146097; } - function Cn(t) { + function Dn(t) { return 146097 * t / 4800; } - function Dn(t) { + function Cn(t) { if (!this.isValid()) return NaN; var e, i, @@ -2741,7 +2741,7 @@ return i / 3; case "year": return i / 12; - } else switch (e = this._days + Math.round(Cn(this._months)), t) { + } else switch (e = this._days + Math.round(Dn(this._months)), t) { case "week": return e / 7 + r / 6048e5; case "day": @@ -2765,13 +2765,13 @@ } var Hn = Mn("ms"), On = Mn("s"), - Nn = Mn("m"), - In = Mn("h"), + In = Mn("m"), + Nn = Mn("h"), Fn = Mn("d"), Bn = Mn("w"), Ln = Mn("M"), - Rn = Mn("Q"), - Un = Mn("y"), + Un = Mn("Q"), + Rn = Mn("y"), Yn = Hn; function zn() { return kr(this); @@ -2786,13 +2786,13 @@ } var Vn = Gn("milliseconds"), Wn = Gn("seconds"), - Xn = Gn("minutes"), - Kn = Gn("hours"), - Zn = Gn("days"), + Zn = Gn("minutes"), + Xn = Gn("hours"), + Kn = Gn("days"), qn = Gn("months"), Jn = Gn("years"); function Qn() { - return Dt(this.days() / 7); + return Ct(this.days() / 7); } var to = Math.round, eo = { @@ -2851,16 +2851,16 @@ h = ao(this._days), c = ao(this._months), d = this.asSeconds(); - return d ? (t = Dt(l / 60), e = Dt(t / 60), l %= 60, t %= 60, i = Dt(c / 12), c %= 12, r = l ? l.toFixed(3).replace(/\.?0+$/, "") : "", s = d < 0 ? "-" : "", n = lo(this._months) !== lo(d) ? "-" : "", o = lo(this._days) !== lo(d) ? "-" : "", a = lo(this._milliseconds) !== lo(d) ? "-" : "", s + "P" + (i ? n + i + "Y" : "") + (c ? n + c + "M" : "") + (h ? o + h + "D" : "") + (e || t || l ? "T" : "") + (e ? a + e + "H" : "") + (t ? a + t + "M" : "") + (l ? a + r + "S" : "")) : "P0D"; + return d ? (t = Ct(l / 60), e = Ct(t / 60), l %= 60, t %= 60, i = Ct(c / 12), c %= 12, r = l ? l.toFixed(3).replace(/\.?0+$/, "") : "", s = d < 0 ? "-" : "", n = lo(this._months) !== lo(d) ? "-" : "", o = lo(this._days) !== lo(d) ? "-" : "", a = lo(this._milliseconds) !== lo(d) ? "-" : "", s + "P" + (i ? n + i + "Y" : "") + (c ? n + c + "M" : "") + (h ? o + h + "D" : "") + (e || t || l ? "T" : "") + (e ? a + e + "H" : "") + (t ? a + t + "M" : "") + (l ? a + r + "S" : "")) : "P0D"; } var co = or.prototype; - return co.isValid = sr, co.abs = En, co.add = Pn, co.subtract = $n, co.as = Dn, co.asMilliseconds = Hn, co.asSeconds = On, co.asMinutes = Nn, co.asHours = In, co.asDays = Fn, co.asWeeks = Bn, co.asMonths = Ln, co.asQuarters = Rn, co.asYears = Un, co.valueOf = Yn, co._bubble = kn, co.clone = zn, co.get = jn, co.milliseconds = Vn, co.seconds = Wn, co.minutes = Xn, co.hours = Kn, co.days = Zn, co.weeks = Qn, co.months = qn, co.years = Jn, co.humanize = oo, co.toISOString = ho, co.toString = ho, co.toJSON = ho, co.locale = os, co.localeData = ls, co.toIsoString = S("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)", ho), co.lang = as, L("X", 0, 0, "unix"), L("x", 0, 0, "valueOf"), At("x", vt), At("X", wt), Ot("X", function (t, e, i) { + return co.isValid = sr, co.abs = En, co.add = $n, co.subtract = Pn, co.as = Cn, co.asMilliseconds = Hn, co.asSeconds = On, co.asMinutes = In, co.asHours = Nn, co.asDays = Fn, co.asWeeks = Bn, co.asMonths = Ln, co.asQuarters = Un, co.asYears = Rn, co.valueOf = Yn, co._bubble = kn, co.clone = zn, co.get = jn, co.milliseconds = Vn, co.seconds = Wn, co.minutes = Zn, co.hours = Xn, co.days = Kn, co.weeks = Qn, co.months = qn, co.years = Jn, co.humanize = oo, co.toISOString = ho, co.toString = ho, co.toJSON = ho, co.locale = os, co.localeData = ls, co.toIsoString = S("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)", ho), co.lang = as, L("X", 0, 0, "unix"), L("x", 0, 0, "valueOf"), At("x", vt), At("X", wt), Ot("X", function (t, e, i) { i._d = new Date(1e3 * parseFloat(t)); }), Ot("x", function (t, e, i) { i._d = new Date(Mt(t)); }), //! moment.js - i.version = "2.30.1", r(Ki), i.fn = hn, i.min = Qi, i.max = tr, i.now = er, i.utc = p, i.unix = cn, i.months = yn, i.isDate = c, i.locale = fi, i.invalid = y, i.duration = kr, i.isMoment = x, i.weekdays = _n, i.parseZone = dn, i.localeData = vi, i.isDuration = ar, i.monthsShort = vn, i.weekdaysMin = wn, i.defineLocale = mi, i.updateLocale = yi, i.locales = _i, i.weekdaysShort = bn, i.normalizeUnits = et, i.relativeTimeRounding = so, i.relativeTimeThreshold = no, i.calendarFormat = Ur, i.prototype = hn, i.HTML5_FMT = { + i.version = "2.30.1", r(Xi), i.fn = hn, i.min = Qi, i.max = tr, i.now = er, i.utc = p, i.unix = cn, i.months = yn, i.isDate = c, i.locale = mi, i.invalid = y, i.duration = kr, i.isMoment = x, i.weekdays = _n, i.parseZone = dn, i.localeData = vi, i.isDuration = ar, i.monthsShort = vn, i.weekdaysMin = wn, i.defineLocale = fi, i.updateLocale = yi, i.locales = _i, i.weekdaysShort = bn, i.normalizeUnits = et, i.relativeTimeRounding = so, i.relativeTimeThreshold = no, i.calendarFormat = Rr, i.prototype = hn, i.HTML5_FMT = { DATETIME_LOCAL: "YYYY-MM-DDTHH:mm", DATETIME_LOCAL_SECONDS: "YYYY-MM-DDTHH:mm:ss", DATETIME_LOCAL_MS: "YYYY-MM-DDTHH:mm:ss.SSS", @@ -2872,7 +2872,7 @@ MONTH: "YYYY-MM" }, i; }(); - var $t = xt(Pt.exports); + var Pt = xt($t.exports); const At = (t, e, i, r) => { r = r || {}, i = i ?? {}; const s = new Event(e, { @@ -2882,15 +2882,15 @@ }); return s.detail = i, t.dispatchEvent(s), s; }; - var kt, Tt, Ct; + var kt, Tt, Dt; !function (t) { t.ETA = "ETA", t.Elapsed = "Elapsed", t.Remaining = "Remaining"; }(kt || (kt = {})), function (t) { t.F = "F", t.C = "C"; }(Tt || (Tt = {})), function (t) { - t.Status = "Status", t.HotendCurrent = "Hotend", t.BedCurrent = "Bed", t.HotendTarget = "T Hotend", t.BedTarget = "T Bed", t.PrinterOnline = "Online", t.Availability = "Availability", t.ProjectName = "Project", t.CurrentLayer = "Layer", t.DryingStatus = "Dry Status", t.DryingTime = "Dry Time", t.SpeedMode = "Speed Mode", t.FanSpeed = "Fan Speed"; - }(Ct || (Ct = {})); - const Dt = Object.assign(Object.assign({}, kt), Ct); + t.Status = "Status", t.HotendCurrent = "Hotend", t.BedCurrent = "Bed", t.HotendTarget = "T Hotend", t.BedTarget = "T Bed", t.PrinterOnline = "Online", t.Availability = "Availability", t.ProjectName = "Project", t.CurrentLayer = "Layer", t.DryingStatus = "Dry Status", t.DryingTime = "Dry Time", t.SpeedMode = "Speed Mode", t.FanSpeed = "Fan Speed", t.OnTime = "On Time", t.OffTime = "Off Time", t.BottomTime = "Bottom Time", t.ModelHeight = "Model Height", t.BottomLayers = "Bottom Layers", t.ZUpHeight = "Z Up Height", t.ZUpSpeed = "Z Up Speed", t.ZDownSpeed = "Z Down Speed"; + }(Dt || (Dt = {})); + const Ct = Object.assign(Object.assign({}, kt), Dt); var Mt, Ht; !function (t) { t.PLA = "PLA", t.PETG = "PETG", t.ABS = "ABS", t.PACF = "PACF", t.PC = "PC", t.ASA = "ASA", t.HIPS = "HIPS", t.PA = "PA", t.PLA_SE = "PLA_SE"; @@ -2898,12 +2898,12 @@ t.PAUSE = "Pause", t.RESUME = "Resume", t.CANCEL = "Cancel"; }(Ht || (Ht = {})); const Ot = ["width", "height", "left", "top"]; - function Nt(t, e) { + function It(t, e) { Object.keys(e).forEach(t => { Ot.includes(t) && !isNaN(e[t]) && (e[t] = e[t].toString() + "px"); }), t && Object.assign(t.style, e); } - function It(t) { + function Nt(t) { return t.toLowerCase().split(" ").map(t => t.charAt(0).toUpperCase() + t.slice(1)).join(" "); } function Ft(t, e) { @@ -2916,7 +2916,7 @@ function Lt(t, e, i, r) { return "on" === Bt(t, e) ? i : r; } - function Rt(t, e) { + function Ut(t, e) { const i = {}; for (const r in t.entities) { const s = t.entities[r]; @@ -2924,7 +2924,7 @@ } return i; } - function Ut(t, e, i) { + function Rt(t, e, i) { for (const r in t) { const s = t[r], n = r.split("."), @@ -2973,7 +2973,7 @@ attributes: n }; } - function Xt(t, e, i, r) { + function Zt(t, e, i, r) { const s = zt(e, i, "sensor", r); return s ? function (t, e) { const i = Ft(t, e), @@ -2981,11 +2981,11 @@ return isNaN(r) ? 0 : r; }(t, s) : void 0; } - function Kt(t, e, i, r, s, n) { + function Xt(t, e, i, r, s, n) { const o = zt(e, i, "binary_sensor", r); return o ? Lt(t, o, s, n) : void 0; } - function Zt(t, e, i, r) { + function Kt(t, e, i, r) { const s = zt(e, i, "update", r); return s ? Lt(t, s, "Update Available", "Up To Date") : void 0; } @@ -3000,8 +3000,8 @@ function Qt(t) { return ["printing", "preheating"].includes(t); } - const te = (t, e) => e ? $t.duration(t, "seconds").humanize() : (() => { - const e = $t.duration(t, "seconds"), + const te = (t, e) => e ? Pt.duration(t, "seconds").humanize() : (() => { + const e = Pt.duration(t, "seconds"), i = e.days(), r = e.hours(), s = e.minutes(), @@ -3035,10 +3035,10 @@ return `${i ? Math.round(n) : n.toFixed(2)}°${e || s}`; }; function re() { - return [Dt.Status, Dt.ETA, Dt.Elapsed, Dt.HotendCurrent, Dt.BedCurrent, Dt.Remaining, Dt.HotendTarget, Dt.BedTarget]; + return [Ct.Status, Ct.ETA, Ct.Elapsed, Ct.Remaining]; } function se() { - return [...re(), Dt.PrinterOnline, Dt.Availability, Dt.ProjectName, Dt.CurrentLayer]; + return [...re(), Ct.HotendCurrent, Ct.BedCurrent, Ct.HotendTarget, Ct.BedTarget, Ct.PrinterOnline, Ct.Availability, Ct.ProjectName, Ct.CurrentLayer]; } function ne(t) { return t.attributes.available_modes.reduce((t, e) => Object.assign(Object.assign({}, t), { @@ -3047,10 +3047,10 @@ } let oe = class extends pt { willUpdate(t) { - super.willUpdate(t), t.has("selectedPrinterID") && (this.printerEntities = Rt(this.hass, this.selectedPrinterID)); + super.willUpdate(t), t.has("selectedPrinterID") && (this.printerEntities = Ut(this.hass, this.selectedPrinterID)); } render() { - return K` + return X`

There are ${Object.keys(this.hass.states).length} entities.

The screen is${this.narrow ? "" : " not"} narrow.

@@ -3086,7 +3086,7 @@ s([vt()], oe.prototype, "hass", void 0), s([vt({ type: Boolean, reflect: !0 - })], oe.prototype, "narrow", void 0), s([vt()], oe.prototype, "route", void 0), s([vt()], oe.prototype, "panel", void 0), s([vt()], oe.prototype, "printers", void 0), s([vt()], oe.prototype, "selectedPrinterID", void 0), s([vt()], oe.prototype, "selectedPrinterDevice", void 0), s([_t()], oe.prototype, "printerEntities", void 0), oe = s([ft("anycubic-view-debug")], oe); + })], oe.prototype, "narrow", void 0), s([vt()], oe.prototype, "route", void 0), s([vt()], oe.prototype, "panel", void 0), s([vt()], oe.prototype, "printers", void 0), s([vt()], oe.prototype, "selectedPrinterID", void 0), s([vt()], oe.prototype, "selectedPrinterDevice", void 0), s([_t()], oe.prototype, "printerEntities", void 0), oe = s([mt("anycubic-view-debug")], oe); var ae, le, he, @@ -3225,7 +3225,7 @@ card: ue, panels: pe }, - fe = Object.freeze({ + me = Object.freeze({ __proto__: null, title: ce, common: de, @@ -3233,7 +3233,7 @@ panels: pe, default: ge }); - function me(t) { + function fe(t) { return t.type === le.literal; } function ye(t) { @@ -3260,10 +3260,10 @@ function Se(t) { return t.type === le.tag; } - function Pe(t) { + function $e(t) { return !(!t || "object" != typeof t || t.type !== he.number); } - function $e(t) { + function Pe(t) { return !(!t || "object" != typeof t || t.type !== he.dateTime); } !function (t) { @@ -3364,18 +3364,18 @@ return ""; }), e; } - var Ce = /[\t-\r \x85\u200E\u200F\u2028\u2029]/i; - var De = /^\.(?:(0+)(\*)?|(#+)|(0+)(#+))$/g, + var De = /[\t-\r \x85\u200E\u200F\u2028\u2029]/i; + var Ce = /^\.(?:(0+)(\*)?|(#+)|(0+)(#+))$/g, Me = /^(@+)?(\+|#+)?[rs]?$/g, He = /(\*)(0+)|(#+)(0+)|(0+)/g, Oe = /^(0+)$/; - function Ne(t) { + function Ie(t) { var e = {}; return "r" === t[t.length - 1] ? e.roundingPriority = "morePrecision" : "s" === t[t.length - 1] && (e.roundingPriority = "lessPrecision"), t.replace(Me, function (t, i, r) { return "string" != typeof r ? (e.minimumSignificantDigits = i.length, e.maximumSignificantDigits = i.length) : "+" === r ? e.minimumSignificantDigits = i.length : "#" === i[0] ? e.maximumSignificantDigits = i.length : (e.minimumSignificantDigits = i.length, e.maximumSignificantDigits = i.length + ("string" == typeof r ? r.length : 0)), ""; }), e; } - function Ie(t) { + function Ne(t) { switch (t) { case "sign-auto": return { @@ -3429,7 +3429,7 @@ return e; } function Be(t) { - var e = Ie(t); + var e = Ne(t); return e || {}; } function Le(t) { @@ -3530,17 +3530,17 @@ }); continue; } - if (Oe.test(n.stem)) e.minimumIntegerDigits = n.stem.length;else if (De.test(n.stem)) { + if (Oe.test(n.stem)) e.minimumIntegerDigits = n.stem.length;else if (Ce.test(n.stem)) { if (n.options.length > 1) throw new RangeError("Fraction-precision stems only accept a single optional option"); - n.stem.replace(De, function (t, i, r, s, n, o) { + n.stem.replace(Ce, function (t, i, r, s, n, o) { return "*" === r ? e.minimumFractionDigits = i.length : s && "#" === s[0] ? e.maximumFractionDigits = s.length : n && o ? (e.minimumFractionDigits = n.length, e.maximumFractionDigits = n.length + o.length) : (e.minimumFractionDigits = i.length, e.maximumFractionDigits = i.length), ""; }); var o = n.options[0]; "w" === o ? e = r(r({}, e), { trailingZeroDisplay: "stripIfInteger" - }) : o && (e = r(r({}, e), Ne(o))); - } else if (Me.test(n.stem)) e = r(r({}, e), Ne(n.stem));else { - var a = Ie(n.stem); + }) : o && (e = r(r({}, e), Ie(o))); + } else if (Me.test(n.stem)) e = r(r({}, e), Ie(n.stem));else { + var a = Ne(n.stem); a && (e = r(r({}, e), a)); var l = Fe(n.stem); l && (e = r(r({}, e), l)); @@ -3548,8 +3548,8 @@ } return e; } - var Re, - Ue = { + var Ue, + Re = { "001": ["H", "h"], AC: ["H", "h", "hb", "hB"], AD: ["H", "hB"], @@ -3840,7 +3840,7 @@ } var i, r = t.language; - return "root" !== r && (i = t.maximize().region), (Ue[i || ""] || Ue[r || ""] || Ue["".concat(r, "-001")] || Ue["001"])[0]; + return "root" !== r && (i = t.maximize().region), (Re[i || ""] || Re[r || ""] || Re["".concat(r, "-001")] || Re["001"])[0]; } var ze = new RegExp("^".concat(Ae.source, "*")), je = new RegExp("".concat(Ae.source, "*$")); @@ -3852,16 +3852,16 @@ } var Ve = !!String.prototype.startsWith && "_a".startsWith("a", 1), We = !!String.fromCodePoint, - Xe = !!Object.fromEntries, - Ke = !!String.prototype.codePointAt, - Ze = !!String.prototype.trimStart, + Ze = !!Object.fromEntries, + Xe = !!String.prototype.codePointAt, + Ke = !!String.prototype.trimStart, qe = !!String.prototype.trimEnd, Je = !!Number.isSafeInteger ? Number.isSafeInteger : function (t) { return "number" == typeof t && isFinite(t) && Math.floor(t) === t && Math.abs(t) <= 9007199254740991; }, Qe = !0; try { - Qe = "a" === (null === (Re = ai("([^\\p{White_Space}\\p{Pattern_Syntax}]*)", "yu").exec("a")) || void 0 === Re ? void 0 : Re[0]); + Qe = "a" === (null === (Ue = ai("([^\\p{White_Space}\\p{Pattern_Syntax}]*)", "yu").exec("a")) || void 0 === Ue ? void 0 : Ue[0]); } catch (j) { Qe = !1; } @@ -3879,7 +3879,7 @@ } return r; }, - ri = Xe ? Object.fromEntries : function (t) { + ri = Ze ? Object.fromEntries : function (t) { for (var e = {}, i = 0, r = t; i < r.length; i++) { var s = r[i], n = s[0], @@ -3888,7 +3888,7 @@ } return e; }, - si = Ke ? function (t, e) { + si = Xe ? function (t, e) { return t.codePointAt(e); } : function (t, e) { var i = t.length; @@ -3898,7 +3898,7 @@ return s < 55296 || s > 56319 || e + 1 === i || (r = t.charCodeAt(e + 1)) < 56320 || r > 57343 ? s : r - 56320 + (s - 55296 << 10) + 65536; } }, - ni = Ze ? function (t) { + ni = Ke ? function (t) { return t.trimStart(); } : function (t) { return t.replace(ze, ""); @@ -4176,19 +4176,19 @@ case "plural": case "selectordinal": case "select": - var f = this.clonePosition(); - if (this.bumpSpace(), !this.bumpIf(",")) return this.error(ae.EXPECT_SELECT_ARGUMENT_OPTIONS, Ge(f, r({}, f))); + var m = this.clonePosition(); + if (this.bumpSpace(), !this.bumpIf(",")) return this.error(ae.EXPECT_SELECT_ARGUMENT_OPTIONS, Ge(m, r({}, m))); this.bumpSpace(); - var m = this.parseIdentifierIfPossible(), + var f = this.parseIdentifierIfPossible(), y = 0; - if ("select" !== a && "offset" === m.value) { + if ("select" !== a && "offset" === f.value) { if (!this.bumpIf(":")) return this.error(ae.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE, Ge(this.clonePosition(), this.clonePosition())); var v; if (this.bumpSpace(), (v = this.tryParseDecimalInteger(ae.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE, ae.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE)).err) return v; - this.bumpSpace(), m = this.parseIdentifierIfPossible(), y = v.val; + this.bumpSpace(), f = this.parseIdentifierIfPossible(), y = v.val; } var _, - b = this.tryParsePluralOrSelectOptions(t, a, e, m); + b = this.tryParsePluralOrSelectOptions(t, a, e, f); if (b.err) return b; if ((_ = this.tryParseArgumentClose(s)).err) return _; var w = Ge(s, this.clonePosition()); @@ -4251,7 +4251,7 @@ try { i = function (t) { if (0 === t.length) throw new Error("Number skeleton cannot be empty"); - for (var e = t.split(Ce).filter(function (t) { + for (var e = t.split(De).filter(function (t) { return t.length > 0; }), i = [], r = 0, s = e; r < s.length; r++) { var n = s[r].split("/"); @@ -4388,10 +4388,10 @@ } function gi(t) { t.forEach(function (t) { - if (delete t.location, we(t) || xe(t)) for (var e in t.options) delete t.options[e].location, gi(t.options[e].value);else ve(t) && Pe(t.style) || (_e(t) || be(t)) && $e(t.style) ? delete t.style.location : Se(t) && gi(t.children); + if (delete t.location, we(t) || xe(t)) for (var e in t.options) delete t.options[e].location, gi(t.options[e].value);else ve(t) && $e(t.style) || (_e(t) || be(t)) && Pe(t.style) ? delete t.style.location : Se(t) && gi(t.children); }); } - function fi(t, e) { + function mi(t, e) { void 0 === e && (e = {}), e = r({ shouldParseSkeletons: !0, requiresOtherClause: !0 @@ -4403,7 +4403,7 @@ } return (null == e ? void 0 : e.captureLocation) || gi(i.val), i.val; } - function mi(t, e) { + function fi(t, e) { var i = e && e.cache ? e.cache : Si, r = e && e.serializer ? e.serializer : wi; return (e && e.strategy ? e.strategy : bi)(t, { @@ -4446,7 +4446,7 @@ return new xi(); } }, - Pi = { + $i = { variadic: function (t, e) { return _i(t, this, vi, e.cache.create(), e.serializer); }, @@ -4457,7 +4457,7 @@ !function (t) { t.MISSING_VALUE = "MISSING_VALUE", t.INVALID_VALUE = "INVALID_VALUE", t.MISSING_INTL_API = "MISSING_INTL_API"; }(Ei || (Ei = {})); - var $i, + var Pi, Ai = function (t) { function e(e, i, r) { var s = t.call(this, e) || this; @@ -4479,64 +4479,64 @@ } return i(e, t), e; }(Ai), - Ci = function (t) { + Di = function (t) { function e(e, i) { return t.call(this, 'The intl string context variable "'.concat(e, '" was not provided to the string "').concat(i, '"'), Ei.MISSING_VALUE, i) || this; } return i(e, t), e; }(Ai); - function Di(t) { + function Ci(t) { return "function" == typeof t; } function Mi(t, e, i, r, s, n, o) { - if (1 === t.length && me(t[0])) return [{ - type: $i.literal, + if (1 === t.length && fe(t[0])) return [{ + type: Pi.literal, value: t[0].value }]; for (var a = [], l = 0, h = t; l < h.length; l++) { var c = h[l]; - if (me(c)) a.push({ - type: $i.literal, + if (fe(c)) a.push({ + type: Pi.literal, value: c.value });else if (Ee(c)) "number" == typeof n && a.push({ - type: $i.literal, + type: Pi.literal, value: i.getNumberFormat(e).format(n) });else { var d = c.value; - if (!s || !(d in s)) throw new Ci(d, o); + if (!s || !(d in s)) throw new Di(d, o); var u = s[d]; if (ye(c)) u && "string" != typeof u && "number" != typeof u || (u = "string" == typeof u || "number" == typeof u ? String(u) : ""), a.push({ - type: "string" == typeof u ? $i.literal : $i.object, + type: "string" == typeof u ? Pi.literal : Pi.object, value: u });else if (_e(c)) { - var p = "string" == typeof c.style ? r.date[c.style] : $e(c.style) ? c.style.parsedOptions : void 0; + var p = "string" == typeof c.style ? r.date[c.style] : Pe(c.style) ? c.style.parsedOptions : void 0; a.push({ - type: $i.literal, + type: Pi.literal, value: i.getDateTimeFormat(e, p).format(u) }); } else if (be(c)) { - p = "string" == typeof c.style ? r.time[c.style] : $e(c.style) ? c.style.parsedOptions : r.time.medium; + p = "string" == typeof c.style ? r.time[c.style] : Pe(c.style) ? c.style.parsedOptions : r.time.medium; a.push({ - type: $i.literal, + type: Pi.literal, value: i.getDateTimeFormat(e, p).format(u) }); } else if (ve(c)) { - (p = "string" == typeof c.style ? r.number[c.style] : Pe(c.style) ? c.style.parsedOptions : void 0) && p.scale && (u *= p.scale || 1), a.push({ - type: $i.literal, + (p = "string" == typeof c.style ? r.number[c.style] : $e(c.style) ? c.style.parsedOptions : void 0) && p.scale && (u *= p.scale || 1), a.push({ + type: Pi.literal, value: i.getNumberFormat(e, p).format(u) }); } else { if (Se(c)) { var g = c.children, - f = c.value, - m = s[f]; - if (!Di(m)) throw new Ti(f, "function", o); - var y = m(Mi(g, e, i, r, s, n).map(function (t) { + m = c.value, + f = s[m]; + if (!Ci(f)) throw new Ti(m, "function", o); + var y = f(Mi(g, e, i, r, s, n).map(function (t) { return t.value; })); Array.isArray(y) || (y = [y]), a.push.apply(a, y.map(function (t) { return { - type: "string" == typeof t ? $i.literal : $i.object, + type: "string" == typeof t ? Pi.literal : Pi.object, value: t }; })); @@ -4562,7 +4562,7 @@ return function (t) { return t.length < 2 ? t : t.reduce(function (t, e) { var i = t[t.length - 1]; - return i && i.type === $i.literal && e.type === $i.literal ? i.value += e.value : t.push(e), t; + return i && i.type === Pi.literal && e.type === Pi.literal ? i.value += e.value : t.push(e), t; }, []); }(a); } @@ -4590,8 +4590,8 @@ } !function (t) { t[t.literal = 0] = "literal", t[t.object = 1] = "object"; - }($i || ($i = {})); - var Ni = function () { + }(Pi || (Pi = {})); + var Ii = function () { function t(e, i, s, o) { var a, l = this; @@ -4603,7 +4603,7 @@ var e = l.formatToParts(t); if (1 === e.length) return e[0].value; var i = e.reduce(function (t, e) { - return t.length && e.type === $i.literal && "string" == typeof t[t.length - 1] ? t[t.length - 1] += e.value : t.push(e.value), t; + return t.length && e.type === Pi.literal && "string" == typeof t[t.length - 1] ? t[t.length - 1] += e.value : t.push(e.value), t; }, []); return i.length <= 1 ? i[0] || "" : i; }, this.formatToParts = function (t) { @@ -4638,26 +4638,26 @@ dateTime: {}, pluralRules: {} }), { - getNumberFormat: mi(function () { + getNumberFormat: fi(function () { for (var t, e = [], i = 0; i < arguments.length; i++) e[i] = arguments[i]; return new ((t = Intl.NumberFormat).bind.apply(t, n([void 0], e, !1)))(); }, { cache: Oi(a.number), - strategy: Pi.variadic + strategy: $i.variadic }), - getDateTimeFormat: mi(function () { + getDateTimeFormat: fi(function () { for (var t, e = [], i = 0; i < arguments.length; i++) e[i] = arguments[i]; return new ((t = Intl.DateTimeFormat).bind.apply(t, n([void 0], e, !1)))(); }, { cache: Oi(a.dateTime), - strategy: Pi.variadic + strategy: $i.variadic }), - getPluralRules: mi(function () { + getPluralRules: fi(function () { for (var t, e = [], i = 0; i < arguments.length; i++) e[i] = arguments[i]; return new ((t = Intl.PluralRules).bind.apply(t, n([void 0], e, !1)))(); }, { cache: Oi(a.pluralRules), - strategy: Pi.variadic + strategy: $i.variadic }) }); } @@ -4672,7 +4672,7 @@ var e = Intl.NumberFormat.supportedLocalesOf(t); return e.length > 0 ? new Intl.Locale(e[0]) : new Intl.Locale("string" == typeof t ? t : t[0]); } - }, t.__parse = fi, t.formats = { + }, t.__parse = mi, t.formats = { number: { integer: { maximumFractionDigits: 0 @@ -4732,9 +4732,9 @@ } }, t; }(), - Ii = Ni, + Ni = Ii, Fi = { - en: fe + en: me }; function Bi(t, e, ...i) { const r = e.replace(/['"]+/g, ""); @@ -4751,7 +4751,7 @@ e = e.replace(/^{([^}]+)?}$/, "$1"), n[e] = i[t + 1]; } try { - return new Ii(s, e).format(n); + return new Ni(s, e).format(n); } catch (t) { return "Translation " + t; } @@ -4762,8 +4762,8 @@ * SPDX-License-Identifier: BSD-3-Clause */ const Li = 1, - Ri = 2, - Ui = t => (...e) => ({ + Ui = 2, + Ri = t => (...e) => ({ _$litDirective$: t, values: e }); @@ -4787,7 +4787,7 @@ * Copyright 2018 Google LLC * SPDX-License-Identifier: BSD-3-Clause */ - const zi = Ui(class extends Yi { + const zi = Ri(class extends Yi { constructor(t) { if (super(t), t.type !== Li || "class" !== t.name || t.strings?.length > 2) throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute."); } @@ -4806,12 +4806,12 @@ const r = !!e[t]; r === this.st.has(t) || this.nt?.has(t) || (r ? (i.add(t), this.st.add(t)) : (i.remove(t), this.st.delete(t))); } - return Z; + return K; } }), ji = "important", Gi = " !" + ji, - Vi = Ui(class extends Yi { + Vi = Ri(class extends Yi { constructor(t) { if (super(t), t.type !== Li || "style" !== t.name || t.strings?.length > 2) throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute."); } @@ -4835,19 +4835,19 @@ t.includes("-") || e ? i.setProperty(t, e ? r.slice(0, -11) : r, e ? ji : "") : i[t] = r; } } - return Z; + return K; } }), { I: Wi } = dt, - Xi = () => document.createComment(""), - Ki = (t, e, i) => { + Zi = () => document.createComment(""), + Xi = (t, e, i) => { const r = t._$AA.parentNode, s = void 0 === e ? t._$AB : e._$AA; if (void 0 === i) { - const e = r.insertBefore(Xi(), s), - n = r.insertBefore(Xi(), s); + const e = r.insertBefore(Zi(), s), + n = r.insertBefore(Zi(), s); i = new Wi(e, n, t, t.options); } else { const e = i._$AB.nextSibling, @@ -4867,7 +4867,7 @@ } return i; }, - Zi = (t, e, i = t) => (t._$AI(e, i), t), + Ki = (t, e, i = t) => (t._$AI(e, i), t), qi = {}, Ji = t => { t._$AP?.(!1, !0); @@ -4914,7 +4914,7 @@ } else Qi(this, t); } const sr = t => { - t.type == Ri && (t._$AP ??= rr, t._$AQ ??= ir); + t.type == Ui && (t._$AP ??= rr, t._$AQ ??= ir); }; class nr extends Yi { constructor() { @@ -4992,11 +4992,11 @@ duration: 333, easing: "ease-in-out" }, - fr = ["left", "top", "width", "height", "opacity", "color", "background"], - mr = new WeakMap(); - const yr = Ui(class extends nr { + mr = ["left", "top", "width", "height", "opacity", "color", "background"], + fr = new WeakMap(); + const yr = Ri(class extends nr { constructor(t) { - if (super(t), this.t = !1, this.i = null, this.o = null, this.h = !0, this.shouldLog = !1, t.type === Ri) throw Error("The `animate` directive must be used in attribute position."); + if (super(t), this.t = !1, this.i = null, this.o = null, this.h = !0, this.shouldLog = !1, t.type === Ui) throw Error("The `animate` directive must be used in attribute position."); this.createFinished(); } createFinished() { @@ -5018,7 +5018,7 @@ } update(t, [e]) { const i = void 0 === this.u; - return i && (this.u = t.options?.host, this.u.addController(this), this.u.updateComplete.then(t => this.t = !0), this.element = t.element, mr.set(this.element, this)), this.optionsOrCallback = e, (i || "function" != typeof e) && this.p(e), this.render(e); + return i && (this.u = t.options?.host, this.u.addController(this), this.u.updateComplete.then(t => this.t = !0), this.element = t.element, fr.set(this.element, this)), this.optionsOrCallback = e, (i || "function" != typeof e) && this.p(e), this.render(e); } p(t) { t = t ?? {}; @@ -5029,7 +5029,7 @@ }).keyframeOptions = { ...e.defaultOptions.keyframeOptions, ...t.keyframeOptions - }), t.properties ??= fr, this.options = t; + }), t.properties ??= mr, this.options = t; } m() { const t = {}, @@ -5118,7 +5118,7 @@ O() { const t = []; for (let e = this.element.parentNode; e; e = e?.parentNode) { - const i = mr.get(e); + const i = fr.get(e); i && !i.isDisabled() && i && t.push(i); } return t; @@ -5213,7 +5213,7 @@ const t = { display: this.showVideo ? "block" : "none" }; - return K` + return X`
`; @@ -5282,8 +5282,8 @@ xr = "ace_run_out_refill", Er = wr + xr, Sr = "multi_color_box_spools", - Pr = wr + Sr; - let $r = class extends pt { + $r = wr + Sr; + let Pr = class extends pt { constructor() { super(...arguments), this.box_id = 0, this._runoutRefillId = xr, this._spoolsEntityId = Sr, this.spoolList = [], this.selectedIndex = -1, this.selectedMaterialType = "", this.selectedColor = [0, 0, 0], this._handleRunoutRefillChanged = t => { this.hass.callService("switch", "toggle", { @@ -5293,12 +5293,12 @@ } willUpdate(t) { var e, i, r, s; - super.willUpdate(t), t.has("hass") && this.hass.language !== this.language && (this.language = this.hass.language), t.has("box_id") && (1 === this.box_id ? (this._runoutRefillId = Er, this._spoolsEntityId = Pr) : (this._runoutRefillId = xr, this._spoolsEntityId = Sr)), (t.has("hass") || t.has("printerEntities") || t.has("printerEntityIdPart")) && (this.spoolList = Wt(this.hass, this.printerEntities, this.printerEntityIdPart, this._spoolsEntityId, "not loaded", { + super.willUpdate(t), t.has("hass") && this.hass.language !== this.language && (this.language = this.hass.language), t.has("box_id") && (1 === this.box_id ? (this._runoutRefillId = Er, this._spoolsEntityId = $r) : (this._runoutRefillId = xr, this._spoolsEntityId = Sr)), (t.has("hass") || t.has("printerEntities") || t.has("printerEntityIdPart")) && (this.spoolList = Wt(this.hass, this.printerEntities, this.printerEntityIdPart, this._spoolsEntityId, "not loaded", { spool_info: [] }).attributes.spool_info, this._runoutRefillState = (e = this.hass, i = this.printerEntities, r = this.printerEntityIdPart, s = this._runoutRefillId, Ft(e, zt(i, r, "switch", s)))); } render() { - return K` + return X`
@@ -5330,7 +5330,7 @@ const i = { "background-color": t.spool_loaded ? `rgb(${t.color[0]}, ${t.color[1]}, ${t.color[2]})` : "#aaa" }; - return K` + return X`
- ${this.dimensions ? K`
+ ${this.dimensions ? X`
@@ -5611,12 +5611,12 @@
this._moveGantry() })) : null} > @@ -5640,24 +5640,24 @@ u = n.val(t.top.height - t.buildplate.verticalOffset) + h, p = u + n.val((t.xAxis.extruder.height - t.xAxis.height) / 2 - (t.xAxis.extruder.height + 12)), g = n.val(t.buildplate.maxWidth), - f = n.val(t.buildplate.maxHeight), - m = n.val(t.left.width + (n.og(l) - t.buildplate.maxWidth) / 2), + m = n.val(t.buildplate.maxHeight), + f = n.val(t.left.width + (n.og(l) - t.buildplate.maxWidth) / 2), y = u - n.val(t.buildplate.maxHeight), v = g, - _ = m, + _ = f, b = u, w = n.val(t.xAxis.width), x = n.val(t.xAxis.height), E = n.val(t.xAxis.offsetLeft), S = w, - P = x, - $ = n.val(t.xAxis.extruder.width), + $ = x, + P = n.val(t.xAxis.extruder.width), A = n.val(t.xAxis.extruder.height), - k = _ - $ / 2, + k = _ - P / 2, T = k + g, - C = n.val(12), D = n.val(12), - M = b - A - D; + C = n.val(12), + M = b - A - C; return { Scalable: { width: o, @@ -5675,8 +5675,8 @@ }, BuildArea: { width: g, - height: f, - left: m, + height: m, + left: f, top: y }, BuildPlate: { @@ -5692,22 +5692,22 @@ }, Track: { width: S, - height: P + height: $ }, Basis: { Y: u, X: p }, Gantry: { - width: $, + width: P, height: A, left: k, top: M }, Nozzle: { - width: C, - height: D, - left: ($ - C) / 2, + width: D, + height: C, + left: (P - D) / 2, top: A }, GantryMaxLeft: T @@ -5816,7 +5816,7 @@ })], Mr.prototype, "_isPrinting", void 0), Mr = s([vr("anycubic-printercard-animated_printer")], Mr); let Hr = class extends pt { render() { - return K` + return X`
{ t._$AH = e; - })(t, l), Z; + })(t, l), K; } }); - let Ir = class extends pt { + let Nr = class extends pt { render() { const t = { width: String(this.progress) + "%" }; - return K` + return X`

${this.name}

@@ -6007,17 +6007,17 @@ }; s([vt({ type: String - })], Ir.prototype, "name", void 0), s([vt({ + })], Nr.prototype, "name", void 0), s([vt({ type: Number - })], Ir.prototype, "value", void 0), s([vt({ + })], Nr.prototype, "value", void 0), s([vt({ type: Number - })], Ir.prototype, "progress", void 0), Ir = s([vr("anycubic-printercard-progress-line")], Ir); + })], Nr.prototype, "progress", void 0), Nr = s([vr("anycubic-printercard-progress-line")], Nr); let Fr = class extends pt { constructor() { super(...arguments), this.unit = ""; } render() { - return K` + return X`

${this.name}

${this.value}${this.unit}

@@ -6066,7 +6066,7 @@ })], Fr.prototype, "unit", void 0), Fr = s([vr("anycubic-printercard-stat-line")], Fr); let Br = class extends pt { render() { - return K``; @@ -6111,14 +6111,14 @@ super.disconnectedCallback(), clearInterval(this.lastIntervalId); } render() { - return K` { switch (e) { case kt.Remaining: return te(t, i); case kt.ETA: - return $t().add(t, "seconds").format(r ? "HH:mm" : "h:mm a"); + return Pt().add(t, "seconds").format(r ? "HH:mm" : "h:mm a"); case kt.Elapsed: return te(t, i); default: @@ -6152,14 +6152,14 @@ })], Lr.prototype, "currentTime", void 0), s([_t({ type: Number })], Lr.prototype, "lastIntervalId", void 0), Lr = s([vr("anycubic-printercard-stat-time")], Lr); - let Rr = class extends pt { + let Ur = class extends pt { constructor() { super(...arguments), this.round = !0, this.temperatureUnit = Tt.C, this.progressPercent = 0; } render() { - return K` + return X`
- ${this.showPercent ? K` + ${this.showPercent ? X`

${this.round ? Math.round(this.progressPercent) : this.progressPercent}% @@ -6171,17 +6171,17 @@ `; } _renderStats() { - return Nr(this.monitoredStats, t => t, (t, e) => { + return Ir(this.monitoredStats, t => t, (t, e) => { switch (t) { - case Dt.Status: - return K` + case Ct.Status: + return X` `; - case Dt.ETA: - return K` + case Ct.ETA: + return X` `; - case Dt.Elapsed: - return K` + case Ct.Elapsed: + return X` `; - case Dt.Remaining: - return K` + case Ct.Remaining: + return X` `; - case Dt.BedCurrent: - return K` + case Ct.BedCurrent: + return X` `; - case Dt.HotendCurrent: - return K` + case Ct.HotendCurrent: + return X` `; - case Dt.BedTarget: - return K` + case Ct.BedTarget: + return X` `; - case Dt.HotendTarget: - return K` + case Ct.HotendTarget: + return X` `; - case Dt.PrinterOnline: - return K` + case Ct.PrinterOnline: + return X` `; - case Dt.Availability: - return K` + case Ct.Availability: + return X` `; - case Dt.ProjectName: - return K` + case Ct.ProjectName: + return X` 0 ? [t.slice(0, e), t.slice(e + 1)] : [t], - r = i[0].match(/.{1,10}/g).join("\n"); - return i.length > 1 ? r + "-" + i.slice(1) : r; - }(Wt(this.hass, this.printerEntities, this.printerEntityIdPart, "project_name").state)} + .value=${Wt(this.hass, this.printerEntities, this.printerEntityIdPart, "project_name").state} > `; - case Dt.CurrentLayer: - return K` + case Ct.CurrentLayer: + return X` `; - case Dt.SpeedMode: + case Ct.SpeedMode: { const e = Wt(this.hass, this.printerEntities, this.printerEntityIdPart, "raw_print_speed_mode_code", -1, { available_modes: [] @@ -6287,35 +6282,35 @@ i = ne(e), r = e.state, s = r >= 0 && r in i ? i[r] : "Unknown"; - return K` + return X` `; } - case Dt.FanSpeed: - return K` + case Ct.FanSpeed: + return X` `; - case Dt.DryingStatus: - return K` + case Ct.DryingStatus: + return X` `; - case Dt.DryingTime: + case Ct.DryingTime: { const e = Number(Wt(this.hass, this.printerEntities, this.printerEntityIdPart, "drying_total_duration", 0).state), i = Number(Wt(this.hass, this.printerEntities, this.printerEntityIdPart, "drying_remaining_time", 0).state), r = isNaN(i) ? "" : `${i} Mins`, s = !isNaN(e) && e > 0 ? i / e * 100 : 0; - return K` + return X` `; } + case Ct.OnTime: + return X` + + `; + case Ct.OffTime: + return X` + + `; + case Ct.BottomTime: + return X` + + `; + case Ct.ModelHeight: + return X` + + `; + case Ct.BottomLayers: + return X` + + `; + case Ct.ZUpHeight: + return X` + + `; + case Ct.ZUpSpeed: + return X` + + `; + case Ct.ZDownSpeed: + return X` + + `; default: - return K` + return X` "} @@ -6367,16 +6424,16 @@ `; } }; - s([vt()], Rr.prototype, "hass", void 0), s([vt()], Rr.prototype, "monitoredStats", void 0), s([vt({ + s([vt()], Ur.prototype, "hass", void 0), s([vt()], Ur.prototype, "monitoredStats", void 0), s([vt({ type: Boolean - })], Rr.prototype, "showPercent", void 0), s([vt({ + })], Ur.prototype, "showPercent", void 0), s([vt({ type: Boolean - })], Rr.prototype, "round", void 0), s([vt({ + })], Ur.prototype, "round", void 0), s([vt({ type: Boolean - })], Rr.prototype, "use_24hr", void 0), s([vt({ + })], Ur.prototype, "use_24hr", void 0), s([vt({ type: String - })], Rr.prototype, "temperatureUnit", void 0), s([vt()], Rr.prototype, "printerEntities", void 0), s([vt()], Rr.prototype, "printerEntityIdPart", void 0), s([vt()], Rr.prototype, "progressPercent", void 0), Rr = s([vr("anycubic-printercard-stats-component")], Rr); - const Ur = u` + })], Ur.prototype, "temperatureUnit", void 0), s([vt()], Ur.prototype, "printerEntities", void 0), s([vt()], Ur.prototype, "printerEntityIdPart", void 0), s([vt()], Ur.prototype, "progressPercent", void 0), Ur = s([vr("anycubic-printercard-stats-component")], Ur); + const Rr = u` :host { display: none; position: fixed; @@ -6431,7 +6488,7 @@ const t = { filter: this._isActive ? "brightness(80%)" : "brightness(100%)" }; - return K` + return X`

@@ -9586,7 +9651,7 @@ opacity: this.isHidden ? 0 : 1, scale: this.isHidden ? 0 : 1 }; - return this.showSettingsButton || this.isPrinting ? K` + return this.showSettingsButton || this.isPrinting ? X`
0 && t.connections[0].length > 1 ? t.connections[0][1] : null; - }(this.selectedPrinterDevice)), t.has("selectedPrinterID") && (this.printerEntities = Rt(this.hass, this.selectedPrinterID), this.printerEntityIdPart = jt(this.printerEntities)), t.has("hass") || t.has("selectedPrinterID")) { - this.printerStateFwUpdateAvailable = Zt(this.hass, this.printerEntities, this.printerEntityIdPart, "printer_firmware"), this.printerStateAvailable = Kt(this.hass, this.printerEntities, this.printerEntityIdPart, "is_available", "Available", "Busy"), this.printerStateOnline = Kt(this.hass, this.printerEntities, this.printerEntityIdPart, "printer_online", "Online", "Offline"), this.printerStateCurrNozzleTemp = Xt(this.hass, this.printerEntities, this.printerEntityIdPart, "nozzle_temperature"), this.printerStateCurrHotbedTemp = Xt(this.hass, this.printerEntities, this.printerEntityIdPart, "hotbed_temperature"), this.printerStateTargetNozzleTemp = Xt(this.hass, this.printerEntities, this.printerEntityIdPart, "target_nozzle_temperature"), this.printerStateTargetHotbedTemp = Xt(this.hass, this.printerEntities, this.printerEntityIdPart, "target_hotbed_temperature"); - const t = Xt(this.hass, this.printerEntities, this.printerEntityIdPart, "project_progress"); + }(this.selectedPrinterDevice)), t.has("selectedPrinterID") && (this.printerEntities = Ut(this.hass, this.selectedPrinterID), this.printerEntityIdPart = jt(this.printerEntities)), t.has("hass") || t.has("selectedPrinterID")) { + this.isFDM = "Filament" === Wt(this.hass, this.printerEntities, this.printerEntityIdPart, "current_status").attributes.material_type, this.printerStateFwUpdateAvailable = Kt(this.hass, this.printerEntities, this.printerEntityIdPart, "printer_firmware"), this.printerStateAvailable = Xt(this.hass, this.printerEntities, this.printerEntityIdPart, "is_available", "Available", "Busy"), this.printerStateOnline = Xt(this.hass, this.printerEntities, this.printerEntityIdPart, "printer_online", "Online", "Offline"), this.printerStateCurrNozzleTemp = Zt(this.hass, this.printerEntities, this.printerEntityIdPart, "nozzle_temperature"), this.printerStateCurrHotbedTemp = Zt(this.hass, this.printerEntities, this.printerEntityIdPart, "hotbed_temperature"), this.printerStateTargetNozzleTemp = Zt(this.hass, this.printerEntities, this.printerEntityIdPart, "target_nozzle_temperature"), this.printerStateTargetHotbedTemp = Zt(this.hass, this.printerEntities, this.printerEntityIdPart, "target_hotbed_temperature"); + const t = Zt(this.hass, this.printerEntities, this.printerEntityIdPart, "project_progress"); this.projectStateProgress = void 0 !== t ? `${t}%` : "0%", this.projectStatePrintState = function (t, e, i, r, s = !1) { const n = zt(e, i, "sensor", r); if (n) { const e = Bt(t, n); - return s ? It(e) : e; + return s ? Nt(e) : e; } - }(this.hass, this.printerEntities, this.printerEntityIdPart, "print_state", !0), this.aceStateFwUpdateAvailable = Zt(this.hass, this.printerEntities, this.printerEntityIdPart, "ace_firmware"), this.aceStateDryingActive = Kt(this.hass, this.printerEntities, this.printerEntityIdPart, "drying_active", "Drying", "Not Drying"), this.aceStateDryingRemaining = Xt(this.hass, this.printerEntities, this.printerEntityIdPart, "drying_remaining_time"), this.aceStateDryingTotal = Xt(this.hass, this.printerEntities, this.printerEntityIdPart, "drying_total_duration"), this.aceDryingProgress = void 0 !== this.aceStateDryingRemaining && void 0 !== this.aceStateDryingTotal ? String((this.aceStateDryingTotal > 0 ? Math.round(1e4 * (1 - this.aceStateDryingRemaining / this.aceStateDryingTotal)) / 100 : 0).toFixed(2)) + "%" : void 0, this.aceStateFwUpdateAvailable ? this.monitoredStats = Is : this.monitoredStats = Fs; + }(this.hass, this.printerEntities, this.printerEntityIdPart, "print_state", !0), this.aceStateFwUpdateAvailable = Kt(this.hass, this.printerEntities, this.printerEntityIdPart, "ace_firmware"), this.aceStateDryingActive = Xt(this.hass, this.printerEntities, this.printerEntityIdPart, "drying_active", "Drying", "Not Drying"), this.aceStateDryingRemaining = Zt(this.hass, this.printerEntities, this.printerEntityIdPart, "drying_remaining_time"), this.aceStateDryingTotal = Zt(this.hass, this.printerEntities, this.printerEntityIdPart, "drying_total_duration"), this.aceDryingProgress = void 0 !== this.aceStateDryingRemaining && void 0 !== this.aceStateDryingTotal ? String((this.aceStateDryingTotal > 0 ? Math.round(1e4 * (1 - this.aceStateDryingRemaining / this.aceStateDryingTotal)) / 100 : 0).toFixed(2)) + "%" : void 0, this.aceStateFwUpdateAvailable ? this.monitoredStats = Ns : this.isFDM ? this.monitoredStats = Bs : this.monitoredStats = Fs; } } _renderInfoRow(t, e) { - return K` + return X`
${Bi(`panels.main.cards.main.fields.${t}.heading`, this.language)}:
    - ${this._fileArray ? this._fileArray.map(t => K` + ${this._fileArray ? this._fileArray.map(t => X`
  • ${t.name}
`; diff --git a/custom_components/anycubic_cloud/frontend_panel/src/components/printer_card/stats/stats_component.ts b/custom_components/anycubic_cloud/frontend_panel/src/components/printer_card/stats/stats_component.ts index 614e0ad..16d1238 100644 --- a/custom_components/anycubic_cloud/frontend_panel/src/components/printer_card/stats/stats_component.ts +++ b/custom_components/anycubic_cloud/frontend_panel/src/components/printer_card/stats/stats_component.ts @@ -7,7 +7,6 @@ import { customElementIfUndef } from "../../../internal/register-custom-element" import { getPrinterBinarySensorState, getPrinterSensorStateObj, - prettyFilename, speedModesFromStateObj, toTitleCase, } from "../../../helpers"; @@ -232,14 +231,12 @@ export class AnycubicPrintercardStatsComponent extends LitElement { return html` `; @@ -345,6 +342,124 @@ export class AnycubicPrintercardStatsComponent extends LitElement { `; } + case PrinterCardStatType.OnTime: + return html` + + `; + + case PrinterCardStatType.OffTime: + return html` + + `; + + case PrinterCardStatType.BottomTime: + return html` + + `; + + case PrinterCardStatType.ModelHeight: + return html` + + `; + + case PrinterCardStatType.BottomLayers: + return html` + + `; + + case PrinterCardStatType.ZUpHeight: + return html` + + `; + + case PrinterCardStatType.ZUpSpeed: + return html` + + `; + + case PrinterCardStatType.ZDownSpeed: + return html` + + `; + default: return html` { ]); await routes?.routes?.a?.load?.(); const devToolsRouter = document.createElement("developer-tools-router"); - await (devToolsRouter as any)?.routerOptions?.routes?.service?.load?.(); + const devToolsRoutes = (devToolsRouter as any)?.routerOptions?.routes; + if (devToolsRoutes?.service) { + await devToolsRoutes?.service?.load?.(); + } + if (devToolsRoutes?.action) { + await devToolsRoutes?.action?.load?.(); + } }; diff --git a/custom_components/anycubic_cloud/frontend_panel/src/types.ts b/custom_components/anycubic_cloud/frontend_panel/src/types.ts index df8ac20..ccd9e1b 100644 --- a/custom_components/anycubic_cloud/frontend_panel/src/types.ts +++ b/custom_components/anycubic_cloud/frontend_panel/src/types.ts @@ -14,6 +14,7 @@ export interface Dictionary { export interface ServiceCallRequest { domain: string; + action: string; service: string; serviceData?: Record; target?: { @@ -70,6 +71,7 @@ export interface HomeAssistant { ) => Promise; callService: ( domain: ServiceCallRequest["domain"], + action: ServiceCallRequest["action"], service: ServiceCallRequest["service"], serviceData?: ServiceCallRequest["serviceData"], target?: ServiceCallRequest["target"], @@ -163,6 +165,14 @@ export enum TextStatType { DryingTime = "Dry Time", SpeedMode = "Speed Mode", FanSpeed = "Fan Speed", + OnTime = "On Time", + OffTime = "Off Time", + BottomTime = "Bottom Time", + ModelHeight = "Model Height", + BottomLayers = "Bottom Layers", + ZUpHeight = "Z Up Height", + ZUpSpeed = "Z Up Speed", + ZDownSpeed = "Z Down Speed", } export const PrinterCardStatType = { ...CalculatedTimeType, ...TextStatType }; diff --git a/custom_components/anycubic_cloud/frontend_panel/src/views/main/view-main.ts b/custom_components/anycubic_cloud/frontend_panel/src/views/main/view-main.ts index 8b64c4e..03f5fba 100644 --- a/custom_components/anycubic_cloud/frontend_panel/src/views/main/view-main.ts +++ b/custom_components/anycubic_cloud/frontend_panel/src/views/main/view-main.ts @@ -1,4 +1,4 @@ -import { LitElement, html, css, PropertyValues } from "lit"; +import { LitElement, html, css, PropertyValues, nothing } from "lit"; import { property, customElement, state } from "lit/decorators.js"; import { localize } from "../../../localize/localize"; @@ -6,11 +6,13 @@ import { localize } from "../../../localize/localize"; import { getPanelACEMonitoredStats, getPanelBasicMonitoredStats, + getPanelFDMMonitoredStats, getPrinterEntities, getPrinterEntityIdPart, getPrinterID, getPrinterMAC, getPrinterSensorStateFloat, + getPrinterSensorStateObj, getPrinterSensorStateString, getPrinterBinarySensorState, getPrinterUpdateEntityState, @@ -29,6 +31,7 @@ import "../../components/printer_card/card/card.ts"; const monitoredStatsACE: PrinterCardStatType[] = getPanelACEMonitoredStats(); const monitoredStatsBasic: PrinterCardStatType[] = getPanelBasicMonitoredStats(); +const monitoredStatsFDM: PrinterCardStatType[] = getPanelFDMMonitoredStats(); @customElement("anycubic-view-main") export class AnycubicViewMain extends LitElement { @@ -104,6 +107,9 @@ export class AnycubicViewMain extends LitElement { @state() private aceDryingProgress: string | undefined; + @state() + private isFDM: boolean = false; + @state() private monitoredStats: PrinterCardStatType[] = monitoredStatsBasic; @@ -134,6 +140,13 @@ export class AnycubicViewMain extends LitElement { changedProperties.has("hass") || changedProperties.has("selectedPrinterID") ) { + this.isFDM = + getPrinterSensorStateObj( + this.hass, + this.printerEntities, + this.printerEntityIdPart, + "current_status", + ).attributes.material_type === "Filament"; this.printerStateFwUpdateAvailable = getPrinterUpdateEntityState( this.hass, this.printerEntities, @@ -237,6 +250,8 @@ export class AnycubicViewMain extends LitElement { : undefined; if (this.aceStateFwUpdateAvailable) { this.monitoredStats = monitoredStatsACE; + } else if (this.isFDM) { + this.monitoredStats = monitoredStatsFDM; } else { this.monitoredStats = monitoredStatsBasic; } @@ -302,22 +317,26 @@ export class AnycubicViewMain extends LitElement { "printer_available", this.printerStateAvailable, )} - ${this._renderInfoRow( - "curr_nozzle_temp", - this.printerStateCurrNozzleTemp, - )} - ${this._renderInfoRow( - "curr_hotbed_temp", - this.printerStateCurrHotbedTemp, - )} - ${this._renderInfoRow( - "target_nozzle_temp", - this.printerStateTargetNozzleTemp, - )} - ${this._renderInfoRow( - "target_hotbed_temp", - this.printerStateTargetHotbedTemp, - )} + ${this.isFDM + ? html` + ${this._renderInfoRow( + "curr_nozzle_temp", + this.printerStateCurrNozzleTemp, + )} + ${this._renderInfoRow( + "curr_hotbed_temp", + this.printerStateCurrHotbedTemp, + )} + ${this._renderInfoRow( + "target_nozzle_temp", + this.printerStateTargetNozzleTemp, + )} + ${this._renderInfoRow( + "target_hotbed_temp", + this.printerStateTargetHotbedTemp, + )} + ` + : nothing} ${this._renderInfoRow("print_state", this.projectStatePrintState)} ${this._renderInfoRow("project_progress", this.projectStateProgress)} ${this._renderOptionalInfoRow( diff --git a/custom_components/anycubic_cloud/frontend_panel/src/views/print/view-print-base.ts b/custom_components/anycubic_cloud/frontend_panel/src/views/print/view-print-base.ts index 856a686..6ac6c75 100644 --- a/custom_components/anycubic_cloud/frontend_panel/src/views/print/view-print-base.ts +++ b/custom_components/anycubic_cloud/frontend_panel/src/views/print/view-print-base.ts @@ -55,9 +55,11 @@ export class AnycubicViewPrintBase extends LitElement { } if (this.selectedPrinterDevice) { + const srvName = `${platform}.${this._serviceName}`; this._scriptData = { ...this._scriptData, - service: `${platform}.${this._serviceName}`, + action: srvName, + service: srvName, data: { ...(this._scriptData.data || {}), config_entry: this.selectedPrinterDevice.primary_config_entry, diff --git a/custom_components/anycubic_cloud/manifest.json b/custom_components/anycubic_cloud/manifest.json index 1cae046..17ed1f3 100644 --- a/custom_components/anycubic_cloud/manifest.json +++ b/custom_components/anycubic_cloud/manifest.json @@ -15,5 +15,5 @@ "issue_tracker": "https://github.com/WaresWichall/anycubic_cloud/issues", "loggers": [], "requirements": ["paho-mqtt==1.6.1"], - "version": "0.0.12" + "version": "0.0.13" } diff --git a/custom_components/anycubic_cloud/sensor.py b/custom_components/anycubic_cloud/sensor.py index b51efe5..07cde65 100644 --- a/custom_components/anycubic_cloud/sensor.py +++ b/custom_components/anycubic_cloud/sensor.py @@ -11,6 +11,7 @@ from homeassistant.config_entries import ConfigEntry from homeassistant.const import ( PERCENTAGE, + UnitOfLength, UnitOfTemperature, UnitOfTime, ) @@ -18,6 +19,10 @@ from homeassistant.helpers.entity_platform import AddEntitiesCallback from homeassistant.util import dt as dt_util +from .anycubic_cloud_api.anycubic_enums import ( + AnycubicPrinterMaterialType +) + from .const import ( CONF_PRINTER_ID_LIST, COORDINATOR, @@ -88,18 +93,18 @@ ), ) -SENSOR_TYPES = ( +FDM_SENSOR_TYPES = ( SensorEntityDescription( - key="device_status", - translation_key="device_status", + key="print_speed_mode", + translation_key="print_speed_mode", ), SensorEntityDescription( - key="is_printing", - translation_key="is_printing", + key="print_speed_pct", + translation_key="print_speed_pct", ), SensorEntityDescription( - key="current_status", - translation_key="current_status", + key="fan_speed_pct", + translation_key="fan_speed_pct", ), SensorEntityDescription( key="curr_nozzle_temp", @@ -111,6 +116,76 @@ translation_key="curr_hotbed_temp", native_unit_of_measurement=UnitOfTemperature.CELSIUS, ), + SensorEntityDescription( + key="target_nozzle_temp", + translation_key="target_nozzle_temp", + native_unit_of_measurement=UnitOfTemperature.CELSIUS, + ), + SensorEntityDescription( + key="target_hotbed_temp", + translation_key="target_hotbed_temp", + native_unit_of_measurement=UnitOfTemperature.CELSIUS, + ), +) + +LCD_SENSOR_TYPES = ( + SensorEntityDescription( + key="print_on_time", + translation_key="print_on_time", + native_unit_of_measurement=UnitOfTime.SECONDS, + ), + SensorEntityDescription( + key="print_off_time", + translation_key="print_off_time", + native_unit_of_measurement=UnitOfTime.SECONDS, + ), + SensorEntityDescription( + key="print_bottom_time", + translation_key="print_bottom_time", + native_unit_of_measurement=UnitOfTime.SECONDS, + ), + SensorEntityDescription( + key="print_model_height", + translation_key="print_model_height", + native_unit_of_measurement=UnitOfLength.MILLIMETERS, + ), + SensorEntityDescription( + key="print_anti_alias_count", + translation_key="print_anti_alias_count", + ), + SensorEntityDescription( + key="print_bottom_layers", + translation_key="print_bottom_layers", + native_unit_of_measurement=UNIT_LAYERS, + ), + SensorEntityDescription( + key="print_z_up_height", + translation_key="print_z_up_height", + native_unit_of_measurement=UnitOfLength.MILLIMETERS, + ), + SensorEntityDescription( + key="print_z_up_speed", + translation_key="print_z_up_speed", + ), + SensorEntityDescription( + key="print_z_down_speed", + translation_key="print_z_down_speed", + ), +) + +SENSOR_TYPES = ( + SensorEntityDescription( + key="device_status", + translation_key="device_status", + ), + SensorEntityDescription( + key="is_printing", + translation_key="is_printing", + ), + SensorEntityDescription( + key="current_status", + translation_key="current_status", + ), SensorEntityDescription( key="file_list_local", translation_key="file_list_local", @@ -179,32 +254,10 @@ translation_key="print_total_layers", native_unit_of_measurement=UNIT_LAYERS, ), - SensorEntityDescription( - key="target_nozzle_temp", - translation_key="target_nozzle_temp", - native_unit_of_measurement=UnitOfTemperature.CELSIUS, - ), - SensorEntityDescription( - key="target_hotbed_temp", - translation_key="target_hotbed_temp", - native_unit_of_measurement=UnitOfTemperature.CELSIUS, - ), - SensorEntityDescription( - key="print_speed_mode", - translation_key="print_speed_mode", - ), - SensorEntityDescription( - key="print_speed_pct", - translation_key="print_speed_pct", - ), SensorEntityDescription( key="print_z_thick", translation_key="print_z_thick", ), - SensorEntityDescription( - key="fan_speed_pct", - translation_key="fan_speed_pct", - ), ) @@ -226,6 +279,16 @@ async def async_setup_entry( for description in SECONDARY_MULTI_COLOR_BOX_SENSOR_TYPES: sensors.append(AnycubicSensor(coordinator, printer_id, description)) + status_attr = printer_attributes_for_key(coordinator, printer_id, 'current_status') + + if status_attr['material_type'] == AnycubicPrinterMaterialType.FILAMENT: + for description in FDM_SENSOR_TYPES: + sensors.append(AnycubicSensor(coordinator, printer_id, description)) + + elif status_attr['material_type'] == AnycubicPrinterMaterialType.RESIN: + for description in LCD_SENSOR_TYPES: + sensors.append(AnycubicSensor(coordinator, printer_id, description)) + for description in SENSOR_TYPES: sensors.append(AnycubicSensor(coordinator, printer_id, description)) @@ -253,16 +316,29 @@ def __init__( self._attr_native_unit_of_measurement = UnitOfTemperature.CELSIUS @property - def state(self) -> float: + def available(self) -> bool: + return printer_state_for_key( + self.coordinator, + self._printer_id, + self.entity_description.key + ) is not None + + @property + def state(self) -> Any: """Return the ....""" state = printer_state_for_key(self.coordinator, self._printer_id, self.entity_description.key) - if self.entity_description.native_unit_of_measurement == UnitOfTemperature.CELSIUS: + if state is None: + return None + + if ( + isinstance(state, float) + or self.entity_description.native_unit_of_measurement == UnitOfTemperature.CELSIUS + ): return float(state) elif ( - self.entity_description.native_unit_of_measurement == UnitOfTime.MINUTES - or self.entity_description.native_unit_of_measurement == UnitOfTime.SECONDS + isinstance(state, int) or self.entity_description.native_unit_of_measurement == UNIT_LAYERS or self.entity_description.native_unit_of_measurement == PERCENTAGE ): diff --git a/custom_components/anycubic_cloud/strings.json b/custom_components/anycubic_cloud/strings.json index cb9488f..4ab8253 100644 --- a/custom_components/anycubic_cloud/strings.json +++ b/custom_components/anycubic_cloud/strings.json @@ -247,6 +247,33 @@ }, "secondary_dry_status_remaining_time": { "name": "Secondary Drying Remaining Time" + }, + "print_model_height": { + "name": "Print Model Height" + }, + "print_anti_alias_count": { + "name": "Print Anti Alias" + }, + "print_on_time": { + "name": "Print On Time" + }, + "print_off_time": { + "name": "Print Off Time" + }, + "print_bottom_time": { + "name": "Print Bottom Time" + }, + "print_bottom_layers": { + "name": "Print Bottom Layers" + }, + "print_z_up_height": { + "name": "Print Z Up Height" + }, + "print_z_up_speed": { + "name": "Print Z Up Speed" + }, + "print_z_down_speed": { + "name": "Print Z Down Speed" } }, "switch": { diff --git a/custom_components/anycubic_cloud/translations/en.json b/custom_components/anycubic_cloud/translations/en.json index cb9488f..4ab8253 100644 --- a/custom_components/anycubic_cloud/translations/en.json +++ b/custom_components/anycubic_cloud/translations/en.json @@ -247,6 +247,33 @@ }, "secondary_dry_status_remaining_time": { "name": "Secondary Drying Remaining Time" + }, + "print_model_height": { + "name": "Print Model Height" + }, + "print_anti_alias_count": { + "name": "Print Anti Alias" + }, + "print_on_time": { + "name": "Print On Time" + }, + "print_off_time": { + "name": "Print Off Time" + }, + "print_bottom_time": { + "name": "Print Bottom Time" + }, + "print_bottom_layers": { + "name": "Print Bottom Layers" + }, + "print_z_up_height": { + "name": "Print Z Up Height" + }, + "print_z_up_speed": { + "name": "Print Z Up Speed" + }, + "print_z_down_speed": { + "name": "Print Z Down Speed" } }, "switch": {