diff --git a/.storage/lovelace_resources b/.storage/lovelace_resources index c43046ff..d9fc67f4 100644 --- a/.storage/lovelace_resources +++ b/.storage/lovelace_resources @@ -6,7 +6,7 @@ "items": [ { "id": "cc55565add58413bbcadba9f9cf8caba", - "url": "/hacsfiles/lovelace-mushroom/mushroom.js?hacstag=444350375522", + "url": "/hacsfiles/lovelace-mushroom/mushroom.js?hacstag=444350375523", "type": "module" }, { diff --git a/custom_components/ha_mcp_tools/const.py b/custom_components/ha_mcp_tools/const.py index 2be7bc31..53c5da17 100644 --- a/custom_components/ha_mcp_tools/const.py +++ b/custom_components/ha_mcp_tools/const.py @@ -25,7 +25,7 @@ DOMAIN = "ha_mcp_tools" # in CI. The # capability negotiation — not this version — gates each WS command (see # ``websocket_api.CAPABILITIES``). -COMPONENT_VERSION = "2.1.2" +COMPONENT_VERSION = "2.1.3" # Config-entry discriminator (``entry.data[CONF_ENTRY_TYPE]``). A missing value # means "tools" so the pre-existing services entry keeps working across the @@ -39,7 +39,12 @@ ENTRY_TYPE_SERVER = "server" # carrying the legacy default (a user-customized title is left alone). TOOLS_ENTRY_TITLE = "HA-MCP File & YAML Tools" TOOLS_ENTRY_LEGACY_TITLE = "HA MCP Tools" -MIN_EMBEDDED_HOME_ASSISTANT_VERSION = "2026.6.0" +# Kept level with the HACS floor in hacs.json: from component 2.1.3 the manifest +# declares voluptuous-openapi, which Core releases before 2026.7 pin to an older +# version so the requirement cannot resolve there, and +# that requirement gates the whole integration before any entry's config flow +# runs, so a lower runtime floor here would promise what the load cannot keep. +MIN_EMBEDDED_HOME_ASSISTANT_VERSION = "2026.8.0" # Allowed directories for file operations (relative to config dir). # "blueprints" is read-only BY DEFAULT — in ALLOWED_READ_DIRS but not diff --git a/custom_components/ha_mcp_tools/llm_api.py b/custom_components/ha_mcp_tools/llm_api.py index 8680e9d9..65299a12 100644 --- a/custom_components/ha_mcp_tools/llm_api.py +++ b/custom_components/ha_mcp_tools/llm_api.py @@ -47,11 +47,14 @@ stateless session each — the in-process server serves ``stateless_http=True``. from __future__ import annotations import asyncio +import copy import importlib import logging +import math +from collections import Counter from collections.abc import AsyncIterator, Callable, Iterable from contextlib import AsyncExitStack, asynccontextmanager -from dataclasses import dataclass +from dataclasses import dataclass, field from functools import cache from typing import TYPE_CHECKING, Any, cast @@ -138,6 +141,17 @@ def _schema_converter() -> Callable[[Any], Any]: if err.name != "voluptuous_openapi": raise probatio = importlib.import_module("probatio") + _LOGGER.warning( + "voluptuous-openapi is not importable; converting tool schemas " + "with probatio instead. The manifest declares it, so this is " + "Home Assistant running with skip_pip, or a deps tree that lost " + "the package after setup. A requirement that genuinely failed to " + "install never reaches this line -- Home Assistant reports that " + "itself and abandons the integration before importing it. " + "Probatio's OpenAPI codec cannot express the node it builds for " + "an integer, so a numeric parameter can reach the conversation " + "agent as a string, an empty schema or a plain number." + ) return cast(Callable[[Any], Any], probatio.from_openapi) return cast(Callable[[Any], Any], legacy.convert_to_voluptuous) @@ -147,6 +161,206 @@ def convert_to_voluptuous(schema: Any) -> vol.Schema: return cast(vol.Schema, _schema_converter()(schema)) +# Keywords whose value is a mapping keyed by author-chosen names — property +# names, definition names, regexes — rather than by JSON Schema keywords. A key +# spelled like a bound is one of those names and must not be rewritten. +_SCHEMA_MAPS: frozenset[str] = frozenset( + { + "properties", + "patternProperties", + "$defs", + "definitions", + "dependentSchemas", + "dependentRequired", + # Draft-7's predecessor of the two above; still emitted by some servers. + "dependencies", + } +) +# Keywords whose value is instance data rather than a subschema. A key spelled +# like a bound inside one of these is a value in someone's default, not a bound. +# ``example`` is OpenAPI's singular spelling of ``examples``. +_INSTANCE_VALUES: frozenset[str] = frozenset( + {"default", "const", "enum", "examples", "example"} +) +# Keywords whose value is neither a subschema nor a map of subschemas. +# OpenAPI's ``discriminator`` holds a ``propertyName`` and a ``mapping`` of +# author-chosen tags to ``$ref`` strings; a tag spelled like a bound is one of +# those names, and its ``$ref`` value would read as a non-numeric bound and be +# dropped, corrupting a valid discriminated union. OpenAPI ``x-`` specification +# extensions carry arbitrary vendor objects the same way and are matched by +# prefix in ``_is_opaque_key``. +_OPAQUE_KEYWORDS: frozenset[str] = frozenset({"discriminator"}) + + +def _is_opaque_key(key: str) -> bool: + """True for a keyword whose value must be copied through untouched.""" + return key in _OPAQUE_KEYWORDS or key.startswith("x-") + + +# Each exclusive keyword, the inclusive twin it folds into, the picker that +# keeps the tighter of the two when both are present, and the step to the +# nearest integer the bound still admits. +_EXCLUSIVE_BOUNDS: tuple[ + tuple[str, str, Callable[[Any, Any], Any], Callable[[Any], int]], ... +] = ( + ("exclusiveMinimum", "minimum", max, lambda bound: math.floor(bound) + 1), + ("exclusiveMaximum", "maximum", min, lambda bound: math.ceil(bound) - 1), +) + + +@dataclass +class _Rewrite: + """What one schema normalisation changed, so a caller can log it once. + + The walk is recursive and knows no tool name; collecting here lets the + entry point say what happened to which tool in a single line, rather than + once per node or not at all. + """ + + folded: list[str] = field(default_factory=list) + dropped: list[str] = field(default_factory=list) + + +def _to_inclusive_bounds(schema: Any, rewrite: _Rewrite | None = None) -> Any: + """Return the schema with every exclusive numeric bound made inclusive. + + Home Assistant re-emits the converted schema through Probatio's OpenAPI + codec, which defaults to OpenAPI 3.0 and writes an exclusive bound the + Draft-4 way: ``minimum`` beside ``exclusiveMinimum: true``. The Anthropic + API validates ``input_schema`` as JSON Schema draft 2020-12, where + ``exclusiveMinimum`` must be a number, and rejects the entire request — so + one such bound anywhere in the mirrored toolset fails every conversation + turn, not just calls to the tool carrying it. + + On an integer-only node the fold is exact -- ``exclusiveMinimum: 1`` + becomes ``minimum: 2``, the smallest integer the bound admits. Elsewhere + the advertised edge widens by one representable point; the server still + enforces the real bound when the call arrives, so nothing becomes callable + that was not callable before. A boolean is the Draft-4 flag rather than a + bound and is dropped outright. + + Normalising here rather than only at the source covers the server versions + this component does not control: the ha-mcp package installs and updates + independently of the component, and an explicit pip-spec pins it outright. + """ + if isinstance(schema, list): + return [_to_inclusive_bounds(item, rewrite) for item in schema] + if not isinstance(schema, dict): + return schema + + result: dict[str, Any] = {} + for key, value in schema.items(): + if key in _INSTANCE_VALUES or _is_opaque_key(key): + # Copied, not aliased: the result is handed to Core and kept in + # the search catalog, and neither may reach back into the MCP + # result object this schema came from. + result[key] = copy.deepcopy(value) + elif key in _SCHEMA_MAPS and isinstance(value, dict): + result[key] = { + name: _to_inclusive_bounds(sub, rewrite) for name, sub in value.items() + } + else: + result[key] = _to_inclusive_bounds(value, rewrite) + + _fold_bounds(result, rewrite) + return result + + +def _is_number(value: Any) -> bool: + """True for a JSON number. bool is an int subclass and is not one.""" + return not isinstance(value, bool) and isinstance(value, int | float) + + +def _admits_integers_only(node: dict[str, Any]) -> bool: + """True when the node's declared type accepts integers and nothing wider. + + A union that also admits ``number`` is not tightened: the excluded edge is + still reachable there as a fraction. + """ + declared = node.get("type") + if isinstance(declared, str): + return declared == "integer" + if isinstance(declared, list): + return "integer" in declared and "number" not in declared + return False + + +def _fold_bounds(node: dict[str, Any], rewrite: _Rewrite | None = None) -> None: + """Fold each exclusive keyword into its inclusive twin, in place.""" + for exclusive, inclusive, tighter, to_integer in _EXCLUSIVE_BOUNDS: + if exclusive not in node: + continue + bound = node.pop(exclusive) + if not _is_number(bound): + # Nothing non-numeric is a readable bound in a subschema slot, and + # the slot is all this can be: the name maps, the instance-value + # keywords and the opaque ones above keep foreign data out of + # reach. Probatio refuses a string, a list and the Draft-4 boolean + # outright -- costing the whole tool -- and silently retypes a null + # number param to a string one. Dropping the key repairs all four. + if rewrite is not None: + rewrite.dropped.append(exclusive) + continue + # On an integer-only node the exact inclusive equivalent exists, so + # take it: folding ``exclusiveMinimum: 1`` to ``minimum: 1`` would + # advertise a value the server rejects. + if _admits_integers_only(node): + bound = to_integer(bound) + # ``tighter`` when the schema already carried an inclusive bound, so + # that bound is never loosened to the exclusive one. + current = node.get(inclusive) + node[inclusive] = tighter(current, bound) if _is_number(current) else bound + if rewrite is not None: + rewrite.folded.append(exclusive) + + +def _tally(keywords: list[str]) -> str: + """Render the rewritten keywords with a count, so two nodes read as two. + + One line per tool keeps the log readable, but a bare set of keyword names + would make a schema with several malformed bounds indistinguishable from + one carrying a single bad node -- and the count is the only hint left that + more than one place needs fixing. + """ + return ", ".join( + keyword if seen == 1 else f"{keyword} x{seen}" + for keyword, seen in sorted(Counter(keywords).items()) + ) + + +def _normalise_schema(schema: Any, tool_name: str) -> Any: + """Normalise one tool's schema and report, once, what that changed. + + Both publication paths reach the model: the mirrored parameters Core + converts, and the tool-search catalog, which is returned verbatim and + passes no converter at all. Both call this, so a tool is normalised once + per turn and logged once per turn whichever path published it. + """ + rewrite = _Rewrite() + result = _to_inclusive_bounds(schema, rewrite) + if rewrite.dropped: + _LOGGER.warning( + "Dropped %s from %s's schema: the value is not a number, so it is " + "either the Draft-4 boolean flag or malformed, and Home " + "Assistant's codec answers such a node by refusing the tool or by " + "retyping the parameter. The server should advertise the bound as " + "a number, the only form draft 2020-12 permits.", + _tally(rewrite.dropped), + tool_name, + ) + if rewrite.folded: + _LOGGER.debug( + "Rewrote %s in %s's schema to the inclusive twin so Home Assistant " + "does not re-emit it in the Draft-4 form. On a non-integer bound " + "the advertised edge is now one representable point wider than the " + "server enforces, so a model passing that edge gets a rejection " + "that is otherwise unattributable from any log.", + _tally(rewrite.folded), + tool_name, + ) + return result + + # Used when the server's initialize result carries no instructions (it always # should — ha-mcp ships server-level instructions — but never render an empty # prompt if a build does not). @@ -632,10 +846,14 @@ class HaMcpLlmApi(llm.API): return llm.APIInstance(self, prompt, llm_context, tools) - def _convert_parameters(self, tool: Any) -> vol.Schema | None: - """Convert one tool's JSON schema, or None (logged) when it fails.""" + def _convert_parameters(self, tool: Any, schema: Any) -> vol.Schema | None: + """Convert one tool's normalised schema, or None (logged) when it fails. + + The schema is normalised by the caller rather than here, so that a tool + the catalog also lists is rewritten and logged once rather than twice. + """ try: - return convert_to_voluptuous(tool.inputSchema) + return convert_to_voluptuous(schema) except Exception: # One unconvertible schema must not take down the whole # toolset for the conversation — skip that tool, loudly. @@ -650,7 +868,8 @@ class HaMcpLlmApi(llm.API): """Mirror every exposed tool directly (full-catalog mode).""" tools: list[llm.Tool] = [] for tool in exposed: - parameters = self._convert_parameters(tool) + schema = _normalise_schema(tool.inputSchema, tool.name) + parameters = self._convert_parameters(tool, schema) if parameters is None: continue tools.append( @@ -667,15 +886,26 @@ class HaMcpLlmApi(llm.API): catalog: list[dict[str, Any]] = [] for tool in exposed: exposed_names.add(tool.name) + # One normalisation feeds both surfaces, so a search result never + # shows a bound the mirrored tool does not advertise. Sharing the + # object rests on the converter not writing into its input. Both + # backends this component can reach were read for that: every + # write in voluptuous-openapi 0.4.1's convert_to_voluptuous and in + # probatio 0.11.4's JSON-Schema codec lands in a dict the + # converter built itself, and instrumenting probatio's inputs + # recorded no mutating call at all. A + # converter that wrote back would corrupt the catalog entry, so + # re-check this before pointing the component at a third one. + schema = _normalise_schema(tool.inputSchema, tool.name) catalog.append( { "name": tool.name, "description": tool.description or "", - "input_schema": tool.inputSchema, + "input_schema": schema, } ) if tool.name in pinned: - parameters = self._convert_parameters(tool) + parameters = self._convert_parameters(tool, schema) if parameters is not None: tools.append( HaMcpTool( @@ -756,7 +986,9 @@ async def async_register_llm_api( exc_info=True, ) return - # The embedded e2e (test_llm_api_registered_inside_ha) asserts on this + # The embedded e2e (test_llm_api_registered_inside_ha) and the in-HA + # probe tests (tests/src/e2e/workflows/embedded/test_llm_api_in_ha.py) + # assert on this # message to prove the registration ran inside a real HA — keep the # "Registered the HA-MCP toolset as LLM API" prefix stable. _LOGGER.info( diff --git a/custom_components/ha_mcp_tools/manifest.json b/custom_components/ha_mcp_tools/manifest.json index 0ac19faa..ce518c7f 100644 --- a/custom_components/ha_mcp_tools/manifest.json +++ b/custom_components/ha_mcp_tools/manifest.json @@ -20,7 +20,8 @@ "iot_class": "local_push", "issue_tracker": "https://github.com/homeassistant-ai/ha-mcp/issues", "requirements": [ - "ruamel.yaml>=0.18.0" + "ruamel.yaml>=0.18.0", + "voluptuous-openapi>=0.4.1" ], - "version": "2.1.2" + "version": "2.1.3" } diff --git a/custom_components/ha_mcp_tools/websocket_api.py b/custom_components/ha_mcp_tools/websocket_api.py index 374600c8..4dae1311 100644 --- a/custom_components/ha_mcp_tools/websocket_api.py +++ b/custom_components/ha_mcp_tools/websocket_api.py @@ -2,10 +2,10 @@ This module registers versioned ``ha_mcp_tools/*`` WebSocket commands that the ha-mcp server calls in-process (same HA core, no REST/WS round-trips) behind a -capability gate. It registers twenty-three commands. It advertises twenty-six -capabilities: twenty-two command capabilities plus four additive flags -(dashboards_doc_search, search_visibility, search_entity_membership, and -search_visibility_allowlist_authorization); +capability gate. It registers twenty-three commands. It advertises twenty-seven +capabilities: twenty-two command capabilities plus five additive flags +(dashboards_doc_search, device_registry_child_semantics, search_visibility, +search_entity_membership, and search_visibility_allowlist_authorization); the info handshake carries no capability entry: * ``ha_mcp_tools/info`` — the handshake: ``schema_version`` + ``capabilities[]`` @@ -274,6 +274,7 @@ import logging import re from collections.abc import Collection, Mapping from dataclasses import dataclass +from dataclasses import field as dataclass_field from difflib import SequenceMatcher from pathlib import Path from typing import Any, NamedTuple @@ -361,6 +362,12 @@ CAPABILITIES: list[str] = [ "blueprint_get", "device_get", "device_list", + # A semantic flag shared by every device-registry-backed read. Components + # predating this flag enumerate only Core's main ``devices`` collection and + # cannot provide authoritative Core 2026.9 child-device/effective-area data. + # A newer server therefore falls back to Core's native registry endpoints + # unless this flag accompanies the individual command capability. + "device_registry_child_semantics", "entity_enrich", "exposure", "config_entries", @@ -1015,6 +1022,19 @@ class _RegistryView: label: Any = None device: Any = None + # One request-local, conflict-filtered semantic snapshot plus the identities + # removed from it. Visibility filtering consumes the former and its warning + # projection consumes the latter, so both paths observe the same evidence. + _device_entries_by_id_cache: dict[str, Any] | None = dataclass_field( + default=None, init=False, repr=False, compare=False + ) + _device_conflicting_ids_cache: frozenset[str] | None = dataclass_field( + default=None, init=False, repr=False, compare=False + ) + _device_invalid_area_ids_cache: frozenset[str] | None = dataclass_field( + default=None, init=False, repr=False, compare=False + ) + def _resolve_registries(hass: HomeAssistant) -> _RegistryView: """Snapshot the five registries. Test seam — monkeypatched in unit tests.""" @@ -1094,10 +1114,11 @@ def _do_search( view = _resolve_registries(hass) diagnostics: dict[str, int] = {} partial_reasons: list[str] = [] - # Visibility degradation warnings (unknown category / empty-registry allowlist / - # Assist unavailable), collected in the entity block below when a visibility - # filter is applied. Surfaced additively so the fast path isn't silent about - # incomplete filtering (parity with the server's load_hidden_set warnings). + # Visibility degradation warnings (unknown category / conflicting device / + # empty-registry allowlist / Assist unavailable), collected in the entity block + # below when a visibility filter is applied. Surfaced additively so the fast + # path isn't silent about incomplete filtering (parity with the server's + # load_hidden_set warnings). visibility_warnings: list[str] = [] hidden: set[str] = set() @@ -1516,19 +1537,22 @@ def _registry_enrichment(view: _RegistryView, entity_id: str) -> dict[str, Any]: if reg else [] ) - area_id = getattr(reg, "area_id", None) if reg else None + area_id = _effective_area_for_entry(view, reg) if reg else None device_id = getattr(reg, "device_id", None) if reg else None labels = set(getattr(reg, "labels", None) or []) if reg else set() hidden = bool(getattr(reg, "hidden_by", None)) if reg else False - dev = _device(view, device_id) if device_id else None + dev = ( + _unambiguous_device_entries(view).get(device_id) + if isinstance(device_id, str) and device_id + else None + ) dev_texts: list[str] = [] if dev is not None: - if area_id is None: - area_id = getattr(dev, "area_id", None) - labels |= set(getattr(dev, "labels", None) or []) + dev_row = _device_dict_repr(dev) or {} + labels |= set(dev_row.get("labels") or []) for attr in ("name_by_user", "name", "manufacturer", "model"): - val = getattr(dev, attr, None) + val = dev_row.get(attr) if val: dev_texts.append(str(val)) @@ -2325,6 +2349,170 @@ def _device(view: _RegistryView, device_id: str | None) -> Any: return _call_lookup(view.device, "async_get", device_id) +def _device_collection_values(collection: Any, *, collection_name: str) -> list[Any]: + """Enumerate a Core device collection across old and 2026.9 shapes. + + Before Core 2026.9 ``registry.devices`` was a mapping-like container. Core + 2026.9 exposes supported iterable collections for both ``devices`` and + ``child_devices``. Mapping fakes and older containers still use ``values``; + modern collections are consumed by iteration so the deprecated mapping API + on ``registry.devices`` is not invoked. + """ + if collection is None: + return [] + if isinstance(collection, Mapping): + try: + return list(collection.values()) + except Exception: # pragma: no cover - defensive + _LOGGER.warning( + "failed to enumerate device registry collection %s", + collection_name, + exc_info=True, + ) + return [] + try: + return list(collection) + except Exception: # pragma: no cover - defensive + _LOGGER.warning( + "failed to enumerate device registry collection %s", + collection_name, + exc_info=True, + ) + return [] + + +def _unambiguous_device_entries(view: _RegistryView) -> dict[str, Any]: + """Return one request-local map of unambiguous main and child devices. + + Core 2026.9 stores child devices in a separate collection. Older releases + have only the mapping-like ``devices`` container. Duplicate ids cannot occur + in a valid Core registry; if a drifted/corrupt view supplies conflicting + entries, remove that identity rather than choosing one arbitrarily. + """ + if view._device_entries_by_id_cache is not None: + return view._device_entries_by_id_cache + reg = view.device + if reg is None: + view._device_entries_by_id_cache = {} + view._device_conflicting_ids_cache = frozenset() + view._device_invalid_area_ids_cache = frozenset() + return view._device_entries_by_id_cache + main_collection = getattr(reg, "devices", None) + if hasattr(reg, "child_devices"): + candidates = _device_collection_values( + main_collection, collection_name="devices" + ) + candidates.extend( + _device_collection_values( + getattr(reg, "child_devices", None), collection_name="child_devices" + ) + ) + else: + # The pre-2026.9 container is mapping-like and iterates ids, not entries. + candidates = _mapping_values(main_collection) + + by_id: dict[str, Any] = {} + conflicts: set[str] = set() + for entry in candidates: + device_id = getattr(entry, "id", None) + if not isinstance(device_id, str) or not device_id or device_id in conflicts: + continue + if device_id not in by_id: + by_id[device_id] = entry + continue + prior = _device_dict_repr(by_id[device_id]) + current = _device_dict_repr(entry) + if prior != current or prior is None: + conflicts.add(device_id) + del by_id[device_id] + _LOGGER.warning( + "device registry contained conflicting device identity %r; " + "excluding it from this request", + device_id, + ) + view._device_entries_by_id_cache = by_id + view._device_conflicting_ids_cache = frozenset(conflicts) + return view._device_entries_by_id_cache + + +def _all_device_entries(view: _RegistryView) -> list[Any]: + """Return every unambiguous main and child device entry once.""" + return list(_unambiguous_device_entries(view).values()) + + +def _conflicting_device_ids(view: _RegistryView) -> frozenset[str]: + """Return device identities excluded from this request as conflicting.""" + _unambiguous_device_entries(view) + return view._device_conflicting_ids_cache or frozenset() + + +def _invalid_device_area_ids(view: _RegistryView) -> frozenset[str]: + """Return device ids whose area evidence is malformed or has invalid ancestry.""" + devices_by_id = _unambiguous_device_entries(view) + if view._device_invalid_area_ids_cache is not None: + return view._device_invalid_area_ids_cache + invalid: set[str] = set() + for device_id, device in devices_by_id.items(): + row = _device_dict_repr(device) + if row is None: + invalid.add(device_id) + continue + direct_area = row.get("area_id") + if direct_area is not None: + if not isinstance(direct_area, str) or not direct_area: + invalid.add(device_id) + continue + parent_id = row.get("parent_device_id") + if parent_id is None: + continue + if not isinstance(parent_id, str) or not parent_id: + invalid.add(device_id) + continue + parent = devices_by_id.get(parent_id) + parent_row = _device_dict_repr(parent) if parent is not None else None + if parent_row is None or parent_row.get("parent_device_id") is not None: + invalid.add(device_id) + continue + parent_area = parent_row.get("area_id") + if parent_area is not None and ( + not isinstance(parent_area, str) or not parent_area + ): + invalid.add(device_id) + view._device_invalid_area_ids_cache = frozenset(invalid) + return view._device_invalid_area_ids_cache + + +def _effective_device_area_id(view: _RegistryView, device: Any) -> str | None: + """Return Core 2026.9's direct-or-parent effective device area.""" + devices_by_id = _unambiguous_device_entries(view) + device_row = _device_dict_repr(device) + if device_row is None: + return None + device_id = device_row.get("id") + if not isinstance(device_id, str) or not device_id: + return None + device = devices_by_id.get(device_id) + if device is None: + # Conflicting identities never contribute semantic placement. + return None + device_row = _device_dict_repr(device) + if device_row is None: + return None + direct_area = device_row.get("area_id") + if direct_area is not None: + return direct_area if isinstance(direct_area, str) and direct_area else None + parent_id = device_row.get("parent_device_id") + if not isinstance(parent_id, str) or not parent_id: + return None + parent = devices_by_id.get(parent_id) + parent_row = _device_dict_repr(parent) if parent is not None else None + if parent_row is None or parent_row.get("parent_device_id") is not None: + # Core requires a main-device parent. This also bounds malformed cycles. + return None + parent_area = parent_row.get("area_id") + return parent_area if isinstance(parent_area, str) and parent_area else None + + def _area_name(view: _RegistryView, area_id: str | None) -> str | None: if not area_id: return None @@ -2780,22 +2968,22 @@ def _overview_entity_registry(view: _RegistryView) -> list[dict[str, Any]]: def _overview_device_registry(view: _RegistryView) -> list[dict[str, Any]]: """Device registry as a bare list (id + area + labels + name/manufacturer/model).""" out: list[dict[str, Any]] = [] - reg = view.device - devices = getattr(reg, "devices", None) if reg is not None else None - values = _mapping_values(devices) - for dev in values: - dev_id = getattr(dev, "id", None) + for dev in _all_device_entries(view): + dev_row = _device_dict_repr(dev) + if dev_row is None: + continue + dev_id = dev_row.get("id") if not dev_id: continue out.append( { "id": dev_id, - "area_id": getattr(dev, "area_id", None), - "labels": sorted(str(x) for x in (getattr(dev, "labels", None) or [])), - "name": getattr(dev, "name", None), - "name_by_user": getattr(dev, "name_by_user", None), - "manufacturer": getattr(dev, "manufacturer", None), - "model": getattr(dev, "model", None), + "area_id": _effective_device_area_id(view, dev), + "labels": sorted(str(x) for x in (dev_row.get("labels") or [])), + "name": dev_row.get("name"), + "name_by_user": dev_row.get("name_by_user"), + "manufacturer": dev_row.get("manufacturer"), + "model": dev_row.get("model"), } ) return out @@ -3138,9 +3326,10 @@ _BlueprintLoader.add_multi_constructor("!", _drop_blueprint_tag) def _do_device_get(hass: HomeAssistant, params: dict[str, Any]) -> dict[str, Any]: """Return one device registry entry by id, optionally with its entities. - ``{device: | None}`` — ``registry.async_get(device_id)`` - is a pure O(1) in-memory dict read, and the emitted body is core's - ``DeviceEntry.dict_repr`` returned UNMODIFIED — exactly the shape + ``{device: | None}`` — a request-local snapshot over + Core's supported main and child collections rejects conflicting identities, + and the emitted body is core's ``DeviceEntry.dict_repr`` returned UNMODIFIED — + exactly the shape ``config/device_registry/list`` serializes (it sends ``json_bytes(entry.dict_repr)``), so a component-served record is byte-identical to one legacy list element by construction (the WS transport JSON-encodes the @@ -3157,15 +3346,25 @@ def _do_device_get(hass: HomeAssistant, params: dict[str, Any]) -> dict[str, Any to match what ``config/entity_registry/list`` returns (it lists disabled entities too). The DeviceEntry dict itself stays exactly the raw shape — the join is a sibling, so consumers keep their own transforms. The ``entities`` key is present - only when requested. + only when requested. A child-device result may also carry a sibling + ``effective_area_id`` computed from its direct-or-parent placement; that + transport-only field is absent from the raw ``device`` mapping. """ device_id = params.get("device_id") include_entities = params.get("include_entities", False) view = _resolve_registries(hass) - entry = _device(view, device_id) if device_id else None - result: dict[str, Any] = { - "device": _device_dict_repr(entry) if entry is not None else None - } + entry = _unambiguous_device_entries(view).get(device_id) if device_id else None + entry_row = _device_dict_repr(entry) if entry is not None else None + result: dict[str, Any] = {"device": entry_row} + if ( + entry is not None + and isinstance(entry_row, dict) + and isinstance(entry_row.get("parent_device_id"), str) + ): + # Additive internal transport metadata. The raw child ``dict_repr`` stays + # byte-identical to Core while the server can expose its existing area_id + # field using Core's effective placement without a whole-registry read. + result["effective_area_id"] = _effective_device_area_id(view, entry) if include_entities: result["entities"] = _device_entities(view, device_id) if device_id else [] return result @@ -3181,10 +3380,8 @@ def _do_device_list(hass: HomeAssistant, params: dict[str, Any]) -> dict[str, An than emitted as a partial record. """ view = _resolve_registries(hass) - reg = view.device - devices = getattr(reg, "devices", None) if reg is not None else None out: list[dict[str, Any]] = [] - for dev in _mapping_values(devices): + for dev in _all_device_entries(view): repr_dict = _device_dict_repr(dev) if repr_dict is not None: out.append(repr_dict) @@ -5028,6 +5225,16 @@ _ALLOWLIST_REGISTRY_EMPTY_WARNING = ( "this request (an allow_entity_ids list, if set, still applies) so the filter " "does not blank every entity." ) +_DEVICE_REGISTRY_CONFLICT_WARNING = ( + "Entity visibility filter is enabled with an area/label dimension but the " + "device registry contained conflicting identities; ambiguous device-derived " + "placement and labels were excluded." +) +_DEVICE_REGISTRY_INVALID_AREA_WARNING = ( + "Entity visibility filter is enabled with an area dimension but the device " + "registry contained invalid area relationships; affected device-derived " + "placement was excluded." +) class _AllowlistState(NamedTuple): @@ -5206,8 +5413,10 @@ def _visibility_warnings( Companion to :func:`_visibility_hidden_set`: the hidden-set function silently fails open on a degraded dimension (an unknown ``exclude_category``, an - area/label allowlist against an empty registry, or a requested-but-unavailable - Assist dimension), so this returns the operator-facing warnings the server's + area/label dimension against conflicting device identities, an area dimension + against invalid device ancestry, an area/label allowlist against an empty + registry, or a requested-but-unavailable Assist dimension), so this returns + the operator-facing warnings the server's ``load_hidden_set`` would emit for the same config. The ha_search consumer merges them into the response so the component fast path is no longer silent about incomplete filtering. Byte-identical to ``visibility.resolver``'s warning @@ -5225,6 +5434,19 @@ def _visibility_warnings( if unknown: warnings.append(_unknown_categories_warning(unknown)) + area_or_label_dimension_active = bool( + visibility.get("exclude_areas") + or visibility.get("exclude_labels") + or visibility.get("allow_areas") + or visibility.get("allow_labels") + ) + if area_or_label_dimension_active and _conflicting_device_ids(view): + warnings.append(_DEVICE_REGISTRY_CONFLICT_WARNING) + if ( + visibility.get("exclude_areas") or visibility.get("allow_areas") + ) and _invalid_device_area_ids(view): + warnings.append(_DEVICE_REGISTRY_INVALID_AREA_WARNING) + if inventory is None: inventory = _visibility_inventory(view, states, visibility) if inventory.allowlist.degraded: @@ -5352,14 +5574,14 @@ def _entity_allowed( def _effective_area_for_entry(view: _RegistryView, entry: Any) -> str | None: - """An entity's ``area_id`` falling back to its device's (HA area inheritance).""" + """Resolve entity direct area, then its device's direct-or-parent effective area.""" area_id = getattr(entry, "area_id", None) - if isinstance(area_id, str) and area_id: - return area_id + if area_id is not None: + return area_id if isinstance(area_id, str) and area_id else None device_id = getattr(entry, "device_id", None) if isinstance(device_id, str) and device_id: - dev = _device(view, device_id) - dev_area = getattr(dev, "area_id", None) if dev is not None else None + dev = _unambiguous_device_entries(view).get(device_id) + dev_area = _effective_device_area_id(view, dev) if dev is not None else None return dev_area if isinstance(dev_area, str) and dev_area else None return None @@ -5369,9 +5591,11 @@ def _effective_labels_for_entry(view: _RegistryView, entry: Any) -> set[str]: labels = set(getattr(entry, "labels", None) or []) device_id = getattr(entry, "device_id", None) if isinstance(device_id, str) and device_id: - dev = _device(view, device_id) + dev = _unambiguous_device_entries(view).get(device_id) if dev is not None: - labels |= set(getattr(dev, "labels", None) or []) + dev_row = _device_dict_repr(dev) + if dev_row is not None: + labels |= set(dev_row.get("labels") or []) return labels diff --git a/custom_components/my_music_library/api.py b/custom_components/my_music_library/api.py index 424c5290..fa83e560 100644 --- a/custom_components/my_music_library/api.py +++ b/custom_components/my_music_library/api.py @@ -408,6 +408,27 @@ def _normalize_recommendation_item(item: dict) -> dict: return _normalize_browse_item(item) +async def _get_recommendation_folder_items( + mass: Any, + provider: str, + item_id: str, +) -> list[Any]: + """Fetch the concrete items of one recommendation folder. + + ``music.recommendations()`` only returns the folder metadata (name, + provider, item_id) — MA's API works in two steps, and the actual content + of a folder requires a second call to "music/recommendations/items" + (server-side: RecommendationsController.get_recommendation_items). + There is no Python-client wrapper for it yet, so we call it directly via + ``send_command``. + """ + result = await asyncio.wait_for( + mass.send_command("music/recommendations/items", provider=provider, item_id=item_id), + timeout=10, + ) + return list(result) if not isinstance(result, list) else result + + async def _get_recommendations_via_ma_client( hass: HomeAssistant, ) -> list[dict] | None: @@ -439,59 +460,88 @@ async def _get_recommendations_via_ma_client( result = await asyncio.wait_for(rec_fn(**kwargs), timeout=10) folders = list(result) if not isinstance(result, list) else result _LOGGER.debug("Recommendations: %d folders", len(folders)) - normalized: list[dict] = [] - for folder in folders: - f = _to_json_safe(folder) - folder_domain = str(f.get("provider_domain") or f.get("provider", "") or "") - folder_instance = str( - f.get("provider_instance_id_or_domain") - or f.get("provider_instance") - or f.get("provider_instance_id") - or folder_domain + + safe_folders = [_to_json_safe(folder) for folder in folders] + + # A folder from music.recommendations() only carries metadata — + # its actual content needs one extra call per folder. Fetch them + # all in parallel, isolating failures so one slow/broken tiroir + # doesn't blank the others. + fetch_tasks = [ + _get_recommendation_folder_items( + mass, str(f.get("provider") or ""), str(f.get("item_id") or ""), ) - is_library_folder = folder_domain in ("library", "builtin", "") - items_raw = f.get("items") or [] - items_norm = [] - for i in items_raw: - i_safe = _to_json_safe(i) - if is_library_folder: - pm = i_safe.get("provider_mappings") or [] - if pm: - i_safe["provider_mappings"] = [ - m for m in pm - if (m.get("in_library") is True if isinstance(m, dict) else getattr(m, "in_library", True)) - ] or pm - item = _normalize_recommendation_item(i_safe) - if not is_library_folder: - if folder_instance and not item.get("provider_instances"): - item["provider_instances"] = [folder_instance] - if folder_domain and not item.get("providers"): - item["providers"] = [folder_domain] - items_norm.append(item) + for f in safe_folders + ] + items_results = await asyncio.gather(*fetch_tasks, return_exceptions=True) - # Infer folder provider from items when MA doesn't provide it - inferred_domain = folder_domain - inferred_instance = folder_instance - if is_library_folder and items_norm: - instance_counts: dict[str, int] = {} - for itm in items_norm: - for pi in itm.get("provider_instances") or []: - if pi and pi not in ("builtin", "library"): - instance_counts[pi] = instance_counts.get(pi, 0) + 1 - if instance_counts: - top_inst = max(instance_counts, key=instance_counts.get) # type: ignore[arg-type] - if instance_counts[top_inst] == len(items_norm): - inferred_instance = top_inst - inferred_domain = top_inst.split("--")[0] if "--" in top_inst else top_inst + normalized: list[dict] = [] + for f, items_result in zip(safe_folders, items_results): + try: + if isinstance(items_result, BaseException): + _LOGGER.warning( + "Recommendations: items fetch failed for folder %r (provider=%s, item_id=%s): %s", + f.get("name"), f.get("provider"), f.get("item_id"), items_result, + ) + items_raw = f.get("items") or [] + else: + items_raw = items_result or f.get("items") or [] - normalized.append({ - "folder_id": f.get("item_id") or f.get("path") or "", - "name": f.get("name") or f.get("label") or "", - "icon": f.get("icon") or "", - "provider_domain": inferred_domain, - "provider_instance": inferred_instance, - "items": items_norm, - }) + folder_domain = str(f.get("provider_domain") or f.get("provider", "") or "") + folder_instance = str( + f.get("provider_instance_id_or_domain") + or f.get("provider_instance") + or f.get("provider_instance_id") + or folder_domain + ) + is_library_folder = folder_domain in ("library", "builtin", "") + items_norm = [] + for i in items_raw: + i_safe = _to_json_safe(i) + if is_library_folder: + pm = i_safe.get("provider_mappings") or [] + if pm: + i_safe["provider_mappings"] = [ + m for m in pm + if (m.get("in_library") is True if isinstance(m, dict) else getattr(m, "in_library", True)) + ] or pm + item = _normalize_recommendation_item(i_safe) + if not is_library_folder: + if folder_instance and not item.get("provider_instances"): + item["provider_instances"] = [folder_instance] + if folder_domain and not item.get("providers"): + item["providers"] = [folder_domain] + items_norm.append(item) + + # Infer folder provider from items when MA doesn't provide it + inferred_domain = folder_domain + inferred_instance = folder_instance + if is_library_folder and items_norm: + instance_counts: dict[str, int] = {} + for itm in items_norm: + for pi in itm.get("provider_instances") or []: + if pi and pi not in ("builtin", "library"): + instance_counts[pi] = instance_counts.get(pi, 0) + 1 + if instance_counts: + top_inst = max(instance_counts, key=instance_counts.get) # type: ignore[arg-type] + if instance_counts[top_inst] == len(items_norm): + inferred_instance = top_inst + inferred_domain = top_inst.split("--")[0] if "--" in top_inst else top_inst + + normalized.append({ + "folder_id": f.get("item_id") or f.get("path") or "", + "name": f.get("name") or f.get("label") or "", + "icon": f.get("icon") or "", + "provider_domain": inferred_domain, + "provider_instance": inferred_instance, + "items": items_norm, + }) + except Exception as folder_err: # noqa: BLE001 + _LOGGER.warning( + "Recommendations: skipping folder %r due to processing error: %s", + f.get("name"), folder_err, + ) + continue return normalized except asyncio.TimeoutError: _LOGGER.warning("Recommendations fetch timed out") diff --git a/custom_components/my_music_library/manifest.json b/custom_components/my_music_library/manifest.json index a17ce954..fdb4b500 100644 --- a/custom_components/my_music_library/manifest.json +++ b/custom_components/my_music_library/manifest.json @@ -9,5 +9,5 @@ "iot_class": "local_push", "issue_tracker": "https://github.com/Patafoin/ha-my-music-library/issues", "requirements": [], - "version": "3.12.4" + "version": "3.12.5" } diff --git a/custom_components/my_music_library/www/my-music-library-card.js b/custom_components/my_music_library/www/my-music-library-card.js index 64162228..da7b62e2 100644 --- a/custom_components/my_music_library/www/my-music-library-card.js +++ b/custom_components/my_music_library/www/my-music-library-card.js @@ -5,7 +5,7 @@ * @version 1.0.0 */ -const CARD_VERSION = "3.12.4"; +const CARD_VERSION = "3.12.5"; /* ─── Icons (inline SVG strings) ─────────────────────────── */ const ICONS = { diff --git a/www/community/lovelace-mushroom/mushroom.js b/www/community/lovelace-mushroom/mushroom.js index 34b0e56d..5dc9595e 100644 --- a/www/community/lovelace-mushroom/mushroom.js +++ b/www/community/lovelace-mushroom/mushroom.js @@ -1,4 +1,4 @@ -var t,e,o,i,n,r,a,s,l,c,u,h,d,p,m,f,g,_,v,b,y,w,k,C,$,E,x,A,S,T,M,I,z,P,N,O,B,L,D,j,H,R,U,V,F,G,K,Y,q,W,X,Z,J,Q,tt,et,ot,it,nt,rt,at,st,lt,ct,ut,ht,dt,pt,mt,ft,gt=Object.create,_t=Object.defineProperty,vt=Object.getOwnPropertyDescriptor,bt=Object.getOwnPropertyNames,yt=Object.getPrototypeOf,wt=Object.prototype.hasOwnProperty,kt=(t,e)=>()=>(t&&(e=t(t=0)),e),Ct=(t,e)=>()=>(e||(t((e={exports:{}}).exports,e),t=null),e.exports),$t=(t,e)=>{let o={};for(var i in t)_t(o,i,{get:t[i],enumerable:!0});return e||_t(o,Symbol.toStringTag,{value:"Module"}),o},Et=(t,e,o)=>(o=null!=t?gt(yt(t)):{},((t,e,o,i)=>{if(e&&"object"==typeof e||"function"==typeof e)for(var n,r=bt(e),a=0,s=r.length;ae[t]).bind(null,n),enumerable:!(i=vt(e,n))||i.enumerable});return t})(!e&&t&&t.__esModule?o:_t(o,"default",{value:t,enumerable:!0}),t)),xt=/* @__PURE__ */(t=>"undefined"!=typeof require?require:"undefined"!=typeof Proxy?new Proxy(t,{get:(t,e)=>("undefined"!=typeof require?require:t)[e]}):t)(function(t){if("undefined"!=typeof require)return require.apply(this,arguments);throw Error('Calling `require` for "'+t+"\" in an environment that doesn't expose the `require` function. See https://rolldown.rs/in-depth/bundling-cjs#require-external-modules for more details.")}),At=kt(()=>{t="5.2.2",e={type:"git",url:"https://github.com/piitaya/lovelace-mushroom"}}),St=kt(()=>{o=globalThis,i=o.ShadowRoot&&(void 0===o.ShadyCSS||o.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,n=Symbol(),r=/* @__PURE__ */new WeakMap,a=class{constructor(t,e,o){if(this._$cssResult$=!0,o!==n)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o;const e=this.t;if(i&&void 0===t){const o=void 0!==e&&1===e.length;o&&(t=r.get(e)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),o&&r.set(e,t))}return t}toString(){return this.cssText}},s=t=>new a("string"==typeof t?t:t+"",void 0,n),l=(t,...e)=>new a(1===t.length?t[0]:e.reduce((e,o,i)=>e+(t=>{if(!0===t._$cssResult$)return t.cssText;if("number"==typeof t)return t;throw Error("Value passed to 'css' function must be a 'css' function result: "+t+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(o)+t[i+1],t[0]),t,n),c=(t,e)=>{if(i)t.adoptedStyleSheets=e.map(t=>t instanceof CSSStyleSheet?t:t.styleSheet);else for(const i of e){const e=document.createElement("style"),n=o.litNonce;void 0!==n&&e.setAttribute("nonce",n),e.textContent=i.cssText,t.appendChild(e)}},u=i?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e="";for(const o of t.cssRules)e+=o.cssText;return s(e)})(t):t}),Tt=kt(()=>{St(),({is:f,defineProperty:g,getOwnPropertyDescriptor:_,getOwnPropertyNames:v,getOwnPropertySymbols:b,getPrototypeOf:y}=Object),w=globalThis,k=w.trustedTypes,C=k?k.emptyScript:"",$=w.reactiveElementPolyfillSupport,E=(t,e)=>t,x={toAttribute(t,e){switch(e){case Boolean:t=t?C:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,e){let o=t;switch(e){case Boolean:o=null!==t;break;case Number:o=null===t?null:Number(t);break;case Object:case Array:try{o=JSON.parse(t)}catch(t){o=null}}return o}},A=(t,e)=>!f(t,e),S={attribute:!0,type:String,converter:x,reflect:!1,useDefault:!1,hasChanged:A},null!==(d=(h=Symbol).metadata)&&void 0!==d||(h.metadata=Symbol("metadata")),null!==(p=w.litPropertyMetadata)&&void 0!==p||(w.litPropertyMetadata=/* @__PURE__ */new WeakMap),T=class extends HTMLElement{static addInitializer(t){var e;this._$Ei(),(null!==(e=this.l)&&void 0!==e?e:this.l=[]).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,e=S){if(e.state&&(e.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(t)&&((e=Object.create(e)).wrapped=!0),this.elementProperties.set(t,e),!e.noAccessor){const o=Symbol(),i=this.getPropertyDescriptor(t,o,e);void 0!==i&&g(this.prototype,t,i)}}static getPropertyDescriptor(t,e,o){var i;const{get:n,set:r}=null!==(i=_(this.prototype,t))&&void 0!==i?i:{get(){return this[e]},set(t){this[e]=t}};return{get:n,set(e){const i=null==n?void 0:n.call(this);null==r||r.call(this,e),this.requestUpdate(t,i,o)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){var e;return null!==(e=this.elementProperties.get(t))&&void 0!==e?e:S}static _$Ei(){if(this.hasOwnProperty(E("elementProperties")))return;const t=y(this);t.finalize(),void 0!==t.l&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(E("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(E("properties"))){const t=this.properties,e=[...v(t),...b(t)];for(const o of e)this.createProperty(o,t[o])}const t=this[Symbol.metadata];if(null!==t){const e=litPropertyMetadata.get(t);if(void 0!==e)for(const[t,o]of e)this.elementProperties.set(t,o)}this._$Eh=/* @__PURE__ */new Map;for(const[e,o]of this.elementProperties){const t=this._$Eu(e,o);void 0!==t&&this._$Eh.set(t,e)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const o=new Set(t.flat(1/0).reverse());for(const t of o)e.unshift(u(t))}else void 0!==t&&e.push(u(t));return e}static _$Eu(t,e){const o=e.attribute;return!1===o?void 0:"string"==typeof o?o:"string"==typeof t?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){var t;this._$ES=new Promise(t=>this.enableUpdating=t),this._$AL=/* @__PURE__ */new Map,this._$E_(),this.requestUpdate(),null===(t=this.constructor.l)||void 0===t||t.forEach(t=>t(this))}addController(t){var e,o;(null!==(e=this._$EO)&&void 0!==e?e:this._$EO=/* @__PURE__ */new Set).add(t),void 0!==this.renderRoot&&this.isConnected&&(null===(o=t.hostConnected)||void 0===o||o.call(t))}removeController(t){var e;null===(e=this._$EO)||void 0===e||e.delete(t)}_$E_(){const t=/* @__PURE__ */new Map,e=this.constructor.elementProperties;for(const o of e.keys())this.hasOwnProperty(o)&&(t.set(o,this[o]),delete this[o]);t.size>0&&(this._$Ep=t)}createRenderRoot(){var t;const e=null!==(t=this.shadowRoot)&&void 0!==t?t:this.attachShadow(this.constructor.shadowRootOptions);return c(e,this.constructor.elementStyles),e}connectedCallback(){var t,e;null!==(t=this.renderRoot)&&void 0!==t||(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),null===(e=this._$EO)||void 0===e||e.forEach(t=>{var e;return null===(e=t.hostConnected)||void 0===e?void 0:e.call(t)})}enableUpdating(t){}disconnectedCallback(){var t;null===(t=this._$EO)||void 0===t||t.forEach(t=>{var e;return null===(e=t.hostDisconnected)||void 0===e?void 0:e.call(t)})}attributeChangedCallback(t,e,o){this._$AK(t,o)}_$ET(t,e){const o=this.constructor.elementProperties.get(t),i=this.constructor._$Eu(t,o);if(void 0!==i&&!0===o.reflect){var n;const r=(void 0!==(null===(n=o.converter)||void 0===n?void 0:n.toAttribute)?o.converter:x).toAttribute(e,o.type);this._$Em=t,null==r?this.removeAttribute(i):this.setAttribute(i,r),this._$Em=null}}_$AK(t,e){const o=this.constructor,i=o._$Eh.get(t);if(void 0!==i&&this._$Em!==i){var n,r,a;const t=o.getPropertyOptions(i),s="function"==typeof t.converter?{fromAttribute:t.converter}:void 0!==(null===(n=t.converter)||void 0===n?void 0:n.fromAttribute)?t.converter:x;this._$Em=i;const l=s.fromAttribute(e,t.type);this[i]=null!==(r=null!=l?l:null===(a=this._$Ej)||void 0===a?void 0:a.get(i))&&void 0!==r?r:l,this._$Em=null}}requestUpdate(t,e,o){if(void 0!==t){var i,n,r;const a=this.constructor,s=this[t];if(null!==(i=o)&&void 0!==i||(o=a.getPropertyOptions(t)),!((null!==(n=o.hasChanged)&&void 0!==n?n:A)(s,e)||o.useDefault&&o.reflect&&s===(null===(r=this._$Ej)||void 0===r?void 0:r.get(t))&&!this.hasAttribute(a._$Eu(t,o))))return;this.C(t,e,o)}!1===this.isUpdatePending&&(this._$ES=this._$EP())}C(t,e,{useDefault:o,reflect:i,wrapped:n},r){var a,s,l;o&&!(null!==(a=this._$Ej)&&void 0!==a?a:this._$Ej=/* @__PURE__ */new Map).has(t)&&(this._$Ej.set(t,null!==(s=null!=r?r:e)&&void 0!==s?s:this[t]),!0!==n||void 0!==r)||(this._$AL.has(t)||(this.hasUpdated||o||(e=void 0),this._$AL.set(t,e)),!0===i&&this._$Em!==t&&(null!==(l=this._$Eq)&&void 0!==l?l:this._$Eq=/* @__PURE__ */new Set).add(t))}async _$EP(){var t=this;t.isUpdatePending=!0;try{await t._$ES}catch(e){Promise.reject(e)}const e=t.scheduleUpdate();return null!=e&&await e,!t.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){var t;if(null!==(t=this.renderRoot)&&void 0!==t||(this.renderRoot=this.createRenderRoot()),this._$Ep){for(const[t,e]of this._$Ep)this[t]=e;this._$Ep=void 0}const e=this.constructor.elementProperties;if(e.size>0)for(const[t,o]of e){const{wrapped:e}=o,i=this[t];!0!==e||this._$AL.has(t)||void 0===i||this.C(t,void 0,o,i)}}let e=!1;const o=this._$AL;try{var i;e=this.shouldUpdate(o),e?(this.willUpdate(o),null===(i=this._$EO)||void 0===i||i.forEach(t=>{var e;return null===(e=t.hostUpdate)||void 0===e?void 0:e.call(t)}),this.update(o)):this._$EM()}catch(o){throw e=!1,this._$EM(),o}e&&this._$AE(o)}willUpdate(t){}_$AE(t){var e;null===(e=this._$EO)||void 0===e||e.forEach(t=>{var e;return null===(e=t.hostUpdated)||void 0===e?void 0:e.call(t)}),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EM(){this._$AL=/* @__PURE__ */new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Eq&&(this._$Eq=this._$Eq.forEach(t=>this._$ET(t,this[t]))),this._$EM()}updated(t){}firstUpdated(t){}},T.elementStyles=[],T.shadowRootOptions={mode:"open"},T[E("elementProperties")]=/* @__PURE__ */new Map,T[E("finalized")]=/* @__PURE__ */new Map,null==$||$({ReactiveElement:T}),(null!==(m=w.reactiveElementVersions)&&void 0!==m?m:w.reactiveElementVersions=[]).push("2.1.1")});function Mt(t,e){if(!R(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==P?P.createHTML(e):e}function It(t,e,o=t,i){var n,r,a;if(e===tt)return e;let s=void 0!==i?null===(n=o._$Co)||void 0===n?void 0:n[i]:o._$Cl;const l=H(e)?void 0:e._$litDirective$;return(null==s?void 0:s.constructor)!==l&&(null==s||null===(r=s._$AO)||void 0===r||r.call(s,!1),void 0===l?s=void 0:(s=new l(t),s._$AT(t,o,i)),void 0!==i?(null!==(a=o._$Co)&&void 0!==a?a:o._$Co=[])[i]=s:o._$Cl=s),void 0!==s&&(e=It(t,s._$AS(t,e.values),s,i)),e}var zt,Pt,Nt,Ot,Bt,Lt,Dt,jt,Ht=kt(()=>{I=globalThis,z=I.trustedTypes,P=z?z.createPolicy("lit-html",{createHTML:t=>t}):void 0,N="$lit$",O=`lit$${Math.random().toFixed(9).slice(2)}$`,L=`<${B="?"+O}>`,D=document,j=()=>D.createComment(""),H=t=>null===t||"object"!=typeof t&&"function"!=typeof t,R=Array.isArray,U=t=>R(t)||"function"==typeof(null==t?void 0:t[Symbol.iterator]),V="[ \t\n\f\r]",F=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,G=/-->/g,K=/>/g,Y=RegExp(`>|${V}(?:([^\\s"'>=/]+)(${V}*=${V}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),q=/'/g,W=/"/g,X=/^(?:script|style|textarea|title)$/i,Z=t=>(e,...o)=>({_$litType$:t,strings:e,values:o}),J=Z(1),Q=Z(2),Z(3),tt=Symbol.for("lit-noChange"),et=Symbol.for("lit-nothing"),ot=/* @__PURE__ */new WeakMap,it=D.createTreeWalker(D,129),nt=(t,e)=>{const o=t.length-1,i=[];let n,r=2===e?"":3===e?"":"",a=F;for(let l=0;l"===c[0]?(a=null!==(s=n)&&void 0!==s?s:F,u=-1):void 0===c[1]?u=-2:(u=a.lastIndex-c[2].length,o=c[1],a=void 0===c[3]?Y:'"'===c[3]?W:q):a===W||a===q?a=Y:a===G||a===K?a=F:(a=Y,n=void 0);const d=a===Y&&t[l+1].startsWith("/>")?" ":"";r+=a===F?e+L:u>=0?(i.push(o),e.slice(0,u)+N+e.slice(u)+O+d):e+O+(-2===u?l:d)}return[Mt(t,r+(t[o]||"")+(2===e?"":3===e?"":"")),i]},rt=class t{constructor({strings:e,_$litType$:o},i){let n;this.parts=[];let r=0,a=0;const s=e.length-1,l=this.parts,[c,u]=nt(e,o);if(this.el=t.createElement(c,i),it.currentNode=this.el.content,2===o||3===o){const t=this.el.content.firstChild;t.replaceWith(...t.childNodes)}for(;null!==(n=it.nextNode())&&l.length0){n.textContent=z?z.emptyScript:"";for(let o=0;o2||""!==o[0]||""!==o[1]?(this._$AH=Array(o.length-1).fill(/* @__PURE__ */new String),this.strings=o):this._$AH=et}_$AI(t,e=this,o,i){const n=this.strings;let r=!1;if(void 0===n)t=It(this,t,e,0),r=!H(t)||t!==this._$AH&&t!==tt,r&&(this._$AH=t);else{var a;const i=t;let s,l;for(t=n[0],s=0;s{var i;const n=null!==(i=null==o?void 0:o.renderBefore)&&void 0!==i?i:e;let r=n._$litPart$;if(void 0===r){var a;const t=null!==(a=null==o?void 0:o.renderBefore)&&void 0!==a?a:null;n._$litPart$=r=new st(e.insertBefore(j(),t),t,void 0,null!=o?o:{})}return r._$AI(t),r}}),Rt=kt(()=>{Tt(),Tt(),Ht(),Ht(),Nt=globalThis,Ot=class extends T{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var t,e;const o=super.createRenderRoot();return null!==(e=(t=this.renderOptions).renderBefore)&&void 0!==e||(t.renderBefore=o.firstChild),o}update(t){const e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=ft(e,this.renderRoot,this.renderOptions)}connectedCallback(){var t;super.connectedCallback(),null===(t=this._$Do)||void 0===t||t.setConnected(!0)}disconnectedCallback(){var t;super.disconnectedCallback(),null===(t=this._$Do)||void 0===t||t.setConnected(!1)}render(){return tt}},Ot._$litElement$=!0,Ot.finalized=!0,null===(zt=Nt.litElementHydrateSupport)||void 0===zt||zt.call(Nt,{LitElement:Ot}),null==(Bt=Nt.litElementPolyfillSupport)||Bt({LitElement:Ot}),(null!==(Pt=Nt.litElementVersions)&&void 0!==Pt?Pt:Nt.litElementVersions=[]).push("4.2.1")}),Ut=kt(()=>{}),Vt=kt(()=>{Tt(),Ht(),Rt(),Ut()}),Ft=kt(()=>{Lt=t=>(e,o)=>{void 0!==o?o.addInitializer(()=>{customElements.define(t,e)}):customElements.define(t,e)}});function Gt(t){return(e,o)=>"object"==typeof o?jt(t,e,o):((t,e,o)=>{const i=e.hasOwnProperty(o);return e.constructor.createProperty(o,t),i?Object.getOwnPropertyDescriptor(e,o):void 0})(t,e,o)}var Kt=kt(()=>{Tt(),Dt={attribute:!0,type:String,converter:x,reflect:!1,hasChanged:A},jt=(t=Dt,e,o)=>{const{kind:i,metadata:n}=o;let r=globalThis.litPropertyMetadata.get(n);if(void 0===r&&globalThis.litPropertyMetadata.set(n,r=/* @__PURE__ */new Map),"setter"===i&&((t=Object.create(t)).wrapped=!0),r.set(o.name,t),"accessor"===i){const{name:i}=o;return{set(o){const n=e.get.call(this);e.set.call(this,o),this.requestUpdate(i,n,t)},init(e){return void 0!==e&&this.C(i,void 0,t,e),e}}}if("setter"===i){const{name:i}=o;return function(o){const n=this[i];e.call(this,o),this.requestUpdate(i,n,t)}}throw Error("Unsupported decorator location: "+i)}});function Yt(t){return Yt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Yt(t)}var qt=kt(()=>{});var Wt=kt(()=>{qt()});function Xt(t){var e=function(t,e){if("object"!=Yt(t)||!t)return t;var o=t[Symbol.toPrimitive];if(void 0!==o){var i=o.call(t,e||"default");if("object"!=Yt(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==Yt(e)?e:e+""}var Zt=kt(()=>{qt(),Wt()});function Jt(t,e,o){return(e=Xt(e))in t?Object.defineProperty(t,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[e]=o,t}var Qt=kt(()=>{Zt()});function te(t,e){var o=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),o.push.apply(o,i)}return o}function ee(t){for(var e=1;e{Qt()});function ie(t){return Gt(ee(ee({},t),{},{state:!0,attribute:!1}))}var ne,re=kt(()=>{Kt(),oe()}),ae=kt(()=>{}),se=kt(()=>{ne=(t,e,o)=>(o.configurable=!0,o.enumerable=!0,Reflect.decorate&&"object"!=typeof e&&Object.defineProperty(t,e,o),o)});function le(t,e){return(o,i,n)=>{const r=e=>{var o,i;return null!==(o=null===(i=e.renderRoot)||void 0===i?void 0:i.querySelector(t))&&void 0!==o?o:null};if(e){const{get:t,set:e}="object"==typeof i?o:null!=n?n:(()=>{const t=Symbol();return{get(){return this[t]},set(e){this[t]=e}}})();return ne(o,i,{get(){let o=t.call(this);return void 0===o&&(o=r(this),(null!==o||this.hasUpdated)&&e.call(this,o)),o}})}return ne(o,i,{get(){return r(this)}})}}var ce,ue,he,de,pe,me,fe,ge,_e,ve,be,ye,we,ke,Ce,$e,Ee,xe,Ae,Se,Te,Me,Ie=kt(()=>{se()}),ze=kt(()=>{}),Pe=kt(()=>{}),Ne=kt(()=>{}),Oe=kt(()=>{}),Be=kt(()=>{Ft(),Kt(),re(),ae(),Ie(),ze(),Pe(),Ne(),Oe()}),Le=kt(()=>{ce={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},ue=t=>(...e)=>({_$litDirective$:t,values:e}),he=class{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,e,o){this._$Ct=t,this._$AM=e,this._$Ci=o}_$AS(t,e){return this.update(t,e)}update(t,e){return this.render(...e)}}}),De=kt(()=>{Ht(),Le(),de=ue(class extends he{constructor(t){var e;if(super(t),t.type!==ce.ATTRIBUTE||"class"!==t.name||(null===(e=t.strings)||void 0===e?void 0:e.length)>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(t){return" "+Object.keys(t).filter(e=>t[e]).join(" ")+" "}update(t,[e]){if(void 0===this.st){var o;this.st=/* @__PURE__ */new Set,void 0!==t.strings&&(this.nt=new Set(t.strings.join(" ").split(/\s/).filter(t=>""!==t)));for(const t in e)e[t]&&!(null===(o=this.nt)||void 0===o?void 0:o.has(t))&&this.st.add(t);return this.render(e)}const i=t.element.classList;for(const r of this.st)r in e||(i.remove(r),this.st.delete(r));for(const r in e){var n;const t=!!e[r];t===this.st.has(r)||null!==(n=this.nt)&&void 0!==n&&n.has(r)||(t?(i.add(r),this.st.add(r)):(i.remove(r),this.st.delete(r)))}return tt}})}),je=kt(()=>{De()}),He=kt(()=>{Ht(),Le(),me=" !"+(pe="important"),fe=ue(class extends he{constructor(t){var e;if(super(t),t.type!==ce.ATTRIBUTE||"style"!==t.name||(null===(e=t.strings)||void 0===e?void 0:e.length)>2)throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.")}render(t){return Object.keys(t).reduce((e,o)=>{const i=t[o];return null==i?e:e+`${o=o.includes("-")?o:o.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase()}:${i};`},"")}update(t,[e]){const{style:o}=t.element;if(void 0===this.ft)return this.ft=new Set(Object.keys(e)),this.render(e);for(const i of this.ft)null==e[i]&&(this.ft.delete(i),i.includes("-")?o.removeProperty(i):o[i]=null);for(const i in e){const t=e[i];if(null!=t){this.ft.add(i);const e="string"==typeof t&&t.endsWith(me);i.includes("-")||e?o.setProperty(i,e?t.slice(0,-11):t,e?pe:""):o[i]=t}}return tt}})}),Re=kt(()=>{He()}),Ue=kt(()=>{ge=(t,e,o,i)=>{const[n,r,a]=t.split(".",3);return Number(n)>e||Number(n)===e&&(void 0===i?Number(r)>=o:Number(r)>o||Number(r)===o&&Number(a)>=i)}}),Ve=kt(()=>{_e=new Set(["fan","input_boolean","light","switch","group","automation","humidifier","valve"])}),Fe=kt(()=>{ve=(t,e,o,i)=>{i=i||{},o=null==o?{}:o;const n=new Event(e,{bubbles:void 0===i.bubbles||i.bubbles,cancelable:Boolean(i.cancelable),composed:void 0===i.composed||i.composed});return n.detail=o,t.dispatchEvent(n),n}}),Ge=kt(()=>{0}),Ke=kt(()=>{Ge(),"ha-main-window"===window.name?window:"ha-main-window"===parent.name?parent:top}),Ye=kt(()=>{be=t=>t.substr(0,t.indexOf("."))}),qe=kt(()=>{Ye(),ye=t=>be(t.entity_id)}),We=kt(()=>{we=(t,e)=>ke(t.attributes,e),ke=(t,e)=>0!==(t.supported_features&e)}),Xe=kt(()=>{Ce=(t,e,o)=>Math.min(Math.max(t,e),o),$e=(t,e,o)=>{let i;return i=e?Math.max(t,e):t,i=o?Math.min(i,o):i,i}}),Ze=kt(()=>{Ee=/* @__PURE__ */function(t){return t.language="language",t.system="system",t.comma_decimal="comma_decimal",t.decimal_comma="decimal_comma",t.space_comma="space_comma",t.none="none",t}({})}),Je=kt(()=>{xe=(t,e=2)=>Math.round(t*10**e)/10**e}),Qe=kt(()=>{Ze(),Je(),oe(),Ae=t=>{switch(t.number_format){case Ee.comma_decimal:return["en-US","en"];case Ee.decimal_comma:return["de","es","it"];case Ee.space_comma:return["fr","sv","cs"];case Ee.system:return;default:return t.language}},Se=(t,e,o)=>{const i=e?Ae(e):void 0;if(Number.isNaN=Number.isNaN||function t(e){return"number"==typeof e&&t(e)},(null==e?void 0:e.number_format)!==Ee.none&&!Number.isNaN(Number(t))&&Intl)try{return new Intl.NumberFormat(i,Me(t,o)).format(Number(t))}catch(n){return console.error(n),new Intl.NumberFormat(void 0,Me(t,o)).format(Number(t))}return"string"==typeof t?t:`${xe(t,null==o?void 0:o.maximumFractionDigits).toString()}${"currency"===(null==o?void 0:o.style)?` ${o.currency}`:""}`},Te=(t,e)=>{var o;const i=null==e?void 0:e.display_precision;return null!=i?{maximumFractionDigits:i,minimumFractionDigits:i}:Number.isInteger(Number(null===(o=t.attributes)||void 0===o?void 0:o.step))&&Number.isInteger(Number(t.state))?{maximumFractionDigits:0}:null!=t.attributes.step?{maximumFractionDigits:Math.ceil(Math.log10(1/t.attributes.step))}:void 0},Me=(t,e)=>{const o=ee({maximumFractionDigits:2},e);if("string"!=typeof t)return o;if(!e||void 0===e.minimumFractionDigits&&void 0===e.maximumFractionDigits){const e=t.indexOf(".")>-1?t.split(".")[1].length:0;o.minimumFractionDigits=e,o.maximumFractionDigits=e}return o}});var to=kt(()=>{});var eo,oo,io,no=kt(()=>{to()});function ro(t){return"object"==typeof t&&null!=t}function ao(t){return ro(t)&&!Array.isArray(t)}function so(t){return"symbol"==typeof t?t.toString():"string"==typeof t?JSON.stringify(t):`${t}`}function lo(t,e,o,i){if(!0===t)return;!1===t?t={}:"string"==typeof t&&(t={message:t});const{path:n,branch:r}=e,{type:a}=o,{refinement:s,message:l=`Expected a value of type \`${a}\`${s?` with refinement \`${s}\``:""}, but received: \`${so(i)}\``}=t;return ee(ee({value:i,type:a,refinement:s,key:n[n.length-1],path:n,branch:r},t),{},{message:l})}function*co(t,e,o,i){(function(t){return ro(t)&&"function"==typeof t[Symbol.iterator]})(t)||(t=[t]);for(const n of t){const t=lo(n,e,o,i);t&&(yield t)}}function*uo(t,e,o={}){const{path:i=[],branch:n=[t],coerce:r=!1,mask:a=!1}=o,s={path:i,branch:n,mask:a};r&&(t=e.coercer(t,s));let l="valid";for(const c of e.validator(t,s))c.explanation=o.message,l="not_valid",yield[c,void 0];for(let[c,u,h]of e.entries(t,s)){const e=uo(u,h,{path:void 0===c?i:[...i,c],branch:void 0===c?n:[...n,u],coerce:r,mask:a,message:o.message});for(const o of e)o[0]?(l=null!=o[0].refinement?"not_refined":"not_valid",yield[o[0],void 0]):r&&(u=o[1],void 0===c?t=u:t instanceof Map?t.set(c,u):t instanceof Set?t.add(u):ro(t)&&(void 0!==u||c in t)&&(t[c]=u))}if("not_valid"!==l)for(const c of e.refiner(t,s))c.explanation=o.message,l="not_refined",yield[c,void 0];"valid"===l&&(yield[void 0,t])}function ho(t,e,o){const i=po(t,e,{message:o});if(i[0])throw i[0]}function po(t,e,o={}){const i=uo(t,e,o),n=function(t){const{done:e,value:o}=t.next();return e?void 0:o}(i);return n[0]?[new oo(n[0],function*(){for(const t of i)t[0]&&(yield t[0])}),void 0]:[void 0,n[1]]}function mo(...t){const e="type"===t[0].type,o=t.map(t=>t.schema),i=Object.assign({},...o);return e?xo(i):Co(i)}function fo(t,e){return new io({type:t,schema:null,validator:e})}function go(t){return new io({type:"dynamic",schema:null,*entries(e,o){yield*t(e,o).entries(e,o)},validator:(e,o)=>t(e,o).validator(e,o),coercer:(e,o)=>t(e,o).coercer(e,o),refiner:(e,o)=>t(e,o).refiner(e,o)})}function _o(){return fo("any",()=>!0)}function vo(t){return new io({type:"array",schema:t,*entries(e){if(t&&Array.isArray(e))for(const[o,i]of e.entries())yield[o,i,t]},coercer:t=>Array.isArray(t)?t.slice():t,validator:t=>Array.isArray(t)||`Expected an array value, but received: ${so(t)}`})}function bo(){return fo("boolean",t=>"boolean"==typeof t)}function yo(t){const e={},o=t.map(t=>so(t)).join();for(const i of t)e[i]=i;return new io({type:"enums",schema:e,validator:e=>t.includes(e)||`Expected one of \`${o}\`, but received: ${so(e)}`})}function wo(t){const e=so(t),o=typeof t;return new io({type:"literal",schema:"string"===o||"number"===o||"boolean"===o?t:null,validator:o=>o===t||`Expected the literal \`${e}\`, but received: ${so(o)}`})}function ko(){return fo("number",t=>"number"==typeof t&&!isNaN(t)||`Expected a number, but received: ${so(t)}`)}function Co(t){const e=t?Object.keys(t):[],o=fo("never",()=>!1);return new io({type:"object",schema:t||null,*entries(i){if(t&&ro(i)){const n=new Set(Object.keys(i));for(const o of e)n.delete(o),yield[o,i[o],t[o]];for(const t of n)yield[t,i[t],o]}},validator:t=>ao(t)||`Expected an object, but received: ${so(t)}`,coercer(e,o){if(!ao(e))return e;const i=ee({},e);if(o.mask&&t)for(const n in i)void 0===t[n]&&delete i[n];return i}})}function $o(t){return new io(ee(ee({},t),{},{validator:(e,o)=>void 0===e||t.validator(e,o),refiner:(e,o)=>void 0===e||t.refiner(e,o)}))}function Eo(){return fo("string",t=>"string"==typeof t||`Expected a string, but received: ${so(t)}`)}function xo(t){const e=Object.keys(t);return new io({type:"type",schema:t,*entries(o){if(ro(o))for(const i of e)yield[i,o[i],t[i]]},validator:t=>ao(t)||`Expected an object, but received: ${so(t)}`,coercer:t=>ao(t)?ee({},t):t})}function Ao(t){const e=t.map(t=>t.type).join(" | ");return new io({type:"union",schema:null,coercer(e,o){for(const i of t){const[t,n]=i.validate(e,{coerce:!0,mask:o.mask});if(!t)return n}return e},validator(o,i){const n=[];for(const e of t){const[...t]=uo(o,e,i),[r]=t;if(!r[0])return[];for(const[e]of t)e&&n.push(e)}return[`Expected the value to satisfy a union of \`${e}\`, but received: ${so(o)}`,...n]}})}var So,To=kt(()=>{no(),oe(),eo=["message","explanation"],oo=class extends TypeError{constructor(t,e){let o;const{message:i,explanation:n}=t,r=function(t,e){if(null==t)return{};var o,i,n=function(t,e){if(null==t)return{};var o={};for(var i in t)if({}.hasOwnProperty.call(t,i)){if(e.includes(i))continue;o[i]=t[i]}return o}(t,e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);for(i=0;i{var i;return null!==(i=o)&&void 0!==i?i:o=[t,...e()]}}},io=class{constructor(t){const{type:e,schema:o,validator:i,refiner:n,coercer:r=t=>t,entries:a=function*(){}}=t;this.type=e,this.schema=o,this.entries=a,this.coercer=r,this.validator=i?(t,e)=>co(i(t,e),e,this,t):()=>[],this.refiner=n?(t,e)=>co(n(t,e),e,this,t):()=>[]}assert(t,e){return ho(t,this,e)}create(t,e){return function(t,e,o){const i=po(t,e,{coerce:!0,message:o});if(i[0])throw i[0];return i[1]}(t,this,e)}is(t){return function(t,e){return!po(t,e)[0]}(t,this)}mask(t,e){return function(t,e,o){const i=po(t,e,{coerce:!0,mask:!0,message:o});if(i[0])throw i[0];return i[1]}(t,this,e)}validate(t,e={}){return po(t,this,e)}}}),Mo=kt(()=>{To(),So=(t,e)=>{if(!(e instanceof oo))return{warnings:[e.message],errors:void 0};const o=[],i=[];for(const n of e.failures())if(void 0===n.value)o.push(t.localize("ui.errors.config.key_missing","key",n.path.join(".")));else if("never"===n.type)i.push(t.localize("ui.errors.config.key_not_expected","key",n.path.join(".")));else{if("union"===n.type)continue;"enums"===n.type?i.push(t.localize("ui.errors.config.key_wrong_type","key",n.path.join("."),"type_correct",n.message.replace("Expected ","").split(", ")[0],"type_wrong",JSON.stringify(n.value))):i.push(t.localize("ui.errors.config.key_wrong_type","key",n.path.join("."),"type_correct",n.refinement||n.type,"type_wrong",JSON.stringify(n.value)))}return{warnings:i,errors:o}}}),Io=kt(()=>{});function zo(t){const e=t.language||"en";return t.translationMetadata.translations[e]&&t.translationMetadata.translations[e].isRTL||!1}var Po,No,Oo,Bo,Lo,Do=kt(()=>{}),jo=kt(()=>{Po=(t,e,o=!1)=>{let i;const n=(...n)=>{const r=o&&!i;clearTimeout(i),i=window.setTimeout(()=>{i=void 0,o||t(...n)},e),r&&t(...n)};return n.cancel=()=>{clearTimeout(i)},n}}),Ho=kt(()=>{No=(t,e)=>{if(t===e)return!0;if(t&&e&&"object"==typeof t&&"object"==typeof e){if(t.constructor!==e.constructor)return!1;let o,i;if(Array.isArray(t)){if(i=t.length,i!==e.length)return!1;for(o=i;0!==o--;)if(!No(t[o],e[o]))return!1;return!0}if(t instanceof Map&&e instanceof Map){if(t.size!==e.size)return!1;for(o of t.entries())if(!e.has(o[0]))return!1;for(o of t.entries())if(!No(o[1],e.get(o[0])))return!1;return!0}if(t instanceof Set&&e instanceof Set){if(t.size!==e.size)return!1;for(o of t.entries())if(!e.has(o[0]))return!1;return!0}if(ArrayBuffer.isView(t)&&ArrayBuffer.isView(e)){if(i=t.length,i!==e.length)return!1;for(o=i;0!==o--;)if(t[o]!==e[o])return!1;return!0}if(t.constructor===RegExp)return t.source===e.source&&t.flags===e.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===e.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===e.toString();const n=Object.keys(t);if(i=n.length,i!==Object.keys(e).length)return!1;for(o=i;0!==o--;)if(!Object.prototype.hasOwnProperty.call(e,n[o]))return!1;for(o=i;0!==o--;){const i=n[o];if(!No(t[i],e[i]))return!1}return!0}return t!=t&&e!=e}}),Ro=kt(()=>{}),Uo=kt(()=>{Oo={auto:1,heat_cool:2,heat:3,cool:4,dry:5,fan_only:6,off:7},Bo=(t,e)=>Oo[t]-Oo[e],Lo=/* @__PURE__ */function(t){return t[t.TARGET_TEMPERATURE=1]="TARGET_TEMPERATURE",t[t.TARGET_TEMPERATURE_RANGE=2]="TARGET_TEMPERATURE_RANGE",t[t.TARGET_HUMIDITY=4]="TARGET_HUMIDITY",t[t.FAN_MODE=8]="FAN_MODE",t[t.PRESET_MODE=16]="PRESET_MODE",t[t.SWING_MODE=32]="SWING_MODE",t[t.AUX_HEAT=64]="AUX_HEAT",t[t.TURN_OFF=128]="TURN_OFF",t[t.TURN_ON=256]="TURN_ON",t[t.SWING_HORIZONTAL_MODE=512]="SWING_HORIZONTAL_MODE",t}({})});var Vo,Fo,Go,Ko=kt(()=>{});function Yo(t){const e=be(t.entity_id),o=t.state;if(["button","input_button","scene"].includes(e))return o!==Vo;if(Go.includes(o))return!1;switch(e){case"cover":case"valve":return!["closed","closing"].includes(o);case"device_tracker":case"person":return"not_home"!==o;case"media_player":return"standby"!==o;case"vacuum":return!["idle","docked","paused"].includes(o);case"plant":return"problem"===o;default:return!0}}function qo(t){return t.state!==Vo}function Wo(t){return"off"===t.state}function Xo(t){return t.attributes.entity_picture_local||t.attributes.entity_picture}var Zo,Jo,Qo,ti,ei,oi,ii,ni,ri,ai,si,li=kt(()=>{Ye(),Go=[Vo="unavailable",Fo="unknown","off"]}),ci=kt(()=>{}),ui=kt(()=>{}),hi=kt(()=>{}),di=kt(()=>{Jo=[(Zo=/* @__PURE__ */function(t){return t.UNKNOWN="unknown",t.ONOFF="onoff",t.BRIGHTNESS="brightness",t.COLOR_TEMP="color_temp",t.HS="hs",t.XY="xy",t.RGB="rgb",t.RGBW="rgbw",t.RGBWW="rgbww",t.WHITE="white",t}({})).HS,Zo.XY,Zo.RGB,Zo.RGBW,Zo.RGBWW],Qo=[...Jo,Zo.COLOR_TEMP,Zo.BRIGHTNESS,Zo.WHITE],ti=t=>{var e;return(null===(e=t.attributes.supported_color_modes)||void 0===e?void 0:e.some(t=>Jo.includes(t)))||!1},ei=t=>{var e;return(null===(e=t.attributes.supported_color_modes)||void 0===e?void 0:e.some(t=>Qo.includes(t)))||!1}}),pi=kt(()=>{oi="locked",ii="locking",ni="unlocked",ri="unlocking"}),mi=kt(()=>{}),fi=kt(()=>{ai=t=>{let e;switch(t.attributes.media_content_type){case"music":case"image":e=t.attributes.media_artist;break;case"playlist":e=t.attributes.media_playlist;break;case"tvshow":e=t.attributes.media_series_title,t.attributes.media_season&&(e+=" S"+t.attributes.media_season,t.attributes.media_episode&&(e+="E"+t.attributes.media_episode));break;default:e=t.attributes.app_name||""}return e}});function gi(t,e){return t===e||!(!si(t)||!si(e))}function _i(t,e){if(t.length!==e.length)return!1;for(var o=0;o{si=Number.isNaN||function(t){return"number"==typeof t&&t!=t}}),Bi=kt(()=>{Oi(),vi(t=>new Intl.Collator(t)),vi(t=>new Intl.Collator(t,{sensitivity:"accent"}))}),Li=kt(()=>{We(),Bi(),bi=t=>yi(t.attributes),yi=t=>ke(t,4)&&"number"==typeof t.in_progress,wi=t=>bi(t)||!!t.attributes.in_progress}),Di=kt(()=>{ki="cleaning",Ci="docked",$i="idle",Ei="returning",xi=1024,Ai=8192}),ji=kt(()=>{oe(),Si=(t,e,o)=>t.subscribeMessage(t=>e(t),ee({type:"render_template"},o))}),Hi=kt(()=>{}),Ri=kt(()=>{}),Ui=kt(()=>{Le()}),Vi=kt(()=>{Vt(),Ui(),Fe(),Ho(),Ti="ontouchstart"in window||navigator.maxTouchPoints>0||navigator.msMaxTouchPoints>0,Mi=class extends HTMLElement{constructor(...t){super(...t),this.holdTime=500,this.held=!1,this.cancelled=!1}connectedCallback(){Object.assign(this.style,{position:"fixed",width:Ti?"100px":"50px",height:Ti?"100px":"50px",transform:"translate(-50%, -50%) scale(0)",pointerEvents:"none",zIndex:"999",background:"var(--primary-color)",display:null,opacity:"0.2",borderRadius:"50%",transition:"transform 180ms ease-in-out"}),["touchcancel","mouseout","mouseup","touchmove","mousewheel","wheel","scroll"].forEach(t=>{document.addEventListener(t,()=>{this.cancelled=!0,this.timer&&(this._stopAnimation(),clearTimeout(this.timer),this.timer=void 0)},{passive:!0})})}bind(t,e={}){t.actionHandler&&No(e,t.actionHandler.options)||(t.actionHandler?(t.removeEventListener("touchstart",t.actionHandler.start),t.removeEventListener("touchend",t.actionHandler.end),t.removeEventListener("touchcancel",t.actionHandler.end),t.removeEventListener("mousedown",t.actionHandler.start),t.removeEventListener("click",t.actionHandler.end),t.removeEventListener("keydown",t.actionHandler.handleKeyDown)):t.addEventListener("contextmenu",t=>{const e=t||window.event;return e.preventDefault&&e.preventDefault(),e.stopPropagation&&e.stopPropagation(),e.cancelBubble=!0,e.returnValue=!1,!1}),t.actionHandler={options:e},e.disabled||(t.actionHandler.start=t=>{let o,i;this.cancelled=!1,t.touches?(o=t.touches[0].clientX,i=t.touches[0].clientY):(o=t.clientX,i=t.clientY),e.hasHold&&(this.held=!1,this.timer=window.setTimeout(()=>{this._startAnimation(o,i),this.held=!0},this.holdTime))},t.actionHandler.end=t=>{if("touchcancel"===t.type||"touchend"===t.type&&this.cancelled)return;const o=t.target;t.cancelable&&t.preventDefault(),e.hasHold&&(clearTimeout(this.timer),this._stopAnimation(),this.timer=void 0),e.hasHold&&this.held?ve(o,"action",{action:"hold"}):e.hasDoubleClick?"click"===t.type&&t.detail<2||!this.dblClickTimeout?this.dblClickTimeout=window.setTimeout(()=>{this.dblClickTimeout=void 0,!1!==e.hasTap&&ve(o,"action",{action:"tap"})},250):(clearTimeout(this.dblClickTimeout),this.dblClickTimeout=void 0,ve(o,"action",{action:"double_tap"})):!1!==e.hasTap&&ve(o,"action",{action:"tap"})},t.actionHandler.handleKeyDown=t=>{["Enter"," "].includes(t.key)&&t.currentTarget.actionHandler.end(t)},t.addEventListener("touchstart",t.actionHandler.start,{passive:!0}),t.addEventListener("touchend",t.actionHandler.end),t.addEventListener("touchcancel",t.actionHandler.end),t.addEventListener("mousedown",t.actionHandler.start,{passive:!0}),t.addEventListener("click",t.actionHandler.end),t.addEventListener("keydown",t.actionHandler.handleKeyDown)))}_startAnimation(t,e){Object.assign(this.style,{left:`${t}px`,top:`${e}px`,transform:"translate(-50%, -50%) scale(1)"})}_stopAnimation(){Object.assign(this.style,{left:null,top:null,transform:"translate(-50%, -50%) scale(0)"})}},Ii=()=>{const t=document.body;if(t.querySelector("action-handler"))return t.querySelector("action-handler");customElements.get("action-handler")||customElements.define("action-handler",Mi);const e=document.createElement("action-handler");return t.appendChild(e),e},zi=(t,e)=>{const o=Ii();o&&o.bind(t,e)},Pi=ue(class extends he{update(t,[e]){return zi(t.element,e),tt}render(t){}})}),Fi=kt(()=>{}),Gi=kt(()=>{}),Ki=kt(()=>{Fe(),Ni=async(t,e,o,i)=>{ve(t,"hass-action",{config:o,action:i})}});function Yi(t){return void 0!==t&&"none"!==t.action}var qi,Wi,Xi,Zi,Ji,Qi,tn,en,on,nn,rn,an=kt(()=>{}),sn=kt(()=>{}),ln=kt(()=>{To(),qi=Co({user:Eo()}),Wi=Ao([bo(),Co({text:$o(Eo()),excemptions:$o(vo(qi))})]),Xi=Co({action:wo("url"),url_path:Eo(),confirmation:$o(Wi)}),Zi=Co({action:yo(["call-service","perform-action"]),service:$o(Eo()),perform_action:$o(Eo()),service_data:$o(Co()),data:$o(Co()),target:$o(Co({entity_id:$o(Ao([Eo(),vo(Eo())])),device_id:$o(Ao([Eo(),vo(Eo())])),area_id:$o(Ao([Eo(),vo(Eo())])),floor_id:$o(Ao([Eo(),vo(Eo())])),label_id:$o(Ao([Eo(),vo(Eo())]))})),confirmation:$o(Wi)}),Ji=Co({action:wo("navigate"),navigation_path:Eo(),confirmation:$o(Wi)}),Qi=xo({action:wo("assist"),pipeline_id:$o(Eo()),start_listening:$o(bo())}),tn=xo({action:wo("fire-dom-event")}),en=Co({action:yo(["none","toggle","more-info","call-service","perform-action","url","navigate","assist"]),confirmation:$o(Wi)}),on=go(t=>{if(t&&"object"==typeof t&&"action"in t)switch(t.action){case"call-service":case"perform-action":return Zi;case"fire-dom-event":return tn;case"navigate":return Ji;case"url":return Xi;case"assist":return Qi}return en})}),cn=kt(()=>{}),un=kt(()=>{Vt(),nn=l` +var t,e,o,i,n,r,a,s,l,c,u,h,d,p,m,f,g,_,v,b,y,w,k,C,$,E,x,A,S,T,M,I,z,P,N,O,B,L,D,j,H,R,U,V,F,G,K,Y,q,W,X,Z,J,Q,tt,et,ot,it,nt,rt,at,st,lt,ct,ut,ht,dt,pt,mt,ft,gt=Object.create,_t=Object.defineProperty,vt=Object.getOwnPropertyDescriptor,bt=Object.getOwnPropertyNames,yt=Object.getPrototypeOf,wt=Object.prototype.hasOwnProperty,kt=(t,e)=>()=>(t&&(e=t(t=0)),e),Ct=(t,e)=>()=>(e||(t((e={exports:{}}).exports,e),t=null),e.exports),$t=(t,e)=>{let o={};for(var i in t)_t(o,i,{get:t[i],enumerable:!0});return e||_t(o,Symbol.toStringTag,{value:"Module"}),o},Et=(t,e,o)=>(o=null!=t?gt(yt(t)):{},((t,e,o,i)=>{if(e&&"object"==typeof e||"function"==typeof e)for(var n,r=bt(e),a=0,s=r.length;ae[t]).bind(null,n),enumerable:!(i=vt(e,n))||i.enumerable});return t})(!e&&t&&t.__esModule?o:_t(o,"default",{value:t,enumerable:!0}),t)),xt=/* @__PURE__ */(t=>"undefined"!=typeof require?require:"undefined"!=typeof Proxy?new Proxy(t,{get:(t,e)=>("undefined"!=typeof require?require:t)[e]}):t)(function(t){if("undefined"!=typeof require)return require.apply(this,arguments);throw Error('Calling `require` for "'+t+"\" in an environment that doesn't expose the `require` function. See https://rolldown.rs/in-depth/bundling-cjs#require-external-modules for more details.")}),At=kt(()=>{t="5.2.3",e={type:"git",url:"https://github.com/piitaya/lovelace-mushroom"}}),St=kt(()=>{o=globalThis,i=o.ShadowRoot&&(void 0===o.ShadyCSS||o.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,n=Symbol(),r=/* @__PURE__ */new WeakMap,a=class{constructor(t,e,o){if(this._$cssResult$=!0,o!==n)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o;const e=this.t;if(i&&void 0===t){const o=void 0!==e&&1===e.length;o&&(t=r.get(e)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),o&&r.set(e,t))}return t}toString(){return this.cssText}},s=t=>new a("string"==typeof t?t:t+"",void 0,n),l=(t,...e)=>new a(1===t.length?t[0]:e.reduce((e,o,i)=>e+(t=>{if(!0===t._$cssResult$)return t.cssText;if("number"==typeof t)return t;throw Error("Value passed to 'css' function must be a 'css' function result: "+t+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(o)+t[i+1],t[0]),t,n),c=(t,e)=>{if(i)t.adoptedStyleSheets=e.map(t=>t instanceof CSSStyleSheet?t:t.styleSheet);else for(const i of e){const e=document.createElement("style"),n=o.litNonce;void 0!==n&&e.setAttribute("nonce",n),e.textContent=i.cssText,t.appendChild(e)}},u=i?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e="";for(const o of t.cssRules)e+=o.cssText;return s(e)})(t):t}),Tt=kt(()=>{St(),({is:f,defineProperty:g,getOwnPropertyDescriptor:_,getOwnPropertyNames:v,getOwnPropertySymbols:b,getPrototypeOf:y}=Object),w=globalThis,k=w.trustedTypes,C=k?k.emptyScript:"",$=w.reactiveElementPolyfillSupport,E=(t,e)=>t,x={toAttribute(t,e){switch(e){case Boolean:t=t?C:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,e){let o=t;switch(e){case Boolean:o=null!==t;break;case Number:o=null===t?null:Number(t);break;case Object:case Array:try{o=JSON.parse(t)}catch(t){o=null}}return o}},A=(t,e)=>!f(t,e),S={attribute:!0,type:String,converter:x,reflect:!1,useDefault:!1,hasChanged:A},null!==(d=(h=Symbol).metadata)&&void 0!==d||(h.metadata=Symbol("metadata")),null!==(p=w.litPropertyMetadata)&&void 0!==p||(w.litPropertyMetadata=/* @__PURE__ */new WeakMap),T=class extends HTMLElement{static addInitializer(t){var e;this._$Ei(),(null!==(e=this.l)&&void 0!==e?e:this.l=[]).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,e=S){if(e.state&&(e.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(t)&&((e=Object.create(e)).wrapped=!0),this.elementProperties.set(t,e),!e.noAccessor){const o=Symbol(),i=this.getPropertyDescriptor(t,o,e);void 0!==i&&g(this.prototype,t,i)}}static getPropertyDescriptor(t,e,o){var i;const{get:n,set:r}=null!==(i=_(this.prototype,t))&&void 0!==i?i:{get(){return this[e]},set(t){this[e]=t}};return{get:n,set(e){const i=null==n?void 0:n.call(this);null==r||r.call(this,e),this.requestUpdate(t,i,o)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){var e;return null!==(e=this.elementProperties.get(t))&&void 0!==e?e:S}static _$Ei(){if(this.hasOwnProperty(E("elementProperties")))return;const t=y(this);t.finalize(),void 0!==t.l&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(E("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(E("properties"))){const t=this.properties,e=[...v(t),...b(t)];for(const o of e)this.createProperty(o,t[o])}const t=this[Symbol.metadata];if(null!==t){const e=litPropertyMetadata.get(t);if(void 0!==e)for(const[t,o]of e)this.elementProperties.set(t,o)}this._$Eh=/* @__PURE__ */new Map;for(const[e,o]of this.elementProperties){const t=this._$Eu(e,o);void 0!==t&&this._$Eh.set(t,e)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const o=new Set(t.flat(1/0).reverse());for(const t of o)e.unshift(u(t))}else void 0!==t&&e.push(u(t));return e}static _$Eu(t,e){const o=e.attribute;return!1===o?void 0:"string"==typeof o?o:"string"==typeof t?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){var t;this._$ES=new Promise(t=>this.enableUpdating=t),this._$AL=/* @__PURE__ */new Map,this._$E_(),this.requestUpdate(),null===(t=this.constructor.l)||void 0===t||t.forEach(t=>t(this))}addController(t){var e,o;(null!==(e=this._$EO)&&void 0!==e?e:this._$EO=/* @__PURE__ */new Set).add(t),void 0!==this.renderRoot&&this.isConnected&&(null===(o=t.hostConnected)||void 0===o||o.call(t))}removeController(t){var e;null===(e=this._$EO)||void 0===e||e.delete(t)}_$E_(){const t=/* @__PURE__ */new Map,e=this.constructor.elementProperties;for(const o of e.keys())this.hasOwnProperty(o)&&(t.set(o,this[o]),delete this[o]);t.size>0&&(this._$Ep=t)}createRenderRoot(){var t;const e=null!==(t=this.shadowRoot)&&void 0!==t?t:this.attachShadow(this.constructor.shadowRootOptions);return c(e,this.constructor.elementStyles),e}connectedCallback(){var t,e;null!==(t=this.renderRoot)&&void 0!==t||(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),null===(e=this._$EO)||void 0===e||e.forEach(t=>{var e;return null===(e=t.hostConnected)||void 0===e?void 0:e.call(t)})}enableUpdating(t){}disconnectedCallback(){var t;null===(t=this._$EO)||void 0===t||t.forEach(t=>{var e;return null===(e=t.hostDisconnected)||void 0===e?void 0:e.call(t)})}attributeChangedCallback(t,e,o){this._$AK(t,o)}_$ET(t,e){const o=this.constructor.elementProperties.get(t),i=this.constructor._$Eu(t,o);if(void 0!==i&&!0===o.reflect){var n;const r=(void 0!==(null===(n=o.converter)||void 0===n?void 0:n.toAttribute)?o.converter:x).toAttribute(e,o.type);this._$Em=t,null==r?this.removeAttribute(i):this.setAttribute(i,r),this._$Em=null}}_$AK(t,e){const o=this.constructor,i=o._$Eh.get(t);if(void 0!==i&&this._$Em!==i){var n,r,a;const t=o.getPropertyOptions(i),s="function"==typeof t.converter?{fromAttribute:t.converter}:void 0!==(null===(n=t.converter)||void 0===n?void 0:n.fromAttribute)?t.converter:x;this._$Em=i;const l=s.fromAttribute(e,t.type);this[i]=null!==(r=null!=l?l:null===(a=this._$Ej)||void 0===a?void 0:a.get(i))&&void 0!==r?r:l,this._$Em=null}}requestUpdate(t,e,o){if(void 0!==t){var i,n,r;const a=this.constructor,s=this[t];if(null!==(i=o)&&void 0!==i||(o=a.getPropertyOptions(t)),!((null!==(n=o.hasChanged)&&void 0!==n?n:A)(s,e)||o.useDefault&&o.reflect&&s===(null===(r=this._$Ej)||void 0===r?void 0:r.get(t))&&!this.hasAttribute(a._$Eu(t,o))))return;this.C(t,e,o)}!1===this.isUpdatePending&&(this._$ES=this._$EP())}C(t,e,{useDefault:o,reflect:i,wrapped:n},r){var a,s,l;o&&!(null!==(a=this._$Ej)&&void 0!==a?a:this._$Ej=/* @__PURE__ */new Map).has(t)&&(this._$Ej.set(t,null!==(s=null!=r?r:e)&&void 0!==s?s:this[t]),!0!==n||void 0!==r)||(this._$AL.has(t)||(this.hasUpdated||o||(e=void 0),this._$AL.set(t,e)),!0===i&&this._$Em!==t&&(null!==(l=this._$Eq)&&void 0!==l?l:this._$Eq=/* @__PURE__ */new Set).add(t))}async _$EP(){var t=this;t.isUpdatePending=!0;try{await t._$ES}catch(e){Promise.reject(e)}const e=t.scheduleUpdate();return null!=e&&await e,!t.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){var t;if(null!==(t=this.renderRoot)&&void 0!==t||(this.renderRoot=this.createRenderRoot()),this._$Ep){for(const[t,e]of this._$Ep)this[t]=e;this._$Ep=void 0}const e=this.constructor.elementProperties;if(e.size>0)for(const[t,o]of e){const{wrapped:e}=o,i=this[t];!0!==e||this._$AL.has(t)||void 0===i||this.C(t,void 0,o,i)}}let e=!1;const o=this._$AL;try{var i;e=this.shouldUpdate(o),e?(this.willUpdate(o),null===(i=this._$EO)||void 0===i||i.forEach(t=>{var e;return null===(e=t.hostUpdate)||void 0===e?void 0:e.call(t)}),this.update(o)):this._$EM()}catch(o){throw e=!1,this._$EM(),o}e&&this._$AE(o)}willUpdate(t){}_$AE(t){var e;null===(e=this._$EO)||void 0===e||e.forEach(t=>{var e;return null===(e=t.hostUpdated)||void 0===e?void 0:e.call(t)}),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EM(){this._$AL=/* @__PURE__ */new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Eq&&(this._$Eq=this._$Eq.forEach(t=>this._$ET(t,this[t]))),this._$EM()}updated(t){}firstUpdated(t){}},T.elementStyles=[],T.shadowRootOptions={mode:"open"},T[E("elementProperties")]=/* @__PURE__ */new Map,T[E("finalized")]=/* @__PURE__ */new Map,null==$||$({ReactiveElement:T}),(null!==(m=w.reactiveElementVersions)&&void 0!==m?m:w.reactiveElementVersions=[]).push("2.1.1")});function Mt(t,e){if(!R(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==P?P.createHTML(e):e}function It(t,e,o=t,i){var n,r,a;if(e===tt)return e;let s=void 0!==i?null===(n=o._$Co)||void 0===n?void 0:n[i]:o._$Cl;const l=H(e)?void 0:e._$litDirective$;return(null==s?void 0:s.constructor)!==l&&(null==s||null===(r=s._$AO)||void 0===r||r.call(s,!1),void 0===l?s=void 0:(s=new l(t),s._$AT(t,o,i)),void 0!==i?(null!==(a=o._$Co)&&void 0!==a?a:o._$Co=[])[i]=s:o._$Cl=s),void 0!==s&&(e=It(t,s._$AS(t,e.values),s,i)),e}var zt,Pt,Nt,Ot,Bt,Lt,Dt,jt,Ht=kt(()=>{I=globalThis,z=I.trustedTypes,P=z?z.createPolicy("lit-html",{createHTML:t=>t}):void 0,N="$lit$",O=`lit$${Math.random().toFixed(9).slice(2)}$`,L=`<${B="?"+O}>`,D=document,j=()=>D.createComment(""),H=t=>null===t||"object"!=typeof t&&"function"!=typeof t,R=Array.isArray,U=t=>R(t)||"function"==typeof(null==t?void 0:t[Symbol.iterator]),V="[ \t\n\f\r]",F=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,G=/-->/g,K=/>/g,Y=RegExp(`>|${V}(?:([^\\s"'>=/]+)(${V}*=${V}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),q=/'/g,W=/"/g,X=/^(?:script|style|textarea|title)$/i,Z=t=>(e,...o)=>({_$litType$:t,strings:e,values:o}),J=Z(1),Q=Z(2),Z(3),tt=Symbol.for("lit-noChange"),et=Symbol.for("lit-nothing"),ot=/* @__PURE__ */new WeakMap,it=D.createTreeWalker(D,129),nt=(t,e)=>{const o=t.length-1,i=[];let n,r=2===e?"":3===e?"":"",a=F;for(let l=0;l"===c[0]?(a=null!==(s=n)&&void 0!==s?s:F,u=-1):void 0===c[1]?u=-2:(u=a.lastIndex-c[2].length,o=c[1],a=void 0===c[3]?Y:'"'===c[3]?W:q):a===W||a===q?a=Y:a===G||a===K?a=F:(a=Y,n=void 0);const d=a===Y&&t[l+1].startsWith("/>")?" ":"";r+=a===F?e+L:u>=0?(i.push(o),e.slice(0,u)+N+e.slice(u)+O+d):e+O+(-2===u?l:d)}return[Mt(t,r+(t[o]||"")+(2===e?"":3===e?"":"")),i]},rt=class t{constructor({strings:e,_$litType$:o},i){let n;this.parts=[];let r=0,a=0;const s=e.length-1,l=this.parts,[c,u]=nt(e,o);if(this.el=t.createElement(c,i),it.currentNode=this.el.content,2===o||3===o){const t=this.el.content.firstChild;t.replaceWith(...t.childNodes)}for(;null!==(n=it.nextNode())&&l.length0){n.textContent=z?z.emptyScript:"";for(let o=0;o2||""!==o[0]||""!==o[1]?(this._$AH=Array(o.length-1).fill(/* @__PURE__ */new String),this.strings=o):this._$AH=et}_$AI(t,e=this,o,i){const n=this.strings;let r=!1;if(void 0===n)t=It(this,t,e,0),r=!H(t)||t!==this._$AH&&t!==tt,r&&(this._$AH=t);else{var a;const i=t;let s,l;for(t=n[0],s=0;s{var i;const n=null!==(i=null==o?void 0:o.renderBefore)&&void 0!==i?i:e;let r=n._$litPart$;if(void 0===r){var a;const t=null!==(a=null==o?void 0:o.renderBefore)&&void 0!==a?a:null;n._$litPart$=r=new st(e.insertBefore(j(),t),t,void 0,null!=o?o:{})}return r._$AI(t),r}}),Rt=kt(()=>{Tt(),Tt(),Ht(),Ht(),Nt=globalThis,Ot=class extends T{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var t,e;const o=super.createRenderRoot();return null!==(e=(t=this.renderOptions).renderBefore)&&void 0!==e||(t.renderBefore=o.firstChild),o}update(t){const e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=ft(e,this.renderRoot,this.renderOptions)}connectedCallback(){var t;super.connectedCallback(),null===(t=this._$Do)||void 0===t||t.setConnected(!0)}disconnectedCallback(){var t;super.disconnectedCallback(),null===(t=this._$Do)||void 0===t||t.setConnected(!1)}render(){return tt}},Ot._$litElement$=!0,Ot.finalized=!0,null===(zt=Nt.litElementHydrateSupport)||void 0===zt||zt.call(Nt,{LitElement:Ot}),null==(Bt=Nt.litElementPolyfillSupport)||Bt({LitElement:Ot}),(null!==(Pt=Nt.litElementVersions)&&void 0!==Pt?Pt:Nt.litElementVersions=[]).push("4.2.1")}),Ut=kt(()=>{}),Vt=kt(()=>{Tt(),Ht(),Rt(),Ut()}),Ft=kt(()=>{Lt=t=>(e,o)=>{void 0!==o?o.addInitializer(()=>{customElements.define(t,e)}):customElements.define(t,e)}});function Gt(t){return(e,o)=>"object"==typeof o?jt(t,e,o):((t,e,o)=>{const i=e.hasOwnProperty(o);return e.constructor.createProperty(o,t),i?Object.getOwnPropertyDescriptor(e,o):void 0})(t,e,o)}var Kt=kt(()=>{Tt(),Dt={attribute:!0,type:String,converter:x,reflect:!1,hasChanged:A},jt=(t=Dt,e,o)=>{const{kind:i,metadata:n}=o;let r=globalThis.litPropertyMetadata.get(n);if(void 0===r&&globalThis.litPropertyMetadata.set(n,r=/* @__PURE__ */new Map),"setter"===i&&((t=Object.create(t)).wrapped=!0),r.set(o.name,t),"accessor"===i){const{name:i}=o;return{set(o){const n=e.get.call(this);e.set.call(this,o),this.requestUpdate(i,n,t)},init(e){return void 0!==e&&this.C(i,void 0,t,e),e}}}if("setter"===i){const{name:i}=o;return function(o){const n=this[i];e.call(this,o),this.requestUpdate(i,n,t)}}throw Error("Unsupported decorator location: "+i)}});function Yt(t){return Yt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Yt(t)}var qt=kt(()=>{});var Wt=kt(()=>{qt()});function Xt(t){var e=function(t,e){if("object"!=Yt(t)||!t)return t;var o=t[Symbol.toPrimitive];if(void 0!==o){var i=o.call(t,e||"default");if("object"!=Yt(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==Yt(e)?e:e+""}var Zt=kt(()=>{qt(),Wt()});function Jt(t,e,o){return(e=Xt(e))in t?Object.defineProperty(t,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[e]=o,t}var Qt=kt(()=>{Zt()});function te(t,e){var o=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),o.push.apply(o,i)}return o}function ee(t){for(var e=1;e{Qt()});function ie(t){return Gt(ee(ee({},t),{},{state:!0,attribute:!1}))}var ne,re=kt(()=>{Kt(),oe()}),ae=kt(()=>{}),se=kt(()=>{ne=(t,e,o)=>(o.configurable=!0,o.enumerable=!0,Reflect.decorate&&"object"!=typeof e&&Object.defineProperty(t,e,o),o)});function le(t,e){return(o,i,n)=>{const r=e=>{var o,i;return null!==(o=null===(i=e.renderRoot)||void 0===i?void 0:i.querySelector(t))&&void 0!==o?o:null};if(e){const{get:t,set:e}="object"==typeof i?o:null!=n?n:(()=>{const t=Symbol();return{get(){return this[t]},set(e){this[t]=e}}})();return ne(o,i,{get(){let o=t.call(this);return void 0===o&&(o=r(this),(null!==o||this.hasUpdated)&&e.call(this,o)),o}})}return ne(o,i,{get(){return r(this)}})}}var ce,ue,he,de,pe,me,fe,ge,_e,ve,be,ye,we,ke,Ce,$e,Ee,xe,Ae,Se,Te,Me,Ie=kt(()=>{se()}),ze=kt(()=>{}),Pe=kt(()=>{}),Ne=kt(()=>{}),Oe=kt(()=>{}),Be=kt(()=>{Ft(),Kt(),re(),ae(),Ie(),ze(),Pe(),Ne(),Oe()}),Le=kt(()=>{ce={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},ue=t=>(...e)=>({_$litDirective$:t,values:e}),he=class{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,e,o){this._$Ct=t,this._$AM=e,this._$Ci=o}_$AS(t,e){return this.update(t,e)}update(t,e){return this.render(...e)}}}),De=kt(()=>{Ht(),Le(),de=ue(class extends he{constructor(t){var e;if(super(t),t.type!==ce.ATTRIBUTE||"class"!==t.name||(null===(e=t.strings)||void 0===e?void 0:e.length)>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(t){return" "+Object.keys(t).filter(e=>t[e]).join(" ")+" "}update(t,[e]){if(void 0===this.st){var o;this.st=/* @__PURE__ */new Set,void 0!==t.strings&&(this.nt=new Set(t.strings.join(" ").split(/\s/).filter(t=>""!==t)));for(const t in e)e[t]&&!(null===(o=this.nt)||void 0===o?void 0:o.has(t))&&this.st.add(t);return this.render(e)}const i=t.element.classList;for(const r of this.st)r in e||(i.remove(r),this.st.delete(r));for(const r in e){var n;const t=!!e[r];t===this.st.has(r)||null!==(n=this.nt)&&void 0!==n&&n.has(r)||(t?(i.add(r),this.st.add(r)):(i.remove(r),this.st.delete(r)))}return tt}})}),je=kt(()=>{De()}),He=kt(()=>{Ht(),Le(),me=" !"+(pe="important"),fe=ue(class extends he{constructor(t){var e;if(super(t),t.type!==ce.ATTRIBUTE||"style"!==t.name||(null===(e=t.strings)||void 0===e?void 0:e.length)>2)throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.")}render(t){return Object.keys(t).reduce((e,o)=>{const i=t[o];return null==i?e:e+`${o=o.includes("-")?o:o.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase()}:${i};`},"")}update(t,[e]){const{style:o}=t.element;if(void 0===this.ft)return this.ft=new Set(Object.keys(e)),this.render(e);for(const i of this.ft)null==e[i]&&(this.ft.delete(i),i.includes("-")?o.removeProperty(i):o[i]=null);for(const i in e){const t=e[i];if(null!=t){this.ft.add(i);const e="string"==typeof t&&t.endsWith(me);i.includes("-")||e?o.setProperty(i,e?t.slice(0,-11):t,e?pe:""):o[i]=t}}return tt}})}),Re=kt(()=>{He()}),Ue=kt(()=>{ge=(t,e,o,i)=>{const[n,r,a]=t.split(".",3);return Number(n)>e||Number(n)===e&&(void 0===i?Number(r)>=o:Number(r)>o||Number(r)===o&&Number(a)>=i)}}),Ve=kt(()=>{_e=new Set(["fan","input_boolean","light","switch","group","automation","humidifier","valve"])}),Fe=kt(()=>{ve=(t,e,o,i)=>{i=i||{},o=null==o?{}:o;const n=new Event(e,{bubbles:void 0===i.bubbles||i.bubbles,cancelable:Boolean(i.cancelable),composed:void 0===i.composed||i.composed});return n.detail=o,t.dispatchEvent(n),n}}),Ge=kt(()=>{0}),Ke=kt(()=>{Ge(),"ha-main-window"===window.name?window:"ha-main-window"===parent.name?parent:top}),Ye=kt(()=>{be=t=>t.substr(0,t.indexOf("."))}),qe=kt(()=>{Ye(),ye=t=>be(t.entity_id)}),We=kt(()=>{we=(t,e)=>ke(t.attributes,e),ke=(t,e)=>0!==(t.supported_features&e)}),Xe=kt(()=>{Ce=(t,e,o)=>Math.min(Math.max(t,e),o),$e=(t,e,o)=>{let i;return i=e?Math.max(t,e):t,i=o?Math.min(i,o):i,i}}),Ze=kt(()=>{Ee=/* @__PURE__ */function(t){return t.language="language",t.system="system",t.comma_decimal="comma_decimal",t.decimal_comma="decimal_comma",t.space_comma="space_comma",t.none="none",t}({})}),Je=kt(()=>{xe=(t,e=2)=>Math.round(t*10**e)/10**e}),Qe=kt(()=>{Ze(),Je(),oe(),Ae=t=>{switch(t.number_format){case Ee.comma_decimal:return["en-US","en"];case Ee.decimal_comma:return["de","es","it"];case Ee.space_comma:return["fr","sv","cs"];case Ee.system:return;default:return t.language}},Se=(t,e,o)=>{const i=e?Ae(e):void 0;if(Number.isNaN=Number.isNaN||function t(e){return"number"==typeof e&&t(e)},(null==e?void 0:e.number_format)!==Ee.none&&!Number.isNaN(Number(t))&&Intl)try{return new Intl.NumberFormat(i,Me(t,o)).format(Number(t))}catch(n){return console.error(n),new Intl.NumberFormat(void 0,Me(t,o)).format(Number(t))}return"string"==typeof t?t:`${xe(t,null==o?void 0:o.maximumFractionDigits).toString()}${"currency"===(null==o?void 0:o.style)?` ${o.currency}`:""}`},Te=(t,e)=>{var o;const i=null==e?void 0:e.display_precision;return null!=i?{maximumFractionDigits:i,minimumFractionDigits:i}:Number.isInteger(Number(null===(o=t.attributes)||void 0===o?void 0:o.step))&&Number.isInteger(Number(t.state))?{maximumFractionDigits:0}:null!=t.attributes.step?{maximumFractionDigits:Math.ceil(Math.log10(1/t.attributes.step))}:void 0},Me=(t,e)=>{const o=ee({maximumFractionDigits:2},e);if("string"!=typeof t)return o;if(!e||void 0===e.minimumFractionDigits&&void 0===e.maximumFractionDigits){const e=t.indexOf(".")>-1?t.split(".")[1].length:0;o.minimumFractionDigits=e,o.maximumFractionDigits=e}return o}});var to=kt(()=>{});var eo,oo,io,no=kt(()=>{to()});function ro(t){return"object"==typeof t&&null!=t}function ao(t){return ro(t)&&!Array.isArray(t)}function so(t){return"symbol"==typeof t?t.toString():"string"==typeof t?JSON.stringify(t):`${t}`}function lo(t,e,o,i){if(!0===t)return;!1===t?t={}:"string"==typeof t&&(t={message:t});const{path:n,branch:r}=e,{type:a}=o,{refinement:s,message:l=`Expected a value of type \`${a}\`${s?` with refinement \`${s}\``:""}, but received: \`${so(i)}\``}=t;return ee(ee({value:i,type:a,refinement:s,key:n[n.length-1],path:n,branch:r},t),{},{message:l})}function*co(t,e,o,i){(function(t){return ro(t)&&"function"==typeof t[Symbol.iterator]})(t)||(t=[t]);for(const n of t){const t=lo(n,e,o,i);t&&(yield t)}}function*uo(t,e,o={}){const{path:i=[],branch:n=[t],coerce:r=!1,mask:a=!1}=o,s={path:i,branch:n,mask:a};r&&(t=e.coercer(t,s));let l="valid";for(const c of e.validator(t,s))c.explanation=o.message,l="not_valid",yield[c,void 0];for(let[c,u,h]of e.entries(t,s)){const e=uo(u,h,{path:void 0===c?i:[...i,c],branch:void 0===c?n:[...n,u],coerce:r,mask:a,message:o.message});for(const o of e)o[0]?(l=null!=o[0].refinement?"not_refined":"not_valid",yield[o[0],void 0]):r&&(u=o[1],void 0===c?t=u:t instanceof Map?t.set(c,u):t instanceof Set?t.add(u):ro(t)&&(void 0!==u||c in t)&&(t[c]=u))}if("not_valid"!==l)for(const c of e.refiner(t,s))c.explanation=o.message,l="not_refined",yield[c,void 0];"valid"===l&&(yield[void 0,t])}function ho(t,e,o){const i=po(t,e,{message:o});if(i[0])throw i[0]}function po(t,e,o={}){const i=uo(t,e,o),n=function(t){const{done:e,value:o}=t.next();return e?void 0:o}(i);return n[0]?[new oo(n[0],function*(){for(const t of i)t[0]&&(yield t[0])}),void 0]:[void 0,n[1]]}function mo(...t){const e="type"===t[0].type,o=t.map(t=>t.schema),i=Object.assign({},...o);return e?xo(i):Co(i)}function fo(t,e){return new io({type:t,schema:null,validator:e})}function go(t){return new io({type:"dynamic",schema:null,*entries(e,o){yield*t(e,o).entries(e,o)},validator:(e,o)=>t(e,o).validator(e,o),coercer:(e,o)=>t(e,o).coercer(e,o),refiner:(e,o)=>t(e,o).refiner(e,o)})}function _o(){return fo("any",()=>!0)}function vo(t){return new io({type:"array",schema:t,*entries(e){if(t&&Array.isArray(e))for(const[o,i]of e.entries())yield[o,i,t]},coercer:t=>Array.isArray(t)?t.slice():t,validator:t=>Array.isArray(t)||`Expected an array value, but received: ${so(t)}`})}function bo(){return fo("boolean",t=>"boolean"==typeof t)}function yo(t){const e={},o=t.map(t=>so(t)).join();for(const i of t)e[i]=i;return new io({type:"enums",schema:e,validator:e=>t.includes(e)||`Expected one of \`${o}\`, but received: ${so(e)}`})}function wo(t){const e=so(t),o=typeof t;return new io({type:"literal",schema:"string"===o||"number"===o||"boolean"===o?t:null,validator:o=>o===t||`Expected the literal \`${e}\`, but received: ${so(o)}`})}function ko(){return fo("number",t=>"number"==typeof t&&!isNaN(t)||`Expected a number, but received: ${so(t)}`)}function Co(t){const e=t?Object.keys(t):[],o=fo("never",()=>!1);return new io({type:"object",schema:t||null,*entries(i){if(t&&ro(i)){const n=new Set(Object.keys(i));for(const o of e)n.delete(o),yield[o,i[o],t[o]];for(const t of n)yield[t,i[t],o]}},validator:t=>ao(t)||`Expected an object, but received: ${so(t)}`,coercer(e,o){if(!ao(e))return e;const i=ee({},e);if(o.mask&&t)for(const n in i)void 0===t[n]&&delete i[n];return i}})}function $o(t){return new io(ee(ee({},t),{},{validator:(e,o)=>void 0===e||t.validator(e,o),refiner:(e,o)=>void 0===e||t.refiner(e,o)}))}function Eo(){return fo("string",t=>"string"==typeof t||`Expected a string, but received: ${so(t)}`)}function xo(t){const e=Object.keys(t);return new io({type:"type",schema:t,*entries(o){if(ro(o))for(const i of e)yield[i,o[i],t[i]]},validator:t=>ao(t)||`Expected an object, but received: ${so(t)}`,coercer:t=>ao(t)?ee({},t):t})}function Ao(t){const e=t.map(t=>t.type).join(" | ");return new io({type:"union",schema:null,coercer(e,o){for(const i of t){const[t,n]=i.validate(e,{coerce:!0,mask:o.mask});if(!t)return n}return e},validator(o,i){const n=[];for(const e of t){const[...t]=uo(o,e,i),[r]=t;if(!r[0])return[];for(const[e]of t)e&&n.push(e)}return[`Expected the value to satisfy a union of \`${e}\`, but received: ${so(o)}`,...n]}})}var So,To=kt(()=>{no(),oe(),eo=["message","explanation"],oo=class extends TypeError{constructor(t,e){let o;const{message:i,explanation:n}=t,r=function(t,e){if(null==t)return{};var o,i,n=function(t,e){if(null==t)return{};var o={};for(var i in t)if({}.hasOwnProperty.call(t,i)){if(e.includes(i))continue;o[i]=t[i]}return o}(t,e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);for(i=0;i{var i;return null!==(i=o)&&void 0!==i?i:o=[t,...e()]}}},io=class{constructor(t){const{type:e,schema:o,validator:i,refiner:n,coercer:r=t=>t,entries:a=function*(){}}=t;this.type=e,this.schema=o,this.entries=a,this.coercer=r,this.validator=i?(t,e)=>co(i(t,e),e,this,t):()=>[],this.refiner=n?(t,e)=>co(n(t,e),e,this,t):()=>[]}assert(t,e){return ho(t,this,e)}create(t,e){return function(t,e,o){const i=po(t,e,{coerce:!0,message:o});if(i[0])throw i[0];return i[1]}(t,this,e)}is(t){return function(t,e){return!po(t,e)[0]}(t,this)}mask(t,e){return function(t,e,o){const i=po(t,e,{coerce:!0,mask:!0,message:o});if(i[0])throw i[0];return i[1]}(t,this,e)}validate(t,e={}){return po(t,this,e)}}}),Mo=kt(()=>{To(),So=(t,e)=>{if(!(e instanceof oo))return{warnings:[e.message],errors:void 0};const o=[],i=[];for(const n of e.failures())if(void 0===n.value)o.push(t.localize("ui.errors.config.key_missing","key",n.path.join(".")));else if("never"===n.type)i.push(t.localize("ui.errors.config.key_not_expected","key",n.path.join(".")));else{if("union"===n.type)continue;"enums"===n.type?i.push(t.localize("ui.errors.config.key_wrong_type","key",n.path.join("."),"type_correct",n.message.replace("Expected ","").split(", ")[0],"type_wrong",JSON.stringify(n.value))):i.push(t.localize("ui.errors.config.key_wrong_type","key",n.path.join("."),"type_correct",n.refinement||n.type,"type_wrong",JSON.stringify(n.value)))}return{warnings:i,errors:o}}}),Io=kt(()=>{});function zo(t){const e=t.language||"en";return t.translationMetadata.translations[e]&&t.translationMetadata.translations[e].isRTL||!1}var Po,No,Oo,Bo,Lo,Do=kt(()=>{}),jo=kt(()=>{Po=(t,e,o=!1)=>{let i;const n=(...n)=>{const r=o&&!i;clearTimeout(i),i=window.setTimeout(()=>{i=void 0,o||t(...n)},e),r&&t(...n)};return n.cancel=()=>{clearTimeout(i)},n}}),Ho=kt(()=>{No=(t,e)=>{if(t===e)return!0;if(t&&e&&"object"==typeof t&&"object"==typeof e){if(t.constructor!==e.constructor)return!1;let o,i;if(Array.isArray(t)){if(i=t.length,i!==e.length)return!1;for(o=i;0!==o--;)if(!No(t[o],e[o]))return!1;return!0}if(t instanceof Map&&e instanceof Map){if(t.size!==e.size)return!1;for(o of t.entries())if(!e.has(o[0]))return!1;for(o of t.entries())if(!No(o[1],e.get(o[0])))return!1;return!0}if(t instanceof Set&&e instanceof Set){if(t.size!==e.size)return!1;for(o of t.entries())if(!e.has(o[0]))return!1;return!0}if(ArrayBuffer.isView(t)&&ArrayBuffer.isView(e)){if(i=t.length,i!==e.length)return!1;for(o=i;0!==o--;)if(t[o]!==e[o])return!1;return!0}if(t.constructor===RegExp)return t.source===e.source&&t.flags===e.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===e.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===e.toString();const n=Object.keys(t);if(i=n.length,i!==Object.keys(e).length)return!1;for(o=i;0!==o--;)if(!Object.prototype.hasOwnProperty.call(e,n[o]))return!1;for(o=i;0!==o--;){const i=n[o];if(!No(t[i],e[i]))return!1}return!0}return t!=t&&e!=e}}),Ro=kt(()=>{}),Uo=kt(()=>{Oo={auto:1,heat_cool:2,heat:3,cool:4,dry:5,fan_only:6,off:7},Bo=(t,e)=>Oo[t]-Oo[e],Lo=/* @__PURE__ */function(t){return t[t.TARGET_TEMPERATURE=1]="TARGET_TEMPERATURE",t[t.TARGET_TEMPERATURE_RANGE=2]="TARGET_TEMPERATURE_RANGE",t[t.TARGET_HUMIDITY=4]="TARGET_HUMIDITY",t[t.FAN_MODE=8]="FAN_MODE",t[t.PRESET_MODE=16]="PRESET_MODE",t[t.SWING_MODE=32]="SWING_MODE",t[t.AUX_HEAT=64]="AUX_HEAT",t[t.TURN_OFF=128]="TURN_OFF",t[t.TURN_ON=256]="TURN_ON",t[t.SWING_HORIZONTAL_MODE=512]="SWING_HORIZONTAL_MODE",t}({})});var Vo,Fo,Go,Ko=kt(()=>{});function Yo(t){const e=be(t.entity_id),o=t.state;if(["button","input_button","scene"].includes(e))return o!==Vo;if(Go.includes(o))return!1;switch(e){case"cover":case"valve":return!["closed","closing"].includes(o);case"device_tracker":case"person":return"not_home"!==o;case"media_player":return"standby"!==o;case"vacuum":return!["idle","docked","paused"].includes(o);case"plant":return"problem"===o;default:return!0}}function qo(t){return t.state!==Vo}function Wo(t){return"off"===t.state}function Xo(t){return t.attributes.entity_picture_local||t.attributes.entity_picture}var Zo,Jo,Qo,ti,ei,oi,ii,ni,ri,ai,si,li=kt(()=>{Ye(),Go=[Vo="unavailable",Fo="unknown","off"]}),ci=kt(()=>{}),ui=kt(()=>{}),hi=kt(()=>{}),di=kt(()=>{Jo=[(Zo=/* @__PURE__ */function(t){return t.UNKNOWN="unknown",t.ONOFF="onoff",t.BRIGHTNESS="brightness",t.COLOR_TEMP="color_temp",t.HS="hs",t.XY="xy",t.RGB="rgb",t.RGBW="rgbw",t.RGBWW="rgbww",t.WHITE="white",t}({})).HS,Zo.XY,Zo.RGB,Zo.RGBW,Zo.RGBWW],Qo=[...Jo,Zo.COLOR_TEMP,Zo.BRIGHTNESS,Zo.WHITE],ti=t=>{var e;return(null===(e=t.attributes.supported_color_modes)||void 0===e?void 0:e.some(t=>Jo.includes(t)))||!1},ei=t=>{var e;return(null===(e=t.attributes.supported_color_modes)||void 0===e?void 0:e.some(t=>Qo.includes(t)))||!1}}),pi=kt(()=>{oi="locked",ii="locking",ni="unlocked",ri="unlocking"}),mi=kt(()=>{}),fi=kt(()=>{ai=t=>{let e;switch(t.attributes.media_content_type){case"music":case"image":e=t.attributes.media_artist;break;case"playlist":e=t.attributes.media_playlist;break;case"tvshow":e=t.attributes.media_series_title,t.attributes.media_season&&(e+=" S"+t.attributes.media_season,t.attributes.media_episode&&(e+="E"+t.attributes.media_episode));break;default:e=t.attributes.app_name||""}return e}});function gi(t,e){return t===e||!(!si(t)||!si(e))}function _i(t,e){if(t.length!==e.length)return!1;for(var o=0;o{si=Number.isNaN||function(t){return"number"==typeof t&&t!=t}}),Bi=kt(()=>{Oi(),vi(t=>new Intl.Collator(t)),vi(t=>new Intl.Collator(t,{sensitivity:"accent"}))}),Li=kt(()=>{We(),Bi(),bi=t=>yi(t.attributes),yi=t=>ke(t,4)&&"number"==typeof t.in_progress,wi=t=>bi(t)||!!t.attributes.in_progress}),Di=kt(()=>{ki="cleaning",Ci="docked",$i="idle",Ei="returning",xi=1024,Ai=8192}),ji=kt(()=>{oe(),Si=(t,e,o)=>t.subscribeMessage(t=>e(t),ee({type:"render_template"},o))}),Hi=kt(()=>{}),Ri=kt(()=>{}),Ui=kt(()=>{Le()}),Vi=kt(()=>{Vt(),Ui(),Fe(),Ho(),Ti="ontouchstart"in window||navigator.maxTouchPoints>0||navigator.msMaxTouchPoints>0,Mi=class extends HTMLElement{constructor(...t){super(...t),this.holdTime=500,this.held=!1,this.cancelled=!1}connectedCallback(){Object.assign(this.style,{position:"fixed",width:Ti?"100px":"50px",height:Ti?"100px":"50px",transform:"translate(-50%, -50%) scale(0)",pointerEvents:"none",zIndex:"999",background:"var(--primary-color)",display:null,opacity:"0.2",borderRadius:"50%",transition:"transform 180ms ease-in-out"}),["touchcancel","mouseout","mouseup","touchmove","mousewheel","wheel","scroll"].forEach(t=>{document.addEventListener(t,()=>{this.cancelled=!0,this.timer&&(this._stopAnimation(),clearTimeout(this.timer),this.timer=void 0)},{passive:!0})})}bind(t,e={}){t.actionHandler&&No(e,t.actionHandler.options)||(t.actionHandler?(t.removeEventListener("touchstart",t.actionHandler.start),t.removeEventListener("touchend",t.actionHandler.end),t.removeEventListener("touchcancel",t.actionHandler.end),t.removeEventListener("mousedown",t.actionHandler.start),t.removeEventListener("click",t.actionHandler.end),t.removeEventListener("keydown",t.actionHandler.handleKeyDown)):t.addEventListener("contextmenu",t=>{const e=t||window.event;return e.preventDefault&&e.preventDefault(),e.stopPropagation&&e.stopPropagation(),e.cancelBubble=!0,e.returnValue=!1,!1}),t.actionHandler={options:e},e.disabled||(t.actionHandler.start=t=>{let o,i;this.cancelled=!1,t.touches?(o=t.touches[0].clientX,i=t.touches[0].clientY):(o=t.clientX,i=t.clientY),e.hasHold&&(this.held=!1,this.timer=window.setTimeout(()=>{this._startAnimation(o,i),this.held=!0},this.holdTime))},t.actionHandler.end=t=>{if("touchcancel"===t.type||"touchend"===t.type&&this.cancelled)return;const o=t.target;t.cancelable&&t.preventDefault(),e.hasHold&&(clearTimeout(this.timer),this._stopAnimation(),this.timer=void 0),e.hasHold&&this.held?ve(o,"action",{action:"hold"}):e.hasDoubleClick?"click"===t.type&&t.detail<2||!this.dblClickTimeout?this.dblClickTimeout=window.setTimeout(()=>{this.dblClickTimeout=void 0,!1!==e.hasTap&&ve(o,"action",{action:"tap"})},250):(clearTimeout(this.dblClickTimeout),this.dblClickTimeout=void 0,ve(o,"action",{action:"double_tap"})):!1!==e.hasTap&&ve(o,"action",{action:"tap"})},t.actionHandler.handleKeyDown=t=>{["Enter"," "].includes(t.key)&&t.currentTarget.actionHandler.end(t)},t.addEventListener("touchstart",t.actionHandler.start,{passive:!0}),t.addEventListener("touchend",t.actionHandler.end),t.addEventListener("touchcancel",t.actionHandler.end),t.addEventListener("mousedown",t.actionHandler.start,{passive:!0}),t.addEventListener("click",t.actionHandler.end),t.addEventListener("keydown",t.actionHandler.handleKeyDown)))}_startAnimation(t,e){Object.assign(this.style,{left:`${t}px`,top:`${e}px`,transform:"translate(-50%, -50%) scale(1)"})}_stopAnimation(){Object.assign(this.style,{left:null,top:null,transform:"translate(-50%, -50%) scale(0)"})}},Ii=()=>{const t=document.body;if(t.querySelector("action-handler"))return t.querySelector("action-handler");customElements.get("action-handler")||customElements.define("action-handler",Mi);const e=document.createElement("action-handler");return t.appendChild(e),e},zi=(t,e)=>{const o=Ii();o&&o.bind(t,e)},Pi=ue(class extends he{update(t,[e]){return zi(t.element,e),tt}render(t){}})}),Fi=kt(()=>{}),Gi=kt(()=>{}),Ki=kt(()=>{Fe(),Ni=async(t,e,o,i)=>{ve(t,"hass-action",{config:o,action:i})}});function Yi(t){return void 0!==t&&"none"!==t.action}var qi,Wi,Xi,Zi,Ji,Qi,tn,en,on,nn,rn,an=kt(()=>{}),sn=kt(()=>{}),ln=kt(()=>{To(),qi=Co({user:Eo()}),Wi=Ao([bo(),Co({text:$o(Eo()),excemptions:$o(vo(qi))})]),Xi=Co({action:wo("url"),url_path:Eo(),confirmation:$o(Wi)}),Zi=Co({action:yo(["call-service","perform-action"]),service:$o(Eo()),perform_action:$o(Eo()),service_data:$o(Co()),data:$o(Co()),target:$o(Co({entity_id:$o(Ao([Eo(),vo(Eo())])),device_id:$o(Ao([Eo(),vo(Eo())])),area_id:$o(Ao([Eo(),vo(Eo())])),floor_id:$o(Ao([Eo(),vo(Eo())])),label_id:$o(Ao([Eo(),vo(Eo())]))})),confirmation:$o(Wi)}),Ji=Co({action:wo("navigate"),navigation_path:Eo(),confirmation:$o(Wi)}),Qi=xo({action:wo("assist"),pipeline_id:$o(Eo()),start_listening:$o(bo())}),tn=xo({action:wo("fire-dom-event")}),en=Co({action:yo(["none","toggle","more-info","call-service","perform-action","url","navigate","assist"]),confirmation:$o(Wi)}),on=go(t=>{if(t&&"object"==typeof t&&"action"in t)switch(t.action){case"call-service":case"perform-action":return Zi;case"fire-dom-event":return tn;case"navigate":return Ji;case"url":return Xi;case"assist":return Qi}return en})}),cn=kt(()=>{}),un=kt(()=>{Vt(),nn=l` #sortable a:nth-of-type(2n) paper-icon-item { animation-name: keyframes1; animation-iteration-count: infinite; @@ -423,7 +423,7 @@ var t,e,o,i,n,r,a,s,l,c,u,h,d,p,m,f,g,_,v,b,y,w,k,C,$,E,x,A,S,T,M,I,z,P,N,O,B,L, .container.vertical .info { text-align: center; } - `}},gn([Gt()],Sn.prototype,"appearance",void 0),Sn=gn([Lt("mushroom-state-item")],Sn)});function Dn(t){var e,o;return{layout:null!==(e=t.layout)&&void 0!==e?e:jn(t),fill_container:null!==(o=t.fill_container)&&void 0!==o&&o,primary_info:t.primary_info||Rn(t),secondary_info:t.secondary_info||Un(t),icon_type:t.icon_type||Hn(t)}}function jn(t){return t.vertical?"vertical":"default"}function Hn(t){return t.hide_icon?"none":t.use_entity_picture||t.use_media_artwork?"entity-picture":"icon"}function Rn(t){return t.hide_name?"none":"name"}function Un(t){return t.hide_state?"none":"state"}function Vn(t,e){const o=e&&e.cache?e.cache:In,i=e&&e.serializer?e.serializer:Tn;return(e&&e.strategy?e.strategy:Yn)(t,{cache:o,serializer:i})}function Fn(t,e,o,i){const n=null==(r=i)||"number"==typeof r||"boolean"==typeof r?i:o(i);var r;let a=e.get(n);return void 0===a&&(a=t.call(this,i),e.set(n,a)),a}function Gn(t,e,o){const i=Array.prototype.slice.call(arguments,3),n=o(i);let r=e.get(n);return void 0===r&&(r=t.apply(this,i),e.set(n,r)),r}function Kn(t,e,o,i,n){return o.bind(e,t,i,n)}function Yn(t,e){return Kn(t,this,1===t.length?Fn:Gn,e.cache.create(),e.serializer)}function qn(t,e){return Kn(t,this,Gn,e.cache.create(),e.serializer)}function Wn(t,e){return Kn(t,this,Fn,e.cache.create(),e.serializer)}Pn(),Bn(),Ln();var Xn,Zn,Jn,Qn,tr,er,or=kt(()=>{Tn=function(){return JSON.stringify(arguments)},Mn=class{constructor(){this.cache=Object.create(null)}get(t){return this.cache[t]}set(t,e){this.cache[t]=e}},In={create:function(){return new Mn}},zn={variadic:qn,monadic:Wn}});function ir(t){const e={};return t.replace(Xn,t=>{const o=t.length;switch(t[0]){case"G":e.era=4===o?"long":5===o?"narrow":"short";break;case"y":e.year=2===o?"2-digit":"numeric";break;case"Y":case"u":case"U":case"r":throw new RangeError("`Y/u/U/r` (year) patterns are not supported, use `y` instead");case"q":case"Q":throw new RangeError("`q/Q` (quarter) patterns are not supported");case"M":case"L":e.month=["numeric","2-digit","short","long","narrow"][o-1];break;case"w":case"W":throw new RangeError("`w/W` (week) patterns are not supported");case"d":e.day=["numeric","2-digit"][o-1];break;case"D":case"F":case"g":throw new RangeError("`D/F/g` (day) patterns are not supported, use `d` instead");case"E":e.weekday=4===o?"long":5===o?"narrow":"short";break;case"e":if(o<4)throw new RangeError("`e..eee` (weekday) patterns are not supported");e.weekday=["short","long","narrow","short"][o-4];break;case"c":if(o<4)throw new RangeError("`c..ccc` (weekday) patterns are not supported");e.weekday=["short","long","narrow","short"][o-4];break;case"a":e.hour12=!0;break;case"b":case"B":throw new RangeError("`b/B` (period) patterns are not supported, use `a` instead");case"h":e.hourCycle="h12",e.hour=["numeric","2-digit"][o-1];break;case"H":e.hourCycle="h23",e.hour=["numeric","2-digit"][o-1];break;case"K":e.hourCycle="h11",e.hour=["numeric","2-digit"][o-1];break;case"k":e.hourCycle="h24",e.hour=["numeric","2-digit"][o-1];break;case"j":case"J":case"C":throw new RangeError("`j/J/C` (hour) patterns are not supported, use `h/H/K/k` instead");case"m":e.minute=["numeric","2-digit"][o-1];break;case"s":e.second=["numeric","2-digit"][o-1];break;case"S":case"A":throw new RangeError("`S/A` (second) patterns are not supported, use `s` instead");case"z":e.timeZoneName=o<4?"short":"long";break;case"Z":case"O":case"v":case"V":case"X":case"x":throw new RangeError("`Z/O/v/V/X/x` (timeZone) patterns are not supported, use `z` instead")}return""}),e}function nr(t){return t.replace(/^(.*?)-/,"")}function rr(t){const e={};return"r"===t[t.length-1]?e.roundingPriority="morePrecision":"s"===t[t.length-1]&&(e.roundingPriority="lessPrecision"),t.replace(Qn,function(t,o,i){return"string"!=typeof i?(e.minimumSignificantDigits=o.length,e.maximumSignificantDigits=o.length):"+"===i?e.minimumSignificantDigits=o.length:"#"===o[0]?e.maximumSignificantDigits=o.length:(e.minimumSignificantDigits=o.length,e.maximumSignificantDigits=o.length+("string"==typeof i?i.length:0)),""}),e}function ar(t){switch(t){case"sign-auto":return{signDisplay:"auto"};case"sign-accounting":case"()":return{currencySign:"accounting"};case"sign-always":case"+!":return{signDisplay:"always"};case"sign-accounting-always":case"()!":return{signDisplay:"always",currencySign:"accounting"};case"sign-except-zero":case"+?":return{signDisplay:"exceptZero"};case"sign-accounting-except-zero":case"()?":return{signDisplay:"exceptZero",currencySign:"accounting"};case"sign-never":case"+_":return{signDisplay:"never"}}}function sr(t){let e;if("E"===t[0]&&"E"===t[1]?(e={notation:"engineering"},t=t.slice(2)):"E"===t[0]&&(e={notation:"scientific"},t=t.slice(1)),e){const o=t.slice(0,2);if("+!"===o?(e.signDisplay="always",t=t.slice(2)):"+?"===o&&(e.signDisplay="exceptZero",t=t.slice(2)),!er.test(t))throw new Error("Malformed concise eng/scientific notation");e.minimumIntegerDigits=t.length}return e}function lr(t){const e=ar(t);return e||{}}function cr(t){let e={};for(const o of t){switch(o.stem){case"percent":case"%":e.style="percent";continue;case"%x100":e.style="percent",e.scale=100;continue;case"currency":e.style="currency",e.currency=o.options[0];continue;case"group-off":case",_":e.useGrouping=!1;continue;case"precision-integer":case".":e.maximumFractionDigits=0;continue;case"measure-unit":case"unit":e.style="unit",e.unit=nr(o.options[0]);continue;case"compact-short":case"K":e.notation="compact",e.compactDisplay="short";continue;case"compact-long":case"KK":e.notation="compact",e.compactDisplay="long";continue;case"scientific":e=ee(ee({},e),{},{notation:"scientific"},o.options.reduce((t,e)=>ee(ee({},t),lr(e)),{}));continue;case"engineering":e=ee(ee({},e),{},{notation:"engineering"},o.options.reduce((t,e)=>ee(ee({},t),lr(e)),{}));continue;case"notation-simple":e.notation="standard";continue;case"unit-width-narrow":e.currencyDisplay="narrowSymbol",e.unitDisplay="narrow";continue;case"unit-width-short":e.currencyDisplay="code",e.unitDisplay="short";continue;case"unit-width-full-name":e.currencyDisplay="name",e.unitDisplay="long";continue;case"unit-width-iso-code":e.currencyDisplay="symbol";continue;case"scale":e.scale=parseFloat(o.options[0]);continue;case"rounding-mode-floor":e.roundingMode="floor";continue;case"rounding-mode-ceiling":e.roundingMode="ceil";continue;case"rounding-mode-down":e.roundingMode="trunc";continue;case"rounding-mode-up":e.roundingMode="expand";continue;case"rounding-mode-half-even":e.roundingMode="halfEven";continue;case"rounding-mode-half-down":e.roundingMode="halfTrunc";continue;case"rounding-mode-half-up":e.roundingMode="halfExpand";continue;case"integer-width":if(o.options.length>1)throw new RangeError("integer-width stems only accept a single optional option");o.options[0].replace(tr,function(t,o,i,n,r,a){if(o)e.minimumIntegerDigits=i.length;else{if(n&&r)throw new Error("We currently do not support maximum integer digits");if(a)throw new Error("We currently do not support exact integer digits")}return""});continue}if(er.test(o.stem)){e.minimumIntegerDigits=o.stem.length;continue}if(Jn.test(o.stem)){if(o.options.length>1)throw new RangeError("Fraction-precision stems only accept a single optional option");o.stem.replace(Jn,function(t,o,i,n,r,a){return"*"===i?e.minimumFractionDigits=o.length:n&&"#"===n[0]?e.maximumFractionDigits=n.length:r&&a?(e.minimumFractionDigits=r.length,e.maximumFractionDigits=r.length+a.length):(e.minimumFractionDigits=o.length,e.maximumFractionDigits=o.length),""});const t=o.options[0];"w"===t?e=ee(ee({},e),{},{trailingZeroDisplay:"stripIfInteger"}):t&&(e=ee(ee({},e),rr(t)));continue}if(Qn.test(o.stem)){e=ee(ee({},e),rr(o.stem));continue}const t=ar(o.stem);t&&(e=ee(ee({},e),t));const i=sr(o.stem);i&&(e=ee(ee({},e),i))}return e}var ur,hr,dr,pr,mr,fr,gr,_r,vr,br,yr,wr,kr,Cr,$r,Er=kt(()=>{oe(),Xn=/(?:[Eec]{1,6}|G{1,5}|[Qq]{1,5}|(?:[yYur]+|U{1,5})|[ML]{1,5}|d{1,2}|D{1,3}|F{1}|[abB]{1,5}|[hkHK]{1,2}|w{1,2}|W{1}|m{1,2}|s{1,2}|[zZOvVxX]{1,4})(?=([^']*'[^']*')*[^']*$)/g,Zn=/[\t-\r \x85\u200E\u200F\u2028\u2029]/i,Jn=/^\.(?:(0+)(\*)?|(#+)|(0+)(#+))$/g,Qn=/^(@+)?(\+|#+)?[rs]?$/g,tr=/(\*)(0+)|(#+)(0+)|(0+)/g,er=/^(0+)$/});function xr(t){return t.type===hr.literal}function Ar(t){return t.type===hr.argument}function Sr(t){return t.type===hr.number}function Tr(t){return t.type===hr.date}function Mr(t){return t.type===hr.time}function Ir(t){return t.type===hr.select}function zr(t){return t.type===hr.plural}function Pr(t){return t.type===hr.pound}function Nr(t){return t.type===hr.tag}function Or(t){return!(!t||"object"!=typeof t||t.type!==dr.number)}function Br(t){return!(!t||"object"!=typeof t||t.type!==dr.dateTime)}function Lr(t){let e=t.hourCycle;if(void 0===e&&t.hourCycles&&t.hourCycles.length&&(e=t.hourCycles[0]),e)switch(e){case"h24":return"k";case"h23":return"H";case"h12":return"h";case"h11":return"K";default:throw new Error("Invalid hourCycle")}const o=t.language;let i;return"root"!==o&&(i=t.maximize().region),(mr[i||""]||mr[o||""]||mr[`${o}-001`]||mr["001"])[0]}function Dr(t,e){return{start:t,end:e}}function jr(t){return t>=97&&t<=122||t>=65&&t<=90}function Hr(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 Rr(t){return t>=9&&t<=13||32===t||133===t||t>=8206&&t<=8207||8232===t||8233===t}function Ur(t){t.forEach(t=>{if(delete t.location,Ir(t)||zr(t))for(const e in t.options)delete t.options[e].location,Ur(t.options[e].value);else Sr(t)&&Or(t.style)||(Tr(t)||Mr(t))&&Br(t.style)?delete t.style.location:Nr(t)&&Ur(t.children)})}function Vr(t,e={}){e=ee({shouldParseSkeletons:!0,requiresOtherClause:!0},e);const o=new $r(t,e).parse();if(o.err){const t=SyntaxError(ur[o.err.kind]);throw t.location=o.err.location,t.originalMessage=o.err.message,t}return(null==e?void 0:e.captureLocation)||Ur(o.val),o.val}var Fr=kt(()=>{Er(),oe(),ur=/* @__PURE__ */function(t){return 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",t}({}),hr=/* @__PURE__ */function(t){return 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",t}({}),dr=/* @__PURE__ */function(t){return t[t.number=0]="number",t[t.dateTime=1]="dateTime",t}({}),pr=/[ \xA0\u1680\u2000-\u200A\u202F\u205F\u3000]/,mr={"001":["H","h"],419:["h","H","hB","hb"],AC:["H","h","hb","hB"],AD:["H","hB"],AE:["h","hB","hb","H"],AF:["H","hb","hB","h"],AG:["h","hb","H","hB"],AI:["H","h","hb","hB"],AL:["h","H","hB"],AM:["H","hB"],AO:["H","hB"],AR:["h","H","hB","hb"],AS:["h","H"],AT:["H","hB"],AU:["h","hb","H","hB"],AW:["H","hB"],AX:["H"],AZ:["H","hB","h"],BA:["H","hB","h"],BB:["h","hb","H","hB"],BD:["h","hB","H"],BE:["H","hB"],BF:["H","hB"],BG:["H","hB","h"],BH:["h","hB","hb","H"],BI:["H","h"],BJ:["H","hB"],BL:["H","hB"],BM:["h","hb","H","hB"],BN:["hb","hB","h","H"],BO:["h","H","hB","hb"],BQ:["H"],BR:["H","hB"],BS:["h","hb","H","hB"],BT:["h","H"],BW:["H","h","hb","hB"],BY:["H","h"],BZ:["H","h","hb","hB"],CA:["h","hb","H","hB"],CC:["H","h","hb","hB"],CD:["hB","H"],CF:["H","h","hB"],CG:["H","hB"],CH:["H","hB","h"],CI:["H","hB"],CK:["H","h","hb","hB"],CL:["h","H","hB","hb"],CM:["H","h","hB"],CN:["H","hB","hb","h"],CO:["h","H","hB","hb"],CP:["H"],CR:["h","H","hB","hb"],CU:["h","H","hB","hb"],CV:["H","hB"],CW:["H","hB"],CX:["H","h","hb","hB"],CY:["h","H","hb","hB"],CZ:["H"],DE:["H","hB"],DG:["H","h","hb","hB"],DJ:["h","H"],DK:["H"],DM:["h","hb","H","hB"],DO:["h","H","hB","hb"],DZ:["h","hB","hb","H"],EA:["H","h","hB","hb"],EC:["h","H","hB","hb"],EE:["H","hB"],EG:["h","hB","hb","H"],EH:["h","hB","hb","H"],ER:["h","H"],ES:["H","hB","h","hb"],ET:["hB","hb","h","H"],FI:["H"],FJ:["h","hb","H","hB"],FK:["H","h","hb","hB"],FM:["h","hb","H","hB"],FO:["H","h"],FR:["H","hB"],GA:["H","hB"],GB:["H","h","hb","hB"],GD:["h","hb","H","hB"],GE:["H","hB","h"],GF:["H","hB"],GG:["H","h","hb","hB"],GH:["h","H"],GI:["H","h","hb","hB"],GL:["H","h"],GM:["h","hb","H","hB"],GN:["H","hB"],GP:["H","hB"],GQ:["H","hB","h","hb"],GR:["h","H","hb","hB"],GS:["H","h","hb","hB"],GT:["h","H","hB","hb"],GU:["h","hb","H","hB"],GW:["H","hB"],GY:["h","hb","H","hB"],HK:["h","hB","hb","H"],HN:["h","H","hB","hb"],HR:["H","hB"],HU:["H","h"],IC:["H","h","hB","hb"],ID:["H"],IE:["H","h","hb","hB"],IL:["H","hB"],IM:["H","h","hb","hB"],IN:["h","H"],IO:["H","h","hb","hB"],IQ:["h","hB","hb","H"],IR:["hB","H"],IS:["H"],IT:["H","hB"],JE:["H","h","hb","hB"],JM:["h","hb","H","hB"],JO:["h","hB","hb","H"],JP:["H","K","h"],KE:["hB","hb","H","h"],KG:["H","h","hB","hb"],KH:["hB","h","H","hb"],KI:["h","hb","H","hB"],KM:["H","h","hB","hb"],KN:["h","hb","H","hB"],KP:["h","H","hB","hb"],KR:["h","H","hB","hb"],KW:["h","hB","hb","H"],KY:["h","hb","H","hB"],KZ:["H","hB"],LA:["H","hb","hB","h"],LB:["h","hB","hb","H"],LC:["h","hb","H","hB"],LI:["H","hB","h"],LK:["H","h","hB","hb"],LR:["h","hb","H","hB"],LS:["h","H"],LT:["H","h","hb","hB"],LU:["H","h","hB"],LV:["H","hB","hb","h"],LY:["h","hB","hb","H"],MA:["H","h","hB","hb"],MC:["H","hB"],MD:["H","hB"],ME:["H","hB","h"],MF:["H","hB"],MG:["H","h"],MH:["h","hb","H","hB"],MK:["H","h","hb","hB"],ML:["H"],MM:["hB","hb","H","h"],MN:["H","h","hb","hB"],MO:["h","hB","hb","H"],MP:["h","hb","H","hB"],MQ:["H","hB"],MR:["h","hB","hb","H"],MS:["H","h","hb","hB"],MT:["H","h"],MU:["H","h"],MV:["H","h"],MW:["h","hb","H","hB"],MX:["h","H","hB","hb"],MY:["hb","hB","h","H"],MZ:["H","hB"],NA:["h","H","hB","hb"],NC:["H","hB"],NE:["H"],NF:["H","h","hb","hB"],NG:["H","h","hb","hB"],NI:["h","H","hB","hb"],NL:["H","hB"],NO:["H","h"],NP:["H","h","hB"],NR:["H","h","hb","hB"],NU:["H","h","hb","hB"],NZ:["h","hb","H","hB"],OM:["h","hB","hb","H"],PA:["h","H","hB","hb"],PE:["h","H","hB","hb"],PF:["H","h","hB"],PG:["h","H"],PH:["h","hB","hb","H"],PK:["h","hB","H"],PL:["H","h"],PM:["H","hB"],PN:["H","h","hb","hB"],PR:["h","H","hB","hb"],PS:["h","hB","hb","H"],PT:["H","hB"],PW:["h","H"],PY:["h","H","hB","hb"],QA:["h","hB","hb","H"],RE:["H","hB"],RO:["H","hB"],RS:["H","hB","h"],RU:["H"],RW:["H","h"],SA:["h","hB","hb","H"],SB:["h","hb","H","hB"],SC:["H","h","hB"],SD:["h","hB","hb","H"],SE:["H"],SG:["h","hb","H","hB"],SH:["H","h","hb","hB"],SI:["H","hB"],SJ:["H"],SK:["H"],SL:["h","hb","H","hB"],SM:["H","h","hB"],SN:["H","h","hB"],SO:["h","H"],SR:["H","hB"],SS:["h","hb","H","hB"],ST:["H","hB"],SV:["h","H","hB","hb"],SX:["H","h","hb","hB"],SY:["h","hB","hb","H"],SZ:["h","hb","H","hB"],TA:["H","h","hb","hB"],TC:["h","hb","H","hB"],TD:["h","H","hB"],TF:["H","h","hB"],TG:["H","hB"],TH:["H","h"],TJ:["H","h"],TL:["H","hB","hb","h"],TM:["H","h"],TN:["h","hB","hb","H"],TO:["h","H"],TR:["H","hB"],TT:["h","hb","H","hB"],TW:["hB","hb","h","H"],TZ:["hB","hb","H","h"],UA:["H","hB","h"],UG:["hB","hb","H","h"],UM:["h","hb","H","hB"],US:["h","hb","H","hB"],UY:["h","H","hB","hb"],UZ:["H","hB","h"],VA:["H","h","hB"],VC:["h","hb","H","hB"],VE:["h","H","hB","hb"],VG:["h","hb","H","hB"],VI:["h","hb","H","hB"],VN:["H","h"],VU:["h","H"],WF:["H","hB"],WS:["h","H"],XK:["H","hB","h"],YE:["h","hB","hb","H"],YT:["H","hB"],ZA:["H","h","hb","hB"],ZM:["h","hb","H","hB"],ZW:["H","h"],"af-ZA":["H","h","hB","hb"],"ar-001":["h","hB","hb","H"],"ca-ES":["H","h","hB"],"en-001":["h","hb","H","hB"],"en-HK":["h","hb","H","hB"],"en-IL":["H","h","hb","hB"],"en-MY":["h","hb","H","hB"],"es-BR":["H","h","hB","hb"],"es-ES":["H","h","hB","hb"],"es-GQ":["H","h","hB","hb"],"fr-CA":["H","h","hB"],"gl-ES":["H","h","hB"],"gu-IN":["hB","hb","h","H"],"hi-IN":["hB","h","H"],"it-CH":["H","h","hB"],"it-IT":["H","h","hB"],"kn-IN":["hB","h","H"],"ku-SY":["H","hB"],"ml-IN":["hB","h","H"],"mr-IN":["hB","hb","h","H"],"pa-IN":["hB","hb","h","H"],"ta-IN":["hB","h","hb","H"],"te-IN":["hB","h","H"],"zu-ZA":["H","hB","hb","h"]},fr=new RegExp(`^${pr.source}*`),gr=new RegExp(`${pr.source}*$`),_r=!!Object.fromEntries,vr=!!String.prototype.trimStart,br=!!String.prototype.trimEnd,yr=_r?Object.fromEntries:function(t){const e={};for(const[o,i]of t)e[o]=i;return e},wr=vr?function(t){return t.trimStart()}:function(t){return t.replace(fr,"")},kr=br?function(t){return t.trimEnd()}:function(t){return t.replace(gr,"")},Cr=/* @__PURE__ */new RegExp("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu"),$r=class{constructor(t,e={}){this.message=t,this.position={offset:0,line:1,column:1},this.ignoreTag=!!e.ignoreTag,this.locale=e.locale,this.requiresOtherClause=!!e.requiresOtherClause,this.shouldParseSkeletons=!!e.shouldParseSkeletons}parse(){if(0!==this.offset())throw Error("parser can only be used once");return this.parseMessage(0,"",!1)}parseMessage(t,e,o){let i=[];for(;!this.isEOF();){const n=this.char();if(123===n){const e=this.parseArgument(t,o);if(e.err)return e;i.push(e.val)}else{if(125===n&&t>0)break;if(35!==n||"plural"!==e&&"selectordinal"!==e){if(60===n&&!this.ignoreTag&&47===this.peek()){if(o)break;return this.error(ur.UNMATCHED_CLOSING_TAG,Dr(this.clonePosition(),this.clonePosition()))}if(60===n&&!this.ignoreTag&&jr(this.peek()||0)){const o=this.parseTag(t,e);if(o.err)return o;i.push(o.val)}else{const o=this.parseLiteral(t,e);if(o.err)return o;i.push(o.val)}}else{const t=this.clonePosition();this.bump(),i.push({type:hr.pound,location:Dr(t,this.clonePosition())})}}}return{val:i,err:null}}parseTag(t,e){const o=this.clonePosition();this.bump();const i=this.parseTagName();if(this.bumpSpace(),this.bumpIf("/>"))return{val:{type:hr.literal,value:`<${i}/>`,location:Dr(o,this.clonePosition())},err:null};if(this.bumpIf(">")){const n=this.parseMessage(t+1,e,!0);if(n.err)return n;const r=n.val,a=this.clonePosition();if(this.bumpIf("")?{val:{type:hr.tag,value:i,children:r,location:Dr(o,this.clonePosition())},err:null}:this.error(ur.INVALID_TAG,Dr(a,this.clonePosition())))}return this.error(ur.UNCLOSED_TAG,Dr(o,this.clonePosition()))}return this.error(ur.INVALID_TAG,Dr(o,this.clonePosition()))}parseTagName(){const t=this.offset();for(this.bump();!this.isEOF()&&Hr(this.char());)this.bump();return this.message.slice(t,this.offset())}parseLiteral(t,e){const o=this.clonePosition();let i="";for(;;){const o=this.tryParseQuote(e);if(o){i+=o;continue}const n=this.tryParseUnquoted(t,e);if(n){i+=n;continue}const r=this.tryParseLeftAngleBracket();if(!r)break;i+=r}const n=Dr(o,this.clonePosition());return{val:{type:hr.literal,value:i,location:n},err:null}}tryParseLeftAngleBracket(){return this.isEOF()||60!==this.char()||!this.ignoreTag&&(jr(t=this.peek()||0)||47===t)?null:(this.bump(),"<");var t}tryParseQuote(t){if(this.isEOF()||39!==this.char())return null;switch(this.peek()){case 39:return this.bump(),this.bump(),"'";case 123:case 60:case 62:case 125:break;case 35:if("plural"===t||"selectordinal"===t)break;return null;default:return null}this.bump();const e=[this.char()];for(this.bump();!this.isEOF();){const t=this.char();if(39===t){if(39!==this.peek()){this.bump();break}e.push(39),this.bump()}else e.push(t);this.bump()}return String.fromCodePoint(...e)}tryParseUnquoted(t,e){if(this.isEOF())return null;const o=this.char();return 60===o||123===o||35===o&&("plural"===e||"selectordinal"===e)||125===o&&t>0?null:(this.bump(),String.fromCodePoint(o))}parseArgument(t,e){const o=this.clonePosition();if(this.bump(),this.bumpSpace(),this.isEOF())return this.error(ur.EXPECT_ARGUMENT_CLOSING_BRACE,Dr(o,this.clonePosition()));if(125===this.char())return this.bump(),this.error(ur.EMPTY_ARGUMENT,Dr(o,this.clonePosition()));let i=this.parseIdentifierIfPossible().value;if(!i)return this.error(ur.MALFORMED_ARGUMENT,Dr(o,this.clonePosition()));if(this.bumpSpace(),this.isEOF())return this.error(ur.EXPECT_ARGUMENT_CLOSING_BRACE,Dr(o,this.clonePosition()));switch(this.char()){case 125:return this.bump(),{val:{type:hr.argument,value:i,location:Dr(o,this.clonePosition())},err:null};case 44:return this.bump(),this.bumpSpace(),this.isEOF()?this.error(ur.EXPECT_ARGUMENT_CLOSING_BRACE,Dr(o,this.clonePosition())):this.parseArgumentOptions(t,e,i,o);default:return this.error(ur.MALFORMED_ARGUMENT,Dr(o,this.clonePosition()))}}parseIdentifierIfPossible(){const t=this.clonePosition(),e=this.offset(),o=function(t,e){var o;return Cr.lastIndex=e,null!==(o=Cr.exec(t)[1])&&void 0!==o?o:""}(this.message,e),i=e+o.length;return this.bumpTo(i),{value:o,location:Dr(t,this.clonePosition())}}parseArgumentOptions(t,e,o,i){let n=this.clonePosition(),r=this.parseIdentifierIfPossible().value,a=this.clonePosition();switch(r){case"":return this.error(ur.EXPECT_ARGUMENT_TYPE,Dr(n,a));case"number":case"date":case"time":{var s;this.bumpSpace();let t=null;if(this.bumpIf(",")){this.bumpSpace();const e=this.clonePosition(),o=this.parseSimpleArgStyleIfPossible();if(o.err)return o;const i=kr(o.val);if(0===i.length)return this.error(ur.EXPECT_ARGUMENT_STYLE,Dr(this.clonePosition(),this.clonePosition()));t={style:i,styleLocation:Dr(e,this.clonePosition())}}const e=this.tryParseArgumentClose(i);if(e.err)return e;const n=Dr(i,this.clonePosition());if(t&&t.style.startsWith("::")){let e=wr(t.style.slice(2));if("number"===r){const i=this.parseNumberSkeletonFromString(e,t.styleLocation);return i.err?i:{val:{type:hr.number,value:o,location:n,style:i.val},err:null}}{if(0===e.length)return this.error(ur.EXPECT_DATE_TIME_SKELETON,n);let i=e;this.locale&&(i=function(t,e){let o="";for(let i=0;i>1),l="a",c=Lr(e);for("H"!=c&&"k"!=c||(s=0);s-- >0;)o+=l;for(;a-- >0;)o=c+o}else o+="J"===n?"H":n}return o}(e,this.locale));const a={type:dr.dateTime,pattern:i,location:t.styleLocation,parsedOptions:this.shouldParseSkeletons?ir(i):{}};return{val:{type:"date"===r?hr.date:hr.time,value:o,location:n,style:a},err:null}}}return{val:{type:"number"===r?hr.number:"date"===r?hr.date:hr.time,value:o,location:n,style:null!==(s=null==t?void 0:t.style)&&void 0!==s?s:null},err:null}}case"plural":case"selectordinal":case"select":{const n=this.clonePosition();if(this.bumpSpace(),!this.bumpIf(","))return this.error(ur.EXPECT_SELECT_ARGUMENT_OPTIONS,Dr(n,ee({},n)));this.bumpSpace();let a=this.parseIdentifierIfPossible(),s=0;if("select"!==r&&"offset"===a.value){if(!this.bumpIf(":"))return this.error(ur.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,Dr(this.clonePosition(),this.clonePosition()));this.bumpSpace();const t=this.tryParseDecimalInteger(ur.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,ur.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE);if(t.err)return t;this.bumpSpace(),a=this.parseIdentifierIfPossible(),s=t.val}const l=this.tryParsePluralOrSelectOptions(t,r,e,a);if(l.err)return l;const c=this.tryParseArgumentClose(i);if(c.err)return c;const u=Dr(i,this.clonePosition());return"select"===r?{val:{type:hr.select,value:o,options:yr(l.val),location:u},err:null}:{val:{type:hr.plural,value:o,options:yr(l.val),offset:s,pluralType:"plural"===r?"cardinal":"ordinal",location:u},err:null}}default:return this.error(ur.INVALID_ARGUMENT_TYPE,Dr(n,a))}}tryParseArgumentClose(t){return this.isEOF()||125!==this.char()?this.error(ur.EXPECT_ARGUMENT_CLOSING_BRACE,Dr(t,this.clonePosition())):(this.bump(),{val:!0,err:null})}parseSimpleArgStyleIfPossible(){let t=0;const e=this.clonePosition();for(;!this.isEOF();)switch(this.char()){case 39:{this.bump();let t=this.clonePosition();if(!this.bumpUntil("'"))return this.error(ur.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE,Dr(t,this.clonePosition()));this.bump();break}case 123:t+=1,this.bump();break;case 125:if(!(t>0))return{val:this.message.slice(e.offset,this.offset()),err:null};t-=1;break;default:this.bump()}return{val:this.message.slice(e.offset,this.offset()),err:null}}parseNumberSkeletonFromString(t,e){let o=[];try{o=function(t){if(0===t.length)throw new Error("Number skeleton cannot be empty");const e=t.split(Zn).filter(t=>t.length>0),o=[];for(const i of e){let t=i.split("/");if(0===t.length)throw new Error("Invalid number skeleton");const[e,...n]=t;for(const o of n)if(0===o.length)throw new Error("Invalid number skeleton");o.push({stem:e,options:n})}return o}(t)}catch(i){return this.error(ur.INVALID_NUMBER_SKELETON,e)}return{val:{type:dr.number,tokens:o,location:e,parsedOptions:this.shouldParseSkeletons?cr(o):{}},err:null}}tryParsePluralOrSelectOptions(t,e,o,i){let n=!1;const r=[],a=/* @__PURE__ */new Set;let{value:s,location:l}=i;for(;;){if(0===s.length){const t=this.clonePosition();if("select"===e||!this.bumpIf("="))break;{const e=this.tryParseDecimalInteger(ur.EXPECT_PLURAL_ARGUMENT_SELECTOR,ur.INVALID_PLURAL_ARGUMENT_SELECTOR);if(e.err)return e;l=Dr(t,this.clonePosition()),s=this.message.slice(t.offset,this.offset())}}if(a.has(s))return this.error("select"===e?ur.DUPLICATE_SELECT_ARGUMENT_SELECTOR:ur.DUPLICATE_PLURAL_ARGUMENT_SELECTOR,l);"other"===s&&(n=!0),this.bumpSpace();const i=this.clonePosition();if(!this.bumpIf("{"))return this.error("select"===e?ur.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT:ur.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT,Dr(this.clonePosition(),this.clonePosition()));const c=this.parseMessage(t+1,e,o);if(c.err)return c;const u=this.tryParseArgumentClose(i);if(u.err)return u;r.push([s,{value:c.val,location:Dr(i,this.clonePosition())}]),a.add(s),this.bumpSpace(),({value:s,location:l}=this.parseIdentifierIfPossible())}return 0===r.length?this.error("select"===e?ur.EXPECT_SELECT_ARGUMENT_SELECTOR:ur.EXPECT_PLURAL_ARGUMENT_SELECTOR,Dr(this.clonePosition(),this.clonePosition())):this.requiresOtherClause&&!n?this.error(ur.MISSING_OTHER_CLAUSE,Dr(this.clonePosition(),this.clonePosition())):{val:r,err:null}}tryParseDecimalInteger(t,e){let o=1;const i=this.clonePosition();this.bumpIf("+")||this.bumpIf("-")&&(o=-1);let n=!1,r=0;for(;!this.isEOF();){const t=this.char();if(!(t>=48&&t<=57))break;n=!0,r=10*r+(t-48),this.bump()}const a=Dr(i,this.clonePosition());return n?(r*=o,Number.isSafeInteger(r)?{val:r,err:null}:this.error(e,a)):this.error(t,a)}offset(){return this.position.offset}isEOF(){return this.offset()===this.message.length}clonePosition(){return{offset:this.position.offset,line:this.position.line,column:this.position.column}}char(){const t=this.position.offset;if(t>=this.message.length)throw Error("out of bound");const e=this.message.codePointAt(t);if(void 0===e)throw Error(`Offset ${t} is at invalid UTF-16 code unit boundary`);return e}error(t,e){return{val:null,err:{kind:t,message:this.message,location:e}}}bump(){if(this.isEOF())return;const t=this.char();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)}bumpIf(t){if(this.message.startsWith(t,this.offset())){for(let e=0;e=0?(this.bumpTo(o),!0):(this.bumpTo(this.message.length),!1)}bumpTo(t){if(this.offset()>t)throw Error(`targetOffset ${t} must be greater than or equal to the current offset ${this.offset()}`);for(t=Math.min(t,this.message.length);;){const e=this.offset();if(e===t)break;if(e>t)throw Error(`targetOffset ${t} is at invalid UTF-16 code unit boundary`);if(this.bump(),this.isEOF())break}}bumpSpace(){for(;!this.isEOF()&&Rr(this.char());)this.bump()}peek(){var t;if(this.isEOF())return null;const e=this.char(),o=this.offset();return null!==(t=this.message.charCodeAt(o+(e>=65536?2:1)))&&void 0!==t?t:null}}});var Gr=kt(()=>{});function Kr(){return Kr=Object.assign?Object.assign.bind():function(t){for(var e=1;e{});function oa(t){return"function"==typeof t}function ia(t,e,o,i,n,r,a){if(1===t.length&&xr(t[0]))return[{type:Qr.literal,value:t[0].value}];const s=[];for(const c of t){if(xr(c)){s.push({type:Qr.literal,value:c.value});continue}if(Pr(c)){"number"==typeof r&&s.push({type:Qr.literal,value:o.getNumberFormat(e).format(r)});continue}const{value:t}=c;if(!n||!(t in n))throw new Jr(t,a);let l=n[t];if(Ar(c))l&&"string"!=typeof l&&"number"!=typeof l&&"bigint"!=typeof l||(l="string"==typeof l||"number"==typeof l||"bigint"==typeof l?String(l):""),s.push({type:"string"==typeof l?Qr.literal:Qr.object,value:l});else{if(Tr(c)){const t="string"==typeof c.style?i.date[c.style]:Br(c.style)?c.style.parsedOptions:void 0;s.push({type:Qr.literal,value:o.getDateTimeFormat(e,t).format(l)});continue}if(Mr(c)){const t="string"==typeof c.style?i.time[c.style]:Br(c.style)?c.style.parsedOptions:i.time.medium;s.push({type:Qr.literal,value:o.getDateTimeFormat(e,t).format(l)});continue}if(Sr(c)){const t="string"==typeof c.style?i.number[c.style]:Or(c.style)?c.style.parsedOptions:void 0;if(t&&t.scale){const e=t.scale||1;if("bigint"==typeof l){if(!Number.isInteger(e))throw new TypeError(`Cannot apply fractional scale ${e} to bigint value. Scale must be an integer when formatting bigint.`);l*=BigInt(e)}else l*=e}s.push({type:Qr.literal,value:o.getNumberFormat(e,t).format(l)});continue}if(Nr(c)){const{children:t,value:l}=c,u=n[l];if(!oa(u))throw new Zr(l,"function",a);let h=u(ia(t,e,o,i,n,r).map(t=>t.value));Array.isArray(h)||(h=[h]),s.push(...h.map(t=>({type:"string"==typeof t?Qr.literal:Qr.object,value:t})))}if(Ir(c)){const t=l,r=(Object.prototype.hasOwnProperty.call(c.options,t)?c.options[t]:void 0)||c.options.other;if(!r)throw new Xr(c.value,l,Object.keys(c.options),a);s.push(...ia(r.value,e,o,i,n));continue}if(zr(c)){const t=`=${l}`;let r=Object.prototype.hasOwnProperty.call(c.options,t)?c.options[t]:void 0;if(!r){if(!Intl.PluralRules)throw new Wr('Intl.PluralRules is not available in this environment.\nTry polyfilling it using "@formatjs/intl-pluralrules"\n',qr.MISSING_INTL_API,a);const t="bigint"==typeof l?Number(l):l,i=o.getPluralRules(e,{type:c.pluralType}).select(t-(c.offset||0));r=(Object.prototype.hasOwnProperty.call(c.options,i)?c.options[i]:void 0)||c.options.other}if(!r)throw new Xr(c.value,l,Object.keys(c.options),a);const u="bigint"==typeof l?Number(l):l;s.push(...ia(r.value,e,o,i,n,u-(c.offset||0)));continue}}}return(l=s).length<2?l:l.reduce((t,e)=>{const o=t[t.length-1];return o&&o.type===Qr.literal&&e.type===Qr.literal?o.value+=e.value:t.push(e),t},[]);var l}function na(t,e){return e?Object.keys(t).reduce((o,i)=>{var n,r;return o[i]=(n=t[i],(r=e[i])?ee(ee(ee({},n),r),Object.keys(n).reduce((t,e)=>(t[e]=ee(ee({},n[e]),r[e]),t),{})):n),o},ee({},t)):t}function ra(t){return{create:()=>({get:e=>t[e],set(e,o){t[e]=o}})}}var aa,sa,la,ca,ua,ha,da,pa,ma,fa,ga,_a,va,ba,ya,wa,ka,Ca,$a,Ea,xa,Aa,Sa,Ta,Ma,Ia,za,Pa,Na,Oa,Ba,La,Da,ja,Ha,Ra,Ua,Va,Fa,Ga,Ka,Ya,qa,Wa,Xa,Za,Ja,Qa,ts,es,os,is,ns,rs,as,ss,ls,cs,us,hs,ds,ps,ms,fs,gs,_s,vs,bs,ys,ws,ks,Cs,$s,Es,xs,As,Ss,Ts,Ms,Is,zs,Ps,Ns,Os,Bs,Ls,Ds,js,Hs,Rs,Us,Vs,Fs,Gs,Ks,Ys=kt(()=>{or(),Fr(),oe(),Gr(),ea(),qr=/* @__PURE__ */function(t){return t.MISSING_VALUE="MISSING_VALUE",t.INVALID_VALUE="INVALID_VALUE",t.MISSING_INTL_API="MISSING_INTL_API",t}({}),Wr=class extends Error{constructor(t,e,o){super(t),this.code=e,this.originalMessage=o}toString(){return`[formatjs Error: ${this.code}] ${this.message}`}},Xr=class extends Wr{constructor(t,e,o,i){super(`Invalid values for "${t}": "${e}". Options are "${Object.keys(o).join('", "')}"`,qr.INVALID_VALUE,i)}},Zr=class extends Wr{constructor(t,e,o){super(`Value for "${t}" must be of type ${e}`,qr.INVALID_VALUE,o)}},Jr=class extends Wr{constructor(t,e){super(`The intl string context variable "${t}" was not provided to the string "${e}"`,qr.MISSING_VALUE,e)}},Qr=/* @__PURE__ */function(t){return t[t.literal=0]="literal",t[t.object=1]="object",t}({}),Yr=class t{constructor(e,o=t.defaultLocale,i,n){if(this.formatterCache={number:{},dateTime:{},pluralRules:{}},this.format=t=>{const e=this.formatToParts(t);if(1===e.length)return e[0].value;const o=e.reduce((t,e)=>(t.length&&e.type===Qr.literal&&"string"==typeof t[t.length-1]?t[t.length-1]+=e.value:t.push(e.value),t),[]);return o.length<=1?o[0]||"":o},this.formatToParts=t=>ia(this.ast,this.locales,this.formatters,this.formats,t,void 0,this.message),this.resolvedOptions=()=>{var t;return{locale:(null===(t=this.resolvedLocale)||void 0===t?void 0:t.toString())||Intl.NumberFormat.supportedLocalesOf(this.locales)[0]}},this.getAst=()=>this.ast,this.locales=o,this.resolvedLocale=t.resolveLocale(o),"string"==typeof e){if(this.message=e,!t.__parse)throw new TypeError("IntlMessageFormat.__parse must be set to process `message` of type `string`");const o=n||{},i=Kr({},(function(t){if(null==t)throw new TypeError("Cannot destructure "+t)}(o),o));this.ast=t.__parse(e,ee(ee({},i),{},{locale:this.resolvedLocale}))}else this.ast=e;if(!Array.isArray(this.ast))throw new TypeError("A message must be provided as a String or AST.");this.formats=na(t.formats,i),this.formatters=n&&n.formatters||function(t={number:{},dateTime:{},pluralRules:{}}){return{getNumberFormat:Vn((...t)=>new Intl.NumberFormat(...t),{cache:ra(t.number),strategy:zn.variadic}),getDateTimeFormat:Vn((...t)=>new Intl.DateTimeFormat(...t),{cache:ra(t.dateTime),strategy:zn.variadic}),getPluralRules:Vn((...t)=>new Intl.PluralRules(...t),{cache:ra(t.pluralRules),strategy:zn.variadic})}}(this.formatterCache)}static get defaultLocale(){return t.memoizedDefaultLocale||(t.memoizedDefaultLocale=(new Intl.NumberFormat).resolvedOptions().locale),t.memoizedDefaultLocale}},Yr.memoizedDefaultLocale=null,Yr.resolveLocale=t=>{if(void 0===Intl.Locale)return;const e=Intl.NumberFormat.supportedLocalesOf(t);return e.length>0?new Intl.Locale(e[0]):new Intl.Locale("string"==typeof t?t:t[0])},Yr.__parse=Vr,Yr.formats={number:{integer:{maximumFractionDigits:0},currency:{style:"currency"},percent:{style:"percent"}},date:{short:{month:"numeric",day:"numeric",year:"2-digit"},medium:{month:"short",day:"numeric",year:"numeric"},long:{month:"long",day:"numeric",year:"numeric"},full:{weekday:"long",month:"long",day:"numeric",year:"numeric"}},time:{short:{hour:"numeric",minute:"numeric"},medium:{hour:"numeric",minute:"numeric",second:"numeric"},long:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"},full:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"}}},ta=Yr}),qs=/* @__PURE__ */$t({card:()=>aa,default:()=>la,editor:()=>sa}),Ws=kt(()=>{la={card:aa={not_found:"لم يتم العثور على الكيان"},editor:sa={card:{chips:{alignment:"محاذاة"},climate:{hvac_modes:"أوضاع HVAC",show_temperature_control:"التحكم في درجة الحرارة؟"},cover:{show_buttons_control:"أزرار التحكم؟",show_position_control:"التحكم في الموقع؟",show_tilt_position_control:"التحكم في الإمالة؟"},empty:{no_config_options:"لا تحتوي هذه البطاقة على خيارات التكوين."},fan:{show_direction_control:"التحكم بالإتجاه؟",show_oscillate_control:"التحكم في التذبذب؟",show_percentage_control:"التحكم في النسبة المئوية؟"},generic:{collapsible_controls:"تصغير عناصر التحكم عند الإيقاف",color:"اللون",content_info:"المحتوى",fill_container:"ملئ الحاوية",icon_animation:"تحريك الرمز عندما يكون نشطًا؟",icon_color:"لون الأيقونة",icon_type:"نوع الأيقونة",layout:"التخطيط",primary_info:"المعلومات الأساسية",secondary_info:"المعلومات الفرعية",use_entity_picture:"استخدم صورة الكيان؟"},humidifier:{show_target_humidity_control:"التحكم في الرطوبة؟?"},light:{incompatible_controls:"قد لا يتم عرض بعض عناصر التحكم إذا كان الضوء الخاص بك لا يدعم الميزة.",show_brightness_control:"التحكم في السطوع؟",show_color_control:"التحكم في اللون؟",show_color_temp_control:"التحكم في درجة حرارة اللون؟",use_light_color:"استخدم لون فاتح"},lock:{lock:"مقفل",open:"مفتوح",unlock:"إلغاء قفل"},"media-player":{media_controls:"التحكم في الوسائط",media_controls_list:{next:"التالي",on_off:"تشغيل/إيقاف",play_pause_stop:"تشغيل/إيقاف مؤقت/إيقاف",previous:"السابق",repeat:"وضع التكرار",shuffle:"خلط"},show_volume_level:"إظهار مستوى الصوت",use_media_artwork:"استخدم صورة الوسائط",use_media_info:"استخدم معلومات الوسائط",volume_controls:"التحكم في الصوت",volume_controls_list:{volume_buttons:"أزرار الصوت",volume_mute:"كتم",volume_set:"مستوى الصوت"}},number:{display_mode:"وضع العرض",display_mode_list:{buttons:"الأزرار",default:"الافتراضي(سحب)",slider:"سحب"}},template:{badge_color:"لون الشارة",badge_icon:"أيقونة الشارة",content:"المحتوى",entity_extra:"تستخدم في القوالب والإجراءات",label:"التسمية",multiline_secondary:"متعدد الأسطر الثانوية؟",picture:"صورة (ستحل محل الأيقونة)",primary:"المعلومات الأساسية",secondary:"المعلومات الثانوية"},title:{subtitle:"العنوان الفرعي",subtitle_tap_action:"إجراء النقر على العنوان الفرعي",title:"العنوان",title_tap_action:"إجراء النقر على العنوان"},update:{show_buttons_control:"أزرار التحكم؟"},vacuum:{commands:"الاوامر",commands_list:{on_off:"تشغيل/إيقاف"}},weather:{show_conditions:"الأحوال الجوية؟",show_temperature:"الطقس؟"}},chip:{"chip-picker":{add:"أضف رقاقة",chips:"رقاقات",clear:"مسح",edit:"تعديل",select:"اختر الرقاقة",types:{action:"إجراء","alarm-control-panel":"تنبيه",back:"رجوع",conditional:"مشروط",entity:"الكيان",light:"مظيء",menu:"القائمة",quickbar:"تبويب سريع",spacer:"مساحة",template:"قالب",weather:"الطقس"}},conditional:{chip:"رقاقة"},sub_element_editor:{title:"محرر الرقاقة"}},form:{alignment_picker:{values:{center:"توسيط",default:"المحاذاة الافتراضية",end:"نهاية",justify:"مساواة",start:"بداية"}},color_picker:{values:{default:"اللون الإفتراضي"}},icon_type_picker:{values:{default:"النوع افتراضي","entity-picture":"صورة الكيان",icon:"أيقونة",none:"لا شئ"}},info_picker:{values:{default:"المعلومات الافتراضية","last-changed":"آخر تغيير","last-updated":"آخر تحديث",name:"الإسم",none:"لا شئ",state:"الحالة"}},layout_picker:{values:{default:"تخطيط افتراضي",horizontal:"تخطيط أفقي",vertical:"تخطيط رأسي"}}}}}}),Xs=/* @__PURE__ */$t({default:()=>ua,editor:()=>ca}),Zs=kt(()=>{ua={editor:ca={card:{chips:{alignment:"Подравняване"},climate:{hvac_modes:"HVAC Режими",show_temperature_control:"Контрол на температурата?"},cover:{show_buttons_control:"Контролни бутони?",show_position_control:"Контрол на позицията?",show_tilt_position_control:"Контрол на наклона?"},fan:{show_oscillate_control:"Контрол на трептенето?",show_percentage_control:"Процентов контрол?"},generic:{collapsible_controls:"Свий контролите при изключен",content_info:"Съдържание",fill_container:"Изпълване на контейнера",icon_animation:"Анимирай иконата при активен?",icon_color:"Цвят на икона",icon_type:"Тип на икона",layout:"Оформление",primary_info:"Първостепенна информация",secondary_info:"Второстепенна информация",use_entity_picture:"Използвай снимката на обекта?"},humidifier:{show_target_humidity_control:"Контрол на влажността?"},light:{incompatible_controls:"Някои опции могат да бъдат скрити при условие че осветителното тяло не поддържа фунцията.",show_brightness_control:"Контрол на яркостта?",show_color_control:"Контрол на цвета?",show_color_temp_control:"Контрол на температурата?",use_light_color:"Използвай цвета на светлината"},lock:{lock:"Заключен",open:"Отворен",unlock:"Отключен"},"media-player":{media_controls:"Контрол на Медиата",media_controls_list:{next:"Следващ",on_off:"Вкл./Изкл.",play_pause_stop:"Пусни/пауза/стоп",previous:"Предишен",repeat:"Повтаряне",shuffle:"Разбъркано"},show_volume_level:"Покажи контрола за звук",use_media_artwork:"Използвай визуалните детайли от медията",use_media_info:"Използвай информация от медията",volume_controls:"Контрол на звука",volume_controls_list:{volume_buttons:"Бутони за звук",volume_mute:"Заглуши",volume_set:"Ниво на звука"}},template:{badge_color:"Цвят на значка",badge_icon:"Икона на значка",content:"Съдържание",entity_extra:"Използван в шаблони и действия",multiline_secondary:"Много-редова второстепенна информация?",picture:"Картина (ще замени иконата)",primary:"Първостепенна информация",secondary:"Второстепенна информация"},title:{subtitle:"Подзаглавие",title:"Заглавие"},update:{show_buttons_control:"Контролни бутони?"},vacuum:{commands:"Конади",commands_list:{on_off:"Вкл./Изкл."}},weather:{show_conditions:"Условия?",show_temperature:"Температура?"}},chip:{"chip-picker":{add:"Добави чип",chips:"Чипове",clear:"Изчисти",edit:"Редактирай",select:"Избери чип",types:{action:"Действия","alarm-control-panel":"Аларма",back:"Назад",conditional:"Условни",entity:"Обект",light:"Осветление",menu:"Меню",template:"Шаблон",weather:"Време"}},conditional:{chip:"Чип"},sub_element_editor:{title:"Чип редактор"}},form:{alignment_picker:{values:{center:"Център",default:"Основно подравняване",end:"Край",justify:"Подравнен",start:"Старт"}},color_picker:{values:{default:"Основен цвят"}},icon_type_picker:{values:{default:"Основен тип","entity-picture":"Картина на обекта",icon:"Икона",none:"Липсва"}},info_picker:{values:{default:"Основна информация","last-changed":"Последно Променен","last-updated":"Последно Актуализиран",name:"Име",none:"Липсва",state:"Състояние"}},layout_picker:{values:{default:"Основно оформление",horizontal:"Хоризонтално оформление",vertical:"Вертикално оформление"}}}}}}),Js=/* @__PURE__ */$t({card:()=>ha,default:()=>pa,editor:()=>da}),Qs=kt(()=>{pa={card:ha={not_found:"No s'ha trobat l'entitat"},editor:da={card:{chips:{alignment:"Alineació"},climate:{hvac_modes:"Modes HVAC",show_temperature_control:"Control de temperatura?"},cover:{show_buttons_control:"Botons de control?",show_position_control:"Control de posició?",show_tilt_position_control:"Control d'inclinació?"},fan:{show_oscillate_control:"Control d'oscil·lació?",show_percentage_control:"Control de percentatge?"},generic:{collapsible_controls:"Amaga els controls en desactivar",color:"Color",content_info:"Contingut",fill_container:"Emplena el contenidor",icon_animation:"Animar icona en activar?",icon_color:"Color d'icona",icon_type:"Tipus d'icona",layout:"Distribució",primary_info:"Informació primaria",secondary_info:"Informació secundaria",use_entity_picture:"Fer servir la imatge de l'entitat?"},humidifier:{show_target_humidity_control:"Control d'humitat?"},light:{incompatible_controls:"Alguns controls no es mostraran si l'entitat no suporta eixa funció.",show_brightness_control:"Control de brillantor?",show_color_control:"Control de color?",show_color_temp_control:"Control de la temperatura del color?",use_light_color:"Fes servir el color del llum"},lock:{lock:"Bloqueja",open:"Obri",unlock:"Desbloqueja"},"media-player":{media_controls:"Controls multimèdia",media_controls_list:{next:"Pista següent",on_off:"Engegar/Apagar",play_pause_stop:"Reproduïr/Pausar/Detindre",previous:"Pista anterior",repeat:"Mode de repetició",shuffle:"Mesclar"},show_volume_level:"Mostra el nivell de volum",use_media_artwork:"Fes servir l'art multimèdia",use_media_info:"Empra la informació multimèdia",volume_controls:"Controls de volum",volume_controls_list:{volume_buttons:"Botons de volum",volume_mute:"Silenci",volume_set:"Nivell de volum"}},number:{display_mode:"Mode de visualització",display_mode_list:{buttons:"Botons",default:"Per defecte (lliscant)",slider:"Lliscant"}},template:{badge_color:"Color de la insígnia",badge_icon:"Icona de la insígnia",content:"Contingut",entity_extra:"Utilitzats en plantilles i accions",label:"Etiqueta",multiline_secondary:"Secundaria en varies línies?",picture:"Imatge (reemplaçarà la icona)",primary:"Informació primaria",secondary:"Informació secundaria"},title:{subtitle:"Subtítol",subtitle_tap_action:"Acció en tocar el subtítol",title:"Títol",title_tap_action:"Acció en tocar el títol"},update:{show_buttons_control:"Botons de control?"},vacuum:{commands:"Comandaments",commands_list:{on_off:"Engegar/Apagar"}},weather:{show_conditions:"Condicions?",show_temperature:"Temperatura?"}},chip:{"chip-picker":{add:"Afegir xip",chips:"Xips",clear:"Buidar",edit:"Editar",select:"Seleccionar chip",types:{action:"Acció","alarm-control-panel":"Alarma",back:"Tornar",conditional:"Condicional",entity:"Entitat",light:"Llum",menu:"Menú",spacer:"Espai",template:"Plantilla",weather:"Oratge"}},conditional:{chip:"Xip"},sub_element_editor:{title:"Editor de xips"}},form:{alignment_picker:{values:{center:"Centre",default:"Alineació per defecte",end:"Final",justify:"Justifica",start:"Inici"}},color_picker:{values:{default:"Color per defecte"}},icon_type_picker:{values:{default:"Tipus per defecte","entity-picture":"Entitat d'imatge",icon:"Icona",none:"Cap"}},info_picker:{values:{default:"Informació per defecte","last-changed":"Últim Canvi","last-updated":"Última Actualització",name:"Nom",none:"Cap",state:"Estat"}},layout_picker:{values:{default:"Distribució per defecte",horizontal:"Distribució horitzontal",vertical:"Distribució vertical"}}}}}}),tl=/* @__PURE__ */$t({card:()=>ma,default:()=>ga,editor:()=>fa}),el=kt(()=>{ga={card:ma={not_found:"Entita nebyla nalezena"},editor:fa={card:{chips:{alignment:"Zarovnání"},climate:{hvac_modes:"Režimy HVAC",show_temperature_control:"Ovládání teploty?"},cover:{show_buttons_control:"Zobrazit ovládací tlačítka?",show_position_control:"Zobrazit ovládání polohy?",show_tilt_position_control:"Zobrazit ovládání náklonu?"},fan:{show_oscillate_control:"Ovládání oscilaceM",show_percentage_control:"Ovládání v procentech?"},generic:{collapsible_controls:"Pokud je vypnuto, skrýt ovládací prvky",content_info:"Obsah",fill_container:"Vyplnit prostor",icon_animation:"Pokud je aktivní, animovat ikonu?",icon_color:"Barva ikony",icon_type:"Typ ikony",layout:"Rozložení",primary_info:"Primární informace",secondary_info:"Sekundární informace",use_entity_picture:"Použít ikonu entity?"},humidifier:{show_target_humidity_control:"Ovládání vlhkosti?"},light:{incompatible_controls:"Některé ovládací prvky se nemusí zobrazit, pokud vaše světlo tuto funkci nepodporuje.",show_brightness_control:"Ovládání jasu?",show_color_control:"Ovládání barvy světla?",show_color_temp_control:"Ovládání teploty světla?",use_light_color:"Ikona podle barvy světla?"},lock:{lock:"Zamčeno",open:"Otevřeno",unlock:"Odemčeno"},"media-player":{media_controls:"Ovládání médií",media_controls_list:{next:"Další stopa",on_off:"Zapnout/Vypnout",play_pause_stop:"Přehrát/Pauza/Zastavit",previous:"Předchozí stopa",repeat:"Režim opakování",shuffle:"Zamíchat"},show_volume_level:"Zobrazit úroveň hlasitosti",use_media_artwork:"Použít artwork z média",use_media_info:"Použít informace z média",volume_controls:"Ovládání hlasitosti",volume_controls_list:{volume_buttons:"Tlačítka hlasitosti",volume_mute:"Ztlumit",volume_set:"Úroveň hlasitosti"}},number:{display_mode:"Režim zobrazení",display_mode_list:{buttons:"Tlačítka",default:"Výchozí (posuvník)",slider:"Posuvník"}},template:{badge_color:"Barva odznaku",badge_icon:"Ikona odznaku",content:"Obsah",entity_extra:"Použito v šablonách a akcích",multiline_secondary:"Víceřádková sekundární informace?",picture:"Obrázek (nahradí ikonu)",primary:"Primární informace",secondary:"Sekundární informace"},title:{subtitle:"Popis",subtitle_tap_action:"Akce při klepnutí na popis",title:"Nadpis",title_tap_action:"Akce při klepnutí na nadpis"},update:{show_buttons_control:"Zobrazit ovládací tlačítka?"},vacuum:{commands:"Příkazy",commands_list:{on_off:"Zapnout/Vypnout"}},weather:{show_conditions:"Zobrazit podmínky?",show_temperature:"Zobrazit teplotu?"}},chip:{"chip-picker":{add:"Přidat tlačítko",chips:"Tlačítka",clear:"Vymazat",edit:"Upravit",select:"Vybrat tlačítko",types:{action:"Akce","alarm-control-panel":"Alarm",back:"Zpět",conditional:"Podmínka",entity:"Entita",light:"Světlo",menu:"Menu",spacer:"Mezera",template:"Šablona",weather:"Počasí"}},conditional:{chip:"Tlačítko"},sub_element_editor:{title:"Editor tlačítek"}},form:{alignment_picker:{values:{center:"Na střed",default:"Výchozí zarovnání",end:"Na konec",justify:"Do bloku",start:"Na začátek"}},color_picker:{values:{default:"Výchozí barva"}},icon_type_picker:{values:{default:"Výchozí typ","entity-picture":"Ikona entity",icon:"Ikona",none:"Nic"}},info_picker:{values:{default:"Výchozí informace","last-changed":"Poslední změna","last-updated":"Poslední aktualizace",name:"Název",none:"Nic",state:"Stav"}},layout_picker:{values:{default:"Výchozí rozložení",horizontal:"Vodorovné rozložení",vertical:"Svislé rozložení"}}}}}}),ol=/* @__PURE__ */$t({card:()=>_a,default:()=>ba,editor:()=>va}),il=kt(()=>{ba={card:_a={not_found:"Enhed ikke fundet"},editor:va={card:{chips:{alignment:"Justering"},climate:{hvac_modes:"HVAC-tilstande",show_temperature_control:"Temperaturkontrol?"},cover:{show_buttons_control:"Betjeningsknapper?",show_position_control:"Positionskontrol?",show_tilt_position_control:"Tiltkontrol?"},fan:{show_oscillate_control:"Oscillationskontrol?",show_percentage_control:"Procentkontrol?"},generic:{collapsible_controls:"Skjul kontroller når slukket",color:"Farve",content_info:"Indhold",fill_container:"Fyld container",icon_animation:"Animér ikon når aktiv?",icon_color:"Ikon farve",icon_type:"Ikon type",layout:"Layout",primary_info:"Primær information",secondary_info:"Sekundær information",use_entity_picture:"Brug enhedsbillede?"},humidifier:{show_target_humidity_control:"Luftfugtighedskontrol?"},light:{incompatible_controls:"Nogle kontroller vises muligvis ikke, hvis dit lys ikke understøtter funktionen.",show_brightness_control:"Lysstyrkekontrol?",show_color_control:"Farvekontrol?",show_color_temp_control:"Temperaturfarvekontrol?",use_light_color:"Brug lysfarve"},lock:{lock:"Lås",open:"Åben",unlock:"Lås op"},"media-player":{media_controls:"Mediekontrol",media_controls_list:{next:"Næste nummer",on_off:"Tænd/Sluk",play_pause_stop:"Afspil/Pause/Stop",previous:"Forrige nummer",repeat:"Gentagelsestilstand",shuffle:"Bland"},show_volume_level:"Vis lydstyrke",use_media_artwork:"Brug mediebilleder",use_media_info:"Brug medieinformation",volume_controls:"Lydstyrkekontrol",volume_controls_list:{volume_buttons:"Lydstyrkeknapper",volume_mute:"Lydløs",volume_set:"Lydstyrke"}},number:{display_mode:"Visningstilstand",display_mode_list:{buttons:"Knapper",default:"Standard (slider)",slider:"Slider"}},template:{badge_color:"Badge farve",badge_icon:"Badge ikon",content:"Indhold",entity_extra:"Anvendes i skabeloner og handlinger",label:"Label",multiline_secondary:"Multi-linje sekundær?",picture:"Billede (erstatter ikonet)",primary:"Primær information",secondary:"Sekundær information"},title:{subtitle:"Undertitel",subtitle_tap_action:"Undertitel tryk handling",title:"Titel",title_tap_action:"Title tryk handling"},update:{show_buttons_control:"Betjeningsknapper?"},vacuum:{commands:"Kommandoer",commands_list:{on_off:"Slå til/fra"}},weather:{show_conditions:"Vejrforhold?",show_temperature:"Temperatur?"}},chip:{"chip-picker":{add:"Tilføj chip",chips:"Chips",clear:"Nulstil",edit:"Rediger",select:"Vælg chip",types:{action:"Handling","alarm-control-panel":"Alarm",back:"Tilbage",conditional:"Betinget",entity:"Enhed",light:"Lys",menu:"Menu",spacer:"Afstand",template:"Skabelon",weather:"Vejr"}},conditional:{chip:"Chip"},sub_element_editor:{title:"Chip-editor"}},form:{alignment_picker:{values:{center:"Centrer",default:"Standard justering",end:"Slut",justify:"Lige margener",start:"Start"}},color_picker:{values:{default:"Standardfarve"}},icon_type_picker:{values:{default:"Standard type","entity-picture":"Enhedsbillede",icon:"Ikon",none:"Ingen"}},info_picker:{values:{default:"Standard information","last-changed":"Sidst ændret","last-updated":"Sidst opdateret",name:"Navn",none:"Ingen",state:"Status"}},layout_picker:{values:{default:"Standard layout",horizontal:"Horisontal layout",vertical:"Vertikal layout"}}}}}}),nl=/* @__PURE__ */$t({card:()=>ya,default:()=>ka,editor:()=>wa}),rl=kt(()=>{ka={card:ya={not_found:"Entität nicht gefunden"},editor:wa={card:{chips:{alignment:"Ausrichtung"},climate:{hvac_modes:"HVAC-Modi",show_temperature_control:"Temperatursteuerung?"},cover:{show_buttons_control:"Schaltflächensteuerung?",show_position_control:"Positionssteuerung?",show_tilt_position_control:"Winkelsteuerung?"},empty:{no_config_options:"Diese Karte hat keine Optionen."},fan:{show_direction_control:"Richtungssteuerung?",show_oscillate_control:"Oszillationssteuerung?",show_percentage_control:"Prozentuale Kontrolle?"},generic:{collapsible_controls:"Schieberegler einklappen, wenn aus",color:"Farbe",content_info:"Inhalt",fill_container:"Container ausfüllen",icon_animation:"Icon animieren, wenn aktiv?",icon_color:"Icon-Farbe",icon_type:"Icon-Typ",layout:"Layout",primary_info:"Primäre Information",secondary_info:"Sekundäre Information",use_entity_picture:"Entitätsbild verwenden?"},humidifier:{show_target_humidity_control:"Luftfeuchtigkeitssteuerung?"},light:{incompatible_controls:"Einige Steuerelemente werden möglicherweise nicht angezeigt, wenn Ihr Licht diese Funktion nicht unterstützt.",show_brightness_control:"Helligkeitsregelung?",show_color_control:"Farbsteuerung?",show_color_temp_control:"Farbtemperatursteuerung?",use_light_color:"Farbsteuerung verwenden"},lock:{lock:"Verriegeln",open:"Öffnen",unlock:"Entriegeln"},"media-player":{media_controls:"Mediensteuerung",media_controls_list:{next:"Nächster Titel",on_off:"Ein/Aus",play_pause_stop:"Play/Pause/Stop",previous:"Vorheriger Titel",repeat:"Wiederholen",shuffle:"Zufällige Wiedergabe"},show_volume_level:"Lautstärke-Level anzeigen",use_media_artwork:"Mediengrafik verwenden",use_media_info:"Medieninfos verwenden",volume_controls:"Lautstärkesteuerung",volume_controls_list:{volume_buttons:"Lautstärke-Buttons",volume_mute:"Stumm",volume_set:"Lautstärke-Level"}},number:{display_mode:"Anzeigemodus",display_mode_list:{buttons:"Buttons",default:"Standard (Schieberegler)",slider:"Schieberegler"}},template:{badge_color:"Badge-Farbe",badge_icon:"Badge-Icon",content:"Inhalt",entity_extra:"Wird in Vorlagen und Aktionen verwendet",label:"Beschriftung",multiline_secondary:"Mehrzeilig sekundär?",picture:"Bild (ersetzt das Icon)",primary:"Primäre Information",secondary:"Sekundäre Information"},title:{subtitle:"Untertitel",subtitle_tap_action:"Untertitel Tipp-Aktion",title:"Titel",title_tap_action:"Titel Tipp-Aktion"},update:{show_buttons_control:"Schaltflächensteuerung?"},vacuum:{commands:"Befehle",commands_list:{on_off:"An/Ausschalten"}},weather:{show_conditions:"Bedingungen?",show_temperature:"Temperatur?"}},chip:{"chip-picker":{add:"Chip hinzufügen",chips:"Chips",clear:"Löschen",edit:"Editieren",select:"Chip auswählen",types:{action:"Aktion","alarm-control-panel":"Alarm",back:"Zurück",conditional:"Bedingung",entity:"Entität",light:"Licht",menu:"Menü",quickbar:"Quickbar",spacer:"Abstand",template:"Vorlage",weather:"Wetter"}},conditional:{chip:"Chip"},sub_element_editor:{title:"Chip Editor"}},form:{alignment_picker:{values:{center:"Mitte",default:"Standard",end:"Ende",justify:"Ausrichten",start:"Anfang"}},color_picker:{values:{default:"Standardfarbe"}},icon_type_picker:{values:{default:"Standard-Typ","entity-picture":"Entitätsbild",icon:"Icon",none:"Keines"}},info_picker:{values:{default:"Standard-Information","last-changed":"Letzte Änderung","last-updated":"Letzte Aktualisierung",name:"Name",none:"Keine",state:"Zustand"}},layout_picker:{values:{default:"Standard-Layout",horizontal:"Horizontales Layout",vertical:"Vertikales Layout"}}}}}}),al=/* @__PURE__ */$t({default:()=>$a,editor:()=>Ca}),sl=kt(()=>{$a={editor:Ca={card:{chips:{alignment:"Ευθυγράμμιση"},cover:{show_buttons_control:"Έλεγχος κουμπιών;",show_position_control:"Έλεγχος θέσης;"},fan:{show_oscillate_control:"Έλεγχος ταλάντωσης;",show_percentage_control:"Έλεγχος ποσοστού;"},generic:{content_info:"Περιεχόμενο",icon_animation:"Κίνηση εικονιδίου όταν είναι ενεργό;",icon_color:"Χρώμα εικονιδίου",layout:"Διάταξη",primary_info:"Πρωτεύουσες πληροφορίες",secondary_info:"Δευτερεύουσες πληροφορίες",use_entity_picture:"Χρήση εικόνας οντότητας;"},light:{incompatible_controls:"Ορισμένα στοιχεία ελέγχου ενδέχεται να μην εμφανίζονται εάν το φωτιστικό σας δεν υποστηρίζει τη λειτουργία.",show_brightness_control:"Έλεγχος φωτεινότητας;",show_color_control:"Έλεγχος χρώματος;",show_color_temp_control:"Έλεγχος χρώματος θερμοκρασίας;",use_light_color:"Χρήση χρώματος φωτος"},"media-player":{media_controls:"Έλεγχος πολυμέσων",media_controls_list:{next:"Επόμενο κομμάτι",on_off:"Ενεργοποίηση/απενεργοποίηση",play_pause_stop:"Αναπαραγωγή/παύση/διακοπή",previous:"Προηγούμενο κομμάτι",repeat:"Λειτουργία επανάληψης",shuffle:"Τυχαία σειρά"},use_media_artwork:"Χρήση έργων τέχνης πολυμέσων",use_media_info:"Χρήση πληροφοριών πολυμέσων",volume_controls:"Χειριστήρια έντασης ήχου",volume_controls_list:{volume_buttons:"Κουμπιά έντασης ήχου",volume_mute:"Σίγαση",volume_set:"Επίπεδο έντασης ήχου"}},template:{content:"Περιεχόμενο",entity_extra:"Χρησιμοποιείται σε πρότυπα και ενέργειες",multiline_secondary:"Δευτερεύουσες πολλαπλών γραμμών;",primary:"Πρωτεύουσες πληροφορίες",secondary:"Δευτερεύουσες πληροφορίες"},title:{subtitle:"Υπότιτλος",title:"Τίτλος"},update:{show_buttons_control:"Έλεγχος κουμπιών;"},vacuum:{commands:"Εντολές"},weather:{show_conditions:"Συνθήκες;",show_temperature:"Θερμοκρασία;"}},chip:{"chip-picker":{add:"Προσθήκη chip",chips:"Chips",clear:"Καθαρισμός",edit:"Επεξεργασία",select:"Επιλογή chip",types:{action:"Ενέργεια","alarm-control-panel":"Συναγερμός",back:"Πίσω",conditional:"Υπό προϋποθέσεις",entity:"Οντότητα",light:"Φως",menu:"Μενού",template:"Πρότυπο",weather:"Καιρός"}},conditional:{chip:"Chip"},sub_element_editor:{title:"Επεξεργαστής Chip"}},form:{alignment_picker:{values:{center:"Στοίχιση στο κέντρο",default:"Προεπιλεγμένη στοίχιση",end:"Στοίχιση δεξιά",justify:"Πλήρης στοίχιση",start:"Στοίχιση αριστερά"}},color_picker:{values:{default:"Προεπιλεγμένο χρώμα"}},info_picker:{values:{default:"Προεπιλεγμένες πληροφορίες","last-changed":"Τελευταία αλλαγή","last-updated":"Τελευταία ενημέρωση",name:"Όνομα",none:"Τίποτα",state:"Κατάσταση"}},layout_picker:{values:{default:"Προεπιλεγμένη διάταξη",horizontal:"Οριζόντια διάταξη",vertical:"Κάθετη διάταξη"}}}}}}),ll=/* @__PURE__ */$t({card:()=>Ea,default:()=>Sa,editor:()=>xa,migration:()=>Aa}),cl=kt(()=>{Sa={card:Ea={not_found:"Entity not found"},editor:xa={section:{context:"Context",content:"Content",features:"Features",interactions:"Interactions",layout:"Layout",badge:"Badge"},card:{chips:{alignment:"Alignment"},climate:{hvac_modes:"HVAC Modes",show_temperature_control:"Temperature control?"},cover:{show_buttons_control:"Control buttons?",show_position_control:"Position control?",show_tilt_position_control:"Tilt control?"},empty:{no_config_options:"This card has no config options."},fan:{show_direction_control:"Direction control?",show_oscillate_control:"Oscillate control?",show_percentage_control:"Percentage control?"},generic:{entity:"Entity",area:"Area",color:"Color",content_info:"Content",fill_container:"Fill container",icon_animation:"Animate icon when active?",icon_color:"Icon color",icon_type:"Icon type",layout:"Layout",primary_info:"Primary information",secondary_info:"Secondary information",use_entity_picture:"Use entity picture?",collapsible_controls:"Collapse controls when off",picture:"Picture",picture_helper:"If set, it will replace the icon."},humidifier:{show_target_humidity_control:"Humidity control?"},light:{incompatible_controls:"Some controls may not be displayed if your light does not support the feature.",show_brightness_control:"Brightness control?",show_color_control:"Color control?",show_color_temp_control:"Color temperature control?",use_light_color:"Use light color"},lock:{lock:"Lock",open:"Open",unlock:"Unlock"},"media-player":{media_controls:"Media controls",media_controls_list:{next:"Next track",on_off:"Turn on/off",play_pause_stop:"Play/pause/stop",previous:"Previous track",repeat:"Repeat mode",shuffle:"Shuffle"},show_volume_level:"Show volume level",use_media_artwork:"Use media artwork",use_media_info:"Use media info",volume_controls:"Volume controls",volume_controls_list:{volume_buttons:"Volume buttons",volume_mute:"Mute",volume_set:"Volume level"}},number:{display_mode:"Display Mode",display_mode_list:{buttons:"Buttons",default:"Default (slider)",slider:"Slider"}},template:{area_helper:"Used in templates and features",area:"Area",badge_color:"Badge color",badge_icon:"Badge icon",badge_text_helper:"If set, it will replace the icon.",badge_text:"Badge text",badge:"Badge",content:"Content",entity_helper:"Used in templates, interactions and features",entity_helper_legacy:"Used in templates and interactions",label:"Label",layout:"Layout",multiline_secondary_helper:"The card may be taller to fit the text and will not always align with the grid system.",multiline_secondary:"Allow multiline secondary information",primary:"Primary information",secondary:"Secondary information"},title:{alignment:"Alignment",subtitle:"Subtitle",subtitle_tap_action:"Subtitle tap action",title:"Title",title_tap_action:"Title tap action"},update:{show_buttons_control:"Control buttons?"},vacuum:{commands:"Commands",commands_list:{on_off:"Turn on/off"}},weather:{show_conditions:"Conditions?",show_temperature:"Temperature?"}},badge:{template:{label:"Label",content:"Content",entity_helper:"Used in templates and interactions",area_helper:"Used in templates"}},chip:{"chip-picker":{add:"Add chip",chips:"Chips",clear:"Clear",edit:"Edit",select:"Select chip",types:{action:"Action","alarm-control-panel":"Alarm",back:"Back",conditional:"Conditional",entity:"Entity",light:"Light",menu:"Menu",quickbar:"Quickbar",spacer:"Spacer",template:"Template",weather:"Weather"}},conditional:{chip:"Chip"},sub_element_editor:{title:"Chip editor"}},form:{alignment_picker:{values:{center:"Center",default:"Default alignment",end:"End",justify:"Justify",start:"Start"}},color_picker:{values:{default:"Default color"}},icon_type_picker:{values:{default:"Default type","entity-picture":"Entity picture",icon:"Icon",none:"None"}},info_picker:{values:{default:"Default information","last-changed":"Last Changed","last-updated":"Last Updated",name:"Name",none:"None",state:"State"}},layout_picker:{values:{default:"Default layout",horizontal:"Horizontal layout",vertical:"Vertical layout"}}}},migration:Aa={title:"Card updated",description:"Your card’s configuration has been migrated to the new version. You can find more information about the changes in {link}.",post:"the GitHub post",revert:"Revert",ok:"Ok"}}}),ul=/* @__PURE__ */$t({card:()=>Ta,default:()=>Ia,editor:()=>Ma}),hl=kt(()=>{Ia={card:Ta={not_found:"Entidad no encontrada"},editor:Ma={card:{chips:{alignment:"Alineación"},climate:{hvac_modes:"Modos de climatización",show_temperature_control:"¿Control de temperatura?"},cover:{show_buttons_control:"¿Botones de control?",show_position_control:"¿Control de posición?",show_tilt_position_control:"¿Control de inclinación?"},empty:{no_config_options:"Esta carta no tiene opciones de config."},fan:{show_direction_control:"¿Control de dirección?",show_oscillate_control:"¿Controlar oscilación?",show_percentage_control:"¿Controlar porcentaje?"},generic:{collapsible_controls:"Contraer controles cuando está apagado",color:"Color",content_info:"Contenido",fill_container:"Rellenar",icon_animation:"¿Icono animado cuando está activo?",icon_color:"Color de icono",icon_type:"Tipo de icono",layout:"Diseño",primary_info:"Información primaria",secondary_info:"Información secundaria",use_entity_picture:"¿Usar imagen de entidad?"},humidifier:{show_target_humidity_control:"¿Controlar humedad?"},light:{incompatible_controls:"Es posible que algunos controles no se muestren si la luz no es compatible con esta función.",show_brightness_control:"¿Controlar brillo?",show_color_control:"¿Controlar color?",show_color_temp_control:"¿Controlar temperatura del color?",use_light_color:"Usar color de la luz"},lock:{lock:"Bloquear",open:"Abrir",unlock:"Desbloquear"},"media-player":{media_controls:"Controles multimedia",media_controls_list:{next:"Pista siguiente",on_off:"Activar/desactivar",play_pause_stop:"Reproducir/pausa/parar",previous:"Pista anterior",repeat:"Modo de repetición",shuffle:"Aleatoria"},show_volume_level:"Mostrar nivel de volumen",use_media_artwork:"Usar ilustraciones multimedia",use_media_info:"Usar información multimedia",volume_controls:"Controles de volumen",volume_controls_list:{volume_buttons:"Botones de volumen",volume_mute:"Silenciar",volume_set:"Nivel de volumen"}},number:{display_mode:"Modo de visualización",display_mode_list:{buttons:"Botones",default:"Por defecto (deslizante)",slider:"Control deslizante"}},template:{badge_color:"Color del distintivo",badge_icon:"Icono del distintivo",content:"Contenido",entity_extra:"Utilizado en plantillas y acciones",label:"Etiqueta",multiline_secondary:"¿Secundaria multilínea?",picture:"Imagen (sustituirá al icono)",primary:"Información primaria",secondary:"Información secundaria"},title:{subtitle:"Subtítulo",subtitle_tap_action:"Acción al tocar el subtítulo",title:"Título",title_tap_action:"Acción al tocar el título"},update:{show_buttons_control:"¿Botones de control?"},vacuum:{commands:"Comandos",commands_list:{on_off:"Activar/desactivar"}},weather:{show_conditions:"¿Condiciones?",show_temperature:"¿Temperatura?"}},chip:{"chip-picker":{add:"Añadir chip",chips:"Chips",clear:"Limpiar",edit:"Editar",select:"Seleccionar chip",types:{action:"Acción","alarm-control-panel":"Alarma",back:"Volver",conditional:"Condicional",entity:"Entidad",light:"Luz",menu:"Menú",spacer:"Espaciador",template:"Plantilla",weather:"Clima"}},conditional:{chip:"Chip"},sub_element_editor:{title:"Editor de chip"}},form:{alignment_picker:{values:{center:"Centrado",default:"Alineación predeterminada",end:"Final",justify:"Justificado",start:"Inicio"}},color_picker:{values:{default:"Color predeterminado"}},icon_type_picker:{values:{default:"Por defecto","entity-picture":"Imagen de entidad",icon:"Icono",none:"Ninguno"}},info_picker:{values:{default:"Información predeterminada","last-changed":"Último cambio","last-updated":"Última actualización",name:"Nombre",none:"Ninguno",state:"Estado"}},layout_picker:{values:{default:"Diseño predeterminado",horizontal:"Diseño horizontal",vertical:"Diseño vertical"}}}}}}),dl=/* @__PURE__ */$t({card:()=>za,default:()=>Na,editor:()=>Pa}),pl=kt(()=>{Na={card:za={not_found:"Entiteettiä ei löytynyt"},editor:Pa={card:{chips:{alignment:"Asettelu"},climate:{hvac_modes:"HVAC-tilat",show_temperature_control:"Lämpötilan säätö?"},cover:{show_buttons_control:"Toimintopainikkeet?",show_position_control:"Sijainnin hallinta?",show_tilt_position_control:"Kallistuksen säätö?"},fan:{show_oscillate_control:"Oskillaation säätö?",show_percentage_control:"Prosentuaalinen säätö?"},generic:{collapsible_controls:"Supista säätimet ollessa pois-tilassa",color:"Väri",content_info:"Sisältö",fill_container:"Täytä alue",icon_animation:"Animoi kuvake, kun aktiivinen?",icon_color:"Ikonin väri",icon_type:"Kuvakkeen tyyppi",layout:"Asettelu",primary_info:"Ensisijaiset tiedot",secondary_info:"Toissijaiset tiedot",use_entity_picture:"Käytä kohteen kuvaa?"},humidifier:{show_target_humidity_control:"Kosteudenhallinta?"},light:{incompatible_controls:"Jotkin toiminnot eivät näy, jos valaisimesi ei tue niitä.",show_brightness_control:"Kirkkauden säätö?",show_color_control:"Värin säätö?",show_color_temp_control:"Värilämpötilan säätö?",use_light_color:"Käytä valaisimen väriä"},lock:{lock:"Lukitse",open:"Avaa",unlock:"Poista lukitus"},"media-player":{media_controls:"Toiminnot",media_controls_list:{next:"Seuraava kappale",on_off:"Päälle/pois",play_pause_stop:"Toista/keskeytä/pysäytä",previous:"Edellinen kappale",repeat:"Jatkuva toisto",shuffle:"Sekoita"},show_volume_level:"Näytä äänenvoimakkuuden hallinta",use_media_artwork:"Käytä median kuvituksia",use_media_info:"Käytä median tietoja",volume_controls:"Äänenvoimakkuuden hallinta",volume_controls_list:{volume_buttons:"Äänenvoimakkuuspainikkeet",volume_mute:"Mykistä",volume_set:"Äänenvoimakkuus"}},number:{display_mode:"Näyttötila",display_mode_list:{buttons:"Painikkeet",default:"Oletus (liukusäädin)",slider:"Liukusäädin"}},template:{badge_color:"Merkin väri",badge_icon:"Merkin kuvake",content:"Sisältö",entity_extra:"Käytetään malleissa ja toiminnoissa",label:"Nimiö",multiline_secondary:"Monirivinen toissijainen tieto?",picture:"Kuva (korvaa kuvakkeen)",primary:"Ensisijaiset tiedot",secondary:"Toissijaiset tiedot"},title:{subtitle:"Tekstitys",subtitle_tap_action:"Alaotsikon napautustoiminto",title:"Otsikko",title_tap_action:"Otsikkonapautustoiminto"},update:{show_buttons_control:"Toimintopainikkeet?"},vacuum:{commands:"Komennot",commands_list:{on_off:"Kytke päälle/pois"}},weather:{show_conditions:"Ehdot?",show_temperature:"Lämpötila?"}},chip:{"chip-picker":{add:"Lisää merkki",chips:"Merkit",clear:"Tyhjennä",edit:"Muokkaa",select:"Valitse merkki",types:{action:"Toiminto","alarm-control-panel":"Hälytys",back:"Takaisin",conditional:"Ehdollinen",entity:"Kohde",light:"Valaisin",menu:"Valikko",spacer:"Välikappale",template:"Malli",weather:"Sää"}},conditional:{chip:"Merkki"},sub_element_editor:{title:"Merkkieditori"}},form:{alignment_picker:{values:{center:"Keskitä",default:"Keskitys",end:"Loppu",justify:"Sovita",start:"Alku"}},color_picker:{values:{default:"Oletusväri"}},icon_type_picker:{values:{default:"Oletustyyppi","entity-picture":"Kohteen kuva",icon:"Kuvake",none:"Ei mitään"}},info_picker:{values:{default:"Oletustiedot","last-changed":"Viimeksi muuttunut","last-updated":"Viimeksi päivittynyt",name:"Nimi",none:"Ei mitään",state:"Tila"}},layout_picker:{values:{default:"Oletusasettelu",horizontal:"Vaakasuuntainen",vertical:"Pystysuuntainen"}}}}}}),ml=/* @__PURE__ */$t({card:()=>Oa,default:()=>Da,editor:()=>Ba,migration:()=>La}),fl=kt(()=>{Da={card:Oa={not_found:"Entité inconnue"},editor:Ba={badge:{template:{area_helper:"Utilisée dans les modèles",content:"Contenu",entity_helper:"Utilisée dans les modèles et les interactions",label:"Libellé"}},card:{chips:{alignment:"Alignement"},climate:{hvac_modes:"Modes du thermostat",show_temperature_control:"Contrôle de la température ?"},cover:{show_buttons_control:"Contrôle avec boutons ?",show_position_control:"Contrôle de la position ?",show_tilt_position_control:"Contrôle de l'inclinaison ?"},empty:{no_config_options:"Cette carte n'a pas de paramètres."},fan:{show_direction_control:"Contrôle de la direction ?",show_oscillate_control:"Contrôle de l'oscillation ?",show_percentage_control:"Contrôle de la vitesse ?"},generic:{area:"Pièce",collapsible_controls:"Reduire les contrôles quand éteint",color:"Couleur",content_info:"Contenu",entity:"Entité",fill_container:"Remplir le conteneur",icon_animation:"Animation de l'icône ?",icon_color:"Couleur de l'icône",icon_type:"Type d'icône",layout:"Disposition",picture:"Image",picture_helper:"Si définie, elle remplacera l'icône.",primary_info:"Information principale",secondary_info:"Information secondaire",use_entity_picture:"Utiliser l'image de l'entité ?"},humidifier:{show_target_humidity_control:"Contrôle d'humidité ?"},light:{incompatible_controls:"Certains contrôles peuvent ne pas être affichés si votre lumière ne supporte pas la fonctionnalité.",show_brightness_control:"Contrôle de luminosité ?",show_color_control:"Contrôle de la couleur ?",show_color_temp_control:"Contrôle de la température ?",use_light_color:"Utiliser la couleur de la lumière"},lock:{lock:"Verrouiller",open:"Ouvrir",unlock:"Déverrouiller"},"media-player":{media_controls:"Contrôles du media",media_controls_list:{next:"Suivant",on_off:"Allumer/Éteindre",play_pause_stop:"Lecture/pause/stop",previous:"Précédent",repeat:"Mode de répétition",shuffle:"Lecture aléatoire"},show_volume_level:"Afficher le niveau de volume",use_media_artwork:"Utiliser l'illustration du media",use_media_info:"Utiliser les informations du media",volume_controls:"Contrôles du volume",volume_controls_list:{volume_buttons:"Bouton de volume",volume_mute:"Muet",volume_set:"Niveau de volume"}},number:{display_mode:"Mode d'affichage",display_mode_list:{buttons:"Boutons",default:"Par défaut (Curseur)",slider:"Curseur"}},template:{area:"Pièce",area_helper:"Utilisée dans les modèles et les fonctionnalités",badge:"Badge",badge_color:"Couleur du badge",badge_icon:"Icône du badge",badge_text:"Texte du badge",badge_text_helper:"Si définie, elle remplacera l'icône.",content:"Contenu",entity_extra:"Utilisée pour les modèles et les actions",entity_helper:"Utilisée dans les modèles, les interactions et les fonctionnalités",entity_helper_legacy:"Utilisé dans les modèles et les interactions",label:"Libellé",layout:"Disposition",multiline_secondary:"Autoriser les informations secondaires sur plusieurs lignes",multiline_secondary_helper:"La carte peut être plus haute pour s'adapter au texte et ne s'alignera pas toujours avec le système de grille.",picture:"Image (remplacera l'icône)",primary:"Information principale",secondary:"Information secondaire"},title:{subtitle:"Sous-titre",subtitle_tap_action:"Appui sur le sous-titre",title:"Titre",title_tap_action:"Appui sur le titre"},update:{show_buttons_control:"Contrôle avec boutons ?"},vacuum:{commands:"Commandes",commands_list:{on_off:"Allumer/Éteindre"}},weather:{show_conditions:"Conditions ?",show_conditons:"Conditions ?",show_temperature:"Température ?"}},chip:{"chip-picker":{add:'Ajouter une "chip"',chips:'"Chips"',clear:"Effacer",edit:"Modifier",select:'Sélectionner une "chip"',types:{action:"Action","alarm-control-panel":"Alarme",back:"Retour",conditional:"Conditionnel",entity:"Entité",light:"Lumière",menu:"Menu",quickbar:"Barre d'accès rapide",spacer:"Espacement",template:"Modèle",weather:"Météo"}},conditional:{chip:"Chip"},sub_element_editor:{title:'Éditeur de "chip"'}},form:{alignment_picker:{values:{center:"Centré",default:"Alignement par défaut",end:"Fin",justify:"Justifié",start:"Début"}},color_picker:{values:{default:"Couleur par défaut"}},icon_type_picker:{values:{default:"Type par défaut","entity-picture":"Image de l'entité",icon:"Icône",none:"Aucune"}},info_picker:{values:{default:"Information par défaut","last-changed":"Dernière modification","last-updated":"Dernière mise à jour",name:"Nom",none:"Aucune",state:"État"}},layout_picker:{values:{default:"Disposition par défault",horizontal:"Disposition horizontale",vertical:"Disposition verticale"}}},section:{badge:"Badge",content:"Contenu",context:"Contexte",features:"Fonctionnalités",interactions:"Interactions",layout:"Disposition"}},migration:La={description:"La configuration de votre carte a été migrée vers la nouvelle version. Vous pouvez trouver plus d’informations sur les changements dans {link}.",ok:"Ok",post:"l'article sur Github",revert:"Revenir en arrière",title:"Carte mise à jour"}}}),gl=/* @__PURE__ */$t({card:()=>ja,default:()=>Ra,editor:()=>Ha}),_l=kt(()=>{Ra={card:ja={not_found:"היישות לא נמצאה"},editor:Ha={card:{chips:{alignment:"יישור"},climate:{hvac_modes:"מצבי שואב אבק",show_temperature_control:"בקרת טמפרטורה?"},cover:{show_buttons_control:"הצג כפתורי שליטה?",show_position_control:"הצג פקדי מיקום?",show_tilt_position_control:"שליטה בהטייה?"},empty:{no_config_options:"לכרטיסיה זו אין אפשרויות להגדרה."},fan:{show_direction_control:"שליטה בכיוון?",show_oscillate_control:"שליטה בהתנדנדות?",show_percentage_control:"שליטה באחוז?"},generic:{collapsible_controls:"הסתר שליטה כשאר מכובה",color:"צבע",content_info:"תוכן",fill_container:"מלא גבולות",icon_animation:"הנפש צלמית אם פעיל?",icon_color:"צבע אייקון",icon_type:"סוג צלמית",layout:"סידור",primary_info:"מידע ראשי",secondary_info:"מידע מישני",use_entity_picture:"השתמש בתמונת הישות?"},humidifier:{show_target_humidity_control:"הצג פקדי לחות?"},light:{incompatible_controls:"יתכן וחלק מהכפתורים לא יופיעו אם התאורה אינה תומכת בתכונה.",show_brightness_control:"שליטה בבהירות?",show_color_control:"הצג פקד צבע?",show_color_temp_control:"הצג פקד גוון תאורה?",use_light_color:"השתמש בצבע האור"},lock:{lock:"נעל",open:"פתח",unlock:"בטל נעילה"},"media-player":{media_controls:"שליטה במדיה",media_controls_list:{next:"רצועה הבאה",on_off:"הדלק/כבה",play_pause_stop:"נגן/השהה/הפסק",previous:"רצועה קודמת",repeat:"חזרה",shuffle:"ערבב"},show_volume_level:"הצג שליטת ווליום",use_media_artwork:"השתמש באומנות מדיה",use_media_info:"השתמש במידע מדיה",volume_controls:"שליטה בווליום",volume_controls_list:{volume_buttons:"כפתורי ווליום",volume_mute:"השתק",volume_set:"רמת ווליום"}},number:{display_mode:"הגדרת מצב תצוגה",display_mode_list:{buttons:"לחצנים",default:"ברירת מחדל (סרגל גלילה)",slider:"סרגל גלילה"}},template:{badge_color:"צבע תג",badge_icon:"צלמית תג",content:"תוכן",entity_extra:"משמש בתבניות ופעולות",label:"תווית",multiline_secondary:"מידע משני בשורות?",picture:"תמונה (תחליף את הצלמית)",primary:"מידע ראשי",secondary:"מידע מישני"},title:{subtitle:"כתובית",subtitle_tap_action:"פעולה בלחיצה על כותרת משנה",title:"כותרת",title_tap_action:"פעולה בלחיצה על הכותרת"},update:{show_buttons_control:"הצג כפתורי שליטה?"},vacuum:{commands:"פקודות",commands_list:{on_off:"כיבוי/הדלקה"},icon_animation:"הנפשת אייקון"},weather:{show_conditions:"הצג תנאים?",show_temperature:"הצג טמפרטורה?"}},chip:{"chip-picker":{add:"הוסף שבב",chips:"שבבים",clear:"נקה",edit:"ערוך",select:"בחר שבב",types:{action:"פעולה","alarm-control-panel":"אזעקה",back:"חזור",conditional:"מותנה",entity:"ישות",light:"אור",menu:"תפריט",spacer:"מרווח",template:"תבנית",weather:"מזג אוויר"}},conditional:{chip:"שבב"},sub_element_editor:{title:"עורך שבב"}},form:{alignment_picker:{values:{center:"אמצע",default:"יישור ברירת מחדל",end:"סוף",justify:"מוצדק",start:"התחלה"}},color_picker:{values:{default:"צבע ברירת מחדל"}},icon_type_picker:{values:{default:"סוג ברירת מחדל","entity-picture":"תמונת יישות",icon:"צלמית",none:"ריק"}},info_picker:{values:{default:"מידע ברירת מחדל","last-changed":"שונה לאחרונה","last-updated":"עודכן לאחרונה",name:"שם",none:"ריק",state:"מצב"}},layout_picker:{values:{default:"סידור ברירת מחדל",horizontal:"סידור מאוזן",vertical:"סידור מאונך"}}}}}}),vl=/* @__PURE__ */$t({card:()=>Ua,default:()=>Fa,editor:()=>Va}),bl=kt(()=>{Fa={card:Ua={not_found:"Entitás nem található"},editor:Va={card:{chips:{alignment:"Rendezés"},climate:{hvac_modes:"HVAC mód",show_temperature_control:"Hőmérséklet vezérlő"},cover:{show_buttons_control:"Vezérlő gombok",show_position_control:"Pozíció vezérlő",show_tilt_position_control:"Dőlésszög szabályzó"},fan:{show_oscillate_control:"Oszcilláció vezérlő",show_percentage_control:"Százalékos vezérlő"},generic:{collapsible_controls:"Vezérlők összezárása kikapcsolt állapotban",content_info:"Tartalom",fill_container:"Tároló kitöltése",icon_animation:"Ikon animálása aktív állapotban",icon_color:"Ikon szín",icon_type:"Ikon típus",layout:"Elrendezés",primary_info:"Elsődleges információ",secondary_info:"Másodlagos információ",use_entity_picture:"Entitás kép használata"},humidifier:{show_target_humidity_control:"Páratartalom vezérlő"},light:{incompatible_controls:"Azok a vezérlők nem lesznek megjelenítve, amelyeket a fényforrás nem támogat.",show_brightness_control:"Fényerő vezérlő",show_color_control:"Szín vezérlő",show_color_temp_control:"Színhőmérséklet vezérlő",use_light_color:"Fény szín használata"},lock:{lock:"Zár",open:"Nyitva",unlock:"Nyit"},"media-player":{media_controls:"Média vezérlők",media_controls_list:{next:"Következő szám",on_off:"Ki/bekapcsolás",play_pause_stop:"Lejátszás/szünet/állj",previous:"Előző szám",repeat:"Ismétlés módja",shuffle:"Véletlen lejátszás"},show_volume_level:"Hangerő mutatása",use_media_artwork:"Média borító használata",use_media_info:"Média infó használata",volume_controls:"Hangerő vezérlők",volume_controls_list:{volume_buttons:"Hangerő gombok",volume_mute:"Némítás",volume_set:"Hangerő szint"}},number:{display_mode:"Megjelenítési mód",display_mode_list:{buttons:"Gombok",default:"Alepértelmezett (csúszka)",slider:"Csúszka"}},template:{badge_color:"Jelvény szín",badge_icon:"Jelvény ikon",content:"Tartalom",entity_extra:"Műveletek és sablonok használatakor",multiline_secondary:"Másodlagost több sorba?",picture:"Kép (lecseréli az ikont)",primary:"Elsődleges információ",secondary:"Másodlagos információ"},title:{subtitle:"Alcím",subtitle_tap_action:"Alcímre koppintáskor",title:"Fejléc",title_tap_action:"Fejlécre koppintáskor"},update:{show_buttons_control:"Vezérlő gombok"},vacuum:{commands:"Utasítások",commands_list:{on_off:"Ki/Bekapcsolás"}},weather:{show_conditions:"Állapotok",show_temperature:"Hőmérséklet"}},chip:{"chip-picker":{add:"Chip hozzáadása",chips:"Chip-ek",clear:"Ürítés",edit:"Szerkesztés",select:"Chip kiválasztása",types:{action:"Művelet","alarm-control-panel":"Riasztó",back:"Vissza",conditional:"Feltételes",entity:"Entitás",light:"Fényforrás",menu:"Menü",spacer:"Térköz",template:"Sablon",weather:"Időjárás"}},conditional:{chip:"Chip"},sub_element_editor:{title:"Chip szerkesztő"}},form:{alignment_picker:{values:{center:"Közepe",default:"Alapértelmezett rendezés",end:"Vége",justify:"Sorkizárt",start:"Kezdete"}},color_picker:{values:{default:"Alapértelmezett szín"}},icon_type_picker:{values:{default:"Alapértelmezett típus","entity-picture":"Entitás kép",icon:"Ikon",none:"Egyik sem"}},info_picker:{values:{default:"Alepértelmezett információ","last-changed":"Utoljára módosítva","last-updated":"Utoljára frissítve",name:"Név",none:"Egyik sem",state:"Állapot"}},layout_picker:{values:{default:"Alapértelmezet elrendezés",horizontal:"Vízszintes elrendezés",vertical:"Függőleges elrendezés"}}}}}}),yl=/* @__PURE__ */$t({card:()=>Ga,default:()=>Ya,editor:()=>Ka}),wl=kt(()=>{Ya={card:Ga={not_found:"Entitas tidak ditemukan"},editor:Ka={card:{chips:{alignment:"Perataan"},climate:{hvac_modes:"Mode HVAC",show_temperature_control:"Kontrol suhu?"},cover:{show_buttons_control:"Tombol kontrol?",show_position_control:"Kontrol posisi?",show_tilt_position_control:"Kontrol kemiringan?"},fan:{show_oscillate_control:"Kontrol osilasi?",show_percentage_control:"Kontrol persentase?"},generic:{collapsible_controls:"Sembunyikan kontrol saat mati",color:"Warna",content_info:"Konten",fill_container:"Isi kontainer",icon_animation:"Animasikan ikon saat aktif?",icon_color:"Warna ikon",icon_type:"Tipe ikon",layout:"Tata letak",primary_info:"Informasi primer",secondary_info:"Informasi sekunder",use_entity_picture:"Gunakan gambar entitas?"},humidifier:{show_target_humidity_control:"Kontrol kelembapan?"},light:{incompatible_controls:"Beberapa kontrol mungkin tidak ditampilkan jika lampu Anda tidak mendukung fitur tersebut.",show_brightness_control:"Kontrol kecerahan?",show_color_control:"Kontrol warna?",show_color_temp_control:"Kontrol suhu warna?",use_light_color:"Gunakan warna lampu"},lock:{lock:"Kunci",open:"Buka",unlock:"Buka kunci"},"media-player":{media_controls:"Kontrol media",media_controls_list:{next:"Lagu berikutnya",on_off:"Nyalakan/Matikan",play_pause_stop:"Putar/jeda/stop",previous:"Lagu sebelumnya",repeat:"Mode pengulangan",shuffle:"Acak"},show_volume_level:"Tampilkan level volume",use_media_artwork:"Gunakan gambar seni media",use_media_info:"Gunakan info media",volume_controls:"Kontrol volume",volume_controls_list:{volume_buttons:"Tombol volume",volume_mute:"Bisukan",volume_set:"Level volume"}},number:{display_mode:"Mode Tampilan",display_mode_list:{buttons:"Tombol",default:"Bawaan (geser)",slider:"Geser"}},template:{badge_color:"Warna lencana",badge_icon:"Ikon lencana",content:"Konten",entity_extra:"Digunakan dalam templat dan tindakan",label:"Label",multiline_secondary:"Info sekunder multibaris?",picture:"Gambar (akan menggantikan ikon)",primary:"Informasi primer",secondary:"Informasi sekunder"},title:{subtitle:"Subjudul",subtitle_tap_action:"Tindakan ketuk subjudul",title:"Judul",title_tap_action:"Tindakan ketuk judul"},update:{show_buttons_control:"Tombol kontrol?"},vacuum:{commands:"Perintah",commands_list:{on_off:"Nyalakan/Matikan"}},weather:{show_conditions:"Kondisi?",show_temperature:"Suhu?"}},chip:{"chip-picker":{add:"Tambah cip",chips:"Cip",clear:"Hapus",edit:"Edit",select:"Pilih cip",types:{action:"Tindakan","alarm-control-panel":"Alarm",back:"Kembali",conditional:"Kondisional",entity:"Entitas",light:"Lampu",menu:"Menu",spacer:"Pemisah",template:"Templat",weather:"Cuaca"}},conditional:{chip:"Cip"},sub_element_editor:{title:"Editor cip"}},form:{alignment_picker:{values:{center:"Tengah",default:"Perataan bawaan",end:"Akhir",justify:"Rata kanan-kiri",start:"Awal"}},color_picker:{values:{default:"Warna bawaan"}},icon_type_picker:{values:{default:"Tipe bawaan","entity-picture":"Gambar entitas",icon:"Ikon",none:"Tidak ada"}},info_picker:{values:{default:"Informasi bawaan","last-changed":"Terakhir Diubah","last-updated":"Terakhir Diperbarui",name:"Nama",none:"Tidak ada",state:"Status"}},layout_picker:{values:{default:"Tata letak bawaan",horizontal:"Tata letak horizontal",vertical:"Tata letak vertikal"}}}}}}),kl=/* @__PURE__ */$t({card:()=>qa,default:()=>Xa,editor:()=>Wa}),Cl=kt(()=>{Xa={card:qa={not_found:"Entità non trovata"},editor:Wa={card:{chips:{alignment:"Allineamento"},climate:{hvac_modes:"Modalità del termostato",show_temperature_control:"Controllo della temperatura?"},cover:{show_buttons_control:"Pulsanti di controllo",show_position_control:"Controllo percentuale apertura",show_tilt_position_control:"Controllo percentuale inclinazione"},fan:{show_oscillate_control:"Controllo oscillazione",show_percentage_control:"Controllo potenza"},generic:{collapsible_controls:"Nascondi i controlli quando spento",color:"Colore",content_info:"Contenuto",fill_container:"Riempi il contenitore",icon_animation:"Anima l'icona quando attiva",icon_color:"Colore dell'icona",icon_type:"Tipo icona",layout:"Disposizione",primary_info:"Informazione primaria",secondary_info:"Informazione secondaria",use_entity_picture:"Usa l'immagine dell'entità"},humidifier:{show_target_humidity_control:"Controllo umidità"},light:{incompatible_controls:"Alcuni controlli potrebbero non essere mostrati se la tua luce non li supporta.",show_brightness_control:"Controllo luminosità",show_color_control:"Controllo colore",show_color_temp_control:"Controllo temperatura",use_light_color:"Usa il colore della luce"},lock:{lock:"Blocca",open:"Aperto",unlock:"Sblocca"},"media-player":{media_controls:"Controlli media",media_controls_list:{next:"Traccia successiva",on_off:"Accendi/Spegni",play_pause_stop:"Play/Pausa/Stop",previous:"Traccia precedente",repeat:"Ciclo continuo",shuffle:"Riproduzione casuale"},show_volume_level:"Mostra volume",use_media_artwork:"Usa la copertina della sorgente",use_media_info:"Mostra le informazioni della sorgente",volume_controls:"Controlli del Volume",volume_controls_list:{volume_buttons:"Bottoni del volume",volume_mute:"Silenzia",volume_set:"Livello del volume"}},number:{display_mode:"Modalità di visualizzazione",display_mode_list:{buttons:"Pulsanti",default:"Predefinito (cursore)",slider:"Cursore"}},template:{badge_color:"Colore del badge",badge_icon:"Icona del badge",content:"Contenuto",entity_extra:"Usato in templates ed azioni",label:"Etichetta",multiline_secondary:"Abilita frasi multilinea",picture:"Immagine (sostituirà l'icona)",primary:"Informazione primaria",secondary:"Informazione secondaria"},title:{subtitle:"Sottotitolo",subtitle_tap_action:"Azione di tap sul sottotitolo",title:"Titolo",title_tap_action:"Azione di tap sul titolo"},update:{show_buttons_control:"Pulsanti di controllo"},vacuum:{commands:"Comandi",commands_list:{on_off:"Accendi/Spegni"}},weather:{show_conditions:"Condizioni",show_temperature:"Temperatura"}},chip:{"chip-picker":{add:"Aggiungi chip",chips:"Chips",clear:"Rimuovi",edit:"Modifica",select:"Seleziona chip",types:{action:"Azione","alarm-control-panel":"Allarme",back:"Pulsante indietro",conditional:"Condizione",entity:"Entità",light:"Luce",menu:"Menù",spacer:"Distanziere",template:"Modello",weather:"Meteo"}},conditional:{chip:"Chip"},sub_element_editor:{title:"Editor di chip"}},form:{alignment_picker:{values:{center:"Centro",default:"Allineamento predefinito",end:"Fine",justify:"Giustificato",start:"Inizio"}},color_picker:{values:{default:"Colore predefinito"}},icon_type_picker:{values:{default:"Tipo predefinito","entity-picture":"Immagine dell'entità",icon:"Icona",none:"Nessuna"}},info_picker:{values:{default:"Informazione predefinita","last-changed":"Ultimo cambiamento","last-updated":"Ultimo aggiornamento",name:"Nome",none:"Nessuno",state:"Stato"}},layout_picker:{values:{default:"Disposizione predefinita",horizontal:"Disposizione orizzontale",vertical:"Disposizione verticale"}}}}}}),$l=/* @__PURE__ */$t({default:()=>Ja,editor:()=>Za}),El=kt(()=>{Ja={editor:Za={card:{chips:{alignment:"정렬"},climate:{hvac_modes:"HVAC 모드",show_temperature_control:"온도 조절 표시"},cover:{show_buttons_control:"컨트롤 버튼 표시",show_position_control:"위치 컨트롤 표시",show_tilt_position_control:"기울기 컨트롤 표시"},fan:{show_oscillate_control:"오실레이트 컨트롤",show_percentage_control:"퍼센트 컨트롤"},generic:{collapsible_controls:"꺼져있을 때 컨트롤 접기",content_info:"내용 정보",fill_container:"콘테이너 채우기",icon_animation:"활성화 시 아이콘 애니메이션 사용",icon_color:"아이콘 색",icon_type:"아이콘 타입",layout:"레이아웃",primary_info:"기본 정보",secondary_info:"보조 정보",use_entity_picture:"엔티티 사진 사용"},humidifier:{show_target_humidity_control:"습도 조절 표시"},light:{incompatible_controls:"조명이 기능을 지원하지 않는 경우 일부 컨트롤이 표시되지 않을 수 있습니다.",show_brightness_control:"밝기 컨트롤 표시",show_color_control:"색 컨트롤 표시",show_color_temp_control:"색 온도 컨트롤 표시",use_light_color:"조명 색 사용"},lock:{lock:"잠금",open:"열기",unlock:"잠금 해제"},"media-player":{media_controls:"미디어 컨트롤",media_controls_list:{next:"다음 트랙",on_off:"켜기/끄기",play_pause_stop:"재생/일시 정지/정지",previous:"이전 트랙",repeat:"반복 모드",shuffle:"섞기"},show_volume_level:"볼륨 레벨 표시",use_media_artwork:"미디어 아트워크 사용",use_media_info:"미디어 정보 사용",volume_controls:"볼륨 컨트롤",volume_controls_list:{volume_buttons:"볼륨 버튼",volume_mute:"음소거",volume_set:"볼륨 레벨"}},template:{badge_color:"뱃지 색",badge_icon:"뱃지 아이콘",content:"내용",entity_extra:"템플릿 및 작업에 사용",multiline_secondary:"Multiline secondary?",picture:"그림 (아이콘 대체)",primary:"기본 정보",secondary:"보조 정보"},title:{subtitle:"부제목",subtitle_tap_action:"부제목 탭 액션",title:"제목",title_tap_action:"제목 탭 액션"},update:{show_buttons_control:"컨트롤 버튼 표시"},vacuum:{commands:"명령어",commands_list:{on_off:"켜기/끄기"}},weather:{show_conditions:"조건 표시",show_temperature:"온도 표시"}},chip:{"chip-picker":{add:"칩 추가",chips:"칩",clear:"클리어",edit:"수정",select:"칩 선택",types:{action:"액션","alarm-control-panel":"알람",back:"이전",conditional:"Conditional",entity:"엔티티",light:"조명",menu:"메뉴",template:"템플릿",weather:"날씨"}},conditional:{chip:"칩"},sub_element_editor:{title:"칩 에디터"}},form:{alignment_picker:{values:{center:"중앙",default:"기본 정렬",end:"끝",justify:"행 정렬",start:"시작"}},color_picker:{values:{default:"기본 색"}},icon_type_picker:{values:{default:"기본 타입","entity-picture":"엔티티 사진",icon:"아이콘",none:"없음"}},info_picker:{values:{default:"기본 정보","last-changed":"마지막 변경","last-updated":"마지막 업데이트",name:"이름",none:"없음",state:"상태"}},layout_picker:{values:{default:"기본 레이아웃",horizontal:"수평 레이아웃",vertical:"수직 레이아웃"}}}}}}),xl=/* @__PURE__ */$t({card:()=>Qa,default:()=>es,editor:()=>ts}),Al=kt(()=>{es={card:Qa={not_found:"Enhet ikke funnet"},editor:ts={card:{chips:{alignment:"Justering"},climate:{hvac_modes:"HVAC-moduser",show_temperature_control:"Temperaturkontroll?"},cover:{show_buttons_control:"Kontrollere med knapper?",show_position_control:"Posisjonskontroll?",show_tilt_position_control:"Vippe kontroll?"},fan:{show_oscillate_control:"Oscillerende kontroll?",show_percentage_control:"Prosentvis kontroll?"},generic:{collapsible_controls:"Skjul kontroller når av",color:"Farge",content_info:"Innhold",fill_container:"Fyll beholder",icon_animation:"Animer ikon når aktivt?",icon_color:"Ikon farge",icon_type:"Ikontype",layout:"Oppsett",primary_info:"Primærinformasjon",secondary_info:"Sekundærinformasjon",use_entity_picture:"Bruk enhetsbilde?"},humidifier:{show_target_humidity_control:"Fuktighetskontroll?"},light:{incompatible_controls:"Noen kontroller vises kanskje ikke hvis lyset ditt ikke støtter denne funksjonen.",show_brightness_control:"Lysstyrkekontroll?",show_color_control:"Fargekontroll?",show_color_temp_control:"Temperatur fargekontroll?",use_light_color:"Bruk lys farge"},lock:{lock:"Lås",open:"Åpne",unlock:"Lås opp"},"media-player":{media_controls:"Media kontroller",media_controls_list:{next:"Neste spor",on_off:"Slå på/av",play_pause_stop:"Spill/pause/stopp",previous:"Forrige spor",repeat:"Gjenta",shuffle:"Bland"},show_volume_level:"Vis volumnivå",use_media_artwork:"Bruk mediabilde",use_media_info:"Bruk mediainformasjon",volume_controls:"Volumkontroller",volume_controls_list:{volume_buttons:"Volumknapper",volume_mute:"Demp",volume_set:"Volumnivå"}},number:{display_mode:"Visningsmodus",display_mode_list:{buttons:"Knapper",default:"Standard (skyveknapp)",slider:"Skyveknapp"}},template:{badge_color:"Badge farge",badge_icon:"Badge ikon",content:"Innhold",entity_extra:"Brukes i maler og handlinger",label:"Etikett",multiline_secondary:"Multilinje sekundær?",picture:"Bilde (erstatter ikonet)",primary:"Primærinformasjon",secondary:"Sekundærinformasjon"},title:{subtitle:"Undertekst",subtitle_tap_action:"Undertekst tap action",title:"Tittel",title_tap_action:"Tittel tap action"},update:{show_buttons_control:"Kontroller knapper?"},vacuum:{commands:"Kommandoer",commands_list:{on_off:"Slå på/av"}},weather:{show_conditions:"Forhold?",show_temperature:"Temperatur?"}},chip:{"chip-picker":{add:"Legg til chip",chips:"Chips",clear:"Klare",edit:"Endre",select:"Velg chip",types:{action:"Handling","alarm-control-panel":"Alarm",back:"Tilbake",conditional:"Betinget",entity:"Entitet",light:"Lys",menu:"Meny",spacer:"Mellomrom",template:"Mal",weather:"Vær"}},conditional:{chip:"Chip"},sub_element_editor:{title:"Chip redaktør"}},form:{alignment_picker:{values:{center:"Senter",default:"Standard justering",end:"Slutt",justify:"Blokkjuster",start:"Start"}},color_picker:{values:{default:"Standard farge"}},icon_type_picker:{values:{default:"Standard type","entity-picture":"Enhetsbilde",icon:"Ikon",none:"Ingen"}},info_picker:{values:{default:"Standard informasjon","last-changed":"Sist endret","last-updated":"Sist oppdatert",name:"Navn",none:"Ingen",state:"Tilstand"}},layout_picker:{values:{default:"Standardoppsett",horizontal:"Horisontalt oppsett",vertical:"Vertikalt oppsett"}}}}}}),Sl=/* @__PURE__ */$t({card:()=>os,default:()=>ns,editor:()=>is}),Tl=kt(()=>{ns={card:os={not_found:"Entiteit niet gevonden"},editor:is={card:{chips:{alignment:"Uitlijning"},climate:{hvac_modes:"HVAC-Modi",show_temperature_control:"Temperatuur bediening?"},cover:{show_buttons_control:"Bedieningsknoppen?",show_position_control:"Positie bediening?",show_tilt_position_control:"Kantel bediening?"},empty:{no_config_options:"Deze kaart heeft geen configuratie opties."},fan:{show_direction_control:"Richting bediening?",show_oscillate_control:"Oscillatie bediening?",show_percentage_control:"Bediening middels percentage?"},generic:{collapsible_controls:"Bedieningselementen verbergen wanneer uitgeschakeld",color:"Kleur",content_info:"Inhoud",fill_container:"Vul container",icon_animation:"Icoon animeren indien actief?",icon_color:"Icoon kleur",icon_type:"Icoon type",layout:"Lay-out",primary_info:"Primaire informatie",secondary_info:"Secundaire informatie",use_entity_picture:"Gebruik afbeelding van entiteit?"},humidifier:{show_target_humidity_control:"Vochtigheid bediening?"},light:{incompatible_controls:"Sommige bedieningselementen worden mogelijk niet weergegeven als uw lamp deze functie niet ondersteunt.",show_brightness_control:"Helderheidsbediening?",show_color_control:"Kleur bediening?",show_color_temp_control:"Kleurtemperatuur bediening?",use_light_color:"Gebruik licht kleur"},lock:{lock:"Vergrendel",open:"Open",unlock:"Ontgrendel"},"media-player":{media_controls:"Mediabediening",media_controls_list:{next:"Volgende nummer",on_off:"Zet aan/uit",play_pause_stop:"Speel/pauze/stop",previous:"Vorige nummer",repeat:"Herhalen",shuffle:"Willekeurig afspelen"},show_volume_level:"Toon volumeniveau",use_media_artwork:"Gebruik media omslag",use_media_info:"Gebruik media informatie",volume_controls:"Volumebediening",volume_controls_list:{volume_buttons:"Volume knoppen",volume_mute:"Dempen",volume_set:"Volumeniveau"}},number:{display_mode:"Weergave Modus",display_mode_list:{buttons:"Knoppen",default:"Standaard (schuifbalk)",slider:"Schuifbalk"}},template:{badge_color:"Badge kleur",badge_icon:"Badge icoon",content:"Inhoud",entity_extra:"Gebruikt in sjablonen en acties",label:"Label",multiline_secondary:"Secundaire informatie op meerdere regels tonen?",picture:"Afbeelding (zal het icoon vervangen)",primary:"Primaire informatie",secondary:"Secundaire informatie"},title:{subtitle:"Ondertitel",subtitle_tap_action:"Ondertitel tik actie",title:"Titel",title_tap_action:"Titel tik actie"},update:{show_buttons_control:"Bedieningsknoppen?"},vacuum:{commands:"Commando's",commands_list:{on_off:"Zet aan/uit"}},weather:{show_conditions:"Weersomstandigheden?",show_temperature:"Temperatuur?"}},chip:{"chip-picker":{add:"Toevoegen chip",chips:"Chips",clear:"Maak leeg",edit:"Bewerk",select:"Selecteer chip",types:{action:"Actie","alarm-control-panel":"Alarm",back:"Terug",conditional:"Voorwaardelijk",entity:"Entiteit",light:"Licht",menu:"Menu",spacer:"Afstandhouder",template:"Sjabloon",weather:"Weer"}},conditional:{chip:"Chip"},sub_element_editor:{title:"Chip-editor"}},form:{alignment_picker:{values:{center:"Midden",default:"Standaard uitlijning",end:"Einde",justify:"Uitlijnen",start:"Begin"}},color_picker:{values:{default:"Standaard kleur"}},icon_type_picker:{values:{default:"Standaard icoon type","entity-picture":"Entiteit afbeelding",icon:"Icoon",none:"Geen"}},info_picker:{values:{default:"Standaard informatie","last-changed":"Laatst gewijzigd","last-updated":"Laatst bijgewerkt",name:"Naam",none:"Geen",state:"Staat"}},layout_picker:{values:{default:"Standaard lay-out",horizontal:"Horizontale lay-out",vertical:"Verticale lay-out"}}}}}}),Ml=/* @__PURE__ */$t({card:()=>rs,default:()=>ss,editor:()=>as}),Il=kt(()=>{ss={card:rs={not_found:"Nie znaleziono encji"},editor:as={card:{chips:{alignment:"Wyrównanie"},climate:{hvac_modes:"Tryby urządzenia",show_temperature_control:"Sterowanie temperaturą?"},cover:{show_buttons_control:"Przyciski sterujące?",show_position_control:"Sterowanie położeniem?",show_tilt_position_control:"Sterowanie poziomem otwarcia?"},fan:{show_direction_control:"Kontrola kierunku?",show_oscillate_control:"Sterowanie oscylacją?",show_percentage_control:"Sterowanie procentowe?"},generic:{collapsible_controls:"Zwiń sterowanie, jeśli wyłączone",color:"Kolor",content_info:"Zawartość",fill_container:"Wypełnij zawartością",icon_animation:"Animować, gdy aktywny?",icon_color:"Kolor ikony",icon_type:"Typ ikony",layout:"Układ",primary_info:"Informacje główne",secondary_info:"Informacje drugorzędne",use_entity_picture:"Użyć obrazu encji?"},humidifier:{show_target_humidity_control:"Sterowanie wilgotnością?"},light:{incompatible_controls:"Niektóre funkcje są niewidoczne, jeśli światło ich nie obsługuje.",show_brightness_control:"Sterowanie jasnością?",show_color_control:"Sterowanie kolorami?",show_color_temp_control:"Sterowanie temperaturą światła?",use_light_color:"Użyj koloru światła"},lock:{lock:"Zablokuj",open:"Otwórz",unlock:"Odblokuj"},"media-player":{media_controls:"Sterowanie multimediami",media_controls_list:{next:"Następne nagranie",on_off:"Włącz/wyłącz",play_pause_stop:"Odtwórz/Pauza/Zatrzymaj",previous:"Poprzednie nagranie",repeat:"Powtarzanie",shuffle:"Losowo"},show_volume_level:"Wyświetl poziom głośności",use_media_artwork:"Użyj okładek multimediów",use_media_info:"Użyj informacji o multimediach",volume_controls:"Sterowanie głośnością",volume_controls_list:{volume_buttons:"Przyciski głośności",volume_mute:"Wycisz",volume_set:"Poziom głośności"}},number:{display_mode:"Sposób wyświetlania",display_mode_list:{buttons:"Przyciski",default:"Domyślnie (suwak)",slider:"Suwak"}},template:{badge_color:"Kolor odznaki",badge_icon:"Ikona odznaki",content:"Zawartość",entity_extra:"Używane w szablonach i akcjach",label:"Etykieta",multiline_secondary:"Drugorzędne wielowierszowe?",picture:"Obraz (zamiast ikony)",primary:"Informacje główne",secondary:"Informacje drugorzędne"},title:{subtitle:"Podtytuł",subtitle_tap_action:"Akcja na podtytule",title:"Tytuł",title_tap_action:"Akcja na tytule"},update:{show_buttons_control:"Przyciski sterujące?"},vacuum:{commands:"Polecenia",commands_list:{on_off:"Włącz/Wyłącz"}},weather:{show_conditions:"Warunki?",show_temperature:"Temperatura?"}},chip:{"chip-picker":{add:"Dodaj czip",chips:"Czipy",clear:"Wyczyść",edit:"Edytuj",select:"Wybierz czip",types:{action:"Akcja","alarm-control-panel":"Alarm",back:"Wstecz",conditional:"Warunkowy",entity:"Encja",light:"Światło",menu:"Menu",spacer:"Odstęp",template:"Szablon",weather:"Pogoda"}},conditional:{chip:"Czip"},sub_element_editor:{title:"Edytor czipów"}},form:{alignment_picker:{values:{center:"Wyśrodkowanie",default:"Wyrównanie domyślne",end:"Wyrównanie do prawej",justify:"Justowanie",start:"Wyrównanie do lewej"}},color_picker:{values:{default:"Domyślny kolor"}},icon_type_picker:{values:{default:"Domyślny typ","entity-picture":"Obraz encji",icon:"Ikona",none:"Brak"}},info_picker:{values:{default:"Domyślne informacje","last-changed":"Ostatnia zmiana","last-updated":"Ostatnia aktualizacja",name:"Nazwa",none:"Brak",state:"Stan"}},layout_picker:{values:{default:"Układ domyślny",horizontal:"Układ poziomy",vertical:"Układ pionowy"}}}}}}),zl=/* @__PURE__ */$t({card:()=>ls,default:()=>us,editor:()=>cs}),Pl=kt(()=>{us={card:ls={not_found:"Entidade não encontrada"},editor:cs={card:{chips:{alignment:"Alinhamento"},climate:{hvac_modes:"Modos do HVAC",show_temperature_control:"Controle de temperatura?"},cover:{show_buttons_control:"Botões de controle?",show_position_control:"Controle de posição?",show_tilt_position_control:"Controle de inclinação?"},empty:{no_config_options:"Esse card não possui opções de configuração."},fan:{show_direction_control:"Controle de direção?",show_oscillate_control:"Controle de oscilação?",show_percentage_control:"Controle de porcentagem?"},generic:{collapsible_controls:"Recolher controles quando desligado",color:"Cor",content_info:"Conteúdo",fill_container:"Preencher espaço",icon_animation:"Animar ícone quando ativo?",icon_color:"Cor do ícone",icon_type:"Tipo do ícone",layout:"Layout",primary_info:"Informação primária",secondary_info:"Informação secundária",use_entity_picture:"Usar imagem da entidade?"},humidifier:{show_target_humidity_control:"Controle de umidade?"},light:{incompatible_controls:"Alguns controles podem não ser exibidos se sua luz não suportar o recurso.",show_brightness_control:"Controle de brilho?",show_color_control:"Controle de cor?",show_color_temp_control:"Controle de temperatura de cor?",use_light_color:"Usar cor da luz"},lock:{lock:"Bloquear",open:"Abrir",unlock:"Desbloquear"},"media-player":{media_controls:"Controles de mídia",media_controls_list:{next:"Próxima faixa",on_off:"Ligar/Desligar",play_pause_stop:"Reproduzir/pausar/parar",previous:"Faixa anterior",repeat:"Modo repetição",shuffle:"Embaralhar"},show_volume_level:"Mostrar nível de volume",use_media_artwork:"Usar arte da mídia",use_media_info:"Usar informação da mídia",volume_controls:"Controles de volume",volume_controls_list:{volume_buttons:"Botões de volume",volume_mute:"Mudo",volume_set:"Nível de volume"}},number:{display_mode:"Modo de exibição",display_mode_list:{buttons:"Botões",default:"Padrão (deslizante)",slider:"Deslizante"}},template:{badge_color:"Cor do badge",badge_icon:"Ícone do badge",content:"Conteúdo",entity_extra:"Usado em modelos e ações",label:"Label",multiline_secondary:"Multilinha secundária?",picture:"Imagem (irá substituir o ícone)",primary:"Informação primária",secondary:"Informação secundária"},title:{subtitle:"Legenda",subtitle_tap_action:"Ação de toque na legenda",title:"Título",title_tap_action:"Ação de toque no título"},update:{show_buttons_control:"Botões de controle?"},vacuum:{commands:"Comandos",commands_list:{on_off:"Ligar/Desligar"}},weather:{show_conditions:"Condições?",show_temperature:"Temperatura?"}},chip:{"chip-picker":{add:"Adicionar chip",chips:"Chips",clear:"Limpar",edit:"Editar",select:"Selecionar chip",types:{action:"Ação","alarm-control-panel":"Alarme",back:"Voltar",conditional:"Condicional",entity:"Entidade",light:"Luz",menu:"Menu",quickbar:"Barra rápida",spacer:"Espaçador",template:"Template",weather:"Clima"}},conditional:{chip:"Chip"},sub_element_editor:{title:"Editor de chip"}},form:{alignment_picker:{values:{center:"Centro",default:"Alinhamento padrão",end:"Fim",justify:"Justificado",start:"Início"}},color_picker:{values:{default:"Cor padrão"}},icon_type_picker:{values:{default:"Tipo padrão","entity-picture":"Imagem da entidade",icon:"Ícone",none:"Nenhum"}},info_picker:{values:{default:"Informação padrão","last-changed":"Última alteração","last-updated":"Última atualização",name:"Nome",none:"Nenhum",state:"Estado"}},layout_picker:{values:{default:"Layout padrão",horizontal:"Layout horizontal",vertical:"Layout vertical"}}}}}}),Nl=/* @__PURE__ */$t({card:()=>hs,default:()=>ps,editor:()=>ds}),Ol=kt(()=>{ps={card:hs={not_found:"Entidade não encontrada"},editor:ds={card:{chips:{alignment:"Alinhamento"},climate:{hvac_modes:"Modos HVAC",show_temperature_control:"Controlo de temperatura?"},cover:{show_buttons_control:"Botões de controlo?",show_position_control:"Controlo de posição?",show_tilt_position_control:"Controlo de inclinação?"},fan:{show_oscillate_control:"Controlo de oscilação?",show_percentage_control:"Controlo de percentagem?"},generic:{collapsible_controls:"Colapsar controlos quando desligado",color:"Cor",content_info:"Conteúdo",fill_container:"Preencher contentor",icon_animation:"Animar ícone quando ativo?",icon_color:"Cor do ícone",icon_type:"Tipo de ícone",layout:"Layout",primary_info:"Informação principal",secondary_info:"Informação secundária",use_entity_picture:"Usar imagem da entidade?"},humidifier:{show_target_humidity_control:"Controlo de humidade?"},light:{incompatible_controls:"Alguns controlos podem não ser exibidos se a luz não suportar a funcionalidade.",show_brightness_control:"Controlo de brilho?",show_color_control:"Controlo de cor?",show_color_temp_control:"Controlo de temperatura da cor?",use_light_color:"Usar cor da luz"},lock:{lock:"Trancar",open:"Aberto",unlock:"Destrancar"},"media-player":{media_controls:"Controlos de media",media_controls_list:{next:"Próxima faixa",on_off:"Ligar/Desligar",play_pause_stop:"Tocar/pausa/stop",previous:"Faixa anterior",repeat:"Modo repetir",shuffle:"Baralhar"},show_volume_level:"Mostrar nível do volume",use_media_artwork:"Usar arte do media",use_media_info:"Usar informação do media",volume_controls:"Controlos de volume",volume_controls_list:{volume_buttons:"Botões de volume",volume_mute:"Calar",volume_set:"Nível do volume"}},number:{display_mode:"Modo de exibição",display_mode_list:{buttons:"Botões",default:"Por defeito (slider)",slider:"Deslizador"}},template:{badge_color:"Cor do crachá",badge_icon:"Icóne do crachá",content:"Conteúdo",entity_extra:"Usado em modelos e ações",label:"Rótulo",multiline_secondary:"Secundária multilinha?",picture:"Imagem (irá substituir o ícone)",primary:"Informação principal",secondary:"Informação secundária"},title:{subtitle:"Subtítulo",subtitle_tap_action:"Ação ao tocar no subtítulo",title:"Título",title_tap_action:"Ação ao tocar no título"},update:{show_buttons_control:"Botões de controlo?"},vacuum:{commands:"Comandos",commands_list:{on_off:"Ligar/Desligar"}},weather:{show_conditions:"Condições?",show_temperature:"Temperatura?"}},chip:{"chip-picker":{add:"Adicionar ficha",chips:"Fichas",clear:"Limpar",edit:"Editar",select:"Selecionar ficha",types:{action:"Ação","alarm-control-panel":"Alarme",back:"Voltar",conditional:"Condicional",entity:"Entidade",light:"Iluminação",menu:"Menu",spacer:"Espaçador",template:"Modelo",weather:"Clima"}},conditional:{chip:"Ficha"},sub_element_editor:{title:"Editor de fichas"}},form:{alignment_picker:{values:{center:"Centrado",default:"Alinhamento predefinido",end:"Fim",justify:"Justificado",start:"Início"}},color_picker:{values:{default:"Cor padrão"}},icon_type_picker:{values:{default:"Tipo predefinido","entity-picture":"Entidade de imagem",icon:"Ícone",none:"Nenhum"}},info_picker:{values:{default:"Informações padrão","last-changed":"Última alteração","last-updated":"Última atualização",name:"Nome",none:"Nenhum",state:"Estado"}},layout_picker:{values:{default:"Layout padrão",horizontal:"Layout horizontal",vertical:"Layout vertical"}}}}}}),Bl=/* @__PURE__ */$t({default:()=>fs,editor:()=>ms}),Ll=kt(()=>{fs={editor:ms={card:{chips:{alignment:"Aliniere"},climate:{hvac_modes:"Moduri HVAC",show_temperature_control:"Comenzi temperatură?"},cover:{show_buttons_control:"Comenzi pentru control?",show_position_control:"Comandă pentru poziție?",show_tilt_position_control:"Comandă pentru înclinare?"},fan:{icon_animation:"Animare pictograma la activare?",show_oscillate_control:"Comandă oscilație?",show_percentage_control:"Comandă procent?"},generic:{collapsible_controls:"Restrângere la dezactivare",content_info:"Conținut",fill_container:"Umplere container",icon_color:"Culoare pictogramă",icon_type:"Tip pictogramă",layout:"Aranjare",primary_info:"Informație principală",secondary_info:"Informație secundară",use_entity_picture:"Imagine?"},humidifier:{show_target_humidity_control:"Comenzi umiditate?"},light:{incompatible_controls:"Unele comenzi ar putea să nu fie afișate dacă lumina nu suportă această caracteristică.",show_brightness_control:"Comandă pentru strălucire?",show_color_control:"Comandă pentru culoare?",show_color_temp_control:"Comandă pentru temperatură de culoare?",use_light_color:"Folosește culoarea luminii"},lock:{lock:"Încuie",open:"Deschide",unlock:"Descuie"},"media-player":{media_controls:"Comenzi media",media_controls_list:{next:"Pista următoare",on_off:"Pornit/Oprit",play_pause_stop:"Redare/Pauză/Stop",previous:"Pista anterioară",repeat:"Mod repetare",shuffle:"Amestecare"},show_volume_level:"Nivel volum",use_media_artwork:"Grafică media",use_media_info:"Informații media",volume_controls:"Comenzi volum",volume_controls_list:{volume_buttons:"Comenzi volum",volume_mute:"Dezactivare sunet",volume_set:"Nivel volum"}},template:{badge_color:"Culoare insignă",badge_icon:"Pictogramă insignă",content:"Conținut",entity_extra:"Folosită în șabloane și acțiuni",multiline_secondary:"Informație secundară pe mai multe linii?",picture:"Imagine (inlocuiește pictograma)",primary:"Informație principală",secondary:"Informație secundară"},title:{subtitle:"Subtitlu",title:"Titlu"},update:{show_buttons_control:"Comenzi control?"},vacuum:{commands:"Comenzi"},weather:{show_conditions:"Condiții?",show_temperature:"Temperatură?"}},chip:{"chip-picker":{add:"Adaugă jeton",chips:"Jetoane",clear:"Șterge",edit:"Modifică",select:"Alege jeton",types:{action:"Acțiune","alarm-control-panel":"Alarmă",back:"Înapoi",conditional:"Condițional",entity:"Entitate",light:"Lumină",menu:"Meniu",template:"Șablon",weather:"Vreme"}},conditional:{chip:"Jeton"},sub_element_editor:{title:"Editor jeton"}},form:{alignment_picker:{values:{center:"Centrat",default:"Aliniere implicită",end:"Dreapta",justify:"Umplere",start:"Stânga"}},color_picker:{values:{default:"Culoare implicită"}},icon_type_picker:{values:{default:"Tip implicit","entity-picture":"Imagine",icon:"Pictogramă",none:"Niciuna"}},info_picker:{values:{default:"Informație implicită","last-changed":"Ultima modificare","last-updated":"Ultima actulizare",name:"Nume",none:"Niciuna",state:"Stare"}},layout_picker:{values:{default:"Aranjare implicită",horizontal:"Orizontală",vertical:"Verticală"}}}}}}),Dl=/* @__PURE__ */$t({card:()=>gs,default:()=>vs,editor:()=>_s}),jl=kt(()=>{vs={card:gs={not_found:"Сущность не найдена"},editor:_s={card:{chips:{alignment:"Выравнивание"},climate:{hvac_modes:"Режимы работы",show_temperature_control:"Управлять целевой температурой?"},cover:{show_buttons_control:"Добавить кнопки управления?",show_position_control:"Управлять позицией?",show_tilt_position_control:"Управлять наклоном?"},empty:{no_config_options:"Эта карточка не имеет опций конфигурации."},fan:{icon_animation:"Анимировать иконку когда включено?",show_direction_control:"Направление?",show_oscillate_control:"Oscillate control?",show_percentage_control:"Управлять процентами?"},generic:{collapsible_controls:"Сворачивать элементы управления при выключении",color:"Цвет",content_info:"Содержимое",fill_container:"Заполнение",icon_animation:"Анимировать иконку, когда активна?",icon_color:"Цвет иконки",icon_type:"Тип иконки",layout:"Расположение",primary_info:"Основная информация",secondary_info:"Второстепенная информация",use_entity_picture:"Использовать изображение объекта?"},humidifier:{show_target_humidity_control:"Управлять целевым уровенем влажности?"},light:{incompatible_controls:"Некоторые элементы управления могут не отображаться, если ваш светильник не поддерживает эти функции.",show_brightness_control:"Управлять яркостью?",show_color_control:"Управлять цветом?",show_color_temp_control:"Управлять цветовой температурой?",use_light_color:"Использовать текущий цвет света"},lock:{lock:"Закрыто",open:"Открыто",unlock:"Разблокировано"},"media-player":{media_controls:"Управление медиа-устройством",media_controls_list:{next:"Следующий трек",on_off:"Включение/выключение",play_pause_stop:"Воспроизведение/пауза/остановка",previous:"Предыдущий трек",repeat:"Режим повтора",shuffle:"Перемешивание"},show_volume_level:"Показать уровень громкости",use_media_artwork:"Использовать обложку с медиа-устройства",use_media_info:"Использовать информацию с медиа-устройства",volume_controls:"Регулятор громкости",volume_controls_list:{volume_buttons:"Кнопки громкости",volume_mute:"Без звука",volume_set:"Уровень громкости"}},number:{display_mode:"Режим отображения",display_mode_list:{buttons:"Кнопки",default:"Стандартно (слайдер)",slider:"Слайдер"}},template:{badge_color:"Цвет значка",badge_icon:"Иконка значка",content:"Содержимое",entity_extra:"Используется в шаблонах и действиях",label:"Ярлык",multiline_secondary:"Многострочная Второстепенная информация?",picture:"Изображение (заменить иконку)",primary:"Основная информация",secondary:"Второстепенная информация"},title:{subtitle:"Подзаголовок",subtitle_tap_action:"Действие при нажатии на подзаголовок",title:"Заголовок",title_tap_action:"Действие при нажатии на заголовок"},update:{show_buttons_control:"Кнопки управления?"},vacuum:{commands:"Команды",commands_list:{on_off:"Включить/выключить"}},weather:{show_conditions:"Условия?",show_temperature:"Температура?"}},chip:{"chip-picker":{add:"Добавить мини-карточку",chips:"Мини-карточки",clear:"Очистить",edit:"Изменить",select:"Выбрать мини-карточку",types:{action:"Действие","alarm-control-panel":"Тревога",back:"Назад",conditional:"Условия",entity:"Объект",light:"Освещение",menu:"Меню",quickbar:"Панель быстрого доступа",spacer:"Пробел",template:"Шаблон",weather:"Погода"}},conditional:{chip:"Мини-карточка"},sub_element_editor:{title:"Редактор мини-карточек"}},form:{alignment_picker:{values:{center:"По центру",default:"Выравнивание по умолчанию",end:"К концу",justify:"На всю ширину",start:"К началу"}},color_picker:{values:{default:"Цвет по умолчанию"}},icon_type_picker:{values:{default:"По умолчанию","entity-picture":"Изображение",icon:"Иконка",none:"Нет"}},info_picker:{values:{default:"По умолчанию","last-changed":"Последнее изменение","last-updated":"Последнее обновление",name:"Имя",none:"Нет",state:"Статус"}},layout_picker:{values:{default:"Расположение по умолчанию",horizontal:"Горизонтальное расположение",vertical:"Вертикальное расположение"}}}}}}),Hl=/* @__PURE__ */$t({card:()=>bs,default:()=>ks,editor:()=>ys,migration:()=>ws}),Rl=kt(()=>{ks={card:bs={not_found:"Entita nenájdená"},editor:ys={badge:{template:{area_helper:"Používa sa v šablónach",content:"Obsah",entity_helper:"Používa sa v šablónach a interakciách",label:"Nápis"}},card:{chips:{alignment:"Zarovnanie"},climate:{hvac_modes:"HVAC mód",show_temperature_control:"Ovládanie teploty?"},cover:{show_buttons_control:"Zobraziť ovládacie tlačidlá?",show_position_control:"Ovládanie pozície?",show_tilt_position_control:"Ovládanie natočenia?"},empty:{no_config_options:"Táto karta nemá žiadne možnosti konfigurácie."},fan:{show_direction_control:"Ovládanie smeru?",show_oscillate_control:"Ovládanie oscilácie?",show_percentage_control:"Ovládanie rýchlosti v percentách?"},generic:{area:"Oblasť",collapsible_controls:"Skryť ovládanie v stave VYP",color:"Farba",content_info:"Obsah",entity:"Entita",fill_container:"Vyplniť priestor",icon_animation:"Animovaná ikona v stave ZAP?",icon_color:"Farba ikony",icon_type:"Typ ikony",layout:"Rozloženie",picture:"Obrázok",picture_helper:"Ak je nastavené, nahradí ikonu.",primary_info:"Základné info",secondary_info:"Doplnkové info",use_entity_picture:"Použiť obrázok entity?"},humidifier:{show_target_humidity_control:"Ovládanie vlhkosti?"},light:{incompatible_controls:"Niektoré ovládacie prvky sa nemusia zobraziť, pokiaľ ich svetlo nepodporuje.",show_brightness_control:"Ovládanie jasu?",show_color_control:"Ovládanie farby?",show_color_temp_control:"Ovládanie teploty farby?",use_light_color:"Použiť farbu svetla"},lock:{lock:"Zamknuté",open:"Otvorené",unlock:"Odomknuté"},"media-player":{media_controls:"Ovládanie média",media_controls_list:{next:"Ďalšia",on_off:"Zap / Vyp",play_pause_stop:"Spustiť/pauza/stop",previous:"Predchádzajúca",repeat:"Opakovať",shuffle:"Premiešať"},show_volume_level:"Zobraziť úroveň hlasitosti",use_media_artwork:"Použiť obrázok z média",use_media_info:"Použiť info o médiu",volume_controls:"Ovládanie hlasitosti",volume_controls_list:{volume_buttons:"Tlačidlá hlasitosti",volume_mute:"Stlmiť",volume_set:"Úroveň hlasitosti"}},number:{display_mode:"Režim zobrazenia",display_mode_list:{buttons:"Tlačidlá",default:"Predvolené (posúvač)",slider:"Posúvač"}},template:{area:"Oblasť",area_helper:"Používa sa v šablónach a funkciách",badge:"Odznak",badge_color:"Farba odznaku",badge_icon:"Ikona odznaku",badge_text:"Text odznaku",badge_text_helper:"Ak je nastavené, nahradí ikonu.",content:"Obsah",entity_extra:"Použitá v šablónach a akciách",entity_helper:"Používa sa v šablónach, interakciách a funkciách",entity_helper_legacy:"Používa sa v šablónach a interakciách",label:"Štítok",layout:"Rozloženie",multiline_secondary:"Povoliť viacriadkové doplnkové informácie",multiline_secondary_helper:"Karta môže byť vyššia, aby sa do nej vošiel text, a nemusí byť vždy zarovnaná s mriežkovým systémom.",picture:"Obrázok (nahrádza ikonu)",primary:"Základné info",secondary:"Doplnkové info"},title:{subtitle:"Podnadpis",subtitle_tap_action:"Akcia klepnutia na titulky",title:"Nadpis",title_tap_action:"Akcia klepnutia na názov"},update:{show_buttons_control:"Zobraziť ovládacie tlačidlá?"},vacuum:{commands:"Príkazy",commands_list:{on_off:"Zapnúť/Vypnúť"}},weather:{show_conditions:"Zobraziť podmienky?",show_temperature:"Zobraziť teplotu?"}},chip:{"chip-picker":{add:"Pridať štítok",chips:"Štítky",clear:"Vymazať",edit:"Editovať",select:"Vybrať štítok",types:{action:"Akcia","alarm-control-panel":"Alarm",back:"Späť",conditional:"Podmienené",entity:"Entita",light:"Svetlo",menu:"Menu",quickbar:"Rýchla lišta",spacer:"Medzera",template:"Šablóna",weather:"Počasie"}},conditional:{chip:"Čip"},sub_element_editor:{title:"Editor štítkov"}},form:{alignment_picker:{values:{center:"Stred",default:"Predvolené zarovnanie",end:"Koniec",justify:"Vyplniť",start:"Začiatok"}},color_picker:{values:{default:"Predvolená farba"}},icon_type_picker:{values:{default:"Predvolený typ","entity-picture":"Obrázok entity",icon:"Ikona",none:"Žiadny"}},info_picker:{values:{default:"Predvolené informácie","last-changed":"Posledná zmena","last-updated":"Posledná aktualizácia",name:"Názov",none:"Žiadna",state:"Stav"}},layout_picker:{values:{default:"Predvolené rozloženie",horizontal:"Vodorovné rozloženie",vertical:"Zvislé rozloženie"}}},section:{badge:"Odznak",content:"Obsah",context:"Kontext",features:"Funkcie",interactions:"Interakcie",layout:"Rozloženie"}},migration:ws={description:"Nastavenie vašej karty bolo prenesené do novej verzie. Viac informácií o zmenách nájdete na {link}.",ok:"Ok",post:"príspevku na GitHub",revert:"Vrátiť späť",title:"Karta aktualizovaná"}}}),Ul=/* @__PURE__ */$t({card:()=>Cs,default:()=>Es,editor:()=>$s}),Vl=kt(()=>{Es={card:Cs={not_found:"Entiteta ni najdena"},editor:$s={card:{chips:{alignment:"Poravnava"},climate:{hvac_modes:"HVAC načini",show_temperature_control:"Nadzor temperature?"},cover:{show_buttons_control:"Gumbi za upravljanje?",show_position_control:"Nadzor položaja?",show_tilt_position_control:"Nadzor nagiba?"},fan:{show_oscillate_control:"Kontrola nihanja?",show_percentage_control:"Kontrola v odstotkih?"},generic:{collapsible_controls:"Strni kontrolnike, ko so izklopljeni",content_info:"Vsebina",fill_container:"Zapolnitev prostora",icon_animation:"Animacija ikone, ko je aktivna?",icon_color:"Barva ikone",icon_type:"Vrsta ikone",layout:"Postavitev",primary_info:"Primarna informacija",secondary_info:"Sekundarna informacija",use_entity_picture:"Uporabi sliko entitete?"},humidifier:{show_target_humidity_control:"Nadzor vlažnosti?"},light:{incompatible_controls:"Nekateri kontrolniki morda ne bodo prikazani, če vaša luč ne podpira te funkcije.",show_brightness_control:"Nadzor svetlosti?",show_color_control:"Nadzor barv?",show_color_temp_control:"Nadzor temperature barve?",use_light_color:"Uporabi svetlo barvo"},lock:{lock:"Zaklepanje",open:"Odprto",unlock:"Odkleni"},"media-player":{media_controls:"Nadzor medijev",media_controls_list:{next:"Naslednja skladba",on_off:"Vklop/izklop",play_pause_stop:"Predvajaj/pavza/ustavi",previous:"Prejšnja skladba",repeat:"Ponavljajoči način",shuffle:"Naključno"},show_volume_level:"Pokaži raven glasnosti",use_media_artwork:"Uporabite medijsko umetniško delo",use_media_info:"Uporabite informacije o medijih",volume_controls:"Kontrole glasnosti",volume_controls_list:{volume_buttons:"Gumbi za glasnost",volume_mute:"Tiho",volume_set:"Raven glasnosti"}},number:{display_mode:"Način prikaza",display_mode_list:{buttons:"Gumbi",default:"Privzeto (drsnik)",slider:"Drsnik"}},template:{badge_color:"Barva značke",badge_icon:"Ikona značke",content:"Vsebina",entity_extra:"Uporablja se v predlogah in dejanjih",multiline_secondary:"Večvrstični sekundarni?",picture:"Slika (nadomestila bo ikono)",primary:"Primarna informacija",secondary:"Sekundarna informacija"},title:{subtitle:"Podnaslov",subtitle_tap_action:"Dejanje dotika podnapisov",title:"Naziv",title_tap_action:"Dejanje dotika naslova"},update:{show_buttons_control:"Gumbi za upravljanje?"},vacuum:{commands:"Ukazi",commands_list:{on_off:"Vklop/izklop"}},weather:{show_conditions:"Pogoji?",show_temperature:"Temperatura?"}},chip:{"chip-picker":{add:"Dodaj čip",chips:"Čipi",clear:"Pobriši",edit:"Uredi",select:"Izbira čipa",types:{action:"Dejanje","alarm-control-panel":"Alarm",back:"Nazaj",conditional:"Pogojno",entity:"Entiteta",light:"Svetloba",menu:"Meni",spacer:"Distančnik",template:"Predloga",weather:"Vreme"}},conditional:{chip:"Ćiš"},sub_element_editor:{title:"Urejevalnik čipov"}},form:{alignment_picker:{values:{center:"Center",default:"Privzeta poravnava",end:"Konec",justify:"Poravnava",start:"Pričetek"}},color_picker:{values:{default:"Privzeta barva"}},icon_type_picker:{values:{default:"Privzeta vrsta","entity-picture":"Slika entitete",icon:"Ikona",none:"Brez"}},info_picker:{values:{default:"Privzete informacije","last-changed":"Zadnja sprememba","last-updated":"Zadnja posodobitev",name:"Naziv",none:"Brez",state:"Stanje"}},layout_picker:{values:{default:"Privzeta postavitev",horizontal:"Horizontalna postavitev",vertical:"Vertikalna postavitev"}}}}}}),Fl=/* @__PURE__ */$t({card:()=>xs,default:()=>Ss,editor:()=>As}),Gl=kt(()=>{Ss={card:xs={not_found:"Enheten hittades inte"},editor:As={card:{chips:{alignment:"Justering"},climate:{hvac_modes:"HVAC-lägen",show_temperature_control:"Temperaturkontroll?"},cover:{show_buttons_control:"Visa kontrollknappar?",show_position_control:"Visa positionskontroll?",show_tilt_position_control:"Visa lutningskontroll?"},empty:{no_config_options:"Detta kort har inga konfigurationsalternativ."},fan:{show_direction_control:"Riktningskontroll?",show_oscillate_control:"Kontroll för oscillera?",show_percentage_control:"Procentuell kontroll?"},generic:{collapsible_controls:"Dölj kontroller när enheten är av",color:"Färg",content_info:"Innehåll",fill_container:"Fyll container",icon_animation:"Animera ikonen när enheten är på?",icon_color:"Ikonens färg",icon_type:"Ikontyp",layout:"Layout",primary_info:"Primär information",secondary_info:"Sekundär information",use_entity_picture:"Använd enhetens bild?"},humidifier:{show_target_humidity_control:"Fuktkontroll?"},light:{incompatible_controls:"Kontroller som inte stöds av enheten kommer inte visas.",show_brightness_control:"Styr ljushet?",show_color_control:"Styr färg?",show_color_temp_control:"Färgtemperaturkontroll?",use_light_color:"Styr ljusets färg"},lock:{lock:"Lås",open:"Öppna",unlock:"Lås upp"},"media-player":{media_controls:"Mediakontroller",media_controls_list:{next:"Nästa spår",on_off:"Slå på/av",play_pause_stop:"Spela/pausa/stoppa",previous:"Föregående spår",repeat:"Upprepa",shuffle:"Blanda"},show_volume_level:"Volymkontroll",use_media_artwork:"Visa mediaomslag",use_media_info:"Använd media information",volume_controls:"Volymkontroller",volume_controls_list:{volume_buttons:"Volymknappar",volume_mute:"Ljud av",volume_set:"Volymnivå"}},number:{display_mode:"Visningsläge",display_mode_list:{buttons:"Knappar",default:"Standard (skjutreglage)",slider:"Skjutreglage"}},template:{badge_color:"Färg på märke",badge_icon:"Märke ikon",content:"Innehåll",entity_extra:"Används i mallar och åtgärder",label:"Etikett",multiline_secondary:"Sekundär med flera rader?",picture:"Bild (ersätter ikonen)",primary:"Primär information",secondary:"Sekundär information"},title:{subtitle:"Underrubrik",subtitle_tap_action:"Subtitle tap action",title:"Rubrik",title_tap_action:"Titel tryck åtgärd"},update:{show_buttons_control:"Visa kontrollknappar?"},vacuum:{commands:"Kommandon",commands_list:{on_off:"Slå av/på"}},weather:{show_conditions:"Förhållanden?",show_temperature:"Temperatur?"}},chip:{"chip-picker":{add:"Lägg till chip",chips:"Chips",clear:"Rensa",edit:"Redigera",select:"Välj chip",types:{action:"Åtgärd","alarm-control-panel":"Alarm",back:"Bakåt",conditional:"Villkorad",entity:"Enhet",light:"Ljus",menu:"Meny",quickbar:"Snabbfält",spacer:"Avståndshållare",template:"Mall",weather:"Väder"}},conditional:{chip:"Chip"},sub_element_editor:{title:"Chipredigerare"}},form:{alignment_picker:{values:{center:"Centrerad",default:"Standard (början)",end:"Slutet",justify:"Anpassa",start:"Starta"}},color_picker:{values:{default:"Standardfärg"}},icon_type_picker:{values:{default:"Standard typ","entity-picture":"Enhetsbild",icon:"Ikon",none:"Ingen"}},info_picker:{values:{default:"Förvald information","last-changed":"Sist ändrad","last-updated":"Sist uppdaterad",name:"Namn",none:"Ingen",state:"Status"}},layout_picker:{values:{default:"Standard",horizontal:"Horisontell",vertical:"Vertikal"}}}}}}),Kl=/* @__PURE__ */$t({card:()=>Ts,default:()=>Is,editor:()=>Ms}),Yl=kt(()=>{Is={card:Ts={not_found:"Varlık bulunamadı"},editor:Ms={card:{chips:{alignment:"Hizalama"},climate:{hvac_modes:"HVAC Modları",show_temperature_control:"Sıcaklık kontrolü?"},cover:{show_buttons_control:"Düğme kontrolleri?",show_position_control:"Pozisyon kontrolü?",show_tilt_position_control:"Eğim kontrolü?"},empty:{no_config_options:"Bu kartın yapılandırma seçeneği yok."},fan:{show_direction_control:"Yön kontrolü?",show_oscillate_control:"Salınım kontrolü?",show_percentage_control:"Yüzde kontrolü?"},generic:{collapsible_controls:"Kapalıyken kontrolleri daralt",color:"Renk",content_info:"İçerik",fill_container:"Alanı doldur",icon_animation:"Aktif olduğunda simgeyi hareket ettir?",icon_color:"Simge renki",icon_type:"İkon tipi",layout:"Düzen",primary_info:"Birinci bilgi",secondary_info:"İkinci bilgi",use_entity_picture:"Varlık resmi kullanılsın?"},humidifier:{show_target_humidity_control:"Nem kontrolü?"},light:{incompatible_controls:"Kullandığınız lamba bu özellikleri desteklemiyorsa bazı kontroller görüntülenemeyebilir.",show_brightness_control:"Parlaklık kontrolü?",show_color_control:"Renk kontrolü?",show_color_temp_control:"Renk ısısı kontrolü?",use_light_color:"Işık rengini kullan"},lock:{lock:"Kilitle",open:"Aç",unlock:"Kilidi aç"},"media-player":{media_controls:"Medya kontrolleri",media_controls_list:{next:"Sonraki parça",on_off:"Aç/Kapat",play_pause_stop:"Oynat/duraklat/durdur",previous:"Önceki parça",repeat:"Tekrarlama modu",shuffle:"Karışık çal"},show_volume_level:"Ses seviyesini göster",use_media_artwork:"Medya resimlerini kullan",use_media_info:"Medya bilgilerini kullan",volume_controls:"Ses seviyesi kontrolleri",volume_controls_list:{volume_buttons:"Ses butonları",volume_mute:"Sessize al",volume_set:"Ses seviyesi"}},number:{display_mode:"Görüntüleme Modu",display_mode_list:{buttons:"Butonlar",default:"Varsayılan (kayan)",slider:"Kayan"}},template:{badge_color:"Rozet rengi",badge_icon:"Rozet simgesi",content:"İçerik",entity_extra:"Şablonlarda ve eylemlerde kullanılsın",label:"Etiket",multiline_secondary:"İkinci bilgi çok satır olsun?",picture:"Resim (ikonun yerine geçecek)",primary:"Birinci bilgi",secondary:"İkinci bilgi"},title:{subtitle:"Altbaşlık",subtitle_tap_action:"Dokunma eylemi alt başlığı",title:"Başlık",title_tap_action:"Dokunma eylemi başlığı"},update:{show_buttons_control:"Düğme kontrolü?"},vacuum:{commands:"Komutlar",commands_list:{on_off:"Aç/Kapat"}},weather:{show_conditions:"Hava koşulu?",show_temperature:"Sıcaklık?"}},chip:{"chip-picker":{add:"Chip ekle",chips:"Chipler",clear:"Temizle",edit:"Düzenle",select:"Chip seç",types:{action:"Eylem","alarm-control-panel":"Alarm",back:"Geri",conditional:"Koşullu",entity:"Varlık",light:"Işık",menu:"Menü",spacer:"Boşluk",template:"Şablon",weather:"Hava Durumu"}},conditional:{chip:"Chip"},sub_element_editor:{title:"Chip düzenleyici"}},form:{alignment_picker:{values:{center:"Ortala",default:"Varsayılan hizalama",end:"Sağa yasla",justify:"İki yana yasla",start:"Sola yasla"}},color_picker:{values:{default:"Varsayılan renk"}},icon_type_picker:{values:{default:"Varsayılan tip","entity-picture":"Varlık resmi",icon:"Simge",none:"Hiçbiri"}},info_picker:{values:{default:"Varsayılan bilgi","last-changed":"Son Değişim","last-updated":"Son Güncelleme",name:"İsim",none:"None",state:"Durum"}},layout_picker:{values:{default:"Varsayılan düzen",horizontal:"Yatay düzen",vertical:"Dikey düzen"}}}}}}),ql=/* @__PURE__ */$t({card:()=>zs,default:()=>Ns,editor:()=>Ps}),Wl=kt(()=>{Ns={card:zs={not_found:"Сутність не знайдено"},editor:Ps={card:{chips:{alignment:"Вирівнювання"},climate:{hvac_modes:"Режими",show_temperature_control:"Керування температурою?"},cover:{show_buttons_control:"Кнопки керування?",show_position_control:"Керування позицією?",show_tilt_position_control:"Керування нахилом?"},fan:{show_oscillate_control:"Керування повротом?",show_percentage_control:"Керування швидкістю?"},generic:{collapsible_controls:"Приховувати елементи керування коли вимкнено?",content_info:"Вміст",fill_container:"Заповнити контейнер",icon_animation:"Анімувати іконку при активації?",icon_color:"Колір іконки",icon_type:"Тип іконки",layout:"Розташування",primary_info:"Головна інформація",secondary_info:"Додаткова інформація",use_entity_picture:"Використовувати зображення сутності?"},humidifier:{show_target_humidity_control:"Керування вологістю?"},light:{incompatible_controls:"Деякі елементи керування можуть не відображатись якщо ваш пристрій не підтримує цю функцію.",show_brightness_control:"Контроль яскравості?",show_color_control:"Керування кольором світла?",show_color_temp_control:"Керування температурою світла?",use_light_color:"Використовувати колір світла"},lock:{lock:"Зачинити",open:"Відкрити",unlock:"Відчинити"},"media-player":{media_controls:"Керування медіа",media_controls_list:{next:"Наступний трек",on_off:"Увімкнути/Вимкнути",play_pause_stop:"Відтворити/пауза/стоп",previous:"Попередній трек",repeat:"Режим повторення",shuffle:"Перемішати"},show_volume_level:"Показати рівень гучності",use_media_artwork:"Використовувати зображення медіа",use_media_info:"Використовувати інформацію медіа",volume_controls:"Елементи керування гучністю",volume_controls_list:{volume_buttons:"Кнопки гучності",volume_mute:"Вимк. звук",volume_set:"Рівень гучності"}},number:{display_mode:"Відображати режим",display_mode_list:{buttons:"Кнопки",default:"За замовчуванням (повзунок)",slider:"Повзунок"}},template:{badge_color:"Колір значка",badge_icon:"Іконка значка",content:"Вміст",entity_extra:"Використовується в шаблонах та діях",multiline_secondary:"Багаторядкова додаткова інформація?",picture:"Зображення (замінить іконку)",primary:"Головна інформація",secondary:"Додаткова інформація"},title:{subtitle:"Підзаголовок",subtitle_tap_action:"Дія при дотику до підзаголовку",title:"Заголовок",title_tap_action:"Дія при дотику до заголовку"},update:{show_buttons_control:"Кнопки керування?"},vacuum:{commands:"Команди",commands_list:{on_off:"Увімкнути/Вимкнути"}},weather:{show_conditions:"Умови?",show_temperature:"Температура?"}},chip:{"chip-picker":{add:"Додати міні-картку",chips:"Міні-картки",clear:"Очистити",edit:"Редагувати",select:"Обрати міні-картку",types:{action:"Дія","alarm-control-panel":"Сигналізація",back:"Назад",conditional:"Умовна",entity:"Сутність",light:"Світло",menu:"Меню",spacer:"Порожнє місце",template:"Вручну",weather:"Погода"}},conditional:{chip:"Міні-картка"},sub_element_editor:{title:"Редактор міні-карток"}},form:{alignment_picker:{values:{center:"По центру",default:"Вирівнювання за замовчуванням",end:"В кінці",justify:"Вирівняти",start:"На початку"}},color_picker:{values:{default:"Колір за замовчуванням"}},icon_type_picker:{values:{default:"За замовчуванням","entity-picture":"Зображення сутності",icon:"Іконка",none:"Нічого"}},info_picker:{values:{default:"Інформація за замовчуванням","last-changed":"Востаннє змінено","last-updated":"Востаннє оновлено",name:"Назва",none:"Нічого",state:"Стан"}},layout_picker:{values:{default:"Розташування за замовчуванням",horizontal:"Горизонтальне розташування",vertical:"Вертикальне розташування"}}}}}}),Xl=/* @__PURE__ */$t({card:()=>Os,default:()=>Ds,editor:()=>Bs,migration:()=>Ls}),Zl=kt(()=>{Ds={card:Os={not_found:"Không tìm thấy thực thể"},editor:Bs={section:{context:"Ngữ cảnh",content:"Nội dung",features:"Tính năng",interactions:"Tương tác",layout:"Bố cục",badge:"Huy hiệu"},card:{chips:{alignment:"Căn chỉnh"},climate:{hvac_modes:"Chế độ điều hòa",show_temperature_control:"Điều khiển nhiệt độ?"},cover:{show_buttons_control:"Điều khiển nút bấm?",show_position_control:"Điều khiển vị trí?",show_tilt_position_control:"Điều khiển độ nghiêng?"},empty:{no_config_options:"Thẻ này không có tùy chọn cấu hình."},fan:{show_direction_control:"Điều khiển hướng?",show_oscillate_control:"Điều khiển xoay?",show_percentage_control:"Điều khiển phần trăm?"},generic:{entity:"Thực thể",area:"Khu vực",color:"Màu",content_info:"Nội dung",fill_container:"Làm đầy ô chứa",icon_animation:"Biểu tượng chuyển động khi kích hoạt?",icon_color:"Màu biểu tượng",icon_type:"Kiểu biểu tượng",layout:"Bố cục",primary_info:"Thông tin chính",secondary_info:"Thông tin phụ",use_entity_picture:"Dùng ảnh của thực thể?",collapsible_controls:"Thu nhỏ điều kiển khi tắt",picture:"Hình ảnh",picture_helper:"Nếu đặt, nó sẽ thay cho biểu tượng."},humidifier:{show_target_humidity_control:"Điều khiển độ ẩm?"},light:{incompatible_controls:"Một số điều khiển sẽ không được hiển thị nếu đèn của bạn không hỗ trợ tính năng đó.",show_brightness_control:"Điều khiển độ sáng?",show_color_control:"Điều khiển màu sắc?",show_color_temp_control:"Điều khiển nhiệt độ màu?",use_light_color:"Dùng màu đèn"},lock:{lock:"Khóa",open:"Mở",unlock:"Mở khóa"},"media-player":{media_controls:"Điều khiển đa phương tiện",media_controls_list:{next:"Bài tiếp theo",on_off:"Bật/tắt",play_pause_stop:"Phát/tạm dừng/dừng",previous:"Bài trước",repeat:"Chế độ lặp lại",shuffle:"Xáo trộn"},show_volume_level:"Hiện mức âm lượng",use_media_artwork:"Dùng ảnh đa phương tiện",use_media_info:"Dùng thông tin đa phương tiện",volume_controls:"Điều khiển âm lượng",volume_controls_list:{volume_buttons:"Nút âm lượng",volume_mute:"Im lặng",volume_set:"Mức âm lượng"}},number:{display_mode:"Chế độ hiển thị",display_mode_list:{buttons:"Nút",default:"Mặc định (thanh trượt)",slider:"Thanh trượt"}},template:{area_helper:"Dùng trong bản mẫu và tính năng",area:"Khu vực",badge_color:"Màu huy hiệu",badge_icon:"Biểu tượng huy hiệu",badge_text_helper:"Nếu đặt, nó sẽ thay thế biểu tượng.",badge_text:"Chữ trong huy hiệu",badge:"Huy hiệu",content:"Nội dung",entity_helper:"Dùng trong bản mẫu, tương tác và tính năng",entity_helper_legacy:"Dùng trong bản mẫu và tương tác",label:"Nhãn",layout:"Bố cục",multiline_secondary_helper:"Thẻ có thể được kéo cao lên để vừa với văn bản và không phải lúc nào cũng vừa vặn với hệ thống lưới.",multiline_secondary:"Cho phép nhiều dòng thông tin phụ",primary:"Thông tin chính",secondary:"Thông tin phụ"},title:{subtitle:"Phụ đề",subtitle_tap_action:"Hành động khi nhấp phụ đề",title:"Tiêu đề",title_tap_action:"Hành động khi nhấp tiêu đề"},update:{show_buttons_control:"Điều khiển nút bấm?"},vacuum:{commands:"Mệnh lệnh",commands_list:{on_off:"Bật/tắt"}},weather:{show_conditions:"Điều kiện?",show_temperature:"Nhiệt độ?"}},badge:{template:{label:"Nhãn",content:"Nội dung",entity_helper:"Dùng trong bản mẫu và tương tác",area_helper:"Dùng trong bản mẫu"}},chip:{"chip-picker":{add:"Thêm phỉnh",chips:"Phỉnh",clear:"Tẩy trống",edit:"Chỉnh sửa",select:"Chọn phỉnh",types:{action:"Hành động","alarm-control-panel":"Báo động",back:"Quay về",conditional:"Điều kiện",entity:"Thực thể",light:"Đèn",menu:"Trình đơn",quickbar:"Thanh nhanh",spacer:"Ngăn cách",template:"Mẫu",weather:"Thời tiết"}},conditional:{chip:"Phỉnh"},sub_element_editor:{title:"Trình soạn phỉnh"}},form:{alignment_picker:{values:{center:"Căn giữa",default:"Căn chỉnh mặc định",end:"Căn cuối",justify:"Căn hai bên",start:"Căn đầu"}},color_picker:{values:{default:"Màu mặc định"}},icon_type_picker:{values:{default:"Kiểu mặc định","entity-picture":"Ảnh thực thể",icon:"Biểu tượng",none:"Không có"}},info_picker:{values:{default:"Thông tin mặc định","last-changed":"Lần thay đổi cuối","last-updated":"Lần cập nhật cuối",name:"Tên",none:"Không có",state:"Trạng thái"}},layout_picker:{values:{default:"Bố cục mặc định",horizontal:"Bố cục ngang",vertical:"Bố cục dọc"}}}},migration:Ls={title:"Thẻ đã cập nhật",description:"Cấu hình thẻ của bạn đã được nhập thành phiên bản mới. Bạn có thể tìm thêm thông tin về thay đổi tại {link}.",post:"bài trên GitHub",revert:"Đảo ngược",ok:"Ok"}}}),Jl=/* @__PURE__ */$t({card:()=>js,default:()=>Rs,editor:()=>Hs}),Ql=kt(()=>{Rs={card:js={not_found:"未找到实体"},editor:Hs={card:{chips:{alignment:"对齐"},climate:{hvac_modes:"空调模式",show_temperature_control:"温度控制?"},cover:{show_buttons_control:"按钮控制?",show_position_control:"位置控制?",show_tilt_position_control:"角度控制?"},empty:{no_config_options:"这个卡片没有可配置的选项。"},fan:{show_direction_control:"方向控制?",show_oscillate_control:"摆动控制?",show_percentage_control:"百分比控制?"},generic:{collapsible_controls:"关闭时隐藏控制器",color:"颜色",content_info:"内容",fill_container:"填满容器",icon_animation:"激活时使用动态图标?",icon_color:"图标颜色",icon_type:"图标类型",layout:"布局",primary_info:"首要信息",secondary_info:"次要信息",use_entity_picture:"使用实体图片?"},humidifier:{show_target_humidity_control:"湿度控制?"},light:{incompatible_controls:"设备不支持的控制器将不会显示。",show_brightness_control:"亮度控制?",show_color_control:"颜色控制?",show_color_temp_control:"色温控制?",use_light_color:"使用灯光颜色"},lock:{lock:"锁定",open:"打开",unlock:"解锁"},"media-player":{media_controls:"媒体控制",media_controls_list:{next:"下一曲",on_off:"开启/关闭",play_pause_stop:"播放/暂停/停止",previous:"上一曲",repeat:"循环模式",shuffle:"随机"},show_volume_level:"显示音量大小",use_media_artwork:"使用媒体插图",use_media_info:"使用媒体信息",volume_controls:"音量控制",volume_controls_list:{volume_buttons:"音量按钮",volume_mute:"静音",volume_set:"音量等级"}},number:{display_mode:"显示模式",display_mode_list:{buttons:"按钮",default:"默认 (滑块)",slider:"滑块"}},template:{badge_color:"徽标颜色",badge_icon:"徽标图标",content:"内容",entity_extra:"用于模板和动作",label:"标签",multiline_secondary:"多行次要信息?",picture:"图片 (将会替代图标)",primary:"首要信息",secondary:"次要信息"},title:{subtitle:"子标题",subtitle_tap_action:"子标题点击动作",title:"标题",title_tap_action:"标题点击动作"},update:{show_buttons_control:"控制按钮?"},vacuum:{commands:"命令",commands_list:{on_off:"开/关"}},weather:{show_conditions:"条件?",show_temperature:"温度?"}},chip:{"chip-picker":{add:"添加 chip",chips:"小卡片",clear:"清除",edit:"编辑",select:"选择 chip",types:{action:"动作","alarm-control-panel":"警戒控制台",back:"返回",conditional:"条件显示",entity:"实体",light:"灯光",menu:"菜单",quickbar:"快捷栏",spacer:"占位符",template:"模板",weather:"天气"}},conditional:{chip:"小卡片"},sub_element_editor:{title:"Chip 编辑"}},form:{alignment_picker:{values:{center:"居中对齐",default:"默认",end:"右对齐",justify:"两端对齐",start:"左对齐"}},color_picker:{values:{default:"默认颜色"}},icon_type_picker:{values:{default:"默认类型","entity-picture":"实体图片",icon:"图标",none:"无"}},info_picker:{values:{default:"默认信息","last-changed":"变更时间","last-updated":"更新时间",name:"名称",none:"无",state:"状态"}},layout_picker:{values:{default:"默认布局",horizontal:"水平布局",vertical:"垂直布局"}}}}}}),tc=/* @__PURE__ */$t({card:()=>Us,default:()=>Fs,editor:()=>Vs}),ec=kt(()=>{Fs={card:Us={not_found:"未找到實體"},editor:Vs={card:{chips:{alignment:"對齊"},climate:{hvac_modes:"空調模式",show_temperature_control:"溫度控制?"},cover:{show_buttons_control:"按鈕控制?",show_position_control:"位置控制?",show_tilt_position_control:"角度控制?"},fan:{show_oscillate_control:"擺頭控制?",show_percentage_control:"百分比控制?"},generic:{collapsible_controls:"關閉時隱藏控制項",color:"顏色",content_info:"內容",fill_container:"填滿容器",icon_animation:"啟動時使用動態圖示?",icon_color:"圖示顏色",icon_type:"圖示樣式",layout:"佈局",primary_info:"主要訊息",secondary_info:"次要訊息",use_entity_picture:"使用實體圖片?"},humidifier:{show_target_humidity_control:"溼度控制?"},light:{incompatible_controls:"不會顯示裝置不支援的控制。",show_brightness_control:"亮度控制?",show_color_control:"色彩控制?",show_color_temp_control:"色溫控制?",use_light_color:"使用燈光顏色"},lock:{lock:"上鎖",open:"打開",unlock:"解鎖"},"media-player":{media_controls:"媒體控制",media_controls_list:{next:"下一首",on_off:"開啟、關閉",play_pause_stop:"播放、暫停、停止",previous:"上一首",repeat:"重複播放",shuffle:"隨機播放"},show_volume_level:"顯示音量大小",use_media_artwork:"使用媒體插圖",use_media_info:"使用媒體資訊",volume_controls:"音量控制",volume_controls_list:{volume_buttons:"音量按鈕",volume_mute:"靜音",volume_set:"音量等級"}},number:{display_mode:"顯示模式",display_mode_list:{buttons:"按鈕",default:"預設 (滑桿)",slider:"滑桿"}},template:{badge_color:"角標顏色",badge_icon:"角標圖示",content:"內容",entity_extra:"用於模板與動作",label:"標籤",multiline_secondary:"多行次要訊息?",picture:"圖片 (將會取代圖示)",primary:"主要訊息",secondary:"次要訊息"},title:{subtitle:"副標題",subtitle_tap_action:"副標題點擊動作",title:"標題",title_tap_action:"標題點擊動作"},update:{show_buttons_control:"按鈕控制?"},vacuum:{commands:"指令",commands_list:{on_off:"開啟、關閉"}},weather:{show_conditions:"狀況?",show_temperature:"溫度?"}},chip:{"chip-picker":{add:"新增小卡片",chips:"小卡片",clear:"清除",edit:"編輯",select:"選擇小卡片",types:{action:"動作","alarm-control-panel":"警報器控制",back:"返回",conditional:"條件",entity:"實體",light:"燈光",menu:"選單",spacer:"佔位符",template:"模板",weather:"天氣"}},conditional:{chip:"小卡片"},sub_element_editor:{title:"小卡片編輯器"}},form:{alignment_picker:{values:{center:"居中對齊",default:"預設對齊",end:"居右對齊",justify:"兩端對齊",start:"居左對齊"}},color_picker:{values:{default:"預設顏色"}},icon_type_picker:{values:{default:"預設樣式","entity-picture":"實體圖片",icon:"圖示",none:"無"}},info_picker:{values:{default:"預設訊息","last-changed":"最近變動時間","last-updated":"最近更新時間",name:"名稱",none:"無",state:"狀態"}},layout_picker:{values:{default:"預設佈局",horizontal:"水平佈局",vertical:"垂直佈局"}}}}}});function oc(t,e){try{return t.split(".").reduce((t,e)=>t[e],Gs[e])}catch(K){return}}function ic(t){return function(e,o={}){var i;const n=null!==(i=null==t?void 0:t.locale.language)&&void 0!==i?i:Ks;let r=oc(e,n);if(r||(r=oc(e,Ks)),!r)return e;try{return new ta(r,n).format(o)}catch(a){return console.error(`Error formatting message for key "${e}" with lang "${n}":`,a),r}}}var nc,rc,ac,sc,lc,cc,uc,hc,dc,pc,mc,fc,gc,_c,vc,bc,yc,wc,kc,Cc,$c,Ec,xc,Ac,Sc,Tc,Mc,Ic,zc,Pc,Nc,Oc=kt(()=>{Ys(),Ws(),Zs(),Qs(),el(),il(),rl(),sl(),cl(),hl(),pl(),fl(),_l(),bl(),wl(),Cl(),El(),Al(),Tl(),Il(),Pl(),Ol(),Ll(),jl(),Rl(),Vl(),Gl(),Yl(),Wl(),Zl(),Ql(),ec(),Gs={ar:qs,bg:Xs,ca:Js,cs:tl,da:ol,de:nl,el:al,en:ll,es:ul,fi:dl,fr:ml,he:gl,hu:vl,id:yl,it:kl,"ko-KR":$l,nb:xl,nl:Sl,pl:Ml,"pt-BR":zl,"pt-PT":Nl,ro:Bl,ru:Dl,sl:Ul,sk:Hl,sv:Fl,tr:Kl,uk:ql,vi:Xl,"zh-Hans":Jl,"zh-Hant":tc},Ks="en"}),Bc=kt(()=>{Vt(),Be(),je(),vn(),nc=class extends Ot{constructor(...t){super(...t),this.picture_url=""}render(){return J` + `}},gn([Gt()],Sn.prototype,"appearance",void 0),Sn=gn([Lt("mushroom-state-item")],Sn)});function Dn(t){var e,o;return{layout:null!==(e=t.layout)&&void 0!==e?e:jn(t),fill_container:null!==(o=t.fill_container)&&void 0!==o&&o,primary_info:t.primary_info||Rn(t),secondary_info:t.secondary_info||Un(t),icon_type:t.icon_type||Hn(t)}}function jn(t){return t.vertical?"vertical":"default"}function Hn(t){return t.hide_icon?"none":t.use_entity_picture||t.use_media_artwork?"entity-picture":"icon"}function Rn(t){return t.hide_name?"none":"name"}function Un(t){return t.hide_state?"none":"state"}function Vn(t,e){const o=e&&e.cache?e.cache:In,i=e&&e.serializer?e.serializer:Tn;return(e&&e.strategy?e.strategy:Yn)(t,{cache:o,serializer:i})}function Fn(t,e,o,i){const n=null==(r=i)||"number"==typeof r||"boolean"==typeof r?i:o(i);var r;let a=e.get(n);return void 0===a&&(a=t.call(this,i),e.set(n,a)),a}function Gn(t,e,o){const i=Array.prototype.slice.call(arguments,3),n=o(i);let r=e.get(n);return void 0===r&&(r=t.apply(this,i),e.set(n,r)),r}function Kn(t,e,o,i,n){return o.bind(e,t,i,n)}function Yn(t,e){return Kn(t,this,1===t.length?Fn:Gn,e.cache.create(),e.serializer)}function qn(t,e){return Kn(t,this,Gn,e.cache.create(),e.serializer)}function Wn(t,e){return Kn(t,this,Fn,e.cache.create(),e.serializer)}Pn(),Bn(),Ln();var Xn,Zn,Jn,Qn,tr,er,or=kt(()=>{Tn=function(){return JSON.stringify(arguments)},Mn=class{constructor(){this.cache=Object.create(null)}get(t){return this.cache[t]}set(t,e){this.cache[t]=e}},In={create:function(){return new Mn}},zn={variadic:qn,monadic:Wn}});function ir(t){const e={};return t.replace(Xn,t=>{const o=t.length;switch(t[0]){case"G":e.era=4===o?"long":5===o?"narrow":"short";break;case"y":e.year=2===o?"2-digit":"numeric";break;case"Y":case"u":case"U":case"r":throw new RangeError("`Y/u/U/r` (year) patterns are not supported, use `y` instead");case"q":case"Q":throw new RangeError("`q/Q` (quarter) patterns are not supported");case"M":case"L":e.month=["numeric","2-digit","short","long","narrow"][o-1];break;case"w":case"W":throw new RangeError("`w/W` (week) patterns are not supported");case"d":e.day=["numeric","2-digit"][o-1];break;case"D":case"F":case"g":throw new RangeError("`D/F/g` (day) patterns are not supported, use `d` instead");case"E":e.weekday=4===o?"long":5===o?"narrow":"short";break;case"e":if(o<4)throw new RangeError("`e..eee` (weekday) patterns are not supported");e.weekday=["short","long","narrow","short"][o-4];break;case"c":if(o<4)throw new RangeError("`c..ccc` (weekday) patterns are not supported");e.weekday=["short","long","narrow","short"][o-4];break;case"a":e.hour12=!0;break;case"b":case"B":throw new RangeError("`b/B` (period) patterns are not supported, use `a` instead");case"h":e.hourCycle="h12",e.hour=["numeric","2-digit"][o-1];break;case"H":e.hourCycle="h23",e.hour=["numeric","2-digit"][o-1];break;case"K":e.hourCycle="h11",e.hour=["numeric","2-digit"][o-1];break;case"k":e.hourCycle="h24",e.hour=["numeric","2-digit"][o-1];break;case"j":case"J":case"C":throw new RangeError("`j/J/C` (hour) patterns are not supported, use `h/H/K/k` instead");case"m":e.minute=["numeric","2-digit"][o-1];break;case"s":e.second=["numeric","2-digit"][o-1];break;case"S":case"A":throw new RangeError("`S/A` (second) patterns are not supported, use `s` instead");case"z":e.timeZoneName=o<4?"short":"long";break;case"Z":case"O":case"v":case"V":case"X":case"x":throw new RangeError("`Z/O/v/V/X/x` (timeZone) patterns are not supported, use `z` instead")}return""}),e}function nr(t){return t.replace(/^(.*?)-/,"")}function rr(t){const e={};return"r"===t[t.length-1]?e.roundingPriority="morePrecision":"s"===t[t.length-1]&&(e.roundingPriority="lessPrecision"),t.replace(Qn,function(t,o,i){return"string"!=typeof i?(e.minimumSignificantDigits=o.length,e.maximumSignificantDigits=o.length):"+"===i?e.minimumSignificantDigits=o.length:"#"===o[0]?e.maximumSignificantDigits=o.length:(e.minimumSignificantDigits=o.length,e.maximumSignificantDigits=o.length+("string"==typeof i?i.length:0)),""}),e}function ar(t){switch(t){case"sign-auto":return{signDisplay:"auto"};case"sign-accounting":case"()":return{currencySign:"accounting"};case"sign-always":case"+!":return{signDisplay:"always"};case"sign-accounting-always":case"()!":return{signDisplay:"always",currencySign:"accounting"};case"sign-except-zero":case"+?":return{signDisplay:"exceptZero"};case"sign-accounting-except-zero":case"()?":return{signDisplay:"exceptZero",currencySign:"accounting"};case"sign-never":case"+_":return{signDisplay:"never"}}}function sr(t){let e;if("E"===t[0]&&"E"===t[1]?(e={notation:"engineering"},t=t.slice(2)):"E"===t[0]&&(e={notation:"scientific"},t=t.slice(1)),e){const o=t.slice(0,2);if("+!"===o?(e.signDisplay="always",t=t.slice(2)):"+?"===o&&(e.signDisplay="exceptZero",t=t.slice(2)),!er.test(t))throw new Error("Malformed concise eng/scientific notation");e.minimumIntegerDigits=t.length}return e}function lr(t){const e=ar(t);return e||{}}function cr(t){let e={};for(const o of t){switch(o.stem){case"percent":case"%":e.style="percent";continue;case"%x100":e.style="percent",e.scale=100;continue;case"currency":e.style="currency",e.currency=o.options[0];continue;case"group-off":case",_":e.useGrouping=!1;continue;case"precision-integer":case".":e.maximumFractionDigits=0;continue;case"measure-unit":case"unit":e.style="unit",e.unit=nr(o.options[0]);continue;case"compact-short":case"K":e.notation="compact",e.compactDisplay="short";continue;case"compact-long":case"KK":e.notation="compact",e.compactDisplay="long";continue;case"scientific":e=ee(ee({},e),{},{notation:"scientific"},o.options.reduce((t,e)=>ee(ee({},t),lr(e)),{}));continue;case"engineering":e=ee(ee({},e),{},{notation:"engineering"},o.options.reduce((t,e)=>ee(ee({},t),lr(e)),{}));continue;case"notation-simple":e.notation="standard";continue;case"unit-width-narrow":e.currencyDisplay="narrowSymbol",e.unitDisplay="narrow";continue;case"unit-width-short":e.currencyDisplay="code",e.unitDisplay="short";continue;case"unit-width-full-name":e.currencyDisplay="name",e.unitDisplay="long";continue;case"unit-width-iso-code":e.currencyDisplay="symbol";continue;case"scale":e.scale=parseFloat(o.options[0]);continue;case"rounding-mode-floor":e.roundingMode="floor";continue;case"rounding-mode-ceiling":e.roundingMode="ceil";continue;case"rounding-mode-down":e.roundingMode="trunc";continue;case"rounding-mode-up":e.roundingMode="expand";continue;case"rounding-mode-half-even":e.roundingMode="halfEven";continue;case"rounding-mode-half-down":e.roundingMode="halfTrunc";continue;case"rounding-mode-half-up":e.roundingMode="halfExpand";continue;case"integer-width":if(o.options.length>1)throw new RangeError("integer-width stems only accept a single optional option");o.options[0].replace(tr,function(t,o,i,n,r,a){if(o)e.minimumIntegerDigits=i.length;else{if(n&&r)throw new Error("We currently do not support maximum integer digits");if(a)throw new Error("We currently do not support exact integer digits")}return""});continue}if(er.test(o.stem)){e.minimumIntegerDigits=o.stem.length;continue}if(Jn.test(o.stem)){if(o.options.length>1)throw new RangeError("Fraction-precision stems only accept a single optional option");o.stem.replace(Jn,function(t,o,i,n,r,a){return"*"===i?e.minimumFractionDigits=o.length:n&&"#"===n[0]?e.maximumFractionDigits=n.length:r&&a?(e.minimumFractionDigits=r.length,e.maximumFractionDigits=r.length+a.length):(e.minimumFractionDigits=o.length,e.maximumFractionDigits=o.length),""});const t=o.options[0];"w"===t?e=ee(ee({},e),{},{trailingZeroDisplay:"stripIfInteger"}):t&&(e=ee(ee({},e),rr(t)));continue}if(Qn.test(o.stem)){e=ee(ee({},e),rr(o.stem));continue}const t=ar(o.stem);t&&(e=ee(ee({},e),t));const i=sr(o.stem);i&&(e=ee(ee({},e),i))}return e}var ur,hr,dr,pr,mr,fr,gr,_r,vr,br,yr,wr,kr,Cr,$r,Er=kt(()=>{oe(),Xn=/(?:[Eec]{1,6}|G{1,5}|[Qq]{1,5}|(?:[yYur]+|U{1,5})|[ML]{1,5}|d{1,2}|D{1,3}|F{1}|[abB]{1,5}|[hkHK]{1,2}|w{1,2}|W{1}|m{1,2}|s{1,2}|[zZOvVxX]{1,4})(?=([^']*'[^']*')*[^']*$)/g,Zn=/[\t-\r \x85\u200E\u200F\u2028\u2029]/i,Jn=/^\.(?:(0+)(\*)?|(#+)|(0+)(#+))$/g,Qn=/^(@+)?(\+|#+)?[rs]?$/g,tr=/(\*)(0+)|(#+)(0+)|(0+)/g,er=/^(0+)$/});function xr(t){return t.type===hr.literal}function Ar(t){return t.type===hr.argument}function Sr(t){return t.type===hr.number}function Tr(t){return t.type===hr.date}function Mr(t){return t.type===hr.time}function Ir(t){return t.type===hr.select}function zr(t){return t.type===hr.plural}function Pr(t){return t.type===hr.pound}function Nr(t){return t.type===hr.tag}function Or(t){return!(!t||"object"!=typeof t||t.type!==dr.number)}function Br(t){return!(!t||"object"!=typeof t||t.type!==dr.dateTime)}function Lr(t){let e=t.hourCycle;if(void 0===e&&t.hourCycles&&t.hourCycles.length&&(e=t.hourCycles[0]),e)switch(e){case"h24":return"k";case"h23":return"H";case"h12":return"h";case"h11":return"K";default:throw new Error("Invalid hourCycle")}const o=t.language;let i;return"root"!==o&&(i=t.maximize().region),(mr[i||""]||mr[o||""]||mr[`${o}-001`]||mr["001"])[0]}function Dr(t,e){return{start:t,end:e}}function jr(t){return t>=97&&t<=122||t>=65&&t<=90}function Hr(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 Rr(t){return t>=9&&t<=13||32===t||133===t||t>=8206&&t<=8207||8232===t||8233===t}function Ur(t){t.forEach(t=>{if(delete t.location,Ir(t)||zr(t))for(const e in t.options)delete t.options[e].location,Ur(t.options[e].value);else Sr(t)&&Or(t.style)||(Tr(t)||Mr(t))&&Br(t.style)?delete t.style.location:Nr(t)&&Ur(t.children)})}function Vr(t,e={}){e=ee({shouldParseSkeletons:!0,requiresOtherClause:!0},e);const o=new $r(t,e).parse();if(o.err){const t=SyntaxError(ur[o.err.kind]);throw t.location=o.err.location,t.originalMessage=o.err.message,t}return(null==e?void 0:e.captureLocation)||Ur(o.val),o.val}var Fr=kt(()=>{Er(),oe(),ur=/* @__PURE__ */function(t){return 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",t}({}),hr=/* @__PURE__ */function(t){return 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",t}({}),dr=/* @__PURE__ */function(t){return t[t.number=0]="number",t[t.dateTime=1]="dateTime",t}({}),pr=/[ \xA0\u1680\u2000-\u200A\u202F\u205F\u3000]/,mr={"001":["H","h"],419:["h","H","hB","hb"],AC:["H","h","hb","hB"],AD:["H","hB"],AE:["h","hB","hb","H"],AF:["H","hb","hB","h"],AG:["h","hb","H","hB"],AI:["H","h","hb","hB"],AL:["h","H","hB"],AM:["H","hB"],AO:["H","hB"],AR:["h","H","hB","hb"],AS:["h","H"],AT:["H","hB"],AU:["h","hb","H","hB"],AW:["H","hB"],AX:["H"],AZ:["H","hB","h"],BA:["H","hB","h"],BB:["h","hb","H","hB"],BD:["h","hB","H"],BE:["H","hB"],BF:["H","hB"],BG:["H","hB","h"],BH:["h","hB","hb","H"],BI:["H","h"],BJ:["H","hB"],BL:["H","hB"],BM:["h","hb","H","hB"],BN:["hb","hB","h","H"],BO:["h","H","hB","hb"],BQ:["H"],BR:["H","hB"],BS:["h","hb","H","hB"],BT:["h","H"],BW:["H","h","hb","hB"],BY:["H","h"],BZ:["H","h","hb","hB"],CA:["h","hb","H","hB"],CC:["H","h","hb","hB"],CD:["hB","H"],CF:["H","h","hB"],CG:["H","hB"],CH:["H","hB","h"],CI:["H","hB"],CK:["H","h","hb","hB"],CL:["h","H","hB","hb"],CM:["H","h","hB"],CN:["H","hB","hb","h"],CO:["h","H","hB","hb"],CP:["H"],CR:["h","H","hB","hb"],CU:["h","H","hB","hb"],CV:["H","hB"],CW:["H","hB"],CX:["H","h","hb","hB"],CY:["h","H","hb","hB"],CZ:["H"],DE:["H","hB"],DG:["H","h","hb","hB"],DJ:["h","H"],DK:["H"],DM:["h","hb","H","hB"],DO:["h","H","hB","hb"],DZ:["h","hB","hb","H"],EA:["H","h","hB","hb"],EC:["h","H","hB","hb"],EE:["H","hB"],EG:["h","hB","hb","H"],EH:["h","hB","hb","H"],ER:["h","H"],ES:["H","hB","h","hb"],ET:["hB","hb","h","H"],FI:["H"],FJ:["h","hb","H","hB"],FK:["H","h","hb","hB"],FM:["h","hb","H","hB"],FO:["H","h"],FR:["H","hB"],GA:["H","hB"],GB:["H","h","hb","hB"],GD:["h","hb","H","hB"],GE:["H","hB","h"],GF:["H","hB"],GG:["H","h","hb","hB"],GH:["h","H"],GI:["H","h","hb","hB"],GL:["H","h"],GM:["h","hb","H","hB"],GN:["H","hB"],GP:["H","hB"],GQ:["H","hB","h","hb"],GR:["h","H","hb","hB"],GS:["H","h","hb","hB"],GT:["h","H","hB","hb"],GU:["h","hb","H","hB"],GW:["H","hB"],GY:["h","hb","H","hB"],HK:["h","hB","hb","H"],HN:["h","H","hB","hb"],HR:["H","hB"],HU:["H","h"],IC:["H","h","hB","hb"],ID:["H"],IE:["H","h","hb","hB"],IL:["H","hB"],IM:["H","h","hb","hB"],IN:["h","H"],IO:["H","h","hb","hB"],IQ:["h","hB","hb","H"],IR:["hB","H"],IS:["H"],IT:["H","hB"],JE:["H","h","hb","hB"],JM:["h","hb","H","hB"],JO:["h","hB","hb","H"],JP:["H","K","h"],KE:["hB","hb","H","h"],KG:["H","h","hB","hb"],KH:["hB","h","H","hb"],KI:["h","hb","H","hB"],KM:["H","h","hB","hb"],KN:["h","hb","H","hB"],KP:["h","H","hB","hb"],KR:["h","H","hB","hb"],KW:["h","hB","hb","H"],KY:["h","hb","H","hB"],KZ:["H","hB"],LA:["H","hb","hB","h"],LB:["h","hB","hb","H"],LC:["h","hb","H","hB"],LI:["H","hB","h"],LK:["H","h","hB","hb"],LR:["h","hb","H","hB"],LS:["h","H"],LT:["H","h","hb","hB"],LU:["H","h","hB"],LV:["H","hB","hb","h"],LY:["h","hB","hb","H"],MA:["H","h","hB","hb"],MC:["H","hB"],MD:["H","hB"],ME:["H","hB","h"],MF:["H","hB"],MG:["H","h"],MH:["h","hb","H","hB"],MK:["H","h","hb","hB"],ML:["H"],MM:["hB","hb","H","h"],MN:["H","h","hb","hB"],MO:["h","hB","hb","H"],MP:["h","hb","H","hB"],MQ:["H","hB"],MR:["h","hB","hb","H"],MS:["H","h","hb","hB"],MT:["H","h"],MU:["H","h"],MV:["H","h"],MW:["h","hb","H","hB"],MX:["h","H","hB","hb"],MY:["hb","hB","h","H"],MZ:["H","hB"],NA:["h","H","hB","hb"],NC:["H","hB"],NE:["H"],NF:["H","h","hb","hB"],NG:["H","h","hb","hB"],NI:["h","H","hB","hb"],NL:["H","hB"],NO:["H","h"],NP:["H","h","hB"],NR:["H","h","hb","hB"],NU:["H","h","hb","hB"],NZ:["h","hb","H","hB"],OM:["h","hB","hb","H"],PA:["h","H","hB","hb"],PE:["h","H","hB","hb"],PF:["H","h","hB"],PG:["h","H"],PH:["h","hB","hb","H"],PK:["h","hB","H"],PL:["H","h"],PM:["H","hB"],PN:["H","h","hb","hB"],PR:["h","H","hB","hb"],PS:["h","hB","hb","H"],PT:["H","hB"],PW:["h","H"],PY:["h","H","hB","hb"],QA:["h","hB","hb","H"],RE:["H","hB"],RO:["H","hB"],RS:["H","hB","h"],RU:["H"],RW:["H","h"],SA:["h","hB","hb","H"],SB:["h","hb","H","hB"],SC:["H","h","hB"],SD:["h","hB","hb","H"],SE:["H"],SG:["h","hb","H","hB"],SH:["H","h","hb","hB"],SI:["H","hB"],SJ:["H"],SK:["H"],SL:["h","hb","H","hB"],SM:["H","h","hB"],SN:["H","h","hB"],SO:["h","H"],SR:["H","hB"],SS:["h","hb","H","hB"],ST:["H","hB"],SV:["h","H","hB","hb"],SX:["H","h","hb","hB"],SY:["h","hB","hb","H"],SZ:["h","hb","H","hB"],TA:["H","h","hb","hB"],TC:["h","hb","H","hB"],TD:["h","H","hB"],TF:["H","h","hB"],TG:["H","hB"],TH:["H","h"],TJ:["H","h"],TL:["H","hB","hb","h"],TM:["H","h"],TN:["h","hB","hb","H"],TO:["h","H"],TR:["H","hB"],TT:["h","hb","H","hB"],TW:["hB","hb","h","H"],TZ:["hB","hb","H","h"],UA:["H","hB","h"],UG:["hB","hb","H","h"],UM:["h","hb","H","hB"],US:["h","hb","H","hB"],UY:["h","H","hB","hb"],UZ:["H","hB","h"],VA:["H","h","hB"],VC:["h","hb","H","hB"],VE:["h","H","hB","hb"],VG:["h","hb","H","hB"],VI:["h","hb","H","hB"],VN:["H","h"],VU:["h","H"],WF:["H","hB"],WS:["h","H"],XK:["H","hB","h"],YE:["h","hB","hb","H"],YT:["H","hB"],ZA:["H","h","hb","hB"],ZM:["h","hb","H","hB"],ZW:["H","h"],"af-ZA":["H","h","hB","hb"],"ar-001":["h","hB","hb","H"],"ca-ES":["H","h","hB"],"en-001":["h","hb","H","hB"],"en-HK":["h","hb","H","hB"],"en-IL":["H","h","hb","hB"],"en-MY":["h","hb","H","hB"],"es-BR":["H","h","hB","hb"],"es-ES":["H","h","hB","hb"],"es-GQ":["H","h","hB","hb"],"fr-CA":["H","h","hB"],"gl-ES":["H","h","hB"],"gu-IN":["hB","hb","h","H"],"hi-IN":["hB","h","H"],"it-CH":["H","h","hB"],"it-IT":["H","h","hB"],"kn-IN":["hB","h","H"],"ku-SY":["H","hB"],"ml-IN":["hB","h","H"],"mr-IN":["hB","hb","h","H"],"pa-IN":["hB","hb","h","H"],"ta-IN":["hB","h","hb","H"],"te-IN":["hB","h","H"],"zu-ZA":["H","hB","hb","h"]},fr=new RegExp(`^${pr.source}*`),gr=new RegExp(`${pr.source}*$`),_r=!!Object.fromEntries,vr=!!String.prototype.trimStart,br=!!String.prototype.trimEnd,yr=_r?Object.fromEntries:function(t){const e={};for(const[o,i]of t)e[o]=i;return e},wr=vr?function(t){return t.trimStart()}:function(t){return t.replace(fr,"")},kr=br?function(t){return t.trimEnd()}:function(t){return t.replace(gr,"")},Cr=/* @__PURE__ */new RegExp("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu"),$r=class{constructor(t,e={}){this.message=t,this.position={offset:0,line:1,column:1},this.ignoreTag=!!e.ignoreTag,this.locale=e.locale,this.requiresOtherClause=!!e.requiresOtherClause,this.shouldParseSkeletons=!!e.shouldParseSkeletons}parse(){if(0!==this.offset())throw Error("parser can only be used once");return this.parseMessage(0,"",!1)}parseMessage(t,e,o){let i=[];for(;!this.isEOF();){const n=this.char();if(123===n){const e=this.parseArgument(t,o);if(e.err)return e;i.push(e.val)}else{if(125===n&&t>0)break;if(35!==n||"plural"!==e&&"selectordinal"!==e){if(60===n&&!this.ignoreTag&&47===this.peek()){if(o)break;return this.error(ur.UNMATCHED_CLOSING_TAG,Dr(this.clonePosition(),this.clonePosition()))}if(60===n&&!this.ignoreTag&&jr(this.peek()||0)){const o=this.parseTag(t,e);if(o.err)return o;i.push(o.val)}else{const o=this.parseLiteral(t,e);if(o.err)return o;i.push(o.val)}}else{const t=this.clonePosition();this.bump(),i.push({type:hr.pound,location:Dr(t,this.clonePosition())})}}}return{val:i,err:null}}parseTag(t,e){const o=this.clonePosition();this.bump();const i=this.parseTagName();if(this.bumpSpace(),this.bumpIf("/>"))return{val:{type:hr.literal,value:`<${i}/>`,location:Dr(o,this.clonePosition())},err:null};if(this.bumpIf(">")){const n=this.parseMessage(t+1,e,!0);if(n.err)return n;const r=n.val,a=this.clonePosition();if(this.bumpIf("")?{val:{type:hr.tag,value:i,children:r,location:Dr(o,this.clonePosition())},err:null}:this.error(ur.INVALID_TAG,Dr(a,this.clonePosition())))}return this.error(ur.UNCLOSED_TAG,Dr(o,this.clonePosition()))}return this.error(ur.INVALID_TAG,Dr(o,this.clonePosition()))}parseTagName(){const t=this.offset();for(this.bump();!this.isEOF()&&Hr(this.char());)this.bump();return this.message.slice(t,this.offset())}parseLiteral(t,e){const o=this.clonePosition();let i="";for(;;){const o=this.tryParseQuote(e);if(o){i+=o;continue}const n=this.tryParseUnquoted(t,e);if(n){i+=n;continue}const r=this.tryParseLeftAngleBracket();if(!r)break;i+=r}const n=Dr(o,this.clonePosition());return{val:{type:hr.literal,value:i,location:n},err:null}}tryParseLeftAngleBracket(){return this.isEOF()||60!==this.char()||!this.ignoreTag&&(jr(t=this.peek()||0)||47===t)?null:(this.bump(),"<");var t}tryParseQuote(t){if(this.isEOF()||39!==this.char())return null;switch(this.peek()){case 39:return this.bump(),this.bump(),"'";case 123:case 60:case 62:case 125:break;case 35:if("plural"===t||"selectordinal"===t)break;return null;default:return null}this.bump();const e=[this.char()];for(this.bump();!this.isEOF();){const t=this.char();if(39===t){if(39!==this.peek()){this.bump();break}e.push(39),this.bump()}else e.push(t);this.bump()}return String.fromCodePoint(...e)}tryParseUnquoted(t,e){if(this.isEOF())return null;const o=this.char();return 60===o||123===o||35===o&&("plural"===e||"selectordinal"===e)||125===o&&t>0?null:(this.bump(),String.fromCodePoint(o))}parseArgument(t,e){const o=this.clonePosition();if(this.bump(),this.bumpSpace(),this.isEOF())return this.error(ur.EXPECT_ARGUMENT_CLOSING_BRACE,Dr(o,this.clonePosition()));if(125===this.char())return this.bump(),this.error(ur.EMPTY_ARGUMENT,Dr(o,this.clonePosition()));let i=this.parseIdentifierIfPossible().value;if(!i)return this.error(ur.MALFORMED_ARGUMENT,Dr(o,this.clonePosition()));if(this.bumpSpace(),this.isEOF())return this.error(ur.EXPECT_ARGUMENT_CLOSING_BRACE,Dr(o,this.clonePosition()));switch(this.char()){case 125:return this.bump(),{val:{type:hr.argument,value:i,location:Dr(o,this.clonePosition())},err:null};case 44:return this.bump(),this.bumpSpace(),this.isEOF()?this.error(ur.EXPECT_ARGUMENT_CLOSING_BRACE,Dr(o,this.clonePosition())):this.parseArgumentOptions(t,e,i,o);default:return this.error(ur.MALFORMED_ARGUMENT,Dr(o,this.clonePosition()))}}parseIdentifierIfPossible(){const t=this.clonePosition(),e=this.offset(),o=function(t,e){var o;return Cr.lastIndex=e,null!==(o=Cr.exec(t)[1])&&void 0!==o?o:""}(this.message,e),i=e+o.length;return this.bumpTo(i),{value:o,location:Dr(t,this.clonePosition())}}parseArgumentOptions(t,e,o,i){let n=this.clonePosition(),r=this.parseIdentifierIfPossible().value,a=this.clonePosition();switch(r){case"":return this.error(ur.EXPECT_ARGUMENT_TYPE,Dr(n,a));case"number":case"date":case"time":{var s;this.bumpSpace();let t=null;if(this.bumpIf(",")){this.bumpSpace();const e=this.clonePosition(),o=this.parseSimpleArgStyleIfPossible();if(o.err)return o;const i=kr(o.val);if(0===i.length)return this.error(ur.EXPECT_ARGUMENT_STYLE,Dr(this.clonePosition(),this.clonePosition()));t={style:i,styleLocation:Dr(e,this.clonePosition())}}const e=this.tryParseArgumentClose(i);if(e.err)return e;const n=Dr(i,this.clonePosition());if(t&&t.style.startsWith("::")){let e=wr(t.style.slice(2));if("number"===r){const i=this.parseNumberSkeletonFromString(e,t.styleLocation);return i.err?i:{val:{type:hr.number,value:o,location:n,style:i.val},err:null}}{if(0===e.length)return this.error(ur.EXPECT_DATE_TIME_SKELETON,n);let i=e;this.locale&&(i=function(t,e){let o="";for(let i=0;i>1),l="a",c=Lr(e);for("H"!=c&&"k"!=c||(s=0);s-- >0;)o+=l;for(;a-- >0;)o=c+o}else o+="J"===n?"H":n}return o}(e,this.locale));const a={type:dr.dateTime,pattern:i,location:t.styleLocation,parsedOptions:this.shouldParseSkeletons?ir(i):{}};return{val:{type:"date"===r?hr.date:hr.time,value:o,location:n,style:a},err:null}}}return{val:{type:"number"===r?hr.number:"date"===r?hr.date:hr.time,value:o,location:n,style:null!==(s=null==t?void 0:t.style)&&void 0!==s?s:null},err:null}}case"plural":case"selectordinal":case"select":{const n=this.clonePosition();if(this.bumpSpace(),!this.bumpIf(","))return this.error(ur.EXPECT_SELECT_ARGUMENT_OPTIONS,Dr(n,ee({},n)));this.bumpSpace();let a=this.parseIdentifierIfPossible(),s=0;if("select"!==r&&"offset"===a.value){if(!this.bumpIf(":"))return this.error(ur.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,Dr(this.clonePosition(),this.clonePosition()));this.bumpSpace();const t=this.tryParseDecimalInteger(ur.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,ur.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE);if(t.err)return t;this.bumpSpace(),a=this.parseIdentifierIfPossible(),s=t.val}const l=this.tryParsePluralOrSelectOptions(t,r,e,a);if(l.err)return l;const c=this.tryParseArgumentClose(i);if(c.err)return c;const u=Dr(i,this.clonePosition());return"select"===r?{val:{type:hr.select,value:o,options:yr(l.val),location:u},err:null}:{val:{type:hr.plural,value:o,options:yr(l.val),offset:s,pluralType:"plural"===r?"cardinal":"ordinal",location:u},err:null}}default:return this.error(ur.INVALID_ARGUMENT_TYPE,Dr(n,a))}}tryParseArgumentClose(t){return this.isEOF()||125!==this.char()?this.error(ur.EXPECT_ARGUMENT_CLOSING_BRACE,Dr(t,this.clonePosition())):(this.bump(),{val:!0,err:null})}parseSimpleArgStyleIfPossible(){let t=0;const e=this.clonePosition();for(;!this.isEOF();)switch(this.char()){case 39:{this.bump();let t=this.clonePosition();if(!this.bumpUntil("'"))return this.error(ur.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE,Dr(t,this.clonePosition()));this.bump();break}case 123:t+=1,this.bump();break;case 125:if(!(t>0))return{val:this.message.slice(e.offset,this.offset()),err:null};t-=1;break;default:this.bump()}return{val:this.message.slice(e.offset,this.offset()),err:null}}parseNumberSkeletonFromString(t,e){let o=[];try{o=function(t){if(0===t.length)throw new Error("Number skeleton cannot be empty");const e=t.split(Zn).filter(t=>t.length>0),o=[];for(const i of e){let t=i.split("/");if(0===t.length)throw new Error("Invalid number skeleton");const[e,...n]=t;for(const o of n)if(0===o.length)throw new Error("Invalid number skeleton");o.push({stem:e,options:n})}return o}(t)}catch(i){return this.error(ur.INVALID_NUMBER_SKELETON,e)}return{val:{type:dr.number,tokens:o,location:e,parsedOptions:this.shouldParseSkeletons?cr(o):{}},err:null}}tryParsePluralOrSelectOptions(t,e,o,i){let n=!1;const r=[],a=/* @__PURE__ */new Set;let{value:s,location:l}=i;for(;;){if(0===s.length){const t=this.clonePosition();if("select"===e||!this.bumpIf("="))break;{const e=this.tryParseDecimalInteger(ur.EXPECT_PLURAL_ARGUMENT_SELECTOR,ur.INVALID_PLURAL_ARGUMENT_SELECTOR);if(e.err)return e;l=Dr(t,this.clonePosition()),s=this.message.slice(t.offset,this.offset())}}if(a.has(s))return this.error("select"===e?ur.DUPLICATE_SELECT_ARGUMENT_SELECTOR:ur.DUPLICATE_PLURAL_ARGUMENT_SELECTOR,l);"other"===s&&(n=!0),this.bumpSpace();const i=this.clonePosition();if(!this.bumpIf("{"))return this.error("select"===e?ur.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT:ur.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT,Dr(this.clonePosition(),this.clonePosition()));const c=this.parseMessage(t+1,e,o);if(c.err)return c;const u=this.tryParseArgumentClose(i);if(u.err)return u;r.push([s,{value:c.val,location:Dr(i,this.clonePosition())}]),a.add(s),this.bumpSpace(),({value:s,location:l}=this.parseIdentifierIfPossible())}return 0===r.length?this.error("select"===e?ur.EXPECT_SELECT_ARGUMENT_SELECTOR:ur.EXPECT_PLURAL_ARGUMENT_SELECTOR,Dr(this.clonePosition(),this.clonePosition())):this.requiresOtherClause&&!n?this.error(ur.MISSING_OTHER_CLAUSE,Dr(this.clonePosition(),this.clonePosition())):{val:r,err:null}}tryParseDecimalInteger(t,e){let o=1;const i=this.clonePosition();this.bumpIf("+")||this.bumpIf("-")&&(o=-1);let n=!1,r=0;for(;!this.isEOF();){const t=this.char();if(!(t>=48&&t<=57))break;n=!0,r=10*r+(t-48),this.bump()}const a=Dr(i,this.clonePosition());return n?(r*=o,Number.isSafeInteger(r)?{val:r,err:null}:this.error(e,a)):this.error(t,a)}offset(){return this.position.offset}isEOF(){return this.offset()===this.message.length}clonePosition(){return{offset:this.position.offset,line:this.position.line,column:this.position.column}}char(){const t=this.position.offset;if(t>=this.message.length)throw Error("out of bound");const e=this.message.codePointAt(t);if(void 0===e)throw Error(`Offset ${t} is at invalid UTF-16 code unit boundary`);return e}error(t,e){return{val:null,err:{kind:t,message:this.message,location:e}}}bump(){if(this.isEOF())return;const t=this.char();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)}bumpIf(t){if(this.message.startsWith(t,this.offset())){for(let e=0;e=0?(this.bumpTo(o),!0):(this.bumpTo(this.message.length),!1)}bumpTo(t){if(this.offset()>t)throw Error(`targetOffset ${t} must be greater than or equal to the current offset ${this.offset()}`);for(t=Math.min(t,this.message.length);;){const e=this.offset();if(e===t)break;if(e>t)throw Error(`targetOffset ${t} is at invalid UTF-16 code unit boundary`);if(this.bump(),this.isEOF())break}}bumpSpace(){for(;!this.isEOF()&&Rr(this.char());)this.bump()}peek(){var t;if(this.isEOF())return null;const e=this.char(),o=this.offset();return null!==(t=this.message.charCodeAt(o+(e>=65536?2:1)))&&void 0!==t?t:null}}});var Gr=kt(()=>{});function Kr(){return Kr=Object.assign?Object.assign.bind():function(t){for(var e=1;e{});function oa(t){return"function"==typeof t}function ia(t,e,o,i,n,r,a){if(1===t.length&&xr(t[0]))return[{type:Qr.literal,value:t[0].value}];const s=[];for(const c of t){if(xr(c)){s.push({type:Qr.literal,value:c.value});continue}if(Pr(c)){"number"==typeof r&&s.push({type:Qr.literal,value:o.getNumberFormat(e).format(r)});continue}const{value:t}=c;if(!n||!(t in n))throw new Jr(t,a);let l=n[t];if(Ar(c))l&&"string"!=typeof l&&"number"!=typeof l&&"bigint"!=typeof l||(l="string"==typeof l||"number"==typeof l||"bigint"==typeof l?String(l):""),s.push({type:"string"==typeof l?Qr.literal:Qr.object,value:l});else{if(Tr(c)){const t="string"==typeof c.style?i.date[c.style]:Br(c.style)?c.style.parsedOptions:void 0;s.push({type:Qr.literal,value:o.getDateTimeFormat(e,t).format(l)});continue}if(Mr(c)){const t="string"==typeof c.style?i.time[c.style]:Br(c.style)?c.style.parsedOptions:i.time.medium;s.push({type:Qr.literal,value:o.getDateTimeFormat(e,t).format(l)});continue}if(Sr(c)){const t="string"==typeof c.style?i.number[c.style]:Or(c.style)?c.style.parsedOptions:void 0;if(t&&t.scale){const e=t.scale||1;if("bigint"==typeof l){if(!Number.isInteger(e))throw new TypeError(`Cannot apply fractional scale ${e} to bigint value. Scale must be an integer when formatting bigint.`);l*=BigInt(e)}else l*=e}s.push({type:Qr.literal,value:o.getNumberFormat(e,t).format(l)});continue}if(Nr(c)){const{children:t,value:l}=c,u=n[l];if(!oa(u))throw new Zr(l,"function",a);let h=u(ia(t,e,o,i,n,r).map(t=>t.value));Array.isArray(h)||(h=[h]),s.push(...h.map(t=>({type:"string"==typeof t?Qr.literal:Qr.object,value:t})))}if(Ir(c)){const t=l,r=(Object.prototype.hasOwnProperty.call(c.options,t)?c.options[t]:void 0)||c.options.other;if(!r)throw new Xr(c.value,l,Object.keys(c.options),a);s.push(...ia(r.value,e,o,i,n));continue}if(zr(c)){const t=`=${l}`;let r=Object.prototype.hasOwnProperty.call(c.options,t)?c.options[t]:void 0;if(!r){if(!Intl.PluralRules)throw new Wr('Intl.PluralRules is not available in this environment.\nTry polyfilling it using "@formatjs/intl-pluralrules"\n',qr.MISSING_INTL_API,a);const t="bigint"==typeof l?Number(l):l,i=o.getPluralRules(e,{type:c.pluralType}).select(t-(c.offset||0));r=(Object.prototype.hasOwnProperty.call(c.options,i)?c.options[i]:void 0)||c.options.other}if(!r)throw new Xr(c.value,l,Object.keys(c.options),a);const u="bigint"==typeof l?Number(l):l;s.push(...ia(r.value,e,o,i,n,u-(c.offset||0)));continue}}}return(l=s).length<2?l:l.reduce((t,e)=>{const o=t[t.length-1];return o&&o.type===Qr.literal&&e.type===Qr.literal?o.value+=e.value:t.push(e),t},[]);var l}function na(t,e){return e?Object.keys(t).reduce((o,i)=>{var n,r;return o[i]=(n=t[i],(r=e[i])?ee(ee(ee({},n),r),Object.keys(n).reduce((t,e)=>(t[e]=ee(ee({},n[e]),r[e]),t),{})):n),o},ee({},t)):t}function ra(t){return{create:()=>({get:e=>t[e],set(e,o){t[e]=o}})}}var aa,sa,la,ca,ua,ha,da,pa,ma,fa,ga,_a,va,ba,ya,wa,ka,Ca,$a,Ea,xa,Aa,Sa,Ta,Ma,Ia,za,Pa,Na,Oa,Ba,La,Da,ja,Ha,Ra,Ua,Va,Fa,Ga,Ka,Ya,qa,Wa,Xa,Za,Ja,Qa,ts,es,os,is,ns,rs,as,ss,ls,cs,us,hs,ds,ps,ms,fs,gs,_s,vs,bs,ys,ws,ks,Cs,$s,Es,xs,As,Ss,Ts,Ms,Is,zs,Ps,Ns,Os,Bs,Ls,Ds,js,Hs,Rs,Us,Vs,Fs,Gs,Ks,Ys,qs=kt(()=>{or(),Fr(),oe(),Gr(),ea(),qr=/* @__PURE__ */function(t){return t.MISSING_VALUE="MISSING_VALUE",t.INVALID_VALUE="INVALID_VALUE",t.MISSING_INTL_API="MISSING_INTL_API",t}({}),Wr=class extends Error{constructor(t,e,o){super(t),this.code=e,this.originalMessage=o}toString(){return`[formatjs Error: ${this.code}] ${this.message}`}},Xr=class extends Wr{constructor(t,e,o,i){super(`Invalid values for "${t}": "${e}". Options are "${Object.keys(o).join('", "')}"`,qr.INVALID_VALUE,i)}},Zr=class extends Wr{constructor(t,e,o){super(`Value for "${t}" must be of type ${e}`,qr.INVALID_VALUE,o)}},Jr=class extends Wr{constructor(t,e){super(`The intl string context variable "${t}" was not provided to the string "${e}"`,qr.MISSING_VALUE,e)}},Qr=/* @__PURE__ */function(t){return t[t.literal=0]="literal",t[t.object=1]="object",t}({}),Yr=class t{constructor(e,o=t.defaultLocale,i,n){if(this.formatterCache={number:{},dateTime:{},pluralRules:{}},this.format=t=>{const e=this.formatToParts(t);if(1===e.length)return e[0].value;const o=e.reduce((t,e)=>(t.length&&e.type===Qr.literal&&"string"==typeof t[t.length-1]?t[t.length-1]+=e.value:t.push(e.value),t),[]);return o.length<=1?o[0]||"":o},this.formatToParts=t=>ia(this.ast,this.locales,this.formatters,this.formats,t,void 0,this.message),this.resolvedOptions=()=>{var t;return{locale:(null===(t=this.resolvedLocale)||void 0===t?void 0:t.toString())||Intl.NumberFormat.supportedLocalesOf(this.locales)[0]}},this.getAst=()=>this.ast,this.locales=o,this.resolvedLocale=t.resolveLocale(o),"string"==typeof e){if(this.message=e,!t.__parse)throw new TypeError("IntlMessageFormat.__parse must be set to process `message` of type `string`");const o=n||{},i=Kr({},(function(t){if(null==t)throw new TypeError("Cannot destructure "+t)}(o),o));this.ast=t.__parse(e,ee(ee({},i),{},{locale:this.resolvedLocale}))}else this.ast=e;if(!Array.isArray(this.ast))throw new TypeError("A message must be provided as a String or AST.");this.formats=na(t.formats,i),this.formatters=n&&n.formatters||function(t={number:{},dateTime:{},pluralRules:{}}){return{getNumberFormat:Vn((...t)=>new Intl.NumberFormat(...t),{cache:ra(t.number),strategy:zn.variadic}),getDateTimeFormat:Vn((...t)=>new Intl.DateTimeFormat(...t),{cache:ra(t.dateTime),strategy:zn.variadic}),getPluralRules:Vn((...t)=>new Intl.PluralRules(...t),{cache:ra(t.pluralRules),strategy:zn.variadic})}}(this.formatterCache)}static get defaultLocale(){return t.memoizedDefaultLocale||(t.memoizedDefaultLocale=(new Intl.NumberFormat).resolvedOptions().locale),t.memoizedDefaultLocale}},Yr.memoizedDefaultLocale=null,Yr.resolveLocale=t=>{if(void 0===Intl.Locale)return;const e=Intl.NumberFormat.supportedLocalesOf(t);return e.length>0?new Intl.Locale(e[0]):new Intl.Locale("string"==typeof t?t:t[0])},Yr.__parse=Vr,Yr.formats={number:{integer:{maximumFractionDigits:0},currency:{style:"currency"},percent:{style:"percent"}},date:{short:{month:"numeric",day:"numeric",year:"2-digit"},medium:{month:"short",day:"numeric",year:"numeric"},long:{month:"long",day:"numeric",year:"numeric"},full:{weekday:"long",month:"long",day:"numeric",year:"numeric"}},time:{short:{hour:"numeric",minute:"numeric"},medium:{hour:"numeric",minute:"numeric",second:"numeric"},long:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"},full:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"}}},ta=Yr}),Ws=/* @__PURE__ */$t({card:()=>aa,default:()=>la,editor:()=>sa}),Xs=kt(()=>{la={card:aa={not_found:"لم يتم العثور على الكيان"},editor:sa={card:{chips:{alignment:"محاذاة"},climate:{hvac_modes:"أوضاع HVAC",show_temperature_control:"التحكم في درجة الحرارة؟"},cover:{show_buttons_control:"أزرار التحكم؟",show_position_control:"التحكم في الموقع؟",show_tilt_position_control:"التحكم في الإمالة؟"},empty:{no_config_options:"لا تحتوي هذه البطاقة على خيارات التكوين."},fan:{show_direction_control:"التحكم بالإتجاه؟",show_oscillate_control:"التحكم في التذبذب؟",show_percentage_control:"التحكم في النسبة المئوية؟"},generic:{collapsible_controls:"تصغير عناصر التحكم عند الإيقاف",color:"اللون",content_info:"المحتوى",fill_container:"ملئ الحاوية",icon_animation:"تحريك الرمز عندما يكون نشطًا؟",icon_color:"لون الأيقونة",icon_type:"نوع الأيقونة",layout:"التخطيط",primary_info:"المعلومات الأساسية",secondary_info:"المعلومات الفرعية",use_entity_picture:"استخدم صورة الكيان؟"},humidifier:{show_target_humidity_control:"التحكم في الرطوبة؟?"},light:{incompatible_controls:"قد لا يتم عرض بعض عناصر التحكم إذا كان الضوء الخاص بك لا يدعم الميزة.",show_brightness_control:"التحكم في السطوع؟",show_color_control:"التحكم في اللون؟",show_color_temp_control:"التحكم في درجة حرارة اللون؟",use_light_color:"استخدم لون فاتح"},lock:{lock:"مقفل",open:"مفتوح",unlock:"إلغاء قفل"},"media-player":{media_controls:"التحكم في الوسائط",media_controls_list:{next:"التالي",on_off:"تشغيل/إيقاف",play_pause_stop:"تشغيل/إيقاف مؤقت/إيقاف",previous:"السابق",repeat:"وضع التكرار",shuffle:"خلط"},show_volume_level:"إظهار مستوى الصوت",use_media_artwork:"استخدم صورة الوسائط",use_media_info:"استخدم معلومات الوسائط",volume_controls:"التحكم في الصوت",volume_controls_list:{volume_buttons:"أزرار الصوت",volume_mute:"كتم",volume_set:"مستوى الصوت"}},number:{display_mode:"وضع العرض",display_mode_list:{buttons:"الأزرار",default:"الافتراضي(سحب)",slider:"سحب"}},template:{badge_color:"لون الشارة",badge_icon:"أيقونة الشارة",content:"المحتوى",entity_extra:"تستخدم في القوالب والإجراءات",label:"التسمية",multiline_secondary:"متعدد الأسطر الثانوية؟",picture:"صورة (ستحل محل الأيقونة)",primary:"المعلومات الأساسية",secondary:"المعلومات الثانوية"},title:{subtitle:"العنوان الفرعي",subtitle_tap_action:"إجراء النقر على العنوان الفرعي",title:"العنوان",title_tap_action:"إجراء النقر على العنوان"},update:{show_buttons_control:"أزرار التحكم؟"},vacuum:{commands:"الاوامر",commands_list:{on_off:"تشغيل/إيقاف"}},weather:{show_conditions:"الأحوال الجوية؟",show_temperature:"الطقس؟"}},chip:{"chip-picker":{add:"أضف رقاقة",chips:"رقاقات",clear:"مسح",edit:"تعديل",select:"اختر الرقاقة",types:{action:"إجراء","alarm-control-panel":"تنبيه",back:"رجوع",conditional:"مشروط",entity:"الكيان",light:"مظيء",menu:"القائمة",quickbar:"تبويب سريع",spacer:"مساحة",template:"قالب",weather:"الطقس"}},conditional:{chip:"رقاقة"},sub_element_editor:{title:"محرر الرقاقة"}},form:{alignment_picker:{values:{center:"توسيط",default:"المحاذاة الافتراضية",end:"نهاية",justify:"مساواة",start:"بداية"}},color_picker:{values:{default:"اللون الإفتراضي"}},icon_type_picker:{values:{default:"النوع افتراضي","entity-picture":"صورة الكيان",icon:"أيقونة",none:"لا شئ"}},info_picker:{values:{default:"المعلومات الافتراضية","last-changed":"آخر تغيير","last-updated":"آخر تحديث",name:"الإسم",none:"لا شئ",state:"الحالة"}},layout_picker:{values:{default:"تخطيط افتراضي",horizontal:"تخطيط أفقي",vertical:"تخطيط رأسي"}}}}}}),Zs=/* @__PURE__ */$t({default:()=>ua,editor:()=>ca}),Js=kt(()=>{ua={editor:ca={card:{chips:{alignment:"Подравняване"},climate:{hvac_modes:"HVAC Режими",show_temperature_control:"Контрол на температурата?"},cover:{show_buttons_control:"Контролни бутони?",show_position_control:"Контрол на позицията?",show_tilt_position_control:"Контрол на наклона?"},fan:{show_oscillate_control:"Контрол на трептенето?",show_percentage_control:"Процентов контрол?"},generic:{collapsible_controls:"Свий контролите при изключен",content_info:"Съдържание",fill_container:"Изпълване на контейнера",icon_animation:"Анимирай иконата при активен?",icon_color:"Цвят на икона",icon_type:"Тип на икона",layout:"Оформление",primary_info:"Първостепенна информация",secondary_info:"Второстепенна информация",use_entity_picture:"Използвай снимката на обекта?"},humidifier:{show_target_humidity_control:"Контрол на влажността?"},light:{incompatible_controls:"Някои опции могат да бъдат скрити при условие че осветителното тяло не поддържа фунцията.",show_brightness_control:"Контрол на яркостта?",show_color_control:"Контрол на цвета?",show_color_temp_control:"Контрол на температурата?",use_light_color:"Използвай цвета на светлината"},lock:{lock:"Заключен",open:"Отворен",unlock:"Отключен"},"media-player":{media_controls:"Контрол на Медиата",media_controls_list:{next:"Следващ",on_off:"Вкл./Изкл.",play_pause_stop:"Пусни/пауза/стоп",previous:"Предишен",repeat:"Повтаряне",shuffle:"Разбъркано"},show_volume_level:"Покажи контрола за звук",use_media_artwork:"Използвай визуалните детайли от медията",use_media_info:"Използвай информация от медията",volume_controls:"Контрол на звука",volume_controls_list:{volume_buttons:"Бутони за звук",volume_mute:"Заглуши",volume_set:"Ниво на звука"}},template:{badge_color:"Цвят на значка",badge_icon:"Икона на значка",content:"Съдържание",entity_extra:"Използван в шаблони и действия",multiline_secondary:"Много-редова второстепенна информация?",picture:"Картина (ще замени иконата)",primary:"Първостепенна информация",secondary:"Второстепенна информация"},title:{subtitle:"Подзаглавие",title:"Заглавие"},update:{show_buttons_control:"Контролни бутони?"},vacuum:{commands:"Конади",commands_list:{on_off:"Вкл./Изкл."}},weather:{show_conditions:"Условия?",show_temperature:"Температура?"}},chip:{"chip-picker":{add:"Добави чип",chips:"Чипове",clear:"Изчисти",edit:"Редактирай",select:"Избери чип",types:{action:"Действия","alarm-control-panel":"Аларма",back:"Назад",conditional:"Условни",entity:"Обект",light:"Осветление",menu:"Меню",template:"Шаблон",weather:"Време"}},conditional:{chip:"Чип"},sub_element_editor:{title:"Чип редактор"}},form:{alignment_picker:{values:{center:"Център",default:"Основно подравняване",end:"Край",justify:"Подравнен",start:"Старт"}},color_picker:{values:{default:"Основен цвят"}},icon_type_picker:{values:{default:"Основен тип","entity-picture":"Картина на обекта",icon:"Икона",none:"Липсва"}},info_picker:{values:{default:"Основна информация","last-changed":"Последно Променен","last-updated":"Последно Актуализиран",name:"Име",none:"Липсва",state:"Състояние"}},layout_picker:{values:{default:"Основно оформление",horizontal:"Хоризонтално оформление",vertical:"Вертикално оформление"}}}}}}),Qs=/* @__PURE__ */$t({card:()=>ha,default:()=>pa,editor:()=>da}),tl=kt(()=>{pa={card:ha={not_found:"No s'ha trobat l'entitat"},editor:da={card:{chips:{alignment:"Alineació"},climate:{hvac_modes:"Modes HVAC",show_temperature_control:"Control de temperatura?"},cover:{show_buttons_control:"Botons de control?",show_position_control:"Control de posició?",show_tilt_position_control:"Control d'inclinació?"},fan:{show_oscillate_control:"Control d'oscil·lació?",show_percentage_control:"Control de percentatge?"},generic:{collapsible_controls:"Amaga els controls en desactivar",color:"Color",content_info:"Contingut",fill_container:"Emplena el contenidor",icon_animation:"Animar icona en activar?",icon_color:"Color d'icona",icon_type:"Tipus d'icona",layout:"Distribució",primary_info:"Informació primaria",secondary_info:"Informació secundaria",use_entity_picture:"Fer servir la imatge de l'entitat?"},humidifier:{show_target_humidity_control:"Control d'humitat?"},light:{incompatible_controls:"Alguns controls no es mostraran si l'entitat no suporta eixa funció.",show_brightness_control:"Control de brillantor?",show_color_control:"Control de color?",show_color_temp_control:"Control de la temperatura del color?",use_light_color:"Fes servir el color del llum"},lock:{lock:"Bloqueja",open:"Obri",unlock:"Desbloqueja"},"media-player":{media_controls:"Controls multimèdia",media_controls_list:{next:"Pista següent",on_off:"Engegar/Apagar",play_pause_stop:"Reproduïr/Pausar/Detindre",previous:"Pista anterior",repeat:"Mode de repetició",shuffle:"Mesclar"},show_volume_level:"Mostra el nivell de volum",use_media_artwork:"Fes servir l'art multimèdia",use_media_info:"Empra la informació multimèdia",volume_controls:"Controls de volum",volume_controls_list:{volume_buttons:"Botons de volum",volume_mute:"Silenci",volume_set:"Nivell de volum"}},number:{display_mode:"Mode de visualització",display_mode_list:{buttons:"Botons",default:"Per defecte (lliscant)",slider:"Lliscant"}},template:{badge_color:"Color de la insígnia",badge_icon:"Icona de la insígnia",content:"Contingut",entity_extra:"Utilitzats en plantilles i accions",label:"Etiqueta",multiline_secondary:"Secundaria en varies línies?",picture:"Imatge (reemplaçarà la icona)",primary:"Informació primaria",secondary:"Informació secundaria"},title:{subtitle:"Subtítol",subtitle_tap_action:"Acció en tocar el subtítol",title:"Títol",title_tap_action:"Acció en tocar el títol"},update:{show_buttons_control:"Botons de control?"},vacuum:{commands:"Comandaments",commands_list:{on_off:"Engegar/Apagar"}},weather:{show_conditions:"Condicions?",show_temperature:"Temperatura?"}},chip:{"chip-picker":{add:"Afegir xip",chips:"Xips",clear:"Buidar",edit:"Editar",select:"Seleccionar chip",types:{action:"Acció","alarm-control-panel":"Alarma",back:"Tornar",conditional:"Condicional",entity:"Entitat",light:"Llum",menu:"Menú",spacer:"Espai",template:"Plantilla",weather:"Oratge"}},conditional:{chip:"Xip"},sub_element_editor:{title:"Editor de xips"}},form:{alignment_picker:{values:{center:"Centre",default:"Alineació per defecte",end:"Final",justify:"Justifica",start:"Inici"}},color_picker:{values:{default:"Color per defecte"}},icon_type_picker:{values:{default:"Tipus per defecte","entity-picture":"Entitat d'imatge",icon:"Icona",none:"Cap"}},info_picker:{values:{default:"Informació per defecte","last-changed":"Últim Canvi","last-updated":"Última Actualització",name:"Nom",none:"Cap",state:"Estat"}},layout_picker:{values:{default:"Distribució per defecte",horizontal:"Distribució horitzontal",vertical:"Distribució vertical"}}}}}}),el=/* @__PURE__ */$t({card:()=>ma,default:()=>ga,editor:()=>fa}),ol=kt(()=>{ga={card:ma={not_found:"Entita nebyla nalezena"},editor:fa={card:{chips:{alignment:"Zarovnání"},climate:{hvac_modes:"Režimy HVAC",show_temperature_control:"Ovládání teploty?"},cover:{show_buttons_control:"Zobrazit ovládací tlačítka?",show_position_control:"Zobrazit ovládání polohy?",show_tilt_position_control:"Zobrazit ovládání náklonu?"},fan:{show_oscillate_control:"Ovládání oscilaceM",show_percentage_control:"Ovládání v procentech?"},generic:{collapsible_controls:"Pokud je vypnuto, skrýt ovládací prvky",content_info:"Obsah",fill_container:"Vyplnit prostor",icon_animation:"Pokud je aktivní, animovat ikonu?",icon_color:"Barva ikony",icon_type:"Typ ikony",layout:"Rozložení",primary_info:"Primární informace",secondary_info:"Sekundární informace",use_entity_picture:"Použít ikonu entity?"},humidifier:{show_target_humidity_control:"Ovládání vlhkosti?"},light:{incompatible_controls:"Některé ovládací prvky se nemusí zobrazit, pokud vaše světlo tuto funkci nepodporuje.",show_brightness_control:"Ovládání jasu?",show_color_control:"Ovládání barvy světla?",show_color_temp_control:"Ovládání teploty světla?",use_light_color:"Ikona podle barvy světla?"},lock:{lock:"Zamčeno",open:"Otevřeno",unlock:"Odemčeno"},"media-player":{media_controls:"Ovládání médií",media_controls_list:{next:"Další stopa",on_off:"Zapnout/Vypnout",play_pause_stop:"Přehrát/Pauza/Zastavit",previous:"Předchozí stopa",repeat:"Režim opakování",shuffle:"Zamíchat"},show_volume_level:"Zobrazit úroveň hlasitosti",use_media_artwork:"Použít artwork z média",use_media_info:"Použít informace z média",volume_controls:"Ovládání hlasitosti",volume_controls_list:{volume_buttons:"Tlačítka hlasitosti",volume_mute:"Ztlumit",volume_set:"Úroveň hlasitosti"}},number:{display_mode:"Režim zobrazení",display_mode_list:{buttons:"Tlačítka",default:"Výchozí (posuvník)",slider:"Posuvník"}},template:{badge_color:"Barva odznaku",badge_icon:"Ikona odznaku",content:"Obsah",entity_extra:"Použito v šablonách a akcích",multiline_secondary:"Víceřádková sekundární informace?",picture:"Obrázek (nahradí ikonu)",primary:"Primární informace",secondary:"Sekundární informace"},title:{subtitle:"Popis",subtitle_tap_action:"Akce při klepnutí na popis",title:"Nadpis",title_tap_action:"Akce při klepnutí na nadpis"},update:{show_buttons_control:"Zobrazit ovládací tlačítka?"},vacuum:{commands:"Příkazy",commands_list:{on_off:"Zapnout/Vypnout"}},weather:{show_conditions:"Zobrazit podmínky?",show_temperature:"Zobrazit teplotu?"}},chip:{"chip-picker":{add:"Přidat tlačítko",chips:"Tlačítka",clear:"Vymazat",edit:"Upravit",select:"Vybrat tlačítko",types:{action:"Akce","alarm-control-panel":"Alarm",back:"Zpět",conditional:"Podmínka",entity:"Entita",light:"Světlo",menu:"Menu",spacer:"Mezera",template:"Šablona",weather:"Počasí"}},conditional:{chip:"Tlačítko"},sub_element_editor:{title:"Editor tlačítek"}},form:{alignment_picker:{values:{center:"Na střed",default:"Výchozí zarovnání",end:"Na konec",justify:"Do bloku",start:"Na začátek"}},color_picker:{values:{default:"Výchozí barva"}},icon_type_picker:{values:{default:"Výchozí typ","entity-picture":"Ikona entity",icon:"Ikona",none:"Nic"}},info_picker:{values:{default:"Výchozí informace","last-changed":"Poslední změna","last-updated":"Poslední aktualizace",name:"Název",none:"Nic",state:"Stav"}},layout_picker:{values:{default:"Výchozí rozložení",horizontal:"Vodorovné rozložení",vertical:"Svislé rozložení"}}}}}}),il=/* @__PURE__ */$t({card:()=>_a,default:()=>ba,editor:()=>va}),nl=kt(()=>{ba={card:_a={not_found:"Enhed ikke fundet"},editor:va={card:{chips:{alignment:"Justering"},climate:{hvac_modes:"HVAC-tilstande",show_temperature_control:"Temperaturkontrol?"},cover:{show_buttons_control:"Betjeningsknapper?",show_position_control:"Positionskontrol?",show_tilt_position_control:"Tiltkontrol?"},fan:{show_oscillate_control:"Oscillationskontrol?",show_percentage_control:"Procentkontrol?"},generic:{collapsible_controls:"Skjul kontroller når slukket",color:"Farve",content_info:"Indhold",fill_container:"Fyld container",icon_animation:"Animér ikon når aktiv?",icon_color:"Ikon farve",icon_type:"Ikon type",layout:"Layout",primary_info:"Primær information",secondary_info:"Sekundær information",use_entity_picture:"Brug enhedsbillede?"},humidifier:{show_target_humidity_control:"Luftfugtighedskontrol?"},light:{incompatible_controls:"Nogle kontroller vises muligvis ikke, hvis dit lys ikke understøtter funktionen.",show_brightness_control:"Lysstyrkekontrol?",show_color_control:"Farvekontrol?",show_color_temp_control:"Temperaturfarvekontrol?",use_light_color:"Brug lysfarve"},lock:{lock:"Lås",open:"Åben",unlock:"Lås op"},"media-player":{media_controls:"Mediekontrol",media_controls_list:{next:"Næste nummer",on_off:"Tænd/Sluk",play_pause_stop:"Afspil/Pause/Stop",previous:"Forrige nummer",repeat:"Gentagelsestilstand",shuffle:"Bland"},show_volume_level:"Vis lydstyrke",use_media_artwork:"Brug mediebilleder",use_media_info:"Brug medieinformation",volume_controls:"Lydstyrkekontrol",volume_controls_list:{volume_buttons:"Lydstyrkeknapper",volume_mute:"Lydløs",volume_set:"Lydstyrke"}},number:{display_mode:"Visningstilstand",display_mode_list:{buttons:"Knapper",default:"Standard (slider)",slider:"Slider"}},template:{badge_color:"Badge farve",badge_icon:"Badge ikon",content:"Indhold",entity_extra:"Anvendes i skabeloner og handlinger",label:"Label",multiline_secondary:"Multi-linje sekundær?",picture:"Billede (erstatter ikonet)",primary:"Primær information",secondary:"Sekundær information"},title:{subtitle:"Undertitel",subtitle_tap_action:"Undertitel tryk handling",title:"Titel",title_tap_action:"Title tryk handling"},update:{show_buttons_control:"Betjeningsknapper?"},vacuum:{commands:"Kommandoer",commands_list:{on_off:"Slå til/fra"}},weather:{show_conditions:"Vejrforhold?",show_temperature:"Temperatur?"}},chip:{"chip-picker":{add:"Tilføj chip",chips:"Chips",clear:"Nulstil",edit:"Rediger",select:"Vælg chip",types:{action:"Handling","alarm-control-panel":"Alarm",back:"Tilbage",conditional:"Betinget",entity:"Enhed",light:"Lys",menu:"Menu",spacer:"Afstand",template:"Skabelon",weather:"Vejr"}},conditional:{chip:"Chip"},sub_element_editor:{title:"Chip-editor"}},form:{alignment_picker:{values:{center:"Centrer",default:"Standard justering",end:"Slut",justify:"Lige margener",start:"Start"}},color_picker:{values:{default:"Standardfarve"}},icon_type_picker:{values:{default:"Standard type","entity-picture":"Enhedsbillede",icon:"Ikon",none:"Ingen"}},info_picker:{values:{default:"Standard information","last-changed":"Sidst ændret","last-updated":"Sidst opdateret",name:"Navn",none:"Ingen",state:"Status"}},layout_picker:{values:{default:"Standard layout",horizontal:"Horisontal layout",vertical:"Vertikal layout"}}}}}}),rl=/* @__PURE__ */$t({card:()=>ya,default:()=>ka,editor:()=>wa}),al=kt(()=>{ka={card:ya={not_found:"Entität nicht gefunden"},editor:wa={card:{chips:{alignment:"Ausrichtung"},climate:{hvac_modes:"HVAC-Modi",show_temperature_control:"Temperatursteuerung?"},cover:{show_buttons_control:"Schaltflächensteuerung?",show_position_control:"Positionssteuerung?",show_tilt_position_control:"Winkelsteuerung?"},empty:{no_config_options:"Diese Karte hat keine Optionen."},fan:{show_direction_control:"Richtungssteuerung?",show_oscillate_control:"Oszillationssteuerung?",show_percentage_control:"Prozentuale Kontrolle?"},generic:{collapsible_controls:"Schieberegler einklappen, wenn aus",color:"Farbe",content_info:"Inhalt",fill_container:"Container ausfüllen",icon_animation:"Icon animieren, wenn aktiv?",icon_color:"Icon-Farbe",icon_type:"Icon-Typ",layout:"Layout",primary_info:"Primäre Information",secondary_info:"Sekundäre Information",use_entity_picture:"Entitätsbild verwenden?"},humidifier:{show_target_humidity_control:"Luftfeuchtigkeitssteuerung?"},light:{incompatible_controls:"Einige Steuerelemente werden möglicherweise nicht angezeigt, wenn Ihr Licht diese Funktion nicht unterstützt.",show_brightness_control:"Helligkeitsregelung?",show_color_control:"Farbsteuerung?",show_color_temp_control:"Farbtemperatursteuerung?",use_light_color:"Farbsteuerung verwenden"},lock:{lock:"Verriegeln",open:"Öffnen",unlock:"Entriegeln"},"media-player":{media_controls:"Mediensteuerung",media_controls_list:{next:"Nächster Titel",on_off:"Ein/Aus",play_pause_stop:"Play/Pause/Stop",previous:"Vorheriger Titel",repeat:"Wiederholen",shuffle:"Zufällige Wiedergabe"},show_volume_level:"Lautstärke-Level anzeigen",use_media_artwork:"Mediengrafik verwenden",use_media_info:"Medieninfos verwenden",volume_controls:"Lautstärkesteuerung",volume_controls_list:{volume_buttons:"Lautstärke-Buttons",volume_mute:"Stumm",volume_set:"Lautstärke-Level"}},number:{display_mode:"Anzeigemodus",display_mode_list:{buttons:"Buttons",default:"Standard (Schieberegler)",slider:"Schieberegler"}},template:{badge_color:"Badge-Farbe",badge_icon:"Badge-Icon",content:"Inhalt",entity_extra:"Wird in Vorlagen und Aktionen verwendet",label:"Beschriftung",multiline_secondary:"Mehrzeilig sekundär?",picture:"Bild (ersetzt das Icon)",primary:"Primäre Information",secondary:"Sekundäre Information"},title:{subtitle:"Untertitel",subtitle_tap_action:"Untertitel Tipp-Aktion",title:"Titel",title_tap_action:"Titel Tipp-Aktion"},update:{show_buttons_control:"Schaltflächensteuerung?"},vacuum:{commands:"Befehle",commands_list:{on_off:"An/Ausschalten"}},weather:{show_conditions:"Bedingungen?",show_temperature:"Temperatur?"}},chip:{"chip-picker":{add:"Chip hinzufügen",chips:"Chips",clear:"Löschen",edit:"Editieren",select:"Chip auswählen",types:{action:"Aktion","alarm-control-panel":"Alarm",back:"Zurück",conditional:"Bedingung",entity:"Entität",light:"Licht",menu:"Menü",quickbar:"Quickbar",spacer:"Abstand",template:"Vorlage",weather:"Wetter"}},conditional:{chip:"Chip"},sub_element_editor:{title:"Chip Editor"}},form:{alignment_picker:{values:{center:"Mitte",default:"Standard",end:"Ende",justify:"Ausrichten",start:"Anfang"}},color_picker:{values:{default:"Standardfarbe"}},icon_type_picker:{values:{default:"Standard-Typ","entity-picture":"Entitätsbild",icon:"Icon",none:"Keines"}},info_picker:{values:{default:"Standard-Information","last-changed":"Letzte Änderung","last-updated":"Letzte Aktualisierung",name:"Name",none:"Keine",state:"Zustand"}},layout_picker:{values:{default:"Standard-Layout",horizontal:"Horizontales Layout",vertical:"Vertikales Layout"}}}}}}),sl=/* @__PURE__ */$t({default:()=>$a,editor:()=>Ca}),ll=kt(()=>{$a={editor:Ca={card:{chips:{alignment:"Ευθυγράμμιση"},cover:{show_buttons_control:"Έλεγχος κουμπιών;",show_position_control:"Έλεγχος θέσης;"},fan:{show_oscillate_control:"Έλεγχος ταλάντωσης;",show_percentage_control:"Έλεγχος ποσοστού;"},generic:{content_info:"Περιεχόμενο",icon_animation:"Κίνηση εικονιδίου όταν είναι ενεργό;",icon_color:"Χρώμα εικονιδίου",layout:"Διάταξη",primary_info:"Πρωτεύουσες πληροφορίες",secondary_info:"Δευτερεύουσες πληροφορίες",use_entity_picture:"Χρήση εικόνας οντότητας;"},light:{incompatible_controls:"Ορισμένα στοιχεία ελέγχου ενδέχεται να μην εμφανίζονται εάν το φωτιστικό σας δεν υποστηρίζει τη λειτουργία.",show_brightness_control:"Έλεγχος φωτεινότητας;",show_color_control:"Έλεγχος χρώματος;",show_color_temp_control:"Έλεγχος χρώματος θερμοκρασίας;",use_light_color:"Χρήση χρώματος φωτος"},"media-player":{media_controls:"Έλεγχος πολυμέσων",media_controls_list:{next:"Επόμενο κομμάτι",on_off:"Ενεργοποίηση/απενεργοποίηση",play_pause_stop:"Αναπαραγωγή/παύση/διακοπή",previous:"Προηγούμενο κομμάτι",repeat:"Λειτουργία επανάληψης",shuffle:"Τυχαία σειρά"},use_media_artwork:"Χρήση έργων τέχνης πολυμέσων",use_media_info:"Χρήση πληροφοριών πολυμέσων",volume_controls:"Χειριστήρια έντασης ήχου",volume_controls_list:{volume_buttons:"Κουμπιά έντασης ήχου",volume_mute:"Σίγαση",volume_set:"Επίπεδο έντασης ήχου"}},template:{content:"Περιεχόμενο",entity_extra:"Χρησιμοποιείται σε πρότυπα και ενέργειες",multiline_secondary:"Δευτερεύουσες πολλαπλών γραμμών;",primary:"Πρωτεύουσες πληροφορίες",secondary:"Δευτερεύουσες πληροφορίες"},title:{subtitle:"Υπότιτλος",title:"Τίτλος"},update:{show_buttons_control:"Έλεγχος κουμπιών;"},vacuum:{commands:"Εντολές"},weather:{show_conditions:"Συνθήκες;",show_temperature:"Θερμοκρασία;"}},chip:{"chip-picker":{add:"Προσθήκη chip",chips:"Chips",clear:"Καθαρισμός",edit:"Επεξεργασία",select:"Επιλογή chip",types:{action:"Ενέργεια","alarm-control-panel":"Συναγερμός",back:"Πίσω",conditional:"Υπό προϋποθέσεις",entity:"Οντότητα",light:"Φως",menu:"Μενού",template:"Πρότυπο",weather:"Καιρός"}},conditional:{chip:"Chip"},sub_element_editor:{title:"Επεξεργαστής Chip"}},form:{alignment_picker:{values:{center:"Στοίχιση στο κέντρο",default:"Προεπιλεγμένη στοίχιση",end:"Στοίχιση δεξιά",justify:"Πλήρης στοίχιση",start:"Στοίχιση αριστερά"}},color_picker:{values:{default:"Προεπιλεγμένο χρώμα"}},info_picker:{values:{default:"Προεπιλεγμένες πληροφορίες","last-changed":"Τελευταία αλλαγή","last-updated":"Τελευταία ενημέρωση",name:"Όνομα",none:"Τίποτα",state:"Κατάσταση"}},layout_picker:{values:{default:"Προεπιλεγμένη διάταξη",horizontal:"Οριζόντια διάταξη",vertical:"Κάθετη διάταξη"}}}}}}),cl=/* @__PURE__ */$t({card:()=>Ea,default:()=>Sa,editor:()=>xa,migration:()=>Aa}),ul=kt(()=>{Sa={card:Ea={not_found:"Entity not found"},editor:xa={section:{context:"Context",content:"Content",features:"Features",interactions:"Interactions",layout:"Layout",badge:"Badge"},card:{chips:{alignment:"Alignment"},climate:{hvac_modes:"HVAC Modes",show_temperature_control:"Temperature control?"},cover:{show_buttons_control:"Control buttons?",show_position_control:"Position control?",show_tilt_position_control:"Tilt control?"},empty:{no_config_options:"This card has no config options."},fan:{show_direction_control:"Direction control?",show_oscillate_control:"Oscillate control?",show_percentage_control:"Percentage control?"},generic:{entity:"Entity",area:"Area",color:"Color",content_info:"Content",fill_container:"Fill container",icon_animation:"Animate icon when active?",icon_color:"Icon color",icon_type:"Icon type",layout:"Layout",primary_info:"Primary information",secondary_info:"Secondary information",use_entity_picture:"Use entity picture?",collapsible_controls:"Collapse controls when off",picture:"Picture",picture_helper:"If set, it will replace the icon."},humidifier:{show_target_humidity_control:"Humidity control?"},light:{incompatible_controls:"Some controls may not be displayed if your light does not support the feature.",show_brightness_control:"Brightness control?",show_color_control:"Color control?",show_color_temp_control:"Color temperature control?",use_light_color:"Use light color"},lock:{lock:"Lock",open:"Open",unlock:"Unlock"},"media-player":{media_controls:"Media controls",media_controls_list:{next:"Next track",on_off:"Turn on/off",play_pause_stop:"Play/pause/stop",previous:"Previous track",repeat:"Repeat mode",shuffle:"Shuffle"},show_volume_level:"Show volume level",use_media_artwork:"Use media artwork",use_media_info:"Use media info",volume_controls:"Volume controls",volume_controls_list:{volume_buttons:"Volume buttons",volume_mute:"Mute",volume_set:"Volume level"}},number:{display_mode:"Display Mode",display_mode_list:{buttons:"Buttons",default:"Default (slider)",slider:"Slider"}},template:{area_helper:"Used in templates and features",area:"Area",badge_color:"Badge color",badge_icon:"Badge icon",badge_text_helper:"If set, it will replace the icon.",badge_text:"Badge text",badge:"Badge",content:"Content",entity_helper:"Used in templates, interactions and features",entity_helper_legacy:"Used in templates and interactions",label:"Label",layout:"Layout",multiline_secondary_helper:"The card may be taller to fit the text and will not always align with the grid system.",multiline_secondary:"Allow multiline secondary information",primary:"Primary information",secondary:"Secondary information"},title:{alignment:"Alignment",subtitle:"Subtitle",subtitle_tap_action:"Subtitle tap action",title:"Title",title_tap_action:"Title tap action"},update:{show_buttons_control:"Control buttons?"},vacuum:{commands:"Commands",commands_list:{on_off:"Turn on/off"}},weather:{show_conditions:"Conditions?",show_temperature:"Temperature?"}},badge:{template:{label:"Label",content:"Content",entity_helper:"Used in templates and interactions",area_helper:"Used in templates"}},chip:{"chip-picker":{add:"Add chip",chips:"Chips",clear:"Clear",edit:"Edit",select:"Select chip",types:{action:"Action","alarm-control-panel":"Alarm",back:"Back",conditional:"Conditional",entity:"Entity",light:"Light",menu:"Menu",quickbar:"Quickbar",spacer:"Spacer",template:"Template",weather:"Weather"}},conditional:{chip:"Chip"},sub_element_editor:{title:"Chip editor"}},form:{alignment_picker:{values:{center:"Center",default:"Default alignment",end:"End",justify:"Justify",start:"Start"}},color_picker:{values:{default:"Default color"}},icon_type_picker:{values:{default:"Default type","entity-picture":"Entity picture",icon:"Icon",none:"None"}},info_picker:{values:{default:"Default information","last-changed":"Last Changed","last-updated":"Last Updated",name:"Name",none:"None",state:"State"}},layout_picker:{values:{default:"Default layout",horizontal:"Horizontal layout",vertical:"Vertical layout"}}}},migration:Aa={title:"Card updated",description:"Your card’s configuration has been migrated to the new version. You can find more information about the changes in {link}.",post:"the GitHub post",revert:"Revert",ok:"Ok"}}}),hl=/* @__PURE__ */$t({card:()=>Ta,default:()=>Ia,editor:()=>Ma}),dl=kt(()=>{Ia={card:Ta={not_found:"Entidad no encontrada"},editor:Ma={card:{chips:{alignment:"Alineación"},climate:{hvac_modes:"Modos de climatización",show_temperature_control:"¿Control de temperatura?"},cover:{show_buttons_control:"¿Botones de control?",show_position_control:"¿Control de posición?",show_tilt_position_control:"¿Control de inclinación?"},empty:{no_config_options:"Esta carta no tiene opciones de config."},fan:{show_direction_control:"¿Control de dirección?",show_oscillate_control:"¿Controlar oscilación?",show_percentage_control:"¿Controlar porcentaje?"},generic:{collapsible_controls:"Contraer controles cuando está apagado",color:"Color",content_info:"Contenido",fill_container:"Rellenar",icon_animation:"¿Icono animado cuando está activo?",icon_color:"Color de icono",icon_type:"Tipo de icono",layout:"Diseño",primary_info:"Información primaria",secondary_info:"Información secundaria",use_entity_picture:"¿Usar imagen de entidad?"},humidifier:{show_target_humidity_control:"¿Controlar humedad?"},light:{incompatible_controls:"Es posible que algunos controles no se muestren si la luz no es compatible con esta función.",show_brightness_control:"¿Controlar brillo?",show_color_control:"¿Controlar color?",show_color_temp_control:"¿Controlar temperatura del color?",use_light_color:"Usar color de la luz"},lock:{lock:"Bloquear",open:"Abrir",unlock:"Desbloquear"},"media-player":{media_controls:"Controles multimedia",media_controls_list:{next:"Pista siguiente",on_off:"Activar/desactivar",play_pause_stop:"Reproducir/pausa/parar",previous:"Pista anterior",repeat:"Modo de repetición",shuffle:"Aleatoria"},show_volume_level:"Mostrar nivel de volumen",use_media_artwork:"Usar ilustraciones multimedia",use_media_info:"Usar información multimedia",volume_controls:"Controles de volumen",volume_controls_list:{volume_buttons:"Botones de volumen",volume_mute:"Silenciar",volume_set:"Nivel de volumen"}},number:{display_mode:"Modo de visualización",display_mode_list:{buttons:"Botones",default:"Por defecto (deslizante)",slider:"Control deslizante"}},template:{badge_color:"Color del distintivo",badge_icon:"Icono del distintivo",content:"Contenido",entity_extra:"Utilizado en plantillas y acciones",label:"Etiqueta",multiline_secondary:"¿Secundaria multilínea?",picture:"Imagen (sustituirá al icono)",primary:"Información primaria",secondary:"Información secundaria"},title:{subtitle:"Subtítulo",subtitle_tap_action:"Acción al tocar el subtítulo",title:"Título",title_tap_action:"Acción al tocar el título"},update:{show_buttons_control:"¿Botones de control?"},vacuum:{commands:"Comandos",commands_list:{on_off:"Activar/desactivar"}},weather:{show_conditions:"¿Condiciones?",show_temperature:"¿Temperatura?"}},chip:{"chip-picker":{add:"Añadir chip",chips:"Chips",clear:"Limpiar",edit:"Editar",select:"Seleccionar chip",types:{action:"Acción","alarm-control-panel":"Alarma",back:"Volver",conditional:"Condicional",entity:"Entidad",light:"Luz",menu:"Menú",spacer:"Espaciador",template:"Plantilla",weather:"Clima"}},conditional:{chip:"Chip"},sub_element_editor:{title:"Editor de chip"}},form:{alignment_picker:{values:{center:"Centrado",default:"Alineación predeterminada",end:"Final",justify:"Justificado",start:"Inicio"}},color_picker:{values:{default:"Color predeterminado"}},icon_type_picker:{values:{default:"Por defecto","entity-picture":"Imagen de entidad",icon:"Icono",none:"Ninguno"}},info_picker:{values:{default:"Información predeterminada","last-changed":"Último cambio","last-updated":"Última actualización",name:"Nombre",none:"Ninguno",state:"Estado"}},layout_picker:{values:{default:"Diseño predeterminado",horizontal:"Diseño horizontal",vertical:"Diseño vertical"}}}}}}),pl=/* @__PURE__ */$t({card:()=>za,default:()=>Na,editor:()=>Pa}),ml=kt(()=>{Na={card:za={not_found:"Entiteettiä ei löytynyt"},editor:Pa={card:{chips:{alignment:"Asettelu"},climate:{hvac_modes:"HVAC-tilat",show_temperature_control:"Lämpötilan säätö?"},cover:{show_buttons_control:"Toimintopainikkeet?",show_position_control:"Sijainnin hallinta?",show_tilt_position_control:"Kallistuksen säätö?"},fan:{show_oscillate_control:"Oskillaation säätö?",show_percentage_control:"Prosentuaalinen säätö?"},generic:{collapsible_controls:"Supista säätimet ollessa pois-tilassa",color:"Väri",content_info:"Sisältö",fill_container:"Täytä alue",icon_animation:"Animoi kuvake, kun aktiivinen?",icon_color:"Ikonin väri",icon_type:"Kuvakkeen tyyppi",layout:"Asettelu",primary_info:"Ensisijaiset tiedot",secondary_info:"Toissijaiset tiedot",use_entity_picture:"Käytä kohteen kuvaa?"},humidifier:{show_target_humidity_control:"Kosteudenhallinta?"},light:{incompatible_controls:"Jotkin toiminnot eivät näy, jos valaisimesi ei tue niitä.",show_brightness_control:"Kirkkauden säätö?",show_color_control:"Värin säätö?",show_color_temp_control:"Värilämpötilan säätö?",use_light_color:"Käytä valaisimen väriä"},lock:{lock:"Lukitse",open:"Avaa",unlock:"Poista lukitus"},"media-player":{media_controls:"Toiminnot",media_controls_list:{next:"Seuraava kappale",on_off:"Päälle/pois",play_pause_stop:"Toista/keskeytä/pysäytä",previous:"Edellinen kappale",repeat:"Jatkuva toisto",shuffle:"Sekoita"},show_volume_level:"Näytä äänenvoimakkuuden hallinta",use_media_artwork:"Käytä median kuvituksia",use_media_info:"Käytä median tietoja",volume_controls:"Äänenvoimakkuuden hallinta",volume_controls_list:{volume_buttons:"Äänenvoimakkuuspainikkeet",volume_mute:"Mykistä",volume_set:"Äänenvoimakkuus"}},number:{display_mode:"Näyttötila",display_mode_list:{buttons:"Painikkeet",default:"Oletus (liukusäädin)",slider:"Liukusäädin"}},template:{badge_color:"Merkin väri",badge_icon:"Merkin kuvake",content:"Sisältö",entity_extra:"Käytetään malleissa ja toiminnoissa",label:"Nimiö",multiline_secondary:"Monirivinen toissijainen tieto?",picture:"Kuva (korvaa kuvakkeen)",primary:"Ensisijaiset tiedot",secondary:"Toissijaiset tiedot"},title:{subtitle:"Tekstitys",subtitle_tap_action:"Alaotsikon napautustoiminto",title:"Otsikko",title_tap_action:"Otsikkonapautustoiminto"},update:{show_buttons_control:"Toimintopainikkeet?"},vacuum:{commands:"Komennot",commands_list:{on_off:"Kytke päälle/pois"}},weather:{show_conditions:"Ehdot?",show_temperature:"Lämpötila?"}},chip:{"chip-picker":{add:"Lisää merkki",chips:"Merkit",clear:"Tyhjennä",edit:"Muokkaa",select:"Valitse merkki",types:{action:"Toiminto","alarm-control-panel":"Hälytys",back:"Takaisin",conditional:"Ehdollinen",entity:"Kohde",light:"Valaisin",menu:"Valikko",spacer:"Välikappale",template:"Malli",weather:"Sää"}},conditional:{chip:"Merkki"},sub_element_editor:{title:"Merkkieditori"}},form:{alignment_picker:{values:{center:"Keskitä",default:"Keskitys",end:"Loppu",justify:"Sovita",start:"Alku"}},color_picker:{values:{default:"Oletusväri"}},icon_type_picker:{values:{default:"Oletustyyppi","entity-picture":"Kohteen kuva",icon:"Kuvake",none:"Ei mitään"}},info_picker:{values:{default:"Oletustiedot","last-changed":"Viimeksi muuttunut","last-updated":"Viimeksi päivittynyt",name:"Nimi",none:"Ei mitään",state:"Tila"}},layout_picker:{values:{default:"Oletusasettelu",horizontal:"Vaakasuuntainen",vertical:"Pystysuuntainen"}}}}}}),fl=/* @__PURE__ */$t({card:()=>Oa,default:()=>Da,editor:()=>Ba,migration:()=>La}),gl=kt(()=>{Da={card:Oa={not_found:"Entité inconnue"},editor:Ba={badge:{template:{area_helper:"Utilisée dans les modèles",content:"Contenu",entity_helper:"Utilisée dans les modèles et les interactions",label:"Libellé"}},card:{chips:{alignment:"Alignement"},climate:{hvac_modes:"Modes du thermostat",show_temperature_control:"Contrôle de la température ?"},cover:{show_buttons_control:"Contrôle avec boutons ?",show_position_control:"Contrôle de la position ?",show_tilt_position_control:"Contrôle de l'inclinaison ?"},empty:{no_config_options:"Cette carte n'a pas de paramètres."},fan:{show_direction_control:"Contrôle de la direction ?",show_oscillate_control:"Contrôle de l'oscillation ?",show_percentage_control:"Contrôle de la vitesse ?"},generic:{area:"Pièce",collapsible_controls:"Reduire les contrôles quand éteint",color:"Couleur",content_info:"Contenu",entity:"Entité",fill_container:"Remplir le conteneur",icon_animation:"Animation de l'icône ?",icon_color:"Couleur de l'icône",icon_type:"Type d'icône",layout:"Disposition",picture:"Image",picture_helper:"Si définie, elle remplacera l'icône.",primary_info:"Information principale",secondary_info:"Information secondaire",use_entity_picture:"Utiliser l'image de l'entité ?"},humidifier:{show_target_humidity_control:"Contrôle d'humidité ?"},light:{incompatible_controls:"Certains contrôles peuvent ne pas être affichés si votre lumière ne supporte pas la fonctionnalité.",show_brightness_control:"Contrôle de luminosité ?",show_color_control:"Contrôle de la couleur ?",show_color_temp_control:"Contrôle de la température ?",use_light_color:"Utiliser la couleur de la lumière"},lock:{lock:"Verrouiller",open:"Ouvrir",unlock:"Déverrouiller"},"media-player":{media_controls:"Contrôles du media",media_controls_list:{next:"Suivant",on_off:"Allumer/Éteindre",play_pause_stop:"Lecture/pause/stop",previous:"Précédent",repeat:"Mode de répétition",shuffle:"Lecture aléatoire"},show_volume_level:"Afficher le niveau de volume",use_media_artwork:"Utiliser l'illustration du media",use_media_info:"Utiliser les informations du media",volume_controls:"Contrôles du volume",volume_controls_list:{volume_buttons:"Bouton de volume",volume_mute:"Muet",volume_set:"Niveau de volume"}},number:{display_mode:"Mode d'affichage",display_mode_list:{buttons:"Boutons",default:"Par défaut (Curseur)",slider:"Curseur"}},template:{area:"Pièce",area_helper:"Utilisée dans les modèles et les fonctionnalités",badge:"Badge",badge_color:"Couleur du badge",badge_icon:"Icône du badge",badge_text:"Texte du badge",badge_text_helper:"Si définie, elle remplacera l'icône.",content:"Contenu",entity_extra:"Utilisée pour les modèles et les actions",entity_helper:"Utilisée dans les modèles, les interactions et les fonctionnalités",entity_helper_legacy:"Utilisé dans les modèles et les interactions",label:"Libellé",layout:"Disposition",multiline_secondary:"Autoriser les informations secondaires sur plusieurs lignes",multiline_secondary_helper:"La carte peut être plus haute pour s'adapter au texte et ne s'alignera pas toujours avec le système de grille.",picture:"Image (remplacera l'icône)",primary:"Information principale",secondary:"Information secondaire"},title:{subtitle:"Sous-titre",subtitle_tap_action:"Appui sur le sous-titre",title:"Titre",title_tap_action:"Appui sur le titre"},update:{show_buttons_control:"Contrôle avec boutons ?"},vacuum:{commands:"Commandes",commands_list:{on_off:"Allumer/Éteindre"}},weather:{show_conditions:"Conditions ?",show_conditons:"Conditions ?",show_temperature:"Température ?"}},chip:{"chip-picker":{add:'Ajouter une "chip"',chips:'"Chips"',clear:"Effacer",edit:"Modifier",select:'Sélectionner une "chip"',types:{action:"Action","alarm-control-panel":"Alarme",back:"Retour",conditional:"Conditionnel",entity:"Entité",light:"Lumière",menu:"Menu",quickbar:"Barre d'accès rapide",spacer:"Espacement",template:"Modèle",weather:"Météo"}},conditional:{chip:"Chip"},sub_element_editor:{title:'Éditeur de "chip"'}},form:{alignment_picker:{values:{center:"Centré",default:"Alignement par défaut",end:"Fin",justify:"Justifié",start:"Début"}},color_picker:{values:{default:"Couleur par défaut"}},icon_type_picker:{values:{default:"Type par défaut","entity-picture":"Image de l'entité",icon:"Icône",none:"Aucune"}},info_picker:{values:{default:"Information par défaut","last-changed":"Dernière modification","last-updated":"Dernière mise à jour",name:"Nom",none:"Aucune",state:"État"}},layout_picker:{values:{default:"Disposition par défault",horizontal:"Disposition horizontale",vertical:"Disposition verticale"}}},section:{badge:"Badge",content:"Contenu",context:"Contexte",features:"Fonctionnalités",interactions:"Interactions",layout:"Disposition"}},migration:La={description:"La configuration de votre carte a été migrée vers la nouvelle version. Vous pouvez trouver plus d’informations sur les changements dans {link}.",ok:"Ok",post:"l'article sur Github",revert:"Revenir en arrière",title:"Carte mise à jour"}}}),_l=/* @__PURE__ */$t({card:()=>ja,default:()=>Ra,editor:()=>Ha}),vl=kt(()=>{Ra={card:ja={not_found:"היישות לא נמצאה"},editor:Ha={card:{chips:{alignment:"יישור"},climate:{hvac_modes:"מצבי שואב אבק",show_temperature_control:"בקרת טמפרטורה?"},cover:{show_buttons_control:"הצג כפתורי שליטה?",show_position_control:"הצג פקדי מיקום?",show_tilt_position_control:"שליטה בהטייה?"},empty:{no_config_options:"לכרטיסיה זו אין אפשרויות להגדרה."},fan:{show_direction_control:"שליטה בכיוון?",show_oscillate_control:"שליטה בהתנדנדות?",show_percentage_control:"שליטה באחוז?"},generic:{collapsible_controls:"הסתר שליטה כשאר מכובה",color:"צבע",content_info:"תוכן",fill_container:"מלא גבולות",icon_animation:"הנפש צלמית אם פעיל?",icon_color:"צבע אייקון",icon_type:"סוג צלמית",layout:"סידור",primary_info:"מידע ראשי",secondary_info:"מידע מישני",use_entity_picture:"השתמש בתמונת הישות?"},humidifier:{show_target_humidity_control:"הצג פקדי לחות?"},light:{incompatible_controls:"יתכן וחלק מהכפתורים לא יופיעו אם התאורה אינה תומכת בתכונה.",show_brightness_control:"שליטה בבהירות?",show_color_control:"הצג פקד צבע?",show_color_temp_control:"הצג פקד גוון תאורה?",use_light_color:"השתמש בצבע האור"},lock:{lock:"נעל",open:"פתח",unlock:"בטל נעילה"},"media-player":{media_controls:"שליטה במדיה",media_controls_list:{next:"רצועה הבאה",on_off:"הדלק/כבה",play_pause_stop:"נגן/השהה/הפסק",previous:"רצועה קודמת",repeat:"חזרה",shuffle:"ערבב"},show_volume_level:"הצג שליטת ווליום",use_media_artwork:"השתמש באומנות מדיה",use_media_info:"השתמש במידע מדיה",volume_controls:"שליטה בווליום",volume_controls_list:{volume_buttons:"כפתורי ווליום",volume_mute:"השתק",volume_set:"רמת ווליום"}},number:{display_mode:"הגדרת מצב תצוגה",display_mode_list:{buttons:"לחצנים",default:"ברירת מחדל (סרגל גלילה)",slider:"סרגל גלילה"}},template:{badge_color:"צבע תג",badge_icon:"צלמית תג",content:"תוכן",entity_extra:"משמש בתבניות ופעולות",label:"תווית",multiline_secondary:"מידע משני בשורות?",picture:"תמונה (תחליף את הצלמית)",primary:"מידע ראשי",secondary:"מידע מישני"},title:{subtitle:"כתובית",subtitle_tap_action:"פעולה בלחיצה על כותרת משנה",title:"כותרת",title_tap_action:"פעולה בלחיצה על הכותרת"},update:{show_buttons_control:"הצג כפתורי שליטה?"},vacuum:{commands:"פקודות",commands_list:{on_off:"כיבוי/הדלקה"},icon_animation:"הנפשת אייקון"},weather:{show_conditions:"הצג תנאים?",show_temperature:"הצג טמפרטורה?"}},chip:{"chip-picker":{add:"הוסף שבב",chips:"שבבים",clear:"נקה",edit:"ערוך",select:"בחר שבב",types:{action:"פעולה","alarm-control-panel":"אזעקה",back:"חזור",conditional:"מותנה",entity:"ישות",light:"אור",menu:"תפריט",spacer:"מרווח",template:"תבנית",weather:"מזג אוויר"}},conditional:{chip:"שבב"},sub_element_editor:{title:"עורך שבב"}},form:{alignment_picker:{values:{center:"אמצע",default:"יישור ברירת מחדל",end:"סוף",justify:"מוצדק",start:"התחלה"}},color_picker:{values:{default:"צבע ברירת מחדל"}},icon_type_picker:{values:{default:"סוג ברירת מחדל","entity-picture":"תמונת יישות",icon:"צלמית",none:"ריק"}},info_picker:{values:{default:"מידע ברירת מחדל","last-changed":"שונה לאחרונה","last-updated":"עודכן לאחרונה",name:"שם",none:"ריק",state:"מצב"}},layout_picker:{values:{default:"סידור ברירת מחדל",horizontal:"סידור מאוזן",vertical:"סידור מאונך"}}}}}}),bl=/* @__PURE__ */$t({card:()=>Ua,default:()=>Fa,editor:()=>Va}),yl=kt(()=>{Fa={card:Ua={not_found:"Entitás nem található"},editor:Va={card:{chips:{alignment:"Rendezés"},climate:{hvac_modes:"HVAC mód",show_temperature_control:"Hőmérséklet vezérlő"},cover:{show_buttons_control:"Vezérlő gombok",show_position_control:"Pozíció vezérlő",show_tilt_position_control:"Dőlésszög szabályzó"},fan:{show_oscillate_control:"Oszcilláció vezérlő",show_percentage_control:"Százalékos vezérlő"},generic:{collapsible_controls:"Vezérlők összezárása kikapcsolt állapotban",content_info:"Tartalom",fill_container:"Tároló kitöltése",icon_animation:"Ikon animálása aktív állapotban",icon_color:"Ikon szín",icon_type:"Ikon típus",layout:"Elrendezés",primary_info:"Elsődleges információ",secondary_info:"Másodlagos információ",use_entity_picture:"Entitás kép használata"},humidifier:{show_target_humidity_control:"Páratartalom vezérlő"},light:{incompatible_controls:"Azok a vezérlők nem lesznek megjelenítve, amelyeket a fényforrás nem támogat.",show_brightness_control:"Fényerő vezérlő",show_color_control:"Szín vezérlő",show_color_temp_control:"Színhőmérséklet vezérlő",use_light_color:"Fény szín használata"},lock:{lock:"Zár",open:"Nyitva",unlock:"Nyit"},"media-player":{media_controls:"Média vezérlők",media_controls_list:{next:"Következő szám",on_off:"Ki/bekapcsolás",play_pause_stop:"Lejátszás/szünet/állj",previous:"Előző szám",repeat:"Ismétlés módja",shuffle:"Véletlen lejátszás"},show_volume_level:"Hangerő mutatása",use_media_artwork:"Média borító használata",use_media_info:"Média infó használata",volume_controls:"Hangerő vezérlők",volume_controls_list:{volume_buttons:"Hangerő gombok",volume_mute:"Némítás",volume_set:"Hangerő szint"}},number:{display_mode:"Megjelenítési mód",display_mode_list:{buttons:"Gombok",default:"Alepértelmezett (csúszka)",slider:"Csúszka"}},template:{badge_color:"Jelvény szín",badge_icon:"Jelvény ikon",content:"Tartalom",entity_extra:"Műveletek és sablonok használatakor",multiline_secondary:"Másodlagost több sorba?",picture:"Kép (lecseréli az ikont)",primary:"Elsődleges információ",secondary:"Másodlagos információ"},title:{subtitle:"Alcím",subtitle_tap_action:"Alcímre koppintáskor",title:"Fejléc",title_tap_action:"Fejlécre koppintáskor"},update:{show_buttons_control:"Vezérlő gombok"},vacuum:{commands:"Utasítások",commands_list:{on_off:"Ki/Bekapcsolás"}},weather:{show_conditions:"Állapotok",show_temperature:"Hőmérséklet"}},chip:{"chip-picker":{add:"Chip hozzáadása",chips:"Chip-ek",clear:"Ürítés",edit:"Szerkesztés",select:"Chip kiválasztása",types:{action:"Művelet","alarm-control-panel":"Riasztó",back:"Vissza",conditional:"Feltételes",entity:"Entitás",light:"Fényforrás",menu:"Menü",spacer:"Térköz",template:"Sablon",weather:"Időjárás"}},conditional:{chip:"Chip"},sub_element_editor:{title:"Chip szerkesztő"}},form:{alignment_picker:{values:{center:"Közepe",default:"Alapértelmezett rendezés",end:"Vége",justify:"Sorkizárt",start:"Kezdete"}},color_picker:{values:{default:"Alapértelmezett szín"}},icon_type_picker:{values:{default:"Alapértelmezett típus","entity-picture":"Entitás kép",icon:"Ikon",none:"Egyik sem"}},info_picker:{values:{default:"Alepértelmezett információ","last-changed":"Utoljára módosítva","last-updated":"Utoljára frissítve",name:"Név",none:"Egyik sem",state:"Állapot"}},layout_picker:{values:{default:"Alapértelmezet elrendezés",horizontal:"Vízszintes elrendezés",vertical:"Függőleges elrendezés"}}}}}}),wl=/* @__PURE__ */$t({card:()=>Ga,default:()=>Ya,editor:()=>Ka}),kl=kt(()=>{Ya={card:Ga={not_found:"Entitas tidak ditemukan"},editor:Ka={card:{chips:{alignment:"Perataan"},climate:{hvac_modes:"Mode HVAC",show_temperature_control:"Kontrol suhu?"},cover:{show_buttons_control:"Tombol kontrol?",show_position_control:"Kontrol posisi?",show_tilt_position_control:"Kontrol kemiringan?"},fan:{show_oscillate_control:"Kontrol osilasi?",show_percentage_control:"Kontrol persentase?"},generic:{collapsible_controls:"Sembunyikan kontrol saat mati",color:"Warna",content_info:"Konten",fill_container:"Isi kontainer",icon_animation:"Animasikan ikon saat aktif?",icon_color:"Warna ikon",icon_type:"Tipe ikon",layout:"Tata letak",primary_info:"Informasi primer",secondary_info:"Informasi sekunder",use_entity_picture:"Gunakan gambar entitas?"},humidifier:{show_target_humidity_control:"Kontrol kelembapan?"},light:{incompatible_controls:"Beberapa kontrol mungkin tidak ditampilkan jika lampu Anda tidak mendukung fitur tersebut.",show_brightness_control:"Kontrol kecerahan?",show_color_control:"Kontrol warna?",show_color_temp_control:"Kontrol suhu warna?",use_light_color:"Gunakan warna lampu"},lock:{lock:"Kunci",open:"Buka",unlock:"Buka kunci"},"media-player":{media_controls:"Kontrol media",media_controls_list:{next:"Lagu berikutnya",on_off:"Nyalakan/Matikan",play_pause_stop:"Putar/jeda/stop",previous:"Lagu sebelumnya",repeat:"Mode pengulangan",shuffle:"Acak"},show_volume_level:"Tampilkan level volume",use_media_artwork:"Gunakan gambar seni media",use_media_info:"Gunakan info media",volume_controls:"Kontrol volume",volume_controls_list:{volume_buttons:"Tombol volume",volume_mute:"Bisukan",volume_set:"Level volume"}},number:{display_mode:"Mode Tampilan",display_mode_list:{buttons:"Tombol",default:"Bawaan (geser)",slider:"Geser"}},template:{badge_color:"Warna lencana",badge_icon:"Ikon lencana",content:"Konten",entity_extra:"Digunakan dalam templat dan tindakan",label:"Label",multiline_secondary:"Info sekunder multibaris?",picture:"Gambar (akan menggantikan ikon)",primary:"Informasi primer",secondary:"Informasi sekunder"},title:{subtitle:"Subjudul",subtitle_tap_action:"Tindakan ketuk subjudul",title:"Judul",title_tap_action:"Tindakan ketuk judul"},update:{show_buttons_control:"Tombol kontrol?"},vacuum:{commands:"Perintah",commands_list:{on_off:"Nyalakan/Matikan"}},weather:{show_conditions:"Kondisi?",show_temperature:"Suhu?"}},chip:{"chip-picker":{add:"Tambah cip",chips:"Cip",clear:"Hapus",edit:"Edit",select:"Pilih cip",types:{action:"Tindakan","alarm-control-panel":"Alarm",back:"Kembali",conditional:"Kondisional",entity:"Entitas",light:"Lampu",menu:"Menu",spacer:"Pemisah",template:"Templat",weather:"Cuaca"}},conditional:{chip:"Cip"},sub_element_editor:{title:"Editor cip"}},form:{alignment_picker:{values:{center:"Tengah",default:"Perataan bawaan",end:"Akhir",justify:"Rata kanan-kiri",start:"Awal"}},color_picker:{values:{default:"Warna bawaan"}},icon_type_picker:{values:{default:"Tipe bawaan","entity-picture":"Gambar entitas",icon:"Ikon",none:"Tidak ada"}},info_picker:{values:{default:"Informasi bawaan","last-changed":"Terakhir Diubah","last-updated":"Terakhir Diperbarui",name:"Nama",none:"Tidak ada",state:"Status"}},layout_picker:{values:{default:"Tata letak bawaan",horizontal:"Tata letak horizontal",vertical:"Tata letak vertikal"}}}}}}),Cl=/* @__PURE__ */$t({card:()=>qa,default:()=>Xa,editor:()=>Wa}),$l=kt(()=>{Xa={card:qa={not_found:"Entità non trovata"},editor:Wa={card:{chips:{alignment:"Allineamento"},climate:{hvac_modes:"Modalità del termostato",show_temperature_control:"Controllo della temperatura?"},cover:{show_buttons_control:"Pulsanti di controllo",show_position_control:"Controllo percentuale apertura",show_tilt_position_control:"Controllo percentuale inclinazione"},fan:{show_oscillate_control:"Controllo oscillazione",show_percentage_control:"Controllo potenza"},generic:{collapsible_controls:"Nascondi i controlli quando spento",color:"Colore",content_info:"Contenuto",fill_container:"Riempi il contenitore",icon_animation:"Anima l'icona quando attiva",icon_color:"Colore dell'icona",icon_type:"Tipo icona",layout:"Disposizione",primary_info:"Informazione primaria",secondary_info:"Informazione secondaria",use_entity_picture:"Usa l'immagine dell'entità"},humidifier:{show_target_humidity_control:"Controllo umidità"},light:{incompatible_controls:"Alcuni controlli potrebbero non essere mostrati se la tua luce non li supporta.",show_brightness_control:"Controllo luminosità",show_color_control:"Controllo colore",show_color_temp_control:"Controllo temperatura",use_light_color:"Usa il colore della luce"},lock:{lock:"Blocca",open:"Aperto",unlock:"Sblocca"},"media-player":{media_controls:"Controlli media",media_controls_list:{next:"Traccia successiva",on_off:"Accendi/Spegni",play_pause_stop:"Play/Pausa/Stop",previous:"Traccia precedente",repeat:"Ciclo continuo",shuffle:"Riproduzione casuale"},show_volume_level:"Mostra volume",use_media_artwork:"Usa la copertina della sorgente",use_media_info:"Mostra le informazioni della sorgente",volume_controls:"Controlli del Volume",volume_controls_list:{volume_buttons:"Bottoni del volume",volume_mute:"Silenzia",volume_set:"Livello del volume"}},number:{display_mode:"Modalità di visualizzazione",display_mode_list:{buttons:"Pulsanti",default:"Predefinito (cursore)",slider:"Cursore"}},template:{badge_color:"Colore del badge",badge_icon:"Icona del badge",content:"Contenuto",entity_extra:"Usato in templates ed azioni",label:"Etichetta",multiline_secondary:"Abilita frasi multilinea",picture:"Immagine (sostituirà l'icona)",primary:"Informazione primaria",secondary:"Informazione secondaria"},title:{subtitle:"Sottotitolo",subtitle_tap_action:"Azione di tap sul sottotitolo",title:"Titolo",title_tap_action:"Azione di tap sul titolo"},update:{show_buttons_control:"Pulsanti di controllo"},vacuum:{commands:"Comandi",commands_list:{on_off:"Accendi/Spegni"}},weather:{show_conditions:"Condizioni",show_temperature:"Temperatura"}},chip:{"chip-picker":{add:"Aggiungi chip",chips:"Chips",clear:"Rimuovi",edit:"Modifica",select:"Seleziona chip",types:{action:"Azione","alarm-control-panel":"Allarme",back:"Pulsante indietro",conditional:"Condizione",entity:"Entità",light:"Luce",menu:"Menù",spacer:"Distanziere",template:"Modello",weather:"Meteo"}},conditional:{chip:"Chip"},sub_element_editor:{title:"Editor di chip"}},form:{alignment_picker:{values:{center:"Centro",default:"Allineamento predefinito",end:"Fine",justify:"Giustificato",start:"Inizio"}},color_picker:{values:{default:"Colore predefinito"}},icon_type_picker:{values:{default:"Tipo predefinito","entity-picture":"Immagine dell'entità",icon:"Icona",none:"Nessuna"}},info_picker:{values:{default:"Informazione predefinita","last-changed":"Ultimo cambiamento","last-updated":"Ultimo aggiornamento",name:"Nome",none:"Nessuno",state:"Stato"}},layout_picker:{values:{default:"Disposizione predefinita",horizontal:"Disposizione orizzontale",vertical:"Disposizione verticale"}}}}}}),El=/* @__PURE__ */$t({default:()=>Ja,editor:()=>Za}),xl=kt(()=>{Ja={editor:Za={card:{chips:{alignment:"정렬"},climate:{hvac_modes:"HVAC 모드",show_temperature_control:"온도 조절 표시"},cover:{show_buttons_control:"컨트롤 버튼 표시",show_position_control:"위치 컨트롤 표시",show_tilt_position_control:"기울기 컨트롤 표시"},fan:{show_oscillate_control:"오실레이트 컨트롤",show_percentage_control:"퍼센트 컨트롤"},generic:{collapsible_controls:"꺼져있을 때 컨트롤 접기",content_info:"내용 정보",fill_container:"콘테이너 채우기",icon_animation:"활성화 시 아이콘 애니메이션 사용",icon_color:"아이콘 색",icon_type:"아이콘 타입",layout:"레이아웃",primary_info:"기본 정보",secondary_info:"보조 정보",use_entity_picture:"엔티티 사진 사용"},humidifier:{show_target_humidity_control:"습도 조절 표시"},light:{incompatible_controls:"조명이 기능을 지원하지 않는 경우 일부 컨트롤이 표시되지 않을 수 있습니다.",show_brightness_control:"밝기 컨트롤 표시",show_color_control:"색 컨트롤 표시",show_color_temp_control:"색 온도 컨트롤 표시",use_light_color:"조명 색 사용"},lock:{lock:"잠금",open:"열기",unlock:"잠금 해제"},"media-player":{media_controls:"미디어 컨트롤",media_controls_list:{next:"다음 트랙",on_off:"켜기/끄기",play_pause_stop:"재생/일시 정지/정지",previous:"이전 트랙",repeat:"반복 모드",shuffle:"섞기"},show_volume_level:"볼륨 레벨 표시",use_media_artwork:"미디어 아트워크 사용",use_media_info:"미디어 정보 사용",volume_controls:"볼륨 컨트롤",volume_controls_list:{volume_buttons:"볼륨 버튼",volume_mute:"음소거",volume_set:"볼륨 레벨"}},template:{badge_color:"뱃지 색",badge_icon:"뱃지 아이콘",content:"내용",entity_extra:"템플릿 및 작업에 사용",multiline_secondary:"Multiline secondary?",picture:"그림 (아이콘 대체)",primary:"기본 정보",secondary:"보조 정보"},title:{subtitle:"부제목",subtitle_tap_action:"부제목 탭 액션",title:"제목",title_tap_action:"제목 탭 액션"},update:{show_buttons_control:"컨트롤 버튼 표시"},vacuum:{commands:"명령어",commands_list:{on_off:"켜기/끄기"}},weather:{show_conditions:"조건 표시",show_temperature:"온도 표시"}},chip:{"chip-picker":{add:"칩 추가",chips:"칩",clear:"클리어",edit:"수정",select:"칩 선택",types:{action:"액션","alarm-control-panel":"알람",back:"이전",conditional:"Conditional",entity:"엔티티",light:"조명",menu:"메뉴",template:"템플릿",weather:"날씨"}},conditional:{chip:"칩"},sub_element_editor:{title:"칩 에디터"}},form:{alignment_picker:{values:{center:"중앙",default:"기본 정렬",end:"끝",justify:"행 정렬",start:"시작"}},color_picker:{values:{default:"기본 색"}},icon_type_picker:{values:{default:"기본 타입","entity-picture":"엔티티 사진",icon:"아이콘",none:"없음"}},info_picker:{values:{default:"기본 정보","last-changed":"마지막 변경","last-updated":"마지막 업데이트",name:"이름",none:"없음",state:"상태"}},layout_picker:{values:{default:"기본 레이아웃",horizontal:"수평 레이아웃",vertical:"수직 레이아웃"}}}}}}),Al=/* @__PURE__ */$t({card:()=>Qa,default:()=>es,editor:()=>ts}),Sl=kt(()=>{es={card:Qa={not_found:"Enhet ikke funnet"},editor:ts={card:{chips:{alignment:"Justering"},climate:{hvac_modes:"HVAC-moduser",show_temperature_control:"Temperaturkontroll?"},cover:{show_buttons_control:"Kontrollere med knapper?",show_position_control:"Posisjonskontroll?",show_tilt_position_control:"Vippe kontroll?"},fan:{show_oscillate_control:"Oscillerende kontroll?",show_percentage_control:"Prosentvis kontroll?"},generic:{collapsible_controls:"Skjul kontroller når av",color:"Farge",content_info:"Innhold",fill_container:"Fyll beholder",icon_animation:"Animer ikon når aktivt?",icon_color:"Ikon farge",icon_type:"Ikontype",layout:"Oppsett",primary_info:"Primærinformasjon",secondary_info:"Sekundærinformasjon",use_entity_picture:"Bruk enhetsbilde?"},humidifier:{show_target_humidity_control:"Fuktighetskontroll?"},light:{incompatible_controls:"Noen kontroller vises kanskje ikke hvis lyset ditt ikke støtter denne funksjonen.",show_brightness_control:"Lysstyrkekontroll?",show_color_control:"Fargekontroll?",show_color_temp_control:"Temperatur fargekontroll?",use_light_color:"Bruk lys farge"},lock:{lock:"Lås",open:"Åpne",unlock:"Lås opp"},"media-player":{media_controls:"Media kontroller",media_controls_list:{next:"Neste spor",on_off:"Slå på/av",play_pause_stop:"Spill/pause/stopp",previous:"Forrige spor",repeat:"Gjenta",shuffle:"Bland"},show_volume_level:"Vis volumnivå",use_media_artwork:"Bruk mediabilde",use_media_info:"Bruk mediainformasjon",volume_controls:"Volumkontroller",volume_controls_list:{volume_buttons:"Volumknapper",volume_mute:"Demp",volume_set:"Volumnivå"}},number:{display_mode:"Visningsmodus",display_mode_list:{buttons:"Knapper",default:"Standard (skyveknapp)",slider:"Skyveknapp"}},template:{badge_color:"Badge farge",badge_icon:"Badge ikon",content:"Innhold",entity_extra:"Brukes i maler og handlinger",label:"Etikett",multiline_secondary:"Multilinje sekundær?",picture:"Bilde (erstatter ikonet)",primary:"Primærinformasjon",secondary:"Sekundærinformasjon"},title:{subtitle:"Undertekst",subtitle_tap_action:"Undertekst tap action",title:"Tittel",title_tap_action:"Tittel tap action"},update:{show_buttons_control:"Kontroller knapper?"},vacuum:{commands:"Kommandoer",commands_list:{on_off:"Slå på/av"}},weather:{show_conditions:"Forhold?",show_temperature:"Temperatur?"}},chip:{"chip-picker":{add:"Legg til chip",chips:"Chips",clear:"Klare",edit:"Endre",select:"Velg chip",types:{action:"Handling","alarm-control-panel":"Alarm",back:"Tilbake",conditional:"Betinget",entity:"Entitet",light:"Lys",menu:"Meny",spacer:"Mellomrom",template:"Mal",weather:"Vær"}},conditional:{chip:"Chip"},sub_element_editor:{title:"Chip redaktør"}},form:{alignment_picker:{values:{center:"Senter",default:"Standard justering",end:"Slutt",justify:"Blokkjuster",start:"Start"}},color_picker:{values:{default:"Standard farge"}},icon_type_picker:{values:{default:"Standard type","entity-picture":"Enhetsbilde",icon:"Ikon",none:"Ingen"}},info_picker:{values:{default:"Standard informasjon","last-changed":"Sist endret","last-updated":"Sist oppdatert",name:"Navn",none:"Ingen",state:"Tilstand"}},layout_picker:{values:{default:"Standardoppsett",horizontal:"Horisontalt oppsett",vertical:"Vertikalt oppsett"}}}}}}),Tl=/* @__PURE__ */$t({card:()=>os,default:()=>ns,editor:()=>is}),Ml=kt(()=>{ns={card:os={not_found:"Entiteit niet gevonden"},editor:is={card:{chips:{alignment:"Uitlijning"},climate:{hvac_modes:"HVAC-Modi",show_temperature_control:"Temperatuur bediening?"},cover:{show_buttons_control:"Bedieningsknoppen?",show_position_control:"Positie bediening?",show_tilt_position_control:"Kantel bediening?"},empty:{no_config_options:"Deze kaart heeft geen configuratie opties."},fan:{show_direction_control:"Richting bediening?",show_oscillate_control:"Oscillatie bediening?",show_percentage_control:"Bediening middels percentage?"},generic:{collapsible_controls:"Bedieningselementen verbergen wanneer uitgeschakeld",color:"Kleur",content_info:"Inhoud",fill_container:"Vul container",icon_animation:"Icoon animeren indien actief?",icon_color:"Icoon kleur",icon_type:"Icoon type",layout:"Lay-out",primary_info:"Primaire informatie",secondary_info:"Secundaire informatie",use_entity_picture:"Gebruik afbeelding van entiteit?"},humidifier:{show_target_humidity_control:"Vochtigheid bediening?"},light:{incompatible_controls:"Sommige bedieningselementen worden mogelijk niet weergegeven als uw lamp deze functie niet ondersteunt.",show_brightness_control:"Helderheidsbediening?",show_color_control:"Kleur bediening?",show_color_temp_control:"Kleurtemperatuur bediening?",use_light_color:"Gebruik licht kleur"},lock:{lock:"Vergrendel",open:"Open",unlock:"Ontgrendel"},"media-player":{media_controls:"Mediabediening",media_controls_list:{next:"Volgende nummer",on_off:"Zet aan/uit",play_pause_stop:"Speel/pauze/stop",previous:"Vorige nummer",repeat:"Herhalen",shuffle:"Willekeurig afspelen"},show_volume_level:"Toon volumeniveau",use_media_artwork:"Gebruik media omslag",use_media_info:"Gebruik media informatie",volume_controls:"Volumebediening",volume_controls_list:{volume_buttons:"Volume knoppen",volume_mute:"Dempen",volume_set:"Volumeniveau"}},number:{display_mode:"Weergave Modus",display_mode_list:{buttons:"Knoppen",default:"Standaard (schuifbalk)",slider:"Schuifbalk"}},template:{badge_color:"Badge kleur",badge_icon:"Badge icoon",content:"Inhoud",entity_extra:"Gebruikt in sjablonen en acties",label:"Label",multiline_secondary:"Secundaire informatie op meerdere regels tonen?",picture:"Afbeelding (zal het icoon vervangen)",primary:"Primaire informatie",secondary:"Secundaire informatie"},title:{subtitle:"Ondertitel",subtitle_tap_action:"Ondertitel tik actie",title:"Titel",title_tap_action:"Titel tik actie"},update:{show_buttons_control:"Bedieningsknoppen?"},vacuum:{commands:"Commando's",commands_list:{on_off:"Zet aan/uit"}},weather:{show_conditions:"Weersomstandigheden?",show_temperature:"Temperatuur?"}},chip:{"chip-picker":{add:"Toevoegen chip",chips:"Chips",clear:"Maak leeg",edit:"Bewerk",select:"Selecteer chip",types:{action:"Actie","alarm-control-panel":"Alarm",back:"Terug",conditional:"Voorwaardelijk",entity:"Entiteit",light:"Licht",menu:"Menu",spacer:"Afstandhouder",template:"Sjabloon",weather:"Weer"}},conditional:{chip:"Chip"},sub_element_editor:{title:"Chip-editor"}},form:{alignment_picker:{values:{center:"Midden",default:"Standaard uitlijning",end:"Einde",justify:"Uitlijnen",start:"Begin"}},color_picker:{values:{default:"Standaard kleur"}},icon_type_picker:{values:{default:"Standaard icoon type","entity-picture":"Entiteit afbeelding",icon:"Icoon",none:"Geen"}},info_picker:{values:{default:"Standaard informatie","last-changed":"Laatst gewijzigd","last-updated":"Laatst bijgewerkt",name:"Naam",none:"Geen",state:"Staat"}},layout_picker:{values:{default:"Standaard lay-out",horizontal:"Horizontale lay-out",vertical:"Verticale lay-out"}}}}}}),Il=/* @__PURE__ */$t({card:()=>rs,default:()=>ss,editor:()=>as}),zl=kt(()=>{ss={card:rs={not_found:"Nie znaleziono encji"},editor:as={card:{chips:{alignment:"Wyrównanie"},climate:{hvac_modes:"Tryby urządzenia",show_temperature_control:"Sterowanie temperaturą?"},cover:{show_buttons_control:"Przyciski sterujące?",show_position_control:"Sterowanie położeniem?",show_tilt_position_control:"Sterowanie poziomem otwarcia?"},fan:{show_direction_control:"Kontrola kierunku?",show_oscillate_control:"Sterowanie oscylacją?",show_percentage_control:"Sterowanie procentowe?"},generic:{collapsible_controls:"Zwiń sterowanie, jeśli wyłączone",color:"Kolor",content_info:"Zawartość",fill_container:"Wypełnij zawartością",icon_animation:"Animować, gdy aktywny?",icon_color:"Kolor ikony",icon_type:"Typ ikony",layout:"Układ",primary_info:"Informacje główne",secondary_info:"Informacje drugorzędne",use_entity_picture:"Użyć obrazu encji?"},humidifier:{show_target_humidity_control:"Sterowanie wilgotnością?"},light:{incompatible_controls:"Niektóre funkcje są niewidoczne, jeśli światło ich nie obsługuje.",show_brightness_control:"Sterowanie jasnością?",show_color_control:"Sterowanie kolorami?",show_color_temp_control:"Sterowanie temperaturą światła?",use_light_color:"Użyj koloru światła"},lock:{lock:"Zablokuj",open:"Otwórz",unlock:"Odblokuj"},"media-player":{media_controls:"Sterowanie multimediami",media_controls_list:{next:"Następne nagranie",on_off:"Włącz/wyłącz",play_pause_stop:"Odtwórz/Pauza/Zatrzymaj",previous:"Poprzednie nagranie",repeat:"Powtarzanie",shuffle:"Losowo"},show_volume_level:"Wyświetl poziom głośności",use_media_artwork:"Użyj okładek multimediów",use_media_info:"Użyj informacji o multimediach",volume_controls:"Sterowanie głośnością",volume_controls_list:{volume_buttons:"Przyciski głośności",volume_mute:"Wycisz",volume_set:"Poziom głośności"}},number:{display_mode:"Sposób wyświetlania",display_mode_list:{buttons:"Przyciski",default:"Domyślnie (suwak)",slider:"Suwak"}},template:{badge_color:"Kolor odznaki",badge_icon:"Ikona odznaki",content:"Zawartość",entity_extra:"Używane w szablonach i akcjach",label:"Etykieta",multiline_secondary:"Drugorzędne wielowierszowe?",picture:"Obraz (zamiast ikony)",primary:"Informacje główne",secondary:"Informacje drugorzędne"},title:{subtitle:"Podtytuł",subtitle_tap_action:"Akcja na podtytule",title:"Tytuł",title_tap_action:"Akcja na tytule"},update:{show_buttons_control:"Przyciski sterujące?"},vacuum:{commands:"Polecenia",commands_list:{on_off:"Włącz/Wyłącz"}},weather:{show_conditions:"Warunki?",show_temperature:"Temperatura?"}},chip:{"chip-picker":{add:"Dodaj czip",chips:"Czipy",clear:"Wyczyść",edit:"Edytuj",select:"Wybierz czip",types:{action:"Akcja","alarm-control-panel":"Alarm",back:"Wstecz",conditional:"Warunkowy",entity:"Encja",light:"Światło",menu:"Menu",spacer:"Odstęp",template:"Szablon",weather:"Pogoda"}},conditional:{chip:"Czip"},sub_element_editor:{title:"Edytor czipów"}},form:{alignment_picker:{values:{center:"Wyśrodkowanie",default:"Wyrównanie domyślne",end:"Wyrównanie do prawej",justify:"Justowanie",start:"Wyrównanie do lewej"}},color_picker:{values:{default:"Domyślny kolor"}},icon_type_picker:{values:{default:"Domyślny typ","entity-picture":"Obraz encji",icon:"Ikona",none:"Brak"}},info_picker:{values:{default:"Domyślne informacje","last-changed":"Ostatnia zmiana","last-updated":"Ostatnia aktualizacja",name:"Nazwa",none:"Brak",state:"Stan"}},layout_picker:{values:{default:"Układ domyślny",horizontal:"Układ poziomy",vertical:"Układ pionowy"}}}}}}),Pl=/* @__PURE__ */$t({card:()=>ls,default:()=>hs,editor:()=>cs,migration:()=>us}),Nl=kt(()=>{hs={card:ls={not_found:"Entidade não encontrada"},editor:cs={badge:{template:{area_helper:"Usada em modelos",content:"Conteúdo",entity_helper:"Usada em modelos e interações",label:"Rótulo"}},card:{chips:{alignment:"Alinhamento"},climate:{hvac_modes:"Modos do HVAC",show_temperature_control:"Controle de temperatura?"},cover:{show_buttons_control:"Botões de controle?",show_position_control:"Controle de posição?",show_tilt_position_control:"Controle de inclinação?"},empty:{no_config_options:"Esse card não possui opções de configuração."},fan:{show_direction_control:"Controle de direção?",show_oscillate_control:"Controle de oscilação?",show_percentage_control:"Controle de porcentagem?"},generic:{area:"Área",collapsible_controls:"Recolher controles quando desligado",color:"Cor",content_info:"Conteúdo",entity:"Entidade",fill_container:"Preencher espaço",icon_animation:"Animar ícone quando ativo?",icon_color:"Cor do ícone",icon_type:"Tipo do ícone",layout:"Layout",picture:"Imagem",picture_helper:"Se definida, irá substituir o ícone.",primary_info:"Informação primária",secondary_info:"Informação secundária",use_entity_picture:"Usar imagem da entidade?"},humidifier:{show_target_humidity_control:"Controle de umidade?"},light:{incompatible_controls:"Alguns controles podem não ser exibidos se sua luz não suportar o recurso.",show_brightness_control:"Controle de brilho?",show_color_control:"Controle de cor?",show_color_temp_control:"Controle de temperatura de cor?",use_light_color:"Usar cor da luz"},lock:{lock:"Bloquear",open:"Abrir",unlock:"Desbloquear"},"media-player":{media_controls:"Controles de mídia",media_controls_list:{next:"Próxima faixa",on_off:"Ligar/Desligar",play_pause_stop:"Reproduzir/pausar/parar",previous:"Faixa anterior",repeat:"Modo repetição",shuffle:"Embaralhar"},show_volume_level:"Mostrar nível de volume",use_media_artwork:"Usar arte da mídia",use_media_info:"Usar informação da mídia",volume_controls:"Controles de volume",volume_controls_list:{volume_buttons:"Botões de volume",volume_mute:"Mudo",volume_set:"Nível de volume"}},number:{display_mode:"Modo de exibição",display_mode_list:{buttons:"Botões",default:"Padrão (deslizante)",slider:"Deslizante"}},template:{area:"Área",area_helper:"Usada em modelos e recursos",badge:"Badge",badge_color:"Cor do badge",badge_icon:"Ícone do badge",badge_text:"Texto do badge",badge_text_helper:"Se definido, irá substituir o ícone.",content:"Conteúdo",entity_extra:"Usado em modelos e ações",entity_helper:"Usada em modelos, interações e recursos",entity_helper_legacy:"Usada em modelos e interações",label:"Rótulo",layout:"Layout",multiline_secondary:"Permitir informação secundária em várias linhas",multiline_secondary_helper:"O card pode ficar mais alto para acomodar o texto e nem sempre irá se alinhar ao sistema de grade.",picture:"Imagem (irá substituir o ícone)",primary:"Informação primária",secondary:"Informação secundária"},title:{alignment:"Alinhamento",subtitle:"Legenda",subtitle_tap_action:"Ação de toque na legenda",title:"Título",title_tap_action:"Ação de toque no título"},update:{show_buttons_control:"Botões de controle?"},vacuum:{commands:"Comandos",commands_list:{on_off:"Ligar/Desligar"}},weather:{show_conditions:"Condições?",show_temperature:"Temperatura?"}},chip:{"chip-picker":{add:"Adicionar chip",chips:"Chips",clear:"Limpar",edit:"Editar",select:"Selecionar chip",types:{action:"Ação","alarm-control-panel":"Alarme",back:"Voltar",conditional:"Condicional",entity:"Entidade",light:"Luz",menu:"Menu",quickbar:"Barra rápida",spacer:"Espaçador",template:"Template",weather:"Clima"}},conditional:{chip:"Chip"},sub_element_editor:{title:"Editor de chip"}},form:{alignment_picker:{values:{center:"Centro",default:"Alinhamento padrão",end:"Fim",justify:"Justificado",start:"Início"}},color_picker:{values:{default:"Cor padrão"}},icon_type_picker:{values:{default:"Tipo padrão","entity-picture":"Imagem da entidade",icon:"Ícone",none:"Nenhum"}},info_picker:{values:{default:"Informação padrão","last-changed":"Última alteração","last-updated":"Última atualização",name:"Nome",none:"Nenhum",state:"Estado"}},layout_picker:{values:{default:"Layout padrão",horizontal:"Layout horizontal",vertical:"Layout vertical"}}},section:{badge:"Badge",content:"Conteúdo",context:"Contexto",features:"Recursos",interactions:"Interações",layout:"Layout"}},migration:us={description:"A configuração do seu card foi migrada para a nova versão. Você encontra mais informações sobre as mudanças {link}.",ok:"Ok",post:"no post do GitHub",revert:"Reverter",title:"Card atualizado"}}}),Ol=/* @__PURE__ */$t({card:()=>ds,default:()=>ms,editor:()=>ps}),Bl=kt(()=>{ms={card:ds={not_found:"Entidade não encontrada"},editor:ps={card:{chips:{alignment:"Alinhamento"},climate:{hvac_modes:"Modos HVAC",show_temperature_control:"Controlo de temperatura?"},cover:{show_buttons_control:"Botões de controlo?",show_position_control:"Controlo de posição?",show_tilt_position_control:"Controlo de inclinação?"},fan:{show_oscillate_control:"Controlo de oscilação?",show_percentage_control:"Controlo de percentagem?"},generic:{collapsible_controls:"Colapsar controlos quando desligado",color:"Cor",content_info:"Conteúdo",fill_container:"Preencher contentor",icon_animation:"Animar ícone quando ativo?",icon_color:"Cor do ícone",icon_type:"Tipo de ícone",layout:"Layout",primary_info:"Informação principal",secondary_info:"Informação secundária",use_entity_picture:"Usar imagem da entidade?"},humidifier:{show_target_humidity_control:"Controlo de humidade?"},light:{incompatible_controls:"Alguns controlos podem não ser exibidos se a luz não suportar a funcionalidade.",show_brightness_control:"Controlo de brilho?",show_color_control:"Controlo de cor?",show_color_temp_control:"Controlo de temperatura da cor?",use_light_color:"Usar cor da luz"},lock:{lock:"Trancar",open:"Aberto",unlock:"Destrancar"},"media-player":{media_controls:"Controlos de media",media_controls_list:{next:"Próxima faixa",on_off:"Ligar/Desligar",play_pause_stop:"Tocar/pausa/stop",previous:"Faixa anterior",repeat:"Modo repetir",shuffle:"Baralhar"},show_volume_level:"Mostrar nível do volume",use_media_artwork:"Usar arte do media",use_media_info:"Usar informação do media",volume_controls:"Controlos de volume",volume_controls_list:{volume_buttons:"Botões de volume",volume_mute:"Calar",volume_set:"Nível do volume"}},number:{display_mode:"Modo de exibição",display_mode_list:{buttons:"Botões",default:"Por defeito (slider)",slider:"Deslizador"}},template:{badge_color:"Cor do crachá",badge_icon:"Icóne do crachá",content:"Conteúdo",entity_extra:"Usado em modelos e ações",label:"Rótulo",multiline_secondary:"Secundária multilinha?",picture:"Imagem (irá substituir o ícone)",primary:"Informação principal",secondary:"Informação secundária"},title:{subtitle:"Subtítulo",subtitle_tap_action:"Ação ao tocar no subtítulo",title:"Título",title_tap_action:"Ação ao tocar no título"},update:{show_buttons_control:"Botões de controlo?"},vacuum:{commands:"Comandos",commands_list:{on_off:"Ligar/Desligar"}},weather:{show_conditions:"Condições?",show_temperature:"Temperatura?"}},chip:{"chip-picker":{add:"Adicionar ficha",chips:"Fichas",clear:"Limpar",edit:"Editar",select:"Selecionar ficha",types:{action:"Ação","alarm-control-panel":"Alarme",back:"Voltar",conditional:"Condicional",entity:"Entidade",light:"Iluminação",menu:"Menu",spacer:"Espaçador",template:"Modelo",weather:"Clima"}},conditional:{chip:"Ficha"},sub_element_editor:{title:"Editor de fichas"}},form:{alignment_picker:{values:{center:"Centrado",default:"Alinhamento predefinido",end:"Fim",justify:"Justificado",start:"Início"}},color_picker:{values:{default:"Cor padrão"}},icon_type_picker:{values:{default:"Tipo predefinido","entity-picture":"Entidade de imagem",icon:"Ícone",none:"Nenhum"}},info_picker:{values:{default:"Informações padrão","last-changed":"Última alteração","last-updated":"Última atualização",name:"Nome",none:"Nenhum",state:"Estado"}},layout_picker:{values:{default:"Layout padrão",horizontal:"Layout horizontal",vertical:"Layout vertical"}}}}}}),Ll=/* @__PURE__ */$t({default:()=>gs,editor:()=>fs}),Dl=kt(()=>{gs={editor:fs={card:{chips:{alignment:"Aliniere"},climate:{hvac_modes:"Moduri HVAC",show_temperature_control:"Comenzi temperatură?"},cover:{show_buttons_control:"Comenzi pentru control?",show_position_control:"Comandă pentru poziție?",show_tilt_position_control:"Comandă pentru înclinare?"},fan:{icon_animation:"Animare pictograma la activare?",show_oscillate_control:"Comandă oscilație?",show_percentage_control:"Comandă procent?"},generic:{collapsible_controls:"Restrângere la dezactivare",content_info:"Conținut",fill_container:"Umplere container",icon_color:"Culoare pictogramă",icon_type:"Tip pictogramă",layout:"Aranjare",primary_info:"Informație principală",secondary_info:"Informație secundară",use_entity_picture:"Imagine?"},humidifier:{show_target_humidity_control:"Comenzi umiditate?"},light:{incompatible_controls:"Unele comenzi ar putea să nu fie afișate dacă lumina nu suportă această caracteristică.",show_brightness_control:"Comandă pentru strălucire?",show_color_control:"Comandă pentru culoare?",show_color_temp_control:"Comandă pentru temperatură de culoare?",use_light_color:"Folosește culoarea luminii"},lock:{lock:"Încuie",open:"Deschide",unlock:"Descuie"},"media-player":{media_controls:"Comenzi media",media_controls_list:{next:"Pista următoare",on_off:"Pornit/Oprit",play_pause_stop:"Redare/Pauză/Stop",previous:"Pista anterioară",repeat:"Mod repetare",shuffle:"Amestecare"},show_volume_level:"Nivel volum",use_media_artwork:"Grafică media",use_media_info:"Informații media",volume_controls:"Comenzi volum",volume_controls_list:{volume_buttons:"Comenzi volum",volume_mute:"Dezactivare sunet",volume_set:"Nivel volum"}},template:{badge_color:"Culoare insignă",badge_icon:"Pictogramă insignă",content:"Conținut",entity_extra:"Folosită în șabloane și acțiuni",multiline_secondary:"Informație secundară pe mai multe linii?",picture:"Imagine (inlocuiește pictograma)",primary:"Informație principală",secondary:"Informație secundară"},title:{subtitle:"Subtitlu",title:"Titlu"},update:{show_buttons_control:"Comenzi control?"},vacuum:{commands:"Comenzi"},weather:{show_conditions:"Condiții?",show_temperature:"Temperatură?"}},chip:{"chip-picker":{add:"Adaugă jeton",chips:"Jetoane",clear:"Șterge",edit:"Modifică",select:"Alege jeton",types:{action:"Acțiune","alarm-control-panel":"Alarmă",back:"Înapoi",conditional:"Condițional",entity:"Entitate",light:"Lumină",menu:"Meniu",template:"Șablon",weather:"Vreme"}},conditional:{chip:"Jeton"},sub_element_editor:{title:"Editor jeton"}},form:{alignment_picker:{values:{center:"Centrat",default:"Aliniere implicită",end:"Dreapta",justify:"Umplere",start:"Stânga"}},color_picker:{values:{default:"Culoare implicită"}},icon_type_picker:{values:{default:"Tip implicit","entity-picture":"Imagine",icon:"Pictogramă",none:"Niciuna"}},info_picker:{values:{default:"Informație implicită","last-changed":"Ultima modificare","last-updated":"Ultima actulizare",name:"Nume",none:"Niciuna",state:"Stare"}},layout_picker:{values:{default:"Aranjare implicită",horizontal:"Orizontală",vertical:"Verticală"}}}}}}),jl=/* @__PURE__ */$t({card:()=>_s,default:()=>bs,editor:()=>vs}),Hl=kt(()=>{bs={card:_s={not_found:"Сущность не найдена"},editor:vs={card:{chips:{alignment:"Выравнивание"},climate:{hvac_modes:"Режимы работы",show_temperature_control:"Управлять целевой температурой?"},cover:{show_buttons_control:"Добавить кнопки управления?",show_position_control:"Управлять позицией?",show_tilt_position_control:"Управлять наклоном?"},empty:{no_config_options:"Эта карточка не имеет опций конфигурации."},fan:{icon_animation:"Анимировать иконку когда включено?",show_direction_control:"Направление?",show_oscillate_control:"Oscillate control?",show_percentage_control:"Управлять процентами?"},generic:{collapsible_controls:"Сворачивать элементы управления при выключении",color:"Цвет",content_info:"Содержимое",fill_container:"Заполнение",icon_animation:"Анимировать иконку, когда активна?",icon_color:"Цвет иконки",icon_type:"Тип иконки",layout:"Расположение",primary_info:"Основная информация",secondary_info:"Второстепенная информация",use_entity_picture:"Использовать изображение объекта?"},humidifier:{show_target_humidity_control:"Управлять целевым уровенем влажности?"},light:{incompatible_controls:"Некоторые элементы управления могут не отображаться, если ваш светильник не поддерживает эти функции.",show_brightness_control:"Управлять яркостью?",show_color_control:"Управлять цветом?",show_color_temp_control:"Управлять цветовой температурой?",use_light_color:"Использовать текущий цвет света"},lock:{lock:"Закрыто",open:"Открыто",unlock:"Разблокировано"},"media-player":{media_controls:"Управление медиа-устройством",media_controls_list:{next:"Следующий трек",on_off:"Включение/выключение",play_pause_stop:"Воспроизведение/пауза/остановка",previous:"Предыдущий трек",repeat:"Режим повтора",shuffle:"Перемешивание"},show_volume_level:"Показать уровень громкости",use_media_artwork:"Использовать обложку с медиа-устройства",use_media_info:"Использовать информацию с медиа-устройства",volume_controls:"Регулятор громкости",volume_controls_list:{volume_buttons:"Кнопки громкости",volume_mute:"Без звука",volume_set:"Уровень громкости"}},number:{display_mode:"Режим отображения",display_mode_list:{buttons:"Кнопки",default:"Стандартно (слайдер)",slider:"Слайдер"}},template:{badge_color:"Цвет значка",badge_icon:"Иконка значка",content:"Содержимое",entity_extra:"Используется в шаблонах и действиях",label:"Ярлык",multiline_secondary:"Многострочная Второстепенная информация?",picture:"Изображение (заменить иконку)",primary:"Основная информация",secondary:"Второстепенная информация"},title:{subtitle:"Подзаголовок",subtitle_tap_action:"Действие при нажатии на подзаголовок",title:"Заголовок",title_tap_action:"Действие при нажатии на заголовок"},update:{show_buttons_control:"Кнопки управления?"},vacuum:{commands:"Команды",commands_list:{on_off:"Включить/выключить"}},weather:{show_conditions:"Условия?",show_temperature:"Температура?"}},chip:{"chip-picker":{add:"Добавить мини-карточку",chips:"Мини-карточки",clear:"Очистить",edit:"Изменить",select:"Выбрать мини-карточку",types:{action:"Действие","alarm-control-panel":"Тревога",back:"Назад",conditional:"Условия",entity:"Объект",light:"Освещение",menu:"Меню",quickbar:"Панель быстрого доступа",spacer:"Пробел",template:"Шаблон",weather:"Погода"}},conditional:{chip:"Мини-карточка"},sub_element_editor:{title:"Редактор мини-карточек"}},form:{alignment_picker:{values:{center:"По центру",default:"Выравнивание по умолчанию",end:"К концу",justify:"На всю ширину",start:"К началу"}},color_picker:{values:{default:"Цвет по умолчанию"}},icon_type_picker:{values:{default:"По умолчанию","entity-picture":"Изображение",icon:"Иконка",none:"Нет"}},info_picker:{values:{default:"По умолчанию","last-changed":"Последнее изменение","last-updated":"Последнее обновление",name:"Имя",none:"Нет",state:"Статус"}},layout_picker:{values:{default:"Расположение по умолчанию",horizontal:"Горизонтальное расположение",vertical:"Вертикальное расположение"}}}}}}),Rl=/* @__PURE__ */$t({card:()=>ys,default:()=>Cs,editor:()=>ws,migration:()=>ks}),Ul=kt(()=>{Cs={card:ys={not_found:"Entita nenájdená"},editor:ws={badge:{template:{area_helper:"Používa sa v šablónach",content:"Obsah",entity_helper:"Používa sa v šablónach a interakciách",label:"Nápis"}},card:{chips:{alignment:"Zarovnanie"},climate:{hvac_modes:"HVAC mód",show_temperature_control:"Ovládanie teploty?"},cover:{show_buttons_control:"Zobraziť ovládacie tlačidlá?",show_position_control:"Ovládanie pozície?",show_tilt_position_control:"Ovládanie natočenia?"},empty:{no_config_options:"Táto karta nemá žiadne možnosti konfigurácie."},fan:{show_direction_control:"Ovládanie smeru?",show_oscillate_control:"Ovládanie oscilácie?",show_percentage_control:"Ovládanie rýchlosti v percentách?"},generic:{area:"Oblasť",collapsible_controls:"Skryť ovládanie v stave VYP",color:"Farba",content_info:"Obsah",entity:"Entita",fill_container:"Vyplniť priestor",icon_animation:"Animovaná ikona v stave ZAP?",icon_color:"Farba ikony",icon_type:"Typ ikony",layout:"Rozloženie",picture:"Obrázok",picture_helper:"Ak je nastavené, nahradí ikonu.",primary_info:"Základné info",secondary_info:"Doplnkové info",use_entity_picture:"Použiť obrázok entity?"},humidifier:{show_target_humidity_control:"Ovládanie vlhkosti?"},light:{incompatible_controls:"Niektoré ovládacie prvky sa nemusia zobraziť, pokiaľ ich svetlo nepodporuje.",show_brightness_control:"Ovládanie jasu?",show_color_control:"Ovládanie farby?",show_color_temp_control:"Ovládanie teploty farby?",use_light_color:"Použiť farbu svetla"},lock:{lock:"Zamknuté",open:"Otvorené",unlock:"Odomknuté"},"media-player":{media_controls:"Ovládanie média",media_controls_list:{next:"Ďalšia",on_off:"Zap / Vyp",play_pause_stop:"Spustiť/pauza/stop",previous:"Predchádzajúca",repeat:"Opakovať",shuffle:"Premiešať"},show_volume_level:"Zobraziť úroveň hlasitosti",use_media_artwork:"Použiť obrázok z média",use_media_info:"Použiť info o médiu",volume_controls:"Ovládanie hlasitosti",volume_controls_list:{volume_buttons:"Tlačidlá hlasitosti",volume_mute:"Stlmiť",volume_set:"Úroveň hlasitosti"}},number:{display_mode:"Režim zobrazenia",display_mode_list:{buttons:"Tlačidlá",default:"Predvolené (posúvač)",slider:"Posúvač"}},template:{area:"Oblasť",area_helper:"Používa sa v šablónach a funkciách",badge:"Odznak",badge_color:"Farba odznaku",badge_icon:"Ikona odznaku",badge_text:"Text odznaku",badge_text_helper:"Ak je nastavené, nahradí ikonu.",content:"Obsah",entity_extra:"Použitá v šablónach a akciách",entity_helper:"Používa sa v šablónach, interakciách a funkciách",entity_helper_legacy:"Používa sa v šablónach a interakciách",label:"Štítok",layout:"Rozloženie",multiline_secondary:"Povoliť viacriadkové doplnkové informácie",multiline_secondary_helper:"Karta môže byť vyššia, aby sa do nej vošiel text, a nemusí byť vždy zarovnaná s mriežkovým systémom.",picture:"Obrázok (nahrádza ikonu)",primary:"Základné info",secondary:"Doplnkové info"},title:{subtitle:"Podnadpis",subtitle_tap_action:"Akcia klepnutia na titulky",title:"Nadpis",title_tap_action:"Akcia klepnutia na názov"},update:{show_buttons_control:"Zobraziť ovládacie tlačidlá?"},vacuum:{commands:"Príkazy",commands_list:{on_off:"Zapnúť/Vypnúť"}},weather:{show_conditions:"Zobraziť podmienky?",show_temperature:"Zobraziť teplotu?"}},chip:{"chip-picker":{add:"Pridať štítok",chips:"Štítky",clear:"Vymazať",edit:"Editovať",select:"Vybrať štítok",types:{action:"Akcia","alarm-control-panel":"Alarm",back:"Späť",conditional:"Podmienené",entity:"Entita",light:"Svetlo",menu:"Menu",quickbar:"Rýchla lišta",spacer:"Medzera",template:"Šablóna",weather:"Počasie"}},conditional:{chip:"Čip"},sub_element_editor:{title:"Editor štítkov"}},form:{alignment_picker:{values:{center:"Stred",default:"Predvolené zarovnanie",end:"Koniec",justify:"Vyplniť",start:"Začiatok"}},color_picker:{values:{default:"Predvolená farba"}},icon_type_picker:{values:{default:"Predvolený typ","entity-picture":"Obrázok entity",icon:"Ikona",none:"Žiadny"}},info_picker:{values:{default:"Predvolené informácie","last-changed":"Posledná zmena","last-updated":"Posledná aktualizácia",name:"Názov",none:"Žiadna",state:"Stav"}},layout_picker:{values:{default:"Predvolené rozloženie",horizontal:"Vodorovné rozloženie",vertical:"Zvislé rozloženie"}}},section:{badge:"Odznak",content:"Obsah",context:"Kontext",features:"Funkcie",interactions:"Interakcie",layout:"Rozloženie"}},migration:ks={description:"Nastavenie vašej karty bolo prenesené do novej verzie. Viac informácií o zmenách nájdete na {link}.",ok:"Ok",post:"príspevku na GitHub",revert:"Vrátiť späť",title:"Karta aktualizovaná"}}}),Vl=/* @__PURE__ */$t({card:()=>$s,default:()=>xs,editor:()=>Es}),Fl=kt(()=>{xs={card:$s={not_found:"Entiteta ni najdena"},editor:Es={card:{chips:{alignment:"Poravnava"},climate:{hvac_modes:"HVAC načini",show_temperature_control:"Nadzor temperature?"},cover:{show_buttons_control:"Gumbi za upravljanje?",show_position_control:"Nadzor položaja?",show_tilt_position_control:"Nadzor nagiba?"},fan:{show_oscillate_control:"Kontrola nihanja?",show_percentage_control:"Kontrola v odstotkih?"},generic:{collapsible_controls:"Strni kontrolnike, ko so izklopljeni",content_info:"Vsebina",fill_container:"Zapolnitev prostora",icon_animation:"Animacija ikone, ko je aktivna?",icon_color:"Barva ikone",icon_type:"Vrsta ikone",layout:"Postavitev",primary_info:"Primarna informacija",secondary_info:"Sekundarna informacija",use_entity_picture:"Uporabi sliko entitete?"},humidifier:{show_target_humidity_control:"Nadzor vlažnosti?"},light:{incompatible_controls:"Nekateri kontrolniki morda ne bodo prikazani, če vaša luč ne podpira te funkcije.",show_brightness_control:"Nadzor svetlosti?",show_color_control:"Nadzor barv?",show_color_temp_control:"Nadzor temperature barve?",use_light_color:"Uporabi svetlo barvo"},lock:{lock:"Zaklepanje",open:"Odprto",unlock:"Odkleni"},"media-player":{media_controls:"Nadzor medijev",media_controls_list:{next:"Naslednja skladba",on_off:"Vklop/izklop",play_pause_stop:"Predvajaj/pavza/ustavi",previous:"Prejšnja skladba",repeat:"Ponavljajoči način",shuffle:"Naključno"},show_volume_level:"Pokaži raven glasnosti",use_media_artwork:"Uporabite medijsko umetniško delo",use_media_info:"Uporabite informacije o medijih",volume_controls:"Kontrole glasnosti",volume_controls_list:{volume_buttons:"Gumbi za glasnost",volume_mute:"Tiho",volume_set:"Raven glasnosti"}},number:{display_mode:"Način prikaza",display_mode_list:{buttons:"Gumbi",default:"Privzeto (drsnik)",slider:"Drsnik"}},template:{badge_color:"Barva značke",badge_icon:"Ikona značke",content:"Vsebina",entity_extra:"Uporablja se v predlogah in dejanjih",multiline_secondary:"Večvrstični sekundarni?",picture:"Slika (nadomestila bo ikono)",primary:"Primarna informacija",secondary:"Sekundarna informacija"},title:{subtitle:"Podnaslov",subtitle_tap_action:"Dejanje dotika podnapisov",title:"Naziv",title_tap_action:"Dejanje dotika naslova"},update:{show_buttons_control:"Gumbi za upravljanje?"},vacuum:{commands:"Ukazi",commands_list:{on_off:"Vklop/izklop"}},weather:{show_conditions:"Pogoji?",show_temperature:"Temperatura?"}},chip:{"chip-picker":{add:"Dodaj čip",chips:"Čipi",clear:"Pobriši",edit:"Uredi",select:"Izbira čipa",types:{action:"Dejanje","alarm-control-panel":"Alarm",back:"Nazaj",conditional:"Pogojno",entity:"Entiteta",light:"Svetloba",menu:"Meni",spacer:"Distančnik",template:"Predloga",weather:"Vreme"}},conditional:{chip:"Ćiš"},sub_element_editor:{title:"Urejevalnik čipov"}},form:{alignment_picker:{values:{center:"Center",default:"Privzeta poravnava",end:"Konec",justify:"Poravnava",start:"Pričetek"}},color_picker:{values:{default:"Privzeta barva"}},icon_type_picker:{values:{default:"Privzeta vrsta","entity-picture":"Slika entitete",icon:"Ikona",none:"Brez"}},info_picker:{values:{default:"Privzete informacije","last-changed":"Zadnja sprememba","last-updated":"Zadnja posodobitev",name:"Naziv",none:"Brez",state:"Stanje"}},layout_picker:{values:{default:"Privzeta postavitev",horizontal:"Horizontalna postavitev",vertical:"Vertikalna postavitev"}}}}}}),Gl=/* @__PURE__ */$t({card:()=>As,default:()=>Ts,editor:()=>Ss}),Kl=kt(()=>{Ts={card:As={not_found:"Enheten hittades inte"},editor:Ss={card:{chips:{alignment:"Justering"},climate:{hvac_modes:"HVAC-lägen",show_temperature_control:"Temperaturkontroll?"},cover:{show_buttons_control:"Visa kontrollknappar?",show_position_control:"Visa positionskontroll?",show_tilt_position_control:"Visa lutningskontroll?"},empty:{no_config_options:"Detta kort har inga konfigurationsalternativ."},fan:{show_direction_control:"Riktningskontroll?",show_oscillate_control:"Kontroll för oscillera?",show_percentage_control:"Procentuell kontroll?"},generic:{collapsible_controls:"Dölj kontroller när enheten är av",color:"Färg",content_info:"Innehåll",fill_container:"Fyll container",icon_animation:"Animera ikonen när enheten är på?",icon_color:"Ikonens färg",icon_type:"Ikontyp",layout:"Layout",primary_info:"Primär information",secondary_info:"Sekundär information",use_entity_picture:"Använd enhetens bild?"},humidifier:{show_target_humidity_control:"Fuktkontroll?"},light:{incompatible_controls:"Kontroller som inte stöds av enheten kommer inte visas.",show_brightness_control:"Styr ljushet?",show_color_control:"Styr färg?",show_color_temp_control:"Färgtemperaturkontroll?",use_light_color:"Styr ljusets färg"},lock:{lock:"Lås",open:"Öppna",unlock:"Lås upp"},"media-player":{media_controls:"Mediakontroller",media_controls_list:{next:"Nästa spår",on_off:"Slå på/av",play_pause_stop:"Spela/pausa/stoppa",previous:"Föregående spår",repeat:"Upprepa",shuffle:"Blanda"},show_volume_level:"Volymkontroll",use_media_artwork:"Visa mediaomslag",use_media_info:"Använd media information",volume_controls:"Volymkontroller",volume_controls_list:{volume_buttons:"Volymknappar",volume_mute:"Ljud av",volume_set:"Volymnivå"}},number:{display_mode:"Visningsläge",display_mode_list:{buttons:"Knappar",default:"Standard (skjutreglage)",slider:"Skjutreglage"}},template:{badge_color:"Färg på märke",badge_icon:"Märke ikon",content:"Innehåll",entity_extra:"Används i mallar och åtgärder",label:"Etikett",multiline_secondary:"Sekundär med flera rader?",picture:"Bild (ersätter ikonen)",primary:"Primär information",secondary:"Sekundär information"},title:{subtitle:"Underrubrik",subtitle_tap_action:"Subtitle tap action",title:"Rubrik",title_tap_action:"Titel tryck åtgärd"},update:{show_buttons_control:"Visa kontrollknappar?"},vacuum:{commands:"Kommandon",commands_list:{on_off:"Slå av/på"}},weather:{show_conditions:"Förhållanden?",show_temperature:"Temperatur?"}},chip:{"chip-picker":{add:"Lägg till chip",chips:"Chips",clear:"Rensa",edit:"Redigera",select:"Välj chip",types:{action:"Åtgärd","alarm-control-panel":"Alarm",back:"Bakåt",conditional:"Villkorad",entity:"Enhet",light:"Ljus",menu:"Meny",quickbar:"Snabbfält",spacer:"Avståndshållare",template:"Mall",weather:"Väder"}},conditional:{chip:"Chip"},sub_element_editor:{title:"Chipredigerare"}},form:{alignment_picker:{values:{center:"Centrerad",default:"Standard (början)",end:"Slutet",justify:"Anpassa",start:"Starta"}},color_picker:{values:{default:"Standardfärg"}},icon_type_picker:{values:{default:"Standard typ","entity-picture":"Enhetsbild",icon:"Ikon",none:"Ingen"}},info_picker:{values:{default:"Förvald information","last-changed":"Sist ändrad","last-updated":"Sist uppdaterad",name:"Namn",none:"Ingen",state:"Status"}},layout_picker:{values:{default:"Standard",horizontal:"Horisontell",vertical:"Vertikal"}}}}}}),Yl=/* @__PURE__ */$t({card:()=>Ms,default:()=>zs,editor:()=>Is}),ql=kt(()=>{zs={card:Ms={not_found:"Varlık bulunamadı"},editor:Is={card:{chips:{alignment:"Hizalama"},climate:{hvac_modes:"HVAC Modları",show_temperature_control:"Sıcaklık kontrolü?"},cover:{show_buttons_control:"Düğme kontrolleri?",show_position_control:"Pozisyon kontrolü?",show_tilt_position_control:"Eğim kontrolü?"},empty:{no_config_options:"Bu kartın yapılandırma seçeneği yok."},fan:{show_direction_control:"Yön kontrolü?",show_oscillate_control:"Salınım kontrolü?",show_percentage_control:"Yüzde kontrolü?"},generic:{collapsible_controls:"Kapalıyken kontrolleri daralt",color:"Renk",content_info:"İçerik",fill_container:"Alanı doldur",icon_animation:"Aktif olduğunda simgeyi hareket ettir?",icon_color:"Simge renki",icon_type:"İkon tipi",layout:"Düzen",primary_info:"Birinci bilgi",secondary_info:"İkinci bilgi",use_entity_picture:"Varlık resmi kullanılsın?"},humidifier:{show_target_humidity_control:"Nem kontrolü?"},light:{incompatible_controls:"Kullandığınız lamba bu özellikleri desteklemiyorsa bazı kontroller görüntülenemeyebilir.",show_brightness_control:"Parlaklık kontrolü?",show_color_control:"Renk kontrolü?",show_color_temp_control:"Renk ısısı kontrolü?",use_light_color:"Işık rengini kullan"},lock:{lock:"Kilitle",open:"Aç",unlock:"Kilidi aç"},"media-player":{media_controls:"Medya kontrolleri",media_controls_list:{next:"Sonraki parça",on_off:"Aç/Kapat",play_pause_stop:"Oynat/duraklat/durdur",previous:"Önceki parça",repeat:"Tekrarlama modu",shuffle:"Karışık çal"},show_volume_level:"Ses seviyesini göster",use_media_artwork:"Medya resimlerini kullan",use_media_info:"Medya bilgilerini kullan",volume_controls:"Ses seviyesi kontrolleri",volume_controls_list:{volume_buttons:"Ses butonları",volume_mute:"Sessize al",volume_set:"Ses seviyesi"}},number:{display_mode:"Görüntüleme Modu",display_mode_list:{buttons:"Butonlar",default:"Varsayılan (kayan)",slider:"Kayan"}},template:{badge_color:"Rozet rengi",badge_icon:"Rozet simgesi",content:"İçerik",entity_extra:"Şablonlarda ve eylemlerde kullanılsın",label:"Etiket",multiline_secondary:"İkinci bilgi çok satır olsun?",picture:"Resim (ikonun yerine geçecek)",primary:"Birinci bilgi",secondary:"İkinci bilgi"},title:{subtitle:"Altbaşlık",subtitle_tap_action:"Dokunma eylemi alt başlığı",title:"Başlık",title_tap_action:"Dokunma eylemi başlığı"},update:{show_buttons_control:"Düğme kontrolü?"},vacuum:{commands:"Komutlar",commands_list:{on_off:"Aç/Kapat"}},weather:{show_conditions:"Hava koşulu?",show_temperature:"Sıcaklık?"}},chip:{"chip-picker":{add:"Chip ekle",chips:"Chipler",clear:"Temizle",edit:"Düzenle",select:"Chip seç",types:{action:"Eylem","alarm-control-panel":"Alarm",back:"Geri",conditional:"Koşullu",entity:"Varlık",light:"Işık",menu:"Menü",spacer:"Boşluk",template:"Şablon",weather:"Hava Durumu"}},conditional:{chip:"Chip"},sub_element_editor:{title:"Chip düzenleyici"}},form:{alignment_picker:{values:{center:"Ortala",default:"Varsayılan hizalama",end:"Sağa yasla",justify:"İki yana yasla",start:"Sola yasla"}},color_picker:{values:{default:"Varsayılan renk"}},icon_type_picker:{values:{default:"Varsayılan tip","entity-picture":"Varlık resmi",icon:"Simge",none:"Hiçbiri"}},info_picker:{values:{default:"Varsayılan bilgi","last-changed":"Son Değişim","last-updated":"Son Güncelleme",name:"İsim",none:"None",state:"Durum"}},layout_picker:{values:{default:"Varsayılan düzen",horizontal:"Yatay düzen",vertical:"Dikey düzen"}}}}}}),Wl=/* @__PURE__ */$t({card:()=>Ps,default:()=>Os,editor:()=>Ns}),Xl=kt(()=>{Os={card:Ps={not_found:"Сутність не знайдено"},editor:Ns={card:{chips:{alignment:"Вирівнювання"},climate:{hvac_modes:"Режими",show_temperature_control:"Керування температурою?"},cover:{show_buttons_control:"Кнопки керування?",show_position_control:"Керування позицією?",show_tilt_position_control:"Керування нахилом?"},fan:{show_oscillate_control:"Керування повротом?",show_percentage_control:"Керування швидкістю?"},generic:{collapsible_controls:"Приховувати елементи керування коли вимкнено?",content_info:"Вміст",fill_container:"Заповнити контейнер",icon_animation:"Анімувати іконку при активації?",icon_color:"Колір іконки",icon_type:"Тип іконки",layout:"Розташування",primary_info:"Головна інформація",secondary_info:"Додаткова інформація",use_entity_picture:"Використовувати зображення сутності?"},humidifier:{show_target_humidity_control:"Керування вологістю?"},light:{incompatible_controls:"Деякі елементи керування можуть не відображатись якщо ваш пристрій не підтримує цю функцію.",show_brightness_control:"Контроль яскравості?",show_color_control:"Керування кольором світла?",show_color_temp_control:"Керування температурою світла?",use_light_color:"Використовувати колір світла"},lock:{lock:"Зачинити",open:"Відкрити",unlock:"Відчинити"},"media-player":{media_controls:"Керування медіа",media_controls_list:{next:"Наступний трек",on_off:"Увімкнути/Вимкнути",play_pause_stop:"Відтворити/пауза/стоп",previous:"Попередній трек",repeat:"Режим повторення",shuffle:"Перемішати"},show_volume_level:"Показати рівень гучності",use_media_artwork:"Використовувати зображення медіа",use_media_info:"Використовувати інформацію медіа",volume_controls:"Елементи керування гучністю",volume_controls_list:{volume_buttons:"Кнопки гучності",volume_mute:"Вимк. звук",volume_set:"Рівень гучності"}},number:{display_mode:"Відображати режим",display_mode_list:{buttons:"Кнопки",default:"За замовчуванням (повзунок)",slider:"Повзунок"}},template:{badge_color:"Колір значка",badge_icon:"Іконка значка",content:"Вміст",entity_extra:"Використовується в шаблонах та діях",multiline_secondary:"Багаторядкова додаткова інформація?",picture:"Зображення (замінить іконку)",primary:"Головна інформація",secondary:"Додаткова інформація"},title:{subtitle:"Підзаголовок",subtitle_tap_action:"Дія при дотику до підзаголовку",title:"Заголовок",title_tap_action:"Дія при дотику до заголовку"},update:{show_buttons_control:"Кнопки керування?"},vacuum:{commands:"Команди",commands_list:{on_off:"Увімкнути/Вимкнути"}},weather:{show_conditions:"Умови?",show_temperature:"Температура?"}},chip:{"chip-picker":{add:"Додати міні-картку",chips:"Міні-картки",clear:"Очистити",edit:"Редагувати",select:"Обрати міні-картку",types:{action:"Дія","alarm-control-panel":"Сигналізація",back:"Назад",conditional:"Умовна",entity:"Сутність",light:"Світло",menu:"Меню",spacer:"Порожнє місце",template:"Вручну",weather:"Погода"}},conditional:{chip:"Міні-картка"},sub_element_editor:{title:"Редактор міні-карток"}},form:{alignment_picker:{values:{center:"По центру",default:"Вирівнювання за замовчуванням",end:"В кінці",justify:"Вирівняти",start:"На початку"}},color_picker:{values:{default:"Колір за замовчуванням"}},icon_type_picker:{values:{default:"За замовчуванням","entity-picture":"Зображення сутності",icon:"Іконка",none:"Нічого"}},info_picker:{values:{default:"Інформація за замовчуванням","last-changed":"Востаннє змінено","last-updated":"Востаннє оновлено",name:"Назва",none:"Нічого",state:"Стан"}},layout_picker:{values:{default:"Розташування за замовчуванням",horizontal:"Горизонтальне розташування",vertical:"Вертикальне розташування"}}}}}}),Zl=/* @__PURE__ */$t({card:()=>Bs,default:()=>js,editor:()=>Ls,migration:()=>Ds}),Jl=kt(()=>{js={card:Bs={not_found:"Không tìm thấy thực thể"},editor:Ls={section:{context:"Ngữ cảnh",content:"Nội dung",features:"Tính năng",interactions:"Tương tác",layout:"Bố cục",badge:"Huy hiệu"},card:{chips:{alignment:"Căn chỉnh"},climate:{hvac_modes:"Chế độ điều hòa",show_temperature_control:"Điều khiển nhiệt độ?"},cover:{show_buttons_control:"Điều khiển nút bấm?",show_position_control:"Điều khiển vị trí?",show_tilt_position_control:"Điều khiển độ nghiêng?"},empty:{no_config_options:"Thẻ này không có tùy chọn cấu hình."},fan:{show_direction_control:"Điều khiển hướng?",show_oscillate_control:"Điều khiển xoay?",show_percentage_control:"Điều khiển phần trăm?"},generic:{entity:"Thực thể",area:"Khu vực",color:"Màu",content_info:"Nội dung",fill_container:"Làm đầy ô chứa",icon_animation:"Biểu tượng chuyển động khi kích hoạt?",icon_color:"Màu biểu tượng",icon_type:"Kiểu biểu tượng",layout:"Bố cục",primary_info:"Thông tin chính",secondary_info:"Thông tin phụ",use_entity_picture:"Dùng ảnh của thực thể?",collapsible_controls:"Thu nhỏ điều kiển khi tắt",picture:"Hình ảnh",picture_helper:"Nếu đặt, nó sẽ thay cho biểu tượng."},humidifier:{show_target_humidity_control:"Điều khiển độ ẩm?"},light:{incompatible_controls:"Một số điều khiển sẽ không được hiển thị nếu đèn của bạn không hỗ trợ tính năng đó.",show_brightness_control:"Điều khiển độ sáng?",show_color_control:"Điều khiển màu sắc?",show_color_temp_control:"Điều khiển nhiệt độ màu?",use_light_color:"Dùng màu đèn"},lock:{lock:"Khóa",open:"Mở",unlock:"Mở khóa"},"media-player":{media_controls:"Điều khiển đa phương tiện",media_controls_list:{next:"Bài tiếp theo",on_off:"Bật/tắt",play_pause_stop:"Phát/tạm dừng/dừng",previous:"Bài trước",repeat:"Chế độ lặp lại",shuffle:"Xáo trộn"},show_volume_level:"Hiện mức âm lượng",use_media_artwork:"Dùng ảnh đa phương tiện",use_media_info:"Dùng thông tin đa phương tiện",volume_controls:"Điều khiển âm lượng",volume_controls_list:{volume_buttons:"Nút âm lượng",volume_mute:"Im lặng",volume_set:"Mức âm lượng"}},number:{display_mode:"Chế độ hiển thị",display_mode_list:{buttons:"Nút",default:"Mặc định (thanh trượt)",slider:"Thanh trượt"}},template:{area_helper:"Dùng trong bản mẫu và tính năng",area:"Khu vực",badge_color:"Màu huy hiệu",badge_icon:"Biểu tượng huy hiệu",badge_text_helper:"Nếu đặt, nó sẽ thay thế biểu tượng.",badge_text:"Chữ trong huy hiệu",badge:"Huy hiệu",content:"Nội dung",entity_helper:"Dùng trong bản mẫu, tương tác và tính năng",entity_helper_legacy:"Dùng trong bản mẫu và tương tác",label:"Nhãn",layout:"Bố cục",multiline_secondary_helper:"Thẻ có thể được kéo cao lên để vừa với văn bản và không phải lúc nào cũng vừa vặn với hệ thống lưới.",multiline_secondary:"Cho phép nhiều dòng thông tin phụ",primary:"Thông tin chính",secondary:"Thông tin phụ"},title:{subtitle:"Phụ đề",subtitle_tap_action:"Hành động khi nhấp phụ đề",title:"Tiêu đề",title_tap_action:"Hành động khi nhấp tiêu đề"},update:{show_buttons_control:"Điều khiển nút bấm?"},vacuum:{commands:"Mệnh lệnh",commands_list:{on_off:"Bật/tắt"}},weather:{show_conditions:"Điều kiện?",show_temperature:"Nhiệt độ?"}},badge:{template:{label:"Nhãn",content:"Nội dung",entity_helper:"Dùng trong bản mẫu và tương tác",area_helper:"Dùng trong bản mẫu"}},chip:{"chip-picker":{add:"Thêm phỉnh",chips:"Phỉnh",clear:"Tẩy trống",edit:"Chỉnh sửa",select:"Chọn phỉnh",types:{action:"Hành động","alarm-control-panel":"Báo động",back:"Quay về",conditional:"Điều kiện",entity:"Thực thể",light:"Đèn",menu:"Trình đơn",quickbar:"Thanh nhanh",spacer:"Ngăn cách",template:"Mẫu",weather:"Thời tiết"}},conditional:{chip:"Phỉnh"},sub_element_editor:{title:"Trình soạn phỉnh"}},form:{alignment_picker:{values:{center:"Căn giữa",default:"Căn chỉnh mặc định",end:"Căn cuối",justify:"Căn hai bên",start:"Căn đầu"}},color_picker:{values:{default:"Màu mặc định"}},icon_type_picker:{values:{default:"Kiểu mặc định","entity-picture":"Ảnh thực thể",icon:"Biểu tượng",none:"Không có"}},info_picker:{values:{default:"Thông tin mặc định","last-changed":"Lần thay đổi cuối","last-updated":"Lần cập nhật cuối",name:"Tên",none:"Không có",state:"Trạng thái"}},layout_picker:{values:{default:"Bố cục mặc định",horizontal:"Bố cục ngang",vertical:"Bố cục dọc"}}}},migration:Ds={title:"Thẻ đã cập nhật",description:"Cấu hình thẻ của bạn đã được nhập thành phiên bản mới. Bạn có thể tìm thêm thông tin về thay đổi tại {link}.",post:"bài trên GitHub",revert:"Đảo ngược",ok:"Ok"}}}),Ql=/* @__PURE__ */$t({card:()=>Hs,default:()=>Us,editor:()=>Rs}),tc=kt(()=>{Us={card:Hs={not_found:"未找到实体"},editor:Rs={card:{chips:{alignment:"对齐"},climate:{hvac_modes:"空调模式",show_temperature_control:"温度控制?"},cover:{show_buttons_control:"按钮控制?",show_position_control:"位置控制?",show_tilt_position_control:"角度控制?"},empty:{no_config_options:"这个卡片没有可配置的选项。"},fan:{show_direction_control:"方向控制?",show_oscillate_control:"摆动控制?",show_percentage_control:"百分比控制?"},generic:{collapsible_controls:"关闭时隐藏控制器",color:"颜色",content_info:"内容",fill_container:"填满容器",icon_animation:"激活时使用动态图标?",icon_color:"图标颜色",icon_type:"图标类型",layout:"布局",primary_info:"首要信息",secondary_info:"次要信息",use_entity_picture:"使用实体图片?"},humidifier:{show_target_humidity_control:"湿度控制?"},light:{incompatible_controls:"设备不支持的控制器将不会显示。",show_brightness_control:"亮度控制?",show_color_control:"颜色控制?",show_color_temp_control:"色温控制?",use_light_color:"使用灯光颜色"},lock:{lock:"锁定",open:"打开",unlock:"解锁"},"media-player":{media_controls:"媒体控制",media_controls_list:{next:"下一曲",on_off:"开启/关闭",play_pause_stop:"播放/暂停/停止",previous:"上一曲",repeat:"循环模式",shuffle:"随机"},show_volume_level:"显示音量大小",use_media_artwork:"使用媒体插图",use_media_info:"使用媒体信息",volume_controls:"音量控制",volume_controls_list:{volume_buttons:"音量按钮",volume_mute:"静音",volume_set:"音量等级"}},number:{display_mode:"显示模式",display_mode_list:{buttons:"按钮",default:"默认 (滑块)",slider:"滑块"}},template:{badge_color:"徽标颜色",badge_icon:"徽标图标",content:"内容",entity_extra:"用于模板和动作",label:"标签",multiline_secondary:"多行次要信息?",picture:"图片 (将会替代图标)",primary:"首要信息",secondary:"次要信息"},title:{subtitle:"子标题",subtitle_tap_action:"子标题点击动作",title:"标题",title_tap_action:"标题点击动作"},update:{show_buttons_control:"控制按钮?"},vacuum:{commands:"命令",commands_list:{on_off:"开/关"}},weather:{show_conditions:"条件?",show_temperature:"温度?"}},chip:{"chip-picker":{add:"添加 chip",chips:"小卡片",clear:"清除",edit:"编辑",select:"选择 chip",types:{action:"动作","alarm-control-panel":"警戒控制台",back:"返回",conditional:"条件显示",entity:"实体",light:"灯光",menu:"菜单",quickbar:"快捷栏",spacer:"占位符",template:"模板",weather:"天气"}},conditional:{chip:"小卡片"},sub_element_editor:{title:"Chip 编辑"}},form:{alignment_picker:{values:{center:"居中对齐",default:"默认",end:"右对齐",justify:"两端对齐",start:"左对齐"}},color_picker:{values:{default:"默认颜色"}},icon_type_picker:{values:{default:"默认类型","entity-picture":"实体图片",icon:"图标",none:"无"}},info_picker:{values:{default:"默认信息","last-changed":"变更时间","last-updated":"更新时间",name:"名称",none:"无",state:"状态"}},layout_picker:{values:{default:"默认布局",horizontal:"水平布局",vertical:"垂直布局"}}}}}}),ec=/* @__PURE__ */$t({card:()=>Vs,default:()=>Gs,editor:()=>Fs}),oc=kt(()=>{Gs={card:Vs={not_found:"未找到實體"},editor:Fs={card:{chips:{alignment:"對齊"},climate:{hvac_modes:"空調模式",show_temperature_control:"溫度控制?"},cover:{show_buttons_control:"按鈕控制?",show_position_control:"位置控制?",show_tilt_position_control:"角度控制?"},fan:{show_oscillate_control:"擺頭控制?",show_percentage_control:"百分比控制?"},generic:{collapsible_controls:"關閉時隱藏控制項",color:"顏色",content_info:"內容",fill_container:"填滿容器",icon_animation:"啟動時使用動態圖示?",icon_color:"圖示顏色",icon_type:"圖示樣式",layout:"佈局",primary_info:"主要訊息",secondary_info:"次要訊息",use_entity_picture:"使用實體圖片?"},humidifier:{show_target_humidity_control:"溼度控制?"},light:{incompatible_controls:"不會顯示裝置不支援的控制。",show_brightness_control:"亮度控制?",show_color_control:"色彩控制?",show_color_temp_control:"色溫控制?",use_light_color:"使用燈光顏色"},lock:{lock:"上鎖",open:"打開",unlock:"解鎖"},"media-player":{media_controls:"媒體控制",media_controls_list:{next:"下一首",on_off:"開啟、關閉",play_pause_stop:"播放、暫停、停止",previous:"上一首",repeat:"重複播放",shuffle:"隨機播放"},show_volume_level:"顯示音量大小",use_media_artwork:"使用媒體插圖",use_media_info:"使用媒體資訊",volume_controls:"音量控制",volume_controls_list:{volume_buttons:"音量按鈕",volume_mute:"靜音",volume_set:"音量等級"}},number:{display_mode:"顯示模式",display_mode_list:{buttons:"按鈕",default:"預設 (滑桿)",slider:"滑桿"}},template:{badge_color:"角標顏色",badge_icon:"角標圖示",content:"內容",entity_extra:"用於模板與動作",label:"標籤",multiline_secondary:"多行次要訊息?",picture:"圖片 (將會取代圖示)",primary:"主要訊息",secondary:"次要訊息"},title:{subtitle:"副標題",subtitle_tap_action:"副標題點擊動作",title:"標題",title_tap_action:"標題點擊動作"},update:{show_buttons_control:"按鈕控制?"},vacuum:{commands:"指令",commands_list:{on_off:"開啟、關閉"}},weather:{show_conditions:"狀況?",show_temperature:"溫度?"}},chip:{"chip-picker":{add:"新增小卡片",chips:"小卡片",clear:"清除",edit:"編輯",select:"選擇小卡片",types:{action:"動作","alarm-control-panel":"警報器控制",back:"返回",conditional:"條件",entity:"實體",light:"燈光",menu:"選單",spacer:"佔位符",template:"模板",weather:"天氣"}},conditional:{chip:"小卡片"},sub_element_editor:{title:"小卡片編輯器"}},form:{alignment_picker:{values:{center:"居中對齊",default:"預設對齊",end:"居右對齊",justify:"兩端對齊",start:"居左對齊"}},color_picker:{values:{default:"預設顏色"}},icon_type_picker:{values:{default:"預設樣式","entity-picture":"實體圖片",icon:"圖示",none:"無"}},info_picker:{values:{default:"預設訊息","last-changed":"最近變動時間","last-updated":"最近更新時間",name:"名稱",none:"無",state:"狀態"}},layout_picker:{values:{default:"預設佈局",horizontal:"水平佈局",vertical:"垂直佈局"}}}}}});function ic(t,e){try{return t.split(".").reduce((t,e)=>t[e],Ks[e])}catch(K){return}}function nc(t){return function(e,o={}){var i;const n=null!==(i=null==t?void 0:t.locale.language)&&void 0!==i?i:Ys;let r=ic(e,n);if(r||(r=ic(e,Ys)),!r)return e;try{return new ta(r,n).format(o)}catch(a){return console.error(`Error formatting message for key "${e}" with lang "${n}":`,a),r}}}var rc,ac,sc,lc,cc,uc,hc,dc,pc,mc,fc,gc,_c,vc,bc,yc,wc,kc,Cc,$c,Ec,xc,Ac,Sc,Tc,Mc,Ic,zc,Pc,Nc,Oc,Bc=kt(()=>{qs(),Xs(),Js(),tl(),ol(),nl(),al(),ll(),ul(),dl(),ml(),gl(),vl(),yl(),kl(),$l(),xl(),Sl(),Ml(),zl(),Nl(),Bl(),Dl(),Hl(),Ul(),Fl(),Kl(),ql(),Xl(),Jl(),tc(),oc(),Ks={ar:Ws,bg:Zs,ca:Qs,cs:el,da:il,de:rl,el:sl,en:cl,es:hl,fi:pl,fr:fl,he:_l,hu:bl,id:wl,it:Cl,"ko-KR":El,nb:Al,nl:Tl,pl:Il,"pt-BR":Pl,"pt-PT":Ol,ro:Ll,ru:jl,sl:Vl,sk:Rl,sv:Gl,tr:Yl,uk:Wl,vi:Zl,"zh-Hans":Ql,"zh-Hant":ec},Ys="en"}),Lc=kt(()=>{Vt(),Be(),je(),vn(),rc=class extends Ot{constructor(...t){super(...t),this.picture_url=""}render(){return J`
@@ -449,7 +449,7 @@ var t,e,o,i,n,r,a,s,l,c,u,h,d,p,m,f,g,_,v,b,y,w,k,C,$,E,x,A,S,T,M,I,z,P,N,O,B,L, height: 100%; border-radius: var(--icon-border-radius); } - `}},gn([Gt()],nc.prototype,"picture_url",void 0),nc=gn([Lt("mushroom-shape-avatar")],nc)}),Lc=kt(()=>{rc=(t,e)=>{if("number"==typeof t)return 3===e?{mode:"rgb",r:(t>>8&15|t>>4&240)/255,g:(t>>4&15|240&t)/255,b:(15&t|t<<4&240)/255}:4===e?{mode:"rgb",r:(t>>12&15|t>>8&240)/255,g:(t>>8&15|t>>4&240)/255,b:(t>>4&15|240&t)/255,alpha:(15&t|t<<4&240)/255}:6===e?{mode:"rgb",r:(t>>16&255)/255,g:(t>>8&255)/255,b:(255&t)/255}:8===e?{mode:"rgb",r:(t>>24&255)/255,g:(t>>16&255)/255,b:(t>>8&255)/255,alpha:(255&t)/255}:void 0}}),Dc=kt(()=>{ac={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074}}),jc=kt(()=>{Lc(),Dc(),sc=t=>rc(ac[t.toLowerCase()],6)}),Hc=kt(()=>{Lc(),lc=/^#?([0-9a-f]{8}|[0-9a-f]{6}|[0-9a-f]{4}|[0-9a-f]{3})$/i,cc=t=>{let e;return(e=t.match(lc))?rc(parseInt(e[1],16),e[1].length):void 0}}),Rc=kt(()=>{`(?:${uc="([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)"}|none)`,hc=`${uc}%`,dc=`(?:${uc}%|${uc})`,pc=`(?:${uc}%|${uc}|none)`,mc=`(?:${uc}(deg|grad|rad|turn)|${uc})`,fc="\\s*,\\s*",new RegExp("^"+pc+"$")}),Uc=kt(()=>{Rc(),gc=new RegExp(`^rgba?\\(\\s*${uc}${fc}${uc}${fc}${uc}\\s*(?:,\\s*${dc}\\s*)?\\)$`),_c=new RegExp(`^rgba?\\(\\s*${hc}${fc}${hc}${fc}${hc}\\s*(?:,\\s*${dc}\\s*)?\\)$`),vc=t=>{let e,o={mode:"rgb"};if(e=t.match(gc))void 0!==e[1]&&(o.r=e[1]/255),void 0!==e[2]&&(o.g=e[2]/255),void 0!==e[3]&&(o.b=e[3]/255);else{if(!(e=t.match(_c)))return;void 0!==e[1]&&(o.r=e[1]/100),void 0!==e[2]&&(o.g=e[2]/100),void 0!==e[3]&&(o.b=e[3]/100)}return void 0!==e[4]?o.alpha=Math.max(0,Math.min(1,e[4]/100)):void 0!==e[5]&&(o.alpha=Math.max(0,Math.min(1,+e[5]))),o}}),Vc=kt(()=>{Qc(),oe(),bc=(t,e)=>void 0===t?void 0:"object"!=typeof t?Nc(t):void 0!==t.mode?t:e?ee(ee({},t),{},{mode:e}):void 0}),Fc=kt(()=>{Gc(),Vc(),yc=(t="rgb")=>e=>void 0!==(e=bc(e,t))?e.mode===t?e:wc[e.mode][t]?wc[e.mode][t](e):"rgb"===t?wc[e.mode].rgb(e):wc.rgb[t](wc[e.mode].rgb(e)):void 0}),Gc=kt(()=>{Fc(),oe(),wc={},kc={},Cc=[],$c={},Ec=t=>t,xc=t=>(wc[t.mode]=ee(ee({},wc[t.mode]),t.toMode),Object.keys(t.fromMode||{}).forEach(e=>{wc[e]||(wc[e]={}),wc[e][t.mode]=t.fromMode[e]}),t.ranges||(t.ranges={}),t.difference||(t.difference={}),t.channels.forEach(e=>{if(void 0===t.ranges[e]&&(t.ranges[e]=[0,1]),!t.interpolate[e])throw new Error(`Missing interpolator for: ${e}`);"function"==typeof t.interpolate[e]&&(t.interpolate[e]={use:t.interpolate[e]}),t.interpolate[e].fixup||(t.interpolate[e].fixup=Ec)}),kc[t.mode]=t,(t.parse||[]).forEach(e=>{Sc(e,t.mode)}),yc(t.mode)),Ac=t=>kc[t],Sc=(t,e)=>{if("string"==typeof t){if(!e)throw new Error("'mode' required when 'parser' is a string");$c[t]=e}else"function"==typeof t&&Cc.indexOf(t)<0&&Cc.push(t)}});function Kc(t){let e=t[zc],o=t[zc+1];return"-"===e||"+"===e?/\d/.test(o)||"."===o&&/\d/.test(t[zc+2]):/\d/.test("."===e?o:e)}function Yc(t){if(zc>=t.length)return!1;let e=t[zc];if(Tc.test(e))return!0;if("-"===e){if(t.length-zc<2)return!1;let e=t[zc+1];return!("-"!==e&&!Tc.test(e))}return!1}function qc(t){let e="";if("-"!==t[zc]&&"+"!==t[zc]||(e+=t[zc++]),e+=Wc(t),"."===t[zc]&&/\d/.test(t[zc+1])&&(e+=t[zc++]+Wc(t)),"e"!==t[zc]&&"E"!==t[zc]||("-"!==t[zc+1]&&"+"!==t[zc+1]||!/\d/.test(t[zc+2])?/\d/.test(t[zc+1])&&(e+=t[zc++]+Wc(t)):e+=t[zc++]+t[zc++]+Wc(t)),Yc(t)){let o=Xc(t);return"deg"===o||"rad"===o||"turn"===o||"grad"===o?{type:Ic.Hue,value:e*Pc[o]}:void 0}return"%"===t[zc]?(zc++,{type:Ic.Percentage,value:+e}):{type:Ic.Number,value:+e}}function Wc(t){let e="";for(;/\d/.test(t[zc]);)e+=t[zc++];return e}function Xc(t){let e="";for(;zc4)){if(4===o.length){if(o[3].type!==Ic.Alpha)return;o[3]=o[3].value}return 3===o.length&&o.push({type:Ic.None,value:void 0}),o.every(t=>t.type!==Ic.Alpha)?o:void 0}}var Qc=kt(()=>{Gc(),Tc=/[^\x00-\x7F]|[a-zA-Z_]/,Mc=/[^\x00-\x7F]|[-\w]/,Ic={Function:"function",Ident:"ident",Number:"number",Percentage:"percentage",ParenClose:")",None:"none",Hue:"hue",Alpha:"alpha"},zc=0,Pc={deg:1,rad:180/Math.PI,grad:.9,turn:360},Nc=t=>{if("string"!=typeof t)return;const e=function(t=""){let e,o=t.trim(),i=[];for(zc=0;zc{Qc()}),nh=kt(()=>{eu=t=>"transparent"===t?{mode:"rgb",r:0,g:0,b:0,alpha:0}:void 0}),rh=kt(()=>{ou=(t,e,o)=>t+o*(e-t)}),ah=kt(()=>{iu=t=>{let e=[];for(let o=0;oe=>{let o=iu(e);return e=>{let i=e*o.length,n=e>=1?o.length-1:Math.max(Math.floor(i),0),r=o[n];return void 0===r?void 0:t(r[0],r[1],i-n)}}}),sh=kt(()=>{rh(),ah(),ru=nu(ou)}),lh=kt(()=>{au=t=>{let e=!1,o=t.map(t=>void 0!==t?(e=!0,t):1);return e?o:t}}),ch=kt(()=>{jc(),Hc(),Uc(),ih(),nh(),sh(),lh(),su={mode:"rgb",channels:["r","g","b","alpha"],parse:[tu,cc,vc,sc,eu,"srgb"],serialize:"srgb",interpolate:{r:ru,g:ru,b:ru,alpha:{use:ru,fixup:au}},gamut:!0,white:{r:1,g:1,b:1},black:{r:0,g:0,b:0}}}),uh=kt(()=>{lu=(t=0)=>Math.pow(Math.abs(t),563/256)*Math.sign(t),cu=t=>{let e=lu(t.r),o=lu(t.g),i=lu(t.b),n={mode:"xyz65",x:.5766690429101305*e+.1855582379065463*o+.1882286462349947*i,y:.297344975250536*e+.6273635662554661*o+.0752914584939979*i,z:.0270313613864123*e+.0706888525358272*o+.9913375368376386*i};return void 0!==t.alpha&&(n.alpha=t.alpha),n}}),hh=kt(()=>{uu=t=>Math.pow(Math.abs(t),256/563)*Math.sign(t),hu=({x:t,y:e,z:o,alpha:i})=>{void 0===t&&(t=0),void 0===e&&(e=0),void 0===o&&(o=0);let n={mode:"a98",r:uu(2.0415879038107465*t-.5650069742788597*e-.3447313507783297*o),g:uu(-.9692436362808798*t+1.8759675015077206*e+.0415550574071756*o),b:uu(.0134442806320312*t-.1183623922310184*e+1.0151749943912058*o)};return void 0!==i&&(n.alpha=i),n}}),dh=kt(()=>{du=(t=0)=>{const e=Math.abs(t);return e<=.04045?t/12.92:(Math.sign(t)||1)*Math.pow((e+.055)/1.055,2.4)},pu=({r:t,g:e,b:o,alpha:i})=>{let n={mode:"lrgb",r:du(t),g:du(e),b:du(o)};return void 0!==i&&(n.alpha=i),n}}),ph=kt(()=>{dh(),mu=t=>{let{r:e,g:o,b:i,alpha:n}=pu(t),r={mode:"xyz65",x:.4123907992659593*e+.357584339383878*o+.1804807884018343*i,y:.2126390058715102*e+.715168678767756*o+.0721923153607337*i,z:.0193308187155918*e+.119194779794626*o+.9505321522496607*i};return void 0!==n&&(r.alpha=n),r}}),mh=kt(()=>{fu=(t=0)=>{const e=Math.abs(t);return e>.0031308?(Math.sign(t)||1)*(1.055*Math.pow(e,1/2.4)-.055):12.92*t},gu=({r:t,g:e,b:o,alpha:i},n="rgb")=>{let r={mode:n,r:fu(t),g:fu(e),b:fu(o)};return void 0!==i&&(r.alpha=i),r}}),fh=kt(()=>{mh(),_u=({x:t,y:e,z:o,alpha:i})=>{void 0===t&&(t=0),void 0===e&&(e=0),void 0===o&&(o=0);let n=gu({r:3.2409699419045226*t-1.537383177570094*e-.4986107602930034*o,g:-.9692436362808796*t+1.8759675015077204*e+.0415550574071756*o,b:.0556300796969936*t-.2039769588889765*e+1.0569715142428784*o});return void 0!==i&&(n.alpha=i),n}}),gh=kt(()=>{ch(),uh(),hh(),ph(),fh(),oe(),vu=ee(ee({},su),{},{mode:"a98",parse:["a98-rgb"],serialize:"a98-rgb",fromMode:{rgb:t=>hu(mu(t)),xyz65:hu},toMode:{rgb:t=>_u(cu(t)),xyz65:cu}})}),_h=kt(()=>{bu=t=>(t%=360)<0?t+360:t}),vh=kt(()=>{_h(),yu=(t,e)=>t.map((o,i,n)=>{if(void 0===o)return o;let r=bu(o);return 0===i||void 0===t[i-1]?r:e(r-bu(n[i-1]))}).reduce((t,e)=>t.length&&void 0!==e&&void 0!==t[t.length-1]?(t.push(e+t[t.length-1]),t):(t.push(e),t),[]),wu=t=>yu(t,t=>Math.abs(t)<=180?t:t-360*Math.sign(t))}),bh=kt(()=>{ku=[-.14861,1.78277,-.29227,-.90649,1.97294,0],Cu=Math.PI/180,$u=180/Math.PI}),yh=kt(()=>{bh(),Eu=ku[3]*ku[4],xu=ku[1]*ku[4],Au=ku[1]*ku[2]-ku[0]*ku[3],Su=({r:t,g:e,b:o,alpha:i})=>{void 0===t&&(t=0),void 0===e&&(e=0),void 0===o&&(o=0);let n=(Au*o+t*Eu-e*xu)/(Au+Eu-xu),r=o-n,a=(ku[4]*(e-n)-ku[2]*r)/ku[3],s={mode:"cubehelix",l:n,s:0===n||1===n?void 0:Math.sqrt(r*r+a*a)/(ku[4]*n*(1-n))};return s.s&&(s.h=Math.atan2(a,r)*$u-120),void 0!==i&&(s.alpha=i),s}}),wh=kt(()=>{bh(),Tu=({h:t,s:e,l:o,alpha:i})=>{let n={mode:"rgb"};t=(void 0===t?0:t+120)*Cu,void 0===o&&(o=0);let r=void 0===e?0:e*o*(1-o),a=Math.cos(t),s=Math.sin(t);return n.r=o+r*(ku[0]*a+ku[1]*s),n.g=o+r*(ku[2]*a+ku[3]*s),n.b=o+r*(ku[4]*a+ku[5]*s),void 0!==i&&(n.alpha=i),n}}),kh=kt(()=>{_h(),Mu=(t,e)=>{if(void 0===t.h||void 0===e.h||!t.s||!e.s)return 0;let o=bu(t.h),i=bu(e.h),n=Math.sin((i-o+360)/2*Math.PI/180);return 2*Math.sqrt(t.s*e.s)*n},Iu=(t,e)=>{if(void 0===t.h||void 0===e.h)return 0;let o=bu(t.h),i=bu(e.h);return Math.abs(i-o)>180?o-(i-360*Math.sign(i-o)):i-o},zu=(t,e)=>{if(void 0===t.h||void 0===e.h||!t.c||!e.c)return 0;let o=bu(t.h),i=bu(e.h),n=Math.sin((i-o+360)/2*Math.PI/180);return 2*Math.sqrt(t.c*e.c)*n}}),Ch=kt(()=>{Pu=t=>{let e=t.reduce((t,e)=>{if(void 0!==e){let o=e*Math.PI/180;t.sin+=Math.sin(o),t.cos+=Math.cos(o)}return t},{sin:0,cos:0}),o=180*Math.atan2(e.sin,e.cos)/Math.PI;return o<0?360+o:o}}),$h=kt(()=>{vh(),lh(),sh(),yh(),wh(),kh(),Ch(),Nu={mode:"cubehelix",channels:["h","s","l","alpha"],parse:["--cubehelix"],serialize:"--cubehelix",ranges:{h:[0,360],s:[0,4.614],l:[0,1]},fromMode:{rgb:Su},toMode:{rgb:Tu},interpolate:{h:{use:ru,fixup:wu},s:ru,l:ru,alpha:{use:ru,fixup:au}},difference:{h:Mu},average:{h:Pu}}}),Eh=kt(()=>{_h(),Ou=({l:t,a:e,b:o,alpha:i},n="lch")=>{void 0===e&&(e=0),void 0===o&&(o=0);let r=Math.sqrt(e*e+o*o),a={mode:n,l:t,c:r};return r&&(a.h=bu(180*Math.atan2(o,e)/Math.PI)),void 0!==i&&(a.alpha=i),a}}),xh=kt(()=>{Bu=({l:t,c:e,h:o,alpha:i},n="lab")=>{void 0===o&&(o=0);let r={mode:n,l:t,a:e?e*Math.cos(o/180*Math.PI):0,b:e?e*Math.sin(o/180*Math.PI):0};return void 0!==i&&(r.alpha=i),r}}),Ah=kt(()=>{Lu=Math.pow(29,3)/Math.pow(3,3),Du=Math.pow(6,3)/Math.pow(29,3)}),Sh=kt(()=>{ju={X:.3457/.3585,Y:1,Z:.2958/.3585},Hu={X:.3127/.329,Y:1,Z:.3583/.329},Math.pow(29,3)/Math.pow(3,3),Math.pow(6,3)/Math.pow(29,3)}),Th=kt(()=>{Ah(),Sh(),Ru=t=>Math.pow(t,3)>Du?Math.pow(t,3):(116*t-16)/Lu,Uu=({l:t,a:e,b:o,alpha:i})=>{void 0===t&&(t=0),void 0===e&&(e=0),void 0===o&&(o=0);let n=(t+16)/116,r=n-o/200,a={mode:"xyz65",x:Ru(e/500+n)*Hu.X,y:Ru(n)*Hu.Y,z:Ru(r)*Hu.Z};return void 0!==i&&(a.alpha=i),a}}),Mh=kt(()=>{Th(),fh(),Vu=t=>_u(Uu(t))}),Ih=kt(()=>{Ah(),Sh(),Fu=t=>t>Du?Math.cbrt(t):(Lu*t+16)/116,Gu=({x:t,y:e,z:o,alpha:i})=>{void 0===t&&(t=0),void 0===e&&(e=0),void 0===o&&(o=0);let n=Fu(t/Hu.X),r=Fu(e/Hu.Y),a={mode:"lab65",l:116*r-16,a:500*(n-r),b:200*(r-Fu(o/Hu.Z))};return void 0!==i&&(a.alpha=i),a}}),zh=kt(()=>{ph(),Ih(),Ku=t=>{let e=Gu(mu(t));return t.r===t.b&&t.b===t.g&&(e.a=e.b=0),e}}),Ph=kt(()=>{Yu=26/180*Math.PI,qu=Math.cos(Yu),Wu=Math.sin(Yu),Xu=100/Math.log(1.39)}),Nh=kt(()=>{Ph(),Zu=({l:t,c:e,h:o,alpha:i})=>{void 0===t&&(t=0),void 0===e&&(e=0),void 0===o&&(o=0);let n={mode:"lab65",l:(Math.exp(1*t/Xu)-1)/.0039},r=(Math.exp(.0435*e*1*1)-1)/.075,a=r*Math.cos(o/180*Math.PI-Yu),s=r*Math.sin(o/180*Math.PI-Yu);return n.a=a*qu-s/.83*Wu,n.b=a*Wu+s/.83*qu,void 0!==i&&(n.alpha=i),n}}),Oh=kt(()=>{Ph(),_h(),Ju=({l:t,a:e,b:o,alpha:i})=>{void 0===t&&(t=0),void 0===e&&(e=0),void 0===o&&(o=0);let n=e*qu+o*Wu,r=.83*(o*qu-e*Wu),a=Math.sqrt(n*n+r*r),s={mode:"dlch",l:Xu/1*Math.log(1+.0039*t),c:Math.log(1+.075*a)/.0435};return s.c&&(s.h=bu((Math.atan2(r,n)+Yu)/Math.PI*180)),void 0!==i&&(s.alpha=i),s}}),Bh=kt(()=>{Eh(),xh(),Mh(),zh(),Nh(),Oh(),sh(),lh(),Qu=t=>Zu(Ou(t,"dlch")),th=t=>Bu(Ju(t),"dlab"),eh={mode:"dlab",parse:["--din99o-lab"],serialize:"--din99o-lab",toMode:{lab65:Qu,rgb:t=>Vu(Qu(t))},fromMode:{lab65:th,rgb:t=>th(Ku(t))},channels:["l","a","b","alpha"],ranges:{l:[0,100],a:[-40.09,45.501],b:[-40.469,44.344]},interpolate:{l:ru,a:ru,b:ru,alpha:{use:ru,fixup:au}}}}),Lh=kt(()=>{Eh(),xh(),Nh(),Oh(),Mh(),zh(),vh(),lh(),sh(),kh(),Ch(),oh={mode:"dlch",parse:["--din99o-lch"],serialize:"--din99o-lch",toMode:{lab65:Zu,dlab:t=>Bu(t,"dlab"),rgb:t=>Vu(Zu(t))},fromMode:{lab65:Ju,dlab:t=>Ou(t,"dlch"),rgb:t=>Ju(Ku(t))},channels:["l","c","h","alpha"],ranges:{l:[0,100],c:[0,51.484],h:[0,360]},interpolate:{l:ru,c:ru,h:{use:ru,fixup:wu},alpha:{use:ru,fixup:au}},difference:{h:zu},average:{h:Pu}}});function Dh({h:t,s:e,i:o,alpha:i}){t=bu(void 0!==t?t:0),void 0===e&&(e=0),void 0===o&&(o=0);let n,r=Math.abs(t/60%2-1);switch(Math.floor(t/60)){case 0:n={r:o*(1+e*(3/(2-r)-1)),g:o*(1+e*(3*(1-r)/(2-r)-1)),b:o*(1-e)};break;case 1:n={r:o*(1+e*(3*(1-r)/(2-r)-1)),g:o*(1+e*(3/(2-r)-1)),b:o*(1-e)};break;case 2:n={r:o*(1-e),g:o*(1+e*(3/(2-r)-1)),b:o*(1+e*(3*(1-r)/(2-r)-1))};break;case 3:n={r:o*(1-e),g:o*(1+e*(3*(1-r)/(2-r)-1)),b:o*(1+e*(3/(2-r)-1))};break;case 4:n={r:o*(1+e*(3*(1-r)/(2-r)-1)),g:o*(1-e),b:o*(1+e*(3/(2-r)-1))};break;case 5:n={r:o*(1+e*(3/(2-r)-1)),g:o*(1-e),b:o*(1+e*(3*(1-r)/(2-r)-1))};break;default:n={r:o*(1-e),g:o*(1-e),b:o*(1-e)}}return n.mode="rgb",void 0!==i&&(n.alpha=i),n}var jh=kt(()=>{_h()});function Hh({r:t,g:e,b:o,alpha:i}){void 0===t&&(t=0),void 0===e&&(e=0),void 0===o&&(o=0);let n=Math.max(t,e,o),r=Math.min(t,e,o),a={mode:"hsi",s:t+e+o===0?0:1-3*r/(t+e+o),i:(t+e+o)/3};return n-r!==0&&(a.h=60*(n===t?(e-o)/(n-r)+6*(e{}),Vh=kt(()=>{jh(),Uh(),vh(),lh(),sh(),kh(),Ch(),Rh={mode:"hsi",toMode:{rgb:Dh},parse:["--hsi"],serialize:"--hsi",fromMode:{rgb:Hh},channels:["h","s","i","alpha"],ranges:{h:[0,360]},gamut:"rgb",interpolate:{h:{use:ru,fixup:wu},s:ru,i:ru,alpha:{use:ru,fixup:au}},difference:{h:Mu},average:{h:Pu}}});function Fh({h:t,s:e,l:o,alpha:i}){t=bu(void 0!==t?t:0),void 0===e&&(e=0),void 0===o&&(o=0);let n,r=o+e*(o<.5?o:1-o),a=r-2*(r-o)*Math.abs(t/60%2-1);switch(Math.floor(t/60)){case 0:n={r:r,g:a,b:2*o-r};break;case 1:n={r:a,g:r,b:2*o-r};break;case 2:n={r:2*o-r,g:r,b:a};break;case 3:n={r:2*o-r,g:a,b:r};break;case 4:n={r:a,g:2*o-r,b:r};break;case 5:n={r:r,g:2*o-r,b:a};break;default:n={r:2*o-r,g:2*o-r,b:2*o-r}}return n.mode="rgb",void 0!==i&&(n.alpha=i),n}var Gh=kt(()=>{_h()});function Kh({r:t,g:e,b:o,alpha:i}){void 0===t&&(t=0),void 0===e&&(e=0),void 0===o&&(o=0);let n=Math.max(t,e,o),r=Math.min(t,e,o),a={mode:"hsl",s:n===r?0:(n-r)/(1-Math.abs(n+r-1)),l:.5*(n+r)};return n-r!==0&&(a.h=60*(n===t?(e-o)/(n-r)+6*(e{}),Zh=kt(()=>{Yh=(t,e)=>{switch(e){case"deg":return+t;case"rad":return t/Math.PI*180;case"grad":return t/10*9;case"turn":return 360*t}}}),Jh=kt(()=>{Zh(),Rc(),qh=new RegExp(`^hsla?\\(\\s*${mc}${fc}${hc}${fc}${hc}\\s*(?:,\\s*${dc}\\s*)?\\)$`),Wh=t=>{let e=t.match(qh);if(!e)return;let o={mode:"hsl"};return void 0!==e[3]?o.h=+e[3]:void 0!==e[1]&&void 0!==e[2]&&(o.h=Yh(e[1],e[2])),void 0!==e[4]&&(o.s=Math.min(Math.max(0,e[4]/100),1)),void 0!==e[5]&&(o.l=Math.min(Math.max(0,e[5]/100),1)),void 0!==e[6]?o.alpha=Math.max(0,Math.min(1,e[6]/100)):void 0!==e[7]&&(o.alpha=Math.max(0,Math.min(1,+e[7]))),o}});function Qh(t,e){if(!e||"hsl"!==e[0]&&"hsla"!==e[0])return;const o={mode:"hsl"},[,i,n,r,a]=e;if(i.type!==Ic.None){if(i.type===Ic.Percentage)return;o.h=i.value}if(n.type!==Ic.None){if(n.type===Ic.Hue)return;o.s=n.value/100}if(r.type!==Ic.None){if(r.type===Ic.Hue)return;o.l=r.value/100}return a.type!==Ic.None&&(o.alpha=Math.min(1,Math.max(0,a.type===Ic.Number?a.value:a.value/100))),o}var td,ed=kt(()=>{Qc()}),od=kt(()=>{Gh(),Xh(),Jh(),ed(),vh(),lh(),sh(),kh(),Ch(),td={mode:"hsl",toMode:{rgb:Fh},fromMode:{rgb:Kh},channels:["h","s","l","alpha"],ranges:{h:[0,360]},gamut:"rgb",parse:[Qh,Wh],serialize:t=>`hsl(${void 0!==t.h?t.h:"none"} ${void 0!==t.s?100*t.s+"%":"none"} ${void 0!==t.l?100*t.l+"%":"none"}${t.alpha<1?` / ${t.alpha}`:""})`,interpolate:{h:{use:ru,fixup:wu},s:ru,l:ru,alpha:{use:ru,fixup:au}},difference:{h:Mu},average:{h:Pu}}});function id({h:t,s:e,v:o,alpha:i}){t=bu(void 0!==t?t:0),void 0===e&&(e=0),void 0===o&&(o=0);let n,r=Math.abs(t/60%2-1);switch(Math.floor(t/60)){case 0:n={r:o,g:o*(1-e*r),b:o*(1-e)};break;case 1:n={r:o*(1-e*r),g:o,b:o*(1-e)};break;case 2:n={r:o*(1-e),g:o,b:o*(1-e*r)};break;case 3:n={r:o*(1-e),g:o*(1-e*r),b:o};break;case 4:n={r:o*(1-e*r),g:o*(1-e),b:o};break;case 5:n={r:o,g:o*(1-e),b:o*(1-e*r)};break;default:n={r:o*(1-e),g:o*(1-e),b:o*(1-e)}}return n.mode="rgb",void 0!==i&&(n.alpha=i),n}var nd=kt(()=>{_h()});function rd({r:t,g:e,b:o,alpha:i}){void 0===t&&(t=0),void 0===e&&(e=0),void 0===o&&(o=0);let n=Math.max(t,e,o),r=Math.min(t,e,o),a={mode:"hsv",s:0===n?0:1-r/n,v:n};return n-r!==0&&(a.h=60*(n===t?(e-o)/(n-r)+6*(e{}),ld=kt(()=>{nd(),sd(),vh(),lh(),sh(),kh(),Ch(),ad={mode:"hsv",toMode:{rgb:id},parse:["--hsv"],serialize:"--hsv",fromMode:{rgb:rd},channels:["h","s","v","alpha"],ranges:{h:[0,360]},gamut:"rgb",interpolate:{h:{use:ru,fixup:wu},s:ru,v:ru,alpha:{use:ru,fixup:au}},difference:{h:Mu},average:{h:Pu}}});function cd({h:t,w:e,b:o,alpha:i}){if(void 0===e&&(e=0),void 0===o&&(o=0),e+o>1){let t=e+o;e/=t,o/=t}return id({h:t,s:1===o?1:1-e/(1-o),v:1-o,alpha:i})}var ud=kt(()=>{nd()});function hd(t){let e=rd(t);if(void 0===e)return;let o=void 0!==e.s?e.s:0,i=void 0!==e.v?e.v:0,n={mode:"hwb",w:(1-o)*i,b:1-i};return void 0!==e.h&&(n.h=e.h),void 0!==e.alpha&&(n.alpha=e.alpha),n}var dd=kt(()=>{sd()});function pd(t,e){if(!e||"hwb"!==e[0])return;const o={mode:"hwb"},[,i,n,r,a]=e;if(i.type!==Ic.None){if(i.type===Ic.Percentage)return;o.h=i.value}if(n.type!==Ic.None){if(n.type===Ic.Hue)return;o.w=n.value/100}if(r.type!==Ic.None){if(r.type===Ic.Hue)return;o.b=r.value/100}return a.type!==Ic.None&&(o.alpha=Math.min(1,Math.max(0,a.type===Ic.Number?a.value:a.value/100))),o}var md,fd,gd,_d,vd,bd,yd=kt(()=>{Qc()}),wd=kt(()=>{ud(),dd(),yd(),vh(),lh(),sh(),kh(),Ch(),md={mode:"hwb",toMode:{rgb:cd},fromMode:{rgb:hd},channels:["h","w","b","alpha"],ranges:{h:[0,360]},gamut:"rgb",parse:[pd],serialize:t=>`hwb(${void 0!==t.h?t.h:"none"} ${void 0!==t.w?100*t.w+"%":"none"} ${void 0!==t.b?100*t.b+"%":"none"}${t.alpha<1?` / ${t.alpha}`:""})`,interpolate:{h:{use:ru,fixup:wu},w:ru,b:ru,alpha:{use:ru,fixup:au}},difference:{h:Iu},average:{h:Pu}}}),kd=kt(()=>{});function Cd(t){if(t<0)return 0;const e=Math.pow(t,1/gd);return 1e4*Math.pow(Math.max(0,e-_d)/(vd-bd*e),1/fd)}function $d(t){if(t<0)return 0;const e=Math.pow(t/1e4,fd);return Math.pow((_d+vd*e)/(1+bd*e),gd)}var Ed,xd,Ad,Sd,Td,Md,Id,zd,Pd,Nd,Od,Bd,Ld,Dd,jd,Hd,Rd,Ud,Vd,Fd,Gd,Kd,Yd,qd,Wd,Xd,Zd,Jd,Qd=kt(()=>{fd=.1593017578125,gd=78.84375,_d=.8359375,vd=18.8515625,bd=18.6875}),tp=kt(()=>{kd(),Qd(),Ed=t=>Math.max(t/203,0),xd=({i:t,t:e,p:o,alpha:i})=>{void 0===t&&(t=0),void 0===e&&(e=0),void 0===o&&(o=0);const n=Cd(t+.008609037037932761*e+.11102962500302593*o),r=Cd(t-.00860903703793275*e-.11102962500302599*o),a=Cd(t+.5600313357106791*e-.32062717498731885*o),s={mode:"xyz65",x:Ed(2.070152218389422*n-1.3263473389671556*r+.2066510476294051*a),y:Ed(.3647385209748074*n+.680566024947227*r-.0453045459220346*a),z:Ed(-.049747207535812*n-.0492609666966138*r+1.1880659249923042*a)};return void 0!==i&&(s.alpha=i),s}}),ep=kt(()=>{kd(),Qd(),Ad=(t=0)=>Math.max(203*t,0),Sd=({x:t,y:e,z:o,alpha:i})=>{const n=Ad(t),r=Ad(e),a=Ad(o),s=$d(.3592832590121217*n+.6976051147779502*r-.0358915932320289*a),l=$d(-.1920808463704995*n+1.1004767970374323*r+.0753748658519118*a),c=$d(.0070797844607477*n+.0748396662186366*r+.8433265453898765*a),u={mode:"itp",i:.5*s+.5*l,t:1.61376953125*s-3.323486328125*l+1.709716796875*c,p:4.378173828125*s-4.24560546875*l-.132568359375*c};return void 0!==i&&(u.alpha=i),u}}),op=kt(()=>{sh(),lh(),tp(),ep(),ph(),fh(),Td={mode:"itp",channels:["i","t","p","alpha"],parse:["--ictcp"],serialize:"--ictcp",toMode:{xyz65:xd,rgb:t=>_u(xd(t))},fromMode:{xyz65:Sd,rgb:t=>Sd(mu(t))},ranges:{i:[0,.581],t:[-.369,.272],p:[-.164,.331]},interpolate:{i:ru,t:ru,p:ru,alpha:{use:ru,fixup:au}}}}),ip=kt(()=>{Qd(),Md=t=>{if(t<0)return 0;let e=Math.pow(t/1e4,fd);return Math.pow((_d+vd*e)/(1+bd*e),134.03437499999998)},Id=(t=0)=>Math.max(203*t,0),zd=({x:t,y:e,z:o,alpha:i})=>{t=Id(t),e=Id(e);let n=1.15*t-.15*(o=Id(o)),r=.66*e+.34*t,a=Md(.41478972*n+.579999*r+.014648*o),s=Md(-.20151*n+1.120649*r+.0531008*o),l=Md(-.0166008*n+.2648*r+.6684799*o),c=(a+s)/2,u={mode:"jab",j:.44*c/(1-.56*c)-16295499532821565e-27,a:3.524*a-4.066708*s+.542708*l,b:.199076*a+1.096799*s-1.295875*l};return void 0!==i&&(u.alpha=i),u}}),np=kt(()=>{Qd(),Pd=16295499532821565e-27,Nd=t=>{if(t<0)return 0;let e=Math.pow(t,.007460772656268216);return 1e4*Math.pow((_d-e)/(bd*e-vd),1/fd)},Od=t=>t/203,Bd=({j:t,a:e,b:o,alpha:i})=>{void 0===t&&(t=0),void 0===e&&(e=0),void 0===o&&(o=0);let n=(t+Pd)/(.44+.56*(t+Pd)),r=Nd(n+.13860504*e+.058047316*o),a=Nd(n-.13860504*e-.058047316*o),s=Nd(n-.096019242*e-.8118919*o),l={mode:"xyz65",x:Od(1.661373024652174*r-.914523081304348*a+.23136208173913045*s),y:Od(-.3250758611844533*r+1.571847026732543*a-.21825383453227928*s),z:Od(-.090982811*r-.31272829*a+1.5227666*s)};return void 0!==i&&(l.alpha=i),l}}),rp=kt(()=>{ip(),ph(),Ld=t=>{let e=zd(mu(t));return t.r===t.b&&t.b===t.g&&(e.a=e.b=0),e}}),ap=kt(()=>{fh(),np(),Dd=t=>_u(Bd(t))}),sp=kt(()=>{ip(),np(),rp(),ap(),sh(),lh(),jd={mode:"jab",channels:["j","a","b","alpha"],parse:["--jzazbz"],serialize:"--jzazbz",fromMode:{rgb:Ld,xyz65:zd},toMode:{rgb:Dd,xyz65:Bd},ranges:{j:[0,.222],a:[-.109,.129],b:[-.185,.134]},interpolate:{j:ru,a:ru,b:ru,alpha:{use:ru,fixup:au}}}}),lp=kt(()=>{_h(),Hd=({j:t,a:e,b:o,alpha:i})=>{void 0===e&&(e=0),void 0===o&&(o=0);let n=Math.sqrt(e*e+o*o),r={mode:"jch",j:t,c:n};return n&&(r.h=bu(180*Math.atan2(o,e)/Math.PI)),void 0!==i&&(r.alpha=i),r}}),cp=kt(()=>{Rd=({j:t,c:e,h:o,alpha:i})=>{void 0===o&&(o=0);let n={mode:"jab",j:t,a:e?e*Math.cos(o/180*Math.PI):0,b:e?e*Math.sin(o/180*Math.PI):0};return void 0!==i&&(n.alpha=i),n}}),up=kt(()=>{lp(),cp(),ap(),rp(),vh(),lh(),sh(),kh(),Ch(),Ud={mode:"jch",parse:["--jzczhz"],serialize:"--jzczhz",toMode:{jab:Rd,rgb:t=>Dd(Rd(t))},fromMode:{rgb:t=>Hd(Ld(t)),jab:Hd},channels:["j","c","h","alpha"],ranges:{j:[0,.221],c:[0,.19],h:[0,360]},interpolate:{h:{use:ru,fixup:wu},c:ru,j:ru,alpha:{use:ru,fixup:au}},difference:{h:zu},average:{h:Pu}}}),hp=kt(()=>{Vd=Math.pow(29,3)/Math.pow(3,3),Fd=Math.pow(6,3)/Math.pow(29,3)}),dp=kt(()=>{hp(),Sh(),Gd=t=>Math.pow(t,3)>Fd?Math.pow(t,3):(116*t-16)/Vd,Kd=({l:t,a:e,b:o,alpha:i})=>{void 0===t&&(t=0),void 0===e&&(e=0),void 0===o&&(o=0);let n=(t+16)/116,r=n-o/200,a={mode:"xyz50",x:Gd(e/500+n)*ju.X,y:Gd(n)*ju.Y,z:Gd(r)*ju.Z};return void 0!==i&&(a.alpha=i),a}}),pp=kt(()=>{mh(),Yd=({x:t,y:e,z:o,alpha:i})=>{void 0===t&&(t=0),void 0===e&&(e=0),void 0===o&&(o=0);let n=gu({r:3.1341359569958707*t-1.6173863321612538*e-.4906619460083532*o,g:-.978795502912089*t+1.916254567259524*e+.03344273116131949*o,b:.07195537988411677*t-.2289768264158322*e+1.405386058324125*o});return void 0!==i&&(n.alpha=i),n}}),mp=kt(()=>{dp(),pp(),qd=t=>Yd(Kd(t))}),fp=kt(()=>{dh(),Wd=t=>{let{r:e,g:o,b:i,alpha:n}=pu(t),r={mode:"xyz50",x:.436065742824811*e+.3851514688337912*o+.14307845442264197*i,y:.22249319175623702*e+.7168870538238823*o+.06061979053616537*i,z:.013923904500943465*e+.09708128566574634*o+.7140993584005155*i};return void 0!==n&&(r.alpha=n),r}}),gp=kt(()=>{hp(),Sh(),Xd=t=>t>Fd?Math.cbrt(t):(Vd*t+16)/116,Zd=({x:t,y:e,z:o,alpha:i})=>{void 0===t&&(t=0),void 0===e&&(e=0),void 0===o&&(o=0);let n=Xd(t/ju.X),r=Xd(e/ju.Y),a={mode:"lab",l:116*r-16,a:500*(n-r),b:200*(r-Xd(o/ju.Z))};return void 0!==i&&(a.alpha=i),a}}),_p=kt(()=>{fp(),gp(),Jd=t=>{let e=Zd(Wd(t));return t.r===t.b&&t.b===t.g&&(e.a=e.b=0),e}});function vp(t,e){if(!e||"lab"!==e[0])return;const o={mode:"lab"},[,i,n,r,a]=e;return i.type!==Ic.Hue&&n.type!==Ic.Hue&&r.type!==Ic.Hue?(i.type!==Ic.None&&(o.l=Math.min(Math.max(0,i.value),100)),n.type!==Ic.None&&(o.a=n.type===Ic.Number?n.value:125*n.value/100),r.type!==Ic.None&&(o.b=r.type===Ic.Number?r.value:125*r.value/100),a.type!==Ic.None&&(o.alpha=Math.min(1,Math.max(0,a.type===Ic.Number?a.value:a.value/100))),o):void 0}var bp,yp,wp=kt(()=>{Qc()}),kp=kt(()=>{mp(),dp(),_p(),gp(),wp(),sh(),lh(),bp={mode:"lab",toMode:{xyz50:Kd,rgb:qd},fromMode:{xyz50:Zd,rgb:Jd},channels:["l","a","b","alpha"],ranges:{l:[0,100],a:[-125,125],b:[-125,125]},parse:[vp],serialize:t=>`lab(${void 0!==t.l?t.l:"none"} ${void 0!==t.a?t.a:"none"} ${void 0!==t.b?t.b:"none"}${t.alpha<1?` / ${t.alpha}`:""})`,interpolate:{l:ru,a:ru,b:ru,alpha:{use:ru,fixup:au}}}}),Cp=kt(()=>{Mh(),Th(),zh(),Ih(),kp(),oe(),yp=ee(ee({},bp),{},{mode:"lab65",parse:["--lab-d65"],serialize:"--lab-d65",toMode:{xyz65:Uu,rgb:Vu},fromMode:{xyz65:Gu,rgb:Ku},ranges:{l:[0,100],a:[-125,125],b:[-125,125]}})});function $p(t,e){if(!e||"lch"!==e[0])return;const o={mode:"lch"},[,i,n,r,a]=e;if(i.type!==Ic.None){if(i.type===Ic.Hue)return;o.l=Math.min(Math.max(0,i.value),100)}if(n.type!==Ic.None&&(o.c=Math.max(0,n.type===Ic.Number?n.value:150*n.value/100)),r.type!==Ic.None){if(r.type===Ic.Percentage)return;o.h=r.value}return a.type!==Ic.None&&(o.alpha=Math.min(1,Math.max(0,a.type===Ic.Number?a.value:a.value/100))),o}var Ep,xp,Ap,Sp,Tp,Mp,Ip,zp,Pp,Np,Op,Bp,Lp,Dp,jp,Hp,Rp,Up,Vp,Fp,Gp,Kp,Yp,qp,Wp=kt(()=>{Qc()}),Xp=kt(()=>{Eh(),xh(),mp(),_p(),Wp(),vh(),lh(),sh(),kh(),Ch(),Ep={mode:"lch",toMode:{lab:Bu,rgb:t=>qd(Bu(t))},fromMode:{rgb:t=>Ou(Jd(t)),lab:Ou},channels:["l","c","h","alpha"],ranges:{l:[0,100],c:[0,150],h:[0,360]},parse:[$p],serialize:t=>`lch(${void 0!==t.l?t.l:"none"} ${void 0!==t.c?t.c:"none"} ${void 0!==t.h?t.h:"none"}${t.alpha<1?` / ${t.alpha}`:""})`,interpolate:{h:{use:ru,fixup:wu},c:ru,l:ru,alpha:{use:ru,fixup:au}},difference:{h:zu},average:{h:Pu}}}),Zp=kt(()=>{Eh(),xh(),Mh(),zh(),Xp(),oe(),xp=ee(ee({},Ep),{},{mode:"lch65",parse:["--lch-d65"],serialize:"--lch-d65",toMode:{lab65:t=>Bu(t,"lab65"),rgb:t=>Vu(Bu(t,"lab65"))},fromMode:{rgb:t=>Ou(Ku(t),"lch65"),lab65:t=>Ou(t,"lch65")},ranges:{l:[0,100],c:[0,150],h:[0,360]}})}),Jp=kt(()=>{_h(),Ap=({l:t,u:e,v:o,alpha:i})=>{void 0===e&&(e=0),void 0===o&&(o=0);let n=Math.sqrt(e*e+o*o),r={mode:"lchuv",l:t,c:n};return n&&(r.h=bu(180*Math.atan2(o,e)/Math.PI)),void 0!==i&&(r.alpha=i),r}}),Qp=kt(()=>{Sp=({l:t,c:e,h:o,alpha:i})=>{void 0===o&&(o=0);let n={mode:"luv",l:t,u:e?e*Math.cos(o/180*Math.PI):0,v:e?e*Math.sin(o/180*Math.PI):0};return void 0!==i&&(n.alpha=i),n}}),tm=kt(()=>{hp(),Sh(),Tp=(t,e,o)=>4*t/(t+15*e+3*o),Mp=(t,e,o)=>9*e/(t+15*e+3*o),Ip=Tp(ju.X,ju.Y,ju.Z),zp=Mp(ju.X,ju.Y,ju.Z),Pp=t=>t<=Fd?Vd*t:116*Math.cbrt(t)-16,Np=({x:t,y:e,z:o,alpha:i})=>{void 0===t&&(t=0),void 0===e&&(e=0),void 0===o&&(o=0);let n=Pp(e/ju.Y),r=Tp(t,e,o),a=Mp(t,e,o);isFinite(r)&&isFinite(a)?(r=13*n*(r-Ip),a=13*n*(a-zp)):n=r=a=0;let s={mode:"luv",l:n,u:r,v:a};return void 0!==i&&(s.alpha=i),s}}),em=kt(()=>{hp(),Sh(),Op=(t,e,o)=>4*t/(t+15*e+3*o),Bp=(t,e,o)=>9*e/(t+15*e+3*o),Lp=Op(ju.X,ju.Y,ju.Z),Dp=Bp(ju.X,ju.Y,ju.Z),jp=({l:t,u:e,v:o,alpha:i})=>{if(void 0===t&&(t=0),0===t)return{mode:"xyz50",x:0,y:0,z:0};void 0===e&&(e=0),void 0===o&&(o=0);let n=e/(13*t)+Lp,r=o/(13*t)+Dp,a=ju.Y*(t<=8?t/Vd:Math.pow((t+16)/116,3)),s={mode:"xyz50",x:a*(9*n)/(4*r),y:a,z:a*(12-3*n-20*r)/(4*r)};return void 0!==i&&(s.alpha=i),s}}),om=kt(()=>{Jp(),Qp(),tm(),em(),pp(),fp(),vh(),lh(),sh(),kh(),Ch(),Hp=t=>Ap(Np(Wd(t))),Rp=t=>Yd(jp(Sp(t))),Up={mode:"lchuv",toMode:{luv:Sp,rgb:Rp},fromMode:{rgb:Hp,luv:Ap},channels:["l","c","h","alpha"],parse:["--lchuv"],serialize:"--lchuv",ranges:{l:[0,100],c:[0,176.956],h:[0,360]},interpolate:{h:{use:ru,fixup:wu},c:ru,l:ru,alpha:{use:ru,fixup:au}},difference:{h:zu},average:{h:Pu}}}),im=kt(()=>{ch(),dh(),mh(),oe(),Vp=ee(ee({},su),{},{mode:"lrgb",toMode:{rgb:gu},fromMode:{rgb:pu},parse:["srgb-linear"],serialize:"srgb-linear"})}),nm=kt(()=>{tm(),em(),pp(),fp(),sh(),lh(),Fp={mode:"luv",toMode:{xyz50:jp,rgb:t=>Yd(jp(t))},fromMode:{xyz50:Np,rgb:t=>Np(Wd(t))},channels:["l","u","v","alpha"],parse:["--luv"],serialize:"--luv",ranges:{l:[0,100],u:[-84.936,175.042],v:[-125.882,87.243]},interpolate:{l:ru,u:ru,v:ru,alpha:{use:ru,fixup:au}}}}),rm=kt(()=>{Gp=({r:t,g:e,b:o,alpha:i})=>{void 0===t&&(t=0),void 0===e&&(e=0),void 0===o&&(o=0);let n=Math.cbrt(.412221469470763*t+.5363325372617348*e+.0514459932675022*o),r=Math.cbrt(.2119034958178252*t+.6806995506452344*e+.1073969535369406*o),a=Math.cbrt(.0883024591900564*t+.2817188391361215*e+.6299787016738222*o),s={mode:"oklab",l:.210454268309314*n+.7936177747023054*r-.0040720430116193*a,a:1.9779985324311684*n-2.42859224204858*r+.450593709617411*a,b:.0259040424655478*n+.7827717124575296*r-.8086757549230774*a};return void 0!==i&&(s.alpha=i),s}}),am=kt(()=>{dh(),rm(),Kp=t=>{let e=Gp(pu(t));return t.r===t.b&&t.b===t.g&&(e.a=e.b=0),e}}),sm=kt(()=>{Yp=({l:t,a:e,b:o,alpha:i})=>{void 0===t&&(t=0),void 0===e&&(e=0),void 0===o&&(o=0);let n=Math.pow(t+.3963377773761749*e+.2158037573099136*o,3),r=Math.pow(t-.1055613458156586*e-.0638541728258133*o,3),a=Math.pow(t-.0894841775298119*e-1.2914855480194092*o,3),s={mode:"lrgb",r:4.076741636075957*n-3.3077115392580616*r+.2309699031821044*a,g:-1.2684379732850317*n+2.6097573492876887*r-.3413193760026573*a,b:-.0041960761386756*n-.7034186179359362*r+1.7076146940746117*a};return void 0!==i&&(s.alpha=i),s}}),lm=kt(()=>{mh(),sm(),qp=t=>gu(Yp(t))});function cm(t){const e=.206,o=1.206/1.03;return.5*(o*t-e+Math.sqrt((o*t-e)*(o*t-e)+.12*o*t))}function um(t){return(t*t+.206*t)/(1.206/1.03*(t+.03))}function hm(t,e){let o=function(t,e){let o,i,n,r,a,s,l,c;-1.88170328*t-.80936493*e>1?(o=1.19086277,i=1.76576728,n=.59662641,r=.75515197,a=.56771245,s=4.0767416621,l=-3.3077115913,c=.2309699292):1.81444104*t-1.19445276*e>1?(o=.73956515,i=-.45954404,n=.08285427,r=.1254107,a=.14503204,s=-1.2684380046,l=2.6097574011,c=-.3413193965):(o=1.35733652,i=-.00915799,n=-1.1513021,r=-.50559606,a=.00692167,s=-.0041960863,l=-.7034186147,c=1.707614701);let u=o+i*t+n*e+r*t*t+a*t*e,h=.3963377774*t+.2158037573*e,d=-.1055613458*t-.0638541728*e,p=-.0894841775*t-1.291485548*e;{let t=1+u*h,e=1+u*d,o=1+u*p,i=s*(t*t*t)+l*(e*e*e)+c*(o*o*o),n=s*(3*h*t*t)+l*(3*d*e*e)+c*(3*p*o*o);u-=i*n/(n*n-.5*i*(s*(6*h*h*t)+l*(6*d*d*e)+c*(6*p*p*o)))}return u}(t,e),i=Yp({l:1,a:o*t,b:o*e}),n=Math.cbrt(1/Math.max(i.r,i.g,i.b));return[n,n*o]}function dm(t,e,o=null){o||(o=hm(t,e));let i=o[0],n=o[1];return[n/i,n/(1-i)]}function pm(t,e,o){let i=hm(e,o),n=function(t,e,o,i,n,r=null){let a;if(r||(r=hm(t,e)),(o-n)*r[1]-(r[0]-n)*i<=0)a=r[1]*n/(i*r[0]+r[1]*(n-o));else{a=r[1]*(n-1)/(i*(r[0]-1)+r[1]*(n-o));{let r=o-n,s=.3963377774*t+.2158037573*e,l=-.1055613458*t-.0638541728*e,c=-.0894841775*t-1.291485548*e,u=r+i*s,h=r+i*l,d=r+i*c;{let t=n*(1-a)+a*o,e=a*i,r=t+e*s,p=t+e*l,m=t+e*c,f=r*r*r,g=p*p*p,_=m*m*m,v=3*u*r*r,b=3*h*p*p,y=3*d*m*m,w=6*u*u*r,k=6*h*h*p,C=6*d*d*m,$=4.0767416621*f-3.3077115913*g+.2309699292*_-1,E=4.0767416621*v-3.3077115913*b+.2309699292*y,x=E/(E*E-.5*$*(4.0767416621*w-3.3077115913*k+.2309699292*C)),A=-$*x,S=-1.2684380046*f+2.6097574011*g-.3413193965*_-1,T=-1.2684380046*v+2.6097574011*b-.3413193965*y,M=T/(T*T-.5*S*(-1.2684380046*w+2.6097574011*k-.3413193965*C)),I=-S*M,z=-.0041960863*f-.7034186147*g+1.707614701*_-1,P=-.0041960863*v-.7034186147*b+1.707614701*y,N=P/(P*P-.5*z*(-.0041960863*w-.7034186147*k+1.707614701*C)),O=-z*N;A=x>=0?A:1e6,I=M>=0?I:1e6,O=N>=0?O:1e6,a+=Math.min(A,Math.min(I,O))}}}return a}(e,o,t,1,t,i),r=dm(e,o,i),a=t*(.11516993+1/(7.4477897+4.1590124*o+e*(1.75198401*o-2.19557347+e*(-2.13704948-10.02301043*o+e*(5.38770819*o-4.24894561+4.69891013*e))))),s=(1-t)*(.11239642+1/(1.6132032-.68124379*o+e*(.40370612+.90148123*o+e*(.6122399*o-.27087943+e*(.00299215-.45399568*o-.14661872*e))))),l=.9*(n/Math.min(t*r[0],(1-t)*r[1]))*Math.sqrt(Math.sqrt(1/(1/(a*a*a*a)+1/(s*s*s*s))));return a=.4*t,s=.8*(1-t),[Math.sqrt(1/(1/(a*a)+1/(s*s))),l,n]}var mm=kt(()=>{sm()});function fm(t){const e=void 0!==t.l?t.l:0,o=void 0!==t.a?t.a:0,i=void 0!==t.b?t.b:0,n={mode:"okhsl",l:cm(e)};void 0!==t.alpha&&(n.alpha=t.alpha);let r=Math.sqrt(o*o+i*i);if(!r)return n.s=0,n;let a,[s,l,c]=pm(e,o/r,i/r);if(r{_h(),mm()});function _m(t){let e=void 0!==t.h?t.h:0,o=void 0!==t.s?t.s:0,i=void 0!==t.l?t.l:0;const n={mode:"oklab",l:um(i)};if(void 0!==t.alpha&&(n.alpha=t.alpha),!o||1===i)return n.a=n.b=0,n;let r,a,s,l,c=Math.cos(e/180*Math.PI),u=Math.sin(e/180*Math.PI),[h,d,p]=pm(n.l,c,u);o<.8?(r=1.25*o,a=0,s=.8*h,l=1-s/d):(r=5*(o-.8),a=d,s=.2*d*d*1.25*1.25/h,l=1-s/(p-d));let m=a+r*s/(1-l*r);return n.a=m*c,n.b=m*u,n}var vm,bm=kt(()=>{mm()}),ym=kt(()=>{am(),lm(),gm(),bm(),od(),oe(),vm=ee(ee({},td),{},{mode:"okhsl",channels:["h","s","l","alpha"],parse:["--okhsl"],serialize:"--okhsl",fromMode:{oklab:fm,rgb:t=>fm(Kp(t))},toMode:{oklab:_m,rgb:t=>qp(_m(t))}})});function wm(t){let e=void 0!==t.l?t.l:0,o=void 0!==t.a?t.a:0,i=void 0!==t.b?t.b:0,n=Math.sqrt(o*o+i*i),r=n?o/n:1,a=n?i/n:1,[s,l]=dm(r,a),c=1-.5/s,u=l/(n+e*l),h=u*e,d=u*n,p=um(h),m=d*p/h,f=Yp({l:p,a:r*m,b:a*m}),g=Math.cbrt(1/Math.max(f.r,f.g,f.b,0));e/=g,n=n/g*cm(e)/e,e=cm(e);const _={mode:"okhsv",s:n?(.5+l)*d/(.5*l+l*c*d):0,v:e?e/h:0};return _.s&&(_.h=bu(180*Math.atan2(i,o)/Math.PI)),void 0!==t.alpha&&(_.alpha=t.alpha),_}var km=kt(()=>{_h(),sm(),mm()});function Cm(t){const e={mode:"oklab"};void 0!==t.alpha&&(e.alpha=t.alpha);const o=void 0!==t.h?t.h:0,i=void 0!==t.s?t.s:0,n=void 0!==t.v?t.v:0,r=Math.cos(o/180*Math.PI),a=Math.sin(o/180*Math.PI),[s,l]=dm(r,a),c=.5,u=1-c/s,h=1-i*c/(c+l-l*u*i),d=i*l*c/(c+l-l*u*i),p=um(h),m=d*p/h,f=Yp({l:p,a:r*m,b:a*m}),g=Math.cbrt(1/Math.max(f.r,f.g,f.b,0)),_=um(n*h),v=d*_/h;return e.l=_*g,e.a=v*r*g,e.b=v*a*g,e}var $m,Em=kt(()=>{sm(),mm()}),xm=kt(()=>{am(),lm(),km(),Em(),ld(),oe(),$m=ee(ee({},ad),{},{mode:"okhsv",channels:["h","s","v","alpha"],parse:["--okhsv"],serialize:"--okhsv",fromMode:{oklab:wm,rgb:t=>wm(Kp(t))},toMode:{oklab:Cm,rgb:t=>qp(Cm(t))}})});function Am(t,e){if(!e||"oklab"!==e[0])return;const o={mode:"oklab"},[,i,n,r,a]=e;return i.type!==Ic.Hue&&n.type!==Ic.Hue&&r.type!==Ic.Hue?(i.type!==Ic.None&&(o.l=Math.min(Math.max(0,i.type===Ic.Number?i.value:i.value/100),1)),n.type!==Ic.None&&(o.a=n.type===Ic.Number?n.value:.4*n.value/100),r.type!==Ic.None&&(o.b=r.type===Ic.Number?r.value:.4*r.value/100),a.type!==Ic.None&&(o.alpha=Math.min(1,Math.max(0,a.type===Ic.Number?a.value:a.value/100))),o):void 0}var Sm,Tm=kt(()=>{Qc()}),Mm=kt(()=>{sm(),rm(),am(),lm(),Tm(),kp(),oe(),Sm=ee(ee({},bp),{},{mode:"oklab",toMode:{lrgb:Yp,rgb:qp},fromMode:{lrgb:Gp,rgb:Kp},ranges:{l:[0,1],a:[-.4,.4],b:[-.4,.4]},parse:[Am],serialize:t=>`oklab(${void 0!==t.l?t.l:"none"} ${void 0!==t.a?t.a:"none"} ${void 0!==t.b?t.b:"none"}${t.alpha<1?` / ${t.alpha}`:""})`})});function Im(t,e){if(!e||"oklch"!==e[0])return;const o={mode:"oklch"},[,i,n,r,a]=e;if(i.type!==Ic.None){if(i.type===Ic.Hue)return;o.l=Math.min(Math.max(0,i.type===Ic.Number?i.value:i.value/100),1)}if(n.type!==Ic.None&&(o.c=Math.max(0,n.type===Ic.Number?n.value:.4*n.value/100)),r.type!==Ic.None){if(r.type===Ic.Percentage)return;o.h=r.value}return a.type!==Ic.None&&(o.alpha=Math.min(1,Math.max(0,a.type===Ic.Number?a.value:a.value/100))),o}var zm,Pm,Nm,Om,Bm,Lm,Dm,jm,Hm,Rm,Um,Vm,Fm,Gm,Km,Ym,qm,Wm,Xm,Zm,Jm,Qm,tf,ef,of,nf,rf,af,sf,lf,cf,uf,hf,df,pf,mf=kt(()=>{Qc()}),ff=kt(()=>{Xp(),Eh(),xh(),lm(),am(),mf(),oe(),zm=ee(ee({},Ep),{},{mode:"oklch",toMode:{oklab:t=>Bu(t,"oklab"),rgb:t=>qp(Bu(t,"oklab"))},fromMode:{rgb:t=>Ou(Kp(t),"oklch"),oklab:t=>Ou(t,"oklch")},parse:[Im],serialize:t=>`oklch(${void 0!==t.l?t.l:"none"} ${void 0!==t.c?t.c:"none"} ${void 0!==t.h?t.h:"none"}${t.alpha<1?` / ${t.alpha}`:""})`,ranges:{l:[0,1],c:[0,.4],h:[0,360]}})}),gf=kt(()=>{dh(),Pm=t=>{let{r:e,g:o,b:i,alpha:n}=pu(t),r={mode:"xyz65",x:.486570948648216*e+.265667693169093*o+.1982172852343625*i,y:.2289745640697487*e+.6917385218365062*o+.079286914093745*i,z:0*e+.0451133818589026*o+1.043944368900976*i};return void 0!==n&&(r.alpha=n),r}}),_f=kt(()=>{mh(),Nm=({x:t,y:e,z:o,alpha:i})=>{void 0===t&&(t=0),void 0===e&&(e=0),void 0===o&&(o=0);let n=gu({r:2.4934969119414263*t-.9313836179191242*e-.402710784450717*o,g:-.8294889695615749*t+1.7626640603183465*e+.0236246858419436*o,b:.0358458302437845*t-.0761723892680418*e+.9568845240076871*o},"p3");return void 0!==i&&(n.alpha=i),n}}),vf=kt(()=>{ch(),gf(),_f(),ph(),fh(),oe(),Om=ee(ee({},su),{},{mode:"p3",parse:["display-p3"],serialize:"display-p3",fromMode:{rgb:t=>Nm(mu(t)),xyz65:Nm},toMode:{rgb:t=>_u(Pm(t)),xyz65:Pm}})}),bf=kt(()=>{Bm=t=>{let e=Math.abs(t);return e>=1/512?Math.sign(t)*Math.pow(e,1/1.8):16*t},Lm=({x:t,y:e,z:o,alpha:i})=>{void 0===t&&(t=0),void 0===e&&(e=0),void 0===o&&(o=0);let n={mode:"prophoto",r:Bm(1.3457868816471585*t-.2555720873797946*e-.0511018649755453*o),g:Bm(-.5446307051249019*t+1.5082477428451466*e+.0205274474364214*o),b:Bm(0*t+0*e+1.2119675456389452*o)};return void 0!==i&&(n.alpha=i),n}}),yf=kt(()=>{Dm=(t=0)=>{let e=Math.abs(t);return e>=16/512?Math.sign(t)*Math.pow(e,1.8):t/16},jm=t=>{let e=Dm(t.r),o=Dm(t.g),i=Dm(t.b),n={mode:"xyz50",x:.7977666449006423*e+.1351812974005331*o+.0313477341283922*i,y:.2880748288194013*e+.7118352342418731*o+899369387256e-16*i,z:0*e+0*o+.8251046025104602*i};return void 0!==t.alpha&&(n.alpha=t.alpha),n}}),wf=kt(()=>{ch(),bf(),yf(),pp(),fp(),oe(),Hm=ee(ee({},su),{},{mode:"prophoto",parse:["prophoto-rgb"],serialize:"prophoto-rgb",fromMode:{xyz50:Lm,rgb:t=>Lm(Wd(t))},toMode:{xyz50:jm,rgb:t=>Yd(jm(t))}})}),kf=kt(()=>{Rm=1.09929682680944,Um=t=>{const e=Math.abs(t);return e>.018053968510807?(Math.sign(t)||1)*(Rm*Math.pow(e,.45)-(Rm-1)):4.5*t},Vm=({x:t,y:e,z:o,alpha:i})=>{void 0===t&&(t=0),void 0===e&&(e=0),void 0===o&&(o=0);let n={mode:"rec2020",r:Um(1.7166511879712683*t-.3556707837763925*e-.2533662813736599*o),g:Um(-.6666843518324893*t+1.6164812366349395*e+.0157685458139111*o),b:Um(.0176398574453108*t-.0427706132578085*e+.9421031212354739*o)};return void 0!==i&&(n.alpha=i),n}}),Cf=kt(()=>{Fm=1.09929682680944,Gm=(t=0)=>{let e=Math.abs(t);return e<.08124285829863151?t/4.5:(Math.sign(t)||1)*Math.pow((e+Fm-1)/Fm,1/.45)},Km=t=>{let e=Gm(t.r),o=Gm(t.g),i=Gm(t.b),n={mode:"xyz65",x:.6369580483012911*e+.1446169035862083*o+.1688809751641721*i,y:.262700212011267*e+.6779980715188708*o+.059301716469862*i,z:0*e+.0280726930490874*o+1.0609850577107909*i};return void 0!==t.alpha&&(n.alpha=t.alpha),n}}),$f=kt(()=>{ch(),kf(),Cf(),ph(),fh(),oe(),Ym=ee(ee({},su),{},{mode:"rec2020",fromMode:{xyz65:Vm,rgb:t=>Vm(mu(t))},toMode:{xyz65:Km,rgb:t=>_u(Km(t))},parse:["rec2020"],serialize:"rec2020"})}),Ef=kt(()=>{qm=.0037930732552754493,Wm=Math.cbrt(qm)}),xf=kt(()=>{dh(),Ef(),Xm=t=>Math.cbrt(t)-Wm,Zm=t=>{const{r:e,g:o,b:i,alpha:n}=pu(t),r=Xm(.3*e+.622*o+.078*i+qm),a=Xm(.23*e+.692*o+.078*i+qm),s={mode:"xyb",x:(r-a)/2,y:(r+a)/2,b:Xm(.2434226892454782*e+.2047674442449682*o+.5518098665095535*i+qm)-(r+a)/2};return void 0!==n&&(s.alpha=n),s}}),Af=kt(()=>{mh(),Ef(),Jm=t=>Math.pow(t+Wm,3),Qm=({x:t,y:e,b:o,alpha:i})=>{void 0===t&&(t=0),void 0===e&&(e=0),void 0===o&&(o=0);const n=Jm(t+e)-qm,r=Jm(e-t)-qm,a=Jm(o+e)-qm,s=gu({r:11.031566904639861*n-9.866943908131562*r-.16462299650829934*a,g:-3.2541473810744237*n+4.418770377582723*r-.16462299650829934*a,b:-3.6588512867136815*n+2.7129230459360922*r+1.9459282407775895*a});return void 0!==i&&(s.alpha=i),s}}),Sf=kt(()=>{sh(),lh(),xf(),Af(),tf={mode:"xyb",channels:["x","y","b","alpha"],parse:["--xyb"],serialize:"--xyb",toMode:{rgb:Qm},fromMode:{rgb:Zm},ranges:{x:[-.0154,.0281],y:[0,.8453],b:[-.2778,.388]},interpolate:{x:ru,y:ru,b:ru,alpha:{use:ru,fixup:au}}}}),Tf=kt(()=>{pp(),gp(),fp(),dp(),sh(),lh(),ef={mode:"xyz50",parse:["xyz-d50"],serialize:"xyz-d50",toMode:{rgb:Yd,lab:Zd},fromMode:{rgb:Wd,lab:Kd},channels:["x","y","z","alpha"],ranges:{x:[0,.964],y:[0,.999],z:[0,.825]},interpolate:{x:ru,y:ru,z:ru,alpha:{use:ru,fixup:au}}}}),Mf=kt(()=>{of=t=>{let{x:e,y:o,z:i,alpha:n}=t;void 0===e&&(e=0),void 0===o&&(o=0),void 0===i&&(i=0);let r={mode:"xyz50",x:1.0479298208405488*e+.0229467933410191*o-.0501922295431356*i,y:.0296278156881593*e+.990434484573249*o-.0170738250293851*i,z:-.0092430581525912*e+.0150551448965779*o+.7518742899580008*i};return void 0!==n&&(r.alpha=n),r}}),If=kt(()=>{nf=t=>{let{x:e,y:o,z:i,alpha:n}=t;void 0===e&&(e=0),void 0===o&&(o=0),void 0===i&&(i=0);let r={mode:"xyz65",x:.9554734527042182*e-.0230985368742614*o+.0632593086610217*i,y:-.0283697069632081*e+1.0099954580058226*o+.021041398966943*i,z:.0123140016883199*e-.0205076964334779*o+1.3303659366080753*i};return void 0!==n&&(r.alpha=n),r}}),zf=kt(()=>{fh(),ph(),Mf(),If(),sh(),lh(),rf={mode:"xyz65",toMode:{rgb:_u,xyz50:of},fromMode:{rgb:mu,xyz50:nf},ranges:{x:[0,.95],y:[0,1],z:[0,1.088]},channels:["x","y","z","alpha"],parse:["xyz","xyz-d65"],serialize:"xyz-d65",interpolate:{x:ru,y:ru,z:ru,alpha:{use:ru,fixup:au}}}}),Pf=kt(()=>{af=({r:t,g:e,b:o,alpha:i})=>{void 0===t&&(t=0),void 0===e&&(e=0),void 0===o&&(o=0);const n={mode:"yiq",y:.29889531*t+.58662247*e+.11448223*o,i:.59597799*t-.2741761*e-.32180189*o,q:.21147017*t-.52261711*e+.31114694*o};return void 0!==i&&(n.alpha=i),n}}),Nf=kt(()=>{sf=({y:t,i:e,q:o,alpha:i})=>{void 0===t&&(t=0),void 0===e&&(e=0),void 0===o&&(o=0);const n={mode:"rgb",r:t+.95608445*e+.6208885*o,g:t-.27137664*e-.6486059*o,b:t-1.10561724*e+1.70250126*o};return void 0!==i&&(n.alpha=i),n}}),Of=kt(()=>{Pf(),Nf(),sh(),lh(),lf={mode:"yiq",toMode:{rgb:sf},fromMode:{rgb:af},channels:["y","i","q","alpha"],parse:["--yiq"],serialize:"--yiq",ranges:{i:[-.595,.595],q:[-.522,.522]},interpolate:{y:ru,i:ru,q:ru,alpha:{use:ru,fixup:au}}}}),Bf=kt(()=>{gh(),$h(),Bh(),Lh(),Vh(),od(),ld(),wd(),op(),sp(),up(),kp(),Cp(),Xp(),Zp(),om(),im(),nm(),ym(),xm(),Mm(),ff(),vf(),wf(),$f(),ch(),Sf(),Tf(),zf(),Of(),Gc(),Fc(),Vc(),Dc(),vh(),lh(),Ch(),sh(),ah(),rh(),kh(),oe(),Qc(),ed(),yd(),wp(),Wp(),jc(),nh(),Hc(),ih(),Jh(),Uc(),Tm(),mf(),uh(),wh(),Nh(),jh(),Gh(),nd(),ud(),tp(),lp(),ap(),np(),cp(),Oh(),Mh(),Th(),Eh(),mp(),dp(),xh(),Qp(),rm(),mh(),Jp(),em(),bm(),Em(),sm(),gm(),km(),lm(),gf(),yf(),Cf(),yh(),Uh(),Xh(),sd(),dd(),rp(),_p(),zh(),dh(),am(),xf(),fp(),ph(),Pf(),Af(),gp(),tm(),bf(),pp(),If(),hh(),ep(),ip(),Ih(),_f(),kf(),fh(),Mf(),Nf(),xc(vu),xc(Nu),xc(eh),xc(oh),xc(Rh),xc(td),cf=xc(ad),xc(md),xc(Td),xc(jd),xc(Ud),xc(bp),xc(yp),xc(Ep),xc(xp),xc(Up),xc(Vp),xc(Fp),xc(vm),xc($m),xc(Sm),xc(zm),xc(Om),xc(Hm),xc(Ym),uf=xc(su),xc(tf),xc(ef),xc(rf),xc(lf)});function Lf(t){if("primary"===t||"accent"===t)return`var(--rgb-${t}-color)`;if(hf.includes(t))return`var(--rgb-${t})`;if(t.startsWith("#"))try{const e=uf(t);if(e){const{r:t,g:o,b:i}=e;return`${Math.round(255*t)}, ${Math.round(255*o)}, ${Math.round(255*i)}`}return""}catch(e){return""}return t}var Df,jf,Hf,Rf=kt(()=>{Bf(),Vt(),hf=["primary","accent","red","pink","purple","deep-purple","indigo","blue","light-blue","cyan","teal","green","light-green","lime","yellow","amber","orange","deep-orange","brown","light-grey","grey","dark-grey","blue-grey","black","white","disabled"],df=l` + `}},gn([Gt()],rc.prototype,"picture_url",void 0),rc=gn([Lt("mushroom-shape-avatar")],rc)}),Dc=kt(()=>{ac=(t,e)=>{if("number"==typeof t)return 3===e?{mode:"rgb",r:(t>>8&15|t>>4&240)/255,g:(t>>4&15|240&t)/255,b:(15&t|t<<4&240)/255}:4===e?{mode:"rgb",r:(t>>12&15|t>>8&240)/255,g:(t>>8&15|t>>4&240)/255,b:(t>>4&15|240&t)/255,alpha:(15&t|t<<4&240)/255}:6===e?{mode:"rgb",r:(t>>16&255)/255,g:(t>>8&255)/255,b:(255&t)/255}:8===e?{mode:"rgb",r:(t>>24&255)/255,g:(t>>16&255)/255,b:(t>>8&255)/255,alpha:(255&t)/255}:void 0}}),jc=kt(()=>{sc={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074}}),Hc=kt(()=>{Dc(),jc(),lc=t=>ac(sc[t.toLowerCase()],6)}),Rc=kt(()=>{Dc(),cc=/^#?([0-9a-f]{8}|[0-9a-f]{6}|[0-9a-f]{4}|[0-9a-f]{3})$/i,uc=t=>{let e;return(e=t.match(cc))?ac(parseInt(e[1],16),e[1].length):void 0}}),Uc=kt(()=>{`(?:${hc="([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)"}|none)`,dc=`${hc}%`,pc=`(?:${hc}%|${hc})`,mc=`(?:${hc}%|${hc}|none)`,fc=`(?:${hc}(deg|grad|rad|turn)|${hc})`,gc="\\s*,\\s*",new RegExp("^"+mc+"$")}),Vc=kt(()=>{Uc(),_c=new RegExp(`^rgba?\\(\\s*${hc}${gc}${hc}${gc}${hc}\\s*(?:,\\s*${pc}\\s*)?\\)$`),vc=new RegExp(`^rgba?\\(\\s*${dc}${gc}${dc}${gc}${dc}\\s*(?:,\\s*${pc}\\s*)?\\)$`),bc=t=>{let e,o={mode:"rgb"};if(e=t.match(_c))void 0!==e[1]&&(o.r=e[1]/255),void 0!==e[2]&&(o.g=e[2]/255),void 0!==e[3]&&(o.b=e[3]/255);else{if(!(e=t.match(vc)))return;void 0!==e[1]&&(o.r=e[1]/100),void 0!==e[2]&&(o.g=e[2]/100),void 0!==e[3]&&(o.b=e[3]/100)}return void 0!==e[4]?o.alpha=Math.max(0,Math.min(1,e[4]/100)):void 0!==e[5]&&(o.alpha=Math.max(0,Math.min(1,+e[5]))),o}}),Fc=kt(()=>{tu(),oe(),yc=(t,e)=>void 0===t?void 0:"object"!=typeof t?Oc(t):void 0!==t.mode?t:e?ee(ee({},t),{},{mode:e}):void 0}),Gc=kt(()=>{Kc(),Fc(),wc=(t="rgb")=>e=>void 0!==(e=yc(e,t))?e.mode===t?e:kc[e.mode][t]?kc[e.mode][t](e):"rgb"===t?kc[e.mode].rgb(e):kc.rgb[t](kc[e.mode].rgb(e)):void 0}),Kc=kt(()=>{Gc(),oe(),kc={},Cc={},$c=[],Ec={},xc=t=>t,Ac=t=>(kc[t.mode]=ee(ee({},kc[t.mode]),t.toMode),Object.keys(t.fromMode||{}).forEach(e=>{kc[e]||(kc[e]={}),kc[e][t.mode]=t.fromMode[e]}),t.ranges||(t.ranges={}),t.difference||(t.difference={}),t.channels.forEach(e=>{if(void 0===t.ranges[e]&&(t.ranges[e]=[0,1]),!t.interpolate[e])throw new Error(`Missing interpolator for: ${e}`);"function"==typeof t.interpolate[e]&&(t.interpolate[e]={use:t.interpolate[e]}),t.interpolate[e].fixup||(t.interpolate[e].fixup=xc)}),Cc[t.mode]=t,(t.parse||[]).forEach(e=>{Tc(e,t.mode)}),wc(t.mode)),Sc=t=>Cc[t],Tc=(t,e)=>{if("string"==typeof t){if(!e)throw new Error("'mode' required when 'parser' is a string");Ec[t]=e}else"function"==typeof t&&$c.indexOf(t)<0&&$c.push(t)}});function Yc(t){let e=t[Pc],o=t[Pc+1];return"-"===e||"+"===e?/\d/.test(o)||"."===o&&/\d/.test(t[Pc+2]):/\d/.test("."===e?o:e)}function qc(t){if(Pc>=t.length)return!1;let e=t[Pc];if(Mc.test(e))return!0;if("-"===e){if(t.length-Pc<2)return!1;let e=t[Pc+1];return!("-"!==e&&!Mc.test(e))}return!1}function Wc(t){let e="";if("-"!==t[Pc]&&"+"!==t[Pc]||(e+=t[Pc++]),e+=Xc(t),"."===t[Pc]&&/\d/.test(t[Pc+1])&&(e+=t[Pc++]+Xc(t)),"e"!==t[Pc]&&"E"!==t[Pc]||("-"!==t[Pc+1]&&"+"!==t[Pc+1]||!/\d/.test(t[Pc+2])?/\d/.test(t[Pc+1])&&(e+=t[Pc++]+Xc(t)):e+=t[Pc++]+t[Pc++]+Xc(t)),qc(t)){let o=Zc(t);return"deg"===o||"rad"===o||"turn"===o||"grad"===o?{type:zc.Hue,value:e*Nc[o]}:void 0}return"%"===t[Pc]?(Pc++,{type:zc.Percentage,value:+e}):{type:zc.Number,value:+e}}function Xc(t){let e="";for(;/\d/.test(t[Pc]);)e+=t[Pc++];return e}function Zc(t){let e="";for(;Pc4)){if(4===o.length){if(o[3].type!==zc.Alpha)return;o[3]=o[3].value}return 3===o.length&&o.push({type:zc.None,value:void 0}),o.every(t=>t.type!==zc.Alpha)?o:void 0}}var tu=kt(()=>{Kc(),Mc=/[^\x00-\x7F]|[a-zA-Z_]/,Ic=/[^\x00-\x7F]|[-\w]/,zc={Function:"function",Ident:"ident",Number:"number",Percentage:"percentage",ParenClose:")",None:"none",Hue:"hue",Alpha:"alpha"},Pc=0,Nc={deg:1,rad:180/Math.PI,grad:.9,turn:360},Oc=t=>{if("string"!=typeof t)return;const e=function(t=""){let e,o=t.trim(),i=[];for(Pc=0;Pc{tu()}),rh=kt(()=>{ou=t=>"transparent"===t?{mode:"rgb",r:0,g:0,b:0,alpha:0}:void 0}),ah=kt(()=>{iu=(t,e,o)=>t+o*(e-t)}),sh=kt(()=>{nu=t=>{let e=[];for(let o=0;oe=>{let o=nu(e);return e=>{let i=e*o.length,n=e>=1?o.length-1:Math.max(Math.floor(i),0),r=o[n];return void 0===r?void 0:t(r[0],r[1],i-n)}}}),lh=kt(()=>{ah(),sh(),au=ru(iu)}),ch=kt(()=>{su=t=>{let e=!1,o=t.map(t=>void 0!==t?(e=!0,t):1);return e?o:t}}),uh=kt(()=>{Hc(),Rc(),Vc(),nh(),rh(),lh(),ch(),lu={mode:"rgb",channels:["r","g","b","alpha"],parse:[eu,uc,bc,lc,ou,"srgb"],serialize:"srgb",interpolate:{r:au,g:au,b:au,alpha:{use:au,fixup:su}},gamut:!0,white:{r:1,g:1,b:1},black:{r:0,g:0,b:0}}}),hh=kt(()=>{cu=(t=0)=>Math.pow(Math.abs(t),563/256)*Math.sign(t),uu=t=>{let e=cu(t.r),o=cu(t.g),i=cu(t.b),n={mode:"xyz65",x:.5766690429101305*e+.1855582379065463*o+.1882286462349947*i,y:.297344975250536*e+.6273635662554661*o+.0752914584939979*i,z:.0270313613864123*e+.0706888525358272*o+.9913375368376386*i};return void 0!==t.alpha&&(n.alpha=t.alpha),n}}),dh=kt(()=>{hu=t=>Math.pow(Math.abs(t),256/563)*Math.sign(t),du=({x:t,y:e,z:o,alpha:i})=>{void 0===t&&(t=0),void 0===e&&(e=0),void 0===o&&(o=0);let n={mode:"a98",r:hu(2.0415879038107465*t-.5650069742788597*e-.3447313507783297*o),g:hu(-.9692436362808798*t+1.8759675015077206*e+.0415550574071756*o),b:hu(.0134442806320312*t-.1183623922310184*e+1.0151749943912058*o)};return void 0!==i&&(n.alpha=i),n}}),ph=kt(()=>{pu=(t=0)=>{const e=Math.abs(t);return e<=.04045?t/12.92:(Math.sign(t)||1)*Math.pow((e+.055)/1.055,2.4)},mu=({r:t,g:e,b:o,alpha:i})=>{let n={mode:"lrgb",r:pu(t),g:pu(e),b:pu(o)};return void 0!==i&&(n.alpha=i),n}}),mh=kt(()=>{ph(),fu=t=>{let{r:e,g:o,b:i,alpha:n}=mu(t),r={mode:"xyz65",x:.4123907992659593*e+.357584339383878*o+.1804807884018343*i,y:.2126390058715102*e+.715168678767756*o+.0721923153607337*i,z:.0193308187155918*e+.119194779794626*o+.9505321522496607*i};return void 0!==n&&(r.alpha=n),r}}),fh=kt(()=>{gu=(t=0)=>{const e=Math.abs(t);return e>.0031308?(Math.sign(t)||1)*(1.055*Math.pow(e,1/2.4)-.055):12.92*t},_u=({r:t,g:e,b:o,alpha:i},n="rgb")=>{let r={mode:n,r:gu(t),g:gu(e),b:gu(o)};return void 0!==i&&(r.alpha=i),r}}),gh=kt(()=>{fh(),vu=({x:t,y:e,z:o,alpha:i})=>{void 0===t&&(t=0),void 0===e&&(e=0),void 0===o&&(o=0);let n=_u({r:3.2409699419045226*t-1.537383177570094*e-.4986107602930034*o,g:-.9692436362808796*t+1.8759675015077204*e+.0415550574071756*o,b:.0556300796969936*t-.2039769588889765*e+1.0569715142428784*o});return void 0!==i&&(n.alpha=i),n}}),_h=kt(()=>{uh(),hh(),dh(),mh(),gh(),oe(),bu=ee(ee({},lu),{},{mode:"a98",parse:["a98-rgb"],serialize:"a98-rgb",fromMode:{rgb:t=>du(fu(t)),xyz65:du},toMode:{rgb:t=>vu(uu(t)),xyz65:uu}})}),vh=kt(()=>{yu=t=>(t%=360)<0?t+360:t}),bh=kt(()=>{vh(),wu=(t,e)=>t.map((o,i,n)=>{if(void 0===o)return o;let r=yu(o);return 0===i||void 0===t[i-1]?r:e(r-yu(n[i-1]))}).reduce((t,e)=>t.length&&void 0!==e&&void 0!==t[t.length-1]?(t.push(e+t[t.length-1]),t):(t.push(e),t),[]),ku=t=>wu(t,t=>Math.abs(t)<=180?t:t-360*Math.sign(t))}),yh=kt(()=>{Cu=[-.14861,1.78277,-.29227,-.90649,1.97294,0],$u=Math.PI/180,Eu=180/Math.PI}),wh=kt(()=>{yh(),xu=Cu[3]*Cu[4],Au=Cu[1]*Cu[4],Su=Cu[1]*Cu[2]-Cu[0]*Cu[3],Tu=({r:t,g:e,b:o,alpha:i})=>{void 0===t&&(t=0),void 0===e&&(e=0),void 0===o&&(o=0);let n=(Su*o+t*xu-e*Au)/(Su+xu-Au),r=o-n,a=(Cu[4]*(e-n)-Cu[2]*r)/Cu[3],s={mode:"cubehelix",l:n,s:0===n||1===n?void 0:Math.sqrt(r*r+a*a)/(Cu[4]*n*(1-n))};return s.s&&(s.h=Math.atan2(a,r)*Eu-120),void 0!==i&&(s.alpha=i),s}}),kh=kt(()=>{yh(),Mu=({h:t,s:e,l:o,alpha:i})=>{let n={mode:"rgb"};t=(void 0===t?0:t+120)*$u,void 0===o&&(o=0);let r=void 0===e?0:e*o*(1-o),a=Math.cos(t),s=Math.sin(t);return n.r=o+r*(Cu[0]*a+Cu[1]*s),n.g=o+r*(Cu[2]*a+Cu[3]*s),n.b=o+r*(Cu[4]*a+Cu[5]*s),void 0!==i&&(n.alpha=i),n}}),Ch=kt(()=>{vh(),Iu=(t,e)=>{if(void 0===t.h||void 0===e.h||!t.s||!e.s)return 0;let o=yu(t.h),i=yu(e.h),n=Math.sin((i-o+360)/2*Math.PI/180);return 2*Math.sqrt(t.s*e.s)*n},zu=(t,e)=>{if(void 0===t.h||void 0===e.h)return 0;let o=yu(t.h),i=yu(e.h);return Math.abs(i-o)>180?o-(i-360*Math.sign(i-o)):i-o},Pu=(t,e)=>{if(void 0===t.h||void 0===e.h||!t.c||!e.c)return 0;let o=yu(t.h),i=yu(e.h),n=Math.sin((i-o+360)/2*Math.PI/180);return 2*Math.sqrt(t.c*e.c)*n}}),$h=kt(()=>{Nu=t=>{let e=t.reduce((t,e)=>{if(void 0!==e){let o=e*Math.PI/180;t.sin+=Math.sin(o),t.cos+=Math.cos(o)}return t},{sin:0,cos:0}),o=180*Math.atan2(e.sin,e.cos)/Math.PI;return o<0?360+o:o}}),Eh=kt(()=>{bh(),ch(),lh(),wh(),kh(),Ch(),$h(),Ou={mode:"cubehelix",channels:["h","s","l","alpha"],parse:["--cubehelix"],serialize:"--cubehelix",ranges:{h:[0,360],s:[0,4.614],l:[0,1]},fromMode:{rgb:Tu},toMode:{rgb:Mu},interpolate:{h:{use:au,fixup:ku},s:au,l:au,alpha:{use:au,fixup:su}},difference:{h:Iu},average:{h:Nu}}}),xh=kt(()=>{vh(),Bu=({l:t,a:e,b:o,alpha:i},n="lch")=>{void 0===e&&(e=0),void 0===o&&(o=0);let r=Math.sqrt(e*e+o*o),a={mode:n,l:t,c:r};return r&&(a.h=yu(180*Math.atan2(o,e)/Math.PI)),void 0!==i&&(a.alpha=i),a}}),Ah=kt(()=>{Lu=({l:t,c:e,h:o,alpha:i},n="lab")=>{void 0===o&&(o=0);let r={mode:n,l:t,a:e?e*Math.cos(o/180*Math.PI):0,b:e?e*Math.sin(o/180*Math.PI):0};return void 0!==i&&(r.alpha=i),r}}),Sh=kt(()=>{Du=Math.pow(29,3)/Math.pow(3,3),ju=Math.pow(6,3)/Math.pow(29,3)}),Th=kt(()=>{Hu={X:.3457/.3585,Y:1,Z:.2958/.3585},Ru={X:.3127/.329,Y:1,Z:.3583/.329},Math.pow(29,3)/Math.pow(3,3),Math.pow(6,3)/Math.pow(29,3)}),Mh=kt(()=>{Sh(),Th(),Uu=t=>Math.pow(t,3)>ju?Math.pow(t,3):(116*t-16)/Du,Vu=({l:t,a:e,b:o,alpha:i})=>{void 0===t&&(t=0),void 0===e&&(e=0),void 0===o&&(o=0);let n=(t+16)/116,r=n-o/200,a={mode:"xyz65",x:Uu(e/500+n)*Ru.X,y:Uu(n)*Ru.Y,z:Uu(r)*Ru.Z};return void 0!==i&&(a.alpha=i),a}}),Ih=kt(()=>{Mh(),gh(),Fu=t=>vu(Vu(t))}),zh=kt(()=>{Sh(),Th(),Gu=t=>t>ju?Math.cbrt(t):(Du*t+16)/116,Ku=({x:t,y:e,z:o,alpha:i})=>{void 0===t&&(t=0),void 0===e&&(e=0),void 0===o&&(o=0);let n=Gu(t/Ru.X),r=Gu(e/Ru.Y),a={mode:"lab65",l:116*r-16,a:500*(n-r),b:200*(r-Gu(o/Ru.Z))};return void 0!==i&&(a.alpha=i),a}}),Ph=kt(()=>{mh(),zh(),Yu=t=>{let e=Ku(fu(t));return t.r===t.b&&t.b===t.g&&(e.a=e.b=0),e}}),Nh=kt(()=>{qu=26/180*Math.PI,Wu=Math.cos(qu),Xu=Math.sin(qu),Zu=100/Math.log(1.39)}),Oh=kt(()=>{Nh(),Ju=({l:t,c:e,h:o,alpha:i})=>{void 0===t&&(t=0),void 0===e&&(e=0),void 0===o&&(o=0);let n={mode:"lab65",l:(Math.exp(1*t/Zu)-1)/.0039},r=(Math.exp(.0435*e*1*1)-1)/.075,a=r*Math.cos(o/180*Math.PI-qu),s=r*Math.sin(o/180*Math.PI-qu);return n.a=a*Wu-s/.83*Xu,n.b=a*Xu+s/.83*Wu,void 0!==i&&(n.alpha=i),n}}),Bh=kt(()=>{Nh(),vh(),Qu=({l:t,a:e,b:o,alpha:i})=>{void 0===t&&(t=0),void 0===e&&(e=0),void 0===o&&(o=0);let n=e*Wu+o*Xu,r=.83*(o*Wu-e*Xu),a=Math.sqrt(n*n+r*r),s={mode:"dlch",l:Zu/1*Math.log(1+.0039*t),c:Math.log(1+.075*a)/.0435};return s.c&&(s.h=yu((Math.atan2(r,n)+qu)/Math.PI*180)),void 0!==i&&(s.alpha=i),s}}),Lh=kt(()=>{xh(),Ah(),Ih(),Ph(),Oh(),Bh(),lh(),ch(),th=t=>Ju(Bu(t,"dlch")),eh=t=>Lu(Qu(t),"dlab"),oh={mode:"dlab",parse:["--din99o-lab"],serialize:"--din99o-lab",toMode:{lab65:th,rgb:t=>Fu(th(t))},fromMode:{lab65:eh,rgb:t=>eh(Yu(t))},channels:["l","a","b","alpha"],ranges:{l:[0,100],a:[-40.09,45.501],b:[-40.469,44.344]},interpolate:{l:au,a:au,b:au,alpha:{use:au,fixup:su}}}}),Dh=kt(()=>{xh(),Ah(),Oh(),Bh(),Ih(),Ph(),bh(),ch(),lh(),Ch(),$h(),ih={mode:"dlch",parse:["--din99o-lch"],serialize:"--din99o-lch",toMode:{lab65:Ju,dlab:t=>Lu(t,"dlab"),rgb:t=>Fu(Ju(t))},fromMode:{lab65:Qu,dlab:t=>Bu(t,"dlch"),rgb:t=>Qu(Yu(t))},channels:["l","c","h","alpha"],ranges:{l:[0,100],c:[0,51.484],h:[0,360]},interpolate:{l:au,c:au,h:{use:au,fixup:ku},alpha:{use:au,fixup:su}},difference:{h:Pu},average:{h:Nu}}});function jh({h:t,s:e,i:o,alpha:i}){t=yu(void 0!==t?t:0),void 0===e&&(e=0),void 0===o&&(o=0);let n,r=Math.abs(t/60%2-1);switch(Math.floor(t/60)){case 0:n={r:o*(1+e*(3/(2-r)-1)),g:o*(1+e*(3*(1-r)/(2-r)-1)),b:o*(1-e)};break;case 1:n={r:o*(1+e*(3*(1-r)/(2-r)-1)),g:o*(1+e*(3/(2-r)-1)),b:o*(1-e)};break;case 2:n={r:o*(1-e),g:o*(1+e*(3/(2-r)-1)),b:o*(1+e*(3*(1-r)/(2-r)-1))};break;case 3:n={r:o*(1-e),g:o*(1+e*(3*(1-r)/(2-r)-1)),b:o*(1+e*(3/(2-r)-1))};break;case 4:n={r:o*(1+e*(3*(1-r)/(2-r)-1)),g:o*(1-e),b:o*(1+e*(3/(2-r)-1))};break;case 5:n={r:o*(1+e*(3/(2-r)-1)),g:o*(1-e),b:o*(1+e*(3*(1-r)/(2-r)-1))};break;default:n={r:o*(1-e),g:o*(1-e),b:o*(1-e)}}return n.mode="rgb",void 0!==i&&(n.alpha=i),n}var Hh=kt(()=>{vh()});function Rh({r:t,g:e,b:o,alpha:i}){void 0===t&&(t=0),void 0===e&&(e=0),void 0===o&&(o=0);let n=Math.max(t,e,o),r=Math.min(t,e,o),a={mode:"hsi",s:t+e+o===0?0:1-3*r/(t+e+o),i:(t+e+o)/3};return n-r!==0&&(a.h=60*(n===t?(e-o)/(n-r)+6*(e{}),Fh=kt(()=>{Hh(),Vh(),bh(),ch(),lh(),Ch(),$h(),Uh={mode:"hsi",toMode:{rgb:jh},parse:["--hsi"],serialize:"--hsi",fromMode:{rgb:Rh},channels:["h","s","i","alpha"],ranges:{h:[0,360]},gamut:"rgb",interpolate:{h:{use:au,fixup:ku},s:au,i:au,alpha:{use:au,fixup:su}},difference:{h:Iu},average:{h:Nu}}});function Gh({h:t,s:e,l:o,alpha:i}){t=yu(void 0!==t?t:0),void 0===e&&(e=0),void 0===o&&(o=0);let n,r=o+e*(o<.5?o:1-o),a=r-2*(r-o)*Math.abs(t/60%2-1);switch(Math.floor(t/60)){case 0:n={r:r,g:a,b:2*o-r};break;case 1:n={r:a,g:r,b:2*o-r};break;case 2:n={r:2*o-r,g:r,b:a};break;case 3:n={r:2*o-r,g:a,b:r};break;case 4:n={r:a,g:2*o-r,b:r};break;case 5:n={r:r,g:2*o-r,b:a};break;default:n={r:2*o-r,g:2*o-r,b:2*o-r}}return n.mode="rgb",void 0!==i&&(n.alpha=i),n}var Kh=kt(()=>{vh()});function Yh({r:t,g:e,b:o,alpha:i}){void 0===t&&(t=0),void 0===e&&(e=0),void 0===o&&(o=0);let n=Math.max(t,e,o),r=Math.min(t,e,o),a={mode:"hsl",s:n===r?0:(n-r)/(1-Math.abs(n+r-1)),l:.5*(n+r)};return n-r!==0&&(a.h=60*(n===t?(e-o)/(n-r)+6*(e{}),Jh=kt(()=>{qh=(t,e)=>{switch(e){case"deg":return+t;case"rad":return t/Math.PI*180;case"grad":return t/10*9;case"turn":return 360*t}}}),Qh=kt(()=>{Jh(),Uc(),Wh=new RegExp(`^hsla?\\(\\s*${fc}${gc}${dc}${gc}${dc}\\s*(?:,\\s*${pc}\\s*)?\\)$`),Xh=t=>{let e=t.match(Wh);if(!e)return;let o={mode:"hsl"};return void 0!==e[3]?o.h=+e[3]:void 0!==e[1]&&void 0!==e[2]&&(o.h=qh(e[1],e[2])),void 0!==e[4]&&(o.s=Math.min(Math.max(0,e[4]/100),1)),void 0!==e[5]&&(o.l=Math.min(Math.max(0,e[5]/100),1)),void 0!==e[6]?o.alpha=Math.max(0,Math.min(1,e[6]/100)):void 0!==e[7]&&(o.alpha=Math.max(0,Math.min(1,+e[7]))),o}});function td(t,e){if(!e||"hsl"!==e[0]&&"hsla"!==e[0])return;const o={mode:"hsl"},[,i,n,r,a]=e;if(i.type!==zc.None){if(i.type===zc.Percentage)return;o.h=i.value}if(n.type!==zc.None){if(n.type===zc.Hue)return;o.s=n.value/100}if(r.type!==zc.None){if(r.type===zc.Hue)return;o.l=r.value/100}return a.type!==zc.None&&(o.alpha=Math.min(1,Math.max(0,a.type===zc.Number?a.value:a.value/100))),o}var ed,od=kt(()=>{tu()}),id=kt(()=>{Kh(),Zh(),Qh(),od(),bh(),ch(),lh(),Ch(),$h(),ed={mode:"hsl",toMode:{rgb:Gh},fromMode:{rgb:Yh},channels:["h","s","l","alpha"],ranges:{h:[0,360]},gamut:"rgb",parse:[td,Xh],serialize:t=>`hsl(${void 0!==t.h?t.h:"none"} ${void 0!==t.s?100*t.s+"%":"none"} ${void 0!==t.l?100*t.l+"%":"none"}${t.alpha<1?` / ${t.alpha}`:""})`,interpolate:{h:{use:au,fixup:ku},s:au,l:au,alpha:{use:au,fixup:su}},difference:{h:Iu},average:{h:Nu}}});function nd({h:t,s:e,v:o,alpha:i}){t=yu(void 0!==t?t:0),void 0===e&&(e=0),void 0===o&&(o=0);let n,r=Math.abs(t/60%2-1);switch(Math.floor(t/60)){case 0:n={r:o,g:o*(1-e*r),b:o*(1-e)};break;case 1:n={r:o*(1-e*r),g:o,b:o*(1-e)};break;case 2:n={r:o*(1-e),g:o,b:o*(1-e*r)};break;case 3:n={r:o*(1-e),g:o*(1-e*r),b:o};break;case 4:n={r:o*(1-e*r),g:o*(1-e),b:o};break;case 5:n={r:o,g:o*(1-e),b:o*(1-e*r)};break;default:n={r:o*(1-e),g:o*(1-e),b:o*(1-e)}}return n.mode="rgb",void 0!==i&&(n.alpha=i),n}var rd=kt(()=>{vh()});function ad({r:t,g:e,b:o,alpha:i}){void 0===t&&(t=0),void 0===e&&(e=0),void 0===o&&(o=0);let n=Math.max(t,e,o),r=Math.min(t,e,o),a={mode:"hsv",s:0===n?0:1-r/n,v:n};return n-r!==0&&(a.h=60*(n===t?(e-o)/(n-r)+6*(e{}),cd=kt(()=>{rd(),ld(),bh(),ch(),lh(),Ch(),$h(),sd={mode:"hsv",toMode:{rgb:nd},parse:["--hsv"],serialize:"--hsv",fromMode:{rgb:ad},channels:["h","s","v","alpha"],ranges:{h:[0,360]},gamut:"rgb",interpolate:{h:{use:au,fixup:ku},s:au,v:au,alpha:{use:au,fixup:su}},difference:{h:Iu},average:{h:Nu}}});function ud({h:t,w:e,b:o,alpha:i}){if(void 0===e&&(e=0),void 0===o&&(o=0),e+o>1){let t=e+o;e/=t,o/=t}return nd({h:t,s:1===o?1:1-e/(1-o),v:1-o,alpha:i})}var hd=kt(()=>{rd()});function dd(t){let e=ad(t);if(void 0===e)return;let o=void 0!==e.s?e.s:0,i=void 0!==e.v?e.v:0,n={mode:"hwb",w:(1-o)*i,b:1-i};return void 0!==e.h&&(n.h=e.h),void 0!==e.alpha&&(n.alpha=e.alpha),n}var pd=kt(()=>{ld()});function md(t,e){if(!e||"hwb"!==e[0])return;const o={mode:"hwb"},[,i,n,r,a]=e;if(i.type!==zc.None){if(i.type===zc.Percentage)return;o.h=i.value}if(n.type!==zc.None){if(n.type===zc.Hue)return;o.w=n.value/100}if(r.type!==zc.None){if(r.type===zc.Hue)return;o.b=r.value/100}return a.type!==zc.None&&(o.alpha=Math.min(1,Math.max(0,a.type===zc.Number?a.value:a.value/100))),o}var fd,gd,_d,vd,bd,yd,wd=kt(()=>{tu()}),kd=kt(()=>{hd(),pd(),wd(),bh(),ch(),lh(),Ch(),$h(),fd={mode:"hwb",toMode:{rgb:ud},fromMode:{rgb:dd},channels:["h","w","b","alpha"],ranges:{h:[0,360]},gamut:"rgb",parse:[md],serialize:t=>`hwb(${void 0!==t.h?t.h:"none"} ${void 0!==t.w?100*t.w+"%":"none"} ${void 0!==t.b?100*t.b+"%":"none"}${t.alpha<1?` / ${t.alpha}`:""})`,interpolate:{h:{use:au,fixup:ku},w:au,b:au,alpha:{use:au,fixup:su}},difference:{h:zu},average:{h:Nu}}}),Cd=kt(()=>{});function $d(t){if(t<0)return 0;const e=Math.pow(t,1/_d);return 1e4*Math.pow(Math.max(0,e-vd)/(bd-yd*e),1/gd)}function Ed(t){if(t<0)return 0;const e=Math.pow(t/1e4,gd);return Math.pow((vd+bd*e)/(1+yd*e),_d)}var xd,Ad,Sd,Td,Md,Id,zd,Pd,Nd,Od,Bd,Ld,Dd,jd,Hd,Rd,Ud,Vd,Fd,Gd,Kd,Yd,qd,Wd,Xd,Zd,Jd,Qd,tp=kt(()=>{gd=.1593017578125,_d=78.84375,vd=.8359375,bd=18.8515625,yd=18.6875}),ep=kt(()=>{Cd(),tp(),xd=t=>Math.max(t/203,0),Ad=({i:t,t:e,p:o,alpha:i})=>{void 0===t&&(t=0),void 0===e&&(e=0),void 0===o&&(o=0);const n=$d(t+.008609037037932761*e+.11102962500302593*o),r=$d(t-.00860903703793275*e-.11102962500302599*o),a=$d(t+.5600313357106791*e-.32062717498731885*o),s={mode:"xyz65",x:xd(2.070152218389422*n-1.3263473389671556*r+.2066510476294051*a),y:xd(.3647385209748074*n+.680566024947227*r-.0453045459220346*a),z:xd(-.049747207535812*n-.0492609666966138*r+1.1880659249923042*a)};return void 0!==i&&(s.alpha=i),s}}),op=kt(()=>{Cd(),tp(),Sd=(t=0)=>Math.max(203*t,0),Td=({x:t,y:e,z:o,alpha:i})=>{const n=Sd(t),r=Sd(e),a=Sd(o),s=Ed(.3592832590121217*n+.6976051147779502*r-.0358915932320289*a),l=Ed(-.1920808463704995*n+1.1004767970374323*r+.0753748658519118*a),c=Ed(.0070797844607477*n+.0748396662186366*r+.8433265453898765*a),u={mode:"itp",i:.5*s+.5*l,t:1.61376953125*s-3.323486328125*l+1.709716796875*c,p:4.378173828125*s-4.24560546875*l-.132568359375*c};return void 0!==i&&(u.alpha=i),u}}),ip=kt(()=>{lh(),ch(),ep(),op(),mh(),gh(),Md={mode:"itp",channels:["i","t","p","alpha"],parse:["--ictcp"],serialize:"--ictcp",toMode:{xyz65:Ad,rgb:t=>vu(Ad(t))},fromMode:{xyz65:Td,rgb:t=>Td(fu(t))},ranges:{i:[0,.581],t:[-.369,.272],p:[-.164,.331]},interpolate:{i:au,t:au,p:au,alpha:{use:au,fixup:su}}}}),np=kt(()=>{tp(),Id=t=>{if(t<0)return 0;let e=Math.pow(t/1e4,gd);return Math.pow((vd+bd*e)/(1+yd*e),134.03437499999998)},zd=(t=0)=>Math.max(203*t,0),Pd=({x:t,y:e,z:o,alpha:i})=>{t=zd(t),e=zd(e);let n=1.15*t-.15*(o=zd(o)),r=.66*e+.34*t,a=Id(.41478972*n+.579999*r+.014648*o),s=Id(-.20151*n+1.120649*r+.0531008*o),l=Id(-.0166008*n+.2648*r+.6684799*o),c=(a+s)/2,u={mode:"jab",j:.44*c/(1-.56*c)-16295499532821565e-27,a:3.524*a-4.066708*s+.542708*l,b:.199076*a+1.096799*s-1.295875*l};return void 0!==i&&(u.alpha=i),u}}),rp=kt(()=>{tp(),Nd=16295499532821565e-27,Od=t=>{if(t<0)return 0;let e=Math.pow(t,.007460772656268216);return 1e4*Math.pow((vd-e)/(yd*e-bd),1/gd)},Bd=t=>t/203,Ld=({j:t,a:e,b:o,alpha:i})=>{void 0===t&&(t=0),void 0===e&&(e=0),void 0===o&&(o=0);let n=(t+Nd)/(.44+.56*(t+Nd)),r=Od(n+.13860504*e+.058047316*o),a=Od(n-.13860504*e-.058047316*o),s=Od(n-.096019242*e-.8118919*o),l={mode:"xyz65",x:Bd(1.661373024652174*r-.914523081304348*a+.23136208173913045*s),y:Bd(-.3250758611844533*r+1.571847026732543*a-.21825383453227928*s),z:Bd(-.090982811*r-.31272829*a+1.5227666*s)};return void 0!==i&&(l.alpha=i),l}}),ap=kt(()=>{np(),mh(),Dd=t=>{let e=Pd(fu(t));return t.r===t.b&&t.b===t.g&&(e.a=e.b=0),e}}),sp=kt(()=>{gh(),rp(),jd=t=>vu(Ld(t))}),lp=kt(()=>{np(),rp(),ap(),sp(),lh(),ch(),Hd={mode:"jab",channels:["j","a","b","alpha"],parse:["--jzazbz"],serialize:"--jzazbz",fromMode:{rgb:Dd,xyz65:Pd},toMode:{rgb:jd,xyz65:Ld},ranges:{j:[0,.222],a:[-.109,.129],b:[-.185,.134]},interpolate:{j:au,a:au,b:au,alpha:{use:au,fixup:su}}}}),cp=kt(()=>{vh(),Rd=({j:t,a:e,b:o,alpha:i})=>{void 0===e&&(e=0),void 0===o&&(o=0);let n=Math.sqrt(e*e+o*o),r={mode:"jch",j:t,c:n};return n&&(r.h=yu(180*Math.atan2(o,e)/Math.PI)),void 0!==i&&(r.alpha=i),r}}),up=kt(()=>{Ud=({j:t,c:e,h:o,alpha:i})=>{void 0===o&&(o=0);let n={mode:"jab",j:t,a:e?e*Math.cos(o/180*Math.PI):0,b:e?e*Math.sin(o/180*Math.PI):0};return void 0!==i&&(n.alpha=i),n}}),hp=kt(()=>{cp(),up(),sp(),ap(),bh(),ch(),lh(),Ch(),$h(),Vd={mode:"jch",parse:["--jzczhz"],serialize:"--jzczhz",toMode:{jab:Ud,rgb:t=>jd(Ud(t))},fromMode:{rgb:t=>Rd(Dd(t)),jab:Rd},channels:["j","c","h","alpha"],ranges:{j:[0,.221],c:[0,.19],h:[0,360]},interpolate:{h:{use:au,fixup:ku},c:au,j:au,alpha:{use:au,fixup:su}},difference:{h:Pu},average:{h:Nu}}}),dp=kt(()=>{Fd=Math.pow(29,3)/Math.pow(3,3),Gd=Math.pow(6,3)/Math.pow(29,3)}),pp=kt(()=>{dp(),Th(),Kd=t=>Math.pow(t,3)>Gd?Math.pow(t,3):(116*t-16)/Fd,Yd=({l:t,a:e,b:o,alpha:i})=>{void 0===t&&(t=0),void 0===e&&(e=0),void 0===o&&(o=0);let n=(t+16)/116,r=n-o/200,a={mode:"xyz50",x:Kd(e/500+n)*Hu.X,y:Kd(n)*Hu.Y,z:Kd(r)*Hu.Z};return void 0!==i&&(a.alpha=i),a}}),mp=kt(()=>{fh(),qd=({x:t,y:e,z:o,alpha:i})=>{void 0===t&&(t=0),void 0===e&&(e=0),void 0===o&&(o=0);let n=_u({r:3.1341359569958707*t-1.6173863321612538*e-.4906619460083532*o,g:-.978795502912089*t+1.916254567259524*e+.03344273116131949*o,b:.07195537988411677*t-.2289768264158322*e+1.405386058324125*o});return void 0!==i&&(n.alpha=i),n}}),fp=kt(()=>{pp(),mp(),Wd=t=>qd(Yd(t))}),gp=kt(()=>{ph(),Xd=t=>{let{r:e,g:o,b:i,alpha:n}=mu(t),r={mode:"xyz50",x:.436065742824811*e+.3851514688337912*o+.14307845442264197*i,y:.22249319175623702*e+.7168870538238823*o+.06061979053616537*i,z:.013923904500943465*e+.09708128566574634*o+.7140993584005155*i};return void 0!==n&&(r.alpha=n),r}}),_p=kt(()=>{dp(),Th(),Zd=t=>t>Gd?Math.cbrt(t):(Fd*t+16)/116,Jd=({x:t,y:e,z:o,alpha:i})=>{void 0===t&&(t=0),void 0===e&&(e=0),void 0===o&&(o=0);let n=Zd(t/Hu.X),r=Zd(e/Hu.Y),a={mode:"lab",l:116*r-16,a:500*(n-r),b:200*(r-Zd(o/Hu.Z))};return void 0!==i&&(a.alpha=i),a}}),vp=kt(()=>{gp(),_p(),Qd=t=>{let e=Jd(Xd(t));return t.r===t.b&&t.b===t.g&&(e.a=e.b=0),e}});function bp(t,e){if(!e||"lab"!==e[0])return;const o={mode:"lab"},[,i,n,r,a]=e;return i.type!==zc.Hue&&n.type!==zc.Hue&&r.type!==zc.Hue?(i.type!==zc.None&&(o.l=Math.min(Math.max(0,i.value),100)),n.type!==zc.None&&(o.a=n.type===zc.Number?n.value:125*n.value/100),r.type!==zc.None&&(o.b=r.type===zc.Number?r.value:125*r.value/100),a.type!==zc.None&&(o.alpha=Math.min(1,Math.max(0,a.type===zc.Number?a.value:a.value/100))),o):void 0}var yp,wp,kp=kt(()=>{tu()}),Cp=kt(()=>{fp(),pp(),vp(),_p(),kp(),lh(),ch(),yp={mode:"lab",toMode:{xyz50:Yd,rgb:Wd},fromMode:{xyz50:Jd,rgb:Qd},channels:["l","a","b","alpha"],ranges:{l:[0,100],a:[-125,125],b:[-125,125]},parse:[bp],serialize:t=>`lab(${void 0!==t.l?t.l:"none"} ${void 0!==t.a?t.a:"none"} ${void 0!==t.b?t.b:"none"}${t.alpha<1?` / ${t.alpha}`:""})`,interpolate:{l:au,a:au,b:au,alpha:{use:au,fixup:su}}}}),$p=kt(()=>{Ih(),Mh(),Ph(),zh(),Cp(),oe(),wp=ee(ee({},yp),{},{mode:"lab65",parse:["--lab-d65"],serialize:"--lab-d65",toMode:{xyz65:Vu,rgb:Fu},fromMode:{xyz65:Ku,rgb:Yu},ranges:{l:[0,100],a:[-125,125],b:[-125,125]}})});function Ep(t,e){if(!e||"lch"!==e[0])return;const o={mode:"lch"},[,i,n,r,a]=e;if(i.type!==zc.None){if(i.type===zc.Hue)return;o.l=Math.min(Math.max(0,i.value),100)}if(n.type!==zc.None&&(o.c=Math.max(0,n.type===zc.Number?n.value:150*n.value/100)),r.type!==zc.None){if(r.type===zc.Percentage)return;o.h=r.value}return a.type!==zc.None&&(o.alpha=Math.min(1,Math.max(0,a.type===zc.Number?a.value:a.value/100))),o}var xp,Ap,Sp,Tp,Mp,Ip,zp,Pp,Np,Op,Bp,Lp,Dp,jp,Hp,Rp,Up,Vp,Fp,Gp,Kp,Yp,qp,Wp,Xp=kt(()=>{tu()}),Zp=kt(()=>{xh(),Ah(),fp(),vp(),Xp(),bh(),ch(),lh(),Ch(),$h(),xp={mode:"lch",toMode:{lab:Lu,rgb:t=>Wd(Lu(t))},fromMode:{rgb:t=>Bu(Qd(t)),lab:Bu},channels:["l","c","h","alpha"],ranges:{l:[0,100],c:[0,150],h:[0,360]},parse:[Ep],serialize:t=>`lch(${void 0!==t.l?t.l:"none"} ${void 0!==t.c?t.c:"none"} ${void 0!==t.h?t.h:"none"}${t.alpha<1?` / ${t.alpha}`:""})`,interpolate:{h:{use:au,fixup:ku},c:au,l:au,alpha:{use:au,fixup:su}},difference:{h:Pu},average:{h:Nu}}}),Jp=kt(()=>{xh(),Ah(),Ih(),Ph(),Zp(),oe(),Ap=ee(ee({},xp),{},{mode:"lch65",parse:["--lch-d65"],serialize:"--lch-d65",toMode:{lab65:t=>Lu(t,"lab65"),rgb:t=>Fu(Lu(t,"lab65"))},fromMode:{rgb:t=>Bu(Yu(t),"lch65"),lab65:t=>Bu(t,"lch65")},ranges:{l:[0,100],c:[0,150],h:[0,360]}})}),Qp=kt(()=>{vh(),Sp=({l:t,u:e,v:o,alpha:i})=>{void 0===e&&(e=0),void 0===o&&(o=0);let n=Math.sqrt(e*e+o*o),r={mode:"lchuv",l:t,c:n};return n&&(r.h=yu(180*Math.atan2(o,e)/Math.PI)),void 0!==i&&(r.alpha=i),r}}),tm=kt(()=>{Tp=({l:t,c:e,h:o,alpha:i})=>{void 0===o&&(o=0);let n={mode:"luv",l:t,u:e?e*Math.cos(o/180*Math.PI):0,v:e?e*Math.sin(o/180*Math.PI):0};return void 0!==i&&(n.alpha=i),n}}),em=kt(()=>{dp(),Th(),Mp=(t,e,o)=>4*t/(t+15*e+3*o),Ip=(t,e,o)=>9*e/(t+15*e+3*o),zp=Mp(Hu.X,Hu.Y,Hu.Z),Pp=Ip(Hu.X,Hu.Y,Hu.Z),Np=t=>t<=Gd?Fd*t:116*Math.cbrt(t)-16,Op=({x:t,y:e,z:o,alpha:i})=>{void 0===t&&(t=0),void 0===e&&(e=0),void 0===o&&(o=0);let n=Np(e/Hu.Y),r=Mp(t,e,o),a=Ip(t,e,o);isFinite(r)&&isFinite(a)?(r=13*n*(r-zp),a=13*n*(a-Pp)):n=r=a=0;let s={mode:"luv",l:n,u:r,v:a};return void 0!==i&&(s.alpha=i),s}}),om=kt(()=>{dp(),Th(),Bp=(t,e,o)=>4*t/(t+15*e+3*o),Lp=(t,e,o)=>9*e/(t+15*e+3*o),Dp=Bp(Hu.X,Hu.Y,Hu.Z),jp=Lp(Hu.X,Hu.Y,Hu.Z),Hp=({l:t,u:e,v:o,alpha:i})=>{if(void 0===t&&(t=0),0===t)return{mode:"xyz50",x:0,y:0,z:0};void 0===e&&(e=0),void 0===o&&(o=0);let n=e/(13*t)+Dp,r=o/(13*t)+jp,a=Hu.Y*(t<=8?t/Fd:Math.pow((t+16)/116,3)),s={mode:"xyz50",x:a*(9*n)/(4*r),y:a,z:a*(12-3*n-20*r)/(4*r)};return void 0!==i&&(s.alpha=i),s}}),im=kt(()=>{Qp(),tm(),em(),om(),mp(),gp(),bh(),ch(),lh(),Ch(),$h(),Rp=t=>Sp(Op(Xd(t))),Up=t=>qd(Hp(Tp(t))),Vp={mode:"lchuv",toMode:{luv:Tp,rgb:Up},fromMode:{rgb:Rp,luv:Sp},channels:["l","c","h","alpha"],parse:["--lchuv"],serialize:"--lchuv",ranges:{l:[0,100],c:[0,176.956],h:[0,360]},interpolate:{h:{use:au,fixup:ku},c:au,l:au,alpha:{use:au,fixup:su}},difference:{h:Pu},average:{h:Nu}}}),nm=kt(()=>{uh(),ph(),fh(),oe(),Fp=ee(ee({},lu),{},{mode:"lrgb",toMode:{rgb:_u},fromMode:{rgb:mu},parse:["srgb-linear"],serialize:"srgb-linear"})}),rm=kt(()=>{em(),om(),mp(),gp(),lh(),ch(),Gp={mode:"luv",toMode:{xyz50:Hp,rgb:t=>qd(Hp(t))},fromMode:{xyz50:Op,rgb:t=>Op(Xd(t))},channels:["l","u","v","alpha"],parse:["--luv"],serialize:"--luv",ranges:{l:[0,100],u:[-84.936,175.042],v:[-125.882,87.243]},interpolate:{l:au,u:au,v:au,alpha:{use:au,fixup:su}}}}),am=kt(()=>{Kp=({r:t,g:e,b:o,alpha:i})=>{void 0===t&&(t=0),void 0===e&&(e=0),void 0===o&&(o=0);let n=Math.cbrt(.412221469470763*t+.5363325372617348*e+.0514459932675022*o),r=Math.cbrt(.2119034958178252*t+.6806995506452344*e+.1073969535369406*o),a=Math.cbrt(.0883024591900564*t+.2817188391361215*e+.6299787016738222*o),s={mode:"oklab",l:.210454268309314*n+.7936177747023054*r-.0040720430116193*a,a:1.9779985324311684*n-2.42859224204858*r+.450593709617411*a,b:.0259040424655478*n+.7827717124575296*r-.8086757549230774*a};return void 0!==i&&(s.alpha=i),s}}),sm=kt(()=>{ph(),am(),Yp=t=>{let e=Kp(mu(t));return t.r===t.b&&t.b===t.g&&(e.a=e.b=0),e}}),lm=kt(()=>{qp=({l:t,a:e,b:o,alpha:i})=>{void 0===t&&(t=0),void 0===e&&(e=0),void 0===o&&(o=0);let n=Math.pow(t+.3963377773761749*e+.2158037573099136*o,3),r=Math.pow(t-.1055613458156586*e-.0638541728258133*o,3),a=Math.pow(t-.0894841775298119*e-1.2914855480194092*o,3),s={mode:"lrgb",r:4.076741636075957*n-3.3077115392580616*r+.2309699031821044*a,g:-1.2684379732850317*n+2.6097573492876887*r-.3413193760026573*a,b:-.0041960761386756*n-.7034186179359362*r+1.7076146940746117*a};return void 0!==i&&(s.alpha=i),s}}),cm=kt(()=>{fh(),lm(),Wp=t=>_u(qp(t))});function um(t){const e=.206,o=1.206/1.03;return.5*(o*t-e+Math.sqrt((o*t-e)*(o*t-e)+.12*o*t))}function hm(t){return(t*t+.206*t)/(1.206/1.03*(t+.03))}function dm(t,e){let o=function(t,e){let o,i,n,r,a,s,l,c;-1.88170328*t-.80936493*e>1?(o=1.19086277,i=1.76576728,n=.59662641,r=.75515197,a=.56771245,s=4.0767416621,l=-3.3077115913,c=.2309699292):1.81444104*t-1.19445276*e>1?(o=.73956515,i=-.45954404,n=.08285427,r=.1254107,a=.14503204,s=-1.2684380046,l=2.6097574011,c=-.3413193965):(o=1.35733652,i=-.00915799,n=-1.1513021,r=-.50559606,a=.00692167,s=-.0041960863,l=-.7034186147,c=1.707614701);let u=o+i*t+n*e+r*t*t+a*t*e,h=.3963377774*t+.2158037573*e,d=-.1055613458*t-.0638541728*e,p=-.0894841775*t-1.291485548*e;{let t=1+u*h,e=1+u*d,o=1+u*p,i=s*(t*t*t)+l*(e*e*e)+c*(o*o*o),n=s*(3*h*t*t)+l*(3*d*e*e)+c*(3*p*o*o);u-=i*n/(n*n-.5*i*(s*(6*h*h*t)+l*(6*d*d*e)+c*(6*p*p*o)))}return u}(t,e),i=qp({l:1,a:o*t,b:o*e}),n=Math.cbrt(1/Math.max(i.r,i.g,i.b));return[n,n*o]}function pm(t,e,o=null){o||(o=dm(t,e));let i=o[0],n=o[1];return[n/i,n/(1-i)]}function mm(t,e,o){let i=dm(e,o),n=function(t,e,o,i,n,r=null){let a;if(r||(r=dm(t,e)),(o-n)*r[1]-(r[0]-n)*i<=0)a=r[1]*n/(i*r[0]+r[1]*(n-o));else{a=r[1]*(n-1)/(i*(r[0]-1)+r[1]*(n-o));{let r=o-n,s=.3963377774*t+.2158037573*e,l=-.1055613458*t-.0638541728*e,c=-.0894841775*t-1.291485548*e,u=r+i*s,h=r+i*l,d=r+i*c;{let t=n*(1-a)+a*o,e=a*i,r=t+e*s,p=t+e*l,m=t+e*c,f=r*r*r,g=p*p*p,_=m*m*m,v=3*u*r*r,b=3*h*p*p,y=3*d*m*m,w=6*u*u*r,k=6*h*h*p,C=6*d*d*m,$=4.0767416621*f-3.3077115913*g+.2309699292*_-1,E=4.0767416621*v-3.3077115913*b+.2309699292*y,x=E/(E*E-.5*$*(4.0767416621*w-3.3077115913*k+.2309699292*C)),A=-$*x,S=-1.2684380046*f+2.6097574011*g-.3413193965*_-1,T=-1.2684380046*v+2.6097574011*b-.3413193965*y,M=T/(T*T-.5*S*(-1.2684380046*w+2.6097574011*k-.3413193965*C)),I=-S*M,z=-.0041960863*f-.7034186147*g+1.707614701*_-1,P=-.0041960863*v-.7034186147*b+1.707614701*y,N=P/(P*P-.5*z*(-.0041960863*w-.7034186147*k+1.707614701*C)),O=-z*N;A=x>=0?A:1e6,I=M>=0?I:1e6,O=N>=0?O:1e6,a+=Math.min(A,Math.min(I,O))}}}return a}(e,o,t,1,t,i),r=pm(e,o,i),a=t*(.11516993+1/(7.4477897+4.1590124*o+e*(1.75198401*o-2.19557347+e*(-2.13704948-10.02301043*o+e*(5.38770819*o-4.24894561+4.69891013*e))))),s=(1-t)*(.11239642+1/(1.6132032-.68124379*o+e*(.40370612+.90148123*o+e*(.6122399*o-.27087943+e*(.00299215-.45399568*o-.14661872*e))))),l=.9*(n/Math.min(t*r[0],(1-t)*r[1]))*Math.sqrt(Math.sqrt(1/(1/(a*a*a*a)+1/(s*s*s*s))));return a=.4*t,s=.8*(1-t),[Math.sqrt(1/(1/(a*a)+1/(s*s))),l,n]}var fm=kt(()=>{lm()});function gm(t){const e=void 0!==t.l?t.l:0,o=void 0!==t.a?t.a:0,i=void 0!==t.b?t.b:0,n={mode:"okhsl",l:um(e)};void 0!==t.alpha&&(n.alpha=t.alpha);let r=Math.sqrt(o*o+i*i);if(!r)return n.s=0,n;let a,[s,l,c]=mm(e,o/r,i/r);if(r{vh(),fm()});function vm(t){let e=void 0!==t.h?t.h:0,o=void 0!==t.s?t.s:0,i=void 0!==t.l?t.l:0;const n={mode:"oklab",l:hm(i)};if(void 0!==t.alpha&&(n.alpha=t.alpha),!o||1===i)return n.a=n.b=0,n;let r,a,s,l,c=Math.cos(e/180*Math.PI),u=Math.sin(e/180*Math.PI),[h,d,p]=mm(n.l,c,u);o<.8?(r=1.25*o,a=0,s=.8*h,l=1-s/d):(r=5*(o-.8),a=d,s=.2*d*d*1.25*1.25/h,l=1-s/(p-d));let m=a+r*s/(1-l*r);return n.a=m*c,n.b=m*u,n}var bm,ym=kt(()=>{fm()}),wm=kt(()=>{sm(),cm(),_m(),ym(),id(),oe(),bm=ee(ee({},ed),{},{mode:"okhsl",channels:["h","s","l","alpha"],parse:["--okhsl"],serialize:"--okhsl",fromMode:{oklab:gm,rgb:t=>gm(Yp(t))},toMode:{oklab:vm,rgb:t=>Wp(vm(t))}})});function km(t){let e=void 0!==t.l?t.l:0,o=void 0!==t.a?t.a:0,i=void 0!==t.b?t.b:0,n=Math.sqrt(o*o+i*i),r=n?o/n:1,a=n?i/n:1,[s,l]=pm(r,a),c=1-.5/s,u=l/(n+e*l),h=u*e,d=u*n,p=hm(h),m=d*p/h,f=qp({l:p,a:r*m,b:a*m}),g=Math.cbrt(1/Math.max(f.r,f.g,f.b,0));e/=g,n=n/g*um(e)/e,e=um(e);const _={mode:"okhsv",s:n?(.5+l)*d/(.5*l+l*c*d):0,v:e?e/h:0};return _.s&&(_.h=yu(180*Math.atan2(i,o)/Math.PI)),void 0!==t.alpha&&(_.alpha=t.alpha),_}var Cm=kt(()=>{vh(),lm(),fm()});function $m(t){const e={mode:"oklab"};void 0!==t.alpha&&(e.alpha=t.alpha);const o=void 0!==t.h?t.h:0,i=void 0!==t.s?t.s:0,n=void 0!==t.v?t.v:0,r=Math.cos(o/180*Math.PI),a=Math.sin(o/180*Math.PI),[s,l]=pm(r,a),c=.5,u=1-c/s,h=1-i*c/(c+l-l*u*i),d=i*l*c/(c+l-l*u*i),p=hm(h),m=d*p/h,f=qp({l:p,a:r*m,b:a*m}),g=Math.cbrt(1/Math.max(f.r,f.g,f.b,0)),_=hm(n*h),v=d*_/h;return e.l=_*g,e.a=v*r*g,e.b=v*a*g,e}var Em,xm=kt(()=>{lm(),fm()}),Am=kt(()=>{sm(),cm(),Cm(),xm(),cd(),oe(),Em=ee(ee({},sd),{},{mode:"okhsv",channels:["h","s","v","alpha"],parse:["--okhsv"],serialize:"--okhsv",fromMode:{oklab:km,rgb:t=>km(Yp(t))},toMode:{oklab:$m,rgb:t=>Wp($m(t))}})});function Sm(t,e){if(!e||"oklab"!==e[0])return;const o={mode:"oklab"},[,i,n,r,a]=e;return i.type!==zc.Hue&&n.type!==zc.Hue&&r.type!==zc.Hue?(i.type!==zc.None&&(o.l=Math.min(Math.max(0,i.type===zc.Number?i.value:i.value/100),1)),n.type!==zc.None&&(o.a=n.type===zc.Number?n.value:.4*n.value/100),r.type!==zc.None&&(o.b=r.type===zc.Number?r.value:.4*r.value/100),a.type!==zc.None&&(o.alpha=Math.min(1,Math.max(0,a.type===zc.Number?a.value:a.value/100))),o):void 0}var Tm,Mm=kt(()=>{tu()}),Im=kt(()=>{lm(),am(),sm(),cm(),Mm(),Cp(),oe(),Tm=ee(ee({},yp),{},{mode:"oklab",toMode:{lrgb:qp,rgb:Wp},fromMode:{lrgb:Kp,rgb:Yp},ranges:{l:[0,1],a:[-.4,.4],b:[-.4,.4]},parse:[Sm],serialize:t=>`oklab(${void 0!==t.l?t.l:"none"} ${void 0!==t.a?t.a:"none"} ${void 0!==t.b?t.b:"none"}${t.alpha<1?` / ${t.alpha}`:""})`})});function zm(t,e){if(!e||"oklch"!==e[0])return;const o={mode:"oklch"},[,i,n,r,a]=e;if(i.type!==zc.None){if(i.type===zc.Hue)return;o.l=Math.min(Math.max(0,i.type===zc.Number?i.value:i.value/100),1)}if(n.type!==zc.None&&(o.c=Math.max(0,n.type===zc.Number?n.value:.4*n.value/100)),r.type!==zc.None){if(r.type===zc.Percentage)return;o.h=r.value}return a.type!==zc.None&&(o.alpha=Math.min(1,Math.max(0,a.type===zc.Number?a.value:a.value/100))),o}var Pm,Nm,Om,Bm,Lm,Dm,jm,Hm,Rm,Um,Vm,Fm,Gm,Km,Ym,qm,Wm,Xm,Zm,Jm,Qm,tf,ef,of,nf,rf,af,sf,lf,cf,uf,hf,df,pf,mf,ff=kt(()=>{tu()}),gf=kt(()=>{Zp(),xh(),Ah(),cm(),sm(),ff(),oe(),Pm=ee(ee({},xp),{},{mode:"oklch",toMode:{oklab:t=>Lu(t,"oklab"),rgb:t=>Wp(Lu(t,"oklab"))},fromMode:{rgb:t=>Bu(Yp(t),"oklch"),oklab:t=>Bu(t,"oklch")},parse:[zm],serialize:t=>`oklch(${void 0!==t.l?t.l:"none"} ${void 0!==t.c?t.c:"none"} ${void 0!==t.h?t.h:"none"}${t.alpha<1?` / ${t.alpha}`:""})`,ranges:{l:[0,1],c:[0,.4],h:[0,360]}})}),_f=kt(()=>{ph(),Nm=t=>{let{r:e,g:o,b:i,alpha:n}=mu(t),r={mode:"xyz65",x:.486570948648216*e+.265667693169093*o+.1982172852343625*i,y:.2289745640697487*e+.6917385218365062*o+.079286914093745*i,z:0*e+.0451133818589026*o+1.043944368900976*i};return void 0!==n&&(r.alpha=n),r}}),vf=kt(()=>{fh(),Om=({x:t,y:e,z:o,alpha:i})=>{void 0===t&&(t=0),void 0===e&&(e=0),void 0===o&&(o=0);let n=_u({r:2.4934969119414263*t-.9313836179191242*e-.402710784450717*o,g:-.8294889695615749*t+1.7626640603183465*e+.0236246858419436*o,b:.0358458302437845*t-.0761723892680418*e+.9568845240076871*o},"p3");return void 0!==i&&(n.alpha=i),n}}),bf=kt(()=>{uh(),_f(),vf(),mh(),gh(),oe(),Bm=ee(ee({},lu),{},{mode:"p3",parse:["display-p3"],serialize:"display-p3",fromMode:{rgb:t=>Om(fu(t)),xyz65:Om},toMode:{rgb:t=>vu(Nm(t)),xyz65:Nm}})}),yf=kt(()=>{Lm=t=>{let e=Math.abs(t);return e>=1/512?Math.sign(t)*Math.pow(e,1/1.8):16*t},Dm=({x:t,y:e,z:o,alpha:i})=>{void 0===t&&(t=0),void 0===e&&(e=0),void 0===o&&(o=0);let n={mode:"prophoto",r:Lm(1.3457868816471585*t-.2555720873797946*e-.0511018649755453*o),g:Lm(-.5446307051249019*t+1.5082477428451466*e+.0205274474364214*o),b:Lm(0*t+0*e+1.2119675456389452*o)};return void 0!==i&&(n.alpha=i),n}}),wf=kt(()=>{jm=(t=0)=>{let e=Math.abs(t);return e>=16/512?Math.sign(t)*Math.pow(e,1.8):t/16},Hm=t=>{let e=jm(t.r),o=jm(t.g),i=jm(t.b),n={mode:"xyz50",x:.7977666449006423*e+.1351812974005331*o+.0313477341283922*i,y:.2880748288194013*e+.7118352342418731*o+899369387256e-16*i,z:0*e+0*o+.8251046025104602*i};return void 0!==t.alpha&&(n.alpha=t.alpha),n}}),kf=kt(()=>{uh(),yf(),wf(),mp(),gp(),oe(),Rm=ee(ee({},lu),{},{mode:"prophoto",parse:["prophoto-rgb"],serialize:"prophoto-rgb",fromMode:{xyz50:Dm,rgb:t=>Dm(Xd(t))},toMode:{xyz50:Hm,rgb:t=>qd(Hm(t))}})}),Cf=kt(()=>{Um=1.09929682680944,Vm=t=>{const e=Math.abs(t);return e>.018053968510807?(Math.sign(t)||1)*(Um*Math.pow(e,.45)-(Um-1)):4.5*t},Fm=({x:t,y:e,z:o,alpha:i})=>{void 0===t&&(t=0),void 0===e&&(e=0),void 0===o&&(o=0);let n={mode:"rec2020",r:Vm(1.7166511879712683*t-.3556707837763925*e-.2533662813736599*o),g:Vm(-.6666843518324893*t+1.6164812366349395*e+.0157685458139111*o),b:Vm(.0176398574453108*t-.0427706132578085*e+.9421031212354739*o)};return void 0!==i&&(n.alpha=i),n}}),$f=kt(()=>{Gm=1.09929682680944,Km=(t=0)=>{let e=Math.abs(t);return e<.08124285829863151?t/4.5:(Math.sign(t)||1)*Math.pow((e+Gm-1)/Gm,1/.45)},Ym=t=>{let e=Km(t.r),o=Km(t.g),i=Km(t.b),n={mode:"xyz65",x:.6369580483012911*e+.1446169035862083*o+.1688809751641721*i,y:.262700212011267*e+.6779980715188708*o+.059301716469862*i,z:0*e+.0280726930490874*o+1.0609850577107909*i};return void 0!==t.alpha&&(n.alpha=t.alpha),n}}),Ef=kt(()=>{uh(),Cf(),$f(),mh(),gh(),oe(),qm=ee(ee({},lu),{},{mode:"rec2020",fromMode:{xyz65:Fm,rgb:t=>Fm(fu(t))},toMode:{xyz65:Ym,rgb:t=>vu(Ym(t))},parse:["rec2020"],serialize:"rec2020"})}),xf=kt(()=>{Wm=.0037930732552754493,Xm=Math.cbrt(Wm)}),Af=kt(()=>{ph(),xf(),Zm=t=>Math.cbrt(t)-Xm,Jm=t=>{const{r:e,g:o,b:i,alpha:n}=mu(t),r=Zm(.3*e+.622*o+.078*i+Wm),a=Zm(.23*e+.692*o+.078*i+Wm),s={mode:"xyb",x:(r-a)/2,y:(r+a)/2,b:Zm(.2434226892454782*e+.2047674442449682*o+.5518098665095535*i+Wm)-(r+a)/2};return void 0!==n&&(s.alpha=n),s}}),Sf=kt(()=>{fh(),xf(),Qm=t=>Math.pow(t+Xm,3),tf=({x:t,y:e,b:o,alpha:i})=>{void 0===t&&(t=0),void 0===e&&(e=0),void 0===o&&(o=0);const n=Qm(t+e)-Wm,r=Qm(e-t)-Wm,a=Qm(o+e)-Wm,s=_u({r:11.031566904639861*n-9.866943908131562*r-.16462299650829934*a,g:-3.2541473810744237*n+4.418770377582723*r-.16462299650829934*a,b:-3.6588512867136815*n+2.7129230459360922*r+1.9459282407775895*a});return void 0!==i&&(s.alpha=i),s}}),Tf=kt(()=>{lh(),ch(),Af(),Sf(),ef={mode:"xyb",channels:["x","y","b","alpha"],parse:["--xyb"],serialize:"--xyb",toMode:{rgb:tf},fromMode:{rgb:Jm},ranges:{x:[-.0154,.0281],y:[0,.8453],b:[-.2778,.388]},interpolate:{x:au,y:au,b:au,alpha:{use:au,fixup:su}}}}),Mf=kt(()=>{mp(),_p(),gp(),pp(),lh(),ch(),of={mode:"xyz50",parse:["xyz-d50"],serialize:"xyz-d50",toMode:{rgb:qd,lab:Jd},fromMode:{rgb:Xd,lab:Yd},channels:["x","y","z","alpha"],ranges:{x:[0,.964],y:[0,.999],z:[0,.825]},interpolate:{x:au,y:au,z:au,alpha:{use:au,fixup:su}}}}),If=kt(()=>{nf=t=>{let{x:e,y:o,z:i,alpha:n}=t;void 0===e&&(e=0),void 0===o&&(o=0),void 0===i&&(i=0);let r={mode:"xyz50",x:1.0479298208405488*e+.0229467933410191*o-.0501922295431356*i,y:.0296278156881593*e+.990434484573249*o-.0170738250293851*i,z:-.0092430581525912*e+.0150551448965779*o+.7518742899580008*i};return void 0!==n&&(r.alpha=n),r}}),zf=kt(()=>{rf=t=>{let{x:e,y:o,z:i,alpha:n}=t;void 0===e&&(e=0),void 0===o&&(o=0),void 0===i&&(i=0);let r={mode:"xyz65",x:.9554734527042182*e-.0230985368742614*o+.0632593086610217*i,y:-.0283697069632081*e+1.0099954580058226*o+.021041398966943*i,z:.0123140016883199*e-.0205076964334779*o+1.3303659366080753*i};return void 0!==n&&(r.alpha=n),r}}),Pf=kt(()=>{gh(),mh(),If(),zf(),lh(),ch(),af={mode:"xyz65",toMode:{rgb:vu,xyz50:nf},fromMode:{rgb:fu,xyz50:rf},ranges:{x:[0,.95],y:[0,1],z:[0,1.088]},channels:["x","y","z","alpha"],parse:["xyz","xyz-d65"],serialize:"xyz-d65",interpolate:{x:au,y:au,z:au,alpha:{use:au,fixup:su}}}}),Nf=kt(()=>{sf=({r:t,g:e,b:o,alpha:i})=>{void 0===t&&(t=0),void 0===e&&(e=0),void 0===o&&(o=0);const n={mode:"yiq",y:.29889531*t+.58662247*e+.11448223*o,i:.59597799*t-.2741761*e-.32180189*o,q:.21147017*t-.52261711*e+.31114694*o};return void 0!==i&&(n.alpha=i),n}}),Of=kt(()=>{lf=({y:t,i:e,q:o,alpha:i})=>{void 0===t&&(t=0),void 0===e&&(e=0),void 0===o&&(o=0);const n={mode:"rgb",r:t+.95608445*e+.6208885*o,g:t-.27137664*e-.6486059*o,b:t-1.10561724*e+1.70250126*o};return void 0!==i&&(n.alpha=i),n}}),Bf=kt(()=>{Nf(),Of(),lh(),ch(),cf={mode:"yiq",toMode:{rgb:lf},fromMode:{rgb:sf},channels:["y","i","q","alpha"],parse:["--yiq"],serialize:"--yiq",ranges:{i:[-.595,.595],q:[-.522,.522]},interpolate:{y:au,i:au,q:au,alpha:{use:au,fixup:su}}}}),Lf=kt(()=>{_h(),Eh(),Lh(),Dh(),Fh(),id(),cd(),kd(),ip(),lp(),hp(),Cp(),$p(),Zp(),Jp(),im(),nm(),rm(),wm(),Am(),Im(),gf(),bf(),kf(),Ef(),uh(),Tf(),Mf(),Pf(),Bf(),Kc(),Gc(),Fc(),jc(),bh(),ch(),$h(),lh(),sh(),ah(),Ch(),oe(),tu(),od(),wd(),kp(),Xp(),Hc(),rh(),Rc(),nh(),Qh(),Vc(),Mm(),ff(),hh(),kh(),Oh(),Hh(),Kh(),rd(),hd(),ep(),cp(),sp(),rp(),up(),Bh(),Ih(),Mh(),xh(),fp(),pp(),Ah(),tm(),am(),fh(),Qp(),om(),ym(),xm(),lm(),_m(),Cm(),cm(),_f(),wf(),$f(),wh(),Vh(),Zh(),ld(),pd(),ap(),vp(),Ph(),ph(),sm(),Af(),gp(),mh(),Nf(),Sf(),_p(),em(),yf(),mp(),zf(),dh(),op(),np(),zh(),vf(),Cf(),gh(),If(),Of(),Ac(bu),Ac(Ou),Ac(oh),Ac(ih),Ac(Uh),Ac(ed),uf=Ac(sd),Ac(fd),Ac(Md),Ac(Hd),Ac(Vd),Ac(yp),Ac(wp),Ac(xp),Ac(Ap),Ac(Vp),Ac(Fp),Ac(Gp),Ac(bm),Ac(Em),Ac(Tm),Ac(Pm),Ac(Bm),Ac(Rm),Ac(qm),hf=Ac(lu),Ac(ef),Ac(of),Ac(af),Ac(cf)});function Df(t){if("primary"===t||"accent"===t)return`var(--rgb-${t}-color)`;if(df.includes(t))return`var(--rgb-${t})`;if(t.startsWith("#"))try{const e=hf(t);if(e){const{r:t,g:o,b:i}=e;return`${Math.round(255*t)}, ${Math.round(255*o)}, ${Math.round(255*i)}`}return""}catch(e){return""}return t}var jf,Hf,Rf,Uf=kt(()=>{Lf(),Vt(),df=["primary","accent","red","pink","purple","deep-purple","indigo","blue","light-blue","cyan","teal","green","light-green","lime","yellow","amber","orange","deep-orange","brown","light-grey","grey","dark-grey","blue-grey","black","white","disabled"],pf=l` --default-red: 244, 67, 54; --default-pink: 233, 30, 99; --default-purple: 146, 107, 199; @@ -474,9 +474,9 @@ var t,e,o,i,n,r,a,s,l,c,u,h,d,p,m,f,g,_,v,b,y,w,k,C,$,E,x,A,S,T,M,I,z,P,N,O,B,L, --default-black: 0, 0, 0; --default-white: 255, 255, 255; --default-disabled: 189, 189, 189; -`,pf=l` +`,mf=l` --default-disabled: 111, 111, 111; -`}),Uf=kt(()=>{Vt(),Df=l` +`}),Vf=kt(()=>{Vt(),jf=l` --spacing: var(--mush-spacing, 10px); /* Title */ @@ -565,7 +565,7 @@ var t,e,o,i,n,r,a,s,l,c,u,h,d,p,m,f,g,_,v,b,y,w,k,C,$,E,x,A,S,T,M,I,z,P,N,O,B,L, --icon-border-radius: var(--mush-icon-border-radius, 50%); --icon-size: var(--mush-icon-size, 36px); --icon-symbol-size: var(--mush-icon-symbol-size, 0.667em); -`,jf=l` +`,Hf=l` /* RGB */ /* Standard colors */ --rgb-red: var(--mush-rgb-red, var(--default-red)); @@ -694,18 +694,18 @@ var t,e,o,i,n,r,a,s,l,c,u,h,d,p,m,f,g,_,v,b,y,w,k,C,$,E,x,A,S,T,M,I,z,P,N,O,B,L, --mush-rgb-state-climate-off, var(--rgb-disabled) ); -`});function Vf(t){return!!t&&t.themes.darkMode}var Ff,Gf,Kf,Yf=kt(()=>{Vt(),Be(),Bc(),On(),Nn(),Rf(),Uf(),vn(),Hf=class extends Ot{updated(t){if(super.updated(t),t.has("hass")&&this.hass){const e=Vf(t.get("hass")),o=Vf(this.hass);e!==o&&this.toggleAttribute("dark-mode",o)}}static get styles(){return[En,l` +`});function Ff(t){return!!t&&t.themes.darkMode}var Gf,Kf,Yf,qf=kt(()=>{Vt(),Be(),Lc(),On(),Nn(),Uf(),Vf(),vn(),Rf=class extends Ot{updated(t){if(super.updated(t),t.has("hass")&&this.hass){const e=Ff(t.get("hass")),o=Ff(this.hass);e!==o&&this.toggleAttribute("dark-mode",o)}}static get styles(){return[En,l` :host { - ${df} - } - :host([dark-mode]) { ${pf} } - :host { - ${jf} - ${Df} + :host([dark-mode]) { + ${mf} } - `]}},gn([Gt({attribute:!1})],Hf.prototype,"hass",void 0)});function qf(t,e,o,i,n){switch(t){case"name":return e;case"state":const t=i.entity_id.split(".")[0];return"timestamp"!==i.attributes.device_class&&!Ff.includes(t)||!qo(i)||function(t){return t.state===Fo}(i)?o:J` + :host { + ${Hf} + ${jf} + } + `]}},gn([Gt({attribute:!1})],Rf.prototype,"hass",void 0)});function Wf(t,e,o,i,n){switch(t){case"name":return e;case"state":const t=i.entity_id.split(".")[0];return"timestamp"!==i.attributes.device_class&&!Gf.includes(t)||!qo(i)||function(t){return t.state===Fo}(i)?o:J` - `;case"none":return}}function Wf(t,e){return"entity-picture"===e?Xo(t):void 0}var Xf=kt(()=>{Vt(),Ff=["button","input_button","scene"],Gf=["name","state","last-changed","last-updated","none"],Kf=["icon","entity-picture","none"]});Vt(),Be(),je(),pn(),Oc(),bn(),Pn(),Bc(),On(),Bn(),Ln(),Yf(),Xf(),vn(),oe();var Zf=class extends Hf{get _stateObj(){if(!this._config||!this.hass||!this._config.entity)return;const t=this._config.entity;return this.hass.states[t]}get hasControls(){return!1}setConfig(t){this._config=ee({tap_action:{action:"more-info"},hold_action:{action:"more-info"}},t)}getCardSize(){var t;let e=1;if(!this._config)return e;const o=Dn(this._config);return"vertical"===o.layout&&(e+=1),"horizontal"===(null==o?void 0:o.layout)||!this.hasControls||"collapsible_controls"in this._config&&(null===(t=this._config)||void 0===t?void 0:t.collapsible_controls)||(e+=1),e}getLayoutOptions(){if(!this._config)return{grid_columns:2,grid_rows:1};const t={grid_columns:2,grid_rows:0},e=Dn(this._config),o="collapsible_controls"in this._config&&Boolean(this._config.collapsible_controls),i="none"!==e.primary_info||"none"!==e.secondary_info,n="none"!==e.icon_type,r=this._stateObj&&Yo(this._stateObj),a=this.hasControls&&(!o||r);return"vertical"===e.layout&&(n&&(t.grid_rows+=1),i&&(t.grid_rows+=1),a&&(t.grid_rows+=1)),"horizontal"===e.layout&&(t.grid_rows=1,t.grid_columns=4),"default"===e.layout&&((i||n)&&(t.grid_rows+=1),a&&(t.grid_rows+=1)),a||i||(t.grid_columns=1,t.grid_rows=1),t.grid_rows=Math.max(t.grid_rows,1),t}getGridOptions(){if(!this._config)return{columns:6,rows:1};const t={min_rows:1,min_columns:4,columns:6,rows:0},e=Dn(this._config),o="collapsible_controls"in this._config&&Boolean(this._config.collapsible_controls),i="none"!==e.primary_info||"none"!==e.secondary_info,n="none"!==e.icon_type,r=this._stateObj&&Yo(this._stateObj),a=this.hasControls&&(!o||r);return"vertical"===e.layout&&(n&&(t.rows+=1),i&&(t.rows+=1),a&&(t.rows+=1),t.min_columns=2),"horizontal"===e.layout&&(t.rows=1,t.columns=12),"default"===e.layout&&((i||n)&&(t.rows+=1),a&&(t.rows+=1)),a||i||(t.columns=3,t.rows=1,t.min_columns=2),t.rows=Math.max(t.rows,1),t.min_rows=t.rows,t}renderPicture(t){return J` + `;case"none":return}}function Xf(t,e){return"entity-picture"===e?Xo(t):void 0}var Zf=kt(()=>{Vt(),Gf=["button","input_button","scene"],Kf=["name","state","last-changed","last-updated","none"],Yf=["icon","entity-picture","none"]});Vt(),Be(),je(),pn(),Bc(),bn(),Pn(),Lc(),On(),Bn(),Ln(),qf(),Zf(),vn(),oe();var Jf=class extends Rf{get _stateObj(){if(!this._config||!this.hass||!this._config.entity)return;const t=this._config.entity;return this.hass.states[t]}get hasControls(){return!1}setConfig(t){this._config=ee({tap_action:{action:"more-info"},hold_action:{action:"more-info"}},t)}getCardSize(){var t;let e=1;if(!this._config)return e;const o=Dn(this._config);return"vertical"===o.layout&&(e+=1),"horizontal"===(null==o?void 0:o.layout)||!this.hasControls||"collapsible_controls"in this._config&&(null===(t=this._config)||void 0===t?void 0:t.collapsible_controls)||(e+=1),e}getLayoutOptions(){if(!this._config)return{grid_columns:2,grid_rows:1};const t={grid_columns:2,grid_rows:0},e=Dn(this._config),o="collapsible_controls"in this._config&&Boolean(this._config.collapsible_controls),i="none"!==e.primary_info||"none"!==e.secondary_info,n="none"!==e.icon_type,r=this._stateObj&&Yo(this._stateObj),a=this.hasControls&&(!o||r);return"vertical"===e.layout&&(n&&(t.grid_rows+=1),i&&(t.grid_rows+=1),a&&(t.grid_rows+=1)),"horizontal"===e.layout&&(t.grid_rows=1,t.grid_columns=4),"default"===e.layout&&((i||n)&&(t.grid_rows+=1),a&&(t.grid_rows+=1)),a||i||(t.grid_columns=1,t.grid_rows=1),t.grid_rows=Math.max(t.grid_rows,1),t}getGridOptions(){if(!this._config)return{columns:6,rows:1};const t={min_rows:1,min_columns:4,columns:6,rows:0},e=Dn(this._config),o="collapsible_controls"in this._config&&Boolean(this._config.collapsible_controls),i="none"!==e.primary_info||"none"!==e.secondary_info,n="none"!==e.icon_type,r=this._stateObj&&Yo(this._stateObj),a=this.hasControls&&(!o||r);return"vertical"===e.layout&&(n&&(t.rows+=1),i&&(t.rows+=1),a&&(t.rows+=1),t.min_columns=2),"horizontal"===e.layout&&(t.rows=1,t.columns=12),"default"===e.layout&&((i||n)&&(t.rows+=1),a&&(t.rows+=1)),a||i||(t.columns=3,t.rows=1,t.min_columns=2),t.rows=Math.max(t.rows,1),t.min_rows=t.rows,t}renderPicture(t){return J` - `}renderNotFound(t){const e=Dn(t),o=zo(this.hass),i=ic(this.hass);return J` + `}renderNotFound(t){const e=Dn(t),o=zo(this.hass),i=nc(this.hass);return J` @@ -767,10 +767,10 @@ var t,e,o,i,n,r,a,s,l,c,u,h,d,p,m,f,g,_,v,b,y,w,k,C,$,E,x,A,S,T,M,I,z,P,N,O,B,L, `}renderStateInfo(t,e,o,i){const n=this.hass.formatEntityState(t),r=null!=i?i:n;return J` - `}};gn([ie()],Zf.prototype,"_config",void 0),gn([Gt({reflect:!0,type:String})],Zf.prototype,"layout",void 0),Vt();var Jf=l` + `}};gn([ie()],Jf.prototype,"_config",void 0),gn([Gt({reflect:!0,type:String})],Jf.prototype,"layout",void 0),Vt();var Qf=l` ha-card { box-sizing: border-box; display: flex; @@ -813,7 +813,7 @@ var t,e,o,i,n,r,a,s,l,c,u,h,d,p,m,f,g,_,v,b,y,w,k,C,$,E,x,A,S,T,M,I,z,P,N,O,B,L, mushroom-state-item[disabled] { cursor: initial; } -`;function Qf(t,e,o){return ge(t.config.version,2026,4)?t.formatEntityName(e,o):"string"==typeof o?o:e.attributes.friendly_name||""}function tg(t){const o=window;o.customCards=o.customCards||[];const i=t.type.replace("-card","").replace("mushroom-","");o.customCards.push(ee(ee({},t),{},{preview:!0,documentationURL:`${e.url}/blob/main/docs/cards/${i}.md`}))}pn();var eg,og,ig,ng,rg,ag,sg,lg,cg=kt(()=>{oe()}),ug=kt(()=>{eg="mushroom"}),hg=kt(()=>{ug(),ig=`${og=`${eg}-alarm-control-panel-card`}-editor`,ng=["alarm_control_panel"],rg={disarmed:"var(--rgb-state-alarm-disarmed)",armed:"var(--rgb-state-alarm-armed)",triggered:"var(--rgb-state-alarm-triggered)",unavailable:"var(--rgb-warning)"},ag="var(--rgb-grey)"});function dg(t){var e;return null!==(e=rg[t.split("_")[0]])&&void 0!==e?e:ag}function pg(t){return["arming","triggered","pending",Vo].indexOf(t)>=0}cg(),pn(),hg();var mg,fg,gg,_g=kt(()=>{To(),pn(),sg=Co({tap_action:$o(on),hold_action:$o(on),double_tap_action:$o(on)}),lg=t=>[{name:"tap_action",selector:{ui_action:{actions:t}}},{name:"hold_action",selector:{ui_action:{actions:t}}},{name:"double_tap_action",selector:{ui_action:{actions:t}}}]}),vg=kt(()=>{To(),mg=["default","horizontal","vertical"],fg=Ao([wo("horizontal"),wo("vertical"),wo("default")])});function bg(t){return t.charAt(0).toUpperCase()+t.slice(1)}function yg(t){return Gf.map(e=>({value:e,label:t(`editor.form.info_picker.values.${e}`)||bg(e)}))}function wg(t){return Kf.map(e=>({value:e,label:t(`editor.form.icon_type_picker.values.${e}`)||bg(e)}))}function kg(t){return["start","center","end","justify"].map(e=>({value:e,label:t(`editor.form.alignment_picker.values.${e}`)}))}function Cg(t){return mg.map(e=>({value:e,label:t(`editor.form.layout_picker.values.${e}`)}))}function $g(t){return[{type:"grid",name:"",schema:[{name:"layout",selector:{select:{options:Cg(t),mode:"dropdown"}}},{name:"fill_container",selector:{boolean:{}}}]},{type:"grid",name:"",schema:[{name:"primary_info",selector:{select:{options:yg(t),mode:"dropdown"}}},{name:"secondary_info",selector:{select:{options:yg(t),mode:"dropdown"}}},{name:"icon_type",selector:{select:{options:wg(t),mode:"dropdown"}}}]}]}var Eg,xg,Ag,Sg,Tg,Mg,Ig,zg,Pg,Ng,Og,Bg,Lg,Dg,jg=kt(()=>{To(),Xf(),vg(),gg=Co({layout:$o(fg),fill_container:$o(bo()),primary_info:$o(yo(Gf)),secondary_info:$o(yo(Gf)),icon_type:$o(yo(Kf))})}),Hg=kt(()=>{Eg=["color","icon_color","layout","fill_container","primary_info","secondary_info","icon_type","content_info","use_entity_picture","collapsible_controls","icon_animation","picture"],xg=["picture"]}),Rg=kt(()=>{pn(),Ag=t=>ge(t,2026,4)?{name:"name",selector:{entity_name:{}},context:{entity:"entity"}}:{name:"name",selector:{text:{}}}}),Ug=kt(()=>{Sg=()=>{var t,e,o;customElements.get("ha-form")&&customElements.get("hui-card-features-editor")||(null===(t=customElements.get("hui-tile-card"))||void 0===t||t.getConfigElement());customElements.get("ha-entity-picker")||(null===(e=customElements.get("hui-entities-card"))||void 0===e||e.getConfigElement());customElements.get("ha-card-conditions-editor")||(null===(o=customElements.get("hui-conditional-card"))||void 0===o||o.getConfigElement())},Tg=async t=>{let e=customElements.get(t);return e||(await customElements.whenDefined(t),customElements.get(t))}}),Vg=kt(()=>{To(),Mg=Ao([Co({type:yo(["entity","device","area","floor"])}),Co({type:wo("text"),text:Eo()})]),Ig=Ao([Eo(),Mg,vo(Mg)]),zg=Co({entity:$o(Eo()),name:$o(Ig),icon:$o(Eo())})}),Fg=kt(()=>{To(),Pg=Co({index:$o(ko()),view_index:$o(ko()),view_layout:_o(),type:Eo(),layout_options:_o(),grid_options:_o(),visibility:_o()})}),Gg=kt(()=>{To(),_g(),jg(),Vg(),Fg(),Ng=mo(Pg,mo(zg,gg,sg),Co({states:$o(vo())}))}),Kg=/* @__PURE__ */$t({SwitchCardEditor:()=>Dg}),Yg=kt(()=>{Vt(),Be(),Oi(),To(),pn(),Oc(),_g(),jg(),Yf(),Hg(),Rg(),Ug(),Gg(),hg(),vn(),Og=["more-info","navigate","url","perform-action","assist","none"],Bg=["armed_home","armed_away","armed_night","armed_vacation","armed_custom_bypass"],Lg=vi((t,e,o)=>[{name:"entity",selector:{entity:{domain:ng}}},Ag(o),{name:"icon",selector:{icon:{}},context:{icon_entity:"entity"}},...$g(e),{type:"multi_select",name:"states",options:Bg.map(e=>[e,t(`ui.card.alarm_control_panel.${e.replace("armed","arm")}`)])},...lg(Og)]),Dg=class extends Hf{constructor(...t){super(...t),this._computeLabel=t=>{const e=ic(this.hass);return Eg.includes(t.name)?e(`editor.card.generic.${t.name}`):"states"===t.name?this.hass.localize("ui.panel.lovelace.editor.card.alarm-panel.available_states"):this.hass.localize(`ui.panel.lovelace.editor.card.generic.${t.name}`)}}connectedCallback(){super.connectedCallback(),Sg()}setConfig(t){ho(t,Ng),this._config=t}render(){if(!this.hass||!this._config)return et;const t=ic(this.hass),e=Lg(this.hass.localize,t,this.hass.config.version);return J` +`;function tg(t,e,o){return ge(t.config.version,2026,4)?t.formatEntityName(e,o):"string"==typeof o?o:e.attributes.friendly_name||""}function eg(t){const o=window;o.customCards=o.customCards||[];const i=t.type.replace("-card","").replace("mushroom-","");o.customCards.push(ee(ee({},t),{},{preview:!0,documentationURL:`${e.url}/blob/main/docs/cards/${i}.md`}))}pn();var og,ig,ng,rg,ag,sg,lg,cg,ug=kt(()=>{oe()}),hg=kt(()=>{og="mushroom"}),dg=kt(()=>{hg(),ng=`${ig=`${og}-alarm-control-panel-card`}-editor`,rg=["alarm_control_panel"],ag={disarmed:"var(--rgb-state-alarm-disarmed)",armed:"var(--rgb-state-alarm-armed)",triggered:"var(--rgb-state-alarm-triggered)",unavailable:"var(--rgb-warning)"},sg="var(--rgb-grey)"});function pg(t){var e;return null!==(e=ag[t.split("_")[0]])&&void 0!==e?e:sg}function mg(t){return["arming","triggered","pending",Vo].indexOf(t)>=0}ug(),pn(),dg();var fg,gg,_g,vg=kt(()=>{To(),pn(),lg=Co({tap_action:$o(on),hold_action:$o(on),double_tap_action:$o(on)}),cg=t=>[{name:"tap_action",selector:{ui_action:{actions:t}}},{name:"hold_action",selector:{ui_action:{actions:t}}},{name:"double_tap_action",selector:{ui_action:{actions:t}}}]}),bg=kt(()=>{To(),fg=["default","horizontal","vertical"],gg=Ao([wo("horizontal"),wo("vertical"),wo("default")])});function yg(t){return t.charAt(0).toUpperCase()+t.slice(1)}function wg(t){return Kf.map(e=>({value:e,label:t(`editor.form.info_picker.values.${e}`)||yg(e)}))}function kg(t){return Yf.map(e=>({value:e,label:t(`editor.form.icon_type_picker.values.${e}`)||yg(e)}))}function Cg(t){return["start","center","end","justify"].map(e=>({value:e,label:t(`editor.form.alignment_picker.values.${e}`)}))}function $g(t){return fg.map(e=>({value:e,label:t(`editor.form.layout_picker.values.${e}`)}))}function Eg(t){return[{type:"grid",name:"",schema:[{name:"layout",selector:{select:{options:$g(t),mode:"dropdown"}}},{name:"fill_container",selector:{boolean:{}}}]},{type:"grid",name:"",schema:[{name:"primary_info",selector:{select:{options:wg(t),mode:"dropdown"}}},{name:"secondary_info",selector:{select:{options:wg(t),mode:"dropdown"}}},{name:"icon_type",selector:{select:{options:kg(t),mode:"dropdown"}}}]}]}var xg,Ag,Sg,Tg,Mg,Ig,zg,Pg,Ng,Og,Bg,Lg,Dg,jg,Hg=kt(()=>{To(),Zf(),bg(),_g=Co({layout:$o(gg),fill_container:$o(bo()),primary_info:$o(yo(Kf)),secondary_info:$o(yo(Kf)),icon_type:$o(yo(Yf))})}),Rg=kt(()=>{xg=["color","icon_color","layout","fill_container","primary_info","secondary_info","icon_type","content_info","use_entity_picture","collapsible_controls","icon_animation","picture"],Ag=["picture"]}),Ug=kt(()=>{pn(),Sg=t=>ge(t,2026,4)?{name:"name",selector:{entity_name:{}},context:{entity:"entity"}}:{name:"name",selector:{text:{}}}}),Vg=kt(()=>{Tg=()=>{var t,e,o;customElements.get("ha-form")&&customElements.get("hui-card-features-editor")||(null===(t=customElements.get("hui-tile-card"))||void 0===t||t.getConfigElement());customElements.get("ha-entity-picker")||(null===(e=customElements.get("hui-entities-card"))||void 0===e||e.getConfigElement());customElements.get("ha-card-conditions-editor")||(null===(o=customElements.get("hui-conditional-card"))||void 0===o||o.getConfigElement())},Mg=async t=>{let e=customElements.get(t);return e||(await customElements.whenDefined(t),customElements.get(t))}}),Fg=kt(()=>{To(),Ig=Ao([Co({type:yo(["entity","device","area","floor"])}),Co({type:wo("text"),text:Eo()})]),zg=Ao([Eo(),Ig,vo(Ig)]),Pg=Co({entity:$o(Eo()),name:$o(zg),icon:$o(Eo())})}),Gg=kt(()=>{To(),Ng=Co({index:$o(ko()),view_index:$o(ko()),view_layout:_o(),type:Eo(),layout_options:_o(),grid_options:_o(),visibility:_o()})}),Kg=kt(()=>{To(),vg(),Hg(),Fg(),Gg(),Og=mo(Ng,mo(Pg,_g,lg),Co({states:$o(vo())}))}),Yg=/* @__PURE__ */$t({SwitchCardEditor:()=>jg}),qg=kt(()=>{Vt(),Be(),Oi(),To(),pn(),Bc(),vg(),Hg(),qf(),Rg(),Ug(),Vg(),Kg(),dg(),vn(),Bg=["more-info","navigate","url","perform-action","assist","none"],Lg=["armed_home","armed_away","armed_night","armed_vacation","armed_custom_bypass"],Dg=vi((t,e,o)=>[{name:"entity",selector:{entity:{domain:rg}}},Sg(o),{name:"icon",selector:{icon:{}},context:{icon_entity:"entity"}},...Eg(e),{type:"multi_select",name:"states",options:Lg.map(e=>[e,t(`ui.card.alarm_control_panel.${e.replace("armed","arm")}`)])},...cg(Bg)]),jg=class extends Rf{constructor(...t){super(...t),this._computeLabel=t=>{const e=nc(this.hass);return xg.includes(t.name)?e(`editor.card.generic.${t.name}`):"states"===t.name?this.hass.localize("ui.panel.lovelace.editor.card.alarm-panel.available_states"):this.hass.localize(`ui.panel.lovelace.editor.card.generic.${t.name}`)}}connectedCallback(){super.connectedCallback(),Tg()}setConfig(t){ho(t,Og),this._config=t}render(){if(!this.hass||!this._config)return et;const t=nc(this.hass),e=Dg(this.hass.localize,t,this.hass.config.version);return J` - `}_valueChanged(t){ve(this,"config-changed",{config:t.detail.value})}},gn([ie()],Dg.prototype,"_config",void 0),Dg=gn([Lt(ig)],Dg)});Vt(),Be(),je(),pn(),bn(),Pn(),On(),Bn(),Ln(),Xf(),hg(),vn(),tg({type:og,name:"Mushroom Alarm Control Panel Card",description:"Card for alarm control panel"});var qg=class extends Zf{static async getConfigElement(){return await Promise.resolve().then(()=>(Yg(),Kg)),document.createElement(ig)}static async getStubConfig(t){const e=Object.keys(t.states).filter(t=>ng.includes(t.split(".")[0]));return{type:`custom:${og}`,entity:e[0],states:["armed_home","armed_away"]}}get hasControls(){var t;return Boolean(null===(t=this._config)||void 0===t||null===(t=t.states)||void 0===t?void 0:t.length)}_onTap(t,e){t.stopPropagation(),(async(t,e,o,i)=>{const{service:n}=fn[i];let r;if("disarmed"!==i&&o.attributes.code_arm_required||"disarmed"===i&&o.attributes.code_format){var a;const n=await((t,e)=>t.callWS({type:"config/entity_registry/get",entity_id:e}))(e,o.entity_id).catch(()=>{});if(!(null==n||null===(a=n.options)||void 0===a||null===(a=a.alarm_control_panel)||void 0===a?void 0:a.default_code)){const n="disarmed"===i,a=await(await window.loadCardHelpers()).showEnterCodeDialog(t,{codeFormat:o.attributes.code_format,title:e.localize("ui.card.alarm_control_panel."+(n?"disarm":"arm")),submitText:e.localize("ui.card.alarm_control_panel."+(n?"disarm":"arm"))});if(null==a)throw new Error("Code dialog closed");r=a}}await e.callService("alarm_control_panel",n,{entity_id:o.entity_id,code:r})})(this,this.hass,this._stateObj,e)}_handleAction(t){Ni(this,this.hass,this._config,t.detail.action)}render(){if(!this.hass||!this._config||!this._config.entity)return et;const t=this._stateObj;if(!t)return this.renderNotFound(this._config);const e=Qf(this.hass,t,this._config.name),o=this._config.icon,i=Dn(this._config),n=Wf(t,i.icon_type),r=this._config.states&&this._config.states.length>0?function(t){return"disarmed"===t.state}(t)?this._config.states.map(t=>({mode:t})):[{mode:"disarmed"}]:[],a=function(t){return Vo!==t.state}(t),s=zo(this.hass);return J` + `}_valueChanged(t){ve(this,"config-changed",{config:t.detail.value})}},gn([ie()],jg.prototype,"_config",void 0),jg=gn([Lt(ng)],jg)});Vt(),Be(),je(),pn(),bn(),Pn(),On(),Bn(),Ln(),Zf(),dg(),vn(),eg({type:ig,name:"Mushroom Alarm Control Panel Card",description:"Card for alarm control panel"});var Wg=class extends Jf{static async getConfigElement(){return await Promise.resolve().then(()=>(qg(),Yg)),document.createElement(ng)}static async getStubConfig(t){const e=Object.keys(t.states).filter(t=>rg.includes(t.split(".")[0]));return{type:`custom:${ig}`,entity:e[0],states:["armed_home","armed_away"]}}get hasControls(){var t;return Boolean(null===(t=this._config)||void 0===t||null===(t=t.states)||void 0===t?void 0:t.length)}_onTap(t,e){t.stopPropagation(),(async(t,e,o,i)=>{const{service:n}=fn[i];let r;if("disarmed"!==i&&o.attributes.code_arm_required||"disarmed"===i&&o.attributes.code_format){var a;const n=await((t,e)=>t.callWS({type:"config/entity_registry/get",entity_id:e}))(e,o.entity_id).catch(()=>{});if(!(null==n||null===(a=n.options)||void 0===a||null===(a=a.alarm_control_panel)||void 0===a?void 0:a.default_code)){const n="disarmed"===i,a=await(await window.loadCardHelpers()).showEnterCodeDialog(t,{codeFormat:o.attributes.code_format,title:e.localize("ui.card.alarm_control_panel."+(n?"disarm":"arm")),submitText:e.localize("ui.card.alarm_control_panel."+(n?"disarm":"arm"))});if(null==a)throw new Error("Code dialog closed");r=a}}await e.callService("alarm_control_panel",n,{entity_id:o.entity_id,code:r})})(this,this.hass,this._stateObj,e)}_handleAction(t){Ni(this,this.hass,this._config,t.detail.action)}render(){if(!this.hass||!this._config||!this._config.entity)return et;const t=this._stateObj;if(!t)return this.renderNotFound(this._config);const e=tg(this.hass,t,this._config.name),o=this._config.icon,i=Dn(this._config),n=Xf(t,i.icon_type),r=this._config.states&&this._config.states.length>0?function(t){return"disarmed"===t.state}(t)?this._config.states.map(t=>({mode:t})):[{mode:"disarmed"}]:[],a=function(t){return Vo!==t.state}(t),s=zo(this.hass);return J` @@ -856,7 +856,7 @@ var t,e,o,i,n,r,a,s,l,c,u,h,d,p,m,f,g,_,v,b,y,w,k,C,$,E,x,A,S,T,M,I,z,P,N,O,B,L, `:et} - `}renderIcon(t,e){const o=dg(t.state),i=pg(t.state);return J` + `}renderIcon(t,e){const o=pg(t.state),i=mg(t.state);return J` - `}static get styles(){return[super.styles,Jf,l` + `}static get styles(){return[super.styles,Qf,l` mushroom-state-item { cursor: pointer; } mushroom-shape-icon.pulse { --shape-animation: 1s ease 0s infinite normal none running pulse; } - `]}};qg=gn([Lt(og)],qg),Vt(),Be(),Nn(),vn();var Wg,Xg=class extends Ot{constructor(...t){super(...t),this.icon="",this.label="",this.avatar="",this.avatarOnly=!1}render(){return J` + `]}};Wg=gn([Lt(ig)],Wg),Vt(),Be(),Nn(),vn();var Xg,Zg=class extends Ot{constructor(...t){super(...t),this.icon="",this.label="",this.avatar="",this.avatarOnly=!1}render(){return J` ${this.avatar?J` `:et} ${this.avatarOnly?et:J` @@ -954,7 +954,7 @@ var t,e,o,i,n,r,a,s,l,c,u,h,d,p,m,f,g,_,v,b,y,w,k,C,$,E,x,A,S,T,M,I,z,P,N,O,B,L, margin-right: initial; margin-left: 0.15em; } - `]}};function Zg(t){return`${eg}-${t}-chip`}function Jg(t){return`${eg}-${t}-chip-editor`}gn([Gt()],Xg.prototype,"icon",void 0),gn([Gt()],Xg.prototype,"label",void 0),gn([Gt()],Xg.prototype,"avatar",void 0),gn([Gt()],Xg.prototype,"avatarOnly",void 0),Xg=gn([Lt("mushroom-chip")],Xg);var Qg,t_,e_=kt(()=>{ug(),Wg=t=>{try{const e=Zg(t.type);if(customElements.get(e)){const o=document.createElement(e,t);return o.setConfig(t),o}const o=document.createElement(e);return customElements.whenDefined(e).then(()=>{try{customElements.upgrade(o),o.setConfig(t)}catch(e){}}),o}catch(e){return void console.error(e)}}}),o_=/* @__PURE__ */$t({EntityChipEditor:()=>t_}),i_=kt(()=>{Vt(),Be(),Oi(),pn(),Oc(),_g(),jg(),Hg(),Rg(),e_(),vn(),Qg=vi((t,e)=>[{name:"entity",selector:{entity:{}}},Ag(e),{name:"content_info",selector:{select:{options:yg(t),mode:"dropdown"}}},{type:"grid",name:"",schema:[{name:"icon",selector:{icon:{}},context:{icon_entity:"entity"}},{name:"icon_color",selector:{ui_color:{}}}]},{name:"use_entity_picture",selector:{boolean:{}}},...lg()]),t_=class extends Ot{constructor(...t){super(...t),this._computeLabel=t=>{const e=ic(this.hass);return Eg.includes(t.name)?e(`editor.card.generic.${t.name}`):this.hass.localize(`ui.panel.lovelace.editor.card.generic.${t.name}`)}}setConfig(t){this._config=t}render(){if(!this.hass||!this._config)return et;const t=Qg(ic(this.hass),this.hass.config.version);return J` + `]}};function Jg(t){return`${og}-${t}-chip`}function Qg(t){return`${og}-${t}-chip-editor`}gn([Gt()],Zg.prototype,"icon",void 0),gn([Gt()],Zg.prototype,"label",void 0),gn([Gt()],Zg.prototype,"avatar",void 0),gn([Gt()],Zg.prototype,"avatarOnly",void 0),Zg=gn([Lt("mushroom-chip")],Zg);var t_,e_,o_=kt(()=>{hg(),Xg=t=>{try{const e=Jg(t.type);if(customElements.get(e)){const o=document.createElement(e,t);return o.setConfig(t),o}const o=document.createElement(e);return customElements.whenDefined(e).then(()=>{try{customElements.upgrade(o),o.setConfig(t)}catch(e){}}),o}catch(e){return void console.error(e)}}}),i_=/* @__PURE__ */$t({EntityChipEditor:()=>e_}),n_=kt(()=>{Vt(),Be(),Oi(),pn(),Bc(),vg(),Hg(),Rg(),Ug(),o_(),vn(),t_=vi((t,e)=>[{name:"entity",selector:{entity:{}}},Sg(e),{name:"content_info",selector:{select:{options:wg(t),mode:"dropdown"}}},{type:"grid",name:"",schema:[{name:"icon",selector:{icon:{}},context:{icon_entity:"entity"}},{name:"icon_color",selector:{ui_color:{}}}]},{name:"use_entity_picture",selector:{boolean:{}}},...cg()]),e_=class extends Ot{constructor(...t){super(...t),this._computeLabel=t=>{const e=nc(this.hass);return xg.includes(t.name)?e(`editor.card.generic.${t.name}`):this.hass.localize(`ui.panel.lovelace.editor.card.generic.${t.name}`)}}setConfig(t){this._config=t}render(){if(!this.hass||!this._config)return et;const t=t_(nc(this.hass),this.hass.config.version);return J` - `}_valueChanged(t){ve(this,"config-changed",{config:t.detail.value})}},gn([Gt({attribute:!1})],t_.prototype,"hass",void 0),gn([ie()],t_.prototype,"_config",void 0),t_=gn([Lt(Jg("entity"))],t_)});Vt(),Be(),je(),Re(),pn(),Rf(),Xf(),e_(),vn();var n_,r_,a_,s_,l_,c_,u_,h_=class extends Ot{static async getConfigElement(){return await Promise.resolve().then(()=>(i_(),o_)),document.createElement(Jg("entity"))}static async getStubConfig(t){return{type:"entity",entity:Object.keys(t.states)[0]}}setConfig(t){this._config=t}_handleAction(t){Ni(this,this.hass,this._config,t.detail.action)}render(){var t;if(!this.hass||!this._config||!this._config.entity)return et;const e=this._config.entity,o=this.hass.states[e];if(!o)return et;const i=Qf(this.hass,o,this._config.name),n=this._config.icon,r=this._config.icon_color,a=this._config.use_entity_picture?Xo(o):void 0,s=this.hass.formatEntityState(o),l=Yo(o),c=qf(null!==(t=this._config.content_info)&&void 0!==t?t:"state",i,s,o,this.hass);return J` + `}_valueChanged(t){ve(this,"config-changed",{config:t.detail.value})}},gn([Gt({attribute:!1})],e_.prototype,"hass",void 0),gn([ie()],e_.prototype,"_config",void 0),e_=gn([Lt(Qg("entity"))],e_)});Vt(),Be(),je(),Re(),pn(),Uf(),Zf(),o_(),vn();var r_,a_,s_,l_,c_,u_,h_,d_=class extends Ot{static async getConfigElement(){return await Promise.resolve().then(()=>(n_(),i_)),document.createElement(Qg("entity"))}static async getStubConfig(t){return{type:"entity",entity:Object.keys(t.states)[0]}}setConfig(t){this._config=t}_handleAction(t){Ni(this,this.hass,this._config,t.detail.action)}render(){var t;if(!this.hass||!this._config||!this._config.entity)return et;const e=this._config.entity,o=this.hass.states[e];if(!o)return et;const i=tg(this.hass,o,this._config.name),n=this._config.icon,r=this._config.icon_color,a=this._config.use_entity_picture?Xo(o):void 0,s=this.hass.formatEntityState(o),l=Yo(o),c=Wf(null!==(t=this._config.content_info)&&void 0!==t?t:"state",i,s,o,this.hass);return J` ${c}`:et} - `}renderIcon(t,e,o,i){const n={};return o&&(n["--color"]=`rgb(${Lf(o)})`),J` + `}renderIcon(t,e,o,i){const n={};return o&&(n["--color"]=`rgb(${Df(o)})`),J` {Vt(),n_=new Set(["partlycloudy","cloudy","fog","windy","windy-variant","hail","rainy","snowy","snowy-rainy","pouring","lightning","lightning-rainy"]),r_=new Set(["hail","rainy","pouring"]),a_=new Set(["windy","windy-variant"]),s_=new Set(["snowy","snowy-rainy"]),l_=new Set(["lightning","lightning-rainy"]),c_=l` + `}};gn([Gt({attribute:!1})],d_.prototype,"hass",void 0),gn([ie()],d_.prototype,"_config",void 0),d_=gn([Lt(Jg("entity"))],d_);var p_,m_,f_,g_,__,v_=kt(()=>{Vt(),r_=new Set(["partlycloudy","cloudy","fog","windy","windy-variant","hail","rainy","snowy","snowy-rainy","pouring","lightning","lightning-rainy"]),a_=new Set(["hail","rainy","pouring"]),s_=new Set(["windy","windy-variant"]),l_=new Set(["snowy","snowy-rainy"]),c_=new Set(["lightning","lightning-rainy"]),u_=l` .rain { fill: var(--weather-icon-rain-color, #30b3ff); } @@ -1004,7 +1004,7 @@ var t,e,o,i,n,r,a,s,l,c,u,h,d,p,m,f,g,_,v,b,y,w,k,C,$,E,x,A,S,T,M,I,z,P,N,O,B,L, .cloud-front { fill: var(--weather-icon-cloud-front-color, #f9f9f9); } -`,u_=(t,e)=>Q` +`,h_=(t,e)=>Q` `:""} - ${n_.has(t)?Q` + ${r_.has(t)?Q` `:""} - ${r_.has(t)?Q` + ${a_.has(t)?Q` `:""} - ${a_.has(t)?Q` + ${s_.has(t)?Q` `:""} - ${s_.has(t)?Q` + ${l_.has(t)?Q` `:""} - ${l_.has(t)?Q` + ${c_.has(t)?Q` `:""} - `}),v_=/* @__PURE__ */$t({WeatherChipEditor:()=>g_}),b_=kt(()=>{Vt(),Be(),Oi(),pn(),Oc(),_g(),Hg(),e_(),vn(),d_=["weather"],p_=["show_conditions","show_temperature"],m_=["more-info","navigate","url","perform-action","assist","none"],f_=vi(()=>[{name:"entity",selector:{entity:{domain:d_}}},{type:"grid",name:"",schema:[{name:"show_conditions",selector:{boolean:{}}},{name:"show_temperature",selector:{boolean:{}}}]},...lg(m_)]),g_=class extends Ot{constructor(...t){super(...t),this._computeLabel=t=>{const e=ic(this.hass);return Eg.includes(t.name)?e(`editor.card.generic.${t.name}`):p_.includes(t.name)?e(`editor.card.weather.${t.name}`):this.hass.localize(`ui.panel.lovelace.editor.card.generic.${t.name}`)}}setConfig(t){this._config=t}render(){if(!this.hass||!this._config)return et;const t=f_();return J` + `}),b_=/* @__PURE__ */$t({WeatherChipEditor:()=>__}),y_=kt(()=>{Vt(),Be(),Oi(),pn(),Bc(),vg(),Rg(),o_(),vn(),p_=["weather"],m_=["show_conditions","show_temperature"],f_=["more-info","navigate","url","perform-action","assist","none"],g_=vi(()=>[{name:"entity",selector:{entity:{domain:p_}}},{type:"grid",name:"",schema:[{name:"show_conditions",selector:{boolean:{}}},{name:"show_temperature",selector:{boolean:{}}}]},...cg(f_)]),__=class extends Ot{constructor(...t){super(...t),this._computeLabel=t=>{const e=nc(this.hass);return xg.includes(t.name)?e(`editor.card.generic.${t.name}`):m_.includes(t.name)?e(`editor.card.weather.${t.name}`):this.hass.localize(`ui.panel.lovelace.editor.card.generic.${t.name}`)}}setConfig(t){this._config=t}render(){if(!this.hass||!this._config)return et;const t=g_();return J` - `}_valueChanged(t){ve(this,"config-changed",{config:t.detail.value})}},gn([Gt({attribute:!1})],g_.prototype,"hass",void 0),gn([ie()],g_.prototype,"_config",void 0),g_=gn([Lt(Jg("weather"))],g_)});Vt(),Be(),pn(),e_(),__(),vn();var y_=class extends Ot{static async getConfigElement(){return await Promise.resolve().then(()=>(b_(),v_)),document.createElement(Jg("weather"))}static async getStubConfig(t){return{type:"weather",entity:Object.keys(t.states).filter(t=>"weather"===t.split(".")[0])[0]}}setConfig(t){this._config=t}_handleAction(t){Ni(this,this.hass,this._config,t.detail.action)}render(){if(!this.hass||!this._config||!this._config.entity)return et;const t=this._config.entity,e=this.hass.states[t];if(!e)return et;const o=u_(e.state,!0),i=[];if(this._config.show_conditions){const t=this.hass.formatEntityState(e);i.push(t)}if(this._config.show_temperature){const t=this.hass.formatEntityAttributeValue(e,"temperature");i.push(t)}return J` + `}_valueChanged(t){ve(this,"config-changed",{config:t.detail.value})}},gn([Gt({attribute:!1})],__.prototype,"hass",void 0),gn([ie()],__.prototype,"_config",void 0),__=gn([Lt(Qg("weather"))],__)});Vt(),Be(),pn(),o_(),v_(),vn();var w_=class extends Ot{static async getConfigElement(){return await Promise.resolve().then(()=>(y_(),b_)),document.createElement(Qg("weather"))}static async getStubConfig(t){return{type:"weather",entity:Object.keys(t.states).filter(t=>"weather"===t.split(".")[0])[0]}}setConfig(t){this._config=t}_handleAction(t){Ni(this,this.hass,this._config,t.detail.action)}render(){if(!this.hass||!this._config||!this._config.entity)return et;const t=this._config.entity,e=this.hass.states[t];if(!e)return et;const o=h_(e.state,!0),i=[];if(this._config.show_conditions){const t=this.hass.formatEntityState(e);i.push(t)}if(this._config.show_temperature){const t=this.hass.formatEntityAttributeValue(e,"temperature");i.push(t)}return J` 0?J`${i.join(" ⸱ ")}`:et} - `}static get styles(){return[c_,l` + `}static get styles(){return[u_,l` mushroom-chip { cursor: pointer; } - `]}};gn([Gt({attribute:!1})],y_.prototype,"hass",void 0),gn([ie()],y_.prototype,"_config",void 0),y_=gn([Lt(Zg("weather"))],y_);var w_,k_,C_,$_,E_,x_,A_,S_,T_,M_,I_,z_,P_,N_,O_,B_,L_,D_,j_,H_,R_,U_,V_,F_,G_,K_,Y_,q_,W_,X_,Z_,J_=/* @__PURE__ */$t({BackChipEditor:()=>k_}),Q_=kt(()=>{Vt(),Be(),pn(),e_(),tv(),vn(),w_=[{name:"icon",selector:{icon:{placeholder:C_}}}],k_=class extends Ot{constructor(...t){super(...t),this._computeLabel=t=>this.hass.localize(`ui.panel.lovelace.editor.card.generic.${t.name}`)}setConfig(t){this._config=t}render(){return this.hass&&this._config?J` + `]}};gn([Gt({attribute:!1})],w_.prototype,"hass",void 0),gn([ie()],w_.prototype,"_config",void 0),w_=gn([Lt(Jg("weather"))],w_);var k_,C_,$_,E_,x_,A_,S_,T_,M_,I_,z_,P_,N_,O_,B_,L_,D_,j_,H_,R_,U_,V_,F_,G_,K_,Y_,q_,W_,X_,Z_,J_,Q_=/* @__PURE__ */$t({BackChipEditor:()=>C_}),tv=kt(()=>{Vt(),Be(),pn(),o_(),ev(),vn(),k_=[{name:"icon",selector:{icon:{placeholder:$_}}}],C_=class extends Ot{constructor(...t){super(...t),this._computeLabel=t=>this.hass.localize(`ui.panel.lovelace.editor.card.generic.${t.name}`)}setConfig(t){this._config=t}render(){return this.hass&&this._config?J` - `:et}_valueChanged(t){ve(this,"config-changed",{config:t.detail.value})}},gn([Gt({attribute:!1})],k_.prototype,"hass",void 0),gn([ie()],k_.prototype,"_config",void 0),k_=gn([Lt(Jg("back"))],k_)}),tv=kt(()=>{Vt(),Be(),pn(),e_(),vn(),C_="mdi:arrow-left",$_=class extends Ot{static async getConfigElement(){return await Promise.resolve().then(()=>(Q_(),J_)),document.createElement(Jg("back"))}static async getStubConfig(t){return{type:"back"}}setConfig(t){this._config=t}_handleAction(){window.history.back()}render(){if(!this.hass||!this._config)return et;const t=this._config.icon||"mdi:arrow-left";return J` + `:et}_valueChanged(t){ve(this,"config-changed",{config:t.detail.value})}},gn([Gt({attribute:!1})],C_.prototype,"hass",void 0),gn([ie()],C_.prototype,"_config",void 0),C_=gn([Lt(Qg("back"))],C_)}),ev=kt(()=>{Vt(),Be(),pn(),o_(),vn(),$_="mdi:arrow-left",E_=class extends Ot{static async getConfigElement(){return await Promise.resolve().then(()=>(tv(),Q_)),document.createElement(Qg("back"))}static async getStubConfig(t){return{type:"back"}}setConfig(t){this._config=t}_handleAction(){window.history.back()}render(){if(!this.hass||!this._config)return et;const t=this._config.icon||"mdi:arrow-left";return J` A_}),ov=kt(()=>{Vt(),Be(),Oi(),pn(),Oc(),_g(),Hg(),e_(),iv(),vn(),E_=["navigate","url","perform-action","assist","none"],x_=vi(()=>[{type:"grid",name:"",schema:[{name:"icon",selector:{icon:{placeholder:S_}}},{name:"icon_color",selector:{ui_color:{}}}]},...lg(E_)]),A_=class extends Ot{constructor(...t){super(...t),this._computeLabel=t=>{const e=ic(this.hass);return Eg.includes(t.name)?e(`editor.card.generic.${t.name}`):this.hass.localize(`ui.panel.lovelace.editor.card.generic.${t.name}`)}}setConfig(t){this._config=t}render(){if(!this.hass||!this._config)return et;const t=x_();return J` + `}},gn([Gt({attribute:!1})],E_.prototype,"hass",void 0),gn([ie()],E_.prototype,"_config",void 0),E_=gn([Lt(Jg("back"))],E_)}),ov=/* @__PURE__ */$t({EntityChipEditor:()=>S_}),iv=kt(()=>{Vt(),Be(),Oi(),pn(),Bc(),vg(),Rg(),o_(),nv(),vn(),x_=["navigate","url","perform-action","assist","none"],A_=vi(()=>[{type:"grid",name:"",schema:[{name:"icon",selector:{icon:{placeholder:T_}}},{name:"icon_color",selector:{ui_color:{}}}]},...cg(x_)]),S_=class extends Ot{constructor(...t){super(...t),this._computeLabel=t=>{const e=nc(this.hass);return xg.includes(t.name)?e(`editor.card.generic.${t.name}`):this.hass.localize(`ui.panel.lovelace.editor.card.generic.${t.name}`)}}setConfig(t){this._config=t}render(){if(!this.hass||!this._config)return et;const t=A_();return J` - `}_valueChanged(t){ve(this,"config-changed",{config:t.detail.value})}},gn([Gt({attribute:!1})],A_.prototype,"hass",void 0),gn([ie()],A_.prototype,"_config",void 0),A_=gn([Lt(Jg("action"))],A_)}),iv=kt(()=>{Vt(),Be(),Re(),pn(),Rf(),e_(),vn(),S_="mdi:flash",T_=class extends Ot{static async getConfigElement(){return await Promise.resolve().then(()=>(ov(),ev)),document.createElement(Jg("action"))}static async getStubConfig(t){return{type:"action"}}setConfig(t){this._config=t}_handleAction(t){Ni(this,this.hass,this._config,t.detail.action)}render(){if(!this.hass||!this._config)return et;const t=this._config.icon||"mdi:flash",e=this._config.icon_color,o={};return e&&(o["--color"]=`rgb(${Lf(e)})`),J` + `}_valueChanged(t){ve(this,"config-changed",{config:t.detail.value})}},gn([Gt({attribute:!1})],S_.prototype,"hass",void 0),gn([ie()],S_.prototype,"_config",void 0),S_=gn([Lt(Qg("action"))],S_)}),nv=kt(()=>{Vt(),Be(),Re(),pn(),Uf(),o_(),vn(),T_="mdi:flash",M_=class extends Ot{static async getConfigElement(){return await Promise.resolve().then(()=>(iv(),ov)),document.createElement(Qg("action"))}static async getStubConfig(t){return{type:"action"}}setConfig(t){this._config=t}_handleAction(t){Ni(this,this.hass,this._config,t.detail.action)}render(){if(!this.hass||!this._config)return et;const t=this._config.icon||"mdi:flash",e=this._config.icon_color,o={};return e&&(o["--color"]=`rgb(${Df(e)})`),J` I_}),rv=kt(()=>{Vt(),Be(),pn(),e_(),av(),vn(),M_=[{name:"icon",selector:{icon:{placeholder:z_}}}],I_=class extends Ot{constructor(...t){super(...t),this._computeLabel=t=>this.hass.localize(`ui.panel.lovelace.editor.card.generic.${t.name}`)}setConfig(t){this._config=t}render(){return this.hass&&this._config?J` + `}},gn([Gt({attribute:!1})],M_.prototype,"hass",void 0),gn([ie()],M_.prototype,"_config",void 0),M_=gn([Lt(Jg("action"))],M_)}),rv=/* @__PURE__ */$t({MenuChipEditor:()=>z_}),av=kt(()=>{Vt(),Be(),pn(),o_(),sv(),vn(),I_=[{name:"icon",selector:{icon:{placeholder:P_}}}],z_=class extends Ot{constructor(...t){super(...t),this._computeLabel=t=>this.hass.localize(`ui.panel.lovelace.editor.card.generic.${t.name}`)}setConfig(t){this._config=t}render(){return this.hass&&this._config?J` - `:et}_valueChanged(t){ve(this,"config-changed",{config:t.detail.value})}},gn([Gt({attribute:!1})],I_.prototype,"hass",void 0),gn([ie()],I_.prototype,"_config",void 0),I_=gn([Lt(Jg("menu"))],I_)}),av=kt(()=>{Vt(),Be(),pn(),e_(),vn(),z_="mdi:menu",P_=class extends Ot{static async getConfigElement(){return await Promise.resolve().then(()=>(rv(),nv)),document.createElement(Jg("menu"))}static async getStubConfig(t){return{type:"menu"}}setConfig(t){this._config=t}_handleAction(){ve(this,"hass-toggle-menu")}render(){if(!this.hass||!this._config)return et;const t=this._config.icon||"mdi:menu";return J` + `:et}_valueChanged(t){ve(this,"config-changed",{config:t.detail.value})}},gn([Gt({attribute:!1})],z_.prototype,"hass",void 0),gn([ie()],z_.prototype,"_config",void 0),z_=gn([Lt(Qg("menu"))],z_)}),sv=kt(()=>{Vt(),Be(),pn(),o_(),vn(),P_="mdi:menu",N_=class extends Ot{static async getConfigElement(){return await Promise.resolve().then(()=>(av(),rv)),document.createElement(Qg("menu"))}static async getStubConfig(t){return{type:"menu"}}setConfig(t){this._config=t}_handleAction(){ve(this,"hass-toggle-menu")}render(){if(!this.hass||!this._config)return et;const t=this._config.icon||"mdi:menu";return J` {N_=/* @__PURE__ */function(t){return t.Command="command",t.Device="device",t.Entity="entity",t}({}),O_=["action","alarm-control-panel","back","conditional","entity","light","menu","quickbar","spacer","template","weather"]}),lv=/* @__PURE__ */$t({QuickBarChipEditor:()=>L_}),cv=kt(()=>{Vt(),Be(),pn(),e_(),sv(),uv(),vn(),B_=[{name:"icon",selector:{icon:{placeholder:D_}}},{name:"mode",selector:{select:{options:[{value:N_.Entity,label:"Entity"},{value:N_.Device,label:"Device"},{value:N_.Command,label:"Command"}]}}}],L_=class extends Ot{constructor(...t){super(...t),this._computeLabel=t=>this.hass.localize(`ui.panel.lovelace.editor.card.generic.${t.name}`)}setConfig(t){this._config=t}render(){return this.hass&&this._config?J` + `}},gn([Gt({attribute:!1})],N_.prototype,"hass",void 0),gn([ie()],N_.prototype,"_config",void 0),N_=gn([Lt(Jg("menu"))],N_)}),lv=kt(()=>{O_=/* @__PURE__ */function(t){return t.Command="command",t.Device="device",t.Entity="entity",t}({}),B_=["action","alarm-control-panel","back","conditional","entity","light","menu","quickbar","spacer","template","weather"]}),cv=/* @__PURE__ */$t({QuickBarChipEditor:()=>D_}),uv=kt(()=>{Vt(),Be(),pn(),o_(),lv(),hv(),vn(),L_=[{name:"icon",selector:{icon:{placeholder:j_}}},{name:"mode",selector:{select:{options:[{value:O_.Entity,label:"Entity"},{value:O_.Device,label:"Device"},{value:O_.Command,label:"Command"}]}}}],D_=class extends Ot{constructor(...t){super(...t),this._computeLabel=t=>this.hass.localize(`ui.panel.lovelace.editor.card.generic.${t.name}`)}setConfig(t){this._config=t}render(){return this.hass&&this._config?J` - `:et}_valueChanged(t){ve(this,"config-changed",{config:t.detail.value})}},gn([Gt({attribute:!1})],L_.prototype,"hass",void 0),gn([ie()],L_.prototype,"_config",void 0),L_=gn([Lt(Jg("quickbar"))],L_)}),uv=kt(()=>{Vt(),Be(),pn(),e_(),sv(),vn(),D_="mdi:magnify",j_=N_.Entity,H_=class extends Ot{static async getConfigElement(){return await Promise.resolve().then(()=>(cv(),lv)),document.createElement(Jg("quickbar"))}static async getStubConfig(t){return{type:"quickbar"}}setConfig(t){this._config=t}_handleAction(){if(!this.hass||!this._config)return;let t;switch(this._config.mode||j_){case N_.Command:t="c";break;case N_.Device:t="d";break;case N_.Entity:t="e"}const e=new KeyboardEvent("keydown",{bubbles:!0,composed:!0,key:t});this.dispatchEvent(e)}render(){if(!this.hass||!this._config)return et;const t=this._config.icon||"mdi:magnify";return J` + `:et}_valueChanged(t){ve(this,"config-changed",{config:t.detail.value})}},gn([Gt({attribute:!1})],D_.prototype,"hass",void 0),gn([ie()],D_.prototype,"_config",void 0),D_=gn([Lt(Qg("quickbar"))],D_)}),hv=kt(()=>{Vt(),Be(),pn(),o_(),lv(),vn(),j_="mdi:magnify",H_=O_.Entity,R_=class extends Ot{static async getConfigElement(){return await Promise.resolve().then(()=>(uv(),cv)),document.createElement(Qg("quickbar"))}static async getStubConfig(t){return{type:"quickbar"}}setConfig(t){this._config=t}_handleAction(){if(!this.hass||!this._config)return;let t;switch(this._config.mode||H_){case O_.Command:t="c";break;case O_.Device:t="d";break;case O_.Entity:t="e"}const e=new KeyboardEvent("keydown",{bubbles:!0,composed:!0,key:t});this.dispatchEvent(e)}render(){if(!this.hass||!this._config)return et;const t=this._config.icon||"mdi:magnify";return J` {!function(o){var i;"object"==typeof t?e.exports=o():"function"==typeof define&&define.amd?define(o):("undefined"!=typeof window?i=window:"undefined"!=typeof global?i=global:"undefined"!=typeof self&&(i=self),i.objectHash=o())}(function(){return function t(e,o,i){function n(a,s){if(!o[a]){if(!e[a]){var l="function"==typeof xt&&xt;if(!s&&l)return l(a,!0);if(r)return r(a,!0);throw new Error("Cannot find module '"+a+"'")}s=o[a]={exports:{}},e[a][0].call(s.exports,function(t){return n(e[a][1][t]||t)},s,s.exports,t,e,o,i)}return o[a].exports}for(var r="function"==typeof xt&&xt,a=0;a>16),l((65280&i)>>8),l(255&i);return 2==n?l(255&(i=c(t.charAt(o))<<2|c(t.charAt(o+1))>>4)):1==n&&(l((i=c(t.charAt(o))<<10|c(t.charAt(o+1))<<4|c(t.charAt(o+2))>>2)>>8&255),l(255&i)),r},t.fromByteArray=function(t){var e,o,i,n,r=t.length%3,a="";function s(t){return"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(t)}for(e=0,i=t.length-r;e>18&63)+s(n>>12&63)+s(n>>6&63)+s(63&n);switch(r){case 1:a=(a+=s((o=t[t.length-1])>>2))+s(o<<4&63)+"==";break;case 2:a=(a=(a+=s((o=(t[t.length-2]<<8)+t[t.length-1])>>10))+s(o>>4&63))+s(o<<2&63)+"="}return a}}(void 0===o?this.base64js={}:o)}).call(this,t("lYpoI2"),"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},t("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/base64-js/lib/b64.js","/node_modules/gulp-browserify/node_modules/base64-js/lib")},{buffer:3,lYpoI2:11}],3:[function(t,e,o){(function(e,i,n,r,a,s,l,c,u){var h=t("base64-js"),d=t("ieee754");function n(t,e,o){if(!(this instanceof n))return new n(t,e,o);var i,r,a,s,l=typeof t;if("base64"===e&&"string"==l)for(t=(s=t).trim?s.trim():s.replace(/^\s+|\s+$/g,"");t.length%4!=0;)t+="=";if("number"==l)i=A(t);else if("string"==l)i=n.byteLength(t,e);else{if("object"!=l)throw new Error("First argument needs to be a number, array or string.");i=A(t.length)}if(n._useTypedArrays?r=n._augment(new Uint8Array(i)):((r=this).length=i,r._isBuffer=!0),n._useTypedArrays&&"number"==typeof t.byteLength)r._set(t);else if(S(s=t)||n.isBuffer(s)||s&&"object"==typeof s&&"number"==typeof s.length)for(a=0;a>>0)):(e+1>>0),n}function f(t,e,o,i){if(i||(L("boolean"==typeof o,"missing or invalid endian"),L(null!=e,"missing offset"),L(e+1>>8*(i?r:1-r)}function y(t,e,o,i,n){if(n||(L(null!=e,"missing value"),L("boolean"==typeof i,"missing or invalid endian"),L(null!=o,"missing offset"),L(o+3>>8*(i?r:3-r)&255}function w(t,e,o,i,n){n||(L(null!=e,"missing value"),L("boolean"==typeof i,"missing or invalid endian"),L(null!=o,"missing offset"),L(o+1>8,o%=256,i.push(o),i.push(e);return i}(e),t,o,i)}(this,t,e,o);break;default:throw new Error("Unknown encoding")}return r},n.prototype.toString=function(t,e,o){var i,n,r,a,s=this;if(t=String(t||"utf8").toLowerCase(),e=Number(e)||0,(o=void 0!==o?Number(o):s.length)===e)return"";switch(t){case"hex":i=function(t,e,o){var i=t.length;(!e||e<0)&&(e=0),(!o||o<0||ithis.length&&(i=this.length);var r=(i=t.length-e=this.length))return this[t]},n.prototype.readUInt16LE=function(t,e){return p(this,t,!0,e)},n.prototype.readUInt16BE=function(t,e){return p(this,t,!1,e)},n.prototype.readUInt32LE=function(t,e){return m(this,t,!0,e)},n.prototype.readUInt32BE=function(t,e){return m(this,t,!1,e)},n.prototype.readInt8=function(t,e){if(e||(L(null!=t,"missing offset"),L(t=this.length))return 128&this[t]?-1*(255-this[t]+1):this[t]},n.prototype.readInt16LE=function(t,e){return f(this,t,!0,e)},n.prototype.readInt16BE=function(t,e){return f(this,t,!1,e)},n.prototype.readInt32LE=function(t,e){return g(this,t,!0,e)},n.prototype.readInt32BE=function(t,e){return g(this,t,!1,e)},n.prototype.readFloatLE=function(t,e){return _(this,t,!0,e)},n.prototype.readFloatBE=function(t,e){return _(this,t,!1,e)},n.prototype.readDoubleLE=function(t,e){return v(this,t,!0,e)},n.prototype.readDoubleBE=function(t,e){return v(this,t,!1,e)},n.prototype.writeUInt8=function(t,e,o){o||(L(null!=t,"missing value"),L(null!=e,"missing offset"),L(e=this.length||(this[e]=t)},n.prototype.writeUInt16LE=function(t,e,o){b(this,t,e,!0,o)},n.prototype.writeUInt16BE=function(t,e,o){b(this,t,e,!1,o)},n.prototype.writeUInt32LE=function(t,e,o){y(this,t,e,!0,o)},n.prototype.writeUInt32BE=function(t,e,o){y(this,t,e,!1,o)},n.prototype.writeInt8=function(t,e,o){o||(L(null!=t,"missing value"),L(null!=e,"missing offset"),L(e=this.length||(0<=t?this.writeUInt8(t,e,o):this.writeUInt8(255+t+1,e,o))},n.prototype.writeInt16LE=function(t,e,o){w(this,t,e,!0,o)},n.prototype.writeInt16BE=function(t,e,o){w(this,t,e,!1,o)},n.prototype.writeInt32LE=function(t,e,o){k(this,t,e,!0,o)},n.prototype.writeInt32BE=function(t,e,o){k(this,t,e,!1,o)},n.prototype.writeFloatLE=function(t,e,o){C(this,t,e,!0,o)},n.prototype.writeFloatBE=function(t,e,o){C(this,t,e,!1,o)},n.prototype.writeDoubleLE=function(t,e,o){$(this,t,e,!0,o)},n.prototype.writeDoubleBE=function(t,e,o){$(this,t,e,!1,o)},n.prototype.fill=function(t,e,o){if(e=e||0,o=o||this.length,L("number"==typeof(t="string"==typeof(t=t||0)?t.charCodeAt(0):t)&&!isNaN(t),"value is not a number"),L(e<=o,"end < start"),o!==e&&0!==this.length){L(0<=e&&e"},n.prototype.toArrayBuffer=function(){if("undefined"==typeof Uint8Array)throw new Error("Buffer.toArrayBuffer not supported in this browser");if(n._useTypedArrays)return new n(this).buffer;for(var t=new Uint8Array(this.length),e=0,o=t.length;e=e.length||n>=t.length);n++)e[n+o]=t[n];return n}function P(t){try{return decodeURIComponent(t)}catch(t){return String.fromCharCode(65533)}}function N(t,e){L("number"==typeof t,"cannot write a non-number as a number"),L(0<=t,"specified a negative value for writing an unsigned value"),L(t<=e,"value is larger than maximum value for type"),L(Math.floor(t)===t,"value has a fractional component")}function O(t,e,o){L("number"==typeof t,"cannot write a non-number as a number"),L(t<=e,"value larger than maximum allowed value"),L(o<=t,"value smaller than minimum allowed value"),L(Math.floor(t)===t,"value has a fractional component")}function B(t,e,o){L("number"==typeof t,"cannot write a non-number as a number"),L(t<=e,"value larger than maximum allowed value"),L(o<=t,"value smaller than minimum allowed value")}function L(t,e){if(!t)throw new Error(e||"Failed assertion")}n._augment=function(t){return t._isBuffer=!0,t._get=t.get,t._set=t.set,t.get=E.get,t.set=E.set,t.write=E.write,t.toString=E.toString,t.toLocaleString=E.toString,t.toJSON=E.toJSON,t.copy=E.copy,t.slice=E.slice,t.readUInt8=E.readUInt8,t.readUInt16LE=E.readUInt16LE,t.readUInt16BE=E.readUInt16BE,t.readUInt32LE=E.readUInt32LE,t.readUInt32BE=E.readUInt32BE,t.readInt8=E.readInt8,t.readInt16LE=E.readInt16LE,t.readInt16BE=E.readInt16BE,t.readInt32LE=E.readInt32LE,t.readInt32BE=E.readInt32BE,t.readFloatLE=E.readFloatLE,t.readFloatBE=E.readFloatBE,t.readDoubleLE=E.readDoubleLE,t.readDoubleBE=E.readDoubleBE,t.writeUInt8=E.writeUInt8,t.writeUInt16LE=E.writeUInt16LE,t.writeUInt16BE=E.writeUInt16BE,t.writeUInt32LE=E.writeUInt32LE,t.writeUInt32BE=E.writeUInt32BE,t.writeInt8=E.writeInt8,t.writeInt16LE=E.writeInt16LE,t.writeInt16BE=E.writeInt16BE,t.writeInt32LE=E.writeInt32LE,t.writeInt32BE=E.writeInt32BE,t.writeFloatLE=E.writeFloatLE,t.writeFloatBE=E.writeFloatBE,t.writeDoubleLE=E.writeDoubleLE,t.writeDoubleBE=E.writeDoubleBE,t.fill=E.fill,t.inspect=E.inspect,t.toArrayBuffer=E.toArrayBuffer,t}}).call(this,t("lYpoI2"),"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},t("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/buffer/index.js","/node_modules/gulp-browserify/node_modules/buffer")},{"base64-js":2,buffer:3,ieee754:10,lYpoI2:11}],4:[function(t,e,o){(function(o,i,n,r,a,s,l,c,u){n=t("buffer").Buffer;var h=new n(4);h.fill(0),e.exports={hash:function(t,e,o,i){for(var r=e(function(t,e){t.length%4!=0&&(o=t.length+(4-t.length%4),t=n.concat([t,h],o));for(var o,i=[],r=e?t.readInt32BE:t.readInt32LE,a=0;af?e=t(e):e.length>5]|=128<>>9<<4)]=e;for(var o=1732584193,i=-271733879,n=-1732584194,r=271733878,a=0;a>>32-n,o)}function m(t,e,o,i,n,r,a){return p(e&o|~e&i,t,e,n,r,a)}function f(t,e,o,i,n,r,a){return p(e&i|o&~i,t,e,n,r,a)}function g(t,e,o,i,n,r,a){return p(e^o^i,t,e,n,r,a)}function _(t,e,o,i,n,r,a){return p(o^(e|~i),t,e,n,r,a)}function v(t,e){var o=(65535&t)+(65535&e);return(t>>16)+(e>>16)+(o>>16)<<16|65535&o}e.exports=function(t){return h.hash(t,d,16)}}).call(this,t("lYpoI2"),"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},t("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/crypto-browserify/md5.js","/node_modules/gulp-browserify/node_modules/crypto-browserify")},{"./helpers":4,buffer:3,lYpoI2:11}],7:[function(t,e,o){(function(t,o,i,n,r,a,s,l,c){e.exports=function(t){for(var e,o=new Array(t),i=0;i>>((3&i)<<3)&255;return o}}).call(this,t("lYpoI2"),"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},t("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/crypto-browserify/rng.js","/node_modules/gulp-browserify/node_modules/crypto-browserify")},{buffer:3,lYpoI2:11}],8:[function(t,e,o){(function(o,i,n,r,a,s,l,c,u){var h=t("./helpers");function d(t,e){t[e>>5]|=128<<24-e%32,t[15+(e+64>>9<<4)]=e;for(var o,i,n,r=Array(80),a=1732584193,s=-271733879,l=-1732584194,c=271733878,u=-1009589776,h=0;h>16)+(e>>16)+(o>>16)<<16|65535&o}function m(t,e){return t<>>32-e}e.exports=function(t){return h.hash(t,d,20,!0)}}).call(this,t("lYpoI2"),"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},t("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/crypto-browserify/sha.js","/node_modules/gulp-browserify/node_modules/crypto-browserify")},{"./helpers":4,buffer:3,lYpoI2:11}],9:[function(t,e,o){(function(o,i,n,r,a,s,l,c,u){function h(t,e){var o=(65535&t)+(65535&e);return(t>>16)+(e>>16)+(o>>16)<<16|65535&o}function d(t,e){var o,i=new Array(1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298),n=new Array(1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225),r=new Array(64);t[e>>5]|=128<<24-e%32,t[15+(e+64>>9<<4)]=e;for(var a,s,l=0;l>>e|t<<32-e},f=function(t,e){return t>>>e};e.exports=function(t){return p.hash(t,d,32,!0)}}).call(this,t("lYpoI2"),"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},t("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/crypto-browserify/sha256.js","/node_modules/gulp-browserify/node_modules/crypto-browserify")},{"./helpers":4,buffer:3,lYpoI2:11}],10:[function(t,e,o){(function(t,e,i,n,r,a,s,l,c){o.read=function(t,e,o,i,n){var r,a,s=8*n-i-1,l=(1<>1,u=-7,h=o?n-1:0,d=o?-1:1;n=t[e+h];for(h+=d,r=n&(1<<-u)-1,n>>=-u,u+=s;0>=-u,u+=i;0>1,h=23===n?Math.pow(2,-24)-Math.pow(2,-77):0,d=i?0:r-1,p=i?1:-1;r=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(s=isNaN(e)?1:0,a=c):(a=Math.floor(Math.log(e)/Math.LN2),e*(i=Math.pow(2,-a))<1&&(a--,i*=2),2<=(e+=1<=a+u?h/i:h*Math.pow(2,1-u))*i&&(a++,i/=2),c<=a+u?(s=0,a=c):1<=a+u?(s=(e*i-1)*Math.pow(2,n),a+=u):(s=e*Math.pow(2,u-1)*Math.pow(2,n),a=0));8<=n;t[o+d]=255&s,d+=p,s/=256,n-=8);for(a=a<{R_=class{constructor(t){this._cache=/* @__PURE__ */new Map,this._expiration=t}get(t){return this._cache.get(t)}set(t,e){this._cache.set(t,e),this._expiration&&window.setTimeout(()=>this._cache.delete(t),this._expiration)}has(t){return this._cache.has(t)}}}),pv=kt(()=>{__(),U_=new Set(["clear-night","cloudy","fog","lightning","lightning-rainy","partlycloudy","pouring","rainy","hail","snowy","snowy-rainy","sunny","windy","windy-variant"]),V_=t=>{if(!t||!t.startsWith("weather-"))return;const e=t.replace("weather-","");return U_.has(e)?u_(e,!0):void 0}}),mv=kt(()=>{ug(),G_=`${F_=`${eg}-legacy-template-card`}-editor`}),fv=kt(()=>{To(),_g(),jg(),Fg(),K_=mo(Pg,mo(gg,sg),Co({entity:$o(Eo()),icon:$o(Eo()),icon_color:$o(Eo()),primary:$o(Eo()),secondary:$o(Eo()),badge_icon:$o(Eo()),badge_color:$o(Eo()),picture:$o(Eo()),multiline_secondary:$o(bo()),entity_id:$o(Ao([Eo(),vo(Eo())]))}))}),gv=/* @__PURE__ */$t({TEMPLATE_LABELS:()=>Y_,TemplateCardEditor:()=>W_}),_v=kt(()=>{Vt(),Be(),To(),pn(),Oc(),_g(),jg(),Yf(),Hg(),Ug(),mv(),fv(),vn(),Y_=["badge_icon","badge_color","content","primary","secondary","multiline_secondary","picture"],q_=t=>[{name:"entity",selector:{entity:{}}},{name:"icon",selector:{template:{}}},{name:"icon_color",selector:{template:{}}},{name:"primary",selector:{template:{}}},{name:"secondary",selector:{template:{}}},{name:"badge_icon",selector:{template:{}}},{name:"badge_color",selector:{template:{}}},{name:"picture",selector:{template:{}}},{type:"grid",name:"",schema:[{name:"layout",selector:{select:{options:Cg(t),mode:"dropdown"}}},{name:"fill_container",selector:{boolean:{}}},{name:"multiline_secondary",selector:{boolean:{}}}]},...lg()],W_=class extends Hf{constructor(...t){super(...t),this._computeLabel=t=>{const e=ic(this.hass);return"entity"===t.name?`${this.hass.localize("ui.panel.lovelace.editor.card.generic.entity")}`:Eg.includes(t.name)?e(`editor.card.generic.${t.name}`):Y_.includes(t.name)?e(`editor.card.template.${t.name}`):this.hass.localize(`ui.panel.lovelace.editor.card.generic.${t.name}`)},this._computeHelper=t=>{const e=ic(this.hass);if("entity"===t.name)return e("editor.card.template.entity_helper_legacy")}}connectedCallback(){super.connectedCallback(),Sg()}setConfig(t){ho(t,K_),this._config=t}render(){if(!this.hass||!this._config)return et;const t=q_(ic(this.hass));return J` + `}},gn([Gt({attribute:!1})],R_.prototype,"hass",void 0),gn([ie()],R_.prototype,"_config",void 0),R_=gn([Lt(Jg("quickbar"))],R_)}),dv=/* @__PURE__ */Ct((t,e)=>{!function(o){var i;"object"==typeof t?e.exports=o():"function"==typeof define&&define.amd?define(o):("undefined"!=typeof window?i=window:"undefined"!=typeof global?i=global:"undefined"!=typeof self&&(i=self),i.objectHash=o())}(function(){return function t(e,o,i){function n(a,s){if(!o[a]){if(!e[a]){var l="function"==typeof xt&&xt;if(!s&&l)return l(a,!0);if(r)return r(a,!0);throw new Error("Cannot find module '"+a+"'")}s=o[a]={exports:{}},e[a][0].call(s.exports,function(t){return n(e[a][1][t]||t)},s,s.exports,t,e,o,i)}return o[a].exports}for(var r="function"==typeof xt&&xt,a=0;a>16),l((65280&i)>>8),l(255&i);return 2==n?l(255&(i=c(t.charAt(o))<<2|c(t.charAt(o+1))>>4)):1==n&&(l((i=c(t.charAt(o))<<10|c(t.charAt(o+1))<<4|c(t.charAt(o+2))>>2)>>8&255),l(255&i)),r},t.fromByteArray=function(t){var e,o,i,n,r=t.length%3,a="";function s(t){return"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(t)}for(e=0,i=t.length-r;e>18&63)+s(n>>12&63)+s(n>>6&63)+s(63&n);switch(r){case 1:a=(a+=s((o=t[t.length-1])>>2))+s(o<<4&63)+"==";break;case 2:a=(a=(a+=s((o=(t[t.length-2]<<8)+t[t.length-1])>>10))+s(o>>4&63))+s(o<<2&63)+"="}return a}}(void 0===o?this.base64js={}:o)}).call(this,t("lYpoI2"),"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},t("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/base64-js/lib/b64.js","/node_modules/gulp-browserify/node_modules/base64-js/lib")},{buffer:3,lYpoI2:11}],3:[function(t,e,o){(function(e,i,n,r,a,s,l,c,u){var h=t("base64-js"),d=t("ieee754");function n(t,e,o){if(!(this instanceof n))return new n(t,e,o);var i,r,a,s,l=typeof t;if("base64"===e&&"string"==l)for(t=(s=t).trim?s.trim():s.replace(/^\s+|\s+$/g,"");t.length%4!=0;)t+="=";if("number"==l)i=A(t);else if("string"==l)i=n.byteLength(t,e);else{if("object"!=l)throw new Error("First argument needs to be a number, array or string.");i=A(t.length)}if(n._useTypedArrays?r=n._augment(new Uint8Array(i)):((r=this).length=i,r._isBuffer=!0),n._useTypedArrays&&"number"==typeof t.byteLength)r._set(t);else if(S(s=t)||n.isBuffer(s)||s&&"object"==typeof s&&"number"==typeof s.length)for(a=0;a>>0)):(e+1>>0),n}function f(t,e,o,i){if(i||(L("boolean"==typeof o,"missing or invalid endian"),L(null!=e,"missing offset"),L(e+1>>8*(i?r:1-r)}function y(t,e,o,i,n){if(n||(L(null!=e,"missing value"),L("boolean"==typeof i,"missing or invalid endian"),L(null!=o,"missing offset"),L(o+3>>8*(i?r:3-r)&255}function w(t,e,o,i,n){n||(L(null!=e,"missing value"),L("boolean"==typeof i,"missing or invalid endian"),L(null!=o,"missing offset"),L(o+1>8,o%=256,i.push(o),i.push(e);return i}(e),t,o,i)}(this,t,e,o);break;default:throw new Error("Unknown encoding")}return r},n.prototype.toString=function(t,e,o){var i,n,r,a,s=this;if(t=String(t||"utf8").toLowerCase(),e=Number(e)||0,(o=void 0!==o?Number(o):s.length)===e)return"";switch(t){case"hex":i=function(t,e,o){var i=t.length;(!e||e<0)&&(e=0),(!o||o<0||ithis.length&&(i=this.length);var r=(i=t.length-e=this.length))return this[t]},n.prototype.readUInt16LE=function(t,e){return p(this,t,!0,e)},n.prototype.readUInt16BE=function(t,e){return p(this,t,!1,e)},n.prototype.readUInt32LE=function(t,e){return m(this,t,!0,e)},n.prototype.readUInt32BE=function(t,e){return m(this,t,!1,e)},n.prototype.readInt8=function(t,e){if(e||(L(null!=t,"missing offset"),L(t=this.length))return 128&this[t]?-1*(255-this[t]+1):this[t]},n.prototype.readInt16LE=function(t,e){return f(this,t,!0,e)},n.prototype.readInt16BE=function(t,e){return f(this,t,!1,e)},n.prototype.readInt32LE=function(t,e){return g(this,t,!0,e)},n.prototype.readInt32BE=function(t,e){return g(this,t,!1,e)},n.prototype.readFloatLE=function(t,e){return _(this,t,!0,e)},n.prototype.readFloatBE=function(t,e){return _(this,t,!1,e)},n.prototype.readDoubleLE=function(t,e){return v(this,t,!0,e)},n.prototype.readDoubleBE=function(t,e){return v(this,t,!1,e)},n.prototype.writeUInt8=function(t,e,o){o||(L(null!=t,"missing value"),L(null!=e,"missing offset"),L(e=this.length||(this[e]=t)},n.prototype.writeUInt16LE=function(t,e,o){b(this,t,e,!0,o)},n.prototype.writeUInt16BE=function(t,e,o){b(this,t,e,!1,o)},n.prototype.writeUInt32LE=function(t,e,o){y(this,t,e,!0,o)},n.prototype.writeUInt32BE=function(t,e,o){y(this,t,e,!1,o)},n.prototype.writeInt8=function(t,e,o){o||(L(null!=t,"missing value"),L(null!=e,"missing offset"),L(e=this.length||(0<=t?this.writeUInt8(t,e,o):this.writeUInt8(255+t+1,e,o))},n.prototype.writeInt16LE=function(t,e,o){w(this,t,e,!0,o)},n.prototype.writeInt16BE=function(t,e,o){w(this,t,e,!1,o)},n.prototype.writeInt32LE=function(t,e,o){k(this,t,e,!0,o)},n.prototype.writeInt32BE=function(t,e,o){k(this,t,e,!1,o)},n.prototype.writeFloatLE=function(t,e,o){C(this,t,e,!0,o)},n.prototype.writeFloatBE=function(t,e,o){C(this,t,e,!1,o)},n.prototype.writeDoubleLE=function(t,e,o){$(this,t,e,!0,o)},n.prototype.writeDoubleBE=function(t,e,o){$(this,t,e,!1,o)},n.prototype.fill=function(t,e,o){if(e=e||0,o=o||this.length,L("number"==typeof(t="string"==typeof(t=t||0)?t.charCodeAt(0):t)&&!isNaN(t),"value is not a number"),L(e<=o,"end < start"),o!==e&&0!==this.length){L(0<=e&&e"},n.prototype.toArrayBuffer=function(){if("undefined"==typeof Uint8Array)throw new Error("Buffer.toArrayBuffer not supported in this browser");if(n._useTypedArrays)return new n(this).buffer;for(var t=new Uint8Array(this.length),e=0,o=t.length;e=e.length||n>=t.length);n++)e[n+o]=t[n];return n}function P(t){try{return decodeURIComponent(t)}catch(t){return String.fromCharCode(65533)}}function N(t,e){L("number"==typeof t,"cannot write a non-number as a number"),L(0<=t,"specified a negative value for writing an unsigned value"),L(t<=e,"value is larger than maximum value for type"),L(Math.floor(t)===t,"value has a fractional component")}function O(t,e,o){L("number"==typeof t,"cannot write a non-number as a number"),L(t<=e,"value larger than maximum allowed value"),L(o<=t,"value smaller than minimum allowed value"),L(Math.floor(t)===t,"value has a fractional component")}function B(t,e,o){L("number"==typeof t,"cannot write a non-number as a number"),L(t<=e,"value larger than maximum allowed value"),L(o<=t,"value smaller than minimum allowed value")}function L(t,e){if(!t)throw new Error(e||"Failed assertion")}n._augment=function(t){return t._isBuffer=!0,t._get=t.get,t._set=t.set,t.get=E.get,t.set=E.set,t.write=E.write,t.toString=E.toString,t.toLocaleString=E.toString,t.toJSON=E.toJSON,t.copy=E.copy,t.slice=E.slice,t.readUInt8=E.readUInt8,t.readUInt16LE=E.readUInt16LE,t.readUInt16BE=E.readUInt16BE,t.readUInt32LE=E.readUInt32LE,t.readUInt32BE=E.readUInt32BE,t.readInt8=E.readInt8,t.readInt16LE=E.readInt16LE,t.readInt16BE=E.readInt16BE,t.readInt32LE=E.readInt32LE,t.readInt32BE=E.readInt32BE,t.readFloatLE=E.readFloatLE,t.readFloatBE=E.readFloatBE,t.readDoubleLE=E.readDoubleLE,t.readDoubleBE=E.readDoubleBE,t.writeUInt8=E.writeUInt8,t.writeUInt16LE=E.writeUInt16LE,t.writeUInt16BE=E.writeUInt16BE,t.writeUInt32LE=E.writeUInt32LE,t.writeUInt32BE=E.writeUInt32BE,t.writeInt8=E.writeInt8,t.writeInt16LE=E.writeInt16LE,t.writeInt16BE=E.writeInt16BE,t.writeInt32LE=E.writeInt32LE,t.writeInt32BE=E.writeInt32BE,t.writeFloatLE=E.writeFloatLE,t.writeFloatBE=E.writeFloatBE,t.writeDoubleLE=E.writeDoubleLE,t.writeDoubleBE=E.writeDoubleBE,t.fill=E.fill,t.inspect=E.inspect,t.toArrayBuffer=E.toArrayBuffer,t}}).call(this,t("lYpoI2"),"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},t("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/buffer/index.js","/node_modules/gulp-browserify/node_modules/buffer")},{"base64-js":2,buffer:3,ieee754:10,lYpoI2:11}],4:[function(t,e,o){(function(o,i,n,r,a,s,l,c,u){n=t("buffer").Buffer;var h=new n(4);h.fill(0),e.exports={hash:function(t,e,o,i){for(var r=e(function(t,e){t.length%4!=0&&(o=t.length+(4-t.length%4),t=n.concat([t,h],o));for(var o,i=[],r=e?t.readInt32BE:t.readInt32LE,a=0;af?e=t(e):e.length>5]|=128<>>9<<4)]=e;for(var o=1732584193,i=-271733879,n=-1732584194,r=271733878,a=0;a>>32-n,o)}function m(t,e,o,i,n,r,a){return p(e&o|~e&i,t,e,n,r,a)}function f(t,e,o,i,n,r,a){return p(e&i|o&~i,t,e,n,r,a)}function g(t,e,o,i,n,r,a){return p(e^o^i,t,e,n,r,a)}function _(t,e,o,i,n,r,a){return p(o^(e|~i),t,e,n,r,a)}function v(t,e){var o=(65535&t)+(65535&e);return(t>>16)+(e>>16)+(o>>16)<<16|65535&o}e.exports=function(t){return h.hash(t,d,16)}}).call(this,t("lYpoI2"),"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},t("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/crypto-browserify/md5.js","/node_modules/gulp-browserify/node_modules/crypto-browserify")},{"./helpers":4,buffer:3,lYpoI2:11}],7:[function(t,e,o){(function(t,o,i,n,r,a,s,l,c){e.exports=function(t){for(var e,o=new Array(t),i=0;i>>((3&i)<<3)&255;return o}}).call(this,t("lYpoI2"),"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},t("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/crypto-browserify/rng.js","/node_modules/gulp-browserify/node_modules/crypto-browserify")},{buffer:3,lYpoI2:11}],8:[function(t,e,o){(function(o,i,n,r,a,s,l,c,u){var h=t("./helpers");function d(t,e){t[e>>5]|=128<<24-e%32,t[15+(e+64>>9<<4)]=e;for(var o,i,n,r=Array(80),a=1732584193,s=-271733879,l=-1732584194,c=271733878,u=-1009589776,h=0;h>16)+(e>>16)+(o>>16)<<16|65535&o}function m(t,e){return t<>>32-e}e.exports=function(t){return h.hash(t,d,20,!0)}}).call(this,t("lYpoI2"),"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},t("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/crypto-browserify/sha.js","/node_modules/gulp-browserify/node_modules/crypto-browserify")},{"./helpers":4,buffer:3,lYpoI2:11}],9:[function(t,e,o){(function(o,i,n,r,a,s,l,c,u){function h(t,e){var o=(65535&t)+(65535&e);return(t>>16)+(e>>16)+(o>>16)<<16|65535&o}function d(t,e){var o,i=new Array(1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298),n=new Array(1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225),r=new Array(64);t[e>>5]|=128<<24-e%32,t[15+(e+64>>9<<4)]=e;for(var a,s,l=0;l>>e|t<<32-e},f=function(t,e){return t>>>e};e.exports=function(t){return p.hash(t,d,32,!0)}}).call(this,t("lYpoI2"),"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},t("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/crypto-browserify/sha256.js","/node_modules/gulp-browserify/node_modules/crypto-browserify")},{"./helpers":4,buffer:3,lYpoI2:11}],10:[function(t,e,o){(function(t,e,i,n,r,a,s,l,c){o.read=function(t,e,o,i,n){var r,a,s=8*n-i-1,l=(1<>1,u=-7,h=o?n-1:0,d=o?-1:1;n=t[e+h];for(h+=d,r=n&(1<<-u)-1,n>>=-u,u+=s;0>=-u,u+=i;0>1,h=23===n?Math.pow(2,-24)-Math.pow(2,-77):0,d=i?0:r-1,p=i?1:-1;r=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(s=isNaN(e)?1:0,a=c):(a=Math.floor(Math.log(e)/Math.LN2),e*(i=Math.pow(2,-a))<1&&(a--,i*=2),2<=(e+=1<=a+u?h/i:h*Math.pow(2,1-u))*i&&(a++,i/=2),c<=a+u?(s=0,a=c):1<=a+u?(s=(e*i-1)*Math.pow(2,n),a+=u):(s=e*Math.pow(2,u-1)*Math.pow(2,n),a=0));8<=n;t[o+d]=255&s,d+=p,s/=256,n-=8);for(a=a<{U_=class{constructor(t){this._cache=/* @__PURE__ */new Map,this._expiration=t}get(t){return this._cache.get(t)}set(t,e){this._cache.set(t,e),this._expiration&&window.setTimeout(()=>this._cache.delete(t),this._expiration)}has(t){return this._cache.has(t)}}}),mv=kt(()=>{v_(),V_=new Set(["clear-night","cloudy","fog","lightning","lightning-rainy","partlycloudy","pouring","rainy","hail","snowy","snowy-rainy","sunny","windy","windy-variant"]),F_=t=>{if(!t||!t.startsWith("weather-"))return;const e=t.replace("weather-","");return V_.has(e)?h_(e,!0):void 0}}),fv=kt(()=>{hg(),K_=`${G_=`${og}-legacy-template-card`}-editor`}),gv=kt(()=>{To(),vg(),Hg(),Gg(),Y_=mo(Ng,mo(_g,lg),Co({entity:$o(Eo()),icon:$o(Eo()),icon_color:$o(Eo()),primary:$o(Eo()),secondary:$o(Eo()),badge_icon:$o(Eo()),badge_color:$o(Eo()),picture:$o(Eo()),multiline_secondary:$o(bo()),entity_id:$o(Ao([Eo(),vo(Eo())]))}))}),_v=/* @__PURE__ */$t({TEMPLATE_LABELS:()=>q_,TemplateCardEditor:()=>X_}),vv=kt(()=>{Vt(),Be(),To(),pn(),Bc(),vg(),Hg(),qf(),Rg(),Vg(),fv(),gv(),vn(),q_=["badge_icon","badge_color","content","primary","secondary","multiline_secondary","picture"],W_=t=>[{name:"entity",selector:{entity:{}}},{name:"icon",selector:{template:{}}},{name:"icon_color",selector:{template:{}}},{name:"primary",selector:{template:{}}},{name:"secondary",selector:{template:{}}},{name:"badge_icon",selector:{template:{}}},{name:"badge_color",selector:{template:{}}},{name:"picture",selector:{template:{}}},{type:"grid",name:"",schema:[{name:"layout",selector:{select:{options:$g(t),mode:"dropdown"}}},{name:"fill_container",selector:{boolean:{}}},{name:"multiline_secondary",selector:{boolean:{}}}]},...cg()],X_=class extends Rf{constructor(...t){super(...t),this._computeLabel=t=>{const e=nc(this.hass);return"entity"===t.name?`${this.hass.localize("ui.panel.lovelace.editor.card.generic.entity")}`:xg.includes(t.name)?e(`editor.card.generic.${t.name}`):q_.includes(t.name)?e(`editor.card.template.${t.name}`):this.hass.localize(`ui.panel.lovelace.editor.card.generic.${t.name}`)},this._computeHelper=t=>{const e=nc(this.hass);if("entity"===t.name)return e("editor.card.template.entity_helper_legacy")}}connectedCallback(){super.connectedCallback(),Tg()}setConfig(t){ho(t,Y_),this._config=t}render(){if(!this.hass||!this._config)return et;const t=W_(nc(this.hass));return J` - `}_valueChanged(t){ve(this,"config-changed",{config:t.detail.value})}},gn([ie()],W_.prototype,"_config",void 0),W_=gn([Lt(G_)],W_)}),vv=/* @__PURE__ */$t({EntityChipEditor:()=>Z_}),bv=kt(()=>{Vt(),Be(),pn(),Oc(),_g(),Hg(),e_(),_v(),vn(),X_=[{name:"entity",selector:{entity:{}}},{name:"icon",selector:{template:{}}},{name:"icon_color",selector:{template:{}}},{name:"picture",selector:{template:{}}},{name:"content",selector:{template:{}}},...lg()],Z_=class extends Ot{constructor(...t){super(...t),this._computeLabel=t=>{const e=ic(this.hass);return"entity"===t.name?`${this.hass.localize("ui.panel.lovelace.editor.card.generic.entity")} (${e("editor.card.template.entity_helper")})`:Eg.includes(t.name)?e(`editor.card.generic.${t.name}`):Y_.includes(t.name)?e(`editor.card.template.${t.name}`):this.hass.localize(`ui.panel.lovelace.editor.card.generic.${t.name}`)}}setConfig(t){this._config=t}render(){return this.hass&&this._config?J` + `}_valueChanged(t){ve(this,"config-changed",{config:t.detail.value})}},gn([ie()],X_.prototype,"_config",void 0),X_=gn([Lt(K_)],X_)}),bv=/* @__PURE__ */$t({EntityChipEditor:()=>J_}),yv=kt(()=>{Vt(),Be(),pn(),Bc(),vg(),Rg(),o_(),vv(),vn(),Z_=[{name:"entity",selector:{entity:{}}},{name:"icon",selector:{template:{}}},{name:"icon_color",selector:{template:{}}},{name:"picture",selector:{template:{}}},{name:"content",selector:{template:{}}},...cg()],J_=class extends Ot{constructor(...t){super(...t),this._computeLabel=t=>{const e=nc(this.hass);return"entity"===t.name?`${this.hass.localize("ui.panel.lovelace.editor.card.generic.entity")} (${e("editor.card.template.entity_helper")})`:xg.includes(t.name)?e(`editor.card.generic.${t.name}`):q_.includes(t.name)?e(`editor.card.template.${t.name}`):this.hass.localize(`ui.panel.lovelace.editor.card.generic.${t.name}`)}}setConfig(t){this._config=t}render(){return this.hass&&this._config?J` - `:et}_valueChanged(t){ve(this,"config-changed",{config:t.detail.value})}},gn([Gt({attribute:!1})],Z_.prototype,"hass",void 0),gn([ie()],Z_.prototype,"_config",void 0),Z_=gn([Lt(Jg("template"))],Z_)});Vt(),Be(),Re();var yv=/* @__PURE__ */Et(hv());pn(),dv(),Rf(),pv(),e_(),__(),vn(),oe();var wv,kv,Cv,$v,Ev,xv,Av,Sv,Tv,Mv,Iv,zv,Pv,Nv,Ov,Bv,Lv,Dv,jv,Hv,Rv,Uv,Vv,Fv,Gv,Kv,Yv,qv,Wv,Xv,Zv,Jv,Qv,tb,eb,ob,ib,nb,rb,ab,sb,lb,cb,ub,hb,db,pb,mb,fb,gb,_b,vb,bb,yb,wb,kb,Cb,$b,Eb,xb,Ab,Sb,Tb,Mb,Ib,zb,Pb,Nb,Ob,Bb,Lb,Db,jb,Hb,Rb,Ub,Vb,Fb,Gb,Kb,Yb,qb,Wb,Xb,Zb,Jb,Qb,ty,ey,oy,iy=new R_(1e3),ny=["content","icon","icon_color","picture"],ry=class extends Ot{constructor(...t){super(...t),this._unsubRenderTemplates=/* @__PURE__ */new Map}static async getConfigElement(){return await Promise.resolve().then(()=>(bv(),vv)),document.createElement(Jg("template"))}static async getStubConfig(t){return{type:"template"}}setConfig(t){ny.forEach(e=>{var o,i;(null===(o=this._config)||void 0===o?void 0:o[e])===t[e]&&(null===(i=this._config)||void 0===i?void 0:i.entity)==t.entity||this._tryDisconnectKey(e)}),this._config=ee({tap_action:{action:"toggle"},hold_action:{action:"more-info"}},t)}connectedCallback(){super.connectedCallback(),this._tryConnect()}disconnectedCallback(){if(super.disconnectedCallback(),this._tryDisconnect(),this._config&&this._templateResults){const t=this._computeCacheKey();iy.set(t,this._templateResults)}}_computeCacheKey(){return(0,yv.default)(this._config)}willUpdate(t){if(super.willUpdate(t),this._config&&!this._templateResults){const t=this._computeCacheKey();iy.has(t)?this._templateResults=iy.get(t):this._templateResults={}}}_handleAction(t){Ni(this,this.hass,this._config,t.detail.action)}isTemplate(t){var e;const o=null===(e=this._config)||void 0===e?void 0:e[t];return null==o?void 0:o.includes("{")}getValue(t){var e,o;return this.isTemplate(t)?null===(e=this._templateResults)||void 0===e||null===(e=e[t])||void 0===e||null===(e=e.result)||void 0===e?void 0:e.toString():null===(o=this._config)||void 0===o?void 0:o[t]}render(){if(!this.hass||!this._config)return et;const t=this.getValue("icon"),e=this.getValue("icon_color"),o=this.getValue("content"),i=this.getValue("picture"),n=zo(this.hass),r=V_(t);return J` + `:et}_valueChanged(t){ve(this,"config-changed",{config:t.detail.value})}},gn([Gt({attribute:!1})],J_.prototype,"hass",void 0),gn([ie()],J_.prototype,"_config",void 0),J_=gn([Lt(Qg("template"))],J_)});Vt(),Be(),Re();var wv=/* @__PURE__ */Et(dv());pn(),pv(),Uf(),mv(),o_(),v_(),vn(),oe();var kv,Cv,$v,Ev,xv,Av,Sv,Tv,Mv,Iv,zv,Pv,Nv,Ov,Bv,Lv,Dv,jv,Hv,Rv,Uv,Vv,Fv,Gv,Kv,Yv,qv,Wv,Xv,Zv,Jv,Qv,tb,eb,ob,ib,nb,rb,ab,sb,lb,cb,ub,hb,db,pb,mb,fb,gb,_b,vb,bb,yb,wb,kb,Cb,$b,Eb,xb,Ab,Sb,Tb,Mb,Ib,zb,Pb,Nb,Ob,Bb,Lb,Db,jb,Hb,Rb,Ub,Vb,Fb,Gb,Kb,Yb,qb,Wb,Xb,Zb,Jb,Qb,ty,ey,oy,iy,ny=new U_(1e3),ry=["content","icon","icon_color","picture"],ay=class extends Ot{constructor(...t){super(...t),this._unsubRenderTemplates=/* @__PURE__ */new Map}static async getConfigElement(){return await Promise.resolve().then(()=>(yv(),bv)),document.createElement(Qg("template"))}static async getStubConfig(t){return{type:"template"}}setConfig(t){ry.forEach(e=>{var o,i;(null===(o=this._config)||void 0===o?void 0:o[e])===t[e]&&(null===(i=this._config)||void 0===i?void 0:i.entity)==t.entity||this._tryDisconnectKey(e)}),this._config=ee({tap_action:{action:"toggle"},hold_action:{action:"more-info"}},t)}connectedCallback(){super.connectedCallback(),this._tryConnect()}disconnectedCallback(){if(super.disconnectedCallback(),this._tryDisconnect(),this._config&&this._templateResults){const t=this._computeCacheKey();ny.set(t,this._templateResults)}}_computeCacheKey(){return(0,wv.default)(this._config)}willUpdate(t){if(super.willUpdate(t),this._config&&!this._templateResults){const t=this._computeCacheKey();ny.has(t)?this._templateResults=ny.get(t):this._templateResults={}}}_handleAction(t){Ni(this,this.hass,this._config,t.detail.action)}isTemplate(t){var e;const o=null===(e=this._config)||void 0===e?void 0:e[t];return null==o?void 0:o.includes("{")}getValue(t){var e,o;return this.isTemplate(t)?null===(e=this._templateResults)||void 0===e||null===(e=e[t])||void 0===e||null===(e=e.result)||void 0===e?void 0:e.toString():null===(o=this._config)||void 0===o?void 0:o[t]}render(){if(!this.hass||!this._config)return et;const t=this.getValue("icon"),e=this.getValue("icon_color"),o=this.getValue("content"),i=this.getValue("picture"),n=zo(this.hass),r=F_(t);return J` - `}renderIcon(t,e){const o={};return e&&(o["--color"]=`rgb(${Lf(e)})`),J``}renderContent(t){return J`${t}`}updated(t){super.updated(t),this._config&&this.hass&&this._tryConnect()}async _tryConnect(){var t=this;ny.forEach(e=>{t._tryConnectKey(e)})}async _tryConnectKey(t){var e=this;if(void 0===e._unsubRenderTemplates.get(t)&&e.hass&&e._config&&e.isTemplate(t))try{var o;const i=Si(e.hass.connection,o=>{e._templateResults=ee(ee({},e._templateResults),{},{[t]:o})},{template:null!==(o=e._config[t])&&void 0!==o?o:"",entity_ids:e._config.entity_id,variables:{config:e._config,user:e.hass.user.name,entity:e._config.entity},strict:!0});e._unsubRenderTemplates.set(t,i),await i}catch(n){var i;const o={result:null!==(i=e._config[t])&&void 0!==i?i:"",listeners:{all:!1,domains:[],entities:[],time:!1}};e._templateResults=ee(ee({},e._templateResults),{},{[t]:o}),e._unsubRenderTemplates.delete(t)}}async _tryDisconnect(){var t=this;ny.forEach(e=>{t._tryDisconnectKey(e)})}async _tryDisconnectKey(t){const e=this._unsubRenderTemplates.get(t);if(e){this._unsubRenderTemplates.delete(t);try{await(await e)()}catch(o){if("not_found"!==o.code&&"template_error"!==o.code)throw o}}}static get styles(){return l` + >`}renderContent(t){return J`${t}`}updated(t){super.updated(t),this._config&&this.hass&&this._tryConnect()}async _tryConnect(){var t=this;ry.forEach(e=>{t._tryConnectKey(e)})}async _tryConnectKey(t){var e=this;if(void 0===e._unsubRenderTemplates.get(t)&&e.hass&&e._config&&e.isTemplate(t))try{var o;const i=Si(e.hass.connection,o=>{e._templateResults=ee(ee({},e._templateResults),{},{[t]:o})},{template:null!==(o=e._config[t])&&void 0!==o?o:"",entity_ids:e._config.entity_id,variables:{config:e._config,user:e.hass.user.name,entity:e._config.entity},strict:!0});e._unsubRenderTemplates.set(t,i),await i}catch(n){var i;const o={result:null!==(i=e._config[t])&&void 0!==i?i:"",listeners:{all:!1,domains:[],entities:[],time:!1}};e._templateResults=ee(ee({},e._templateResults),{},{[t]:o}),e._unsubRenderTemplates.delete(t)}}async _tryDisconnect(){var t=this;ry.forEach(e=>{t._tryDisconnectKey(e)})}async _tryDisconnectKey(t){const e=this._unsubRenderTemplates.get(t);if(e){this._unsubRenderTemplates.delete(t);try{await(await e)()}catch(o){if("not_found"!==o.code&&"template_error"!==o.code)throw o}}}static get styles(){return l` mushroom-chip { cursor: pointer; } ha-state-icon { color: var(--color); } - ${c_} - `}};function ay(t){return null==t}function sy(t){return"object"==typeof t&&null!==t}function ly(t){return Array.isArray(t)?t:ay(t)?[]:[t]}function cy(t,e){var o,i,n,r;if(e)for(o=0,i=(r=Object.keys(e)).length;os&&(e=i-s+(r=" ... ").length),o-i>s&&(o=i+s-(a=" ...").length),{str:r+t.slice(e,o).replace(/\t/g,"→")+a,pos:i-e+r.length}}function fy(t,e){return wv.repeat(" ",e-t.length)+t}function gy(t,e){if(e=Object.create(e||null),!t.buffer)return null;e.maxLength||(e.maxLength=79),"number"!=typeof e.indent&&(e.indent=1),"number"!=typeof e.linesBefore&&(e.linesBefore=3),"number"!=typeof e.linesAfter&&(e.linesAfter=2);for(var o,i=/\r?\n|\r|\0/g,n=[0],r=[],a=-1;o=i.exec(t.buffer);)r.push(o.index),n.push(o.index+o[0].length),t.position<=o.index&&a<0&&(a=n.length-2);a<0&&(a=n.length-1);var s,l,c="",u=Math.min(t.line+e.linesAfter,r.length).toString().length,h=e.maxLength-(e.indent+u+3);for(s=1;s<=e.linesBefore&&!(a-s<0);s++)l=my(t.buffer,n[a-s],r[a-s],t.position-(n[a]-n[a-s]),h),c=wv.repeat(" ",e.indent)+fy((t.line-s+1).toString(),u)+" | "+l.str+"\n"+c;for(l=my(t.buffer,n[a],r[a],t.position,h),c+=wv.repeat(" ",e.indent)+fy((t.line+1).toString(),u)+" | "+l.str+"\n",c+=wv.repeat("-",e.indent+u+3+l.pos)+"^\n",s=1;s<=e.linesAfter&&!(a+s>=r.length);s++)l=my(t.buffer,n[a+s],r[a+s],t.position-(n[a]-n[a+s]),h),c+=wv.repeat(" ",e.indent)+fy((t.line+s+1).toString(),u)+" | "+l.str+"\n";return c.replace(/\n$/,"")}function _y(t,e){if(e=e||{},Object.keys(e).forEach(function(e){if(-1===$v.indexOf(e))throw new kv('Unknown option "'+e+'" is met in definition of "'+t+'" YAML type.')}),this.options=e,this.tag=t,this.kind=e.kind||null,this.resolve=e.resolve||function(){return!0},this.construct=e.construct||function(t){return t},this.instanceOf=e.instanceOf||null,this.predicate=e.predicate||null,this.represent=e.represent||null,this.representName=e.representName||null,this.defaultStyle=e.defaultStyle||null,this.multi=e.multi||!1,this.styleAliases=function(t){var e={};return null!==t&&Object.keys(t).forEach(function(o){t[o].forEach(function(t){e[String(t)]=o})}),e}(e.styleAliases||null),-1===Ev.indexOf(this.kind))throw new kv('Unknown kind "'+this.kind+'" is specified for "'+t+'" YAML type.')}function vy(t,e){var o=[];return t[e].forEach(function(t){var e=o.length;o.forEach(function(o,i){o.tag===t.tag&&o.kind===t.kind&&o.multi===t.multi&&(e=i)}),o[e]=t}),o}function by(t){return this.extend(t)}function yy(t){if(null===t)return!0;var e=t.length;return 1===e&&"~"===t||4===e&&("null"===t||"Null"===t||"NULL"===t)}function wy(){return null}function ky(t){return null===t}function Cy(t){if(null===t)return!1;var e=t.length;return 4===e&&("true"===t||"True"===t||"TRUE"===t)||5===e&&("false"===t||"False"===t||"FALSE"===t)}function $y(t){return"true"===t||"True"===t||"TRUE"===t}function Ey(t){return"[object Boolean]"===Object.prototype.toString.call(t)}function xy(t){return 48<=t&&t<=57||65<=t&&t<=70||97<=t&&t<=102}function Ay(t){return 48<=t&&t<=55}function Sy(t){return 48<=t&&t<=57}function Ty(t){if(null===t)return!1;var e,o=t.length,i=0,n=!1;if(!o)return!1;if("-"!==(e=t[i])&&"+"!==e||(e=t[++i]),"0"===e){if(i+1===o)return!0;if("b"===(e=t[++i])){for(i++;i=0&&(e=e.slice(1)),".inf"===e?1===o?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:".nan"===e?NaN:o*parseFloat(e,10)}function Ny(t,e){var o;if(isNaN(t))switch(e){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===t)switch(e){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===t)switch(e){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(wv.isNegativeZero(t))return"-0.0";return o=t.toString(10),Bv.test(o)?o.replace("e",".e"):o}function Oy(t){return"[object Number]"===Object.prototype.toString.call(t)&&(t%1!=0||wv.isNegativeZero(t))}function By(t){return null!==t&&(null!==Hv.exec(t)||null!==Rv.exec(t))}function Ly(t){var e,o,i,n,r,a,s,l,c=0,u=null;if(null===(e=Hv.exec(t))&&(e=Rv.exec(t)),null===e)throw new Error("Date resolve error");if(o=+e[1],i=+e[2]-1,n=+e[3],!e[4])return new Date(Date.UTC(o,i,n));if(r=+e[4],a=+e[5],s=+e[6],e[7]){for(c=e[7].slice(0,3);c.length<3;)c+="0";c=+c}return e[9]&&(u=6e4*(60*+e[10]+ +(e[11]||0)),"-"===e[9]&&(u=-u)),l=new Date(Date.UTC(o,i,n,r,a,s,c)),u&&l.setTime(l.getTime()-u),l}function Dy(t){return t.toISOString()}function jy(t){return"<<"===t||null===t}function Hy(t){if(null===t)return!1;var e,o,i=0,n=t.length,r=Fv;for(o=0;o64)){if(e<0)return!1;i+=6}return i%8==0}function Ry(t){var e,o,i=t.replace(/[\r\n=]/g,""),n=i.length,r=Fv,a=0,s=[];for(e=0;e>16&255),s.push(a>>8&255),s.push(255&a)),a=a<<6|r.indexOf(i.charAt(e));return 0===(o=n%4*6)?(s.push(a>>16&255),s.push(a>>8&255),s.push(255&a)):18===o?(s.push(a>>10&255),s.push(a>>2&255)):12===o&&s.push(a>>4&255),new Uint8Array(s)}function Uy(t){var e,o,i="",n=0,r=t.length,a=Fv;for(e=0;e>18&63],i+=a[n>>12&63],i+=a[n>>6&63],i+=a[63&n]),n=(n<<8)+t[e];return 0===(o=r%3)?(i+=a[n>>18&63],i+=a[n>>12&63],i+=a[n>>6&63],i+=a[63&n]):2===o?(i+=a[n>>10&63],i+=a[n>>4&63],i+=a[n<<2&63],i+=a[64]):1===o&&(i+=a[n>>2&63],i+=a[n<<4&63],i+=a[64],i+=a[64]),i}function Vy(t){return"[object Uint8Array]"===Object.prototype.toString.call(t)}function Fy(t){if(null===t)return!0;var e,o,i,n,r,a=[],s=t;for(e=0,o=s.length;e>10),56320+(t-65536&1023))}function aw(t,e,o){"__proto__"===e?Object.defineProperty(t,e,{configurable:!0,enumerable:!0,writable:!0,value:o}):t[e]=o}function sw(t,e){this.input=t,this.filename=e.filename||null,this.schema=e.schema||Qv,this.onWarning=e.onWarning||null,this.legacy=e.legacy||!1,this.json=e.json||!1,this.listener=e.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=t.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.firstTabInLine=-1,this.documents=[]}function lw(t,e){var o={name:t.filename,buffer:t.input.slice(0,-1),position:t.position,line:t.line,column:t.position-t.lineStart};return o.snippet=Cv(o),new kv(e,o)}function cw(t,e){throw lw(t,e)}function uw(t,e){t.onWarning&&t.onWarning.call(null,lw(t,e))}function hw(t,e,o,i){var n,r,a,s;if(e1&&(t.result+=wv.repeat("\n",e-1))}function vw(t,e){var o,i,n=t.tag,r=t.anchor,a=[],s=!1;if(-1!==t.firstTabInLine)return!1;for(null!==t.anchor&&(t.anchorMap[t.anchor]=a),i=t.input.charCodeAt(t.position);0!==i&&(-1!==t.firstTabInLine&&(t.position=t.firstTabInLine,cw(t,"tab characters must not be used in indentation")),45===i)&&Qy(t.input.charCodeAt(t.position+1));)if(s=!0,t.position++,fw(t,!0,-1)&&t.lineIndent<=e)a.push(null),i=t.input.charCodeAt(t.position);else if(o=t.line,ww(t,e,ib,!1,!0),a.push(t.result),fw(t,!0,-1),i=t.input.charCodeAt(t.position),(t.line===o||t.lineIndent>e)&&0!==i)cw(t,"bad indentation of a sequence entry");else if(t.lineIndente?m=1:t.lineIndent===e?m=0:t.lineIndente?m=1:t.lineIndent===e?m=0:t.lineIndente)&&(_&&(a=t.line,s=t.lineStart,l=t.position),ww(t,e,nb,!0,n)&&(_?f=t.result:g=t.result),_||(pw(t,d,p,m,f,g,a,s,l),m=f=g=null),fw(t,!0,-1),c=t.input.charCodeAt(t.position)),(t.line===r||t.lineIndent>e)&&0!==c)cw(t,"bad indentation of a mapping entry");else if(t.lineIndent=0))break;0===n?cw(t,"bad explicit indentation width of a block scalar; it cannot be less than one"):s?cw(t,"repeat of an indentation width identifier"):(l=e+n-1,s=!0)}if(Jy(h)){do{h=t.input.charCodeAt(++t.position)}while(Jy(h));if(35===h)do{h=t.input.charCodeAt(++t.position)}while(!Zy(h)&&0!==h)}for(;0!==h;){for(mw(t),t.lineIndent=0,h=t.input.charCodeAt(t.position);(!s||t.lineIndentl&&(l=t.lineIndent),Zy(h))c++;else{if(t.lineIndent0){for(n=a,r=0;n>0;n--)(a=ew(s=t.input.charCodeAt(++t.position)))>=0?r=(r<<4)+a:cw(t,"expected hexadecimal character");t.result+=rw(r),t.position++}else cw(t,"unknown escape sequence");o=i=t.position}else Zy(s)?(hw(t,o,i,!0),_w(t,fw(t,!1,e)),o=i=t.position):t.position===t.lineStart&&gw(t)?cw(t,"unexpected end of the document within a double quoted scalar"):(t.position++,i=t.position)}cw(t,"unexpected end of the stream within a double quoted scalar")}(t,d)?g=!0:!function(t){var e,o,i=t.input.charCodeAt(t.position);if(42!==i)return!1;for(i=t.input.charCodeAt(++t.position),e=t.position;0!==i&&!Qy(i)&&!tw(i);)i=t.input.charCodeAt(++t.position);return t.position===e&&cw(t,"name of an alias node must contain at least one character"),o=t.input.slice(e,t.position),tb.call(t.anchorMap,o)||cw(t,'unidentified alias "'+o+'"'),t.result=t.anchorMap[o],fw(t,!0,-1),!0}(t)?function(t,e,o){var i,n,r,a,s,l,c,u=t.kind,h=t.result,d=t.input.charCodeAt(t.position);if(Qy(d)||tw(d)||35===d||38===d||42===d||33===d||124===d||62===d||39===d||34===d||37===d||64===d||96===d)return!1;if((63===d||45===d)&&(Qy(i=t.input.charCodeAt(t.position+1))||o&&tw(i)))return!1;for(t.kind="scalar",t.result="",n=r=t.position,a=!1;0!==d;){if(58===d){if(Qy(i=t.input.charCodeAt(t.position+1))||o&&tw(i))break}else if(35===d){if(Qy(t.input.charCodeAt(t.position-1)))break}else{if(t.position===t.lineStart&&gw(t)||o&&tw(d))break;if(Zy(d)){if(s=t.line,l=t.lineStart,c=t.lineIndent,fw(t,!1,-1),t.lineIndent>=e){a=!0,d=t.input.charCodeAt(t.position);continue}t.position=r,t.line=s,t.lineStart=l,t.lineIndent=c;break}}a&&(hw(t,n,r,!1),_w(t,t.line-s),n=r=t.position,a=!1),Jy(d)||(r=t.position+1),d=t.input.charCodeAt(++t.position)}return hw(t,n,r,!1),!!t.result||(t.kind=u,t.result=h,!1)}(t,d,eb===o)&&(g=!0,null===t.tag&&(t.tag="?")):(g=!0,null===t.tag&&null===t.anchor||cw(t,"alias node should not have any properties")),null!==t.anchor&&(t.anchorMap[t.anchor]=t.result)):0===m&&(g=s&&vw(t,p))),null===t.tag)null!==t.anchor&&(t.anchorMap[t.anchor]=t.result);else if("?"===t.tag){for(null!==t.result&&"scalar"!==t.kind&&cw(t,'unacceptable node kind for ! tag; it should be "scalar", not "'+t.kind+'"'),l=0,c=t.implicitTypes.length;l"),null!==t.result&&h.kind!==t.kind&&cw(t,"unacceptable node kind for !<"+t.tag+'> tag; it should be "'+h.kind+'", not "'+t.kind+'"'),h.resolve(t.result,t.tag)?(t.result=h.construct(t.result,t.tag),null!==t.anchor&&(t.anchorMap[t.anchor]=t.result)):cw(t,"cannot resolve a node with !<"+t.tag+"> explicit tag")}return null!==t.listener&&t.listener("close",t),null!==t.tag||null!==t.anchor||g}function kw(t){var e,o,i,n,r=t.position,a=!1;for(t.version=null,t.checkLineBreaks=t.legacy,t.tagMap=Object.create(null),t.anchorMap=Object.create(null);0!==(n=t.input.charCodeAt(t.position))&&(fw(t,!0,-1),n=t.input.charCodeAt(t.position),!(t.lineIndent>0||37!==n));){for(a=!0,n=t.input.charCodeAt(++t.position),e=t.position;0!==n&&!Qy(n);)n=t.input.charCodeAt(++t.position);for(i=[],(o=t.input.slice(e,t.position)).length<1&&cw(t,"directive name must not be less than one character in length");0!==n;){for(;Jy(n);)n=t.input.charCodeAt(++t.position);if(35===n){do{n=t.input.charCodeAt(++t.position)}while(0!==n&&!Zy(n));break}if(Zy(n))break;for(e=t.position;0!==n&&!Qy(n);)n=t.input.charCodeAt(++t.position);i.push(t.input.slice(e,t.position))}0!==n&&mw(t),tb.call(gb,o)?gb[o](t,o,i):uw(t,'unknown document directive "'+o+'"')}fw(t,!0,-1),0===t.lineIndent&&45===t.input.charCodeAt(t.position)&&45===t.input.charCodeAt(t.position+1)&&45===t.input.charCodeAt(t.position+2)?(t.position+=3,fw(t,!0,-1)):a&&cw(t,"directives end mark is expected"),ww(t,t.lineIndent-1,nb,!1,!0),fw(t,!0,-1),t.checkLineBreaks&&cb.test(t.input.slice(r,t.position))&&uw(t,"non-ASCII line breaks are interpreted as content"),t.documents.push(t.result),t.position===t.lineStart&&gw(t)?46===t.input.charCodeAt(t.position)&&(t.position+=3,fw(t,!0,-1)):t.position=55296&&i<=56319&&e+1=56320&&o<=57343?1024*(i-55296)+o-56320+65536:i}function Ow(t){return/^\n* /.test(t)}function Bw(t,e,o,i,n,r,a,s){var l,c=0,u=null,h=!1,d=!1,p=-1!==i,m=-1,f=function(t){return Iw(t)&&t!==yb&&!Mw(t)&&t!==Pb&&t!==Lb&&t!==Nb&&t!==zb&&t!==jb&&t!==Hb&&t!==Ub&&t!==Fb&&t!==Ab&&t!==Tb&&t!==Ib&&t!==Eb&&t!==Vb&&t!==Ob&&t!==Bb&&t!==Mb&&t!==xb&&t!==Sb&&t!==Db&&t!==Rb}(Nw(t,0))&&function(t){return!Mw(t)&&t!==Nb}(Nw(t,t.length-1));if(e||a)for(l=0;l=65536?l+=2:l++){if(!Iw(c=Nw(t,l)))return ty;f=f&&Pw(c,u,s),u=c}else{for(l=0;l=65536?l+=2:l++){if((c=Nw(t,l))===kb)h=!0,p&&(d=d||l-m-1>i&&" "!==t[m+1],m=l);else if(!Iw(c))return ty;f=f&&Pw(c,u,s),u=c}d=d||p&&l-m-1>i&&" "!==t[m+1]}return h||d?o>9&&Ow(t)?ty:a?r===Wb?ty:Zb:d?Qb:Jb:!f||a||n(t)?r===Wb?ty:Zb:Xb}function Lw(t,e,o,i,n){t.dump=function(){if(0===e.length)return t.quotingType===Wb?'""':"''";if(!t.noCompatMode&&(-1!==Kb.indexOf(e)||Yb.test(e)))return t.quotingType===Wb?'"'+e+'"':"'"+e+"'";var r=t.indent*Math.max(1,o),a=-1===t.lineWidth?-1:Math.max(Math.min(t.lineWidth,40),t.lineWidth-r),s=i||t.flowLevel>-1&&o>=t.flowLevel;switch(Bw(e,s,t.indent,a,function(e){return function(t,e){var o,i;for(o=0,i=t.implicitTypes.length;o"+Dw(e,t.indent)+jw(Sw(function(t,e){var o,i,n=/(\n+)([^\n]*)/g,r=(s=t.indexOf("\n"),s=-1!==s?s:t.length,n.lastIndex=s,Hw(t.slice(0,s),e)),a="\n"===t[0]||" "===t[0];var s;for(;i=n.exec(t);){var l=i[1],c=i[2];o=" "===c[0],r+=l+(a||o||""===c?"":"\n")+Hw(c,e),a=o}return r}(e,a),r));case ty:return'"'+function(t){for(var e,o="",i=0,n=0;n=65536?n+=2:n++)i=Nw(t,n),!(e=Gb[i])&&Iw(i)?(o+=t[n],i>=65536&&(o+=t[n+1])):o+=e||xw(i);return o}(e)+'"';default:throw new kv("impossible error: invalid scalar style")}}()}function Dw(t,e){var o=Ow(t)?String(e):"",i="\n"===t[t.length-1];return o+(!i||"\n"!==t[t.length-2]&&"\n"!==t?i?"":"-":"+")+"\n"}function jw(t){return"\n"===t[t.length-1]?t.slice(0,-1):t}function Hw(t,e){if(""===t||" "===t[0])return t;for(var o,i,n=/ [^ ]/g,r=0,a=0,s=0,l="";o=n.exec(t);)(s=o.index)-r>e&&(i=a>r?a:s,l+="\n"+t.slice(r,i),r=i+1),a=s;return l+="\n",t.length-r>e&&a>r?l+=t.slice(r,a)+"\n"+t.slice(a+1):l+=t.slice(r),l.slice(1)}function Rw(t,e,o,i){var n,r,a,s="",l=t.tag;for(n=0,r=o.length;n tag resolver accepts not "'+s+'" style');i=a.represent[s](e,s)}t.dump=i}return!0}return!1}function Vw(t,e,o,i,n,r,a){t.tag=null,t.dump=o,Uw(t,o,!1)||Uw(t,o,!0);var s,l=vb.call(t.dump),c=i;i&&(i=t.flowLevel<0||t.flowLevel>e);var u,h,d="[object Object]"===l||"[object Array]"===l;if(d&&(h=-1!==(u=t.duplicates.indexOf(o))),(null!==t.tag&&"?"!==t.tag||h||2!==t.indent&&e>0)&&(n=!1),h&&t.usedDuplicates[u])t.dump="*ref_"+u;else{if(d&&h&&!t.usedDuplicates[u]&&(t.usedDuplicates[u]=!0),"[object Object]"===l)i&&0!==Object.keys(t.dump).length?(!function(t,e,o,i){var n,r,a,s,l,c,u="",h=t.tag,d=Object.keys(o);if(!0===t.sortKeys)d.sort();else if("function"==typeof t.sortKeys)d.sort(t.sortKeys);else if(t.sortKeys)throw new kv("sortKeys must be a boolean or a function");for(n=0,r=d.length;n1024)&&(t.dump&&kb===t.dump.charCodeAt(0)?c+="?":c+="? "),c+=t.dump,l&&(c+=Tw(t,e)),Vw(t,e+1,s,!0,l)&&(t.dump&&kb===t.dump.charCodeAt(0)?c+=":":c+=": ",u+=c+=t.dump));t.tag=h,t.dump=u||"{}"}(t,e,t.dump,n),h&&(t.dump="&ref_"+u+t.dump)):(!function(t,e,o){var i,n,r,a,s,l="",c=t.tag,u=Object.keys(o);for(i=0,n=u.length;i1024&&(s+="? "),s+=t.dump+(t.condenseFlow?'"':"")+":"+(t.condenseFlow?"":" "),Vw(t,e,a,!1,!1)&&(l+=s+=t.dump));t.tag=c,t.dump="{"+l+"}"}(t,e,t.dump),h&&(t.dump="&ref_"+u+" "+t.dump));else if("[object Array]"===l)i&&0!==t.dump.length?(t.noArrayIndent&&!a&&e>0?Rw(t,e-1,t.dump,n):Rw(t,e,t.dump,n),h&&(t.dump="&ref_"+u+t.dump)):(!function(t,e,o){var i,n,r,a="",s=t.tag;for(i=0,n=o.length;i",t.dump=s+" "+t.dump)}return!0}function Fw(t,e){var o,i,n=[],r=[];for(Gw(t,n,r),o=0,i=r.length;o{for(wv={isNothing:ay,isObject:sy,toArray:ly,repeat:uy,isNegativeZero:hy,extend:cy},py.prototype=Object.create(Error.prototype),py.prototype.constructor=py,py.prototype.toString=function(t){return this.name+": "+dy(this,t)},kv=py,Cv=gy,$v=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],Ev=["scalar","sequence","mapping"],xv=_y,by.prototype.extend=function(t){var e=[],o=[];if(t instanceof xv)o.push(t);else if(Array.isArray(t))o=o.concat(t);else{if(!t||!Array.isArray(t.implicit)&&!Array.isArray(t.explicit))throw new kv("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");t.implicit&&(e=e.concat(t.implicit)),t.explicit&&(o=o.concat(t.explicit))}e.forEach(function(t){if(!(t instanceof xv))throw new kv("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(t.loadKind&&"scalar"!==t.loadKind)throw new kv("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(t.multi)throw new kv("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),o.forEach(function(t){if(!(t instanceof xv))throw new kv("Specified list of YAML types (or a single Type object) contains a non-Type object.")});var i=Object.create(by.prototype);return i.implicit=(this.implicit||[]).concat(e),i.explicit=(this.explicit||[]).concat(o),i.compiledImplicit=vy(i,"implicit"),i.compiledExplicit=vy(i,"explicit"),i.compiledTypeMap=function(){var t,e,o={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}};function i(t){t.multi?(o.multi[t.kind].push(t),o.multi.fallback.push(t)):o[t.kind][t.tag]=o.fallback[t.tag]=t}for(t=0,e=arguments.length;t=0?"0b"+t.toString(2):"-0b"+t.toString(2).slice(1)},octal:function(t){return t>=0?"0o"+t.toString(8):"-0o"+t.toString(8).slice(1)},decimal:function(t){return t.toString(10)},hexadecimal:function(t){return t>=0?"0x"+t.toString(16).toUpperCase():"-0x"+t.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),Ov=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$"),Bv=/^[-+]?[0-9]+e/,Lv=new xv("tag:yaml.org,2002:float",{kind:"scalar",resolve:zy,construct:Py,predicate:Oy,represent:Ny,defaultStyle:"lowercase"}),Dv=Iv.extend({implicit:[zv,Pv,Nv,Lv]}),jv=Dv,Hv=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),Rv=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$"),Uv=new xv("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:By,construct:Ly,instanceOf:Date,represent:Dy}),Vv=new xv("tag:yaml.org,2002:merge",{kind:"scalar",resolve:jy}),Fv="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r",Gv=new xv("tag:yaml.org,2002:binary",{kind:"scalar",resolve:Hy,construct:Ry,predicate:Vy,represent:Uy}),Kv=Object.prototype.hasOwnProperty,Yv=Object.prototype.toString,qv=new xv("tag:yaml.org,2002:omap",{kind:"sequence",resolve:Fy,construct:Gy}),Wv=Object.prototype.toString,Xv=new xv("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:Ky,construct:Yy}),Zv=Object.prototype.hasOwnProperty,Jv=new xv("tag:yaml.org,2002:set",{kind:"mapping",resolve:qy,construct:Wy}),Qv=jv.extend({implicit:[Uv,Vv],explicit:[Gv,qv,Xv,Jv]}),tb=Object.prototype.hasOwnProperty,eb=1,ob=2,ib=3,nb=4,rb=1,ab=2,sb=3,lb=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,cb=/[\x85\u2028\u2029]/,ub=/[,\[\]\{\}]/,hb=/^(?:!|!!|![a-z\-]+!)$/i,db=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i,pb=new Array(256),mb=new Array(256),fb=0;fb<256;fb++)pb[fb]=nw(fb)?1:0,mb[fb]=nw(fb);gb={YAML:function(t,e,o){var i,n,r;null!==t.version&&cw(t,"duplication of %YAML directive"),1!==o.length&&cw(t,"YAML directive accepts exactly one argument"),null===(i=/^([0-9]+)\.([0-9]+)$/.exec(o[0]))&&cw(t,"ill-formed argument of the YAML directive"),n=parseInt(i[1],10),r=parseInt(i[2],10),1!==n&&cw(t,"unacceptable YAML version of the document"),t.version=o[0],t.checkLineBreaks=r<2,1!==r&&2!==r&&uw(t,"unsupported YAML version of the document")},TAG:function(t,e,o){var i,n;2!==o.length&&cw(t,"TAG directive accepts exactly two arguments"),i=o[0],n=o[1],hb.test(i)||cw(t,"ill-formed tag handle (first argument) of the TAG directive"),tb.call(t.tagMap,i)&&cw(t,'there is a previously declared suffix for "'+i+'" tag handle'),db.test(n)||cw(t,"ill-formed tag prefix (second argument) of the TAG directive");try{n=decodeURIComponent(n)}catch(r){cw(t,"tag prefix is malformed: "+n)}t.tagMap[i]=n}},_b={loadAll:$w,load:Ew},vb=Object.prototype.toString,bb=Object.prototype.hasOwnProperty,yb=65279,wb=9,kb=10,Cb=13,$b=32,Eb=33,xb=34,Ab=35,Sb=37,Tb=38,Mb=39,Ib=42,zb=44,Pb=45,Nb=58,Ob=61,Bb=62,Lb=63,Db=64,jb=91,Hb=93,Rb=96,Ub=123,Vb=124,Fb=125,(Gb={})[0]="\\0",Gb[7]="\\a",Gb[8]="\\b",Gb[9]="\\t",Gb[10]="\\n",Gb[11]="\\v",Gb[12]="\\f",Gb[13]="\\r",Gb[27]="\\e",Gb[34]='\\"',Gb[92]="\\\\",Gb[133]="\\N",Gb[160]="\\_",Gb[8232]="\\L",Gb[8233]="\\P",Kb=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],Yb=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/,qb=1,Wb=2,Xb=1,Zb=2,Jb=3,Qb=4,ty=5,ey=_b.load,oy={dump:Kw}.dump,Yw("safeLoad","load"),Yw("safeLoadAll","loadAll"),Yw("safeDump","dump")}),ok=kt(()=>{qw=class extends Error{constructor(t,e,o){super(t),this.name="GUISupportError",this.warnings=e,this.errors=o}}}),ik=kt(()=>{ek(),Vt(),Be(),pn(),ok(),vn(),Ww=class extends Ot{constructor(...t){super(...t),this._guiMode=!0,this._loading=!1}get yaml(){return this._yaml||(this._yaml=oy(this._config)),this._yaml||""}set yaml(t){this._yaml=t;try{this._config=ey(this.yaml),this._errors=void 0}catch(e){this._errors=[e.message]}this._setConfig()}get value(){return this._config}set value(t){this._config&&No(t,this._config)||(this._config=t,this._yaml=void 0,this._errors=void 0,this._setConfig())}_setConfig(){var t;if(!this._errors)try{this._updateConfigElement()}catch(e){this._errors=[e.message]}ve(this,"config-changed",{config:this.value,error:null===(t=this._errors)||void 0===t?void 0:t.join(", "),guiModeAvailable:!(this.hasWarning||this.hasError||!1===this._guiSupported)})}get hasWarning(){return void 0!==this._warnings&&this._warnings.length>0}get hasError(){return void 0!==this._errors&&this._errors.length>0}get GUImode(){return this._guiMode}set GUImode(t){this._guiMode=t,ve(this,"GUImode-changed",{guiMode:t,guiModeAvailable:!(this.hasWarning||this.hasError||!1===this._guiSupported)})}toggleMode(){this.GUImode=!this.GUImode}focusYamlEditor(){var t,e;(null===(t=this._configElement)||void 0===t?void 0:t.focusYamlEditor)&&this._configElement.focusYamlEditor(),(null===(e=this._yamlEditor)||void 0===e?void 0:e.codemirror)&&this._yamlEditor.codemirror.focus()}async getConfigElement(){}get configElementType(){return this.value?this.value.type:void 0}render(){return J` + ${u_} + `}};function sy(t){return null==t}function ly(t){return"object"==typeof t&&null!==t}function cy(t){return Array.isArray(t)?t:sy(t)?[]:[t]}function uy(t,e){var o,i,n,r;if(e)for(o=0,i=(r=Object.keys(e)).length;os&&(e=i-s+(r=" ... ").length),o-i>s&&(o=i+s-(a=" ...").length),{str:r+t.slice(e,o).replace(/\t/g,"→")+a,pos:i-e+r.length}}function gy(t,e){return kv.repeat(" ",e-t.length)+t}function _y(t,e){if(e=Object.create(e||null),!t.buffer)return null;e.maxLength||(e.maxLength=79),"number"!=typeof e.indent&&(e.indent=1),"number"!=typeof e.linesBefore&&(e.linesBefore=3),"number"!=typeof e.linesAfter&&(e.linesAfter=2);for(var o,i=/\r?\n|\r|\0/g,n=[0],r=[],a=-1;o=i.exec(t.buffer);)r.push(o.index),n.push(o.index+o[0].length),t.position<=o.index&&a<0&&(a=n.length-2);a<0&&(a=n.length-1);var s,l,c="",u=Math.min(t.line+e.linesAfter,r.length).toString().length,h=e.maxLength-(e.indent+u+3);for(s=1;s<=e.linesBefore&&!(a-s<0);s++)l=fy(t.buffer,n[a-s],r[a-s],t.position-(n[a]-n[a-s]),h),c=kv.repeat(" ",e.indent)+gy((t.line-s+1).toString(),u)+" | "+l.str+"\n"+c;for(l=fy(t.buffer,n[a],r[a],t.position,h),c+=kv.repeat(" ",e.indent)+gy((t.line+1).toString(),u)+" | "+l.str+"\n",c+=kv.repeat("-",e.indent+u+3+l.pos)+"^\n",s=1;s<=e.linesAfter&&!(a+s>=r.length);s++)l=fy(t.buffer,n[a+s],r[a+s],t.position-(n[a]-n[a+s]),h),c+=kv.repeat(" ",e.indent)+gy((t.line+s+1).toString(),u)+" | "+l.str+"\n";return c.replace(/\n$/,"")}function vy(t,e){if(e=e||{},Object.keys(e).forEach(function(e){if(-1===Ev.indexOf(e))throw new Cv('Unknown option "'+e+'" is met in definition of "'+t+'" YAML type.')}),this.options=e,this.tag=t,this.kind=e.kind||null,this.resolve=e.resolve||function(){return!0},this.construct=e.construct||function(t){return t},this.instanceOf=e.instanceOf||null,this.predicate=e.predicate||null,this.represent=e.represent||null,this.representName=e.representName||null,this.defaultStyle=e.defaultStyle||null,this.multi=e.multi||!1,this.styleAliases=function(t){var e={};return null!==t&&Object.keys(t).forEach(function(o){t[o].forEach(function(t){e[String(t)]=o})}),e}(e.styleAliases||null),-1===xv.indexOf(this.kind))throw new Cv('Unknown kind "'+this.kind+'" is specified for "'+t+'" YAML type.')}function by(t,e){var o=[];return t[e].forEach(function(t){var e=o.length;o.forEach(function(o,i){o.tag===t.tag&&o.kind===t.kind&&o.multi===t.multi&&(e=i)}),o[e]=t}),o}function yy(t){return this.extend(t)}function wy(t){if(null===t)return!0;var e=t.length;return 1===e&&"~"===t||4===e&&("null"===t||"Null"===t||"NULL"===t)}function ky(){return null}function Cy(t){return null===t}function $y(t){if(null===t)return!1;var e=t.length;return 4===e&&("true"===t||"True"===t||"TRUE"===t)||5===e&&("false"===t||"False"===t||"FALSE"===t)}function Ey(t){return"true"===t||"True"===t||"TRUE"===t}function xy(t){return"[object Boolean]"===Object.prototype.toString.call(t)}function Ay(t){return 48<=t&&t<=57||65<=t&&t<=70||97<=t&&t<=102}function Sy(t){return 48<=t&&t<=55}function Ty(t){return 48<=t&&t<=57}function My(t){if(null===t)return!1;var e,o=t.length,i=0,n=!1;if(!o)return!1;if("-"!==(e=t[i])&&"+"!==e||(e=t[++i]),"0"===e){if(i+1===o)return!0;if("b"===(e=t[++i])){for(i++;i=0&&(e=e.slice(1)),".inf"===e?1===o?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:".nan"===e?NaN:o*parseFloat(e,10)}function Oy(t,e){var o;if(isNaN(t))switch(e){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===t)switch(e){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===t)switch(e){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(kv.isNegativeZero(t))return"-0.0";return o=t.toString(10),Lv.test(o)?o.replace("e",".e"):o}function By(t){return"[object Number]"===Object.prototype.toString.call(t)&&(t%1!=0||kv.isNegativeZero(t))}function Ly(t){return null!==t&&(null!==Rv.exec(t)||null!==Uv.exec(t))}function Dy(t){var e,o,i,n,r,a,s,l,c=0,u=null;if(null===(e=Rv.exec(t))&&(e=Uv.exec(t)),null===e)throw new Error("Date resolve error");if(o=+e[1],i=+e[2]-1,n=+e[3],!e[4])return new Date(Date.UTC(o,i,n));if(r=+e[4],a=+e[5],s=+e[6],e[7]){for(c=e[7].slice(0,3);c.length<3;)c+="0";c=+c}return e[9]&&(u=6e4*(60*+e[10]+ +(e[11]||0)),"-"===e[9]&&(u=-u)),l=new Date(Date.UTC(o,i,n,r,a,s,c)),u&&l.setTime(l.getTime()-u),l}function jy(t){return t.toISOString()}function Hy(t){return"<<"===t||null===t}function Ry(t){if(null===t)return!1;var e,o,i=0,n=t.length,r=Gv;for(o=0;o64)){if(e<0)return!1;i+=6}return i%8==0}function Uy(t){var e,o,i=t.replace(/[\r\n=]/g,""),n=i.length,r=Gv,a=0,s=[];for(e=0;e>16&255),s.push(a>>8&255),s.push(255&a)),a=a<<6|r.indexOf(i.charAt(e));return 0===(o=n%4*6)?(s.push(a>>16&255),s.push(a>>8&255),s.push(255&a)):18===o?(s.push(a>>10&255),s.push(a>>2&255)):12===o&&s.push(a>>4&255),new Uint8Array(s)}function Vy(t){var e,o,i="",n=0,r=t.length,a=Gv;for(e=0;e>18&63],i+=a[n>>12&63],i+=a[n>>6&63],i+=a[63&n]),n=(n<<8)+t[e];return 0===(o=r%3)?(i+=a[n>>18&63],i+=a[n>>12&63],i+=a[n>>6&63],i+=a[63&n]):2===o?(i+=a[n>>10&63],i+=a[n>>4&63],i+=a[n<<2&63],i+=a[64]):1===o&&(i+=a[n>>2&63],i+=a[n<<4&63],i+=a[64],i+=a[64]),i}function Fy(t){return"[object Uint8Array]"===Object.prototype.toString.call(t)}function Gy(t){if(null===t)return!0;var e,o,i,n,r,a=[],s=t;for(e=0,o=s.length;e>10),56320+(t-65536&1023))}function sw(t,e,o){"__proto__"===e?Object.defineProperty(t,e,{configurable:!0,enumerable:!0,writable:!0,value:o}):t[e]=o}function lw(t,e){this.input=t,this.filename=e.filename||null,this.schema=e.schema||tb,this.onWarning=e.onWarning||null,this.legacy=e.legacy||!1,this.json=e.json||!1,this.listener=e.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=t.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.firstTabInLine=-1,this.documents=[]}function cw(t,e){var o={name:t.filename,buffer:t.input.slice(0,-1),position:t.position,line:t.line,column:t.position-t.lineStart};return o.snippet=$v(o),new Cv(e,o)}function uw(t,e){throw cw(t,e)}function hw(t,e){t.onWarning&&t.onWarning.call(null,cw(t,e))}function dw(t,e,o,i){var n,r,a,s;if(e1&&(t.result+=kv.repeat("\n",e-1))}function bw(t,e){var o,i,n=t.tag,r=t.anchor,a=[],s=!1;if(-1!==t.firstTabInLine)return!1;for(null!==t.anchor&&(t.anchorMap[t.anchor]=a),i=t.input.charCodeAt(t.position);0!==i&&(-1!==t.firstTabInLine&&(t.position=t.firstTabInLine,uw(t,"tab characters must not be used in indentation")),45===i)&&tw(t.input.charCodeAt(t.position+1));)if(s=!0,t.position++,gw(t,!0,-1)&&t.lineIndent<=e)a.push(null),i=t.input.charCodeAt(t.position);else if(o=t.line,kw(t,e,nb,!1,!0),a.push(t.result),gw(t,!0,-1),i=t.input.charCodeAt(t.position),(t.line===o||t.lineIndent>e)&&0!==i)uw(t,"bad indentation of a sequence entry");else if(t.lineIndente?m=1:t.lineIndent===e?m=0:t.lineIndente?m=1:t.lineIndent===e?m=0:t.lineIndente)&&(_&&(a=t.line,s=t.lineStart,l=t.position),kw(t,e,rb,!0,n)&&(_?f=t.result:g=t.result),_||(mw(t,d,p,m,f,g,a,s,l),m=f=g=null),gw(t,!0,-1),c=t.input.charCodeAt(t.position)),(t.line===r||t.lineIndent>e)&&0!==c)uw(t,"bad indentation of a mapping entry");else if(t.lineIndent=0))break;0===n?uw(t,"bad explicit indentation width of a block scalar; it cannot be less than one"):s?uw(t,"repeat of an indentation width identifier"):(l=e+n-1,s=!0)}if(Qy(h)){do{h=t.input.charCodeAt(++t.position)}while(Qy(h));if(35===h)do{h=t.input.charCodeAt(++t.position)}while(!Jy(h)&&0!==h)}for(;0!==h;){for(fw(t),t.lineIndent=0,h=t.input.charCodeAt(t.position);(!s||t.lineIndentl&&(l=t.lineIndent),Jy(h))c++;else{if(t.lineIndent0){for(n=a,r=0;n>0;n--)(a=ow(s=t.input.charCodeAt(++t.position)))>=0?r=(r<<4)+a:uw(t,"expected hexadecimal character");t.result+=aw(r),t.position++}else uw(t,"unknown escape sequence");o=i=t.position}else Jy(s)?(dw(t,o,i,!0),vw(t,gw(t,!1,e)),o=i=t.position):t.position===t.lineStart&&_w(t)?uw(t,"unexpected end of the document within a double quoted scalar"):(t.position++,i=t.position)}uw(t,"unexpected end of the stream within a double quoted scalar")}(t,d)?g=!0:!function(t){var e,o,i=t.input.charCodeAt(t.position);if(42!==i)return!1;for(i=t.input.charCodeAt(++t.position),e=t.position;0!==i&&!tw(i)&&!ew(i);)i=t.input.charCodeAt(++t.position);return t.position===e&&uw(t,"name of an alias node must contain at least one character"),o=t.input.slice(e,t.position),eb.call(t.anchorMap,o)||uw(t,'unidentified alias "'+o+'"'),t.result=t.anchorMap[o],gw(t,!0,-1),!0}(t)?function(t,e,o){var i,n,r,a,s,l,c,u=t.kind,h=t.result,d=t.input.charCodeAt(t.position);if(tw(d)||ew(d)||35===d||38===d||42===d||33===d||124===d||62===d||39===d||34===d||37===d||64===d||96===d)return!1;if((63===d||45===d)&&(tw(i=t.input.charCodeAt(t.position+1))||o&&ew(i)))return!1;for(t.kind="scalar",t.result="",n=r=t.position,a=!1;0!==d;){if(58===d){if(tw(i=t.input.charCodeAt(t.position+1))||o&&ew(i))break}else if(35===d){if(tw(t.input.charCodeAt(t.position-1)))break}else{if(t.position===t.lineStart&&_w(t)||o&&ew(d))break;if(Jy(d)){if(s=t.line,l=t.lineStart,c=t.lineIndent,gw(t,!1,-1),t.lineIndent>=e){a=!0,d=t.input.charCodeAt(t.position);continue}t.position=r,t.line=s,t.lineStart=l,t.lineIndent=c;break}}a&&(dw(t,n,r,!1),vw(t,t.line-s),n=r=t.position,a=!1),Qy(d)||(r=t.position+1),d=t.input.charCodeAt(++t.position)}return dw(t,n,r,!1),!!t.result||(t.kind=u,t.result=h,!1)}(t,d,ob===o)&&(g=!0,null===t.tag&&(t.tag="?")):(g=!0,null===t.tag&&null===t.anchor||uw(t,"alias node should not have any properties")),null!==t.anchor&&(t.anchorMap[t.anchor]=t.result)):0===m&&(g=s&&bw(t,p))),null===t.tag)null!==t.anchor&&(t.anchorMap[t.anchor]=t.result);else if("?"===t.tag){for(null!==t.result&&"scalar"!==t.kind&&uw(t,'unacceptable node kind for ! tag; it should be "scalar", not "'+t.kind+'"'),l=0,c=t.implicitTypes.length;l"),null!==t.result&&h.kind!==t.kind&&uw(t,"unacceptable node kind for !<"+t.tag+'> tag; it should be "'+h.kind+'", not "'+t.kind+'"'),h.resolve(t.result,t.tag)?(t.result=h.construct(t.result,t.tag),null!==t.anchor&&(t.anchorMap[t.anchor]=t.result)):uw(t,"cannot resolve a node with !<"+t.tag+"> explicit tag")}return null!==t.listener&&t.listener("close",t),null!==t.tag||null!==t.anchor||g}function Cw(t){var e,o,i,n,r=t.position,a=!1;for(t.version=null,t.checkLineBreaks=t.legacy,t.tagMap=Object.create(null),t.anchorMap=Object.create(null);0!==(n=t.input.charCodeAt(t.position))&&(gw(t,!0,-1),n=t.input.charCodeAt(t.position),!(t.lineIndent>0||37!==n));){for(a=!0,n=t.input.charCodeAt(++t.position),e=t.position;0!==n&&!tw(n);)n=t.input.charCodeAt(++t.position);for(i=[],(o=t.input.slice(e,t.position)).length<1&&uw(t,"directive name must not be less than one character in length");0!==n;){for(;Qy(n);)n=t.input.charCodeAt(++t.position);if(35===n){do{n=t.input.charCodeAt(++t.position)}while(0!==n&&!Jy(n));break}if(Jy(n))break;for(e=t.position;0!==n&&!tw(n);)n=t.input.charCodeAt(++t.position);i.push(t.input.slice(e,t.position))}0!==n&&fw(t),eb.call(_b,o)?_b[o](t,o,i):hw(t,'unknown document directive "'+o+'"')}gw(t,!0,-1),0===t.lineIndent&&45===t.input.charCodeAt(t.position)&&45===t.input.charCodeAt(t.position+1)&&45===t.input.charCodeAt(t.position+2)?(t.position+=3,gw(t,!0,-1)):a&&uw(t,"directives end mark is expected"),kw(t,t.lineIndent-1,rb,!1,!0),gw(t,!0,-1),t.checkLineBreaks&&ub.test(t.input.slice(r,t.position))&&hw(t,"non-ASCII line breaks are interpreted as content"),t.documents.push(t.result),t.position===t.lineStart&&_w(t)?46===t.input.charCodeAt(t.position)&&(t.position+=3,gw(t,!0,-1)):t.position=55296&&i<=56319&&e+1=56320&&o<=57343?1024*(i-55296)+o-56320+65536:i}function Bw(t){return/^\n* /.test(t)}function Lw(t,e,o,i,n,r,a,s){var l,c=0,u=null,h=!1,d=!1,p=-1!==i,m=-1,f=function(t){return zw(t)&&t!==wb&&!Iw(t)&&t!==Nb&&t!==Db&&t!==Ob&&t!==Pb&&t!==Hb&&t!==Rb&&t!==Vb&&t!==Gb&&t!==Sb&&t!==Mb&&t!==zb&&t!==xb&&t!==Fb&&t!==Bb&&t!==Lb&&t!==Ib&&t!==Ab&&t!==Tb&&t!==jb&&t!==Ub}(Ow(t,0))&&function(t){return!Iw(t)&&t!==Ob}(Ow(t,t.length-1));if(e||a)for(l=0;l=65536?l+=2:l++){if(!zw(c=Ow(t,l)))return ey;f=f&&Nw(c,u,s),u=c}else{for(l=0;l=65536?l+=2:l++){if((c=Ow(t,l))===Cb)h=!0,p&&(d=d||l-m-1>i&&" "!==t[m+1],m=l);else if(!zw(c))return ey;f=f&&Nw(c,u,s),u=c}d=d||p&&l-m-1>i&&" "!==t[m+1]}return h||d?o>9&&Bw(t)?ey:a?r===Xb?ey:Jb:d?ty:Qb:!f||a||n(t)?r===Xb?ey:Jb:Zb}function Dw(t,e,o,i,n){t.dump=function(){if(0===e.length)return t.quotingType===Xb?'""':"''";if(!t.noCompatMode&&(-1!==Yb.indexOf(e)||qb.test(e)))return t.quotingType===Xb?'"'+e+'"':"'"+e+"'";var r=t.indent*Math.max(1,o),a=-1===t.lineWidth?-1:Math.max(Math.min(t.lineWidth,40),t.lineWidth-r),s=i||t.flowLevel>-1&&o>=t.flowLevel;switch(Lw(e,s,t.indent,a,function(e){return function(t,e){var o,i;for(o=0,i=t.implicitTypes.length;o"+jw(e,t.indent)+Hw(Tw(function(t,e){var o,i,n=/(\n+)([^\n]*)/g,r=(s=t.indexOf("\n"),s=-1!==s?s:t.length,n.lastIndex=s,Rw(t.slice(0,s),e)),a="\n"===t[0]||" "===t[0];var s;for(;i=n.exec(t);){var l=i[1],c=i[2];o=" "===c[0],r+=l+(a||o||""===c?"":"\n")+Rw(c,e),a=o}return r}(e,a),r));case ey:return'"'+function(t){for(var e,o="",i=0,n=0;n=65536?n+=2:n++)i=Ow(t,n),!(e=Kb[i])&&zw(i)?(o+=t[n],i>=65536&&(o+=t[n+1])):o+=e||Aw(i);return o}(e)+'"';default:throw new Cv("impossible error: invalid scalar style")}}()}function jw(t,e){var o=Bw(t)?String(e):"",i="\n"===t[t.length-1];return o+(!i||"\n"!==t[t.length-2]&&"\n"!==t?i?"":"-":"+")+"\n"}function Hw(t){return"\n"===t[t.length-1]?t.slice(0,-1):t}function Rw(t,e){if(""===t||" "===t[0])return t;for(var o,i,n=/ [^ ]/g,r=0,a=0,s=0,l="";o=n.exec(t);)(s=o.index)-r>e&&(i=a>r?a:s,l+="\n"+t.slice(r,i),r=i+1),a=s;return l+="\n",t.length-r>e&&a>r?l+=t.slice(r,a)+"\n"+t.slice(a+1):l+=t.slice(r),l.slice(1)}function Uw(t,e,o,i){var n,r,a,s="",l=t.tag;for(n=0,r=o.length;n tag resolver accepts not "'+s+'" style');i=a.represent[s](e,s)}t.dump=i}return!0}return!1}function Fw(t,e,o,i,n,r,a){t.tag=null,t.dump=o,Vw(t,o,!1)||Vw(t,o,!0);var s,l=bb.call(t.dump),c=i;i&&(i=t.flowLevel<0||t.flowLevel>e);var u,h,d="[object Object]"===l||"[object Array]"===l;if(d&&(h=-1!==(u=t.duplicates.indexOf(o))),(null!==t.tag&&"?"!==t.tag||h||2!==t.indent&&e>0)&&(n=!1),h&&t.usedDuplicates[u])t.dump="*ref_"+u;else{if(d&&h&&!t.usedDuplicates[u]&&(t.usedDuplicates[u]=!0),"[object Object]"===l)i&&0!==Object.keys(t.dump).length?(!function(t,e,o,i){var n,r,a,s,l,c,u="",h=t.tag,d=Object.keys(o);if(!0===t.sortKeys)d.sort();else if("function"==typeof t.sortKeys)d.sort(t.sortKeys);else if(t.sortKeys)throw new Cv("sortKeys must be a boolean or a function");for(n=0,r=d.length;n1024)&&(t.dump&&Cb===t.dump.charCodeAt(0)?c+="?":c+="? "),c+=t.dump,l&&(c+=Mw(t,e)),Fw(t,e+1,s,!0,l)&&(t.dump&&Cb===t.dump.charCodeAt(0)?c+=":":c+=": ",u+=c+=t.dump));t.tag=h,t.dump=u||"{}"}(t,e,t.dump,n),h&&(t.dump="&ref_"+u+t.dump)):(!function(t,e,o){var i,n,r,a,s,l="",c=t.tag,u=Object.keys(o);for(i=0,n=u.length;i1024&&(s+="? "),s+=t.dump+(t.condenseFlow?'"':"")+":"+(t.condenseFlow?"":" "),Fw(t,e,a,!1,!1)&&(l+=s+=t.dump));t.tag=c,t.dump="{"+l+"}"}(t,e,t.dump),h&&(t.dump="&ref_"+u+" "+t.dump));else if("[object Array]"===l)i&&0!==t.dump.length?(t.noArrayIndent&&!a&&e>0?Uw(t,e-1,t.dump,n):Uw(t,e,t.dump,n),h&&(t.dump="&ref_"+u+t.dump)):(!function(t,e,o){var i,n,r,a="",s=t.tag;for(i=0,n=o.length;i",t.dump=s+" "+t.dump)}return!0}function Gw(t,e){var o,i,n=[],r=[];for(Kw(t,n,r),o=0,i=r.length;o{for(kv={isNothing:sy,isObject:ly,toArray:cy,repeat:hy,isNegativeZero:dy,extend:uy},my.prototype=Object.create(Error.prototype),my.prototype.constructor=my,my.prototype.toString=function(t){return this.name+": "+py(this,t)},Cv=my,$v=_y,Ev=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],xv=["scalar","sequence","mapping"],Av=vy,yy.prototype.extend=function(t){var e=[],o=[];if(t instanceof Av)o.push(t);else if(Array.isArray(t))o=o.concat(t);else{if(!t||!Array.isArray(t.implicit)&&!Array.isArray(t.explicit))throw new Cv("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");t.implicit&&(e=e.concat(t.implicit)),t.explicit&&(o=o.concat(t.explicit))}e.forEach(function(t){if(!(t instanceof Av))throw new Cv("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(t.loadKind&&"scalar"!==t.loadKind)throw new Cv("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(t.multi)throw new Cv("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),o.forEach(function(t){if(!(t instanceof Av))throw new Cv("Specified list of YAML types (or a single Type object) contains a non-Type object.")});var i=Object.create(yy.prototype);return i.implicit=(this.implicit||[]).concat(e),i.explicit=(this.explicit||[]).concat(o),i.compiledImplicit=by(i,"implicit"),i.compiledExplicit=by(i,"explicit"),i.compiledTypeMap=function(){var t,e,o={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}};function i(t){t.multi?(o.multi[t.kind].push(t),o.multi.fallback.push(t)):o[t.kind][t.tag]=o.fallback[t.tag]=t}for(t=0,e=arguments.length;t=0?"0b"+t.toString(2):"-0b"+t.toString(2).slice(1)},octal:function(t){return t>=0?"0o"+t.toString(8):"-0o"+t.toString(8).slice(1)},decimal:function(t){return t.toString(10)},hexadecimal:function(t){return t>=0?"0x"+t.toString(16).toUpperCase():"-0x"+t.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),Bv=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$"),Lv=/^[-+]?[0-9]+e/,Dv=new Av("tag:yaml.org,2002:float",{kind:"scalar",resolve:Py,construct:Ny,predicate:By,represent:Oy,defaultStyle:"lowercase"}),jv=zv.extend({implicit:[Pv,Nv,Ov,Dv]}),Hv=jv,Rv=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),Uv=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$"),Vv=new Av("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:Ly,construct:Dy,instanceOf:Date,represent:jy}),Fv=new Av("tag:yaml.org,2002:merge",{kind:"scalar",resolve:Hy}),Gv="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r",Kv=new Av("tag:yaml.org,2002:binary",{kind:"scalar",resolve:Ry,construct:Uy,predicate:Fy,represent:Vy}),Yv=Object.prototype.hasOwnProperty,qv=Object.prototype.toString,Wv=new Av("tag:yaml.org,2002:omap",{kind:"sequence",resolve:Gy,construct:Ky}),Xv=Object.prototype.toString,Zv=new Av("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:Yy,construct:qy}),Jv=Object.prototype.hasOwnProperty,Qv=new Av("tag:yaml.org,2002:set",{kind:"mapping",resolve:Wy,construct:Xy}),tb=Hv.extend({implicit:[Vv,Fv],explicit:[Kv,Wv,Zv,Qv]}),eb=Object.prototype.hasOwnProperty,ob=1,ib=2,nb=3,rb=4,ab=1,sb=2,lb=3,cb=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,ub=/[\x85\u2028\u2029]/,hb=/[,\[\]\{\}]/,db=/^(?:!|!!|![a-z\-]+!)$/i,pb=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i,mb=new Array(256),fb=new Array(256),gb=0;gb<256;gb++)mb[gb]=rw(gb)?1:0,fb[gb]=rw(gb);_b={YAML:function(t,e,o){var i,n,r;null!==t.version&&uw(t,"duplication of %YAML directive"),1!==o.length&&uw(t,"YAML directive accepts exactly one argument"),null===(i=/^([0-9]+)\.([0-9]+)$/.exec(o[0]))&&uw(t,"ill-formed argument of the YAML directive"),n=parseInt(i[1],10),r=parseInt(i[2],10),1!==n&&uw(t,"unacceptable YAML version of the document"),t.version=o[0],t.checkLineBreaks=r<2,1!==r&&2!==r&&hw(t,"unsupported YAML version of the document")},TAG:function(t,e,o){var i,n;2!==o.length&&uw(t,"TAG directive accepts exactly two arguments"),i=o[0],n=o[1],db.test(i)||uw(t,"ill-formed tag handle (first argument) of the TAG directive"),eb.call(t.tagMap,i)&&uw(t,'there is a previously declared suffix for "'+i+'" tag handle'),pb.test(n)||uw(t,"ill-formed tag prefix (second argument) of the TAG directive");try{n=decodeURIComponent(n)}catch(r){uw(t,"tag prefix is malformed: "+n)}t.tagMap[i]=n}},vb={loadAll:Ew,load:xw},bb=Object.prototype.toString,yb=Object.prototype.hasOwnProperty,wb=65279,kb=9,Cb=10,$b=13,Eb=32,xb=33,Ab=34,Sb=35,Tb=37,Mb=38,Ib=39,zb=42,Pb=44,Nb=45,Ob=58,Bb=61,Lb=62,Db=63,jb=64,Hb=91,Rb=93,Ub=96,Vb=123,Fb=124,Gb=125,(Kb={})[0]="\\0",Kb[7]="\\a",Kb[8]="\\b",Kb[9]="\\t",Kb[10]="\\n",Kb[11]="\\v",Kb[12]="\\f",Kb[13]="\\r",Kb[27]="\\e",Kb[34]='\\"',Kb[92]="\\\\",Kb[133]="\\N",Kb[160]="\\_",Kb[8232]="\\L",Kb[8233]="\\P",Yb=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],qb=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/,Wb=1,Xb=2,Zb=1,Jb=2,Qb=3,ty=4,ey=5,oy=vb.load,iy={dump:Yw}.dump,qw("safeLoad","load"),qw("safeLoadAll","loadAll"),qw("safeDump","dump")}),ik=kt(()=>{Ww=class extends Error{constructor(t,e,o){super(t),this.name="GUISupportError",this.warnings=e,this.errors=o}}}),nk=kt(()=>{ok(),Vt(),Be(),pn(),ik(),vn(),Xw=class extends Ot{constructor(...t){super(...t),this._guiMode=!0,this._loading=!1}get yaml(){return this._yaml||(this._yaml=iy(this._config)),this._yaml||""}set yaml(t){this._yaml=t;try{this._config=oy(this.yaml),this._errors=void 0}catch(e){this._errors=[e.message]}this._setConfig()}get value(){return this._config}set value(t){this._config&&No(t,this._config)||(this._config=t,this._yaml=void 0,this._errors=void 0,this._setConfig())}_setConfig(){var t;if(!this._errors)try{this._updateConfigElement()}catch(e){this._errors=[e.message]}ve(this,"config-changed",{config:this.value,error:null===(t=this._errors)||void 0===t?void 0:t.join(", "),guiModeAvailable:!(this.hasWarning||this.hasError||!1===this._guiSupported)})}get hasWarning(){return void 0!==this._warnings&&this._warnings.length>0}get hasError(){return void 0!==this._errors&&this._errors.length>0}get GUImode(){return this._guiMode}set GUImode(t){this._guiMode=t,ve(this,"GUImode-changed",{guiMode:t,guiModeAvailable:!(this.hasWarning||this.hasError||!1===this._guiSupported)})}toggleMode(){this.GUImode=!this.GUImode}focusYamlEditor(){var t,e;(null===(t=this._configElement)||void 0===t?void 0:t.focusYamlEditor)&&this._configElement.focusYamlEditor(),(null===(e=this._yamlEditor)||void 0===e?void 0:e.codemirror)&&this._yamlEditor.codemirror.focus()}async getConfigElement(){}get configElementType(){return this.value?this.value.type:void 0}render(){return J`
${this.GUImode?J`
@@ -1301,7 +1301,7 @@ var t,e,o,i,n,r,a,s,l,c,u,h,d,p,m,f,g,_,v,b,y,w,k,C,$,E,x,A,S,T,M,I,z,P,N,O,B,L, `:""}
- `}updated(t){super.updated(t),this._configElement&&t.has("hass")&&(this._configElement.hass=this.hass),this._configElement&&"lovelace"in this._configElement&&t.has("lovelace")&&(this._configElement.lovelace=this.lovelace)}_handleUIConfigChanged(t){t.stopPropagation();const e=t.detail.config;this.value=e}_handleYAMLChanged(t){t.stopPropagation();const e=t.detail.value;e!==this.yaml&&(this.yaml=e)}async _updateConfigElement(){var t=this;if(!t.value)return;let e;try{if(t._errors=void 0,t._warnings=void 0,t._configElementType!==t.configElementType){if(t._guiSupported=void 0,t._configElement=void 0,!t.configElementType)throw new Error(t.hass.localize("ui.errors.config.no_type_provided"));t._configElementType=t.configElementType,t._loading=!0,e=await t.getConfigElement(),e&&(e.hass=t.hass,"lovelace"in e&&(e.lovelace=t.lovelace),e.addEventListener("config-changed",e=>t._handleUIConfigChanged(e)),t._configElement=e,t._guiSupported=!0)}if(t._configElement)try{t._configElement.setConfig(t.value)}catch(i){const e=So(t.hass,i);throw new qw("Config is not supported",e.warnings,e.errors)}else t.GUImode=!1}catch(i){var o;if(i instanceof qw)t._warnings=null!==(o=i.warnings)&&void 0!==o?o:[i.message],t._errors=i.errors||void 0;else t._errors=[i.message];t.GUImode=!1}finally{t._loading=!1}}_ignoreKeydown(t){t.stopPropagation()}static get styles(){return l` + `}updated(t){super.updated(t),this._configElement&&t.has("hass")&&(this._configElement.hass=this.hass),this._configElement&&"lovelace"in this._configElement&&t.has("lovelace")&&(this._configElement.lovelace=this.lovelace)}_handleUIConfigChanged(t){t.stopPropagation();const e=t.detail.config;this.value=e}_handleYAMLChanged(t){t.stopPropagation();const e=t.detail.value;e!==this.yaml&&(this.yaml=e)}async _updateConfigElement(){var t=this;if(!t.value)return;let e;try{if(t._errors=void 0,t._warnings=void 0,t._configElementType!==t.configElementType){if(t._guiSupported=void 0,t._configElement=void 0,!t.configElementType)throw new Error(t.hass.localize("ui.errors.config.no_type_provided"));t._configElementType=t.configElementType,t._loading=!0,e=await t.getConfigElement(),e&&(e.hass=t.hass,"lovelace"in e&&(e.lovelace=t.lovelace),e.addEventListener("config-changed",e=>t._handleUIConfigChanged(e)),t._configElement=e,t._guiSupported=!0)}if(t._configElement)try{t._configElement.setConfig(t.value)}catch(i){const e=So(t.hass,i);throw new Ww("Config is not supported",e.warnings,e.errors)}else t.GUImode=!1}catch(i){var o;if(i instanceof Ww)t._warnings=null!==(o=i.warnings)&&void 0!==o?o:[i.message],t._errors=i.errors||void 0;else t._errors=[i.message];t.GUImode=!1}finally{t._loading=!1}}_ignoreKeydown(t){t.stopPropagation()}static get styles(){return l` :host { display: flex; } @@ -1339,7 +1339,7 @@ var t,e,o,i,n,r,a,s,l,c,u,h,d,p,m,f,g,_,v,b,y,w,k,C,$,E,x,A,S,T,M,I,z,P,N,O,B,L, display: block; margin: auto; } - `}},gn([Gt({attribute:!1})],Ww.prototype,"hass",void 0),gn([Gt({attribute:!1})],Ww.prototype,"lovelace",void 0),gn([ie()],Ww.prototype,"_yaml",void 0),gn([ie()],Ww.prototype,"_config",void 0),gn([ie()],Ww.prototype,"_configElement",void 0),gn([ie()],Ww.prototype,"_configElementType",void 0),gn([ie()],Ww.prototype,"_guiMode",void 0),gn([ie()],Ww.prototype,"_errors",void 0),gn([ie()],Ww.prototype,"_warnings",void 0),gn([ie()],Ww.prototype,"_guiSupported",void 0),gn([ie()],Ww.prototype,"_loading",void 0),gn([le("ha-code-editor")],Ww.prototype,"_yamlEditor",void 0)}),nk=kt(()=>{Be(),e_(),ik(),vn(),Xw=class extends Ww{get configElementType(){var t;return null===(t=this.value)||void 0===t?void 0:t.type}async getConfigElement(){const t=await Zw(this.configElementType);if(t&&t.getConfigElement)return t.getConfigElement()}},Xw=gn([Lt("mushroom-chip-element-editor")],Xw),Zw=t=>customElements.get(Zg(t))}),rk=/* @__PURE__ */$t({ConditionalChipEditor:()=>Jw}),ak=kt(()=>{Vt(),Be(),pn(),Oc(),Ug(),nk(),e_(),sv(),vn(),oe(),Jw=class extends Ot{constructor(...t){super(...t),this._GUImode=!0,this._guiModeAvailable=!0,this._cardTab=!1}connectedCallback(){super.connectedCallback(),Sg()}setConfig(t){this._config=t}focusYamlEditor(){var t;null===(t=this._cardEditorEl)||void 0===t||t.focusYamlEditor()}render(){var t;if(!this.hass||!this._config)return et;const e=ic(this.hass);return J` + `}},gn([Gt({attribute:!1})],Xw.prototype,"hass",void 0),gn([Gt({attribute:!1})],Xw.prototype,"lovelace",void 0),gn([ie()],Xw.prototype,"_yaml",void 0),gn([ie()],Xw.prototype,"_config",void 0),gn([ie()],Xw.prototype,"_configElement",void 0),gn([ie()],Xw.prototype,"_configElementType",void 0),gn([ie()],Xw.prototype,"_guiMode",void 0),gn([ie()],Xw.prototype,"_errors",void 0),gn([ie()],Xw.prototype,"_warnings",void 0),gn([ie()],Xw.prototype,"_guiSupported",void 0),gn([ie()],Xw.prototype,"_loading",void 0),gn([le("ha-code-editor")],Xw.prototype,"_yamlEditor",void 0)}),rk=kt(()=>{Be(),o_(),nk(),vn(),Zw=class extends Xw{get configElementType(){var t;return null===(t=this.value)||void 0===t?void 0:t.type}async getConfigElement(){const t=await Jw(this.configElementType);if(t&&t.getConfigElement)return t.getConfigElement()}},Zw=gn([Lt("mushroom-chip-element-editor")],Zw),Jw=t=>customElements.get(Jg(t))}),ak=/* @__PURE__ */$t({ConditionalChipEditor:()=>Qw}),sk=kt(()=>{Vt(),Be(),pn(),Bc(),Vg(),rk(),o_(),lv(),vn(),oe(),Qw=class extends Ot{constructor(...t){super(...t),this._GUImode=!0,this._guiModeAvailable=!0,this._cardTab=!1}connectedCallback(){super.connectedCallback(),Tg()}setConfig(t){this._config=t}focusYamlEditor(){var t;null===(t=this._cardEditorEl)||void 0===t||t.focusYamlEditor()}render(){var t;if(!this.hass||!this._config)return et;const e=nc(this.hass);return J` ({value:t,label:e(`editor.chip.chip-picker.types.${t}`)})),mode:"dropdown"}}} + .selector=${{select:{options:B_.map(t=>({value:t,label:e(`editor.chip.chip-picker.types.${t}`)})),mode:"dropdown"}}} @value-changed=${this._handleChipPicked} >`}
@@ -1390,7 +1390,7 @@ var t,e,o,i,n,r,a,s,l,c,u,h,d,p,m,f,g,_,v,b,y,w,k,C,$,E,x,A,S,T,M,I,z,P,N,O,B,L, @value-changed=${this._conditionChanged} > `} - `}_selectTab(t){this._cardTab="chip"===t.detail.name}_toggleMode(){var t;null===(t=this._cardEditorEl)||void 0===t||t.toggleMode()}_setMode(t){this._GUImode=t,this._cardEditorEl&&(this._cardEditorEl.GUImode=t)}_handleGUIModeChanged(t){t.stopPropagation(),this._GUImode=t.detail.guiMode,this._guiModeAvailable=t.detail.guiModeAvailable}async _handleChipPicked(t){var e,o=this;const i=null!==(e=t.detail.value)&&void 0!==e?e:"";if(""===i)return;let n;const r=Zw(i);n=r&&r.getStubConfig?await r.getStubConfig(o.hass):{type:i},t.target.value="",t.stopPropagation(),o._config&&(o._setMode(!0),o._guiModeAvailable=!0,o._config=ee(ee({},o._config),{},{chip:n}),ve(o,"config-changed",{config:o._config}))}_handleChipChanged(t){t.stopPropagation(),this._config&&(this._config=ee(ee({},this._config),{},{chip:t.detail.config}),this._guiModeAvailable=t.detail.guiModeAvailable,ve(this,"config-changed",{config:this._config}))}_handleReplaceChip(){this._config&&(this._config=ee(ee({},this._config),{},{chip:void 0}),ve(this,"config-changed",{config:this._config}))}_conditionChanged(t){if(t.stopPropagation(),!this._config)return;const e=t.detail.value;this._config=ee(ee({},this._config),{},{conditions:e}),ve(this,"config-changed",{config:this._config})}static get styles(){return l` + `}_selectTab(t){this._cardTab="chip"===t.detail.name}_toggleMode(){var t;null===(t=this._cardEditorEl)||void 0===t||t.toggleMode()}_setMode(t){this._GUImode=t,this._cardEditorEl&&(this._cardEditorEl.GUImode=t)}_handleGUIModeChanged(t){t.stopPropagation(),this._GUImode=t.detail.guiMode,this._guiModeAvailable=t.detail.guiModeAvailable}async _handleChipPicked(t){var e,o=this;const i=null!==(e=t.detail.value)&&void 0!==e?e:"";if(""===i)return;let n;const r=Jw(i);n=r&&r.getStubConfig?await r.getStubConfig(o.hass):{type:i},t.target.value="",t.stopPropagation(),o._config&&(o._setMode(!0),o._guiModeAvailable=!0,o._config=ee(ee({},o._config),{},{chip:n}),ve(o,"config-changed",{config:o._config}))}_handleChipChanged(t){t.stopPropagation(),this._config&&(this._config=ee(ee({},this._config),{},{chip:t.detail.config}),this._guiModeAvailable=t.detail.guiModeAvailable,ve(this,"config-changed",{config:this._config}))}_handleReplaceChip(){this._config&&(this._config=ee(ee({},this._config),{},{chip:void 0}),ve(this,"config-changed",{config:this._config}))}_conditionChanged(t){if(t.stopPropagation(),!this._config)return;const e=t.detail.value;this._config=ee(ee({},this._config),{},{conditions:e}),ve(this,"config-changed",{config:this._config})}static get styles(){return l` ha-tab-group-tab { flex: 1; } @@ -1420,7 +1420,7 @@ var t,e,o,i,n,r,a,s,l,c,u,h,d,p,m,f,g,_,v,b,y,w,k,C,$,E,x,A,S,T,M,I,z,P,N,O,B,L, .gui-mode-button { margin-right: auto; } - `}},gn([Gt({attribute:!1})],Jw.prototype,"hass",void 0),gn([Gt({attribute:!1})],Jw.prototype,"lovelace",void 0),gn([ie()],Jw.prototype,"_config",void 0),gn([ie()],Jw.prototype,"_GUImode",void 0),gn([ie()],Jw.prototype,"_guiModeAvailable",void 0),gn([ie()],Jw.prototype,"_cardTab",void 0),gn([le("mushroom-chip-element-editor")],Jw.prototype,"_cardEditorEl",void 0),Jw=gn([Lt(Jg("conditional"))],Jw)}),sk=kt(()=>{Ug(),e_(),Qw=Zg("conditional"),tk=async()=>{if(customElements.get(Qw))return;customElements.get("hui-conditional-base")||(await window.loadCardHelpers()).createCardElement({type:"conditional",card:{type:"button"},conditions:[]});const t=await Tg("hui-conditional-base");customElements.get(Qw)||customElements.define(Qw,class extends t{static async getConfigElement(){return await Promise.resolve().then(()=>(ak(),rk)),document.createElement(Jg("conditional"))}static async getStubConfig(){return{type:"conditional",conditions:[]}}setConfig(t){if(this.validateConfig(t),!t.chip)throw new Error("No chip configured");this._element=Wg(t.chip)}})}});sk();var lk={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]};for(const KM in lk)Object.freeze(lk[KM]);Object.freeze(lk);Bf();var ck,uk,hk,dk=t=>{const e=Math.round(Math.min(Math.max(t,0),255)).toString(16);return 1===e.length?`0${e}`:e},pk=t=>`#${dk(t[0])}${dk(t[1])}${dk(t[2])}`;function mk(t){return null!=t.attributes.rgb_color?t.attributes.rgb_color:void 0}function fk(t){const e=(t=>{const[e,o,i]=t,n=Math.max(e,o,i),r=n-Math.min(e,o,i),a=r&&(n===e?(o-i)/r:n===o?2+(i-e)/r:4+(e-o)/r);return[60*(a<0?a+6:a),n&&r/n,n]})([t[0],t[1],t[2]]);return e[1]<.4&&(e[1]<.1?e[2]=225:e[1]=.4),(t=>{const[e,o,i]=t,n=t=>{const n=(t+e/60)%6;return i-i*o*Math.max(Math.min(n,4-n,1),0)};return[n(5),n(3),n(1)]})(e)}pn();var gk,_k,vk,bk,yk,wk,kk=kt(()=>{ug(),uk=`${ck=`${eg}-light-card`}-editor`,hk=["light"]}),Ck=kt(()=>{To(),_g(),jg(),Vg(),Fg(),gk=mo(Pg,mo(zg,gg,sg),Co({icon_color:$o(Eo()),show_brightness_control:$o(bo()),show_color_temp_control:$o(bo()),show_color_control:$o(bo()),collapsible_controls:$o(bo()),use_light_color:$o(bo())}))}),$k=/* @__PURE__ */$t({LIGHT_LABELS:()=>_k,LightCardEditor:()=>bk}),Ek=kt(()=>{Vt(),Be(),Oi(),To(),pn(),Oc(),_g(),jg(),Yf(),Hg(),Rg(),Ug(),kk(),Ck(),vn(),_k=["show_brightness_control","use_light_color","show_color_temp_control","show_color_control"],vk=vi((t,e)=>[{name:"entity",selector:{entity:{domain:hk}}},Ag(e),{type:"grid",name:"",schema:[{name:"icon",selector:{icon:{}},context:{icon_entity:"entity"}},{name:"icon_color",selector:{ui_color:{}}}]},...$g(t),{type:"grid",name:"",schema:[{name:"use_light_color",selector:{boolean:{}}},{name:"show_brightness_control",selector:{boolean:{}}},{name:"show_color_temp_control",selector:{boolean:{}}},{name:"show_color_control",selector:{boolean:{}}},{name:"collapsible_controls",selector:{boolean:{}}}]},...lg()]),bk=class extends Hf{constructor(...t){super(...t),this._computeLabel=t=>{const e=ic(this.hass);return Eg.includes(t.name)?e(`editor.card.generic.${t.name}`):_k.includes(t.name)?e(`editor.card.light.${t.name}`):this.hass.localize(`ui.panel.lovelace.editor.card.generic.${t.name}`)}}connectedCallback(){super.connectedCallback(),Sg()}setConfig(t){ho(t,gk),this._config=t}render(){if(!this.hass||!this._config)return et;const t=vk(ic(this.hass),this.hass.config.version);return J` + `}},gn([Gt({attribute:!1})],Qw.prototype,"hass",void 0),gn([Gt({attribute:!1})],Qw.prototype,"lovelace",void 0),gn([ie()],Qw.prototype,"_config",void 0),gn([ie()],Qw.prototype,"_GUImode",void 0),gn([ie()],Qw.prototype,"_guiModeAvailable",void 0),gn([ie()],Qw.prototype,"_cardTab",void 0),gn([le("mushroom-chip-element-editor")],Qw.prototype,"_cardEditorEl",void 0),Qw=gn([Lt(Qg("conditional"))],Qw)}),lk=kt(()=>{Vg(),o_(),tk=Jg("conditional"),ek=async()=>{if(customElements.get(tk))return;customElements.get("hui-conditional-base")||(await window.loadCardHelpers()).createCardElement({type:"conditional",card:{type:"button"},conditions:[]});const t=await Mg("hui-conditional-base");customElements.get(tk)||customElements.define(tk,class extends t{static async getConfigElement(){return await Promise.resolve().then(()=>(sk(),ak)),document.createElement(Qg("conditional"))}static async getStubConfig(){return{type:"conditional",conditions:[]}}setConfig(t){if(this.validateConfig(t),!t.chip)throw new Error("No chip configured");this._element=Xg(t.chip)}})}});lk();var ck={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]};for(const YM in ck)Object.freeze(ck[YM]);Object.freeze(ck);Lf();var uk,hk,dk,pk=t=>{const e=Math.round(Math.min(Math.max(t,0),255)).toString(16);return 1===e.length?`0${e}`:e},mk=t=>`#${pk(t[0])}${pk(t[1])}${pk(t[2])}`;function fk(t){return null!=t.attributes.rgb_color?t.attributes.rgb_color:void 0}function gk(t){const e=(t=>{const[e,o,i]=t,n=Math.max(e,o,i),r=n-Math.min(e,o,i),a=r&&(n===e?(o-i)/r:n===o?2+(i-e)/r:4+(e-o)/r);return[60*(a<0?a+6:a),n&&r/n,n]})([t[0],t[1],t[2]]);return e[1]<.4&&(e[1]<.1?e[2]=225:e[1]=.4),(t=>{const[e,o,i]=t,n=t=>{const n=(t+e/60)%6;return i-i*o*Math.max(Math.min(n,4-n,1),0)};return[n(5),n(3),n(1)]})(e)}pn();var _k,vk,bk,yk,wk,kk,Ck=kt(()=>{hg(),hk=`${uk=`${og}-light-card`}-editor`,dk=["light"]}),$k=kt(()=>{To(),vg(),Hg(),Fg(),Gg(),_k=mo(Ng,mo(Pg,_g,lg),Co({icon_color:$o(Eo()),show_brightness_control:$o(bo()),show_color_temp_control:$o(bo()),show_color_control:$o(bo()),collapsible_controls:$o(bo()),use_light_color:$o(bo())}))}),Ek=/* @__PURE__ */$t({LIGHT_LABELS:()=>vk,LightCardEditor:()=>yk}),xk=kt(()=>{Vt(),Be(),Oi(),To(),pn(),Bc(),vg(),Hg(),qf(),Rg(),Ug(),Vg(),Ck(),$k(),vn(),vk=["show_brightness_control","use_light_color","show_color_temp_control","show_color_control"],bk=vi((t,e)=>[{name:"entity",selector:{entity:{domain:dk}}},Sg(e),{type:"grid",name:"",schema:[{name:"icon",selector:{icon:{}},context:{icon_entity:"entity"}},{name:"icon_color",selector:{ui_color:{}}}]},...Eg(t),{type:"grid",name:"",schema:[{name:"use_light_color",selector:{boolean:{}}},{name:"show_brightness_control",selector:{boolean:{}}},{name:"show_color_temp_control",selector:{boolean:{}}},{name:"show_color_control",selector:{boolean:{}}},{name:"collapsible_controls",selector:{boolean:{}}}]},...cg()]),yk=class extends Rf{constructor(...t){super(...t),this._computeLabel=t=>{const e=nc(this.hass);return xg.includes(t.name)?e(`editor.card.generic.${t.name}`):vk.includes(t.name)?e(`editor.card.light.${t.name}`):this.hass.localize(`ui.panel.lovelace.editor.card.generic.${t.name}`)}}connectedCallback(){super.connectedCallback(),Tg()}setConfig(t){ho(t,_k),this._config=t}render(){if(!this.hass||!this._config)return et;const t=bk(nc(this.hass),this.hass.config.version);return J` - `}_valueChanged(t){ve(this,"config-changed",{config:t.detail.value})}},gn([ie()],bk.prototype,"_config",void 0),bk=gn([Lt(uk)],bk)}),xk=/* @__PURE__ */$t({LightChipEditor:()=>wk}),Ak=kt(()=>{Vt(),Be(),Oi(),pn(),Oc(),_g(),jg(),Hg(),Rg(),e_(),kk(),Ek(),vn(),yk=vi((t,e)=>[{name:"entity",selector:{entity:{domain:hk}}},Ag(e),{name:"content_info",selector:{select:{options:yg(t),mode:"dropdown"}}},{type:"grid",name:"",schema:[{name:"icon",selector:{icon:{}},context:{icon_entity:"entity"}},{name:"use_light_color",selector:{boolean:{}}}]},...lg()]),wk=class extends Ot{constructor(...t){super(...t),this._computeLabel=t=>{const e=ic(this.hass);return Eg.includes(t.name)?e(`editor.card.generic.${t.name}`):_k.includes(t.name)?e(`editor.card.light.${t.name}`):this.hass.localize(`ui.panel.lovelace.editor.card.generic.${t.name}`)}}setConfig(t){this._config=t}render(){if(!this.hass||!this._config)return et;const t=yk(ic(this.hass),this.hass.config.version);return J` + `}_valueChanged(t){ve(this,"config-changed",{config:t.detail.value})}},gn([ie()],yk.prototype,"_config",void 0),yk=gn([Lt(hk)],yk)}),Ak=/* @__PURE__ */$t({LightChipEditor:()=>kk}),Sk=kt(()=>{Vt(),Be(),Oi(),pn(),Bc(),vg(),Hg(),Rg(),Ug(),o_(),Ck(),xk(),vn(),wk=vi((t,e)=>[{name:"entity",selector:{entity:{domain:dk}}},Sg(e),{name:"content_info",selector:{select:{options:wg(t),mode:"dropdown"}}},{type:"grid",name:"",schema:[{name:"icon",selector:{icon:{}},context:{icon_entity:"entity"}},{name:"use_light_color",selector:{boolean:{}}}]},...cg()]),kk=class extends Ot{constructor(...t){super(...t),this._computeLabel=t=>{const e=nc(this.hass);return xg.includes(t.name)?e(`editor.card.generic.${t.name}`):vk.includes(t.name)?e(`editor.card.light.${t.name}`):this.hass.localize(`ui.panel.lovelace.editor.card.generic.${t.name}`)}}setConfig(t){this._config=t}render(){if(!this.hass||!this._config)return et;const t=wk(nc(this.hass),this.hass.config.version);return J` - `}_valueChanged(t){ve(this,"config-changed",{config:t.detail.value})}},gn([Gt({attribute:!1})],wk.prototype,"hass",void 0),gn([ie()],wk.prototype,"_config",void 0),wk=gn([Lt(Jg("light"))],wk)});Vt(),Be(),je(),Re(),pn(),Xf(),e_(),vn(),oe();var Sk=class extends Ot{static async getConfigElement(){return await Promise.resolve().then(()=>(Ak(),xk)),document.createElement(Jg("light"))}static async getStubConfig(t){return{type:"light",entity:Object.keys(t.states).filter(t=>"light"===t.split(".")[0])[0]}}setConfig(t){this._config=ee({tap_action:{action:"toggle"},hold_action:{action:"more-info"}},t)}_handleAction(t){Ni(this,this.hass,this._config,t.detail.action)}render(){var t,e;if(!this.hass||!this._config||!this._config.entity)return et;const o=this._config.entity,i=this.hass.states[o];if(!i)return et;const n=Qf(this.hass,i,this._config.name),r=this._config.icon,a=this.hass.formatEntityState(i),s=Yo(i),l=mk(i),c={};l&&(null===(t=this._config)||void 0===t?void 0:t.use_light_color)&&(c["--color"]=`rgb(${fk(l).join(",")})`);const u=qf(null!==(e=this._config.content_info)&&void 0!==e?e:"state",n,a,i,this.hass);return J` + `}_valueChanged(t){ve(this,"config-changed",{config:t.detail.value})}},gn([Gt({attribute:!1})],kk.prototype,"hass",void 0),gn([ie()],kk.prototype,"_config",void 0),kk=gn([Lt(Qg("light"))],kk)});Vt(),Be(),je(),Re(),pn(),Zf(),o_(),vn(),oe();var Tk=class extends Ot{static async getConfigElement(){return await Promise.resolve().then(()=>(Sk(),Ak)),document.createElement(Qg("light"))}static async getStubConfig(t){return{type:"light",entity:Object.keys(t.states).filter(t=>"light"===t.split(".")[0])[0]}}setConfig(t){this._config=ee({tap_action:{action:"toggle"},hold_action:{action:"more-info"}},t)}_handleAction(t){Ni(this,this.hass,this._config,t.detail.action)}render(){var t,e;if(!this.hass||!this._config||!this._config.entity)return et;const o=this._config.entity,i=this.hass.states[o];if(!i)return et;const n=tg(this.hass,i,this._config.name),r=this._config.icon,a=this.hass.formatEntityState(i),s=Yo(i),l=fk(i),c={};l&&(null===(t=this._config)||void 0===t?void 0:t.use_light_color)&&(c["--color"]=`rgb(${gk(l).join(",")})`);const u=Wf(null!==(e=this._config.content_info)&&void 0!==e?e:"state",n,a,i,this.hass);return J` Ik}),Pk=kt(()=>{Vt(),Be(),Oi(),pn(),Oc(),_g(),jg(),Hg(),Rg(),e_(),hg(),vn(),Tk=["more-info","navigate","url","perform-action","assist","none"],Mk=vi((t,e)=>[{name:"entity",selector:{entity:{domain:ng}}},Ag(e),{name:"content_info",selector:{select:{options:yg(t),mode:"dropdown"}}},{name:"icon",selector:{icon:{}},context:{icon_entity:"entity"}},...lg(Tk)]),Ik=class extends Ot{constructor(...t){super(...t),this._computeLabel=t=>{const e=ic(this.hass);return Eg.includes(t.name)?e(`editor.card.generic.${t.name}`):this.hass.localize(`ui.panel.lovelace.editor.card.generic.${t.name}`)}}setConfig(t){this._config=t}render(){if(!this.hass||!this._config)return et;const t=Mk(ic(this.hass),this.hass.config.version);return J` + `}};gn([Gt({attribute:!1})],Tk.prototype,"hass",void 0),gn([ie()],Tk.prototype,"_config",void 0),Tk=gn([Lt(Jg("light"))],Tk);var Mk,Ik,zk,Pk=/* @__PURE__ */$t({AlarmControlPanelChipEditor:()=>zk}),Nk=kt(()=>{Vt(),Be(),Oi(),pn(),Bc(),vg(),Hg(),Rg(),Ug(),o_(),dg(),vn(),Mk=["more-info","navigate","url","perform-action","assist","none"],Ik=vi((t,e)=>[{name:"entity",selector:{entity:{domain:rg}}},Sg(e),{name:"content_info",selector:{select:{options:wg(t),mode:"dropdown"}}},{name:"icon",selector:{icon:{}},context:{icon_entity:"entity"}},...cg(Mk)]),zk=class extends Ot{constructor(...t){super(...t),this._computeLabel=t=>{const e=nc(this.hass);return xg.includes(t.name)?e(`editor.card.generic.${t.name}`):this.hass.localize(`ui.panel.lovelace.editor.card.generic.${t.name}`)}}setConfig(t){this._config=t}render(){if(!this.hass||!this._config)return et;const t=Ik(nc(this.hass),this.hass.config.version);return J` - `}_valueChanged(t){ve(this,"config-changed",{config:t.detail.value})}},gn([Gt({attribute:!1})],Ik.prototype,"hass",void 0),gn([ie()],Ik.prototype,"_config",void 0),Ik=gn([Lt(Jg("alarm-control-panel"))],Ik)});Vt(),Be(),je(),Re(),pn(),Rf(),Nn(),Xf(),e_(),hg(),vn();var Nk=class extends Ot{static async getConfigElement(){return await Promise.resolve().then(()=>(Pk(),zk)),document.createElement(Jg("alarm-control-panel"))}static async getStubConfig(t){return{type:"alarm-control-panel",entity:Object.keys(t.states).filter(t=>ng.includes(t.split(".")[0]))[0]}}setConfig(t){this._config=t}_handleAction(t){Ni(this,this.hass,this._config,t.detail.action)}render(){var t;if(!this.hass||!this._config||!this._config.entity)return et;const e=this._config.entity,o=this.hass.states[e];if(!o)return et;const i=Qf(this.hass,o,this._config.name),n=this._config.icon,r=dg(o.state),a=pg(o.state),s=this.hass.formatEntityState(o),l={};r&&(l["--color"]=`rgb(${Lf(r)})`);const c=qf(null!==(t=this._config.content_info)&&void 0!==t?t:"state",i,s,o,this.hass);return J` + `}_valueChanged(t){ve(this,"config-changed",{config:t.detail.value})}},gn([Gt({attribute:!1})],zk.prototype,"hass",void 0),gn([ie()],zk.prototype,"_config",void 0),zk=gn([Lt(Qg("alarm-control-panel"))],zk)});Vt(),Be(),je(),Re(),pn(),Uf(),Nn(),Zf(),o_(),dg(),vn();var Ok=class extends Ot{static async getConfigElement(){return await Promise.resolve().then(()=>(Nk(),Pk)),document.createElement(Qg("alarm-control-panel"))}static async getStubConfig(t){return{type:"alarm-control-panel",entity:Object.keys(t.states).filter(t=>rg.includes(t.split(".")[0]))[0]}}setConfig(t){this._config=t}_handleAction(t){Ni(this,this.hass,this._config,t.detail.action)}render(){var t;if(!this.hass||!this._config||!this._config.entity)return et;const e=this._config.entity,o=this.hass.states[e];if(!o)return et;const i=tg(this.hass,o,this._config.name),n=this._config.icon,r=pg(o.state),a=mg(o.state),s=this.hass.formatEntityState(o),l={};r&&(l["--color"]=`rgb(${Df(r)})`);const c=Wf(null!==(t=this._config.content_info)&&void 0!==t?t:"state",i,s,o,this.hass);return J` {ug(),Bk=`${Ok=`${eg}-chips-card`}-editor`}),k$=kt(()=>{Vt(),Be(),pn(),Oc(),nk(),vn(),Dk=class extends Ot{constructor(...t){super(...t),this._guiModeAvailable=!0,this._guiMode=!0}render(){const t=ic(this.hass);return J` + `}};Dk=gn([Lt(Jg("spacer"))],Dk),ev(),nv(),sv(),hv();var jk,Hk,Rk,Uk,Vk,Fk,Gk,Kk,Yk,qk,Wk,Xk,Zk,Jk,Qk,tC,eC,oC,iC,nC,rC,aC,sC,lC,cC,uC,hC,dC,pC,mC,fC,gC,_C,vC,bC,yC,wC,kC,CC,$C,EC,xC,AC,SC,TC,MC,IC,zC,PC,NC,OC,BC,LC,DC,jC,HC,RC,UC,VC,FC,GC,KC,YC,qC,WC,XC,ZC,JC,QC,t$,e$,o$,i$,n$,r$,a$,s$,l$,c$,u$,h$,d$,p$,m$,f$,g$,_$,v$,b$,y$,w$,k$=kt(()=>{hg(),Lk=`${Bk=`${og}-chips-card`}-editor`}),C$=kt(()=>{Vt(),Be(),pn(),Bc(),rk(),vn(),jk=class extends Ot{constructor(...t){super(...t),this._guiModeAvailable=!0,this._guiMode=!0}render(){const t=nc(this.hass);return J`
{Ht(),Le(),jk={},Hk=ue(class extends he{constructor(){super(...arguments),this.ot=jk}render(t,e){return e()}update(t,[e,o]){if(Array.isArray(e)){if(Array.isArray(this.ot)&&this.ot.length===e.length&&e.every((t,e)=>t===this.ot[e]))return tt}else if(this.ot===e)return tt;return this.ot=Array.isArray(e)?Array.from(e):e,this.render(e,o)}})}),$$=kt(()=>{C$()}),E$=kt(()=>{Ht(),({I:Rk}=pt),Uk=()=>document.createComment(""),Vk={},Fk=(t,e=Vk)=>t._$AH=e}),x$=kt(()=>{Ht(),Le(),E$(),Gk=ue(class extends he{constructor(){super(...arguments),this.key=et}render(t,e){return this.key=t,e}update(t,[e,o]){return e!==this.key&&(Fk(t),this.key=e),o}})}),A$=kt(()=>{x$()}),S$=/* @__PURE__ */$t({AutoScroll:()=>bE,MultiDrag:()=>EE,OnSpill:()=>c$,Sortable:()=>hE,Swap:()=>$E,default:()=>hE});function T$(t,e){(null==e||e>t.length)&&(e=t.length);for(var o=0,i=Array(e);o"===e[0]&&(e=e.substring(1)),t)try{if(t.matches)return t.matches(e);if(t.msMatchesSelector)return t.msMatchesSelector(e);if(t.webkitMatchesSelector)return t.webkitMatchesSelector(e)}catch(K){return!1}return!1}}function H$(t){return t.host&&t!==document&&t.host.nodeType&&t.host!==t?t.host:t.parentNode}function R$(t,e,o,i){if(t){o=o||document;do{if(null!=e&&(">"===e[0]?t.parentNode===o&&j$(t,e):j$(t,e))||i&&t===o)return t;if(t===o)break}while(t=H$(t))}return null}function U$(t,e,o){t&&e&&(t.classList?t.classList[o?"add":"remove"](e):t.className=((" "+t.className+" ").replace(Qk," ").replace(" "+e+" "," ")+(o?" "+e:"")).replace(Qk," "))}function V$(t,e,o){var i=t&&t.style;if(i){if(void 0===o)return document.defaultView&&document.defaultView.getComputedStyle?o=document.defaultView.getComputedStyle(t,""):t.currentStyle&&(o=t.currentStyle),void 0===e?o:o[e];e in i||-1!==e.indexOf("webkit")||(e="-webkit-"+e),i[e]=o+("string"==typeof o?"":"px")}}function F$(t,e){var o="";if("string"==typeof t)o=t;else do{var i=V$(t,"transform");i&&"none"!==i&&(o=i+" "+o)}while(!e&&(t=t.parentNode));var n=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return n&&new n(o)}function G$(t,e,o){if(t){var i=t.getElementsByTagName(e),n=0,r=i.length;if(o)for(;n=r:n<=r))return i;if(i===K$())break;i=Q$(i,!1)}return!1}function W$(t,e,o,i){for(var n=0,r=0,a=t.children;rli":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return GC(t,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(t,e){t.setData("Text",e.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,delayOnTouchOnly:!1,touchStartThreshold:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:!1!==hE.supportPointer&&"PointerEvent"in window&&(!Wk||Xk),emptyInsertThreshold:5};for(var i in nC.initializePlugins(this,t,o),o)!(i in e)&&(e[i]=o[i]);for(var n in qC(e),this)"_"===n.charAt(0)&&"function"==typeof this[n]&&(this[n]=this[n].bind(this));this.nativeDraggable=!e.forceFallback&&VC,this.nativeDraggable&&(this.options.touchStartThreshold=1),e.supportPointer?L$(t,"pointerdown",this._onTapStart):(L$(t,"mousedown",this._onTapStart),L$(t,"touchstart",this._onTapStart)),this.nativeDraggable&&(L$(t,"dragover",this),L$(t,"dragenter",this)),CC.push(this.el),e.store&&e.store.get&&this.sort(e.store.get(this)||[]),I$(this,lE())}function dE(t,e,o,i,n,r,a,s){var l,c,u=t[eC],h=u.options.onMove;return!window.CustomEvent||Kk||Yk?(l=document.createEvent("Event")).initEvent("move",!0,!0):l=new CustomEvent("move",{bubbles:!0,cancelable:!0}),l.to=e,l.from=t,l.dragged=o,l.draggedRect=i,l.related=n||e,l.relatedRect=r||Y$(e),l.willInsertAfter=s,l.originalEvent=a,t.dispatchEvent(l),h&&(c=h.call(u,l,a)),c}function pE(t){t.draggable=!1}function mE(){DC=!1}function fE(t,e,o,i,n,r,a,s){var l=i?t.clientY:t.clientX,c=i?o.height:o.width,u=i?o.top:o.left,h=i?o.bottom:o.right,d=!1;if(!a)if(s&&OCu+c*r/2:lh-OC)return-zC}else if(l>u+c*(1-n)/2&&lh-c*r/2)?l>u+c/2?1:-1:0}function gE(t){for(var e=t.tagName+t.className+t.src+t.href+t.textContent,o=e.length,i=0;o--;)i+=e.charCodeAt(o);return i.toString(36)}function _E(t){return setTimeout(t,0)}function vE(t){return clearTimeout(t)}function bE(){function t(){for(var t in this.defaults={scroll:!0,forceAutoScrollFallback:!1,scrollSensitivity:30,scrollSpeed:10,bubbleScroll:!0},this)"_"===t.charAt(0)&&"function"==typeof this[t]&&(this[t]=this[t].bind(this))}return t.prototype={dragStarted:function(t){var e=t.originalEvent;this.sortable.nativeDraggable?L$(document,"dragover",this._handleAutoScroll):this.options.supportPointer?L$(document,"pointermove",this._handleFallbackAutoScroll):e.touches?L$(document,"touchmove",this._handleFallbackAutoScroll):L$(document,"mousemove",this._handleFallbackAutoScroll)},dragOverCompleted:function(t){var e=t.originalEvent;this.options.dragOverBubble||e.rootEl||this._handleAutoScroll(e)},drop:function(){this.sortable.nativeDraggable?D$(document,"dragover",this._handleAutoScroll):(D$(document,"pointermove",this._handleFallbackAutoScroll),D$(document,"touchmove",this._handleFallbackAutoScroll),D$(document,"mousemove",this._handleFallbackAutoScroll)),wE(),yE(),clearTimeout(tC),tC=void 0},nulling:function(){r$=e$=t$=o$=a$=i$=n$=null,QC.length=0},_handleFallbackAutoScroll:function(t){this._handleAutoScroll(t,!0)},_handleAutoScroll:function(t,e){var o=this,i=(t.touches?t.touches[0]:t).clientX,n=(t.touches?t.touches[0]:t).clientY,r=document.elementFromPoint(i,n);if(r$=t,e||this.options.forceAutoScrollFallback||Yk||Kk||Wk){s$(t,this.options,r,e);var a=Q$(r,!0);!o$||a$&&i===i$&&n===n$||(a$&&wE(),a$=setInterval(function(){var r=Q$(document.elementFromPoint(i,n),!0);r!==a&&(a=r,yE()),s$(t,o.options,r,e)},10),i$=i,n$=n)}else{if(!this.options.bubbleScroll||Q$(r,!0)===K$())return void yE();s$(t,this.options,Q$(r,!1),!1)}}},I$(t,{pluginName:"scroll",initializeByDefault:!0})}function yE(){QC.forEach(function(t){clearInterval(t.pid)}),QC=[]}function wE(){clearInterval(a$)}function kE(){}function CE(){}function $E(){function t(){this.defaults={swapClass:"sortable-swap-highlight"}}return t.prototype={dragStart:function(t){u$=t.dragEl},dragOverValid:function(t){var e=t.completed,o=t.target,i=t.onMove,n=t.activeSortable,r=t.changed,a=t.cancel;if(n.options.swap){var s=this.sortable.el,l=this.options;if(o&&o!==s){var c=u$;!1!==i(o)?(U$(o,l.swapClass,!0),u$=o):u$=null,c&&c!==u$&&U$(c,l.swapClass,!1)}r(),e(!0),a()}},drop:function(t){var e=t.activeSortable,o=t.putSortable,i=t.dragEl,n=o||this.sortable,r=this.options;u$&&U$(u$,r.swapClass,!1),u$&&(r.swap||o&&o.options.swap)&&i!==u$&&(n.captureAnimationState(),n!==e&&e.captureAnimationState(),function(t,e){var o,i,n=t.parentNode,r=e.parentNode;if(!n||!r||n.isEqualNode(e)||r.isEqualNode(t))return;o=Z$(t),i=Z$(e),n.isEqualNode(r)&&o1&&(h$.forEach(function(t){i.addAnimationState({target:t,rect:g$?Y$(t):n}),aE(t),t.fromRect=n,e.removeAnimationState(t)}),g$=!1,function(t,e){h$.forEach(function(o,i){var n=e.children[o.sortableIndex+(t?Number(i):0)];n?e.insertBefore(o,n):e.appendChild(o)})}(!this.options.removeCloneOnHide,o))},dragOverCompleted:function(t){var e=t.sortable,o=t.isOwner,i=t.insertion,n=t.activeSortable,r=t.parentEl,a=t.putSortable,s=this.options;if(i){if(o&&n._hideClone(),f$=!1,s.animation&&h$.length>1&&(g$||!o&&!n.options.sort&&!a)){var l=Y$(v$,!1,!0,!0);h$.forEach(function(t){t!==v$&&(rE(t,l),r.appendChild(t))}),g$=!0}if(!o)if(g$||AE(),h$.length>1){var c=y$;n._showClone(e),n.options.animation&&!y$&&c&&d$.forEach(function(t){n.addAnimationState({target:t,rect:b$}),t.fromRect=b$,t.thisAnimationDuration=null})}else n._showClone(e)}},dragOverAnimationCapture:function(t){var e=t.dragRect,o=t.isOwner,i=t.activeSortable;if(h$.forEach(function(t){t.thisAnimationDuration=null}),i.options.animation&&!o&&i.multiDrag.isMultiDrag){b$=I$({},e);var n=F$(v$,!0);b$.top-=n.f,b$.left-=n.e}},dragOverAnimationComplete:function(){g$&&(g$=!1,AE())},drop:function(t){var e=t.originalEvent,o=t.rootEl,i=t.parentEl,n=t.sortable,r=t.dispatchSortableEvent,a=t.oldIndex,s=t.putSortable,l=s||this.sortable;if(e){var c=this.options,u=i.children;if(!_$)if(c.multiDragKey&&!this.multiDragKeyDown&&this._deselectMultiDrag(),U$(v$,c.selectedClass,!~h$.indexOf(v$)),~h$.indexOf(v$))h$.splice(h$.indexOf(v$),1),p$=null,cE({sortable:n,rootEl:o,name:"deselect",targetEl:v$,originalEvent:e});else{if(h$.push(v$),cE({sortable:n,rootEl:o,name:"select",targetEl:v$,originalEvent:e}),e.shiftKey&&p$&&n.el.contains(p$)){var h=Z$(p$),d=Z$(v$);~h&&~d&&h!==d&&function(){var t,r;d>h?(r=h,t=d):(r=d,t=h+1);for(var a=c.filter;r1){var p=Y$(v$),m=Z$(v$,":not(."+this.options.selectedClass+")");if(!f$&&c.animation&&(v$.thisAnimationDuration=null),l.captureAnimationState(),!f$&&(c.animation&&(v$.fromRect=p,h$.forEach(function(t){if(t.thisAnimationDuration=null,t!==v$){var e=g$?Y$(t):p;t.fromRect=e,l.addAnimationState({target:t,rect:e})}})),AE(),h$.forEach(function(t){u[m]?i.insertBefore(t,u[m]):i.appendChild(t),m++}),a===Z$(v$))){var f=!1;h$.forEach(function(t){t.sortableIndex===Z$(t)||(f=!0)}),f&&(r("update"),r("sort"))}h$.forEach(function(t){aE(t)}),l.animateAll()}m$=l}(o===i||s&&"clone"!==s.lastPutMode)&&d$.forEach(function(t){t.parentNode&&t.parentNode.removeChild(t)})}},nullingGlobal:function(){this.isMultiDrag=_$=!1,d$.length=0},destroyGlobal:function(){this._deselectMultiDrag(),D$(document,"pointerup",this._deselectMultiDrag),D$(document,"mouseup",this._deselectMultiDrag),D$(document,"touchend",this._deselectMultiDrag),D$(document,"keydown",this._checkKeyDown),D$(document,"keyup",this._checkKeyUp)},_deselectMultiDrag:function(t){if(!(void 0!==_$&&_$||m$!==this.sortable||t&&R$(t.target,this.options.draggable,this.sortable.el,!1)||t&&0!==t.button))for(;h$.length;){var e=h$[0];U$(e,this.options.selectedClass,!1),h$.shift(),cE({sortable:this.sortable,rootEl:this.sortable.el,name:"deselect",targetEl:e,originalEvent:t})}},_checkKeyDown:function(t){t.key===this.options.multiDragKey&&(this.multiDragKeyDown=!0)},_checkKeyUp:function(t){t.key===this.options.multiDragKey&&(this.multiDragKeyDown=!1)}},I$(t,{pluginName:"multiDrag",utils:{select:function(t){var e=t.parentNode[eC];e&&e.options.multiDrag&&!~h$.indexOf(t)&&(m$&&m$!==e&&(m$.multiDrag._deselectMultiDrag(),m$=e),U$(t,e.options.selectedClass,!0),h$.push(t))},deselect:function(t){var e=t.parentNode[eC],o=h$.indexOf(t);e&&e.options.multiDrag&&~o&&(U$(t,e.options.selectedClass,!1),h$.splice(o,1))}},eventProperties:function(){var t=this,e=[],o=[];return h$.forEach(function(i){var n;e.push({multiDragElement:i,index:i.sortableIndex}),n=g$&&i!==v$?-1:g$?Z$(i,":not(."+t.options.selectedClass+")"):Z$(i),o.push({multiDragElement:i,index:n})}),{items:N$(h$),clones:[].concat(d$),oldIndicies:e,newIndicies:o}},optionListeners:{multiDragKey:function(t){return"ctrl"===(t=t.toLowerCase())?t="Control":t.length>1&&(t=t.charAt(0).toUpperCase()+t.substr(1)),t}}})}function xE(t,e){d$.forEach(function(o,i){var n=e.children[o.sortableIndex+(t?Number(i):0)];n?e.insertBefore(o,n):e.appendChild(o)})}function AE(){h$.forEach(function(t){t!==v$&&t.parentNode&&t.parentNode.removeChild(t)})}var SE,TE,ME,IE,zE,PE,NE,OE,BE,LE,DE,jE,HE,RE,UE,VE=kt(()=>{Kk=B$(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),Yk=B$(/Edge/i),qk=B$(/firefox/i),Wk=B$(/safari/i)&&!B$(/chrome/i)&&!B$(/android/i),Xk=B$(/iP(ad|od|hone)/i),Zk=B$(/chrome/i)&&B$(/android/i),Jk={capture:!1,passive:!1},Qk=/\s+/g,eC="Sortable"+/* @__PURE__ */(new Date).getTime(),oC=[],iC={initializeByDefault:!0},nC={mount:function(t){for(var e in iC)iC.hasOwnProperty(e)&&!(e in t)&&(t[e]=iC[e]);oC.forEach(function(e){if(e.pluginName===t.pluginName)throw"Sortable: Cannot mount plugin ".concat(t.pluginName," more than once")}),oC.push(t)},pluginEvent:function(t,e,o){var i=this;this.eventCanceled=!1,o.cancel=function(){i.eventCanceled=!0};var n=t+"Global";oC.forEach(function(i){e[i.pluginName]&&(e[i.pluginName][n]&&e[i.pluginName][n](P$({sortable:e},o)),e.options[i.pluginName]&&e[i.pluginName][t]&&e[i.pluginName][t](P$({sortable:e},o)))})},initializePlugins:function(t,e,o,i){for(var n in oC.forEach(function(i){var n=i.pluginName;if(t.options[n]||i.initializeByDefault){var r=new i(t,e,t.options);r.sortable=t,r.options=t.options,t[n]=r,I$(o,r.defaults)}}),t.options)if(t.options.hasOwnProperty(n)){var r=this.modifyOption(t,n,t.options[n]);void 0!==r&&(t.options[n]=r)}},getEventProperties:function(t,e){var o={};return oC.forEach(function(i){"function"==typeof i.eventProperties&&I$(o,i.eventProperties.call(e[i.pluginName],t))}),o},modifyOption:function(t,e,o){var i;return oC.forEach(function(n){t[n.pluginName]&&n.optionListeners&&"function"==typeof n.optionListeners[e]&&(i=n.optionListeners[e].call(t[n.pluginName],o))}),i}},rC=["evt"],aC=function(t,e){var o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=o.evt,n=function(t,e){if(null==t)return{};var o,i,n=function(t,e){if(null==t)return{};var o={};for(var i in t)if({}.hasOwnProperty.call(t,i)){if(-1!==e.indexOf(i))continue;o[i]=t[i]}return o}(t,e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);for(i=0;i=i&&"none"===o[UC]||r&&"none"===o[UC]&&l+c>i)?"vertical":"horizontal"},KC=function(t,e,o){var i=o?t.left:t.top,n=o?t.right:t.bottom,r=o?t.width:t.height,a=o?e.left:e.top,s=o?e.right:e.bottom,l=o?e.width:e.height;return i===a||n===s||i+r/2===a+l/2},YC=function(t,e){var o;return CC.some(function(i){var n=i[eC].options.emptyInsertThreshold;if(n&&!X$(i)){var r=Y$(i),a=t>=r.left-n&&t<=r.right+n,s=e>=r.top-n&&e<=r.bottom+n;return a&&s?o=i:void 0}}),o},qC=function(t){function e(t,o){return function(i,n,r,a){var s=i.options.group.name&&n.options.group.name&&i.options.group.name===n.options.group.name;if(null==t&&(o||s))return!0;if(null==t||!1===t)return!1;if(o&&"clone"===t)return t;if("function"==typeof t)return e(t(i,n,r,a),o)(i,n,r,a);var l=(o?i:n).options.group.name;return!0===t||"string"==typeof t&&t===l||t.join&&t.indexOf(l)>-1}}var o={},i=t.group;i&&"object"==O$(i)||(i={name:i}),o.name=i.name,o.checkPull=e(i.pull,!0),o.checkPut=e(i.put),o.revertClone=i.revertClone,t.group=o},WC=function(){!FC&&cC&&V$(cC,"display","none")},XC=function(){!FC&&cC&&V$(cC,"display","")},HC&&!Zk&&document.addEventListener("click",function(t){if(kC)return t.preventDefault(),t.stopPropagation&&t.stopPropagation(),t.stopImmediatePropagation&&t.stopImmediatePropagation(),kC=!1,!1},!0),ZC=function(t){if(sC){t=t.touches?t.touches[0]:t;var e=YC(t.clientX,t.clientY);if(e){var o={};for(var i in t)t.hasOwnProperty(i)&&(o[i]=t[i]);o.target=o.rootEl=e,o.preventDefault=void 0,o.stopPropagation=void 0,e[eC]._onDragOver(o)}}},JC=function(t){sC&&sC.parentNode[eC]._isOutsideThisEl(t.target)},hE.prototype={constructor:hE,_isOutsideThisEl:function(t){this.el.contains(t)||t===this.el||(IC=null)},_getDirection:function(t,e){return"function"==typeof this.options.direction?this.options.direction.call(this,t,e,sC):this.options.direction},_onTapStart:function(t){if(t.cancelable){var e=this,o=this.el,i=this.options,n=i.preventOnFilter,r=t.type,a=t.touches&&t.touches[0]||t.pointerType&&"touch"===t.pointerType&&t,s=(a||t).target,l=t.target.shadowRoot&&(t.path&&t.path[0]||t.composedPath&&t.composedPath()[0])||s,c=i.filter;if(function(t){jC.length=0;for(var e=t.getElementsByTagName("input"),o=e.length;o--;){var i=e[o];i.checked&&jC.push(i)}}(o),!sC&&!(/mousedown|pointerdown/.test(r)&&0!==t.button||i.disabled)&&!l.isContentEditable&&(this.nativeDraggable||!Wk||!s||"SELECT"!==s.tagName.toUpperCase())&&!((s=R$(s,i.draggable,o,!1))&&s.animated||dC===s)){if(fC=Z$(s),_C=Z$(s,i.draggable),"function"==typeof c){if(c.call(this,t,s,this))return uE({sortable:e,rootEl:l,name:"filter",targetEl:s,toEl:o,fromEl:o}),aC("filter",e,{evt:t}),void(n&&t.preventDefault())}else if(c&&(c=c.split(",").some(function(i){if(i=R$(l,i.trim(),o,!1))return uE({sortable:e,rootEl:i,name:"filter",targetEl:s,fromEl:o,toEl:o}),aC("filter",e,{evt:t}),!0})))return void(n&&t.preventDefault());i.handle&&!R$(l,i.handle,o,!1)||this._prepareDragStart(t,a,s)}}},_prepareDragStart:function(t,e,o){var i,n=this,r=n.el,a=n.options,s=r.ownerDocument;if(o&&!sC&&o.parentNode===r){var l=Y$(o);if(uC=r,lC=(sC=o).parentNode,hC=sC.nextSibling,dC=o,bC=a.group,hE.dragged=sC,$C={target:sC,clientX:(e||t).clientX,clientY:(e||t).clientY},SC=$C.clientX-l.left,TC=$C.clientY-l.top,this._lastX=(e||t).clientX,this._lastY=(e||t).clientY,sC.style["will-change"]="all",i=function(){aC("delayEnded",n,{evt:t}),hE.eventCanceled?n._onDrop():(n._disableDelayedDragEvents(),!qk&&n.nativeDraggable&&(sC.draggable=!0),n._triggerDragStart(t,e),uE({sortable:n,name:"choose",originalEvent:t}),U$(sC,a.chosenClass,!0))},a.ignore.split(",").forEach(function(t){G$(sC,t.trim(),pE)}),L$(s,"dragover",ZC),L$(s,"mousemove",ZC),L$(s,"touchmove",ZC),a.supportPointer?(L$(s,"pointerup",n._onDrop),!this.nativeDraggable&&L$(s,"pointercancel",n._onDrop)):(L$(s,"mouseup",n._onDrop),L$(s,"touchend",n._onDrop),L$(s,"touchcancel",n._onDrop)),qk&&this.nativeDraggable&&(this.options.touchStartThreshold=4,sC.draggable=!0),aC("delayStart",this,{evt:t}),!a.delay||a.delayOnTouchOnly&&!e||this.nativeDraggable&&(Yk||Kk))i();else{if(hE.eventCanceled)return void this._onDrop();a.supportPointer?(L$(s,"pointerup",n._disableDelayedDrag),L$(s,"pointercancel",n._disableDelayedDrag)):(L$(s,"mouseup",n._disableDelayedDrag),L$(s,"touchend",n._disableDelayedDrag),L$(s,"touchcancel",n._disableDelayedDrag)),L$(s,"mousemove",n._delayedDragTouchMoveHandler),L$(s,"touchmove",n._delayedDragTouchMoveHandler),a.supportPointer&&L$(s,"pointermove",n._delayedDragTouchMoveHandler),n._dragStartTimer=setTimeout(i,a.delay)}}},_delayedDragTouchMoveHandler:function(t){var e=t.touches?t.touches[0]:t;Math.max(Math.abs(e.clientX-this._lastX),Math.abs(e.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){sC&&pE(sC),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var t=this.el.ownerDocument;D$(t,"mouseup",this._disableDelayedDrag),D$(t,"touchend",this._disableDelayedDrag),D$(t,"touchcancel",this._disableDelayedDrag),D$(t,"pointerup",this._disableDelayedDrag),D$(t,"pointercancel",this._disableDelayedDrag),D$(t,"mousemove",this._delayedDragTouchMoveHandler),D$(t,"touchmove",this._delayedDragTouchMoveHandler),D$(t,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(t,e){e=e||"touch"==t.pointerType&&t,!this.nativeDraggable||e?this.options.supportPointer?L$(document,"pointermove",this._onTouchMove):L$(document,e?"touchmove":"mousemove",this._onTouchMove):(L$(sC,"dragend",this),L$(uC,"dragstart",this._onDragStart));try{document.selection?_E(function(){document.selection.empty()}):window.getSelection().removeAllRanges()}catch(o){}},_dragStarted:function(t,e){if(wC=!1,uC&&sC){aC("dragStarted",this,{evt:e}),this.nativeDraggable&&L$(document,"dragover",JC);var o=this.options;!t&&U$(sC,o.dragClass,!1),U$(sC,o.ghostClass,!0),hE.active=this,t&&this._appendGhost(),uE({sortable:this,name:"start",originalEvent:e})}else this._nulling()},_emulateDragOver:function(){if(EC){this._lastX=EC.clientX,this._lastY=EC.clientY,WC();for(var t=document.elementFromPoint(EC.clientX,EC.clientY),e=t;t&&t.shadowRoot&&(t=t.shadowRoot.elementFromPoint(EC.clientX,EC.clientY))!==e;)e=t;if(sC.parentNode[eC]._isOutsideThisEl(t),e)do{if(e[eC]){if(e[eC]._onDragOver({clientX:EC.clientX,clientY:EC.clientY,target:t,rootEl:e})&&!this.options.dragoverBubble)break}t=e}while(e=H$(e));XC()}},_onTouchMove:function(t){if($C){var e=this.options,o=e.fallbackTolerance,i=e.fallbackOffset,n=t.touches?t.touches[0]:t,r=cC&&F$(cC,!0),a=cC&&r&&r.a,s=cC&&r&&r.d,l=RC&&BC&&J$(BC),c=(n.clientX-$C.clientX+i.x)/(a||1)+(l?l[0]-LC[0]:0)/(a||1),u=(n.clientY-$C.clientY+i.y)/(s||1)+(l?l[1]-LC[1]:0)/(s||1);if(!hE.active&&!wC){if(o&&Math.max(Math.abs(n.clientX-this._lastX),Math.abs(n.clientY-this._lastY))n.right+10||t.clientY>i.bottom&&t.clientX>i.left:t.clientY>n.bottom+10||t.clientX>i.right&&t.clientY>i.top}(t,n,this)&&!f.animated){if(f===sC)return I(!1);if(f&&r===t.target&&(a=f),a&&(o=Y$(a)),!1!==dE(uC,r,sC,e,a,o,t,!!a))return M(),f&&f.nextSibling?r.insertBefore(sC,f.nextSibling):r.appendChild(sC),lC=r,z(),I(!0)}else if(f&&function(t,e,o){var i=Y$(W$(o.el,0,o.options,!0)),n=sE(o.el,o.options,cC);return e?t.clientX=0&&(uE({rootEl:lC,name:"add",toEl:lC,fromEl:uC,originalEvent:t}),uE({sortable:this,name:"remove",toEl:lC,originalEvent:t}),uE({rootEl:lC,name:"sort",toEl:lC,fromEl:uC,originalEvent:t}),uE({sortable:this,name:"sort",toEl:lC,originalEvent:t})),yC&&yC.save()):gC!==fC&&gC>=0&&(uE({sortable:this,name:"update",toEl:lC,originalEvent:t}),uE({sortable:this,name:"sort",toEl:lC,originalEvent:t})),hE.active&&(null!=gC&&-1!==gC||(gC=fC,vC=_C),uE({sortable:this,name:"end",toEl:lC,originalEvent:t}),this.save())))),this._nulling()},_nulling:function(){aC("nulling",this),uC=sC=lC=cC=hC=pC=dC=mC=$C=EC=MC=gC=vC=fC=_C=IC=zC=yC=bC=hE.dragged=hE.ghost=hE.clone=hE.active=null;var t=this.el;jC.forEach(function(e){t.contains(e)&&(e.checked=!0)}),jC.length=xC=AC=0},handleEvent:function(t){switch(t.type){case"drop":case"dragend":this._onDrop(t);break;case"dragenter":case"dragover":sC&&(this._onDragOver(t),function(t){t.dataTransfer&&(t.dataTransfer.dropEffect="move"),t.cancelable&&t.preventDefault()}(t));break;case"selectstart":t.preventDefault()}},toArray:function(){for(var t,e=[],o=this.el.children,i=0,n=o.length,r=this.options;i{Vt(),Be(),$$(),A$(),pn(),Oc(),Yf(),nk(),sv(),sk(),vn(),TE=new Set(["spacer"]),ME=class extends Hf{constructor(...t){super(...t),this._attached=!1,this._renderEmptySortable=!1,this._selectorKey=0}connectedCallback(){super.connectedCallback(),this._attached=!0}disconnectedCallback(){super.disconnectedCallback(),this._attached=!1}render(){if(!this.chips||!this.hass)return et;const t=ic(this.hass);return J` + `}},gn([Gt({attribute:!1})],jk.prototype,"config",void 0),gn([ie()],jk.prototype,"_guiModeAvailable",void 0),gn([ie()],jk.prototype,"_guiMode",void 0),gn([le(".editor")],jk.prototype,"_editorElement",void 0),jk=gn([Lt("mushroom-sub-element-editor")],jk)}),$$=kt(()=>{Ht(),Le(),Hk={},Rk=ue(class extends he{constructor(){super(...arguments),this.ot=Hk}render(t,e){return e()}update(t,[e,o]){if(Array.isArray(e)){if(Array.isArray(this.ot)&&this.ot.length===e.length&&e.every((t,e)=>t===this.ot[e]))return tt}else if(this.ot===e)return tt;return this.ot=Array.isArray(e)?Array.from(e):e,this.render(e,o)}})}),E$=kt(()=>{$$()}),x$=kt(()=>{Ht(),({I:Uk}=pt),Vk=()=>document.createComment(""),Fk={},Gk=(t,e=Fk)=>t._$AH=e}),A$=kt(()=>{Ht(),Le(),x$(),Kk=ue(class extends he{constructor(){super(...arguments),this.key=et}render(t,e){return this.key=t,e}update(t,[e,o]){return e!==this.key&&(Gk(t),this.key=e),o}})}),S$=kt(()=>{A$()}),T$=/* @__PURE__ */$t({AutoScroll:()=>yE,MultiDrag:()=>xE,OnSpill:()=>u$,Sortable:()=>dE,Swap:()=>EE,default:()=>dE});function M$(t,e){(null==e||e>t.length)&&(e=t.length);for(var o=0,i=Array(e);o"===e[0]&&(e=e.substring(1)),t)try{if(t.matches)return t.matches(e);if(t.msMatchesSelector)return t.msMatchesSelector(e);if(t.webkitMatchesSelector)return t.webkitMatchesSelector(e)}catch(K){return!1}return!1}}function R$(t){return t.host&&t!==document&&t.host.nodeType&&t.host!==t?t.host:t.parentNode}function U$(t,e,o,i){if(t){o=o||document;do{if(null!=e&&(">"===e[0]?t.parentNode===o&&H$(t,e):H$(t,e))||i&&t===o)return t;if(t===o)break}while(t=R$(t))}return null}function V$(t,e,o){t&&e&&(t.classList?t.classList[o?"add":"remove"](e):t.className=((" "+t.className+" ").replace(tC," ").replace(" "+e+" "," ")+(o?" "+e:"")).replace(tC," "))}function F$(t,e,o){var i=t&&t.style;if(i){if(void 0===o)return document.defaultView&&document.defaultView.getComputedStyle?o=document.defaultView.getComputedStyle(t,""):t.currentStyle&&(o=t.currentStyle),void 0===e?o:o[e];e in i||-1!==e.indexOf("webkit")||(e="-webkit-"+e),i[e]=o+("string"==typeof o?"":"px")}}function G$(t,e){var o="";if("string"==typeof t)o=t;else do{var i=F$(t,"transform");i&&"none"!==i&&(o=i+" "+o)}while(!e&&(t=t.parentNode));var n=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return n&&new n(o)}function K$(t,e,o){if(t){var i=t.getElementsByTagName(e),n=0,r=i.length;if(o)for(;n=r:n<=r))return i;if(i===Y$())break;i=tE(i,!1)}return!1}function X$(t,e,o,i){for(var n=0,r=0,a=t.children;rli":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return KC(t,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(t,e){t.setData("Text",e.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,delayOnTouchOnly:!1,touchStartThreshold:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:!1!==dE.supportPointer&&"PointerEvent"in window&&(!Xk||Zk),emptyInsertThreshold:5};for(var i in rC.initializePlugins(this,t,o),o)!(i in e)&&(e[i]=o[i]);for(var n in WC(e),this)"_"===n.charAt(0)&&"function"==typeof this[n]&&(this[n]=this[n].bind(this));this.nativeDraggable=!e.forceFallback&&FC,this.nativeDraggable&&(this.options.touchStartThreshold=1),e.supportPointer?D$(t,"pointerdown",this._onTapStart):(D$(t,"mousedown",this._onTapStart),D$(t,"touchstart",this._onTapStart)),this.nativeDraggable&&(D$(t,"dragover",this),D$(t,"dragenter",this)),$C.push(this.el),e.store&&e.store.get&&this.sort(e.store.get(this)||[]),z$(this,cE())}function pE(t,e,o,i,n,r,a,s){var l,c,u=t[oC],h=u.options.onMove;return!window.CustomEvent||Yk||qk?(l=document.createEvent("Event")).initEvent("move",!0,!0):l=new CustomEvent("move",{bubbles:!0,cancelable:!0}),l.to=e,l.from=t,l.dragged=o,l.draggedRect=i,l.related=n||e,l.relatedRect=r||q$(e),l.willInsertAfter=s,l.originalEvent=a,t.dispatchEvent(l),h&&(c=h.call(u,l,a)),c}function mE(t){t.draggable=!1}function fE(){jC=!1}function gE(t,e,o,i,n,r,a,s){var l=i?t.clientY:t.clientX,c=i?o.height:o.width,u=i?o.top:o.left,h=i?o.bottom:o.right,d=!1;if(!a)if(s&&BCu+c*r/2:lh-BC)return-PC}else if(l>u+c*(1-n)/2&&lh-c*r/2)?l>u+c/2?1:-1:0}function _E(t){for(var e=t.tagName+t.className+t.src+t.href+t.textContent,o=e.length,i=0;o--;)i+=e.charCodeAt(o);return i.toString(36)}function vE(t){return setTimeout(t,0)}function bE(t){return clearTimeout(t)}function yE(){function t(){for(var t in this.defaults={scroll:!0,forceAutoScrollFallback:!1,scrollSensitivity:30,scrollSpeed:10,bubbleScroll:!0},this)"_"===t.charAt(0)&&"function"==typeof this[t]&&(this[t]=this[t].bind(this))}return t.prototype={dragStarted:function(t){var e=t.originalEvent;this.sortable.nativeDraggable?D$(document,"dragover",this._handleAutoScroll):this.options.supportPointer?D$(document,"pointermove",this._handleFallbackAutoScroll):e.touches?D$(document,"touchmove",this._handleFallbackAutoScroll):D$(document,"mousemove",this._handleFallbackAutoScroll)},dragOverCompleted:function(t){var e=t.originalEvent;this.options.dragOverBubble||e.rootEl||this._handleAutoScroll(e)},drop:function(){this.sortable.nativeDraggable?j$(document,"dragover",this._handleAutoScroll):(j$(document,"pointermove",this._handleFallbackAutoScroll),j$(document,"touchmove",this._handleFallbackAutoScroll),j$(document,"mousemove",this._handleFallbackAutoScroll)),kE(),wE(),clearTimeout(eC),eC=void 0},nulling:function(){a$=o$=e$=i$=s$=n$=r$=null,t$.length=0},_handleFallbackAutoScroll:function(t){this._handleAutoScroll(t,!0)},_handleAutoScroll:function(t,e){var o=this,i=(t.touches?t.touches[0]:t).clientX,n=(t.touches?t.touches[0]:t).clientY,r=document.elementFromPoint(i,n);if(a$=t,e||this.options.forceAutoScrollFallback||qk||Yk||Xk){l$(t,this.options,r,e);var a=tE(r,!0);!i$||s$&&i===n$&&n===r$||(s$&&kE(),s$=setInterval(function(){var r=tE(document.elementFromPoint(i,n),!0);r!==a&&(a=r,wE()),l$(t,o.options,r,e)},10),n$=i,r$=n)}else{if(!this.options.bubbleScroll||tE(r,!0)===Y$())return void wE();l$(t,this.options,tE(r,!1),!1)}}},z$(t,{pluginName:"scroll",initializeByDefault:!0})}function wE(){t$.forEach(function(t){clearInterval(t.pid)}),t$=[]}function kE(){clearInterval(s$)}function CE(){}function $E(){}function EE(){function t(){this.defaults={swapClass:"sortable-swap-highlight"}}return t.prototype={dragStart:function(t){h$=t.dragEl},dragOverValid:function(t){var e=t.completed,o=t.target,i=t.onMove,n=t.activeSortable,r=t.changed,a=t.cancel;if(n.options.swap){var s=this.sortable.el,l=this.options;if(o&&o!==s){var c=h$;!1!==i(o)?(V$(o,l.swapClass,!0),h$=o):h$=null,c&&c!==h$&&V$(c,l.swapClass,!1)}r(),e(!0),a()}},drop:function(t){var e=t.activeSortable,o=t.putSortable,i=t.dragEl,n=o||this.sortable,r=this.options;h$&&V$(h$,r.swapClass,!1),h$&&(r.swap||o&&o.options.swap)&&i!==h$&&(n.captureAnimationState(),n!==e&&e.captureAnimationState(),function(t,e){var o,i,n=t.parentNode,r=e.parentNode;if(!n||!r||n.isEqualNode(e)||r.isEqualNode(t))return;o=J$(t),i=J$(e),n.isEqualNode(r)&&o1&&(d$.forEach(function(t){i.addAnimationState({target:t,rect:_$?q$(t):n}),sE(t),t.fromRect=n,e.removeAnimationState(t)}),_$=!1,function(t,e){d$.forEach(function(o,i){var n=e.children[o.sortableIndex+(t?Number(i):0)];n?e.insertBefore(o,n):e.appendChild(o)})}(!this.options.removeCloneOnHide,o))},dragOverCompleted:function(t){var e=t.sortable,o=t.isOwner,i=t.insertion,n=t.activeSortable,r=t.parentEl,a=t.putSortable,s=this.options;if(i){if(o&&n._hideClone(),g$=!1,s.animation&&d$.length>1&&(_$||!o&&!n.options.sort&&!a)){var l=q$(b$,!1,!0,!0);d$.forEach(function(t){t!==b$&&(aE(t,l),r.appendChild(t))}),_$=!0}if(!o)if(_$||SE(),d$.length>1){var c=w$;n._showClone(e),n.options.animation&&!w$&&c&&p$.forEach(function(t){n.addAnimationState({target:t,rect:y$}),t.fromRect=y$,t.thisAnimationDuration=null})}else n._showClone(e)}},dragOverAnimationCapture:function(t){var e=t.dragRect,o=t.isOwner,i=t.activeSortable;if(d$.forEach(function(t){t.thisAnimationDuration=null}),i.options.animation&&!o&&i.multiDrag.isMultiDrag){y$=z$({},e);var n=G$(b$,!0);y$.top-=n.f,y$.left-=n.e}},dragOverAnimationComplete:function(){_$&&(_$=!1,SE())},drop:function(t){var e=t.originalEvent,o=t.rootEl,i=t.parentEl,n=t.sortable,r=t.dispatchSortableEvent,a=t.oldIndex,s=t.putSortable,l=s||this.sortable;if(e){var c=this.options,u=i.children;if(!v$)if(c.multiDragKey&&!this.multiDragKeyDown&&this._deselectMultiDrag(),V$(b$,c.selectedClass,!~d$.indexOf(b$)),~d$.indexOf(b$))d$.splice(d$.indexOf(b$),1),m$=null,uE({sortable:n,rootEl:o,name:"deselect",targetEl:b$,originalEvent:e});else{if(d$.push(b$),uE({sortable:n,rootEl:o,name:"select",targetEl:b$,originalEvent:e}),e.shiftKey&&m$&&n.el.contains(m$)){var h=J$(m$),d=J$(b$);~h&&~d&&h!==d&&function(){var t,r;d>h?(r=h,t=d):(r=d,t=h+1);for(var a=c.filter;r1){var p=q$(b$),m=J$(b$,":not(."+this.options.selectedClass+")");if(!g$&&c.animation&&(b$.thisAnimationDuration=null),l.captureAnimationState(),!g$&&(c.animation&&(b$.fromRect=p,d$.forEach(function(t){if(t.thisAnimationDuration=null,t!==b$){var e=_$?q$(t):p;t.fromRect=e,l.addAnimationState({target:t,rect:e})}})),SE(),d$.forEach(function(t){u[m]?i.insertBefore(t,u[m]):i.appendChild(t),m++}),a===J$(b$))){var f=!1;d$.forEach(function(t){t.sortableIndex===J$(t)||(f=!0)}),f&&(r("update"),r("sort"))}d$.forEach(function(t){sE(t)}),l.animateAll()}f$=l}(o===i||s&&"clone"!==s.lastPutMode)&&p$.forEach(function(t){t.parentNode&&t.parentNode.removeChild(t)})}},nullingGlobal:function(){this.isMultiDrag=v$=!1,p$.length=0},destroyGlobal:function(){this._deselectMultiDrag(),j$(document,"pointerup",this._deselectMultiDrag),j$(document,"mouseup",this._deselectMultiDrag),j$(document,"touchend",this._deselectMultiDrag),j$(document,"keydown",this._checkKeyDown),j$(document,"keyup",this._checkKeyUp)},_deselectMultiDrag:function(t){if(!(void 0!==v$&&v$||f$!==this.sortable||t&&U$(t.target,this.options.draggable,this.sortable.el,!1)||t&&0!==t.button))for(;d$.length;){var e=d$[0];V$(e,this.options.selectedClass,!1),d$.shift(),uE({sortable:this.sortable,rootEl:this.sortable.el,name:"deselect",targetEl:e,originalEvent:t})}},_checkKeyDown:function(t){t.key===this.options.multiDragKey&&(this.multiDragKeyDown=!0)},_checkKeyUp:function(t){t.key===this.options.multiDragKey&&(this.multiDragKeyDown=!1)}},z$(t,{pluginName:"multiDrag",utils:{select:function(t){var e=t.parentNode[oC];e&&e.options.multiDrag&&!~d$.indexOf(t)&&(f$&&f$!==e&&(f$.multiDrag._deselectMultiDrag(),f$=e),V$(t,e.options.selectedClass,!0),d$.push(t))},deselect:function(t){var e=t.parentNode[oC],o=d$.indexOf(t);e&&e.options.multiDrag&&~o&&(V$(t,e.options.selectedClass,!1),d$.splice(o,1))}},eventProperties:function(){var t=this,e=[],o=[];return d$.forEach(function(i){var n;e.push({multiDragElement:i,index:i.sortableIndex}),n=_$&&i!==b$?-1:_$?J$(i,":not(."+t.options.selectedClass+")"):J$(i),o.push({multiDragElement:i,index:n})}),{items:O$(d$),clones:[].concat(p$),oldIndicies:e,newIndicies:o}},optionListeners:{multiDragKey:function(t){return"ctrl"===(t=t.toLowerCase())?t="Control":t.length>1&&(t=t.charAt(0).toUpperCase()+t.substr(1)),t}}})}function AE(t,e){p$.forEach(function(o,i){var n=e.children[o.sortableIndex+(t?Number(i):0)];n?e.insertBefore(o,n):e.appendChild(o)})}function SE(){d$.forEach(function(t){t!==b$&&t.parentNode&&t.parentNode.removeChild(t)})}var TE,ME,IE,zE,PE,NE,OE,BE,LE,DE,jE,HE,RE,UE,VE,FE=kt(()=>{Yk=L$(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),qk=L$(/Edge/i),Wk=L$(/firefox/i),Xk=L$(/safari/i)&&!L$(/chrome/i)&&!L$(/android/i),Zk=L$(/iP(ad|od|hone)/i),Jk=L$(/chrome/i)&&L$(/android/i),Qk={capture:!1,passive:!1},tC=/\s+/g,oC="Sortable"+/* @__PURE__ */(new Date).getTime(),iC=[],nC={initializeByDefault:!0},rC={mount:function(t){for(var e in nC)nC.hasOwnProperty(e)&&!(e in t)&&(t[e]=nC[e]);iC.forEach(function(e){if(e.pluginName===t.pluginName)throw"Sortable: Cannot mount plugin ".concat(t.pluginName," more than once")}),iC.push(t)},pluginEvent:function(t,e,o){var i=this;this.eventCanceled=!1,o.cancel=function(){i.eventCanceled=!0};var n=t+"Global";iC.forEach(function(i){e[i.pluginName]&&(e[i.pluginName][n]&&e[i.pluginName][n](N$({sortable:e},o)),e.options[i.pluginName]&&e[i.pluginName][t]&&e[i.pluginName][t](N$({sortable:e},o)))})},initializePlugins:function(t,e,o,i){for(var n in iC.forEach(function(i){var n=i.pluginName;if(t.options[n]||i.initializeByDefault){var r=new i(t,e,t.options);r.sortable=t,r.options=t.options,t[n]=r,z$(o,r.defaults)}}),t.options)if(t.options.hasOwnProperty(n)){var r=this.modifyOption(t,n,t.options[n]);void 0!==r&&(t.options[n]=r)}},getEventProperties:function(t,e){var o={};return iC.forEach(function(i){"function"==typeof i.eventProperties&&z$(o,i.eventProperties.call(e[i.pluginName],t))}),o},modifyOption:function(t,e,o){var i;return iC.forEach(function(n){t[n.pluginName]&&n.optionListeners&&"function"==typeof n.optionListeners[e]&&(i=n.optionListeners[e].call(t[n.pluginName],o))}),i}},aC=["evt"],sC=function(t,e){var o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=o.evt,n=function(t,e){if(null==t)return{};var o,i,n=function(t,e){if(null==t)return{};var o={};for(var i in t)if({}.hasOwnProperty.call(t,i)){if(-1!==e.indexOf(i))continue;o[i]=t[i]}return o}(t,e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);for(i=0;i=i&&"none"===o[VC]||r&&"none"===o[VC]&&l+c>i)?"vertical":"horizontal"},YC=function(t,e,o){var i=o?t.left:t.top,n=o?t.right:t.bottom,r=o?t.width:t.height,a=o?e.left:e.top,s=o?e.right:e.bottom,l=o?e.width:e.height;return i===a||n===s||i+r/2===a+l/2},qC=function(t,e){var o;return $C.some(function(i){var n=i[oC].options.emptyInsertThreshold;if(n&&!Z$(i)){var r=q$(i),a=t>=r.left-n&&t<=r.right+n,s=e>=r.top-n&&e<=r.bottom+n;return a&&s?o=i:void 0}}),o},WC=function(t){function e(t,o){return function(i,n,r,a){var s=i.options.group.name&&n.options.group.name&&i.options.group.name===n.options.group.name;if(null==t&&(o||s))return!0;if(null==t||!1===t)return!1;if(o&&"clone"===t)return t;if("function"==typeof t)return e(t(i,n,r,a),o)(i,n,r,a);var l=(o?i:n).options.group.name;return!0===t||"string"==typeof t&&t===l||t.join&&t.indexOf(l)>-1}}var o={},i=t.group;i&&"object"==B$(i)||(i={name:i}),o.name=i.name,o.checkPull=e(i.pull,!0),o.checkPut=e(i.put),o.revertClone=i.revertClone,t.group=o},XC=function(){!GC&&uC&&F$(uC,"display","none")},ZC=function(){!GC&&uC&&F$(uC,"display","")},RC&&!Jk&&document.addEventListener("click",function(t){if(CC)return t.preventDefault(),t.stopPropagation&&t.stopPropagation(),t.stopImmediatePropagation&&t.stopImmediatePropagation(),CC=!1,!1},!0),JC=function(t){if(lC){t=t.touches?t.touches[0]:t;var e=qC(t.clientX,t.clientY);if(e){var o={};for(var i in t)t.hasOwnProperty(i)&&(o[i]=t[i]);o.target=o.rootEl=e,o.preventDefault=void 0,o.stopPropagation=void 0,e[oC]._onDragOver(o)}}},QC=function(t){lC&&lC.parentNode[oC]._isOutsideThisEl(t.target)},dE.prototype={constructor:dE,_isOutsideThisEl:function(t){this.el.contains(t)||t===this.el||(zC=null)},_getDirection:function(t,e){return"function"==typeof this.options.direction?this.options.direction.call(this,t,e,lC):this.options.direction},_onTapStart:function(t){if(t.cancelable){var e=this,o=this.el,i=this.options,n=i.preventOnFilter,r=t.type,a=t.touches&&t.touches[0]||t.pointerType&&"touch"===t.pointerType&&t,s=(a||t).target,l=t.target.shadowRoot&&(t.path&&t.path[0]||t.composedPath&&t.composedPath()[0])||s,c=i.filter;if(function(t){HC.length=0;for(var e=t.getElementsByTagName("input"),o=e.length;o--;){var i=e[o];i.checked&&HC.push(i)}}(o),!lC&&!(/mousedown|pointerdown/.test(r)&&0!==t.button||i.disabled)&&!l.isContentEditable&&(this.nativeDraggable||!Xk||!s||"SELECT"!==s.tagName.toUpperCase())&&!((s=U$(s,i.draggable,o,!1))&&s.animated||pC===s)){if(gC=J$(s),vC=J$(s,i.draggable),"function"==typeof c){if(c.call(this,t,s,this))return hE({sortable:e,rootEl:l,name:"filter",targetEl:s,toEl:o,fromEl:o}),sC("filter",e,{evt:t}),void(n&&t.preventDefault())}else if(c&&(c=c.split(",").some(function(i){if(i=U$(l,i.trim(),o,!1))return hE({sortable:e,rootEl:i,name:"filter",targetEl:s,fromEl:o,toEl:o}),sC("filter",e,{evt:t}),!0})))return void(n&&t.preventDefault());i.handle&&!U$(l,i.handle,o,!1)||this._prepareDragStart(t,a,s)}}},_prepareDragStart:function(t,e,o){var i,n=this,r=n.el,a=n.options,s=r.ownerDocument;if(o&&!lC&&o.parentNode===r){var l=q$(o);if(hC=r,cC=(lC=o).parentNode,dC=lC.nextSibling,pC=o,yC=a.group,dE.dragged=lC,EC={target:lC,clientX:(e||t).clientX,clientY:(e||t).clientY},TC=EC.clientX-l.left,MC=EC.clientY-l.top,this._lastX=(e||t).clientX,this._lastY=(e||t).clientY,lC.style["will-change"]="all",i=function(){sC("delayEnded",n,{evt:t}),dE.eventCanceled?n._onDrop():(n._disableDelayedDragEvents(),!Wk&&n.nativeDraggable&&(lC.draggable=!0),n._triggerDragStart(t,e),hE({sortable:n,name:"choose",originalEvent:t}),V$(lC,a.chosenClass,!0))},a.ignore.split(",").forEach(function(t){K$(lC,t.trim(),mE)}),D$(s,"dragover",JC),D$(s,"mousemove",JC),D$(s,"touchmove",JC),a.supportPointer?(D$(s,"pointerup",n._onDrop),!this.nativeDraggable&&D$(s,"pointercancel",n._onDrop)):(D$(s,"mouseup",n._onDrop),D$(s,"touchend",n._onDrop),D$(s,"touchcancel",n._onDrop)),Wk&&this.nativeDraggable&&(this.options.touchStartThreshold=4,lC.draggable=!0),sC("delayStart",this,{evt:t}),!a.delay||a.delayOnTouchOnly&&!e||this.nativeDraggable&&(qk||Yk))i();else{if(dE.eventCanceled)return void this._onDrop();a.supportPointer?(D$(s,"pointerup",n._disableDelayedDrag),D$(s,"pointercancel",n._disableDelayedDrag)):(D$(s,"mouseup",n._disableDelayedDrag),D$(s,"touchend",n._disableDelayedDrag),D$(s,"touchcancel",n._disableDelayedDrag)),D$(s,"mousemove",n._delayedDragTouchMoveHandler),D$(s,"touchmove",n._delayedDragTouchMoveHandler),a.supportPointer&&D$(s,"pointermove",n._delayedDragTouchMoveHandler),n._dragStartTimer=setTimeout(i,a.delay)}}},_delayedDragTouchMoveHandler:function(t){var e=t.touches?t.touches[0]:t;Math.max(Math.abs(e.clientX-this._lastX),Math.abs(e.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){lC&&mE(lC),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var t=this.el.ownerDocument;j$(t,"mouseup",this._disableDelayedDrag),j$(t,"touchend",this._disableDelayedDrag),j$(t,"touchcancel",this._disableDelayedDrag),j$(t,"pointerup",this._disableDelayedDrag),j$(t,"pointercancel",this._disableDelayedDrag),j$(t,"mousemove",this._delayedDragTouchMoveHandler),j$(t,"touchmove",this._delayedDragTouchMoveHandler),j$(t,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(t,e){e=e||"touch"==t.pointerType&&t,!this.nativeDraggable||e?this.options.supportPointer?D$(document,"pointermove",this._onTouchMove):D$(document,e?"touchmove":"mousemove",this._onTouchMove):(D$(lC,"dragend",this),D$(hC,"dragstart",this._onDragStart));try{document.selection?vE(function(){document.selection.empty()}):window.getSelection().removeAllRanges()}catch(o){}},_dragStarted:function(t,e){if(kC=!1,hC&&lC){sC("dragStarted",this,{evt:e}),this.nativeDraggable&&D$(document,"dragover",QC);var o=this.options;!t&&V$(lC,o.dragClass,!1),V$(lC,o.ghostClass,!0),dE.active=this,t&&this._appendGhost(),hE({sortable:this,name:"start",originalEvent:e})}else this._nulling()},_emulateDragOver:function(){if(xC){this._lastX=xC.clientX,this._lastY=xC.clientY,XC();for(var t=document.elementFromPoint(xC.clientX,xC.clientY),e=t;t&&t.shadowRoot&&(t=t.shadowRoot.elementFromPoint(xC.clientX,xC.clientY))!==e;)e=t;if(lC.parentNode[oC]._isOutsideThisEl(t),e)do{if(e[oC]){if(e[oC]._onDragOver({clientX:xC.clientX,clientY:xC.clientY,target:t,rootEl:e})&&!this.options.dragoverBubble)break}t=e}while(e=R$(e));ZC()}},_onTouchMove:function(t){if(EC){var e=this.options,o=e.fallbackTolerance,i=e.fallbackOffset,n=t.touches?t.touches[0]:t,r=uC&&G$(uC,!0),a=uC&&r&&r.a,s=uC&&r&&r.d,l=UC&&LC&&Q$(LC),c=(n.clientX-EC.clientX+i.x)/(a||1)+(l?l[0]-DC[0]:0)/(a||1),u=(n.clientY-EC.clientY+i.y)/(s||1)+(l?l[1]-DC[1]:0)/(s||1);if(!dE.active&&!kC){if(o&&Math.max(Math.abs(n.clientX-this._lastX),Math.abs(n.clientY-this._lastY))n.right+10||t.clientY>i.bottom&&t.clientX>i.left:t.clientY>n.bottom+10||t.clientX>i.right&&t.clientY>i.top}(t,n,this)&&!f.animated){if(f===lC)return I(!1);if(f&&r===t.target&&(a=f),a&&(o=q$(a)),!1!==pE(hC,r,lC,e,a,o,t,!!a))return M(),f&&f.nextSibling?r.insertBefore(lC,f.nextSibling):r.appendChild(lC),cC=r,z(),I(!0)}else if(f&&function(t,e,o){var i=q$(X$(o.el,0,o.options,!0)),n=lE(o.el,o.options,uC);return e?t.clientX=0&&(hE({rootEl:cC,name:"add",toEl:cC,fromEl:hC,originalEvent:t}),hE({sortable:this,name:"remove",toEl:cC,originalEvent:t}),hE({rootEl:cC,name:"sort",toEl:cC,fromEl:hC,originalEvent:t}),hE({sortable:this,name:"sort",toEl:cC,originalEvent:t})),wC&&wC.save()):_C!==gC&&_C>=0&&(hE({sortable:this,name:"update",toEl:cC,originalEvent:t}),hE({sortable:this,name:"sort",toEl:cC,originalEvent:t})),dE.active&&(null!=_C&&-1!==_C||(_C=gC,bC=vC),hE({sortable:this,name:"end",toEl:cC,originalEvent:t}),this.save())))),this._nulling()},_nulling:function(){sC("nulling",this),hC=lC=cC=uC=dC=mC=pC=fC=EC=xC=IC=_C=bC=gC=vC=zC=PC=wC=yC=dE.dragged=dE.ghost=dE.clone=dE.active=null;var t=this.el;HC.forEach(function(e){t.contains(e)&&(e.checked=!0)}),HC.length=AC=SC=0},handleEvent:function(t){switch(t.type){case"drop":case"dragend":this._onDrop(t);break;case"dragenter":case"dragover":lC&&(this._onDragOver(t),function(t){t.dataTransfer&&(t.dataTransfer.dropEffect="move"),t.cancelable&&t.preventDefault()}(t));break;case"selectstart":t.preventDefault()}},toArray:function(){for(var t,e=[],o=this.el.children,i=0,n=o.length,r=this.options;i{Vt(),Be(),E$(),S$(),pn(),Bc(),qf(),rk(),lv(),lk(),vn(),ME=new Set(["spacer"]),IE=class extends Rf{constructor(...t){super(...t),this._attached=!1,this._renderEmptySortable=!1,this._selectorKey=0}connectedCallback(){super.connectedCallback(),this._attached=!0}disconnectedCallback(){super.disconnectedCallback(),this._attached=!1}render(){if(!this.chips||!this.hass)return et;const t=nc(this.hass);return J`

${this.label||`${t("editor.chip.chip-picker.chips")} (${this.hass.localize("ui.panel.lovelace.editor.card.config.required")})`}

- ${Hk([this.chips,this._renderEmptySortable],()=>this._renderEmptySortable?"":this.chips.map((e,o)=>J` + ${Rk([this.chips,this._renderEmptySortable],()=>this._renderEmptySortable?"":this.chips.map((e,o)=>J`
@@ -1566,7 +1566,7 @@ var t,e,o,i,n,r,a,s,l,c,u,h,d,p,m,f,g,_,v,b,y,w,k,C,$,E,x,A,S,T,M,I,z,P,N,O,B,L,
`} - ${TE.has(e.type)?et:J` + ${ME.has(e.type)?et:J` `))}
- ${Gk(this._selectorKey,J`({value:e,label:t(`editor.chip.chip-picker.types.${e}`)})),mode:"dropdown"}}} + .selector=${{select:{options:B_.map(e=>({value:e,label:t(`editor.chip.chip-picker.types.${e}`)})),mode:"dropdown"}}} @value-changed=${this._addChips} >`)} - `}updated(t){super.updated(t);const e=t.has("_attached"),o=t.has("chips");if(o||e){var i;if(e&&!this._attached)return null===(i=this._sortable)||void 0===i||i.destroy(),void(this._sortable=void 0);this._sortable||!this.chips?o&&this._handleChipsChanged():this._createSortable()}}async _handleChipsChanged(){var t=this;t._renderEmptySortable=!0,await t.updateComplete;const e=t.shadowRoot.querySelector(".chips");for(;e.lastElementChild;)e.removeChild(e.lastElementChild);t._renderEmptySortable=!1}async _createSortable(){var t=this;if(!SE){const t=await Promise.resolve().then(()=>(VE(),S$));(SE=t.Sortable).mount(t.OnSpill),SE.mount(t.AutoScroll())}t._sortable=new SE(t.shadowRoot.querySelector(".chips"),{animation:150,fallbackClass:"sortable-fallback",handle:".handle",onEnd:async e=>t._chipMoved(e)})}async _addChips(t){var e,o=this;const i=null!==(e=t.detail.value)&&void 0!==e?e:"";if(""===i)return;let n;"conditional"===i&&await tk();const r=Zw(i);n=r&&r.getStubConfig?await r.getStubConfig(o.hass):{type:i};const a=o.chips.concat(n);o._selectorKey++,ve(o,"chips-changed",{chips:a})}_chipMoved(t){if(t.oldIndex===t.newIndex)return;const e=this.chips.concat();e.splice(t.newIndex,0,e.splice(t.oldIndex,1)[0]),ve(this,"chips-changed",{chips:e})}_removeChip(t){const e=t.currentTarget.index,o=this.chips.concat();o.splice(e,1),ve(this,"chips-changed",{chips:o})}_editChip(t){const e=t.currentTarget.index;ve(this,"edit-detail-element",{subElementConfig:{index:e,type:"chip",elementConfig:this.chips[e]}})}_renderChipLabel(t){return ic(this.hass)(`editor.chip.chip-picker.types.${t.type}`)}_renderChipSecondary(t){const e=ic(this.hass);var o,i;if("entity"in t&&t.entity)return`${null!==(o=null!==(i=this.getEntityName(t.entity))&&void 0!==i?i:t.entity)&&void 0!==o?o:""}`;if("chip"in t&&t.chip){const o=e(`editor.chip.chip-picker.types.${t.chip.type}`);return this._renderChipSecondary(t.chip)?`${this._renderChipSecondary(t.chip)} (via ${o})`:o}return""}getEntityName(t){if(!this.hass)return;const e=this.hass.states[t];return e?e.attributes.friendly_name:void 0}static get styles(){return[super.styles,nn,l` + `}updated(t){super.updated(t);const e=t.has("_attached"),o=t.has("chips");if(o||e){var i;if(e&&!this._attached)return null===(i=this._sortable)||void 0===i||i.destroy(),void(this._sortable=void 0);this._sortable||!this.chips?o&&this._handleChipsChanged():this._createSortable()}}async _handleChipsChanged(){var t=this;t._renderEmptySortable=!0,await t.updateComplete;const e=t.shadowRoot.querySelector(".chips");for(;e.lastElementChild;)e.removeChild(e.lastElementChild);t._renderEmptySortable=!1}async _createSortable(){var t=this;if(!TE){const t=await Promise.resolve().then(()=>(FE(),T$));(TE=t.Sortable).mount(t.OnSpill),TE.mount(t.AutoScroll())}t._sortable=new TE(t.shadowRoot.querySelector(".chips"),{animation:150,fallbackClass:"sortable-fallback",handle:".handle",onEnd:async e=>t._chipMoved(e)})}async _addChips(t){var e,o=this;const i=null!==(e=t.detail.value)&&void 0!==e?e:"";if(""===i)return;let n;"conditional"===i&&await ek();const r=Jw(i);n=r&&r.getStubConfig?await r.getStubConfig(o.hass):{type:i};const a=o.chips.concat(n);o._selectorKey++,ve(o,"chips-changed",{chips:a})}_chipMoved(t){if(t.oldIndex===t.newIndex)return;const e=this.chips.concat();e.splice(t.newIndex,0,e.splice(t.oldIndex,1)[0]),ve(this,"chips-changed",{chips:e})}_removeChip(t){const e=t.currentTarget.index,o=this.chips.concat();o.splice(e,1),ve(this,"chips-changed",{chips:o})}_editChip(t){const e=t.currentTarget.index;ve(this,"edit-detail-element",{subElementConfig:{index:e,type:"chip",elementConfig:this.chips[e]}})}_renderChipLabel(t){return nc(this.hass)(`editor.chip.chip-picker.types.${t.type}`)}_renderChipSecondary(t){const e=nc(this.hass);var o,i;if("entity"in t&&t.entity)return`${null!==(o=null!==(i=this.getEntityName(t.entity))&&void 0!==i?i:t.entity)&&void 0!==o?o:""}`;if("chip"in t&&t.chip){const o=e(`editor.chip.chip-picker.types.${t.chip.type}`);return this._renderChipSecondary(t.chip)?`${this._renderChipSecondary(t.chip)} (via ${o})`:o}return""}getEntityName(t){if(!this.hass)return;const e=this.hass.states[t];return e?e.attributes.friendly_name:void 0}static get styles(){return[super.styles,nn,l` .chip { display: flex; align-items: center; @@ -1641,7 +1641,7 @@ var t,e,o,i,n,r,a,s,l,c,u,h,d,p,m,f,g,_,v,b,y,w,k,C,$,E,x,A,S,T,M,I,z,P,N,O,B,L, font-size: 12px; color: var(--secondary-text-color); } - `]}},gn([Gt({attribute:!1})],ME.prototype,"chips",void 0),gn([Gt()],ME.prototype,"label",void 0),gn([ie()],ME.prototype,"_attached",void 0),gn([ie()],ME.prototype,"_renderEmptySortable",void 0),gn([ie()],ME.prototype,"_selectorKey",void 0),ME=gn([Lt("mushroom-chips-card-chips-editor")],ME)}),GE=/* @__PURE__ */$t({ChipsCardEditor:()=>UE}),KE=kt(()=>{Vt(),Be(),To(),pn(),Oc(),Vg(),Fg(),jg(),Yf(),Ug(),k$(),FE(),w$(),vn(),oe(),IE=Co({type:wo("action"),icon:$o(Eo()),icon_color:$o(Eo()),tap_action:$o(on),hold_action:$o(on),double_tap_action:$o(on)}),zE=Co({type:wo("back"),icon:$o(Eo()),icon_color:$o(Eo())}),PE=Co({type:wo("entity"),entity:$o(Eo()),name:$o(Ig),content_info:$o(Eo()),icon:$o(Eo()),icon_color:$o(Eo()),use_entity_picture:$o(bo()),tap_action:$o(on),hold_action:$o(on),double_tap_action:$o(on)}),NE=Co({type:wo("menu"),icon:$o(Eo()),icon_color:$o(Eo())}),OE=Co({type:wo("quickbar"),icon:$o(Eo()),mode:$o(yo(["command","device","entity"]))}),BE=Co({type:wo("weather"),entity:$o(Eo()),tap_action:$o(on),hold_action:$o(on),double_tap_action:$o(on),show_temperature:$o(bo()),show_conditions:$o(bo())}),LE=Co({type:wo("conditional"),chip:$o(_o()),conditions:$o(vo(_o()))}),DE=Co({type:wo("light"),entity:$o(Eo()),name:$o(Ig),content_info:$o(Eo()),icon:$o(Eo()),use_light_color:$o(bo()),tap_action:$o(on),hold_action:$o(on),double_tap_action:$o(on)}),jE=Co({type:wo("template"),entity:$o(Eo()),tap_action:$o(on),hold_action:$o(on),double_tap_action:$o(on),content:$o(Eo()),icon:$o(Eo()),icon_color:$o(Eo()),picture:$o(Eo()),entity_id:$o(Ao([Eo(),vo(Eo())]))}),HE=Co({type:wo("spacer")}),RE=mo(Pg,Co({chips:vo(go(t=>{if(t&&"object"==typeof t&&"type"in t)switch(t.type){case"action":return IE;case"back":return zE;case"entity":return PE;case"menu":return NE;case"quickbar":return OE;case"weather":return BE;case"conditional":return LE;case"light":return DE;case"template":return jE;case"spacer":return HE}return Co()})),alignment:$o(Eo())})),UE=class extends Hf{connectedCallback(){super.connectedCallback(),Sg()}setConfig(t){ho(t,RE),this._config=t}get _title(){return this._config.title||""}get _theme(){return this._config.theme||""}render(){var t;if(!this.hass||!this._config)return et;if(this._subElementEditorConfig)return J` + `]}},gn([Gt({attribute:!1})],IE.prototype,"chips",void 0),gn([Gt()],IE.prototype,"label",void 0),gn([ie()],IE.prototype,"_attached",void 0),gn([ie()],IE.prototype,"_renderEmptySortable",void 0),gn([ie()],IE.prototype,"_selectorKey",void 0),IE=gn([Lt("mushroom-chips-card-chips-editor")],IE)}),KE=/* @__PURE__ */$t({ChipsCardEditor:()=>VE}),YE=kt(()=>{Vt(),Be(),To(),pn(),Bc(),Fg(),Gg(),Hg(),qf(),Vg(),C$(),GE(),k$(),vn(),oe(),zE=Co({type:wo("action"),icon:$o(Eo()),icon_color:$o(Eo()),tap_action:$o(on),hold_action:$o(on),double_tap_action:$o(on)}),PE=Co({type:wo("back"),icon:$o(Eo()),icon_color:$o(Eo())}),NE=Co({type:wo("entity"),entity:$o(Eo()),name:$o(zg),content_info:$o(Eo()),icon:$o(Eo()),icon_color:$o(Eo()),use_entity_picture:$o(bo()),tap_action:$o(on),hold_action:$o(on),double_tap_action:$o(on)}),OE=Co({type:wo("menu"),icon:$o(Eo()),icon_color:$o(Eo())}),BE=Co({type:wo("quickbar"),icon:$o(Eo()),mode:$o(yo(["command","device","entity"]))}),LE=Co({type:wo("weather"),entity:$o(Eo()),tap_action:$o(on),hold_action:$o(on),double_tap_action:$o(on),show_temperature:$o(bo()),show_conditions:$o(bo())}),DE=Co({type:wo("conditional"),chip:$o(_o()),conditions:$o(vo(_o()))}),jE=Co({type:wo("light"),entity:$o(Eo()),name:$o(zg),content_info:$o(Eo()),icon:$o(Eo()),use_light_color:$o(bo()),tap_action:$o(on),hold_action:$o(on),double_tap_action:$o(on)}),HE=Co({type:wo("template"),entity:$o(Eo()),tap_action:$o(on),hold_action:$o(on),double_tap_action:$o(on),content:$o(Eo()),icon:$o(Eo()),icon_color:$o(Eo()),picture:$o(Eo()),entity_id:$o(Ao([Eo(),vo(Eo())]))}),RE=Co({type:wo("spacer")}),UE=mo(Ng,Co({chips:vo(go(t=>{if(t&&"object"==typeof t&&"type"in t)switch(t.type){case"action":return zE;case"back":return PE;case"entity":return NE;case"menu":return OE;case"quickbar":return BE;case"weather":return LE;case"conditional":return DE;case"light":return jE;case"template":return HE;case"spacer":return RE}return Co()})),alignment:$o(Eo())})),VE=class extends Rf{connectedCallback(){super.connectedCallback(),Tg()}setConfig(t){ho(t,UE),this._config=t}get _title(){return this._config.title||""}get _theme(){return this._config.theme||""}render(){var t;if(!this.hass||!this._config)return et;if(this._subElementEditorConfig)return J` - `;const e=ic(this.hass);return J` + `;const e=nc(this.hass);return J`
@@ -1665,13 +1665,13 @@ var t,e,o,i,n,r,a,s,l,c,u,h,d,p,m,f,g,_,v,b,y,w,k,C,$,E,x,A,S,T,M,I,z,P,N,O,B,L, @chips-changed=${this._valueChanged} @edit-detail-element=${this._editDetailElement} > - `}_alignmentChanged(t){if(t.stopPropagation(),!this._config)return;const e=t.detail.value,o=ee({},this._config);e?o.alignment=e:delete o.alignment,ve(this,"config-changed",{config:o})}_valueChanged(t){var e,o,i;if(!this._config||!this.hass)return;const n=t.target,r=n.configValue||(null===(e=this._subElementEditorConfig)||void 0===e?void 0:e.type),a=null!==(o=null!==(i=n.checked)&&void 0!==i?i:t.detail.value)&&void 0!==o?o:n.value;if("chip"===r||t.detail&&t.detail.chips){const e=t.detail.chips||this._config.chips.concat();"chip"===r&&(a?e[this._subElementEditorConfig.index]=a:(e.splice(this._subElementEditorConfig.index,1),this._goBack()),this._subElementEditorConfig.elementConfig=a),this._config=ee(ee({},this._config),{},{chips:e})}else r&&(a?this._config=ee(ee({},this._config),{},{[r]:a}):(this._config=ee({},this._config),delete this._config[r]));ve(this,"config-changed",{config:this._config})}_handleSubElementChanged(t){var e;if(t.stopPropagation(),!this._config||!this.hass)return;const o=null===(e=this._subElementEditorConfig)||void 0===e?void 0:e.type,i=t.detail.config;if("chip"===o){const t=this._config.chips.concat();i?t[this._subElementEditorConfig.index]=i:(t.splice(this._subElementEditorConfig.index,1),this._goBack()),this._config=ee(ee({},this._config),{},{chips:t})}else o&&(""===i?(this._config=ee({},this._config),delete this._config[o]):this._config=ee(ee({},this._config),{},{[o]:i}));this._subElementEditorConfig=ee(ee({},this._subElementEditorConfig),{},{elementConfig:i}),ve(this,"config-changed",{config:this._config})}_editDetailElement(t){this._subElementEditorConfig=t.detail.subElementConfig}_goBack(){this._subElementEditorConfig=void 0}},gn([ie()],UE.prototype,"_config",void 0),gn([ie()],UE.prototype,"_subElementEditorConfig",void 0),UE=gn([Lt(Bk)],UE)});Vt(),Be(),pn(),Yf(),cg(),e_(),sk(),w$(),vn(),tg({type:Ok,name:"Mushroom Chips Card",description:"Card with chips to display informations"});var YE,qE,WE,XE=class extends Ot{static async getConfigElement(){return await Promise.resolve().then(()=>(KE(),GE)),document.createElement(Bk)}static async getStubConfig(t){const e=await Promise.all([h_.getStubConfig(t)]);return{type:`custom:${Ok}`,chips:e}}set hass(t){var e;const o=Vf(this._hass),i=Vf(t);o!==i&&this.toggleAttribute("dark-mode",i),this._hass=t,null===(e=this.shadowRoot)||void 0===e||e.querySelectorAll("div > *").forEach(e=>{e.hass=t})}getCardSize(){return 1}setConfig(t){this._config=t}render(){if(!this._config||!this._hass)return et;let t="";this._config.alignment&&(t=`align-${this._config.alignment}`);const e=zo(this._hass);return J` + `}_alignmentChanged(t){if(t.stopPropagation(),!this._config)return;const e=t.detail.value,o=ee({},this._config);e?o.alignment=e:delete o.alignment,ve(this,"config-changed",{config:o})}_valueChanged(t){var e,o,i;if(!this._config||!this.hass)return;const n=t.target,r=n.configValue||(null===(e=this._subElementEditorConfig)||void 0===e?void 0:e.type),a=null!==(o=null!==(i=n.checked)&&void 0!==i?i:t.detail.value)&&void 0!==o?o:n.value;if("chip"===r||t.detail&&t.detail.chips){const e=t.detail.chips||this._config.chips.concat();"chip"===r&&(a?e[this._subElementEditorConfig.index]=a:(e.splice(this._subElementEditorConfig.index,1),this._goBack()),this._subElementEditorConfig.elementConfig=a),this._config=ee(ee({},this._config),{},{chips:e})}else r&&(a?this._config=ee(ee({},this._config),{},{[r]:a}):(this._config=ee({},this._config),delete this._config[r]));ve(this,"config-changed",{config:this._config})}_handleSubElementChanged(t){var e;if(t.stopPropagation(),!this._config||!this.hass)return;const o=null===(e=this._subElementEditorConfig)||void 0===e?void 0:e.type,i=t.detail.config;if("chip"===o){const t=this._config.chips.concat();i?t[this._subElementEditorConfig.index]=i:(t.splice(this._subElementEditorConfig.index,1),this._goBack()),this._config=ee(ee({},this._config),{},{chips:t})}else o&&(""===i?(this._config=ee({},this._config),delete this._config[o]):this._config=ee(ee({},this._config),{},{[o]:i}));this._subElementEditorConfig=ee(ee({},this._subElementEditorConfig),{},{elementConfig:i}),ve(this,"config-changed",{config:this._config})}_editDetailElement(t){this._subElementEditorConfig=t.detail.subElementConfig}_goBack(){this._subElementEditorConfig=void 0}},gn([ie()],VE.prototype,"_config",void 0),gn([ie()],VE.prototype,"_subElementEditorConfig",void 0),VE=gn([Lt(Lk)],VE)});Vt(),Be(),pn(),qf(),ug(),o_(),lk(),k$(),vn(),eg({type:Bk,name:"Mushroom Chips Card",description:"Card with chips to display informations"});var qE,WE,XE,ZE=class extends Ot{static async getConfigElement(){return await Promise.resolve().then(()=>(YE(),KE)),document.createElement(Lk)}static async getStubConfig(t){const e=await Promise.all([d_.getStubConfig(t)]);return{type:`custom:${Bk}`,chips:e}}set hass(t){var e;const o=Ff(this._hass),i=Ff(t);o!==i&&this.toggleAttribute("dark-mode",i),this._hass=t,null===(e=this.shadowRoot)||void 0===e||e.querySelectorAll("div > *").forEach(e=>{e.hass=t})}getCardSize(){return 1}setConfig(t){this._config=t}render(){if(!this._config||!this._hass)return et;let t="";this._config.alignment&&(t=`align-${this._config.alignment}`);const e=zo(this._hass);return J`
${this._config.chips.map(t=>this.renderChip(t))}
- `}renderChip(t){"conditional"===t.type&&tk();const e=Wg(t);return e?(this._hass&&(e.hass=this._hass),e.editMode=this.editMode||this.preview,e.preview=this.preview||this.editMode,J`${e}`):et}static get styles(){return[Hf.styles,l` + `}renderChip(t){"conditional"===t.type&&ek();const e=Xg(t);return e?(this._hass&&(e.hass=this._hass),e.editMode=this.editMode||this.preview,e.preview=this.preview||this.editMode,J`${e}`):et}static get styles(){return[Rf.styles,l` ha-card { background: none; box-shadow: none; @@ -1695,20 +1695,20 @@ var t,e,o,i,n,r,a,s,l,c,u,h,d,p,m,f,g,_,v,b,y,w,k,C,$,E,x,A,S,T,M,I,z,P,N,O,B,L, .chip-container.align-justify { justify-content: space-between; } - `]}};gn([Gt()],XE.prototype,"preview",void 0),gn([Gt()],XE.prototype,"editMode",void 0),gn([ie()],XE.prototype,"_config",void 0),XE=gn([Lt(Ok)],XE);var ZE=kt(()=>{ug(),qE=`${YE=`${eg}-climate-card`}-editor`,WE=["climate"]});ZE();var JE={auto:"var(--rgb-state-climate-auto)",cool:"var(--rgb-state-climate-cool)",dry:"var(--rgb-state-climate-dry)",fan_only:"var(--rgb-state-climate-fan-only)",heat:"var(--rgb-state-climate-heat)",heat_cool:"var(--rgb-state-climate-heat-cool)",off:"var(--rgb-state-climate-off)"},QE={cooling:"var(--rgb-state-climate-cool)",drying:"var(--rgb-state-climate-dry)",heating:"var(--rgb-state-climate-heat)",idle:"var(--rgb-state-climate-idle)",off:"var(--rgb-state-climate-off)"},tx={auto:"mdi:thermostat-auto",cool:"mdi:snowflake",dry:"mdi:water-percent",fan_only:"mdi:fan",heat:"mdi:fire",heat_cool:"mdi:sun-snowflake-variant",off:"mdi:power"},ex={cooling:"mdi:snowflake",drying:"mdi:water-percent",heating:"mdi:fire",idle:"mdi:clock-outline",off:"mdi:power"};function ox(t){var e;return null!==(e=JE[t])&&void 0!==e?e:JE.off}Vt(),Be(),Re(),pn(),vn();var ix=class extends Ot{constructor(...t){super(...t),this.fill=!1}callService(t){t.stopPropagation();const e=t.target.mode;this.hass.callService("climate","set_hvac_mode",{entity_id:this.entity.entity_id,hvac_mode:e})}render(){const t=zo(this.hass),e=this.entity.attributes.hvac_modes.filter(t=>{var e;return(null!==(e=this.modes)&&void 0!==e?e:[]).includes(t)}).sort(Bo);return J` + `]}};gn([Gt()],ZE.prototype,"preview",void 0),gn([Gt()],ZE.prototype,"editMode",void 0),gn([ie()],ZE.prototype,"_config",void 0),ZE=gn([Lt(Bk)],ZE);var JE=kt(()=>{hg(),WE=`${qE=`${og}-climate-card`}-editor`,XE=["climate"]});JE();var QE={auto:"var(--rgb-state-climate-auto)",cool:"var(--rgb-state-climate-cool)",dry:"var(--rgb-state-climate-dry)",fan_only:"var(--rgb-state-climate-fan-only)",heat:"var(--rgb-state-climate-heat)",heat_cool:"var(--rgb-state-climate-heat-cool)",off:"var(--rgb-state-climate-off)"},tx={cooling:"var(--rgb-state-climate-cool)",drying:"var(--rgb-state-climate-dry)",heating:"var(--rgb-state-climate-heat)",idle:"var(--rgb-state-climate-idle)",off:"var(--rgb-state-climate-off)"},ex={auto:"mdi:thermostat-auto",cool:"mdi:snowflake",dry:"mdi:water-percent",fan_only:"mdi:fan",heat:"mdi:fire",heat_cool:"mdi:sun-snowflake-variant",off:"mdi:power"},ox={cooling:"mdi:snowflake",drying:"mdi:water-percent",heating:"mdi:fire",idle:"mdi:clock-outline",off:"mdi:power"};function ix(t){var e;return null!==(e=QE[t])&&void 0!==e?e:QE.off}Vt(),Be(),Re(),pn(),vn();var nx=class extends Ot{constructor(...t){super(...t),this.fill=!1}callService(t){t.stopPropagation();const e=t.target.mode;this.hass.callService("climate","set_hvac_mode",{entity_id:this.entity.entity_id,hvac_mode:e})}render(){const t=zo(this.hass),e=this.entity.attributes.hvac_modes.filter(t=>{var e;return(null!==(e=this.modes)&&void 0!==e?e:[]).includes(t)}).sort(Bo);return J` ${e.map(t=>this.renderModeButton(t))} - `}renderModeButton(t){const e={},o="off"===t?"var(--rgb-grey)":ox(t);return t===this.entity.state&&(e["--icon-color"]=`rgb(${o})`,e["--bg-color"]=`rgba(${o}, 0.2)`),J` + `}renderModeButton(t){const e={},o="off"===t?"var(--rgb-grey)":ix(t);return t===this.entity.state&&(e["--icon-color"]=`rgb(${o})`,e["--bg-color"]=`rgba(${o}, 0.2)`),J` - + - `;var i,n}};gn([Gt({attribute:!1})],ix.prototype,"hass",void 0),gn([Gt({attribute:!1})],ix.prototype,"entity",void 0),gn([Gt({attribute:!1})],ix.prototype,"modes",void 0),gn([Gt()],ix.prototype,"fill",void 0),ix=gn([Lt("mushroom-climate-hvac-modes-control")],ix),Vt(),Be(),je(),pn(),vn();var nx=class extends Ot{constructor(...t){super(...t),this.disabled=!1,this.formatOptions={},this.pending=!1,this.dispatchValue=t=>{this.pending=!1,this.dispatchEvent(new CustomEvent("change",{detail:{value:t}}))},this.debounceDispatchValue=this.dispatchValue}get _precision(){return Math.ceil(Math.log10(1/this._step))}get _step(){var t;return null!==(t=this.step)&&void 0!==t?t:1}_incrementValue(t){if(t.stopPropagation(),null==this.value)return;const e=xe(this.value+this._step,this._precision);this._processNewValue(e)}_decrementValue(t){if(t.stopPropagation(),null==this.value)return;const e=xe(this.value-this._step,this._precision);this._processNewValue(e)}firstUpdated(t){super.firstUpdated(t);const e=(t=>{const e=window.getComputedStyle(t).getPropertyValue("--input-number-debounce"),o=parseFloat(e);return isNaN(o)?2e3:o})(this.container);e&&(this.debounceDispatchValue=Po(this.dispatchValue,e))}_processNewValue(t){const e=$e(t,this.min,this.max);this.value!==e&&(this.value=e,this.pending=!0),this.debounceDispatchValue(e)}render(){const t=null!=this.value?Se(this.value,this.locale,this.formatOptions):"-";return J` + `;var i,n}};gn([Gt({attribute:!1})],nx.prototype,"hass",void 0),gn([Gt({attribute:!1})],nx.prototype,"entity",void 0),gn([Gt({attribute:!1})],nx.prototype,"modes",void 0),gn([Gt()],nx.prototype,"fill",void 0),nx=gn([Lt("mushroom-climate-hvac-modes-control")],nx),Vt(),Be(),je(),pn(),vn();var rx=class extends Ot{constructor(...t){super(...t),this.disabled=!1,this.formatOptions={},this.pending=!1,this.dispatchValue=t=>{this.pending=!1,this.dispatchEvent(new CustomEvent("change",{detail:{value:t}}))},this.debounceDispatchValue=this.dispatchValue}get _precision(){return Math.ceil(Math.log10(1/this._step))}get _step(){var t;return null!==(t=this.step)&&void 0!==t?t:1}_incrementValue(t){if(t.stopPropagation(),null==this.value)return;const e=xe(this.value+this._step,this._precision);this._processNewValue(e)}_decrementValue(t){if(t.stopPropagation(),null==this.value)return;const e=xe(this.value-this._step,this._precision);this._processNewValue(e)}firstUpdated(t){super.firstUpdated(t);const e=(t=>{const e=window.getComputedStyle(t).getPropertyValue("--input-number-debounce"),o=parseFloat(e);return isNaN(o)?2e3:o})(this.container);e&&(this.debounceDispatchValue=Po(this.dispatchValue,e))}_processNewValue(t){const e=$e(t,this.min,this.max);this.value!==e&&(this.value=e,this.pending=!0),this.debounceDispatchValue(e)}render(){const t=null!=this.value?Se(this.value,this.locale,this.formatOptions):"-";return J`
- `}renderIcon(t,e){var o;const i=Yo(t),n={},r=null===(o=this._config)||void 0===o?void 0:o.icon_color;if(r){const t=Lf(r);n["--icon-color"]=`rgb(${t})`,n["--shape-color"]=`rgba(${t}, 0.2)`}return J` + `}renderIcon(t,e){var o;const i=Yo(t),n={},r=null===(o=this._config)||void 0===o?void 0:o.icon_color;if(r){const t=Df(r);n["--icon-color"]=`rgb(${t})`,n["--shape-color"]=`rgba(${t}, 0.2)`}return J` - `}static get styles(){return[super.styles,Jf,l` + `}static get styles(){return[super.styles,Qf,l` mushroom-state-item { cursor: pointer; } @@ -2861,7 +2861,7 @@ var t,e,o,i,n,r,a,s,l,c,u,h,d,p,m,f,g,_,v,b,y,w,k,C,$,E,x,A,S,T,M,I,z,P,N,O,B,L, mushroom-number-value-control { flex: 1; } - `]}};gn([ie()],RS.prototype,"value",void 0),RS=gn([Lt($S)],RS);var US,VS=kt(()=>{ug(),jS=`${DS=`${eg}-person-card`}-editor`,HS=["person","device_tracker"]});function FS(t,e){const o=t.state;return"unknown"===o?"var(--rgb-state-person-unknown)":"not_home"===o?"var(--rgb-state-person-not-home)":"home"===o?"var(--rgb-state-person-home)":e.some(t=>o===t.attributes.friendly_name)?"var(--rgb-state-person-zone)":"var(--rgb-state-person-home)"}VS(),pn();var GS,KS,YS,qS=kt(()=>{To(),_g(),jg(),Vg(),Fg(),US=mo(Pg,mo(zg,gg,sg))}),WS=/* @__PURE__ */$t({SwitchCardEditor:()=>YS}),XS=kt(()=>{Vt(),Be(),Oi(),To(),pn(),Oc(),_g(),jg(),Yf(),Hg(),Rg(),Ug(),qS(),vn(),GS=["more-info","navigate","url","perform-action","assist","none"],KS=vi((t,e)=>[{name:"entity",selector:{entity:{domain:HS}}},Ag(e),{name:"icon",selector:{icon:{}},context:{icon_entity:"entity"}},...$g(t),...lg(GS)]),YS=class extends Hf{constructor(...t){super(...t),this._computeLabel=t=>{const e=ic(this.hass);return Eg.includes(t.name)?e(`editor.card.generic.${t.name}`):this.hass.localize(`ui.panel.lovelace.editor.card.generic.${t.name}`)}}connectedCallback(){super.connectedCallback(),Sg()}setConfig(t){ho(t,US),this._config=t}render(){if(!this.hass||!this._config)return et;const t=KS(ic(this.hass),this.hass.config.version);return J` + `]}};gn([ie()],US.prototype,"value",void 0),US=gn([Lt(ES)],US);var VS,FS=kt(()=>{hg(),HS=`${jS=`${og}-person-card`}-editor`,RS=["person","device_tracker"]});function GS(t,e){const o=t.state;return"unknown"===o?"var(--rgb-state-person-unknown)":"not_home"===o?"var(--rgb-state-person-not-home)":"home"===o?"var(--rgb-state-person-home)":e.some(t=>o===t.attributes.friendly_name)?"var(--rgb-state-person-zone)":"var(--rgb-state-person-home)"}FS(),pn();var KS,YS,qS,WS=kt(()=>{To(),vg(),Hg(),Fg(),Gg(),VS=mo(Ng,mo(Pg,_g,lg))}),XS=/* @__PURE__ */$t({SwitchCardEditor:()=>qS}),ZS=kt(()=>{Vt(),Be(),Oi(),To(),pn(),Bc(),vg(),Hg(),qf(),Rg(),Ug(),Vg(),WS(),vn(),KS=["more-info","navigate","url","perform-action","assist","none"],YS=vi((t,e)=>[{name:"entity",selector:{entity:{domain:RS}}},Sg(e),{name:"icon",selector:{icon:{}},context:{icon_entity:"entity"}},...Eg(t),...cg(KS)]),qS=class extends Rf{constructor(...t){super(...t),this._computeLabel=t=>{const e=nc(this.hass);return xg.includes(t.name)?e(`editor.card.generic.${t.name}`):this.hass.localize(`ui.panel.lovelace.editor.card.generic.${t.name}`)}}connectedCallback(){super.connectedCallback(),Tg()}setConfig(t){ho(t,VS),this._config=t}render(){if(!this.hass||!this._config)return et;const t=YS(nc(this.hass),this.hass.config.version);return J` - `}_valueChanged(t){ve(this,"config-changed",{config:t.detail.value})}},gn([ie()],YS.prototype,"_config",void 0),YS=gn([Lt(jS)],YS)});Vt(),Be(),je(),Re(),pn(),bn(),Pn(),Bc(),On(),Bn(),Ln(),cg(),Xf(),VS(),vn(),tg({type:DS,name:"Mushroom Person Card",description:"Card for person entity"});var ZS,JS,QS,tT=class extends Zf{static async getConfigElement(){return await Promise.resolve().then(()=>(XS(),WS)),document.createElement(jS)}static async getStubConfig(t){const e=Object.keys(t.states).filter(t=>HS.includes(t.split(".")[0]));return{type:`custom:${DS}`,entity:e[0]}}_handleAction(t){Ni(this,this.hass,this._config,t.detail.action)}render(){if(!this._config||!this.hass||!this._config.entity)return et;const t=this._stateObj;if(!t)return this.renderNotFound(this._config);const e=Qf(this.hass,t,this._config.name),o=this._config.icon,i=Dn(this._config),n=Wf(t,i.icon_type),r=zo(this.hass);return J` + `}_valueChanged(t){ve(this,"config-changed",{config:t.detail.value})}},gn([ie()],qS.prototype,"_config",void 0),qS=gn([Lt(HS)],qS)});Vt(),Be(),je(),Re(),pn(),bn(),Pn(),Lc(),On(),Bn(),Ln(),ug(),Zf(),FS(),vn(),eg({type:jS,name:"Mushroom Person Card",description:"Card for person entity"});var JS,QS,tT,eT=class extends Jf{static async getConfigElement(){return await Promise.resolve().then(()=>(ZS(),XS)),document.createElement(HS)}static async getStubConfig(t){const e=Object.keys(t.states).filter(t=>RS.includes(t.split(".")[0]));return{type:`custom:${jS}`,entity:e[0]}}_handleAction(t){Ni(this,this.hass,this._config,t.detail.action)}render(){if(!this._config||!this.hass||!this._config.entity)return et;const t=this._stateObj;if(!t)return this.renderNotFound(this._config);const e=tg(this.hass,t,this._config.name),o=this._config.icon,i=Dn(this._config),n=Xf(t,i.icon_type),r=zo(this.hass);return J` @@ -2890,13 +2890,13 @@ var t,e,o,i,n,r,a,s,l,c,u,h,d,p,m,f,g,_,v,b,y,w,k,C,$,E,x,A,S,T,M,I,z,P,N,O,B,L, o===t.attributes.friendly_name);return i&&i.attributes.icon?i.attributes.icon:"mdi:home"}(t,e)} - style=${fe({"--main-color":`rgb(${FS(t,e)})`})} + style=${fe({"--main-color":`rgb(${GS(t,e)})`})} > - `}renderBadge(t){return qo(t)?this.renderStateBadge(t):super.renderBadge(t)}static get styles(){return[super.styles,Jf,l` + `}renderBadge(t){return qo(t)?this.renderStateBadge(t):super.renderBadge(t)}static get styles(){return[super.styles,Qf,l` mushroom-state-item { cursor: pointer; } - `]}};tT=gn([Lt(DS)],tT);var eT=kt(()=>{ug(),JS=`${ZS=`${eg}-select-card`}-editor`,QS=["input_select","select"]});function oT(t){return null!=t.state?t.state:void 0}eT(),Vt(),Be(),pn(),vn();var iT,nT=class extends Ot{_selectChanged(t){let e;e=rn(this.hass.connection.haVersion,2026,3)?t.detail.item.value:t.target.value;const o=oT(this.entity);e&&e!==o&&this._setValue(e)}_setValue(t){const e=this.entity.entity_id.split(".")[0];this.hass.callService(e,"select_option",{entity_id:this.entity.entity_id,option:t})}render(){const t=oT(this.entity),e=this.entity.attributes.options;return rn(this.hass.connection.haVersion,2026,3)?J` + `]}};eT=gn([Lt(jS)],eT);var oT=kt(()=>{hg(),QS=`${JS=`${og}-select-card`}-editor`,tT=["input_select","select"]});function iT(t){return null!=t.state?t.state:void 0}oT(),Vt(),Be(),pn(),vn();var nT,rT=class extends Ot{_selectChanged(t){let e;e=rn(this.hass.connection.haVersion,2026,3)?t.detail.item.value:t.target.value;const o=iT(this.entity);e&&e!==o&&this._setValue(e)}_setValue(t){const e=this.entity.entity_id.split(".")[0];this.hass.callService(e,"select_option",{entity_id:this.entity.entity_id,option:t})}render(){const t=iT(this.entity),e=this.entity.attributes.options;return rn(this.hass.connection.haVersion,2026,3)?J` {To(),_g(),jg(),Vg(),Fg(),iT=mo(Pg,mo(zg,gg,sg),Co({icon_color:$o(Eo())}))}),cT=/* @__PURE__ */$t({SelectCardEditor:()=>sT}),uT=kt(()=>{Vt(),Be(),Oi(),To(),pn(),Oc(),_g(),jg(),Yf(),Hg(),Rg(),Ug(),lT(),vn(),rT=["more-info","navigate","url","perform-action","assist","none"],aT=vi((t,e)=>[{name:"entity",selector:{entity:{domain:QS}}},Ag(e),{type:"grid",name:"",schema:[{name:"icon",selector:{icon:{}},context:{icon_entity:"entity"}},{name:"icon_color",selector:{ui_color:{}}}]},...$g(t),...lg(rT)]),sT=class extends Hf{constructor(...t){super(...t),this._computeLabel=t=>{const e=ic(this.hass);return Eg.includes(t.name)?e(`editor.card.generic.${t.name}`):this.hass.localize(`ui.panel.lovelace.editor.card.generic.${t.name}`)}}connectedCallback(){super.connectedCallback(),Sg()}setConfig(t){ho(t,iT),this._config=t}render(){if(!this.hass||!this._config)return et;const t=aT(ic(this.hass),this.hass.config.version);return J` + `}};gn([Gt()],rT.prototype,"hass",void 0),gn([Gt({attribute:!1})],rT.prototype,"entity",void 0),rT=gn([Lt("mushroom-select-option-control")],rT);var aT,sT,lT,cT=kt(()=>{To(),vg(),Hg(),Fg(),Gg(),nT=mo(Ng,mo(Pg,_g,lg),Co({icon_color:$o(Eo())}))}),uT=/* @__PURE__ */$t({SelectCardEditor:()=>lT}),hT=kt(()=>{Vt(),Be(),Oi(),To(),pn(),Bc(),vg(),Hg(),qf(),Rg(),Ug(),Vg(),cT(),vn(),aT=["more-info","navigate","url","perform-action","assist","none"],sT=vi((t,e)=>[{name:"entity",selector:{entity:{domain:tT}}},Sg(e),{type:"grid",name:"",schema:[{name:"icon",selector:{icon:{}},context:{icon_entity:"entity"}},{name:"icon_color",selector:{ui_color:{}}}]},...Eg(t),...cg(aT)]),lT=class extends Rf{constructor(...t){super(...t),this._computeLabel=t=>{const e=nc(this.hass);return xg.includes(t.name)?e(`editor.card.generic.${t.name}`):this.hass.localize(`ui.panel.lovelace.editor.card.generic.${t.name}`)}}connectedCallback(){super.connectedCallback(),Tg()}setConfig(t){ho(t,nT),this._config=t}render(){if(!this.hass||!this._config)return et;const t=sT(nc(this.hass),this.hass.config.version);return J` - `}_valueChanged(t){ve(this,"config-changed",{config:t.detail.value})}},gn([ie()],sT.prototype,"_config",void 0),sT=gn([Lt(JS)],sT)});Vt(),Be(),je(),Re(),pn(),bn(),Pn(),Bc(),On(),Bn(),Ln(),Rf(),cg(),Xf(),eT(),vn(),tg({type:ZS,name:"Mushroom Select Card",description:"Card for select and input_select entities"});var hT,dT=class extends Zf{static async getConfigElement(){return await Promise.resolve().then(()=>(uT(),cT)),document.createElement(JS)}static async getStubConfig(t){const e=Object.keys(t.states).filter(t=>QS.includes(t.split(".")[0]));return{type:`custom:${ZS}`,entity:e[0]}}get hasControls(){return!0}_handleAction(t){Ni(this,this.hass,this._config,t.detail.action)}render(){var t;if(!this._config||!this.hass||!this._config.entity)return et;const e=this._stateObj;if(!e)return this.renderNotFound(this._config);const o=Qf(this.hass,e,this._config.name),i=this._config.icon,n=Dn(this._config),r=Wf(e,n.icon_type),a=zo(this.hass),s=null===(t=this._config)||void 0===t?void 0:t.icon_color,l={};if(s){const t=Lf(s);l["--card-primary-color"]=`rgb(${t})`,l["--mdc-theme-primary"]=`rgb(${t})`}return J` + `}_valueChanged(t){ve(this,"config-changed",{config:t.detail.value})}},gn([ie()],lT.prototype,"_config",void 0),lT=gn([Lt(QS)],lT)});Vt(),Be(),je(),Re(),pn(),bn(),Pn(),Lc(),On(),Bn(),Ln(),Uf(),ug(),Zf(),oT(),vn(),eg({type:JS,name:"Mushroom Select Card",description:"Card for select and input_select entities"});var dT,pT=class extends Jf{static async getConfigElement(){return await Promise.resolve().then(()=>(hT(),uT)),document.createElement(QS)}static async getStubConfig(t){const e=Object.keys(t.states).filter(t=>tT.includes(t.split(".")[0]));return{type:`custom:${JS}`,entity:e[0]}}get hasControls(){return!0}_handleAction(t){Ni(this,this.hass,this._config,t.detail.action)}render(){var t;if(!this._config||!this.hass||!this._config.entity)return et;const e=this._stateObj;if(!e)return this.renderNotFound(this._config);const o=tg(this.hass,e,this._config.name),i=this._config.icon,n=Dn(this._config),r=Xf(e,n.icon_type),a=zo(this.hass),s=null===(t=this._config)||void 0===t?void 0:t.icon_color,l={};if(s){const t=Df(s);l["--card-primary-color"]=`rgb(${t})`,l["--mdc-theme-primary"]=`rgb(${t})`}return J` @@ -2965,7 +2965,7 @@ var t,e,o,i,n,r,a,s,l,c,u,h,d,p,m,f,g,_,v,b,y,w,k,C,$,E,x,A,S,T,M,I,z,P,N,O,B,L,
- `}renderIcon(t,e){var o;const i=Yo(t),n={},r=null===(o=this._config)||void 0===o?void 0:o.icon_color;if(r){const t=Lf(r);n["--icon-color"]=`rgb(${t})`,n["--shape-color"]=`rgba(${t}, 0.2)`}return J` + `}renderIcon(t,e){var o;const i=Yo(t),n={},r=null===(o=this._config)||void 0===o?void 0:o.icon_color;if(r){const t=Df(r);n["--icon-color"]=`rgb(${t})`,n["--shape-color"]=`rgba(${t}, 0.2)`}return J` - `}static get styles(){return[super.styles,Jf,l` + `}static get styles(){return[super.styles,Qf,l` .actions { overflow: visible; display: block; @@ -2994,7 +2994,7 @@ var t,e,o,i,n,r,a,s,l,c,u,h,d,p,m,f,g,_,v,b,y,w,k,C,$,E,x,A,S,T,M,I,z,P,N,O,B,L, --card-primary-color: rgb(var(--rgb-state-entity)); --mdc-theme-primary: rgb(var(--rgb-state-entity)); } - `]}};dT=gn([Lt(ZS)],dT);var pT,mT,fT=kt(()=>{Ht(),hT=t=>null!=t?t:et}),gT=kt(()=>{fT()});function _T(t){return pT.has(t)||mT.has(t)?`var(--${t}-color)`:function(t){return/^\s*\d{1,3}\s*,\s*\d{1,3}\s*,\s*\d{1,3}\s*$/.test(t)}(t)?`rgb(${t.split(",").map(t=>t.trim()).join(", ")})`:t}var vT,bT,yT,wT,kT,CT,$T,ET,xT,AT,ST,TT,MT,IT,zT,PT,NT,OT,BT,LT,DT,jT,HT=kt(()=>{pT=new Set(["primary","accent","red","pink","purple","deep-purple","indigo","blue","light-blue","cyan","teal","green","light-green","lime","yellow","amber","orange","deep-orange","brown","light-grey","grey","dark-grey","blue-grey","black","white"]),mT=new Set(["primary-text","secondary-text","disabled-text","disabled"])}),RT=kt(()=>{vT=/{%|{{/,bT=t=>vT.test(t)}),UT=kt(()=>{To(),pn(),Fg(),oe(),yT=mo(Pg,Co({entity:$o(Eo()),area:$o(Eo()),primary:$o(Eo()),secondary:$o(Eo()),color:$o(Eo()),icon:$o(Eo()),picture:$o(Eo()),badge_icon:$o(Eo()),badge_text:$o(Eo()),badge_color:$o(Eo()),vertical:$o(bo()),multiline_secondary:$o(bo()),tap_action:$o(on),hold_action:$o(on),double_tap_action:$o(on),icon_tap_action:$o(on),icon_hold_action:$o(on),icon_double_tap_action:$o(on),features:$o(vo(_o())),features_position:$o(yo(["bottom","inline"])),entity_id:$o(Ao([Eo(),vo(Eo())])),icon_color:$o(Eo()),layout:$o(Eo()),fill_container:$o(bo())})),wT=t=>{const e=ee({},t);return e.icon_color&&(delete e.icon_color,null==e.color&&(e.color=t.icon_color)),e.layout&&(delete e.layout,null==e.vertical&&(e.vertical="vertical"===t.layout)),delete e.fill_container,e},kT=t=>Boolean(t.icon_color||t.layout||t.fill_container)}),VT=/* @__PURE__ */$t({MushroomTemplateCardEditor:()=>xT,TEMPLATE_CARD_HELPERS:()=>ET,TEMPLATE_CARD_LABELS:()=>CT,TILE_LABELS:()=>$T}),FT=kt(()=>{Vt(),Be(),Oi(),To(),pn(),Oc(),Hg(),Ug(),GT(),UT(),vn(),oe(),CT=["area","badge_color","badge_icon","badge_text","primary","secondary","multiline_secondary"],$T=["content_layout","vertical","features_position","icon_tap_action","icon_hold_action","icon_double_tap_action"],ET=["area","entity","badge_text","multiline_secondary"],xT=class extends Ot{constructor(...t){super(...t),this._featureContext=vi(t=>({entity_id:t.entity,area_id:t.area})),this._schema=vi((t,e)=>[{name:"context",flatten:!0,type:"expandable",icon:"mdi:shape",schema:[{name:"entity",selector:{entity:{}}},{name:"area",selector:{area:{}}}]},{name:"content",flatten:!0,type:"expandable",icon:"mdi:text-short",schema:[{name:"primary",selector:{template:{}}},{name:"secondary",selector:{template:{}}},{name:"color",selector:{template:{}}},{name:"icon",selector:{template:{}}},{name:"picture",selector:{template:{}}}]},{name:"badge",type:"expandable",flatten:!0,icon:"mdi:square-rounded-badge-outline",schema:[{name:"badge_icon",selector:{template:{}}},{name:"badge_text",selector:{template:{}}},{name:"badge_color",selector:{template:{}}}]},{name:"layout",type:"expandable",flatten:!0,icon:"mdi:image-text",schema:[{name:"content_layout",required:!0,selector:{select:{mode:"box",options:["horizontal","vertical"].map(e=>({label:t(`ui.panel.lovelace.editor.card.tile.content_layout_options.${e}`),value:e,image:{src:`/static/images/form/tile_content_layout_${e}.svg`,src_dark:`/static/images/form/tile_content_layout_${e}_dark.svg`,flip_rtl:!0}}))}}},{name:"multiline_secondary",selector:{boolean:{}}}]},{name:"interactions",type:"expandable",flatten:!0,icon:"mdi:gesture-tap",schema:[{name:"tap_action",selector:{ui_action:{default_action:e?"more-info":"none"}}},{name:"icon_tap_action",selector:{ui_action:{default_action:e?TT(e):"none"}}},{name:"",type:"optional_actions",flatten:!0,schema:["hold_action","icon_hold_action","double_tap_action","icon_double_tap_action"].map(t=>({name:t,selector:{ui_action:{default_action:"none"}}}))}]}]),this._featuresSchema=vi((t,e)=>[{name:"features_position",required:!0,selector:{select:{mode:"box",options:["bottom","inline"].map(o=>({label:t(`ui.panel.lovelace.editor.card.tile.features_position_options.${o}`),description:t(`ui.panel.lovelace.editor.card.tile.features_position_options.${o}_description`),value:o,image:{src:`/static/images/form/tile_features_position_${o}.svg`,src_dark:`/static/images/form/tile_features_position_${o}_dark.svg`,flip_rtl:!0},disabled:e&&"inline"===o}))}}}]),this._computeLabel=t=>{const e=ic(this.hass);return"expandable"===t.type?e(`editor.section.${t.name}`):Eg.includes(t.name)?e(`editor.card.generic.${t.name}`):CT.includes(t.name)?e(`editor.card.template.${t.name}`):$T.includes(t.name)?this.hass.localize(`ui.panel.lovelace.editor.card.tile.${t.name}`):this.hass.localize(`ui.panel.lovelace.editor.card.generic.${t.name}`)},this._computeHelper=t=>{if("expandable"===t.type)return;const e=ic(this.hass);return xg.includes(t.name)?e(`editor.card.generic.${t.name}_helper`):ET.includes(t.name)?e(`editor.card.template.${t.name}_helper`):void 0},this._done=()=>{this._legacyConfig=void 0},this._revertToLegacy=()=>{this._legacyConfig&&ve(this,"config-changed",{config:this._legacyConfig})}}connectedCallback(){super.connectedCallback(),Sg()}setConfig(t){ho(t,yT),kT(t)?(this._legacyConfig=ee({},t),this._legacyConfig.type="custom:mushroom-legacy-template-card"):delete this._legacyConfig,this._config=wT(t)}render(){var t;if(!this.hass||!this._config)return et;const e=this._schema(this.hass.localize,this._config.entity),o=ic(this.hass),i=ee(ee({},this._config),{},{content_layout:this._config.vertical?"vertical":"horizontal"});i.features_position&&!i.vertical||(i.features_position="bottom");const n=this._featuresSchema(this.hass.localize,"vertical"===i.content_layout),r=this._featureContext(this._config);return J` + `]}};pT=gn([Lt(JS)],pT);var mT,fT,gT=kt(()=>{Ht(),dT=t=>null!=t?t:et}),_T=kt(()=>{gT()});function vT(t){return mT.has(t)||fT.has(t)?`var(--${t}-color)`:function(t){return/^\s*\d{1,3}\s*,\s*\d{1,3}\s*,\s*\d{1,3}\s*$/.test(t)}(t)?`rgb(${t.split(",").map(t=>t.trim()).join(", ")})`:t}var bT,yT,wT,kT,CT,$T,ET,xT,AT,ST,TT,MT,IT,zT,PT,NT,OT,BT,LT,DT,jT,HT,RT=kt(()=>{mT=new Set(["primary","accent","red","pink","purple","deep-purple","indigo","blue","light-blue","cyan","teal","green","light-green","lime","yellow","amber","orange","deep-orange","brown","light-grey","grey","dark-grey","blue-grey","black","white"]),fT=new Set(["primary-text","secondary-text","disabled-text","disabled"])}),UT=kt(()=>{bT=/{%|{{/,yT=t=>bT.test(t)}),VT=kt(()=>{To(),pn(),Gg(),oe(),wT=mo(Ng,Co({entity:$o(Eo()),area:$o(Eo()),primary:$o(Eo()),secondary:$o(Eo()),color:$o(Eo()),icon:$o(Eo()),picture:$o(Eo()),badge_icon:$o(Eo()),badge_text:$o(Eo()),badge_color:$o(Eo()),vertical:$o(bo()),multiline_secondary:$o(bo()),tap_action:$o(on),hold_action:$o(on),double_tap_action:$o(on),icon_tap_action:$o(on),icon_hold_action:$o(on),icon_double_tap_action:$o(on),features:$o(vo(_o())),features_position:$o(yo(["bottom","inline"])),entity_id:$o(Ao([Eo(),vo(Eo())])),icon_color:$o(Eo()),layout:$o(Eo()),fill_container:$o(bo())})),kT=t=>{const e=ee({},t);return e.icon_color&&(delete e.icon_color,null==e.color&&(e.color=t.icon_color)),e.layout&&(delete e.layout,null==e.vertical&&(e.vertical="vertical"===t.layout)),delete e.fill_container,e},CT=t=>Boolean(t.icon_color||t.layout||t.fill_container)}),FT=/* @__PURE__ */$t({MushroomTemplateCardEditor:()=>AT,TEMPLATE_CARD_HELPERS:()=>xT,TEMPLATE_CARD_LABELS:()=>$T,TILE_LABELS:()=>ET}),GT=kt(()=>{Vt(),Be(),Oi(),To(),pn(),Bc(),Rg(),Vg(),KT(),VT(),vn(),oe(),$T=["area","badge_color","badge_icon","badge_text","primary","secondary","multiline_secondary"],ET=["content_layout","vertical","features_position","icon_tap_action","icon_hold_action","icon_double_tap_action"],xT=["area","entity","badge_text","multiline_secondary"],AT=class extends Ot{constructor(...t){super(...t),this._featureContext=vi(t=>({entity_id:t.entity,area_id:t.area})),this._schema=vi((t,e)=>[{name:"context",flatten:!0,type:"expandable",icon:"mdi:shape",schema:[{name:"entity",selector:{entity:{}}},{name:"area",selector:{area:{}}}]},{name:"content",flatten:!0,type:"expandable",icon:"mdi:text-short",schema:[{name:"primary",selector:{template:{}}},{name:"secondary",selector:{template:{}}},{name:"color",selector:{template:{}}},{name:"icon",selector:{template:{}}},{name:"picture",selector:{template:{}}}]},{name:"badge",type:"expandable",flatten:!0,icon:"mdi:square-rounded-badge-outline",schema:[{name:"badge_icon",selector:{template:{}}},{name:"badge_text",selector:{template:{}}},{name:"badge_color",selector:{template:{}}}]},{name:"layout",type:"expandable",flatten:!0,icon:"mdi:image-text",schema:[{name:"content_layout",required:!0,selector:{select:{mode:"box",options:["horizontal","vertical"].map(e=>({label:t(`ui.panel.lovelace.editor.card.tile.content_layout_options.${e}`),value:e,image:{src:`/static/images/form/tile_content_layout_${e}.svg`,src_dark:`/static/images/form/tile_content_layout_${e}_dark.svg`,flip_rtl:!0}}))}}},{name:"multiline_secondary",selector:{boolean:{}}}]},{name:"interactions",type:"expandable",flatten:!0,icon:"mdi:gesture-tap",schema:[{name:"tap_action",selector:{ui_action:{default_action:e?"more-info":"none"}}},{name:"icon_tap_action",selector:{ui_action:{default_action:e?MT(e):"none"}}},{name:"",type:"optional_actions",flatten:!0,schema:["hold_action","icon_hold_action","double_tap_action","icon_double_tap_action"].map(t=>({name:t,selector:{ui_action:{default_action:"none"}}}))}]}]),this._featuresSchema=vi((t,e)=>[{name:"features_position",required:!0,selector:{select:{mode:"box",options:["bottom","inline"].map(o=>({label:t(`ui.panel.lovelace.editor.card.tile.features_position_options.${o}`),description:t(`ui.panel.lovelace.editor.card.tile.features_position_options.${o}_description`),value:o,image:{src:`/static/images/form/tile_features_position_${o}.svg`,src_dark:`/static/images/form/tile_features_position_${o}_dark.svg`,flip_rtl:!0},disabled:e&&"inline"===o}))}}}]),this._computeLabel=t=>{const e=nc(this.hass);return"expandable"===t.type?e(`editor.section.${t.name}`):xg.includes(t.name)?e(`editor.card.generic.${t.name}`):$T.includes(t.name)?e(`editor.card.template.${t.name}`):ET.includes(t.name)?this.hass.localize(`ui.panel.lovelace.editor.card.tile.${t.name}`):this.hass.localize(`ui.panel.lovelace.editor.card.generic.${t.name}`)},this._computeHelper=t=>{if("expandable"===t.type)return;const e=nc(this.hass);return Ag.includes(t.name)?e(`editor.card.generic.${t.name}_helper`):xT.includes(t.name)?e(`editor.card.template.${t.name}_helper`):void 0},this._done=()=>{this._legacyConfig=void 0},this._revertToLegacy=()=>{this._legacyConfig&&ve(this,"config-changed",{config:this._legacyConfig})}}connectedCallback(){super.connectedCallback(),Tg()}setConfig(t){ho(t,wT),CT(t)?(this._legacyConfig=ee({},t),this._legacyConfig.type="custom:mushroom-legacy-template-card"):delete this._legacyConfig,this._config=kT(t)}render(){var t;if(!this.hass||!this._config)return et;const e=this._schema(this.hass.localize,this._config.entity),o=nc(this.hass),i=ee(ee({},this._config),{},{content_layout:this._config.vertical?"vertical":"horizontal"});i.features_position&&!i.vertical||(i.features_position="bottom");const n=this._featuresSchema(this.hass.localize,"vertical"===i.content_layout),r=this._featureContext(this._config);return J` ${this._legacyConfig?J` {Vt(),Be(),je(),gT(),Re(),Oi(),AT=/* @__PURE__ */Et(hv()),pn(),HT(),RT(),dv(),cg(),UT(),pv(),__(),vn(),oe(),TT=t=>{const e=be(t);return _e.has(e)||["button","input_button","scene"].includes(e)?"toggle":"none"},tg({type:"mushroom-template-card",name:"Mushroom Template",description:"Build your own Mushroom card using templates"}),MT=new R_(1e3),IT=["icon","color","primary","secondary","picture","badge_icon","badge_color","badge_text"],(ST=class extends Ot{constructor(...t){super(...t),this._unsubRenderTemplates=/* @__PURE__ */new Map,this._featureContext=vi(t=>({entity_id:t.entity,area_id:t.area})),this._featurePosition=vi(t=>t.vertical?"bottom":t.features_position||"bottom"),this._displayedFeatures=vi(t=>{const e=t.features||[];return"inline"===this._featurePosition(t)?e.slice(0,1):e})}static async getConfigElement(){return await Promise.resolve().then(()=>(FT(),VT)),document.createElement("mushroom-template-card-editor")}static getStubConfig(){return{type:"custom:mushroom-template-card",primary:"Hello, {{user}}",secondary:"How are you?",icon:"mdi:mushroom"}}connectedCallback(){super.connectedCallback(),this._tryConnect()}disconnectedCallback(){if(super.disconnectedCallback(),this._tryDisconnect(),this._config&&this._templateResults){const t=this._computeCacheKey();MT.set(t,this._templateResults)}}_computeCacheKey(){return(0,AT.default)(this._config)}willUpdate(t){if(super.willUpdate(t),this._config&&!this._templateResults){const t=this._computeCacheKey();MT.has(t)?this._templateResults=MT.get(t):this._templateResults={}}}updated(t){super.updated(t),this._config&&this.hass&&this._tryConnect()}_getTemplateKeyValue(t){var e;return this._config&&null!==(e=this._config[t])&&void 0!==e?e:""}async _tryConnect(){var t=this;IT.forEach(e=>{t._tryConnectKey(e)})}async _tryConnectKey(t){var e=this;if(void 0!==e._unsubRenderTemplates.get(t)||!e.hass||!e._config)return;const o=e._getTemplateKeyValue(t);if(bT(o))try{const i=Si(e.hass.connection,o=>{e._templateResults=ee(ee({},e._templateResults),{},{[t]:o})},{template:o,entity_ids:e._config.entity_id,variables:{config:e._config,user:e.hass.user.name,entity:e._config.entity,area:e._config.area},strict:!0});e._unsubRenderTemplates.set(t,i),await i}catch(n){var i;const o={result:null!==(i=e._config[t])&&void 0!==i?i:"",listeners:{all:!1,domains:[],entities:[],time:!1}};e._templateResults=ee(ee({},e._templateResults),{},{[t]:o}),e._unsubRenderTemplates.delete(t)}}async _tryDisconnect(){var t=this;IT.forEach(e=>{t._tryDisconnectKey(e)})}async _tryDisconnectKey(t){const e=this._unsubRenderTemplates.get(t);if(e){this._unsubRenderTemplates.delete(t);try{await(await e)()}catch(o){if("not_found"!==o.code&&"template_error"!==o.code)throw o}}}setConfig(t){this._config=wT(t),this._config.entity&&(this._config.tap_action||(this._config.tap_action={action:"more-info"}),this._config.icon_tap_action||(this._config.icon_tap_action={action:TT(this._config.entity)}))}getValue(t){var e;const o=this._getTemplateKeyValue(t);return bT(o)?null===(e=this._templateResults)||void 0===e||null===(e=e[t])||void 0===e||null===(e=e.result)||void 0===e?void 0:e.toString():o}getCardSize(){var t,e,o,i,n,r;const a=this._config&&this._featurePosition(this._config),s=(null===(t=this._config)||void 0===t||null===(t=t.features)||void 0===t?void 0:t.length)||0;return(Boolean((null===(e=this._config)||void 0===e?void 0:e.icon)||(null===(o=this._config)||void 0===o?void 0:o.picture)||(null===(i=this._config)||void 0===i?void 0:i.primary)||(null===(n=this._config)||void 0===n?void 0:n.secondary))||"inline"===a?1:0)+((null===(r=this._config)||void 0===r?void 0:r.vertical)?1:0)+("inline"===a?0:s)}getGridOptions(){var t,e,o,i,n,r,a;let s=6,l=0;l=Boolean((null===(t=this._config)||void 0===t?void 0:t.icon)||(null===(e=this._config)||void 0===e?void 0:e.picture)||(null===(o=this._config)||void 0===o?void 0:o.primary)||(null===(i=this._config)||void 0===i?void 0:i.secondary))?1:0;const c=this._config&&this._featurePosition(this._config),u=(null===(n=this._config)||void 0===n||null===(n=n.features)||void 0===n?void 0:n.length)||0;return u&&("inline"===c?(s=12,l=1):l+=u),(null===(r=this._config)||void 0===r?void 0:r.vertical)&&(this._config.primary||this._config.secondary&&!this._config.icon)&&l++,(null===(a=this._config)||void 0===a?void 0:a.multiline_secondary)?{columns:s}:{columns:s,rows:l}}_handleAction(t){Ni(this,this.hass,this._config,t.detail.action)}_handleIconAction(t){t.stopPropagation();const e={entity:this._config.entity,tap_action:this._config.icon_tap_action,hold_action:this._config.icon_hold_action,double_tap_action:this._config.icon_double_tap_action};Ni(this,this.hass,e,t.detail.action)}get _hasCardAction(){var t,e,o;return Yi(null===(t=this._config)||void 0===t?void 0:t.tap_action)||Yi(null===(e=this._config)||void 0===e?void 0:e.hold_action)||Yi(null===(o=this._config)||void 0===o?void 0:o.double_tap_action)}get _hasIconAction(){var t,e,o;return Yi(null===(t=this._config)||void 0===t?void 0:t.icon_tap_action)||Yi(null===(e=this._config)||void 0===e?void 0:e.icon_hold_action)||Yi(null===(o=this._config)||void 0===o?void 0:o.icon_double_tap_action)}render(){var t;if(!this._config||!this.hass)return et;const e=this.getValue("icon"),o=this.getValue("color"),i=o?_T(o):void 0,n=this.getValue("primary"),r=this.getValue("secondary"),a=this.getValue("picture"),s=this.getValue("badge_icon"),l=this.getValue("badge_color"),c=this.getValue("badge_text"),u=l?_T(l):void 0,h=V_(e),d={"--tile-color":i},p=this._featurePosition(this._config),m=this._displayedFeatures(this._config),f=this._config.multiline_secondary,g=this._featureContext(this._config),_=m.length>0&&!e&&!a&&!n&&!r,v=de({horizontal:"inline"===p,"feature-only":_}),{haVersion:b}=this.hass.connection,y=rn(b,2026,2),w=rn(b,2026,8)&&"grid"===this.layout&&"auto"!==(null===(t=this._config.grid_options)||void 0===t?void 0:t.rows),k=de({vertical:Boolean(this._config.vertical),"fixed-info-height":w}),C={disabled:!this._hasIconAction,hasHold:Yi(this._config.icon_hold_action),hasDoubleClick:Yi(this._config.icon_double_tap_action)};return J` + `]}},gn([Gt({attribute:!1})],AT.prototype,"hass",void 0),gn([ie()],AT.prototype,"_config",void 0),gn([ie()],AT.prototype,"_legacyConfig",void 0),AT=gn([Lt("mushroom-template-card-editor")],AT)}),KT=kt(()=>{Vt(),Be(),je(),_T(),Re(),Oi(),ST=/* @__PURE__ */Et(dv()),pn(),RT(),UT(),pv(),ug(),VT(),mv(),v_(),vn(),oe(),MT=t=>{const e=be(t);return _e.has(e)||["button","input_button","scene"].includes(e)?"toggle":"none"},eg({type:"mushroom-template-card",name:"Mushroom Template",description:"Build your own Mushroom card using templates"}),IT=new U_(1e3),zT=["icon","color","primary","secondary","picture","badge_icon","badge_color","badge_text"],(TT=class extends Ot{constructor(...t){super(...t),this._unsubRenderTemplates=/* @__PURE__ */new Map,this._featureContext=vi(t=>({entity_id:t.entity,area_id:t.area})),this._featurePosition=vi(t=>t.vertical?"bottom":t.features_position||"bottom"),this._featureLayout=vi((t,e)=>{const o=t.features||[];if("inline"!==this._featurePosition(t))return{inline:[],below:o,columns:1};const i=o.slice(0,1),n=e?o.slice(1):[];return{inline:i,below:n,columns:Math.min(n.length,2)}})}static async getConfigElement(){return await Promise.resolve().then(()=>(GT(),FT)),document.createElement("mushroom-template-card-editor")}static getStubConfig(){return{type:"custom:mushroom-template-card",primary:"Hello, {{user}}",secondary:"How are you?",icon:"mdi:mushroom"}}connectedCallback(){super.connectedCallback(),this._tryConnect()}disconnectedCallback(){if(super.disconnectedCallback(),this._tryDisconnect(),this._config&&this._templateResults){const t=this._computeCacheKey();IT.set(t,this._templateResults)}}_computeCacheKey(){return(0,ST.default)(this._config)}willUpdate(t){if(super.willUpdate(t),this._config&&!this._templateResults){const t=this._computeCacheKey();IT.has(t)?this._templateResults=IT.get(t):this._templateResults={}}}updated(t){super.updated(t),this._config&&this.hass&&this._tryConnect()}_getTemplateKeyValue(t){var e;return this._config&&null!==(e=this._config[t])&&void 0!==e?e:""}async _tryConnect(){var t=this;zT.forEach(e=>{t._tryConnectKey(e)})}async _tryConnectKey(t){var e=this;if(void 0!==e._unsubRenderTemplates.get(t)||!e.hass||!e._config)return;const o=e._getTemplateKeyValue(t);if(yT(o))try{const i=Si(e.hass.connection,o=>{e._templateResults=ee(ee({},e._templateResults),{},{[t]:o})},{template:o,entity_ids:e._config.entity_id,variables:{config:e._config,user:e.hass.user.name,entity:e._config.entity,area:e._config.area},strict:!0});e._unsubRenderTemplates.set(t,i),await i}catch(n){var i;const o={result:null!==(i=e._config[t])&&void 0!==i?i:"",listeners:{all:!1,domains:[],entities:[],time:!1}};e._templateResults=ee(ee({},e._templateResults),{},{[t]:o}),e._unsubRenderTemplates.delete(t)}}async _tryDisconnect(){var t=this;zT.forEach(e=>{t._tryDisconnectKey(e)})}async _tryDisconnectKey(t){const e=this._unsubRenderTemplates.get(t);if(e){this._unsubRenderTemplates.delete(t);try{await(await e)()}catch(o){if("not_found"!==o.code&&"template_error"!==o.code)throw o}}}setConfig(t){this._config=kT(t),this._config.entity&&(this._config.tap_action||(this._config.tap_action={action:"more-info"}),this._config.icon_tap_action||(this._config.icon_tap_action={action:MT(this._config.entity)}))}getValue(t){var e;const o=this._getTemplateKeyValue(t);return yT(o)?null===(e=this._templateResults)||void 0===e||null===(e=e[t])||void 0===e||null===(e=e.result)||void 0===e?void 0:e.toString():o}getCardSize(){var t,e,o,i,n;const r=this._config&&this._featurePosition(this._config),a=this._config?this._featureRows(this._config):0;return(Boolean((null===(t=this._config)||void 0===t?void 0:t.icon)||(null===(e=this._config)||void 0===e?void 0:e.picture)||(null===(o=this._config)||void 0===o?void 0:o.primary)||(null===(i=this._config)||void 0===i?void 0:i.secondary))||"inline"===r?1:0)+((null===(n=this._config)||void 0===n?void 0:n.vertical)?1:0)+a}getGridOptions(){var t,e,o,i,n,r,a;let s=6,l=0;l=Boolean((null===(t=this._config)||void 0===t?void 0:t.icon)||(null===(e=this._config)||void 0===e?void 0:e.picture)||(null===(o=this._config)||void 0===o?void 0:o.primary)||(null===(i=this._config)||void 0===i?void 0:i.secondary))?1:0;const c=this._config&&this._featurePosition(this._config),u=(null===(n=this._config)||void 0===n||null===(n=n.features)||void 0===n?void 0:n.length)||0;return this._config&&u&&("inline"===c?(s=12,l=1+this._featureRows(this._config)):l+=u),(null===(r=this._config)||void 0===r?void 0:r.vertical)&&(this._config.primary||this._config.secondary&&!this._config.icon)&&l++,(null===(a=this._config)||void 0===a?void 0:a.multiline_secondary)?{columns:s}:{columns:s,rows:l}}_handleAction(t){Ni(this,this.hass,this._config,t.detail.action)}_handleIconAction(t){t.stopPropagation();const e={entity:this._config.entity,tap_action:this._config.icon_tap_action,hold_action:this._config.icon_hold_action,double_tap_action:this._config.icon_double_tap_action};Ni(this,this.hass,e,t.detail.action)}get _hasCardAction(){var t,e,o;return Yi(null===(t=this._config)||void 0===t?void 0:t.tap_action)||Yi(null===(e=this._config)||void 0===e?void 0:e.hold_action)||Yi(null===(o=this._config)||void 0===o?void 0:o.double_tap_action)}get _hasIconAction(){var t,e,o;return Yi(null===(t=this._config)||void 0===t?void 0:t.icon_tap_action)||Yi(null===(e=this._config)||void 0===e?void 0:e.icon_hold_action)||Yi(null===(o=this._config)||void 0===o?void 0:o.icon_double_tap_action)}get _supportsInlineFeaturesBelow(){var t;const e=null===(t=this.hass)||void 0===t||null===(t=t.connection)||void 0===t?void 0:t.haVersion;return Boolean(e&&rn(e,2026,9))}_featureRows(t){const{below:e,columns:o}=this._featureLayout(t,this._supportsInlineFeaturesBelow);return Math.ceil(e.length/Math.max(o,1))}render(){var t;if(!this._config||!this.hass)return et;const e=this.getValue("icon"),o=this.getValue("color"),i=o?vT(o):void 0,n=this.getValue("primary"),r=this.getValue("secondary"),a=this.getValue("picture"),s=this.getValue("badge_icon"),l=this.getValue("badge_color"),c=this.getValue("badge_text"),u=l?vT(l):void 0,h=F_(e),d={"--tile-color":i},p=this._featurePosition(this._config),m=this._featureLayout(this._config,this._supportsInlineFeaturesBelow),f=this._config.multiline_secondary,g=this._featureContext(this._config),_=(m.inline.length>0||m.below.length>0)&&!e&&!a&&!n&&!r,{haVersion:v}=this.hass.connection,b=rn(v,2026,2),y=rn(v,2026,8)&&"grid"===this.layout&&"auto"!==(null===(t=this._config.grid_options)||void 0===t?void 0:t.rows),w=de({horizontal:"inline"===p,"has-features-below":"inline"===p&&m.below.length>0,"fixed-height":y,"feature-only":_}),k=de({vertical:Boolean(this._config.vertical),"fixed-info-height":y}),C={disabled:!this._hasIconAction,hasHold:Yi(this._config.icon_hold_action),hasDoubleClick:Yi(this._config.icon_double_tap_action)};return J`
-
- ${e||a||n||r?J`
- ${e||a?J` - - ${a?et:h?J`
${h}
`:J``} - ${s||c?J` - + ${e||a||n||r||m.inline.length>0?J`
+ ${e||a||n||r?J`
+ ${e||a?J` + + ${a?et:h?J`
${h}
`:J``} + ${s||c?J` + + ${c?J`${c}`:J` + `} + + `:et} +
+ `:et} + ${n||r?J` + + ${n} + ${r} - ${c?J`${c}`:J` - `} - - `:et} - + + `:et} +
`:et} + ${m.inline.length>0?J` + `:et} - ${n||r?J` - - ${n} - ${r} - - `:et} -
`:et} - ${m.length>0?J` +
`:et} + ${m.below.length>0?J` `:et}
- `}}).styles=[c_,l` + `}}).styles=[u_,l` :host { --tile-color: var(--state-inactive-color); -webkit-tap-highlight-color: transparent; @@ -3210,7 +3224,13 @@ var t,e,o,i,n,r,a,s,l,c,u,h,d,p,m,f,g,_,v,b,y,w,k,C,$,E,x,A,S,T,M,I,z,P,N,O,B,L, flex-direction: column; flex: 1; } - .container.horizontal { + .row { + display: flex; + flex-direction: column; + flex: 1; + min-width: 0; + } + .container.horizontal .row { flex-direction: row; } @@ -3299,13 +3319,26 @@ var t,e,o,i,n,r,a,s,l,c,u,h,d,p,m,f,g,_,v,b,y,w,k,C,$,E,x,A,S,T,M,I,z,P,N,O,B,L, var(--ha-space-3, 12px); min-width: 0; } - .container.horizontal hui-card-features { + .container.horizontal .features-inline { width: calc(50% - var(--column-gap, 0px) / 2 - var(--ha-space-3, 12px)); flex: none; - --feature-height: var(--ha-space-9, 36px); padding: 0 var(--ha-space-3, 12px); padding-inline-start: 0; } + .container.horizontal:not(.has-features-below) .features-inline, + .container.horizontal:not(.fixed-height) .features-inline { + --feature-height: var(--ha-space-9, 36px); + } + .container.has-features-below .features-below { + --ha-card-feature-column-gap: calc( + var(--column-gap, 0px) + var(--ha-space-3, 12px) * 2 + ); + --ha-card-feature-divider: 1px solid + var(--ha-color-border-neutral-quiet); + --ha-card-feature-divider-inset: calc( + var(--ha-space-3, 12px) + var(--column-gap, 0px) / 2 + ); + } .container.feature-only { justify-content: flex-end; } @@ -3314,20 +3347,25 @@ var t,e,o,i,n,r,a,s,l,c,u,h,d,p,m,f,g,_,v,b,y,w,k,C,$,E,x,A,S,T,M,I,z,P,N,O,B,L, width: 100%; padding: var(--ha-space-3, 12px); } - .container.feature-only.horizontal hui-card-features { + .container.feature-only.horizontal .row hui-card-features { padding: 0 var(--ha-space-3, 12px); } + .container.feature-only.horizontal .features-below { + flex: none; + padding: 0 var(--ha-space-3, 12px) var(--ha-space-3, 12px) + var(--ha-space-3, 12px); + } .container.horizontal .content:not(:has(ha-tile-info)) { flex: none; } - .container.horizontal:not(:has(ha-tile-info)) hui-card-features { + .container.horizontal:not(:has(ha-tile-info)) .row hui-card-features { width: auto; flex: 1; } .container.horizontal:not(:has(ha-tile-info)) .content { flex: none; } - `],zT=ST,gn([Gt({attribute:!1})],zT.prototype,"hass",void 0),gn([Gt({attribute:!1})],zT.prototype,"layout",void 0),gn([ie()],zT.prototype,"_config",void 0),gn([ie()],zT.prototype,"_templateResults",void 0),gn([ie()],zT.prototype,"_unsubRenderTemplates",void 0),zT=gn([Lt("mushroom-template-card")],zT)}),KT=kt(()=>{ug(),NT=`${PT=`${eg}-title-card`}-editor`}),YT=kt(()=>{To(),pn(),Fg(),OT=mo(Pg,Co({title:$o(Eo()),subtitle:$o(Eo()),alignment:$o(Eo()),title_tap_action:$o(on),subtitle_tap_action:$o(on)}))}),qT=/* @__PURE__ */$t({TitleCardEditor:()=>jT}),WT=kt(()=>{Vt(),Be(),Oi(),To(),pn(),Oc(),jg(),Yf(),Ug(),KT(),YT(),vn(),BT=["navigate","url","perform-action","none"],LT=["title","subtitle","alignment","title_tap_action","subtitle_tap_action"],DT=vi(t=>[{name:"title",selector:{template:{}}},{name:"subtitle",selector:{template:{}}},{name:"alignment",selector:{select:{options:kg(t),mode:"dropdown"}}},{name:"title_tap_action",selector:{ui_action:{actions:BT}}},{name:"subtitle_tap_action",selector:{ui_action:{actions:BT}}}]),jT=class extends Hf{constructor(...t){super(...t),this._computeLabel=t=>{const e=ic(this.hass);return LT.includes(t.name)?e(`editor.card.title.${t.name}`):this.hass.localize(`ui.panel.lovelace.editor.card.generic.${t.name}`)}}connectedCallback(){super.connectedCallback(),Sg()}setConfig(t){ho(t,OT),this._config=t}render(){if(!this.hass||!this._config)return et;const t=DT(ic(this.hass));return J` + `],PT=TT,gn([Gt({attribute:!1})],PT.prototype,"hass",void 0),gn([Gt({attribute:!1})],PT.prototype,"layout",void 0),gn([ie()],PT.prototype,"_config",void 0),gn([ie()],PT.prototype,"_templateResults",void 0),gn([ie()],PT.prototype,"_unsubRenderTemplates",void 0),PT=gn([Lt("mushroom-template-card")],PT)}),YT=kt(()=>{hg(),OT=`${NT=`${og}-title-card`}-editor`}),qT=kt(()=>{To(),pn(),Gg(),BT=mo(Ng,Co({title:$o(Eo()),subtitle:$o(Eo()),alignment:$o(Eo()),title_tap_action:$o(on),subtitle_tap_action:$o(on)}))}),WT=/* @__PURE__ */$t({TitleCardEditor:()=>HT}),XT=kt(()=>{Vt(),Be(),Oi(),To(),pn(),Bc(),Hg(),qf(),Vg(),YT(),qT(),vn(),LT=["navigate","url","perform-action","none"],DT=["title","subtitle","alignment","title_tap_action","subtitle_tap_action"],jT=vi(t=>[{name:"title",selector:{template:{}}},{name:"subtitle",selector:{template:{}}},{name:"alignment",selector:{select:{options:Cg(t),mode:"dropdown"}}},{name:"title_tap_action",selector:{ui_action:{actions:LT}}},{name:"subtitle_tap_action",selector:{ui_action:{actions:LT}}}]),HT=class extends Rf{constructor(...t){super(...t),this._computeLabel=t=>{const e=nc(this.hass);return DT.includes(t.name)?e(`editor.card.title.${t.name}`):this.hass.localize(`ui.panel.lovelace.editor.card.generic.${t.name}`)}}connectedCallback(){super.connectedCallback(),Tg()}setConfig(t){ho(t,BT),this._config=t}render(){if(!this.hass||!this._config)return et;const t=jT(nc(this.hass));return J` - `}_valueChanged(t){ve(this,"config-changed",{config:t.detail.value})}},gn([ie()],jT.prototype,"_config",void 0),jT=gn([Lt(NT)],jT)});Vt(),Be(),je(),gT(),pn(),On(),Bn(),Ln(),Yf(),dv(),cg(),KT(),vn(),oe();var XT=new R_(1e3);tg({type:PT,name:"Mushroom Title Card",description:"Title and subtitle to separate sections"});var ZT,JT,QT,tM,eM=["title","subtitle"],oM=class extends Hf{constructor(...t){super(...t),this._unsubRenderTemplates=/* @__PURE__ */new Map}static async getConfigElement(){return await Promise.resolve().then(()=>(WT(),qT)),document.createElement(NT)}static async getStubConfig(t){return{type:`custom:${PT}`,title:"Hello, {{ user }} !"}}getCardSize(){return 1}setConfig(t){eM.forEach(e=>{var o;(null===(o=this._config)||void 0===o?void 0:o[e])!==t[e]&&this._tryDisconnectKey(e)}),this._config=ee({title_tap_action:{action:"none"},subtitle_tap_action:{action:"none"}},t)}connectedCallback(){super.connectedCallback(),this._tryConnect()}disconnectedCallback(){if(super.disconnectedCallback(),this._tryDisconnect(),this._config&&this._templateResults){const t=this._computeCacheKey();XT.set(t,this._templateResults)}}_computeCacheKey(){return(0,yv.default)(this._config)}willUpdate(t){if(super.willUpdate(t),this._config&&!this._templateResults){const t=this._computeCacheKey();XT.has(t)?this._templateResults=XT.get(t):this._templateResults={}}}isTemplate(t){var e;const o=null===(e=this._config)||void 0===e?void 0:e[t];return null==o?void 0:o.includes("{")}getValue(t){var e,o;return this.isTemplate(t)?null===(e=this._templateResults)||void 0===e||null===(e=e[t])||void 0===e||null===(e=e.result)||void 0===e?void 0:e.toString():null===(o=this._config)||void 0===o?void 0:o[t]}_handleTitleAction(t){const e={tap_action:this._config.title_tap_action};Ni(this,this.hass,e,t.detail.action)}_handleSubtitleAction(t){const e={tap_action:this._config.subtitle_tap_action};Ni(this,this.hass,e,t.detail.action)}render(){if(!this._config||!this.hass)return et;const t=this.getValue("title"),e=this.getValue("subtitle");let o="";this._config.alignment&&(o=`align-${this._config.alignment}`);const i=Boolean(this._config.title_tap_action&&"none"!==this._config.title_tap_action.action),n=Boolean(this._config.subtitle_tap_action&&"none"!==this._config.subtitle_tap_action.action),r=zo(this.hass);return J` + `}_valueChanged(t){ve(this,"config-changed",{config:t.detail.value})}},gn([ie()],HT.prototype,"_config",void 0),HT=gn([Lt(OT)],HT)});Vt(),Be(),je(),_T(),pn(),On(),Bn(),Ln(),qf(),pv(),ug(),YT(),vn(),oe();var ZT=new U_(1e3);eg({type:NT,name:"Mushroom Title Card",description:"Title and subtitle to separate sections"});var JT,QT,tM,eM,oM=["title","subtitle"],iM=class extends Rf{constructor(...t){super(...t),this._unsubRenderTemplates=/* @__PURE__ */new Map}static async getConfigElement(){return await Promise.resolve().then(()=>(XT(),WT)),document.createElement(OT)}static async getStubConfig(t){return{type:`custom:${NT}`,title:"Hello, {{ user }} !"}}getCardSize(){return 1}setConfig(t){oM.forEach(e=>{var o;(null===(o=this._config)||void 0===o?void 0:o[e])!==t[e]&&this._tryDisconnectKey(e)}),this._config=ee({title_tap_action:{action:"none"},subtitle_tap_action:{action:"none"}},t)}connectedCallback(){super.connectedCallback(),this._tryConnect()}disconnectedCallback(){if(super.disconnectedCallback(),this._tryDisconnect(),this._config&&this._templateResults){const t=this._computeCacheKey();ZT.set(t,this._templateResults)}}_computeCacheKey(){return(0,wv.default)(this._config)}willUpdate(t){if(super.willUpdate(t),this._config&&!this._templateResults){const t=this._computeCacheKey();ZT.has(t)?this._templateResults=ZT.get(t):this._templateResults={}}}isTemplate(t){var e;const o=null===(e=this._config)||void 0===e?void 0:e[t];return null==o?void 0:o.includes("{")}getValue(t){var e,o;return this.isTemplate(t)?null===(e=this._templateResults)||void 0===e||null===(e=e[t])||void 0===e||null===(e=e.result)||void 0===e?void 0:e.toString():null===(o=this._config)||void 0===o?void 0:o[t]}_handleTitleAction(t){const e={tap_action:this._config.title_tap_action};Ni(this,this.hass,e,t.detail.action)}_handleSubtitleAction(t){const e={tap_action:this._config.subtitle_tap_action};Ni(this,this.hass,e,t.detail.action)}render(){if(!this._config||!this.hass)return et;const t=this.getValue("title"),e=this.getValue("subtitle");let o="";this._config.alignment&&(o=`align-${this._config.alignment}`);const i=Boolean(this._config.title_tap_action&&"none"!==this._config.title_tap_action.action),n=Boolean(this._config.subtitle_tap_action&&"none"!==this._config.subtitle_tap_action.action),r=zo(this.hass);return J` ${t?J`
`}renderArrow(){return J` `}updated(t){super.updated(t),this._config&&this.hass&&this._tryConnect()}async _tryConnect(){var t=this;eM.forEach(e=>{t._tryConnectKey(e)})}async _tryConnectKey(t){var e=this;if(void 0===e._unsubRenderTemplates.get(t)&&e.hass&&e._config&&e.isTemplate(t))try{var o;const i=Si(e.hass.connection,o=>{e._templateResults=ee(ee({},e._templateResults),{},{[t]:o})},{template:null!==(o=e._config[t])&&void 0!==o?o:"",entity_ids:e._config.entity_id,variables:{config:e._config,user:e.hass.user.name},strict:!0});e._unsubRenderTemplates.set(t,i),await i}catch(n){var i;const o={result:null!==(i=e._config[t])&&void 0!==i?i:"",listeners:{all:!1,domains:[],entities:[],time:!1}};e._templateResults=ee(ee({},e._templateResults),{},{[t]:o}),e._unsubRenderTemplates.delete(t)}}async _tryDisconnect(){var t=this;eM.forEach(e=>{t._tryDisconnectKey(e)})}async _tryDisconnectKey(t){const e=this._unsubRenderTemplates.get(t);if(e){this._unsubRenderTemplates.delete(t);try{await(await e)()}catch(o){if("not_found"!==o.code&&"template_error"!==o.code)throw o}}}static get styles(){return[super.styles,Jf,l` + >`}updated(t){super.updated(t),this._config&&this.hass&&this._tryConnect()}async _tryConnect(){var t=this;oM.forEach(e=>{t._tryConnectKey(e)})}async _tryConnectKey(t){var e=this;if(void 0===e._unsubRenderTemplates.get(t)&&e.hass&&e._config&&e.isTemplate(t))try{var o;const i=Si(e.hass.connection,o=>{e._templateResults=ee(ee({},e._templateResults),{},{[t]:o})},{template:null!==(o=e._config[t])&&void 0!==o?o:"",entity_ids:e._config.entity_id,variables:{config:e._config,user:e.hass.user.name},strict:!0});e._unsubRenderTemplates.set(t,i),await i}catch(n){var i;const o={result:null!==(i=e._config[t])&&void 0!==i?i:"",listeners:{all:!1,domains:[],entities:[],time:!1}};e._templateResults=ee(ee({},e._templateResults),{},{[t]:o}),e._unsubRenderTemplates.delete(t)}}async _tryDisconnect(){var t=this;oM.forEach(e=>{t._tryDisconnectKey(e)})}async _tryDisconnectKey(t){const e=this._unsubRenderTemplates.get(t);if(e){this._unsubRenderTemplates.delete(t);try{await(await e)()}catch(o){if("not_found"!==o.code&&"template_error"!==o.code)throw o}}}static get styles(){return[super.styles,Qf,l` .header { display: block; padding: var(--title-padding); @@ -3427,7 +3465,7 @@ var t,e,o,i,n,r,a,s,l,c,u,h,d,p,m,f,g,_,v,b,y,w,k,C,$,E,x,A,S,T,M,I,z,P,N,O,B,L, .align-justify { text-align: justify; } - `]}};gn([ie()],oM.prototype,"_config",void 0),gn([ie()],oM.prototype,"_templateResults",void 0),gn([ie()],oM.prototype,"_unsubRenderTemplates",void 0),oM=gn([Lt(PT)],oM);var iM=kt(()=>{ug(),JT=`${ZT=`${eg}-update-card`}-editor`,QT=["update"],tM={on:"var(--rgb-state-update-on)",off:"var(--rgb-state-update-off)",installing:"var(--rgb-state-update-installing)"}});iM(),Vt(),Be(),pn(),vn();var nM,rM=class extends Ot{constructor(...t){super(...t),this.fill=!1}_handleInstall(){this.hass.callService("update","install",{entity_id:this.entity.entity_id})}_handleSkip(t){t.stopPropagation(),this.hass.callService("update","skip",{entity_id:this.entity.entity_id})}get installDisabled(){if(!qo(this.entity))return!0;const t=this.entity.attributes.latest_version&&this.entity.attributes.skipped_version===this.entity.attributes.latest_version;return!Yo(this.entity)&&!t||wi(this.entity)}get skipDisabled(){return!qo(this.entity)||(this.entity.attributes.latest_version&&this.entity.attributes.skipped_version===this.entity.attributes.latest_version||!Yo(this.entity)||wi(this.entity))}render(){const t=zo(this.hass);return J` + `]}};gn([ie()],iM.prototype,"_config",void 0),gn([ie()],iM.prototype,"_templateResults",void 0),gn([ie()],iM.prototype,"_unsubRenderTemplates",void 0),iM=gn([Lt(NT)],iM);var nM=kt(()=>{hg(),QT=`${JT=`${og}-update-card`}-editor`,tM=["update"],eM={on:"var(--rgb-state-update-on)",off:"var(--rgb-state-update-off)",installing:"var(--rgb-state-update-installing)"}});nM(),Vt(),Be(),pn(),vn();var rM,aM=class extends Ot{constructor(...t){super(...t),this.fill=!1}_handleInstall(){this.hass.callService("update","install",{entity_id:this.entity.entity_id})}_handleSkip(t){t.stopPropagation(),this.hass.callService("update","skip",{entity_id:this.entity.entity_id})}get installDisabled(){if(!qo(this.entity))return!0;const t=this.entity.attributes.latest_version&&this.entity.attributes.skipped_version===this.entity.attributes.latest_version;return!Yo(this.entity)&&!t||wi(this.entity)}get skipDisabled(){return!qo(this.entity)||(this.entity.attributes.latest_version&&this.entity.attributes.skipped_version===this.entity.attributes.latest_version||!Yo(this.entity)||wi(this.entity))}render(){const t=zo(this.hass);return J` - `}};gn([Gt({attribute:!1})],rM.prototype,"hass",void 0),gn([Gt({attribute:!1})],rM.prototype,"entity",void 0),gn([Gt({type:Boolean})],rM.prototype,"fill",void 0),rM=gn([Lt("mushroom-update-buttons-control")],rM);var aM,sM,lM,cM,uM=kt(()=>{To(),_g(),jg(),Vg(),Fg(),nM=mo(Pg,mo(zg,gg,sg),Co({show_buttons_control:$o(bo()),collapsible_controls:$o(bo())}))}),hM=/* @__PURE__ */$t({UpdateCardEditor:()=>cM}),dM=kt(()=>{Vt(),Be(),Oi(),To(),pn(),Oc(),_g(),jg(),Yf(),Hg(),Rg(),Ug(),iM(),uM(),vn(),aM=["show_buttons_control"],sM=["more-info","navigate","url","perform-action","assist","none"],lM=vi((t,e)=>[{name:"entity",selector:{entity:{domain:QT}}},Ag(e),{name:"icon",selector:{icon:{}},context:{icon_entity:"entity"}},...$g(t),{type:"grid",name:"",schema:[{name:"show_buttons_control",selector:{boolean:{}}},{name:"collapsible_controls",selector:{boolean:{}}}]},...lg(sM)]),cM=class extends Hf{constructor(...t){super(...t),this._computeLabel=t=>{const e=ic(this.hass);return Eg.includes(t.name)?e(`editor.card.generic.${t.name}`):aM.includes(t.name)?e(`editor.card.update.${t.name}`):this.hass.localize(`ui.panel.lovelace.editor.card.generic.${t.name}`)}}connectedCallback(){super.connectedCallback(),Sg()}setConfig(t){ho(t,nM),this._config=t}render(){if(!this.hass||!this._config)return et;const t=lM(ic(this.hass),this.hass.config.version);return J` + `}};gn([Gt({attribute:!1})],aM.prototype,"hass",void 0),gn([Gt({attribute:!1})],aM.prototype,"entity",void 0),gn([Gt({type:Boolean})],aM.prototype,"fill",void 0),aM=gn([Lt("mushroom-update-buttons-control")],aM);var sM,lM,cM,uM,hM=kt(()=>{To(),vg(),Hg(),Fg(),Gg(),rM=mo(Ng,mo(Pg,_g,lg),Co({show_buttons_control:$o(bo()),collapsible_controls:$o(bo())}))}),dM=/* @__PURE__ */$t({UpdateCardEditor:()=>uM}),pM=kt(()=>{Vt(),Be(),Oi(),To(),pn(),Bc(),vg(),Hg(),qf(),Rg(),Ug(),Vg(),nM(),hM(),vn(),sM=["show_buttons_control"],lM=["more-info","navigate","url","perform-action","assist","none"],cM=vi((t,e)=>[{name:"entity",selector:{entity:{domain:tM}}},Sg(e),{name:"icon",selector:{icon:{}},context:{icon_entity:"entity"}},...Eg(t),{type:"grid",name:"",schema:[{name:"show_buttons_control",selector:{boolean:{}}},{name:"collapsible_controls",selector:{boolean:{}}}]},...cg(lM)]),uM=class extends Rf{constructor(...t){super(...t),this._computeLabel=t=>{const e=nc(this.hass);return xg.includes(t.name)?e(`editor.card.generic.${t.name}`):sM.includes(t.name)?e(`editor.card.update.${t.name}`):this.hass.localize(`ui.panel.lovelace.editor.card.generic.${t.name}`)}}connectedCallback(){super.connectedCallback(),Tg()}setConfig(t){ho(t,rM),this._config=t}render(){if(!this.hass||!this._config)return et;const t=cM(nc(this.hass),this.hass.config.version);return J` - `}_valueChanged(t){ve(this,"config-changed",{config:t.detail.value})}},gn([ie()],cM.prototype,"_config",void 0),cM=gn([Lt(JT)],cM)});Vt(),Be(),je(),Re(),pn(),bn(),Pn(),On(),Bn(),Ln(),cg(),Xf(),iM(),vn(),tg({type:ZT,name:"Mushroom Update Card",description:"Card for update entity"});var pM,mM,fM,gM=class extends Zf{static async getConfigElement(){return await Promise.resolve().then(()=>(dM(),hM)),document.createElement(JT)}static async getStubConfig(t){const e=Object.keys(t.states).filter(t=>QT.includes(t.split(".")[0]));return{type:`custom:${ZT}`,entity:e[0]}}get hasControls(){return!(!this._stateObj||!this._config)&&(Boolean(this._config.show_buttons_control)&&we(this._stateObj,1))}_handleAction(t){Ni(this,this.hass,this._config,t.detail.action)}render(){if(!this._config||!this.hass||!this._config.entity)return et;const t=this._stateObj;if(!t)return this.renderNotFound(this._config);const e=Qf(this.hass,t,this._config.name),o=this._config.icon,i=Dn(this._config),n=Wf(t,i.icon_type),r=zo(this.hass),a=(!this._config.collapsible_controls||Yo(t))&&this._config.show_buttons_control&&we(t,1);return J` + `}_valueChanged(t){ve(this,"config-changed",{config:t.detail.value})}},gn([ie()],uM.prototype,"_config",void 0),uM=gn([Lt(QT)],uM)});Vt(),Be(),je(),Re(),pn(),bn(),Pn(),On(),Bn(),Ln(),ug(),Zf(),nM(),vn(),eg({type:JT,name:"Mushroom Update Card",description:"Card for update entity"});var mM,fM,gM,_M=class extends Jf{static async getConfigElement(){return await Promise.resolve().then(()=>(pM(),dM)),document.createElement(QT)}static async getStubConfig(t){const e=Object.keys(t.states).filter(t=>tM.includes(t.split(".")[0]));return{type:`custom:${JT}`,entity:e[0]}}get hasControls(){return!(!this._stateObj||!this._config)&&(Boolean(this._config.show_buttons_control)&&we(this._stateObj,1))}_handleAction(t){Ni(this,this.hass,this._config,t.detail.action)}render(){if(!this._config||!this.hass||!this._config.entity)return et;const t=this._stateObj;if(!t)return this.renderNotFound(this._config);const e=tg(this.hass,t,this._config.name),o=this._config.icon,i=Dn(this._config),n=Xf(t,i.icon_type),r=zo(this.hass),a=(!this._config.collapsible_controls||Yo(t))&&this._config.show_buttons_control&&we(t,1);return J` @@ -3476,7 +3514,7 @@ var t,e,o,i,n,r,a,s,l,c,u,h,d,p,m,f,g,_,v,b,y,w,k,C,$,E,x,A,S,T,M,I,z,P,N,O,B,L, `:et} - `}renderIcon(t,e){const o=wi(t),i=function(t,e){return e?tM.installing:tM[t]||"var(--rgb-grey)"}(t.state,o),n={"--icon-color":`rgb(${i})`,"--shape-color":`rgba(${i}, 0.2)`};return J` + `}renderIcon(t,e){const o=wi(t),i=function(t,e){return e?eM.installing:eM[t]||"var(--rgb-grey)"}(t.state,o),n={"--icon-color":`rgb(${i})`,"--shape-color":`rgba(${i}, 0.2)`};return J` - `}static get styles(){return[super.styles,Jf,l` + `}static get styles(){return[super.styles,Qf,l` mushroom-state-item { cursor: pointer; } @@ -3503,9 +3541,9 @@ var t,e,o,i,n,r,a,s,l,c,u,h,d,p,m,f,g,_,v,b,y,w,k,C,$,E,x,A,S,T,M,I,z,P,N,O,B,L, mushroom-update-buttons-control { flex: 1; } - `]}};gM=gn([Lt(ZT)],gM);var _M=kt(()=>{ug(),mM=`${pM=`${eg}-vacuum-card`}-editor`,fM=["vacuum"]});function vM(t){switch(t.state){case ki:case"on":return!0;default:return!1}}function bM(t){return t.state===Ei}_M(),pn(),Vt(),Be(),pn(),vn();var yM,wM,kM=(t,e,o)=>CM(t,e,o)&&(!e.isVisible||e.isVisible(t)),CM=(t,e,o)=>e.isSupported(t)&&o.includes(e.command),$M=[{icon:"mdi:power",serviceName:"turn_on",command:"on_off",isSupported:t=>we(t,1),isVisible:t=>!Yo(t),isDisabled:()=>!1},{icon:"mdi:power",serviceName:"turn_off",command:"on_off",isSupported:t=>we(t,2),isVisible:t=>Yo(t),isDisabled:()=>!1},{icon:"mdi:play",serviceName:"start",command:"start_pause",isSupported:t=>we(t,Ai),isVisible:t=>!vM(t),isDisabled:()=>!1},{icon:"mdi:pause",serviceName:"pause",command:"start_pause",isSupported:t=>we(t,8192)&&we(t,4),isVisible:t=>vM(t),isDisabled:()=>!1},{icon:"mdi:play-pause",serviceName:"start_pause",command:"start_pause",isSupported:t=>!we(t,8192)&&we(t,4),isDisabled:()=>!1},{icon:"mdi:stop",serviceName:"stop",command:"stop",isSupported:t=>we(t,8),isDisabled:t=>function(t){switch(t.state){case Ci:case"off":case $i:case Ei:return!0;default:return!1}}(t)},{icon:"mdi:target-variant",serviceName:"clean_spot",command:"clean_spot",isSupported:t=>we(t,xi),isDisabled:()=>!1},{icon:"mdi:map-marker",serviceName:"locate",command:"locate",isSupported:t=>we(t,512),isDisabled:t=>bM(t)},{icon:"mdi:home-map-marker",serviceName:"return_to_base",command:"return_home",isSupported:t=>we(t,16),isDisabled:()=>!1}],EM=class extends Ot{constructor(...t){super(...t),this.fill=!1}callService(t){t.stopPropagation();const e=t.target.entry;this.hass.callService("vacuum",e.serviceName,{entity_id:this.entity.entity_id})}render(){const t=zo(this.hass);return J` + `]}};_M=gn([Lt(JT)],_M);var vM=kt(()=>{hg(),fM=`${mM=`${og}-vacuum-card`}-editor`,gM=["vacuum"]});function bM(t){switch(t.state){case ki:case"on":return!0;default:return!1}}function yM(t){return t.state===Ei}vM(),pn(),Vt(),Be(),pn(),vn();var wM,kM,CM=(t,e,o)=>$M(t,e,o)&&(!e.isVisible||e.isVisible(t)),$M=(t,e,o)=>e.isSupported(t)&&o.includes(e.command),EM=[{icon:"mdi:power",serviceName:"turn_on",command:"on_off",isSupported:t=>we(t,1),isVisible:t=>!Yo(t),isDisabled:()=>!1},{icon:"mdi:power",serviceName:"turn_off",command:"on_off",isSupported:t=>we(t,2),isVisible:t=>Yo(t),isDisabled:()=>!1},{icon:"mdi:play",serviceName:"start",command:"start_pause",isSupported:t=>we(t,Ai),isVisible:t=>!bM(t),isDisabled:()=>!1},{icon:"mdi:pause",serviceName:"pause",command:"start_pause",isSupported:t=>we(t,8192)&&we(t,4),isVisible:t=>bM(t),isDisabled:()=>!1},{icon:"mdi:play-pause",serviceName:"start_pause",command:"start_pause",isSupported:t=>!we(t,8192)&&we(t,4),isDisabled:()=>!1},{icon:"mdi:stop",serviceName:"stop",command:"stop",isSupported:t=>we(t,8),isDisabled:t=>function(t){switch(t.state){case Ci:case"off":case $i:case Ei:return!0;default:return!1}}(t)},{icon:"mdi:target-variant",serviceName:"clean_spot",command:"clean_spot",isSupported:t=>we(t,xi),isDisabled:()=>!1},{icon:"mdi:map-marker",serviceName:"locate",command:"locate",isSupported:t=>we(t,512),isDisabled:t=>yM(t)},{icon:"mdi:home-map-marker",serviceName:"return_to_base",command:"return_home",isSupported:t=>we(t,16),isDisabled:()=>!1}],xM=class extends Ot{constructor(...t){super(...t),this.fill=!1}callService(t){t.stopPropagation();const e=t.target.entry;this.hass.callService("vacuum",e.serviceName,{entity_id:this.entity.entity_id})}render(){const t=zo(this.hass);return J` - ${$M.filter(t=>kM(this.entity,t,this.commands)).map(t=>J` + ${EM.filter(t=>CM(this.entity,t,this.commands)).map(t=>J` `)} - `}};gn([Gt({attribute:!1})],EM.prototype,"hass",void 0),gn([Gt({attribute:!1})],EM.prototype,"entity",void 0),gn([Gt({attribute:!1})],EM.prototype,"commands",void 0),gn([Gt({type:Boolean})],EM.prototype,"fill",void 0),EM=gn([Lt("mushroom-vacuum-commands-control")],EM);var xM,AM,SM,TM=kt(()=>{To(),_g(),jg(),Vg(),Fg(),yM=["on_off","start_pause","stop","locate","clean_spot","return_home"],wM=mo(Pg,mo(zg,gg,sg),Co({icon_animation:$o(bo()),commands:$o(vo(Eo()))}))}),MM=/* @__PURE__ */$t({VacuumCardEditor:()=>SM}),IM=kt(()=>{Vt(),Be(),Oi(),To(),pn(),Oc(),_g(),jg(),Yf(),Hg(),Rg(),Ug(),TM(),vn(),xM=["commands"],AM=vi((t,e,o)=>[{name:"entity",selector:{entity:{domain:fM}}},Ag(o),{type:"grid",name:"",schema:[{name:"icon",selector:{icon:{}},context:{icon_entity:"entity"}},{name:"icon_animation",selector:{boolean:{}}}]},...$g(e),{name:"commands",selector:{select:{mode:"list",multiple:!0,options:yM.map(o=>({value:o,label:"on_off"===o?e(`editor.card.vacuum.commands_list.${o}`):t(`ui.dialogs.more_info_control.vacuum.${o}`)}))}}},...lg()]),SM=class extends Hf{constructor(...t){super(...t),this._computeLabel=t=>{const e=ic(this.hass);return Eg.includes(t.name)?e(`editor.card.generic.${t.name}`):xM.includes(t.name)?e(`editor.card.vacuum.${t.name}`):this.hass.localize(`ui.panel.lovelace.editor.card.generic.${t.name}`)}}connectedCallback(){super.connectedCallback(),Sg()}setConfig(t){ho(t,wM),this._config=t}render(){if(!this.hass||!this._config)return et;const t=ic(this.hass),e=AM(this.hass.localize,t,this.hass.config.version);return J` + `}};gn([Gt({attribute:!1})],xM.prototype,"hass",void 0),gn([Gt({attribute:!1})],xM.prototype,"entity",void 0),gn([Gt({attribute:!1})],xM.prototype,"commands",void 0),gn([Gt({type:Boolean})],xM.prototype,"fill",void 0),xM=gn([Lt("mushroom-vacuum-commands-control")],xM);var AM,SM,TM,MM=kt(()=>{To(),vg(),Hg(),Fg(),Gg(),wM=["on_off","start_pause","stop","locate","clean_spot","return_home"],kM=mo(Ng,mo(Pg,_g,lg),Co({icon_animation:$o(bo()),commands:$o(vo(Eo()))}))}),IM=/* @__PURE__ */$t({VacuumCardEditor:()=>TM}),zM=kt(()=>{Vt(),Be(),Oi(),To(),pn(),Bc(),vg(),Hg(),qf(),Rg(),Ug(),Vg(),MM(),vn(),AM=["commands"],SM=vi((t,e,o)=>[{name:"entity",selector:{entity:{domain:gM}}},Sg(o),{type:"grid",name:"",schema:[{name:"icon",selector:{icon:{}},context:{icon_entity:"entity"}},{name:"icon_animation",selector:{boolean:{}}}]},...Eg(e),{name:"commands",selector:{select:{mode:"list",multiple:!0,options:wM.map(o=>({value:o,label:"on_off"===o?e(`editor.card.vacuum.commands_list.${o}`):t(`ui.dialogs.more_info_control.vacuum.${o}`)}))}}},...cg()]),TM=class extends Rf{constructor(...t){super(...t),this._computeLabel=t=>{const e=nc(this.hass);return xg.includes(t.name)?e(`editor.card.generic.${t.name}`):AM.includes(t.name)?e(`editor.card.vacuum.${t.name}`):this.hass.localize(`ui.panel.lovelace.editor.card.generic.${t.name}`)}}connectedCallback(){super.connectedCallback(),Tg()}setConfig(t){ho(t,kM),this._config=t}render(){if(!this.hass||!this._config)return et;const t=nc(this.hass),e=SM(this.hass.localize,t,this.hass.config.version);return J` - `}_valueChanged(t){ve(this,"config-changed",{config:t.detail.value})}},gn([ie()],SM.prototype,"_config",void 0),SM=gn([Lt(mM)],SM)});Vt(),Be(),je(),Re(),pn(),bn(),Pn(),On(),Bn(),Ln(),cg(),Xf(),_M(),vn(),tg({type:pM,name:"Mushroom Vacuum Card",description:"Card for vacuum entity"});var zM,PM=class extends Zf{static async getConfigElement(){return await Promise.resolve().then(()=>(IM(),MM)),document.createElement(mM)}static async getStubConfig(t){const e=Object.keys(t.states).filter(t=>fM.includes(t.split(".")[0]));return{type:`custom:${pM}`,entity:e[0]}}get hasControls(){var t,e,o;return!(!this._stateObj||!this._config)&&(e=this._stateObj,o=null!==(t=this._config.commands)&&void 0!==t?t:[],$M.some(t=>CM(e,t,o)))}_handleAction(t){Ni(this,this.hass,this._config,t.detail.action)}render(){var t,e;if(!this._config||!this.hass||!this._config.entity)return et;const o=this._stateObj;if(!o)return this.renderNotFound(this._config);const i=Qf(this.hass,o,this._config.name),n=this._config.icon,r=Dn(this._config),a=Wf(o,r.icon_type),s=zo(this.hass),l=null!==(t=null===(e=this._config)||void 0===e?void 0:e.commands)&&void 0!==t?t:[];return J` + `}_valueChanged(t){ve(this,"config-changed",{config:t.detail.value})}},gn([ie()],TM.prototype,"_config",void 0),TM=gn([Lt(fM)],TM)});Vt(),Be(),je(),Re(),pn(),bn(),Pn(),On(),Bn(),Ln(),ug(),Zf(),vM(),vn(),eg({type:mM,name:"Mushroom Vacuum Card",description:"Card for vacuum entity"});var PM,NM=class extends Jf{static async getConfigElement(){return await Promise.resolve().then(()=>(zM(),IM)),document.createElement(fM)}static async getStubConfig(t){const e=Object.keys(t.states).filter(t=>gM.includes(t.split(".")[0]));return{type:`custom:${mM}`,entity:e[0]}}get hasControls(){var t,e,o;return!(!this._stateObj||!this._config)&&(e=this._stateObj,o=null!==(t=this._config.commands)&&void 0!==t?t:[],EM.some(t=>$M(e,t,o)))}_handleAction(t){Ni(this,this.hass,this._config,t.detail.action)}render(){var t,e;if(!this._config||!this.hass||!this._config.entity)return et;const o=this._stateObj;if(!o)return this.renderNotFound(this._config);const i=tg(this.hass,o,this._config.name),n=this._config.icon,r=Dn(this._config),a=Xf(o,r.icon_type),s=zo(this.hass),l=null!==(t=null===(e=this._config)||void 0===e?void 0:e.commands)&&void 0!==t?t:[];return J` @@ -3538,7 +3576,7 @@ var t,e,o,i,n,r,a,s,l,c,u,h,d,p,m,f,g,_,v,b,y,w,k,C,$,E,x,A,S,T,M,I,z,P,N,O,B,L, ${this.renderBadge(o)} ${this.renderStateInfo(o,r,i)}; - ${((t,e)=>$M.some(o=>kM(t,o,e)))(o,l)?J` + ${((t,e)=>EM.some(o=>CM(t,o,e)))(o,l)?J`
@@ -3564,7 +3602,7 @@ var t,e,o,i,n,r,a,s,l,c,u,h,d,p,m,f,g,_,v,b,y,w,k,C,$,E,x,A,S,T,M,I,z,P,N,O,B,L, .icon=${e} > - `}static get styles(){return[super.styles,Jf,l` + `}static get styles(){return[super.styles,Qf,l` mushroom-state-item { cursor: pointer; } @@ -3581,23 +3619,23 @@ var t,e,o,i,n,r,a,s,l,c,u,h,d,p,m,f,g,_,v,b,y,w,k,C,$,E,x,A,S,T,M,I,z,P,N,O,B,L, mushroom-vacuum-commands-control { flex: 1; } - `]}};PM=gn([Lt(pM)],PM),At(),oe();var NM,OM,BM,LM,DM,jM=kt(()=>{To(),zM=Co({type:Eo(),visibility:_o()})}),HM=kt(()=>{To(),_g(),jM(),NM=mo(zM,sg,Co({entity:$o(Eo()),area:$o(Eo()),icon:$o(Eo()),color:$o(Eo()),label:$o(Eo()),content:$o(Eo()),picture:$o(Eo()),entity_id:$o(Ao([Eo(),vo(Eo())]))}))}),RM=/* @__PURE__ */$t({MushroomTemplateBadgeEditor:()=>DM,TEMPLATE_BADGE_HELPERS:()=>BM,TEMPLATE_BADGE_LABELS:()=>OM}),UM=kt(()=>{Vt(),Be(),To(),pn(),Oc(),Hg(),Ug(),HM(),vn(),OM=["label","content"],BM=["area","entity"],LM=[{name:"context",flatten:!0,type:"expandable",icon:"mdi:shape",schema:[{name:"entity",selector:{entity:{}}},{name:"area",selector:{area:{}}}]},{name:"content",flatten:!0,type:"expandable",icon:"mdi:text-short",schema:[{name:"label",selector:{template:{}}},{name:"content",selector:{template:{}}},{name:"color",selector:{template:{}}},{name:"icon",selector:{template:{}}},{name:"picture",selector:{template:{}}}]},{name:"interactions",type:"expandable",flatten:!0,icon:"mdi:gesture-tap",schema:[{name:"tap_action",selector:{ui_action:{default_action:"none"}}},{name:"",type:"optional_actions",flatten:!0,schema:["hold_action","double_tap_action"].map(t=>({name:t,selector:{ui_action:{default_action:"none"}}}))}]}],DM=class extends Ot{constructor(...t){super(...t),this._computeLabel=t=>{const e=ic(this.hass);return"expandable"===t.type?e(`editor.section.${t.name}`):Eg.includes(t.name)?e(`editor.card.generic.${t.name}`):OM.includes(t.name)?e(`editor.card.template.${t.name}`):this.hass.localize(`ui.panel.lovelace.editor.card.generic.${t.name}`)},this._computeHelper=t=>{if("expandable"===t.type)return;const e=ic(this.hass);return xg.includes(t.name)?e(`editor.card.generic.${t.name}_helper`):OM.includes(t.name)?e(`editor.card.template.${t.name}_helper`):void 0}}connectedCallback(){super.connectedCallback(),Sg()}setConfig(t){ho(t,NM),this._config=t}render(){return this.hass&&this._config?J` + `]}};NM=gn([Lt(mM)],NM),At(),oe();var OM,BM,LM,DM,jM,HM=kt(()=>{To(),PM=Co({type:Eo(),visibility:_o()})}),RM=kt(()=>{To(),vg(),HM(),OM=mo(PM,lg,Co({entity:$o(Eo()),area:$o(Eo()),icon:$o(Eo()),color:$o(Eo()),label:$o(Eo()),content:$o(Eo()),picture:$o(Eo()),entity_id:$o(Ao([Eo(),vo(Eo())]))}))}),UM=/* @__PURE__ */$t({MushroomTemplateBadgeEditor:()=>jM,TEMPLATE_BADGE_HELPERS:()=>LM,TEMPLATE_BADGE_LABELS:()=>BM}),VM=kt(()=>{Vt(),Be(),To(),pn(),Bc(),Rg(),Vg(),RM(),vn(),BM=["label","content"],LM=["area","entity"],DM=[{name:"context",flatten:!0,type:"expandable",icon:"mdi:shape",schema:[{name:"entity",selector:{entity:{}}},{name:"area",selector:{area:{}}}]},{name:"content",flatten:!0,type:"expandable",icon:"mdi:text-short",schema:[{name:"label",selector:{template:{}}},{name:"content",selector:{template:{}}},{name:"color",selector:{template:{}}},{name:"icon",selector:{template:{}}},{name:"picture",selector:{template:{}}}]},{name:"interactions",type:"expandable",flatten:!0,icon:"mdi:gesture-tap",schema:[{name:"tap_action",selector:{ui_action:{default_action:"none"}}},{name:"",type:"optional_actions",flatten:!0,schema:["hold_action","double_tap_action"].map(t=>({name:t,selector:{ui_action:{default_action:"none"}}}))}]}],jM=class extends Ot{constructor(...t){super(...t),this._computeLabel=t=>{const e=nc(this.hass);return"expandable"===t.type?e(`editor.section.${t.name}`):xg.includes(t.name)?e(`editor.card.generic.${t.name}`):BM.includes(t.name)?e(`editor.card.template.${t.name}`):this.hass.localize(`ui.panel.lovelace.editor.card.generic.${t.name}`)},this._computeHelper=t=>{if("expandable"===t.type)return;const e=nc(this.hass);return Ag.includes(t.name)?e(`editor.card.generic.${t.name}_helper`):BM.includes(t.name)?e(`editor.card.template.${t.name}_helper`):void 0}}connectedCallback(){super.connectedCallback(),Tg()}setConfig(t){ho(t,OM),this._config=t}render(){return this.hass&&this._config?J` - `:et}_valueChanged(t){ve(this,"config-changed",{config:t.detail.value})}},gn([Gt({attribute:!1})],DM.prototype,"hass",void 0),gn([ie()],DM.prototype,"_config",void 0),DM=gn([Lt("mushroom-template-badge-editor")],DM)});Vt(),Be(),je(),gT(),Re(),pn(),HT(),pv(),__(),dv(),vn(),oe();var VM=new R_(1e3);!function(t){const o=window;o.customBadges=o.customBadges||[];const i=t.type.replace("-badge","").replace("mushroom-","");o.customBadges.push(ee(ee({},t),{},{preview:!0,documentationURL:`${e.url}/blob/main/docs/badges/${i}.md`}))}({type:"mushroom-template-badge",name:"Mushroom Template",description:"Build your own badge using templates"});var FM=["icon","color","label","content","picture"],GM=class extends Ot{constructor(...t){super(...t),this._unsubRenderTemplates=/* @__PURE__ */new Map}static async getConfigElement(){return await Promise.resolve().then(()=>(UM(),RM)),document.createElement("mushroom-template-badge-editor")}static async getStubConfig(t){return{type:"custom:mushroom-template-badge",content:"Hello",icon:"mdi:mushroom",color:"red"}}connectedCallback(){super.connectedCallback(),this._tryConnect()}disconnectedCallback(){if(super.disconnectedCallback(),this._tryDisconnect(),this._config&&this._templateResults){const t=this._computeCacheKey();VM.set(t,this._templateResults)}}_computeCacheKey(){return(0,yv.default)(this._config)}willUpdate(t){if(super.willUpdate(t),this._config&&!this._templateResults){const t=this._computeCacheKey();VM.has(t)?this._templateResults=VM.get(t):this._templateResults={}}}updated(t){super.updated(t),this._config&&this.hass&&this._tryConnect()}async _tryConnect(){var t=this;FM.forEach(e=>{t._tryConnectKey(e)})}async _tryConnectKey(t){var e=this;if(void 0===e._unsubRenderTemplates.get(t)&&e.hass&&e._config&&e.isTemplate(t))try{var o;const i=Si(e.hass.connection,o=>{e._templateResults=ee(ee({},e._templateResults),{},{[t]:o})},{template:null!==(o=e._config[t])&&void 0!==o?o:"",entity_ids:e._config.entity_id,variables:{config:e._config,user:e.hass.user.name,entity:e._config.entity},strict:!0});e._unsubRenderTemplates.set(t,i),await i}catch(n){var i;const o={result:null!==(i=e._config[t])&&void 0!==i?i:"",listeners:{all:!1,domains:[],entities:[],time:!1}};e._templateResults=ee(ee({},e._templateResults),{},{[t]:o}),e._unsubRenderTemplates.delete(t)}}async _tryDisconnect(){var t=this;FM.forEach(e=>{t._tryDisconnectKey(e)})}async _tryDisconnectKey(t){const e=this._unsubRenderTemplates.get(t);if(e){this._unsubRenderTemplates.delete(t);try{await(await e)()}catch(o){if("not_found"!==o.code&&"template_error"!==o.code)throw o}}}setConfig(t){FM.forEach(e=>{var o,i;(null===(o=this._config)||void 0===o?void 0:o[e])===t[e]&&(null===(i=this._config)||void 0===i?void 0:i.entity)==t.entity||this._tryDisconnectKey(e)}),this._config=ee({tap_action:{action:"none"}},t)}get hasAction(){var t,e,o,i;return!(null===(t=this._config)||void 0===t?void 0:t.tap_action)||Yi(null===(e=this._config)||void 0===e?void 0:e.tap_action)||Yi(null===(o=this._config)||void 0===o?void 0:o.hold_action)||Yi(null===(i=this._config)||void 0===i?void 0:i.double_tap_action)}render(){if(!this._config||!this.hass)return et;const t=this.getValue("icon"),e=this.getValue("color"),o=this.getValue("content"),i=this.getValue("label"),n=this.getValue("picture"),r=!!o,a=!!t||!!n,s={};e&&(s["--badge-color"]=_T(e));const l=V_(t);return J` + `:et}_valueChanged(t){ve(this,"config-changed",{config:t.detail.value})}},gn([Gt({attribute:!1})],jM.prototype,"hass",void 0),gn([ie()],jM.prototype,"_config",void 0),jM=gn([Lt("mushroom-template-badge-editor")],jM)});Vt(),Be(),je(),_T(),Re(),pn(),RT(),mv(),v_(),pv(),vn(),oe();var FM=new U_(1e3);!function(t){const o=window;o.customBadges=o.customBadges||[];const i=t.type.replace("-badge","").replace("mushroom-","");o.customBadges.push(ee(ee({},t),{},{preview:!0,documentationURL:`${e.url}/blob/main/docs/badges/${i}.md`}))}({type:"mushroom-template-badge",name:"Mushroom Template",description:"Build your own badge using templates"});var GM=["icon","color","label","content","picture"],KM=class extends Ot{constructor(...t){super(...t),this._unsubRenderTemplates=/* @__PURE__ */new Map}static async getConfigElement(){return await Promise.resolve().then(()=>(VM(),UM)),document.createElement("mushroom-template-badge-editor")}static async getStubConfig(t){return{type:"custom:mushroom-template-badge",content:"Hello",icon:"mdi:mushroom",color:"red"}}connectedCallback(){super.connectedCallback(),this._tryConnect()}disconnectedCallback(){if(super.disconnectedCallback(),this._tryDisconnect(),this._config&&this._templateResults){const t=this._computeCacheKey();FM.set(t,this._templateResults)}}_computeCacheKey(){return(0,wv.default)(this._config)}willUpdate(t){if(super.willUpdate(t),this._config&&!this._templateResults){const t=this._computeCacheKey();FM.has(t)?this._templateResults=FM.get(t):this._templateResults={}}}updated(t){super.updated(t),this._config&&this.hass&&this._tryConnect()}async _tryConnect(){var t=this;GM.forEach(e=>{t._tryConnectKey(e)})}async _tryConnectKey(t){var e=this;if(void 0===e._unsubRenderTemplates.get(t)&&e.hass&&e._config&&e.isTemplate(t))try{var o;const i=Si(e.hass.connection,o=>{e._templateResults=ee(ee({},e._templateResults),{},{[t]:o})},{template:null!==(o=e._config[t])&&void 0!==o?o:"",entity_ids:e._config.entity_id,variables:{config:e._config,user:e.hass.user.name,entity:e._config.entity},strict:!0});e._unsubRenderTemplates.set(t,i),await i}catch(n){var i;const o={result:null!==(i=e._config[t])&&void 0!==i?i:"",listeners:{all:!1,domains:[],entities:[],time:!1}};e._templateResults=ee(ee({},e._templateResults),{},{[t]:o}),e._unsubRenderTemplates.delete(t)}}async _tryDisconnect(){var t=this;GM.forEach(e=>{t._tryDisconnectKey(e)})}async _tryDisconnectKey(t){const e=this._unsubRenderTemplates.get(t);if(e){this._unsubRenderTemplates.delete(t);try{await(await e)()}catch(o){if("not_found"!==o.code&&"template_error"!==o.code)throw o}}}setConfig(t){GM.forEach(e=>{var o,i;(null===(o=this._config)||void 0===o?void 0:o[e])===t[e]&&(null===(i=this._config)||void 0===i?void 0:i.entity)==t.entity||this._tryDisconnectKey(e)}),this._config=ee({tap_action:{action:"none"}},t)}get hasAction(){var t,e,o,i;return!(null===(t=this._config)||void 0===t?void 0:t.tap_action)||Yi(null===(e=this._config)||void 0===e?void 0:e.tap_action)||Yi(null===(o=this._config)||void 0===o?void 0:o.hold_action)||Yi(null===(i=this._config)||void 0===i?void 0:i.double_tap_action)}render(){if(!this._config||!this.hass)return et;const t=this.getValue("icon"),e=this.getValue("color"),o=this.getValue("content"),i=this.getValue("label"),n=this.getValue("picture"),r=!!o,a=!!t||!!n,s={};e&&(s["--badge-color"]=vT(e));const l=F_(t);return J`
${n?J``:l||(t?J` @@ -3723,5 +3761,5 @@ var t,e,o,i,n,r,a,s,l,c,u,h,d,p,m,f,g,_,v,b,y,w,k,C,$,E,x,A,S,T,M,I,z,P,N,O,B,L, padding-inline-end: 4px; padding-inline-start: 4px; } - ${c_} - `}};gn([Gt({attribute:!1})],GM.prototype,"hass",void 0),gn([ie()],GM.prototype,"_config",void 0),gn([ie()],GM.prototype,"_templateResults",void 0),gn([ie()],GM.prototype,"_unsubRenderTemplates",void 0),GM=gn([Lt("mushroom-template-badge")],GM),At(),GT(),console.info(`%c🍄 Mushroom 🍄 - ${t}`,"color: #ef5350; font-weight: 700;"); \ No newline at end of file + ${u_} + `}};gn([Gt({attribute:!1})],KM.prototype,"hass",void 0),gn([ie()],KM.prototype,"_config",void 0),gn([ie()],KM.prototype,"_templateResults",void 0),gn([ie()],KM.prototype,"_unsubRenderTemplates",void 0),KM=gn([Lt("mushroom-template-badge")],KM),At(),KT(),console.info(`%c🍄 Mushroom 🍄 - ${t}`,"color: #ef5350; font-weight: 700;"); \ No newline at end of file diff --git a/www/community/lovelace-mushroom/mushroom.js.gz b/www/community/lovelace-mushroom/mushroom.js.gz index f3ff53bb..48fa71b2 100644 Binary files a/www/community/lovelace-mushroom/mushroom.js.gz and b/www/community/lovelace-mushroom/mushroom.js.gz differ diff --git a/zigbee2mqtt/state.json b/zigbee2mqtt/state.json index c772cba0..a7cde51b 100644 --- a/zigbee2mqtt/state.json +++ b/zigbee2mqtt/state.json @@ -38,7 +38,7 @@ "latest_source": "https://raw.githubusercontent.com/Koenkk/zigbee-OTA/master/images/ThirdReality/SmartPlug_Zigbee_PROD_OTA_V101_1.01.01.ota", "latest_release_notes": null }, - "linkquality": 120, + "linkquality": 112, "power_on_behavior": "on" }, "0xffffb40e0607aee8": { @@ -57,7 +57,7 @@ "latest_source": "https://raw.githubusercontent.com/Koenkk/zigbee-OTA/master/images/ThirdReality/SmartPlug_Zigbee_PROD_OTA_V101_1.01.01.ota", "latest_release_notes": null }, - "linkquality": 94, + "linkquality": 87, "power": 0.2, "current": 0.01, "power_on_behavior": "on" @@ -67,7 +67,7 @@ "contact": true, "tamper": false, "battery_low": false, - "linkquality": 112, + "linkquality": 80, "voltage": 3100 }, "0xffffb40e060762a4": { @@ -88,7 +88,7 @@ "latest_source": "https://raw.githubusercontent.com/Koenkk/zigbee-OTA/master/images/ThirdReality/SmartPlug_Zigbee_PROD_OTA_V101_1.01.01.ota", "latest_release_notes": null }, - "linkquality": 102, + "linkquality": 123, "power_on_behavior": "on" }, "0xffffb40e0607b680": { @@ -109,7 +109,7 @@ "latest_source": "https://raw.githubusercontent.com/Koenkk/zigbee-OTA/master/images/ThirdReality/SmartPlug_Zigbee_PROD_OTA_V101_1.01.01.ota", "latest_release_notes": null }, - "linkquality": 112, + "linkquality": 94, "power_on_behavior": "on" }, "0xffffb40e060895b3": { @@ -120,7 +120,7 @@ "current": 0.01, "power": 0.1, "power_factor": 0.11, - "linkquality": 109, + "linkquality": 69, "update": { "state": "idle", "installed_version": 268513381, @@ -151,7 +151,7 @@ "latest_source": "https://raw.githubusercontent.com/Koenkk/zigbee-OTA/master/images/ThirdReality/SmartPlug_Zigbee_PROD_OTA_V101_1.01.01.ota", "latest_release_notes": null }, - "linkquality": 94, + "linkquality": 112, "power_on_behavior": "on" }, "0xb40e060fffe2d218": { @@ -181,13 +181,13 @@ "latest_source": "https://raw.githubusercontent.com/Koenkk/zigbee-OTA/master/images/Sonoff/snzb02lwd_v1.1.0.ota", "latest_release_notes": null }, - "linkquality": 109 + "linkquality": 65 }, "0xffffb40e0606234b": { "contact": true, "battery_low": false, "battery": 100, - "linkquality": 112, + "linkquality": 109, "update": { "state": "idle", "installed_version": 36, @@ -208,7 +208,7 @@ "brightness": 254, "color_temp": 357, "color_mode": "color_temp", - "linkquality": 109 + "linkquality": 43 }, "0x7cc6b6fffe606710": { "state": "ON", @@ -220,14 +220,14 @@ "latest_release_notes": "https://ww8.ikea.com/ikeahomesmart/releasenotes/releasenotes.html" }, "brightness": 254, - "linkquality": 47 + "linkquality": 116 }, "0xb40e060fffe717c5": { "battery": 100, "occupancy": true, "tamper": false, "battery_low": false, - "linkquality": 80, + "linkquality": 87, "voltage": 3100, "update": { "state": "idle", @@ -242,7 +242,7 @@ "occupancy": false, "tamper": false, "battery_low": false, - "linkquality": 72, + "linkquality": 98, "voltage": 3100, "update": { "state": "idle",