diff --git a/.github/workflows/esphome-dummy.yaml b/.github/workflows/esphome-dummy.yaml new file mode 100644 index 000000000..bb6cb9ac9 --- /dev/null +++ b/.github/workflows/esphome-dummy.yaml @@ -0,0 +1,24 @@ +--- +name: ESPHome + +## This workflow exists to keep branch protection happy in the event of no changes being made to the esphome directory. + +# yamllint disable-line rule:truthy +on: + pull_request: + paths-ignore: + - 'esphome/**' + push: + branches: [main] + paths-ignore: + - 'esphome/**' + schedule: + - cron: 0 12 * * * + +jobs: + # This is used by branch protections + final: + name: Final ESPHome check + runs-on: ubuntu-latest + steps: + - run: 'echo "No build required"' diff --git a/.github/workflows/esphome-parallel.yaml b/.github/workflows/esphome-parallel.yaml index be8af83d2..c75839a5c 100644 --- a/.github/workflows/esphome-parallel.yaml +++ b/.github/workflows/esphome-parallel.yaml @@ -1,10 +1,17 @@ +--- name: ESPHome # yamllint disable-line rule:truthy on: pull_request: + paths: + - 'esphome/**' push: branches: [main] + paths: + - 'esphome/**' + schedule: + - cron: 0 12 * * * jobs: files: # Job that lists files @@ -20,8 +27,8 @@ jobs: run: echo "::set-output name=file::$(ls esphome/*.yaml | jq -R -s -c 'split("\n")[:-1]')" # Define step output named file base on ls command transformed to JSON thanks to jq - loop: - name: Test ESPHome firmware + loop-stable: + name: Test ESPHome Stable firmware runs-on: ubuntu-latest needs: [files] # Depends on previous job strategy: @@ -31,7 +38,7 @@ jobs: - name: Getting your configuration from GitHub uses: actions/checkout@v2 - name: ESPHome Version - uses: "docker://esphome/esphome:latest" + uses: "docker://esphome/esphome:stable" with: args: "version" - name: Copy stub files into configuration folder @@ -40,12 +47,57 @@ jobs: cp -R esphome/travis_secrets.yaml.txt esphome/common/secrets.yaml cp -R esphome/travis_secrets.yaml.txt esphome/secrets.yaml - run: echo Compiling ${{matrix.file}} - - run: docker run --rm -v "${PWD}":/config esphome/esphome:latest compile ${{matrix.file}} + - run: docker run --rm -v "${PWD}":/config esphome/esphome:stable compile ${{matrix.file}} + loop-beta: + name: Test ESPHome Beta firmware + runs-on: ubuntu-latest + needs: [files] # Depends on previous job + strategy: + matrix: + file: ${{fromJson(needs.files.outputs.file)}} # List matrix strategy from files dynamically + steps: + - name: Getting your configuration from GitHub + uses: actions/checkout@v2 + - name: ESPHome Version + uses: "docker://esphome/esphome:beta" + with: + args: "version" + - name: Copy stub files into configuration folder + if: ${{ steps.esphome-test-required.outputs.ESPHOME_CHANGES != 'false' }} + run: | + cp -R esphome/travis_secrets.yaml.txt esphome/common/secrets.yaml + cp -R esphome/travis_secrets.yaml.txt esphome/secrets.yaml + - run: echo Compiling ${{matrix.file}} + - run: docker run --rm -v "${PWD}":/config esphome/esphome:beta compile ${{matrix.file}} + + loop-dev: + name: Test ESPHome Dev firmware + runs-on: ubuntu-latest + needs: [files] # Depends on previous job + strategy: + matrix: + file: ${{fromJson(needs.files.outputs.file)}} # List matrix strategy from files dynamically + steps: + - name: Getting your configuration from GitHub + uses: actions/checkout@v2 + - name: ESPHome Version + uses: "docker://esphome/esphome:dev" + with: + args: "version" + - name: Copy stub files into configuration folder + if: ${{ steps.esphome-test-required.outputs.ESPHOME_CHANGES != 'false' }} + run: | + cp -R esphome/travis_secrets.yaml.txt esphome/common/secrets.yaml + cp -R esphome/travis_secrets.yaml.txt esphome/secrets.yaml + - run: echo Compiling ${{matrix.file}} + - run: docker run --rm -v "${PWD}":/config esphome/esphome:dev compile ${{matrix.file}} + + # This is used by branch protections final: name: Final ESPHome check runs-on: ubuntu-latest - needs: [loop] + needs: [loop-stable, loop-beta, loop-dev] steps: - name: Getting your configuration from GitHub uses: actions/checkout@v2 diff --git a/.github/workflows/esphome.yaml.disabled b/.github/workflows/esphome.yaml.disabled deleted file mode 100644 index d30e08121..000000000 --- a/.github/workflows/esphome.yaml.disabled +++ /dev/null @@ -1,118 +0,0 @@ ---- -name: ESPHome CI - -# yamllint disable-line rule:truthy -on: - push: - pull_request: - schedule: - - cron: 0 12 * * * - -jobs: - esphome-test: - runs-on: ubuntu-latest - steps: - - name: Getting your configuration from GitHub - uses: actions/checkout@v1 - - name: Check for esphome tests requirement - id: esphome-test-required - run: | - CHANGED_FILES=$(git diff --name-status HEAD~1...HEAD . | grep -i esphome || true) - if [ -z "$CHANGED_FILES" ] ; then - echo "No changes to ESPHome files" - echo ::set-output name=ESPHOME_CHANGES::false - exit 0 - fi - - esphome_stable: - runs-on: ubuntu-latest - needs: esphome-test - steps: - - name: Getting your configuration from GitHub - uses: actions/checkout@v1 - - name: ESPHome Version - uses: "docker://esphome/esphome:latest" - with: - args: "version" - - name: Copy stub files into configuration folder - if: ${{ steps.esphome-test-required.outputs.ESPHOME_CHANGES != 'false' }} - run: | - cp -R esphome/travis_secrets.yaml.txt esphome/common/secrets.yaml - cp -R esphome/travis_secrets.yaml.txt esphome/secrets.yaml - - name: Run esphome on all files - if: ${{ steps.esphome-test-required.outputs.ESPHOME_CHANGES != 'false' }} - # yamllint disable rule:line-length - run: | - for file in $(find \ - ${PWD}/esphome/ \ - -type f \ - -maxdepth 1\ - -name "*.yaml"\ - -not -name "secrets.yaml"\ - -printf "%f\n" - ); do - set -o errexit - echo $file - done | parallel --max-args=1 docker run --rm -v '${PWD}':/config esphome/esphome:latest compile esphome/{} - - esphome_beta: - runs-on: ubuntu-latest - needs: esphome-test - steps: - - name: Getting your configuration from GitHub - uses: actions/checkout@v1 - - name: ESPHome Version - uses: "docker://esphome/esphome:beta" - with: - args: "version" - - name: Copy stub files into configuration folder - if: ${{ steps.esphome-test-required.outputs.ESPHOME_CHANGES != 'false' }} - run: | - cp -R esphome/travis_secrets.yaml.txt esphome/common/secrets.yaml - cp -R esphome/travis_secrets.yaml.txt esphome/secrets.yaml - - name: Run esphome on all files - if: ${{ steps.esphome-test-required.outputs.ESPHOME_CHANGES != 'false' }} - # yamllint disable rule:line-length - run: | - for file in $(find \ - ${PWD}/esphome/ \ - -type f \ - -maxdepth 1\ - -name "*.yaml"\ - -not -name "secrets.yaml"\ - -printf "%f\n" - ); do - set -o errexit - echo $file | parallel --max-args=1 docker run --rm -v '${PWD}':/config esphome/esphome:beta compile esphome/{} - done - - esphome_dev: - runs-on: ubuntu-latest - needs: esphome-test - steps: - - name: Getting your configuration from GitHub - uses: actions/checkout@v1 - - name: ESPHome Version - uses: "docker://esphome/esphome:dev" - with: - args: "version" - - name: Copy stub files into configuration folder - if: ${{ steps.esphome-test-required.outputs.ESPHOME_CHANGES != 'false' }} - run: | - cp -R esphome/travis_secrets.yaml.txt esphome/common/secrets.yaml - cp -R esphome/travis_secrets.yaml.txt esphome/secrets.yaml - - name: Run esphome on all files - if: ${{ steps.esphome-test-required.outputs.ESPHOME_CHANGES != 'false' }} - # yamllint disable rule:line-length - run: | - for file in $(find \ - ${PWD}/esphome/ \ - -type f \ - -maxdepth 1\ - -name "*.yaml"\ - -not -name "secrets.yaml"\ - -printf "%f\n" - ); do - set -o errexit - echo $file | parallel --max-args=1 docker run --rm -v '${PWD}':/config esphome/esphome:dev compile esphome/{} - done diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index 487578ad7..15a26a08b 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -20,7 +20,7 @@ jobs: with: config_file: .github/yamllint-config.yml remarklint: - runs-on: ubuntu-18.04 + runs-on: ubuntu-latest steps: - name: Getting your configuration from GitHub uses: actions/checkout@v1 diff --git a/automation/TimedTriggers/alarm_clock_morning.yaml b/automation/TimedTriggers/alarm_clock_morning.yaml index 54d373d0c..2d1fca0e0 100644 --- a/automation/TimedTriggers/alarm_clock_morning.yaml +++ b/automation/TimedTriggers/alarm_clock_morning.yaml @@ -1,10 +1,11 @@ +--- alias: "Wakeup transition" trigger: - platform: time at: '07:15:00' condition: - condition: state - entity_id: calendar.holiday_mode + entity_id: binary_sensor.holiday_mode state: 'off' - condition: or conditions: diff --git a/automation/TimedTriggers/bedtime_on.yaml b/automation/TimedTriggers/bedtime_on.yaml deleted file mode 100644 index fa3632c95..000000000 --- a/automation/TimedTriggers/bedtime_on.yaml +++ /dev/null @@ -1,15 +0,0 @@ -alias: "Bedtime lights on" -trigger: - - platform: time - at: '21:00:00' -condition: - - condition: state - entity_id: binary_sensor.home_occupied - state: "on" -action: - - service: light.turn_on - entity_id: group.bedside_lights - data: - brightness_pct: 75 - color_temp: 400 - transition: 30 diff --git a/automation/TimedTriggers/turn_off_bedside_lights.yaml b/automation/TimedTriggers/turn_off_bedside_lights.yaml deleted file mode 100644 index ac9672015..000000000 --- a/automation/TimedTriggers/turn_off_bedside_lights.yaml +++ /dev/null @@ -1,9 +0,0 @@ -alias: "Off wakup lights" -trigger: - - platform: numeric_state - entity_id: sensor.average_external_light_level - above: 500 -action: - - service: light.turn_off - data: - entity_id: light.master_bedroom, light.bedside_charlotte, light.bedside_kyle diff --git a/automation/back_motion_night.yaml b/automation/back_motion_night.yaml deleted file mode 100644 index 9a9dae384..000000000 --- a/automation/back_motion_night.yaml +++ /dev/null @@ -1,25 +0,0 @@ -alias: Back outdoor lights on -trigger: - - platform: state - entity_id: - - binary_sensor.outside_driveway_motion - - binary_sensor.outside_utility_room_motion - to: 'on' -condition: - - condition: state - entity_id: input_boolean.night_view - state: "off" - - condition: state - entity_id: sun.sun - state: "below_horizon" -action: - - service: script.tweet_engine - data_template: - tweet: > - {{ [ - "Dark outside and motion detected! Scared! Turning on my outside lights!", - "Woooo, it's dark and scary. Something moved! Turning on the outside lights!", - "Did you hear that? I can't see a thing. Turning on the outside lights" - ] | random + " https://amzn.to/2CR5mbQ" }} - - service: light.turn_on - entity_id: light.driveway_floodlights, light.back_floodlights, light.mini_deck_floodlight diff --git a/automation/back_motion_night_off.yaml b/automation/back_motion_night_off.yaml deleted file mode 100644 index b1d7b089e..000000000 --- a/automation/back_motion_night_off.yaml +++ /dev/null @@ -1,15 +0,0 @@ -alias: Back outdoor lights off -trigger: - - platform: state - entity_id: binary_sensor.outside_driveway_motion - to: 'off' - for: - seconds: 300 - - platform: state - entity_id: binary_sensor.outside_utility_room_motion - to: 'off' - for: - seconds: 300 -action: - - service: light.turn_off - entity_id: light.driveway_floodlights, light.back_floodlights, light.mini_deck_floodlight diff --git a/automation/bedside_light_toggle.yaml b/automation/bedside_light_toggle.yaml deleted file mode 100644 index b74c98859..000000000 --- a/automation/bedside_light_toggle.yaml +++ /dev/null @@ -1,14 +0,0 @@ -alias: Bedside light toggle -trigger: - platform: mqtt - topic: devices/60019485376d/button/event - # Optional - payload: 'DOUBLEHELD' - -action: - - service: light.toggle - entity_id: group.bedside_lights - - service: logbook.log - data_template: - name: EVENT - message: "Toggling bedside lights" diff --git a/automation/bedtime_off.yaml b/automation/bedtime_off.yaml deleted file mode 100644 index f6ad7faba..000000000 --- a/automation/bedtime_off.yaml +++ /dev/null @@ -1,13 +0,0 @@ -alias: "Bedtime lights off" -trigger: - - platform: time - at: '01:00:00' -condition: - - condition: state - entity_id: binary_sensor.home_occupied - state: "on" -action: - - service: light.turn_off - entity_id: - - group.bedside_lights - - light.twig_lights diff --git a/automation/bin_notification.yaml b/automation/bin_notification.yaml index a96d3ea98..99a5ab6a0 100644 --- a/automation/bin_notification.yaml +++ b/automation/bin_notification.yaml @@ -1,7 +1,7 @@ alias: 'Bin notification' trigger: - platform: template - value_template: '{{ states.sensor.date.state == strptime(states.calendar.next_bin.attributes.start_time, "%Y-%m-%d %H:%M:%S").strftime("%Y-%m-%d")}}' + value_template: '{{ states.sensor.date.state == strptime(states.calendar.garbage_collection.attributes.start_time, "%Y-%m-%d %H:%M:%S").strftime("%Y-%m-%d")}}' - platform: time at: '17:00:00' condition: @@ -19,5 +19,5 @@ condition: action: - service: persistent_notification.create data: - message: "Next bin: {{ states.calendar.next_bin.attributes.message }}. " + message: "Next bin: {{ states.calendar.garbage_collection.attributes.message }}. " title: "Bin Reminder" diff --git a/automation/craftroom_touch_toggle.yaml b/automation/craftroom_touch_toggle.yaml index 4711b8c2e..4d710b4b0 100644 --- a/automation/craftroom_touch_toggle.yaml +++ b/automation/craftroom_touch_toggle.yaml @@ -1,9 +1,11 @@ +--- alias: Craft Room light toggle trigger: - - platform: state - entity_id: binary_sensor.craft_room_switch_touch_pad - to: 'on' - + - platform: event + event_type: esphome.button_pressed + event_data: + device_name: craftroom_switch + click_type: single action: - service: switch.turn_on entity_id: switch.craft_room_switch_relay diff --git a/automation/front_motion_night.yaml b/automation/front_motion_night.yaml deleted file mode 100644 index 45b7830f1..000000000 --- a/automation/front_motion_night.yaml +++ /dev/null @@ -1,34 +0,0 @@ -alias: Front outdoor lights on -trigger: - - platform: state - entity_id: binary_sensor.outside_front_motion - to: 'on' -condition: - - condition: state - entity_id: input_boolean.night_view - state: "off" - - condition: state - entity_id: sun.sun - state: "below_horizon" -action: - - service: script.tweet_engine - data_template: - tweet: > - {{ [ - "Dark outside and motion detected! Scared! Turning on my outside lights!", - "Woooo, it's dark and scary. Something moved! Turning on the outside lights!", - "Did you hear that? I can't see a thing. Turning on the outside lights" - ] | random + " https://amzn.to/2CR5mbQ" }} - - service: light.turn_on - entity_id: light.driveway_floodlights, light.mini_deck_floodlight - - service: light.turn_on - data: - entity_id: light.decking_lights - brightness_pct: 100 - white_value: 255 - color_temp: 153 - # If this evaluates to false, the action will stop here. - - condition: template - value_template: "{{ not is_state('binary_sensor.home_occupied') }}" - - service: light.turn_on - entity_id: light.front_door_floodlights diff --git a/automation/front_motion_night_off.yaml b/automation/front_motion_night_off.yaml deleted file mode 100644 index 4db4c2347..000000000 --- a/automation/front_motion_night_off.yaml +++ /dev/null @@ -1,15 +0,0 @@ -alias: Front outdoor lights off -trigger: - - platform: state - entity_id: binary_sensor.outside_front_motion - to: 'off' - for: - seconds: 600 -action: - - service: light.turn_off - entity_id: light.driveway_floodlights, light.mini_deck_floodlight, light.front_door_floodlights - - service: light.turn_on - data: - entity_id: light.decking_lights - brightness_pct: 0 - white_value: 0 diff --git a/automation/going_to_bed.yaml b/automation/going_to_bed.yaml index 67780f3b1..296ac3e54 100644 --- a/automation/going_to_bed.yaml +++ b/automation/going_to_bed.yaml @@ -32,9 +32,9 @@ action: entity_id: - group.living_room - group.outside_lights - - group.utility_room + - group.front_hall - group.kitchen - - group.hall + - light.hall - light.twig_lights - group.bedroom_2 - group.bedroom_3 diff --git a/automation/guest_bedroom_touch_toggle.yaml b/automation/guest_bedroom_touch_toggle.yaml index 8a0f7297c..70a632036 100644 --- a/automation/guest_bedroom_touch_toggle.yaml +++ b/automation/guest_bedroom_touch_toggle.yaml @@ -1,9 +1,12 @@ +--- alias: Guest Bedroom light toggle +# Can be improved, examples at https://github.com/TheFes/HA-configuration/blob/main/include/automation/01_first_floor/floris/shelly_floris.yaml trigger: - - platform: state - entity_id: binary_sensor.guest_bedroom_switch_touch_pad - to: 'on' - + - platform: event + event_type: esphome.button_pressed + event_data: + device_name: guestbedroom_switch + click_type: single action: - service: switch.turn_on entity_id: switch.guest_bedroom_switch_relay diff --git a/automation/home_late_dark.yaml b/automation/home_late_dark.yaml index 814bae94e..eea599205 100644 --- a/automation/home_late_dark.yaml +++ b/automation/home_late_dark.yaml @@ -23,7 +23,7 @@ action: message: "Home late..." - service: light.turn_on data: - entity_id: group.hall + entity_id: light.hall brightness_pct: > {% if states('sensor.time_of_day') == "Morning" %} 100 diff --git a/automation/living_room_sofa_dim.yaml b/automation/living_room_sofa_dim.yaml index ad14440cd..4bc0adc90 100644 --- a/automation/living_room_sofa_dim.yaml +++ b/automation/living_room_sofa_dim.yaml @@ -1,3 +1,4 @@ +--- alias: Living Room TV dimmer trigger: - platform: state @@ -7,18 +8,16 @@ condition: - condition: or conditions: - condition: state - entity_id: light.sofa_overhead + entity_id: light.living_room_1 state: 'on' - condition: state - entity_id: light.dining_table_overhead + entity_id: light.living_room_2 state: 'on' - condition: state - entity_id: light.uplighter + entity_id: light.dining_nook_group state: 'on' action: - service: light.turn_off entity_id: - - light.sofa_overhead - - light.dining_table_overhead - - light.uplighter - - light.sideboard + - light.living_room + - light.dining_nook_group diff --git a/automation/master_bedroom_double_toggle.yaml b/automation/master_bedroom_double_toggle.yaml deleted file mode 100644 index 81cf83f67..000000000 --- a/automation/master_bedroom_double_toggle.yaml +++ /dev/null @@ -1,18 +0,0 @@ -alias: Master Bedroom light double toggle -trigger: - platform: mqtt - topic: devices/60019485376d/button/event - # Optional - payload: 'DOUBLE' - -action: - - service: switch.turn_on - entity_id: switch.master_bedroom_lightswitch_relay - - service: light.toggle - entity_id: light.master_bedroom - - service: light.toggle - entity_id: light.ensuite - - service: logbook.log - data_template: - name: EVENT - message: "Double master bedroom light" diff --git a/automation/master_bedroom_touch_toggle.yaml b/automation/master_bedroom_touch_toggle.yaml deleted file mode 100644 index 1e23e063b..000000000 --- a/automation/master_bedroom_touch_toggle.yaml +++ /dev/null @@ -1,15 +0,0 @@ -alias: Master Bedroom light toggle -trigger: - - platform: state - entity_id: binary_sensor.master_bedroom_switch_touch_pad - to: 'on' - -action: - - service: switch.turn_on - entity_id: switch.master_bedroom_switch_relay - - service: light.toggle - entity_id: light.master_bedroom - - service: logbook.log - data_template: - name: EVENT - message: "Toggling master bedroom light" diff --git a/binary_sensors.yaml b/binary_sensors.yaml index fba301ec6..cc15190ed 100644 --- a/binary_sensors.yaml +++ b/binary_sensors.yaml @@ -1,3 +1,4 @@ +--- # - platform: iss # - platform: aurora @@ -36,3 +37,7 @@ mdi:home-outline {% endif %} value_template: "{{ is_state('person.kyle','home') or is_state('person.charlotte','home') or is_state('person.ronnie','home') }}" + holiday_mode: + value_template: "{{ states.calendar.family_calendar.attributes.message == 'Holiday mode' }}" + friendly_name: Holiday mode + unique_id: binary_sensor.holiday_mode diff --git a/configuration.yaml b/configuration.yaml index f8d424de8..938ffc2ba 100644 --- a/configuration.yaml +++ b/configuration.yaml @@ -1,3 +1,4 @@ +--- # Inspired by https://github.com/bruhautomation/BRUH2-Home-Assistant-Configuration homeassistant: @@ -27,6 +28,8 @@ homeassistant: unit_system: metric # Pick yours from here: http://en.wikipedia.org/wiki/List_of_tz_database_time_zones time_zone: Europe/London + country: GB + currency: GBP # Includes packages: !include_dir_named packages @@ -62,7 +65,7 @@ homeassistant: assumed_state: false light.arc_lamp: assumed_state: false - light.utility_room: + light.front_hall: assumed_state: false group.bedside_lights: icon: mdi:hotel @@ -93,45 +96,6 @@ http: stream: -konnected: - access_token: !secret konnected_key - devices: - - id: bcddc2fdd1b2 - - id: dc4f22199839 - binary_sensors: - - zone: 1 - type: window - name: 'Ensuite window' - - zone: 2 - type: window - name: 'Craft room window' - - zone: 3 - type: window - name: 'Master bedroom window' - - zone: 4 - type: window - name: 'Guest bedroom window' - - zone: 5 - type: window - name: 'Study window' - - id: dc4f22195dec - binary_sensors: - - zone: 1 - type: window - name: 'Kitchen window' - - zone: 2 - type: door - name: 'Back door' - - zone: 3 - type: door - name: 'Patio door' - - zone: 4 - type: window - name: 'Bathroom window' - - zone: 5 - type: window - name: 'Dining table window' - alarm_control_panel: - platform: manual name: Home Alarm @@ -161,9 +125,6 @@ rfxtrx: ### Lights ### # 0a140029f0dd3c0e010060: # name: Living Room - # 0a140017f090a201010070: - # # Dimmable CFL Remote Left - # name: Utility Room 0a140001f0dd3c01010070: # White Remote A1 # name: Christmas Star @@ -195,9 +156,7 @@ rfxtrx: 0b11000000b82b560a000060: # name: Outside Front Motion device_class: motion - # 0a1400002c22a70a010060: - # name: Utility Room Door - # device_class: opening + ### Sensors ### ## RFXcom ## # Old 115a0100e452000000046600006462cb3e79: @@ -238,12 +197,12 @@ emulated_hue: # https://www.home-assistant.io/components/emulated_hue/ listen_port: 80 expose_by_default: false - exposed_domains: - - switch - - light - - group - - input_boolean - - media_player + # exposed_domains: + # - switch + # - light + # - group + # - input_boolean + # - media_player entities: group.lightswitch_relays: hidden: false @@ -253,7 +212,7 @@ emulated_hue: hidden: false group.outside_lights: hidden: false - group.hall: + light.hall: hidden: false group.living_room_lights: hidden: false @@ -277,11 +236,7 @@ emulated_hue: hidden: false light.sideboard: hidden: false - light.uplighter: - hidden: false - light.sofa_overhead: - hidden: false - light.dining_table_overhead: + light.living_room: hidden: false light.star_burst: hidden: false @@ -299,8 +254,16 @@ emulated_hue: hidden: false input_boolean.goodnight_process: hidden: false + input_boolean.lockup_process: + hidden: false + input_boolean.open_tin_hut_process: + hidden: false input_boolean.night_view: hidden: false + script.alexa_turn_on_the_lights: + hidden: false + script.alexa_turn_off_the_lights: + hidden: false ############ # Includes # @@ -319,7 +282,6 @@ camera: !include cameras.yaml zone: !include zones/places.yaml shell_command: !include shell_commands.yaml climate: !include climate.yaml -# image_processing: !include openalpr.yaml # Merged Includes automation: !include_dir_list automation diff --git a/custom_components/adaptive_lighting/__init__.py b/custom_components/adaptive_lighting/__init__.py index 786daae24..33881c758 100644 --- a/custom_components/adaptive_lighting/__init__.py +++ b/custom_components/adaptive_lighting/__init__.py @@ -1,13 +1,12 @@ """Adaptive Lighting integration in Home-Assistant.""" import logging -from typing import Any, Dict - -import voluptuous as vol +from typing import Any from homeassistant.config_entries import SOURCE_IMPORT, ConfigEntry from homeassistant.const import CONF_SOURCE from homeassistant.core import HomeAssistant import homeassistant.helpers.config_validation as cv +import voluptuous as vol from .const import ( _DOMAIN_SCHEMA, @@ -36,7 +35,7 @@ def _all_unique_names(value): ) -async def async_setup(hass: HomeAssistant, config: Dict[str, Any]): +async def async_setup(hass: HomeAssistant, config: dict[str, Any]): """Import integration from config.""" if DOMAIN in config: diff --git a/custom_components/adaptive_lighting/config_flow.py b/custom_components/adaptive_lighting/config_flow.py index 8fa74f5c6..10ba5d868 100644 --- a/custom_components/adaptive_lighting/config_flow.py +++ b/custom_components/adaptive_lighting/config_flow.py @@ -1,12 +1,11 @@ """Config flow for Adaptive Lighting integration.""" import logging -import voluptuous as vol - from homeassistant import config_entries from homeassistant.const import CONF_NAME from homeassistant.core import callback import homeassistant.helpers.config_validation as cv +import voluptuous as vol from .const import ( # pylint: disable=unused-import CONF_LIGHTS, @@ -15,7 +14,7 @@ NONE_STR, VALIDATION_TUPLES, ) -from .switch import _supported_features +from .switch import _supported_features, validate _LOGGER = logging.getLogger(__name__) @@ -62,12 +61,12 @@ def validate_options(user_input, errors): This is an extra validation step because the validators in `EXTRA_VALIDATION` cannot be serialized to json. """ - for key, (validate, _) in EXTRA_VALIDATION.items(): + for key, (_validate, _) in EXTRA_VALIDATION.items(): # these are unserializable validators value = user_input.get(key) try: if value is not None and value != NONE_STR: - validate(value) + _validate(value) except vol.Invalid: _LOGGER.exception("Configuration option %s=%s is incorrect", key, value) errors["base"] = "option_error" @@ -83,6 +82,7 @@ def __init__(self, config_entry: config_entries.ConfigEntry): async def async_step_init(self, user_input=None): """Handle options flow.""" conf = self.config_entry + data = validate(conf) if conf.source == config_entries.SOURCE_IMPORT: return self.async_show_form(step_id="init", data_schema=None) errors = {} @@ -96,6 +96,15 @@ async def async_step_init(self, user_input=None): for light in self.hass.states.async_entity_ids("light") if _supported_features(self.hass, light) ] + for configured_light in data[CONF_LIGHTS]: + if configured_light not in all_lights: + errors = {CONF_LIGHTS: "entity_missing"} + _LOGGER.error( + "%s: light entity %s is configured, but was not found", + data[CONF_NAME], + configured_light, + ) + all_lights.append(configured_light) to_replace = {CONF_LIGHTS: cv.multi_select(sorted(all_lights))} options_schema = {} diff --git a/custom_components/adaptive_lighting/const.py b/custom_components/adaptive_lighting/const.py index b182ed82c..62c71fa24 100644 --- a/custom_components/adaptive_lighting/const.py +++ b/custom_components/adaptive_lighting/const.py @@ -1,8 +1,9 @@ """Constants for the Adaptive Lighting integration.""" -import voluptuous as vol from homeassistant.components.light import VALID_TRANSITION +from homeassistant.helpers import selector import homeassistant.helpers.config_validation as cv +import voluptuous as vol ICON = "mdi:theme-light-dark" @@ -31,10 +32,17 @@ ) CONF_SLEEP_BRIGHTNESS, DEFAULT_SLEEP_BRIGHTNESS = "sleep_brightness", 1 CONF_SLEEP_COLOR_TEMP, DEFAULT_SLEEP_COLOR_TEMP = "sleep_color_temp", 1000 +CONF_SLEEP_RGB_COLOR, DEFAULT_SLEEP_RGB_COLOR = "sleep_rgb_color", [255, 56, 0] +CONF_SLEEP_RGB_OR_COLOR_TEMP, DEFAULT_SLEEP_RGB_OR_COLOR_TEMP = ( + "sleep_rgb_or_color_temp", + "color_temp", +) CONF_SUNRISE_OFFSET, DEFAULT_SUNRISE_OFFSET = "sunrise_offset", 0 CONF_SUNRISE_TIME = "sunrise_time" +CONF_MAX_SUNRISE_TIME = "max_sunrise_time" CONF_SUNSET_OFFSET, DEFAULT_SUNSET_OFFSET = "sunset_offset", 0 CONF_SUNSET_TIME = "sunset_time" +CONF_MIN_SUNSET_TIME = "min_sunset_time" CONF_TAKE_OVER_CONTROL, DEFAULT_TAKE_OVER_CONTROL = "take_over_control", True CONF_TRANSITION, DEFAULT_TRANSITION = "transition", 45 @@ -52,7 +60,9 @@ SERVICE_APPLY = "apply" CONF_TURN_ON_LIGHTS = "turn_on_lights" +CONF_ADAPT_DELAY, DEFAULT_ADAPT_DELAY = "adapt_delay", 0 TURNING_OFF_DELAY = 5 +CONF_SEND_SPLIT_DELAY, DEFAULT_SEND_SPLIT_DELAY = "send_split_delay", 0 def int_between(min_int, max_int): @@ -72,15 +82,35 @@ def int_between(min_int, max_int): (CONF_MIN_COLOR_TEMP, DEFAULT_MIN_COLOR_TEMP, int_between(1000, 10000)), (CONF_MAX_COLOR_TEMP, DEFAULT_MAX_COLOR_TEMP, int_between(1000, 10000)), (CONF_SLEEP_BRIGHTNESS, DEFAULT_SLEEP_BRIGHTNESS, int_between(1, 100)), + ( + CONF_SLEEP_RGB_OR_COLOR_TEMP, + DEFAULT_SLEEP_RGB_OR_COLOR_TEMP, + selector.SelectSelector( + selector.SelectSelectorConfig( + options=["color_temp", "rgb_color"], + multiple=False, + mode=selector.SelectSelectorMode.DROPDOWN, + ), + ), + ), (CONF_SLEEP_COLOR_TEMP, DEFAULT_SLEEP_COLOR_TEMP, int_between(1000, 10000)), + ( + CONF_SLEEP_RGB_COLOR, + DEFAULT_SLEEP_RGB_COLOR, + selector.ColorRGBSelector(selector.ColorRGBSelectorConfig()), + ), (CONF_SUNRISE_TIME, NONE_STR, str), + (CONF_MAX_SUNRISE_TIME, NONE_STR, str), (CONF_SUNRISE_OFFSET, DEFAULT_SUNRISE_OFFSET, int), (CONF_SUNSET_TIME, NONE_STR, str), + (CONF_MIN_SUNSET_TIME, NONE_STR, str), (CONF_SUNSET_OFFSET, DEFAULT_SUNSET_OFFSET, int), (CONF_ONLY_ONCE, DEFAULT_ONLY_ONCE, bool), (CONF_TAKE_OVER_CONTROL, DEFAULT_TAKE_OVER_CONTROL, bool), (CONF_DETECT_NON_HA_CHANGES, DEFAULT_DETECT_NON_HA_CHANGES, bool), (CONF_SEPARATE_TURN_ON_COMMANDS, DEFAULT_SEPARATE_TURN_ON_COMMANDS, bool), + (CONF_SEND_SPLIT_DELAY, DEFAULT_SEND_SPLIT_DELAY, int_between(0, 10000)), + (CONF_ADAPT_DELAY, DEFAULT_ADAPT_DELAY, int_between(0, 10000)), ] @@ -98,8 +128,10 @@ def timedelta_as_int(value): CONF_INTERVAL: (cv.time_period, timedelta_as_int), CONF_SUNRISE_OFFSET: (cv.time_period, timedelta_as_int), CONF_SUNRISE_TIME: (cv.time, str), + CONF_MAX_SUNRISE_TIME: (cv.time, str), CONF_SUNSET_OFFSET: (cv.time_period, timedelta_as_int), CONF_SUNSET_TIME: (cv.time, str), + CONF_MIN_SUNSET_TIME: (cv.time, str), } diff --git a/custom_components/adaptive_lighting/manifest.json b/custom_components/adaptive_lighting/manifest.json index d4f9a0916..d6580942f 100644 --- a/custom_components/adaptive_lighting/manifest.json +++ b/custom_components/adaptive_lighting/manifest.json @@ -6,7 +6,7 @@ "config_flow": true, "dependencies": [], "codeowners": ["@basnijholt", "@RubenKelevra"], - "version": "1.0.14", + "version": "1.4.1", "requirements": [], "iot_class": "calculated" } diff --git a/custom_components/adaptive_lighting/strings.json b/custom_components/adaptive_lighting/strings.json index 72fdcb3b5..74099754f 100644 --- a/custom_components/adaptive_lighting/strings.json +++ b/custom_components/adaptive_lighting/strings.json @@ -1,5 +1,4 @@ { - "title": "Adaptive Lighting", "config": { "step": { "user": { @@ -21,30 +20,37 @@ "description": "All settings for a Adaptive Lighting component. The option names correspond with the YAML settings. No options are shown if you have this entry defined in YAML.", "data": { "lights": "lights", - "initial_transition": "initial_transition, when lights go 'off' to 'on'", - "sleep_transition": "sleep_transition, when 'sleep_state' changes", - "interval": "interval, time between switch updates in seconds", - "max_brightness": "max_brightness, in %", - "max_color_temp": "max_color_temp, in Kelvin", - "min_brightness": "min_brightness, in %", - "min_color_temp": "min_color_temp, in Kelvin", - "only_once": "only_once, only adapt the lights when turning them on", - "prefer_rgb_color": "prefer_rgb_color, use 'rgb_color' over 'color_temp' when possible", - "separate_turn_on_commands": "separate_turn_on_commands, for each attribute (color, brightness, etc.) in 'light.turn_on', required for some lights.", - "sleep_brightness": "sleep_brightness, in %", - "sleep_color_temp": "sleep_color_temp, in Kelvin", - "sunrise_offset": "sunrise_offset, in +/- seconds", - "sunrise_time": "sunrise_time, in 'HH:MM:SS' format (if 'None', it uses the actual sunrise time at your location)", - "sunset_offset": "sunset_offset, in +/- seconds", - "sunset_time": "sunset_time, in 'HH:MM:SS' format (if 'None', it uses the actual sunset time at your location)", - "take_over_control": "take_over_control, if anything but Adaptive Lighting calls 'light.turn_on' when a light is already on, stop adapting that light until it (or the switch) toggles off -> on.", - "detect_non_ha_changes": "detect_non_ha_changes, detects all >5% changes made to the lights (also outside of HA), requires 'take_over_control' to be enabled (calls 'homeassistant.update_entity' every 'interval'!)", - "transition": "transition, in seconds" + "initial_transition": "initial_transition: When lights turn 'off' to 'on'. (seconds)", + "sleep_transition": "sleep_transition: When 'sleep_state' changes. (seconds)", + "interval": "interval: Time between switch updates. (seconds)", + "max_brightness": "max_brightness: Highest brightness of lights during a cycle. (%)", + "max_color_temp": "max_color_temp: Coldest hue of the color temperature cycle. (Kelvin)", + "min_brightness": "min_brightness: Lowest brightness of lights during a cycle. (%)", + "min_color_temp": "min_color_temp, Warmest hue of the color temperature cycle. (Kelvin)", + "only_once": "only_once: Only adapt the lights when turning them on.", + "prefer_rgb_color": "prefer_rgb_color: Use 'rgb_color' rather than 'color_temp' when possible.", + "separate_turn_on_commands": "separate_turn_on_commands: Separate the commands for each attribute (color, brightness, etc.) in 'light.turn_on' (required for some lights).", + "send_split_delay": "send_split_delay: wait between commands (milliseconds), when separate_turn_on_commands is used. May ensure that both commands are handled by the bulb correctly.", + "sleep_brightness": "sleep_brightness, Brightness setting for Sleep Mode. (%)", + "sleep_rgb_or_color_temp": "sleep_rgb_or_color_temp, use 'rgb_color' or 'color_temp'", + "sleep_rgb_color": "sleep_rgb_color, in RGB", + "sleep_color_temp": "sleep_color_temp: Color temperature setting for Sleep Mode. (Kelvin)", + "sunrise_offset": "sunrise_offset: How long before(-) or after(+) to define the sunrise point of the cycle (+/- seconds)", + "sunrise_time": "sunrise_time: Manual override of the sunrise time, if 'None', it uses the actual sunrise time at your location (HH:MM:SS)", + "max_sunrise_time": "max_sunrise_time: Manual override of the maximum sunrise time, if 'None', it uses the actual sunrise time at your location (HH:MM:SS)", + "sunset_offset": "sunset_offset: How long before(-) or after(+) to define the sunset point of the cycle (+/- seconds)", + "sunset_time": "sunset_time: Manual override of the sunset time, if 'None', it uses the actual sunrise time at your location (HH:MM:SS)", + "min_sunset_time": "min_sunset_time: Manual override of the minimum sunset time, if 'None', it uses the actual sunset time at your location (HH:MM:SS)", + "take_over_control": "take_over_control: If anything but Adaptive Lighting calls 'light.turn_on' when a light is already on, stop adapting that light until it (or the switch) toggles off -> on.", + "detect_non_ha_changes": "detect_non_ha_changes: detects all >10% changes made to the lights (also outside of HA), requires 'take_over_control' to be enabled (calls 'homeassistant.update_entity' every 'interval'!)", + "transition": "Transition time when applying a change to the lights (seconds)", + "adapt_delay": "adapt_delay: wait time between light turn on (seconds), and Adaptive Lights applying changes to the light state. May avoid flickering." } } }, "error": { - "option_error": "Invalid option" + "option_error": "Invalid option", + "entity_missing": "One or more selected light entities are missing from Home Assistant" } } } diff --git a/custom_components/adaptive_lighting/switch.py b/custom_components/adaptive_lighting/switch.py index 7e0231343..ac1acc96b 100644 --- a/custom_components/adaptive_lighting/switch.py +++ b/custom_components/adaptive_lighting/switch.py @@ -2,6 +2,7 @@ from __future__ import annotations import asyncio +import base64 import bisect from collections import defaultdict from copy import deepcopy @@ -9,14 +10,11 @@ import datetime from datetime import timedelta import functools -import hashlib import logging import math -from typing import Any, Dict, List, Optional, Tuple, Union +from typing import Any, Literal import astral -import voluptuous as vol - from homeassistant.components.light import ( ATTR_BRIGHTNESS, ATTR_BRIGHTNESS_PCT, @@ -24,32 +22,34 @@ ATTR_BRIGHTNESS_STEP_PCT, ATTR_COLOR_NAME, ATTR_COLOR_TEMP, + ATTR_COLOR_TEMP_KELVIN, ATTR_HS_COLOR, ATTR_KELVIN, ATTR_RGB_COLOR, + ATTR_SUPPORTED_COLOR_MODES, ATTR_TRANSITION, - ATTR_WHITE_VALUE, ATTR_XY_COLOR, - DOMAIN as LIGHT_DOMAIN, + COLOR_MODE_BRIGHTNESS, + COLOR_MODE_COLOR_TEMP, + COLOR_MODE_HS, + COLOR_MODE_RGB, + COLOR_MODE_RGBW, + COLOR_MODE_XY, +) +from homeassistant.components.light import ( SUPPORT_BRIGHTNESS, SUPPORT_COLOR, SUPPORT_COLOR_TEMP, SUPPORT_TRANSITION, - SUPPORT_WHITE_VALUE, VALID_TRANSITION, is_on, - COLOR_MODE_RGB, - COLOR_MODE_RGBW, - COLOR_MODE_HS, - COLOR_MODE_XY, - COLOR_MODE_COLOR_TEMP, - COLOR_MODE_BRIGHTNESS, - ATTR_SUPPORTED_COLOR_MODES, ) - -from homeassistant.components.switch import DOMAIN as SWITCH_DOMAIN, SwitchEntity +from homeassistant.components.light import DOMAIN as LIGHT_DOMAIN +from homeassistant.components.switch import DOMAIN as SWITCH_DOMAIN +from homeassistant.components.switch import SwitchEntity from homeassistant.config_entries import ConfigEntry from homeassistant.const import ( + ATTR_AREA_ID, ATTR_DOMAIN, ATTR_ENTITY_ID, ATTR_SERVICE, @@ -82,14 +82,15 @@ ) from homeassistant.helpers.restore_state import RestoreEntity from homeassistant.helpers.sun import get_astral_location +from homeassistant.helpers.template import area_entities from homeassistant.util import slugify from homeassistant.util.color import ( color_RGB_to_xy, - color_temperature_kelvin_to_mired, color_temperature_to_rgb, color_xy_to_hs, ) import homeassistant.util.dt as dt_util +import voluptuous as vol from .const import ( ADAPT_BRIGHTNESS_SWITCH, @@ -97,21 +98,27 @@ ATTR_ADAPT_BRIGHTNESS, ATTR_ADAPT_COLOR, ATTR_TURN_ON_OFF_LISTENER, + CONF_ADAPT_DELAY, CONF_DETECT_NON_HA_CHANGES, CONF_INITIAL_TRANSITION, - CONF_SLEEP_TRANSITION, CONF_INTERVAL, CONF_LIGHTS, CONF_MANUAL_CONTROL, CONF_MAX_BRIGHTNESS, CONF_MAX_COLOR_TEMP, + CONF_MAX_SUNRISE_TIME, CONF_MIN_BRIGHTNESS, CONF_MIN_COLOR_TEMP, + CONF_MIN_SUNSET_TIME, CONF_ONLY_ONCE, CONF_PREFER_RGB_COLOR, + CONF_SEND_SPLIT_DELAY, CONF_SEPARATE_TURN_ON_COMMANDS, CONF_SLEEP_BRIGHTNESS, CONF_SLEEP_COLOR_TEMP, + CONF_SLEEP_RGB_COLOR, + CONF_SLEEP_RGB_OR_COLOR_TEMP, + CONF_SLEEP_TRANSITION, CONF_SUNRISE_OFFSET, CONF_SUNRISE_TIME, CONF_SUNSET_OFFSET, @@ -134,7 +141,6 @@ _SUPPORT_OPTS = { "brightness": SUPPORT_BRIGHTNESS, - "white_value": SUPPORT_WHITE_VALUE, "color_temp": SUPPORT_COLOR_TEMP, "color": SUPPORT_COLOR, "transition": SUPPORT_TRANSITION, @@ -149,12 +155,13 @@ # Consider it a significant change when attribute changes more than BRIGHTNESS_CHANGE = 25 # ≈10% of total range -COLOR_TEMP_CHANGE = 20 # ≈5% of total range +COLOR_TEMP_CHANGE = 100 # ≈3% of total range (2000-6500) RGB_REDMEAN_CHANGE = 80 # ≈10% of total range COLOR_ATTRS = { # Should ATTR_PROFILE be in here? ATTR_COLOR_NAME, ATTR_COLOR_TEMP, + ATTR_COLOR_TEMP_KELVIN, ATTR_HS_COLOR, ATTR_KELVIN, ATTR_RGB_COLOR, @@ -163,7 +170,6 @@ BRIGHTNESS_ATTRS = { ATTR_BRIGHTNESS, - ATTR_WHITE_VALUE, ATTR_BRIGHTNESS_PCT, ATTR_BRIGHTNESS_STEP, ATTR_BRIGHTNESS_STEP_PCT, @@ -173,25 +179,36 @@ _DOMAIN_SHORT = "adapt_lgt" +def _int_to_bytes(i: int, signed: bool = False) -> bytes: + bits = i.bit_length() + if signed: + # Make room for the sign bit. + bits += 1 + return i.to_bytes((bits + 7) // 8, "little", signed=signed) + + def _short_hash(string: str, length: int = 4) -> str: """Create a hash of 'string' with length 'length'.""" - return hashlib.sha1(string.encode("UTF-8")).hexdigest()[:length] + str_hash_bytes = _int_to_bytes(hash(string), signed=True) + return base64.b85encode(str_hash_bytes)[:length] def create_context( - name: str, which: str, index: int, parent: Optional[Context] = None + name: str, which: str, index: int, parent: Context | None = None ) -> Context: """Create a context that can identify this integration.""" # Use a hash for the name because otherwise the context might become # too long (max len == 36) to fit in the database. name_hash = _short_hash(name) + # Pack index with base85 to maximize the number of contexts we can create + # before we exceed the 36-character limit and are forced to wrap. + index_packed = base64.b85encode(_int_to_bytes(index, signed=False)) + context_id = f"{_DOMAIN_SHORT}:{name_hash}:{which}:{index_packed}"[:36] parent_id = parent.id if parent else None - return Context( - id=f"{_DOMAIN_SHORT}_{name_hash}_{which}_{index}", parent_id=parent_id - ) + return Context(id=context_id, parent_id=parent_id) -def is_our_context(context: Optional[Context]) -> bool: +def is_our_context(context: Context | None) -> bool: """Check whether this integration created 'context'.""" if context is None: return False @@ -207,14 +224,16 @@ def _split_service_data(service_data, adapt_brightness, adapt_color): service_datas = [] if adapt_color: service_data_color = service_data.copy() - service_data_color.pop(ATTR_WHITE_VALUE, None) service_data_color.pop(ATTR_BRIGHTNESS, None) service_datas.append(service_data_color) if adapt_brightness: service_data_brightness = service_data.copy() service_data_brightness.pop(ATTR_RGB_COLOR, None) - service_data_brightness.pop(ATTR_COLOR_TEMP, None) + service_data_brightness.pop(ATTR_COLOR_TEMP_KELVIN, None) service_datas.append(service_data_brightness) + + if not service_datas: # neither adapt_brightness nor adapt_color + return [service_data] return service_datas @@ -328,7 +347,9 @@ async def async_setup_entry( platform.async_register_entity_service( SERVICE_APPLY, { - vol.Optional(CONF_LIGHTS, default=[]): cv.entity_ids, # pylint: disable=protected-access + vol.Optional( + CONF_LIGHTS, default=[] + ): cv.entity_ids, # pylint: disable=protected-access vol.Optional( CONF_TRANSITION, default=switch._initial_transition, # pylint: disable=protected-access @@ -365,7 +386,7 @@ def validate(config_entry: ConfigEntry): return data -def match_switch_state_event(event: Event, from_or_to_state: List[str]): +def match_switch_state_event(event: Event, from_or_to_state: list[str]): """Match state event when either 'from_state' or 'to_state' matches.""" old_state = event.data.get("old_state") from_state_match = old_state is not None and old_state.state in from_or_to_state @@ -377,7 +398,7 @@ def match_switch_state_event(event: Event, from_or_to_state: List[str]): return match -def _expand_light_groups(hass: HomeAssistant, lights: List[str]) -> List[str]: +def _expand_light_groups(hass: HomeAssistant, lights: list[str]) -> list[str]: all_lights = set() turn_on_off_listener = hass.data[DOMAIN][ATTR_TURN_ON_OFF_LISTENER] for light in lights: @@ -425,7 +446,7 @@ def _supported_features(hass: HomeAssistant, light: str): def color_difference_redmean( - rgb1: Tuple[float, float, float], rgb2: Tuple[float, float, float] + rgb1: tuple[float, float, float], rgb2: tuple[float, float, float] ) -> float: """Distance between colors in RGB space (redmean metric). @@ -436,17 +457,17 @@ def color_difference_redmean( - https://www.compuphase.com/cmetric.htm """ r_hat = (rgb1[0] + rgb2[0]) / 2 - delta_r, delta_g, delta_b = [(col1 - col2) for col1, col2 in zip(rgb1, rgb2)] - red_term = (2 + r_hat / 256) * delta_r ** 2 - green_term = 4 * delta_g ** 2 - blue_term = (2 + (255 - r_hat) / 256) * delta_b ** 2 + delta_r, delta_g, delta_b = ((col1 - col2) for col1, col2 in zip(rgb1, rgb2)) + red_term = (2 + r_hat / 256) * delta_r**2 + green_term = 4 * delta_g**2 + blue_term = (2 + (255 - r_hat) / 256) * delta_b**2 return math.sqrt(red_term + green_term + blue_term) def _attributes_have_changed( light: str, - old_attributes: Dict[str, Any], - new_attributes: Dict[str, Any], + old_attributes: dict[str, Any], + new_attributes: dict[str, Any], adapt_brightness: bool, adapt_color: bool, context: Context, @@ -469,31 +490,13 @@ def _attributes_have_changed( ) return True - if ( - adapt_brightness - and ATTR_WHITE_VALUE in old_attributes - and ATTR_WHITE_VALUE in new_attributes - ): - last_white_value = old_attributes[ATTR_WHITE_VALUE] - current_white_value = new_attributes[ATTR_WHITE_VALUE] - if abs(current_white_value - last_white_value) > BRIGHTNESS_CHANGE: - _LOGGER.debug( - "White Value of '%s' significantly changed from %s to %s with" - " context.id='%s'", - light, - last_white_value, - current_white_value, - context.id, - ) - return True - if ( adapt_color - and ATTR_COLOR_TEMP in old_attributes - and ATTR_COLOR_TEMP in new_attributes + and ATTR_COLOR_TEMP_KELVIN in old_attributes + and ATTR_COLOR_TEMP_KELVIN in new_attributes ): - last_color_temp = old_attributes[ATTR_COLOR_TEMP] - current_color_temp = new_attributes[ATTR_COLOR_TEMP] + last_color_temp = old_attributes[ATTR_COLOR_TEMP_KELVIN] + current_color_temp = new_attributes[ATTR_COLOR_TEMP_KELVIN] if abs(current_color_temp - last_color_temp) > COLOR_TEMP_CHANGE: _LOGGER.debug( "Color temperature of '%s' significantly changed from %s to %s with" @@ -528,7 +531,8 @@ def _attributes_have_changed( ATTR_RGB_COLOR in old_attributes and ATTR_RGB_COLOR not in new_attributes ) switched_to_rgb_color = ( - ATTR_COLOR_TEMP in old_attributes and ATTR_COLOR_TEMP not in new_attributes + ATTR_COLOR_TEMP_KELVIN in old_attributes + and ATTR_COLOR_TEMP_KELVIN not in new_attributes ) if switched_color_temp or switched_to_rgb_color: # Light switched from RGB mode to color_temp or visa versa @@ -572,6 +576,8 @@ def __init__( self._separate_turn_on_commands = data[CONF_SEPARATE_TURN_ON_COMMANDS] self._take_over_control = data[CONF_TAKE_OVER_CONTROL] self._transition = data[CONF_TRANSITION] + self._adapt_delay = data[CONF_ADAPT_DELAY] + self._send_split_delay = data[CONF_SEND_SPLIT_DELAY] _loc = get_astral_location(self.hass) if isinstance(_loc, tuple): # Astral v2.2 @@ -589,10 +595,14 @@ def __init__( min_color_temp=data[CONF_MIN_COLOR_TEMP], sleep_brightness=data[CONF_SLEEP_BRIGHTNESS], sleep_color_temp=data[CONF_SLEEP_COLOR_TEMP], + sleep_rgb_color=data[CONF_SLEEP_RGB_COLOR], + sleep_rgb_or_color_temp=data[CONF_SLEEP_RGB_OR_COLOR_TEMP], sunrise_offset=data[CONF_SUNRISE_OFFSET], sunrise_time=data[CONF_SUNRISE_TIME], + max_sunrise_time=data[CONF_MAX_SUNRISE_TIME], sunset_offset=data[CONF_SUNSET_OFFSET], sunset_time=data[CONF_SUNSET_TIME], + min_sunset_time=data[CONF_MIN_SUNSET_TIME], time_zone=self.hass.config.time_zone, transition=data[CONF_TRANSITION], ) @@ -602,16 +612,16 @@ def __init__( self._state = None # Tracks 'off' → 'on' state changes - self._on_to_off_event: Dict[str, Event] = {} + self._on_to_off_event: dict[str, Event] = {} # Tracks 'on' → 'off' state changes - self._off_to_on_event: Dict[str, Event] = {} + self._off_to_on_event: dict[str, Event] = {} # Locks that prevent light adjusting when waiting for a light to 'turn_off' - self._locks: Dict[str, asyncio.Lock] = {} + self._locks: dict[str, asyncio.Lock] = {} # To count the number of `Context` instances self._context_cnt: int = 0 # Set in self._update_attrs_and_maybe_adapt_lights - self._settings: Dict[str, Any] = {} + self._settings: dict[str, Any] = {} # Set and unset tracker in async_turn_on and async_turn_off self.remove_listeners = [] @@ -637,7 +647,7 @@ def unique_id(self): return self._name @property - def is_on(self) -> Optional[bool]: + def is_on(self) -> bool | None: """Return true if adaptive lighting is on.""" return self._state @@ -703,7 +713,7 @@ def icon(self) -> str: return self._icon @property - def extra_state_attributes(self) -> Dict[str, Any]: + def extra_state_attributes(self) -> dict[str, Any]: """Return the attributes of the switch.""" if not self.is_on: return {key: None for key in self._settings} @@ -715,17 +725,19 @@ def extra_state_attributes(self) -> Dict[str, Any]: return dict(self._settings, manual_control=manual_control) def create_context( - self, which: str = "default", parent: Optional[Context] = None + self, which: str = "default", parent: Context | None = None ) -> Context: """Create a context that identifies this Adaptive Lighting instance.""" # Right now the highest number of each context_id it can create is - # 'adapt_lgt_XXXX_turn_on_9999999999999' - # 'adapt_lgt_XXXX_interval_999999999999' - # 'adapt_lgt_XXXX_adapt_lights_99999999' - # 'adapt_lgt_XXXX_sleep_999999999999999' - # 'adapt_lgt_XXXX_light_event_999999999' - # 'adapt_lgt_XXXX_service_9999999999999' - # So 100 million calls before we run into the 36 chars limit. + # 'adapt_lgt:XXXX:turn_on:*************' + # 'adapt_lgt:XXXX:interval:************' + # 'adapt_lgt:XXXX:adapt_lights:********' + # 'adapt_lgt:XXXX:sleep:***************' + # 'adapt_lgt:XXXX:light_event:*********' + # 'adapt_lgt:XXXX:service:*************' + # The smallest space we have is for adapt_lights, which has + # 8 characters. In base85 encoding, that's enough space to hold values + # up to 2**48 - 1, which should give us plenty of calls before we wrap. context = create_context(self._name, which, self._context_cnt, parent=parent) self._context_cnt += 1 return context @@ -759,18 +771,20 @@ async def async_turn_off(self, **kwargs) -> None: async def _async_update_at_interval(self, now=None) -> None: await self._update_attrs_and_maybe_adapt_lights( - transition=self._transition, force=False, context=self.create_context("interval") + transition=self._transition, + force=False, + context=self.create_context("interval"), ) async def _adapt_light( self, light: str, - transition: Optional[int] = None, - adapt_brightness: Optional[bool] = None, - adapt_color: Optional[bool] = None, - prefer_rgb_color: Optional[bool] = None, + transition: int | None = None, + adapt_brightness: bool | None = None, + adapt_color: bool | None = None, + prefer_rgb_color: bool | None = None, force: bool = False, - context: Optional[Context] = None, + context: Context | None = None, ) -> None: lock = self._locks.get(light) if lock is not None and lock.locked(): @@ -791,25 +805,34 @@ async def _adapt_light( if "transition" in features: service_data[ATTR_TRANSITION] = transition + # The switch might be off and not have _settings set. + self._settings = self._sun_light_settings.get_settings( + self.sleep_mode_switch.is_on, transition + ) + if "brightness" in features and adapt_brightness: brightness = round(255 * self._settings["brightness_pct"] / 100) service_data[ATTR_BRIGHTNESS] = brightness - if "white_value" in features and adapt_brightness: - white_value = round(255 * self._settings["brightness_pct"] / 100) - service_data[ATTR_WHITE_VALUE] = white_value - + sleep_rgb = ( + self.sleep_mode_switch.is_on + and self._sun_light_settings.sleep_rgb_or_color_temp == "rgb_color" + ) if ( "color_temp" in features and adapt_color and not (prefer_rgb_color and "color" in features) + and not (sleep_rgb and "color" in features) ): + _LOGGER.debug("%s: Setting color_temp of light %s", self._name, light) attributes = self.hass.states.get(light).attributes - min_mireds, max_mireds = attributes["min_mireds"], attributes["max_mireds"] - color_temp_mired = self._settings["color_temp_mired"] - color_temp_mired = max(min(color_temp_mired, max_mireds), min_mireds) - service_data[ATTR_COLOR_TEMP] = color_temp_mired + min_kelvin = attributes["min_color_temp_kelvin"] + max_kelvin = attributes["max_color_temp_kelvin"] + color_temp_kelvin = self._settings["color_temp_kelvin"] + color_temp_kelvin = max(min(color_temp_kelvin, max_kelvin), min_kelvin) + service_data[ATTR_COLOR_TEMP_KELVIN] = color_temp_kelvin elif "color" in features and adapt_color: + _LOGGER.debug("%s: Setting rgb_color of light %s", self._name, light) service_data[ATTR_RGB_COLOR] = self._settings["rgb_color"] context = context or self.create_context("adapt_lights") @@ -855,14 +878,15 @@ async def turn_on(service_data): transition = service_datas[0].get(ATTR_TRANSITION) if transition is not None: await asyncio.sleep(transition) + await asyncio.sleep(self._send_split_delay / 1000.0) await turn_on(service_datas[1]) async def _update_attrs_and_maybe_adapt_lights( self, - lights: Optional[List[str]] = None, - transition: Optional[int] = None, + lights: list[str] | None = None, + transition: int | None = None, force: bool = False, - context: Optional[Context] = None, + context: Context | None = None, ) -> None: assert context is not None _LOGGER.debug( @@ -883,10 +907,10 @@ async def _update_attrs_and_maybe_adapt_lights( async def _adapt_lights( self, - lights: List[str], - transition: Optional[int], + lights: list[str], + transition: int | None, force: bool, - context: Optional[Context], + context: Context | None, ) -> None: assert context is not None _LOGGER.debug( @@ -921,6 +945,7 @@ async def _adapt_lights( async def _sleep_mode_switch_state_event(self, event: Event) -> None: if not match_switch_state_event(event, (STATE_ON, STATE_OFF)): + _LOGGER.debug("%s: Ignoring sleep event %s", self._name, event) return _LOGGER.debug( "%s: _sleep_mode_switch_state_event, event: '%s'", self._name, event @@ -967,6 +992,21 @@ async def _light_event(self, event: Event) -> None: ) return + if self._adapt_delay > 0: + _LOGGER.debug( + "%s: sleep started for '%s' with context.id='%s'", + self._name, + entity_id, + event.context.id, + ) + await asyncio.sleep(self._adapt_delay) + _LOGGER.debug( + "%s: sleep ended for '%s' with context.id='%s'", + self._name, + entity_id, + event.context.id, + ) + await self._update_attrs_and_maybe_adapt_lights( lights=[entity_id], transition=self._initial_transition, @@ -1017,7 +1057,7 @@ def icon(self) -> str: return self._icon @property - def is_on(self) -> Optional[bool]: + def is_on(self) -> bool | None: """Return true if adaptive lighting is on.""" return self._state @@ -1034,10 +1074,12 @@ async def async_added_to_hass(self) -> None: async def async_turn_on(self, **kwargs) -> None: """Turn on adaptive lighting sleep mode.""" + _LOGGER.debug("%s: Turning on", self._name) self._state = True async def async_turn_off(self, **kwargs) -> None: """Turn off adaptive lighting sleep mode.""" + _LOGGER.debug("%s: Turning off", self._name) self._state = False @@ -1052,15 +1094,19 @@ class SunLightSettings: min_brightness: int min_color_temp: int sleep_brightness: int + sleep_rgb_or_color_temp: Literal["color_temp", "rgb_color"] sleep_color_temp: int - sunrise_offset: Optional[datetime.timedelta] - sunrise_time: Optional[datetime.time] - sunset_offset: Optional[datetime.timedelta] - sunset_time: Optional[datetime.time] + sleep_rgb_color: tuple[int, int, int] + sunrise_offset: datetime.timedelta | None + sunrise_time: datetime.time | None + max_sunrise_time: datetime.time | None + sunset_offset: datetime.timedelta | None + sunset_time: datetime.time | None + min_sunset_time: datetime.time | None time_zone: datetime.tzinfo transition: int - def get_sun_events(self, date: datetime.datetime) -> Dict[str, float]: + def get_sun_events(self, date: datetime.datetime) -> dict[str, float]: """Get the four sun event's timestamps at 'date'.""" def _replace_time(date: datetime.datetime, key: str) -> datetime.datetime: @@ -1068,20 +1114,24 @@ def _replace_time(date: datetime.datetime, key: str) -> datetime.datetime: date_time = datetime.datetime.combine(date, time) try: # HA ≤2021.05, https://github.com/basnijholt/adaptive-lighting/issues/128 utc_time = self.time_zone.localize(date_time).astimezone(dt_util.UTC) - except AttributeError: # HA ≥2021.06 - utc_time = date_time.replace(tzinfo=dt_util.DEFAULT_TIME_ZONE).astimezone(dt_util.UTC) + except AttributeError: # HA ≥2021.06 + utc_time = date_time.replace( + tzinfo=dt_util.DEFAULT_TIME_ZONE + ).astimezone(dt_util.UTC) return utc_time def calculate_noon_and_midnight( - sunset: datetime.datetime, sunrise: datetime.datetime - ) -> Tuple[datetime.datetime, datetime.datetime]: + sunset: datetime.datetime, sunrise: datetime.datetime + ) -> tuple[datetime.datetime, datetime.datetime]: middle = abs(sunset - sunrise) / 2 if sunset > sunrise: noon = sunrise + middle midnight = noon + timedelta(hours=12) * (1 if noon.hour < 12 else -1) else: midnight = sunset + middle - noon = midnight + timedelta(hours=12) * (1 if midnight.hour < 12 else -1) + noon = midnight + timedelta(hours=12) * ( + 1 if midnight.hour < 12 else -1 + ) return noon, midnight location = self.astral_location @@ -1097,7 +1147,22 @@ def calculate_noon_and_midnight( else _replace_time(date, "sunset") ) + self.sunset_offset - if self.sunrise_time is None and self.sunset_time is None: + if self.max_sunrise_time is not None: + max_sunrise = _replace_time(date, "max_sunrise") + if max_sunrise < sunrise: + sunrise = max_sunrise + + if self.min_sunset_time is not None: + min_sunset = _replace_time(date, "min_sunset") + if min_sunset > sunset: + sunset = min_sunset + + if ( + self.sunrise_time is None + and self.sunset_time is None + and self.max_sunrise_time is None + and self.min_sunset_time is None + ): try: # Astral v1 solar_noon = location.solar_noon(date, local=False) @@ -1130,7 +1195,7 @@ def calculate_noon_and_midnight( return events - def relevant_events(self, now: datetime.datetime) -> List[Tuple[str, float]]: + def relevant_events(self, now: datetime.datetime) -> list[tuple[str, float]]: """Get the previous and next sun event.""" events = [ self.get_sun_events(now + timedelta(days=days)) for days in [-1, 0, 1] @@ -1167,35 +1232,40 @@ def calc_brightness_pct(self, percent: float, is_sleep: bool) -> float: percent = 1 + percent return (delta_brightness * percent) + self.min_brightness - def calc_color_temp_kelvin(self, percent: float, is_sleep: bool) -> float: + def calc_color_temp_kelvin(self, percent: float) -> int: """Calculate the color temperature in Kelvin.""" - if is_sleep: - return self.sleep_color_temp if percent > 0: delta = self.max_color_temp - self.min_color_temp - return (delta * percent) + self.min_color_temp + ct = (delta * percent) + self.min_color_temp + return 5 * round(ct / 5) # round to nearest 5 return self.min_color_temp def get_settings( self, is_sleep, transition - ) -> Dict[str, Union[float, Tuple[float, float], Tuple[float, float, float]]]: + ) -> dict[str, float | int | tuple[float, float] | tuple[float, float, float]]: """Get all light settings. Calculating all values takes <0.5ms. """ - percent = self.calc_percent(transition) if transition is not None else self.calc_percent(0) - brightness_pct = self.calc_brightness_pct(percent, is_sleep) - color_temp_kelvin = self.calc_color_temp_kelvin(percent, is_sleep) - color_temp_mired: float = color_temperature_kelvin_to_mired(color_temp_kelvin) - rgb_color: Tuple[float, float, float] = color_temperature_to_rgb( - color_temp_kelvin + percent = ( + self.calc_percent(transition) + if transition is not None + else self.calc_percent(0) ) - xy_color: Tuple[float, float] = color_RGB_to_xy(*rgb_color) - hs_color: Tuple[float, float] = color_xy_to_hs(*xy_color) + brightness_pct = self.calc_brightness_pct(percent, is_sleep) + if is_sleep: + color_temp_kelvin = self.sleep_color_temp + rgb_color: tuple[float, float, float] = self.sleep_rgb_color + else: + color_temp_kelvin = self.calc_color_temp_kelvin(percent) + rgb_color: tuple[float, float, float] = color_temperature_to_rgb( + color_temp_kelvin + ) + xy_color: tuple[float, float] = color_RGB_to_xy(*rgb_color) + hs_color: tuple[float, float] = color_xy_to_hs(*xy_color) return { "brightness_pct": brightness_pct, "color_temp_kelvin": color_temp_kelvin, - "color_temp_mired": color_temp_mired, "rgb_color": rgb_color, "xy_color": xy_color, "hs_color": hs_color, @@ -1212,19 +1282,19 @@ def __init__(self, hass: HomeAssistant): self.lights = set() # Tracks 'light.turn_off' service calls - self.turn_off_event: Dict[str, Event] = {} + self.turn_off_event: dict[str, Event] = {} # Tracks 'light.turn_on' service calls - self.turn_on_event: Dict[str, Event] = {} + self.turn_on_event: dict[str, Event] = {} # Keep 'asyncio.sleep' tasks that can be cancelled by 'light.turn_on' events - self.sleep_tasks: Dict[str, asyncio.Task] = {} + self.sleep_tasks: dict[str, asyncio.Task] = {} # Tracks which lights are manually controlled - self.manual_control: Dict[str, bool] = {} + self.manual_control: dict[str, bool] = {} # Counts the number of times (in a row) a light had a changed state. - self.cnt_significant_changes: Dict[str, int] = defaultdict(int) + self.cnt_significant_changes: dict[str, int] = defaultdict(int) # Track 'state_changed' events of self.lights resulting from this integration - self.last_state_change: Dict[str, List[State]] = {} + self.last_state_change: dict[str, list[State]] = {} # Track last 'service_data' to 'light.turn_on' resulting from this integration - self.last_service_data: Dict[str, Dict[str, Any]] = {} + self.last_service_data: dict[str, dict[str, Any]] = {} # When a state is different `max_cnt_significant_changes` times in a row, # mark it as manually_controlled. @@ -1254,7 +1324,24 @@ async def turn_on_off_event_listener(self, event: Event) -> None: service = event.data[ATTR_SERVICE] service_data = event.data[ATTR_SERVICE_DATA] - entity_ids = cv.ensure_list_csv(service_data[ATTR_ENTITY_ID]) + if ATTR_ENTITY_ID in service_data: + entity_ids = cv.ensure_list_csv(service_data[ATTR_ENTITY_ID]) + elif ATTR_AREA_ID in service_data: + area_ids = cv.ensure_list_csv(service_data[ATTR_AREA_ID]) + entity_ids = [] + for area_id in area_ids: + area_entity_ids = area_entities(self.hass, area_id) + for entity_id in area_entity_ids: + if entity_id.startswith(LIGHT_DOMAIN): + entity_ids.append(entity_id) + _LOGGER.debug( + "Found entity_ids '%s' for area_id '%s'", entity_ids, area_id + ) + else: + _LOGGER.debug( + "No entity_ids or area_ids found in service_data: %s", service_data + ) + return if not any(eid in self.lights for eid in entity_ids): return @@ -1312,9 +1399,9 @@ async def state_changed_event_listener(self, event: Event) -> None: # settings the light will be later *or* the second event might indicate a # final state. The latter case happens for example when a light was # called with a color_temp outside of its range (and HA reports the - # incorrect 'min_mireds' and 'max_mireds', which happens e.g., for + # incorrect 'min_kelvin' and 'max_kelvin', which happens e.g., for # Philips Hue White GU10 Bluetooth lights). - old_state: Optional[List[State]] = self.last_state_change.get(entity_id) + old_state: list[State] | None = self.last_state_change.get(entity_id) if ( old_state is not None and old_state[0].context.id == new_state.context.id @@ -1386,7 +1473,7 @@ async def significant_change( """ if light not in self.last_state_change: return False - old_states: List[State] = self.last_state_change[light] + old_states: list[State] = self.last_state_change[light] await self.hass.helpers.entity_component.async_update_entity(light) new_state = self.hass.states.get(light) compare_to = functools.partial( @@ -1444,7 +1531,7 @@ async def significant_change( return changed async def maybe_cancel_adjusting( - self, entity_id: str, off_to_on_event: Event, on_to_off_event: Optional[Event] + self, entity_id: str, off_to_on_event: Event, on_to_off_event: Event | None ) -> bool: """Cancel the adjusting of a light if it has just been turned off. @@ -1471,6 +1558,11 @@ async def maybe_cancel_adjusting( transition = None turn_on_event = self.turn_on_event.get(entity_id) + if turn_on_event is None: + # This means that the light never got a 'turn_on' call that we + # registered. I am not 100% sure why this happens, but it does. + # This is a fix for #170 and #232. + return False id_turn_on = turn_on_event.context.id id_off_to_on = off_to_on_event.context.id diff --git a/custom_components/adaptive_lighting/translations/da.json b/custom_components/adaptive_lighting/translations/da.json index 2a881e5d3..5b63c115b 100644 --- a/custom_components/adaptive_lighting/translations/da.json +++ b/custom_components/adaptive_lighting/translations/da.json @@ -43,7 +43,8 @@ } }, "error": { - "option_error": "Ugyldig indstilling" + "option_error": "Ugyldig indstilling", + "entity_missing": "Et udvalgt lys blev ikke fundet " } } } diff --git a/custom_components/adaptive_lighting/translations/de.json b/custom_components/adaptive_lighting/translations/de.json index dae5af4ee..cc4271383 100644 --- a/custom_components/adaptive_lighting/translations/de.json +++ b/custom_components/adaptive_lighting/translations/de.json @@ -22,6 +22,7 @@ "data": { "lights": "Lichter", "initial_transition": "initial_transition, wenn Lichter von 'off' zu 'on' wechseln oder wenn 'sleep_state' wechselt", + "sleep_transition": "sleep_transition: Wenn 'sleep_state' sich ändert. (Sekunden)", "interval": "interval, Zeit zwischen Updates des Switches", "max_brightness": "max_brightness, maximale Helligkeit in %", "max_color_temp": "max_color_temp, maximale Farbtemperatur in Kelvin", @@ -29,21 +30,28 @@ "min_color_temp": "min_color_temp, minimale Farbtemperatur in Kelvin", "only_once": "only_once, passe die Lichter nur beim Einschalten an", "prefer_rgb_color": "prefer_rgb_color, nutze 'rgb_color' vor 'color_temp', wenn möglich", - "separate_turn_on_commands": "separate_turn_on_commands, for each attribute (color, brightness, etc.) in 'light.turn_on', required for some lights.", + "separate_turn_on_commands": "separate_turn_on_commands, für jedes Attribut (Farbe, Helligkeit usw.) in 'light.turn_on' werden separate Befehle gesendet. Wird für manche Leuchtmittel benötigt.", + "send_split_delay": "send_split_delay: Wartezeit zwischen dem Senden der Befehle (Millisekunden), wenn separate_turn_on_commands genutzt wird. Kann helfen, wenn die Leuchtmittel die separaten Befehle nicht korrekt umsetzen.", "sleep_brightness": "sleep_brightness, Schlafhelligkeit in %", - "sleep_color_temp": "sleep_color_temp, Schlaffarbtemperaturin Kelvin", - "sunrise_offset": "sunrise_offset, Sonnenaufgang Verschiebung in +/- seconds", + "sleep_rgb_or_color_temp": "sleep_rgb_or_color_temp, nutze 'rgb_color' oder 'color_temp'", + "sleep_rgb_color": "sleep_rgb_color, in RGB", + "sleep_color_temp": "sleep_color_temp, Schlaffarbtemperatur in Kelvin", + "sunrise_offset": "sunrise_offset, Sonnenaufgang Verschiebung in +/- Sekunden", "sunrise_time": "sunrise_time, Sonnenaufgangszeit in 'HH:MM:SS' Format (wenn 'None' wird die aktuelle Zeit des Sonnenaufgangs an deiner Position verwendet)", - "sunset_offset": "sunset_offset, Sonnenuntergang Verschiebung in +/- seconds", + "max_sunrise_time": "max_sunrise_time: Manuelles Überschreiben der max. sunrise_time. Falls 'None', wird die tatsächliche sunrise_time an deiner Position verwendet (HH:MM:SS)", + "sunset_offset": "sunset_offset, Sonnenuntergang Verschiebung in +/- Sekunden", "sunset_time": "sunset_time, Sonnenuntergangszeit in 'HH:MM:SS' Format (wenn 'None' wird die aktuelle Zeit des Sonnenuntergangs an deiner Position verwendet)", - "take_over_control": "take_over_control, wenn irgendetwas während ein Licht an ist außer Adaptive Lighting den Service 'light.turn_on' aufruft, stoppe die Anpassung des Lichtes (oder des Schalters) bis dieser wieder von off -> on geschaltet wird.", + "min_sunset_time": "min_sunset_time: Manuelles Überschreiben der min. sunset_time. Falls 'None', wird die tatsächliche sunset_time an deiner Position verwendet (HH:MM:SS)", + "take_over_control": "take_over_control, wenn irgendetwas während ein Licht an ist außer Adaptive Lighting den Service 'light.turn_on' aufruft, stoppe die Anpassung des Lichtes (oder des Schalters) bis dieser wieder von off -> on geschaltet wird.", "detect_non_ha_changes": "detect_non_ha_changes, entdeckt alle Änderungen über 10% am Licht (auch außerhalb von HA gemacht), 'take_over_control' muss aktiviert sein (ruft 'homeassistant.update_entity' jede 'interval' auf!)", - "transition": "transition, Wechselzeit in Sekunden" + "transition": "transition, Wechselzeit in Sekunden", + "adapt_delay": "adapt_delay: Wartezeit (in Sekunden) zwischen Anschalten des Licht und der Anpassung durch Adaptive Lights. Kann Flackern vermeiden." } } }, "error": { - "option_error": "Fehlerhafte Option" + "option_error": "Fehlerhafte Option", + "entity_missing": "Ein ausgewähltes Licht wurde nicht gefunden" } } -} \ No newline at end of file +} diff --git a/custom_components/adaptive_lighting/translations/en.json b/custom_components/adaptive_lighting/translations/en.json index cc32a7222..be556ec03 100644 --- a/custom_components/adaptive_lighting/translations/en.json +++ b/custom_components/adaptive_lighting/translations/en.json @@ -31,20 +31,27 @@ "only_once": "only_once: Only adapt the lights when turning them on.", "prefer_rgb_color": "prefer_rgb_color: Use 'rgb_color' rather than 'color_temp' when possible.", "separate_turn_on_commands": "separate_turn_on_commands: Separate the commands for each attribute (color, brightness, etc.) in 'light.turn_on' (required for some lights).", + "send_split_delay": "send_split_delay: wait between commands (milliseconds), when separate_turn_on_commands is used. May ensure that both commands are handled by the bulb correctly.", "sleep_brightness": "sleep_brightness, Brightness setting for Sleep Mode. (%)", + "sleep_rgb_or_color_temp": "sleep_rgb_or_color_temp, use 'rgb_color' or 'color_temp'", + "sleep_rgb_color": "sleep_rgb_color, in RGB", "sleep_color_temp": "sleep_color_temp: Color temperature setting for Sleep Mode. (Kelvin)", "sunrise_offset": "sunrise_offset: How long before(-) or after(+) to define the sunrise point of the cycle (+/- seconds)", "sunrise_time": "sunrise_time: Manual override of the sunrise time, if 'None', it uses the actual sunrise time at your location (HH:MM:SS)", + "max_sunrise_time": "max_sunrise_time: Manual override of the maximum sunrise time, if 'None', it uses the actual sunrise time at your location (HH:MM:SS)", "sunset_offset": "sunset_offset: How long before(-) or after(+) to define the sunset point of the cycle (+/- seconds)", "sunset_time": "sunset_time: Manual override of the sunset time, if 'None', it uses the actual sunrise time at your location (HH:MM:SS)", + "min_sunset_time": "min_sunset_time: Manual override of the minimum sunset time, if 'None', it uses the actual sunset time at your location (HH:MM:SS)", "take_over_control": "take_over_control: If anything but Adaptive Lighting calls 'light.turn_on' when a light is already on, stop adapting that light until it (or the switch) toggles off -> on.", "detect_non_ha_changes": "detect_non_ha_changes: detects all >10% changes made to the lights (also outside of HA), requires 'take_over_control' to be enabled (calls 'homeassistant.update_entity' every 'interval'!)", - "transition": "Transition time when applying a change to the lights (seconds)" + "transition": "Transition time when applying a change to the lights (seconds)", + "adapt_delay": "adapt_delay: wait time between light turn on (seconds), and Adaptive Lights applying changes to the light state. May avoid flickering." } } }, "error": { - "option_error": "Invalid option" + "option_error": "Invalid option", + "entity_missing": "One or more selected light entities are missing from Home Assistant" } } } diff --git a/custom_components/adaptive_lighting/translations/et.json b/custom_components/adaptive_lighting/translations/et.json index 7c9af5d29..b2599f2ab 100644 --- a/custom_components/adaptive_lighting/translations/et.json +++ b/custom_components/adaptive_lighting/translations/et.json @@ -43,7 +43,8 @@ } }, "error": { - "option_error": "Vigane suvand" + "option_error": "Vigane suvand", + "entity_missing": "Valitud valgust ei leitud" } } } diff --git a/custom_components/adaptive_lighting/translations/fr.json b/custom_components/adaptive_lighting/translations/fr.json new file mode 100644 index 000000000..a41d84a01 --- /dev/null +++ b/custom_components/adaptive_lighting/translations/fr.json @@ -0,0 +1,51 @@ +{ + "title": "Éclairage adaptatif", + "config": { + "step": { + "user": { + "title": "Choisissez un nom pour cette instance d'éclairage adaptatif", + "description": "Choisissez un nom pour cette instance. Vous pouvez configurer plusieurs instances d'éclairage adaptatif, chacune pouvant contrôler plusieurs lampes !", + "data": { + "name": "Nom" + } + } + }, + "abort": { + "already_configured": "Cet appareil est déjà configuré" + } + }, + "options": { + "step": { + "init": { + "title": "Options d'éclairage adaptatif", + "description": "Tous les paramètres de l'instance d'éclairage adaptatif. Les noms des options correspondent aux paramètres YAML. Aucune option n'est affichée si l'entrée adaptive_lighting est définie dans votre configuration YAML.", + "data": { + "lights": "lights : Les lampes à contrôler", + "initial_transition": "initial_transition : Transition (en secondes) lorsque l'état d'une lampe passe d'« éteinte » à « allumée ».", + "sleep_transition": "sleep_transition : Transition (en secondes) lorsque « sleep_state » est commuté.", + "interval": "interval : Temps (en secondes) entre deux mises à jour du commutateur.", + "max_brightness": "max_brightness : Luminosité maximale des lampes (en pourcentage) au cours d'un cycle.", + "max_color_temp": "max_color_temp : Couleur la plus froide (en kelvins) du cycle de température de couleur.", + "min_brightness": "min_brightness : Luminosité minimale des lampes (en pourcentage) au cours d'un cycle.", + "min_color_temp": "min_color_temp : Couleur la plus chaude (en kelvins) du cycle de température de couleur.", + "only_once": "only_once : Adapter les lampes uniquement au moment où elles sont allumées.", + "prefer_rgb_color": "prefer_rgb_color : Utiliser « rgb_color » plutôt que « color_temp » lorsque cela est possible.", + "separate_turn_on_commands": "separate_turn_on_commands : Séparer les commandes pour chaque attribut (couleur, luminosité, etc.) de « light.turn_on » (nécessaire pour certaines lampes).", + "sleep_brightness": "sleep_brightness : Luminosité (en pourcentage) du mode nuit.", + "sleep_color_temp": "sleep_color_temp : Température de couleur (en kelvins) du mode nuit.", + "sunrise_offset": "sunrise_offset : Décalage (en secondes [- : passé, + : futur]) du cycle par rapport au lever du soleil.", + "sunrise_time": "sunrise_time : Heure (HH:MM:SS) du lever du soleil. Si « None », utilise l'heure correspondant à votre emplacement.", + "sunset_offset": "sunset_offset : Décalage (en secondes [- : passé, + : futur]) du cycle par rapport au coucher du soleil.", + "sunset_time": "sunset_time : Heure (HH:MM:SS) du coucher du soleil. Si « None », utilise l'heure correspondant à votre emplacement.", + "take_over_control": "take_over_control : Si quelque chose d'autre que l'éclairage adaptatif appelle « light.turn_on » alors qu'une lampe est déjà allumée, cesser d'adapter cette lampe jusqu'à ce qu'elle (ou le commutateur) soit éteinte puis rallumée.", + "detect_non_ha_changes": "detect_non_ha_changes : Détecter tout changement de plus de 10 % appliqué aux lampes (même en dehors de HA). Nécessite que « take_over_control » soit activé. (Appelle « homeassistant.update_entity » tous les « interval » !)", + "transition": "transition : Durée de la transition (en secondes) des changements appliqués aux lampes." + } + } + }, + "error": { + "option_error": "Option non valide", + "entity_missing": "Une lumière sélectionnée n’a pas été trouvée" + } + } +} diff --git a/custom_components/adaptive_lighting/translations/it.json b/custom_components/adaptive_lighting/translations/it.json new file mode 100644 index 000000000..c1ae61634 --- /dev/null +++ b/custom_components/adaptive_lighting/translations/it.json @@ -0,0 +1,52 @@ +{ + "title": "Illuminazione Adattiva", + "config": { + "step": { + "user": { + "title": "Scegli un nome per l'istanza di Illuminazione Adattiva", + "description": "Scegli un nome per questa istanza. Puoi eseguire più istanze di Illuminazione adattiva, ognuna delle quali può contenere più luci!", + "data": { + "name": "Nome" + } + } + }, + "abort": { + "already_configured": "Questo dispositivo è già stato configurato" + } + }, + "options": { + "step": { + "init": { + "title": "Opzioni Illuminazione Adattiva", + "description": "Tutte le opzioni per il componente Illuminazione Adattiva. I nomi delle opzioni corrispondono con le impostazioni YAML. Non sono mostrate opzioni se hai la voce adaptive-lighting definita nella tua configurazione YAML.", + "data": { + "lights": "luci", + "initial_transition": "initial_transition: Quando le luci vengono accese (off -> on). (secondi)", + "sleep_transition": "sleep_transition: Quando 'sleep_state' cambia. (secondi)", + "interval": "interval: Tempo tra i cambiamenti dello switch. (secondi)", + "max_brightness": "max_brightness: Luminosità massima delle luci durante un ciclo. (%)", + "max_color_temp": "max_color_temp: Gradazione più fredda del ciclo di temperatura del colore. (Kelvin)", + "min_brightness": "min_brightness: Luminosità minima delle luci durante un ciclo. (%)", + "min_color_temp": "min_color_temp: Gradazione più calda del ciclo di temperatura del colore. (Kelvin)", + "only_once": "only_once: Adatta le luci solo quando vengono accese.", + "prefer_rgb_color": "prefer_rgb_color: Usa 'rgb_color' al posto di 'color_temp' quando possibile.", + "separate_turn_on_commands": "separate_turn_on_commands: Separa i comandi per ogni attributo (color, brightness, etc.) in 'light.turn_on' (richiesto per alcune luci).", + "sleep_brightness": "sleep_brightness: Impostazione della luminosità per la modalità notturna. (%)", + "sleep_color_temp": "sleep_color_temp: Impostazione della temperatura colore per la modalità notturna. (Kelvin)", + "sunrise_offset": "sunrise_offset: Imposta quanto anticipare(-) o ritardare(+) l'alba nel ciclo (+/- secondi)", + "sunrise_time": "sunrise_time: Imposta manualmente l'ora dell'alba, se 'None', usa l'ora effettiva dell'alba alla tua posizione (HH:MM:SS)", + "sunset_offset": "sunset_offset: Imposta quanto anticipare(-) o ritardare(+) il tramonto nel ciclo (+/- secondi)", + "sunset_time": "sunset_time: Imposta manualmente l'ora del tramonto, se 'None', usa l'ora effettiva del tramonto alla tua posizione (HH:MM:SS)", + "take_over_control": "take_over_control: Se viene chiamato il servizio 'lights.turn_on' (non da Illuminazione Adattiva) quando una luce è già accesa, interrompi l'adattamento della luce finquando essa o l'interruttore non vengono riaccesi (off -> on.)", + "detect_non_ha_changes": "detect_non_ha_changes: rileva tutti i cambiamenti >10% applicati alle luci (anche fuori da HA), richiede che 'take_over_control' sia abilitato (chiama 'homeassistant.update_entity' ad ogni 'intervallo'!)", + "transition": "Tempo di transizione quando viene applicata una modifica alle luci (secondi)", + "adapt_delay": "Tempo di attesa tra l'accensione della luce, e Illuminazione Adattiva che applica le modifiche allo stato della luce. Potrebbe evitare sfarfallii." + } + } + }, + "error": { + "option_error": "Opzione non valida", + "entity_missing": "Non è stata trovata una luce selezionata" + } + } + } diff --git a/custom_components/adaptive_lighting/translations/nb.json b/custom_components/adaptive_lighting/translations/nb.json index 2abeae9b1..7cfba678f 100644 --- a/custom_components/adaptive_lighting/translations/nb.json +++ b/custom_components/adaptive_lighting/translations/nb.json @@ -43,7 +43,8 @@ } }, "error":{ - "option_error":"En eller flere valgte innstillinger er ugyldige" + "option_error":"En eller flere valgte innstillinger er ugyldige", + "entity_missing": "Et utvalgt lys ble ikke funnet" } } } diff --git a/custom_components/adaptive_lighting/translations/nl.json b/custom_components/adaptive_lighting/translations/nl.json new file mode 100644 index 000000000..a0b6b0829 --- /dev/null +++ b/custom_components/adaptive_lighting/translations/nl.json @@ -0,0 +1,57 @@ +{ + "title": "Adaptieve verlichting", + "config": { + "step": { + "user": { + "title": "Kies een naam voor de adaptieve verlichting integratie", + "description": "Kies een naam voor deze integratie. U kunt verschillende integratie van Adaptieve verlichting uitvoeren, elk van deze kan meerdere lichten bevatten!", + "data": { + "name": "Naam" + } + } + }, + "abort": { + "already_configured": "Dit apparaat is al geconfigureerd" + } + }, + "options": { + "step": { + "init": { + "title": "Adaptieve verlichting instellingen", + "description": "Alle instellingen voor een Adaptieve verlichting component. De optienamen komen overeen met de YAML-instellingen. Er worden geen opties weergegeven als u het item adaptive_lighting hebt gedefinieerd in uw YAML-configuratie.", + "data": { + "lights": "Lichten", + "initial_transition": "initial_transition: Wanneer lichten van 'uit' naar 'aan' gaan. (seconden)", + "sleep_transition": "sleep_transition: Wanneer 'sleep_state' verandert. (seconden)", + "interval": "interval: Tijd tussen switch-updates. (seconden)", + "max_brightness": "max_brightness: Hoogste helderheid van lichten tijdens een cyclus. (%)", + "max_color_temp": "max_color_temp: Koudste tint van de kleurtemperatuurcyclus. (kelvin)", + "min_brightness": "min_brightness: Laagste helderheid van lichten tijdens een cyclus. (%)", + "min_color_temp": "min_color_temp, Warmste tint van de kleurtemperatuurcyclus. (kelvin)", + "only_once": "only_once: pas de verlichting alleen aan wanneer u ze aanzet.", + "prefer_rgb_color": "prefer_rgb_color: Gebruik waar mogelijk 'rgb_color' in plaats van 'color_temp'.", + "separate_turn_on_commands": "separate_turn_on_commands: Scheid de commando's voor elk attribuut (kleur, helderheid, enz.) in 'light.turn_on' (vereist voor sommige lampen).", + "send_split_delay": "send_split_delay: wacht tussen commando's (milliseconden), wanneer separate_turn_on_commands wordt gebruikt. Kan ervoor zorgen dat beide commando's correct door de lamp worden afgehandeld.", + "sleep_brightness": "sleep_brightness, helderheidsinstelling voor slaapstand. (%)", + "sleep_rgb_or_color_temp": "sleep_rgb_or_color_temp, gebruik 'rgb_color' of 'color_temp'", + "sleep_rgb_color": "sleep_rgb_color, in RGB", + "sleep_color_temp": "sleep_color_temp: Kleurtemperatuurinstelling voor slaapstand. (kelvin)", + "sunrise_offset": "sunrise_offset: Hoe lang voor(-) of na(+) zonsopgang uitvoeren (+/- seconden)", + "sunrise_time": "sunrise_time: Handmatige wijziging van de zonsopgangstijd, indien 'Geen', wordt de werkelijke zonsopgangstijd op uw locatie gebruikt (UU:MM:SS)", + "max_sunrise_time": "max_sunrise_time: handmatige aanpassing van de maximale zonsopgangstijd, indien 'Geen', wordt de werkelijke zonsopgangstijd op uw locatie gebruikt (UU:MM:SS)", + "sunset_offset": "sunset_offset: Hoe lang voor(-) of na(+) zonsondergang uitvoeren (+/- seconden)", + "sunset_time": "sunset_time: handmatige onderdrukking van de zonsondergangstijd, indien 'Geen', wordt de werkelijke zonsopgangstijd op uw locatie gebruikt (UU:MM:SS)", + "min_sunset_time": "min_sunset_time: handmatige onderdrukking van de minimale zonsondergangstijd, indien 'Geen', wordt de werkelijke zonsondergangstijd op uw locatie gebruikt (UU:MM:SS)", + "take_over_control": "take_over_control: Als iets anders dan Adaptive Lighting 'light.turn_on' roept wanneer een lamp al aan is, stop dan met het aanpassen van het licht totdat het (of de schakelaar) uit -> aan gaat.", + "detect_non_ha_changes": "detect_non_ha_changes: detecteert alle >10% wijzigingen aan de lichten (ook buiten HA), vereist dat 'take_over_control' is ingeschakeld (heet 'homeassistant.update_entity' elke 'interval'!)", + "transition": "Overgangstijd bij het aanbrengen van een wijziging op de lichten (seconden)", + "adapt_delay": "adapt_delay: wachttijd tussen het inschakelen van het licht (seconden) en het aanbrengen van wijzigingen in de lichtstatus door Adaptieve verlichting. Kan flikkering voorkomen." + } + } + }, + "error": { + "option_error": "Ongeldige optie", + "entity_missing": "Een of meer geselecteerde lichtentiteiten ontbreken in Home Assistant" + } + } +} diff --git a/custom_components/adaptive_lighting/translations/pl.json b/custom_components/adaptive_lighting/translations/pl.json new file mode 100644 index 000000000..80cc8fdd4 --- /dev/null +++ b/custom_components/adaptive_lighting/translations/pl.json @@ -0,0 +1,51 @@ +{ + "title": "Adaptacyjne oświetlenie", + "config": { + "step": { + "user": { + "title": "Wybierz nazwę grupy dla Adaptacyjnego oświetlenia", + "description": "Wybierz nazwę dla grupy. Możesz użyć wiele grup Adaptacyjnego oświetlenia, każda może mieć dowolną konfigurację świateł!", + "data": { + "name": "Nazwa" + } + } + }, + "abort": { + "already_configured": "Już skonfigurowane!" + } + }, + "options": { + "step": { + "init": { + "title": "Adaptacyjne oświetlenie opcje", + "description": "Wszystkie ustawienia dla Adaptacyjnego oświetlenia. Nazwy opcji odpowiadają ustawieniom YAML. Żadne opcje nie są wyświetlane, jeśli masz wpis adaptive_lighting zdefiniowany w konfiguracji YAML.", + "data": { + "lights": "światła", + "initial_transition": "initial_transition: When lights turn 'off' to 'on'. (sekund)", + "sleep_transition": "sleep_transition: When 'sleep_state' changes. (sekund)", + "interval": "interval: Time between switch updates. (sekund)", + "max_brightness": "max_brightness: Highest brightness of lights during a cycle. (%)", + "max_color_temp": "max_color_temp: Coldest hue of the color temperature cycle. (Kelvin)", + "min_brightness": "min_brightness: Lowest brightness of lights during a cycle. (%)", + "min_color_temp": "min_color_temp, Warmest hue of the color temperature cycle. (Kelvin)", + "only_once": "only_once: Only adapt the lights when turning them on.", + "prefer_rgb_color": "prefer_rgb_color: Use 'rgb_color' rather than 'color_temp' when possible.", + "separate_turn_on_commands": "separate_turn_on_commands: Separate the commands for each attribute (color, brightness, etc.) in 'light.turn_on' (required for some lights).", + "sleep_brightness": "sleep_brightness, Brightness setting for Sleep Mode. (%)", + "sleep_color_temp": "sleep_color_temp: Color temperature setting for Sleep Mode. (Kelvin)", + "sunrise_offset": "sunrise_offset: How long before(-) or after(+) to define the sunrise point of the cycle (+/- sekund)", + "sunrise_time": "sunrise_time: Manual override of the sunrise time, if 'None', it uses the actual sunrise time at your location (HH:MM:SS)", + "sunset_offset": "sunset_offset: How long before(-) or after(+) to define the sunset point of the cycle (+/- sekund)", + "sunset_time": "sunset_time: Manual override of the sunset time, if 'None', it uses the actual sunrise time at your location (HH:MM:SS)", + "take_over_control": "take_over_control: If anything but Adaptive Lighting calls 'light.turn_on' when a light is already on, stop adapting that light until it (or the switch) toggles off -> on.", + "detect_non_ha_changes": "detect_non_ha_changes: detects all >10% changes made to the lights (also outside of HA), requires 'take_over_control' to be enabled (calls 'homeassistant.update_entity' every 'interval'!)", + "transition": "Transition time when applying a change to the lights (sekund)" + } + } + }, + "error": { + "option_error": "Błędne opcje", + "entity_missing": "Nie znaleziono wybranego światła" + } + } +} diff --git a/custom_components/adaptive_lighting/translations/pt-BR.json b/custom_components/adaptive_lighting/translations/pt-BR.json new file mode 100644 index 000000000..43eacb01a --- /dev/null +++ b/custom_components/adaptive_lighting/translations/pt-BR.json @@ -0,0 +1,51 @@ +{ + "title": "Iluminação Adaptativa", + "config": { + "step": { + "user": { + "title": "Escolha um nome para a instância da Iluminação Adaptativa", + "description": "Escolha um nome para esta instância. Você pode executar várias instâncias de iluminação adaptativa, cada uma delas pode conter várias luzes!", + "data": { + "name": "Nome" + } + } + }, + "abort": { + "already_configured": "Este dispositivo já está configurado" + } + }, + "options": { + "step": { + "init": { + "title": "Opções da iluminação adaptiva", + "description": "Todas as configurações de um componente de iluminação adaptativa. Os nomes das opções correspondem às configurações de YAML. Nenhuma opção será exibida se você tiver a entrada adaptive_lighting definida em sua configuração YAML.", + "data": { + "lights": "luzes", + "initial_transition": "initial_transition: Quando as luzes mudam de 'off' para 'on'. (segundos)", + "sleep_transition": "sleep_transition: Quando 'sleep_state' muda. (segundos)", + "interval": "interval: Tempo entre as atualizações do switch. (segundos)", + "max_brightness": "max_brightness: Maior brilho das luzes durante um ciclo. (%)", + "max_color_temp": "max_color_temp: Matiz mais frio do ciclo de temperatura de cor. (Kelvin)", + "min_brightness": "min_brightness: Menor brilho das luzes durante um ciclo. (%)", + "min_color_temp": "min_color_temp, matiz mais quente do ciclo de temperatura de cor. (Kelvin)", + "only_once": "only_once: Apenas adapte as luzes ao ligá-las.", + "prefer_rgb_color": "prefer_rgb_color: Use 'rgb_color' em vez de 'color_temp' quando possível.", + "separate_turn_on_commands": "separar_turn_on_commands: Separe os comandos para cada atributo (cor, brilho, etc.) em 'light.turn_on' (necessário para algumas luzes).", + "sleep_brightness": "sleep_brightness, configuração de brilho para o modo de suspensão. (%)", + "sleep_color_temp": "sleep_color_temp: configuração de temperatura de cor para o modo de suspensão. (Kelvin)", + "sunrise_offset": "sunrise_offset: Quanto tempo antes (-) ou depois (+) para definir o ponto do nascer do sol do ciclo (+/- segundos)", + "sunrise_time": "sunrise_time: substituição manual do horário do nascer do sol, se 'Nenhum', ele usa o horário real do nascer do sol em sua localização (HH:MM:SS)", + "sunset_offset": "Sunset_offset: Quanto tempo antes (-) ou depois (+) para definir o ponto de pôr do sol do ciclo (+/- segundos)", + "sunset_time": "sunset_time: substituição manual do horário do pôr do sol, se 'Nenhum', ele usa o horário real do nascer do sol em sua localização (HH:MM:SS)", + "take_over_control": "take_over_control: Se qualquer coisa, exceto Adaptive Lighting, chamar 'light.turn_on' quando uma luz já estiver acesa, pare de adaptar essa luz até que ela (ou o interruptor) desligue -> ligue.", + "detect_non_ha_changes": "detect_non_ha_changes: detecta todas as alterações > 10% feitas nas luzes (também fora do HA), requer que 'take_over_control' seja ativado (chama 'homeassistant.update_entity' a cada 'intervalo'!)", + "transition": "Tempo de transição ao aplicar uma mudança nas luzes (segundos)" + } + } + }, + "error": { + "option_error": "Opção inválida", + "entity_missing": "Uma luz selecionada não foi encontrada" + } + } +} diff --git a/custom_components/adaptive_lighting/translations/ru.json b/custom_components/adaptive_lighting/translations/ru.json new file mode 100644 index 000000000..2e160f9e4 --- /dev/null +++ b/custom_components/adaptive_lighting/translations/ru.json @@ -0,0 +1,52 @@ +{ + "title": "Adaptive Lighting", + "config": { + "step": { + "user": { + "title": "Выберите имя для экземпляра Adaptive Lighting", + "description": "Выберите имя для этого экземпляра. Вы можете запустить несколько экземпляров Adaptive Lighting, каждый из которых может содержать несколько источников света!", + "data": { + "name": "Имя" + } + } + }, + "abort": { + "already_configured": "Это устройство уже настроено" + } + }, + "options": { + "step": { + "init": { + "title": "Настройки Adaptive Lighting", + "description": "Все настройки компонента Adaptive Lighting. Названия опций соответствуют настройкам в YAML. Параметры не отображаются, если в конфигурации YAML определена запись adaptive_lighting.", + "data": { + "lights": "Осветительные приборы", + "initial_transition": "initial_transition: Начальный переход, когда свет переключается с 'off' на 'on'. (секунды)", + "sleep_transition": "sleep_transition: Когда прибор переходит в Режима Сна (Sleep Mode) и 'sleep_state' изменяется. (секунды)", + "interval": "interval: Интервал между обновлениями переключателя. (секунды)", + "max_brightness": "max_brightness: Максимальная яркость света во время цикла. (%)", + "max_color_temp": "max_color_temp: Самый холодный оттенок цветовой температуры во время цикла. (Kelvin)", + "min_brightness": "min_brightness: Минимальная яркость света во время цикла. (%)", + "min_color_temp": "min_color_temp: Самый теплый оттенок цветовой температуры во время цикла. (Kelvin)", + "only_once": "only_once: Адаптировать свет только при включении.", + "prefer_rgb_color": "prefer_rgb_color: По возможности использовать 'rgb_color' вместо 'color_temp'.", + "separate_turn_on_commands": "separate_turn_on_commands: Раздельные команды для каждого атрибута (цвет, яркость и т.д.) в 'light.turn_on' (требуется для некоторых источников света).", + "sleep_brightness": "sleep_brightness: Настройка яркости для Режима Сна (Sleep Mode). (%)", + "sleep_color_temp": "sleep_color_temp: Настройка цветовой температуры для Режима Сна (Sleep Mode). (Kelvin)", + "sunrise_offset": "sunrise_offset: За сколько времени до (-) или после (+) переопределить время восхода во время цикла. (+/- секунды)", + "sunrise_time": "sunrise_time: Ручное изменение времени восхода солнца, если указано 'None', используется фактическое время восхода в Вашем местоположении. (ЧЧ:ММ:СС)", + "sunset_offset": "sunset_offset: За сколько времени до (-) или после (+) переопределить время заката во время цикла. (+/- секунды)", + "sunset_time": "sunset_time: Ручное изменение времени заката солнца, если указано 'None', используется фактическое время заката в Вашем местоположении. (ЧЧ:ММ:СС)", + "take_over_control": "take_over_control: Если что-либо, кроме Adaptive Lighting, вызывает службу 'light.turn_on', когда свет уже включен, прекратить адаптацию этого осветительного прибора, пока он (или переключатель) не переключится off -> on.", + "detect_non_ha_changes": "detect_non_ha_changes: Обнаруживает все изменения на >10% примененные к освещению (также и из-за пределов Home Assistant), требует включения 'take_over_control' (вызывает 'homeassistant.update_entity' каждый 'interval'!)", + "transition": "Время перехода при применении изменения к источникам света. (секунды)", + "adapt_delay": "Время ожидания между включением света и применением адаптации. Может помочь избежать мерцания. (секунды)" + } + } + }, + "error": { + "option_error": "Ошибка в настройках!", + "entity_missing": "Выбранный индикатор не найден" + } + } +} diff --git a/custom_components/adaptive_lighting/translations/sv.json b/custom_components/adaptive_lighting/translations/sv.json index 8c9c4bf7f..2239ad3bf 100644 --- a/custom_components/adaptive_lighting/translations/sv.json +++ b/custom_components/adaptive_lighting/translations/sv.json @@ -46,7 +46,8 @@ } }, "error": { - "option_error": "Ogiltlig inställning" + "option_error": "Ogiltlig inställning", + "entity_missing": "Ett valt ljus hittades inte" } } } diff --git a/custom_components/adaptive_lighting/translations/uk.json b/custom_components/adaptive_lighting/translations/uk.json index c71d5e630..90265f2e4 100644 --- a/custom_components/adaptive_lighting/translations/uk.json +++ b/custom_components/adaptive_lighting/translations/uk.json @@ -43,7 +43,8 @@ } }, "error": { - "option_error": "Хибна опція" + "option_error": "Хибна опція", + "entity_missing": "Вибраного світла в домашньому помічнику не знайшли" } } } diff --git a/custom_components/alexa_media/__init__.py b/custom_components/alexa_media/__init__.py index a02027ea6..bd321dda2 100644 --- a/custom_components/alexa_media/__init__.py +++ b/custom_components/alexa_media/__init__.py @@ -263,6 +263,7 @@ async def login_success(event=None) -> None: "switch": {}, "guard": [], "light": [], + "binary_sensor": [], "temperature": [], }, "entities": { @@ -270,6 +271,7 @@ async def login_success(event=None) -> None: "switch": {}, "sensor": {}, "light": [], + "binary_sensor": [], "alarm_control_panel": {}, }, "excluded": {}, @@ -401,6 +403,10 @@ async def async_update_data() -> Optional[AlexaEntityData]: if light.enabled: entities_to_monitor.add(light.alexa_entity_id) + for binary_sensor in hass.data[DATA_ALEXAMEDIA]["accounts"][email]["entities"]["binary_sensor"]: + if binary_sensor.enabled: + entities_to_monitor.add(binary_sensor.alexa_entity_id) + for guard in hass.data[DATA_ALEXAMEDIA]["accounts"][email]["entities"][ "alarm_control_panel" ].values(): @@ -662,40 +668,41 @@ async def process_notifications(login_obj, raw_notifications=None): "notifications", {} ) notifications = {"process_timestamp": dt.utcnow()} - for notification in raw_notifications: - n_dev_id = notification.get("deviceSerialNumber") - if n_dev_id is None: - # skip notifications untied to a device for now - # https://github.com/custom-components/alexa_media_player/issues/633#issuecomment-610705651 - continue - n_type = notification.get("type") - if n_type is None: - continue - if n_type == "MusicAlarm": - n_type = "Alarm" - n_id = notification["notificationIndex"] - if n_type == "Alarm": - n_date = notification.get("originalDate") - n_time = notification.get("originalTime") - notification["date_time"] = ( - f"{n_date} {n_time}" if n_date and n_time else None - ) - previous_alarm = previous.get(n_dev_id, {}).get("Alarm", {}).get(n_id) - if previous_alarm and alarm_just_dismissed( - notification, - previous_alarm.get("status"), - previous_alarm.get("version"), - ): - hass.bus.async_fire( - "alexa_media_alarm_dismissal_event", - event_data={"device": {"id": n_dev_id}, "event": notification}, + if raw_notifications is not None: + for notification in raw_notifications: + n_dev_id = notification.get("deviceSerialNumber") + if n_dev_id is None: + # skip notifications untied to a device for now + # https://github.com/custom-components/alexa_media_player/issues/633#issuecomment-610705651 + continue + n_type = notification.get("type") + if n_type is None: + continue + if n_type == "MusicAlarm": + n_type = "Alarm" + n_id = notification["notificationIndex"] + if n_type == "Alarm": + n_date = notification.get("originalDate") + n_time = notification.get("originalTime") + notification["date_time"] = ( + f"{n_date} {n_time}" if n_date and n_time else None ) + previous_alarm = previous.get(n_dev_id, {}).get("Alarm", {}).get(n_id) + if previous_alarm and alarm_just_dismissed( + notification, + previous_alarm.get("status"), + previous_alarm.get("version"), + ): + hass.bus.async_fire( + "alexa_media_alarm_dismissal_event", + event_data={"device": {"id": n_dev_id}, "event": notification}, + ) - if n_dev_id not in notifications: - notifications[n_dev_id] = {} - if n_type not in notifications[n_dev_id]: - notifications[n_dev_id][n_type] = {} - notifications[n_dev_id][n_type][n_id] = notification + if n_dev_id not in notifications: + notifications[n_dev_id] = {} + if n_type not in notifications[n_dev_id]: + notifications[n_dev_id][n_type] = {} + notifications[n_dev_id][n_type][n_id] = notification hass.data[DATA_ALEXAMEDIA]["accounts"][email]["notifications"] = notifications _LOGGER.debug( "%s: Updated %s notifications for %s devices at %s", @@ -758,7 +765,7 @@ async def update_bluetooth_state(login_obj, device_serial): "media_player" ][device_serial] - if "bluetoothStates" in bluetooth: + if bluetooth is not None and "bluetoothStates" in bluetooth: for b_state in bluetooth["bluetoothStates"]: if device_serial == b_state["deviceSerialNumber"]: # _LOGGER.debug("%s: setting value for: %s to %s", @@ -781,7 +788,7 @@ async def update_dnd_state(login_obj) -> None: """Update the dnd state on ws dnd combo event.""" dnd = await AlexaAPI.get_dnd_state(login_obj) - if "doNotDisturbDeviceStatusList" in dnd: + if dnd is not None and "doNotDisturbDeviceStatusList" in dnd: async_dispatcher_send( hass, f"{DOMAIN}_{hide_email(email)}"[0:32], diff --git a/custom_components/alexa_media/alexa_entity.py b/custom_components/alexa_media/alexa_entity.py index a028902c5..d86e835b8 100644 --- a/custom_components/alexa_media/alexa_entity.py +++ b/custom_components/alexa_media/alexa_entity.py @@ -94,10 +94,17 @@ def is_light(appliance: Dict[Text, Any]) -> bool: """Is the given appliance a light controlled locally by an Echo.""" return ( is_local(appliance) - and "LIGHT" in appliance["applianceTypes"] + and "LIGHT" in appliance.get("applianceTypes", []) and has_capability(appliance, "Alexa.PowerController", "powerState") ) +def is_contact_sensor(appliance: Dict[Text, Any]) -> bool: + """Is the given appliance a contact sensor controlled locally by an Echo.""" + return ( + is_local(appliance) + and "CONTACT_SENSOR" in appliance.get("applianceTypes", []) + and has_capability(appliance, "Alexa.ContactSensor", "detectionState") + ) def get_friendliest_name(appliance: Dict[Text, Any]) -> Text: """Find the best friendly name. Alexa seems to store manual renames in aliases. Prefer that one.""" @@ -140,6 +147,11 @@ class AlexaTemperatureEntity(AlexaEntity): device_serial: Text +class AlexaBinaryEntity(AlexaEntity): + """Class for AlexaBinaryEntity.""" + + battery_level: bool + class AlexaEntities(TypedDict): """Class for holding entities.""" @@ -147,6 +159,7 @@ class AlexaEntities(TypedDict): light: List[AlexaLightEntity] guard: List[AlexaEntity] temperature: List[AlexaTemperatureEntity] + binary_sensor: List[AlexaBinaryEntity] def parse_alexa_entities(network_details: Optional[Dict[Text, Any]]) -> AlexaEntities: @@ -154,6 +167,7 @@ def parse_alexa_entities(network_details: Optional[Dict[Text, Any]]) -> AlexaEnt lights = [] guards = [] temperature_sensors = [] + contact_sensors = [] location_details = network_details["locationDetails"]["locationDetails"] for location in location_details.values(): amazon_bridge_details = location["amazonBridgeDetails"]["amazonBridgeDetails"] @@ -187,8 +201,15 @@ def parse_alexa_entities(network_details: Optional[Dict[Text, Any]]) -> AlexaEnt "colorTemperatureInKelvin", ) lights.append(processed_appliance) + elif is_contact_sensor(appliance): + processed_appliance["battery_level"] = has_capability( + appliance, "Alexa.BatteryLevelSensor", "batteryLevel" + ) + contact_sensors.append(processed_appliance) + else: + _LOGGER.debug("Found unsupported device %s", appliance) - return {"light": lights, "guard": guards, "temperature": temperature_sensors} + return {"light": lights, "guard": guards, "temperature": temperature_sensors, "binary_sensor": contact_sensors} class AlexaCapabilityState(TypedDict): @@ -286,6 +307,14 @@ def parse_guard_state_from_coordinator( ) +def parse_detection_state_from_coordinator( + coordinator: DataUpdateCoordinator, entity_id: Text +) -> Optional[bool]: + """Get the detection state from the coordinator data.""" + return parse_value_from_coordinator( + coordinator, entity_id, "Alexa.ContactSensor", "detectionState" + ) + def parse_value_from_coordinator( coordinator: DataUpdateCoordinator, entity_id: Text, diff --git a/custom_components/alexa_media/binary_sensor.py b/custom_components/alexa_media/binary_sensor.py new file mode 100644 index 000000000..45e545b50 --- /dev/null +++ b/custom_components/alexa_media/binary_sensor.py @@ -0,0 +1,109 @@ +""" +Alexa Devices Sensors. + +SPDX-License-Identifier: Apache-2.0 + +For more details about this platform, please refer to the documentation at +https://community.home-assistant.io/t/echo-devices-alexa-as-media-player-testers-needed/58639 +""" + +import logging +from typing import List # noqa pylint: disable=unused-import + +from alexapy import hide_serial +from homeassistant.components.binary_sensor import ( + BinarySensorDeviceClass, + BinarySensorEntity, +) +from homeassistant.helpers.update_coordinator import CoordinatorEntity + +from . import ( + CONF_EMAIL, + CONF_EXCLUDE_DEVICES, + CONF_INCLUDE_DEVICES, + DATA_ALEXAMEDIA, + hide_email, +) +from .alexa_entity import parse_detection_state_from_coordinator +from .const import CONF_EXTENDED_ENTITY_DISCOVERY +from .helpers import add_devices + +_LOGGER = logging.getLogger(__name__) + +async def async_setup_platform(hass, config, add_devices_callback, discovery_info=None): + """Set up the Alexa sensor platform.""" + devices: List[BinarySensorEntity] = [] + account = config[CONF_EMAIL] if config else discovery_info["config"][CONF_EMAIL] + account_dict = hass.data[DATA_ALEXAMEDIA]["accounts"][account] + include_filter = config.get(CONF_INCLUDE_DEVICES, []) + exclude_filter = config.get(CONF_EXCLUDE_DEVICES, []) + coordinator = account_dict["coordinator"] + binary_entities = account_dict.get("devices", {}).get("binary_sensor", []) + if binary_entities and account_dict["options"].get(CONF_EXTENDED_ENTITY_DISCOVERY): + for be in binary_entities: + _LOGGER.debug( + "Creating entity %s for a binary_sensor with name %s", + hide_serial(be["id"]), + be["name"], + ) + contact_sensor = AlexaContact(coordinator, be) + account_dict["entities"]["binary_sensor"].append(contact_sensor) + devices.append(contact_sensor) + + return await add_devices( + hide_email(account), + devices, + add_devices_callback, + include_filter, + exclude_filter, + ) + + +async def async_setup_entry(hass, config_entry, async_add_devices): + """Set up the Alexa sensor platform by config_entry.""" + return await async_setup_platform( + hass, config_entry.data, async_add_devices, discovery_info=None + ) + + +async def async_unload_entry(hass, entry) -> bool: + """Unload a config entry.""" + account = entry.data[CONF_EMAIL] + account_dict = hass.data[DATA_ALEXAMEDIA]["accounts"][account] + _LOGGER.debug("Attempting to unload binary sensors") + for binary_sensor in account_dict["entities"]["binary_sensor"]: + await binary_sensor.async_remove() + return True + +class AlexaContact(CoordinatorEntity, BinarySensorEntity): + """A contact sensor controlled by an Echo.""" + + _attr_device_class = BinarySensorDeviceClass.DOOR + + def __init__(self, coordinator, details): + super().__init__(coordinator) + self.alexa_entity_id = details["id"] + self._name = details["name"] + + @property + def name(self): + return self._name + + @property + def unique_id(self): + return self.alexa_entity_id + + @property + def is_on(self): + detection = parse_detection_state_from_coordinator( + self.coordinator, self.alexa_entity_id + ) + + return detection == 'DETECTED' if detection is not None else None + + @property + def assumed_state(self) -> bool: + last_refresh_success = ( + self.coordinator.data and self.alexa_entity_id in self.coordinator.data + ) + return not last_refresh_success diff --git a/custom_components/alexa_media/config_flow.py b/custom_components/alexa_media/config_flow.py index 9ce66dbd6..cde4da2f3 100644 --- a/custom_components/alexa_media/config_flow.py +++ b/custom_components/alexa_media/config_flow.py @@ -14,7 +14,7 @@ import logging from typing import Any, Dict, List, Optional, Text -from aiohttp import ClientConnectionError, ClientSession, web, web_response +from aiohttp import ClientConnectionError, ClientSession, InvalidURL, web, web_response from aiohttp.web_exceptions import HTTPBadRequest from alexapy import ( AlexaLogin, @@ -50,6 +50,7 @@ CONF_INCLUDE_DEVICES, CONF_OAUTH, CONF_OTPSECRET, + CONF_PROXY_WARNING, CONF_QUEUE_DELAY, CONF_SECURITYCODE, CONF_TOTP_REGISTER, @@ -123,6 +124,9 @@ def __init__(self): self.totp_register = OrderedDict( [(vol.Optional(CONF_TOTP_REGISTER, default=False), bool)] ) + self.proxy_warning = OrderedDict( + [(vol.Optional(CONF_PROXY_WARNING, default=False), bool)] + ) async def async_step_import(self, import_config): """Import a config entry from configuration.yaml.""" @@ -241,28 +245,44 @@ async def async_step_user(self, user_input=None): description_placeholders={"message": ""}, ) hass_url: str = user_input.get(CONF_HASS_URL) + if hass_url is None: + try: + hass_url = get_url(self.hass, prefer_external=True) + except NoURLAvailableError: + _LOGGER.debug( + "No Home Assistant URL found in config or detected; forcing user form" + ) + return self.async_show_form( + step_id="user", + data_schema=vol.Schema(self.proxy_schema), + description_placeholders={"message": ""}, + ) hass_url_valid: bool = False + hass_url_error: str = "" async with ClientSession() as session: try: async with session.get(hass_url) as resp: hass_url_valid = resp.status == 200 - except ClientConnectionError: + except (ClientConnectionError) as err: hass_url_valid = False + hass_url_error = str(err) + except (InvalidURL) as err: + hass_url_valid = False + hass_url_error = str(err.__cause__) if not hass_url_valid: _LOGGER.debug( "Unable to connect to provided Home Assistant url: %s", hass_url ) return self.async_show_form( - step_id="user", - errors={"base": "hass_url_invalid"}, - description_placeholders={"message": ""}, + step_id="proxy_warning", + data_schema=vol.Schema(self.proxy_warning), + errors={}, + description_placeholders={ + "email": self.login.email, + "hass_url": hass_url, + "error": hass_url_error, + }, ) - if not self.proxy: - self.proxy = AlexaProxy( - self.login, str(URL(hass_url).with_path(AUTH_PROXY_PATH)) - ) - # Swap the login object - self.proxy.change_login(self.login) if ( user_input and user_input.get(CONF_OTPSECRET) @@ -290,6 +310,20 @@ async def async_step_start_proxy(self, user_input=None): hide_email(self.login.email), self.login.url, ) + if not self.proxy: + try: + self.proxy = AlexaProxy( + self.login, + str(URL(self.config.get(CONF_HASS_URL)).with_path(AUTH_PROXY_PATH)), + ) + except ValueError as ex: + return self.async_show_form( + step_id="user", + errors={"base": "invalid_url"}, + description_placeholders={"message": str(ex)}, + ) + # Swap the login object + self.proxy.change_login(self.login) if not self.proxy_view: self.proxy_view = AlexaMediaAuthorizationProxyView(self.proxy.all_handler) else: @@ -298,7 +332,7 @@ async def async_step_start_proxy(self, user_input=None): self.hass.http.register_view(AlexaMediaAuthorizationCallbackView()) self.hass.http.register_view(self.proxy_view) callback_url = ( - URL(self.config["hass_url"]) + URL(self.config[CONF_HASS_URL]) .with_path(AUTH_CALLBACK_PATH) .with_query({"flow_id": self.flow_id}) ) @@ -436,13 +470,26 @@ async def async_step_user_legacy(self, user_input=None): return self.async_show_form( step_id="user_legacy", errors={"base": "unknown_error"}, + description_placeholders={"message": str(ex)}, + ) + + async def async_step_proxy_warning(self, user_input=None): + """Handle the proxy_warning for the config flow.""" + self._save_user_input_to_config(user_input=user_input) + if user_input and user_input.get(CONF_PROXY_WARNING) is False: + _LOGGER.debug("User is not accepting warning, go back") + return self.async_show_form( + step_id="user", + data_schema=vol.Schema(self.proxy_schema), description_placeholders={"message": ""}, ) + _LOGGER.debug("User is ignoring proxy warning; starting proxy anyway") + return await self.async_step_start_proxy(user_input) async def async_step_totp_register(self, user_input=None): """Handle the input processing of the config flow.""" self._save_user_input_to_config(user_input=user_input) - if user_input and user_input.get("registered") is False: + if user_input and user_input.get(CONF_TOTP_REGISTER) is False: _LOGGER.debug("Not registered, regenerating") otp: str = self.login.get_totp_token() if otp: @@ -524,7 +571,7 @@ async def _test_login(self): "access_token": login.access_token, "refresh_token": login.refresh_token, "expires_in": login.expires_in, - "mac_dms": login.mac_dms + "mac_dms": login.mac_dms, } self.hass.data.setdefault( DATA_ALEXAMEDIA, diff --git a/custom_components/alexa_media/const.py b/custom_components/alexa_media/const.py index f557082c7..8a8df8790 100644 --- a/custom_components/alexa_media/const.py +++ b/custom_components/alexa_media/const.py @@ -8,9 +8,10 @@ """ from datetime import timedelta -__version__ = "4.0.3" +__version__ = "4.4.0" PROJECT_URL = "https://github.com/custom-components/alexa_media_player/" ISSUE_URL = f"{PROJECT_URL}issues" +NOTIFY_URL = f"{PROJECT_URL}wiki/Configuration%3A-Notification-Component#use-the-notifyalexa_media-service" DOMAIN = "alexa_media" DATA_ALEXAMEDIA = "alexa_media" @@ -29,6 +30,7 @@ "sensor", "alarm_control_panel", "light", + "binary_sensor" ] HTTP_COOKIE_HEADER = "# HTTP Cookie File" @@ -42,6 +44,7 @@ CONF_SECURITYCODE = "securitycode" CONF_OTPSECRET = "otp_secret" CONF_PROXY = "proxy" +CONF_PROXY_WARNING = "proxy_warning" CONF_TOTP_REGISTER = "registered" CONF_OAUTH = "oauth" DATA_LISTENER = "listener" diff --git a/custom_components/alexa_media/manifest.json b/custom_components/alexa_media/manifest.json index 42769b5c2..59146a995 100644 --- a/custom_components/alexa_media/manifest.json +++ b/custom_components/alexa_media/manifest.json @@ -1,12 +1,13 @@ { "domain": "alexa_media", "name": "Alexa Media Player", - "version": "4.0.3", + "version": "4.4.0", "config_flow": true, "documentation": "https://github.com/custom-components/alexa_media_player/wiki", "issue_tracker": "https://github.com/custom-components/alexa_media_player/issues", "dependencies": ["persistent_notification", "http"], "codeowners": ["@alandtse", "@keatontaylor"], - "requirements": ["alexapy==1.26.1", "packaging>=20.3", "wrapt>=1.12.1"], - "iot_class": "cloud_polling" + "requirements": ["alexapy==1.26.4", "packaging>=20.3", "wrapt>=1.12.1"], + "iot_class": "cloud_polling", + "loggers": ["alexapy", "authcaptureproxy"] } diff --git a/custom_components/alexa_media/media_player.py b/custom_components/alexa_media/media_player.py index 6d5de1240..589fb1d72 100644 --- a/custom_components/alexa_media/media_player.py +++ b/custom_components/alexa_media/media_player.py @@ -277,7 +277,10 @@ async def async_will_remove_from_hass(self): "coordinator" ) if coordinator: - coordinator.async_remove_listener(self.update) + try: + coordinator.async_remove_listener(self.update) + except AttributeError: + pass # ignore missing listener async def _handle_event(self, event): """Handle events. @@ -999,7 +1002,7 @@ def media_position_updated_at(self): return self._last_update @property - def media_image_url(self) -> Optional[Text]: + def media_image_url(self) -> Optional[str]: """Return the image URL of current playing media.""" if self._media_image_url: return re.sub("\\(", "%28", re.sub("\\)", "%29", self._media_image_url)) diff --git a/custom_components/alexa_media/notify.py b/custom_components/alexa_media/notify.py index c8e76ef5f..17186bdc6 100644 --- a/custom_components/alexa_media/notify.py +++ b/custom_components/alexa_media/notify.py @@ -18,6 +18,9 @@ SERVICE_NOTIFY, BaseNotificationService, ) +import voluptuous as vol + +from custom_components.alexa_media.const import NOTIFY_URL from . import ( CONF_EMAIL, @@ -159,17 +162,17 @@ def targets(self): hide_email(email), entity, entity.extra_state_attributes.get("last_called_timestamp"), - ) + ) last_called_entity = entity - elif (last_called_entity.extra_state_attributes.get("last_called_timestamp") - < entity.extra_state_attributes.get("last_called_timestamp") - ): + elif last_called_entity.extra_state_attributes.get( + "last_called_timestamp" + ) < entity.extra_state_attributes.get("last_called_timestamp"): _LOGGER.debug( "%s: Found newer last_called %s called at %s", hide_email(email), entity, entity.extra_state_attributes.get("last_called_timestamp"), - ) + ) last_called_entity = entity if last_called_entity is not None: entity_name = (last_called_entity.entity_id).split(".")[1] @@ -181,7 +184,9 @@ def targets(self): hide_email(email), entity_name_last_called, last_called_entity, - last_called_entity.extra_state_attributes.get("last_called_timestamp"), + last_called_entity.extra_state_attributes.get( + "last_called_timestamp" + ), ) devices[entity_name_last_called] = last_called_entity.unique_id return devices @@ -206,7 +211,8 @@ async def async_send_message(self, message="", **kwargs): kwargs["message"] = message targets = kwargs.get(ATTR_TARGET) title = kwargs.get(ATTR_TITLE, ATTR_TITLE_DEFAULT) - data = kwargs.get(ATTR_DATA) + data = kwargs.get(ATTR_DATA, {}) + data = data if data is not None else {} if isinstance(targets, str): try: targets = json.loads(targets) @@ -234,8 +240,9 @@ async def async_send_message(self, message="", **kwargs): for account, account_dict in self.hass.data[DATA_ALEXAMEDIA][ "accounts" ].items(): + data_type = data.get("type", "tts") for alexa in account_dict["entities"]["media_player"].values(): - if data["type"] == "tts": + if data_type == "tts": targets = self.convert( entities, type_="entities", filter_matches=True ) @@ -250,7 +257,7 @@ async def async_send_message(self, message="", **kwargs): ]["options"].get(CONF_QUEUE_DELAY, DEFAULT_QUEUE_DELAY), ) ) - elif data["type"] == "announce": + elif data_type == "announce": targets = self.convert( entities, type_="serialnumbers", filter_matches=True ) @@ -279,7 +286,7 @@ async def async_send_message(self, message="", **kwargs): ) ) break - elif data["type"] == "push": + elif data_type == "push": targets = self.convert( entities, type_="entities", filter_matches=True ) @@ -294,7 +301,7 @@ async def async_send_message(self, message="", **kwargs): ]["options"].get(CONF_QUEUE_DELAY, DEFAULT_QUEUE_DELAY), ) ) - elif data["type"] == "dropin_notification": + elif data_type == "dropin_notification": targets = self.convert( entities, type_="entities", filter_matches=True ) @@ -311,4 +318,11 @@ async def async_send_message(self, message="", **kwargs): ]["options"].get(CONF_QUEUE_DELAY, DEFAULT_QUEUE_DELAY), ) ) + else: + errormessage = ( + f"{account}: Data value `type={data_type}` is not implemented. " + f"See {NOTIFY_URL}" + ) + _LOGGER.debug(errormessage) + raise vol.Invalid(errormessage) await asyncio.gather(*tasks) diff --git a/custom_components/alexa_media/sensor.py b/custom_components/alexa_media/sensor.py index 5d05ccc3b..cdfd195cc 100644 --- a/custom_components/alexa_media/sensor.py +++ b/custom_components/alexa_media/sensor.py @@ -206,15 +206,19 @@ def device_info(self): return None @property - def unit_of_measurement(self): + def native_unit_of_measurement(self): return TEMP_CELSIUS @property - def state(self): + def native_value(self): return parse_temperature_from_coordinator( self.coordinator, self.alexa_entity_id ) + @property + def device_class(self): + return "temperature" + @property def unique_id(self): # This includes "_temperature" because the Alexa entityId is for a physical device diff --git a/custom_components/alexa_media/strings.json b/custom_components/alexa_media/strings.json index 0844ad31e..55e880b02 100644 --- a/custom_components/alexa_media/strings.json +++ b/custom_components/alexa_media/strings.json @@ -4,9 +4,10 @@ "connection_error": "Error connecting; check network and retry", "identifier_exists": "Email for Alexa URL already registered", "invalid_credentials": "Invalid credentials", + "invalid_url": "URL is invalid: {message}", "2fa_key_invalid": "Invalid Built-In 2FA key", - "hass_url_invalid": "Unable to connect to Home Assistant url. Please check the Internal Url under Configuration -> General", - "unknown_error": "Unknown error, please enable advanced debugging and report log info" + "unable_to_connect_hass_url": "Unable to connect to Home Assistant url. Please check the Internal Url under Configuration -> General", + "unknown_error": "Unknown error: {message}" }, "step": { "user": { @@ -15,7 +16,7 @@ "email": "Email Address", "url": "Amazon region domain (e.g., amazon.co.uk)", "hass_url": "Url to access Home Assistant", - "otp_secret": "Built-in 2FA App Key (automatically generate 2FA Codes)", + "otp_secret": "Built-in 2FA App Key (automatically generate 2FA Codes). This not six digits long.", "include_devices": "Included device (comma separated)", "exclude_devices": "Excluded device (comma separated)", "debug": "Advanced debugging", @@ -26,33 +27,12 @@ "description": "Please confirm the information below. For legacy configuration, disable `Use Login Proxy method` option.", "title": "Alexa Media Player - Configuration" }, - "user_legacy": { + "proxy_warning": { "data": { - "proxy": "Use Login Proxy method (2FA not required)", - "password": "Password", - "email": "Email Address", - "securitycode": "2FA Code (recommended to avoid login issues)", - "otp_secret": "Built-in 2FA App Key (automatically generate 2FA Codes)", - "url": "Amazon region domain (e.g., amazon.co.uk)", - "include_devices": "Included device (comma separated)", - "exclude_devices": "Excluded device (comma separated)", - "debug": "Advanced debugging", - "scan_interval": "Seconds between scans", - "cookies_txt": "Cookies.txt data", - "oauth_login": "Enable oauth-token app method" - }, - "description": "Please enter your [information](https://github.com/custom-components/alexa_media_player/wiki/Configuration#integrations-page). **[Cookie import](https://github.com/custom-components/alexa_media_player/wiki/Configuration#cookie-import) may be easiest!** \n**WARNING: Amazon incorrectly reports 'Enter a valid email or mobile number' when [2FA Code is required](https://github.com/custom-components/alexa_media_player/wiki/Configuration#enable-two-factor-authentication-for-your-amazon-account).** \n>{message}", - "title": "Alexa Media Player - Legacy Configuration" - }, - "captcha": { - "data": { - "password": "Password", - "securitycode": "2FA Code (recommended to avoid login issues)", - "captcha": "Captcha", - "proxy": "Use Login Proxy method (2FA not required)" + "proxy_warning": "Ignore and Continue - I understand that no support for login issues are provided for bypassing this warning." }, - "description": "**{email} - alexa.{url}** \n{message} \n {captcha_image}", - "title": "Alexa Media Player - Captcha" + "description": "The HA server cannot connect to the URL provided: {hass_url}.\n> {error}\n\nTo fix this, please confirm your **HA server** can reach {hass_url}. This field is from the External Url under Configuration -> General but you can try your internal url.\n\nIf you are **certain** your client can reach this url, you can bypass this warning.", + "title": "Alexa Media Player - Unable to Connect to HA URL" }, "totp_register": { "data": { @@ -60,43 +40,12 @@ }, "description": "**{email} - alexa.{url}** \nHave you successfully confirmed an OTP from the Built-in 2FA App Key with Amazon? \n >OTP Code {message}", "title": "Alexa Media Player - OTP Confirmation" - }, - "twofactor": { - "data": { - "securitycode": "2FA Code", - "proxy": "Use Login Proxy method (2FA not required)" - }, - "description": "**{email} - alexa.{url}** \nEnter the One Time Password (OTP). \n{message}", - "title": "Alexa Media Player - Two Factor Authentication" - }, - "authselect": { - "data": { - "authselectoption": "OTP method", - "proxy": "Use Login Proxy method (2FA not required)" - }, - "description": "**{email} - alexa.{url}** \n{message}", - "title": "Alexa Media Player - One Time Password" - }, - "claimspicker": { - "data": { - "authselectoption": "Verification method", - "proxy": "Use Login Proxy method (2FA not required)" - }, - "description": "**{email} - alexa.{url}** \nPlease select verification method by number. (e.g., `0` or `1`) \n{message}", - "title": "Alexa Media Player - Verification Method" - }, - "action_required": { - "data": { - "proxy": "Use Login Proxy method (2FA not required)" - }, - "description": "**{email} - alexa.{url}** \nAmazon will send a push notification per the below message. Please completely respond before continuing. \n{message}", - "title": "Alexa Media Player - Action Required" } }, "abort": { "forgot_password": "The Forgot Password page was detected. This normally is the result of too may failed logins. Amazon may require action before a relogin can be attempted.", "login_failed": "Alexa Media Player failed to login.", - "reauth_successful": "Alexa Media Player successfully reauthenticated." + "reauth_successful": "Alexa Media Player successfully reauthenticated. Please ignore the \"Aborted\" message from HA." } }, "options": { diff --git a/custom_components/alexa_media/translations/ar.json b/custom_components/alexa_media/translations/ar.json index 216f8f322..5d5a1b8d0 100644 --- a/custom_components/alexa_media/translations/ar.json +++ b/custom_components/alexa_media/translations/ar.json @@ -3,21 +3,24 @@ "abort": { "forgot_password": "The Forgot Password page was detected. This normally is the result of too may failed logins. Amazon may require action before a relogin can be attempted.", "login_failed": "Alexa Media Player failed to login.", - "reauth_successful": "Alexa Media Player successfully reauthenticated." + "reauth_successful": "Alexa Media Player successfully reauthenticated. Please ignore the \"Aborted\" message from HA." }, "error": { - "2fa_key_invalid": "Invalid Built-In 2FA key", + "2fa_key_invalid": "مفتاح 2FA مضمّن غير صالح", "connection_error": "Error connecting; check network and retry", - "hass_url_invalid": "Unable to connect to Home Assistant url. Please check the External Url under Configuration -> General", "identifier_exists": "Email for Alexa URL already registered", "invalid_credentials": "Invalid credentials", - "unknown_error": "Unknown error, please enable advanced debugging and report log info" + "invalid_url": "URL غير صالح: {message}", + "unable_to_connect_hass_url": "Unable to connect to Home Assistant url. Please check the External Url under Configuration -> General", + "unknown_error": "Unknown error: {message}" }, "step": { - "captcha": { + "proxy_warning": { "data": { - "securitycode": "2FA Code (recommended to avoid login issues)" - } + "proxy_warning": "Ignore and Continue - I understand that no support for login issues are provided for bypassing this warning." + }, + "description": "The HA server cannot connect to the URL provided: {hass_url}.\n> {error}\n\nTo fix this, please confirm your **HA server** can reach {hass_url}. This field is from the External Url under Configuration -> General but you can try your internal url.\n\nIf you are **certain** your client can reach this url, you can bypass this warning.", + "title": "Alexa Media Player - Unable to Connect to HA URL" }, "totp_register": { "data": { @@ -33,13 +36,13 @@ "exclude_devices": "Excluded device (comma separated)", "hass_url": "Url to access Home Assistant", "include_devices": "Included device (comma separated)", - "otp_secret": "Built-in 2FA App Key (automatically generate 2FA Codes)", + "otp_secret": "Built-in 2FA App Key (automatically generate 2FA Codes). This not six digits long.", "password": "Password", "scan_interval": "Seconds between scans", - "securitycode": "2FA Code (recommended to avoid login issues)", + "securitycode": "[%key_id:55616596%]", "url": "Amazon region domain (e.g., amazon.co.uk)" }, - "description": "Please confirm the information below.", + "description": "Please confirm the information below. For legacy configuration, disable `Use Login Proxy method` option.", "title": "Alexa Media Player - Configuration" } } diff --git a/custom_components/alexa_media/translations/de.json b/custom_components/alexa_media/translations/de.json index 39e2fba12..bdaf9246c 100644 --- a/custom_components/alexa_media/translations/de.json +++ b/custom_components/alexa_media/translations/de.json @@ -8,16 +8,19 @@ "error": { "2fa_key_invalid": "Invalid Built-In 2FA key", "connection_error": "Verbindungsfehler; Netzwerk prüfen und erneut versuchen", - "hass_url_invalid": "Es kann keine Verbindung zur Home Assistant-URL hergestellt werden. Bitte überprüfen Sie die externe URL unter Konfiguration - > Allgemein", "identifier_exists": "Diese Email ist bereits registriert", "invalid_credentials": "Falsche Zugangsdaten", + "invalid_url": "URL ist ungültig: {message}", + "unable_to_connect_hass_url": "Es kann keine Verbindung zur Home Assistant-URL hergestellt werden. Bitte überprüfen Sie die externe URL unter Konfiguration - > Allgemein", "unknown_error": "Unbekannter Fehler, bitte Log-Info melden" }, "step": { - "captcha": { + "proxy_warning": { "data": { - "securitycode": "2FA Code (empfohlen, um Anmeldeprobleme zu vermeiden)" - } + "proxy_warning": "Ignore and Continue - I understand that no support for login issues are provided for bypassing this warning." + }, + "description": "The HA server cannot connect to the URL provided: {hass_url}.\n> {error}\n\nTo fix this, please confirm your **HA server** can reach {hass_url}. This field is from the External Url under Configuration -> General but you can try your internal url.\n\nIf you are **certain** your client can reach this url, you can bypass this warning.", + "title": "Alexa Media Player - Unable to Connect to HA URL" }, "totp_register": { "data": { diff --git a/custom_components/alexa_media/translations/en.json b/custom_components/alexa_media/translations/en.json index 216f8f322..651baef58 100644 --- a/custom_components/alexa_media/translations/en.json +++ b/custom_components/alexa_media/translations/en.json @@ -3,21 +3,24 @@ "abort": { "forgot_password": "The Forgot Password page was detected. This normally is the result of too may failed logins. Amazon may require action before a relogin can be attempted.", "login_failed": "Alexa Media Player failed to login.", - "reauth_successful": "Alexa Media Player successfully reauthenticated." + "reauth_successful": "Alexa Media Player successfully reauthenticated. Please ignore the \"Aborted\" message from HA." }, "error": { "2fa_key_invalid": "Invalid Built-In 2FA key", "connection_error": "Error connecting; check network and retry", - "hass_url_invalid": "Unable to connect to Home Assistant url. Please check the External Url under Configuration -> General", "identifier_exists": "Email for Alexa URL already registered", "invalid_credentials": "Invalid credentials", - "unknown_error": "Unknown error, please enable advanced debugging and report log info" + "invalid_url": "URL is invalid: {message}", + "unable_to_connect_hass_url": "Unable to connect to Home Assistant url. Please check the External Url under Configuration -> General", + "unknown_error": "Unknown error: {message}" }, "step": { - "captcha": { + "proxy_warning": { "data": { - "securitycode": "2FA Code (recommended to avoid login issues)" - } + "proxy_warning": "Ignore and Continue - I understand that no support for login issues are provided for bypassing this warning." + }, + "description": "The HA server cannot connect to the URL provided: {hass_url}.\n> {error}\n\nTo fix this, please confirm your **HA server** can reach {hass_url}. This field is from the External Url under Configuration -> General but you can try your internal url.\n\nIf you are **certain** your client can reach this url, you can bypass this warning.", + "title": "Alexa Media Player - Unable to Connect to HA URL" }, "totp_register": { "data": { @@ -33,13 +36,13 @@ "exclude_devices": "Excluded device (comma separated)", "hass_url": "Url to access Home Assistant", "include_devices": "Included device (comma separated)", - "otp_secret": "Built-in 2FA App Key (automatically generate 2FA Codes)", + "otp_secret": "Built-in 2FA App Key (automatically generate 2FA Codes). This not six digits long.", "password": "Password", "scan_interval": "Seconds between scans", - "securitycode": "2FA Code (recommended to avoid login issues)", + "securitycode": "[%key_id:55616596%]", "url": "Amazon region domain (e.g., amazon.co.uk)" }, - "description": "Please confirm the information below.", + "description": "Please confirm the information below. For legacy configuration, disable `Use Login Proxy method` option.", "title": "Alexa Media Player - Configuration" } } diff --git a/custom_components/alexa_media/translations/es.json b/custom_components/alexa_media/translations/es.json index a0e5b8024..b7591b710 100644 --- a/custom_components/alexa_media/translations/es.json +++ b/custom_components/alexa_media/translations/es.json @@ -3,21 +3,24 @@ "abort": { "forgot_password": "Se ha detectado la página de \"Ha olvidado su contraseña\". Normalmente esto ocurre si has intentado iniciar sesión varias veces de forma fallida. Amazon puede que te pida alguna acción adicional antes de poder volver a intentar iniciar sesión.", "login_failed": "Alexa Media Player no pudo iniciar sesión.", - "reauth_successful": "Alexa Media Player se ha reautentificado correctamente." + "reauth_successful": "Alexa Media Player se volvió a autenticar con éxito. Ignore el mensaje \"Cancelado\" de HA." }, "error": { "2fa_key_invalid": "Invalid Built-In 2FA key", "connection_error": "Error al conectar, verifique la red y vuelva a intentarlo", - "hass_url_invalid": "No se puede conectar a la url de Home Assistant. Compruebe la dirección URL externa en Configuración -> General", "identifier_exists": "Correo electrónico para la URL de Alexa ya registrado", "invalid_credentials": "Credenciales no válidas", - "unknown_error": "Error desconocido, habilite la depuración avanzada e informe la información de registro" + "invalid_url": "La URL no es válida: {message}", + "unable_to_connect_hass_url": "No se puede conectar con la URL de Home Assistant. Verifique la URL externa en Configuración - > General", + "unknown_error": "Error desconocido: {mensaje}" }, "step": { - "captcha": { + "proxy_warning": { "data": { - "securitycode": "Código 2FA (recomendado para evitar problemas de inicio de sesión)" - } + "proxy_warning": "Ignorar y continuar: entiendo que no se proporciona soporte para problemas de inicio de sesión para eludir esta advertencia." + }, + "description": "El servidor HA no puede conectarse a la URL proporcionada: {hass_url} .\n > {error} \n\n Para solucionar esto, confirme que su **servidor HA** puede llegar a {hass_url} . Este campo es de la URL externa en Configuración - > General, pero puede probar su URL interna. \n\n Si está **seguro** de que su cliente puede acceder a esta URL, puede omitir esta advertencia.", + "title": "Alexa Media Player: no se puede conectar a la URL de alta disponibilidad" }, "totp_register": { "data": { @@ -31,15 +34,15 @@ "debug": "Depuración avanzada", "email": "Dirección de correo electrónico", "exclude_devices": "Dispositivo excluido (separado por comas)", - "hass_url": "Url to access Home Assistant", + "hass_url": "Url para acceder a Home Assistant", "include_devices": "Dispositivo incluido (separado por comas)", - "otp_secret": "Built-in 2FA App Key (automatically generate 2FA Codes)", + "otp_secret": "Clave de aplicación 2FA incorporada (genera automáticamente códigos 2FA). Esto no tiene seis dígitos.", "password": "Contraseña", "scan_interval": "Segundos entre escaneos", "securitycode": "Código 2FA (recomendado para evitar problemas de inicio de sesión)", "url": "Región del dominio de Amazon (por ejemplo, amazon.es)" }, - "description": "Confirme la siguiente información.", + "description": "Por favor, confirme la información a continuación. Para la configuración heredada, deshabilite la opción 'Usar método de proxy de inicio de sesión'.", "title": "Alexa Media Player - Configuración" } } diff --git a/custom_components/alexa_media/translations/fr.json b/custom_components/alexa_media/translations/fr.json index f466b3356..45d963b0d 100644 --- a/custom_components/alexa_media/translations/fr.json +++ b/custom_components/alexa_media/translations/fr.json @@ -1,23 +1,26 @@ { "config": { "abort": { - "forgot_password": "La page Mot de passe oublié a été détectée. Amazon peut nécessiter une action avant qu'une reconnexion puisse être tentée.", + "forgot_password": "La page \"Mot de passe oublié\" a été détectée. Ceci est normalement le résultat d'un trop grand nombre d'échecs de connexion. Amazon peut exiger une action avant qu'une nouvelle connexion puisse être tentée.", "login_failed": "Alexa Media Player n'a pas réussi à se connecter.", - "reauth_successful": "Alexa Media Player s'est authentifié avec succès." + "reauth_successful": "Alexa Media Player s'est ré-authentifié avec succès." }, "error": { "2fa_key_invalid": "Clé 2FA intégrée non valide", "connection_error": "Erreur de connexion; vérifier le réseau et réessayer", - "hass_url_invalid": "Impossible de se connecter à l'URL de Home Assistant. Veuillez vérifier l'URL externe sous Configuration - > Général", "identifier_exists": "Email pour l'URL Alexa déjà enregistré", "invalid_credentials": "Informations d'identification invalides", - "unknown_error": "Erreur inconnue, veuillez signaler les informations du journal" + "invalid_url": "L'URL n'est pas valide: {message}", + "unable_to_connect_hass_url": "Impossible de se connecter à l'URL de Home Assistant. Veuillez vérifier l'URL interne sous Configuration - > Général", + "unknown_error": "Erreur inconnue, veuillez signaler les informations du journal: {message}" }, "step": { - "captcha": { + "proxy_warning": { "data": { - "securitycode": "Code 2FA (recommandé pour éviter les problèmes de connexion)" - } + "proxy_warning": "Ignorer et continuer - Je comprends qu'aucune assistance pour les problèmes de connexion n'est fournie pour contourner cet avertissement." + }, + "description": "Le serveur HA ne peut pas se connecter à l'URL fournie: {hass_url}.\n > {error} \n\n Pour résoudre ce problème, veuillez confirmer que votre **serveur HA** peut atteindre {hass_url}. Ce champ provient de l'URL externe sous Configuration - > Général mais vous pouvez essayer votre URL interne. \n\n Si vous êtes **certain** que votre client peut accéder à cette URL, vous pouvez ignorer cet avertissement.", + "title": "Alexa Media Player - Impossible de se connecter à HA URL" }, "totp_register": { "data": { @@ -31,15 +34,15 @@ "debug": "Débogage avancé", "email": "Adresse Email", "exclude_devices": "Appareil exclu (séparé par des virgules)", - "hass_url": "Url to access Home Assistant", + "hass_url": "URL pour accéder à Home Assistant", "include_devices": "Appareil inclus (séparé par des virgules)", - "otp_secret": "Clé d'application 2FA intégrée (génère automatiquement des codes 2FA)", + "otp_secret": "Clé d'application 2FA (2 facteurs) intégrée (génère automatiquement des codes 2FA). Il ne s'agit pas d'un code à six chiffres.", "password": "Mot de passe", "scan_interval": "Secondes entre les analyses", "securitycode": "Code 2FA (recommandé pour éviter les problèmes de connexion)", "url": "Domaine de la région Amazon (exemple, amazon.fr)" }, - "description": "Veuillez confirmer les informations ci-dessous.", + "description": "Veuillez confirmer les informations ci-dessous. Pour la configuration héritée, désactivez l'option \"Utiliser la méthode de proxy de connexion\".", "title": "Alexa Media Player - Configuration" } } diff --git a/custom_components/alexa_media/translations/it.json b/custom_components/alexa_media/translations/it.json index 318c7b5ad..f7d970023 100644 --- a/custom_components/alexa_media/translations/it.json +++ b/custom_components/alexa_media/translations/it.json @@ -3,21 +3,24 @@ "abort": { "forgot_password": "È stata rilevata la pagina di password dimenticata. Normalmente questo è il risultato di troppi accessi falliti. Amazon potrebbe richiedere di eseguire alcune azioni prima di poter tentare un nuovo accesso.", "login_failed": "Alexa Media Player ha fallito il login.", - "reauth_successful": "Alexa Media Player è stato riautenticato con successo." + "reauth_successful": "Alexa Media Player è stato riautenticato con successo. Ignorare il messaggio \"Abortito\" da HA" }, "error": { "2fa_key_invalid": "Chiave 2FA incorporata non valida", "connection_error": "Errore durante la connessione; controlla la rete e riprova", - "hass_url_invalid": "Impossibile collegarsi all'URL di Home Assistant. Controllare l'URL esterno nel menu Configurazione -> Generale", "identifier_exists": "L'email per l'URL di Alexa è già stata registrata", "invalid_credentials": "Credenziali non valide", - "unknown_error": "Errore sconosciuto, si prega di abilitare il debug avanzato e riportare i log informativi" + "invalid_url": "URL non valido: {message}", + "unable_to_connect_hass_url": "Impossibile collegarsi all'URL di Home Assistant. Controllare l'URL esterno nel menu Configurazione -> Generale", + "unknown_error": "Errore sconosciuto:{message}" }, "step": { - "captcha": { + "proxy_warning": { "data": { - "securitycode": "Codice 2FA (raccomandato per evitare problemi di login)" - } + "proxy_warning": "Ignore and Continue - I understand that no support for login issues are provided for bypassing this warning." + }, + "description": "The HA server cannot connect to the URL provided: {hass_url}.\n> {error}\n\nTo fix this, please confirm your **HA server** can reach {hass_url}. This field is from the External Url under Configuration -> General but you can try your internal url.\n\nIf you are **certain** your client can reach this url, you can bypass this warning.", + "title": "Alexa Media Player - Impossibile connettersi all'URL HA" }, "totp_register": { "data": { @@ -33,13 +36,13 @@ "exclude_devices": "Dispositivi da escludere (separati da virgola)", "hass_url": "URL per accedere a Home Assistant", "include_devices": "Dispositivi da includere (separati da virgola)", - "otp_secret": "Chiave dell'app 2FA integrata (generazione automatica di codici 2FA)", + "otp_secret": "Chiave app 2FA integrata (genera automaticamente codici 2FA). Questo non è lungo sei cifre.", "password": "Password", "scan_interval": "Tempo in secondi fra le scansioni", "securitycode": "Codice 2FA (raccomandato per evitare problemi di login)", "url": "Regione del dominio Amazon (ad es., amazon.it)" }, - "description": "Confermare le informazioni sottostanti.", + "description": "Confermare le informazioni di seguito. Per la configurazione legacy, disabilitare l'opzione \"Utilizza metodo proxy di accesso\".", "title": "Alexa Media Player - Configurazione" } } diff --git a/custom_components/alexa_media/translations/nb.json b/custom_components/alexa_media/translations/nb.json index 87f5b062f..3fbe742be 100644 --- a/custom_components/alexa_media/translations/nb.json +++ b/custom_components/alexa_media/translations/nb.json @@ -8,16 +8,19 @@ "error": { "2fa_key_invalid": "Invalid Built-In 2FA key", "connection_error": "Feil ved tilkobling; sjekk nettverket og prøv på nytt", - "hass_url_invalid": "Kan ikke koble til nettadressen til hjemmeassistenten. Vennligst sjekk den eksterne nettadressen under Konfigurasjon - > Generelt", "identifier_exists": "E-post for Alexa URL allerede registrert", "invalid_credentials": "ugyldige legitimasjon", + "invalid_url": "URL er ugyldig: {message}", + "unable_to_connect_hass_url": "Kan ikke koble til Home Assistant-nettadressen. Vennligst sjekk den eksterne nettadressen under Konfigurasjon - > Generelt", "unknown_error": "Ukjent feil, vennligst rapporter logginfo" }, "step": { - "captcha": { + "proxy_warning": { "data": { - "securitycode": "2FA-kode (anbefales for å unngå påloggingsproblemer)" - } + "proxy_warning": "Ignore and Continue - I understand that no support for login issues are provided for bypassing this warning." + }, + "description": "The HA server cannot connect to the URL provided: {hass_url}.\n> {error}\n\nTo fix this, please confirm your **HA server** can reach {hass_url}. This field is from the External Url under Configuration -> General but you can try your internal url.\n\nIf you are **certain** your client can reach this url, you can bypass this warning.", + "title": "Alexa Media Player - Unable to Connect to HA URL" }, "totp_register": { "data": { diff --git a/custom_components/alexa_media/translations/nl.json b/custom_components/alexa_media/translations/nl.json index 77558398e..732272e45 100644 --- a/custom_components/alexa_media/translations/nl.json +++ b/custom_components/alexa_media/translations/nl.json @@ -8,16 +8,19 @@ "error": { "2fa_key_invalid": "Invalid Built-In 2FA key", "connection_error": "Fout bij verbinden; controleer netwerk en probeer opnieuw", - "hass_url_invalid": "Kan geen verbinding maken met de Home Assistant-URL. Controleer de externe URL onder Configuratie - > Algemeen", "identifier_exists": "Dit e-mailadres is reeds geregistreerd", "invalid_credentials": "Ongeldige inloggegevens", + "invalid_url": "URL is ongeldig: {message}", + "unable_to_connect_hass_url": "Kan geen verbinding maken met de Home Assistant-url. Controleer de externe URL onder Configuratie - > Algemeen", "unknown_error": "Onbekende fout, meld de loggegevens" }, "step": { - "captcha": { + "proxy_warning": { "data": { - "securitycode": "config::step::captcha::data::securitycode" - } + "proxy_warning": "Ignore and Continue - I understand that no support for login issues are provided for bypassing this warning." + }, + "description": "The HA server cannot connect to the URL provided: {hass_url}.\n> {error}\n\nTo fix this, please confirm your **HA server** can reach {hass_url}. This field is from the External Url under Configuration -> General but you can try your internal url.\n\nIf you are **certain** your client can reach this url, you can bypass this warning.", + "title": "Alexa Media Player - Unable to Connect to HA URL" }, "totp_register": { "data": { diff --git a/custom_components/alexa_media/translations/pl.json b/custom_components/alexa_media/translations/pl.json index fcb2c462e..c2227570e 100644 --- a/custom_components/alexa_media/translations/pl.json +++ b/custom_components/alexa_media/translations/pl.json @@ -8,16 +8,19 @@ "error": { "2fa_key_invalid": "Nieprawidłowy klucz z wbudowanej aplikacji uwierzytelniania dwuskładnikowego", "connection_error": "Błąd podczas łączenia; sprawdź sieć i spróbuj ponownie", - "hass_url_invalid": "Nie można połączyć się z adresem URL Home Assistanta. Sprawdź publiczny adres URL w sekcji Konfiguracja -> Ogólne", "identifier_exists": "Adres e-mail dla Alexy już jest zarejestrowany", "invalid_credentials": "Nieprawidłowe dane logowania", + "invalid_url": "URL jest nieprawidłowy: {message}", + "unable_to_connect_hass_url": "Nie można połączyć się z adresem URL Home Assistanta. Sprawdź wewnętrzny adres URL w sekcji Konfiguracja -> Ogólne", "unknown_error": "Nieznany błąd, włącz zaawansowane debugowanie i zgłoś log z tego zdarzenia" }, "step": { - "captcha": { + "proxy_warning": { "data": { - "securitycode": "Kod uwierzytelniania dwuskładnikowego" - } + "proxy_warning": "Ignore and Continue - I understand that no support for login issues are provided for bypassing this warning." + }, + "description": "The HA server cannot connect to the URL provided: {hass_url}.\n> {error}\n\nTo fix this, please confirm your **HA server** can reach {hass_url}. This field is from the External Url under Configuration -> General but you can try your internal url.\n\nIf you are **certain** your client can reach this url, you can bypass this warning.", + "title": "Alexa Media Player - Unable to Connect to HA URL" }, "totp_register": { "data": { diff --git a/custom_components/alexa_media/translations/pt-BR.json b/custom_components/alexa_media/translations/pt-BR.json index 6d4b48047..88d892fa1 100644 --- a/custom_components/alexa_media/translations/pt-BR.json +++ b/custom_components/alexa_media/translations/pt-BR.json @@ -3,21 +3,24 @@ "abort": { "forgot_password": "A página Esqueci minha senha foi detectada. Isso normalmente é o resultado de muitos logins com falha. A Amazon pode exigir uma ação antes que um novo login possa ser tentado.", "login_failed": "Alexa Media Player falhou no login.", - "reauth_successful": "O Alexa Media Player foi reautenticado com sucesso." + "reauth_successful": "Alexa Media Player reautenticado com sucesso. Por favor, ignore a mensagem \"Abortado\" do Home Assistant." }, "error": { "2fa_key_invalid": "Chave integrada 2FA inválida", "connection_error": "Erro de conexão; verifique a sua conexão e tente novamente", - "hass_url_invalid": "Não foi possível conectar ao URL do Home Assistant. Por favor, verifique o URL Externo em Configuração - > Geral", "identifier_exists": "E-mail para URL Alexa já registrado", "invalid_credentials": "Credenciais inválidas", - "unknown_error": "Erro desconhecido, favor habilitar depuração avançada e informações de registro de relatório" + "invalid_url": "O URL é inválido: {message}", + "unable_to_connect_hass_url": "Não foi possível conectar ao URL do Home Assistant. Por favor, verifique o URL Externo em Configuração - > Geral", + "unknown_error": "Erro desconhecido: {message}" }, "step": { - "captcha": { + "proxy_warning": { "data": { - "securitycode": "Código 2FA (recomendado para evitar problemas de login)" - } + "proxy_warning": "Ignorar e continuar - Entendo que nenhum suporte para problemas de login é fornecido para ignorar este aviso." + }, + "description": "O servidor Home Assistant não pode se conectar a URL fornecida: {hass_url} .\n > {error} \n\n Para corrigir isso, confirme se seu **servidor Home Assistant** pode alcançar {hass_url} . Este campo é do URL externo em Configuração - > Geral, mas você pode tentar sua URL interna. \n\n Se você tiver **certeza** de que seu cliente pode acessar essa URL, ignore este aviso.", + "title": "Alexa Media Player - Não foi possível se conectar a URL do Home Assistant" }, "totp_register": { "data": { @@ -33,13 +36,13 @@ "exclude_devices": "Dispositivos excluídos (separado por vírgula)", "hass_url": "Url para acesso ao Home Assistant", "include_devices": "Dispositivos incluídos (separado por vírgula)", - "otp_secret": "Chave de aplicativo 2FA integrada (gerar automaticamente códigos 2FA)", + "otp_secret": "Chave de aplicativo 2FA integrada (gera automaticamente códigos 2FA). Essa não tem seis dígitos.", "password": "Senha", "scan_interval": "Segundos entre varreduras", - "securitycode": "Código 2FA (recomendado para evitar problemas de login)", + "securitycode": "[%key_id:55616596%]", "url": "Domínio regional da Amazon (ex: amazon.co.uk)" }, - "description": "Por favor, confirme as informações abaixo.", + "description": "Por favor, confirme as informações abaixo. Para configuração legada, desative a opção `Usar método de proxy de login`.", "title": "Alexa Media Player - Configurações" } } diff --git a/custom_components/alexa_media/translations/pt.json b/custom_components/alexa_media/translations/pt.json index 0ea685b62..fa354c1b0 100644 --- a/custom_components/alexa_media/translations/pt.json +++ b/custom_components/alexa_media/translations/pt.json @@ -3,21 +3,24 @@ "abort": { "forgot_password": "A página 'Esqueci a senha' foi detectada. Normalmente, isso é o resultado de logins que falharam. A Amazon pode exigir uma ação antes que um relogin possa ser tentado.", "login_failed": "Alexa Media Player não conseguiu fazer o login.", - "reauth_successful": "Alexa Media Player reautenticada com sucesso." + "reauth_successful": "Alexa Media Player reautenticado com sucesso. Por favor, ignore a mensagem \"Aborted\" do HA." }, "error": { "2fa_key_invalid": "Chave 2FA integrada inválida", "connection_error": "Erro ao conectar; verifique a rede e tente novamente", - "hass_url_invalid": "Não foi possível conectar ao URL do Home Assistant. Verifique o URL externo em Configuração - > Geral", "identifier_exists": "E-mail para URL Alexa já registado", "invalid_credentials": "Credenciais inválidas", - "unknown_error": "Erro desconhecido, por favor habilite depuração avançada e informações de log de relatório" + "invalid_url": "O URL é inválido: {message}", + "unable_to_connect_hass_url": "Não foi possível conectar ao URL do Home Assistant. Verifique o URL interno em Configuração - > Geral", + "unknown_error": "Erro desconhecido: {message}" }, "step": { - "captcha": { + "proxy_warning": { "data": { - "securitycode": "Código 2FA (recomendado para evitar problemas de login)" - } + "proxy_warning": "Ignore e Continue - Entendo que não há suporte para problemas de login para ignorar este aviso." + }, + "description": "O servidor de alta disponibilidade não pode se conectar ao URL fornecido: {hass_url} .\n > {error} \n\n Para corrigir isso, confirme se seu **servidor HA** pode alcançar {hass_url} . Este campo é do URL externo em Configuração - > Geral, mas você pode tentar seu URL interno. \n\n Se você tiver **certeza** de que seu cliente pode acessar esse URL, ignore este aviso.", + "title": "Alexa Media Player - Não é possível conectar ao URL de alta disponibilidade" }, "totp_register": { "data": { @@ -39,7 +42,7 @@ "securitycode": "Código 2FA (recomendado para evitar problemas de login)", "url": "Região do domínio Amazon (ex. amazon.com.br)" }, - "description": "Por favor, confirme as informações abaixo.", + "description": "Por favor, confirme as informações abaixo. Para configuração legada, desative a opção `Usar método de proxy de login`.", "title": "Alexa Media Player - Configuração" } } diff --git a/custom_components/alexa_media/translations/pt_BR.json b/custom_components/alexa_media/translations/pt_BR.json index 2696cc29b..2e8d00b01 100644 --- a/custom_components/alexa_media/translations/pt_BR.json +++ b/custom_components/alexa_media/translations/pt_BR.json @@ -8,7 +8,7 @@ "error": { "2fa_key_invalid": "Chave integrada 2FA inválida", "connection_error": "Erro de conexão; Verifique a sua conexão e tente novamente", - "hass_url_invalid": "Não foi possível conectar a URL do Home Assistant. Por favor verifique a URL externa em Configuração -> Geral", + "unable_to_connect_hass_url": "Não foi possível conectar a URL do Home Assistant. Por favor verifique a URL externa em Configuração -> Geral", "identifier_exists": "Email para URL Alexa já registrado", "invalid_credentials": "Credenciais inválidas", "unknown_error": "Erro desconhecido, favor habilitar a depuração avançada e reporte as informações de registro" diff --git a/custom_components/alexa_media/translations/pt_PT.json b/custom_components/alexa_media/translations/pt_PT.json index 5cf76c7d2..2d7b43825 100644 --- a/custom_components/alexa_media/translations/pt_PT.json +++ b/custom_components/alexa_media/translations/pt_PT.json @@ -8,7 +8,7 @@ "error": { "2fa_key_invalid": "Chave 2FA integrada inválida", "connection_error": "Erro ao conectar; verifique a rede e tente novamente", - "hass_url_invalid": "Não foi possível conectar ao URL do Home Assistant. Verifique o URL externo em Configuração - > Geral", + "unable_to_connect_hass_url": "Não foi possível conectar ao URL do Home Assistant. Verifique o URL externo em Configuração - > Geral", "identifier_exists": "E-mail para URL Alexa já registado", "invalid_credentials": "Credenciais inválidas", "unknown_error": "Erro desconhecido, por favor habilite depuração avançada e informações de log de relatório" diff --git a/custom_components/alexa_media/translations/ru.json b/custom_components/alexa_media/translations/ru.json index e6aa3c69d..09dd0c717 100644 --- a/custom_components/alexa_media/translations/ru.json +++ b/custom_components/alexa_media/translations/ru.json @@ -8,16 +8,19 @@ "error": { "2fa_key_invalid": "Invalid Built-In 2FA key", "connection_error": "Ошибка подключения; проверьте сеть и повторите попытку", - "hass_url_invalid": "Невозможно подключиться к URL-адресу Home Assistant. Пожалуйста, проверьте внешний URL-адрес в разделе \"Конфигурация\" - > Общие\".", "identifier_exists": "Электронная почта для Alexa уже зарегистрирована", "invalid_credentials": "Неверные учетные данные", + "invalid_url": "Недопустимый URL-адрес: {message}", + "unable_to_connect_hass_url": "Не удалось подключиться к URL-адресу Home Assistant. Проверьте внешний URL-адрес в разделе «Конфигурация» - > «Общие».", "unknown_error": "Неизвестная ошибка, пожалуйста, сообщите информацию журнала" }, "step": { - "captcha": { + "proxy_warning": { "data": { - "securitycode": "2FA Code (recommended to avoid login issues)" - } + "proxy_warning": "Ignore and Continue - I understand that no support for login issues are provided for bypassing this warning." + }, + "description": "The HA server cannot connect to the URL provided: {hass_url}.\n> {error}\n\nTo fix this, please confirm your **HA server** can reach {hass_url}. This field is from the External Url under Configuration -> General but you can try your internal url.\n\nIf you are **certain** your client can reach this url, you can bypass this warning.", + "title": "Alexa Media Player - Unable to Connect to HA URL" }, "totp_register": { "data": { diff --git a/custom_components/alexa_media/translations/zh-Hans.json b/custom_components/alexa_media/translations/zh-Hans.json index 2658d0e67..8db1d4574 100644 --- a/custom_components/alexa_media/translations/zh-Hans.json +++ b/custom_components/alexa_media/translations/zh-Hans.json @@ -3,21 +3,24 @@ "abort": { "forgot_password": "The Forgot Password page was detected. This normally is the result of too may failed logins. Amazon may require action before a relogin can be attempted.", "login_failed": "Alexa Media Player failed to login.", - "reauth_successful": "Alexa Media Player successfully reauthenticated." + "reauth_successful": "Alexa 媒体播放器已成功重新验证。请忽略来自 HA 的“Aborted”消息。" }, "error": { "2fa_key_invalid": "Invalid Built-In 2FA key", "connection_error": "连接错误;检查网络并重试", - "hass_url_invalid": "Unable to connect to Home Assistant url. Please check the External Url under Configuration -> General", "identifier_exists": "Alexa URL的电子邮件已注册", "invalid_credentials": "Invalid credentials", - "unknown_error": "Unknown error, please report log info" + "invalid_url": "URL 无效: {message}", + "unable_to_connect_hass_url": "无法连接到 Home Assistant 网址。请检查配置下的外部 URL - >常规", + "unknown_error": "未知错误: {message}" }, "step": { - "captcha": { + "proxy_warning": { "data": { - "securitycode": "2FA Code (recommended to avoid login issues)" - } + "proxy_warning": "忽略并继续 - 我了解不提供对登录问题的支持来绕过此警告。" + }, + "description": "HA 服务器无法连接到提供的 URL: {hass_url} 。\n > {error} \n\n要解决此问题,请确认您的 **HA 服务器** 可以访问{hass_url} 。此字段来自配置 - >常规下的外部 URL,但您可以尝试使用内部 URL。 \n\n如果您**确定**您的客户可以访问此网址,则可以绕过此警告。", + "title": "Alexa 媒体播放器 - 无法连接到 HA URL" }, "totp_register": { "data": { @@ -33,13 +36,13 @@ "exclude_devices": "Excluded device (comma separated)", "hass_url": "Url to access Home Assistant", "include_devices": "Included device (comma separated)", - "otp_secret": "Built-in 2FA App Key (automatically generate 2FA Codes)", + "otp_secret": "内置 2FA App Key(自动生成 2FA 代码)。这不是六位数长。", "password": "密码", "scan_interval": "Seconds between scans", "securitycode": "2FA Code (recommended to avoid login issues)", "url": "Amazon region domain (e.g., amazon.co.uk)" }, - "description": "请确认以下信息。", + "description": "请确认以下信息。对于旧配置,请禁用“使用登录代理方法”选项。", "title": "Alexa Media Player-配置" } } @@ -48,7 +51,7 @@ "step": { "init": { "data": { - "extended_entity_discovery": "Include devices connected via Echo", + "extended_entity_discovery": "包括通过 Echo 连接的设备", "queue_delay": "Seconds to wait to queue commands together" } } diff --git a/custom_components/frigate/__init__.py b/custom_components/frigate/__init__.py index ffa4cd8c2..21546fc14 100644 --- a/custom_components/frigate/__init__.py +++ b/custom_components/frigate/__init__.py @@ -23,7 +23,7 @@ from homeassistant.components.switch import DOMAIN as SWITCH_DOMAIN from homeassistant.config_entries import ConfigEntry from homeassistant.const import ATTR_MODEL, CONF_HOST, CONF_URL -from homeassistant.core import Config, HomeAssistant, callback +from homeassistant.core import Config, HomeAssistant, callback, valid_entity_id from homeassistant.exceptions import ConfigEntryNotReady from homeassistant.helpers import device_registry as dr, entity_registry as er from homeassistant.helpers.aiohttp_client import async_get_clientsession @@ -44,14 +44,19 @@ NAME, PLATFORMS, STARTUP_MESSAGE, + STATUS_ERROR, + STATUS_RUNNING, + STATUS_STARTING, ) from .views import ( JSMPEGProxyView, NotificationsProxyView, SnapshotsProxyView, + ThumbnailsProxyView, VodProxyView, VodSegmentProxyView, ) +from .ws_api import async_setup as ws_api_async_setup SCAN_INTERVAL = timedelta(seconds=5) @@ -88,6 +93,16 @@ def get_friendly_name(name: str) -> str: return name.replace("_", " ").title() +def get_cameras(config: dict[str, Any]) -> set[str]: + """Get cameras.""" + cameras = set() + + for cam_name, _ in config["cameras"].items(): + cameras.add(cam_name) + + return cameras + + def get_cameras_and_objects( config: dict[str, Any], include_all: bool = True ) -> set[tuple[str, str]]: @@ -155,10 +170,13 @@ async def async_setup(hass: HomeAssistant, config: Config) -> bool: hass.data.setdefault(DOMAIN, {}) + ws_api_async_setup(hass) + session = async_get_clientsession(hass) hass.http.register_view(JSMPEGProxyView(session)) hass.http.register_view(NotificationsProxyView(session)) hass.http.register_view(SnapshotsProxyView(session)) + hass.http.register_view(ThumbnailsProxyView(session)) hass.http.register_view(VodProxyView(session)) hass.http.register_view(VodSegmentProxyView(session)) return True @@ -232,6 +250,42 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool: new_options.pop(CONF_CAMERA_STATIC_IMAGE_HEIGHT) hass.config_entries.async_update_entry(entry, options=new_options) + # Cleanup object_motion sensors (replaced with occupancy sensors). + for cam_name, obj_name in get_cameras_zones_and_objects(config): + unique_id = get_frigate_entity_unique_id( + entry.entry_id, + "motion_sensor", + f"{cam_name}_{obj_name}", + ) + entity_id = entity_registry.async_get_entity_id( + "binary_sensor", DOMAIN, unique_id + ) + if entity_id: + entity_registry.async_remove(entity_id) + + # Rename / change ID of object count sensors. + for cam_name, obj_name in get_cameras_zones_and_objects(config): + unique_id = get_frigate_entity_unique_id( + entry.entry_id, + "sensor_object_count", + f"{cam_name}_{obj_name}", + ) + entity_id = entity_registry.async_get_entity_id("sensor", DOMAIN, unique_id) + new_id = f"sensor.{slugify(cam_name)}_{slugify(obj_name)}_count" + + if ( + entity_id + and entity_id != new_id + and valid_entity_id(new_id) + and not entity_registry.async_get(new_id) + ): + new_name = f"{get_friendly_name(cam_name)} {obj_name} Count".title() + entity_registry.async_update_entity( + entity_id=entity_id, + new_entity_id=new_id, + name=new_name, + ) + hass.config_entries.async_setup_platforms(entry, PLATFORMS) entry.async_on_unload(entry.add_update_listener(_async_entry_updated)) @@ -244,13 +298,17 @@ class FrigateDataUpdateCoordinator(DataUpdateCoordinator): # type: ignore[misc] def __init__(self, hass: HomeAssistant, client: FrigateApiClient): """Initialize.""" self._api = client + self.server_status: str = STATUS_STARTING super().__init__(hass, _LOGGER, name=DOMAIN, update_interval=SCAN_INTERVAL) async def _async_update_data(self) -> dict[str, Any]: """Update data via library.""" try: - return await self._api.async_get_stats() + stats = await self._api.async_get_stats() + self.server_status = STATUS_RUNNING + return stats except FrigateApiClientError as exc: + self.server_status = STATUS_ERROR raise UpdateFailed from exc @@ -289,7 +347,7 @@ def update_unique_id(entity_entry: er.RegistryEntry) -> dict[str, str] | None: converters: Final[dict[re.Pattern, Callable[[re.Match], list[str]]]] = { re.compile(rf"^{DOMAIN}_(?P\S+)_binary_sensor$"): lambda m: [ - "motion_sensor", + "occupancy_sensor", m.group("cam_obj"), ], re.compile(rf"^{DOMAIN}_(?P\S+)_camera$"): lambda m: [ @@ -340,6 +398,8 @@ def update_unique_id(entity_entry: er.RegistryEntry) -> dict[str, str] | None: class FrigateEntity(Entity): # type: ignore[misc] """Base class for Frigate entities.""" + _attr_has_entity_name = True + def __init__(self, config_entry: ConfigEntry): """Construct a FrigateEntity.""" Entity.__init__(self) @@ -364,32 +424,27 @@ def __init__( self, config_entry: ConfigEntry, frigate_config: dict[str, Any], - state_topic_config: dict[str, Any], + topic_map: dict[str, Any], ) -> None: """Construct a FrigateMQTTEntity.""" super().__init__(config_entry) self._frigate_config = frigate_config self._sub_state = None self._available = False - self._state_topic_config = { - "msg_callback": self._state_message_received, - "qos": 0, - **state_topic_config, - } + self._topic_map = topic_map async def async_added_to_hass(self) -> None: """Subscribe mqtt events.""" + self._topic_map["availability_topic"] = { + "topic": f"{self._frigate_config['mqtt']['topic_prefix']}/available", + "msg_callback": self._availability_message_received, + "qos": 0, + } + state = async_prepare_subscribe_topics( self.hass, self._sub_state, - { - "state_topic": self._state_topic_config, - "availability_topic": { - "topic": f"{self._frigate_config['mqtt']['topic_prefix']}/available", - "msg_callback": self._availability_message_received, - "qos": 0, - }, - }, + self._topic_map, ) self._sub_state = await async_subscribe_topics(self.hass, state) @@ -398,11 +453,6 @@ async def async_will_remove_from_hass(self) -> None: async_unsubscribe_topics(self.hass, self._sub_state) self._sub_state = None - @callback # type: ignore[misc] - def _state_message_received(self, msg: ReceiveMessage) -> None: - """State message received.""" - self.async_write_ha_state() - @callback # type: ignore[misc] def _availability_message_received(self, msg: ReceiveMessage) -> None: """Handle a new received MQTT availability message.""" diff --git a/custom_components/frigate/api.py b/custom_components/frigate/api.py index 595ae89e6..c5c10ca31 100644 --- a/custom_components/frigate/api.py +++ b/custom_components/frigate/api.py @@ -4,7 +4,7 @@ import asyncio import logging import socket -from typing import Any, Dict, List, cast +from typing import Any, cast import aiohttp import async_timeout @@ -47,7 +47,7 @@ async def async_get_version(self) -> str: async def async_get_stats(self) -> dict[str, Any]: """Get data from the API.""" return cast( - Dict[str, Any], + dict[str, Any], await self.api_wrapper("get", str(URL(self._host) / "api/stats")), ) @@ -61,6 +61,7 @@ async def async_get_events( limit: int | None = None, has_clip: bool | None = None, has_snapshot: bool | None = None, + decode_json: bool = True, ) -> list[dict[str, Any]]: """Get data from the API.""" params = { @@ -72,10 +73,11 @@ async def async_get_events( "limit": limit, "has_clip": int(has_clip) if has_clip is not None else None, "has_snapshot": int(has_snapshot) if has_snapshot is not None else None, + "include_thumbnails": 0, } return cast( - List[Dict[str, Any]], + list[dict[str, Any]], await self.api_wrapper( "get", str( @@ -83,6 +85,7 @@ async def async_get_events( / "api/events" % {k: v for k, v in params.items() if v is not None} ), + decode_json=decode_json, ), ) @@ -90,6 +93,7 @@ async def async_get_event_summary( self, has_clip: bool | None = None, has_snapshot: bool | None = None, + decode_json: bool = True, ) -> list[dict[str, Any]]: """Get data from the API.""" params = { @@ -98,7 +102,7 @@ async def async_get_event_summary( } return cast( - List[Dict[str, Any]], + list[dict[str, Any]], await self.api_wrapper( "get", str( @@ -106,13 +110,14 @@ async def async_get_event_summary( / "api/events/summary" % {k: v for k, v in params.items() if v is not None} ), + decode_json=decode_json, ), ) async def async_get_config(self) -> dict[str, Any]: """Get data from the API.""" return cast( - Dict[str, Any], + dict[str, Any], await self.api_wrapper("get", str(URL(self._host) / "api/config")), ) @@ -120,6 +125,52 @@ async def async_get_path(self, path: str) -> Any: """Get data from the API.""" return await self.api_wrapper("get", str(URL(self._host) / f"{path}/")) + async def async_retain( + self, event_id: str, retain: bool, decode_json: bool = True + ) -> dict[str, Any] | str: + """Un/Retain an event.""" + result = await self.api_wrapper( + "post" if retain else "delete", + str(URL(self._host) / f"api/events/{event_id}/retain"), + decode_json=decode_json, + ) + return cast(dict[str, Any], result) if decode_json else result + + async def async_get_recordings_summary( + self, camera: str, decode_json: bool = True + ) -> dict[str, Any] | str: + """Get recordings summary.""" + result = await self.api_wrapper( + "get", + str(URL(self._host) / f"api/{camera}/recordings/summary"), + decode_json=decode_json, + ) + return cast(dict[str, Any], result) if decode_json else result + + async def async_get_recordings( + self, + camera: str, + after: int | None = None, + before: int | None = None, + decode_json: bool = True, + ) -> dict[str, Any] | str: + """Get recordings.""" + params = { + "after": after, + "before": before, + } + + result = await self.api_wrapper( + "get", + str( + URL(self._host) + / f"api/{camera}/recordings" + % {k: v for k, v in params.items() if v is not None} + ), + decode_json=decode_json, + ) + return cast(dict[str, Any], result) if decode_json else result + async def api_wrapper( self, method: str, @@ -136,23 +187,15 @@ async def api_wrapper( try: async with async_timeout.timeout(TIMEOUT): - if method == "get": - response = await self._session.get( - url, headers=headers, raise_for_status=True + func = getattr(self._session, method) + if func: + response = await func( + url, headers=headers, raise_for_status=True, json=data ) if decode_json: return await response.json() return await response.text() - if method == "put": - await self._session.put(url, headers=headers, json=data) - - elif method == "patch": - await self._session.patch(url, headers=headers, json=data) - - elif method == "post": - await self._session.post(url, headers=headers, json=data) - except asyncio.TimeoutError as exc: _LOGGER.error( "Timeout error fetching information from %s: %s", diff --git a/custom_components/frigate/binary_sensor.py b/custom_components/frigate/binary_sensor.py index ba8367435..eab672752 100644 --- a/custom_components/frigate/binary_sensor.py +++ b/custom_components/frigate/binary_sensor.py @@ -6,6 +6,7 @@ from homeassistant.components.binary_sensor import ( DEVICE_CLASS_MOTION, + DEVICE_CLASS_OCCUPANCY, BinarySensorEntity, ) from homeassistant.config_entries import ConfigEntry @@ -16,6 +17,7 @@ from . import ( FrigateMQTTEntity, ReceiveMessage, + get_cameras, get_cameras_zones_and_objects, get_friendly_name, get_frigate_device_identifier, @@ -23,6 +25,7 @@ get_zones, ) from .const import ATTR_CONFIG, DOMAIN, NAME +from .icons import get_dynamic_icon_from_type _LOGGER: logging.Logger = logging.getLogger(__name__) @@ -32,16 +35,30 @@ async def async_setup_entry( ) -> None: """Binary sensor entry setup.""" frigate_config = hass.data[DOMAIN][entry.entry_id][ATTR_CONFIG] - async_add_entities( + + entities = [] + + # add object sensors for cameras and zones + entities.extend( [ - FrigateMotionSensor(entry, frigate_config, cam_name, obj) + FrigateObjectOccupancySensor(entry, frigate_config, cam_name, obj) for cam_name, obj in get_cameras_zones_and_objects(frigate_config) ] ) + # add generic motion sensors for cameras + entities.extend( + [ + FrigateMotionSensor(entry, frigate_config, cam_name) + for cam_name in get_cameras(frigate_config) + ] + ) -class FrigateMotionSensor(FrigateMQTTEntity, BinarySensorEntity): # type: ignore[misc] - """Frigate Motion Sensor class.""" + async_add_entities(entities) + + +class FrigateObjectOccupancySensor(FrigateMQTTEntity, BinarySensorEntity): # type: ignore[misc] + """Frigate Occupancy Sensor class.""" def __init__( self, @@ -50,7 +67,7 @@ def __init__( cam_name: str, obj_name: str, ) -> None: - """Construct a new FrigateMotionSensor.""" + """Construct a new FrigateObjectOccupancySensor.""" self._cam_name = cam_name self._obj_name = obj_name self._is_on = False @@ -60,10 +77,15 @@ def __init__( config_entry, frigate_config, { - "topic": ( - f"{frigate_config['mqtt']['topic_prefix']}" - f"/{self._cam_name}/{self._obj_name}" - ) + "state_topic": { + "msg_callback": self._state_message_received, + "qos": 0, + "topic": ( + f"{self._frigate_config['mqtt']['topic_prefix']}" + f"/{self._cam_name}/{self._obj_name}" + ), + "encoding": None, + }, }, ) @@ -74,14 +96,14 @@ def _state_message_received(self, msg: ReceiveMessage) -> None: self._is_on = int(msg.payload) > 0 except ValueError: self._is_on = False - super()._state_message_received(msg) + self.async_write_ha_state() @property def unique_id(self) -> str: """Return a unique ID for this entity.""" return get_frigate_entity_unique_id( self._config_entry.entry_id, - "motion_sensor", + "occupancy_sensor", f"{self._cam_name}_{self._obj_name}", ) @@ -102,7 +124,7 @@ def device_info(self) -> dict[str, Any]: @property def name(self) -> str: """Return the name of the sensor.""" - return f"{get_friendly_name(self._cam_name)} {self._obj_name} Motion".title() + return f"{self._obj_name} occupancy" @property def is_on(self) -> bool: @@ -110,9 +132,80 @@ def is_on(self) -> bool: return self._is_on @property - def entity_registry_enabled_default(self) -> bool: - """Whether or not the entity is enabled by default.""" - return self._obj_name != "all" + def device_class(self) -> str: + """Return the device class.""" + return cast(str, DEVICE_CLASS_OCCUPANCY) + + @property + def icon(self) -> str: + """Return the icon of the sensor.""" + return get_dynamic_icon_from_type(self._obj_name, self._is_on) + + +class FrigateMotionSensor(FrigateMQTTEntity, BinarySensorEntity): # type: ignore[misc] + """Frigate Motion Sensor class.""" + + _attr_name = "Motion" + + def __init__( + self, + config_entry: ConfigEntry, + frigate_config: dict[str, Any], + cam_name: str, + ) -> None: + """Construct a new FrigateMotionSensor.""" + self._cam_name = cam_name + self._is_on = False + self._frigate_config = frigate_config + + super().__init__( + config_entry, + frigate_config, + { + "state_topic": { + "msg_callback": self._state_message_received, + "qos": 0, + "topic": ( + f"{self._frigate_config['mqtt']['topic_prefix']}" + f"/{self._cam_name}/motion" + ), + }, + }, + ) + + @callback # type: ignore[misc] + def _state_message_received(self, msg: ReceiveMessage) -> None: + """Handle a new received MQTT state message.""" + self._is_on = msg.payload == "ON" + self.async_write_ha_state() + + @property + def unique_id(self) -> str: + """Return a unique ID for this entity.""" + return get_frigate_entity_unique_id( + self._config_entry.entry_id, + "motion_sensor", + f"{self._cam_name}", + ) + + @property + def device_info(self) -> dict[str, Any]: + """Return device information.""" + return { + "identifiers": { + get_frigate_device_identifier(self._config_entry, self._cam_name) + }, + "via_device": get_frigate_device_identifier(self._config_entry), + "name": get_friendly_name(self._cam_name), + "model": self._get_model(), + "configuration_url": f"{self._config_entry.data.get(CONF_URL)}/cameras/{self._cam_name if self._cam_name not in get_zones(self._frigate_config) else ''}", + "manufacturer": NAME, + } + + @property + def is_on(self) -> bool: + """Return true if the binary sensor is on.""" + return self._is_on @property def device_class(self) -> str: diff --git a/custom_components/frigate/camera.py b/custom_components/frigate/camera.py index 425d81505..10aea4e7d 100644 --- a/custom_components/frigate/camera.py +++ b/custom_components/frigate/camera.py @@ -7,12 +7,16 @@ import aiohttp import async_timeout from jinja2 import Template +import voluptuous as vol from yarl import URL -from homeassistant.components.camera import SUPPORT_STREAM, Camera +from custom_components.frigate.api import FrigateApiClient +from homeassistant.components.camera import Camera, CameraEntityFeature +from homeassistant.components.mqtt import async_publish from homeassistant.config_entries import ConfigEntry from homeassistant.const import CONF_URL from homeassistant.core import HomeAssistant, callback +from homeassistant.helpers import entity_platform from homeassistant.helpers.aiohttp_client import async_get_clientsession from homeassistant.helpers.entity import DeviceInfo from homeassistant.helpers.entity_platform import AddEntitiesCallback @@ -27,10 +31,15 @@ get_frigate_entity_unique_id, ) from .const import ( + ATTR_CLIENT, ATTR_CONFIG, + ATTR_EVENT_ID, + ATTR_FAVORITE, CONF_RTMP_URL_TEMPLATE, + DEVICE_CLASS_CAMERA, DOMAIN, NAME, + SERVICE_FAVORITE_EVENT, STATE_DETECTED, STATE_IDLE, ) @@ -44,10 +53,13 @@ async def async_setup_entry( """Camera entry setup.""" frigate_config = hass.data[DOMAIN][entry.entry_id][ATTR_CONFIG] + frigate_client = hass.data[DOMAIN][entry.entry_id][ATTR_CLIENT] async_add_entities( [ - FrigateCamera(entry, cam_name, frigate_config, camera_config) + FrigateCamera( + entry, cam_name, frigate_client, frigate_config, camera_config + ) for cam_name, camera_config in frigate_config["cameras"].items() ] + [ @@ -56,36 +68,76 @@ async def async_setup_entry( ] ) + # setup services + platform = entity_platform.async_get_current_platform() + platform.async_register_entity_service( + SERVICE_FAVORITE_EVENT, + { + vol.Required(ATTR_EVENT_ID): str, + vol.Optional(ATTR_FAVORITE, default=True): bool, + }, + SERVICE_FAVORITE_EVENT, + ) + class FrigateCamera(FrigateMQTTEntity, Camera): # type: ignore[misc] """Representation a Frigate camera.""" + # sets the entity name to same as device name ex: camera.front_doorbell + _attr_name = None + def __init__( self, config_entry: ConfigEntry, cam_name: str, + frigate_client: FrigateApiClient, frigate_config: dict[str, Any], camera_config: dict[str, Any], ) -> None: """Initialize a Frigate camera.""" + self._client = frigate_client + self._frigate_config = frigate_config + self._camera_config = camera_config + self._cam_name = cam_name super().__init__( config_entry, frigate_config, { - "topic": ( - f"{frigate_config['mqtt']['topic_prefix']}" - f"/{cam_name}/recordings/state" - ), - "encoding": None, + "state_topic": { + "msg_callback": self._state_message_received, + "qos": 0, + "topic": ( + f"{self._frigate_config['mqtt']['topic_prefix']}" + f"/{self._cam_name}/recordings/state" + ), + "encoding": None, + }, + "motion_topic": { + "msg_callback": self._motion_message_received, + "qos": 0, + "topic": ( + f"{self._frigate_config['mqtt']['topic_prefix']}" + f"/{self._cam_name}/motion/state" + ), + "encoding": None, + }, }, ) FrigateEntity.__init__(self, config_entry) Camera.__init__(self) - self._cam_name = cam_name - self._camera_config = camera_config self._url = config_entry.data[CONF_URL] + self._attr_is_on = True + # The device_class is used to filter out regular camera entities + # from motion camera entities on selectors + self._attr_device_class = DEVICE_CLASS_CAMERA self._attr_is_streaming = self._camera_config.get("rtmp", {}).get("enabled") self._attr_is_recording = self._camera_config.get("record", {}).get("enabled") + self._attr_motion_detection_enabled = self._camera_config.get("motion", {}).get( + "enabled" + ) + self._set_motion_topic = ( + f"{frigate_config['mqtt']['topic_prefix']}" f"/{self._cam_name}/motion/set" + ) streaming_template = config_entry.options.get( CONF_RTMP_URL_TEMPLATE, "" @@ -106,7 +158,13 @@ def __init__( def _state_message_received(self, msg: ReceiveMessage) -> None: """Handle a new received MQTT state message.""" self._attr_is_recording = msg.payload.decode("utf-8") == "ON" - super()._state_message_received(msg) + self.async_write_ha_state() + + @callback # type: ignore[misc] + def _motion_message_received(self, msg: ReceiveMessage) -> None: + """Handle a new received MQTT extra message.""" + self._attr_motion_detection_enabled = msg.payload.decode("utf-8") == "ON" + self.async_write_ha_state() @property def unique_id(self) -> str: @@ -117,11 +175,6 @@ def unique_id(self) -> str: self._cam_name, ) - @property - def name(self) -> str: - """Return the name of the camera.""" - return get_friendly_name(self._cam_name) - @property def device_info(self) -> dict[str, Any]: """Return the device information.""" @@ -141,7 +194,8 @@ def supported_features(self) -> int: """Return supported features of this camera.""" if not self._attr_is_streaming: return 0 - return cast(int, SUPPORT_STREAM) + + return cast(int, CameraEntityFeature.STREAM) async def async_camera_image( self, width: int | None = None, height: int | None = None @@ -165,6 +219,30 @@ async def stream_source(self) -> str | None: return None return self._stream_source + async def async_enable_motion_detection(self) -> None: + """Enable motion detection for this camera.""" + await async_publish( + self.hass, + self._set_motion_topic, + "ON", + 0, + False, + ) + + async def async_disable_motion_detection(self) -> None: + """Disable motion detection for this camera.""" + await async_publish( + self.hass, + self._set_motion_topic, + "OFF", + 0, + False, + ) + + async def favorite_event(self, event_id: str, favorite: bool) -> None: + """Favorite an event.""" + await self._client.async_retain(event_id, favorite) + class FrigateMqttSnapshots(FrigateMQTTEntity, Camera): # type: ignore[misc] """Frigate best camera class.""" @@ -177,6 +255,7 @@ def __init__( obj_name: str, ) -> None: """Construct a FrigateMqttSnapshots camera.""" + self._frigate_config = frigate_config self._cam_name = cam_name self._obj_name = obj_name self._last_image: bytes | None = None @@ -186,11 +265,15 @@ def __init__( config_entry, frigate_config, { - "topic": ( - f"{frigate_config['mqtt']['topic_prefix']}" - f"/{self._cam_name}/{self._obj_name}/snapshot" - ), - "encoding": None, + "state_topic": { + "msg_callback": self._state_message_received, + "qos": 0, + "topic": ( + f"{self._frigate_config['mqtt']['topic_prefix']}" + f"/{self._cam_name}/{self._obj_name}/snapshot" + ), + "encoding": None, + }, }, ) Camera.__init__(self) @@ -199,7 +282,7 @@ def __init__( def _state_message_received(self, msg: ReceiveMessage) -> None: """Handle a new received MQTT state message.""" self._last_image = msg.payload - super()._state_message_received(msg) + self.async_write_ha_state() @property def unique_id(self) -> str: @@ -227,7 +310,7 @@ def device_info(self) -> DeviceInfo: @property def name(self) -> str: """Return the name of the sensor.""" - return f"{get_friendly_name(self._cam_name)} {self._obj_name}".title() + return self._obj_name.title() async def async_camera_image( self, width: int | None = None, height: int | None = None diff --git a/custom_components/frigate/config_flow.py b/custom_components/frigate/config_flow.py index e5852cef2..712bb9c44 100644 --- a/custom_components/frigate/config_flow.py +++ b/custom_components/frigate/config_flow.py @@ -5,6 +5,7 @@ from typing import Any, Dict, cast import voluptuous as vol +from voluptuous.validators import All, Range from yarl import URL from homeassistant import config_entries @@ -15,7 +16,9 @@ from .api import FrigateApiClient, FrigateApiClientError from .const import ( + CONF_MEDIA_BROWSER_ENABLE, CONF_NOTIFICATION_PROXY_ENABLE, + CONF_NOTIFICATION_PROXY_EXPIRE_AFTER_SECONDS, CONF_RTMP_URL_TEMPLATE, DEFAULT_HOST, DOMAIN, @@ -147,6 +150,20 @@ async def async_step_init( True, ), ): bool, + vol.Optional( + CONF_MEDIA_BROWSER_ENABLE, + default=self._config_entry.options.get( + CONF_MEDIA_BROWSER_ENABLE, + True, + ), + ): bool, + vol.Optional( + CONF_NOTIFICATION_PROXY_EXPIRE_AFTER_SECONDS, + default=self._config_entry.options.get( + CONF_NOTIFICATION_PROXY_EXPIRE_AFTER_SECONDS, + 0, + ), + ): All(int, Range(min=0)), } return cast( diff --git a/custom_components/frigate/const.py b/custom_components/frigate/const.py index d6f0854ff..a3512bac5 100644 --- a/custom_components/frigate/const.py +++ b/custom_components/frigate/const.py @@ -6,25 +6,19 @@ FRIGATE_RELEASES_URL = "https://github.com/blakeblackshear/frigate/releases" FRIGATE_RELEASE_TAG_URL = f"{FRIGATE_RELEASES_URL}/tag" -# Icons -ICON_CAR = "mdi:shield-car" -ICON_CAT = "mdi:cat" -ICON_CONTRAST = "mdi:contrast-circle" -ICON_DOG = "mdi:dog-side" -ICON_FILM_MULTIPLE = "mdi:filmstrip-box-multiple" -ICON_IMAGE_MULTIPLE = "mdi:image-multiple" -ICON_MOTION_SENSOR = "hass:motion-sensor" -ICON_OTHER = "mdi:shield-alert" -ICON_PERSON = "mdi:shield-account" -ICON_SPEEDOMETER = "mdi:speedometer" - # Platforms BINARY_SENSOR = "binary_sensor" +NUMBER = "number" SENSOR = "sensor" SWITCH = "switch" CAMERA = "camera" UPDATE = "update" -PLATFORMS = [SENSOR, CAMERA, SWITCH, BINARY_SENSOR, UPDATE] +PLATFORMS = [SENSOR, CAMERA, NUMBER, SWITCH, BINARY_SENSOR, UPDATE] + +# Device Classes +# This device class does not exist in HA, but we use it to be able +# to filter cameras in selectors +DEVICE_CLASS_CAMERA = "camera" # Unit of measurement FPS = "fps" @@ -32,17 +26,21 @@ # Attributes ATTR_CLIENT = "client" +ATTR_CLIENT_ID = "client_id" ATTR_CONFIG = "config" ATTR_COORDINATOR = "coordinator" +ATTR_EVENT_ID = "event_id" +ATTR_FAVORITE = "favorite" ATTR_MQTT = "mqtt" -ATTR_CLIENT_ID = "client_id" # Configuration and options CONF_CAMERA_STATIC_IMAGE_HEIGHT = "camera_image_height" +CONF_MEDIA_BROWSER_ENABLE = "media_browser_enable" CONF_NOTIFICATION_PROXY_ENABLE = "notification_proxy_enable" CONF_PASSWORD = "password" CONF_PATH = "path" CONF_RTMP_URL_TEMPLATE = "rtmp_url_template" +CONF_NOTIFICATION_PROXY_EXPIRE_AFTER_SECONDS = "notification_proxy_expire_after_seconds" # Defaults DEFAULT_NAME = DOMAIN @@ -59,6 +57,22 @@ ------------------------------------------------------------------- """ +# Min Values +MAX_CONTOUR_AREA = 50 +MAX_THRESHOLD = 255 + +# Min Values +MIN_CONTOUR_AREA = 15 +MIN_THRESHOLD = 1 + # States STATE_DETECTED = "active" STATE_IDLE = "idle" + +# Statuses +STATUS_ERROR = "error" +STATUS_RUNNING = "running" +STATUS_STARTING = "starting" + +# Frigate Services +SERVICE_FAVORITE_EVENT = "favorite_event" diff --git a/custom_components/frigate/icons.py b/custom_components/frigate/icons.py new file mode 100644 index 000000000..e0848af80 --- /dev/null +++ b/custom_components/frigate/icons.py @@ -0,0 +1,70 @@ +"""Handles icons for different entity types.""" + +ICON_BICYCLE = "mdi:bicycle" +ICON_CAR = "mdi:car" +ICON_CAT = "mdi:cat" +ICON_CONTRAST = "mdi:contrast-circle" +ICON_CORAL = "mdi:scoreboard-outline" +ICON_COW = "mdi:cow" +ICON_DOG = "mdi:dog-side" +ICON_FILM_MULTIPLE = "mdi:filmstrip-box-multiple" +ICON_HORSE = "mdi:horse" +ICON_IMAGE_MULTIPLE = "mdi:image-multiple" +ICON_MOTION_SENSOR = "mdi:motion-sensor" +ICON_MOTORCYCLE = "mdi:motorbike" +ICON_OTHER = "mdi:shield-alert" +ICON_PERSON = "mdi:human" +ICON_SERVER = "mdi:server" +ICON_SPEEDOMETER = "mdi:speedometer" + +ICON_DEFAULT_ON = "mdi:home" + +ICON_CAR_OFF = "mdi:car-off" +ICON_DEFAULT_OFF = "mdi:home-outline" +ICON_DOG_OFF = "mdi:dog-side-off" + + +def get_dynamic_icon_from_type(obj_type: str, is_on: bool) -> str: + """Get icon for a specific object type and current state.""" + + if obj_type == "car": + return ICON_CAR if is_on else ICON_CAR_OFF + if obj_type == "dog": + return ICON_DOG if is_on else ICON_DOG_OFF + + return ICON_DEFAULT_ON if is_on else ICON_DEFAULT_OFF + + +def get_icon_from_switch(switch_type: str) -> str: + """Get icon for a specific switch type.""" + if switch_type == "snapshots": + return ICON_IMAGE_MULTIPLE + if switch_type == "recordings": + return ICON_FILM_MULTIPLE + if switch_type == "improve_contrast": + return ICON_CONTRAST + + return ICON_MOTION_SENSOR + + +def get_icon_from_type(obj_type: str) -> str: + """Get icon for a specific object type.""" + + if obj_type == "person": + return ICON_PERSON + if obj_type == "car": + return ICON_CAR + if obj_type == "dog": + return ICON_DOG + if obj_type == "cat": + return ICON_CAT + if obj_type == "motorcycle": + return ICON_MOTORCYCLE + if obj_type == "bicycle": + return ICON_BICYCLE + if obj_type == "cow": + return ICON_COW + if obj_type == "horse": + return ICON_HORSE + + return ICON_OTHER diff --git a/custom_components/frigate/manifest.json b/custom_components/frigate/manifest.json index 8ba6bf656..00b38066c 100644 --- a/custom_components/frigate/manifest.json +++ b/custom_components/frigate/manifest.json @@ -2,7 +2,7 @@ "domain": "frigate", "documentation": "https://github.com/blakeblackshear/frigate", "name": "Frigate", - "version": "2.3", + "version": "3.0.0", "issue_tracker": "https://github.com/blakeblackshear/frigate-hass-integration/issues", "dependencies": [ "http", diff --git a/custom_components/frigate/media_source.py b/custom_components/frigate/media_source.py index 29ae73202..2151ec9be 100644 --- a/custom_components/frigate/media_source.py +++ b/custom_components/frigate/media_source.py @@ -17,7 +17,6 @@ MEDIA_TYPE_IMAGE, MEDIA_TYPE_VIDEO, ) -from homeassistant.components.media_source.const import MEDIA_MIME_TYPES from homeassistant.components.media_source.error import MediaSourceError, Unresolvable from homeassistant.components.media_source.models import ( BrowseMediaSource, @@ -25,14 +24,16 @@ MediaSourceItem, PlayMedia, ) +from homeassistant.config_entries import ConfigEntry from homeassistant.core import HomeAssistant from homeassistant.helpers.template import DATE_STR_FORMAT from homeassistant.util.dt import DEFAULT_TIME_ZONE from . import get_friendly_name from .api import FrigateApiClient, FrigateApiClientError -from .const import ATTR_CLIENT, DOMAIN, NAME +from .const import CONF_MEDIA_BROWSER_ENABLE, DOMAIN, NAME from .views import ( + get_client_for_frigate_instance_id, get_config_entry_for_frigate_instance_id, get_default_config_entry, get_frigate_instance_id_for_config_entry, @@ -57,13 +58,7 @@ class FrigateBrowseMediaMetadata: def __init__(self, event: dict[str, Any]): """Initialize a FrigateBrowseMediaMetadata object.""" - self.event = { - # Strip out the thumbnail from the Frigate event, as it is already - # included in the BrowseMediaSource. - k: event[k] - for k in event - if k != "thumbnail" - } + self.event = event def as_dict(self) -> dict: """Convert the object to a dictionary.""" @@ -551,18 +546,24 @@ def __init__(self, hass: HomeAssistant): super().__init__(DOMAIN) self.hass = hass + def _is_allowed_as_media_source(self, instance_id: str) -> bool: + """Whether a given frigate instance is allowed as a media source.""" + config_entry: ConfigEntry = get_config_entry_for_frigate_instance_id( + self.hass, instance_id + ) + return ( + config_entry.options.get(CONF_MEDIA_BROWSER_ENABLE, True) is True + if config_entry + else False + ) + def _get_client(self, identifier: Identifier) -> FrigateApiClient: """Get client for a given identifier.""" - config_entry = get_config_entry_for_frigate_instance_id( + client = get_client_for_frigate_instance_id( self.hass, identifier.frigate_instance_id ) - - if config_entry: - client: FrigateApiClient = ( - self.hass.data[DOMAIN].get(config_entry.entry_id, {}).get(ATTR_CLIENT) - ) - if client: - return client + if client: + return client raise MediaSourceError( "Could not find client for frigate instance id: %s" @@ -584,16 +585,19 @@ async def async_resolve_media(self, item: MediaSourceItem) -> PlayMedia: item.identifier, default_frigate_instance_id=self._get_default_frigate_instance_id(), ) - if identifier: + if identifier and self._is_allowed_as_media_source( + identifier.frigate_instance_id + ): server_path = identifier.get_integration_proxy_path() return PlayMedia( f"/api/frigate/{identifier.frigate_instance_id}/{server_path}", identifier.mime_type, ) - raise Unresolvable("Unknown identifier: %s" % item.identifier) + raise Unresolvable("Unknown or disallowed identifier: %s" % item.identifier) async def async_browse_media( - self, item: MediaSourceItem, media_types: tuple[str] = MEDIA_MIME_TYPES + self, + item: MediaSourceItem, ) -> BrowseMediaSource: """Browse media.""" @@ -614,7 +618,9 @@ async def async_browse_media( frigate_instance_id = get_frigate_instance_id_for_config_entry( self.hass, config_entry ) - if frigate_instance_id: + if frigate_instance_id and self._is_allowed_as_media_source( + frigate_instance_id + ): clips_identifier = EventSearchIdentifier( frigate_instance_id, FrigateMediaType.CLIPS ) @@ -671,6 +677,13 @@ async def async_browse_media( default_frigate_instance_id=self._get_default_frigate_instance_id(), ) + if identifier is not None and not self._is_allowed_as_media_source( + identifier.frigate_instance_id + ): + raise MediaSourceError( + "Forbidden media source identifier: %s" % item.identifier + ) + if isinstance(identifier, EventSearchIdentifier): if identifier.frigate_media_type == FrigateMediaType.CLIPS: media_kwargs = {"has_clip": True} @@ -850,7 +863,7 @@ def _build_event_response( title=f"{dt.datetime.fromtimestamp(event['start_time'], DEFAULT_TIME_ZONE).strftime(DATE_STR_FORMAT)} [{duration}s, {event['label'].capitalize()} {int(event['top_score']*100)}%]", can_play=identifier.media_type == MEDIA_TYPE_VIDEO, can_expand=False, - thumbnail=f"data:image/jpeg;base64,{event['thumbnail']}", + thumbnail=f"/api/frigate/{identifier.frigate_instance_id}/thumbnail/{event['id']}", frigate=FrigateBrowseMediaMetadata(event=event), ) ) diff --git a/custom_components/frigate/number.py b/custom_components/frigate/number.py new file mode 100644 index 000000000..9292344af --- /dev/null +++ b/custom_components/frigate/number.py @@ -0,0 +1,242 @@ +"""Number platform for frigate.""" +from __future__ import annotations + +import logging +from typing import Any + +from homeassistant.components.mqtt import async_publish +from homeassistant.components.number import NumberEntity +from homeassistant.config_entries import ConfigEntry +from homeassistant.const import CONF_URL +from homeassistant.core import HomeAssistant, callback +from homeassistant.helpers.entity import DeviceInfo, EntityCategory +from homeassistant.helpers.entity_platform import AddEntitiesCallback + +from . import ( + FrigateMQTTEntity, + ReceiveMessage, + get_cameras, + get_friendly_name, + get_frigate_device_identifier, + get_frigate_entity_unique_id, +) +from .const import ( + ATTR_CONFIG, + DOMAIN, + MAX_CONTOUR_AREA, + MAX_THRESHOLD, + MIN_CONTOUR_AREA, + MIN_THRESHOLD, + NAME, +) +from .icons import ICON_SPEEDOMETER + +_LOGGER: logging.Logger = logging.getLogger(__name__) + +CAMERA_FPS_TYPES = ["camera", "detection", "process", "skipped"] + + +async def async_setup_entry( + hass: HomeAssistant, entry: ConfigEntry, async_add_entities: AddEntitiesCallback +) -> None: + """Sensor entry setup.""" + frigate_config = hass.data[DOMAIN][entry.entry_id][ATTR_CONFIG] + + entities = [] + + # add motion configurations for cameras + for cam_name in get_cameras(frigate_config): + entities.extend( + [FrigateMotionContourArea(entry, frigate_config, cam_name, False)] + ) + entities.extend( + [FrigateMotionThreshold(entry, frigate_config, cam_name, False)] + ) + + async_add_entities(entities) + + +class FrigateMotionContourArea(FrigateMQTTEntity, NumberEntity): # type: ignore[misc] + """FrigateMotionContourArea class.""" + + _attr_entity_category = EntityCategory.CONFIG + _attr_name = "Contour area" + _attr_native_min_value = MIN_CONTOUR_AREA + _attr_native_max_value = MAX_CONTOUR_AREA + _attr_native_step = 1 + + def __init__( + self, + config_entry: ConfigEntry, + frigate_config: dict[str, Any], + cam_name: str, + default_enabled: bool, + ) -> None: + """Construct a FrigateNumber.""" + self._frigate_config = frigate_config + self._cam_name = cam_name + self._attr_native_value = float( + self._frigate_config["cameras"][self._cam_name]["motion"]["contour_area"] + ) + self._command_topic = ( + f"{self._frigate_config['mqtt']['topic_prefix']}" + f"/{self._cam_name}/motion_contour_area/set" + ) + + self._attr_entity_registry_enabled_default = default_enabled + + super().__init__( + config_entry, + frigate_config, + { + "state_topic": { + "msg_callback": self._state_message_received, + "qos": 0, + "topic": ( + f"{self._frigate_config['mqtt']['topic_prefix']}" + f"/{self._cam_name}/motion_contour_area/state" + ), + }, + }, + ) + + @callback # type: ignore[misc] + def _state_message_received(self, msg: ReceiveMessage) -> None: + """Handle a new received MQTT state message.""" + try: + self._attr_native_value = float(msg.payload) + except (TypeError, ValueError): + pass + + self.async_write_ha_state() + + @property + def unique_id(self) -> str: + """Return a unique ID to use for this entity.""" + return get_frigate_entity_unique_id( + self._config_entry.entry_id, + "number", + f"{self._cam_name}_contour_area", + ) + + @property + def device_info(self) -> DeviceInfo: + """Get device information.""" + return { + "identifiers": { + get_frigate_device_identifier(self._config_entry, self._cam_name) + }, + "via_device": get_frigate_device_identifier(self._config_entry), + "name": get_friendly_name(self._cam_name), + "model": self._get_model(), + "configuration_url": f"{self._config_entry.data.get(CONF_URL)}/cameras/{self._cam_name}", + "manufacturer": NAME, + } + + async def async_set_native_value(self, value: float) -> None: + """Update motion contour area.""" + await async_publish( + self.hass, + self._command_topic, + int(value), + 0, + False, + ) + + @property + def icon(self) -> str: + """Return the icon of the number.""" + return ICON_SPEEDOMETER + + +class FrigateMotionThreshold(FrigateMQTTEntity, NumberEntity): # type: ignore[misc] + """FrigateMotionThreshold class.""" + + _attr_entity_category = EntityCategory.CONFIG + _attr_name = "Threshold" + _attr_native_min_value = MIN_THRESHOLD + _attr_native_max_value = MAX_THRESHOLD + _attr_native_step = 1 + + def __init__( + self, + config_entry: ConfigEntry, + frigate_config: dict[str, Any], + cam_name: str, + default_enabled: bool, + ) -> None: + """Construct a FrigateMotionThreshold.""" + self._frigate_config = frigate_config + self._cam_name = cam_name + self._attr_native_value = float( + self._frigate_config["cameras"][self._cam_name]["motion"]["threshold"] + ) + self._command_topic = ( + f"{frigate_config['mqtt']['topic_prefix']}" + f"/{self._cam_name}/motion_threshold/set" + ) + + self._attr_entity_registry_enabled_default = default_enabled + + super().__init__( + config_entry, + frigate_config, + { + "state_topic": { + "msg_callback": self._state_message_received, + "qos": 0, + "topic": ( + f"{self._frigate_config['mqtt']['topic_prefix']}" + f"/{self._cam_name}/motion_threshold/state" + ), + }, + }, + ) + + @callback # type: ignore[misc] + def _state_message_received(self, msg: ReceiveMessage) -> None: + """Handle a new received MQTT state message.""" + try: + self._attr_native_value = float(msg.payload) + except (TypeError, ValueError): + pass + + self.async_write_ha_state() + + @property + def unique_id(self) -> str: + """Return a unique ID to use for this entity.""" + return get_frigate_entity_unique_id( + self._config_entry.entry_id, + "number", + f"{self._cam_name}_threshold", + ) + + @property + def device_info(self) -> DeviceInfo: + """Get device information.""" + return { + "identifiers": { + get_frigate_device_identifier(self._config_entry, self._cam_name) + }, + "via_device": get_frigate_device_identifier(self._config_entry), + "name": get_friendly_name(self._cam_name), + "model": self._get_model(), + "configuration_url": f"{self._config_entry.data.get(CONF_URL)}/cameras/{self._cam_name}", + "manufacturer": NAME, + } + + async def async_set_native_value(self, value: float) -> None: + """Update motion threshold.""" + await async_publish( + self.hass, + self._command_topic, + int(value), + 0, + False, + ) + + @property + def icon(self) -> str: + """Return the icon of the number.""" + return ICON_SPEEDOMETER diff --git a/custom_components/frigate/sensor.py b/custom_components/frigate/sensor.py index 318215419..8c73886b3 100644 --- a/custom_components/frigate/sensor.py +++ b/custom_components/frigate/sensor.py @@ -5,7 +5,7 @@ from typing import Any from homeassistant.config_entries import ConfigEntry -from homeassistant.const import CONF_URL +from homeassistant.const import CONF_URL, TEMP_CELSIUS from homeassistant.core import HomeAssistant, callback from homeassistant.helpers.entity import DeviceInfo, EntityCategory from homeassistant.helpers.entity_platform import AddEntitiesCallback @@ -22,20 +22,8 @@ get_frigate_entity_unique_id, get_zones, ) -from .const import ( - ATTR_CONFIG, - ATTR_COORDINATOR, - DOMAIN, - FPS, - ICON_CAR, - ICON_CAT, - ICON_DOG, - ICON_OTHER, - ICON_PERSON, - ICON_SPEEDOMETER, - MS, - NAME, -) +from .const import ATTR_CONFIG, ATTR_COORDINATOR, DOMAIN, FPS, MS, NAME +from .icons import ICON_CORAL, ICON_SERVER, ICON_SPEEDOMETER, get_icon_from_type _LOGGER: logging.Logger = logging.getLogger(__name__) @@ -56,9 +44,9 @@ async def async_setup_entry( for name in value.keys(): entities.append(DetectorSpeedSensor(coordinator, entry, name)) elif key == "service": - # Media storage statistics, uptime and Frigate version. For now, - # these do not feature in entities. - continue + # Temperature is only supported on PCIe Coral. + for name in value.get("temperatures", {}): + entities.append(DeviceTempSensor(coordinator, entry, name)) else: entities.extend( [CameraFpsSensor(coordinator, entry, key, t) for t in CAMERA_FPS_TYPES] @@ -71,6 +59,7 @@ async def async_setup_entry( for cam_name, obj in get_cameras_zones_and_objects(frigate_config) ] ) + entities.append(FrigateStatusSensor(coordinator, entry)) async_add_entities(entities) @@ -78,6 +67,7 @@ class FrigateFpsSensor(FrigateEntity, CoordinatorEntity): # type: ignore[misc] """Frigate Sensor class.""" _attr_entity_category = EntityCategory.DIAGNOSTIC + _attr_name = "Detection fps" def __init__( self, coordinator: FrigateDataUpdateCoordinator, config_entry: ConfigEntry @@ -85,6 +75,7 @@ def __init__( """Construct a FrigateFpsSensor.""" FrigateEntity.__init__(self, config_entry) CoordinatorEntity.__init__(self, coordinator) + self._attr_entity_registry_enabled_default = False @property def unique_id(self) -> str: @@ -104,11 +95,6 @@ def device_info(self) -> DeviceInfo: "manufacturer": NAME, } - @property - def name(self) -> str: - """Return the name of the sensor.""" - return "Detection Fps" - @property def state(self) -> int | None: """Return the state of the sensor.""" @@ -132,6 +118,49 @@ def icon(self) -> str: return ICON_SPEEDOMETER +class FrigateStatusSensor(FrigateEntity, CoordinatorEntity): # type: ignore[misc] + """Frigate Status Sensor class.""" + + _attr_entity_category = EntityCategory.DIAGNOSTIC + _attr_name = "Status" + + def __init__( + self, coordinator: FrigateDataUpdateCoordinator, config_entry: ConfigEntry + ) -> None: + """Construct a FrigateStatusSensor.""" + FrigateEntity.__init__(self, config_entry) + CoordinatorEntity.__init__(self, coordinator) + self._attr_entity_registry_enabled_default = False + + @property + def unique_id(self) -> str: + """Return a unique ID to use for this entity.""" + return get_frigate_entity_unique_id( + self._config_entry.entry_id, "sensor_status", "frigate" + ) + + @property + def device_info(self) -> DeviceInfo: + """Get device information.""" + return { + "identifiers": {get_frigate_device_identifier(self._config_entry)}, + "name": NAME, + "model": self._get_model(), + "configuration_url": self._config_entry.data.get(CONF_URL), + "manufacturer": NAME, + } + + @property + def state(self) -> str: + """Return the state of the sensor.""" + return str(self.coordinator.server_status) + + @property + def icon(self) -> str: + """Return the icon of the sensor.""" + return ICON_SERVER + + class DetectorSpeedSensor(FrigateEntity, CoordinatorEntity): # type: ignore[misc] """Frigate Detector Speed class.""" @@ -147,6 +176,7 @@ def __init__( FrigateEntity.__init__(self, config_entry) CoordinatorEntity.__init__(self, coordinator) self._detector_name = detector_name + self._attr_entity_registry_enabled_default = False @property def unique_id(self) -> str: @@ -169,7 +199,7 @@ def device_info(self) -> DeviceInfo: @property def name(self) -> str: """Return the name of the sensor.""" - return f"{get_friendly_name(self._detector_name)} inference speed".title() + return f"{get_friendly_name(self._detector_name)} inference speed" @property def state(self) -> int | None: @@ -215,6 +245,7 @@ def __init__( CoordinatorEntity.__init__(self, coordinator) self._cam_name = cam_name self._fps_type = fps_type + self._attr_entity_registry_enabled_default = False @property def unique_id(self) -> str: @@ -242,7 +273,7 @@ def device_info(self) -> DeviceInfo: @property def name(self) -> str: """Return the name of the sensor.""" - return f"{get_friendly_name(self._cam_name)} {self._fps_type} FPS".title() + return f"{self._fps_type} fps" @property def unit_of_measurement(self) -> str: @@ -285,26 +316,21 @@ def __init__( self._obj_name = obj_name self._state = 0 self._frigate_config = frigate_config - - if self._obj_name == "person": - self._icon = ICON_PERSON - elif self._obj_name == "car": - self._icon = ICON_CAR - elif self._obj_name == "dog": - self._icon = ICON_DOG - elif self._obj_name == "cat": - self._icon = ICON_CAT - else: - self._icon = ICON_OTHER + self._icon = get_icon_from_type(self._obj_name) super().__init__( config_entry, frigate_config, { - "topic": ( - f"{frigate_config['mqtt']['topic_prefix']}" - f"/{self._cam_name}/{self._obj_name}" - ) + "state_topic": { + "msg_callback": self._state_message_received, + "qos": 0, + "topic": ( + f"{self._frigate_config['mqtt']['topic_prefix']}" + f"/{self._cam_name}/{self._obj_name}" + ), + "encoding": None, + }, }, ) @@ -313,7 +339,7 @@ def _state_message_received(self, msg: ReceiveMessage) -> None: """Handle a new received MQTT state message.""" try: self._state = int(msg.payload) - super()._state_message_received(msg) + self.async_write_ha_state() except ValueError: pass @@ -329,7 +355,6 @@ def unique_id(self) -> str: @property def device_info(self) -> DeviceInfo: """Get device information.""" - return { "identifiers": { get_frigate_device_identifier(self._config_entry, self._cam_name) @@ -344,7 +369,7 @@ def device_info(self) -> DeviceInfo: @property def name(self) -> str: """Return the name of the sensor.""" - return f"{get_friendly_name(self._cam_name)} {self._obj_name}".title() + return f"{self._obj_name} count" @property def state(self) -> int: @@ -361,7 +386,68 @@ def icon(self) -> str: """Return the icon of the sensor.""" return self._icon + +class DeviceTempSensor(FrigateEntity, CoordinatorEntity): # type: ignore[misc] + """Frigate Coral Temperature Sensor class.""" + + _attr_entity_category = EntityCategory.DIAGNOSTIC + + def __init__( + self, + coordinator: FrigateDataUpdateCoordinator, + config_entry: ConfigEntry, + name: str, + ) -> None: + """Construct a CoralTempSensor.""" + self._name = name + FrigateEntity.__init__(self, config_entry) + CoordinatorEntity.__init__(self, coordinator) + self._attr_entity_registry_enabled_default = False + + @property + def unique_id(self) -> str: + """Return a unique ID to use for this entity.""" + return get_frigate_entity_unique_id( + self._config_entry.entry_id, "sensor_temp", self._name + ) + @property - def entity_registry_enabled_default(self) -> bool: - """Whether or not the entity is enabled by default.""" - return self._obj_name != "all" + def device_info(self) -> DeviceInfo: + """Get device information.""" + return { + "identifiers": {get_frigate_device_identifier(self._config_entry)}, + "name": NAME, + "model": self._get_model(), + "configuration_url": self._config_entry.data.get(CONF_URL), + "manufacturer": NAME, + } + + @property + def name(self) -> str: + """Return the name of the sensor.""" + return f"{get_friendly_name(self._name)} temperature" + + @property + def state(self) -> float | None: + """Return the state of the sensor.""" + if self.coordinator.data: + data = ( + self.coordinator.data.get("service", {}) + .get("temperatures", {}) + .get(self._name, 0.0) + ) + try: + return float(data) + except (TypeError, ValueError): + pass + return None + + @property + def unit_of_measurement(self) -> Any: + """Return the unit of measurement of the sensor.""" + return TEMP_CELSIUS + + @property + def icon(self) -> str: + """Return the icon of the sensor.""" + return ICON_CORAL diff --git a/custom_components/frigate/services.yaml b/custom_components/frigate/services.yaml new file mode 100644 index 000000000..4144929fa --- /dev/null +++ b/custom_components/frigate/services.yaml @@ -0,0 +1,32 @@ +--- +favorite_event: + name: Favorite or unfavorite Event + description: > + Favorites or unfavorites an event. Favorited events are retained + indefinitely. + target: + entity: + integration: frigate + domain: camera + device_class: camera + fields: + event_id: + name: Event ID + description: ID of the event to favorite or unfavorite. + required: true + advanced: false + example: "1656510950.19548-ihtjj7" + default: "" + selector: + text: + favorite: + name: Favorite + description: > + If the event should be favorited or unfavorited. Enable to favorite, + disable to unfavorite. + required: false + advanced: false + example: true + default: true + selector: + boolean: diff --git a/custom_components/frigate/switch.py b/custom_components/frigate/switch.py index 4d1db59e4..1b33820be 100644 --- a/custom_components/frigate/switch.py +++ b/custom_components/frigate/switch.py @@ -19,15 +19,8 @@ get_frigate_device_identifier, get_frigate_entity_unique_id, ) -from .const import ( - ATTR_CONFIG, - DOMAIN, - ICON_CONTRAST, - ICON_FILM_MULTIPLE, - ICON_IMAGE_MULTIPLE, - ICON_MOTION_SENSOR, - NAME, -) +from .const import ATTR_CONFIG, DOMAIN, NAME +from .icons import get_icon_from_switch _LOGGER: logging.Logger = logging.getLogger(__name__) @@ -43,7 +36,7 @@ async def async_setup_entry( entities.extend( [ FrigateSwitch(entry, frigate_config, camera, "detect", True), - FrigateSwitch(entry, frigate_config, camera, "motion", False), + FrigateSwitch(entry, frigate_config, camera, "motion", True), FrigateSwitch(entry, frigate_config, camera, "recordings", True), FrigateSwitch(entry, frigate_config, camera, "snapshots", True), FrigateSwitch(entry, frigate_config, camera, "improve_contrast", False), @@ -66,7 +59,7 @@ def __init__( default_enabled: bool, ) -> None: """Construct a FrigateSwitch.""" - + self._frigate_config = frigate_config self._cam_name = cam_name self._switch_name = switch_name self._is_on = False @@ -76,24 +69,19 @@ def __init__( ) self._attr_entity_registry_enabled_default = default_enabled - - if self._switch_name == "snapshots": - self._icon = ICON_IMAGE_MULTIPLE - elif self._switch_name == "recordings": - self._icon = ICON_FILM_MULTIPLE - elif self._switch_name == "improve_contrast": - self._icon = ICON_CONTRAST - else: - self._icon = ICON_MOTION_SENSOR - + self._icon = get_icon_from_switch(self._switch_name) super().__init__( config_entry, frigate_config, { - "topic": ( - f"{frigate_config['mqtt']['topic_prefix']}" - f"/{self._cam_name}/{self._switch_name}/state" - ) + "state_topic": { + "msg_callback": self._state_message_received, + "qos": 0, + "topic": ( + f"{self._frigate_config['mqtt']['topic_prefix']}" + f"/{self._cam_name}/{self._switch_name}/state" + ), + }, }, ) @@ -101,7 +89,7 @@ def __init__( def _state_message_received(self, msg: ReceiveMessage) -> None: """Handle a new received MQTT state message.""" self._is_on = msg.payload == "ON" - super()._state_message_received(msg) + self.async_write_ha_state() @property def unique_id(self) -> str: @@ -129,13 +117,18 @@ def device_info(self) -> DeviceInfo: @property def name(self) -> str: """Return the name of the sensor.""" - return f"{get_friendly_name(self._cam_name)} {get_friendly_name(self._switch_name)}".title() + return f"{get_friendly_name(self._switch_name)}".title() @property def is_on(self) -> bool: """Return true if the binary sensor is on.""" return self._is_on + @property + def icon(self) -> str: + """Return the icon of the sensor.""" + return self._icon + async def async_turn_on(self, **kwargs: Any) -> None: """Turn the device on.""" await async_publish( @@ -155,8 +148,3 @@ async def async_turn_off(self, **kwargs: Any) -> None: 0, False, ) - - @property - def icon(self) -> str: - """Return the icon of the sensor.""" - return self._icon diff --git a/custom_components/frigate/translations/en.json b/custom_components/frigate/translations/en.json index 8019346b5..6df23335f 100644 --- a/custom_components/frigate/translations/en.json +++ b/custom_components/frigate/translations/en.json @@ -21,7 +21,9 @@ "init": { "data": { "rtmp_url_template": "RTMP URL template (see documentation)", - "notification_proxy_enable": "Enable the unauthenticated notification event proxy" + "media_browser_enable": "Enable the media browser", + "notification_proxy_enable": "Enable the unauthenticated notification event proxy", + "notification_proxy_expire_after_seconds": "Disallow unauthenticated notification access after seconds (0=never)" } } }, diff --git a/custom_components/frigate/update.py b/custom_components/frigate/update.py index 7b1f4a1a4..5f9bb99ee 100644 --- a/custom_components/frigate/update.py +++ b/custom_components/frigate/update.py @@ -36,7 +36,7 @@ async def async_setup_entry( class FrigateContainerUpdate(FrigateEntity, UpdateEntity, CoordinatorEntity): # type: ignore[misc] """Frigate container update.""" - _attr_name = "Frigate Server" + _attr_name = "Server" def __init__( self, diff --git a/custom_components/frigate/views.py b/custom_components/frigate/views.py index 48835bca5..0dfdcc071 100644 --- a/custom_components/frigate/views.py +++ b/custom_components/frigate/views.py @@ -2,6 +2,8 @@ from __future__ import annotations import asyncio +from collections.abc import Mapping +import datetime from http import HTTPStatus from ipaddress import ip_address import logging @@ -14,14 +16,17 @@ from multidict import CIMultiDict from yarl import URL +from custom_components.frigate.api import FrigateApiClient from custom_components.frigate.const import ( + ATTR_CLIENT, ATTR_CLIENT_ID, ATTR_CONFIG, ATTR_MQTT, CONF_NOTIFICATION_PROXY_ENABLE, + CONF_NOTIFICATION_PROXY_EXPIRE_AFTER_SECONDS, DOMAIN, ) -from homeassistant.components.http import HomeAssistantView +from homeassistant.components.http import KEY_AUTHENTICATED, HomeAssistantView from homeassistant.components.http.auth import DATA_SIGN_SECRET, SIGN_QUERY_PARAM from homeassistant.components.http.const import KEY_HASS from homeassistant.config_entries import ConfigEntry @@ -67,6 +72,20 @@ def get_config_entry_for_frigate_instance_id( return None +def get_client_for_frigate_instance_id( + hass: HomeAssistant, frigate_instance_id: str +) -> FrigateApiClient | None: + """Get a client for a given frigate_instance_id.""" + + config_entry = get_config_entry_for_frigate_instance_id(hass, frigate_instance_id) + if config_entry: + return cast( + FrigateApiClient, + hass.data[DOMAIN].get(config_entry.entry_id, {}).get(ATTR_CLIENT), + ) + return None + + def get_frigate_instance_id_for_config_entry( hass: HomeAssistant, config_entry: ConfigEntry, @@ -104,7 +123,9 @@ def _create_path(self, **kwargs: Any) -> str | None: """Create path.""" raise NotImplementedError # pragma: no cover - def _permit_request(self, request: web.Request, config_entry: ConfigEntry) -> bool: + def _permit_request( + self, request: web.Request, config_entry: ConfigEntry, **kwargs: Any + ) -> bool: """Determine whether to permit a request.""" return True @@ -122,6 +143,11 @@ async def get( raise HTTPBadGateway() from None + @staticmethod + def _get_query_params(request: web.Request) -> Mapping[str, str]: + """Get the query params to send upstream.""" + return {k: v for k, v in request.query.items() if k != "authSig"} + async def _handle_request( self, request: web.Request, @@ -133,7 +159,7 @@ async def _handle_request( if not config_entry: return web.Response(status=HTTPStatus.BAD_REQUEST) - if not self._permit_request(request, config_entry): + if not self._permit_request(request, config_entry, **kwargs): return web.Response(status=HTTPStatus.FORBIDDEN) full_path = self._create_path(**kwargs) @@ -148,7 +174,7 @@ async def _handle_request( request.method, url, headers=source_header, - params=request.query, + params=self._get_query_params(request), allow_redirects=False, data=data, ) as result: @@ -160,7 +186,7 @@ async def _handle_request( try: await response.prepare(request) - async for data in result.content.iter_chunked(4096): + async for data in result.content.iter_any(): await response.write(data) except (aiohttp.ClientError, aiohttp.ClientPayloadError) as err: @@ -185,6 +211,18 @@ def _create_path(self, **kwargs: Any) -> str | None: return f"api/events/{kwargs['eventid']}/snapshot.jpg" +class ThumbnailsProxyView(ProxyView): + """A proxy for snapshots.""" + + url = "/api/frigate/{frigate_instance_id:.+}/thumbnail/{eventid:.*}" + + name = "api:frigate:thumbnails" + + def _create_path(self, **kwargs: Any) -> str | None: + """Create path.""" + return f"api/events/{kwargs['eventid']}/thumbnail.jpg" + + class NotificationsProxyView(ProxyView): """A proxy for notifications.""" @@ -207,9 +245,49 @@ def _create_path(self, **kwargs: Any) -> str | None: return f"api/events/{event_id}/clip.mp4" return None - def _permit_request(self, request: web.Request, config_entry: ConfigEntry) -> bool: + def _permit_request( + self, request: web.Request, config_entry: ConfigEntry, **kwargs: Any + ) -> bool: """Determine whether to permit a request.""" - return bool(config_entry.options.get(CONF_NOTIFICATION_PROXY_ENABLE, True)) + + is_notification_proxy_enabled = bool( + config_entry.options.get(CONF_NOTIFICATION_PROXY_ENABLE, True) + ) + + # If proxy is disabled, immediately reject + if not is_notification_proxy_enabled: + return False + + # Authenticated requests are always allowed. + if request[KEY_AUTHENTICATED]: + return True + + # If request is not authenticated, check whether it is expired. + notification_expiration_seconds = int( + config_entry.options.get(CONF_NOTIFICATION_PROXY_EXPIRE_AFTER_SECONDS, 0) + ) + + # If notification events never expire, immediately permit. + if notification_expiration_seconds == 0: + return True + + try: + event_id_timestamp = int(kwargs["event_id"].partition(".")[0]) + event_datetime = datetime.datetime.fromtimestamp( + event_id_timestamp, tz=datetime.timezone.utc + ) + now_datetime = datetime.datetime.now(tz=datetime.timezone.utc) + expiration_datetime = event_datetime + datetime.timedelta( + seconds=notification_expiration_seconds + ) + + # Otherwise, permit only if notification event is not expired + return now_datetime.timestamp() <= expiration_datetime.timestamp() + except ValueError: + _LOGGER.warning( + "The event id %s does not have a valid format.", kwargs["event_id"] + ) + return False class VodProxyView(ProxyView): @@ -218,7 +296,12 @@ class VodProxyView(ProxyView): url = "/api/frigate/{frigate_instance_id:.+}/vod/{path:.+}/{manifest:.+}.m3u8" extra_urls = ["/api/frigate/vod/{path:.+}/{manifest:.+}.m3u8"] - name = "api:frigate:vod:mainfest" + name = "api:frigate:vod:manifest" + + @staticmethod + def _get_query_params(request: web.Request) -> Mapping[str, str]: + """Get the query params to send upstream.""" + return request.query def _create_path(self, **kwargs: Any) -> str | None: """Create path.""" @@ -228,15 +311,15 @@ def _create_path(self, **kwargs: Any) -> str | None: class VodSegmentProxyView(ProxyView): """A proxy for vod segments.""" - url = "/api/frigate/{frigate_instance_id:.+}/vod/{path:.+}/{segment:.+}.ts" - extra_urls = ["/api/frigate/vod/{path:.+}/{segment:.+}.ts"] + url = "/api/frigate/{frigate_instance_id:.+}/vod/{path:.+}/{segment:.+}.{extension:(ts|m4s|mp4)}" + extra_urls = ["/api/frigate/vod/{path:.+}/{segment:.+}.{extension:(ts|m4s|mp4)}"] name = "api:frigate:vod:segment" requires_auth = False def _create_path(self, **kwargs: Any) -> str | None: """Create path.""" - return f"vod/{kwargs['path']}/{kwargs['segment']}.ts" + return f"vod/{kwargs['path']}/{kwargs['segment']}.{kwargs['extension']}" async def _async_validate_signed_manifest(self, request: web.Request) -> bool: """Validate the signature for the manifest of this segment.""" @@ -311,7 +394,7 @@ async def _handle_request( if not config_entry: return web.Response(status=HTTPStatus.BAD_REQUEST) - if not self._permit_request(request, config_entry): + if not self._permit_request(request, config_entry, **kwargs): return web.Response(status=HTTPStatus.FORBIDDEN) full_path = self._create_path(**kwargs) @@ -423,6 +506,12 @@ def _response_header(response: aiohttp.ClientResponse) -> dict[str, str]: # hdrs.CONTENT_LENGTH, hdrs.CONTENT_TYPE, hdrs.CONTENT_ENCODING, + # Strips inbound CORS response headers since the aiohttp_cors + # library will assert that they are not already present for CORS + # requests. + hdrs.ACCESS_CONTROL_ALLOW_ORIGIN, + hdrs.ACCESS_CONTROL_ALLOW_CREDENTIALS, + hdrs.ACCESS_CONTROL_EXPOSE_HEADERS, ): continue headers[name] = value diff --git a/custom_components/frigate/ws_api.py b/custom_components/frigate/ws_api.py new file mode 100644 index 000000000..a54160aca --- /dev/null +++ b/custom_components/frigate/ws_api.py @@ -0,0 +1,226 @@ +"""Frigate HTTP views.""" +from __future__ import annotations + +import logging + +import voluptuous as vol + +from custom_components.frigate.api import FrigateApiClient, FrigateApiClientError +from custom_components.frigate.views import get_client_for_frigate_instance_id +from homeassistant.components import websocket_api +from homeassistant.core import HomeAssistant + +_LOGGER: logging.Logger = logging.getLogger(__name__) + + +def async_setup(hass: HomeAssistant) -> None: + """Set up the recorder websocket API.""" + websocket_api.async_register_command(hass, ws_retain_event) + websocket_api.async_register_command(hass, ws_get_recordings) + websocket_api.async_register_command(hass, ws_get_recordings_summary) + websocket_api.async_register_command(hass, ws_get_events) + websocket_api.async_register_command(hass, ws_get_events_summary) + + +def _get_client_or_send_error( + hass: HomeAssistant, + instance_id: str, + msg_id: int, + connection: websocket_api.ActiveConnection, +) -> FrigateApiClient | None: + """Get the API client or send an error that it cannot be found.""" + client = get_client_for_frigate_instance_id(hass, instance_id) + if client is None: + connection.send_error( + msg_id, + websocket_api.const.ERR_NOT_FOUND, + f"Unable to find Frigate instance with ID: {instance_id}", + ) + return None + return client + + +@websocket_api.websocket_command( + { + vol.Required("type"): "frigate/event/retain", + vol.Required("instance_id"): str, + vol.Required("event_id"): str, + vol.Required("retain"): bool, + } +) # type: ignore[misc] +@websocket_api.async_response # type: ignore[misc] +async def ws_retain_event( + hass: HomeAssistant, + connection: websocket_api.ActiveConnection, + msg: dict, +) -> None: + """Un/Retain an event.""" + client = _get_client_or_send_error(hass, msg["instance_id"], msg["id"], connection) + if not client: + return + try: + connection.send_result( + msg["id"], + await client.async_retain( + msg["event_id"], msg["retain"], decode_json=False + ), + ) + except FrigateApiClientError: + connection.send_error( + msg["id"], + "frigate_error", + f"API error whilst un/retaining event {msg['event_id']} " + f"for Frigate instance {msg['instance_id']}", + ) + + +@websocket_api.websocket_command( + { + vol.Required("type"): "frigate/recordings/get", + vol.Required("instance_id"): str, + vol.Required("camera"): str, + vol.Optional("after"): int, + vol.Optional("before"): int, + } +) # type: ignore[misc] +@websocket_api.async_response # type: ignore[misc] +async def ws_get_recordings( + hass: HomeAssistant, + connection: websocket_api.ActiveConnection, + msg: dict, +) -> None: + """Get recordings for a camera.""" + client = _get_client_or_send_error(hass, msg["instance_id"], msg["id"], connection) + if not client: + return + try: + connection.send_result( + msg["id"], + await client.async_get_recordings( + msg["camera"], msg.get("after"), msg.get("before"), decode_json=False + ), + ) + except FrigateApiClientError: + connection.send_error( + msg["id"], + "frigate_error", + f"API error whilst retrieving recordings for camera {msg['camera']} " + f"for Frigate instance {msg['instance_id']}", + ) + + +@websocket_api.websocket_command( + { + vol.Required("type"): "frigate/recordings/summary", + vol.Required("instance_id"): str, + vol.Required("camera"): str, + } +) # type: ignore[misc] +@websocket_api.async_response # type: ignore[misc] +async def ws_get_recordings_summary( + hass: HomeAssistant, + connection: websocket_api.ActiveConnection, + msg: dict, +) -> None: + """Get recordings summary for a camera.""" + client = _get_client_or_send_error(hass, msg["instance_id"], msg["id"], connection) + if not client: + return + try: + connection.send_result( + msg["id"], + await client.async_get_recordings_summary(msg["camera"], decode_json=False), + ) + except FrigateApiClientError: + connection.send_error( + msg["id"], + "frigate_error", + f"API error whilst retrieving recordings summary for camera " + f"{msg['camera']} for Frigate instance {msg['instance_id']}", + ) + + +@websocket_api.websocket_command( + { + vol.Required("type"): "frigate/events/get", + vol.Required("instance_id"): str, + vol.Optional("camera"): str, + vol.Optional("label"): str, + vol.Optional("zone"): str, + vol.Optional("after"): int, + vol.Optional("before"): int, + vol.Optional("limit"): int, + vol.Optional("has_clip"): bool, + vol.Optional("has_snapshot"): bool, + } +) # type: ignore[misc] +@websocket_api.async_response # type: ignore[misc] +async def ws_get_events( + hass: HomeAssistant, + connection: websocket_api.ActiveConnection, + msg: dict, +) -> None: + """Get events.""" + client = _get_client_or_send_error(hass, msg["instance_id"], msg["id"], connection) + if not client: + return + + try: + connection.send_result( + msg["id"], + await client.async_get_events( + msg.get("camera"), + msg.get("label"), + msg.get("zone"), + msg.get("after"), + msg.get("before"), + msg.get("limit"), + msg.get("has_clip"), + msg.get("has_snapshot"), + decode_json=False, + ), + ) + except FrigateApiClientError: + connection.send_error( + msg["id"], + "frigate_error", + f"API error whilst retrieving events for camera " + f"{msg['camera']} for Frigate instance {msg['instance_id']}", + ) + + +@websocket_api.websocket_command( + { + vol.Required("type"): "frigate/events/summary", + vol.Required("instance_id"): str, + vol.Optional("has_clip"): bool, + vol.Optional("has_snapshot"): bool, + } +) # type: ignore[misc] +@websocket_api.async_response # type: ignore[misc] +async def ws_get_events_summary( + hass: HomeAssistant, + connection: websocket_api.ActiveConnection, + msg: dict, +) -> None: + """Get events.""" + client = _get_client_or_send_error(hass, msg["instance_id"], msg["id"], connection) + if not client: + return + + try: + connection.send_result( + msg["id"], + await client.async_get_event_summary( + msg.get("has_clip"), + msg.get("has_snapshot"), + decode_json=False, + ), + ) + except FrigateApiClientError: + connection.send_error( + msg["id"], + "frigate_error", + f"API error whilst retrieving events summary for Frigate instance " + f"{msg['instance_id']}", + ) diff --git a/custom_components/garbage_collection/__init__.py b/custom_components/garbage_collection/__init__.py new file mode 100644 index 000000000..32423fc68 --- /dev/null +++ b/custom_components/garbage_collection/__init__.py @@ -0,0 +1,372 @@ +"""Component to integrate with garbage_colection.""" +from __future__ import annotations + +import asyncio +import logging +from datetime import timedelta +from types import MappingProxyType +from typing import Any, Dict + +import homeassistant.helpers.config_validation as cv +import homeassistant.util.dt as dt_util +import voluptuous as vol +from dateutil.relativedelta import relativedelta +from homeassistant.config_entries import ConfigEntry +from homeassistant.const import ATTR_HIDDEN, CONF_ENTITIES, CONF_ENTITY_ID, WEEKDAYS +from homeassistant.core import HomeAssistant, ServiceCall +from homeassistant.helpers.typing import ConfigType + +from . import const, helpers + +MIN_TIME_BETWEEN_UPDATES = timedelta(seconds=30) + +_LOGGER = logging.getLogger(__name__) + +months = [m["value"] for m in const.MONTH_OPTIONS] +frequencies = [f["value"] for f in const.FREQUENCY_OPTIONS] + +SENSOR_SCHEMA = vol.Schema( + { + vol.Required(const.CONF_FREQUENCY): vol.In(frequencies), + vol.Optional(const.CONF_ICON_NORMAL): cv.icon, + vol.Optional(const.CONF_ICON_TODAY): cv.icon, + vol.Optional(const.CONF_ICON_TOMORROW): cv.icon, + vol.Optional(const.CONF_EXPIRE_AFTER): helpers.time_text, + vol.Optional(const.CONF_VERBOSE_STATE): cv.boolean, + vol.Optional(ATTR_HIDDEN): cv.boolean, + vol.Optional(const.CONF_MANUAL): cv.boolean, + vol.Optional(const.CONF_DATE): helpers.month_day_text, + vol.Optional(CONF_ENTITIES): cv.entity_ids, + vol.Optional(const.CONF_COLLECTION_DAYS): vol.All( + cv.ensure_list, [vol.In(WEEKDAYS)] + ), + vol.Optional(const.CONF_FIRST_MONTH): vol.In(months), + vol.Optional(const.CONF_LAST_MONTH): vol.In(months), + vol.Optional(const.CONF_WEEKDAY_ORDER_NUMBER): vol.All( + cv.ensure_list, [vol.All(vol.Coerce(int), vol.Range(min=1, max=5))] + ), + vol.Optional(const.CONF_WEEK_ORDER_NUMBER): vol.All( + cv.ensure_list, [vol.All(vol.Coerce(int), vol.Range(min=1, max=5))] + ), + vol.Optional(const.CONF_PERIOD): vol.All( + vol.Coerce(int), vol.Range(min=1, max=1000) + ), + vol.Optional(const.CONF_FIRST_WEEK): vol.All( + vol.Coerce(int), vol.Range(min=1, max=52) + ), + vol.Optional(const.CONF_FIRST_DATE): cv.date, + vol.Optional(const.CONF_VERBOSE_FORMAT): cv.string, + vol.Optional(const.CONF_DATE_FORMAT): cv.string, + }, + extra=vol.ALLOW_EXTRA, +) + +CONFIG_SCHEMA = vol.Schema( + { + const.DOMAIN: vol.Schema( + {vol.Optional(const.CONF_SENSORS): vol.All(cv.ensure_list, [SENSOR_SCHEMA])} + ) + }, + extra=vol.ALLOW_EXTRA, +) + +COLLECT_NOW_SCHEMA = vol.Schema( + { + vol.Required(CONF_ENTITY_ID): vol.All(cv.ensure_list, [cv.string]), + vol.Optional(const.ATTR_LAST_COLLECTION): cv.datetime, + } +) + +UPDATE_STATE_SCHEMA = vol.Schema( + { + vol.Required(CONF_ENTITY_ID): vol.All(cv.ensure_list, [cv.string]), + } +) + +ADD_REMOVE_DATE_SCHEMA = vol.Schema( + { + vol.Required(CONF_ENTITY_ID): vol.All(cv.ensure_list, [cv.string]), + vol.Required(const.CONF_DATE): cv.date, + } +) + +OFFSET_DATE_SCHEMA = vol.Schema( + { + vol.Required(CONF_ENTITY_ID): vol.All(cv.ensure_list, [cv.string]), + vol.Required(const.CONF_DATE): cv.date, + vol.Required(const.CONF_OFFSET): vol.All( + vol.Coerce(int), vol.Range(min=-31, max=31) + ), + } +) + + +async def async_setup(hass: HomeAssistant, _: ConfigType) -> bool: + """Set up platform - register services, inicialize data structure.""" + + async def handle_add_date(call: ServiceCall) -> None: + """Handle the add_date service call.""" + entity_ids = call.data.get(CONF_ENTITY_ID, []) + collection_date = call.data.get(const.CONF_DATE) + for entity_id in entity_ids: + _LOGGER.debug("called add_date %s from %s", collection_date, entity_id) + try: + entity = hass.data[const.DOMAIN][const.SENSOR_PLATFORM][entity_id] + await entity.add_date(collection_date) + except KeyError as err: + _LOGGER.error( + "Failed adding date %s to %s (%s)", + collection_date, + entity_id, + err, + ) + + async def handle_remove_date(call: ServiceCall) -> None: + """Handle the remove_date service call.""" + entity_ids = call.data.get(CONF_ENTITY_ID, []) + collection_date = call.data.get(const.CONF_DATE) + for entity_id in entity_ids: + _LOGGER.debug("called remove_date %s from %s", collection_date, entity_id) + try: + entity = hass.data[const.DOMAIN][const.SENSOR_PLATFORM][entity_id] + await entity.remove_date(collection_date) + except KeyError as err: + _LOGGER.error( + "Failed removing date %s from %s (%s)", + collection_date, + entity_id, + err, + ) + + async def handle_offset_date(call: ServiceCall) -> None: + """Handle the offset_date service call.""" + entity_ids = call.data.get(CONF_ENTITY_ID, []) + offset = call.data.get(const.CONF_OFFSET) + collection_date = call.data.get(const.CONF_DATE) + for entity_id in entity_ids: + _LOGGER.debug( + "called offset_date %s by %d days for %s", + collection_date, + offset, + entity_id, + ) + try: + new_date = collection_date + relativedelta( + days=offset + ) # pyright: reportOptionalOperand=false + entity = hass.data[const.DOMAIN][const.SENSOR_PLATFORM][entity_id] + await asyncio.gather( + entity.remove_date(collection_date), entity.add_date(new_date) + ) + except (TypeError, KeyError) as err: + _LOGGER.error("Failed ofsetting date for %s - %s", entity_id, err) + break + + async def handle_update_state(call: ServiceCall) -> None: + """Handle the update_state service call.""" + entity_ids = call.data.get(CONF_ENTITY_ID, []) + for entity_id in entity_ids: + _LOGGER.debug("called update_state for %s", entity_id) + try: + entity = hass.data[const.DOMAIN][const.SENSOR_PLATFORM][entity_id] + entity.update_state() + except KeyError as err: + _LOGGER.error("Failed updating state for %s - %s", entity_id, err) + + async def handle_collect_garbage(call: ServiceCall) -> None: + """Handle the collect_garbage service call.""" + entity_ids = call.data.get(CONF_ENTITY_ID, []) + last_collection = call.data.get(const.ATTR_LAST_COLLECTION, helpers.now()) + for entity_id in entity_ids: + _LOGGER.debug("called collect_garbage for %s", entity_id) + try: + entity = hass.data[const.DOMAIN][const.SENSOR_PLATFORM][entity_id] + entity.last_collection = dt_util.as_local(last_collection) + entity.update_state() + except KeyError as err: + _LOGGER.error( + "Failed setting last collection for %s - %s", entity_id, err + ) + + hass.data.setdefault(const.DOMAIN, {}) + hass.data[const.DOMAIN].setdefault(const.SENSOR_PLATFORM, {}) + hass.services.async_register( + const.DOMAIN, + "collect_garbage", + handle_collect_garbage, + schema=COLLECT_NOW_SCHEMA, + ) + hass.services.async_register( + const.DOMAIN, + "update_state", + handle_update_state, + schema=UPDATE_STATE_SCHEMA, + ) + hass.services.async_register( + const.DOMAIN, "add_date", handle_add_date, schema=ADD_REMOVE_DATE_SCHEMA + ) + hass.services.async_register( + const.DOMAIN, + "remove_date", + handle_remove_date, + schema=ADD_REMOVE_DATE_SCHEMA, + ) + hass.services.async_register( + const.DOMAIN, "offset_date", handle_offset_date, schema=OFFSET_DATE_SCHEMA + ) + return True + + +async def async_setup_entry(hass: HomeAssistant, config_entry: ConfigEntry) -> bool: + """Set up this integration using UI.""" + _LOGGER.debug( + "Setting %s (%s) from ConfigFlow", + config_entry.title, + config_entry.options[const.CONF_FREQUENCY], + ) + config_entry.add_update_listener(update_listener) + # Add sensor + hass.async_create_task( + hass.config_entries.async_forward_entry_setup( + config_entry, const.SENSOR_PLATFORM + ) + ) + return True + + +async def async_remove_entry(hass: HomeAssistant, config_entry: ConfigEntry) -> None: + """Handle removal of an entry.""" + try: + await hass.config_entries.async_forward_entry_unload( + config_entry, const.SENSOR_PLATFORM + ) + _LOGGER.info( + "Successfully removed sensor from the garbage_collection integration" + ) + except ValueError: + pass + + +async def async_migrate_entry(_: HomeAssistant, config_entry: ConfigEntry) -> bool: + """Migrate old entry.""" + _LOGGER.info( + "Migrating %s from version %s", config_entry.title, config_entry.version + ) + new_data: Dict[str, Any] = {**config_entry.data} + new_options: Dict[str, Any] = {**config_entry.options} + removed_data: Dict[str, Any] = {} + removed_options: Dict[str, Any] = {} + _LOGGER.debug("new_data %s", new_data) + _LOGGER.debug("new_options %s", new_options) + if config_entry.version == 1: + to_remove = [ + "offset", + "move_country_holidays", + "holiday_in_week_move", + "holiday_pop_named", + "holiday_move_offset", + "prov", + "state", + "observed", + "exclude_dates", + "include_dates", + ] + for remove in to_remove: + if remove in new_data: + removed_data[remove] = new_data[remove] + del new_data[remove] + if remove in new_options: + removed_options[remove] = new_options[remove] + del new_options[remove] + if new_data.get(const.CONF_FREQUENCY) in const.MONTHLY_FREQUENCY: + if const.CONF_WEEK_ORDER_NUMBER in new_data: + new_data[const.CONF_WEEKDAY_ORDER_NUMBER] = new_data[ + const.CONF_WEEK_ORDER_NUMBER + ] + new_data[const.CONF_FORCE_WEEK_NUMBERS] = True + del new_data[const.CONF_WEEK_ORDER_NUMBER] + else: + new_data[const.CONF_FORCE_WEEK_NUMBERS] = False + _LOGGER.info("Updated data config for week_order_number") + if new_options.get(const.CONF_FREQUENCY) in const.MONTHLY_FREQUENCY: + if const.CONF_WEEK_ORDER_NUMBER in new_options: + new_options[const.CONF_WEEKDAY_ORDER_NUMBER] = new_options[ + const.CONF_WEEK_ORDER_NUMBER + ] + new_options[const.CONF_FORCE_WEEK_NUMBERS] = True + del new_options[const.CONF_WEEK_ORDER_NUMBER] + _LOGGER.info("Updated options config for week_order_number") + else: + new_options[const.CONF_FORCE_WEEK_NUMBERS] = False + if config_entry.version <= 4: + if const.CONF_WEEKDAY_ORDER_NUMBER in new_data: + new_data[const.CONF_WEEKDAY_ORDER_NUMBER] = list( + map(str, new_data[const.CONF_WEEKDAY_ORDER_NUMBER]) + ) + if const.CONF_WEEKDAY_ORDER_NUMBER in new_options: + new_options[const.CONF_WEEKDAY_ORDER_NUMBER] = list( + map(str, new_options[const.CONF_WEEKDAY_ORDER_NUMBER]) + ) + if config_entry.version <= 5: + for conf in [ + const.CONF_FREQUENCY, + const.CONF_ICON_NORMAL, + const.CONF_ICON_TODAY, + const.CONF_ICON_TOMORROW, + const.CONF_MANUAL, + const.CONF_OFFSET, + const.CONF_EXPIRE_AFTER, + const.CONF_VERBOSE_STATE, + const.CONF_FIRST_MONTH, + const.CONF_LAST_MONTH, + const.CONF_COLLECTION_DAYS, + const.CONF_WEEKDAY_ORDER_NUMBER, + const.CONF_FORCE_WEEK_NUMBERS, + const.CONF_WEEK_ORDER_NUMBER, + const.CONF_DATE, + const.CONF_PERIOD, + const.CONF_FIRST_WEEK, + const.CONF_FIRST_DATE, + const.CONF_SENSORS, + const.CONF_VERBOSE_FORMAT, + const.CONF_DATE_FORMAT, + ]: + if conf in new_data: + new_options[conf] = new_data.get(conf) + del new_data[conf] + if ( + const.CONF_EXPIRE_AFTER in new_options + and len(new_options[const.CONF_EXPIRE_AFTER]) == 5 + ): + new_options[const.CONF_EXPIRE_AFTER] = ( + new_options[const.CONF_EXPIRE_AFTER] + ":00" + ) + config_entry.version = const.CONFIG_VERSION + config_entry.data = MappingProxyType({**new_data}) + config_entry.options = MappingProxyType({**new_options}) + if removed_data: + _LOGGER.error( + "Removed data config %s. " + "Please check the documentation how to configure the functionality.", + removed_data, + ) + if removed_options: + _LOGGER.error( + "Removed options config %s. " + "Please check the documentation how to configure the functionality.", + removed_options, + ) + _LOGGER.info( + "%s migration to version %s successful", + config_entry.title, + config_entry.version, + ) + return True + + +async def update_listener(hass: HomeAssistant, entry: ConfigEntry) -> None: + """Update listener - to re-create device after options update.""" + await hass.config_entries.async_forward_entry_unload(entry, const.SENSOR_PLATFORM) + hass.async_add_job( + hass.config_entries.async_forward_entry_setup(entry, const.SENSOR_PLATFORM) + ) diff --git a/custom_components/garbage_collection/calendar.py b/custom_components/garbage_collection/calendar.py new file mode 100644 index 000000000..591df5051 --- /dev/null +++ b/custom_components/garbage_collection/calendar.py @@ -0,0 +1,151 @@ +"""Garbage collection calendar.""" +from __future__ import annotations + +from datetime import datetime, timedelta + +from homeassistant.components.calendar import CalendarEntity, CalendarEvent +from homeassistant.config_entries import ConfigEntry +from homeassistant.core import HomeAssistant +from homeassistant.helpers.entity_platform import AddEntitiesCallback +from homeassistant.util import Throttle + +from .const import CALENDAR_NAME, CALENDAR_PLATFORM, DOMAIN, SENSOR_PLATFORM + +MIN_TIME_BETWEEN_UPDATES = timedelta(minutes=1) + + +async def async_setup_entry( + _: HomeAssistant, config_entry: ConfigEntry, async_add_entities: AddEntitiesCallback +) -> None: + # pylint: disable=unused-argument + """Add calendar entity to HA.""" + async_add_entities([GarbageCollectionCalendar()], True) + + +class GarbageCollectionCalendar(CalendarEntity): + """The garbage collection calendar class.""" + + instances = False + + def __init__(self) -> None: + """Create empty calendar.""" + self._cal_data: dict = {} + self._attr_name = CALENDAR_NAME + GarbageCollectionCalendar.instances = True + + @property + def event(self) -> CalendarEvent | None: + """Return the next upcoming event.""" + return self.hass.data[DOMAIN][CALENDAR_PLATFORM].event + + @property + def name(self) -> str | None: + """Return the name of the entity.""" + return self._attr_name + + async def async_update(self) -> None: + """Update all calendars.""" + await self.hass.data[DOMAIN][CALENDAR_PLATFORM].async_update() + + async def async_get_events( + self, hass: HomeAssistant, start_date: datetime, end_date: datetime + ) -> list[CalendarEvent]: + """Get all events in a specific time frame.""" + return await self.hass.data[DOMAIN][CALENDAR_PLATFORM].async_get_events( + hass, start_date, end_date + ) + + @property + def extra_state_attributes(self) -> dict | None: + """Return the device state attributes.""" + if self.hass.data[DOMAIN][CALENDAR_PLATFORM].event is None: + # No tasks, we don't need to show anything. + return None + return {} + + +class EntitiesCalendarData: + """Class used by the Entities Calendar class to hold all entity events.""" + + __slots__ = "_hass", "event", "entities", "_throttle" + + def __init__(self, hass: HomeAssistant) -> None: + """Initialize an Entities Calendar Data.""" + self._hass = hass + self.event: CalendarEvent | None = None + self.entities: list[str] = [] + + def add_entity(self, entity_id: str) -> None: + """Append entity ID to the calendar.""" + if entity_id not in self.entities: + self.entities.append(entity_id) + + def remove_entity(self, entity_id: str) -> None: + """Remove entity ID from the calendar.""" + if entity_id in self.entities: + self.entities.remove(entity_id) + + async def async_get_events( + self, hass: HomeAssistant, start_datetime: datetime, end_datetime: datetime + ) -> list[CalendarEvent]: + """Get all tasks in a specific time frame.""" + events: list[CalendarEvent] = [] + if SENSOR_PLATFORM not in hass.data[DOMAIN]: + return events + start_date = start_datetime.date() + end_date = end_datetime.date() + for entity in self.entities: + if ( + entity not in hass.data[DOMAIN][SENSOR_PLATFORM] + or hass.data[DOMAIN][SENSOR_PLATFORM][entity].hidden + ): + continue + garbage_collection = hass.data[DOMAIN][SENSOR_PLATFORM][entity] + start = garbage_collection.get_next_date(start_date, True) + while start is not None and start_date <= start <= end_date: + try: + end = start + timedelta(days=1) + except TypeError: + end = start + name = ( + garbage_collection.name + if garbage_collection.name is not None + else "Unknown" + ) + if garbage_collection.expire_after is None: + event = CalendarEvent( + summary=name, + start=start, + end=end, + ) + else: + event = CalendarEvent( + summary=name, + start=datetime.combine(start, datetime.min.time()), + end=datetime.combine(start, garbage_collection.expire_after), + ) + events.append(event) + start = garbage_collection.get_next_date( + start + timedelta(days=1), True + ) + return events + + @Throttle(MIN_TIME_BETWEEN_UPDATES) + async def async_update(self) -> None: + """Get the latest data.""" + next_dates = {} + for entity in self.entities: + if self._hass.data[DOMAIN][SENSOR_PLATFORM][entity].next_date is not None: + next_dates[entity] = self._hass.data[DOMAIN][SENSOR_PLATFORM][ + entity + ].next_date + if len(next_dates) > 0: + entity_id = min(next_dates.keys(), key=(lambda k: next_dates[k])) + start = next_dates[entity_id] + end = start + timedelta(days=1) + name = self._hass.data[DOMAIN][SENSOR_PLATFORM][entity_id].name + self.event = CalendarEvent( + summary=name, + start=start, + end=end, + ) diff --git a/custom_components/garbage_collection/config_flow.py b/custom_components/garbage_collection/config_flow.py new file mode 100644 index 000000000..01806c1e9 --- /dev/null +++ b/custom_components/garbage_collection/config_flow.py @@ -0,0 +1,261 @@ +"""Adds config flow for GarbageCollection.""" +from __future__ import annotations + +import logging + +# import uuid +from collections.abc import Mapping +from typing import Any, Dict, cast + +import voluptuous as vol +from homeassistant.const import ATTR_HIDDEN, CONF_ENTITIES, CONF_NAME +from homeassistant.core import callback +from homeassistant.helpers import selector +from homeassistant.helpers.schema_config_entry_flow import ( + SchemaConfigFlowHandler, + SchemaFlowError, + SchemaFlowFormStep, + SchemaFlowMenuStep, + SchemaOptionsFlowHandler, +) + +from . import const, helpers + +_LOGGER = logging.getLogger(__name__) + + +async def _validate_config( + _: SchemaConfigFlowHandler | SchemaOptionsFlowHandler, data: Any +) -> Any: + """Validate config.""" + if const.CONF_DATE in data: + try: + helpers.month_day_text(data[const.CONF_DATE]) + except vol.Invalid as exc: + raise SchemaFlowError("month_day") from exc + return data + + +def required( + key: str, options: Dict[str, Any], default: Any | None = None +) -> vol.Required: + """Return vol.Required.""" + if isinstance(options, dict) and key in options: + suggested_value = options[key] + elif default is not None: + suggested_value = default + else: + return vol.Required(key) + return vol.Required(key, description={"suggested_value": suggested_value}) + + +def optional( + key: str, options: Dict[str, Any], default: Any | None = None +) -> vol.Optional: + """Return vol.Optional.""" + if isinstance(options, dict) and key in options: + suggested_value = options[key] + elif default is not None: + suggested_value = default + else: + return vol.Optional(key) + return vol.Optional(key, description={"suggested_value": suggested_value}) + + +async def general_config_schema( + handler: SchemaConfigFlowHandler | SchemaOptionsFlowHandler, +) -> vol.Schema: + """Generate config schema.""" + return vol.Schema( + { + optional(CONF_NAME, handler.options): selector.TextSelector(), + required( + const.CONF_FREQUENCY, handler.options, const.DEFAULT_FREQUENCY + ): selector.SelectSelector( + selector.SelectSelectorConfig(options=const.FREQUENCY_OPTIONS) + ), + optional( + const.CONF_ICON_NORMAL, handler.options, const.DEFAULT_ICON_NORMAL + ): selector.IconSelector(), + optional( + const.CONF_ICON_TODAY, handler.options, const.DEFAULT_ICON_TODAY + ): selector.IconSelector(), + optional( + const.CONF_ICON_TOMORROW, handler.options, const.DEFAULT_ICON_TOMORROW + ): selector.IconSelector(), + optional(const.CONF_EXPIRE_AFTER, handler.options): selector.TimeSelector(), + optional( + const.CONF_VERBOSE_STATE, handler.options, const.DEFAULT_VERBOSE_STATE + ): bool, + optional(ATTR_HIDDEN, handler.options, False): bool, + optional(const.CONF_MANUAL, handler.options, False): bool, + } + ) + + +async def general_options_schema( + handler: SchemaConfigFlowHandler | SchemaOptionsFlowHandler, +) -> vol.Schema: + """Generate options schema.""" + return vol.Schema( + { + required( + const.CONF_FREQUENCY, handler.options, const.DEFAULT_FREQUENCY + ): selector.SelectSelector( + selector.SelectSelectorConfig(options=const.FREQUENCY_OPTIONS) + ), + optional( + const.CONF_ICON_NORMAL, handler.options, const.DEFAULT_ICON_NORMAL + ): selector.IconSelector(), + optional( + const.CONF_ICON_TODAY, handler.options, const.DEFAULT_ICON_TODAY + ): selector.IconSelector(), + optional( + const.CONF_ICON_TOMORROW, handler.options, const.DEFAULT_ICON_TOMORROW + ): selector.IconSelector(), + optional(const.CONF_EXPIRE_AFTER, handler.options): selector.TimeSelector(), + optional( + const.CONF_VERBOSE_STATE, handler.options, const.DEFAULT_VERBOSE_STATE + ): bool, + optional(ATTR_HIDDEN, handler.options, False): bool, + optional(const.CONF_MANUAL, handler.options, False): bool, + } + ) + + +async def detail_config_schema( + handler: SchemaConfigFlowHandler | SchemaOptionsFlowHandler, +) -> vol.Schema: + """Generate options schema.""" + options_schema: Dict[vol.Optional | vol.Required, Any] = {} + if handler.options[const.CONF_FREQUENCY] in const.ANNUAL_FREQUENCY: + # "annual" + options_schema[ + required(const.CONF_DATE, handler.options) + ] = selector.TextSelector() + elif handler.options[const.CONF_FREQUENCY] in const.GROUP_FREQUENCY: + # "group" + options_schema[ + required(CONF_ENTITIES, handler.options) + ] = selector.EntitySelector( + selector.EntitySelectorConfig( + domain="sensor", integration=const.DOMAIN, multiple=True + ), + ) + elif handler.options[const.CONF_FREQUENCY] not in const.BLANK_FREQUENCY: + # everything else except "blank" and every-n-days + if handler.options[const.CONF_FREQUENCY] not in const.DAILY_FREQUENCY: + options_schema[ + required(const.CONF_COLLECTION_DAYS, handler.options) + ] = selector.SelectSelector( + selector.SelectSelectorConfig( + options=const.WEEKDAY_OPTIONS, + multiple=True, + mode=selector.SelectSelectorMode.LIST, + ) + ) + # everything else except "blank" + options_schema[ + optional(const.CONF_FIRST_MONTH, handler.options, const.DEFAULT_FIRST_MONTH) + ] = selector.SelectSelector( + selector.SelectSelectorConfig(options=const.MONTH_OPTIONS) + ) + options_schema[ + optional(const.CONF_LAST_MONTH, handler.options, const.DEFAULT_LAST_MONTH) + ] = selector.SelectSelector( + selector.SelectSelectorConfig(options=const.MONTH_OPTIONS) + ) + if handler.options[const.CONF_FREQUENCY] in const.MONTHLY_FREQUENCY: + # "monthly" + options_schema[ + optional(const.CONF_WEEKDAY_ORDER_NUMBER, handler.options) + ] = selector.SelectSelector( + selector.SelectSelectorConfig( + options=const.ORDER_OPTIONS, + multiple=True, + mode=selector.SelectSelectorMode.LIST, + ) + ) + options_schema[ + optional(const.CONF_FORCE_WEEK_NUMBERS, handler.options) + ] = selector.BooleanSelector() + if handler.options[const.CONF_FREQUENCY] in const.WEEKLY_DAILY_MONTHLY: + # "every-n-weeks", "every-n-days", "monthly" + uom = {"every-n-weeks": "weeks", "every-n-days": "days", "monthly": "month"} + options_schema[ + required(const.CONF_PERIOD, handler.options) + ] = selector.NumberSelector( + selector.NumberSelectorConfig( + min=1, + max=1000, + mode=selector.NumberSelectorMode.BOX, + unit_of_measurement=uom[handler.options[const.CONF_FREQUENCY]], + ) + ) + if handler.options[const.CONF_FREQUENCY] in const.WEEKLY_FREQUENCY_X: + # every-n-weeks + options_schema[ + required( + const.CONF_FIRST_WEEK, handler.options, const.DEFAULT_FIRST_WEEK + ) + ] = selector.NumberSelector( + selector.NumberSelectorConfig( + min=1, + max=52, + mode=selector.NumberSelectorMode.BOX, + unit_of_measurement="weeks", + ) + ) + if handler.options[const.CONF_FREQUENCY] in const.DAILY_FREQUENCY: + # every-n-days + options_schema[ + required(const.CONF_FIRST_DATE, handler.options, helpers.now().date()) + ] = selector.DateSelector() + if handler.options.get(const.CONF_VERBOSE_STATE, False): + # "verbose_state" + options_schema[ + required( + const.CONF_VERBOSE_FORMAT, handler.options, const.DEFAULT_VERBOSE_FORMAT + ) + ] = selector.TextSelector() + options_schema[ + required(const.CONF_DATE_FORMAT, handler.options, const.DEFAULT_DATE_FORMAT) + ] = selector.TextSelector() + return vol.Schema(options_schema) + + +async def choose_details_step(_: dict[str, Any]) -> str: + """Return next step_id for options flow.""" + return "detail" + + +CONFIG_FLOW: Dict[str, SchemaFlowFormStep | SchemaFlowMenuStep] = { + "user": SchemaFlowFormStep(general_config_schema, next_step=choose_details_step), + "detail": SchemaFlowFormStep( + detail_config_schema, validate_user_input=_validate_config + ), +} +OPTIONS_FLOW: Dict[str, SchemaFlowFormStep | SchemaFlowMenuStep] = { + "init": SchemaFlowFormStep(general_options_schema, next_step=choose_details_step), + "detail": SchemaFlowFormStep( + detail_config_schema, validate_user_input=_validate_config + ), +} + + +# mypy: ignore-errors +class GarbageCollectionConfigFlowHandler(SchemaConfigFlowHandler, domain=const.DOMAIN): + """Handle a config or options flow for GarbageCollection.""" + + config_flow = CONFIG_FLOW + options_flow = OPTIONS_FLOW + VERSION = const.CONFIG_VERSION + + @callback + def async_config_entry_title(self, options: Mapping[str, Any]) -> str: + """Return config entry title. + + The options parameter contains config entry options, which is the union of user + input from the config flow steps. + """ + return cast(str, options["name"]) if "name" in options else "" diff --git a/custom_components/garbage_collection/const.py b/custom_components/garbage_collection/const.py new file mode 100644 index 000000000..b12498d5b --- /dev/null +++ b/custom_components/garbage_collection/const.py @@ -0,0 +1,141 @@ +"""Define constants used in garbage_collection.""" +from homeassistant.helpers import selector + +# Constants for garbage_collection. +# Base component constants +DOMAIN = "garbage_collection" +CALENDAR_NAME = "Garbage Collection" +SENSOR_PLATFORM = "sensor" +CALENDAR_PLATFORM = "calendar" +ATTRIBUTION = "Data from this is provided by garbage_collection." +CONFIG_VERSION = 6 + +ATTR_NEXT_DATE = "next_date" +ATTR_DAYS = "days" +ATTR_LAST_COLLECTION = "last_collection" +ATTR_LAST_UPDATED = "last_updated" + +# Device classes +BINARY_SENSOR_DEVICE_CLASS = "connectivity" +DEVICE_CLASS = "garbage_collection__schedule" + +# Configuration +CONF_SENSOR = "sensor" +CONF_ENABLED = "enabled" +CONF_FREQUENCY = "frequency" +CONF_MANUAL = "manual_update" +CONF_ICON_NORMAL = "icon_normal" +CONF_ICON_TODAY = "icon_today" +CONF_ICON_TOMORROW = "icon_tomorrow" +CONF_OFFSET = "offset" +CONF_EXPIRE_AFTER = "expire_after" +CONF_VERBOSE_STATE = "verbose_state" +CONF_FIRST_MONTH = "first_month" +CONF_LAST_MONTH = "last_month" +CONF_COLLECTION_DAYS = "collection_days" +CONF_WEEKDAY_ORDER_NUMBER = "weekday_order_number" +CONF_FORCE_WEEK_NUMBERS = "force_week_order_numbers" +CONF_WEEK_ORDER_NUMBER = "week_order_number" # Obsolete +CONF_DATE = "date" +CONF_PERIOD = "period" +CONF_FIRST_WEEK = "first_week" +CONF_FIRST_DATE = "first_date" +CONF_SENSORS = "sensors" +CONF_VERBOSE_FORMAT = "verbose_format" +CONF_DATE_FORMAT = "date_format" + +# Defaults +DEFAULT_NAME = DOMAIN +DEFAULT_FIRST_MONTH = "jan" +DEFAULT_LAST_MONTH = "dec" +DEFAULT_FREQUENCY = "weekly" +DEFAULT_PERIOD = 1 +DEFAULT_FIRST_WEEK = 1 +DEFAULT_VERBOSE_STATE = False +DEFAULT_HOLIDAY_IN_WEEK_MOVE = False +DEFAULT_DATE_FORMAT = "%d-%b-%Y" +DEFAULT_VERBOSE_FORMAT = "on {date}, in {days} days" + +# Icons +DEFAULT_ICON_NORMAL = "mdi:trash-can" +DEFAULT_ICON_TODAY = "mdi:delete-restore" +DEFAULT_ICON_TOMORROW = "mdi:delete-circle" +ICON = DEFAULT_ICON_NORMAL + +# States +STATE_TODAY = "today" +STATE_TOMORROW = "tomorrow" + +FREQUENCY_OPTIONS = [ + selector.SelectOptionDict(value="weekly", label="weekly"), + selector.SelectOptionDict(value="even-weeks", label="even-weeks"), + selector.SelectOptionDict(value="odd-weeks", label="odd-weeks"), + selector.SelectOptionDict(value="every-n-weeks", label="every-n-weeks"), + selector.SelectOptionDict(value="every-n-days", label="every-n-days"), + selector.SelectOptionDict(value="monthly", label="monthly"), + selector.SelectOptionDict(value="annual", label="annual"), + selector.SelectOptionDict(value="blank", label="blank"), + selector.SelectOptionDict(value="group", label="group"), +] + +WEEKLY_FREQUENCY = ["weekly", "even-weeks", "odd-weeks"] +EXCEPT_ANNUAL_GROUP = [ + "weekly", + "even-weeks", + "odd-weeks", + "every-n-weeks", + "every-n-days", + "monthly", + "blank", +] +EXCEPT_ANNUAL_GROUP_BLANK = [ + "weekly", + "even-weeks", + "odd-weeks", + "every-n-weeks", + "every-n-days", + "monthly", +] +WEEKLY_DAILY_MONTHLY = ["every-n-weeks", "every-n-days", "monthly"] +WEEKLY_FREQUENCY_X = ["every-n-weeks"] +DAILY_FREQUENCY = ["every-n-days"] +DAILY_BLANK_FREQUENCY = ["blank", "every-n-days"] +MONTHLY_FREQUENCY = ["monthly"] +ANNUAL_GROUP_FREQUENCY = ["annual", "group"] +ANNUAL_FREQUENCY = ["annual"] +GROUP_FREQUENCY = ["group"] +BLANK_FREQUENCY = ["blank"] + +WEEKDAY_OPTIONS = [ + selector.SelectOptionDict(value="mon", label="Monday"), + selector.SelectOptionDict(value="tue", label="Tuesday"), + selector.SelectOptionDict(value="wed", label="Wednesday"), + selector.SelectOptionDict(value="thu", label="Thursday"), + selector.SelectOptionDict(value="fri", label="Friday"), + selector.SelectOptionDict(value="sat", label="Saturday"), + selector.SelectOptionDict(value="sun", label="Sunday"), +] + + +MONTH_OPTIONS = [ + selector.SelectOptionDict(value="jan", label="January"), + selector.SelectOptionDict(value="feb", label="February"), + selector.SelectOptionDict(value="mar", label="March"), + selector.SelectOptionDict(value="apr", label="April"), + selector.SelectOptionDict(value="may", label="May"), + selector.SelectOptionDict(value="jun", label="June"), + selector.SelectOptionDict(value="jul", label="July"), + selector.SelectOptionDict(value="aug", label="August"), + selector.SelectOptionDict(value="sep", label="September"), + selector.SelectOptionDict(value="oct", label="October"), + selector.SelectOptionDict(value="nov", label="November"), + selector.SelectOptionDict(value="dec", label="December"), +] + +ORDER_OPTIONS = [ + selector.SelectOptionDict(value="1", label="1st"), + selector.SelectOptionDict(value="2", label="2nd"), + selector.SelectOptionDict(value="3", label="3rd"), + selector.SelectOptionDict(value="4", label="4th"), + selector.SelectOptionDict(value="5", label="5th"), +] diff --git a/custom_components/garbage_collection/diagnostics.py b/custom_components/garbage_collection/diagnostics.py new file mode 100644 index 000000000..738fc6843 --- /dev/null +++ b/custom_components/garbage_collection/diagnostics.py @@ -0,0 +1,29 @@ +"""Diagnostics support for Garbage Collection.""" +from __future__ import annotations + +from typing import Any, Dict + +from homeassistant.config_entries import ConfigEntry +from homeassistant.core import HomeAssistant + +from . import const + + +async def async_get_config_entry_diagnostics( + hass: HomeAssistant, + entry: ConfigEntry, +) -> Dict[str, Any]: + """Return diagnostics for a config entry.""" + entities = hass.data[const.DOMAIN][const.SENSOR_PLATFORM] + entity_data = [ + entities[entity] + for entity in entities + if entities[entity].unique_id == entry.data["unique_id"] + ][0] + data = { + "entity_id": entity_data.entity_id, + "state": entity_data.state, + "attributes": entity_data.extra_state_attributes, + "config_entry": entry.as_dict(), + } + return data diff --git a/custom_components/garbage_collection/helpers.py b/custom_components/garbage_collection/helpers.py new file mode 100644 index 000000000..1bbd6b178 --- /dev/null +++ b/custom_components/garbage_collection/helpers.py @@ -0,0 +1,67 @@ +"""Set of functions to handle date and text conversion.""" +from __future__ import annotations + +from datetime import date, datetime +from typing import Any + +import homeassistant.util.dt as dt_util +import voluptuous as vol +from dateutil.parser import ParserError, parse + + +def now() -> datetime: + """Return current date and time. Needed for testing.""" + return dt_util.now() + + +def to_date(day: Any) -> date: + """Convert datetime or text to date, if not already datetime. + + Used for the first date for every_n_days (configured as text) + """ + if day is None: + raise ValueError + if isinstance(day, date): + return day + if isinstance(day, datetime): + return day.date() + return date.fromisoformat(day) + + +def parse_datetime(text: str) -> datetime | None: + """Parse text to datetime object.""" + try: + return parse(text) + except (ParserError, TypeError): + return None + + +def dates_to_texts(dates: list[date]) -> list[str]: + """Convert list of dates to texts.""" + converted: list[str] = [] + for record in dates: + try: + converted.append(record.isoformat()) + except ValueError: + continue + return converted + + +def time_text(value: Any) -> str: + """Have to store time as text - datetime is not JSON serialisable.""" + if value is None or value == "": + return "" + try: + return datetime.strptime(value, "%H:%M").time().strftime("%H:%M") + except ValueError as error: + raise vol.Invalid(f"Invalid date: {value}") from error + + +def month_day_text(value: Any) -> str: + """Validate format month/day.""" + if value is None or value == "": + return "" + try: + return datetime.strptime(value, "%m/%d").date().strftime("%m/%d") + except ValueError as error: + raise vol.Invalid(f"Invalid date: {value}") from error diff --git a/custom_components/garbage_collection/manifest.json b/custom_components/garbage_collection/manifest.json new file mode 100644 index 000000000..4d67839c5 --- /dev/null +++ b/custom_components/garbage_collection/manifest.json @@ -0,0 +1,17 @@ +{ + "domain": "garbage_collection", + "name": "Garbage Collection", + "version": "3.21", + "documentation": "https://github.com/bruxy70/Garbage-Collection/", + "issue_tracker": "https://github.com/bruxy70/Garbage-Collection/issues", + "iot_class": "calculated", + "integration_type": "helper", + "dependencies": [], + "config_flow": true, + "codeowners": [ + "@bruxy70" + ], + "requirements": [ + "python-dateutil>=2.8.2" + ] +} \ No newline at end of file diff --git a/custom_components/garbage_collection/sensor.py b/custom_components/garbage_collection/sensor.py new file mode 100644 index 000000000..8bba63a8e --- /dev/null +++ b/custom_components/garbage_collection/sensor.py @@ -0,0 +1,791 @@ +"""Sensor platform for garbage_collection.""" +from __future__ import annotations + +import logging +from datetime import date, datetime, time, timedelta +from typing import Any, Dict, Generator + +from dateutil.relativedelta import relativedelta +from homeassistant.config_entries import ConfigEntry +from homeassistant.const import ( + ATTR_DEVICE_CLASS, + ATTR_HIDDEN, + CONF_ENTITIES, + CONF_NAME, + WEEKDAYS, +) +from homeassistant.core import HomeAssistant +from homeassistant.helpers import device_registry as dr +from homeassistant.helpers.entity import DeviceInfo +from homeassistant.helpers.entity_platform import AddEntitiesCallback +from homeassistant.helpers.restore_state import RestoreEntity + +from . import const, helpers +from .calendar import EntitiesCalendarData + +_LOGGER = logging.getLogger(__name__) + +SCAN_INTERVAL = timedelta(seconds=10) +THROTTLE_INTERVAL = timedelta(seconds=60) + + +async def async_setup_entry( + _: HomeAssistant, config_entry: ConfigEntry, async_add_devices: AddEntitiesCallback +) -> None: + """Create garbage collection entities defined in config_flow and add them to HA.""" + frequency = config_entry.options.get(const.CONF_FREQUENCY) + name = ( + config_entry.title + if config_entry.title is not None + else config_entry.data.get(CONF_NAME) + ) + _frequency_function = { + "weekly": WeeklyCollection, + "even-weeks": WeeklyCollection, + "odd-weeks": WeeklyCollection, + "every-n-weeks": WeeklyCollection, + "every-n-days": DailyCollection, + "monthly": MonthlyCollection, + "annual": AnnualCollection, + "group": GroupCollection, + "blank": BlankCollection, + } + if frequency in _frequency_function: + add_devices = _frequency_function[frequency] + async_add_devices([add_devices(config_entry)], True) + else: + _LOGGER.error("(%s) Unknown frequency %s", name, frequency) + raise ValueError + + +class GarbageCollection(RestoreEntity): + """GarbageCollection Sensor class.""" + + __slots__ = ( + "_attr_icon", + "_attr_name", + "_attr_state", + "_collection_dates", + "_date_format", + "_days", + "_first_month", + "_hidden", + "_icon_normal", + "_icon_today", + "_icon_tomorrow", + "_last_month", + "_last_updated", + "_manual", + "_next_date", + "_verbose_format", + "_verbose_state", + "config_entry", + "expire_after", + "last_collection", + ) + + def __init__(self, config_entry: ConfigEntry) -> None: + """Read configuration and initialise class variables.""" + config = config_entry.options + self.config_entry = config_entry + self._attr_name = ( + config_entry.title + if config_entry.title is not None + else config.get(CONF_NAME) + ) + self._hidden = config.get(ATTR_HIDDEN, False) + self._manual = config.get(const.CONF_MANUAL) + first_month = config.get(const.CONF_FIRST_MONTH, const.DEFAULT_FIRST_MONTH) + months = [m["value"] for m in const.MONTH_OPTIONS] + self._first_month: int = ( + months.index(first_month) + 1 if first_month in months else 1 + ) + last_month = config.get(const.CONF_LAST_MONTH, const.DEFAULT_LAST_MONTH) + self._last_month: int = ( + months.index(last_month) + 1 if last_month in months else 12 + ) + self._verbose_state = config.get(const.CONF_VERBOSE_STATE) + self._icon_normal = config.get(const.CONF_ICON_NORMAL) + self._icon_today = config.get(const.CONF_ICON_TODAY) + self._icon_tomorrow = config.get(const.CONF_ICON_TOMORROW) + exp = config.get(const.CONF_EXPIRE_AFTER) + self.expire_after: time | None = ( + None + if ( + exp is None + or datetime.strptime(exp, "%H:%M:%S").time() == time(0, 0, 0) + ) + else datetime.strptime(exp, "%H:%M:%S").time() + ) + self._date_format = config.get( + const.CONF_DATE_FORMAT, const.DEFAULT_DATE_FORMAT + ) + self._verbose_format = config.get( + const.CONF_VERBOSE_FORMAT, const.DEFAULT_VERBOSE_FORMAT + ) + self._collection_dates: list[date] = [] + self._next_date: date | None = None + self._last_updated: datetime | None = None + self.last_collection: datetime | None = None + self._days: int | None = None + self._attr_state = "" if bool(self._verbose_state) else 2 + self._attr_icon = self._icon_normal + + async def async_added_to_hass(self) -> None: + """When sensor is added to hassio, add it to calendar.""" + await super().async_added_to_hass() + self.hass.data[const.DOMAIN][const.SENSOR_PLATFORM][self.entity_id] = self + + # Restore stored state + if (state := await self.async_get_last_state()) is not None: + self._last_updated = None # Unblock update - after options change + self._attr_state = state.state + self._days = ( + state.attributes[const.ATTR_DAYS] + if const.ATTR_DAYS in state.attributes + else None + ) + next_date = ( + helpers.parse_datetime(state.attributes[const.ATTR_NEXT_DATE]) + if const.ATTR_NEXT_DATE in state.attributes + else None + ) + self._next_date = None if next_date is None else next_date.date() + self.last_collection = ( + helpers.parse_datetime(state.attributes[const.ATTR_LAST_COLLECTION]) + if const.ATTR_LAST_COLLECTION in state.attributes + else None + ) + + # Create device + device_registry = dr.async_get(self.hass) + device_registry.async_get_or_create( + config_entry_id=self.config_entry.entry_id, + identifiers={(const.DOMAIN, self.unique_id)}, + name=self._attr_name, + manufacturer="bruxy70", + ) + + # Create or add to calendar + if not self.hidden: + if const.CALENDAR_PLATFORM not in self.hass.data[const.DOMAIN]: + self.hass.data[const.DOMAIN][ + const.CALENDAR_PLATFORM + ] = EntitiesCalendarData(self.hass) + _LOGGER.debug("Creating garbage_collection calendar") + await self.hass.config_entries.async_forward_entry_setup( + self.config_entry, const.CALENDAR_PLATFORM + ) + + self.hass.data[const.DOMAIN][const.CALENDAR_PLATFORM].add_entity( + self.entity_id + ) + + async def async_will_remove_from_hass(self) -> None: + """When sensor is added to hassio, remove it.""" + await super().async_will_remove_from_hass() + del self.hass.data[const.DOMAIN][const.SENSOR_PLATFORM][self.entity_id] + self.hass.data[const.DOMAIN][const.CALENDAR_PLATFORM].remove_entity( + self.entity_id + ) + + @property + def unique_id(self) -> str: + """Return a unique ID to use for this sensor.""" + if "unique_id" in self.config_entry.data: # From legacy config + return self.config_entry.data["unique_id"] + return self.config_entry.entry_id + + @property + def device_info(self) -> DeviceInfo | None: + """Return device info.""" + return { + "identifiers": {(const.DOMAIN, self.unique_id)}, + "name": self.config_entry.data.get("name"), + "manufacturer": "bruxy70", + } + + @property + def name(self) -> str | None: + """Return the name of the sensor.""" + return self._attr_name + + @property + def next_date(self) -> date | None: + """Return next date attribute.""" + return self._next_date + + @property + def hidden(self) -> bool: + """Return the hidden attribute.""" + return self._hidden + + @property + def native_unit_of_measurement(self) -> str | None: + """Return unit of measurement - None for numerical value.""" + return None + + @property + def native_value(self) -> object: + """Return the state of the sensor.""" + return self._attr_state + + @property + def last_updated(self) -> datetime | None: + """Return when the sensor was last updated.""" + return self._last_updated + + @property + def icon(self) -> str: + """Return the entity icon.""" + return self._attr_icon + + @property + def extra_state_attributes(self) -> Dict[str, Any]: + """Return the state attributes.""" + state_attr = { + const.ATTR_DAYS: self._days, + const.ATTR_LAST_COLLECTION: self.last_collection, + const.ATTR_LAST_UPDATED: self._last_updated, + const.ATTR_NEXT_DATE: None + if self._next_date is None + else datetime( + self._next_date.year, self._next_date.month, self._next_date.day + ).astimezone(), + # Needed for translations to work + ATTR_DEVICE_CLASS: self.DEVICE_CLASS, + } + return state_attr + + @property + def DEVICE_CLASS(self) -> str: # pylint: disable=C0103 + """Return the class of the sensor.""" + return const.DEVICE_CLASS + + def __repr__(self) -> str: + """Return main sensor parameters.""" + return ( + f"{self.__class__.__name__}(name={self._attr_name}, " + f"entity_id={self.entity_id}, " + f"state={self.state}, " + f"attributes={self.extra_state_attributes})" + ) + + def _find_candidate_date(self, day1: date) -> date | None: + """Find the next possible date starting from day1. + + Only based on calendar, not looking at include/exclude days. + Must be implemented for each child class. + """ + raise NotImplementedError + + async def _async_ready_for_update(self) -> bool: + """Check if the entity is ready for the update. + + Skip the update if the sensor was updated today + Except for the sensors with with next date today and after the expiration time + """ + current_date_time = helpers.now() + today = current_date_time.date() + try: + ready_for_update = bool(self._last_updated.date() != today) # type: ignore + except AttributeError: + return True + try: + if self._next_date == today and ( + ( + isinstance(self.expire_after, time) + and current_date_time.time() >= self.expire_after + ) + or ( + isinstance(self.last_collection, datetime) + and self.last_collection.date() == today + ) + ): + return True + except (AttributeError, TypeError): + pass + return ready_for_update + + def date_inside(self, dat: date) -> bool: + """Check if the date is inside first and last date.""" + month = dat.month + if self._first_month <= self._last_month: + return bool(self._first_month <= month <= self._last_month) + return bool(self._first_month <= month or month <= self._last_month) + + def move_to_range(self, day: date) -> date: + """If the date is not in range, move to the range.""" + if not self.date_inside(day): + year = day.year + month = day.month + months = [m["label"] for m in const.MONTH_OPTIONS] + if self._first_month <= self._last_month < month: + _LOGGER.debug( + "(%s) %s outside the range, lookig from %s next year", + self._attr_name, + day, + months[self._first_month - 1], + ) + return date(year + 1, self._first_month, 1) + _LOGGER.debug( + "(%s) %s outside the range, searching from %s", + self._attr_name, + day, + months[self._first_month - 1], + ) + return date(year, self._first_month, 1) + return day + + def collection_schedule( + self, date1: date | None = None, date2: date | None = None + ) -> Generator[date, None, None]: + """Get dates within configured date range.""" + today = helpers.now().date() + first_date: date = date(today.year - 1, 1, 1) if date1 is None else date1 + last_date: date = date(today.year + 1, 12, 31) if date2 is None else date2 + first_date = self.move_to_range(first_date) + while True: + try: + next_date = self._find_candidate_date(first_date) + except (TypeError, ValueError): + return + if next_date is None or next_date > last_date: + return + if (new_date := self.move_to_range(next_date)) != next_date: + first_date = new_date # continue from next year + else: + yield next_date + first_date = next_date + relativedelta(days=1) # look from the next day + + async def _async_load_collection_dates(self) -> None: + """Fill the collection dates list.""" + self._collection_dates.clear() + for collection_date in self.collection_schedule(): + self._collection_dates.append(collection_date) + # self._collection_dates.sort() + + async def add_date(self, collection_date: date) -> None: + """Add date to _collection_dates.""" + if collection_date not in self._collection_dates: + self._collection_dates.append(collection_date) + self._collection_dates.sort() + else: + _LOGGER.warning( + "%s not added to %s - already on the collection schedule", + collection_date, + self.name, + ) + + async def remove_date(self, collection_date: date) -> None: + """Remove date from _collection dates.""" + try: + self._collection_dates.remove(collection_date) + except ValueError: + _LOGGER.warning( + "%s not removed from %s - not in the collection schedule", + collection_date, + self.name, + ) + + def get_next_date(self, first_date: date, ignore_today=False) -> date | None: + """Get next date from self._collection_dates.""" + current_date_time = helpers.now() + for d in self._collection_dates: # pylint: disable=invalid-name + if d < first_date: + continue + if not ignore_today and d == current_date_time.date(): + expiration = ( + self.expire_after + if self.expire_after is not None + else time(23, 59, 59) + ) + if current_date_time.time() > expiration or ( + self.last_collection is not None + and self.last_collection.date() == current_date_time.date() + and current_date_time.time() >= self.last_collection.time() + ): + continue + return d + return None + + async def async_update(self) -> None: + """Get the latest data and updates the states.""" + if not await self._async_ready_for_update() or not self.hass.is_running: + return + + _LOGGER.debug("(%s) Calling update", self._attr_name) + await self._async_load_collection_dates() + _LOGGER.debug( + "(%s) Dates loaded, firing a garbage_collection_loaded event", + self._attr_name, + ) + event_data = { + "entity_id": self.entity_id, + "collection_dates": helpers.dates_to_texts(self._collection_dates), + } + self.hass.bus.async_fire("garbage_collection_loaded", event_data) + if not self._manual: + self.update_state() + + def update_state(self) -> None: + """Pick the first event from collection dates, update attributes.""" + _LOGGER.debug("(%s) Looking for next collection", self._attr_name) + self._last_updated = helpers.now() + today = self._last_updated.date() + self._next_date = self.get_next_date(today) + if self._next_date is not None: + _LOGGER.debug( + "(%s) next_date (%s), today (%s)", + self._attr_name, + self._next_date, + today, + ) + self._days = (self._next_date - today).days + next_date_txt = self._next_date.strftime(self._date_format) + _LOGGER.debug( + "(%s) Found next collection date: %s, that is in %d days", + self._attr_name, + next_date_txt, + self._days, + ) + if self._days > 1: + if bool(self._verbose_state): + self._attr_state = self._verbose_format.format( + date=next_date_txt, days=self._days + ) + # self._attr_state = "on_date" + else: + self._attr_state = 2 + self._attr_icon = self._icon_normal + else: + if self._days == 0: + if bool(self._verbose_state): + self._attr_state = const.STATE_TODAY + else: + self._attr_state = self._days + self._attr_icon = self._icon_today + elif self._days == 1: + if bool(self._verbose_state): + self._attr_state = const.STATE_TOMORROW + else: + self._attr_state = self._days + self._attr_icon = self._icon_tomorrow + else: + self._days = None + self._attr_state = None + self._attr_icon = self._icon_normal + + +class WeeklyCollection(GarbageCollection): + """Collection every n weeks, odd weeks or even weeks.""" + + __slots__ = "_collection_days", "_first_week", "_period" + + def __init__(self, config_entry: ConfigEntry) -> None: + """Read parameters specific for Weekly Collection Frequency.""" + super().__init__(config_entry) + config = config_entry.options + self._collection_days = config.get(const.CONF_COLLECTION_DAYS, []) + self._period: int + self._first_week: int + frequency = config.get(const.CONF_FREQUENCY) + if frequency == "weekly": + self._period = 1 + self._first_week = 1 + elif frequency == "even-weeks": + self._period = 2 + self._first_week = 2 + elif frequency == "odd-weeks": + self._period = 2 + self._first_week = 1 + else: + self._period = config.get(const.CONF_PERIOD, 1) + self._first_week = config.get(const.CONF_FIRST_WEEK, 1) + + def _find_candidate_date(self, day1: date) -> date | None: + """Calculate possible date, for weekly frequency.""" + week = day1.isocalendar()[1] + weekday = day1.weekday() + offset = -1 + if (week - self._first_week) % self._period == 0: # Collection this week + for day_name in self._collection_days: + day_index = WEEKDAYS.index(day_name) + if day_index >= weekday: # Collection still did not happen + offset = day_index - weekday + break + iterate_by_week = 7 - weekday + WEEKDAYS.index(self._collection_days[0]) + while offset == -1: # look in following weeks + candidate = day1 + relativedelta(days=iterate_by_week) + week = candidate.isocalendar()[1] + if (week - self._first_week) % self._period == 0: + offset = iterate_by_week + break + iterate_by_week += 7 + return day1 + relativedelta(days=offset) + + +class DailyCollection(GarbageCollection): + """Collection every n days.""" + + __slots__ = "_first_date", "_period" + + def __init__(self, config_entry: ConfigEntry) -> None: + """Read parameters specific for Daily Collection Frequency.""" + super().__init__(config_entry) + config = config_entry.options + self._period = config.get(const.CONF_PERIOD) + self._first_date: date | None + try: + self._first_date = helpers.to_date(config.get(const.CONF_FIRST_DATE)) + except ValueError: + self._first_date = None + + def _find_candidate_date(self, day1: date) -> date | None: + """Calculate possible date, for every-n-days frequency.""" + try: + if (day1 - self._first_date).days % self._period == 0: # type: ignore + return day1 + offset = self._period - ( + (day1 - self._first_date).days % self._period # type: ignore + ) + except TypeError as error: + raise ValueError( + f"({self._attr_name}) Please configure first_date and period " + "for every-n-days collection frequency." + ) from error + return day1 + relativedelta(days=offset) + + +class MonthlyCollection(GarbageCollection): + """Collection every nth weekday of each month.""" + + __slots__ = ( + "_collection_days", + "_monthly_force_week_numbers", + "_period", + "_weekday_order_numbers", + "_week_order_numbers", + ) + + def __init__(self, config_entry: ConfigEntry) -> None: + """Read parameters specific for Monthly Collection Frequency.""" + super().__init__(config_entry) + config = config_entry.options + self._collection_days = config.get(const.CONF_COLLECTION_DAYS, []) + self._monthly_force_week_numbers = config.get( + const.CONF_FORCE_WEEK_NUMBERS, False + ) + self._weekday_order_numbers: list + self._week_order_numbers: list + order_numbers: list = [] + if const.CONF_WEEKDAY_ORDER_NUMBER in config: + order_numbers = list(map(int, config[const.CONF_WEEKDAY_ORDER_NUMBER])) + if self._monthly_force_week_numbers: + self._weekday_order_numbers = [] + self._week_order_numbers = order_numbers + else: + self._weekday_order_numbers = order_numbers + self._week_order_numbers = [] + self._period = config.get(const.CONF_PERIOD, 1) + + @staticmethod + def nth_week_date( + week_number: int, date_of_month: date, collection_day: int + ) -> date: + """Find weekday in the nth week of the month.""" + first_of_month = date(date_of_month.year, date_of_month.month, 1) + return first_of_month + relativedelta( + days=collection_day - first_of_month.weekday() + (week_number - 1) * 7 + ) + + @staticmethod + def nth_weekday_date( + weekday_number: int, date_of_month: date, collection_day: int + ) -> date: + """Find nth weekday of the month.""" + first_of_month = date(date_of_month.year, date_of_month.month, 1) + # 1st of the month is before the day of collection + # (so 1st collection week the week when month starts) + if collection_day >= first_of_month.weekday(): + return first_of_month + relativedelta( + days=collection_day + - first_of_month.weekday() + + (weekday_number - 1) * 7 + ) + return first_of_month + relativedelta( + days=7 + - first_of_month.weekday() + + collection_day + + (weekday_number - 1) * 7 + ) + + def _monthly_candidate(self, day1: date) -> date: + """Calculate possible date, for monthly frequency.""" + if self._monthly_force_week_numbers: + for week_order_number in self._week_order_numbers: + candidate_date = MonthlyCollection.nth_week_date( + week_order_number, day1, WEEKDAYS.index(self._collection_days[0]) + ) + # date is today or in the future -> we have the date + if candidate_date >= day1: + return candidate_date + else: + for weekday_order_number in self._weekday_order_numbers: + candidate_date = MonthlyCollection.nth_weekday_date( + weekday_order_number, + day1, + WEEKDAYS.index(self._collection_days[0]), + ) + # date is today or in the future -> we have the date + if candidate_date >= day1: + return candidate_date + if day1.month == 12: + next_collection_month = date(day1.year + 1, 1, 1) + else: + next_collection_month = date(day1.year, day1.month + 1, 1) + if self._monthly_force_week_numbers: + return MonthlyCollection.nth_week_date( + self._week_order_numbers[0], + next_collection_month, + WEEKDAYS.index(self._collection_days[0]), + ) + return MonthlyCollection.nth_weekday_date( + self._weekday_order_numbers[0], + next_collection_month, + WEEKDAYS.index(self._collection_days[0]), + ) + + def _find_candidate_date(self, day1: date) -> date | None: + if self._period is None or self._period == 1: + return self._monthly_candidate(day1) + else: + candidate_date = self._monthly_candidate(day1) + while (candidate_date.month - self._first_month) % self._period != 0: + candidate_date = self._monthly_candidate( + candidate_date + relativedelta(days=1) + ) + return candidate_date + + +class AnnualCollection(GarbageCollection): + """Collection every year.""" + + __slots__ = ("_date",) + + def __init__(self, config_entry: ConfigEntry) -> None: + """Read parameters specific for Annual Collection Frequency.""" + super().__init__(config_entry) + config = config_entry.options + self._date = config.get(const.CONF_DATE) + + def _find_candidate_date(self, day1: date) -> date | None: + """Calculate possible date, for annual frequency.""" + year = day1.year + try: + conf_date = datetime.strptime(self._date, "%m/%d").date() + except TypeError as error: + raise ValueError( + f"({self._attr_name}) Please configure the date " + "for annual collection frequency." + ) from error + if (candidate_date := date(year, conf_date.month, conf_date.day)) < day1: + candidate_date = date(year + 1, conf_date.month, conf_date.day) + return candidate_date + + +class GroupCollection(GarbageCollection): + """Group number of sensors.""" + + __slots__ = ("_entities",) + + def __init__(self, config_entry: ConfigEntry) -> None: + """Read parameters specific for Group Collection Frequency.""" + super().__init__(config_entry) + config = config_entry.options + self._entities = config.get(CONF_ENTITIES, []) + + def _find_candidate_date(self, day1: date) -> date | None: + """Calculate possible date, for group frequency.""" + candidate_date = None + try: + for entity_id in self._entities: + entity: GarbageCollection = self.hass.data[const.DOMAIN][ + const.SENSOR_PLATFORM + ][entity_id] + next_date = entity.get_next_date(day1) + if next_date is not None and ( + candidate_date is None or next_date < candidate_date + ): + candidate_date = next_date + except KeyError as error: + raise ValueError from error + except TypeError as error: + _LOGGER.error("(%s) Please add entities for the group.", self._attr_name) + raise ValueError from error + return candidate_date + + async def _async_ready_for_update(self) -> bool: + """Check if the entity is ready for the update. + + For group sensors wait for update of the sensors in the group + """ + current_date_time = helpers.now() + today = current_date_time.date() + try: + ready_for_update = bool(self._last_updated.date() != today) # type: ignore + except AttributeError: + ready_for_update = True + members_ready = True + for entity_id in self._entities: + try: + entity: GarbageCollection = self.hass.data[const.DOMAIN][ + const.SENSOR_PLATFORM + ][entity_id] + await entity.async_update() + except KeyError: + members_ready = False + break + if (last_updated := entity.last_updated) is None: + ready_for_update = True + continue + # Wait for all members to get updated + if last_updated.date() != today: + members_ready = False + break + # A member got updated after the group update + if self._last_updated is None or last_updated > self._last_updated: + ready_for_update = True + if ready_for_update and not members_ready: + ready_for_update = False + return ready_for_update + + +class BlankCollection(GarbageCollection): + """No collection - for mnual update.""" + + def _find_candidate_date(self, day1: date) -> date | None: + """Do not return any date for blank frequency.""" + return None + + async def _async_load_collection_dates(self) -> None: + """Clear collection dates (filled in by the blueprint).""" + self._collection_dates.clear() + return + + async def async_update(self) -> None: + """Get the latest data and updates the states.""" + if not await self._async_ready_for_update() or not self.hass.is_running: + return + + _LOGGER.debug("(%s) Calling update", self._attr_name) + await self._async_load_collection_dates() + _LOGGER.debug( + "(%s) Dates loaded, firing a garbage_collection_loaded event", + self._attr_name, + ) + event_data = { + "entity_id": self.entity_id, + "collection_dates": [], + } + self.hass.bus.async_fire("garbage_collection_loaded", event_data) diff --git a/custom_components/garbage_collection/services.yaml b/custom_components/garbage_collection/services.yaml new file mode 100644 index 000000000..0eeed9a1f --- /dev/null +++ b/custom_components/garbage_collection/services.yaml @@ -0,0 +1,60 @@ +collect_garbage: + description: Set the last_collection attribute to the current date and time. + target: + entity: + integration: garbage_collection + fields: + entity_id: + description: The garbage_collection sensor entity_id + example: sensor.general_waste + last_collection: + description: Date and time of the last collection (optional) + example: "2020-08-16 10:54:00" +add_date: + description: Manually add collection date. + target: + entity: + integration: garbage_collection + fields: + entity_id: + description: The garbage_collection sensor entity_id + example: sensor.general_waste + date: + description: Collection date to add + example: '"2020-08-16"' +offset_date: + description: Move the collection date by a number of days. + target: + entity: + integration: garbage_collection + fields: + entity_id: + description: The garbage_collection sensor entity_id + example: sensor.general_waste + date: + description: Collection date to move + example: '"2020-08-16"' + offset: + description: Nuber of days to move (negative number will move it back) + example: 1 +remove_date: + description: Remove automatically calculated collection date. + target: + entity: + integration: garbage_collection + fields: + entity_id: + description: The garbage_collection sensor entity_id + example: sensor.general_waste + date: + description: Collection date to remove + example: '"2020-08-16"' +update_state: + description: Update the entity state and attributes. Used with the manual_update option, do defer the update after changing the automatically created schedule by automation trigered by the garbage_collection_loaded event. + target: + entity: + integration: garbage_collection + fields: + entity_id: + description: The garbage_collection sensor entity_id + example: sensor.general_waste diff --git a/custom_components/garbage_collection/translations/cs.json b/custom_components/garbage_collection/translations/cs.json new file mode 100644 index 000000000..014c23bb6 --- /dev/null +++ b/custom_components/garbage_collection/translations/cs.json @@ -0,0 +1,104 @@ +{ + "config": { + "step": { + "user": { + "title": "Garbage Collection - Konfigurace (1/2)", + "description": "Zadej jméno sensoru a nastav parametry. Více na https://github.com/bruxy70/Garbage-Collection", + "data": { + "name": "Friendly name", + "hidden": "Skrýt v kalendáři", + "frequency": "Frekvence", + "manual_update": "Manual update - state je aktualizovaný manuálně voláním služby", + "icon_normal": "Ikona (mdi:trash-can)", + "icon_tomorrow": "Ikona svoz zítra (mdi:delete-restore)", + "icon_today": "Ikona svoz dnes (mdi:delete-circle)", + "expire_after": "Čas expirace (HH:MM)", + "verbose_state": "Verbose state (popis místo čísel)" + } + }, + "detail": { + "title": "Garbage Collection - Další parametry (2/2)", + "description": "Více na: https://github.com/bruxy70/Garbage-Collection", + "data": { + "date": "Datum (mm/dd)", + "entities": "Seznam entit (odděleno čárkou)", + "collection_days": "Dny svozu", + "first_month": "První měsíc svozu", + "last_month": "Poslední měsíc svozu", + "period": "Perioda (svoz každých n týdnů/dnů): (1-1000)", + "first_week": "První týden svozu (1-52)", + "first_date": "První datum", + "weekday_order_number": "Pořadí dne v měsící (např. první středa v měsíci)", + "force_week_order_numbers": "Číslo týdne v měsící místo čísla dne", + "verbose_format": "Verbose format (Použij `date` a `days` proměnné (ve složených závorkách))", + "date_format": "Formát data(see http://strftime.org/)" + } + } + }, + "error": { + "value": "Chybná hodnota. Zkontroluj zadané hodnoty!", + "icon": "Ikony musí být zadány ve formátu 'prefix:jmnéno'.", + "days": "Vyber jeden nebo více dní!", + "entities": "Entita neexistuje!", + "month_day": "Špatný formát data!", + "time": "Špatný formát času!", + "weekday_order_number": "Vyber jeden nebo více dní!", + "week_order_number": "Vyber jeden nebo více týdnů!", + "period": "Perioda musí být číslo mezi 1 a 1000", + "first_week": "První týden musí být číslo mezi 1 a 52", + "date": "Špatný formát data!" + }, + "abort": { + "single_instance_allowed": "Only a single configuration of Garbage Collection is allowed." + } + }, + "options": { + "step": { + "init": { + "title": "Garbage Collection - Konfigurace (1/2)", + "description": "Zadej jméno sensoru a nastav parametry. Více na https://github.com/bruxy70/Garbage-Collection", + "data": { + "hidden": "Skrýt v kalendáři", + "frequency": "Frekvence", + "manual_update": "State je aktualizovaný manuálně voláním služby", + "icon_normal": "Ikona (mdi:trash-can)", + "icon_tomorrow": "Ikona svoz zítra (mdi:delete-restore)", + "icon_today": "Ikona svoz dnes (mdi:delete-circle)", + "expire_after": "Čas expirace (HH:MM)", + "verbose_state": "Verbose state (popis místo čísel)" + } + }, + "detail": { + "title": "Garbage Collection - Další parametry (2/2)", + "description": "", + "data": { + "date": "Datum (mm/dd)", + "entities": "Seznam entit (odděleno čárkou)", + "collection_days": "Dny svozu", + "first_month": "První měsíc svozu", + "last_month": "Poslední měsíc scozu", + "period": "Perioda (svoz každých n týdnů-dnů): (1-1000)", + "first_week": "První týden svozu (1-52)", + "first_date": "První datum", + "weekday_order_number": "Pořadí dne v měsící (např. první středa v měsíci)", + "force_week_order_numbers": "Číslo týdne v měsící místo čísla dne", + "verbose_format": "Verbose format (Použij `date` a `days` proměnné (ve složených závorkách))", + "date_format": "Formát data(see http://strftime.org/)" + } + } + }, + "error": { + "value": "Chybná hodnota. Zkontroluj zadané hodnoty!", + "icon": "Ikony musí být zadány ve formátu 'prefix:jmnéno'.", + "days": "Vyber jeden nebo více dní!", + "entities": "Entita neexistuje!", + "month_day": "Špatný formát data!", + "time": "Špatný formát času!", + "weekday_order_number": "Vyber jeden nebo více dní!", + "week_order_number": "Vyber jeden nebo více týdnů!", + "period": "Perioda musí být číslo mezi 1 a 1000", + "first_week": "První týden musí být číslo mezi 1 a 52", + "date": "Špatný formát data!" + } + } +} \ No newline at end of file diff --git a/custom_components/garbage_collection/translations/da.json b/custom_components/garbage_collection/translations/da.json new file mode 100644 index 000000000..774f02677 --- /dev/null +++ b/custom_components/garbage_collection/translations/da.json @@ -0,0 +1,105 @@ +{ + "config": { + "step": { + "user": { + "title": "Garbage Collection - Afhentningsfrekvens (1/2)", + "description": "Angiv navnet på sensoren og konfigurer sensorparametre. For mere info se: https://github.com/bruxy70/Garbage-Collection", + "data": { + "name": "Visningsnavn", + "hidden": "Skjul i kalender", + "frequency": "Frekvens", + "manual_update": "Manuel opdatering - sensortilstand opdateres manuelt af en service (blueprint)", + "icon_normal": "Ikon (mdi:trash-can) - ikke påkrævet", + "icon_tomorrow": "Ikon ved afhentning i morgen (mdi:delete-restore) - ikke påkrævet", + "icon_today": "Ikon ved afhentning i dag (mdi:delete-circle) - ikke påkrævet", + "expire_after": "Forældes efter (HH:MM) - ikke påkrævet", + "verbose_state": "Verbos tilstand (tekst i stedet for tal)" + } + }, + "detail": { + "title": "Garbage Collection - Yderligere parametre (2/2)", + "description": "For mere info se: https://github.com/bruxy70/Garbage-Collection", + "data": { + "date": "Dato (mm/dd)", + "entities": "Liste af enheder (kommasepareret)", + "collection_days": "Afhentningsdage", + "first_month": "Første afhentningsmåned", + "last_month": "Sidste afhentningsmåned", + "period": "Afhentning sker hver n uger/dage: (1-1000)", + "first_week": "Første afhentningsuge (1-52)", + "first_date": "Første dato", + "weekday_order_number": "Specifikke ugedage i måneden (fx første onsdag i måneden)", + "force_week_order_numbers": "Brug specifik uge i måneden i stedet for specifik ugedag (fx onsdag i første uge i måneden)", + "verbose_format": "Verbost format (anvend `date` og `days` variablerne (i tuborgklammer))", + "date_format": "Datoformat (se http://strftime.org/)" + } + } + }, + "error": { + "value": "Ugyldig værdi. Check dit input!", + "icon": "Ikoner skal angives i formen 'præfiks:navn'.", + "days": "Vælg en eller flere dage!", + "entities": "Enheden findes ikke!", + "month_day": "Ugyldigt dato format!", + "time": "Ugyldigt tids format!", + "weekday_order_number": "Vælg en eller flere dage", + "week_order_number": "Vælg en eller flere uger", + "period": "Afhentningsperioden skal være et tal mellem 1 og 1000", + "first_week": "Første afhentningsuge skal være et tal mellem 1 and 52", + "date": "Ugyldigt dato format!" + }, + "abort": { + "single_instance_allowed": "Det er kun tilladt at have én konfiguration af Garbage Collection." + } + }, + "options": { + "step": { + "init": { + "title": "Garbage Collection - Afhentningsfrekvens (1/2)", + "description": "Ændr sensorparametre. More info on https://github.com/bruxy70/Garbage-Collection", + "data": { + "hidden": "Skjul i kalender", + "frequency": "Frekvens", + "manual_update": "Manuel opdatering - sensortilstand opdateres manuelt af en service (blueprint)", + "icon_normal": "Ikon (mdi:trash-can) - ikke påkrævet", + "icon_tomorrow": "Ikon ved afhentning i morgen (mdi:delete-restore) - ikke påkrævet", + "icon_today": "Ikon ved afhentning i dag (mdi:delete-circle) - ikke påkrævet", + "expire_after": "Forældes efter (HH:MM) - ikke påkrævet", + "verbose_state": "Verbos tilstand (tekst i stedet for tal)" + } + }, + "detail": { + "title": "Garbage Collection - Yderligere parametre (2/2)", + "description": "For mere info se: https://github.com/bruxy70/Garbage-Collection", + "data": { + "date": "Dato (mm/dd)", + "entities": "Liste af enheder (kommasepareret)", + "collection_days": "Afhentningsdage", + "first_month": "Første afhentningsmåned", + "last_month": "Sidste afhentningsmåned", + "period": "Afhentning sker hver n uger/dage: (1-1000)", + "first_week": "Første afhentningsuge (1-52)", + "first_date": "Første dato", + "weekday_order_number": "Specifikke ugedage i måneden (fx første onsdag i måneden)", + "force_week_order_numbers": "Brug specifik uge i måneden i stedet for specifik ugedag (fx onsdag i første uge i måneden)", + "verbose_format": "Verbost format (anvend `date` og `days` variablerne (i tuborgklammer))", + "date_format": "Datoformat (se http://strftime.org/)" + } + } + }, + "error": { + "value": "Ugyldig værdi. Check dit input!", + "icon": "Ikoner skal angives i formen 'præfiks:navn'.", + "days": "Vælg en eller flere dage!", + "entities": "Enheden findes ikke!", + "month_day": "Ugyldigt dato format!", + "time": "Ugyldigt tids format!", + "weekday_order_number": "Vælg en eller flere dage", + "week_order_number": "Vælg en eller flere uger", + "period": "Afhentningsperioden skal være et tal mellem 1 og 1000", + "first_week": "Første afhentningsuge skal være et tal mellem 1 and 52", + "date": "Ugyldigt dato format!" + } + } + +} \ No newline at end of file diff --git a/custom_components/garbage_collection/translations/de.json b/custom_components/garbage_collection/translations/de.json new file mode 100644 index 000000000..0c29fc6ce --- /dev/null +++ b/custom_components/garbage_collection/translations/de.json @@ -0,0 +1,104 @@ +{ + "config": { + "step": { + "user": { + "title": "Müllabfuhr - Häufigkeit der Abholung (1/2)", + "description": "Geben Sie den Sensornamen ein und konfigurieren Sie die Sensorparameter. Mehr Informationen unter https://github.com/bruxy70/Garbage-Collection", + "data": { + "name": "Friendly Name", + "hidden": "Im Kalender ausblenden", + "frequency": "Häufigkeit", + "manual_update": "Manuelle Aktualisierung - Sensorstatus wird manuell durch einen Dienst aktualisiert (Vorlage)", + "icon_normal": "Icon (mdi:trash-can) - optional", + "icon_tomorrow": "Icon Abfuhr morgen (mdi:delete-restore) - optional", + "icon_today": "Icon Abfuhr heute (mdi:delete-circle) - optional", + "expire_after": "Ablauf nach (HH:MM) - optional", + "verbose_state": "Ausführlicher Status (Text, statt Zahl)" + } + }, + "detail": { + "title": "Müllabfuhr - Zusätzliche Parameter (2/2)", + "description": "Mehr Details hier: https://github.com/bruxy70/Garbage-Collection", + "data": { + "date": "Datum (mm/dd)", + "entities": "Liste der Entitäten (durch Komma getrennt)", + "collection_days": "Tage der Abholung", + "first_month": "Erster Abholungsmonat", + "last_month": "Letzter Abholungsmonat", + "period": "Abholung alle n Wochen/Tage: (1-1000)", + "first_week": "Erste Abholungswoche (1-52)", + "first_date": "Erstes Datum", + "weekday_order_number": "Reihenfolge der Wochentage im Monat (z. B. erster Mittwoch im Monat)", + "force_week_order_numbers": "Reihenfolge der Woche im Monat statt Wochentagsreihenfolge (z. B. am Mittwoch der ersten Woche)", + "verbose_format": "Ausführliches Format (unter Verwendung der Variablen 'Datum' und 'Tage' (in eckigen Klammern))", + "date_format": "Datumsformat (siehe http://strftime.org/)" + } + } + }, + "error": { + "value": "Ungültiger Wert. Bitte überprüfen Sie Ihre Eingabe!", + "icon": "Icons sollten in der Form 'Präfix:Name' angegeben werden.", + "days": "Wählen Sie 1 oder mehrere Tage aus!", + "entities": "Entität existiert nicht!", + "month_day": "Ungültiges Datumsformat!", + "time": "Ungültiges Zeitformat!", + "weekday_order_number": "Wählen Sie 1 oder mehrere Tage aus", + "week_order_number": "Wählen Sie 1 oder mehrere Wochen aus", + "period": "Zeitraum muss eine Zahl zwischen 1 und 1000 sein", + "first_week": "Erste Woche muss eine Zahl zwischen 1 und 52 sein", + "date": "Ungültiges Datumsformat!" + }, + "abort": { + "single_instance_allowed": "Es ist nur eine einzige Konfiguration von Garbage Collection erlaubt." + } + }, + "options": { + "step": { + "init": { + "title": "Müllabfuhr - Häufigkeit der Abholung (1/2)", + "description": "Sensorparameter ändern. Mehr Informationen unter https://github.com/bruxy70/Garbage-Collection", + "data": { + "hidden": "Im Kalender ausblenden", + "frequency": "Häufigkeit", + "manual_update": "Manuelle Aktualisierung - Sensorstatus wird manuell durch einen Dienst aktualisiert (Vorlage)", + "icon_normal": "Icon (mdi:trash-can) - optional", + "icon_tomorrow": "Icon Abfuhr morgen (mdi:delete-restore) - optional", + "icon_today": "Icon Abfuhr heute (mdi:delete-circle) - optional", + "expire_after": "Ablauf nach (HH:MM) - optional", + "verbose_state": "Ausführlicher Status (Text, statt Zahl)" + } + }, + "detail": { + "title": "Müllabfuhr - Zusätzliche Parameter (2/2)", + "description": "Mehr Details hier: https://github.com/bruxy70/Garbage-Collection", + "data": { + "date": "Datum (mm/dd)", + "entities": "Liste der Entitäten (durch Komma getrennt)", + "collection_days": "Tage der Abholung", + "first_month": "Erster Abholungsmonat", + "last_month": "Letzter Abholungsmonat", + "period": "Abholung alle n Wochen/Tage: (1-1000)", + "first_week": "Erste Abholungswoche (1-52)", + "first_date": "Erstes Datum", + "weekday_order_number": "Reihenfolge der Wochentage im Monat (z. B. erster Mittwoch im Monat)", + "force_week_order_numbers": "Reihenfolge der Woche im Monat statt Wochentagsreihenfolge (z. B. am Mittwoch der ersten Woche)", + "verbose_format": "Ausführliches Format (unter Verwendung der Variablen 'Datum' und 'Tage' (in eckigen Klammern))", + "date_format": "Datumsformat (siehe http://strftime.org/)" + } + } + }, + "error": { + "value": "Ungültiger Wert. Bitte überprüfen Sie Ihre Eingabe!", + "icon": "Icons sollten in der Form 'Präfix:Name' angegeben werden.", + "days": "Wählen Sie 1 oder mehrere Tage aus!", + "entities": "Entität existiert nicht!", + "month_day": "Ungültiges Datumsformat!", + "time": "Ungültiges Zeitformat!", + "weekday_order_number": "Wählen Sie 1 oder mehrere Tage aus", + "week_order_number": "Wählen Sie 1 oder mehrere Wochen aus", + "period": "Zeitraum muss eine Zahl zwischen 1 und 1000 sein", + "first_week": "Erste Woche muss eine Zahl zwischen 1 und 52 sein", + "date": "Ungültiges Datumsformat!" + } + } +} diff --git a/custom_components/garbage_collection/translations/en.json b/custom_components/garbage_collection/translations/en.json new file mode 100644 index 000000000..c1f18da3a --- /dev/null +++ b/custom_components/garbage_collection/translations/en.json @@ -0,0 +1,105 @@ +{ + "config": { + "step": { + "user": { + "title": "Garbage Collection - Collection frequency (1/2)", + "description": "Enter the sensor name and configure sensor parameters. More info on https://github.com/bruxy70/Garbage-Collection", + "data": { + "name": "Friendly name", + "hidden": "Hide in calendar", + "frequency": "Frequency", + "manual_update": "Manual update - sensor state updated manually by a service (Blueprint)", + "icon_normal": "Icon (mdi:trash-can) - optional", + "icon_tomorrow": "Icon collection tomorrow (mdi:delete-restore) - optional", + "icon_today": "Icon collection today (mdi:delete-circle) - optional", + "expire_after": "Expire after (HH:MM) - optional", + "verbose_state": "Verbose state (text, instead of number)" + } + }, + "detail": { + "title": "Garbage Collection - Additional parameters (2/2)", + "description": "More details here: https://github.com/bruxy70/Garbage-Collection", + "data": { + "date": "Date (mm/dd)", + "entities": "List of entities (comma separated)", + "collection_days": "Collection days", + "first_month": "First collection month", + "last_month": "Last collection month", + "period": "Collection every n weeks/days: (1-1000)", + "first_week": "First collection week (1-52)", + "first_date": "First date", + "weekday_order_number": "Order of the weekday in the month (e.g. first Wednesday of the month)", + "force_week_order_numbers": "Order of week in a month instead of order of weekday (e.g. on Wednesday of the first week)", + "verbose_format": "Verbose format (using `date` and `days` variables (in squary brackets))", + "date_format": "Date format (see http://strftime.org/)" + } + } + }, + "error": { + "value": "Invalid value. Please check your input!", + "icon": "Icons should be specified in the form 'prefix:name'.", + "days": "Select 1 or more days!", + "entities": "Entity does not exist!", + "month_day": "Invalid date format!", + "time": "Invalid time format!", + "weekday_order_number": "Select 1 or more days", + "week_order_number": "Select 1 or more weeks", + "period": "Period must be a number between 1 and 1000", + "first_week": "First week must be a number between 1 and 52", + "date": "Invalid date format!" + }, + "abort": { + "single_instance_allowed": "Only a single configuration of Garbage Collection is allowed." + } + }, + "options": { + "step": { + "init": { + "title": "Garbage Collection - Collection frequency (1/2)", + "description": "Change sensor parameters. More info on https://github.com/bruxy70/Garbage-Collection", + "data": { + "hidden": "Hide in calendar", + "frequency": "Frequency", + "manual_update": "Manual update - sensor state updated manually by a service (Blueprint)", + "icon_normal": "Icon (mdi:trash-can) - optional", + "icon_tomorrow": "Icon collection tomorrow (mdi:delete-restore) - optional", + "icon_today": "Icon collection today (mdi:delete-circle) - optional", + "expire_after": "Expire after (HH:MM) - optional", + "verbose_state": "Verbose state (text, instead of number)" + } + }, + "detail": { + "title": "Garbage Collection - Additional parameters (2/2)", + "description": "More details here: https://github.com/bruxy70/Garbage-Collection", + "data": { + "date": "Date (mm/dd)", + "entities": "List of entities (comma separated)", + "collection_days": "Collection days", + "first_month": "First collection month", + "last_month": "Last collection month", + "period": "Collection every n weeks/days: (1-1000)", + "first_week": "First collection week (1-52)", + "first_date": "First date", + "weekday_order_number": "Order of the weekday in the month (e.g. first Wednesday of the month)", + "force_week_order_numbers": "Order of week in a month instead of order of weekday (e.g. on Wednesday of the first week)", + "verbose_format": "Verbose format (using `date` and `days` variables (in squary brackets))", + "date_format": "Date format (see http://strftime.org/)" + } + } + }, + "error": { + "value": "Invalid value. Please check your input!", + "icon": "Icons should be specified in the form 'prefix:name'.", + "days": "Select 1 or more days!", + "entities": "Entity does not exist!", + "month_day": "Invalid date format!", + "time": "Invalid time format!", + "weekday_order_number": "Select 1 or more days", + "week_order_number": "Select 1 or more weeks", + "period": "Period must be a number between 1 and 1000", + "first_week": "First week must be a number between 1 and 52", + "date": "Invalid date format!" + } + } + +} \ No newline at end of file diff --git a/custom_components/garbage_collection/translations/es.json b/custom_components/garbage_collection/translations/es.json new file mode 100644 index 000000000..6d65d3de2 --- /dev/null +++ b/custom_components/garbage_collection/translations/es.json @@ -0,0 +1,105 @@ +{ + "config": { + "step": { + "user": { + "title": "Recolección de basura - Frecuencia de recogida (1/2)", + "description": "Ingrese el nombre del sensor y configure los parámetros del sensor. Más información en https://github.com/bruxy70/Garbage-Collection", + "data": { + "name": "Nombre amigable", + "hidden": "Esconderse en el calendario", + "frequency": "Frequencia", + "manual_update": "El estado del sensor se actualiza manualmente llamando a un servicio", + "icon_normal": "Icono (mdi:trash-can)", + "icon_tomorrow": "Icono de recoleccion para mañana (mdi:delete-restore)", + "icon_today": "Icono de recoleccion para hoy (mdi:delete-circle)", + "expire_after": "Caduca después (HH:MM)", + "verbose_state": "Estado detallado (texto, en lugar de número)" + } + }, + "detail": { + "title": "Recolección de basura - Parámetros adicionales (2/2)", + "description": "Más detalles aquí: https://github.com/bruxy70/Garbage-Collection", + "data": { + "date": "Fecha (mm/dd)", + "entities": "Lista de entidades (separadas por comas)", + "collection_days": "Días de recogida", + "first_month": "Primer mes de recogida", + "last_month": "Último mes de recogida", + "period": "Recolección cada n semanas / días: (1-1000)", + "first_week": "Primera semana de recolección (1-52)", + "first_date": "Primera fecha", + "weekday_order_number": "Orden del día de la semana en el mes (por ejemplo, primer miércoles del mes)", + "force_week_order_numbers": "Orden de la semana en un mes en lugar de orden del día de la semana (por ejemplo, el miércoles de la primera semana)", + "verbose_format": "Formato detallado (usando las variables `fecha` y` dias` (entre corchetes))", + "date_format": "Formato de fecha(ver en http://strftime.org/)" + } + } + }, + "error": { + "value": "Valor no válido. Por favor revise su entrada!", + "icon": "Los iconos deben especificarse en el formato 'prefix:name'.", + "days": "Seleccione 1 o más días!", + "entities": "La entidad no existe!", + "month_day": "Formato de fecha inválido!", + "time": "Formato de hora inválido!", + "weekday_order_number": "Seleccione 1 o más días", + "week_order_number": "Seleccione 1 o más semanas", + "period": "El período debe ser un número entre 1 y 1000", + "first_week": "La primera semana debe ser un número entre 1 y 52", + "date": "Formato de fecha inválido!" + }, + "abort": { + "single_instance_allowed": "Solo se permite una única configuración de Recolección de basura." + } + }, + "options": { + "step": { + "init": { + "title": "Recolección de basura - Frecuencia de recogida (1/2)", + "description": "Cambiar los parámetros del sensor. Más información en https://github.com/bruxy70/Garbage-Collection", + "data": { + "hidden": "Esconderse en el calendario", + "frequency": "Frequencia", + "manual_update": "El estado del sensor se actualiza manualmente llamando a un servicio", + "icon_normal": "Icono (mdi:trash-can)", + "icon_tomorrow": "Icono de recoleccion para mañana (mdi:delete-restore)", + "icon_today": "Icono de recoleccion para hoy (mdi:delete-circle)", + "expire_after": "Caduca después (HH:MM)", + "verbose_state": "Estado detallado (texto, en lugar de número)" + } + }, + "detail": { + "title": "Recolección de basura - Parámetros adicionales (2/2)", + "description": "Más detalles aquí: https://github.com/bruxy70/Garbage-Collection", + "data": { + "date": "Fecha (mm/dd)", + "entities": "Lista de entidades (separadas por comas)", + "collection_days": "Días de recogida", + "first_month": "Primer mes de recogida", + "last_month": "Último mes de recogida", + "period": "Recolección cada n semanas / días: (1-1000)", + "first_week": "Primera semana de recolección (1-52)", + "first_date": "Primera fecha", + "weekday_order_number": "Orden del día de la semana en el mes (por ejemplo, primer miércoles del mes)", + "force_week_order_numbers": "Orden de la semana en un mes en lugar de orden del día de la semana (por ejemplo, el miércoles de la primera semana)", + "verbose_format": "Formato detallado (usando las variables `fecha` y` dias` (entre corchetes))", + "date_format": "Formato de fecha(ver en http://strftime.org/)" + } + } + }, + "error": { + "value": "Valor no válido. Por favor revise su entrada!", + "icon": "Los iconos deben especificarse en el formato 'prefix:name'.", + "days": "Seleccione 1 o más días!", + "entities": "La entidad no existe!", + "month_day": "Formato de fecha inválido!", + "time": "Formato de hora inválido!", + "weekday_order_number": "Seleccione 1 o más días", + "week_order_number": "Seleccione 1 o más semanas", + "period": "El período debe ser un número entre 1 y 1000", + "first_week": "La primera semana debe ser un número entre 1 y 52", + "date": "Formato de fecha inválido!" + } + } + +} diff --git a/custom_components/garbage_collection/translations/et.json b/custom_components/garbage_collection/translations/et.json new file mode 100644 index 000000000..bd68ee31e --- /dev/null +++ b/custom_components/garbage_collection/translations/et.json @@ -0,0 +1,105 @@ +{ + "config": { + "step": { + "user": { + "title": "Prügivedu - tühjendamiste ajad (1/2)", + "description": "Sisesta nduri andmed. Rohkem infot leiab https://github.com/bruxy70/Garbage-Collection", + "data": { + "name": "Kuvatav nimi", + "hidden": "Ära näita kalendris", + "frequency": "Sagedus", + "manual_update": "Sensor state updated manually by calling a service", + "icon_normal": "Ikoon (mdi:trash-can) - valikuline", + "icon_tomorrow": "Homme on prügivedu ikoon (mdi:delete-restore) - valikuline", + "icon_today": "Täna on prügivedu ikoon (mdi:delete-circle) - valikuline", + "expire_after": "Ajalõpp (HH:MM) - valikuline", + "verbose_state": "Teavitus tekstina (aeg tekstina numbrite asemel)" + } + }, + "detail": { + "title": "Prügivedu - täiendavad sätted (2/2)", + "description": "Vali üks või mitu tühjendamise nädalapäeva. Rohkem teavet: https://github.com/bruxy70/Garbage-Collection", + "data": { + "date": "Kuupäev (mm/dd)", + "entities": "Olemite nimekiri (komadega eraldatud)", + "collection_days": "Tühjendamise nädalapäevad", + "first_month": "Esimene prügiveo kuu", + "last_month": "Viimane prügiveo kuu", + "period": "Prügivedu iga n päeva/nädala tagant: (1-1000)", + "first_week": "Esimese prügiveo nädal (1-52)", + "first_date": "Esimese prügiveo kuupäev", + "weekday_order_number": "Kuu nädalapäevade järjekord (nt kuu esimene kolmapäev)", + "force_week_order_numbers": "nädala järjekord kuus, mitte nädalapäevade järjekord (nt esimese nädala kolmapäeval).", + "verbose_format": "Teavituse formaat (kasutades `date` and `days` muutujaid (kantsulgudes))", + "date_format": "Kuupäeva formaat (vaata http://strftime.org/)" + } + } + }, + "error": { + "value": "Vigane sisestus, palun kontrolli!", + "icon": "Ikoonid tuleb esitada kujul 'prefix:name'.", + "days": "Valige üks või rohkem päevi!", + "entities": "Olem puudub!", + "month_day": "Vigane kuupäeva formaat!", + "time": "Vigane kellaaja formaat!", + "weekday_order_number": "Valige üks või rohkem päevi", + "week_order_number": "Valige üks või rohkem nädalat", + "period": "Välp peab olema number 1 ja 1000 vahel", + "first_week": "Esimene nädal peab olema number 1 ja 52 vahel", + "date": "Vigane kuupäeva formaat!!" + }, + "abort": { + "single_instance_allowed": "Lubatud on ainult üks prügiveo olemi sidumine." + } + }, + "options": { + "step": { + "init": { + "title": "Prügivedu - tühjendamiste ajad (1/2)", + "description": "Sisesta nduri andmed. Rohkem infot leiab https://github.com/bruxy70/Garbage-Collection", + "data": { + "hidden": "Ära näita kalendris", + "frequency": "Sagedus", + "manual_update": "Sensor state updated manually by calling a service", + "icon_normal": "Ikoon (mdi:trash-can) - valikuline", + "icon_tomorrow": "Homme on prügivedu ikoon (mdi:delete-restore) - valikuline", + "icon_today": "Täna on prügivedu ikoon (mdi:delete-circle) - valikuline", + "expire_after": "Ajalõpp (HH:MM) - valikuline", + "verbose_state": "Teavitus tekstina (aeg tekstina numbrite asemel)" + } + }, + "detail": { + "title": "Prügivedu - täiendavad sätted (2/2)", + "description": "Vali üks või mitu tühjendamise nädalapäeva. Rohkem teavet: https://github.com/bruxy70/Garbage-Collection", + "data": { + "date": "Kuupäev (mm/dd)", + "entities": "Olemite nimekiri (komadega eraldatud)", + "collection_days": "Tühjendamise nädalapäevad", + "first_month": "Esimene prügiveo kuu", + "last_month": "Viimane prügiveo kuu", + "period": "Prügivedu iga n päeva/nädala tagant: (1-1000)", + "first_week": "Esimese prügiveo nädal (1-52)", + "first_date": "Esimese prügiveo kuupäev", + "weekday_order_number": "Kuu nädalapäevade järjekord (nt kuu esimene kolmapäev)", + "force_week_order_numbers": "nädala järjekord kuus, mitte nädalapäevade järjekord (nt esimese nädala kolmapäeval).", + "verbose_format": "Teavituse formaat (kasutades `date` and `days` muutujaid (kantsulgudes))", + "date_format": "Kuupäeva formaat (vaata http://strftime.org/)" + } + } + }, + "error": { + "value": "Vigane sisestus, palun kontrolli!", + "icon": "Ikoonid tuleb esitada kujul 'prefix:name'.", + "days": "Valige üks või rohkem päevi!", + "entities": "Olem puudub!", + "month_day": "Vigane kuupäeva formaat!", + "time": "Vigane kellaaja formaat!", + "weekday_order_number": "Valige üks või rohkem päevi", + "week_order_number": "Valige üks või rohkem nädalat", + "period": "Välp peab olema number 1 ja 1000 vahel", + "first_week": "Esimene nädal peab olema number 1 ja 52 vahel", + "date": "Vigane kuupäeva formaat!!" + } + } + +} diff --git a/custom_components/garbage_collection/translations/fr.json b/custom_components/garbage_collection/translations/fr.json new file mode 100644 index 000000000..16618d15d --- /dev/null +++ b/custom_components/garbage_collection/translations/fr.json @@ -0,0 +1,107 @@ +{ + "config": { + "step": { + "user": { + "title": "Garbage Collection - Fréquence de la collecte (1/2)", + "description": "Définir le nom du capteur et configurer les paramètres du capteur. Plus d'info sur https://github.com/bruxy70/Garbage-Collection", + "data": { + "name": "Friendly name", + "hidden": "Masquer dans le calendrier", + "frequency": "Fréquence", + "manual_update": "État du capteur mis à jour manuellement en appelant un service", + "icon_normal": "Icône (mdi:trash-can)", + "icon_tomorrow": "Icône pour collecte à jour J+1 (mdi:delete-restore)", + "icon_today": "Icône pour collecte au jour J (mdi:delete-circle)", + "offset": "Décalage (entre -31 et 31 jours)", + "expire_after": "Expire après (HH:MM)", + "verbose_state": "Etat verbeux (texte, au lieu du chiffre)" + } + }, + "detail": { + "title": "Garbage Collection - Paramètres additionnels (2/2)", + "description": "Choisir un ou plusieurs jours de collecte. Plus de détail ici: https://github.com/bruxy70/Garbage-Collection", + "data": { + "date": "Date (mm/dd)", + "entities": "Liste des entités (séparées par une virgule)", + "collection_days": "Jours de collecte", + "first_month": "Premier mois de la collecte", + "last_month": "Dernier mois de la collecte", + "period": "Collecte toutes les n semaines/jours: (1-1000)", + "first_week": "Première semaine de la collecte (1-52)", + "first_date": "Première date", + "weekday_order_number": "Ordre du jour de la semaine dans le mois (par exemple, premier mercredi du mois)", + "force_week_order_numbers": "Nième occurrence du jour de la semaine dans un mois, au lieu du jour de la semaine dans la Nième semaine de chaque mois. Plus d'info sur https://github.com/bruxy70/Garbage-Collection#parameters-for-monthly-collection", + "verbose_format": "Format état verbeux (utilisation des variables `date` et `days` (entre caractères accolade ))", + "date_format": "Format de date (voir http://strftime.org/)" + } + } + }, + "error": { + "value": "Valeur invalide. Veuillez vérifier votre saisie !", + "icon": "Les icônes doivent être spécifiées dans le format 'prefix:name'.", + "days": "Choisir un ou plusieurs jours !", + "entities": "L'entité n'existe pas !", + "month_day": "Format de date invalide !", + "time": "Format d'heure invalide !", + "weekday_order_number": "Choisir un ou plusieurs jours", + "week_order_number": "Choisir une ou plusieurs semaines", + "period": "La semaine doit être un nombre entre 1 et 1000", + "first_week": "La première semaine doit être un nombre entre 1 et 52", + "date": "Format de date invalide !" + }, + "abort": { + "single_instance_allowed": "Une seule configuration de Garbage Collection est autorisée" + } + }, + "options": { + "step": { + "init": { + "title": "Garbage Collection - Fréquence de la collecte (1/2)", + "description": "Modifier les paramètres des capteurs. Plus d'infos sur https://github.com/bruxy70/Garbage-Collection", + "data": { + "hidden": "Masquer dans le calendrier", + "frequency": "Fréquence", + "manual_update": "État du capteur mis à jour manuellement en appelant un service", + "icon_normal": "Icône (mdi:trash-can)", + "icon_tomorrow": "Icône pour collecte à jour J+1 (mdi:delete-restore)", + "icon_today": "Icône pour collecte au jour J (mdi:delete-circle)", + "offset": "Décalage (entre -31 et 31 jours)", + "expire_after": "Expire après (HH:MM)", + "verbose_state": "Etat verbeux (texte, au lieu du chiffre)" + } + }, + "detail": { + "title": "Garbage Collection - Paramètres additionnels (2/2)", + "description": "Choisir un ou plusieurs jours de collecte. Plus de détail ici: https://github.com/bruxy70/Garbage-Collection", + "data": { + "date": "Date (mm/dd)", + "entities": "Liste des entités (séparées par une virgule)", + "collection_days": "Jours de collecte", + "first_month": "Premier mois de la collecte", + "last_month": "Dernier mois de la collecte", + "period": "Collecte toutes les n semaines/jours: (1-1000)", + "first_week": "Première semaine de la collecte (1-52)", + "first_date": "Première date", + "weekday_order_number": "Ordre du jour de la semaine dans le mois (par exemple, premier mercredi du mois)", + "force_week_order_numbers": "Nième occurrence du jour de la semaine dans un mois, au lieu du jour de la semaine dans la Nième semaine de chaque mois. Plus d'info sur https://github.com/bruxy70/Garbage-Collection#parameters-for-monthly-collection", + "verbose_format": "Format état verbeux (utilisation des variables `date` et `days` (entre caractères accolade ))", + "date_format": "Format de date (voir http://strftime.org/)" + } + } + }, + "error": { + "value": "Valeur invalide. Veuillez vérifier votre saisie !", + "icon": "Les icônes doivent être spécifiées dans le format 'prefix:name'.", + "days": "Choisir un ou plusieurs jours !", + "entities": "L'entité n'existe pas !", + "month_day": "Format de date invalide !", + "time": "Format d'heure invalide !", + "weekday_order_number": "Choisir un ou plusieurs jours", + "week_order_number": "Choisir une ou plusieurs semaines", + "period": "La semaine doit être un nombre entre 1 et 1000", + "first_week": "La première semaine doit être un nombre entre 1 et 52", + "date": "Format de date invalide !" + } + } + +} diff --git a/custom_components/garbage_collection/translations/it.json b/custom_components/garbage_collection/translations/it.json new file mode 100644 index 000000000..418c020e8 --- /dev/null +++ b/custom_components/garbage_collection/translations/it.json @@ -0,0 +1,105 @@ +{ + "config": { + "step": { + "user": { + "title": "Raccolta Differenziata - Frequenza di raccolta (1/2)", + "description": "Immetti il nome del sensore e configura i suoi parametri. Maggiori informazioni su https://github.com/bruxy70/Garbage-Collection", + "data": { + "name": "Nome personalizzato", + "hidden": "Nascondi nel calendario", + "frequency": "Frequenza", + "manual_update": "Stato del sensore aggiornato manualmente chiamando un servizio", + "icon_normal": "Icona (mdi:trash-can)", + "icon_tomorrow": "Icona raccolta domani (mdi:delete-restore)", + "icon_today": "Icona raccolta oggi (mdi:delete-circle)", + "expire_after": "Scade dopo (HH:MM) - opzionale", + "verbose_state": "Stato Verbale (testo, al posto di numeri)" + } + }, + "detail": { + "title": "Raccolta Differenziata - Parametri aggiuntivi (2/2)", + "description": "Seleziona uno o più giorni di raccolta. Maggiori dettagli qui: https://github.com/bruxy70/Garbage-Collection", + "data": { + "date": "Data (mm/dd)", + "entities": "Lista di entità (separate da virgole)", + "collection_days": "Giorni di raccolta", + "first_month": "Prima raccolta del mese", + "last_month": "Ultima raccolta del mese", + "period": "Raccolta ogni n settimane/giorno: (1-1000)", + "first_week": "Prima raccolta della settimana (1-52)", + "first_date": "Prima date", + "weekday_order_number": "Ordine del giorno della settimana nel mese (ad esempio il primo mercoledì del mese)", + "force_week_order_numbers": "Ordine della settimana in un mese invece dell'ordine del giorno della settimana (per esempio il mercoledì della prima settimana)", + "verbose_format": "Formato Verbale (usare le variabili `date` e `days` (in parentesi graffe))", + "date_format": "Formato Data (vedere http://strftime.org/)" + } + } + }, + "error": { + "value": "Valore non valido. Per favore controlla i tuoi input!", + "icon": "Le icone devono essere specificate nel formato 'prefix:name'.", + "days": "Seleziona uno o più giorni!", + "entities": "L'entità non esiste!", + "month_day": "Formato data non valido!", + "time": "Formato ora non valido!", + "weekday_order_number": "Seleziona uno o più giorni", + "week_order_number": "Seleziona uno o più settimani", + "period": "Il periodo deve essere un numero compreso tra 1 e 1000", + "first_week": "La prima settimana deve essere un numero tra 1 e 52", + "date": "Formato data non valido!" + }, + "abort": { + "single_instance_allowed": "E' consentita solo una singola configurazione di Raccolta Differenziata." + } + }, + "options": { + "step": { + "init": { + "title": "Raccolta Differenziata - Frequenza di raccolta (1/2)", + "description": "Cambia i parametri del sensore. Maggiori informazioni su https://github.com/bruxy70/Garbage-Collection", + "data": { + "hidden": "Nascondi nel calendario", + "frequency": "Frequenza", + "manual_update": "Stato del sensore aggiornato manualmente chiamando un servizio", + "icon_normal": "Icona (mdi:trash-can)", + "icon_tomorrow": "Icona raccolta domani (mdi:delete-restore)", + "icon_today": "Icona raccolta oggi (mdi:delete-circle)", + "expire_after": "Scade dopo (HH:MM) - opzionale", + "verbose_state": "Stato Verbale (testo, al posto di numeri)" + } + }, + "detail": { + "title": "Raccolta Differenziata - Parametri aggiuntivi (2/2)", + "description": "Seleziona uno o più giorni di raccolta. Maggiori dettagli qui: https://github.com/bruxy70/Garbage-Collection", + "data": { + "date": "Data (mm/dd)", + "entities": "Lista di entità (separate da virgole)", + "collection_days": "Giorni di raccolta", + "first_month": "Prima raccolta del mese", + "last_month": "Ultima raccolta del mese", + "period": "Raccolta ogni n settimane/giorno: (1-1000)", + "first_week": "Prima raccolta della settimana (1-52)", + "first_date": "Prima date", + "weekday_order_number": "Ordine del giorno della settimana nel mese (ad esempio il primo mercoledì del mese)", + "force_week_order_numbers": "Ordine della settimana in un mese invece dell'ordine del giorno della settimana (per esempio il mercoledì della prima settimana)", + "verbose_format": "Formato Verbale (usare le variabili `date` e `days` (in parentesi graffe))", + "date_format": "Formato Data (vedere http://strftime.org/)" + } + } + }, + "error": { + "value": "Valore non valido. Per favore controlla i tuoi input!", + "icon": "Le icone devono essere specificate nel formato 'prefix:name'.", + "days": "Seleziona uno o più giorni!", + "entities": "L'entità non esiste!", + "month_day": "Formato data non valido!", + "time": "Formato ora non valido!", + "weekday_order_number": "Seleziona uno o più giorni", + "week_order_number": "Seleziona uno o più settimani", + "period": "Il periodo deve essere un numero compreso tra 1 e 1000", + "first_week": "La prima settimana deve essere un numero tra 1 e 52", + "date": "Formato data non valido!" + } + } + +} diff --git a/custom_components/garbage_collection/translations/pl.json b/custom_components/garbage_collection/translations/pl.json new file mode 100644 index 000000000..3f283c51a --- /dev/null +++ b/custom_components/garbage_collection/translations/pl.json @@ -0,0 +1,105 @@ +{ + "config": { + "step": { + "user": { + "title": "Wywóz Śmieci - Częstotliwość wywozu (1/2)", + "description": "Wprowadź nazwę dla sensora i skonfiguruj jego parametry. Więcej informacji na stronie https://github.com/bruxy70/Garbage-Collection", + "data": { + "name": "Przyjazna nazwa", + "hidden": "Ukryj w kalendarzu", + "frequency": "Częstotliwość", + "manual_update": "Stan czujnika aktualizowany ręcznie poprzez wywołanie usługi", + "icon_normal": "Ikona (mdi:trash-can) - opcjonalnie", + "icon_tomorrow": "Ikona wywozu jutro (mdi:delete-restore) - opcjonalnie", + "icon_today": "Ikona wywozu dzisiaj (mdi:delete-circle) - opcjonalnie", + "expire_after": "Wygasają po (HH:MM) - opcjonalnie", + "verbose_state": "Tryb gadatliwy (tekst, zamiast liczb)" + } + }, + "detail": { + "title": "Wywóz Śmieci - (2/2)", + "description": "Wybierz jeden lub więcej dni wywozu. Więcej szczegółów tutaj: https://github.com/bruxy70/Garbage-Collection", + "data": { + "date": "Data (mm/dd)", + "entities": "Lista encji (rozdzielane przecinkami)", + "collection_days": "Dni wywozu", + "first_month": "Miesiąc pierwszego wywozu", + "last_month": "Miesiąc ostatniego wywozu", + "period": "Wywóz co n dni/tygodni: (1-1000)", + "first_week": "Tydzień pierwszego wywozu: (1-52)", + "first_date": "Pierwsza data", + "weekday_order_number": "Kolejność dni tygodnia w miesiącu (np. pierwsza środa miesiąca)", + "force_week_order_numbers": "Kolejność tygodni w miesiącu zamiast kolejności dni tygodnia (np. w środę pierwszego tygodnia)", + "verbose_format": "Format trybu gadatliwego (używa zmiennych `date` oraz `days` (w nawiasach klamerkowych))", + "date_format": "Format daty (patrz http://strftime.org/)" + } + } + }, + "error": { + "value": "Niewłaściwa wartość. Sprawdź swoje dane wejściowe!", + "icon": "Ikony powinny być określone w formacie 'prefix:name'.", + "days": "Wybierz 1 lub więcej dni!", + "entities": "Encja nie istnieje!", + "month_day": "Nieprawidłowy format daty!", + "time": "Nieprawidłowy format czasu!", + "weekday_order_number": "Wybierz 1 lub więcej dni!", + "week_order_number": "Wybierz 1 lub więcej tygodni!", + "period": "Okres musi być liczbą od 1 do 1000.", + "first_week": "Pierwszy tydzień musi być liczbą między 1 a 52.", + "date": "Nieprawidłowy format daty!" + }, + "abort": { + "single_instance_allowed": "Tylko jedna konfiguracja dla wywozu śmieci jest dozwolona." + } + }, + "options": { + "step": { + "init": { + "title": "Wywóz Śmieci - Częstotliwośc wywozu (1/2)", + "description": "Zmień parametry sensora. Więcej informacji tutaj https://github.com/bruxy70/Garbage-Collection", + "data": { + "hidden": "Ukryj w kalendarzu", + "frequency": "Częstotliwość", + "manual_update": "Stan czujnika aktualizowany ręcznie poprzez wywołanie usługi", + "icon_normal": "Ikona (mdi:trash-can) - opcjonalnie", + "icon_tomorrow": "Ikona wywozu jutro (mdi:delete-restore) - opcjonalnie", + "icon_today": "Ikona wywozu dzisiaj (mdi:delete-circle) - opcjonalnie", + "expire_after": "Wygasają po (HH:MM) - opcjonalnie", + "verbose_state": "Tryb gadatliwy (tekst, zamiast liczb)" + } + }, + "detail": { + "title": "Wywóz Śmieci - Dodatkowe parametry (2/2)", + "description": "Dołączone i wyłączone daty są listą, rozdzielanych przecinkami, dat w formacie rrrr-mm-dd. Więcej informacji tutaj https://github.com/bruxy70/Garbage-Collection", + "data": { + "date": "Data (mm/dd)", + "entities": "Lista encji (rozdzielane przecinkami)", + "collection_days": "Dni wywozu", + "first_month": "Miesiąc pierwszego wywozu", + "last_month": "Miesiąc ostatniego wywozu", + "period": "Wywóz co n dni/tygodni: (1-1000)", + "first_week": "Tydzień pierwszego wywozu: (1-52)", + "first_date": "Pierwsza data", + "weekday_order_number": "Kolejność dni tygodnia w miesiącu (np. pierwsza środa miesiąca)", + "force_week_order_numbers": "Kolejność tygodni w miesiącu zamiast kolejności dni tygodnia (np. w środę pierwszego tygodnia)", + "verbose_format": "Format trybu gadatliwego (używa zmiennych `date` oraz `days` (w nawiasach klamrowych))", + "date_format": "Format daty (patrz http://strftime.org/)" + } + } + }, + "error": { + "value": "Niewłaściwa wartość. Sprawdź swoje dane wejściowe!", + "icon": "Ikony powinny być określone w formacie 'prefix:name'.", + "days": "Wybierz 1 lub więcej dni!", + "entities": "Encja nie istnieje!", + "month_day": "Nieprawidłowy format daty!", + "time": "Nieprawidłowy format czasu!", + "weekday_order_number": "Wybierz 1 lub więcej dni!", + "week_order_number": "Wybierz 1 lub więcej tygodni!", + "period": "Okres musi być liczbą od 1 do 1000.", + "first_week": "Pierwszy tydzień musi być liczbą między 1 a 52.", + "date": "Nieprawidłowy format daty!" + } + } + +} diff --git a/custom_components/garbage_collection/translations/pt-BR.json b/custom_components/garbage_collection/translations/pt-BR.json new file mode 100644 index 000000000..8475e88ee --- /dev/null +++ b/custom_components/garbage_collection/translations/pt-BR.json @@ -0,0 +1,105 @@ +{ + "config": { + "step": { + "user": { + "title": "Coleta de lixo - Frequência de coleta (1/2)", + "description": "Insira o nome do sensor e configure os parâmetros do sensor. Mais informações em https://github.com/bruxy70/Garbage-Collection", + "data": { + "name": "Nome fantasia", + "hidden": "Ocultar no calendário", + "frequency": "Frequência", + "manual_update": "Atualização manual - estado do sensor atualizado manualmente por um serviço (Blueprint)", + "icon_normal": "Ícone (mdi:trash-can) - opcional", + "icon_tomorrow": "ícones para coleta de amanhã (mdi:delete-restore) - opcional", + "icon_today": "Ícones para coleta de hoje (mdi:delete-circle) - opcional", + "expire_after": "Expirar depois (HH:MM) - opcional", + "verbose_state": "Estado detalhado (texto, em vez de número)" + } + }, + "detail": { + "title": "Coleta de lixo - Parâmetros adicionais (2/2)", + "description": "Mais detalhes aqui: https://github.com/bruxy70/Garbage-Collection", + "data": { + "date": "Data (mm/dd)", + "entities": "Lista de entidades (separadas por vírgulas)", + "collection_days": "Dias de coleta", + "first_month": "Primeiro mês de coletah", + "last_month": "Último mês de coleta", + "period": "Coleta a cada n semanas/dias: (1-1000)", + "first_week": "Primeira semana de coleta (1-52)", + "first_date": "Primeira data", + "weekday_order_number": "Ordem do dia da semana no mês (por exemplo, primeira quarta-feira do mês)", + "force_week_order_numbers": "Ordem da semana em um mês em vez da ordem do dia da semana (por exemplo, na quarta-feira da primeira semana)", + "verbose_format": "Formato detalhado (usando variáveis ​​`date` e `days` (entre colchetes))", + "date_format": "Formato de data (consulte http://strftime.org/)" + } + } + }, + "error": { + "value": "Valor inválido. Por favor, verifique sua entrada!", + "icon": "Os ícones devem ser especificados no formato 'prefix:name'.", + "days": "Selecione 1 ou mais dias!", + "entities": "A entidade não existe!", + "month_day": "Formato de data inválido!", + "time": "Formato de hora inválido!", + "weekday_order_number": "Selecione 1 ou mais dias", + "week_order_number": "Selecione 1 ou mais semanas", + "period": "O período deve ser um número entre 1 e 1000", + "first_week": "A primeira semana deve ser um número entre 1 e 52", + "date": "Formato de data inválido!" + }, + "abort": { + "single_instance_allowed": "Apenas uma única configuração de Coleta de Lixo é permitida." + } + }, + "options": { + "step": { + "init": { + "title": "Coleta de lixo - Frequência de coleta (1/2)", + "description": "Altere os parâmetros do sensor. Mais informações em https://github.com/bruxy70/Garbage-Collection", + "data": { + "hidden": "Ocultar no calendário", + "frequency": "Frequência", + "manual_update": "Atualização manual - estado do sensor atualizado manualmente por um serviço (Blueprint)", + "icon_normal": "Ícone (mdi:trash-can) - opcional", + "icon_tomorrow": "Ícones para coleta de amanhã (mdi:delete-restore) - opcional", + "icon_today": "Ícones para coleta de hoje (mdi:delete-circle) - opcional", + "expire_after": "Expirar depois (HH:MM) - opcional", + "verbose_state": "Estado detalhado (texto, em vez de número)" + } + }, + "detail": { + "title": "Coleta de lixo - Parâmetros adicionais (2/2)", + "description": "Mais detalhes aqui: https://github.com/bruxy70/Garbage-Collection", + "data": { + "date": "Data (mm/dd)", + "entities": "Lista de entidades (separadas por vírgulas)", + "collection_days": "Dias de coleta", + "first_month": "Primeiro mês de coleta", + "last_month": "Último mês de coleta", + "period": "Coleta a cada n semanas/dias: (1-1000)", + "first_week": "Primeira semana de coleta (1-52)", + "first_date": "Primeira data", + "weekday_order_number": "Ordem do dia da semana no mês (por exemplo, primeira quarta-feira do mês)", + "force_week_order_numbers": "Ordem da semana em um mês em vez da ordem do dia da semana (por exemplo, na quarta-feira da primeira semana)", + "verbose_format": "Formato detalhado (usando variáveis ​​`date` e `days` (entre colchetes))", + "date_format": "Formato de data (consulte http://strftime.org/)" + } + } + }, + "error": { + "value": "Valor inválido. Por favor, verifique sua entrada!", + "icon": "Os ícones devem ser especificados no formato 'prefix:name'.", + "days": "Selecione 1 ou mais dias!", + "entities": "A entidade não existe!", + "month_day": "Formato de data inválido!", + "time": "Formato de hora inválido!", + "weekday_order_number": "Selecione 1 ou mais dias", + "week_order_number": "Selecione 1 ou mais semanas", + "period": "O período deve ser um número entre 1 e 1000", + "first_week": "A primeira semana deve ser um número entre 1 e 52", + "date": "Formato de data inválido!" + } + } + +} \ No newline at end of file diff --git a/custom_components/garbage_collection/translations/sensor.cs.json b/custom_components/garbage_collection/translations/sensor.cs.json new file mode 100644 index 000000000..15363a82b --- /dev/null +++ b/custom_components/garbage_collection/translations/sensor.cs.json @@ -0,0 +1,8 @@ +{ + "state": { + "garbage_collection__schedule": { + "today": "Dnes", + "tomorrow": "Zítra" + } + } +} \ No newline at end of file diff --git a/custom_components/garbage_collection/translations/sensor.da.json b/custom_components/garbage_collection/translations/sensor.da.json new file mode 100644 index 000000000..2141243aa --- /dev/null +++ b/custom_components/garbage_collection/translations/sensor.da.json @@ -0,0 +1,8 @@ +{ + "state": { + "garbage_collection__schedule": { + "today": "I dag", + "tomorrow": "I morgen" + } + } +} \ No newline at end of file diff --git a/custom_components/garbage_collection/translations/sensor.de.json b/custom_components/garbage_collection/translations/sensor.de.json new file mode 100644 index 000000000..c69923a6a --- /dev/null +++ b/custom_components/garbage_collection/translations/sensor.de.json @@ -0,0 +1,8 @@ +{ + "state": { + "garbage_collection__schedule": { + "today": "Heute", + "tomorrow": "Morgen" + } + } +} \ No newline at end of file diff --git a/custom_components/garbage_collection/translations/sensor.en.json b/custom_components/garbage_collection/translations/sensor.en.json new file mode 100644 index 000000000..2d945d288 --- /dev/null +++ b/custom_components/garbage_collection/translations/sensor.en.json @@ -0,0 +1,8 @@ +{ + "state": { + "garbage_collection__schedule": { + "today": "Today", + "tomorrow": "Tomorrow" + } + } +} \ No newline at end of file diff --git a/custom_components/garbage_collection/translations/sensor.es.json b/custom_components/garbage_collection/translations/sensor.es.json new file mode 100644 index 000000000..a02a09ffd --- /dev/null +++ b/custom_components/garbage_collection/translations/sensor.es.json @@ -0,0 +1,8 @@ +{ + "state": { + "garbage_collection__schedule": { + "today": "Hoy", + "tomorrow": "Mañana" + } + } +} \ No newline at end of file diff --git a/custom_components/garbage_collection/translations/sensor.et.json b/custom_components/garbage_collection/translations/sensor.et.json new file mode 100644 index 000000000..dbec4c522 --- /dev/null +++ b/custom_components/garbage_collection/translations/sensor.et.json @@ -0,0 +1,8 @@ +{ + "state": { + "garbage_collection__schedule": { + "today": "Täna", + "tomorrow": "Homme" + } + } +} \ No newline at end of file diff --git a/custom_components/garbage_collection/translations/sensor.fr.json b/custom_components/garbage_collection/translations/sensor.fr.json new file mode 100644 index 000000000..d3854663e --- /dev/null +++ b/custom_components/garbage_collection/translations/sensor.fr.json @@ -0,0 +1,8 @@ +{ + "state": { + "garbage_collection__schedule": { + "today": "Aujourd'hui", + "tomorrow": "Demain" + } + } +} \ No newline at end of file diff --git a/custom_components/garbage_collection/translations/sensor.it.json b/custom_components/garbage_collection/translations/sensor.it.json new file mode 100644 index 000000000..4864e4f8f --- /dev/null +++ b/custom_components/garbage_collection/translations/sensor.it.json @@ -0,0 +1,8 @@ +{ + "state": { + "garbage_collection__schedule": { + "today": "Oggi", + "tomorrow": "Domani" + } + } +} \ No newline at end of file diff --git a/custom_components/garbage_collection/translations/sensor.nl.json b/custom_components/garbage_collection/translations/sensor.nl.json new file mode 100644 index 000000000..79cec1eb4 --- /dev/null +++ b/custom_components/garbage_collection/translations/sensor.nl.json @@ -0,0 +1,8 @@ +{ + "state": { + "garbage_collection__schedule": { + "today": "Vandaag", + "tomorrow": "Morgen" + } + } +} \ No newline at end of file diff --git a/custom_components/garbage_collection/translations/sensor.no.json b/custom_components/garbage_collection/translations/sensor.no.json new file mode 100644 index 000000000..9474f7d96 --- /dev/null +++ b/custom_components/garbage_collection/translations/sensor.no.json @@ -0,0 +1,8 @@ +{ + "state": { + "garbage_collection__schedule": { + "today": "I morgen", + "tomorrow": "I dag" + } + } +} \ No newline at end of file diff --git a/custom_components/garbage_collection/translations/sensor.pl.json b/custom_components/garbage_collection/translations/sensor.pl.json new file mode 100644 index 000000000..dbc700791 --- /dev/null +++ b/custom_components/garbage_collection/translations/sensor.pl.json @@ -0,0 +1,8 @@ +{ + "state": { + "garbage_collection__schedule": { + "today": "Dzisiaj", + "tomorrow": "Jutro" + } + } +} \ No newline at end of file diff --git a/custom_components/garbage_collection/translations/sensor.pt-BR.json b/custom_components/garbage_collection/translations/sensor.pt-BR.json new file mode 100644 index 000000000..e83d15867 --- /dev/null +++ b/custom_components/garbage_collection/translations/sensor.pt-BR.json @@ -0,0 +1,8 @@ +{ + "state": { + "garbage_collection__schedule": { + "today": "Hoje", + "tomorrow": "Amanhã" + } + } +} \ No newline at end of file diff --git a/custom_components/garbage_collection/translations/sensor.se.json b/custom_components/garbage_collection/translations/sensor.se.json new file mode 100644 index 000000000..00978042e --- /dev/null +++ b/custom_components/garbage_collection/translations/sensor.se.json @@ -0,0 +1,8 @@ +{ + "state": { + "garbage_collection__schedule": { + "today": "Idag", + "tomorrow": "Imorgon" + } + } +} \ No newline at end of file diff --git a/custom_components/garbage_collection/translations/sensor.sk.json b/custom_components/garbage_collection/translations/sensor.sk.json new file mode 100644 index 000000000..b228ece05 --- /dev/null +++ b/custom_components/garbage_collection/translations/sensor.sk.json @@ -0,0 +1,8 @@ +{ + "state": { + "garbage_collection__schedule": { + "today": "Dnes", + "tomorrow": "Zajtra" + } + } +} \ No newline at end of file diff --git a/custom_components/garbage_collection/translations/sensor.sl.json b/custom_components/garbage_collection/translations/sensor.sl.json new file mode 100644 index 000000000..70b5643a3 --- /dev/null +++ b/custom_components/garbage_collection/translations/sensor.sl.json @@ -0,0 +1,8 @@ +{ + "state": { + "garbage_collection__schedule": { + "today": "Danes", + "tomorrow": "Jutri" + } + } +} \ No newline at end of file diff --git a/custom_components/garbage_collection/translations/sk.json b/custom_components/garbage_collection/translations/sk.json new file mode 100644 index 000000000..c4a03029e --- /dev/null +++ b/custom_components/garbage_collection/translations/sk.json @@ -0,0 +1,179 @@ +{ + "config": { + "step": { + "user": { + "title": "Garbage Collection - Nastavenia", + "description": "Zadej meno senzoru a nastav parametre. Viac na https://github.com/bruxy70/Garbage-Collection", + "data": { + "name": "Friendly name", + "hidden": "Skryť v kalendári", + "frequency": "Frekvencia", + "icon_normal": "Ikona (mdi:trash-can)", + "icon_tomorrow": "Ikona zvoz zajtra (mdi:delete-restore)", + "icon_today": "Ikona zvoz dnes (mdi:delete-circle)", + "offset": "Odsadiť (medzi -31 a 31 dňami)", + "expire_after": "Čas expirácie (HH:MM)", + "verbose_state": "Verbose state (popis miesto čísiel)", + "verbose_format": "Verbose format (Použi `date` a `days` premenné (v zložených zátvorkách))", + "include_dates": "Pridané dátumy (yyyy-mm-dd, yyyy-mm-dd, ...) - voliteľné", + "exclude_dates": "Zakázané dátumy (yyyy-mm-dd, yyyy-mm-dd, ...) - voliteľné", + "date_format": "Formát data(see http://strftime.org/)" + } + }, + "annual_group": { + "title": "Garbage Collection - Ďalšie parametre", + "description": "Zadej dátum zvozu (napr. 11/20 pre 20. november)", + "data": { + "date": "Dátum (mm/dd)", + "entities": "Zoznam entít (oddelené čiarkou)" + } + }, + "detail": { + "title": "Garbage Collection - Dny svozu", + "description": "Vyber jeden alebo viacej dní zvozu. Viac na: https://github.com/bruxy70/Garbage-Collection", + "data": { + "collection_days_mon": "Pondelok", + "collection_days_tue": "Útorok", + "collection_days_wed": "Streda", + "collection_days_thu": "Štvrtok", + "collection_days_fri": "Piatok", + "collection_days_sat": "Sobota", + "collection_days_sun": "Nedeľa", + "force_week_order_numbers": "Číslo týždňa v mesiaci namiesto čísla dňa" + } + }, + "final": { + "title": "Garbage Collection - Ďalšie parametre", + "description": "Pridané a zakázané dátumy sú zoznamy dátumov vo formáte yyyy-mm-dd, oddelených čiarkou. Viac info na https://github.com/bruxy70/Garbage-Collection", + "data": { + "first_month": "Prvý mesiac zvozu", + "last_month": "Posledný mesiac zvozu", + "period": "Perióda (zvoz každých n týždňov/dní): (1-1000)", + "first_week": "Prvý týždeň zvozu (1-52)", + "first_date": "Prvý dátum", + "weekday_order_number_1": "Prvý deň v mesiaci", + "weekday_order_number_2": "Druhý deň v mesiaci", + "weekday_order_number_3": "Tretí deň v mesiaci", + "weekday_order_number_4": "Štvrtý deň v mesiaci", + "weekday_order_number_5": "Piaty deň v mesiaci", + "week_order_number_1": "Prvý týžden v mesiaci", + "week_order_number_2": "Druhý týžden v mesiaci", + "week_order_number_3": "Tretí týžden v mesiaci", + "week_order_number_4": "Štvrtý týžden v mesiaci", + "week_order_number_5": "Piaty týžden v mesiaci", + "move_country_holidays": "Štátne sviatky - krajiny (voliteľné)", + "holiday_move_offset": "Posunúť sviatok o (dní: -7..7)", + "holiday_pop_named": "Ignorovať sviatky (volitelné)", + "holiday_in_week_move": "Posunúť na ďalší deň ak je dovolenka v týždni (voliteľné)", + "prov": "Štátne sviatky - provincie (volitelné)", + "state": "Štátne sviatky - štát (volitelné)", + "observed": "Štátne sviatky - sledované (volitelné)" + + } + } + }, + "error": { + "value": "Chybná hodnota. Skontroluj zadané hodnoty!", + "icon": "Ikony musia býť zadané vo formáte 'prefix:meno'.", + "days": "Vyber jeden nebo viacej dní!", + "entities": "Entita neexistuje!", + "month_day": "Zlý formát dátumu!", + "time": "Zlý formát času!", + "weekday_order_number": "Vyber jeden nebo viacej dní!", + "week_order_number": "Vyber jeden nebo viacej týždňov!", + "period": "Perióda musí být číslo medzi 1 a 1000", + "first_week": "Prvý týždeň musí být číslo medzi 1 a 52", + "date": "Zlý formát dátumu!" + }, + "abort": { + "single_instance_allowed": "Je povolená iba jedna konfigurácia Garbage Collection." + } + }, + "options": { + "step": { + "init": { + "title": "Garbage Collection - Nastavenia", + "description": "Zadaj meno senzora a nastav parametre. Viac na https://github.com/bruxy70/Garbage-Collection", + "data": { + "hidden": "Skryť v kalendári", + "frequency": "Frekvencia", + "icon_normal": "Ikona (mdi:trash-can)", + "icon_tomorrow": "Ikona zvoz zajtra (mdi:delete-restore)", + "icon_today": "Ikona zvoz dnes (mdi:delete-circle)", + "offset": "Odsadit (medzi -31 a 31 dny)", + "expire_after": "Čas expirácie (HH:MM)", + "verbose_state": "Verbose state (popis miesto čísiel)", + "verbose_format": "Verbose format (Použi `date` a `days` premenné (v zložených zátvorkách))", + "include_dates": "Pridané dátumy (yyyy-mm-dd, yyyy-mm-dd, ...) - voliteľné", + "exclude_dates": "Zakázané dátumy (yyyy-mm-dd, yyyy-mm-dd, ...) - voliteľné", + "date_format": "Formát dátumu(see http://strftime.org/)" + } + }, + "annual_group": { + "title": "Garbage Collection - Ďalšie parametre", + "description": "Zadej dátum zvozu (napr. 11/20 pre 20. november)", + "data": { + "date": "Dátum (mm/dd)", + "entities": "Zoznam entít (oddelené čiarkou)" + } + }, + "detail": { + "title": "Garbage Collection - Dni zvozu", + "description": "Vyber jeden alebo viac dní zvozu. Více na: https://github.com/bruxy70/Garbage-Collection", + "data": { + "collection_days_mon": "Pondelok", + "collection_days_tue": "Útorok", + "collection_days_wed": "Streda", + "collection_days_thu": "Štvrtok", + "collection_days_fri": "Piatok", + "collection_days_sat": "Sobota", + "collection_days_sun": "Nedeľa", + "force_week_order_numbers": "Číslo týždna v mesiaci namiesto čísla dňa" + + } + }, + "final": { + "title": "Garbage Collection - Ďalšie parametre", + "description": "Pridané a zakázané dátumy sú zoznamy dátumov vo formáte yyyy-mm-dd, oddelených čiarkou. Viac info na https://github.com/bruxy70/Garbage-Collection", + "data": { + "first_month": "Prvý mesiac zvozu", + "last_month": "Posledný mesiac zvozu", + "period": "Perióda (zvoz každých n týždňov/dní): (1-1000)", + "first_week": "Prvý týždeň zvozu (1-52)", + "first_date": "Prvý dátum", + "weekday_order_number_1": "Prvý deň v mesiaci", + "weekday_order_number_2": "Druhý deň v mesiaci", + "weekday_order_number_3": "Tretí deň v mesiaci", + "weekday_order_number_4": "Štvrtý deň v mesiaci", + "weekday_order_number_5": "Piaty deň v mesiaci", + "week_order_number_1": "Prvý týžden v mesiaci", + "week_order_number_2": "Druhý týžden v mesiaci", + "week_order_number_3": "Tretí týžden v mesiaci", + "week_order_number_4": "Štvrtý týžden v mesiaci", + "week_order_number_5": "Piaty týžden v mesiaci", + "move_country_holidays": "Štátne sviatky - krajiny (voliteľné)", + "holiday_move_offset": "Posunúť sviatok o (dní: -7..7)", + "holiday_pop_named": "Ignorovať sviatky (volitelné)", + "holiday_in_week_move": "Posunúť na ďalší deň ak je dovolenka v týždni (voliteľné)", + "prov": "Štátne sviatky - provincie (volitelné)", + "state": "Štátne sviatky - štát (volitelné)", + "observed": "Štátne sviatky - sledované (volitelné)" + } + } + }, + "error": { + "value": "Chybná hodnota. Skontroluj zadané hodnoty!", + "icon": "Ikony musia býť zadané vo formáte 'prefix:meno'.", + "days": "Vyber jeden nebo viacej dní!", + "entities": "Entita neexistuje!", + "month_day": "Zlý formát dátumu!", + "time": "Zlý formát času!", + "weekday_order_number": "Vyber jeden nebo viacej dní!", + "week_order_number": "Vyber jeden nebo viacej týždňov!", + "period": "Perióda musí být číslo medzi 1 a 1000", + "first_week": "Prvý týždeň musí být číslo medzi 1 a 52", + "date": "Zlý formát dátumu!" + } + } + +} \ No newline at end of file diff --git a/custom_components/garbage_collection/translations/sl.json b/custom_components/garbage_collection/translations/sl.json new file mode 100644 index 000000000..592e71d1b --- /dev/null +++ b/custom_components/garbage_collection/translations/sl.json @@ -0,0 +1,179 @@ +{ + "config": { + "step": { + "user": { + "title": "Odvoz odpadkov - Pogostost odvoza", + "description": "Vpišite ime senzorja in nastavite parametre. Več informacij na https://github.com/bruxy70/Garbage-Collection", + "data": { + "name": "Prijazno ime", + "hidden": "Skrij v koledarju", + "frequency": "Pogostost", + "manual_update": "Stanje senzorja se posodablja ročno s klicem storitve", + "icon_normal": "Ikona (mdi:trash-can) - opcijsko", + "icon_tomorrow": "Ikona pobiranja jutri (mdi:delete-restore) - opcijsko", + "icon_today": "Ikona pobiranja danes (mdi:delete-circle) - opcijsko", + "offset": "Zamik (med -31 in 31 dni)", + "expire_after": "Poteče po (HH:MM) - opcijsko", + "verbose_state": "Verbose stanje (tekst namesto številk)", + "verbose_format": "Verbose format (uporaba spremenljivk `datum` in `dni` (v oglatih oklepajih))", + "include_dates": "Vključi datume (yyyy-mm-dd, yyyy-mm-dd, ...) - opcijsko", + "exclude_dates": "Izključi datume (yyyy-mm-dd, yyyy-mm-dd, ...) - opcijsko", + "date_format": "Format datuma (glej http://strftime.org/)" + } + }, + "annual_group": { + "title": "Odvoz odpadkov - Dodatni parametri", + "description": "Vpišite datum odvoza (npr. 11/20 za 20.November)", + "data": { + "date": "Datum (mm/dd)", + "entities": "Seznam vpisov (ločeno z vejico)" + } + }, + "detail": { + "title": "Odvoz odpadkov - Collection days", + "description": "Izberite enega ali več dni odvoza. Več podrobnosti tukaj: https://github.com/bruxy70/Garbage-Collection", + "data": { + "collection_days_mon": "Ponedeljek", + "collection_days_tue": "Torek", + "collection_days_wed": "Sreda", + "collection_days_thu": "Četrtek", + "collection_days_fri": "Petek", + "collection_days_sat": "Sobota", + "collection_days_sun": "Nedelja", + "force_week_order_numbers": "Naročilo odvoza v tednu meseca namesto v dnevu tedna" + } + }, + "final": { + "title": "Odvoz odpadkov - Dodatni parametri", + "description": "Vključeni in izključeni datumi so seznami datumov, ločeni z vejico v formatu yyyy-mm-dd. Podrobnosti na https://github.com/bruxy70/Garbage-Collection", + "data": { + "first_month": "Prvi mesec odvoza", + "last_month": "Zadnji mesec odvoza", + "period": "Odvoz vsakih v tednov/dni: (1-1000)", + "first_week": "Prvi teden odvoza (1-52)", + "first_date": "Prvi datum", + "weekday_order_number_1": "1. dan tedna v mesecu", + "weekday_order_number_2": "2. dan tedna v mesecu", + "weekday_order_number_3": "3. dan tedna v mesecu", + "weekday_order_number_4": "4. dan tedna v mesecu", + "weekday_order_number_5": "5. dan tedna v mesecu", + "week_order_number_1": "1. teden v mesecu", + "week_order_number_2": "2. teden v mesecu", + "week_order_number_3": "3. teden v mesecu", + "week_order_number_4": "4. teden v mesecu", + "week_order_number_5": "5. teden v mesecu", + "move_country_holidays": "Premakni na naslednji dan, če je praznik (opcijsko)", + "holiday_move_offset": "Premakni praznike za # dni(-7..7)", + "holiday_pop_named": "Ignoriraj praznike (seznam) - opcijsko", + "holiday_in_week_move": "Premakni na naslednji dan, če je praznik v tednu (opcijsko)", + "prov": "Državni prazniki - provincialni (opcijsko)", + "state": "Državni prazniki - državni (opcijsko)", + "observed": "Državni prazniki - premični (opcijsko)" + } + } + }, + "error": { + "value": "Neveljavna vrednost. Prosim, preverite vaš vnos!", + "icon": "Ikone morajo biti vpisane v formatu 'predpona:ime'.", + "days": "Iizberite enega ali več dni!", + "entities": "Entiteta ne obstaja!", + "month_day": "Neveljaven format datuma!", + "time": "Neveljaven format časa!", + "weekday_order_number": "Izberite enega ali več dni", + "week_order_number": "Izberite enega ali več tednov", + "period": "Interval mora biti številka med 1 in 1000", + "first_week": "Prvi teden mora biti številka med 1 in 52", + "date": "Neveljaven format datuma!" + }, + "abort": { + "single_instance_allowed": "Dovoljena je samo ena konfiguracija odvoza odpadkov." + } + }, + "options": { + "step": { + "init": { + "title": "Odvoz odpadkov - Pogostost odvoza", + "description": "Spremenite parametre. Več informacij: https://github.com/bruxy70/Garbage-Collection", + "data": { + "hidden": "Skrij v koledarju", + "frequency": "Pogostost", + "manual_update": "Stanje senzorja se posodablja ročno s klicanjem storitve", + "icon_normal": "Ikona (mdi:trash-can) - opcijsko", + "icon_tomorrow": "Ikona codvoz jutri (mdi:delete-restore) - opcijsko", + "icon_today": "Ikona odvoz danes (mdi:delete-circle) - opcijsko", + "offset": "Zamik (med -31 in 31 dni)", + "expire_after": "Expire after (HH:MM) - opcijsko", + "verbose_state": "Verbose stanje (tekst namesto številk)", + "verbose_format": "Verbose format (uporaba spremenljivk `datum` in `dni` (v oglatih oklepajih))", + "include_dates": "Vključi datume (yyyy-mm-dd, yyyy-mm-dd, ...) - opcijsko", + "exclude_dates": "Izključi datume (yyyy-mm-dd, yyyy-mm-dd, ...) - opcijsko", + "date_format": "Format datume (glej http://strftime.org/)" + } + }, + "annual_group": { + "title": "Odvoz odpadkov - Dodatni parametri", + "description": "Vpišite datum dneva odvoza (npr. 11/20 za 20.November)", + "data": { + "date": "Datum (mm/dd)", + "entities": "Seznam entitet (ločenih z vejivo)" + } + }, + "detail": { + "title": "Odvoz odpadkov - Collection days", + "description": "Izberite enega ali več dni odvoza. Več informacij tukaj: https://github.com/bruxy70/Garbage-Collection", + "data": { + "collection_days_mon": "Ponedeljek", + "collection_days_tue": "Torek", + "collection_days_wed": "Sreda", + "collection_days_thu": "Četrtek", + "collection_days_fri": "Petek", + "collection_days_sat": "Sobota", + "collection_days_sun": "Nedelja", + "force_week_order_numbers": "Naročilo odvoza v tednu meseca namesto v dnevu tedna" + } + }, + "final": { + "title": "Odvoz odpadkov - Dodatni parametri", + "description": "Vključeni in izključeni datumi so seznami datumov, ločeni z vejico v formatu yyyy-mm-dd. Podrobnosti na https://github.com/bruxy70/Garbage-Collection", + "data": { + "first_month": "Prvi mesec odvoza", + "last_month": "Zdnji mesec odvoza", + "period": "Odvoz vsakih n tednov/dni: (1-1000)", + "first_week": "Prvi teden odvoza (1-52)", + "first_date": "Prvi datum", + "weekday_order_number_1": "1. dan tedna v mesecu", + "weekday_order_number_2": "2. dan tedna v mesecu", + "weekday_order_number_3": "3. dan tedna v mesecu", + "weekday_order_number_4": "4. dan tedna v mesecu", + "weekday_order_number_5": "5. dan tedna v mesecu", + "week_order_number_1": "1. teden v mesecu", + "week_order_number_2": "2. teden v mesecu", + "week_order_number_3": "3. teden v mesecu", + "week_order_number_4": "4. teden v mesecu", + "week_order_number_5": "5. teden v mesecu", + "move_country_holidays": "Premakni praznik na naslednji dan (opcijsko)", + "holiday_move_offset": "Premakni praznike za # dni(-7..7)", + "holiday_pop_named": "Ignoriraj praznike (seznam) - opcijsko", + "holiday_in_week_move": "Premakni na naslednji dan, če je praznik v tednu (opcijsko)", + "prov": "Državni prazniki - provincialni (opcijsko)", + "state": "Državni prazniki- državni (opcijsko)", + "observed": "Državni prazniki - premični (opcijsko)" + } + } + }, + "error": { + "value": "Neveljavna vrednost. Prosim, preverite vaš vnos!", + "icon": "Ikona mora biti vpisana v formatu 'predpona:ime'.", + "days": "Izberite enega ali več dni!", + "entities": "Entiteta ne obstaja!", + "month_day": "Neveljaven format datuma!", + "time": "Neveljaven format časa!", + "weekday_order_number": "Izberite enega ali več dni", + "week_order_number": "Izberite enega ali več tednov", + "period": "Interval mora biti številka med 1 in 1000", + "first_week": "Prvi teden mora biti številka med 1 in 52", + "date": "Neveljaven format datuma!" + } + } + +} \ No newline at end of file diff --git a/custom_components/localtuya/__init__.py b/custom_components/localtuya/__init__.py index f1af7f0b0..9a996c31f 100644 --- a/custom_components/localtuya/__init__.py +++ b/custom_components/localtuya/__init__.py @@ -259,24 +259,28 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry): res = await tuya_api.async_get_devices_list() hass.data[DOMAIN][DATA_CLOUD] = tuya_api - async def setup_entities(dev_id): - dev_entry = entry.data[CONF_DEVICES][dev_id] - device = TuyaDevice(hass, entry, dev_id) - hass.data[DOMAIN][TUYA_DEVICES][dev_id] = device + async def setup_entities(device_ids): + platforms = set() + for dev_id in device_ids: + entities = entry.data[CONF_DEVICES][dev_id][CONF_ENTITIES] + platforms = platforms.union( + set(entity[CONF_PLATFORM] for entity in entities) + ) + hass.data[DOMAIN][TUYA_DEVICES][dev_id] = TuyaDevice(hass, entry, dev_id) - platforms = set(entity[CONF_PLATFORM] for entity in dev_entry[CONF_ENTITIES]) await asyncio.gather( *[ hass.config_entries.async_forward_entry_setup(entry, platform) for platform in platforms ] ) - device.async_connect() + + for dev_id in device_ids: + hass.data[DOMAIN][TUYA_DEVICES][dev_id].async_connect() await async_remove_orphan_entities(hass, entry) - for dev_id in entry.data[CONF_DEVICES]: - hass.async_create_task(setup_entities(dev_id)) + hass.async_create_task(setup_entities(entry.data[CONF_DEVICES].keys())) unsub_listener = entry.add_update_listener(update_listener) hass.data[DOMAIN][entry.entry_id] = {UNSUB_LISTENER: unsub_listener} diff --git a/custom_components/localtuya/binary_sensor.py b/custom_components/localtuya/binary_sensor.py index 1a3d28abe..273880ca6 100644 --- a/custom_components/localtuya/binary_sensor.py +++ b/custom_components/localtuya/binary_sensor.py @@ -53,6 +53,8 @@ def device_class(self): def status_updated(self): """Device status was updated.""" + super().status_updated() + state = str(self.dps(self._dp_id)).lower() if state == self._config[CONF_STATE_ON].lower(): self._is_on = True @@ -63,6 +65,11 @@ def status_updated(self): "State for entity %s did not match state patterns", self.entity_id ) + # No need to restore state for a sensor + async def restore_state_when_connected(self): + """Do nothing for a sensor.""" + return + async_setup_entry = partial( async_setup_entry, DOMAIN, LocaltuyaBinarySensor, flow_schema diff --git a/custom_components/localtuya/climate.py b/custom_components/localtuya/climate.py index 1400ec7ec..f6433b256 100644 --- a/custom_components/localtuya/climate.py +++ b/custom_components/localtuya/climate.py @@ -72,6 +72,10 @@ "True/False": { HVAC_MODE_HEAT: True, }, + "1/0": { + HVAC_MODE_HEAT: "1", + HVAC_MODE_AUTO: "0", + }, } HVAC_ACTION_SETS = { "True/False": { diff --git a/custom_components/localtuya/common.py b/custom_components/localtuya/common.py index 79eadc9b1..aa8992fd5 100644 --- a/custom_components/localtuya/common.py +++ b/custom_components/localtuya/common.py @@ -13,6 +13,7 @@ CONF_ID, CONF_PLATFORM, CONF_SCAN_INTERVAL, + STATE_UNKNOWN, ) from homeassistant.core import callback from homeassistant.helpers.dispatcher import ( @@ -31,6 +32,11 @@ DATA_CLOUD, DOMAIN, TUYA_DEVICES, + CONF_DEFAULT_VALUE, + ATTR_STATE, + CONF_RESTORE_ON_RECONNECT, + CONF_RESET_DPIDS, + CONF_PASSIVE_ENTITY, ) _LOGGER = logging.getLogger(__name__) @@ -91,6 +97,8 @@ async def async_setup_entry( entity_config[CONF_ID], ) ) + # Once the entities have been created, add to the TuyaDevice instance + tuyainterface.add_entities(entities) async_add_entities(entities) @@ -135,13 +143,31 @@ def __init__(self, hass, config_entry, dev_id): self._connect_task = None self._disconnect_task = None self._unsub_interval = None + self._entities = [] self._local_key = self._dev_config_entry[CONF_LOCAL_KEY] + self._default_reset_dpids = None + if CONF_RESET_DPIDS in self._dev_config_entry: + reset_ids_str = self._dev_config_entry[CONF_RESET_DPIDS].split(",") + + self._default_reset_dpids = [] + for reset_id in reset_ids_str: + self._default_reset_dpids.append(int(reset_id.strip())) + self.set_logger(_LOGGER, self._dev_config_entry[CONF_DEVICE_ID]) # This has to be done in case the device type is type_0d for entity in self._dev_config_entry[CONF_ENTITIES]: self.dps_to_request[entity[CONF_ID]] = None + def add_entities(self, entities): + """Set the entities associated with this device.""" + self._entities.extend(entities) + + @property + def is_connecting(self): + """Return whether device is currently connecting.""" + return self._connect_task is not None + @property def connected(self): """Return if connected to device.""" @@ -165,13 +191,67 @@ async def _make_connection(self): self, ) self._interface.add_dps_to_request(self.dps_to_request) + except Exception: # pylint: disable=broad-except + self.exception(f"Connect to {self._dev_config_entry[CONF_HOST]} failed") + if self._interface is not None: + await self._interface.close() + self._interface = None - self.debug("Retrieving initial state") - status = await self._interface.status() - if status is None: - raise Exception("Failed to retrieve status") + if self._interface is not None: + try: + self.debug("Retrieving initial state") + status = await self._interface.status() + if status is None: + raise Exception("Failed to retrieve status") + + self._interface.start_heartbeat() + self.status_updated(status) + + except Exception as ex: # pylint: disable=broad-except + try: + if (self._default_reset_dpids is not None) and ( + len(self._default_reset_dpids) > 0 + ): + self.debug( + "Initial state update failed, trying reset command " + + "for DP IDs: %s", + self._default_reset_dpids, + ) + await self._interface.reset(self._default_reset_dpids) + + self.debug("Update completed, retrying initial state") + status = await self._interface.status() + if status is None or not status: + raise Exception("Failed to retrieve status") from ex + + self._interface.start_heartbeat() + self.status_updated(status) + + except UnicodeDecodeError as e: # pylint: disable=broad-except + self.exception( + f"Connect to {self._dev_config_entry[CONF_HOST]} failed: %s", + type(e), + ) + if self._interface is not None: + await self._interface.close() + self._interface = None + + except Exception as e: # pylint: disable=broad-except + self.exception( + f"Connect to {self._dev_config_entry[CONF_HOST]} failed" + ) + if "json.decode" in str(type(e)): + await self.update_local_key() - self.status_updated(status) + if self._interface is not None: + await self._interface.close() + self._interface = None + + if self._interface is not None: + # Attempt to restore status for all entities that need to first set + # the DPS value before the device will respond with status. + for entity in self._entities: + await entity.restore_state_when_connected() def _new_entity_handler(entity_id): self.debug( @@ -195,22 +275,7 @@ def _new_entity_handler(entity_id): self._async_refresh, timedelta(seconds=self._dev_config_entry[CONF_SCAN_INTERVAL]), ) - except UnicodeDecodeError as e: # pylint: disable=broad-except - self.exception( - f"Connect to {self._dev_config_entry[CONF_HOST]} failed: %s", type(e) - ) - if self._interface is not None: - await self._interface.close() - self._interface = None - - except Exception as e: # pylint: disable=broad-except - self.exception(f"Connect to {self._dev_config_entry[CONF_HOST]} failed") - if "json.decode" in str(type(e)): - await self.update_local_key() - if self._interface is not None: - await self._interface.close() - self._interface = None self._connect_task = None async def update_local_key(self): @@ -254,7 +319,7 @@ async def set_dp(self, state, dp_index): try: await self._interface.set_dp(state, dp_index) except Exception: # pylint: disable=broad-except - self.exception("Failed to set DP %d to %d", dp_index, state) + self.exception("Failed to set DP %d to %s", dp_index, str(state)) else: self.error( "Not connected to device %s", self._dev_config_entry[CONF_FRIENDLY_NAME] @@ -305,6 +370,20 @@ def __init__(self, device, config_entry, dp_id, logger, **kwargs): self._config = get_entity_config(config_entry, dp_id) self._dp_id = dp_id self._status = {} + self._state = None + self._last_state = None + + # Default value is available to be provided by Platform entities if required + self._default_value = self._config.get(CONF_DEFAULT_VALUE) + + # Determine whether is a passive entity + self._is_passive_entity = self._config.get(CONF_PASSIVE_ENTITY) or False + + """ Restore on connect setting is available to be provided by Platform entities + if required""" + self._restore_on_reconnect = ( + self._config.get(CONF_RESTORE_ON_RECONNECT) or False + ) self.set_logger(logger, self._dev_config_entry[CONF_DEVICE_ID]) async def async_added_to_hass(self): @@ -325,6 +404,8 @@ def _update_handler(status): self._status = status.copy() if status: self.status_updated() + + # Update HA self.schedule_update_ha_state() signal = f"localtuya_{self._dev_config_entry[CONF_DEVICE_ID]}" @@ -336,6 +417,22 @@ def _update_handler(status): signal = f"localtuya_entity_{self._dev_config_entry[CONF_DEVICE_ID]}" async_dispatcher_send(self.hass, signal, self.entity_id) + @property + def extra_state_attributes(self): + """Return entity specific state attributes to be saved. + + These attributes are then available for restore when the + entity is restored at startup. + """ + attributes = {} + if self._state is not None: + attributes[ATTR_STATE] = self._state + elif self._last_state is not None: + attributes[ATTR_STATE] = self._last_state + + self.debug("Entity %s - Additional attributes: %s", self.name, attributes) + return attributes + @property def device_info(self): """Return device information for the device registry.""" @@ -408,9 +505,96 @@ def status_updated(self): Override in subclasses and update entity specific state. """ + state = self.dps(self._dp_id) + self._state = state + + # Keep record in last_state as long as not during connection/re-connection, + # as last state will be used to restore the previous state + if (state is not None) and (not self._device.is_connecting): + self._last_state = state def status_restored(self, stored_state): """Device status was restored. Override in subclasses and update entity specific state. """ + raw_state = stored_state.attributes.get(ATTR_STATE) + if raw_state is not None: + self._last_state = raw_state + self.debug( + "Restoring state for entity: %s - state: %s", + self.name, + str(self._last_state), + ) + + def default_value(self): + """Return default value of this entity. + + Override in subclasses to specify the default value for the entity. + """ + # Check if default value has been set - if not, default to the entity defaults. + if self._default_value is None: + self._default_value = self.entity_default_value() + + return self._default_value + + def entity_default_value(self): # pylint: disable=no-self-use + """Return default value of the entity type. + + Override in subclasses to specify the default value for the entity. + """ + return 0 + + @property + def restore_on_reconnect(self): + """Return whether the last state should be restored on a reconnect. + + Useful where the device loses settings if powered off + """ + return self._restore_on_reconnect + + async def restore_state_when_connected(self): + """Restore if restore_on_reconnect is set, or if no status has been yet found. + + Which indicates a DPS that needs to be set before it starts returning + status. + """ + if (not self.restore_on_reconnect) and ( + (str(self._dp_id) in self._status) or (not self._is_passive_entity) + ): + self.debug( + "Entity %s (DP %d) - Not restoring as restore on reconnect is " + + "disabled for this entity and the entity has an initial status " + + "or it is not a passive entity", + self.name, + self._dp_id, + ) + return + + self.debug("Attempting to restore state for entity: %s", self.name) + # Attempt to restore the current state - in case reset. + restore_state = self._state + + # If no state stored in the entity currently, go from last saved state + if (restore_state == STATE_UNKNOWN) | (restore_state is None): + self.debug("No current state for entity") + restore_state = self._last_state + + # If no current or saved state, then use the default value + if restore_state is None: + if self._is_passive_entity: + self.debug("No last restored state - using default") + restore_state = self.default_value() + else: + self.debug("Not a passive entity and no state found - aborting restore") + return + + self.debug( + "Entity %s (DP %d) - Restoring state: %s", + self.name, + self._dp_id, + str(restore_state), + ) + + # Manually initialise + await self._device.set_dp(restore_state, self._dp_id) diff --git a/custom_components/localtuya/config_flow.py b/custom_components/localtuya/config_flow.py index 695baa91c..1eeb3b5da 100644 --- a/custom_components/localtuya/config_flow.py +++ b/custom_components/localtuya/config_flow.py @@ -38,12 +38,14 @@ CONF_NO_CLOUD, CONF_PRODUCT_NAME, CONF_PROTOCOL_VERSION, + CONF_RESET_DPIDS, CONF_SETUP_CLOUD, CONF_USER_ID, DATA_CLOUD, DATA_DISCOVERY, DOMAIN, PLATFORMS, + CONF_MANUAL_DPS, ) from .discovery import discover @@ -88,6 +90,8 @@ vol.Required(CONF_DEVICE_ID): str, vol.Required(CONF_PROTOCOL_VERSION, default="3.3"): vol.In(["3.1", "3.3"]), vol.Optional(CONF_SCAN_INTERVAL): int, + vol.Optional(CONF_MANUAL_DPS): str, + vol.Optional(CONF_RESET_DPIDS): str, } ) @@ -99,6 +103,8 @@ vol.Required(CONF_FRIENDLY_NAME): cv.string, vol.Required(CONF_PROTOCOL_VERSION, default="3.3"): vol.In(["3.1", "3.3"]), vol.Optional(CONF_SCAN_INTERVAL): int, + vol.Optional(CONF_MANUAL_DPS): cv.string, + vol.Optional(CONF_RESET_DPIDS): str, } ) @@ -140,6 +146,8 @@ def options_schema(entities): vol.Required(CONF_LOCAL_KEY): str, vol.Required(CONF_PROTOCOL_VERSION, default="3.3"): vol.In(["3.1", "3.3"]), vol.Optional(CONF_SCAN_INTERVAL): int, + vol.Optional(CONF_MANUAL_DPS): str, + vol.Optional(CONF_RESET_DPIDS): str, vol.Required( CONF_ENTITIES, description={"suggested_value": entity_names} ): cv.multi_select(entity_names), @@ -231,6 +239,8 @@ async def validate_input(hass: core.HomeAssistant, data): detected_dps = {} interface = None + + reset_ids = None try: interface = await pytuya.connect( data[CONF_HOST], @@ -238,8 +248,43 @@ async def validate_input(hass: core.HomeAssistant, data): data[CONF_LOCAL_KEY], float(data[CONF_PROTOCOL_VERSION]), ) + if CONF_RESET_DPIDS in data: + reset_ids_str = data[CONF_RESET_DPIDS].split(",") + reset_ids = [] + for reset_id in reset_ids_str: + reset_ids.append(int(reset_id.strip())) + _LOGGER.debug( + "Reset DPIDs configured: %s (%s)", + data[CONF_RESET_DPIDS], + reset_ids, + ) + try: + detected_dps = await interface.detect_available_dps() + except Exception: # pylint: disable=broad-except + try: + _LOGGER.debug("Initial state update failed, trying reset command") + if len(reset_ids) > 0: + await interface.reset(reset_ids) + detected_dps = await interface.detect_available_dps() + except Exception: # pylint: disable=broad-except + _LOGGER.debug("No DPS able to be detected") + detected_dps = {} + + # if manual DPs are set, merge these. + _LOGGER.debug("Detected DPS: %s", detected_dps) + if CONF_MANUAL_DPS in data: + + manual_dps_list = [dps.strip() for dps in data[CONF_MANUAL_DPS].split(",")] + _LOGGER.debug( + "Manual DPS Setting: %s (%s)", data[CONF_MANUAL_DPS], manual_dps_list + ) + # merge the lists + for new_dps in manual_dps_list + (reset_ids or []): + # If the DPS not in the detected dps list, then add with a + # default value indicating that it has been manually added + if str(new_dps) not in detected_dps: + detected_dps[new_dps] = -1 - detected_dps = await interface.detect_available_dps() except (ConnectionRefusedError, ConnectionResetError) as ex: raise CannotConnect from ex except ValueError as ex: @@ -253,6 +298,8 @@ async def validate_input(hass: core.HomeAssistant, data): if not detected_dps: raise EmptyDpsList + _LOGGER.debug("Total DPS: %s", detected_dps) + return dps_string_list(detected_dps) diff --git a/custom_components/localtuya/const.py b/custom_components/localtuya/const.py index c94030432..8010d18c6 100644 --- a/custom_components/localtuya/const.py +++ b/custom_components/localtuya/const.py @@ -35,11 +35,16 @@ CONF_PRODUCT_NAME = "product_name" CONF_USER_ID = "user_id" + CONF_ACTION = "action" CONF_ADD_DEVICE = "add_device" CONF_EDIT_DEVICE = "edit_device" CONF_SETUP_CLOUD = "setup_cloud" CONF_NO_CLOUD = "no_cloud" +CONF_MANUAL_DPS = "manual_dps_strings" +CONF_DEFAULT_VALUE = "dps_default_value" +CONF_RESET_DPIDS = "reset_dpids" +CONF_PASSIVE_ENTITY = "is_passive_entity" # light CONF_BRIGHTNESS_LOWER = "brightness_lower" @@ -73,6 +78,7 @@ CONF_FAN_DIRECTION = "fan_direction" CONF_FAN_DIRECTION_FWD = "fan_direction_forward" CONF_FAN_DIRECTION_REV = "fan_direction_reverse" +CONF_FAN_DPS_TYPE = "fan_dps_type" # sensor CONF_SCALING = "scaling" @@ -113,3 +119,16 @@ CONF_PAUSED_STATE = "paused_state" CONF_RETURN_MODE = "return_mode" CONF_STOP_STATUS = "stop_status" + +# number +CONF_MIN_VALUE = "min_value" +CONF_MAX_VALUE = "max_value" +CONF_STEPSIZE_VALUE = "step_size" + +# select +CONF_OPTIONS = "select_options" +CONF_OPTIONS_FRIENDLY = "select_options_friendly" + +# States +ATTR_STATE = "raw_state" +CONF_RESTORE_ON_RECONNECT = "restore_on_reconnect" diff --git a/custom_components/localtuya/cover.py b/custom_components/localtuya/cover.py index 2a3eb8bdc..3b6b86de4 100644 --- a/custom_components/localtuya/cover.py +++ b/custom_components/localtuya/cover.py @@ -228,5 +228,10 @@ def status_updated(self): # store the time of the last movement change self._timer_start = time.time() + # Keep record in last_state as long as not during connection/re-connection, + # as last state will be used to restore the previous state + if (self._state is not None) and (not self._device.is_connecting): + self._last_state = self._state + async_setup_entry = partial(async_setup_entry, DOMAIN, LocaltuyaCover, flow_schema) diff --git a/custom_components/localtuya/fan.py b/custom_components/localtuya/fan.py index d2b458351..584ea84c1 100644 --- a/custom_components/localtuya/fan.py +++ b/custom_components/localtuya/fan.py @@ -32,6 +32,7 @@ CONF_FAN_SPEED_CONTROL, CONF_FAN_SPEED_MAX, CONF_FAN_SPEED_MIN, + CONF_FAN_DPS_TYPE, ) _LOGGER = logging.getLogger(__name__) @@ -48,6 +49,7 @@ def flow_schema(dps): vol.Optional(CONF_FAN_SPEED_MIN, default=1): cv.positive_int, vol.Optional(CONF_FAN_SPEED_MAX, default=9): cv.positive_int, vol.Optional(CONF_FAN_ORDERED_LIST, default="disabled"): cv.string, + vol.Optional(CONF_FAN_DPS_TYPE, default="str"): vol.In(["str", "int"]), } @@ -73,6 +75,7 @@ def __init__( ) self._ordered_list = self._config.get(CONF_FAN_ORDERED_LIST).split(",") self._ordered_list_mode = None + self._dps_type = int if self._config.get(CONF_FAN_DPS_TYPE) == "int" else str if isinstance(self._ordered_list, list) and len(self._ordered_list) > 1: self._use_ordered_list = True @@ -138,7 +141,7 @@ async def async_set_percentage(self, percentage): await self.async_turn_on() if self._use_ordered_list: await self._device.set_dp( - str( + self._dps_type( percentage_to_ordered_list_item(self._ordered_list, percentage) ), self._config.get(CONF_FAN_SPEED_CONTROL), @@ -151,7 +154,7 @@ async def async_set_percentage(self, percentage): else: await self._device.set_dp( - str( + self._dps_type( math.ceil( percentage_to_ranged_value(self._speed_range, percentage) ) @@ -221,7 +224,7 @@ def status_updated(self): ) if current_speed is not None: self._percentage = ordered_list_item_to_percentage( - self._ordered_list, current_speed + self._ordered_list, str(current_speed) ) else: diff --git a/custom_components/localtuya/manifest.json b/custom_components/localtuya/manifest.json index bb6f2ea40..10b1b5a30 100644 --- a/custom_components/localtuya/manifest.json +++ b/custom_components/localtuya/manifest.json @@ -1,7 +1,7 @@ { "domain": "localtuya", "name": "LocalTuya integration", - "version": "4.0.0", + "version": "4.1.1", "documentation": "https://github.com/rospogrigio/localtuya/", "dependencies": [], "codeowners": [ diff --git a/custom_components/localtuya/number.py b/custom_components/localtuya/number.py index 596eb01eb..23d7ea9a0 100644 --- a/custom_components/localtuya/number.py +++ b/custom_components/localtuya/number.py @@ -8,13 +8,20 @@ from .common import LocalTuyaEntity, async_setup_entry -_LOGGER = logging.getLogger(__name__) +from .const import ( + CONF_MIN_VALUE, + CONF_MAX_VALUE, + CONF_DEFAULT_VALUE, + CONF_RESTORE_ON_RECONNECT, + CONF_STEPSIZE_VALUE, + CONF_PASSIVE_ENTITY, +) -CONF_MIN_VALUE = "min_value" -CONF_MAX_VALUE = "max_value" +_LOGGER = logging.getLogger(__name__) DEFAULT_MIN = 0 DEFAULT_MAX = 100000 +DEFAULT_STEP = 1.0 def flow_schema(dps): @@ -28,6 +35,13 @@ def flow_schema(dps): vol.Coerce(float), vol.Range(min=-1000000.0, max=1000000.0), ), + vol.Required(CONF_STEPSIZE_VALUE, default=DEFAULT_STEP): vol.All( + vol.Coerce(float), + vol.Range(min=0.0, max=1000000.0), + ), + vol.Required(CONF_RESTORE_ON_RECONNECT): bool, + vol.Required(CONF_PASSIVE_ENTITY): bool, + vol.Optional(CONF_DEFAULT_VALUE): str, } @@ -49,36 +63,52 @@ def __init__( if CONF_MIN_VALUE in self._config: self._min_value = self._config.get(CONF_MIN_VALUE) - self._max_value = self._config.get(CONF_MAX_VALUE) + self._max_value = DEFAULT_MAX + if CONF_MAX_VALUE in self._config: + self._max_value = self._config.get(CONF_MAX_VALUE) + + self._step_size = DEFAULT_STEP + if CONF_STEPSIZE_VALUE in self._config: + self._step_size = self._config.get(CONF_STEPSIZE_VALUE) + + # Override standard default value handling to cast to a float + default_value = self._config.get(CONF_DEFAULT_VALUE) + if default_value is not None: + self._default_value = float(default_value) @property - def value(self) -> float: + def native_value(self) -> float: """Return sensor state.""" return self._state @property - def min_value(self) -> float: + def native_min_value(self) -> float: """Return the minimum value.""" return self._min_value @property - def max_value(self) -> float: + def native_max_value(self) -> float: """Return the maximum value.""" return self._max_value + @property + def native_step(self) -> float: + """Return the maximum value.""" + return self._step_size + @property def device_class(self): """Return the class of this device.""" return self._config.get(CONF_DEVICE_CLASS) - async def async_set_value(self, value: float) -> None: + async def async_set_native_value(self, value: float) -> None: """Update the current value.""" await self._device.set_dp(value, self._dp_id) - def status_updated(self): - """Device status was updated.""" - state = self.dps(self._dp_id) - self._state = state + # Default value is the minimum value + def entity_default_value(self): + """Return the minimum value as the default for this entity type.""" + return self._min_value async_setup_entry = partial(async_setup_entry, DOMAIN, LocaltuyaNumber, flow_schema) diff --git a/custom_components/localtuya/pytuya/__init__.py b/custom_components/localtuya/pytuya/__init__.py index b7645ec25..d36cd5e8e 100644 --- a/custom_components/localtuya/pytuya/__init__.py +++ b/custom_components/localtuya/pytuya/__init__.py @@ -62,6 +62,7 @@ SET = "set" STATUS = "status" HEARTBEAT = "heartbeat" +RESET = "reset" UPDATEDPS = "updatedps" # Request refresh of DPS PROTOCOL_VERSION_BYTES_31 = b"3.1" @@ -96,6 +97,16 @@ SET: {"hexByte": 0x07, "command": {"devId": "", "uid": "", "t": ""}}, HEARTBEAT: {"hexByte": 0x09, "command": {}}, UPDATEDPS: {"hexByte": 0x12, "command": {"dpId": [18, 19, 20]}}, + RESET: { + "hexByte": 0x12, + "command": { + "gwId": "", + "devId": "", + "uid": "", + "t": "", + "dpId": [18, 19, 20], + }, + }, }, "type_0d": { STATUS: {"hexByte": 0x0D, "command": {"devId": "", "uid": "", "t": ""}}, @@ -217,6 +228,7 @@ class MessageDispatcher(ContextualLogger): # Heartbeats always respond with sequence number 0, so they can't be waited for like # other messages. This is a hack to allow waiting for heartbeats. HEARTBEAT_SEQNO = -100 + RESET_SEQNO = -101 def __init__(self, dev_id, listener): """Initialize a new MessageBuffer.""" @@ -301,9 +313,19 @@ def _dispatch(self, msg): sem.release() elif msg.cmd == 0x12: self.debug("Got normal updatedps response") + if self.RESET_SEQNO in self.listeners: + sem = self.listeners[self.RESET_SEQNO] + self.listeners[self.RESET_SEQNO] = msg + sem.release() elif msg.cmd == 0x08: - self.debug("Got status update") - self.listener(msg) + if self.RESET_SEQNO in self.listeners: + self.debug("Got reset status update") + sem = self.listeners[self.RESET_SEQNO] + self.listeners[self.RESET_SEQNO] = msg + sem.release() + else: + self.debug("Got status update") + self.listener(msg) else: self.debug( "Got message type %d for unknown listener %d: %s", @@ -381,6 +403,11 @@ def _status_update(msg): def connection_made(self, transport): """Did connect to the device.""" + self.transport = transport + self.on_connected.set_result(True) + + def start_heartbeat(self): + """Start the heartbeat transmissions with the device.""" async def heartbeat_loop(): """Continuously send heart beat updates.""" @@ -403,8 +430,6 @@ async def heartbeat_loop(): self.transport = None transport.close() - self.transport = transport - self.on_connected.set_result(True) self.heartbeater = self.loop.create_task(heartbeat_loop()) def data_received(self, data): @@ -449,12 +474,13 @@ async def exchange(self, command, dps=None): payload = self._generate_payload(command, dps) dev_type = self.dev_type - # Wait for special sequence number if heartbeat - seqno = ( - MessageDispatcher.HEARTBEAT_SEQNO - if command == HEARTBEAT - else (self.seqno - 1) - ) + # Wait for special sequence number if heartbeat or reset + seqno = self.seqno - 1 + + if command == HEARTBEAT: + seqno = MessageDispatcher.HEARTBEAT_SEQNO + elif command == RESET: + seqno = MessageDispatcher.RESET_SEQNO self.transport.write(payload) msg = await self.dispatcher.wait_for(seqno) @@ -487,6 +513,15 @@ async def heartbeat(self): """Send a heartbeat message.""" return await self.exchange(HEARTBEAT) + async def reset(self, dpIds=None): + """Send a reset message (3.3 only).""" + if self.version == 3.3: + self.dev_type = "type_0a" + self.debug("reset switching to dev_type %s", self.dev_type) + return await self.exchange(RESET, dpIds) + + return True + async def update_dps(self, dps=None): """ Request device to update index. diff --git a/custom_components/localtuya/select.py b/custom_components/localtuya/select.py index 29d11c916..f643e081b 100644 --- a/custom_components/localtuya/select.py +++ b/custom_components/localtuya/select.py @@ -4,14 +4,20 @@ import voluptuous as vol from homeassistant.components.select import DOMAIN, SelectEntity -from homeassistant.const import CONF_DEVICE_CLASS, STATE_UNKNOWN +from homeassistant.const import ( + CONF_DEVICE_CLASS, + STATE_UNKNOWN, +) from .common import LocalTuyaEntity, async_setup_entry -_LOGGER = logging.getLogger(__name__) - -CONF_OPTIONS = "select_options" -CONF_OPTIONS_FRIENDLY = "select_options_friendly" +from .const import ( + CONF_OPTIONS, + CONF_OPTIONS_FRIENDLY, + CONF_DEFAULT_VALUE, + CONF_RESTORE_ON_RECONNECT, + CONF_PASSIVE_ENTITY, +) def flow_schema(dps): @@ -19,9 +25,15 @@ def flow_schema(dps): return { vol.Required(CONF_OPTIONS): str, vol.Optional(CONF_OPTIONS_FRIENDLY): str, + vol.Required(CONF_RESTORE_ON_RECONNECT): bool, + vol.Required(CONF_PASSIVE_ENTITY): bool, + vol.Optional(CONF_DEFAULT_VALUE): str, } +_LOGGER = logging.getLogger(__name__) + + class LocaltuyaSelect(LocalTuyaEntity, SelectEntity): """Representation of a Tuya Enumeration.""" @@ -92,9 +104,24 @@ async def async_select_option(self, option: str) -> None: def status_updated(self): """Device status was updated.""" + super().status_updated() + state = self.dps(self._dp_id) - self._state_friendly = self._display_options[self._valid_options.index(state)] - self._state = state + + # Check that received status update for this entity. + if state is not None: + try: + self._state_friendly = self._display_options[ + self._valid_options.index(state) + ] + except Exception: # pylint: disable=broad-except + # Friendly value couldn't be mapped + self._state_friendly = state + + # Default value is the first option + def entity_default_value(self): + """Return the first option as the default value for this entity type.""" + return self._valid_options[0] async_setup_entry = partial(async_setup_entry, DOMAIN, LocaltuyaSelect, flow_schema) diff --git a/custom_components/localtuya/sensor.py b/custom_components/localtuya/sensor.py index c8b2ddb3e..0eb0ae4e9 100644 --- a/custom_components/localtuya/sensor.py +++ b/custom_components/localtuya/sensor.py @@ -66,5 +66,10 @@ def status_updated(self): state = round(state * scale_factor, DEFAULT_PRECISION) self._state = state + # No need to restore state for a sensor + async def restore_state_when_connected(self): + """Do nothing for a sensor.""" + return + async_setup_entry = partial(async_setup_entry, DOMAIN, LocaltuyaSensor, flow_schema) diff --git a/custom_components/localtuya/strings.json b/custom_components/localtuya/strings.json index 4db7e7078..25d09fe6b 100644 --- a/custom_components/localtuya/strings.json +++ b/custom_components/localtuya/strings.json @@ -104,6 +104,7 @@ "fan_direction":"fan direction dps", "fan_direction_forward": "forward dps string", "fan_direction_reverse": "reverse dps string", + "fan_dps_type": "DP value type", "current_temperature_dp": "Current Temperature", "target_temperature_dp": "Target Temperature", "temperature_step": "Temperature Step (optional)", @@ -120,7 +121,12 @@ "preset_set": "Presets Set (optional)", "eco_dp": "Eco DP (optional)", "eco_value": "Eco value (optional)", - "heuristic_action": "Enable heuristic action (optional)" + "heuristic_action": "Enable heuristic action (optional)", + "dps_default_value": "Default value when un-initialised (optional)", + "restore_on_reconnect": "Restore the last set value in HomeAssistant after a lost connection", + "min_value": "Minimum Value", + "max_value": "Maximum Value", + "step_size": "Minimum increment between numbers" } }, "yaml_import": { diff --git a/custom_components/localtuya/switch.py b/custom_components/localtuya/switch.py index e884095b7..bc664bf5c 100644 --- a/custom_components/localtuya/switch.py +++ b/custom_components/localtuya/switch.py @@ -10,9 +10,13 @@ ATTR_CURRENT, ATTR_CURRENT_CONSUMPTION, ATTR_VOLTAGE, + ATTR_STATE, CONF_CURRENT, CONF_CURRENT_CONSUMPTION, CONF_VOLTAGE, + CONF_DEFAULT_VALUE, + CONF_RESTORE_ON_RECONNECT, + CONF_PASSIVE_ENTITY, ) _LOGGER = logging.getLogger(__name__) @@ -24,6 +28,9 @@ def flow_schema(dps): vol.Optional(CONF_CURRENT): vol.In(dps), vol.Optional(CONF_CURRENT_CONSUMPTION): vol.In(dps), vol.Optional(CONF_VOLTAGE): vol.In(dps), + vol.Required(CONF_RESTORE_ON_RECONNECT): bool, + vol.Required(CONF_PASSIVE_ENTITY): bool, + vol.Optional(CONF_DEFAULT_VALUE): str, } @@ -59,6 +66,12 @@ def extra_state_attributes(self): ) if self.has_config(CONF_VOLTAGE): attrs[ATTR_VOLTAGE] = self.dps(self._config[CONF_VOLTAGE]) / 10 + + # Store the state + if self._state is not None: + attrs[ATTR_STATE] = self._state + elif self._last_state is not None: + attrs[ATTR_STATE] = self._last_state return attrs async def async_turn_on(self, **kwargs): @@ -69,9 +82,10 @@ async def async_turn_off(self, **kwargs): """Turn Tuya switch off.""" await self._device.set_dp(False, self._dp_id) - def status_updated(self): - """Device status was updated.""" - self._state = self.dps(self._dp_id) + # Default value is the "OFF" state + def entity_default_value(self): + """Return False as the default value for this entity type.""" + return False async_setup_entry = partial(async_setup_entry, DOMAIN, LocaltuyaSwitch, flow_schema) diff --git a/custom_components/localtuya/translations/en.json b/custom_components/localtuya/translations/en.json index 82f406446..4b3ddb0ad 100644 --- a/custom_components/localtuya/translations/en.json +++ b/custom_components/localtuya/translations/en.json @@ -96,7 +96,9 @@ "local_key": "Local key", "protocol_version": "Protocol Version", "scan_interval": "Scan interval (seconds, only when not updating automatically)", - "entities": "Entities (uncheck an entity to remove it)" + "entities": "Entities (uncheck an entity to remove it)", + "manual_dps_strings": "Manual DPS to add (separated by commas ',') - used when detection is not working (optional)", + "reset_dpids": "DPIDs to send in RESET command (separated by commas ',')- Used when device does not respond to status requests after turning on (optional)" } }, "pick_entity_type": { @@ -165,6 +167,7 @@ "fan_direction":"fan direction dps", "fan_direction_forward": "forward dps string", "fan_direction_reverse": "reverse dps string", + "fan_dps_type": "DP value type", "current_temperature_dp": "Current Temperature", "target_temperature_dp": "Target Temperature", "temperature_step": "Temperature Step (optional)", @@ -181,7 +184,13 @@ "preset_set": "Presets Set (optional)", "eco_dp": "Eco DP (optional)", "eco_value": "Eco value (optional)", - "heuristic_action": "Enable heuristic action (optional)" + "heuristic_action": "Enable heuristic action (optional)", + "dps_default_value": "Default value when un-initialised (optional)", + "restore_on_reconnect": "Restore the last set value in HomeAssistant after a lost connection", + "min_value": "Minimum Value", + "max_value": "Maximum Value", + "step_size": "Minimum increment between numbers", + "is_passive_entity": "Passive entity - requires integration to send initialisation value" } } } diff --git a/custom_components/localtuya/translations/it.json b/custom_components/localtuya/translations/it.json new file mode 100644 index 000000000..faf4afa07 --- /dev/null +++ b/custom_components/localtuya/translations/it.json @@ -0,0 +1,190 @@ +{ + "config": { + "abort": { + "already_configured": "Il dispositivo è già stato configurato.", + "device_updated": "La configurazione del dispositivo è stata aggiornata." + }, + "error": { + "authentication_failed": "Autenticazione fallita. Errore:\n{msg}", + "cannot_connect": "Impossibile connettersi al dispositivo. Verifica che l'indirizzo sia corretto e riprova.", + "device_list_failed": "Impossibile recuperare l'elenco dei dispositivi.\n{msg}", + "invalid_auth": "Impossibile autenticarsi con il dispositivo. Verificare che device_id e local_key siano corretti.", + "unknown": "Si è verificato un errore sconosciuto. Vedere registro per i dettagli.", + "entity_already_configured": "L'entity con questo ID è già stata configurata.", + "address_in_use": "L'indirizzo utilizzato per il discovery è già in uso. Assicurarsi che nessun'altra applicazione lo stia utilizzando (porta TCP 6668).", + "discovery_failed": "Qualcosa è fallito nella discovery dei dispositivi. Vedi registro per i dettagli.", + "empty_dps": "La connessione al dispositivo è riuscita ma non sono stati trovati i datapoint, riprova. Crea un nuovo Issue e includi i log di debug se il problema persiste." + }, + "step": { + "user": { + "title": "Configurazione dell'account Cloud API", + "description": "Inserisci le credenziali per l'account Cloud API Tuya.", + "data": { + "region": "Regione del server API", + "client_id": "Client ID", + "client_secret": "Secret", + "user_id": "User ID", + "user_name": "Username", + "no_cloud": "Non configurare un account Cloud API" + } + } + } + }, + "options": { + "abort": { + "already_configured": "Il dispositivo è già stato configurato.", + "device_success": "Dispositivo {dev_name} {action} con successo." + }, + "error": { + "authentication_failed": "Autenticazione fallita. Errore:\n{msg}", + "cannot_connect": "Impossibile connettersi al dispositivo. Verifica che l'indirizzo sia corretto e riprova.", + "device_list_failed": "Impossibile recuperare l'elenco dei dispositivi.\n{msg}", + "invalid_auth": "Impossibile autenticarsi con il dispositivo. Verificare che device_id e local_key siano corretti.", + "unknown": "Si è verificato un errore sconosciuto. Vedere registro per i dettagli.", + "entity_already_configured": "L'entity con questo ID è già stata configurata.", + "address_in_use": "L'indirizzo utilizzato per il discovery è già in uso. Assicurarsi che nessun'altra applicazione lo stia utilizzando (porta TCP 6668).", + "discovery_failed": "Qualcosa è fallito nella discovery dei dispositivi. Vedi registro per i dettagli.", + "empty_dps": "La connessione al dispositivo è riuscita ma non sono stati trovati i datapoint, riprova. Crea un nuovo Issue e includi i log di debug se il problema persiste." + }, + "step": { + "yaml_import": { + "title": "Non supportato", + "description": "Le impostazioni non possono essere configurate tramite file YAML." + }, + "init": { + "title": "Configurazione LocalTuya", + "description": "Seleziona l'azione desiderata.", + "data": { + "add_device": "Aggiungi un nuovo dispositivo", + "edit_device": "Modifica un dispositivo", + "setup_cloud": "Riconfigurare l'account Cloud API" + } + }, + "add_device": { + "title": "Aggiungi un nuovo dispositivo", + "description": "Scegli uno dei dispositivi trovati automaticamente o `...` per aggiungere manualmente un dispositivo.", + "data": { + "selected_device": "Dispositivi trovati" + } + }, + "edit_device": { + "title": "Modifica un dispositivo", + "description": "Scegli il dispositivo configurato che si desidera modificare.", + "data": { + "selected_device": "Dispositivi configurati" + } + }, + "cloud_setup": { + "title": "Configurazione dell'account Cloud API", + "description": "Inserisci le credenziali per l'account Cloud API Tuya.", + "data": { + "region": "Regione del server API", + "client_id": "Client ID", + "client_secret": "Secret", + "user_id": "User ID", + "user_name": "Username", + "no_cloud": "Non configurare l'account Cloud API" + } + }, + "configure_device": { + "title": "Configura il dispositivo", + "description": "Compila i dettagli del dispositivo {for_device}.", + "data": { + "friendly_name": "Nome", + "host": "Host", + "device_id": "ID del dispositivo", + "local_key": "Chiave locale", + "protocol_version": "Versione del protocollo", + "scan_interval": "Intervallo di scansione (secondi, solo quando non si aggiorna automaticamente)", + "entities": "Entities (deseleziona un'entity per rimuoverla)" + } + }, + "pick_entity_type": { + "title": "Selezione del tipo di entity", + "description": "Scegli il tipo di entity che desideri aggiungere.", + "data": { + "platform_to_add": "piattaforma", + "no_additional_entities": "Non aggiungere altre entity" + } + }, + "configure_entity": { + "title": "Configurare entity", + "description": "Compila i dettagli per {entity} con tipo `{platform}`.Tutte le impostazioni ad eccezione di `id` possono essere modificate dalla pagina delle opzioni in seguito.", + "data": { + "id": "ID", + "friendly_name": "Nome amichevole", + "current": "Corrente", + "current_consumption": "Potenza", + "voltage": "Tensione", + "commands_set": "Set di comandi Aperto_Chiuso_Stop", + "positioning_mode": "Modalità di posizionamento", + "current_position_dp": "Posizione attuale (solo per la modalità *posizione*)", + "set_position_dp": "Imposta posizione (solo per modalità *posizione*)", + "position_inverted": "Inverti posizione 0-100 (solo per modalità *posizione*)", + "span_time": "Tempo di apertura totale, in sec. (solo per modalità *a tempo*)", + "unit_of_measurement": "Unità di misura", + "device_class": "Classe del dispositivo", + "scaling": "Fattore di scala", + "state_on": "Valore di ON", + "state_off": "Valore di OFF", + "powergo_dp": "Potenza DP (di solito 25 o 2)", + "idle_status_value": "Stato di inattività (separato da virgole)", + "returning_status_value": "Stato di ritorno alla base", + "docked_status_value": "Stato di tornato alla base (separato da virgole)", + "fault_dp": "DP di guasto (di solito 11)", + "battery_dp": "DP di stato batteria (di solito 14)", + "mode_dp": "DP di modalità (di solito 27)", + "modes": "Elenco delle modalità", + "return_mode": "Ritorno in modalità home", + "fan_speed_dp": "DP di velocità del ventilatore (di solito 30)", + "fan_speeds": "DP di elenco delle velocità del ventilatore (separato da virgola)", + "clean_time_dp": "DP di tempo di pulizia (di solito 33)", + "clean_area_dp": "DP di area pulita (di solito 32)", + "clean_record_dp": "DP di record delle pulizie (di solito 34)", + "locate_dp": "DP di individuazione (di solito 31)", + "paused_state": "Stato di pausa (pausa, pausa, ecc.)", + "stop_status": "Stato di stop", + "brightness": "Luminosità (solo per il colore bianco)", + "brightness_lower": "Limite inferiore per la luminosità", + "brightness_upper": "Limite superiore per la luminosità", + "color_temp": "Temperatura di colore", + "color_temp_reverse": "Temperatura di colore invertita", + "color": "Colore", + "color_mode": "Modalità colore", + "color_temp_min_kelvin": "Minima temperatura di colore in K", + "color_temp_max_kelvin": "Massima temperatura di colore in k", + "music_mode": "Modalità musicale disponibile", + "scene": "Scena", + "select_options": "Opzioni valide, voci separate da una vigola (;)", + "select_options_friendly": "Opzioni intuitive, voci separate da una virgola", + "fan_speed_control": "DP di controllo di velocità del ventilatore", + "fan_oscillating_control": "DP di controllo dell'oscillazione del ventilatore", + "fan_speed_min": "Velocità del ventilatore minima", + "fan_speed_max": "Velocità del ventilatore massima", + "fan_speed_ordered_list": "Elenco delle modalità di velocità del ventilatore (sovrascrive velocità min/max)", + "fan_direction":"DP di direzione del ventilatore", + "fan_direction_forward": "Stringa del DP per avanti", + "fan_direction_reverse": "Stringa del DP per indietro", + "current_temperature_dp": "Temperatura attuale", + "target_temperature_dp": "Temperatura target", + "temperature_step": "Intervalli di temperatura (facoltativo)", + "max_temperature_dp": "Temperatura massima (opzionale)", + "min_temperature_dp": "Temperatura minima (opzionale)", + "precision": "Precisione (opzionale, per valori DP)", + "target_precision": "Precisione del target (opzionale, per valori DP)", + "temperature_unit": "Unità di temperatura (opzionale)", + "hvac_mode_dp": "Modalità HVAC attuale (opzionale)", + "hvac_mode_set": "Impostazione modalità HVAC (opzionale)", + "hvac_action_dp": "Azione HVAC attuale (opzionale)", + "hvac_action_set": "Impostazione azione HVAC (opzionale)", + "preset_dp": "Preset DP (opzionale)", + "preset_set": "Set di preset (opzionale)", + "eco_dp": "DP per Eco (opzionale)", + "eco_value": "Valore Eco (opzionale)", + "heuristic_action": "Abilita azione euristica (opzionale)" + } + } + } + }, + "title": "LocalTuya" +} diff --git a/custom_components/localtuya/translations/pt-BR.json b/custom_components/localtuya/translations/pt-BR.json index c27dc510d..a2feed456 100644 --- a/custom_components/localtuya/translations/pt-BR.json +++ b/custom_components/localtuya/translations/pt-BR.json @@ -5,211 +5,184 @@ "device_updated": "A configuração do dispositivo foi atualizada!" }, "error": { - "cannot_connect": "Não é possível se conectar ao dispositivo. Verifique se o endereço está correto e tente novamente.", + "authentication_failed": "Falha ao autenticar.\n{msg}", + "cannot_connect": "Não é possível se conectar ao dispositivo. Verifique se o endereço está correto e tente novamente", + "device_list_failed": "Falha ao recuperar a lista de dispositivos.\n{msg}", "invalid_auth": "Falha ao autenticar com o dispositivo. Verifique se o ID do dispositivo e a chave local estão corretos.", "unknown": "Ocorreu um erro desconhecido. Consulte o registro para obter detalhes.", "entity_already_configured": "A entidade com este ID já foi configurada.", - "address_in_use": "O endereço usado para descoberta já está em uso. Certifique-se de que nenhum outro aplicativo o esteja usando (porta TCP 6668).", + "address_in_use": "AddresO endereço usado para descoberta já está em uso. Certifique-se de que nenhum outro aplicativo o esteja usando (porta TCP 6668).s used for discovery is already in use. Make sure no other application is using it (TCP port 6668).", "discovery_failed": "Algo falhou ao descobrir dispositivos. Consulte o registro para obter detalhes.", "empty_dps": "A conexão com o dispositivo foi bem-sucedida, mas nenhum ponto de dados foi encontrado. Tente novamente. Crie um novo issue e inclua os logs de depuração se o problema persistir." }, "step": { "user": { - "title": "Descoberta de dispositivo", - "description": "Escolha um dos dispositivos descobertos automaticamente ou clique em `...` para adicionar um dispositivo manualmente.", + "title": "Configuração da conta da API do Cloud", + "description": "Insira as credenciais para a API Tuya Cloud.", "data": { - "discovered_device": "Dispositivo descoberto" + "region": "Região do servidor de API", + "client_id": "ID do cliente", + "client_secret": "Secret", + "user_id": "ID de usuário", + "user_name": "Nome de usuário", + "no_cloud": "Não configure uma conta de API da Cloud" } + } + } + }, + "options": { + "abort": { + "already_configured": "O dispositivo já foi configurado.", + "device_success": "Dispositivo {dev_name} {action} com sucesso." + }, + "error": { + "authentication_failed": "Falha ao autenticar.\n{msg}", + "cannot_connect": "Não é possível se conectar ao dispositivo. Verifique se o endereço está correto e tente novamente", + "device_list_failed": "Falha ao recuperar a lista de dispositivos.\n{msg}", + "invalid_auth": "Falha ao autenticar com o dispositivo. Verifique se o ID do dispositivo e a chave local estão corretos.", + "unknown": "Ocorreu um erro desconhecido. Consulte o registro para obter detalhes.", + "entity_already_configured": "A entidade com este ID já foi configurada.", + "address_in_use": "O endereço usado para descoberta já está em uso. Certifique-se de que nenhum outro aplicativo o esteja usando (porta TCP 6668).", + "discovery_failed": "Algo falhou ao descobrir dispositivos. Consulte o registro para obter detalhes.", + "empty_dps": "A conexão com o dispositivo foi bem-sucedida, mas nenhum ponto de dados foi encontrado. Tente novamente. Crie um novo issue e inclua os logs de depuração se o problema persistir." + }, + "step": { + "yaml_import": { + "title": "Não suportado", + "description": "As opções não podem ser editadas quando configuradas via YAML." }, - "basic_info": { - "title": "Adicionar dispositivo Tuya", - "description": "Preencha os detalhes básicos do dispositivo. O nome inserido aqui será usado para identificar a própria integração (como visto na página `Integrations`). Você adicionará entidades e dará nomes a elas nas etapas a seguir.", + "init": { + "title": "Configuração LocalTuya", + "description": "Selecione a ação desejada.", "data": { - "friendly_name": "Nome", - "host": "Host", - "device_id": "ID do dispositivo", - "local_key": "Local key", - "protocol_version": "Versão do protocolo", - "scan_interval": "Intervalo do escaneamento (segundos, somente quando não estiver atualizando automaticamente)" + "add_device": "Adicionar um novo dispositivo", + "edit_device": "Editar um dispositivo", + "setup_cloud": "Reconfigurar a conta da API da Cloud" } }, - "pick_entity_type": { - "title": "Seleção do tipo de entidade", - "description": "Escolha o tipo de entidade que deseja adicionar.", + "add_device": { + "title": "Adicionar um novo dispositivo", + "description": "Escolha um dos dispositivos descobertos automaticamente ou `...` para adicionar um dispositivo manualmente.", "data": { - "platform_to_add": "Platforma", - "no_additional_platforms": "Não adicione mais entidades" + "selected_device": "Dispositivos descobertos" } }, - "add_entity": { - "title": "Adicionar nova entidade", - "description": "Por favor, preencha os detalhes de uma entidade com o tipo `{platform}`. Todas as configurações, exceto `ID`, podem ser alteradas na página Opções posteriormente.", + "edit_device": { + "title": "Editar um novo dispositivo", + "description": "Escolha o dispositivo configurado que você deseja editar.", "data": { - "id": "ID", - "friendly_name": "Name fantasia", - "current": "Atual", - "current_consumption": "Consumo atual", - "voltage": "Voltagem", - "commands_set": "Conjunto de comandos Open_Close_Stop", - "positioning_mode": "Modo de posicão", - "current_position_dp": "Posição atual (somente para o modo de posição)", - "set_position_dp": "Definir posição (somente para o modo de posição)", - "position_inverted": "Inverter posição 0-100 (somente para o modo de posição)", - "span_time": "Tempo de abertura completo, em segundos. (somente para o modo temporizado)", - "unit_of_measurement": "Unidade de medida", - "device_class": "Classe do dispositivo", - "scaling": "Fator de escala", - "state_on": "Valor On", - "state_off": "Valor Off", - "powergo_dp": "Potência DP (Geralmente 25 ou 2)", - "idle_status_value": "Status ocioso (separado por vírgula)", - "returning_status_value": "Status de retorno", - "docked_status_value": "Status docked (separado por vírgula)", - "fault_dp": "Falha DP (Geralmente 11)", - "battery_dp": "Status da bateria DP (normalmente 14)", - "mode_dp": "Modo DP (Geralmente 27)", - "modes": "Lista de modos", - "return_mode": "Modo de retorno para base", - "fan_speed_dp": "Velocidades do ventilador DP (normalmente 30)", - "fan_speeds": "Lista de velocidades do ventilador (separadas por vírgulas)", - "clean_time_dp": "Tempo de Limpeza DP (Geralmente 33)", - "clean_area_dp": "Área Limpa DP (Geralmente 32)", - "clean_record_dp": "Limpar Registro DP (Geralmente 34)", - "locate_dp": "Localize DP (Geralmente 31)", - "paused_state": "Estado de pausa (pausa, pausado, etc)", - "stop_status": "Status de parada", - "brightness": "Brilho (somente para cor branca)", - "brightness_lower": "Valor mais baixo do brilho", - "brightness_upper": "Valor mais alto do brilho", - "color_temp": "Temperatura da cor", - "color_temp_reverse": "Temperatura da cor reversa", - "color": "Cor", - "color_mode": "Modo de cor", - "color_temp_min_kelvin": "Minima temperatura de cor em K", - "color_temp_max_kelvin": "Máxima temperatura de cor em K", - "music_mode": "Modo de música disponível", - "scene": "Cena", - "fan_speed_control": "dps de controle de velocidade do ventilador", - "fan_oscillating_control": "dps de controle oscilante do ventilador", - "fan_speed_min": "velocidade mínima do ventilador inteiro", - "fan_speed_max": "velocidade máxima do ventilador inteiro", - "fan_speed_ordered_list": "Lista de modos de velocidade do ventilador (substitui a velocidade min/max)", - "fan_direction":"direção do ventilador dps", - "fan_direction_forward": "string de dps para frente", - "fan_direction_reverse": "string dps reversa", - "current_temperature_dp": "Temperatura atual", - "target_temperature_dp": "Temperatura alvo", - "temperature_step": "Etapa de temperatura (opcional)", - "max_temperature_dp": "Max Temperatura (opcional)", - "min_temperature_dp": "Min Temperatura (opcional)", - "precision": "Precisão (opcional, para valores de DPs)", - "target_precision": "Precisão do alvo (opcional, para valores de DPs)", - "temperature_unit": "Unidade de Temperatura (opcional)", - "hvac_mode_dp": "Modo HVAC DP (opcional)", - "hvac_mode_set": "Conjunto de modo HVAC (opcional)", - "hvac_action_dp": "Ação atual de HVAC DP (opcional)", - "hvac_action_set": "Conjunto de ação atual de HVAC (opcional)", - "preset_dp": "Predefinições DP (opcional)", - "preset_set": "Conjunto de predefinições (opcional)", - "eco_dp": "Eco DP (opcional)", - "eco_value": "Valor ECO (opcional)", - "heuristic_action": "Ativar ação heurística (opcional)" + "selected_device": "Dispositivos configurados" } - } - } - }, - "options": { - "step": { - "init": { + }, + "cloud_setup": { + "title": "Configuração da conta da API da Cloud", + "description": "Insira as credenciais para a API Tuya Cloud.", + "data": { + "region": "Região do servidor de API", + "client_id": "ID do Cliente", + "client_secret": "Secret", + "user_id": "ID do usuário", + "user_name": "Nome de usuário", + "no_cloud": "Não configure a conta da API da Cloud" + } + }, + "configure_device": { "title": "Configurar dispositivo Tuya", - "description": "Configuração básica para o ID do dispositivo `{device_id}`.", + "description": "Preencha os detalhes do dispositivo {for_device}.", "data": { - "friendly_name": "Nome fantasia", + "friendly_name": "Nome", "host": "Host", + "device_id": "ID do dispositivo", "local_key": "Local key", "protocol_version": "Versão do protocolo", "scan_interval": "Intervalo de escaneamento (segundos, somente quando não estiver atualizando automaticamente)", "entities": "Entidades (desmarque uma entidade para removê-la)" } }, - "entity": { - "title": "Adicionar nova entidade", - "description": "Por favor, preencha os detalhes de uma entidade com o tipo `{platform}`. Todas as configurações, exceto `ID`, podem ser alteradas na página Opções posteriormente.", + "pick_entity_type": { + "title": "Seleção do tipo de entidade", + "description": "Escolha o tipo de entidade que deseja adicionar.", + "data": { + "platform_to_add": "Plataforma", + "no_additional_entities": "Não adicione mais entidades" + } + }, + "configure_entity": { + "title": "Configurar entidade", + "description": "Por favor, preencha os detalhes de {entity} com o tipo `{platform}`. Todas as configurações, exceto `ID`, podem ser alteradas na página Opções posteriormente.", "data": { "id": "ID", - "friendly_name": "Name fantasia", + "friendly_name": "Nome fantasia", "current": "Atual", "current_consumption": "Consumo atual", "voltage": "Voltagem", - "commands_set": "Conjunto de comandos Open_Close_Stop", - "positioning_mode": "Modo de posicão", - "current_position_dp": "Posição atual (somente para o modo de posição)", - "set_position_dp": "Definir posição (somente para o modo de posição)", - "position_inverted": "Inverter posição 0-100 (somente para o modo de posição)", - "span_time": "Tempo de abertura completo, em segundos. (somente para o modo temporizado)", + "commands_set": "Conjunto de comandos Abrir_Fechar_Parar", + "positioning_mode": "Modo de posicionamento", + "current_position_dp": "Posição atual (somente para o modo *posição*)", + "set_position_dp": "Definir posição (somente para o modo *posição*)", + "position_inverted": "Inverter 0-100 posição (somente para o modo *posição*)", + "span_time": "Tempo de abertura completo, em segundos. (somente para o modo *temporizado*)", "unit_of_measurement": "Unidade de medida", "device_class": "Classe do dispositivo", "scaling": "Fator de escala", - "state_on": "Valor On", - "state_off": "Valor Off", + "state_on": "Valor ligado", + "state_off": "Valor desligado", "powergo_dp": "Potência DP (Geralmente 25 ou 2)", "idle_status_value": "Status ocioso (separado por vírgula)", "returning_status_value": "Status de retorno", - "docked_status_value": "Status docked (separado por vírgula)", + "docked_status_value": "Status encaixado (separado por vírgula)", "fault_dp": "Falha DP (Geralmente 11)", "battery_dp": "Status da bateria DP (normalmente 14)", "mode_dp": "Modo DP (Geralmente 27)", "modes": "Lista de modos", - "return_mode": "Modo de retorno para base", + "return_mode": "Modo de retorno para casa", "fan_speed_dp": "Velocidades do ventilador DP (normalmente 30)", "fan_speeds": "Lista de velocidades do ventilador (separadas por vírgulas)", - "clean_time_dp": "Tempo de Limpeza DP (Geralmente 33)", + "clean_time_dp": "Tempo Limpo DP (Geralmente 33)", "clean_area_dp": "Área Limpa DP (Geralmente 32)", "clean_record_dp": "Limpar Registro DP (Geralmente 34)", "locate_dp": "Localize DP (Geralmente 31)", "paused_state": "Estado de pausa (pausa, pausado, etc)", "stop_status": "Status de parada", "brightness": "Brilho (somente para cor branca)", - "brightness_lower": "Valor mais baixo do brilho", - "brightness_upper": "Valor mais alto do brilho", + "brightness_lower": "Valor mais baixo de brilho", + "brightness_upper": "Valor superior de brilho", "color_temp": "Temperatura da cor", "color_temp_reverse": "Temperatura da cor reversa", "color": "Cor", "color_mode": "Modo de cor", - "color_temp_min_kelvin": "Minima temperatura de cor em K", - "color_temp_max_kelvin": "Máxima temperatura de cor em K", + "color_temp_min_kelvin": "Temperatura de cor mínima em K", + "color_temp_max_kelvin": "Temperatura máxima de cor em K", "music_mode": "Modo de música disponível", "scene": "Cena", - "fan_speed_control": "dps de controle de velocidade do ventilador", - "fan_oscillating_control": "dps de controle oscilante do ventilador", - "fan_speed_min": "velocidade mínima do ventilador inteiro", - "fan_speed_max": "velocidade máxima do ventilador inteiro", + "select_options": "Entradas válidas, entradas separadas por um ;", + "select_options_friendly": "Opções fantasia ​​ao usuário, entradas separadas por um ;", + "fan_speed_control": "Dps de controle de velocidade do ventilador", + "fan_oscillating_control": "Dps de controle oscilante do ventilador", + "fan_speed_min": "Velocidade mínima do ventilador inteiro", + "fan_speed_max": "Velocidade máxima do ventilador inteiro", "fan_speed_ordered_list": "Lista de modos de velocidade do ventilador (substitui a velocidade min/max)", - "fan_direction":"direção do ventilador dps", - "fan_direction_forward": "string de dps para frente", - "fan_direction_reverse": "string dps reversa", + "fan_direction":"Direção do ventilador dps", + "fan_direction_forward": "Seqüência de dps para frente", + "fan_direction_reverse": "String dps reversa", "current_temperature_dp": "Temperatura atual", "target_temperature_dp": "Temperatura alvo", "temperature_step": "Etapa de temperatura (opcional)", - "max_temperature_dp": "Max Temperatura (opcional)", - "min_temperature_dp": "Min Temperatura (opcional)", + "max_temperature_dp": "Temperatura máxima (opcional)", + "min_temperature_dp": "Temperatura mínima (opcional)", "precision": "Precisão (opcional, para valores de DPs)", "target_precision": "Precisão do alvo (opcional, para valores de DPs)", "temperature_unit": "Unidade de Temperatura (opcional)", "hvac_mode_dp": "Modo HVAC DP (opcional)", "hvac_mode_set": "Conjunto de modo HVAC (opcional)", "hvac_action_dp": "Ação atual de HVAC DP (opcional)", - "hvac_action_set": "Conjunto de ação atual de HVAC (opcional)", + "hvac_action_set": "Conjunto de ação atual HVAC (opcional)", "preset_dp": "Predefinições DP (opcional)", "preset_set": "Conjunto de predefinições (opcional)", "eco_dp": "Eco DP (opcional)", - "eco_value": "Valor ECO (opcional)", + "eco_value": "Valor eco (opcional)", "heuristic_action": "Ativar ação heurística (opcional)" } - }, - "yaml_import": { - "title": "Não suportado", - "description": "As opções não podem ser editadas quando configuradas via YAML." } } }, diff --git a/custom_components/programmable_thermostat/const.py b/custom_components/programmable_thermostat/const.py index 9e8d3fb01..c7383a421 100644 --- a/custom_components/programmable_thermostat/const.py +++ b/custom_components/programmable_thermostat/const.py @@ -6,7 +6,7 @@ HVAC_MODE_HEAT_COOL) #Generic -VERSION = '8.0' +VERSION = '8.1' DOMAIN = 'programmable_thermostat' PLATFORM = 'climate' ISSUE_URL = 'https://github.com/custom-components/climate.programmable_thermostat/issues' diff --git a/custom_components/programmable_thermostat/manifest.json b/custom_components/programmable_thermostat/manifest.json index 0ebad2114..84fc1d3fb 100644 --- a/custom_components/programmable_thermostat/manifest.json +++ b/custom_components/programmable_thermostat/manifest.json @@ -8,5 +8,6 @@ ], "codeowners": [], "requirements": [], - "config_flow": true + "config_flow": true, + "version": "8.1" } diff --git a/custom_components/thermal_comfort/__init__.py b/custom_components/thermal_comfort/__init__.py index 8be1c248a..2eec209ed 100644 --- a/custom_components/thermal_comfort/__init__.py +++ b/custom_components/thermal_comfort/__init__.py @@ -56,7 +56,9 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool: # We have no unique_id yet, let's use backup. hass.config_entries.async_update_entry(entry, unique_id=entry.entry_id) - hass.config_entries.async_setup_platforms(entry, PLATFORMS) + hass.async_create_task( + hass.config_entries.async_forward_entry_setups(entry, PLATFORMS) + ) update_listener = entry.add_update_listener(async_update_options) hass.data[DOMAIN][entry.entry_id][UPDATE_LISTENER] = update_listener return True diff --git a/custom_components/thermal_comfort/config_flow.py b/custom_components/thermal_comfort/config_flow.py index 5c6ff7c18..0dc0f0f51 100644 --- a/custom_components/thermal_comfort/config_flow.py +++ b/custom_components/thermal_comfort/config_flow.py @@ -10,6 +10,7 @@ from homeassistant.helpers import entity_registry import homeassistant.helpers.config_validation as cv from homeassistant.helpers.entity_registry import EntityRegistry +from homeassistant.helpers.selector import selector import voluptuous as vol from .const import DEFAULT_NAME, DOMAIN @@ -376,13 +377,25 @@ def build_schema( default=get_value( config_entry, CONF_TEMPERATURE_SENSOR, temperature_sensors[0] ), - ): vol.In(temperature_sensors), + ): selector( + { + "entity": { + "include_entities": temperature_sensors, + } + } + ), vol.Required( CONF_HUMIDITY_SENSOR, default=get_value( config_entry, CONF_HUMIDITY_SENSOR, humidity_sensors[0] ), - ): vol.In(humidity_sensors), + ): selector( + { + "entity": { + "include_entities": humidity_sensors, + } + } + ), }, ) if show_advanced: diff --git a/custom_components/thermal_comfort/manifest.json b/custom_components/thermal_comfort/manifest.json index 085f98e95..58506699d 100644 --- a/custom_components/thermal_comfort/manifest.json +++ b/custom_components/thermal_comfort/manifest.json @@ -1,7 +1,7 @@ { "domain": "thermal_comfort", "name": "Thermal Comfort", - "version": "1.4.3", + "version": "1.5.5", "documentation": "https://github.com/dolezsa/thermal_comfort/blob/master/README.md", "issue_tracker": "https://github.com/dolezsa/thermal_comfort/issues", "codeowners": ["@dolezsa"], diff --git a/custom_components/thermal_comfort/sensor.py b/custom_components/thermal_comfort/sensor.py index 7bfd7f582..1db821b69 100644 --- a/custom_components/thermal_comfort/sensor.py +++ b/custom_components/thermal_comfort/sensor.py @@ -43,6 +43,7 @@ ) from homeassistant.helpers.template import Template from homeassistant.loader import async_get_custom_components +from homeassistant.util.unit_conversion import TemperatureConverter import voluptuous as vol from .const import DEFAULT_NAME, DOMAIN @@ -101,24 +102,28 @@ def from_string(cls, string: str) -> "SensorType": """Return the sensor type from string.""" if string in list(cls): return cls(string) - elif string == "absolutehumidity": - return cls.ABSOLUTE_HUMIDITY - elif string == "dewpoint": - return cls.DEW_POINT - elif string == "frostpoint": - return cls.FROST_POINT - elif string == "frostrisk": - return cls.FROST_RISK - elif string == "heatindex": - return cls.HEAT_INDEX - elif string == "simmerindex": - return cls.SIMMER_INDEX - elif string == "simmerzone": - return cls.SIMMER_ZONE - elif string == "perception": - return cls.THERMAL_PERCEPTION else: - raise ValueError(f"Unknown sensor type: {string}") + _LOGGER.warning( + "Sensor type shortform and legacy YAML will be removed in 2.0. You should update to the new yaml format: https://github.com/dolezsa/thermal_comfort/blob/master/documentation/yaml.md" + ) + if string == "absolutehumidity": + return cls.ABSOLUTE_HUMIDITY + elif string == "dewpoint": + return cls.DEW_POINT + elif string == "frostpoint": + return cls.FROST_POINT + elif string == "frostrisk": + return cls.FROST_RISK + elif string == "heatindex": + return cls.HEAT_INDEX + elif string == "simmerindex": + return cls.SIMMER_INDEX + elif string == "simmerzone": + return cls.SIMMER_ZONE + elif string == "perception": + return cls.THERMAL_PERCEPTION + else: + raise ValueError(f"Unknown sensor type: {string}") SENSOR_TYPES = { @@ -266,6 +271,9 @@ async def wrapped(self, *args, **kwargs): async def async_setup_platform(hass, config, async_add_entities, discovery_info=None): """Set up the Thermal Comfort sensors.""" if discovery_info is None: + _LOGGER.warning( + "Legacy YAML configuration support will be removed in 2.0. You should update to the new yaml format: https://github.com/dolezsa/thermal_comfort/blob/master/documentation/yaml.md" + ) devices = [ dict(device_config, **{CONF_NAME: device_name}) for (device_name, device_config) in config[CONF_SENSORS].items() @@ -319,7 +327,7 @@ async def async_setup_entry( ) -> None: """Set up entity configured via user interface. - Called via async_setup_platforms(, SENSOR) from __init__.py + Called via async_forward_entry_setups(, SENSOR) from __init__.py """ data = hass.data[DOMAIN][config_entry.entry_id] if data.get(CONF_SCAN_INTERVAL) is None: @@ -563,7 +571,7 @@ async def _new_temperature_state(self, state): self.extra_state_attributes[ATTR_TEMPERATURE] = temp # convert to celsius if necessary if unit == TEMP_FAHRENHEIT: - temp = util.temperature.fahrenheit_to_celsius(temp) + temp = TemperatureConverter.convert(temp, TEMP_FAHRENHEIT, TEMP_CELSIUS) self._temperature = temp await self.async_update() @@ -594,7 +602,9 @@ async def dew_point(self) -> float: @compute_once_lock(SensorType.HEAT_INDEX) async def heat_index(self) -> float: """Heat Index .""" - fahrenheit = util.temperature.celsius_to_fahrenheit(self._temperature) + fahrenheit = TemperatureConverter.convert( + self._temperature, TEMP_CELSIUS, TEMP_FAHRENHEIT + ) hi = 0.5 * ( fahrenheit + 61.0 + ((fahrenheit - 68.0) * 1.2) + (self._humidity * 0.094) ) @@ -616,7 +626,7 @@ async def heat_index(self) -> float: elif self._humidity > 85 and fahrenheit >= 80 and fahrenheit <= 87: hi = hi + ((self._humidity - 85) * 0.1) * ((87 - fahrenheit) * 0.2) - return round(util.temperature.fahrenheit_to_celsius(hi), 2) + return round(TemperatureConverter.convert(hi, TEMP_FAHRENHEIT, TEMP_CELSIUS), 2) @compute_once_lock(SensorType.THERMAL_PERCEPTION) async def thermal_perception(self) -> ThermalPerception: @@ -686,7 +696,9 @@ async def frost_risk(self) -> int: @compute_once_lock(SensorType.SIMMER_INDEX) async def simmer_index(self) -> float: """.""" - fahrenheit = util.temperature.celsius_to_fahrenheit(self._temperature) + fahrenheit = TemperatureConverter.convert( + self._temperature, TEMP_CELSIUS, TEMP_FAHRENHEIT + ) si = ( 1.98 @@ -697,7 +709,7 @@ async def simmer_index(self) -> float: if fahrenheit < 70: si = fahrenheit - return round(util.temperature.fahrenheit_to_celsius(si), 2) + return round(TemperatureConverter.convert(si, TEMP_FAHRENHEIT, TEMP_CELSIUS), 2) @compute_once_lock(SensorType.SIMMER_ZONE) async def simmer_zone(self) -> SimmerZone: diff --git a/custom_components/thermal_comfort/translations/es.json b/custom_components/thermal_comfort/translations/es.json new file mode 100644 index 000000000..0d32b6222 --- /dev/null +++ b/custom_components/thermal_comfort/translations/es.json @@ -0,0 +1,45 @@ +{ + "options": { + "error": { + "temperature_not_found": "No se ha encontrado sensor de temperatura", + "humidity_not_found": "No se ha encontrado sensor de humedad" + }, + "step": { + "init": { + "title": "Ajustes de confort termal", + "data": { + "temperature_sensor": "Sensor de temperatura", + "humidity_sensor": "Sensor de humedad", + "poll": "Activar consulta de datos", + "scan_interval": "Intervalo de consulta (segundos)", + "custom_icons": "Usar paquete de iconos personalizado" + } + } + } + }, + "config": { + "abort": { + "already_configured": "Esta combinación de sensores de temperatura y humedad ya ha sido configurada.", + "no_sensors": "No se han encontrado sensores de temperatura o humedad. Prueba de nuevo en modo avanzado.", + "no_sensors_advanced": "No se han encontrado sensores de temperatura o humedad." + }, + "error": { + "temperature_not_found": "No se han encontrado sensores de temperatura", + "humidity_not_found": "No se han encontrado sensores de humedad" + }, + "step": { + "user": { + "title": "Ajustes de confort termal", + "data": { + "name": "Nombre", + "temperature_sensor": "Sensor de temperatura", + "humidity_sensor": "Sensor de humedad", + "poll": "Activar consulta de datos", + "scan_interval": "Intervalo de consulta (segundos)", + "custom_icons": "Usar paquete de iconos personalizado", + "enabled_sensors": "Sensores activados" + } + } + } + } +} diff --git a/custom_components/thermal_comfort/translations/sensor.es.json b/custom_components/thermal_comfort/translations/sensor.es.json index c927c4474..0ba82a70e 100644 --- a/custom_components/thermal_comfort/translations/sensor.es.json +++ b/custom_components/thermal_comfort/translations/sensor.es.json @@ -1,5 +1,11 @@ { "state": { + "thermal_comfort__frost_risk": { + "no_risk": "Sin riesgo", + "unlikely": "Poco probable", + "probable": "Probable", + "high": "Alta probabilidad" + }, "thermal_comfort__thermal_perception": { "dry": "Un poco seco para algunos", "very_comfortable": "Muy cómodo", @@ -9,6 +15,17 @@ "quite_uncomfortable": "Muy húmedo, bastante incómodo", "extremely_uncomfortable": "Extremadamente incómodo, agobiante", "severely_high": "Muy alto, incluso mortal para enfermedades relacionadas con el asma" + }, + "thermal_comfort__simmer_zone": { + "cool": "Fresco", + "slightly_cool": "Ligeramente fresco", + "comfortable": "Cómodo", + "slightly_warm": "Ligeramente caluroso", + "increasing_discomfort": "Caluroso e incómodo", + "extremely_warm": "Extremadamente caluroso", + "danger_of_heatstroke": "Riesgo de golpe de calor", + "extreme_danger_of_heatstroke": "Riesgo extremo de golpe de calor", + "circulatory_collapse_imminent": "Colapso circulatorio inminente" } } } diff --git a/custom_components/thermal_comfort/translations/sensor.it.json b/custom_components/thermal_comfort/translations/sensor.it.json index 34cc22eab..4c49b9615 100644 --- a/custom_components/thermal_comfort/translations/sensor.it.json +++ b/custom_components/thermal_comfort/translations/sensor.it.json @@ -15,6 +15,17 @@ "quite_uncomfortable": "Molto umido, abbastanza a disagio", "extremely_uncomfortable": "Particolarmente a disagio e opprimente", "severely_high": "Estremamente a disagio, rischioso per malattie correlati all'asma" + }, + "thermal_comfort__simmer_zone": { + "cool": "Fresco", + "slightly_cool": "Leggermente fresco", + "comfortable": "Confortevole", + "slightly_warm": "Leggermente caldo", + "increasing_discomfort": "Poco confortevole", + "extremely_warm": "Estremo caldo", + "danger_of_heatstroke": "Pericolo colpo di calore", + "extreme_danger_of_heatstroke": "Estremo pericolo colpo di calore!", + "circulatory_collapse_imminent": "Imminente collasso circolatorio!" } } } diff --git a/custom_components/thermal_comfort/translations/sensor.uk.json b/custom_components/thermal_comfort/translations/sensor.uk.json new file mode 100644 index 000000000..a65aa25e1 --- /dev/null +++ b/custom_components/thermal_comfort/translations/sensor.uk.json @@ -0,0 +1,31 @@ +{ + "state": { + "thermal_comfort__frost_risk": { + "no_risk": "Безпечно", + "unlikely": "Малоймовірно", + "probable": "Ймовірно", + "high": "Висока ймовірність" + }, + "thermal_comfort__thermal_perception": { + "dry": "Сухо", + "very_comfortable": "Дуже комфортно", + "comfortable": "Комфортно", + "ok_but_humid": "Нормально, але волого", + "somewhat_uncomfortable": "Трохи некомфортно", + "quite_uncomfortable": "Досить волого, некомфортно", + "extremely_uncomfortable": "Дуже волого, гнітюче", + "severely_high": "Дуже висока вологість, може бути смертельною для для астматиків" + }, + "thermal_comfort__simmer_zone": { + "cool": "Холодно", + "slightly_cool": "Прохолодно", + "comfortable": "Комфортно", + "slightly_warm": "Тепло", + "increasing_discomfort": "Жарко", + "extremely_warm": "Дуже жарко", + "danger_of_heatstroke": "Ризик теплового удару", + "extreme_danger_of_heatstroke": "Серйозний ризик теплового удару", + "circulatory_collapse_imminent": "Можливі судинні розлади" + } + } +} diff --git a/device_trackers.yaml b/device_trackers.yaml index f6ee2616c..d5dcc3242 100644 --- a/device_trackers.yaml +++ b/device_trackers.yaml @@ -11,7 +11,7 @@ - platform: ping hosts: charlotte_phone: 172.24.32.144 - kyle_phone: 172.24.32.135 +# kyle_phone: 172.24.32.135 # - platform: owntracks # max_gps_accuracy: 250 diff --git a/esphome/common/common.yaml b/esphome/common/common.yaml index 579206464..38ff4267e 100644 --- a/esphome/common/common.yaml +++ b/esphome/common/common.yaml @@ -30,6 +30,14 @@ text_sensor: # Reports the ESPHome Version with compile date - platform: version name: ${friendly_name} ESPHome Version + # Expose WiFi information as sensors. + - platform: wifi_info + ip_address: + name: ${friendly_name} IP + ssid: + name: ${friendly_name} SSID + bssid: + name: ${friendly_name} BSSID button: - platform: restart diff --git a/esphome/common/sense_gloworb_common.yaml b/esphome/common/sense_gloworb_common.yaml index f0ae1cd5a..86320ff0a 100644 --- a/esphome/common/sense_gloworb_common.yaml +++ b/esphome/common/sense_gloworb_common.yaml @@ -1,3 +1,4 @@ +--- packages: common: !include common.yaml @@ -26,6 +27,11 @@ output: pin: D4 inverted: true +e131: + method: multicast # default: register E1.31 to Multicast group + +wled: + light: # ... and then make a light out of it. - platform: monochromatic @@ -39,8 +45,21 @@ light: num_leds: 12 name: "${friendly_name} Ring" effects: + - e131: + universe: 1 + channels: RGB + - wled: - strobe: - flicker: + - pulse: + - pulse: + name: "Fast Pulse" + transition_length: 0.5s + update_interval: 0.5s + - pulse: + name: "Slow Pulse" + # transition_length: 1s # defaults to 1s + update_interval: 2s - addressable_rainbow: - addressable_color_wipe: - addressable_scan: @@ -53,16 +72,16 @@ light: interval: - interval: 500ms then: - - if: - condition: - not: - wifi.connected: - then: - - light.turn_on: - id: blue_led_light - brightness: 50% - transition_length: 0s - - delay: 250ms - - light.turn_off: - id: blue_led_light - transition_length: 250ms + - if: + condition: + not: + wifi.connected: + then: + - light.turn_on: + id: blue_led_light + brightness: 50% + transition_length: 0s + - delay: 250ms + - light.turn_off: + id: blue_led_light + transition_length: 250ms diff --git a/esphome/common/shelly_1_detached_push_button_common.yaml b/esphome/common/shelly_1_detached_push_button_common.yaml new file mode 100644 index 000000000..e120f7990 --- /dev/null +++ b/esphome/common/shelly_1_detached_push_button_common.yaml @@ -0,0 +1,130 @@ +--- +# Basic config +packages: + common: !include common.yaml + +esphome: + name: ${device_name} + comment: ${device_description} + platform: ESP8266 + board: esp01_1m + +captive_portal: + +# Enable logging +logger: + +web_server: + +syslog: + ip_address: 172.24.32.13 + port: 515 + +# Shelly 1 detached switch config with multi click options and fallback in case of wifi or api fail + +switch: + - platform: gpio + name: ${friendly_name} Relay + pin: GPIO4 + id: shelly_relay + restore_mode: restore_default_off + +binary_sensor: + - platform: gpio + pin: + number: GPIO5 + name: ${friendly_name} button + # config for multi click actions + # Ideas from https://github.com/TheFes/HA-configuration/blob/main/esphome/packages/shelly1_detached_multi.yaml + on_multi_click: + # triple click + - timing: + - ON for at most 1s + - OFF for at most 1s + - ON for at most 1s + - OFF for at most 1s + - ON for at most 1s + - OFF for at least 0.2s + then: + - if: + condition: + and: + - wifi.connected: + - api.connected: + # send double click event in case wifi and api are conncected + then: + - homeassistant.event: + event: esphome.button_pressed + data: + title: ${friendly_name} double click + device_name: ${device_name} + click_type: triple + # toggle relay in case either wifi or api are not connected + else: + - switch.toggle: shelly_relay + # double click + - timing: + - ON for at most 1s + - OFF for at most 1s + - ON for at most 1s + - OFF for at least 0.2s + then: + - if: + condition: + and: + - wifi.connected: + - api.connected: + # send double click event in case wifi and api are conncected + then: + - homeassistant.event: + event: esphome.button_pressed + data: + title: ${friendly_name} double click + device_name: ${device_name} + click_type: double + # toggle relay in case either wifi or api are not connected + else: + - switch.toggle: shelly_relay + # long click + - timing: + - ON for at least 1.5s + then: + - if: + condition: + and: + - wifi.connected: + - api.connected: + # send long click event in case wifi and api are conncected + then: + - homeassistant.event: + event: esphome.button_pressed + data: + title: ${friendly_name} long click + device_name: ${device_name} + click_type: long + # toggle relay in case either wifi or api are not connected + else: + - switch.toggle: shelly_relay + # single click + - timing: + - ON for at most 1s + - OFF for at least 0.5s + then: + - if: + condition: + and: + - wifi.connected: + - api.connected: + # send single click event in case wifi and api are conncected + then: + - homeassistant.event: + event: esphome.button_pressed + data: + title: ${friendly_name} short click + device_name: ${device_name} + click_type: single + # toggle relay in case either wifi or api are not connected + else: + - switch.toggle: shelly_relay + internal: true + id: button_input diff --git a/esphome/common/sonoff_basic_switch_common.yaml b/esphome/common/sonoff_basic_switch_common.yaml index d548d3b07..a0547beaa 100644 --- a/esphome/common/sonoff_basic_switch_common.yaml +++ b/esphome/common/sonoff_basic_switch_common.yaml @@ -7,7 +7,7 @@ esphome: platform: ESP8266 board: esp8285 -captive_portal: +# captive_portal: # Enable logging logger: diff --git a/esphome/common/sonoff_t1_r2_touch_switch_common.yaml b/esphome/common/sonoff_t1_r2_touch_switch_common.yaml index 8c9259395..444fae245 100644 --- a/esphome/common/sonoff_t1_r2_touch_switch_common.yaml +++ b/esphome/common/sonoff_t1_r2_touch_switch_common.yaml @@ -22,28 +22,102 @@ binary_sensor: mode: INPUT_PULLUP inverted: true name: "${friendly_name} Touch Pad" - on_press: - if: - condition: - not: - api.connected: + on_multi_click: + # triple click + - timing: + - ON for at most 1s + - OFF for at most 1s + - ON for at most 1s + - OFF for at most 1s + - ON for at most 1s + - OFF for at least 0.2s then: - - lambda: |- - id(failover_control_1).publish_state(true); - id(failover_control_1).publish_state(false); - - platform: template - id: failover_control_1 - on_press: - if: - condition: - not: - api.connected: + - if: + condition: + and: + - wifi.connected: + - api.connected: + # send double click event in case wifi and api are conncected + then: + - homeassistant.event: + event: esphome.button_pressed + data: + title: ${friendly_name} triple click + device_name: ${device_name} + click_type: triple + # toggle relay in case either wifi or api are not connected + else: + - switch.toggle: sonoff_touch_relay + # double click + - timing: + - ON for at most 1s + - OFF for at most 1s + - ON for at most 1s + - OFF for at least 0.2s then: - - switch.toggle: relay_1 + - if: + condition: + and: + - wifi.connected: + - api.connected: + # send double click event in case wifi and api are conncected + then: + - homeassistant.event: + event: esphome.button_pressed + data: + title: ${friendly_name} double click + device_name: ${device_name} + click_type: double + # toggle relay in case either wifi or api are not connected + else: + - switch.toggle: sonoff_touch_relay + # long click + - timing: + - ON for at least 1.5s + then: + - if: + condition: + and: + - wifi.connected: + - api.connected: + # send long click event in case wifi and api are conncected + then: + - homeassistant.event: + event: esphome.button_pressed + data: + title: ${friendly_name} long click + device_name: ${device_name} + click_type: long + # toggle relay in case either wifi or api are not connected + else: + - switch.toggle: sonoff_touch_relay + # single click + - timing: + - ON for at most 1s + - OFF for at least 0.5s + then: + - if: + condition: + and: + - wifi.connected: + - api.connected: + # send single click event in case wifi and api are conncected + then: + - homeassistant.event: + event: esphome.button_pressed + data: + title: ${friendly_name} short click + device_name: ${device_name} + click_type: single + # toggle relay in case either wifi or api are not connected + else: + - switch.toggle: sonoff_touch_relay + internal: true + id: button_input switch: - platform: gpio - id: relay_1 + id: sonoff_touch_relay name: "${friendly_name} Relay" pin: GPIO12 diff --git a/esphome/common/sonoff_t2_r2_touch_switch_common.yaml b/esphome/common/sonoff_t2_r2_touch_switch_common.yaml index 1aed729e5..4f6d8974b 100644 --- a/esphome/common/sonoff_t2_r2_touch_switch_common.yaml +++ b/esphome/common/sonoff_t2_r2_touch_switch_common.yaml @@ -26,56 +26,204 @@ binary_sensor: mode: INPUT_PULLUP inverted: true name: "${friendly_name} Touchpad 1" - on_press: - if: - condition: - not: - api.connected: + on_multi_click: + # triple click + - timing: + - ON for at most 1s + - OFF for at most 1s + - ON for at most 1s + - OFF for at most 1s + - ON for at most 1s + - OFF for at least 0.2s then: - - lambda: |- - id(failover_control_1).publish_state(true); - id(failover_control_1).publish_state(false); + - if: + condition: + and: + - wifi.connected: + - api.connected: + # send double click event in case wifi and api are conncected + then: + - homeassistant.event: + event: esphome.button_pressed + data: + title: ${friendly_name} touchpad 1 triple click + device_name: ${device_name}_touchpad_1 + click_type: triple + # toggle relay in case either wifi or api are not connected + else: + - switch.toggle: sonoff_touch_relay_1 + # double click + - timing: + - ON for at most 1s + - OFF for at most 1s + - ON for at most 1s + - OFF for at least 0.2s + then: + - if: + condition: + and: + - wifi.connected: + - api.connected: + # send double click event in case wifi and api are conncected + then: + - homeassistant.event: + event: esphome.button_pressed + data: + title: ${friendly_name} touchpad 1 double click + device_name: ${device_name}_touchpad_1 + click_type: double + # toggle relay in case either wifi or api are not connected + else: + - switch.toggle: sonoff_touch_relay_1 + # long click + - timing: + - ON for at least 1.5s + then: + - if: + condition: + and: + - wifi.connected: + - api.connected: + # send long click event in case wifi and api are conncected + then: + - homeassistant.event: + event: esphome.button_pressed + data: + title: ${friendly_name} touchpad 1 long click + device_name: ${device_name}_touchpad_1 + click_type: long + # toggle relay in case either wifi or api are not connected + else: + - switch.toggle: sonoff_touch_relay_1 + # single click + - timing: + - ON for at most 1s + - OFF for at least 0.5s + then: + - if: + condition: + and: + - wifi.connected: + - api.connected: + # send single click event in case wifi and api are conncected + then: + - homeassistant.event: + event: esphome.button_pressed + data: + title: ${friendly_name} touchpad 1 short click + device_name: ${device_name}_touchpad_1 + click_type: single + # toggle relay in case either wifi or api are not connected + else: + - switch.toggle: sonoff_touch_relay_1 + internal: true + id: button_input_1 - platform: gpio pin: number: GPIO9 mode: INPUT_PULLUP inverted: true name: "${friendly_name} Touchpad 2" - on_press: - if: - condition: - not: - api.connected: + on_multi_click: + # triple click + - timing: + - ON for at most 1s + - OFF for at most 1s + - ON for at most 1s + - OFF for at most 1s + - ON for at most 1s + - OFF for at least 0.2s + then: + - if: + condition: + and: + - wifi.connected: + - api.connected: + # send double click event in case wifi and api are conncected + then: + - homeassistant.event: + event: esphome.button_pressed + data: + title: ${friendly_name} touchpad 2 triple click + device_name: ${device_name}_touchpad_2 + click_type: triple + # toggle relay in case either wifi or api are not connected + else: + - switch.toggle: sonoff_touch_relay_2 + # double click + - timing: + - ON for at most 1s + - OFF for at most 1s + - ON for at most 1s + - OFF for at least 0.2s then: - - lambda: |- - id(failover_control_2).publish_state(true); - id(failover_control_2).publish_state(false); - - platform: template - id: failover_control_1 - on_press: - if: - condition: - not: - api.connected: + - if: + condition: + and: + - wifi.connected: + - api.connected: + # send double click event in case wifi and api are conncected + then: + - homeassistant.event: + event: esphome.button_pressed + data: + title: ${friendly_name} touchpad 2 double click + device_name: ${device_name}_touchpad_2 + click_type: double + # toggle relay in case either wifi or api are not connected + else: + - switch.toggle: sonoff_touch_relay_2 + # long click + - timing: + - ON for at least 1.5s then: - - switch.toggle: relay_1 - - platform: template - id: failover_control_2 - on_press: - if: - condition: - not: - api.connected: + - if: + condition: + and: + - wifi.connected: + - api.connected: + # send long click event in case wifi and api are conncected + then: + - homeassistant.event: + event: esphome.button_pressed + data: + title: ${friendly_name} touchpad 2 long click + device_name: ${device_name}_touchpad_2 + click_type: long + # toggle relay in case either wifi or api are not connected + else: + - switch.toggle: sonoff_touch_relay_2 + # single click + - timing: + - ON for at most 1s + - OFF for at least 0.5s then: - - switch.toggle: relay_2 + - if: + condition: + and: + - wifi.connected: + - api.connected: + # send single click event in case wifi and api are conncected + then: + - homeassistant.event: + event: esphome.button_pressed + data: + title: ${friendly_name} touchpad 2 short click + device_name: ${device_name}_touchpad_2 + click_type: single + # toggle relay in case either wifi or api are not connected + else: + - switch.toggle: sonoff_touch_relay_2 + internal: true + id: button_input_2 switch: - platform: gpio - id: relay_1 + id: sonoff_touch_relay_1 name: "${friendly_name} Relay 1" pin: GPIO12 - platform: gpio - id: relay_2 + id: sonoff_touch_relay_2 name: "${friendly_name} Relay 2" pin: GPIO5 diff --git a/esphome/common/sonoff_touch_switch_common.yaml b/esphome/common/sonoff_touch_switch_common.yaml index b040bd0a2..54f96c61e 100644 --- a/esphome/common/sonoff_touch_switch_common.yaml +++ b/esphome/common/sonoff_touch_switch_common.yaml @@ -23,24 +23,98 @@ binary_sensor: mode: INPUT_PULLUP inverted: true name: "${friendly_name} Touch Pad" - on_press: - if: - condition: - not: - api.connected: + on_multi_click: + # triple click + - timing: + - ON for at most 1s + - OFF for at most 1s + - ON for at most 1s + - OFF for at most 1s + - ON for at most 1s + - OFF for at least 0.2s then: - - lambda: |- - id(failover_control).publish_state(true); - id(failover_control).publish_state(false); - - platform: template - id: failover_control - on_press: - if: - condition: - not: - api.connected: + - if: + condition: + and: + - wifi.connected: + - api.connected: + # send double click event in case wifi and api are conncected + then: + - homeassistant.event: + event: esphome.button_pressed + data: + title: ${friendly_name} triple click + device_name: ${device_name} + click_type: triple + # toggle relay in case either wifi or api are not connected + else: + - switch.toggle: sonoff_touch_relay + # double click + - timing: + - ON for at most 1s + - OFF for at most 1s + - ON for at most 1s + - OFF for at least 0.2s + then: + - if: + condition: + and: + - wifi.connected: + - api.connected: + # send double click event in case wifi and api are conncected + then: + - homeassistant.event: + event: esphome.button_pressed + data: + title: ${friendly_name} double click + device_name: ${device_name} + click_type: double + # toggle relay in case either wifi or api are not connected + else: + - switch.toggle: sonoff_touch_relay + # long click + - timing: + - ON for at least 1.5s + then: + - if: + condition: + and: + - wifi.connected: + - api.connected: + # send long click event in case wifi and api are conncected + then: + - homeassistant.event: + event: esphome.button_pressed + data: + title: ${friendly_name} long click + device_name: ${device_name} + click_type: long + # toggle relay in case either wifi or api are not connected + else: + - switch.toggle: sonoff_touch_relay + # single click + - timing: + - ON for at most 1s + - OFF for at least 0.2s then: - - switch.toggle: sonoff_touch_relay + - if: + condition: + and: + - wifi.connected: + - api.connected: + # send single click event in case wifi and api are conncected + then: + - homeassistant.event: + event: esphome.button_pressed + data: + title: ${friendly_name} short click + device_name: ${device_name} + click_type: single + # toggle relay in case either wifi or api are not connected + else: + - switch.toggle: sonoff_touch_relay + internal: true + id: button_input switch: - platform: gpio diff --git a/esphome/front_hall_sensor.yaml b/esphome/front_hall_sensor.yaml new file mode 100644 index 000000000..85844ca59 --- /dev/null +++ b/esphome/front_hall_sensor.yaml @@ -0,0 +1,6 @@ +substitutions: + device_name: front_hall_sensor + device_description: Front Hall Sensor + friendly_name: Front Hall Sensor + +<<: !include common/esp8266_dht_sensor_common.yaml diff --git a/esphome/garage_lights.yaml b/esphome/garage_lights.yaml index 73cd1c0bb..c50d9d71a 100644 --- a/esphome/garage_lights.yaml +++ b/esphome/garage_lights.yaml @@ -1,6 +1,7 @@ +--- substitutions: device_name: garage_lights device_description: Garage lights friendly_name: Garage lights -<<: !include common/sonoff_basic_switch_common.yaml +<<: !include common/shelly_1_detached_push_button_common.yaml diff --git a/esphome/hallway_sensor.yaml b/esphome/hallway_sensor.yaml deleted file mode 100644 index 00b5f8e70..000000000 --- a/esphome/hallway_sensor.yaml +++ /dev/null @@ -1,6 +0,0 @@ -substitutions: - device_name: hallway_sensor - device_description: Hallway Sensor - friendly_name: Hallway Sensor - -<<: !include common/esp8266_dht_sensor_common.yaml diff --git a/esphome/ili9341_1.yaml b/esphome/ili9341_1.yaml index 720d3d797..6a1f1f2cb 100644 --- a/esphome/ili9341_1.yaml +++ b/esphome/ili9341_1.yaml @@ -86,21 +86,19 @@ image: file: "delete-empty.png" type: RGB24 -xpt2046: - id: touchscreen +touchscreen: + platform: xpt2046 + id: toucharea cs_pin: GPIO12 - irq_pin: GPIO16 - dimension_x: 240 - dimension_y: 320 - on_state: + interrupt_pin: GPIO16 + on_touch: - lambda: |- - if (touched) - ESP_LOGI("cal", "x=%d, y=%d, x_raw=%d, y_raw=%d", - id(touchscreen).x, - id(touchscreen).y, - id(touchscreen).x_raw, - id(touchscreen).y_raw - ); + ESP_LOGI("cal", "x=%d, y=%d, x_raw=%d, y_raw=%d", + id(toucharea).x, + id(toucharea).y, + id(toucharea).x_raw, + id(toucharea).y_raw + ); display: - id: my_display diff --git a/esphome/living_room_switch.yaml b/esphome/living_room_switch.yaml index 282d07382..c1ced2430 100644 --- a/esphome/living_room_switch.yaml +++ b/esphome/living_room_switch.yaml @@ -1,3 +1,4 @@ +--- substitutions: device_name: living_room_switch device_description: Living Room Lightswitch diff --git a/esphome/novoflood_3.yaml b/esphome/novoflood_3.yaml deleted file mode 100644 index ab91308af..000000000 --- a/esphome/novoflood_3.yaml +++ /dev/null @@ -1,6 +0,0 @@ -substitutions: - device_name: novoflood_3 - device_description: 20W RGBWW flood light 3 - friendly_name: 20W RGBWW flood light 3 - -<<: !include common/novoflood_common.yaml diff --git a/esphome/novoflood_4.yaml b/esphome/novoflood_4.yaml deleted file mode 100644 index 28c71c2ca..000000000 --- a/esphome/novoflood_4.yaml +++ /dev/null @@ -1,6 +0,0 @@ -substitutions: - device_name: novoflood_4 - device_description: 20W RGBWW flood light 4 - friendly_name: 20W RGBWW flood light 4 - -<<: !include common/novoflood_common.yaml diff --git a/esphome/novoflood_5.yaml b/esphome/novoflood_5.yaml deleted file mode 100644 index 6288a1696..000000000 --- a/esphome/novoflood_5.yaml +++ /dev/null @@ -1,6 +0,0 @@ -substitutions: - device_name: novoflood_5 - device_description: 20W RGBWW flood light 5 - friendly_name: 20W RGBWW flood light 5 - -<<: !include common/novoflood_common.yaml diff --git a/esphome/novoflood_6.yaml b/esphome/novoflood_6.yaml deleted file mode 100644 index 18ca7e5d1..000000000 --- a/esphome/novoflood_6.yaml +++ /dev/null @@ -1,6 +0,0 @@ -substitutions: - device_name: novoflood_6 - device_description: 20W RGBWW flood light 6 - friendly_name: 20W RGBWW flood light 6 - -<<: !include common/novoflood_common.yaml diff --git a/esphome/novoflood_7.yaml b/esphome/novoflood_7.yaml deleted file mode 100644 index 2620df3fc..000000000 --- a/esphome/novoflood_7.yaml +++ /dev/null @@ -1,6 +0,0 @@ -substitutions: - device_name: novoflood_7 - device_description: 20W RGBWW flood light 7 - friendly_name: 20W RGBWW flood light 7 - -<<: !include common/novoflood_common.yaml diff --git a/esphome/novoflood_8.yaml b/esphome/novoflood_8.yaml deleted file mode 100644 index 62f510370..000000000 --- a/esphome/novoflood_8.yaml +++ /dev/null @@ -1,6 +0,0 @@ -substitutions: - device_name: novoflood_8 - device_description: 20W RGBWW flood light 8 - friendly_name: 20W RGBWW flood light 8 - -<<: !include common/novoflood_common.yaml diff --git a/esphome/tin-hut-sensor.yaml b/esphome/tin-hut-sensor.yaml new file mode 100644 index 000000000..2c08678d2 --- /dev/null +++ b/esphome/tin-hut-sensor.yaml @@ -0,0 +1,6 @@ +substitutions: + device_name: "tin-hut-sensor" + device_description: Tin Hut Sensor + friendly_name: Tin Hut Sensor + +<<: !include common/esp8266_dht_sensor_common.yaml diff --git a/esphome/utility_sensor.yaml b/esphome/utility_sensor.yaml deleted file mode 100644 index 14c2d5d1f..000000000 --- a/esphome/utility_sensor.yaml +++ /dev/null @@ -1,6 +0,0 @@ -substitutions: - device_name: utility_room_sensor - device_description: Utility Room Sensor - friendly_name: Utility Room Sensor - -<<: !include common/esp8266_dht_sensor_common.yaml diff --git a/groups.yaml b/groups.yaml index 9d3659478..45a2a6cec 100644 --- a/groups.yaml +++ b/groups.yaml @@ -7,7 +7,6 @@ default_view: - sensor.electricity_energy_usage - sensor.house_average_temperature - sensor.house_average_humidity - - calendar.holiday_mode - calendar.next_bin - sensor.next_bin - sensor.tmo @@ -33,16 +32,16 @@ kitchen: - light.kitchen - media_player.kitchen -utility_room: - name: Utility Room +front_hall: + name: Front Hall entities: - - light.utility_room - - sensor.utility_room_sensor_temperature - - sensor.utility_room_sensor_humidity - - sensor.utility_room_sensor_signal_level - - sensor.utility_room_lightlevel - - binary_sensor.utility_room_motion - - binary_sensor.utility_room_door + - light.front_hall + - sensor.front_hall_sensor_temperature + - sensor.front_hall_sensor_humidity + - sensor.front_hall_sensor_signal_level + - sensor.front_hall_lightlevel + - binary_sensor.front_hall_motion + - binary_sensor.front_hall_door living_room: name: Living Room @@ -60,8 +59,8 @@ living_room: living_room_lights: name: Living Room Lights entities: - - light.uplighter - - light.sofa_overhead + - light.living_room_1 + - light.living_room_2 - light.edison_lamp - light.lava_lamp - light.star_burst @@ -160,8 +159,8 @@ study_lighting: hall: name: Hall lights entities: - - light.hall_bathroom - - light.hall_bedrooms + - light.hallway_bathroom + - light.hallway_bedrooms bathroom: name: Bathroom @@ -171,7 +170,7 @@ bathroom: hall_view: name: Hall entities: - - group.hall + - light.hall - binary_sensor.hall_rooms_motion - sensor.hall_rooms_motion - binary_sensor.hall_door_motion @@ -188,7 +187,7 @@ outside: - sun.sun - binary_sensor.outside_front_motion - binary_sensor.outside_driveway_motion - - binary_sensor.outside_utility_room_motion + - binary_sensor.front_door_motion - group.climate - group.outside_lights - sensor.driveway_floodlights_signal_level @@ -207,6 +206,7 @@ outside_lights: - light.back_floodlights - light.mini_deck_floodlight - light.decking_lights + - light.front_door_dome climate: name: Climate diff --git a/lights.yaml b/lights.yaml index dd8cc393f..f82d889f4 100644 --- a/lights.yaml +++ b/lights.yaml @@ -50,6 +50,10 @@ name: "Candle Arch" entity_id: switch.candle_arch +- platform: switch + name: "Outside Decorations" + entity_id: switch.outside_decorations + - platform: group name: Decking Lights entities: diff --git a/openalpr.yaml b/openalpr.yaml deleted file mode 100644 index ca994f395..000000000 --- a/openalpr.yaml +++ /dev/null @@ -1,5 +0,0 @@ -- platform: openalpr_local - region: eu - confidence: 80.0 - source: - - entity_id: camera.driveway diff --git a/packages/adaptive_lighting.yaml b/packages/adaptive_lighting.yaml index 66ba8af56..1f1ad1f86 100644 --- a/packages/adaptive_lighting.yaml +++ b/packages/adaptive_lighting.yaml @@ -6,10 +6,11 @@ adaptive_lighting: lights: - light.hall - light.boot_room + - light.front_hall prefer_rgb_color: false - transition: 5 # seconds + transition: 45 # seconds initial_transition: 5 # seconds - interval: 90 # seconds + interval: 30 # seconds min_brightness: 15 # percentage max_brightness: 100 # percentage min_color_temp: 2000 @@ -28,11 +29,11 @@ adaptive_lighting: - light.ensuite - light.master_bedroom prefer_rgb_color: false - transition: 5 # seconds + transition: 45 # seconds initial_transition: 5 # seconds - interval: 90 # seconds + interval: 30 # seconds min_brightness: 15 # percentage - max_brightness: 80 # percentage + max_brightness: 100 # percentage min_color_temp: 2000 max_color_temp: 8500 sleep_brightness: 1 @@ -48,11 +49,11 @@ adaptive_lighting: lights: - light.guest_bedroom prefer_rgb_color: false - transition: 5 # seconds + transition: 45 # seconds initial_transition: 5 # seconds - interval: 90 # seconds + interval: 30 # seconds min_brightness: 15 # percentage - max_brightness: 80 # percentage + max_brightness: 100 # percentage min_color_temp: 2000 max_color_temp: 8500 sleep_brightness: 1 @@ -68,11 +69,11 @@ adaptive_lighting: lights: - light.master_bathroom prefer_rgb_color: false - transition: 5 # seconds + transition: 45 # seconds initial_transition: 5 # seconds - interval: 90 # seconds + interval: 30 # seconds min_brightness: 15 # percentage - max_brightness: 80 # percentage + max_brightness: 100 # percentage min_color_temp: 2000 max_color_temp: 8500 sleep_brightness: 1 @@ -89,31 +90,11 @@ adaptive_lighting: - light.kitchen - light.kitchen_cabinets prefer_rgb_color: false - transition: 5 # seconds + transition: 45 # seconds initial_transition: 5 # seconds - interval: 90 # seconds + interval: 30 # seconds min_brightness: 15 # percentage - max_brightness: 80 # percentage - min_color_temp: 2000 - max_color_temp: 8500 - sleep_brightness: 1 - sleep_color_temp: 1500 - # sunrise_time: "08:00:00" # override the sunrise time - # sunrise_offset: '00:00:00' - # sunset_time: - sunset_offset: '00:00:00' # in seconds or '00:15:00' - take_over_control: true - only_once: false - - - name: "Utility Room adaptive lighting" - lights: - - light.utility_room - prefer_rgb_color: false - transition: 5 # seconds - initial_transition: 5 # seconds - interval: 90 # seconds - min_brightness: 15 # percentage - max_brightness: 80 # percentage + max_brightness: 100 # percentage min_color_temp: 2000 max_color_temp: 8500 sleep_brightness: 1 @@ -127,19 +108,15 @@ adaptive_lighting: - name: "Living Room adaptive lighting" lights: - - light.sofa_overhead - - light.dining_table_overhead - - light.dining_nook - - light.uplighter - - light.sideboard - - light.train_cabinets + - light.living_room + - light.dining_nook_group prefer_rgb_color: false - transition: 5 # seconds + transition: 45 # seconds initial_transition: 5 # seconds - interval: 90 # seconds + interval: 30 # seconds min_brightness: 15 # percentage - max_brightness: 80 # percentage - min_color_temp: 2000 + max_brightness: 100 # percentage + min_color_temp: 2300 # Might be able to reduce to 2200 max_color_temp: 8500 sleep_brightness: 1 sleep_color_temp: 1500 diff --git a/packages/alarm.yaml b/packages/alarm.yaml index 04b3b8364..5fe24d7a6 100644 --- a/packages/alarm.yaml +++ b/packages/alarm.yaml @@ -1,20 +1,21 @@ +--- automation: - alias: Alarm sensor state change notification trigger: - platform: state entity_id: - - binary_sensor.back_door - - binary_sensor.front_door - - binary_sensor.patio_door - - binary_sensor.ensuite_window - - binary_sensor.master_bedroom_window - - binary_sensor.guest_bedroom_window - - binary_sensor.study_window - - binary_sensor.craft_room_window - - binary_sensor.bathroom_window - - binary_sensor.dining_table_window - - binary_sensor.kitchen_window - - binary_sensor.utility_room_window + - binary_sensor.back_door + - binary_sensor.front_door + - binary_sensor.patio_door + - binary_sensor.ensuite_window + - binary_sensor.master_bedroom_window + - binary_sensor.guest_bedroom_window + - binary_sensor.study_window + - binary_sensor.craft_room_window + - binary_sensor.bathroom_window + - binary_sensor.dining_table_window + - binary_sensor.kitchen_window + - binary_sensor.utility_room_window action: - service: media_player.volume_set entity_id: media_player.kitchen diff --git a/packages/bin_reminder_tts.yaml b/packages/bin_reminder_tts.yaml index 231004b49..07b0167de 100644 --- a/packages/bin_reminder_tts.yaml +++ b/packages/bin_reminder_tts.yaml @@ -22,19 +22,22 @@ automation: before: '09:00:00' weekday: - mon - - fri + # - fri - condition: time after: '16:00:00' before: '18:00:00' weekday: - sun - - thu + # - thu - condition: state entity_id: input_boolean.bin_reminder state: 'on' trigger: - platform: state - entity_id: binary_sensor.utility_room_door + entity_id: binary_sensor.front_hall_door + to: 'on' + - platform: state + entity_id: binary_sensor.front_hall_motion to: 'on' action: - service: notify.alexa_media @@ -42,9 +45,9 @@ automation: target: - media_player.kitchen data: - type: announce + type: "tts" # method: all - message: "Hello! It's {{ ['Monday','Tuesday','Wednesday','Thursday','Friday','Saturday','Sunday'][now().weekday()] }}. Don't forget to take the {{ states.calendar.next_bin.attributes.message }} out. If you wish to disable this message, just ask me to 'turn off bin reminder'" + message: "Hello! It's {{ ['Monday','Tuesday','Wednesday','Thursday','Friday','Saturday','Sunday'][now().weekday()] }}. Don't forget to take the {{ states.calendar.garbage_collection.attributes.message }} out. If you wish to disable this message, just ask me to 'turn off bin reminder'" - alias: Bin reminder reset condition: diff --git a/packages/boot_room.yaml b/packages/boot_room.yaml index a0bb66ebf..296af72f8 100644 --- a/packages/boot_room.yaml +++ b/packages/boot_room.yaml @@ -1,9 +1,13 @@ +--- automation: - alias: Boot Room light toggle + # Can be improved, examples at https://github.com/TheFes/HA-configuration/blob/main/include/automation/01_first_floor/floris/shelly_floris.yaml trigger: - - platform: state - entity_id: binary_sensor.boot_room_switch_touch_pad - to: 'on' + - platform: event + event_type: esphome.button_pressed + event_data: + device_name: bootroom_switch + click_type: single action: - service: switch.turn_on entity_id: @@ -14,13 +18,15 @@ automation: data_template: name: EVENT message: "Toggling boot room light" + entity_id: light.boot_room + domain: light - alias: Boot room light motion initial_state: true trigger: - - platform: state - entity_id: binary_sensor.boot_room_motion - to: 'on' + - platform: state + entity_id: binary_sensor.boot_room_motion + to: 'on' # Sensor attached to wrong door at the moment... # - platform: state # entity_id: binary_sensor.boot_room_door @@ -36,6 +42,12 @@ automation: entity_id: binary_sensor.home_occupied state: "on" action: + - service: logbook.log + data_template: + name: EVENT + message: "Turning boot room lights on" + entity_id: light.boot_room + domain: light - service: light.turn_on data_template: entity_id: light.boot_room @@ -46,15 +58,21 @@ automation: entity_id: sensor.average_external_light_level above: 1000 action: - service: homeassistant.turn_off - entity_id: light.boot_room + - service: logbook.log + data_template: + name: EVENT + message: "Turning boot room lights off" + entity_id: light.boot_room + domain: light + - service: homeassistant.turn_off + entity_id: light.boot_room - alias: Boot room light motion - night view initial_state: true trigger: - - platform: state - entity_id: binary_sensor.boot_room_motion - to: 'on' + - platform: state + entity_id: binary_sensor.boot_room_motion + to: 'on' # Sensor attached to wrong door at the moment... # - platform: state # entity_id: binary_sensor.boot_room_door @@ -67,6 +85,12 @@ automation: entity_id: sensor.average_external_light_level below: 1000 action: + - service: logbook.log + data_template: + name: EVENT + message: "Turning boot room lights to night mode" + entity_id: light.boot_room + domain: light - service: light.turn_on data_template: entity_id: light.boot_room @@ -74,13 +98,41 @@ automation: transition: 10 rgb_color: [255, 0, 0] + - alias: Boot room motion - 2 minute timeout + trigger: + - platform: state + entity_id: binary_sensor.boot_room_motion + to: 'off' + for: + minutes: 2 + condition: + - condition: state + entity_id: sensor.time_of_day + state: "Night" + action: + - service: logbook.log + data_template: + name: EVENT + message: "Turning boot room lights off" + entity_id: light.boot_room + domain: light + - service: light.turn_off + entity_id: light.boot_room + + - alias: Boot room motion - 10 minute timeout trigger: - - platform: state - entity_id: binary_sensor.boot_room_motion - to: 'off' - for: - minutes: 10 + - platform: state + entity_id: binary_sensor.boot_room_motion + to: 'off' + for: + minutes: 10 action: - - service: light.turn_off - entity_id: light.boot_room + - service: logbook.log + data_template: + name: EVENT + message: "Turning boot room lights off" + entity_id: light.boot_room + domain: light + - service: light.turn_off + entity_id: light.boot_room diff --git a/packages/cheerlights.yaml b/packages/cheerlights.yaml index 631ebcee3..6065360c7 100644 --- a/packages/cheerlights.yaml +++ b/packages/cheerlights.yaml @@ -1,29 +1,25 @@ +--- light: - platform: group name: Glow Orbs entities: - - light.sense_gloworb_1_ring - - light.sense_gloworb_2_ring - - light.sense_gloworb_3_ring + - light.sense_gloworb_1_ring + - light.sense_gloworb_2_ring + - light.sense_gloworb_3_ring -automation: - - - alias: Cheerlights scene - trigger: - platform: mqtt - topic: cheerlightsRGB - action: - - service: scene.create - data_template: - scene_id: cheerlights_state - entities: - light.under_bed_lights: - state: "on" - rgb_color: - - "{{ trigger.payload[1:3] | int(0,16) }}" - - "{{ trigger.payload[3:5] | int(0,16) }}" - - "{{ trigger.payload[-2:] | int(0,16) }}" +mqtt: + sensor: + - name: cheerlights_red + state_topic: cheerlightsRGB + value_template: '{{ value[1:3] | int(0,16) }}' + - name: cheerlights_green + state_topic: cheerlightsRGB + value_template: '{{ value[3:5] | int(0,16) }}' + - name: cheerlights_blue + state_topic: cheerlightsRGB + value_template: '{{ value[-2:] | int(0,16) }}' +automation: - alias: Under Bed Cheerlights Motion trigger: - platform: state @@ -34,72 +30,78 @@ automation: after: '23:00:00' before: '07:00:00' action: - - service: scene.turn_on - entity_id: scene.cheerlights_state + - service_template: light.turn_on + data_template: + brightness: 255 + rgb_color: + - "{{ states('sensor.cheerlights_red') }}" + - "{{ states('sensor.cheerlights_green') }}" + - "{{ states('sensor.cheerlights_blue') }}" + entity_id: light.under_bed_lights data: transition: 2 - alias: Under Bed Cheerlights Motion - 2 minute timeout trigger: - - platform: state - entity_id: binary_sensor.under_bed_motion_sensor - to: 'off' - for: - minutes: 2 + - platform: state + entity_id: binary_sensor.under_bed_motion_sensor + to: 'off' + for: + minutes: 2 condition: - condition: time after: '23:00:00' before: '07:00:00' action: - - service: light.turn_off + service_template: light.turn_off entity_id: light.under_bed_lights data: transition: 30 - - alias: Cheerlights + - alias: Cheerlights - Glow Orbs trigger: platform: mqtt topic: cheerlightsRGB condition: - - condition: time - after: '06:00:00' - before: '01:00:00' + - condition: time + after: '06:00:00' + before: '01:00:00' action: - service_template: light.turn_on - data_template: - brightness_pct: 50 - rgb_color: - - "{{ trigger.payload[1:3] | int(0,16) }}" - - "{{ trigger.payload[3:5] | int(0,16) }}" - - "{{ trigger.payload[-2:] | int(0,16) }}" - entity_id: - - light.sense_gloworb_1_ring - - light.sense_gloworb_2_ring - - light.sense_gloworb_3_ring + - service_template: light.turn_on + data_template: + brightness: 128 + rgb_color: + - "{{ states('sensor.cheerlights_red') }}" + - "{{ states('sensor.cheerlights_green') }}" + - "{{ states('sensor.cheerlights_blue') }}" + entity_id: + - light.sense_gloworb_1_ring + - light.sense_gloworb_2_ring + - light.sense_gloworb_3_ring - - alias: Cheerlights Bed + - alias: Cheerlights - Under Bed trigger: platform: mqtt topic: cheerlightsRGB condition: - - condition: time - after: '16:00:00' - before: '23:00:00' - - condition: state - entity_id: input_boolean.goodnight_process - state: "off" + - condition: time + after: '16:00:00' + before: '23:00:00' + - condition: state + entity_id: input_boolean.goodnight_process + state: "off" action: - service_template: light.turn_on - data_template: - brightness_pct: 100 - rgb_color: - - "{{ trigger.payload[1:3] | int(0,16) }}" - - "{{ trigger.payload[3:5] | int(0,16) }}" - - "{{ trigger.payload[-2:] | int(0,16) }}" - entity_id: - - light.under_bed_lights + - service_template: light.turn_on + data_template: + brightness: 255 + rgb_color: + - "{{ states('sensor.cheerlights_red') }}" + - "{{ states('sensor.cheerlights_green') }}" + - "{{ states('sensor.cheerlights_blue') }}" + entity_id: + - light.under_bed_lights - - alias: Cheerlights Outside + - alias: Cheerlights - Outside trigger: platform: mqtt topic: cheerlightsRGB @@ -115,14 +117,16 @@ automation: before: '23:00:00' action: - service: light.turn_on + # Adjust the RGB values, and keep existing white channels data_template: entity_id: light.decking_lights - brightness_pct: 66 - white_value: 0 - rgb_color: - - "{{ trigger.payload[1:3] | int(0,16) }}" - - "{{ trigger.payload[3:5] | int(0,16) }}" - - "{{ trigger.payload[-2:] | int(0,16) }}" + brightness: 170 + rgbww_color: + - "{{ states('sensor.cheerlights_red') }}" + - "{{ states('sensor.cheerlights_green') }}" + - "{{ states('sensor.cheerlights_blue') }}" + - "{{ state_attr('light.decking_lights', 'rgbww_color')[3] | int(0,16) }}" + - "{{ state_attr('light.decking_lights', 'rgbww_color')[4] | int(0,16) }}" - alias: Cheerlights - off trigger: diff --git a/packages/christmas_lights.yaml b/packages/christmas_lights.yaml index 11ccefcc8..78af58540 100644 --- a/packages/christmas_lights.yaml +++ b/packages/christmas_lights.yaml @@ -1,3 +1,4 @@ +--- group: christmas_lights: name: Christmas Lights diff --git a/packages/climate.yaml b/packages/climate.yaml index 56887ffad..2e0e4fa33 100644 --- a/packages/climate.yaml +++ b/packages/climate.yaml @@ -4,6 +4,32 @@ # https://www.home-assistant.io/integrations/generic_thermostat/ # Generic thermostat currently only supports 'heat', 'cool' and 'off' +binary_sensor: + - platform: workday + name: Workday + country: GB + - platform: workday + name: Workday tomorrow + country: GB + days_offset: 1 + - platform: group + # Openings that should prevent the heating from coming on + name: Climate Openings + device_class: opening + entities: + - binary_sensor.back_door + - binary_sensor.front_door + - binary_sensor.patio_door + - binary_sensor.ensuite_window + - binary_sensor.master_bedroom_window + - binary_sensor.guest_bedroom_window + - binary_sensor.study_window + - binary_sensor.craft_room_window + - binary_sensor.bathroom_window + - binary_sensor.dining_table_window + - binary_sensor.kitchen_window + - binary_sensor.utility_room_window + group: call_for_heat: # Add zones here. Essentially a glorified OR condition @@ -21,23 +47,11 @@ input_boolean: name: Call for heat - Guest Room icon: mdi:radiator -sensor: - - platform: season - type: meteorological - -binary_sensor: - - platform: workday - name: Workday - country: GB - - platform: workday - name: Workday tomorrow - country: GB - days_offset: 1 - automation: - - alias: "Call for heat - demand" - description: Turn on boiler relay if there's a call for heat + description: >- + Turn on boiler relay if there's a call for heat + and all the openings are shut trigger: platform: time_pattern seconds: 30 @@ -45,6 +59,11 @@ automation: - condition: state entity_id: group.call_for_heat state: 'on' + - condition: state + entity_id: binary_sensor.climate_openings + state: 'off' + for: + minutes: 5 action: - service: homeassistant.turn_on entity_id: switch.boiler_valve_controls_relay_2 @@ -55,9 +74,16 @@ automation: platform: time_pattern seconds: 30 condition: - - condition: state - entity_id: group.call_for_heat - state: 'off' + condition: or + conditions: + - condition: state + entity_id: group.call_for_heat + state: 'off' + - condition: state + entity_id: binary_sensor.climate_openings + state: 'on' + for: + minutes: 5 action: - service: homeassistant.turn_off entity_id: switch.boiler_valve_controls_relay_2 diff --git a/packages/device_alerts.yaml b/packages/device_alerts.yaml index 6ddf8ce67..de9378fd5 100644 --- a/packages/device_alerts.yaml +++ b/packages/device_alerts.yaml @@ -4,15 +4,15 @@ automation: - platform: state entity_id: - sensor.kitchen_temperature - - binary_sensor.utility_room_sensor_status + - binary_sensor.front_hall_sensor_status - sensor.garage_temperature - binary_sensor.hall_door_motion - binary_sensor.hall_rooms_motion - binary_sensor.ensuite_motion - binary_sensor.living_room_motion - binary_sensor.kitchen_motion - - binary_sensor.utility_room_motion - - binary_sensor.outside_utility_room_motion + - binary_sensor.front_hall_motion + - binary_sensor.front_door_motion - binary_sensor.washing_machine_power_plug_status - binary_sensor.dishwasher_power_plug_status - binary_sensor.shower_pump_power_plug_status @@ -46,10 +46,8 @@ automation: - light.guest_bedroom - light.master_bedroom - light.craft_room - - light.hall_bedrooms - - light.hall_entrance - - light.hall_bedrooms - - light.hall_bathroom + - light.hallway_bedrooms + - light.hallway_bathroom - light.kitchen_cabinets - light.kitchen - light.boot_room diff --git a/packages/ensuite.yaml b/packages/ensuite.yaml index b98995b75..027bcee43 100644 --- a/packages/ensuite.yaml +++ b/packages/ensuite.yaml @@ -1,13 +1,17 @@ --- automation: - alias: Ensuite light toggle + # Can be improved, examples at https://github.com/TheFes/HA-configuration/blob/main/include/automation/01_first_floor/floris/shelly_floris.yaml trigger: - - platform: state - entity_id: binary_sensor.ensuite_switch_touch_pad - to: 'on' + - platform: event + event_type: esphome.button_pressed + event_data: + device_name: ensuite_switch + click_type: single action: - service: switch.turn_on - entity_id: switch.ensuite_switch_relay + entity_id: + - switch.ensuite_switch_relay - service: light.toggle data_template: entity_id: > @@ -58,6 +62,11 @@ automation: entity_id: sensor.average_external_light_level below: 1000 action: + - service: logbook.log + data_template: + name: EVENT + message: "Shower is on" + entity_id: sensor.shower_pump_power_plug_power - service: light.turn_on data_template: entity_id: > @@ -75,10 +84,10 @@ automation: color_temp: > 200 # https://developers.home-assistant.io/docs/core/entity/climate/ - - service: climate.set_preset_mode - data_template: - entity_id: climate.hot_water - preset_mode: 'boost' + # - service: climate.set_preset_mode + # data_template: + # entity_id: climate.hot_water + # preset_mode: 'boost' - service: notify.alexa_media data: target: @@ -97,11 +106,16 @@ automation: for: minutes: 10 action: - # https://developers.home-assistant.io/docs/core/entity/climate/ - - service: climate.set_preset_mode + - service: logbook.log data_template: - entity_id: climate.hot_water - preset_mode: 'eco' + name: EVENT + message: "Shower is off" + entity_id: sensor.shower_pump_power_plug_power + # https://developers.home-assistant.io/docs/core/entity/climate/ + # - service: climate.set_preset_mode + # data_template: + # entity_id: climate.hot_water + # preset_mode: 'eco' - alias: Ensuite motion - night timeout trigger: diff --git a/packages/front_hall.yaml b/packages/front_hall.yaml new file mode 100644 index 000000000..2d3645fa5 --- /dev/null +++ b/packages/front_hall.yaml @@ -0,0 +1,66 @@ +--- +automation: + - alias: Front hall light on + trigger: + - platform: state + entity_id: + - binary_sensor.front_hall_door + - binary_sensor.front_hall_motion + to: 'on' + from: 'off' + condition: + - condition: numeric_state + entity_id: sensor.average_external_light_level + below: 1000 + - condition: state + entity_id: binary_sensor.home_occupied + state: "on" + action: + - service: logbook.log + data_template: + name: EVENT + message: "Turning front hall lights on" + entity_id: light.front_hall + domain: light + - service: homeassistant.turn_on + data_template: + entity_id: + - light.front_hall + + - alias: Front hall - 2 minute timeout + trigger: + - platform: state + entity_id: binary_sensor.front_hall_motion + to: 'off' + for: + minutes: 2 + condition: + - condition: state + entity_id: sensor.time_of_day + state: "Night" + action: + - service: logbook.log + data_template: + name: EVENT + message: "Turning front hall lights off" + entity_id: light.front_hall + domain: light + - service: light.turn_off + entity_id: light.front_hall + + - alias: Front hall - 10 minute timeout + trigger: + - platform: state + entity_id: binary_sensor.front_hall_motion + to: 'off' + for: + minutes: 10 + action: + - service: logbook.log + data_template: + name: EVENT + message: "Turning front hall lights off" + entity_id: light.front_hall + domain: light + - service: light.turn_off + entity_id: light.front_hall diff --git a/packages/garage.yaml b/packages/garage.yaml index b18ee874d..c2190f966 100644 --- a/packages/garage.yaml +++ b/packages/garage.yaml @@ -1,3 +1,4 @@ +--- automation: - alias: Garage motion - Lights on initial_state: true @@ -11,11 +12,23 @@ automation: - alias: Garage motion - 10 minute timeout trigger: - - platform: state - entity_id: binary_sensor.garage_motion - to: 'off' - for: - minutes: 10 + - platform: state + entity_id: binary_sensor.garage_motion + to: 'off' + for: + minutes: 10 action: - - service: light.turn_off - entity_id: light.garage_lights + - service: light.turn_off + entity_id: light.garage_lights + + - alias: Garage button - toggle + # Can be improved, examples at https://github.com/TheFes/HA-configuration/blob/main/include/automation/01_first_floor/floris/shelly_floris.yaml + trigger: + - platform: event + event_type: esphome.button_pressed + event_data: + device_name: garage_lights + click_type: single + action: + - service: light.toggle + entity_id: light.garage_lights diff --git a/packages/goodnight.yaml b/packages/goodnight.yaml index 60b81f5a3..f1e602fcb 100644 --- a/packages/goodnight.yaml +++ b/packages/goodnight.yaml @@ -1,3 +1,4 @@ +--- homeassistant: ## This doesn't seem to work. It needs to be surfaced in configuration.yaml customize: @@ -17,26 +18,31 @@ automation: entity_id: input_boolean.goodnight_process to: 'on' action: + - service: logbook.log + data_template: + name: EVENT + message: "Triggering goodnight mode" + entity_id: input_boolean.goodnight_process + domain: input_boolean - service: cover.close_cover entity_id: - - cover.patio_blinds + - cover.patio_blinds - service: homeassistant.turn_off entity_id: - - group.living_room - - group.living_room_lights - - group.dining_nook - - group.outside_lights - - group.utility_room - - group.kitchen - - group.hall - - group.dining_nook_lights - - light.boot_room - - light.twig_lights - - light.glow_orbs - - light.under_bed_lights - - group.bedroom_1 - - group.bedroom_3 - - group.bedroom_4 + - light.living_room + - light.dining_nook_group + - light.art + - group.outside_lights + - group.front_hall + - group.kitchen + - light.hall + - light.boot_room + - light.twig_lights + - light.glow_orbs + - light.under_bed_lights + - group.bedroom_1 + - group.bedroom_3 + - group.bedroom_4 - condition: or # If guests are staying, don't turn off their bedroom lights conditions: @@ -45,7 +51,7 @@ automation: state: 'off' - service: homeassistant.turn_off entity_id: - - group.bedroom_2 + - group.bedroom_2 - alias: Goodnight process reset trigger: @@ -56,5 +62,7 @@ automation: data_template: name: EVENT message: "Resetting goodnight mode" + entity_id: input_boolean.goodnight_process + domain: input_boolean - service: input_boolean.turn_off entity_id: input_boolean.goodnight_process diff --git a/packages/hallway.yaml b/packages/hallway.yaml index 32565d891..855a86ecb 100644 --- a/packages/hallway.yaml +++ b/packages/hallway.yaml @@ -1,12 +1,18 @@ --- automation: - alias: Hallway light toggle + # Can be improved, examples at https://github.com/TheFes/HA-configuration/blob/main/include/automation/01_first_floor/floris/shelly_floris.yaml trigger: - - platform: state - entity_id: - - binary_sensor.hall_single_switch_touch_pad - - binary_sensor.hall_dual_switch_touchpad_2 - to: 'on' + - platform: event + event_type: esphome.button_pressed + event_data: + device_name: hall_single_switch + click_type: single + - platform: event + event_type: esphome.button_pressed + event_data: + device_name: hall_dual_switch_touchpad_2 + click_type: single action: - service: switch.turn_on entity_id: @@ -18,7 +24,7 @@ automation: - service: logbook.log data_template: name: EVENT - message: "Toggling hallway light" + message: "Toggling hallway lights" - alias: Hallway light motion initial_state: true @@ -36,9 +42,14 @@ automation: entity_id: binary_sensor.home_occupied state: "on" action: + - service: logbook.log + data_template: + name: EVENT + message: "Turning hall lights on" + entity_id: light.hall - service: light.turn_on data_template: - entity_id: group.hall + entity_id: light.hall - alias: Hallway motion - 2 minute night timeout trigger: @@ -54,8 +65,13 @@ automation: entity_id: sensor.time_of_day state: "Night" action: + - service: logbook.log + data_template: + name: EVENT + message: "Turning hall lights off" + entity_id: light.hall - service: light.turn_off - entity_id: group.hall + entity_id: light.hall - alias: Hallway motion - 10 minute timeout trigger: @@ -67,5 +83,10 @@ automation: for: minutes: 10 action: + - service: logbook.log + data_template: + name: EVENT + message: "Turning hall lights off" + entity_id: light.hall - service: light.turn_off - entity_id: group.hall + entity_id: light.hall diff --git a/packages/kitchen.yaml b/packages/kitchen.yaml index 0ae3c67c3..40e0755cf 100644 --- a/packages/kitchen.yaml +++ b/packages/kitchen.yaml @@ -1,4 +1,13 @@ --- +input_number: + kitchen_light_level_trigger: + name: Kitchen light level trigger + icon: mdi:sun-angle-outline + unit_of_measurement: lx + min: 0 + max: 10000 + step: 1 + automation: - alias: Kitchen motion trigger: @@ -8,7 +17,9 @@ automation: condition: - condition: numeric_state entity_id: sensor.average_external_light_level - below: 1000 + below: input_number.kitchen_light_level_trigger + # for: + # minutes: 10 action: - service: homeassistant.turn_on data_template: diff --git a/packages/living_room_blinds.yaml b/packages/living_room_blinds.yaml index 6e0febc4c..4ad9ec7dd 100644 --- a/packages/living_room_blinds.yaml +++ b/packages/living_room_blinds.yaml @@ -26,40 +26,29 @@ cover: automation: - alias: Control Blinds trigger: - - platform: event - event_type: deconz_event - event_data: - id: tradfri_open_close_switch - device_id: 402b382edcbcbd22f65129957ce935f8 - - platform: event - event_type: deconz_event - event_data: - id: patio_blinds_switch_2 - device_id: 6ce0802a8aef13556ad7c2b8cb43720b + - platform: mqtt + topic: zigbee2mqtt/zigbee2mqtt/Blinds Remote 2/action + - platform: mqtt + topic: "zigbee2mqtt/zigbee2mqtt/Blinds Remote 2/action" + action: - variables: - event: "{{ trigger.event.data.event }}" + command: "{{ trigger.payload }}" - choose: - conditions: - - "{{ event == 1002 }}" + - '{{ command == "open" }}' sequence: - service: cover.open_cover target: entity_id: cover.patio_blinds - conditions: - - "{{ event == 2002 }}" + - '{{ command == "close" }}' sequence: - service: cover.close_cover target: entity_id: cover.patio_blinds - conditions: - - "{{ event == 1003 }}" - sequence: - - service: cover.stop_cover - target: - entity_id: cover.patio_blinds - - conditions: - - "{{ event == 2003 }}" + - '{{ command == "stop" }}' sequence: - service: cover.stop_cover target: diff --git a/packages/living_room_lights.yaml b/packages/living_room_lights.yaml index 5d0b0a153..58a6c18a3 100644 --- a/packages/living_room_lights.yaml +++ b/packages/living_room_lights.yaml @@ -1,9 +1,51 @@ +--- +homeassistant: + ## This doesn't seem to work. It needs to be surfaced in configuration.yaml + customize: + light.art: + icon: mdi:lightbulb-group + + light.living_room: + icon: mdi:lightbulb-group + + light.dining_nook_group: + icon: mdi:lightbulb-group + +input_number: + living_room_light_level_trigger: + name: Living Room light level trigger + icon: mdi:sun-angle-outline + unit_of_measurement: lx + min: 0 + max: 10000 + step: 1 + dining_nook_light_level_trigger: + name: Dining nook light level trigger + icon: mdi:sun-angle-outline + unit_of_measurement: lx + min: 0 + max: 10000 + step: 1 + +light: + - platform: group + name: Dining Nook Group + unique_id: dining_nook_group + entities: + - light.art + - light.sideboard + - light.dining_table + - light.train_cabinets + automation: - alias: Living room light toggle + # Can be improved, examples at https://github.com/TheFes/HA-configuration/blob/main/include/automation/01_first_floor/floris/shelly_floris.yaml trigger: - - platform: state - entity_id: binary_sensor.living_room_switch_touch_pad - to: 'on' + - platform: event + event_type: esphome.button_pressed + event_data: + device_name: living_room_switch + click_type: single action: - service: switch.turn_on entity_id: @@ -17,6 +59,27 @@ automation: name: EVENT message: "Toggling living room lights" + - alias: Dining nook light toggle + # Can be improved, examples at https://github.com/TheFes/HA-configuration/blob/main/include/automation/01_first_floor/floris/shelly_floris.yaml + trigger: + - platform: event + event_type: esphome.button_pressed + event_data: + device_name: living_room_switch + click_type: double + action: + - service: switch.turn_on + entity_id: + - switch.living_room_switch_relay + - service: light.toggle + data_template: + entity_id: + - light.dining_nook_group + - service: logbook.log + data_template: + name: EVENT + message: "Toggling dining nook lights" + - alias: Living Room motion - motion timeout trigger: - platform: state @@ -26,16 +89,18 @@ automation: minutes: 60 action: service: homeassistant.turn_off - entity_id: light.sofa_overhead, light.dining_table_overhead, light.uplighter, light.sideboard, light.train_cabinets, light.dining_nook + entity_id: light.living_room, light.dining_nook_group - alias: Living Room motion - sunlight timeout trigger: - platform: numeric_state entity_id: sensor.average_external_light_level - above: 1000 + below: input_number.living_room_light_level_trigger + for: + minutes: 10 action: service: homeassistant.turn_off - entity_id: light.sofa_overhead, light.dining_table_overhead, light.uplighter, light.sideboard, light.train_cabinets, light.dining_nook + entity_id: light.living_room, light.dining_nook_group - alias: Living Room motion trigger: @@ -50,7 +115,9 @@ automation: state: "off" - condition: numeric_state entity_id: sensor.average_external_light_level - below: 1000 + below: input_number.living_room_light_level_trigger + # for: + # minutes: 10 - condition: state entity_id: binary_sensor.home_occupied state: "on" @@ -73,7 +140,7 @@ automation: data_template: entity_id: > {% if states('sensor.time_of_day') == "Morning" %} - light.sofa_overhead, light.dining_table_overhead, light.uplighter, light.sideboard, light.train_cabinets, light.dining_nook + light.living_room, light.dining_nook_group {% else %} - light.sofa_overhead, light.dining_table_overhead, light.uplighter, light.sideboard, light.train_cabinets, light.dining_nook + light.living_room, light.dining_nook_group {% endif %} diff --git a/packages/lockup.yaml b/packages/lockup.yaml new file mode 100644 index 000000000..bdb8d1d34 --- /dev/null +++ b/packages/lockup.yaml @@ -0,0 +1,35 @@ +--- +homeassistant: + ## This doesn't seem to work. It needs to be surfaced in configuration.yaml + customize: + input_boolean.lockup_process: + hidden: false + +input_boolean: + lockup_process: + name: Lockup process + icon: mdi:sleep + initial: false + +automation: + - alias: Lockup process + trigger: + - platform: state + entity_id: input_boolean.lockup_process + to: 'on' + action: + - service: logbook.log + data_template: + name: EVENT + message: "Triggering lockup process" + entity_id: input_boolean.lockup_process + domain: input_boolean + - service: homeassistant.turn_off + entity_id: + - switch.tin_hut_lights_relay + - service: media_player.turn_off + data: {} + target: + entity_id: media_player.openhome_uuid_4c494e4e_0026_0f21_a10a_01260864013f + - service: input_boolean.turn_off + entity_id: input_boolean.lockup_process diff --git a/packages/master_bathroom.yaml b/packages/master_bathroom.yaml index 747bf1a5e..f6171ea55 100644 --- a/packages/master_bathroom.yaml +++ b/packages/master_bathroom.yaml @@ -23,11 +23,13 @@ light: automation: - alias: Bathroom light toggle + # Can be improved, examples at https://github.com/TheFes/HA-configuration/blob/main/include/automation/01_first_floor/floris/shelly_floris.yaml trigger: - - platform: state - entity_id: - - binary_sensor.hall_dual_switch_touchpad_1 - to: 'on' + - platform: event + event_type: esphome.button_pressed + event_data: + device_name: hall_dual_switch_touchpad_1 + click_type: single action: - service: switch.turn_on entity_id: diff --git a/packages/master_bedroom_lights.yaml b/packages/master_bedroom_lights.yaml new file mode 100644 index 000000000..7e0bd4226 --- /dev/null +++ b/packages/master_bedroom_lights.yaml @@ -0,0 +1,96 @@ +--- +automation: + - alias: Master Bedroom light toggle + # Can be improved, examples at https://github.com/TheFes/HA-configuration/blob/main/include/automation/01_first_floor/floris/shelly_floris.yaml + trigger: + - platform: event + event_type: esphome.button_pressed + event_data: + device_name: masterbedroom_switch + click_type: single + action: + - service: switch.turn_on + entity_id: switch.master_bedroom_switch_relay + - service: light.toggle + entity_id: light.master_bedroom + - service: logbook.log + data_template: + name: EVENT + message: "Toggling master bedroom light" + + - alias: Master Bedroom light double toggle + trigger: + - platform: event + event_type: esphome.button_pressed + event_data: + device_name: masterbedroom_switch + click_type: double + action: + - service: switch.turn_on + entity_id: switch.master_bedroom_lightswitch_relay + - service: light.toggle + entity_id: light.master_bedroom + - service: light.toggle + entity_id: light.ensuite + - service: logbook.log + data_template: + name: EVENT + message: "Double master bedroom light" + + - alias: "Bedtime lights off" + trigger: + - platform: time + at: '01:00:00' + condition: + - condition: state + entity_id: binary_sensor.home_occupied + state: "on" + action: + - service: light.turn_off + entity_id: + - group.bedside_lights + - light.twig_lights + + - alias: Bedside light toggle + trigger: + - platform: event + event_type: esphome.button_pressed + event_data: + device_name: masterbedroom_switch + click_type: triple + action: + - service: light.toggle + entity_id: group.bedside_lights + - service: logbook.log + data_template: + name: EVENT + message: "Toggling bedside lights" + + - alias: "Bedtime lights on" + trigger: + - platform: time + at: '21:00:00' + condition: + - condition: state + entity_id: binary_sensor.home_occupied + state: "on" + action: + - service: light.turn_on + entity_id: group.bedside_lights + data: + brightness_pct: 75 + color_temp: 400 + transition: 30 + + - alias: "Off wakup lights" + trigger: + - platform: numeric_state + entity_id: sensor.average_external_light_level + above: 500 + action: + - service: light.turn_off + data: + entity_id: + - light.master_bedroom + - light.bedside_charlotte + - light.bedside_kyle diff --git a/packages/open_tin_hut.yaml b/packages/open_tin_hut.yaml new file mode 100644 index 000000000..533b00db8 --- /dev/null +++ b/packages/open_tin_hut.yaml @@ -0,0 +1,41 @@ +--- +homeassistant: + ## This doesn't seem to work. It needs to be surfaced in configuration.yaml + customize: + input_boolean.open_tin_hut_process: + hidden: false + +input_boolean: + openup_process: + name: Open tin hut process + icon: mdi:sleep + initial: false + +automation: + - alias: Open tin hut process + trigger: + - platform: state + entity_id: input_boolean.open_tin_hut_process + to: 'on' + action: + - service: logbook.log + data_template: + name: EVENT + message: "Triggering openup process" + entity_id: input_boolean.open_tin_hut_process + domain: input_boolean + - service: homeassistant.turn_on + entity_id: + - switch.tin_hut_lights_relay + - service: openhome.invoke_pin + data: + pin: 1 + target: + entity_id: media_player.openhome_uuid_4c494e4e_0026_0f21_a10a_01260864013f + - service: media_player.volume_set + data: + volume_level: 0.4 + target: + entity_id: media_player.openhome_uuid_4c494e4e_0026_0f21_a10a_01260864013f + - service: input_boolean.turn_off + entity_id: input_boolean.open_tin_hut_process diff --git a/packages/outside_motion.yaml b/packages/outside_motion.yaml new file mode 100644 index 000000000..b499904ed --- /dev/null +++ b/packages/outside_motion.yaml @@ -0,0 +1,86 @@ +--- +automation: + - alias: Outdoor lights on + trigger: + - platform: state + entity_id: + - binary_sensor.outside_front_motion + - binary_sensor.outside_driveway_motion + - binary_sensor.front_door_motion + - binary_sensor.back_door_person_occupancy + - binary_sensor.driveway_person_occupancy + - binary_sensor.driveway_person_occupancy + - binary_sensor.gates_person_occupancy + to: 'on' + condition: + - condition: state + entity_id: input_boolean.night_view + state: "off" + - condition: state + entity_id: sun.sun + state: "below_horizon" + action: + - service: script.tweet_engine + data_template: + tweet: > + {{ [ + "Dark outside and motion detected! Scared! Turning on my outside lights!", + "Woooo, it's dark and scary. Something moved! Turning on the outside lights!", + "Did you hear that? I can't see a thing. Turning on the outside lights" + ] | random + " https://amzn.to/2CR5mbQ" }} + - service: light.turn_on + entity_id: + - light.driveway_floodlights + - light.mini_deck_floodlight + - light.driveway_floodlights + - light.back_floodlights + - light.mini_deck_floodlight + - service: light.turn_on + # Set the white channel values to maximum + data: + entity_id: light.decking_lights + rgbww_color: + - "{{ state_attr('light.decking_lights', 'rgbww_color')[0] | default(0) | int }}" + - "{{ state_attr('light.decking_lights', 'rgbww_color')[1] | default(0) | int }}" + - "{{ state_attr('light.decking_lights', 'rgbww_color')[2] | default(0) | int }}" + - 255 + - 255 + # If this evaluates to false, the action will stop here. + - condition: template + value_template: "{{ not is_state('binary_sensor.home_occupied') }}" + - service: light.turn_on + entity_id: light.front_door_floodlights + + - alias: Outdoor lights off + trigger: + - platform: state + entity_id: + - binary_sensor.outside_front_motion + - binary_sensor.outside_driveway_motion + - binary_sensor.front_door_motion + - binary_sensor.back_door_person_occupancy + - binary_sensor.driveway_person_occupancy + - binary_sensor.driveway_person_occupancy + - binary_sensor.gates_person_occupancy + to: 'off' + for: + seconds: 300 + action: + - service: light.turn_off + entity_id: + - light.driveway_floodlights + - light.mini_deck_floodlight + - light.front_door_floodlights + - light.driveway_floodlights + - light.back_floodlights + - light.mini_deck_floodlight + - service: light.turn_on + # Set the white channel values to zero + data: + entity_id: light.decking_lights + rgbww_color: + - "{{ state_attr('light.decking_lights', 'rgbww_color')[0] | default(0) | int }}" + - "{{ state_attr('light.decking_lights', 'rgbww_color')[1] | default(0) | int }}" + - "{{ state_attr('light.decking_lights', 'rgbww_color')[2] | default(0) | int }}" + - 0 + - 0 diff --git a/packages/outside_nightlights.yaml b/packages/outside_nightlights.yaml new file mode 100644 index 000000000..a6e17bec4 --- /dev/null +++ b/packages/outside_nightlights.yaml @@ -0,0 +1,35 @@ +--- +automation: + - alias: "Outside night lights on" + trigger: + - platform: numeric_state + entity_id: sensor.average_external_light_level + below: input_number.blinds_evening + for: + minutes: 10 + condition: + - condition: state + entity_id: binary_sensor.home_occupied + state: "on" + action: + - service: light.turn_on + entity_id: + - light.car_port + - light.front_door_dome + data: + brightness_pct: 100 + color_temp: 400 + transition: 30 + + - alias: Outside night lights off + trigger: + - platform: numeric_state + entity_id: sensor.average_external_light_level + above: input_number.blinds_morning + for: + minutes: 10 + action: + - service: light.turn_off + entity_id: + - light.car_port + - light.front_door_dome diff --git a/packages/room_aware.yaml b/packages/room_aware.yaml new file mode 100644 index 000000000..4e1571cdd --- /dev/null +++ b/packages/room_aware.yaml @@ -0,0 +1,64 @@ +--- +group: + echos: + name: All Echos + entities: + - media_player.bedroom + - media_player.kitchen + - media_player.study + - media_player.living_room + - media_player.garage + - media_player.tin_hut + +template: + - sensor: + - name: last_alexa + state: > + {{ expand('group.echos') | selectattr('attributes.last_called','eq',True) | map(attribute='entity_id') | first }} + availability: > + {{ expand('group.echos') | selectattr('attributes.last_called','eq',True) | first is defined }} + +# "Alexa, turn on the lights" +script: + alexa_turn_on_the_lights: + alias: Alexa Turn On The Lights + sequence: + - service: homeassistant.turn_on + data_template: + entity_id: >- + {# Use the name of each Echo to determine which room the command likely came from. #} + {%- set room = states("sensor.last_alexa")|replace('media_player.','') -%} + + {%- if room == "kitchen" -%} + light.kitchen + {%- elif room == "study" -%} + group.study_lighting + {%- elif room == "bedroom" -%} + light.master_bedroom + {%- elif room == "garage" -%} + light.garage + {%- elif room == "living_room" -%} + group.living_room_lights + {%- endif -%} + + # "Alexa, turn off the lights" + alexa_turn_off_the_lights: + alias: Alexa Turn Off The Lights + sequence: + - service: homeassistant.turn_off + data_template: + entity_id: >- + {# Use the name of each Echo to determine which room the command likely came from. #} + {%- set room = states("sensor.last_alexa")|replace('media_player.','') -%} + + {%- if room == "kitchen" -%} + light.kitchen + {%- elif room == "study" -%} + group.study_lighting + {%- elif room == "bedroom" -%} + light.master_bedroom + {%- elif room == "garage" -%} + light.garage + {%- elif room == "living_room" -%} + group.living_room_lights + {%- endif -%} diff --git a/packages/snmp_bandwidth.yaml b/packages/snmp_bandwidth.yaml index 8f91bdee5..dd811290d 100644 --- a/packages/snmp_bandwidth.yaml +++ b/packages/snmp_bandwidth.yaml @@ -1,7 +1,7 @@ +--- # Sourced from https://github.com/mconway/homeassistant-config/blob/master/packages/snmp_bandwidth.yaml # and https://community.home-assistant.io/t/snmp-bandwidth-monitor/7122/37 - homeassistant: customize: sensor.download_speed_mean: @@ -35,27 +35,29 @@ sensor: - platform: template sensors: - internet_speed_in: - friendly_name: 'Internet Speed IN' - value_template: '{{ ((states.input_number.internet_traffic_delta_in.state | float ) / 1000000 ) | round(2) }}' - unit_of_measurement: 'Mbit/s' + internet_speed_in: + friendly_name: 'Internet Speed IN' + value_template: '{{ ((states.input_number.internet_traffic_delta_in.state | float ) / 1000000 ) | round(2) }}' + unit_of_measurement: 'Mbit/s' - platform: template sensors: - internet_speed_out: - friendly_name: 'Internet Speed OUT' - value_template: '{{ ((states.input_number.internet_traffic_delta_out.state | float ) / 1000000 ) | round(2) }}' - unit_of_measurement: 'Mbit/s' + internet_speed_out: + friendly_name: 'Internet Speed OUT' + value_template: '{{ ((states.input_number.internet_traffic_delta_out.state | float ) / 1000000 ) | round(2) }}' + unit_of_measurement: 'Mbit/s' - platform: statistics name: 'WAN Traffic In' state_characteristic: mean entity_id: sensor.internet_speed_in + sampling_size: 50 - platform: statistics name: 'WAN Traffic Out' state_characteristic: mean entity_id: sensor.internet_speed_out + sampling_size: 50 input_number: internet_traffic_delta_in: diff --git a/packages/study_lights.yaml b/packages/study_lights.yaml index b97db4642..4bc0b1713 100644 --- a/packages/study_lights.yaml +++ b/packages/study_lights.yaml @@ -1,9 +1,13 @@ +--- automation: - alias: Study light toggle + # Can be improved, examples at https://github.com/TheFes/HA-configuration/blob/main/include/automation/01_first_floor/floris/shelly_floris.yaml trigger: - - platform: state - entity_id: binary_sensor.study_switch_touch_pad - to: 'on' + - platform: event + event_type: esphome.button_pressed + event_data: + device_name: study_switch + click_type: single action: - service: switch.turn_on entity_id: switch.study_switch_relay @@ -14,6 +18,22 @@ automation: name: EVENT message: "Toggling study light" + - alias: Study monitor light toggle + # Can be improved, examples at https://github.com/TheFes/HA-configuration/blob/main/include/automation/01_first_floor/floris/shelly_floris.yaml + trigger: + - platform: event + event_type: esphome.button_pressed + event_data: + device_name: study_switch + click_type: double + action: + - service: light.toggle + entity_id: light.monitor_lights + - service: logbook.log + data_template: + name: EVENT + message: "Toggling monitor lights" + - alias: 'Increase brightness of lamp from dimmer' initial_state: 'on' trigger: diff --git a/packages/utility_room.yaml b/packages/utility_room.yaml deleted file mode 100644 index e8fe3fc7d..000000000 --- a/packages/utility_room.yaml +++ /dev/null @@ -1,38 +0,0 @@ ---- -automation: - - alias: Utility room light on - trigger: - - platform: state - entity_id: - - binary_sensor.utility_room_door - - binary_sensor.utility_room_motion - to: 'on' - from: 'off' - condition: - - condition: numeric_state - entity_id: sensor.average_external_light_level - below: 1000 - - condition: state - entity_id: binary_sensor.home_occupied - state: "on" - action: - - service: homeassistant.turn_on - data_template: - entity_id: - - light.utility_room - - - alias: Utility room light off - trigger: - - platform: state - entity_id: binary_sensor.utility_room_door - to: 'off' - for: - seconds: 60 - - platform: state - entity_id: binary_sensor.utility_room_motion - to: 'off' - for: - seconds: 60 - action: - - service: light.turn_off - entity_id: light.utility_room diff --git a/persons.yaml b/persons.yaml index 2dc98f05d..09ccf4fbd 100644 --- a/persons.yaml +++ b/persons.yaml @@ -2,7 +2,7 @@ id: Kyle001 device_trackers: - device_tracker.kyle_phone - - device_tracker.umidigi_f2 + - device_tracker.nothing_phone - name: Charlotte id: Charlotte001 diff --git a/scripts/all_off.yaml b/scripts/all_off.yaml index a3bd3364a..ff1704859 100644 --- a/scripts/all_off.yaml +++ b/scripts/all_off.yaml @@ -48,15 +48,15 @@ all_off: - service: light.turn_off data: - entity_id: group.utility_room + entity_id: group.front_hall ## Turn off Hall switches and lights - service: switch.turn_off data: - entity_id: group.hall + entity_id: light.hall - service: light.turn_off data: - entity_id: group.hall + entity_id: light.hall ## Turn off bathroom - service: switch.turn_off diff --git a/scripts/all_on.yaml b/scripts/all_on.yaml index 626e7707b..296afdc8d 100644 --- a/scripts/all_on.yaml +++ b/scripts/all_on.yaml @@ -8,10 +8,10 @@ all_on: ## Turn on Hall switches and lights - service: switch.turn_on data: - entity_id: group.hall + entity_id: light.hall - service: light.turn_on data: - entity_id: group.hall + entity_id: light.hall ## Turn on outside lights. PIR will also be triggered on arrival, starting the timer. diff --git a/sensors.yaml b/sensors.yaml index 5f735e3b4..2d035cb10 100644 --- a/sensors.yaml +++ b/sensors.yaml @@ -1,4 +1,5 @@ -#!include travel_times.yaml +--- +# !include travel_times.yaml # Improve with https://github.com/bah2830/Home-Assistant-Configs/blob/master/includes/automation/notifications.yaml @@ -31,22 +32,12 @@ payplan: "monthly" # or legacyPrepay or smartPayg eco7: false -- platform: template - sensors: - last_alexa: - value_template: > - {{ states.media_player | selectattr('attributes.last_called','eq',True) | map(attribute='entity_id') | first }} - -- platform: radarr - api_key: ba4d5fad0a5a433c82be11d22f23b263 - host: homeauto.vpn.glasgownet.com - port: 7878 - - platform: template sensors: next_bin: # value_template: "{{ states.calendar.next_bin.attributes.message }}" - value_template: "{{ states.calendar.next_bin.attributes.message|replace(' bin','') }}" + # value_template: "{{ states.calendar.family_calendar.attributes.message|replace(' bin','') }}" + value_template: "{{ states.calendar.garbage_collection.attributes.message|replace('bin','') }}" friendly_name: Next Bin # friendly_name_template: "{{ states.calendar.next_bin.attributes.message }}" # entity_id: calendar.next_bin @@ -101,7 +92,7 @@ name: House Average Humidity type: median entity_ids: - - sensor.utility_room_sensor_humidity + - sensor.front_hall_sensor_humidity - sensor.craft_room_humidity - sensor.guest_room_humidity - sensor.living_room_humidity @@ -163,10 +154,10 @@ friendly_name: Bathroom temperature_sensor: sensor.bathroom_temperature humidity_sensor: sensor.bathroom_humidity - utility_room: - friendly_name: Utility Room - temperature_sensor: sensor.utility_room_sensor_temperature - humidity_sensor: sensor.utility_room_sensor_humidity + front_hall: + friendly_name: Front Hall + temperature_sensor: sensor.front_hall_sensor_temperature + humidity_sensor: sensor.front_hall_sensor_humidity craft_room: friendly_name: Craft Room temperature_sensor: sensor.craft_room_temperature diff --git a/www/clock-weather-card.js b/www/clock-weather-card.js new file mode 100644 index 000000000..3aa9f815e --- /dev/null +++ b/www/clock-weather-card.js @@ -0,0 +1,238 @@ +function e(e,t,a,n){var i,r=arguments.length,o=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,a):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,a,n);else for(var d=e.length-1;d>=0;d--)(i=e[d])&&(o=(r<3?i(o):r>3?i(t,a,o):i(t,a))||o);return r>3&&o&&Object.defineProperty(t,a,o),o +/** + * @license + * Copyright 2019 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */}const t=window.ShadowRoot&&(void 0===window.ShadyCSS||window.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,a=Symbol(),n=new Map;class i{constructor(e,t){if(this._$cssResult$=!0,t!==a)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e}get styleSheet(){let e=n.get(this.cssText);return t&&void 0===e&&(n.set(this.cssText,e=new CSSStyleSheet),e.replaceSync(this.cssText)),e}toString(){return this.cssText}}const r=t?e=>e:e=>e instanceof CSSStyleSheet?(e=>{let t="";for(const a of e.cssRules)t+=a.cssText;return(e=>new i("string"==typeof e?e:e+"",a))(t)})(e):e +/** + * @license + * Copyright 2017 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */;var o;const d=window.trustedTypes,s=d?d.emptyScript:"",u=window.reactiveElementPolyfillSupport,m={toAttribute(e,t){switch(t){case Boolean:e=e?s:null;break;case Object:case Array:e=null==e?e:JSON.stringify(e)}return e},fromAttribute(e,t){let a=e;switch(t){case Boolean:a=null!==e;break;case Number:a=null===e?null:Number(e);break;case Object:case Array:try{a=JSON.parse(e)}catch(e){a=null}}return a}},l=(e,t)=>t!==e&&(t==t||e==e),h={attribute:!0,type:String,converter:m,reflect:!1,hasChanged:l};class c extends HTMLElement{constructor(){super(),this._$Et=new Map,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Ei=null,this.o()}static addInitializer(e){var t;null!==(t=this.l)&&void 0!==t||(this.l=[]),this.l.push(e)}static get observedAttributes(){this.finalize();const e=[];return this.elementProperties.forEach(((t,a)=>{const n=this._$Eh(a,t);void 0!==n&&(this._$Eu.set(n,a),e.push(n))})),e}static createProperty(e,t=h){if(t.state&&(t.attribute=!1),this.finalize(),this.elementProperties.set(e,t),!t.noAccessor&&!this.prototype.hasOwnProperty(e)){const a="symbol"==typeof e?Symbol():"__"+e,n=this.getPropertyDescriptor(e,a,t);void 0!==n&&Object.defineProperty(this.prototype,e,n)}}static getPropertyDescriptor(e,t,a){return{get(){return this[t]},set(n){const i=this[e];this[t]=n,this.requestUpdate(e,i,a)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)||h}static finalize(){if(this.hasOwnProperty("finalized"))return!1;this.finalized=!0;const e=Object.getPrototypeOf(this);if(e.finalize(),this.elementProperties=new Map(e.elementProperties),this._$Eu=new Map,this.hasOwnProperty("properties")){const e=this.properties,t=[...Object.getOwnPropertyNames(e),...Object.getOwnPropertySymbols(e)];for(const a of t)this.createProperty(a,e[a])}return this.elementStyles=this.finalizeStyles(this.styles),!0}static finalizeStyles(e){const t=[];if(Array.isArray(e)){const a=new Set(e.flat(1/0).reverse());for(const e of a)t.unshift(r(e))}else void 0!==e&&t.push(r(e));return t}static _$Eh(e,t){const a=t.attribute;return!1===a?void 0:"string"==typeof a?a:"string"==typeof e?e.toLowerCase():void 0}o(){var e;this._$Ep=new Promise((e=>this.enableUpdating=e)),this._$AL=new Map,this._$Em(),this.requestUpdate(),null===(e=this.constructor.l)||void 0===e||e.forEach((e=>e(this)))}addController(e){var t,a;(null!==(t=this._$Eg)&&void 0!==t?t:this._$Eg=[]).push(e),void 0!==this.renderRoot&&this.isConnected&&(null===(a=e.hostConnected)||void 0===a||a.call(e))}removeController(e){var t;null===(t=this._$Eg)||void 0===t||t.splice(this._$Eg.indexOf(e)>>>0,1)}_$Em(){this.constructor.elementProperties.forEach(((e,t)=>{this.hasOwnProperty(t)&&(this._$Et.set(t,this[t]),delete this[t])}))}createRenderRoot(){var e;const a=null!==(e=this.shadowRoot)&&void 0!==e?e:this.attachShadow(this.constructor.shadowRootOptions);return((e,a)=>{t?e.adoptedStyleSheets=a.map((e=>e instanceof CSSStyleSheet?e:e.styleSheet)):a.forEach((t=>{const a=document.createElement("style"),n=window.litNonce;void 0!==n&&a.setAttribute("nonce",n),a.textContent=t.cssText,e.appendChild(a)}))})(a,this.constructor.elementStyles),a}connectedCallback(){var e;void 0===this.renderRoot&&(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),null===(e=this._$Eg)||void 0===e||e.forEach((e=>{var t;return null===(t=e.hostConnected)||void 0===t?void 0:t.call(e)}))}enableUpdating(e){}disconnectedCallback(){var e;null===(e=this._$Eg)||void 0===e||e.forEach((e=>{var t;return null===(t=e.hostDisconnected)||void 0===t?void 0:t.call(e)}))}attributeChangedCallback(e,t,a){this._$AK(e,a)}_$ES(e,t,a=h){var n,i;const r=this.constructor._$Eh(e,a);if(void 0!==r&&!0===a.reflect){const o=(null!==(i=null===(n=a.converter)||void 0===n?void 0:n.toAttribute)&&void 0!==i?i:m.toAttribute)(t,a.type);this._$Ei=e,null==o?this.removeAttribute(r):this.setAttribute(r,o),this._$Ei=null}}_$AK(e,t){var a,n,i;const r=this.constructor,o=r._$Eu.get(e);if(void 0!==o&&this._$Ei!==o){const e=r.getPropertyOptions(o),d=e.converter,s=null!==(i=null!==(n=null===(a=d)||void 0===a?void 0:a.fromAttribute)&&void 0!==n?n:"function"==typeof d?d:null)&&void 0!==i?i:m.fromAttribute;this._$Ei=o,this[o]=s(t,e.type),this._$Ei=null}}requestUpdate(e,t,a){let n=!0;void 0!==e&&(((a=a||this.constructor.getPropertyOptions(e)).hasChanged||l)(this[e],t)?(this._$AL.has(e)||this._$AL.set(e,t),!0===a.reflect&&this._$Ei!==e&&(void 0===this._$E_&&(this._$E_=new Map),this._$E_.set(e,a))):n=!1),!this.isUpdatePending&&n&&(this._$Ep=this._$EC())}async _$EC(){this.isUpdatePending=!0;try{await this._$Ep}catch(e){Promise.reject(e)}const e=this.scheduleUpdate();return null!=e&&await e,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var e;if(!this.isUpdatePending)return;this.hasUpdated,this._$Et&&(this._$Et.forEach(((e,t)=>this[t]=e)),this._$Et=void 0);let t=!1;const a=this._$AL;try{t=this.shouldUpdate(a),t?(this.willUpdate(a),null===(e=this._$Eg)||void 0===e||e.forEach((e=>{var t;return null===(t=e.hostUpdate)||void 0===t?void 0:t.call(e)})),this.update(a)):this._$EU()}catch(e){throw t=!1,this._$EU(),e}t&&this._$AE(a)}willUpdate(e){}_$AE(e){var t;null===(t=this._$Eg)||void 0===t||t.forEach((e=>{var t;return null===(t=e.hostUpdated)||void 0===t?void 0:t.call(e)})),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e)}_$EU(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$Ep}shouldUpdate(e){return!0}update(e){void 0!==this._$E_&&(this._$E_.forEach(((e,t)=>this._$ES(t,this[t],e))),this._$E_=void 0),this._$EU()}updated(e){}firstUpdated(e){}} +/** + * @license + * Copyright 2017 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */ +var f;c.finalized=!0,c.elementProperties=new Map,c.elementStyles=[],c.shadowRootOptions={mode:"open"},null==u||u({ReactiveElement:c}),(null!==(o=globalThis.reactiveElementVersions)&&void 0!==o?o:globalThis.reactiveElementVersions=[]).push("1.2.1");const g=globalThis.trustedTypes,p=g?g.createPolicy("lit-html",{createHTML:e=>e}):void 0,v=`lit$${(Math.random()+"").slice(9)}$`,b="?"+v,w=`<${b}>`,y=document,A=(e="")=>y.createComment(e),k=e=>null===e||"object"!=typeof e&&"function"!=typeof e,M=Array.isArray,P=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,W=/-->/g,x=/>/g,z=/>|[ \n \r](?:([^\s"'>=/]+)([ \n \r]*=[ \n \r]*(?:[^ \n \r"'`<>=]|("|')|))|$)/g,j=/'/g,C=/"/g,T=/^(?:script|style|textarea)$/i,S=(e=>(t,...a)=>({_$litType$:e,strings:t,values:a}))(1),H=Symbol.for("lit-noChange"),D=Symbol.for("lit-nothing"),N=new WeakMap,X=y.createTreeWalker(y,129,null,!1),I=(e,t)=>{const a=e.length-1,n=[];let i,r=2===t?"":"",o=P;for(let t=0;t"===s[0]?(o=null!=i?i:P,u=-1):void 0===s[1]?u=-2:(u=o.lastIndex-s[2].length,d=s[1],o=void 0===s[3]?z:'"'===s[3]?C:j):o===C||o===j?o=z:o===W||o===x?o=P:(o=z,i=void 0);const l=o===z&&e[t+1].startsWith("/>")?" ":"";r+=o===P?a+w:u>=0?(n.push(d),a.slice(0,u)+"$lit$"+a.slice(u)+v+l):a+v+(-2===u?(n.push(void 0),t):l)}const d=r+(e[a]||"")+(2===t?"":"");if(!Array.isArray(e)||!e.hasOwnProperty("raw"))throw Error("invalid template strings array");return[void 0!==p?p.createHTML(d):d,n]};class E{constructor({strings:e,_$litType$:t},a){let n;this.parts=[];let i=0,r=0;const o=e.length-1,d=this.parts,[s,u]=I(e,t);if(this.el=E.createElement(s,a),X.currentNode=this.el.content,2===t){const e=this.el.content,t=e.firstChild;t.remove(),e.append(...t.childNodes)}for(;null!==(n=X.nextNode())&&d.length0){n.textContent=g?g.emptyScript:"";for(let a=0;a{var t;return M(e)||"function"==typeof(null===(t=e)||void 0===t?void 0:t[Symbol.iterator])})(e)?this.A(e):this.$(e)}M(e,t=this._$AB){return this._$AA.parentNode.insertBefore(e,t)}S(e){this._$AH!==e&&(this._$AR(),this._$AH=this.M(e))}$(e){this._$AH!==D&&k(this._$AH)?this._$AA.nextSibling.data=e:this.S(y.createTextNode(e)),this._$AH=e}T(e){var t;const{values:a,_$litType$:n}=e,i="number"==typeof n?this._$AC(e):(void 0===n.el&&(n.el=E.createElement(n.h,this.options)),n);if((null===(t=this._$AH)||void 0===t?void 0:t._$AD)===i)this._$AH.m(a);else{const e=new V(i,this),t=e.p(this.options);e.m(a),this.S(t),this._$AH=e}}_$AC(e){let t=N.get(e.strings);return void 0===t&&N.set(e.strings,t=new E(e)),t}A(e){M(this._$AH)||(this._$AH=[],this._$AR());const t=this._$AH;let a,n=0;for(const i of e)n===t.length?t.push(a=new K(this.M(A()),this.M(A()),this,this.options)):a=t[n],a._$AI(i),n++;n2||""!==a[0]||""!==a[1]?(this._$AH=Array(a.length-1).fill(new String),this.strings=a):this._$AH=D}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(e,t=this,a,n){const i=this.strings;let r=!1;if(void 0===i)e=B(this,e,t,0),r=!k(e)||e!==this._$AH&&e!==H,r&&(this._$AH=e);else{const n=e;let o,d;for(e=i[0],o=0;o{var n,i;const r=null!==(n=null==a?void 0:a.renderBefore)&&void 0!==n?n:t;let o=r._$litPart$;if(void 0===o){const e=null!==(i=null==a?void 0:a.renderBefore)&&void 0!==i?i:null;r._$litPart$=o=new K(t.insertBefore(A(),e),e,void 0,null!=a?a:{})}return o._$AI(e),o})(t,this.renderRoot,this.renderOptions)}connectedCallback(){var e;super.connectedCallback(),null===(e=this._$Dt)||void 0===e||e.setConnected(!0)}disconnectedCallback(){var e;super.disconnectedCallback(),null===(e=this._$Dt)||void 0===e||e.setConnected(!1)}render(){return H}}F.finalized=!0,F._$litElement$=!0,null===(R=globalThis.litElementHydrateSupport)||void 0===R||R.call(globalThis,{LitElement:F});const Z=globalThis.litElementPolyfillSupport;null==Z||Z({LitElement:F}),(null!==(L=globalThis.litElementVersions)&&void 0!==L?L:globalThis.litElementVersions=[]).push("3.1.2"); +/** + * @license + * Copyright 2017 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */ +const _=(e,t)=>"method"===t.kind&&t.descriptor&&!("value"in t.descriptor)?{...t,finisher(a){a.createProperty(t.key,e)}}:{kind:"field",key:Symbol(),placement:"own",descriptor:{},originalKey:t.key,initializer(){"function"==typeof t.initializer&&(this[t.key]=t.initializer.call(this))},finisher(a){a.createProperty(t.key,e)}}; +/** + * @license + * Copyright 2017 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */function $(e){return(t,a)=>void 0!==a?((e,t,a)=>{t.constructor.createProperty(a,e)})(e,t,a):_(e,t) +/** + * @license + * Copyright 2017 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */}function ee(e){return $({...e,state:!0})} +/** + * @license + * Copyright 2021 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */var te,ae,ne;null===(te=window.HTMLSlotElement)||void 0===te||te.prototype.assignedElements,function(e){e.language="language",e.system="system",e.comma_decimal="comma_decimal",e.decimal_comma="decimal_comma",e.space_comma="space_comma",e.none="none"}(ae||(ae={})),function(e){e.language="language",e.system="system",e.am_pm="12",e.twenty_four="24"}(ne||(ne={}));var ie=["closed","locked","off"],re=function(e,t,a,n){n=n||{},a=null==a?{}:a;var i=new Event(t,{bubbles:void 0===n.bubbles||n.bubbles,cancelable:Boolean(n.cancelable),composed:void 0===n.composed||n.composed});return i.detail=a,e.dispatchEvent(i),i},oe=function(e){re(window,"haptic",e)},de=function(e,t,a,n){if(n||(n={action:"more-info"}),!n.confirmation||n.confirmation.exemptions&&n.confirmation.exemptions.some((function(e){return e.user===t.user.id}))||(oe("warning"),confirm(n.confirmation.text||"Are you sure you want to "+n.action+"?")))switch(n.action){case"more-info":(a.entity||a.camera_image)&&re(e,"hass-more-info",{entityId:a.entity?a.entity:a.camera_image});break;case"navigate":n.navigation_path&&function(e,t,a){void 0===a&&(a=!1),a?history.replaceState(null,"",t):history.pushState(null,"",t),re(window,"location-changed",{replace:a})}(0,n.navigation_path);break;case"url":n.url_path&&window.open(n.url_path);break;case"toggle":a.entity&&(function(e,t){(function(e,t,a){void 0===a&&(a=!0);var n,i=function(e){return e.substr(0,e.indexOf("."))}(t),r="group"===i?"homeassistant":i;switch(i){case"lock":n=a?"unlock":"lock";break;case"cover":n=a?"open_cover":"close_cover";break;default:n=a?"turn_on":"turn_off"}e.callService(r,n,{entity_id:t})})(e,t,ie.includes(e.states[t].state))}(t,a.entity),oe("success"));break;case"call-service":if(!n.service)return void oe("failure");var i=n.service.split(".",2);t.callService(i[0],i[1],n.service_data,n.target),oe("success");break;case"fire-dom-event":re(e,"ll-custom",n)}};function se(e){return void 0!==e&&"none"!==e.action}class ue{constructor(e,t,a){this.r=e,this.g=t,this.b=a}}var me=((e,...t)=>{const n=1===e.length?e[0]:t.reduce(((t,a,n)=>t+(e=>{if(!0===e._$cssResult$)return e.cssText;if("number"==typeof e)return e;throw Error("Value passed to 'css' function must be a 'css' function result: "+e+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(a)+e[n+1]),e[0]);return new i(n,a)})` + + ha-card { + --bar-height: 1.5rem; + } + + clock-weather-card-today { + display: flex; + } + + clock-weather-card-today-left { + display: flex; + width: 35%; + align-items: center; + justify-content: center; + } + + .grow-img { + max-width: 100%; + max-height: 100%; + } + + clock-weather-card-today-right { + display: flex; + width: 65%; + justify-content: space-around; + align-items: center; + } + + clock-weather-card-today-right-wrap { + display: flex; + flex-direction: column; + } + + clock-weather-card-today-right-wrap-top { + width: 100%; + text-align: end; + display: block; + } + + clock-weather-card-today-right-wrap-center { + display: flex; + height: 4rem; + font-size: 3.5rem; + white-space: nowrap; + align-items: center; + justify-content: center; + } + + clock-weather-card-today-right-wrap-bottom { + display: flex; + justify-content: start; + } + + clock-weather-card-forecast { + display: block; + } + + clock-weather-card-forecast-row { + display: grid; + grid-template-columns: 2rem 2rem 2.1rem auto 2.1rem; + align-items: center; + grid-gap: 0.5rem; + } + + forecast-text { + text-align: var(--text-align); + white-space: nowrap; + text-overflow: clip; + } + + forecast-icon { + display: flex; + align-items: center; + justify-content: center; + } + + forecast-temperature-bar { + position: relative; + width: 100%; + height: var(--bar-height); + border-radius: calc(var(--bar-height) / 2); + overflow: hidden; + } + + forecast-temperature-bar-background { + width: 100%; + opacity: 0.25; + background: var(--light-primary-color); + } + + forecast-temperature-bar-current-indicator-dot { + --border-width: 2px; + background-color: var(--primary-text-color); + border-radius: 50%; + width: var(--bar-height); + box-shadow: inset 0 0 0 var(--border-width) var(--text-light-primary-color); + margin-left: calc(var(--move-right) * -1 * var(--bar-height)); + } + + forecast-temperature-bar-range { + border-radius: calc(var(--bar-height) / 2); + left: var(--start-percent); + right: calc(100% - var(--end-percent)); + background: linear-gradient(to right, var(--gradient)); + overflow: hidden; + min-width: var(--bar-height); + } + + forecast-temperature-bar-current-indicator { + opacity: 0.75; + left: var(--position); + } + + forecast-temperature-bar-current-indicator, + forecast-temperature-bar-current-indicator-dot, + forecast-temperature-bar-background, + forecast-temperature-bar-range { + height: 100%; + position: absolute; + } +` +/** + * @license + * Copyright 2017 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */;const le="ontouchstart"in window||navigator.maxTouchPoints>0||navigator.maxTouchPoints>0;class he extends HTMLElement{constructor(){super(),this.holdTime=500,this.held=!1,this.ripple=document.createElement("mwc-ripple")}connectedCallback(){Object.assign(this.style,{position:"absolute",width:le?"100px":"50px",height:le?"100px":"50px",transform:"translate(-50%, -50%)",pointerEvents:"none",zIndex:"999"}),this.appendChild(this.ripple),this.ripple.primary=!0,["touchcancel","mouseout","mouseup","touchmove","mousewheel","wheel","scroll"].forEach((e=>{document.addEventListener(e,(()=>{clearTimeout(this.timer),this.stopAnimation(),this.timer=void 0}),{passive:!0})}))}bind(e,t){if(e.actionHandler)return;e.actionHandler=!0,e.addEventListener("contextmenu",(e=>{const t=e||window.event;return t.preventDefault&&t.preventDefault(),t.stopPropagation&&t.stopPropagation(),t.cancelBubble=!0,t.returnValue=!1,!1}));const a=e=>{let t,a;this.held=!1,e.touches?(t=e.touches[0].pageX,a=e.touches[0].pageY):(t=e.pageX,a=e.pageY),this.timer=window.setTimeout((()=>{this.startAnimation(t,a),this.held=!0}),this.holdTime)},n=a=>{a.preventDefault(),["touchend","touchcancel"].includes(a.type)&&void 0===this.timer||(clearTimeout(this.timer),this.stopAnimation(),this.timer=void 0,this.held?re(e,"action",{action:"hold"}):t.hasDoubleClick?"click"===a.type&&a.detail<2||!this.dblClickTimeout?this.dblClickTimeout=window.setTimeout((()=>{this.dblClickTimeout=void 0,re(e,"action",{action:"tap"})}),250):(clearTimeout(this.dblClickTimeout),this.dblClickTimeout=void 0,re(e,"action",{action:"double_tap"})):re(e,"action",{action:"tap"}))};e.addEventListener("touchstart",a,{passive:!0}),e.addEventListener("touchend",n),e.addEventListener("touchcancel",n),e.addEventListener("mousedown",a,{passive:!0}),e.addEventListener("click",n),e.addEventListener("keyup",(e=>{13===e.keyCode&&n(e)}))}startAnimation(e,t){Object.assign(this.style,{left:`${e}px`,top:`${t}px`,display:null}),this.ripple.disabled=!1,this.ripple.active=!0,this.ripple.unbounded=!0}stopAnimation(){this.ripple.active=!1,this.ripple.disabled=!0,this.style.display="none"}}customElements.define("action-handler-clock-weather",he);const ce=(e,t)=>{const a=(()=>{const e=document.body;if(e.querySelector("action-handler-clock-weather"))return e.querySelector("action-handler-clock-weather");const t=document.createElement("action-handler-clock-weather");return e.appendChild(t),t})();a&&a.bind(e,t)},fe=(e=>(...t)=>({_$litDirective$:e,values:t}))(class extends class{constructor(e){}get _$AU(){return this._$AM._$AU}_$AT(e,t,a){this._$Ct=e,this._$AM=t,this._$Ci=a}_$AS(e,t){return this.update(e,t)}update(e,t){return this.render(...t)}}{update(e,[t]){return ce(e.element,t),H}render(e){}});var ge={"clear-night":"Ясно",cloudy:"Облачно",fog:"Мъгла",hail:"Градушка",lightning:"Гръмотевични бури","lightning-rainy":"Дъждовни гръмотевични бури",partlycloudy:"Частична облачност",pouring:"Пороен дъжд",rainy:"Дъждовно",snowy:"Сняг","snowy-rainy":"Суграшица",sunny:"Слънчево",windy:"Ветровито","windy-variant":"Силен вятър",exceptional:"Изключително"},pe={0:"Нд",1:"Пн",2:"Вт",3:"Ср",4:"Чт",5:"Пт",6:"Сб"},ve={weather:ge,day:pe},be=Object.freeze({__proto__:null,weather:ge,day:pe,default:ve}),we={"clear-night":"Klart",cloudy:"Overskyet",fog:"Tåge",hail:"Hagl",lightning:"Lyn","lightning-rainy":"Lyn ,regnvejr",partlycloudy:"Delvis overskyet",pouring:"Regnvejr",rainy:"Regnfuldt",snowy:"Sne","snowy-rainy":"Slud",sunny:"Solrig",windy:"Blæsende","windy-variant":"Stærk vind",exceptional:"Kaos"},ye={weather:we},Ae=Object.freeze({__proto__:null,weather:we,default:ye}),ke={"clear-night":"Serè",cloudy:"Ennuvolat",fog:"Boira",hail:"Calamarsa",lightning:"Tempesta elèctrica","lightning-rainy":"Tempesta",partlycloudy:"Parcialment ennuvolat",pouring:"Aiguat",rainy:"Plujós",snowy:"Neu","snowy-rainy":"Aiguaneu",sunny:"Assolellat",windy:"Ventós","windy-variant":"Vent fort",exceptional:"Excepcional"},Me={0:"Dg.",1:"Dl.",2:"Dt.",3:"Dc.",4:"Dj.",5:"Dv.",6:"Ds."},Pe={weather:ke,day:Me},We=Object.freeze({__proto__:null,weather:ke,day:Me,default:Pe}),xe={"clear-night":"Jasno",cloudy:"Zataženo",fog:"Mlha",hail:"Kroupy",lightning:"Bouřky","lightning-rainy":"Bouřky s deštěm",partlycloudy:"Částečně zataženo",pouring:"Silný déšť",rainy:"Déšť",snowy:"Sníh","snowy-rainy":"Sníh s deštěm",sunny:"Slunečno",windy:"Vítr","windy-variant":"Prudký vítr",exceptional:"Chaos"},ze={0:"Ne",1:"Po",2:"Út",3:"St",4:"Čt",5:"Pá",6:"So"},je={weather:xe,day:ze},Ce={"clear-night":"Klar",cloudy:"Bewölkt",fog:"Nebel",hail:"Hagel",lightning:"Gewitter","lightning-rainy":"Gewitter",partlycloudy:"Teils bewölkt",pouring:"starker Regen",rainy:"Regen",snowy:"Schneefall","snowy-rainy":"Schneeregen",sunny:"Sonnig",windy:"Windig","windy-variant":"starker Wind",exceptional:"Unwetter"},Te={0:"So",1:"Mo",2:"Di",3:"Mi",4:"Do",5:"Fr",6:"Sa"},Se={weather:Ce,day:Te},He={"clear-night":"Clear",cloudy:"Cloudy",fog:"Fog",hail:"Hail",lightning:"Thunderstorms","lightning-rainy":"Rainy thunderstorms",partlycloudy:"Partly cloudy",pouring:"Pouring",rainy:"Rainy",snowy:"Snowy","snowy-rainy":"Sleet",sunny:"Sunny",windy:"Windy","windy-variant":"Strong wind",exceptional:"Exceptional"},De={0:"Sun",1:"Mon",2:"Tue",3:"Wed",4:"Thu",5:"Fri",6:"Sat"},Ne={weather:He,day:De},Xe={"clear-night":"Despejado",cloudy:"Nublado",fog:"Niebla",hail:"Granizo",lightning:"Tormenta eléctrica","lightning-rainy":"Tormenta",partlycloudy:"Parcialmente nublado",pouring:"Diluviando",rainy:"Lluvioso",snowy:"Nieve","snowy-rainy":"Aguanieve",sunny:"Soleado",windy:"Viento","windy-variant":"Fuerte viento",exceptional:"Caos"},Ie={0:"Dom",1:"Lun",2:"Mar",3:"Mie",4:"Jue",5:"Vie",6:"Sab"},Ee={weather:Xe,day:Ie},Be={"clear-night":"Selkeää",cloudy:"Pilvistä",fog:"Sumua",hail:"Raekuuroja",lightning:"Ukkosta","lightning-rainy":"Ukkoskuuroja",partlycloudy:"Puolipilvistä",pouring:"Voimakasta vesisadetta",rainy:"Vesisadetta",snowy:"Lumisadetta","snowy-rainy":"Räntäsadetta",sunny:"Selkeää",windy:"Tuulista","windy-variant":"Voimakasta tuulta",exceptional:"Poikkeuksellista"},Ve={0:"Su",1:"Ma",2:"Ti",3:"Ke",4:"To",5:"Pe",6:"La"},Ke={weather:Be,day:Ve},Ue={"clear-night":"Dégagé",cloudy:"Nuageux",fog:"Brouillard",hail:"Grêle",lightning:"Orages","lightning-rainy":"Orages et pluie",partlycloudy:"Partiellement nuageux",pouring:"Pluie battante",rainy:"Pluie",snowy:"Neige","snowy-rainy":"Neige fondante",sunny:"Ensoleillé",windy:"Venteux","windy-variant":"Vent fort",exceptional:"Exceptionnelle"},Ge={0:"Dim",1:"Lun",2:"Mar",3:"Mer",4:"Jeu",5:"Ven",6:"Sam"},Oe={weather:Ue,day:Ge},Qe={"clear-night":"בהיר",cloudy:"מעונן",fog:"ערפל",hail:"ברד",lightning:"סופות רעמים","lightning-rainy":"סופות רעמים גשומות",partlycloudy:"מעונן חלקית",pouring:"גשם זלעפות",rainy:"גשום",snowy:"מושלג","snowy-rainy":"ברד",sunny:"שמשי",windy:"סוער","windy-variant":"רוח חזקה",exceptional:"חריג"},Ye={0:"ראשון",1:"שני",2:"שלישי",3:"רביעי",4:"חמישי",5:"שישי",6:"שבת"},qe={weather:Qe,day:Ye},Je={"clear-night":"Tiszta",cloudy:"Felhős",fog:"Ködös",hail:"Jégeső",lightning:"Villámlás","lightning-rainy":"Zivatar",partlycloudy:"Helyenként felhős",pouring:"Felhőszakadás",rainy:"Esős",snowy:"Havazás","snowy-rainy":"Havaseső, ónoseső",sunny:"Napos",windy:"Szeles","windy-variant":"Erős szél",exceptional:"Kivételes"},Re={0:"V",1:"H",2:"K",3:"Sze",4:"Cs",5:"P",6:"Szo"},Le={weather:Je,day:Re},Fe={"clear-night":"Sereno",cloudy:"Nuvoloso",fog:"Nebbia",hail:"Grandine",lightning:"Temporali","lightning-rainy":"Temporali con pioggia",partlycloudy:"Parzialmente nuvoloso",pouring:"Rovesci",rainy:"Pioggia",snowy:"Neve","snowy-rainy":"Nevischio",sunny:"Soleggiato",windy:"Vento","windy-variant":"Vento forte",exceptional:"Tempesta"},Ze={0:"Dom",1:"Lun",2:"Mar",3:"Mer",4:"Gio",5:"Ven",6:"Sab"},_e={weather:Fe,day:Ze},$e={"clear-night":"맑음",cloudy:"구름많음",fog:"안개",hail:"우박",lightning:"번개","lightning-rainy":"번개, 뇌우",partlycloudy:"구름조금",pouring:"강한 비",rainy:"비",snowy:"눈","snowy-rainy":"진눈깨비",sunny:"맑음",windy:"바람","windy-variant":"매우 강한 바람",exceptional:"예외"},et={0:"일",1:"월",2:"화",3:"수",4:"목",5:"금",6:"토"},tt={weather:$e,day:et},at={"clear-night":"Klart",cloudy:"Overskyet",fog:"Tåke",hail:"Hagl",lightning:"Lyn","lightning-rainy":"Lyn, regn",partlycloudy:"Delvis overskyet",pouring:"Pøsregn",rainy:"Regn",snowy:"Snø","snowy-rainy":"Sludd",sunny:"Sol",windy:"Vindfullt","windy-variant":"Sterk vind",exceptional:"Storm"},nt={0:"Søn",1:"Man",2:"Tir",3:"Ons",4:"Tor",5:"Fre",6:"Lør"},it={weather:at,day:nt},rt={"clear-night":"Helder",cloudy:"Bewolkt",fog:"Mist",hail:"Hagel",lightning:"Onweersbuien","lightning-rainy":"Onweersbuien met regen",partlycloudy:"Half bewolkt",pouring:"Regen",rainy:"Regenachtig",snowy:"Sneeuw","snowy-rainy":"Natte sneeuw",sunny:"Zonnig",windy:"Winderig","windy-variant":"Storm",exceptional:"Chaos"},ot={0:"Zo",1:"Ma",2:"Di",3:"Wo",4:"Do",5:"Vr",6:"Za"},dt={weather:rt,day:ot},st={"clear-night":"Bezchmurna noc",cloudy:"Pochmurnie",fog:"Mgła",hail:"Grad",lightning:"Burza","lightning-rainy":"Burza z piorunami",partlycloudy:"Częściowe zachmurzenie",pouring:"Ulewa",rainy:"Deszczowo",snowy:"Śnieg","snowy-rainy":"Śnieg z deszczem",sunny:"Słonecznie",windy:"Wietrznie","windy-variant":"Silny wiatr",exceptional:"Chaos"},ut={0:"niedz.",1:"pon.",2:"wt.",3:"śr.",4:"czw.",5:"pt.",6:"sob."},mt={weather:st,day:ut},lt={"clear-night":"Céu limpo, sem nuvens",cloudy:"Nublado",fog:"Nevoeiro",hail:"Granizo",lightning:"Raios","lightning-rainy":"Chuvoso com raios",partlycloudy:"Parcialmente nublado",pouring:"Torrencial",rainy:"Chuvoso",snowy:"Neve","snowy-rainy":"Chuvoso com neve",sunny:"Ensolarado",windy:"Ventania","windy-variant":"Ventania forte",exceptional:"Excepcional"},ht={0:"Dom",1:"Seg",2:"Ter",3:"Qua",4:"Qui",5:"Sex",6:"Sáb"},ct={weather:lt,day:ht},ft={"clear-night":"Céu limpo, sem nuvens",cloudy:"Nublado",fog:"Nevoeiro",hail:"Granizo",lightning:"Raios","lightning-rainy":"Chuvoso com raios",partlycloudy:"Parcialmente nublado",pouring:"Torrencial",rainy:"Chuvoso",snowy:"Neve","snowy-rainy":"Chuvoso com neve",sunny:"Ensolarado",windy:"Ventania","windy-variant":"Ventania forte",exceptional:"Excepcional"},gt={0:"Dom",1:"Seg",2:"Ter",3:"Qua",4:"Qui",5:"Sex",6:"Sáb"},pt={weather:ft,day:gt},vt={"clear-night":"Senin",cloudy:"Innorat",fog:"Ceata",hail:"Grindina",lightning:"Fulgere","lightning-rainy":"Furtuni cu ploaie",partlycloudy:"Partial innorat",pouring:"Averse",rainy:"Ploaie",snowy:"Ninsoare","snowy-rainy":"Lapovita",sunny:"Insorit",windy:"Vant","windy-variant":"Vant puternic",exceptional:"Furtuna"},bt={0:"Dum",1:"Lun",2:"Mar",3:"Mie",4:"Joi",5:"Vin",6:"Sam"},wt={weather:vt,day:bt},yt={"clear-night":"Ясно",cloudy:"Облачно",fog:"Туман",hail:"Град",lightning:"Гроза","lightning-rainy":"Дождь с грозой",partlycloudy:"Переменная облачность",pouring:"Проливной дождь",rainy:"Дождь",snowy:"Снег","snowy-rainy":"Мокрый снег",sunny:"Солнечно",windy:"Ветер","windy-variant":"Сильный ветер",exceptional:"Буря"},At={0:"Вс",1:"Пн",2:"Вт",3:"Ср",4:"Чт",5:"Пт",6:"Сб"},kt={weather:yt,day:At},Mt={"clear-night":"Jasno",cloudy:"Zamračené",fog:"Hmla",hail:"Krupobitie",lightning:"Búrky","lightning-rainy":"Daždivé búrky",partlycloudy:"Polooblačno",pouring:"Silný dážď",rainy:"Daždivé",snowy:"Sneženbie","snowy-rainy":"Fujavica",sunny:"Slnečno",windy:"Veterno","windy-variant":"Prudký vietor",exceptional:"Chaos"},Pt={0:"Ned",1:"Pon",2:"Uto",3:"Str",4:"Štv",5:"Pia",6:"Sob"},Wt={weather:Mt,day:Pt},xt={"clear-night":"Klart, natt",cloudy:"Molnigt",fog:"Dimma",hail:"Hagel",lightning:"Åska","lightning-rainy":"Åska, regnigt",partlycloudy:"Delvis molnigt",pouring:"Ösregn",rainy:"Regnigt",snowy:"Snöigt","snowy-rainy":"Snöblandat regn",sunny:"Soligt",windy:"Blåsigt","windy-variant":"Stark blåst",exceptional:"Exceptionellt"},zt={0:"Sön",1:"Mån",2:"Tis",3:"Ons",4:"Tor",5:"Fre",6:"Lör"},jt={weather:xt,day:zt},Ct={"clear-night":"ท้องฟ้าแจ่มใส",cloudy:"มีเมฆ",fog:"หมอก",hail:"ลูกเห็บ",lightning:"พายุฝนฟ้าคะนอง","lightning-rainy":"ฝนฟ้าคะนอง",partlycloudy:"มีเมฆบางส่วน",pouring:"ฝนตกหนัก",rainy:"มีฝนคก",snowy:"หิมะตก","snowy-rainy":"ฝนตกเป็นลูกเห็บ",sunny:"แดดจัด",windy:"มีลมจัด","windy-variant":"ลมแรง",exceptional:"Exceptional"},Tt={0:"อา.",1:"จ.",2:"อ.",3:"พ.",4:"พฤ.",5:"ศ.",6:"ส."},St={weather:Ct,day:Tt},Ht={"clear-night":"Ясно",cloudy:"Хмарно",fog:"Туман",hail:"Грім",lightning:"Грози","lightning-rainy":"Дощові грози",partlycloudy:"Мінлива хмарність",pouring:"Злива",rainy:"Дощ",snowy:"Сніг","snowy-rainy":"Мокрий сніг",sunny:"Сонячно",windy:"Вітряно","windy-variant":"Дуже вітряно",exceptional:"Буря"},Dt={0:"Нд",1:"Пн",2:"Вт",3:"Ср",4:"Чт",5:"Пт",6:"Сб"},Nt={weather:Ht,day:Dt},Xt={"clear-night":"Trời trong",cloudy:"Trời mây",fog:"Sương mù",hail:"Mưa đá",lightning:"Dông bão","lightning-rainy":"Mưa Dông",partlycloudy:"Mây nhẹ",pouring:"Mưa Lớn",rainy:"Mưa",snowy:"Tuyết","snowy-rainy":"Mưa Tuyết",sunny:"Nắng",windy:"Gió","windy-variant":"Gió mạnh",exceptional:"Khắc Nghiệt"},It={0:"CN",1:"T2",2:"T3",3:"T4",4:"T5",5:"T6",6:"T7"},Et={weather:Xt,day:It},Bt={"clear-night":"晴夜",cloudy:"多雲",fog:"霧",hail:"冰雹",lightning:"雷","lightning-rainy":"雷雨",partlycloudy:"局部多雲",pouring:"大雨",rainy:"雨",snowy:"雪","snowy-rainy":"雪雨",sunny:"晴",windy:"有風","windy-variant":"有風",exceptional:"惡劣"},Vt={0:"週日",1:"週一",2:"週二",3:"週三",4:"週四",5:"週五",6:"週六"},Kt={weather:Bt,day:Vt};const Ut={bg:be,cs:Object.freeze({__proto__:null,weather:xe,day:ze,default:je}),ca:We,da:Ae,de:Object.freeze({__proto__:null,weather:Ce,day:Te,default:Se}),en:Object.freeze({__proto__:null,weather:He,day:De,default:Ne}),es:Object.freeze({__proto__:null,weather:Xe,day:Ie,default:Ee}),fi:Object.freeze({__proto__:null,weather:Be,day:Ve,default:Ke}),fr:Object.freeze({__proto__:null,weather:Ue,day:Ge,default:Oe}),he:Object.freeze({__proto__:null,weather:Qe,day:Ye,default:qe}),hu:Object.freeze({__proto__:null,weather:Je,day:Re,default:Le}),it:Object.freeze({__proto__:null,weather:Fe,day:Ze,default:_e}),ko:Object.freeze({__proto__:null,weather:$e,day:et,default:tt}),nb:Object.freeze({__proto__:null,weather:at,day:nt,default:it}),nl:Object.freeze({__proto__:null,weather:rt,day:ot,default:dt}),pl:Object.freeze({__proto__:null,weather:st,day:ut,default:mt}),ptbr:Object.freeze({__proto__:null,weather:lt,day:ht,default:ct}),pt:Object.freeze({__proto__:null,weather:ft,day:gt,default:pt}),ro:Object.freeze({__proto__:null,weather:vt,day:bt,default:wt}),ru:Object.freeze({__proto__:null,weather:yt,day:At,default:kt}),sk:Object.freeze({__proto__:null,weather:Mt,day:Pt,default:Wt}),sv:Object.freeze({__proto__:null,weather:xt,day:zt,default:jt}),th:Object.freeze({__proto__:null,weather:Ct,day:Tt,default:St}),uk:Object.freeze({__proto__:null,weather:Ht,day:Dt,default:Nt}),vi:Object.freeze({__proto__:null,weather:Xt,day:It,default:Et}),zhtw:Object.freeze({__proto__:null,weather:Bt,day:Vt,default:Kt})};function Gt(e){return Math.max(...e)}function Ot(e){return Math.min(...e)}function Qt(e,t=0){return t<=0?Math.round(e):Math.ceil((e-t/2)/t)*t}var Yt="data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 512 512'%3e%3cdefs%3e%3clinearGradient id='a' x1='150' x2='234' y1='119.2' y2='264.8' gradientUnits='userSpaceOnUse'%3e%3cstop offset='0' stop-color='%23fbbf24'/%3e%3cstop offset='.5' stop-color='%23fbbf24'/%3e%3cstop offset='1' stop-color='%23f59e0b'/%3e%3c/linearGradient%3e%3csymbol id='b' viewBox='0 0 384 384'%3e%3ccircle cx='192' cy='192' r='84' fill='url(%23a)' stroke='%23f8af18' stroke-miterlimit='10' stroke-width='6'/%3e%3cpath fill='none' stroke='%23fbbf24' stroke-linecap='round' stroke-miterlimit='10' stroke-width='24' d='M192 61.7V12m0 360v-49.7m92.2-222.5 35-35M64.8 319.2l35.1-35.1m0-184.4-35-35m254.5 254.5-35.1-35.1M61.7 192H12m360 0h-49.7'%3e%3canimateTransform additive='sum' attributeName='transform' dur='6s' repeatCount='indefinite' type='rotate' values='0 192 192%3b 45 192 192'/%3e%3c/path%3e%3c/symbol%3e%3c/defs%3e%3cuse xlink:href='%23b' width='384' height='384' transform='translate(64 64)'/%3e%3c/svg%3e",qt="data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 512 512'%3e%3cdefs%3e%3csymbol id='a' viewBox='0 0 375 375'%3e%3ccircle cx='187.5' cy='187.5' r='84' fill='none' stroke='%23fbbf24' stroke-miterlimit='10' stroke-width='15'/%3e%3cpath fill='none' stroke='%23fbbf24' stroke-linecap='round' stroke-miterlimit='10' stroke-width='15' d='M187.5 57.2V7.5m0 360v-49.7m92.2-222.5 35-35M60.3 314.7l35.1-35.1m0-184.4-35-35m254.5 254.5-35.1-35.1M57.2 187.5H7.5m360 0h-49.7'%3e%3canimateTransform additive='sum' attributeName='transform' dur='6s' repeatCount='indefinite' type='rotate' values='0 187.5 187.5%3b 45 187.5 187.5'/%3e%3c/path%3e%3c/symbol%3e%3c/defs%3e%3cuse xlink:href='%23a' width='375' height='375' transform='translate(68.5 68.5)'/%3e%3c/svg%3e",Jt="data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 512 512'%3e%3cdefs%3e%3clinearGradient id='a' x1='90' x2='206' y1='155.6' y2='356.4' gradientUnits='userSpaceOnUse'%3e%3cstop offset='0' stop-color='%23d4d7dd'/%3e%3cstop offset='.5' stop-color='%23d4d7dd'/%3e%3cstop offset='1' stop-color='%23bec1c6'/%3e%3c/linearGradient%3e%3clinearGradient id='b' x1='179.4' x2='226.7' y1='142.4' y2='224.3' gradientUnits='userSpaceOnUse'%3e%3cstop offset='0' stop-color='%23f87171'/%3e%3cstop offset='.5' stop-color='%23f87171'/%3e%3cstop offset='1' stop-color='%23dc2626'/%3e%3c/linearGradient%3e%3clinearGradient xlink:href='%23b' id='c' x1='252.5' x2='291.9' y1='149.2' y2='217.5'/%3e%3clinearGradient xlink:href='%23b' id='d' x1='325.6' x2='357.2' y1='156' y2='210.7'/%3e%3c/defs%3e%3cpath fill='none' stroke='url(%23a)' stroke-linecap='round' stroke-linejoin='round' stroke-width='24' d='M148 376V136'/%3e%3cpath fill='url(%23b)' stroke='%23ef4444' stroke-miterlimit='10' stroke-width='2' d='m191.4 137 28.8 4.3a6.4 6.4 0 015.4 6.3v73.7a6.4 6.4 0 01-5.4 6.3l-28.8 4.2a6.4 6.4 0 01-7.3-6.4v-82a6.4 6.4 0 017.3-6.3Z'%3e%3canimateTransform additive='sum' attributeName='transform' calcMode='spline' dur='3s' keySplines='.42%2c 0%2c .58%2c 1%3b .42%2c 0%2c .58%2c 1' repeatCount='indefinite' type='rotate' values='-6 99 184%3b 6 99 184%3b -6 99 184'/%3e%3c/path%3e%3cpath fill='url(%23c)' stroke='%23ef4444' stroke-miterlimit='10' stroke-width='2' d='m260.6 146.1 28.8 4.2a6.4 6.4 0 015.4 6.3v55.6a6.4 6.4 0 01-5.5 6.3l-28.7 4.2a6.4 6.4 0 01-7.3-6.3v-64a6.4 6.4 0 017.3-6.3Z'%3e%3canimateTransform additive='sum' attributeName='transform' calcMode='spline' dur='3s' keySplines='.42%2c 0%2c .58%2c 1%3b .42%2c 0%2c .58%2c 1' repeatCount='indefinite' type='rotate' values='-6 99 184%3b 6 99 184%3b -6 99 184'/%3e%3canimateTransform additive='sum' attributeName='transform' calcMode='spline' dur='1.5s' keySplines='.42%2c 0%2c .58%2c 1%3b .42%2c 0%2c .58%2c 1' repeatCount='indefinite' type='translate' values='0 0%3b 5 0%3b 0 0'/%3e%3c/path%3e%3cpath fill='url(%23d)' stroke='%23ef4444' stroke-miterlimit='10' stroke-width='2' d='m329.8 155.2 28.7 4.2a6.4 6.4 0 015.5 6.3v37.4a6.4 6.4 0 01-5.5 6.3l-28.7 4.2a6.4 6.4 0 01-7.3-6.3v-45.8a6.4 6.4 0 017.3-6.3Z'%3e%3canimateTransform additive='sum' attributeName='transform' calcMode='spline' dur='3s' keySplines='.42%2c 0%2c .58%2c 1%3b .42%2c 0%2c .58%2c 1' repeatCount='indefinite' type='rotate' values='-6 99 184%3b 6 99 184%3b -6 99 184'/%3e%3canimateTransform additive='sum' attributeName='transform' calcMode='spline' dur='1.5s' keySplines='.42%2c 0%2c .58%2c 1%3b .42%2c 0%2c .58%2c 1' repeatCount='indefinite' type='translate' values='0 0%3b 10 0%3b 0 0'/%3e%3c/path%3e%3c/svg%3e",Rt="data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512'%3e%3cpath fill='none' stroke='%23cbd5e1' stroke-linecap='round' stroke-linejoin='round' stroke-width='24' d='M148 376V136'/%3e%3cpath fill='%23ef4444' d='m191.4 137 28.8 4.3a6.4 6.4 0 015.4 6.3v73.7a6.4 6.4 0 01-5.4 6.3l-28.8 4.2a6.4 6.4 0 01-7.3-6.4v-82a6.4 6.4 0 017.3-6.3Z'%3e%3canimateTransform additive='sum' attributeName='transform' calcMode='spline' dur='3s' keySplines='.42%2c 0%2c .58%2c 1%3b .42%2c 0%2c .58%2c 1' repeatCount='indefinite' type='rotate' values='-6 99 184%3b 6 99 184%3b -6 99 184'/%3e%3c/path%3e%3cpath fill='%23ef4444' d='m260.6 146.1 28.8 4.2a6.4 6.4 0 015.4 6.3v55.6a6.4 6.4 0 01-5.5 6.3l-28.7 4.2a6.4 6.4 0 01-7.3-6.3v-64a6.4 6.4 0 017.3-6.3Z'%3e%3canimateTransform additive='sum' attributeName='transform' calcMode='spline' dur='3s' keySplines='.42%2c 0%2c .58%2c 1%3b .42%2c 0%2c .58%2c 1' repeatCount='indefinite' type='rotate' values='-6 99 184%3b 6 99 184%3b -6 99 184'/%3e%3canimateTransform additive='sum' attributeName='transform' calcMode='spline' dur='1.5s' keySplines='.42%2c 0%2c .58%2c 1%3b .42%2c 0%2c .58%2c 1' repeatCount='indefinite' type='translate' values='0 0%3b 5 0%3b 0 0'/%3e%3c/path%3e%3cpath fill='%23ef4444' d='m329.8 155.2 28.7 4.2a6.4 6.4 0 015.5 6.3v37.4a6.4 6.4 0 01-5.5 6.3l-28.7 4.2a6.4 6.4 0 01-7.3-6.3v-45.8a6.4 6.4 0 017.3-6.3Z'%3e%3canimateTransform additive='sum' attributeName='transform' calcMode='spline' dur='3s' keySplines='.42%2c 0%2c .58%2c 1%3b .42%2c 0%2c .58%2c 1' repeatCount='indefinite' type='rotate' values='-6 99 184%3b 6 99 184%3b -6 99 184'/%3e%3canimateTransform additive='sum' attributeName='transform' calcMode='spline' dur='1.5s' keySplines='.42%2c 0%2c .58%2c 1%3b .42%2c 0%2c .58%2c 1' repeatCount='indefinite' type='translate' values='0 0%3b 10 0%3b 0 0'/%3e%3c/path%3e%3c/svg%3e",Lt="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAMAAAD04JH5AAAB7FBMVEUAAAD/rxD/vyD/vyD6rxX/vyD3rxj7vyT3rxj4rxf6vyL4rxf6vyL5rxj7vyT3rxj7vyT7vyP6vyP6vyP4rxj7vyT3rhj7viT5sBj3rRf3rRj3rxj4sBj4rhf4rhj4rxj4rxn3rRf3rhf7vyP7viP4rxf4rhf4rxf4rxj4rRf4rxf4rxj4rRf4rhj4rhn4sBn5sRn4rhf4rhj4rxj4rhf4rxf4rxj4sBj3rBX4rxf4sRn1oA31oQ31og72oQz2oQ32oQ72og72ow72ow/2pA/2pBD2pRD2pRH2phH2pxH2pxL2qBL2qRP2qhT3ow/3pA/3pRD3pRH3phD3phH3pxH3pxL3qBL3qBP3qRP3qRT3qhT3qxT3qxX3rBX3rBb3rRb3rxj3sBj3sBn4qBL4qRP4qhP4qhT4qxX4qxb4rBX4rBb4rRb4rRf4rhf4rhj4rxf4rxj4sBj4sBn4sRn4sRr4shr4sxv4tRz4tR35rRb5rhf5rxj5sBj5sBn5sRn5sRr5shr5shv5sxv5tBv5tBz5tRz5tR35th35th75tx75uB75uB/6tR36th36th76tx76uB76uB/6uR/6uSD6uiD6uiH6uyH6vCH6vCL6vSL6vSP6viP7uyH7vCH7vCL7vSL7vSP7viP7viT7vyT7xJWdAAAAO3RSTlMAEBAgMDBAQGBvb3Bwf3+AgJCfoL+/wMDHyMjI1dbW4+Pk5O/w8vPz8/T09Pf39/f3+fn5+/v7+/z8/KKGs5oAAASkSURBVHja7Vr7VxpHFIYV1Agqhoix1dYqUmKb2pbGptbEUpBQ7ZsijxLpw2oL0k4gSl8mhCyh2zyQR1bSqkD3H+0uDwEPu4fVmeWcnPl+3B/2+/bO/e7M3LsyGQYGBgYGBgYGBgbGmXB+ijnfSX41w0LdQQFDnIChDgrQcAJGsAAsAAt47gUQfQNdpxHQNdBHQBEwzDBTSvEClFMMMwyDv4cj4VFQFqDl5WeYHlgbDo8C/s2owg9loyL0/AqIEXYFCH5+PZQkUAookMkE4s/olXBsIFoBZH7RCqDzi1SAgL+uoI2kIlDwHytQt2tb2Pw1BT1tFi74/BUFTVVXce7CRSMAxosXzikan4+g4Wc3F03DAsj7J8BslKJomqKis2CiX96wCJou5Ptwv3GOOmSOcUjNGfslPAYoxkxUiWlCiTKNKaTi7zbOn6AvS5if7paGvxdEmZaIgl5Jvh9QDA8oIEEMFMYow4voNPo8GJtnBDA/hpp/0FQSEpA3DaLllxspAfpSoRCdlqMNwBx/AP4t5o9ymStoQzCxx8tfLO4f5HLpnZeRWgAc8gS/lD+i6Wzm71QCoDSCapaHn43+01wmQ6WSj95QIRSga1kDSs8KNJ3LPtxLJhNk/DsdFKq+gQYc3/FepFpF/9kRfZDN7qWSj0kyfu/bF+p3ysZ3iOPXNpPU7ngtTPhPcZ9mcy9NPUkk7se3Y+FvXq3fKRuhFSXgJE31MaBPPP+vUKAPctl0+q/HiUQ8vn03/OcvoPU7phAI4JxPV3LvAXl/OxYJA7AV4hGgP8sS1M6Cr1HNzs+zzs+kqdQDNvqxWHgX/BwM+mfqZ8PTL4FMPTRyDK26RRKWc6/s/GSSJHfuRe7cAqHQWuDrtdFaEqq1je+AbMNy5XmayaRY55NkLBbZBSC0tfaT1+vXoSxEb1Zzr+r8NOv8Su7dCoX8AZ/P4165rEJeihudz1ae+O1y9AMB34bb7VxHWoplkxTn/Px+PfdY54dByB/0+bxel+sjxyeTaLfjd4tFzvlc5ak5fzcUCgZ8m17P6qrd8SXi7Vg+82vd+STr/AiXezfZ3HO7lp03bNaPDWgPJOyRLFOJ/qOq88FW8OYmF/1lh+1zy2dvIz6SyWQvzXPOT5A71dxbC/i8bvey025fsn5ovjqO/lhuiJV3vVjkTtX5G26X03njC6vVbPYYJLiedYNYo/O9nhU292xLFsvC4iqQ5HLWC8K371adv+l2rzrtjqUli3lh0SPN1YyNgeG9P4C/nns2i+Wa+f3rVw0SXU7ZPBg3/f4b53xXNfofLF7//q1xya7nnBtnrgR/YJ1vt1mt18wLn668Y0DuP67/31CRBifB5R83Nr5yrK97XgevDNbrj8B84WxNqpP9f4VKN3oJgEujOlVT8IfF9ZXF9X/bbdPBV9B+/1/NoFAgov9P6BEoENV/VsJXILL/DV2B6P47ZAWn6P9DVSDU/ydYzw8TAgpgDK2E+v8CYzs9tLGdUP9faHCphzW4FOr/C45u9bDm2gR//194eK1B/4MP/oEBC8ACsADNKdpfUNHxHxplWn1HA4CBgYGBgYGBgYHxXOB/qQBqdeRHvmcAAAAASUVORK5CYII=",Ft="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAMAAAD04JH5AAAAUVBMVEUAAAD/vyD/vyD/vyD7viT7vyT8vyP8vyP6vyL6vyL7vyT7vyT7vyT7vyP6vyP6vyP7vyP7vyP7vyT7viT6vyT6viT6vyP6viP7vyP7viP7vyQYZo9gAAAAGnRSTlMAECAwP0BQYG9wf4CPkJ+gr7C/wM/Q3+Dv8DtSRt8AAAJ+SURBVHja7ZrRkqowEESTsFERARWF5Pz/h96H9S7oagRNYK2afrJE6CMZYqajUiKRSCQSiUQikeizlbVttihADfWiAA00AiAAAiAA6V1WG/0KgN6sIvnDSU+fivUJ4hDkPCaw3tvH/uRRAPQ5QKAC35+zVksRRPV/gSCy/2SC6P4TCRL4TyJI4n8hyMc+tvH9vwmuJpZsezy20B6P2+xm4krhr5TOB/6mahmorcyAIE/if8Wy45d2yV17rR0Avi5ya/Oi9gC49Vz+OwBfDgY+Kz3AbhZ7vQeozfW7pgbYzzEMe8Df6ccyD+zT+5fA2dw7Ys5Ambz+ArOMPgOJK1E78ObRUePB6eQDEOjHs9SDYHjSjteASRsH+OD1jU8bGLRP73AJbcJAJlwBIz/yhgrwzz7joUjZiNUjyqRJCVCMuEtRALLq+KPK9jX4dFGW91Voh9fIptd7L3d5E7DPTrTA5aW7WjNNBOiGJ/vXAPzwGt3UIaibH9W2pxozBP+97PAa2acV4d98DIu+Hh/KpZyIFp+KVTfmx6hL569qcOatBcOnL0gWX5Ip7UODYBz4xL3JOpBT6FP6Zfn3IJzuNyanORoTpQ6Au1MH1gGHOZrTA0B125xWAId5MoISwO2G7fnOMc/9v1TiJZGotpuvr822uuQVswUUSunyd0RTpg+Ghvm/qa/WTN0wsAjsL7zlf5v/Z0XTdNA1TXEb0510Gv/xQWV8ggn560v7CxH9kxBMzJ+jE0zOvyMTvJC/RyV4Kf+PSRDK/61zNkAQZ9sulP+HNi7PsTYuQ/l/cOs2X6nkku17ARAAAVgcYPG/82Vdt+wfGkUikUgkEolEItH7+geuyEkx4xwh4gAAAABJRU5ErkJggg==",Zt="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAYAAADDPmHLAAAGF0lEQVR42u3bTWgUZxgH8P/7zsxuTDZuJERiPygoQo2tLdhSJEUiHoq0YEUp9FjwUuipl0LPvRYPpRXsoediPViqp2LXFClKQwXbVKQYoaFqosnmY5PMzPu+Tw87u9nsRzRS02zm/7sMSXYyyTz/ed73CRuAiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiDYotVF/sBs3/npeBeojCAYE6nKHb7/YvXt3yJL9t/yN+EONjY11lBbdTxDsKqdU3gmN3g/gfZYsBQFYXMSrUOXi17SqI81e+/eBA1s6OjoGfBELoAiguK1QKLK0bRwAq0yHgl7xOQHyzV6b37HjS7+39wMB5hHHYxKGxfkTJ+bF2ltWqQl/aupirlC4zlK3UQAe1+Tg4DNed/frOpcDgByAl6uBsfaIZy0kn/90prf3vfy5cxfrz/9jYCDzbH//S3BOK6CogGJ3X9+0OnvWMgBtQpzTTXe3ngfleRCtu3Sx+AaAhgC8sGfPZ7qn50N4Xs5F0Q1YG84tLU3MHj9+T0TueGH4S+7ChR8ZgHYPibVBw+f27euaD4JdeuvWHADorq7a7gFYCxeG83NHj37Sff78Vw3nA6o4NPSK1joTicx0BMF0bny8qEZHIwagDdwNAsk5F7TqHvA8eEGQs7OzbwlwWgFS+5qFY8dOZvL5U8hmu/w4vi1xvFTK52/P7d1bctbe1Nb+mctkvtvoy0lqA/DYnAvqiy+Amstk3s709HRBKQDYmXxpAM5BrIXEMeYmJk4B+Hgj/3qaFV47BQhEguZ3VEMFAXRnJ/xc7s2pnTvzDMD/t0GEi2M4557s4Y/j8n7gyfYdMFG0Vfr6hEvAulde4IyBWAsbx8AaAyDWlouffI+1hk7iGDaOIdHG3w9uugCItXDGlHfxxkDW0AHE2ur5Ysyau4eLIjhj4KIIYgysMQzAeha+Wjznqk+vi6JHdwCRartfcUyC9MhrGwNbKXocl0OXHBUDsA4b9UrRKk9+EgZJOgBEVi1e9YmvP8Yx1CoBqFyzEpZKCCqdQDEA61B8Y4DkhsO56tpf/TiK4K22UQtDoFUIVgmAGAO7tFR+4muK7mo6gWftht9lt38HSNq8JMWvrv1JJ4AxLddxZy1UGC6/vn4ZiCL4rZYPa2EWF5f3CrXFT45KZMPfPr/962+hkgJU235NJ5A4hm5RCDEGJgwbn/zkPDEGonXL60oYNhS9thNoz5u8t7DgGICnKbn5aLYBTIqKFkWEc5Aoar4BTI5+JtPqutO2VKqOmhLHQHJdZS0yWl9zwJm9o6PzDMBT3gNI0s4bRsDKshAELervYJeWWhZfrIVoPdPsXBVFZyDyonLO+cADiPwDz7vjZ7PXFTDugAe9hcI4l4B12ANYkeX2X7sBrITBa9wG7hgZiR4ePmydUsudwhgo5wBr4YuUPN+/CZGvm11226VLw7J//8G57u7O7kJhSgGuHW/fpugALlnPpX4ErHSCIGh4M6kCzHQcf2OV2qWcm9Vazzqtb2ml7vudnT8DKIYzM/f7R0YmW11bjYwsAFho5/vX1gEI4zjMZLOl2tFPiQDWQotAKXXf27JlTBYWTjd9ioeHv58YGrrkR5HuvXp1FinU1gF47tq1h5MHD34bWOs7paZ0ECwB+A3W3stmsyMxUHQTE+PbV9mIbS8U5pFibb8E9A0Pfy6Dg2fuLi7a/nJLps0YAFnljyrqypU5lvLJ6HYvPm3SDlBfdIaAHYDS2AHqj5SGDmAaQ6AUi5WqJaD+yXeOHSA1ATBJC2D7T/EeYPlNHAxBaqcAdgBOAdW1nyFI+RRAqdoEAiIO5X/BcwxB+vYAnAI4BbiVfwRiCDgFULqmgMraD4YgvVMAi5/KDmAAKLdy7WcIUjYFsPicAuqKzxBwCqA0TgF8P0CKpwB2gFRPAbVrP0OQsimAxeceoKb4iiHgFEAp6wD8vwBOASx+WqcAA+VUUnzw/QDp6wDB7wBKdcW/zHKlJACHDr32QCDvQtyvzrmSc/IDrJxkuYiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIgoRf4F2tD2QHPgQuUAAAAASUVORK5CYII=",_t="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAMAAAD04JH5AAAAhFBMVEUAAADb2//f39/vQEDM2ebK0+XvQEDN1ePvRUXN1uTvRUXL1+PvRETL1uHvRETvQ0PvQ0PvQkLvQ0PvRETK1eDvRETvRETL1OHvQ0PvQ0PvQ0PL1ODvQ0PvRETK1OHvRETL1eDvRETK1OHvRETL1OHvQ0PvQ0PL1eDuRETL1OHL1eHvRERZH84CAAAAKnRSTlMABwgQFB0gJDA4P0BARE9QX2BvcHR/gImQn6Cnr7Czv8DAy8/c4O/w8PSzgpRyAAAA50lEQVR42u3WyxLBQBBA0fGKiCFeGYQR8Qhm/v//EEXZKBvSRd2zSq/6VhZJKwUAAAAAAIDf0JquJjXB/fWdc24hGNC57HcHwYDuNcCVj0NfZPOkH4kF5P6mCIQDvC7HuPDZMhlEDakAc38hoXCAN+UYFn6bJaMokAp4jLF0gJUOyAkggADpgFQoYHz/DoWVB4zLMUitGerP/xrfBhztd8+D1wGBTU2sqzxI7G39PlVVegrQdmZ0qCr2FCB+FRNAAAEEEEAAAQQQQAABBBBAAAEymqfL/rVggOptTqu2AgAAAAAAwF86Axm6eLImqNvhAAAAAElFTkSuQmCC";const $t={line:{rainy:{day:"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 512 512'%3e%3cdefs%3e%3csymbol id='c' viewBox='0 0 193 193'%3e%3ccircle cx='96.5' cy='96.5' r='40' fill='none' stroke='%23fbbf24' stroke-miterlimit='10' stroke-width='9'/%3e%3cpath fill='none' stroke='%23fbbf24' stroke-linecap='round' stroke-miterlimit='10' stroke-width='9' d='M96.5 29.9V4.5m0 184v-25.4m47.1-113.7 18-18M31.4 161.6l18-18m0-94.2-18-18m130.2 130.2-18-18M4.5 96.5h25.4m158.6 0h-25.4'%3e%3canimateTransform additive='sum' attributeName='transform' dur='6s' repeatCount='indefinite' type='rotate' values='0 96.5 96.5%3b 45 96.5 96.5'/%3e%3c/path%3e%3c/symbol%3e%3csymbol id='d' viewBox='0 0 359 231'%3e%3cpath fill='none' stroke='%23e2e8f0' stroke-linecap='round' stroke-linejoin='round' stroke-width='15' d='M295.5 223.5a56 56 0 000-112l-2.5.1a83.9 83.9 0 00-153-64.2 56 56 0 00-84.6 48.1 56.6 56.6 0 00.8 9 60 60 0 0011.2 119'/%3e%3c/symbol%3e%3csymbol id='b' viewBox='0 0 435.5 371.5'%3e%3cg clip-path='url(%23a)'%3e%3cuse xlink:href='%23c' width='193' height='193' transform='translate(69.5 110.5)'/%3e%3c/g%3e%3cuse xlink:href='%23d' width='359' height='231' transform='translate(76.5 140.5)'/%3e%3c/symbol%3e%3csymbol id='e' overflow='visible' viewBox='0 0 128 56'%3e%3cpath fill='%230a5ad4' d='M8 56a8 8 0 01-8-8V8a8 8 0 0116 0v40a8 8 0 01-8 8Z' opacity='0'%3e%3canimateTransform id='x1' additive='sum' attributeName='transform' begin='0s%3b x1.end%2b.33s' dur='.67s' type='translate' values='0 -60%3b 0 60'/%3e%3canimate id='y1' attributeName='opacity' begin='0s%3b y1.end%2b.33s' dur='.67s' keyTimes='0%3b .25%3b 1' values='0%3b 1%3b 0'/%3e%3c/path%3e%3cpath fill='%230a5ad4' d='M64 56a8 8 0 01-8-8V8a8 8 0 0116 0v40a8 8 0 01-8 8Z' opacity='0'%3e%3canimateTransform id='x2' additive='sum' attributeName='transform' begin='.33s%3b x2.end%2b.33s' dur='.67s' type='translate' values='0 -60%3b 0 60'/%3e%3canimate id='y2' attributeName='opacity' begin='.33s%3b y2.end%2b.33s' dur='.67s' keyTimes='0%3b .25%3b 1' values='0%3b 1%3b 0'/%3e%3c/path%3e%3cpath fill='%230a5ad4' d='M120 56a8 8 0 01-8-8V8a8 8 0 0116 0v40a8 8 0 01-8 8Z' opacity='0'%3e%3canimateTransform id='x3' additive='sum' attributeName='transform' begin='-.33s%3b x3.end%2b.33s' dur='.67s' type='translate' values='0 -60%3b 0 60'/%3e%3canimate id='y3' attributeName='opacity' begin='-.33s%3b y3.end%2b.33s' dur='.67s' keyTimes='0%3b .25%3b 1' values='0%3b 1%3b 0'/%3e%3c/path%3e%3c/symbol%3e%3cclipPath id='a'%3e%3cpath fill='none' d='M288 148a83.8 83.8 0 00-71.4 40 56 56 0 00-84.6 48 56.6 56.6 0 00.8 9A60 60 0 0084 304H0V0h288Z'/%3e%3c/clipPath%3e%3c/defs%3e%3cuse xlink:href='%23b' width='435.5' height='371.5'/%3e%3cuse xlink:href='%23e' width='128' height='56' transform='translate(192 344)'/%3e%3c/svg%3e",night:"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 512 512'%3e%3cdefs%3e%3csymbol id='c' viewBox='0 0 178 178'%3e%3cpath fill='none' stroke='%2372b9d5' stroke-linecap='round' stroke-linejoin='round' stroke-width='10' d='M163.6 110.4a84.8 84.8 0 01-85.4-84.3A83.3 83.3 0 0181 5 84.7 84.7 0 005 88.7 84.8 84.8 0 0090.4 173a85.2 85.2 0 0082.6-63.1 88 88 0 01-9.4.5Z'/%3e%3c/symbol%3e%3csymbol id='d' viewBox='0 0 359 231'%3e%3cpath fill='none' stroke='%23e2e8f0' stroke-linecap='round' stroke-linejoin='round' stroke-width='15' d='M295.5 223.5a56 56 0 000-112l-2.5.1a83.9 83.9 0 00-153-64.2 56 56 0 00-84.6 48.1 56.6 56.6 0 00.8 9 60 60 0 0011.2 119'/%3e%3c/symbol%3e%3csymbol id='b' viewBox='0 0 435.5 371.5'%3e%3cg clip-path='url(%23a)'%3e%3cuse xlink:href='%23c' width='178' height='178' transform='translate(77 118)'%3e%3canimateTransform additive='sum' attributeName='transform' dur='6s' repeatCount='indefinite' type='rotate' values='-15 86 86%3b 9 86 86%3b -15 86 86'/%3e%3c/use%3e%3c/g%3e%3cuse xlink:href='%23d' width='359' height='231' transform='translate(76.5 140.5)'/%3e%3c/symbol%3e%3csymbol id='e' overflow='visible' viewBox='0 0 128 56'%3e%3cpath fill='%230a5ad4' d='M8 56a8 8 0 01-8-8V8a8 8 0 0116 0v40a8 8 0 01-8 8Z' opacity='0'%3e%3canimateTransform id='x1' additive='sum' attributeName='transform' begin='0s%3b x1.end%2b.33s' dur='.67s' type='translate' values='0 -60%3b 0 60'/%3e%3canimate id='y1' attributeName='opacity' begin='0s%3b y1.end%2b.33s' dur='.67s' keyTimes='0%3b .25%3b 1' values='0%3b 1%3b 0'/%3e%3c/path%3e%3cpath fill='%230a5ad4' d='M64 56a8 8 0 01-8-8V8a8 8 0 0116 0v40a8 8 0 01-8 8Z' opacity='0'%3e%3canimateTransform id='x2' additive='sum' attributeName='transform' begin='.33s%3b x2.end%2b.33s' dur='.67s' type='translate' values='0 -60%3b 0 60'/%3e%3canimate id='y2' attributeName='opacity' begin='.33s%3b y2.end%2b.33s' dur='.67s' keyTimes='0%3b .25%3b 1' values='0%3b 1%3b 0'/%3e%3c/path%3e%3cpath fill='%230a5ad4' d='M120 56a8 8 0 01-8-8V8a8 8 0 0116 0v40a8 8 0 01-8 8Z' opacity='0'%3e%3canimateTransform id='x3' additive='sum' attributeName='transform' begin='-.33s%3b x3.end%2b.33s' dur='.67s' type='translate' values='0 -60%3b 0 60'/%3e%3canimate id='y3' attributeName='opacity' begin='-.33s%3b y3.end%2b.33s' dur='.67s' keyTimes='0%3b .25%3b 1' values='0%3b 1%3b 0'/%3e%3c/path%3e%3c/symbol%3e%3cclipPath id='a'%3e%3cpath fill='none' d='M288 148a83.8 83.8 0 00-71.4 40 56 56 0 00-84.6 48 56.6 56.6 0 00.8 9A60 60 0 0084 304H0V0h288Z'/%3e%3c/clipPath%3e%3c/defs%3e%3cuse xlink:href='%23b' width='435.5' height='371.5'/%3e%3cuse xlink:href='%23e' width='128' height='56' transform='translate(192 344)'/%3e%3c/svg%3e"},partlycloudy:{day:"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 512 512'%3e%3cdefs%3e%3csymbol id='c' viewBox='0 0 193 193'%3e%3ccircle cx='96.5' cy='96.5' r='40' fill='none' stroke='%23fbbf24' stroke-miterlimit='10' stroke-width='9'/%3e%3cpath fill='none' stroke='%23fbbf24' stroke-linecap='round' stroke-miterlimit='10' stroke-width='9' d='M96.5 29.9V4.5m0 184v-25.4m47.1-113.7 18-18M31.4 161.6l18-18m0-94.2-18-18m130.2 130.2-18-18M4.5 96.5h25.4m158.6 0h-25.4'%3e%3canimateTransform additive='sum' attributeName='transform' dur='6s' repeatCount='indefinite' type='rotate' values='0 96.5 96.5%3b 45 96.5 96.5'/%3e%3c/path%3e%3c/symbol%3e%3csymbol id='d' viewBox='0 0 359 231'%3e%3cpath fill='none' stroke='%23e2e8f0' stroke-linecap='round' stroke-linejoin='round' stroke-width='15' d='M295.5 223.5a56 56 0 000-112l-2.5.1a83.9 83.9 0 00-153-64.2 56 56 0 00-84.6 48.1 56.6 56.6 0 00.8 9 60 60 0 0011.2 119'/%3e%3c/symbol%3e%3csymbol id='b' viewBox='0 0 435.5 371.5'%3e%3cg clip-path='url(%23a)'%3e%3cuse xlink:href='%23c' width='193' height='193' transform='translate(69.5 110.5)'/%3e%3c/g%3e%3cuse xlink:href='%23d' width='359' height='231' transform='translate(76.5 140.5)'/%3e%3c/symbol%3e%3cclipPath id='a'%3e%3cpath fill='none' d='M288 148a83.8 83.8 0 00-71.4 40 56 56 0 00-84.6 48 56.6 56.6 0 00.8 9A60 60 0 0084 304H0V0h288Z'/%3e%3c/clipPath%3e%3c/defs%3e%3cuse xlink:href='%23b' width='435.5' height='371.5'/%3e%3c/svg%3e",night:"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 512 512'%3e%3cdefs%3e%3csymbol id='c' viewBox='0 0 178 178'%3e%3cpath fill='none' stroke='%2372b9d5' stroke-linecap='round' stroke-linejoin='round' stroke-width='10' d='M163.6 110.4a84.8 84.8 0 01-85.4-84.3A83.3 83.3 0 0181 5 84.7 84.7 0 005 88.7 84.8 84.8 0 0090.4 173a85.2 85.2 0 0082.6-63.1 88 88 0 01-9.4.5Z'/%3e%3c/symbol%3e%3csymbol id='d' viewBox='0 0 359 231'%3e%3cpath fill='none' stroke='%23e2e8f0' stroke-linecap='round' stroke-linejoin='round' stroke-width='15' d='M295.5 223.5a56 56 0 000-112l-2.5.1a83.9 83.9 0 00-153-64.2 56 56 0 00-84.6 48.1 56.6 56.6 0 00.8 9 60 60 0 0011.2 119'/%3e%3c/symbol%3e%3csymbol id='b' viewBox='0 0 435.5 371.5'%3e%3cg clip-path='url(%23a)'%3e%3cuse xlink:href='%23c' width='178' height='178' transform='translate(77 118)'%3e%3canimateTransform additive='sum' attributeName='transform' dur='6s' repeatCount='indefinite' type='rotate' values='-15 86 86%3b 9 86 86%3b -15 86 86'/%3e%3c/use%3e%3c/g%3e%3cuse xlink:href='%23d' width='359' height='231' transform='translate(76.5 140.5)'/%3e%3c/symbol%3e%3cclipPath id='a'%3e%3cpath fill='none' d='M288 148a83.8 83.8 0 00-71.4 40 56 56 0 00-84.6 48 56.6 56.6 0 00.8 9A60 60 0 0084 304H0V0h288Z'/%3e%3c/clipPath%3e%3c/defs%3e%3cuse xlink:href='%23b' width='435.5' height='371.5'/%3e%3c/svg%3e"},cloudy:"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 512 512'%3e%3cdefs%3e%3csymbol id='a' viewBox='0 0 359 231'%3e%3cpath fill='none' stroke='%23e2e8f0' stroke-linecap='round' stroke-linejoin='round' stroke-width='15' d='M295.5 223.5a56 56 0 000-112l-2.5.1a83.9 83.9 0 00-153-64.2 56 56 0 00-84.6 48.1 56.6 56.6 0 00.8 9 60 60 0 0011.2 119'/%3e%3c/symbol%3e%3c/defs%3e%3cuse xlink:href='%23a' width='359' height='231' transform='translate(76.5 140.5)'%3e%3canimateTransform additive='sum' attributeName='transform' dur='6s' repeatCount='indefinite' type='translate' values='-18 0%3b 18 0%3b -18 0'/%3e%3c/use%3e%3c/svg%3e","clear-night":{day:qt,night:"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 512 512'%3e%3cdefs%3e%3csymbol id='a' overflow='visible' viewBox='0 0 279 279'%3e%3cpath fill='none' stroke='%2372b9d5' stroke-linecap='round' stroke-linejoin='round' stroke-width='15' d='M256.8 173.1A133.3 133.3 0 01122.4 40.7 130.5 130.5 0 01127 7.5 133 133 0 007.5 139.1c0 73.1 60 132.4 134.2 132.4 62.5 0 114.8-42.2 129.8-99.2a135.6 135.6 0 01-14.8.8Z'%3e%3canimateTransform additive='sum' attributeName='transform' dur='6s' repeatCount='indefinite' type='rotate' values='-15 135 135%3b 9 135 135%3b -15 135 135'/%3e%3c/path%3e%3c/symbol%3e%3c/defs%3e%3cuse xlink:href='%23a' width='279' height='279' transform='translate(116.5 116.5)'/%3e%3c/svg%3e"},fog:{day:"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 512 512'%3e%3cdefs%3e%3csymbol id='b' viewBox='0 0 375 375'%3e%3ccircle cx='187.5' cy='187.5' r='84' fill='none' stroke='%23fbbf24' stroke-miterlimit='10' stroke-width='15'/%3e%3cpath fill='none' stroke='%23fbbf24' stroke-linecap='round' stroke-miterlimit='10' stroke-width='15' d='M187.5 57.2V7.5m0 360v-49.7m92.2-222.5 35-35M60.3 314.7l35.1-35.1m0-184.4-35-35m254.5 254.5-35.1-35.1M57.2 187.5H7.5m360 0h-49.7'%3e%3canimateTransform additive='sum' attributeName='transform' dur='6s' repeatCount='indefinite' type='rotate' values='0 187.5 187.5%3b 45 187.5 187.5'/%3e%3c/path%3e%3c/symbol%3e%3csymbol id='c' overflow='visible' viewBox='0 0 258 66'%3e%3cpath fill='none' stroke='%23e2e8f0' stroke-linecap='round' stroke-miterlimit='10' stroke-width='18' d='M9 57h240'%3e%3canimateTransform additive='sum' attributeName='transform' dur='6s' repeatCount='indefinite' type='translate' values='-24 0%3b 24 0%3b -24 0'/%3e%3c/path%3e%3cpath fill='none' stroke='%23e2e8f0' stroke-linecap='round' stroke-miterlimit='10' stroke-width='18' d='M9 9h240'%3e%3canimateTransform additive='sum' attributeName='transform' dur='6s' repeatCount='indefinite' type='translate' values='24 0%3b -24 0%3b 24 0'/%3e%3c/path%3e%3c/symbol%3e%3cclipPath id='a'%3e%3cpath fill='none' d='M0 0h512v306H0z'/%3e%3c/clipPath%3e%3c/defs%3e%3cg clip-path='url(%23a)'%3e%3cuse xlink:href='%23b' width='375' height='375' transform='translate(68.5 104.5)'/%3e%3c/g%3e%3cuse xlink:href='%23c' width='258' height='66' transform='translate(127 339)'/%3e%3c/svg%3e",night:"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 512 512'%3e%3cdefs%3e%3csymbol id='b' overflow='visible' viewBox='0 0 279 279'%3e%3cpath fill='none' stroke='%2372b9d5' stroke-linecap='round' stroke-linejoin='round' stroke-width='15' d='M256.8 173.1A133.3 133.3 0 01122.4 40.7 130.5 130.5 0 01127 7.5 133 133 0 007.5 139.1c0 73.1 60 132.4 134.2 132.4 62.5 0 114.8-42.2 129.8-99.2a135.6 135.6 0 01-14.8.8Z'%3e%3canimateTransform additive='sum' attributeName='transform' dur='6s' repeatCount='indefinite' type='rotate' values='-15 135 135%3b 9 135 135%3b -15 135 135'/%3e%3c/path%3e%3c/symbol%3e%3csymbol id='c' overflow='visible' viewBox='0 0 258 66'%3e%3cpath fill='none' stroke='%23e2e8f0' stroke-linecap='round' stroke-miterlimit='10' stroke-width='18' d='M9 57h240'%3e%3canimateTransform additive='sum' attributeName='transform' dur='6s' repeatCount='indefinite' type='translate' values='-24 0%3b 24 0%3b -24 0'/%3e%3c/path%3e%3cpath fill='none' stroke='%23e2e8f0' stroke-linecap='round' stroke-miterlimit='10' stroke-width='18' d='M9 9h240'%3e%3canimateTransform additive='sum' attributeName='transform' dur='6s' repeatCount='indefinite' type='translate' values='24 0%3b -24 0%3b 24 0'/%3e%3c/path%3e%3c/symbol%3e%3cclipPath id='a'%3e%3cpath fill='none' d='M0 0h512v306H0z'/%3e%3c/clipPath%3e%3c/defs%3e%3cg clip-path='url(%23a)'%3e%3cuse xlink:href='%23b' width='279' height='279' transform='translate(116.5 116.5)'/%3e%3c/g%3e%3cuse xlink:href='%23c' width='258' height='66' transform='translate(127 339)'/%3e%3c/svg%3e"},hail:"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 512 512'%3e%3cdefs%3e%3csymbol id='a' viewBox='0 0 359 231'%3e%3cpath fill='none' stroke='%23e2e8f0' stroke-linecap='round' stroke-linejoin='round' stroke-width='15' d='M295.5 223.5a56 56 0 000-112l-2.5.1a83.9 83.9 0 00-153-64.2 56 56 0 00-84.6 48.1 56.6 56.6 0 00.8 9 60 60 0 0011.2 119'/%3e%3c/symbol%3e%3csymbol id='b' overflow='visible' viewBox='0 0 136 24'%3e%3cpath fill='%2386c3db' d='M12 0a12 12 0 1012 12A12 12 0 0012 0Z' opacity='0'%3e%3canimateTransform id='x1' additive='sum' attributeName='transform' begin='0s%3b x1.end%2b.42s' dur='.58s' keyTimes='0%3b .71%3b 1' type='translate' values='0 -46%3b 0 86%3b -18 74'/%3e%3canimate id='y1' attributeName='opacity' begin='0s%3b y1.end%2b.42s' dur='.58s' keyTimes='0%3b .14%3b .71%3b 1' values='0%3b 1%3b 1%3b 0'/%3e%3c/path%3e%3cpath fill='%2386c3db' d='M68 0a12 12 0 1012 12A12 12 0 0068 0Z' opacity='0'%3e%3canimateTransform id='x2' additive='sum' attributeName='transform' begin='.67s%3b x2.end%2b.42s' dur='.58s' keyTimes='0%3b .71%3b 1' type='translate' values='0 -46%3b 0 86%3b 0 74'/%3e%3canimate id='y2' attributeName='opacity' begin='.67s%3b y2.end%2b.42s' dur='.58s' keyTimes='0%3b .14%3b .71%3b 1' values='0%3b 1%3b 1%3b 0'/%3e%3c/path%3e%3cpath fill='%2386c3db' d='M124 0a12 12 0 1012 12 12 12 0 00-12-12Z' opacity='0'%3e%3canimateTransform id='x3' additive='sum' attributeName='transform' begin='.33s%3b x3.end%2b.42s' dur='.58s' keyTimes='0%3b .71%3b 1' type='translate' values='0 -46%3b 0 86%3b 18 74'/%3e%3canimate id='y3' attributeName='opacity' begin='.33s%3b y3.end%2b.42s' dur='.58s' keyTimes='0%3b .14%3b .71%3b 1' values='0%3b 1%3b 1%3b 0'/%3e%3c/path%3e%3c/symbol%3e%3c/defs%3e%3cuse xlink:href='%23a' width='359' height='231' transform='translate(76.5 140.5)'/%3e%3cuse xlink:href='%23b' width='136' height='24' transform='translate(188 350)'/%3e%3c/svg%3e",lightning:{day:"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 512 512'%3e%3cdefs%3e%3csymbol id='c' viewBox='0 0 193 193'%3e%3ccircle cx='96.5' cy='96.5' r='40' fill='none' stroke='%23fbbf24' stroke-miterlimit='10' stroke-width='9'/%3e%3cpath fill='none' stroke='%23fbbf24' stroke-linecap='round' stroke-miterlimit='10' stroke-width='9' d='M96.5 29.9V4.5m0 184v-25.4m47.1-113.7 18-18M31.4 161.6l18-18m0-94.2-18-18m130.2 130.2-18-18M4.5 96.5h25.4m158.6 0h-25.4'%3e%3canimateTransform additive='sum' attributeName='transform' dur='6s' repeatCount='indefinite' type='rotate' values='0 96.5 96.5%3b 45 96.5 96.5'/%3e%3c/path%3e%3c/symbol%3e%3csymbol id='d' viewBox='0 0 359 231'%3e%3cpath fill='none' stroke='%23e2e8f0' stroke-linecap='round' stroke-linejoin='round' stroke-width='15' d='M295.5 223.5a56 56 0 000-112l-2.5.1a83.9 83.9 0 00-153-64.2 56 56 0 00-84.6 48.1 56.6 56.6 0 00.8 9 60 60 0 0011.2 119'/%3e%3c/symbol%3e%3csymbol id='b' viewBox='0 0 435.5 371.5'%3e%3cg clip-path='url(%23a)'%3e%3cuse xlink:href='%23c' width='193' height='193' transform='translate(69.5 110.5)'/%3e%3c/g%3e%3cuse xlink:href='%23d' width='359' height='231' transform='translate(76.5 140.5)'/%3e%3c/symbol%3e%3csymbol id='e' viewBox='0 0 96 176'%3e%3cpath fill='%23f6a823' d='M32 0 0 96h32l-16 80L96 64H48L80 0H32z'%3e%3canimate id='x1' attributeName='opacity' begin='0s%3b x1.end%2b.67s' dur='1.33s' keyTimes='0%3b .38%3b .5%3b .63%3b .75%3b .86%3b .94%3b 1' values='1%3b 1%3b 0%3b 1%3b 0%3b 1%3b 0%3b 1'/%3e%3c/path%3e%3c/symbol%3e%3cclipPath id='a'%3e%3cpath fill='none' d='M288 148a83.8 83.8 0 00-71.4 40 56 56 0 00-84.6 48 56.6 56.6 0 00.8 9A60 60 0 0084 304H0V0h288Z'/%3e%3c/clipPath%3e%3c/defs%3e%3cuse xlink:href='%23b' width='435.5' height='371.5'/%3e%3cuse xlink:href='%23e' width='96' height='176' transform='translate(208 293)'/%3e%3c/svg%3e",night:"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 512 512'%3e%3cdefs%3e%3csymbol id='c' viewBox='0 0 178 178'%3e%3cpath fill='none' stroke='%2372b9d5' stroke-linecap='round' stroke-linejoin='round' stroke-width='10' d='M163.6 110.4a84.8 84.8 0 01-85.4-84.3A83.3 83.3 0 0181 5 84.7 84.7 0 005 88.7 84.8 84.8 0 0090.4 173a85.2 85.2 0 0082.6-63.1 88 88 0 01-9.4.5Z'/%3e%3c/symbol%3e%3csymbol id='d' viewBox='0 0 359 231'%3e%3cpath fill='none' stroke='%23e2e8f0' stroke-linecap='round' stroke-linejoin='round' stroke-width='15' d='M295.5 223.5a56 56 0 000-112l-2.5.1a83.9 83.9 0 00-153-64.2 56 56 0 00-84.6 48.1 56.6 56.6 0 00.8 9 60 60 0 0011.2 119'/%3e%3c/symbol%3e%3csymbol id='b' viewBox='0 0 435.5 371.5'%3e%3cg clip-path='url(%23a)'%3e%3cuse xlink:href='%23c' width='178' height='178' transform='translate(77 118)'%3e%3canimateTransform additive='sum' attributeName='transform' dur='6s' repeatCount='indefinite' type='rotate' values='-15 86 86%3b 9 86 86%3b -15 86 86'/%3e%3c/use%3e%3c/g%3e%3cuse xlink:href='%23d' width='359' height='231' transform='translate(76.5 140.5)'/%3e%3c/symbol%3e%3csymbol id='e' viewBox='0 0 96 176'%3e%3cpath fill='%23f6a823' d='M32 0 0 96h32l-16 80L96 64H48L80 0H32z'%3e%3canimate id='x1' attributeName='opacity' begin='0s%3b x1.end%2b.67s' dur='1.33s' keyTimes='0%3b .38%3b .5%3b .63%3b .75%3b .86%3b .94%3b 1' values='1%3b 1%3b 0%3b 1%3b 0%3b 1%3b 0%3b 1'/%3e%3c/path%3e%3c/symbol%3e%3cclipPath id='a'%3e%3cpath fill='none' d='M288 148a83.8 83.8 0 00-71.4 40 56 56 0 00-84.6 48 56.6 56.6 0 00.8 9A60 60 0 0084 304H0V0h288Z'/%3e%3c/clipPath%3e%3c/defs%3e%3cuse xlink:href='%23b' width='435.5' height='371.5'/%3e%3cuse xlink:href='%23e' width='96' height='176' transform='translate(208 293)'/%3e%3c/svg%3e"},"lightning-rainy":{day:"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 512 512'%3e%3cdefs%3e%3csymbol id='c' viewBox='0 0 193 193'%3e%3ccircle cx='96.5' cy='96.5' r='40' fill='none' stroke='%23fbbf24' stroke-miterlimit='10' stroke-width='9'/%3e%3cpath fill='none' stroke='%23fbbf24' stroke-linecap='round' stroke-miterlimit='10' stroke-width='9' d='M96.5 29.9V4.5m0 184v-25.4m47.1-113.7 18-18M31.4 161.6l18-18m0-94.2-18-18m130.2 130.2-18-18M4.5 96.5h25.4m158.6 0h-25.4'%3e%3canimateTransform additive='sum' attributeName='transform' dur='6s' repeatCount='indefinite' type='rotate' values='0 96.5 96.5%3b 45 96.5 96.5'/%3e%3c/path%3e%3c/symbol%3e%3csymbol id='d' viewBox='0 0 359 231'%3e%3cpath fill='none' stroke='%23e2e8f0' stroke-linecap='round' stroke-linejoin='round' stroke-width='15' d='M295.5 223.5a56 56 0 000-112l-2.5.1a83.9 83.9 0 00-153-64.2 56 56 0 00-84.6 48.1 56.6 56.6 0 00.8 9 60 60 0 0011.2 119'/%3e%3c/symbol%3e%3csymbol id='b' viewBox='0 0 435.5 371.5'%3e%3cg clip-path='url(%23a)'%3e%3cuse xlink:href='%23c' width='193' height='193' transform='translate(69.5 110.5)'/%3e%3c/g%3e%3cuse xlink:href='%23d' width='359' height='231' transform='translate(76.5 140.5)'/%3e%3c/symbol%3e%3csymbol id='e' overflow='visible' viewBox='0 0 128 56'%3e%3cpath fill='%230a5ad4' d='M8 56a8 8 0 01-8-8V8a8 8 0 0116 0v40a8 8 0 01-8 8Z' opacity='0'%3e%3canimateTransform id='x1' additive='sum' attributeName='transform' begin='0s%3b x1.end%2b.33s' dur='.67s' type='translate' values='0 -60%3b 0 60'/%3e%3canimate id='y1' attributeName='opacity' begin='0s%3b y1.end%2b.33s' dur='.67s' keyTimes='0%3b .25%3b 1' values='0%3b 1%3b 0'/%3e%3c/path%3e%3cpath fill='%230a5ad4' d='M64 56a8 8 0 01-8-8V8a8 8 0 0116 0v40a8 8 0 01-8 8Z' opacity='0'%3e%3canimateTransform id='x2' additive='sum' attributeName='transform' begin='.33s%3b x2.end%2b.33s' dur='.67s' type='translate' values='0 -60%3b 0 60'/%3e%3canimate id='y2' attributeName='opacity' begin='.33s%3b y2.end%2b.33s' dur='.67s' keyTimes='0%3b .25%3b 1' values='0%3b 1%3b 0'/%3e%3c/path%3e%3cpath fill='%230a5ad4' d='M120 56a8 8 0 01-8-8V8a8 8 0 0116 0v40a8 8 0 01-8 8Z' opacity='0'%3e%3canimateTransform id='x3' additive='sum' attributeName='transform' begin='-.33s%3b x3.end%2b.33s' dur='.67s' type='translate' values='0 -60%3b 0 60'/%3e%3canimate id='y3' attributeName='opacity' begin='-.33s%3b y3.end%2b.33s' dur='.67s' keyTimes='0%3b .25%3b 1' values='0%3b 1%3b 0'/%3e%3c/path%3e%3c/symbol%3e%3csymbol id='f' viewBox='0 0 96 176'%3e%3cpath fill='%23f6a823' d='M32 0 0 96h32l-16 80L96 64H48L80 0H32z'%3e%3canimate id='x1' attributeName='opacity' begin='0s%3b x1.end%2b.67s' dur='1.33s' keyTimes='0%3b .38%3b .5%3b .63%3b .75%3b .86%3b .94%3b 1' values='1%3b 1%3b 0%3b 1%3b 0%3b 1%3b 0%3b 1'/%3e%3c/path%3e%3c/symbol%3e%3cclipPath id='a'%3e%3cpath fill='none' d='M288 148a83.8 83.8 0 00-71.4 40 56 56 0 00-84.6 48 56.6 56.6 0 00.8 9A60 60 0 0084 304H0V0h288Z'/%3e%3c/clipPath%3e%3c/defs%3e%3cuse xlink:href='%23b' width='435.5' height='371.5'/%3e%3cuse xlink:href='%23e' width='128' height='56' transform='translate(192 344)'/%3e%3cuse xlink:href='%23f' width='96' height='176' transform='translate(208 293)'/%3e%3c/svg%3e",night:"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 512 512'%3e%3cdefs%3e%3csymbol id='c' viewBox='0 0 178 178'%3e%3cpath fill='none' stroke='%2372b9d5' stroke-linecap='round' stroke-linejoin='round' stroke-width='10' d='M163.6 110.4a84.8 84.8 0 01-85.4-84.3A83.3 83.3 0 0181 5 84.7 84.7 0 005 88.7 84.8 84.8 0 0090.4 173a85.2 85.2 0 0082.6-63.1 88 88 0 01-9.4.5Z'/%3e%3c/symbol%3e%3csymbol id='d' viewBox='0 0 359 231'%3e%3cpath fill='none' stroke='%23e2e8f0' stroke-linecap='round' stroke-linejoin='round' stroke-width='15' d='M295.5 223.5a56 56 0 000-112l-2.5.1a83.9 83.9 0 00-153-64.2 56 56 0 00-84.6 48.1 56.6 56.6 0 00.8 9 60 60 0 0011.2 119'/%3e%3c/symbol%3e%3csymbol id='b' viewBox='0 0 435.5 371.5'%3e%3cg clip-path='url(%23a)'%3e%3cuse xlink:href='%23c' width='178' height='178' transform='translate(77 118)'%3e%3canimateTransform additive='sum' attributeName='transform' dur='6s' repeatCount='indefinite' type='rotate' values='-15 86 86%3b 9 86 86%3b -15 86 86'/%3e%3c/use%3e%3c/g%3e%3cuse xlink:href='%23d' width='359' height='231' transform='translate(76.5 140.5)'/%3e%3c/symbol%3e%3csymbol id='e' overflow='visible' viewBox='0 0 128 56'%3e%3cpath fill='%230a5ad4' d='M8 56a8 8 0 01-8-8V8a8 8 0 0116 0v40a8 8 0 01-8 8Z' opacity='0'%3e%3canimateTransform id='x1' additive='sum' attributeName='transform' begin='0s%3b x1.end%2b.33s' dur='.67s' type='translate' values='0 -60%3b 0 60'/%3e%3canimate id='y1' attributeName='opacity' begin='0s%3b y1.end%2b.33s' dur='.67s' keyTimes='0%3b .25%3b 1' values='0%3b 1%3b 0'/%3e%3c/path%3e%3cpath fill='%230a5ad4' d='M64 56a8 8 0 01-8-8V8a8 8 0 0116 0v40a8 8 0 01-8 8Z' opacity='0'%3e%3canimateTransform id='x2' additive='sum' attributeName='transform' begin='.33s%3b x2.end%2b.33s' dur='.67s' type='translate' values='0 -60%3b 0 60'/%3e%3canimate id='y2' attributeName='opacity' begin='.33s%3b y2.end%2b.33s' dur='.67s' keyTimes='0%3b .25%3b 1' values='0%3b 1%3b 0'/%3e%3c/path%3e%3cpath fill='%230a5ad4' d='M120 56a8 8 0 01-8-8V8a8 8 0 0116 0v40a8 8 0 01-8 8Z' opacity='0'%3e%3canimateTransform id='x3' additive='sum' attributeName='transform' begin='-.33s%3b x3.end%2b.33s' dur='.67s' type='translate' values='0 -60%3b 0 60'/%3e%3canimate id='y3' attributeName='opacity' begin='-.33s%3b y3.end%2b.33s' dur='.67s' keyTimes='0%3b .25%3b 1' values='0%3b 1%3b 0'/%3e%3c/path%3e%3c/symbol%3e%3csymbol id='f' viewBox='0 0 96 176'%3e%3cpath fill='%23f6a823' d='M32 0 0 96h32l-16 80L96 64H48L80 0H32z'%3e%3canimate id='x1' attributeName='opacity' begin='0s%3b x1.end%2b.67s' dur='1.33s' keyTimes='0%3b .38%3b .5%3b .63%3b .75%3b .86%3b .94%3b 1' values='1%3b 1%3b 0%3b 1%3b 0%3b 1%3b 0%3b 1'/%3e%3c/path%3e%3c/symbol%3e%3cclipPath id='a'%3e%3cpath fill='none' d='M288 148a83.8 83.8 0 00-71.4 40 56 56 0 00-84.6 48 56.6 56.6 0 00.8 9A60 60 0 0084 304H0V0h288Z'/%3e%3c/clipPath%3e%3c/defs%3e%3cuse xlink:href='%23b' width='435.5' height='371.5'/%3e%3cuse xlink:href='%23e' width='128' height='56' transform='translate(192 344)'/%3e%3cuse xlink:href='%23f' width='96' height='176' transform='translate(208 293)'/%3e%3c/svg%3e"},pouring:"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 512 512'%3e%3cdefs%3e%3csymbol id='a' viewBox='0 0 359 231'%3e%3cpath fill='none' stroke='%23e2e8f0' stroke-linecap='round' stroke-linejoin='round' stroke-width='15' d='M295.5 223.5a56 56 0 000-112l-2.5.1a83.9 83.9 0 00-153-64.2 56 56 0 00-84.6 48.1 56.6 56.6 0 00.8 9 60 60 0 0011.2 119'/%3e%3c/symbol%3e%3csymbol id='b' overflow='visible' viewBox='0 0 128 56'%3e%3cpath fill='%230a5ad4' d='M8 56a8 8 0 01-8-8V8a8 8 0 0116 0v40a8 8 0 01-8 8Z' opacity='0'%3e%3canimateTransform id='x1' additive='sum' attributeName='transform' begin='0s%3b x1.end%2b.33s' dur='.67s' type='translate' values='0 -60%3b 0 60'/%3e%3canimate id='y1' attributeName='opacity' begin='0s%3b y1.end%2b.33s' dur='.67s' keyTimes='0%3b .25%3b 1' values='0%3b 1%3b 0'/%3e%3c/path%3e%3cpath fill='%230a5ad4' d='M64 56a8 8 0 01-8-8V8a8 8 0 0116 0v40a8 8 0 01-8 8Z' opacity='0'%3e%3canimateTransform id='x2' additive='sum' attributeName='transform' begin='.33s%3b x2.end%2b.33s' dur='.67s' type='translate' values='0 -60%3b 0 60'/%3e%3canimate id='y2' attributeName='opacity' begin='.33s%3b y2.end%2b.33s' dur='.67s' keyTimes='0%3b .25%3b 1' values='0%3b 1%3b 0'/%3e%3c/path%3e%3cpath fill='%230a5ad4' d='M120 56a8 8 0 01-8-8V8a8 8 0 0116 0v40a8 8 0 01-8 8Z' opacity='0'%3e%3canimateTransform id='x3' additive='sum' attributeName='transform' begin='-.33s%3b x3.end%2b.33s' dur='.67s' type='translate' values='0 -60%3b 0 60'/%3e%3canimate id='y3' attributeName='opacity' begin='-.33s%3b y3.end%2b.33s' dur='.67s' keyTimes='0%3b .25%3b 1' values='0%3b 1%3b 0'/%3e%3c/path%3e%3c/symbol%3e%3c/defs%3e%3cuse xlink:href='%23a' width='359' height='231' transform='translate(76.5 140.5)'/%3e%3cuse xlink:href='%23b' width='128' height='56' transform='translate(192 344)'/%3e%3c/svg%3e",raindrop:"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 512 512'%3e%3cdefs%3e%3csymbol id='a' viewBox='0 0 175 260.9'%3e%3cpath fill='none' stroke='%232885c7' stroke-miterlimit='10' stroke-width='15' d='M87.5 13.4c-48.7 72-80 117-80 160.7s35.8 79.3 80 79.3 80-35.5 80-79.3-31.3-88.8-80-160.7Z'%3e%3canimateTransform attributeName='transform' calcMode='spline' dur='6s' keySplines='.42%2c 0%2c .58%2c 1%3b .42%2c 0%2c .58%2c 1' repeatCount='indefinite' type='scale' values='1 1%3b 1 .9%3b 1 1'/%3e%3c/path%3e%3c/symbol%3e%3c/defs%3e%3cuse xlink:href='%23a' width='175' height='260.9' transform='translate(168.5 122.62)'/%3e%3c/svg%3e",raindrops:"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 512 512'%3e%3cdefs%3e%3cclipPath id='a'%3e%3cpath fill='none' d='M302 137c-48.7 72-80 117-80 160.8s35.8 79.2 80 79.2v135H0V0h302Z'%3e%3canimateTransform additive='sum' attributeName='transform' calcMode='spline' dur='6s' keySplines='.42%2c 0%2c .58%2c 1%3b .42%2c 0%2c .58%2c 1' repeatCount='indefinite' type='scale' values='1 1%3b 1 .95%3b 1 1'/%3e%3c/path%3e%3c/clipPath%3e%3csymbol id='b' viewBox='0 0 175 260.9'%3e%3cpath fill='none' stroke='%232885c7' stroke-miterlimit='10' stroke-width='15' d='M87.5 13.4c-48.7 72-80 117-80 160.7s35.8 79.3 80 79.3 80-35.5 80-79.3-31.3-88.8-80-160.7Z'/%3e%3c/symbol%3e%3c/defs%3e%3cuse xlink:href='%23b' width='175' height='260.9' transform='translate(214.5 123.62)'%3e%3canimateTransform additive='sum' attributeName='transform' calcMode='spline' dur='6s' keySplines='.42%2c 0%2c .58%2c 1%3b .42%2c 0%2c .58%2c 1' repeatCount='indefinite' type='scale' values='1 1%3b 1 .9%3b 1 1'/%3e%3c/use%3e%3cg clip-path='url(%23a)'%3e%3cuse xlink:href='%23b' width='175' height='260.9' transform='translate(122.5 123.62)'%3e%3canimateTransform additive='sum' attributeName='transform' calcMode='spline' dur='6s' keySplines='.42%2c 0%2c .58%2c 1%3b .42%2c 0%2c .58%2c 1' repeatCount='indefinite' type='scale' values='1 .9%3b 1 1%3b 1 .9'/%3e%3c/use%3e%3c/g%3e%3c/svg%3e",snowy:"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 512 512'%3e%3cdefs%3e%3csymbol id='a' viewBox='0 0 359 231'%3e%3cpath fill='none' stroke='%23e2e8f0' stroke-linecap='round' stroke-linejoin='round' stroke-width='15' d='M295.5 223.5a56 56 0 000-112l-2.5.1a83.9 83.9 0 00-153-64.2 56 56 0 00-84.6 48.1 56.6 56.6 0 00.8 9 60 60 0 0011.2 119'/%3e%3c/symbol%3e%3csymbol id='b' overflow='visible' viewBox='0 0 155.2 48'%3e%3cg%3e%3cpath fill='%2386c3db' d='m41.2 30.5-5.8-3.3a13.7 13.7 0 000-6.4l5.8-3.3a4 4 0 001.5-5.5 4 4 0 00-5.6-1.5l-5.8 3.3a13.6 13.6 0 00-2.6-2 13.8 13.8 0 00-3-1.2V4a4 4 0 00-8.1 0v6.6a14.3 14.3 0 00-5.7 3.2l-5.8-3.3A4 4 0 00.5 12 4 4 0 002 17.5l5.8 3.3a13.7 13.7 0 000 6.4L2 30.5A4 4 0 00.5 36a4 4 0 003.6 2 4 4 0 002-.5l5.8-3.3a13.6 13.6 0 002.6 2 13.8 13.8 0 003 1.2V44a4 4 0 008 0v-6.6a14.2 14.2 0 005.8-3.2l5.8 3.3a4 4 0 002 .5 4 4 0 003.5-2 4 4 0 00-1.4-5.5Zm-22.6-1.3a6 6 0 01-2.3-8.2 6.1 6.1 0 015.3-3 6.2 6.2 0 013 .8A6 6 0 0127 27a6.1 6.1 0 01-8.3 2.2Z' opacity='0'%3e%3canimateTransform additive='sum' attributeName='transform' dur='6s' repeatCount='indefinite' type='rotate' values='0 24 24%3b 360 24 24'/%3e%3canimate id='t1' attributeName='opacity' begin='0s%3b t1.end%2b1s' dur='2s' keyTimes='0%3b .17%3b .83%3b 1' values='0%3b 1%3b 1%3b 0'/%3e%3c/path%3e%3canimateTransform id='s1' additive='sum' attributeName='transform' begin='0s%3b s1.end%2b1s' dur='2s' type='translate' values='0 -36%3b 0 92%3b'/%3e%3c/g%3e%3cg%3e%3cpath fill='%2386c3db' d='m97.2 30.5-5.8-3.3a13.7 13.7 0 000-6.4l5.8-3.3a4 4 0 001.5-5.5 4 4 0 00-5.6-1.5l-5.8 3.3a13.6 13.6 0 00-2.6-2 13.8 13.8 0 00-3-1.2V4a4 4 0 00-8.1 0v6.6a14.3 14.3 0 00-5.7 3.2l-5.8-3.3a4 4 0 00-5.6 1.5 4 4 0 001.5 5.5l5.8 3.3a13.7 13.7 0 000 6.4L58 30.5a4 4 0 00-1.5 5.5 4 4 0 003.6 2 4 4 0 002-.5l5.8-3.3a13.6 13.6 0 002.6 2 13.8 13.8 0 003 1.2V44a4 4 0 008 0v-6.6a14.2 14.2 0 005.8-3.2l5.8 3.3a4 4 0 002 .5 4 4 0 003.5-2 4 4 0 00-1.4-5.5Zm-22.6-1.3a6 6 0 01-2.3-8.2 6.1 6.1 0 015.3-3 6.2 6.2 0 013 .8A6 6 0 0183 27a6.1 6.1 0 01-8.3 2.2Z' opacity='0'%3e%3canimateTransform additive='sum' attributeName='transform' dur='6s' repeatCount='indefinite' type='rotate' values='0 80 24%3b 360 80 24'/%3e%3canimate id='t2' attributeName='opacity' begin='-.83s%3b t2.end%2b1s' dur='2s' keyTimes='0%3b .17%3b .83%3b 1' values='0%3b 1%3b 1%3b 0'/%3e%3c/path%3e%3canimateTransform id='s2' additive='sum' attributeName='transform' begin='-.83s%3b s2.end%2b1s' dur='2s' type='translate' values='0 -36%3b 0 92%3b'/%3e%3c/g%3e%3cg%3e%3cpath fill='%2386c3db' d='m153.2 30.5-5.8-3.3a13.7 13.7 0 000-6.4l5.8-3.3a4 4 0 001.5-5.5 4 4 0 00-5.6-1.5l-5.8 3.3a13.6 13.6 0 00-2.6-2 13.8 13.8 0 00-3-1.2V4a4 4 0 00-8.1 0v6.6a14.3 14.3 0 00-5.7 3.2l-5.8-3.3a4 4 0 00-5.6 1.5 4 4 0 001.5 5.5l5.8 3.3a13.7 13.7 0 000 6.4l-5.8 3.3a4 4 0 00-1.5 5.5 4 4 0 003.6 2 4 4 0 002-.5l5.8-3.3a13.6 13.6 0 002.6 2 13.8 13.8 0 003 1.2V44a4 4 0 008 0v-6.6a14.2 14.2 0 005.8-3.2l5.8 3.3a4 4 0 002 .5 4 4 0 003.5-2 4 4 0 00-1.4-5.5Zm-22.6-1.3a6 6 0 01-2.3-8.2 6.1 6.1 0 015.3-3 6.2 6.2 0 013 .8 6 6 0 012.2 8.2 6.1 6.1 0 01-8.2 2.2Z' opacity='0'%3e%3canimateTransform additive='sum' attributeName='transform' dur='6s' repeatCount='indefinite' type='rotate' values='0 136 24%3b 360 136 24'/%3e%3canimate id='t3' attributeName='opacity' begin='.83s%3b t3.end%2b1s' dur='2s' keyTimes='0%3b .17%3b .83%3b 1' values='0%3b 1%3b 1%3b 0'/%3e%3c/path%3e%3canimateTransform id='s3' additive='sum' attributeName='transform' begin='.83s%3b s3.end%2b1s' dur='2s' type='translate' values='0 -36%3b 0 92%3b'/%3e%3c/g%3e%3c/symbol%3e%3c/defs%3e%3cuse xlink:href='%23a' width='359' height='231' transform='translate(76.5 140.5)'/%3e%3cuse xlink:href='%23b' width='155.2' height='48' transform='translate(178.4 338)'/%3e%3c/svg%3e","snowy-rainy":"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 512 512'%3e%3cdefs%3e%3csymbol id='a' viewBox='0 0 359 231'%3e%3cpath fill='none' stroke='%23e2e8f0' stroke-linecap='round' stroke-linejoin='round' stroke-width='15' d='M295.5 223.5a56 56 0 000-112l-2.5.1a83.9 83.9 0 00-153-64.2 56 56 0 00-84.6 48.1 56.6 56.6 0 00.8 9 60 60 0 0011.2 119'/%3e%3c/symbol%3e%3csymbol id='c' overflow='visible' viewBox='0 0 155.2 48'%3e%3cg%3e%3cpath fill='%2386c3db' d='m41.2 30.5-5.8-3.3a13.7 13.7 0 000-6.4l5.8-3.3a4 4 0 001.5-5.5 4 4 0 00-5.6-1.5l-5.8 3.3a13.6 13.6 0 00-2.6-2 13.8 13.8 0 00-3-1.2V4a4 4 0 00-8.1 0v6.6a14.3 14.3 0 00-5.7 3.2l-5.8-3.3A4 4 0 00.5 12 4 4 0 002 17.5l5.8 3.3a13.7 13.7 0 000 6.4L2 30.5A4 4 0 00.5 36a4 4 0 003.6 2 4 4 0 002-.5l5.8-3.3a13.6 13.6 0 002.6 2 13.8 13.8 0 003 1.2V44a4 4 0 008 0v-6.6a14.2 14.2 0 005.8-3.2l5.8 3.3a4 4 0 002 .5 4 4 0 003.5-2 4 4 0 00-1.4-5.5Zm-22.6-1.3a6 6 0 01-2.3-8.2 6.1 6.1 0 015.3-3 6.2 6.2 0 013 .8A6 6 0 0127 27a6.1 6.1 0 01-8.3 2.2Z' opacity='0'%3e%3canimateTransform additive='sum' attributeName='transform' dur='6s' repeatCount='indefinite' type='rotate' values='0 24 24%3b 360 24 24'/%3e%3canimate id='t1' attributeName='opacity' begin='0s%3b t1.end%2b1s' dur='2s' keyTimes='0%3b .17%3b .83%3b 1' values='0%3b 1%3b 1%3b 0'/%3e%3c/path%3e%3canimateTransform id='s1' additive='sum' attributeName='transform' begin='0s%3b s1.end%2b1s' dur='2s' type='translate' values='0 -36%3b 0 92%3b'/%3e%3c/g%3e%3cg%3e%3cpath fill='%2386c3db' d='m97.2 30.5-5.8-3.3a13.7 13.7 0 000-6.4l5.8-3.3a4 4 0 001.5-5.5 4 4 0 00-5.6-1.5l-5.8 3.3a13.6 13.6 0 00-2.6-2 13.8 13.8 0 00-3-1.2V4a4 4 0 00-8.1 0v6.6a14.3 14.3 0 00-5.7 3.2l-5.8-3.3a4 4 0 00-5.6 1.5 4 4 0 001.5 5.5l5.8 3.3a13.7 13.7 0 000 6.4L58 30.5a4 4 0 00-1.5 5.5 4 4 0 003.6 2 4 4 0 002-.5l5.8-3.3a13.6 13.6 0 002.6 2 13.8 13.8 0 003 1.2V44a4 4 0 008 0v-6.6a14.2 14.2 0 005.8-3.2l5.8 3.3a4 4 0 002 .5 4 4 0 003.5-2 4 4 0 00-1.4-5.5Zm-22.6-1.3a6 6 0 01-2.3-8.2 6.1 6.1 0 015.3-3 6.2 6.2 0 013 .8A6 6 0 0183 27a6.1 6.1 0 01-8.3 2.2Z' opacity='0'%3e%3canimateTransform additive='sum' attributeName='transform' dur='6s' repeatCount='indefinite' type='rotate' values='0 80 24%3b 360 80 24'/%3e%3canimate id='t2' attributeName='opacity' begin='-.83s%3b t2.end%2b1s' dur='2s' keyTimes='0%3b .17%3b .83%3b 1' values='0%3b 1%3b 1%3b 0'/%3e%3c/path%3e%3canimateTransform id='s2' additive='sum' attributeName='transform' begin='-.83s%3b s2.end%2b1s' dur='2s' type='translate' values='0 -36%3b 0 92%3b'/%3e%3c/g%3e%3cg%3e%3cpath fill='%2386c3db' d='m153.2 30.5-5.8-3.3a13.7 13.7 0 000-6.4l5.8-3.3a4 4 0 001.5-5.5 4 4 0 00-5.6-1.5l-5.8 3.3a13.6 13.6 0 00-2.6-2 13.8 13.8 0 00-3-1.2V4a4 4 0 00-8.1 0v6.6a14.3 14.3 0 00-5.7 3.2l-5.8-3.3a4 4 0 00-5.6 1.5 4 4 0 001.5 5.5l5.8 3.3a13.7 13.7 0 000 6.4l-5.8 3.3a4 4 0 00-1.5 5.5 4 4 0 003.6 2 4 4 0 002-.5l5.8-3.3a13.6 13.6 0 002.6 2 13.8 13.8 0 003 1.2V44a4 4 0 008 0v-6.6a14.2 14.2 0 005.8-3.2l5.8 3.3a4 4 0 002 .5 4 4 0 003.5-2 4 4 0 00-1.4-5.5Zm-22.6-1.3a6 6 0 01-2.3-8.2 6.1 6.1 0 015.3-3 6.2 6.2 0 013 .8 6 6 0 012.2 8.2 6.1 6.1 0 01-8.2 2.2Z' opacity='0'%3e%3canimateTransform additive='sum' attributeName='transform' dur='6s' repeatCount='indefinite' type='rotate' values='0 136 24%3b 360 136 24'/%3e%3canimate id='t3' attributeName='opacity' begin='.83s%3b t3.end%2b1s' dur='2s' keyTimes='0%3b .17%3b .83%3b 1' values='0%3b 1%3b 1%3b 0'/%3e%3c/path%3e%3canimateTransform id='s3' additive='sum' attributeName='transform' begin='.83s%3b s3.end%2b1s' dur='2s' type='translate' values='0 -36%3b 0 92%3b'/%3e%3c/g%3e%3c/symbol%3e%3csymbol id='b' overflow='visible' viewBox='0 0 155.2 48'%3e%3cuse xlink:href='%23c' width='155.2' height='48'/%3e%3cpath fill='%230a5ad4' d='M21.6 38a8 8 0 01-8-8V18a8 8 0 0116 0v12a8 8 0 01-8 8Z' opacity='0'%3e%3canimateTransform id='x1' additive='sum' attributeName='transform' begin='0s%3b x1.end%2b1s' dur='1s' keyTimes='0%3b .25%3b 1' type='translate' values='0 -32%3b 0 -32%3b 0 120%3b'/%3e%3canimate id='y1' attributeName='opacity' begin='0s%3b y1.end%2b1s' dur='1s' keyTimes='0%3b .25%3b 1' values='0%3b 1%3b 0'/%3e%3c/path%3e%3cpath fill='%230a5ad4' d='M77.6 38a8 8 0 01-8-8V18a8 8 0 0116 0v12a8 8 0 01-8 8Z' opacity='0'%3e%3canimateTransform id='x2' additive='sum' attributeName='transform' begin='1.34s%3b x2.end%2b1s' dur='1s' keyTimes='0%3b .25%3b 1' type='translate' values='0 -32%3b 0 -32%3b 0 120%3b'/%3e%3canimate id='y2' attributeName='opacity' begin='1.34s%3b y2.end%2b1s' dur='1s' keyTimes='0%3b .25%3b 1' values='0%3b 1%3b 0'/%3e%3c/path%3e%3cpath fill='%230a5ad4' d='M133.6 38a8 8 0 01-8-8V18a8 8 0 0116 0v12a8 8 0 01-8 8Z' opacity='0'%3e%3canimateTransform id='x3' additive='sum' attributeName='transform' begin='.67s%3b x3.end%2b1s' dur='1s' keyTimes='0%3b .25%3b 1' type='translate' values='0 -32%3b 0 -32%3b 0 120%3b'/%3e%3canimate id='y3' attributeName='opacity' begin='.67s%3b y3.end%2b1s' dur='1s' keyTimes='0%3b .25%3b 1' values='0%3b 1%3b 0'/%3e%3c/path%3e%3c/symbol%3e%3c/defs%3e%3cuse xlink:href='%23a' width='359' height='231' transform='translate(76.5 140.5)'/%3e%3cuse xlink:href='%23b' width='155.2' height='48' transform='translate(178.4 338)'/%3e%3c/svg%3e",sunny:{day:qt,night:qt},windy:Rt,"windy-exceptional":Rt,exceptional:"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512'%3e%3cpath fill='none' stroke='%23e2e8f0' stroke-linecap='round' stroke-miterlimit='10' stroke-width='18' d='M344 256a88 88 0 11-88-88 88 88 0 0188 88ZM200 116.9l-3.8 7.7A269.7 269.7 0 00169 267h0m143.1 128 3.8-7.7A269.7 269.7 0 00343.2 245h0'%3e%3canimateTransform additive='sum' attributeName='transform' dur='6s' repeatCount='indefinite' type='rotate' values='1440 256 256%3b 0 256 256'/%3e%3c/path%3e%3c/svg%3e"},fill:{rainy:{day:"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 512 512'%3e%3cdefs%3e%3clinearGradient id='a' x1='99.5' x2='232.6' y1='30.7' y2='261.4' gradientUnits='userSpaceOnUse'%3e%3cstop offset='0' stop-color='%23f3f7fe'/%3e%3cstop offset='.5' stop-color='%23f3f7fe'/%3e%3cstop offset='1' stop-color='%23deeafb'/%3e%3c/linearGradient%3e%3clinearGradient id='b' x1='1381.3' x2='1399.5' y1='-1144.7' y2='-1097.4' gradientTransform='rotate(-9 8002.567 8233.063)' gradientUnits='userSpaceOnUse'%3e%3cstop offset='0' stop-color='%230b65ed'/%3e%3cstop offset='.5' stop-color='%230a5ad4'/%3e%3cstop offset='1' stop-color='%230950bc'/%3e%3c/linearGradient%3e%3clinearGradient xlink:href='%23b' id='c' x1='1436.7' x2='1454.9' y1='-1137' y2='-1089.7' gradientTransform='rotate(-9 8009.537 8233.037)'/%3e%3clinearGradient xlink:href='%23b' id='d' x1='1492.1' x2='1510.3' y1='-1129.3' y2='-1082.1' gradientTransform='rotate(-9 8016.566 8233.078)'/%3e%3clinearGradient id='e' x1='78' x2='118' y1='63.4' y2='132.7' gradientUnits='userSpaceOnUse'%3e%3cstop offset='0' stop-color='%23fbbf24'/%3e%3cstop offset='.5' stop-color='%23fbbf24'/%3e%3cstop offset='1' stop-color='%23f59e0b'/%3e%3c/linearGradient%3e%3csymbol id='g' viewBox='0 0 196 196'%3e%3ccircle cx='98' cy='98' r='40' fill='url(%23e)' stroke='%23f8af18' stroke-miterlimit='10' stroke-width='4'/%3e%3cpath fill='none' stroke='%23fbbf24' stroke-linecap='round' stroke-miterlimit='10' stroke-width='12' d='M98 31.4V6m0 184v-25.4M145.1 51l18-17.9M33 163l18-17.9M51 51 33 33m130.1 130.1-18-18M6 98h25.4M190 98h-25.4'%3e%3canimateTransform additive='sum' attributeName='transform' dur='6s' repeatCount='indefinite' type='rotate' values='0 98 98%3b 45 98 98'/%3e%3c/path%3e%3c/symbol%3e%3csymbol id='h' viewBox='0 0 350 222'%3e%3cpath fill='url(%23a)' stroke='%23e6effc' stroke-miterlimit='10' stroke-width='6' d='m291 107-2.5.1A83.9 83.9 0 00135.6 43 56 56 0 0051 91a56.6 56.6 0 00.8 9A60 60 0 0063 219l4-.2v.2h224a56 56 0 000-112Z'/%3e%3c/symbol%3e%3csymbol id='f' viewBox='0 0 363 258'%3e%3cuse xlink:href='%23g' width='196' height='196'/%3e%3cuse xlink:href='%23h' width='350' height='222' transform='translate(13 36)'/%3e%3c/symbol%3e%3csymbol id='i' overflow='visible' viewBox='0 0 129 57'%3e%3cpath fill='url(%23b)' stroke='%230a5ad4' stroke-miterlimit='10' d='M8.5 56.5a8 8 0 01-8-8v-40a8 8 0 0116 0v40a8 8 0 01-8 8Z' opacity='0'%3e%3canimateTransform id='x1' additive='sum' attributeName='transform' begin='0s%3b x1.end%2b.33s' dur='.67s' type='translate' values='0 -60%3b 0 60'/%3e%3canimate id='y1' attributeName='opacity' begin='0s%3b y1.end%2b.33s' dur='.67s' keyTimes='0%3b .25%3b 1' values='0%3b 1%3b 0'/%3e%3c/path%3e%3cpath fill='url(%23c)' stroke='%230a5ad4' stroke-miterlimit='10' d='M64.5 56.5a8 8 0 01-8-8v-40a8 8 0 0116 0v40a8 8 0 01-8 8Z' opacity='0'%3e%3canimateTransform id='x2' additive='sum' attributeName='transform' begin='.33s%3b x2.end%2b.33s' dur='.67s' type='translate' values='0 -60%3b 0 60'/%3e%3canimate id='y2' attributeName='opacity' begin='.33s%3b y2.end%2b.33s' dur='.67s' keyTimes='0%3b .25%3b 1' values='0%3b 1%3b 0'/%3e%3c/path%3e%3cpath fill='url(%23d)' stroke='%230a5ad4' stroke-miterlimit='10' d='M120.5 56.5a8 8 0 01-8-8v-40a8 8 0 0116 0v40a8 8 0 01-8 8Z' opacity='0'%3e%3canimateTransform id='x3' additive='sum' attributeName='transform' begin='-.33s%3b x3.end%2b.33s' dur='.67s' type='translate' values='0 -60%3b 0 60'/%3e%3canimate id='y3' attributeName='opacity' begin='-.33s%3b y3.end%2b.33s' dur='.67s' keyTimes='0%3b .25%3b 1' values='0%3b 1%3b 0'/%3e%3c/path%3e%3c/symbol%3e%3c/defs%3e%3cuse xlink:href='%23f' width='363' height='258' transform='translate(68 109)'/%3e%3cuse xlink:href='%23i' width='129' height='57' transform='translate(191.5 343.5)'/%3e%3c/svg%3e",night:"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 512 512'%3e%3cdefs%3e%3clinearGradient id='a' x1='99.5' x2='232.6' y1='30.7' y2='261.4' gradientUnits='userSpaceOnUse'%3e%3cstop offset='0' stop-color='%23f3f7fe'/%3e%3cstop offset='.5' stop-color='%23f3f7fe'/%3e%3cstop offset='1' stop-color='%23deeafb'/%3e%3c/linearGradient%3e%3clinearGradient id='b' x1='34.7' x2='119.2' y1='18.6' y2='165' gradientUnits='userSpaceOnUse'%3e%3cstop offset='0' stop-color='%2386c3db'/%3e%3cstop offset='.5' stop-color='%2386c3db'/%3e%3cstop offset='1' stop-color='%235eafcf'/%3e%3c/linearGradient%3e%3clinearGradient id='c' x1='1381.3' x2='1399.5' y1='-1144.7' y2='-1097.4' gradientTransform='rotate(-9 8002.567 8233.063)' gradientUnits='userSpaceOnUse'%3e%3cstop offset='0' stop-color='%230b65ed'/%3e%3cstop offset='.5' stop-color='%230a5ad4'/%3e%3cstop offset='1' stop-color='%230950bc'/%3e%3c/linearGradient%3e%3clinearGradient xlink:href='%23c' id='d' x1='1436.7' x2='1454.9' y1='-1137' y2='-1089.7' gradientTransform='rotate(-9 8009.537 8233.037)'/%3e%3clinearGradient xlink:href='%23c' id='e' x1='1492.1' x2='1510.3' y1='-1129.3' y2='-1082.1' gradientTransform='rotate(-9 8016.566 8233.078)'/%3e%3csymbol id='g' viewBox='0 0 172 172'%3e%3cpath fill='url(%23b)' stroke='%2372b9d5' stroke-linecap='round' stroke-linejoin='round' stroke-width='4' d='M160.6 107.4a84.8 84.8 0 01-85.4-84.3A83.3 83.3 0 0178 2 84.7 84.7 0 002 85.7 84.8 84.8 0 0087.4 170a85.2 85.2 0 0082.6-63.1 88 88 0 01-9.4.5Z'%3e%3canimateTransform additive='sum' attributeName='transform' dur='6s' repeatCount='indefinite' type='rotate' values='-15 86 86%3b 9 86 86%3b -15 86 86'/%3e%3c/path%3e%3c/symbol%3e%3csymbol id='h' viewBox='0 0 350 222'%3e%3cpath fill='url(%23a)' stroke='%23e6effc' stroke-miterlimit='10' stroke-width='6' d='m291 107-2.5.1A83.9 83.9 0 00135.6 43 56 56 0 0051 91a56.6 56.6 0 00.8 9A60 60 0 0063 219l4-.2v.2h224a56 56 0 000-112Z'/%3e%3c/symbol%3e%3csymbol id='f' viewBox='0 0 351 246'%3e%3cuse xlink:href='%23g' width='172' height='172'/%3e%3cuse xlink:href='%23h' width='350' height='222' transform='translate(1 24)'/%3e%3c/symbol%3e%3csymbol id='i' overflow='visible' viewBox='0 0 129 57'%3e%3cpath fill='url(%23c)' stroke='%230a5ad4' stroke-miterlimit='10' d='M8.5 56.5a8 8 0 01-8-8v-40a8 8 0 0116 0v40a8 8 0 01-8 8Z' opacity='0'%3e%3canimateTransform id='x1' additive='sum' attributeName='transform' begin='0s%3b x1.end%2b.33s' dur='.67s' type='translate' values='0 -60%3b 0 60'/%3e%3canimate id='y1' attributeName='opacity' begin='0s%3b y1.end%2b.33s' dur='.67s' keyTimes='0%3b .25%3b 1' values='0%3b 1%3b 0'/%3e%3c/path%3e%3cpath fill='url(%23d)' stroke='%230a5ad4' stroke-miterlimit='10' d='M64.5 56.5a8 8 0 01-8-8v-40a8 8 0 0116 0v40a8 8 0 01-8 8Z' opacity='0'%3e%3canimateTransform id='x2' additive='sum' attributeName='transform' begin='.33s%3b x2.end%2b.33s' dur='.67s' type='translate' values='0 -60%3b 0 60'/%3e%3canimate id='y2' attributeName='opacity' begin='.33s%3b y2.end%2b.33s' dur='.67s' keyTimes='0%3b .25%3b 1' values='0%3b 1%3b 0'/%3e%3c/path%3e%3cpath fill='url(%23e)' stroke='%230a5ad4' stroke-miterlimit='10' d='M120.5 56.5a8 8 0 01-8-8v-40a8 8 0 0116 0v40a8 8 0 01-8 8Z' opacity='0'%3e%3canimateTransform id='x3' additive='sum' attributeName='transform' begin='-.33s%3b x3.end%2b.33s' dur='.67s' type='translate' values='0 -60%3b 0 60'/%3e%3canimate id='y3' attributeName='opacity' begin='-.33s%3b y3.end%2b.33s' dur='.67s' keyTimes='0%3b .25%3b 1' values='0%3b 1%3b 0'/%3e%3c/path%3e%3c/symbol%3e%3c/defs%3e%3cuse xlink:href='%23f' width='351' height='246' transform='translate(80 121)'/%3e%3cuse xlink:href='%23i' width='129' height='57' transform='translate(191.5 343.5)'/%3e%3c/svg%3e"},partlycloudy:{day:"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 512 512'%3e%3cdefs%3e%3csymbol id='d' viewBox='0 0 196 196'%3e%3ccircle cx='98' cy='98' r='40' fill='url(%23b)' stroke='%23f8af18' stroke-miterlimit='10' stroke-width='4'/%3e%3cpath fill='none' stroke='%23fbbf24' stroke-linecap='round' stroke-miterlimit='10' stroke-width='12' d='M98 31.4V6m0 184v-25.4M145.1 51l18-17.9M33 163l18-17.9M51 51 33 33m130.1 130.1-18-18M6 98h25.4M190 98h-25.4'%3e%3canimateTransform additive='sum' attributeName='transform' dur='6s' repeatCount='indefinite' type='rotate' values='0 98 98%3b 45 98 98'/%3e%3c/path%3e%3c/symbol%3e%3csymbol id='e' viewBox='0 0 350 222'%3e%3cpath fill='url(%23a)' stroke='%23e6effc' stroke-miterlimit='10' stroke-width='6' d='m291 107-2.5.1A83.9 83.9 0 00135.6 43 56 56 0 0051 91a56.6 56.6 0 00.8 9A60 60 0 0063 219l4-.2v.2h224a56 56 0 000-112Z'/%3e%3c/symbol%3e%3csymbol id='c' viewBox='0 0 363 258'%3e%3cuse xlink:href='%23d' width='196' height='196'/%3e%3cuse xlink:href='%23e' width='350' height='222' transform='translate(13 36)'/%3e%3c/symbol%3e%3clinearGradient id='a' x1='99.5' x2='232.6' y1='30.7' y2='261.4' gradientUnits='userSpaceOnUse'%3e%3cstop offset='0' stop-color='%23f3f7fe'/%3e%3cstop offset='.5' stop-color='%23f3f7fe'/%3e%3cstop offset='1' stop-color='%23deeafb'/%3e%3c/linearGradient%3e%3clinearGradient id='b' x1='78' x2='118' y1='63.4' y2='132.7' gradientUnits='userSpaceOnUse'%3e%3cstop offset='0' stop-color='%23fbbf24'/%3e%3cstop offset='.5' stop-color='%23fbbf24'/%3e%3cstop offset='1' stop-color='%23f59e0b'/%3e%3c/linearGradient%3e%3c/defs%3e%3cuse xlink:href='%23c' width='363' height='258' transform='translate(68 109)'/%3e%3c/svg%3e",night:"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 512 512'%3e%3cdefs%3e%3csymbol id='d' viewBox='0 0 172 172'%3e%3cpath fill='url(%23b)' stroke='%2372b9d5' stroke-linecap='round' stroke-linejoin='round' stroke-width='4' d='M160.6 107.4a84.8 84.8 0 01-85.4-84.3A83.3 83.3 0 0178 2 84.7 84.7 0 002 85.7 84.8 84.8 0 0087.4 170a85.2 85.2 0 0082.6-63.1 88 88 0 01-9.4.5Z'%3e%3canimateTransform additive='sum' attributeName='transform' dur='6s' repeatCount='indefinite' type='rotate' values='-15 86 86%3b 9 86 86%3b -15 86 86'/%3e%3c/path%3e%3c/symbol%3e%3csymbol id='e' viewBox='0 0 350 222'%3e%3cpath fill='url(%23a)' stroke='%23e6effc' stroke-miterlimit='10' stroke-width='6' d='m291 107-2.5.1A83.9 83.9 0 00135.6 43 56 56 0 0051 91a56.6 56.6 0 00.8 9A60 60 0 0063 219l4-.2v.2h224a56 56 0 000-112Z'/%3e%3c/symbol%3e%3csymbol id='c' viewBox='0 0 351 246'%3e%3cuse xlink:href='%23d' width='172' height='172'/%3e%3cuse xlink:href='%23e' width='350' height='222' transform='translate(1 24)'/%3e%3c/symbol%3e%3clinearGradient id='a' x1='99.5' x2='232.6' y1='30.7' y2='261.4' gradientUnits='userSpaceOnUse'%3e%3cstop offset='0' stop-color='%23f3f7fe'/%3e%3cstop offset='.5' stop-color='%23f3f7fe'/%3e%3cstop offset='1' stop-color='%23deeafb'/%3e%3c/linearGradient%3e%3clinearGradient id='b' x1='34.7' x2='119.2' y1='18.6' y2='165' gradientUnits='userSpaceOnUse'%3e%3cstop offset='0' stop-color='%2386c3db'/%3e%3cstop offset='.5' stop-color='%2386c3db'/%3e%3cstop offset='1' stop-color='%235eafcf'/%3e%3c/linearGradient%3e%3c/defs%3e%3cuse xlink:href='%23c' width='351' height='246' transform='translate(80 121)'/%3e%3c/svg%3e"},cloudy:"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 512 512'%3e%3cdefs%3e%3clinearGradient id='a' x1='99.5' x2='232.6' y1='30.7' y2='261.4' gradientUnits='userSpaceOnUse'%3e%3cstop offset='0' stop-color='%23f3f7fe'/%3e%3cstop offset='.5' stop-color='%23f3f7fe'/%3e%3cstop offset='1' stop-color='%23deeafb'/%3e%3c/linearGradient%3e%3csymbol id='b' viewBox='0 0 350 222'%3e%3cpath fill='url(%23a)' stroke='%23e6effc' stroke-miterlimit='10' stroke-width='6' d='m291 107-2.5.1A83.9 83.9 0 00135.6 43 56 56 0 0051 91a56.6 56.6 0 00.8 9A60 60 0 0063 219l4-.2v.2h224a56 56 0 000-112Z'/%3e%3c/symbol%3e%3c/defs%3e%3cuse xlink:href='%23b' width='350' height='222' transform='translate(81 145)'%3e%3canimateTransform additive='sum' attributeName='transform' dur='6s' repeatCount='indefinite' type='translate' values='-18 0%3b 18 0%3b -18 0'/%3e%3c/use%3e%3c/svg%3e","clear-night":{day:Yt,night:"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 512 512'%3e%3cdefs%3e%3clinearGradient id='a' x1='54.3' x2='187.2' y1='29' y2='259.1' gradientUnits='userSpaceOnUse'%3e%3cstop offset='0' stop-color='%2386c3db'/%3e%3cstop offset='.5' stop-color='%2386c3db'/%3e%3cstop offset='1' stop-color='%235eafcf'/%3e%3c/linearGradient%3e%3csymbol id='b' overflow='visible' viewBox='0 0 270 270'%3e%3cpath fill='url(%23a)' stroke='%2372b9d5' stroke-linecap='round' stroke-linejoin='round' stroke-width='6' d='M252.3 168.6A133.4 133.4 0 01118 36.2 130.5 130.5 0 01122.5 3 133 133 0 003 134.6C3 207.7 63 267 137.2 267c62.5 0 114.8-42.2 129.8-99.2a135.6 135.6 0 01-14.8.8Z'%3e%3canimateTransform additive='sum' attributeName='transform' dur='6s' repeatCount='indefinite' type='rotate' values='-15 135 135%3b 9 135 135%3b -15 135 135'/%3e%3c/path%3e%3c/symbol%3e%3c/defs%3e%3cuse xlink:href='%23b' width='270' height='270' transform='translate(121 121)'/%3e%3c/svg%3e"},fog:{day:"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 512 512'%3e%3cdefs%3e%3clinearGradient id='a' x1='96' x2='168' y1='-2.4' y2='122.3' gradientUnits='userSpaceOnUse'%3e%3cstop offset='0' stop-color='%23d4d7dd'/%3e%3cstop offset='.5' stop-color='%23d4d7dd'/%3e%3cstop offset='1' stop-color='%23bec1c6'/%3e%3c/linearGradient%3e%3clinearGradient xlink:href='%23a' id='b' x2='168' y1='-50.4' y2='74.3'/%3e%3clinearGradient id='c' x1='150' x2='234' y1='119.2' y2='264.8' gradientUnits='userSpaceOnUse'%3e%3cstop offset='0' stop-color='%23fbbf24'/%3e%3cstop offset='.5' stop-color='%23fbbf24'/%3e%3cstop offset='1' stop-color='%23f59e0b'/%3e%3c/linearGradient%3e%3csymbol id='e' viewBox='0 0 384 384'%3e%3ccircle cx='192' cy='192' r='84' fill='url(%23c)' stroke='%23f8af18' stroke-miterlimit='10' stroke-width='6'/%3e%3cpath fill='none' stroke='%23fbbf24' stroke-linecap='round' stroke-miterlimit='10' stroke-width='24' d='M192 61.7V12m0 360v-49.7m92.2-222.5 35-35M64.8 319.2l35.1-35.1m0-184.4-35-35m254.5 254.5-35.1-35.1M61.7 192H12m360 0h-49.7'%3e%3canimateTransform additive='sum' attributeName='transform' dur='6s' repeatCount='indefinite' type='rotate' values='0 192 192%3b 45 192 192'/%3e%3c/path%3e%3c/symbol%3e%3csymbol id='f' overflow='visible' viewBox='0 0 264 72'%3e%3cpath fill='none' stroke='url(%23a)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='24' d='M12 60h240'%3e%3canimateTransform additive='sum' attributeName='transform' dur='6s' repeatCount='indefinite' type='translate' values='-24 0%3b 24 0%3b -24 0'/%3e%3c/path%3e%3cpath fill='none' stroke='url(%23b)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='24' d='M12 12h240'%3e%3canimateTransform additive='sum' attributeName='transform' dur='6s' repeatCount='indefinite' type='translate' values='24 0%3b -24 0%3b 24 0'/%3e%3c/path%3e%3c/symbol%3e%3cclipPath id='d'%3e%3cpath fill='none' d='M0 0h512v306H0z'/%3e%3c/clipPath%3e%3c/defs%3e%3cg clip-path='url(%23d)'%3e%3cuse xlink:href='%23e' width='384' height='384' transform='translate(64 100)'/%3e%3c/g%3e%3cuse xlink:href='%23f' width='264' height='72' transform='translate(124 336)'/%3e%3c/svg%3e",night:"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 512 512'%3e%3cdefs%3e%3clinearGradient id='a' x1='96' x2='168' y1='-2.4' y2='122.3' gradientUnits='userSpaceOnUse'%3e%3cstop offset='0' stop-color='%23d4d7dd'/%3e%3cstop offset='.5' stop-color='%23d4d7dd'/%3e%3cstop offset='1' stop-color='%23bec1c6'/%3e%3c/linearGradient%3e%3clinearGradient xlink:href='%23a' id='b' x2='168' y1='-50.4' y2='74.3'/%3e%3clinearGradient id='c' x1='54.3' x2='187.2' y1='29' y2='259.1' gradientUnits='userSpaceOnUse'%3e%3cstop offset='0' stop-color='%2386c3db'/%3e%3cstop offset='.5' stop-color='%2386c3db'/%3e%3cstop offset='1' stop-color='%235eafcf'/%3e%3c/linearGradient%3e%3csymbol id='e' viewBox='0 0 270 270'%3e%3cpath fill='url(%23c)' stroke='%2372b9d5' stroke-linecap='round' stroke-linejoin='round' stroke-width='6' d='M252.3 168.6A133.4 133.4 0 01118 36.2 130.5 130.5 0 01122.5 3 133 133 0 003 134.6C3 207.7 63 267 137.2 267c62.5 0 114.8-42.2 129.8-99.2a135.6 135.6 0 01-14.8.8Z'%3e%3canimateTransform additive='sum' attributeName='transform' dur='6s' repeatCount='indefinite' type='rotate' values='-15 135 135%3b 9 135 135%3b -15 135 135'/%3e%3c/path%3e%3c/symbol%3e%3csymbol id='f' overflow='visible' viewBox='0 0 264 72'%3e%3cpath fill='none' stroke='url(%23a)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='24' d='M12 60h240'%3e%3canimateTransform additive='sum' attributeName='transform' dur='6s' repeatCount='indefinite' type='translate' values='-24 0%3b 24 0%3b -24 0'/%3e%3c/path%3e%3cpath fill='none' stroke='url(%23b)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='24' d='M12 12h240'%3e%3canimateTransform additive='sum' attributeName='transform' dur='6s' repeatCount='indefinite' type='translate' values='24 0%3b -24 0%3b 24 0'/%3e%3c/path%3e%3c/symbol%3e%3cclipPath id='d'%3e%3cpath fill='none' d='M0 0h512v306H0z'/%3e%3c/clipPath%3e%3c/defs%3e%3cg clip-path='url(%23d)'%3e%3cuse xlink:href='%23e' width='270' height='270' transform='translate(121 121)'/%3e%3c/g%3e%3cuse xlink:href='%23f' width='264' height='72' transform='translate(124 336)'/%3e%3c/svg%3e"},hail:"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 512 512'%3e%3cdefs%3e%3clinearGradient id='a' x1='99.5' x2='232.6' y1='30.7' y2='261.4' gradientUnits='userSpaceOnUse'%3e%3cstop offset='0' stop-color='%23f3f7fe'/%3e%3cstop offset='.5' stop-color='%23f3f7fe'/%3e%3cstop offset='1' stop-color='%23deeafb'/%3e%3c/linearGradient%3e%3clinearGradient id='b' x1='6.5' x2='18.5' y1='2.1' y2='22.9' gradientUnits='userSpaceOnUse'%3e%3cstop offset='0' stop-color='%2386c3db'/%3e%3cstop offset='.5' stop-color='%2386c3db'/%3e%3cstop offset='1' stop-color='%235eafcf'/%3e%3c/linearGradient%3e%3clinearGradient xlink:href='%23b' id='c' x1='62.5' x2='74.5' y1='2.1' y2='22.9'/%3e%3clinearGradient xlink:href='%23b' id='d' x1='118.5' x2='130.5' y1='2.1' y2='22.9'/%3e%3csymbol id='e' viewBox='0 0 350 222'%3e%3cpath fill='url(%23a)' stroke='%23e6effc' stroke-miterlimit='10' stroke-width='6' d='m291 107-2.5.1A83.9 83.9 0 00135.6 43 56 56 0 0051 91a56.6 56.6 0 00.8 9A60 60 0 0063 219l4-.2v.2h224a56 56 0 000-112Z'/%3e%3c/symbol%3e%3csymbol id='f' overflow='visible' viewBox='0 0 137 25'%3e%3cpath fill='url(%23b)' stroke='%2386c3db' stroke-miterlimit='10' d='M12.5.5a12 12 0 1012 12 12 12 0 00-12-12Z' opacity='0'%3e%3canimateTransform id='x1' additive='sum' attributeName='transform' begin='0s%3b x1.end%2b.42s' dur='.58s' keyTimes='0%3b .71%3b 1' type='translate' values='0 -46%3b 0 86%3b -18 74'/%3e%3canimate id='y1' attributeName='opacity' begin='0s%3b y1.end%2b.42s' dur='.58s' keyTimes='0%3b .14%3b .71%3b 1' values='0%3b 1%3b 1%3b 0'/%3e%3c/path%3e%3cpath fill='url(%23c)' stroke='%2386c3db' stroke-miterlimit='10' d='M68.5.5a12 12 0 1012 12 12 12 0 00-12-12Z' opacity='0'%3e%3canimateTransform id='x2' additive='sum' attributeName='transform' begin='.67s%3b x2.end%2b.42s' dur='.58s' keyTimes='0%3b .71%3b 1' type='translate' values='0 -46%3b 0 86%3b 0 74'/%3e%3canimate id='y2' attributeName='opacity' begin='.67s%3b y2.end%2b.42s' dur='.58s' keyTimes='0%3b .14%3b .71%3b 1' values='0%3b 1%3b 1%3b 0'/%3e%3c/path%3e%3cpath fill='url(%23d)' stroke='%2386c3db' stroke-miterlimit='10' d='M124.5.5a12 12 0 1012 12 12 12 0 00-12-12Z' opacity='0'%3e%3canimateTransform id='x3' additive='sum' attributeName='transform' begin='.33s%3b x3.end%2b.42s' dur='.58s' keyTimes='0%3b .71%3b 1' type='translate' values='0 -46%3b 0 86%3b 18 74'/%3e%3canimate id='y3' attributeName='opacity' begin='.33s%3b y3.end%2b.42s' dur='.58s' keyTimes='0%3b .14%3b .71%3b 1' values='0%3b 1%3b 1%3b 0'/%3e%3c/path%3e%3c/symbol%3e%3c/defs%3e%3cuse xlink:href='%23e' width='350' height='222' transform='translate(81 145)'/%3e%3cuse xlink:href='%23f' width='137' height='25' transform='translate(187.5 349.5)'/%3e%3c/svg%3e",lightning:{day:"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 512 512'%3e%3cdefs%3e%3csymbol id='e' viewBox='0 0 196 196'%3e%3ccircle cx='98' cy='98' r='40' fill='url(%23c)' stroke='%23f8af18' stroke-miterlimit='10' stroke-width='4'/%3e%3cpath fill='none' stroke='%23fbbf24' stroke-linecap='round' stroke-miterlimit='10' stroke-width='12' d='M98 31.4V6m0 184v-25.4M145.1 51l18-17.9M33 163l18-17.9M51 51 33 33m130.1 130.1-18-18M6 98h25.4M190 98h-25.4'%3e%3canimateTransform additive='sum' attributeName='transform' dur='6s' repeatCount='indefinite' type='rotate' values='0 98 98%3b 45 98 98'/%3e%3c/path%3e%3c/symbol%3e%3csymbol id='f' viewBox='0 0 350 222'%3e%3cpath fill='url(%23a)' stroke='%23e6effc' stroke-miterlimit='10' stroke-width='6' d='m291 107-2.5.1A83.9 83.9 0 00135.6 43 56 56 0 0051 91a56.6 56.6 0 00.8 9A60 60 0 0063 219l4-.2v.2h224a56 56 0 000-112Z'/%3e%3c/symbol%3e%3csymbol id='d' viewBox='0 0 363 258'%3e%3cuse xlink:href='%23e' width='196' height='196'/%3e%3cuse xlink:href='%23f' width='350' height='222' transform='translate(13 36)'/%3e%3c/symbol%3e%3csymbol id='g' viewBox='0 0 102.7 186.8'%3e%3cpath fill='url(%23b)' stroke='%23f6a823' stroke-miterlimit='10' stroke-width='4' d='m34.8 2-32 96h32l-16 80 80-112h-48l32-64h-48z'%3e%3canimate id='x1' attributeName='opacity' begin='0s%3b x1.end%2b.67s' dur='1.33s' keyTimes='0%3b .38%3b .5%3b .63%3b .75%3b .86%3b .94%3b 1' values='1%3b 1%3b 0%3b 1%3b 0%3b 1%3b 0%3b 1'/%3e%3c/path%3e%3c/symbol%3e%3clinearGradient id='a' x1='99.5' x2='232.6' y1='30.7' y2='261.4' gradientUnits='userSpaceOnUse'%3e%3cstop offset='0' stop-color='%23f3f7fe'/%3e%3cstop offset='.5' stop-color='%23f3f7fe'/%3e%3cstop offset='1' stop-color='%23deeafb'/%3e%3c/linearGradient%3e%3clinearGradient id='b' x1='8.7' x2='80.9' y1='17.1' y2='142.1' gradientUnits='userSpaceOnUse'%3e%3cstop offset='0' stop-color='%23f7b23b'/%3e%3cstop offset='.5' stop-color='%23f7b23b'/%3e%3cstop offset='1' stop-color='%23f59e0b'/%3e%3c/linearGradient%3e%3clinearGradient id='c' x1='78' x2='118' y1='63.4' y2='132.7' gradientUnits='userSpaceOnUse'%3e%3cstop offset='0' stop-color='%23fbbf24'/%3e%3cstop offset='.5' stop-color='%23fbbf24'/%3e%3cstop offset='1' stop-color='%23f59e0b'/%3e%3c/linearGradient%3e%3c/defs%3e%3cuse xlink:href='%23d' width='363' height='258' transform='translate(68 109)'/%3e%3cuse xlink:href='%23g' width='102.7' height='186.7' transform='translate(205.23 291)'/%3e%3c/svg%3e",night:"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 512 512'%3e%3cdefs%3e%3csymbol id='e' viewBox='0 0 172 172'%3e%3cpath fill='url(%23c)' stroke='%2372b9d5' stroke-linecap='round' stroke-linejoin='round' stroke-width='4' d='M160.6 107.4a84.8 84.8 0 01-85.4-84.3A83.3 83.3 0 0178 2 84.7 84.7 0 002 85.7 84.8 84.8 0 0087.4 170a85.2 85.2 0 0082.6-63.1 88 88 0 01-9.4.5Z'%3e%3canimateTransform additive='sum' attributeName='transform' dur='6s' repeatCount='indefinite' type='rotate' values='-15 86 86%3b 9 86 86%3b -15 86 86'/%3e%3c/path%3e%3c/symbol%3e%3csymbol id='f' viewBox='0 0 350 222'%3e%3cpath fill='url(%23a)' stroke='%23e6effc' stroke-miterlimit='10' stroke-width='6' d='m291 107-2.5.1A83.9 83.9 0 00135.6 43 56 56 0 0051 91a56.6 56.6 0 00.8 9A60 60 0 0063 219l4-.2v.2h224a56 56 0 000-112Z'/%3e%3c/symbol%3e%3csymbol id='d' viewBox='0 0 351 246'%3e%3cuse xlink:href='%23e' width='172' height='172'/%3e%3cuse xlink:href='%23f' width='350' height='222' transform='translate(1 24)'/%3e%3c/symbol%3e%3csymbol id='g' viewBox='0 0 102.7 186.8'%3e%3cpath fill='url(%23b)' stroke='%23f6a823' stroke-miterlimit='10' stroke-width='4' d='m34.8 2-32 96h32l-16 80 80-112h-48l32-64h-48z'%3e%3canimate id='x1' attributeName='opacity' begin='0s%3b x1.end%2b.67s' dur='1.33s' keyTimes='0%3b .38%3b .5%3b .63%3b .75%3b .86%3b .94%3b 1' values='1%3b 1%3b 0%3b 1%3b 0%3b 1%3b 0%3b 1'/%3e%3c/path%3e%3c/symbol%3e%3clinearGradient id='a' x1='99.5' x2='232.6' y1='30.7' y2='261.4' gradientUnits='userSpaceOnUse'%3e%3cstop offset='0' stop-color='%23f3f7fe'/%3e%3cstop offset='.5' stop-color='%23f3f7fe'/%3e%3cstop offset='1' stop-color='%23deeafb'/%3e%3c/linearGradient%3e%3clinearGradient id='b' x1='8.7' x2='80.9' y1='17.1' y2='142.1' gradientUnits='userSpaceOnUse'%3e%3cstop offset='0' stop-color='%23f7b23b'/%3e%3cstop offset='.5' stop-color='%23f7b23b'/%3e%3cstop offset='1' stop-color='%23f59e0b'/%3e%3c/linearGradient%3e%3clinearGradient id='c' x1='34.7' x2='119.2' y1='18.6' y2='165' gradientUnits='userSpaceOnUse'%3e%3cstop offset='0' stop-color='%2386c3db'/%3e%3cstop offset='.5' stop-color='%2386c3db'/%3e%3cstop offset='1' stop-color='%235eafcf'/%3e%3c/linearGradient%3e%3c/defs%3e%3cuse xlink:href='%23d' width='351' height='246' transform='translate(80 121)'/%3e%3cuse xlink:href='%23g' width='102.7' height='186.7' transform='translate(205.23 291)'/%3e%3c/svg%3e"},"lightning-rainy":{day:"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 512 512'%3e%3cdefs%3e%3clinearGradient id='a' x1='99.5' x2='232.6' y1='30.7' y2='261.4' gradientUnits='userSpaceOnUse'%3e%3cstop offset='0' stop-color='%23f3f7fe'/%3e%3cstop offset='.5' stop-color='%23f3f7fe'/%3e%3cstop offset='1' stop-color='%23deeafb'/%3e%3c/linearGradient%3e%3clinearGradient id='b' x1='8.7' x2='80.9' y1='17.1' y2='142.1' gradientUnits='userSpaceOnUse'%3e%3cstop offset='0' stop-color='%23f7b23b'/%3e%3cstop offset='.5' stop-color='%23f7b23b'/%3e%3cstop offset='1' stop-color='%23f59e0b'/%3e%3c/linearGradient%3e%3clinearGradient id='c' x1='1381.3' x2='1399.5' y1='-1144.7' y2='-1097.4' gradientTransform='rotate(-9 8002.567 8233.063)' gradientUnits='userSpaceOnUse'%3e%3cstop offset='0' stop-color='%230b65ed'/%3e%3cstop offset='.5' stop-color='%230a5ad4'/%3e%3cstop offset='1' stop-color='%230950bc'/%3e%3c/linearGradient%3e%3clinearGradient xlink:href='%23c' id='d' x1='1436.7' x2='1454.9' y1='-1137' y2='-1089.7' gradientTransform='rotate(-9 8009.537 8233.037)'/%3e%3clinearGradient xlink:href='%23c' id='e' x1='1492.1' x2='1510.3' y1='-1129.3' y2='-1082.1' gradientTransform='rotate(-9 8016.566 8233.078)'/%3e%3clinearGradient id='f' x1='78' x2='118' y1='63.4' y2='132.7' gradientUnits='userSpaceOnUse'%3e%3cstop offset='0' stop-color='%23fbbf24'/%3e%3cstop offset='.5' stop-color='%23fbbf24'/%3e%3cstop offset='1' stop-color='%23f59e0b'/%3e%3c/linearGradient%3e%3csymbol id='h' viewBox='0 0 196 196'%3e%3ccircle cx='98' cy='98' r='40' fill='url(%23f)' stroke='%23f8af18' stroke-miterlimit='10' stroke-width='4'/%3e%3cpath fill='none' stroke='%23fbbf24' stroke-linecap='round' stroke-miterlimit='10' stroke-width='12' d='M98 31.4V6m0 184v-25.4M145.1 51l18-17.9M33 163l18-17.9M51 51 33 33m130.1 130.1-18-18M6 98h25.4M190 98h-25.4'%3e%3canimateTransform additive='sum' attributeName='transform' dur='6s' repeatCount='indefinite' type='rotate' values='0 98 98%3b 45 98 98'/%3e%3c/path%3e%3c/symbol%3e%3csymbol id='i' viewBox='0 0 350 222'%3e%3cpath fill='url(%23a)' stroke='%23e6effc' stroke-miterlimit='10' stroke-width='6' d='m291 107-2.5.1A83.9 83.9 0 00135.6 43 56 56 0 0051 91a56.6 56.6 0 00.8 9A60 60 0 0063 219l4-.2v.2h224a56 56 0 000-112Z'/%3e%3c/symbol%3e%3csymbol id='g' viewBox='0 0 363 258'%3e%3cuse xlink:href='%23h' width='196' height='196'/%3e%3cuse xlink:href='%23i' width='350' height='222' transform='translate(13 36)'/%3e%3c/symbol%3e%3csymbol id='j' overflow='visible' viewBox='0 0 129 57'%3e%3cpath fill='url(%23c)' stroke='%230a5ad4' stroke-miterlimit='10' d='M8.5 56.5a8 8 0 01-8-8v-40a8 8 0 0116 0v40a8 8 0 01-8 8Z' opacity='0'%3e%3canimateTransform id='x1' additive='sum' attributeName='transform' begin='0s%3b x1.end%2b.33s' dur='.67s' type='translate' values='0 -60%3b 0 60'/%3e%3canimate id='y1' attributeName='opacity' begin='0s%3b y1.end%2b.33s' dur='.67s' keyTimes='0%3b .25%3b 1' values='0%3b 1%3b 0'/%3e%3c/path%3e%3cpath fill='url(%23d)' stroke='%230a5ad4' stroke-miterlimit='10' d='M64.5 56.5a8 8 0 01-8-8v-40a8 8 0 0116 0v40a8 8 0 01-8 8Z' opacity='0'%3e%3canimateTransform id='x2' additive='sum' attributeName='transform' begin='.33s%3b x2.end%2b.33s' dur='.67s' type='translate' values='0 -60%3b 0 60'/%3e%3canimate id='y2' attributeName='opacity' begin='.33s%3b y2.end%2b.33s' dur='.67s' keyTimes='0%3b .25%3b 1' values='0%3b 1%3b 0'/%3e%3c/path%3e%3cpath fill='url(%23e)' stroke='%230a5ad4' stroke-miterlimit='10' d='M120.5 56.5a8 8 0 01-8-8v-40a8 8 0 0116 0v40a8 8 0 01-8 8Z' opacity='0'%3e%3canimateTransform id='x3' additive='sum' attributeName='transform' begin='-.33s%3b x3.end%2b.33s' dur='.67s' type='translate' values='0 -60%3b 0 60'/%3e%3canimate id='y3' attributeName='opacity' begin='-.33s%3b y3.end%2b.33s' dur='.67s' keyTimes='0%3b .25%3b 1' values='0%3b 1%3b 0'/%3e%3c/path%3e%3c/symbol%3e%3csymbol id='k' viewBox='0 0 102.7 186.8'%3e%3cpath fill='url(%23b)' stroke='%23f6a823' stroke-miterlimit='10' stroke-width='4' d='m34.8 2-32 96h32l-16 80 80-112h-48l32-64h-48z'%3e%3canimate id='x1' attributeName='opacity' begin='0s%3b x1.end%2b.67s' dur='1.33s' keyTimes='0%3b .38%3b .5%3b .63%3b .75%3b .86%3b .94%3b 1' values='1%3b 1%3b 0%3b 1%3b 0%3b 1%3b 0%3b 1'/%3e%3c/path%3e%3c/symbol%3e%3c/defs%3e%3cuse xlink:href='%23g' width='363' height='258' transform='translate(68 109)'/%3e%3cuse xlink:href='%23j' width='129' height='57' transform='translate(191.5 343.5)'/%3e%3cuse xlink:href='%23k' width='102.7' height='186.7' transform='translate(205.23 291)'/%3e%3c/svg%3e",night:"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 512 512'%3e%3cdefs%3e%3clinearGradient id='a' x1='99.5' x2='232.6' y1='30.7' y2='261.4' gradientUnits='userSpaceOnUse'%3e%3cstop offset='0' stop-color='%23f3f7fe'/%3e%3cstop offset='.5' stop-color='%23f3f7fe'/%3e%3cstop offset='1' stop-color='%23deeafb'/%3e%3c/linearGradient%3e%3clinearGradient id='b' x1='8.7' x2='80.9' y1='17.1' y2='142.1' gradientUnits='userSpaceOnUse'%3e%3cstop offset='0' stop-color='%23f7b23b'/%3e%3cstop offset='.5' stop-color='%23f7b23b'/%3e%3cstop offset='1' stop-color='%23f59e0b'/%3e%3c/linearGradient%3e%3clinearGradient id='c' x1='34.7' x2='119.2' y1='18.6' y2='165' gradientUnits='userSpaceOnUse'%3e%3cstop offset='0' stop-color='%2386c3db'/%3e%3cstop offset='.5' stop-color='%2386c3db'/%3e%3cstop offset='1' stop-color='%235eafcf'/%3e%3c/linearGradient%3e%3clinearGradient id='d' x1='1381.3' x2='1399.5' y1='-1144.7' y2='-1097.4' gradientTransform='rotate(-9 8002.567 8233.063)' gradientUnits='userSpaceOnUse'%3e%3cstop offset='0' stop-color='%230b65ed'/%3e%3cstop offset='.5' stop-color='%230a5ad4'/%3e%3cstop offset='1' stop-color='%230950bc'/%3e%3c/linearGradient%3e%3clinearGradient xlink:href='%23d' id='e' x1='1436.7' x2='1454.9' y1='-1137' y2='-1089.7' gradientTransform='rotate(-9 8009.537 8233.037)'/%3e%3clinearGradient xlink:href='%23d' id='f' x1='1492.1' x2='1510.3' y1='-1129.3' y2='-1082.1' gradientTransform='rotate(-9 8016.566 8233.078)'/%3e%3csymbol id='h' viewBox='0 0 172 172'%3e%3cpath fill='url(%23c)' stroke='%2372b9d5' stroke-linecap='round' stroke-linejoin='round' stroke-width='4' d='M160.6 107.4a84.8 84.8 0 01-85.4-84.3A83.3 83.3 0 0178 2 84.7 84.7 0 002 85.7 84.8 84.8 0 0087.4 170a85.2 85.2 0 0082.6-63.1 88 88 0 01-9.4.5Z'%3e%3canimateTransform additive='sum' attributeName='transform' dur='6s' repeatCount='indefinite' type='rotate' values='-15 86 86%3b 9 86 86%3b -15 86 86'/%3e%3c/path%3e%3c/symbol%3e%3csymbol id='i' viewBox='0 0 350 222'%3e%3cpath fill='url(%23a)' stroke='%23e6effc' stroke-miterlimit='10' stroke-width='6' d='m291 107-2.5.1A83.9 83.9 0 00135.6 43 56 56 0 0051 91a56.6 56.6 0 00.8 9A60 60 0 0063 219l4-.2v.2h224a56 56 0 000-112Z'/%3e%3c/symbol%3e%3csymbol id='g' viewBox='0 0 351 246'%3e%3cuse xlink:href='%23h' width='172' height='172'/%3e%3cuse xlink:href='%23i' width='350' height='222' transform='translate(1 24)'/%3e%3c/symbol%3e%3csymbol id='j' overflow='visible' viewBox='0 0 129 57'%3e%3cpath fill='url(%23d)' stroke='%230a5ad4' stroke-miterlimit='10' d='M8.5 56.5a8 8 0 01-8-8v-40a8 8 0 0116 0v40a8 8 0 01-8 8Z' opacity='0'%3e%3canimateTransform id='x1' additive='sum' attributeName='transform' begin='0s%3b x1.end%2b.33s' dur='.67s' type='translate' values='0 -60%3b 0 60'/%3e%3canimate id='y1' attributeName='opacity' begin='0s%3b y1.end%2b.33s' dur='.67s' keyTimes='0%3b .25%3b 1' values='0%3b 1%3b 0'/%3e%3c/path%3e%3cpath fill='url(%23e)' stroke='%230a5ad4' stroke-miterlimit='10' d='M64.5 56.5a8 8 0 01-8-8v-40a8 8 0 0116 0v40a8 8 0 01-8 8Z' opacity='0'%3e%3canimateTransform id='x2' additive='sum' attributeName='transform' begin='.33s%3b x2.end%2b.33s' dur='.67s' type='translate' values='0 -60%3b 0 60'/%3e%3canimate id='y2' attributeName='opacity' begin='.33s%3b y2.end%2b.33s' dur='.67s' keyTimes='0%3b .25%3b 1' values='0%3b 1%3b 0'/%3e%3c/path%3e%3cpath fill='url(%23f)' stroke='%230a5ad4' stroke-miterlimit='10' d='M120.5 56.5a8 8 0 01-8-8v-40a8 8 0 0116 0v40a8 8 0 01-8 8Z' opacity='0'%3e%3canimateTransform id='x3' additive='sum' attributeName='transform' begin='-.33s%3b x3.end%2b.33s' dur='.67s' type='translate' values='0 -60%3b 0 60'/%3e%3canimate id='y3' attributeName='opacity' begin='-.33s%3b y3.end%2b.33s' dur='.67s' keyTimes='0%3b .25%3b 1' values='0%3b 1%3b 0'/%3e%3c/path%3e%3c/symbol%3e%3csymbol id='k' viewBox='0 0 102.7 186.8'%3e%3cpath fill='url(%23b)' stroke='%23f6a823' stroke-miterlimit='10' stroke-width='4' d='m34.8 2-32 96h32l-16 80 80-112h-48l32-64h-48z'%3e%3canimate id='x1' attributeName='opacity' begin='0s%3b x1.end%2b.67s' dur='1.33s' keyTimes='0%3b .38%3b .5%3b .63%3b .75%3b .86%3b .94%3b 1' values='1%3b 1%3b 0%3b 1%3b 0%3b 1%3b 0%3b 1'/%3e%3c/path%3e%3c/symbol%3e%3c/defs%3e%3cuse xlink:href='%23g' width='351' height='246' transform='translate(80 121)'/%3e%3cuse xlink:href='%23j' width='129' height='57' transform='translate(191.5 343.5)'/%3e%3cuse xlink:href='%23k' width='102.7' height='186.7' transform='translate(205.23 291)'/%3e%3c/svg%3e"},pouring:"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 512 512'%3e%3cdefs%3e%3clinearGradient id='a' x1='99.5' x2='232.6' y1='30.7' y2='261.4' gradientUnits='userSpaceOnUse'%3e%3cstop offset='0' stop-color='%23f3f7fe'/%3e%3cstop offset='.5' stop-color='%23f3f7fe'/%3e%3cstop offset='1' stop-color='%23deeafb'/%3e%3c/linearGradient%3e%3clinearGradient id='b' x1='1381.3' x2='1399.5' y1='-1144.7' y2='-1097.4' gradientTransform='rotate(-9 8002.567 8233.063)' gradientUnits='userSpaceOnUse'%3e%3cstop offset='0' stop-color='%230b65ed'/%3e%3cstop offset='.5' stop-color='%230a5ad4'/%3e%3cstop offset='1' stop-color='%230950bc'/%3e%3c/linearGradient%3e%3clinearGradient xlink:href='%23b' id='c' x1='1436.7' x2='1454.9' y1='-1137' y2='-1089.7' gradientTransform='rotate(-9 8009.537 8233.037)'/%3e%3clinearGradient xlink:href='%23b' id='d' x1='1492.1' x2='1510.3' y1='-1129.3' y2='-1082.1' gradientTransform='rotate(-9 8016.566 8233.078)'/%3e%3csymbol id='e' viewBox='0 0 350 222'%3e%3cpath fill='url(%23a)' stroke='%23e6effc' stroke-miterlimit='10' stroke-width='6' d='m291 107-2.5.1A83.9 83.9 0 00135.6 43 56 56 0 0051 91a56.6 56.6 0 00.8 9A60 60 0 0063 219l4-.2v.2h224a56 56 0 000-112Z'/%3e%3c/symbol%3e%3csymbol id='f' overflow='visible' viewBox='0 0 129 57'%3e%3cpath fill='url(%23b)' stroke='%230a5ad4' stroke-miterlimit='10' d='M8.5 56.5a8 8 0 01-8-8v-40a8 8 0 0116 0v40a8 8 0 01-8 8Z' opacity='0'%3e%3canimateTransform id='x1' additive='sum' attributeName='transform' begin='0s%3b x1.end%2b.33s' dur='.67s' type='translate' values='0 -60%3b 0 60'/%3e%3canimate id='y1' attributeName='opacity' begin='0s%3b y1.end%2b.33s' dur='.67s' keyTimes='0%3b .25%3b 1' values='0%3b 1%3b 0'/%3e%3c/path%3e%3cpath fill='url(%23c)' stroke='%230a5ad4' stroke-miterlimit='10' d='M64.5 56.5a8 8 0 01-8-8v-40a8 8 0 0116 0v40a8 8 0 01-8 8Z' opacity='0'%3e%3canimateTransform id='x2' additive='sum' attributeName='transform' begin='.33s%3b x2.end%2b.33s' dur='.67s' type='translate' values='0 -60%3b 0 60'/%3e%3canimate id='y2' attributeName='opacity' begin='.33s%3b y2.end%2b.33s' dur='.67s' keyTimes='0%3b .25%3b 1' values='0%3b 1%3b 0'/%3e%3c/path%3e%3cpath fill='url(%23d)' stroke='%230a5ad4' stroke-miterlimit='10' d='M120.5 56.5a8 8 0 01-8-8v-40a8 8 0 0116 0v40a8 8 0 01-8 8Z' opacity='0'%3e%3canimateTransform id='x3' additive='sum' attributeName='transform' begin='-.33s%3b x3.end%2b.33s' dur='.67s' type='translate' values='0 -60%3b 0 60'/%3e%3canimate id='y3' attributeName='opacity' begin='-.33s%3b y3.end%2b.33s' dur='.67s' keyTimes='0%3b .25%3b 1' values='0%3b 1%3b 0'/%3e%3c/path%3e%3c/symbol%3e%3c/defs%3e%3cuse xlink:href='%23e' width='350' height='222' transform='translate(81 145)'/%3e%3cuse xlink:href='%23f' width='129' height='57' transform='translate(191.5 343.5)'/%3e%3c/svg%3e",raindrop:"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 512 512'%3e%3cdefs%3e%3clinearGradient id='a' x1='14.8' x2='124.2' y1='42.3' y2='231.7' gradientUnits='userSpaceOnUse'%3e%3cstop offset='0' stop-color='%233392d6'/%3e%3cstop offset='.5' stop-color='%233392d6'/%3e%3cstop offset='1' stop-color='%232477b2'/%3e%3c/linearGradient%3e%3csymbol id='b' viewBox='0 0 164 245.6'%3e%3cpath fill='url(%23a)' stroke='%232885c7' stroke-miterlimit='10' stroke-width='4' d='M82 3.6c-48.7 72-80 117-80 160.7s35.8 79.3 80 79.3 80-35.5 80-79.3S130.7 75.5 82 3.6Z'%3e%3canimateTransform attributeName='transform' calcMode='spline' dur='6s' keySplines='.42%2c 0%2c .58%2c 1%3b .42%2c 0%2c .58%2c 1' repeatCount='indefinite' type='scale' values='1 1%3b 1 .9%3b 1 1'/%3e%3c/path%3e%3c/symbol%3e%3c/defs%3e%3cuse xlink:href='%23b' width='164' height='245.6' transform='translate(174 132.43)'/%3e%3c/svg%3e",raindrops:"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 512 512'%3e%3cdefs%3e%3clinearGradient id='a' x1='14.8' x2='124.2' y1='42.3' y2='231.7' gradientUnits='userSpaceOnUse'%3e%3cstop offset='0' stop-color='%233392d6'/%3e%3cstop offset='.5' stop-color='%233392d6'/%3e%3cstop offset='1' stop-color='%232477b2'/%3e%3c/linearGradient%3e%3csymbol id='b' viewBox='0 0 164 245.6'%3e%3cpath fill='url(%23a)' stroke='%232885c7' stroke-miterlimit='10' stroke-width='4' d='M82 3.6c-48.7 72-80 117-80 160.7s35.8 79.3 80 79.3 80-35.5 80-79.3S130.7 75.5 82 3.6Z'/%3e%3c/symbol%3e%3c/defs%3e%3cuse xlink:href='%23b' width='164' height='245.6' transform='translate(128 133.43)'%3e%3canimateTransform additive='sum' attributeName='transform' calcMode='spline' dur='6s' keySplines='.42%2c 0%2c .58%2c 1%3b .42%2c 0%2c .58%2c 1' repeatCount='indefinite' type='scale' values='1 1%3b 1 .9%3b 1 1'/%3e%3c/use%3e%3cuse xlink:href='%23b' width='164' height='245.6' transform='translate(220 133.43)'%3e%3canimateTransform additive='sum' attributeName='transform' calcMode='spline' dur='6s' keySplines='.42%2c 0%2c .58%2c 1%3b .42%2c 0%2c .58%2c 1' repeatCount='indefinite' type='scale' values='1 .9%3b 1 1%3b 1 .9'/%3e%3c/use%3e%3c/svg%3e",snowy:"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 512 512'%3e%3cdefs%3e%3clinearGradient id='a' x1='99.5' x2='232.6' y1='30.7' y2='261.4' gradientUnits='userSpaceOnUse'%3e%3cstop offset='0' stop-color='%23f3f7fe'/%3e%3cstop offset='.5' stop-color='%23f3f7fe'/%3e%3cstop offset='1' stop-color='%23deeafb'/%3e%3c/linearGradient%3e%3clinearGradient id='b' x1='11.4' x2='32.8' y1='5.9' y2='43.1' gradientUnits='userSpaceOnUse'%3e%3cstop offset='0' stop-color='%2386c3db'/%3e%3cstop offset='.5' stop-color='%2386c3db'/%3e%3cstop offset='1' stop-color='%235eafcf'/%3e%3c/linearGradient%3e%3clinearGradient xlink:href='%23b' id='c' x1='67.4' x2='88.8' y1='5.9' y2='43.1'/%3e%3clinearGradient xlink:href='%23b' id='d' x1='123.4' x2='144.8' y1='5.9' y2='43.1'/%3e%3csymbol id='e' viewBox='0 0 350 222'%3e%3cpath fill='url(%23a)' stroke='%23e6effc' stroke-miterlimit='10' stroke-width='6' d='m291 107-2.5.1A83.9 83.9 0 00135.6 43 56 56 0 0051 91a56.6 56.6 0 00.8 9A60 60 0 0063 219l4-.2v.2h224a56 56 0 000-112Z'/%3e%3c/symbol%3e%3csymbol id='f' overflow='visible' viewBox='0 0 156.2 49'%3e%3cg%3e%3cpath fill='url(%23b)' stroke='%2386c3db' stroke-miterlimit='10' d='m41.7 31-5.8-3.3a13.7 13.7 0 000-6.5l5.8-3.2a4 4 0 001.5-5.5 4 4 0 00-5.6-1.5l-5.8 3.3a13.6 13.6 0 00-2.6-2 13.8 13.8 0 00-3-1.3V4.5a4 4 0 00-8.1 0v6.6a14.3 14.3 0 00-5.7 3.2L6.6 11A4 4 0 001 12.5 4 4 0 002.5 18l5.8 3.3a13.7 13.7 0 000 6.5L2.5 31A4 4 0 001 36.5a4 4 0 003.5 2 4 4 0 002-.5l5.8-3.3a13.6 13.6 0 002.6 2 13.8 13.8 0 003 1.2v6.6a4 4 0 008.2 0v-6.6a14.2 14.2 0 005.6-3.2l6 3.3a4 4 0 002 .5 4 4 0 003.4-2 4 4 0 00-1.4-5.5ZM19 29.7a6 6 0 01-2.3-8.2 6.1 6.1 0 015.3-3 6.2 6.2 0 013 .8 6 6 0 012.2 8.2 6.1 6.1 0 01-8.2 2.2Z' opacity='0'%3e%3canimateTransform additive='sum' attributeName='transform' dur='6s' repeatCount='indefinite' type='rotate' values='0 24 24%3b 360 24 24'/%3e%3canimate id='t1' attributeName='opacity' begin='0s%3b t1.end%2b1s' dur='2s' keyTimes='0%3b .17%3b .83%3b 1' values='0%3b 1%3b 1%3b 0'/%3e%3c/path%3e%3canimateTransform id='s1' additive='sum' attributeName='transform' begin='0s%3b s1.end%2b1s' dur='2s' type='translate' values='0 -36%3b 0 92%3b'/%3e%3c/g%3e%3cg%3e%3cpath fill='url(%23c)' stroke='%2386c3db' stroke-miterlimit='10' d='m97.7 31-5.8-3.3a13.7 13.7 0 000-6.5l5.8-3.2a4 4 0 001.5-5.5 4 4 0 00-5.6-1.5l-5.8 3.3a13.6 13.6 0 00-2.6-2 13.8 13.8 0 00-3-1.3V4.5a4 4 0 00-8.1 0v6.6a14.3 14.3 0 00-5.7 3.2L62.6 11a4 4 0 00-5.6 1.5 4 4 0 001.5 5.5l5.8 3.3a13.7 13.7 0 000 6.5L58.5 31a4 4 0 00-1.5 5.5 4 4 0 003.5 2 4 4 0 002-.5l5.8-3.3a13.6 13.6 0 002.7 2 13.8 13.8 0 003 1.2v6.6a4 4 0 008 0v-6.6a14.2 14.2 0 005.7-3.2l6 3.3a4 4 0 002 .5 4 4 0 003.4-2 4 4 0 00-1.4-5.5ZM75 29.7a6 6 0 01-2.3-8.2 6.1 6.1 0 015.3-3 6.2 6.2 0 013 .8 6 6 0 012.2 8.2 6.1 6.1 0 01-8.2 2.2Z' opacity='0'%3e%3canimateTransform additive='sum' attributeName='transform' dur='6s' repeatCount='indefinite' type='rotate' values='0 80 24%3b 360 80 24'/%3e%3canimate id='t2' attributeName='opacity' begin='-.83s%3b t2.end%2b1s' dur='2s' keyTimes='0%3b .17%3b .83%3b 1' values='0%3b 1%3b 1%3b 0'/%3e%3c/path%3e%3canimateTransform id='s2' additive='sum' attributeName='transform' begin='-.83s%3b s2.end%2b1s' dur='2s' type='translate' values='0 -36%3b 0 92%3b'/%3e%3c/g%3e%3cg%3e%3cpath fill='url(%23d)' stroke='%2386c3db' stroke-miterlimit='10' d='m153.7 31-5.8-3.3a13.7 13.7 0 000-6.5l5.8-3.2a4 4 0 001.5-5.5 4 4 0 00-5.6-1.5l-5.8 3.3a13.6 13.6 0 00-2.6-2 13.8 13.8 0 00-3-1.3V4.5a4 4 0 00-8.1 0v6.6a14.3 14.3 0 00-5.7 3.2l-5.8-3.3a4 4 0 00-5.6 1.5 4 4 0 001.5 5.5l5.8 3.3a13.7 13.7 0 000 6.5l-5.8 3.2a4 4 0 00-1.5 5.5 4 4 0 003.5 2 4 4 0 002-.5l5.8-3.3a13.6 13.6 0 002.7 2 13.8 13.8 0 003 1.2v6.6a4 4 0 008 0v-6.6a14.2 14.2 0 005.7-3.2l5.8 3.3a4 4 0 002 .5 4 4 0 003.5-2 4 4 0 00-1.3-5.5ZM131 29.7a6 6 0 01-2.3-8.2 6.1 6.1 0 015.3-3 6.2 6.2 0 013 .8 6 6 0 012.2 8.2 6.1 6.1 0 01-8.2 2.2Z' opacity='0'%3e%3canimateTransform additive='sum' attributeName='transform' dur='6s' repeatCount='indefinite' type='rotate' values='0 136 24%3b 360 136 24'/%3e%3canimate id='t3' attributeName='opacity' begin='.83s%3b t3.end%2b1s' dur='2s' keyTimes='0%3b .17%3b .83%3b 1' values='0%3b 1%3b 1%3b 0'/%3e%3c/path%3e%3canimateTransform id='s3' additive='sum' attributeName='transform' begin='.83s%3b s3.end%2b1s' dur='2s' type='translate' values='0 -36%3b 0 92%3b'/%3e%3c/g%3e%3c/symbol%3e%3c/defs%3e%3cuse xlink:href='%23e' width='350' height='222' transform='translate(81 145)'/%3e%3cuse xlink:href='%23f' width='156.2' height='49' transform='translate(177.9 337.5)'/%3e%3c/svg%3e","snowy-rainy":"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 512 512'%3e%3cdefs%3e%3clinearGradient id='a' x1='99.5' x2='232.6' y1='30.7' y2='261.4' gradientUnits='userSpaceOnUse'%3e%3cstop offset='0' stop-color='%23f3f7fe'/%3e%3cstop offset='.5' stop-color='%23f3f7fe'/%3e%3cstop offset='1' stop-color='%23deeafb'/%3e%3c/linearGradient%3e%3clinearGradient id='b' x1='1399.3' x2='1408.7' y1='-1137.3' y2='-1112.7' gradientTransform='rotate(-9 8016.182 8229.021)' gradientUnits='userSpaceOnUse'%3e%3cstop offset='0' stop-color='%230b65ed'/%3e%3cstop offset='.5' stop-color='%230a5ad4'/%3e%3cstop offset='1' stop-color='%230950bc'/%3e%3c/linearGradient%3e%3clinearGradient xlink:href='%23b' id='c' x1='1454.6' x2='1464' y1='-1128.6' y2='-1104'/%3e%3clinearGradient xlink:href='%23b' id='d' x1='1509.9' x2='1519.3' y1='-1119.8' y2='-1095.2'/%3e%3clinearGradient id='e' x1='11.4' x2='32.8' y1='5.9' y2='43.1' gradientUnits='userSpaceOnUse'%3e%3cstop offset='0' stop-color='%2386c3db'/%3e%3cstop offset='.5' stop-color='%2386c3db'/%3e%3cstop offset='1' stop-color='%235eafcf'/%3e%3c/linearGradient%3e%3clinearGradient xlink:href='%23e' id='f' x1='67.4' x2='88.8' y1='5.9' y2='43.1'/%3e%3clinearGradient xlink:href='%23e' id='g' x1='123.4' x2='144.8' y1='5.9' y2='43.1'/%3e%3csymbol id='h' viewBox='0 0 350 222'%3e%3cpath fill='url(%23a)' stroke='%23e6effc' stroke-miterlimit='10' stroke-width='6' d='m291 107-2.5.1A83.9 83.9 0 00135.6 43 56 56 0 0051 91a56.6 56.6 0 00.8 9A60 60 0 0063 219l4-.2v.2h224a56 56 0 000-112Z'/%3e%3c/symbol%3e%3csymbol id='j' overflow='visible' viewBox='0 0 156.2 49'%3e%3cg%3e%3cpath fill='url(%23e)' stroke='%2386c3db' stroke-miterlimit='10' d='m41.7 31-5.8-3.3a13.7 13.7 0 000-6.5l5.8-3.2a4 4 0 001.5-5.5 4 4 0 00-5.6-1.5l-5.8 3.3a13.6 13.6 0 00-2.6-2 13.8 13.8 0 00-3-1.3V4.5a4 4 0 00-8.1 0v6.6a14.3 14.3 0 00-5.7 3.2L6.6 11A4 4 0 001 12.5 4 4 0 002.5 18l5.8 3.3a13.7 13.7 0 000 6.5L2.5 31A4 4 0 001 36.5a4 4 0 003.5 2 4 4 0 002-.5l5.8-3.3a13.6 13.6 0 002.6 2 13.8 13.8 0 003 1.2v6.6a4 4 0 008.2 0v-6.6a14.2 14.2 0 005.6-3.2l6 3.3a4 4 0 002 .5 4 4 0 003.4-2 4 4 0 00-1.4-5.5ZM19 29.7a6 6 0 01-2.3-8.2 6.1 6.1 0 015.3-3 6.2 6.2 0 013 .8 6 6 0 012.2 8.2 6.1 6.1 0 01-8.2 2.2Z' opacity='0'%3e%3canimateTransform additive='sum' attributeName='transform' dur='6s' repeatCount='indefinite' type='rotate' values='0 24 24%3b 360 24 24'/%3e%3canimate id='t1' attributeName='opacity' begin='0s%3b t1.end%2b1s' dur='2s' keyTimes='0%3b .17%3b .83%3b 1' values='0%3b 1%3b 1%3b 0'/%3e%3c/path%3e%3canimateTransform id='s1' additive='sum' attributeName='transform' begin='0s%3b s1.end%2b1s' dur='2s' type='translate' values='0 -36%3b 0 92%3b'/%3e%3c/g%3e%3cg%3e%3cpath fill='url(%23f)' stroke='%2386c3db' stroke-miterlimit='10' d='m97.7 31-5.8-3.3a13.7 13.7 0 000-6.5l5.8-3.2a4 4 0 001.5-5.5 4 4 0 00-5.6-1.5l-5.8 3.3a13.6 13.6 0 00-2.6-2 13.8 13.8 0 00-3-1.3V4.5a4 4 0 00-8.1 0v6.6a14.3 14.3 0 00-5.7 3.2L62.6 11a4 4 0 00-5.6 1.5 4 4 0 001.5 5.5l5.8 3.3a13.7 13.7 0 000 6.5L58.5 31a4 4 0 00-1.5 5.5 4 4 0 003.5 2 4 4 0 002-.5l5.8-3.3a13.6 13.6 0 002.7 2 13.8 13.8 0 003 1.2v6.6a4 4 0 008 0v-6.6a14.2 14.2 0 005.7-3.2l6 3.3a4 4 0 002 .5 4 4 0 003.4-2 4 4 0 00-1.4-5.5ZM75 29.7a6 6 0 01-2.3-8.2 6.1 6.1 0 015.3-3 6.2 6.2 0 013 .8 6 6 0 012.2 8.2 6.1 6.1 0 01-8.2 2.2Z' opacity='0'%3e%3canimateTransform additive='sum' attributeName='transform' dur='6s' repeatCount='indefinite' type='rotate' values='0 80 24%3b 360 80 24'/%3e%3canimate id='t2' attributeName='opacity' begin='-.83s%3b t2.end%2b1s' dur='2s' keyTimes='0%3b .17%3b .83%3b 1' values='0%3b 1%3b 1%3b 0'/%3e%3c/path%3e%3canimateTransform id='s2' additive='sum' attributeName='transform' begin='-.83s%3b s2.end%2b1s' dur='2s' type='translate' values='0 -36%3b 0 92%3b'/%3e%3c/g%3e%3cg%3e%3cpath fill='url(%23g)' stroke='%2386c3db' stroke-miterlimit='10' d='m153.7 31-5.8-3.3a13.7 13.7 0 000-6.5l5.8-3.2a4 4 0 001.5-5.5 4 4 0 00-5.6-1.5l-5.8 3.3a13.6 13.6 0 00-2.6-2 13.8 13.8 0 00-3-1.3V4.5a4 4 0 00-8.1 0v6.6a14.3 14.3 0 00-5.7 3.2l-5.8-3.3a4 4 0 00-5.6 1.5 4 4 0 001.5 5.5l5.8 3.3a13.7 13.7 0 000 6.5l-5.8 3.2a4 4 0 00-1.5 5.5 4 4 0 003.5 2 4 4 0 002-.5l5.8-3.3a13.6 13.6 0 002.7 2 13.8 13.8 0 003 1.2v6.6a4 4 0 008 0v-6.6a14.2 14.2 0 005.7-3.2l5.8 3.3a4 4 0 002 .5 4 4 0 003.5-2 4 4 0 00-1.3-5.5ZM131 29.7a6 6 0 01-2.3-8.2 6.1 6.1 0 015.3-3 6.2 6.2 0 013 .8 6 6 0 012.2 8.2 6.1 6.1 0 01-8.2 2.2Z' opacity='0'%3e%3canimateTransform additive='sum' attributeName='transform' dur='6s' repeatCount='indefinite' type='rotate' values='0 136 24%3b 360 136 24'/%3e%3canimate id='t3' attributeName='opacity' begin='.83s%3b t3.end%2b1s' dur='2s' keyTimes='0%3b .17%3b .83%3b 1' values='0%3b 1%3b 1%3b 0'/%3e%3c/path%3e%3canimateTransform id='s3' additive='sum' attributeName='transform' begin='.83s%3b s3.end%2b1s' dur='2s' type='translate' values='0 -36%3b 0 92%3b'/%3e%3c/g%3e%3c/symbol%3e%3csymbol id='i' overflow='visible' viewBox='0 0 156.2 49'%3e%3cuse xlink:href='%23j' width='156.2' height='49'/%3e%3cpath fill='url(%23b)' stroke='%230a5ad4' stroke-miterlimit='10' d='M22.1 38.5a8 8 0 01-8-8v-12a8 8 0 0116 0v12a8 8 0 01-8 8Z' opacity='0'%3e%3canimateTransform id='x1' additive='sum' attributeName='transform' begin='0s%3b x1.end%2b1s' dur='1s' keyTimes='0%3b .25%3b 1' type='translate' values='0 -32%3b 0 -32%3b 0 120%3b'/%3e%3canimate id='y1' attributeName='opacity' begin='0s%3b y1.end%2b1s' dur='1s' keyTimes='0%3b .25%3b 1' values='0%3b 1%3b 0'/%3e%3c/path%3e%3cpath fill='url(%23c)' stroke='%230a5ad4' stroke-miterlimit='10' d='M78.1 38.5a8 8 0 01-8-8v-12a8 8 0 0116 0v12a8 8 0 01-8 8Z' opacity='0'%3e%3canimateTransform id='x2' additive='sum' attributeName='transform' begin='1.34s%3b x2.end%2b1s' dur='1s' keyTimes='0%3b .25%3b 1' type='translate' values='0 -32%3b 0 -32%3b 0 120%3b'/%3e%3canimate id='y2' attributeName='opacity' begin='1.34s%3b y2.end%2b1s' dur='1s' keyTimes='0%3b .25%3b 1' values='0%3b 1%3b 0'/%3e%3c/path%3e%3cpath fill='url(%23d)' stroke='%230a5ad4' stroke-miterlimit='10' d='M134.1 38.5a8 8 0 01-8-8v-12a8 8 0 0116 0v12a8 8 0 01-8 8Z' opacity='0'%3e%3canimateTransform id='x3' additive='sum' attributeName='transform' begin='.67s%3b x3.end%2b1s' dur='1s' keyTimes='0%3b .25%3b 1' type='translate' values='0 -32%3b 0 -32%3b 0 120%3b'/%3e%3canimate id='y3' attributeName='opacity' begin='.67s%3b y3.end%2b1s' dur='1s' keyTimes='0%3b .25%3b 1' values='0%3b 1%3b 0'/%3e%3c/path%3e%3c/symbol%3e%3c/defs%3e%3cuse xlink:href='%23h' width='350' height='222' transform='translate(81 145)'/%3e%3cuse xlink:href='%23i' width='156.2' height='49' transform='translate(177.9 337.5)'/%3e%3c/svg%3e",sunny:{day:Yt,night:Yt},windy:Jt,"windy-exceptional":Jt,exceptional:"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512'%3e%3cdefs%3e%3clinearGradient id='a' x1='175.8' x2='336.2' y1='117' y2='395' gradientUnits='userSpaceOnUse'%3e%3cstop offset='0' stop-color='%23d4d7dd'/%3e%3cstop offset='.5' stop-color='%23d4d7dd'/%3e%3cstop offset='1' stop-color='%23bec1c6'/%3e%3c/linearGradient%3e%3c/defs%3e%3cpath fill='none' stroke='url(%23a)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='24' d='M344 256a88 88 0 11-88-88 88 88 0 0188 88ZM200 116.9l-3.8 7.7A269.7 269.7 0 00169 267h0m143.1 128 3.8-7.7A269.7 269.7 0 00343.2 245h0'%3e%3canimateTransform additive='sum' attributeName='transform' dur='6s' repeatCount='indefinite' type='rotate' values='1440 256 256%3b 0 256 256'/%3e%3c/path%3e%3c/svg%3e"}},ea={line:{rainy:{day:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAMAAAD04JH5AAACdlBMVEUAAAAAAAAAAP8AAIAAAP8AAKoAVar///////8AVdUASdvj//8AM7MARtEAQL/q6v//vxUATtj/xBQAScjv7+//vyDh8PAAVdAAVeMAUsXn5+//vyAAVcbk6u//vyD7vyIEWuLj6/P7viTj5+/7vyQGVMji6PLi6e/8vyMGUcoGVMrq37nh6vLi5+/8vyMHUsUHUccHUcwJXN/h6PH6vyIHW90JYOTh6O8JWt0GXt4IUsQIVMjj6fHh5+/7vyQIX+EJYOb7vyPi6PH7vyTj6O8HU8YIU8sIVMkIVMwIVs4IVs8IV88IV9MIWdYIWtgIWtsIXNwIXuHi6fH6vyPi5+/6vyMJX+Ti6PDi6O/7vyP5xDbp27Dv1Y0KX+UHU8oHXN4HXuUHUcLi6PD7vyTi5+/7viQIU8UIU8YIU8kIVckIVcsIVs4IV9AIWNAIWNMIWtcIW9kIXN0JW9kJX9/h6PD6vyTi6O/6viQJX+Tw0n8IUsfh6PD6vyPh5+/6viMJXeDu0ofh6PD7vyPh6O/7viMLYOULYecIUMEIUsPl4tIIUsMIUsQJUcAJUsEJU8MJU8QJVMUJVMYJVMcJVcgJVckJVcoJVsoJVssJVswJVs4JV8wJV80JV9AJV9EJWNIJWdQJWtYJWtgJXNoJXd4JXd8KU8IKU8MKVccKVcgKVckKVskKVsoKVssKVswKV84KWM8KWdAKWdEKWdIKWdMKWtQKWtUKW9YKW9cKXNkKXdoKXdsKXdwKXtwKXt0KYOEKYOMKYOQKYeMKYeULXNgLXNkLX94LX98LYOELYOILYeQLYuYLYucLYuji6PD0zGT1ylf3x0r7vyQwq58yAAAAinRSTlMAAQECAgMDBAUGBwkKCwwMDA0NDhAQERsbHyAgJDAwPD4/P0BAT09QUFJSV19gYG1ubm9vb3BwcHF9fX1/gICGh4yPj5CZmZubm5ubm5ubm5ubn5+goKmvsLC1uLq7vLy8vb+/wMDBysrKysrKysrKysrKys/P0NDX19nf3+Dg4+Xv7/Dw8fHy8vOPXku0AAAENUlEQVR42u1ZZ0PTQBiOgMGtaOqoVoVWQSW4UBzUgbhxUqS4xeDCPeqoVUtxo+Dee+JCwYl7z6r5R94dSQcEJJcj+XLPl+aSu7zPvTtXhqGgoKCgoKCgoKCgoKCgoKCoP7qNaWMsgTzRRglQAnqLzNxkChnlhBFIKgiMojmOa91Aew5lYMsKGSSJYgL8NQ/M9vqrkJ1oJk3AtDmMARMmPwn89Mz1h2FjvE4MquRb3f4ayLWSZ1Dzrg3K59KQRJ8zxcoBU1h5ZxWFmaQZ5ElXneOS4+TLQiB/I5Tm4rngXI73IDuYG8AdTZkFIsSmZOmGGcr38dXn8T5w22shLj8BiN+RMyKv8M/vrX3QZqHrO7maMzkB6oAjnQ9EMcfEcImS03lTzdD7HcqTHZAB4f2LhQkMl+oN93dHbdMhAztR+xeAnGOpHnKu2tXsAkoi6YhZYg4zEAl1xoP3cla4RV8djmaG+YAgge2iiUfiA7vi7AJf1wo7mE1OBSZxh0Ux5OoACMZ0bVJtixFsKO3Nhu6nKraBkdzaCIxGaUfMQnl/LpDPq1oOVaatKLS1IcBC1FXc7/cLKtd7SEbiX9UKQDZwEiOwC3ig2jV29UqrHXMwXpYCchExAs460m5tsAKzESMgYDgUQQKoBqomwJMiINVAAcMJ3bEEsrFcA3kMswG40zRy4NH2felmHMeVehctzVE80j5Wq291Ch7pUwFfCRavHyMAQ1k4/Jpa1FyN8mFrAn3Bi2kFGMopmt04Hb9FBY2/h0AgO3CCSE4lRD41XZhGcJCqZ1ZMFQjEWgoBrzcgZQHc0txcbR9KujK2J1hPwauaYBEg9Y2LRSAaN3yVv9TUE4CNtcNIH4AF1U2GQDpeSuU1f9zIcGPq0kfoqAU7p9vJHLnB0yQXdhXRXo/RaR6mKS3wyC2thhW6jxrZTJ187GhCPaG7mv0it/x8P6i+b0iEXZ1Lg//4UFuZlhgbvMe+e/t1Wr3yT2wqauoFLZ5sccmHYgF3ZK9/rpyqOJltFzLI/u9pXj1taPdJL5L3wb588XGK0tSOs+YNCDsiQYd52lMJxzshh0AuY688rchQmjj014edkaFZxO9xEPv7IDo6qOhL5Q8nKc2Z8f3bNVZxCVmwF8rOKhKY/uXVVZZpeLBn7t2ZoPRgWuWny7oQOHG7ZLzSg6nPHl/Ug0DkseKbYyMUHkypeHReDwIR2w4V9ZYHUR06RMnXGWXnTutBgOkyvG9A6OA9u4fI15Pv3z2uCwEmqP9WC3+8XdBSGkwsPXJUHwJBxGx482VtTNV1o3ElNw801pvAutcv1kgEmF4Hi5ZE6E1g/fNnq2UCET2GdWL0JrDmSfmqGMY4xKx+VJZvKIGVD06tMJRA/snSZYYSWH6reKmRBFrMP3xjUUsDCTD99+3txxiKpk0ZCgoKCgoKCgoKCm34B6mbChtUfPECAAAAAElFTkSuQmCC",night:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAMAAAD04JH5AAACcFBMVEUAAAAAAAAAAP8AAIAAAP8AAKoAVapVqv////////8AVdUASduAv9/j//8AM7MARtEAQL9qv9Xq6v8ATtgASchwv9/v7+/h8PAAVdAAVeMAUsVwt9fn5+8AVcZwutXk6u8EWuLj6/Nwt9fj5+8GVMji6PJzudbi6e8GUcoGVMpxudTh6vJyutXi5+8HUsUHUccHUcwJXN/h6PEHW90JYORyuNbh6O8JWt0GXt4IUsQIVMhyudXj6fFyudXh5+8IX+EJYOZyudTi6PFxuNXj6O8HU8YIU8sIVMkIVMwIVs4IVs8IV88IV9MIWdYIWtgIWtsIXNwIXuFyuNXi6fFxudTi5++n0OIJX+Ti6PBxuNWu0uPi6O/A2+kKX+UHU8oHXN4HXuUHUcJxuNTi6PBxudXi5+8IU8UIU8YIU8kIVckIVcsIVs4IV9AIWNAIWNMIWtcIW9kIXN0JW9kJX99xudXh6PByudTi6O8JX+QIUsdxuNXh6PByuNXh5+8JXeBxudTh6PByudXh6O8LYOULYecIUMEIUsPe5vAIUsMIUsQJUcAJUsEJU8MJU8QJVMUJVMYJVMcJVcgJVckJVcoJVsoJVssJVswJVs4JV8wJV80JV9AJV9EJWNIJWdQJWtYJWtgJXNoJXd4JXd8KU8IKU8MKVccKVcgKVckKVskKVsoKVssKVswKV84KWM8KWdAKWdEKWdIKWdMKWtQKWtUKW9YKW9cKXNkKXdoKXdsKXdwKXtwKXt0KYOEKYOMKYOQKYeMKYeULXNgLXNkLX94LX98LYOELYOILYeQLYuYLYucLYuhyudV6vNecy9/a5e7i6PAhmbmUAAAAiHRSTlMAAQECAgMDAwQFBgcICQoLDAwMDQ4QEBEbGx8gICQwMD4/QEBPT1BQUlJfX2BgbW5ub29wcHBwcX19fX9/gICGh4+PkJCZmZubm5ubm5ubm5ubn5+goKipr7CwsLe7vLy8vb+/wMDBysrKysrKysrKysrKys/P0NDX2d/f4ODj7+/w8PHx8vL3e6cH0wAABGVJREFUGBntwYd7E3UcB+CPBc+CA/XMD7RnY3Ni1OYcaOsqUUtdyFDpKRh3ey4UHKRR09gjbhTceyuKCwEVwYET51f9/EumTVJamvr0RpvH57n3RSQSiUQikUgkEolEIpHI/8ghqKPjL1sjMh910nTugAxagLqInSUia7vbBiSFemi+T6Q/FQNEEqiDlMjaNgwSiWEcjUqpQzEpUiJ9TRjUJIJajHnLXZYtbzUQspTIihjKRJowxtwejpJNIkzNA9KNKpEE9mLmOUaPidDE1khfDFX9ksAoqpODipl2UwGGaWU4ZBnCMl/WNmNYryzASCrLkpylMExZBZZkDYQiNiAp7NEmazCCkSVZtLAXq0jSjSMM86UfIzSJNAEtc1tbUKJckhmFMZRDMqsQggFJYaT+v67Mc4jbYfSQtFGTTTKL4BIiGEld9Q9HsTEOm2QagS2QXowQz3O0nMJ4cqRrIKheacMe8zgokzQAZdoki3GMyyDZg6BEEhhmsSRjoEKlHQv/IU3SQEAiCVTFSRYtTFyR7EIw+4mgSrkk4/DAJvMI5gARVFkkLXgRJ2kiGJFmVGRJB94UyDSCEUmgLE7Sgjc2mUEwfXIMytrJIjxKkw6CWSHdKEuTDjxqJ10Ek5L7UJYhbXhkkkQwMZFmDHHINDwySSKgPulGiWrNk2l4ZJFEQAmRBFSHyxIHHqXJfIuBYHrlhnieQyx45HBQvtNAAM3y9yMsKXYZ8CrDMrdDwb/LWeIk4YOZcQockjXgV9wlacM/02aJG4dPPSRtBGI4JF0FX0yS7Qiqi2QWvmTJAoKzSVrwwSKZRAhypKvgnU06CINJ0oJ3DplGKBwyA+9IJhGKdtKFZweSjCMUJkl4NpskwqFIzoBXs0kqhIPkDHjVSNJCKAySM+BZgbQRCpMkvMuQeYSiiyzAO4ukiTDkSRs+FMmsQnAWySR8SJNchsCUS+bgS45kOwJSWZImfIkXSXYq7OWoc87eHxOlsiRt+JRkST6JUabd88f3p2CCWl2SOfhmFVmS7WxtwTDtu12/LMUEGC0deZY4Cv7Fc6xYhgrtnZ93LkEt2mHYYzkrbASi0kWWKZRpX+34cTFqOPyKq09GVZxlORNBKStTJFlAhfbmF9sWoYbT//zh/mmoKpIs2EmEpLERVdrrWz9diBou/e3XtzUMa2zE5NBe3fzSQtRwye6v39Iw+bQXP/rgQtSwdOdPb2iYfNqz72+4ADUs2f7Zaxom37Sn1288rwFjLd625RUNk6/h3sfXHYeK6XPmTEfFos0vv6BhChx55gnTUXHqgw+choqLP/7wGQ1ToQFVB1/3+65rZ6Hsok1PPqVhaul3f7v7Dh1D9jl/w8ZH98XU0u/8ZsdqHWXHPrbuxgZMLf2uL7ev0lHWcPQZR2CK6as/33q7jvrRV23ZvFJH/ei3ffL8rTrqR1/53KabddSPfst762/SUT8HXfPEu9fPQh2d9PBDJ6KuZs5EJBKJRCKRSCQSzL9VRRqQquqEqAAAAABJRU5ErkJggg=="},partlycloudy:{day:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAMAAAD04JH5AAAA0lBMVEUAAAD////////j///q6v//vxX/xBTv7+//vyDh8PDn5+//vyDk6u//vyD7vyLj6/P7viTj5+/7vyTi6PLi6e/8vyPq37nh6vLi5+/8vyPh6PH6vyLh6O/j6fHh5+/7vyT7vyPi6PH7vyTj6O/i6fH6vyPi5+/6vyPi6PDi6O/7vyP5xDbp27Dv1Y3i6PD7vyTi5+/7viTh6PD6vyTi6O/6viTw0n/h6PD6vyPh5+/6viPu0ofh6PD7vyPh6O/7viPl4tLi6PD0zGT1ylf3x0r7vyS0xg7VAAAAQXRSTlMABAUJDAwNEBARICAwMDw/P0BAT1BQV19gYG9vcH+AgIyPj5Cfn6Cgr7Cwtbi6v7/AwM/P0NDX39/g4OXv7/Dw80CUkPUAAALXSURBVBgZ7cF/V9tUAMfhb/HHzbIoSyySblBFIBBUTNNi7AxhH919/29poeWwgwzPbnKVf+7zKAiCIAiCIAiCIAiCwMG3P32lZ7WwmZ7VwmZ6Vgub6VktbKZntbCZ/meny0gfXdhMH82uM92ZGGO+1H9hYZeR7mVnke7NrN1TL3593rJ1vh/Ls+jKLiN9yszamaTvLnmgnsqv6MouIz02s3YmpQ2PXKbyKrqySz2SWTuTOeJWVx6kRorTvGTjRF5FVwttvXz15pW2Xt7MZGp6q9zonsnX9OpY/kWn1/bW8o224hrocv1D3gFtIt/2rq19e/HD4ubvv37/Xj3TAqXRI6YCaiO/Tq29iGT2Gzbaw/gSKPRJBVDLqz17sydz2PJAoScUwFweRdd2T0nDQyujp6ygjeXPmb3Qa26V01gyaQF0iZ4UA5fy5w8b5fTKWHfMvMr1L+ZALF8i+zYBulyfr4NjjZL9tpFJyuzPLZDIQQGNRvnRbpxJmtlfgVwuEiDVGF9nG5Gkb+w7qORmDXP58h7I5aaAUr78CZ0czaGSL79AJUcH0MqXEgo5SgH5UsFcjlJAfpj9BuZylAPywRy29Co5mkOzG2u0pGEjl6OKW81RrFHyll53HMtVyVZ7aDTclF411QBpWa3ZqGMNlbRAoeHSgl6baKBLoNAocQW0RoOkwIHGOgZqDVLDWuMVQK4BcmAqD1bQGrkroJIPKZDLXQVzeVFBKXfAVF4cQCtnXwCJvEgBOXsByA8D7MjVC8DID2BHriZALi9iYEfO1lDIixSQuxIaeXEMa7nLgVQ+NFBogA5qo/FyYKoB5sCJRjMtrDTICjjQSKYGUg2SdMCR0RimBgoNNKXXTDXcfgusNFje0auP9nflLt49bOhVRsMlK+6cyM05dwqNYuYdW0YuErZWqcYyedkBa7npgHUxlSeTiVxNJgqCIAiCIAiCIAiCIAiC4HN8AB9wnMWC2JlgAAAAAElFTkSuQmCC",night:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAMAAAD04JH5AAAAzFBMVEUAAABVqv////////+Av9/j//9qv9Xq6v9wv9/v7+/h8PBwt9fn5+9wutXk6u/j6/Nwt9fj5+/i6PJzudbi6e9xudTh6vJyutXi5+/h6PFyuNbh6O9yudXj6fFyudXh5+9yudTi6PFxuNXj6O9yuNXi6fFxudTi5++n0OLi6PBxuNWu0uPi6O/A2+lxuNTi6PBxudXi5+9xudXh6PByudTi6O9xuNXh6PByuNXh5+9xudTh6PByudXh6O/e5vByudV6vNecy9/a5e7i6PDxWRwCAAAAP3RSTlMAAwQFCAkMDBAQESAgMDA/QEBPUFBfX2Bgb3Bwf3+AgI+PkJCfn6CgqK+wsLC3v7/AwM/P0NDf3+Dg7+/w8PeNHAHyAAAC9UlEQVQYGe3BDVPjVBiG4Ufwo2cbQrNWmgWhAkJkrUII3VJCfNX7//8nWwpsWRZnT04cxplzXYqiKIqiKIqiKIqiKPof+Vav6IefL80O9Er6P93Y0pFeRe9HM7s93b2xkV7D1gez61FPMhvoFYzMbne1ZNbTCzacc9/pPzEyu+prqW+mz0nendWsnO0k6tjI7H1PK2Z9PfP2nCeqobq0dWOnemA20CeyGc+cZ+pM79KuenpwbQM94Q5ZaiZ7mZOSLJ9w50RdObDbLT26sCOtcxUL09zpkcvnLFSJOtG7sZE+2rVLrUkqoMn1ibwB6lRdOLBrremb9aXttzvbWnA1MHF6xpVA5dSBGxtp3fWfv864U+8n50ChzyqASuEGZlrnfvubJwq9oADGCnZkF1qTznhq6vSSKdSJQl3Yrj56x9JkmEguK4Am1YsS4FyhzAZ6lLMwSXTPjctc/2IMJApkNtCDFGhyfbkGjhXmKzM9cDWQykMBM4X52kwPciCXjxTIFMZsS/cqKOVnDmOFMRtoJQVy+SlgojBX9r1W9qCRpzGUCvPeTrUyhlKe9qBWmJF90MoECnnKAIXpmW3pTgljecoABbqyUy24nRmM5SkHFGhgNpDbr1ko5WkMs+1EYS7s93TGnVyeSpZmh4kCbNlff7DQHCfyNWGl3ndq7xcWyqFayCblnDtVorbSGijUXlawUKdq6RwoFCQpgdqplQzYU6hjoFIrFcwVrgBytZADQ3VgCrWTvwJKdSEDcvkrYaxOlDCRP2CoTuxBLW/fAKk6kQHy9gZQNxywKV9vAKduAJvytQHk6kQCbMrbHAp1IgPkbwIzdeIY5vKXA5m6MINCLTRQOYXLgaFaGAMnCuZqmKqVKbCnQK4CMrWSNsChUwhXAYVaGrIwG6q9nRqYqrW8YaE63NmWv2R7f8ZC6dReOuXeifycca9QEDduWHHykbIyzRTK5ZMGmMtPA8yLoTqysSFfGxuKoiiKoiiKoiiKoiiKouhL/AMAI6LSIHENlgAAAABJRU5ErkJggg=="},cloudy:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAMAAAD04JH5AAAAY1BMVEUAAAD////j///q6v/v7+/h8PDn5+/k6u/j6/Pj5+/i6PLi6e/h6vLi5+/h6PHh6O/j6fHh5+/i6PHj6O/i6fHi5+/i6PDi6O/i6PDi5+/h6PDi6O/h6PDh5+/h6PDh6O/i6PAmoUbMAAAAIHRSTlMABAkMEBEgMD9AT1BfYG9wf4CPkJ+gr7C/wM/Q3+Dv8FxY2TMAAAIfSURBVBgZ7cHrcptIFIXRnclRI4I6ErbbiIvge/+nDL7UVHkSp9LQ0fw5a8k555xzzjnnnHPOOVfCFzP7qv9J+P488+b5FHRv3658MDS6p3riJ9da92IPvFi6c21SqGPHqyfdhw2sxmj6l8UbqyHoDsIALFH/ERdgrvTXHL+djlrZDHSmn1gPDKa/wU4Tr+ZLuAJJv5SAQeXZZeaDpE8koFVp1cRHo+kzI8xBZX3nRdcEyeoELJU+FYCrioqsuqB31vZRv9ECQQVVwBL15xZ4VDk2A5UyJJhUTgSiclRArWIG6JXnBq1KqYCoPAk6lXKGRZla6FVKC70ynWFWKR0kZaoBldJDq0w1oDLsNEGrTBFQCXaZWfXK1MJ0DNqtmngVlannxfQQtEucWS2PQbk63swX03YNq77RBnXX33g1BG1VzUDSdnViNVfa6Aok7RJ6YDZtUgNn7fUIDNpkgJv2S0DUBhFoVMAIsylfgl4l1EBUvh5aFdFDp3xAoyLOMCvbP0ClImpA2Q6AyjDgoFwHwFQGcFCuL0BUEQE4KNsNkoqoAeXrYFIRj3BTvgjUKmGCpA0WGEz7RaDRBi3wpN1shlGbjMBZO9kA1NqkWoAH0x42AEkbNaymRtudZmDUZnFhNTycjsoXjpeJVW/arhp596Q8z7xL2sXahTemHBVvxlp7WewW4KY8C3BLjQoxUy4zOeecc84555xzzjnn/sQP7XhCdsSQhJsAAAAASUVORK5CYII=","clear-night":{day:Ft,night:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAMAAAD04JH5AAAAb1BMVEUAAACAv99wv991v9Vwt9d0udhzudlwutVyu9Vyu9Zyuddxutdwt9dwudVxuNVzudZxudRyutVxuNZyuNZyudVyudVyudRxuNVyuNVxudRyudVxuNVxuNRxudVxudVyudRxuNVyuNVxudRyudVyudUoP+2fAAAAJHRSTlMACBAYICEoMDE4Oj9AQk9QX2BvcH+Aj5CfoK+wv8DP0N/g7/BtvauZAAACZElEQVQYGe3BiW7bOABF0VcOM+zUbFXaVixFlqzl/v83jtwEzVKvgMigAM9RlmVZlmVZlmVZlmXZ38y6/77ok5h11TFr9Cl8xYtWn2Dd81uj5HzPL21ZjLBRYqbiaCitJMArrWJk1nodecAqqcBsCnrmASUVmNVGLzyglCpgCvrNA0qoAianVx5QOgGYnN5wgFUqboTJ6R3AKxHTAU7vAV6JPAEbfTDARml4oNFHLdRKYw+D0UcbGJVEAQT9wQFeKfQw6IQBdkogAEEn7KBXAg0MOqUAvOIbYaOTBugVnQesTgpAUGw7GHRGC71RZB3sdIYHSkUGFDqnBYKiMoDTOXaC0SmmB0DneWC0iugB0AUB6Izi+QaDLqmBzima79DqogYYC8XyHVpdZGpma0XyFUZdUTJ7soriAdA1xcSssorgATC6xg0cba0W9wXwusqUE0f940oLAwrdwJQ8G/f77Xa9Wv3Yei3hALVuYuuJ975qASWMulWxG3jjmxbgAKfb2U1Zt+3EkdESBtjpfg0ctIgaet3NABstogCC7lUCVstooTe6jxmh0UI8UOo+O8BqKQ2MRvewQK3FWGCve3QwWS2nBirdrgJKLcgcgKBbBeCgRZkJ8LqNByajZbkJRq9bBGZOSwvM1rouMAtaXmBW6QrzyCwohjABndUlvgcmrzjcwGxrdI55ZDY5xWIOzMat0Sl2OzJrrCIqORoff+gjV3E0FYrL1jx7+rmyerHa7kd+aYyisy2vun3Hq9oqCbc78KehNErHbhreGOrglN4/1nrv/7XWKMuyLMuyLMuyLMuy7O/1P3FgVVW2yR8sAAAAAElFTkSuQmCC"},fog:{day:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAMAAAD04JH5AAAAhFBMVEUAAAD////j///v7+//vyDj8fHm7vfm7/f/vyDm7PL/vyDj5/Hh6fLj5+/7vyT8viT8vyP8vyP6vyLj6fH7vyT7vyTj6O/7vyP6vyP6vyP7vyPi6O/i6PDi6PD7vyT7viT6vyT6viT6vyP6viP7vyP7viPh6O/h6O/i6O/i6PDi6PD7vyRLRWCBAAAAKnRSTlMAAQkQEBIeHyAoMDY7QEBPUGBwf3+AkJCfoK+yub+/wM/Q3+Dv8PHy9P4ULL4OAAAB70lEQVR42u2YUVOjMBSFo5tda1Qs2GyhukBKUdfz//+fD9UhtaWYzE0dnfO9daCcj5DkXlCKEEIIIYQQQggh35tss8m+VKACqi8VaICGAhSgAAXSpyxKHSOgy4VMfgG0Onwr1i1QSAmMGhjXZeP5QgKqOmKgjty/XJ0KN5DNDzeQzg81kM8PM0iRH2KQJn9rYPfT9p0sEvVpFeCveX1b1gAA1OWtr5El6xNzLz9bYYeVfyxPXh1mNfaoZ6ergYttpLN5lmVZbt329+JE8boEgD73nvss7wGg1CfJbwH09kOWtn1ExYiiBeDMocIIoE2fXwJoDt6obgCUqfMLAG7soJNrAUbXH4Bu9EHrDkDa1VgBMOOHDRK/LZuD9eBDHTBpB6A/utJ0n3YINhMDoJQFNgk/yEwPsEn6DJZAN3VOByxTvogtPyHZpBSwU+dYIYH5qh7Ihzk4udEVwPq9gfEusZoHCqz9XuN9XmO3KRudqG9LcqdfWQcKOP/PXZSA6v1ruNBNv7ADZhCYHMn5IGC8SxQiJcJ9bhI6RQj5cVzd/Y3g7koq/+zpJYrHMyGB3y+R/JIagvvnmPjne05eQuS4vIngUi7/X9w+9CCVfx65Ef4/l6oFj3ECT1K1QF1cx8yB6z9cPIQQQgghhBBCyLfgFbSxiHFyhGbJAAAAAElFTkSuQmCC",night:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAMAAAD04JH5AAAApVBMVEUAAAD///+Av9/j//9wv9/v7+/j8fFwuNbm7vfm7/dwt9d0udjm7PJwutVyu9Xj5/Fyu9Zyudfh6fJxutdwt9fj5+9wudVxuNVzudZyutVxuNZyuNZyudXj6fFyudVyudRxuNXj6O9yuNVxudRyudVxuNXi6O/i6PBxuNTi6PBxudVxudVyudRxuNVyuNVxudRyudXh6O/h6O/i6O/i6PByudXi6PBuaD6dAAAANXRSTlMAAQgJEBASGR4fICEoMDE2ODo7P0BAQk9QYG9wf3+Aj5CQn6CvsLK5v7/Az9Df4O/w8fL0/jWZE2oAAAH0SURBVBgZ7cGLUtNQGIXRXYm3lIDCAZO2xNpQxNRcAL++/6PZCoOAvZFJDoPzryVjjDHGGGOMMcaY1yyMPr3RCwkGkxkLM70IN+FOqRcwKLg3lXeu4I88jSsYyrNgwlKZhpIAJ7/iioXcackBobxKWKgT3XKAvEpYyALdcYB8mgB1onsOkEcToI70lwPkTwLUkR6IgFC+RBXUkR4BnDwJZkCkxwAnT86BoZ4oYSg/HDDVUzlk8uMSykBPDaGSFzGQ6B8R4ORDAaVWKGEsDxIg0QpjKOTBFEqtEgNO3atgqJVKKNQ5B4RaKQESdW0MpdbIoQjUsRmMtYYDUnUMiLVODiTqVABEWiesoYrUpT6g9RxQhepQH9AGCTAL1J3PUGqTDJhF6swp5NpoClSxunIKuTYKMhYG6sgBoC1SFs5DdaIPaJu4ZmESqgN9INQ2UcnSKFTrAsBpqyCtWSq+HqtlQKwdBCm3qsvL0WhwfPxl5NSGn5BpJ2FW89iBWpBCpV3F45IHTtWCCIi0u3CYZnles/RebahhrOfLoFQrMij0bEEFYxlj/hOHZ98aODtUS3rX80auemrHu3lDb9WSi5t5AzcXMsa0Zv+kgX215se8ke9qyd68mV97akfvat7IdU8t+Xh00sDRBxljjDHGGGOMMeY1+A09o6T3i3OTtgAAAABJRU5ErkJggg=="},hail:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAMAAAD04JH5AAAAqFBMVEUAAAD///+Av9/j///q6v+AyNuAv9/v7+/h8PCKyt+Hx9/n5++Gxt+Fxdrk6u+ExNvj6/OHw9vj5++Hxdvi6PKGwtzi6e+GxNzh6vLi5+/h6PHh6O/j6fGFw9vh5++Fw9vi6PGFw9zj6O+Fwtri6fHi5++GwtuGw9vi6PDi6O+Gw9vi6PCGw9vi5++Fw9rh6PCGw9ri6O/h6PDh5+/h6PDh6O+Gw9vi6PC/nfIlAAAANnRSTlMABAgJDA4QEBEYICAoMDA4P0BARk9QUF9fYG9wf4CAjI+QkJ+foKivr7C/v8DAz8/Q0N/g7/DpkQIxAAACl0lEQVQYGe3BcV/TRgDH4Z9zeh2ZsY1Se7ZEZAQJNcuaJvm+/3e2gzI/H+YYXHI2f3jPoyiKoiiKoiiKoiiKoiiKQnhhjPlVE0k+XrccXK8SHdv7LQ/USx1T1vCdbaZjMefc6sp1ZqQksyV3LnUcpsbZWaNvjN3j1ImOIKmBzupfbAe0qX6Y+fvVXI5pgdLoO6YCaqMfwawa7rSbZAsU+k8FUCs8s2l5oNAjCiBXaGnDQzujx+ygTRTWR26Vy0QyWQF0qR6VAFsFZXHKRPdMXln9jxxIFFAKdFbP18GFwjEtkMpDAY3CsYCVjxTIFEwNlfzsIVcoKWDlp4BSoayhk6ccKoWSQyVPa2gVSgmFPGWAQqkgl6cMUBhm1UAuTxZQCGbT4lTylEMzTzRa2nDHylPFreY80Si2xekuEvkqOWg3RsMtcaqlBsjKas+dOtFQaQsUGi4rcNpUA22BQqMkFdAaDZIBa411AdQapIa9xisAqwEssFQAO2iN/BVQKYQMsPJXQa4gKijlD1gqiDW08vYSSBVEBsjbDFAYBpjJ1wwwCgOYydcLwCqIBJjJ2x4KBZEB8ldCoyAuYC9/FsgUQgOFBuigNhrPAksNkAOXGs20sNMgO2CtkUwNZBok7YBzozFMDRQaaInTLPXQb29//0XPtGqBnQazHU59vprrm3d93/+pZ0jmmwanMhou3XHvUveuemehp1xzr9AoJu84MDq46p2FnpBysMs0lrFlB+x171PvnOgpHbAvlgrEGP3j1eevXxd6mjH62Zze3PzxStM56Z1Pms6id640nUXvXGlCf/V9/05TWixOFEXRT+fDl5sPmtBp75xqOp9750zTOeudM03nTe+80YRev128VhRFURRFUTTK36qAghqBUz6KAAAAAElFTkSuQmCC",lightning:{day:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAMAAAD04JH5AAABHVBMVEUAAAD/////mQD/////nyDj////qhzq6v//vxX/xBTv7+//vyDh8PD/phr/riPn5+//vyD5qh75qCPk6u//vyD6qB/7vyLj6/P3qiD7viTj5+/7vyT4qSLi6PLi6e/8vyP2pyHq37nh6vLi5+/8vyP3pyH2qCHh6PH6vyLh6O/j6fHh5+/7vyT2qCL7vyPi6PH7vyTj6O/2pyH3qCLi6fH6vyPi5+/6vyP2pyPi6PDi6O/7vyP5xDbp27Dv1Y31qCLi6PD2qCP7vyTi5+/7viT2pyL2pyLh6PD6vyTi6O/6viTw0n/2qCLh6PD6vyPh5+/6viPu0of1pyPh6PD7vyPh6O/7viPl4tL2qCLi6PD0zGT1ylf2qCP3x0r7vyTG7C6RAAAAWXRSTlMABAUFCAkJDAwNEBARFBYgICosMDAyPD8/P0BARE9QUFRXX2BgZWxvb3B/gICJjI+PkJGYn5+goKmvsLC1uLq7v7+/wMDIy8/P0NDX2d/f4ODl6+/v8PDz9soRkfcAAAOfSURBVHja7VlrV9MwGM68m6lVpjI6HLjCuEyd3Ap0XtCCUN0cOorWS///zzDJ2rGttGnT0JzjeZ8vW3fSPk/fezKEAAAAAAAAAAAAAAAAAADS4+nrO2oFHPo1EAACiqbcOSmPXXUmBCydja5KGOPbV/TO4wpqu2MXS76/QD+1lf2BN8R+Q5MtoPx5QgGa4F8iH88OvAkc1wtSMOTXe14EB7p8BdFfa5Qftxmja63pmLhCN6yhhG3ZCg6Dbw/nVufCr+eE/5iyOQa+WIuNPvODdgXhWN458ylOVoMfNMrvGtPrDJf8PKhI518g9KedF4fnv399ec5eloa+haMrsU1tgGXXA9/vlBFuBEE3WNdo9JuXLzapAsnv758vILw+mIx3M245VdCS6v8zUnMq0ynnxJvZIUaSGYi7fgetMFKrTp6LdfqKbkKgabQeSBTw1S8bjH70VrhlG0l3tMhqeSYo+6eVS1MuASQZN/Kx1j4y1FjZe0PDL1NuEyf18gl4xcqOv8vq/jvCb2S6nZosX1O4W2Ogjeix/8Pz7Iz392Vm4t/MBmA+sKQJ+EYiMOs9rexGi8dbgYetkVokTYCVUHbjoBO3SRNgCwSURAGsB2YWYMgSEPRAWyAIe7MSqnHYAw0BtxH02jk1GOz13Q1NJHCD2SXPcFRn1hca9XXL7gdbBXEjVAaeQAKOqzC9XCPqQU5+OprQWBgIeoGm8lruMN4QH1HJ4N+XkMimSBKFpUTKVtMRdIIpq5/pgiawpY0UtthskMIDe39CfJDfmm/y59BbP0cCqvI74z3+XYsj/qPkhkYedV1IAE7rgSrXm9kFlLixe+GBI045FBJAB2szpQeqVzIdWbzNzV5KA9BqLFJSDc7m5sIDHAOgnmBPc5OPWhbTGkC4preSj9z2UhqAniY5wl0kvh+PPMAxADvNE9ynVuiRWxtzPFDl8wtPNWwm7NUTPZBsgAad6hwkDHbs6B23G7OxHog3gDa7zoZ6O89cXHHCQ7HtuCo0woOJBfvc07yUO6OWGzwIx/SBEM3IEQk7zMt/eI4Ni2rox3XiAO+jVcTrm9L+PiiVOB74fp93i1xEPDCPCsW1aQ9sFsuPHk3xd5EabIUCZhQJ+HRpBhaImAwsDE/iMrAoLCvJwEgMbirjH8ZgVx0/UpqBYQw2FRpgWWUGBjGoLgODGJxXyY+UZiCLwa5SfhKDM2oFbDXV8qOXivnRDQQAAAAAAADwf+AfW0NPulJiHL0AAAAASUVORK5CYII=",night:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAMAAAD04JH5AAABF1BMVEUAAABVqv//////mQD///+Av9//nyDj////qhxqv9Xq6v9wv9/v7+/h8PD/phr/riNwt9fn5+/5qh75qCNwutXk6u/6qB/j6/P3qiBwt9fj5+/4qSLi6PJzudbi6e/2pyFxudTh6vJyutXi5+/3pyH2qCHh6PFyuNbh6O9yudXj6fFyudXh5+/2qCJyudTi6PFxuNXj6O/2pyH3qCJyuNXi6fFxudTi5++n0OL2pyPi6PBxuNWu0uPi6O/A2+n1qCJxuNTi6PD2qCNxudXi5+/2pyL2pyJxudXh6PByudTi6O/2qCJxuNXh6PByuNXh5+/1pyNxudTh6PByudXh6O/2qCLe5vByudV6vNecy9/a5e7i6PD2qCMiJmwcAAAAV3RSTlMAAwQFBQgICQkMDBAQERQWICAqLDAwMj8/QEBET1BQVF9fYGBlbG9wcH9/gICJj4+QkJGYn5+goKipr7CwsLe7v7+/wMDIy8/P0NDZ39/g4Ovv7/Dw9ve+6bcZAAADzklEQVR42u1ZbVvTMBSt891FZULdKDgcBYYwHS9CBayIKwKFbTKmUev//x0mWdut7dqsSVgefXI+rTxN7+k9597cBk1TUFBQUFBQUFBQUFBQUFBQ+HfwWGbw1+/PINyUFX3m3TXE2JITvvgGxb7Zr1/DZSnx564g7CwXNQ3CeRnxl9Hb18kvCItpNxUAAE9uLf7FzMAIEI69o7R22PMGOKyVbiH+UfDeEM4kb1g88SI4r4rV/xruhxdjPGC0vQRODIH+P4MXQ907cQKgSSL27XUDICkM0x5Q2BNGYBPezA2vWrE+AM5xNNcEI38yu0QHQVYoRiu/Ds8i5sPx+2Z8kdlHf+7pghLQifRD4sLyYq1MXhZb3wbJVcDBOQAiCMRbX+fnR990vY0Sdr81fp2FGQiIPx8rfPDpd9TvVtpKzKDBT2ALtkYv9XjJuelpdlGS+I3YgvWRqzUS1K6i5wIDv2I/w2gl3A+4CUQaj0nCh28FGo6ZtbaB7i6JJKCPLbkMoGLc5ox/Z8SDpOZy1TYSqc1J4P4IASyAmWs1TpnBLUHYh1HTc3Ku7vJX4tADeu4EEA1sTgIX8JX/ax05MO/qRv6kxXEUzgIsD0Oke9zT0JX/y85ou2kwkGy8u3HoQofBUAIIIBMQDUCtzUDAFEBgHtcB2CAzr8NgwnaZtxu34OdgD8xbhVg2hHaTi8Mc/PWDjJ3b+R/jD6hoduEZjj6Q7DON+obtdP1PBfYk6D2PoQBHWVge14h6whkfjybYCz1GFXApr3PPNdvsIyraA7sChluLpYiCViLkU9NlFMHi38+GUrKkwBEy3PtPYpkNJlDg4E+AL+K35of0OfTR95BARfzO+JS+aimMf5p5H0CPusdEAEyqQIWqZn4CBap3hwqcUtohEwE8WFsTKlC5lenIpn3cHEyYANyNWVqqSfm4GSpASYDWZtzT+tlHLUuTJoC5pzeyj9wOJkwA/rJ1mXeR9P04VICSAHKax/idquMjtyagKFChx2eeaqpksq1mKpCdgBqe6lyNGeTY0TtvDs4GxyqQnoBSeYMM9Q7PXKy7waHYXloXCvE8csMh9TRvMoBG338QSNkHAqwmjkjIYR7/4Tkwbcyhm7YT+zhOdhGvawn790GhQFHg2zPaErFIKLCgTRV34wrsTDe+9iIW/1KTg92AwKwkAl/HVuAUkVKBU8PLtAqcFlakVGDCgzvS4g88eCkvvia1AgMPrkpMwIrMCvQ9KK8CfQ8uyIyvSa1A4sFLqfGRB2flEthdlRtfeys5vvZAU1BQUFBQUFD4P/AX2A1W5NNma9AAAAAASUVORK5CYII="},"lightning-rainy":{day:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAMAAAD04JH5AAACmlBMVEUAAAAAAAAAAP8AAIAAAP8AAKoAVar///////8AVdUASdv/nyDj////qhwAM7MARtHq6v//vxUATtj/xBQAScjv7+//vyDh8PD/phr/riMAVeMAUsXn5+//vyAAVcb5qCPk6u//vyD6qB/7vyIEWuLj6/P3qiD7viTj5+/7vyT4qSLYnTgGVMji6PLi6e/8vyMGUcoGVMr2pyHq37nh6vLi5+/8vyP3pyH2qCEHUsUHUccHUcwJXN/h6PH6vyIHW93h6O8GXt4IUsQIVMjj6fHh5+/7vyQIX+EJYOb2qCL7vyPi6PH7vyTj6O/2pyH3qCIHU8YIU8sIVs4IVs8IV88IV9MIWdYIWtgIWtsIXNwIXuEQVsbi6fH6vyPi5+/6vyMJX+T2pyNDaZ/i6PDi6O/7vyP5xDbp27Dv1Y0KX+X1qCIHU8oHUcLi6PD2qCP7vyTi5+/7viQIU8X2pyIIU8YIU8kIVckIVcsIVs4IWNAIWNP2pyIgXrzh6PD6vyTi6O/6viQJX+Tw0n8IUsf2qCLh6PD6vyPh5+/6viMJXeDu0oedimX1pyP0piTh6PD7vyPh6O/7viPBlUkIUMEIUsPl4tL2qCIIUsMIUsQJUcAJUsEJU8MJU8QJVMUJVMYJVMcJVcgJVckJVcoJVsoJVssJVswJVs4JV8wJV80JV9AJV9EJWNIJWdQJWtYJWtgJXNoJXd4JXd8KU8IKU8MKVccKVcgKVckKVskKVsoKVssKVswKV84KWM8KWdAKWdEKWdIKWdMKWtQKW9YKW9cKXdoKXdsKXdwKXtwKYOMKYOQKYeMKYeULXNgLXNkLX94LX98LYOELYOILYeQLYucLYugzZ7RueofSnT3i6PD0zGT1ylf2qCP3x0r7vyTZiEpTAAAAl3RSTlMAAQECAgMDBAUGBwgJCQoLDAwNDQ4QEBEUFhsfICAkLDAwMjw+Pz8/QEBETk9PUFBSUlRXX2BgZWxtbm5vb29wcH19fX+AgIaHiYyPj5CRmJmZm5ubm5ubm5ubnZ+foKCpqayvsLC1uLq7u7y9v7+/wMDByMrKysrKysrLzs/P0NDX19nZ39/g4OPl6Ovs7+/w8PHy8vP2zKK6dAAABLZJREFUeNrtWfl/E0UUH1LcCgpybUQMEI+WBKRV7FbkskojYKkHyKFAau1WRSluRVCOEkRjikCaIocIeF8gN8hZDhXwvlFXYf8XZmaPbJImm8xOdz8fPvP9JTvbnX3fee87772dAsDAwMDAwMDAwMDAwMDAwMCQP26b2tddAs1KkBFgBJw2OW+l1zRqTCFQ2WaMinme79NFazYzCNaZBpWKUo5+feMb4rKKhgofbQLeVSkMQIr9SvgzsklOQUuZQwxU+4GonIGmAH0GmXeDyD5fgy0mxKoAD0MREESVwlzaDJq1q8HDJgzTL9uh/RZkLSLwyWd5IYbj4OsCOXrntSkIKydoN3zIfkJIf05IwNtxP3X75dB8a+ODze3//7f6brxYJH2Rz3ySl5APeNr5QFEavYCv0EQXr/Yh9Yc7fziMGFBev9JeDvjqeKrew9keRwxCVOPfBnOOP33LRbK7OQKdRFOIdUojGI+NimXwvXwALTGRQ2g+lA8oEnhT8QrYvLEqPiQJuWaE4NP0XOBVWv2dbrkcgJux1p7V4IsYQZz2nkHyK2hvwyBF7RF4CKcdpQ7n/eegfaGg6chl9opC/yAGKkS3KJtkWSpwfozmTrxcsANwDERqBN6CCix0Tqhwp2XHswQvq4K5iBoBMUfazYYADBs1AhKBoCgSwDWwYAICLQJaDZQIRBgtoZCN9RooEIQNIlpjk4OAl5+o9ZEIV+td7DRHZdj7RK1+QJRi2qcCuRP8cZlgA5pZhGVbLWqTTfuoNUFaiBNGAW3lKtsyriVvUWHjH6OwkcMkm0hPJVQ+NSOEQQjTqmcBQhdI1FoKiaw3yCMC9Zd0LKRfmq+37kN7bTYIlNKvjDdazxpl2F+Uu6DBV11LRIDPNwKlltEsnECxpXaTEVhkkQ6JCKDGOpxnBEq7pDsSrT5u6vN0AMrGJClVsPi4SUbAwgEgSljTErmPWkbl6wDinB7KfeRWn6cD0GlShLiKZK/HRgQsHIBP8wi/U/3oyK0mIwq3T57U0xSBUmv7xF0N7gmjafEreu2vH+9LRiC3AypQVxcBxMDHjnJLTUVJ8h73w/e/z05GILsDfCXVuKmX7PTF/oh+KGbIkTvw6/lZpixk4CZugGlmg+VpXp5fRqGE9iJ9HdyFcz/PNNUBHaMHPTV/XMoRCT7Ms394zgsi4mDkMm7vN2dnmCqxhufB/Rd/WlNkziJyLEzt3wfFxUkN7D5zanpGBNYNBE/++cd+rtMpdMHt6vh8ekYEhgPwxG/f7eNA14P77PjROekReBj+Yfb5X/Y4QuCjr3Y8nWb/DfSHWd9+/aUTBIo+2H7oUQ++fEQnMBSNZp49vdMJAp7X3916l3q5XN+BeDSj44tPnSAAhky8t7t6ZexAjMdPHPvQEQLAo/3eqtpfP1AdTjvy3vvOENBxj0pghDrq9tiOQ1uucZSAqsG1/bThne9sfcnjKAGswX+X6QQ8dzxws6P2VQ3+vbQfcAlYg/90vOoaAaTBDSc/ecU1AlCD61d8fGSxawSgBkcsObz9ZdcIwBrY+4VtBxfc4JoGYQ0cu/HtMe5pENXAHj2AaxocDdzFFJftg+sAAwMDAwMDA8PVgSujozDssVKCigAAAABJRU5ErkJggg==",night:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAMAAAD04JH5AAAClFBMVEUAAAAAAAAAAP8AAIAAAP8AAKoAVapVqv////////8AVdUASduAv9//nyDj////qhwAM7MARtFqv9Xq6v8ATtgASchwv9/v7+/h8PD/phr/riMAVeMAUsVwt9fn5+8AVcb5qCNwutXk6u/6qB8EWuLj6/P3qiBwt9fj5+/4qSLYnTgGVMji6PJzudbi6e8GUcoGVMr2pyFxudTh6vJyutXi5+/3pyH2qCEHUsUHUccHUcwJXN/h6PEHW91yuNbh6O8GXt4IUsQIVMhyudXj6fFyudXh5+8IX+EJYOb2qCJyudTi6PFxuNXj6O/2pyH3qCIHU8YIU8sIVs4IVs8IV88IV9MIWdYIWtgIWtsIXNwIXuEQVsZyuNXi6fFxudTi5++n0OIJX+T2pyNDaZ/i6PBxuNWu0uPi6O/A2+kKX+X1qCIHU8oHUcJxuNTi6PD2qCNxudXi5+8IU8X2pyIIU8YIU8kIVckIVcsIVs4IWNAIWNP2pyIgXrxxudXh6PByudTi6O8JX+QIUsf2qCJxuNXh6PByuNXh5+8JXeCdimX1pyP0piRxudTh6PByudXh6O/BlUkIUMEIUsP2qCLe5vAIUsMIUsQJUcAJUsEJU8MJU8QJVMUJVMYJVMcJVcgJVckJVcoJVsoJVssJVswJVs4JV8wJV80JV9AJV9EJWNIJWdQJWtYJWtgJXNoJXd4JXd8KU8IKU8MKVccKVcgKVckKVskKVsoKVssKVswKV84KWM8KWdAKWdEKWdIKWdMKWtQKW9YKW9cKXdoKXdsKXdwKXtwKYOMKYOQKYeMKYeULXNgLXNkLX94LX98LYOELYOILYeQLYucLYugzZ7RueodyudV6vNecy9/SnT3a5e7i6PD2qCNbALACAAAAlXRSTlMAAQECAgMDAwQFBgcICAkJCgsMDA0OEBARFBYbHyAgJCwwMDI+Pz9AQEROT09QUFJSVF9fYGBlbG1ubm9vcHBwfX19f3+AgIaHiY+PkJCRmJmZm5ubm5ubm5ubnZ+foKCoqamsr7CwsLe7u7y9v7+/wMDByMrKysrKysrLzs/P0NDX2dnf3+Dg4+jr7O/v8PDx8vL2905AATIAAATfSURBVHja7Vn3exRFGB4vukYsKGJG1BzmJMmJGMVkxYIJajiUECxIsXEag2uNObFrklO5HEqOExsK9t4VpRkVC/bexnL+M87M1tsrezsz2X30mfeX7CQ7+737fe9XdgKAhISEhISEhISEhISEhISExH8HU8I0fsIlQwjND8t648IxRLAoHPMNZ2Lb61d2jqGOUOw3rUFotKMBAIRaw7Dfgd++k14h1FDppnoI4cETZn+kURcCQmXviM7tzxV09LdHJ8D+KvO9EWosvWHWQKEIw21i4z+GVlqLMhqIZwolGIgL1P8QGrHjPuomAHuoxbzWFYc4FHFV0ylcKozAfLS+yV4NuuoAHCbW0ip0/ErN0jgIkkJDceZ3oqEi8RH7edW9Sc3jX+dighwwWlQPqQqbZ7U305cl0tdg6S6YIj6AIgi4S9/oH1caost1R4n6k+X3JQkDAfZbXYkPr/q7WO/JSjsJgwQ/gUVo0LmMuVMuXdnNaewkfiEOok7Hai41qrXh58I4ecV8FaFFST3gJlBUeFRq3normEip1fYm8N1RkQRiZVOuCnAy9nLa39uhQZpzvnIbBynDSWA/BwESANXXbuKyOHcIrDqMi17K5+4sfybaGoj5dgCNgcZJYAQda1x1YQX63Z3w7zQ3VlmzAMvDMOkc9zS0xrjSqpTdSojjsPF2Y0uFKQZBCSCARUBjANszDARUAQRaSR7AbjrzphhEmGnmrcaD6HqzB/rNQhI2jEwPF4cm9OfDdOzs9f8YY0DFswvPcHQZ9T7TqB/XUlnjU4HdCbFcgSEBnSySBa4RdYDTPhlNiBZyjFEgqdzFPdf0so+ouAdmBQy3SZYkMkuJkE/NNGMQkvz9zA4liwtSQoZ740kss0ENEej7x8QN4lvzAd5z6OSHLAIt4jvjod67Zlv2V1e9D+JH7cNEANYagRbPaPonUO+pXTsCqz3KIRMBMlgna4xAy4RMR5rXx01fjQ4g1ZilpKoeHzd2BDwcADKMPS1f/ahldq0OYK7piepHbn01OoB82aaZu0jlfmxFwMMB9DSP8Ts1Ro7cekqiMOOsBfs6ItDibZ95qmmjk60rfnV3//L1aXYEqjugnUx1acAMeuxYGO7RzwZ1KF99+eMKOwKVHRBt7qZDfYpnLo6lzUMxS47K29/vXu6oQhYOUw5x7Oz3PM2rDTCRNx5kvofy+WffLnP0ARNzDr/86lOLjkjoYR7/4TlUNcLBqmXKG5/sWuroxAauAfN+/WZtnbOKFLJJYf8+qK+3NfDaRx8sKYnA/dPART//9JZSdotYKK+Mv7ikJAJHA3DhD1+8qYCJh/LCjm0XuyOwGP9hxe7vXg+EwDPvbb7CZf9e8ofln378ahAE6p7atOXcCL08xyRwJFkt2/Xhy0EQiNzz2Mbj9cs7zQykq6XjLz0fBAEw/YyT9tSvrAykuGDn9qcDIQAixs+jdPvrpunL87c+8WQwBEycqBOYqa/2OG/zlkf2CpSArsH7phrL4x7deGMkUAJUg3/dYRKIHHP6EYHa1zX42+1TQUigGvx9/LbQCBANPvD+c7eGRgBrcN1dz269OTQCWIMzb3l3002hEcA98MBrH3/nuoNC0yDugac8uOHk8DRIeuCkSSA0Dc4B4eLskO2D/YGEhISEhISExP8D/wINx0FRWCdM9QAAAABJRU5ErkJggg=="},pouring:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAMAAAD04JH5AAACB1BMVEUAAAAAAAAAAP8AAIAAAP8AAKoAVar///8AVdUASdvj//8AM7MARtEAQL/q6v8ATtgAScjv7+/h8PAAVdAAVeMAUsXn5+8AVcbk6u8EWuLj6/Pj5+8GVMji6PLi6e8GUcoGVMrh6vLi5+8HUsUHUccHUcwJXN/h6PEHW90JYOTh6O8JWt0GXt4IUsQIVMjj6fHh5+8IX+EJYObi6PHj6O8HU8YIU8sIVMkIVMwIVs4IVs8IV88IV9MIWdYIWtgIWtsIXNwIXuHi6fHi5+8JX+Ti6PDi6O8KX+UHU8oHXN4HXuUHUcLi6PDi5+8IU8UIU8YIU8kIVckIVcsIVs4IV9AIWNAIWNMIWtcIW9kIXN0JW9kJX9/h6PDi6O8JX+QIUsfh6PDh5+8JXeDh6PDh6O8LYOULYecIUMEIUsMIUsMIUsQJUcAJUsEJU8MJU8QJVMUJVMYJVMcJVcgJVckJVcoJVsoJVssJVswJVs4JV8wJV80JV9AJV9EJWNIJWdQJWtYJWtgJXNoJXd4JXd8KU8IKU8MKVccKVcgKVckKVskKVsoKVssKVswKV84KWM8KWdAKWdEKWdIKWdMKWtQKWtUKW9YKW9cKXNkKXdoKXdsKXdwKXtwKXt0KYOEKYOMKYOQKYeMKYeULXNgLXNkLX94LX98LYOELYOILYeQLYuYLYucLYuji6PDO9GJnAAAAaXRSTlMAAQECAgMDBAYHCQoLDAwNDhARGxsfICQwPj9AT09QUlJfYG1ubm9vcHBwcX19fX+AhoePkJmZm5ubm5ubm5ubm5ufoKmvsLu8vLy9v8DBysrKysrKysrKysrKys/Q19nf4OPv8PHx8vINzcjBAAADiUlEQVQYGe3B95/TdADH4Y8HBlQ0fg+N8SLViwM9x1XvXAiiROq6uFBwpNqaOFFw760oLgRUBAdOnO8/0nLt4eug+LqkafvL93lkWZZlWZZlWZZlWZZlWVYZlhhjTtKQeCvXp7StH/c0aCtmmCepaJCCBkeYCTQoZoqDstpEYCQvCGvMWqfBMAkt9dDoEBM2aUk8DYCXAFmow4QZkPrqm7EV42NqMSlQMzqCiYHEqB/MeINZ6aQ3A0TqKgISlc9MpswT6SgioKqy+Q3mqxsdTR1ST+VayUG1iieZIAIyX0flATMqVUhLzVOHqcah/kcV8FQiH8hCLVwG0yqPSQFfOUTQUHlCIFQePhCoNAnEyqcJVZXFB0LlE0FNZZmATDlVIVZZqhArpwlIVZYaRMopAFSWGKrKKQBUDjPegKpyCgGVwUymtMTKqQqNMU898xvMCpVTzEGNKU89CVNasmlPedVoSyeNiqvQEldUQFCLm8xKPBXlp0Ck4oKIltRXQTNApJ54MZAaFRIAE+rVNJCokASa6l0EhCogBCoqQR1So/wiiFWGAAiVXwxVlSKGmvIDKirFBKTK7XjAVykCQLmNAiqHAUaV1yhgVA5gVHktAUKVwgNGlVsTIpUiAJRfDRoqxTQ0lV8IBCpDAyIVkEFi1LsQqKiAKrBOPTMp1FVIHZhQj0wCBCrEz4Apo8Ocftmlx2mhTAJEKqhCS6OieRY9+PdP52uBxlOgrsLCjJZkanxMhzg/7v99rRbAG5ts0BIbFefX6VinDuf93/Zdq26ck/Wf9XRE6ompZrQZtTnf7v1ljbo45YYbz9Mcn7Z6oF6ZsJYBTXU473y9e7W6uOifnx9epDkZ0IwqKokxmuO8teuLVeri+j//eM/RIcaoP5w3dry6Sl1cd+C7dx31n/PKpx9fpS7W7vv1bUf957zw0dYr1cW1e75801H/LXpuy7bLR3SkNbt3vu6o/0YeemrzWepYvHz5YnWs3vHay44G4LRLzl6sjgsefeRCdVzz2SfPOxqEEc058Za/9t+8TG1Xb3/mWUeD5T7ww4F7Xc065oqt2544VoPl3vf93k2u2s58cvNtIxos9/5v9mx01TZyxsWnasDcTV/tusfV8Lgbd+7Y4Gp43Ls/f+kuV8Pjbnhx+x2uhse988Mtt7sanhNuevqDW5dpiM59/LFzNFRLl8qyLMuyLMuyevMvxEB5rx3O8MsAAAAASUVORK5CYII=",raindrop:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAMAAAD04JH5AAAAS1BMVEUAAAAAgP8ggM8oh8clhcoog8cmhsYohMcohccnhMYohccohccnhcYohccohMcnhMYohMcohccnhcYnhMcohccohMYnhMYnhccohcenmLVtAAAAGHRSTlMAAhAgMEBQX2Bwf4CQn6Cwv8DP0N/g7/Aeo4FyAAAB3UlEQVQYGe3B0W7jIBRF0VMMKR4cN9iJ2f//pWNFVdW0CQ8jgTXSXUvGGGOMMcYYY4wx5n+XRh3Kg9eRFlh0oMQu6TCeO6+jLFAKLDpIAsYRSDqEB7KUAa8jLFAGaSiw6AAJGLUbgaTuPJB1lwGv3hYog+6GAhd1NgJJnxIwqqthg1VfVtgG9XQBvL544KKOIpD0TQKiunEb3PTgBptTLzMQ9CAAkzoJwKwfZiCojwWK0w+uwKIuIhD1SwSiOnAbrHpihc2pvQQEPRGApObcBh966gM2p9YSMOipAUhqzG0w64UZNqe2RsDrhQBEtbVA1ksZFjXlgZNeOgFeLU1QVFFgUktXmFQxwVUNecCrwgNe7UQoqgKi2pkhqyrDrHYWSKpKsKgd4KSqE6B2gKCqAKiZNyCoKgBvagYIqgqA2gGCqgKgdgpEVUUoaifDpKoJstqZ4KqqK0xqJwBeFR4IaqjArIoZilqagUEvDcCkllyBi166QHFqKgFJLyQgqS23AlFPRWB1aswXIOqJCBSv5gK7s345swvqILK7Bj0IV6BEdeELu8u70yf3fmFXvDpxK3fL+c/uvHC3OvUTb/xwi+orZr7JUf25mHJe15xTdDLGGGOMMcYYY4wx5p/9BcSyKH1LuNIQAAAAAElFTkSuQmCC",raindrops:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAMAAAD04JH5AAAAclBMVEUAAAAagMwnicQggM8oh8clhcoohsYog8cmhsYohccnhcgnhMYohccohccnhccnhcknhMYnhcYohccohMcnhcYnhMYohMcohccnhcYnhMcohccohMYnhMYnhccnhcYnhcYnhccnhcgohMcohcYohccohcgZZ+6oAAAAH3RSTlMACg0QIDA/QFBgb3B/gIiIj5CfoK+wv8DP0N/g7/D8k36gXQAAAtNJREFUeNrtmdFym0AMRZUuBAihDcE2DmbbtD39/1/sg+MUrxWI011m2tF53EksoXtXEraIYRiGYRiGYRiGYRiG8U9SFZdnRble/GwcXHjmhjFbLYEdtOFZC7u14tcAgQgFQL2WAADnIrgBYCURdgCBCO3xbLeWAM32XIQC2DbriJCN8CTOT0VwI3gnT6uIsANykXIqwgYoRfI1RKiBRkRkIkIJbEVEVhDhKICITERwA/ijHOlFeBHg9Nzt6Qa8tOHkIlQnASYiFCcBgmRS4EY4/PG+h8FNBBARd4DRJUtgc377K6Bpgeq8I2xSxS/D/tcDv6APe2KRSIBhKoCISObhGX/me3cI50Q0mkuD1coMLKdGjUk+dfvpcb9+e2kLgTB5mhbgwybTaYJnPkkz0CpboKxGqlYRGOCgFUXz2wGGFA4slL5Yv7daEXpg/56ivPowcj+slQKU5z0wNEcV2wG94oDDW3/fR3ZBpRRg9iljl2CvFGA7UwCRHvYR9yDlYrv59asC4u1GLXgtwpzRvdqjPm7BTlFlO/c/XUQb5sp0cUsuyyOOpFpRoFxQQMTHW9E7pdoNl3P44h508SzQXP/xTTwTaEN/vzhuCiBhAsurZ7wEbrSespxABtxESeCTZvjlBBzw6f+QQA32tKYJtZbSL7Z6rX19kK3SiNrFW94vDIsr1xGnFDhb8mCslUQd/X7BBPXisLgCbcnt5kugrtEfplD2/IzZadDEfUvfKh/XzIlcEm8Wnt43x2C9cP7th8xH5U32ry9CmEEOjMVb8SO/mEgDjOVlVlqcckzxhWUH8OiCrH7AJii1eySyASY1YLyfhMsf4ed3eJhok92PyX66qDwA+4e729vb27uHAYDnZ2A4ne0B8JUkwXVc8PnL5VmX7pvKovPTSL7NRLL2/KwrJCWuavtjoL55vRRl0x+T6NvKiWEYhmEYhmEYhmEYhmFcx2+XiWLos2+l+wAAAABJRU5ErkJggg==",snowy:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAMAAAD04JH5AAAAxlBMVEUAAAD////j///q6v+Av9/v7+/h8PCExd6Hx9/n5++Fxdrk6u/j6/OHw9vj5++GxNvi6PKGwtzi6e+GxNzh6vKFwtri5++Fw9rh6PGGxNvh6O+Gw9rj6fGFw9vh5++GwtqGwtvi6PGFw9zj6O+Fwtri6fGGwtri5++Gw9vi6PCFwtvi6O+Gw9qGw9vi6PCGw9vi5++GwtqFw9rh6PCGw9ri6O+Gwtrh6PCFw9vh5++Fw9uGw9uFwtvh6PCGwtvh6O+Gw9vi6PCXb84TAAAAQHRSTlMABAkMEBARHyAgMDA/QEBOT1BQX19gYG9vcHB8f4CAi4+PkJCfn6Cgr6+wsLu/v8DAys/P0NDf3+Dg6Orv7/DwlaHyhAAAAylJREFUGBntwWFf2lYYxuG7W44jRLPCNGudMJ3VtNJK1gjIZszz//5falT8bWut1YRT8uZcl4IgCIIgCIIgCIIgCIIg8OGFc+5HdSR+9a5i7d1+rG17eclnyqG2KV3wwGWqbXEnfFJPDlMnxWk24c6ZtsOVrMwyp3+5bMlKGWsL4hKoM30hq4Eq0Xez+3J/VyuuAiZOD7gCKJ2+B7e/4E51FF8Cub4qB0r5544qPpPrETkwlm/Jgs/NnB4zgyqWX6/4ZDKMJZfmQJ3oUTFwKa8yViax7rlxkekbxkAsjxKgzvR8NZzKH1cBiRrIYSF/MiBTEwmQypsSCjWzhLF8SYBMzeQwkS+HUKuhMRTyZQyFGjqESr5MIFdDKSBfChiroRSQH25/AWM1lAHywR1VrBRqaAyL3VgbSxbcydRQwSeLk1gbySpW6tNYTU1Yq46c2huyUgzVQjopltwpY7WVVECu9tKclSpRS5dAro3EBVA5tZICh9rUKVCqlRKW2lwOZGohA4byYAaVU3M5FPIhBTI1V8BYXhQwUXPAUF4cQqXGfgASeZECamwHkB8O2FFTO4CTH8COmnoBZPIiBnbU2BJyeZECam4CC3lxCks1lwGpfFhArhZqKJ02lwFDtTAGzrQxV8FMrcyAQz0Q3Yz0fK4EUrWS1MCJ0xf2bKpncyWQq6UhK4uh/uf9m/5buxn88nGg59ivgJlay2pWypP9Xd17b2u3Az0l3j1asFI4tZfMuHemtZFdqG/XPT3hHfdybcSNa9ac7uzZSNHNVE9IWJul2pTLJjWw1J2fb+zm+K3Z20jfVgPLfChPnNPa37fnt2YXU3utJzin7+GnSHs2kvb0UNTXVvRtpK86t5624qCnhyJpantSpG68tjfHZvNf53+pG/0rs+upmf2mrlxZpD9soK5EHy3SuR2oI/252c0HM/td3Rjcjka3djG4+lPdmZq6dW7avn5f/+lp++ZzdSfqSWZSL1I3Luz4g9mHY7tQN/rXZtMLs+u+umJX0pWpMz2bR9HceurIgZnN52Z2oG6MrvdGdjsaXL9Wd2yqbl1NFQRBEARBsJl/APajpQ0ovD84AAAAAElFTkSuQmCC","snowy-rainy":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAMAAAD04JH5AAAA/1BMVEUAAAD////j///q6v8AUN+Av9/v7+/h8PCExd4IWNeHx9/n5+8FWtWFxdrk6u/j6/MIWNOHw9vj5++GxNvi6PIKWdaGwtzi6e+GxNzh6vIIWtWFwtri5+8JWtOFw9rh6PEJWdSGxNvh6O+Gw9rj6fEKWtOFw9vh5++GwtoJWdSGwtvi6PEJWdWFw9zj6O+Fwtri6fGGwtri5+8JWdOGw9vi6PAJWtSFwtvi6O+Gw9qGw9vi6PAJWdOGw9vi5++GwtqFw9rh6PCGw9ri6O8JWdSGwtrh6PAJWtSFw9vh5++Fw9uGw9sKWtOFwtvh6PAKWdOGwtvh6O8KWtSGw9vi6PAhzlccAAAAUnRSTlMABAkMEBAQER8gICAwMDA/QEBATk9QUFBfX2BgYG9vb3BwcHx/gICAi4+Pj5CQkJ+foKCvr6+wsLC7v7/AwMDKz8/Q0N/f3+Dg4Ojq7+/v8PDwxpK5MwAAA51JREFUGBntwfFDE2Ucx/GP5R5y10ZcwiKuRIItwVBOjSnsdMwtVnGx5/v+//+WxgaWgsVtx+2Xe71UKpVKpVKpVCqVSqVSqVQqlfJwzzn3pRYkePQqZerVeqCiPTziI92GihQOuOYoVFHcHhdG7a3QSUEYtZl4rmK4LmO9yOkDFw0Z6wYqQNAFRpE+EY2AtK47s/xwfVljLgXaTte4BOg63QW3PmAi3Q6OgFg3ioGu8ue2Uz4S6zNioKW81Qd8rOf0OT1IA+XrERfajUByYQyM6vqsADhSriLG2oEuuVYS6T+0gEA5qgOjSLc3gn3lx6VAXRnEMFB+IiBSFnUgVG66kCibIbSUlzoQKZsY2srLFoyUUQsS5aUFiTLaglR5aUOsjEJAeUmgpYxCQPlw6wNoKaMIUB7cdspYooxaMFgONLf6gIlIGSVcGOwFmkuUMjbaD5RVm6l022l2DcaShmYQtpMhE91As6qnQKzZhTFjaV0zOgJizSVIgNRpJiGwpXntA13NpAtDzS8GIs0gAhrKQQ9Sp+xiSJSHEIiUXQIt5SKBtrIDGsrFFqTK7AugrlyEgDJbApQPBywpqyXAKR/AkrK6B0TKRQAsKbMhxMpFCCi7NgyUi30YKrsICJWHAcSawQi6TvOLgIZm0AKea24uhZ5m0gO2dE3lrKnbc10g1EzqI2DP6RMr1tGtuS4Qa0YNxgYN/cvrZ7WXdrb23bs13cZ6CvQ0s2jEWHdvfVmXXtvU+Zr+T7C8PWAscZpdvcel55pq2qFqdlrVxP0nT+7rRq+4FGsurjViymlixZqqnHU09dT7p7pJnaleqHm5qD0Chpr49szOdl+avazowrH3x7rRCBjGDeXEOU39cX5wbnbYsce6cOz9sW7mnO7CVxWtWFNa0cSx98e6UqmpEDVr6sqm95u6cmBVFWKjqg9WVzVVkTq2IlW0GI/t2a5Z/8f+71qM2onZacfMftKinFhFv9iaFqXyzio6sA3dvdUXP+iaWt/s7I2Z/aw79977VX1q7bzZPLfDtZO3unPe+x3dpGMqhPd+Rzc5MBXCe7+jK7Wa/lFVIX71/mtd6fdVvG8eaKJSlcykakWLcWi7b8ze7NqhFqN2atY5NDutaVHsRDoxTd1/8eemilW1fqXSt6omvvf+vQq1YWb9vplt6MKO916Fap6uNO28uXb6WBd2vPcqnHV0ZdP7v1S4k46uPPjN76hUKpVKpVIps78BSoPl+hd3ONQAAAAASUVORK5CYII=",sunny:{day:Ft,night:Ft},windy:_t,"windy-exceptional":_t,exceptional:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAMAAAD04JH5AAAAUVBMVEUAAADv7+/n5+/k6u/j6/Pj5+/i6e/h6vLi5+/h6PHh6O/j6fHh5+/i6PHj6O/i6fHi5+/i6O/i6PDi5+/h6PDi6O/h6PDh5+/h6PDh6O/i6PCRoHqWAAAAGnRSTlMAECAwP0BQX2BvcH+Aj5CfoLC/wM/Q3+Dv8AXwoUAAAAIwSURBVBgZ7cHrbhshFIXRzRAcMqau7bkYvvd/0DKOIjVt4vl1jCKxlrqu67qu67qu67qu+4GGt6CmZohqKAIXNbQCo9o5AMWpnSuQ1M5ANaidE3BROy4DQe1E4KaGVmBUOx4oTn95edEzjcBZ74a3a+YuX98GPccFiKrcceWT9ej0BFRO0uvKf9ZXmQvAIvmZD8s0LXyYvYwl4KSQ2ZRzdLpz8VzY5CBbE3CIbErSJ6mwibLkqCKb5PQPl9hEGQpApipRX4iFKshO5F3x+pIvQPYyk7grXt/wBZhl5sRd1LciVZSViU3SAwlYnYzMVMXpAVeAJCNskh5KwCobjqpoRwEGmQhUZ+04A6NMBKqoHRGYZMJTOe1wQJYNKu2ikg1g0S4qmQjApF0TEGQhAJN2TUCQCSrtmgHZoNIuKtkogNMOR+VlYgKidkSqIBMjcNaOM1WQiQHI2pGpnGzcgKSHEhsZSUB2esBlqkVG3A1IeuDEZpKVSBX1rcjdSWYWIHt9w2fuksz4AmSvL/nMu4PsBKoc9YWYqQoQZCiyOTr9w/1iE6mcLEU2+ahPjplNPACTbIXCJv9+dbpzr78zmxJ0ApKM+YUP8/U682Hx0gwEmYs3/nOLkhyVnsClG5/cklMVgYueYxinwl2ZxkHvzsCoZwpBf3EZ8GpnBBY1tAJR7QSgOLVzAU5qZ6Aa1E4CJrXjMnBQOyNwU0MXIKqhCIuaCqNT13Vd13Vd13Vd13U/zx9tz0IcrkXWfwAAAABJRU5ErkJggg=="},fill:{rainy:{day:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAYAAADDPmHLAAALK0lEQVR42u1cW2wbWRl2l93EHoMoINpGULVL+oq0gjdeti+AhIBtc2ubpk1aiYd9YFkWLUhIKyIkEC9I1UogutGKFWV5KGib7tJSaLfpNWmcbJNsmzbt9pbGju3EnhlfkjiesQ/nPzMTTzweeyYZp778n/Rr0jS25fm+//Kdc2yXC4FAIBAIBAKBQCAQCAQCgUAgEAgEAoFAIBAIBAKBQCAQCAQCgUAgEAgEAoFAIBAIBAKBQCAQCOdBBlzP412oU0gDuwZoEHmguQfvRn0KgCjR3I93o54FcHHXJbwbKAAECgBRpZP8zp00XtpIAdDHvExfczPe/WdP/mY6xAlrmebXMgTC66UHdo3B49IDze8hAxWQ/Tki7YmAEn9Mutgs0sfssUu+1cpBCHELAtmsD2TNYQDpaxXBWjKfZf/FXeOFWkBQIDtnhczPgoL80awgJ2kQswiK8gX6d90oigoXgRXyg4K0m5L6N5XY1FxMJnwyS8SFLIkvZkliSYnYovI7gf4f/A0VgKw+5iw8BzLpoAigPTjkFnrNyFcyXr4CJIZjkgzEamRbDYEKIhyTM6oQzsBzIpsOiMBpAeSTD6UeynwoJqdji/aJzw9REQJUhAVaGXqQzTLYQtLrakif2taT6t/6znJ/02jq9LaJ1Omm88v9W3+98M+vvFJEBLv15AcE+a+QsZGEvG7i8wOeE54bXgPZdBCpD7b+MNW/LZT+z/al9P92Eunjb9BJvpmkz79I0ud2kOWz2wUqiIvi+1/8UrHn0chfS7m30xZoFZBQBA4h/WHTX1Jnvj6vnxHyY3GkkyRHfkJiw2/E+TsnXi00nQcEqZeSvwzlulzk61uC4hikY8jgesg/3fRO+tz2gqQnJ94k8/5hU6sW4GU/9HoQgzrplzXzDZUgqYlA3oNMrqXs/+urP0j925j58du/JcFojN3cuVjKYNfiql2DfsxKMS8v0L9NzMXlDSNfi/k4E0AS1wvsDoPHXS/Qnh7UE5++8i0SeXKO2B3gIBPphL7h5Gsxy4NNxFZgC8sfbDlIB7uURn7qxo9IMCKSkLBEnLBtGxlaK8A1Aju9/9S2P6b/u2Ml80NzfhIWU1VFvD5ghZHOI6/XLaHaGb7C0XzK0P9PN11NX3iR/X/kyXmW+dVKvm4WmKlnAZhaONjVM7SA000+8PnJiV+y8lltZT8/YDBlQ6tAXqpLAcC2rbosa4hCW7q0ApxNn99J5mcGyZy4WN3kr7QBKQ1rEdjgLa38bXkjNfAdljUbsXBTbvKhAsAOYoCXhpBdKwLo3/J9/vbbiRCfrOqyH2fbyBnWwmAOoFVgFNm1iMjku/fDfKLKyc9FNJGF1ckkMmsRQX75w7lnuICznoyPL+YyX1zIsDbGJzOspSGzFhEQpaFybNmWO+Pjuqxn5KtXXl0QQmatVgBRGqxkAWikxwtkvD7zBZr5sEU8H8cKYI14Qe6mN+oEbKKEK7QFxLUwZHx2NfkLCvlQ/lUXcAMZNkE4Enw1GOGTyi6fcjCzkhaA9JZOn/Gx/IxXSWeZn8ww8iFCoizR9/Y4KGR+ExTIy7g3oILt1/NL5xjx1CrFFyvbz6+a7k0yXiv7CvngAJgA5KAo8/oj5wFBGgNB1O12MbzxWWH53iyfrtjlXsN0XyDjRQPpGUa6doWIqAGzQCQO1ywJxeQlKoQUDbHuDo4w8vnlyZCwlK3K6d6UfJrxusw3kK9eIeZiNOiVVob6O0xK3/B7NPOz1TTdA9miScbrM19PesRAusxIZ1cqABh0wzHWIuDwSBo+pFLz5MOuWCWu8+fIN/fzhTJe3+sh+03J12d+HvlwDYsZVQQ1foKIkj8QikmpSiE9YcPP83nTvZ70aEHS5Vzm60gPiznyQ6LSBlgIGfUEUY1+3Ew7oVsJ2W+0dqX9vGDI+GyO/MRq8vN7fXHyM3CIlV3h+DqdB57WbO+nNyJREeXesp/PGjI+akq6vKrXh7XML0B6iGW8vDIEqsfZ6VWrAjX4MTPa3y496yXe9fj5qI3pPlyg1+fIX5XxjPSAXgRMCPKJWqwA7KZWu5+3M90D2SGTjNdnPoRfDaUSyImaIn+GEM+z6P9O+/lC0/2cyXQf0md+XsavIl/Ike+PyivVgGJTzQggFiNfhjdVbX7eznQfyu/1uowP5me8kMt2IB1+nolKNJR/qwJ4AQXgmJ/P2vbz0VJ+Pl6EfDGX8UGTjNeXfSBeHzUnAHgz5WoBOT+fXZefj5qQXmi6L+7nC2d8wEC6xLJdy/ynEYk8hWstCoANgaIcdNoFOOXno3b9fKykny9B/urM18ifjkgrLaBW1wGkSvDzxXfrTPx8zI6fN5Luh4znC2Q8XCMK+dMRqAASgWSpRQHsgRvjxL7/evw8v14/H7Pm51eTn5fx0cLkP5mX4Dmkmt0ToDfHP7/Gz+uv1c/zTvh5k+nezM8HCmW8PvPzSIef4Qr/V9P7AVoVsDsMrtXP8077ebG0nw8UzHhjr8+Rr1yfzLPHSAFeulbrO4L9NORy+HmhHH5eLO7nAyZ+Pr/Xa6RPryJdIo/VmIHs5+VkzZ8ZhBNBAUG6HRKl9FpO35r5+TNjS+QX74vkzX8IbD3dcT9vcbrXh4H8yOqMV8iXWUuo2U0gUxHw0l16g2WtHZidvjXz8/rTtxGazd/8VYh4jwYJd2SG/KFfcMbPW5juzfz8dIFer2U8u84pP+f6fp190aRyMFT+u/5UcP50Lxab7nU9Hkjlevw0Zoi3Z5oc+XOohJ/P2PPzghn55n7eQH5EVsmXGfnM8/PyIq1Wibr+llF48zQCyucCMjKUbCAXSDYMeCZ+HgTgOfSYeLsfEe7QZ+TInwKG6d6uny803QNpU/6UJT+vkC6tZD4QD79nohGkZfX7BC/h5wR0QmCfDFK+3o3YCSCDO/SAxn3i7Zoi3W/7id3nKBWfPFwmrcei5Lu/j5DfnRLW81wz4PPxm8aL7x1sovG81eg9Odng6Zwi3ME7hDtwi3gP3HrXzuOtBNfzsNd7NERnjADhDk/PnKSvafc5kNlyof3k5zwHblPyP6UxTtwdY31Ov4T78HSf94ifzhhPabt5ROA18cZXkgD2TRBu/xjx7BstjwC6HvR5ux/T7H9APF33UQAVJ4COm4TrGKExTNxto84LoPOzPhgwvV33iKfzDgqg4gTQ7iNc+w3iabtOBTBcBgFM9XEH7xKu8zbx7P8UBVBZ6H3OA+S3XiNc61XS2Dp4nI6Sjp6pcx+40wcDJndggraZcRRAhfmGTe6WoXuelsvEs/cSaWjztVh4zHOu9vGvsYCfSwlg360+Zcb4hHg6RlEAldcGBne522681dhy/adWCPX0+F/3HgnGvD2BmKfz4c9LC2Csj6PEcx0+4mkfRgFUaiWw9Ge7Bz7feDhwwXt0li0fN3Y9uuD63oS3qAA6bvZxlHhP2yCNIRRAVePHU1/wdD/2cT3TBKyd++A9H/yuyCM2uVtHjsOACTOGu+UqcblQAFUtAHfXQx93+CFbPnZ33i0lAFfDXl+Lu+UamzHcrdcvOz1kIja6AtCs56inB2vn3n+rpACA8Ia2G69QEbzlarm+A29itVcAmvVc5yRbPnbvH7cgAERtCYBmPXh6sHZ0wEMB1J0A9o37uH03qacfIe72ERRA3QmAZr2nA5aPh+lQN4wCqDsBtA/7uPYhtnzsbh1EAdQVvv0R19jqu+Chnp5rvUIa9175uNRCEKLG0Lh39DV3y9W4e8/leOPeodfwjtQj2icbWCAQCAQCgUAgEAgEAoFAIBAIBAKBQCAQCAQCgUAgEAgEAoFAVDn+D9Hl5sohMvW1AAAAAElFTkSuQmCC",night:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAYAAADDPmHLAAALvElEQVR42u1dXWxT5xkObCX2cSdVmnrVi03TdjUhVeu0adPU9Wa72EUL+QNCgMDVNLWBpNAAGyNAqXozqULaJBRN+6UXVGrRKM0PDkn4CwkpCUlsxwkBnNixk9g+x04IIec437738znx8c/xX+zUPn4f6dUJIbbxeZ735/m+L6asDIFAIBAIBAKBQCAQCAQCgUAgEAgEAoFAIBAIBAKBQCAQCAQCgUAgEAgEAoFAIBAIBAKBQCAQCAQCgUAgsgMhW977avLVxnbLj9+9NrK9pYVsxZtSAjjSNvKLpo6xfzW1jzmOdVo8J822QFO7ZQHvjM7R0DbyO0q6pdls9bT02Mn5W5PkIxpneibI0XbrdbxDOkX9F0OvNLVZPj9uti6c651gpKvjzzfGSVOH5SjeKR2i8droT49dtz1u6YknXolTN+yksW2sEe+WzvB+h6Wq+brNqUX8egXotpOGtrHdmzN3EgPPk1fUgUzlY9Drsv7kuNnmTUW+IoAjbaMn8vHvcPPk+7N86LCbl67O8tISDaIVbkEy0587gKLYaNlvt/yMDnppkQ8BA+HRDsul3BIvvkVJ/bdM7Mp8QCL+pTUiPFsjweU1svg8HIHl8Pd4+nfwM1QAkvyYr+A5kM0svD21eHy65DMXQAdD2i5u5C7jpZtA4lxAlIBYhex0g6eCmAtIIVkI1+A5kdg0cbTT8tmZJANfovjw5iStANbBjb42lHoo856AtBpYzpz42BDCQoCK8IxWhnpkNwUOd1jfpKXfnQn5SnzQaXU1dIy8ke1ru3jpH5Cx3kVpw8THBjwnPDe8BrKcbOpvt9w62ztBshEADIKN7WNnNkJ+NuU+k7ZAq4CIItDAH/5n+dWJLpsjG/IhzvXaCQgopp//mt7wd2Ayh68TTecuXmyh5L+Acp0v8tUtIewYxE+Q8Rg0dVo/Pt2dXfYrcbJrXLjxiL+gDHGJwuWXnNDrQQzypJ/XzI+rBEuKCKQdyHpU+bfaP7yZvQCuWOeJw7fKbu5CMLQaa9eCsl2DfsxKsV96Rn92cT4obRr5SiwEmQCWcL1Axol+23c/uG7Nqvz/5e4UuecIkEwHOMhEOqFvOvlKzPrBJmIrCC/8mCd+0Nxpnc2U/Iv3p8lTmvW0j5Nc2LbNDKUV4BoBCODayPaTZtvzTDN/cn6FuAWxqIhXB6ww0nnkCPr/DsvPT90Yzyj7+6eDLPOLlXzVLDBT8gJo+NL2y1Pd6QvgszEPK5/FVvZjAwZTeB/zPHm9pAVwpNPy+p+60hfAA+dSUZd+Rv56GxBXYS2itCtAp/VHx81WVzrkX+h/yrJmMxZu8k0+VADYQXT5xb6SFsDvrw6/1nzd5klHAF+Oz5MZ/2pRl/0g20YOsRYGcwCtAoOlPQSksQV8nu36TTABOPnVIic/Er7FNVidXCr5QfBoh/XzMwk2gs5T0mG7Fw6DwkZR39MAK5vFmPHB5UjmC89CrI35l0KspeFaQPtoDazlR+/zh8k/K5N/psdOhlyLedmyzXfGB1VZz8iXr355QajkBdBisbx8rNM6dl4u9+co+RBne+3sxA8c+zoNAnAWtgAU0oMJMl6d+TzNfNgiXghiBYi0gXZr8x+7xp9DuT8nZzycDjrdbSefPpwlPVN+tuEzV6AtIKhEXMavRZP/LEw+lH/ZBdxD9pVdwQ6rS8l4iEuU+EfzK+EFE/lgZiEtAKktnTrjA7EZL5POMn8pxMiH8AiSSN/bEzcfOg1nFkp+b+Bwp+Xt4502tjHUJ+/ywZZtcLmw/XzUdK+R8UrZD5MPDoAJQHILkl995NzFi0MgiJLdLqYlv9XiWQ5Re1Swy71x032CjBfiSA8x0pUrhFcOmAW8QbiuEU9Aek6FsEJDKLmDI6B6mgEjs4IYKsrpXpN8mvGqzI8jX75CzAdo0CutDKV3mJS+4X/CiZ1imu6BbEEj49WZrybdG0e6xEhnVyoAGHTnAqxFwOGRVfglFd2TD7tihbjOHyFf288nynh1r4fs1yRfnfkx5MN1TgjJItD5CSJKfrcnIK4UCumLGfh5f8x0rybdl5B0KZL5KtLnhAj5HiHcBljwIfkEkU5/3Uw5oVsI2R9v7VL7eT4u49ci5C9Gkx/b65OTH4JDrOwKx9fpPDCt295Pb8RiQZT7tP38WlzG+zRJl6J6/ZyS+QlI97CMl9aHQPk4O70qVUCHv2ZG+1vPN73EuxE/78tgup9L0Osj5EdlPCPdpRYBE4L0Hz1WAHZTi93PZzLdA9kejYxXZz6EU45wJZAWdXYcgLz0TfT/XPv5RNP9vMZ071FnfkzGR5HPR8h3+qT1akCxRTcCmCHECG+q2Px8JtO9J7bXqzLeHZvxfCTbgXT4esYn0gj/WRbASyiAnPn5tYz9vC+Vnw8mIV+IZLxbI+PVZR+IV4fuBEDfzNZ8tYCIn1/bkJ/3aZCeaLpP7ucTZ7wrjnSRZbuS+dNekUzDVY8CYEOgILlz7QJy5ed9mfr5QEo/n4L86MxXyHd4xfUWoNd1ALEQ/Hzy3ToNPx/IxM/Hk+6EjPcnyHi4esPkO7xQAUQCyaJHAeyAG5OLff+N+Hn/Rv18ID0/H01+TMb7EpP/dEGE5xB1uydAb45zIcvf18/Wz/tz4ec1pnstP+9KlPHqzI8hHb6GK/ydrvcDlCqQ6TCYrZ/359rPC6n9vCthxsf3+gj54evTBfYY0eUXb+t9R/AKDSkffp7Ph58Xkvt5l4afj+31CumOKNJF8kSOGch+v7Sk+zOD8omgMY8grmZz+lbLz18bek7evySQY5/ybD09534+zeleHXHke6MzPky+xFqCbjeBNEXgF230BktKO9A6favl59Wnb700m7c3e4jpkJtwB2fIx1f43Pj5NKZ7LT/vSNDrlYxn1/nw15G+X2IfNAkioG/8v+pTwbHTvZBsulf1eCCVq3fSmCGmegc5+DdPCj8fyszP81rka/v5OPK9kky+xMhnnt8vLdNqtVjSnzIKb56GK/x7ASEJSjaQCyTHDXgafh4EYNz3hJgOPCbcvkly8K+uuOk+Uz+faLoH0sadK2n5+TDp4nrmA/HwfSYaXnwhf55gD36GkEoIsA8+G/54N5JJABncvkc0JoipbpwcuOAkmT5Hqvh66gWp/MRHfvORl5z/gt/Ic82Az8dPGk++d7CFxrfTjZbLlm3G2nHC7bUSbs8oMe0Z/Xsmj08nuPqpFtMhD50xXITb75i5TF8z0+dAZvOF6svfMu4Zo+SP0Bgmhpqh1ly/hGG/o9V00ElnjGnabh4TeE288YUkgF0PCbd7iBh3DeZHAHWPWk0HntDsf0SMdRMogIITQM0DwtXcp9FPDFWDuRdA7WQrDJimOjsx1lpRAAUngOoBwlXfI8aqO1QA/XkQwHgrt9dGuNoxYtw9ggIoLLRsNQL5lbcJV3mLlFfevUhHyZyeqTPssbbCgMnteUjbzDAKoMB8wxZDRZ/dWNFLjDt7yLaqgYo0HrO1rHr4NRZlqf9PYsOu0dbwjPE1MdYMogAKrw3c/aGh6t6p8oo776VDqLHeecR00B0w1bsCxtqpxtQCGGrlKPFczQAxVvejAAq1EqT1Y291v1y+32U2HZply8fldY/NZb99aEoqgJoHrRwl3lh1l0YfCqCo8fb4d4wHngxw9Q4C1s6w1z4A30vyiC2GyvsXYcCEGcNQcYuUlaEAiloAhrqpAW7/FFs+NtTaUgmgbNvOgQpDxW02Yxgq7/TmeshEbHYFoFnPUU8P1s6wezSlAIDwbVX33qEiOFVWced7eBOLvQLQrOdqLWz52LB7OA0BIPQlAJr14OnB2tEBDwVQcgLYNTzA7XpAPf19Yqi+jwIoOQHQrDfWwPJxPx3q+lEAJSeA6v4BrrqPLR8bKu+iAEoKb1zlyisHzEbq6bnKm6R8582uVAtBCJ2hfOdgg6HiVtCwozdYvrOvAe9IKaLaso0FAoFAIBAIBAKBQCAQCAQCgUAgEAgEAoFAIBAIBAKBQCAQCESR4/83z0Ct1pYv3wAAAABJRU5ErkJggg=="},partlycloudy:{day:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAMAAAD04JH5AAAC31BMVEUAAAD/////vwD/////mQD/////gAD////j///v7///vyDwpQ/x8f/n7///vyDq7///vyDn7//7viTn7/v7vyT4sBb4rBX4rhf1qxPm7/z8vyP5rhbn7/zn7/z6rxj8vyPp7Ofu1qPm7/3m7/34rhb5sBfn7/3l7/v7vyT6rxjm7/v7vyP6shn4sBf6sRnl7/zm7/z6vyPm7/zm7/zm7/z7vyPm7/z7vyPn7vnn7/zn8Pzn8Pz4sRnn7vf4sRnn8Pz4sRjm7/z7vyTm7/v7viTm7/z4sRnl7vvn8Pvl7vvl8Pvl7vv5sRnn8Pv5sBnl7/v6vyT6viT4sRjl7/vm7vnl7vvm7/ns1Z3m7/zl7/zm7/zl7vzm7/zn7/zm8Pz4sRj4sBj4tBz4tRzn8Pz5th37vyPm7/z7viPxyXLm7vzm7/zp8fzu1JLl7vzm7vzm7/zn7O7l7vzm7vzm7/zk7vzo8fz6tx3m7/zn8Pzo8fv5th3k7/vm7/zm7vzn8Pvo8Pvo8fzk7vzl7/zn7/zo8Pzp8fzm7/zn7/zn8Pzo8Pzp8fvp8fzq8f3m7vzp8fzm7vro7/ff6vvf6/vf6/zg6/vg6/zg7Pvg7Pzh6/vh7Pvh7Pzi7Pvi7Pzi7fvi7fzj7Pvj7fvj7fzk7fvk7fzk7vzl7vzl7/zm7vrm7vzm7/zm7/3n7PDn7fHn7/zn7/3n8Pzn8P3o6uTo7vTo7/fo8Pzo8P3o8f3p7vPp8Pjp8Pzp8P3p8fzp8f3q8Pbq8fjq8fzq8f3q8vzq8v3r48br5Mnr8vzr8v3r8v7s4Ljs4Lvs8v3s8/zs8/3t8/3t8/7t9P3t9P7u8/3u9P3u9P7v9P3v9P7v9f3v9f7w9f3w9f7w9v7x9f3x9f7x9v3x9v7y1ILy9v3y9v7y9/7z9/70y2X00XX00Xb2y1r4vzr4yE36uB36uB/6uR/6uiD6uyD6uyH6vCH6wjL7vSL7viP7vyQuVIVNAAAAkXRSTlMAAQQEBQUGCAkQEBESICAwMD8/QEBHSkxPUFBbX2BgYGlpb3Byen+AgI2QkJiamp+goKKjpK+wsLKztba2uLu8vr+/wMDCw8TGx8fIyszMz8/Q0dTV19na3+Lj5OTl5+fo6+vu7+/w8PLz8/Pz9PT09PX19fb39/j4+Pj5+fr6+vr7+/v7+/z8/Pz8/Pz9/f7+PoX3VAAABONJREFUeNrtmOl7E1UYxYuKOtWCWrciFawKiEuRuu+I+74vqLgiikvdRQVREXFX4lRNQmtjkupFQ6qkdUk0bTSjkg7gJGM6KqPTcd+R+QO89860mcQ0mS304Xnu71OefDnvmfec3JupqiIQCAQCgUAgEAgEAoGwObHFCOufqEwY2QEU5fCRHuAkMsCmlhyzQ4kBdqquuH71nLzc54Ww+jzl4Mo/AEXRT7D/3HF6/dzz2IaCVGSCCfkT5PlXzscrqGk4shmoHD+e2lQTDOnXTgfz42lBkmVR4ONLwdG1lZhgzP++naLq15wMnuZlHdnnwVE1zk9QbACk39D8iCgXIDxzd31lqrj1ngeec8Fx++6ufrkz1G8EKbkIKdBYiTjuds19f/678e/fbzhhO+2bRsDLRckursAEB1ynqPz8w0174axPXiDIwyCAqU7rH/QbVv/xU7VvVzRQtcP5R/Cgzln9Xa9F8t+9DT5GhZOE1OI75/XKJUg2O/qLsNXVUH7D5/rM8VG5JM85uoQ9HlSUX99aJcrG4YGTPwf7/aFseOd92RTz97Z9/8Mcij6f8o/yxSpz+nJylu3LB2Yu+nzWxp+AaHIACYy1N8C4KRh8/h7z1ycfmdQfkB+e7FwG9vkFCGb1pfjpzg2wy63vmnz+A+vF5NkO1uDS90zqi6K45jYHBzgibsq9tF7sFzjg4ABnpMy4l0Sx/+v+tJMDnJYyqv49cg/9Z7KMcwOMb2qOGsv+gATdC1D/qywXP9Mh+Yl3gHhaNNQ86P4brJ7JcNzjl03a0YHzgDoW9EoGmw+z/62qn+XS7FPXw9v6uZNsHsvUJW+IhrOP3cPtcxzLsWxfH7P6s3vvv9HW1YS66EVT2Vf102vTWL+PYXoSYVtX1GkvmMi+0I/dc9j9aqgeT8R7orHIwumW9ccaOgIknH3YfOwebn+tqp9gepB+7MOFlm9HMx4ory7nms/B7EN1Fqn3Msj9B7FIVzi8Elj8v1Zb/gGg7g01n4fu1/Wh7TNo+5p+Z6hzweUWE3BLWf+55vPIPc4ek4Tbj/Zg9UgoDEBwBbD2b21mysCpp2v+ulz2Y2j7XeGuUCdY0QGCbzZZGgBkzTZfl/2uCHYP/QcDgeA8K/rbloxAsebj7Cdw9rsj2D3U7wgE/B1glIUBtgdmmq/LfgT6h+5DWD3oD7T7/GC0owOozRf0zWe15idU/XAnWKnqBwI+iKUBRhdfgYSzr28+i9Vx9rXmh7B7tP12f7vP29ZmaYCq2SlDzWd1zY9qzR/U90H/3ja339rlZNqSss3XTj21+dFc83H2Xw8g997lbk/rbEsD1AGpTPPTBc3vHmo+1PdD961Yn37M4mlwZbJE878sbH43zr7a/CBy3+rD6m7aa/UwqMuLYX7zuSLNDw82P4jct6Hte2gP3fLoqVaPw8OeKNr8TLHmh7XmB3Hz27H6qx6adrleu93y3ZC6cFHefVdtPj9M83PZ9+Hse6D/FtdLy4GNF4fUxU8K2n1XbX5muOYPZV9tvhttn3bRy1xeYOvFJXUIvBWj7AuD3ctrfkzXfDX7WvOR/iuulmXue262++K0/irwLMtnUPZ0zWcKmg8Kmk+/TNMtHt9DYKYD/w3qm+4C1pg11amX56O2tEIVgUAgEAgEAoFAIBAIBAKBQNgs+A9SuQ6+S8jjFQAAAABJRU5ErkJggg==",night:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAYAAADDPmHLAAAI9UlEQVR42u2cW2wjVxnHuxWVQOpDJdQnXhAST6hSBagVCAHPPEAfEOobfUQIdjdpttldWDbZ7SJekFDfqj5wLS+VSkW7je1cd4vYrqhYyGbGSbaludix49hzsZ1smjn24XxnZuKxPeN4fEnt8f8nfRpvLs56/t/1nGM/8ggAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAB0Budnfv7ugyfHYspXfnZz+ampKf4obsoIcH5m+Rvj8ZU/jsdWNi8klOzluaQ5HlP2cGciztmZ5e8J0ZXJOTU7tbTGb7z3gP9a2PTSOp+IqbO4QxHlhb/de2J8Rnnz4py6d/3WuhTda79aWOXjcWUCdyqCjN28//ULs8n/TS01C+/alYU1PjazMoa7FTFejCs/nJxNpoKEP84Ai2v87MzK86fTd/LP6jp/wmtQqh+N3rz61YtzyfxJ4rsOcH7m/qV+/D8yOv/ijl45l9HZ2zs6KwvjQZYx2Jz4uR/DKbpN+zHlGdHotSU+GTWEE3Hl9d4Kb31XiPonR9jDnMm4Vq5yY7/KiwdVXnpom3lgf00X36OfEQ7AnN95l54DanYw24sRT29XfDkFiMZQlIuF3kU8u00i7poWI2Fdsds1XTjErskqjiPcpOeEsG0ykVDemG7R8PnZy7cfiAygftDt36ZUT2k+a7Ij8yC88I1m2I5AGWFfZIYXoO4JnIur3xapPxNGfNdeSqjps/Hlr3X6t9M6+z1FbL7Euha+0eg56bnpb0DlVl1/THnv2q113okDUCM4FluZ7kb8TtJ9mLIgsoAFJwjgp39XvnVpPrnZifhk12+tcXKghnr+HXHDf0CdOT32687TujUlxP+E0nW/xPeWBHtisH4HxRsYT6i/ubrYWfS7dnl+1Vj4UH/FbeL8LK2xFNV6cgan0+9r5DdlgrLrBOw5qF6X/tW1l2937gBvqTm+WTiSN3evWDlqHNeKzrhG9VimYo3ti58t5Yrs1MR3ba8oHaCM9QKHS3eTn39pVu0o/f/2nx/x9zdNHraBo0gUHfqpi+/ajkZjIkqBvfAzt/6lyYS6E1b8V/+1xTdE1Is6znsxtp2muaUAawTkADeXn7o8l3wYNvIf5A55xrCGSniv0Qqj6EfOY/6PK89eWVgNFf13t4oy8odVfE8vsD3yDnD2neQ3ryy27wBvrGRl+hy2tN9o1JjS68jp/OmRdoDzCeXpX8637wD/TpWHOvVL8Y/LgHVEaxGjnQES6pcvzqnpdsR/5e6GjJrTWLjpt/iUAWgHMa1Zd0baAX7y9n++MDmbzLbjAO+s5vi2djTUab8ot5ErsoRRHyCywAej3QS0sQV8Q+76rUsHSOlHQy5+zQqlKq1Olke+EZyIq29O+2wE3RCi03YvHQaljaI7G6ZMm8MY8cWDWuQb+xVZxrRyRZY0rAXE7v+I1vLr9/lt8a854k8vrfF76VJftmz7HfFFT9RL8Z2r5iwIjbwDTCnK4xcS6soNJ91fF+KTXbu1Jk/80LGvq+QAqcF2AFf0ok/EeyNfF5FPW8R7RWSAWhmIqZO/mF99SOn+uhPxdDro6uIa/+t/d/jSR5rc8Nkd0BJQdK0p4qv14u/b4lP6d6aA96G+uysYV9NuxJO9LoT/MHdoL5g4BzMHaQHIO9J5I95sjHhHdBn55YoUnyxrMEu8to8zeuUqnVkY+b2Bcwnl+xcTSbkxdMfZ5aMt2+LBYM/zdd19QMS7ad8WnyYA6QAsYzDNe+Q8rVv3yCFGdrtYpPzXlOxBRYxHA7vc29Td+0S80SR6RYruXsnyjlEvkC/StcqzJnsoHOFQmDFyB0fI60UELO8YVmUou/tA8UXEeyK/SXznSpYzhYmryAyjd5hUvOA/0ImdYeruSWwjIOK9ke8VPd8kOpOiy6twAGp0d01ZIujwyBG9SSXy4tOu2CCu89fED57n/SLeW+sp+gPF90Z+g/h03TUqjhNE/ASREH8xa1qHgyJ6KcQ8rzV0917RC76is1rke0TfNWriZw27DEjTK84Jooi+3cw9oTsI0d882p08z+tNEV+tiV+qF7+x1rcWv0KHWOWVjq+LfmArsrVf3IjSQKT7tuf5alPEFwJFZ3W1fteNfB/RszLi2XET6BxnF1c3C0TwbWaivi192ku83czzhRDd/a5Pra+JXxfxUvS01wmkI7A/RzEDyJs67PN8mO6exM4GRLw38slSjtmZgJUidhyAP/Zp1P9ez/N+3X0uoLvPeiO/IeLrxNdr4qcK7DgbCM5ExgG2Of8cvahhm+fDdPfZxlrvifhMY8TrtWgn0enxdsESZv/bcYDH4AA9m+eroef5wknzfLGF+EYt4jMBEe9N+yS81yLnAOLFPNqvElCb56tdzfOFANH9uvvW87x/xKebRLdktLuRv5W3+BZdo+gAsgk0WKbXU0Cv5vlC2HnePHGeP0H8+sh3xd/MW8clIKrrANYgzPOtd+sC5nkzzDzfLHqKIl7ziXi65m3xN/OUASxOwRJFB3iObkwv9v27mee1bud5s715vl78hogv+Iu/sWfRc1iR3RMQNye11+H79Tud57VezPMB3X3QPJ/2i3hv5DeITo/pSt+L9H6AmwXCNoOdzvNar+d54+R5Pu0b8c21via+fd3Yk79jpTXrH1HfEXxLGOvHPK/3Y543Ws/z6YB5vrHWu6Jv1olu8Y8d26bo11g58mcGnRNBK1nDOurk9K0RONr1eZ5vs7v3WpP4+fqIt8VnsiREdhMo0Ak0KyluMHPLQdDp26B5Xj+Neb6N7j5ont/0qfVuxMtrzn5cq/sj9kGT5ATihf/Feyq4sbs3WnX3Xc3zlXDzvB4kfvA83yR+njniMym+nPk1diDSfmmkP2WUXrywtP2+gAojAUlcErmpwQs1z1e6mud39O7meVt06zjySXj6unQa3frE+TzBJXyGkMcRaB98x/54Nx5h26Y5H5803nrv4Iywz0TNoCwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIAT+D9Hg0OwytsHpAAAAABJRU5ErkJggg=="},cloudy:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAMAAAD04JH5AAAB7FBMVEUAAAD////////////j///v7//x8f/n7//q7//n7//n7/vl7/zm7/zn7/zn7/zm7/3m7/3n7/3l7/vm7/vl7/zm7/zm7/zm7/zm7/zm7/zm7/zn7/zn7/zn8Pzn8Pzn8Pzm7/zm7/vm7/zl7vvn8Pvl7vvl8Pvl7vvn8Pvl7/vl7/vl7/vm8Pvl7vvm7/zl7/zm7/zl7vzm7/zn7/zm8Pzn8Pzm7/zm7/zm7/zm7vzm7/zp8fzl7vzm7vzm7/zl7vzm7vzm7/zn8Pzo8Pvk7vzo8fzq8vzm7/zn8Pzo8fvk7/vm7/zn8fzm7vzn8Pvo8Pvo8fzr8v3k7vzl7/zn7/zo8Pzp8fzm7/zn7/zn8Pzo8Pzp8fvp8fzq8f3m7vzp8fzf6vvf6/vf6/zg6/vg6/zg7Pvg7Pzh6/vh7Pvh7Pzi7Pvi7Pzi7fvi7fzj7Pvj7fvj7fzk7fvk7fzk7vzl7vzl7/zm7vzm7/zm7/3n7/zn7/3n8Pzn8P3o8Pzo8P3o8f3p8Pzp8P3p8fzp8f3q8fzq8f3q8vzq8v3r8vzr8v3r8v7s8v3s8/zs8/3t8/3t8/7t9P3t9P7u8/3u9P3u9P7v9P3v9P7v9f3v9f7w9f3w9f7w9v7x9f3x9f7x9v3x9v7y9v3y9v7y9/7z9/6iGrUmAAAAYHRSTlMABAUICRASIDA/QE9QX2BvcH+AkJ+goqOkr7Cys7W2vL/AwsTGx8fIzM/S1NbX3+Lj5OTl5+7w8fLz8/P09PT19fX19fb39/j4+Pn5+fr6+vr6+/v7+/v8/Pz8/Pz8/f0OWzTaAAAEHUlEQVR42u2Zi3vTVBjGJxhgcxcYl3lBBUTkIjoFb6jzjtwRGDdBpGZqWzZX286P0nXDtlsb6SKYNnQRCFn+Uc456dasT7cmp2f1wef7/QPv9/Z735yTtK0NQRAEQRAEQRAEQRAEQZD/A6slwn8lvrZn6wA4vNrV+ik6tsCRbNGwbNs09OwleKWjte53wBXddlH+EV5e2zr9noHvTLsG4+oX3a3S3wQFuw4F2NQqfd2uS3lwJSdof66rnWW997hhL4EBG1dIvWuH07d3eqSOpfxTdOhckcx9CGdo4SyjMPjZoWl7GfID4p8I0gvuzOlpe1muCV/Cug9OmLZ3dBD8OJD6L9i+OLJe7AAvnfKnb+f7hep3g+lzAAvWiRxg22Gf+nP2qV6Rhw4YfvWt7OsCB+j90ufvP/fIzO8WOcBXPvVN0/z7E4EDvJj15d56ZM4aGggcYFfBj3vLNGf/nS2KHGBnwav6Y+qe+C+VFXEDdPUNpL1lf84i7g2if7+sZd8QJX8AskXTU/OI+wdMvVTStPNvbWgXcB5IW2Ha8th8kv2Hjn5ZK6rfv0du63s2NHksS29eMz1nn7kn29c0VVPVmRnlzl/ffPt+U1cTae8JX9l39It3i0x/RlGmcsmmrqibB31k35hl7jXm/g5Rz+ayU+lM6uQW/kuIpyPAYtknzWfuyfbvOvo5ZYrqZ/48yX072na0sbpdbb5Gsk/UVao+rVD3tzOpiWTyFnC+r3U0/gFo9xaarxP392bo9hW6/Yr+eGL8+NucCfi4of9q83XqnmVPyZPtp6eYeiqRBIjfBL63te0FD6eeq/n3qtnP0O1PJCcS43BzDOJ/9HENAGW/zXdlfyLF3BP/8VgsfohH/9llI1Cv+Sz7OZb9yRRzT/THYrHoGKziGGAN+Gm+K/sp4p+4TzD1eDQ2GonCGqEDOM033M1XK83POfrJcbjl6MdiEQLXAKvqr8Bi2Xc3X2XqLPuV5ieYe7r90ehoJDwywjVA28GCp+arruanK82f148Q/+GRYJTvcrL5QsPmV049p/npavNZ9n+PUffhG8HQ8EGuATrBatD8Yk3zJxeaT/SjxP0w05fPcZ4G7+aXaf4/tc2fZNl3mh+n7ocjTD0oh3kPg85FMVzcfK1O85PzzY9T9yN0+yE5JA+dfY37feBi3eaX6jU/WWl+nDV/lKn/GpLlQOC3T7nvhtK+04vuu07z9SWaX81+hGU/RPwPBX66AU18OJT2XzYq912n+aWlmr+Qfaf5Qbp9OSBfD4ShqQ+X0vPkVkyzb8x3b1HzM67mO9mvNJ/q/xIYuh78+qNmP5x2H4AfVL1Es+dqvlLTfKhpvvyzLA+FIsdgu4B3g+6+z4GP/o2iPp4/I/GA/+QgCIIgCIIgCIIgCIIgyNPBE1BiGfcjoLN5AAAAAElFTkSuQmCC","clear-night":{day:Lt,night:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAMAAAD04JH5AAACzVBMVEUAAACAv99wv994w9JwuNZwt9dxvNpzudlwutVwutRxutdwt9dxuNZzudZxudRyutVxuNZyuNZyudVyudVxutVyudRxuNVyuNVxudRyudVxuNRyuNRyutZxuNVzutVxt9RxuNRyuNVyuNVwt9RwuNVyuNVwudRyudRwudVxudVxuNZxudZxudVyudZyudVyudZxudRyutRyudRyutZzudRwuNRyutRyudRxuNVxudRyuNVzuNVxudVyuNRwudRwuNNwuNVxudVyudVwuNRxuNRxudVyuNVzuNVxudRxudVyudRyudVxuNRxudRxudVyuNR0udR2u9Zwt9VxudVyutV1u9V1u9Z0utZ2u9Z3u9dxudRyudVzudZ1utZvt9Rwt9RyudV0udV2utV2u9ZuuNRvuNRzudV1u9V2vNZ4vdZwuNNwuNRxuNRyudRzudR1utV2u9VwuNNxuNVyudVzudZ0utZwt9Rxt9VxuNVyudVzudV0udZ2u9ZwuNRwudVxudRfsM9gsM9gsNBhsNBhsdBisdBisdFistFjsdBjsdFjstBjstFjstJkstBkstFlstFls9Fls9Jms9Fms9JmtNFns9Fns9JntNJntNNotNJotNNotdJptNJptdJptdNqtdJqtdNqttNrtdNrttNsttNsttRtttNtttRtt9Ntt9RuttNut9Nut9Rvt9RvuNNvuNRvuNVwuNRwuNVxuNRxuNVxudVyudVyudZzudVzutVzutZ0utV0utZ1utZ1u9Z1u9d2u9Z2u9d3u9Z3u9d3vNZ3vNd4vNZ4vNd4vNh5vNd5vdd5vdl6vdd6vdh6vtl7vdd7vdh7vdl7vth7vtl8vth8v9h9vth9v9h9v9l+v9h+v9l/v9l/wNmAwNmAwNqAwdqBwNmBwNqBwdmBwdqCwdmCwdqDwdqDwtqDwtuEwtqEwtuFwtqFwtuFw9uGw9snzXEBAAAAgHRSTlMACBARGSAiKDA7P0BEUF9gb3B/gIWPkJ+gpKWmprCyub/BwsPDw8TFyM/R0dLT1NTW1tfZ2tzd3uPk5efo6+/w8PDw8fHx8vLz8/T09fX19fX19vb29vb39/f4+Pj4+fn5+fn5+vr6+vr6+/v7+/v7+/z8/Pz8/f39/f39/f7+/kqzfgQAAATgSURBVHja7Zn7X5NVHMdp+dR06hASukf37Gb3i93TLLuXXeyulZVppl3ongGbzpZjjRqtFNY2V4stGsFx5FhDxAVNobWEkC0IHxjIc/6GznnO40tgWz/4ep6zX877F358f8+ez+ec8zzk5TEYDAaDwWAwGAwGg8FgMI4eTq3OmVs1u/hiAMDlOdKrixeDZbFkqu3EnOhnXQge7RUg4uk5uXjwZ4FVPBQRgIa+v+D+dYNQYhBw1LN3ydoYhEcGoB6+Ba+nYA4HUC/5UJjgh0nKA6jvapvkp/0LqBevgnDKADRDqJr/ApwK1Rqe/qaQ0wHmAD7ND9fS2wnVoDfdD1+mdxacuy6DH/YuoOXXgMFMA6QArQvB+WGYkccLc/oDQBidT2eA017J7Ic8pWdwd3+WAeDzJXSeQCrbAINU9qKiD2BWnriIwgBXRrMPkAJa5QcAyewDwOgdih+J07KVkNxMH5unUniA4wD8P4Q7S3I5gCCM/vNIsbIDzHw/u//Q+OgI3wvylR1gWXb/2MgIzw/8BYqVzMHMh7LYhdHRYX5gKJE48MdyJZM4PXMGxoXRMZ7/F/sP9Pz54CI11RCi7I0NDx/kkb3/7779+2P7VoC5KsUGEDL7h4aIPx6PxaJ7dz+wqECZEY5J24gOjQ3j7A0k8Op74vHo3o7OSGTXiqduz+cobMV49dif7O/vw/6Y5G8N/RpYDubNlT8Ml0anNp9kX1x9V3cU29vD4ZZgoBnsWHgTuK2kpKAgf8aM2QXTZHoneGlC9sdHJH9fX09vPN7d3Un8oWAw8AsAPzfU/9Tw8C233vwaQEyX66WAn9D8YdI8nL2uWDTa0bEbr75lZxDZm/x+n+97j8vlcNTabS5wrEzP4IZYevPx6tHTj0SIvxmtvrHJ3+D1Ev+2GpvNfYFsV6JnDmfvID8gNZ9kb09kV7gltDMYCDQhu89X50V2Z61969bqassa2e4q6FoukOwPJZKiX2w+yn57uFX0A9Ff7/W4tot+G/I7gXzbwklvk+YNHm5+F2leWxjbm3H2kN3rdruwfZvN9mVVpXm1jG+OHOgR/VLz0c4jZr8thLPfDMjqve7tTqcd+6styO9YKue+WPRWgmSPND8qNb+lGa++0e9HdpI9vHqrxWIymUplfW1T3deZ1vxwMChmv7G+nvjtdpx9q9VsNpkMjiXyHgxaEMPZ6xabvwevXsxe4+Tm26zVFktl5adG/Tdglsz78anvxUjzOyLtxC8130ea76ytEf1VlSbkN78q/3vzmWDf5OaT7NV53VLzSfa2mAz6ik3PnaPAZ7JrAr/j7oVbQ0d2nsnNR36TUb+xYtOz1ylxM+DuDfyGmh+Wmk+y953LJTWfZG+zXl+28cXLlHlb4q7a0BqSTj1/A/GLzUdP31JF/DpdubH0CqUuZ6oz3gji7ImnXlrzDUa9vqLiky9Wn6fgDbkQgB04+1LzHaT51Raz5C/XuYGy342097zbgJpf55FOPan5W7BdV1ZuXX+10h9tVCc8+ZHfM6X5RtGv+2oloPHZTHUKeOdHj9h8m9g8k8Gg05UZHeuXFlL6fM4VXQs+9rm+rSF+/Weff+1aA67XqvLowWnPxrdOUPrDSvznxpO11P+BhafgjtdoNGqOU+UxGAwGg8FgMBgMBoPBYDCOmv8Af1nAznS4kJEAAAAASUVORK5CYII="},fog:{day:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAMAAAD04JH5AAAChVBMVEUAAADMzMzm5ua/v8+/z8/Pz8/Pz9/P39/f39//rxD/vyC8ycnJycnX1+TCzs7b29v3rxj/vyD6rxX/vyDFyc7T19zHx8/Hy8/Hy9PLz9PLz9fPz9fP09fP09vT09vT19vT19/7vyS/w8b5rhfCxsnW2dz8vyPT1tz3rxj8vyP6vyL7vyT3rxj7vyS/wcfBxcrU1t34rxf7vyT4rxf7vyPU19z5rxj3rxj6vyO9wMXT1t3DxsvU192/wsfBxMjT1tz7vyP7vyPAw8fU1tzU1937vyS+wca+wsfBw8nCxcrDxsvDx83Fx83Gyc7Hys/Hy9HJy9LKzdLLztPLz9XNz9bP0tfP09jR09rS1dvT1tvT19z3rhj7viS+wsf5sBn4rhj4rxj6vyTT1934rhj6vyP6viP3rxj7viPDxsr4rxfU1tz4rxf4rxj4sBn3rxn4sBr4sRr4tBz4rxf4rxj4sBm/wse/wsjAw8jAw8nBxMnBxMrCxcrCxcvDxsvDxszEx8zEx83FyM3FyM7Gyc7Gyc/Hys/HytDIy9DIy9HJzNHJzNLKzdLKzdPLztPLztTMz9TMz9XN0NXN0NbO0dbO0dfP0tfP0tjQ09jQ09nR1NnR1NrS1dvT1tvT1tzU19zU1933qhT3rBb3rRb3rxj3sBj4rBX4rRX4rRb4rRf4rhf4rxf4rxj4sBj4sBn4sRn4sRr4shr4sxv5sBn5sRr5shr5sxv5tBv5tBz5tRz5tR35th35tx75uB75uB/6tRv6tR36th36th76tx76uB76uB/6uR/6uSD6uiD6uiH6uyH6vCH6vCL6vSL6vSP6viP7uiD7uyH7vCL7vSL7vSP7viP7viT7vyROahjmAAAAdXRSTlMACgoQEBAQEBAQEBMTExUVICAwMDk6QEBAQEBAQEBAQEBATE9QUFBRYGBwf4CAjIyPj4+QkJOfoKCjo6amqKivr7C2tr2/wMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDEy8zMz9LZ3+Do8PHy8/Pz9/n5+fn7+/viUeF+AAAD90lEQVR42u3YXUgUQRwA8PE87/JEu7y3jFAqu0QzKDUqiSjoIXoxRVIrNUq0QAqECCJC8EUofKiQsC/NFD96qB4qMFAslV78oEQqe1F6UQ8/bu9Od6fZ27vjVnfWXZs7Uf573OzH6P1/szvzn7mLQOu8RQAAAAAAAAAAAAAAAAAAAAAAAACwsQGWzEeoYsC5foB9HaQ492P9AGmtpCjtW2dATRMAAACAzQ6w2OOGp9YAsKXNjjoZACwFN6npVg0gpun7zc7/B3iDUATeuovfqNMEyh9mBVAWpLSTIvc7NT4TgOVCJV1wOB0N9tHj1zUyeATIlqsiUJmmSfz2KSbDULdAR3xteUCnQE98jYlIl0BXfK2Z0C/IXv1DbT164mtOxT7B6sPKN2y1xtc+F0iCFWM+GnFKuUFzfB2TkS3nhnz9uctmP+s9eDs69Ss4NzxFDzq1xtczG1oSl8YCJ9bkKtR7JiaSHPIL74+i2jFHoC7Z+Ef7V4W1TcfRaVX9OXGGwLkw25lVM8qFbT0Qn288b112zfF6qXU6TAB79ZfLhhVXhYYjd0bDAki9a01QrJhw3BsJA8BenWClVDkm9N8D3YD4ekr7pXtQNh1iQHTxlisq1U9cz7nQAlJPlxjotXih5eNISAHWonwbtVJArqiZ9iZHKAFZmeXUOs7kwjxqHugPJaC8gHYDsIBdJg7xnrbHIQTE19sjFStIbJNLEJDT7JzTNxD0AQ4eK1N++qT1TlJyZs70pmskdIDCSzuU+54L8aT1HDF4+I5XDACWpO1BZ1PjM9JBcWGCQnyx9wmk/4l9QMCOTy+kim1Jwf1lctypB3Dioey09pm0v75iEGLSeiw+e857FxYjPc4+3/+WVMn+kvJjGgWwfOWVIu3adsbKw4t938yR0nsXkMfoxjgiT/UztAHKKrUAxNbzUt9DPF40eoiBMxuUAXX1egCHXspOr332AXabg67y5OlzgRIjd5SbjEQclaf4GCkLatooSA6O5PavBa/mJcj7nhhdfPaeSA8S74XbuBjR3aD0GfPjofiJhsEGAABsDMBWU4xaNZa9kL8UPLOMAHtvqVQK4guLJS9mAt+b915t+ckGcLxYNT72GbB0zPs9WOjtZgMozVZpPRYjIX/coPaT65ONbAAZFSrxMS9rv+9IUn0YYgOITUtU7HtY1vvwsj3Cc0MLkAcAsEkAsen7M1QSsbgaC4y+oGz4d3hwng3gQKV6JqbmoneDbACnClXi+7Kev+UyQX8XG8DJIloNT7LOyuiB5/G1hw1gz22t82BAIN2Xjt+MRoHBRFkHSG8UtPcfYu93ZsgDAAAAAAAAAAAAAAAAAAAAAAAAAGjY/gHH1SifSBndowAAAABJRU5ErkJggg==",night:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAYAAADDPmHLAAAHJElEQVR42u2dTYhkVxXH/+d+vHrV32IUDAqDwZBkcGiTgYZgwixiMIvgBF0YF5KVO0nZimQRGF1IAllMh+xmEwxZG12E6W6EHp2NuMmgqe7FBMagdASJxsHp6aqpOsfFq8/u193TH1X9uvr/g6b6nfduvZr3/9/7zj23Xw1ACCGEEEIIIYQQQgghhBBCCCGEEEIIIYQQQgghhBBCCCGEEEIIIYQQQggpLnKa/rGVq2tn4HUGABaePXuD8gNhZMVeuTUj9TvfEZMLJnhCgK8DChgAsTUAj1H+ETRAZbk66xQvo7bxXYhMBi+b0bs0OgfvBP+rNVDX5p8p/YgZ4KdLqxfV8EsxO+c97qYhlNPgIEDae1xDrSbmOPyPigEqV9fOONF3DPZUKcq9sRARnJTzjjUABispDTAaBphfql4y6M+DQzIeI6KXuNvxjaa1f/0bpT/BBqis3Jpx9bvXBfpIOYYwHv2+2i889ygNcFINUFmuzrraxvve4YtTaSl4oYinxgCV5eqsGK4HL2PTaXT71d6o98k1QCa+XU+cn5hKw4EqWBwstuNO0Nz+j6XgStMHFH/rzIHSnxADVFZuzTiTd4OX0lQS42HeK3YTBhrgpNwC/L2Ndwx4ZDpNPOU6ZSPA/OJqxQzPz6TxyJJ9gTWc2CylL7gBKsvVWYhdHk8Cgju69M05MROlAYpuAKd4Kzg0yuFoP2IaQhSTb1H6AhugcnXtAgTfHI/xyHOUxDtA8GBlucpRoKgGcK75q+AEcQBlPi+AE9l0houUv4AGqFxduwDIk+NxcBOUxEsKyPcofwENIKKV4OVeHGCRPw0egJ3lbaCQBrBnysHHQZ4jOEEQ1EXtMg1QvOF/PLjBf6zxJCYiciE7Jw1QlOH/ooPoMJZ4oxdE5zbF2Zs0QFEM4OS5JMjQPtNEKaQCOze/XH2JBigCZg8nfnglfy9AGhzM8OZpXSEsjAEqi6tfAoa/Zt8qNUdx+l5l5dYMDXBcw38I5fa9eajnBTCTxrIzPCS1O+/RAKcIa/+YYbIcJ8XJ3Pxi9W0a4DhoNL4qgA4v3TDAsldrXYjxGMoQvPSTxdWXaYBjwDupD0t8g0BhrREgiwcBxhIPEVuYX6y+fRpygqLdAnSwogNq1hn2zQDV/riHoBwCIPiB1DdWRt0EhTGAOb3bUBsbjPgARLJhHwK1zmNiPfHuSOCcoRxD4mEPS+3Ox6O8ZlCcWYBLPhlEgtfu2aqtHm/ZIKM7jADayg0AQxLjmBdJneGD+aUPL4/iaFC4WUDTjkb8TqKHbg9XILv39/Z4Qc/I0DJB540USfBJ9AIYfiS1Ox/PL1UvjZIRCvOsxCvX//K5+ob/93QpHqoW0E7wzKwlbq8Z+qd+yDlOd4ibGZpq9dZXTGyaySUz+d1Jf86wUA/LzC9VbaoUkRzAALuJ2jEF+u/1vcfdf3uBqsKAOoDEgBsCu6Yivz6JXztTLAMsf7iaev/oRBL21ePREse2iduf4NkW0Q/fXqCmtx1Qh8gDBvwXZh8AgIhcy9rJZ3CSGcOaZwRyRk2uLHz7sU+KcM2L9WCIuit16Bv3+7k6IuT27J57fzuem/Xv3n53UygAmWoic4cA0zCZg2jdTL4BMXNiEzAJff3N6e8B0ADb9bdrMISG2o7PAuT1zCzB60/4TK0rel/ip4drr1vbtxNMbbcvw1C21myjt70TQRoc0rKuchaQw8KzZ28I8M/NRnNf8/lt4vWIuj3rP772rdRm/fWnzv2HBtixFGhL95pW35rg9c3n0Z3P2x7z+a0VwP2217z2+6gn9G4HLw2YvAFCCCGEEEIIOTYK98VZN2/e/MJmQ74G+GT4Z2/kvewdb2818uNoAOqs1oz46OnHH/8XDbADf1396AUR+c0wz7m1omemWd0/J45WHSAv3qkIan68XW+A6AtPPzn326Jc86IVgn54XOKbWbbKt01865iiX3zrM0V3v+WaIjuHwtS+X6QLXqzFIJGHht/j76/nt3vwQXp+d79Bzb5cpEterGcDYX8Yvvj31/O7+22bKfbq+ara2m8Qw584AuyAR/qLhtVmIPaVAaifiai9q3forNxosx1vr/32iKz58WzTsnfKiQNA07Tn/PZ3K4fXOPcghBBCCCHHPPMqEGtr//h8E7W3YPY8RCaGd2bLqfBZZ+p2NJXB5m1A3k+8/nhubu5TTgNzaFrtVQhehAzHl8MtCsmUmb242ZB1AD+jAfLHo3ND6/MdsXRHE+zVww9WGdRC/Ze1xTKAWW0Yvf8wCz67id6/33YoB+N2kS55oUrBzuPKIHt8/4KP9mx34+2ybV68s6CTE8/f3/+aPT1i7zIJ3IX19fWxWq02kL8F+GzPwL4P2P3ILcHJyWb9/PnzG5x7EEIIIYQQQgghhBBCCCGEEEIIIYQQQgghhBBCCCGEEEIIIYQQQvbP/wHHp8taizA59wAAAABJRU5ErkJggg=="},hail:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAMAAAD04JH5AAAC9FBMVEUAAAAAAAAA//////9Vqv+Av/////////+A1dX////j//+LudFtyNvv7/+AuNXx8f9xxtl2ttGAv9t7wdzn7//q7/9xuNCExtnn7//n7/uHwdhqttOAvdtus9Ll7/zm7/xrs9Bss9J0uNWFwdrn7/zn7/xxuNKJw9iDwtiGwttstNSFw97m7/3m7/2FxNuEwtvn7/3l7/vm7/tzudWFw9x5udfl7/zm7/zm7/zm7/zm7/x2u9eDwtrm7/zm7/yCwdrn7/zn7/yFwtrn8PyEw9zn8Pzn8PyGw9vm7/zm7/vm7/zl7vt4u9fn8Pvl7vvl8PuFwtrl7vtwuNRtt9SFw9uFwtvn8PtqttLl7/vl7/vl7/vm8Pvl7vt7vdjm7/zl7/zm7/zl7vzm7/zn7/zm8Pzn8Pzm7/zm7/zm7/zm7vzm7/zp8fzl7vzm7vzm7/zl7vzm7vzm7/zn8Pzo8Pvk7vzo8fzq8vzm7/zn8Pzo8fvk7/vm7/zn8fzm7vzn8Pvo8Pvo8fzr8v3k7vzl7/zn7/zo8Pzp8fzm7/zn7/zn8Pzo8Pzp8fvp8fzq8f3m7vzp8fxqtNJrtdJrttNsttRtttNwuNVxuNVyudVzudVzutV0utZ3u9Z4vNd6vdh8vdd9vth+v9l/v9mAv9mAwNmDwdqEwtuFwtqFw9qGwduGwtuGw9qGw9uGw9yVyuCZzOKbzeG92u3B3+7D4PDP5/PW6PXd7Pff6vvf6/vf6/zg6/vg6/zg7Pvg7Pzh6/vh7Pvh7Pzi7Pvi7Pzi7fvi7fzj7Pvj7fvj7fzk7fvk7fzk7vzl7vzl7/zm7vzm7/rm7/zm7/3n7/zn7/3n8Pzn8P3n8fvo8Pzo8P3o8f3p8Pzp8P3p8fzp8f3q8fzq8f3q8vzq8v3r8vzr8v3r8v7s8v3s8/zs8/3t8/3t8/7t9P3t9P7u8/3u9P3u9P7v9P3v9P7v9f3v9f7w9f3w9f7w9v7x9f3x9f7x9v3x9v7y9v3y9v7y9/7z9/4uup05AAAAkHRSTlMAAQEBAwQEBQYICQsOEBISGxwcHSAwNjY/QEJGRkpPUFFaWlpfYGFhaWlqa29weXp/gJCZmZqfoKKjpKanr7CysrO0tba2vL+/wMLExsbHx8jIycrLzMzNz9LU1tfa3+Lj5OTl5+7w8fLz8/P09PT19fX19fb39/j4+Pn5+fr6+vr6+/v7+/v8/Pz8/Pz8/f0u+53JAAAE6UlEQVR42u2ZaXgTVRiFK4qoOOIC2roVtXWtSlGBuiMuLO77bhXcUOuuKItbBdxwQwVUcMVl3BfiVE1Ca2OS6iWkptUkbRJJR3CSMR2VcTp/vPdO2kxj2sxMppnn8bnvz/4538l3ztw705ISAoFAIBAIBAKBQCAQCAQCgfB/YFsKYpX46KrJdUDh1IriT1E2CcwJJwRJlkWBDy8Gp5QV1/108AQvq0g9DaaMLp5+Vd2DopyF8OTtlcXSnwDicg7iYEKx9Hk5J6n6oZygdO+KUpz16rmCPAACGD9E6hXTlb5dXUWVDeQfwYPyIcncDeAhVDhJiNffOrtTHoRonflPBOo4deb4oDwoS0xfwpjr54mydnhg8uOAql0o62LOoeYOcOICffpytNZU/Uog6hxAAmPMHGDqPTr1e+QF1WYeOkDQqy+FzzRxgOo7dP7+PZvF6IVmDnCnTn1RFH+72cQBjg/rci9tFrsFDpg4wFlxPe4lUez+szth5gBnxLWq/4PcQ//JVMy8ASpq6oLast8jQfcC1P8jxYXPMUt+JggnRE3Ng+7/wurJJMc9euW4UhPOA2oy6JQ0Nh9m/29FP8Ul2Mevhbf1i8cVeCxTly0RNWcfu4fb5ziWY9murtiGX+++97qCribUJfN0ZV/RT2xMYP2uWKwj4i/oijqxXkf2hW7snsPuN0D1cCTcEQwF5k8yfgnRdARIOPuw+dg93P5GRT8S60D6oV/mG74dTb0vv7qcaT4Hsw/VWaTeGUPufw4F2vz+9cDg+1pZ/h8Ada+v+Tx0v6kLbT+Gtp/Wb/W1zr3KYAJuyus/03weucfZi0Xh9oMdWD3g8wPgXQeMva1Ni2s49VTN35TJfghtv83f5msF61qA94caQwOAlN7mq7LfFsDuoX+vx+OdbUR/u0EjkKv5OPsRnP32AHYP9Vs8HncLGGFggFFAT/NV2Q9A/9C9D6t73Z5mlxuMMnUApfmCuvlsuvkRRd/fCtYr+h6PC2JogBG5VyDh7Kubz2J1nP10833YPdp+s7vZ5WxqMjRAyay4puazquYH083v1XdB/84mu9vY5WTiwrzNT596SvODmebj7H/vQe6da+2OxlmGBigHUp7mJ7Ka397XfKjvhu4bsT7ziMHT4JroIM3/Pbv57Tj7SvO9yH2jC6vbGafRw6C8Xwz7N5/L0Xx/b/O9yH0T2r6DcTAND88w/D6wKGfzk7ma708334ub34zVv3UwjM323S2G74bUpQ/0u+8qzecHaH4m+y6cfQf032D7ai0o4MMhdfljQvq+qzQf3nfZLz//4sf/NL8v+0rz7Wj7jI1ZY3OCgj5cUkfDWzHKvtDbvcSn77z3/oc/Kc0PqZqvZD/dfKT/ja1hjf2uGwv9cFo5EzzF8kmUPaX5H9P06jc+y2o+yGo+8zXDNDhc94NpJrwbVNbcBlR8RL/56rJPgBZqx5v18XxrKsPJK1csfX53SgND9Ll0x2POu2ifLSz9D832W+X++zY7WDrWsEPOP/ukXSwcYDeapt89wcIBDqDpt1edbuEA+61+/eUXz7VwgJFXLF/6zMFWpnDkvvvvOqyEQCAUm+HDrT2ADj/tgsOs7P5B8ACiD7TwBziWpt9addSW1k1w5AevvfLCERauYM+VLz337B5WpnDnvcbuRB4FBAKBQCAQCIXxL+Z71pyUXVv7AAAAAElFTkSuQmCC",lightning:{day:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAYAAADDPmHLAAALg0lEQVR42u1cS2wb1xV1gKRoV3Wbxrb8E0XJSZw6tuN8mjoFHKCLAkWKepVFUyDedGEU6CdAu+gmbhcFuigQdNUGKJLG+lGiZcltHCVOLSOx86ldpG7tFG2A+iNR/M8MPzNDcYZ8vffNDDkkZ8ihREkk5x7g4tGWSInv3HM/7z5qyxYCgUAgEAgEAoFAIBAIBAKBQCAQCAQCgUAgEAgEAoFAIBAIBAKBQCAQCAQCgUAgEAgEAoFAIBA6D7aw5V7aBZ9CWxhZAGP6wvAJ2g1/OgAzbHiWdsPPDnBx5BLtBjkAgRyA0KOVfCAAdngjHQCecwx+5lba/c0nfysUceJqqvnVFIH484oLI5/g84oLw68TA12g/iqR7TkBEP+KdnFYguccb5d8r5GDMfZ5UWRb7UasdRhI+mqdYDXK5+q/OPIPpxQQFVlgWSz9OCrqf14W9TwYc7OopL8L3/ciOUWXO4EX8qOi9iyQ+oZJbCGR0ZmQLzNJLrOsUmY51bCMYvyfCF/D7wEH0M3nnMfXICY76ASYHjrULZxyI99QvP4ekhjPaDoSa5Ht1URwiHhGL5mO8Ca+JrHZASfotAPUk4+hHsN8LKMXM0r7xNebZDgCRgQZIsMJYnMd2kJ2asvnimd3nCjMbn91ZXbgWmFux/XC3MCFldntv5Cn7/9uEyd41k5+RNRfQ8Wmcvqaia83fE18bfwZxGYHUZjZ/lxhdkes+NYetfhOgGl/DUIlP8yKF4ZYcX6QrZzfI4JDXJTGvvilZq9jkb+acN9OWoAooJETdAjFcwO/L7y5O2mvEepNufo9lr/6A5b5+KWs8Onpk07VeUTUTgH5Kxiu14t8e0owOgbtFWJwLeTPDbxanN/jSHr++s9Yculj11YtIuhLmOvRGcxKf12V3xAJ8pYT6MeJydWE/fAD3y78pVH52Ru/YtF0hm9uIlNoaNeyZruG+ZiHYkGX4Xtziay+YeRblsxyB8jTeUG7xeAfttwHOT1qJ7743hGWuj3P2i3gUIlQoW84+ZYtC9gmUipoCysz216Awq5gkV/46DssmpJYTFRZJ9q2jTQrFdAZQTu5/+yO3xbfHqwoP5ZYYnGp0FPE2w1PGKEe+YlvCbXu8Dnb8NmG/D838H7x3SH+9dTtC1z5vUq+rRZY9LMDuLZwONVrSAFzA3/DPj9//ec8fPZa2K83LEx50Sqyw750ABzbmseyDeY00oUIcL54IcCSix+whKT0NvmVNKAV8SyCErynk79tLxUWjnLVbMTBzXqTjxEAJ4gRQfuQ2PXiALPbviXc+F0uJuR7Ouxn+Ri5xFMY1gEQBa4Rux6RuvnH/8aFXI+TX7V0roynk3li1iOiwsq5xCYe4KxF8VmlqnxJLvE0JuRLPKURsx4RkbQP12Nku96Kz9pUz8k3V8E8ECJmvUYASfugmx3AIj3roHi78kVQPo6Ik1mKAN6IF/UXYaNO4xAl3qUpIGtZg+LLteTLBvkY/s0u4CNi2AXxVPRkNCXkjSmfcTGzmw6A7C2dXfGZesWbpHPl50ucfLSYpGvw3m5FxdLLUZEdo9mACT6vF9R5Tjy0Slmlu/v5mureRfFW2DfIxw6AO4AelXTBfuU8ImqfoEP4dlyMb3xZXPnPslDs2uPehureQfFSA+klTrq1oqVMw1oglcW1zGIZXQVHKIBJvrs4wskXVm7GRLXck9W9K/mgeJvyG8g3V7REBgxWiAz+u0wKb/h1UH65l6p7JFtyUbxd+XbSUw2k65x0voIDYKEbz/AUgZdHivghlb4nH6di3XjOXyXfvZ93Urw916P6Xcm3K7+OfFzjUsl0gj6/QQTkL8QyWqFbSM+10c8LddW9nfS0I+l6Vfk20uNSlfyYZKQBbmLJvEHUpx83s27odoP6G1u71v282KD4cpX8XC359bm+OfklvMTKV7y+DvXA3b7N/bARua4I9577+XKD4tOupOs1uT5uKd+B9BhXvF4pAs3r7LBaUaAPP2YG+e3SZh/xcvKzOZYR4oalrTXGH0uwSrimjLVe8V6r+7hDrq+SX6N4TnrE7gTcEfTT/RgBuLI2s5/PpSMsP/MUU8IHW5ocfoxJi1fXVN0j2TEXxduVj7ZkmhEJ9Fxfkb/I2Bc2I//X9/O5G68xZeYIU88909QKs0+x3NvPtybfMifF25Vfp/ga8sUq+UtpvRINAPf0jQNkMuzL+KY2u5+X548zFcht5QDy7DNMuHWlreo+Vp/rbYqP1iterKodScfHi2kNzPi36QD3kQN0rJ+HNbUIxD7tSf1ZU/1N+/lsE/KlquKjLoq3h30k3m595wD4ZtYrBVT7+XLTfj77L2/h31J/s+q+eT/vrPhIA+kaV7ul/Lspjd3FtR8dgBeBkh7tdBfQTj/vJfxb6m/Zz2da9vMtyK9VvkX+nZRWSQH9eg6gbUY/LyW8hX9Uf/rWZed+PtNOP99I+hIqXnBQPK4pg/w7KYwAGkOx9KMDHMeN6cTcv935fMZD+Lerv2k/n/HWz9eSX6f4tDP5t5MavobWtzMB2Jyl5Co/r7/a+bwARVzeQ/g31H/FuZ93qe7d+vmIk+Ltyq8jHR/jil/r63mAFQXaLQZXO5/nZ/gewr+l/pb9vNS6n484Kr4x11fJN9bbSf4cLSJol/t9IjgLpq/HfF50mM9LHsI/qj/1v8tNWjr3fj7i0s/X53qL9Ds1pGvslmmLqH5Bz/f9nUG8ERQRtRsxSSuu5vat5DqqdZ7Ptwr/XP3zz7fu5z1W93ZrID9Vq3iDfJ2nhL4dArk6gaD9GzZYt9KB2+1bt/m86DKfT9vm8+nE3Zbh31D/Fed+3kN179bP33HI9Zbi+ZowHlfzvs/+0KRxMVQftd8Krq/upWbVvcN8vv7sXvpn8/DPz/zPfZMJn4bBzrA0rGlcbxprClbLEndvttXPN5Cf0k3ydU4+7/kFXYGwn/P1XxnFNw8WMT4XUNKRQCSX9+/1BV6+ndu3EP7fah7+lbmvM2X6UW7y9AFYDzB56qtMmXoE1kdg3c/k0MNMCT3IpHe+31Y/b5CuVZSPxOP/c6cRtRXz7wleos8J2ByBfzLI+PNubK0WW77D8q0Of8AB1LmnDSdBO/sE2OMQNR5j6sxhppw5yNTwAZafeYJ14ncybRH7fPpL481nB/eA3bsWU0L7fyqHD2nO5B8FwpH4rzHl7JOceJ4qgHjlzGGmnjnElDBEBiBfCQ0vq1OPHlvr74NGzG4glKl91xrC/9xRQ/VAfK3iLfIPAfkHOfFqGFPBgzl5Ivhr2s0egzo2NKhMPxh3CvcKD/dPAumPA+lHbIrHcI/1ABA/jfn/IaZMDv+ddrMX1R8a/pEcPqhVwj3m+TlQvRnuVYdwj7keiVen93Py5YnhiDK6azftZg+iMLXvJqoZCznVDOuqSTJ/jAVeRfEHDNVPIfFGxQ8OlFIngy/QTvYo5NG9z8njwV/WmzIe/I0SGknYw73Kw/3DTMWQH9rH1NAIhP6hMO1iP9YG44FjyuS+pBK28jyoPvSQofpJJH4YLJignerXyDAx9EMVCQfi1Uq432cRz+TxwLI6HvwG7VS/1gahYBhaO6PC58SD6ieCYENgg9DyBajl6+sUMBn8rEI8qp4TH2DK+F6MANTy9TOyf9p1vxIKJqxwbxA/yOSxPRD6h6jl80UBOBFMctUD8Vz1Y7txpZbPLwUgki8j8eOg+rFdTEUHoJbPJwUgEF1R/ehOwyaHqOXzCxQsAEH18ugAkL8DIsBeavl8VQCC2mUgXjkNNraTWj6/FYCg+KRyehs4wAPYAVDL57sCEMP/G1+BInCQWj7/FYCDYRnVP7aTWj5/FoBDn6mj4ADgCLQbfiwAJwIJZYJaPt8WgMp4QKCWz7f5P3ByZSLwMu0EgUAgEAgEAoFAIBAIBAKBQCAQCAQCgUAgEAgEAsEX+D/a0S4xFsTcJwAAAABJRU5ErkJggg==",night:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAYAAADDPmHLAAAMHUlEQVR42u1cWWxU5xUOUSO1Uh8ipalaSMEeYhIStgAhCYlKpb5VVctDhSq1UvPYFbALYWkpNoSofahU5a3qQ5rg3cYsCfGCAUOgBIWW1njGGCcBL2OPx7Pc2e41vnf895z/3uu5M3Nn9YLn3vNJR/9g7LHn/853lv/8M489RiAQCAQCgUAgEAgEAoFAIBAIBAKBQCAQCAQCgUAgEAgEAoFAIBAIBAKBQCAQCAQCgUAgEAgEAoFAIBAIxYGxZb/7ePDpyg7ni78937u+upo9TptiA+xt732tqrPv/aqOvqH9XU7P4e7+UFWHc5J2xuLY3d77AyDdeaDb5anuGWAnPhlk74DV9Nxj+zpcF2iHLIo3T99+sqrd2Xaw2zV5/Mo9TrrR/nTpLqvqdO6jnbIgKs/f2br/Qv+X1T3pxOt25NIAq2zvq6Tdshh+3+n8yYEL/aOZiJ+NAJcH2O72vp8uTt3JvhoMsieNRkwtRKF30bX5YHe/Lxf5ugPsbb9zaCH+jvEgKxsLxveMB5UPx4JKFIxlsnFB6Ybv+wU5xVzDfodzGxR6eZGPhgXhvk5n3fwSL38PSP1AI3bKG1JYIDrDhNgMC4szLCKpFhLVrwXh//B7wAEU7Wc+xucgNovo7aHFC+ZLPu8CoDCEdHFp/hSvXEUSJ0KygsTqZOdrQXCIiZAS1xzhPD4nEZsn9nU5W2qyFHxm9vbVQYgArltz/d0Y6jHMe0LKdEgsnPhUE1RHwIgQg8jwJrGbA3s6Xd+F0D9eCPm6vdXlcu/u7N1S7O92B5X3ULG+iDJn4lMNnxOfG38HsZyt6u9wfnLsyj1WjANgIVjZ0VczF/KLCfeFpAWIAjI5QQb8+pzzjUMX+4eKIR/t+JUBhg6Uks93wIb/GCtzfGxWnbuDcjWQ/xDD9UKRb0wJascg/40YT0FVl+vPRy8Xp37dDl+8K1z6PPiuXsSZmTugjGKuR2fQKv0FVX5aJIjqTqDsJNaTwr9r4O2rxTvAGZeXDfmn+eZOhuPTqe1aWGvXMB/zUBxQYvC9EW9YWTTydZsMcweI0nmBhkM3+59664KrqPD/1399wT4dCrFCCzhUIlToi06+bmMBbBMpFagHP933HAe6XGOFkv/3z4bZA1A95HE2H23bYpqeCuiMAB3gfO/6w939UqHKH/ROsXFBLinijYYnjFCP7KX+v9P5ypFLdwtS/83hMFd+qZJvqAVGbO8Auz/q337kcv4O0NLn4eGz1MJ+qmFhiq/DG2SbbO0Ae7ucm/54MX8H+M9otKRDPyd/Ng3I03gWYe8I0OWqONjtcudD/rs3H3DVLMbBzUKTjxEAJ4jugHzD1g7wyw//u+LAhX5PPg7w0V0vGwlMl3TYD/MxcpynMKwDIArcsncRkMcI+ASf+t3jDjAanC5x8hPmj8zg6WTU9oXgvk5XW43JIOgEkI7jXrwMioOiGw9CPGyWouLDYkL5QizO01ggGucpjc4COu7swrP85Dm/Sv4xjfyangF22x1ZkJHtQis+bFA9J19bA9qBkO0doNrp/Pr+LlffCS3cHwfy0Y5dGeA3fvDa11F0gNGl7QA66WETxRuVHwTl44h4MkwRIJEGOlwH/nDxroTh/rimeLwddPTyAKv/3xjr+SLABz4TSzQFhHVLU/xMMvkxlXwM/1oX8Cmxr08FO11uXfFodUD8594p9cBEu5i5lA6AjC2dUfGhVMVrpHPlR+OcfDSPoMjw2u6PB+NH8c6C7WcDe7qcPzrY1c8HQze0KR+ObMPi0u7nk6r7DIrXw75KPnYA3AGUcUEJGK+cu4PybXQI246LIeT/w+kR49AeLdnj3rTq3kTxQhrpcU66vqL5NMNawBfGdYZ5QooEjjAFJtju4gh6PSigd0yQ4yVZ3WckHxRvUH4a+dqK5g2BwQqRwX6XSeEF/xNv7JRSdY9kCxkUb1S+kXRfGukKJ52v4ABY6E6EeIrAyyPT+CYVy5OPU7GleM6fID9zP2+meGOuR/VnJN+o/BTycZ0Q4poTWPwGEZB/2ROSp5YK6ZEC+vlASnVvJN1vSrqSUL6B9AkhQb5HUNMAt2Bcu0Fk0beb6Td0l4L601u73P18ME3xMwnyI8nkp+b67OTH8RIrX/H6OtQDw5bN/bARkSUR7vPu52fSFO/PSLqSlOsndOWbkO7hildmi0DtOjusehSw4NvMIL/1POojXk5+OMJCgQnV/Prq4Y8FWAVcfeqaqvh8q/sJk1yfID9J8Zx0t9EJuCMoJ60YAbiyHmU/H/G7WbRtGxNbN+S0WOtLTBj5bE7VPZLtyaB4o/LRRjVTI4ESsdh1APbEo8j/qf18pO89JrZtZtK517Pa1JltLNK5Kzf5upkp3qj8FMUnkR9MkD/qV2ajAWCZZRxghLGv4Yt61P18rGMnk4DcXA4QO/M6C9y/XlB170nN9QbFj6cqPphQO5KOj0f8Mpj6b80BniAHmLd+HlbfCBD7al7qD2vqz9rPh7OQLyQUP55B8cawj8QbzXIOAC/m8YVKAYl+fiZrPx++k1/419WfrbrP3s+bK96dRrrM1a4rf9gns2FcregAvAgUlPH57gIK6efzCf+6+nP286Gc/XwO8pOVr5M/5JNnU4BVzwHkR9HPC978wj+q33//mnk/Hyqkn08nfRQVHzBRPK4+lfwhH0YAmaFYrOgAO3Fj5mPuX+h8PpRH+DeqP2s/H8qvn08mP0XxfnPyH0zK+ByyZWcCsDmjk0W+X7/Y+XwAirhoHuFfVf91834+Q3WfqZ93myneqPwU0vExrvh/lp4H6FGg0GKw2Pk8P8PPI/zr6s/Zzwu5+3m3qeLTc32CfHV9MMl/RnYH5GtWnwieAVMWYj4fNJnPC3mEf1S/78trWVq6zP28O0M/n5rrddKHkkiX2X3NRlD9ASVq+TuD2o2gPo8gTxdz+1bIOKo1n8/nCv9c/R27cvfzeVb3Rksj35eseJV8hacEyw6BMjpBQO6HDVb0dJDp9m2m+Xwww3zeb5jP+73DOcO/qv7r5v18HtV9pn5+yCTX64rnq1d9nMj7NvugSXQCeOG1xlvBqdW9kK26N5nPp57dC73Zwz8/8z/3fRZwtYKdYn5Y/bg61dUHq27eYWdB/Xwa+T5FI1/h5POeP6CIEPYjtv6UUXzxYG71fQFxBQlEcnn/nlrgRQu5fQvhvz17+BfPvsbElvXcYi3rYF3HYs0vMrH5BVhfgHUtizU9z8SmNUzo+nlB/bxKujyrfCQev86dJig/1D5PsIc+Q8jgCDgHH1M/3o3N1TxjQyya6/AHHEA6+6rqJGint4JtgajxEpPaNjHx1AYmta5j0batbD7+Js1GsM+nTxrPPjtYBvaVuZjYtLYy1rpRNid/OxCOxL/CxNMvc+J5qgDixVObmHRqIxNbITIA+WLT6jGpef2Ouf49aMTsIkJsrriVFv7PbldVD8QnK14nfyOQv4ETL7ViKlgTiTU43qHdLDFIdeWrxJY1E2bhXuTh/mUgfQuQvtmgeAz3WA8A8S2Y/59jYuPqf9NulqL6m1bvjrVukGfDPeb5s6B6LdxLJuEecz0SL7Ws5eTHGla7xdoVz9BuliCmmiucqGYs5CQtrEsayfwxFnizil+nqr4ZiVcrfnAgn9To+BntZIkiVrvyh7F6R02qifWOv4hNz3qN4V7i4f55JmHIb6pgUtOzEPrLW2kXrVgb1JftEBsrJsVWPc+D6pueU1XfiMSvBnN4aaesGhkayn8jIeFAvDQb7it04lmsvmxMqne8QTtl1dqgydEKrZ1a4XPiQfUNDrBysFXQ8pVRy2fpFNDoGJwlHlXPiS9jYv1KjADU8lkZ4fdXPCU2Obx6uFeJX8Vidd+B0F9OLZ8tCsAGxyRXPRDPVV/3DK7U8tmlAETyY0h8Pai+bgWT0AGo5bNJAQhEz6q+drlqjeXU8tkFIhaAoPpY7beB/G9BBFhJLZ+tCkBQewyIF0+C1S2nls9uBSAoflI8+U1wgKexA6CWz3YFIIb/D74BReAqavnsVwCuao2h+uuWU8tnzwKwfFCqBQcAR6DdsGMB2FDmFRuo5bNtASjWlwWo5bNt/i/71cOGsqO0EwQCgUAgEAgEAoFAIBAIBAKBQCAQCAQCgUAgEAgEW+D/QLuIBerKn2cAAAAASUVORK5CYII="},"lightning-rainy":{day:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAYAAADDPmHLAAANyklEQVR42u1cC2xb5RVOGbS2o2lsjNJSSvMqz9KW5xhMK9q0TZq20SZNoA9oi4S0MsE2Jpg2CVGQQBtiE0LaNIgQLW2TJk3bpBtQKDSl76aFtvRBoZQ2D8eO4/hev64d35ucnfNf3+TGb6dJ6zjnk45+t/b1jf/vfOfx/79dUMBgMBgMBoPBYDAYDAaDwWAwGAwGg8FgMBgMBoPBYDAYDAaDwWAwGAwGg8FgMBgMBoPBYDAYDMbIA5oLLudZGKdQm8ua0UBrLl3OszE+HQB0K23k2RjPDrCjbCfPBjsAgx2AMUYr+aIitLkX0wHwmnl4zyt59i89+VdiEScNp5ofThFI94s0lx2h6yLNpauZgRxQ/yCR2TkBEv+auqNUxmvmZ0t+ppEDACySBFeajVkbYRDpw3WC4ShfqH9H2dFEKcAhQVGn1Pd7h6T9t1PSAmiQzByy9hG+bhk7RY47QSbkOyT1AST1nSixYZdXA0+gH+RgP/iUfvCHdPMq+v9J+By9Bh1Ai17zHr0HMzmCTkDpYYS6hVXJyNcVr+0iEru8qkbEGmRnahI6RJdX64s6wrv0nszmCDjBSDtALPkU6inMO71axKtkT3ysybojUEQIYmRYzmyOQlsIqwomRrZMWR5uvObN3saph8NNU46Fm6Zu72285q/BjVc9mMIJHjCTb5e0t0mxbr92wcTHGr0nvTfdg9kcQYQ3X/OrcOMUZ+T96aHIh0WgflyClXwpRLYXQ2TbDOh9b7qEDrFDXv+d76Z6H4P84YT7bNICRgGVnWCEENk69T/hd6/rNtcIsaYcWgyBQ4+D9+DTPs+ptSsTVed2SV2F5PdSuB4t8s0pQe8Y1NeYwQshv2nqm5Ft0xOSHjj2DHR3HEzaqtk9WgflenKGaKU/qsqPiwQBwwm0+czkcMJ+w9W/DP8vXvm+Ey+Co8crJtflDce1a75ou0b5WIRijxbE1/pdPu2ikW9Yt084QIDXC7ItBt8ouAJzusNMfGTXHeA+vw2yLeBIiVihX3TyDev0UJvIqSAr9G6evAQLu7BBfvjAr8HhlsEphWAk2raLaUYq4DWCbHL/lin/iHwwY0D5TlcHdMnhMUW82WiFEeuRP4xbQo0zfImtdEtc/m+aujvyUbF43n1+u1D+WCXfVAu0j2cHSNrC0a5eXApomtpCfX7g2LMifI61sB9rVJiKolWCuePSAWjbNrosG2eJtnQxArwX2V4E3e37wCUrY5v8gTSgRmgtghN8Rit/k58ON98nVHMxFm5Gm3yKALSDaPeo+5ndTBygcfIvPCde9zs9gTEd9n1iG7lPpDCqAzAKHGZ2M4T75FtfdXn8Y5z8Qevx99PqZICZzRAOT+9W1yVcwLkQxfuUQeXLwT6RxjyBPpHSmNkMYZfV/aOxZTvaiveZVC/Ij46e6IIQM5tpBJDVfbnsAAbpvgSKNytfQuXTFnG3jyNAZsRL2jKcqLW0idKVoynAZ1ic4vuHkh/UyafwH+0CDjDDSdDldqx0uD0BfZdPP5iZSwtA5pbOrHhvrOKjpAvlB/oE+WROWVPxs51zSH3POySYx3sDUYj9ek9omyAeWyWfktv9/JDqPonijbCvk08dgHAAzSFrHvORc7ukHiGHGLfbxfTBO6XeLzs9kZxd7o2r7hMoXo4jvU+Qboxk7qhRLeD20dgPTq8WQkcIo8nj7uCIIN/Te9IphfrHZHWflHxUvEn5ceRHRzKXFw1HjAzj7zApfuDVqPz+sVTdE9lyEsWblW8m3R1HuiZIFyM6ABW6XV6RIujwSIS+pJL35NOuWC6u8w+Sn7yfT6R4c64n9Scl36z8GPJp7JL7ok6Q5yeIkPxmp1cN5wrp/iz6eU9MdW8mvSch6dqg8k2kd8mD5DtlPQ0Ik/qiJ4jy9OtmxgndXFB/fGuXvp+X4hTfP0i+fyj5sbk+Nfl9dIhVjHR8HeuBtrzN/TgR/pwI9xn38/1xiu9JSro2JNd3GcpPQLpTKF4bKAKjx9lxNKJAHn7NDPPbzku9xCvI9/nB6+nSrccYneKxjKNMo1sfYxWfaXXflSDXD5I/RPGCdLvZCYQjaGvzMQIIZV3Kft7fY4fA5ntAaZid1oINt4PcfuiCqnsi25lE8Wblk3VETY8Emj+vyG8HsF6K/B/bz/tPvA3K5jsgtPX+lBZuvAf8H1SlJ9+wRIo3Kz9G8UPIlwbJ7+jRBqIBYkLeOIDXC9+jD3Wp+/ngtvkQQnLTOUCw8X7wnNubVXXvjM31JsU7YhUvDaqdSKfH7T0qmv7vqANcwQ4wYv08ju52JPbejNTvi6o/ZT/vS0G+PKh4RxLFm8M+EW+2vHMA+jCjlQIG+/n+lP2873hm4d9Qf6rqPnU/n1jx9jjSVaF2Q/ltbhXaaMxHBxBFoKw5RroLyKafzyT8G+pP28970/bzacgfqnyD/Fa3OpAC8nUdQL0U/bzsyiz8k/p7zu1J3M97s+nn40nvIMV7EiieRrdOfqubIoAKJJZ8dID5NDEjse+f7f68N4Pwb1Z/yn7em1k/P5T8GMX3JCb/fLdK76Hm7Z4ATk5H9zC/rz/c/XkPFnGBDMK/rv69ifv5JNV9sn7enkjxZuXHkE6PaaTn8no/wIgC2RaDw92fF2v4GYR/Q/1p+3k5fT9vT6j4+Fw/SL4+nu8W16h2j7on33cEG9G00diflxLsz8sZhH9Sv/ubPSlauuT9vD1JPx+b6w3SW4eQrsK5qLWT+j1aIO/PDNKJILuknnDKamQ4p2+T7c+/eyQEf1ovwzM1klhPN7Zq04V/of5tVen7+Qyre7PFke8eqnidfE2khLzdBErqBB71C5xgzUgHyU7fJtufN5++dWNdcdufnVD4mANsK9rhb42SWMTpcbWlDf+6+vcm7uczqO6T9fOtCXK9oXgxuvTHg3l/nP3QpH4wVFtnPhUcW93Lqap70/48FW625R1o7VC4vBVW/Nsp1C9/njr8izX/rT8Fz6kGtE3Qg2MPjSf10Y2jYa62k1n183Hku7Uo+ZogX/T8Hk3BaOUf178ySh8eza5/L6BPo7xN5Ir+PbbACyQ+fUsOYH3kHBQu+wZsj5yBFf+yi3Yu8H7q8K80/RCUjbcJC26cheMsCNbfCkr9LTjeguPNEKy7CZS6G0D+cKkg7XRHOKN+XiddHVA+EU//L5xGUnujvye4k78nYHIE8c0g/efdIBsjMmyPfI32FRQuPQ3LXu8AZ2crBNIt/qADhJru1Z2EbMtdaHdi1LgdQpvngrJpNoQaZkFg813w6dleqHitB372shte2iJBtn+jydqpz+dfGk+9dzAB7fJMbVX9yYnWxafBtuQU2BYdh8JFx99S6m7+Y7BhjpqY/PuQcCL+B6BsuVsQL1IFEq9smguhTXNAacDIgOQrdaWdofrb5tmWn11V+JgTaww72B5tba/He2bzN5Ixs6OFyvpvWRedQPI/RzsKlqoj1Ur9zMNx4b/pPl31SPxQxRvkz0HyZwviQw2UCm7wB2tLXqZbWB5trS5c0YE1Rhumm2+A7skTn0sO8NAxsD18BKwPHYa7Hm+sVTbe0JUo3Csi3N+NpN+JpN9hUjyFe6oHkPiNlP9vBGVD6afGLSxLv64uXHYO1f81WJd+xQ6Qcw5Q9RnYqg6hHYRXX3xyX7BhtjoQ7inPN6Hqo+E+lCDcU64n4kMbbxbkB2tL7cq6adcNOMDiM9VUYBYu/RKsi0+xA+ScA1S2gK3yAFgX7oWzq++WSM1UyIWiYT0UJVk8pgJvQPGzdNXXE/F6xY953x3aULLEfAvL4tPVtiVfgG3xCbA+/Dk7QG5h1WVWIr9iD9gqdsPKZ1/YFqwpeSHWlJqSvyt1ZS5zuA+JcH8ThCjk182EUF0Zhv7ihtg7WBadqqYC07boGKaZo+wAOdY3TLCU7//SWv4JWBfshIkLW8oTvSpUUzRP2TCzW2kw8jyqvu5GXfUbiPhStBJXomstDx2v1muMT8FadZgdIPfSwL4yy8IDz00q3/skOsRliV4SrC3+XYgIR+JDA+F+pkE8BGuKOkM1JT9K7ABHqm1IvK2qBayVB9kBcjUSpHo2XFfSgK2dXuEL4lH1tSVoxWTY8hW9nOxaS9Vn1TYk3rpwH9p+doCxCCzszgwQT6oXxBeBUnM9+GvKjqa4dIKl4tAbVGBSjWEp3w0FBewAYwq+NdOuUupKXEa414mfAcH106Ftzdzehlcrbkp1/cQFLeWW8j2ixrBU7P0kXbRh5Jr6qQCsLekWqkfiSfXK+uvAvmYWPPGXV84W/Ob0t9Oll4kLDzyITvBcQfneGTyjYwxUABL5QSK+ZjoqfxqE0AHq/rkILA8fbUnvAIwxjTD29obqlXXXCmtbM0csH2OBxw6Q71CoAETVB9dNRfKnQPvqW3t/8kQN9vSHwFJ5iB0g7wvADcWuIBKvrJ2CTjAt8PpLv+20VtHy8UEs6g6yA+R7ARhcf323snYyOsDV2PKVHLVUHmyxVe4Xy8eWin3sAHlfAFL4f+f7WATOsH/4yo9nTqpo+ciKPb2tYhdMWrDr44KfHyvkmcrbAnBGQ5DUv/7agV2+SQsOP2Up3+2zzP/EN2nB/qd4lvK6ACw+E1qHDoCOMOSJypMThTHyvACsLXIptcUuno1xWgAqNUWeZLt8jLzP/0Ure2uLnueZYDAYDAaDwWAwGAwGg8FgMBgMBoPBYDAYDAaDwWCMC/wfDVrVYhRsWzQAAAAASUVORK5CYII=",night:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAYAAADDPmHLAAAOYUlEQVR42u1de2xT5xWHbgXb2aRKXaeutCUE6JNXW/qu2mnT9sf+aCEhKVBaoNKktlspUCjQjRGgoK7qpgppk6poKrSQkBBebSlJCJAAAQK0QIidhPDKw4njOH77OsTX+XbOd+9Nbvx2IODY5ycdfS6JfeP7O7/z+M5nd8QIAoFAIBAIBAKBQCAQCAQCgUAgEAgEAoFAIBAIBAKBQCAQCAQCgUAgEAgEAoFAIBAIBAKBQCAQCAQCgUAYHBgb+f4PjfcsKdE//td9NZNzc9kddFNSAIv31zy/tLR2y9KS2qblZXrTx+V1jqUl+k66M0mORftr/gSk61eUG0y5FQ1sw9FGthFsbcVFtqzEcIDuUJJiwe6zdy3dr9+1stzQub7yIiddbf84VM+WluqX0Z1KQizZd2H68gN1V3IrgolXbPWhBrZkf+0SultJhg9L9bNWHKhrDUd8XwQ43MAW7a+dfWvqTqax2dhdaiOmhqLQO2h4cmV5nSUa+YoDLN5/YdVQ/B3tNpbeZvN/0G4Tv2uziW4wFs7a7WI5/N58coobDfsl+meg0IuJfDQsCJeV6rfdXOJ9vwVSv5aJ7TY7RGZ19zK7p5c5hV7m8krmEKR/s8HP8HfAAUT5OT/gaxCbg+jtocWzxUo+7wKgMIR0cejmKV48giR2OHwiEquQHavZwCE6HKJfdoR9+JpEbIxYVqbfsTZCwRfKPjnSCBHAcOZGr42hHsO8ySH2OIT4iQ80u+QIGBE8EBkWELtR8EGp4WUI/e3xkK/YR2UG46LSmqcGe22jTfwKFWtxiTdMfKDha+Jr4zWI5UhVf4n+6LrKi2wwDoCF4JKS2rU3Qv5gwn08aQGigI+cIAze+1b/0qqDdU2DIR9tfWUDQwcKyOevwA1/DStzfByqOjfafLlA/nUM10NFvjolSB2D7wtiPABLywyfrjk8OPUr9vHBevuhS7ZNShEXyoxWsRVzPTqDXOkPqfKDIoFbcQJxBrE+IPwbGj45MngH2GMws6auHn5zO53+nsB2zSm3a5iPeSi2ih74XZfZKd4y8hXrdHIHcNN+gYxV1XV3f3TAMKjw/6/jl9nJJgeLt4BDJUKFfsvJV6zNim0ipQJp46f8YsaKMkNbvOR/ebqZXQPVQx5nN6Ntu5WmpALaI0AH2Fcz+ePyOm+8ym80d7N2u29YEa823GGEemQx9f+l+mdXH6qPS/3VzU6u/OFKvqoWaEl5B1j0fd0Lqw/H7gA7ak08fA63sB9oWJji+zDb2LSUdoDFZfppfz8YuwP81Ooe1qGfk9+XBnw9uBeR2hGgzDBxZbnBGAv5m6qvcdXcio2boSYfIwBOEI1W34mUdoB3vjs3ZsWBOlMsDvB9vZm1WHuGddh38jGyn6cwrAMgCpxJ7SIghhHwBj71u8gdoNXWM8zJ77cuVy/uTrpTvhBcVmrYtTbEIGgDkI7jXjwMioOiE9ccPGwOR8U7hX7l2z1+nsasbj9PabQXUHIhB/fyB875JfLXyeSvrWhgZ42uIRnZDrXinSrVc/Ll1SpvCKW8A+Tq9b9YXmao3SCH+/VAPtq6ygZ+4gePfa1BB2hNbAdQSHeGULxa+TZQPo6IO50UAfrTQIlhxd8O1nsx3K+XFY+ng9YcbmD559tYxWUrH/h0JGgKcCoWpPjegeR7JPIx/MtdwEliX5kKlhqMiuLRtgHxl8zd0oaJfDAzkTaA1C2dWvGOQMXLpHPlu/2cfDSTXfTBe7vabvOvwTMLKT8b+KBM/+rKsjo+GDohT/lwZOsUErufH1Ddh1G8EvYl8rED4A4gtttFq/rIudHmO4sOkbLjYgj5eXqT4If2KGG3e4Oq+xCKtweR7uekKyuaRTasBSxOXHuZySF6wRG6wewpd3AEvR4UUNNm9/mHZXUflnxQvEr5QeTLK5rZAQYrRIbUO0wKb3gzntgZTtU9km0Po3i18tWkW4JIFznpfAUHwEK3w8FTBB4e6cEPqSQ9+TgVS8R9/n7yw/fzoRSvzvWo/rDkq5UfQD6uHXa/7ARJfoIIyD9scvi6E4V0Vxz9vDWguleT3hWSdLFf+SrSO+z95JvsUhrgZvPLJ4iS9ONmygndRFB/cGsXvZ+3BSm+t59810DyA3N9ZPL9eIiVr3h8HeqB5qTN/XAjXAkR7mPu53uDFN8VlnRxQK7vUJQfgnQTV7zYVwTKx9lhVaJAEn7MDPJbxe3e4uXkO13MYe2QrEtZTfyxHVY7rhZpDVR8rNV9R4hc30/+AMVz0o1qJ+COIH6TjBGAK+t29vOuLiNz73qGCcVTopqn+Almbzl9Q9U9km0Ko3i18tFaZZMigehKsuMA7M7bkf8D+3lX7VdM2PUk8377YkTr3vMMc5XmRCdfsVCKVys/QPEDyLf1k9/aJfZFA8DIpHGAFsa0+KZudz/vKZnBvEBuNAfw7HmRWa9WxVXdmwJzvUrx7YGKt/WrHUnHxy1dPjDpv2UHuJMc4Kb187BaWoDY52JSv1NWf8R+3hmBfHu/4tvDKF4d9pF4tSWdA8CbuWOoUkB/P98bsZ93Xogt/Cvqj1TdR+7nQyveGES6j6tdUX6zxceacU1GB+BFoF1sv9ldQDz9fCzhX1F/1H7eEbWfj0L+QOUr5DdZfH0pIFn3AXy3o5+3m2ML/6j+rqvHQvfzjnj6+WDSW1Hx1hCKx9Uikd9kwQjgYyiWZHSAGXhjbsbcP975vCOG8K9Wf8R+3hFbPz+Q/ADFd4Um/1qnD1/Dl7QzAbg5rZ2D/Lz+YOfzViji3DGEf0n9VaH7+TDVfbh+3hhK8WrlB5COj3HFnyX1PECJAvEWg4Odz/M9/BjCv6L+qP28PXo/bwyp+OBc30++tF7r5M/xGa2+Y8k+EdwDJg7FfN4WYj5vjyH8o/otV45FaOnC9/PGMP18YK5XSG8aQLqPXZWtBdVvFd1Jf2ZQPhFUa7L7egZz+jbcfH7fWS/7cJudLc+38f10ZVQbLfxz9ZfkRO/nY6zu1RZEvmWg4iXyRZ4SknYIFNYJrL46uMGikg7Cnb4NN59Xn761QF0xeYWJpb3dznQLW9ine2x8E6fL3Bw1/Evqrwrdz8dQ3Yfr55tC5HpF8Xw1S4/7836KfdEkOgG88a3qU8GB1b09UnWvms9j4aZb0ArWwtIWNLGF/zVx9dtrIod/vuf/7e+Z1VAMtpN1wdqFq15aLbAqZm7Wx9XPB5FvEWXyRU4+7/mtogDRypXS3zKKbx7MKH0uwC9i3kZyef8eWOC5Q5++RQfQvnmVpc2/wnRvNrKF/zHyds69P3L4F/Y+z4Qdk7l5dkyCdRLzFD3OhKLHYH0M1keZp/ARJhQ+xOxl8zhp9a3dMfXzEum+PuUj8fjv3Glsvuvy9wlW0HcIqRwB5+Bt0te7sXgMydC9eQnsIkubV8/mb2plprYm5o62+QMO4N37nOQkaLungz0FUeMJ5t01jQk7pzBv8STm3jWd/Xj5Osv6oov9YaOFbdhtY/H+jSprwT6fvmk88uxgJNjPY7XcIv0o7dx6pnvDwHRzLrC0ORf+JxQ+usRTPNUXmvwXgHAk/lkm7H6aE89TBRAv7JzGvDunMqEYIgOQLxSOb/MWTX5Ft+BybtrbJqgxjEz3VlNLEVwznr8RjZgdKmQX/Uw7pxbIrwE7xzQ5Z/OEoolngsL/3hck1QPxAxWvkD8VyJ/CifcWYyp4yOUpyNiIl9C81ZSXtrAVaoxmSDdXGF6TbnwiOcDr55lu9lmmff0Mm/7nPQXCjoc6QoV7gYf7p4H0p4D0J1WKx3CP9QAQvwPz/8NM2D7+R+USmnmX8tLmXwX1X2LaeRfJARLOAXJ+Yrqc02DV7PN17x/3FE/x9YV7zPN7QfVyuPeGCPeY65F4745HOfmegvFGYeuY+/scYG5jHhaYafMamHaugRwg4Rwg+xTTZZ9k2llV7PLmp22oZizkvHJY98ok88dY4PUpfpKk+iIkXqr4Ie9bvNsz3lBfQjO3Pk/3Rh3Tza1l2tk15ACJhdw7tEh+1jGmyzrK3v1obYknP2NtoAn5Gf8UCieY1eHey8P9I8yLIb9wIvMWToDQP6448AqaOYY8LDB1c85DmjlHDpBgfcNITeaJBm1mJdPOrGCjZp3KDPVb3vz0V4TtEzuFYiXPg+oLH5ZUvx2JHw+WYQ71XM3rF/KkGuNHps05Qw6QeGng+ATNrJOrR2dWvQ8OEfJ/Mu0pGPcXLxIOxHv7wv1EhXjmyU9v8+ZnvBTaAc7m6YB4Xc4pps2uJgdI1EgQ6afdhRnF0NpJFT4nHlRfkAE2Dg1avvSN4Z6ryfkpTwfEa2cdBztBDjAcAYVdYx/xqHpOfDoT8h9krvwJ5yI8daQm6/SXWGBijaHJPMpGjCAHGFZwbhlzt1CYYVbCvUT8WObZ9gBr3jLtevHnWY9Eev6omacyNZnHeI2hyaqqjBZtCImmfiwACzI6ueqBeFS9sO1+Ztwyib236rPLI16t/2W09DJq1snXwAlWj8isGkt3dJgBC0Ak34PE5z8Ayh/DvOAAhf+ewzSzz52K7gCEYY1u6O0V1Qtb7+PWvGUq3z6GAo8cINkhYAEIqvds/Q2Qfy9r2fz49d+9lw89/WmmyT5NDpD0BeD2cWYPEC98cy84wRj3pg3vtGlzcPu4Goq6anKAZC8APdse7BS++TU4wD3Q8mWc02RXn9Jln+Dbx5qs4+QASV8AYvj/+ldQBI41ln328sTRWafKtdDT67KOsNEzjxwc8cfzaXSnkrYAHFvsQfVvu69vyjd65plFmsyjTs2MSufomScW0V1K6gJwXKN3KzgAOMKAH2TrR3EjJHkBWJBuFgrGmelupGgBKOSnW8NN+QhJn//T371ekL6G7gSBQCAQCAQCgUAgEAgEAoFAIBAIBAKBQCAQCAQCISXwf3M1L0Upl+YkAAAAAElFTkSuQmCC"},pouring:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAYAAADDPmHLAAAJoklEQVR42u2dy28b1xXG5bS1ZoYt0AbIKot20W2BAv0Dmk27bCxKlGxZtiSvummaoii6CupNii6DAi0QaNFH2iy6idEgXbmIn5JFK5b8lhPbsizSpCSSM0M9bGsueXPP5Yw4fAzJEUl5OPx+wMHQEkmB9zvnnnPuvUMPDAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADBhXOu6Dr/rtswKiEmpfMfPNMLv07p7NNnOtsWxr0sZbDz4nmTcIpQCG+9JUT9py3siw2T8dx2kRs7RZ7fLfKt5yUzd0s/08Xv6DnCAZj9mv/Re2AkezLi2SUScd20GAnriN2q6cIh1k1WsB3hM3pPjGwPQFM9TfNpk+2Zu/6Frzaj5Ag0I+yImWEKIxxgkjr7G0VsZou1LXy10XvSe9PfwEgHWPyDTPd+0oKYBSw4weHm85+KAX+bKnN6XK86T+rWWSH+S5quuyW+OyWUOgbrA6jTNdHZpFPE1bNkjiUo15Mz2JV+VyO/ZibYdpyAHYNanS/g8jS4m/nCXnW7lrfbNcrHcirOsR3x3K2NPDs08R3bzEsH2MZ6QQegQRSD+YnfAo4iUVTohy6+Y89y1CYiFbTFhs5/LIQ3UyZ72Ym27TDNSQVYI2gv8tdEFFu9JLzbaIVRpK53oebBir3/pgxrr1fFd9UCa1DTv/hTNH322rRfbVSY0uegVAZVfVX87HNRvT/vafH304C1R2sRULX1xR3arOGHsXDTbfFpBqAdxGTOmoOyLS/bWmdF8bTTy9N+Xm4jF2QKozpAzAILUNaHA6QNa6e3xS9bdqtIq5PbULb1/H9u4xUu4LQT8fndcuQbOwWZxnLbBVkIQtlWZwDDmuvGlm23Iz7vinopvn3N2QtCULbVItCwZoPsAI7o+ToR7458XUQ+bRFv5jEDtNr70y7fR7SJsh7QFJB3rCbii5Xi75TEp+nf7gKuQeEGwgtLygUT+2BmkBaA3C2dO+LN6oi3RZeRv12Q4pOlDWaJz7aS0gt/oDML2BtwrfXbR7E5bdnmd4Pdz1dU9x4R70z7JfGpA5AOwERbm3MfORedziI5RN9uF8uNHsO6R1umQV3uranu60S8USN6QYruXMkytlEtkMnTtcjTJnsuHOGFMKPvDo6Q+CICbtEWb09W957ii4h3RX6N+PaVbMMUJq5iZui/w6TiA/+dTuz0UnVPYhseEe+OfLfomRrRmRRdXoUDUKG7bsoUQYdH9ugmldCLbx/wCNw6f1l8736+XsS7cz1Fv6f47sivEp+u60bBdoKQnyCiXb60ab0IiuhbPvr5XFV17xY9W1d0Vo58l+jrRln8tFFKA9L0gn2CKKS3mzkndIMQ/bWtXfN+Xq+J+GJZ/K1K8atzfWPxC3SIVV7p+LqoB56GNveLgdgKxHTfcj9frIn4rKforCLXrzuRX0f0tIx4tl8E2sfZxdWZBUJ4m5nIbxde9RJvO/181kd1v14n15fFr4h4KXrS7QTSEdhHYZwB5KD2ej/vp7onsdMeEe+OfLKEbaWZgG2FSvw1ztVXkf873c/Xq+43PKr7tDvyqyK+Qny9LH4iy/ZnA8G3QuMApslfpw/Va/28n+o+XZ3rXRGfqo54vRztJDo9Xstawkr/lgdixZjBATrWzxd99/PZZv18voH4RjniUx4R7572SXi3hc4BaDrrVgoo9/PFtvr5rIfo9ar7xv18/YhP1ohuyWh3Iv9pxuJP6RpGB5BFoMFSne4COtXPZ/3282bTfr6J+JWR74i/mrH2U0BY1wGsIPTzjXfrPPp5008/Xyt6giI+Vyfi6Zopib+aoRnA4hQsYXSAYzQwndj3b6efz7Xbz5ut9fOV4ldFfLa++E82LXoPK7R7AmJwEpsHvF//oP18rhP9vEd179XPJ+tFvDvyq0Snx3Sl34V6P8CZBfwWgwft53Od7ueN5v18sm7E1+b6svil65NN+RormbOuhH1H8Jww1o1+Xu9GP2807ueTHv18da53RF+tEN3iK7atUfTn2HbozwzaJ4LupBvc+t3o9K1XP//Z4nP+238b/Hcf63I9veP9fIvVvdtqxM9URnxJfCZTQmg3gTydIGfdFwPMnHTgdfrWq593n77NiGj+0e/TPHImxbXpNf6nc3pn+vkWqnuvfn61Tq53Il5eN0qPy3m/z75o0v4GkH+5TwVXV/dGo+releNJVG0qIWyNR6ZW+fRf0036+YK/fl73Et+7n68RP8Ns8ZkUX/b8ObYrZqutvv6WUfrw5fsCCoymbBKXRK4p8Dz6eXIA9dQKj0w+5tqpr/j0X5I11b3ffr5edU+iLSdetNTPl0S39iOfhKefS6fRrZf29wlewH0CLkeQdwaVvt6N+zESQzv1UNiXPDKxzCf/nOB+36OZffHoJR/+IMt/9scMf/8TvZ33WqM+H9803njv4JvV/2lDI5u9a76uji9z7eQ9rp24zb936s4//Ly+FXvjl0/ej5xJixojKWaaJ8m74m/6fQ8o2y1i//mGeuKOEP+WsCWujC7OdPpPKKdXZyLTCVFjPBXp5jGnv4mBD5IDjN3k2vFFro4tdMcBJh7ORCZXuHb6IVcnvoQDBM4BRm9wbfS6sHmujCx03gHGv5qhAjMy8YCr4/fgAIFzgFica7FrXB25KhxgvgsOsDyjnbzPtfE7XD1+Cw4QLM6+ppL4w1e4NnyZDw7PfihKySMddYAT92aowNRO3BRpZgkOELC+4YgSnXugRi9ydegCPzoSj7bwmtcGYktvSqPHzRxg7PZMqcb4gqujC3CA4KWB2R8qI9feG4xe/VUrgqpTiXcj0ykzMpU01fFHv2nuAIszmhBeG41zNTYPBwjqTNDS0976/NuDp5PnI2eeyeXjwYnH5wd+fjPS0AFGb8xoQnh1ZFbYHBygp/nF8nfUyZW4NrXKqbVTTj6I088avOKIMnz9QyowqcZQopf5wAAcoKcdQJl4FNdOP5LLx8r4/WYOMHB0KB5VoldkjaEMX73Y6SITHPYMIKJeEz09tXbK8dtNHYAEPzpy7W3hBO8NRK9+H4PY6zOAiHpt/K5cPlaOL7XgACBcDiCinnp6au1EgQcH6DsHGFuKa2M3RE9/nSux63CAvnMAEfXqKC0fz4uibh4O0HcOEJuPa7E5uXysDM/CAfqKn3yqDQ7Hz6uip9eGL/HBoUv/b7YQBELG4NDCO0r0cl45djE/ODT3DkakH4ndPSoNAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAoMf5GntkHYm7HEZuAAAAAElFTkSuQmCC",raindrop:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAYAAADDPmHLAAAHVElEQVR42u3dXYicVxkH8P9zznk/ZmY32c3mg2IqbZKdWYkaKwk0bhQCemG1VUvVGyu0UL0RpVi8UJMsu5vtBrHamyJ4UcGPFhG98aZCkWD2g0QQEUpbt6EN0oo1TdnsVpOd9zxezH7Mxzuzu8k4OzP7/8GyzPDOkDnnOc9zznlPZgEiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiKidpIfnTqWH506tp3bwG3bTz6ixrjZF6ACQAcA0e3YDGa79v8HgovPxXGuP85m+wsTs89v13bYlgGQH5/+gnX2pHUO1joENjyZH5v+/HZsC9luH3j/49OZnt3yRq53557y599buP623OzZ/9LI4ZvMAF2sd8A8F2dze6qfj+LMHh9e/yVLQLen/jA8am3t3Nc6h8CF9xbGZh5gCehChXMXeiVxf8/17NjX6LrFhfl/zd90d785cvQ9ZoBuivQl+6s4k9u33nVxnN27I1j6BUtAN43+0ZkvuTA8bq1d91rrHJwLTgxOzDzIEtAF9j3xQm5Xf9/r2d7e3Zt53eL1+avF3oH3zX1z8AYzQAfr79/1TJjJ7N7s6+JMdsAuvvMMS0AHGxqfud8G5gHnNr/jbZ2DM/Zz+bEL9zEAOrW+GXk2iuO+W319FGcGjHXPMgA6cfRPXPpJGGUG5DamOSKCKIz7CxMXn2YAdJD86NQxY+QhFwS3/V4uDAMr+PKh0el7GAAdwlr34zCKB5r1flEmu885+0MGQCek/icvfs2G4Yesbd5HM8bAOXdPfnzqYQZAOxtRA00moyjqbfZbR1Gmz4j9EQOgjRWCS09FYSb3/1lSAEEU5woTM+cYAG3owPdnB62VT7swDJv/7gpAEQQutmI/Uxg7fzcDoM0EGRkJwyjf9K5XLf14D6jCBcFhsdEpBkA7pf6xCwVjzEnrXJM735dGv+pqMFhrIZBPHnxy+hADoE2IdWfCKLyjWSMeZSNeva/IAOo9AufuDBL9LgOgLWr/+UEx5rhzQVM6X8pGvi6P/LUMUHreGIEx9vidYy8eZABssTAXfT0Iortuo9crRrwvG+n1MoCqwhg7lEX2EQbAVlP5qrvV2l9W21dGuJSN/JWMgJSMYEQhBgyArTQ0PnO/cy4rIrfQ9x4KLUv3pd8+5XH1dbq8LBSRKD82ex8DYKv+8TZ42AXhJjd+VjqztrarKkQB9WtlQVQBr6XFwPLz8B5QwIgOiCQPdXIbdvT/DVRf/JS12Y3P7lfTOaomeGvp3a9OBHU5A6RNBEuPRQER81lmgC1w6OzMR8XaZOOze03p/MravnJdRUaoCJLKzAF4CHQpP/qnIwyAlqcuM2xdMLDR9byvM5vXqlm/95tZFQBQ7ROxR1kCWh+5H6l3zFur0njlY6TMAepdpzWrguoyIoos1H6QAdBi3sgBSZ3glSZsvmJTp7a2127yrNX88iDw6muCojIIABgMMQBaPgPUXWKkznpeU9fzus4E8NYyh0AEexkArQ+AWMSsdlZ1EFSPXF83nddZBfi0zIGUiaBCFVkGQKvnACLO+wQisoFaXhYMirpBs7nMsfx8KQkFDIBWzwHgr6r3ByCSuk5PW8/X1vKNZo765cOrAMBVBkCrif2neg+xtiaNI6XTNjIBRKPMUd75vux9RSBe3+I+QKsl+jf19e/W+Zr1/cpjbXiXr/J1SN8HKN8sgmBJzF8YAC2fAxZfTJLiddTZ4ZN1dvhQZ4ev8jyAT5kAVpUNY98R8X/s2ESKDjZ0dvbdKAx2NmtTp97Er1H5kKjn2sunhncxA2zJZhB+t7J1Wz1CKzvNp3R+o8zhU4IhJXPAwCP5TSe3YUcHgBSLk8WkeC3tfr2v6LTa+/zpcwCk3Buofy9AgujfHvYcA2CLvHLqxCse+L33yXKnltb58Aqp6LTa+/y1S0dNKQcNMocLoWJ/O3dq+DUGwBb6z/zSt4reXyl1qpad9FE0OulTeSJo4yeEVk8E2fCy833f7vT26/gAuDL58Wu4qY8VPeYra3u9VUDaeYCyjFBRBlIyhwIS9bzrxT360sjhBQZAG3h5ZPgPHmZ8yeO/6rXOff60Wo7a2r5OBpAwsyDizsyd/tj5bmi7rvqWsPzY1GNW8JTRpKfxkjDtrl69JeFaJpEgu5gY943XRj7xs25ps677mrjC6PSjMDppkuKe9CVd40MhaUfFAYHN7JhX2CdePTP8025qr678nsDC2dkPQ5PnxfuD4pfCxps7jU8ImTAD2PAfRbEPXj49fKnb2qqLvyhSpTA2/R0Ivoek2AufQHyy7qEQqALGQYyBRLkFVf3Bq6dPjHZrK3X/l0V/8dd28Mj+x436rwDmLiQ3dqoCAr+2HwAAYgDVJYTxokAvJyo/nzs9/HS3/ymZbfUHIw5M/nmnFm8csYL3i9c7jGIv1Kg3/m0VvGl8cMV7/evcyL3zICIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiItoq/wNY+j77PS0jzgAAAABJRU5ErkJggg==",raindrops:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAYAAADDPmHLAAAKFklEQVR42u2d228cdxXH8wD8BTxALyqpvTOzd9tRhYoqxEVCgJCQkIBXJCSeQKpAVKkdJ3uZ2V1f1k4iEC2VeEFCqqqiil7ipnbWa+/szOzFXl/CQwRtIamTkjZN6tx5GM5vZtee2evMepy44vuRjlq19pG6n985v3Nm7PTQIQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAeCD8+/4VDsdznPMvHcrGc4LOBP6Ve5iVV8yqfIGklii18sp8BBEk5Hcmu3Q1NrdzgRfXZvebjU+qzoemVG5Fs7S5HufEJH2B8ovz1YKa8deT033UWQlq7xCfzh/vOly4/6U9plxr5ApnKFieqz+CTPqjVn1I+GDllymIxPLupCylV7fsqoWtkeHZjJ9/IqfOUT7uIT/pAtn71xWi2drshqxHhqdVrglT6jdt8nFg6Gp5evdacLzpTuyWkSr/DJ36AGEwq3whOVP7RLMvSutcHYsVBp/kOJ8u8P1Pa7JhvsnqBXTf45A/K1C8pV0ZOn9c7CRs+SVeBpJScXyXaCvueTvmMq0BSPsAnfxDkp7WX2ITeSZb1KuCl8m97yhe10ej06o1e+dh1w0vKH2DgIcJJpW8HJ8pXeslqBJvoB9KdrwIuVhT86dIlp/nYxiHQ9QMTDwk+pXzoVJZ5FWyw1bDS5RnCWrfW3/YqSKm4Ch6OfPVUJLt+380BMK4Cau+CpP2qTev/dThb23abj66Ce7RlTMPIg2z9ovpMMFO56lbWzlWQ1i4PiKXHdw5TMn+Y/tmVfvPRVXBFSMhPw8wD2/m1d0dOntf7FTY0u8HmgfndLULLD1ke+LiNEbo2/JJ6AWYeROuXSonwVO1Ov7IaEZqsfsSJhZ/Svf+z0FT1k73mi0yv3qSDNAZD+wib4APp0pW9ytq5CkTlY4HCs3zp0tZe3j2A3jv/a0Ozm7pXwkKZqj40s+5ZPvNqKb0MU/uAL6X8KDRZ+cRLWcGJimfyLVfLh7wo/xDGvK5+2rfZ3u2VqECmbLwt9PoAmM8GlH/BmKeDnzoeya7e8kpSNLuuhyernsu3DITX+ZT2HMx5wFdiuS8Jae2fXgoKZEr6yD7JN7sArYVp9cIjsdwXYXDPO7/6QnRmzTM54ekaVWhtX1r/EQr2TGDk5AZ1mJU71LlOwuAeGIypj9FUveWlKH9K20f5G0YMz64bEUipF/lY4RGY7P95/wvR7Jpnkljlh6dXvRFvq/hNnf3o2AgTT92KxVC2pocmKnfov2EWJvvgMbH4KJv8vZTlT2v7JH+9Rf5QdlUfml6hjqO+94RU+TKMur37U4oUye71rj5vDGQsaDL3ZPJv5LO3e5I+UyP5dfEUUZIfna5SFyjdpjnmeRh1fQDUrW4/5uWmQkeoPQfSJd3Nu/7mg2Q9TIZ8ymmt+GFW9dNm1UenqmZMVvTIRFkXkkU8F3B19yeL3w1OVD7t965vrtAoyQlmynr/+VoHPFO+veJN+RUjIpNlMyZKbBi8LCTV78CsQwIp7ZXozIZn7TlEVRjp45l/+3zrhvhW+VWb/GhdfmRC04NpVRdE9U8w67j9a9f73b/tFWq2Zzb8DTv8+YGRNgPecIcBz9ru7dJLejijmZFW9FBKoQOgXIVZZy99vkrt+qO97N/W9hyle9np9N8un326X20jv9JWfiSjGvLNA1BkP0Z+iUvIT8Fwz91fey7SbVd3sH8PWQay8ESFroCqy3wbHfNZBzxzyLNKZxWvGsGkGyHJRvjF4i1OLP4ShnvgT2kvd3zn72L/bsgKpak6Z9f6zmdO9ytt5Jc7yDcrPmyRHxSX6QAUdF6UX4LhXgdAUjbarWtu9+/GQMbWv3Y/9NFpwOuVb3e614wIZxoVT+2eYld6QQ9RBJPLFEu6P7Gk8y5+O+n/+eXPxeGd9/5t9u+T3ffvIVt7LtMB0Jr2/zb56CC1HCbK2S6fUfUt7V5pqviG/CUjAom8HojnaQ4ovgfDvR8AXetv/6627N/GDk6CjBbfNd9a13z2dq/Wq353wGMRlEg6BWv3LAKGfBKfWDTCH8/RFVC8BsO9V8CLrDqPeLB/M1GBlGYMds7zrXTN1ypfbiM/b8qPLxrhj+Uozulcsog/W6D3FaBcYsKc79+Vjvs3C39K1aMz6x0GxpqjfBFLvubp3l7x9XZfr/hA3BTPgj9BISr/huHeB2CNifFq/w5IivEiqHe+qqN8u/ILbeQvtpG/oAsn5nWB/l4Q5RUY7nUA0upfIlM1B/t32en+rYenVpoGxlVX+ZoHvGDzgEfhN9r9bsULJxZ0P4VwnOQff0fnjy/QFSD/GYZ7vwj6eShT/q9X+3eAZBmbQMd8FRf56lXfJD/Q1O5N+aZ4Q/74WZ2P5e+x30KC4R6wX9r0S+rVdgNepHkgc7B/m+uX0vVtnXXAC+20e9kc8Gz5li3S7QOeveLnSTrJZ+KPvW1GsvAfTiw+CsNOHgaJqhKpV+ee928KIVnQw5Mlu3yWsylf2GG+Xflmxfub2z2Jt8rnjp3VOVFehlmn10BC+Qmtb7dap/v+9m8/+yvJ7T+ffcDzNw94FLy13Y8z6XMkf07nxs5Q+1/cFpLFH8CsuyeCa6GM1t/+nbC3Z6M6qQuE0lqXhznmZN8xn02+vd0LTe2eGyP5FNzoGaP6+aRchlH3D4SeDkjqDetA1s/+ze5mo0Ip/KKsu8uX75jPNuDtyDcrnoVv9C06ABSx/MdcGq+B+7sKRHU2mFbud9q/g072b6ss1hGkot5fvnOt+ertnre0+135b+rc+Pw9LiFLMLmnQ6C8FSBpfe/ftgqlYF/fJV/zgNcrH2v3hvh6xfuef9MM1vrjy3+DQS+uA1GeC7SV5WD/btOejU5A14GzfAs989nlv6H76Gu4WO51mPMQTiq+KiSXb7vdv80KnWupUO5EThcSy037fK5ppeuW74y94o++Ycb4wn0uUXgNxvbjEIiFUZrmt4RGi+61f3dqz0dfp+mcvia2dEtIylcFdpW05Jt3kY/E07/zncjd5BJLuPP3kyfHi2FeLOaoG2zz7C1bl/3bGMgskgZZjLE5YGnbF1+aGxh7+/HDovyEIBVeFRKFbT6R652PiR+tt3qKAXYo4vmbXHxJHUyUgjD0wN4ZyN8iaeeogrf5eP4+R5XLUbvm2VO3eos2qpIq1zfGnsXn7vLJ4nVfYumVwZQaaJkzEsWwIBb+KojFT/nE0j3++DkzHwU3OleXP2d0Dt+xd9gdT/lkOkj5s/Q9X4ORh8UvKp/nkoXvc/HlP/KJ5UUuKW/yycL77IcvSNA6J8rzvsTyKTd/pi8fL3yTS+R/T9+/YOQwcrGchU2a7Be52OKLnKR8z9P/MRUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADf4HusXdtng0FO8AAAAASUVORK5CYII=",snowy:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAYAAADDPmHLAAALIElEQVR42u1dbUxb1xlu1HRLN7Xb0lWT9qF9/Nm0TMqq7N9abX8mVWqnVZr6b1K7qUvXjQApWbLQQMyXQ5V26q+1rJMyJek2IXUrIWCcAjY2ISTQhBgb7GsTgrHBBuN7r/lIwr3m7LzX9+KL7Qs2GGJf3kd6dW+MMfJ5zvO+73POsfPIIwgEAoFAIBAIBAKBQCAQCAQCgUAgEAgEAoFAIBAIBAKBQCAQCAQCgUAgEAgEAoFAIBAIBAKBQCAQCAQCgUAgEAgEAoFAFC4IIftYlnxZHTgqOsY0S74zxcbLplmxdYoVF2gQrZjmxE76vFdwUuiCeOHnlNTzMrH3Z3iRRBdWCLe4QmJLK2T+XiL4pcRjLP0ZPIdOAFH+nXZ4DRzJolS8aAMSw7wgArEK2dkGSydEmBfj8kRog9fEkS0CQKqHNB/ixWV+KXfiU4NLTATICIs0M7yKI1zACLLiOVBsZF7cMvGpAa8Jrw1/A0e6gMnfTLrPpSzQLCDgJNjZev4zOuC/gs4c7jN150FWMFDyH0C63i7y1SUh4RiE95CdbSNdfEVp4jJFMCoGoNbDZJA7/W1VflomWFAmgfgSspX/Bi4Ggzsbiy+n2rWYbNegHkupOCou0ufOz8TEHSNfidmYNAEWcL0gD4BBpIP5v1wbOFAi7dB3nHwlpqJgE7EUbAkzLPkxJZ6f5sUH+bBtOxlKKcA1gq0pf5KqWCgm4tUBK4y0dJUjm5tr9i5Nc8JysZKv6gUmkc3cyX8V0mexpf3UgMYU3geUMmQ1p45ftNDu/V5Rk79aBoRlWItAVrNf3IHNGrITCzfbTT5kANhBDEaFa8hs1su2goE2T4vFnPZj0jZyXCph0AfQLDCIzOYwAUKcsFjc5Cdjbn4FVicXkNns6/8nMw9xAWcrio8tJZXPLcalMhZdiEuNIDKbbQbghGvbsWW73YqPqVQvkS9fo/KCEDKbbRPICX2FPAEU0mMZFK9WPkuVD1vEszHMANl6f9jluwCbKOECLQExJdIUv7KW/MUE+ZD+ZRfQjwyvQzyNoLRgIh/MLKQFILWlUyueT1W8TLqk/IW4RD5EiBMF+t7Gp9n4aTizgHsDqrV++Sg2gS3b2FJh+/k13b2G4pW0nyAfHIA0AURqa6PqI+fU6dyCCbFrt4uljR5OGIEt00Jd7k3r7jMonksjPS6RrlwhInJALxCJwXWFhHjxHp0I92lwu+7gCJBPFeCALd6i7O41yaeKVyk/jXz5CjHD06BXmhl232FS+ob/CSd2iqm7B7I5DcWrla8mPZJGuiiRLl3pBIBGN8xLJQIOjyzDh1R0T758wKPg1vmT5Gv7+UyKV9d6UL8m+Wrlp5AP1zAXlyeBzk8QwS5fiBfuFwrp8zn4+WhKd68mfS4j6WJS+SrSw1yS/BCXKANSsHH5BJFOP26mnNAtBPWnW7uN/TybpviVJPnza8lPrfXrkx+HQ6zSFY6v037Ar9vaTwdiviDSfdZ+fiVN8XOapItran1YUX4G0kOS4sXVJlA+zk6vShbQ4cfMaH2zPuwl3q34+bkcuvtwhlqfJH+N4iXSg+pJIE0E8YIeM4A0qMXu53Pp7oHskIbi1cqHCMiRyATivK7InyTk8YdR//Pt5zN19zMa3X1IrfwUxa8hn02SH5gTV7MBxWO6mQA8T/bDmyo2P59Ldx9KrfUqxU+nKp5Nqh1Ih/vJOYFG4t/SgVg6ZjgB8ubnV3L283Mb+fnYOuRzScVPayhenfaBeHXobgJAOtuuEpD08ytb8vNzGqRn6u7X9/OZFR9MI12Q1K4o3x8RiB+uepwAUhPIidP5dgH58vNzufp5fkM/vwH5a5WvkD8REVZLgF7XAYRC8PPr79Zp+Hk+Fz+fTnoAFB/NoHi4RhLkT0QgAwgExKLHCfASDEw+9v234uejW/XzfHZ+fi35KYqfy0z+3VkBXkPQ7Z4AHZzA7CY/r79ZPx/Nh5/X6O61/Hwwk+LVyk8hHe7hCj/T9X6AkgVybQaz9fNAatLSpdT6fPh5bmM/H8yo+PRanyQ/cb07K/2OEIwKvXrfEfyEhphvPz8WWSJne33kY+cUieTTz3Pr+/mghp9PrfUK6RNrSBfIuByToP6ouKD7M4PyiSBnaJ2Pfq93+lbt58PcskQkKP3aOEuMdi/5YHBCegysnZ8V8ufns+zu1ZFGfmSt4hPki1JJ0O0mkOYkiAqjdIBFpRxonb7V8vNw/cfgXfIvR5Dcmpon5275SYONIW/3eknPHZaYmQh5f2Cc9E1wm/fzWXT3Wn5+IkOtVxQvXWcS98m6v8u+aFL+BpCL6lPBqd09t153T2v73z+7Sxqo6o1yNNg8NOi91Utq6WRo6GHI1XEuY3efk59ntcjX9vNp5EdEmXxRIl/y/FFxiab9+V39LaPw5pOfC4iLkLKBXCA5rbtP8fOg6v+OhImRkn7upp9MRJfJgD9Gano8NBP4yNDUwqb9/BS7NT+fIF1YVT4QD49Lk4YVHsjfJ2jFzwmoJoL0yaDE17uRbKPLFyH1VO3/cUxL5NwOLJLKrlHy16tjxBdZJrm81g7FJPh8/Kbx9fcO9qb+pw2Z4t1r4ydoCeBraKqvtriJwcp8XNnl6a644iJlJif5s9nV+7feO9/P5rV2IpDZ/M6SPXU9DG/odvNVXe5Lx82u2DFKfHmHixw1ObpK24dvvHbpNilpH3r75WbyKA6YDlHf6/6JweL/EdxXdDoOl3Y4SbnJ+eHvWnqfaPx07EslHY7f0pmyJ29/r2vq2zU2569phtqDo19geNM8+uLrrVTxJkfToaamvJ+mOdQ0+FidjWmts/mIsdPzHI54gcFgsewtbxs2lHb7DuWzzFT1eJ+hr73v7PnbX6T9xmdG2nDW2ryvwY/f6w9/zWD2/ABHX6c4Y/e+05BYT2gx2nznlfWGepvXX2fzGhtsPn9tjzuYzzKDKCAYrXeeo6r3wOJSg50hVP2TkAVg8anW6qWuw0OqrKPv4kjpudHs8X3L2MuMgvKrOjwHD9NeoNbq/qi620MMFt8xHCGdo9HuOUjVPwKloMbq/OWR9v4n37JQ2/npCDnVNWqA3gNHSaeotjK/oMoP1PYw5LTVTQn3cH/pHL1RYXaRozRKTE5Sah6+iCOl1/RvZ0qru938aYv7w8or7vePmV18mWmYlHU4O492DP/hjTbHyOstjgH6VGwCdWsv229/E65H+yYfP2YeGSxpHyaGTu8PpZ/19e03DE59AUdpN0yEZtfnyk2uy7+/PEQM/YlJgSh2Uu2jLzZcZV7I+vlU7eXtt36KI6cDnLweeMpo807WW5kAJfarOCK7xNPXWzzPvtzc/OjZ6+7vSos71N8bBpjvwWON9rFn3+qLfANHSo/pfnx8X4PNbZWOkNm8F412pl85TkavrjO9Yxdgxa+6m7Eeafd+HkdMh6iz+56nJAcV5VPiB+psni64h2Nk1d2jwVOd7udxpHSMxhveA3CGsN7mcRv6XPuPt7Q8YbAw7lNdI6S213sAR0jXIHsabcwLiRPEvsnaDufB2g7XgcpOt/945wip7B4BR4CLOnoENHk1VqYqsabPkKpuNyV8dOLEFWfgTXPiDCEs8pSZRk7Bc3HEdAbYxauzMx9UdXsChk73b050uT6q6HCR0o5hrsLkaio3u44cbh0K/LF16B08Q6hXJ2Ahe0+233wa7o//++bXS00OUnLZef1ku1d6jPYGTzcj+bsDZ+yOr/ypzeF+o80xeORi/5M4IrsyI1j24n4+AoFAIBAIBAKBQCAQCAQCgUAgEAgEAoFAIHSI/wMnpiPyEotcvAAAAABJRU5ErkJggg==","snowy-rainy":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAYAAADDPmHLAAAM4ElEQVR42u1de2xb1RlPR7vY7ug2GAIN0B6atGlMYlMnoWmgIU2T2HgM0qS0TUvKxGBsbZrSrozSBDdpQhHlMf4YdJlggrJNldgopXlAEjvOo2njtoljO36FNH7kVcevPAq51/l2vmu7vrF9E7txWtv9ftKn4zq+1/L5fb/vcc6xm5dHIBAIBAKBQCAQCAQCgUAgEAgEAoFAIBAIBAKBQCAQCAQCgUAgEAgEAoFAIBAIBAKBQCAQCAQCgUAgEAgEAoFAIBAIBELmAgBkXi98TWw0KzmMES98e9gb3DHi5Y8Pe/kpZiBlIz6+ib2uhJwiJ4jn7mWkvhsm9vNxPw+eqTnwTc9BYGYOJi+GzD8Tes7L/oavYQ7Ah6+pw3vQTGal4nkNkjjm53gkNkJ2suZlDjHm54NhRziB96SZzQJgqMcwP+rnZ/0zqRMfa76QI2BEmGaRYSvNcAbD5eXfQcW6J/klEx9reE+8N74HzXQGk3854T6VtMCiAEdOcGXz+S/YhP8WK3N8nKg6d3k5JSP/CwzXy0W+OCWEOgbudWJn2UjnSyJFXCJzeXgn5np0hnClv6zKj4sEUxEn4B8mttJfwAVwci8EgrOx7Vog3K5hPhZCsYefZq+dHA/wV4z8iF0ICA4wResFaQBOIpvM/6VawKESWYV+xcmP2LAH20RKBUvCuBd+zIj3j/j5L9LRtl1Ji6QCWiNYmvIdTMVcNhEvNlxhZKmrjNi8vGLvoxEfN5ut5ItqAQexmTr5WzF8ZlvYjzUsTPFzYCojVlOq+HkVq94vZjX5l9IAN4trEcRq8os7uFkDV2LhZrnJxwiAO4guD3eSmE162ZZTsuJpOpvDfkDYRg4KKQzrABYFtMRsCg4w6uOms5v8qE1MzuHq5BQxm3z+/3D8Ki7gLEXxgZmo8n3TQSGNeaaCQiFIzCYbAXzcyeXYsl1uxQdEqhfID4+e8IIQMZtsEejjOjPZASKkBxIoXqx8L1M+bhFfCFAESLb3x12+93ATZSxDU0AgYnGKn5tP/nSIfAz/4S6gixhegHhmLmHBJHwwM5MWgMQtnVjx/ljFh0kXlD8VFMhHG/XxHPtsgyPe4At4ZoH2BkRr/eGj2IBbtoGZzO7n51X3EoqPhP0Q+dgBCA7As7bWIz5yzjqdc+gQ1+x2sbDR4+OMuGWaqcu9cdV9AsX74kgPCqRHRjR32LAWcAdwnINRP3+ROcLnzHzX3MERJJ8pQIdbvFlZ3UuSzxQvUn4c+eERbdzPjI0sMlx7h0nZB/4nntjJpuoeyfZJKF6sfDHp7jjSeYF0YWQOgIXumF9IEXh4ZBa/pJLz5IcPeGTcOn+UfOl+PpHixbke1S9Jvlj5MeTjOOYLhp0gx08Q4S7fqJ/7PFNIn0yhn/fEVPdi0icSks5HlS8ifcwXJX/UF0oDgnmD4RNEOfp1s8gJ3UxQf3xrt3g/741T/FyU/Mn55Mfm+oXJD+IhVmHE4+usHrDnbO5nEzGZEeE+6X5+Lk7xE5Kk8/Ny/VhE+QlIHxUUz18qAsPH2dkYiQI5+DUzlt/UV3uJdyn9/EQK1f1YglwfJX+e4gXSXWInEByBfy8XI4Awqdnez6dS3SPZoxKKFysfzRm2UCTgJ3OKfAeA/Grk/3T384mq+3GJ6n5UrPwYxc8j3xsl3znBX4oGDKtyxgH8frgBP1S29fOpVPejsblepPiRWMV7o2pH0vGxY4JjFvq3cCCWzRk5QNr6+bmU+/mJxfr5wALk+6KKH5FQvDjsI/FiyzkHwHC2XCkg2s/PLamfn5AgPVF1v3A/n1jxrjjSOUHtEeXb3RzYccxFBxCKQB8/ku4uIF39/ESq/bx/0X5+EfLnKz9C/pCbu5QCcnUdgMuEfn7h3TqJft6fSj8fT7oTFe9JoHgc3SHyh9wYAThAseSiAzyME5OOff+l9POepfbz/uT6+fnkxyh+IjH55y9weA8uZ/cE2OQ4L1zm9/Uvt5/3pKOfl6jupfp5VyLFi5UfQzo+xhH/ltP7AZEokGoxmGw/j6RGW7qYXJ+Oft63eD/vSqj4+FwfJT80nr8gXMO5PFx7ru8IfsiMT3c/P+CegZfbbfCBfhjc6eznfQv38y6Jfj4210dIH5pHOgeDYXOg+j38VM6fGQyfCNKPLvDV74VO34r7+THfrEAkKv3koBdq2qzwlnZIeA5bO7uXS18/n2R1L7Y48t3zFR8inxdSQs5uAkk6gYfrZxPMR9KB1OlbqX4ex39oz8O/dC44NzwJ75yzQ7XGAi+1W6H1My80WtzwZvcgdA75Lr+fT6K6l+rnhxLk+ojihXE89Dia96+xH5oM/wLIEfGp4Njq3rdQdc9y+9/PnIdqpvqasFVrzMzYY7UVKpkzVLdaoGPQl7C6j9+wWaCf90qRL93Px5Hv5sPk8wL5Qs/v4WdY2J+8pn9lFD989HsBQR5DNpKLJMdV9zH9PKr6v8YxqGGkv3PWDkOeWei2B2B/q5lFAhv0DE9J9vOd5otQ+LobCl8bgy7LxaR365Lt50Okc5eUj8Tj84LTeLkvwr8nqKbvCYgcQfhmUOjn3SBZa7a54QBT+390IwI5vc5p2NvcD692DIDNPZvwGiRr3WvjoHjcAatLBqHwkPPSGvwVMAf2+fRL4wvvHayM/U8bEtkrJwefZSnAv5+F+gqVCZRqywd7m80tuz4xwI56Pfy50dD+t/bPvh973fNvT9z+lZIBrWKLFRTFRli9qU/7zNuu25N5z6UYMZteL1lR1WrxK1tM/vJm00d7Gg2B3Yz4sgYD7KzXNZfW9Z1+4qNe2FbX81LRUbhu3rXF1jXyYsNpxcY+UGw4B7KiM6fzHjJdT5OaZTjQbvqpUmX/ET7e1aR7srRBD2X1+trfHWu//uCnA1/d1qB7nHnKirgL7+paI1vfe0rxqBbkRV0gW9d5Ou/X1jWLvl/z8Lf2a/TrWIRaQbOfYXimsf+Bp44zxdfrDq89fHjR0zTy9WffkBeeBPm6NsgvOPnGYq9fe1i7qkpjOV6lsUFNk/kemvEMg1KlWll2ok9Z2mJbm9QF96pkjPjt+QUd25n686XSTHmr9Sfs3rKX3+1dzeqNMzWs4KzUWJ/AP7/eNXazstH8A5r9HMWLbdZD1aH1hGM1Gtu7kfWGAxqrvUpjranW2OyVrSZXwjRDyH7UqD+7h6nejItL1W0WYOp3YBTAxadKtZV1HWYoV/e/QjOVy4Vmq+32mnZLPyq/vMF855OsFqhUm96vaDGDUmXbTTOUSXhwWJHuWx5sM9/J1G/EVLBfrX9we13XmudVrO381Aj7mvuVWHvQxGcA8jc7tslLXE3y4sG/5v2sU56Oe1aoLb9iyndWtlrgBbWJEW72/aWp//SuRgPsZLatXg+ljX1HaPavNh7pv1Fe4nCs3moH+WYryDcZd6Ql/LdZSitaTP4XVKbavZ+Y3tzdaPDvqO+DHQ36pp0NfX94+oTO+NQxXTd7KRWBVxPygt7b5I8NgGKzGRTFBshf31ubtvayrvc2HHd2OuS7G43abXV9oGyy/lD4W2fnDUpt+tMO4TIcQLbRAIqNOpA/egbyC7W16X4P5VHDl8vqDR///uMeUHaFnIKQKSjquVX2aA8o1neDoqgL8gu630qK1Lb+B6o7LPcn7QRM7WV1535OE55p2NK7WlZ0Ri0v7AB5gbC0+9Bilzx3ynljjcbqOKC2OBmx36BJzHYUW9eseqTjcVnhmXsW6ukPqMx3Fx09et3Lp0zfERZ3WH+v7LZ8F5872DZw9/Od7ltpMnMQysFBWbXGpBaOkGmsR2raLF2R42RsNLzYPvAervhVtFjU2+sk9gYI2Y2qNtt9jGRXRPmM+O4qjbkZH+MxsoqWfte+JtN9kjfAMwO/MdySlwdfotnMUhw8bb0DzxAe0JhNyk7DDXuOHbteqbKY9jUbobLdeofkhZtt35NvdapkJXa/fJP1VXKCrASsOKix3B86QWxzVDbo76xsMNyxt8lk39NkhL0tRuwIEi7qyLYMVSi2DsHqxwYgv9hkz/tl1800n9nUKbIib7/aUh5a07dAeYuJEd4/9OwneuczjaEzhLjIs6PeuA9fG+cAm6y1ii0WUGzSg3xDL8iLzFQsZhNwF6+qzfJWeYvZqWwybX622fD+rgYDlDb0+XbVGw6XNRq2P3m8x/nH4z2H4s4QogNsNNbiQpNiw1lGfjc5QFZ2AipY+Vzd2Zvw8Z5/n/1mab0Otn2sP/VcnVV4jtUGNx1NQD5i1fqeQ7jQhMfI8td1+POKBm+hGc1ivNim+/qfTuhMT5/Qabcf6Vr0QOiqDdq7ZAVdw/ICDeQXdNTm3Qu0DZz9EUG1MqX9/LXaVaHzg3QEjEAgEAgEAoFAIBAIBAKBQCAQCAQCgUAgEAgZjf8D0emy/8DsU84AAAAASUVORK5CYII=",sunny:{day:Lt,night:Lt},windy:Zt,"windy-exceptional":Zt,exceptional:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAMAAAD04JH5AAACQ1BMVEUAAAC/v8+/z8/Pz8/Pz9/P39/f39+/v8e/x8fHx8/Hz9fPz9fP19fX19+/xcrFys/KytXKz9XP1dXP1drV1drV2t+/w8fDx8vHy8/Ly9PLz9PPz9fT09vT19vT19/Iy9LLz9XGxszMz9LP0tnW2dy/wsfCxcrCx8rHys/KzdLP0tfS1drS19zV19zT2N2/xMjEyM3GyM/IzdHN0dbU1t3JzdPLzdPV192/w8fFx83Fyc3Fyc/Hy8/Jy9HNz9XN0dXN0dfT193Ky9HLzdLU1t3BxcjDxsrGyM3KzdHMz9XP0djV1t3IzNDMz9XU192/wsfCxszGyc7HytHKztLMz9TR1NrS1NrS1tzU19zT1tzBxMjFyMzGyc/Iy8/LztTMz9XS1dzU1tzAxMjDxszIy9DIzNDIzNLKzNPM0NbS1NvU19zDx83Hys/Hy8/Hy9HJy9HJy9LKzdLKzdPLztPLz9PLz9XNz9XP0tfS1dvT19zBxcrQ09nT1dvU1t2+wMXFyc7Nz9TU193U192/w8fCxcvJzdHP09jU1t3BxMrJzNDJzNHP0djQ0tnT1t2+wce/wsjDx8zGyc3Gyc7Mz9bP0tnT192+wca+wce/wse/wsjAw8jAw8nBxMnBxMrCxcrCxcvDxsvDxszEx8zEx83FyM3FyM7Gyc7Gyc/Hys/HytDIy9DIy9HJzNHJzNLKzdLKzdPLztPLztTMz9TMz9XN0NXN0NbO0dbO0dfP0tfP0tjQ09jQ09nR1NnR1NrS1dvT1tzU193zOXH+AAAAlnRSTlMAEBAQEBAQICAgICAgIDAwMDAwMDAwQEBAQEBAQEBAT09QUFBQYGBgYGBgYGBgb3BwcHBwcH9/f4CAgICAgICAgICPj4+QkJCQkJCQn5+foKCgoKCgoKCgoK+wsLCwsLCwsL+/v7+/v7+/v8DAwMDAwMDAwMDAwMDAwM/Pz8/Q0NDQ3+Dg4ODg7+/v7+/v8PDw8PDw8PBclxvgAAADiUlEQVR42u2Y91tSURjHr6kUFZkltmlIy9KWadsoW1KWlQVt28N2VlRm2R60NSMiVGRPERBZ90/rHODyaDHyh5fzy/n85HM9z/P58p5x33MZhkKhUCgUCoVCoVAoFMrIEZDV81pYZTnJADIWISJYf+xnJYQLwArJrQAl9ivIFaCCJbwE2rD/KTm/OFqAMnIBGrG/nUd4D0rJFUAaDSAgvAS5PSgor5JfRsirygVZnQEx/lNYEw3D0VaTlaOpLCpDS1AgZ/9BnoUyyGIzwKtjk1IHvjuix7BE2MamoAV4HoSxTahMCBVSCUKqSDxQwp7RFcN+rkycqDhPLOOegh6SjUP0ir+qLeLKIIJeAil/aFl8FgDXQULfnlQibI/+8xEPdg2m9EcTRBCHoAKIuAApiyzE/nBYAHoOpl3oS8OIUANQAEl8/acbcx/5Q8EiyH44fUM8MxQMBQK1MAFiO12WflAD8g8+hAwgTj+oZDDg9/vGAwbIsMvzkX/AvwouQMYryT2/z+ethguQsSGtRX7vSbgAGW+l1T6Pp/8uwQCbkb+/mWCATR63u+8OyQDI33cbrh/JuAh3uV0uJ0wAyX9tw2bkd94CbAkzHER5TpfDYb8JfS9KzTzst9+AeRm8YtkIezj9mAN2u81mvQ51N46gnmtWuiHT7Q7kt+4HagpRvxUJX0o35LzdarVYzBuAeqJTyB8OLUk9YHHMb14EdT0Ph1DHFUjZcRXaLFaz2WQyToVqjBuwP/h+cgr/27jfyIcKkP8yGAj4B98lTTDxjdliMhuNBoMe7nJU9A35Uc9VmmT+rQn/Z8D7YQmyD3h9noszhj+fdhbbTQajXt/bexTyilzqG/DhnsOzZ04e9yx39m689jm/bjnoV4KSr95+/M7vc7kubK2sXF255VzC/mWtXqfr6SmA/VAy6Unc73Q6HDa71Yb9eO3rWwvWYf8n6E9FeQfdQ+zxnac36OtzmSu67m7tPvjPZeNOYL99mL8ebf5c5O/qWshkgcKdL/Bbh9t5rTui8z63q1ur1fCZ7DB25cbj15quNh1bv4JTnsH+5wwx+NrfWo1mG7kA27FfzSfmH/Va80ujPkKuAAuwX11MLsADtfqn+hk5/xTsVy0jF+C0WqX68TGHmH8C9qv2kivAGpWqs7NjDLkAxcj/nWABGGb+h47HOQxRRjMUCoVCoVAoFAqFQqFQRs4fIEhQiFOVe5oAAAAASUVORK5CYII="}};function ta(e){try{return e()}catch(e){return console.error("clock-weather-card - Error while rendering clock-weather-card component:",e),S``}}function aa(e){if(null===e||!0===e||!1===e)return NaN;var t=Number(e);return isNaN(t)?t:t<0?Math.ceil(t):Math.floor(t)}function na(e,t){if(t.length1?"s":"")+" required, but only "+t.length+" present")}function ia(e){return ia="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ia(e)}function ra(e){na(1,arguments);var t=Object.prototype.toString.call(e);return e instanceof Date||"object"===ia(e)&&"[object Date]"===t?new Date(e.getTime()):"number"==typeof e||"[object Number]"===t?new Date(e):("string"!=typeof e&&"[object String]"!==t||"undefined"==typeof console||(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"),console.warn((new Error).stack)),new Date(NaN))}function oa(e,t){na(2,arguments);var a=ra(e).getTime(),n=aa(t);return new Date(a+n)}var da={};function sa(){return da}function ua(e){var t=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return t.setUTCFullYear(e.getFullYear()),e.getTime()-t.getTime()}function ma(e){return ma="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ma(e)}function la(e){return na(1,arguments),e instanceof Date||"object"===ma(e)&&"[object Date]"===Object.prototype.toString.call(e)}function ha(e){if(na(1,arguments),!la(e)&&"number"!=typeof e)return!1;var t=ra(e);return!isNaN(Number(t))}function ca(e,t){na(2,arguments);var a=aa(t);return oa(e,-a)}function fa(e){na(1,arguments);var t=1,a=ra(e),n=a.getUTCDay(),i=(n=i.getTime()?a+1:t.getTime()>=o.getTime()?a:a-1}function pa(e){na(1,arguments);var t=ga(e),a=new Date(0);a.setUTCFullYear(t,0,4),a.setUTCHours(0,0,0,0);var n=fa(a);return n}function va(e,t){var a,n,i,r,o,d,s,u;na(1,arguments);var m=sa(),l=aa(null!==(a=null!==(n=null!==(i=null!==(r=null==t?void 0:t.weekStartsOn)&&void 0!==r?r:null==t||null===(o=t.locale)||void 0===o||null===(d=o.options)||void 0===d?void 0:d.weekStartsOn)&&void 0!==i?i:m.weekStartsOn)&&void 0!==n?n:null===(s=m.locale)||void 0===s||null===(u=s.options)||void 0===u?void 0:u.weekStartsOn)&&void 0!==a?a:0);if(!(l>=0&&l<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var h=ra(e),c=h.getUTCDay(),f=(c=1&&c<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var f=new Date(0);f.setUTCFullYear(l+1,0,c),f.setUTCHours(0,0,0,0);var g=va(f,t),p=new Date(0);p.setUTCFullYear(l,0,c),p.setUTCHours(0,0,0,0);var v=va(p,t);return m.getTime()>=g.getTime()?l+1:m.getTime()>=v.getTime()?l:l-1}function wa(e,t){var a,n,i,r,o,d,s,u;na(1,arguments);var m=sa(),l=aa(null!==(a=null!==(n=null!==(i=null!==(r=null==t?void 0:t.firstWeekContainsDate)&&void 0!==r?r:null==t||null===(o=t.locale)||void 0===o||null===(d=o.options)||void 0===d?void 0:d.firstWeekContainsDate)&&void 0!==i?i:m.firstWeekContainsDate)&&void 0!==n?n:null===(s=m.locale)||void 0===s||null===(u=s.options)||void 0===u?void 0:u.firstWeekContainsDate)&&void 0!==a?a:1),h=ba(e,t),c=new Date(0);c.setUTCFullYear(h,0,l),c.setUTCHours(0,0,0,0);var f=va(c,t);return f}function ya(e,t){for(var a=e<0?"-":"",n=Math.abs(e).toString();n.length0?a:1-a;return ya("yy"===t?n%100:n,t.length)},M:function(e,t){var a=e.getUTCMonth();return"M"===t?String(a+1):ya(a+1,2)},d:function(e,t){return ya(e.getUTCDate(),t.length)},a:function(e,t){var a=e.getUTCHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return a.toUpperCase();case"aaa":return a;case"aaaaa":return a[0];default:return"am"===a?"a.m.":"p.m."}},h:function(e,t){return ya(e.getUTCHours()%12||12,t.length)},H:function(e,t){return ya(e.getUTCHours(),t.length)},m:function(e,t){return ya(e.getUTCMinutes(),t.length)},s:function(e,t){return ya(e.getUTCSeconds(),t.length)},S:function(e,t){var a=t.length,n=e.getUTCMilliseconds();return ya(Math.floor(n*Math.pow(10,a-3)),t.length)}},ka="midnight",Ma="noon",Pa="morning",Wa="afternoon",xa="evening",za="night",ja={G:function(e,t,a){var n=e.getUTCFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return a.era(n,{width:"abbreviated"});case"GGGGG":return a.era(n,{width:"narrow"});default:return a.era(n,{width:"wide"})}},y:function(e,t,a){if("yo"===t){var n=e.getUTCFullYear(),i=n>0?n:1-n;return a.ordinalNumber(i,{unit:"year"})}return Aa.y(e,t)},Y:function(e,t,a,n){var i=ba(e,n),r=i>0?i:1-i;return"YY"===t?ya(r%100,2):"Yo"===t?a.ordinalNumber(r,{unit:"year"}):ya(r,t.length)},R:function(e,t){return ya(ga(e),t.length)},u:function(e,t){return ya(e.getUTCFullYear(),t.length)},Q:function(e,t,a){var n=Math.ceil((e.getUTCMonth()+1)/3);switch(t){case"Q":return String(n);case"QQ":return ya(n,2);case"Qo":return a.ordinalNumber(n,{unit:"quarter"});case"QQQ":return a.quarter(n,{width:"abbreviated",context:"formatting"});case"QQQQQ":return a.quarter(n,{width:"narrow",context:"formatting"});default:return a.quarter(n,{width:"wide",context:"formatting"})}},q:function(e,t,a){var n=Math.ceil((e.getUTCMonth()+1)/3);switch(t){case"q":return String(n);case"qq":return ya(n,2);case"qo":return a.ordinalNumber(n,{unit:"quarter"});case"qqq":return a.quarter(n,{width:"abbreviated",context:"standalone"});case"qqqqq":return a.quarter(n,{width:"narrow",context:"standalone"});default:return a.quarter(n,{width:"wide",context:"standalone"})}},M:function(e,t,a){var n=e.getUTCMonth();switch(t){case"M":case"MM":return Aa.M(e,t);case"Mo":return a.ordinalNumber(n+1,{unit:"month"});case"MMM":return a.month(n,{width:"abbreviated",context:"formatting"});case"MMMMM":return a.month(n,{width:"narrow",context:"formatting"});default:return a.month(n,{width:"wide",context:"formatting"})}},L:function(e,t,a){var n=e.getUTCMonth();switch(t){case"L":return String(n+1);case"LL":return ya(n+1,2);case"Lo":return a.ordinalNumber(n+1,{unit:"month"});case"LLL":return a.month(n,{width:"abbreviated",context:"standalone"});case"LLLLL":return a.month(n,{width:"narrow",context:"standalone"});default:return a.month(n,{width:"wide",context:"standalone"})}},w:function(e,t,a,n){var i=function(e,t){na(1,arguments);var a=ra(e),n=va(a,t).getTime()-wa(a,t).getTime();return Math.round(n/6048e5)+1}(e,n);return"wo"===t?a.ordinalNumber(i,{unit:"week"}):ya(i,t.length)},I:function(e,t,a){var n=function(e){na(1,arguments);var t=ra(e),a=fa(t).getTime()-pa(t).getTime();return Math.round(a/6048e5)+1}(e);return"Io"===t?a.ordinalNumber(n,{unit:"week"}):ya(n,t.length)},d:function(e,t,a){return"do"===t?a.ordinalNumber(e.getUTCDate(),{unit:"date"}):Aa.d(e,t)},D:function(e,t,a){var n=function(e){na(1,arguments);var t=ra(e),a=t.getTime();t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0);var n=t.getTime(),i=a-n;return Math.floor(i/864e5)+1}(e);return"Do"===t?a.ordinalNumber(n,{unit:"dayOfYear"}):ya(n,t.length)},E:function(e,t,a){var n=e.getUTCDay();switch(t){case"E":case"EE":case"EEE":return a.day(n,{width:"abbreviated",context:"formatting"});case"EEEEE":return a.day(n,{width:"narrow",context:"formatting"});case"EEEEEE":return a.day(n,{width:"short",context:"formatting"});default:return a.day(n,{width:"wide",context:"formatting"})}},e:function(e,t,a,n){var i=e.getUTCDay(),r=(i-n.weekStartsOn+8)%7||7;switch(t){case"e":return String(r);case"ee":return ya(r,2);case"eo":return a.ordinalNumber(r,{unit:"day"});case"eee":return a.day(i,{width:"abbreviated",context:"formatting"});case"eeeee":return a.day(i,{width:"narrow",context:"formatting"});case"eeeeee":return a.day(i,{width:"short",context:"formatting"});default:return a.day(i,{width:"wide",context:"formatting"})}},c:function(e,t,a,n){var i=e.getUTCDay(),r=(i-n.weekStartsOn+8)%7||7;switch(t){case"c":return String(r);case"cc":return ya(r,t.length);case"co":return a.ordinalNumber(r,{unit:"day"});case"ccc":return a.day(i,{width:"abbreviated",context:"standalone"});case"ccccc":return a.day(i,{width:"narrow",context:"standalone"});case"cccccc":return a.day(i,{width:"short",context:"standalone"});default:return a.day(i,{width:"wide",context:"standalone"})}},i:function(e,t,a){var n=e.getUTCDay(),i=0===n?7:n;switch(t){case"i":return String(i);case"ii":return ya(i,t.length);case"io":return a.ordinalNumber(i,{unit:"day"});case"iii":return a.day(n,{width:"abbreviated",context:"formatting"});case"iiiii":return a.day(n,{width:"narrow",context:"formatting"});case"iiiiii":return a.day(n,{width:"short",context:"formatting"});default:return a.day(n,{width:"wide",context:"formatting"})}},a:function(e,t,a){var n=e.getUTCHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return a.dayPeriod(n,{width:"abbreviated",context:"formatting"});case"aaa":return a.dayPeriod(n,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return a.dayPeriod(n,{width:"narrow",context:"formatting"});default:return a.dayPeriod(n,{width:"wide",context:"formatting"})}},b:function(e,t,a){var n,i=e.getUTCHours();switch(n=12===i?Ma:0===i?ka:i/12>=1?"pm":"am",t){case"b":case"bb":return a.dayPeriod(n,{width:"abbreviated",context:"formatting"});case"bbb":return a.dayPeriod(n,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return a.dayPeriod(n,{width:"narrow",context:"formatting"});default:return a.dayPeriod(n,{width:"wide",context:"formatting"})}},B:function(e,t,a){var n,i=e.getUTCHours();switch(n=i>=17?xa:i>=12?Wa:i>=4?Pa:za,t){case"B":case"BB":case"BBB":return a.dayPeriod(n,{width:"abbreviated",context:"formatting"});case"BBBBB":return a.dayPeriod(n,{width:"narrow",context:"formatting"});default:return a.dayPeriod(n,{width:"wide",context:"formatting"})}},h:function(e,t,a){if("ho"===t){var n=e.getUTCHours()%12;return 0===n&&(n=12),a.ordinalNumber(n,{unit:"hour"})}return Aa.h(e,t)},H:function(e,t,a){return"Ho"===t?a.ordinalNumber(e.getUTCHours(),{unit:"hour"}):Aa.H(e,t)},K:function(e,t,a){var n=e.getUTCHours()%12;return"Ko"===t?a.ordinalNumber(n,{unit:"hour"}):ya(n,t.length)},k:function(e,t,a){var n=e.getUTCHours();return 0===n&&(n=24),"ko"===t?a.ordinalNumber(n,{unit:"hour"}):ya(n,t.length)},m:function(e,t,a){return"mo"===t?a.ordinalNumber(e.getUTCMinutes(),{unit:"minute"}):Aa.m(e,t)},s:function(e,t,a){return"so"===t?a.ordinalNumber(e.getUTCSeconds(),{unit:"second"}):Aa.s(e,t)},S:function(e,t){return Aa.S(e,t)},X:function(e,t,a,n){var i=(n._originalDate||e).getTimezoneOffset();if(0===i)return"Z";switch(t){case"X":return Ta(i);case"XXXX":case"XX":return Sa(i);default:return Sa(i,":")}},x:function(e,t,a,n){var i=(n._originalDate||e).getTimezoneOffset();switch(t){case"x":return Ta(i);case"xxxx":case"xx":return Sa(i);default:return Sa(i,":")}},O:function(e,t,a,n){var i=(n._originalDate||e).getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+Ca(i,":");default:return"GMT"+Sa(i,":")}},z:function(e,t,a,n){var i=(n._originalDate||e).getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+Ca(i,":");default:return"GMT"+Sa(i,":")}},t:function(e,t,a,n){var i=n._originalDate||e;return ya(Math.floor(i.getTime()/1e3),t.length)},T:function(e,t,a,n){return ya((n._originalDate||e).getTime(),t.length)}};function Ca(e,t){var a=e>0?"-":"+",n=Math.abs(e),i=Math.floor(n/60),r=n%60;if(0===r)return a+String(i);var o=t||"";return a+String(i)+o+ya(r,2)}function Ta(e,t){return e%60==0?(e>0?"-":"+")+ya(Math.abs(e)/60,2):Sa(e,t)}function Sa(e,t){var a=t||"",n=e>0?"-":"+",i=Math.abs(e);return n+ya(Math.floor(i/60),2)+a+ya(i%60,2)}var Ha=ja,Da=function(e,t){switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});default:return t.date({width:"full"})}},Na=function(e,t){switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});default:return t.time({width:"full"})}},Xa={p:Na,P:function(e,t){var a,n=e.match(/(P+)(p+)?/)||[],i=n[1],r=n[2];if(!r)return Da(e,t);switch(i){case"P":a=t.dateTime({width:"short"});break;case"PP":a=t.dateTime({width:"medium"});break;case"PPP":a=t.dateTime({width:"long"});break;default:a=t.dateTime({width:"full"})}return a.replace("{{date}}",Da(i,t)).replace("{{time}}",Na(r,t))}},Ia=Xa,Ea=["D","DD"],Ba=["YY","YYYY"];function Va(e){return-1!==Ea.indexOf(e)}function Ka(e){return-1!==Ba.indexOf(e)}function Ua(e,t,a){if("YYYY"===e)throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(t,"`) for formatting years to the input `").concat(a,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("YY"===e)throw new RangeError("Use `yy` instead of `YY` (in `".concat(t,"`) for formatting years to the input `").concat(a,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("D"===e)throw new RangeError("Use `d` instead of `D` (in `".concat(t,"`) for formatting days of the month to the input `").concat(a,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("DD"===e)throw new RangeError("Use `dd` instead of `DD` (in `".concat(t,"`) for formatting days of the month to the input `").concat(a,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"))}var Ga={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},Oa=function(e,t,a){var n,i=Ga[e];return n="string"==typeof i?i:1===t?i.one:i.other.replace("{{count}}",t.toString()),null!=a&&a.addSuffix?a.comparison&&a.comparison>0?"in "+n:n+" ago":n};function Qa(e){return function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},a=t.width?String(t.width):e.defaultWidth,n=e.formats[a]||e.formats[e.defaultWidth];return n}}var Ya={date:Qa({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:Qa({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:Qa({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},qa={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},Ja=function(e,t,a,n){return qa[e]};function Ra(e){return function(t,a){var n;if("formatting"===(null!=a&&a.context?String(a.context):"standalone")&&e.formattingValues){var i=e.defaultFormattingWidth||e.defaultWidth,r=null!=a&&a.width?String(a.width):i;n=e.formattingValues[r]||e.formattingValues[i]}else{var o=e.defaultWidth,d=null!=a&&a.width?String(a.width):e.defaultWidth;n=e.values[d]||e.values[o]}return n[e.argumentCallback?e.argumentCallback(t):t]}}var La={ordinalNumber:function(e,t){var a=Number(e),n=a%100;if(n>20||n<10)switch(n%10){case 1:return a+"st";case 2:return a+"nd";case 3:return a+"rd"}return a+"th"},era:Ra({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:Ra({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},defaultWidth:"wide",argumentCallback:function(e){return e-1}}),month:Ra({values:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},defaultWidth:"wide"}),day:Ra({values:{narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},defaultWidth:"wide"}),dayPeriod:Ra({values:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},defaultWidth:"wide",formattingValues:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},defaultFormattingWidth:"wide"})};function Fa(e){return function(t){var a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=a.width,i=n&&e.matchPatterns[n]||e.matchPatterns[e.defaultMatchWidth],r=t.match(i);if(!r)return null;var o,d=r[0],s=n&&e.parsePatterns[n]||e.parsePatterns[e.defaultParseWidth],u=Array.isArray(s)?_a(s,(function(e){return e.test(d)})):Za(s,(function(e){return e.test(d)}));o=e.valueCallback?e.valueCallback(u):u,o=a.valueCallback?a.valueCallback(o):o;var m=t.slice(d.length);return{value:o,rest:m}}}function Za(e,t){for(var a in e)if(e.hasOwnProperty(a)&&t(e[a]))return a}function _a(e,t){for(var a=0;a1&&void 0!==arguments[1]?arguments[1]:{},n=t.match(e.matchPattern);if(!n)return null;var i=n[0],r=t.match(e.parsePattern);if(!r)return null;var o=e.valueCallback?e.valueCallback(r[0]):r[0];o=a.valueCallback?a.valueCallback(o):o;var d=t.slice(i.length);return{value:o,rest:d}}}var en={ordinalNumber:$a({matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:function(e){return parseInt(e,10)}}),era:Fa({matchPatterns:{narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:"any"}),quarter:Fa({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:function(e){return e+1}}),month:Fa({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:Fa({matchPatterns:{narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},defaultParseWidth:"any"}),dayPeriod:Fa({matchPatterns:{narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},defaultParseWidth:"any"})},tn={code:"en-US",formatDistance:Oa,formatLong:Ya,formatRelative:Ja,localize:La,match:en,options:{weekStartsOn:0,firstWeekContainsDate:1}},an=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,nn=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,rn=/^'([^]*?)'?$/,on=/''/g,dn=/[a-zA-Z]/;function sn(e,t,a){var n,i,r,o,d,s,u,m,l,h,c,f,g,p,v,b,w,y;na(2,arguments);var A=String(t),k=sa(),M=null!==(n=null!==(i=null==a?void 0:a.locale)&&void 0!==i?i:k.locale)&&void 0!==n?n:tn,P=aa(null!==(r=null!==(o=null!==(d=null!==(s=null==a?void 0:a.firstWeekContainsDate)&&void 0!==s?s:null==a||null===(u=a.locale)||void 0===u||null===(m=u.options)||void 0===m?void 0:m.firstWeekContainsDate)&&void 0!==d?d:k.firstWeekContainsDate)&&void 0!==o?o:null===(l=k.locale)||void 0===l||null===(h=l.options)||void 0===h?void 0:h.firstWeekContainsDate)&&void 0!==r?r:1);if(!(P>=1&&P<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var W=aa(null!==(c=null!==(f=null!==(g=null!==(p=null==a?void 0:a.weekStartsOn)&&void 0!==p?p:null==a||null===(v=a.locale)||void 0===v||null===(b=v.options)||void 0===b?void 0:b.weekStartsOn)&&void 0!==g?g:k.weekStartsOn)&&void 0!==f?f:null===(w=k.locale)||void 0===w||null===(y=w.options)||void 0===y?void 0:y.weekStartsOn)&&void 0!==c?c:0);if(!(W>=0&&W<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!M.localize)throw new RangeError("locale must contain localize property");if(!M.formatLong)throw new RangeError("locale must contain formatLong property");var x=ra(e);if(!ha(x))throw new RangeError("Invalid time value");var z=ua(x),j=ca(x,z),C={firstWeekContainsDate:P,weekStartsOn:W,locale:M,_originalDate:x},T=A.match(nn).map((function(e){var t=e[0];return"p"===t||"P"===t?(0,Ia[t])(e,M.formatLong):e})).join("").match(an).map((function(n){if("''"===n)return"'";var i=n[0];if("'"===i)return un(n);var r=Ha[i];if(r)return null!=a&&a.useAdditionalWeekYearTokens||!Ka(n)||Ua(n,t,String(e)),null!=a&&a.useAdditionalDayOfYearTokens||!Va(n)||Ua(n,t,String(e)),r(j,n,M.localize,C);if(i.match(dn))throw new RangeError("Format string contains an unescaped latin alphabet character `"+i+"`");return n})).join("");return T}function un(e){var t=e.match(rn);return t?t[1].replace(on,"'"):e}var mn={lessThanXSeconds:{one:"minder as 'n sekonde",other:"minder as {{count}} sekondes"},xSeconds:{one:"1 sekonde",other:"{{count}} sekondes"},halfAMinute:"'n halwe minuut",lessThanXMinutes:{one:"minder as 'n minuut",other:"minder as {{count}} minute"},xMinutes:{one:"'n minuut",other:"{{count}} minute"},aboutXHours:{one:"ongeveer 1 uur",other:"ongeveer {{count}} ure"},xHours:{one:"1 uur",other:"{{count}} ure"},xDays:{one:"1 dag",other:"{{count}} dae"},aboutXWeeks:{one:"ongeveer 1 week",other:"ongeveer {{count}} weke"},xWeeks:{one:"1 week",other:"{{count}} weke"},aboutXMonths:{one:"ongeveer 1 maand",other:"ongeveer {{count}} maande"},xMonths:{one:"1 maand",other:"{{count}} maande"},aboutXYears:{one:"ongeveer 1 jaar",other:"ongeveer {{count}} jaar"},xYears:{one:"1 jaar",other:"{{count}} jaar"},overXYears:{one:"meer as 1 jaar",other:"meer as {{count}} jaar"},almostXYears:{one:"byna 1 jaar",other:"byna {{count}} jaar"}},ln=function(e,t,a){var n,i=mn[e];return n="string"==typeof i?i:1===t?i.one:i.other.replace("{{count}}",String(t)),null!=a&&a.addSuffix?a.comparison&&a.comparison>0?"oor "+n:n+" gelede":n},hn={date:Qa({formats:{full:"EEEE, d MMMM yyyy",long:"d MMMM yyyy",medium:"d MMM yyyy",short:"yyyy/MM/dd"},defaultWidth:"full"}),time:Qa({formats:{full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},defaultWidth:"full"}),dateTime:Qa({formats:{full:"{{date}} 'om' {{time}}",long:"{{date}} 'om' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},cn=hn,fn={lastWeek:"'verlede' eeee 'om' p",yesterday:"'gister om' p",today:"'vandag om' p",tomorrow:"'môre om' p",nextWeek:"eeee 'om' p",other:"P"},gn=function(e,t,a,n){return fn[e]},pn={ordinalNumber:function(e){var t=Number(e),a=t%100;if(a<20)switch(a){case 1:case 8:return t+"ste";default:return t+"de"}return t+"ste"},era:Ra({values:{narrow:["vC","nC"],abbreviated:["vC","nC"],wide:["voor Christus","na Christus"]},defaultWidth:"wide"}),quarter:Ra({values:{narrow:["1","2","3","4"],abbreviated:["K1","K2","K3","K4"],wide:["1ste kwartaal","2de kwartaal","3de kwartaal","4de kwartaal"]},defaultWidth:"wide",argumentCallback:function(e){return e-1}}),month:Ra({values:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mrt","Apr","Mei","Jun","Jul","Aug","Sep","Okt","Nov","Des"],wide:["Januarie","Februarie","Maart","April","Mei","Junie","Julie","Augustus","September","Oktober","November","Desember"]},defaultWidth:"wide"}),day:Ra({values:{narrow:["S","M","D","W","D","V","S"],short:["So","Ma","Di","Wo","Do","Vr","Sa"],abbreviated:["Son","Maa","Din","Woe","Don","Vry","Sat"],wide:["Sondag","Maandag","Dinsdag","Woensdag","Donderdag","Vrydag","Saterdag"]},defaultWidth:"wide"}),dayPeriod:Ra({values:{narrow:{am:"vm",pm:"nm",midnight:"middernag",noon:"middaguur",morning:"oggend",afternoon:"middag",evening:"laat middag",night:"aand"},abbreviated:{am:"vm",pm:"nm",midnight:"middernag",noon:"middaguur",morning:"oggend",afternoon:"middag",evening:"laat middag",night:"aand"},wide:{am:"vm",pm:"nm",midnight:"middernag",noon:"middaguur",morning:"oggend",afternoon:"middag",evening:"laat middag",night:"aand"}},defaultWidth:"wide",formattingValues:{narrow:{am:"vm",pm:"nm",midnight:"middernag",noon:"uur die middag",morning:"uur die oggend",afternoon:"uur die middag",evening:"uur die aand",night:"uur die aand"},abbreviated:{am:"vm",pm:"nm",midnight:"middernag",noon:"uur die middag",morning:"uur die oggend",afternoon:"uur die middag",evening:"uur die aand",night:"uur die aand"},wide:{am:"vm",pm:"nm",midnight:"middernag",noon:"uur die middag",morning:"uur die oggend",afternoon:"uur die middag",evening:"uur die aand",night:"uur die aand"}},defaultFormattingWidth:"wide"})},vn=pn,bn={ordinalNumber:$a({matchPattern:/^(\d+)(ste|de)?/i,parsePattern:/\d+/i,valueCallback:function(e){return parseInt(e,10)}}),era:Fa({matchPatterns:{narrow:/^([vn]\.? ?C\.?)/,abbreviated:/^([vn]\. ?C\.?)/,wide:/^((voor|na) Christus)/},defaultMatchWidth:"wide",parsePatterns:{any:[/^v/,/^n/]},defaultParseWidth:"any"}),quarter:Fa({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^K[1234]/i,wide:/^[1234](st|d)e kwartaal/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:function(e){return e+1}}),month:Fa({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(Jan|Feb|Mrt|Apr|Mei|Jun|Jul|Aug|Sep|Okt|Nov|Dec)\.?/i,wide:/^(Januarie|Februarie|Maart|April|Mei|Junie|Julie|Augustus|September|Oktober|November|Desember)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^J/i,/^F/i,/^M/i,/^A/i,/^M/i,/^J/i,/^J/i,/^A/i,/^S/i,/^O/i,/^N/i,/^D/i],any:[/^Jan/i,/^Feb/i,/^Mrt/i,/^Apr/i,/^Mei/i,/^Jun/i,/^Jul/i,/^Aug/i,/^Sep/i,/^Okt/i,/^Nov/i,/^Dec/i]},defaultParseWidth:"any"}),day:Fa({matchPatterns:{narrow:/^[smdwv]/i,short:/^(So|Ma|Di|Wo|Do|Vr|Sa)/i,abbreviated:/^(Son|Maa|Din|Woe|Don|Vry|Sat)/i,wide:/^(Sondag|Maandag|Dinsdag|Woensdag|Donderdag|Vrydag|Saterdag)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^S/i,/^M/i,/^D/i,/^W/i,/^D/i,/^V/i,/^S/i],any:[/^So/i,/^Ma/i,/^Di/i,/^Wo/i,/^Do/i,/^Vr/i,/^Sa/i]},defaultParseWidth:"any"}),dayPeriod:Fa({matchPatterns:{any:/^(vm|nm|middernag|(?:uur )?die (oggend|middag|aand))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^vm/i,pm:/^nm/i,midnight:/^middernag/i,noon:/^middaguur/i,morning:/oggend/i,afternoon:/middag/i,evening:/laat middag/i,night:/aand/i}},defaultParseWidth:"any"})},wn=bn,yn={code:"af",formatDistance:ln,formatLong:cn,formatRelative:gn,localize:vn,match:wn,options:{weekStartsOn:0,firstWeekContainsDate:1}},An=yn,kn={lessThanXSeconds:{one:"أقل من ثانية",two:"أقل من ثانيتين",threeToTen:"أقل من {{count}} ثواني",other:"أقل من {{count}} ثانية"},xSeconds:{one:"ثانية واحدة",two:"ثانيتان",threeToTen:"{{count}} ثواني",other:"{{count}} ثانية"},halfAMinute:"نصف دقيقة",lessThanXMinutes:{one:"أقل من دقيقة",two:"أقل من دقيقتين",threeToTen:"أقل من {{count}} دقائق",other:"أقل من {{count}} دقيقة"},xMinutes:{one:"دقيقة واحدة",two:"دقيقتان",threeToTen:"{{count}} دقائق",other:"{{count}} دقيقة"},aboutXHours:{one:"ساعة واحدة تقريباً",two:"ساعتين تقريبا",threeToTen:"{{count}} ساعات تقريباً",other:"{{count}} ساعة تقريباً"},xHours:{one:"ساعة واحدة",two:"ساعتان",threeToTen:"{{count}} ساعات",other:"{{count}} ساعة"},xDays:{one:"يوم واحد",two:"يومان",threeToTen:"{{count}} أيام",other:"{{count}} يوم"},aboutXWeeks:{one:"أسبوع واحد تقريبا",two:"أسبوعين تقريبا",threeToTen:"{{count}} أسابيع تقريبا",other:"{{count}} أسبوعا تقريبا"},xWeeks:{one:"أسبوع واحد",two:"أسبوعان",threeToTen:"{{count}} أسابيع",other:"{{count}} أسبوعا"},aboutXMonths:{one:"شهر واحد تقريباً",two:"شهرين تقريبا",threeToTen:"{{count}} أشهر تقريبا",other:"{{count}} شهرا تقريباً"},xMonths:{one:"شهر واحد",two:"شهران",threeToTen:"{{count}} أشهر",other:"{{count}} شهرا"},aboutXYears:{one:"سنة واحدة تقريباً",two:"سنتين تقريبا",threeToTen:"{{count}} سنوات تقريباً",other:"{{count}} سنة تقريباً"},xYears:{one:"سنة واحد",two:"سنتان",threeToTen:"{{count}} سنوات",other:"{{count}} سنة"},overXYears:{one:"أكثر من سنة",two:"أكثر من سنتين",threeToTen:"أكثر من {{count}} سنوات",other:"أكثر من {{count}} سنة"},almostXYears:{one:"ما يقارب سنة واحدة",two:"ما يقارب سنتين",threeToTen:"ما يقارب {{count}} سنوات",other:"ما يقارب {{count}} سنة"}},Mn=function(e,t,a){var n,i=kn[e];return n="string"==typeof i?i:1===t?i.one:2===t?i.two:t<=10?i.threeToTen.replace("{{count}}",String(t)):i.other.replace("{{count}}",String(t)),null!=a&&a.addSuffix?a.comparison&&a.comparison>0?"خلال "+n:"منذ "+n:n},Pn={date:Qa({formats:{full:"EEEE، do MMMM y",long:"do MMMM y",medium:"d MMM y",short:"dd/MM/yyyy"},defaultWidth:"full"}),time:Qa({formats:{full:"HH:mm:ss",long:"HH:mm:ss",medium:"HH:mm:ss",short:"HH:mm"},defaultWidth:"full"}),dateTime:Qa({formats:{full:"{{date}} 'عند الساعة' {{time}}",long:"{{date}} 'عند الساعة' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},Wn=Pn,xn={lastWeek:"eeee 'الماضي عند الساعة' p",yesterday:"'الأمس عند الساعة' p",today:"'اليوم عند الساعة' p",tomorrow:"'غدا عند الساعة' p",nextWeek:"eeee 'القادم عند الساعة' p",other:"P"},zn=function(e){return xn[e]},jn={ordinalNumber:function(e){return String(e)},era:Ra({values:{narrow:["ق","ب"],abbreviated:["ق.م.","ب.م."],wide:["قبل الميلاد","بعد الميلاد"]},defaultWidth:"wide"}),quarter:Ra({values:{narrow:["1","2","3","4"],abbreviated:["ر1","ر2","ر3","ر4"],wide:["الربع الأول","الربع الثاني","الربع الثالث","الربع الرابع"]},defaultWidth:"wide",argumentCallback:function(e){return e-1}}),month:Ra({values:{narrow:["ي","ف","م","أ","م","ي","ي","أ","س","أ","ن","د"],abbreviated:["يناير","فبراير","مارس","أبريل","مايو","يونيو","يوليو","أغسطس","سبتمبر","أكتوبر","نوفمبر","ديسمبر"],wide:["يناير","فبراير","مارس","أبريل","مايو","يونيو","يوليو","أغسطس","سبتمبر","أكتوبر","نوفمبر","ديسمبر"]},defaultWidth:"wide"}),day:Ra({values:{narrow:["ح","ن","ث","ر","خ","ج","س"],short:["أحد","اثنين","ثلاثاء","أربعاء","خميس","جمعة","سبت"],abbreviated:["أحد","اثنين","ثلاثاء","أربعاء","خميس","جمعة","سبت"],wide:["الأحد","الاثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"]},defaultWidth:"wide"}),dayPeriod:Ra({values:{narrow:{am:"ص",pm:"م",morning:"الصباح",noon:"الظهر",afternoon:"بعد الظهر",evening:"المساء",night:"الليل",midnight:"منتصف الليل"},abbreviated:{am:"ص",pm:"م",morning:"الصباح",noon:"الظهر",afternoon:"بعد الظهر",evening:"المساء",night:"الليل",midnight:"منتصف الليل"},wide:{am:"ص",pm:"م",morning:"الصباح",noon:"الظهر",afternoon:"بعد الظهر",evening:"المساء",night:"الليل",midnight:"منتصف الليل"}},defaultWidth:"wide",formattingValues:{narrow:{am:"ص",pm:"م",morning:"في الصباح",noon:"الظهر",afternoon:"بعد الظهر",evening:"في المساء",night:"في الليل",midnight:"منتصف الليل"},abbreviated:{am:"ص",pm:"م",morning:"في الصباح",noon:"الظهر",afternoon:"بعد الظهر",evening:"في المساء",night:"في الليل",midnight:"منتصف الليل"},wide:{am:"ص",pm:"م",morning:"في الصباح",noon:"الظهر",afternoon:"بعد الظهر",evening:"في المساء",night:"في الليل",midnight:"منتصف الليل"}},defaultFormattingWidth:"wide"})},Cn=jn,Tn={ordinalNumber:$a({matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:function(e){return parseInt(e,10)}}),era:Fa({matchPatterns:{narrow:/[قب]/,abbreviated:/[قب]\.م\./,wide:/(قبل|بعد) الميلاد/},defaultMatchWidth:"wide",parsePatterns:{any:[/قبل/,/بعد/]},defaultParseWidth:"any"}),quarter:Fa({matchPatterns:{narrow:/^[1234]/i,abbreviated:/ر[1234]/,wide:/الربع (الأول|الثاني|الثالث|الرابع)/},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:function(e){return e+1}}),month:Fa({matchPatterns:{narrow:/^[أيفمسند]/,abbreviated:/^(يناير|فبراير|مارس|أبريل|مايو|يونيو|يوليو|أغسطس|سبتمبر|أكتوبر|نوفمبر|ديسمبر)/,wide:/^(يناير|فبراير|مارس|أبريل|مايو|يونيو|يوليو|أغسطس|سبتمبر|أكتوبر|نوفمبر|ديسمبر)/},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^ي/i,/^ف/i,/^م/i,/^أ/i,/^م/i,/^ي/i,/^ي/i,/^أ/i,/^س/i,/^أ/i,/^ن/i,/^د/i],any:[/^يناير/i,/^فبراير/i,/^مارس/i,/^أبريل/i,/^مايو/i,/^يونيو/i,/^يوليو/i,/^أغسطس/i,/^سبتمبر/i,/^أكتوبر/i,/^نوفمبر/i,/^ديسمبر/i]},defaultParseWidth:"any"}),day:Fa({matchPatterns:{narrow:/^[حنثرخجس]/i,short:/^(أحد|اثنين|ثلاثاء|أربعاء|خميس|جمعة|سبت)/i,abbreviated:/^(أحد|اثنين|ثلاثاء|أربعاء|خميس|جمعة|سبت)/i,wide:/^(الأحد|الاثنين|الثلاثاء|الأربعاء|الخميس|الجمعة|السبت)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^ح/i,/^ن/i,/^ث/i,/^ر/i,/^خ/i,/^ج/i,/^س/i],wide:[/^الأحد/i,/^الاثنين/i,/^الثلاثاء/i,/^الأربعاء/i,/^الخميس/i,/^الجمعة/i,/^السبت/i],any:[/^أح/i,/^اث/i,/^ث/i,/^أر/i,/^خ/i,/^ج/i,/^س/i]},defaultParseWidth:"any"}),dayPeriod:Fa({matchPatterns:{narrow:/^(ص|م|منتصف الليل|الظهر|بعد الظهر|في الصباح|في المساء|في الليل)/,any:/^(ص|م|منتصف الليل|الظهر|بعد الظهر|في الصباح|في المساء|في الليل)/},defaultMatchWidth:"any",parsePatterns:{any:{am:/^ص/,pm:/^م/,midnight:/منتصف الليل/,noon:/الظهر/,afternoon:/بعد الظهر/,morning:/في الصباح/,evening:/في المساء/,night:/في الليل/}},defaultParseWidth:"any"})},Sn=Tn,Hn={code:"ar",formatDistance:Mn,formatLong:Wn,formatRelative:zn,localize:Cn,match:Sn,options:{weekStartsOn:6,firstWeekContainsDate:1}},Dn=Hn,Nn={lessThanXSeconds:{one:"أقل من ثانية واحدة",two:"أقل من ثانتين",threeToTen:"أقل من {{count}} ثواني",other:"أقل من {{count}} ثانية"},xSeconds:{one:"ثانية واحدة",two:"ثانتين",threeToTen:"{{count}} ثواني",other:"{{count}} ثانية"},halfAMinute:"نصف دقيقة",lessThanXMinutes:{one:"أقل من دقيقة",two:"أقل من دقيقتين",threeToTen:"أقل من {{count}} دقائق",other:"أقل من {{count}} دقيقة"},xMinutes:{one:"دقيقة واحدة",two:"دقيقتين",threeToTen:"{{count}} دقائق",other:"{{count}} دقيقة"},aboutXHours:{one:"ساعة واحدة تقريباً",two:"ساعتين تقريباً",threeToTen:"{{count}} ساعات تقريباً",other:"{{count}} ساعة تقريباً"},xHours:{one:"ساعة واحدة",two:"ساعتين",threeToTen:"{{count}} ساعات",other:"{{count}} ساعة"},xDays:{one:"يوم واحد",two:"يومين",threeToTen:"{{count}} أيام",other:"{{count}} يوم"},aboutXWeeks:{one:"أسبوع واحد تقريباً",two:"أسبوعين تقريباً",threeToTen:"{{count}} أسابيع تقريباً",other:"{{count}} أسبوع تقريباً"},xWeeks:{one:"أسبوع واحد",two:"أسبوعين",threeToTen:"{{count}} أسابيع",other:"{{count}} أسبوع"},aboutXMonths:{one:"شهر واحد تقريباً",two:"شهرين تقريباً",threeToTen:"{{count}} أشهر تقريباً",other:"{{count}} شهر تقريباً"},xMonths:{one:"شهر واحد",two:"شهرين",threeToTen:"{{count}} أشهر",other:"{{count}} شهر"},aboutXYears:{one:"عام واحد تقريباً",two:"عامين تقريباً",threeToTen:"{{count}} أعوام تقريباً",other:"{{count}} عام تقريباً"},xYears:{one:"عام واحد",two:"عامين",threeToTen:"{{count}} أعوام",other:"{{count}} عام"},overXYears:{one:"أكثر من عام",two:"أكثر من عامين",threeToTen:"أكثر من {{count}} أعوام",other:"أكثر من {{count}} عام"},almostXYears:{one:"عام واحد تقريباً",two:"عامين تقريباً",threeToTen:"{{count}} أعوام تقريباً",other:"{{count}} عام تقريباً"}},Xn=function(e,t,a){a=a||{};var n,i=Nn[e];return n="string"==typeof i?i:1===t?i.one:2===t?i.two:t<=10?i.threeToTen.replace("{{count}}",String(t)):i.other.replace("{{count}}",String(t)),a.addSuffix?a.comparison&&a.comparison>0?"في خلال "+n:"منذ "+n:n},In={date:Qa({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:Qa({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:Qa({formats:{full:"{{date}} 'عند' {{time}}",long:"{{date}} 'عند' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},En=In,Bn={lastWeek:"'أخر' eeee 'عند' p",yesterday:"'أمس عند' p",today:"'اليوم عند' p",tomorrow:"'غداً عند' p",nextWeek:"eeee 'عند' p",other:"P"},Vn=function(e,t,a,n){return Bn[e]},Kn={code:"ar-DZ",formatDistance:Xn,formatLong:En,formatRelative:Vn,localize:{ordinalNumber:function(e){return String(e)},era:Ra({values:{narrow:["ق","ب"],abbreviated:["ق.م.","ب.م."],wide:["قبل الميلاد","بعد الميلاد"]},defaultWidth:"wide"}),quarter:Ra({values:{narrow:["1","2","3","4"],abbreviated:["ر1","ر2","ر3","ر4"],wide:["الربع الأول","الربع الثاني","الربع الثالث","الربع الرابع"]},defaultWidth:"wide",argumentCallback:function(e){return Number(e)-1}}),month:Ra({values:{narrow:["ج","ف","م","أ","م","ج","ج","أ","س","أ","ن","د"],abbreviated:["جانـ","فيفـ","مارس","أفريل","مايـ","جوانـ","جويـ","أوت","سبتـ","أكتـ","نوفـ","ديسـ"],wide:["جانفي","فيفري","مارس","أفريل","ماي","جوان","جويلية","أوت","سبتمبر","أكتوبر","نوفمبر","ديسمبر"]},defaultWidth:"wide"}),day:Ra({values:{narrow:["ح","ن","ث","ر","خ","ج","س"],short:["أحد","اثنين","ثلاثاء","أربعاء","خميس","جمعة","سبت"],abbreviated:["أحد","اثنـ","ثلا","أربـ","خميـ","جمعة","سبت"],wide:["الأحد","الاثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"]},defaultWidth:"wide"}),dayPeriod:Ra({values:{narrow:{am:"ص",pm:"م",midnight:"ن",noon:"ظ",morning:"صباحاً",afternoon:"بعد الظهر",evening:"مساءاً",night:"ليلاً"},abbreviated:{am:"ص",pm:"م",midnight:"نصف الليل",noon:"ظهر",morning:"صباحاً",afternoon:"بعد الظهر",evening:"مساءاً",night:"ليلاً"},wide:{am:"ص",pm:"م",midnight:"نصف الليل",noon:"ظهر",morning:"صباحاً",afternoon:"بعد الظهر",evening:"مساءاً",night:"ليلاً"}},defaultWidth:"wide",formattingValues:{narrow:{am:"ص",pm:"م",midnight:"ن",noon:"ظ",morning:"في الصباح",afternoon:"بعد الظـهر",evening:"في المساء",night:"في الليل"},abbreviated:{am:"ص",pm:"م",midnight:"نصف الليل",noon:"ظهر",morning:"في الصباح",afternoon:"بعد الظهر",evening:"في المساء",night:"في الليل"},wide:{am:"ص",pm:"م",midnight:"نصف الليل",noon:"ظهر",morning:"صباحاً",afternoon:"بعد الظـهر",evening:"في المساء",night:"في الليل"}},defaultFormattingWidth:"wide"})},match:{ordinalNumber:$a({matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:function(e){return parseInt(e,10)}}),era:Fa({matchPatterns:{narrow:/^(ق|ب)/i,abbreviated:/^(ق\.?\s?م\.?|ق\.?\s?م\.?\s?|a\.?\s?d\.?|c\.?\s?)/i,wide:/^(قبل الميلاد|قبل الميلاد|بعد الميلاد|بعد الميلاد)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^قبل/i,/^بعد/i]},defaultParseWidth:"any"}),quarter:Fa({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^ر[1234]/i,wide:/^الربع [1234]/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:function(e){return Number(e)+1}}),month:Fa({matchPatterns:{narrow:/^[جفمأسند]/i,abbreviated:/^(جان|فيف|مار|أفر|ماي|جوا|جوي|أوت|سبت|أكت|نوف|ديس)/i,wide:/^(جانفي|فيفري|مارس|أفريل|ماي|جوان|جويلية|أوت|سبتمبر|أكتوبر|نوفمبر|ديسمبر)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^ج/i,/^ف/i,/^م/i,/^أ/i,/^م/i,/^ج/i,/^ج/i,/^أ/i,/^س/i,/^أ/i,/^ن/i,/^د/i],any:[/^جان/i,/^فيف/i,/^مار/i,/^أفر/i,/^ماي/i,/^جوا/i,/^جوي/i,/^أوت/i,/^سبت/i,/^أكت/i,/^نوف/i,/^ديس/i]},defaultParseWidth:"any"}),day:Fa({matchPatterns:{narrow:/^[حنثرخجس]/i,short:/^(أحد|اثنين|ثلاثاء|أربعاء|خميس|جمعة|سبت)/i,abbreviated:/^(أحد|اثن|ثلا|أرب|خمي|جمعة|سبت)/i,wide:/^(الأحد|الاثنين|الثلاثاء|الأربعاء|الخميس|الجمعة|السبت)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^ح/i,/^ن/i,/^ث/i,/^ر/i,/^خ/i,/^ج/i,/^س/i],wide:[/^الأحد/i,/^الاثنين/i,/^الثلاثاء/i,/^الأربعاء/i,/^الخميس/i,/^الجمعة/i,/^السبت/i],any:[/^أح/i,/^اث/i,/^ث/i,/^أر/i,/^خ/i,/^ج/i,/^س/i]},defaultParseWidth:"any"}),dayPeriod:Fa({matchPatterns:{narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},defaultParseWidth:"any"})},options:{weekStartsOn:0,firstWeekContainsDate:1}},Un={lessThanXSeconds:{one:"أقل من ثانية",two:"أقل من ثانيتين",threeToTen:"أقل من {{count}} ثواني",other:"أقل من {{count}} ثانية"},xSeconds:{one:"ثانية",two:"ثانيتين",threeToTen:"{{count}} ثواني",other:"{{count}} ثانية"},halfAMinute:"نص دقيقة",lessThanXMinutes:{one:"أقل من دقيقة",two:"أقل من دقيقتين",threeToTen:"أقل من {{count}} دقايق",other:"أقل من {{count}} دقيقة"},xMinutes:{one:"دقيقة",two:"دقيقتين",threeToTen:"{{count}} دقايق",other:"{{count}} دقيقة"},aboutXHours:{one:"حوالي ساعة",two:"حوالي ساعتين",threeToTen:"حوالي {{count}} ساعات",other:"حوالي {{count}} ساعة"},xHours:{one:"ساعة",two:"ساعتين",threeToTen:"{{count}} ساعات",other:"{{count}} ساعة"},xDays:{one:"يوم",two:"يومين",threeToTen:"{{count}} أيام",other:"{{count}} يوم"},aboutXWeeks:{one:"حوالي أسبوع",two:"حوالي أسبوعين",threeToTen:"حوالي {{count}} أسابيع",other:"حوالي {{count}} أسبوع"},xWeeks:{one:"أسبوع",two:"أسبوعين",threeToTen:"{{count}} أسابيع",other:"{{count}} أسبوع"},aboutXMonths:{one:"حوالي شهر",two:"حوالي شهرين",threeToTen:"حوالي {{count}} أشهر",other:"حوالي {{count}} شهر"},xMonths:{one:"شهر",two:"شهرين",threeToTen:"{{count}} أشهر",other:"{{count}} شهر"},aboutXYears:{one:"حوالي سنة",two:"حوالي سنتين",threeToTen:"حوالي {{count}} سنين",other:"حوالي {{count}} سنة"},xYears:{one:"عام",two:"عامين",threeToTen:"{{count}} أعوام",other:"{{count}} عام"},overXYears:{one:"أكثر من سنة",two:"أكثر من سنتين",threeToTen:"أكثر من {{count}} سنين",other:"أكثر من {{count}} سنة"},almostXYears:{one:"عام تقريبًا",two:"عامين تقريبًا",threeToTen:"{{count}} أعوام تقريبًا",other:"{{count}} عام تقريبًا"}},Gn=function(e,t,a){var n,i=Un[e];return n="string"==typeof i?i:1===t?i.one:2===t?i.two:t<=10?i.threeToTen.replace("{{count}}",String(t)):i.other.replace("{{count}}",String(t)),null!=a&&a.addSuffix?a.comparison&&a.comparison>0?"في خلال ".concat(n):"منذ ".concat(n):n},On={date:Qa({formats:{full:"EEEE، do MMMM y",long:"do MMMM y",medium:"dd/MMM/y",short:"d/MM/y"},defaultWidth:"full"}),time:Qa({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:Qa({formats:{full:"{{date}} 'الساعة' {{time}}",long:"{{date}} 'الساعة' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},Qn={lastWeek:"eeee 'اللي جاي الساعة' p",yesterday:"'إمبارح الساعة' p",today:"'النهاردة الساعة' p",tomorrow:"'بكرة الساعة' p",nextWeek:"eeee 'الساعة' p",other:"P"},Yn={code:"ar-EG",formatDistance:Gn,formatLong:On,formatRelative:function(e,t,a,n){return Qn[e]},localize:{ordinalNumber:function(e,t){return String(e)},era:Ra({values:{narrow:["ق","ب"],abbreviated:["ق.م","ب.م"],wide:["قبل الميلاد","بعد الميلاد"]},defaultWidth:"wide"}),quarter:Ra({values:{narrow:["1","2","3","4"],abbreviated:["ر1","ر2","ر3","ر4"],wide:["الربع الأول","الربع الثاني","الربع الثالث","الربع الرابع"]},defaultWidth:"wide",argumentCallback:function(e){return e-1}}),month:Ra({values:{narrow:["ي","ف","م","أ","م","ي","ي","أ","س","أ","ن","د"],abbreviated:["ينا","فبر","مارس","أبريل","مايو","يونـ","يولـ","أغسـ","سبتـ","أكتـ","نوفـ","ديسـ"],wide:["يناير","فبراير","مارس","أبريل","مايو","يونيو","يوليو","أغسطس","سبتمبر","أكتوبر","نوفمبر","ديسمبر"]},defaultWidth:"wide"}),day:Ra({values:{narrow:["ح","ن","ث","ر","خ","ج","س"],short:["أحد","اثنين","ثلاثاء","أربعاء","خميس","جمعة","سبت"],abbreviated:["أحد","اثنين","ثلاثاء","أربعاء","خميس","جمعة","سبت"],wide:["الأحد","الاثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"]},defaultWidth:"wide"}),dayPeriod:Ra({values:{narrow:{am:"ص",pm:"م",midnight:"ن",noon:"ظ",morning:"صباحاً",afternoon:"بعد الظهر",evening:"مساءً",night:"ليلاً"},abbreviated:{am:"ص",pm:"م",midnight:"نصف الليل",noon:"ظهراً",morning:"صباحاً",afternoon:"بعد الظهر",evening:"مساءً",night:"ليلاً"},wide:{am:"ص",pm:"م",midnight:"نصف الليل",noon:"ظهراً",morning:"صباحاً",afternoon:"بعد الظهر",evening:"مساءً",night:"ليلاً"}},defaultWidth:"wide",formattingValues:{narrow:{am:"ص",pm:"م",midnight:"ن",noon:"ظ",morning:"في الصباح",afternoon:"بعد الظهر",evening:"في المساء",night:"في الليل"},abbreviated:{am:"ص",pm:"م",midnight:"نصف الليل",noon:"ظهراً",morning:"في الصباح",afternoon:"بعد الظهر",evening:"في المساء",night:"في الليل"},wide:{am:"ص",pm:"م",midnight:"نصف الليل",morning:"في الصباح",noon:"ظهراً",afternoon:"بعد الظهر",evening:"في المساء",night:"في الليل"}},defaultFormattingWidth:"wide"})},match:{ordinalNumber:$a({matchPattern:/^(\d+)/,parsePattern:/\d+/i,valueCallback:function(e){return parseInt(e,10)}}),era:Fa({matchPatterns:{narrow:/^(ق|ب)/g,abbreviated:/^(ق.م|ب.م)/g,wide:/^(قبل الميلاد|بعد الميلاد)/g},defaultMatchWidth:"wide",parsePatterns:{any:[/^ق/g,/^ب/g]},defaultParseWidth:"any"}),quarter:Fa({matchPatterns:{narrow:/^[1234]/,abbreviated:/^ر[1234]/,wide:/^الربع (الأول|الثاني|الثالث|الرابع)/},defaultMatchWidth:"wide",parsePatterns:{wide:[/الربع الأول/,/الربع الثاني/,/الربع الثالث/,/الربع الرابع/],any:[/1/,/2/,/3/,/4/]},defaultParseWidth:"any",valueCallback:function(e){return e+1}}),month:Fa({matchPatterns:{narrow:/^(ي|ف|م|أ|س|ن|د)/,abbreviated:/^(ينا|فبر|مارس|أبريل|مايو|يونـ|يولـ|أغسـ|سبتـ|أكتـ|نوفـ|ديسـ)/,wide:/^(يناير|فبراير|مارس|أبريل|مايو|يونيو|يوليو|أغسطس|سبتمبر|أكتوبر|نوفمبر|ديسمبر)/},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^ي/,/^ف/,/^م/,/^أ/,/^م/,/^ي/,/^ي/,/^أ/,/^س/,/^أ/,/^ن/,/^د/],any:[/^ينا/,/^فبر/,/^مارس/,/^أبريل/,/^مايو/,/^يون/,/^يول/,/^أغس/,/^سبت/,/^أكت/,/^نوف/,/^ديس/]},defaultParseWidth:"any"}),day:Fa({matchPatterns:{narrow:/^(ح|ن|ث|ر|خ|ج|س)/,short:/^(أحد|اثنين|ثلاثاء|أربعاء|خميس|جمعة|سبت)/,abbreviated:/^(أحد|اثنين|ثلاثاء|أربعاء|خميس|جمعة|سبت)/,wide:/^(الأحد|الاثنين|الثلاثاء|الأربعاء|الخميس|الجمعة|السبت)/},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^ح/,/^ن/,/^ث/,/^ر/,/^خ/,/^ج/,/^س/],any:[/أحد/,/اثنين/,/ثلاثاء/,/أربعاء/,/خميس/,/جمعة/,/سبت/]},defaultParseWidth:"any"}),dayPeriod:Fa({matchPatterns:{narrow:/^(ص|م|ن|ظ|في الصباح|بعد الظهر|في المساء|في الليل)/,abbreviated:/^(ص|م|نصف الليل|ظهراً|في الصباح|بعد الظهر|في المساء|في الليل)/,wide:/^(ص|م|نصف الليل|في الصباح|ظهراً|بعد الظهر|في المساء|في الليل)/,any:/^(ص|م|صباح|ظهر|مساء|ليل)/},defaultMatchWidth:"any",parsePatterns:{any:{am:/^ص/,pm:/^م/,midnight:/^ن/,noon:/^ظ/,morning:/^ص/,afternoon:/^بعد/,evening:/^م/,night:/^ل/}},defaultParseWidth:"any"})},options:{weekStartsOn:0,firstWeekContainsDate:1}},qn={lessThanXSeconds:{one:"أقل من ثانية واحدة",two:"أقل من ثانتين",threeToTen:"أقل من {{count}} ثواني",other:"أقل من {{count}} ثانية"},xSeconds:{one:"ثانية واحدة",two:"ثانتين",threeToTen:"{{count}} ثواني",other:"{{count}} ثانية"},halfAMinute:"نصف دقيقة",lessThanXMinutes:{one:"أقل من دقيقة",two:"أقل من دقيقتين",threeToTen:"أقل من {{count}} دقائق",other:"أقل من {{count}} دقيقة"},xMinutes:{one:"دقيقة واحدة",two:"دقيقتين",threeToTen:"{{count}} دقائق",other:"{{count}} دقيقة"},aboutXHours:{one:"ساعة واحدة تقريباً",two:"ساعتين تقريباً",threeToTen:"{{count}} ساعات تقريباً",other:"{{count}} ساعة تقريباً"},xHours:{one:"ساعة واحدة",two:"ساعتين",threeToTen:"{{count}} ساعات",other:"{{count}} ساعة"},xDays:{one:"يوم واحد",two:"يومين",threeToTen:"{{count}} أيام",other:"{{count}} يوم"},aboutXWeeks:{one:"أسبوع واحد تقريباً",two:"أسبوعين تقريباً",threeToTen:"{{count}} أسابيع تقريباً",other:"{{count}} أسبوع تقريباً"},xWeeks:{one:"أسبوع واحد",two:"أسبوعين",threeToTen:"{{count}} أسابيع",other:"{{count}} أسبوع"},aboutXMonths:{one:"شهر واحد تقريباً",two:"شهرين تقريباً",threeToTen:"{{count}} أشهر تقريباً",other:"{{count}} شهر تقريباً"},xMonths:{one:"شهر واحد",two:"شهرين",threeToTen:"{{count}} أشهر",other:"{{count}} شهر"},aboutXYears:{one:"عام واحد تقريباً",two:"عامين تقريباً",threeToTen:"{{count}} أعوام تقريباً",other:"{{count}} عام تقريباً"},xYears:{one:"عام واحد",two:"عامين",threeToTen:"{{count}} أعوام",other:"{{count}} عام"},overXYears:{one:"أكثر من عام",two:"أكثر من عامين",threeToTen:"أكثر من {{count}} أعوام",other:"أكثر من {{count}} عام"},almostXYears:{one:"عام واحد تقريباً",two:"عامين تقريباً",threeToTen:"{{count}} أعوام تقريباً",other:"{{count}} عام تقريباً"}},Jn=function(e,t,a){a=a||{};var n,i=qn[e];return n="string"==typeof i?i:1===t?i.one:2===t?i.two:t<=10?i.threeToTen.replace("{{count}}",String(t)):i.other.replace("{{count}}",String(t)),a.addSuffix?a.comparison&&a.comparison>0?"في خلال "+n:"منذ "+n:n},Rn={date:Qa({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:Qa({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:Qa({formats:{full:"{{date}} 'عند' {{time}}",long:"{{date}} 'عند' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},Ln={lastWeek:"'أخر' eeee 'عند' p",yesterday:"'أمس عند' p",today:"'اليوم عند' p",tomorrow:"'غداً عند' p",nextWeek:"eeee 'عند' p",other:"P"},Fn={code:"ar-MA",formatDistance:Jn,formatLong:Rn,formatRelative:function(e,t,a,n){return Ln[e]},localize:{ordinalNumber:function(e){return String(e)},era:Ra({values:{narrow:["ق","ب"],abbreviated:["ق.م.","ب.م."],wide:["قبل الميلاد","بعد الميلاد"]},defaultWidth:"wide"}),quarter:Ra({values:{narrow:["1","2","3","4"],abbreviated:["ر1","ر2","ر3","ر4"],wide:["الربع الأول","الربع الثاني","الربع الثالث","الربع الرابع"]},defaultWidth:"wide",argumentCallback:function(e){return Number(e)-1}}),month:Ra({values:{narrow:["ي","ف","م","أ","م","ي","ي","غ","ش","أ","ن","د"],abbreviated:["ينا","فبر","مارس","أبريل","ماي","يونـ","يولـ","غشت","شتنـ","أكتـ","نونـ","دجنـ"],wide:["يناير","فبراير","مارس","أبريل","ماي","يونيو","يوليوز","غشت","شتنبر","أكتوبر","نونبر","دجنبر"]},defaultWidth:"wide"}),day:Ra({values:{narrow:["ح","ن","ث","ر","خ","ج","س"],short:["أحد","اثنين","ثلاثاء","أربعاء","خميس","جمعة","سبت"],abbreviated:["أحد","اثنـ","ثلا","أربـ","خميـ","جمعة","سبت"],wide:["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"]},defaultWidth:"wide"}),dayPeriod:Ra({values:{narrow:{am:"ص",pm:"م",midnight:"ن",noon:"ظ",morning:"صباحاً",afternoon:"بعد الظهر",evening:"مساءاً",night:"ليلاً"},abbreviated:{am:"ص",pm:"م",midnight:"نصف الليل",noon:"ظهر",morning:"صباحاً",afternoon:"بعد الظهر",evening:"مساءاً",night:"ليلاً"},wide:{am:"ص",pm:"م",midnight:"نصف الليل",noon:"ظهر",morning:"صباحاً",afternoon:"بعد الظهر",evening:"مساءاً",night:"ليلاً"}},defaultWidth:"wide",formattingValues:{narrow:{am:"ص",pm:"م",midnight:"ن",noon:"ظ",morning:"في الصباح",afternoon:"بعد الظـهر",evening:"في المساء",night:"في الليل"},abbreviated:{am:"ص",pm:"م",midnight:"نصف الليل",noon:"ظهر",morning:"في الصباح",afternoon:"بعد الظهر",evening:"في المساء",night:"في الليل"},wide:{am:"ص",pm:"م",midnight:"نصف الليل",noon:"ظهر",morning:"صباحاً",afternoon:"بعد الظـهر",evening:"في المساء",night:"في الليل"}},defaultFormattingWidth:"wide"})},match:{ordinalNumber:$a({matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:function(e){return parseInt(e,10)}}),era:Fa({matchPatterns:{narrow:/^(ق|ب)/i,abbreviated:/^(ق\.?\s?م\.?|ق\.?\s?م\.?\s?|a\.?\s?d\.?|c\.?\s?)/i,wide:/^(قبل الميلاد|قبل الميلاد|بعد الميلاد|بعد الميلاد)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^قبل/i,/^بعد/i]},defaultParseWidth:"any"}),quarter:Fa({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^ر[1234]/i,wide:/^الربع [1234]/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:function(e){return Number(e)+1}}),month:Fa({matchPatterns:{narrow:/^[يفمأمسند]/i,abbreviated:/^(ين|ف|مار|أب|ماي|يون|يول|غش|شت|أك|ن|د)/i,wide:/^(ين|ف|مار|أب|ماي|يون|يول|غش|شت|أك|ن|د)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^ي/i,/^ف/i,/^م/i,/^أ/i,/^م/i,/^ي/i,/^ي/i,/^غ/i,/^ش/i,/^أ/i,/^ن/i,/^د/i],any:[/^ين/i,/^فب/i,/^مار/i,/^أب/i,/^ماي/i,/^يون/i,/^يول/i,/^غشت/i,/^ش/i,/^أك/i,/^ن/i,/^د/i]},defaultParseWidth:"any"}),day:Fa({matchPatterns:{narrow:/^[حنثرخجس]/i,short:/^(أحد|إثنين|ثلاثاء|أربعاء|خميس|جمعة|سبت)/i,abbreviated:/^(أحد|إثن|ثلا|أرب|خمي|جمعة|سبت)/i,wide:/^(الأحد|الإثنين|الثلاثاء|الأربعاء|الخميس|الجمعة|السبت)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^ح/i,/^ن/i,/^ث/i,/^ر/i,/^خ/i,/^ج/i,/^س/i],wide:[/^الأحد/i,/^الإثنين/i,/^الثلاثاء/i,/^الأربعاء/i,/^الخميس/i,/^الجمعة/i,/^السبت/i],any:[/^أح/i,/^إث/i,/^ث/i,/^أر/i,/^خ/i,/^ج/i,/^س/i]},defaultParseWidth:"any"}),dayPeriod:Fa({matchPatterns:{narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},defaultParseWidth:"any"})},options:{weekStartsOn:1,firstWeekContainsDate:1}},Zn={lessThanXSeconds:{one:"أقل من ثانية واحدة",two:"أقل من ثانتين",threeToTen:"أقل من {{count}} ثواني",other:"أقل من {{count}} ثانية"},xSeconds:{one:"ثانية واحدة",two:"ثانتين",threeToTen:"{{count}} ثواني",other:"{{count}} ثانية"},halfAMinute:"نصف دقيقة",lessThanXMinutes:{one:"أقل من دقيقة",two:"أقل من دقيقتين",threeToTen:"أقل من {{count}} دقائق",other:"أقل من {{count}} دقيقة"},xMinutes:{one:"دقيقة واحدة",two:"دقيقتين",threeToTen:"{{count}} دقائق",other:"{{count}} دقيقة"},aboutXHours:{one:"ساعة واحدة تقريباً",two:"ساعتين تقريباً",threeToTen:"{{count}} ساعات تقريباً",other:"{{count}} ساعة تقريباً"},xHours:{one:"ساعة واحدة",two:"ساعتين",threeToTen:"{{count}} ساعات",other:"{{count}} ساعة"},xDays:{one:"يوم واحد",two:"يومين",threeToTen:"{{count}} أيام",other:"{{count}} يوم"},aboutXWeeks:{one:"أسبوع واحد تقريباً",two:"أسبوعين تقريباً",threeToTen:"{{count}} أسابيع تقريباً",other:"{{count}} أسبوع تقريباً"},xWeeks:{one:"أسبوع واحد",two:"أسبوعين",threeToTen:"{{count}} أسابيع",other:"{{count}} أسبوع"},aboutXMonths:{one:"شهر واحد تقريباً",two:"شهرين تقريباً",threeToTen:"{{count}} أشهر تقريباً",other:"{{count}} شهر تقريباً"},xMonths:{one:"شهر واحد",two:"شهرين",threeToTen:"{{count}} أشهر",other:"{{count}} شهر"},aboutXYears:{one:"عام واحد تقريباً",two:"عامين تقريباً",threeToTen:"{{count}} أعوام تقريباً",other:"{{count}} عام تقريباً"},xYears:{one:"عام واحد",two:"عامين",threeToTen:"{{count}} أعوام",other:"{{count}} عام"},overXYears:{one:"أكثر من عام",two:"أكثر من عامين",threeToTen:"أكثر من {{count}} أعوام",other:"أكثر من {{count}} عام"},almostXYears:{one:"عام واحد تقريباً",two:"عامين تقريباً",threeToTen:"{{count}} أعوام تقريباً",other:"{{count}} عام تقريباً"}},_n=function(e,t,a){var n,i=Zn[e];return n="string"==typeof i?i:1===t?i.one:2===t?i.two:t<=10?i.threeToTen.replace("{{count}}",String(t)):i.other.replace("{{count}}",String(t)),null!=a&&a.addSuffix?a.comparison&&a.comparison>0?"في خلال "+n:"منذ "+n:n},$n={date:Qa({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:Qa({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:Qa({formats:{full:"{{date}} 'عند' {{time}}",long:"{{date}} 'عند' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},ei={lastWeek:"'أخر' eeee 'عند' p",yesterday:"'أمس عند' p",today:"'اليوم عند' p",tomorrow:"'غداً عند' p",nextWeek:"eeee 'عند' p",other:"P"},ti={code:"ar-SA",formatDistance:_n,formatLong:$n,formatRelative:function(e,t,a,n){return ei[e]},localize:{ordinalNumber:function(e){return String(e)},era:Ra({values:{narrow:["ق","ب"],abbreviated:["ق.م.","ب.م."],wide:["قبل الميلاد","بعد الميلاد"]},defaultWidth:"wide"}),quarter:Ra({values:{narrow:["1","2","3","4"],abbreviated:["ر1","ر2","ر3","ر4"],wide:["الربع الأول","الربع الثاني","الربع الثالث","الربع الرابع"]},defaultWidth:"wide",argumentCallback:function(e){return e-1}}),month:Ra({values:{narrow:["ي","ف","م","أ","م","ي","ي","أ","س","أ","ن","د"],abbreviated:["ينا","فبر","مارس","أبريل","مايو","يونـ","يولـ","أغسـ","سبتـ","أكتـ","نوفـ","ديسـ"],wide:["يناير","فبراير","مارس","أبريل","مايو","يونيو","يوليو","أغسطس","سبتمبر","أكتوبر","نوفمبر","ديسمبر"]},defaultWidth:"wide"}),day:Ra({values:{narrow:["ح","ن","ث","ر","خ","ج","س"],short:["أحد","اثنين","ثلاثاء","أربعاء","خميس","جمعة","سبت"],abbreviated:["أحد","اثنـ","ثلا","أربـ","خميـ","جمعة","سبت"],wide:["الأحد","الاثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"]},defaultWidth:"wide"}),dayPeriod:Ra({values:{narrow:{am:"ص",pm:"م",midnight:"ن",noon:"ظ",morning:"صباحاً",afternoon:"بعد الظهر",evening:"مساءاً",night:"ليلاً"},abbreviated:{am:"ص",pm:"م",midnight:"نصف الليل",noon:"ظهر",morning:"صباحاً",afternoon:"بعد الظهر",evening:"مساءاً",night:"ليلاً"},wide:{am:"ص",pm:"م",midnight:"نصف الليل",noon:"ظهر",morning:"صباحاً",afternoon:"بعد الظهر",evening:"مساءاً",night:"ليلاً"}},defaultWidth:"wide",formattingValues:{narrow:{am:"ص",pm:"م",midnight:"ن",noon:"ظ",morning:"في الصباح",afternoon:"بعد الظـهر",evening:"في المساء",night:"في الليل"},abbreviated:{am:"ص",pm:"م",midnight:"نصف الليل",noon:"ظهر",morning:"في الصباح",afternoon:"بعد الظهر",evening:"في المساء",night:"في الليل"},wide:{am:"ص",pm:"م",midnight:"نصف الليل",noon:"ظهر",morning:"صباحاً",afternoon:"بعد الظـهر",evening:"في المساء",night:"في الليل"}},defaultFormattingWidth:"wide"})},match:{ordinalNumber:$a({matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:function(e){return parseInt(e,10)}}),era:Fa({matchPatterns:{narrow:/^(ق|ب)/i,abbreviated:/^(ق\.?\s?م\.?|ق\.?\s?م\.?\s?|a\.?\s?d\.?|c\.?\s?)/i,wide:/^(قبل الميلاد|قبل الميلاد|بعد الميلاد|بعد الميلاد)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^قبل/i,/^بعد/i]},defaultParseWidth:"any"}),quarter:Fa({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^ر[1234]/i,wide:/^الربع [1234]/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:function(e){return e+1}}),month:Fa({matchPatterns:{narrow:/^[يفمأمسند]/i,abbreviated:/^(ين|ف|مار|أب|ماي|يون|يول|أغ|س|أك|ن|د)/i,wide:/^(ين|ف|مار|أب|ماي|يون|يول|أغ|س|أك|ن|د)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^ي/i,/^ف/i,/^م/i,/^أ/i,/^م/i,/^ي/i,/^ي/i,/^أ/i,/^س/i,/^أ/i,/^ن/i,/^د/i],any:[/^ين/i,/^ف/i,/^مار/i,/^أب/i,/^ماي/i,/^يون/i,/^يول/i,/^أغ/i,/^س/i,/^أك/i,/^ن/i,/^د/i]},defaultParseWidth:"any"}),day:Fa({matchPatterns:{narrow:/^[حنثرخجس]/i,short:/^(أحد|اثنين|ثلاثاء|أربعاء|خميس|جمعة|سبت)/i,abbreviated:/^(أحد|اثن|ثلا|أرب|خمي|جمعة|سبت)/i,wide:/^(الأحد|الاثنين|الثلاثاء|الأربعاء|الخميس|الجمعة|السبت)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^ح/i,/^ن/i,/^ث/i,/^ر/i,/^خ/i,/^ج/i,/^س/i],wide:[/^الأحد/i,/^الاثنين/i,/^الثلاثاء/i,/^الأربعاء/i,/^الخميس/i,/^الجمعة/i,/^السبت/i],any:[/^أح/i,/^اث/i,/^ث/i,/^أر/i,/^خ/i,/^ج/i,/^س/i]},defaultParseWidth:"any"}),dayPeriod:Fa({matchPatterns:{narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},defaultParseWidth:"any"})},options:{weekStartsOn:0,firstWeekContainsDate:1}},ai={lessThanXSeconds:{one:"أقل من ثانية",two:"أقل من زوز ثواني",threeToTen:"أقل من {{count}} ثواني",other:"أقل من {{count}} ثانية"},xSeconds:{one:"ثانية",two:"زوز ثواني",threeToTen:"{{count}} ثواني",other:"{{count}} ثانية"},halfAMinute:"نص دقيقة",lessThanXMinutes:{one:"أقل من دقيقة",two:"أقل من دقيقتين",threeToTen:"أقل من {{count}} دقايق",other:"أقل من {{count}} دقيقة"},xMinutes:{one:"دقيقة",two:"دقيقتين",threeToTen:"{{count}} دقايق",other:"{{count}} دقيقة"},aboutXHours:{one:"ساعة تقريب",two:"ساعتين تقريب",threeToTen:"{{count}} سوايع تقريب",other:"{{count}} ساعة تقريب"},xHours:{one:"ساعة",two:"ساعتين",threeToTen:"{{count}} سوايع",other:"{{count}} ساعة"},xDays:{one:"نهار",two:"نهارين",threeToTen:"{{count}} أيام",other:"{{count}} يوم"},aboutXWeeks:{one:"جمعة تقريب",two:"جمعتين تقريب",threeToTen:"{{count}} جماع تقريب",other:"{{count}} جمعة تقريب"},xWeeks:{one:"جمعة",two:"جمعتين",threeToTen:"{{count}} جماع",other:"{{count}} جمعة"},aboutXMonths:{one:"شهر تقريب",two:"شهرين تقريب",threeToTen:"{{count}} أشهرة تقريب",other:"{{count}} شهر تقريب"},xMonths:{one:"شهر",two:"شهرين",threeToTen:"{{count}} أشهرة",other:"{{count}} شهر"},aboutXYears:{one:"عام تقريب",two:"عامين تقريب",threeToTen:"{{count}} أعوام تقريب",other:"{{count}} عام تقريب"},xYears:{one:"عام",two:"عامين",threeToTen:"{{count}} أعوام",other:"{{count}} عام"},overXYears:{one:"أكثر من عام",two:"أكثر من عامين",threeToTen:"أكثر من {{count}} أعوام",other:"أكثر من {{count}} عام"},almostXYears:{one:"عام تقريب",two:"عامين تقريب",threeToTen:"{{count}} أعوام تقريب",other:"{{count}} عام تقريب"}},ni=function(e,t,a){var n,i=ai[e];return n="string"==typeof i?i:1===t?i.one:2===t?i.two:t<=10?i.threeToTen.replace("{{count}}",String(t)):i.other.replace("{{count}}",String(t)),null!=a&&a.addSuffix?a.comparison&&a.comparison>0?"في "+n:"عندو "+n:n},ii={date:Qa({formats:{full:"EEEE، do MMMM y",long:"do MMMM y",medium:"d MMM y",short:"dd/MM/yyyy"},defaultWidth:"full"}),time:Qa({formats:{full:"HH:mm:ss",long:"HH:mm:ss",medium:"HH:mm:ss",short:"HH:mm"},defaultWidth:"full"}),dateTime:Qa({formats:{full:"{{date}} 'مع' {{time}}",long:"{{date}} 'مع' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},ri={lastWeek:"eeee 'إلي فات مع' p",yesterday:"'البارح مع' p",today:"'اليوم مع' p",tomorrow:"'غدوة مع' p",nextWeek:"eeee 'الجمعة الجاية مع' p 'نهار'",other:"P"},oi={code:"ar-TN",formatDistance:ni,formatLong:ii,formatRelative:function(e){return ri[e]},localize:{ordinalNumber:function(e){return String(e)},era:Ra({values:{narrow:["ق","ب"],abbreviated:["ق.م.","ب.م."],wide:["قبل الميلاد","بعد الميلاد"]},defaultWidth:"wide"}),quarter:Ra({values:{narrow:["1","2","3","4"],abbreviated:["ر1","ر2","ر3","ر4"],wide:["الربع الأول","الربع الثاني","الربع الثالث","الربع الرابع"]},defaultWidth:"wide",argumentCallback:function(e){return e-1}}),month:Ra({values:{narrow:["د","ن","أ","س","أ","ج","ج","م","أ","م","ف","ج"],abbreviated:["جانفي","فيفري","مارس","أفريل","ماي","جوان","جويلية","أوت","سبتمبر","أكتوبر","نوفمبر","ديسمبر"],wide:["جانفي","فيفري","مارس","أفريل","ماي","جوان","جويلية","أوت","سبتمبر","أكتوبر","نوفمبر","ديسمبر"]},defaultWidth:"wide"}),day:Ra({values:{narrow:["ح","ن","ث","ر","خ","ج","س"],short:["أحد","اثنين","ثلاثاء","أربعاء","خميس","جمعة","سبت"],abbreviated:["أحد","اثنين","ثلاثاء","أربعاء","خميس","جمعة","سبت"],wide:["الأحد","الاثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"]},defaultWidth:"wide"}),dayPeriod:Ra({values:{narrow:{am:"ص",pm:"ع",morning:"الصباح",noon:"القايلة",afternoon:"بعد القايلة",evening:"العشية",night:"الليل",midnight:"نص الليل"},abbreviated:{am:"ص",pm:"ع",morning:"الصباح",noon:"القايلة",afternoon:"بعد القايلة",evening:"العشية",night:"الليل",midnight:"نص الليل"},wide:{am:"ص",pm:"ع",morning:"الصباح",noon:"القايلة",afternoon:"بعد القايلة",evening:"العشية",night:"الليل",midnight:"نص الليل"}},defaultWidth:"wide",formattingValues:{narrow:{am:"ص",pm:"ع",morning:"في الصباح",noon:"في القايلة",afternoon:"بعد القايلة",evening:"في العشية",night:"في الليل",midnight:"نص الليل"},abbreviated:{am:"ص",pm:"ع",morning:"في الصباح",noon:"في القايلة",afternoon:"بعد القايلة",evening:"في العشية",night:"في الليل",midnight:"نص الليل"},wide:{am:"ص",pm:"ع",morning:"في الصباح",noon:"في القايلة",afternoon:"بعد القايلة",evening:"في العشية",night:"في الليل",midnight:"نص الليل"}},defaultFormattingWidth:"wide"})},match:{ordinalNumber:$a({matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:function(e){return parseInt(e,10)}}),era:Fa({matchPatterns:{narrow:/[قب]/,abbreviated:/[قب]\.م\./,wide:/(قبل|بعد) الميلاد/},defaultMatchWidth:"wide",parsePatterns:{any:[/قبل/,/بعد/]},defaultParseWidth:"any"}),quarter:Fa({matchPatterns:{narrow:/^[1234]/i,abbreviated:/ر[1234]/,wide:/الربع (الأول|الثاني|الثالث|الرابع)/},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:function(e){return e+1}}),month:Fa({matchPatterns:{narrow:/^[جفمأسند]/,abbreviated:/^(جانفي|فيفري|مارس|أفريل|ماي|جوان|جويلية|أوت|سبتمبر|أكتوبر|نوفمبر|ديسمبر)/,wide:/^(جانفي|فيفري|مارس|أفريل|ماي|جوان|جويلية|أوت|سبتمبر|أكتوبر|نوفمبر|ديسمبر)/},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^ج/i,/^ف/i,/^م/i,/^أ/i,/^م/i,/^ج/i,/^ج/i,/^أ/i,/^س/i,/^أ/i,/^ن/i,/^د/i],any:[/^جانفي/i,/^فيفري/i,/^مارس/i,/^أفريل/i,/^ماي/i,/^جوان/i,/^جويلية/i,/^أوت/i,/^سبتمبر/i,/^أكتوبر/i,/^نوفمبر/i,/^ديسمبر/i]},defaultParseWidth:"any"}),day:Fa({matchPatterns:{narrow:/^[حنثرخجس]/i,short:/^(أحد|اثنين|ثلاثاء|أربعاء|خميس|جمعة|سبت)/i,abbreviated:/^(أحد|اثنين|ثلاثاء|أربعاء|خميس|جمعة|سبت)/i,wide:/^(الأحد|الاثنين|الثلاثاء|الأربعاء|الخميس|الجمعة|السبت)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^ح/i,/^ن/i,/^ث/i,/^ر/i,/^خ/i,/^ج/i,/^س/i],wide:[/^الأحد/i,/^الاثنين/i,/^الثلاثاء/i,/^الأربعاء/i,/^الخميس/i,/^الجمعة/i,/^السبت/i],any:[/^أح/i,/^اث/i,/^ث/i,/^أر/i,/^خ/i,/^ج/i,/^س/i]},defaultParseWidth:"any"}),dayPeriod:Fa({matchPatterns:{narrow:/^(ص|ع|ن ل|ل|(في|مع) (صباح|قايلة|عشية|ليل))/,any:/^([صع]|نص الليل|قايلة|(في|مع) (صباح|قايلة|عشية|ليل))/},defaultMatchWidth:"any",parsePatterns:{any:{am:/^ص/,pm:/^ع/,midnight:/نص الليل/,noon:/قايلة/,afternoon:/بعد القايلة/,morning:/صباح/,evening:/عشية/,night:/ليل/}},defaultParseWidth:"any"})},options:{weekStartsOn:1,firstWeekContainsDate:1}},di={lessThanXSeconds:{one:"bir saniyədən az",other:"{{count}} bir saniyədən az"},xSeconds:{one:"1 saniyə",other:"{{count}} saniyə"},halfAMinute:"yarım dəqiqə",lessThanXMinutes:{one:"bir dəqiqədən az",other:"{{count}} bir dəqiqədən az"},xMinutes:{one:"bir dəqiqə",other:"{{count}} dəqiqə"},aboutXHours:{one:"təxminən 1 saat",other:"təxminən {{count}} saat"},xHours:{one:"1 saat",other:"{{count}} saat"},xDays:{one:"1 gün",other:"{{count}} gün"},aboutXWeeks:{one:"təxminən 1 həftə",other:"təxminən {{count}} həftə"},xWeeks:{one:"1 həftə",other:"{{count}} həftə"},aboutXMonths:{one:"təxminən 1 ay",other:"təxminən {{count}} ay"},xMonths:{one:"1 ay",other:"{{count}} ay"},aboutXYears:{one:"təxminən 1 il",other:"təxminən {{count}} il"},xYears:{one:"1 il",other:"{{count}} il"},overXYears:{one:"1 ildən çox",other:"{{count}} ildən çox"},almostXYears:{one:"demək olar ki 1 il",other:"demək olar ki {{count}} il"}},si=function(e,t,a){var n,i=di[e];return n="string"==typeof i?i:1===t?i.one:i.other.replace("{{count}}",String(t)),null!=a&&a.addSuffix?a.comparison&&a.comparison>0?n+" sonra":n+" əvvəl":n},ui={date:Qa({formats:{full:"EEEE, do MMMM y 'il'",long:"do MMMM y 'il'",medium:"d MMM y 'il'",short:"dd.MM.yyyy"},defaultWidth:"full"}),time:Qa({formats:{full:"H:mm:ss zzzz",long:"H:mm:ss z",medium:"H:mm:ss",short:"H:mm"},defaultWidth:"full"}),dateTime:Qa({formats:{full:"{{date}} {{time}} - 'də'",long:"{{date}} {{time}} - 'də'",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},mi={lastWeek:"'sonuncu' eeee p -'də'",yesterday:"'dünən' p -'də'",today:"'bugün' p -'də'",tomorrow:"'sabah' p -'də'",nextWeek:"eeee p -'də'",other:"P"},li=function(e,t,a,n){return mi[e]},hi={1:"-inci",5:"-inci",8:"-inci",70:"-inci",80:"-inci",2:"-nci",7:"-nci",20:"-nci",50:"-nci",3:"-üncü",4:"-üncü",100:"-üncü",6:"-ncı",9:"-uncu",10:"-uncu",30:"-uncu",60:"-ıncı",90:"-ıncı"},ci={ordinalNumber:function(e,t){var a=Number(e),n=function(e){if(0===e)return e+"-ıncı";var t=e%10,a=e%100-t,n=e>=100?100:null;return hi[t]?hi[t]:hi[a]?hi[a]:null!==n?hi[n]:""}(a);return a+n},era:Ra({values:{narrow:["e.ə","b.e"],abbreviated:["e.ə","b.e"],wide:["eramızdan əvvəl","bizim era"]},defaultWidth:"wide"}),quarter:Ra({values:{narrow:["1","2","3","4"],abbreviated:["K1","K2","K3","K4"],wide:["1ci kvartal","2ci kvartal","3cü kvartal","4cü kvartal"]},defaultWidth:"wide",argumentCallback:function(e){return e-1}}),month:Ra({values:{narrow:["Y","F","M","A","M","İ","İ","A","S","O","N","D"],abbreviated:["Yan","Fev","Mar","Apr","May","İyun","İyul","Avq","Sen","Okt","Noy","Dek"],wide:["Yanvar","Fevral","Mart","Aprel","May","İyun","İyul","Avqust","Sentyabr","Oktyabr","Noyabr","Dekabr"]},defaultWidth:"wide"}),day:Ra({values:{narrow:["B.","B.e","Ç.a","Ç.","C.a","C.","Ş."],short:["B.","B.e","Ç.a","Ç.","C.a","C.","Ş."],abbreviated:["Baz","Baz.e","Çər.a","Çər","Cüm.a","Cüm","Şə"],wide:["Bazar","Bazar ertəsi","Çərşənbə axşamı","Çərşənbə","Cümə axşamı","Cümə","Şənbə"]},defaultWidth:"wide"}),dayPeriod:Ra({values:{narrow:{am:"am",pm:"pm",midnight:"gecəyarı",noon:"gün",morning:"səhər",afternoon:"gündüz",evening:"axşam",night:"gecə"},abbreviated:{am:"AM",pm:"PM",midnight:"gecəyarı",noon:"gün",morning:"səhər",afternoon:"gündüz",evening:"axşam",night:"gecə"},wide:{am:"a.m.",pm:"p.m.",midnight:"gecəyarı",noon:"gün",morning:"səhər",afternoon:"gündüz",evening:"axşam",night:"gecə"}},defaultWidth:"wide",formattingValues:{narrow:{am:"a",pm:"p",midnight:"gecəyarı",noon:"gün",morning:"səhər",afternoon:"gündüz",evening:"axşam",night:"gecə"},abbreviated:{am:"AM",pm:"PM",midnight:"gecəyarı",noon:"gün",morning:"səhər",afternoon:"gündüz",evening:"axşam",night:"gecə"},wide:{am:"a.m.",pm:"p.m.",midnight:"gecəyarı",noon:"gün",morning:"səhər",afternoon:"gündüz",evening:"axşam",night:"gecə"}},defaultFormattingWidth:"wide"})},fi={code:"az",formatDistance:si,formatLong:ui,formatRelative:li,localize:ci,match:{ordinalNumber:$a({matchPattern:/^(\d+)(-?(ci|inci|nci|uncu|üncü|ncı))?/i,parsePattern:/\d+/i,valueCallback:function(e){return parseInt(e,10)}}),era:Fa({matchPatterns:{narrow:/^(b|a)$/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)$/i,wide:/^(bizim eradan əvvəl|bizim era)$/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^b$/i,/^(a|c)$/i]},defaultParseWidth:"any"}),quarter:Fa({matchPatterns:{narrow:/^[1234]$/i,abbreviated:/^K[1234]$/i,wide:/^[1234](ci)? kvartal$/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:function(e){return e+1}}),month:Fa({matchPatterns:{narrow:/^[(?-i)yfmaisond]$/i,abbreviated:/^(Yan|Fev|Mar|Apr|May|İyun|İyul|Avq|Sen|Okt|Noy|Dek)$/i,wide:/^(Yanvar|Fevral|Mart|Aprel|May|İyun|İyul|Avgust|Sentyabr|Oktyabr|Noyabr|Dekabr)$/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^[(?-i)y]$/i,/^[(?-i)f]$/i,/^[(?-i)m]$/i,/^[(?-i)a]$/i,/^[(?-i)m]$/i,/^[(?-i)i]$/i,/^[(?-i)i]$/i,/^[(?-i)a]$/i,/^[(?-i)s]$/i,/^[(?-i)o]$/i,/^[(?-i)n]$/i,/^[(?-i)d]$/i],abbreviated:[/^Yan$/i,/^Fev$/i,/^Mar$/i,/^Apr$/i,/^May$/i,/^İyun$/i,/^İyul$/i,/^Avg$/i,/^Sen$/i,/^Okt$/i,/^Noy$/i,/^Dek$/i],wide:[/^Yanvar$/i,/^Fevral$/i,/^Mart$/i,/^Aprel$/i,/^May$/i,/^İyun$/i,/^İyul$/i,/^Avgust$/i,/^Sentyabr$/i,/^Oktyabr$/i,/^Noyabr$/i,/^Dekabr$/i]},defaultParseWidth:"narrow"}),day:Fa({matchPatterns:{narrow:/^(B\.|B\.e|Ç\.a|Ç\.|C\.a|C\.|Ş\.)$/i,short:/^(B\.|B\.e|Ç\.a|Ç\.|C\.a|C\.|Ş\.)$/i,abbreviated:/^(Baz\.e|Çər|Çər\.a|Cüm|Cüm\.a|Şə)$/i,wide:/^(Bazar|Bazar ertəsi|Çərşənbə axşamı|Çərşənbə|Cümə axşamı|Cümə|Şənbə)$/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^B\.$/i,/^B\.e$/i,/^Ç\.a$/i,/^Ç\.$/i,/^C\.a$/i,/^C\.$/i,/^Ş\.$/i],abbreviated:[/^Baz$/i,/^Baz\.e$/i,/^Çər\.a$/i,/^Çər$/i,/^Cüm\.a$/i,/^Cüm$/i,/^Şə$/i],wide:[/^Bazar$/i,/^Bazar ertəsi$/i,/^Çərşənbə axşamı$/i,/^Çərşənbə$/i,/^Cümə axşamı$/i,/^Cümə$/i,/^Şənbə$/i],any:[/^B\.$/i,/^B\.e$/i,/^Ç\.a$/i,/^Ç\.$/i,/^C\.a$/i,/^C\.$/i,/^Ş\.$/i]},defaultParseWidth:"any"}),dayPeriod:Fa({matchPatterns:{narrow:/^(a|p|gecəyarı|gün|səhər|gündüz|axşam|gecə)$/i,any:/^(am|pm|a\.m\.|p\.m\.|AM|PM|gecəyarı|gün|səhər|gündüz|axşam|gecə)$/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a$/i,pm:/^p$/i,midnight:/^gecəyarı$/i,noon:/^gün$/i,morning:/səhər$/i,afternoon:/gündüz$/i,evening:/axşam$/i,night:/gecə$/i}},defaultParseWidth:"any"})},options:{weekStartsOn:1,firstWeekContainsDate:1}};function gi(e,t){if(void 0!==e.one&&1===t)return e.one;var a=t%10,n=t%100;return 1===a&&11!==n?e.singularNominative.replace("{{count}}",String(t)):a>=2&&a<=4&&(n<10||n>20)?e.singularGenitive.replace("{{count}}",String(t)):e.pluralGenitive.replace("{{count}}",String(t))}function pi(e){return function(t,a){return a&&a.addSuffix?a.comparison&&a.comparison>0?e.future?gi(e.future,t):"праз "+gi(e.regular,t):e.past?gi(e.past,t):gi(e.regular,t)+" таму":gi(e.regular,t)}}var vi={lessThanXSeconds:pi({regular:{one:"менш за секунду",singularNominative:"менш за {{count}} секунду",singularGenitive:"менш за {{count}} секунды",pluralGenitive:"менш за {{count}} секунд"},future:{one:"менш, чым праз секунду",singularNominative:"менш, чым праз {{count}} секунду",singularGenitive:"менш, чым праз {{count}} секунды",pluralGenitive:"менш, чым праз {{count}} секунд"}}),xSeconds:pi({regular:{singularNominative:"{{count}} секунда",singularGenitive:"{{count}} секунды",pluralGenitive:"{{count}} секунд"},past:{singularNominative:"{{count}} секунду таму",singularGenitive:"{{count}} секунды таму",pluralGenitive:"{{count}} секунд таму"},future:{singularNominative:"праз {{count}} секунду",singularGenitive:"праз {{count}} секунды",pluralGenitive:"праз {{count}} секунд"}}),halfAMinute:function(e,t){return t&&t.addSuffix?t.comparison&&t.comparison>0?"праз паўхвіліны":"паўхвіліны таму":"паўхвіліны"},lessThanXMinutes:pi({regular:{one:"менш за хвіліну",singularNominative:"менш за {{count}} хвіліну",singularGenitive:"менш за {{count}} хвіліны",pluralGenitive:"менш за {{count}} хвілін"},future:{one:"менш, чым праз хвіліну",singularNominative:"менш, чым праз {{count}} хвіліну",singularGenitive:"менш, чым праз {{count}} хвіліны",pluralGenitive:"менш, чым праз {{count}} хвілін"}}),xMinutes:pi({regular:{singularNominative:"{{count}} хвіліна",singularGenitive:"{{count}} хвіліны",pluralGenitive:"{{count}} хвілін"},past:{singularNominative:"{{count}} хвіліну таму",singularGenitive:"{{count}} хвіліны таму",pluralGenitive:"{{count}} хвілін таму"},future:{singularNominative:"праз {{count}} хвіліну",singularGenitive:"праз {{count}} хвіліны",pluralGenitive:"праз {{count}} хвілін"}}),aboutXHours:pi({regular:{singularNominative:"каля {{count}} гадзіны",singularGenitive:"каля {{count}} гадзін",pluralGenitive:"каля {{count}} гадзін"},future:{singularNominative:"прыблізна праз {{count}} гадзіну",singularGenitive:"прыблізна праз {{count}} гадзіны",pluralGenitive:"прыблізна праз {{count}} гадзін"}}),xHours:pi({regular:{singularNominative:"{{count}} гадзіна",singularGenitive:"{{count}} гадзіны",pluralGenitive:"{{count}} гадзін"},past:{singularNominative:"{{count}} гадзіну таму",singularGenitive:"{{count}} гадзіны таму",pluralGenitive:"{{count}} гадзін таму"},future:{singularNominative:"праз {{count}} гадзіну",singularGenitive:"праз {{count}} гадзіны",pluralGenitive:"праз {{count}} гадзін"}}),xDays:pi({regular:{singularNominative:"{{count}} дзень",singularGenitive:"{{count}} дні",pluralGenitive:"{{count}} дзён"}}),aboutXWeeks:pi({regular:{singularNominative:"каля {{count}} месяца",singularGenitive:"каля {{count}} месяцаў",pluralGenitive:"каля {{count}} месяцаў"},future:{singularNominative:"прыблізна праз {{count}} месяц",singularGenitive:"прыблізна праз {{count}} месяцы",pluralGenitive:"прыблізна праз {{count}} месяцаў"}}),xWeeks:pi({regular:{singularNominative:"{{count}} месяц",singularGenitive:"{{count}} месяцы",pluralGenitive:"{{count}} месяцаў"}}),aboutXMonths:pi({regular:{singularNominative:"каля {{count}} месяца",singularGenitive:"каля {{count}} месяцаў",pluralGenitive:"каля {{count}} месяцаў"},future:{singularNominative:"прыблізна праз {{count}} месяц",singularGenitive:"прыблізна праз {{count}} месяцы",pluralGenitive:"прыблізна праз {{count}} месяцаў"}}),xMonths:pi({regular:{singularNominative:"{{count}} месяц",singularGenitive:"{{count}} месяцы",pluralGenitive:"{{count}} месяцаў"}}),aboutXYears:pi({regular:{singularNominative:"каля {{count}} года",singularGenitive:"каля {{count}} гадоў",pluralGenitive:"каля {{count}} гадоў"},future:{singularNominative:"прыблізна праз {{count}} год",singularGenitive:"прыблізна праз {{count}} гады",pluralGenitive:"прыблізна праз {{count}} гадоў"}}),xYears:pi({regular:{singularNominative:"{{count}} год",singularGenitive:"{{count}} гады",pluralGenitive:"{{count}} гадоў"}}),overXYears:pi({regular:{singularNominative:"больш за {{count}} год",singularGenitive:"больш за {{count}} гады",pluralGenitive:"больш за {{count}} гадоў"},future:{singularNominative:"больш, чым праз {{count}} год",singularGenitive:"больш, чым праз {{count}} гады",pluralGenitive:"больш, чым праз {{count}} гадоў"}}),almostXYears:pi({regular:{singularNominative:"амаль {{count}} год",singularGenitive:"амаль {{count}} гады",pluralGenitive:"амаль {{count}} гадоў"},future:{singularNominative:"амаль праз {{count}} год",singularGenitive:"амаль праз {{count}} гады",pluralGenitive:"амаль праз {{count}} гадоў"}})},bi=function(e,t,a){return a=a||{},vi[e](t,a)},wi={date:Qa({formats:{full:"EEEE, d MMMM y 'г.'",long:"d MMMM y 'г.'",medium:"d MMM y 'г.'",short:"dd.MM.y"},defaultWidth:"full"}),time:Qa({formats:{full:"H:mm:ss zzzz",long:"H:mm:ss z",medium:"H:mm:ss",short:"H:mm"},defaultWidth:"full"}),dateTime:Qa({formats:{any:"{{date}}, {{time}}"},defaultWidth:"any"})};function yi(e,t,a){na(2,arguments);var n=va(e,a),i=va(t,a);return n.getTime()===i.getTime()}var Ai=["нядзелю","панядзелак","аўторак","сераду","чацвер","пятніцу","суботу"];function ki(e){return"'у "+Ai[e]+" а' p"}var Mi={lastWeek:function(e,t,a){var n=ra(e),i=n.getUTCDay();return yi(n,t,a)?ki(i):function(e){var t=Ai[e];switch(e){case 0:case 3:case 5:case 6:return"'у мінулую "+t+" а' p";case 1:case 2:case 4:return"'у мінулы "+t+" а' p"}}(i)},yesterday:"'учора а' p",today:"'сёння а' p",tomorrow:"'заўтра а' p",nextWeek:function(e,t,a){var n=ra(e),i=n.getUTCDay();return yi(n,t,a)?ki(i):function(e){var t=Ai[e];switch(e){case 0:case 3:case 5:case 6:return"'у наступную "+t+" а' p";case 1:case 2:case 4:return"'у наступны "+t+" а' p"}}(i)},other:"P"},Pi=function(e,t,a,n){var i=Mi[e];return"function"==typeof i?i(t,a,n):i},Wi={code:"be",formatDistance:bi,formatLong:wi,formatRelative:Pi,localize:{ordinalNumber:function(e,t){var a=String(null==t?void 0:t.unit),n=Number(e);return n+("date"===a?"-га":"hour"===a||"minute"===a||"second"===a?"-я":n%10!=2&&n%10!=3||n%100==12||n%100==13?"-ы":"-і")},era:Ra({values:{narrow:["да н.э.","н.э."],abbreviated:["да н. э.","н. э."],wide:["да нашай эры","нашай эры"]},defaultWidth:"wide"}),quarter:Ra({values:{narrow:["1","2","3","4"],abbreviated:["1-ы кв.","2-і кв.","3-і кв.","4-ы кв."],wide:["1-ы квартал","2-і квартал","3-і квартал","4-ы квартал"]},defaultWidth:"wide",argumentCallback:function(e){return e-1}}),month:Ra({values:{narrow:["С","Л","С","К","М","Ч","Л","Ж","В","К","Л","С"],abbreviated:["студз.","лют.","сак.","крас.","май","чэрв.","ліп.","жн.","вер.","кастр.","ліст.","снеж."],wide:["студзень","люты","сакавік","красавік","май","чэрвень","ліпень","жнівень","верасень","кастрычнік","лістапад","снежань"]},defaultWidth:"wide",formattingValues:{narrow:["С","Л","С","К","М","Ч","Л","Ж","В","К","Л","С"],abbreviated:["студз.","лют.","сак.","крас.","мая","чэрв.","ліп.","жн.","вер.","кастр.","ліст.","снеж."],wide:["студзеня","лютага","сакавіка","красавіка","мая","чэрвеня","ліпеня","жніўня","верасня","кастрычніка","лістапада","снежня"]},defaultFormattingWidth:"wide"}),day:Ra({values:{narrow:["Н","П","А","С","Ч","П","С"],short:["нд","пн","аў","ср","чц","пт","сб"],abbreviated:["нядз","пан","аўт","сер","чац","пят","суб"],wide:["нядзеля","панядзелак","аўторак","серада","чацвер","пятніца","субота"]},defaultWidth:"wide"}),dayPeriod:Ra({values:{narrow:{am:"ДП",pm:"ПП",midnight:"поўн.",noon:"поўд.",morning:"ран.",afternoon:"дзень",evening:"веч.",night:"ноч"},abbreviated:{am:"ДП",pm:"ПП",midnight:"поўн.",noon:"поўд.",morning:"ран.",afternoon:"дзень",evening:"веч.",night:"ноч"},wide:{am:"ДП",pm:"ПП",midnight:"поўнач",noon:"поўдзень",morning:"раніца",afternoon:"дзень",evening:"вечар",night:"ноч"}},defaultWidth:"any",formattingValues:{narrow:{am:"ДП",pm:"ПП",midnight:"поўн.",noon:"поўд.",morning:"ран.",afternoon:"дня",evening:"веч.",night:"ночы"},abbreviated:{am:"ДП",pm:"ПП",midnight:"поўн.",noon:"поўд.",morning:"ран.",afternoon:"дня",evening:"веч.",night:"ночы"},wide:{am:"ДП",pm:"ПП",midnight:"поўнач",noon:"поўдзень",morning:"раніцы",afternoon:"дня",evening:"вечара",night:"ночы"}},defaultFormattingWidth:"wide"})},match:{ordinalNumber:$a({matchPattern:/^(\d+)(-?(е|я|га|і|ы|ае|ая|яя|шы|гі|ці|ты|мы))?/i,parsePattern:/\d+/i,valueCallback:function(e){return parseInt(e,10)}}),era:Fa({matchPatterns:{narrow:/^((да )?н\.?\s?э\.?)/i,abbreviated:/^((да )?н\.?\s?э\.?)/i,wide:/^(да нашай эры|нашай эры|наша эра)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^д/i,/^н/i]},defaultParseWidth:"any"}),quarter:Fa({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^[1234](-?[ыі]?)? кв.?/i,wide:/^[1234](-?[ыі]?)? квартал/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:function(e){return e+1}}),month:Fa({matchPatterns:{narrow:/^[слкмчжв]/i,abbreviated:/^(студз|лют|сак|крас|ма[йя]|чэрв|ліп|жн|вер|кастр|ліст|снеж)\.?/i,wide:/^(студзен[ья]|лют(ы|ага)|сакавіка?|красавіка?|ма[йя]|чэрвен[ья]|ліпен[ья]|жні(вень|ўня)|верас(ень|ня)|кастрычніка?|лістапада?|снеж(ань|ня))/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^с/i,/^л/i,/^с/i,/^к/i,/^м/i,/^ч/i,/^л/i,/^ж/i,/^в/i,/^к/i,/^л/i,/^с/i],any:[/^ст/i,/^лю/i,/^са/i,/^кр/i,/^ма/i,/^ч/i,/^ліп/i,/^ж/i,/^в/i,/^ка/i,/^ліс/i,/^сн/i]},defaultParseWidth:"any"}),day:Fa({matchPatterns:{narrow:/^[нпасч]/i,short:/^(нд|ня|пн|па|аў|ат|ср|се|чц|ча|пт|пя|сб|су)\.?/i,abbreviated:/^(нядз?|ндз|пнд|пан|аўт|срд|сер|чцв|чац|птн|пят|суб).?/i,wide:/^(нядзел[яі]|панядзел(ак|ка)|аўтор(ак|ка)|серад[аы]|чацв(ер|ярга)|пятніц[аы]|субот[аы])/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^н/i,/^п/i,/^а/i,/^с/i,/^ч/i,/^п/i,/^с/i],any:[/^н/i,/^п[ан]/i,/^а/i,/^с[ер]/i,/^ч/i,/^п[ят]/i,/^с[уб]/i]},defaultParseWidth:"any"}),dayPeriod:Fa({matchPatterns:{narrow:/^([дп]п|поўн\.?|поўд\.?|ран\.?|дзень|дня|веч\.?|ночы?)/i,abbreviated:/^([дп]п|поўн\.?|поўд\.?|ран\.?|дзень|дня|веч\.?|ночы?)/i,wide:/^([дп]п|поўнач|поўдзень|раніц[аы]|дзень|дня|вечара?|ночы?)/i},defaultMatchWidth:"wide",parsePatterns:{any:{am:/^дп/i,pm:/^пп/i,midnight:/^поўн/i,noon:/^поўд/i,morning:/^р/i,afternoon:/^д[зн]/i,evening:/^в/i,night:/^н/i}},defaultParseWidth:"any"})},options:{weekStartsOn:1,firstWeekContainsDate:1}};function xi(e,t){if(void 0!==e.one&&1===t)return e.one;var a=t%10,n=t%100;return 1===a&&11!==n?e.singularNominative.replace("{{count}}",String(t)):a>=2&&a<=4&&(n<10||n>20)?e.singularGenitive.replace("{{count}}",String(t)):e.pluralGenitive.replace("{{count}}",String(t))}function zi(e){return function(t,a){return a&&a.addSuffix?a.comparison&&a.comparison>0?e.future?xi(e.future,t):"праз "+xi(e.regular,t):e.past?xi(e.past,t):xi(e.regular,t)+" таму":xi(e.regular,t)}}var ji={lessThanXSeconds:zi({regular:{one:"менш за секунду",singularNominative:"менш за {{count}} секунду",singularGenitive:"менш за {{count}} секунды",pluralGenitive:"менш за {{count}} секунд"},future:{one:"менш, чым праз секунду",singularNominative:"менш, чым праз {{count}} секунду",singularGenitive:"менш, чым праз {{count}} секунды",pluralGenitive:"менш, чым праз {{count}} секунд"}}),xSeconds:zi({regular:{singularNominative:"{{count}} секунда",singularGenitive:"{{count}} секунды",pluralGenitive:"{{count}} секунд"},past:{singularNominative:"{{count}} секунду таму",singularGenitive:"{{count}} секунды таму",pluralGenitive:"{{count}} секунд таму"},future:{singularNominative:"праз {{count}} секунду",singularGenitive:"праз {{count}} секунды",pluralGenitive:"праз {{count}} секунд"}}),halfAMinute:function(e,t){return t&&t.addSuffix?t.comparison&&t.comparison>0?"праз паўхвіліны":"паўхвіліны таму":"паўхвіліны"},lessThanXMinutes:zi({regular:{one:"менш за хвіліну",singularNominative:"менш за {{count}} хвіліну",singularGenitive:"менш за {{count}} хвіліны",pluralGenitive:"менш за {{count}} хвілін"},future:{one:"менш, чым праз хвіліну",singularNominative:"менш, чым праз {{count}} хвіліну",singularGenitive:"менш, чым праз {{count}} хвіліны",pluralGenitive:"менш, чым праз {{count}} хвілін"}}),xMinutes:zi({regular:{singularNominative:"{{count}} хвіліна",singularGenitive:"{{count}} хвіліны",pluralGenitive:"{{count}} хвілін"},past:{singularNominative:"{{count}} хвіліну таму",singularGenitive:"{{count}} хвіліны таму",pluralGenitive:"{{count}} хвілін таму"},future:{singularNominative:"праз {{count}} хвіліну",singularGenitive:"праз {{count}} хвіліны",pluralGenitive:"праз {{count}} хвілін"}}),aboutXHours:zi({regular:{singularNominative:"каля {{count}} гадзіны",singularGenitive:"каля {{count}} гадзін",pluralGenitive:"каля {{count}} гадзін"},future:{singularNominative:"прыблізна праз {{count}} гадзіну",singularGenitive:"прыблізна праз {{count}} гадзіны",pluralGenitive:"прыблізна праз {{count}} гадзін"}}),xHours:zi({regular:{singularNominative:"{{count}} гадзіна",singularGenitive:"{{count}} гадзіны",pluralGenitive:"{{count}} гадзін"},past:{singularNominative:"{{count}} гадзіну таму",singularGenitive:"{{count}} гадзіны таму",pluralGenitive:"{{count}} гадзін таму"},future:{singularNominative:"праз {{count}} гадзіну",singularGenitive:"праз {{count}} гадзіны",pluralGenitive:"праз {{count}} гадзін"}}),xDays:zi({regular:{singularNominative:"{{count}} дзень",singularGenitive:"{{count}} дні",pluralGenitive:"{{count}} дзён"}}),aboutXWeeks:zi({regular:{singularNominative:"каля {{count}} месяца",singularGenitive:"каля {{count}} месяцаў",pluralGenitive:"каля {{count}} месяцаў"},future:{singularNominative:"прыблізна праз {{count}} месяц",singularGenitive:"прыблізна праз {{count}} месяцы",pluralGenitive:"прыблізна праз {{count}} месяцаў"}}),xWeeks:zi({regular:{singularNominative:"{{count}} месяц",singularGenitive:"{{count}} месяцы",pluralGenitive:"{{count}} месяцаў"}}),aboutXMonths:zi({regular:{singularNominative:"каля {{count}} месяца",singularGenitive:"каля {{count}} месяцаў",pluralGenitive:"каля {{count}} месяцаў"},future:{singularNominative:"прыблізна праз {{count}} месяц",singularGenitive:"прыблізна праз {{count}} месяцы",pluralGenitive:"прыблізна праз {{count}} месяцаў"}}),xMonths:zi({regular:{singularNominative:"{{count}} месяц",singularGenitive:"{{count}} месяцы",pluralGenitive:"{{count}} месяцаў"}}),aboutXYears:zi({regular:{singularNominative:"каля {{count}} года",singularGenitive:"каля {{count}} гадоў",pluralGenitive:"каля {{count}} гадоў"},future:{singularNominative:"прыблізна праз {{count}} год",singularGenitive:"прыблізна праз {{count}} гады",pluralGenitive:"прыблізна праз {{count}} гадоў"}}),xYears:zi({regular:{singularNominative:"{{count}} год",singularGenitive:"{{count}} гады",pluralGenitive:"{{count}} гадоў"}}),overXYears:zi({regular:{singularNominative:"больш за {{count}} год",singularGenitive:"больш за {{count}} гады",pluralGenitive:"больш за {{count}} гадоў"},future:{singularNominative:"больш, чым праз {{count}} год",singularGenitive:"больш, чым праз {{count}} гады",pluralGenitive:"больш, чым праз {{count}} гадоў"}}),almostXYears:zi({regular:{singularNominative:"амаль {{count}} год",singularGenitive:"амаль {{count}} гады",pluralGenitive:"амаль {{count}} гадоў"},future:{singularNominative:"амаль праз {{count}} год",singularGenitive:"амаль праз {{count}} гады",pluralGenitive:"амаль праз {{count}} гадоў"}})},Ci=function(e,t,a){return a=a||{},ji[e](t,a)},Ti={date:Qa({formats:{full:"EEEE, d MMMM y 'г.'",long:"d MMMM y 'г.'",medium:"d MMM y 'г.'",short:"dd.MM.y"},defaultWidth:"full"}),time:Qa({formats:{full:"H:mm:ss zzzz",long:"H:mm:ss z",medium:"H:mm:ss",short:"H:mm"},defaultWidth:"full"}),dateTime:Qa({formats:{any:"{{date}}, {{time}}"},defaultWidth:"any"})},Si=["нядзелю","панядзелак","аўторак","сераду","чацьвер","пятніцу","суботу"];function Hi(e){return"'у "+Si[e]+" а' p"}var Di={lastWeek:function(e,t,a){var n=ra(e),i=n.getUTCDay();return yi(n,t,a)?Hi(i):function(e){var t=Si[e];switch(e){case 0:case 3:case 5:case 6:return"'у мінулую "+t+" а' p";case 1:case 2:case 4:return"'у мінулы "+t+" а' p"}}(i)},yesterday:"'учора а' p",today:"'сёньня а' p",tomorrow:"'заўтра а' p",nextWeek:function(e,t,a){var n=ra(e),i=n.getUTCDay();return yi(n,t,a)?Hi(i):function(e){var t=Si[e];switch(e){case 0:case 3:case 5:case 6:return"'у наступную "+t+" а' p";case 1:case 2:case 4:return"'у наступны "+t+" а' p"}}(i)},other:"P"},Ni=function(e,t,a,n){var i=Di[e];return"function"==typeof i?i(t,a,n):i},Xi={code:"be-tarask",formatDistance:Ci,formatLong:Ti,formatRelative:Ni,localize:{ordinalNumber:function(e,t){var a=String(null==t?void 0:t.unit),n=Number(e);return n+("date"===a?"-га":"hour"===a||"minute"===a||"second"===a?"-я":n%10!=2&&n%10!=3||n%100==12||n%100==13?"-ы":"-і")},era:Ra({values:{narrow:["да н.э.","н.э."],abbreviated:["да н. э.","н. э."],wide:["да нашай эры","нашай эры"]},defaultWidth:"wide"}),quarter:Ra({values:{narrow:["1","2","3","4"],abbreviated:["1-ы кв.","2-і кв.","3-і кв.","4-ы кв."],wide:["1-ы квартал","2-і квартал","3-і квартал","4-ы квартал"]},defaultWidth:"wide",argumentCallback:function(e){return e-1}}),month:Ra({values:{narrow:["С","Л","С","К","Т","Ч","Л","Ж","В","К","Л","С"],abbreviated:["студз.","лют.","сак.","крас.","трав.","чэрв.","ліп.","жн.","вер.","кастр.","ліст.","сьнеж."],wide:["студзень","люты","сакавік","красавік","травень","чэрвень","ліпень","жнівень","верасень","кастрычнік","лістапад","сьнежань"]},defaultWidth:"wide",formattingValues:{narrow:["С","Л","С","К","Т","Ч","Л","Ж","В","К","Л","С"],abbreviated:["студз.","лют.","сак.","крас.","трав.","чэрв.","ліп.","жн.","вер.","кастр.","ліст.","сьнеж."],wide:["студзеня","лютага","сакавіка","красавіка","траўня","чэрвеня","ліпеня","жніўня","верасня","кастрычніка","лістапада","сьнежня"]},defaultFormattingWidth:"wide"}),day:Ra({values:{narrow:["Н","П","А","С","Ч","П","С"],short:["нд","пн","аў","ср","чц","пт","сб"],abbreviated:["нядз","пан","аўт","сер","чаць","пят","суб"],wide:["нядзеля","панядзелак","аўторак","серада","чацьвер","пятніца","субота"]},defaultWidth:"wide"}),dayPeriod:Ra({values:{narrow:{am:"ДП",pm:"ПП",midnight:"поўн.",noon:"поўд.",morning:"ран.",afternoon:"дзень",evening:"веч.",night:"ноч"},abbreviated:{am:"ДП",pm:"ПП",midnight:"поўн.",noon:"поўд.",morning:"ран.",afternoon:"дзень",evening:"веч.",night:"ноч"},wide:{am:"ДП",pm:"ПП",midnight:"поўнач",noon:"поўдзень",morning:"раніца",afternoon:"дзень",evening:"вечар",night:"ноч"}},defaultWidth:"any",formattingValues:{narrow:{am:"ДП",pm:"ПП",midnight:"поўн.",noon:"поўд.",morning:"ран.",afternoon:"дня",evening:"веч.",night:"ночы"},abbreviated:{am:"ДП",pm:"ПП",midnight:"поўн.",noon:"поўд.",morning:"ран.",afternoon:"дня",evening:"веч.",night:"ночы"},wide:{am:"ДП",pm:"ПП",midnight:"поўнач",noon:"поўдзень",morning:"раніцы",afternoon:"дня",evening:"вечара",night:"ночы"}},defaultFormattingWidth:"wide"})},match:{ordinalNumber:$a({matchPattern:/^(\d+)(-?(е|я|га|і|ы|ае|ая|яя|шы|гі|ці|ты|мы))?/i,parsePattern:/\d+/i,valueCallback:function(e){return parseInt(e,10)}}),era:Fa({matchPatterns:{narrow:/^((да )?н\.?\s?э\.?)/i,abbreviated:/^((да )?н\.?\s?э\.?)/i,wide:/^(да нашай эры|нашай эры|наша эра)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^д/i,/^н/i]},defaultParseWidth:"any"}),quarter:Fa({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^[1234](-?[ыі]?)? кв.?/i,wide:/^[1234](-?[ыі]?)? квартал/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:function(e){return e+1}}),month:Fa({matchPatterns:{narrow:/^[слкмчжв]/i,abbreviated:/^(студз|лют|сак|крас|тр(ав)?|чэрв|ліп|жн|вер|кастр|ліст|сьнеж)\.?/i,wide:/^(студзен[ья]|лют(ы|ага)|сакавіка?|красавіка?|тра(вень|ўня)|чэрвен[ья]|ліпен[ья]|жні(вень|ўня)|верас(ень|ня)|кастрычніка?|лістапада?|сьнеж(ань|ня))/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^с/i,/^л/i,/^с/i,/^к/i,/^т/i,/^ч/i,/^л/i,/^ж/i,/^в/i,/^к/i,/^л/i,/^с/i],any:[/^ст/i,/^лю/i,/^са/i,/^кр/i,/^тр/i,/^ч/i,/^ліп/i,/^ж/i,/^в/i,/^ка/i,/^ліс/i,/^сн/i]},defaultParseWidth:"any"}),day:Fa({matchPatterns:{narrow:/^[нпасч]/i,short:/^(нд|ня|пн|па|аў|ат|ср|се|чц|ча|пт|пя|сб|су)\.?/i,abbreviated:/^(нядз?|ндз|пнд|пан|аўт|срд|сер|чцьв|чаць|птн|пят|суб).?/i,wide:/^(нядзел[яі]|панядзел(ак|ка)|аўтор(ак|ка)|серад[аы]|чацьв(ер|ярга)|пятніц[аы]|субот[аы])/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^н/i,/^п/i,/^а/i,/^с/i,/^ч/i,/^п/i,/^с/i],any:[/^н/i,/^п[ан]/i,/^а/i,/^с[ер]/i,/^ч/i,/^п[ят]/i,/^с[уб]/i]},defaultParseWidth:"any"}),dayPeriod:Fa({matchPatterns:{narrow:/^([дп]п|поўн\.?|поўд\.?|ран\.?|дзень|дня|веч\.?|ночы?)/i,abbreviated:/^([дп]п|поўн\.?|поўд\.?|ран\.?|дзень|дня|веч\.?|ночы?)/i,wide:/^([дп]п|поўнач|поўдзень|раніц[аы]|дзень|дня|вечара?|ночы?)/i},defaultMatchWidth:"wide",parsePatterns:{any:{am:/^дп/i,pm:/^пп/i,midnight:/^поўн/i,noon:/^поўд/i,morning:/^р/i,afternoon:/^д[зн]/i,evening:/^в/i,night:/^н/i}},defaultParseWidth:"any"})},options:{weekStartsOn:1,firstWeekContainsDate:1}},Ii={lessThanXSeconds:{one:"по-малко от секунда",other:"по-малко от {{count}} секунди"},xSeconds:{one:"1 секунда",other:"{{count}} секунди"},halfAMinute:"половин минута",lessThanXMinutes:{one:"по-малко от минута",other:"по-малко от {{count}} минути"},xMinutes:{one:"1 минута",other:"{{count}} минути"},aboutXHours:{one:"около час",other:"около {{count}} часа"},xHours:{one:"1 час",other:"{{count}} часа"},xDays:{one:"1 ден",other:"{{count}} дни"},aboutXWeeks:{one:"около седмица",other:"около {{count}} седмици"},xWeeks:{one:"1 седмица",other:"{{count}} седмици"},aboutXMonths:{one:"около месец",other:"около {{count}} месеца"},xMonths:{one:"1 месец",other:"{{count}} месеца"},aboutXYears:{one:"около година",other:"около {{count}} години"},xYears:{one:"1 година",other:"{{count}} години"},overXYears:{one:"над година",other:"над {{count}} години"},almostXYears:{one:"почти година",other:"почти {{count}} години"}},Ei=function(e,t,a){var n,i=Ii[e];return n="string"==typeof i?i:1===t?i.one:i.other.replace("{{count}}",String(t)),null!=a&&a.addSuffix?a.comparison&&a.comparison>0?"след "+n:"преди "+n:n},Bi={date:Qa({formats:{full:"EEEE, dd MMMM yyyy",long:"dd MMMM yyyy",medium:"dd MMM yyyy",short:"dd/MM/yyyy"},defaultWidth:"full"}),time:Qa({formats:{full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"H:mm"},defaultWidth:"full"}),dateTime:Qa({formats:{any:"{{date}} {{time}}"},defaultWidth:"any"})},Vi=["неделя","понеделник","вторник","сряда","четвъртък","петък","събота"];function Ki(e){var t=Vi[e];return 2===e?"'във "+t+" в' p":"'в "+t+" в' p"}var Ui={lastWeek:function(e,t,a){var n=ra(e),i=n.getUTCDay();return yi(n,t,a)?Ki(i):function(e){var t=Vi[e];switch(e){case 0:case 3:case 6:return"'миналата "+t+" в' p";case 1:case 2:case 4:case 5:return"'миналия "+t+" в' p"}}(i)},yesterday:"'вчера в' p",today:"'днес в' p",tomorrow:"'утре в' p",nextWeek:function(e,t,a){var n=ra(e),i=n.getUTCDay();return yi(n,t,a)?Ki(i):function(e){var t=Vi[e];switch(e){case 0:case 3:case 6:return"'следващата "+t+" в' p";case 1:case 2:case 4:case 5:return"'следващия "+t+" в' p"}}(i)},other:"P"},Gi=function(e,t,a,n){var i=Ui[e];return"function"==typeof i?i(t,a,n):i};function Oi(e,t,a,n,i){var r=function(e){return"quarter"===e}(t)?i:function(e){return"year"===e||"week"===e||"minute"===e||"second"===e}(t)?n:a;return e+"-"+r}var Qi={code:"bg",formatDistance:Ei,formatLong:Bi,formatRelative:Gi,localize:{ordinalNumber:function(e,t){var a=Number(e),n=null==t?void 0:t.unit;if(0===a)return Oi(0,n,"ев","ева","ево");if(a%1e3==0)return Oi(a,n,"ен","на","но");if(a%100==0)return Oi(a,n,"тен","тна","тно");var i=a%100;if(i>20||i<10)switch(i%10){case 1:return Oi(a,n,"ви","ва","во");case 2:return Oi(a,n,"ри","ра","ро");case 7:case 8:return Oi(a,n,"ми","ма","мо")}return Oi(a,n,"ти","та","то")},era:Ra({values:{narrow:["пр.н.е.","н.е."],abbreviated:["преди н. е.","н. е."],wide:["преди новата ера","новата ера"]},defaultWidth:"wide"}),quarter:Ra({values:{narrow:["1","2","3","4"],abbreviated:["1-во тримес.","2-ро тримес.","3-то тримес.","4-то тримес."],wide:["1-во тримесечие","2-ро тримесечие","3-то тримесечие","4-то тримесечие"]},defaultWidth:"wide",argumentCallback:function(e){return e-1}}),month:Ra({values:{abbreviated:["яну","фев","мар","апр","май","юни","юли","авг","сеп","окт","ное","дек"],wide:["януари","февруари","март","април","май","юни","юли","август","септември","октомври","ноември","декември"]},defaultWidth:"wide"}),day:Ra({values:{narrow:["Н","П","В","С","Ч","П","С"],short:["нд","пн","вт","ср","чт","пт","сб"],abbreviated:["нед","пон","вто","сря","чет","пет","съб"],wide:["неделя","понеделник","вторник","сряда","четвъртък","петък","събота"]},defaultWidth:"wide"}),dayPeriod:Ra({values:{wide:{am:"преди обяд",pm:"след обяд",midnight:"в полунощ",noon:"на обяд",morning:"сутринта",afternoon:"следобед",evening:"вечерта",night:"през нощта"}},defaultWidth:"wide"})},match:{ordinalNumber:$a({matchPattern:/^(\d+)(-?[врмт][аи]|-?т?(ен|на)|-?(ев|ева))?/i,parsePattern:/\d+/i,valueCallback:function(e){return parseInt(e,10)}}),era:Fa({matchPatterns:{narrow:/^((пр)?н\.?\s?е\.?)/i,abbreviated:/^((пр)?н\.?\s?е\.?)/i,wide:/^(преди новата ера|новата ера|нова ера)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^п/i,/^н/i]},defaultParseWidth:"any"}),quarter:Fa({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^[1234](-?[врт]?o?)? тримес.?/i,wide:/^[1234](-?[врт]?о?)? тримесечие/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:function(e){return e+1}}),month:Fa({matchPatterns:{abbreviated:/^(яну|фев|мар|апр|май|юни|юли|авг|сеп|окт|ное|дек)/i,wide:/^(януари|февруари|март|април|май|юни|юли|август|септември|октомври|ноември|декември)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^я/i,/^ф/i,/^мар/i,/^ап/i,/^май/i,/^юн/i,/^юл/i,/^ав/i,/^се/i,/^окт/i,/^но/i,/^де/i]},defaultParseWidth:"any"}),day:Fa({matchPatterns:{narrow:/^[нпвсч]/i,short:/^(нд|пн|вт|ср|чт|пт|сб)/i,abbreviated:/^(нед|пон|вто|сря|чет|пет|съб)/i,wide:/^(неделя|понеделник|вторник|сряда|четвъртък|петък|събота)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^н/i,/^п/i,/^в/i,/^с/i,/^ч/i,/^п/i,/^с/i],any:[/^н[ед]/i,/^п[он]/i,/^вт/i,/^ср/i,/^ч[ет]/i,/^п[ет]/i,/^с[ъб]/i]},defaultParseWidth:"any"}),dayPeriod:Fa({matchPatterns:{any:/^(преди о|след о|в по|на о|през|веч|сут|следо)/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^преди о/i,pm:/^след о/i,midnight:/^в пол/i,noon:/^на об/i,morning:/^сут/i,afternoon:/^следо/i,evening:/^веч/i,night:/^през н/i}},defaultParseWidth:"any"})},options:{weekStartsOn:1,firstWeekContainsDate:1}},Yi={locale:{1:"১",2:"২",3:"৩",4:"৪",5:"৫",6:"৬",7:"৭",8:"৮",9:"৯",0:"০"},number:{"১":"1","২":"2","৩":"3","৪":"4","৫":"5","৬":"6","৭":"7","৮":"8","৯":"9","০":"0"}};function qi(e){return e.toString().replace(/\d/g,(function(e){return Yi.locale[e]}))}var Ji={ordinalNumber:function(e,t){var a=Number(e),n=qi(a);if("date"===(null==t?void 0:t.unit))return function(e,t){if(e>18&&e<=31)return t+"শে";switch(e){case 1:return t+"লা";case 2:case 3:return t+"রা";case 4:return t+"ঠা";default:return t+"ই"}}(a,n);if(a>10||0===a)return n+"তম";switch(a%10){case 2:case 3:return n+"য়";case 4:return n+"র্থ";case 6:return n+"ষ্ঠ";default:return n+"ম"}},era:Ra({values:{narrow:["খ্রিঃপূঃ","খ্রিঃ"],abbreviated:["খ্রিঃপূর্ব","খ্রিঃ"],wide:["খ্রিস্টপূর্ব","খ্রিস্টাব্দ"]},defaultWidth:"wide"}),quarter:Ra({values:{narrow:["১","২","৩","৪"],abbreviated:["১ত্রৈ","২ত্রৈ","৩ত্রৈ","৪ত্রৈ"],wide:["১ম ত্রৈমাসিক","২য় ত্রৈমাসিক","৩য় ত্রৈমাসিক","৪র্থ ত্রৈমাসিক"]},defaultWidth:"wide",argumentCallback:function(e){return e-1}}),month:Ra({values:{narrow:["জানু","ফেব্রু","মার্চ","এপ্রিল","মে","জুন","জুলাই","আগস্ট","সেপ্ট","অক্টো","নভে","ডিসে"],abbreviated:["জানু","ফেব্রু","মার্চ","এপ্রিল","মে","জুন","জুলাই","আগস্ট","সেপ্ট","অক্টো","নভে","ডিসে"],wide:["জানুয়ারি","ফেব্রুয়ারি","মার্চ","এপ্রিল","মে","জুন","জুলাই","আগস্ট","সেপ্টেম্বর","অক্টোবর","নভেম্বর","ডিসেম্বর"]},defaultWidth:"wide"}),day:Ra({values:{narrow:["র","সো","ম","বু","বৃ","শু","শ"],short:["রবি","সোম","মঙ্গল","বুধ","বৃহ","শুক্র","শনি"],abbreviated:["রবি","সোম","মঙ্গল","বুধ","বৃহ","শুক্র","শনি"],wide:["রবিবার","সোমবার","মঙ্গলবার","বুধবার","বৃহস্পতিবার ","শুক্রবার","শনিবার"]},defaultWidth:"wide"}),dayPeriod:Ra({values:{narrow:{am:"পূ",pm:"অপ",midnight:"মধ্যরাত",noon:"মধ্যাহ্ন",morning:"সকাল",afternoon:"বিকাল",evening:"সন্ধ্যা",night:"রাত"},abbreviated:{am:"পূর্বাহ্ন",pm:"অপরাহ্ন",midnight:"মধ্যরাত",noon:"মধ্যাহ্ন",morning:"সকাল",afternoon:"বিকাল",evening:"সন্ধ্যা",night:"রাত"},wide:{am:"পূর্বাহ্ন",pm:"অপরাহ্ন",midnight:"মধ্যরাত",noon:"মধ্যাহ্ন",morning:"সকাল",afternoon:"বিকাল",evening:"সন্ধ্যা",night:"রাত"}},defaultWidth:"wide",formattingValues:{narrow:{am:"পূ",pm:"অপ",midnight:"মধ্যরাত",noon:"মধ্যাহ্ন",morning:"সকাল",afternoon:"বিকাল",evening:"সন্ধ্যা",night:"রাত"},abbreviated:{am:"পূর্বাহ্ন",pm:"অপরাহ্ন",midnight:"মধ্যরাত",noon:"মধ্যাহ্ন",morning:"সকাল",afternoon:"বিকাল",evening:"সন্ধ্যা",night:"রাত"},wide:{am:"পূর্বাহ্ন",pm:"অপরাহ্ন",midnight:"মধ্যরাত",noon:"মধ্যাহ্ন",morning:"সকাল",afternoon:"বিকাল",evening:"সন্ধ্যা",night:"রাত"}},defaultFormattingWidth:"wide"})},Ri=Ji,Li={lessThanXSeconds:{one:"প্রায় ১ সেকেন্ড",other:"প্রায় {{count}} সেকেন্ড"},xSeconds:{one:"১ সেকেন্ড",other:"{{count}} সেকেন্ড"},halfAMinute:"আধ মিনিট",lessThanXMinutes:{one:"প্রায় ১ মিনিট",other:"প্রায় {{count}} মিনিট"},xMinutes:{one:"১ মিনিট",other:"{{count}} মিনিট"},aboutXHours:{one:"প্রায় ১ ঘন্টা",other:"প্রায় {{count}} ঘন্টা"},xHours:{one:"১ ঘন্টা",other:"{{count}} ঘন্টা"},xDays:{one:"১ দিন",other:"{{count}} দিন"},aboutXWeeks:{one:"প্রায় ১ সপ্তাহ",other:"প্রায় {{count}} সপ্তাহ"},xWeeks:{one:"১ সপ্তাহ",other:"{{count}} সপ্তাহ"},aboutXMonths:{one:"প্রায় ১ মাস",other:"প্রায় {{count}} মাস"},xMonths:{one:"১ মাস",other:"{{count}} মাস"},aboutXYears:{one:"প্রায় ১ বছর",other:"প্রায় {{count}} বছর"},xYears:{one:"১ বছর",other:"{{count}} বছর"},overXYears:{one:"১ বছরের বেশি",other:"{{count}} বছরের বেশি"},almostXYears:{one:"প্রায় ১ বছর",other:"প্রায় {{count}} বছর"}},Fi=function(e,t,a){var n,i=Li[e];return n="string"==typeof i?i:1===t?i.one:i.other.replace("{{count}}",qi(t)),null!=a&&a.addSuffix?a.comparison&&a.comparison>0?n+" এর মধ্যে":n+" আগে":n},Zi={date:Qa({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:Qa({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:Qa({formats:{full:"{{date}} {{time}} 'সময়'",long:"{{date}} {{time}} 'সময়'",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},_i=Zi,$i={lastWeek:"'গত' eeee 'সময়' p",yesterday:"'গতকাল' 'সময়' p",today:"'আজ' 'সময়' p",tomorrow:"'আগামীকাল' 'সময়' p",nextWeek:"eeee 'সময়' p",other:"P"},er=function(e,t,a,n){return $i[e]},tr={ordinalNumber:$a({matchPattern:/^(\d+)(ম|য়|র্থ|ষ্ঠ|শে|ই|তম)?/i,parsePattern:/\d+/i,valueCallback:function(e){return parseInt(e,10)}}),era:Fa({matchPatterns:{narrow:/^(খ্রিঃপূঃ|খ্রিঃ)/i,abbreviated:/^(খ্রিঃপূর্ব|খ্রিঃ)/i,wide:/^(খ্রিস্টপূর্ব|খ্রিস্টাব্দ)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^খ্রিঃপূঃ/i,/^খ্রিঃ/i],abbreviated:[/^খ্রিঃপূর্ব/i,/^খ্রিঃ/i],wide:[/^খ্রিস্টপূর্ব/i,/^খ্রিস্টাব্দ/i]},defaultParseWidth:"wide"}),quarter:Fa({matchPatterns:{narrow:/^[১২৩৪]/i,abbreviated:/^[১২৩৪]ত্রৈ/i,wide:/^[১২৩৪](ম|য়|র্থ)? ত্রৈমাসিক/i},defaultMatchWidth:"wide",parsePatterns:{any:[/১/i,/২/i,/৩/i,/৪/i]},defaultParseWidth:"any",valueCallback:function(e){return e+1}}),month:Fa({matchPatterns:{narrow:/^(জানু|ফেব্রু|মার্চ|এপ্রিল|মে|জুন|জুলাই|আগস্ট|সেপ্ট|অক্টো|নভে|ডিসে)/i,abbreviated:/^(জানু|ফেব্রু|মার্চ|এপ্রিল|মে|জুন|জুলাই|আগস্ট|সেপ্ট|অক্টো|নভে|ডিসে)/i,wide:/^(জানুয়ারি|ফেব্রুয়ারি|মার্চ|এপ্রিল|মে|জুন|জুলাই|আগস্ট|সেপ্টেম্বর|অক্টোবর|নভেম্বর|ডিসেম্বর)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^জানু/i,/^ফেব্রু/i,/^মার্চ/i,/^এপ্রিল/i,/^মে/i,/^জুন/i,/^জুলাই/i,/^আগস্ট/i,/^সেপ্ট/i,/^অক্টো/i,/^নভে/i,/^ডিসে/i]},defaultParseWidth:"any"}),day:Fa({matchPatterns:{narrow:/^(র|সো|ম|বু|বৃ|শু|শ)+/i,short:/^(রবি|সোম|মঙ্গল|বুধ|বৃহ|শুক্র|শনি)+/i,abbreviated:/^(রবি|সোম|মঙ্গল|বুধ|বৃহ|শুক্র|শনি)+/i,wide:/^(রবিবার|সোমবার|মঙ্গলবার|বুধবার|বৃহস্পতিবার |শুক্রবার|শনিবার)+/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^র/i,/^সো/i,/^ম/i,/^বু/i,/^বৃ/i,/^শু/i,/^শ/i],short:[/^রবি/i,/^সোম/i,/^মঙ্গল/i,/^বুধ/i,/^বৃহ/i,/^শুক্র/i,/^শনি/i],abbreviated:[/^রবি/i,/^সোম/i,/^মঙ্গল/i,/^বুধ/i,/^বৃহ/i,/^শুক্র/i,/^শনি/i],wide:[/^রবিবার/i,/^সোমবার/i,/^মঙ্গলবার/i,/^বুধবার/i,/^বৃহস্পতিবার /i,/^শুক্রবার/i,/^শনিবার/i]},defaultParseWidth:"wide"}),dayPeriod:Fa({matchPatterns:{narrow:/^(পূ|অপ|মধ্যরাত|মধ্যাহ্ন|সকাল|বিকাল|সন্ধ্যা|রাত)/i,abbreviated:/^(পূর্বাহ্ন|অপরাহ্ন|মধ্যরাত|মধ্যাহ্ন|সকাল|বিকাল|সন্ধ্যা|রাত)/i,wide:/^(পূর্বাহ্ন|অপরাহ্ন|মধ্যরাত|মধ্যাহ্ন|সকাল|বিকাল|সন্ধ্যা|রাত)/i},defaultMatchWidth:"wide",parsePatterns:{any:{am:/^পূ/i,pm:/^অপ/i,midnight:/^মধ্যরাত/i,noon:/^মধ্যাহ্ন/i,morning:/সকাল/i,afternoon:/বিকাল/i,evening:/সন্ধ্যা/i,night:/রাত/i}},defaultParseWidth:"any"})},ar=tr,nr={code:"bn",formatDistance:Fi,formatLong:_i,formatRelative:er,localize:Ri,match:ar,options:{weekStartsOn:0,firstWeekContainsDate:1}},ir=nr,rr={lessThanXSeconds:{one:{standalone:"manje od 1 sekunde",withPrepositionAgo:"manje od 1 sekunde",withPrepositionIn:"manje od 1 sekundu"},dual:"manje od {{count}} sekunde",other:"manje od {{count}} sekundi"},xSeconds:{one:{standalone:"1 sekunda",withPrepositionAgo:"1 sekunde",withPrepositionIn:"1 sekundu"},dual:"{{count}} sekunde",other:"{{count}} sekundi"},halfAMinute:"pola minute",lessThanXMinutes:{one:{standalone:"manje od 1 minute",withPrepositionAgo:"manje od 1 minute",withPrepositionIn:"manje od 1 minutu"},dual:"manje od {{count}} minute",other:"manje od {{count}} minuta"},xMinutes:{one:{standalone:"1 minuta",withPrepositionAgo:"1 minute",withPrepositionIn:"1 minutu"},dual:"{{count}} minute",other:"{{count}} minuta"},aboutXHours:{one:{standalone:"oko 1 sat",withPrepositionAgo:"oko 1 sat",withPrepositionIn:"oko 1 sat"},dual:"oko {{count}} sata",other:"oko {{count}} sati"},xHours:{one:{standalone:"1 sat",withPrepositionAgo:"1 sat",withPrepositionIn:"1 sat"},dual:"{{count}} sata",other:"{{count}} sati"},xDays:{one:{standalone:"1 dan",withPrepositionAgo:"1 dan",withPrepositionIn:"1 dan"},dual:"{{count}} dana",other:"{{count}} dana"},aboutXWeeks:{one:{standalone:"oko 1 sedmicu",withPrepositionAgo:"oko 1 sedmicu",withPrepositionIn:"oko 1 sedmicu"},dual:"oko {{count}} sedmice",other:"oko {{count}} sedmice"},xWeeks:{one:{standalone:"1 sedmicu",withPrepositionAgo:"1 sedmicu",withPrepositionIn:"1 sedmicu"},dual:"{{count}} sedmice",other:"{{count}} sedmice"},aboutXMonths:{one:{standalone:"oko 1 mjesec",withPrepositionAgo:"oko 1 mjesec",withPrepositionIn:"oko 1 mjesec"},dual:"oko {{count}} mjeseca",other:"oko {{count}} mjeseci"},xMonths:{one:{standalone:"1 mjesec",withPrepositionAgo:"1 mjesec",withPrepositionIn:"1 mjesec"},dual:"{{count}} mjeseca",other:"{{count}} mjeseci"},aboutXYears:{one:{standalone:"oko 1 godinu",withPrepositionAgo:"oko 1 godinu",withPrepositionIn:"oko 1 godinu"},dual:"oko {{count}} godine",other:"oko {{count}} godina"},xYears:{one:{standalone:"1 godina",withPrepositionAgo:"1 godine",withPrepositionIn:"1 godinu"},dual:"{{count}} godine",other:"{{count}} godina"},overXYears:{one:{standalone:"preko 1 godinu",withPrepositionAgo:"preko 1 godinu",withPrepositionIn:"preko 1 godinu"},dual:"preko {{count}} godine",other:"preko {{count}} godina"},almostXYears:{one:{standalone:"gotovo 1 godinu",withPrepositionAgo:"gotovo 1 godinu",withPrepositionIn:"gotovo 1 godinu"},dual:"gotovo {{count}} godine",other:"gotovo {{count}} godina"}},or=function(e,t,a){var n,i=rr[e];return n="string"==typeof i?i:1===t?null!=a&&a.addSuffix?a.comparison&&a.comparison>0?i.one.withPrepositionIn:i.one.withPrepositionAgo:i.one.standalone:t%10>1&&t%10<5&&"1"!==String(t).substr(-2,1)?i.dual.replace("{{count}}",String(t)):i.other.replace("{{count}}",String(t)),null!=a&&a.addSuffix?a.comparison&&a.comparison>0?"za "+n:"prije "+n:n},dr={date:Qa({formats:{full:"EEEE, d. MMMM yyyy.",long:"d. MMMM yyyy.",medium:"d. MMM yy.",short:"dd. MM. yy."},defaultWidth:"full"}),time:Qa({formats:{full:"HH:mm:ss (zzzz)",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},defaultWidth:"full"}),dateTime:Qa({formats:{full:"{{date}} 'u' {{time}}",long:"{{date}} 'u' {{time}}",medium:"{{date}} {{time}}",short:"{{date}} {{time}}"},defaultWidth:"full"})},sr=dr,ur={lastWeek:function(e){switch(e.getUTCDay()){case 0:return"'prošle nedjelje u' p";case 3:return"'prošle srijede u' p";case 6:return"'prošle subote u' p";default:return"'prošli' EEEE 'u' p"}},yesterday:"'juče u' p",today:"'danas u' p",tomorrow:"'sutra u' p",nextWeek:function(e){switch(e.getUTCDay()){case 0:return"'sljedeće nedjelje u' p";case 3:return"'sljedeću srijedu u' p";case 6:return"'sljedeću subotu u' p";default:return"'sljedeći' EEEE 'u' p"}},other:"P"},mr=function(e,t,a,n){var i=ur[e];return"function"==typeof i?i(t):i},lr={ordinalNumber:function(e,t){var a=Number(e);return String(a)+"."},era:Ra({values:{narrow:["pr.n.e.","AD"],abbreviated:["pr. Hr.","po. Hr."],wide:["Prije Hrista","Poslije Hrista"]},defaultWidth:"wide"}),quarter:Ra({values:{narrow:["1.","2.","3.","4."],abbreviated:["1. kv.","2. kv.","3. kv.","4. kv."],wide:["1. kvartal","2. kvartal","3. kvartal","4. kvartal"]},defaultWidth:"wide",argumentCallback:function(e){return e-1}}),month:Ra({values:{narrow:["1.","2.","3.","4.","5.","6.","7.","8.","9.","10.","11.","12."],abbreviated:["jan","feb","mar","apr","maj","jun","jul","avg","sep","okt","nov","dec"],wide:["januar","februar","mart","april","maj","juni","juli","avgust","septembar","oktobar","novembar","decembar"]},defaultWidth:"wide",formattingValues:{narrow:["1.","2.","3.","4.","5.","6.","7.","8.","9.","10.","11.","12."],abbreviated:["jan","feb","mar","apr","maj","jun","jul","avg","sep","okt","nov","dec"],wide:["januar","februar","mart","april","maj","juni","juli","avgust","septembar","oktobar","novembar","decembar"]},defaultFormattingWidth:"wide"}),day:Ra({values:{narrow:["N","P","U","S","Č","P","S"],short:["ned","pon","uto","sre","čet","pet","sub"],abbreviated:["ned","pon","uto","sre","čet","pet","sub"],wide:["nedjelja","ponedjeljak","utorak","srijeda","četvrtak","petak","subota"]},defaultWidth:"wide"}),dayPeriod:Ra({values:{narrow:{am:"AM",pm:"PM",midnight:"ponoć",noon:"podne",morning:"ujutru",afternoon:"popodne",evening:"uveče",night:"noću"},abbreviated:{am:"AM",pm:"PM",midnight:"ponoć",noon:"podne",morning:"ujutru",afternoon:"popodne",evening:"uveče",night:"noću"},wide:{am:"AM",pm:"PM",midnight:"ponoć",noon:"podne",morning:"ujutru",afternoon:"poslije podne",evening:"uveče",night:"noću"}},defaultWidth:"wide",formattingValues:{narrow:{am:"AM",pm:"PM",midnight:"ponoć",noon:"podne",morning:"ujutru",afternoon:"popodne",evening:"uveče",night:"noću"},abbreviated:{am:"AM",pm:"PM",midnight:"ponoć",noon:"podne",morning:"ujutru",afternoon:"popodne",evening:"uveče",night:"noću"},wide:{am:"AM",pm:"PM",midnight:"ponoć",noon:"podne",morning:"ujutru",afternoon:"poslije podne",evening:"uveče",night:"noću"}},defaultFormattingWidth:"wide"})},hr=lr,cr={ordinalNumber:$a({matchPattern:/^(\d+)\./i,parsePattern:/\d+/i,valueCallback:function(e){return parseInt(e,10)}}),era:Fa({matchPatterns:{narrow:/^(pr\.n\.e\.|AD)/i,abbreviated:/^(pr\.\s?Hr\.|po\.\s?Hr\.)/i,wide:/^(Prije Hrista|prije nove ere|Poslije Hrista|nova era)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^pr/i,/^(po|nova)/i]},defaultParseWidth:"any"}),quarter:Fa({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^[1234]\.\s?kv\.?/i,wide:/^[1234]\. kvartal/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:function(e){return e+1}}),month:Fa({matchPatterns:{narrow:/^(10|11|12|[123456789])\./i,abbreviated:/^(jan|feb|mar|apr|maj|jun|jul|avg|sep|okt|nov|dec)/i,wide:/^((januar|januara)|(februar|februara)|(mart|marta)|(april|aprila)|(maj|maja)|(juni|juna)|(juli|jula)|(avgust|avgusta)|(septembar|septembra)|(oktobar|oktobra)|(novembar|novembra)|(decembar|decembra))/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^1/i,/^2/i,/^3/i,/^4/i,/^5/i,/^6/i,/^7/i,/^8/i,/^9/i,/^10/i,/^11/i,/^12/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^maj/i,/^jun/i,/^jul/i,/^avg/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:Fa({matchPatterns:{narrow:/^[npusčc]/i,short:/^(ned|pon|uto|sre|(čet|cet)|pet|sub)/i,abbreviated:/^(ned|pon|uto|sre|(čet|cet)|pet|sub)/i,wide:/^(nedjelja|ponedjeljak|utorak|srijeda|(četvrtak|cetvrtak)|petak|subota)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},defaultParseWidth:"any"}),dayPeriod:Fa({matchPatterns:{any:/^(am|pm|ponoc|ponoć|(po)?podne|uvece|uveče|noću|poslije podne|ujutru)/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^pono/i,noon:/^pod/i,morning:/jutro/i,afternoon:/(poslije\s|po)+podne/i,evening:/(uvece|uveče)/i,night:/(nocu|noću)/i}},defaultParseWidth:"any"})},fr=cr,gr={code:"bs",formatDistance:or,formatLong:sr,formatRelative:mr,localize:hr,match:fr,options:{weekStartsOn:1,firstWeekContainsDate:4}},pr=gr,vr={lessThanXSeconds:{one:"menys d'un segon",eleven:"menys d'onze segons",other:"menys de {{count}} segons"},xSeconds:{one:"1 segon",other:"{{count}} segons"},halfAMinute:"mig minut",lessThanXMinutes:{one:"menys d'un minut",eleven:"menys d'onze minuts",other:"menys de {{count}} minuts"},xMinutes:{one:"1 minut",other:"{{count}} minuts"},aboutXHours:{one:"aproximadament una hora",other:"aproximadament {{count}} hores"},xHours:{one:"1 hora",other:"{{count}} hores"},xDays:{one:"1 dia",other:"{{count}} dies"},aboutXWeeks:{one:"aproximadament una setmana",other:"aproximadament {{count}} setmanes"},xWeeks:{one:"1 setmana",other:"{{count}} setmanes"},aboutXMonths:{one:"aproximadament un mes",other:"aproximadament {{count}} mesos"},xMonths:{one:"1 mes",other:"{{count}} mesos"},aboutXYears:{one:"aproximadament un any",other:"aproximadament {{count}} anys"},xYears:{one:"1 any",other:"{{count}} anys"},overXYears:{one:"més d'un any",eleven:"més d'onze anys",other:"més de {{count}} anys"},almostXYears:{one:"gairebé un any",other:"gairebé {{count}} anys"}},br=function(e,t,a){var n,i=vr[e];return n="string"==typeof i?i:1===t?i.one:11===t&&i.eleven?i.eleven:i.other.replace("{{count}}",String(t)),null!=a&&a.addSuffix?a.comparison&&a.comparison>0?"en "+n:"fa "+n:n},wr={date:Qa({formats:{full:"EEEE, d 'de' MMMM y",long:"d 'de' MMMM y",medium:"d MMM y",short:"dd/MM/y"},defaultWidth:"full"}),time:Qa({formats:{full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},defaultWidth:"full"}),dateTime:Qa({formats:{full:"{{date}} 'a les' {{time}}",long:"{{date}} 'a les' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},yr=wr,Ar={lastWeek:"'el' eeee 'passat a la' LT",yesterday:"'ahir a la' p",today:"'avui a la' p",tomorrow:"'demà a la' p",nextWeek:"eeee 'a la' p",other:"P"},kr={lastWeek:"'el' eeee 'passat a les' p",yesterday:"'ahir a les' p",today:"'avui a les' p",tomorrow:"'demà a les' p",nextWeek:"eeee 'a les' p",other:"P"},Mr=function(e,t,a,n){return 1!==t.getUTCHours()?kr[e]:Ar[e]},Pr={ordinalNumber:function(e,t){var a=Number(e),n=a%100;if(n>20||n<10)switch(n%10){case 1:case 3:return a+"r";case 2:return a+"n";case 4:return a+"t"}return a+"è"},era:Ra({values:{narrow:["aC","dC"],abbreviated:["a. de C.","d. de C."],wide:["abans de Crist","després de Crist"]},defaultWidth:"wide"}),quarter:Ra({values:{narrow:["1","2","3","4"],abbreviated:["T1","T2","T3","T4"],wide:["1r trimestre","2n trimestre","3r trimestre","4t trimestre"]},defaultWidth:"wide",argumentCallback:function(e){return e-1}}),month:Ra({values:{narrow:["GN","FB","MÇ","AB","MG","JN","JL","AG","ST","OC","NV","DS"],abbreviated:["gen.","febr.","març","abr.","maig","juny","jul.","ag.","set.","oct.","nov.","des."],wide:["gener","febrer","març","abril","maig","juny","juliol","agost","setembre","octubre","novembre","desembre"]},defaultWidth:"wide"}),day:Ra({values:{narrow:["dg.","dl.","dt.","dm.","dj.","dv.","ds."],short:["dg.","dl.","dt.","dm.","dj.","dv.","ds."],abbreviated:["dg.","dl.","dt.","dm.","dj.","dv.","ds."],wide:["diumenge","dilluns","dimarts","dimecres","dijous","divendres","dissabte"]},defaultWidth:"wide"}),dayPeriod:Ra({values:{narrow:{am:"am",pm:"pm",midnight:"mitjanit",noon:"migdia",morning:"matí",afternoon:"tarda",evening:"vespre",night:"nit"},abbreviated:{am:"a.m.",pm:"p.m.",midnight:"mitjanit",noon:"migdia",morning:"matí",afternoon:"tarda",evening:"vespre",night:"nit"},wide:{am:"ante meridiem",pm:"post meridiem",midnight:"mitjanit",noon:"migdia",morning:"matí",afternoon:"tarda",evening:"vespre",night:"nit"}},defaultWidth:"wide",formattingValues:{narrow:{am:"am",pm:"pm",midnight:"de la mitjanit",noon:"del migdia",morning:"del matí",afternoon:"de la tarda",evening:"del vespre",night:"de la nit"},abbreviated:{am:"AM",pm:"PM",midnight:"de la mitjanit",noon:"del migdia",morning:"del matí",afternoon:"de la tarda",evening:"del vespre",night:"de la nit"},wide:{am:"ante meridiem",pm:"post meridiem",midnight:"de la mitjanit",noon:"del migdia",morning:"del matí",afternoon:"de la tarda",evening:"del vespre",night:"de la nit"}},defaultFormattingWidth:"wide"})},Wr=Pr,xr={ordinalNumber:$a({matchPattern:/^(\d+)(è|r|n|r|t)?/i,parsePattern:/\d+/i,valueCallback:function(e){return parseInt(e,10)}}),era:Fa({matchPatterns:{narrow:/^(aC|dC)/i,abbreviated:/^(a. de C.|d. de C.)/i,wide:/^(abans de Crist|despr[eé]s de Crist)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^aC/i,/^dC/i],abbreviated:[/^(a. de C.)/i,/^(d. de C.)/i],wide:[/^(abans de Crist)/i,/^(despr[eé]s de Crist)/i]},defaultParseWidth:"wide"}),quarter:Fa({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^T[1234]/i,wide:/^[1234](è|r|n|r|t)? trimestre/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:function(e){return e+1}}),month:Fa({matchPatterns:{narrow:/^(GN|FB|MÇ|AB|MG|JN|JL|AG|ST|OC|NV|DS)/i,abbreviated:/^(gen.|febr.|març|abr.|maig|juny|jul.|ag.|set.|oct.|nov.|des.)/i,wide:/^(gener|febrer|març|abril|maig|juny|juliol|agost|setembre|octubre|novembre|desembre)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^GN/i,/^FB/i,/^MÇ/i,/^AB/i,/^MG/i,/^JN/i,/^JL/i,/^AG/i,/^ST/i,/^OC/i,/^NV/i,/^DS/i],abbreviated:[/^gen./i,/^febr./i,/^març/i,/^abr./i,/^maig/i,/^juny/i,/^jul./i,/^ag./i,/^set./i,/^oct./i,/^nov./i,/^des./i],wide:[/^gener/i,/^febrer/i,/^març/i,/^abril/i,/^maig/i,/^juny/i,/^juliol/i,/^agost/i,/^setembre/i,/^octubre/i,/^novembre/i,/^desembre/i]},defaultParseWidth:"wide"}),day:Fa({matchPatterns:{narrow:/^(dg\.|dl\.|dt\.|dm\.|dj\.|dv\.|ds\.)/i,short:/^(dg\.|dl\.|dt\.|dm\.|dj\.|dv\.|ds\.)/i,abbreviated:/^(dg\.|dl\.|dt\.|dm\.|dj\.|dv\.|ds\.)/i,wide:/^(diumenge|dilluns|dimarts|dimecres|dijous|divendres|dissabte)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^dg./i,/^dl./i,/^dt./i,/^dm./i,/^dj./i,/^dv./i,/^ds./i],abbreviated:[/^dg./i,/^dl./i,/^dt./i,/^dm./i,/^dj./i,/^dv./i,/^ds./i],wide:[/^diumenge/i,/^dilluns/i,/^dimarts/i,/^dimecres/i,/^dijous/i,/^divendres/i,/^disssabte/i]},defaultParseWidth:"wide"}),dayPeriod:Fa({matchPatterns:{narrow:/^(a|p|mn|md|(del|de la) (matí|tarda|vespre|nit))/i,abbreviated:/^([ap]\.?\s?m\.?|mitjanit|migdia|(del|de la) (matí|tarda|vespre|nit))/i,wide:/^(ante meridiem|post meridiem|mitjanit|migdia|(del|de la) (matí|tarda|vespre|nit))/i},defaultMatchWidth:"wide",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mitjanit/i,noon:/^migdia/i,morning:/matí/i,afternoon:/tarda/i,evening:/vespre/i,night:/nit/i}},defaultParseWidth:"any"})},zr=xr,jr={code:"ca",formatDistance:br,formatLong:yr,formatRelative:Mr,localize:Wr,match:zr,options:{weekStartsOn:1,firstWeekContainsDate:4}},Cr=jr,Tr={lessThanXSeconds:{one:{regular:"méně než sekunda",past:"před méně než sekundou",future:"za méně než sekundu"},few:{regular:"méně než {{count}} sekundy",past:"před méně než {{count}} sekundami",future:"za méně než {{count}} sekundy"},many:{regular:"méně než {{count}} sekund",past:"před méně než {{count}} sekundami",future:"za méně než {{count}} sekund"}},xSeconds:{one:{regular:"sekunda",past:"před sekundou",future:"za sekundu"},few:{regular:"{{count}} sekundy",past:"před {{count}} sekundami",future:"za {{count}} sekundy"},many:{regular:"{{count}} sekund",past:"před {{count}} sekundami",future:"za {{count}} sekund"}},halfAMinute:{type:"other",other:{regular:"půl minuty",past:"před půl minutou",future:"za půl minuty"}},lessThanXMinutes:{one:{regular:"méně než minuta",past:"před méně než minutou",future:"za méně než minutu"},few:{regular:"méně než {{count}} minuty",past:"před méně než {{count}} minutami",future:"za méně než {{count}} minuty"},many:{regular:"méně než {{count}} minut",past:"před méně než {{count}} minutami",future:"za méně než {{count}} minut"}},xMinutes:{one:{regular:"minuta",past:"před minutou",future:"za minutu"},few:{regular:"{{count}} minuty",past:"před {{count}} minutami",future:"za {{count}} minuty"},many:{regular:"{{count}} minut",past:"před {{count}} minutami",future:"za {{count}} minut"}},aboutXHours:{one:{regular:"přibližně hodina",past:"přibližně před hodinou",future:"přibližně za hodinu"},few:{regular:"přibližně {{count}} hodiny",past:"přibližně před {{count}} hodinami",future:"přibližně za {{count}} hodiny"},many:{regular:"přibližně {{count}} hodin",past:"přibližně před {{count}} hodinami",future:"přibližně za {{count}} hodin"}},xHours:{one:{regular:"hodina",past:"před hodinou",future:"za hodinu"},few:{regular:"{{count}} hodiny",past:"před {{count}} hodinami",future:"za {{count}} hodiny"},many:{regular:"{{count}} hodin",past:"před {{count}} hodinami",future:"za {{count}} hodin"}},xDays:{one:{regular:"den",past:"před dnem",future:"za den"},few:{regular:"{{count}} dny",past:"před {{count}} dny",future:"za {{count}} dny"},many:{regular:"{{count}} dní",past:"před {{count}} dny",future:"za {{count}} dní"}},aboutXWeeks:{one:{regular:"přibližně týden",past:"přibližně před týdnem",future:"přibližně za týden"},few:{regular:"přibližně {{count}} týdny",past:"přibližně před {{count}} týdny",future:"přibližně za {{count}} týdny"},many:{regular:"přibližně {{count}} týdnů",past:"přibližně před {{count}} týdny",future:"přibližně za {{count}} týdnů"}},xWeeks:{one:{regular:"týden",past:"před týdnem",future:"za týden"},few:{regular:"{{count}} týdny",past:"před {{count}} týdny",future:"za {{count}} týdny"},many:{regular:"{{count}} týdnů",past:"před {{count}} týdny",future:"za {{count}} týdnů"}},aboutXMonths:{one:{regular:"přibližně měsíc",past:"přibližně před měsícem",future:"přibližně za měsíc"},few:{regular:"přibližně {{count}} měsíce",past:"přibližně před {{count}} měsíci",future:"přibližně za {{count}} měsíce"},many:{regular:"přibližně {{count}} měsíců",past:"přibližně před {{count}} měsíci",future:"přibližně za {{count}} měsíců"}},xMonths:{one:{regular:"měsíc",past:"před měsícem",future:"za měsíc"},few:{regular:"{{count}} měsíce",past:"před {{count}} měsíci",future:"za {{count}} měsíce"},many:{regular:"{{count}} měsíců",past:"před {{count}} měsíci",future:"za {{count}} měsíců"}},aboutXYears:{one:{regular:"přibližně rok",past:"přibližně před rokem",future:"přibližně za rok"},few:{regular:"přibližně {{count}} roky",past:"přibližně před {{count}} roky",future:"přibližně za {{count}} roky"},many:{regular:"přibližně {{count}} roků",past:"přibližně před {{count}} roky",future:"přibližně za {{count}} roků"}},xYears:{one:{regular:"rok",past:"před rokem",future:"za rok"},few:{regular:"{{count}} roky",past:"před {{count}} roky",future:"za {{count}} roky"},many:{regular:"{{count}} roků",past:"před {{count}} roky",future:"za {{count}} roků"}},overXYears:{one:{regular:"více než rok",past:"před více než rokem",future:"za více než rok"},few:{regular:"více než {{count}} roky",past:"před více než {{count}} roky",future:"za více než {{count}} roky"},many:{regular:"více než {{count}} roků",past:"před více než {{count}} roky",future:"za více než {{count}} roků"}},almostXYears:{one:{regular:"skoro rok",past:"skoro před rokem",future:"skoro za rok"},few:{regular:"skoro {{count}} roky",past:"skoro před {{count}} roky",future:"skoro za {{count}} roky"},many:{regular:"skoro {{count}} roků",past:"skoro před {{count}} roky",future:"skoro za {{count}} roků"}}},Sr=function(e,t,a){var n,i=Tr[e];n="other"===i.type?i.other:1===t?i.one:t>1&&t<5?i.few:i.many;var r=!0===(null==a?void 0:a.addSuffix),o=null==a?void 0:a.comparison;return(r&&-1===o?n.past:r&&1===o?n.future:n.regular).replace("{{count}}",String(t))},Hr={date:Qa({formats:{full:"EEEE, d. MMMM yyyy",long:"d. MMMM yyyy",medium:"d. M. yyyy",short:"dd.MM.yyyy"},defaultWidth:"full"}),time:Qa({formats:{full:"H:mm:ss zzzz",long:"H:mm:ss z",medium:"H:mm:ss",short:"H:mm"},defaultWidth:"full"}),dateTime:Qa({formats:{full:"{{date}} 'v' {{time}}",long:"{{date}} 'v' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},Dr=Hr,Nr=["neděli","pondělí","úterý","středu","čtvrtek","pátek","sobotu"],Xr={lastWeek:"'poslední' eeee 've' p",yesterday:"'včera v' p",today:"'dnes v' p",tomorrow:"'zítra v' p",nextWeek:function(e){var t=e.getUTCDay();return"'v "+Nr[t]+" o' p"},other:"P"},Ir=function(e,t){var a=Xr[e];return"function"==typeof a?a(t):a},Er={ordinalNumber:function(e,t){return Number(e)+"."},era:Ra({values:{narrow:["př. n. l.","n. l."],abbreviated:["př. n. l.","n. l."],wide:["před naším letopočtem","našeho letopočtu"]},defaultWidth:"wide"}),quarter:Ra({values:{narrow:["1","2","3","4"],abbreviated:["1. čtvrtletí","2. čtvrtletí","3. čtvrtletí","4. čtvrtletí"],wide:["1. čtvrtletí","2. čtvrtletí","3. čtvrtletí","4. čtvrtletí"]},defaultWidth:"wide",argumentCallback:function(e){return e-1}}),month:Ra({values:{narrow:["L","Ú","B","D","K","Č","Č","S","Z","Ř","L","P"],abbreviated:["led","úno","bře","dub","kvě","čvn","čvc","srp","zář","říj","lis","pro"],wide:["leden","únor","březen","duben","květen","červen","červenec","srpen","září","říjen","listopad","prosinec"]},defaultWidth:"wide",formattingValues:{narrow:["L","Ú","B","D","K","Č","Č","S","Z","Ř","L","P"],abbreviated:["led","úno","bře","dub","kvě","čvn","čvc","srp","zář","říj","lis","pro"],wide:["ledna","února","března","dubna","května","června","července","srpna","září","října","listopadu","prosince"]},defaultFormattingWidth:"wide"}),day:Ra({values:{narrow:["ne","po","út","st","čt","pá","so"],short:["ne","po","út","st","čt","pá","so"],abbreviated:["ned","pon","úte","stř","čtv","pát","sob"],wide:["neděle","pondělí","úterý","středa","čtvrtek","pátek","sobota"]},defaultWidth:"wide"}),dayPeriod:Ra({values:{narrow:{am:"dop.",pm:"odp.",midnight:"půlnoc",noon:"poledne",morning:"ráno",afternoon:"odpoledne",evening:"večer",night:"noc"},abbreviated:{am:"dop.",pm:"odp.",midnight:"půlnoc",noon:"poledne",morning:"ráno",afternoon:"odpoledne",evening:"večer",night:"noc"},wide:{am:"dopoledne",pm:"odpoledne",midnight:"půlnoc",noon:"poledne",morning:"ráno",afternoon:"odpoledne",evening:"večer",night:"noc"}},defaultWidth:"wide",formattingValues:{narrow:{am:"dop.",pm:"odp.",midnight:"půlnoc",noon:"poledne",morning:"ráno",afternoon:"odpoledne",evening:"večer",night:"noc"},abbreviated:{am:"dop.",pm:"odp.",midnight:"půlnoc",noon:"poledne",morning:"ráno",afternoon:"odpoledne",evening:"večer",night:"noc"},wide:{am:"dopoledne",pm:"odpoledne",midnight:"půlnoc",noon:"poledne",morning:"ráno",afternoon:"odpoledne",evening:"večer",night:"noc"}},defaultFormattingWidth:"wide"})},Br=Er,Vr={ordinalNumber:$a({matchPattern:/^(\d+)\.?/i,parsePattern:/\d+/i,valueCallback:function(e){return parseInt(e,10)}}),era:Fa({matchPatterns:{narrow:/^(p[řr](\.|ed) Kr\.|p[řr](\.|ed) n\. l\.|po Kr\.|n\. l\.)/i,abbreviated:/^(p[řr](\.|ed) Kr\.|p[řr](\.|ed) n\. l\.|po Kr\.|n\. l\.)/i,wide:/^(p[řr](\.|ed) Kristem|p[řr](\.|ed) na[šs][íi]m letopo[čc]tem|po Kristu|na[šs]eho letopo[čc]tu)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^p[řr]/i,/^(po|n)/i]},defaultParseWidth:"any"}),quarter:Fa({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^[1234]\. [čc]tvrtlet[íi]/i,wide:/^[1234]\. [čc]tvrtlet[íi]/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:function(e){return e+1}}),month:Fa({matchPatterns:{narrow:/^[lúubdkčcszřrlp]/i,abbreviated:/^(led|[úu]no|b[řr]e|dub|kv[ěe]|[čc]vn|[čc]vc|srp|z[áa][řr]|[řr][íi]j|lis|pro)/i,wide:/^(leden|ledna|[úu]nora?|b[řr]ezen|b[řr]ezna|duben|dubna|kv[ěe]ten|kv[ěe]tna|[čc]erven(ec|ce)?|[čc]ervna|srpen|srpna|z[áa][řr][íi]|[řr][íi]jen|[řr][íi]jna|listopad(a|u)?|prosinec|prosince)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^l/i,/^[úu]/i,/^b/i,/^d/i,/^k/i,/^[čc]/i,/^[čc]/i,/^s/i,/^z/i,/^[řr]/i,/^l/i,/^p/i],any:[/^led/i,/^[úu]n/i,/^b[řr]e/i,/^dub/i,/^kv[ěe]/i,/^[čc]vn|[čc]erven(?!\w)|[čc]ervna/i,/^[čc]vc|[čc]erven(ec|ce)/i,/^srp/i,/^z[áa][řr]/i,/^[řr][íi]j/i,/^lis/i,/^pro/i]},defaultParseWidth:"any"}),day:Fa({matchPatterns:{narrow:/^[npuúsčps]/i,short:/^(ne|po|[úu]t|st|[čc]t|p[áa]|so)/i,abbreviated:/^(ned|pon|[úu]te|st[rř]|[čc]tv|p[áa]t|sob)/i,wide:/^(ned[ěe]le|pond[ěe]l[íi]|[úu]ter[ýy]|st[řr]eda|[čc]tvrtek|p[áa]tek|sobota)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^n/i,/^p/i,/^[úu]/i,/^s/i,/^[čc]/i,/^p/i,/^s/i],any:[/^ne/i,/^po/i,/^[úu]t/i,/^st/i,/^[čc]t/i,/^p[áa]/i,/^so/i]},defaultParseWidth:"any"}),dayPeriod:Fa({matchPatterns:{any:/^dopoledne|dop\.?|odpoledne|odp\.?|p[ůu]lnoc|poledne|r[áa]no|odpoledne|ve[čc]er|(v )?noci?/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^dop/i,pm:/^odp/i,midnight:/^p[ůu]lnoc/i,noon:/^poledne/i,morning:/r[áa]no/i,afternoon:/odpoledne/i,evening:/ve[čc]er/i,night:/noc/i}},defaultParseWidth:"any"})},Kr=Vr,Ur={code:"cs",formatDistance:Sr,formatLong:Dr,formatRelative:Ir,localize:Br,match:Kr,options:{weekStartsOn:1,firstWeekContainsDate:4}},Gr=Ur,Or={lessThanXSeconds:{one:"llai na eiliad",other:"llai na {{count}} eiliad"},xSeconds:{one:"1 eiliad",other:"{{count}} eiliad"},halfAMinute:"hanner munud",lessThanXMinutes:{one:"llai na munud",two:"llai na 2 funud",other:"llai na {{count}} munud"},xMinutes:{one:"1 munud",two:"2 funud",other:"{{count}} munud"},aboutXHours:{one:"tua 1 awr",other:"tua {{count}} awr"},xHours:{one:"1 awr",other:"{{count}} awr"},xDays:{one:"1 diwrnod",two:"2 ddiwrnod",other:"{{count}} diwrnod"},aboutXWeeks:{one:"tua 1 wythnos",two:"tua pythefnos",other:"tua {{count}} wythnos"},xWeeks:{one:"1 wythnos",two:"pythefnos",other:"{{count}} wythnos"},aboutXMonths:{one:"tua 1 mis",two:"tua 2 fis",other:"tua {{count}} mis"},xMonths:{one:"1 mis",two:"2 fis",other:"{{count}} mis"},aboutXYears:{one:"tua 1 flwyddyn",two:"tua 2 flynedd",other:"tua {{count}} mlynedd"},xYears:{one:"1 flwyddyn",two:"2 flynedd",other:"{{count}} mlynedd"},overXYears:{one:"dros 1 flwyddyn",two:"dros 2 flynedd",other:"dros {{count}} mlynedd"},almostXYears:{one:"bron 1 flwyddyn",two:"bron 2 flynedd",other:"bron {{count}} mlynedd"}},Qr=function(e,t,a){var n,i=Or[e];return n="string"==typeof i?i:1===t?i.one:2===t&&i.two?i.two:i.other.replace("{{count}}",String(t)),null!=a&&a.addSuffix?a.comparison&&a.comparison>0?"mewn "+n:n+" yn ôl":n},Yr={date:Qa({formats:{full:"EEEE, d MMMM yyyy",long:"d MMMM yyyy",medium:"d MMM yyyy",short:"dd/MM/yyyy"},defaultWidth:"full"}),time:Qa({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:Qa({formats:{full:"{{date}} 'am' {{time}}",long:"{{date}} 'am' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},qr=Yr,Jr={lastWeek:"eeee 'diwethaf am' p",yesterday:"'ddoe am' p",today:"'heddiw am' p",tomorrow:"'yfory am' p",nextWeek:"eeee 'am' p",other:"P"},Rr=function(e,t,a,n){return Jr[e]},Lr={ordinalNumber:function(e,t){var a=Number(e);if(a<20)switch(a){case 0:case 7:case 8:case 9:case 10:case 12:case 15:case 18:return a+"fed";case 1:return a+"af";case 2:return a+"ail";case 3:case 4:return a+"ydd";case 5:case 6:return a+"ed";case 11:case 13:case 14:case 16:case 17:case 19:return a+"eg"}else if(a>=50&&a<=60||80===a||a>=100)return a+"fed";return a+"ain"},era:Ra({values:{narrow:["C","O"],abbreviated:["CC","OC"],wide:["Cyn Crist","Ar ôl Crist"]},defaultWidth:"wide"}),quarter:Ra({values:{narrow:["1","2","3","4"],abbreviated:["Ch1","Ch2","Ch3","Ch4"],wide:["Chwarter 1af","2ail chwarter","3ydd chwarter","4ydd chwarter"]},defaultWidth:"wide",argumentCallback:function(e){return e-1}}),month:Ra({values:{narrow:["I","Ch","Ma","E","Mi","Me","G","A","Md","H","T","Rh"],abbreviated:["Ion","Chwe","Maw","Ebr","Mai","Meh","Gor","Aws","Med","Hyd","Tach","Rhag"],wide:["Ionawr","Chwefror","Mawrth","Ebrill","Mai","Mehefin","Gorffennaf","Awst","Medi","Hydref","Tachwedd","Rhagfyr"]},defaultWidth:"wide"}),day:Ra({values:{narrow:["S","Ll","M","M","I","G","S"],short:["Su","Ll","Ma","Me","Ia","Gw","Sa"],abbreviated:["Sul","Llun","Maw","Mer","Iau","Gwe","Sad"],wide:["dydd Sul","dydd Llun","dydd Mawrth","dydd Mercher","dydd Iau","dydd Gwener","dydd Sadwrn"]},defaultWidth:"wide"}),dayPeriod:Ra({values:{narrow:{am:"b",pm:"h",midnight:"hn",noon:"hd",morning:"bore",afternoon:"prynhawn",evening:"gyda'r nos",night:"nos"},abbreviated:{am:"yb",pm:"yh",midnight:"hanner nos",noon:"hanner dydd",morning:"bore",afternoon:"prynhawn",evening:"gyda'r nos",night:"nos"},wide:{am:"y.b.",pm:"y.h.",midnight:"hanner nos",noon:"hanner dydd",morning:"bore",afternoon:"prynhawn",evening:"gyda'r nos",night:"nos"}},defaultWidth:"wide",formattingValues:{narrow:{am:"b",pm:"h",midnight:"hn",noon:"hd",morning:"yn y bore",afternoon:"yn y prynhawn",evening:"gyda'r nos",night:"yn y nos"},abbreviated:{am:"yb",pm:"yh",midnight:"hanner nos",noon:"hanner dydd",morning:"yn y bore",afternoon:"yn y prynhawn",evening:"gyda'r nos",night:"yn y nos"},wide:{am:"y.b.",pm:"y.h.",midnight:"hanner nos",noon:"hanner dydd",morning:"yn y bore",afternoon:"yn y prynhawn",evening:"gyda'r nos",night:"yn y nos"}},defaultFormattingWidth:"wide"})},Fr=Lr,Zr={ordinalNumber:$a({matchPattern:/^(\d+)(af|ail|ydd|ed|fed|eg|ain)?/i,parsePattern:/\d+/i,valueCallback:function(e){return parseInt(e,10)}}),era:Fa({matchPatterns:{narrow:/^(c|o)/i,abbreviated:/^(c\.?\s?c\.?|o\.?\s?c\.?)/i,wide:/^(cyn christ|ar ôl crist|ar ol crist)/i},defaultMatchWidth:"wide",parsePatterns:{wide:[/^c/i,/^(ar ôl crist|ar ol crist)/i],any:[/^c/i,/^o/i]},defaultParseWidth:"any"}),quarter:Fa({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^ch[1234]/i,wide:/^(chwarter 1af)|([234](ail|ydd)? chwarter)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:function(e){return e+1}}),month:Fa({matchPatterns:{narrow:/^(i|ch|m|e|g|a|h|t|rh)/i,abbreviated:/^(ion|chwe|maw|ebr|mai|meh|gor|aws|med|hyd|tach|rhag)/i,wide:/^(ionawr|chwefror|mawrth|ebrill|mai|mehefin|gorffennaf|awst|medi|hydref|tachwedd|rhagfyr)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^i/i,/^ch/i,/^m/i,/^e/i,/^m/i,/^m/i,/^g/i,/^a/i,/^m/i,/^h/i,/^t/i,/^rh/i],any:[/^io/i,/^ch/i,/^maw/i,/^e/i,/^mai/i,/^meh/i,/^g/i,/^a/i,/^med/i,/^h/i,/^t/i,/^rh/i]},defaultParseWidth:"any"}),day:Fa({matchPatterns:{narrow:/^(s|ll|m|i|g)/i,short:/^(su|ll|ma|me|ia|gw|sa)/i,abbreviated:/^(sul|llun|maw|mer|iau|gwe|sad)/i,wide:/^dydd (sul|llun|mawrth|mercher|iau|gwener|sadwrn)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^s/i,/^ll/i,/^m/i,/^m/i,/^i/i,/^g/i,/^s/i],wide:[/^dydd su/i,/^dydd ll/i,/^dydd ma/i,/^dydd me/i,/^dydd i/i,/^dydd g/i,/^dydd sa/i],any:[/^su/i,/^ll/i,/^ma/i,/^me/i,/^i/i,/^g/i,/^sa/i]},defaultParseWidth:"any"}),dayPeriod:Fa({matchPatterns:{narrow:/^(b|h|hn|hd|(yn y|y|yr|gyda'r) (bore|prynhawn|nos|hwyr))/i,any:/^(y\.?\s?[bh]\.?|hanner nos|hanner dydd|(yn y|y|yr|gyda'r) (bore|prynhawn|nos|hwyr))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^b|(y\.?\s?b\.?)/i,pm:/^h|(y\.?\s?h\.?)|(yr hwyr)/i,midnight:/^hn|hanner nos/i,noon:/^hd|hanner dydd/i,morning:/bore/i,afternoon:/prynhawn/i,evening:/^gyda'r nos$/i,night:/blah/i}},defaultParseWidth:"any"})},_r=Zr,$r={code:"cy",formatDistance:Qr,formatLong:qr,formatRelative:Rr,localize:Fr,match:_r,options:{weekStartsOn:0,firstWeekContainsDate:1}},eo=$r,to={lessThanXSeconds:{one:"mindre end ét sekund",other:"mindre end {{count}} sekunder"},xSeconds:{one:"1 sekund",other:"{{count}} sekunder"},halfAMinute:"ét halvt minut",lessThanXMinutes:{one:"mindre end ét minut",other:"mindre end {{count}} minutter"},xMinutes:{one:"1 minut",other:"{{count}} minutter"},aboutXHours:{one:"cirka 1 time",other:"cirka {{count}} timer"},xHours:{one:"1 time",other:"{{count}} timer"},xDays:{one:"1 dag",other:"{{count}} dage"},aboutXWeeks:{one:"cirka 1 uge",other:"cirka {{count}} uger"},xWeeks:{one:"1 uge",other:"{{count}} uger"},aboutXMonths:{one:"cirka 1 måned",other:"cirka {{count}} måneder"},xMonths:{one:"1 måned",other:"{{count}} måneder"},aboutXYears:{one:"cirka 1 år",other:"cirka {{count}} år"},xYears:{one:"1 år",other:"{{count}} år"},overXYears:{one:"over 1 år",other:"over {{count}} år"},almostXYears:{one:"næsten 1 år",other:"næsten {{count}} år"}},ao=function(e,t,a){var n,i=to[e];return n="string"==typeof i?i:1===t?i.one:i.other.replace("{{count}}",String(t)),null!=a&&a.addSuffix?a.comparison&&a.comparison>0?"om "+n:n+" siden":n},no={date:Qa({formats:{full:"EEEE 'den' d. MMMM y",long:"d. MMMM y",medium:"d. MMM y",short:"dd/MM/y"},defaultWidth:"full"}),time:Qa({formats:{full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},defaultWidth:"full"}),dateTime:Qa({formats:{full:"{{date}} 'kl'. {{time}}",long:"{{date}} 'kl'. {{time}}",medium:"{{date}} {{time}}",short:"{{date}} {{time}}"},defaultWidth:"full"})},io=no,ro={lastWeek:"'sidste' eeee 'kl.' p",yesterday:"'i går kl.' p",today:"'i dag kl.' p",tomorrow:"'i morgen kl.' p",nextWeek:"'på' eeee 'kl.' p",other:"P"},oo=function(e,t,a,n){return ro[e]},so={ordinalNumber:function(e,t){return Number(e)+"."},era:Ra({values:{narrow:["fvt","vt"],abbreviated:["f.v.t.","v.t."],wide:["før vesterlandsk tidsregning","vesterlandsk tidsregning"]},defaultWidth:"wide"}),quarter:Ra({values:{narrow:["1","2","3","4"],abbreviated:["1. kvt.","2. kvt.","3. kvt.","4. kvt."],wide:["1. kvartal","2. kvartal","3. kvartal","4. kvartal"]},defaultWidth:"wide",argumentCallback:function(e){return e-1}}),month:Ra({values:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["jan.","feb.","mar.","apr.","maj","jun.","jul.","aug.","sep.","okt.","nov.","dec."],wide:["januar","februar","marts","april","maj","juni","juli","august","september","oktober","november","december"]},defaultWidth:"wide"}),day:Ra({values:{narrow:["S","M","T","O","T","F","L"],short:["sø","ma","ti","on","to","fr","lø"],abbreviated:["søn.","man.","tir.","ons.","tor.","fre.","lør."],wide:["søndag","mandag","tirsdag","onsdag","torsdag","fredag","lørdag"]},defaultWidth:"wide"}),dayPeriod:Ra({values:{narrow:{am:"a",pm:"p",midnight:"midnat",noon:"middag",morning:"morgen",afternoon:"eftermiddag",evening:"aften",night:"nat"},abbreviated:{am:"AM",pm:"PM",midnight:"midnat",noon:"middag",morning:"morgen",afternoon:"eftermiddag",evening:"aften",night:"nat"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnat",noon:"middag",morning:"morgen",afternoon:"eftermiddag",evening:"aften",night:"nat"}},defaultWidth:"wide",formattingValues:{narrow:{am:"a",pm:"p",midnight:"midnat",noon:"middag",morning:"om morgenen",afternoon:"om eftermiddagen",evening:"om aftenen",night:"om natten"},abbreviated:{am:"AM",pm:"PM",midnight:"midnat",noon:"middag",morning:"om morgenen",afternoon:"om eftermiddagen",evening:"om aftenen",night:"om natten"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnat",noon:"middag",morning:"om morgenen",afternoon:"om eftermiddagen",evening:"om aftenen",night:"om natten"}},defaultFormattingWidth:"wide"})},uo=so,mo={ordinalNumber:$a({matchPattern:/^(\d+)(\.)?/i,parsePattern:/\d+/i,valueCallback:function(e){return parseInt(e,10)}}),era:Fa({matchPatterns:{narrow:/^(fKr|fvt|eKr|vt)/i,abbreviated:/^(f\.Kr\.?|f\.v\.t\.?|e\.Kr\.?|v\.t\.)/i,wide:/^(f.Kr.|før vesterlandsk tidsregning|e.Kr.|vesterlandsk tidsregning)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^f/i,/^(v|e)/i]},defaultParseWidth:"any"}),quarter:Fa({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^[1234]. kvt\./i,wide:/^[1234]\.? kvartal/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:function(e){return e+1}}),month:Fa({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan.|feb.|mar.|apr.|maj|jun.|jul.|aug.|sep.|okt.|nov.|dec.)/i,wide:/^(januar|februar|marts|april|maj|juni|juli|august|september|oktober|november|december)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^maj/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:Fa({matchPatterns:{narrow:/^[smtofl]/i,short:/^(søn.|man.|tir.|ons.|tor.|fre.|lør.)/i,abbreviated:/^(søn|man|tir|ons|tor|fre|lør)/i,wide:/^(søndag|mandag|tirsdag|onsdag|torsdag|fredag|lørdag)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^o/i,/^t/i,/^f/i,/^l/i],any:[/^s/i,/^m/i,/^ti/i,/^o/i,/^to/i,/^f/i,/^l/i]},defaultParseWidth:"any"}),dayPeriod:Fa({matchPatterns:{narrow:/^(a|p|midnat|middag|(om) (morgenen|eftermiddagen|aftenen|natten))/i,any:/^([ap]\.?\s?m\.?|midnat|middag|(om) (morgenen|eftermiddagen|aftenen|natten))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/midnat/i,noon:/middag/i,morning:/morgen/i,afternoon:/eftermiddag/i,evening:/aften/i,night:/nat/i}},defaultParseWidth:"any"})},lo=mo,ho={code:"da",formatDistance:ao,formatLong:io,formatRelative:oo,localize:uo,match:lo,options:{weekStartsOn:1,firstWeekContainsDate:4}},co=ho,fo={lessThanXSeconds:{standalone:{one:"weniger als 1 Sekunde",other:"weniger als {{count}} Sekunden"},withPreposition:{one:"weniger als 1 Sekunde",other:"weniger als {{count}} Sekunden"}},xSeconds:{standalone:{one:"1 Sekunde",other:"{{count}} Sekunden"},withPreposition:{one:"1 Sekunde",other:"{{count}} Sekunden"}},halfAMinute:{standalone:"halbe Minute",withPreposition:"halben Minute"},lessThanXMinutes:{standalone:{one:"weniger als 1 Minute",other:"weniger als {{count}} Minuten"},withPreposition:{one:"weniger als 1 Minute",other:"weniger als {{count}} Minuten"}},xMinutes:{standalone:{one:"1 Minute",other:"{{count}} Minuten"},withPreposition:{one:"1 Minute",other:"{{count}} Minuten"}},aboutXHours:{standalone:{one:"etwa 1 Stunde",other:"etwa {{count}} Stunden"},withPreposition:{one:"etwa 1 Stunde",other:"etwa {{count}} Stunden"}},xHours:{standalone:{one:"1 Stunde",other:"{{count}} Stunden"},withPreposition:{one:"1 Stunde",other:"{{count}} Stunden"}},xDays:{standalone:{one:"1 Tag",other:"{{count}} Tage"},withPreposition:{one:"1 Tag",other:"{{count}} Tagen"}},aboutXWeeks:{standalone:{one:"etwa 1 Woche",other:"etwa {{count}} Wochen"},withPreposition:{one:"etwa 1 Woche",other:"etwa {{count}} Wochen"}},xWeeks:{standalone:{one:"1 Woche",other:"{{count}} Wochen"},withPreposition:{one:"1 Woche",other:"{{count}} Wochen"}},aboutXMonths:{standalone:{one:"etwa 1 Monat",other:"etwa {{count}} Monate"},withPreposition:{one:"etwa 1 Monat",other:"etwa {{count}} Monaten"}},xMonths:{standalone:{one:"1 Monat",other:"{{count}} Monate"},withPreposition:{one:"1 Monat",other:"{{count}} Monaten"}},aboutXYears:{standalone:{one:"etwa 1 Jahr",other:"etwa {{count}} Jahre"},withPreposition:{one:"etwa 1 Jahr",other:"etwa {{count}} Jahren"}},xYears:{standalone:{one:"1 Jahr",other:"{{count}} Jahre"},withPreposition:{one:"1 Jahr",other:"{{count}} Jahren"}},overXYears:{standalone:{one:"mehr als 1 Jahr",other:"mehr als {{count}} Jahre"},withPreposition:{one:"mehr als 1 Jahr",other:"mehr als {{count}} Jahren"}},almostXYears:{standalone:{one:"fast 1 Jahr",other:"fast {{count}} Jahre"},withPreposition:{one:"fast 1 Jahr",other:"fast {{count}} Jahren"}}},go=function(e,t,a){var n,i=null!=a&&a.addSuffix?fo[e].withPreposition:fo[e].standalone;return n="string"==typeof i?i:1===t?i.one:i.other.replace("{{count}}",String(t)),null!=a&&a.addSuffix?a.comparison&&a.comparison>0?"in "+n:"vor "+n:n},po={date:Qa({formats:{full:"EEEE, do MMMM y",long:"do MMMM y",medium:"do MMM y",short:"dd.MM.y"},defaultWidth:"full"}),time:Qa({formats:{full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},defaultWidth:"full"}),dateTime:Qa({formats:{full:"{{date}} 'um' {{time}}",long:"{{date}} 'um' {{time}}",medium:"{{date}} {{time}}",short:"{{date}} {{time}}"},defaultWidth:"full"})},vo=po,bo={lastWeek:"'letzten' eeee 'um' p",yesterday:"'gestern um' p",today:"'heute um' p",tomorrow:"'morgen um' p",nextWeek:"eeee 'um' p",other:"P"},wo=function(e,t,a,n){return bo[e]},yo={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mär","Apr","Mai","Jun","Jul","Aug","Sep","Okt","Nov","Dez"],wide:["Januar","Februar","März","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember"]},Ao={narrow:yo.narrow,abbreviated:["Jan.","Feb.","März","Apr.","Mai","Juni","Juli","Aug.","Sep.","Okt.","Nov.","Dez."],wide:yo.wide},ko={ordinalNumber:function(e){return Number(e)+"."},era:Ra({values:{narrow:["v.Chr.","n.Chr."],abbreviated:["v.Chr.","n.Chr."],wide:["vor Christus","nach Christus"]},defaultWidth:"wide"}),quarter:Ra({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1. Quartal","2. Quartal","3. Quartal","4. Quartal"]},defaultWidth:"wide",argumentCallback:function(e){return e-1}}),month:Ra({values:yo,formattingValues:Ao,defaultWidth:"wide"}),day:Ra({values:{narrow:["S","M","D","M","D","F","S"],short:["So","Mo","Di","Mi","Do","Fr","Sa"],abbreviated:["So.","Mo.","Di.","Mi.","Do.","Fr.","Sa."],wide:["Sonntag","Montag","Dienstag","Mittwoch","Donnerstag","Freitag","Samstag"]},defaultWidth:"wide"}),dayPeriod:Ra({values:{narrow:{am:"vm.",pm:"nm.",midnight:"Mitternacht",noon:"Mittag",morning:"Morgen",afternoon:"Nachm.",evening:"Abend",night:"Nacht"},abbreviated:{am:"vorm.",pm:"nachm.",midnight:"Mitternacht",noon:"Mittag",morning:"Morgen",afternoon:"Nachmittag",evening:"Abend",night:"Nacht"},wide:{am:"vormittags",pm:"nachmittags",midnight:"Mitternacht",noon:"Mittag",morning:"Morgen",afternoon:"Nachmittag",evening:"Abend",night:"Nacht"}},defaultWidth:"wide",formattingValues:{narrow:{am:"vm.",pm:"nm.",midnight:"Mitternacht",noon:"Mittag",morning:"morgens",afternoon:"nachm.",evening:"abends",night:"nachts"},abbreviated:{am:"vorm.",pm:"nachm.",midnight:"Mitternacht",noon:"Mittag",morning:"morgens",afternoon:"nachmittags",evening:"abends",night:"nachts"},wide:{am:"vormittags",pm:"nachmittags",midnight:"Mitternacht",noon:"Mittag",morning:"morgens",afternoon:"nachmittags",evening:"abends",night:"nachts"}},defaultFormattingWidth:"wide"})},Mo=ko,Po={ordinalNumber:$a({matchPattern:/^(\d+)(\.)?/i,parsePattern:/\d+/i,valueCallback:function(e){return parseInt(e)}}),era:Fa({matchPatterns:{narrow:/^(v\.? ?Chr\.?|n\.? ?Chr\.?)/i,abbreviated:/^(v\.? ?Chr\.?|n\.? ?Chr\.?)/i,wide:/^(vor Christus|vor unserer Zeitrechnung|nach Christus|unserer Zeitrechnung)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^v/i,/^n/i]},defaultParseWidth:"any"}),quarter:Fa({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](\.)? Quartal/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:function(e){return e+1}}),month:Fa({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(j[aä]n|feb|mär[z]?|apr|mai|jun[i]?|jul[i]?|aug|sep|okt|nov|dez)\.?/i,wide:/^(januar|februar|märz|april|mai|juni|juli|august|september|oktober|november|dezember)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^j[aä]/i,/^f/i,/^mär/i,/^ap/i,/^mai/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:Fa({matchPatterns:{narrow:/^[smdmf]/i,short:/^(so|mo|di|mi|do|fr|sa)/i,abbreviated:/^(son?|mon?|die?|mit?|don?|fre?|sam?)\.?/i,wide:/^(sonntag|montag|dienstag|mittwoch|donnerstag|freitag|samstag)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^so/i,/^mo/i,/^di/i,/^mi/i,/^do/i,/^f/i,/^sa/i]},defaultParseWidth:"any"}),dayPeriod:Fa({matchPatterns:{narrow:/^(vm\.?|nm\.?|Mitternacht|Mittag|morgens|nachm\.?|abends|nachts)/i,abbreviated:/^(vorm\.?|nachm\.?|Mitternacht|Mittag|morgens|nachm\.?|abends|nachts)/i,wide:/^(vormittags|nachmittags|Mitternacht|Mittag|morgens|nachmittags|abends|nachts)/i},defaultMatchWidth:"wide",parsePatterns:{any:{am:/^v/i,pm:/^n/i,midnight:/^Mitte/i,noon:/^Mitta/i,morning:/morgens/i,afternoon:/nachmittags/i,evening:/abends/i,night:/nachts/i}},defaultParseWidth:"any"})},Wo=Po,xo={code:"de",formatDistance:go,formatLong:vo,formatRelative:wo,localize:Mo,match:Wo,options:{weekStartsOn:1,firstWeekContainsDate:4}},zo=xo,jo={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jän","Feb","Mär","Apr","Mai","Jun","Jul","Aug","Sep","Okt","Nov","Dez"],wide:["Jänner","Februar","März","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember"]},Co={narrow:jo.narrow,abbreviated:["Jän.","Feb.","März","Apr.","Mai","Juni","Juli","Aug.","Sep.","Okt.","Nov.","Dez."],wide:jo.wide},To={ordinalNumber:function(e){return Number(e)+"."},era:Ra({values:{narrow:["v.Chr.","n.Chr."],abbreviated:["v.Chr.","n.Chr."],wide:["vor Christus","nach Christus"]},defaultWidth:"wide"}),quarter:Ra({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1. Quartal","2. Quartal","3. Quartal","4. Quartal"]},defaultWidth:"wide",argumentCallback:function(e){return e-1}}),month:Ra({values:jo,formattingValues:Co,defaultWidth:"wide"}),day:Ra({values:{narrow:["S","M","D","M","D","F","S"],short:["So","Mo","Di","Mi","Do","Fr","Sa"],abbreviated:["So.","Mo.","Di.","Mi.","Do.","Fr.","Sa."],wide:["Sonntag","Montag","Dienstag","Mittwoch","Donnerstag","Freitag","Samstag"]},defaultWidth:"wide"}),dayPeriod:Ra({values:{narrow:{am:"vm.",pm:"nm.",midnight:"Mitternacht",noon:"Mittag",morning:"Morgen",afternoon:"Nachm.",evening:"Abend",night:"Nacht"},abbreviated:{am:"vorm.",pm:"nachm.",midnight:"Mitternacht",noon:"Mittag",morning:"Morgen",afternoon:"Nachmittag",evening:"Abend",night:"Nacht"},wide:{am:"vormittags",pm:"nachmittags",midnight:"Mitternacht",noon:"Mittag",morning:"Morgen",afternoon:"Nachmittag",evening:"Abend",night:"Nacht"}},defaultWidth:"wide",formattingValues:{narrow:{am:"vm.",pm:"nm.",midnight:"Mitternacht",noon:"Mittag",morning:"morgens",afternoon:"nachm.",evening:"abends",night:"nachts"},abbreviated:{am:"vorm.",pm:"nachm.",midnight:"Mitternacht",noon:"Mittag",morning:"morgens",afternoon:"nachmittags",evening:"abends",night:"nachts"},wide:{am:"vormittags",pm:"nachmittags",midnight:"Mitternacht",noon:"Mittag",morning:"morgens",afternoon:"nachmittags",evening:"abends",night:"nachts"}},defaultFormattingWidth:"wide"})},So=To,Ho={code:"de-AT",formatDistance:go,formatLong:vo,formatRelative:wo,localize:So,match:Wo,options:{weekStartsOn:1,firstWeekContainsDate:4}},Do=Ho,No={lessThanXSeconds:{one:"λιγότερο από ένα δευτερόλεπτο",other:"λιγότερο από {{count}} δευτερόλεπτα"},xSeconds:{one:"1 δευτερόλεπτο",other:"{{count}} δευτερόλεπτα"},halfAMinute:"μισό λεπτό",lessThanXMinutes:{one:"λιγότερο από ένα λεπτό",other:"λιγότερο από {{count}} λεπτά"},xMinutes:{one:"1 λεπτό",other:"{{count}} λεπτά"},aboutXHours:{one:"περίπου 1 ώρα",other:"περίπου {{count}} ώρες"},xHours:{one:"1 ώρα",other:"{{count}} ώρες"},xDays:{one:"1 ημέρα",other:"{{count}} ημέρες"},aboutXWeeks:{one:"περίπου 1 εβδομάδα",other:"περίπου {{count}} εβδομάδες"},xWeeks:{one:"1 εβδομάδα",other:"{{count}} εβδομάδες"},aboutXMonths:{one:"περίπου 1 μήνας",other:"περίπου {{count}} μήνες"},xMonths:{one:"1 μήνας",other:"{{count}} μήνες"},aboutXYears:{one:"περίπου 1 χρόνο",other:"περίπου {{count}} χρόνια"},xYears:{one:"1 χρόνο",other:"{{count}} χρόνια"},overXYears:{one:"πάνω από 1 χρόνο",other:"πάνω από {{count}} χρόνια"},almostXYears:{one:"περίπου 1 χρόνο",other:"περίπου {{count}} χρόνια"}},Xo=function(e,t,a){var n,i=No[e];return n="string"==typeof i?i:1===t?i.one:i.other.replace("{{count}}",String(t)),null!=a&&a.addSuffix?a.comparison&&a.comparison>0?"σε "+n:n+" πριν":n},Io={date:Qa({formats:{full:"EEEE, d MMMM y",long:"d MMMM y",medium:"d MMM y",short:"d/M/yy"},defaultWidth:"full"}),time:Qa({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:Qa({formats:{full:"{{date}} - {{time}}",long:"{{date}} - {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},Eo=Io,Bo={lastWeek:function(e){return 6===e.getUTCDay()?"'το προηγούμενο' eeee 'στις' p":"'την προηγούμενη' eeee 'στις' p"},yesterday:"'χθες στις' p",today:"'σήμερα στις' p",tomorrow:"'αύριο στις' p",nextWeek:"eeee 'στις' p",other:"P"},Vo=function(e,t){var a=Bo[e];return"function"==typeof a?a(t):a},Ko={ordinalNumber:function(e,t){var a=Number(e),n=null==t?void 0:t.unit;return a+("year"===n||"month"===n?"ος":"week"===n||"dayOfYear"===n||"day"===n||"hour"===n||"date"===n?"η":"ο")},era:Ra({values:{narrow:["πΧ","μΧ"],abbreviated:["π.Χ.","μ.Χ."],wide:["προ Χριστού","μετά Χριστόν"]},defaultWidth:"wide"}),quarter:Ra({values:{narrow:["1","2","3","4"],abbreviated:["Τ1","Τ2","Τ3","Τ4"],wide:["1ο τρίμηνο","2ο τρίμηνο","3ο τρίμηνο","4ο τρίμηνο"]},defaultWidth:"wide",argumentCallback:function(e){return e-1}}),month:Ra({values:{narrow:["Ι","Φ","Μ","Α","Μ","Ι","Ι","Α","Σ","Ο","Ν","Δ"],abbreviated:["Ιαν","Φεβ","Μάρ","Απρ","Μάι","Ιούν","Ιούλ","Αύγ","Σεπ","Οκτ","Νοέ","Δεκ"],wide:["Ιανουάριος","Φεβρουάριος","Μάρτιος","Απρίλιος","Μάιος","Ιούνιος","Ιούλιος","Αύγουστος","Σεπτέμβριος","Οκτώβριος","Νοέμβριος","Δεκέμβριος"]},defaultWidth:"wide",formattingValues:{narrow:["Ι","Φ","Μ","Α","Μ","Ι","Ι","Α","Σ","Ο","Ν","Δ"],abbreviated:["Ιαν","Φεβ","Μαρ","Απρ","Μαΐ","Ιουν","Ιουλ","Αυγ","Σεπ","Οκτ","Νοε","Δεκ"],wide:["Ιανουαρίου","Φεβρουαρίου","Μαρτίου","Απριλίου","Μαΐου","Ιουνίου","Ιουλίου","Αυγούστου","Σεπτεμβρίου","Οκτωβρίου","Νοεμβρίου","Δεκεμβρίου"]},defaultFormattingWidth:"wide"}),day:Ra({values:{narrow:["Κ","Δ","T","Τ","Π","Π","Σ"],short:["Κυ","Δε","Τρ","Τε","Πέ","Πα","Σά"],abbreviated:["Κυρ","Δευ","Τρί","Τετ","Πέμ","Παρ","Σάβ"],wide:["Κυριακή","Δευτέρα","Τρίτη","Τετάρτη","Πέμπτη","Παρασκευή","Σάββατο"]},defaultWidth:"wide"}),dayPeriod:Ra({values:{narrow:{am:"πμ",pm:"μμ",midnight:"μεσάνυχτα",noon:"μεσημέρι",morning:"πρωί",afternoon:"απόγευμα",evening:"βράδυ",night:"νύχτα"},abbreviated:{am:"π.μ.",pm:"μ.μ.",midnight:"μεσάνυχτα",noon:"μεσημέρι",morning:"πρωί",afternoon:"απόγευμα",evening:"βράδυ",night:"νύχτα"},wide:{am:"π.μ.",pm:"μ.μ.",midnight:"μεσάνυχτα",noon:"μεσημέρι",morning:"πρωί",afternoon:"απόγευμα",evening:"βράδυ",night:"νύχτα"}},defaultWidth:"wide"})},Uo=Ko,Go={ordinalNumber:$a({matchPattern:/^(\d+)(ος|η|ο)?/i,parsePattern:/\d+/i,valueCallback:function(e){return parseInt(e,10)}}),era:Fa({matchPatterns:{narrow:/^(πΧ|μΧ)/i,abbreviated:/^(π\.?\s?χ\.?|π\.?\s?κ\.?\s?χ\.?|μ\.?\s?χ\.?|κ\.?\s?χ\.?)/i,wide:/^(προ Χριστο(ύ|υ)|πριν απ(ό|ο) την Κοιν(ή|η) Χρονολογ(ί|ι)α|μετ(ά|α) Χριστ(ό|ο)ν|Κοιν(ή|η) Χρονολογ(ί|ι)α)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^π/i,/^(μ|κ)/i]},defaultParseWidth:"any"}),quarter:Fa({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^τ[1234]/i,wide:/^[1234]ο? τρ(ί|ι)μηνο/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:function(e){return e+1}}),month:Fa({matchPatterns:{narrow:/^[ιφμαμιιασονδ]/i,abbreviated:/^(ιαν|φεβ|μ[άα]ρ|απρ|μ[άα][ιΐ]|ιο[ύυ]ν|ιο[ύυ]λ|α[ύυ]γ|σεπ|οκτ|νο[έε]|δεκ)/i,wide:/^(μ[άα][ιΐ]|α[ύυ]γο[υύ]στ)(ος|ου)|(ιανου[άα]ρ|φεβρου[άα]ρ|μ[άα]ρτ|απρ[ίι]λ|ιο[ύυ]ν|ιο[ύυ]λ|σεπτ[έε]μβρ|οκτ[ώω]βρ|νο[έε]μβρ|δεκ[έε]μβρ)(ιος|ίου)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^ι/i,/^φ/i,/^μ/i,/^α/i,/^μ/i,/^ι/i,/^ι/i,/^α/i,/^σ/i,/^ο/i,/^ν/i,/^δ/i],any:[/^ια/i,/^φ/i,/^μ[άα]ρ/i,/^απ/i,/^μ[άα][ιΐ]/i,/^ιο[ύυ]ν/i,/^ιο[ύυ]λ/i,/^α[ύυ]/i,/^σ/i,/^ο/i,/^ν/i,/^δ/i]},defaultParseWidth:"any"}),day:Fa({matchPatterns:{narrow:/^[κδτπσ]/i,short:/^(κυ|δε|τρ|τε|π[εέ]|π[αά]|σ[αά])/i,abbreviated:/^(κυρ|δευ|τρι|τετ|πεμ|παρ|σαβ)/i,wide:/^(κυριακ(ή|η)|δευτ(έ|ε)ρα|τρ(ί|ι)τη|τετ(ά|α)ρτη|π(έ|ε)μπτη|παρασκευ(ή|η)|σ(ά|α)ββατο)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^κ/i,/^δ/i,/^τ/i,/^τ/i,/^π/i,/^π/i,/^σ/i],any:[/^κ/i,/^δ/i,/^τρ/i,/^τε/i,/^π[εέ]/i,/^π[αά]/i,/^σ/i]},defaultParseWidth:"any"}),dayPeriod:Fa({matchPatterns:{narrow:/^(πμ|μμ|μεσ(ά|α)νυχτα|μεσημ(έ|ε)ρι|πρω(ί|ι)|απ(ό|ο)γευμα|βρ(ά|α)δυ|ν(ύ|υ)χτα)/i,any:/^([πμ]\.?\s?μ\.?|μεσ(ά|α)νυχτα|μεσημ(έ|ε)ρι|πρω(ί|ι)|απ(ό|ο)γευμα|βρ(ά|α)δυ|ν(ύ|υ)χτα)/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^πμ|π\.\s?μ\./i,pm:/^μμ|μ\.\s?μ\./i,midnight:/^μεσάν/i,noon:/^μεσημ(έ|ε)/i,morning:/πρω(ί|ι)/i,afternoon:/απ(ό|ο)γευμα/i,evening:/βρ(ά|α)δυ/i,night:/ν(ύ|υ)χτα/i}},defaultParseWidth:"any"})},Oo=Go,Qo={code:"el",formatDistance:Xo,formatLong:Eo,formatRelative:Vo,localize:Uo,match:Oo,options:{weekStartsOn:1,firstWeekContainsDate:4}},Yo=Qo,qo={date:Qa({formats:{full:"EEEE, d MMMM yyyy",long:"d MMMM yyyy",medium:"d MMM yyyy",short:"dd/MM/yyyy"},defaultWidth:"full"}),time:Qa({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:Qa({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},Jo=qo,Ro={code:"en-AU",formatDistance:Oa,formatLong:Jo,formatRelative:Ja,localize:La,match:en,options:{weekStartsOn:1,firstWeekContainsDate:4}},Lo=Ro,Fo={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"a second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"a minute",other:"{{count}} minutes"},aboutXHours:{one:"about an hour",other:"about {{count}} hours"},xHours:{one:"an hour",other:"{{count}} hours"},xDays:{one:"a day",other:"{{count}} days"},aboutXWeeks:{one:"about a week",other:"about {{count}} weeks"},xWeeks:{one:"a week",other:"{{count}} weeks"},aboutXMonths:{one:"about a month",other:"about {{count}} months"},xMonths:{one:"a month",other:"{{count}} months"},aboutXYears:{one:"about a year",other:"about {{count}} years"},xYears:{one:"a year",other:"{{count}} years"},overXYears:{one:"over a year",other:"over {{count}} years"},almostXYears:{one:"almost a year",other:"almost {{count}} years"}},Zo=function(e,t,a){var n,i=Fo[e];return n="string"==typeof i?i:1===t?i.one:i.other.replace("{{count}}",t.toString()),null!=a&&a.addSuffix?a.comparison&&a.comparison>0?"in "+n:n+" ago":n},_o={date:Qa({formats:{full:"EEEE, MMMM do, yyyy",long:"MMMM do, yyyy",medium:"MMM d, yyyy",short:"yyyy-MM-dd"},defaultWidth:"full"}),time:Qa({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:Qa({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},$o=_o,ed={code:"en-CA",formatDistance:Zo,formatLong:$o,formatRelative:Ja,localize:La,match:en,options:{weekStartsOn:0,firstWeekContainsDate:1}},td=ed,ad={date:Qa({formats:{full:"EEEE, d MMMM yyyy",long:"d MMMM yyyy",medium:"d MMM yyyy",short:"dd/MM/yyyy"},defaultWidth:"full"}),time:Qa({formats:{full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},defaultWidth:"full"}),dateTime:Qa({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},nd=ad,id={code:"en-GB",formatDistance:Oa,formatLong:nd,formatRelative:Ja,localize:La,match:en,options:{weekStartsOn:1,firstWeekContainsDate:4}},rd=id,od={code:"en-IE",formatDistance:Oa,formatLong:nd,formatRelative:Ja,localize:La,match:en,options:{weekStartsOn:1,firstWeekContainsDate:4}},dd=od,sd={code:"en-IN",formatDistance:Oa,formatLong:{date:Qa({formats:{full:"EEEE, d MMMM yyyy",long:"d MMMM, yyyy",medium:"d MMM, yyyy",short:"dd/MM/yyyy"},defaultWidth:"full"}),time:Qa({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:Qa({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},formatRelative:Ja,localize:La,match:en,options:{weekStartsOn:1,firstWeekContainsDate:4}},ud={code:"en-NZ",formatDistance:Oa,formatLong:{date:Qa({formats:{full:"EEEE, d MMMM yyyy",long:"d MMMM yyyy",medium:"d MMM yyyy",short:"dd/MM/yyyy"},defaultWidth:"full"}),time:Qa({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:Qa({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},formatRelative:Ja,localize:La,match:en,options:{weekStartsOn:1,firstWeekContainsDate:4}},md={code:"en-ZA",formatDistance:Oa,formatLong:{date:Qa({formats:{full:"EEEE, dd MMMM yyyy",long:"dd MMMM yyyy",medium:"dd MMM yyyy",short:"yyyy/MM/dd"},defaultWidth:"full"}),time:Qa({formats:{full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},defaultWidth:"full"}),dateTime:Qa({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},formatRelative:Ja,localize:La,match:en,options:{weekStartsOn:0,firstWeekContainsDate:1}},ld={lessThanXSeconds:{one:"malpli ol sekundo",other:"malpli ol {{count}} sekundoj"},xSeconds:{one:"1 sekundo",other:"{{count}} sekundoj"},halfAMinute:"duonminuto",lessThanXMinutes:{one:"malpli ol minuto",other:"malpli ol {{count}} minutoj"},xMinutes:{one:"1 minuto",other:"{{count}} minutoj"},aboutXHours:{one:"proksimume 1 horo",other:"proksimume {{count}} horoj"},xHours:{one:"1 horo",other:"{{count}} horoj"},xDays:{one:"1 tago",other:"{{count}} tagoj"},aboutXMonths:{one:"proksimume 1 monato",other:"proksimume {{count}} monatoj"},xWeeks:{one:"1 semajno",other:"{{count}} semajnoj"},aboutXWeeks:{one:"proksimume 1 semajno",other:"proksimume {{count}} semajnoj"},xMonths:{one:"1 monato",other:"{{count}} monatoj"},aboutXYears:{one:"proksimume 1 jaro",other:"proksimume {{count}} jaroj"},xYears:{one:"1 jaro",other:"{{count}} jaroj"},overXYears:{one:"pli ol 1 jaro",other:"pli ol {{count}} jaroj"},almostXYears:{one:"preskaŭ 1 jaro",other:"preskaŭ {{count}} jaroj"}},hd=function(e,t,a){var n,i=ld[e];return n="string"==typeof i?i:1===t?i.one:i.other.replace("{{count}}",String(t)),null!=a&&a.addSuffix?null!=a&&a.comparison&&a.comparison>0?"post "+n:"antaŭ "+n:n},cd={date:Qa({formats:{full:"EEEE, do 'de' MMMM y",long:"y-MMMM-dd",medium:"y-MMM-dd",short:"yyyy-MM-dd"},defaultWidth:"full"}),time:Qa({formats:{full:"Ho 'horo kaj' m:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},defaultWidth:"full"}),dateTime:Qa({formats:{any:"{{date}} {{time}}"},defaultWidth:"any"})},fd={lastWeek:"'pasinta' eeee 'je' p",yesterday:"'hieraŭ je' p",today:"'hodiaŭ je' p",tomorrow:"'morgaŭ je' p",nextWeek:"eeee 'je' p",other:"P"},gd={code:"eo",formatDistance:hd,formatLong:cd,formatRelative:function(e,t,a,n){return fd[e]},localize:{ordinalNumber:function(e){return Number(e)+"-a"},era:Ra({values:{narrow:["aK","pK"],abbreviated:["a.K.E.","p.K.E."],wide:["antaŭ Komuna Erao","Komuna Erao"]},defaultWidth:"wide"}),quarter:Ra({values:{narrow:["1","2","3","4"],abbreviated:["K1","K2","K3","K4"],wide:["1-a kvaronjaro","2-a kvaronjaro","3-a kvaronjaro","4-a kvaronjaro"]},defaultWidth:"wide",argumentCallback:function(e){return Number(e)-1}}),month:Ra({values:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["jan","feb","mar","apr","maj","jun","jul","aŭg","sep","okt","nov","dec"],wide:["januaro","februaro","marto","aprilo","majo","junio","julio","aŭgusto","septembro","oktobro","novembro","decembro"]},defaultWidth:"wide"}),day:Ra({values:{narrow:["D","L","M","M","Ĵ","V","S"],short:["di","lu","ma","me","ĵa","ve","sa"],abbreviated:["dim","lun","mar","mer","ĵaŭ","ven","sab"],wide:["dimanĉo","lundo","mardo","merkredo","ĵaŭdo","vendredo","sabato"]},defaultWidth:"wide"}),dayPeriod:Ra({values:{narrow:{am:"a",pm:"p",midnight:"noktomezo",noon:"tagmezo",morning:"matene",afternoon:"posttagmeze",evening:"vespere",night:"nokte"},abbreviated:{am:"a.t.m.",pm:"p.t.m.",midnight:"noktomezo",noon:"tagmezo",morning:"matene",afternoon:"posttagmeze",evening:"vespere",night:"nokte"},wide:{am:"antaŭtagmeze",pm:"posttagmeze",midnight:"noktomezo",noon:"tagmezo",morning:"matene",afternoon:"posttagmeze",evening:"vespere",night:"nokte"}},defaultWidth:"wide"})},match:{ordinalNumber:$a({matchPattern:/^(\d+)(-?a)?/i,parsePattern:/\d+/i,valueCallback:function(e){return parseInt(e,10)}}),era:Fa({matchPatterns:{narrow:/^([ap]k)/i,abbreviated:/^([ap]\.?\s?k\.?\s?e\.?)/i,wide:/^((antaǔ |post )?komuna erao)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^a/i,/^[kp]/i]},defaultParseWidth:"any"}),quarter:Fa({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^k[1234]/i,wide:/^[1234](-?a)? kvaronjaro/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:function(e){return e+1}}),month:Fa({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|maj|jun|jul|a(ŭ|ux|uh|u)g|sep|okt|nov|dec)/i,wide:/^(januaro|februaro|marto|aprilo|majo|junio|julio|a(ŭ|ux|uh|u)gusto|septembro|oktobro|novembro|decembro)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^maj/i,/^jun/i,/^jul/i,/^a(u|ŭ)/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:Fa({matchPatterns:{narrow:/^[dlmĵjvs]/i,short:/^(di|lu|ma|me|(ĵ|jx|jh|j)a|ve|sa)/i,abbreviated:/^(dim|lun|mar|mer|(ĵ|jx|jh|j)a(ŭ|ux|uh|u)|ven|sab)/i,wide:/^(diman(ĉ|cx|ch|c)o|lundo|mardo|merkredo|(ĵ|jx|jh|j)a(ŭ|ux|uh|u)do|vendredo|sabato)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^d/i,/^l/i,/^m/i,/^m/i,/^(j|ĵ)/i,/^v/i,/^s/i],any:[/^d/i,/^l/i,/^ma/i,/^me/i,/^(j|ĵ)/i,/^v/i,/^s/i]},defaultParseWidth:"any"}),dayPeriod:Fa({matchPatterns:{narrow:/^([ap]|(posttagmez|noktomez|tagmez|maten|vesper|nokt)[eo])/i,abbreviated:/^([ap][.\s]?t[.\s]?m[.\s]?|(posttagmez|noktomez|tagmez|maten|vesper|nokt)[eo])/i,wide:/^(anta(ŭ|ux)tagmez|posttagmez|noktomez|tagmez|maten|vesper|nokt)[eo]/i},defaultMatchWidth:"wide",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^noktom/i,noon:/^t/i,morning:/^m/i,afternoon:/^posttagmeze/i,evening:/^v/i,night:/^n/i}},defaultParseWidth:"any"})},options:{weekStartsOn:1,firstWeekContainsDate:4}},pd={lessThanXSeconds:{one:"menos de un segundo",other:"menos de {{count}} segundos"},xSeconds:{one:"1 segundo",other:"{{count}} segundos"},halfAMinute:"medio minuto",lessThanXMinutes:{one:"menos de un minuto",other:"menos de {{count}} minutos"},xMinutes:{one:"1 minuto",other:"{{count}} minutos"},aboutXHours:{one:"alrededor de 1 hora",other:"alrededor de {{count}} horas"},xHours:{one:"1 hora",other:"{{count}} horas"},xDays:{one:"1 día",other:"{{count}} días"},aboutXWeeks:{one:"alrededor de 1 semana",other:"alrededor de {{count}} semanas"},xWeeks:{one:"1 semana",other:"{{count}} semanas"},aboutXMonths:{one:"alrededor de 1 mes",other:"alrededor de {{count}} meses"},xMonths:{one:"1 mes",other:"{{count}} meses"},aboutXYears:{one:"alrededor de 1 año",other:"alrededor de {{count}} años"},xYears:{one:"1 año",other:"{{count}} años"},overXYears:{one:"más de 1 año",other:"más de {{count}} años"},almostXYears:{one:"casi 1 año",other:"casi {{count}} años"}},vd=function(e,t,a){var n,i=pd[e];return n="string"==typeof i?i:1===t?i.one:i.other.replace("{{count}}",t.toString()),null!=a&&a.addSuffix?a.comparison&&a.comparison>0?"en "+n:"hace "+n:n},bd={date:Qa({formats:{full:"EEEE, d 'de' MMMM 'de' y",long:"d 'de' MMMM 'de' y",medium:"d MMM y",short:"dd/MM/y"},defaultWidth:"full"}),time:Qa({formats:{full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},defaultWidth:"full"}),dateTime:Qa({formats:{full:"{{date}} 'a las' {{time}}",long:"{{date}} 'a las' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},wd={lastWeek:"'el' eeee 'pasado a la' p",yesterday:"'ayer a la' p",today:"'hoy a la' p",tomorrow:"'mañana a la' p",nextWeek:"eeee 'a la' p",other:"P"},yd={lastWeek:"'el' eeee 'pasado a las' p",yesterday:"'ayer a las' p",today:"'hoy a las' p",tomorrow:"'mañana a las' p",nextWeek:"eeee 'a las' p",other:"P"},Ad={code:"es",formatDistance:vd,formatLong:bd,formatRelative:function(e,t,a,n){return 1!==t.getUTCHours()?yd[e]:wd[e]},localize:{ordinalNumber:function(e,t){return Number(e)+"º"},era:Ra({values:{narrow:["AC","DC"],abbreviated:["AC","DC"],wide:["antes de cristo","después de cristo"]},defaultWidth:"wide"}),quarter:Ra({values:{narrow:["1","2","3","4"],abbreviated:["T1","T2","T3","T4"],wide:["1º trimestre","2º trimestre","3º trimestre","4º trimestre"]},defaultWidth:"wide",argumentCallback:function(e){return Number(e)-1}}),month:Ra({values:{narrow:["e","f","m","a","m","j","j","a","s","o","n","d"],abbreviated:["ene","feb","mar","abr","may","jun","jul","ago","sep","oct","nov","dic"],wide:["enero","febrero","marzo","abril","mayo","junio","julio","agosto","septiembre","octubre","noviembre","diciembre"]},defaultWidth:"wide"}),day:Ra({values:{narrow:["d","l","m","m","j","v","s"],short:["do","lu","ma","mi","ju","vi","sá"],abbreviated:["dom","lun","mar","mié","jue","vie","sáb"],wide:["domingo","lunes","martes","miércoles","jueves","viernes","sábado"]},defaultWidth:"wide"}),dayPeriod:Ra({values:{narrow:{am:"a",pm:"p",midnight:"mn",noon:"md",morning:"mañana",afternoon:"tarde",evening:"tarde",night:"noche"},abbreviated:{am:"AM",pm:"PM",midnight:"medianoche",noon:"mediodia",morning:"mañana",afternoon:"tarde",evening:"tarde",night:"noche"},wide:{am:"a.m.",pm:"p.m.",midnight:"medianoche",noon:"mediodia",morning:"mañana",afternoon:"tarde",evening:"tarde",night:"noche"}},defaultWidth:"wide",formattingValues:{narrow:{am:"a",pm:"p",midnight:"mn",noon:"md",morning:"de la mañana",afternoon:"de la tarde",evening:"de la tarde",night:"de la noche"},abbreviated:{am:"AM",pm:"PM",midnight:"medianoche",noon:"mediodia",morning:"de la mañana",afternoon:"de la tarde",evening:"de la tarde",night:"de la noche"},wide:{am:"a.m.",pm:"p.m.",midnight:"medianoche",noon:"mediodia",morning:"de la mañana",afternoon:"de la tarde",evening:"de la tarde",night:"de la noche"}},defaultFormattingWidth:"wide"})},match:{ordinalNumber:$a({matchPattern:/^(\d+)(º)?/i,parsePattern:/\d+/i,valueCallback:function(e){return parseInt(e,10)}}),era:Fa({matchPatterns:{narrow:/^(ac|dc|a|d)/i,abbreviated:/^(a\.?\s?c\.?|a\.?\s?e\.?\s?c\.?|d\.?\s?c\.?|e\.?\s?c\.?)/i,wide:/^(antes de cristo|antes de la era com[uú]n|despu[eé]s de cristo|era com[uú]n)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^ac/i,/^dc/i],wide:[/^(antes de cristo|antes de la era com[uú]n)/i,/^(despu[eé]s de cristo|era com[uú]n)/i]},defaultParseWidth:"any"}),quarter:Fa({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^T[1234]/i,wide:/^[1234](º)? trimestre/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:function(e){return e+1}}),month:Fa({matchPatterns:{narrow:/^[efmajsond]/i,abbreviated:/^(ene|feb|mar|abr|may|jun|jul|ago|sep|oct|nov|dic)/i,wide:/^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^e/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^en/i,/^feb/i,/^mar/i,/^abr/i,/^may/i,/^jun/i,/^jul/i,/^ago/i,/^sep/i,/^oct/i,/^nov/i,/^dic/i]},defaultParseWidth:"any"}),day:Fa({matchPatterns:{narrow:/^[dlmjvs]/i,short:/^(do|lu|ma|mi|ju|vi|s[áa])/i,abbreviated:/^(dom|lun|mar|mi[ée]|jue|vie|s[áa]b)/i,wide:/^(domingo|lunes|martes|mi[ée]rcoles|jueves|viernes|s[áa]bado)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^d/i,/^l/i,/^m/i,/^m/i,/^j/i,/^v/i,/^s/i],any:[/^do/i,/^lu/i,/^ma/i,/^mi/i,/^ju/i,/^vi/i,/^sa/i]},defaultParseWidth:"any"}),dayPeriod:Fa({matchPatterns:{narrow:/^(a|p|mn|md|(de la|a las) (mañana|tarde|noche))/i,any:/^([ap]\.?\s?m\.?|medianoche|mediodia|(de la|a las) (mañana|tarde|noche))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mn/i,noon:/^md/i,morning:/mañana/i,afternoon:/tarde/i,evening:/tarde/i,night:/noche/i}},defaultParseWidth:"any"})},options:{weekStartsOn:1,firstWeekContainsDate:1}},kd={lessThanXSeconds:{standalone:{one:"vähem kui üks sekund",other:"vähem kui {{count}} sekundit"},withPreposition:{one:"vähem kui ühe sekundi",other:"vähem kui {{count}} sekundi"}},xSeconds:{standalone:{one:"üks sekund",other:"{{count}} sekundit"},withPreposition:{one:"ühe sekundi",other:"{{count}} sekundi"}},halfAMinute:{standalone:"pool minutit",withPreposition:"poole minuti"},lessThanXMinutes:{standalone:{one:"vähem kui üks minut",other:"vähem kui {{count}} minutit"},withPreposition:{one:"vähem kui ühe minuti",other:"vähem kui {{count}} minuti"}},xMinutes:{standalone:{one:"üks minut",other:"{{count}} minutit"},withPreposition:{one:"ühe minuti",other:"{{count}} minuti"}},aboutXHours:{standalone:{one:"umbes üks tund",other:"umbes {{count}} tundi"},withPreposition:{one:"umbes ühe tunni",other:"umbes {{count}} tunni"}},xHours:{standalone:{one:"üks tund",other:"{{count}} tundi"},withPreposition:{one:"ühe tunni",other:"{{count}} tunni"}},xDays:{standalone:{one:"üks päev",other:"{{count}} päeva"},withPreposition:{one:"ühe päeva",other:"{{count}} päeva"}},aboutXWeeks:{standalone:{one:"umbes üks nädal",other:"umbes {{count}} nädalat"},withPreposition:{one:"umbes ühe nädala",other:"umbes {{count}} nädala"}},xWeeks:{standalone:{one:"üks nädal",other:"{{count}} nädalat"},withPreposition:{one:"ühe nädala",other:"{{count}} nädala"}},aboutXMonths:{standalone:{one:"umbes üks kuu",other:"umbes {{count}} kuud"},withPreposition:{one:"umbes ühe kuu",other:"umbes {{count}} kuu"}},xMonths:{standalone:{one:"üks kuu",other:"{{count}} kuud"},withPreposition:{one:"ühe kuu",other:"{{count}} kuu"}},aboutXYears:{standalone:{one:"umbes üks aasta",other:"umbes {{count}} aastat"},withPreposition:{one:"umbes ühe aasta",other:"umbes {{count}} aasta"}},xYears:{standalone:{one:"üks aasta",other:"{{count}} aastat"},withPreposition:{one:"ühe aasta",other:"{{count}} aasta"}},overXYears:{standalone:{one:"rohkem kui üks aasta",other:"rohkem kui {{count}} aastat"},withPreposition:{one:"rohkem kui ühe aasta",other:"rohkem kui {{count}} aasta"}},almostXYears:{standalone:{one:"peaaegu üks aasta",other:"peaaegu {{count}} aastat"},withPreposition:{one:"peaaegu ühe aasta",other:"peaaegu {{count}} aasta"}}},Md=function(e,t,a){var n,i=null!=a&&a.addSuffix?kd[e].withPreposition:kd[e].standalone;return n="string"==typeof i?i:1===t?i.one:i.other.replace("{{count}}",String(t)),null!=a&&a.addSuffix?a.comparison&&a.comparison>0?n+" pärast":n+" eest":n},Pd={date:Qa({formats:{full:"EEEE, d. MMMM y",long:"d. MMMM y",medium:"d. MMM y",short:"dd.MM.y"},defaultWidth:"full"}),time:Qa({formats:{full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},defaultWidth:"full"}),dateTime:Qa({formats:{full:"{{date}} 'kell' {{time}}",long:"{{date}} 'kell' {{time}}",medium:"{{date}}. {{time}}",short:"{{date}}. {{time}}"},defaultWidth:"full"})},Wd={lastWeek:"'eelmine' eeee 'kell' p",yesterday:"'eile kell' p",today:"'täna kell' p",tomorrow:"'homme kell' p",nextWeek:"'järgmine' eeee 'kell' p",other:"P"},xd={narrow:["J","V","M","A","M","J","J","A","S","O","N","D"],abbreviated:["jaan","veebr","märts","apr","mai","juuni","juuli","aug","sept","okt","nov","dets"],wide:["jaanuar","veebruar","märts","aprill","mai","juuni","juuli","august","september","oktoober","november","detsember"]},zd={narrow:["P","E","T","K","N","R","L"],short:["P","E","T","K","N","R","L"],abbreviated:["pühap.","esmasp.","teisip.","kolmap.","neljap.","reede.","laup."],wide:["pühapäev","esmaspäev","teisipäev","kolmapäev","neljapäev","reede","laupäev"]},jd={code:"et",formatDistance:Md,formatLong:Pd,formatRelative:function(e,t,a,n){return Wd[e]},localize:{ordinalNumber:function(e,t){return Number(e)+"."},era:Ra({values:{narrow:["e.m.a","m.a.j"],abbreviated:["e.m.a","m.a.j"],wide:["enne meie ajaarvamist","meie ajaarvamise järgi"]},defaultWidth:"wide"}),quarter:Ra({values:{narrow:["1","2","3","4"],abbreviated:["K1","K2","K3","K4"],wide:["1. kvartal","2. kvartal","3. kvartal","4. kvartal"]},defaultWidth:"wide",argumentCallback:function(e){return e-1}}),month:Ra({values:xd,defaultWidth:"wide",formattingValues:xd,defaultFormattingWidth:"wide"}),day:Ra({values:zd,defaultWidth:"wide",formattingValues:zd,defaultFormattingWidth:"wide"}),dayPeriod:Ra({values:{narrow:{am:"AM",pm:"PM",midnight:"kesköö",noon:"keskpäev",morning:"hommik",afternoon:"pärastlõuna",evening:"õhtu",night:"öö"},abbreviated:{am:"AM",pm:"PM",midnight:"kesköö",noon:"keskpäev",morning:"hommik",afternoon:"pärastlõuna",evening:"õhtu",night:"öö"},wide:{am:"AM",pm:"PM",midnight:"kesköö",noon:"keskpäev",morning:"hommik",afternoon:"pärastlõuna",evening:"õhtu",night:"öö"}},defaultWidth:"wide",formattingValues:{narrow:{am:"AM",pm:"PM",midnight:"keskööl",noon:"keskpäeval",morning:"hommikul",afternoon:"pärastlõunal",evening:"õhtul",night:"öösel"},abbreviated:{am:"AM",pm:"PM",midnight:"keskööl",noon:"keskpäeval",morning:"hommikul",afternoon:"pärastlõunal",evening:"õhtul",night:"öösel"},wide:{am:"AM",pm:"PM",midnight:"keskööl",noon:"keskpäeval",morning:"hommikul",afternoon:"pärastlõunal",evening:"õhtul",night:"öösel"}},defaultFormattingWidth:"wide"})},match:{ordinalNumber:$a({matchPattern:/^\d+\./i,parsePattern:/\d+/i,valueCallback:function(e){return parseInt(e,10)}}),era:Fa({matchPatterns:{narrow:/^(e\.m\.a|m\.a\.j|eKr|pKr)/i,abbreviated:/^(e\.m\.a|m\.a\.j|eKr|pKr)/i,wide:/^(enne meie ajaarvamist|meie ajaarvamise järgi|enne Kristust|pärast Kristust)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^e/i,/^(m|p)/i]},defaultParseWidth:"any"}),quarter:Fa({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^K[1234]/i,wide:/^[1234](\.)? kvartal/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:function(e){return e+1}}),month:Fa({matchPatterns:{narrow:/^[jvmasond]/i,abbreviated:/^(jaan|veebr|märts|apr|mai|juuni|juuli|aug|sept|okt|nov|dets)/i,wide:/^(jaanuar|veebruar|märts|aprill|mai|juuni|juuli|august|september|oktoober|november|detsember)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^v/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^v/i,/^mär/i,/^ap/i,/^mai/i,/^juun/i,/^juul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:Fa({matchPatterns:{narrow:/^[petknrl]/i,short:/^[petknrl]/i,abbreviated:/^(püh?|esm?|tei?|kolm?|nel?|ree?|laup?)\.?/i,wide:/^(pühapäev|esmaspäev|teisipäev|kolmapäev|neljapäev|reede|laupäev)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^p/i,/^e/i,/^t/i,/^k/i,/^n/i,/^r/i,/^l/i]},defaultParseWidth:"any"}),dayPeriod:Fa({matchPatterns:{any:/^(am|pm|keskööl?|keskpäev(al)?|hommik(ul)?|pärastlõunal?|õhtul?|öö(sel)?)/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^keskö/i,noon:/^keskp/i,morning:/hommik/i,afternoon:/pärastlõuna/i,evening:/õhtu/i,night:/öö/i}},defaultParseWidth:"any"})},options:{weekStartsOn:1,firstWeekContainsDate:4}},Cd={lessThanXSeconds:{one:"segundo bat baino gutxiago",other:"{{count}} segundo baino gutxiago"},xSeconds:{one:"1 segundo",other:"{{count}} segundo"},halfAMinute:"minutu erdi",lessThanXMinutes:{one:"minutu bat baino gutxiago",other:"{{count}} minutu baino gutxiago"},xMinutes:{one:"1 minutu",other:"{{count}} minutu"},aboutXHours:{one:"1 ordu gutxi gorabehera",other:"{{count}} ordu gutxi gorabehera"},xHours:{one:"1 ordu",other:"{{count}} ordu"},xDays:{one:"1 egun",other:"{{count}} egun"},aboutXWeeks:{one:"aste 1 inguru",other:"{{count}} aste inguru"},xWeeks:{one:"1 aste",other:"{{count}} astean"},aboutXMonths:{one:"1 hilabete gutxi gorabehera",other:"{{count}} hilabete gutxi gorabehera"},xMonths:{one:"1 hilabete",other:"{{count}} hilabete"},aboutXYears:{one:"1 urte gutxi gorabehera",other:"{{count}} urte gutxi gorabehera"},xYears:{one:"1 urte",other:"{{count}} urte"},overXYears:{one:"1 urte baino gehiago",other:"{{count}} urte baino gehiago"},almostXYears:{one:"ia 1 urte",other:"ia {{count}} urte"}},Td=function(e,t,a){var n,i=Cd[e];return n="string"==typeof i?i:1===t?i.one:i.other.replace("{{count}}",String(t)),null!=a&&a.addSuffix?a.comparison&&a.comparison>0?"en "+n:"duela "+n:n},Sd={date:Qa({formats:{full:"EEEE, y'ko' MMMM'ren' d'a' y'ren'",long:"y'ko' MMMM'ren' d'a'",medium:"y MMM d",short:"yy/MM/dd"},defaultWidth:"full"}),time:Qa({formats:{full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},defaultWidth:"full"}),dateTime:Qa({formats:{full:"{{date}} 'tan' {{time}}",long:"{{date}} 'tan' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},Hd={lastWeek:"'joan den' eeee, LT",yesterday:"'atzo,' p",today:"'gaur,' p",tomorrow:"'bihar,' p",nextWeek:"eeee, p",other:"P"},Dd={lastWeek:"'joan den' eeee, p",yesterday:"'atzo,' p",today:"'gaur,' p",tomorrow:"'bihar,' p",nextWeek:"eeee, p",other:"P"},Nd={code:"eu",formatDistance:Td,formatLong:Sd,formatRelative:function(e,t){return 1!==t.getUTCHours()?Dd[e]:Hd[e]},localize:{ordinalNumber:function(e,t){return Number(e)+"."},era:Ra({values:{narrow:["k.a.","k.o."],abbreviated:["k.a.","k.o."],wide:["kristo aurretik","kristo ondoren"]},defaultWidth:"wide"}),quarter:Ra({values:{narrow:["1","2","3","4"],abbreviated:["1H","2H","3H","4H"],wide:["1. hiruhilekoa","2. hiruhilekoa","3. hiruhilekoa","4. hiruhilekoa"]},defaultWidth:"wide",argumentCallback:function(e){return e-1}}),month:Ra({values:{narrow:["u","o","m","a","m","e","u","a","i","u","a","a"],abbreviated:["urt","ots","mar","api","mai","eka","uzt","abu","ira","urr","aza","abe"],wide:["urtarrila","otsaila","martxoa","apirila","maiatza","ekaina","uztaila","abuztua","iraila","urria","azaroa","abendua"]},defaultWidth:"wide"}),day:Ra({values:{narrow:["i","a","a","a","o","o","l"],short:["ig","al","as","az","og","or","lr"],abbreviated:["iga","ast","ast","ast","ost","ost","lar"],wide:["igandea","astelehena","asteartea","asteazkena","osteguna","ostirala","larunbata"]},defaultWidth:"wide"}),dayPeriod:Ra({values:{narrow:{am:"a",pm:"p",midnight:"ge",noon:"eg",morning:"goiza",afternoon:"arratsaldea",evening:"arratsaldea",night:"gaua"},abbreviated:{am:"AM",pm:"PM",midnight:"gauerdia",noon:"eguerdia",morning:"goiza",afternoon:"arratsaldea",evening:"arratsaldea",night:"gaua"},wide:{am:"a.m.",pm:"p.m.",midnight:"gauerdia",noon:"eguerdia",morning:"goiza",afternoon:"arratsaldea",evening:"arratsaldea",night:"gaua"}},defaultWidth:"wide",formattingValues:{narrow:{am:"a",pm:"p",midnight:"ge",noon:"eg",morning:"goizean",afternoon:"arratsaldean",evening:"arratsaldean",night:"gauean"},abbreviated:{am:"AM",pm:"PM",midnight:"gauerdia",noon:"eguerdia",morning:"goizean",afternoon:"arratsaldean",evening:"arratsaldean",night:"gauean"},wide:{am:"a.m.",pm:"p.m.",midnight:"gauerdia",noon:"eguerdia",morning:"goizean",afternoon:"arratsaldean",evening:"arratsaldean",night:"gauean"}},defaultFormattingWidth:"wide"})},match:{ordinalNumber:$a({matchPattern:/^(\d+)(.)?/i,parsePattern:/\d+/i,valueCallback:function(e){return parseInt(e,10)}}),era:Fa({matchPatterns:{narrow:/^(k.a.|k.o.)/i,abbreviated:/^(k.a.|k.o.)/i,wide:/^(kristo aurretik|kristo ondoren)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^k.a./i,/^k.o./i],abbreviated:[/^(k.a.)/i,/^(k.o.)/i],wide:[/^(kristo aurretik)/i,/^(kristo ondoren)/i]},defaultParseWidth:"wide"}),quarter:Fa({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^[1234]H/i,wide:/^[1234](.)? hiruhilekoa/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:function(e){return e+1}}),month:Fa({matchPatterns:{narrow:/^[uomaei]/i,abbreviated:/^(urt|ots|mar|api|mai|eka|uzt|abu|ira|urr|aza|abe)/i,wide:/^(urtarrila|otsaila|martxoa|apirila|maiatza|ekaina|uztaila|abuztua|iraila|urria|azaroa|abendua)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^u/i,/^o/i,/^m/i,/^a/i,/^m/i,/^e/i,/^u/i,/^a/i,/^i/i,/^u/i,/^a/i,/^a/i],any:[/^urt/i,/^ots/i,/^mar/i,/^api/i,/^mai/i,/^eka/i,/^uzt/i,/^abu/i,/^ira/i,/^urr/i,/^aza/i,/^abe/i]},defaultParseWidth:"any"}),day:Fa({matchPatterns:{narrow:/^[iaol]/i,short:/^(ig|al|as|az|og|or|lr)/i,abbreviated:/^(iga|ast|ast|ast|ost|ost|lar)/i,wide:/^(igandea|astelehena|asteartea|asteazkena|osteguna|ostirala|larunbata)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^i/i,/^a/i,/^a/i,/^a/i,/^o/i,/^o/i,/^l/i],short:[/^ig/i,/^al/i,/^as/i,/^az/i,/^og/i,/^or/i,/^lr/i],abbreviated:[/^iga/i,/^ast/i,/^ast/i,/^ast/i,/^ost/i,/^ost/i,/^lar/i],wide:[/^igandea/i,/^astelehena/i,/^asteartea/i,/^asteazkena/i,/^osteguna/i,/^ostirala/i,/^larunbata/i]},defaultParseWidth:"wide"}),dayPeriod:Fa({matchPatterns:{narrow:/^(a|p|ge|eg|((goiza|goizean)|arratsaldea|(gaua|gauean)))/i,any:/^([ap]\.?\s?m\.?|gauerdia|eguerdia|((goiza|goizean)|arratsaldea|(gaua|gauean)))/i},defaultMatchWidth:"any",parsePatterns:{narrow:{am:/^a/i,pm:/^p/i,midnight:/^ge/i,noon:/^eg/i,morning:/goiz/i,afternoon:/arratsaldea/i,evening:/arratsaldea/i,night:/gau/i},any:{am:/^a/i,pm:/^p/i,midnight:/^gauerdia/i,noon:/^eguerdia/i,morning:/goiz/i,afternoon:/arratsaldea/i,evening:/arratsaldea/i,night:/gau/i}},defaultParseWidth:"any"})},options:{weekStartsOn:1,firstWeekContainsDate:1}},Xd={lessThanXSeconds:{one:"کمتر از یک ثانیه",other:"کمتر از {{count}} ثانیه"},xSeconds:{one:"1 ثانیه",other:"{{count}} ثانیه"},halfAMinute:"نیم دقیقه",lessThanXMinutes:{one:"کمتر از یک دقیقه",other:"کمتر از {{count}} دقیقه"},xMinutes:{one:"1 دقیقه",other:"{{count}} دقیقه"},aboutXHours:{one:"حدود 1 ساعت",other:"حدود {{count}} ساعت"},xHours:{one:"1 ساعت",other:"{{count}} ساعت"},xDays:{one:"1 روز",other:"{{count}} روز"},aboutXWeeks:{one:"حدود 1 هفته",other:"حدود {{count}} هفته"},xWeeks:{one:"1 هفته",other:"{{count}} هفته"},aboutXMonths:{one:"حدود 1 ماه",other:"حدود {{count}} ماه"},xMonths:{one:"1 ماه",other:"{{count}} ماه"},aboutXYears:{one:"حدود 1 سال",other:"حدود {{count}} سال"},xYears:{one:"1 سال",other:"{{count}} سال"},overXYears:{one:"بیشتر از 1 سال",other:"بیشتر از {{count}} سال"},almostXYears:{one:"نزدیک 1 سال",other:"نزدیک {{count}} سال"}},Id=function(e,t,a){var n,i=Xd[e];return n="string"==typeof i?i:1===t?i.one:i.other.replace("{{count}}",String(t)),null!=a&&a.addSuffix?a.comparison&&a.comparison>0?"در "+n:n+" قبل":n},Ed={date:Qa({formats:{full:"EEEE do MMMM y",long:"do MMMM y",medium:"d MMM y",short:"yyyy/MM/dd"},defaultWidth:"full"}),time:Qa({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:Qa({formats:{full:"{{date}} 'در' {{time}}",long:"{{date}} 'در' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},Bd={lastWeek:"eeee 'گذشته در' p",yesterday:"'دیروز در' p",today:"'امروز در' p",tomorrow:"'فردا در' p",nextWeek:"eeee 'در' p",other:"P"},Vd={code:"fa-IR",formatDistance:Id,formatLong:Ed,formatRelative:function(e,t,a,n){return Bd[e]},localize:{ordinalNumber:function(e,t){return String(e)},era:Ra({values:{narrow:["ق","ب"],abbreviated:["ق.م.","ب.م."],wide:["قبل از میلاد","بعد از میلاد"]},defaultWidth:"wide"}),quarter:Ra({values:{narrow:["1","2","3","4"],abbreviated:["س‌م1","س‌م2","س‌م3","س‌م4"],wide:["سه‌ماهه 1","سه‌ماهه 2","سه‌ماهه 3","سه‌ماهه 4"]},defaultWidth:"wide",argumentCallback:function(e){return e-1}}),month:Ra({values:{narrow:["ژ","ف","م","آ","م","ج","ج","آ","س","ا","ن","د"],abbreviated:["ژانـ","فور","مارس","آپر","می","جون","جولـ","آگو","سپتـ","اکتـ","نوامـ","دسامـ"],wide:["ژانویه","فوریه","مارس","آپریل","می","جون","جولای","آگوست","سپتامبر","اکتبر","نوامبر","دسامبر"]},defaultWidth:"wide"}),day:Ra({values:{narrow:["ی","د","س","چ","پ","ج","ش"],short:["1ش","2ش","3ش","4ش","5ش","ج","ش"],abbreviated:["یکشنبه","دوشنبه","سه‌شنبه","چهارشنبه","پنجشنبه","جمعه","شنبه"],wide:["یکشنبه","دوشنبه","سه‌شنبه","چهارشنبه","پنجشنبه","جمعه","شنبه"]},defaultWidth:"wide"}),dayPeriod:Ra({values:{narrow:{am:"ق",pm:"ب",midnight:"ن",noon:"ظ",morning:"ص",afternoon:"ب.ظ.",evening:"ع",night:"ش"},abbreviated:{am:"ق.ظ.",pm:"ب.ظ.",midnight:"نیمه‌شب",noon:"ظهر",morning:"صبح",afternoon:"بعدازظهر",evening:"عصر",night:"شب"},wide:{am:"قبل‌ازظهر",pm:"بعدازظهر",midnight:"نیمه‌شب",noon:"ظهر",morning:"صبح",afternoon:"بعدازظهر",evening:"عصر",night:"شب"}},defaultWidth:"wide",formattingValues:{narrow:{am:"ق",pm:"ب",midnight:"ن",noon:"ظ",morning:"ص",afternoon:"ب.ظ.",evening:"ع",night:"ش"},abbreviated:{am:"ق.ظ.",pm:"ب.ظ.",midnight:"نیمه‌شب",noon:"ظهر",morning:"صبح",afternoon:"بعدازظهر",evening:"عصر",night:"شب"},wide:{am:"قبل‌ازظهر",pm:"بعدازظهر",midnight:"نیمه‌شب",noon:"ظهر",morning:"صبح",afternoon:"بعدازظهر",evening:"عصر",night:"شب"}},defaultFormattingWidth:"wide"})},match:{ordinalNumber:$a({matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:function(e){return parseInt(e,10)}}),era:Fa({matchPatterns:{narrow:/^(ق|ب)/i,abbreviated:/^(ق\.?\s?م\.?|ق\.?\s?د\.?\s?م\.?|م\.?\s?|د\.?\s?م\.?)/i,wide:/^(قبل از میلاد|قبل از دوران مشترک|میلادی|دوران مشترک|بعد از میلاد)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^قبل/i,/^بعد/i]},defaultParseWidth:"any"}),quarter:Fa({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^س‌م[1234]/i,wide:/^سه‌ماهه [1234]/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:function(e){return e+1}}),month:Fa({matchPatterns:{narrow:/^[جژفمآاماسند]/i,abbreviated:/^(جنو|ژانـ|ژانویه|فوریه|فور|مارس|آوریل|آپر|مه|می|ژوئن|جون|جول|جولـ|ژوئیه|اوت|آگو|سپتمبر|سپتامبر|اکتبر|اکتوبر|نوامبر|نوامـ|دسامبر|دسامـ|دسم)/i,wide:/^(ژانویه|جنوری|فبروری|فوریه|مارچ|مارس|آپریل|اپریل|ایپریل|آوریل|مه|می|ژوئن|جون|جولای|ژوئیه|آگست|اگست|آگوست|اوت|سپتمبر|سپتامبر|اکتبر|اکتوبر|نوامبر|نومبر|دسامبر|دسمبر)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^(ژ|ج)/i,/^ف/i,/^م/i,/^(آ|ا)/i,/^م/i,/^(ژ|ج)/i,/^(ج|ژ)/i,/^(آ|ا)/i,/^س/i,/^ا/i,/^ن/i,/^د/i],any:[/^ژا/i,/^ف/i,/^ما/i,/^آپ/i,/^(می|مه)/i,/^(ژوئن|جون)/i,/^(ژوئی|جول)/i,/^(اوت|آگ)/i,/^س/i,/^(اوک|اک)/i,/^ن/i,/^د/i]},defaultParseWidth:"any"}),day:Fa({matchPatterns:{narrow:/^[شیدسچپج]/i,short:/^(ش|ج|1ش|2ش|3ش|4ش|5ش)/i,abbreviated:/^(یکشنبه|دوشنبه|سه‌شنبه|چهارشنبه|پنج‌شنبه|جمعه|شنبه)/i,wide:/^(یکشنبه|دوشنبه|سه‌شنبه|چهارشنبه|پنج‌شنبه|جمعه|شنبه)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^ی/i,/^دو/i,/^س/i,/^چ/i,/^پ/i,/^ج/i,/^ش/i],any:[/^(ی|1ش|یکشنبه)/i,/^(د|2ش|دوشنبه)/i,/^(س|3ش|سه‌شنبه)/i,/^(چ|4ش|چهارشنبه)/i,/^(پ|5ش|پنجشنبه)/i,/^(ج|جمعه)/i,/^(ش|شنبه)/i]},defaultParseWidth:"any"}),dayPeriod:Fa({matchPatterns:{narrow:/^(ب|ق|ن|ظ|ص|ب.ظ.|ع|ش)/i,abbreviated:/^(ق.ظ.|ب.ظ.|نیمه‌شب|ظهر|صبح|بعدازظهر|عصر|شب)/i,wide:/^(قبل‌ازظهر|نیمه‌شب|ظهر|صبح|بعدازظهر|عصر|شب)/i},defaultMatchWidth:"wide",parsePatterns:{any:{am:/^(ق|ق.ظ.|قبل‌ازظهر)/i,pm:/^(ب|ب.ظ.|بعدازظهر)/i,midnight:/^(‌نیمه‌شب|ن)/i,noon:/^(ظ|ظهر)/i,morning:/(ص|صبح)/i,afternoon:/(ب|ب.ظ.|بعدازظهر)/i,evening:/(ع|عصر)/i,night:/(ش|شب)/i}},defaultParseWidth:"any"})},options:{weekStartsOn:6,firstWeekContainsDate:1}};function Kd(e){return e.replace(/sekuntia?/,"sekunnin")}function Ud(e){return e.replace(/minuuttia?/,"minuutin")}function Gd(e){return e.replace(/tuntia?/,"tunnin")}function Od(e){return e.replace(/(viikko|viikkoa)/,"viikon")}function Qd(e){return e.replace(/(kuukausi|kuukautta)/,"kuukauden")}function Yd(e){return e.replace(/(vuosi|vuotta)/,"vuoden")}var qd={lessThanXSeconds:{one:"alle sekunti",other:"alle {{count}} sekuntia",futureTense:Kd},xSeconds:{one:"sekunti",other:"{{count}} sekuntia",futureTense:Kd},halfAMinute:{one:"puoli minuuttia",other:"puoli minuuttia",futureTense:function(e){return"puolen minuutin"}},lessThanXMinutes:{one:"alle minuutti",other:"alle {{count}} minuuttia",futureTense:Ud},xMinutes:{one:"minuutti",other:"{{count}} minuuttia",futureTense:Ud},aboutXHours:{one:"noin tunti",other:"noin {{count}} tuntia",futureTense:Gd},xHours:{one:"tunti",other:"{{count}} tuntia",futureTense:Gd},xDays:{one:"päivä",other:"{{count}} päivää",futureTense:function(e){return e.replace(/päivää?/,"päivän")}},aboutXWeeks:{one:"noin viikko",other:"noin {{count}} viikkoa",futureTense:Od},xWeeks:{one:"viikko",other:"{{count}} viikkoa",futureTense:Od},aboutXMonths:{one:"noin kuukausi",other:"noin {{count}} kuukautta",futureTense:Qd},xMonths:{one:"kuukausi",other:"{{count}} kuukautta",futureTense:Qd},aboutXYears:{one:"noin vuosi",other:"noin {{count}} vuotta",futureTense:Yd},xYears:{one:"vuosi",other:"{{count}} vuotta",futureTense:Yd},overXYears:{one:"yli vuosi",other:"yli {{count}} vuotta",futureTense:Yd},almostXYears:{one:"lähes vuosi",other:"lähes {{count}} vuotta",futureTense:Yd}},Jd=function(e,t,a){var n=qd[e],i=1===t?n.one:n.other.replace("{{count}}",String(t));return null!=a&&a.addSuffix?a.comparison&&a.comparison>0?n.futureTense(i)+" kuluttua":i+" sitten":i},Rd={date:Qa({formats:{full:"eeee d. MMMM y",long:"d. MMMM y",medium:"d. MMM y",short:"d.M.y"},defaultWidth:"full"}),time:Qa({formats:{full:"HH.mm.ss zzzz",long:"HH.mm.ss z",medium:"HH.mm.ss",short:"HH.mm"},defaultWidth:"full"}),dateTime:Qa({formats:{full:"{{date}} 'klo' {{time}}",long:"{{date}} 'klo' {{time}}",medium:"{{date}} {{time}}",short:"{{date}} {{time}}"},defaultWidth:"full"})},Ld=Rd,Fd={lastWeek:"'viime' eeee 'klo' p",yesterday:"'eilen klo' p",today:"'tänään klo' p",tomorrow:"'huomenna klo' p",nextWeek:"'ensi' eeee 'klo' p",other:"P"},Zd=function(e,t,a,n){return Fd[e]},_d={narrow:["T","H","M","H","T","K","H","E","S","L","M","J"],abbreviated:["tammi","helmi","maalis","huhti","touko","kesä","heinä","elo","syys","loka","marras","joulu"],wide:["tammikuu","helmikuu","maaliskuu","huhtikuu","toukokuu","kesäkuu","heinäkuu","elokuu","syyskuu","lokakuu","marraskuu","joulukuu"]},$d={narrow:_d.narrow,abbreviated:_d.abbreviated,wide:["tammikuuta","helmikuuta","maaliskuuta","huhtikuuta","toukokuuta","kesäkuuta","heinäkuuta","elokuuta","syyskuuta","lokakuuta","marraskuuta","joulukuuta"]},es={narrow:["S","M","T","K","T","P","L"],short:["su","ma","ti","ke","to","pe","la"],abbreviated:["sunn.","maan.","tiis.","kesk.","torst.","perj.","la"],wide:["sunnuntai","maanantai","tiistai","keskiviikko","torstai","perjantai","lauantai"]},ts={narrow:es.narrow,short:es.short,abbreviated:es.abbreviated,wide:["sunnuntaina","maanantaina","tiistaina","keskiviikkona","torstaina","perjantaina","lauantaina"]},as={ordinalNumber:function(e,t){return Number(e)+"."},era:Ra({values:{narrow:["eaa.","jaa."],abbreviated:["eaa.","jaa."],wide:["ennen ajanlaskun alkua","jälkeen ajanlaskun alun"]},defaultWidth:"wide"}),quarter:Ra({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1. kvartaali","2. kvartaali","3. kvartaali","4. kvartaali"]},defaultWidth:"wide",argumentCallback:function(e){return e-1}}),month:Ra({values:_d,defaultWidth:"wide",formattingValues:$d,defaultFormattingWidth:"wide"}),day:Ra({values:es,defaultWidth:"wide",formattingValues:ts,defaultFormattingWidth:"wide"}),dayPeriod:Ra({values:{narrow:{am:"ap",pm:"ip",midnight:"keskiyö",noon:"keskipäivä",morning:"ap",afternoon:"ip",evening:"illalla",night:"yöllä"},abbreviated:{am:"ap",pm:"ip",midnight:"keskiyö",noon:"keskipäivä",morning:"ap",afternoon:"ip",evening:"illalla",night:"yöllä"},wide:{am:"ap",pm:"ip",midnight:"keskiyöllä",noon:"keskipäivällä",morning:"aamupäivällä",afternoon:"iltapäivällä",evening:"illalla",night:"yöllä"}},defaultWidth:"wide"})},ns=as,is={ordinalNumber:$a({matchPattern:/^(\d+)(\.)/i,parsePattern:/\d+/i,valueCallback:function(e){return parseInt(e,10)}}),era:Fa({matchPatterns:{narrow:/^(e|j)/i,abbreviated:/^(eaa.|jaa.)/i,wide:/^(ennen ajanlaskun alkua|jälkeen ajanlaskun alun)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^e/i,/^j/i]},defaultParseWidth:"any"}),quarter:Fa({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234]\.? kvartaali/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:function(e){return e+1}}),month:Fa({matchPatterns:{narrow:/^[thmkeslj]/i,abbreviated:/^(tammi|helmi|maalis|huhti|touko|kesä|heinä|elo|syys|loka|marras|joulu)/i,wide:/^(tammikuu|helmikuu|maaliskuu|huhtikuu|toukokuu|kesäkuu|heinäkuu|elokuu|syyskuu|lokakuu|marraskuu|joulukuu)(ta)?/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^t/i,/^h/i,/^m/i,/^h/i,/^t/i,/^k/i,/^h/i,/^e/i,/^s/i,/^l/i,/^m/i,/^j/i],any:[/^ta/i,/^hel/i,/^maa/i,/^hu/i,/^to/i,/^k/i,/^hei/i,/^e/i,/^s/i,/^l/i,/^mar/i,/^j/i]},defaultParseWidth:"any"}),day:Fa({matchPatterns:{narrow:/^[smtkpl]/i,short:/^(su|ma|ti|ke|to|pe|la)/i,abbreviated:/^(sunn.|maan.|tiis.|kesk.|torst.|perj.|la)/i,wide:/^(sunnuntai|maanantai|tiistai|keskiviikko|torstai|perjantai|lauantai)(na)?/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^k/i,/^t/i,/^p/i,/^l/i],any:[/^s/i,/^m/i,/^ti/i,/^k/i,/^to/i,/^p/i,/^l/i]},defaultParseWidth:"any"}),dayPeriod:Fa({matchPatterns:{narrow:/^(ap|ip|keskiyö|keskipäivä|aamupäivällä|iltapäivällä|illalla|yöllä)/i,any:/^(ap|ip|keskiyöllä|keskipäivällä|aamupäivällä|iltapäivällä|illalla|yöllä)/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^ap/i,pm:/^ip/i,midnight:/^keskiyö/i,noon:/^keskipäivä/i,morning:/aamupäivällä/i,afternoon:/iltapäivällä/i,evening:/illalla/i,night:/yöllä/i}},defaultParseWidth:"any"})},rs=is,os={code:"fi",formatDistance:Jd,formatLong:Ld,formatRelative:Zd,localize:ns,match:rs,options:{weekStartsOn:1,firstWeekContainsDate:4}},ds=os,ss={lessThanXSeconds:{one:"moins d’une seconde",other:"moins de {{count}} secondes"},xSeconds:{one:"1 seconde",other:"{{count}} secondes"},halfAMinute:"30 secondes",lessThanXMinutes:{one:"moins d’une minute",other:"moins de {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"environ 1 heure",other:"environ {{count}} heures"},xHours:{one:"1 heure",other:"{{count}} heures"},xDays:{one:"1 jour",other:"{{count}} jours"},aboutXWeeks:{one:"environ 1 semaine",other:"environ {{count}} semaines"},xWeeks:{one:"1 semaine",other:"{{count}} semaines"},aboutXMonths:{one:"environ 1 mois",other:"environ {{count}} mois"},xMonths:{one:"1 mois",other:"{{count}} mois"},aboutXYears:{one:"environ 1 an",other:"environ {{count}} ans"},xYears:{one:"1 an",other:"{{count}} ans"},overXYears:{one:"plus d’un an",other:"plus de {{count}} ans"},almostXYears:{one:"presqu’un an",other:"presque {{count}} ans"}},us=function(e,t,a){var n,i=ss[e];return n="string"==typeof i?i:1===t?i.one:i.other.replace("{{count}}",String(t)),null!=a&&a.addSuffix?a.comparison&&a.comparison>0?"dans "+n:"il y a "+n:n},ms={date:Qa({formats:{full:"EEEE d MMMM y",long:"d MMMM y",medium:"d MMM y",short:"dd/MM/y"},defaultWidth:"full"}),time:Qa({formats:{full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},defaultWidth:"full"}),dateTime:Qa({formats:{full:"{{date}} 'à' {{time}}",long:"{{date}} 'à' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},ls=ms,hs={lastWeek:"eeee 'dernier à' p",yesterday:"'hier à' p",today:"'aujourd’hui à' p",tomorrow:"'demain à' p'",nextWeek:"eeee 'prochain à' p",other:"P"},cs=function(e,t,a,n){return hs[e]},fs={ordinalNumber:function(e,t){var a=Number(e),n=null==t?void 0:t.unit;if(0===a)return"0";return a+(1===a?n&&["year","week","hour","minute","second"].includes(n)?"ère":"er":"ème")},era:Ra({values:{narrow:["av. J.-C","ap. J.-C"],abbreviated:["av. J.-C","ap. J.-C"],wide:["avant Jésus-Christ","après Jésus-Christ"]},defaultWidth:"wide"}),quarter:Ra({values:{narrow:["T1","T2","T3","T4"],abbreviated:["1er trim.","2ème trim.","3ème trim.","4ème trim."],wide:["1er trimestre","2ème trimestre","3ème trimestre","4ème trimestre"]},defaultWidth:"wide",argumentCallback:function(e){return e-1}}),month:Ra({values:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["janv.","févr.","mars","avr.","mai","juin","juil.","août","sept.","oct.","nov.","déc."],wide:["janvier","février","mars","avril","mai","juin","juillet","août","septembre","octobre","novembre","décembre"]},defaultWidth:"wide"}),day:Ra({values:{narrow:["D","L","M","M","J","V","S"],short:["di","lu","ma","me","je","ve","sa"],abbreviated:["dim.","lun.","mar.","mer.","jeu.","ven.","sam."],wide:["dimanche","lundi","mardi","mercredi","jeudi","vendredi","samedi"]},defaultWidth:"wide"}),dayPeriod:Ra({values:{narrow:{am:"AM",pm:"PM",midnight:"minuit",noon:"midi",morning:"mat.",afternoon:"ap.m.",evening:"soir",night:"mat."},abbreviated:{am:"AM",pm:"PM",midnight:"minuit",noon:"midi",morning:"matin",afternoon:"après-midi",evening:"soir",night:"matin"},wide:{am:"AM",pm:"PM",midnight:"minuit",noon:"midi",morning:"du matin",afternoon:"de l’après-midi",evening:"du soir",night:"du matin"}},defaultWidth:"wide"})},gs=fs,ps={ordinalNumber:$a({matchPattern:/^(\d+)(ième|ère|ème|er|e)?/i,parsePattern:/\d+/i,valueCallback:function(e){return parseInt(e)}}),era:Fa({matchPatterns:{narrow:/^(av\.J\.C|ap\.J\.C|ap\.J\.-C)/i,abbreviated:/^(av\.J\.-C|av\.J-C|apr\.J\.-C|apr\.J-C|ap\.J-C)/i,wide:/^(avant Jésus-Christ|après Jésus-Christ)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^av/i,/^ap/i]},defaultParseWidth:"any"}),quarter:Fa({matchPatterns:{narrow:/^T?[1234]/i,abbreviated:/^[1234](er|ème|e)? trim\.?/i,wide:/^[1234](er|ème|e)? trimestre/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:function(e){return e+1}}),month:Fa({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(janv|févr|mars|avr|mai|juin|juill|juil|août|sept|oct|nov|déc)\.?/i,wide:/^(janvier|février|mars|avril|mai|juin|juillet|août|septembre|octobre|novembre|décembre)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^av/i,/^ma/i,/^juin/i,/^juil/i,/^ao/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:Fa({matchPatterns:{narrow:/^[lmjvsd]/i,short:/^(di|lu|ma|me|je|ve|sa)/i,abbreviated:/^(dim|lun|mar|mer|jeu|ven|sam)\.?/i,wide:/^(dimanche|lundi|mardi|mercredi|jeudi|vendredi|samedi)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^d/i,/^l/i,/^m/i,/^m/i,/^j/i,/^v/i,/^s/i],any:[/^di/i,/^lu/i,/^ma/i,/^me/i,/^je/i,/^ve/i,/^sa/i]},defaultParseWidth:"any"}),dayPeriod:Fa({matchPatterns:{narrow:/^(a|p|minuit|midi|mat\.?|ap\.?m\.?|soir|nuit)/i,any:/^([ap]\.?\s?m\.?|du matin|de l'après[-\s]midi|du soir|de la nuit)/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^min/i,noon:/^mid/i,morning:/mat/i,afternoon:/ap/i,evening:/soir/i,night:/nuit/i}},defaultParseWidth:"any"})},vs=ps,bs={code:"fr",formatDistance:us,formatLong:ls,formatRelative:cs,localize:gs,match:vs,options:{weekStartsOn:1,firstWeekContainsDate:4}},ws=bs,ys={date:Qa({formats:{full:"EEEE d MMMM y",long:"d MMMM y",medium:"d MMM y",short:"yy-MM-dd"},defaultWidth:"full"}),time:Qa({formats:{full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},defaultWidth:"full"}),dateTime:Qa({formats:{full:"{{date}} 'à' {{time}}",long:"{{date}} 'à' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},As=ys,ks={code:"fr-CA",formatDistance:us,formatLong:As,formatRelative:cs,localize:gs,match:vs,options:{weekStartsOn:0,firstWeekContainsDate:1}},Ms=ks,Ps={date:Qa({formats:{full:"EEEE d MMMM y",long:"d MMMM y",medium:"d MMM y",short:"dd.MM.y"},defaultWidth:"full"}),time:Qa({formats:{full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},defaultWidth:"full"}),dateTime:Qa({formats:{full:"{{date}} 'à' {{time}}",long:"{{date}} 'à' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},Ws={lastWeek:"eeee 'la semaine dernière à' p",yesterday:"'hier à' p",today:"'aujourd’hui à' p",tomorrow:"'demain à' p'",nextWeek:"eeee 'la semaine prochaine à' p",other:"P"},xs={code:"fr-CH",formatDistance:us,formatLong:Ps,formatRelative:function(e,t,a,n){return Ws[e]},localize:gs,match:vs,options:{weekStartsOn:1,firstWeekContainsDate:4}},zs={lessThanXSeconds:{one:"minder as 1 sekonde",other:"minder as {{count}} sekonden"},xSeconds:{one:"1 sekonde",other:"{{count}} sekonden"},halfAMinute:"oardel minút",lessThanXMinutes:{one:"minder as 1 minút",other:"minder as {{count}} minuten"},xMinutes:{one:"1 minút",other:"{{count}} minuten"},aboutXHours:{one:"sawat 1 oere",other:"sawat {{count}} oere"},xHours:{one:"1 oere",other:"{{count}} oere"},xDays:{one:"1 dei",other:"{{count}} dagen"},aboutXWeeks:{one:"sawat 1 wike",other:"sawat {{count}} wiken"},xWeeks:{one:"1 wike",other:"{{count}} wiken"},aboutXMonths:{one:"sawat 1 moanne",other:"sawat {{count}} moannen"},xMonths:{one:"1 moanne",other:"{{count}} moannen"},aboutXYears:{one:"sawat 1 jier",other:"sawat {{count}} jier"},xYears:{one:"1 jier",other:"{{count}} jier"},overXYears:{one:"mear as 1 jier",other:"mear as {{count}}s jier"},almostXYears:{one:"hast 1 jier",other:"hast {{count}} jier"}},js=function(e,t,a){var n,i=zs[e];return n="string"==typeof i?i:1===t?i.one:i.other.replace("{{count}}",String(t)),null!=a&&a.addSuffix?a.comparison&&a.comparison>0?"oer "+n:n+" lyn":n},Cs={date:Qa({formats:{full:"EEEE d MMMM y",long:"d MMMM y",medium:"d MMM y",short:"dd-MM-y"},defaultWidth:"full"}),time:Qa({formats:{full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},defaultWidth:"full"}),dateTime:Qa({formats:{full:"{{date}} 'om' {{time}}",long:"{{date}} 'om' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},Ts={lastWeek:"'ôfrûne' eeee 'om' p",yesterday:"'juster om' p",today:"'hjoed om' p",tomorrow:"'moarn om' p",nextWeek:"eeee 'om' p",other:"P"},Ss={code:"fy",formatDistance:js,formatLong:Cs,formatRelative:function(e,t,a,n){return Ts[e]},localize:{ordinalNumber:function(e,t){return Number(e)+"e"},era:Ra({values:{narrow:["f.K.","n.K."],abbreviated:["f.Kr.","n.Kr."],wide:["foar Kristus","nei Kristus"]},defaultWidth:"wide"}),quarter:Ra({values:{narrow:["1","2","3","4"],abbreviated:["K1","K2","K3","K4"],wide:["1e fearnsjier","2e fearnsjier","3e fearnsjier","4e fearnsjier"]},defaultWidth:"wide",argumentCallback:function(e){return e-1}}),month:Ra({values:{narrow:["j","f","m","a","m","j","j","a","s","o","n","d"],abbreviated:["jan.","feb.","mrt.","apr.","mai.","jun.","jul.","aug.","sep.","okt.","nov.","des."],wide:["jannewaris","febrewaris","maart","april","maaie","juny","july","augustus","septimber","oktober","novimber","desimber"]},defaultWidth:"wide"}),day:Ra({values:{narrow:["s","m","t","w","t","f","s"],short:["si","mo","ti","wo","to","fr","so"],abbreviated:["snein","moa","tii","woa","ton","fre","sneon"],wide:["snein","moandei","tiisdei","woansdei","tongersdei","freed","sneon"]},defaultWidth:"wide"}),dayPeriod:Ra({values:{narrow:{am:"AM",pm:"PM",midnight:"middernacht",noon:"middei",morning:"moarns",afternoon:"middeis",evening:"jûns",night:"nachts"},abbreviated:{am:"AM",pm:"PM",midnight:"middernacht",noon:"middei",morning:"moarns",afternoon:"middeis",evening:"jûns",night:"nachts"},wide:{am:"AM",pm:"PM",midnight:"middernacht",noon:"middei",morning:"moarns",afternoon:"middeis",evening:"jûns",night:"nachts"}},defaultWidth:"wide"})},match:{ordinalNumber:$a({matchPattern:/^(\d+)e?/i,parsePattern:/\d+/i,valueCallback:function(e){return parseInt(e,10)}}),era:Fa({matchPatterns:{narrow:/^([fn]\.? ?K\.?)/,abbreviated:/^([fn]\. ?Kr\.?)/,wide:/^((foar|nei) Kristus)/},defaultMatchWidth:"wide",parsePatterns:{any:[/^f/,/^n/]},defaultParseWidth:"any"}),quarter:Fa({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^K[1234]/i,wide:/^[1234]e fearnsjier/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:function(e){return e+1}}),month:Fa({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan.|feb.|mrt.|apr.|mai.|jun.|jul.|aug.|sep.|okt.|nov.|des.)/i,wide:/^(jannewaris|febrewaris|maart|april|maaie|juny|july|augustus|septimber|oktober|novimber|desimber)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^jan/i,/^feb/i,/^m(r|a)/i,/^apr/i,/^mai/i,/^jun/i,/^jul/i,/^aug/i,/^sep/i,/^okt/i,/^nov/i,/^des/i]},defaultParseWidth:"any"}),day:Fa({matchPatterns:{narrow:/^[smtwf]/i,short:/^(si|mo|ti|wo|to|fr|so)/i,abbreviated:/^(snein|moa|tii|woa|ton|fre|sneon)/i,wide:/^(snein|moandei|tiisdei|woansdei|tongersdei|freed|sneon)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^sn/i,/^mo/i,/^ti/i,/^wo/i,/^to/i,/^fr/i,/^sn/i]},defaultParseWidth:"any"}),dayPeriod:Fa({matchPatterns:{any:/^(am|pm|middernacht|middeis|moarns|middei|jûns|nachts)/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^am/i,pm:/^pm/i,midnight:/^middernacht/i,noon:/^middei/i,morning:/moarns/i,afternoon:/^middeis/i,evening:/jûns/i,night:/nachts/i}},defaultParseWidth:"any"})},options:{weekStartsOn:1,firstWeekContainsDate:4}},Hs={lessThanXSeconds:{one:"nas lugha na diog",other:"nas lugha na {{count}} diogan"},xSeconds:{one:"1 diog",two:"2 dhiog",twenty:"20 diog",other:"{{count}} diogan"},halfAMinute:"leth mhionaid",lessThanXMinutes:{one:"nas lugha na mionaid",other:"nas lugha na {{count}} mionaidean"},xMinutes:{one:"1 mionaid",two:"2 mhionaid",twenty:"20 mionaid",other:"{{count}} mionaidean"},aboutXHours:{one:"mu uair de thìde",other:"mu {{count}} uairean de thìde"},xHours:{one:"1 uair de thìde",two:"2 uair de thìde",twenty:"20 uair de thìde",other:"{{count}} uairean de thìde"},xDays:{one:"1 là",other:"{{count}} là"},aboutXWeeks:{one:"mu 1 seachdain",other:"mu {{count}} seachdainean"},xWeeks:{one:"1 seachdain",other:"{{count}} seachdainean"},aboutXMonths:{one:"mu mhìos",other:"mu {{count}} mìosan"},xMonths:{one:"1 mìos",other:"{{count}} mìosan"},aboutXYears:{one:"mu bhliadhna",other:"mu {{count}} bliadhnaichean"},xYears:{one:"1 bhliadhna",other:"{{count}} bliadhna"},overXYears:{one:"còrr is bliadhna",other:"còrr is {{count}} bliadhnaichean"},almostXYears:{one:"cha mhòr bliadhna",other:"cha mhòr {{count}} bliadhnaichean"}},Ds=function(e,t,a){var n,i=Hs[e];return n="string"==typeof i?i:1===t?i.one:2===t&&i.two?i.two:20===t&&i.twenty?i.twenty:i.other.replace("{{count}}",String(t)),null!=a&&a.addSuffix?a.comparison&&a.comparison>0?"ann an "+n:"o chionn "+n:n},Ns={date:Qa({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:Qa({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:Qa({formats:{full:"{{date}} 'aig' {{time}}",long:"{{date}} 'aig' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},Xs={lastWeek:"'mu dheireadh' eeee 'aig' p",yesterday:"'an-dè aig' p",today:"'an-diugh aig' p",tomorrow:"'a-màireach aig' p",nextWeek:"eeee 'aig' p",other:"P"},Is={code:"gd",formatDistance:Ds,formatLong:Ns,formatRelative:function(e,t,a,n){return Xs[e]},localize:{ordinalNumber:function(e){var t=Number(e),a=t%100;if(a>20||a<10)switch(a%10){case 1:return t+"d";case 2:return t+"na"}return 12===a?t+"na":t+"mh"},era:Ra({values:{narrow:["R","A"],abbreviated:["RC","AD"],wide:["ro Chrìosta","anno domini"]},defaultWidth:"wide"}),quarter:Ra({values:{narrow:["1","2","3","4"],abbreviated:["C1","C2","C3","C4"],wide:["a' chiad chairteal","an dàrna cairteal","an treas cairteal","an ceathramh cairteal"]},defaultWidth:"wide",argumentCallback:function(e){return e-1}}),month:Ra({values:{narrow:["F","G","M","G","C","Ò","I","L","S","D","S","D"],abbreviated:["Faoi","Gear","Màrt","Gibl","Cèit","Ògmh","Iuch","Lùn","Sult","Dàmh","Samh","Dùbh"],wide:["Am Faoilleach","An Gearran","Am Màrt","An Giblean","An Cèitean","An t-Ògmhios","An t-Iuchar","An Lùnastal","An t-Sultain","An Dàmhair","An t-Samhain","An Dùbhlachd"]},defaultWidth:"wide"}),day:Ra({values:{narrow:["D","L","M","C","A","H","S"],short:["Dò","Lu","Mà","Ci","Ar","Ha","Sa"],abbreviated:["Did","Dil","Dim","Dic","Dia","Dih","Dis"],wide:["Didòmhnaich","Diluain","Dimàirt","Diciadain","Diardaoin","Dihaoine","Disathairne"]},defaultWidth:"wide"}),dayPeriod:Ra({values:{narrow:{am:"m",pm:"f",midnight:"m.o.",noon:"m.l.",morning:"madainn",afternoon:"feasgar",evening:"feasgar",night:"oidhche"},abbreviated:{am:"M.",pm:"F.",midnight:"meadhan oidhche",noon:"meadhan là",morning:"madainn",afternoon:"feasgar",evening:"feasgar",night:"oidhche"},wide:{am:"m.",pm:"f.",midnight:"meadhan oidhche",noon:"meadhan là",morning:"madainn",afternoon:"feasgar",evening:"feasgar",night:"oidhche"}},defaultWidth:"wide",formattingValues:{narrow:{am:"m",pm:"f",midnight:"m.o.",noon:"m.l.",morning:"sa mhadainn",afternoon:"feasgar",evening:"feasgar",night:"air an oidhche"},abbreviated:{am:"M.",pm:"F.",midnight:"meadhan oidhche",noon:"meadhan là",morning:"sa mhadainn",afternoon:"feasgar",evening:"feasgar",night:"air an oidhche"},wide:{am:"m.",pm:"f.",midnight:"meadhan oidhche",noon:"meadhan là",morning:"sa mhadainn",afternoon:"feasgar",evening:"feasgar",night:"air an oidhche"}},defaultFormattingWidth:"wide"})},match:{ordinalNumber:$a({matchPattern:/^(\d+)(d|na|tr|mh)?/i,parsePattern:/\d+/i,valueCallback:function(e){return parseInt(e,10)}}),era:Fa({matchPatterns:{narrow:/^(r|a)/i,abbreviated:/^(r\.?\s?c\.?|r\.?\s?a\.?\s?c\.?|a\.?\s?d\.?|a\.?\s?c\.?)/i,wide:/^(ro Chrìosta|ron aois choitchinn|anno domini|aois choitcheann)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:"any"}),quarter:Fa({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^c[1234]/i,wide:/^[1234](cd|na|tr|mh)? cairteal/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:function(e){return e+1}}),month:Fa({matchPatterns:{narrow:/^[fgmcòilsd]/i,abbreviated:/^(faoi|gear|màrt|gibl|cèit|ògmh|iuch|lùn|sult|dàmh|samh|dùbh)/i,wide:/^(am faoilleach|an gearran|am màrt|an giblean|an cèitean|an t-Ògmhios|an t-Iuchar|an lùnastal|an t-Sultain|an dàmhair|an t-Samhain|an dùbhlachd)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^f/i,/^g/i,/^m/i,/^g/i,/^c/i,/^ò/i,/^i/i,/^l/i,/^s/i,/^d/i,/^s/i,/^d/i],any:[/^fa/i,/^ge/i,/^mà/i,/^gi/i,/^c/i,/^ò/i,/^i/i,/^l/i,/^su/i,/^d/i,/^sa/i,/^d/i]},defaultParseWidth:"any"}),day:Fa({matchPatterns:{narrow:/^[dlmcahs]/i,short:/^(dò|lu|mà|ci|ar|ha|sa)/i,abbreviated:/^(did|dil|dim|dic|dia|dih|dis)/i,wide:/^(didòmhnaich|diluain|dimàirt|diciadain|diardaoin|dihaoine|disathairne)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^d/i,/^l/i,/^m/i,/^c/i,/^a/i,/^h/i,/^s/i],any:[/^d/i,/^l/i,/^m/i,/^c/i,/^a/i,/^h/i,/^s/i]},defaultParseWidth:"any"}),dayPeriod:Fa({matchPatterns:{narrow:/^(a|p|mi|n|(san|aig) (madainn|feasgar|feasgar|oidhche))/i,any:/^([ap]\.?\s?m\.?|meadhan oidhche|meadhan là|(san|aig) (madainn|feasgar|feasgar|oidhche))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^m/i,pm:/^f/i,midnight:/^meadhan oidhche/i,noon:/^meadhan là/i,morning:/sa mhadainn/i,afternoon:/feasgar/i,evening:/feasgar/i,night:/air an oidhche/i}},defaultParseWidth:"any"})},options:{weekStartsOn:0,firstWeekContainsDate:1}},Es={lessThanXSeconds:{one:"menos dun segundo",other:"menos de {{count}} segundos"},xSeconds:{one:"1 segundo",other:"{{count}} segundos"},halfAMinute:"medio minuto",lessThanXMinutes:{one:"menos dun minuto",other:"menos de {{count}} minutos"},xMinutes:{one:"1 minuto",other:"{{count}} minutos"},aboutXHours:{one:"arredor dunha hora",other:"arredor de {{count}} horas"},xHours:{one:"1 hora",other:"{{count}} horas"},xDays:{one:"1 día",other:"{{count}} días"},aboutXWeeks:{one:"arredor dunha semana",other:"arredor de {{count}} semanas"},xWeeks:{one:"1 semana",other:"{{count}} semanas"},aboutXMonths:{one:"arredor de 1 mes",other:"arredor de {{count}} meses"},xMonths:{one:"1 mes",other:"{{count}} meses"},aboutXYears:{one:"arredor dun ano",other:"arredor de {{count}} anos"},xYears:{one:"1 ano",other:"{{count}} anos"},overXYears:{one:"máis dun ano",other:"máis de {{count}} anos"},almostXYears:{one:"case un ano",other:"case {{count}} anos"}},Bs=function(e,t,a){var n,i=Es[e];return n="string"==typeof i?i:1===t?i.one:i.other.replace("{{count}}",String(t)),null!=a&&a.addSuffix?a.comparison&&a.comparison>0?"en "+n:"hai "+n:n},Vs={date:Qa({formats:{full:"EEEE, d 'de' MMMM y",long:"d 'de' MMMM y",medium:"d MMM y",short:"dd/MM/y"},defaultWidth:"full"}),time:Qa({formats:{full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},defaultWidth:"full"}),dateTime:Qa({formats:{full:"{{date}} 'ás' {{time}}",long:"{{date}} 'ás' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},Ks={lastWeek:"'o' eeee 'pasado á' LT",yesterday:"'onte á' p",today:"'hoxe á' p",tomorrow:"'mañá á' p",nextWeek:"eeee 'á' p",other:"P"},Us={lastWeek:"'o' eeee 'pasado ás' p",yesterday:"'onte ás' p",today:"'hoxe ás' p",tomorrow:"'mañá ás' p",nextWeek:"eeee 'ás' p",other:"P"},Gs={code:"gl",formatDistance:Bs,formatLong:Vs,formatRelative:function(e,t,a,n){return 1!==t.getUTCHours()?Us[e]:Ks[e]},localize:{ordinalNumber:function(e,t){return Number(e)+"º"},era:Ra({values:{narrow:["AC","DC"],abbreviated:["AC","DC"],wide:["antes de cristo","despois de cristo"]},defaultWidth:"wide"}),quarter:Ra({values:{narrow:["1","2","3","4"],abbreviated:["T1","T2","T3","T4"],wide:["1º trimestre","2º trimestre","3º trimestre","4º trimestre"]},defaultWidth:"wide",argumentCallback:function(e){return e-1}}),month:Ra({values:{narrow:["e","f","m","a","m","j","j","a","s","o","n","d"],abbreviated:["xan","feb","mar","abr","mai","xun","xul","ago","set","out","nov","dec"],wide:["xaneiro","febreiro","marzo","abril","maio","xuño","xullo","agosto","setembro","outubro","novembro","decembro"]},defaultWidth:"wide"}),day:Ra({values:{narrow:["d","l","m","m","j","v","s"],short:["do","lu","ma","me","xo","ve","sa"],abbreviated:["dom","lun","mar","mer","xov","ven","sab"],wide:["domingo","luns","martes","mércores","xoves","venres","sábado"]},defaultWidth:"wide"}),dayPeriod:Ra({values:{narrow:{am:"a",pm:"p",midnight:"mn",noon:"md",morning:"mañá",afternoon:"tarde",evening:"tarde",night:"noite"},abbreviated:{am:"AM",pm:"PM",midnight:"medianoite",noon:"mediodía",morning:"mañá",afternoon:"tarde",evening:"tardiña",night:"noite"},wide:{am:"a.m.",pm:"p.m.",midnight:"medianoite",noon:"mediodía",morning:"mañá",afternoon:"tarde",evening:"tardiña",night:"noite"}},defaultWidth:"wide",formattingValues:{narrow:{am:"a",pm:"p",midnight:"mn",noon:"md",morning:"da mañá",afternoon:"da tarde",evening:"da tardiña",night:"da noite"},abbreviated:{am:"AM",pm:"PM",midnight:"medianoite",noon:"mediodía",morning:"da mañá",afternoon:"da tarde",evening:"da tardiña",night:"da noite"},wide:{am:"a.m.",pm:"p.m.",midnight:"medianoite",noon:"mediodía",morning:"da mañá",afternoon:"da tarde",evening:"da tardiña",night:"da noite"}},defaultFormattingWidth:"wide"})},match:{ordinalNumber:$a({matchPattern:/^(\d+)(º)?/i,parsePattern:/\d+/i,valueCallback:function(e){return parseInt(e,10)}}),era:Fa({matchPatterns:{narrow:/^(ac|dc|a|d)/i,abbreviated:/^(a\.?\s?c\.?|a\.?\s?e\.?\s?c\.?|d\.?\s?c\.?|e\.?\s?c\.?)/i,wide:/^(antes de cristo|antes da era com[uú]n|despois de cristo|era com[uú]n)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^ac/i,/^dc/i],wide:[/^(antes de cristo|antes da era com[uú]n)/i,/^(despois de cristo|era com[uú]n)/i]},defaultParseWidth:"any"}),quarter:Fa({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^T[1234]/i,wide:/^[1234](º)? trimestre/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:function(e){return e+1}}),month:Fa({matchPatterns:{narrow:/^[xfmasond]/i,abbreviated:/^(xan|feb|mar|abr|mai|xun|xul|ago|set|out|nov|dec)/i,wide:/^(xaneiro|febreiro|marzo|abril|maio|xuño|xullo|agosto|setembro|outubro|novembro|decembro)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^x/i,/^f/i,/^m/i,/^a/i,/^m/i,/^x/i,/^x/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^xan/i,/^feb/i,/^mar/i,/^abr/i,/^mai/i,/^xun/i,/^xul/i,/^ago/i,/^set/i,/^out/i,/^nov/i,/^dec/i]},defaultParseWidth:"any"}),day:Fa({matchPatterns:{narrow:/^[dlmxvs]/i,short:/^(do|lu|ma|me|xo|ve|sa)/i,abbreviated:/^(dom|lun|mar|mer|xov|ven|sab)/i,wide:/^(domingo|luns|martes|m[eé]rcores|xoves|venres|s[áa]bado)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^d/i,/^l/i,/^m/i,/^m/i,/^x/i,/^v/i,/^s/i],any:[/^do/i,/^lu/i,/^ma/i,/^me/i,/^xo/i,/^ve/i,/^sa/i]},defaultParseWidth:"any"}),dayPeriod:Fa({matchPatterns:{narrow:/^(a|p|mn|md|(da|[aá]s) (mañ[aá]|tarde|noite))/i,any:/^([ap]\.?\s?m\.?|medianoite|mediod[ií]a|(da|[aá]s) (mañ[aá]|tarde|noite))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mn/i,noon:/^md/i,morning:/mañ[aá]/i,afternoon:/tarde/i,evening:/tardiña/i,night:/noite/i}},defaultParseWidth:"any"})},options:{weekStartsOn:1,firstWeekContainsDate:1}},Os={lessThanXSeconds:{one:"હમણાં",other:"​આશરે {{count}} સેકંડ"},xSeconds:{one:"1 સેકંડ",other:"{{count}} સેકંડ"},halfAMinute:"અડધી મિનિટ",lessThanXMinutes:{one:"આ મિનિટ",other:"​આશરે {{count}} મિનિટ"},xMinutes:{one:"1 મિનિટ",other:"{{count}} મિનિટ"},aboutXHours:{one:"​આશરે 1 કલાક",other:"​આશરે {{count}} કલાક"},xHours:{one:"1 કલાક",other:"{{count}} કલાક"},xDays:{one:"1 દિવસ",other:"{{count}} દિવસ"},aboutXWeeks:{one:"આશરે 1 અઠવાડિયું",other:"આશરે {{count}} અઠવાડિયા"},xWeeks:{one:"1 અઠવાડિયું",other:"{{count}} અઠવાડિયા"},aboutXMonths:{one:"આશરે 1 મહિનો",other:"આશરે {{count}} મહિના"},xMonths:{one:"1 મહિનો",other:"{{count}} મહિના"},aboutXYears:{one:"આશરે 1 વર્ષ",other:"આશરે {{count}} વર્ષ"},xYears:{one:"1 વર્ષ",other:"{{count}} વર્ષ"},overXYears:{one:"1 વર્ષથી વધુ",other:"{{count}} વર્ષથી વધુ"},almostXYears:{one:"લગભગ 1 વર્ષ",other:"લગભગ {{count}} વર્ષ"}},Qs=function(e,t,a){var n,i=Os[e];return n="string"==typeof i?i:1===t?i.one:i.other.replace("{{count}}",String(t)),null!=a&&a.addSuffix?a.comparison&&a.comparison>0?n+"માં":n+" પહેલાં":n},Ys={date:Qa({formats:{full:"EEEE, d MMMM, y",long:"d MMMM, y",medium:"d MMM, y",short:"d/M/yy"},defaultWidth:"full"}),time:Qa({formats:{full:"hh:mm:ss a zzzz",long:"hh:mm:ss a z",medium:"hh:mm:ss a",short:"hh:mm a"},defaultWidth:"full"}),dateTime:Qa({formats:{full:"{{date}} {{time}}",long:"{{date}} {{time}}",medium:"{{date}} {{time}}",short:"{{date}} {{time}}"},defaultWidth:"full"})},qs={lastWeek:"'પાછલા' eeee p",yesterday:"'ગઈકાલે' p",today:"'આજે' p",tomorrow:"'આવતીકાલે' p",nextWeek:"eeee p",other:"P"},Js={code:"gu",formatDistance:Qs,formatLong:Ys,formatRelative:function(e,t,a,n){return qs[e]},localize:{ordinalNumber:function(e,t){return String(e)},era:Ra({values:{narrow:["ઈસપૂ","ઈસ"],abbreviated:["ઈ.સ.પૂર્વે","ઈ.સ."],wide:["ઈસવીસન પૂર્વે","ઈસવીસન"]},defaultWidth:"wide"}),quarter:Ra({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1લો ત્રિમાસ","2જો ત્રિમાસ","3જો ત્રિમાસ","4થો ત્રિમાસ"]},defaultWidth:"wide",argumentCallback:function(e){return e-1}}),month:Ra({values:{narrow:["જા","ફે","મા","એ","મે","જૂ","જુ","ઓ","સ","ઓ","ન","ડિ"],abbreviated:["જાન્યુ","ફેબ્રુ","માર્ચ","એપ્રિલ","મે","જૂન","જુલાઈ","ઑગસ્ટ","સપ્ટે","ઓક્ટો","નવે","ડિસે"],wide:["જાન્યુઆરી","ફેબ્રુઆરી","માર્ચ","એપ્રિલ","મે","જૂન","જુલાઇ","ઓગસ્ટ","સપ્ટેમ્બર","ઓક્ટોબર","નવેમ્બર","ડિસેમ્બર"]},defaultWidth:"wide"}),day:Ra({values:{narrow:["ર","સો","મં","બુ","ગુ","શુ","શ"],short:["ર","સો","મં","બુ","ગુ","શુ","શ"],abbreviated:["રવિ","સોમ","મંગળ","બુધ","ગુરુ","શુક્ર","શનિ"],wide:["રવિવાર","સોમવાર","મંગળવાર","બુધવાર","ગુરુવાર","શુક્રવાર","શનિવાર"]},defaultWidth:"wide"}),dayPeriod:Ra({values:{narrow:{am:"AM",pm:"PM",midnight:"મ.રાત્રિ",noon:"બ.",morning:"સવારે",afternoon:"બપોરે",evening:"સાંજે",night:"રાત્રે"},abbreviated:{am:"AM",pm:"PM",midnight:"​મધ્યરાત્રિ",noon:"બપોરે",morning:"સવારે",afternoon:"બપોરે",evening:"સાંજે",night:"રાત્રે"},wide:{am:"AM",pm:"PM",midnight:"​મધ્યરાત્રિ",noon:"બપોરે",morning:"સવારે",afternoon:"બપોરે",evening:"સાંજે",night:"રાત્રે"}},defaultWidth:"wide",formattingValues:{narrow:{am:"AM",pm:"PM",midnight:"મ.રાત્રિ",noon:"બપોરે",morning:"સવારે",afternoon:"બપોરે",evening:"સાંજે",night:"રાત્રે"},abbreviated:{am:"AM",pm:"PM",midnight:"મધ્યરાત્રિ",noon:"બપોરે",morning:"સવારે",afternoon:"બપોરે",evening:"સાંજે",night:"રાત્રે"},wide:{am:"AM",pm:"PM",midnight:"​મધ્યરાત્રિ",noon:"બપોરે",morning:"સવારે",afternoon:"બપોરે",evening:"સાંજે",night:"રાત્રે"}},defaultFormattingWidth:"wide"})},match:{ordinalNumber:$a({matchPattern:/^(\d+)(લ|જ|થ|ઠ્ઠ|મ)?/i,parsePattern:/\d+/i,valueCallback:function(e){return parseInt(e,10)}}),era:Fa({matchPatterns:{narrow:/^(ઈસપૂ|ઈસ)/i,abbreviated:/^(ઈ\.સ\.પૂર્વે|ઈ\.સ\.)/i,wide:/^(ઈસવીસન\sપૂર્વે|ઈસવીસન)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^ઈસપૂ/i,/^ઈસ/i]},defaultParseWidth:"any"}),quarter:Fa({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](લો|જો|થો)? ત્રિમાસ/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:function(e){return e+1}}),month:Fa({matchPatterns:{narrow:/^[જાફેમાએમેજૂજુઓસઓનડિ]/i,abbreviated:/^(જાન્યુ|ફેબ્રુ|માર્ચ|એપ્રિલ|મે|જૂન|જુલાઈ|ઑગસ્ટ|સપ્ટે|ઓક્ટો|નવે|ડિસે)/i,wide:/^(જાન્યુઆરી|ફેબ્રુઆરી|માર્ચ|એપ્રિલ|મે|જૂન|જુલાઇ|ઓગસ્ટ|સપ્ટેમ્બર|ઓક્ટોબર|નવેમ્બર|ડિસેમ્બર)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^જા/i,/^ફે/i,/^મા/i,/^એ/i,/^મે/i,/^જૂ/i,/^જુ/i,/^ઑગ/i,/^સ/i,/^ઓક્ટો/i,/^ન/i,/^ડિ/i],any:[/^જા/i,/^ફે/i,/^મા/i,/^એ/i,/^મે/i,/^જૂ/i,/^જુ/i,/^ઑગ/i,/^સ/i,/^ઓક્ટો/i,/^ન/i,/^ડિ/i]},defaultParseWidth:"any"}),day:Fa({matchPatterns:{narrow:/^(ર|સો|મં|બુ|ગુ|શુ|શ)/i,short:/^(ર|સો|મં|બુ|ગુ|શુ|શ)/i,abbreviated:/^(રવિ|સોમ|મંગળ|બુધ|ગુરુ|શુક્ર|શનિ)/i,wide:/^(રવિવાર|સોમવાર|મંગળવાર|બુધવાર|ગુરુવાર|શુક્રવાર|શનિવાર)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^ર/i,/^સો/i,/^મં/i,/^બુ/i,/^ગુ/i,/^શુ/i,/^શ/i],any:[/^ર/i,/^સો/i,/^મં/i,/^બુ/i,/^ગુ/i,/^શુ/i,/^શ/i]},defaultParseWidth:"any"}),dayPeriod:Fa({matchPatterns:{narrow:/^(a|p|મ\.?|સ|બ|સાં|રા)/i,any:/^(a|p|મ\.?|સ|બ|સાં|રા)/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^મ\.?/i,noon:/^બ/i,morning:/સ/i,afternoon:/બ/i,evening:/સાં/i,night:/રા/i}},defaultParseWidth:"any"})},options:{weekStartsOn:1,firstWeekContainsDate:4}},Rs={lessThanXSeconds:{one:"פחות משנייה",two:"פחות משתי שניות",other:"פחות מ־{{count}} שניות"},xSeconds:{one:"שנייה",two:"שתי שניות",other:"{{count}} שניות"},halfAMinute:"חצי דקה",lessThanXMinutes:{one:"פחות מדקה",two:"פחות משתי דקות",other:"פחות מ־{{count}} דקות"},xMinutes:{one:"דקה",two:"שתי דקות",other:"{{count}} דקות"},aboutXHours:{one:"כשעה",two:"כשעתיים",other:"כ־{{count}} שעות"},xHours:{one:"שעה",two:"שעתיים",other:"{{count}} שעות"},xDays:{one:"יום",two:"יומיים",other:"{{count}} ימים"},aboutXWeeks:{one:"כשבוע",two:"כשבועיים",other:"כ־{{count}} שבועות"},xWeeks:{one:"שבוע",two:"שבועיים",other:"{{count}} שבועות"},aboutXMonths:{one:"כחודש",two:"כחודשיים",other:"כ־{{count}} חודשים"},xMonths:{one:"חודש",two:"חודשיים",other:"{{count}} חודשים"},aboutXYears:{one:"כשנה",two:"כשנתיים",other:"כ־{{count}} שנים"},xYears:{one:"שנה",two:"שנתיים",other:"{{count}} שנים"},overXYears:{one:"יותר משנה",two:"יותר משנתיים",other:"יותר מ־{{count}} שנים"},almostXYears:{one:"כמעט שנה",two:"כמעט שנתיים",other:"כמעט {{count}} שנים"}},Ls=function(e,t,a){if("xDays"===e&&null!=a&&a.addSuffix&&t<=2)return a.comparison&&a.comparison>0?1===t?"מחר":"מחרתיים":1===t?"אתמול":"שלשום";var n,i=Rs[e];return n="string"==typeof i?i:1===t?i.one:2===t?i.two:i.other.replace("{{count}}",String(t)),null!=a&&a.addSuffix?a.comparison&&a.comparison>0?"בעוד "+n:"לפני "+n:n},Fs={date:Qa({formats:{full:"EEEE, d בMMMM y",long:"d בMMMM y",medium:"d בMMM y",short:"d.M.y"},defaultWidth:"full"}),time:Qa({formats:{full:"H:mm:ss zzzz",long:"H:mm:ss z",medium:"H:mm:ss",short:"H:mm"},defaultWidth:"full"}),dateTime:Qa({formats:{full:"{{date}} 'בשעה' {{time}}",long:"{{date}} 'בשעה' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},Zs={lastWeek:"eeee 'שעבר בשעה' p",yesterday:"'אתמול בשעה' p",today:"'היום בשעה' p",tomorrow:"'מחר בשעה' p",nextWeek:"eeee 'בשעה' p",other:"P"},_s=function(e,t,a,n){return Zs[e]},$s={ordinalNumber:function(e,t){var a=Number(e);if(a<=0||a>10)return String(a);var n=String(null==t?void 0:t.unit),i=a-1;return["year","hour","minute","second"].indexOf(n)>=0?["ראשונה","שנייה","שלישית","רביעית","חמישית","שישית","שביעית","שמינית","תשיעית","עשירית"][i]:["ראשון","שני","שלישי","רביעי","חמישי","שישי","שביעי","שמיני","תשיעי","עשירי"][i]},era:Ra({values:{narrow:["לפנה״ס","לספירה"],abbreviated:["לפנה״ס","לספירה"],wide:["לפני הספירה","לספירה"]},defaultWidth:"wide"}),quarter:Ra({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["רבעון 1","רבעון 2","רבעון 3","רבעון 4"]},defaultWidth:"wide",argumentCallback:function(e){return e-1}}),month:Ra({values:{narrow:["1","2","3","4","5","6","7","8","9","10","11","12"],abbreviated:["ינו׳","פבר׳","מרץ","אפר׳","מאי","יוני","יולי","אוג׳","ספט׳","אוק׳","נוב׳","דצמ׳"],wide:["ינואר","פברואר","מרץ","אפריל","מאי","יוני","יולי","אוגוסט","ספטמבר","אוקטובר","נובמבר","דצמבר"]},defaultWidth:"wide"}),day:Ra({values:{narrow:["א׳","ב׳","ג׳","ד׳","ה׳","ו׳","ש׳"],short:["א׳","ב׳","ג׳","ד׳","ה׳","ו׳","ש׳"],abbreviated:["יום א׳","יום ב׳","יום ג׳","יום ד׳","יום ה׳","יום ו׳","שבת"],wide:["יום ראשון","יום שני","יום שלישי","יום רביעי","יום חמישי","יום שישי","יום שבת"]},defaultWidth:"wide"}),dayPeriod:Ra({values:{narrow:{am:"לפנה״צ",pm:"אחה״צ",midnight:"חצות",noon:"צהריים",morning:"בוקר",afternoon:"אחר הצהריים",evening:"ערב",night:"לילה"},abbreviated:{am:"לפנה״צ",pm:"אחה״צ",midnight:"חצות",noon:"צהריים",morning:"בוקר",afternoon:"אחר הצהריים",evening:"ערב",night:"לילה"},wide:{am:"לפנה״צ",pm:"אחה״צ",midnight:"חצות",noon:"צהריים",morning:"בוקר",afternoon:"אחר הצהריים",evening:"ערב",night:"לילה"}},defaultWidth:"wide",formattingValues:{narrow:{am:"לפנה״צ",pm:"אחה״צ",midnight:"חצות",noon:"צהריים",morning:"בבוקר",afternoon:"בצהריים",evening:"בערב",night:"בלילה"},abbreviated:{am:"לפנה״צ",pm:"אחה״צ",midnight:"חצות",noon:"צהריים",morning:"בבוקר",afternoon:"אחר הצהריים",evening:"בערב",night:"בלילה"},wide:{am:"לפנה״צ",pm:"אחה״צ",midnight:"חצות",noon:"צהריים",morning:"בבוקר",afternoon:"אחר הצהריים",evening:"בערב",night:"בלילה"}},defaultFormattingWidth:"wide"})},eu=["רא","שנ","של","רב","ח","שי","שב","שמ","ת","ע"],tu={code:"he",formatDistance:Ls,formatLong:Fs,formatRelative:_s,localize:$s,match:{ordinalNumber:$a({matchPattern:/^(\d+|(ראשון|שני|שלישי|רביעי|חמישי|שישי|שביעי|שמיני|תשיעי|עשירי|ראשונה|שנייה|שלישית|רביעית|חמישית|שישית|שביעית|שמינית|תשיעית|עשירית))/i,parsePattern:/^(\d+|רא|שנ|של|רב|ח|שי|שב|שמ|ת|ע)/i,valueCallback:function(e){var t=parseInt(e,10);return isNaN(t)?eu.indexOf(e)+1:t}}),era:Fa({matchPatterns:{narrow:/^ל(ספירה|פנה״ס)/i,abbreviated:/^ל(ספירה|פנה״ס)/i,wide:/^ל(פני ה)?ספירה/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^לפ/i,/^לס/i]},defaultParseWidth:"any"}),quarter:Fa({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^רבעון [1234]/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:function(e){return e+1}}),month:Fa({matchPatterns:{narrow:/^\d+/i,abbreviated:/^(ינו|פבר|מרץ|אפר|מאי|יוני|יולי|אוג|ספט|אוק|נוב|דצמ)׳?/i,wide:/^(ינואר|פברואר|מרץ|אפריל|מאי|יוני|יולי|אוגוסט|ספטמבר|אוקטובר|נובמבר|דצמבר)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^1$/i,/^2/i,/^3/i,/^4/i,/^5/i,/^6/i,/^7/i,/^8/i,/^9/i,/^10/i,/^11/i,/^12/i],any:[/^ינ/i,/^פ/i,/^מר/i,/^אפ/i,/^מא/i,/^יונ/i,/^יול/i,/^אוג/i,/^ס/i,/^אוק/i,/^נ/i,/^ד/i]},defaultParseWidth:"any"}),day:Fa({matchPatterns:{narrow:/^[אבגדהוש]׳/i,short:/^[אבגדהוש]׳/i,abbreviated:/^(שבת|יום (א|ב|ג|ד|ה|ו)׳)/i,wide:/^יום (ראשון|שני|שלישי|רביעי|חמישי|שישי|שבת)/i},defaultMatchWidth:"wide",parsePatterns:{abbreviated:[/א׳$/i,/ב׳$/i,/ג׳$/i,/ד׳$/i,/ה׳$/i,/ו׳$/i,/^ש/i],wide:[/ן$/i,/ני$/i,/לישי$/i,/עי$/i,/מישי$/i,/שישי$/i,/ת$/i],any:[/^א/i,/^ב/i,/^ג/i,/^ד/i,/^ה/i,/^ו/i,/^ש/i]},defaultParseWidth:"any"}),dayPeriod:Fa({matchPatterns:{any:/^(אחר ה|ב)?(חצות|צהריים|בוקר|ערב|לילה|אחה״צ|לפנה״צ)/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^לפ/i,pm:/^אחה/i,midnight:/^ח/i,noon:/^צ/i,morning:/בוקר/i,afternoon:/בצ|אחר/i,evening:/ערב/i,night:/לילה/i}},defaultParseWidth:"any"})},options:{weekStartsOn:0,firstWeekContainsDate:1}},au={locale:{1:"१",2:"२",3:"३",4:"४",5:"५",6:"६",7:"७",8:"८",9:"९",0:"०"},number:{"१":"1","२":"2","३":"3","४":"4","५":"5","६":"6","७":"7","८":"8","९":"9","०":"0"}};function nu(e){return e.toString().replace(/\d/g,(function(e){return au.locale[e]}))}var iu={ordinalNumber:function(e,t){return nu(Number(e))},era:Ra({values:{narrow:["ईसा-पूर्व","ईस्वी"],abbreviated:["ईसा-पूर्व","ईस्वी"],wide:["ईसा-पूर्व","ईसवी सन"]},defaultWidth:"wide"}),quarter:Ra({values:{narrow:["1","2","3","4"],abbreviated:["ति1","ति2","ति3","ति4"],wide:["पहली तिमाही","दूसरी तिमाही","तीसरी तिमाही","चौथी तिमाही"]},defaultWidth:"wide",argumentCallback:function(e){return e-1}}),month:Ra({values:{narrow:["ज","फ़","मा","अ","मई","जू","जु","अग","सि","अक्टू","न","दि"],abbreviated:["जन","फ़र","मार्च","अप्रैल","मई","जून","जुल","अग","सित","अक्टू","नव","दिस"],wide:["जनवरी","फ़रवरी","मार्च","अप्रैल","मई","जून","जुलाई","अगस्त","सितंबर","अक्टूबर","नवंबर","दिसंबर"]},defaultWidth:"wide"}),day:Ra({values:{narrow:["र","सो","मं","बु","गु","शु","श"],short:["र","सो","मं","बु","गु","शु","श"],abbreviated:["रवि","सोम","मंगल","बुध","गुरु","शुक्र","शनि"],wide:["रविवार","सोमवार","मंगलवार","बुधवार","गुरुवार","शुक्रवार","शनिवार"]},defaultWidth:"wide"}),dayPeriod:Ra({values:{narrow:{am:"पूर्वाह्न",pm:"अपराह्न",midnight:"मध्यरात्रि",noon:"दोपहर",morning:"सुबह",afternoon:"दोपहर",evening:"शाम",night:"रात"},abbreviated:{am:"पूर्वाह्न",pm:"अपराह्न",midnight:"मध्यरात्रि",noon:"दोपहर",morning:"सुबह",afternoon:"दोपहर",evening:"शाम",night:"रात"},wide:{am:"पूर्वाह्न",pm:"अपराह्न",midnight:"मध्यरात्रि",noon:"दोपहर",morning:"सुबह",afternoon:"दोपहर",evening:"शाम",night:"रात"}},defaultWidth:"wide",formattingValues:{narrow:{am:"पूर्वाह्न",pm:"अपराह्न",midnight:"मध्यरात्रि",noon:"दोपहर",morning:"सुबह",afternoon:"दोपहर",evening:"शाम",night:"रात"},abbreviated:{am:"पूर्वाह्न",pm:"अपराह्न",midnight:"मध्यरात्रि",noon:"दोपहर",morning:"सुबह",afternoon:"दोपहर",evening:"शाम",night:"रात"},wide:{am:"पूर्वाह्न",pm:"अपराह्न",midnight:"मध्यरात्रि",noon:"दोपहर",morning:"सुबह",afternoon:"दोपहर",evening:"शाम",night:"रात"}},defaultFormattingWidth:"wide"})},ru={lessThanXSeconds:{one:"१ सेकंड से कम",other:"{{count}} सेकंड से कम"},xSeconds:{one:"१ सेकंड",other:"{{count}} सेकंड"},halfAMinute:"आधा मिनट",lessThanXMinutes:{one:"१ मिनट से कम",other:"{{count}} मिनट से कम"},xMinutes:{one:"१ मिनट",other:"{{count}} मिनट"},aboutXHours:{one:"लगभग १ घंटा",other:"लगभग {{count}} घंटे"},xHours:{one:"१ घंटा",other:"{{count}} घंटे"},xDays:{one:"१ दिन",other:"{{count}} दिन"},aboutXWeeks:{one:"लगभग १ सप्ताह",other:"लगभग {{count}} सप्ताह"},xWeeks:{one:"१ सप्ताह",other:"{{count}} सप्ताह"},aboutXMonths:{one:"लगभग १ महीना",other:"लगभग {{count}} महीने"},xMonths:{one:"१ महीना",other:"{{count}} महीने"},aboutXYears:{one:"लगभग १ वर्ष",other:"लगभग {{count}} वर्ष"},xYears:{one:"१ वर्ष",other:"{{count}} वर्ष"},overXYears:{one:"१ वर्ष से अधिक",other:"{{count}} वर्ष से अधिक"},almostXYears:{one:"लगभग १ वर्ष",other:"लगभग {{count}} वर्ष"}},ou=function(e,t,a){var n,i=ru[e];return n="string"==typeof i?i:1===t?i.one:i.other.replace("{{count}}",nu(t)),null!=a&&a.addSuffix?a.comparison&&a.comparison>0?n+"मे ":n+" पहले":n},du={date:Qa({formats:{full:"EEEE, do MMMM, y",long:"do MMMM, y",medium:"d MMM, y",short:"dd/MM/yyyy"},defaultWidth:"full"}),time:Qa({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:Qa({formats:{full:"{{date}} 'को' {{time}}",long:"{{date}} 'को' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},su={lastWeek:"'पिछले' eeee p",yesterday:"'कल' p",today:"'आज' p",tomorrow:"'कल' p",nextWeek:"eeee 'को' p",other:"P"},uu=function(e,t,a,n){return su[e]},mu={ordinalNumber:$a({matchPattern:/^[०१२३४५६७८९]+/i,parsePattern:/^[०१२३४५६७८९]+/i,valueCallback:function(e){var t=e.toString().replace(/[१२३४५६७८९०]/g,(function(e){return au.number[e]}));return Number(t)}}),era:Fa({matchPatterns:{narrow:/^(ईसा-पूर्व|ईस्वी)/i,abbreviated:/^(ईसा\.?\s?पूर्व\.?|ईसा\.?)/i,wide:/^(ईसा-पूर्व|ईसवी पूर्व|ईसवी सन|ईसवी)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:"any"}),quarter:Fa({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^ति[1234]/i,wide:/^[1234](पहली|दूसरी|तीसरी|चौथी)? तिमाही/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:function(e){return e+1}}),month:Fa({matchPatterns:{narrow:/^[जफ़माअप्मईजूनजुअगसिअक्तनदि]/i,abbreviated:/^(जन|फ़र|मार्च|अप्|मई|जून|जुल|अग|सित|अक्तू|नव|दिस)/i,wide:/^(जनवरी|फ़रवरी|मार्च|अप्रैल|मई|जून|जुलाई|अगस्त|सितंबर|अक्तूबर|नवंबर|दिसंबर)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^ज/i,/^फ़/i,/^मा/i,/^अप्/i,/^मई/i,/^जू/i,/^जु/i,/^अग/i,/^सि/i,/^अक्तू/i,/^न/i,/^दि/i],any:[/^जन/i,/^फ़/i,/^मा/i,/^अप्/i,/^मई/i,/^जू/i,/^जु/i,/^अग/i,/^सि/i,/^अक्तू/i,/^नव/i,/^दिस/i]},defaultParseWidth:"any"}),day:Fa({matchPatterns:{narrow:/^[रविसोममंगलबुधगुरुशुक्रशनि]/i,short:/^(रवि|सोम|मंगल|बुध|गुरु|शुक्र|शनि)/i,abbreviated:/^(रवि|सोम|मंगल|बुध|गुरु|शुक्र|शनि)/i,wide:/^(रविवार|सोमवार|मंगलवार|बुधवार|गुरुवार|शुक्रवार|शनिवार)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^रवि/i,/^सोम/i,/^मंगल/i,/^बुध/i,/^गुरु/i,/^शुक्र/i,/^शनि/i],any:[/^रवि/i,/^सोम/i,/^मंगल/i,/^बुध/i,/^गुरु/i,/^शुक्र/i,/^शनि/i]},defaultParseWidth:"any"}),dayPeriod:Fa({matchPatterns:{narrow:/^(पू|अ|म|द.\?|सु|दो|शा|रा)/i,any:/^(पूर्वाह्न|अपराह्न|म|द.\?|सु|दो|शा|रा)/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^पूर्वाह्न/i,pm:/^अपराह्न/i,midnight:/^मध्य/i,noon:/^दो/i,morning:/सु/i,afternoon:/दो/i,evening:/शा/i,night:/रा/i}},defaultParseWidth:"any"})},lu={code:"hi",formatDistance:ou,formatLong:du,formatRelative:uu,localize:iu,match:mu,options:{weekStartsOn:0,firstWeekContainsDate:4}},hu={lessThanXSeconds:{one:{standalone:"manje od 1 sekunde",withPrepositionAgo:"manje od 1 sekunde",withPrepositionIn:"manje od 1 sekundu"},dual:"manje od {{count}} sekunde",other:"manje od {{count}} sekundi"},xSeconds:{one:{standalone:"1 sekunda",withPrepositionAgo:"1 sekunde",withPrepositionIn:"1 sekundu"},dual:"{{count}} sekunde",other:"{{count}} sekundi"},halfAMinute:"pola minute",lessThanXMinutes:{one:{standalone:"manje od 1 minute",withPrepositionAgo:"manje od 1 minute",withPrepositionIn:"manje od 1 minutu"},dual:"manje od {{count}} minute",other:"manje od {{count}} minuta"},xMinutes:{one:{standalone:"1 minuta",withPrepositionAgo:"1 minute",withPrepositionIn:"1 minutu"},dual:"{{count}} minute",other:"{{count}} minuta"},aboutXHours:{one:{standalone:"oko 1 sat",withPrepositionAgo:"oko 1 sat",withPrepositionIn:"oko 1 sat"},dual:"oko {{count}} sata",other:"oko {{count}} sati"},xHours:{one:{standalone:"1 sat",withPrepositionAgo:"1 sat",withPrepositionIn:"1 sat"},dual:"{{count}} sata",other:"{{count}} sati"},xDays:{one:{standalone:"1 dan",withPrepositionAgo:"1 dan",withPrepositionIn:"1 dan"},dual:"{{count}} dana",other:"{{count}} dana"},aboutXWeeks:{one:{standalone:"oko 1 tjedan",withPrepositionAgo:"oko 1 tjedan",withPrepositionIn:"oko 1 tjedan"},dual:"oko {{count}} tjedna",other:"oko {{count}} tjedana"},xWeeks:{one:{standalone:"1 tjedan",withPrepositionAgo:"1 tjedan",withPrepositionIn:"1 tjedan"},dual:"{{count}} tjedna",other:"{{count}} tjedana"},aboutXMonths:{one:{standalone:"oko 1 mjesec",withPrepositionAgo:"oko 1 mjesec",withPrepositionIn:"oko 1 mjesec"},dual:"oko {{count}} mjeseca",other:"oko {{count}} mjeseci"},xMonths:{one:{standalone:"1 mjesec",withPrepositionAgo:"1 mjesec",withPrepositionIn:"1 mjesec"},dual:"{{count}} mjeseca",other:"{{count}} mjeseci"},aboutXYears:{one:{standalone:"oko 1 godinu",withPrepositionAgo:"oko 1 godinu",withPrepositionIn:"oko 1 godinu"},dual:"oko {{count}} godine",other:"oko {{count}} godina"},xYears:{one:{standalone:"1 godina",withPrepositionAgo:"1 godine",withPrepositionIn:"1 godinu"},dual:"{{count}} godine",other:"{{count}} godina"},overXYears:{one:{standalone:"preko 1 godinu",withPrepositionAgo:"preko 1 godinu",withPrepositionIn:"preko 1 godinu"},dual:"preko {{count}} godine",other:"preko {{count}} godina"},almostXYears:{one:{standalone:"gotovo 1 godinu",withPrepositionAgo:"gotovo 1 godinu",withPrepositionIn:"gotovo 1 godinu"},dual:"gotovo {{count}} godine",other:"gotovo {{count}} godina"}},cu=function(e,t,a){var n,i=hu[e];return n="string"==typeof i?i:1===t?null!=a&&a.addSuffix?a.comparison&&a.comparison>0?i.one.withPrepositionIn:i.one.withPrepositionAgo:i.one.standalone:t%10>1&&t%10<5&&"1"!==String(t).substr(-2,1)?i.dual.replace("{{count}}",String(t)):i.other.replace("{{count}}",String(t)),null!=a&&a.addSuffix?a.comparison&&a.comparison>0?"za "+n:"prije "+n:n},fu={date:Qa({formats:{full:"EEEE, d. MMMM y.",long:"d. MMMM y.",medium:"d. MMM y.",short:"dd. MM. y."},defaultWidth:"full"}),time:Qa({formats:{full:"HH:mm:ss (zzzz)",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},defaultWidth:"full"}),dateTime:Qa({formats:{full:"{{date}} 'u' {{time}}",long:"{{date}} 'u' {{time}}",medium:"{{date}} {{time}}",short:"{{date}} {{time}}"},defaultWidth:"full"})},gu={lastWeek:function(e){switch(e.getUTCDay()){case 0:return"'prošlu nedjelju u' p";case 3:return"'prošlu srijedu u' p";case 6:return"'prošlu subotu u' p";default:return"'prošli' EEEE 'u' p"}},yesterday:"'jučer u' p",today:"'danas u' p",tomorrow:"'sutra u' p",nextWeek:function(e){switch(e.getUTCDay()){case 0:return"'iduću nedjelju u' p";case 3:return"'iduću srijedu u' p";case 6:return"'iduću subotu u' p";default:return"'prošli' EEEE 'u' p"}},other:"P"},pu=function(e,t,a,n){var i=gu[e];return"function"==typeof i?i(t):i},vu={code:"hr",formatDistance:cu,formatLong:fu,formatRelative:pu,localize:{ordinalNumber:function(e,t){return Number(e)+"."},era:Ra({values:{narrow:["pr.n.e.","AD"],abbreviated:["pr. Kr.","po. Kr."],wide:["Prije Krista","Poslije Krista"]},defaultWidth:"wide"}),quarter:Ra({values:{narrow:["1.","2.","3.","4."],abbreviated:["1. kv.","2. kv.","3. kv.","4. kv."],wide:["1. kvartal","2. kvartal","3. kvartal","4. kvartal"]},defaultWidth:"wide",argumentCallback:function(e){return e-1}}),month:Ra({values:{narrow:["1.","2.","3.","4.","5.","6.","7.","8.","9.","10.","11.","12."],abbreviated:["sij","velj","ožu","tra","svi","lip","srp","kol","ruj","lis","stu","pro"],wide:["siječanj","veljača","ožujak","travanj","svibanj","lipanj","srpanj","kolovoz","rujan","listopad","studeni","prosinac"]},defaultWidth:"wide",formattingValues:{narrow:["1.","2.","3.","4.","5.","6.","7.","8.","9.","10.","11.","12."],abbreviated:["sij","velj","ožu","tra","svi","lip","srp","kol","ruj","lis","stu","pro"],wide:["siječnja","veljače","ožujka","travnja","svibnja","lipnja","srpnja","kolovoza","rujna","listopada","studenog","prosinca"]},defaultFormattingWidth:"wide"}),day:Ra({values:{narrow:["N","P","U","S","Č","P","S"],short:["ned","pon","uto","sri","čet","pet","sub"],abbreviated:["ned","pon","uto","sri","čet","pet","sub"],wide:["nedjelja","ponedjeljak","utorak","srijeda","četvrtak","petak","subota"]},defaultWidth:"wide"}),dayPeriod:Ra({values:{narrow:{am:"AM",pm:"PM",midnight:"ponoć",noon:"podne",morning:"ujutro",afternoon:"popodne",evening:"navečer",night:"noću"},abbreviated:{am:"AM",pm:"PM",midnight:"ponoć",noon:"podne",morning:"ujutro",afternoon:"popodne",evening:"navečer",night:"noću"},wide:{am:"AM",pm:"PM",midnight:"ponoć",noon:"podne",morning:"ujutro",afternoon:"poslije podne",evening:"navečer",night:"noću"}},defaultWidth:"wide",formattingValues:{narrow:{am:"AM",pm:"PM",midnight:"ponoć",noon:"podne",morning:"ujutro",afternoon:"popodne",evening:"navečer",night:"noću"},abbreviated:{am:"AM",pm:"PM",midnight:"ponoć",noon:"podne",morning:"ujutro",afternoon:"popodne",evening:"navečer",night:"noću"},wide:{am:"AM",pm:"PM",midnight:"ponoć",noon:"podne",morning:"ujutro",afternoon:"poslije podne",evening:"navečer",night:"noću"}},defaultFormattingWidth:"wide"})},match:{ordinalNumber:$a({matchPattern:/^(\d+)\./i,parsePattern:/\d+/i,valueCallback:function(e){return parseInt(e,10)}}),era:Fa({matchPatterns:{narrow:/^(pr\.n\.e\.|AD)/i,abbreviated:/^(pr\.\s?Kr\.|po\.\s?Kr\.)/i,wide:/^(Prije Krista|prije nove ere|Poslije Krista|nova era)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^pr/i,/^(po|nova)/i]},defaultParseWidth:"any"}),quarter:Fa({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^[1234]\.\s?kv\.?/i,wide:/^[1234]\. kvartal/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:function(e){return e+1}}),month:Fa({matchPatterns:{narrow:/^(10|11|12|[123456789])\./i,abbreviated:/^(sij|velj|(ožu|ozu)|tra|svi|lip|srp|kol|ruj|lis|stu|pro)/i,wide:/^((siječanj|siječnja|sijecanj|sijecnja)|(veljača|veljače|veljaca|veljace)|(ožujak|ožujka|ozujak|ozujka)|(travanj|travnja)|(svibanj|svibnja)|(lipanj|lipnja)|(srpanj|srpnja)|(kolovoz|kolovoza)|(rujan|rujna)|(listopad|listopada)|(studeni|studenog)|(prosinac|prosinca))/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/1/i,/2/i,/3/i,/4/i,/5/i,/6/i,/7/i,/8/i,/9/i,/10/i,/11/i,/12/i],abbreviated:[/^sij/i,/^velj/i,/^(ožu|ozu)/i,/^tra/i,/^svi/i,/^lip/i,/^srp/i,/^kol/i,/^ruj/i,/^lis/i,/^stu/i,/^pro/i],wide:[/^sij/i,/^velj/i,/^(ožu|ozu)/i,/^tra/i,/^svi/i,/^lip/i,/^srp/i,/^kol/i,/^ruj/i,/^lis/i,/^stu/i,/^pro/i]},defaultParseWidth:"wide"}),day:Fa({matchPatterns:{narrow:/^[npusčc]/i,short:/^(ned|pon|uto|sri|(čet|cet)|pet|sub)/i,abbreviated:/^(ned|pon|uto|sri|(čet|cet)|pet|sub)/i,wide:/^(nedjelja|ponedjeljak|utorak|srijeda|(četvrtak|cetvrtak)|petak|subota)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},defaultParseWidth:"any"}),dayPeriod:Fa({matchPatterns:{any:/^(am|pm|ponoc|ponoć|(po)?podne|navecer|navečer|noću|poslije podne|ujutro)/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^pono/i,noon:/^pod/i,morning:/jutro/i,afternoon:/(poslije\s|po)+podne/i,evening:/(navece|naveče)/i,night:/(nocu|noću)/i}},defaultParseWidth:"any"})},options:{weekStartsOn:1,firstWeekContainsDate:1}},bu={lessThanXSeconds:{one:"mwens pase yon segond",other:"mwens pase {{count}} segond"},xSeconds:{one:"1 segond",other:"{{count}} segond"},halfAMinute:"30 segond",lessThanXMinutes:{one:"mwens pase yon minit",other:"mwens pase {{count}} minit"},xMinutes:{one:"1 minit",other:"{{count}} minit"},aboutXHours:{one:"anviwon inè",other:"anviwon {{count}} è"},xHours:{one:"1 lè",other:"{{count}} lè"},xDays:{one:"1 jou",other:"{{count}} jou"},aboutXWeeks:{one:"anviwon 1 semèn",other:"anviwon {{count}} semèn"},xWeeks:{one:"1 semèn",other:"{{count}} semèn"},aboutXMonths:{one:"anviwon 1 mwa",other:"anviwon {{count}} mwa"},xMonths:{one:"1 mwa",other:"{{count}} mwa"},aboutXYears:{one:"anviwon 1 an",other:"anviwon {{count}} an"},xYears:{one:"1 an",other:"{{count}} an"},overXYears:{one:"plis pase 1 an",other:"plis pase {{count}} an"},almostXYears:{one:"prèske 1 an",other:"prèske {{count}} an"}},wu=function(e,t,a){var n,i=bu[e];return n="string"==typeof i?i:1===t?i.one:i.other.replace("{{count}}",String(t)),null!=a&&a.addSuffix?a.comparison&&a.comparison>0?"nan "+n:"sa fè "+n:n},yu={date:Qa({formats:{full:"EEEE d MMMM y",long:"d MMMM y",medium:"d MMM y",short:"dd/MM/y"},defaultWidth:"full"}),time:Qa({formats:{full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},defaultWidth:"full"}),dateTime:Qa({formats:{full:"{{date}} 'nan lè' {{time}}",long:"{{date}} 'nan lè' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},Au={lastWeek:"eeee 'pase nan lè' p",yesterday:"'yè nan lè' p",today:"'jodi a' p",tomorrow:"'demen nan lè' p'",nextWeek:"eeee 'pwochen nan lè' p",other:"P"},ku={code:"ht",formatDistance:wu,formatLong:yu,formatRelative:function(e,t,a,n){return Au[e]},localize:{ordinalNumber:function(e,t){var a=Number(e);return 0===a?String(a):a+(1===a?"ye":"yèm")},era:Ra({values:{narrow:["av. J.-K","ap. J.-K"],abbreviated:["av. J.-K","ap. J.-K"],wide:["anvan Jezi Kris","apre Jezi Kris"]},defaultWidth:"wide"}),quarter:Ra({values:{narrow:["T1","T2","T3","T4"],abbreviated:["1ye trim.","2yèm trim.","3yèm trim.","4yèm trim."],wide:["1ye trimès","2yèm trimès","3yèm trimès","4yèm trimès"]},defaultWidth:"wide",argumentCallback:function(e){return e-1}}),month:Ra({values:{narrow:["J","F","M","A","M","J","J","O","S","O","N","D"],abbreviated:["janv.","fevr.","mas","avr.","me","jen","jiyè","out","sept.","okt.","nov.","des."],wide:["janvye","fevrye","mas","avril","me","jen","jiyè","out","septanm","oktòb","novanm","desanm"]},defaultWidth:"wide"}),day:Ra({values:{narrow:["D","L","M","M","J","V","S"],short:["di","le","ma","mè","je","va","sa"],abbreviated:["dim.","len.","mad.","mèk.","jed.","van.","sam."],wide:["dimanch","lendi","madi","mèkredi","jedi","vandredi","samdi"]},defaultWidth:"wide"}),dayPeriod:Ra({values:{narrow:{am:"AM",pm:"PM",midnight:"minwit",noon:"midi",morning:"mat.",afternoon:"ap.m.",evening:"swa",night:"mat."},abbreviated:{am:"AM",pm:"PM",midnight:"minwit",noon:"midi",morning:"maten",afternoon:"aprèmidi",evening:"swa",night:"maten"},wide:{am:"AM",pm:"PM",midnight:"minwit",noon:"midi",morning:"nan maten",afternoon:"nan aprèmidi",evening:"nan aswè",night:"nan maten"}},defaultWidth:"wide"})},match:{ordinalNumber:$a({matchPattern:/^(\d+)(ye|yèm)?/i,parsePattern:/\d+/i,valueCallback:function(e){return parseInt(e,10)}}),era:Fa({matchPatterns:{narrow:/^(av\.J\.K|ap\.J\.K|ap\.J\.-K)/i,abbreviated:/^(av\.J\.-K|av\.J-K|apr\.J\.-K|apr\.J-K|ap\.J-K)/i,wide:/^(avan Jezi Kris|apre Jezi Kris)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^av/i,/^ap/i]},defaultParseWidth:"any"}),quarter:Fa({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^t[1234]/i,wide:/^[1234](ye|yèm)? trimès/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:function(e){return e+1}}),month:Fa({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(janv|fevr|mas|avr|me|jen|jiyè|out|sept|okt|nov|des)\.?/i,wide:/^(janvye|fevrye|mas|avril|me|jen|jiyè|out|septanm|oktòb|novanm|desanm)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^o/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^ma/i,/^av/i,/^me/i,/^je/i,/^ji/i,/^ou/i,/^s/i,/^ok/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:Fa({matchPatterns:{narrow:/^[lmjvsd]/i,short:/^(di|le|ma|me|je|va|sa)/i,abbreviated:/^(dim|len|mad|mèk|jed|van|sam)\.?/i,wide:/^(dimanch|lendi|madi|mèkredi|jedi|vandredi|samdi)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^d/i,/^l/i,/^m/i,/^m/i,/^j/i,/^v/i,/^s/i],any:[/^di/i,/^le/i,/^ma/i,/^mè/i,/^je/i,/^va/i,/^sa/i]},defaultParseWidth:"any"}),dayPeriod:Fa({matchPatterns:{narrow:/^(a|p|minwit|midi|mat\.?|ap\.?m\.?|swa)/i,any:/^([ap]\.?\s?m\.?|nan maten|nan aprèmidi|nan aswè)/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^min/i,noon:/^mid/i,morning:/mat/i,afternoon:/ap/i,evening:/sw/i,night:/nwit/i}},defaultParseWidth:"any"})},options:{weekStartsOn:1,firstWeekContainsDate:4}},Mu={about:"körülbelül",over:"több mint",almost:"majdnem",lessthan:"kevesebb mint"},Pu={xseconds:" másodperc",halfaminute:"fél perc",xminutes:" perc",xhours:" óra",xdays:" nap",xweeks:" hét",xmonths:" hónap",xyears:" év"},Wu={xseconds:{"-1":" másodperccel ezelőtt",1:" másodperc múlva",0:" másodperce"},halfaminute:{"-1":"fél perccel ezelőtt",1:"fél perc múlva",0:"fél perce"},xminutes:{"-1":" perccel ezelőtt",1:" perc múlva",0:" perce"},xhours:{"-1":" órával ezelőtt",1:" óra múlva",0:" órája"},xdays:{"-1":" nappal ezelőtt",1:" nap múlva",0:" napja"},xweeks:{"-1":" héttel ezelőtt",1:" hét múlva",0:" hete"},xmonths:{"-1":" hónappal ezelőtt",1:" hónap múlva",0:" hónapja"},xyears:{"-1":" évvel ezelőtt",1:" év múlva",0:" éve"}},xu=function(e,t,a){var n=e.match(/about|over|almost|lessthan/i),i=n?e.replace(n[0],""):e,r=!0===(null==a?void 0:a.addSuffix),o=i.toLowerCase(),d=(null==a?void 0:a.comparison)||0,s=r?Wu[o][d]:Pu[o],u="halfaminute"===o?s:t+s;if(n){var m=n[0].toLowerCase();u=Mu[m]+" "+u}return u},zu={date:Qa({formats:{full:"y. MMMM d., EEEE",long:"y. MMMM d.",medium:"y. MMM d.",short:"y. MM. dd."},defaultWidth:"full"}),time:Qa({formats:{full:"H:mm:ss zzzz",long:"H:mm:ss z",medium:"H:mm:ss",short:"H:mm"},defaultWidth:"full"}),dateTime:Qa({formats:{full:"{{date}} {{time}}",long:"{{date}} {{time}}",medium:"{{date}} {{time}}",short:"{{date}} {{time}}"},defaultWidth:"full"})},ju=["vasárnap","hétfőn","kedden","szerdán","csütörtökön","pénteken","szombaton"];function Cu(e){return function(t){var a=ju[t.getUTCDay()];return"".concat(e?"":"'múlt' ","'").concat(a,"' p'-kor'")}}var Tu={lastWeek:Cu(!1),yesterday:"'tegnap' p'-kor'",today:"'ma' p'-kor'",tomorrow:"'holnap' p'-kor'",nextWeek:Cu(!0),other:"P"},Su=function(e,t){var a=Tu[e];return"function"==typeof a?a(t):a},Hu={code:"hu",formatDistance:xu,formatLong:zu,formatRelative:Su,localize:{ordinalNumber:function(e,t){return Number(e)+"."},era:Ra({values:{narrow:["ie.","isz."],abbreviated:["i. e.","i. sz."],wide:["Krisztus előtt","időszámításunk szerint"]},defaultWidth:"wide"}),quarter:Ra({values:{narrow:["1.","2.","3.","4."],abbreviated:["1. n.év","2. n.év","3. n.év","4. n.év"],wide:["1. negyedév","2. negyedév","3. negyedév","4. negyedév"]},defaultWidth:"wide",argumentCallback:function(e){return e-1},formattingValues:{narrow:["I.","II.","III.","IV."],abbreviated:["I. n.év","II. n.év","III. n.év","IV. n.év"],wide:["I. negyedév","II. negyedév","III. negyedév","IV. negyedév"]},defaultFormattingWidth:"wide"}),month:Ra({values:{narrow:["J","F","M","Á","M","J","J","A","Sz","O","N","D"],abbreviated:["jan.","febr.","márc.","ápr.","máj.","jún.","júl.","aug.","szept.","okt.","nov.","dec."],wide:["január","február","március","április","május","június","július","augusztus","szeptember","október","november","december"]},defaultWidth:"wide"}),day:Ra({values:{narrow:["V","H","K","Sz","Cs","P","Sz"],short:["V","H","K","Sze","Cs","P","Szo"],abbreviated:["V","H","K","Sze","Cs","P","Szo"],wide:["vasárnap","hétfő","kedd","szerda","csütörtök","péntek","szombat"]},defaultWidth:"wide"}),dayPeriod:Ra({values:{narrow:{am:"de.",pm:"du.",midnight:"éjfél",noon:"dél",morning:"reggel",afternoon:"du.",evening:"este",night:"éjjel"},abbreviated:{am:"de.",pm:"du.",midnight:"éjfél",noon:"dél",morning:"reggel",afternoon:"du.",evening:"este",night:"éjjel"},wide:{am:"de.",pm:"du.",midnight:"éjfél",noon:"dél",morning:"reggel",afternoon:"délután",evening:"este",night:"éjjel"}},defaultWidth:"wide"})},match:{ordinalNumber:$a({matchPattern:/^(\d+)\.?/i,parsePattern:/\d+/i,valueCallback:function(e){return parseInt(e,10)}}),era:Fa({matchPatterns:{narrow:/^(ie\.|isz\.)/i,abbreviated:/^(i\.\s?e\.?|b?\s?c\s?e|i\.\s?sz\.?)/i,wide:/^(Krisztus előtt|időszámításunk előtt|időszámításunk szerint|i\. sz\.)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/ie/i,/isz/i],abbreviated:[/^(i\.?\s?e\.?|b\s?ce)/i,/^(i\.?\s?sz\.?|c\s?e)/i],any:[/előtt/i,/(szerint|i. sz.)/i]},defaultParseWidth:"any"}),quarter:Fa({matchPatterns:{narrow:/^[1234]\.?/i,abbreviated:/^[1234]?\.?\s?n\.év/i,wide:/^([1234]|I|II|III|IV)?\.?\s?negyedév/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1|I$/i,/2|II$/i,/3|III/i,/4|IV/i]},defaultParseWidth:"any",valueCallback:function(e){return e+1}}),month:Fa({matchPatterns:{narrow:/^[jfmaásond]|sz/i,abbreviated:/^(jan\.?|febr\.?|márc\.?|ápr\.?|máj\.?|jún\.?|júl\.?|aug\.?|szept\.?|okt\.?|nov\.?|dec\.?)/i,wide:/^(január|február|március|április|május|június|július|augusztus|szeptember|október|november|december)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a|á/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s|sz/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^már/i,/^áp/i,/^máj/i,/^jún/i,/^júl/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:Fa({matchPatterns:{narrow:/^([vhkpc]|sz|cs|sz)/i,short:/^([vhkp]|sze|cs|szo)/i,abbreviated:/^([vhkp]|sze|cs|szo)/i,wide:/^(vasárnap|hétfő|kedd|szerda|csütörtök|péntek|szombat)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^v/i,/^h/i,/^k/i,/^sz/i,/^c/i,/^p/i,/^sz/i],any:[/^v/i,/^h/i,/^k/i,/^sze/i,/^c/i,/^p/i,/^szo/i]},defaultParseWidth:"any"}),dayPeriod:Fa({matchPatterns:{any:/^((de|du)\.?|éjfél|délután|dél|reggel|este|éjjel)/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^de\.?/i,pm:/^du\.?/i,midnight:/^éjf/i,noon:/^dé/i,morning:/reg/i,afternoon:/^délu\.?/i,evening:/es/i,night:/éjj/i}},defaultParseWidth:"any"})},options:{weekStartsOn:1,firstWeekContainsDate:4}},Du={lessThanXSeconds:{one:"ավելի քիչ քան 1 վայրկյան",other:"ավելի քիչ քան {{count}} վայրկյան"},xSeconds:{one:"1 վայրկյան",other:"{{count}} վայրկյան"},halfAMinute:"կես րոպե",lessThanXMinutes:{one:"ավելի քիչ քան 1 րոպե",other:"ավելի քիչ քան {{count}} րոպե"},xMinutes:{one:"1 րոպե",other:"{{count}} րոպե"},aboutXHours:{one:"մոտ 1 ժամ",other:"մոտ {{count}} ժամ"},xHours:{one:"1 ժամ",other:"{{count}} ժամ"},xDays:{one:"1 օր",other:"{{count}} օր"},aboutXWeeks:{one:"մոտ 1 շաբաթ",other:"մոտ {{count}} շաբաթ"},xWeeks:{one:"1 շաբաթ",other:"{{count}} շաբաթ"},aboutXMonths:{one:"մոտ 1 ամիս",other:"մոտ {{count}} ամիս"},xMonths:{one:"1 ամիս",other:"{{count}} ամիս"},aboutXYears:{one:"մոտ 1 տարի",other:"մոտ {{count}} տարի"},xYears:{one:"1 տարի",other:"{{count}} տարի"},overXYears:{one:"ավելի քան 1 տարի",other:"ավելի քան {{count}} տարի"},almostXYears:{one:"համարյա 1 տարի",other:"համարյա {{count}} տարի"}},Nu=function(e,t,a){var n,i=Du[e];return n="string"==typeof i?i:1===t?i.one:i.other.replace("{{count}}",String(t)),null!=a&&a.addSuffix?a.comparison&&a.comparison>0?n+" հետո":n+" առաջ":n},Xu={date:Qa({formats:{full:"d MMMM, y, EEEE",long:"d MMMM, y",medium:"d MMM, y",short:"dd.MM.yyyy"},defaultWidth:"full"}),time:Qa({formats:{full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},defaultWidth:"full"}),dateTime:Qa({formats:{full:"{{date}} 'ժ․'{{time}}",long:"{{date}} 'ժ․'{{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},Iu={lastWeek:"'նախորդ' eeee p'֊ին'",yesterday:"'երեկ' p'֊ին'",today:"'այսօր' p'֊ին'",tomorrow:"'վաղը' p'֊ին'",nextWeek:"'հաջորդ' eeee p'֊ին'",other:"P"},Eu={code:"hy",formatDistance:Nu,formatLong:Xu,formatRelative:function(e,t,a,n){return Iu[e]},localize:{ordinalNumber:function(e,t){var a=Number(e),n=a%100;return n<10&&n%10==1?a+"֊ին":a+"֊րդ"},era:Ra({values:{narrow:["Ք","Մ"],abbreviated:["ՔԱ","ՄԹ"],wide:["Քրիստոսից առաջ","Մեր թվարկության"]},defaultWidth:"wide"}),quarter:Ra({values:{narrow:["1","2","3","4"],abbreviated:["Ք1","Ք2","Ք3","Ք4"],wide:["1֊ին քառորդ","2֊րդ քառորդ","3֊րդ քառորդ","4֊րդ քառորդ"]},defaultWidth:"wide",argumentCallback:function(e){return e-1}}),month:Ra({values:{narrow:["Հ","Փ","Մ","Ա","Մ","Հ","Հ","Օ","Ս","Հ","Ն","Դ"],abbreviated:["հուն","փետ","մար","ապր","մայ","հուն","հուլ","օգս","սեպ","հոկ","նոյ","դեկ"],wide:["հունվար","փետրվար","մարտ","ապրիլ","մայիս","հունիս","հուլիս","օգոստոս","սեպտեմբեր","հոկտեմբեր","նոյեմբեր","դեկտեմբեր"]},defaultWidth:"wide"}),day:Ra({values:{narrow:["Կ","Ե","Ե","Չ","Հ","Ո","Շ"],short:["կր","եր","եք","չք","հգ","ուր","շբ"],abbreviated:["կիր","երկ","երք","չոր","հնգ","ուրբ","շաբ"],wide:["կիրակի","երկուշաբթի","երեքշաբթի","չորեքշաբթի","հինգշաբթի","ուրբաթ","շաբաթ"]},defaultWidth:"wide"}),dayPeriod:Ra({values:{narrow:{am:"a",pm:"p",midnight:"կեսգշ",noon:"կեսօր",morning:"առավոտ",afternoon:"ցերեկ",evening:"երեկո",night:"գիշեր"},abbreviated:{am:"AM",pm:"PM",midnight:"կեսգիշեր",noon:"կեսօր",morning:"առավոտ",afternoon:"ցերեկ",evening:"երեկո",night:"գիշեր"},wide:{am:"a.m.",pm:"p.m.",midnight:"կեսգիշեր",noon:"կեսօր",morning:"առավոտ",afternoon:"ցերեկ",evening:"երեկո",night:"գիշեր"}},defaultWidth:"wide",formattingValues:{narrow:{am:"a",pm:"p",midnight:"կեսգշ",noon:"կեսօր",morning:"առավոտը",afternoon:"ցերեկը",evening:"երեկոյան",night:"գիշերը"},abbreviated:{am:"AM",pm:"PM",midnight:"կեսգիշերին",noon:"կեսօրին",morning:"առավոտը",afternoon:"ցերեկը",evening:"երեկոյան",night:"գիշերը"},wide:{am:"a.m.",pm:"p.m.",midnight:"կեսգիշերին",noon:"կեսօրին",morning:"առավոտը",afternoon:"ցերեկը",evening:"երեկոյան",night:"գիշերը"}},defaultFormattingWidth:"wide"})},match:{ordinalNumber:$a({matchPattern:/^(\d+)((-|֊)?(ին|րդ))?/i,parsePattern:/\d+/i,valueCallback:function(e){return parseInt(e,10)}}),era:Fa({matchPatterns:{narrow:/^(Ք|Մ)/i,abbreviated:/^(Ք\.?\s?Ա\.?|Մ\.?\s?Թ\.?\s?Ա\.?|Մ\.?\s?Թ\.?|Ք\.?\s?Հ\.?)/i,wide:/^(քրիստոսից առաջ|մեր թվարկությունից առաջ|մեր թվարկության|քրիստոսից հետո)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^ք/i,/^մ/i]},defaultParseWidth:"any"}),quarter:Fa({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^ք[1234]/i,wide:/^[1234]((-|֊)?(ին|րդ)) քառորդ/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:function(e){return e+1}}),month:Fa({matchPatterns:{narrow:/^[հփմաօսնդ]/i,abbreviated:/^(հուն|փետ|մար|ապր|մայ|հուն|հուլ|օգս|սեպ|հոկ|նոյ|դեկ)/i,wide:/^(հունվար|փետրվար|մարտ|ապրիլ|մայիս|հունիս|հուլիս|օգոստոս|սեպտեմբեր|հոկտեմբեր|նոյեմբեր|դեկտեմբեր)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^հ/i,/^փ/i,/^մ/i,/^ա/i,/^մ/i,/^հ/i,/^հ/i,/^օ/i,/^ս/i,/^հ/i,/^ն/i,/^դ/i],any:[/^հու/i,/^փ/i,/^մար/i,/^ա/i,/^մայ/i,/^հուն/i,/^հուլ/i,/^օ/i,/^ս/i,/^հոկ/i,/^ն/i,/^դ/i]},defaultParseWidth:"any"}),day:Fa({matchPatterns:{narrow:/^[եչհոշկ]/i,short:/^(կր|եր|եք|չք|հգ|ուր|շբ)/i,abbreviated:/^(կիր|երկ|երք|չոր|հնգ|ուրբ|շաբ)/i,wide:/^(կիրակի|երկուշաբթի|երեքշաբթի|չորեքշաբթի|հինգշաբթի|ուրբաթ|շաբաթ)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^կ/i,/^ե/i,/^ե/i,/^չ/i,/^հ/i,/^(ո|Ո)/,/^շ/i],short:[/^կ/i,/^եր/i,/^եք/i,/^չ/i,/^հ/i,/^(ո|Ո)/,/^շ/i],abbreviated:[/^կ/i,/^երկ/i,/^երք/i,/^չ/i,/^հ/i,/^(ո|Ո)/,/^շ/i],wide:[/^կ/i,/^երկ/i,/^երե/i,/^չ/i,/^հ/i,/^(ո|Ո)/,/^շ/i]},defaultParseWidth:"wide"}),dayPeriod:Fa({matchPatterns:{narrow:/^([ap]|կեսգշ|կեսօր|(առավոտը?|ցերեկը?|երեկո(յան)?|գիշերը?))/i,any:/^([ap]\.?\s?m\.?|կեսգիշեր(ին)?|կեսօր(ին)?|(առավոտը?|ցերեկը?|երեկո(յան)?|գիշերը?))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/կեսգիշեր/i,noon:/կեսօր/i,morning:/առավոտ/i,afternoon:/ցերեկ/i,evening:/երեկո/i,night:/գիշեր/i}},defaultParseWidth:"any"})},options:{weekStartsOn:1,firstWeekContainsDate:1}},Bu={lessThanXSeconds:{one:"kurang dari 1 detik",other:"kurang dari {{count}} detik"},xSeconds:{one:"1 detik",other:"{{count}} detik"},halfAMinute:"setengah menit",lessThanXMinutes:{one:"kurang dari 1 menit",other:"kurang dari {{count}} menit"},xMinutes:{one:"1 menit",other:"{{count}} menit"},aboutXHours:{one:"sekitar 1 jam",other:"sekitar {{count}} jam"},xHours:{one:"1 jam",other:"{{count}} jam"},xDays:{one:"1 hari",other:"{{count}} hari"},aboutXWeeks:{one:"sekitar 1 minggu",other:"sekitar {{count}} minggu"},xWeeks:{one:"1 minggu",other:"{{count}} minggu"},aboutXMonths:{one:"sekitar 1 bulan",other:"sekitar {{count}} bulan"},xMonths:{one:"1 bulan",other:"{{count}} bulan"},aboutXYears:{one:"sekitar 1 tahun",other:"sekitar {{count}} tahun"},xYears:{one:"1 tahun",other:"{{count}} tahun"},overXYears:{one:"lebih dari 1 tahun",other:"lebih dari {{count}} tahun"},almostXYears:{one:"hampir 1 tahun",other:"hampir {{count}} tahun"}},Vu=function(e,t,a){var n,i=Bu[e];return n="string"==typeof i?i:1===t?i.one:i.other.replace("{{count}}",t.toString()),null!=a&&a.addSuffix?a.comparison&&a.comparison>0?"dalam waktu "+n:n+" yang lalu":n},Ku={date:Qa({formats:{full:"EEEE, d MMMM yyyy",long:"d MMMM yyyy",medium:"d MMM yyyy",short:"d/M/yyyy"},defaultWidth:"full"}),time:Qa({formats:{full:"HH.mm.ss",long:"HH.mm.ss",medium:"HH.mm",short:"HH.mm"},defaultWidth:"full"}),dateTime:Qa({formats:{full:"{{date}} 'pukul' {{time}}",long:"{{date}} 'pukul' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},Uu={lastWeek:"eeee 'lalu pukul' p",yesterday:"'Kemarin pukul' p",today:"'Hari ini pukul' p",tomorrow:"'Besok pukul' p",nextWeek:"eeee 'pukul' p",other:"P"},Gu={code:"id",formatDistance:Vu,formatLong:Ku,formatRelative:function(e,t,a,n){return Uu[e]},localize:{ordinalNumber:function(e,t){return"ke-"+Number(e)},era:Ra({values:{narrow:["SM","M"],abbreviated:["SM","M"],wide:["Sebelum Masehi","Masehi"]},defaultWidth:"wide"}),quarter:Ra({values:{narrow:["1","2","3","4"],abbreviated:["K1","K2","K3","K4"],wide:["Kuartal ke-1","Kuartal ke-2","Kuartal ke-3","Kuartal ke-4"]},defaultWidth:"wide",argumentCallback:function(e){return e-1}}),month:Ra({values:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","Mei","Jun","Jul","Agt","Sep","Okt","Nov","Des"],wide:["Januari","Februari","Maret","April","Mei","Juni","Juli","Agustus","September","Oktober","November","Desember"]},defaultWidth:"wide"}),day:Ra({values:{narrow:["M","S","S","R","K","J","S"],short:["Min","Sen","Sel","Rab","Kam","Jum","Sab"],abbreviated:["Min","Sen","Sel","Rab","Kam","Jum","Sab"],wide:["Minggu","Senin","Selasa","Rabu","Kamis","Jumat","Sabtu"]},defaultWidth:"wide"}),dayPeriod:Ra({values:{narrow:{am:"AM",pm:"PM",midnight:"tengah malam",noon:"tengah hari",morning:"pagi",afternoon:"siang",evening:"sore",night:"malam"},abbreviated:{am:"AM",pm:"PM",midnight:"tengah malam",noon:"tengah hari",morning:"pagi",afternoon:"siang",evening:"sore",night:"malam"},wide:{am:"AM",pm:"PM",midnight:"tengah malam",noon:"tengah hari",morning:"pagi",afternoon:"siang",evening:"sore",night:"malam"}},defaultWidth:"wide",formattingValues:{narrow:{am:"AM",pm:"PM",midnight:"tengah malam",noon:"tengah hari",morning:"pagi",afternoon:"siang",evening:"sore",night:"malam"},abbreviated:{am:"AM",pm:"PM",midnight:"tengah malam",noon:"tengah hari",morning:"pagi",afternoon:"siang",evening:"sore",night:"malam"},wide:{am:"AM",pm:"PM",midnight:"tengah malam",noon:"tengah hari",morning:"pagi",afternoon:"siang",evening:"sore",night:"malam"}},defaultFormattingWidth:"wide"})},match:{ordinalNumber:$a({matchPattern:/^ke-(\d+)?/i,parsePattern:/\d+/i,valueCallback:function(e){return parseInt(e,10)}}),era:Fa({matchPatterns:{narrow:/^(sm|m)/i,abbreviated:/^(s\.?\s?m\.?|s\.?\s?e\.?\s?u\.?|m\.?|e\.?\s?u\.?)/i,wide:/^(sebelum masehi|sebelum era umum|masehi|era umum)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^s/i,/^(m|e)/i]},defaultParseWidth:"any"}),quarter:Fa({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^K-?\s[1234]/i,wide:/^Kuartal ke-?\s?[1234]/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:function(e){return e+1}}),month:Fa({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|mei|jun|jul|agt|sep|okt|nov|des)/i,wide:/^(januari|februari|maret|april|mei|juni|juli|agustus|september|oktober|november|desember)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^ma/i,/^ap/i,/^me/i,/^jun/i,/^jul/i,/^ag/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:Fa({matchPatterns:{narrow:/^[srkjm]/i,short:/^(min|sen|sel|rab|kam|jum|sab)/i,abbreviated:/^(min|sen|sel|rab|kam|jum|sab)/i,wide:/^(minggu|senin|selasa|rabu|kamis|jumat|sabtu)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^m/i,/^s/i,/^s/i,/^r/i,/^k/i,/^j/i,/^s/i],any:[/^m/i,/^sen/i,/^sel/i,/^r/i,/^k/i,/^j/i,/^sa/i]},defaultParseWidth:"any"}),dayPeriod:Fa({matchPatterns:{narrow:/^(a|p|tengah m|tengah h|(di(\swaktu)?) (pagi|siang|sore|malam))/i,any:/^([ap]\.?\s?m\.?|tengah malam|tengah hari|(di(\swaktu)?) (pagi|siang|sore|malam))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^pm/i,midnight:/^tengah m/i,noon:/^tengah h/i,morning:/pagi/i,afternoon:/siang/i,evening:/sore/i,night:/malam/i}},defaultParseWidth:"any"})},options:{weekStartsOn:1,firstWeekContainsDate:1}},Ou={lessThanXSeconds:{one:"minna en 1 sekúnda",other:"minna en {{count}} sekúndur"},xSeconds:{one:"1 sekúnda",other:"{{count}} sekúndur"},halfAMinute:"hálf mínúta",lessThanXMinutes:{one:"minna en 1 mínúta",other:"minna en {{count}} mínútur"},xMinutes:{one:"1 mínúta",other:"{{count}} mínútur"},aboutXHours:{one:"u.þ.b. 1 klukkustund",other:"u.þ.b. {{count}} klukkustundir"},xHours:{one:"1 klukkustund",other:"{{count}} klukkustundir"},xDays:{one:"1 dagur",other:"{{count}} dagar"},aboutXWeeks:{one:"um viku",other:"um {{count}} vikur"},xWeeks:{one:"1 viku",other:"{{count}} vikur"},aboutXMonths:{one:"u.þ.b. 1 mánuður",other:"u.þ.b. {{count}} mánuðir"},xMonths:{one:"1 mánuður",other:"{{count}} mánuðir"},aboutXYears:{one:"u.þ.b. 1 ár",other:"u.þ.b. {{count}} ár"},xYears:{one:"1 ár",other:"{{count}} ár"},overXYears:{one:"meira en 1 ár",other:"meira en {{count}} ár"},almostXYears:{one:"næstum 1 ár",other:"næstum {{count}} ár"}},Qu=function(e,t,a){var n,i=Ou[e];return n="string"==typeof i?i:1===t?i.one:i.other.replace("{{count}}",t.toString()),null!=a&&a.addSuffix?a.comparison&&a.comparison>0?"í "+n:n+" síðan":n},Yu={date:Qa({formats:{full:"EEEE, do MMMM y",long:"do MMMM y",medium:"do MMM y",short:"d.MM.y"},defaultWidth:"full"}),time:Qa({formats:{full:"'kl'. HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},defaultWidth:"full"}),dateTime:Qa({formats:{full:"{{date}} 'kl.' {{time}}",long:"{{date}} 'kl.' {{time}}",medium:"{{date}} {{time}}",short:"{{date}} {{time}}"},defaultWidth:"full"})},qu={lastWeek:"'síðasta' dddd 'kl.' p",yesterday:"'í gær kl.' p",today:"'í dag kl.' p",tomorrow:"'á morgun kl.' p",nextWeek:"dddd 'kl.' p",other:"P"},Ju={code:"is",formatDistance:Qu,formatLong:Yu,formatRelative:function(e,t,a,n){return qu[e]},localize:{ordinalNumber:function(e,t){return Number(e)+"."},era:Ra({values:{narrow:["f.Kr.","e.Kr."],abbreviated:["f.Kr.","e.Kr."],wide:["fyrir Krist","eftir Krist"]},defaultWidth:"wide"}),quarter:Ra({values:{narrow:["1","2","3","4"],abbreviated:["1F","2F","3F","4F"],wide:["1. fjórðungur","2. fjórðungur","3. fjórðungur","4. fjórðungur"]},defaultWidth:"wide",argumentCallback:function(e){return e-1}}),month:Ra({values:{narrow:["J","F","M","A","M","J","J","Á","S","Ó","N","D"],abbreviated:["jan.","feb.","mars","apríl","maí","júní","júlí","ágúst","sept.","okt.","nóv.","des."],wide:["janúar","febrúar","mars","apríl","maí","júní","júlí","ágúst","september","október","nóvember","desember"]},defaultWidth:"wide"}),day:Ra({values:{narrow:["S","M","Þ","M","F","F","L"],short:["Su","Má","Þr","Mi","Fi","Fö","La"],abbreviated:["sun.","mán.","þri.","mið.","fim.","fös.","lau."],wide:["sunnudagur","mánudagur","þriðjudagur","miðvikudagur","fimmtudagur","föstudagur","laugardagur"]},defaultWidth:"wide"}),dayPeriod:Ra({values:{narrow:{am:"f",pm:"e",midnight:"miðnætti",noon:"hádegi",morning:"morgunn",afternoon:"síðdegi",evening:"kvöld",night:"nótt"},abbreviated:{am:"f.h.",pm:"e.h.",midnight:"miðnætti",noon:"hádegi",morning:"morgunn",afternoon:"síðdegi",evening:"kvöld",night:"nótt"},wide:{am:"fyrir hádegi",pm:"eftir hádegi",midnight:"miðnætti",noon:"hádegi",morning:"morgunn",afternoon:"síðdegi",evening:"kvöld",night:"nótt"}},defaultWidth:"wide",formattingValues:{narrow:{am:"f",pm:"e",midnight:"á miðnætti",noon:"á hádegi",morning:"að morgni",afternoon:"síðdegis",evening:"um kvöld",night:"um nótt"},abbreviated:{am:"f.h.",pm:"e.h.",midnight:"á miðnætti",noon:"á hádegi",morning:"að morgni",afternoon:"síðdegis",evening:"um kvöld",night:"um nótt"},wide:{am:"fyrir hádegi",pm:"eftir hádegi",midnight:"á miðnætti",noon:"á hádegi",morning:"að morgni",afternoon:"síðdegis",evening:"um kvöld",night:"um nótt"}},defaultFormattingWidth:"wide"})},match:{ordinalNumber:$a({matchPattern:/^(\d+)(\.)?/i,parsePattern:/\d+(\.)?/i,valueCallback:function(e){return parseInt(e,10)}}),era:Fa({matchPatterns:{narrow:/^(f\.Kr\.|e\.Kr\.)/i,abbreviated:/^(f\.Kr\.|e\.Kr\.)/i,wide:/^(fyrir Krist|eftir Krist)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^(f\.Kr\.)/i,/^(e\.Kr\.)/i]},defaultParseWidth:"any"}),quarter:Fa({matchPatterns:{narrow:/^[1234]\.?/i,abbreviated:/^q[1234]\.?/i,wide:/^[1234]\.? fjórðungur/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1\.?/i,/2\.?/i,/3\.?/i,/4\.?/i]},defaultParseWidth:"any",valueCallback:function(e){return e+1}}),month:Fa({matchPatterns:{narrow:/^[jfmásónd]/i,abbreviated:/^(jan\.|feb\.|mars\.|apríl\.|maí|júní|júlí|águst|sep\.|oct\.|nov\.|dec\.)/i,wide:/^(januar|febrúar|mars|apríl|maí|júní|júlí|águst|september|október|nóvember|desember)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^á/i,/^s/i,/^ó/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^maí/i,/^jún/i,/^júl/i,/^áu/i,/^s/i,/^ó/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:Fa({matchPatterns:{narrow:/^[smtwf]/i,short:/^(su|má|þr|mi|fi|fö|la)/i,abbreviated:/^(sun|mán|þri|mið|fim|fös|lau)\.?/i,wide:/^(sunnudagur|mánudagur|þriðjudagur|miðvikudagur|fimmtudagur|föstudagur|laugardagur)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^s/i,/^m/i,/^þ/i,/^m/i,/^f/i,/^f/i,/^l/i],any:[/^su/i,/^má/i,/^þr/i,/^mi/i,/^fi/i,/^fö/i,/^la/i]},defaultParseWidth:"any"}),dayPeriod:Fa({matchPatterns:{narrow:/^(f|e|síðdegis|(á|að|um) (morgni|kvöld|nótt|miðnætti))/i,any:/^(fyrir hádegi|eftir hádegi|[ef]\.?h\.?|síðdegis|morgunn|(á|að|um) (morgni|kvöld|nótt|miðnætti))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^f/i,pm:/^e/i,midnight:/^mi/i,noon:/^há/i,morning:/morgunn/i,afternoon:/síðdegi/i,evening:/kvöld/i,night:/nótt/i}},defaultParseWidth:"any"})},options:{weekStartsOn:1,firstWeekContainsDate:4}},Ru={lessThanXSeconds:{one:"meno di un secondo",other:"meno di {{count}} secondi"},xSeconds:{one:"un secondo",other:"{{count}} secondi"},halfAMinute:"alcuni secondi",lessThanXMinutes:{one:"meno di un minuto",other:"meno di {{count}} minuti"},xMinutes:{one:"un minuto",other:"{{count}} minuti"},aboutXHours:{one:"circa un'ora",other:"circa {{count}} ore"},xHours:{one:"un'ora",other:"{{count}} ore"},xDays:{one:"un giorno",other:"{{count}} giorni"},aboutXWeeks:{one:"circa una settimana",other:"circa {{count}} settimane"},xWeeks:{one:"una settimana",other:"{{count}} settimane"},aboutXMonths:{one:"circa un mese",other:"circa {{count}} mesi"},xMonths:{one:"un mese",other:"{{count}} mesi"},aboutXYears:{one:"circa un anno",other:"circa {{count}} anni"},xYears:{one:"un anno",other:"{{count}} anni"},overXYears:{one:"più di un anno",other:"più di {{count}} anni"},almostXYears:{one:"quasi un anno",other:"quasi {{count}} anni"}},Lu=function(e,t,a){var n,i=Ru[e];return n="string"==typeof i?i:1===t?i.one:i.other.replace("{{count}}",t.toString()),null!=a&&a.addSuffix?a.comparison&&a.comparison>0?"tra "+n:n+" fa":n},Fu={date:Qa({formats:{full:"EEEE d MMMM y",long:"d MMMM y",medium:"d MMM y",short:"dd/MM/y"},defaultWidth:"full"}),time:Qa({formats:{full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},defaultWidth:"full"}),dateTime:Qa({formats:{full:"{{date}} {{time}}",long:"{{date}} {{time}}",medium:"{{date}} {{time}}",short:"{{date}} {{time}}"},defaultWidth:"full"})},Zu=["domenica","lunedì","martedì","mercoledì","giovedì","venerdì","sabato"];function _u(e){return"'"+Zu[e]+" alle' p"}var $u={lastWeek:function(e,t,a){var n=e.getUTCDay();return yi(e,t,a)?_u(n):function(e){return 0===e?"'domenica scorsa alle' p":"'"+Zu[e]+" scorso alle' p"}(n)},yesterday:"'ieri alle' p",today:"'oggi alle' p",tomorrow:"'domani alle' p",nextWeek:function(e,t,a){var n=e.getUTCDay();return yi(e,t,a)?_u(n):function(e){return 0===e?"'domenica prossima alle' p":"'"+Zu[e]+" prossimo alle' p"}(n)},other:"P"},em=function(e,t,a,n){var i=$u[e];return"function"==typeof i?i(t,a,n):i},tm={ordinalNumber:function(e,t){var a=Number(e);return String(a)},era:Ra({values:{narrow:["aC","dC"],abbreviated:["a.C.","d.C."],wide:["avanti Cristo","dopo Cristo"]},defaultWidth:"wide"}),quarter:Ra({values:{narrow:["1","2","3","4"],abbreviated:["T1","T2","T3","T4"],wide:["1º trimestre","2º trimestre","3º trimestre","4º trimestre"]},defaultWidth:"wide",argumentCallback:function(e){return e-1}}),month:Ra({values:{narrow:["G","F","M","A","M","G","L","A","S","O","N","D"],abbreviated:["gen","feb","mar","apr","mag","giu","lug","ago","set","ott","nov","dic"],wide:["gennaio","febbraio","marzo","aprile","maggio","giugno","luglio","agosto","settembre","ottobre","novembre","dicembre"]},defaultWidth:"wide"}),day:Ra({values:{narrow:["D","L","M","M","G","V","S"],short:["dom","lun","mar","mer","gio","ven","sab"],abbreviated:["dom","lun","mar","mer","gio","ven","sab"],wide:["domenica","lunedì","martedì","mercoledì","giovedì","venerdì","sabato"]},defaultWidth:"wide"}),dayPeriod:Ra({values:{narrow:{am:"m.",pm:"p.",midnight:"mezzanotte",noon:"mezzogiorno",morning:"mattina",afternoon:"pomeriggio",evening:"sera",night:"notte"},abbreviated:{am:"AM",pm:"PM",midnight:"mezzanotte",noon:"mezzogiorno",morning:"mattina",afternoon:"pomeriggio",evening:"sera",night:"notte"},wide:{am:"AM",pm:"PM",midnight:"mezzanotte",noon:"mezzogiorno",morning:"mattina",afternoon:"pomeriggio",evening:"sera",night:"notte"}},defaultWidth:"wide",formattingValues:{narrow:{am:"m.",pm:"p.",midnight:"mezzanotte",noon:"mezzogiorno",morning:"di mattina",afternoon:"del pomeriggio",evening:"di sera",night:"di notte"},abbreviated:{am:"AM",pm:"PM",midnight:"mezzanotte",noon:"mezzogiorno",morning:"di mattina",afternoon:"del pomeriggio",evening:"di sera",night:"di notte"},wide:{am:"AM",pm:"PM",midnight:"mezzanotte",noon:"mezzogiorno",morning:"di mattina",afternoon:"del pomeriggio",evening:"di sera",night:"di notte"}},defaultFormattingWidth:"wide"})},am={ordinalNumber:$a({matchPattern:/^(\d+)(º)?/i,parsePattern:/\d+/i,valueCallback:function(e){return parseInt(e,10)}}),era:Fa({matchPatterns:{narrow:/^(aC|dC)/i,abbreviated:/^(a\.?\s?C\.?|a\.?\s?e\.?\s?v\.?|d\.?\s?C\.?|e\.?\s?v\.?)/i,wide:/^(avanti Cristo|avanti Era Volgare|dopo Cristo|Era Volgare)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^a/i,/^(d|e)/i]},defaultParseWidth:"any"}),quarter:Fa({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^t[1234]/i,wide:/^[1234](º)? trimestre/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:function(e){return e+1}}),month:Fa({matchPatterns:{narrow:/^[gfmalsond]/i,abbreviated:/^(gen|feb|mar|apr|mag|giu|lug|ago|set|ott|nov|dic)/i,wide:/^(gennaio|febbraio|marzo|aprile|maggio|giugno|luglio|agosto|settembre|ottobre|novembre|dicembre)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^g/i,/^f/i,/^m/i,/^a/i,/^m/i,/^g/i,/^l/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ge/i,/^f/i,/^mar/i,/^ap/i,/^mag/i,/^gi/i,/^l/i,/^ag/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:Fa({matchPatterns:{narrow:/^[dlmgvs]/i,short:/^(do|lu|ma|me|gi|ve|sa)/i,abbreviated:/^(dom|lun|mar|mer|gio|ven|sab)/i,wide:/^(domenica|luned[i|ì]|marted[i|ì]|mercoled[i|ì]|gioved[i|ì]|venerd[i|ì]|sabato)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^d/i,/^l/i,/^m/i,/^m/i,/^g/i,/^v/i,/^s/i],any:[/^d/i,/^l/i,/^ma/i,/^me/i,/^g/i,/^v/i,/^s/i]},defaultParseWidth:"any"}),dayPeriod:Fa({matchPatterns:{narrow:/^(a|m\.|p|mezzanotte|mezzogiorno|(di|del) (mattina|pomeriggio|sera|notte))/i,any:/^([ap]\.?\s?m\.?|mezzanotte|mezzogiorno|(di|del) (mattina|pomeriggio|sera|notte))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mezza/i,noon:/^mezzo/i,morning:/mattina/i,afternoon:/pomeriggio/i,evening:/sera/i,night:/notte/i}},defaultParseWidth:"any"})},nm={code:"it",formatDistance:Lu,formatLong:Fu,formatRelative:em,localize:tm,match:am,options:{weekStartsOn:1,firstWeekContainsDate:4}},im={code:"it-CH",formatDistance:Lu,formatLong:{date:Qa({formats:{full:"EEEE d MMMM y",long:"d MMMM y",medium:"d MMM y",short:"dd.MM.y"},defaultWidth:"full"}),time:Qa({formats:{full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},defaultWidth:"full"}),dateTime:Qa({formats:{full:"{{date}} {{time}}",long:"{{date}} {{time}}",medium:"{{date}} {{time}}",short:"{{date}} {{time}}"},defaultWidth:"full"})},formatRelative:em,localize:tm,match:am,options:{weekStartsOn:1,firstWeekContainsDate:4}},rm={lessThanXSeconds:{one:"1秒未満",other:"{{count}}秒未満",oneWithSuffix:"約1秒",otherWithSuffix:"約{{count}}秒"},xSeconds:{one:"1秒",other:"{{count}}秒"},halfAMinute:"30秒",lessThanXMinutes:{one:"1分未満",other:"{{count}}分未満",oneWithSuffix:"約1分",otherWithSuffix:"約{{count}}分"},xMinutes:{one:"1分",other:"{{count}}分"},aboutXHours:{one:"約1時間",other:"約{{count}}時間"},xHours:{one:"1時間",other:"{{count}}時間"},xDays:{one:"1日",other:"{{count}}日"},aboutXWeeks:{one:"約1週間",other:"約{{count}}週間"},xWeeks:{one:"1週間",other:"{{count}}週間"},aboutXMonths:{one:"約1か月",other:"約{{count}}か月"},xMonths:{one:"1か月",other:"{{count}}か月"},aboutXYears:{one:"約1年",other:"約{{count}}年"},xYears:{one:"1年",other:"{{count}}年"},overXYears:{one:"1年以上",other:"{{count}}年以上"},almostXYears:{one:"1年近く",other:"{{count}}年近く"}},om=function(e,t,a){var n;a=a||{};var i=rm[e];return n="string"==typeof i?i:1===t?a.addSuffix&&i.oneWithSuffix?i.oneWithSuffix:i.one:a.addSuffix&&i.otherWithSuffix?i.otherWithSuffix.replace("{{count}}",String(t)):i.other.replace("{{count}}",String(t)),a.addSuffix?a.comparison&&a.comparison>0?n+"後":n+"前":n},dm={date:Qa({formats:{full:"y年M月d日EEEE",long:"y年M月d日",medium:"y/MM/dd",short:"y/MM/dd"},defaultWidth:"full"}),time:Qa({formats:{full:"H時mm分ss秒 zzzz",long:"H:mm:ss z",medium:"H:mm:ss",short:"H:mm"},defaultWidth:"full"}),dateTime:Qa({formats:{full:"{{date}} {{time}}",long:"{{date}} {{time}}",medium:"{{date}} {{time}}",short:"{{date}} {{time}}"},defaultWidth:"full"})},sm={lastWeek:"先週のeeeeのp",yesterday:"昨日のp",today:"今日のp",tomorrow:"明日のp",nextWeek:"翌週のeeeeのp",other:"P"},um={code:"ja",formatDistance:om,formatLong:dm,formatRelative:function(e,t,a,n){return sm[e]},localize:{ordinalNumber:function(e,t){var a=Number(e);switch(String(null==t?void 0:t.unit)){case"year":return"".concat(a,"年");case"quarter":return"第".concat(a,"四半期");case"month":return"".concat(a,"月");case"week":return"第".concat(a,"週");case"date":return"".concat(a,"日");case"hour":return"".concat(a,"時");case"minute":return"".concat(a,"分");case"second":return"".concat(a,"秒");default:return"".concat(a)}},era:Ra({values:{narrow:["BC","AC"],abbreviated:["紀元前","西暦"],wide:["紀元前","西暦"]},defaultWidth:"wide"}),quarter:Ra({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["第1四半期","第2四半期","第3四半期","第4四半期"]},defaultWidth:"wide",argumentCallback:function(e){return Number(e)-1}}),month:Ra({values:{narrow:["1","2","3","4","5","6","7","8","9","10","11","12"],abbreviated:["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],wide:["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"]},defaultWidth:"wide"}),day:Ra({values:{narrow:["日","月","火","水","木","金","土"],short:["日","月","火","水","木","金","土"],abbreviated:["日","月","火","水","木","金","土"],wide:["日曜日","月曜日","火曜日","水曜日","木曜日","金曜日","土曜日"]},defaultWidth:"wide"}),dayPeriod:Ra({values:{narrow:{am:"午前",pm:"午後",midnight:"深夜",noon:"正午",morning:"朝",afternoon:"午後",evening:"夜",night:"深夜"},abbreviated:{am:"午前",pm:"午後",midnight:"深夜",noon:"正午",morning:"朝",afternoon:"午後",evening:"夜",night:"深夜"},wide:{am:"午前",pm:"午後",midnight:"深夜",noon:"正午",morning:"朝",afternoon:"午後",evening:"夜",night:"深夜"}},defaultWidth:"wide",formattingValues:{narrow:{am:"午前",pm:"午後",midnight:"深夜",noon:"正午",morning:"朝",afternoon:"午後",evening:"夜",night:"深夜"},abbreviated:{am:"午前",pm:"午後",midnight:"深夜",noon:"正午",morning:"朝",afternoon:"午後",evening:"夜",night:"深夜"},wide:{am:"午前",pm:"午後",midnight:"深夜",noon:"正午",morning:"朝",afternoon:"午後",evening:"夜",night:"深夜"}},defaultFormattingWidth:"wide"})},match:{ordinalNumber:$a({matchPattern:/^第?\d+(年|四半期|月|週|日|時|分|秒)?/i,parsePattern:/\d+/i,valueCallback:function(e){return parseInt(e,10)}}),era:Fa({matchPatterns:{narrow:/^(B\.?C\.?|A\.?D\.?)/i,abbreviated:/^(紀元[前後]|西暦)/i,wide:/^(紀元[前後]|西暦)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^B/i,/^A/i],any:[/^(紀元前)/i,/^(西暦|紀元後)/i]},defaultParseWidth:"any"}),quarter:Fa({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^Q[1234]/i,wide:/^第[1234一二三四1234]四半期/i},defaultMatchWidth:"wide",parsePatterns:{any:[/(1|一|1)/i,/(2|二|2)/i,/(3|三|3)/i,/(4|四|4)/i]},defaultParseWidth:"any",valueCallback:function(e){return e+1}}),month:Fa({matchPatterns:{narrow:/^([123456789]|1[012])/,abbreviated:/^([123456789]|1[012])月/i,wide:/^([123456789]|1[012])月/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^1\D/,/^2/,/^3/,/^4/,/^5/,/^6/,/^7/,/^8/,/^9/,/^10/,/^11/,/^12/]},defaultParseWidth:"any"}),day:Fa({matchPatterns:{narrow:/^[日月火水木金土]/,short:/^[日月火水木金土]/,abbreviated:/^[日月火水木金土]/,wide:/^[日月火水木金土]曜日/},defaultMatchWidth:"wide",parsePatterns:{any:[/^日/,/^月/,/^火/,/^水/,/^木/,/^金/,/^土/]},defaultParseWidth:"any"}),dayPeriod:Fa({matchPatterns:{any:/^(AM|PM|午前|午後|正午|深夜|真夜中|夜|朝)/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^(A|午前)/i,pm:/^(P|午後)/i,midnight:/^深夜|真夜中/i,noon:/^正午/i,morning:/^朝/i,afternoon:/^午後/i,evening:/^夜/i,night:/^深夜/i}},defaultParseWidth:"any"})},options:{weekStartsOn:0,firstWeekContainsDate:1}},mm={lessThanXSeconds:{one:"1びょうみまん",other:"{{count}}びょうみまん",oneWithSuffix:"やく1びょう",otherWithSuffix:"やく{{count}}びょう"},xSeconds:{one:"1びょう",other:"{{count}}びょう"},halfAMinute:"30びょう",lessThanXMinutes:{one:"1ぷんみまん",other:"{{count}}ふんみまん",oneWithSuffix:"やく1ぷん",otherWithSuffix:"やく{{count}}ふん"},xMinutes:{one:"1ぷん",other:"{{count}}ふん"},aboutXHours:{one:"やく1じかん",other:"やく{{count}}じかん"},xHours:{one:"1じかん",other:"{{count}}じかん"},xDays:{one:"1にち",other:"{{count}}にち"},aboutXWeeks:{one:"やく1しゅうかん",other:"やく{{count}}しゅうかん"},xWeeks:{one:"1しゅうかん",other:"{{count}}しゅうかん"},aboutXMonths:{one:"やく1かげつ",other:"やく{{count}}かげつ"},xMonths:{one:"1かげつ",other:"{{count}}かげつ"},aboutXYears:{one:"やく1ねん",other:"やく{{count}}ねん"},xYears:{one:"1ねん",other:"{{count}}ねん"},overXYears:{one:"1ねんいじょう",other:"{{count}}ねんいじょう"},almostXYears:{one:"1ねんちかく",other:"{{count}}ねんちかく"}},lm=function(e,t,a){var n;a=a||{};var i=mm[e];return n="string"==typeof i?i:1===t?a.addSuffix&&i.oneWithSuffix?i.oneWithSuffix:i.one:a.addSuffix&&i.otherWithSuffix?i.otherWithSuffix.replace("{{count}}",String(t)):i.other.replace("{{count}}",String(t)),a.addSuffix?a.comparison&&a.comparison>0?n+"あと":n+"まえ":n},hm={date:Qa({formats:{full:"yねんMがつdにちEEEE",long:"yねんMがつdにち",medium:"y/MM/dd",short:"y/MM/dd"},defaultWidth:"full"}),time:Qa({formats:{full:"Hじmmふんssびょう zzzz",long:"H:mm:ss z",medium:"H:mm:ss",short:"H:mm"},defaultWidth:"full"}),dateTime:Qa({formats:{full:"{{date}} {{time}}",long:"{{date}} {{time}}",medium:"{{date}} {{time}}",short:"{{date}} {{time}}"},defaultWidth:"full"})},cm={lastWeek:"せんしゅうのeeeeのp",yesterday:"きのうのp",today:"きょうのp",tomorrow:"あしたのp",nextWeek:"よくしゅうのeeeeのp",other:"P"},fm={code:"ja-Hira",formatDistance:lm,formatLong:hm,formatRelative:function(e,t,a,n){return cm[e]},localize:{ordinalNumber:function(e,t){var a=Number(e);switch(String(null==t?void 0:t.unit)){case"year":return"".concat(a,"ねん");case"quarter":return"だい".concat(a,"しはんき");case"month":return"".concat(a,"がつ");case"week":return"だい".concat(a,"しゅう");case"date":return"".concat(a,"にち");case"hour":return"".concat(a,"じ");case"minute":return"".concat(a,"ふん");case"second":return"".concat(a,"びょう");default:return"".concat(a)}},era:Ra({values:{narrow:["BC","AC"],abbreviated:["きげんぜん","せいれき"],wide:["きげんぜん","せいれき"]},defaultWidth:"wide"}),quarter:Ra({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["だい1しはんき","だい2しはんき","だい3しはんき","だい4しはんき"]},defaultWidth:"wide",argumentCallback:function(e){return Number(e)-1}}),month:Ra({values:{narrow:["1","2","3","4","5","6","7","8","9","10","11","12"],abbreviated:["1がつ","2がつ","3がつ","4がつ","5がつ","6がつ","7がつ","8がつ","9がつ","10がつ","11がつ","12がつ"],wide:["1がつ","2がつ","3がつ","4がつ","5がつ","6がつ","7がつ","8がつ","9がつ","10がつ","11がつ","12がつ"]},defaultWidth:"wide"}),day:Ra({values:{narrow:["にち","げつ","か","すい","もく","きん","ど"],short:["にち","げつ","か","すい","もく","きん","ど"],abbreviated:["にち","げつ","か","すい","もく","きん","ど"],wide:["にちようび","げつようび","かようび","すいようび","もくようび","きんようび","どようび"]},defaultWidth:"wide"}),dayPeriod:Ra({values:{narrow:{am:"ごぜん",pm:"ごご",midnight:"しんや",noon:"しょうご",morning:"あさ",afternoon:"ごご",evening:"よる",night:"しんや"},abbreviated:{am:"ごぜん",pm:"ごご",midnight:"しんや",noon:"しょうご",morning:"あさ",afternoon:"ごご",evening:"よる",night:"しんや"},wide:{am:"ごぜん",pm:"ごご",midnight:"しんや",noon:"しょうご",morning:"あさ",afternoon:"ごご",evening:"よる",night:"しんや"}},defaultWidth:"wide",formattingValues:{narrow:{am:"ごぜん",pm:"ごご",midnight:"しんや",noon:"しょうご",morning:"あさ",afternoon:"ごご",evening:"よる",night:"しんや"},abbreviated:{am:"ごぜん",pm:"ごご",midnight:"しんや",noon:"しょうご",morning:"あさ",afternoon:"ごご",evening:"よる",night:"しんや"},wide:{am:"ごぜん",pm:"ごご",midnight:"しんや",noon:"しょうご",morning:"あさ",afternoon:"ごご",evening:"よる",night:"しんや"}},defaultFormattingWidth:"wide"})},match:{ordinalNumber:$a({matchPattern:/^だ?い?\d+(ねん|しはんき|がつ|しゅう|にち|じ|ふん|びょう)?/i,parsePattern:/\d+/i,valueCallback:function(e){return parseInt(e,10)}}),era:Fa({matchPatterns:{narrow:/^(B\.?C\.?|A\.?D\.?)/i,abbreviated:/^(きげん[前後]|せいれき)/i,wide:/^(きげん[前後]|せいれき)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^B/i,/^A/i],any:[/^(きげんぜん)/i,/^(せいれき|きげんご)/i]},defaultParseWidth:"any"}),quarter:Fa({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^Q[1234]/i,wide:/^だい[1234一二三四1234]しはんき/i},defaultMatchWidth:"wide",parsePatterns:{any:[/(1|一|1)/i,/(2|二|2)/i,/(3|三|3)/i,/(4|四|4)/i]},defaultParseWidth:"any",valueCallback:function(e){return e+1}}),month:Fa({matchPatterns:{narrow:/^([123456789]|1[012])/,abbreviated:/^([123456789]|1[012])がつ/i,wide:/^([123456789]|1[012])がつ/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^1\D/,/^2/,/^3/,/^4/,/^5/,/^6/,/^7/,/^8/,/^9/,/^10/,/^11/,/^12/]},defaultParseWidth:"any"}),day:Fa({matchPatterns:{narrow:/^(にち|げつ|か|すい|もく|きん|ど)/,short:/^(にち|げつ|か|すい|もく|きん|ど)/,abbreviated:/^(にち|げつ|か|すい|もく|きん|ど)/,wide:/^(にち|げつ|か|すい|もく|きん|ど)ようび/},defaultMatchWidth:"wide",parsePatterns:{any:[/^にち/,/^げつ/,/^か/,/^すい/,/^もく/,/^きん/,/^ど/]},defaultParseWidth:"any"}),dayPeriod:Fa({matchPatterns:{any:/^(AM|PM|ごぜん|ごご|しょうご|しんや|まよなか|よる|あさ)/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^(A|ごぜん)/i,pm:/^(P|ごご)/i,midnight:/^しんや|まよなか/i,noon:/^しょうご/i,morning:/^あさ/i,afternoon:/^ごご/i,evening:/^よる/i,night:/^しんや/i}},defaultParseWidth:"any"})},options:{weekStartsOn:0,firstWeekContainsDate:1}},gm={lessThanXSeconds:{past:"{{count}} წამზე ნაკლები ხნის წინ",present:"{{count}} წამზე ნაკლები",future:"{{count}} წამზე ნაკლებში"},xSeconds:{past:"{{count}} წამის წინ",present:"{{count}} წამი",future:"{{count}} წამში"},halfAMinute:{past:"ნახევარი წუთის წინ",present:"ნახევარი წუთი",future:"ნახევარი წუთში"},lessThanXMinutes:{past:"{{count}} წუთზე ნაკლები ხნის წინ",present:"{{count}} წუთზე ნაკლები",future:"{{count}} წუთზე ნაკლებში"},xMinutes:{past:"{{count}} წუთის წინ",present:"{{count}} წუთი",future:"{{count}} წუთში"},aboutXHours:{past:"დაახლოებით {{count}} საათის წინ",present:"დაახლოებით {{count}} საათი",future:"დაახლოებით {{count}} საათში"},xHours:{past:"{{count}} საათის წინ",present:"{{count}} საათი",future:"{{count}} საათში"},xDays:{past:"{{count}} დღის წინ",present:"{{count}} დღე",future:"{{count}} დღეში"},aboutXWeeks:{past:"დაახლოებით {{count}} კვირას წინ",present:"დაახლოებით {{count}} კვირა",future:"დაახლოებით {{count}} კვირაში"},xWeeks:{past:"{{count}} კვირას კვირა",present:"{{count}} კვირა",future:"{{count}} კვირაში"},aboutXMonths:{past:"დაახლოებით {{count}} თვის წინ",present:"დაახლოებით {{count}} თვე",future:"დაახლოებით {{count}} თვეში"},xMonths:{past:"{{count}} თვის წინ",present:"{{count}} თვე",future:"{{count}} თვეში"},aboutXYears:{past:"დაახლოებით {{count}} წლის წინ",present:"დაახლოებით {{count}} წელი",future:"დაახლოებით {{count}} წელში"},xYears:{past:"{{count}} წლის წინ",present:"{{count}} წელი",future:"{{count}} წელში"},overXYears:{past:"{{count}} წელზე მეტი ხნის წინ",present:"{{count}} წელზე მეტი",future:"{{count}} წელზე მეტი ხნის შემდეგ"},almostXYears:{past:"თითქმის {{count}} წლის წინ",present:"თითქმის {{count}} წელი",future:"თითქმის {{count}} წელში"}},pm=function(e,t,a){var n=gm[e];return"string"==typeof n?n:null!=a&&a.addSuffix&&a.comparison&&a.comparison>0?n.future.replace("{{count}}",String(t)):null!=a&&a.addSuffix?n.past.replace("{{count}}",String(t)):n.present.replace("{{count}}",String(t))},vm={date:Qa({formats:{full:"EEEE, do MMMM, y",long:"do, MMMM, y",medium:"d, MMM, y",short:"dd/MM/yyyy"},defaultWidth:"full"}),time:Qa({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:Qa({formats:{full:"{{date}} {{time}}'-ზე'",long:"{{date}} {{time}}'-ზე'",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},bm={lastWeek:"'წინა' eeee p'-ზე'",yesterday:"'გუშინ' p'-ზე'",today:"'დღეს' p'-ზე'",tomorrow:"'ხვალ' p'-ზე'",nextWeek:"'შემდეგი' eeee p'-ზე'",other:"P"},wm={code:"ka",formatDistance:pm,formatLong:vm,formatRelative:function(e,t,a,n){return bm[e]},localize:{ordinalNumber:function(e){var t=Number(e);return 1===t?t+"-ლი":t+"-ე"},era:Ra({values:{narrow:["ჩ.წ-მდე","ჩ.წ"],abbreviated:["ჩვ.წ-მდე","ჩვ.წ"],wide:["ჩვენს წელთაღრიცხვამდე","ჩვენი წელთაღრიცხვით"]},defaultWidth:"wide"}),quarter:Ra({values:{narrow:["1","2","3","4"],abbreviated:["1-ლი კვ","2-ე კვ","3-ე კვ","4-ე კვ"],wide:["1-ლი კვარტალი","2-ე კვარტალი","3-ე კვარტალი","4-ე კვარტალი"]},defaultWidth:"wide",argumentCallback:function(e){return e-1}}),month:Ra({values:{narrow:["ია","თე","მა","აპ","მს","ვნ","ვლ","აგ","სე","ოქ","ნო","დე"],abbreviated:["იან","თებ","მარ","აპრ","მაი","ივნ","ივლ","აგვ","სექ","ოქტ","ნოე","დეკ"],wide:["იანვარი","თებერვალი","მარტი","აპრილი","მაისი","ივნისი","ივლისი","აგვისტო","სექტემბერი","ოქტომბერი","ნოემბერი","დეკემბერი"]},defaultWidth:"wide"}),day:Ra({values:{narrow:["კვ","ორ","სა","ოთ","ხუ","პა","შა"],short:["კვი","ორშ","სამ","ოთხ","ხუთ","პარ","შაბ"],abbreviated:["კვი","ორშ","სამ","ოთხ","ხუთ","პარ","შაბ"],wide:["კვირა","ორშაბათი","სამშაბათი","ოთხშაბათი","ხუთშაბათი","პარასკევი","შაბათი"]},defaultWidth:"wide"}),dayPeriod:Ra({values:{narrow:{am:"a",pm:"p",midnight:"შუაღამე",noon:"შუადღე",morning:"დილა",afternoon:"საღამო",evening:"საღამო",night:"ღამე"},abbreviated:{am:"AM",pm:"PM",midnight:"შუაღამე",noon:"შუადღე",morning:"დილა",afternoon:"საღამო",evening:"საღამო",night:"ღამე"},wide:{am:"a.m.",pm:"p.m.",midnight:"შუაღამე",noon:"შუადღე",morning:"დილა",afternoon:"საღამო",evening:"საღამო",night:"ღამე"}},defaultWidth:"wide",formattingValues:{narrow:{am:"a",pm:"p",midnight:"შუაღამით",noon:"შუადღისას",morning:"დილით",afternoon:"ნაშუადღევს",evening:"საღამოს",night:"ღამით"},abbreviated:{am:"AM",pm:"PM",midnight:"შუაღამით",noon:"შუადღისას",morning:"დილით",afternoon:"ნაშუადღევს",evening:"საღამოს",night:"ღამით"},wide:{am:"a.m.",pm:"p.m.",midnight:"შუაღამით",noon:"შუადღისას",morning:"დილით",afternoon:"ნაშუადღევს",evening:"საღამოს",night:"ღამით"}},defaultFormattingWidth:"wide"})},match:{ordinalNumber:$a({matchPattern:/^(\d+)(-ლი|-ე)?/i,parsePattern:/\d+/i,valueCallback:function(e){return parseInt(e,10)}}),era:Fa({matchPatterns:{narrow:/^(ჩვ?\.წ)/i,abbreviated:/^(ჩვ?\.წ)/i,wide:/^(ჩვენს წელთაღრიცხვამდე|ქრისტეშობამდე|ჩვენი წელთაღრიცხვით|ქრისტეშობიდან)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^(ჩვენს წელთაღრიცხვამდე|ქრისტეშობამდე)/i,/^(ჩვენი წელთაღრიცხვით|ქრისტეშობიდან)/i]},defaultParseWidth:"any"}),quarter:Fa({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^[1234]-(ლი|ე)? კვ/i,wide:/^[1234]-(ლი|ე)? კვარტალი/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:function(e){return e+1}}),month:Fa({matchPatterns:{any:/^(ია|თე|მა|აპ|მს|ვნ|ვლ|აგ|სე|ოქ|ნო|დე)/i},defaultMatchWidth:"any",parsePatterns:{any:[/^ია/i,/^თ/i,/^მარ/i,/^აპ/i,/^მაი/i,/^ი?ვნ/i,/^ი?ვლ/i,/^აგ/i,/^ს/i,/^ო/i,/^ნ/i,/^დ/i]},defaultParseWidth:"any"}),day:Fa({matchPatterns:{narrow:/^(კვ|ორ|სა|ოთ|ხუ|პა|შა)/i,short:/^(კვი|ორშ|სამ|ოთხ|ხუთ|პარ|შაბ)/i,wide:/^(კვირა|ორშაბათი|სამშაბათი|ოთხშაბათი|ხუთშაბათი|პარასკევი|შაბათი)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^კვ/i,/^ორ/i,/^სა/i,/^ოთ/i,/^ხუ/i,/^პა/i,/^შა/i]},defaultParseWidth:"any"}),dayPeriod:Fa({matchPatterns:{any:/^([ap]\.?\s?m\.?|შუაღ|დილ)/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^შუაღ/i,noon:/^შუადღ/i,morning:/^დილ/i,afternoon:/ნაშუადღევს/i,evening:/საღამო/i,night:/ღამ/i}},defaultParseWidth:"any"})},options:{weekStartsOn:1,firstWeekContainsDate:1}},ym={lessThanXSeconds:{regular:{one:"1 секундтан аз",singularNominative:"{{count}} секундтан аз",singularGenitive:"{{count}} секундтан аз",pluralGenitive:"{{count}} секундтан аз"},future:{one:"бір секундтан кейін",singularNominative:"{{count}} секундтан кейін",singularGenitive:"{{count}} секундтан кейін",pluralGenitive:"{{count}} секундтан кейін"}},xSeconds:{regular:{singularNominative:"{{count}} секунд",singularGenitive:"{{count}} секунд",pluralGenitive:"{{count}} секунд"},past:{singularNominative:"{{count}} секунд бұрын",singularGenitive:"{{count}} секунд бұрын",pluralGenitive:"{{count}} секунд бұрын"},future:{singularNominative:"{{count}} секундтан кейін",singularGenitive:"{{count}} секундтан кейін",pluralGenitive:"{{count}} секундтан кейін"}},halfAMinute:function(e){return null!=e&&e.addSuffix?e.comparison&&e.comparison>0?"жарты минут ішінде":"жарты минут бұрын":"жарты минут"},lessThanXMinutes:{regular:{one:"1 минуттан аз",singularNominative:"{{count}} минуттан аз",singularGenitive:"{{count}} минуттан аз",pluralGenitive:"{{count}} минуттан аз"},future:{one:"минуттан кем ",singularNominative:"{{count}} минуттан кем",singularGenitive:"{{count}} минуттан кем",pluralGenitive:"{{count}} минуттан кем"}},xMinutes:{regular:{singularNominative:"{{count}} минут",singularGenitive:"{{count}} минут",pluralGenitive:"{{count}} минут"},past:{singularNominative:"{{count}} минут бұрын",singularGenitive:"{{count}} минут бұрын",pluralGenitive:"{{count}} минут бұрын"},future:{singularNominative:"{{count}} минуттан кейін",singularGenitive:"{{count}} минуттан кейін",pluralGenitive:"{{count}} минуттан кейін"}},aboutXHours:{regular:{singularNominative:"шамамен {{count}} сағат",singularGenitive:"шамамен {{count}} сағат",pluralGenitive:"шамамен {{count}} сағат"},future:{singularNominative:"шамамен {{count}} сағаттан кейін",singularGenitive:"шамамен {{count}} сағаттан кейін",pluralGenitive:"шамамен {{count}} сағаттан кейін"}},xHours:{regular:{singularNominative:"{{count}} сағат",singularGenitive:"{{count}} сағат",pluralGenitive:"{{count}} сағат"}},xDays:{regular:{singularNominative:"{{count}} күн",singularGenitive:"{{count}} күн",pluralGenitive:"{{count}} күн"},future:{singularNominative:"{{count}} күннен кейін",singularGenitive:"{{count}} күннен кейін",pluralGenitive:"{{count}} күннен кейін"}},aboutXWeeks:{type:"weeks",one:"шамамен 1 апта",other:"шамамен {{count}} апта"},xWeeks:{type:"weeks",one:"1 апта",other:"{{count}} апта"},aboutXMonths:{regular:{singularNominative:"шамамен {{count}} ай",singularGenitive:"шамамен {{count}} ай",pluralGenitive:"шамамен {{count}} ай"},future:{singularNominative:"шамамен {{count}} айдан кейін",singularGenitive:"шамамен {{count}} айдан кейін",pluralGenitive:"шамамен {{count}} айдан кейін"}},xMonths:{regular:{singularNominative:"{{count}} ай",singularGenitive:"{{count}} ай",pluralGenitive:"{{count}} ай"}},aboutXYears:{regular:{singularNominative:"шамамен {{count}} жыл",singularGenitive:"шамамен {{count}} жыл",pluralGenitive:"шамамен {{count}} жыл"},future:{singularNominative:"шамамен {{count}} жылдан кейін",singularGenitive:"шамамен {{count}} жылдан кейін",pluralGenitive:"шамамен {{count}} жылдан кейін"}},xYears:{regular:{singularNominative:"{{count}} жыл",singularGenitive:"{{count}} жыл",pluralGenitive:"{{count}} жыл"},future:{singularNominative:"{{count}} жылдан кейін",singularGenitive:"{{count}} жылдан кейін",pluralGenitive:"{{count}} жылдан кейін"}},overXYears:{regular:{singularNominative:"{{count}} жылдан астам",singularGenitive:"{{count}} жылдан астам",pluralGenitive:"{{count}} жылдан астам"},future:{singularNominative:"{{count}} жылдан астам",singularGenitive:"{{count}} жылдан астам",pluralGenitive:"{{count}} жылдан астам"}},almostXYears:{regular:{singularNominative:"{{count}} жылға жақын",singularGenitive:"{{count}} жылға жақын",pluralGenitive:"{{count}} жылға жақын"},future:{singularNominative:"{{count}} жылдан кейін",singularGenitive:"{{count}} жылдан кейін",pluralGenitive:"{{count}} жылдан кейін"}}};function Am(e,t){if(e.one&&1===t)return e.one;var a=t%10,n=t%100;return 1===a&&11!==n?e.singularNominative.replace("{{count}}",String(t)):a>=2&&a<=4&&(n<10||n>20)?e.singularGenitive.replace("{{count}}",String(t)):e.pluralGenitive.replace("{{count}}",String(t))}var km=function(e,t,a){var n=ym[e];return"function"==typeof n?n(a):"weeks"===n.type?1===t?n.one:n.other.replace("{{count}}",String(t)):null!=a&&a.addSuffix?a.comparison&&a.comparison>0?n.future?Am(n.future,t):Am(n.regular,t)+" кейін":n.past?Am(n.past,t):Am(n.regular,t)+" бұрын":Am(n.regular,t)},Mm={date:Qa({formats:{full:"EEEE, do MMMM y 'ж.'",long:"do MMMM y 'ж.'",medium:"d MMM y 'ж.'",short:"dd.MM.yyyy"},defaultWidth:"full"}),time:Qa({formats:{full:"H:mm:ss zzzz",long:"H:mm:ss z",medium:"H:mm:ss",short:"H:mm"},defaultWidth:"full"}),dateTime:Qa({formats:{any:"{{date}}, {{time}}"},defaultWidth:"any"})},Pm=["жексенбіде","дүйсенбіде","сейсенбіде","сәрсенбіде","бейсенбіде","жұмада","сенбіде"];function Wm(e){return"'"+Pm[e]+" сағат' p'-де'"}var xm={lastWeek:function(e,t,a){var n=e.getUTCDay();return yi(e,t,a)?Wm(n):function(e){return"'өткен "+Pm[e]+" сағат' p'-де'"}(n)},yesterday:"'кеше сағат' p'-де'",today:"'бүгін сағат' p'-де'",tomorrow:"'ертең сағат' p'-де'",nextWeek:function(e,t,a){var n=e.getUTCDay();return yi(e,t,a)?Wm(n):function(e){return"'келесі "+Pm[e]+" сағат' p'-де'"}(n)},other:"P"},zm=function(e,t,a,n){var i=xm[e];return"function"==typeof i?i(t,a,n):i},jm={0:"-ші",1:"-ші",2:"-ші",3:"-ші",4:"-ші",5:"-ші",6:"-шы",7:"-ші",8:"-ші",9:"-шы",10:"-шы",20:"-шы",30:"-шы",40:"-шы",50:"-ші",60:"-шы",70:"-ші",80:"-ші",90:"-шы",100:"-ші"},Cm={ordinalNumber:function(e,t){var a=Number(e),n=a>=100?100:null;return a+(jm[a]||jm[a%10]||n&&jm[n]||"")},era:Ra({values:{narrow:["б.з.д.","б.з."],abbreviated:["б.з.д.","б.з."],wide:["біздің заманымызға дейін","біздің заманымыз"]},defaultWidth:"wide"}),quarter:Ra({values:{narrow:["1","2","3","4"],abbreviated:["1-ші тоқ.","2-ші тоқ.","3-ші тоқ.","4-ші тоқ."],wide:["1-ші тоқсан","2-ші тоқсан","3-ші тоқсан","4-ші тоқсан"]},defaultWidth:"wide",argumentCallback:function(e){return e-1}}),month:Ra({values:{narrow:["Қ","А","Н","С","М","М","Ш","Т","Қ","Қ","Қ","Ж"],abbreviated:["қаң","ақп","нау","сәу","мам","мау","шіл","там","қыр","қаз","қар","жел"],wide:["қаңтар","ақпан","наурыз","сәуір","мамыр","маусым","шілде","тамыз","қыркүйек","қазан","қараша","желтоқсан"]},defaultWidth:"wide",formattingValues:{narrow:["Қ","А","Н","С","М","М","Ш","Т","Қ","Қ","Қ","Ж"],abbreviated:["қаң","ақп","нау","сәу","мам","мау","шіл","там","қыр","қаз","қар","жел"],wide:["қаңтар","ақпан","наурыз","сәуір","мамыр","маусым","шілде","тамыз","қыркүйек","қазан","қараша","желтоқсан"]},defaultFormattingWidth:"wide"}),day:Ra({values:{narrow:["Ж","Д","С","С","Б","Ж","С"],short:["жс","дс","сс","ср","бс","жм","сб"],abbreviated:["жс","дс","сс","ср","бс","жм","сб"],wide:["жексенбі","дүйсенбі","сейсенбі","сәрсенбі","бейсенбі","жұма","сенбі"]},defaultWidth:"wide"}),dayPeriod:Ra({values:{narrow:{am:"ТД",pm:"ТК",midnight:"түн ортасы",noon:"түс",morning:"таң",afternoon:"күндіз",evening:"кеш",night:"түн"},wide:{am:"ТД",pm:"ТК",midnight:"түн ортасы",noon:"түс",morning:"таң",afternoon:"күндіз",evening:"кеш",night:"түн"}},defaultWidth:"any",formattingValues:{narrow:{am:"ТД",pm:"ТК",midnight:"түн ортасында",noon:"түс",morning:"таң",afternoon:"күн",evening:"кеш",night:"түн"},wide:{am:"ТД",pm:"ТК",midnight:"түн ортасында",noon:"түсте",morning:"таңертең",afternoon:"күндіз",evening:"кеште",night:"түнде"}},defaultFormattingWidth:"wide"})},Tm={code:"kk",formatDistance:km,formatLong:Mm,formatRelative:zm,localize:Cm,match:{ordinalNumber:$a({matchPattern:/^(\d+)(-?(ші|шы))?/i,parsePattern:/\d+/i,valueCallback:function(e){return parseInt(e,10)}}),era:Fa({matchPatterns:{narrow:/^((б )?з\.?\s?д\.?)/i,abbreviated:/^((б )?з\.?\s?д\.?)/i,wide:/^(біздің заманымызға дейін|біздің заманымыз|біздің заманымыздан)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^б/i,/^з/i]},defaultParseWidth:"any"}),quarter:Fa({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^[1234](-?ші)? тоқ.?/i,wide:/^[1234](-?ші)? тоқсан/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:function(e){return e+1}}),month:Fa({matchPatterns:{narrow:/^(қ|а|н|с|м|мау|ш|т|қыр|қаз|қар|ж)/i,abbreviated:/^(қаң|ақп|нау|сәу|мам|мау|шіл|там|қыр|қаз|қар|жел)/i,wide:/^(қаңтар|ақпан|наурыз|сәуір|мамыр|маусым|шілде|тамыз|қыркүйек|қазан|қараша|желтоқсан)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^қ/i,/^а/i,/^н/i,/^с/i,/^м/i,/^м/i,/^ш/i,/^т/i,/^қ/i,/^қ/i,/^қ/i,/^ж/i],abbreviated:[/^қаң/i,/^ақп/i,/^нау/i,/^сәу/i,/^мам/i,/^мау/i,/^шіл/i,/^там/i,/^қыр/i,/^қаз/i,/^қар/i,/^жел/i],any:[/^қ/i,/^а/i,/^н/i,/^с/i,/^м/i,/^м/i,/^ш/i,/^т/i,/^қ/i,/^қ/i,/^қ/i,/^ж/i]},defaultParseWidth:"any"}),day:Fa({matchPatterns:{narrow:/^(ж|д|с|с|б|ж|с)/i,short:/^(жс|дс|сс|ср|бс|жм|сб)/i,wide:/^(жексенбі|дүйсенбі|сейсенбі|сәрсенбі|бейсенбі|жұма|сенбі)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^ж/i,/^д/i,/^с/i,/^с/i,/^б/i,/^ж/i,/^с/i],short:[/^жс/i,/^дс/i,/^сс/i,/^ср/i,/^бс/i,/^жм/i,/^сб/i],any:[/^ж[ек]/i,/^д[үй]/i,/^сe[й]/i,/^сә[р]/i,/^б[ей]/i,/^ж[ұм]/i,/^се[н]/i]},defaultParseWidth:"any"}),dayPeriod:Fa({matchPatterns:{narrow:/^Т\.?\s?[ДК]\.?|түн ортасында|((түсте|таңертең|таңда|таңертең|таңмен|таң|күндіз|күн|кеште|кеш|түнде|түн)\.?)/i,wide:/^Т\.?\s?[ДК]\.?|түн ортасында|((түсте|таңертең|таңда|таңертең|таңмен|таң|күндіз|күн|кеште|кеш|түнде|түн)\.?)/i,any:/^Т\.?\s?[ДК]\.?|түн ортасында|((түсте|таңертең|таңда|таңертең|таңмен|таң|күндіз|күн|кеште|кеш|түнде|түн)\.?)/i},defaultMatchWidth:"wide",parsePatterns:{any:{am:/^ТД/i,pm:/^ТК/i,midnight:/^түн орта/i,noon:/^күндіз/i,morning:/таң/i,afternoon:/түс/i,evening:/кеш/i,night:/түн/i}},defaultParseWidth:"any"})},options:{weekStartsOn:1,firstWeekContainsDate:1}},Sm={lessThanXSeconds:"តិចជាង {{count}} វិនាទី",xSeconds:"{{count}} វិនាទី",halfAMinute:"កន្លះនាទី",lessThanXMinutes:"តិចជាង {{count}} នាទី",xMinutes:"{{count}} នាទី",aboutXHours:"ប្រហែល {{count}} ម៉ោង",xHours:"{{count}} ម៉ោង",xDays:"{{count}} ថ្ងៃ",aboutXWeeks:"ប្រហែល {{count}} សប្តាហ៍",xWeeks:"{{count}} សប្តាហ៍",aboutXMonths:"ប្រហែល {{count}} ខែ",xMonths:"{{count}} ខែ",aboutXYears:"ប្រហែល {{count}} ឆ្នាំ",xYears:"{{count}} ឆ្នាំ",overXYears:"ជាង {{count}} ឆ្នាំ",almostXYears:"ជិត {{count}} ឆ្នាំ"},Hm=function(e,t,a){var n=Sm[e];return"number"==typeof t&&(n=n.replace("{{count}}",t.toString())),null!=a&&a.addSuffix?a.comparison&&a.comparison>0?"ក្នុងរយៈពេល "+n:n+"មុន":n},Dm={date:Qa({formats:{full:"EEEE do MMMM y",long:"do MMMM y",medium:"d MMM y",short:"dd/MM/yyyy"},defaultWidth:"full"}),time:Qa({formats:{full:"h:mm:ss a",long:"h:mm:ss a",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:Qa({formats:{full:"{{date}} 'ម៉ោង' {{time}}",long:"{{date}} 'ម៉ោង' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},Nm={lastWeek:"'ថ្ងៃ'eeee'ស​ប្តា​ហ៍​មុនម៉ោង' p",yesterday:"'ម្សិលមិញនៅម៉ោង' p",today:"'ថ្ងៃនេះម៉ោង' p",tomorrow:"'ថ្ងៃស្អែកម៉ោង' p",nextWeek:"'ថ្ងៃ'eeee'ស​ប្តា​ហ៍​ក្រោយម៉ោង' p",other:"P"},Xm={code:"km",formatDistance:Hm,formatLong:Dm,formatRelative:function(e,t,a,n){return Nm[e]},localize:{ordinalNumber:function(e,t){return Number(e).toString()},era:Ra({values:{narrow:["ម.គស","គស"],abbreviated:["មុនគ.ស","គ.ស"],wide:["មុនគ្រិស្តសករាជ","នៃគ្រិស្តសករាជ"]},defaultWidth:"wide"}),quarter:Ra({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["ត្រីមាសទី 1","ត្រីមាសទី 2","ត្រីមាសទី 3","ត្រីមាសទី 4"]},defaultWidth:"wide",argumentCallback:function(e){return e-1}}),month:Ra({values:{narrow:["ម.ក","ក.ម","មិ","ម.ស","ឧ.ស","ម.ថ","ក.ដ","សី","កញ","តុ","វិ","ធ"],abbreviated:["មករា","កុម្ភៈ","មីនា","មេសា","ឧសភា","មិថុនា","កក្កដា","សីហា","កញ្ញា","តុលា","វិច្ឆិកា","ធ្នូ"],wide:["មករា","កុម្ភៈ","មីនា","មេសា","ឧសភា","មិថុនា","កក្កដា","សីហា","កញ្ញា","តុលា","វិច្ឆិកា","ធ្នូ"]},defaultWidth:"wide"}),day:Ra({values:{narrow:["អា","ច","អ","ព","ព្រ","សុ","ស"],short:["អា","ច","អ","ព","ព្រ","សុ","ស"],abbreviated:["អា","ច","អ","ព","ព្រ","សុ","ស"],wide:["អាទិត្យ","ចន្ទ","អង្គារ","ពុធ","ព្រហស្បតិ៍","សុក្រ","សៅរ៍"]},defaultWidth:"wide"}),dayPeriod:Ra({values:{narrow:{am:"ព្រឹក",pm:"ល្ងាច",midnight:"​ពេលកណ្ដាលអធ្រាត្រ",noon:"ពេលថ្ងៃត្រង់",morning:"ពេលព្រឹក",afternoon:"ពេលរសៀល",evening:"ពេលល្ងាច",night:"ពេលយប់"},abbreviated:{am:"ព្រឹក",pm:"ល្ងាច",midnight:"​ពេលកណ្ដាលអធ្រាត្រ",noon:"ពេលថ្ងៃត្រង់",morning:"ពេលព្រឹក",afternoon:"ពេលរសៀល",evening:"ពេលល្ងាច",night:"ពេលយប់"},wide:{am:"ព្រឹក",pm:"ល្ងាច",midnight:"​ពេលកណ្ដាលអធ្រាត្រ",noon:"ពេលថ្ងៃត្រង់",morning:"ពេលព្រឹក",afternoon:"ពេលរសៀល",evening:"ពេលល្ងាច",night:"ពេលយប់"}},defaultWidth:"wide",formattingValues:{narrow:{am:"ព្រឹក",pm:"ល្ងាច",midnight:"​ពេលកណ្ដាលអធ្រាត្រ",noon:"ពេលថ្ងៃត្រង់",morning:"ពេលព្រឹក",afternoon:"ពេលរសៀល",evening:"ពេលល្ងាច",night:"ពេលយប់"},abbreviated:{am:"ព្រឹក",pm:"ល្ងាច",midnight:"​ពេលកណ្ដាលអធ្រាត្រ",noon:"ពេលថ្ងៃត្រង់",morning:"ពេលព្រឹក",afternoon:"ពេលរសៀល",evening:"ពេលល្ងាច",night:"ពេលយប់"},wide:{am:"ព្រឹក",pm:"ល្ងាច",midnight:"​ពេលកណ្ដាលអធ្រាត្រ",noon:"ពេលថ្ងៃត្រង់",morning:"ពេលព្រឹក",afternoon:"ពេលរសៀល",evening:"ពេលល្ងាច",night:"ពេលយប់"}},defaultFormattingWidth:"wide"})},match:{ordinalNumber:$a({matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:function(e){return parseInt(e,10)}}),era:Fa({matchPatterns:{narrow:/^(ម\.)?គស/i,abbreviated:/^(មុន)?គ\.ស/i,wide:/^(មុន|នៃ)គ្រិស្តសករាជ/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^(ម|មុន)គ\.?ស/i,/^(នៃ)?គ\.?ស/i]},defaultParseWidth:"any"}),quarter:Fa({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^(ត្រីមាស)(ទី)?\s?[1234]/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:function(e){return e+1}}),month:Fa({matchPatterns:{narrow:/^(ម\.ក|ក\.ម|មិ|ម\.ស|ឧ\.ស|ម\.ថ|ក\.ដ|សី|កញ|តុ|វិ|ធ)/i,abbreviated:/^(មករា|កុម្ភៈ|មីនា|មេសា|ឧសភា|មិថុនា|កក្កដា|សីហា|កញ្ញា|តុលា|វិច្ឆិកា|ធ្នូ)/i,wide:/^(មករា|កុម្ភៈ|មីនា|មេសា|ឧសភា|មិថុនា|កក្កដា|សីហា|កញ្ញា|តុលា|វិច្ឆិកា|ធ្នូ)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^ម\.ក/i,/^ក\.ម/i,/^មិ/i,/^ម\.ស/i,/^ឧ\.ស/i,/^ម\.ថ/i,/^ក\.ដ/i,/^សី/i,/^កញ/i,/^តុ/i,/^វិ/i,/^ធ/i],any:[/^មក/i,/^កុ/i,/^មីន/i,/^មេ/i,/^ឧស/i,/^មិថ/i,/^កក/i,/^សី/i,/^កញ/i,/^តុ/i,/^វិច/i,/^ធ/i]},defaultParseWidth:"any"}),day:Fa({matchPatterns:{narrow:/^(អា|ច|អ|ព|ព្រ|សុ|ស)/i,short:/^(អា|ច|អ|ព|ព្រ|សុ|ស)/i,abbreviated:/^(អា|ច|អ|ព|ព្រ|សុ|ស)/i,wide:/^(អាទិត្យ|ចន្ទ|អង្គារ|ពុធ|ព្រហស្បតិ៍|សុក្រ|សៅរ៍)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^អា/i,/^ច/i,/^អ/i,/^ព/i,/^ព្រ/i,/^សុ/i,/^ស/i],any:[/^អា/i,/^ច/i,/^អ/i,/^ព/i,/^ព្រ/i,/^សុ/i,/^សៅ/i]},defaultParseWidth:"any"}),dayPeriod:Fa({matchPatterns:{narrow:/^(ព្រឹក|ល្ងាច|ពេលព្រឹក|ពេលថ្ងៃត្រង់|ពេលល្ងាច|ពេលរសៀល|ពេលយប់|ពេលកណ្ដាលអធ្រាត្រ)/i,any:/^(ព្រឹក|ល្ងាច|ពេលព្រឹក|ពេលថ្ងៃត្រង់|ពេលល្ងាច|ពេលរសៀល|ពេលយប់|ពេលកណ្ដាលអធ្រាត្រ)/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^ព្រឹក/i,pm:/^ល្ងាច/i,midnight:/^ពេលកណ្ដាលអធ្រាត្រ/i,noon:/^ពេលថ្ងៃត្រង់/i,morning:/ពេលព្រឹក/i,afternoon:/ពេលរសៀល/i,evening:/ពេលល្ងាច/i,night:/ពេលយប់/i}},defaultParseWidth:"any"})},options:{weekStartsOn:0,firstWeekContainsDate:1}},Im={lessThanXSeconds:{one:{default:"1 ಸೆಕೆಂಡ್‌ಗಿಂತ ಕಡಿಮೆ",future:"1 ಸೆಕೆಂಡ್‌ಗಿಂತ ಕಡಿಮೆ",past:"1 ಸೆಕೆಂಡ್‌ಗಿಂತ ಕಡಿಮೆ"},other:{default:"{{count}} ಸೆಕೆಂಡ್‌ಗಿಂತ ಕಡಿಮೆ",future:"{{count}} ಸೆಕೆಂಡ್‌ಗಿಂತ ಕಡಿಮೆ",past:"{{count}} ಸೆಕೆಂಡ್‌ಗಿಂತ ಕಡಿಮೆ"}},xSeconds:{one:{default:"1 ಸೆಕೆಂಡ್",future:"1 ಸೆಕೆಂಡ್‌ನಲ್ಲಿ",past:"1 ಸೆಕೆಂಡ್ ಹಿಂದೆ"},other:{default:"{{count}} ಸೆಕೆಂಡುಗಳು",future:"{{count}} ಸೆಕೆಂಡ್‌ಗಳಲ್ಲಿ",past:"{{count}} ಸೆಕೆಂಡ್ ಹಿಂದೆ"}},halfAMinute:{other:{default:"ಅರ್ಧ ನಿಮಿಷ",future:"ಅರ್ಧ ನಿಮಿಷದಲ್ಲಿ",past:"ಅರ್ಧ ನಿಮಿಷದ ಹಿಂದೆ"}},lessThanXMinutes:{one:{default:"1 ನಿಮಿಷಕ್ಕಿಂತ ಕಡಿಮೆ",future:"1 ನಿಮಿಷಕ್ಕಿಂತ ಕಡಿಮೆ",past:"1 ನಿಮಿಷಕ್ಕಿಂತ ಕಡಿಮೆ"},other:{default:"{{count}} ನಿಮಿಷಕ್ಕಿಂತ ಕಡಿಮೆ",future:"{{count}} ನಿಮಿಷಕ್ಕಿಂತ ಕಡಿಮೆ",past:"{{count}} ನಿಮಿಷಕ್ಕಿಂತ ಕಡಿಮೆ"}},xMinutes:{one:{default:"1 ನಿಮಿಷ",future:"1 ನಿಮಿಷದಲ್ಲಿ",past:"1 ನಿಮಿಷದ ಹಿಂದೆ"},other:{default:"{{count}} ನಿಮಿಷಗಳು",future:"{{count}} ನಿಮಿಷಗಳಲ್ಲಿ",past:"{{count}} ನಿಮಿಷಗಳ ಹಿಂದೆ"}},aboutXHours:{one:{default:"ಸುಮಾರು 1 ಗಂಟೆ",future:"ಸುಮಾರು 1 ಗಂಟೆಯಲ್ಲಿ",past:"ಸುಮಾರು 1 ಗಂಟೆ ಹಿಂದೆ"},other:{default:"ಸುಮಾರು {{count}} ಗಂಟೆಗಳು",future:"ಸುಮಾರು {{count}} ಗಂಟೆಗಳಲ್ಲಿ",past:"ಸುಮಾರು {{count}} ಗಂಟೆಗಳ ಹಿಂದೆ"}},xHours:{one:{default:"1 ಗಂಟೆ",future:"1 ಗಂಟೆಯಲ್ಲಿ",past:"1 ಗಂಟೆ ಹಿಂದೆ"},other:{default:"{{count}} ಗಂಟೆಗಳು",future:"{{count}} ಗಂಟೆಗಳಲ್ಲಿ",past:"{{count}} ಗಂಟೆಗಳ ಹಿಂದೆ"}},xDays:{one:{default:"1 ದಿನ",future:"1 ದಿನದಲ್ಲಿ",past:"1 ದಿನದ ಹಿಂದೆ"},other:{default:"{{count}} ದಿನಗಳು",future:"{{count}} ದಿನಗಳಲ್ಲಿ",past:"{{count}} ದಿನಗಳ ಹಿಂದೆ"}},aboutXMonths:{one:{default:"ಸುಮಾರು 1 ತಿಂಗಳು",future:"ಸುಮಾರು 1 ತಿಂಗಳಲ್ಲಿ",past:"ಸುಮಾರು 1 ತಿಂಗಳ ಹಿಂದೆ"},other:{default:"ಸುಮಾರು {{count}} ತಿಂಗಳು",future:"ಸುಮಾರು {{count}} ತಿಂಗಳುಗಳಲ್ಲಿ",past:"ಸುಮಾರು {{count}} ತಿಂಗಳುಗಳ ಹಿಂದೆ"}},xMonths:{one:{default:"1 ತಿಂಗಳು",future:"1 ತಿಂಗಳಲ್ಲಿ",past:"1 ತಿಂಗಳ ಹಿಂದೆ"},other:{default:"{{count}} ತಿಂಗಳು",future:"{{count}} ತಿಂಗಳುಗಳಲ್ಲಿ",past:"{{count}} ತಿಂಗಳುಗಳ ಹಿಂದೆ"}},aboutXYears:{one:{default:"ಸುಮಾರು 1 ವರ್ಷ",future:"ಸುಮಾರು 1 ವರ್ಷದಲ್ಲಿ",past:"ಸುಮಾರು 1 ವರ್ಷದ ಹಿಂದೆ"},other:{default:"ಸುಮಾರು {{count}} ವರ್ಷಗಳು",future:"ಸುಮಾರು {{count}} ವರ್ಷಗಳಲ್ಲಿ",past:"ಸುಮಾರು {{count}} ವರ್ಷಗಳ ಹಿಂದೆ"}},xYears:{one:{default:"1 ವರ್ಷ",future:"1 ವರ್ಷದಲ್ಲಿ",past:"1 ವರ್ಷದ ಹಿಂದೆ"},other:{default:"{{count}} ವರ್ಷಗಳು",future:"{{count}} ವರ್ಷಗಳಲ್ಲಿ",past:"{{count}} ವರ್ಷಗಳ ಹಿಂದೆ"}},overXYears:{one:{default:"1 ವರ್ಷದ ಮೇಲೆ",future:"1 ವರ್ಷದ ಮೇಲೆ",past:"1 ವರ್ಷದ ಮೇಲೆ"},other:{default:"{{count}} ವರ್ಷಗಳ ಮೇಲೆ",future:"{{count}} ವರ್ಷಗಳ ಮೇಲೆ",past:"{{count}} ವರ್ಷಗಳ ಮೇಲೆ"}},almostXYears:{one:{default:"ಬಹುತೇಕ 1 ವರ್ಷದಲ್ಲಿ",future:"ಬಹುತೇಕ 1 ವರ್ಷದಲ್ಲಿ",past:"ಬಹುತೇಕ 1 ವರ್ಷದಲ್ಲಿ"},other:{default:"ಬಹುತೇಕ {{count}} ವರ್ಷಗಳಲ್ಲಿ",future:"ಬಹುತೇಕ {{count}} ವರ್ಷಗಳಲ್ಲಿ",past:"ಬಹುತೇಕ {{count}} ವರ್ಷಗಳಲ್ಲಿ"}}};function Em(e,t){return null!=t&&t.addSuffix?t.comparison&&t.comparison>0?e.future:e.past:e.default}var Bm=function(e,t,a){var n=Im[e];return(n.one&&1===t?Em(n.one,a):Em(n.other,a)).replace("{{count}}",String(t))},Vm={date:Qa({formats:{full:"EEEE, MMMM d, y",long:"MMMM d, y",medium:"MMM d, y",short:"d/M/yy"},defaultWidth:"full"}),time:Qa({formats:{full:"hh:mm:ss a zzzz",long:"hh:mm:ss a z",medium:"hh:mm:ss a",short:"hh:mm a"},defaultWidth:"full"}),dateTime:Qa({formats:{full:"{{date}} {{time}}",long:"{{date}} {{time}}",medium:"{{date}} {{time}}",short:"{{date}} {{time}}"},defaultWidth:"full"})},Km={lastWeek:"'ಕಳೆದ' eeee p 'ಕ್ಕೆ'",yesterday:"'ನಿನ್ನೆ' p 'ಕ್ಕೆ'",today:"'ಇಂದು' p 'ಕ್ಕೆ'",tomorrow:"'ನಾಳೆ' p 'ಕ್ಕೆ'",nextWeek:"eeee p 'ಕ್ಕೆ'",other:"P"},Um={code:"kn",formatDistance:Bm,formatLong:Vm,formatRelative:function(e,t,a,n){return Km[e]},localize:{ordinalNumber:function(e,t){return Number(e)+"ನೇ"},era:Ra({values:{narrow:["ಕ್ರಿ.ಪೂ","ಕ್ರಿ.ಶ"],abbreviated:["ಕ್ರಿ.ಪೂ","ಕ್ರಿ.ಶ"],wide:["ಕ್ರಿಸ್ತ ಪೂರ್ವ","ಕ್ರಿಸ್ತ ಶಕ"]},defaultWidth:"wide"}),quarter:Ra({values:{narrow:["1","2","3","4"],abbreviated:["ತ್ರೈ 1","ತ್ರೈ 2","ತ್ರೈ 3","ತ್ರೈ 4"],wide:["1ನೇ ತ್ರೈಮಾಸಿಕ","2ನೇ ತ್ರೈಮಾಸಿಕ","3ನೇ ತ್ರೈಮಾಸಿಕ","4ನೇ ತ್ರೈಮಾಸಿಕ"]},defaultWidth:"wide",argumentCallback:function(e){return e-1}}),month:Ra({values:{narrow:["ಜ","ಫೆ","ಮಾ","ಏ","ಮೇ","ಜೂ","ಜು","ಆ","ಸೆ","ಅ","ನ","ಡಿ"],abbreviated:["ಜನ","ಫೆಬ್ರ","ಮಾರ್ಚ್","ಏಪ್ರಿ","ಮೇ","ಜೂನ್","ಜುಲೈ","ಆಗ","ಸೆಪ್ಟೆಂ","ಅಕ್ಟೋ","ನವೆಂ","ಡಿಸೆಂ"],wide:["ಜನವರಿ","ಫೆಬ್ರವರಿ","ಮಾರ್ಚ್","ಏಪ್ರಿಲ್","ಮೇ","ಜೂನ್","ಜುಲೈ","ಆಗಸ್ಟ್","ಸೆಪ್ಟೆಂಬರ್","ಅಕ್ಟೋಬರ್","ನವೆಂಬರ್","ಡಿಸೆಂಬರ್"]},defaultWidth:"wide"}),day:Ra({values:{narrow:["ಭಾ","ಸೋ","ಮಂ","ಬು","ಗು","ಶು","ಶ"],short:["ಭಾನು","ಸೋಮ","ಮಂಗಳ","ಬುಧ","ಗುರು","ಶುಕ್ರ","ಶನಿ"],abbreviated:["ಭಾನು","ಸೋಮ","ಮಂಗಳ","ಬುಧ","ಗುರು","ಶುಕ್ರ","ಶನಿ"],wide:["ಭಾನುವಾರ","ಸೋಮವಾರ","ಮಂಗಳವಾರ","ಬುಧವಾರ","ಗುರುವಾರ","ಶುಕ್ರವಾರ","ಶನಿವಾರ"]},defaultWidth:"wide"}),dayPeriod:Ra({values:{narrow:{am:"ಪೂರ್ವಾಹ್ನ",pm:"ಅಪರಾಹ್ನ",midnight:"ಮಧ್ಯರಾತ್ರಿ",noon:"ಮಧ್ಯಾಹ್ನ",morning:"ಬೆಳಗ್ಗೆ",afternoon:"ಮಧ್ಯಾಹ್ನ",evening:"ಸಂಜೆ",night:"ರಾತ್ರಿ"},abbreviated:{am:"ಪೂರ್ವಾಹ್ನ",pm:"ಅಪರಾಹ್ನ",midnight:"ಮಧ್ಯರಾತ್ರಿ",noon:"ಮಧ್ಯಾನ್ಹ",morning:"ಬೆಳಗ್ಗೆ",afternoon:"ಮಧ್ಯಾನ್ಹ",evening:"ಸಂಜೆ",night:"ರಾತ್ರಿ"},wide:{am:"ಪೂರ್ವಾಹ್ನ",pm:"ಅಪರಾಹ್ನ",midnight:"ಮಧ್ಯರಾತ್ರಿ",noon:"ಮಧ್ಯಾನ್ಹ",morning:"ಬೆಳಗ್ಗೆ",afternoon:"ಮಧ್ಯಾನ್ಹ",evening:"ಸಂಜೆ",night:"ರಾತ್ರಿ"}},defaultWidth:"wide",formattingValues:{narrow:{am:"ಪೂ",pm:"ಅ",midnight:"ಮಧ್ಯರಾತ್ರಿ",noon:"ಮಧ್ಯಾನ್ಹ",morning:"ಬೆಳಗ್ಗೆ",afternoon:"ಮಧ್ಯಾನ್ಹ",evening:"ಸಂಜೆ",night:"ರಾತ್ರಿ"},abbreviated:{am:"ಪೂರ್ವಾಹ್ನ",pm:"ಅಪರಾಹ್ನ",midnight:"ಮಧ್ಯ ರಾತ್ರಿ",noon:"ಮಧ್ಯಾನ್ಹ",morning:"ಬೆಳಗ್ಗೆ",afternoon:"ಮಧ್ಯಾನ್ಹ",evening:"ಸಂಜೆ",night:"ರಾತ್ರಿ"},wide:{am:"ಪೂರ್ವಾಹ್ನ",pm:"ಅಪರಾಹ್ನ",midnight:"ಮಧ್ಯ ರಾತ್ರಿ",noon:"ಮಧ್ಯಾನ್ಹ",morning:"ಬೆಳಗ್ಗೆ",afternoon:"ಮಧ್ಯಾನ್ಹ",evening:"ಸಂಜೆ",night:"ರಾತ್ರಿ"}},defaultFormattingWidth:"wide"})},match:{ordinalNumber:$a({matchPattern:/^(\d+)(ನೇ|ನೆ)?/i,parsePattern:/\d+/i,valueCallback:function(e){return parseInt(e,10)}}),era:Fa({matchPatterns:{narrow:/^(ಕ್ರಿ.ಪೂ|ಕ್ರಿ.ಶ)/i,abbreviated:/^(ಕ್ರಿ\.?\s?ಪೂ\.?|ಕ್ರಿ\.?\s?ಶ\.?|ಪ್ರ\.?\s?ಶ\.?)/i,wide:/^(ಕ್ರಿಸ್ತ ಪೂರ್ವ|ಕ್ರಿಸ್ತ ಶಕ|ಪ್ರಸಕ್ತ ಶಕ)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^ಪೂ/i,/^(ಶ|ಪ್ರ)/i]},defaultParseWidth:"any"}),quarter:Fa({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^ತ್ರೈ[1234]|ತ್ರೈ [1234]| [1234]ತ್ರೈ/i,wide:/^[1234](ನೇ)? ತ್ರೈಮಾಸಿಕ/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:function(e){return e+1}}),month:Fa({matchPatterns:{narrow:/^(ಜೂ|ಜು|ಜ|ಫೆ|ಮಾ|ಏ|ಮೇ|ಆ|ಸೆ|ಅ|ನ|ಡಿ)/i,abbreviated:/^(ಜನ|ಫೆಬ್ರ|ಮಾರ್ಚ್|ಏಪ್ರಿ|ಮೇ|ಜೂನ್|ಜುಲೈ|ಆಗ|ಸೆಪ್ಟೆಂ|ಅಕ್ಟೋ|ನವೆಂ|ಡಿಸೆಂ)/i,wide:/^(ಜನವರಿ|ಫೆಬ್ರವರಿ|ಮಾರ್ಚ್|ಏಪ್ರಿಲ್|ಮೇ|ಜೂನ್|ಜುಲೈ|ಆಗಸ್ಟ್|ಸೆಪ್ಟೆಂಬರ್|ಅಕ್ಟೋಬರ್|ನವೆಂಬರ್|ಡಿಸೆಂಬರ್)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^ಜ$/i,/^ಫೆ/i,/^ಮಾ/i,/^ಏ/i,/^ಮೇ/i,/^ಜೂ/i,/^ಜು$/i,/^ಆ/i,/^ಸೆ/i,/^ಅ/i,/^ನ/i,/^ಡಿ/i],any:[/^ಜನ/i,/^ಫೆ/i,/^ಮಾ/i,/^ಏ/i,/^ಮೇ/i,/^ಜೂನ್/i,/^ಜುಲೈ/i,/^ಆ/i,/^ಸೆ/i,/^ಅ/i,/^ನ/i,/^ಡಿ/i]},defaultParseWidth:"any"}),day:Fa({matchPatterns:{narrow:/^(ಭಾ|ಸೋ|ಮ|ಬು|ಗು|ಶು|ಶ)/i,short:/^(ಭಾನು|ಸೋಮ|ಮಂಗಳ|ಬುಧ|ಗುರು|ಶುಕ್ರ|ಶನಿ)/i,abbreviated:/^(ಭಾನು|ಸೋಮ|ಮಂಗಳ|ಬುಧ|ಗುರು|ಶುಕ್ರ|ಶನಿ)/i,wide:/^(ಭಾನುವಾರ|ಸೋಮವಾರ|ಮಂಗಳವಾರ|ಬುಧವಾರ|ಗುರುವಾರ|ಶುಕ್ರವಾರ|ಶನಿವಾರ)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^ಭಾ/i,/^ಸೋ/i,/^ಮ/i,/^ಬು/i,/^ಗು/i,/^ಶು/i,/^ಶ/i],any:[/^ಭಾ/i,/^ಸೋ/i,/^ಮ/i,/^ಬು/i,/^ಗು/i,/^ಶು/i,/^ಶ/i]},defaultParseWidth:"any"}),dayPeriod:Fa({matchPatterns:{narrow:/^(ಪೂ|ಅ|ಮಧ್ಯರಾತ್ರಿ|ಮಧ್ಯಾನ್ಹ|ಬೆಳಗ್ಗೆ|ಸಂಜೆ|ರಾತ್ರಿ)/i,any:/^(ಪೂರ್ವಾಹ್ನ|ಅಪರಾಹ್ನ|ಮಧ್ಯರಾತ್ರಿ|ಮಧ್ಯಾನ್ಹ|ಬೆಳಗ್ಗೆ|ಸಂಜೆ|ರಾತ್ರಿ)/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^ಪೂ/i,pm:/^ಅ/i,midnight:/ಮಧ್ಯರಾತ್ರಿ/i,noon:/ಮಧ್ಯಾನ್ಹ/i,morning:/ಬೆಳಗ್ಗೆ/i,afternoon:/ಮಧ್ಯಾನ್ಹ/i,evening:/ಸಂಜೆ/i,night:/ರಾತ್ರಿ/i}},defaultParseWidth:"any"})},options:{weekStartsOn:1,firstWeekContainsDate:1}},Gm={lessThanXSeconds:{one:"1초 미만",other:"{{count}}초 미만"},xSeconds:{one:"1초",other:"{{count}}초"},halfAMinute:"30초",lessThanXMinutes:{one:"1분 미만",other:"{{count}}분 미만"},xMinutes:{one:"1분",other:"{{count}}분"},aboutXHours:{one:"약 1시간",other:"약 {{count}}시간"},xHours:{one:"1시간",other:"{{count}}시간"},xDays:{one:"1일",other:"{{count}}일"},aboutXWeeks:{one:"약 1주",other:"약 {{count}}주"},xWeeks:{one:"1주",other:"{{count}}주"},aboutXMonths:{one:"약 1개월",other:"약 {{count}}개월"},xMonths:{one:"1개월",other:"{{count}}개월"},aboutXYears:{one:"약 1년",other:"약 {{count}}년"},xYears:{one:"1년",other:"{{count}}년"},overXYears:{one:"1년 이상",other:"{{count}}년 이상"},almostXYears:{one:"거의 1년",other:"거의 {{count}}년"}},Om=function(e,t,a){var n,i=Gm[e];return n="string"==typeof i?i:1===t?i.one:i.other.replace("{{count}}",t.toString()),null!=a&&a.addSuffix?a.comparison&&a.comparison>0?n+" 후":n+" 전":n},Qm={date:Qa({formats:{full:"y년 M월 d일 EEEE",long:"y년 M월 d일",medium:"y.MM.dd",short:"y.MM.dd"},defaultWidth:"full"}),time:Qa({formats:{full:"a H시 mm분 ss초 zzzz",long:"a H:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},defaultWidth:"full"}),dateTime:Qa({formats:{full:"{{date}} {{time}}",long:"{{date}} {{time}}",medium:"{{date}} {{time}}",short:"{{date}} {{time}}"},defaultWidth:"full"})},Ym={lastWeek:"'지난' eeee p",yesterday:"'어제' p",today:"'오늘' p",tomorrow:"'내일' p",nextWeek:"'다음' eeee p",other:"P"},qm={code:"ko",formatDistance:Om,formatLong:Qm,formatRelative:function(e,t,a,n){return Ym[e]},localize:{ordinalNumber:function(e,t){var a=Number(e);switch(String(null==t?void 0:t.unit)){case"minute":case"second":return String(a);case"date":return a+"일";default:return a+"번째"}},era:Ra({values:{narrow:["BC","AD"],abbreviated:["BC","AD"],wide:["기원전","서기"]},defaultWidth:"wide"}),quarter:Ra({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1분기","2분기","3분기","4분기"]},defaultWidth:"wide",argumentCallback:function(e){return e-1}}),month:Ra({values:{narrow:["1","2","3","4","5","6","7","8","9","10","11","12"],abbreviated:["1월","2월","3월","4월","5월","6월","7월","8월","9월","10월","11월","12월"],wide:["1월","2월","3월","4월","5월","6월","7월","8월","9월","10월","11월","12월"]},defaultWidth:"wide"}),day:Ra({values:{narrow:["일","월","화","수","목","금","토"],short:["일","월","화","수","목","금","토"],abbreviated:["일","월","화","수","목","금","토"],wide:["일요일","월요일","화요일","수요일","목요일","금요일","토요일"]},defaultWidth:"wide"}),dayPeriod:Ra({values:{narrow:{am:"오전",pm:"오후",midnight:"자정",noon:"정오",morning:"아침",afternoon:"오후",evening:"저녁",night:"밤"},abbreviated:{am:"오전",pm:"오후",midnight:"자정",noon:"정오",morning:"아침",afternoon:"오후",evening:"저녁",night:"밤"},wide:{am:"오전",pm:"오후",midnight:"자정",noon:"정오",morning:"아침",afternoon:"오후",evening:"저녁",night:"밤"}},defaultWidth:"wide",formattingValues:{narrow:{am:"오전",pm:"오후",midnight:"자정",noon:"정오",morning:"아침",afternoon:"오후",evening:"저녁",night:"밤"},abbreviated:{am:"오전",pm:"오후",midnight:"자정",noon:"정오",morning:"아침",afternoon:"오후",evening:"저녁",night:"밤"},wide:{am:"오전",pm:"오후",midnight:"자정",noon:"정오",morning:"아침",afternoon:"오후",evening:"저녁",night:"밤"}},defaultFormattingWidth:"wide"})},match:{ordinalNumber:$a({matchPattern:/^(\d+)(일|번째)?/i,parsePattern:/\d+/i,valueCallback:function(e){return parseInt(e,10)}}),era:Fa({matchPatterns:{narrow:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(기원전|서기)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^(bc|기원전)/i,/^(ad|서기)/i]},defaultParseWidth:"any"}),quarter:Fa({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234]사?분기/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:function(e){return e+1}}),month:Fa({matchPatterns:{narrow:/^(1[012]|[123456789])/,abbreviated:/^(1[012]|[123456789])월/i,wide:/^(1[012]|[123456789])월/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^1월?$/,/^2/,/^3/,/^4/,/^5/,/^6/,/^7/,/^8/,/^9/,/^10/,/^11/,/^12/]},defaultParseWidth:"any"}),day:Fa({matchPatterns:{narrow:/^[일월화수목금토]/,short:/^[일월화수목금토]/,abbreviated:/^[일월화수목금토]/,wide:/^[일월화수목금토]요일/},defaultMatchWidth:"wide",parsePatterns:{any:[/^일/,/^월/,/^화/,/^수/,/^목/,/^금/,/^토/]},defaultParseWidth:"any"}),dayPeriod:Fa({matchPatterns:{any:/^(am|pm|오전|오후|자정|정오|아침|저녁|밤)/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^(am|오전)/i,pm:/^(pm|오후)/i,midnight:/^자정/i,noon:/^정오/i,morning:/^아침/i,afternoon:/^오후/i,evening:/^저녁/i,night:/^밤/i}},defaultParseWidth:"any"})},options:{weekStartsOn:0,firstWeekContainsDate:1}},Jm={lessThanXSeconds:{standalone:{one:"manner wéi eng Sekonn",other:"manner wéi {{count}} Sekonnen"},withPreposition:{one:"manner wéi enger Sekonn",other:"manner wéi {{count}} Sekonnen"}},xSeconds:{standalone:{one:"eng Sekonn",other:"{{count}} Sekonnen"},withPreposition:{one:"enger Sekonn",other:"{{count}} Sekonnen"}},halfAMinute:{standalone:"eng hallef Minutt",withPreposition:"enger hallwer Minutt"},lessThanXMinutes:{standalone:{one:"manner wéi eng Minutt",other:"manner wéi {{count}} Minutten"},withPreposition:{one:"manner wéi enger Minutt",other:"manner wéi {{count}} Minutten"}},xMinutes:{standalone:{one:"eng Minutt",other:"{{count}} Minutten"},withPreposition:{one:"enger Minutt",other:"{{count}} Minutten"}},aboutXHours:{standalone:{one:"ongeféier eng Stonn",other:"ongeféier {{count}} Stonnen"},withPreposition:{one:"ongeféier enger Stonn",other:"ongeféier {{count}} Stonnen"}},xHours:{standalone:{one:"eng Stonn",other:"{{count}} Stonnen"},withPreposition:{one:"enger Stonn",other:"{{count}} Stonnen"}},xDays:{standalone:{one:"een Dag",other:"{{count}} Deeg"},withPreposition:{one:"engem Dag",other:"{{count}} Deeg"}},aboutXWeeks:{standalone:{one:"ongeféier eng Woch",other:"ongeféier {{count}} Wochen"},withPreposition:{one:"ongeféier enger Woche",other:"ongeféier {{count}} Wochen"}},xWeeks:{standalone:{one:"eng Woch",other:"{{count}} Wochen"},withPreposition:{one:"enger Woch",other:"{{count}} Wochen"}},aboutXMonths:{standalone:{one:"ongeféier ee Mount",other:"ongeféier {{count}} Méint"},withPreposition:{one:"ongeféier engem Mount",other:"ongeféier {{count}} Méint"}},xMonths:{standalone:{one:"ee Mount",other:"{{count}} Méint"},withPreposition:{one:"engem Mount",other:"{{count}} Méint"}},aboutXYears:{standalone:{one:"ongeféier ee Joer",other:"ongeféier {{count}} Joer"},withPreposition:{one:"ongeféier engem Joer",other:"ongeféier {{count}} Joer"}},xYears:{standalone:{one:"ee Joer",other:"{{count}} Joer"},withPreposition:{one:"engem Joer",other:"{{count}} Joer"}},overXYears:{standalone:{one:"méi wéi ee Joer",other:"méi wéi {{count}} Joer"},withPreposition:{one:"méi wéi engem Joer",other:"méi wéi {{count}} Joer"}},almostXYears:{standalone:{one:"bal ee Joer",other:"bal {{count}} Joer"},withPreposition:{one:"bal engem Joer",other:"bal {{count}} Joer"}}},Rm=["d","h","n","t","z"],Lm=["a,","e","i","o","u"],Fm=[0,1,2,3,8,9],Zm=[40,50,60,70];function _m(e){var t=e.charAt(0).toLowerCase();if(-1!=Lm.indexOf(t)||-1!=Rm.indexOf(t))return!0;var a=e.split(" ")[0],n=parseInt(a);return!isNaN(n)&&-1!=Fm.indexOf(n%10)&&-1==Zm.indexOf(parseInt(a.substring(0,2)))}var $m=function(e,t,a){var n,i=Jm[e],r=null!=a&&a.addSuffix?i.withPreposition:i.standalone;return n="string"==typeof r?r:1===t?r.one:r.other.replace("{{count}}",String(t)),null!=a&&a.addSuffix?a.comparison&&a.comparison>0?"a"+(_m(n)?"n":"")+" "+n:"viru"+(_m(n)?"n":"")+" "+n:n},el={date:Qa({formats:{full:"EEEE, do MMMM y",long:"do MMMM y",medium:"do MMM y",short:"dd.MM.yy"},defaultWidth:"full"}),time:Qa({formats:{full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},defaultWidth:"full"}),dateTime:Qa({formats:{full:"{{date}} 'um' {{time}}",long:"{{date}} 'um' {{time}}",medium:"{{date}} {{time}}",short:"{{date}} {{time}}"},defaultWidth:"full"})},tl={lastWeek:function(e){var t=e.getUTCDay(),a="'läschte";return 2!==t&&4!==t||(a+="n"),a+="' eeee 'um' p"},yesterday:"'gëschter um' p",today:"'haut um' p",tomorrow:"'moien um' p",nextWeek:"eeee 'um' p",other:"P"},al=function(e,t,a,n){var i=tl[e];return"function"==typeof i?i(t):i},nl={code:"lb",formatDistance:$m,formatLong:el,formatRelative:al,localize:{ordinalNumber:function(e,t){return Number(e)+"."},era:Ra({values:{narrow:["v.Chr.","n.Chr."],abbreviated:["v.Chr.","n.Chr."],wide:["viru Christus","no Christus"]},defaultWidth:"wide"}),quarter:Ra({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1. Quartal","2. Quartal","3. Quartal","4. Quartal"]},defaultWidth:"wide",argumentCallback:function(e){return e-1}}),month:Ra({values:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mäe","Abr","Mee","Jun","Jul","Aug","Sep","Okt","Nov","Dez"],wide:["Januar","Februar","Mäerz","Abrëll","Mee","Juni","Juli","August","September","Oktober","November","Dezember"]},defaultWidth:"wide"}),day:Ra({values:{narrow:["S","M","D","M","D","F","S"],short:["So","Mé","Dë","Më","Do","Fr","Sa"],abbreviated:["So.","Mé.","Dë.","Më.","Do.","Fr.","Sa."],wide:["Sonndeg","Méindeg","Dënschdeg","Mëttwoch","Donneschdeg","Freideg","Samschdeg"]},defaultWidth:"wide"}),dayPeriod:Ra({values:{narrow:{am:"mo.",pm:"nomë.",midnight:"Mëtternuecht",noon:"Mëtteg",morning:"Moien",afternoon:"Nomëtteg",evening:"Owend",night:"Nuecht"},abbreviated:{am:"moies",pm:"nomëttes",midnight:"Mëtternuecht",noon:"Mëtteg",morning:"Moien",afternoon:"Nomëtteg",evening:"Owend",night:"Nuecht"},wide:{am:"moies",pm:"nomëttes",midnight:"Mëtternuecht",noon:"Mëtteg",morning:"Moien",afternoon:"Nomëtteg",evening:"Owend",night:"Nuecht"}},defaultWidth:"wide",formattingValues:{narrow:{am:"mo.",pm:"nom.",midnight:"Mëtternuecht",noon:"mëttes",morning:"moies",afternoon:"nomëttes",evening:"owes",night:"nuets"},abbreviated:{am:"moies",pm:"nomëttes",midnight:"Mëtternuecht",noon:"mëttes",morning:"moies",afternoon:"nomëttes",evening:"owes",night:"nuets"},wide:{am:"moies",pm:"nomëttes",midnight:"Mëtternuecht",noon:"mëttes",morning:"moies",afternoon:"nomëttes",evening:"owes",night:"nuets"}},defaultFormattingWidth:"wide"})},match:{ordinalNumber:$a({matchPattern:/^(\d+)(\.)?/i,parsePattern:/\d+/i,valueCallback:function(e){return parseInt(e,10)}}),era:Fa({matchPatterns:{narrow:/^(v\.? ?Chr\.?|n\.? ?Chr\.?)/i,abbreviated:/^(v\.? ?Chr\.?|n\.? ?Chr\.?)/i,wide:/^(viru Christus|virun eiser Zäitrechnung|no Christus|eiser Zäitrechnung)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^v/i,/^n/i]},defaultParseWidth:"any"}),quarter:Fa({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](\.)? Quartal/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:function(e){return e+1}}),month:Fa({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mäe|abr|mee|jun|jul|aug|sep|okt|nov|dez)/i,wide:/^(januar|februar|mäerz|abrëll|mee|juni|juli|august|september|oktober|november|dezember)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mä/i,/^ab/i,/^me/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:Fa({matchPatterns:{narrow:/^[smdf]/i,short:/^(so|mé|dë|më|do|fr|sa)/i,abbreviated:/^(son?|méi?|dën?|mët?|don?|fre?|sam?)\.?/i,wide:/^(sonndeg|méindeg|dënschdeg|mëttwoch|donneschdeg|freideg|samschdeg)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^so/i,/^mé/i,/^dë/i,/^më/i,/^do/i,/^f/i,/^sa/i]},defaultParseWidth:"any"}),dayPeriod:Fa({matchPatterns:{narrow:/^(mo\.?|nomë\.?|Mëtternuecht|mëttes|moies|nomëttes|owes|nuets)/i,abbreviated:/^(moi\.?|nomët\.?|Mëtternuecht|mëttes|moies|nomëttes|owes|nuets)/i,wide:/^(moies|nomëttes|Mëtternuecht|mëttes|moies|nomëttes|owes|nuets)/i},defaultMatchWidth:"wide",parsePatterns:{any:{am:/^m/i,pm:/^n/i,midnight:/^Mëtter/i,noon:/^mëttes/i,morning:/moies/i,afternoon:/nomëttes/i,evening:/owes/i,night:/nuets/i}},defaultParseWidth:"any"})},options:{weekStartsOn:1,firstWeekContainsDate:4}},il={xseconds_other:"sekundė_sekundžių_sekundes",xminutes_one:"minutė_minutės_minutę",xminutes_other:"minutės_minučių_minutes",xhours_one:"valanda_valandos_valandą",xhours_other:"valandos_valandų_valandas",xdays_one:"diena_dienos_dieną",xdays_other:"dienos_dienų_dienas",xweeks_one:"savaitė_savaitės_savaitę",xweeks_other:"savaitės_savaičių_savaites",xmonths_one:"mėnuo_mėnesio_mėnesį",xmonths_other:"mėnesiai_mėnesių_mėnesius",xyears_one:"metai_metų_metus",xyears_other:"metai_metų_metus",about:"apie",over:"daugiau nei",almost:"beveik",lessthan:"mažiau nei"},rl=function(e,t,a,n){return t?n?"kelių sekundžių":"kelias sekundes":"kelios sekundės"},ol=function(e,t,a,n){return t?n?ul(a)[1]:ul(a)[2]:ul(a)[0]},dl=function(e,t,a,n){var i=e+" ";return 1===e?i+ol(0,t,a,n):t?n?i+ul(a)[1]:i+(sl(e)?ul(a)[1]:ul(a)[2]):i+(sl(e)?ul(a)[1]:ul(a)[0])};function sl(e){return e%10==0||e>10&&e<20}function ul(e){return il[e].split("_")}var ml={lessThanXSeconds:{one:rl,other:dl},xSeconds:{one:rl,other:dl},halfAMinute:"pusė minutės",lessThanXMinutes:{one:ol,other:dl},xMinutes:{one:ol,other:dl},aboutXHours:{one:ol,other:dl},xHours:{one:ol,other:dl},xDays:{one:ol,other:dl},aboutXWeeks:{one:ol,other:dl},xWeeks:{one:ol,other:dl},aboutXMonths:{one:ol,other:dl},xMonths:{one:ol,other:dl},aboutXYears:{one:ol,other:dl},xYears:{one:ol,other:dl},overXYears:{one:ol,other:dl},almostXYears:{one:ol,other:dl}},ll=function(e,t,a){var n,i=e.match(/about|over|almost|lessthan/i),r=i?e.replace(i[0],""):e,o=void 0!==(null==a?void 0:a.comparison)&&a.comparison>0,d=ml[e];if(n="string"==typeof d?d:1===t?d.one(t,!0===(null==a?void 0:a.addSuffix),r.toLowerCase()+"_one",o):d.other(t,!0===(null==a?void 0:a.addSuffix),r.toLowerCase()+"_other",o),i){var s=i[0].toLowerCase();n=il[s]+" "+n}return null!=a&&a.addSuffix?a.comparison&&a.comparison>0?"po "+n:"prieš "+n:n},hl={date:Qa({formats:{full:"y 'm'. MMMM d 'd'., EEEE",long:"y 'm'. MMMM d 'd'.",medium:"y-MM-dd",short:"y-MM-dd"},defaultWidth:"full"}),time:Qa({formats:{full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},defaultWidth:"full"}),dateTime:Qa({formats:{full:"{{date}} {{time}}",long:"{{date}} {{time}}",medium:"{{date}} {{time}}",short:"{{date}} {{time}}"},defaultWidth:"full"})},cl={lastWeek:"'Praėjusį' eeee p",yesterday:"'Vakar' p",today:"'Šiandien' p",tomorrow:"'Rytoj' p",nextWeek:"eeee p",other:"P"},fl={code:"lt",formatDistance:ll,formatLong:hl,formatRelative:function(e,t,a,n){return cl[e]},localize:{ordinalNumber:function(e,t){return Number(e)+"-oji"},era:Ra({values:{narrow:["pr. Kr.","po Kr."],abbreviated:["pr. Kr.","po Kr."],wide:["prieš Kristų","po Kristaus"]},defaultWidth:"wide"}),quarter:Ra({values:{narrow:["1","2","3","4"],abbreviated:["I ketv.","II ketv.","III ketv.","IV ketv."],wide:["I ketvirtis","II ketvirtis","III ketvirtis","IV ketvirtis"]},defaultWidth:"wide",formattingValues:{narrow:["1","2","3","4"],abbreviated:["I k.","II k.","III k.","IV k."],wide:["I ketvirtis","II ketvirtis","III ketvirtis","IV ketvirtis"]},defaultFormattingWidth:"wide",argumentCallback:function(e){return e-1}}),month:Ra({values:{narrow:["S","V","K","B","G","B","L","R","R","S","L","G"],abbreviated:["saus.","vas.","kov.","bal.","geg.","birž.","liep.","rugp.","rugs.","spal.","lapkr.","gruod."],wide:["sausis","vasaris","kovas","balandis","gegužė","birželis","liepa","rugpjūtis","rugsėjis","spalis","lapkritis","gruodis"]},defaultWidth:"wide",formattingValues:{narrow:["S","V","K","B","G","B","L","R","R","S","L","G"],abbreviated:["saus.","vas.","kov.","bal.","geg.","birž.","liep.","rugp.","rugs.","spal.","lapkr.","gruod."],wide:["sausio","vasario","kovo","balandžio","gegužės","birželio","liepos","rugpjūčio","rugsėjo","spalio","lapkričio","gruodžio"]},defaultFormattingWidth:"wide"}),day:Ra({values:{narrow:["S","P","A","T","K","P","Š"],short:["Sk","Pr","An","Tr","Kt","Pn","Št"],abbreviated:["sk","pr","an","tr","kt","pn","št"],wide:["sekmadienis","pirmadienis","antradienis","trečiadienis","ketvirtadienis","penktadienis","šeštadienis"]},defaultWidth:"wide",formattingValues:{narrow:["S","P","A","T","K","P","Š"],short:["Sk","Pr","An","Tr","Kt","Pn","Št"],abbreviated:["sk","pr","an","tr","kt","pn","št"],wide:["sekmadienį","pirmadienį","antradienį","trečiadienį","ketvirtadienį","penktadienį","šeštadienį"]},defaultFormattingWidth:"wide"}),dayPeriod:Ra({values:{narrow:{am:"pr. p.",pm:"pop.",midnight:"vidurnaktis",noon:"vidurdienis",morning:"rytas",afternoon:"diena",evening:"vakaras",night:"naktis"},abbreviated:{am:"priešpiet",pm:"popiet",midnight:"vidurnaktis",noon:"vidurdienis",morning:"rytas",afternoon:"diena",evening:"vakaras",night:"naktis"},wide:{am:"priešpiet",pm:"popiet",midnight:"vidurnaktis",noon:"vidurdienis",morning:"rytas",afternoon:"diena",evening:"vakaras",night:"naktis"}},defaultWidth:"wide",formattingValues:{narrow:{am:"pr. p.",pm:"pop.",midnight:"vidurnaktis",noon:"perpiet",morning:"rytas",afternoon:"popietė",evening:"vakaras",night:"naktis"},abbreviated:{am:"priešpiet",pm:"popiet",midnight:"vidurnaktis",noon:"perpiet",morning:"rytas",afternoon:"popietė",evening:"vakaras",night:"naktis"},wide:{am:"priešpiet",pm:"popiet",midnight:"vidurnaktis",noon:"perpiet",morning:"rytas",afternoon:"popietė",evening:"vakaras",night:"naktis"}},defaultFormattingWidth:"wide"})},match:{ordinalNumber:$a({matchPattern:/^(\d+)(-oji)?/i,parsePattern:/\d+/i,valueCallback:function(e){return parseInt(e,10)}}),era:Fa({matchPatterns:{narrow:/^p(r|o)\.?\s?(kr\.?|me)/i,abbreviated:/^(pr\.\s?(kr\.|m\.\s?e\.)|po\s?kr\.|mūsų eroje)/i,wide:/^(prieš Kristų|prieš mūsų erą|po Kristaus|mūsų eroje)/i},defaultMatchWidth:"wide",parsePatterns:{wide:[/prieš/i,/(po|mūsų)/i],any:[/^pr/i,/^(po|m)/i]},defaultParseWidth:"any"}),quarter:Fa({matchPatterns:{narrow:/^([1234])/i,abbreviated:/^(I|II|III|IV)\s?ketv?\.?/i,wide:/^(I|II|III|IV)\s?ketvirtis/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/1/i,/2/i,/3/i,/4/i],any:[/I$/i,/II$/i,/III/i,/IV/i]},defaultParseWidth:"any",valueCallback:function(e){return e+1}}),month:Fa({matchPatterns:{narrow:/^[svkbglr]/i,abbreviated:/^(saus\.|vas\.|kov\.|bal\.|geg\.|birž\.|liep\.|rugp\.|rugs\.|spal\.|lapkr\.|gruod\.)/i,wide:/^(sausi(s|o)|vasari(s|o)|kov(a|o)s|balandž?i(s|o)|gegužės?|birželi(s|o)|liep(a|os)|rugpjū(t|č)i(s|o)|rugsėj(is|o)|spali(s|o)|lapkri(t|č)i(s|o)|gruodž?i(s|o))/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^s/i,/^v/i,/^k/i,/^b/i,/^g/i,/^b/i,/^l/i,/^r/i,/^r/i,/^s/i,/^l/i,/^g/i],any:[/^saus/i,/^vas/i,/^kov/i,/^bal/i,/^geg/i,/^birž/i,/^liep/i,/^rugp/i,/^rugs/i,/^spal/i,/^lapkr/i,/^gruod/i]},defaultParseWidth:"any"}),day:Fa({matchPatterns:{narrow:/^[spatkš]/i,short:/^(sk|pr|an|tr|kt|pn|št)/i,abbreviated:/^(sk|pr|an|tr|kt|pn|št)/i,wide:/^(sekmadien(is|į)|pirmadien(is|į)|antradien(is|į)|trečiadien(is|į)|ketvirtadien(is|į)|penktadien(is|į)|šeštadien(is|į))/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^s/i,/^p/i,/^a/i,/^t/i,/^k/i,/^p/i,/^š/i],wide:[/^se/i,/^pi/i,/^an/i,/^tr/i,/^ke/i,/^pe/i,/^še/i],any:[/^sk/i,/^pr/i,/^an/i,/^tr/i,/^kt/i,/^pn/i,/^št/i]},defaultParseWidth:"any"}),dayPeriod:Fa({matchPatterns:{narrow:/^(pr.\s?p.|pop.|vidurnaktis|(vidurdienis|perpiet)|rytas|(diena|popietė)|vakaras|naktis)/i,any:/^(priešpiet|popiet$|vidurnaktis|(vidurdienis|perpiet)|rytas|(diena|popietė)|vakaras|naktis)/i},defaultMatchWidth:"any",parsePatterns:{narrow:{am:/^pr/i,pm:/^pop./i,midnight:/^vidurnaktis/i,noon:/^(vidurdienis|perp)/i,morning:/rytas/i,afternoon:/(die|popietė)/i,evening:/vakaras/i,night:/naktis/i},any:{am:/^pr/i,pm:/^popiet$/i,midnight:/^vidurnaktis/i,noon:/^(vidurdienis|perp)/i,morning:/rytas/i,afternoon:/(die|popietė)/i,evening:/vakaras/i,night:/naktis/i}},defaultParseWidth:"any"})},options:{weekStartsOn:1,firstWeekContainsDate:4}};function gl(e){return function(t,a){if(1===t)return null!=a&&a.addSuffix?e.one[0].replace("{{time}}",e.one[2]):e.one[0].replace("{{time}}",e.one[1]);var n=t%10==1&&t%100!=11;return null!=a&&a.addSuffix?e.other[0].replace("{{time}}",n?e.other[3]:e.other[4]).replace("{{count}}",String(t)):e.other[0].replace("{{time}}",n?e.other[1]:e.other[2]).replace("{{count}}",String(t))}}var pl={lessThanXSeconds:gl({one:["mazāk par {{time}}","sekundi","sekundi"],other:["mazāk nekā {{count}} {{time}}","sekunde","sekundes","sekundes","sekundēm"]}),xSeconds:gl({one:["1 {{time}}","sekunde","sekundes"],other:["{{count}} {{time}}","sekunde","sekundes","sekundes","sekundēm"]}),halfAMinute:function(e,t){return null!=t&&t.addSuffix?"pusminūtes":"pusminūte"},lessThanXMinutes:gl({one:["mazāk par {{time}}","minūti","minūti"],other:["mazāk nekā {{count}} {{time}}","minūte","minūtes","minūtes","minūtēm"]}),xMinutes:gl({one:["1 {{time}}","minūte","minūtes"],other:["{{count}} {{time}}","minūte","minūtes","minūtes","minūtēm"]}),aboutXHours:gl({one:["apmēram 1 {{time}}","stunda","stundas"],other:["apmēram {{count}} {{time}}","stunda","stundas","stundas","stundām"]}),xHours:gl({one:["1 {{time}}","stunda","stundas"],other:["{{count}} {{time}}","stunda","stundas","stundas","stundām"]}),xDays:gl({one:["1 {{time}}","diena","dienas"],other:["{{count}} {{time}}","diena","dienas","dienas","dienām"]}),aboutXWeeks:gl({one:["apmēram 1 {{time}}","nedēļa","nedēļas"],other:["apmēram {{count}} {{time}}","nedēļa","nedēļu","nedēļas","nedēļām"]}),xWeeks:gl({one:["1 {{time}}","nedēļa","nedēļas"],other:["{{count}} {{time}}","nedēļa","nedēļu","nedēļas","nedēļām"]}),aboutXMonths:gl({one:["apmēram 1 {{time}}","mēnesis","mēneša"],other:["apmēram {{count}} {{time}}","mēnesis","mēneši","mēneša","mēnešiem"]}),xMonths:gl({one:["1 {{time}}","mēnesis","mēneša"],other:["{{count}} {{time}}","mēnesis","mēneši","mēneša","mēnešiem"]}),aboutXYears:gl({one:["apmēram 1 {{time}}","gads","gada"],other:["apmēram {{count}} {{time}}","gads","gadi","gada","gadiem"]}),xYears:gl({one:["1 {{time}}","gads","gada"],other:["{{count}} {{time}}","gads","gadi","gada","gadiem"]}),overXYears:gl({one:["ilgāk par 1 {{time}}","gadu","gadu"],other:["vairāk nekā {{count}} {{time}}","gads","gadi","gada","gadiem"]}),almostXYears:gl({one:["gandrīz 1 {{time}}","gads","gada"],other:["vairāk nekā {{count}} {{time}}","gads","gadi","gada","gadiem"]})},vl=function(e,t,a){var n=pl[e](t,a);return null!=a&&a.addSuffix?a.comparison&&a.comparison>0?"pēc "+n:"pirms "+n:n},bl={date:Qa({formats:{full:"EEEE, y. 'gada' d. MMMM",long:"y. 'gada' d. MMMM",medium:"dd.MM.y.",short:"dd.MM.y."},defaultWidth:"full"}),time:Qa({formats:{full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},defaultWidth:"full"}),dateTime:Qa({formats:{full:"{{date}} 'plkst.' {{time}}",long:"{{date}} 'plkst.' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},wl=["svētdienā","pirmdienā","otrdienā","trešdienā","ceturtdienā","piektdienā","sestdienā"],yl={lastWeek:function(e,t,a){return yi(e,t,a)?"eeee 'plkst.' p":"'Pagājušā "+wl[e.getUTCDay()]+" plkst.' p"},yesterday:"'Vakar plkst.' p",today:"'Šodien plkst.' p",tomorrow:"'Rīt plkst.' p",nextWeek:function(e,t,a){return yi(e,t,a)?"eeee 'plkst.' p":"'Nākamajā "+wl[e.getUTCDay()]+" plkst.' p"},other:"P"},Al=function(e,t,a,n){var i=yl[e];return"function"==typeof i?i(t,a,n):i},kl={code:"lv",formatDistance:vl,formatLong:bl,formatRelative:Al,localize:{ordinalNumber:function(e,t){return Number(e)+"."},era:Ra({values:{narrow:["p.m.ē","m.ē"],abbreviated:["p. m. ē.","m. ē."],wide:["pirms mūsu ēras","mūsu ērā"]},defaultWidth:"wide"}),quarter:Ra({values:{narrow:["1","2","3","4"],abbreviated:["1. cet.","2. cet.","3. cet.","4. cet."],wide:["pirmais ceturksnis","otrais ceturksnis","trešais ceturksnis","ceturtais ceturksnis"]},defaultWidth:"wide",formattingValues:{narrow:["1","2","3","4"],abbreviated:["1. cet.","2. cet.","3. cet.","4. cet."],wide:["pirmajā ceturksnī","otrajā ceturksnī","trešajā ceturksnī","ceturtajā ceturksnī"]},defaultFormattingWidth:"wide",argumentCallback:function(e){return e-1}}),month:Ra({values:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["janv.","febr.","marts","apr.","maijs","jūn.","jūl.","aug.","sept.","okt.","nov.","dec."],wide:["janvāris","februāris","marts","aprīlis","maijs","jūnijs","jūlijs","augusts","septembris","oktobris","novembris","decembris"]},defaultWidth:"wide",formattingValues:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["janv.","febr.","martā","apr.","maijs","jūn.","jūl.","aug.","sept.","okt.","nov.","dec."],wide:["janvārī","februārī","martā","aprīlī","maijā","jūnijā","jūlijā","augustā","septembrī","oktobrī","novembrī","decembrī"]},defaultFormattingWidth:"wide"}),day:Ra({values:{narrow:["S","P","O","T","C","P","S"],short:["Sv","P","O","T","C","Pk","S"],abbreviated:["svētd.","pirmd.","otrd.","trešd.","ceturtd.","piektd.","sestd."],wide:["svētdiena","pirmdiena","otrdiena","trešdiena","ceturtdiena","piektdiena","sestdiena"]},defaultWidth:"wide",formattingValues:{narrow:["S","P","O","T","C","P","S"],short:["Sv","P","O","T","C","Pk","S"],abbreviated:["svētd.","pirmd.","otrd.","trešd.","ceturtd.","piektd.","sestd."],wide:["svētdienā","pirmdienā","otrdienā","trešdienā","ceturtdienā","piektdienā","sestdienā"]},defaultFormattingWidth:"wide"}),dayPeriod:Ra({values:{narrow:{am:"am",pm:"pm",midnight:"pusn.",noon:"pusd.",morning:"rīts",afternoon:"diena",evening:"vakars",night:"nakts"},abbreviated:{am:"am",pm:"pm",midnight:"pusn.",noon:"pusd.",morning:"rīts",afternoon:"pēcpusd.",evening:"vakars",night:"nakts"},wide:{am:"am",pm:"pm",midnight:"pusnakts",noon:"pusdienlaiks",morning:"rīts",afternoon:"pēcpusdiena",evening:"vakars",night:"nakts"}},defaultWidth:"wide",formattingValues:{narrow:{am:"am",pm:"pm",midnight:"pusn.",noon:"pusd.",morning:"rītā",afternoon:"dienā",evening:"vakarā",night:"naktī"},abbreviated:{am:"am",pm:"pm",midnight:"pusn.",noon:"pusd.",morning:"rītā",afternoon:"pēcpusd.",evening:"vakarā",night:"naktī"},wide:{am:"am",pm:"pm",midnight:"pusnaktī",noon:"pusdienlaikā",morning:"rītā",afternoon:"pēcpusdienā",evening:"vakarā",night:"naktī"}},defaultFormattingWidth:"wide"})},match:{ordinalNumber:$a({matchPattern:/^(\d+)\./i,parsePattern:/\d+/i,valueCallback:function(e){return parseInt(e,10)}}),era:Fa({matchPatterns:{narrow:/^(p\.m\.ē|m\.ē)/i,abbreviated:/^(p\. m\. ē\.|m\. ē\.)/i,wide:/^(pirms mūsu ēras|mūsu ērā)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^p/i,/^m/i]},defaultParseWidth:"any"}),quarter:Fa({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^[1234](\. cet\.)/i,wide:/^(pirma(is|jā)|otra(is|jā)|treša(is|jā)|ceturta(is|jā)) ceturksn(is|ī)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^1/i,/^2/i,/^3/i,/^4/i],abbreviated:[/^1/i,/^2/i,/^3/i,/^4/i],wide:[/^p/i,/^o/i,/^t/i,/^c/i]},defaultParseWidth:"wide",valueCallback:function(e){return e+1}}),month:Fa({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(janv\.|febr\.|marts|apr\.|maijs|jūn\.|jūl\.|aug\.|sept\.|okt\.|nov\.|dec\.)/i,wide:/^(janvār(is|ī)|februār(is|ī)|mart[sā]|aprīl(is|ī)|maij[sā]|jūnij[sā]|jūlij[sā]|august[sā]|septembr(is|ī)|oktobr(is|ī)|novembr(is|ī)|decembr(is|ī))/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^mai/i,/^jūn/i,/^jūl/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:Fa({matchPatterns:{narrow:/^[spotc]/i,short:/^(sv|pi|o|t|c|pk|s)/i,abbreviated:/^(svētd\.|pirmd\.|otrd.\|trešd\.|ceturtd\.|piektd\.|sestd\.)/i,wide:/^(svētdien(a|ā)|pirmdien(a|ā)|otrdien(a|ā)|trešdien(a|ā)|ceturtdien(a|ā)|piektdien(a|ā)|sestdien(a|ā))/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^s/i,/^p/i,/^o/i,/^t/i,/^c/i,/^p/i,/^s/i],any:[/^sv/i,/^pi/i,/^o/i,/^t/i,/^c/i,/^p/i,/^se/i]},defaultParseWidth:"any"}),dayPeriod:Fa({matchPatterns:{narrow:/^(am|pm|pusn\.|pusd\.|rīt(s|ā)|dien(a|ā)|vakar(s|ā)|nakt(s|ī))/,abbreviated:/^(am|pm|pusn\.|pusd\.|rīt(s|ā)|pēcpusd\.|vakar(s|ā)|nakt(s|ī))/,wide:/^(am|pm|pusnakt(s|ī)|pusdienlaik(s|ā)|rīt(s|ā)|pēcpusdien(a|ā)|vakar(s|ā)|nakt(s|ī))/i},defaultMatchWidth:"wide",parsePatterns:{any:{am:/^am/i,pm:/^pm/i,midnight:/^pusn/i,noon:/^pusd/i,morning:/^r/i,afternoon:/^(d|pēc)/i,evening:/^v/i,night:/^n/i}},defaultParseWidth:"any"})},options:{weekStartsOn:1,firstWeekContainsDate:4}},Ml={lessThanXSeconds:{one:"помалку од секунда",other:"помалку од {{count}} секунди"},xSeconds:{one:"1 секунда",other:"{{count}} секунди"},halfAMinute:"половина минута",lessThanXMinutes:{one:"помалку од минута",other:"помалку од {{count}} минути"},xMinutes:{one:"1 минута",other:"{{count}} минути"},aboutXHours:{one:"околу 1 час",other:"околу {{count}} часа"},xHours:{one:"1 час",other:"{{count}} часа"},xDays:{one:"1 ден",other:"{{count}} дена"},aboutXWeeks:{one:"околу 1 недела",other:"околу {{count}} месеци"},xWeeks:{one:"1 недела",other:"{{count}} недели"},aboutXMonths:{one:"околу 1 месец",other:"околу {{count}} недели"},xMonths:{one:"1 месец",other:"{{count}} месеци"},aboutXYears:{one:"околу 1 година",other:"околу {{count}} години"},xYears:{one:"1 година",other:"{{count}} години"},overXYears:{one:"повеќе од 1 година",other:"повеќе од {{count}} години"},almostXYears:{one:"безмалку 1 година",other:"безмалку {{count}} години"}},Pl=function(e,t,a){var n,i=Ml[e];return n="string"==typeof i?i:1===t?i.one:i.other.replace("{{count}}",String(t)),null!=a&&a.addSuffix?a.comparison&&a.comparison>0?"за "+n:"пред "+n:n},Wl={date:Qa({formats:{full:"EEEE, dd MMMM yyyy",long:"dd MMMM yyyy",medium:"dd MMM yyyy",short:"dd/MM/yyyy"},defaultWidth:"full"}),time:Qa({formats:{full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"H:mm"},defaultWidth:"full"}),dateTime:Qa({formats:{any:"{{date}} {{time}}"},defaultWidth:"any"})},xl=["недела","понеделник","вторник","среда","четврток","петок","сабота"];function zl(e){var t=xl[e];switch(e){case 0:case 3:case 6:return"'ова "+t+" вo' p";case 1:case 2:case 4:case 5:return"'овој "+t+" вo' p"}}var jl={lastWeek:function(e,t,a){var n=e.getUTCDay();return yi(e,t,a)?zl(n):function(e){var t=xl[e];switch(e){case 0:case 3:case 6:return"'минатата "+t+" во' p";case 1:case 2:case 4:case 5:return"'минатиот "+t+" во' p"}}(n)},yesterday:"'вчера во' p",today:"'денес во' p",tomorrow:"'утре во' p",nextWeek:function(e,t,a){var n=e.getUTCDay();return yi(e,t,a)?zl(n):function(e){var t=xl[e];switch(e){case 0:case 3:case 6:return"'следната "+t+" вo' p";case 1:case 2:case 4:case 5:return"'следниот "+t+" вo' p"}}(n)},other:"P"},Cl=function(e,t,a,n){var i=jl[e];return"function"==typeof i?i(t,a,n):i},Tl={ordinalNumber:function(e,t){var a=Number(e),n=a%100;if(n>20||n<10)switch(n%10){case 1:return a+"-ви";case 2:return a+"-ри";case 7:case 8:return a+"-ми"}return a+"-ти"},era:Ra({values:{narrow:["пр.н.е.","н.е."],abbreviated:["пред н. е.","н. е."],wide:["пред нашата ера","нашата ера"]},defaultWidth:"wide"}),quarter:Ra({values:{narrow:["1","2","3","4"],abbreviated:["1-ви кв.","2-ри кв.","3-ти кв.","4-ти кв."],wide:["1-ви квартал","2-ри квартал","3-ти квартал","4-ти квартал"]},defaultWidth:"wide",argumentCallback:function(e){return e-1}}),month:Ra({values:{abbreviated:["јан","фев","мар","апр","мај","јун","јул","авг","септ","окт","ноем","дек"],wide:["јануари","февруари","март","април","мај","јуни","јули","август","септември","октомври","ноември","декември"]},defaultWidth:"wide"}),day:Ra({values:{narrow:["Н","П","В","С","Ч","П","С"],short:["не","по","вт","ср","че","пе","са"],abbreviated:["нед","пон","вто","сре","чет","пет","саб"],wide:["недела","понеделник","вторник","среда","четврток","петок","сабота"]},defaultWidth:"wide"}),dayPeriod:Ra({values:{wide:{am:"претпладне",pm:"попладне",midnight:"полноќ",noon:"напладне",morning:"наутро",afternoon:"попладне",evening:"навечер",night:"ноќе"}},defaultWidth:"wide"})},Sl=Tl,Hl={ordinalNumber:$a({matchPattern:/^(\d+)(-?[врмт][и])?/i,parsePattern:/\d+/i,valueCallback:function(e){return parseInt(e,10)}}),era:Fa({matchPatterns:{narrow:/^((пр)?н\.?\s?е\.?)/i,abbreviated:/^((пр)?н\.?\s?е\.?)/i,wide:/^(пред нашата ера|нашата ера)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^п/i,/^н/i]},defaultParseWidth:"any"}),quarter:Fa({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^[1234](-?[врт]?и?)? кв.?/i,wide:/^[1234](-?[врт]?и?)? квартал/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:function(e){return e+1}}),month:Fa({matchPatterns:{abbreviated:/^(јан|фев|мар|апр|мај|јун|јул|авг|сеп|окт|ноем|дек)/i,wide:/^(јануари|февруари|март|април|мај|јуни|јули|август|септември|октомври|ноември|декември)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^ја/i,/^Ф/i,/^мар/i,/^ап/i,/^мај/i,/^јун/i,/^јул/i,/^ав/i,/^се/i,/^окт/i,/^но/i,/^де/i]},defaultParseWidth:"any"}),day:Fa({matchPatterns:{narrow:/^[нпвсч]/i,short:/^(не|по|вт|ср|че|пе|са)/i,abbreviated:/^(нед|пон|вто|сре|чет|пет|саб)/i,wide:/^(недела|понеделник|вторник|среда|четврток|петок|сабота)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^н/i,/^п/i,/^в/i,/^с/i,/^ч/i,/^п/i,/^с/i],any:[/^н[ед]/i,/^п[он]/i,/^вт/i,/^ср/i,/^ч[ет]/i,/^п[ет]/i,/^с[аб]/i]},defaultParseWidth:"any"}),dayPeriod:Fa({matchPatterns:{any:/^(претп|попл|полноќ|утро|пладне|вечер|ноќ)/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/претпладне/i,pm:/попладне/i,midnight:/полноќ/i,noon:/напладне/i,morning:/наутро/i,afternoon:/попладне/i,evening:/навечер/i,night:/ноќе/i}},defaultParseWidth:"any"})},Dl=Hl,Nl={code:"mk",formatDistance:Pl,formatLong:Wl,formatRelative:Cl,localize:Sl,match:Dl,options:{weekStartsOn:1,firstWeekContainsDate:4}},Xl=Nl,Il={lessThanXSeconds:{one:"секунд хүрэхгүй",other:"{{count}} секунд хүрэхгүй"},xSeconds:{one:"1 секунд",other:"{{count}} секунд"},halfAMinute:"хагас минут",lessThanXMinutes:{one:"минут хүрэхгүй",other:"{{count}} минут хүрэхгүй"},xMinutes:{one:"1 минут",other:"{{count}} минут"},aboutXHours:{one:"ойролцоогоор 1 цаг",other:"ойролцоогоор {{count}} цаг"},xHours:{one:"1 цаг",other:"{{count}} цаг"},xDays:{one:"1 өдөр",other:"{{count}} өдөр"},aboutXWeeks:{one:"ойролцоогоор 1 долоо хоног",other:"ойролцоогоор {{count}} долоо хоног"},xWeeks:{one:"1 долоо хоног",other:"{{count}} долоо хоног"},aboutXMonths:{one:"ойролцоогоор 1 сар",other:"ойролцоогоор {{count}} сар"},xMonths:{one:"1 сар",other:"{{count}} сар"},aboutXYears:{one:"ойролцоогоор 1 жил",other:"ойролцоогоор {{count}} жил"},xYears:{one:"1 жил",other:"{{count}} жил"},overXYears:{one:"1 жил гаран",other:"{{count}} жил гаран"},almostXYears:{one:"бараг 1 жил",other:"бараг {{count}} жил"}},El=function(e,t,a){var n,i=Il[e];if(n="string"==typeof i?i:1===t?i.one:i.other.replace("{{count}}",String(t)),null!=a&&a.addSuffix){var r=n.split(" "),o=r.pop();switch(n=r.join(" "),o){case"секунд":n+=" секундийн";break;case"минут":n+=" минутын";break;case"цаг":n+=" цагийн";break;case"өдөр":n+=" өдрийн";break;case"сар":n+=" сарын";break;case"жил":n+=" жилийн";break;case"хоног":n+=" хоногийн";break;case"гаран":n+=" гараны";break;case"хүрэхгүй":n+=" хүрэхгүй хугацааны";break;default:n+=o+"-н"}return a.comparison&&a.comparison>0?n+" дараа":n+" өмнө"}return n},Bl={date:Qa({formats:{full:"y 'оны' MMMM'ын' d, EEEE 'гараг'",long:"y 'оны' MMMM'ын' d",medium:"y 'оны' MMM'ын' d",short:"y.MM.dd"},defaultWidth:"full"}),time:Qa({formats:{full:"H:mm:ss zzzz",long:"H:mm:ss z",medium:"H:mm:ss",short:"H:mm"},defaultWidth:"full"}),dateTime:Qa({formats:{full:"{{date}} {{time}}",long:"{{date}} {{time}}",medium:"{{date}} {{time}}",short:"{{date}} {{time}}"},defaultWidth:"full"})},Vl=Bl,Kl={lastWeek:"'өнгөрсөн' eeee 'гарагийн' p 'цагт'",yesterday:"'өчигдөр' p 'цагт'",today:"'өнөөдөр' p 'цагт'",tomorrow:"'маргааш' p 'цагт'",nextWeek:"'ирэх' eeee 'гарагийн' p 'цагт'",other:"P"},Ul=function(e,t,a,n){return Kl[e]},Gl={ordinalNumber:function(e,t){return String(e)},era:Ra({values:{narrow:["НТӨ","НТ"],abbreviated:["НТӨ","НТ"],wide:["нийтийн тооллын өмнөх","нийтийн тооллын"]},defaultWidth:"wide"}),quarter:Ra({values:{narrow:["I","II","III","IV"],abbreviated:["I улирал","II улирал","III улирал","IV улирал"],wide:["1-р улирал","2-р улирал","3-р улирал","4-р улирал"]},defaultWidth:"wide",argumentCallback:function(e){return e-1}}),month:Ra({values:{narrow:["I","II","III","IV","V","VI","VII","VIII","IX","X","XI","XII"],abbreviated:["1-р сар","2-р сар","3-р сар","4-р сар","5-р сар","6-р сар","7-р сар","8-р сар","9-р сар","10-р сар","11-р сар","12-р сар"],wide:["Нэгдүгээр сар","Хоёрдугаар сар","Гуравдугаар сар","Дөрөвдүгээр сар","Тавдугаар сар","Зургаадугаар сар","Долоодугаар сар","Наймдугаар сар","Есдүгээр сар","Аравдугаар сар","Арваннэгдүгээр сар","Арван хоёрдугаар сар"]},defaultWidth:"wide",formattingValues:{narrow:["I","II","III","IV","V","VI","VII","VIII","IX","X","XI","XII"],abbreviated:["1-р сар","2-р сар","3-р сар","4-р сар","5-р сар","6-р сар","7-р сар","8-р сар","9-р сар","10-р сар","11-р сар","12-р сар"],wide:["нэгдүгээр сар","хоёрдугаар сар","гуравдугаар сар","дөрөвдүгээр сар","тавдугаар сар","зургаадугаар сар","долоодугаар сар","наймдугаар сар","есдүгээр сар","аравдугаар сар","арваннэгдүгээр сар","арван хоёрдугаар сар"]},defaultFormattingWidth:"wide"}),day:Ra({values:{narrow:["Н","Д","М","Л","П","Б","Б"],short:["Ня","Да","Мя","Лх","Пү","Ба","Бя"],abbreviated:["Ням","Дав","Мяг","Лха","Пүр","Баа","Бям"],wide:["Ням","Даваа","Мягмар","Лхагва","Пүрэв","Баасан","Бямба"]},defaultWidth:"wide",formattingValues:{narrow:["Н","Д","М","Л","П","Б","Б"],short:["Ня","Да","Мя","Лх","Пү","Ба","Бя"],abbreviated:["Ням","Дав","Мяг","Лха","Пүр","Баа","Бям"],wide:["ням","даваа","мягмар","лхагва","пүрэв","баасан","бямба"]},defaultFormattingWidth:"wide"}),dayPeriod:Ra({values:{narrow:{am:"ү.ө.",pm:"ү.х.",midnight:"шөнө дунд",noon:"үд дунд",morning:"өглөө",afternoon:"өдөр",evening:"орой",night:"шөнө"},abbreviated:{am:"ү.ө.",pm:"ү.х.",midnight:"шөнө дунд",noon:"үд дунд",morning:"өглөө",afternoon:"өдөр",evening:"орой",night:"шөнө"},wide:{am:"ү.ө.",pm:"ү.х.",midnight:"шөнө дунд",noon:"үд дунд",morning:"өглөө",afternoon:"өдөр",evening:"орой",night:"шөнө"}},defaultWidth:"wide"})},Ol=Gl,Ql={ordinalNumber:$a({matchPattern:/\d+/i,parsePattern:/\d+/i,valueCallback:function(e){return parseInt(e,10)}}),era:Fa({matchPatterns:{narrow:/^(нтө|нт)/i,abbreviated:/^(нтө|нт)/i,wide:/^(нийтийн тооллын өмнө|нийтийн тооллын)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^(нтө|нийтийн тооллын өмнө)/i,/^(нт|нийтийн тооллын)/i]},defaultParseWidth:"any"}),quarter:Fa({matchPatterns:{narrow:/^(iv|iii|ii|i)/i,abbreviated:/^(iv|iii|ii|i) улирал/i,wide:/^[1-4]-р улирал/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^(i(\s|$)|1)/i,/^(ii(\s|$)|2)/i,/^(iii(\s|$)|3)/i,/^(iv(\s|$)|4)/i]},defaultParseWidth:"any",valueCallback:function(e){return e+1}}),month:Fa({matchPatterns:{narrow:/^(xii|xi|x|ix|viii|vii|vi|v|iv|iii|ii|i)/i,abbreviated:/^(1-р сар|2-р сар|3-р сар|4-р сар|5-р сар|6-р сар|7-р сар|8-р сар|9-р сар|10-р сар|11-р сар|12-р сар)/i,wide:/^(нэгдүгээр сар|хоёрдугаар сар|гуравдугаар сар|дөрөвдүгээр сар|тавдугаар сар|зургаадугаар сар|долоодугаар сар|наймдугаар сар|есдүгээр сар|аравдугаар сар|арван нэгдүгээр сар|арван хоёрдугаар сар)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^i$/i,/^ii$/i,/^iii$/i,/^iv$/i,/^v$/i,/^vi$/i,/^vii$/i,/^viii$/i,/^ix$/i,/^x$/i,/^xi$/i,/^xii$/i],any:[/^(1|нэгдүгээр)/i,/^(2|хоёрдугаар)/i,/^(3|гуравдугаар)/i,/^(4|дөрөвдүгээр)/i,/^(5|тавдугаар)/i,/^(6|зургаадугаар)/i,/^(7|долоодугаар)/i,/^(8|наймдугаар)/i,/^(9|есдүгээр)/i,/^(10|аравдугаар)/i,/^(11|арван нэгдүгээр)/i,/^(12|арван хоёрдугаар)/i]},defaultParseWidth:"any"}),day:Fa({matchPatterns:{narrow:/^[ндмлпбб]/i,short:/^(ня|да|мя|лх|пү|ба|бя)/i,abbreviated:/^(ням|дав|мяг|лха|пүр|баа|бям)/i,wide:/^(ням|даваа|мягмар|лхагва|пүрэв|баасан|бямба)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^н/i,/^д/i,/^м/i,/^л/i,/^п/i,/^б/i,/^б/i],any:[/^ня/i,/^да/i,/^мя/i,/^лх/i,/^пү/i,/^ба/i,/^бя/i]},defaultParseWidth:"any"}),dayPeriod:Fa({matchPatterns:{narrow:/^(ү\.ө\.|ү\.х\.|шөнө дунд|үд дунд|өглөө|өдөр|орой|шөнө)/i,any:/^(ү\.ө\.|ү\.х\.|шөнө дунд|үд дунд|өглөө|өдөр|орой|шөнө)/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^ү\.ө\./i,pm:/^ү\.х\./i,midnight:/^шөнө дунд/i,noon:/^үд дунд/i,morning:/өглөө/i,afternoon:/өдөр/i,evening:/орой/i,night:/шөнө/i}},defaultParseWidth:"any"})},Yl=Ql,ql={code:"mn",formatDistance:El,formatLong:Vl,formatRelative:Ul,localize:Ol,match:Yl,options:{weekStartsOn:1,firstWeekContainsDate:1}},Jl=ql,Rl={lessThanXSeconds:{one:"kurang dari 1 saat",other:"kurang dari {{count}} saat"},xSeconds:{one:"1 saat",other:"{{count}} saat"},halfAMinute:"setengah minit",lessThanXMinutes:{one:"kurang dari 1 minit",other:"kurang dari {{count}} minit"},xMinutes:{one:"1 minit",other:"{{count}} minit"},aboutXHours:{one:"sekitar 1 jam",other:"sekitar {{count}} jam"},xHours:{one:"1 jam",other:"{{count}} jam"},xDays:{one:"1 hari",other:"{{count}} hari"},aboutXWeeks:{one:"sekitar 1 minggu",other:"sekitar {{count}} minggu"},xWeeks:{one:"1 minggu",other:"{{count}} minggu"},aboutXMonths:{one:"sekitar 1 bulan",other:"sekitar {{count}} bulan"},xMonths:{one:"1 bulan",other:"{{count}} bulan"},aboutXYears:{one:"sekitar 1 tahun",other:"sekitar {{count}} tahun"},xYears:{one:"1 tahun",other:"{{count}} tahun"},overXYears:{one:"lebih dari 1 tahun",other:"lebih dari {{count}} tahun"},almostXYears:{one:"hampir 1 tahun",other:"hampir {{count}} tahun"}},Ll=function(e,t,a){var n,i=Rl[e];return n="string"==typeof i?i:1===t?i.one:i.other.replace("{{count}}",String(t)),null!=a&&a.addSuffix?a.comparison&&a.comparison>0?"dalam masa "+n:n+" yang lalu":n},Fl={date:Qa({formats:{full:"EEEE, d MMMM yyyy",long:"d MMMM yyyy",medium:"d MMM yyyy",short:"d/M/yyyy"},defaultWidth:"full"}),time:Qa({formats:{full:"HH.mm.ss",long:"HH.mm.ss",medium:"HH.mm",short:"HH.mm"},defaultWidth:"full"}),dateTime:Qa({formats:{full:"{{date}} 'pukul' {{time}}",long:"{{date}} 'pukul' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},Zl=Fl,_l={lastWeek:"eeee 'lepas pada jam' p",yesterday:"'Semalam pada jam' p",today:"'Hari ini pada jam' p",tomorrow:"'Esok pada jam' p",nextWeek:"eeee 'pada jam' p",other:"P"},$l=function(e,t,a,n){return _l[e]},eh={ordinalNumber:function(e,t){return"ke-"+Number(e)},era:Ra({values:{narrow:["SM","M"],abbreviated:["SM","M"],wide:["Sebelum Masihi","Masihi"]},defaultWidth:"wide"}),quarter:Ra({values:{narrow:["1","2","3","4"],abbreviated:["S1","S2","S3","S4"],wide:["Suku pertama","Suku kedua","Suku ketiga","Suku keempat"]},defaultWidth:"wide",argumentCallback:function(e){return e-1}}),month:Ra({values:{narrow:["J","F","M","A","M","J","J","O","S","O","N","D"],abbreviated:["Jan","Feb","Mac","Apr","Mei","Jun","Jul","Ogo","Sep","Okt","Nov","Dis"],wide:["Januari","Februari","Mac","April","Mei","Jun","Julai","Ogos","September","Oktober","November","Disember"]},defaultWidth:"wide"}),day:Ra({values:{narrow:["A","I","S","R","K","J","S"],short:["Ahd","Isn","Sel","Rab","Kha","Jum","Sab"],abbreviated:["Ahd","Isn","Sel","Rab","Kha","Jum","Sab"],wide:["Ahad","Isnin","Selasa","Rabu","Khamis","Jumaat","Sabtu"]},defaultWidth:"wide"}),dayPeriod:Ra({values:{narrow:{am:"am",pm:"pm",midnight:"tgh malam",noon:"tgh hari",morning:"pagi",afternoon:"tengah hari",evening:"petang",night:"malam"},abbreviated:{am:"AM",pm:"PM",midnight:"tengah malam",noon:"tengah hari",morning:"pagi",afternoon:"tengah hari",evening:"petang",night:"malam"},wide:{am:"a.m.",pm:"p.m.",midnight:"tengah malam",noon:"tengah hari",morning:"pagi",afternoon:"tengah hari",evening:"petang",night:"malam"}},defaultWidth:"wide",formattingValues:{narrow:{am:"am",pm:"pm",midnight:"tengah malam",noon:"tengah hari",morning:"pagi",afternoon:"tengah hari",evening:"petang",night:"malam"},abbreviated:{am:"AM",pm:"PM",midnight:"tengah malam",noon:"tengah hari",morning:"pagi",afternoon:"tengah hari",evening:"petang",night:"malam"},wide:{am:"a.m.",pm:"p.m.",midnight:"tengah malam",noon:"tengah hari",morning:"pagi",afternoon:"tengah hari",evening:"petang",night:"malam"}},defaultFormattingWidth:"wide"})},th=eh,ah={ordinalNumber:$a({matchPattern:/^ke-(\d+)?/i,parsePattern:/petama|\d+/i,valueCallback:function(e){return parseInt(e,10)}}),era:Fa({matchPatterns:{narrow:/^(sm|m)/i,abbreviated:/^(s\.?\s?m\.?|m\.?)/i,wide:/^(sebelum masihi|masihi)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^s/i,/^(m)/i]},defaultParseWidth:"any"}),quarter:Fa({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^S[1234]/i,wide:/Suku (pertama|kedua|ketiga|keempat)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/pertama|1/i,/kedua|2/i,/ketiga|3/i,/keempat|4/i]},defaultParseWidth:"any",valueCallback:function(e){return e+1}}),month:Fa({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mac|apr|mei|jun|jul|ogo|sep|okt|nov|dis)/i,wide:/^(januari|februari|mac|april|mei|jun|julai|ogos|september|oktober|november|disember)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^o/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^ma/i,/^ap/i,/^me/i,/^jun/i,/^jul/i,/^og/i,/^s/i,/^ok/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:Fa({matchPatterns:{narrow:/^[aisrkj]/i,short:/^(ahd|isn|sel|rab|kha|jum|sab)/i,abbreviated:/^(ahd|isn|sel|rab|kha|jum|sab)/i,wide:/^(ahad|isnin|selasa|rabu|khamis|jumaat|sabtu)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^a/i,/^i/i,/^s/i,/^r/i,/^k/i,/^j/i,/^s/i],any:[/^a/i,/^i/i,/^se/i,/^r/i,/^k/i,/^j/i,/^sa/i]},defaultParseWidth:"any"}),dayPeriod:Fa({matchPatterns:{narrow:/^(am|pm|tengah malam|tengah hari|pagi|petang|malam)/i,any:/^([ap]\.?\s?m\.?|tengah malam|tengah hari|pagi|petang|malam)/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^pm/i,midnight:/^tengah m/i,noon:/^tengah h/i,morning:/pa/i,afternoon:/tengah h/i,evening:/pe/i,night:/m/i}},defaultParseWidth:"any"})},nh=ah,ih={code:"ms",formatDistance:Ll,formatLong:Zl,formatRelative:$l,localize:th,match:nh,options:{weekStartsOn:1,firstWeekContainsDate:1}},rh=ih,oh={lessThanXSeconds:{one:"inqas minn sekonda",other:"inqas minn {{count}} sekondi"},xSeconds:{one:"sekonda",other:"{{count}} sekondi"},halfAMinute:"nofs minuta",lessThanXMinutes:{one:"inqas minn minuta",other:"inqas minn {{count}} minuti"},xMinutes:{one:"minuta",other:"{{count}} minuti"},aboutXHours:{one:"madwar siegħa",other:"madwar {{count}} siegħat"},xHours:{one:"siegħa",other:"{{count}} siegħat"},xDays:{one:"ġurnata",other:"{{count}} ġranet"},aboutXWeeks:{one:"madwar ġimgħa",other:"madwar {{count}} ġimgħat"},xWeeks:{one:"ġimgħa",other:"{{count}} ġimgħat"},aboutXMonths:{one:"madwar xahar",other:"madwar {{count}} xhur"},xMonths:{one:"xahar",other:"{{count}} xhur"},aboutXYears:{one:"madwar sena",two:"madwar sentejn",other:"madwar {{count}} snin"},xYears:{one:"sena",two:"sentejn",other:"{{count}} snin"},overXYears:{one:"aktar minn sena",two:"aktar minn sentejn",other:"aktar minn {{count}} snin"},almostXYears:{one:"kważi sena",two:"kważi sentejn",other:"kważi {{count}} snin"}},dh=function(e,t,a){var n,i=oh[e];return n="string"==typeof i?i:1===t?i.one:2===t&&i.two?i.two:i.other.replace("{{count}}",String(t)),null!=a&&a.addSuffix?a.comparison&&a.comparison>0?"f'"+n:n+" ilu":n},sh={date:Qa({formats:{full:"EEEE, d MMMM yyyy",long:"d MMMM yyyy",medium:"d MMM yyyy",short:"dd/MM/yyyy"},defaultWidth:"full"}),time:Qa({formats:{full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},defaultWidth:"full"}),dateTime:Qa({formats:{full:"{{date}} {{time}}",long:"{{date}} {{time}}",medium:"{{date}} {{time}}",short:"{{date}} {{time}}"},defaultWidth:"full"})},uh=sh,mh={lastWeek:"eeee 'li għadda' 'fil-'p",yesterday:"'Il-bieraħ fil-'p",today:"'Illum fil-'p",tomorrow:"'Għada fil-'p",nextWeek:"eeee 'fil-'p",other:"P"},lh=function(e,t,a,n){return mh[e]},hh={code:"mt",formatDistance:dh,formatLong:uh,formatRelative:lh,localize:{ordinalNumber:function(e,t){return Number(e)+"º"},era:Ra({values:{narrow:["Q","W"],abbreviated:["QK","WK"],wide:["qabel Kristu","wara Kristu"]},defaultWidth:"wide"}),quarter:Ra({values:{narrow:["1","2","3","4"],abbreviated:["K1","K2","K3","K4"],wide:["1. kwart","2. kwart","3. kwart","4. kwart"]},defaultWidth:"wide",argumentCallback:function(e){return e-1}}),month:Ra({values:{narrow:["J","F","M","A","M","Ġ","L","A","S","O","N","D"],abbreviated:["Jan","Fra","Mar","Apr","Mej","Ġun","Lul","Aww","Set","Ott","Nov","Diċ"],wide:["Jannar","Frar","Marzu","April","Mejju","Ġunju","Lulju","Awwissu","Settembru","Ottubru","Novembru","Diċembru"]},defaultWidth:"wide"}),day:Ra({values:{narrow:["Ħ","T","T","E","Ħ","Ġ","S"],short:["Ħa","Tn","Tl","Er","Ħa","Ġi","Si"],abbreviated:["Ħad","Tne","Tli","Erb","Ħam","Ġim","Sib"],wide:["Il-Ħadd","It-Tnejn","It-Tlieta","L-Erbgħa","Il-Ħamis","Il-Ġimgħa","Is-Sibt"]},defaultWidth:"wide"}),dayPeriod:Ra({values:{narrow:{am:"a",pm:"p",midnight:"nofsillejl",noon:"nofsinhar",morning:"għodwa",afternoon:"wara nofsinhar",evening:"filgħaxija",night:"lejl"},abbreviated:{am:"AM",pm:"PM",midnight:"nofsillejl",noon:"nofsinhar",morning:"għodwa",afternoon:"wara nofsinhar",evening:"filgħaxija",night:"lejl"},wide:{am:"a.m.",pm:"p.m.",midnight:"nofsillejl",noon:"nofsinhar",morning:"għodwa",afternoon:"wara nofsinhar",evening:"filgħaxija",night:"lejl"}},defaultWidth:"wide",formattingValues:{narrow:{am:"a",pm:"p",midnight:"f'nofsillejl",noon:"f'nofsinhar",morning:"filgħodu",afternoon:"wara nofsinhar",evening:"filgħaxija",night:"billejl"},abbreviated:{am:"AM",pm:"PM",midnight:"f'nofsillejl",noon:"f'nofsinhar",morning:"filgħodu",afternoon:"wara nofsinhar",evening:"filgħaxija",night:"billejl"},wide:{am:"a.m.",pm:"p.m.",midnight:"f'nofsillejl",noon:"f'nofsinhar",morning:"filgħodu",afternoon:"wara nofsinhar",evening:"filgħaxija",night:"billejl"}},defaultFormattingWidth:"wide"})},match:{ordinalNumber:$a({matchPattern:/^(\d+)(º)?/i,parsePattern:/\d+/i,valueCallback:function(e){return parseInt(e,10)}}),era:Fa({matchPatterns:{narrow:/^(q|w)/i,abbreviated:/^(q\.?\s?k\.?|b\.?\s?c\.?\s?e\.?|w\.?\s?k\.?)/i,wide:/^(qabel kristu|before common era|wara kristu|common era)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^(q|b)/i,/^(w|c)/i]},defaultParseWidth:"any"}),quarter:Fa({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^k[1234]/i,wide:/^[1234](\.)? kwart/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:function(e){return e+1}}),month:Fa({matchPatterns:{narrow:/^[jfmaglsond]/i,abbreviated:/^(jan|fra|mar|apr|mej|ġun|lul|aww|set|ott|nov|diċ)/i,wide:/^(jannar|frar|marzu|april|mejju|ġunju|lulju|awwissu|settembru|ottubru|novembru|diċembru)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^ġ/i,/^l/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^mej/i,/^ġ/i,/^l/i,/^aw/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:Fa({matchPatterns:{narrow:/^[ħteġs]/i,short:/^(ħa|tn|tl|er|ħa|ġi|si)/i,abbreviated:/^(ħad|tne|tli|erb|ħam|ġim|sib)/i,wide:/^(il-ħadd|it-tnejn|it-tlieta|l-erbgħa|il-ħamis|il-ġimgħa|is-sibt)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^ħ/i,/^t/i,/^t/i,/^e/i,/^ħ/i,/^ġ/i,/^s/i],any:[/^(il-)?ħad/i,/^(it-)?tn/i,/^(it-)?tl/i,/^(l-)?er/i,/^(il-)?ham/i,/^(il-)?ġi/i,/^(is-)?si/i]},defaultParseWidth:"any"}),dayPeriod:Fa({matchPatterns:{narrow:/^(a|p|f'nofsillejl|f'nofsinhar|(ta') (għodwa|wara nofsinhar|filgħaxija|lejl))/i,any:/^([ap]\.?\s?m\.?|f'nofsillejl|f'nofsinhar|(ta') (għodwa|wara nofsinhar|filgħaxija|lejl))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^f'nofsillejl/i,noon:/^f'nofsinhar/i,morning:/għodwa/i,afternoon:/wara(\s.*)nofsinhar/i,evening:/filgħaxija/i,night:/lejl/i}},defaultParseWidth:"any"})},options:{weekStartsOn:1,firstWeekContainsDate:4}},ch={lessThanXSeconds:{one:"mindre enn ett sekund",other:"mindre enn {{count}} sekunder"},xSeconds:{one:"ett sekund",other:"{{count}} sekunder"},halfAMinute:"et halvt minutt",lessThanXMinutes:{one:"mindre enn ett minutt",other:"mindre enn {{count}} minutter"},xMinutes:{one:"ett minutt",other:"{{count}} minutter"},aboutXHours:{one:"omtrent en time",other:"omtrent {{count}} timer"},xHours:{one:"en time",other:"{{count}} timer"},xDays:{one:"en dag",other:"{{count}} dager"},aboutXWeeks:{one:"omtrent en uke",other:"omtrent {{count}} uker"},xWeeks:{one:"en uke",other:"{{count}} uker"},aboutXMonths:{one:"omtrent en måned",other:"omtrent {{count}} måneder"},xMonths:{one:"en måned",other:"{{count}} måneder"},aboutXYears:{one:"omtrent ett år",other:"omtrent {{count}} år"},xYears:{one:"ett år",other:"{{count}} år"},overXYears:{one:"over ett år",other:"over {{count}} år"},almostXYears:{one:"nesten ett år",other:"nesten {{count}} år"}},fh=function(e,t,a){var n,i=ch[e];return n="string"==typeof i?i:1===t?i.one:i.other.replace("{{count}}",String(t)),null!=a&&a.addSuffix?a.comparison&&a.comparison>0?"om "+n:n+" siden":n},gh={date:Qa({formats:{full:"EEEE d. MMMM y",long:"d. MMMM y",medium:"d. MMM y",short:"dd.MM.y"},defaultWidth:"full"}),time:Qa({formats:{full:"'kl'. HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},defaultWidth:"full"}),dateTime:Qa({formats:{full:"{{date}} 'kl.' {{time}}",long:"{{date}} 'kl.' {{time}}",medium:"{{date}} {{time}}",short:"{{date}} {{time}}"},defaultWidth:"full"})},ph={lastWeek:"'forrige' eeee 'kl.' p",yesterday:"'i går kl.' p",today:"'i dag kl.' p",tomorrow:"'i morgen kl.' p",nextWeek:"EEEE 'kl.' p",other:"P"},vh={code:"nb",formatDistance:fh,formatLong:gh,formatRelative:function(e,t,a,n){return ph[e]},localize:{ordinalNumber:function(e,t){return Number(e)+"."},era:Ra({values:{narrow:["f.Kr.","e.Kr."],abbreviated:["f.Kr.","e.Kr."],wide:["før Kristus","etter Kristus"]},defaultWidth:"wide"}),quarter:Ra({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1. kvartal","2. kvartal","3. kvartal","4. kvartal"]},defaultWidth:"wide",argumentCallback:function(e){return e-1}}),month:Ra({values:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["jan.","feb.","mars","apr.","mai","juni","juli","aug.","sep.","okt.","nov.","des."],wide:["januar","februar","mars","april","mai","juni","juli","august","september","oktober","november","desember"]},defaultWidth:"wide"}),day:Ra({values:{narrow:["S","M","T","O","T","F","L"],short:["sø","ma","ti","on","to","fr","lø"],abbreviated:["søn","man","tir","ons","tor","fre","lør"],wide:["søndag","mandag","tirsdag","onsdag","torsdag","fredag","lørdag"]},defaultWidth:"wide"}),dayPeriod:Ra({values:{narrow:{am:"a",pm:"p",midnight:"midnatt",noon:"middag",morning:"på morg.",afternoon:"på etterm.",evening:"på kvelden",night:"på natten"},abbreviated:{am:"a.m.",pm:"p.m.",midnight:"midnatt",noon:"middag",morning:"på morg.",afternoon:"på etterm.",evening:"på kvelden",night:"på natten"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnatt",noon:"middag",morning:"på morgenen",afternoon:"på ettermiddagen",evening:"på kvelden",night:"på natten"}},defaultWidth:"wide"})},match:{ordinalNumber:$a({matchPattern:/^(\d+)\.?/i,parsePattern:/\d+/i,valueCallback:function(e){return parseInt(e,10)}}),era:Fa({matchPatterns:{narrow:/^(f\.? ?Kr\.?|fvt\.?|e\.? ?Kr\.?|evt\.?)/i,abbreviated:/^(f\.? ?Kr\.?|fvt\.?|e\.? ?Kr\.?|evt\.?)/i,wide:/^(før Kristus|før vår tid|etter Kristus|vår tid)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^f/i,/^e/i]},defaultParseWidth:"any"}),quarter:Fa({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](\.)? kvartal/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:function(e){return e+1}}),month:Fa({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mars?|apr|mai|juni?|juli?|aug|sep|okt|nov|des)\.?/i,wide:/^(januar|februar|mars|april|mai|juni|juli|august|september|oktober|november|desember)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^mai/i,/^jun/i,/^jul/i,/^aug/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:Fa({matchPatterns:{narrow:/^[smtofl]/i,short:/^(sø|ma|ti|on|to|fr|lø)/i,abbreviated:/^(søn|man|tir|ons|tor|fre|lør)/i,wide:/^(søndag|mandag|tirsdag|onsdag|torsdag|fredag|lørdag)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^s/i,/^m/i,/^ti/i,/^o/i,/^to/i,/^f/i,/^l/i]},defaultParseWidth:"any"}),dayPeriod:Fa({matchPatterns:{narrow:/^(midnatt|middag|(på) (morgenen|ettermiddagen|kvelden|natten)|[ap])/i,any:/^([ap]\.?\s?m\.?|midnatt|middag|(på) (morgenen|ettermiddagen|kvelden|natten))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a(\.?\s?m\.?)?$/i,pm:/^p(\.?\s?m\.?)?$/i,midnight:/^midn/i,noon:/^midd/i,morning:/morgen/i,afternoon:/ettermiddag/i,evening:/kveld/i,night:/natt/i}},defaultParseWidth:"any"})},options:{weekStartsOn:1,firstWeekContainsDate:4}},bh={lessThanXSeconds:{one:"minder dan een seconde",other:"minder dan {{count}} seconden"},xSeconds:{one:"1 seconde",other:"{{count}} seconden"},halfAMinute:"een halve minuut",lessThanXMinutes:{one:"minder dan een minuut",other:"minder dan {{count}} minuten"},xMinutes:{one:"een minuut",other:"{{count}} minuten"},aboutXHours:{one:"ongeveer 1 uur",other:"ongeveer {{count}} uur"},xHours:{one:"1 uur",other:"{{count}} uur"},xDays:{one:"1 dag",other:"{{count}} dagen"},aboutXWeeks:{one:"ongeveer 1 week",other:"ongeveer {{count}} weken"},xWeeks:{one:"1 week",other:"{{count}} weken"},aboutXMonths:{one:"ongeveer 1 maand",other:"ongeveer {{count}} maanden"},xMonths:{one:"1 maand",other:"{{count}} maanden"},aboutXYears:{one:"ongeveer 1 jaar",other:"ongeveer {{count}} jaar"},xYears:{one:"1 jaar",other:"{{count}} jaar"},overXYears:{one:"meer dan 1 jaar",other:"meer dan {{count}} jaar"},almostXYears:{one:"bijna 1 jaar",other:"bijna {{count}} jaar"}},wh=function(e,t,a){var n,i=bh[e];return n="string"==typeof i?i:1===t?i.one:i.other.replace("{{count}}",String(t)),null!=a&&a.addSuffix?a.comparison&&a.comparison>0?"over "+n:n+" geleden":n},yh={date:Qa({formats:{full:"EEEE d MMMM y",long:"d MMMM y",medium:"d MMM y",short:"dd-MM-y"},defaultWidth:"full"}),time:Qa({formats:{full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},defaultWidth:"full"}),dateTime:Qa({formats:{full:"{{date}} 'om' {{time}}",long:"{{date}} 'om' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},Ah={lastWeek:"'afgelopen' eeee 'om' p",yesterday:"'gisteren om' p",today:"'vandaag om' p",tomorrow:"'morgen om' p",nextWeek:"eeee 'om' p",other:"P"},kh={code:"nl",formatDistance:wh,formatLong:yh,formatRelative:function(e,t,a,n){return Ah[e]},localize:{ordinalNumber:function(e,t){return Number(e)+"e"},era:Ra({values:{narrow:["v.C.","n.C."],abbreviated:["v.Chr.","n.Chr."],wide:["voor Christus","na Christus"]},defaultWidth:"wide"}),quarter:Ra({values:{narrow:["1","2","3","4"],abbreviated:["K1","K2","K3","K4"],wide:["1e kwartaal","2e kwartaal","3e kwartaal","4e kwartaal"]},defaultWidth:"wide",argumentCallback:function(e){return e-1}}),month:Ra({values:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["jan.","feb.","mrt.","apr.","mei","jun.","jul.","aug.","sep.","okt.","nov.","dec."],wide:["januari","februari","maart","april","mei","juni","juli","augustus","september","oktober","november","december"]},defaultWidth:"wide"}),day:Ra({values:{narrow:["Z","M","D","W","D","V","Z"],short:["zo","ma","di","wo","do","vr","za"],abbreviated:["zon","maa","din","woe","don","vri","zat"],wide:["zondag","maandag","dinsdag","woensdag","donderdag","vrijdag","zaterdag"]},defaultWidth:"wide"}),dayPeriod:Ra({values:{narrow:{am:"AM",pm:"PM",midnight:"middernacht",noon:"het middaguur",morning:"'s ochtends",afternoon:"'s middags",evening:"'s avonds",night:"'s nachts"},abbreviated:{am:"AM",pm:"PM",midnight:"middernacht",noon:"het middaguur",morning:"'s ochtends",afternoon:"'s middags",evening:"'s avonds",night:"'s nachts"},wide:{am:"AM",pm:"PM",midnight:"middernacht",noon:"het middaguur",morning:"'s ochtends",afternoon:"'s middags",evening:"'s avonds",night:"'s nachts"}},defaultWidth:"wide"})},match:{ordinalNumber:$a({matchPattern:/^(\d+)e?/i,parsePattern:/\d+/i,valueCallback:function(e){return parseInt(e,10)}}),era:Fa({matchPatterns:{narrow:/^([vn]\.? ?C\.?)/,abbreviated:/^([vn]\. ?Chr\.?)/,wide:/^((voor|na) Christus)/},defaultMatchWidth:"wide",parsePatterns:{any:[/^v/,/^n/]},defaultParseWidth:"any"}),quarter:Fa({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^K[1234]/i,wide:/^[1234]e kwartaal/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:function(e){return e+1}}),month:Fa({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan.|feb.|mrt.|apr.|mei|jun.|jul.|aug.|sep.|okt.|nov.|dec.)/i,wide:/^(januari|februari|maart|april|mei|juni|juli|augustus|september|oktober|november|december)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^jan/i,/^feb/i,/^m(r|a)/i,/^apr/i,/^mei/i,/^jun/i,/^jul/i,/^aug/i,/^sep/i,/^okt/i,/^nov/i,/^dec/i]},defaultParseWidth:"any"}),day:Fa({matchPatterns:{narrow:/^[zmdwv]/i,short:/^(zo|ma|di|wo|do|vr|za)/i,abbreviated:/^(zon|maa|din|woe|don|vri|zat)/i,wide:/^(zondag|maandag|dinsdag|woensdag|donderdag|vrijdag|zaterdag)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^z/i,/^m/i,/^d/i,/^w/i,/^d/i,/^v/i,/^z/i],any:[/^zo/i,/^ma/i,/^di/i,/^wo/i,/^do/i,/^vr/i,/^za/i]},defaultParseWidth:"any"}),dayPeriod:Fa({matchPatterns:{any:/^(am|pm|middernacht|het middaguur|'s (ochtends|middags|avonds|nachts))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^am/i,pm:/^pm/i,midnight:/^middernacht/i,noon:/^het middaguur/i,morning:/ochtend/i,afternoon:/middag/i,evening:/avond/i,night:/nacht/i}},defaultParseWidth:"any"})},options:{weekStartsOn:1,firstWeekContainsDate:4}},Mh={lessThanXSeconds:{one:"minder dan een seconde",other:"minder dan {{count}} seconden"},xSeconds:{one:"1 seconde",other:"{{count}} seconden"},halfAMinute:"een halve minuut",lessThanXMinutes:{one:"minder dan een minuut",other:"minder dan {{count}} minuten"},xMinutes:{one:"een minuut",other:"{{count}} minuten"},aboutXHours:{one:"ongeveer 1 uur",other:"ongeveer {{count}} uur"},xHours:{one:"1 uur",other:"{{count}} uur"},xDays:{one:"1 dag",other:"{{count}} dagen"},aboutXWeeks:{one:"ongeveer 1 week",other:"ongeveer {{count}} weken"},xWeeks:{one:"1 week",other:"{{count}} weken"},aboutXMonths:{one:"ongeveer 1 maand",other:"ongeveer {{count}} maanden"},xMonths:{one:"1 maand",other:"{{count}} maanden"},aboutXYears:{one:"ongeveer 1 jaar",other:"ongeveer {{count}} jaar"},xYears:{one:"1 jaar",other:"{{count}} jaar"},overXYears:{one:"meer dan 1 jaar",other:"meer dan {{count}} jaar"},almostXYears:{one:"bijna 1 jaar",other:"bijna {{count}} jaar"}},Ph=function(e,t,a){var n,i=Mh[e];return n="string"==typeof i?i:1===t?i.one:i.other.replace("{{count}}",String(t)),null!=a&&a.addSuffix?a.comparison&&a.comparison>0?"over "+n:n+" geleden":n},Wh={date:Qa({formats:{full:"EEEE d MMMM y",long:"d MMMM y",medium:"d MMM y",short:"dd.MM.y"},defaultWidth:"full"}),time:Qa({formats:{full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},defaultWidth:"full"}),dateTime:Qa({formats:{full:"{{date}} 'om' {{time}}",long:"{{date}} 'om' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},xh={lastWeek:"'vorige' eeee 'om' p",yesterday:"'gisteren om' p",today:"'vandaag om' p",tomorrow:"'morgen om' p",nextWeek:"eeee 'om' p",other:"P"},zh={code:"nl-BE",formatDistance:Ph,formatLong:Wh,formatRelative:function(e,t,a,n){return xh[e]},localize:{ordinalNumber:function(e,t){return Number(e)+"e"},era:Ra({values:{narrow:["v.C.","n.C."],abbreviated:["v.Chr.","n.Chr."],wide:["voor Christus","na Christus"]},defaultWidth:"wide"}),quarter:Ra({values:{narrow:["1","2","3","4"],abbreviated:["K1","K2","K3","K4"],wide:["1e kwartaal","2e kwartaal","3e kwartaal","4e kwartaal"]},defaultWidth:"wide",argumentCallback:function(e){return e-1}}),month:Ra({values:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["jan.","feb.","mrt.","apr.","mei","jun.","jul.","aug.","sep.","okt.","nov.","dec."],wide:["januari","februari","maart","april","mei","juni","juli","augustus","september","oktober","november","december"]},defaultWidth:"wide"}),day:Ra({values:{narrow:["Z","M","D","W","D","V","Z"],short:["zo","ma","di","wo","do","vr","za"],abbreviated:["zon","maa","din","woe","don","vri","zat"],wide:["zondag","maandag","dinsdag","woensdag","donderdag","vrijdag","zaterdag"]},defaultWidth:"wide"}),dayPeriod:Ra({values:{narrow:{am:"AM",pm:"PM",midnight:"middernacht",noon:"het middag",morning:"'s ochtends",afternoon:"'s namiddags",evening:"'s avonds",night:"'s nachts"},abbreviated:{am:"AM",pm:"PM",midnight:"middernacht",noon:"het middag",morning:"'s ochtends",afternoon:"'s namiddags",evening:"'s avonds",night:"'s nachts"},wide:{am:"AM",pm:"PM",midnight:"middernacht",noon:"het middag",morning:"'s ochtends",afternoon:"'s namiddags",evening:"'s avonds",night:"'s nachts"}},defaultWidth:"wide"})},match:{ordinalNumber:$a({matchPattern:/^(\d+)e?/i,parsePattern:/\d+/i,valueCallback:function(e){return parseInt(e,10)}}),era:Fa({matchPatterns:{narrow:/^([vn]\.? ?C\.?)/,abbreviated:/^([vn]\. ?Chr\.?)/,wide:/^((voor|na) Christus)/},defaultMatchWidth:"wide",parsePatterns:{any:[/^v/,/^n/]},defaultParseWidth:"any"}),quarter:Fa({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^K[1234]/i,wide:/^[1234]e kwartaal/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:function(e){return e+1}}),month:Fa({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan.|feb.|mrt.|apr.|mei|jun.|jul.|aug.|sep.|okt.|nov.|dec.)/i,wide:/^(januari|februari|maart|april|mei|juni|juli|augustus|september|oktober|november|december)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^jan/i,/^feb/i,/^m(r|a)/i,/^apr/i,/^mei/i,/^jun/i,/^jul/i,/^aug/i,/^sep/i,/^okt/i,/^nov/i,/^dec/i]},defaultParseWidth:"any"}),day:Fa({matchPatterns:{narrow:/^[zmdwv]/i,short:/^(zo|ma|di|wo|do|vr|za)/i,abbreviated:/^(zon|maa|din|woe|don|vri|zat)/i,wide:/^(zondag|maandag|dinsdag|woensdag|donderdag|vrijdag|zaterdag)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^z/i,/^m/i,/^d/i,/^w/i,/^d/i,/^v/i,/^z/i],any:[/^zo/i,/^ma/i,/^di/i,/^wo/i,/^do/i,/^vr/i,/^za/i]},defaultParseWidth:"any"}),dayPeriod:Fa({matchPatterns:{any:/^(am|pm|middernacht|het middaguur|'s (ochtends|middags|avonds|nachts))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^am/i,pm:/^pm/i,midnight:/^middernacht/i,noon:/^het middaguur/i,morning:/ochtend/i,afternoon:/middag/i,evening:/avond/i,night:/nacht/i}},defaultParseWidth:"any"})},options:{weekStartsOn:1,firstWeekContainsDate:4}},jh={lessThanXSeconds:{one:"mindre enn eitt sekund",other:"mindre enn {{count}} sekund"},xSeconds:{one:"eitt sekund",other:"{{count}} sekund"},halfAMinute:"eit halvt minutt",lessThanXMinutes:{one:"mindre enn eitt minutt",other:"mindre enn {{count}} minutt"},xMinutes:{one:"eitt minutt",other:"{{count}} minutt"},aboutXHours:{one:"omtrent ein time",other:"omtrent {{count}} timar"},xHours:{one:"ein time",other:"{{count}} timar"},xDays:{one:"ein dag",other:"{{count}} dagar"},aboutXWeeks:{one:"omtrent ei veke",other:"omtrent {{count}} veker"},xWeeks:{one:"ei veke",other:"{{count}} veker"},aboutXMonths:{one:"omtrent ein månad",other:"omtrent {{count}} månader"},xMonths:{one:"ein månad",other:"{{count}} månader"},aboutXYears:{one:"omtrent eitt år",other:"omtrent {{count}} år"},xYears:{one:"eitt år",other:"{{count}} år"},overXYears:{one:"over eitt år",other:"over {{count}} år"},almostXYears:{one:"nesten eitt år",other:"nesten {{count}} år"}},Ch=["null","ein","to","tre","fire","fem","seks","sju","åtte","ni","ti","elleve","tolv"],Th=function(e,t,a){var n,i=jh[e];return n="string"==typeof i?i:1===t?i.one:a&&a.onlyNumeric?i.other.replace("{{count}}",String(t)):i.other.replace("{{count}}",t<13?Ch[t]:String(t)),null!=a&&a.addSuffix?a.comparison&&a.comparison>0?"om "+n:n+" sidan":n},Sh={date:Qa({formats:{full:"EEEE d. MMMM y",long:"d. MMMM y",medium:"d. MMM y",short:"dd.MM.y"},defaultWidth:"full"}),time:Qa({formats:{full:"'kl'. HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},defaultWidth:"full"}),dateTime:Qa({formats:{full:"{{date}} 'kl.' {{time}}",long:"{{date}} 'kl.' {{time}}",medium:"{{date}} {{time}}",short:"{{date}} {{time}}"},defaultWidth:"full"})},Hh={lastWeek:"'førre' eeee 'kl.' p",yesterday:"'i går kl.' p",today:"'i dag kl.' p",tomorrow:"'i morgon kl.' p",nextWeek:"EEEE 'kl.' p",other:"P"},Dh={code:"nn",formatDistance:Th,formatLong:Sh,formatRelative:function(e,t,a,n){return Hh[e]},localize:{ordinalNumber:function(e,t){return Number(e)+"."},era:Ra({values:{narrow:["f.Kr.","e.Kr."],abbreviated:["f.Kr.","e.Kr."],wide:["før Kristus","etter Kristus"]},defaultWidth:"wide"}),quarter:Ra({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1. kvartal","2. kvartal","3. kvartal","4. kvartal"]},defaultWidth:"wide",argumentCallback:function(e){return e-1}}),month:Ra({values:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["jan.","feb.","mars","apr.","mai","juni","juli","aug.","sep.","okt.","nov.","des."],wide:["januar","februar","mars","april","mai","juni","juli","august","september","oktober","november","desember"]},defaultWidth:"wide"}),day:Ra({values:{narrow:["S","M","T","O","T","F","L"],short:["su","må","ty","on","to","fr","lau"],abbreviated:["sun","mån","tys","ons","tor","fre","laur"],wide:["sundag","måndag","tysdag","onsdag","torsdag","fredag","laurdag"]},defaultWidth:"wide"}),dayPeriod:Ra({values:{narrow:{am:"a",pm:"p",midnight:"midnatt",noon:"middag",morning:"på morg.",afternoon:"på etterm.",evening:"på kvelden",night:"på natta"},abbreviated:{am:"a.m.",pm:"p.m.",midnight:"midnatt",noon:"middag",morning:"på morg.",afternoon:"på etterm.",evening:"på kvelden",night:"på natta"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnatt",noon:"middag",morning:"på morgonen",afternoon:"på ettermiddagen",evening:"på kvelden",night:"på natta"}},defaultWidth:"wide"})},match:{ordinalNumber:$a({matchPattern:/^(\d+)\.?/i,parsePattern:/\d+/i,valueCallback:function(e){return parseInt(e,10)}}),era:Fa({matchPatterns:{narrow:/^(f\.? ?Kr\.?|fvt\.?|e\.? ?Kr\.?|evt\.?)/i,abbreviated:/^(f\.? ?Kr\.?|fvt\.?|e\.? ?Kr\.?|evt\.?)/i,wide:/^(før Kristus|før vår tid|etter Kristus|vår tid)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^f/i,/^e/i]},defaultParseWidth:"any"}),quarter:Fa({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](\.)? kvartal/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:function(e){return e+1}}),month:Fa({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mars?|apr|mai|juni?|juli?|aug|sep|okt|nov|des)\.?/i,wide:/^(januar|februar|mars|april|mai|juni|juli|august|september|oktober|november|desember)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^mai/i,/^jun/i,/^jul/i,/^aug/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:Fa({matchPatterns:{narrow:/^[smtofl]/i,short:/^(su|må|ty|on|to|fr|la)/i,abbreviated:/^(sun|mån|tys|ons|tor|fre|laur)/i,wide:/^(sundag|måndag|tysdag|onsdag|torsdag|fredag|laurdag)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^s/i,/^m/i,/^ty/i,/^o/i,/^to/i,/^f/i,/^l/i]},defaultParseWidth:"any"}),dayPeriod:Fa({matchPatterns:{narrow:/^(midnatt|middag|(på) (morgonen|ettermiddagen|kvelden|natta)|[ap])/i,any:/^([ap]\.?\s?m\.?|midnatt|middag|(på) (morgonen|ettermiddagen|kvelden|natta))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a(\.?\s?m\.?)?$/i,pm:/^p(\.?\s?m\.?)?$/i,midnight:/^midn/i,noon:/^midd/i,morning:/morgon/i,afternoon:/ettermiddag/i,evening:/kveld/i,night:/natt/i}},defaultParseWidth:"any"})},options:{weekStartsOn:1,firstWeekContainsDate:4}},Nh={lessThanXSeconds:{one:"mens d’una segonda",other:"mens de {{count}} segondas"},xSeconds:{one:"1 segonda",other:"{{count}} segondas"},halfAMinute:"30 segondas",lessThanXMinutes:{one:"mens d’una minuta",other:"mens de {{count}} minutas"},xMinutes:{one:"1 minuta",other:"{{count}} minutas"},aboutXHours:{one:"environ 1 ora",other:"environ {{count}} oras"},xHours:{one:"1 ora",other:"{{count}} oras"},xDays:{one:"1 jorn",other:"{{count}} jorns"},aboutXWeeks:{one:"environ 1 setmana",other:"environ {{count}} setmanas"},xWeeks:{one:"1 setmana",other:"{{count}} setmanas"},aboutXMonths:{one:"environ 1 mes",other:"environ {{count}} meses"},xMonths:{one:"1 mes",other:"{{count}} meses"},aboutXYears:{one:"environ 1 an",other:"environ {{count}} ans"},xYears:{one:"1 an",other:"{{count}} ans"},overXYears:{one:"mai d’un an",other:"mai de {{count}} ans"},almostXYears:{one:"gaireben un an",other:"gaireben {{count}} ans"}},Xh=function(e,t,a){var n,i=Nh[e];return n="string"==typeof i?i:1===t?i.one:i.other.replace("{{count}}",String(t)),null!=a&&a.addSuffix?a.comparison&&a.comparison>0?"d’aquí "+n:"fa "+n:n},Ih={date:Qa({formats:{full:"EEEE d 'de' MMMM y",long:"d 'de' MMMM y",medium:"d MMM y",short:"dd/MM/y"},defaultWidth:"full"}),time:Qa({formats:{full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},defaultWidth:"full"}),dateTime:Qa({formats:{full:"{{date}} 'a' {{time}}",long:"{{date}} 'a' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},Eh={lastWeek:"eeee 'passat a' p",yesterday:"'ièr a' p",today:"'uèi a' p",tomorrow:"'deman a' p",nextWeek:"eeee 'a' p",other:"P"},Bh={code:"oc",formatDistance:Xh,formatLong:Ih,formatRelative:function(e,t,a,n){return Eh[e]},localize:{ordinalNumber:function(e,t){var a,n=Number(e),i=null==t?void 0:t.unit;switch(n){case 1:a="èr";break;case 2:a="nd";break;default:a="en"}return"year"!==i&&"week"!==i&&"hour"!==i&&"minute"!==i&&"second"!==i||(a+="a"),n+a},era:Ra({values:{narrow:["ab. J.C.","apr. J.C."],abbreviated:["ab. J.C.","apr. J.C."],wide:["abans Jèsus-Crist","après Jèsus-Crist"]},defaultWidth:"wide"}),quarter:Ra({values:{narrow:["T1","T2","T3","T4"],abbreviated:["1èr trim.","2nd trim.","3en trim.","4en trim."],wide:["1èr trimèstre","2nd trimèstre","3en trimèstre","4en trimèstre"]},defaultWidth:"wide",argumentCallback:function(e){return e-1}}),month:Ra({values:{narrow:["GN","FB","MÇ","AB","MA","JN","JL","AG","ST","OC","NV","DC"],abbreviated:["gen.","febr.","març","abr.","mai","junh","jul.","ag.","set.","oct.","nov.","dec."],wide:["genièr","febrièr","març","abril","mai","junh","julhet","agost","setembre","octòbre","novembre","decembre"]},defaultWidth:"wide"}),day:Ra({values:{narrow:["dg.","dl.","dm.","dc.","dj.","dv.","ds."],short:["dg.","dl.","dm.","dc.","dj.","dv.","ds."],abbreviated:["dg.","dl.","dm.","dc.","dj.","dv.","ds."],wide:["dimenge","diluns","dimars","dimècres","dijòus","divendres","dissabte"]},defaultWidth:"wide"}),dayPeriod:Ra({values:{narrow:{am:"am",pm:"pm",midnight:"mièjanuèch",noon:"miègjorn",morning:"matin",afternoon:"aprèp-miègjorn",evening:"vèspre",night:"nuèch"},abbreviated:{am:"a.m.",pm:"p.m.",midnight:"mièjanuèch",noon:"miègjorn",morning:"matin",afternoon:"aprèp-miègjorn",evening:"vèspre",night:"nuèch"},wide:{am:"a.m.",pm:"p.m.",midnight:"mièjanuèch",noon:"miègjorn",morning:"matin",afternoon:"aprèp-miègjorn",evening:"vèspre",night:"nuèch"}},defaultWidth:"wide",formattingValues:{narrow:{am:"am",pm:"pm",midnight:"mièjanuèch",noon:"miègjorn",morning:"del matin",afternoon:"de l’aprèp-miègjorn",evening:"del ser",night:"de la nuèch"},abbreviated:{am:"AM",pm:"PM",midnight:"mièjanuèch",noon:"miègjorn",morning:"del matin",afternoon:"de l’aprèp-miègjorn",evening:"del ser",night:"de la nuèch"},wide:{am:"ante meridiem",pm:"post meridiem",midnight:"mièjanuèch",noon:"miègjorn",morning:"del matin",afternoon:"de l’aprèp-miègjorn",evening:"del ser",night:"de la nuèch"}},defaultFormattingWidth:"wide"})},match:{ordinalNumber:$a({matchPattern:/^(\d+)(èr|nd|en)?[a]?/i,parsePattern:/\d+/i,valueCallback:function(e){return parseInt(e,10)}}),era:Fa({matchPatterns:{narrow:/^(ab\.J\.C|apr\.J\.C|apr\.J\.-C)/i,abbreviated:/^(ab\.J\.-C|ab\.J-C|apr\.J\.-C|apr\.J-C|ap\.J-C)/i,wide:/^(abans Jèsus-Crist|après Jèsus-Crist)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^ab/i,/^ap/i]},defaultParseWidth:"any"}),quarter:Fa({matchPatterns:{narrow:/^T[1234]/i,abbreviated:/^[1234](èr|nd|en)? trim\.?/i,wide:/^[1234](èr|nd|en)? trimèstre/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:function(e){return e+1}}),month:Fa({matchPatterns:{narrow:/^(GN|FB|MÇ|AB|MA|JN|JL|AG|ST|OC|NV|DC)/i,abbreviated:/^(gen|febr|març|abr|mai|junh|jul|ag|set|oct|nov|dec)\.?/i,wide:/^(genièr|febrièr|març|abril|mai|junh|julhet|agost|setembre|octòbre|novembre|decembre)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^g/i,/^f/i,/^ma[r?]|MÇ/i,/^ab/i,/^ma[i?]/i,/^ju[n?]|JN/i,/^ju[l?]|JL/i,/^ag/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:Fa({matchPatterns:{narrow:/^d[glmcjvs]\.?/i,short:/^d[glmcjvs]\.?/i,abbreviated:/^d[glmcjvs]\.?/i,wide:/^(dimenge|diluns|dimars|dimècres|dijòus|divendres|dissabte)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^dg/i,/^dl/i,/^dm/i,/^dc/i,/^dj/i,/^dv/i,/^ds/i],short:[/^dg/i,/^dl/i,/^dm/i,/^dc/i,/^dj/i,/^dv/i,/^ds/i],abbreviated:[/^dg/i,/^dl/i,/^dm/i,/^dc/i,/^dj/i,/^dv/i,/^ds/i],any:[/^dg|dime/i,/^dl|dil/i,/^dm|dima/i,/^dc|dimè/i,/^dj|dij/i,/^dv|div/i,/^ds|dis/i]},defaultParseWidth:"any"}),dayPeriod:Fa({matchPatterns:{any:/(^(a\.?m|p\.?m))|(ante meridiem|post meridiem)|((del |de la |de l’)(matin|aprèp-miègjorn|vèspre|ser|nuèch))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/(^a)|ante meridiem/i,pm:/(^p)|post meridiem/i,midnight:/^mièj/i,noon:/^mièg/i,morning:/matin/i,afternoon:/aprèp-miègjorn/i,evening:/vèspre|ser/i,night:/nuèch/i}},defaultParseWidth:"any"})},options:{weekStartsOn:1,firstWeekContainsDate:4}},Vh={lessThanXSeconds:{one:{regular:"mniej niż sekunda",past:"mniej niż sekundę",future:"mniej niż sekundę"},twoFour:"mniej niż {{count}} sekundy",other:"mniej niż {{count}} sekund"},xSeconds:{one:{regular:"sekunda",past:"sekundę",future:"sekundę"},twoFour:"{{count}} sekundy",other:"{{count}} sekund"},halfAMinute:{one:"pół minuty",twoFour:"pół minuty",other:"pół minuty"},lessThanXMinutes:{one:{regular:"mniej niż minuta",past:"mniej niż minutę",future:"mniej niż minutę"},twoFour:"mniej niż {{count}} minuty",other:"mniej niż {{count}} minut"},xMinutes:{one:{regular:"minuta",past:"minutę",future:"minutę"},twoFour:"{{count}} minuty",other:"{{count}} minut"},aboutXHours:{one:{regular:"około godziny",past:"około godziny",future:"około godzinę"},twoFour:"około {{count}} godziny",other:"około {{count}} godzin"},xHours:{one:{regular:"godzina",past:"godzinę",future:"godzinę"},twoFour:"{{count}} godziny",other:"{{count}} godzin"},xDays:{one:{regular:"dzień",past:"dzień",future:"1 dzień"},twoFour:"{{count}} dni",other:"{{count}} dni"},aboutXWeeks:{one:"około tygodnia",twoFour:"około {{count}} tygodni",other:"około {{count}} tygodni"},xWeeks:{one:"tydzień",twoFour:"{{count}} tygodnie",other:"{{count}} tygodni"},aboutXMonths:{one:"około miesiąc",twoFour:"około {{count}} miesiące",other:"około {{count}} miesięcy"},xMonths:{one:"miesiąc",twoFour:"{{count}} miesiące",other:"{{count}} miesięcy"},aboutXYears:{one:"około rok",twoFour:"około {{count}} lata",other:"około {{count}} lat"},xYears:{one:"rok",twoFour:"{{count}} lata",other:"{{count}} lat"},overXYears:{one:"ponad rok",twoFour:"ponad {{count}} lata",other:"ponad {{count}} lat"},almostXYears:{one:"prawie rok",twoFour:"prawie {{count}} lata",other:"prawie {{count}} lat"}};function Kh(e,t,a){var n=function(e,t){if(1===t)return e.one;var a=t%100;if(a<=20&&a>10)return e.other;var n=a%10;return n>=2&&n<=4?e.twoFour:e.other}(e,t);return("string"==typeof n?n:n[a]).replace("{{count}}",String(t))}var Uh=function(e,t,a){var n=Vh[e];return null!=a&&a.addSuffix?a.comparison&&a.comparison>0?"za "+Kh(n,t,"future"):Kh(n,t,"past")+" temu":Kh(n,t,"regular")},Gh={date:Qa({formats:{full:"EEEE, do MMMM y",long:"do MMMM y",medium:"do MMM y",short:"dd.MM.y"},defaultWidth:"full"}),time:Qa({formats:{full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},defaultWidth:"full"}),dateTime:Qa({formats:{full:"{{date}} {{time}}",long:"{{date}} {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},Oh={masculine:"ostatni",feminine:"ostatnia"},Qh={masculine:"ten",feminine:"ta"},Yh={masculine:"następny",feminine:"następna"},qh={0:"feminine",1:"masculine",2:"masculine",3:"feminine",4:"masculine",5:"masculine",6:"feminine"};function Jh(e,t,a,n){var i;if(yi(t,a,n))i=Qh;else if("lastWeek"===e)i=Oh;else{if("nextWeek"!==e)throw new Error("Cannot determine adjectives for token ".concat(e));i=Yh}var r=t.getUTCDay(),o=i[qh[r]];return"'".concat(o,"' eeee 'o' p")}var Rh={lastWeek:Jh,yesterday:"'wczoraj o' p",today:"'dzisiaj o' p",tomorrow:"'jutro o' p",nextWeek:Jh,other:"P"},Lh=function(e,t,a,n){var i=Rh[e];return"function"==typeof i?i(e,t,a,n):i},Fh={code:"pl",formatDistance:Uh,formatLong:Gh,formatRelative:Lh,localize:{ordinalNumber:function(e,t){return String(e)},era:Ra({values:{narrow:["p.n.e.","n.e."],abbreviated:["p.n.e.","n.e."],wide:["przed naszą erą","naszej ery"]},defaultWidth:"wide"}),quarter:Ra({values:{narrow:["1","2","3","4"],abbreviated:["I kw.","II kw.","III kw.","IV kw."],wide:["I kwartał","II kwartał","III kwartał","IV kwartał"]},defaultWidth:"wide",argumentCallback:function(e){return e-1}}),month:Ra({values:{narrow:["S","L","M","K","M","C","L","S","W","P","L","G"],abbreviated:["sty","lut","mar","kwi","maj","cze","lip","sie","wrz","paź","lis","gru"],wide:["styczeń","luty","marzec","kwiecień","maj","czerwiec","lipiec","sierpień","wrzesień","październik","listopad","grudzień"]},defaultWidth:"wide",formattingValues:{narrow:["s","l","m","k","m","c","l","s","w","p","l","g"],abbreviated:["sty","lut","mar","kwi","maj","cze","lip","sie","wrz","paź","lis","gru"],wide:["stycznia","lutego","marca","kwietnia","maja","czerwca","lipca","sierpnia","września","października","listopada","grudnia"]},defaultFormattingWidth:"wide"}),day:Ra({values:{narrow:["N","P","W","Ś","C","P","S"],short:["nie","pon","wto","śro","czw","pią","sob"],abbreviated:["niedz.","pon.","wt.","śr.","czw.","pt.","sob."],wide:["niedziela","poniedziałek","wtorek","środa","czwartek","piątek","sobota"]},defaultWidth:"wide",formattingValues:{narrow:["n","p","w","ś","c","p","s"],short:["nie","pon","wto","śro","czw","pią","sob"],abbreviated:["niedz.","pon.","wt.","śr.","czw.","pt.","sob."],wide:["niedziela","poniedziałek","wtorek","środa","czwartek","piątek","sobota"]},defaultFormattingWidth:"wide"}),dayPeriod:Ra({values:{narrow:{am:"a",pm:"p",midnight:"półn.",noon:"poł",morning:"rano",afternoon:"popoł.",evening:"wiecz.",night:"noc"},abbreviated:{am:"AM",pm:"PM",midnight:"północ",noon:"południe",morning:"rano",afternoon:"popołudnie",evening:"wieczór",night:"noc"},wide:{am:"AM",pm:"PM",midnight:"północ",noon:"południe",morning:"rano",afternoon:"popołudnie",evening:"wieczór",night:"noc"}},defaultWidth:"wide",formattingValues:{narrow:{am:"a",pm:"p",midnight:"o półn.",noon:"w poł.",morning:"rano",afternoon:"po poł.",evening:"wiecz.",night:"w nocy"},abbreviated:{am:"AM",pm:"PM",midnight:"o północy",noon:"w południe",morning:"rano",afternoon:"po południu",evening:"wieczorem",night:"w nocy"},wide:{am:"AM",pm:"PM",midnight:"o północy",noon:"w południe",morning:"rano",afternoon:"po południu",evening:"wieczorem",night:"w nocy"}},defaultFormattingWidth:"wide"})},match:{ordinalNumber:$a({matchPattern:/^(\d+)?/i,parsePattern:/\d+/i,valueCallback:function(e){return parseInt(e,10)}}),era:Fa({matchPatterns:{narrow:/^(p\.?\s*n\.?\s*e\.?\s*|n\.?\s*e\.?\s*)/i,abbreviated:/^(p\.?\s*n\.?\s*e\.?\s*|n\.?\s*e\.?\s*)/i,wide:/^(przed\s*nasz(ą|a)\s*er(ą|a)|naszej\s*ery)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^p/i,/^n/i]},defaultParseWidth:"any"}),quarter:Fa({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^(I|II|III|IV)\s*kw\.?/i,wide:/^(I|II|III|IV)\s*kwarta(ł|l)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/1/i,/2/i,/3/i,/4/i],any:[/^I kw/i,/^II kw/i,/^III kw/i,/^IV kw/i]},defaultParseWidth:"any",valueCallback:function(e){return e+1}}),month:Fa({matchPatterns:{narrow:/^[slmkcwpg]/i,abbreviated:/^(sty|lut|mar|kwi|maj|cze|lip|sie|wrz|pa(ź|z)|lis|gru)/i,wide:/^(stycznia|stycze(ń|n)|lutego|luty|marca|marzec|kwietnia|kwiecie(ń|n)|maja|maj|czerwca|czerwiec|lipca|lipiec|sierpnia|sierpie(ń|n)|wrze(ś|s)nia|wrzesie(ń|n)|pa(ź|z)dziernika|pa(ź|z)dziernik|listopada|listopad|grudnia|grudzie(ń|n))/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^s/i,/^l/i,/^m/i,/^k/i,/^m/i,/^c/i,/^l/i,/^s/i,/^w/i,/^p/i,/^l/i,/^g/i],any:[/^st/i,/^lu/i,/^mar/i,/^k/i,/^maj/i,/^c/i,/^lip/i,/^si/i,/^w/i,/^p/i,/^lis/i,/^g/i]},defaultParseWidth:"any"}),day:Fa({matchPatterns:{narrow:/^[npwścs]/i,short:/^(nie|pon|wto|(ś|s)ro|czw|pi(ą|a)|sob)/i,abbreviated:/^(niedz|pon|wt|(ś|s)r|czw|pt|sob)\.?/i,wide:/^(niedziela|poniedzia(ł|l)ek|wtorek|(ś|s)roda|czwartek|pi(ą|a)tek|sobota)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^n/i,/^p/i,/^w/i,/^ś/i,/^c/i,/^p/i,/^s/i],abbreviated:[/^n/i,/^po/i,/^w/i,/^(ś|s)r/i,/^c/i,/^pt/i,/^so/i],any:[/^n/i,/^po/i,/^w/i,/^(ś|s)r/i,/^c/i,/^pi/i,/^so/i]},defaultParseWidth:"any"}),dayPeriod:Fa({matchPatterns:{narrow:/^(^a$|^p$|pó(ł|l)n\.?|o\s*pó(ł|l)n\.?|po(ł|l)\.?|w\s*po(ł|l)\.?|po\s*po(ł|l)\.?|rano|wiecz\.?|noc|w\s*nocy)/i,any:/^(am|pm|pó(ł|l)noc|o\s*pó(ł|l)nocy|po(ł|l)udnie|w\s*po(ł|l)udnie|popo(ł|l)udnie|po\s*po(ł|l)udniu|rano|wieczór|wieczorem|noc|w\s*nocy)/i},defaultMatchWidth:"any",parsePatterns:{narrow:{am:/^a$/i,pm:/^p$/i,midnight:/pó(ł|l)n/i,noon:/po(ł|l)/i,morning:/rano/i,afternoon:/po\s*po(ł|l)/i,evening:/wiecz/i,night:/noc/i},any:{am:/^am/i,pm:/^pm/i,midnight:/pó(ł|l)n/i,noon:/po(ł|l)/i,morning:/rano/i,afternoon:/po\s*po(ł|l)/i,evening:/wiecz/i,night:/noc/i}},defaultParseWidth:"any"})},options:{weekStartsOn:1,firstWeekContainsDate:4}},Zh={lessThanXSeconds:{one:"menos de um segundo",other:"menos de {{count}} segundos"},xSeconds:{one:"1 segundo",other:"{{count}} segundos"},halfAMinute:"meio minuto",lessThanXMinutes:{one:"menos de um minuto",other:"menos de {{count}} minutos"},xMinutes:{one:"1 minuto",other:"{{count}} minutos"},aboutXHours:{one:"aproximadamente 1 hora",other:"aproximadamente {{count}} horas"},xHours:{one:"1 hora",other:"{{count}} horas"},xDays:{one:"1 dia",other:"{{count}} dias"},aboutXWeeks:{one:"aproximadamente 1 semana",other:"aproximadamente {{count}} semanas"},xWeeks:{one:"1 semana",other:"{{count}} semanas"},aboutXMonths:{one:"aproximadamente 1 mês",other:"aproximadamente {{count}} meses"},xMonths:{one:"1 mês",other:"{{count}} meses"},aboutXYears:{one:"aproximadamente 1 ano",other:"aproximadamente {{count}} anos"},xYears:{one:"1 ano",other:"{{count}} anos"},overXYears:{one:"mais de 1 ano",other:"mais de {{count}} anos"},almostXYears:{one:"quase 1 ano",other:"quase {{count}} anos"}},_h=function(e,t,a){var n,i=Zh[e];return n="string"==typeof i?i:1===t?i.one:i.other.replace("{{count}}",String(t)),null!=a&&a.addSuffix?a.comparison&&a.comparison>0?"daqui a "+n:"há "+n:n},$h={date:Qa({formats:{full:"EEEE, d 'de' MMMM 'de' y",long:"d 'de' MMMM 'de' y",medium:"d 'de' MMM 'de' y",short:"dd/MM/y"},defaultWidth:"full"}),time:Qa({formats:{full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},defaultWidth:"full"}),dateTime:Qa({formats:{full:"{{date}} 'às' {{time}}",long:"{{date}} 'às' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},ec={lastWeek:function(e){var t=e.getUTCDay();return"'"+(0===t||6===t?"último":"última")+"' eeee 'às' p"},yesterday:"'ontem às' p",today:"'hoje às' p",tomorrow:"'amanhã às' p",nextWeek:"eeee 'às' p",other:"P"},tc=function(e,t,a,n){var i=ec[e];return"function"==typeof i?i(t):i},ac={code:"pt",formatDistance:_h,formatLong:$h,formatRelative:tc,localize:{ordinalNumber:function(e,t){return Number(e)+"º"},era:Ra({values:{narrow:["aC","dC"],abbreviated:["a.C.","d.C."],wide:["antes de Cristo","depois de Cristo"]},defaultWidth:"wide"}),quarter:Ra({values:{narrow:["1","2","3","4"],abbreviated:["T1","T2","T3","T4"],wide:["1º trimestre","2º trimestre","3º trimestre","4º trimestre"]},defaultWidth:"wide",argumentCallback:function(e){return e-1}}),month:Ra({values:{narrow:["j","f","m","a","m","j","j","a","s","o","n","d"],abbreviated:["jan","fev","mar","abr","mai","jun","jul","ago","set","out","nov","dez"],wide:["janeiro","fevereiro","março","abril","maio","junho","julho","agosto","setembro","outubro","novembro","dezembro"]},defaultWidth:"wide"}),day:Ra({values:{narrow:["d","s","t","q","q","s","s"],short:["dom","seg","ter","qua","qui","sex","sáb"],abbreviated:["dom","seg","ter","qua","qui","sex","sáb"],wide:["domingo","segunda-feira","terça-feira","quarta-feira","quinta-feira","sexta-feira","sábado"]},defaultWidth:"wide"}),dayPeriod:Ra({values:{narrow:{am:"AM",pm:"PM",midnight:"meia-noite",noon:"meio-dia",morning:"manhã",afternoon:"tarde",evening:"noite",night:"madrugada"},abbreviated:{am:"AM",pm:"PM",midnight:"meia-noite",noon:"meio-dia",morning:"manhã",afternoon:"tarde",evening:"noite",night:"madrugada"},wide:{am:"AM",pm:"PM",midnight:"meia-noite",noon:"meio-dia",morning:"manhã",afternoon:"tarde",evening:"noite",night:"madrugada"}},defaultWidth:"wide",formattingValues:{narrow:{am:"AM",pm:"PM",midnight:"meia-noite",noon:"meio-dia",morning:"da manhã",afternoon:"da tarde",evening:"da noite",night:"da madrugada"},abbreviated:{am:"AM",pm:"PM",midnight:"meia-noite",noon:"meio-dia",morning:"da manhã",afternoon:"da tarde",evening:"da noite",night:"da madrugada"},wide:{am:"AM",pm:"PM",midnight:"meia-noite",noon:"meio-dia",morning:"da manhã",afternoon:"da tarde",evening:"da noite",night:"da madrugada"}},defaultFormattingWidth:"wide"})},match:{ordinalNumber:$a({matchPattern:/^(\d+)(º|ª)?/i,parsePattern:/\d+/i,valueCallback:function(e){return parseInt(e,10)}}),era:Fa({matchPatterns:{narrow:/^(ac|dc|a|d)/i,abbreviated:/^(a\.?\s?c\.?|a\.?\s?e\.?\s?c\.?|d\.?\s?c\.?|e\.?\s?c\.?)/i,wide:/^(antes de cristo|antes da era comum|depois de cristo|era comum)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^ac/i,/^dc/i],wide:[/^(antes de cristo|antes da era comum)/i,/^(depois de cristo|era comum)/i]},defaultParseWidth:"any"}),quarter:Fa({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^T[1234]/i,wide:/^[1234](º|ª)? trimestre/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:function(e){return e+1}}),month:Fa({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|fev|mar|abr|mai|jun|jul|ago|set|out|nov|dez)/i,wide:/^(janeiro|fevereiro|março|abril|maio|junho|julho|agosto|setembro|outubro|novembro|dezembro)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ab/i,/^mai/i,/^jun/i,/^jul/i,/^ag/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:Fa({matchPatterns:{narrow:/^[dstq]/i,short:/^(dom|seg|ter|qua|qui|sex|s[áa]b)/i,abbreviated:/^(dom|seg|ter|qua|qui|sex|s[áa]b)/i,wide:/^(domingo|segunda-?\s?feira|terça-?\s?feira|quarta-?\s?feira|quinta-?\s?feira|sexta-?\s?feira|s[áa]bado)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^d/i,/^s/i,/^t/i,/^q/i,/^q/i,/^s/i,/^s/i],any:[/^d/i,/^seg/i,/^t/i,/^qua/i,/^qui/i,/^sex/i,/^s[áa]/i]},defaultParseWidth:"any"}),dayPeriod:Fa({matchPatterns:{narrow:/^(a|p|meia-?\s?noite|meio-?\s?dia|(da) (manh[ãa]|tarde|noite|madrugada))/i,any:/^([ap]\.?\s?m\.?|meia-?\s?noite|meio-?\s?dia|(da) (manh[ãa]|tarde|noite|madrugada))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^meia/i,noon:/^meio/i,morning:/manh[ãa]/i,afternoon:/tarde/i,evening:/noite/i,night:/madrugada/i}},defaultParseWidth:"any"})},options:{weekStartsOn:1,firstWeekContainsDate:4}},nc={lessThanXSeconds:{one:"menos de um segundo",other:"menos de {{count}} segundos"},xSeconds:{one:"1 segundo",other:"{{count}} segundos"},halfAMinute:"meio minuto",lessThanXMinutes:{one:"menos de um minuto",other:"menos de {{count}} minutos"},xMinutes:{one:"1 minuto",other:"{{count}} minutos"},aboutXHours:{one:"cerca de 1 hora",other:"cerca de {{count}} horas"},xHours:{one:"1 hora",other:"{{count}} horas"},xDays:{one:"1 dia",other:"{{count}} dias"},aboutXWeeks:{one:"cerca de 1 semana",other:"cerca de {{count}} semanas"},xWeeks:{one:"1 semana",other:"{{count}} semanas"},aboutXMonths:{one:"cerca de 1 mês",other:"cerca de {{count}} meses"},xMonths:{one:"1 mês",other:"{{count}} meses"},aboutXYears:{one:"cerca de 1 ano",other:"cerca de {{count}} anos"},xYears:{one:"1 ano",other:"{{count}} anos"},overXYears:{one:"mais de 1 ano",other:"mais de {{count}} anos"},almostXYears:{one:"quase 1 ano",other:"quase {{count}} anos"}},ic=function(e,t,a){var n,i=nc[e];return n="string"==typeof i?i:1===t?i.one:i.other.replace("{{count}}",String(t)),null!=a&&a.addSuffix?a.comparison&&a.comparison>0?"em "+n:"há "+n:n},rc={date:Qa({formats:{full:"EEEE, d 'de' MMMM 'de' y",long:"d 'de' MMMM 'de' y",medium:"d MMM y",short:"dd/MM/yyyy"},defaultWidth:"full"}),time:Qa({formats:{full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},defaultWidth:"full"}),dateTime:Qa({formats:{full:"{{date}} 'às' {{time}}",long:"{{date}} 'às' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},oc={lastWeek:function(e){var t=e.getUTCDay();return"'"+(0===t||6===t?"último":"última")+"' eeee 'às' p"},yesterday:"'ontem às' p",today:"'hoje às' p",tomorrow:"'amanhã às' p",nextWeek:"eeee 'às' p",other:"P"},dc=function(e,t,a,n){var i=oc[e];return"function"==typeof i?i(t):i},sc={code:"pt-BR",formatDistance:ic,formatLong:rc,formatRelative:dc,localize:{ordinalNumber:function(e,t){var a=Number(e);return"week"===(null==t?void 0:t.unit)?a+"ª":a+"º"},era:Ra({values:{narrow:["AC","DC"],abbreviated:["AC","DC"],wide:["antes de cristo","depois de cristo"]},defaultWidth:"wide"}),quarter:Ra({values:{narrow:["1","2","3","4"],abbreviated:["T1","T2","T3","T4"],wide:["1º trimestre","2º trimestre","3º trimestre","4º trimestre"]},defaultWidth:"wide",argumentCallback:function(e){return e-1}}),month:Ra({values:{narrow:["j","f","m","a","m","j","j","a","s","o","n","d"],abbreviated:["jan","fev","mar","abr","mai","jun","jul","ago","set","out","nov","dez"],wide:["janeiro","fevereiro","março","abril","maio","junho","julho","agosto","setembro","outubro","novembro","dezembro"]},defaultWidth:"wide"}),day:Ra({values:{narrow:["D","S","T","Q","Q","S","S"],short:["dom","seg","ter","qua","qui","sex","sab"],abbreviated:["domingo","segunda","terça","quarta","quinta","sexta","sábado"],wide:["domingo","segunda-feira","terça-feira","quarta-feira","quinta-feira","sexta-feira","sábado"]},defaultWidth:"wide"}),dayPeriod:Ra({values:{narrow:{am:"a",pm:"p",midnight:"mn",noon:"md",morning:"manhã",afternoon:"tarde",evening:"tarde",night:"noite"},abbreviated:{am:"AM",pm:"PM",midnight:"meia-noite",noon:"meio-dia",morning:"manhã",afternoon:"tarde",evening:"tarde",night:"noite"},wide:{am:"a.m.",pm:"p.m.",midnight:"meia-noite",noon:"meio-dia",morning:"manhã",afternoon:"tarde",evening:"tarde",night:"noite"}},defaultWidth:"wide",formattingValues:{narrow:{am:"a",pm:"p",midnight:"mn",noon:"md",morning:"da manhã",afternoon:"da tarde",evening:"da tarde",night:"da noite"},abbreviated:{am:"AM",pm:"PM",midnight:"meia-noite",noon:"meio-dia",morning:"da manhã",afternoon:"da tarde",evening:"da tarde",night:"da noite"},wide:{am:"a.m.",pm:"p.m.",midnight:"meia-noite",noon:"meio-dia",morning:"da manhã",afternoon:"da tarde",evening:"da tarde",night:"da noite"}},defaultFormattingWidth:"wide"})},match:{ordinalNumber:$a({matchPattern:/^(\d+)[ºªo]?/i,parsePattern:/\d+/i,valueCallback:function(e){return parseInt(e,10)}}),era:Fa({matchPatterns:{narrow:/^(ac|dc|a|d)/i,abbreviated:/^(a\.?\s?c\.?|d\.?\s?c\.?)/i,wide:/^(antes de cristo|depois de cristo)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^ac/i,/^dc/i],wide:[/^antes de cristo/i,/^depois de cristo/i]},defaultParseWidth:"any"}),quarter:Fa({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^T[1234]/i,wide:/^[1234](º)? trimestre/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:function(e){return e+1}}),month:Fa({matchPatterns:{narrow:/^[jfmajsond]/i,abbreviated:/^(jan|fev|mar|abr|mai|jun|jul|ago|set|out|nov|dez)/i,wide:/^(janeiro|fevereiro|março|abril|maio|junho|julho|agosto|setembro|outubro|novembro|dezembro)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^fev/i,/^mar/i,/^abr/i,/^mai/i,/^jun/i,/^jul/i,/^ago/i,/^set/i,/^out/i,/^nov/i,/^dez/i]},defaultParseWidth:"any"}),day:Fa({matchPatterns:{narrow:/^(dom|[23456]ª?|s[aá]b)/i,short:/^(dom|[23456]ª?|s[aá]b)/i,abbreviated:/^(dom|seg|ter|qua|qui|sex|s[aá]b)/i,wide:/^(domingo|(segunda|ter[cç]a|quarta|quinta|sexta)([- ]feira)?|s[aá]bado)/i},defaultMatchWidth:"wide",parsePatterns:{short:[/^d/i,/^2/i,/^3/i,/^4/i,/^5/i,/^6/i,/^s[aá]/i],narrow:[/^d/i,/^2/i,/^3/i,/^4/i,/^5/i,/^6/i,/^s[aá]/i],any:[/^d/i,/^seg/i,/^t/i,/^qua/i,/^qui/i,/^sex/i,/^s[aá]b/i]},defaultParseWidth:"any"}),dayPeriod:Fa({matchPatterns:{narrow:/^(a|p|mn|md|(da) (manhã|tarde|noite))/i,any:/^([ap]\.?\s?m\.?|meia[-\s]noite|meio[-\s]dia|(da) (manhã|tarde|noite))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mn|^meia[-\s]noite/i,noon:/^md|^meio[-\s]dia/i,morning:/manhã/i,afternoon:/tarde/i,evening:/tarde/i,night:/noite/i}},defaultParseWidth:"any"})},options:{weekStartsOn:0,firstWeekContainsDate:1}},uc={lessThanXSeconds:{one:"mai puțin de o secundă",other:"mai puțin de {{count}} secunde"},xSeconds:{one:"1 secundă",other:"{{count}} secunde"},halfAMinute:"jumătate de minut",lessThanXMinutes:{one:"mai puțin de un minut",other:"mai puțin de {{count}} minute"},xMinutes:{one:"1 minut",other:"{{count}} minute"},aboutXHours:{one:"circa 1 oră",other:"circa {{count}} ore"},xHours:{one:"1 oră",other:"{{count}} ore"},xDays:{one:"1 zi",other:"{{count}} zile"},aboutXWeeks:{one:"circa o săptămână",other:"circa {{count}} săptămâni"},xWeeks:{one:"1 săptămână",other:"{{count}} săptămâni"},aboutXMonths:{one:"circa 1 lună",other:"circa {{count}} luni"},xMonths:{one:"1 lună",other:"{{count}} luni"},aboutXYears:{one:"circa 1 an",other:"circa {{count}} ani"},xYears:{one:"1 an",other:"{{count}} ani"},overXYears:{one:"peste 1 an",other:"peste {{count}} ani"},almostXYears:{one:"aproape 1 an",other:"aproape {{count}} ani"}},mc=function(e,t,a){var n,i=uc[e];return n="string"==typeof i?i:1===t?i.one:i.other.replace("{{count}}",String(t)),null!=a&&a.addSuffix?a.comparison&&a.comparison>0?"în "+n:n+" în urmă":n},lc={date:Qa({formats:{full:"EEEE, d MMMM yyyy",long:"d MMMM yyyy",medium:"d MMM yyyy",short:"dd.MM.yyyy"},defaultWidth:"full"}),time:Qa({formats:{full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},defaultWidth:"full"}),dateTime:Qa({formats:{full:"{{date}} 'la' {{time}}",long:"{{date}} 'la' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},hc={lastWeek:"eeee 'trecută la' p",yesterday:"'ieri la' p",today:"'astăzi la' p",tomorrow:"'mâine la' p",nextWeek:"eeee 'viitoare la' p",other:"P"},cc={code:"ro",formatDistance:mc,formatLong:lc,formatRelative:function(e,t,a,n){return hc[e]},localize:{ordinalNumber:function(e,t){return String(e)},era:Ra({values:{narrow:["Î","D"],abbreviated:["Î.d.C.","D.C."],wide:["Înainte de Cristos","După Cristos"]},defaultWidth:"wide"}),quarter:Ra({values:{narrow:["1","2","3","4"],abbreviated:["T1","T2","T3","T4"],wide:["primul trimestru","al doilea trimestru","al treilea trimestru","al patrulea trimestru"]},defaultWidth:"wide",argumentCallback:function(e){return e-1}}),month:Ra({values:{narrow:["I","F","M","A","M","I","I","A","S","O","N","D"],abbreviated:["ian","feb","mar","apr","mai","iun","iul","aug","sep","oct","noi","dec"],wide:["ianuarie","februarie","martie","aprilie","mai","iunie","iulie","august","septembrie","octombrie","noiembrie","decembrie"]},defaultWidth:"wide"}),day:Ra({values:{narrow:["d","l","m","m","j","v","s"],short:["du","lu","ma","mi","jo","vi","sâ"],abbreviated:["dum","lun","mar","mie","joi","vin","sâm"],wide:["duminică","luni","marți","miercuri","joi","vineri","sâmbătă"]},defaultWidth:"wide"}),dayPeriod:Ra({values:{narrow:{am:"a",pm:"p",midnight:"mn",noon:"ami",morning:"dim",afternoon:"da",evening:"s",night:"n"},abbreviated:{am:"AM",pm:"PM",midnight:"miezul nopții",noon:"amiază",morning:"dimineață",afternoon:"după-amiază",evening:"seară",night:"noapte"},wide:{am:"a.m.",pm:"p.m.",midnight:"miezul nopții",noon:"amiază",morning:"dimineață",afternoon:"după-amiază",evening:"seară",night:"noapte"}},defaultWidth:"wide",formattingValues:{narrow:{am:"a",pm:"p",midnight:"mn",noon:"amiază",morning:"dimineață",afternoon:"după-amiază",evening:"seară",night:"noapte"},abbreviated:{am:"AM",pm:"PM",midnight:"miezul nopții",noon:"amiază",morning:"dimineață",afternoon:"după-amiază",evening:"seară",night:"noapte"},wide:{am:"a.m.",pm:"p.m.",midnight:"miezul nopții",noon:"amiază",morning:"dimineață",afternoon:"după-amiază",evening:"seară",night:"noapte"}},defaultFormattingWidth:"wide"})},match:{ordinalNumber:$a({matchPattern:/^(\d+)?/i,parsePattern:/\d+/i,valueCallback:function(e){return parseInt(e,10)}}),era:Fa({matchPatterns:{narrow:/^(Î|D)/i,abbreviated:/^(Î\.?\s?d\.?\s?C\.?|Î\.?\s?e\.?\s?n\.?|D\.?\s?C\.?|e\.?\s?n\.?)/i,wide:/^(Înainte de Cristos|Înaintea erei noastre|După Cristos|Era noastră)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^ÎC/i,/^DC/i],wide:[/^(Înainte de Cristos|Înaintea erei noastre)/i,/^(După Cristos|Era noastră)/i]},defaultParseWidth:"any"}),quarter:Fa({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^T[1234]/i,wide:/^trimestrul [1234]/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:function(e){return e+1}}),month:Fa({matchPatterns:{narrow:/^[ifmaasond]/i,abbreviated:/^(ian|feb|mar|apr|mai|iun|iul|aug|sep|oct|noi|dec)/i,wide:/^(ianuarie|februarie|martie|aprilie|mai|iunie|iulie|august|septembrie|octombrie|noiembrie|decembrie)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^i/i,/^f/i,/^m/i,/^a/i,/^m/i,/^i/i,/^i/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ia/i,/^f/i,/^mar/i,/^ap/i,/^mai/i,/^iun/i,/^iul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:Fa({matchPatterns:{narrow:/^[dlmjvs]/i,short:/^(d|l|ma|mi|j|v|s)/i,abbreviated:/^(dum|lun|mar|mie|jo|vi|sâ)/i,wide:/^(duminica|luni|marţi|miercuri|joi|vineri|sâmbătă)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^d/i,/^l/i,/^m/i,/^m/i,/^j/i,/^v/i,/^s/i],any:[/^d/i,/^l/i,/^ma/i,/^mi/i,/^j/i,/^v/i,/^s/i]},defaultParseWidth:"any"}),dayPeriod:Fa({matchPatterns:{narrow:/^(a|p|mn|a|(dimineaţa|după-amiaza|seara|noaptea))/i,any:/^([ap]\.?\s?m\.?|miezul nopții|amiaza|(dimineaţa|după-amiaza|seara|noaptea))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mn/i,noon:/amiaza/i,morning:/dimineaţa/i,afternoon:/după-amiaza/i,evening:/seara/i,night:/noaptea/i}},defaultParseWidth:"any"})},options:{weekStartsOn:1,firstWeekContainsDate:1}};function fc(e,t){if(void 0!==e.one&&1===t)return e.one;var a=t%10,n=t%100;return 1===a&&11!==n?e.singularNominative.replace("{{count}}",String(t)):a>=2&&a<=4&&(n<10||n>20)?e.singularGenitive.replace("{{count}}",String(t)):e.pluralGenitive.replace("{{count}}",String(t))}function gc(e){return function(t,a){return null!=a&&a.addSuffix?a.comparison&&a.comparison>0?e.future?fc(e.future,t):"через "+fc(e.regular,t):e.past?fc(e.past,t):fc(e.regular,t)+" назад":fc(e.regular,t)}}var pc={lessThanXSeconds:gc({regular:{one:"меньше секунды",singularNominative:"меньше {{count}} секунды",singularGenitive:"меньше {{count}} секунд",pluralGenitive:"меньше {{count}} секунд"},future:{one:"меньше, чем через секунду",singularNominative:"меньше, чем через {{count}} секунду",singularGenitive:"меньше, чем через {{count}} секунды",pluralGenitive:"меньше, чем через {{count}} секунд"}}),xSeconds:gc({regular:{singularNominative:"{{count}} секунда",singularGenitive:"{{count}} секунды",pluralGenitive:"{{count}} секунд"},past:{singularNominative:"{{count}} секунду назад",singularGenitive:"{{count}} секунды назад",pluralGenitive:"{{count}} секунд назад"},future:{singularNominative:"через {{count}} секунду",singularGenitive:"через {{count}} секунды",pluralGenitive:"через {{count}} секунд"}}),halfAMinute:function(e,t){return null!=t&&t.addSuffix?t.comparison&&t.comparison>0?"через полминуты":"полминуты назад":"полминуты"},lessThanXMinutes:gc({regular:{one:"меньше минуты",singularNominative:"меньше {{count}} минуты",singularGenitive:"меньше {{count}} минут",pluralGenitive:"меньше {{count}} минут"},future:{one:"меньше, чем через минуту",singularNominative:"меньше, чем через {{count}} минуту",singularGenitive:"меньше, чем через {{count}} минуты",pluralGenitive:"меньше, чем через {{count}} минут"}}),xMinutes:gc({regular:{singularNominative:"{{count}} минута",singularGenitive:"{{count}} минуты",pluralGenitive:"{{count}} минут"},past:{singularNominative:"{{count}} минуту назад",singularGenitive:"{{count}} минуты назад",pluralGenitive:"{{count}} минут назад"},future:{singularNominative:"через {{count}} минуту",singularGenitive:"через {{count}} минуты",pluralGenitive:"через {{count}} минут"}}),aboutXHours:gc({regular:{singularNominative:"около {{count}} часа",singularGenitive:"около {{count}} часов",pluralGenitive:"около {{count}} часов"},future:{singularNominative:"приблизительно через {{count}} час",singularGenitive:"приблизительно через {{count}} часа",pluralGenitive:"приблизительно через {{count}} часов"}}),xHours:gc({regular:{singularNominative:"{{count}} час",singularGenitive:"{{count}} часа",pluralGenitive:"{{count}} часов"}}),xDays:gc({regular:{singularNominative:"{{count}} день",singularGenitive:"{{count}} дня",pluralGenitive:"{{count}} дней"}}),aboutXWeeks:gc({regular:{singularNominative:"около {{count}} недели",singularGenitive:"около {{count}} недель",pluralGenitive:"около {{count}} недель"},future:{singularNominative:"приблизительно через {{count}} неделю",singularGenitive:"приблизительно через {{count}} недели",pluralGenitive:"приблизительно через {{count}} недель"}}),xWeeks:gc({regular:{singularNominative:"{{count}} неделя",singularGenitive:"{{count}} недели",pluralGenitive:"{{count}} недель"}}),aboutXMonths:gc({regular:{singularNominative:"около {{count}} месяца",singularGenitive:"около {{count}} месяцев",pluralGenitive:"около {{count}} месяцев"},future:{singularNominative:"приблизительно через {{count}} месяц",singularGenitive:"приблизительно через {{count}} месяца",pluralGenitive:"приблизительно через {{count}} месяцев"}}),xMonths:gc({regular:{singularNominative:"{{count}} месяц",singularGenitive:"{{count}} месяца",pluralGenitive:"{{count}} месяцев"}}),aboutXYears:gc({regular:{singularNominative:"около {{count}} года",singularGenitive:"около {{count}} лет",pluralGenitive:"около {{count}} лет"},future:{singularNominative:"приблизительно через {{count}} год",singularGenitive:"приблизительно через {{count}} года",pluralGenitive:"приблизительно через {{count}} лет"}}),xYears:gc({regular:{singularNominative:"{{count}} год",singularGenitive:"{{count}} года",pluralGenitive:"{{count}} лет"}}),overXYears:gc({regular:{singularNominative:"больше {{count}} года",singularGenitive:"больше {{count}} лет",pluralGenitive:"больше {{count}} лет"},future:{singularNominative:"больше, чем через {{count}} год",singularGenitive:"больше, чем через {{count}} года",pluralGenitive:"больше, чем через {{count}} лет"}}),almostXYears:gc({regular:{singularNominative:"почти {{count}} год",singularGenitive:"почти {{count}} года",pluralGenitive:"почти {{count}} лет"},future:{singularNominative:"почти через {{count}} год",singularGenitive:"почти через {{count}} года",pluralGenitive:"почти через {{count}} лет"}})},vc=function(e,t,a){return pc[e](t,a)},bc={date:Qa({formats:{full:"EEEE, d MMMM y 'г.'",long:"d MMMM y 'г.'",medium:"d MMM y 'г.'",short:"dd.MM.y"},defaultWidth:"full"}),time:Qa({formats:{full:"H:mm:ss zzzz",long:"H:mm:ss z",medium:"H:mm:ss",short:"H:mm"},defaultWidth:"full"}),dateTime:Qa({formats:{any:"{{date}}, {{time}}"},defaultWidth:"any"})},wc=["воскресенье","понедельник","вторник","среду","четверг","пятницу","субботу"];function yc(e){var t=wc[e];return 2===e?"'во "+t+" в' p":"'в "+t+" в' p"}var Ac={lastWeek:function(e,t,a){var n=e.getUTCDay();return yi(e,t,a)?yc(n):function(e){var t=wc[e];switch(e){case 0:return"'в прошлое "+t+" в' p";case 1:case 2:case 4:return"'в прошлый "+t+" в' p";case 3:case 5:case 6:return"'в прошлую "+t+" в' p"}}(n)},yesterday:"'вчера в' p",today:"'сегодня в' p",tomorrow:"'завтра в' p",nextWeek:function(e,t,a){var n=e.getUTCDay();return yi(e,t,a)?yc(n):function(e){var t=wc[e];switch(e){case 0:return"'в следующее "+t+" в' p";case 1:case 2:case 4:return"'в следующий "+t+" в' p";case 3:case 5:case 6:return"'в следующую "+t+" в' p"}}(n)},other:"P"},kc=function(e,t,a,n){var i=Ac[e];return"function"==typeof i?i(t,a,n):i},Mc={code:"ru",formatDistance:vc,formatLong:bc,formatRelative:kc,localize:{ordinalNumber:function(e,t){var a=Number(e),n=null==t?void 0:t.unit;return a+("date"===n?"-е":"week"===n||"minute"===n||"second"===n?"-я":"-й")},era:Ra({values:{narrow:["до н.э.","н.э."],abbreviated:["до н. э.","н. э."],wide:["до нашей эры","нашей эры"]},defaultWidth:"wide"}),quarter:Ra({values:{narrow:["1","2","3","4"],abbreviated:["1-й кв.","2-й кв.","3-й кв.","4-й кв."],wide:["1-й квартал","2-й квартал","3-й квартал","4-й квартал"]},defaultWidth:"wide",argumentCallback:function(e){return e-1}}),month:Ra({values:{narrow:["Я","Ф","М","А","М","И","И","А","С","О","Н","Д"],abbreviated:["янв.","фев.","март","апр.","май","июнь","июль","авг.","сент.","окт.","нояб.","дек."],wide:["январь","февраль","март","апрель","май","июнь","июль","август","сентябрь","октябрь","ноябрь","декабрь"]},defaultWidth:"wide",formattingValues:{narrow:["Я","Ф","М","А","М","И","И","А","С","О","Н","Д"],abbreviated:["янв.","фев.","мар.","апр.","мая","июн.","июл.","авг.","сент.","окт.","нояб.","дек."],wide:["января","февраля","марта","апреля","мая","июня","июля","августа","сентября","октября","ноября","декабря"]},defaultFormattingWidth:"wide"}),day:Ra({values:{narrow:["В","П","В","С","Ч","П","С"],short:["вс","пн","вт","ср","чт","пт","сб"],abbreviated:["вск","пнд","втр","срд","чтв","птн","суб"],wide:["воскресенье","понедельник","вторник","среда","четверг","пятница","суббота"]},defaultWidth:"wide"}),dayPeriod:Ra({values:{narrow:{am:"ДП",pm:"ПП",midnight:"полн.",noon:"полд.",morning:"утро",afternoon:"день",evening:"веч.",night:"ночь"},abbreviated:{am:"ДП",pm:"ПП",midnight:"полн.",noon:"полд.",morning:"утро",afternoon:"день",evening:"веч.",night:"ночь"},wide:{am:"ДП",pm:"ПП",midnight:"полночь",noon:"полдень",morning:"утро",afternoon:"день",evening:"вечер",night:"ночь"}},defaultWidth:"any",formattingValues:{narrow:{am:"ДП",pm:"ПП",midnight:"полн.",noon:"полд.",morning:"утра",afternoon:"дня",evening:"веч.",night:"ночи"},abbreviated:{am:"ДП",pm:"ПП",midnight:"полн.",noon:"полд.",morning:"утра",afternoon:"дня",evening:"веч.",night:"ночи"},wide:{am:"ДП",pm:"ПП",midnight:"полночь",noon:"полдень",morning:"утра",afternoon:"дня",evening:"вечера",night:"ночи"}},defaultFormattingWidth:"wide"})},match:{ordinalNumber:$a({matchPattern:/^(\d+)(-?(е|я|й|ое|ье|ая|ья|ый|ой|ий|ый))?/i,parsePattern:/\d+/i,valueCallback:function(e){return parseInt(e,10)}}),era:Fa({matchPatterns:{narrow:/^((до )?н\.?\s?э\.?)/i,abbreviated:/^((до )?н\.?\s?э\.?)/i,wide:/^(до нашей эры|нашей эры|наша эра)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^д/i,/^н/i]},defaultParseWidth:"any"}),quarter:Fa({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^[1234](-?[ыои]?й?)? кв.?/i,wide:/^[1234](-?[ыои]?й?)? квартал/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:function(e){return e+1}}),month:Fa({matchPatterns:{narrow:/^[яфмаисонд]/i,abbreviated:/^(янв|фев|март?|апр|ма[йя]|июн[ья]?|июл[ья]?|авг|сент?|окт|нояб?|дек)\.?/i,wide:/^(январ[ья]|феврал[ья]|марта?|апрел[ья]|ма[йя]|июн[ья]|июл[ья]|августа?|сентябр[ья]|октябр[ья]|октябр[ья]|ноябр[ья]|декабр[ья])/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^я/i,/^ф/i,/^м/i,/^а/i,/^м/i,/^и/i,/^и/i,/^а/i,/^с/i,/^о/i,/^н/i,/^я/i],any:[/^я/i,/^ф/i,/^мар/i,/^ап/i,/^ма[йя]/i,/^июн/i,/^июл/i,/^ав/i,/^с/i,/^о/i,/^н/i,/^д/i]},defaultParseWidth:"any"}),day:Fa({matchPatterns:{narrow:/^[впсч]/i,short:/^(вс|во|пн|по|вт|ср|чт|че|пт|пя|сб|су)\.?/i,abbreviated:/^(вск|вос|пнд|пон|втр|вто|срд|сре|чтв|чет|птн|пят|суб).?/i,wide:/^(воскресень[ея]|понедельника?|вторника?|сред[аы]|четверга?|пятниц[аы]|суббот[аы])/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^в/i,/^п/i,/^в/i,/^с/i,/^ч/i,/^п/i,/^с/i],any:[/^в[ос]/i,/^п[он]/i,/^в/i,/^ср/i,/^ч/i,/^п[ят]/i,/^с[уб]/i]},defaultParseWidth:"any"}),dayPeriod:Fa({matchPatterns:{narrow:/^([дп]п|полн\.?|полд\.?|утр[оа]|день|дня|веч\.?|ноч[ьи])/i,abbreviated:/^([дп]п|полн\.?|полд\.?|утр[оа]|день|дня|веч\.?|ноч[ьи])/i,wide:/^([дп]п|полночь|полдень|утр[оа]|день|дня|вечера?|ноч[ьи])/i},defaultMatchWidth:"wide",parsePatterns:{any:{am:/^дп/i,pm:/^пп/i,midnight:/^полн/i,noon:/^полд/i,morning:/^у/i,afternoon:/^д[ен]/i,evening:/^в/i,night:/^н/i}},defaultParseWidth:"any"})},options:{weekStartsOn:1,firstWeekContainsDate:1}};function Pc(e,t,a){var n=function(e,t){return 1===t&&e.one?e.one:t>=2&&t<=4&&e.twoFour?e.twoFour:e.other}(e,t);return n[a].replace("{{count}}",String(t))}function Wc(e){var t="";return"almost"===e&&(t="takmer"),"about"===e&&(t="približne"),t.length>0?t+" ":""}function xc(e){var t="";return"lessThan"===e&&(t="menej než"),"over"===e&&(t="viac než"),t.length>0?t+" ":""}var zc={xSeconds:{one:{present:"sekunda",past:"sekundou",future:"sekundu"},twoFour:{present:"{{count}} sekundy",past:"{{count}} sekundami",future:"{{count}} sekundy"},other:{present:"{{count}} sekúnd",past:"{{count}} sekundami",future:"{{count}} sekúnd"}},halfAMinute:{other:{present:"pol minúty",past:"pol minútou",future:"pol minúty"}},xMinutes:{one:{present:"minúta",past:"minútou",future:"minútu"},twoFour:{present:"{{count}} minúty",past:"{{count}} minútami",future:"{{count}} minúty"},other:{present:"{{count}} minút",past:"{{count}} minútami",future:"{{count}} minút"}},xHours:{one:{present:"hodina",past:"hodinou",future:"hodinu"},twoFour:{present:"{{count}} hodiny",past:"{{count}} hodinami",future:"{{count}} hodiny"},other:{present:"{{count}} hodín",past:"{{count}} hodinami",future:"{{count}} hodín"}},xDays:{one:{present:"deň",past:"dňom",future:"deň"},twoFour:{present:"{{count}} dni",past:"{{count}} dňami",future:"{{count}} dni"},other:{present:"{{count}} dní",past:"{{count}} dňami",future:"{{count}} dní"}},xWeeks:{one:{present:"týždeň",past:"týždňom",future:"týždeň"},twoFour:{present:"{{count}} týždne",past:"{{count}} týždňami",future:"{{count}} týždne"},other:{present:"{{count}} týždňov",past:"{{count}} týždňami",future:"{{count}} týždňov"}},xMonths:{one:{present:"mesiac",past:"mesiacom",future:"mesiac"},twoFour:{present:"{{count}} mesiace",past:"{{count}} mesiacmi",future:"{{count}} mesiace"},other:{present:"{{count}} mesiacov",past:"{{count}} mesiacmi",future:"{{count}} mesiacov"}},xYears:{one:{present:"rok",past:"rokom",future:"rok"},twoFour:{present:"{{count}} roky",past:"{{count}} rokmi",future:"{{count}} roky"},other:{present:"{{count}} rokov",past:"{{count}} rokmi",future:"{{count}} rokov"}}},jc=function(e,t,a){var n,i=function(e){return["lessThan","about","over","almost"].filter((function(t){return!!e.match(new RegExp("^"+t))}))[0]}(e)||"",r=(n=e.substring(i.length)).charAt(0).toLowerCase()+n.slice(1),o=zc[r];return null!=a&&a.addSuffix?a.comparison&&a.comparison>0?Wc(i)+"o "+xc(i)+Pc(o,t,"future"):Wc(i)+"pred "+xc(i)+Pc(o,t,"past"):Wc(i)+xc(i)+Pc(o,t,"present")},Cc={date:Qa({formats:{full:"EEEE d. MMMM y",long:"d. MMMM y",medium:"d. M. y",short:"d. M. y"},defaultWidth:"full"}),time:Qa({formats:{full:"H:mm:ss zzzz",long:"H:mm:ss z",medium:"H:mm:ss",short:"H:mm"},defaultWidth:"full"}),dateTime:Qa({formats:{full:"{{date}}, {{time}}",long:"{{date}}, {{time}}",medium:"{{date}}, {{time}}",short:"{{date}} {{time}}"},defaultWidth:"full"})},Tc=["nedeľu","pondelok","utorok","stredu","štvrtok","piatok","sobotu"];function Sc(e){return 4===e?"'vo' eeee 'o' p":"'v "+Tc[e]+" o' p"}var Hc={lastWeek:function(e,t,a){var n=e.getUTCDay();return yi(e,t,a)?Sc(n):function(e){var t=Tc[e];switch(e){case 0:case 3:case 6:return"'minulú "+t+" o' p";default:return"'minulý' eeee 'o' p"}}(n)},yesterday:"'včera o' p",today:"'dnes o' p",tomorrow:"'zajtra o' p",nextWeek:function(e,t,a){var n=e.getUTCDay();return yi(e,t,a)?Sc(n):function(e){var t=Tc[e];switch(e){case 0:case 4:case 6:return"'budúcu "+t+" o' p";default:return"'budúci' eeee 'o' p"}}(n)},other:"P"},Dc=function(e,t,a,n){var i=Hc[e];return"function"==typeof i?i(t,a,n):i},Nc={code:"sk",formatDistance:jc,formatLong:Cc,formatRelative:Dc,localize:{ordinalNumber:function(e,t){return Number(e)+"."},era:Ra({values:{narrow:["pred Kr.","po Kr."],abbreviated:["pred Kr.","po Kr."],wide:["pred Kristom","po Kristovi"]},defaultWidth:"wide"}),quarter:Ra({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1. štvrťrok","2. štvrťrok","3. štvrťrok","4. štvrťrok"]},defaultWidth:"wide",argumentCallback:function(e){return e-1}}),month:Ra({values:{narrow:["j","f","m","a","m","j","j","a","s","o","n","d"],abbreviated:["jan","feb","mar","apr","máj","jún","júl","aug","sep","okt","nov","dec"],wide:["január","február","marec","apríl","máj","jún","júl","august","september","október","november","december"]},defaultWidth:"wide",formattingValues:{narrow:["j","f","m","a","m","j","j","a","s","o","n","d"],abbreviated:["jan","feb","mar","apr","máj","jún","júl","aug","sep","okt","nov","dec"],wide:["januára","februára","marca","apríla","mája","júna","júla","augusta","septembra","októbra","novembra","decembra"]},defaultFormattingWidth:"wide"}),day:Ra({values:{narrow:["n","p","u","s","š","p","s"],short:["ne","po","ut","st","št","pi","so"],abbreviated:["ne","po","ut","st","št","pi","so"],wide:["nedeľa","pondelok","utorok","streda","štvrtok","piatok","sobota"]},defaultWidth:"wide"}),dayPeriod:Ra({values:{narrow:{am:"AM",pm:"PM",midnight:"poln.",noon:"pol.",morning:"ráno",afternoon:"pop.",evening:"več.",night:"noc"},abbreviated:{am:"AM",pm:"PM",midnight:"poln.",noon:"pol.",morning:"ráno",afternoon:"popol.",evening:"večer",night:"noc"},wide:{am:"AM",pm:"PM",midnight:"polnoc",noon:"poludnie",morning:"ráno",afternoon:"popoludnie",evening:"večer",night:"noc"}},defaultWidth:"wide",formattingValues:{narrow:{am:"AM",pm:"PM",midnight:"o poln.",noon:"nap.",morning:"ráno",afternoon:"pop.",evening:"več.",night:"v n."},abbreviated:{am:"AM",pm:"PM",midnight:"o poln.",noon:"napol.",morning:"ráno",afternoon:"popol.",evening:"večer",night:"v noci"},wide:{am:"AM",pm:"PM",midnight:"o polnoci",noon:"napoludnie",morning:"ráno",afternoon:"popoludní",evening:"večer",night:"v noci"}},defaultFormattingWidth:"wide"})},match:{ordinalNumber:$a({matchPattern:/^(\d+)\.?/i,parsePattern:/\d+/i,valueCallback:function(e){return parseInt(e,10)}}),era:Fa({matchPatterns:{narrow:/^(pred Kr\.|pred n\. l\.|po Kr\.|n\. l\.)/i,abbreviated:/^(pred Kr\.|pred n\. l\.|po Kr\.|n\. l\.)/i,wide:/^(pred Kristom|pred na[šs][íi]m letopo[čc]tom|po Kristovi|n[áa][šs]ho letopo[čc]tu)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^pr/i,/^(po|n)/i]},defaultParseWidth:"any"}),quarter:Fa({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234]\. [šs]tvr[ťt]rok/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:function(e){return e+1}}),month:Fa({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|m[áa]j|j[úu]n|j[úu]l|aug|sep|okt|nov|dec)/i,wide:/^(janu[áa]ra?|febru[áa]ra?|(marec|marca)|apr[íi]la?|m[áa]ja?|j[úu]na?|j[úu]la?|augusta?|(september|septembra)|(okt[óo]ber|okt[óo]bra)|(november|novembra)|(december|decembra))/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^m[áa]j/i,/^j[úu]n/i,/^j[úu]l/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:Fa({matchPatterns:{narrow:/^[npusšp]/i,short:/^(ne|po|ut|st|št|pi|so)/i,abbreviated:/^(ne|po|ut|st|št|pi|so)/i,wide:/^(nede[ľl]a|pondelok|utorok|streda|[šs]tvrtok|piatok|sobota])/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^n/i,/^p/i,/^u/i,/^s/i,/^š/i,/^p/i,/^s/i],any:[/^n/i,/^po/i,/^u/i,/^st/i,/^(št|stv)/i,/^pi/i,/^so/i]},defaultParseWidth:"any"}),dayPeriod:Fa({matchPatterns:{narrow:/^(am|pm|(o )?poln\.?|(nap\.?|pol\.?)|r[áa]no|pop\.?|ve[čc]\.?|(v n\.?|noc))/i,abbreviated:/^(am|pm|(o )?poln\.?|(napol\.?|pol\.?)|r[áa]no|pop\.?|ve[čc]er|(v )?noci?)/i,any:/^(am|pm|(o )?polnoci?|(na)?poludnie|r[áa]no|popoludn(ie|í|i)|ve[čc]er|(v )?noci?)/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^am/i,pm:/^pm/i,midnight:/poln/i,noon:/^(nap|(na)?pol(\.|u))/i,morning:/^r[áa]no/i,afternoon:/^pop/i,evening:/^ve[čc]/i,night:/^(noc|v n\.)/i}},defaultParseWidth:"any"})},options:{weekStartsOn:1,firstWeekContainsDate:4}};var Xc={lessThanXSeconds:{present:{one:"manj kot {{count}} sekunda",two:"manj kot {{count}} sekundi",few:"manj kot {{count}} sekunde",other:"manj kot {{count}} sekund"},past:{one:"manj kot {{count}} sekundo",two:"manj kot {{count}} sekundama",few:"manj kot {{count}} sekundami",other:"manj kot {{count}} sekundami"},future:{one:"manj kot {{count}} sekundo",two:"manj kot {{count}} sekundi",few:"manj kot {{count}} sekunde",other:"manj kot {{count}} sekund"}},xSeconds:{present:{one:"{{count}} sekunda",two:"{{count}} sekundi",few:"{{count}} sekunde",other:"{{count}} sekund"},past:{one:"{{count}} sekundo",two:"{{count}} sekundama",few:"{{count}} sekundami",other:"{{count}} sekundami"},future:{one:"{{count}} sekundo",two:"{{count}} sekundi",few:"{{count}} sekunde",other:"{{count}} sekund"}},halfAMinute:"pol minute",lessThanXMinutes:{present:{one:"manj kot {{count}} minuta",two:"manj kot {{count}} minuti",few:"manj kot {{count}} minute",other:"manj kot {{count}} minut"},past:{one:"manj kot {{count}} minuto",two:"manj kot {{count}} minutama",few:"manj kot {{count}} minutami",other:"manj kot {{count}} minutami"},future:{one:"manj kot {{count}} minuto",two:"manj kot {{count}} minuti",few:"manj kot {{count}} minute",other:"manj kot {{count}} minut"}},xMinutes:{present:{one:"{{count}} minuta",two:"{{count}} minuti",few:"{{count}} minute",other:"{{count}} minut"},past:{one:"{{count}} minuto",two:"{{count}} minutama",few:"{{count}} minutami",other:"{{count}} minutami"},future:{one:"{{count}} minuto",two:"{{count}} minuti",few:"{{count}} minute",other:"{{count}} minut"}},aboutXHours:{present:{one:"približno {{count}} ura",two:"približno {{count}} uri",few:"približno {{count}} ure",other:"približno {{count}} ur"},past:{one:"približno {{count}} uro",two:"približno {{count}} urama",few:"približno {{count}} urami",other:"približno {{count}} urami"},future:{one:"približno {{count}} uro",two:"približno {{count}} uri",few:"približno {{count}} ure",other:"približno {{count}} ur"}},xHours:{present:{one:"{{count}} ura",two:"{{count}} uri",few:"{{count}} ure",other:"{{count}} ur"},past:{one:"{{count}} uro",two:"{{count}} urama",few:"{{count}} urami",other:"{{count}} urami"},future:{one:"{{count}} uro",two:"{{count}} uri",few:"{{count}} ure",other:"{{count}} ur"}},xDays:{present:{one:"{{count}} dan",two:"{{count}} dni",few:"{{count}} dni",other:"{{count}} dni"},past:{one:"{{count}} dnem",two:"{{count}} dnevoma",few:"{{count}} dnevi",other:"{{count}} dnevi"},future:{one:"{{count}} dan",two:"{{count}} dni",few:"{{count}} dni",other:"{{count}} dni"}},aboutXWeeks:{one:"približno {{count}} teden",two:"približno {{count}} tedna",few:"približno {{count}} tedne",other:"približno {{count}} tednov"},xWeeks:{one:"{{count}} teden",two:"{{count}} tedna",few:"{{count}} tedne",other:"{{count}} tednov"},aboutXMonths:{present:{one:"približno {{count}} mesec",two:"približno {{count}} meseca",few:"približno {{count}} mesece",other:"približno {{count}} mesecev"},past:{one:"približno {{count}} mesecem",two:"približno {{count}} mesecema",few:"približno {{count}} meseci",other:"približno {{count}} meseci"},future:{one:"približno {{count}} mesec",two:"približno {{count}} meseca",few:"približno {{count}} mesece",other:"približno {{count}} mesecev"}},xMonths:{present:{one:"{{count}} mesec",two:"{{count}} meseca",few:"{{count}} meseci",other:"{{count}} mesecev"},past:{one:"{{count}} mesecem",two:"{{count}} mesecema",few:"{{count}} meseci",other:"{{count}} meseci"},future:{one:"{{count}} mesec",two:"{{count}} meseca",few:"{{count}} mesece",other:"{{count}} mesecev"}},aboutXYears:{present:{one:"približno {{count}} leto",two:"približno {{count}} leti",few:"približno {{count}} leta",other:"približno {{count}} let"},past:{one:"približno {{count}} letom",two:"približno {{count}} letoma",few:"približno {{count}} leti",other:"približno {{count}} leti"},future:{one:"približno {{count}} leto",two:"približno {{count}} leti",few:"približno {{count}} leta",other:"približno {{count}} let"}},xYears:{present:{one:"{{count}} leto",two:"{{count}} leti",few:"{{count}} leta",other:"{{count}} let"},past:{one:"{{count}} letom",two:"{{count}} letoma",few:"{{count}} leti",other:"{{count}} leti"},future:{one:"{{count}} leto",two:"{{count}} leti",few:"{{count}} leta",other:"{{count}} let"}},overXYears:{present:{one:"več kot {{count}} leto",two:"več kot {{count}} leti",few:"več kot {{count}} leta",other:"več kot {{count}} let"},past:{one:"več kot {{count}} letom",two:"več kot {{count}} letoma",few:"več kot {{count}} leti",other:"več kot {{count}} leti"},future:{one:"več kot {{count}} leto",two:"več kot {{count}} leti",few:"več kot {{count}} leta",other:"več kot {{count}} let"}},almostXYears:{present:{one:"skoraj {{count}} leto",two:"skoraj {{count}} leti",few:"skoraj {{count}} leta",other:"skoraj {{count}} let"},past:{one:"skoraj {{count}} letom",two:"skoraj {{count}} letoma",few:"skoraj {{count}} leti",other:"skoraj {{count}} leti"},future:{one:"skoraj {{count}} leto",two:"skoraj {{count}} leti",few:"skoraj {{count}} leta",other:"skoraj {{count}} let"}}};var Ic=function(e,t,a){var n="",i="present";null!=a&&a.addSuffix&&(a.comparison&&a.comparison>0?(i="future",n="čez "):(i="past",n="pred "));var r=Xc[e];if("string"==typeof r)n+=r;else{var o=function(e){switch(e%100){case 1:return"one";case 2:return"two";case 3:case 4:return"few";default:return"other"}}(t);void 0!==r.one?n+=r[o].replace("{{count}}",String(t)):n+=r[i][o].replace("{{count}}",String(t))}return n},Ec={date:Qa({formats:{full:"EEEE, dd. MMMM y",long:"dd. MMMM y",medium:"d. MMM y",short:"d. MM. yy"},defaultWidth:"full"}),time:Qa({formats:{full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},defaultWidth:"full"}),dateTime:Qa({formats:{full:"{{date}} {{time}}",long:"{{date}} {{time}}",medium:"{{date}} {{time}}",short:"{{date}} {{time}}"},defaultWidth:"full"})},Bc={lastWeek:function(e){switch(e.getUTCDay()){case 0:return"'prejšnjo nedeljo ob' p";case 3:return"'prejšnjo sredo ob' p";case 6:return"'prejšnjo soboto ob' p";default:return"'prejšnji' EEEE 'ob' p"}},yesterday:"'včeraj ob' p",today:"'danes ob' p",tomorrow:"'jutri ob' p",nextWeek:function(e){switch(e.getUTCDay()){case 0:return"'naslednjo nedeljo ob' p";case 3:return"'naslednjo sredo ob' p";case 6:return"'naslednjo soboto ob' p";default:return"'naslednji' EEEE 'ob' p"}},other:"P"},Vc=function(e,t,a,n){var i=Bc[e];return"function"==typeof i?i(t):i},Kc={code:"sl",formatDistance:Ic,formatLong:Ec,formatRelative:Vc,localize:{ordinalNumber:function(e,t){return Number(e)+"."},era:Ra({values:{narrow:["pr. n. št.","po n. št."],abbreviated:["pr. n. št.","po n. št."],wide:["pred našim štetjem","po našem štetju"]},defaultWidth:"wide"}),quarter:Ra({values:{narrow:["1","2","3","4"],abbreviated:["1. čet.","2. čet.","3. čet.","4. čet."],wide:["1. četrtletje","2. četrtletje","3. četrtletje","4. četrtletje"]},defaultWidth:"wide",argumentCallback:function(e){return e-1}}),month:Ra({values:{narrow:["j","f","m","a","m","j","j","a","s","o","n","d"],abbreviated:["jan.","feb.","mar.","apr.","maj","jun.","jul.","avg.","sep.","okt.","nov.","dec."],wide:["januar","februar","marec","april","maj","junij","julij","avgust","september","oktober","november","december"]},defaultWidth:"wide"}),day:Ra({values:{narrow:["n","p","t","s","č","p","s"],short:["ned.","pon.","tor.","sre.","čet.","pet.","sob."],abbreviated:["ned.","pon.","tor.","sre.","čet.","pet.","sob."],wide:["nedelja","ponedeljek","torek","sreda","četrtek","petek","sobota"]},defaultWidth:"wide"}),dayPeriod:Ra({values:{narrow:{am:"d",pm:"p",midnight:"24.00",noon:"12.00",morning:"j",afternoon:"p",evening:"v",night:"n"},abbreviated:{am:"dop.",pm:"pop.",midnight:"poln.",noon:"pold.",morning:"jut.",afternoon:"pop.",evening:"več.",night:"noč"},wide:{am:"dop.",pm:"pop.",midnight:"polnoč",noon:"poldne",morning:"jutro",afternoon:"popoldne",evening:"večer",night:"noč"}},defaultWidth:"wide",formattingValues:{narrow:{am:"d",pm:"p",midnight:"24.00",noon:"12.00",morning:"zj",afternoon:"p",evening:"zv",night:"po"},abbreviated:{am:"dop.",pm:"pop.",midnight:"opoln.",noon:"opold.",morning:"zjut.",afternoon:"pop.",evening:"zveč.",night:"ponoči"},wide:{am:"dop.",pm:"pop.",midnight:"opolnoči",noon:"opoldne",morning:"zjutraj",afternoon:"popoldan",evening:"zvečer",night:"ponoči"}},defaultFormattingWidth:"wide"})},match:{ordinalNumber:$a({matchPattern:/^(\d+)\./i,parsePattern:/\d+/i,valueCallback:function(e){return parseInt(e,10)}}),era:Fa({matchPatterns:{abbreviated:/^(pr\. n\. št\.|po n\. št\.)/i,wide:/^(pred Kristusom|pred na[sš]im [sš]tetjem|po Kristusu|po na[sš]em [sš]tetju|na[sš]ega [sš]tetja)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^pr/i,/^(po|na[sš]em)/i]},defaultParseWidth:"any"}),quarter:Fa({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^[1234]\.\s?[čc]et\.?/i,wide:/^[1234]\. [čc]etrtletje/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:function(e){return e+1}}),month:Fa({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan\.|feb\.|mar\.|apr\.|maj|jun\.|jul\.|avg\.|sep\.|okt\.|nov\.|dec\.)/i,wide:/^(januar|februar|marec|april|maj|junij|julij|avgust|september|oktober|november|december)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],abbreviated:[/^ja/i,/^fe/i,/^mar/i,/^ap/i,/^maj/i,/^jun/i,/^jul/i,/^av/i,/^s/i,/^o/i,/^n/i,/^d/i],wide:[/^ja/i,/^fe/i,/^mar/i,/^ap/i,/^maj/i,/^jun/i,/^jul/i,/^av/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"wide"}),day:Fa({matchPatterns:{narrow:/^[nptsčc]/i,short:/^(ned\.|pon\.|tor\.|sre\.|[cč]et\.|pet\.|sob\.)/i,abbreviated:/^(ned\.|pon\.|tor\.|sre\.|[cč]et\.|pet\.|sob\.)/i,wide:/^(nedelja|ponedeljek|torek|sreda|[cč]etrtek|petek|sobota)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^n/i,/^p/i,/^t/i,/^s/i,/^[cč]/i,/^p/i,/^s/i],any:[/^n/i,/^po/i,/^t/i,/^sr/i,/^[cč]/i,/^pe/i,/^so/i]},defaultParseWidth:"any"}),dayPeriod:Fa({matchPatterns:{narrow:/^(d|po?|z?v|n|z?j|24\.00|12\.00)/i,any:/^(dop\.|pop\.|o?poln(\.|o[cč]i?)|o?pold(\.|ne)|z?ve[cč](\.|er)|(po)?no[cč]i?|popold(ne|an)|jut(\.|ro)|zjut(\.|raj))/i},defaultMatchWidth:"any",parsePatterns:{narrow:{am:/^d/i,pm:/^p/i,midnight:/^24/i,noon:/^12/i,morning:/^(z?j)/i,afternoon:/^p/i,evening:/^(z?v)/i,night:/^(n|po)/i},any:{am:/^dop\./i,pm:/^pop\./i,midnight:/^o?poln/i,noon:/^o?pold/i,morning:/j/i,afternoon:/^pop\./i,evening:/^z?ve/i,night:/(po)?no/i}},defaultParseWidth:"any"})},options:{weekStartsOn:1,firstWeekContainsDate:1}},Uc={lessThanXSeconds:{one:"më pak se një sekondë",other:"më pak se {{count}} sekonda"},xSeconds:{one:"1 sekondë",other:"{{count}} sekonda"},halfAMinute:"gjysëm minuti",lessThanXMinutes:{one:"më pak se një minute",other:"më pak se {{count}} minuta"},xMinutes:{one:"1 minutë",other:"{{count}} minuta"},aboutXHours:{one:"rreth 1 orë",other:"rreth {{count}} orë"},xHours:{one:"1 orë",other:"{{count}} orë"},xDays:{one:"1 ditë",other:"{{count}} ditë"},aboutXWeeks:{one:"rreth 1 javë",other:"rreth {{count}} javë"},xWeeks:{one:"1 javë",other:"{{count}} javë"},aboutXMonths:{one:"rreth 1 muaj",other:"rreth {{count}} muaj"},xMonths:{one:"1 muaj",other:"{{count}} muaj"},aboutXYears:{one:"rreth 1 vit",other:"rreth {{count}} vite"},xYears:{one:"1 vit",other:"{{count}} vite"},overXYears:{one:"mbi 1 vit",other:"mbi {{count}} vite"},almostXYears:{one:"pothuajse 1 vit",other:"pothuajse {{count}} vite"}},Gc=function(e,t,a){var n,i=Uc[e];return n="string"==typeof i?i:1===t?i.one:i.other.replace("{{count}}",String(t)),null!=a&&a.addSuffix?a.comparison&&a.comparison>0?"në "+n:n+" më parë":n},Oc={date:Qa({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:Qa({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:Qa({formats:{full:"{{date}} 'në' {{time}}",long:"{{date}} 'në' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},Qc={lastWeek:"'të' eeee 'e shkuar në' p",yesterday:"'dje në' p",today:"'sot në' p",tomorrow:"'nesër në' p",nextWeek:"eeee 'at' p",other:"P"},Yc={code:"sq",formatDistance:Gc,formatLong:Oc,formatRelative:function(e,t,a,n){return Qc[e]},localize:{ordinalNumber:function(e,t){var a=Number(e);return"hour"===(null==t?void 0:t.unit)?String(a):1===a?a+"-rë":4===a?a+"t":a+"-të"},era:Ra({values:{narrow:["P","M"],abbreviated:["PK","MK"],wide:["Para Krishtit","Mbas Krishtit"]},defaultWidth:"wide"}),quarter:Ra({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["4-mujori I","4-mujori II","4-mujori III","4-mujori IV"]},defaultWidth:"wide",argumentCallback:function(e){return e-1}}),month:Ra({values:{narrow:["J","S","M","P","M","Q","K","G","S","T","N","D"],abbreviated:["Jan","Shk","Mar","Pri","Maj","Qer","Kor","Gus","Sht","Tet","Nën","Dhj"],wide:["Janar","Shkurt","Mars","Prill","Maj","Qershor","Korrik","Gusht","Shtator","Tetor","Nëntor","Dhjetor"]},defaultWidth:"wide"}),day:Ra({values:{narrow:["D","H","M","M","E","P","S"],short:["Di","Hë","Ma","Më","En","Pr","Sh"],abbreviated:["Die","Hën","Mar","Mër","Enj","Pre","Sht"],wide:["Dielë","Hënë","Martë","Mërkurë","Enjte","Premte","Shtunë"]},defaultWidth:"wide"}),dayPeriod:Ra({values:{narrow:{am:"p",pm:"m",midnight:"m",noon:"d",morning:"mëngjes",afternoon:"dite",evening:"mbrëmje",night:"natë"},abbreviated:{am:"PD",pm:"MD",midnight:"mesnëtë",noon:"drek",morning:"mëngjes",afternoon:"mbasdite",evening:"mbrëmje",night:"natë"},wide:{am:"p.d.",pm:"m.d.",midnight:"mesnëtë",noon:"drek",morning:"mëngjes",afternoon:"mbasdite",evening:"mbrëmje",night:"natë"}},defaultWidth:"wide",formattingValues:{narrow:{am:"p",pm:"m",midnight:"m",noon:"d",morning:"në mëngjes",afternoon:"në mbasdite",evening:"në mbrëmje",night:"në mesnatë"},abbreviated:{am:"PD",pm:"MD",midnight:"mesnatë",noon:"drek",morning:"në mëngjes",afternoon:"në mbasdite",evening:"në mbrëmje",night:"në mesnatë"},wide:{am:"p.d.",pm:"m.d.",midnight:"mesnatë",noon:"drek",morning:"në mëngjes",afternoon:"në mbasdite",evening:"në mbrëmje",night:"në mesnatë"}},defaultFormattingWidth:"wide"})},match:{ordinalNumber:$a({matchPattern:/^(\d+)(-rë|-të|t|)?/i,parsePattern:/\d+/i,valueCallback:function(e){return parseInt(e,10)}}),era:Fa({matchPatterns:{narrow:/^(p|m)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(para krishtit|mbas krishtit)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^b/i,/^(p|m)/i]},defaultParseWidth:"any"}),quarter:Fa({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234]-mujori (i{1,3}|iv)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:function(e){return e+1}}),month:Fa({matchPatterns:{narrow:/^[jsmpqkftnd]/i,abbreviated:/^(jan|shk|mar|pri|maj|qer|kor|gus|sht|tet|nën|dhj)/i,wide:/^(janar|shkurt|mars|prill|maj|qershor|korrik|gusht|shtator|tetor|nëntor|dhjetor)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^s/i,/^m/i,/^p/i,/^m/i,/^q/i,/^k/i,/^g/i,/^s/i,/^t/i,/^n/i,/^d/i],any:[/^ja/i,/^shk/i,/^mar/i,/^pri/i,/^maj/i,/^qer/i,/^kor/i,/^gu/i,/^sht/i,/^tet/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:Fa({matchPatterns:{narrow:/^[dhmeps]/i,short:/^(di|hë|ma|më|en|pr|sh)/i,abbreviated:/^(die|hën|mar|mër|enj|pre|sht)/i,wide:/^(dielë|hënë|martë|mërkurë|enjte|premte|shtunë)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^d/i,/^h/i,/^m/i,/^m/i,/^e/i,/^p/i,/^s/i],any:[/^d/i,/^h/i,/^ma/i,/^më/i,/^e/i,/^p/i,/^s/i]},defaultParseWidth:"any"}),dayPeriod:Fa({matchPatterns:{narrow:/^(p|m|me|në (mëngjes|mbasdite|mbrëmje|mesnatë))/i,any:/^([pm]\.?\s?d\.?|drek|në (mëngjes|mbasdite|mbrëmje|mesnatë))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^p/i,pm:/^m/i,midnight:/^me/i,noon:/^dr/i,morning:/mëngjes/i,afternoon:/mbasdite/i,evening:/mbrëmje/i,night:/natë/i}},defaultParseWidth:"any"})},options:{weekStartsOn:1,firstWeekContainsDate:1}},qc={lessThanXSeconds:{one:{standalone:"мање од 1 секунде",withPrepositionAgo:"мање од 1 секунде",withPrepositionIn:"мање од 1 секунду"},dual:"мање од {{count}} секунде",other:"мање од {{count}} секунди"},xSeconds:{one:{standalone:"1 секунда",withPrepositionAgo:"1 секунде",withPrepositionIn:"1 секунду"},dual:"{{count}} секунде",other:"{{count}} секунди"},halfAMinute:"пола минуте",lessThanXMinutes:{one:{standalone:"мање од 1 минуте",withPrepositionAgo:"мање од 1 минуте",withPrepositionIn:"мање од 1 минуту"},dual:"мање од {{count}} минуте",other:"мање од {{count}} минута"},xMinutes:{one:{standalone:"1 минута",withPrepositionAgo:"1 минуте",withPrepositionIn:"1 минуту"},dual:"{{count}} минуте",other:"{{count}} минута"},aboutXHours:{one:{standalone:"око 1 сат",withPrepositionAgo:"око 1 сат",withPrepositionIn:"око 1 сат"},dual:"око {{count}} сата",other:"око {{count}} сати"},xHours:{one:{standalone:"1 сат",withPrepositionAgo:"1 сат",withPrepositionIn:"1 сат"},dual:"{{count}} сата",other:"{{count}} сати"},xDays:{one:{standalone:"1 дан",withPrepositionAgo:"1 дан",withPrepositionIn:"1 дан"},dual:"{{count}} дана",other:"{{count}} дана"},aboutXWeeks:{one:{standalone:"око 1 недељу",withPrepositionAgo:"око 1 недељу",withPrepositionIn:"око 1 недељу"},dual:"око {{count}} недеље",other:"око {{count}} недеље"},xWeeks:{one:{standalone:"1 недељу",withPrepositionAgo:"1 недељу",withPrepositionIn:"1 недељу"},dual:"{{count}} недеље",other:"{{count}} недеље"},aboutXMonths:{one:{standalone:"око 1 месец",withPrepositionAgo:"око 1 месец",withPrepositionIn:"око 1 месец"},dual:"око {{count}} месеца",other:"око {{count}} месеци"},xMonths:{one:{standalone:"1 месец",withPrepositionAgo:"1 месец",withPrepositionIn:"1 месец"},dual:"{{count}} месеца",other:"{{count}} месеци"},aboutXYears:{one:{standalone:"око 1 годину",withPrepositionAgo:"око 1 годину",withPrepositionIn:"око 1 годину"},dual:"око {{count}} године",other:"око {{count}} година"},xYears:{one:{standalone:"1 година",withPrepositionAgo:"1 године",withPrepositionIn:"1 годину"},dual:"{{count}} године",other:"{{count}} година"},overXYears:{one:{standalone:"преко 1 годину",withPrepositionAgo:"преко 1 годину",withPrepositionIn:"преко 1 годину"},dual:"преко {{count}} године",other:"преко {{count}} година"},almostXYears:{one:{standalone:"готово 1 годину",withPrepositionAgo:"готово 1 годину",withPrepositionIn:"готово 1 годину"},dual:"готово {{count}} године",other:"готово {{count}} година"}},Jc=function(e,t,a){var n,i=qc[e];return n="string"==typeof i?i:1===t?null!=a&&a.addSuffix?a.comparison&&a.comparison>0?i.one.withPrepositionIn:i.one.withPrepositionAgo:i.one.standalone:t%10>1&&t%10<5&&"1"!==String(t).substr(-2,1)?i.dual.replace("{{count}}",String(t)):i.other.replace("{{count}}",String(t)),null!=a&&a.addSuffix?a.comparison&&a.comparison>0?"за "+n:"пре "+n:n},Rc={date:Qa({formats:{full:"EEEE, d. MMMM yyyy.",long:"d. MMMM yyyy.",medium:"d. MMM yy.",short:"dd. MM. yy."},defaultWidth:"full"}),time:Qa({formats:{full:"HH:mm:ss (zzzz)",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},defaultWidth:"full"}),dateTime:Qa({formats:{full:"{{date}} 'у' {{time}}",long:"{{date}} 'у' {{time}}",medium:"{{date}} {{time}}",short:"{{date}} {{time}}"},defaultWidth:"full"})},Lc={lastWeek:function(e){switch(e.getUTCDay()){case 0:return"'прошле недеље у' p";case 3:return"'прошле среде у' p";case 6:return"'прошле суботе у' p";default:return"'прошли' EEEE 'у' p"}},yesterday:"'јуче у' p",today:"'данас у' p",tomorrow:"'сутра у' p",nextWeek:function(e){switch(e.getUTCDay()){case 0:return"'следеће недеље у' p";case 3:return"'следећу среду у' p";case 6:return"'следећу суботу у' p";default:return"'следећи' EEEE 'у' p"}},other:"P"},Fc=function(e,t,a,n){var i=Lc[e];return"function"==typeof i?i(t):i},Zc={code:"sr",formatDistance:Jc,formatLong:Rc,formatRelative:Fc,localize:{ordinalNumber:function(e,t){return Number(e)+"."},era:Ra({values:{narrow:["пр.н.е.","АД"],abbreviated:["пр. Хр.","по. Хр."],wide:["Пре Христа","После Христа"]},defaultWidth:"wide"}),quarter:Ra({values:{narrow:["1.","2.","3.","4."],abbreviated:["1. кв.","2. кв.","3. кв.","4. кв."],wide:["1. квартал","2. квартал","3. квартал","4. квартал"]},defaultWidth:"wide",argumentCallback:function(e){return e-1}}),month:Ra({values:{narrow:["1.","2.","3.","4.","5.","6.","7.","8.","9.","10.","11.","12."],abbreviated:["јан","феб","мар","апр","мај","јун","јул","авг","сеп","окт","нов","дец"],wide:["јануар","фебруар","март","април","мај","јун","јул","август","септембар","октобар","новембар","децембар"]},defaultWidth:"wide",formattingValues:{narrow:["1.","2.","3.","4.","5.","6.","7.","8.","9.","10.","11.","12."],abbreviated:["јан","феб","мар","апр","мај","јун","јул","авг","сеп","окт","нов","дец"],wide:["јануар","фебруар","март","април","мај","јун","јул","август","септембар","октобар","новембар","децембар"]},defaultFormattingWidth:"wide"}),day:Ra({values:{narrow:["Н","П","У","С","Ч","П","С"],short:["нед","пон","уто","сре","чет","пет","суб"],abbreviated:["нед","пон","уто","сре","чет","пет","суб"],wide:["недеља","понедељак","уторак","среда","четвртак","петак","субота"]},defaultWidth:"wide"}),dayPeriod:Ra({values:{narrow:{am:"AM",pm:"PM",midnight:"поноћ",noon:"подне",morning:"ујутру",afternoon:"поподне",evening:"увече",night:"ноћу"},abbreviated:{am:"AM",pm:"PM",midnight:"поноћ",noon:"подне",morning:"ујутру",afternoon:"поподне",evening:"увече",night:"ноћу"},wide:{am:"AM",pm:"PM",midnight:"поноћ",noon:"подне",morning:"ујутру",afternoon:"после подне",evening:"увече",night:"ноћу"}},defaultWidth:"wide",formattingValues:{narrow:{am:"АМ",pm:"ПМ",midnight:"поноћ",noon:"подне",morning:"ујутру",afternoon:"поподне",evening:"увече",night:"ноћу"},abbreviated:{am:"АМ",pm:"ПМ",midnight:"поноћ",noon:"подне",morning:"ујутру",afternoon:"поподне",evening:"увече",night:"ноћу"},wide:{am:"AM",pm:"PM",midnight:"поноћ",noon:"подне",morning:"ујутру",afternoon:"после подне",evening:"увече",night:"ноћу"}},defaultFormattingWidth:"wide"})},match:{ordinalNumber:$a({matchPattern:/^(\d+)\./i,parsePattern:/\d+/i,valueCallback:function(e){return parseInt(e,10)}}),era:Fa({matchPatterns:{narrow:/^(пр\.н\.е\.|АД)/i,abbreviated:/^(пр\.\s?Хр\.|по\.\s?Хр\.)/i,wide:/^(Пре Христа|пре нове ере|После Христа|нова ера)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^пр/i,/^(по|нова)/i]},defaultParseWidth:"any"}),quarter:Fa({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^[1234]\.\s?кв\.?/i,wide:/^[1234]\. квартал/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:function(e){return e+1}}),month:Fa({matchPatterns:{narrow:/^(10|11|12|[123456789])\./i,abbreviated:/^(јан|феб|мар|апр|мај|јун|јул|авг|сеп|окт|нов|дец)/i,wide:/^((јануар|јануара)|(фебруар|фебруара)|(март|марта)|(април|априла)|(мја|маја)|(јун|јуна)|(јул|јула)|(август|августа)|(септембар|септембра)|(октобар|октобра)|(новембар|новембра)|(децембар|децембра))/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^1/i,/^2/i,/^3/i,/^4/i,/^5/i,/^6/i,/^7/i,/^8/i,/^9/i,/^10/i,/^11/i,/^12/i],any:[/^ја/i,/^ф/i,/^мар/i,/^ап/i,/^мај/i,/^јун/i,/^јул/i,/^авг/i,/^с/i,/^о/i,/^н/i,/^д/i]},defaultParseWidth:"any"}),day:Fa({matchPatterns:{narrow:/^[пусчн]/i,short:/^(нед|пон|уто|сре|чет|пет|суб)/i,abbreviated:/^(нед|пон|уто|сре|чет|пет|суб)/i,wide:/^(недеља|понедељак|уторак|среда|четвртак|петак|субота)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^п/i,/^у/i,/^с/i,/^ч/i,/^п/i,/^с/i,/^н/i],any:[/^нед/i,/^пон/i,/^уто/i,/^сре/i,/^чет/i,/^пет/i,/^суб/i]},defaultParseWidth:"any"}),dayPeriod:Fa({matchPatterns:{any:/^(ам|пм|поноћ|(по)?подне|увече|ноћу|после подне|ујутру)/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^поно/i,noon:/^под/i,morning:/ујутру/i,afternoon:/(после\s|по)+подне/i,evening:/(увече)/i,night:/(ноћу)/i}},defaultParseWidth:"any"})},options:{weekStartsOn:1,firstWeekContainsDate:1}},_c={lessThanXSeconds:{one:{standalone:"manje od 1 sekunde",withPrepositionAgo:"manje od 1 sekunde",withPrepositionIn:"manje od 1 sekundu"},dual:"manje od {{count}} sekunde",other:"manje od {{count}} sekundi"},xSeconds:{one:{standalone:"1 sekunda",withPrepositionAgo:"1 sekunde",withPrepositionIn:"1 sekundu"},dual:"{{count}} sekunde",other:"{{count}} sekundi"},halfAMinute:"pola minute",lessThanXMinutes:{one:{standalone:"manje od 1 minute",withPrepositionAgo:"manje od 1 minute",withPrepositionIn:"manje od 1 minutu"},dual:"manje od {{count}} minute",other:"manje od {{count}} minuta"},xMinutes:{one:{standalone:"1 minuta",withPrepositionAgo:"1 minute",withPrepositionIn:"1 minutu"},dual:"{{count}} minute",other:"{{count}} minuta"},aboutXHours:{one:{standalone:"oko 1 sat",withPrepositionAgo:"oko 1 sat",withPrepositionIn:"oko 1 sat"},dual:"oko {{count}} sata",other:"oko {{count}} sati"},xHours:{one:{standalone:"1 sat",withPrepositionAgo:"1 sat",withPrepositionIn:"1 sat"},dual:"{{count}} sata",other:"{{count}} sati"},xDays:{one:{standalone:"1 dan",withPrepositionAgo:"1 dan",withPrepositionIn:"1 dan"},dual:"{{count}} dana",other:"{{count}} dana"},aboutXWeeks:{one:{standalone:"oko 1 nedelju",withPrepositionAgo:"oko 1 nedelju",withPrepositionIn:"oko 1 nedelju"},dual:"oko {{count}} nedelje",other:"oko {{count}} nedelje"},xWeeks:{one:{standalone:"1 nedelju",withPrepositionAgo:"1 nedelju",withPrepositionIn:"1 nedelju"},dual:"{{count}} nedelje",other:"{{count}} nedelje"},aboutXMonths:{one:{standalone:"oko 1 mesec",withPrepositionAgo:"oko 1 mesec",withPrepositionIn:"oko 1 mesec"},dual:"oko {{count}} meseca",other:"oko {{count}} meseci"},xMonths:{one:{standalone:"1 mesec",withPrepositionAgo:"1 mesec",withPrepositionIn:"1 mesec"},dual:"{{count}} meseca",other:"{{count}} meseci"},aboutXYears:{one:{standalone:"oko 1 godinu",withPrepositionAgo:"oko 1 godinu",withPrepositionIn:"oko 1 godinu"},dual:"oko {{count}} godine",other:"oko {{count}} godina"},xYears:{one:{standalone:"1 godina",withPrepositionAgo:"1 godine",withPrepositionIn:"1 godinu"},dual:"{{count}} godine",other:"{{count}} godina"},overXYears:{one:{standalone:"preko 1 godinu",withPrepositionAgo:"preko 1 godinu",withPrepositionIn:"preko 1 godinu"},dual:"preko {{count}} godine",other:"preko {{count}} godina"},almostXYears:{one:{standalone:"gotovo 1 godinu",withPrepositionAgo:"gotovo 1 godinu",withPrepositionIn:"gotovo 1 godinu"},dual:"gotovo {{count}} godine",other:"gotovo {{count}} godina"}},$c=function(e,t,a){var n,i=_c[e];return n="string"==typeof i?i:1===t?null!=a&&a.addSuffix?a.comparison&&a.comparison>0?i.one.withPrepositionIn:i.one.withPrepositionAgo:i.one.standalone:t%10>1&&t%10<5&&"1"!==String(t).substr(-2,1)?i.dual.replace("{{count}}",String(t)):i.other.replace("{{count}}",String(t)),null!=a&&a.addSuffix?a.comparison&&a.comparison>0?"za "+n:"pre "+n:n},ef={date:Qa({formats:{full:"EEEE, d. MMMM yyyy.",long:"d. MMMM yyyy.",medium:"d. MMM yy.",short:"dd. MM. yy."},defaultWidth:"full"}),time:Qa({formats:{full:"HH:mm:ss (zzzz)",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},defaultWidth:"full"}),dateTime:Qa({formats:{full:"{{date}} 'u' {{time}}",long:"{{date}} 'u' {{time}}",medium:"{{date}} {{time}}",short:"{{date}} {{time}}"},defaultWidth:"full"})},tf={lastWeek:function(e){switch(e.getUTCDay()){case 0:return"'prošle nedelje u' p";case 3:return"'prošle srede u' p";case 6:return"'prošle subote u' p";default:return"'prošli' EEEE 'u' p"}},yesterday:"'juče u' p",today:"'danas u' p",tomorrow:"'sutra u' p",nextWeek:function(e){switch(e.getUTCDay()){case 0:return"'sledeće nedelje u' p";case 3:return"'sledeću sredu u' p";case 6:return"'sledeću subotu u' p";default:return"'sledeći' EEEE 'u' p"}},other:"P"},af=function(e,t,a,n){var i=tf[e];return"function"==typeof i?i(t):i},nf={code:"sr-Latn",formatDistance:$c,formatLong:ef,formatRelative:af,localize:{ordinalNumber:function(e,t){return Number(e)+"."},era:Ra({values:{narrow:["pr.n.e.","AD"],abbreviated:["pr. Hr.","po. Hr."],wide:["Pre Hrista","Posle Hrista"]},defaultWidth:"wide"}),quarter:Ra({values:{narrow:["1.","2.","3.","4."],abbreviated:["1. kv.","2. kv.","3. kv.","4. kv."],wide:["1. kvartal","2. kvartal","3. kvartal","4. kvartal"]},defaultWidth:"wide",argumentCallback:function(e){return e-1}}),month:Ra({values:{narrow:["1.","2.","3.","4.","5.","6.","7.","8.","9.","10.","11.","12."],abbreviated:["jan","feb","mar","apr","maj","jun","jul","avg","sep","okt","nov","dec"],wide:["januar","februar","mart","april","maj","jun","jul","avgust","septembar","oktobar","novembar","decembar"]},defaultWidth:"wide",formattingValues:{narrow:["1.","2.","3.","4.","5.","6.","7.","8.","9.","10.","11.","12."],abbreviated:["jan","feb","mar","apr","maj","jun","jul","avg","sep","okt","nov","dec"],wide:["januar","februar","mart","april","maj","jun","jul","avgust","septembar","oktobar","novembar","decembar"]},defaultFormattingWidth:"wide"}),day:Ra({values:{narrow:["N","P","U","S","Č","P","S"],short:["ned","pon","uto","sre","čet","pet","sub"],abbreviated:["ned","pon","uto","sre","čet","pet","sub"],wide:["nedelja","ponedeljak","utorak","sreda","četvrtak","petak","subota"]},defaultWidth:"wide"}),dayPeriod:Ra({values:{narrow:{am:"AM",pm:"PM",midnight:"ponoć",noon:"podne",morning:"ujutru",afternoon:"popodne",evening:"uveče",night:"noću"},abbreviated:{am:"AM",pm:"PM",midnight:"ponoć",noon:"podne",morning:"ujutru",afternoon:"popodne",evening:"uveče",night:"noću"},wide:{am:"AM",pm:"PM",midnight:"ponoć",noon:"podne",morning:"ujutru",afternoon:"posle podne",evening:"uveče",night:"noću"}},defaultWidth:"wide",formattingValues:{narrow:{am:"AM",pm:"PM",midnight:"ponoć",noon:"podne",morning:"ujutru",afternoon:"popodne",evening:"uveče",night:"noću"},abbreviated:{am:"AM",pm:"PM",midnight:"ponoć",noon:"podne",morning:"ujutru",afternoon:"popodne",evening:"uveče",night:"noću"},wide:{am:"AM",pm:"PM",midnight:"ponoć",noon:"podne",morning:"ujutru",afternoon:"posle podne",evening:"uveče",night:"noću"}},defaultFormattingWidth:"wide"})},match:{ordinalNumber:$a({matchPattern:/^(\d+)\./i,parsePattern:/\d+/i,valueCallback:function(e){return parseInt(e,10)}}),era:Fa({matchPatterns:{narrow:/^(pr\.n\.e\.|AD)/i,abbreviated:/^(pr\.\s?Hr\.|po\.\s?Hr\.)/i,wide:/^(Pre Hrista|pre nove ere|Posle Hrista|nova era)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^pr/i,/^(po|nova)/i]},defaultParseWidth:"any"}),quarter:Fa({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^[1234]\.\s?kv\.?/i,wide:/^[1234]\. kvartal/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:function(e){return e+1}}),month:Fa({matchPatterns:{narrow:/^(10|11|12|[123456789])\./i,abbreviated:/^(jan|feb|mar|apr|maj|jun|jul|avg|sep|okt|nov|dec)/i,wide:/^((januar|januara)|(februar|februara)|(mart|marta)|(april|aprila)|(maj|maja)|(jun|juna)|(jul|jula)|(avgust|avgusta)|(septembar|septembra)|(oktobar|oktobra)|(novembar|novembra)|(decembar|decembra))/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^1/i,/^2/i,/^3/i,/^4/i,/^5/i,/^6/i,/^7/i,/^8/i,/^9/i,/^10/i,/^11/i,/^12/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^maj/i,/^jun/i,/^jul/i,/^avg/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:Fa({matchPatterns:{narrow:/^[npusčc]/i,short:/^(ned|pon|uto|sre|(čet|cet)|pet|sub)/i,abbreviated:/^(ned|pon|uto|sre|(čet|cet)|pet|sub)/i,wide:/^(nedelja|ponedeljak|utorak|sreda|(četvrtak|cetvrtak)|petak|subota)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},defaultParseWidth:"any"}),dayPeriod:Fa({matchPatterns:{any:/^(am|pm|ponoc|ponoć|(po)?podne|uvece|uveče|noću|posle podne|ujutru)/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^pono/i,noon:/^pod/i,morning:/jutro/i,afternoon:/(posle\s|po)+podne/i,evening:/(uvece|uveče)/i,night:/(nocu|noću)/i}},defaultParseWidth:"any"})},options:{weekStartsOn:1,firstWeekContainsDate:1}},rf={lessThanXSeconds:{one:"mindre än en sekund",other:"mindre än {{count}} sekunder"},xSeconds:{one:"en sekund",other:"{{count}} sekunder"},halfAMinute:"en halv minut",lessThanXMinutes:{one:"mindre än en minut",other:"mindre än {{count}} minuter"},xMinutes:{one:"en minut",other:"{{count}} minuter"},aboutXHours:{one:"ungefär en timme",other:"ungefär {{count}} timmar"},xHours:{one:"en timme",other:"{{count}} timmar"},xDays:{one:"en dag",other:"{{count}} dagar"},aboutXWeeks:{one:"ungefär en vecka",other:"ungefär {{count}} vecka"},xWeeks:{one:"en vecka",other:"{{count}} vecka"},aboutXMonths:{one:"ungefär en månad",other:"ungefär {{count}} månader"},xMonths:{one:"en månad",other:"{{count}} månader"},aboutXYears:{one:"ungefär ett år",other:"ungefär {{count}} år"},xYears:{one:"ett år",other:"{{count}} år"},overXYears:{one:"över ett år",other:"över {{count}} år"},almostXYears:{one:"nästan ett år",other:"nästan {{count}} år"}},of=["noll","en","två","tre","fyra","fem","sex","sju","åtta","nio","tio","elva","tolv"],df=function(e,t,a){var n,i=rf[e];return n="string"==typeof i?i:1===t?i.one:a&&a.onlyNumeric?i.other.replace("{{count}}",String(t)):i.other.replace("{{count}}",t<13?of[t]:String(t)),null!=a&&a.addSuffix?a.comparison&&a.comparison>0?"om "+n:n+" sedan":n},sf={date:Qa({formats:{full:"EEEE d MMMM y",long:"d MMMM y",medium:"d MMM y",short:"y-MM-dd"},defaultWidth:"full"}),time:Qa({formats:{full:"'kl'. HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},defaultWidth:"full"}),dateTime:Qa({formats:{full:"{{date}} 'kl.' {{time}}",long:"{{date}} 'kl.' {{time}}",medium:"{{date}} {{time}}",short:"{{date}} {{time}}"},defaultWidth:"full"})},uf={lastWeek:"'i' EEEE's kl.' p",yesterday:"'igår kl.' p",today:"'idag kl.' p",tomorrow:"'imorgon kl.' p",nextWeek:"EEEE 'kl.' p",other:"P"},mf={code:"sv",formatDistance:df,formatLong:sf,formatRelative:function(e,t,a,n){return uf[e]},localize:{ordinalNumber:function(e,t){var a=Number(e),n=a%100;if(n>20||n<10)switch(n%10){case 1:case 2:return a+":a"}return a+":e"},era:Ra({values:{narrow:["f.Kr.","e.Kr."],abbreviated:["f.Kr.","e.Kr."],wide:["före Kristus","efter Kristus"]},defaultWidth:"wide"}),quarter:Ra({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1:a kvartalet","2:a kvartalet","3:e kvartalet","4:e kvartalet"]},defaultWidth:"wide",argumentCallback:function(e){return e-1}}),month:Ra({values:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["jan.","feb.","mars","apr.","maj","juni","juli","aug.","sep.","okt.","nov.","dec."],wide:["januari","februari","mars","april","maj","juni","juli","augusti","september","oktober","november","december"]},defaultWidth:"wide"}),day:Ra({values:{narrow:["S","M","T","O","T","F","L"],short:["sö","må","ti","on","to","fr","lö"],abbreviated:["sön","mån","tis","ons","tors","fre","lör"],wide:["söndag","måndag","tisdag","onsdag","torsdag","fredag","lördag"]},defaultWidth:"wide"}),dayPeriod:Ra({values:{narrow:{am:"fm",pm:"em",midnight:"midnatt",noon:"middag",morning:"morg.",afternoon:"efterm.",evening:"kväll",night:"natt"},abbreviated:{am:"f.m.",pm:"e.m.",midnight:"midnatt",noon:"middag",morning:"morgon",afternoon:"efterm.",evening:"kväll",night:"natt"},wide:{am:"förmiddag",pm:"eftermiddag",midnight:"midnatt",noon:"middag",morning:"morgon",afternoon:"eftermiddag",evening:"kväll",night:"natt"}},defaultWidth:"wide",formattingValues:{narrow:{am:"fm",pm:"em",midnight:"midnatt",noon:"middag",morning:"på morg.",afternoon:"på efterm.",evening:"på kvällen",night:"på natten"},abbreviated:{am:"fm",pm:"em",midnight:"midnatt",noon:"middag",morning:"på morg.",afternoon:"på efterm.",evening:"på kvällen",night:"på natten"},wide:{am:"fm",pm:"em",midnight:"midnatt",noon:"middag",morning:"på morgonen",afternoon:"på eftermiddagen",evening:"på kvällen",night:"på natten"}},defaultFormattingWidth:"wide"})},match:{ordinalNumber:$a({matchPattern:/^(\d+)(:a|:e)?/i,parsePattern:/\d+/i,valueCallback:function(e){return parseInt(e,10)}}),era:Fa({matchPatterns:{narrow:/^(f\.? ?Kr\.?|f\.? ?v\.? ?t\.?|e\.? ?Kr\.?|v\.? ?t\.?)/i,abbreviated:/^(f\.? ?Kr\.?|f\.? ?v\.? ?t\.?|e\.? ?Kr\.?|v\.? ?t\.?)/i,wide:/^(före Kristus|före vår tid|efter Kristus|vår tid)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^f/i,/^[ev]/i]},defaultParseWidth:"any"}),quarter:Fa({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](:a|:e)? kvartalet/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:function(e){return e+1}}),month:Fa({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar[s]?|apr|maj|jun[i]?|jul[i]?|aug|sep|okt|nov|dec)\.?/i,wide:/^(januari|februari|mars|april|maj|juni|juli|augusti|september|oktober|november|december)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^maj/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:Fa({matchPatterns:{narrow:/^[smtofl]/i,short:/^(sö|må|ti|on|to|fr|lö)/i,abbreviated:/^(sön|mån|tis|ons|tors|fre|lör)/i,wide:/^(söndag|måndag|tisdag|onsdag|torsdag|fredag|lördag)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^s/i,/^m/i,/^ti/i,/^o/i,/^to/i,/^f/i,/^l/i]},defaultParseWidth:"any"}),dayPeriod:Fa({matchPatterns:{any:/^([fe]\.?\s?m\.?|midn(att)?|midd(ag)?|(på) (morgonen|eftermiddagen|kvällen|natten))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^f/i,pm:/^e/i,midnight:/^midn/i,noon:/^midd/i,morning:/morgon/i,afternoon:/eftermiddag/i,evening:/kväll/i,night:/natt/i}},defaultParseWidth:"any"})},options:{weekStartsOn:1,firstWeekContainsDate:4}};var lf={lessThanXSeconds:{one:{default:"ஒரு வினாடிக்கு குறைவாக",in:"ஒரு வினாடிக்குள்",ago:"ஒரு வினாடிக்கு முன்பு"},other:{default:"{{count}} வினாடிகளுக்கு குறைவாக",in:"{{count}} வினாடிகளுக்குள்",ago:"{{count}} வினாடிகளுக்கு முன்பு"}},xSeconds:{one:{default:"1 வினாடி",in:"1 வினாடியில்",ago:"1 வினாடி முன்பு"},other:{default:"{{count}} விநாடிகள்",in:"{{count}} வினாடிகளில்",ago:"{{count}} விநாடிகளுக்கு முன்பு"}},halfAMinute:{default:"அரை நிமிடம்",in:"அரை நிமிடத்தில்",ago:"அரை நிமிடம் முன்பு"},lessThanXMinutes:{one:{default:"ஒரு நிமிடத்திற்கும் குறைவாக",in:"ஒரு நிமிடத்திற்குள்",ago:"ஒரு நிமிடத்திற்கு முன்பு"},other:{default:"{{count}} நிமிடங்களுக்கும் குறைவாக",in:"{{count}} நிமிடங்களுக்குள்",ago:"{{count}} நிமிடங்களுக்கு முன்பு"}},xMinutes:{one:{default:"1 நிமிடம்",in:"1 நிமிடத்தில்",ago:"1 நிமிடம் முன்பு"},other:{default:"{{count}} நிமிடங்கள்",in:"{{count}} நிமிடங்களில்",ago:"{{count}} நிமிடங்களுக்கு முன்பு"}},aboutXHours:{one:{default:"சுமார் 1 மணி நேரம்",in:"சுமார் 1 மணி நேரத்தில்",ago:"சுமார் 1 மணி நேரத்திற்கு முன்பு"},other:{default:"சுமார் {{count}} மணி நேரம்",in:"சுமார் {{count}} மணி நேரத்திற்கு முன்பு",ago:"சுமார் {{count}} மணி நேரத்தில்"}},xHours:{one:{default:"1 மணி நேரம்",in:"1 மணி நேரத்தில்",ago:"1 மணி நேரத்திற்கு முன்பு"},other:{default:"{{count}} மணி நேரம்",in:"{{count}} மணி நேரத்தில்",ago:"{{count}} மணி நேரத்திற்கு முன்பு"}},xDays:{one:{default:"1 நாள்",in:"1 நாளில்",ago:"1 நாள் முன்பு"},other:{default:"{{count}} நாட்கள்",in:"{{count}} நாட்களில்",ago:"{{count}} நாட்களுக்கு முன்பு"}},aboutXWeeks:{one:{default:"சுமார் 1 வாரம்",in:"சுமார் 1 வாரத்தில்",ago:"சுமார் 1 வாரம் முன்பு"},other:{default:"சுமார் {{count}} வாரங்கள்",in:"சுமார் {{count}} வாரங்களில்",ago:"சுமார் {{count}} வாரங்களுக்கு முன்பு"}},xWeeks:{one:{default:"1 வாரம்",in:"1 வாரத்தில்",ago:"1 வாரம் முன்பு"},other:{default:"{{count}} வாரங்கள்",in:"{{count}} வாரங்களில்",ago:"{{count}} வாரங்களுக்கு முன்பு"}},aboutXMonths:{one:{default:"சுமார் 1 மாதம்",in:"சுமார் 1 மாதத்தில்",ago:"சுமார் 1 மாதத்திற்கு முன்பு"},other:{default:"சுமார் {{count}} மாதங்கள்",in:"சுமார் {{count}} மாதங்களில்",ago:"சுமார் {{count}} மாதங்களுக்கு முன்பு"}},xMonths:{one:{default:"1 மாதம்",in:"1 மாதத்தில்",ago:"1 மாதம் முன்பு"},other:{default:"{{count}} மாதங்கள்",in:"{{count}} மாதங்களில்",ago:"{{count}} மாதங்களுக்கு முன்பு"}},aboutXYears:{one:{default:"சுமார் 1 வருடம்",in:"சுமார் 1 ஆண்டில்",ago:"சுமார் 1 வருடம் முன்பு"},other:{default:"சுமார் {{count}} ஆண்டுகள்",in:"சுமார் {{count}} ஆண்டுகளில்",ago:"சுமார் {{count}} ஆண்டுகளுக்கு முன்பு"}},xYears:{one:{default:"1 வருடம்",in:"1 ஆண்டில்",ago:"1 வருடம் முன்பு"},other:{default:"{{count}} ஆண்டுகள்",in:"{{count}} ஆண்டுகளில்",ago:"{{count}} ஆண்டுகளுக்கு முன்பு"}},overXYears:{one:{default:"1 வருடத்திற்கு மேல்",in:"1 வருடத்திற்கும் மேலாக",ago:"1 வருடம் முன்பு"},other:{default:"{{count}} ஆண்டுகளுக்கும் மேலாக",in:"{{count}} ஆண்டுகளில்",ago:"{{count}} ஆண்டுகளுக்கு முன்பு"}},almostXYears:{one:{default:"கிட்டத்தட்ட 1 வருடம்",in:"கிட்டத்தட்ட 1 ஆண்டில்",ago:"கிட்டத்தட்ட 1 வருடம் முன்பு"},other:{default:"கிட்டத்தட்ட {{count}} ஆண்டுகள்",in:"கிட்டத்தட்ட {{count}} ஆண்டுகளில்",ago:"கிட்டத்தட்ட {{count}} ஆண்டுகளுக்கு முன்பு"}}},hf=function(e,t,a){var n=null!=a&&a.addSuffix?a.comparison&&a.comparison>0?"in":"ago":"default",i=lf[e];return void 0===i.one?i[n]:1===t?i.one[n]:i.other[n].replace("{{count}}",String(t))},cf={date:Qa({formats:{full:"EEEE, d MMMM, y",long:"d MMMM, y",medium:"d MMM, y",short:"d/M/yy"},defaultWidth:"full"}),time:Qa({formats:{full:"a h:mm:ss zzzz",long:"a h:mm:ss z",medium:"a h:mm:ss",short:"a h:mm"},defaultWidth:"full"}),dateTime:Qa({formats:{full:"{{date}} {{time}}",long:"{{date}} {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},ff={lastWeek:"'கடந்த' eeee p 'மணிக்கு'",yesterday:"'நேற்று ' p 'மணிக்கு'",today:"'இன்று ' p 'மணிக்கு'",tomorrow:"'நாளை ' p 'மணிக்கு'",nextWeek:"eeee p 'மணிக்கு'",other:"P"},gf={code:"ta",formatDistance:hf,formatLong:cf,formatRelative:function(e,t,a,n){return ff[e]},localize:{ordinalNumber:function(e,t){return String(e)},era:Ra({values:{narrow:["கி.மு.","கி.பி."],abbreviated:["கி.மு.","கி.பி."],wide:["கிறிஸ்துவுக்கு முன்","அன்னோ டோமினி"]},defaultWidth:"wide"}),quarter:Ra({values:{narrow:["1","2","3","4"],abbreviated:["காலா.1","காலா.2","காலா.3","காலா.4"],wide:["ஒன்றாம் காலாண்டு","இரண்டாம் காலாண்டு","மூன்றாம் காலாண்டு","நான்காம் காலாண்டு"]},defaultWidth:"wide",argumentCallback:function(e){return e-1}}),month:Ra({values:{narrow:["ஜ","பி","மா","ஏ","மே","ஜூ","ஜூ","ஆ","செ","அ","ந","டி"],abbreviated:["ஜன.","பிப்.","மார்.","ஏப்.","மே","ஜூன்","ஜூலை","ஆக.","செப்.","அக்.","நவ.","டிச."],wide:["ஜனவரி","பிப்ரவரி","மார்ச்","ஏப்ரல்","மே","ஜூன்","ஜூலை","ஆகஸ்ட்","செப்டம்பர்","அக்டோபர்","நவம்பர்","டிசம்பர்"]},defaultWidth:"wide"}),day:Ra({values:{narrow:["ஞா","தி","செ","பு","வி","வெ","ச"],short:["ஞா","தி","செ","பு","வி","வெ","ச"],abbreviated:["ஞாயி.","திங்.","செவ்.","புத.","வியா.","வெள்.","சனி"],wide:["ஞாயிறு","திங்கள்","செவ்வாய்","புதன்","வியாழன்","வெள்ளி","சனி"]},defaultWidth:"wide"}),dayPeriod:Ra({values:{narrow:{am:"மு.ப",pm:"பி.ப",midnight:"நள்.",noon:"நண்.",morning:"கா.",afternoon:"மதி.",evening:"மா.",night:"இர."},abbreviated:{am:"முற்பகல்",pm:"பிற்பகல்",midnight:"நள்ளிரவு",noon:"நண்பகல்",morning:"காலை",afternoon:"மதியம்",evening:"மாலை",night:"இரவு"},wide:{am:"முற்பகல்",pm:"பிற்பகல்",midnight:"நள்ளிரவு",noon:"நண்பகல்",morning:"காலை",afternoon:"மதியம்",evening:"மாலை",night:"இரவு"}},defaultWidth:"wide",formattingValues:{narrow:{am:"மு.ப",pm:"பி.ப",midnight:"நள்.",noon:"நண்.",morning:"கா.",afternoon:"மதி.",evening:"மா.",night:"இர."},abbreviated:{am:"முற்பகல்",pm:"பிற்பகல்",midnight:"நள்ளிரவு",noon:"நண்பகல்",morning:"காலை",afternoon:"மதியம்",evening:"மாலை",night:"இரவு"},wide:{am:"முற்பகல்",pm:"பிற்பகல்",midnight:"நள்ளிரவு",noon:"நண்பகல்",morning:"காலை",afternoon:"மதியம்",evening:"மாலை",night:"இரவு"}},defaultFormattingWidth:"wide"})},match:{ordinalNumber:$a({matchPattern:/^(\d+)(வது)?/i,parsePattern:/\d+/i,valueCallback:function(e){return parseInt(e,10)}}),era:Fa({matchPatterns:{narrow:/^(கி.மு.|கி.பி.)/i,abbreviated:/^(கி\.?\s?மு\.?|கி\.?\s?பி\.?)/,wide:/^(கிறிஸ்துவுக்கு\sமுன்|அன்னோ\sடோமினி)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/கி\.?\s?மு\.?/,/கி\.?\s?பி\.?/]},defaultParseWidth:"any"}),quarter:Fa({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^காலா.[1234]/i,wide:/^(ஒன்றாம்|இரண்டாம்|மூன்றாம்|நான்காம்) காலாண்டு/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/1/i,/2/i,/3/i,/4/i],any:[/(1|காலா.1|ஒன்றாம்)/i,/(2|காலா.2|இரண்டாம்)/i,/(3|காலா.3|மூன்றாம்)/i,/(4|காலா.4|நான்காம்)/i]},defaultParseWidth:"any",valueCallback:function(e){return e+1}}),month:Fa({matchPatterns:{narrow:/^(ஜ|பி|மா|ஏ|மே|ஜூ|ஆ|செ|அ|ந|டி)$/i,abbreviated:/^(ஜன.|பிப்.|மார்.|ஏப்.|மே|ஜூன்|ஜூலை|ஆக.|செப்.|அக்.|நவ.|டிச.)/i,wide:/^(ஜனவரி|பிப்ரவரி|மார்ச்|ஏப்ரல்|மே|ஜூன்|ஜூலை|ஆகஸ்ட்|செப்டம்பர்|அக்டோபர்|நவம்பர்|டிசம்பர்)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^ஜ$/i,/^பி/i,/^மா/i,/^ஏ/i,/^மே/i,/^ஜூ/i,/^ஜூ/i,/^ஆ/i,/^செ/i,/^அ/i,/^ந/i,/^டி/i],any:[/^ஜன/i,/^பி/i,/^மா/i,/^ஏ/i,/^மே/i,/^ஜூன்/i,/^ஜூலை/i,/^ஆ/i,/^செ/i,/^அ/i,/^ந/i,/^டி/i]},defaultParseWidth:"any"}),day:Fa({matchPatterns:{narrow:/^(ஞா|தி|செ|பு|வி|வெ|ச)/i,short:/^(ஞா|தி|செ|பு|வி|வெ|ச)/i,abbreviated:/^(ஞாயி.|திங்.|செவ்.|புத.|வியா.|வெள்.|சனி)/i,wide:/^(ஞாயிறு|திங்கள்|செவ்வாய்|புதன்|வியாழன்|வெள்ளி|சனி)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^ஞா/i,/^தி/i,/^செ/i,/^பு/i,/^வி/i,/^வெ/i,/^ச/i],any:[/^ஞா/i,/^தி/i,/^செ/i,/^பு/i,/^வி/i,/^வெ/i,/^ச/i]},defaultParseWidth:"any"}),dayPeriod:Fa({matchPatterns:{narrow:/^(மு.ப|பி.ப|நள்|நண்|காலை|மதியம்|மாலை|இரவு)/i,any:/^(மு.ப|பி.ப|முற்பகல்|பிற்பகல்|நள்ளிரவு|நண்பகல்|காலை|மதியம்|மாலை|இரவு)/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^மு/i,pm:/^பி/i,midnight:/^நள்/i,noon:/^நண்/i,morning:/காலை/i,afternoon:/மதியம்/i,evening:/மாலை/i,night:/இரவு/i}},defaultParseWidth:"any"})},options:{weekStartsOn:1,firstWeekContainsDate:4}},pf={lessThanXSeconds:{standalone:{one:"సెకను కన్నా తక్కువ",other:"{{count}} సెకన్ల కన్నా తక్కువ"},withPreposition:{one:"సెకను",other:"{{count}} సెకన్ల"}},xSeconds:{standalone:{one:"ఒక సెకను",other:"{{count}} సెకన్ల"},withPreposition:{one:"ఒక సెకను",other:"{{count}} సెకన్ల"}},halfAMinute:{standalone:"అర నిమిషం",withPreposition:"అర నిమిషం"},lessThanXMinutes:{standalone:{one:"ఒక నిమిషం కన్నా తక్కువ",other:"{{count}} నిమిషాల కన్నా తక్కువ"},withPreposition:{one:"ఒక నిమిషం",other:"{{count}} నిమిషాల"}},xMinutes:{standalone:{one:"ఒక నిమిషం",other:"{{count}} నిమిషాలు"},withPreposition:{one:"ఒక నిమిషం",other:"{{count}} నిమిషాల"}},aboutXHours:{standalone:{one:"సుమారు ఒక గంట",other:"సుమారు {{count}} గంటలు"},withPreposition:{one:"సుమారు ఒక గంట",other:"సుమారు {{count}} గంటల"}},xHours:{standalone:{one:"ఒక గంట",other:"{{count}} గంటలు"},withPreposition:{one:"ఒక గంట",other:"{{count}} గంటల"}},xDays:{standalone:{one:"ఒక రోజు",other:"{{count}} రోజులు"},withPreposition:{one:"ఒక రోజు",other:"{{count}} రోజుల"}},aboutXWeeks:{standalone:{one:"సుమారు ఒక వారం",other:"సుమారు {{count}} వారాలు"},withPreposition:{one:"సుమారు ఒక వారం",other:"సుమారు {{count}} వారాలల"}},xWeeks:{standalone:{one:"ఒక వారం",other:"{{count}} వారాలు"},withPreposition:{one:"ఒక వారం",other:"{{count}} వారాలల"}},aboutXMonths:{standalone:{one:"సుమారు ఒక నెల",other:"సుమారు {{count}} నెలలు"},withPreposition:{one:"సుమారు ఒక నెల",other:"సుమారు {{count}} నెలల"}},xMonths:{standalone:{one:"ఒక నెల",other:"{{count}} నెలలు"},withPreposition:{one:"ఒక నెల",other:"{{count}} నెలల"}},aboutXYears:{standalone:{one:"సుమారు ఒక సంవత్సరం",other:"సుమారు {{count}} సంవత్సరాలు"},withPreposition:{one:"సుమారు ఒక సంవత్సరం",other:"సుమారు {{count}} సంవత్సరాల"}},xYears:{standalone:{one:"ఒక సంవత్సరం",other:"{{count}} సంవత్సరాలు"},withPreposition:{one:"ఒక సంవత్సరం",other:"{{count}} సంవత్సరాల"}},overXYears:{standalone:{one:"ఒక సంవత్సరం పైగా",other:"{{count}} సంవత్సరాలకు పైగా"},withPreposition:{one:"ఒక సంవత్సరం",other:"{{count}} సంవత్సరాల"}},almostXYears:{standalone:{one:"దాదాపు ఒక సంవత్సరం",other:"దాదాపు {{count}} సంవత్సరాలు"},withPreposition:{one:"దాదాపు ఒక సంవత్సరం",other:"దాదాపు {{count}} సంవత్సరాల"}}},vf=function(e,t,a){var n,i=null!=a&&a.addSuffix?pf[e].withPreposition:pf[e].standalone;return n="string"==typeof i?i:1===t?i.one:i.other.replace("{{count}}",String(t)),null!=a&&a.addSuffix?a.comparison&&a.comparison>0?n+"లో":n+" క్రితం":n},bf={date:Qa({formats:{full:"d, MMMM y, EEEE",long:"d MMMM, y",medium:"d MMM, y",short:"dd-MM-yy"},defaultWidth:"full"}),time:Qa({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:Qa({formats:{full:"{{date}} {{time}}'కి'",long:"{{date}} {{time}}'కి'",medium:"{{date}} {{time}}",short:"{{date}} {{time}}"},defaultWidth:"full"})},wf={lastWeek:"'గత' eeee p",yesterday:"'నిన్న' p",today:"'ఈ రోజు' p",tomorrow:"'రేపు' p",nextWeek:"'తదుపరి' eeee p",other:"P"},yf={code:"te",formatDistance:vf,formatLong:bf,formatRelative:function(e,t,a,n){return wf[e]},localize:{ordinalNumber:function(e,t){return Number(e)+"వ"},era:Ra({values:{narrow:["క్రీ.పూ.","క్రీ.శ."],abbreviated:["క్రీ.పూ.","క్రీ.శ."],wide:["క్రీస్తు పూర్వం","క్రీస్తుశకం"]},defaultWidth:"wide"}),quarter:Ra({values:{narrow:["1","2","3","4"],abbreviated:["త్రై1","త్రై2","త్రై3","త్రై4"],wide:["1వ త్రైమాసికం","2వ త్రైమాసికం","3వ త్రైమాసికం","4వ త్రైమాసికం"]},defaultWidth:"wide",argumentCallback:function(e){return e-1}}),month:Ra({values:{narrow:["జ","ఫి","మా","ఏ","మే","జూ","జు","ఆ","సె","అ","న","డి"],abbreviated:["జన","ఫిబ్ర","మార్చి","ఏప్రి","మే","జూన్","జులై","ఆగ","సెప్టెం","అక్టో","నవం","డిసెం"],wide:["జనవరి","ఫిబ్రవరి","మార్చి","ఏప్రిల్","మే","జూన్","జులై","ఆగస్టు","సెప్టెంబర్","అక్టోబర్","నవంబర్","డిసెంబర్"]},defaultWidth:"wide"}),day:Ra({values:{narrow:["ఆ","సో","మ","బు","గు","శు","శ"],short:["ఆది","సోమ","మంగళ","బుధ","గురు","శుక్ర","శని"],abbreviated:["ఆది","సోమ","మంగళ","బుధ","గురు","శుక్ర","శని"],wide:["ఆదివారం","సోమవారం","మంగళవారం","బుధవారం","గురువారం","శుక్రవారం","శనివారం"]},defaultWidth:"wide"}),dayPeriod:Ra({values:{narrow:{am:"పూర్వాహ్నం",pm:"అపరాహ్నం",midnight:"అర్ధరాత్రి",noon:"మిట్టమధ్యాహ్నం",morning:"ఉదయం",afternoon:"మధ్యాహ్నం",evening:"సాయంత్రం",night:"రాత్రి"},abbreviated:{am:"పూర్వాహ్నం",pm:"అపరాహ్నం",midnight:"అర్ధరాత్రి",noon:"మిట్టమధ్యాహ్నం",morning:"ఉదయం",afternoon:"మధ్యాహ్నం",evening:"సాయంత్రం",night:"రాత్రి"},wide:{am:"పూర్వాహ్నం",pm:"అపరాహ్నం",midnight:"అర్ధరాత్రి",noon:"మిట్టమధ్యాహ్నం",morning:"ఉదయం",afternoon:"మధ్యాహ్నం",evening:"సాయంత్రం",night:"రాత్రి"}},defaultWidth:"wide",formattingValues:{narrow:{am:"పూర్వాహ్నం",pm:"అపరాహ్నం",midnight:"అర్ధరాత్రి",noon:"మిట్టమధ్యాహ్నం",morning:"ఉదయం",afternoon:"మధ్యాహ్నం",evening:"సాయంత్రం",night:"రాత్రి"},abbreviated:{am:"పూర్వాహ్నం",pm:"అపరాహ్నం",midnight:"అర్ధరాత్రి",noon:"మిట్టమధ్యాహ్నం",morning:"ఉదయం",afternoon:"మధ్యాహ్నం",evening:"సాయంత్రం",night:"రాత్రి"},wide:{am:"పూర్వాహ్నం",pm:"అపరాహ్నం",midnight:"అర్ధరాత్రి",noon:"మిట్టమధ్యాహ్నం",morning:"ఉదయం",afternoon:"మధ్యాహ్నం",evening:"సాయంత్రం",night:"రాత్రి"}},defaultFormattingWidth:"wide"})},match:{ordinalNumber:$a({matchPattern:/^(\d+)(వ)?/i,parsePattern:/\d+/i,valueCallback:function(e){return parseInt(e,10)}}),era:Fa({matchPatterns:{narrow:/^(క్రీ\.పూ\.|క్రీ\.శ\.)/i,abbreviated:/^(క్రీ\.?\s?పూ\.?|ప్ర\.?\s?శ\.?\s?పూ\.?|క్రీ\.?\s?శ\.?|సా\.?\s?శ\.?)/i,wide:/^(క్రీస్తు పూర్వం|ప్రస్తుత శకానికి పూర్వం|క్రీస్తు శకం|ప్రస్తుత శకం)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^(పూ|శ)/i,/^సా/i]},defaultParseWidth:"any"}),quarter:Fa({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^త్రై[1234]/i,wide:/^[1234](వ)? త్రైమాసికం/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:function(e){return e+1}}),month:Fa({matchPatterns:{narrow:/^(జూ|జు|జ|ఫి|మా|ఏ|మే|ఆ|సె|అ|న|డి)/i,abbreviated:/^(జన|ఫిబ్ర|మార్చి|ఏప్రి|మే|జూన్|జులై|ఆగ|సెప్|అక్టో|నవ|డిసె)/i,wide:/^(జనవరి|ఫిబ్రవరి|మార్చి|ఏప్రిల్|మే|జూన్|జులై|ఆగస్టు|సెప్టెంబర్|అక్టోబర్|నవంబర్|డిసెంబర్)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^జ/i,/^ఫి/i,/^మా/i,/^ఏ/i,/^మే/i,/^జూ/i,/^జు/i,/^ఆ/i,/^సె/i,/^అ/i,/^న/i,/^డి/i],any:[/^జన/i,/^ఫి/i,/^మా/i,/^ఏ/i,/^మే/i,/^జూన్/i,/^జులై/i,/^ఆగ/i,/^సె/i,/^అ/i,/^న/i,/^డి/i]},defaultParseWidth:"any"}),day:Fa({matchPatterns:{narrow:/^(ఆ|సో|మ|బు|గు|శు|శ)/i,short:/^(ఆది|సోమ|మం|బుధ|గురు|శుక్ర|శని)/i,abbreviated:/^(ఆది|సోమ|మం|బుధ|గురు|శుక్ర|శని)/i,wide:/^(ఆదివారం|సోమవారం|మంగళవారం|బుధవారం|గురువారం|శుక్రవారం|శనివారం)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^ఆ/i,/^సో/i,/^మ/i,/^బు/i,/^గు/i,/^శు/i,/^శ/i],any:[/^ఆది/i,/^సోమ/i,/^మం/i,/^బుధ/i,/^గురు/i,/^శుక్ర/i,/^శని/i]},defaultParseWidth:"any"}),dayPeriod:Fa({matchPatterns:{narrow:/^(పూర్వాహ్నం|అపరాహ్నం|అర్ధరాత్రి|మిట్టమధ్యాహ్నం|ఉదయం|మధ్యాహ్నం|సాయంత్రం|రాత్రి)/i,any:/^(పూర్వాహ్నం|అపరాహ్నం|అర్ధరాత్రి|మిట్టమధ్యాహ్నం|ఉదయం|మధ్యాహ్నం|సాయంత్రం|రాత్రి)/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^పూర్వాహ్నం/i,pm:/^అపరాహ్నం/i,midnight:/^అర్ధ/i,noon:/^మిట్ట/i,morning:/ఉదయం/i,afternoon:/మధ్యాహ్నం/i,evening:/సాయంత్రం/i,night:/రాత్రి/i}},defaultParseWidth:"any"})},options:{weekStartsOn:0,firstWeekContainsDate:1}},Af={lessThanXSeconds:{one:"น้อยกว่า 1 วินาที",other:"น้อยกว่า {{count}} วินาที"},xSeconds:{one:"1 วินาที",other:"{{count}} วินาที"},halfAMinute:"ครึ่งนาที",lessThanXMinutes:{one:"น้อยกว่า 1 นาที",other:"น้อยกว่า {{count}} นาที"},xMinutes:{one:"1 นาที",other:"{{count}} นาที"},aboutXHours:{one:"ประมาณ 1 ชั่วโมง",other:"ประมาณ {{count}} ชั่วโมง"},xHours:{one:"1 ชั่วโมง",other:"{{count}} ชั่วโมง"},xDays:{one:"1 วัน",other:"{{count}} วัน"},aboutXWeeks:{one:"ประมาณ 1 สัปดาห์",other:"ประมาณ {{count}} สัปดาห์"},xWeeks:{one:"1 สัปดาห์",other:"{{count}} สัปดาห์"},aboutXMonths:{one:"ประมาณ 1 เดือน",other:"ประมาณ {{count}} เดือน"},xMonths:{one:"1 เดือน",other:"{{count}} เดือน"},aboutXYears:{one:"ประมาณ 1 ปี",other:"ประมาณ {{count}} ปี"},xYears:{one:"1 ปี",other:"{{count}} ปี"},overXYears:{one:"มากกว่า 1 ปี",other:"มากกว่า {{count}} ปี"},almostXYears:{one:"เกือบ 1 ปี",other:"เกือบ {{count}} ปี"}},kf=function(e,t,a){var n,i=Af[e];return n="string"==typeof i?i:1===t?i.one:i.other.replace("{{count}}",String(t)),null!=a&&a.addSuffix?a.comparison&&a.comparison>0?"halfAMinute"===e?"ใน"+n:"ใน "+n:n+"ที่ผ่านมา":n},Mf={date:Qa({formats:{full:"วันEEEEที่ do MMMM y",long:"do MMMM y",medium:"d MMM y",short:"dd/MM/yyyy"},defaultWidth:"full"}),time:Qa({formats:{full:"H:mm:ss น. zzzz",long:"H:mm:ss น. z",medium:"H:mm:ss น.",short:"H:mm น."},defaultWidth:"medium"}),dateTime:Qa({formats:{full:"{{date}} 'เวลา' {{time}}",long:"{{date}} 'เวลา' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},Pf={lastWeek:"eeee'ที่แล้วเวลา' p",yesterday:"'เมื่อวานนี้เวลา' p",today:"'วันนี้เวลา' p",tomorrow:"'พรุ่งนี้เวลา' p",nextWeek:"eeee 'เวลา' p",other:"P"},Wf={code:"th",formatDistance:kf,formatLong:Mf,formatRelative:function(e,t,a,n){return Pf[e]},localize:{ordinalNumber:function(e,t){return String(e)},era:Ra({values:{narrow:["B","คศ"],abbreviated:["BC","ค.ศ."],wide:["ปีก่อนคริสตกาล","คริสต์ศักราช"]},defaultWidth:"wide"}),quarter:Ra({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["ไตรมาสแรก","ไตรมาสที่สอง","ไตรมาสที่สาม","ไตรมาสที่สี่"]},defaultWidth:"wide",argumentCallback:function(e){return e-1}}),month:Ra({values:{narrow:["ม.ค.","ก.พ.","มี.ค.","เม.ย.","พ.ค.","มิ.ย.","ก.ค.","ส.ค.","ก.ย.","ต.ค.","พ.ย.","ธ.ค."],abbreviated:["ม.ค.","ก.พ.","มี.ค.","เม.ย.","พ.ค.","มิ.ย.","ก.ค.","ส.ค.","ก.ย.","ต.ค.","พ.ย.","ธ.ค."],wide:["มกราคม","กุมภาพันธ์","มีนาคม","เมษายน","พฤษภาคม","มิถุนายน","กรกฎาคม","สิงหาคม","กันยายน","ตุลาคม","พฤศจิกายน","ธันวาคม"]},defaultWidth:"wide"}),day:Ra({values:{narrow:["อา.","จ.","อ.","พ.","พฤ.","ศ.","ส."],short:["อา.","จ.","อ.","พ.","พฤ.","ศ.","ส."],abbreviated:["อา.","จ.","อ.","พ.","พฤ.","ศ.","ส."],wide:["อาทิตย์","จันทร์","อังคาร","พุธ","พฤหัสบดี","ศุกร์","เสาร์"]},defaultWidth:"wide"}),dayPeriod:Ra({values:{narrow:{am:"ก่อนเที่ยง",pm:"หลังเที่ยง",midnight:"เที่ยงคืน",noon:"เที่ยง",morning:"เช้า",afternoon:"บ่าย",evening:"เย็น",night:"กลางคืน"},abbreviated:{am:"ก่อนเที่ยง",pm:"หลังเที่ยง",midnight:"เที่ยงคืน",noon:"เที่ยง",morning:"เช้า",afternoon:"บ่าย",evening:"เย็น",night:"กลางคืน"},wide:{am:"ก่อนเที่ยง",pm:"หลังเที่ยง",midnight:"เที่ยงคืน",noon:"เที่ยง",morning:"เช้า",afternoon:"บ่าย",evening:"เย็น",night:"กลางคืน"}},defaultWidth:"wide",formattingValues:{narrow:{am:"ก่อนเที่ยง",pm:"หลังเที่ยง",midnight:"เที่ยงคืน",noon:"เที่ยง",morning:"ตอนเช้า",afternoon:"ตอนกลางวัน",evening:"ตอนเย็น",night:"ตอนกลางคืน"},abbreviated:{am:"ก่อนเที่ยง",pm:"หลังเที่ยง",midnight:"เที่ยงคืน",noon:"เที่ยง",morning:"ตอนเช้า",afternoon:"ตอนกลางวัน",evening:"ตอนเย็น",night:"ตอนกลางคืน"},wide:{am:"ก่อนเที่ยง",pm:"หลังเที่ยง",midnight:"เที่ยงคืน",noon:"เที่ยง",morning:"ตอนเช้า",afternoon:"ตอนกลางวัน",evening:"ตอนเย็น",night:"ตอนกลางคืน"}},defaultFormattingWidth:"wide"})},match:{ordinalNumber:$a({matchPattern:/^\d+/i,parsePattern:/\d+/i,valueCallback:function(e){return parseInt(e,10)}}),era:Fa({matchPatterns:{narrow:/^([bB]|[aA]|คศ)/i,abbreviated:/^([bB]\.?\s?[cC]\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?|ค\.?ศ\.?)/i,wide:/^(ก่อนคริสตกาล|คริสต์ศักราช|คริสตกาล)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^[bB]/i,/^(^[aA]|ค\.?ศ\.?|คริสตกาล|คริสต์ศักราช|)/i]},defaultParseWidth:"any"}),quarter:Fa({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^ไตรมาส(ที่)? ?[1234]/i},defaultMatchWidth:"wide",parsePatterns:{any:[/(1|แรก|หนึ่ง)/i,/(2|สอง)/i,/(3|สาม)/i,/(4|สี่)/i]},defaultParseWidth:"any",valueCallback:function(e){return e+1}}),month:Fa({matchPatterns:{narrow:/^(ม\.?ค\.?|ก\.?พ\.?|มี\.?ค\.?|เม\.?ย\.?|พ\.?ค\.?|มิ\.?ย\.?|ก\.?ค\.?|ส\.?ค\.?|ก\.?ย\.?|ต\.?ค\.?|พ\.?ย\.?|ธ\.?ค\.?)/i,abbreviated:/^(ม\.?ค\.?|ก\.?พ\.?|มี\.?ค\.?|เม\.?ย\.?|พ\.?ค\.?|มิ\.?ย\.?|ก\.?ค\.?|ส\.?ค\.?|ก\.?ย\.?|ต\.?ค\.?|พ\.?ย\.?|ธ\.?ค\.?')/i,wide:/^(มกราคม|กุมภาพันธ์|มีนาคม|เมษายน|พฤษภาคม|มิถุนายน|กรกฎาคม|สิงหาคม|กันยายน|ตุลาคม|พฤศจิกายน|ธันวาคม)/i},defaultMatchWidth:"wide",parsePatterns:{wide:[/^มก/i,/^กุม/i,/^มี/i,/^เม/i,/^พฤษ/i,/^มิ/i,/^กรก/i,/^ส/i,/^กัน/i,/^ต/i,/^พฤศ/i,/^ธ/i],any:[/^ม\.?ค\.?/i,/^ก\.?พ\.?/i,/^มี\.?ค\.?/i,/^เม\.?ย\.?/i,/^พ\.?ค\.?/i,/^มิ\.?ย\.?/i,/^ก\.?ค\.?/i,/^ส\.?ค\.?/i,/^ก\.?ย\.?/i,/^ต\.?ค\.?/i,/^พ\.?ย\.?/i,/^ธ\.?ค\.?/i]},defaultParseWidth:"any"}),day:Fa({matchPatterns:{narrow:/^(อา\.?|จ\.?|อ\.?|พฤ\.?|พ\.?|ศ\.?|ส\.?)/i,short:/^(อา\.?|จ\.?|อ\.?|พฤ\.?|พ\.?|ศ\.?|ส\.?)/i,abbreviated:/^(อา\.?|จ\.?|อ\.?|พฤ\.?|พ\.?|ศ\.?|ส\.?)/i,wide:/^(อาทิตย์|จันทร์|อังคาร|พุธ|พฤหัสบดี|ศุกร์|เสาร์)/i},defaultMatchWidth:"wide",parsePatterns:{wide:[/^อา/i,/^จั/i,/^อั/i,/^พุธ/i,/^พฤ/i,/^ศ/i,/^เส/i],any:[/^อา/i,/^จ/i,/^อ/i,/^พ(?!ฤ)/i,/^พฤ/i,/^ศ/i,/^ส/i]},defaultParseWidth:"any"}),dayPeriod:Fa({matchPatterns:{any:/^(ก่อนเที่ยง|หลังเที่ยง|เที่ยงคืน|เที่ยง|(ตอน.*?)?.*(เที่ยง|เช้า|บ่าย|เย็น|กลางคืน))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^ก่อนเที่ยง/i,pm:/^หลังเที่ยง/i,midnight:/^เที่ยงคืน/i,noon:/^เที่ยง/i,morning:/เช้า/i,afternoon:/บ่าย/i,evening:/เย็น/i,night:/กลางคืน/i}},defaultParseWidth:"any"})},options:{weekStartsOn:0,firstWeekContainsDate:1}},xf={lessThanXSeconds:{one:"bir saniyeden az",other:"{{count}} saniyeden az"},xSeconds:{one:"1 saniye",other:"{{count}} saniye"},halfAMinute:"yarım dakika",lessThanXMinutes:{one:"bir dakikadan az",other:"{{count}} dakikadan az"},xMinutes:{one:"1 dakika",other:"{{count}} dakika"},aboutXHours:{one:"yaklaşık 1 saat",other:"yaklaşık {{count}} saat"},xHours:{one:"1 saat",other:"{{count}} saat"},xDays:{one:"1 gün",other:"{{count}} gün"},aboutXWeeks:{one:"yaklaşık 1 hafta",other:"yaklaşık {{count}} hafta"},xWeeks:{one:"1 hafta",other:"{{count}} hafta"},aboutXMonths:{one:"yaklaşık 1 ay",other:"yaklaşık {{count}} ay"},xMonths:{one:"1 ay",other:"{{count}} ay"},aboutXYears:{one:"yaklaşık 1 yıl",other:"yaklaşık {{count}} yıl"},xYears:{one:"1 yıl",other:"{{count}} yıl"},overXYears:{one:"1 yıldan fazla",other:"{{count}} yıldan fazla"},almostXYears:{one:"neredeyse 1 yıl",other:"neredeyse {{count}} yıl"}},zf=function(e,t,a){var n,i=xf[e];return n="string"==typeof i?i:1===t?i.one:i.other.replace("{{count}}",t.toString()),null!=a&&a.addSuffix?a.comparison&&a.comparison>0?n+" sonra":n+" önce":n},jf={date:Qa({formats:{full:"d MMMM y EEEE",long:"d MMMM y",medium:"d MMM y",short:"dd.MM.yyyy"},defaultWidth:"full"}),time:Qa({formats:{full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},defaultWidth:"full"}),dateTime:Qa({formats:{full:"{{date}} 'saat' {{time}}",long:"{{date}} 'saat' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},Cf={lastWeek:"'geçen hafta' eeee 'saat' p",yesterday:"'dün saat' p",today:"'bugün saat' p",tomorrow:"'yarın saat' p",nextWeek:"eeee 'saat' p",other:"P"},Tf={code:"tr",formatDistance:zf,formatLong:jf,formatRelative:function(e,t,a,n){return Cf[e]},localize:{ordinalNumber:function(e,t){return Number(e)+"."},era:Ra({values:{narrow:["MÖ","MS"],abbreviated:["MÖ","MS"],wide:["Milattan Önce","Milattan Sonra"]},defaultWidth:"wide"}),quarter:Ra({values:{narrow:["1","2","3","4"],abbreviated:["1Ç","2Ç","3Ç","4Ç"],wide:["İlk çeyrek","İkinci Çeyrek","Üçüncü çeyrek","Son çeyrek"]},defaultWidth:"wide",argumentCallback:function(e){return Number(e)-1}}),month:Ra({values:{narrow:["O","Ş","M","N","M","H","T","A","E","E","K","A"],abbreviated:["Oca","Şub","Mar","Nis","May","Haz","Tem","Ağu","Eyl","Eki","Kas","Ara"],wide:["Ocak","Şubat","Mart","Nisan","Mayıs","Haziran","Temmuz","Ağustos","Eylül","Ekim","Kasım","Aralık"]},defaultWidth:"wide"}),day:Ra({values:{narrow:["P","P","S","Ç","P","C","C"],short:["Pz","Pt","Sa","Ça","Pe","Cu","Ct"],abbreviated:["Paz","Pzt","Sal","Çar","Per","Cum","Cts"],wide:["Pazar","Pazartesi","Salı","Çarşamba","Perşembe","Cuma","Cumartesi"]},defaultWidth:"wide"}),dayPeriod:Ra({values:{narrow:{am:"öö",pm:"ös",midnight:"gy",noon:"ö",morning:"sa",afternoon:"ös",evening:"ak",night:"ge"},abbreviated:{am:"ÖÖ",pm:"ÖS",midnight:"gece yarısı",noon:"öğle",morning:"sabah",afternoon:"öğleden sonra",evening:"akşam",night:"gece"},wide:{am:"Ö.Ö.",pm:"Ö.S.",midnight:"gece yarısı",noon:"öğle",morning:"sabah",afternoon:"öğleden sonra",evening:"akşam",night:"gece"}},defaultWidth:"wide",formattingValues:{narrow:{am:"öö",pm:"ös",midnight:"gy",noon:"ö",morning:"sa",afternoon:"ös",evening:"ak",night:"ge"},abbreviated:{am:"ÖÖ",pm:"ÖS",midnight:"gece yarısı",noon:"öğlen",morning:"sabahleyin",afternoon:"öğleden sonra",evening:"akşamleyin",night:"geceleyin"},wide:{am:"ö.ö.",pm:"ö.s.",midnight:"gece yarısı",noon:"öğlen",morning:"sabahleyin",afternoon:"öğleden sonra",evening:"akşamleyin",night:"geceleyin"}},defaultFormattingWidth:"wide"})},match:{ordinalNumber:$a({matchPattern:/^(\d+)(\.)?/i,parsePattern:/\d+/i,valueCallback:function(e){return parseInt(e,10)}}),era:Fa({matchPatterns:{narrow:/^(mö|ms)/i,abbreviated:/^(mö|ms)/i,wide:/^(milattan önce|milattan sonra)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/(^mö|^milattan önce)/i,/(^ms|^milattan sonra)/i]},defaultParseWidth:"any"}),quarter:Fa({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^[1234]ç/i,wide:/^((i|İ)lk|(i|İ)kinci|üçüncü|son) çeyrek/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i],abbreviated:[/1ç/i,/2ç/i,/3ç/i,/4ç/i],wide:[/^(i|İ)lk çeyrek/i,/(i|İ)kinci çeyrek/i,/üçüncü çeyrek/i,/son çeyrek/i]},defaultParseWidth:"any",valueCallback:function(e){return e+1}}),month:Fa({matchPatterns:{narrow:/^[oşmnhtaek]/i,abbreviated:/^(oca|şub|mar|nis|may|haz|tem|ağu|eyl|eki|kas|ara)/i,wide:/^(ocak|şubat|mart|nisan|mayıs|haziran|temmuz|ağustos|eylül|ekim|kasım|aralık)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^o/i,/^ş/i,/^m/i,/^n/i,/^m/i,/^h/i,/^t/i,/^a/i,/^e/i,/^e/i,/^k/i,/^a/i],any:[/^o/i,/^ş/i,/^mar/i,/^n/i,/^may/i,/^h/i,/^t/i,/^ağ/i,/^ey/i,/^ek/i,/^k/i,/^ar/i]},defaultParseWidth:"any"}),day:Fa({matchPatterns:{narrow:/^[psçc]/i,short:/^(pz|pt|sa|ça|pe|cu|ct)/i,abbreviated:/^(paz|pzt|sal|çar|per|cum|cts)/i,wide:/^(pazar(?!tesi)|pazartesi|salı|çarşamba|perşembe|cuma(?!rtesi)|cumartesi)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^p/i,/^p/i,/^s/i,/^ç/i,/^p/i,/^c/i,/^c/i],any:[/^pz/i,/^pt/i,/^sa/i,/^ça/i,/^pe/i,/^cu/i,/^ct/i],wide:[/^pazar(?!tesi)/i,/^pazartesi/i,/^salı/i,/^çarşamba/i,/^perşembe/i,/^cuma(?!rtesi)/i,/^cumartesi/i]},defaultParseWidth:"any"}),dayPeriod:Fa({matchPatterns:{narrow:/^(öö|ös|gy|ö|sa|ös|ak|ge)/i,any:/^(ö\.?\s?[ös]\.?|öğleden sonra|gece yarısı|öğle|(sabah|öğ|akşam|gece)(leyin))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^ö\.?ö\.?/i,pm:/^ö\.?s\.?/i,midnight:/^(gy|gece yarısı)/i,noon:/^öğ/i,morning:/^sa/i,afternoon:/^öğleden sonra/i,evening:/^ak/i,night:/^ge/i}},defaultParseWidth:"any"})},options:{weekStartsOn:1,firstWeekContainsDate:1}},Sf={lessThanXSeconds:{one:"بىر سىكۇنت ئىچىدە",other:"سىكۇنت ئىچىدە {{count}}"},xSeconds:{one:"بىر سىكۇنت",other:"سىكۇنت {{count}}"},halfAMinute:"يىرىم مىنۇت",lessThanXMinutes:{one:"بىر مىنۇت ئىچىدە",other:"مىنۇت ئىچىدە {{count}}"},xMinutes:{one:"بىر مىنۇت",other:"مىنۇت {{count}}"},aboutXHours:{one:"تەخمىنەن بىر سائەت",other:"سائەت {{count}} تەخمىنەن"},xHours:{one:"بىر سائەت",other:"سائەت {{count}}"},xDays:{one:"بىر كۈن",other:"كۈن {{count}}"},aboutXWeeks:{one:"تەخمىنەن بىرھەپتە",other:"ھەپتە {{count}} تەخمىنەن"},xWeeks:{one:"بىرھەپتە",other:"ھەپتە {{count}}"},aboutXMonths:{one:"تەخمىنەن بىر ئاي",other:"ئاي {{count}} تەخمىنەن"},xMonths:{one:"بىر ئاي",other:"ئاي {{count}}"},aboutXYears:{one:"تەخمىنەن بىر يىل",other:"يىل {{count}} تەخمىنەن"},xYears:{one:"بىر يىل",other:"يىل {{count}}"},overXYears:{one:"بىر يىلدىن ئارتۇق",other:"يىلدىن ئارتۇق {{count}}"},almostXYears:{one:"ئاساسەن بىر يىل",other:"يىل {{count}} ئاساسەن"}},Hf=function(e,t,a){var n,i=Sf[e];return n="string"==typeof i?i:1===t?i.one:i.other.replace("{{count}}",String(t)),null!=a&&a.addSuffix?a.comparison&&a.comparison>0?n:n+" بولدى":n},Df={date:Qa({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:Qa({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:Qa({formats:{full:"{{date}} 'دە' {{time}}",long:"{{date}} 'دە' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},Nf={lastWeek:"'ئ‍ۆتكەن' eeee 'دە' p",yesterday:"'تۈنۈگۈن دە' p",today:"'بۈگۈن دە' p",tomorrow:"'ئەتە دە' p",nextWeek:"eeee 'دە' p",other:"P"},Xf={code:"ug",formatDistance:Hf,formatLong:Df,formatRelative:function(e,t,a,n){return Nf[e]},localize:{ordinalNumber:function(e,t){return String(e)},era:Ra({values:{narrow:["ب","ك"],abbreviated:["ب","ك"],wide:["مىيلادىدىن بۇرۇن","مىيلادىدىن كىيىن"]},defaultWidth:"wide"}),quarter:Ra({values:{narrow:["1","2","3","4"],abbreviated:["1","2","3","4"],wide:["بىرىنجى چارەك","ئىككىنجى چارەك","ئۈچىنجى چارەك","تۆتىنجى چارەك"]},defaultWidth:"wide",argumentCallback:function(e){return e-1}}),month:Ra({values:{narrow:["ي","ف","م","ا","م","ى","ى","ا","س","ۆ","ن","د"],abbreviated:["يانۋار","فېۋىرال","مارت","ئاپرىل","ماي","ئىيۇن","ئىيول","ئاۋغۇست","سىنتەبىر","ئۆكتەبىر","نويابىر","دىكابىر"],wide:["يانۋار","فېۋىرال","مارت","ئاپرىل","ماي","ئىيۇن","ئىيول","ئاۋغۇست","سىنتەبىر","ئۆكتەبىر","نويابىر","دىكابىر"]},defaultWidth:"wide"}),day:Ra({values:{narrow:["ي","د","س","چ","پ","ج","ش"],short:["ي","د","س","چ","پ","ج","ش"],abbreviated:["يەكشەنبە","دۈشەنبە","سەيشەنبە","چارشەنبە","پەيشەنبە","جۈمە","شەنبە"],wide:["يەكشەنبە","دۈشەنبە","سەيشەنبە","چارشەنبە","پەيشەنبە","جۈمە","شەنبە"]},defaultWidth:"wide"}),dayPeriod:Ra({values:{narrow:{am:"ئە",pm:"چ",midnight:"ك",noon:"چ",morning:"ئەتىگەن",afternoon:"چۈشتىن كىيىن",evening:"ئاخشىم",night:"كىچە"},abbreviated:{am:"ئە",pm:"چ",midnight:"ك",noon:"چ",morning:"ئەتىگەن",afternoon:"چۈشتىن كىيىن",evening:"ئاخشىم",night:"كىچە"},wide:{am:"ئە",pm:"چ",midnight:"ك",noon:"چ",morning:"ئەتىگەن",afternoon:"چۈشتىن كىيىن",evening:"ئاخشىم",night:"كىچە"}},defaultWidth:"wide",formattingValues:{narrow:{am:"ئە",pm:"چ",midnight:"ك",noon:"چ",morning:"ئەتىگەندە",afternoon:"چۈشتىن كىيىن",evening:"ئاخشامدا",night:"كىچىدە"},abbreviated:{am:"ئە",pm:"چ",midnight:"ك",noon:"چ",morning:"ئەتىگەندە",afternoon:"چۈشتىن كىيىن",evening:"ئاخشامدا",night:"كىچىدە"},wide:{am:"ئە",pm:"چ",midnight:"ك",noon:"چ",morning:"ئەتىگەندە",afternoon:"چۈشتىن كىيىن",evening:"ئاخشامدا",night:"كىچىدە"}},defaultFormattingWidth:"wide"})},match:{ordinalNumber:$a({matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:function(e){return parseInt(e,10)}}),era:Fa({matchPatterns:{narrow:/^(ب|ك)/i,wide:/^(مىيلادىدىن بۇرۇن|مىيلادىدىن كىيىن)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^بۇرۇن/i,/^كىيىن/i]},defaultParseWidth:"any"}),quarter:Fa({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^چ[1234]/i,wide:/^چارەك [1234]/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:function(e){return e+1}}),month:Fa({matchPatterns:{narrow:/^[يفمئامئ‍ئاسۆند]/i,abbreviated:/^(يانۋار|فېۋىرال|مارت|ئاپرىل|ماي|ئىيۇن|ئىيول|ئاۋغۇست|سىنتەبىر|ئۆكتەبىر|نويابىر|دىكابىر)/i,wide:/^(يانۋار|فېۋىرال|مارت|ئاپرىل|ماي|ئىيۇن|ئىيول|ئاۋغۇست|سىنتەبىر|ئۆكتەبىر|نويابىر|دىكابىر)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^ي/i,/^ف/i,/^م/i,/^ا/i,/^م/i,/^ى‍/i,/^ى‍/i,/^ا‍/i,/^س/i,/^ۆ/i,/^ن/i,/^د/i],any:[/^يان/i,/^فېۋ/i,/^مار/i,/^ئاپ/i,/^ماي/i,/^ئىيۇن/i,/^ئىيول/i,/^ئاۋ/i,/^سىن/i,/^ئۆك/i,/^نوي/i,/^دىك/i]},defaultParseWidth:"any"}),day:Fa({matchPatterns:{narrow:/^[دسچپجشي]/i,short:/^(يە|دۈ|سە|چا|پە|جۈ|شە)/i,abbreviated:/^(يە|دۈ|سە|چا|پە|جۈ|شە)/i,wide:/^(يەكشەنبە|دۈشەنبە|سەيشەنبە|چارشەنبە|پەيشەنبە|جۈمە|شەنبە)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^ي/i,/^د/i,/^س/i,/^چ/i,/^پ/i,/^ج/i,/^ش/i],any:[/^ي/i,/^د/i,/^س/i,/^چ/i,/^پ/i,/^ج/i,/^ش/i]},defaultParseWidth:"any"}),dayPeriod:Fa({matchPatterns:{narrow:/^(ئە|چ|ك|چ|(دە|ئەتىگەن) ( ئە‍|چۈشتىن كىيىن|ئاخشىم|كىچە))/i,any:/^(ئە|چ|ك|چ|(دە|ئەتىگەن) ( ئە‍|چۈشتىن كىيىن|ئاخشىم|كىچە))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^ئە/i,pm:/^چ/i,midnight:/^ك/i,noon:/^چ/i,morning:/ئەتىگەن/i,afternoon:/چۈشتىن كىيىن/i,evening:/ئاخشىم/i,night:/كىچە/i}},defaultParseWidth:"any"})},options:{weekStartsOn:0,firstWeekContainsDate:1}};function If(e,t){if(void 0!==e.one&&1===t)return e.one;var a=t%10,n=t%100;return 1===a&&11!==n?e.singularNominative.replace("{{count}}",String(t)):a>=2&&a<=4&&(n<10||n>20)?e.singularGenitive.replace("{{count}}",String(t)):e.pluralGenitive.replace("{{count}}",String(t))}function Ef(e){return function(t,a){return a&&a.addSuffix?a.comparison&&a.comparison>0?e.future?If(e.future,t):"за "+If(e.regular,t):e.past?If(e.past,t):If(e.regular,t)+" тому":If(e.regular,t)}}var Bf={lessThanXSeconds:Ef({regular:{one:"менше секунди",singularNominative:"менше {{count}} секунди",singularGenitive:"менше {{count}} секунд",pluralGenitive:"менше {{count}} секунд"},future:{one:"менше, ніж за секунду",singularNominative:"менше, ніж за {{count}} секунду",singularGenitive:"менше, ніж за {{count}} секунди",pluralGenitive:"менше, ніж за {{count}} секунд"}}),xSeconds:Ef({regular:{singularNominative:"{{count}} секунда",singularGenitive:"{{count}} секунди",pluralGenitive:"{{count}} секунд"},past:{singularNominative:"{{count}} секунду тому",singularGenitive:"{{count}} секунди тому",pluralGenitive:"{{count}} секунд тому"},future:{singularNominative:"за {{count}} секунду",singularGenitive:"за {{count}} секунди",pluralGenitive:"за {{count}} секунд"}}),halfAMinute:function(e,t){return t&&t.addSuffix?t.comparison&&t.comparison>0?"за півхвилини":"півхвилини тому":"півхвилини"},lessThanXMinutes:Ef({regular:{one:"менше хвилини",singularNominative:"менше {{count}} хвилини",singularGenitive:"менше {{count}} хвилин",pluralGenitive:"менше {{count}} хвилин"},future:{one:"менше, ніж за хвилину",singularNominative:"менше, ніж за {{count}} хвилину",singularGenitive:"менше, ніж за {{count}} хвилини",pluralGenitive:"менше, ніж за {{count}} хвилин"}}),xMinutes:Ef({regular:{singularNominative:"{{count}} хвилина",singularGenitive:"{{count}} хвилини",pluralGenitive:"{{count}} хвилин"},past:{singularNominative:"{{count}} хвилину тому",singularGenitive:"{{count}} хвилини тому",pluralGenitive:"{{count}} хвилин тому"},future:{singularNominative:"за {{count}} хвилину",singularGenitive:"за {{count}} хвилини",pluralGenitive:"за {{count}} хвилин"}}),aboutXHours:Ef({regular:{singularNominative:"близько {{count}} години",singularGenitive:"близько {{count}} годин",pluralGenitive:"близько {{count}} годин"},future:{singularNominative:"приблизно за {{count}} годину",singularGenitive:"приблизно за {{count}} години",pluralGenitive:"приблизно за {{count}} годин"}}),xHours:Ef({regular:{singularNominative:"{{count}} годину",singularGenitive:"{{count}} години",pluralGenitive:"{{count}} годин"}}),xDays:Ef({regular:{singularNominative:"{{count}} день",singularGenitive:"{{count}} днi",pluralGenitive:"{{count}} днів"}}),aboutXWeeks:Ef({regular:{singularNominative:"близько {{count}} тижня",singularGenitive:"близько {{count}} тижнів",pluralGenitive:"близько {{count}} тижнів"},future:{singularNominative:"приблизно за {{count}} тиждень",singularGenitive:"приблизно за {{count}} тижні",pluralGenitive:"приблизно за {{count}} тижнів"}}),xWeeks:Ef({regular:{singularNominative:"{{count}} тиждень",singularGenitive:"{{count}} тижні",pluralGenitive:"{{count}} тижнів"}}),aboutXMonths:Ef({regular:{singularNominative:"близько {{count}} місяця",singularGenitive:"близько {{count}} місяців",pluralGenitive:"близько {{count}} місяців"},future:{singularNominative:"приблизно за {{count}} місяць",singularGenitive:"приблизно за {{count}} місяці",pluralGenitive:"приблизно за {{count}} місяців"}}),xMonths:Ef({regular:{singularNominative:"{{count}} місяць",singularGenitive:"{{count}} місяці",pluralGenitive:"{{count}} місяців"}}),aboutXYears:Ef({regular:{singularNominative:"близько {{count}} року",singularGenitive:"близько {{count}} років",pluralGenitive:"близько {{count}} років"},future:{singularNominative:"приблизно за {{count}} рік",singularGenitive:"приблизно за {{count}} роки",pluralGenitive:"приблизно за {{count}} років"}}),xYears:Ef({regular:{singularNominative:"{{count}} рік",singularGenitive:"{{count}} роки",pluralGenitive:"{{count}} років"}}),overXYears:Ef({regular:{singularNominative:"більше {{count}} року",singularGenitive:"більше {{count}} років",pluralGenitive:"більше {{count}} років"},future:{singularNominative:"більше, ніж за {{count}} рік",singularGenitive:"більше, ніж за {{count}} роки",pluralGenitive:"більше, ніж за {{count}} років"}}),almostXYears:Ef({regular:{singularNominative:"майже {{count}} рік",singularGenitive:"майже {{count}} роки",pluralGenitive:"майже {{count}} років"},future:{singularNominative:"майже за {{count}} рік",singularGenitive:"майже за {{count}} роки",pluralGenitive:"майже за {{count}} років"}})},Vf=function(e,t,a){return a=a||{},Bf[e](t,a)},Kf={date:Qa({formats:{full:"EEEE, do MMMM y 'р.'",long:"do MMMM y 'р.'",medium:"d MMM y 'р.'",short:"dd.MM.y"},defaultWidth:"full"}),time:Qa({formats:{full:"H:mm:ss zzzz",long:"H:mm:ss z",medium:"H:mm:ss",short:"H:mm"},defaultWidth:"full"}),dateTime:Qa({formats:{full:"{{date}} 'о' {{time}}",long:"{{date}} 'о' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},Uf=["неділю","понеділок","вівторок","середу","четвер","п’ятницю","суботу"];function Gf(e){return"'у "+Uf[e]+" о' p"}var Of={lastWeek:function(e,t,a){var n=ra(e),i=n.getUTCDay();return yi(n,t,a)?Gf(i):function(e){var t=Uf[e];switch(e){case 0:case 3:case 5:case 6:return"'у минулу "+t+" о' p";case 1:case 2:case 4:return"'у минулий "+t+" о' p"}}(i)},yesterday:"'вчора о' p",today:"'сьогодні о' p",tomorrow:"'завтра о' p",nextWeek:function(e,t,a){var n=ra(e),i=n.getUTCDay();return yi(n,t,a)?Gf(i):function(e){var t=Uf[e];switch(e){case 0:case 3:case 5:case 6:return"'у наступну "+t+" о' p";case 1:case 2:case 4:return"'у наступний "+t+" о' p"}}(i)},other:"P"},Qf=function(e,t,a,n){var i=Of[e];return"function"==typeof i?i(t,a,n):i},Yf={code:"uk",formatDistance:Vf,formatLong:Kf,formatRelative:Qf,localize:{ordinalNumber:function(e,t){var a=String(null==t?void 0:t.unit),n=Number(e);return n+("date"===a?3===n||23===n?"-є":"-е":"minute"===a||"second"===a||"hour"===a?"-а":"-й")},era:Ra({values:{narrow:["до н.е.","н.е."],abbreviated:["до н. е.","н. е."],wide:["до нашої ери","нашої ери"]},defaultWidth:"wide"}),quarter:Ra({values:{narrow:["1","2","3","4"],abbreviated:["1-й кв.","2-й кв.","3-й кв.","4-й кв."],wide:["1-й квартал","2-й квартал","3-й квартал","4-й квартал"]},defaultWidth:"wide",argumentCallback:function(e){return e-1}}),month:Ra({values:{narrow:["С","Л","Б","К","Т","Ч","Л","С","В","Ж","Л","Г"],abbreviated:["січ.","лют.","берез.","квіт.","трав.","черв.","лип.","серп.","верес.","жовт.","листоп.","груд."],wide:["січень","лютий","березень","квітень","травень","червень","липень","серпень","вересень","жовтень","листопад","грудень"]},defaultWidth:"wide",formattingValues:{narrow:["С","Л","Б","К","Т","Ч","Л","С","В","Ж","Л","Г"],abbreviated:["січ.","лют.","берез.","квіт.","трав.","черв.","лип.","серп.","верес.","жовт.","листоп.","груд."],wide:["січня","лютого","березня","квітня","травня","червня","липня","серпня","вересня","жовтня","листопада","грудня"]},defaultFormattingWidth:"wide"}),day:Ra({values:{narrow:["Н","П","В","С","Ч","П","С"],short:["нд","пн","вт","ср","чт","пт","сб"],abbreviated:["нед","пон","вів","сер","чтв","птн","суб"],wide:["неділя","понеділок","вівторок","середа","четвер","п’ятниця","субота"]},defaultWidth:"wide"}),dayPeriod:Ra({values:{narrow:{am:"ДП",pm:"ПП",midnight:"півн.",noon:"пол.",morning:"ранок",afternoon:"день",evening:"веч.",night:"ніч"},abbreviated:{am:"ДП",pm:"ПП",midnight:"півн.",noon:"пол.",morning:"ранок",afternoon:"день",evening:"веч.",night:"ніч"},wide:{am:"ДП",pm:"ПП",midnight:"північ",noon:"полудень",morning:"ранок",afternoon:"день",evening:"вечір",night:"ніч"}},defaultWidth:"any",formattingValues:{narrow:{am:"ДП",pm:"ПП",midnight:"півн.",noon:"пол.",morning:"ранку",afternoon:"дня",evening:"веч.",night:"ночі"},abbreviated:{am:"ДП",pm:"ПП",midnight:"півн.",noon:"пол.",morning:"ранку",afternoon:"дня",evening:"веч.",night:"ночі"},wide:{am:"ДП",pm:"ПП",midnight:"північ",noon:"полудень",morning:"ранку",afternoon:"дня",evening:"веч.",night:"ночі"}},defaultFormattingWidth:"wide"})},match:{ordinalNumber:$a({matchPattern:/^(\d+)(-?(е|й|є|а|я))?/i,parsePattern:/\d+/i,valueCallback:function(e){return parseInt(e,10)}}),era:Fa({matchPatterns:{narrow:/^((до )?н\.?\s?е\.?)/i,abbreviated:/^((до )?н\.?\s?е\.?)/i,wide:/^(до нашої ери|нашої ери|наша ера)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^д/i,/^н/i]},defaultParseWidth:"any"}),quarter:Fa({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^[1234](-?[иі]?й?)? кв.?/i,wide:/^[1234](-?[иі]?й?)? квартал/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:function(e){return e+1}}),month:Fa({matchPatterns:{narrow:/^[слбктчвжг]/i,abbreviated:/^(січ|лют|бер(ез)?|квіт|трав|черв|лип|серп|вер(ес)?|жовт|лис(топ)?|груд)\.?/i,wide:/^(січень|січня|лютий|лютого|березень|березня|квітень|квітня|травень|травня|червня|червень|липень|липня|серпень|серпня|вересень|вересня|жовтень|жовтня|листопад[а]?|грудень|грудня)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^с/i,/^л/i,/^б/i,/^к/i,/^т/i,/^ч/i,/^л/i,/^с/i,/^в/i,/^ж/i,/^л/i,/^г/i],any:[/^сі/i,/^лю/i,/^б/i,/^к/i,/^т/i,/^ч/i,/^лип/i,/^се/i,/^в/i,/^ж/i,/^лис/i,/^г/i]},defaultParseWidth:"any"}),day:Fa({matchPatterns:{narrow:/^[нпвсч]/i,short:/^(нд|пн|вт|ср|чт|пт|сб)\.?/i,abbreviated:/^(нед|пон|вів|сер|че?тв|птн?|суб)\.?/i,wide:/^(неділ[яі]|понеділ[ок][ка]|вівтор[ок][ка]|серед[аи]|четвер(га)?|п\W*?ятниц[яі]|субот[аи])/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^н/i,/^п/i,/^в/i,/^с/i,/^ч/i,/^п/i,/^с/i],any:[/^н/i,/^п[он]/i,/^в/i,/^с[ер]/i,/^ч/i,/^п\W*?[ят]/i,/^с[уб]/i]},defaultParseWidth:"any"}),dayPeriod:Fa({matchPatterns:{narrow:/^([дп]п|півн\.?|пол\.?|ранок|ранку|день|дня|веч\.?|ніч|ночі)/i,abbreviated:/^([дп]п|півн\.?|пол\.?|ранок|ранку|день|дня|веч\.?|ніч|ночі)/i,wide:/^([дп]п|північ|полудень|ранок|ранку|день|дня|вечір|вечора|ніч|ночі)/i},defaultMatchWidth:"wide",parsePatterns:{any:{am:/^дп/i,pm:/^пп/i,midnight:/^півн/i,noon:/^пол/i,morning:/^р/i,afternoon:/^д[ен]/i,evening:/^в/i,night:/^н/i}},defaultParseWidth:"any"})},options:{weekStartsOn:1,firstWeekContainsDate:1}},qf={lessThanXSeconds:{one:"sekunddan kam",other:"{{count}} sekunddan kam"},xSeconds:{one:"1 sekund",other:"{{count}} sekund"},halfAMinute:"yarim minut",lessThanXMinutes:{one:"bir minutdan kam",other:"{{count}} minutdan kam"},xMinutes:{one:"1 minut",other:"{{count}} minut"},aboutXHours:{one:"tahminan 1 soat",other:"tahminan {{count}} soat"},xHours:{one:"1 soat",other:"{{count}} soat"},xDays:{one:"1 kun",other:"{{count}} kun"},aboutXWeeks:{one:"tahminan 1 hafta",other:"tahminan {{count}} hafta"},xWeeks:{one:"1 hafta",other:"{{count}} hafta"},aboutXMonths:{one:"tahminan 1 oy",other:"tahminan {{count}} oy"},xMonths:{one:"1 oy",other:"{{count}} oy"},aboutXYears:{one:"tahminan 1 yil",other:"tahminan {{count}} yil"},xYears:{one:"1 yil",other:"{{count}} yil"},overXYears:{one:"1 yildan ko'p",other:"{{count}} yildan ko'p"},almostXYears:{one:"deyarli 1 yil",other:"deyarli {{count}} yil"}},Jf=function(e,t,a){var n,i=qf[e];return n="string"==typeof i?i:1===t?i.one:i.other.replace("{{count}}",String(t)),null!=a&&a.addSuffix?a.comparison&&a.comparison>0?n+" dan keyin":n+" oldin":n},Rf={date:Qa({formats:{full:"EEEE, do MMMM, y",long:"do MMMM, y",medium:"d MMM, y",short:"dd/MM/yyyy"},defaultWidth:"full"}),time:Qa({formats:{full:"h:mm:ss zzzz",long:"h:mm:ss z",medium:"h:mm:ss",short:"h:mm"},defaultWidth:"full"}),dateTime:Qa({formats:{any:"{{date}}, {{time}}"},defaultWidth:"any"})},Lf={lastWeek:"'oldingi' eeee p 'da'",yesterday:"'kecha' p 'da'",today:"'bugun' p 'da'",tomorrow:"'ertaga' p 'da'",nextWeek:"eeee p 'da'",other:"P"},Ff={code:"uz",formatDistance:Jf,formatLong:Rf,formatRelative:function(e,t,a,n){return Lf[e]},localize:{ordinalNumber:function(e,t){return String(e)},era:Ra({values:{narrow:["M.A","M."],abbreviated:["M.A","M."],wide:["Miloddan Avvalgi","Milodiy"]},defaultWidth:"wide"}),quarter:Ra({values:{narrow:["1","2","3","4"],abbreviated:["CH.1","CH.2","CH.3","CH.4"],wide:["1-chi chorak","2-chi chorak","3-chi chorak","4-chi chorak"]},defaultWidth:"wide",argumentCallback:function(e){return e-1}}),month:Ra({values:{narrow:["Y","F","M","A","M","I","I","A","S","O","N","D"],abbreviated:["Yan","Fev","Mar","Apr","May","Iyun","Iyul","Avg","Sen","Okt","Noy","Dek"],wide:["Yanvar","Fevral","Mart","Aprel","May","Iyun","Iyul","Avgust","Sentabr","Oktabr","Noyabr","Dekabr"]},defaultWidth:"wide"}),day:Ra({values:{narrow:["Y","D","S","CH","P","J","SH"],short:["Ya","Du","Se","Cho","Pa","Ju","Sha"],abbreviated:["Yak","Dush","Sesh","Chor","Pay","Jum","Shan"],wide:["Yakshanba","Dushanba","Seshanba","Chorshanba","Payshanba","Juma","Shanba"]},defaultWidth:"wide"}),dayPeriod:Ra({values:{narrow:{am:"a",pm:"p",midnight:"y.t",noon:"p.",morning:"ertalab",afternoon:"tushdan keyin",evening:"kechqurun",night:"tun"},abbreviated:{am:"AM",pm:"PM",midnight:"yarim tun",noon:"peshin",morning:"ertalab",afternoon:"tushdan keyin",evening:"kechqurun",night:"tun"},wide:{am:"a.m.",pm:"p.m.",midnight:"yarim tun",noon:"peshin",morning:"ertalab",afternoon:"tushdan keyin",evening:"kechqurun",night:"tun"}},defaultWidth:"wide",formattingValues:{narrow:{am:"a",pm:"p",midnight:"y.t",noon:"p.",morning:"ertalab",afternoon:"tushdan keyin",evening:"kechqurun",night:"tun"},abbreviated:{am:"AM",pm:"PM",midnight:"yarim tun",noon:"peshin",morning:"ertalab",afternoon:"tushdan keyin",evening:"kechqurun",night:"tun"},wide:{am:"a.m.",pm:"p.m.",midnight:"yarim tun",noon:"peshin",morning:"ertalab",afternoon:"tushdan keyin",evening:"kechqurun",night:"tun"}},defaultFormattingWidth:"wide"})},match:{ordinalNumber:$a({matchPattern:/^(\d+)(chi)?/i,parsePattern:/\d+/i,valueCallback:function(e){return parseInt(e,10)}}),era:Fa({matchPatterns:{narrow:/^(m\.a|m\.)/i,abbreviated:/^(m\.a\.?\s?m\.?)/i,wide:/^(miloddan avval|miloddan keyin)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:"any"}),quarter:Fa({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](chi)? chorak/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:function(e){return e+1}}),month:Fa({matchPatterns:{narrow:/^[yfmasond]/i,abbreviated:/^(yan|fev|mar|apr|may|iyun|iyul|avg|sen|okt|noy|dek)/i,wide:/^(yanvar|fevral|mart|aprel|may|iyun|iyul|avgust|sentabr|oktabr|noyabr|dekabr)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^y/i,/^f/i,/^m/i,/^a/i,/^m/i,/^i/i,/^i/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ya/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^iyun/i,/^iyul/i,/^av/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:Fa({matchPatterns:{narrow:/^[ydschj]/i,short:/^(ya|du|se|cho|pa|ju|sha)/i,abbreviated:/^(yak|dush|sesh|chor|pay|jum|shan)/i,wide:/^(yakshanba|dushanba|seshanba|chorshanba|payshanba|juma|shanba)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^y/i,/^d/i,/^s/i,/^ch/i,/^p/i,/^j/i,/^sh/i],any:[/^ya/i,/^d/i,/^se/i,/^ch/i,/^p/i,/^j/i,/^sh/i]},defaultParseWidth:"any"}),dayPeriod:Fa({matchPatterns:{narrow:/^(a|p|y\.t|p| (ertalab|tushdan keyin|kechqurun|tun))/i,any:/^([ap]\.?\s?m\.?|yarim tun|peshin| (ertalab|tushdan keyin|kechqurun|tun))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^y\.t/i,noon:/^pe/i,morning:/ertalab/i,afternoon:/tushdan keyin/i,evening:/kechqurun/i,night:/tun/i}},defaultParseWidth:"any"})},options:{weekStartsOn:1,firstWeekContainsDate:1}},Zf={lessThanXSeconds:{one:"1 сониядан кам",other:"{{count}} сониядан кам"},xSeconds:{one:"1 сония",other:"{{count}} сония"},halfAMinute:"ярим дақиқа",lessThanXMinutes:{one:"1 дақиқадан кам",other:"{{count}} дақиқадан кам"},xMinutes:{one:"1 дақиқа",other:"{{count}} дақиқа"},aboutXHours:{one:"тахминан 1 соат",other:"тахминан {{count}} соат"},xHours:{one:"1 соат",other:"{{count}} соат"},xDays:{one:"1 кун",other:"{{count}} кун"},aboutXWeeks:{one:"тахминан 1 хафта",other:"тахминан {{count}} хафта"},xWeeks:{one:"1 хафта",other:"{{count}} хафта"},aboutXMonths:{one:"тахминан 1 ой",other:"тахминан {{count}} ой"},xMonths:{one:"1 ой",other:"{{count}} ой"},aboutXYears:{one:"тахминан 1 йил",other:"тахминан {{count}} йил"},xYears:{one:"1 йил",other:"{{count}} йил"},overXYears:{one:"1 йилдан кўп",other:"{{count}} йилдан кўп"},almostXYears:{one:"деярли 1 йил",other:"деярли {{count}} йил"}},_f=function(e,t,a){var n,i=Zf[e];return n="string"==typeof i?i:1===t?i.one:i.other.replace("{{count}}",String(t)),null!=a&&a.addSuffix?a.comparison&&a.comparison>0?n+"дан кейин":n+" олдин":n},$f={date:Qa({formats:{full:"EEEE, do MMMM, y",long:"do MMMM, y",medium:"d MMM, y",short:"dd/MM/yyyy"},defaultWidth:"full"}),time:Qa({formats:{full:"H:mm:ss zzzz",long:"H:mm:ss z",medium:"H:mm:ss",short:"H:mm"},defaultWidth:"full"}),dateTime:Qa({formats:{any:"{{date}}, {{time}}"},defaultWidth:"any"})},eg={lastWeek:"'ўтган' eeee p 'да'",yesterday:"'кеча' p 'да'",today:"'бугун' p 'да'",tomorrow:"'эртага' p 'да'",nextWeek:"eeee p 'да'",other:"P"},tg={code:"uz-Cyrl",formatDistance:_f,formatLong:$f,formatRelative:function(e,t,a,n){return eg[e]},localize:{ordinalNumber:function(e,t){return String(e)},era:Ra({values:{narrow:["М.А","М"],abbreviated:["М.А","М"],wide:["Милоддан Аввалги","Милодий"]},defaultWidth:"wide"}),quarter:Ra({values:{narrow:["1","2","3","4"],abbreviated:["1-чор.","2-чор.","3-чор.","4-чор."],wide:["1-чорак","2-чорак","3-чорак","4-чорак"]},defaultWidth:"wide",argumentCallback:function(e){return e-1}}),month:Ra({values:{narrow:["Я","Ф","М","А","М","И","И","А","С","О","Н","Д"],abbreviated:["янв","фев","мар","апр","май","июн","июл","авг","сен","окт","ноя","дек"],wide:["январ","феврал","март","апрел","май","июн","июл","август","сентабр","октабр","ноябр","декабр"]},defaultWidth:"wide"}),day:Ra({values:{narrow:["Я","Д","С","Ч","П","Ж","Ш"],short:["як","ду","се","чо","па","жу","ша"],abbreviated:["якш","душ","сеш","чор","пай","жум","шан"],wide:["якшанба","душанба","сешанба","чоршанба","пайшанба","жума","шанба"]},defaultWidth:"wide"}),dayPeriod:Ra({values:{any:{am:"П.О.",pm:"П.К.",midnight:"ярим тун",noon:"пешин",morning:"эрталаб",afternoon:"пешиндан кейин",evening:"кечаси",night:"тун"}},defaultWidth:"any",formattingValues:{any:{am:"П.О.",pm:"П.К.",midnight:"ярим тун",noon:"пешин",morning:"эрталаб",afternoon:"пешиндан кейин",evening:"кечаси",night:"тун"}},defaultFormattingWidth:"any"})},match:{ordinalNumber:$a({matchPattern:/^(\d+)(чи)?/i,parsePattern:/\d+/i,valueCallback:function(e){return parseInt(e,10)}}),era:Fa({matchPatterns:{narrow:/^(м\.а|м\.)/i,abbreviated:/^(м\.а|м\.)/i,wide:/^(милоддан аввал|милоддан кейин)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^м/i,/^а/i]},defaultParseWidth:"any"}),quarter:Fa({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^[1234]-чор./i,wide:/^[1234]-чорак/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:function(e){return e+1}}),month:Fa({matchPatterns:{narrow:/^[яфмамииасонд]/i,abbreviated:/^(янв|фев|мар|апр|май|июн|июл|авг|сен|окт|ноя|дек)/i,wide:/^(январ|феврал|март|апрел|май|июн|июл|август|сентабр|октабр|ноябр|декабр)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^я/i,/^ф/i,/^м/i,/^а/i,/^м/i,/^и/i,/^и/i,/^а/i,/^с/i,/^о/i,/^н/i,/^д/i],any:[/^я/i,/^ф/i,/^мар/i,/^ап/i,/^май/i,/^июн/i,/^июл/i,/^ав/i,/^с/i,/^о/i,/^н/i,/^д/i]},defaultParseWidth:"any"}),day:Fa({matchPatterns:{narrow:/^[ядсчпжш]/i,short:/^(як|ду|се|чо|па|жу|ша)/i,abbreviated:/^(якш|душ|сеш|чор|пай|жум|шан)/i,wide:/^(якшанба|душанба|сешанба|чоршанба|пайшанба|жума|шанба)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^я/i,/^д/i,/^с/i,/^ч/i,/^п/i,/^ж/i,/^ш/i],any:[/^як/i,/^ду/i,/^се/i,/^чор/i,/^пай/i,/^жу/i,/^шан/i]},defaultParseWidth:"any"}),dayPeriod:Fa({matchPatterns:{any:/^(п\.о\.|п\.к\.|ярим тун|пешиндан кейин|(эрталаб|пешиндан кейин|кечаси|тун))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^п\.о\./i,pm:/^п\.к\./i,midnight:/^ярим тун/i,noon:/^пешиндан кейин/i,morning:/эрталаб/i,afternoon:/пешиндан кейин/i,evening:/кечаси/i,night:/тун/i}},defaultParseWidth:"any"})},options:{weekStartsOn:1,firstWeekContainsDate:1}},ag={lessThanXSeconds:{one:"dưới 1 giây",other:"dưới {{count}} giây"},xSeconds:{one:"1 giây",other:"{{count}} giây"},halfAMinute:"nửa phút",lessThanXMinutes:{one:"dưới 1 phút",other:"dưới {{count}} phút"},xMinutes:{one:"1 phút",other:"{{count}} phút"},aboutXHours:{one:"khoảng 1 giờ",other:"khoảng {{count}} giờ"},xHours:{one:"1 giờ",other:"{{count}} giờ"},xDays:{one:"1 ngày",other:"{{count}} ngày"},aboutXWeeks:{one:"khoảng 1 tuần",other:"khoảng {{count}} tuần"},xWeeks:{one:"1 tuần",other:"{{count}} tuần"},aboutXMonths:{one:"khoảng 1 tháng",other:"khoảng {{count}} tháng"},xMonths:{one:"1 tháng",other:"{{count}} tháng"},aboutXYears:{one:"khoảng 1 năm",other:"khoảng {{count}} năm"},xYears:{one:"1 năm",other:"{{count}} năm"},overXYears:{one:"hơn 1 năm",other:"hơn {{count}} năm"},almostXYears:{one:"gần 1 năm",other:"gần {{count}} năm"}},ng=function(e,t,a){var n,i=ag[e];return n="string"==typeof i?i:1===t?i.one:i.other.replace("{{count}}",String(t)),null!=a&&a.addSuffix?a.comparison&&a.comparison>0?n+" nữa":n+" trước":n},ig={date:Qa({formats:{full:"EEEE, 'ngày' d MMMM 'năm' y",long:"'ngày' d MMMM 'năm' y",medium:"d MMM 'năm' y",short:"dd/MM/y"},defaultWidth:"full"}),time:Qa({formats:{full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},defaultWidth:"full"}),dateTime:Qa({formats:{full:"{{date}} {{time}}",long:"{{date}} {{time}}",medium:"{{date}} {{time}}",short:"{{date}} {{time}}"},defaultWidth:"full"})},rg={lastWeek:"eeee 'tuần trước vào lúc' p",yesterday:"'hôm qua vào lúc' p",today:"'hôm nay vào lúc' p",tomorrow:"'ngày mai vào lúc' p",nextWeek:"eeee 'tới vào lúc' p",other:"P"},og={code:"vi",formatDistance:ng,formatLong:ig,formatRelative:function(e,t,a,n){return rg[e]},localize:{ordinalNumber:function(e,t){var a=Number(e),n=null==t?void 0:t.unit;if("quarter"===n)switch(a){case 1:return"I";case 2:return"II";case 3:return"III";case 4:return"IV"}else if("day"===n)switch(a){case 1:return"thứ 2";case 2:return"thứ 3";case 3:return"thứ 4";case 4:return"thứ 5";case 5:return"thứ 6";case 6:return"thứ 7";case 7:return"chủ nhật"}else{if("week"===n)return 1===a?"thứ nhất":"thứ "+a;if("dayOfYear"===n)return 1===a?"đầu tiên":"thứ "+a}return String(a)},era:Ra({values:{narrow:["TCN","SCN"],abbreviated:["trước CN","sau CN"],wide:["trước Công Nguyên","sau Công Nguyên"]},defaultWidth:"wide"}),quarter:Ra({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["Quý 1","Quý 2","Quý 3","Quý 4"]},defaultWidth:"wide",formattingValues:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["quý I","quý II","quý III","quý IV"]},defaultFormattingWidth:"wide",argumentCallback:function(e){return e-1}}),month:Ra({values:{narrow:["1","2","3","4","5","6","7","8","9","10","11","12"],abbreviated:["Thg 1","Thg 2","Thg 3","Thg 4","Thg 5","Thg 6","Thg 7","Thg 8","Thg 9","Thg 10","Thg 11","Thg 12"],wide:["Tháng Một","Tháng Hai","Tháng Ba","Tháng Tư","Tháng Năm","Tháng Sáu","Tháng Bảy","Tháng Tám","Tháng Chín","Tháng Mười","Tháng Mười Một","Tháng Mười Hai"]},defaultWidth:"wide",formattingValues:{narrow:["01","02","03","04","05","06","07","08","09","10","11","12"],abbreviated:["thg 1","thg 2","thg 3","thg 4","thg 5","thg 6","thg 7","thg 8","thg 9","thg 10","thg 11","thg 12"],wide:["tháng 01","tháng 02","tháng 03","tháng 04","tháng 05","tháng 06","tháng 07","tháng 08","tháng 09","tháng 10","tháng 11","tháng 12"]},defaultFormattingWidth:"wide"}),day:Ra({values:{narrow:["CN","T2","T3","T4","T5","T6","T7"],short:["CN","Th 2","Th 3","Th 4","Th 5","Th 6","Th 7"],abbreviated:["CN","Thứ 2","Thứ 3","Thứ 4","Thứ 5","Thứ 6","Thứ 7"],wide:["Chủ Nhật","Thứ Hai","Thứ Ba","Thứ Tư","Thứ Năm","Thứ Sáu","Thứ Bảy"]},defaultWidth:"wide"}),dayPeriod:Ra({values:{narrow:{am:"am",pm:"pm",midnight:"nửa đêm",noon:"tr",morning:"sg",afternoon:"ch",evening:"tối",night:"đêm"},abbreviated:{am:"AM",pm:"PM",midnight:"nửa đêm",noon:"trưa",morning:"sáng",afternoon:"chiều",evening:"tối",night:"đêm"},wide:{am:"SA",pm:"CH",midnight:"nửa đêm",noon:"trưa",morning:"sáng",afternoon:"chiều",evening:"tối",night:"đêm"}},defaultWidth:"wide",formattingValues:{narrow:{am:"am",pm:"pm",midnight:"nửa đêm",noon:"tr",morning:"sg",afternoon:"ch",evening:"tối",night:"đêm"},abbreviated:{am:"AM",pm:"PM",midnight:"nửa đêm",noon:"trưa",morning:"sáng",afternoon:"chiều",evening:"tối",night:"đêm"},wide:{am:"SA",pm:"CH",midnight:"nửa đêm",noon:"giữa trưa",morning:"vào buổi sáng",afternoon:"vào buổi chiều",evening:"vào buổi tối",night:"vào ban đêm"}},defaultFormattingWidth:"wide"})},match:{ordinalNumber:$a({matchPattern:/^(\d+)/i,parsePattern:/\d+/i,valueCallback:function(e){return parseInt(e,10)}}),era:Fa({matchPatterns:{narrow:/^(tcn|scn)/i,abbreviated:/^(trước CN|sau CN)/i,wide:/^(trước Công Nguyên|sau Công Nguyên)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^t/i,/^s/i]},defaultParseWidth:"any"}),quarter:Fa({matchPatterns:{narrow:/^([1234]|i{1,3}v?)/i,abbreviated:/^q([1234]|i{1,3}v?)/i,wide:/^quý ([1234]|i{1,3}v?)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/(1|i)$/i,/(2|ii)$/i,/(3|iii)$/i,/(4|iv)$/i]},defaultParseWidth:"any",valueCallback:function(e){return e+1}}),month:Fa({matchPatterns:{narrow:/^(0?[2-9]|10|11|12|0?1)/i,abbreviated:/^thg[ _]?(0?[1-9](?!\d)|10|11|12)/i,wide:/^tháng ?(Một|Hai|Ba|Tư|Năm|Sáu|Bảy|Tám|Chín|Mười|Mười ?Một|Mười ?Hai|0?[1-9](?!\d)|10|11|12)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/0?1$/i,/0?2/i,/3/,/4/,/5/,/6/,/7/,/8/,/9/,/10/,/11/,/12/],abbreviated:[/^thg[ _]?0?1(?!\d)/i,/^thg[ _]?0?2/i,/^thg[ _]?0?3/i,/^thg[ _]?0?4/i,/^thg[ _]?0?5/i,/^thg[ _]?0?6/i,/^thg[ _]?0?7/i,/^thg[ _]?0?8/i,/^thg[ _]?0?9/i,/^thg[ _]?10/i,/^thg[ _]?11/i,/^thg[ _]?12/i],wide:[/^tháng ?(Một|0?1(?!\d))/i,/^tháng ?(Hai|0?2)/i,/^tháng ?(Ba|0?3)/i,/^tháng ?(Tư|0?4)/i,/^tháng ?(Năm|0?5)/i,/^tháng ?(Sáu|0?6)/i,/^tháng ?(Bảy|0?7)/i,/^tháng ?(Tám|0?8)/i,/^tháng ?(Chín|0?9)/i,/^tháng ?(Mười|10)/i,/^tháng ?(Mười ?Một|11)/i,/^tháng ?(Mười ?Hai|12)/i]},defaultParseWidth:"wide"}),day:Fa({matchPatterns:{narrow:/^(CN|T2|T3|T4|T5|T6|T7)/i,short:/^(CN|Th ?2|Th ?3|Th ?4|Th ?5|Th ?6|Th ?7)/i,abbreviated:/^(CN|Th ?2|Th ?3|Th ?4|Th ?5|Th ?6|Th ?7)/i,wide:/^(Chủ ?Nhật|Chúa ?Nhật|thứ ?Hai|thứ ?Ba|thứ ?Tư|thứ ?Năm|thứ ?Sáu|thứ ?Bảy)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/CN/i,/2/i,/3/i,/4/i,/5/i,/6/i,/7/i],short:[/CN/i,/2/i,/3/i,/4/i,/5/i,/6/i,/7/i],abbreviated:[/CN/i,/2/i,/3/i,/4/i,/5/i,/6/i,/7/i],wide:[/(Chủ|Chúa) ?Nhật/i,/Hai/i,/Ba/i,/Tư/i,/Năm/i,/Sáu/i,/Bảy/i]},defaultParseWidth:"wide"}),dayPeriod:Fa({matchPatterns:{narrow:/^(a|p|nửa đêm|trưa|(giờ) (sáng|chiều|tối|đêm))/i,abbreviated:/^(am|pm|nửa đêm|trưa|(giờ) (sáng|chiều|tối|đêm))/i,wide:/^(ch[^i]*|sa|nửa đêm|trưa|(giờ) (sáng|chiều|tối|đêm))/i},defaultMatchWidth:"wide",parsePatterns:{any:{am:/^(a|sa)/i,pm:/^(p|ch[^i]*)/i,midnight:/nửa đêm/i,noon:/trưa/i,morning:/sáng/i,afternoon:/chiều/i,evening:/tối/i,night:/^đêm/i}},defaultParseWidth:"any"})},options:{weekStartsOn:1,firstWeekContainsDate:1}},dg={lessThanXSeconds:{one:"不到 1 秒",other:"不到 {{count}} 秒"},xSeconds:{one:"1 秒",other:"{{count}} 秒"},halfAMinute:"半分钟",lessThanXMinutes:{one:"不到 1 分钟",other:"不到 {{count}} 分钟"},xMinutes:{one:"1 分钟",other:"{{count}} 分钟"},xHours:{one:"1 小时",other:"{{count}} 小时"},aboutXHours:{one:"大约 1 小时",other:"大约 {{count}} 小时"},xDays:{one:"1 天",other:"{{count}} 天"},aboutXWeeks:{one:"大约 1 个星期",other:"大约 {{count}} 个星期"},xWeeks:{one:"1 个星期",other:"{{count}} 个星期"},aboutXMonths:{one:"大约 1 个月",other:"大约 {{count}} 个月"},xMonths:{one:"1 个月",other:"{{count}} 个月"},aboutXYears:{one:"大约 1 年",other:"大约 {{count}} 年"},xYears:{one:"1 年",other:"{{count}} 年"},overXYears:{one:"超过 1 年",other:"超过 {{count}} 年"},almostXYears:{one:"将近 1 年",other:"将近 {{count}} 年"}},sg=function(e,t,a){var n,i=dg[e];return n="string"==typeof i?i:1===t?i.one:i.other.replace("{{count}}",String(t)),null!=a&&a.addSuffix?a.comparison&&a.comparison>0?n+"内":n+"前":n},ug={date:Qa({formats:{full:"y'年'M'月'd'日' EEEE",long:"y'年'M'月'd'日'",medium:"yyyy-MM-dd",short:"yy-MM-dd"},defaultWidth:"full"}),time:Qa({formats:{full:"zzzz a h:mm:ss",long:"z a h:mm:ss",medium:"a h:mm:ss",short:"a h:mm"},defaultWidth:"full"}),dateTime:Qa({formats:{full:"{{date}} {{time}}",long:"{{date}} {{time}}",medium:"{{date}} {{time}}",short:"{{date}} {{time}}"},defaultWidth:"full"})};function mg(e,t,a){var n="eeee p";return yi(e,t,a)?n:e.getTime()>t.getTime()?"'下个'eeee p":"'上个'eeee p"}var lg={lastWeek:mg,yesterday:"'昨天' p",today:"'今天' p",tomorrow:"'明天' p",nextWeek:mg,other:"PP p"},hg=function(e,t,a,n){var i=lg[e];return"function"==typeof i?i(t,a,n):i},cg={code:"zh-CN",formatDistance:sg,formatLong:ug,formatRelative:hg,localize:{ordinalNumber:function(e,t){var a=Number(e);switch(null==t?void 0:t.unit){case"date":return a.toString()+"日";case"hour":return a.toString()+"时";case"minute":return a.toString()+"分";case"second":return a.toString()+"秒";default:return"第 "+a.toString()}},era:Ra({values:{narrow:["前","公元"],abbreviated:["前","公元"],wide:["公元前","公元"]},defaultWidth:"wide"}),quarter:Ra({values:{narrow:["1","2","3","4"],abbreviated:["第一季","第二季","第三季","第四季"],wide:["第一季度","第二季度","第三季度","第四季度"]},defaultWidth:"wide",argumentCallback:function(e){return e-1}}),month:Ra({values:{narrow:["一","二","三","四","五","六","七","八","九","十","十一","十二"],abbreviated:["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],wide:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"]},defaultWidth:"wide"}),day:Ra({values:{narrow:["日","一","二","三","四","五","六"],short:["日","一","二","三","四","五","六"],abbreviated:["周日","周一","周二","周三","周四","周五","周六"],wide:["星期日","星期一","星期二","星期三","星期四","星期五","星期六"]},defaultWidth:"wide"}),dayPeriod:Ra({values:{narrow:{am:"上",pm:"下",midnight:"凌晨",noon:"午",morning:"早",afternoon:"下午",evening:"晚",night:"夜"},abbreviated:{am:"上午",pm:"下午",midnight:"凌晨",noon:"中午",morning:"早晨",afternoon:"中午",evening:"晚上",night:"夜间"},wide:{am:"上午",pm:"下午",midnight:"凌晨",noon:"中午",morning:"早晨",afternoon:"中午",evening:"晚上",night:"夜间"}},defaultWidth:"wide",formattingValues:{narrow:{am:"上",pm:"下",midnight:"凌晨",noon:"午",morning:"早",afternoon:"下午",evening:"晚",night:"夜"},abbreviated:{am:"上午",pm:"下午",midnight:"凌晨",noon:"中午",morning:"早晨",afternoon:"中午",evening:"晚上",night:"夜间"},wide:{am:"上午",pm:"下午",midnight:"凌晨",noon:"中午",morning:"早晨",afternoon:"中午",evening:"晚上",night:"夜间"}},defaultFormattingWidth:"wide"})},match:{ordinalNumber:$a({matchPattern:/^(第\s*)?\d+(日|时|分|秒)?/i,parsePattern:/\d+/i,valueCallback:function(e){return parseInt(e,10)}}),era:Fa({matchPatterns:{narrow:/^(前)/i,abbreviated:/^(前)/i,wide:/^(公元前|公元)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^(前)/i,/^(公元)/i]},defaultParseWidth:"any"}),quarter:Fa({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^第[一二三四]刻/i,wide:/^第[一二三四]刻钟/i},defaultMatchWidth:"wide",parsePatterns:{any:[/(1|一)/i,/(2|二)/i,/(3|三)/i,/(4|四)/i]},defaultParseWidth:"any",valueCallback:function(e){return e+1}}),month:Fa({matchPatterns:{narrow:/^(一|二|三|四|五|六|七|八|九|十[二一])/i,abbreviated:/^(一|二|三|四|五|六|七|八|九|十[二一]|\d|1[12])月/i,wide:/^(一|二|三|四|五|六|七|八|九|十[二一])月/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^一/i,/^二/i,/^三/i,/^四/i,/^五/i,/^六/i,/^七/i,/^八/i,/^九/i,/^十(?!(一|二))/i,/^十一/i,/^十二/i],any:[/^一|1/i,/^二|2/i,/^三|3/i,/^四|4/i,/^五|5/i,/^六|6/i,/^七|7/i,/^八|8/i,/^九|9/i,/^十(?!(一|二))|10/i,/^十一|11/i,/^十二|12/i]},defaultParseWidth:"any"}),day:Fa({matchPatterns:{narrow:/^[一二三四五六日]/i,short:/^[一二三四五六日]/i,abbreviated:/^周[一二三四五六日]/i,wide:/^星期[一二三四五六日]/i},defaultMatchWidth:"wide",parsePatterns:{any:[/日/i,/一/i,/二/i,/三/i,/四/i,/五/i,/六/i]},defaultParseWidth:"any"}),dayPeriod:Fa({matchPatterns:{any:/^(上午?|下午?|午夜|[中正]午|早上?|下午|晚上?|凌晨|)/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^上午?/i,pm:/^下午?/i,midnight:/^午夜/i,noon:/^[中正]午/i,morning:/^早上/i,afternoon:/^下午/i,evening:/^晚上?/i,night:/^凌晨/i}},defaultParseWidth:"any"})},options:{weekStartsOn:1,firstWeekContainsDate:4}},fg={lessThanXSeconds:{one:"少於 1 秒",other:"少於 {{count}} 秒"},xSeconds:{one:"1 秒",other:"{{count}} 秒"},halfAMinute:"半分鐘",lessThanXMinutes:{one:"少於 1 分鐘",other:"少於 {{count}} 分鐘"},xMinutes:{one:"1 分鐘",other:"{{count}} 分鐘"},xHours:{one:"1 小時",other:"{{count}} 小時"},aboutXHours:{one:"大約 1 小時",other:"大約 {{count}} 小時"},xDays:{one:"1 天",other:"{{count}} 天"},aboutXWeeks:{one:"大約 1 個星期",other:"大約 {{count}} 個星期"},xWeeks:{one:"1 個星期",other:"{{count}} 個星期"},aboutXMonths:{one:"大約 1 個月",other:"大約 {{count}} 個月"},xMonths:{one:"1 個月",other:"{{count}} 個月"},aboutXYears:{one:"大約 1 年",other:"大約 {{count}} 年"},xYears:{one:"1 年",other:"{{count}} 年"},overXYears:{one:"超過 1 年",other:"超過 {{count}} 年"},almostXYears:{one:"將近 1 年",other:"將近 {{count}} 年"}},gg=function(e,t,a){var n,i=fg[e];return n="string"==typeof i?i:1===t?i.one:i.other.replace("{{count}}",String(t)),null!=a&&a.addSuffix?a.comparison&&a.comparison>0?n+"內":n+"前":n},pg={date:Qa({formats:{full:"y'年'M'月'd'日' EEEE",long:"y'年'M'月'd'日'",medium:"yyyy-MM-dd",short:"yy-MM-dd"},defaultWidth:"full"}),time:Qa({formats:{full:"zzzz a h:mm:ss",long:"z a h:mm:ss",medium:"a h:mm:ss",short:"a h:mm"},defaultWidth:"full"}),dateTime:Qa({formats:{full:"{{date}} {{time}}",long:"{{date}} {{time}}",medium:"{{date}} {{time}}",short:"{{date}} {{time}}"},defaultWidth:"full"})},vg={lastWeek:"'上個'eeee p",yesterday:"'昨天' p",today:"'今天' p",tomorrow:"'明天' p",nextWeek:"'下個'eeee p",other:"P"},bg={code:"zh-HK",formatDistance:gg,formatLong:pg,formatRelative:function(e,t,a,n){return vg[e]},localize:{ordinalNumber:function(e,t){var a=Number(e);switch(null==t?void 0:t.unit){case"date":return a+"日";case"hour":return a+"時";case"minute":return a+"分";case"second":return a+"秒";default:return"第 "+a}},era:Ra({values:{narrow:["前","公元"],abbreviated:["前","公元"],wide:["公元前","公元"]},defaultWidth:"wide"}),quarter:Ra({values:{narrow:["1","2","3","4"],abbreviated:["第一季","第二季","第三季","第四季"],wide:["第一季度","第二季度","第三季度","第四季度"]},defaultWidth:"wide",argumentCallback:function(e){return e-1}}),month:Ra({values:{narrow:["一","二","三","四","五","六","七","八","九","十","十一","十二"],abbreviated:["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],wide:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"]},defaultWidth:"wide"}),day:Ra({values:{narrow:["日","一","二","三","四","五","六"],short:["日","一","二","三","四","五","六"],abbreviated:["週日","週一","週二","週三","週四","週五","週六"],wide:["星期日","星期一","星期二","星期三","星期四","星期五","星期六"]},defaultWidth:"wide"}),dayPeriod:Ra({values:{narrow:{am:"上",pm:"下",midnight:"午夜",noon:"晌",morning:"早",afternoon:"午",evening:"晚",night:"夜"},abbreviated:{am:"上午",pm:"下午",midnight:"午夜",noon:"中午",morning:"上午",afternoon:"下午",evening:"晚上",night:"夜晚"},wide:{am:"上午",pm:"下午",midnight:"午夜",noon:"中午",morning:"上午",afternoon:"下午",evening:"晚上",night:"夜晚"}},defaultWidth:"wide",formattingValues:{narrow:{am:"上",pm:"下",midnight:"午夜",noon:"晌",morning:"早",afternoon:"午",evening:"晚",night:"夜"},abbreviated:{am:"上午",pm:"下午",midnight:"午夜",noon:"中午",morning:"上午",afternoon:"下午",evening:"晚上",night:"夜晚"},wide:{am:"上午",pm:"下午",midnight:"午夜",noon:"中午",morning:"上午",afternoon:"下午",evening:"晚上",night:"夜晚"}},defaultFormattingWidth:"wide"})},match:{ordinalNumber:$a({matchPattern:/^(第\s*)?\d+(日|時|分|秒)?/i,parsePattern:/\d+/i,valueCallback:function(e){return parseInt(e,10)}}),era:Fa({matchPatterns:{narrow:/^(前)/i,abbreviated:/^(前)/i,wide:/^(公元前|公元)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^(前)/i,/^(公元)/i]},defaultParseWidth:"any"}),quarter:Fa({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^第[一二三四]季/i,wide:/^第[一二三四]季度/i},defaultMatchWidth:"wide",parsePatterns:{any:[/(1|一)/i,/(2|二)/i,/(3|三)/i,/(4|四)/i]},defaultParseWidth:"any",valueCallback:function(e){return e+1}}),month:Fa({matchPatterns:{narrow:/^(一|二|三|四|五|六|七|八|九|十[二一])/i,abbreviated:/^(一|二|三|四|五|六|七|八|九|十[二一]|\d|1[12])月/i,wide:/^(一|二|三|四|五|六|七|八|九|十[二一])月/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^一/i,/^二/i,/^三/i,/^四/i,/^五/i,/^六/i,/^七/i,/^八/i,/^九/i,/^十(?!(一|二))/i,/^十一/i,/^十二/i],any:[/^一|1/i,/^二|2/i,/^三|3/i,/^四|4/i,/^五|5/i,/^六|6/i,/^七|7/i,/^八|8/i,/^九|9/i,/^十(?!(一|二))|10/i,/^十一|11/i,/^十二|12/i]},defaultParseWidth:"any"}),day:Fa({matchPatterns:{narrow:/^[一二三四五六日]/i,short:/^[一二三四五六日]/i,abbreviated:/^週[一二三四五六日]/i,wide:/^星期[一二三四五六日]/i},defaultMatchWidth:"wide",parsePatterns:{any:[/日/i,/一/i,/二/i,/三/i,/四/i,/五/i,/六/i]},defaultParseWidth:"any"}),dayPeriod:Fa({matchPatterns:{any:/^(上午?|下午?|午夜|[中正]午|早上?|下午|晚上?|凌晨)/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^上午?/i,pm:/^下午?/i,midnight:/^午夜/i,noon:/^[中正]午/i,morning:/^早上/i,afternoon:/^下午/i,evening:/^晚上?/i,night:/^凌晨/i}},defaultParseWidth:"any"})},options:{weekStartsOn:0,firstWeekContainsDate:1}},wg={lessThanXSeconds:{one:"少於 1 秒",other:"少於 {{count}} 秒"},xSeconds:{one:"1 秒",other:"{{count}} 秒"},halfAMinute:"半分鐘",lessThanXMinutes:{one:"少於 1 分鐘",other:"少於 {{count}} 分鐘"},xMinutes:{one:"1 分鐘",other:"{{count}} 分鐘"},xHours:{one:"1 小時",other:"{{count}} 小時"},aboutXHours:{one:"大約 1 小時",other:"大約 {{count}} 小時"},xDays:{one:"1 天",other:"{{count}} 天"},aboutXWeeks:{one:"大約 1 個星期",other:"大約 {{count}} 個星期"},xWeeks:{one:"1 個星期",other:"{{count}} 個星期"},aboutXMonths:{one:"大約 1 個月",other:"大約 {{count}} 個月"},xMonths:{one:"1 個月",other:"{{count}} 個月"},aboutXYears:{one:"大約 1 年",other:"大約 {{count}} 年"},xYears:{one:"1 年",other:"{{count}} 年"},overXYears:{one:"超過 1 年",other:"超過 {{count}} 年"},almostXYears:{one:"將近 1 年",other:"將近 {{count}} 年"}},yg=function(e,t,a){var n,i=wg[e];return n="string"==typeof i?i:1===t?i.one:i.other.replace("{{count}}",String(t)),null!=a&&a.addSuffix?a.comparison&&a.comparison>0?n+"內":n+"前":n},Ag={date:Qa({formats:{full:"y'年'M'月'd'日' EEEE",long:"y'年'M'月'd'日'",medium:"yyyy-MM-dd",short:"yy-MM-dd"},defaultWidth:"full"}),time:Qa({formats:{full:"zzzz a h:mm:ss",long:"z a h:mm:ss",medium:"a h:mm:ss",short:"a h:mm"},defaultWidth:"full"}),dateTime:Qa({formats:{full:"{{date}} {{time}}",long:"{{date}} {{time}}",medium:"{{date}} {{time}}",short:"{{date}} {{time}}"},defaultWidth:"full"})},kg={lastWeek:"'上個'eeee p",yesterday:"'昨天' p",today:"'今天' p",tomorrow:"'明天' p",nextWeek:"'下個'eeee p",other:"P"},Mg={code:"zh-TW",formatDistance:yg,formatLong:Ag,formatRelative:function(e,t,a,n){return kg[e]},localize:{ordinalNumber:function(e,t){var a=Number(e);switch(null==t?void 0:t.unit){case"date":return a+"日";case"hour":return a+"時";case"minute":return a+"分";case"second":return a+"秒";default:return"第 "+a}},era:Ra({values:{narrow:["前","公元"],abbreviated:["前","公元"],wide:["公元前","公元"]},defaultWidth:"wide"}),quarter:Ra({values:{narrow:["1","2","3","4"],abbreviated:["第一刻","第二刻","第三刻","第四刻"],wide:["第一刻鐘","第二刻鐘","第三刻鐘","第四刻鐘"]},defaultWidth:"wide",argumentCallback:function(e){return e-1}}),month:Ra({values:{narrow:["一","二","三","四","五","六","七","八","九","十","十一","十二"],abbreviated:["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],wide:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"]},defaultWidth:"wide"}),day:Ra({values:{narrow:["日","一","二","三","四","五","六"],short:["日","一","二","三","四","五","六"],abbreviated:["週日","週一","週二","週三","週四","週五","週六"],wide:["星期日","星期一","星期二","星期三","星期四","星期五","星期六"]},defaultWidth:"wide"}),dayPeriod:Ra({values:{narrow:{am:"上",pm:"下",midnight:"凌晨",noon:"午",morning:"早",afternoon:"下午",evening:"晚",night:"夜"},abbreviated:{am:"上午",pm:"下午",midnight:"凌晨",noon:"中午",morning:"早晨",afternoon:"中午",evening:"晚上",night:"夜間"},wide:{am:"上午",pm:"下午",midnight:"凌晨",noon:"中午",morning:"早晨",afternoon:"中午",evening:"晚上",night:"夜間"}},defaultWidth:"wide",formattingValues:{narrow:{am:"上",pm:"下",midnight:"凌晨",noon:"午",morning:"早",afternoon:"下午",evening:"晚",night:"夜"},abbreviated:{am:"上午",pm:"下午",midnight:"凌晨",noon:"中午",morning:"早晨",afternoon:"中午",evening:"晚上",night:"夜間"},wide:{am:"上午",pm:"下午",midnight:"凌晨",noon:"中午",morning:"早晨",afternoon:"中午",evening:"晚上",night:"夜間"}},defaultFormattingWidth:"wide"})},match:{ordinalNumber:$a({matchPattern:/^(第\s*)?\d+(日|時|分|秒)?/i,parsePattern:/\d+/i,valueCallback:function(e){return parseInt(e,10)}}),era:Fa({matchPatterns:{narrow:/^(前)/i,abbreviated:/^(前)/i,wide:/^(公元前|公元)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^(前)/i,/^(公元)/i]},defaultParseWidth:"any"}),quarter:Fa({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^第[一二三四]刻/i,wide:/^第[一二三四]刻鐘/i},defaultMatchWidth:"wide",parsePatterns:{any:[/(1|一)/i,/(2|二)/i,/(3|三)/i,/(4|四)/i]},defaultParseWidth:"any",valueCallback:function(e){return e+1}}),month:Fa({matchPatterns:{narrow:/^(一|二|三|四|五|六|七|八|九|十[二一])/i,abbreviated:/^(一|二|三|四|五|六|七|八|九|十[二一]|\d|1[12])月/i,wide:/^(一|二|三|四|五|六|七|八|九|十[二一])月/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^一/i,/^二/i,/^三/i,/^四/i,/^五/i,/^六/i,/^七/i,/^八/i,/^九/i,/^十(?!(一|二))/i,/^十一/i,/^十二/i],any:[/^一|1/i,/^二|2/i,/^三|3/i,/^四|4/i,/^五|5/i,/^六|6/i,/^七|7/i,/^八|8/i,/^九|9/i,/^十(?!(一|二))|10/i,/^十一|11/i,/^十二|12/i]},defaultParseWidth:"any"}),day:Fa({matchPatterns:{narrow:/^[一二三四五六日]/i,short:/^[一二三四五六日]/i,abbreviated:/^週[一二三四五六日]/i,wide:/^星期[一二三四五六日]/i},defaultMatchWidth:"wide",parsePatterns:{any:[/日/i,/一/i,/二/i,/三/i,/四/i,/五/i,/六/i]},defaultParseWidth:"any"}),dayPeriod:Fa({matchPatterns:{any:/^(上午?|下午?|午夜|[中正]午|早上?|下午|晚上?|凌晨)/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^上午?/i,pm:/^下午?/i,midnight:/^午夜/i,noon:/^[中正]午/i,morning:/^早上/i,afternoon:/^下午/i,evening:/^晚上?/i,night:/^凌晨/i}},defaultParseWidth:"any"})},options:{weekStartsOn:1,firstWeekContainsDate:4}},Pg=Object.freeze({__proto__:null,af:An,ar:Dn,arDZ:Kn,arEG:Yn,arMA:Fn,arSA:ti,arTN:oi,az:fi,be:Wi,beTarask:Xi,bg:Qi,bn:ir,bs:pr,ca:Cr,cs:Gr,cy:eo,da:co,de:zo,deAT:Do,el:Yo,enAU:Lo,enCA:td,enGB:rd,enIE:dd,enIN:sd,enNZ:ud,enUS:tn,enZA:md,eo:gd,es:Ad,et:jd,eu:Nd,faIR:Vd,fi:ds,fr:ws,frCA:Ms,frCH:xs,fy:Ss,gd:Is,gl:Gs,gu:Js,he:tu,hi:lu,hr:vu,ht:ku,hu:Hu,hy:Eu,id:Gu,is:Ju,it:nm,itCH:im,ja:um,jaHira:fm,ka:wm,kk:Tm,km:Xm,kn:Um,ko:qm,lb:nl,lt:fl,lv:kl,mk:Xl,mn:Jl,ms:rh,mt:hh,nb:vh,nl:kh,nlBE:zh,nn:Dh,oc:Bh,pl:Fh,pt:ac,ptBR:sc,ro:cc,ru:Mc,sk:Nc,sl:Kc,sq:Yc,sr:Zc,srLatn:nf,sv:mf,ta:gf,te:yf,th:Wf,tr:Tf,ug:Xf,uk:Yf,uz:Ff,uzCyrl:tg,vi:og,zhCN:cg,zhHK:bg,zhTW:Mg});console.info("%c CLOCK-WEATHER-CARD \n%c Version: 1.0.10","color: orange; font-weight: bold; background: black","color: white; font-weight: bold; background: dimgray"),window.customCards=window.customCards||[],window.customCards.push({type:"clock-weather-card",name:"Clock Weather Card",description:"Shows the current date/time in combination with the current weather and an iOS insipired weather forecast."});const Wg=(new Map).set(-10,new ue(120,162,204)).set(0,new ue(164,195,210)).set(10,new ue(121,210,179)).set(20,new ue(252,245,112)).set(30,new ue(255,150,79)).set(40,new ue(255,192,159));let xg=class extends F{constructor(){super(),this.currentDate=new Date;const e=1e3*(60-this.currentDate.getSeconds());setTimeout((()=>setInterval((()=>{this.currentDate=new Date}),6e4)),e),setTimeout((()=>{this.currentDate=new Date}),e)}static getStubConfig(){return{}}setConfig(e){if(!e)throw new Error("Invalid configuration.");if(!e.entity)throw new Error('Attribute "entity" must be present.');if(e.forecast_days&&e.forecast_days<1)throw new Error('Attribute "forecast_days" must be greater than 0.');if(e.time_format&&"24"!==e.time_format.toString()&&"12"!==e.time_format.toString())throw new Error('Attribute "time_format" must either be "12" or "24".');if(e.hide_today_section&&e.hide_forecast_section)throw new Error('Attributes "hide_today_section" and "hide_forecast_section" must not enabled at the same time.');this.config=this.mergeConfig(e)}shouldUpdate(e){var t;if(!this.config)return!1;const a=e.get("hass");if(a){if(a.states[this.config.sun_entity]!==(null===(t=this.hass)||void 0===t?void 0:t.states[this.config.sun_entity]))return!0}return function(e,t,a){if(t.has("config")||a)return!0;if(e.config.entity){var n=t.get("hass");return!n||n.states[e.config.entity]!==e.hass.states[e.config.entity]}return!1}(this,e,!1)}render(){const e=!this.config.hide_today_section,t=!this.config.hide_forecast_section;return S` + + ${this.config.title?S` +
+ ${this.config.title} +
`:""} +
+ ${e?S` + + ${ta((()=>this.renderToday()))} + `:""} + ${t?S` + + ${ta((()=>this.renderForecast()))} + `:""} +
+
+ `}renderToday(){const e=this.getWeather(),t=e.state,a=void 0!==e.attributes.temperature?Math.round(e.attributes.temperature):null,n=e.attributes.temperature_unit,i=this.config.weather_icon_type,r=this.toIcon(t,i,!1,this.getIconAnimationKind()),o=[this.localize(`weather.${t}`)];return null!==a&&o.push(a+n),S` + + + + + + + ${o.join(", ")} + + + ${this.time()} + + + ${this.date()} + + + `}renderForecast(){const e=this.getWeather(),t=void 0!==e.attributes.temperature?Math.round(e.attributes.temperature):null,a=this.config.forecast_days,n=e.attributes.temperature_unit,i=this.extractDailyForecasts(e.attributes.forecast,a),r=i.map((e=>e.templow)),o=i.map((e=>e.temperature));null!==t&&(r.push(t),o.push(t));const d=Math.round(Ot(r)),s=Math.round(Gt(o)),u=this.gradientRange(d,s,n);return i.map((e=>ta((()=>this.renderForecastDay(e,u,d,s,t)))))}renderForecastDay(e,t,a,n,i){const r=this.localize(`day.${new Date(e.datetime).getDay()}`),o="pouring"===e.condition?"raindrops":"rainy"===e.condition?"raindrop":e.condition,d=this.toIcon(o,"fill",!0,"static"),s=this.getWeather().attributes.temperature_unit,u=(new Date).getDate()===new Date(e.datetime).getDate(),m=Math.round(u&&null!==i?Math.min(i,e.templow):e.templow),l=Math.round(u&&null!==i?Math.max(i,e.temperature):e.temperature);return S` + + ${this.renderText(r)} + ${this.renderIcon(d)} + ${this.renderText(this.toConfiguredTempUnit(s,m),"right")} + ${this.renderForecastTemperatureBar(t,a,n,m,l,i,u)} + ${this.renderText(this.toConfiguredTempUnit(s,l))} + + `}renderText(e,t="left"){return S` + + ${e} + + `}renderIcon(e){return S` + + + + `}renderForecastTemperatureBar(e,t,a,n,i,r,o){const{startPercent:d,endPercent:s}=this.calculateBarRangePercents(t,a,n,i);return S` + + + + ${o?this.renderForecastCurrentTemp(n,i,r):""} + + + `}renderForecastCurrentTemp(e,t,a){if(null==a)return S``;return S` + + + + + `}static get styles(){return me}gradientRange(e,t,a){const n=this.toCelsius(a,e),i=this.toCelsius(a,t),r=Math.max(function(e,t=0){return t?Math.floor(e/t)*t:Math.floor(e)}(n,10),Ot([...Wg.keys()])),o=Math.min(function(e,t=0){return t?Math.ceil(e/t)*t:Math.ceil(e)}(i,10),Gt([...Wg.keys()]));return Array.from(Wg.keys()).filter((e=>e>=r&&e<=o)).map((e=>Wg.get(e)))}gradient(e,t,a){const[n,i]=this.calculateRgb(e,t,"left"),[r,o]=this.calculateRgb(e,a,"right");return[n,...e.slice(i+1,o),r].map((e=>`rgb(${e.r},${e.g},${e.b})`)).join(",")}calculateRgb(e,t,a){function n(e,t,a){const n=Math.abs(e-t)/100*a;return Qt(e>t?e-n:e+n)}const i=100/(e.length-1),r=t/i,o=Math.round(r),d=100/i*(t-o*i),s=0===d?o:d<0?o-1:o+1,u=function(e,t,a,i){const r=i[e],o=i[t],d=a<0?100+a:a,s=a<0?o:r,u=a<0?r:o,m=n(s.r,u.r,d),l=n(s.g,u.g,d),h=n(s.b,u.b,d);return new ue(m,l,h)}(o,s,d,e);return[u,"left"===a?Math.min(o,s):Math.max(o,s)]}handleAction(e){this.hass&&this.config&&e.detail.action&&function(e,t,a,n){var i;"double_tap"===n&&a.double_tap_action?i=a.double_tap_action:"hold"===n&&a.hold_action?i=a.hold_action:"tap"===n&&a.tap_action&&(i=a.tap_action),de(e,t,a,i)}(this,this.hass,this.config,e.detail.action)}mergeConfig(e){var t;return Object.assign(Object.assign({},e),{sun_entity:e.sun_entity||"sun.sun",weather_icon_type:e.weather_icon_type||"line",forecast_days:e.forecast_days||5,animated_icon:void 0===e.animated_icon||e.animated_icon,time_format:null===(t=e.time_format)||void 0===t?void 0:t.toString(),hide_forecast_section:e.hide_forecast_section||!1,hide_today_section:e.hide_today_section||!1,date_pattern:e.date_pattern||"P"})}toIcon(e,t,a,n){var i;const r=a?"day":"below_horizon"===(null===(i=this.getSun())||void 0===i?void 0:i.state)?"night":"day",o=("animated"===n?$t:ea)[t][e];return(null==o?void 0:o[r])||o}getWeather(){var e;const t=this.hass.states[this.config.entity];if(!t)throw new Error("Weather entity could not be found.");if(!(null===(e=null==t?void 0:t.attributes)||void 0===e?void 0:e.forecast))throw new Error('Weather entity does not have attribute "forecast".');return t}getSun(){return this.hass.states[this.config.sun_entity]}getLocale(){var e;return this.config.locale||(null===(e=this.hass.locale)||void 0===e?void 0:e.language)||"en-GB"}getDateFnsLocale(){var e;const t=this.getLocale().replace("_","-").split("-"),a=t[0].toLowerCase()+((null===(e=t[1])||void 0===e?void 0:e.toUpperCase())||"");if("en"===a)return tn;const n=Pg[a];return n||(console.error("clock-weather-card - Locale not supported: "+a),rd)}date(){return`${this.localize(`day.${this.currentDate.getDay()}`)}, ${sn(this.currentDate,this.config.date_pattern,{locale:this.getDateFnsLocale()})}`}time(){return sn(this.currentDate,"24"===this.getTimeFormat()?"HH:mm":"h:mm aa")}getIconAnimationKind(){return this.config.animated_icon?"animated":"static"}toCelsius(e,t){return"°C"===e?t:Math.round(5/9*(t-32))}toFahrenheit(e,t){return"°F"===e?t:Math.round(9*t/5+32)}getConfiguredTemperatureUnit(){return this.hass.config.unit_system.temperature}toConfiguredTempUnit(e,t){return this.getConfiguredTemperatureUnit()===e?t+e:"°C"===e?this.toFahrenheit(e,t)+"°F":this.toCelsius(e,t)+"°C"}getTimeFormat(){var e,t;return this.config.time_format?this.config.time_format:(null===(e=this.hass.locale)||void 0===e?void 0:e.time_format)===ne.twenty_four?"24":(null===(t=this.hass.locale)||void 0===t?void 0:t.time_format)===ne.am_pm?"12":"24"}calculateBarRangePercents(e,t,a,n){if(t===e)return{startPercent:0,endPercent:100};const i=100/(t-e)*(a-e),r=100/(t-e)*(n-e);return{startPercent:Math.max(0,i),endPercent:Math.min(100,r)}}localize(e){return function(e,t){let a;const n=t.replace(/['"]+/g,"").replace("-","_").replace("_","").toLowerCase();try{a=e.split(".").reduce(((e,t)=>e[t]),Ut[n])}catch(t){a=e.split(".").reduce(((e,t)=>e[t]),Ut.en)}return void 0===a&&(a=e.split(".").reduce(((e,t)=>e[t]),Ut.en)),a}(e,this.getLocale())}extractDailyForecasts(e,t){const a=e.reduce(((e,t)=>{const a=new Date(t.datetime).getDate();return e[a]=e[a]||[],e[a].push(t),e}),{});return Object.values(a).reduce(((e,t)=>{if(!t.length)return e;const a=this.calculateAverageDailyForecast(t);return e.push(a),e}),[]).sort(((e,t)=>e.datetime.getTime()-t.datetime.getTime())).slice(0,t)}calculateAverageDailyForecast(e){const t=e.map((e=>{var t,a,n;return null!==(n=null!==(a=null!==(t=e.templow)&&void 0!==t?t:e.temperature)&&void 0!==a?a:this.getWeather().attributes.temperature)&&void 0!==n?n:0})),a=Ot(t),n=e.map((e=>{var t,a;return null!==(a=null!==(t=e.temperature)&&void 0!==t?t:this.getWeather().attributes.temperature)&&void 0!==a?a:0})),i=Gt(n),r=e.map((e=>{var t;return null!==(t=e.precipitation_probability)&&void 0!==t?t:0})),o=Gt(r),d=e.map((e=>{var t;return null!==(t=e.precipitation)&&void 0!==t?t:0})),s=Gt(d),u=e.map((e=>e.condition)),m=function(e){const t={};let a=e[0],n=1;for(let i=0;in&&(a=r,n=t[r])),a}return a}(u);return{temperature:i,templow:a,datetime:new Date(e[0].datetime),condition:m,precipitation_probability:o,precipitation:s}}};e([$({attribute:!1})],xg.prototype,"hass",void 0),e([ee()],xg.prototype,"config",void 0),e([ee()],xg.prototype,"currentDate",void 0),xg=e([(e=>t=>"function"==typeof t?((e,t)=>(window.customElements.define(e,t),t))(e,t):((e,t)=>{const{kind:a,elements:n}=t;return{kind:a,elements:n,finisher(t){window.customElements.define(e,t)}}})(e,t))("clock-weather-card")],xg);export{xg as ClockWeatherCard}; diff --git a/www/frigate-hass-card.js b/www/frigate-hass-card.js new file mode 100644 index 000000000..880d79292 --- /dev/null +++ b/www/frigate-hass-card.js @@ -0,0 +1,1244 @@ +function t(t,e,i,n){var o,r=arguments.length,s=r<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,i,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(r<3?o(s):r>3?o(e,i,s):o(e,i))||s);return r>3&&s&&Object.defineProperty(e,i,s),s}var e=window&&window.__assign||function(){return e=Object.assign||function(t){for(var e,i=1,n=arguments.length;inew y("string"==typeof t?t:t+"",void 0,v),w=(t,...e)=>{const i=1===t.length?t[0]:e.reduce(((e,i,n)=>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.")})(i)+t[n+1]),t[0]);return new y(i,t,v)},C=f?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e="";for(const i of t.cssRules)e+=i.cssText;return _(e)})(t):t +/** + * @license + * Copyright 2017 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */;var I;const E=window,x=E.trustedTypes,B=x?x.emptyScript:"",k=E.reactiveElementPolyfillSupport,S={toAttribute(t,e){switch(e){case Boolean:t=t?B:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,e){let i=t;switch(e){case Boolean:i=null!==t;break;case Number:i=null===t?null:Number(t);break;case Object:case Array:try{i=JSON.parse(t)}catch(t){i=null}}return i}},D=(t,e)=>e!==t&&(e==e||t==t),Q={attribute:!0,type:String,converter:S,reflect:!1,hasChanged:D};class M extends HTMLElement{constructor(){super(),this._$Ei=new Map,this.isUpdatePending=!1,this.hasUpdated=!1,this._$El=null,this.u()}static addInitializer(t){var e;null!==(e=this.h)&&void 0!==e||(this.h=[]),this.h.push(t)}static get observedAttributes(){this.finalize();const t=[];return this.elementProperties.forEach(((e,i)=>{const n=this._$Ep(i,e);void 0!==n&&(this._$Ev.set(n,i),t.push(n))})),t}static createProperty(t,e=Q){if(e.state&&(e.attribute=!1),this.finalize(),this.elementProperties.set(t,e),!e.noAccessor&&!this.prototype.hasOwnProperty(t)){const i="symbol"==typeof t?Symbol():"__"+t,n=this.getPropertyDescriptor(t,i,e);void 0!==n&&Object.defineProperty(this.prototype,t,n)}}static getPropertyDescriptor(t,e,i){return{get(){return this[e]},set(n){const o=this[t];this[e]=n,this.requestUpdate(t,o,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)||Q}static finalize(){if(this.hasOwnProperty("finalized"))return!1;this.finalized=!0;const t=Object.getPrototypeOf(this);if(t.finalize(),this.elementProperties=new Map(t.elementProperties),this._$Ev=new Map,this.hasOwnProperty("properties")){const t=this.properties,e=[...Object.getOwnPropertyNames(t),...Object.getOwnPropertySymbols(t)];for(const i of e)this.createProperty(i,t[i])}return this.elementStyles=this.finalizeStyles(this.styles),!0}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const i=new Set(t.flat(1/0).reverse());for(const t of i)e.unshift(C(t))}else void 0!==t&&e.push(C(t));return e}static _$Ep(t,e){const i=e.attribute;return!1===i?void 0:"string"==typeof i?i:"string"==typeof t?t.toLowerCase():void 0}u(){var t;this._$E_=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this._$Eg(),this.requestUpdate(),null===(t=this.constructor.h)||void 0===t||t.forEach((t=>t(this)))}addController(t){var e,i;(null!==(e=this._$ES)&&void 0!==e?e:this._$ES=[]).push(t),void 0!==this.renderRoot&&this.isConnected&&(null===(i=t.hostConnected)||void 0===i||i.call(t))}removeController(t){var e;null===(e=this._$ES)||void 0===e||e.splice(this._$ES.indexOf(t)>>>0,1)}_$Eg(){this.constructor.elementProperties.forEach(((t,e)=>{this.hasOwnProperty(e)&&(this._$Ei.set(e,this[e]),delete this[e])}))}createRenderRoot(){var t;const e=null!==(t=this.shadowRoot)&&void 0!==t?t:this.attachShadow(this.constructor.shadowRootOptions);return((t,e)=>{f?t.adoptedStyleSheets=e.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet)):e.forEach((e=>{const i=document.createElement("style"),n=g.litNonce;void 0!==n&&i.setAttribute("nonce",n),i.textContent=e.cssText,t.appendChild(i)}))})(e,this.constructor.elementStyles),e}connectedCallback(){var t;void 0===this.renderRoot&&(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),null===(t=this._$ES)||void 0===t||t.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._$ES)||void 0===t||t.forEach((t=>{var e;return null===(e=t.hostDisconnected)||void 0===e?void 0:e.call(t)}))}attributeChangedCallback(t,e,i){this._$AK(t,i)}_$EO(t,e,i=Q){var n;const o=this.constructor._$Ep(t,i);if(void 0!==o&&!0===i.reflect){const r=(void 0!==(null===(n=i.converter)||void 0===n?void 0:n.toAttribute)?i.converter:S).toAttribute(e,i.type);this._$El=t,null==r?this.removeAttribute(o):this.setAttribute(o,r),this._$El=null}}_$AK(t,e){var i;const n=this.constructor,o=n._$Ev.get(t);if(void 0!==o&&this._$El!==o){const t=n.getPropertyOptions(o),r="function"==typeof t.converter?{fromAttribute:t.converter}:void 0!==(null===(i=t.converter)||void 0===i?void 0:i.fromAttribute)?t.converter:S;this._$El=o,this[o]=r.fromAttribute(e,t.type),this._$El=null}}requestUpdate(t,e,i){let n=!0;void 0!==t&&(((i=i||this.constructor.getPropertyOptions(t)).hasChanged||D)(this[t],e)?(this._$AL.has(t)||this._$AL.set(t,e),!0===i.reflect&&this._$El!==t&&(void 0===this._$EC&&(this._$EC=new Map),this._$EC.set(t,i))):n=!1),!this.isUpdatePending&&n&&(this._$E_=this._$Ej())}async _$Ej(){this.isUpdatePending=!0;try{await this._$E_}catch(t){Promise.reject(t)}const t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var t;if(!this.isUpdatePending)return;this.hasUpdated,this._$Ei&&(this._$Ei.forEach(((t,e)=>this[e]=t)),this._$Ei=void 0);let e=!1;const i=this._$AL;try{e=this.shouldUpdate(i),e?(this.willUpdate(i),null===(t=this._$ES)||void 0===t||t.forEach((t=>{var e;return null===(e=t.hostUpdate)||void 0===e?void 0:e.call(t)})),this.update(i)):this._$Ek()}catch(t){throw e=!1,this._$Ek(),t}e&&this._$AE(i)}willUpdate(t){}_$AE(t){var e;null===(e=this._$ES)||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)}_$Ek(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$E_}shouldUpdate(t){return!0}update(t){void 0!==this._$EC&&(this._$EC.forEach(((t,e)=>this._$EO(e,this[e],t))),this._$EC=void 0),this._$Ek()}updated(t){}firstUpdated(t){}} +/** + * @license + * Copyright 2017 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */ +var T;M.finalized=!0,M.elementProperties=new Map,M.elementStyles=[],M.shadowRootOptions={mode:"open"},null==k||k({ReactiveElement:M}),(null!==(I=E.reactiveElementVersions)&&void 0!==I?I:E.reactiveElementVersions=[]).push("1.4.1");const O=window,R=O.trustedTypes,P=R?R.createPolicy("lit-html",{createHTML:t=>t}):void 0,N=`lit$${(Math.random()+"").slice(9)}$`,F="?"+N,L=`<${F}>`,j=document,z=(t="")=>j.createComment(t),U=t=>null===t||"object"!=typeof t&&"function"!=typeof t,H=Array.isArray,G=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,q=/-->/g,Y=/>/g,$=RegExp(">|[ \t\n\f\r](?:([^\\s\"'>=/]+)([ \t\n\f\r]*=[ \t\n\f\r]*(?:[^ \t\n\f\r\"'`<>=]|(\"|')|))|$)","g"),W=/'/g,V=/"/g,J=/^(?:script|style|textarea|title)$/i,K=(t=>(e,...i)=>({_$litType$:t,strings:e,values:i}))(1),Z=Symbol.for("lit-noChange"),X=Symbol.for("lit-nothing"),tt=new WeakMap,et=j.createTreeWalker(j,129,null,!1),it=(t,e)=>{const i=t.length-1,n=[];let o,r=2===e?"":"",s=G;for(let e=0;e"===l[0]?(s=null!=o?o:G,d=-1):void 0===l[1]?d=-2:(d=s.lastIndex-l[2].length,a=l[1],s=void 0===l[3]?$:'"'===l[3]?V:W):s===V||s===W?s=$:s===q||s===Y?s=G:(s=$,o=void 0);const h=s===$&&t[e+1].startsWith("/>")?" ":"";r+=s===G?i+L:d>=0?(n.push(a),i.slice(0,d)+"$lit$"+i.slice(d)+N+h):i+N+(-2===d?(n.push(void 0),e):h)}const a=r+(t[i]||"")+(2===e?"":"");if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return[void 0!==P?P.createHTML(a):a,n]};class nt{constructor({strings:t,_$litType$:e},i){let n;this.parts=[];let o=0,r=0;const s=t.length-1,a=this.parts,[l,d]=it(t,e);if(this.el=nt.createElement(l,i),et.currentNode=this.el.content,2===e){const t=this.el.content,e=t.firstChild;e.remove(),t.append(...e.childNodes)}for(;null!==(n=et.nextNode())&&a.length0){n.textContent=R?R.emptyScript:"";for(let i=0;iH(t)||"function"==typeof(null==t?void 0:t[Symbol.iterator]))(t)?this.O(t):this.$(t)}S(t,e=this._$AB){return this._$AA.parentNode.insertBefore(t,e)}k(t){this._$AH!==t&&(this._$AR(),this._$AH=this.S(t))}$(t){this._$AH!==X&&U(this._$AH)?this._$AA.nextSibling.data=t:this.k(j.createTextNode(t)),this._$AH=t}T(t){var e;const{values:i,_$litType$:n}=t,o="number"==typeof n?this._$AC(t):(void 0===n.el&&(n.el=nt.createElement(n.h,this.options)),n);if((null===(e=this._$AH)||void 0===e?void 0:e._$AD)===o)this._$AH.m(i);else{const t=new rt(o,this),e=t.p(this.options);t.m(i),this.k(e),this._$AH=t}}_$AC(t){let e=tt.get(t.strings);return void 0===e&&tt.set(t.strings,e=new nt(t)),e}O(t){H(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let i,n=0;for(const o of t)n===e.length?e.push(i=new st(this.S(z()),this.S(z()),this,this.options)):i=e[n],i._$AI(o),n++;n2||""!==i[0]||""!==i[1]?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=X}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,e=this,i,n){const o=this.strings;let r=!1;if(void 0===o)t=ot(this,t,e,0),r=!U(t)||t!==this._$AH&&t!==Z,r&&(this._$AH=t);else{const n=t;let s,a;for(t=o[0],s=0;s{var n,o;const r=null!==(n=null==i?void 0:i.renderBefore)&&void 0!==n?n:e;let s=r._$litPart$;if(void 0===s){const t=null!==(o=null==i?void 0:i.renderBefore)&&void 0!==o?o:null;r._$litPart$=s=new st(e.insertBefore(z(),t),t,void 0,null!=i?i:{})}return s._$AI(t),s})(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 Z}}gt.finalized=!0,gt._$litElement$=!0,null===(pt=globalThis.litElementHydrateSupport)||void 0===pt||pt.call(globalThis,{LitElement:gt});const ft=globalThis.litElementPolyfillSupport;null==ft||ft({LitElement:gt}),(null!==(mt=globalThis.litElementVersions)&&void 0!==mt?mt:globalThis.litElementVersions=[]).push("3.2.2"); +/** + * @license + * Copyright 2017 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */ +const vt=t=>e=>"function"==typeof e?((t,e)=>(customElements.define(t,e),e))(t,e):((t,e)=>{const{kind:i,elements:n}=e;return{kind:i,elements:n,finisher(e){customElements.define(t,e)}}})(t,e) +/** + * @license + * Copyright 2017 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */,bt=(t,e)=>"method"===e.kind&&e.descriptor&&!("value"in e.descriptor)?{...e,finisher(i){i.createProperty(e.key,t)}}:{kind:"field",key:Symbol(),placement:"own",descriptor:{},originalKey:e.key,initializer(){"function"==typeof e.initializer&&(this[e.key]=e.initializer.call(this))},finisher(i){i.createProperty(e.key,t)}};function yt(t){return(e,i)=>void 0!==i?((t,e,i)=>{e.constructor.createProperty(i,t)})(t,e,i):bt(t,e) +/** + * @license + * Copyright 2017 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */}function _t(t){return yt({...t,state:!0})} +/** + * @license + * Copyright 2017 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */ +/** + * @license + * Copyright 2017 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */ +function wt(t,e){return(({finisher:t,descriptor:e})=>(i,n)=>{var o;if(void 0===n){const n=null!==(o=i.originalKey)&&void 0!==o?o:i.key,r=null!=e?{kind:"method",placement:"prototype",key:n,descriptor:e(i.key)}:{...i,key:n};return null!=t&&(r.finisher=function(e){t(e,n)}),r}{const o=i.constructor;void 0!==e&&Object.defineProperty(i,n,e(n)),null==t||t(o,n)}})({descriptor:i=>{const n={get(){var e,i;return null!==(i=null===(e=this.renderRoot)||void 0===e?void 0:e.querySelector(t))&&void 0!==i?i:null},enumerable:!0,configurable:!0};if(e){const e="symbol"==typeof i?Symbol():"__"+i;n.get=function(){var i,n;return void 0===this[e]&&(this[e]=null!==(n=null===(i=this.renderRoot)||void 0===i?void 0:i.querySelector(t))&&void 0!==n?n:null),this[e]}}return n}})} +/** + * @license + * Copyright 2021 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */var Ct;null===(Ct=window.HTMLSlotElement)||void 0===Ct||Ct.prototype.assignedElements; +/** + * @license + * Copyright 2017 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */ +const It=1,Et=2,xt=3,Bt=4,kt=t=>(...e)=>({_$litDirective$:t,values:e});class St{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,e,i){this._$Ct=t,this._$AM=e,this._$Ci=i}_$AS(t,e){return this.update(t,e)}update(t,e){return this.render(...e)}} +/** + * @license + * Copyright 2018 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */const Dt=kt(class extends St{constructor(t){var e;if(super(t),t.type!==It||"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]){var i,n;if(void 0===this.nt){this.nt=new Set,void 0!==t.strings&&(this.st=new Set(t.strings.join(" ").split(/\s/).filter((t=>""!==t))));for(const t in e)e[t]&&!(null===(i=this.st)||void 0===i?void 0:i.has(t))&&this.nt.add(t);return this.render(e)}const o=t.element.classList;this.nt.forEach((t=>{t in e||(o.remove(t),this.nt.delete(t))}));for(const t in e){const i=!!e[t];i===this.nt.has(t)||(null===(n=this.st)||void 0===n?void 0:n.has(t))||(i?(o.add(t),this.nt.add(t)):(o.remove(t),this.nt.delete(t)))}return Z}}),Qt=t=>void 0===t.strings,Mt={},Tt=(t,e=Mt)=>t._$AH=e +/** + * @license + * Copyright 2017 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */,Ot=(t,e)=>{var i,n;const o=t._$AN;if(void 0===o)return!1;for(const t of o)null===(n=(i=t)._$AO)||void 0===n||n.call(i,e,!1),Ot(t,e);return!0},Rt=t=>{let e,i;do{if(void 0===(e=t._$AM))break;i=e._$AN,i.delete(t),t=e}while(0===(null==i?void 0:i.size))},Pt=t=>{for(let e;e=t._$AM;t=e){let i=e._$AN;if(void 0===i)e._$AN=i=new Set;else if(i.has(t))break;i.add(t),Lt(e)}}; +/** + * @license + * Copyright 2020 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */function Nt(t){void 0!==this._$AN?(Rt(this),this._$AM=t,Pt(this)):this._$AM=t}function Ft(t,e=!1,i=0){const n=this._$AH,o=this._$AN;if(void 0!==o&&0!==o.size)if(e)if(Array.isArray(n))for(let t=i;t{var e,i,n,o;t.type==Et&&(null!==(e=(n=t)._$AP)&&void 0!==e||(n._$AP=Ft),null!==(i=(o=t)._$AQ)&&void 0!==i||(o._$AQ=Nt))};class jt extends St{constructor(){super(...arguments),this._$AN=void 0}_$AT(t,e,i){super._$AT(t,e,i),Pt(this),this.isConnected=t._$AU}_$AO(t,e=!0){var i,n;t!==this.isConnected&&(this.isConnected=t,t?null===(i=this.reconnected)||void 0===i||i.call(this):null===(n=this.disconnected)||void 0===n||n.call(this)),e&&(Ot(this,t),Rt(this))}setValue(t){if(Qt(this._$Ct))this._$Ct._$AI(t,this);else{const e=[...this._$Ct._$AH];e[this._$Ci]=t,this._$Ct._$AI(e,this,0)}}disconnected(){}reconnected(){}} +/** + * @license + * Copyright 2020 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */const zt=()=>new Ut;class Ut{}const Ht=new WeakMap,Gt=kt(class extends jt{render(t){return X}update(t,[e]){var i;const n=e!==this.Y;return n&&void 0!==this.Y&&this.rt(void 0),(n||this.lt!==this.dt)&&(this.Y=e,this.ct=null===(i=t.options)||void 0===i?void 0:i.host,this.rt(this.dt=t.element)),X}rt(t){var e;if("function"==typeof this.Y){const i=null!==(e=this.ct)&&void 0!==e?e:globalThis;let n=Ht.get(i);void 0===n&&(n=new WeakMap,Ht.set(i,n)),void 0!==n.get(this.Y)&&this.Y.call(this.ct,void 0),n.set(this.Y,t),void 0!==t&&this.Y.call(this.ct,t)}else this.Y.value=t}get lt(){var t,e,i;return"function"==typeof this.Y?null===(e=Ht.get(null!==(t=this.ct)&&void 0!==t?t:globalThis))||void 0===e?void 0:e.get(this.Y):null===(i=this.Y)||void 0===i?void 0:i.value}disconnected(){this.lt===this.dt&&this.rt(void 0)}reconnected(){this.rt(this.dt)}}),qt=kt(class extends St{constructor(t){var e;if(super(t),t.type!==It||"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,i)=>{const n=t[i];return null==n?e:e+`${i=i.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase()}:${n};`}),"")}update(t,[e]){const{style:i}=t.element;if(void 0===this.vt){this.vt=new Set;for(const t in e)this.vt.add(t);return this.render(e)}this.vt.forEach((t=>{null==e[t]&&(this.vt.delete(t),t.includes("-")?i.removeProperty(t):i[t]="")}));for(const t in e){const n=e[t];null!=n&&(this.vt.add(t),t.includes("-")?i.setProperty(t,n):i[t]=n)}return Z}}); +/** + * @license + * Copyright 2018 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */ +/** + * @license + * Copyright 2021 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */ +class Yt{constructor(t){this.Y=t}disconnect(){this.Y=void 0}reconnect(t){this.Y=t}deref(){return this.Y}}class $t{constructor(){this.Z=void 0,this.q=void 0}get(){return this.Z}pause(){var t;null!==(t=this.Z)&&void 0!==t||(this.Z=new Promise((t=>this.q=t)))}resume(){var t;null===(t=this.q)||void 0===t||t.call(this),this.Z=this.q=void 0}} +/** + * @license + * Copyright 2017 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */const Wt=t=>!(t=>null===t||"object"!=typeof t&&"function"!=typeof t)(t)&&"function"==typeof t.then;const Vt=kt(class extends jt{constructor(){super(...arguments),this._$Cwt=1073741823,this._$Cyt=[],this._$CK=new Yt(this),this._$CX=new $t}render(...t){var e;return null!==(e=t.find((t=>!Wt(t))))&&void 0!==e?e:Z}update(t,e){const i=this._$Cyt;let n=i.length;this._$Cyt=e;const o=this._$CK,r=this._$CX;this.isConnected||this.disconnected();for(let t=0;tthis._$Cwt);t++){const s=e[t];if(!Wt(s))return this._$Cwt=t,s;t{for(;r.get();)await r.get();const e=o.deref();if(void 0!==e){const i=e._$Cyt.indexOf(s);i>-1&&i0){if(++e>=800)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}var fi=gi(Ye),vi=/\{\n\/\* \[wrapped with (.+)\] \*/,bi=/,? & /;var yi=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/;function _i(t){return function(){return t}}var wi=function(){try{var t=He(Object,"defineProperty");return t({},"",{}),t}catch(t){}}(),Ci=wi?function(t,e){return wi(t,"toString",{configurable:!0,enumerable:!1,value:_i(e),writable:!0})}:Se,Ii=gi(Ci);function Ei(t,e){for(var i=-1,n=null==t?0:t.length;++i-1}var Di=[["ary",128],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",32],["partialRight",64],["rearg",256]];function Qi(t,e,i){var n=e+"";return Ii(t,function(t,e){var i=e.length;if(!i)return t;var n=i-1;return e[n]=(i>1?"& ":"")+e[n],e=e.join(i>2?", ":" "),t.replace(yi,"{\n/* [wrapped with "+e+"] */\n")}(n,function(t,e){return Ei(Di,(function(i){var n="_."+i[0];e&i[1]&&!Si(t,n)&&t.push(n)})),t.sort()}(function(t){var e=t.match(vi);return e?e[1].split(bi):[]}(n),i)))}function Mi(t,e,i,n,o,r,s,a,l,d){var c=8&e;e|=c?32:64,4&(e&=~(c?64:32))||(e&=-4);var h=[t,e,o,c?r:void 0,c?s:void 0,c?void 0:r,c?void 0:s,a,l,d],u=i.apply(void 0,h);return pi(t)&&fi(u,h),u.placeholder=n,Qi(u,t,e)}function Ti(t){return t.placeholder}var Oi=/^(?:0|[1-9]\d*)$/;function Ri(t,e){var i=typeof t;return!!(e=null==e?9007199254740991:e)&&("number"==i||"symbol"!=i&&Oi.test(t))&&t>-1&&t%1==0&&t1&&v.reverse(),c&&l-1&&t%1==0&&t<=9007199254740991}function Xi(t){return null!=t&&Zi(t.length)&&!De(t)}function tn(t,e,i){if(!_e(i))return!1;var n=typeof e;return!!("number"==n?Xi(i)&&Ri(e,i.length):"string"==n&&e in i)&&qi(i[e],t)}function en(t){return Ki((function(e,i){var n=-1,o=i.length,r=o>1?i[o-1]:void 0,s=o>2?i[2]:void 0;for(r=t.length>3&&"function"==typeof r?(o--,r):void 0,s&&tn(i[0],i[1],s)&&(r=o<3?void 0:r,o=1),e=Object(e);++n-1},Wn.prototype.set=function(t,e){var i=this.__data__,n=Yn(i,t);return n<0?(++this.size,i.push([t,e])):i[n][1]=e,this};var Vn=He(Zt,"Map");function Jn(t,e){var i=t.__data__;return function(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t}(e)?i["string"==typeof e?"string":"hash"]:i.map}function Kn(t){var e=-1,i=null==t?0:t.length;for(this.clear();++e0&&i(a)?e>1?uo(a,e-1,i,n,o):lo(o,a):n||(o[o.length]=a)}return o}function Ao(t){return(null==t?0:t.length)?uo(t,1):[]}function po(t){return Ii(Ji(t,void 0,Ao),t+"")}var mo=po(ao),go=xn(Object.getPrototypeOf,Object),fo=Function.prototype,vo=Object.prototype,bo=fo.toString,yo=vo.hasOwnProperty,_o=bo.call(Object);function wo(t){if(!ae(t)||"[object Object]"!=se(t))return!1;var e=go(t);if(null===e)return!0;var i=yo.call(e,"constructor")&&e.constructor;return"function"==typeof i&&i instanceof i&&bo.call(i)==_o}function Co(t){if(!ae(t))return!1;var e=se(t);return"[object Error]"==e||"[object DOMException]"==e||"string"==typeof t.message&&"string"==typeof t.name&&!wo(t)}var Io=Ki((function(t,e){try{return Je(t,void 0,e)}catch(t){return Co(t)?t:new Error(t)}}));function Eo(t,e){var i;if("function"!=typeof e)throw new TypeError("Expected a function");return t=ke(t),function(){return--t>0&&(i=e.apply(this,arguments)),t<=1&&(e=void 0),i}}var xo=Ki((function(t,e,i){var n=1;if(i.length){var o=Fi(i,Ti(xo));n|=32}return Ui(t,n,e,i,o)}));xo.placeholder={};var Bo=po((function(t,e){return Ei(e,(function(e){e=oo(e),Gi(t,e,xo(t[e],t))})),t})),ko=Ki((function(t,e,i){var n=3;if(i.length){var o=Fi(i,Ti(ko));n|=32}return Ui(e,n,t,i,o)}));function So(t,e,i){var n=-1,o=t.length;e<0&&(e=-e>o?0:o+e),(i=i>o?o:i)<0&&(i+=o),o=e>i?0:i-e>>>0,e>>>=0;for(var r=Array(o);++n=n?t:So(t,e,i)}ko.placeholder={};var Qo=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");function Mo(t){return Qo.test(t)}var To="[\\ud800-\\udfff]",Oo="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",Ro="\\ud83c[\\udffb-\\udfff]",Po="[^\\ud800-\\udfff]",No="(?:\\ud83c[\\udde6-\\uddff]){2}",Fo="[\\ud800-\\udbff][\\udc00-\\udfff]",Lo="(?:"+Oo+"|"+Ro+")"+"?",jo="[\\ufe0e\\ufe0f]?"+Lo+("(?:\\u200d(?:"+[Po,No,Fo].join("|")+")[\\ufe0e\\ufe0f]?"+Lo+")*"),zo="(?:"+[Po+Oo+"?",Oo,No,Fo,To].join("|")+")",Uo=RegExp(Ro+"(?="+Ro+")|"+zo+jo,"g");function Ho(t){return Mo(t)?function(t){return t.match(Uo)||[]}(t):function(t){return t.split("")}(t)}function Go(t){return function(e){var i=Mo(e=io(e))?Ho(e):void 0,n=i?i[0]:e.charAt(0),o=i?Do(i,1).join(""):e.slice(1);return n[t]()+o}}var qo=Go("toUpperCase");function Yo(t){return qo(io(t).toLowerCase())}function $o(t,e,i,n){var o=-1,r=null==t?0:t.length;for(n&&r&&(i=t[++o]);++o=e?t:e)),t}function kr(t){var e=this.__data__=new Wn(t);this.size=e.size}function Sr(t,e){return t&&Wi(e,Dn(e),t)}kr.prototype.clear=function(){this.__data__=new Wn,this.size=0},kr.prototype.delete=function(t){var e=this.__data__,i=e.delete(t);return this.size=e.size,i},kr.prototype.get=function(t){return this.__data__.get(t)},kr.prototype.has=function(t){return this.__data__.has(t)},kr.prototype.set=function(t,e){var i=this.__data__;if(i instanceof Wn){var n=i.__data__;if(!Vn||n.length<199)return n.push([t,e]),this.size=++i.size,this;i=this.__data__=new Kn(n)}return i.set(t,e),this.size=i.size,this};var Dr="object"==typeof exports&&exports&&!exports.nodeType&&exports,Qr=Dr&&"object"==typeof module&&module&&!module.nodeType&&module,Mr=Qr&&Qr.exports===Dr?Zt.Buffer:void 0,Tr=Mr?Mr.allocUnsafe:void 0;function Or(t,e){if(e)return t.slice();var i=t.length,n=Tr?Tr(i):new t.constructor(i);return t.copy(n),n}function Rr(t,e){for(var i=-1,n=null==t?0:t.length,o=0,r=[];++ia))return!1;var d=r.get(t),c=r.get(e);if(d&&c)return d==e&&c==t;var h=-1,u=!0,A=2&i?new gs:void 0;for(r.set(t,e),r.set(e,t);++h=e||i<0||h&&t-d>=r}function g(){var t=ta();if(m(t))return f(t);a=setTimeout(g,function(t){var i=e-(t-l);return h?ia(i,r-(t-d)):i}(t))}function f(t){return a=void 0,u&&n?A(t):(n=o=void 0,s)}function v(){var t=ta(),i=m(t);if(n=arguments,o=this,l=t,i){if(void 0===a)return p(l);if(h)return clearTimeout(a),a=setTimeout(g,e),A(l)}return void 0===a&&(a=setTimeout(g,e)),s}return e=xe(e)||0,_e(i)&&(c=!!i.leading,r=(h="maxWait"in i)?ea(xe(i.maxWait)||0,e):r,u="trailing"in i?!!i.trailing:u),v.cancel=function(){void 0!==a&&clearTimeout(a),d=0,n=l=o=a=void 0},v.flush=function(){return void 0===a?s:f(ta())},v}var oa=Object.prototype,ra=oa.hasOwnProperty,sa=Ki((function(t,e){t=Object(t);var i=-1,n=e.length,o=n>2?e[2]:void 0;for(o&&tn(e[0],e[1],o)&&(n=1);++i=200&&(r=vs,s=!1,e=new gs(e));t:for(;++o":">",'"':""","'":"'"}),Na=/[&<>"']/g,Fa=RegExp(Na.source);function La(t){return(t=io(t))&&Fa.test(t)?t.replace(Na,Pa):t}var ja=/[\\^$.*+?()[\]{}|]/g,za=RegExp(ja.source);function Ua(t,e){for(var i=-1,n=null==t?0:t.length;++i-1?o[r?e[s]:s]:void 0}}var $a=Math.max;function Wa(t,e,i){var n=null==t?0:t.length;if(!n)return-1;var o=null==i?0:ke(i);return o<0&&(o=$a(n+o,0)),xi(t,js(e),o)}var Va=Ya(Wa);function Ja(t,e,i){var n;return i(t,(function(t,i,o){if(e(t,i,o))return n=i,!1})),n}var Ka=Math.max,Za=Math.min;function Xa(t,e,i){var n=null==t?0:t.length;if(!n)return-1;var o=n-1;return void 0!==i&&(o=ke(i),o=i<0?Ka(n+o,0):Za(o,n-1)),xi(t,js(e),o,!0)}var tl=Ya(Xa);function el(t){return t&&t.length?t[0]:void 0}function il(t,e){var i=-1,n=Xi(t)?Array(t.length):[];return $s(t,(function(t,o,r){n[++i]=e(t,o,r)})),n}function nl(t,e){return(he(t)?ce:il)(t,js(e))}var ol=wr("floor");function rl(t){return po((function(e){var i=e.length,n=i,o=di.prototype.thru;for(t&&e.reverse();n--;){var r=e[n];if("function"!=typeof r)throw new TypeError("Expected a function");if(o&&!s&&"wrapper"==li(r))var s=new di([],!0)}for(n=s?n:i;++ne}function ul(t){return function(e,i){return"string"==typeof e&&"string"==typeof i||(e=xe(e),i=xe(i)),t(e,i)}}var Al=ul(hl),pl=ul((function(t,e){return t>=e})),ml=Object.prototype.hasOwnProperty;function gl(t,e){return null!=t&&ml.call(t,e)}var fl=Math.max,vl=Math.min;function bl(t){return"string"==typeof t||!he(t)&&ae(t)&&"[object String]"==se(t)}function yl(t,e){return ce(e,(function(e){return t[e]}))}function _l(t){return null==t?[]:yl(t,Dn(t))}var wl=Math.max;var Cl=Math.max;var Il=Math.min;function El(t,e,i){for(var n=i?va:Si,o=t[0].length,r=t.length,s=r,a=Array(r),l=1/0,d=[];s--;){var c=t[s];s&&e&&(c=ce(c,fn(e))),l=Il(c.length,l),a[s]=!i&&(e||o>=120&&c.length>=120)?new gs(s&&c):void 0}c=t[0];var h=-1,u=a[0];t:for(;++h1),e})),Wi(t,Hr(t),i),n&&(i=ps(i,7,wd));for(var o=e.length;o--;)_d(i,e[o]);return i}));function Id(t,e,i,n){if(!_e(t))return t;for(var o=-1,r=(e=no(e,t)).length,s=r-1,a=t;null!=a&&++oe||r&&s&&l&&!a&&!d||n&&s&&l||!i&&l||!o)return 1;if(!n&&!r&&!d&&t=a?l:l*("desc"==i[n]?-1:1)}return t.index-e.index}(t,e,i)}))}function Sd(t){return po((function(e){return e=ce(e,fn(js)),Ki((function(i){var n=this;return t(e,(function(t){return Je(t,n,i)}))}))}))}var Dd=Sd(ce),Qd=Ki,Md=Math.min,Td=Qd((function(t,e){var i=(e=1==e.length&&he(e[0])?ce(e[0],fn(js)):ce(uo(e,1),fn(js))).length;return Ki((function(n){for(var o=-1,r=Md(n.length,i);++o9007199254740991)return i;do{e%2&&(i+=t),(e=Pd(e/2))&&(t+=t)}while(e);return i}var Fd=Fs("length"),Ld="[\\ud800-\\udfff]",jd="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",zd="\\ud83c[\\udffb-\\udfff]",Ud="[^\\ud800-\\udfff]",Hd="(?:\\ud83c[\\udde6-\\uddff]){2}",Gd="[\\ud800-\\udbff][\\udc00-\\udfff]",qd="(?:"+jd+"|"+zd+")"+"?",Yd="[\\ufe0e\\ufe0f]?"+qd+("(?:\\u200d(?:"+[Ud,Hd,Gd].join("|")+")[\\ufe0e\\ufe0f]?"+qd+")*"),$d="(?:"+[Ud+jd+"?",jd,Hd,Gd,Ld].join("|")+")",Wd=RegExp(zd+"(?="+zd+")|"+$d+Yd,"g");function Vd(t){return Mo(t)?function(t){for(var e=Wd.lastIndex=0;Wd.test(t);)++e;return e}(t):Fd(t)}var Jd=Math.ceil;function Kd(t,e){var i=(e=void 0===e?" ":pe(e)).length;if(i<2)return i?Nd(e,t):e;var n=Nd(e,Jd(t/Vd(e)));return Mo(e)?Do(Ho(n),0,t).join(""):n.slice(0,t)}var Zd=Math.ceil,Xd=Math.floor;var tc=/^\s+/,ec=Zt.parseInt;var ic=Ki((function(t,e){return Ui(t,32,void 0,e,Fi(e,Ti(ic)))}));ic.placeholder={};var nc=Ki((function(t,e){return Ui(t,64,void 0,e,Fi(e,Ti(nc)))}));nc.placeholder={};var oc=Vs((function(t,e,i){t[i?0:1].push(e)}),(function(){return[[],[]]}));var rc=po((function(t,e){return null==t?{}:function(t,e){return Ed(t,e,(function(e,i){return Ps(t,i)}))}(t,e)}));function sc(t,e,i,n){for(var o=i-1,r=t.length;++o-1;)a!==t&&ac.call(a,l,1),ac.call(t,l,1);return t}function dc(t,e){return t&&t.length&&e&&e.length?lc(t,e):t}var cc=Ki(dc);var hc=Array.prototype.splice;function uc(t,e){for(var i=t?e.length:0,n=i-1;i--;){var o=e[i];if(i==n||o!==r){var r=o;Ri(o)?hc.call(t,o,1):_d(t,o)}}return t}var Ac=po((function(t,e){var i=null==t?0:t.length,n=ao(t,e);return uc(t,ce(e,(function(t){return Ri(t,i)?+t:t})).sort(Bd)),n})),pc=Math.floor,mc=Math.random;function gc(t,e){return t+pc(mc()*(e-t+1))}var fc=parseFloat,vc=Math.min,bc=Math.random;var yc=Math.ceil,_c=Math.max;function wc(t){return function(e,i,n){return n&&"number"!=typeof n&&tn(e,i,n)&&(i=n=void 0),e=Be(e),void 0===i?(i=e,e=0):i=Be(i),function(t,e,i,n){for(var o=-1,r=_c(yc((e-t)/(i||1)),0),s=Array(r);r--;)s[n?r:++o]=t,t+=i;return s}(e,i,n=void 0===n?e1&&tn(t,e[0],e[1])?e=[]:i>2&&tn(e[0],e[1],e[2])&&(e=[e[0]]),kd(t,uo(e,1),[])})),Uc=Math.floor,Hc=Math.min;function Gc(t,e,i,n){var o=0,r=null==t?0:t.length;if(0===r)return 0;for(var s=(e=i(e))!=e,a=null===e,l=le(e),d=void 0===e;o>>1,s=t[r];null!==s&&!le(s)&&(i?s<=e:s/g,ih={escape:/<%-([\s\S]+?)%>/g,evaluate:/<%([\s\S]+?)%>/g,interpolate:eh,variable:"",imports:{_:{escape:La}}},nh=/\b__p \+= '';/g,oh=/\b(__p \+=) '' \+/g,rh=/(__e\(.*?\)|\b__t\)) \+\n'';/g,sh=/[()=,{}\[\]\/\s]/,ah=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,lh=/($^)/,dh=/['\n\r\u2028\u2029\\]/g,ch=Object.prototype.hasOwnProperty;function hh(t,e,i){var n=!0,o=!0;if("function"!=typeof t)throw new TypeError("Expected a function");return _e(i)&&(n="leading"in i?!!i.leading:n,o="trailing"in i?!!i.trailing:o),na(t,e,{leading:n,maxWait:e,trailing:o})}function uh(t,e){return e(t)}var Ah=Math.min;function ph(t,e){var i=t;return i instanceof ni&&(i=i.value()),$o(e,(function(t,e){return e.func.apply(e.thisArg,lo([t],e.args))}),i)}function mh(){return ph(this.__wrapped__,this.__actions__)}function gh(t,e){for(var i=t.length;i--&&ki(e,t[i],0)>-1;);return i}function fh(t,e){for(var i=-1,n=t.length;++i-1;);return i}var vh=/^\s+/;var bh=/\w*$/;var yh=Wo({"&":"&","<":"<",">":">",""":'"',"'":"'"}),_h=/&(?:amp|lt|gt|quot|#39);/g,wh=RegExp(_h.source);var Ch=Yr&&1/_s(new Yr([,-0]))[1]==1/0?function(t){return new Yr(t)}:oi;function Ih(t,e,i){var n=-1,o=Si,r=t.length,s=!0,a=[],l=a;if(i)s=!1,o=va;else if(r>=200){var d=e?null:Ch(t);if(d)return _s(d);s=!1,o=vs,l=new gs}else l=e?[]:a;t:for(;++n1||this.__actions__.length)&&n instanceof ni&&Ri(i)?((n=n.slice(i,+i+(e?1:0))).__actions__.push({func:uh,args:[o],thisArg:void 0}),new di(n,this.__chain__).thru((function(t){return e&&!t.length&&t.push(void 0),t}))):this.thru(o)}));function Ph(t,e,i){var n=t.length;if(n<2)return n?Ih(t[0]):[];for(var o=-1,r=Array(n);++o1?t[e-1]:void 0;return i="function"==typeof i?(t.pop(),i):void 0,Qh(t,i)})),Hh={chunk:function(t,e,i){e=(i?tn(t,e,i):void 0===e)?1:xr(ke(e),0);var n=null==t?0:t.length;if(!n||e<1)return[];for(var o=0,r=0,s=Array(Er(n/e));oo?0:o+i),(n=void 0===n||n>o?o:ke(n))<0&&(n+=o),n=i>n?0:Ga(n);i-1:!!o&&ki(t,e,i)>-1},invokeMap:jl,keyBy:ed,map:nl,orderBy:function(t,e,i,n){return null==t?[]:(he(e)||(e=null==e?[]:[e]),he(i=n?void 0:i)||(i=null==i?[]:[i]),kd(t,e,i))},partition:oc,reduce:function(t,e,i){var n=he(t)?$o:xc,o=arguments.length<3;return n(t,js(e),i,o,$s)},reduceRight:function(t,e,i){var n=he(t)?Bc:xc,o=arguments.length<3;return n(t,js(e),i,o,Qa)},reject:function(t,e){return(he(t)?Rr:qa)(t,fd(js(e)))},sample:function(t){return(he(t)?Qc:Mc)(t)},sampleSize:function(t,e,i){return e=(i?tn(t,e,i):void 0===e)?1:ke(e),(he(t)?Oc:Rc)(t,e)},shuffle:function(t){return(he(t)?Nc:Fc)(t)},size:function(t){if(null==t)return 0;if(Xi(t))return bl(t)?Vd(t):t.length;var e=Xr(t);return"[object Map]"==e||"[object Set]"==e?t.size:Sn(t).length},some:function(t,e,i){var n=he(t)?fs:jc;return i&&tn(t,e,i)&&(e=void 0),n(t,js(e))},sortBy:zc},qh=ta,Yh={after:function(t,e){if("function"!=typeof e)throw new TypeError("Expected a function");return t=ke(t),function(){if(--t<1)return e.apply(this,arguments)}},ary:Hi,before:Eo,bind:xo,bindKey:ko,curry:Zs,curryRight:Xs,debounce:na,defer:ga,delay:fa,flip:function(t){return Ui(t,512)},memoize:Zn,negate:fd,once:function(t){return Eo(2,t)},overArgs:Td,partial:ic,partialRight:nc,rearg:Ec,rest:function(t,e){if("function"!=typeof t)throw new TypeError("Expected a function");return Ki(t,e=void 0===e?e:ke(e))},spread:function(t,e){if("function"!=typeof t)throw new TypeError("Expected a function");return e=null==e?0:$c(ke(e),0),Ki((function(i){var n=i[e],o=Do(i,0,e);return n&&lo(o,n),Je(t,this,o)}))},throttle:hh,unary:function(t){return Hi(t,1)},wrap:function(t,e){return ic(xa(e),t)}},$h={castArray:function(){if(!arguments.length)return[];var t=arguments[0];return he(t)?t:[t]},clone:function(t){return ps(t,4)},cloneDeep:ms,cloneDeepWith:function(t,e){return ps(t,5,e="function"==typeof e?e:void 0)},cloneWith:function(t,e){return ps(t,4,e="function"==typeof e?e:void 0)},conformsTo:function(t,e){return null==e||zs(t,e,Dn(e))},eq:qi,gt:Al,gte:pl,isArguments:cn,isArray:he,isArrayBuffer:Ul,isArrayLike:Xi,isArrayLikeObject:la,isBoolean:function(t){return!0===t||!1===t||ae(t)&&"[object Boolean]"==se(t)},isBuffer:mn,isDate:Gl,isElement:function(t){return ae(t)&&1===t.nodeType&&!wo(t)},isEmpty:function(t){if(null==t)return!0;if(Xi(t)&&(he(t)||"string"==typeof t||"function"==typeof t.splice||mn(t)||Cn(t)||cn(t)))return!t.length;var e=Xr(t);if("[object Map]"==e||"[object Set]"==e)return!t.size;if(on(t))return!Sn(t).length;for(var i in t)if(ql.call(t,i))return!1;return!0},isEqual:Yl,isEqualWith:function(t,e,i){var n=(i="function"==typeof i?i:void 0)?i(t,e):void 0;return void 0===n?ks(t,e,void 0,i):!!n},isError:Co,isFinite:function(t){return"number"==typeof t&&$l(t)},isFunction:De,isInteger:Wl,isLength:Zi,isMap:cs,isMatch:function(t,e){return t===e||Ss(t,e,Qs(e))},isMatchWith:function(t,e,i){return i="function"==typeof i?i:void 0,Ss(t,e,Qs(e),i)},isNaN:function(t){return Vl(t)&&t!=+t},isNative:function(t){if(Jl(t))throw new Error("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return Ue(t)},isNil:function(t){return null==t},isNull:function(t){return null===t},isNumber:Vl,isObject:_e,isObjectLike:ae,isPlainObject:wo,isRegExp:Zl,isSafeInteger:function(t){return Wl(t)&&t>=-9007199254740991&&t<=9007199254740991},isSet:us,isString:bl,isSymbol:le,isTypedArray:Cn,isUndefined:function(t){return void 0===t},isWeakMap:function(t){return ae(t)&&"[object WeakMap]"==Xr(t)},isWeakSet:function(t){return ae(t)&&"[object WeakSet]"==se(t)},lt:ad,lte:ld,toArray:bd,toFinite:Be,toInteger:ke,toLength:Ga,toNumber:xe,toPlainObject:ca,toSafeInteger:function(t){return t?Br(ke(t),-9007199254740991,9007199254740991):0===t?t:0},toString:io},Wh={add:ge,ceil:Cr,divide:Ia,floor:ol,max:function(t){return t&&t.length?dd(t,Se,hl):void 0},maxBy:function(t,e){return t&&t.length?dd(t,js(e),hl):void 0},mean:function(t){return hd(t,Se)},meanBy:function(t,e){return hd(t,js(e))},min:function(t){return t&&t.length?dd(t,Se,sd):void 0},minBy:function(t,e){return t&&t.length?dd(t,js(e),sd):void 0},multiply:gd,round:Dc,subtract:Vc,sum:function(t){return t&&t.length?cd(t,Se):0},sumBy:function(t,e){return t&&t.length?cd(t,js(e)):0}},Vh=function(t,e,i){return void 0===i&&(i=e,e=void 0),void 0!==i&&(i=(i=xe(i))==i?i:0),void 0!==e&&(e=(e=xe(e))==e?e:0),Br(xe(t),e,i)},Jh=function(t,e,i){return e=Be(e),void 0===i?(i=e,e=0):i=Be(i),function(t,e,i){return t>=vl(e,i)&&te){var n=t;t=e,e=n}if(i||t%1||e%1){var o=bc();return vc(t+o*(e-t+fc("1e-"+((o+"").length-1))),e)}return gc(t,e)},Zh={assign:Mn,assignIn:Pn,assignInWith:Nn,assignWith:Fn,at:mo,create:function(t,e){var i=We(t);return null==e?i:Sr(i,e)},defaults:sa,defaultsDeep:pa,entries:Oa,entriesIn:Ra,extend:Pn,extendWith:Nn,findKey:function(t,e){return Ja(t,js(e),qs)},findLastKey:function(t,e){return Ja(t,js(e),Da)},forIn:function(t,e){return null==t?t:Gs(t,xa(e),Rn)},forInRight:function(t,e){return null==t?t:Sa(t,xa(e),Rn)},forOwn:function(t,e){return t&&qs(t,xa(e))},forOwnRight:function(t,e){return t&&Da(t,xa(e))},functions:function(t){return null==t?[]:ll(t,Dn(t))},functionsIn:function(t){return null==t?[]:ll(t,Rn(t))},get:so,has:function(t,e){return null!=t&&Rs(t,e,gl)},hasIn:Ps,invert:Ml,invertBy:Pl,invoke:Ll,keys:Dn,keysIn:Rn,mapKeys:function(t,e){var i={};return e=js(e),qs(t,(function(t,n,o){Gi(i,e(t,n,o),t)})),i},mapValues:function(t,e){var i={};return e=js(e),qs(t,(function(t,n,o){Gi(i,n,e(t,n,o))})),i},merge:ud,mergeWith:Aa,omit:Cd,omitBy:function(t,e){return xd(t,fd(js(e)))},pick:rc,pickBy:xd,result:function(t,e,i){var n=-1,o=(e=no(e,t)).length;for(o||(o=1,t=void 0);++n=this.__values__.length;return{done:t,value:t?void 0:this.__values__[this.__index__++]}},plant:function(t){for(var e,i=this;i instanceof ii;){var n=hi(i);n.__index__=0,n.__values__=void 0,e?o.__wrapped__=n:e=n;var o=n;i=i.__wrapped__}return o.__wrapped__=t,e},reverse:function(){var t=this.__wrapped__;if(t instanceof ni){var e=t;return this.__actions__.length&&(e=new ni(this)),(e=e.reverse()).__actions__.push({func:uh,args:[Sc],thisArg:void 0}),new di(e,this.__chain__)}return this.thru(Sc)},tap:function(t,e){return e(t),t},thru:uh,toIterator:function(){return this},toJSON:mh,value:mh,valueOf:mh,wrapperChain:function(){return Ir(this)}},tu={camelCase:br,capitalize:Yo,deburr:Zo,endsWith:function(t,e,i){t=io(t),e=pe(e);var n=t.length,o=i=void 0===i?n:Br(ke(i),0,n);return(i-=e.length)>=0&&t.slice(i,o)==e},escape:La,escapeRegExp:function(t){return(t=io(t))&&za.test(t)?t.replace(ja,"\\$&"):t},kebabCase:td,lowerCase:od,lowerFirst:rd,pad:function(t,e,i){t=io(t);var n=(e=ke(e))?Vd(t):0;if(!e||n>=e)return t;var o=(e-n)/2;return Kd(Xd(o),i)+t+Kd(Zd(o),i)},padEnd:function(t,e,i){t=io(t);var n=(e=ke(e))?Vd(t):0;return e&&n>>0)?(t=io(t))&&("string"==typeof e||null!=e&&!Zl(e))&&!(e=pe(e))&&Mo(t)?Do(Ho(t),0,i):t.split(e,i):[]},startCase:Wc,startsWith:function(t,e,i){return t=io(t),i=null==i?0:Br(ke(i),0,t.length),e=pe(e),t.slice(i,i+e.length)==e},template:function(t,e,i){var n=ih.imports._.templateSettings||ih;i&&tn(t,e,i)&&(e=void 0),t=io(t),e=Nn({},e,n,Zc);var o,r,s=Nn({},e.imports,n.imports,Zc),a=Dn(s),l=yl(s,a),d=0,c=e.interpolate||lh,h="__p += '",u=RegExp((e.escape||lh).source+"|"+c.source+"|"+(c===eh?ah:lh).source+"|"+(e.evaluate||lh).source+"|$","g"),A=ch.call(e,"sourceURL")?"//# sourceURL="+(e.sourceURL+"").replace(/\s/g," ")+"\n":"";t.replace(u,(function(e,i,n,s,a,l){return n||(n=s),h+=t.slice(d,l).replace(dh,th),i&&(o=!0,h+="' +\n__e("+i+") +\n'"),a&&(r=!0,h+="';\n"+a+";\n__p += '"),n&&(h+="' +\n((__t = ("+n+")) == null ? '' : __t) +\n'"),d=l+e.length,e})),h+="';\n";var p=ch.call(e,"variable")&&e.variable;if(p){if(sh.test(p))throw new Error("Invalid `variable` option passed into `_.template`")}else h="with (obj) {\n"+h+"\n}\n";h=(r?h.replace(nh,""):h).replace(oh,"$1").replace(rh,"$1;"),h="function("+(p||"obj")+") {\n"+(p?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(o?", __e = _.escape":"")+(r?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+h+"return __p\n}";var m=Io((function(){return Function(a,A+"return "+h).apply(void 0,l)}));if(m.source=h,Co(m))throw m;return m},templateSettings:ih,toLower:function(t){return io(t).toLowerCase()},toUpper:function(t){return io(t).toUpperCase()},trim:function(t,e,i){if((t=io(t))&&(i||void 0===e))return ye(t);if(!t||!(e=pe(e)))return t;var n=Ho(t),o=Ho(e);return Do(n,fh(n,o),gh(n,o)+1).join("")},trimEnd:function(t,e,i){if((t=io(t))&&(i||void 0===e))return t.slice(0,ve(t)+1);if(!t||!(e=pe(e)))return t;var n=Ho(t);return Do(n,0,gh(n,Ho(e))+1).join("")},trimStart:function(t,e,i){if((t=io(t))&&(i||void 0===e))return t.replace(vh,"");if(!t||!(e=pe(e)))return t;var n=Ho(t);return Do(n,fh(n,Ho(e))).join("")},truncate:function(t,e){var i=30,n="...";if(_e(e)){var o="separator"in e?e.separator:o;i="length"in e?ke(e.length):i,n="omission"in e?pe(e.omission):n}var r=(t=io(t)).length;if(Mo(t)){var s=Ho(t);r=s.length}if(i>=r)return t;var a=i-Vd(n);if(a<1)return n;var l=s?Do(s,0,a).join(""):t.slice(0,a);if(void 0===o)return l+n;if(s&&(a+=l.length-a),Zl(o)){if(t.slice(a).search(o)){var d,c=l;for(o.global||(o=RegExp(o.source,io(bh.exec(o))+"g")),o.lastIndex=0;d=o.exec(c);)var h=d.index;l=l.slice(0,void 0===h?a:h)}}else if(t.indexOf(pe(o),a)!=a){var u=l.lastIndexOf(o);u>-1&&(l=l.slice(0,u))}return l+n},unescape:function(t){return(t=io(t))&&wh.test(t)?t.replace(_h,yh):t},upperCase:Th,upperFirst:qo,words:gr},eu={attempt:Io,bindAll:Bo,cond:function(t){var e=null==t?0:t.length,i=js;return t=e?ce(t,(function(t){if("function"!=typeof t[1])throw new TypeError("Expected a function");return[i(t[0]),t[1]]})):[],Ki((function(i){for(var n=-1;++n9007199254740991)return[];var i=4294967295,n=Ah(t,4294967295);t-=4294967295;for(var o=rn(n,e=xa(e));++i + * Build: `lodash modularize exports="es" -o ./` + * Copyright OpenJS Foundation and other contributors + * Released under MIT license + * Based on Underscore.js 1.8.3 + * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + */ +var ru,su=Array.prototype,au=Object.prototype.hasOwnProperty,lu=Xt?Xt.iterator:void 0,du=Math.max,cu=Math.min,hu=function(t){return function(e,i,n){if(null==n){var o=_e(i),r=o&&Dn(i),s=r&&r.length&&ll(i,r);(s?s.length:o)||(n=i,i=e,e=this)}return t(e,i,n)}}(md);Ai.after=Yh.after,Ai.ary=Yh.ary,Ai.assign=Zh.assign,Ai.assignIn=Zh.assignIn,Ai.assignInWith=Zh.assignInWith,Ai.assignWith=Zh.assignWith,Ai.at=Zh.at,Ai.before=Yh.before,Ai.bind=Yh.bind,Ai.bindAll=eu.bindAll,Ai.bindKey=Yh.bindKey,Ai.castArray=$h.castArray,Ai.chain=Xh.chain,Ai.chunk=Hh.chunk,Ai.compact=Hh.compact,Ai.concat=Hh.concat,Ai.cond=eu.cond,Ai.conforms=eu.conforms,Ai.constant=eu.constant,Ai.countBy=Gh.countBy,Ai.create=Zh.create,Ai.curry=Yh.curry,Ai.curryRight=Yh.curryRight,Ai.debounce=Yh.debounce,Ai.defaults=Zh.defaults,Ai.defaultsDeep=Zh.defaultsDeep,Ai.defer=Yh.defer,Ai.delay=Yh.delay,Ai.difference=Hh.difference,Ai.differenceBy=Hh.differenceBy,Ai.differenceWith=Hh.differenceWith,Ai.drop=Hh.drop,Ai.dropRight=Hh.dropRight,Ai.dropRightWhile=Hh.dropRightWhile,Ai.dropWhile=Hh.dropWhile,Ai.fill=Hh.fill,Ai.filter=Gh.filter,Ai.flatMap=Gh.flatMap,Ai.flatMapDeep=Gh.flatMapDeep,Ai.flatMapDepth=Gh.flatMapDepth,Ai.flatten=Hh.flatten,Ai.flattenDeep=Hh.flattenDeep,Ai.flattenDepth=Hh.flattenDepth,Ai.flip=Yh.flip,Ai.flow=eu.flow,Ai.flowRight=eu.flowRight,Ai.fromPairs=Hh.fromPairs,Ai.functions=Zh.functions,Ai.functionsIn=Zh.functionsIn,Ai.groupBy=Gh.groupBy,Ai.initial=Hh.initial,Ai.intersection=Hh.intersection,Ai.intersectionBy=Hh.intersectionBy,Ai.intersectionWith=Hh.intersectionWith,Ai.invert=Zh.invert,Ai.invertBy=Zh.invertBy,Ai.invokeMap=Gh.invokeMap,Ai.iteratee=eu.iteratee,Ai.keyBy=Gh.keyBy,Ai.keys=Dn,Ai.keysIn=Zh.keysIn,Ai.map=Gh.map,Ai.mapKeys=Zh.mapKeys,Ai.mapValues=Zh.mapValues,Ai.matches=eu.matches,Ai.matchesProperty=eu.matchesProperty,Ai.memoize=Yh.memoize,Ai.merge=Zh.merge,Ai.mergeWith=Zh.mergeWith,Ai.method=eu.method,Ai.methodOf=eu.methodOf,Ai.mixin=hu,Ai.negate=fd,Ai.nthArg=eu.nthArg,Ai.omit=Zh.omit,Ai.omitBy=Zh.omitBy,Ai.once=Yh.once,Ai.orderBy=Gh.orderBy,Ai.over=eu.over,Ai.overArgs=Yh.overArgs,Ai.overEvery=eu.overEvery,Ai.overSome=eu.overSome,Ai.partial=Yh.partial,Ai.partialRight=Yh.partialRight,Ai.partition=Gh.partition,Ai.pick=Zh.pick,Ai.pickBy=Zh.pickBy,Ai.property=eu.property,Ai.propertyOf=eu.propertyOf,Ai.pull=Hh.pull,Ai.pullAll=Hh.pullAll,Ai.pullAllBy=Hh.pullAllBy,Ai.pullAllWith=Hh.pullAllWith,Ai.pullAt=Hh.pullAt,Ai.range=eu.range,Ai.rangeRight=eu.rangeRight,Ai.rearg=Yh.rearg,Ai.reject=Gh.reject,Ai.remove=Hh.remove,Ai.rest=Yh.rest,Ai.reverse=Hh.reverse,Ai.sampleSize=Gh.sampleSize,Ai.set=Zh.set,Ai.setWith=Zh.setWith,Ai.shuffle=Gh.shuffle,Ai.slice=Hh.slice,Ai.sortBy=Gh.sortBy,Ai.sortedUniq=Hh.sortedUniq,Ai.sortedUniqBy=Hh.sortedUniqBy,Ai.split=tu.split,Ai.spread=Yh.spread,Ai.tail=Hh.tail,Ai.take=Hh.take,Ai.takeRight=Hh.takeRight,Ai.takeRightWhile=Hh.takeRightWhile,Ai.takeWhile=Hh.takeWhile,Ai.tap=Xh.tap,Ai.throttle=Yh.throttle,Ai.thru=uh,Ai.toArray=$h.toArray,Ai.toPairs=Zh.toPairs,Ai.toPairsIn=Zh.toPairsIn,Ai.toPath=eu.toPath,Ai.toPlainObject=$h.toPlainObject,Ai.transform=Zh.transform,Ai.unary=Yh.unary,Ai.union=Hh.union,Ai.unionBy=Hh.unionBy,Ai.unionWith=Hh.unionWith,Ai.uniq=Hh.uniq,Ai.uniqBy=Hh.uniqBy,Ai.uniqWith=Hh.uniqWith,Ai.unset=Zh.unset,Ai.unzip=Hh.unzip,Ai.unzipWith=Hh.unzipWith,Ai.update=Zh.update,Ai.updateWith=Zh.updateWith,Ai.values=Zh.values,Ai.valuesIn=Zh.valuesIn,Ai.without=Hh.without,Ai.words=tu.words,Ai.wrap=Yh.wrap,Ai.xor=Hh.xor,Ai.xorBy=Hh.xorBy,Ai.xorWith=Hh.xorWith,Ai.zip=Hh.zip,Ai.zipObject=Hh.zipObject,Ai.zipObjectDeep=Hh.zipObjectDeep,Ai.zipWith=Hh.zipWith,Ai.entries=Zh.toPairs,Ai.entriesIn=Zh.toPairsIn,Ai.extend=Zh.assignIn,Ai.extendWith=Zh.assignInWith,hu(Ai,Ai),Ai.add=Wh.add,Ai.attempt=eu.attempt,Ai.camelCase=tu.camelCase,Ai.capitalize=tu.capitalize,Ai.ceil=Wh.ceil,Ai.clamp=Vh,Ai.clone=$h.clone,Ai.cloneDeep=$h.cloneDeep,Ai.cloneDeepWith=$h.cloneDeepWith,Ai.cloneWith=$h.cloneWith,Ai.conformsTo=$h.conformsTo,Ai.deburr=tu.deburr,Ai.defaultTo=eu.defaultTo,Ai.divide=Wh.divide,Ai.endsWith=tu.endsWith,Ai.eq=$h.eq,Ai.escape=tu.escape,Ai.escapeRegExp=tu.escapeRegExp,Ai.every=Gh.every,Ai.find=Gh.find,Ai.findIndex=Hh.findIndex,Ai.findKey=Zh.findKey,Ai.findLast=Gh.findLast,Ai.findLastIndex=Hh.findLastIndex,Ai.findLastKey=Zh.findLastKey,Ai.floor=Wh.floor,Ai.forEach=Gh.forEach,Ai.forEachRight=Gh.forEachRight,Ai.forIn=Zh.forIn,Ai.forInRight=Zh.forInRight,Ai.forOwn=Zh.forOwn,Ai.forOwnRight=Zh.forOwnRight,Ai.get=Zh.get,Ai.gt=$h.gt,Ai.gte=$h.gte,Ai.has=Zh.has,Ai.hasIn=Zh.hasIn,Ai.head=Hh.head,Ai.identity=Se,Ai.includes=Gh.includes,Ai.indexOf=Hh.indexOf,Ai.inRange=Jh,Ai.invoke=Zh.invoke,Ai.isArguments=$h.isArguments,Ai.isArray=he,Ai.isArrayBuffer=$h.isArrayBuffer,Ai.isArrayLike=$h.isArrayLike,Ai.isArrayLikeObject=$h.isArrayLikeObject,Ai.isBoolean=$h.isBoolean,Ai.isBuffer=$h.isBuffer,Ai.isDate=$h.isDate,Ai.isElement=$h.isElement,Ai.isEmpty=$h.isEmpty,Ai.isEqual=$h.isEqual,Ai.isEqualWith=$h.isEqualWith,Ai.isError=$h.isError,Ai.isFinite=$h.isFinite,Ai.isFunction=$h.isFunction,Ai.isInteger=$h.isInteger,Ai.isLength=$h.isLength,Ai.isMap=$h.isMap,Ai.isMatch=$h.isMatch,Ai.isMatchWith=$h.isMatchWith,Ai.isNaN=$h.isNaN,Ai.isNative=$h.isNative,Ai.isNil=$h.isNil,Ai.isNull=$h.isNull,Ai.isNumber=$h.isNumber,Ai.isObject=_e,Ai.isObjectLike=$h.isObjectLike,Ai.isPlainObject=$h.isPlainObject,Ai.isRegExp=$h.isRegExp,Ai.isSafeInteger=$h.isSafeInteger,Ai.isSet=$h.isSet,Ai.isString=$h.isString,Ai.isSymbol=$h.isSymbol,Ai.isTypedArray=$h.isTypedArray,Ai.isUndefined=$h.isUndefined,Ai.isWeakMap=$h.isWeakMap,Ai.isWeakSet=$h.isWeakSet,Ai.join=Hh.join,Ai.kebabCase=tu.kebabCase,Ai.last=_a,Ai.lastIndexOf=Hh.lastIndexOf,Ai.lowerCase=tu.lowerCase,Ai.lowerFirst=tu.lowerFirst,Ai.lt=$h.lt,Ai.lte=$h.lte,Ai.max=Wh.max,Ai.maxBy=Wh.maxBy,Ai.mean=Wh.mean,Ai.meanBy=Wh.meanBy,Ai.min=Wh.min,Ai.minBy=Wh.minBy,Ai.stubArray=eu.stubArray,Ai.stubFalse=eu.stubFalse,Ai.stubObject=eu.stubObject,Ai.stubString=eu.stubString,Ai.stubTrue=eu.stubTrue,Ai.multiply=Wh.multiply,Ai.nth=Hh.nth,Ai.noop=eu.noop,Ai.now=qh,Ai.pad=tu.pad,Ai.padEnd=tu.padEnd,Ai.padStart=tu.padStart,Ai.parseInt=tu.parseInt,Ai.random=Kh,Ai.reduce=Gh.reduce,Ai.reduceRight=Gh.reduceRight,Ai.repeat=tu.repeat,Ai.replace=tu.replace,Ai.result=Zh.result,Ai.round=Wh.round,Ai.sample=Gh.sample,Ai.size=Gh.size,Ai.snakeCase=tu.snakeCase,Ai.some=Gh.some,Ai.sortedIndex=Hh.sortedIndex,Ai.sortedIndexBy=Hh.sortedIndexBy,Ai.sortedIndexOf=Hh.sortedIndexOf,Ai.sortedLastIndex=Hh.sortedLastIndex,Ai.sortedLastIndexBy=Hh.sortedLastIndexBy,Ai.sortedLastIndexOf=Hh.sortedLastIndexOf,Ai.startCase=tu.startCase,Ai.startsWith=tu.startsWith,Ai.subtract=Wh.subtract,Ai.sum=Wh.sum,Ai.sumBy=Wh.sumBy,Ai.template=tu.template,Ai.times=eu.times,Ai.toFinite=$h.toFinite,Ai.toInteger=ke,Ai.toLength=$h.toLength,Ai.toLower=tu.toLower,Ai.toNumber=$h.toNumber,Ai.toSafeInteger=$h.toSafeInteger,Ai.toString=$h.toString,Ai.toUpper=tu.toUpper,Ai.trim=tu.trim,Ai.trimEnd=tu.trimEnd,Ai.trimStart=tu.trimStart,Ai.truncate=tu.truncate,Ai.unescape=tu.unescape,Ai.uniqueId=eu.uniqueId,Ai.upperCase=tu.upperCase,Ai.upperFirst=tu.upperFirst,Ai.each=Gh.forEach,Ai.eachRight=Gh.forEachRight,Ai.first=Hh.head,hu(Ai,(ru={},qs(Ai,(function(t,e){au.call(Ai.prototype,e)||(ru[e]=t)})),ru),{chain:!1}),Ai.VERSION="4.17.21",(Ai.templateSettings=tu.templateSettings).imports._=Ai,Ei(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(t){Ai[t].placeholder=Ai})),Ei(["drop","take"],(function(t,e){ni.prototype[t]=function(i){i=void 0===i?1:du(ke(i),0);var n=this.__filtered__&&!e?new ni(this):this.clone();return n.__filtered__?n.__takeCount__=cu(i,n.__takeCount__):n.__views__.push({size:cu(i,4294967295),type:t+(n.__dir__<0?"Right":"")}),n},ni.prototype[t+"Right"]=function(e){return this.reverse()[t](e).reverse()}})),Ei(["filter","map","takeWhile"],(function(t,e){var i=e+1,n=1==i||3==i;ni.prototype[t]=function(t){var e=this.clone();return e.__iteratees__.push({iteratee:js(t),type:i}),e.__filtered__=e.__filtered__||n,e}})),Ei(["head","last"],(function(t,e){var i="take"+(e?"Right":"");ni.prototype[t]=function(){return this[i](1).value()[0]}})),Ei(["initial","tail"],(function(t,e){var i="drop"+(e?"":"Right");ni.prototype[t]=function(){return this.__filtered__?new ni(this):this[i](1)}})),ni.prototype.compact=function(){return this.filter(Se)},ni.prototype.find=function(t){return this.filter(t).head()},ni.prototype.findLast=function(t){return this.reverse().find(t)},ni.prototype.invokeMap=Ki((function(t,e){return"function"==typeof t?new ni(this):this.map((function(i){return Fl(i,t,e)}))})),ni.prototype.reject=function(t){return this.filter(fd(js(t)))},ni.prototype.slice=function(t,e){t=ke(t);var i=this;return i.__filtered__&&(t>0||e<0)?new ni(i):(t<0?i=i.takeRight(-t):t&&(i=i.drop(t)),void 0!==e&&(i=(e=ke(e))<0?i.dropRight(-e):i.take(e-t)),i)},ni.prototype.takeRightWhile=function(t){return this.reverse().takeWhile(t).reverse()},ni.prototype.toArray=function(){return this.take(4294967295)},qs(ni.prototype,(function(t,e){var i=/^(?:filter|find|map|reject)|While$/.test(e),n=/^(?:head|last)$/.test(e),o=Ai[n?"take"+("last"==e?"Right":""):e],r=n||/^find/.test(e);o&&(Ai.prototype[e]=function(){var e=this.__wrapped__,s=n?[1]:arguments,a=e instanceof ni,l=s[0],d=a||he(e),c=function(t){var e=o.apply(Ai,lo([t],s));return n&&h?e[0]:e};d&&i&&"function"==typeof l&&1!=l.length&&(a=d=!1);var h=this.__chain__,u=!!this.__actions__.length,A=r&&!h,p=a&&!u;if(!r&&d){e=p?e:new ni(this);var m=t.apply(e,s);return m.__actions__.push({func:uh,args:[c],thisArg:void 0}),new di(m,h)}return A&&p?t.apply(this,s):(m=this.thru(c),A?n?m.value()[0]:m.value():m)})})),Ei(["pop","push","shift","sort","splice","unshift"],(function(t){var e=su[t],i=/^(?:push|sort|unshift)$/.test(t)?"tap":"thru",n=/^(?:pop|shift)$/.test(t);Ai.prototype[t]=function(){var t=arguments;if(n&&!this.__chain__){var o=this.value();return e.apply(he(o)?o:[],t)}return this[i]((function(i){return e.apply(he(i)?i:[],t)}))}})),qs(ni.prototype,(function(t,e){var i=Ai[e];if(i){var n=i.name+"";au.call(si,n)||(si[n]=[]),si[n].push({name:e,func:i})}})),si[Li(void 0,2).name]=[{name:"wrapper",func:void 0}],ni.prototype.clone=function(){var t=new ni(this.__wrapped__);return t.__actions__=ci(this.__actions__),t.__dir__=this.__dir__,t.__filtered__=this.__filtered__,t.__iteratees__=ci(this.__iteratees__),t.__takeCount__=this.__takeCount__,t.__views__=ci(this.__views__),t},ni.prototype.reverse=function(){if(this.__filtered__){var t=new ni(this);t.__dir__=-1,t.__filtered__=!0}else(t=this.clone()).__dir__*=-1;return t},ni.prototype.value=function(){var t=this.__wrapped__.value(),e=this.__dir__,i=he(t),n=e<0,o=i?t.length:0,r=function(t,e,i){for(var n=-1,o=i.length;++n{if("undefined"==typeof document)return!1;const t=uu[0],e={};for(const i of uu){const n=i?.[1];if(n in document){for(const[n,o]of i.entries())e[t[n]]=o;return e}}return!1})(),pu={change:Au.fullscreenchange,error:Au.fullscreenerror};let mu={request:(t=document.documentElement,e)=>new Promise(((i,n)=>{const o=()=>{mu.off("change",o),i()};mu.on("change",o);const r=t[Au.requestFullscreen](e);r instanceof Promise&&r.then(o).catch(n)})),exit:()=>new Promise(((t,e)=>{if(!mu.isFullscreen)return void t();const i=()=>{mu.off("change",i),t()};mu.on("change",i);const n=document[Au.exitFullscreen]();n instanceof Promise&&n.then(i).catch(e)})),toggle:(t,e)=>mu.isFullscreen?mu.exit():mu.request(t,e),onchange(t){mu.on("change",t)},onerror(t){mu.on("error",t)},on(t,e){const i=pu[t];i&&document.addEventListener(i,e,!1)},off(t,e){const i=pu[t];i&&document.removeEventListener(i,e,!1)},raw:Au};Object.defineProperties(mu,{isFullscreen:{get:()=>Boolean(document[Au.fullscreenElement])},element:{enumerable:!0,get:()=>document[Au.fullscreenElement]??void 0},isEnabled:{enumerable:!0,get:()=>Boolean(document[Au.fullscreenEnabled])}}),Au||(mu={isEnabled:!1});var gu,fu=mu;!function(t){t.assertEqual=t=>t,t.assertIs=function(t){},t.assertNever=function(t){throw new Error},t.arrayToEnum=t=>{const e={};for(const i of t)e[i]=i;return e},t.getValidEnumValues=e=>{const i=t.objectKeys(e).filter((t=>"number"!=typeof e[e[t]])),n={};for(const t of i)n[t]=e[t];return t.objectValues(n)},t.objectValues=e=>t.objectKeys(e).map((function(t){return e[t]})),t.objectKeys="function"==typeof Object.keys?t=>Object.keys(t):t=>{const e=[];for(const i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.push(i);return e},t.find=(t,e)=>{for(const i of t)if(e(i))return i},t.isInteger="function"==typeof Number.isInteger?t=>Number.isInteger(t):t=>"number"==typeof t&&isFinite(t)&&Math.floor(t)===t,t.joinValues=function(t,e=" | "){return t.map((t=>"string"==typeof t?`'${t}'`:t)).join(e)},t.jsonStringifyReplacer=(t,e)=>"bigint"==typeof e?e.toString():e}(gu||(gu={}));const vu=gu.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),bu=t=>{switch(typeof t){case"undefined":return vu.undefined;case"string":return vu.string;case"number":return isNaN(t)?vu.nan:vu.number;case"boolean":return vu.boolean;case"function":return vu.function;case"bigint":return vu.bigint;case"object":return Array.isArray(t)?vu.array:null===t?vu.null:t.then&&"function"==typeof t.then&&t.catch&&"function"==typeof t.catch?vu.promise:"undefined"!=typeof Map&&t instanceof Map?vu.map:"undefined"!=typeof Set&&t instanceof Set?vu.set:"undefined"!=typeof Date&&t instanceof Date?vu.date:vu.object;default:return vu.unknown}},yu=gu.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of"]);class _u extends Error{constructor(t){super(),this.issues=[],this.addIssue=t=>{this.issues=[...this.issues,t]},this.addIssues=(t=[])=>{this.issues=[...this.issues,...t]};const e=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,e):this.__proto__=e,this.name="ZodError",this.issues=t}get errors(){return this.issues}format(t){const e=t||function(t){return t.message},i={_errors:[]},n=t=>{for(const o of t.issues)if("invalid_union"===o.code)o.unionErrors.map(n);else if("invalid_return_type"===o.code)n(o.returnTypeError);else if("invalid_arguments"===o.code)n(o.argumentsError);else if(0===o.path.length)i._errors.push(e(o));else{let t=i,n=0;for(;nt.message)){const e={},i=[];for(const n of this.issues)n.path.length>0?(e[n.path[0]]=e[n.path[0]]||[],e[n.path[0]].push(t(n))):i.push(t(n));return{formErrors:i,fieldErrors:e}}get formErrors(){return this.flatten()}}_u.create=t=>new _u(t);const wu=(t,e)=>{let i;switch(t.code){case yu.invalid_type:i=t.received===vu.undefined?"Required":`Expected ${t.expected}, received ${t.received}`;break;case yu.invalid_literal:i=`Invalid literal value, expected ${JSON.stringify(t.expected,gu.jsonStringifyReplacer)}`;break;case yu.unrecognized_keys:i=`Unrecognized key(s) in object: ${gu.joinValues(t.keys,", ")}`;break;case yu.invalid_union:i="Invalid input";break;case yu.invalid_union_discriminator:i=`Invalid discriminator value. Expected ${gu.joinValues(t.options)}`;break;case yu.invalid_enum_value:i=`Invalid enum value. Expected ${gu.joinValues(t.options)}, received '${t.received}'`;break;case yu.invalid_arguments:i="Invalid function arguments";break;case yu.invalid_return_type:i="Invalid function return type";break;case yu.invalid_date:i="Invalid date";break;case yu.invalid_string:"object"==typeof t.validation?"startsWith"in t.validation?i=`Invalid input: must start with "${t.validation.startsWith}"`:"endsWith"in t.validation?i=`Invalid input: must end with "${t.validation.endsWith}"`:gu.assertNever(t.validation):i="regex"!==t.validation?`Invalid ${t.validation}`:"Invalid";break;case yu.too_small:i="array"===t.type?`Array must contain ${t.inclusive?"at least":"more than"} ${t.minimum} element(s)`:"string"===t.type?`String must contain ${t.inclusive?"at least":"over"} ${t.minimum} character(s)`:"number"===t.type?`Number must be greater than ${t.inclusive?"or equal to ":""}${t.minimum}`:"date"===t.type?`Date must be greater than ${t.inclusive?"or equal to ":""}${new Date(t.minimum)}`:"Invalid input";break;case yu.too_big:i="array"===t.type?`Array must contain ${t.inclusive?"at most":"less than"} ${t.maximum} element(s)`:"string"===t.type?`String must contain ${t.inclusive?"at most":"under"} ${t.maximum} character(s)`:"number"===t.type?`Number must be less than ${t.inclusive?"or equal to ":""}${t.maximum}`:"date"===t.type?`Date must be smaller than ${t.inclusive?"or equal to ":""}${new Date(t.maximum)}`:"Invalid input";break;case yu.custom:i="Invalid input";break;case yu.invalid_intersection_types:i="Intersection results could not be merged";break;case yu.not_multiple_of:i=`Number must be a multiple of ${t.multipleOf}`;break;default:i=e.defaultError,gu.assertNever(t)}return{message:i}};let Cu=wu;function Iu(){return Cu}const Eu=t=>{const{data:e,path:i,errorMaps:n,issueData:o}=t,r=[...i,...o.path||[]],s={...o,path:r};let a="";const l=n.filter((t=>!!t)).slice().reverse();for(const t of l)a=t(s,{data:e,defaultError:a}).message;return{...o,path:r,message:o.message||a}};function xu(t,e){const i=Eu({issueData:e,data:t.data,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,Iu(),wu].filter((t=>!!t))});t.common.issues.push(i)}class Bu{constructor(){this.value="valid"}dirty(){"valid"===this.value&&(this.value="dirty")}abort(){"aborted"!==this.value&&(this.value="aborted")}static mergeArray(t,e){const i=[];for(const n of e){if("aborted"===n.status)return ku;"dirty"===n.status&&t.dirty(),i.push(n.value)}return{status:t.value,value:i}}static async mergeObjectAsync(t,e){const i=[];for(const t of e)i.push({key:await t.key,value:await t.value});return Bu.mergeObjectSync(t,i)}static mergeObjectSync(t,e){const i={};for(const n of e){const{key:e,value:o}=n;if("aborted"===e.status)return ku;if("aborted"===o.status)return ku;"dirty"===e.status&&t.dirty(),"dirty"===o.status&&t.dirty(),(void 0!==o.value||n.alwaysSet)&&(i[e.value]=o.value)}return{status:t.value,value:i}}}const ku=Object.freeze({status:"aborted"}),Su=t=>({status:"valid",value:t}),Du=t=>"aborted"===t.status,Qu=t=>"dirty"===t.status,Mu=t=>"valid"===t.status,Tu=t=>void 0!==typeof Promise&&t instanceof Promise;var Ou;!function(t){t.errToObj=t=>"string"==typeof t?{message:t}:t||{},t.toString=t=>"string"==typeof t?t:null==t?void 0:t.message}(Ou||(Ou={}));class Ru{constructor(t,e,i,n){this.parent=t,this.data=e,this._path=i,this._key=n}get path(){return this._path.concat(this._key)}}const Pu=(t,e)=>{if(Mu(e))return{success:!0,data:e.value};if(!t.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,error:new _u(t.common.issues)}};function Nu(t){if(!t)return{};const{errorMap:e,invalid_type_error:i,required_error:n,description:o}=t;if(e&&(i||n))throw new Error('Can\'t use "invalid_type_error" or "required_error" in conjunction with custom error map.');if(e)return{errorMap:e,description:o};return{errorMap:(t,e)=>"invalid_type"!==t.code?{message:e.defaultError}:void 0===e.data?{message:null!=n?n:e.defaultError}:{message:null!=i?i:e.defaultError},description:o}}class Fu{constructor(t){this.spa=this.safeParseAsync,this.superRefine=this._refinement,this._def=t,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.default=this.default.bind(this),this.describe=this.describe.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this)}get description(){return this._def.description}_getType(t){return bu(t.data)}_getOrReturnCtx(t,e){return e||{common:t.parent.common,data:t.data,parsedType:bu(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new Bu,ctx:{common:t.parent.common,data:t.data,parsedType:bu(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){const e=this._parse(t);if(Tu(e))throw new Error("Synchronous parse encountered promise.");return e}_parseAsync(t){const e=this._parse(t);return Promise.resolve(e)}parse(t,e){const i=this.safeParse(t,e);if(i.success)return i.data;throw i.error}safeParse(t,e){var i;const n={common:{issues:[],async:null!==(i=null==e?void 0:e.async)&&void 0!==i&&i,contextualErrorMap:null==e?void 0:e.errorMap},path:(null==e?void 0:e.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:bu(t)},o=this._parseSync({data:t,path:n.path,parent:n});return Pu(n,o)}async parseAsync(t,e){const i=await this.safeParseAsync(t,e);if(i.success)return i.data;throw i.error}async safeParseAsync(t,e){const i={common:{issues:[],contextualErrorMap:null==e?void 0:e.errorMap,async:!0},path:(null==e?void 0:e.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:bu(t)},n=this._parse({data:t,path:[],parent:i}),o=await(Tu(n)?n:Promise.resolve(n));return Pu(i,o)}refine(t,e){const i=t=>"string"==typeof e||void 0===e?{message:e}:"function"==typeof e?e(t):e;return this._refinement(((e,n)=>{const o=t(e),r=()=>n.addIssue({code:yu.custom,...i(e)});return"undefined"!=typeof Promise&&o instanceof Promise?o.then((t=>!!t||(r(),!1))):!!o||(r(),!1)}))}refinement(t,e){return this._refinement(((i,n)=>!!t(i)||(n.addIssue("function"==typeof e?e(i,n):e),!1)))}_refinement(t){return new yA({schema:this,typeName:SA.ZodEffects,effect:{type:"refinement",refinement:t}})}optional(){return _A.create(this)}nullable(){return wA.create(this)}nullish(){return this.optional().nullable()}array(){return tA.create(this)}promise(){return bA.create(this)}or(t){return rA.create([this,t])}and(t){return lA.create(this,t)}transform(t){return new yA({schema:this,typeName:SA.ZodEffects,effect:{type:"transform",transform:t}})}default(t){return new CA({innerType:this,defaultValue:"function"==typeof t?t:()=>t,typeName:SA.ZodDefault})}brand(){return new xA({typeName:SA.ZodBranded,type:this,...Nu(void 0)})}describe(t){return new(0,this.constructor)({...this._def,description:t})}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const Lu=/^c[^\s-]{8,}$/i,ju=/^([a-f0-9]{8}-[a-f0-9]{4}-[1-5][a-f0-9]{3}-[a-f0-9]{4}-[a-f0-9]{12}|00000000-0000-0000-0000-000000000000)$/i,zu=/^(([^<>()[\]\.,;:\s@\"]+(\.[^<>()[\]\.,;:\s@\"]+)*)|(\".+\"))@(([^<>()[\]\.,;:\s@\"]+\.)+[^<>()[\]\.,;:\s@\"]{2,})$/i;class Uu extends Fu{constructor(){super(...arguments),this._regex=(t,e,i)=>this.refinement((e=>t.test(e)),{validation:e,code:yu.invalid_string,...Ou.errToObj(i)}),this.nonempty=t=>this.min(1,Ou.errToObj(t)),this.trim=()=>new Uu({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}_parse(t){if(this._getType(t)!==vu.string){const e=this._getOrReturnCtx(t);return xu(e,{code:yu.invalid_type,expected:vu.string,received:e.parsedType}),ku}const e=new Bu;let i;for(const n of this._def.checks)if("min"===n.kind)t.data.lengthn.value&&(i=this._getOrReturnCtx(t,i),xu(i,{code:yu.too_big,maximum:n.value,type:"string",inclusive:!0,message:n.message}),e.dirty());else if("email"===n.kind)zu.test(t.data)||(i=this._getOrReturnCtx(t,i),xu(i,{validation:"email",code:yu.invalid_string,message:n.message}),e.dirty());else if("uuid"===n.kind)ju.test(t.data)||(i=this._getOrReturnCtx(t,i),xu(i,{validation:"uuid",code:yu.invalid_string,message:n.message}),e.dirty());else if("cuid"===n.kind)Lu.test(t.data)||(i=this._getOrReturnCtx(t,i),xu(i,{validation:"cuid",code:yu.invalid_string,message:n.message}),e.dirty());else if("url"===n.kind)try{new URL(t.data)}catch(o){i=this._getOrReturnCtx(t,i),xu(i,{validation:"url",code:yu.invalid_string,message:n.message}),e.dirty()}else if("regex"===n.kind){n.regex.lastIndex=0;n.regex.test(t.data)||(i=this._getOrReturnCtx(t,i),xu(i,{validation:"regex",code:yu.invalid_string,message:n.message}),e.dirty())}else"trim"===n.kind?t.data=t.data.trim():"startsWith"===n.kind?t.data.startsWith(n.value)||(i=this._getOrReturnCtx(t,i),xu(i,{code:yu.invalid_string,validation:{startsWith:n.value},message:n.message}),e.dirty()):"endsWith"===n.kind?t.data.endsWith(n.value)||(i=this._getOrReturnCtx(t,i),xu(i,{code:yu.invalid_string,validation:{endsWith:n.value},message:n.message}),e.dirty()):gu.assertNever(n);return{status:e.value,value:t.data}}_addCheck(t){return new Uu({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...Ou.errToObj(t)})}url(t){return this._addCheck({kind:"url",...Ou.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...Ou.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...Ou.errToObj(t)})}regex(t,e){return this._addCheck({kind:"regex",regex:t,...Ou.errToObj(e)})}startsWith(t,e){return this._addCheck({kind:"startsWith",value:t,...Ou.errToObj(e)})}endsWith(t,e){return this._addCheck({kind:"endsWith",value:t,...Ou.errToObj(e)})}min(t,e){return this._addCheck({kind:"min",value:t,...Ou.errToObj(e)})}max(t,e){return this._addCheck({kind:"max",value:t,...Ou.errToObj(e)})}length(t,e){return this.min(t,e).max(t,e)}get isEmail(){return!!this._def.checks.find((t=>"email"===t.kind))}get isURL(){return!!this._def.checks.find((t=>"url"===t.kind))}get isUUID(){return!!this._def.checks.find((t=>"uuid"===t.kind))}get isCUID(){return!!this._def.checks.find((t=>"cuid"===t.kind))}get minLength(){let t=null;for(const e of this._def.checks)"min"===e.kind&&(null===t||e.value>t)&&(t=e.value);return t}get maxLength(){let t=null;for(const e of this._def.checks)"max"===e.kind&&(null===t||e.valuen?i:n;return parseInt(t.toFixed(o).replace(".",""))%parseInt(e.toFixed(o).replace(".",""))/Math.pow(10,o)}Uu.create=t=>new Uu({checks:[],typeName:SA.ZodString,...Nu(t)});class Gu extends Fu{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(t){if(this._getType(t)!==vu.number){const e=this._getOrReturnCtx(t);return xu(e,{code:yu.invalid_type,expected:vu.number,received:e.parsedType}),ku}let e;const i=new Bu;for(const n of this._def.checks)if("int"===n.kind)gu.isInteger(t.data)||(e=this._getOrReturnCtx(t,e),xu(e,{code:yu.invalid_type,expected:"integer",received:"float",message:n.message}),i.dirty());else if("min"===n.kind){(n.inclusive?t.datan.value:t.data>=n.value)&&(e=this._getOrReturnCtx(t,e),xu(e,{code:yu.too_big,maximum:n.value,type:"number",inclusive:n.inclusive,message:n.message}),i.dirty())}else"multipleOf"===n.kind?0!==Hu(t.data,n.value)&&(e=this._getOrReturnCtx(t,e),xu(e,{code:yu.not_multiple_of,multipleOf:n.value,message:n.message}),i.dirty()):gu.assertNever(n);return{status:i.value,value:t.data}}gte(t,e){return this.setLimit("min",t,!0,Ou.toString(e))}gt(t,e){return this.setLimit("min",t,!1,Ou.toString(e))}lte(t,e){return this.setLimit("max",t,!0,Ou.toString(e))}lt(t,e){return this.setLimit("max",t,!1,Ou.toString(e))}setLimit(t,e,i,n){return new Gu({...this._def,checks:[...this._def.checks,{kind:t,value:e,inclusive:i,message:Ou.toString(n)}]})}_addCheck(t){return new Gu({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:Ou.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:Ou.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:Ou.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:Ou.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:Ou.toString(t)})}multipleOf(t,e){return this._addCheck({kind:"multipleOf",value:t,message:Ou.toString(e)})}get minValue(){let t=null;for(const e of this._def.checks)"min"===e.kind&&(null===t||e.value>t)&&(t=e.value);return t}get maxValue(){let t=null;for(const e of this._def.checks)"max"===e.kind&&(null===t||e.value"int"===t.kind))}}Gu.create=t=>new Gu({checks:[],typeName:SA.ZodNumber,...Nu(t)});class qu extends Fu{_parse(t){if(this._getType(t)!==vu.bigint){const e=this._getOrReturnCtx(t);return xu(e,{code:yu.invalid_type,expected:vu.bigint,received:e.parsedType}),ku}return Su(t.data)}}qu.create=t=>new qu({typeName:SA.ZodBigInt,...Nu(t)});class Yu extends Fu{_parse(t){if(this._getType(t)!==vu.boolean){const e=this._getOrReturnCtx(t);return xu(e,{code:yu.invalid_type,expected:vu.boolean,received:e.parsedType}),ku}return Su(t.data)}}Yu.create=t=>new Yu({typeName:SA.ZodBoolean,...Nu(t)});class $u extends Fu{_parse(t){if(this._getType(t)!==vu.date){const e=this._getOrReturnCtx(t);return xu(e,{code:yu.invalid_type,expected:vu.date,received:e.parsedType}),ku}if(isNaN(t.data.getTime())){return xu(this._getOrReturnCtx(t),{code:yu.invalid_date}),ku}const e=new Bu;let i;for(const n of this._def.checks)"min"===n.kind?t.data.getTime()n.value&&(i=this._getOrReturnCtx(t,i),xu(i,{code:yu.too_big,message:n.message,inclusive:!0,maximum:n.value,type:"date"}),e.dirty()):gu.assertNever(n);return{status:e.value,value:new Date(t.data.getTime())}}_addCheck(t){return new $u({...this._def,checks:[...this._def.checks,t]})}min(t,e){return this._addCheck({kind:"min",value:t.getTime(),message:Ou.toString(e)})}max(t,e){return this._addCheck({kind:"max",value:t.getTime(),message:Ou.toString(e)})}get minDate(){let t=null;for(const e of this._def.checks)"min"===e.kind&&(null===t||e.value>t)&&(t=e.value);return null!=t?new Date(t):null}get maxDate(){let t=null;for(const e of this._def.checks)"max"===e.kind&&(null===t||e.valuenew $u({checks:[],typeName:SA.ZodDate,...Nu(t)});class Wu extends Fu{_parse(t){if(this._getType(t)!==vu.undefined){const e=this._getOrReturnCtx(t);return xu(e,{code:yu.invalid_type,expected:vu.undefined,received:e.parsedType}),ku}return Su(t.data)}}Wu.create=t=>new Wu({typeName:SA.ZodUndefined,...Nu(t)});class Vu extends Fu{_parse(t){if(this._getType(t)!==vu.null){const e=this._getOrReturnCtx(t);return xu(e,{code:yu.invalid_type,expected:vu.null,received:e.parsedType}),ku}return Su(t.data)}}Vu.create=t=>new Vu({typeName:SA.ZodNull,...Nu(t)});class Ju extends Fu{constructor(){super(...arguments),this._any=!0}_parse(t){return Su(t.data)}}Ju.create=t=>new Ju({typeName:SA.ZodAny,...Nu(t)});class Ku extends Fu{constructor(){super(...arguments),this._unknown=!0}_parse(t){return Su(t.data)}}Ku.create=t=>new Ku({typeName:SA.ZodUnknown,...Nu(t)});class Zu extends Fu{_parse(t){const e=this._getOrReturnCtx(t);return xu(e,{code:yu.invalid_type,expected:vu.never,received:e.parsedType}),ku}}Zu.create=t=>new Zu({typeName:SA.ZodNever,...Nu(t)});class Xu extends Fu{_parse(t){if(this._getType(t)!==vu.undefined){const e=this._getOrReturnCtx(t);return xu(e,{code:yu.invalid_type,expected:vu.void,received:e.parsedType}),ku}return Su(t.data)}}Xu.create=t=>new Xu({typeName:SA.ZodVoid,...Nu(t)});class tA extends Fu{_parse(t){const{ctx:e,status:i}=this._processInputParams(t),n=this._def;if(e.parsedType!==vu.array)return xu(e,{code:yu.invalid_type,expected:vu.array,received:e.parsedType}),ku;if(null!==n.minLength&&e.data.lengthn.maxLength.value&&(xu(e,{code:yu.too_big,maximum:n.maxLength.value,type:"array",inclusive:!0,message:n.maxLength.message}),i.dirty()),e.common.async)return Promise.all(e.data.map(((t,i)=>n.type._parseAsync(new Ru(e,t,e.path,i))))).then((t=>Bu.mergeArray(i,t)));const o=e.data.map(((t,i)=>n.type._parseSync(new Ru(e,t,e.path,i))));return Bu.mergeArray(i,o)}get element(){return this._def.type}min(t,e){return new tA({...this._def,minLength:{value:t,message:Ou.toString(e)}})}max(t,e){return new tA({...this._def,maxLength:{value:t,message:Ou.toString(e)}})}length(t,e){return this.min(t,e).max(t,e)}nonempty(t){return this.min(1,t)}}var eA;tA.create=(t,e)=>new tA({type:t,minLength:null,maxLength:null,typeName:SA.ZodArray,...Nu(e)}),function(t){t.mergeShapes=(t,e)=>({...t,...e})}(eA||(eA={}));const iA=t=>e=>new oA({...t,shape:()=>({...t.shape(),...e})});function nA(t){if(t instanceof oA){const e={};for(const i in t.shape){const n=t.shape[i];e[i]=_A.create(nA(n))}return new oA({...t._def,shape:()=>e})}return t instanceof tA?tA.create(nA(t.element)):t instanceof _A?_A.create(nA(t.unwrap())):t instanceof wA?wA.create(nA(t.unwrap())):t instanceof dA?dA.create(t.items.map((t=>nA(t)))):t}class oA extends Fu{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=iA(this._def),this.extend=iA(this._def)}_getCached(){if(null!==this._cached)return this._cached;const t=this._def.shape(),e=gu.objectKeys(t);return this._cached={shape:t,keys:e}}_parse(t){if(this._getType(t)!==vu.object){const e=this._getOrReturnCtx(t);return xu(e,{code:yu.invalid_type,expected:vu.object,received:e.parsedType}),ku}const{status:e,ctx:i}=this._processInputParams(t),{shape:n,keys:o}=this._getCached(),r=[];for(const t in i.data)o.includes(t)||r.push(t);const s=[];for(const t of o){const e=n[t],o=i.data[t];s.push({key:{status:"valid",value:t},value:e._parse(new Ru(i,o,i.path,t)),alwaysSet:t in i.data})}if(this._def.catchall instanceof Zu){const t=this._def.unknownKeys;if("passthrough"===t)for(const t of r)s.push({key:{status:"valid",value:t},value:{status:"valid",value:i.data[t]}});else if("strict"===t)r.length>0&&(xu(i,{code:yu.unrecognized_keys,keys:r}),e.dirty());else if("strip"!==t)throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const t=this._def.catchall;for(const e of r){const n=i.data[e];s.push({key:{status:"valid",value:e},value:t._parse(new Ru(i,n,i.path,e)),alwaysSet:e in i.data})}}return i.common.async?Promise.resolve().then((async()=>{const t=[];for(const e of s){const i=await e.key;t.push({key:i,value:await e.value,alwaysSet:e.alwaysSet})}return t})).then((t=>Bu.mergeObjectSync(e,t))):Bu.mergeObjectSync(e,s)}get shape(){return this._def.shape()}strict(t){return Ou.errToObj,new oA({...this._def,unknownKeys:"strict",...void 0!==t?{errorMap:(e,i)=>{var n,o,r,s;const a=null!==(r=null===(o=(n=this._def).errorMap)||void 0===o?void 0:o.call(n,e,i).message)&&void 0!==r?r:i.defaultError;return"unrecognized_keys"===e.code?{message:null!==(s=Ou.errToObj(t).message)&&void 0!==s?s:a}:{message:a}}}:{}})}strip(){return new oA({...this._def,unknownKeys:"strip"})}passthrough(){return new oA({...this._def,unknownKeys:"passthrough"})}setKey(t,e){return this.augment({[t]:e})}merge(t){return new oA({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>eA.mergeShapes(this._def.shape(),t._def.shape()),typeName:SA.ZodObject})}catchall(t){return new oA({...this._def,catchall:t})}pick(t){const e={};return gu.objectKeys(t).map((t=>{this.shape[t]&&(e[t]=this.shape[t])})),new oA({...this._def,shape:()=>e})}omit(t){const e={};return gu.objectKeys(this.shape).map((i=>{-1===gu.objectKeys(t).indexOf(i)&&(e[i]=this.shape[i])})),new oA({...this._def,shape:()=>e})}deepPartial(){return nA(this)}partial(t){const e={};if(t)return gu.objectKeys(this.shape).map((i=>{-1===gu.objectKeys(t).indexOf(i)?e[i]=this.shape[i]:e[i]=this.shape[i].optional()})),new oA({...this._def,shape:()=>e});for(const t in this.shape){const i=this.shape[t];e[t]=i.optional()}return new oA({...this._def,shape:()=>e})}required(){const t={};for(const e in this.shape){let i=this.shape[e];for(;i instanceof _A;)i=i._def.innerType;t[e]=i}return new oA({...this._def,shape:()=>t})}keyof(){return gA(gu.objectKeys(this.shape))}}oA.create=(t,e)=>new oA({shape:()=>t,unknownKeys:"strip",catchall:Zu.create(),typeName:SA.ZodObject,...Nu(e)}),oA.strictCreate=(t,e)=>new oA({shape:()=>t,unknownKeys:"strict",catchall:Zu.create(),typeName:SA.ZodObject,...Nu(e)}),oA.lazycreate=(t,e)=>new oA({shape:t,unknownKeys:"strip",catchall:Zu.create(),typeName:SA.ZodObject,...Nu(e)});class rA extends Fu{_parse(t){const{ctx:e}=this._processInputParams(t),i=this._def.options;if(e.common.async)return Promise.all(i.map((async t=>{const i={...e,common:{...e.common,issues:[]},parent:null};return{result:await t._parseAsync({data:e.data,path:e.path,parent:i}),ctx:i}}))).then((function(t){for(const e of t)if("valid"===e.result.status)return e.result;for(const i of t)if("dirty"===i.result.status)return e.common.issues.push(...i.ctx.common.issues),i.result;const i=t.map((t=>new _u(t.ctx.common.issues)));return xu(e,{code:yu.invalid_union,unionErrors:i}),ku}));{let t;const n=[];for(const o of i){const i={...e,common:{...e.common,issues:[]},parent:null},r=o._parseSync({data:e.data,path:e.path,parent:i});if("valid"===r.status)return r;"dirty"!==r.status||t||(t={result:r,ctx:i}),i.common.issues.length&&n.push(i.common.issues)}if(t)return e.common.issues.push(...t.ctx.common.issues),t.result;const o=n.map((t=>new _u(t)));return xu(e,{code:yu.invalid_union,unionErrors:o}),ku}}get options(){return this._def.options}}rA.create=(t,e)=>new rA({options:t,typeName:SA.ZodUnion,...Nu(e)});class sA extends Fu{_parse(t){const{ctx:e}=this._processInputParams(t);if(e.parsedType!==vu.object)return xu(e,{code:yu.invalid_type,expected:vu.object,received:e.parsedType}),ku;const i=this.discriminator,n=e.data[i],o=this.options.get(n);return o?e.common.async?o._parseAsync({data:e.data,path:e.path,parent:e}):o._parseSync({data:e.data,path:e.path,parent:e}):(xu(e,{code:yu.invalid_union_discriminator,options:this.validDiscriminatorValues,path:[i]}),ku)}get discriminator(){return this._def.discriminator}get validDiscriminatorValues(){return Array.from(this.options.keys())}get options(){return this._def.options}static create(t,e,i){const n=new Map;try{e.forEach((e=>{const i=e.shape[t].value;n.set(i,e)}))}catch(t){throw new Error("The discriminator value could not be extracted from all the provided schemas")}if(n.size!==e.length)throw new Error("Some of the discriminator values are not unique");return new sA({typeName:SA.ZodDiscriminatedUnion,discriminator:t,options:n,...Nu(i)})}}function aA(t,e){const i=bu(t),n=bu(e);if(t===e)return{valid:!0,data:t};if(i===vu.object&&n===vu.object){const i=gu.objectKeys(e),n=gu.objectKeys(t).filter((t=>-1!==i.indexOf(t))),o={...t,...e};for(const i of n){const n=aA(t[i],e[i]);if(!n.valid)return{valid:!1};o[i]=n.data}return{valid:!0,data:o}}if(i===vu.array&&n===vu.array){if(t.length!==e.length)return{valid:!1};const i=[];for(let n=0;n{if(Du(t)||Du(n))return ku;const o=aA(t.value,n.value);return o.valid?((Qu(t)||Qu(n))&&e.dirty(),{status:e.value,value:o.data}):(xu(i,{code:yu.invalid_intersection_types}),ku)};return i.common.async?Promise.all([this._def.left._parseAsync({data:i.data,path:i.path,parent:i}),this._def.right._parseAsync({data:i.data,path:i.path,parent:i})]).then((([t,e])=>n(t,e))):n(this._def.left._parseSync({data:i.data,path:i.path,parent:i}),this._def.right._parseSync({data:i.data,path:i.path,parent:i}))}}lA.create=(t,e,i)=>new lA({left:t,right:e,typeName:SA.ZodIntersection,...Nu(i)});class dA extends Fu{_parse(t){const{status:e,ctx:i}=this._processInputParams(t);if(i.parsedType!==vu.array)return xu(i,{code:yu.invalid_type,expected:vu.array,received:i.parsedType}),ku;if(i.data.lengththis._def.items.length&&(xu(i,{code:yu.too_big,maximum:this._def.items.length,inclusive:!0,type:"array"}),e.dirty());const n=i.data.map(((t,e)=>{const n=this._def.items[e]||this._def.rest;return n?n._parse(new Ru(i,t,i.path,e)):null})).filter((t=>!!t));return i.common.async?Promise.all(n).then((t=>Bu.mergeArray(e,t))):Bu.mergeArray(e,n)}get items(){return this._def.items}rest(t){return new dA({...this._def,rest:t})}}dA.create=(t,e)=>{if(!Array.isArray(t))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new dA({items:t,typeName:SA.ZodTuple,rest:null,...Nu(e)})};class cA extends Fu{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:e,ctx:i}=this._processInputParams(t);if(i.parsedType!==vu.object)return xu(i,{code:yu.invalid_type,expected:vu.object,received:i.parsedType}),ku;const n=[],o=this._def.keyType,r=this._def.valueType;for(const t in i.data)n.push({key:o._parse(new Ru(i,t,i.path,t)),value:r._parse(new Ru(i,i.data[t],i.path,t))});return i.common.async?Bu.mergeObjectAsync(e,n):Bu.mergeObjectSync(e,n)}get element(){return this._def.valueType}static create(t,e,i){return new cA(e instanceof Fu?{keyType:t,valueType:e,typeName:SA.ZodRecord,...Nu(i)}:{keyType:Uu.create(),valueType:t,typeName:SA.ZodRecord,...Nu(e)})}}class hA extends Fu{_parse(t){const{status:e,ctx:i}=this._processInputParams(t);if(i.parsedType!==vu.map)return xu(i,{code:yu.invalid_type,expected:vu.map,received:i.parsedType}),ku;const n=this._def.keyType,o=this._def.valueType,r=[...i.data.entries()].map((([t,e],r)=>({key:n._parse(new Ru(i,t,i.path,[r,"key"])),value:o._parse(new Ru(i,e,i.path,[r,"value"]))})));if(i.common.async){const t=new Map;return Promise.resolve().then((async()=>{for(const i of r){const n=await i.key,o=await i.value;if("aborted"===n.status||"aborted"===o.status)return ku;"dirty"!==n.status&&"dirty"!==o.status||e.dirty(),t.set(n.value,o.value)}return{status:e.value,value:t}}))}{const t=new Map;for(const i of r){const n=i.key,o=i.value;if("aborted"===n.status||"aborted"===o.status)return ku;"dirty"!==n.status&&"dirty"!==o.status||e.dirty(),t.set(n.value,o.value)}return{status:e.value,value:t}}}}hA.create=(t,e,i)=>new hA({valueType:e,keyType:t,typeName:SA.ZodMap,...Nu(i)});class uA extends Fu{_parse(t){const{status:e,ctx:i}=this._processInputParams(t);if(i.parsedType!==vu.set)return xu(i,{code:yu.invalid_type,expected:vu.set,received:i.parsedType}),ku;const n=this._def;null!==n.minSize&&i.data.sizen.maxSize.value&&(xu(i,{code:yu.too_big,maximum:n.maxSize.value,type:"set",inclusive:!0,message:n.maxSize.message}),e.dirty());const o=this._def.valueType;function r(t){const i=new Set;for(const n of t){if("aborted"===n.status)return ku;"dirty"===n.status&&e.dirty(),i.add(n.value)}return{status:e.value,value:i}}const s=[...i.data.values()].map(((t,e)=>o._parse(new Ru(i,t,i.path,e))));return i.common.async?Promise.all(s).then((t=>r(t))):r(s)}min(t,e){return new uA({...this._def,minSize:{value:t,message:Ou.toString(e)}})}max(t,e){return new uA({...this._def,maxSize:{value:t,message:Ou.toString(e)}})}size(t,e){return this.min(t,e).max(t,e)}nonempty(t){return this.min(1,t)}}uA.create=(t,e)=>new uA({valueType:t,minSize:null,maxSize:null,typeName:SA.ZodSet,...Nu(e)});class AA extends Fu{constructor(){super(...arguments),this.validate=this.implement}_parse(t){const{ctx:e}=this._processInputParams(t);if(e.parsedType!==vu.function)return xu(e,{code:yu.invalid_type,expected:vu.function,received:e.parsedType}),ku;function i(t,i){return Eu({data:t,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,Iu(),wu].filter((t=>!!t)),issueData:{code:yu.invalid_arguments,argumentsError:i}})}function n(t,i){return Eu({data:t,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,Iu(),wu].filter((t=>!!t)),issueData:{code:yu.invalid_return_type,returnTypeError:i}})}const o={errorMap:e.common.contextualErrorMap},r=e.data;return this._def.returns instanceof bA?Su((async(...t)=>{const e=new _u([]),s=await this._def.args.parseAsync(t,o).catch((n=>{throw e.addIssue(i(t,n)),e})),a=await r(...s),l=await this._def.returns._def.type.parseAsync(a,o).catch((t=>{throw e.addIssue(n(a,t)),e}));return l})):Su(((...t)=>{const e=this._def.args.safeParse(t,o);if(!e.success)throw new _u([i(t,e.error)]);const s=r(...e.data),a=this._def.returns.safeParse(s,o);if(!a.success)throw new _u([n(s,a.error)]);return a.data}))}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new AA({...this._def,args:dA.create(t).rest(Ku.create())})}returns(t){return new AA({...this._def,returns:t})}implement(t){return this.parse(t)}strictImplement(t){return this.parse(t)}static create(t,e,i){return new AA({args:t||dA.create([]).rest(Ku.create()),returns:e||Ku.create(),typeName:SA.ZodFunction,...Nu(i)})}}class pA extends Fu{get schema(){return this._def.getter()}_parse(t){const{ctx:e}=this._processInputParams(t);return this._def.getter()._parse({data:e.data,path:e.path,parent:e})}}pA.create=(t,e)=>new pA({getter:t,typeName:SA.ZodLazy,...Nu(e)});class mA extends Fu{_parse(t){if(t.data!==this._def.value){return xu(this._getOrReturnCtx(t),{code:yu.invalid_literal,expected:this._def.value}),ku}return{status:"valid",value:t.data}}get value(){return this._def.value}}function gA(t,e){return new fA({values:t,typeName:SA.ZodEnum,...Nu(e)})}mA.create=(t,e)=>new mA({value:t,typeName:SA.ZodLiteral,...Nu(e)});class fA extends Fu{_parse(t){if("string"!=typeof t.data){const e=this._getOrReturnCtx(t),i=this._def.values;return xu(e,{expected:gu.joinValues(i),received:e.parsedType,code:yu.invalid_type}),ku}if(-1===this._def.values.indexOf(t.data)){const e=this._getOrReturnCtx(t),i=this._def.values;return xu(e,{received:e.data,code:yu.invalid_enum_value,options:i}),ku}return Su(t.data)}get options(){return this._def.values}get enum(){const t={};for(const e of this._def.values)t[e]=e;return t}get Values(){const t={};for(const e of this._def.values)t[e]=e;return t}get Enum(){const t={};for(const e of this._def.values)t[e]=e;return t}}fA.create=gA;class vA extends Fu{_parse(t){const e=gu.getValidEnumValues(this._def.values),i=this._getOrReturnCtx(t);if(i.parsedType!==vu.string&&i.parsedType!==vu.number){const t=gu.objectValues(e);return xu(i,{expected:gu.joinValues(t),received:i.parsedType,code:yu.invalid_type}),ku}if(-1===e.indexOf(t.data)){const t=gu.objectValues(e);return xu(i,{received:i.data,code:yu.invalid_enum_value,options:t}),ku}return Su(t.data)}get enum(){return this._def.values}}vA.create=(t,e)=>new vA({values:t,typeName:SA.ZodNativeEnum,...Nu(e)});class bA extends Fu{_parse(t){const{ctx:e}=this._processInputParams(t);if(e.parsedType!==vu.promise&&!1===e.common.async)return xu(e,{code:yu.invalid_type,expected:vu.promise,received:e.parsedType}),ku;const i=e.parsedType===vu.promise?e.data:Promise.resolve(e.data);return Su(i.then((t=>this._def.type.parseAsync(t,{path:e.path,errorMap:e.common.contextualErrorMap}))))}}bA.create=(t,e)=>new bA({type:t,typeName:SA.ZodPromise,...Nu(e)});class yA extends Fu{innerType(){return this._def.schema}_parse(t){const{status:e,ctx:i}=this._processInputParams(t),n=this._def.effect||null;if("preprocess"===n.type){const t=n.transform(i.data);return i.common.async?Promise.resolve(t).then((t=>this._def.schema._parseAsync({data:t,path:i.path,parent:i}))):this._def.schema._parseSync({data:t,path:i.path,parent:i})}const o={addIssue:t=>{xu(i,t),t.fatal?e.abort():e.dirty()},get path(){return i.path}};if(o.addIssue=o.addIssue.bind(o),"refinement"===n.type){const t=t=>{const e=n.refinement(t,o);if(i.common.async)return Promise.resolve(e);if(e instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return t};if(!1===i.common.async){const n=this._def.schema._parseSync({data:i.data,path:i.path,parent:i});return"aborted"===n.status?ku:("dirty"===n.status&&e.dirty(),t(n.value),{status:e.value,value:n.value})}return this._def.schema._parseAsync({data:i.data,path:i.path,parent:i}).then((i=>"aborted"===i.status?ku:("dirty"===i.status&&e.dirty(),t(i.value).then((()=>({status:e.value,value:i.value}))))))}if("transform"===n.type){if(!1===i.common.async){const t=this._def.schema._parseSync({data:i.data,path:i.path,parent:i});if(!Mu(t))return t;const r=n.transform(t.value,o);if(r instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:e.value,value:r}}return this._def.schema._parseAsync({data:i.data,path:i.path,parent:i}).then((t=>Mu(t)?Promise.resolve(n.transform(t.value,o)).then((t=>({status:e.value,value:t}))):t))}gu.assertNever(n)}}yA.create=(t,e,i)=>new yA({schema:t,typeName:SA.ZodEffects,effect:e,...Nu(i)}),yA.createWithPreprocess=(t,e,i)=>new yA({schema:e,effect:{type:"preprocess",transform:t},typeName:SA.ZodEffects,...Nu(i)});class _A extends Fu{_parse(t){return this._getType(t)===vu.undefined?Su(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}_A.create=(t,e)=>new _A({innerType:t,typeName:SA.ZodOptional,...Nu(e)});class wA extends Fu{_parse(t){return this._getType(t)===vu.null?Su(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}wA.create=(t,e)=>new wA({innerType:t,typeName:SA.ZodNullable,...Nu(e)});class CA extends Fu{_parse(t){const{ctx:e}=this._processInputParams(t);let i=e.data;return e.parsedType===vu.undefined&&(i=this._def.defaultValue()),this._def.innerType._parse({data:i,path:e.path,parent:e})}removeDefault(){return this._def.innerType}}CA.create=(t,e)=>new _A({innerType:t,typeName:SA.ZodOptional,...Nu(e)});class IA extends Fu{_parse(t){if(this._getType(t)!==vu.nan){const e=this._getOrReturnCtx(t);return xu(e,{code:yu.invalid_type,expected:vu.nan,received:e.parsedType}),ku}return{status:"valid",value:t.data}}}IA.create=t=>new IA({typeName:SA.ZodNaN,...Nu(t)});const EA=Symbol("zod_brand");class xA extends Fu{_parse(t){const{ctx:e}=this._processInputParams(t),i=e.data;return this._def.type._parse({data:i,path:e.path,parent:e})}unwrap(){return this._def.type}}const BA=(t,e={},i)=>t?Ju.create().superRefine(((n,o)=>{if(!t(n)){const t="function"==typeof e?e(n):e,r="string"==typeof t?{message:t}:t;o.addIssue({code:"custom",...r,fatal:i})}})):Ju.create(),kA={object:oA.lazycreate};var SA;!function(t){t.ZodString="ZodString",t.ZodNumber="ZodNumber",t.ZodNaN="ZodNaN",t.ZodBigInt="ZodBigInt",t.ZodBoolean="ZodBoolean",t.ZodDate="ZodDate",t.ZodUndefined="ZodUndefined",t.ZodNull="ZodNull",t.ZodAny="ZodAny",t.ZodUnknown="ZodUnknown",t.ZodNever="ZodNever",t.ZodVoid="ZodVoid",t.ZodArray="ZodArray",t.ZodObject="ZodObject",t.ZodUnion="ZodUnion",t.ZodDiscriminatedUnion="ZodDiscriminatedUnion",t.ZodIntersection="ZodIntersection",t.ZodTuple="ZodTuple",t.ZodRecord="ZodRecord",t.ZodMap="ZodMap",t.ZodSet="ZodSet",t.ZodFunction="ZodFunction",t.ZodLazy="ZodLazy",t.ZodLiteral="ZodLiteral",t.ZodEnum="ZodEnum",t.ZodEffects="ZodEffects",t.ZodNativeEnum="ZodNativeEnum",t.ZodOptional="ZodOptional",t.ZodNullable="ZodNullable",t.ZodDefault="ZodDefault",t.ZodPromise="ZodPromise",t.ZodBranded="ZodBranded"}(SA||(SA={}));const DA=Uu.create,QA=Gu.create,MA=IA.create,TA=qu.create,OA=Yu.create,RA=$u.create,PA=Wu.create,NA=Vu.create,FA=Ju.create,LA=Ku.create,jA=Zu.create,zA=Xu.create,UA=tA.create,HA=oA.create,GA=oA.strictCreate,qA=rA.create,YA=sA.create,$A=lA.create,WA=dA.create,VA=cA.create,JA=hA.create,KA=uA.create,ZA=AA.create,XA=pA.create,tp=mA.create,ep=fA.create,ip=vA.create,np=bA.create,op=yA.create,rp=_A.create,sp=wA.create,ap=yA.createWithPreprocess,lp=ku;var dp=Object.freeze({__proto__:null,getParsedType:bu,ZodParsedType:vu,defaultErrorMap:wu,setErrorMap:function(t){Cu=t},getErrorMap:Iu,makeIssue:Eu,EMPTY_PATH:[],addIssueToContext:xu,ParseStatus:Bu,INVALID:ku,DIRTY:t=>({status:"dirty",value:t}),OK:Su,isAborted:Du,isDirty:Qu,isValid:Mu,isAsync:Tu,ZodType:Fu,ZodString:Uu,ZodNumber:Gu,ZodBigInt:qu,ZodBoolean:Yu,ZodDate:$u,ZodUndefined:Wu,ZodNull:Vu,ZodAny:Ju,ZodUnknown:Ku,ZodNever:Zu,ZodVoid:Xu,ZodArray:tA,get objectUtil(){return eA},ZodObject:oA,ZodUnion:rA,ZodDiscriminatedUnion:sA,ZodIntersection:lA,ZodTuple:dA,ZodRecord:cA,ZodMap:hA,ZodSet:uA,ZodFunction:AA,ZodLazy:pA,ZodLiteral:mA,ZodEnum:fA,ZodNativeEnum:vA,ZodPromise:bA,ZodEffects:yA,ZodTransformer:yA,ZodOptional:_A,ZodNullable:wA,ZodDefault:CA,ZodNaN:IA,BRAND:EA,ZodBranded:xA,custom:BA,Schema:Fu,ZodSchema:Fu,late:kA,get ZodFirstPartyTypeKind(){return SA},any:FA,array:UA,bigint:TA,boolean:OA,date:RA,discriminatedUnion:YA,effect:op,enum:ep,function:ZA,instanceof:(t,e={message:`Input not instance of ${t.name}`})=>BA((e=>e instanceof t),e,!0),intersection:$A,lazy:XA,literal:tp,map:JA,nan:MA,nativeEnum:ip,never:jA,null:NA,nullable:sp,number:QA,object:HA,oboolean:()=>OA().optional(),onumber:()=>QA().optional(),optional:rp,ostring:()=>DA().optional(),preprocess:ap,promise:np,record:VA,set:KA,strictObject:GA,string:DA,transformer:op,tuple:WA,undefined:PA,union:qA,unknown:LA,void:zA,NEVER:lp,ZodIssueCode:yu,quotelessJson:t=>JSON.stringify(t,null,2).replace(/"([^"]+)":/g,"$1:"),ZodError:_u});function cp(t){if(t instanceof dp.ZodDefault)return cp(t.removeDefault());if(t instanceof dp.ZodObject){const e={};for(const i in t.shape){const n=t.shape[i];e[i]=dp.ZodOptional.create(cp(n))}return new dp.ZodObject(Object.assign(Object.assign({},t._def),{shape:()=>e}))}return t instanceof dp.ZodArray?dp.ZodArray.create(cp(t.element)):t instanceof dp.ZodOptional?dp.ZodOptional.create(cp(t.unwrap())):t instanceof dp.ZodNullable?dp.ZodNullable.create(cp(t.unwrap())):t instanceof dp.ZodTuple?dp.ZodTuple.create(t.items.map((t=>cp(t)))):t}function hp(t){const e=t.format();return Object.keys(e).filter((t=>!t.startsWith("_")))}const up=["live","clip","clips","snapshot","snapshots","image","timeline"],Ap=["left","right","top","bottom"],pp=Ap,mp=["all","unselected","hidden","never"],gp=["all","selected","visible","never"];class fp extends Error{constructor(t,e){super(t),this.context=e}}const vp=dp.object({confirmation:dp.boolean().or(dp.object({text:dp.string().optional(),exemptions:dp.object({user:dp.string()}).array().optional()})).optional()}),bp=vp.extend({action:dp.literal("toggle")}),yp=vp.extend({action:dp.literal("call-service"),service:dp.string(),service_data:dp.object({}).passthrough().optional()}),_p=vp.extend({action:dp.literal("navigate"),navigation_path:dp.string()}),wp=vp.extend({action:dp.literal("url"),url_path:dp.string()}),Cp=vp.extend({action:dp.literal("more-info")}),Ip=vp.extend({action:dp.literal("fire-dom-event")}).passthrough(),Ep=vp.extend({action:dp.literal("none")}),xp=Ip.extend({action:dp.literal("custom:frigate-card-action").transform((()=>"fire-dom-event")).or(dp.literal("fire-dom-event"))}),Bp=["default","clip","clips","image","live","snapshot","snapshots","timeline","download","frigate_ui","fullscreen","menu_toggle","diagnostics"],kp=xp.extend({frigate_card_action:dp.enum(Bp)}),Sp=xp.extend({frigate_card_action:dp.literal("camera_select"),camera:dp.string()}),Dp=xp.extend({frigate_card_action:dp.literal("media_player"),media_player:dp.string(),media_player_action:dp.enum(["play","stop"])}),Qp=dp.union([kp,Sp,Dp]),Mp=dp.union([bp,yp,_p,wp,Cp,Ep,Ip,Qp]),Tp=dp.object({tap_action:Mp.or(Mp.array()).optional(),hold_action:Mp.or(Mp.array()).optional(),double_tap_action:Mp.or(Mp.array()).optional(),start_tap_action:Mp.or(Mp.array()).optional(),end_tap_action:Mp.or(Mp.array()).optional()}).passthrough(),Op=dp.object({actions:Tp.optional()}),Rp=Tp.extend({style:dp.object({}).passthrough().optional(),title:dp.string().nullable().optional()}),Pp=Rp.extend({type:dp.literal("state-badge"),entity:dp.string()}),Np=Rp.extend({type:dp.literal("state-icon"),entity:dp.string(),icon:dp.string().optional(),state_color:dp.boolean().default(!0)}),Fp=Rp.extend({type:dp.literal("state-label"),entity:dp.string(),attribute:dp.string().optional(),prefix:dp.string().optional(),suffix:dp.string().optional()}),Lp=Rp.extend({type:dp.literal("service-button"),title:dp.string(),service:dp.string(),service_data:dp.object({}).passthrough().optional()}),jp=Rp.extend({type:dp.literal("icon"),icon:dp.string(),entity:dp.string().optional()}),zp=Rp.extend({type:dp.literal("image"),entity:dp.string().optional(),image:dp.string().optional(),camera_image:dp.string().optional(),camera_view:dp.string().optional(),state_image:dp.object({}).passthrough().optional(),filter:dp.string().optional(),state_filter:dp.object({}).passthrough().optional(),aspect_ratio:dp.string().optional()}),Up=dp.object({entity:dp.string(),state:dp.string().optional(),state_not:dp.string().optional()}).array(),Hp=dp.object({type:dp.literal("conditional"),conditions:Up,elements:dp.lazy((()=>nm))}),Gp=dp.object({type:dp.string().superRefine(((t,e)=>{t.match(/^custom:(?!frigate-card).+/)||e.addIssue({code:dp.ZodIssueCode.custom,message:"Frigate-card custom elements must match specific schemas",fatal:!0})}))}).passthrough(),qp={live_provider:"auto",frigate:{client_id:"frigate"},dependencies:{all_cameras:!1,cameras:[]},triggers:{motion:!1,occupancy:!0,entities:[]}},Yp=dp.object({entity:dp.string().optional(),url:dp.string().optional()}),$p=dp.object({camera_entity:dp.string().optional(),live_provider:dp.enum(["auto","ha","frigate-jsmpeg","webrtc-card"]).default(qp.live_provider),icon:dp.string().optional(),title:dp.string().optional(),id:dp.string().optional(),frigate:dp.object({url:dp.string().optional(),client_id:dp.string().default(qp.frigate.client_id),camera_name:dp.string().optional(),label:dp.string().optional(),zone:dp.string().optional()}).default(qp.frigate),webrtc_card:Yp.optional(),dependencies:dp.object({all_cameras:dp.boolean().default(qp.dependencies.all_cameras),cameras:dp.string().array().default(qp.dependencies.cameras)}).default(qp.dependencies),triggers:dp.object({motion:dp.boolean().default(qp.triggers.motion),occupancy:dp.boolean().default(qp.triggers.occupancy),entities:dp.string().array().default(qp.triggers.entities)}).default(qp.triggers)}).default(qp),Wp=dp.object({enabled:dp.boolean().default(!0).optional(),priority:dp.number().min(0).max(100).default(50).optional(),alignment:dp.enum(["matching","opposing"]).default("matching").optional(),icon:dp.string().optional()}),Vp=Wp.merge(jp).extend({type:dp.literal("custom:frigate-card-menu-icon")}),Jp=Wp.merge(Np).extend({type:dp.literal("custom:frigate-card-menu-state-icon")}).merge(Wp),Kp=Rp.extend({entity:dp.string().optional(),icon:dp.string().optional(),state_color:dp.boolean().default(!0),selected:dp.boolean().default(!1),subtitle:dp.string().optional(),enabled:dp.boolean().default(!0)}),Zp=Wp.merge(jp).extend({type:dp.literal("custom:frigate-card-menu-submenu"),items:Kp.array()}),Xp=Wp.merge(Np).extend({type:dp.literal("custom:frigate-card-menu-submenu-select"),options:dp.record(Kp.deepPartial()).optional()}),tm=dp.object({view:dp.string().array().optional(),fullscreen:dp.boolean().optional(),camera:dp.string().array().optional(),mediaLoaded:dp.boolean().optional(),state:Up.optional()}),em=dp.object({type:dp.literal("custom:frigate-card-conditional"),conditions:tm,elements:dp.lazy((()=>nm))}),im=dp.preprocess((t=>{if(!t||"object"!=typeof t||!t.service)return t;const e=Object.assign({},t);return["left","right","up","down","zoom_in","zoom_out","home"].forEach((i=>{`data_${i}`in t&&!(`actions_${i}`in t)&&(e[`actions_${i}`]={tap_action:{action:"call-service",service:t.service,service_data:t[`data_${i}`]}},delete e[`data_${i}`])})),e}),dp.object({type:dp.literal("custom:frigate-card-ptz"),style:dp.object({}).passthrough().optional(),orientation:dp.enum(["vertical","horizontal"]).default("vertical").optional(),service:dp.string().optional(),actions_left:Tp.optional(),actions_right:Tp.optional(),actions_up:Tp.optional(),actions_down:Tp.optional(),actions_zoom_in:Tp.optional(),actions_zoom_out:Tp.optional(),actions_home:Tp.optional()})),nm=dp.union([Jp,Vp,Zp,Xp,em,im,Pp,Np,Fp,Lp,jp,zp,Hp,Gp]).array().optional(),om=dp.object({fit:dp.enum(["contain","cover","fill"]).optional(),position:dp.object({x:dp.number().min(0).max(100).optional(),y:dp.number().min(0).max(100).optional()}).optional()}),rm={default:"live",camera_select:"current",timeout_seconds:300,update_seconds:0,update_force:!1,update_cycle_camera:!1,dark_mode:"off",scan:{enabled:!1,show_trigger_status:!0,untrigger_seconds:0,untrigger_reset:!0}},sm=dp.object({default:dp.enum(up).default(rm.default),camera_select:dp.enum([...up,"current"]).default(rm.camera_select),timeout_seconds:dp.number().default(rm.timeout_seconds),update_seconds:dp.number().default(rm.update_seconds),update_force:dp.boolean().default(rm.update_force),update_cycle_camera:dp.boolean().default(rm.update_cycle_camera),update_entities:dp.string().array().optional(),render_entities:dp.string().array().optional(),dark_mode:dp.enum(["on","off","auto"]).optional(),scan:dp.object({enabled:dp.boolean().default(rm.scan.enabled),show_trigger_status:dp.boolean().default(rm.scan.show_trigger_status),untrigger_seconds:dp.number().default(rm.scan.untrigger_seconds),untrigger_reset:dp.boolean().default(rm.scan.untrigger_reset)}).default(rm.scan)}).merge(Op).default(rm),am={mode:"url",refresh_seconds:0},lm=dp.object({mode:dp.enum(["screensaver","camera","url"]).default(am.mode),url:dp.string().optional(),refresh_seconds:dp.number().min(0).default(am.refresh_seconds),layout:om.optional()}).merge(Op).default(am),dm=dp.object({mode:dp.enum(["none","above","below","left","right"]),size:dp.number().min(75).max(175).optional(),show_details:dp.boolean().optional(),show_favorite_control:dp.boolean().optional(),show_timeline_control:dp.boolean().optional()}),cm=dp.object({style:dp.enum(["none","chevrons","icons","thumbnails"]),size:dp.number().min(20)}),hm=dp.enum(["none","slide"]),um=dp.object({mode:dp.enum(["none","popup-top-right","popup-top-left","popup-bottom-right","popup-bottom-left"]),duration_seconds:dp.number().min(0).max(60)}),Am={auto_play:"all",auto_pause:"never",auto_mute:"all",auto_unmute:"never",preload:!1,lazy_load:!0,lazy_unload:"never",draggable:!0,transition_effect:"slide",show_image_during_load:!0,controls:{next_previous:{size:48,style:"chevrons"},thumbnails:{media:"clips",size:100,show_details:!0,show_favorite_control:!0,show_timeline_control:!0,mode:"left"},title:{mode:"popup-bottom-right",duration_seconds:2}}},pm=Yp.passthrough().optional(),mm=dp.object({options:dp.object({audio:dp.boolean().optional(),video:dp.boolean().optional(),pauseWhenHidden:dp.boolean().optional(),disableGl:dp.boolean().optional(),disableWebAssembly:dp.boolean().optional(),preserveDrawingBuffer:dp.boolean().optional(),progressive:dp.boolean().optional(),throttled:dp.boolean().optional(),chunkSize:dp.number().optional(),maxAudioLag:dp.number().optional(),videoBufferSize:dp.number().optional(),audioBufferSize:dp.number().optional()}).optional()}).optional(),gm=dp.object({webrtc_card:pm,jsmpeg:mm,controls:dp.object({next_previous:cm.extend({style:dp.enum(["none","chevrons","icons"]).default(Am.controls.next_previous.style),size:cm.shape.size.default(Am.controls.next_previous.size)}).default(Am.controls.next_previous),thumbnails:dm.extend({mode:dm.shape.mode.default(Am.controls.thumbnails.mode),size:dm.shape.size.default(Am.controls.thumbnails.size),show_details:dm.shape.show_details.default(Am.controls.thumbnails.show_details),show_favorite_control:dm.shape.show_favorite_control.default(Am.controls.thumbnails.show_favorite_control),show_timeline_control:dm.shape.show_timeline_control.default(Am.controls.thumbnails.show_timeline_control),media:dp.enum(["clips","snapshots"]).default(Am.controls.thumbnails.media)}).default(Am.controls.thumbnails),title:um.extend({mode:um.shape.mode.default(Am.controls.title.mode),duration_seconds:um.shape.duration_seconds.default(Am.controls.title.duration_seconds)}).default(Am.controls.title)}).default(Am.controls),show_image_during_load:dp.boolean().default(Am.show_image_during_load),layout:om.optional()}).merge(Op),fm=gm.extend({auto_play:dp.enum(gp).default(Am.auto_play),auto_pause:dp.enum(mp).default(Am.auto_pause),auto_mute:dp.enum(mp).default(Am.auto_mute),auto_unmute:dp.enum(gp).default(Am.auto_unmute),preload:dp.boolean().default(Am.preload),lazy_load:dp.boolean().default(Am.lazy_load),lazy_unload:dp.enum(mp).default(Am.lazy_unload),draggable:dp.boolean().default(Am.draggable),transition_effect:hm.default(Am.transition_effect)}).default(Am),vm={priority:50,enabled:!0},bm={priority:50,enabled:!1},ym={style:"hidden",position:"top",alignment:"left",buttons:{frigate:vm,cameras:vm,live:vm,clips:vm,snapshots:vm,image:bm,timeline:vm,download:vm,frigate_ui:vm,fullscreen:vm,media_player:vm},button_size:40},_m=Wp.extend({enabled:Wp.shape.enabled.default(vm.enabled),priority:Wp.shape.priority.default(vm.priority)}),wm=Wp.extend({enabled:Wp.shape.enabled.default(bm.enabled),priority:Wp.shape.priority.default(bm.priority)}),Cm=dp.object({style:dp.enum(["none","hidden","overlay","hover","outside"]).default(ym.style),position:dp.enum(Ap).default(ym.position),alignment:dp.enum(pp).default(ym.alignment),buttons:dp.object({frigate:_m.default(ym.buttons.frigate),cameras:_m.default(ym.buttons.cameras),live:_m.default(ym.buttons.live),clips:_m.default(ym.buttons.clips),snapshots:_m.default(ym.buttons.snapshots),image:wm.default(ym.buttons.image),timeline:_m.default(ym.buttons.timeline),download:_m.default(ym.buttons.download),frigate_ui:_m.default(ym.buttons.frigate_ui),fullscreen:_m.default(ym.buttons.fullscreen),media_player:_m.default(ym.buttons.media_player)}).default(ym.buttons),button_size:dp.number().min(20).default(ym.button_size)}).default(ym),Im={auto_play:"all",auto_pause:"all",auto_mute:"all",auto_unmute:"never",lazy_load:!0,draggable:!0,transition_effect:"slide",controls:{next_previous:{size:48,style:"thumbnails"},thumbnails:{size:100,show_details:!0,show_favorite_control:!0,show_timeline_control:!0,mode:"left"},title:{mode:"popup-bottom-right",duration_seconds:2}}},Em=cm.extend({style:dp.enum(["none","thumbnails","chevrons"]).default(Im.controls.next_previous.style),size:cm.shape.size.default(Im.controls.next_previous.size)}),xm=dp.object({auto_play:dp.enum(gp).default(Im.auto_play),auto_pause:dp.enum(mp).default(Im.auto_pause),auto_mute:dp.enum(mp).default(Im.auto_mute),auto_unmute:dp.enum(gp).default(Im.auto_unmute),lazy_load:dp.boolean().default(Im.lazy_load),draggable:dp.boolean().default(Im.draggable),transition_effect:hm.default(Im.transition_effect),controls:dp.object({next_previous:Em.default(Im.controls.next_previous),thumbnails:dm.extend({mode:dm.shape.mode.default(Im.controls.thumbnails.mode),size:dm.shape.size.default(Im.controls.thumbnails.size),show_details:dm.shape.show_details.default(Im.controls.thumbnails.show_details),show_favorite_control:dm.shape.show_favorite_control.default(Im.controls.thumbnails.show_favorite_control),show_timeline_control:dm.shape.show_timeline_control.default(Im.controls.thumbnails.show_timeline_control)}).default(Im.controls.thumbnails),title:um.extend({mode:um.shape.mode.default(Im.controls.title.mode),duration_seconds:um.shape.duration_seconds.default(Im.controls.title.duration_seconds)}).default(Im.controls.title)}).default(Im.controls),layout:om.optional()}).merge(Op).default(Im),Bm={controls:{thumbnails:{size:100,show_details:!1,show_favorite_control:!0,show_timeline_control:!0}}},km=dp.object({controls:dp.object({thumbnails:dm.omit({mode:!0}).extend({size:dm.shape.size.default(Bm.controls.thumbnails.size),show_details:dm.shape.show_details.default(Bm.controls.thumbnails.show_details),show_favorite_control:dm.shape.show_favorite_control.default(Bm.controls.thumbnails.show_favorite_control),show_timeline_control:dm.shape.show_timeline_control.default(Bm.controls.thumbnails.show_timeline_control)}).default(Bm.controls.thumbnails)}).default(Bm.controls)}).merge(Op).default(Bm),Sm={aspect_ratio_mode:"dynamic",aspect_ratio:[16,9]},Dm=dp.object({aspect_ratio_mode:dp.enum(["dynamic","static","unconstrained"]).default(Sm.aspect_ratio_mode),aspect_ratio:dp.number().array().length(2).or(dp.string().regex(/^\s*\d+\s*[:\/]\s*\d+\s*$/).transform((t=>t.split(/[:\/]/).map((t=>Number(t)))))).default(Sm.aspect_ratio)}).default(Sm),Qm={clustering_threshold:3,media:"all",window_seconds:3600,show_recordings:!0,controls:{thumbnails:{mode:"left",size:100,show_details:!0,show_favorite_control:!0,show_timeline_control:!0}}},Mm=dp.object({clustering_threshold:dp.number().optional().default(Qm.clustering_threshold),media:dp.enum(["all","clips","snapshots"]).optional().default(Qm.media),window_seconds:dp.number().min(60).max(86400).optional().default(Qm.window_seconds),show_recordings:dp.boolean().optional().default(Qm.show_recordings),controls:dp.object({thumbnails:dm.extend({mode:dm.shape.mode.default(Qm.controls.thumbnails.mode),size:dm.shape.size.default(Qm.controls.thumbnails.size),show_details:dm.shape.show_details.default(Qm.controls.thumbnails.show_details),show_favorite_control:dm.shape.show_favorite_control.default(Qm.controls.thumbnails.show_favorite_control),show_timeline_control:dm.shape.show_timeline_control.default(Qm.controls.thumbnails.show_timeline_control)}).default(Qm.controls.thumbnails)}).default(Qm.controls)}).default(Qm),Tm=dp.object({live:cp(gm).optional(),menu:cp(Cm).optional(),image:cp(lm).optional(),view:cp(sm).optional(),dimensions:cp(Dm).optional()}),Om=dp.object({conditions:tm,overrides:Tm}).array().optional();dp.object({conditions:tm,overrides:gm}).array().optional();const Rm=dp.object({cameras:$p.array().nonempty(),view:sm,menu:Cm,live:fm,media_viewer:xm,event_gallery:km,image:lm,elements:nm,dimensions:Dm,timeline:Mm,overrides:Om,card_mod:dp.unknown(),type:dp.string(),test_gui:dp.boolean().optional()}),Pm={cameras:qp,view:rm,menu:ym,live:Am,media_viewer:Im,event_gallery:Bm,image:am,timeline:Qm};dp.discriminatedUnion("type",[Vp,Jp,Zp,Xp]);const Nm={info:10,error:20,connection:30,diagnostics:40},Fm=dp.lazy((()=>dp.object({title:dp.string(),media_class:dp.string(),media_content_type:dp.string(),media_content_id:dp.string(),can_play:dp.boolean(),can_expand:dp.boolean(),children_media_class:dp.string().nullable().optional(),thumbnail:dp.string().nullable(),children:dp.array(Fm).nullable().optional(),frigate:dp.object({event:dp.object({camera:dp.string(),end_time:dp.number().nullable(),false_positive:dp.boolean().nullable(),has_clip:dp.boolean(),has_snapshot:dp.boolean(),id:dp.string(),label:dp.string(),start_time:dp.number(),top_score:dp.number(),zones:dp.string().array(),retain_indefinitely:dp.boolean().optional()})}).optional()}))),Lm=dp.object({url:dp.string(),mime_type:dp.string()}),jm=dp.object({path:dp.string()}),zm=dp.object({config_entry_id:dp.string().nullable(),disabled_by:dp.string().nullable(),entity_id:dp.string(),platform:dp.string()}),Um=zm.extend({unique_id:dp.string().optional()}),Hm=zm.array();function Gm(t){if(!t)return null;const e=Qp.safeParse(t);return e.success?e.data:null}function qm(t,e){return"camera_select"===t?(null==e?void 0:e.camera)?{action:"fire-dom-event",frigate_card_action:t,camera:e.camera}:null:"media_player"===t?(null==e?void 0:e.media_player)&&e.media_player_action?{action:"fire-dom-event",frigate_card_action:t,media_player:e.media_player,media_player_action:e.media_player_action}:null:{action:"fire-dom-event",frigate_card_action:t}}function Ym(t,e){if(t&&e)return"tap"==t&&e.tap_action?e.tap_action:"hold"==t&&e.hold_action?e.hold_action:"double_tap"==t&&e.double_tap_action?e.double_tap_action:"end_tap"==t&&e.end_tap_action?e.end_tap_action:"start_tap"==t&&e.start_tap_action?e.start_tap_action:void 0}const $m=(t,e,i,n,o)=>!(!o&&"tap"!=n)&&(Array.isArray(o)?o.forEach((n=>A(t,e,i,n))):A(t,e,i,o),!0),Wm=t=>Array.isArray(t)?!!t.find((t=>p(t))):p(t),Vm=t=>{t.stopPropagation()};class Jm extends HTMLElement{constructor(){super(...arguments),this.holdTime=400,this.held=!1}connectedCallback(){["touchcancel","mouseout","mouseup","touchmove","mousewheel","wheel","scroll"].forEach((t=>{document.addEventListener(t,(()=>{this.timer&&(clearTimeout(this.timer),this.timer=void 0)}),{passive:!0})}))}bind(t,e){if(t.actionHandlerOptions)return void(t.actionHandlerOptions=e);t.actionHandlerOptions=e,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}));const i=()=>{const e=t.actionHandlerOptions;(null==e?void 0:e.hasHold)&&(this.held=!1,this.timer=window.setTimeout((()=>{this.held=!0}),this.holdTime)),c(t,"action",{action:"start_tap"})},n=e=>{const i=t.actionHandlerOptions;(null==i?void 0:i.allowPropagation)||Vm(e),(!["touchend","touchcancel"].includes(e.type)||(null==i?void 0:i.hasHold)&&this.held)&&((null==i?void 0:i.hasHold)&&(clearTimeout(this.timer),this.timer=void 0),c(t,"action",{action:"end_tap"}),(null==i?void 0:i.hasHold)&&this.held?c(t,"action",{action:"hold"}):(null==i?void 0:i.hasDoubleClick)?"click"===e.type&&e.detail<2||!this.dblClickTimeout?this.dblClickTimeout=window.setTimeout((()=>{this.dblClickTimeout=void 0,c(t,"action",{action:"tap"})}),250):(clearTimeout(this.dblClickTimeout),this.dblClickTimeout=void 0,c(t,"action",{action:"double_tap"})):c(t,"action",{action:"tap"}))};t.addEventListener("touchstart",i,{passive:!0}),t.addEventListener("touchend",n),t.addEventListener("touchcancel",n),t.addEventListener("mousedown",i,{passive:!0}),t.addEventListener("click",n),t.addEventListener("keyup",(t=>{"Enter"===t.key&&n(t)}))}}customElements.define("action-handler-frigate-card",Jm);const Km=(t,e)=>{const i=(()=>{const t=document.body;if(t.querySelector("action-handler-frigate-card"))return t.querySelector("action-handler-frigate-card");const e=document.createElement("action-handler-frigate-card");return t.appendChild(e),e})();i&&i.bind(t,e)},Zm=kt(class extends St{update(t,[e]){return Km(t.element,e),Z}render(t){}});class Xm extends Event{}function tg(t,e){var i,n,o;if(!e)return!1;let r=!0;if((null===(i=null==t?void 0:t.view)||void 0===i?void 0:i.length)&&r&&(r=!!e.view&&t.view.includes(e.view)),void 0!==(null==t?void 0:t.fullscreen)&&r&&(r=void 0!==e.fullscreen&&t.fullscreen==e.fullscreen),(null===(n=null==t?void 0:t.camera)||void 0===n?void 0:n.length)&&r&&(r=!!e.camera&&t.camera.includes(e.camera)),null===(o=null==t?void 0:t.state)||void 0===o?void 0:o.length)for(const i of null==t?void 0:t.state)r&&(r=!(!e.state||(i.state||i.state_not)&&(!(i.entity in e.state)||i.state&&e.state[i.entity].state!==i.state||i.state_not&&e.state[i.entity].state===i.state_not)));return void 0!==(null==t?void 0:t.mediaLoaded)&&r&&(r=void 0!==e.mediaLoaded&&t.mediaLoaded==e.mediaLoaded),r}function eg(t,e,i){const n=ms(t);let o=!1;if(e)for(const t of e)tg(t.conditions,i)&&(ud(n,t.overrides),o=!0);return o?n:t}var ig={frigate_card:"Frigate card",frigate_card_description:"A Lovelace card for use with Frigate",live:"Live",no_clip:"No recent clip",no_clips:"No clips",no_snapshot:"No recent snapshot",no_snapshots:"No snapshots",recordings:"Recordings",version:"Version"},ng={cameras:{camera_entity:"Camera Entity",dependencies:{all_cameras:"Show events for all cameras with this camera",cameras:"Show events for specific cameras with this camera",options:"Dependency Options"},frigate:{camera_name:"Frigate camera name (Autodetected from entity)",client_id:"Frigate client id (For >1 Frigate server)",label:"Frigate label/object filter",options:"Frigate Options",url:"Frigate server URL",zone:"Frigate zone"},icon:"Icon for this camera (Autodetected from entity)",id:"Unique id for this camera in this card",live_provider:"Live view provider for this camera",live_providers:{auto:"Automatic","frigate-jsmpeg":"Frigate JSMpeg",ha:"Home Assistant (i.e. HLS, LL-HLS, WebRTC native)","webrtc-card":"WebRTC Card (i.e. AlexxIT's WebRTC Card)"},title:"Title for this camera (Autodetected from entity)",triggers:{entities:"Trigger from other entities",motion:"Trigger by auto-detecting the motion sensor",occupancy:"Trigger by auto-detecting the occupancy sensor",options:"Trigger Options"},webrtc_card:{entity:"WebRTC Card Camera Entity (Not a Frigate camera)",options:"WebRTC Card Options",url:"WebRTC Card Camera URL"}},common:{media_action_conditions:{all:"All opportunities",hidden:"On browser/tab hiding",never:"Never",selected:"On selection",unselected:"On unselection",visible:"On browser/tab visibility"},layout:{fit:"Layout fit",fits:{cover:"Media expands proportionally to cover the card",contain:"Media is contained/letterboxed",fill:"Media is stretched to fill the card"},position:{x:"Horizontal placement percentage",y:"Vertical placement percentage"}}},dimensions:{aspect_ratio:"Default aspect ratio (e.g. '16:9')",aspect_ratio_mode:"Aspect ratio mode",aspect_ratio_modes:{dynamic:"Aspect ratio adjusts to media",static:"Static aspect ratio",unconstrained:"Unconstrained aspect ratio"}},event_gallery:{controls:{options:"Event Gallery Controls",thumbnails:{show_details:"Show event details with thumbnails",show_favorite_control:"Show favorite control on thumbnails",show_timeline_control:"Show timeline control on thumbnails",size:"Event Gallery thumbnails size in pixels"}}},image:{layout:"Image Layout",mode:"Image view mode",modes:{camera:"Home Assistant camera snapshot of camera entity",screensaver:"Embedded Frigate logo",url:"Arbitrary image specified by URL"},refresh_seconds:"Number of seconds after which to refresh (0=never)",url:"Static image URL for image view"},live:{auto_mute:"Automatically mute live cameras",auto_pause:"Automatically pause live cameras",auto_play:"Automatically play live cameras",auto_unmute:"Automatically unmute live cameras",controls:{next_previous:{size:"Live view next & previous control size in pixels",style:"Live view next & previous control style",styles:{chevrons:"Chevrons",icons:"Icons",none:"None"}},options:"Live Controls",thumbnails:{media:"Whether to show thumbnails of clips or snapshots",medias:{clips:"Clip thumbnails",snapshots:"Snapshot thumbnails"},mode:"Live thumbnails mode",show_details:"Show event details with thumbnails",show_favorite_control:"Show favorite control on thumbnails",show_timeline_control:"Show timeline control on thumbnails",size:"Live thumbnails size in pixels"},title:{duration_seconds:"Seconds to display popup title (0=forever)",mode:"Live media title display mode"}},draggable:"Live cameras view can be dragged/swiped",layout:"Live Layout",lazy_load:"Live cameras are lazily loaded",lazy_unload:"Live cameras are lazily unloaded",preload:"Preload live view in the background",show_image_during_load:"Show still image while the live stream is loading",transition_effect:"Live camera transition effect"},media_viewer:{auto_mute:"Automatically mute media",auto_pause:"Automatically pause media",auto_play:"Automatically play media",auto_unmute:"Automatically unmute media",controls:{next_previous:{size:"Media Viewer next & previous control size in pixels",style:"Media Viewer next & previous control style",styles:{chevrons:"Chevrons",none:"None",thumbnails:"Thumbnails"}},options:"Media Viewer Controls",thumbnails:{mode:"Media Viewer thumbnails mode",modes:{above:"Thumbnails above the media",below:"Thumbnails below the media",left:"Thumbnails in a drawer left of the media",none:"No thumbnails",right:"Thumbnails in a drawer right of the media"},show_details:"Show details with thumbnails",show_favorite_control:"Show favorite control on thumbnails",show_timeline_control:"Show timeline control on thumbnails",size:"Media Viewer thumbnails size in pixels"},title:{duration_seconds:"Seconds to display popup title (0=forever)",mode:"Media Viewer media title display mode",modes:{none:"No title display","popup-bottom-left":"Popup on the bottom left","popup-bottom-right":"Popup on the bottom right","popup-top-left":"Popup on the top left","popup-top-right":"Popup on the top right"}}},draggable:"Media Viewer can be dragged/swiped",lazy_load:"Media Viewer media is lazily loaded in carousel",layout:"Media Viewer Layout",transition_effect:"Media Viewer transition effect",transition_effects:{none:"No transition",slide:"Slide transition"}},menu:{alignment:"Menu alignment",alignments:{bottom:"Aligned to the bottom",left:"Aligned to the left",right:"Aligned to the right",top:"Aligned to the top"},button_size:"Menu button size in pixels",buttons:{alignment:"Button alignment",alignments:{matching:"Matching the menu alignment",opposing:"Opposing the menu alignment"},cameras:"Cameras",clips:"Clips",download:"Download",enabled:"Button enabled",frigate:"Frigate menu / Default view",frigate_ui:"Frigate user interface",fullscreen:"Fullscreen",icon:"Icon",image:"Image",live:"Live",media_player:"Send to media player",priority:"Priority",snapshots:"Snapshots",timeline:"Timeline"},position:"Menu position",positions:{bottom:"Positioned on the bottom",left:"Positioned on the left",right:"Positioned on the right",top:"Positioned on the top"},style:"Menu style",styles:{hidden:"Hidden menu",hover:"Hover menu",none:"No menu",outside:"Outside menu",overlay:"Overlay menu"}},overrides:{info:"This card configuration has manually specified overrides configured which may override values shown in the visual editor, please consult the code editor to view/modify these overrides"},timeline:{clustering_threshold:"The count of events at which they are clustered (0=no clustering)",controls:{options:"Timeline Controls",thumbnails:{mode:"Timeline thumbnails mode",show_details:"Show event details with thumbnails",show_favorite_control:"Show favorite control on thumbnails",show_timeline_control:"Show timeline control on thumbnails",size:"Timeline thumbnails size in pixels"}},media:"The media the timeline displays",medias:{all:"All media types",clips:"Clips",snapshots:"Snapshots"},show_recordings:"Show recordings",window_seconds:"The default length of the timeline view in seconds"},view:{camera_select:"View for newly selected cameras",dark_mode:"Dark mode",dark_modes:{auto:"Auto",off:"Off",on:"On"},default:"Default view",scan:{enabled:"Scan mode enabled",scan_mode:"Scan mode",show_trigger_status:"Show pulsing border when triggered",untrigger_reset:"Reset the view to default after untrigger",untrigger_seconds:"Seconds after inactive state change to untrigger"},timeout_seconds:"Reset to default view X seconds after user action (0=never)",update_cycle_camera:"Cycle through cameras when default view updates",update_force:"Force card updates (ignore user interaction)",update_seconds:"Refresh default view every X seconds (0=never)",views:{clip:"Most recent clip",clips:"Clips gallery",current:"Current view",image:"Static image",live:"Live view",snapshot:"Most recent snapshot",snapshots:"Snapshots gallery",timeline:"Timeline view"}}},og={add_new_camera:"Add new camera",button:"Button",camera:"Camera",cameras:"Cameras",cameras_secondary:"What cameras to render on this card",delete:"Delete",dimensions:"Dimensions",dimensions_secondary:"Dimensions & shape options",event_gallery:"Event gallery",event_gallery_secondary:"Snapshots & clips gallery options",image:"Image",image_secondary:"Static image view options",live:"Live",live_secondary:"Live camera view options",media_viewer:"Media viewer",media_viewer_secondary:"Viewer for static media (clips, snapshots or recordings)",menu:"Menu",menu_secondary:"Menu look & feel options",move_down:"Move down",move_up:"Move up",overrides:"Overrides are active",overrides_secondary:"Dynamic configuration overrides detected",timeline:"Timeline",timeline_secondary:"Event timeline options",upgrade:"Upgrade",upgrade_available:"An automatic card configuration upgrade is available",view:"View",view_secondary:"What the card should show and how to show it"},rg={could_not_render_elements:"Could not render picture elements",could_not_resolve:"Could not resolve media URL",diagnostics:"Card diagnostics. Please review for confidential information prior to sharing",download_no_event_id:"Could not extract Frigate event id from media",download_no_media:"No media to download",download_sign_failed:"Could not sign media URL for download",duplicate_camera_id:"Duplicate Frigate camera id for the following camera, use the 'id' parameter to uniquely identify cameras",empty_response:"Received empty response from Home Assistant for request",failed_response:"Failed to receive response from Home Assistant for request",failed_retain:"Could not retain event",failed_sign:"Could not sign Home Assistant URL",image_load_error:"The image could not be loaded",invalid_configuration:"Invalid configuration",invalid_configuration_no_hint:"No location hint available (bad or missing type?)",invalid_elements_config:"Invalid picture elements configuration",invalid_response:"Received invalid response from Home Assistant for request",jsmpeg_no_player:"Could not start JSMPEG player",jsmpeg_no_sign:"Could not retrieve or sign JSMPEG websocket path",live_camera_not_found:"The configured camera_entity was not found",live_camera_unavailable:"Camera unavailable",no_camera_id:"Could not determine camera id for the following camera, may need to set 'id' parameter manually",no_camera_name:"Could not determine a Frigate camera name for camera (or one of its dependents), please specify either 'camera_entity' or 'camera_name'",no_cameras:"No valid cameras found, you must configure at least one camera entry",no_live_camera:"The camera_entity parameter must be set and valid for this live provider",reconnecting:"Reconnecting",timeline_no_cameras:"No Frigate cameras to show in timeline",troubleshooting:"Check troubleshooting",unknown:"Unknown error",upgrade_available:"An automated card configuration upgrade is available, please visit the visual card editor",webrtc_card_reported_error:"WebRTC Card reported an error",webrtc_card_waiting:"Waiting for WebRTC Card to load ..."},sg={duration:"Duration",in_progress:"In Progress",score:"Score",start:"Start"},ag={events:"Events",seek:"Seek"},lg={no_thumbnail:"No thumbnail available",retain_indefinitely:"Event will be indefinitely retained",timeline:"See event in timeline"},dg={ptz:{up:"Up",down:"Down",left:"Left",right:"Right",zoom_in:"Zoom In",zoom_out:"Zoom Out",home:"Home"}},cg={common:ig,config:ng,editor:og,error:rg,event:sg,recording:ag,thumbnail:lg,elements:dg},hg={frigate_card:"Cartão Frigate",frigate_card_description:"Um cartão da Lovelace para usar com Frigate",live:"Ao Vivo",no_clip:"Sem clip recente",no_clips:"Sem clips",no_snapshot:"Sem snapshot recente",no_snapshots:"Sem snapshots",recordings:"Gravações",version:"Versão"},ug={cameras:{camera_entity:"Entidade da Câmera",dependencies:{all_cameras:"Mostrar eventos para todas as câmeras nesta câmera",cameras:"Mostrar eventos para câmeras específicas nesta câmera",options:"Opções de dependência"},frigate:{camera_name:"Nome da câmera do Frigate (detectado automaticamente pela entidade)",client_id:"ID do cliente do Frigate (para >1 servidor Frigate)",label:"Filtro de rótulo/objeto do Frigate",options:"Opções do Frigate",url:"URL do servidor Frigate",zone:"Zona do Frigate"},icon:"Ícone para esta câmera (detectado automaticamente pela entidade)",id:"ID exclusivo para esta câmera nesse cartão",live_provider:"Provedor de visualização ao vivo para esta câmera",live_providers:{auto:"Automatico","frigate-jsmpeg":"Frigate JSMpeg",ha:"Home Assistant (HLS, LL-HLS ou WebRTC nativo)","webrtc-card":"Cartão WebRTC (de @AlexxIT)"},title:"Título para esta câmera (detectado automaticamente pela entidade)",triggers:{entities:"Acionar a partir de outras entidades",motion:"Acionar detectando automaticamente o sensor de movimento",occupancy:"Acionar detectando automaticamente o sensor de ocupação",options:"Opções de acionamento"},webrtc_card:{entity:"Entidade de câmera de cartão WebRTC (não é uma câmera Frigate)",options:"Opções do cartão WebRTC",url:"URL da câmera do cartão WebRTC"}},common:{media_action_conditions:{all:"Todas as oportunidades",hidden:"Ao ocultar o navegador/aba",never:"Nunca",selected:"Ao selecionar",unselected:"Ao desselecionar",visible:"Ao mostrar o navegador/aba"}},dimensions:{aspect_ratio:"Proporção padrão (e.g. '16:9')",aspect_ratio_mode:"Modo de proporção",aspect_ratio_modes:{dynamic:"A proporção se ajusta à mídia",static:"Proporção estática",unconstrained:"Proporção irrestrita"}},event_gallery:{controls:{options:"Controles da Galeria de Eventos",thumbnails:{show_details:"Mostrar detalhes do evento com miniaturas",show_favorite_control:"Mostrar controle de favorito nas miniaturas",show_timeline_control:"Mostrar controle da linha do tempo nas miniaturas",size:"Tamanho das miniaturas da Galeria de eventos em pixels"}}},image:{mode:"Modo de visualização de imagem",modes:{camera:"Instantâneo da câmera do Home Assistant, da entidade de câmera",screensaver:"Logo Frigate embutido",url:"Imagem arbitrária especificada por URL"},refresh_seconds:"Número de segundos após o qual atualizar (0 = nunca)",url:"Imagem arbitrária especificada por URL"},live:{auto_mute:"Silenciar câmeras ao vivo automaticamente",auto_pause:"Pausar câmeras ao vivo automaticamente",auto_play:"Reproduzir câmeras ao vivo automaticamente",auto_unmute:"Ativar automaticamente o som das câmeras ao vivo",controls:{next_previous:{size:"Tamanho de controle próximo e anterior na visualização ao vivo (por exemplo, '48px')",style:"Estilo do controle próximo e anterior na visualização ao vivo",styles:{chevrons:"Setas",icons:"Ícones",none:"Nenhum"}},options:"Controles da visualização ao vivo",thumbnails:{media:"Se deve mostrar miniaturas de clipes ou snapshots",medias:{clips:"Miniaturas de clipes",snapshots:"Miniaturas de Snapshots"},mode:"Miniaturas do modo ao vivo",show_details:"Mostrar detalhes do evento com miniaturas",show_favorite_control:"Mostrar controle de favorito nas miniaturas",show_timeline_control:"Mostrar controle da linha do tempo nas miniaturas",size:"Tamanho das miniaturas ao vivo (e.g. '100px')"},title:{duration_seconds:"Segundos para exibir o pop-up na visualização ao vivo (0 = para sempre)",mode:"Modo de exibição de título de mídia ao vivo"}},draggable:"A visualização ao vivo das câmeras pode ser arrastada/deslizada",lazy_load:"As câmeras ao vivo são carregadas lentamente",lazy_unload:"As câmeras ao vivo são descarregadas preguiçosamente",preload:"Pré-carregar a visualização ao vivo em segundo plano",show_image_during_load:"",transition_effect:"Efeito de transição de câmera ao vivo"},media_viewer:{auto_mute:"Silenciar mídia automaticamente",auto_pause:"Pausar mídia automaticamente",auto_play:"Reproduzir mídia automaticamente",auto_unmute:"Ativar mídia automaticamente",controls:{next_previous:{size:"Tamanho do controle próximo e anterior do Visualizador de eventos (por exemplo, '48px')",style:"Estilo do controle próximo e anterior do Visualizador de eventos",styles:{chevrons:"Setas",none:"Nenhum",thumbnails:"Miniaturas"}},options:"Controles do visualizador de mídia",thumbnails:{mode:"Modo de miniaturas do Visualizador de eventos",modes:{above:"Miniaturas acima da mídia",below:"Miniaturas abaixo da mídia",left:"Miniaturas em uma gaveta à esquerda da mídia",none:"Sem miniaturas",right:"Miniaturas em uma gaveta à direita da mídia"},show_details:"Mostrar detalhes com miniaturas",show_favorite_control:"Mostrar controle de favorito nas miniaturas",show_timeline_control:"Mostrar controle da linha do tempo nas miniaturas",size:"Tamanho das miniaturas do Visualizador de eventos (por exemplo, '100px')"},title:{duration_seconds:"Segundos de exibição do pop-up no Visualizador de Eventos (0 = para sempre)",mode:"Modo de exibição de título de mídia do Visualizador de eventos",modes:{none:"Sem exibição de título","popup-bottom-left":"Pop-up no canto inferior esquerdo","popup-bottom-right":"Pop-up no canto inferior direito","popup-top-left":"Pop-up no canto superior esquerdo","popup-top-right":"Pop-up no canto superior direito"}}},draggable:"Visualizador de eventos pode ser arrastado/deslizado",lazy_load:"A mídia do Visualizador de eventos é carregada lentamente no carrossel",transition_effect:"Efeito de transição do Visualizador de eventos",transition_effects:{none:"Sem transição",slide:"Transição de slides"}},menu:{alignment:"Alinhamento do menu",alignments:{bottom:"Alinhado à parte inferior",left:"Alinhado à esquerda",right:"Alinhado à direita",top:"Alinhado ao topo"},button_size:"Tamanho do botão de menu (e.g. '40px')",buttons:{alignment:"Alinhamento do botão",alignments:{matching:"Mesmo alinhamento do menu",opposing:"Opor-se ao alinhamento do menu"},cameras:"Selecionar câmera",clips:"Clipes",download:"Baixe a mídia do evento",enabled:"Botão ativado",frigate:"Frigate menu / Visualização padrão",frigate_ui:"Frigate Interface de usuário",fullscreen:"Tela cheia",icon:"Ícone",image:"Imagem",live:"Ao vivo",media_player:"Enviar para o reprodutor de mídia",priority:"Prioridade",snapshots:"Instantâneos",timeline:"Linha do tempo"},position:"Posição do menu",positions:{bottom:"Posicionado na parte inferior",left:"Posicionado à esquerda",right:"Posicionado à direita",top:"Posicionado no topo"},style:"Estilo do menu",styles:{hidden:"Menu oculto",hover:"Menu suspenso",none:"Sem menu",outside:"Menu externo",overlay:"Menu sobreposto"}},overrides:{info:"Esta configuração do cartão especificou manualmente as substituições configuradas que podem substituir os valores mostrados no editor visual, consulte o editor de código para visualizar/modificar essas substituições"},timeline:{clustering_threshold:"A contagem de eventos nos quais eles são agrupados (0 = sem agrupamento)",controls:{options:"Controles de linha do tempo",thumbnails:{mode:"Modo de miniaturas da linha do tempo",show_details:"Mostrar detalhes do evento com miniaturas",show_favorite_control:"Mostrar controle de favorito nas miniaturas",show_timeline_control:"Mostrar controle da linha do tempo nas miniaturas",size:"Tamanho das miniaturas da linha do tempo em pixels"}},media:"A mídia que a linha do tempo exibe",medias:{all:"Todos os tipos de mídia",clips:"Clipes",snapshots:"Instantâneos"},show_recordings:"Mostrar gravações",window_seconds:"A duração padrão da visualização da linha do tempo em segundos"},view:{camera_select:"Visualização de câmeras recém-selecionadas",dark_mode:"Modo escuro",dark_modes:{auto:"Automático",off:"Desligado",on:"Ligado"},default:"Visualização padrão",scan:{enabled:"Modo scan ativado",scan_mode:"Modo scan",show_trigger_status:"Pulsar borda quando acionado",untrigger_reset:"Redefinir a visualização para o padrão após desacionar",untrigger_seconds:"Segundos após a mudar para o estado inativo para desacionar"},timeout_seconds:"Redefinir para a visualização padrão X segundos após a ação do usuário (0 = nunca)",update_cycle_camera:"Percorrer as câmeras quando a visualização padrão for atualizada",update_force:"Forçar atualizações do cartão (ignore a interação do usuário)",update_seconds:"Atualize a visualização padrão a cada X segundos (0 = nunca)",views:{clip:"Clipe mais recente",clips:"Galeria de clipes",current:"Visualização atual",image:"Imagem estática",live:"Visualização ao vivo",snapshot:"Snapshot mais recente",snapshots:"Galeria de Snapshots",timeline:"Visualização da linha do tempo"}}},Ag={add_new_camera:"Adicionar nova câmera",button:"Botão",camera:"Câmera",cameras:"Câmeras",cameras_secondary:"Quais câmeras renderizar neste cartão",delete:"Excluir",dimensions:"Dimensões",dimensions_secondary:"Dimensões e opções de forma",event_gallery:"Galeria de eventos",event_gallery_secondary:"Opções da galeria de Snapshots e clipes",image:"Imagem",image_secondary:"Opções de visualização de imagem estática",live:"Ao vivo",live_secondary:"Opções de visualização da câmera ao vivo",media_viewer:"Visualizador de eventos",media_viewer_secondary:"Opções do visualizador de Snapshots e clipes",menu:"Menu",menu_secondary:"Opções de aparência do menu",move_down:"Descer",move_up:"Subir",overrides:"As substituições estão ativas",overrides_secondary:"Substituições de configuração dinâmica detectadas",timeline:"Linha do tempo",timeline_secondary:"Opções do evento da linha do tempo",upgrade:"Upgrade",upgrade_available:"Um upgrade automático da configuração de cartão está disponível",view:"Visualizar",view_secondary:"O que o cartão deve mostrar e como mostrá-lo"},pg={could_not_render_elements:"Não foi possível renderizar os elementos da imagem",could_not_resolve:"Não foi possível resolver o URL de mídia",diagnostics:"Diagnósticos do cartão. Revise as informações confidenciais antes de compartilhar",download_no_event_id:"Não foi possível extrair o Frigate ID do evento da mídia",download_no_media:"Nenhuma mídia para download",download_sign_failed:"Não foi possível assinar o URL de mídia para download",duplicate_camera_id:"Duplique o ID da câmera Frigate para a câmera a seguir, use o parâmetro 'id' para identificar exclusivamente as câmeras",empty_response:"Sem resposta do Home Assistant para a solicitação",failed_response:"Falha ao receber resposta do Home Assistant para solicitação",failed_retain:"Não foi possível reter o evento",failed_sign:"Não foi possível assinar a URL do Home Assistant",image_load_error:"A imagem não pôde ser carregada",invalid_configuration:"Configuração inválida",invalid_configuration_no_hint:"Nenhuma dica de local disponível (tipo incorreto ou ausente?)",invalid_elements_config:"Configuração de elementos de imagem inválida",invalid_response:"Resposta inválida recebida do Home Assistant para a solicitação",jsmpeg_no_player:"Não foi possível iniciar o player JSMPEG",jsmpeg_no_sign:"Não foi possível recuperar ou assinar o caminho do websocket JSMPEG",live_camera_not_found:"",live_camera_unavailable:"",no_camera_id:"Não foi possível determinar o ID da câmera para a câmera a seguir, pode ser necessário definir o parâmetro 'id' manualmente",no_camera_name:"Não foi possível determinar o nome da câmera da Frigate, especifique 'camera_entity' ou 'camera_name' para a câmera a seguir",no_cameras:"Nenhuma câmera válida encontrada, você deve configurar pelo menos uma câmera",no_live_camera:"O parâmetro camera_entity deve ser definido e válido para este provedor ativo",reconnecting:"Reconectando",timeline_no_cameras:"Nenhuma câmera do Frigate para mostrar na linha do tempo",troubleshooting:"Verifique a solução de problemas",unknown:"Erro desconhecido",upgrade_available:"Uma atualização automatizada da configuração do cartão está disponível, visite o editor visual do cartão",webrtc_card_reported_error:"O cartão WebRTC relatou um erro",webrtc_card_waiting:"Aguardando o cartão WebRTC carregar ..."},mg={duration:"Duração",in_progress:"Em andamento",score:"Pontuação",start:"Início"},gg={events:"Eventos",seek:"Procurar"},fg={no_thumbnail:"Nenhuma miniatura disponível",retain_indefinitely:"Evento será retido por tempo indeterminado",timeline:"Ver evento na linha do tempo"},vg={common:hg,config:ug,editor:Ag,error:pg,event:mg,recording:gg,thumbnail:fg},bg={frigate_card:"Frigate card",frigate_card_description:"Una scheda Lovelace per l'uso con Frigate",live:"Live",no_clip:"Nessuna clip recente",no_clips:"Nessun clip",no_snapshot:"Nessuna istantanea recente",no_snapshots:"Nessuna istantanea",recordings:"Registrazioni",version:"Versione"},yg={cameras:{camera_entity:"Entità della telecamera",dependencies:{all_cameras:"Mostra eventi per tutte le telecamere con questa telecamera",cameras:"Mostra eventi per telecamere specifiche con questa telecamera",options:"Opzioni di dipendenza"},frigate:{camera_name:"Nome della telecamera frigate (autodificato dall'entità)",client_id:"ID client Frigate (per > 1 Frigate server)",label:"Filtro etichetta/oggetto Frigate",options:"Frigate Opzione",url:"Frigate URL del server",zone:"Frigate zona"},icon:"Icona per questa telecamera (Autoidentificato dall'entità)",id:"ID univoco per questa telecamera in questa carta",live_provider:"Provider di visualizzazione dal vivo per questa telecamera",live_providers:{auto:"Automatica","frigate-jsmpeg":"Frigate JSMpeg",ha:"Home Assistant (ovvero HLS, LL-HLS, WebRTC nativo)","webrtc-card":"Scheda WebRTC (ovvero la scheda WebRTC di Alexxit)"},title:"Titolo per questa telecamera (Autoidentificato dall'entità)",triggers:{entities:"Trigger da altre entità",motion:"Trigger rilevando automaticamente dal sensore di movimento",occupancy:"Attivare rilevando automatico tramite il sensore di presenza",options:"Trigger Opzioni"},webrtc_card:{entity:"Entità della telecamera della scheda WebRTC (non una telecamera Frigate)",options:"Opzioni della scheda WebRTC",url:"URL della telecamera della scheda WebRTC"}},common:{media_action_conditions:{all:"Tutte le opportunità",hidden:"Sul browser/nascondere le schede",never:"Mai",selected:"Sulla selezione",unselected:"Sulla non selezione",visible:"Sul browser/visibilità della scheda"}},dimensions:{aspect_ratio:"Proporzioni predefinite (ad es. '16:9')",aspect_ratio_mode:"Modalità proporzioni",aspect_ratio_modes:{dynamic:"Le proporzioni si adattano ai media",static:"Proporzioni statiche",unconstrained:"Proporzioni non vincolate"}},event_gallery:{controls:{options:"Controlli della galleria degli eventi",thumbnails:{show_details:"Mostra i dettagli dell'evento con le miniature",show_favorite_control:"Mostra il controllo preferito sulle miniature",show_timeline_control:"Mostra il controllo della sequenza temporale sulle miniature",size:"Dimensione delle miniature della galleria di eventi nei pixel"}}},image:{mode:"Modalità Visualizza immagine",modes:{camera:"Istantanea della telecamera di Home Assistant dell'entità telecamera",screensaver:"Logo Frigate incorporato",url:"Immagine arbitraria specificata dall'URL"},refresh_seconds:"Numero di secondi dopo i quali aggiornare (0 = mai)",url:"URL di immagine statica per la vista dell'immagine"},live:{auto_mute:"Muta automaticamente le telecamere in diretta",auto_pause:"Metti in pausa automaticamente le telecamere in diretta",auto_play:"Gioca automaticamente le telecamere dal vivo",auto_unmute:"Riattiva automaticamente l'audio delle telecamere live",controls:{next_previous:{size:"Vista live Successiva e Precedenti dimensioni di controllo nei pixel",style:"Stile di controllo successivo e precedente della vista dal vivo",styles:{chevrons:"Chevrons",icons:"Icone",none:"Icone"}},options:"Controlli dal vivo",thumbnails:{media:"Se mostrare miniature di clip o istantanee",medias:{clips:"Miniature di clip",snapshots:"Miniature istantanee"},mode:"Modalità di miniatura dal vivo",show_details:"Mostra i dettagli dell'evento con le miniature",show_favorite_control:"Mostra il controllo preferito sulle miniature",show_timeline_control:"Mostra il controllo della sequenza temporale sulle miniature",size:"Dimensione delle miniature dal vivo nei pixel"},title:{duration_seconds:"Secondi per visualizzare il titolo popup (0 = per sempre)",mode:"Modalità di visualizzazione del titolo multimediale dal vivo"}},draggable:"Il Visualizzatore eventi può essere trascinato oppure puoi scorrere",lazy_load:"Le telecamere dal vivo sono pigramente cariche",lazy_unload:"Le telecamere dal vivo sono pigramente non caricate",preload:"Precarica Live View in background",show_image_during_load:"",transition_effect:"Effetto di transizione della telecamera dal vivo"},media_viewer:{auto_mute:"Muta automaticamente i media",auto_pause:"Metti in Pausa automaticamente i media",auto_play:"Riproduci automaticamente i contenuti multimediali",auto_unmute:"Riattiva automaticamente i contenuti multimediali",controls:{next_previous:{size:"Media Viewer successivo e precedente controllo dimensione in pixel",style:"Visualizzatore multimediale successivo e stile di controllo precedente",styles:{chevrons:"chevrons",none:"Nessuno",thumbnails:"Miniature"}},options:"Controlli di visualizzatore multimediale",thumbnails:{mode:"Modalità miniature del visualizzatore multimediale",modes:{above:"Miniature sopra i media",below:"Miniature sotto i media",left:"Miniature in un cassetto a sinistra del supporto",none:"Nessuna miniatura",right:"Miniature in un cassetto a destra dei media"},show_details:"Mostra i dettagli con le miniature",show_favorite_control:"Mostra il controllo preferito sulle miniature",show_timeline_control:"Mostra il controllo della sequenza temporale sulle miniature",size:"Dimensioni delle miniature di Media Viewer in pixel"},title:{duration_seconds:"Secondi per visualizzare il titolo popup (0 = per sempre)",mode:"Media Viewer modalità di visualizzazione del titolo multimediale",modes:{none:"Nessuna visualizzazione del titolo","popup-bottom-left":"Popup in basso a sinistra","popup-bottom-right":"Popup in basso a destra","popup-top-left":"Popup in alto a sinistra","popup-top-right":"Popup in alto a destra"}}},draggable:"Il visualizzatore multimediale può essere trascinato oppure può scorrere",lazy_load:"Il media Viewer viene caricato pigramente nel carosello",transition_effect:"Effetto di transizione del visualizzatore multimediale",transition_effects:{none:"Nessuna transizione",slide:"Transizione diapositiva"}},menu:{alignment:"Allineamento dei menu",alignments:{bottom:"Allineato al fondo",left:"Allineato a sinistra",right:"Allineato a destra",top:"Allineato in cima"},button_size:"Dimensione del pulsante menu in pixel",buttons:{alignment:"Allineamento dei pulsanti",alignments:{matching:"Corrispondenza con l'allineamento del menu",opposing:"Contrastare l'allineamento del menu"},cameras:"Telecamere",clips:"Clip",download:"Download",enabled:"Pulsante abilitato",frigate:"Frigate menu / Visualizzazione predefinita",frigate_ui:"Frigate interfaccia utente",fullscreen:"A schermo intero",icon:"Icona",image:"Immagine",live:"Abitare",media_player:"Invia a Media Player",priority:"Priorità",snapshots:"Istantanee",timeline:"Timeline"},position:"Posizione del menu",positions:{bottom:"Posizionato sul fondo",left:"Posizionato a sinistra",right:"Posizionato a destra",top:"Posizionato in alto"},style:"Stile menu",styles:{hidden:"Menu nascosto",hover:"Menu al passaggio del mouse",none:"Nessun menu",outside:"Menu esterno",overlay:"Menu di overlay"}},overrides:{info:"Questa configurazione della scheda ha specificato manualmente le sostituzioni configurate che possono sostituire i valori mostrati nell'editor visivo, consultare l'editor di codice per visualizzare/modificare queste sostituzioni"},timeline:{clustering_threshold:"Il conteggio degli eventi in cui sono raggruppati (0 = nessun clustering)",controls:{options:"Controlli della sequenza temporale",thumbnails:{mode:"Modalità miniatura della sequenza temporale",show_details:"Mostra i dettagli dell'evento con le miniature",show_favorite_control:"Mostra il controllo preferito sulle miniature",show_timeline_control:"Mostra il controllo della sequenza temporale sulle miniature",size:"Dimensione delle miniature della sequenza temporale in pixel"}},media:"I media vengono visualizzati la sequenza temporale",medias:{all:"Tutti i tipi di media",clips:"Clip",snapshots:"Istantanee"},show_recordings:"Mostra registrazioni",window_seconds:"La lunghezza predefinita della vista della sequenza temporale in secondi"},view:{camera_select:"Visualizza per le telecamere appena selezionate",dark_mode:"Tema scuro",dark_modes:{auto:"auto",off:"Off",on:"On"},default:"Visualizzazione predefinita",scan:{enabled:"Modalità di scansione abilitata",scan_mode:"Modalità di scansione",show_trigger_status:"Mostra bordo pulsante quando attivato",untrigger_reset:"Reset the view to default after untrigger",untrigger_seconds:"Reimposta la vista ai valori predefiniti dopo aver annullato l'attivazione"},timeout_seconds:"Ripristina la vista predefinita x secondi dopo l'azione dell'utente (0 = mai)",update_cycle_camera:"Scorri le telecamere quando si aggiorna la visualizzazione predefinita",update_force:"Aggiornamenti della scheda forza (ignora l'interazione dell'utente)",update_seconds:"Aggiorna la visualizzazione predefinita ogni x secondi (0 = mai)",views:{clip:"Clip più recente",clips:"Galleria delle clip",current:"Vista corrente",image:"Immagine statica",live:"Dal vivo",snapshot:"Snapshot più recente",snapshots:"Galleria delle istantanee",timeline:"Vista della timeline"}}},_g={add_new_camera:"Aggiungi nuova telecamera",button:"Pulsante",camera:"Telecamera",cameras:"Telecamere",cameras_secondary:"Quali telecamere visualizzare su questa card",delete:"Elimina",dimensions:"Dimensioni",dimensions_secondary:"Dimensioni e opzioni di forma",event_gallery:"Galleria degli eventi",event_gallery_secondary:"Opzioni della galleria di istantanee e clips",image:"Immagine",image_secondary:"Opzioni di visualizzazione dell'immagine statica",live:"Live",live_secondary:"Opzioni di visualizzazione della telecamera live",media_viewer:"Visualizzatore dei media",media_viewer_secondary:"Visualizzatore per supporti statici (clip, istantanee o registrazioni)",menu:"Menu",menu_secondary:"Opzioni di aspetto e funzionalità del menu",move_down:"Sposta verso il basso",move_up:"Sposta verso l'alto",overrides:"La sovrascrittura è attiva",overrides_secondary:"Rilevate sovrascritture della configurazione dinamica",timeline:"Timeline",timeline_secondary:"Opzioni della timeline degli eventi",upgrade:"Aggiornamento",upgrade_available:"È disponibile un aggiornamento della configurazione della scheda automatica",view:"Visualizzazione",view_secondary:"Cosa dovrebbe mostrare la carta e come mostrarla"},wg={could_not_render_elements:"Impossibile renderizzare gli elementi dell'immagine",could_not_resolve:"Impossibile risolvere l'URL dei media",diagnostics:"Diagnostica delle carte.Si prega di rivedere per informazioni riservate prima di condividere",download_no_event_id:"Impossibile estrarre l'evento ID tramite media",download_no_media:"Nessun media da scaricare",download_sign_failed:"Impossibile firmare URL multimediale per il download",duplicate_camera_id:"Duplicato ID dellla telecamera Frigate, utilizzare il parametro 'ID' per identificare in modo univoco le telecamere",empty_response:"Ricevuto risposta vuota da Home Assistant per la richiesta",failed_response:"Impossibile ricevere risposta da Home Assistant per la richiesta",failed_retain:"Impossibile conservare l'evento",failed_sign:"Impossibile firmare l'URL ad Home Assistant",image_load_error:"L'immagine non può essere caricata",invalid_configuration:"Configurazione non valida",invalid_configuration_no_hint:"Nessun suggerimento di posizione disponibile (tipo difettoso o mancante?)",invalid_elements_config:"Configurazione degli elementi di immagine non valida",invalid_response:"Ricevuta una risposta non valida da Home Assistant per la richiesta",jsmpeg_no_player:"Impossibile avviare JSMPEG Player",jsmpeg_no_sign:"Impossibile recuperare o firmare il percorso WebSocket JSMPEG",live_camera_not_found:"La telecamera configurata non è stata trovata",live_camera_unavailable:"Telecamera non disponibile",no_camera_id:"Impossibile determinare l'ID della telecamera , potrebbe essere necessario impostare manualmente il parametro 'ID'",no_camera_name:"Impossibile determinare un nome della telecamera in Frigate, si prega di specificare 'camera_enty' o 'camera_name'",no_cameras:"Nessuna telecamera valida trovata, è necessario configurare almeno una voce della telecamera",no_live_camera:"Il parametro fotocamera_enty deve essere impostato e valido per questo provider live",reconnecting:"Riconnessione",timeline_no_cameras:"Nessuna telecamera damostrare in Frigate nella timeline",troubleshooting:"Controllare la risoluzione dei problemi",unknown:"Errore sconosciuto",upgrade_available:"È disponibile un aggiornamento di configurazione della scheda automatizzato, visitare l'editor di schede visive",webrtc_card_reported_error:"La scheda WebRTC ha riportato un errore",webrtc_card_waiting:"Aspettando che la scheda WebRTC si carichi ..."},Cg={duration:"Durata",in_progress:"In corso",score:"Punteggio",start:"Avvia"},Ig={events:"Eventi",seek:"Cercare"},Eg={no_thumbnail:"Nessuna miniatura disponibile",retain_indefinitely:"L'evento sarà mantenuto indefinitamente",timeline:"Vedi evento nella timeline"},xg={common:bg,config:yg,editor:_g,error:wg,event:Cg,recording:Ig,thumbnail:Eg};const Bg={en:Object.freeze({__proto__:null,common:ig,config:ng,editor:og,error:rg,event:sg,recording:ag,thumbnail:lg,elements:dg,default:cg}),pt_BR:Object.freeze({__proto__:null,common:hg,config:ug,editor:Ag,error:pg,event:mg,recording:gg,thumbnail:fg,default:vg}),it:Object.freeze({__proto__:null,common:bg,config:yg,editor:_g,error:wg,event:Cg,recording:Ig,thumbnail:Eg,default:xg})};function kg(){const t=t=>t?t.replace("-","_"):null;let e=null;const i=localStorage.getItem("selectedLanguage");if(i){const n=t(JSON.parse(i));n&&(e=n)}if(!e)for(const i of navigator.languages){const n=t(i);n&&n in Bg&&(e=i)}return e||"en"}function Sg(t,e="",i=""){const n=kg();let o;try{o=t.split(".").reduce(((t,e)=>t[e]),Bg[n])}catch(e){o=t.split(".").reduce(((t,e)=>t[e]),Bg.en)}return o||(o=t.split(".").reduce(((t,e)=>t[e]),Bg.en)),""!==e&&""!==i&&(o=o.replace(e,i)),o}function Dg(t,e,i){t.dispatchEvent(new CustomEvent(`frigate-card:${e}`,{bubbles:!0,composed:!0,detail:i}))}function Qg(t){if(!t)return;return t.split(/[_\s]+/).map((t=>t[0].toUpperCase()+t.substring(1))).join(" ")}function Mg(t,e,i){const n=t[e];t.splice(e,1),t.splice(i,0,n)}function Tg(t,e){return!Yl(t,e)}function Og(t,e){e||(e=console.warn),t instanceof fp&&t.context?e(t,t.context):e(t)}const Rg=()=>window.matchMedia("(hover: hover) and (pointer: fine)").matches,Pg="https://github.com/dermotduffy/frigate-hass-card",Ng=`${Pg}#troubleshooting`;var Fg=':host {\n min-height: 100%;\n width: 100%;\n display: flex;\n flex-direction: column;\n justify-content: center;\n user-select: text;\n -webkit-user-select: text;\n color: var(--primary-text-color);\n}\n\ndiv.wrapper {\n height: 100%;\n}\n\ndiv.message {\n display: flex;\n justify-content: center;\n align-items: center;\n box-sizing: border-box;\n padding: 20px;\n height: 100%;\n}\n\ndiv.message div.contents {\n display: flex;\n flex-direction: column;\n padding: 10px;\n margin-top: auto;\n margin-bottom: auto;\n min-width: 0;\n}\n\ndiv.message div.icon {\n padding: 10px;\n}\n\n.vertical {\n flex-direction: column;\n}\n\n.message a {\n color: var(--primary-text-color, white);\n word-break: break-word;\n}\n\n.message pre {\n margin-top: 20px;\n white-space: pre-wrap;\n word-break: break-all;\n}\n\n.dotdotdot:after {\n animation: dots 2s linear infinite;\n content: "";\n display: inline-block;\n width: 3em;\n}\n@keyframes dots {\n 0%, 20% {\n content: ".";\n }\n 40% {\n content: "..";\n }\n 60% {\n content: "...";\n }\n 90%, 100% {\n content: "";\n }\n}';let Lg=class extends gt{constructor(){super(...arguments),this.message=""}render(){const t=this.icon?this.icon:"mdi:information-outline",e={dotdotdot:!!this.dotdotdot};return K`
+
+
+ +
+
+ + ${this.message?K`${this.message}${this.context&&"string"==typeof this.context?": "+this.context:""}`:""} + + ${this.context&&"string"!=typeof this.context?K`
${JSON.stringify(this.context,null,2)}
`:""} +
+
+
`}static get styles(){return _(Fg)}};t([yt({attribute:!1})],Lg.prototype,"message",void 0),t([yt({attribute:!1})],Lg.prototype,"context",void 0),t([yt({attribute:!1})],Lg.prototype,"icon",void 0),t([yt({attribute:!0,type:Boolean})],Lg.prototype,"dotdotdot",void 0),Lg=t([vt("frigate-card-message")],Lg);let jg=class extends gt{render(){if(this.message)return K` ${Sg("error.troubleshooting")}.`} + .icon=${"mdi:alert-circle"} + .context=${this.message.context} + .dotdotdot=${this.message.dotdotdot} + > + `}static get styles(){return _(Fg)}};t([yt({attribute:!1})],jg.prototype,"message",void 0),jg=t([vt("frigate-card-error-message")],jg);let zg=class extends gt{constructor(){super(...arguments),this.message=""}render(){return K`
+ + + + ${this.message?K`${this.message}`:K``} +
`}static get styles(){return _(Fg)}};function Ug(t){return K` + + + `}function Hg(t,e,i,n){Dg(t,"message",{message:e,type:i,icon:null==n?void 0:n.icon,context:null==n?void 0:n.context})}function Gg(t,e,i){Hg(t,e,"error",{context:null==i?void 0:i.context})}function qg(t,e){Gg(t,e.message,{context:e.context})}t([yt({attribute:!1})],zg.prototype,"message",void 0),zg=t([vt("frigate-card-progress-indicator")],zg);let Yg=class extends gt{constructor(){super(...arguments),this._root=null}createRenderRoot(){return this}_createRoot(){const t=customElements.get("hui-conditional-element");if(!t||!this.hass)throw new Error(Sg("error.could_not_render_elements"));const e=new t;e.hass=this.hass;const i={type:"conditional",conditions:[],elements:this.elements};try{e.setConfig(i)}catch(t){throw console.error(t),new fp(Sg("error.invalid_elements_config"))}return e}willUpdate(t){try{!this.elements||this._root&&!t.has("elements")||(this._root=this._createRoot())}catch(t){return qg(this,t)}}render(){return K`${this._root||""}`}updated(){this.hass&&this._root&&(this._root.hass=this.hass)}};t([yt({attribute:!1})],Yg.prototype,"elements",void 0),t([yt({attribute:!1})],Yg.prototype,"conditionState",void 0),t([yt({attribute:!1})],Yg.prototype,"hass",void 0),Yg=t([vt("frigate-card-elements-core")],Yg);let $g=class extends gt{constructor(){super(...arguments),this._boundMenuRemoveHandler=this._menuRemoveHandler.bind(this)}_menuRemoveHandler(t){Dg(this,"menu-remove",t.detail)}_menuAddHandler(t){const e=t.composedPath();e.length&&(e[0].removeEventListener("frigate-card:menu-remove",this._boundMenuRemoveHandler),e[0].addEventListener("frigate-card:menu-remove",this._boundMenuRemoveHandler))}connectedCallback(){super.connectedCallback(),this.addEventListener("frigate-card:menu-add",this._menuAddHandler)}disconnectedCallback(){this.removeEventListener("frigate-card:menu-add",this._menuAddHandler),super.disconnectedCallback()}render(){return K` + `}static get styles(){return _(":host {\n position: absolute;\n inset: 0;\n overflow: hidden;\n pointer-events: none;\n}\n\n.element {\n position: absolute;\n transform: translate(-50%, -50%);\n pointer-events: auto;\n}\n\nhui-error-card.element {\n inset: 0px;\n transform: unset;\n}")}};t([yt({attribute:!1})],$g.prototype,"hass",void 0),t([yt({attribute:!1})],$g.prototype,"conditionState",void 0),t([yt({attribute:!1})],$g.prototype,"elements",void 0),$g=t([vt("frigate-card-elements")],$g);let Wg=class extends gt{setConfig(t){this._config=t}createRenderRoot(){return this}connectedCallback(){super.connectedCallback(),this.className=""}render(){if(function(t,e){if(!e)return!0;const i=new Xm("frigate-card:condition-state-request",{bubbles:!0,composed:!0});return t.dispatchEvent(i),tg(e,i.conditionState)}(this,this._config.conditions))return K` + `}};t([yt({attribute:!1,hasChanged:()=>!0})],Wg.prototype,"hass",void 0),Wg=t([vt("frigate-card-conditional")],Wg);class Vg extends gt{constructor(){super(...arguments),this._config=null}setConfig(t){this._config=t}connectedCallback(){super.connectedCallback(),this._config&&Dg(this,"menu-add",this._config)}disconnectedCallback(){this._config&&Dg(this,"menu-remove",this._config),super.disconnectedCallback()}}t([_t()],Vg.prototype,"_config",void 0);let Jg=class extends Vg{};Jg=t([vt("frigate-card-menu-icon")],Jg);let Kg=class extends Vg{};Kg=t([vt("frigate-card-menu-state-icon")],Kg);let Zg=class extends Vg{};Zg=t([vt("frigate-card-menu-submenu")],Zg);let Xg=class extends Vg{};Xg=t([vt("frigate-card-menu-submenu-select")],Xg);let tf=class extends gt{constructor(){super(...arguments),this._config=null}setConfig(t){this._config=t}willUpdate(t){var e,i;t.has("_config")&&this.setAttribute("data-orientation",null!==(i=null===(e=this._config)||void 0===e?void 0:e.orientation)&&void 0!==i?i:"vertical")}_actionHandler(t,e){t.stopPropagation();const i=t.detail.action,n=Ym(i,e);e&&n&&this.hass&&$m(this,this.hass,e,i,n)}render(){if(!this._config)return;const t=(t,e,i)=>{const n=Wm(null==i?void 0:i.hold_action),o=Wm(null==i?void 0:i.double_tap_action);return K`this._actionHandler(t,i)} + >`};return K`
+
+ ${t("right","mdi:arrow-right",this._config.actions_right)} + ${t("left","mdi:arrow-left",this._config.actions_left)} + ${t("up","mdi:arrow-up",this._config.actions_up)} + ${t("down","mdi:arrow-down",this._config.actions_down)} +
+ ${this._config.actions_zoom_in||this._config.actions_zoom_out?K`
+ ${t("zoom_in","mdi:plus",this._config.actions_zoom_in)} + ${t("zoom_out","mdi:minus",this._config.actions_zoom_out)} +
`:K``} + ${this._config.actions_home?K` +
+ ${t("home","mdi:home",this._config.actions_home)} +
+ `:K``} +
`}static get styles(){return _(":host {\n position: relative;\n width: fit-content;\n height: fit-content;\n --frigate-card-ptz-icon-size: 24px;\n}\n\n/*****************\n * Main Containers\n *****************/\n.ptz {\n display: flex;\n gap: 10px;\n color: var(--light-primary-color);\n opacity: 0.4;\n transition: opacity 0.3s ease-in-out;\n}\n\n:host([data-orientation=vertical]) .ptz {\n flex-direction: column;\n}\n\n:host([data-orientation=horizontal]) .ptz {\n flex-direction: row;\n}\n\n.ptz:hover {\n opacity: 1;\n}\n\n:host([data-orientation=vertical]) .ptz div {\n width: calc(var(--frigate-card-ptz-icon-size) * 3);\n}\n\n:host([data-orientation=horizontal]) .ptz div {\n height: calc(var(--frigate-card-ptz-icon-size) * 3);\n}\n\n.ptz-move,\n.ptz-zoom,\n.ptz-home {\n position: relative;\n background-color: rgba(0, 0, 0, 0.3);\n}\n\n.ptz-move {\n height: calc(var(--frigate-card-ptz-icon-size) * 3);\n width: calc(var(--frigate-card-ptz-icon-size) * 3);\n border-radius: 50%;\n}\n\n:host([data-orientation=horizontal]) .ptz .ptz-zoom,\n:host([data-orientation=horizontal]) .ptz .ptz-home {\n width: calc(var(--frigate-card-ptz-icon-size) * 1.5);\n}\n\n:host([data-orientation=vertical]) .ptz .ptz-zoom,\n:host([data-orientation=vertical]) .ptz .ptz-home {\n height: calc(var(--frigate-card-ptz-icon-size) * 1.5);\n}\n\n.ptz-zoom,\n.ptz-home {\n border-radius: var(--ha-card-border-radius, 4px);\n}\n\n/***********\n * PTZ Icons\n ***********/\nha-icon {\n position: absolute;\n --mdc-icon-size: var(--frigate-card-ptz-icon-size);\n}\n\nha-icon:not(.disabled) {\n cursor: pointer;\n}\n\n.disabled {\n color: var(--disabled-text-color);\n}\n\n.up {\n top: 5px;\n left: 50%;\n transform: translateX(-50%);\n}\n\n.down {\n bottom: 5px;\n left: 50%;\n transform: translateX(-50%);\n}\n\n.left {\n left: 5px;\n top: 50%;\n transform: translateY(-50%);\n}\n\n.right {\n right: 5px;\n top: 50%;\n transform: translateY(-50%);\n}\n\n:host([data-orientation=vertical]) .zoom_in {\n right: 5px;\n top: 50%;\n}\n\n:host([data-orientation=vertical]) .zoom_out {\n left: 5px;\n top: 50%;\n}\n\n:host([data-orientation=horizontal]) .zoom_in {\n left: 50%;\n top: 5px;\n}\n\n:host([data-orientation=horizontal]) .zoom_out {\n left: 50%;\n bottom: 5px;\n}\n\n:host([data-orientation=vertical]) .zoom_in,\n:host([data-orientation=vertical]) .zoom_out {\n transform: translateY(-50%);\n}\n\n:host([data-orientation=horizontal]) .zoom_in,\n:host([data-orientation=horizontal]) .zoom_out {\n transform: translateX(-50%);\n}\n\n.home {\n top: 50%;\n left: 50%;\n transform: translateX(-50%) translateY(-50%);\n}")}};t([yt({attribute:!1})],tf.prototype,"hass",void 0),t([_t()],tf.prototype,"_config",void 0),tf=t([vt("frigate-card-ptz")],tf);function ef(t){if(null===t||!0===t||!1===t)return NaN;var e=Number(t);return isNaN(e)?e:e<0?Math.ceil(e):Math.floor(e)}function nf(t,e){if(e.length1?"s":"")+" required, but only "+e.length+" present")}function of(t){nf(1,arguments);var e=Object.prototype.toString.call(t);return t instanceof Date||"object"==typeof t&&"[object Date]"===e?new Date(t.getTime()):"number"==typeof t||"[object Number]"===e?new Date(t):("string"!=typeof t&&"[object String]"!==e||"undefined"==typeof console||(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"),console.warn((new Error).stack)),new Date(NaN))}function rf(t,e){nf(2,arguments);var i=of(t),n=ef(e);return isNaN(n)?new Date(NaN):n?(i.setDate(i.getDate()+n),i):i}function sf(t,e){nf(2,arguments);var i=of(t),n=ef(e);if(isNaN(n))return new Date(NaN);if(!n)return i;var o=i.getDate(),r=new Date(i.getTime());r.setMonth(i.getMonth()+n+1,0);var s=r.getDate();return o>=s?r:(i.setFullYear(r.getFullYear(),r.getMonth(),o),i)}function af(t,e){if(nf(2,arguments),!e||"object"!=typeof e)return new Date(NaN);var i=e.years?ef(e.years):0,n=e.months?ef(e.months):0,o=e.weeks?ef(e.weeks):0,r=e.days?ef(e.days):0,s=e.hours?ef(e.hours):0,a=e.minutes?ef(e.minutes):0,l=e.seconds?ef(e.seconds):0,d=of(t),c=n||i?sf(d,n+12*i):d,h=r||o?rf(c,r+7*o):c,u=a+60*s,A=l+60*u,p=1e3*A,m=new Date(h.getTime()+p);return m}function lf(t,e){nf(2,arguments);var i=of(t).getTime(),n=ef(e);return new Date(i+n)}var df={};function cf(){return df}function hf(t){var e=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return e.setUTCFullYear(t.getFullYear()),t.getTime()-e.getTime()}function uf(t){return nf(1,arguments),t instanceof Date||"object"==typeof t&&"[object Date]"===Object.prototype.toString.call(t)}function Af(t){if(nf(1,arguments),!uf(t)&&"number"!=typeof t)return!1;var e=of(t);return!isNaN(Number(e))}function pf(t,e){return nf(2,arguments),of(t).getTime()-of(e).getTime()}var mf={ceil:Math.ceil,round:Math.round,floor:Math.floor,trunc:function(t){return t<0?Math.ceil(t):Math.floor(t)}};function gf(t){return t?mf[t]:mf.trunc}function ff(t,e,i){nf(2,arguments);var n=pf(t,e)/1e3;return gf(null==i?void 0:i.roundingMethod)(n)}function vf(t){nf(1,arguments);var e=of(t);return e.setMinutes(59,59,999),e}function bf(t,e){nf(2,arguments);var i=ef(e);return lf(t,-i)}function yf(t){nf(1,arguments);var e=1,i=of(t),n=i.getUTCDay(),o=(n=o.getTime()?i+1:e.getTime()>=s.getTime()?i:i-1}function wf(t){nf(1,arguments);var e=_f(t),i=new Date(0);i.setUTCFullYear(e,0,4),i.setUTCHours(0,0,0,0);var n=yf(i);return n}function Cf(t){nf(1,arguments);var e=of(t),i=yf(e).getTime()-wf(e).getTime();return Math.round(i/6048e5)+1}function If(t,e){var i,n,o,r,s,a,l,d;nf(1,arguments);var c=cf(),h=ef(null!==(i=null!==(n=null!==(o=null!==(r=null==e?void 0:e.weekStartsOn)&&void 0!==r?r:null==e||null===(s=e.locale)||void 0===s||null===(a=s.options)||void 0===a?void 0:a.weekStartsOn)&&void 0!==o?o:c.weekStartsOn)&&void 0!==n?n:null===(l=c.locale)||void 0===l||null===(d=l.options)||void 0===d?void 0:d.weekStartsOn)&&void 0!==i?i:0);if(!(h>=0&&h<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var u=of(t),A=u.getUTCDay(),p=(A=1&&A<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var p=new Date(0);p.setUTCFullYear(h+1,0,A),p.setUTCHours(0,0,0,0);var m=If(p,e),g=new Date(0);g.setUTCFullYear(h,0,A),g.setUTCHours(0,0,0,0);var f=If(g,e);return c.getTime()>=m.getTime()?h+1:c.getTime()>=f.getTime()?h:h-1}function xf(t,e){var i,n,o,r,s,a,l,d;nf(1,arguments);var c=cf(),h=ef(null!==(i=null!==(n=null!==(o=null!==(r=null==e?void 0:e.firstWeekContainsDate)&&void 0!==r?r:null==e||null===(s=e.locale)||void 0===s||null===(a=s.options)||void 0===a?void 0:a.firstWeekContainsDate)&&void 0!==o?o:c.firstWeekContainsDate)&&void 0!==n?n:null===(l=c.locale)||void 0===l||null===(d=l.options)||void 0===d?void 0:d.firstWeekContainsDate)&&void 0!==i?i:1),u=Ef(t,e),A=new Date(0);A.setUTCFullYear(u,0,h),A.setUTCHours(0,0,0,0);var p=If(A,e);return p}function Bf(t,e){nf(1,arguments);var i=of(t),n=If(i,e).getTime()-xf(i,e).getTime();return Math.round(n/6048e5)+1}function kf(t,e){for(var i=t<0?"-":"",n=Math.abs(t).toString();n.length0?i:1-i;return kf("yy"===e?n%100:n,e.length)},Df=function(t,e){var i=t.getUTCMonth();return"M"===e?String(i+1):kf(i+1,2)},Qf=function(t,e){return kf(t.getUTCDate(),e.length)},Mf=function(t,e){return kf(t.getUTCHours()%12||12,e.length)},Tf=function(t,e){return kf(t.getUTCHours(),e.length)},Of=function(t,e){return kf(t.getUTCMinutes(),e.length)},Rf=function(t,e){return kf(t.getUTCSeconds(),e.length)},Pf=function(t,e){var i=e.length,n=t.getUTCMilliseconds();return kf(Math.floor(n*Math.pow(10,i-3)),e.length)},Nf="midnight",Ff="noon",Lf="morning",jf="afternoon",zf="evening",Uf="night",Hf={G:function(t,e,i){var n=t.getUTCFullYear()>0?1:0;switch(e){case"G":case"GG":case"GGG":return i.era(n,{width:"abbreviated"});case"GGGGG":return i.era(n,{width:"narrow"});default:return i.era(n,{width:"wide"})}},y:function(t,e,i){if("yo"===e){var n=t.getUTCFullYear(),o=n>0?n:1-n;return i.ordinalNumber(o,{unit:"year"})}return Sf(t,e)},Y:function(t,e,i,n){var o=Ef(t,n),r=o>0?o:1-o;return"YY"===e?kf(r%100,2):"Yo"===e?i.ordinalNumber(r,{unit:"year"}):kf(r,e.length)},R:function(t,e){return kf(_f(t),e.length)},u:function(t,e){return kf(t.getUTCFullYear(),e.length)},Q:function(t,e,i){var n=Math.ceil((t.getUTCMonth()+1)/3);switch(e){case"Q":return String(n);case"QQ":return kf(n,2);case"Qo":return i.ordinalNumber(n,{unit:"quarter"});case"QQQ":return i.quarter(n,{width:"abbreviated",context:"formatting"});case"QQQQQ":return i.quarter(n,{width:"narrow",context:"formatting"});default:return i.quarter(n,{width:"wide",context:"formatting"})}},q:function(t,e,i){var n=Math.ceil((t.getUTCMonth()+1)/3);switch(e){case"q":return String(n);case"qq":return kf(n,2);case"qo":return i.ordinalNumber(n,{unit:"quarter"});case"qqq":return i.quarter(n,{width:"abbreviated",context:"standalone"});case"qqqqq":return i.quarter(n,{width:"narrow",context:"standalone"});default:return i.quarter(n,{width:"wide",context:"standalone"})}},M:function(t,e,i){var n=t.getUTCMonth();switch(e){case"M":case"MM":return Df(t,e);case"Mo":return i.ordinalNumber(n+1,{unit:"month"});case"MMM":return i.month(n,{width:"abbreviated",context:"formatting"});case"MMMMM":return i.month(n,{width:"narrow",context:"formatting"});default:return i.month(n,{width:"wide",context:"formatting"})}},L:function(t,e,i){var n=t.getUTCMonth();switch(e){case"L":return String(n+1);case"LL":return kf(n+1,2);case"Lo":return i.ordinalNumber(n+1,{unit:"month"});case"LLL":return i.month(n,{width:"abbreviated",context:"standalone"});case"LLLLL":return i.month(n,{width:"narrow",context:"standalone"});default:return i.month(n,{width:"wide",context:"standalone"})}},w:function(t,e,i,n){var o=Bf(t,n);return"wo"===e?i.ordinalNumber(o,{unit:"week"}):kf(o,e.length)},I:function(t,e,i){var n=Cf(t);return"Io"===e?i.ordinalNumber(n,{unit:"week"}):kf(n,e.length)},d:function(t,e,i){return"do"===e?i.ordinalNumber(t.getUTCDate(),{unit:"date"}):Qf(t,e)},D:function(t,e,i){var n=function(t){nf(1,arguments);var e=of(t),i=e.getTime();e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0);var n=e.getTime(),o=i-n;return Math.floor(o/864e5)+1}(t);return"Do"===e?i.ordinalNumber(n,{unit:"dayOfYear"}):kf(n,e.length)},E:function(t,e,i){var n=t.getUTCDay();switch(e){case"E":case"EE":case"EEE":return i.day(n,{width:"abbreviated",context:"formatting"});case"EEEEE":return i.day(n,{width:"narrow",context:"formatting"});case"EEEEEE":return i.day(n,{width:"short",context:"formatting"});default:return i.day(n,{width:"wide",context:"formatting"})}},e:function(t,e,i,n){var o=t.getUTCDay(),r=(o-n.weekStartsOn+8)%7||7;switch(e){case"e":return String(r);case"ee":return kf(r,2);case"eo":return i.ordinalNumber(r,{unit:"day"});case"eee":return i.day(o,{width:"abbreviated",context:"formatting"});case"eeeee":return i.day(o,{width:"narrow",context:"formatting"});case"eeeeee":return i.day(o,{width:"short",context:"formatting"});default:return i.day(o,{width:"wide",context:"formatting"})}},c:function(t,e,i,n){var o=t.getUTCDay(),r=(o-n.weekStartsOn+8)%7||7;switch(e){case"c":return String(r);case"cc":return kf(r,e.length);case"co":return i.ordinalNumber(r,{unit:"day"});case"ccc":return i.day(o,{width:"abbreviated",context:"standalone"});case"ccccc":return i.day(o,{width:"narrow",context:"standalone"});case"cccccc":return i.day(o,{width:"short",context:"standalone"});default:return i.day(o,{width:"wide",context:"standalone"})}},i:function(t,e,i){var n=t.getUTCDay(),o=0===n?7:n;switch(e){case"i":return String(o);case"ii":return kf(o,e.length);case"io":return i.ordinalNumber(o,{unit:"day"});case"iii":return i.day(n,{width:"abbreviated",context:"formatting"});case"iiiii":return i.day(n,{width:"narrow",context:"formatting"});case"iiiiii":return i.day(n,{width:"short",context:"formatting"});default:return i.day(n,{width:"wide",context:"formatting"})}},a:function(t,e,i){var n=t.getUTCHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return i.dayPeriod(n,{width:"abbreviated",context:"formatting"});case"aaa":return i.dayPeriod(n,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return i.dayPeriod(n,{width:"narrow",context:"formatting"});default:return i.dayPeriod(n,{width:"wide",context:"formatting"})}},b:function(t,e,i){var n,o=t.getUTCHours();switch(n=12===o?Ff:0===o?Nf:o/12>=1?"pm":"am",e){case"b":case"bb":return i.dayPeriod(n,{width:"abbreviated",context:"formatting"});case"bbb":return i.dayPeriod(n,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return i.dayPeriod(n,{width:"narrow",context:"formatting"});default:return i.dayPeriod(n,{width:"wide",context:"formatting"})}},B:function(t,e,i){var n,o=t.getUTCHours();switch(n=o>=17?zf:o>=12?jf:o>=4?Lf:Uf,e){case"B":case"BB":case"BBB":return i.dayPeriod(n,{width:"abbreviated",context:"formatting"});case"BBBBB":return i.dayPeriod(n,{width:"narrow",context:"formatting"});default:return i.dayPeriod(n,{width:"wide",context:"formatting"})}},h:function(t,e,i){if("ho"===e){var n=t.getUTCHours()%12;return 0===n&&(n=12),i.ordinalNumber(n,{unit:"hour"})}return Mf(t,e)},H:function(t,e,i){return"Ho"===e?i.ordinalNumber(t.getUTCHours(),{unit:"hour"}):Tf(t,e)},K:function(t,e,i){var n=t.getUTCHours()%12;return"Ko"===e?i.ordinalNumber(n,{unit:"hour"}):kf(n,e.length)},k:function(t,e,i){var n=t.getUTCHours();return 0===n&&(n=24),"ko"===e?i.ordinalNumber(n,{unit:"hour"}):kf(n,e.length)},m:function(t,e,i){return"mo"===e?i.ordinalNumber(t.getUTCMinutes(),{unit:"minute"}):Of(t,e)},s:function(t,e,i){return"so"===e?i.ordinalNumber(t.getUTCSeconds(),{unit:"second"}):Rf(t,e)},S:function(t,e){return Pf(t,e)},X:function(t,e,i,n){var o=(n._originalDate||t).getTimezoneOffset();if(0===o)return"Z";switch(e){case"X":return qf(o);case"XXXX":case"XX":return Yf(o);default:return Yf(o,":")}},x:function(t,e,i,n){var o=(n._originalDate||t).getTimezoneOffset();switch(e){case"x":return qf(o);case"xxxx":case"xx":return Yf(o);default:return Yf(o,":")}},O:function(t,e,i,n){var o=(n._originalDate||t).getTimezoneOffset();switch(e){case"O":case"OO":case"OOO":return"GMT"+Gf(o,":");default:return"GMT"+Yf(o,":")}},z:function(t,e,i,n){var o=(n._originalDate||t).getTimezoneOffset();switch(e){case"z":case"zz":case"zzz":return"GMT"+Gf(o,":");default:return"GMT"+Yf(o,":")}},t:function(t,e,i,n){var o=n._originalDate||t;return kf(Math.floor(o.getTime()/1e3),e.length)},T:function(t,e,i,n){return kf((n._originalDate||t).getTime(),e.length)}};function Gf(t,e){var i=t>0?"-":"+",n=Math.abs(t),o=Math.floor(n/60),r=n%60;if(0===r)return i+String(o);var s=e||"";return i+String(o)+s+kf(r,2)}function qf(t,e){return t%60==0?(t>0?"-":"+")+kf(Math.abs(t)/60,2):Yf(t,e)}function Yf(t,e){var i=e||"",n=t>0?"-":"+",o=Math.abs(t);return n+kf(Math.floor(o/60),2)+i+kf(o%60,2)}var $f=function(t,e){switch(t){case"P":return e.date({width:"short"});case"PP":return e.date({width:"medium"});case"PPP":return e.date({width:"long"});default:return e.date({width:"full"})}},Wf=function(t,e){switch(t){case"p":return e.time({width:"short"});case"pp":return e.time({width:"medium"});case"ppp":return e.time({width:"long"});default:return e.time({width:"full"})}},Vf={p:Wf,P:function(t,e){var i,n=t.match(/(P+)(p+)?/)||[],o=n[1],r=n[2];if(!r)return $f(t,e);switch(o){case"P":i=e.dateTime({width:"short"});break;case"PP":i=e.dateTime({width:"medium"});break;case"PPP":i=e.dateTime({width:"long"});break;default:i=e.dateTime({width:"full"})}return i.replace("{{date}}",$f(o,e)).replace("{{time}}",Wf(r,e))}},Jf=["D","DD"],Kf=["YY","YYYY"];function Zf(t){return-1!==Jf.indexOf(t)}function Xf(t){return-1!==Kf.indexOf(t)}function tv(t,e,i){if("YYYY"===t)throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(e,"`) for formatting years to the input `").concat(i,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("YY"===t)throw new RangeError("Use `yy` instead of `YY` (in `".concat(e,"`) for formatting years to the input `").concat(i,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("D"===t)throw new RangeError("Use `d` instead of `D` (in `".concat(e,"`) for formatting days of the month to the input `").concat(i,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("DD"===t)throw new RangeError("Use `dd` instead of `DD` (in `".concat(e,"`) for formatting days of the month to the input `").concat(i,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"))}var ev={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}};function iv(t){return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=e.width?String(e.width):t.defaultWidth,n=t.formats[i]||t.formats[t.defaultWidth];return n}}var nv={date:iv({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:iv({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:iv({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},ov={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"};function rv(t){return function(e,i){var n;if("formatting"===(null!=i&&i.context?String(i.context):"standalone")&&t.formattingValues){var o=t.defaultFormattingWidth||t.defaultWidth,r=null!=i&&i.width?String(i.width):o;n=t.formattingValues[r]||t.formattingValues[o]}else{var s=t.defaultWidth,a=null!=i&&i.width?String(i.width):t.defaultWidth;n=t.values[a]||t.values[s]}return n[t.argumentCallback?t.argumentCallback(e):e]}}var sv={ordinalNumber:function(t,e){var i=Number(t),n=i%100;if(n>20||n<10)switch(n%10){case 1:return i+"st";case 2:return i+"nd";case 3:return i+"rd"}return i+"th"},era:rv({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:rv({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},defaultWidth:"wide",argumentCallback:function(t){return t-1}}),month:rv({values:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},defaultWidth:"wide"}),day:rv({values:{narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},defaultWidth:"wide"}),dayPeriod:rv({values:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},defaultWidth:"wide",formattingValues:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},defaultFormattingWidth:"wide"})};function av(t){return function(e){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=i.width,o=n&&t.matchPatterns[n]||t.matchPatterns[t.defaultMatchWidth],r=e.match(o);if(!r)return null;var s,a=r[0],l=n&&t.parsePatterns[n]||t.parsePatterns[t.defaultParseWidth],d=Array.isArray(l)?dv(l,(function(t){return t.test(a)})):lv(l,(function(t){return t.test(a)}));s=t.valueCallback?t.valueCallback(d):d,s=i.valueCallback?i.valueCallback(s):s;var c=e.slice(a.length);return{value:s,rest:c}}}function lv(t,e){for(var i in t)if(t.hasOwnProperty(i)&&e(t[i]))return i}function dv(t,e){for(var i=0;i1&&void 0!==arguments[1]?arguments[1]:{},i=t.match(cv.matchPattern);if(!i)return null;var n=i[0],o=t.match(cv.parsePattern);if(!o)return null;var r=cv.valueCallback?cv.valueCallback(o[0]):o[0];r=e.valueCallback?e.valueCallback(r):r;var s=t.slice(n.length);return{value:r,rest:s}}),era:av({matchPatterns:{narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:"any"}),quarter:av({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:function(t){return t+1}}),month:av({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:av({matchPatterns:{narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},defaultParseWidth:"any"}),dayPeriod:av({matchPatterns:{narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},defaultParseWidth:"any"})},uv={code:"en-US",formatDistance:function(t,e,i){var n,o=ev[t];return n="string"==typeof o?o:1===e?o.one:o.other.replace("{{count}}",e.toString()),null!=i&&i.addSuffix?i.comparison&&i.comparison>0?"in "+n:n+" ago":n},formatLong:nv,formatRelative:function(t,e,i,n){return ov[t]},localize:sv,match:hv,options:{weekStartsOn:0,firstWeekContainsDate:1}},Av=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,pv=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,mv=/^'([^]*?)'?$/,gv=/''/g,fv=/[a-zA-Z]/;function vv(t,e,i){var n,o,r,s,a,l,d,c,h,u,A,p,m,g,f,v,b,y;nf(2,arguments);var _=String(e),w=cf(),C=null!==(n=null!==(o=null==i?void 0:i.locale)&&void 0!==o?o:w.locale)&&void 0!==n?n:uv,I=ef(null!==(r=null!==(s=null!==(a=null!==(l=null==i?void 0:i.firstWeekContainsDate)&&void 0!==l?l:null==i||null===(d=i.locale)||void 0===d||null===(c=d.options)||void 0===c?void 0:c.firstWeekContainsDate)&&void 0!==a?a:w.firstWeekContainsDate)&&void 0!==s?s:null===(h=w.locale)||void 0===h||null===(u=h.options)||void 0===u?void 0:u.firstWeekContainsDate)&&void 0!==r?r:1);if(!(I>=1&&I<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var E=ef(null!==(A=null!==(p=null!==(m=null!==(g=null==i?void 0:i.weekStartsOn)&&void 0!==g?g:null==i||null===(f=i.locale)||void 0===f||null===(v=f.options)||void 0===v?void 0:v.weekStartsOn)&&void 0!==m?m:w.weekStartsOn)&&void 0!==p?p:null===(b=w.locale)||void 0===b||null===(y=b.options)||void 0===y?void 0:y.weekStartsOn)&&void 0!==A?A:0);if(!(E>=0&&E<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!C.localize)throw new RangeError("locale must contain localize property");if(!C.formatLong)throw new RangeError("locale must contain formatLong property");var x=of(t);if(!Af(x))throw new RangeError("Invalid time value");var B=hf(x),k=bf(x,B),S={firstWeekContainsDate:I,weekStartsOn:E,locale:C,_originalDate:x},D=_.match(pv).map((function(t){var e=t[0];return"p"===e||"P"===e?(0,Vf[e])(t,C.formatLong):t})).join("").match(Av).map((function(n){if("''"===n)return"'";var o=n[0];if("'"===o)return bv(n);var r=Hf[o];if(r)return null!=i&&i.useAdditionalWeekYearTokens||!Xf(n)||tv(n,e,String(t)),null!=i&&i.useAdditionalDayOfYearTokens||!Zf(n)||tv(n,e,String(t)),r(k,n,C.localize,S);if(o.match(fv))throw new RangeError("Format string contains an unescaped latin alphabet character `"+o+"`");return n})).join("");return D}function bv(t){var e=t.match(mv);return e?e[1].replace(gv,"'"):t}function yv(t){nf(1,arguments);var e=ef(t);return of(1e3*e)}function _v(t){nf(1,arguments);var e=of(t),i=e.getTime();return i}function wv(t){return nf(1,arguments),Math.floor(_v(t)/1e3)}function Cv(t,e,i){return e in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}class Iv extends class{constructor(){Cv(this,"priority",void 0),Cv(this,"subPriority",0)}validate(t,e){return!0}}{constructor(t,e,i,n,o){super(),this.value=t,this.validateValue=e,this.setValue=i,this.priority=n,o&&(this.subPriority=o)}validate(t,e){return this.validateValue(t,this.value,e)}set(t,e,i){return this.setValue(t,e,this.value,i)}}function Ev(t,e,i){return e in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}class xv{constructor(){Ev(this,"incompatibleTokens",void 0),Ev(this,"priority",void 0),Ev(this,"subPriority",void 0)}run(t,e,i,n){var o=this.parse(t,e,i,n);return o?{setter:new Iv(o.value,this.validate,this.set,this.priority,this.subPriority),rest:o.rest}:null}validate(t,e,i){return!0}}function Bv(t,e,i){return e in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}var kv=/^(1[0-2]|0?\d)/,Sv=/^(3[0-1]|[0-2]?\d)/,Dv=/^(36[0-6]|3[0-5]\d|[0-2]?\d?\d)/,Qv=/^(5[0-3]|[0-4]?\d)/,Mv=/^(2[0-3]|[0-1]?\d)/,Tv=/^(2[0-4]|[0-1]?\d)/,Ov=/^(1[0-1]|0?\d)/,Rv=/^(1[0-2]|0?\d)/,Pv=/^[0-5]?\d/,Nv=/^[0-5]?\d/,Fv=/^\d/,Lv=/^\d{1,2}/,jv=/^\d{1,3}/,zv=/^\d{1,4}/,Uv=/^-?\d+/,Hv=/^-?\d/,Gv=/^-?\d{1,2}/,qv=/^-?\d{1,3}/,Yv=/^-?\d{1,4}/,$v=/^([+-])(\d{2})(\d{2})?|Z/,Wv=/^([+-])(\d{2})(\d{2})|Z/,Vv=/^([+-])(\d{2})(\d{2})((\d{2}))?|Z/,Jv=/^([+-])(\d{2}):(\d{2})|Z/,Kv=/^([+-])(\d{2}):(\d{2})(:(\d{2}))?|Z/;function Zv(t,e){return t?{value:e(t.value),rest:t.rest}:t}function Xv(t,e){var i=e.match(t);return i?{value:parseInt(i[0],10),rest:e.slice(i[0].length)}:null}function tb(t,e){var i=e.match(t);return i?"Z"===i[0]?{value:0,rest:e.slice(1)}:{value:("+"===i[1]?1:-1)*(36e5*(i[2]?parseInt(i[2],10):0)+6e4*(i[3]?parseInt(i[3],10):0)+1e3*(i[5]?parseInt(i[5],10):0)),rest:e.slice(i[0].length)}:null}function eb(t){return Xv(Uv,t)}function ib(t,e){switch(t){case 1:return Xv(Fv,e);case 2:return Xv(Lv,e);case 3:return Xv(jv,e);case 4:return Xv(zv,e);default:return Xv(new RegExp("^\\d{1,"+t+"}"),e)}}function nb(t,e){switch(t){case 1:return Xv(Hv,e);case 2:return Xv(Gv,e);case 3:return Xv(qv,e);case 4:return Xv(Yv,e);default:return Xv(new RegExp("^-?\\d{1,"+t+"}"),e)}}function ob(t){switch(t){case"morning":return 4;case"evening":return 17;case"pm":case"noon":case"afternoon":return 12;default:return 0}}function rb(t,e){var i,n=e>0,o=n?e:1-e;if(o<=50)i=t||100;else{var r=o+50;i=t+100*Math.floor(r/100)-(t>=r%100?100:0)}return n?i:1-i}function sb(t){return t%400==0||t%4==0&&t%100!=0}function ab(t,e,i){return e in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}function lb(t,e,i){return e in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}function db(t,e,i){return e in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}function cb(t,e,i){return e in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}function hb(t,e,i){return e in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}function ub(t,e,i){return e in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}function Ab(t,e,i){return e in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}function pb(t,e,i){return e in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}function mb(t,e,i){return e in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}function gb(t,e,i){return e in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}function fb(t,e,i){return e in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}var vb=[31,28,31,30,31,30,31,31,30,31,30,31],bb=[31,29,31,30,31,30,31,31,30,31,30,31];function yb(t,e,i){return e in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}function _b(t,e,i){var n,o,r,s,a,l,d,c;nf(2,arguments);var h=cf(),u=ef(null!==(n=null!==(o=null!==(r=null!==(s=null==i?void 0:i.weekStartsOn)&&void 0!==s?s:null==i||null===(a=i.locale)||void 0===a||null===(l=a.options)||void 0===l?void 0:l.weekStartsOn)&&void 0!==r?r:h.weekStartsOn)&&void 0!==o?o:null===(d=h.locale)||void 0===d||null===(c=d.options)||void 0===c?void 0:c.weekStartsOn)&&void 0!==n?n:0);if(!(u>=0&&u<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var A=of(t),p=ef(e),m=A.getUTCDay(),g=p%7,f=(g+7)%7,v=(f0}set(t,e,i){var n=t.getUTCFullYear();if(i.isTwoDigitYear){var o=rb(i.year,n);return t.setUTCFullYear(o,0,1),t.setUTCHours(0,0,0,0),t}var r="era"in e&&1!==e.era?1-i.year:i.year;return t.setUTCFullYear(r,0,1),t.setUTCHours(0,0,0,0),t}},new class extends xv{constructor(){super(...arguments),lb(this,"priority",130),lb(this,"incompatibleTokens",["y","R","u","Q","q","M","L","I","d","D","i","t","T"])}parse(t,e,i){var n=function(t){return{year:t,isTwoDigitYear:"YY"===e}};switch(e){case"Y":return Zv(ib(4,t),n);case"Yo":return Zv(i.ordinalNumber(t,{unit:"year"}),n);default:return Zv(ib(e.length,t),n)}}validate(t,e){return e.isTwoDigitYear||e.year>0}set(t,e,i,n){var o=Ef(t,n);if(i.isTwoDigitYear){var r=rb(i.year,o);return t.setUTCFullYear(r,0,n.firstWeekContainsDate),t.setUTCHours(0,0,0,0),If(t,n)}var s="era"in e&&1!==e.era?1-i.year:i.year;return t.setUTCFullYear(s,0,n.firstWeekContainsDate),t.setUTCHours(0,0,0,0),If(t,n)}},new class extends xv{constructor(){super(...arguments),db(this,"priority",130),db(this,"incompatibleTokens",["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"])}parse(t,e){return nb("R"===e?4:e.length,t)}set(t,e,i){var n=new Date(0);return n.setUTCFullYear(i,0,4),n.setUTCHours(0,0,0,0),yf(n)}},new class extends xv{constructor(){super(...arguments),cb(this,"priority",130),cb(this,"incompatibleTokens",["G","y","Y","R","w","I","i","e","c","t","T"])}parse(t,e){return nb("u"===e?4:e.length,t)}set(t,e,i){return t.setUTCFullYear(i,0,1),t.setUTCHours(0,0,0,0),t}},new class extends xv{constructor(){super(...arguments),hb(this,"priority",120),hb(this,"incompatibleTokens",["Y","R","q","M","L","w","I","d","D","i","e","c","t","T"])}parse(t,e,i){switch(e){case"Q":case"QQ":return ib(e.length,t);case"Qo":return i.ordinalNumber(t,{unit:"quarter"});case"QQQ":return i.quarter(t,{width:"abbreviated",context:"formatting"})||i.quarter(t,{width:"narrow",context:"formatting"});case"QQQQQ":return i.quarter(t,{width:"narrow",context:"formatting"});default:return i.quarter(t,{width:"wide",context:"formatting"})||i.quarter(t,{width:"abbreviated",context:"formatting"})||i.quarter(t,{width:"narrow",context:"formatting"})}}validate(t,e){return e>=1&&e<=4}set(t,e,i){return t.setUTCMonth(3*(i-1),1),t.setUTCHours(0,0,0,0),t}},new class extends xv{constructor(){super(...arguments),ub(this,"priority",120),ub(this,"incompatibleTokens",["Y","R","Q","M","L","w","I","d","D","i","e","c","t","T"])}parse(t,e,i){switch(e){case"q":case"qq":return ib(e.length,t);case"qo":return i.ordinalNumber(t,{unit:"quarter"});case"qqq":return i.quarter(t,{width:"abbreviated",context:"standalone"})||i.quarter(t,{width:"narrow",context:"standalone"});case"qqqqq":return i.quarter(t,{width:"narrow",context:"standalone"});default:return i.quarter(t,{width:"wide",context:"standalone"})||i.quarter(t,{width:"abbreviated",context:"standalone"})||i.quarter(t,{width:"narrow",context:"standalone"})}}validate(t,e){return e>=1&&e<=4}set(t,e,i){return t.setUTCMonth(3*(i-1),1),t.setUTCHours(0,0,0,0),t}},new class extends xv{constructor(){super(...arguments),Ab(this,"incompatibleTokens",["Y","R","q","Q","L","w","I","D","i","e","c","t","T"]),Ab(this,"priority",110)}parse(t,e,i){var n=function(t){return t-1};switch(e){case"M":return Zv(Xv(kv,t),n);case"MM":return Zv(ib(2,t),n);case"Mo":return Zv(i.ordinalNumber(t,{unit:"month"}),n);case"MMM":return i.month(t,{width:"abbreviated",context:"formatting"})||i.month(t,{width:"narrow",context:"formatting"});case"MMMMM":return i.month(t,{width:"narrow",context:"formatting"});default:return i.month(t,{width:"wide",context:"formatting"})||i.month(t,{width:"abbreviated",context:"formatting"})||i.month(t,{width:"narrow",context:"formatting"})}}validate(t,e){return e>=0&&e<=11}set(t,e,i){return t.setUTCMonth(i,1),t.setUTCHours(0,0,0,0),t}},new class extends xv{constructor(){super(...arguments),pb(this,"priority",110),pb(this,"incompatibleTokens",["Y","R","q","Q","M","w","I","D","i","e","c","t","T"])}parse(t,e,i){var n=function(t){return t-1};switch(e){case"L":return Zv(Xv(kv,t),n);case"LL":return Zv(ib(2,t),n);case"Lo":return Zv(i.ordinalNumber(t,{unit:"month"}),n);case"LLL":return i.month(t,{width:"abbreviated",context:"standalone"})||i.month(t,{width:"narrow",context:"standalone"});case"LLLLL":return i.month(t,{width:"narrow",context:"standalone"});default:return i.month(t,{width:"wide",context:"standalone"})||i.month(t,{width:"abbreviated",context:"standalone"})||i.month(t,{width:"narrow",context:"standalone"})}}validate(t,e){return e>=0&&e<=11}set(t,e,i){return t.setUTCMonth(i,1),t.setUTCHours(0,0,0,0),t}},new class extends xv{constructor(){super(...arguments),mb(this,"priority",100),mb(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","i","t","T"])}parse(t,e,i){switch(e){case"w":return Xv(Qv,t);case"wo":return i.ordinalNumber(t,{unit:"week"});default:return ib(e.length,t)}}validate(t,e){return e>=1&&e<=53}set(t,e,i,n){return If(function(t,e,i){nf(2,arguments);var n=of(t),o=ef(e),r=Bf(n,i)-o;return n.setUTCDate(n.getUTCDate()-7*r),n}(t,i,n),n)}},new class extends xv{constructor(){super(...arguments),gb(this,"priority",100),gb(this,"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"])}parse(t,e,i){switch(e){case"I":return Xv(Qv,t);case"Io":return i.ordinalNumber(t,{unit:"week"});default:return ib(e.length,t)}}validate(t,e){return e>=1&&e<=53}set(t,e,i){return yf(function(t,e){nf(2,arguments);var i=of(t),n=ef(e),o=Cf(i)-n;return i.setUTCDate(i.getUTCDate()-7*o),i}(t,i))}},new class extends xv{constructor(){super(...arguments),fb(this,"priority",90),fb(this,"subPriority",1),fb(this,"incompatibleTokens",["Y","R","q","Q","w","I","D","i","e","c","t","T"])}parse(t,e,i){switch(e){case"d":return Xv(Sv,t);case"do":return i.ordinalNumber(t,{unit:"date"});default:return ib(e.length,t)}}validate(t,e){var i=sb(t.getUTCFullYear()),n=t.getUTCMonth();return i?e>=1&&e<=bb[n]:e>=1&&e<=vb[n]}set(t,e,i){return t.setUTCDate(i),t.setUTCHours(0,0,0,0),t}},new class extends xv{constructor(){super(...arguments),yb(this,"priority",90),yb(this,"subpriority",1),yb(this,"incompatibleTokens",["Y","R","q","Q","M","L","w","I","d","E","i","e","c","t","T"])}parse(t,e,i){switch(e){case"D":case"DD":return Xv(Dv,t);case"Do":return i.ordinalNumber(t,{unit:"date"});default:return ib(e.length,t)}}validate(t,e){return sb(t.getUTCFullYear())?e>=1&&e<=366:e>=1&&e<=365}set(t,e,i){return t.setUTCMonth(0,i),t.setUTCHours(0,0,0,0),t}},new class extends xv{constructor(){super(...arguments),wb(this,"priority",90),wb(this,"incompatibleTokens",["D","i","e","c","t","T"])}parse(t,e,i){switch(e){case"E":case"EE":case"EEE":return i.day(t,{width:"abbreviated",context:"formatting"})||i.day(t,{width:"short",context:"formatting"})||i.day(t,{width:"narrow",context:"formatting"});case"EEEEE":return i.day(t,{width:"narrow",context:"formatting"});case"EEEEEE":return i.day(t,{width:"short",context:"formatting"})||i.day(t,{width:"narrow",context:"formatting"});default:return i.day(t,{width:"wide",context:"formatting"})||i.day(t,{width:"abbreviated",context:"formatting"})||i.day(t,{width:"short",context:"formatting"})||i.day(t,{width:"narrow",context:"formatting"})}}validate(t,e){return e>=0&&e<=6}set(t,e,i,n){return(t=_b(t,i,n)).setUTCHours(0,0,0,0),t}},new class extends xv{constructor(){super(...arguments),Cb(this,"priority",90),Cb(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","c","t","T"])}parse(t,e,i,n){var o=function(t){var e=7*Math.floor((t-1)/7);return(t+n.weekStartsOn+6)%7+e};switch(e){case"e":case"ee":return Zv(ib(e.length,t),o);case"eo":return Zv(i.ordinalNumber(t,{unit:"day"}),o);case"eee":return i.day(t,{width:"abbreviated",context:"formatting"})||i.day(t,{width:"short",context:"formatting"})||i.day(t,{width:"narrow",context:"formatting"});case"eeeee":return i.day(t,{width:"narrow",context:"formatting"});case"eeeeee":return i.day(t,{width:"short",context:"formatting"})||i.day(t,{width:"narrow",context:"formatting"});default:return i.day(t,{width:"wide",context:"formatting"})||i.day(t,{width:"abbreviated",context:"formatting"})||i.day(t,{width:"short",context:"formatting"})||i.day(t,{width:"narrow",context:"formatting"})}}validate(t,e){return e>=0&&e<=6}set(t,e,i,n){return(t=_b(t,i,n)).setUTCHours(0,0,0,0),t}},new class extends xv{constructor(){super(...arguments),Ib(this,"priority",90),Ib(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","e","t","T"])}parse(t,e,i,n){var o=function(t){var e=7*Math.floor((t-1)/7);return(t+n.weekStartsOn+6)%7+e};switch(e){case"c":case"cc":return Zv(ib(e.length,t),o);case"co":return Zv(i.ordinalNumber(t,{unit:"day"}),o);case"ccc":return i.day(t,{width:"abbreviated",context:"standalone"})||i.day(t,{width:"short",context:"standalone"})||i.day(t,{width:"narrow",context:"standalone"});case"ccccc":return i.day(t,{width:"narrow",context:"standalone"});case"cccccc":return i.day(t,{width:"short",context:"standalone"})||i.day(t,{width:"narrow",context:"standalone"});default:return i.day(t,{width:"wide",context:"standalone"})||i.day(t,{width:"abbreviated",context:"standalone"})||i.day(t,{width:"short",context:"standalone"})||i.day(t,{width:"narrow",context:"standalone"})}}validate(t,e){return e>=0&&e<=6}set(t,e,i,n){return(t=_b(t,i,n)).setUTCHours(0,0,0,0),t}},new class extends xv{constructor(){super(...arguments),Eb(this,"priority",90),Eb(this,"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","E","e","c","t","T"])}parse(t,e,i){var n=function(t){return 0===t?7:t};switch(e){case"i":case"ii":return ib(e.length,t);case"io":return i.ordinalNumber(t,{unit:"day"});case"iii":return Zv(i.day(t,{width:"abbreviated",context:"formatting"})||i.day(t,{width:"short",context:"formatting"})||i.day(t,{width:"narrow",context:"formatting"}),n);case"iiiii":return Zv(i.day(t,{width:"narrow",context:"formatting"}),n);case"iiiiii":return Zv(i.day(t,{width:"short",context:"formatting"})||i.day(t,{width:"narrow",context:"formatting"}),n);default:return Zv(i.day(t,{width:"wide",context:"formatting"})||i.day(t,{width:"abbreviated",context:"formatting"})||i.day(t,{width:"short",context:"formatting"})||i.day(t,{width:"narrow",context:"formatting"}),n)}}validate(t,e){return e>=1&&e<=7}set(t,e,i){return t=function(t,e){nf(2,arguments);var i=ef(e);i%7==0&&(i-=7);var n=1,o=of(t),r=o.getUTCDay(),s=((i%7+7)%7=1&&e<=12}set(t,e,i){var n=t.getUTCHours()>=12;return n&&i<12?t.setUTCHours(i+12,0,0,0):n||12!==i?t.setUTCHours(i,0,0,0):t.setUTCHours(0,0,0,0),t}},new class extends xv{constructor(){super(...arguments),Db(this,"priority",70),Db(this,"incompatibleTokens",["a","b","h","K","k","t","T"])}parse(t,e,i){switch(e){case"H":return Xv(Mv,t);case"Ho":return i.ordinalNumber(t,{unit:"hour"});default:return ib(e.length,t)}}validate(t,e){return e>=0&&e<=23}set(t,e,i){return t.setUTCHours(i,0,0,0),t}},new class extends xv{constructor(){super(...arguments),Qb(this,"priority",70),Qb(this,"incompatibleTokens",["h","H","k","t","T"])}parse(t,e,i){switch(e){case"K":return Xv(Ov,t);case"Ko":return i.ordinalNumber(t,{unit:"hour"});default:return ib(e.length,t)}}validate(t,e){return e>=0&&e<=11}set(t,e,i){return t.getUTCHours()>=12&&i<12?t.setUTCHours(i+12,0,0,0):t.setUTCHours(i,0,0,0),t}},new class extends xv{constructor(){super(...arguments),Mb(this,"priority",70),Mb(this,"incompatibleTokens",["a","b","h","H","K","t","T"])}parse(t,e,i){switch(e){case"k":return Xv(Tv,t);case"ko":return i.ordinalNumber(t,{unit:"hour"});default:return ib(e.length,t)}}validate(t,e){return e>=1&&e<=24}set(t,e,i){var n=i<=24?i%24:i;return t.setUTCHours(n,0,0,0),t}},new class extends xv{constructor(){super(...arguments),Tb(this,"priority",60),Tb(this,"incompatibleTokens",["t","T"])}parse(t,e,i){switch(e){case"m":return Xv(Pv,t);case"mo":return i.ordinalNumber(t,{unit:"minute"});default:return ib(e.length,t)}}validate(t,e){return e>=0&&e<=59}set(t,e,i){return t.setUTCMinutes(i,0,0),t}},new class extends xv{constructor(){super(...arguments),Ob(this,"priority",50),Ob(this,"incompatibleTokens",["t","T"])}parse(t,e,i){switch(e){case"s":return Xv(Nv,t);case"so":return i.ordinalNumber(t,{unit:"second"});default:return ib(e.length,t)}}validate(t,e){return e>=0&&e<=59}set(t,e,i){return t.setUTCSeconds(i,0),t}},new class extends xv{constructor(){super(...arguments),Rb(this,"priority",30),Rb(this,"incompatibleTokens",["t","T"])}parse(t,e){return Zv(ib(e.length,t),(function(t){return Math.floor(t*Math.pow(10,3-e.length))}))}set(t,e,i){return t.setUTCMilliseconds(i),t}},new class extends xv{constructor(){super(...arguments),Pb(this,"priority",10),Pb(this,"incompatibleTokens",["t","T","x"])}parse(t,e){switch(e){case"X":return tb($v,t);case"XX":return tb(Wv,t);case"XXXX":return tb(Vv,t);case"XXXXX":return tb(Kv,t);default:return tb(Jv,t)}}set(t,e,i){return e.timestampIsSet?t:new Date(t.getTime()-i)}},new class extends xv{constructor(){super(...arguments),Nb(this,"priority",10),Nb(this,"incompatibleTokens",["t","T","X"])}parse(t,e){switch(e){case"x":return tb($v,t);case"xx":return tb(Wv,t);case"xxxx":return tb(Vv,t);case"xxxxx":return tb(Kv,t);default:return tb(Jv,t)}}set(t,e,i){return e.timestampIsSet?t:new Date(t.getTime()-i)}},new class extends xv{constructor(){super(...arguments),Fb(this,"priority",40),Fb(this,"incompatibleTokens","*")}parse(t){return eb(t)}set(t,e,i){return[new Date(1e3*i),{timestampIsSet:!0}]}},new class extends xv{constructor(){super(...arguments),Lb(this,"priority",20),Lb(this,"incompatibleTokens","*")}parse(t){return eb(t)}set(t,e,i){return[new Date(i),{timestampIsSet:!0}]}};const Gb=(t,e)=>{var i;return 0!=((null!==(i=t.attributes.supported_features)&&void 0!==i?i:0)&e)},qb=t=>(t=>Gb(t,4)&&"number"==typeof t.attributes.in_progress)(t)||!!t.attributes.in_progress,Yb={apparent_power:"mdi:flash",aqi:"mdi:air-filter",carbon_dioxide:"mdi:molecule-co2",carbon_monoxide:"mdi:molecule-co",current:"mdi:current-ac",date:"mdi:calendar",energy:"mdi:lightning-bolt",frequency:"mdi:sine-wave",gas:"mdi:gas-cylinder",humidity:"mdi:water-percent",illuminance:"mdi:brightness-5",monetary:"mdi:cash",nitrogen_dioxide:"mdi:molecule",nitrogen_monoxide:"mdi:molecule",nitrous_oxide:"mdi:molecule",ozone:"mdi:molecule",pm1:"mdi:molecule",pm10:"mdi:molecule",pm25:"mdi:molecule",power:"mdi:flash",power_factor:"mdi:angle-acute",pressure:"mdi:gauge",reactive_power:"mdi:flash",signal_strength:"mdi:wifi",sulphur_dioxide:"mdi:molecule",temperature:"mdi:thermometer",timestamp:"mdi:clock",volatile_organic_compounds:"mdi:molecule",voltage:"mdi:sine-wave"},$b={10:"mdi:battery-10",20:"mdi:battery-20",30:"mdi:battery-30",40:"mdi:battery-40",50:"mdi:battery-50",60:"mdi:battery-60",70:"mdi:battery-70",80:"mdi:battery-80",90:"mdi:battery-90",100:"mdi:battery"},Wb={10:"mdi:battery-charging-10",20:"mdi:battery-charging-20",30:"mdi:battery-charging-30",40:"mdi:battery-charging-40",50:"mdi:battery-charging-50",60:"mdi:battery-charging-60",70:"mdi:battery-charging-70",80:"mdi:battery-charging-80",90:"mdi:battery-charging-90",100:"mdi:battery-charging"},Vb=(t,e)=>{const i=Number(t);if(isNaN(i))return"off"===t?"mdi:battery":"on"===t?"mdi:battery-alert":"mdi:battery-unknown";const n=10*Math.round(i/10);return e&&i>=10?Wb[n]:e?"mdi:battery-charging-outline":i<=5?"mdi:battery-alert-variant-outline":$b[n]},Jb=t=>{const e=null==t?void 0:t.attributes.device_class;if(e&&e in Yb)return Yb[e];if("battery"===e)return t?((t,e)=>{const i=t.state,n="on"===(null==e?void 0:e.state);return Vb(i,n)})(t):"mdi:battery";const i=null==t?void 0:t.attributes.unit_of_measurement;return"°C"===i||"°F"===i?"mdi:thermometer":void 0},Kb={alert:"mdi:alert",air_quality:"mdi:air-filter",automation:"mdi:robot",calendar:"mdi:calendar",camera:"mdi:video",climate:"mdi:thermostat",configurator:"mdi:cog",conversation:"mdi:text-to-speech",counter:"mdi:counter",fan:"mdi:fan",google_assistant:"mdi:google-assistant",group:"mdi:google-circles-communities",homeassistant:"mdi:home-assistant",homekit:"mdi:home-automation",image_processing:"mdi:image-filter-frames",input_button:"mdi:gesture-tap-button",input_datetime:"mdi:calendar-clock",input_number:"mdi:ray-vertex",input_select:"mdi:format-list-bulleted",input_text:"mdi:form-textbox",light:"mdi:lightbulb",mailbox:"mdi:mailbox",notify:"mdi:comment-alert",number:"mdi:ray-vertex",persistent_notification:"mdi:bell",person:"mdi:account",plant:"mdi:flower",proximity:"mdi:apple-safari",remote:"mdi:remote",scene:"mdi:palette",script:"mdi:script-text",select:"mdi:format-list-bulleted",sensor:"mdi:eye",siren:"mdi:bullhorn",simple_alarm:"mdi:bell",sun:"mdi:white-balance-sunny",timer:"mdi:timer-outline",updater:"mdi:cloud-upload",vacuum:"mdi:robot-vacuum",water_heater:"mdi:thermometer",weather:"mdi:weather-cloudy",zone:"mdi:map-marker-radius"};function Zb(t,e,i){switch(t){case"alarm_control_panel":return(t=>{switch(t){case"armed_away":return"mdi:shield-lock";case"armed_vacation":return"mdi:shield-airplane";case"armed_home":return"mdi:shield-home";case"armed_night":return"mdi:shield-moon";case"armed_custom_bypass":return"mdi:security";case"pending":case"arming":return"mdi:shield-sync";case"triggered":return"mdi:bell-ring";case"disarmed":return"mdi:shield-off";default:return"mdi:shield"}})(i);case"binary_sensor":return((t,e)=>{const i="off"===t;switch(null==e?void 0:e.attributes.device_class){case"battery":return i?"mdi:battery":"mdi:battery-outline";case"battery_charging":return i?"mdi:battery":"mdi:battery-charging";case"cold":return i?"mdi:thermometer":"mdi:snowflake";case"connectivity":return i?"mdi:close-network-outline":"mdi:check-network-outline";case"door":return i?"mdi:door-closed":"mdi:door-open";case"garage_door":return i?"mdi:garage":"mdi:garage-open";case"power":case"plug":return i?"mdi:power-plug-off":"mdi:power-plug";case"gas":case"problem":case"safety":case"tamper":return i?"mdi:check-circle":"mdi:alert-circle";case"smoke":return i?"mdi:check-circle":"mdi:smoke";case"heat":return i?"mdi:thermometer":"mdi:fire";case"light":return i?"mdi:brightness5":"mdi:brightness-7";case"lock":return i?"mdi:lock":"mdi:lock-open";case"moisture":return i?"mdi:water-off":"mdi:water";case"motion":return i?"mdi:motion-sensor-off":"mdi:motion-sensor";case"occupancy":case"presence":return i?"mdi:home-outline":"mdi:home";case"opening":return i?"mdi:square":"mdi:square-outline";case"running":return i?"mdi:stop":"mdi:play";case"sound":return i?"mdi:music-note-off":"mdi:music-note";case"update":return i?"mdi:package":"mdi:package-up";case"vibration":return i?"mdi:crop-portrait":"mdi:vibrate";case"window":return i?"mdi:window-closed":"mdi:window-open";default:return i?"mdi:radiobox-blank":"mdi:checkbox-marked-circle"}})(i,e);case"button":switch(null==e?void 0:e.attributes.device_class){case"restart":return"mdi:restart";case"update":return"mdi:package-up";default:return"mdi:gesture-tap-button"}case"cover":return((t,e)=>{const i="closed"!==t;switch(null==e?void 0:e.attributes.device_class){case"garage":switch(t){case"opening":return"mdi:arrow-up-box";case"closing":return"mdi:arrow-down-box";case"closed":return"mdi:garage";default:return"mdi:garage-open"}case"gate":switch(t){case"opening":case"closing":return"mdi:gate-arrow-right";case"closed":return"mdi:gate";default:return"mdi:gate-open"}case"door":return i?"mdi:door-open":"mdi:door-closed";case"damper":return i?"md:circle":"mdi:circle-slice-8";case"shutter":switch(t){case"opening":return"mdi:arrow-up-box";case"closing":return"mdi:arrow-down-box";case"closed":return"mdi:window-shutter";default:return"mdi:window-shutter-open"}case"curtain":switch(t){case"opening":return"mdi:arrow-split-vertical";case"closing":return"mdi:arrow-collapse-horizontal";case"closed":return"mdi:curtains-closed";default:return"mdi:curtains"}case"blind":case"shade":switch(t){case"opening":return"mdi:arrow-up-box";case"closing":return"mdi:arrow-down-box";case"closed":return"mdi:blinds";default:return"mdi:blinds-open"}case"window":switch(t){case"opening":return"mdi:arrow-up-box";case"closing":return"mdi:arrow-down-box";case"closed":return"mdi:window-closed";default:return"mdi:window-open"}}switch(t){case"opening":return"mdi:arrow-up-box";case"closing":return"mdi:arrow-down-box";case"closed":return"mdi:window-closed";default:return"mdi:window-open"}})(i,e);case"device_tracker":return"router"===(null==e?void 0:e.attributes.source_type)?"home"===i?"mdi:lan-connect":"mdi:lan-disconnect":["bluetooth","bluetooth_le"].includes(null==e?void 0:e.attributes.source_type)?"home"===i?"mdi:bluetooth-connect":"mdi:bluetooth":"not_home"===i?"mdi:account-arrow-right":"mdi:account";case"humidifier":return i&&"off"===i?"mdi:air-humidifier-off":"mdi:air-humidifier";case"input_boolean":return"on"===i?"mdi:check-circle-outline":"mdi:close-circle-outline";case"lock":switch(i){case"unlocked":return"mdi:lock-open";case"jammed":return"mdi:lock-alert";case"locking":case"unlocking":return"mdi:lock-clock";default:return"mdi:lock"}case"media_player":return"playing"===i?"mdi:cast-connected":"mdi:cast";case"switch":switch(null==e?void 0:e.attributes.device_class){case"outlet":return"on"===i?"mdi:power-plug":"mdi:power-plug-off";case"switch":return"on"===i?"mdi:toggle-switch":"mdi:toggle-switch-off";default:return"mdi:flash"}case"zwave":switch(i){case"dead":return"mdi:emoticon-dead";case"sleeping":return"mdi:sleep";case"initializing":return"mdi:timer-sand";default:return"mdi:z-wave"}case"sensor":{const t=Jb(e);if(t)return t;break}case"input_datetime":if(!(null==e?void 0:e.attributes.has_date))return"mdi:clock";if(!e.attributes.has_time)return"mdi:calendar";break;case"sun":return"above_horizon"===(null==e?void 0:e.state)?Kb[t]:"mdi:weather-night";case"update":return"on"===(null==e?void 0:e.state)?qb(e)?"mdi:package-down":"mdi:package-up":"mdi:package"}return t in Kb?Kb[t]:(console.warn(`Unable to find icon for domain ${t}`),"mdi:bookmark")}function Xb(t){if(!t)return"mdi:bookmark";if(t.attributes.icon)return t.attributes.icon;return Zb(l(t.entity_id),t,t.state)}async function ty(t,e,i,n=!1){let o;try{o=await t.callWS(i)}catch(t){if(!(t instanceof Error))throw new fp(Sg("error.failed_response"),{request:i,response:t});throw t}if(!o)throw new fp(Sg("error.empty_response"),{request:i});const r=n?e.safeParse(JSON.parse(o)):e.safeParse(o);if(!r.success)throw new fp(Sg("error.invalid_response"),{request:i,response:o,invalid_keys:hp(r.error)});return r.data}async function ey(t,e,i){const n={type:"auth/sign_path",path:e,expires:i},o=await ty(t,jm,n);return o?t.hassUrl(o.path):null}function iy(t,e,i,n){if(!t||!i||!i.length)return[];const o=[];for(const r of i){const i=null==e?void 0:e.states[r],s=t.states[r];if(((null==n?void 0:n.stateOnly)&&(null==i?void 0:i.state)!==(null==s?void 0:s.state)||!(null==n?void 0:n.stateOnly)&&i!==s)&&(o.push({entity:r,oldState:i,newState:s}),null==n?void 0:n.firstOnly))break}return o}function ny(t,e,i,n){return!!iy(t,e,i,Object.assign(Object.assign({},n),{firstOnly:!0})).length}function oy(t){if("off"===t.state||!t.attributes.brightness)return"";return`brightness(${(t.attributes.brightness+245)/5}%)`}function ry(t){return"off"===t.state?"":t.attributes.rgb_color?`rgb(${t.attributes.rgb_color.join(",")})`:""}function sy(t,e){var i,n,o;if(!e.entity)return e;const r=t.states[e.entity];r&&e.state_color&&(e.style=Object.assign(Object.assign({},function(t){return{color:ry(t),filter:oy(t)}}(r)),e.style)),e.title=null!==(i=e.title)&&void 0!==i?i:(null===(n=null==r?void 0:r.attributes)||void 0===n?void 0:n.friendly_name)||e.entity,e.icon=null!==(o=e.icon)&&void 0!==o?o:Xb(r);const s=r?function(t){return l(t.entity_id)}(r):void 0;return e.data_domain=e.state_color||"light"===s&&!1!==e.state_color?s:void 0,r&&(e.data_state=(t=>{const e=t.entity_id.split(".")[0];let i=t.state;return"climate"===e&&(i=t.attributes.hvac_action),i})(r)),e}function ay(t,e){var i,n;return e?null===(n=null===(i=null==t?void 0:t.states[e])||void 0===i?void 0:i.attributes)||void 0===n?void 0:n.friendly_name:void 0}function ly(t,e){return Xb(e?null==t?void 0:t.states[e]:null)}const dy=async()=>{if(["ha-selector","ha-menu-button","ha-camera-stream","ha-hls-player","ha-web-rtc-player","ha-icon","ha-circular-progress","ha-icon-button","ha-card","ha-svg-icon","ha-button-menu"].every((t=>customElements.get(t))))return!0;const t=await window.loadCardHelpers(),e=await t.createCardElement({type:"picture-glance",entities:[],camera_image:"dummy-to-load-editor-components"});return!!e.constructor.getConfigElement&&(await e.constructor.getConfigElement(),!0)},cy=t=>!!t&&["on","open"].includes(t.state);function hy(t){return"string"==typeof(null==t?void 0:t.id)&&t.id||"string"==typeof(null==t?void 0:t.camera_entity)&&t.camera_entity||"object"==typeof(null==t?void 0:t.webrtc_card)&&t.webrtc_card&&"string"==typeof t.webrtc_card.entity&&t.webrtc_card.entity||"object"==typeof(null==t?void 0:t.frigate)&&t.frigate&&"string"==typeof(null==t?void 0:t.frigate.camera_name)&&t.frigate.camera_name||""}function uy(t,e){return"string"==typeof(null==e?void 0:e.title)&&e.title||("string"==typeof(null==e?void 0:e.camera_entity)?ay(t,e.camera_entity):"")||"object"==typeof(null==e?void 0:e.webrtc_card)&&e.webrtc_card&&"string"==typeof e.webrtc_card.entity&&e.webrtc_card.entity||("object"==typeof(null==e?void 0:e.frigate)&&e.frigate&&"string"==typeof(null==e?void 0:e.frigate.camera_name)&&e.frigate.camera_name?Qg(e.frigate.camera_name):"")||"string"==typeof(null==e?void 0:e.id)&&e.id||""}function Ay(t,e){return(null==e?void 0:e.icon)||ly(t,null==e?void 0:e.camera_entity)||"mdi:video"}const py=t=>{var e,i,n;return null!==(n=null===(i=null===(e=t.frigate)||void 0===e?void 0:e.event)||void 0===i?void 0:i.start_time)&&void 0!==n?n:null},my=t=>!!t&&!t.can_expand,gy=t=>{if(!t||!t.children)return null;const e=t.children.findIndex((t=>my(t)));return e>=0?e:null},fy=async(t,e)=>{const i={type:"media_source/browse_media",media_content_id:e};return await ty(t,Fm,i)},vy=async(t,e)=>{e=Array.isArray(e)?e:[e];const i=new Map;return await Promise.all(e.map((async e=>{i.set(e,await(async(t,e)=>fy(t,["media-source://frigate",e.clientId,"event-search",e.mediaType,e.unlimited?".all":"",e.after?String(Math.floor(e.after)):"",e.before?String(Math.ceil(e.before)):"",e.cameraName,e.label,e.zone].join("/")))(t,e))}))),i},by=async(t,e)=>yy(await vy(t,e)),yy=async t=>{const e=[];for(const[i,n]of t.entries())for(const o of n.children||[])my(o)?e.push(o):i.title&&t.size>1?e.push(Object.assign(Object.assign({},o),{title:`[${i.title}] ${o.title}`})):e.push(o);return xy("Merged events",e.sort(((t,e)=>{var i,n,o,r;return!(null===(i=t.frigate)||void 0===i?void 0:i.event)||(null===(n=e.frigate)||void 0===n?void 0:n.event)&&e.frigate.event.start_time>t.frigate.event.start_time?1:!(null===(o=e.frigate)||void 0===o?void 0:o.event)||(null===(r=t.frigate)||void 0===r?void 0:r.event)&&e.frigate.event.start_timei&&i.frigate.camera_name?Object.assign({clientId:i.frigate.client_id,cameraName:i.frigate.camera_name,label:i.frigate.label,zone:i.frigate.zone,title:uy(t,i),cameraID:e},n):null,wy=(t,e)=>{const i=[];return t.forEach((t=>{i.push(Object.assign(Object.assign({},t),e))})),i},Cy=(t,e,i,n)=>{const o=new Set,r=t=>{const i=e.get(t);if(i){o.add(t);const n=new Set;(i.dependencies.cameras||[]).forEach((t=>n.add(t))),i.dependencies.all_cameras&&e.forEach(((t,e)=>n.add(e)));for(const t of n)o.has(t)||r(t)}};r(i);const s=[];for(const i of o){const o=_y(t,i,e.get(i),n?{mediaType:n}:{});o&&s.push(o)}return s.length?s:null},Iy=(t,e,i,n,o)=>{const r=Cy(e,i,n,o);return r||(Gg(t,Sg("error.no_camera_name"),{context:i.get(n)}),null)},Ey=async(t,e,i,n)=>{let o;try{o=await by(e,n)}catch(e){return qg(t,e)}const r=gy(o);if(!o||!o.children||null==r)return Hg(t,i.isClipRelatedView()?Sg("common.no_clip"):Sg("common.no_snapshot"),"info",{icon:i.isClipRelatedView()?"mdi:filmstrip-off":"mdi:camera-off"});i.evolve({target:o,childIndex:r}).dispatchChangeEvent(t)},xy=(t,e)=>({title:t,media_class:"playlist",media_content_type:"playlist",media_content_id:"",can_play:!1,can_expand:!0,children_media_class:"playlist",thumbnail:null,children:e}),By=(t,e,i)=>{var n;return Object.assign({title:t,media_class:"video",media_content_type:"video",media_content_id:e,can_play:!0,can_expand:!1,thumbnail:null!==(n=null==i?void 0:i.thumbnail)&&void 0!==n?n:null,children:null},(null==i?void 0:i.recording)&&{frigate:{recording:i.recording}})};function ky(t){if(!t.end_time)return Sg("event.in_progress");const e=yv(t.start_time),i=yv(t.end_time),n=function(t,e,i){nf(2,arguments);var n=pf(t,e)/36e5;return gf(null==i?void 0:i.roundingMethod)(n)}(i,e),o=function(t,e,i){nf(2,arguments);var n=pf(t,e)/6e4;return gf(null==i?void 0:i.roundingMethod)(n)}(i,e)-60*n;let r="";return n&&(r+=`${n}h `),o&&(r+=`${o}m `),r+=`${ff(i,e)-60*n*60-60*o}s`,r}var Sy=":host {\n display: flex;\n width: 100%;\n margin-left: 5px;\n padding: 8px;\n color: var(--primary-text-color);\n overflow: hidden;\n column-gap: 5%;\n}\n\ndiv.right,\ndiv.left {\n display: flex;\n flex-direction: column;\n justify-content: center;\n}\n\ndiv.right {\n align-items: center;\n}\n\ndiv.left {\n flex: 1;\n display: flex;\n flex-direction: column;\n flex-wrap: wrap;\n align-content: flex-start;\n justify-content: center;\n overflow: hidden;\n column-gap: 5%;\n}\n\ndiv.left div {\n width: 100%;\n}\n\nspan.heading {\n font-weight: bold;\n}\n\ndiv.larger,\nspan.larger {\n font-size: 1.5rem;\n}";const Dy="m 4.8759466,22.743573 c 0.0866,0.69274 0.811811,1.16359 0.37885,1.27183 -0.43297,0.10824 -2.32718,-3.43665 -2.7601492,-4.95202 -0.4329602,-1.51538 -0.6764993,-3.22017 -0.5682593,-4.19434 0.1082301,-0.97417 5.7097085,-2.48955 5.7097085,-2.89545 0,-0.4059 -1.81304,-0.0271 -1.89422,-0.35178 -0.0812,-0.32472 1.36925,-0.12989 1.75892,-0.64945 0.60885,-0.81181 1.3800713,-0.6765 1.8671505,-1.1094696 0.4870902,-0.4329599 1.0824089,-2.0836399 1.1906589,-2.7871996 0.108241,-0.70357 -1.0824084,-1.51538 -1.4071389,-2.05658 -0.3247195,-0.54121 0.7035702,-0.92005 3.1931099,-1.94834 2.48954,-1.02829 10.39114,-3.30134994 10.49938,-3.03074994 0.10824,0.27061 -2.59779,1.40713994 -4.492,2.11069994 -1.89422,0.70357 -4.97909,2.05658 -4.97909,2.43542 0,0.37885 0.16236,0.67651 0.0541,1.54244 -0.10824,0.86593 -0.12123,1.2702597 -0.32472,1.8400997 -0.1353,0.37884 -0.2706,1.27183 0,2.0836295 0.21648,0.64945 0.92005,1.13653 1.24477,1.24478 0.2706,0.018 1.01746,0.0433 1.8401,0 1.02829,-0.0541 2.48954,0.0541 2.48954,0.32472 0,0.2706 -2.21894,0.10824 -2.21894,0.48708 0,0.37885 2.27306,-0.0541 2.21894,0.32473 -0.0541,0.37884 -1.89422,0.21648 -2.86839,0.21648 -0.77933,0 -1.93031,-0.0361 -2.43542,-0.21648 l -0.10824,0.37884 c -0.18038,0 -0.55744,0.10824 -0.94711,0.10824 -0.48708,0 -0.51414,0.16236 -1.40713,0.16236 -0.892989,0 -0.622391,-0.0541 -1.4341894,-0.10824 -0.81181,-0.0541 -3.842561,2.27306 -4.383761,3.03075 -0.54121,0.75768 -0.21649,2.59778 -0.21649,3.43665 0,0.75379 -0.10824,2.43542 0,3.30135 z",Qy=dp.object({hour:dp.preprocess((t=>Number(t)),dp.number().min(0).max(23)),duration:dp.number().min(0),events:dp.number().min(0)}),My=dp.object({day:dp.preprocess((t=>"string"==typeof t?new Date(`${t}T00:00:00`):t),dp.date()),events:dp.number(),hours:Qy.array()}).array(),Ty=dp.object({start_time:dp.number(),end_time:dp.number(),id:dp.string()}).array(),Oy=dp.object({success:dp.boolean(),message:dp.string()}),Ry=async(t,e,i)=>await ty(t,My,{type:"frigate/recordings/summary",instance_id:e,camera:i},!0),Py=async(t,e,i,n,o)=>await ty(t,Ty,{type:"frigate/recordings/get",instance_id:e,camera:i,before:Math.floor(n.getTime()/1e3),after:Math.ceil(o.getTime()/1e3)},!0);const Ny=t=>[t.frigate.client_id,t.frigate.camera_name].join("/"),Fy=(t,e,i,n)=>K` ${e.render({initial:()=>{var t;return null!==(t=null==n?void 0:n())&&void 0!==t?t:Ug()},pending:()=>{var t;return null!==(t=null==n?void 0:n())&&void 0!==t?t:Ug()},error:e=>{Og(e),qg(t,e)},complete:i})}`,Ly=Symbol();class jy{constructor(t,e,i){this.o=0,this.status=0,this.autoRun=!0,this.i=t,this.i.addController(this);const n="object"==typeof e?e:{task:e,args:i};this.t=n.task,this.h=n.args,void 0!==n.autoRun&&(this.autoRun=n.autoRun),this.taskComplete=new Promise(((t,e)=>{this.l=t,this.u=e}))}hostUpdated(){this.performTask()}async performTask(){var t;const e=null===(t=this.h)||void 0===t?void 0:t.call(this);this.shouldRun(e)&&this.run(e)}shouldRun(t){return this.autoRun&&this.v(t)}async run(t){var e;let i,n;null!=t||(t=null===(e=this.h)||void 0===e?void 0:e.call(this)),2!==this.status&&3!==this.status||(this.taskComplete=new Promise(((t,e)=>{this.l=t,this.u=e}))),this.status=1,this._=void 0,this.m=void 0,this.i.requestUpdate();const o=++this.o;try{i=await this.t(t)}catch(t){n=t}this.o===o&&(i===Ly?this.status=0:(void 0===n?(this.status=2,this.l(i)):(this.status=3,this.u(n)),this.m=i,this._=n),this.i.requestUpdate())}get value(){return this.m}get error(){return this._}render(t){var e,i,n,o;switch(this.status){case 0:return null===(e=t.initial)||void 0===e?void 0:e.call(t);case 1:return null===(i=t.pending)||void 0===i?void 0:i.call(t);case 2:return null===(n=t.complete)||void 0===n?void 0:n.call(t,this.value);case 3:return null===(o=t.error)||void 0===o?void 0:o.call(t,this.error);default:this.status}}v(t){const e=this.T;return this.T=t,Array.isArray(t)&&Array.isArray(e)?t.length===e.length&&t.some(((t,i)=>D(t,e[i]))):t!==e}}const zy=(t,e,i)=>new jy(t,(async([t,i])=>{const n=e();return t&&n&&i?(async(t,e)=>t?(null==e?void 0:e.startsWith("data:"))?e:new Promise(((i,n)=>{t?t.fetchWithAuth(e).then((t=>t.blob())).then((t=>{const e=new FileReader;e.onload=()=>{const t=e.result;i("string"==typeof t?t:null)},e.onerror=t=>n(t),e.readAsDataURL(t)})):n()})):null)(n,i):null}),(()=>[!!e(),i()]));let Uy=class extends gt{constructor(){super(...arguments),this._embedThumbnailTask=zy(this,(()=>this.hass),(()=>this.thumbnail))}render(){return K` + ${this.thumbnail?Fy(this,this._embedThumbnailTask,(t=>t?K``:K``)):K` `} + `}static get styles(){return _(":host {\n display: block;\n overflow: hidden;\n}\n\nimg {\n display: block;\n}\n\nimg,\nha-icon,\nfrigate-card-progress-indicator {\n border-radius: var(--ha-card-border-radius, 4px);\n max-width: var(--frigate-card-thumbnail-size);\n max-height: 100%;\n aspect-ratio: 1/1;\n object-fit: cover;\n}\n\nha-icon {\n --mdc-icon-size: 50%;\n color: var(--primary-text-color);\n display: flex;\n justify-content: center;\n align-items: center;\n border: 1px solid rgba(255, 255, 255, 0.3);\n box-sizing: border-box;\n}")}};t([yt({attribute:!1})],Uy.prototype,"thumbnail",void 0),t([yt({attribute:!1})],Uy.prototype,"hass",void 0),Uy=t([vt("frigate-card-thumbnail-feature-event")],Uy);let Hy=class extends gt{render(){if(this.date)return K` +
${vv(this.date,"HH:mm")}
+
${vv(this.date,"MMM do")}
+ `}static get styles(){return _(":host {\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n aspect-ratio: 1/1;\n overflow: hidden;\n max-width: var(--frigate-card-thumbnail-size);\n max-height: var(--frigate-card-thumbnail-size);\n padding: 10px;\n border: 1px solid var(--secondary-color);\n background-color: var(--secondary-background-color);\n border-radius: var(--ha-card-border-radius, 4px);\n box-sizing: border-box;\n color: var(--primary-text-color);\n}\n\ndiv {\n text-align: center;\n}\n\ndiv.title {\n font-size: 1.5rem;\n}")}};t([yt({attribute:!1})],Hy.prototype,"date",void 0),Hy=t([vt("frigate-card-thumbnail-feature-recording")],Hy);let Gy=class extends gt{render(){if(!this.event)return;const t=(100*this.event.top_score).toFixed(2)+"%";return K`
+
${Qg(this.event.label)}
+
+ ${Sg("event.start")}: + ${vv(yv(this.event.start_time),"HH:mm:ss")} +
+
+ ${Sg("event.duration")}: + ${ky(this.event)} +
+
+
+ ${t} +
`}static get styles(){return _(Sy)}};t([yt({attribute:!1})],Gy.prototype,"event",void 0),Gy=t([vt("frigate-card-thumbnail-details-event")],Gy);let qy=class extends gt{render(){if(this.recording)return K`
+
${Qg(this.recording.camera)||""}
+ ${this.recording.seek_time?K`
+ ${Sg("recording.seek")} + ${vv(yv(this.recording.seek_time),"HH:mm:ss")} +
`:K``} +
+
+ ${this.recording.events} + ${Sg("recording.events")} +
`}static get styles(){return _(Sy)}};t([yt({attribute:!1})],qy.prototype,"recording",void 0),qy=t([vt("frigate-card-thumbnail-details-recording")],qy);let Yy=class extends gt{constructor(){super(...arguments),this.details=!1,this.show_favorite_control=!1,this.show_timeline_control=!1}render(){var t,e,i,n;let o=null,r=null,s=null,a=null;if(this.target&&this.target.children&&void 0!==this.childIndex){const l=this.target.children[this.childIndex];o=null!==(e=null===(t=l.frigate)||void 0===t?void 0:t.event)&&void 0!==e?e:null,r=null!==(n=null===(i=l.frigate)||void 0===i?void 0:i.recording)&&void 0!==n?n:null,s=l.thumbnail,a=l.title}if(this.event&&(o=this.event),s=this.thumbnail?this.thumbnail:s,a=this.label?this.label:a,!o&&!r)return;const l={star:!0,starred:!!(null==o?void 0:o.retain_indefinitely)};return K` ${o?K``:K``} + ${this.show_favorite_control&&o&&this.hass&&this.clientID?K` {Vm(t),o&&this.hass&&this.clientID&&async function(t,e,i,n){const o={type:"frigate/event/retain",instance_id:e,event_id:i,retain:n},r=await ty(t,Oy,o,!0);if(!r.success)throw new fp(Sg("error.failed_retain"),{request:o,response:r})}(this.hass,this.clientID,o.id,!o.retain_indefinitely).then((()=>{o&&(o.retain_indefinitely=!o.retain_indefinitely,this.requestUpdate())})).catch((t=>{Og(t)}))}} + />`:""} + ${this.details&&o?K``:this.details&&r?K``:K``} + ${this.show_timeline_control?K`{var e,i,n;Vm(t),o?null===(e=this.view)||void 0===e||e.evolve({view:"timeline",target:this.target,childIndex:null!==(i=this.childIndex)&&void 0!==i?i:null}).removeContext("timeline").dispatchChangeEvent(this):r&&(null===(n=this.view)||void 0===n||n.evolve({view:"timeline",target:null,childIndex:null}).mergeInContext({timeline:{window:{start:yv(r.start_time),end:yv(r.end_time)}}}).dispatchChangeEvent(this))}} + >`:""}`}static get styles(){return _(":host {\n display: flex;\n flex-direction: row;\n box-sizing: border-box;\n position: relative;\n overflow: hidden;\n transition: transform 0.2s linear;\n}\n\n:host(:not([details])) {\n aspect-ratio: 1/1;\n}\n\n:host([details]) {\n border: 1px solid var(--primary-color);\n border-radius: var(--ha-card-border-radius, 4px);\n padding: 2px;\n background-color: var(--primary-background-color, black);\n}\n\n:host(:hover) {\n transform: scale(1.04);\n}\n\nha-icon {\n position: absolute;\n border-radius: 50%;\n opacity: 0.5;\n color: var(--primary-color);\n top: 3px;\n cursor: pointer;\n transition: opacity 0.2s ease-in-out, color 0.2s ease-in-out;\n}\n\nha-icon:hover {\n opacity: 1;\n}\n\nha-icon.star {\n left: 3px;\n}\n\nha-icon.star.starred {\n color: gold;\n}\n\nha-icon.timeline {\n right: 3px;\n}\n\nfrigate-card-thumbnail-details-event, frigate-card-thumbnail-details-recording {\n flex: 1;\n}")}};t([yt({attribute:!0,type:Boolean})],Yy.prototype,"details",void 0),t([yt({attribute:!0,type:Boolean})],Yy.prototype,"show_favorite_control",void 0),t([yt({attribute:!0,type:Boolean})],Yy.prototype,"show_timeline_control",void 0),t([yt({attribute:!1})],Yy.prototype,"target",void 0),t([yt({attribute:!1})],Yy.prototype,"childIndex",void 0),t([yt({attribute:!0})],Yy.prototype,"thumbnail",void 0),t([yt({attribute:!0})],Yy.prototype,"label",void 0),t([yt({attribute:!1})],Yy.prototype,"event",void 0),t([yt({attribute:!1})],Yy.prototype,"view",void 0),t([yt({attribute:!1})],Yy.prototype,"hass",void 0),t([yt({attribute:!1})],Yy.prototype,"clientID",void 0),Yy=t([vt("frigate-card-thumbnail")],Yy);let $y=class extends gt{render(){var t;const e=null===(t=this.view)||void 0===t?void 0:t.getMediaType();if(this.hass&&this.view&&this.cameras&&this.view.isGalleryView()&&e){if(!this.view.target){const t=Iy(this,this.hass,this.cameras,this.view.camera,e);if(!t)return;return Ey(this,this.hass,this.view,t),Ug()}return K` + + + `}}static get styles(){return w` + :host { + display: block; + width: 100%; + height: 100%; + } + `}};t([yt({attribute:!1})],$y.prototype,"hass",void 0),t([yt({attribute:!1})],$y.prototype,"view",void 0),t([yt({attribute:!1})],$y.prototype,"galleryConfig",void 0),t([yt({attribute:!1})],$y.prototype,"cameras",void 0),$y=t([vt("frigate-card-gallery")],$y);let Wy=class extends gt{constructor(){super(),this._resizeObserver=new ResizeObserver(this._resizeHandler.bind(this))}connectedCallback(){super.connectedCallback(),this._resizeObserver.observe(this)}disconnectedCallback(){this._resizeObserver.disconnect(),super.disconnectedCallback()}_setColumnCount(){var t,e,i;const n=null!==(e=null===(t=this.galleryConfig)||void 0===t?void 0:t.controls.thumbnails.size)&&void 0!==e?e:Pm.event_gallery.controls.thumbnails.size,o=(null===(i=this.galleryConfig)||void 0===i?void 0:i.controls.thumbnails.show_details)?Math.max(1,Math.floor(this.clientWidth/300)):Math.max(1,Math.ceil(this.clientWidth/175),Math.ceil(this.clientWidth/n));this.style.setProperty("--frigate-card-gallery-columns",String(o))}_resizeHandler(){this._setColumnCount()}_showBackArrow(){var t;return!!(null===(t=this.view)||void 0===t?void 0:t.previous)&&!!this.view.previous.target&&this.view.previous.view===this.view.view}willUpdate(t){var e,i;t.has("galleryConfig")&&((null===(e=this.galleryConfig)||void 0===e?void 0:e.controls.thumbnails.show_details)?this.setAttribute("details",""):this.removeAttribute("details"),this._setColumnCount(),(null===(i=this.galleryConfig)||void 0===i?void 0:i.controls.thumbnails.size)&&this.style.setProperty("--frigate-card-thumbnail-size",`${this.galleryConfig.controls.thumbnails.size}px`))}render(){if(!(this.hass&&this.view&&this.view.target&&this.view.target.children&&(this.view.is("clips")||this.view.is("snapshots"))&&this.cameras))return K``;const t=this.cameras.get(this.view.camera);return K` + ${this._showBackArrow()?K` {this.view&&this.view.previous&&this.view.previous.dispatchChangeEvent(this),Vm(t)}} + outlined="" + > + + `:""} + ${this.view.target.children.map(((e,i)=>{var n,o,r,s,a;return K` + ${e.can_expand?K` + {this.hass&&this.view&&(async(t,e,i,n)=>{let o;try{o=await fy(e,n.media_content_id)}catch(e){return qg(t,e)}i.evolve({target:o}).dispatchChangeEvent(t)})(this,this.hass,this.view,e),Vm(t)}} + outlined="" + > +
${e.title}
+
+ `:e.thumbnail?K`{this.view&&this.view.evolve({view:this.view.is("clips")?"clip":"snapshot",childIndex:i}).dispatchChangeEvent(this),Vm(t)}} + > + `:""} + `}))} + `}static get styles(){return _(":host {\n width: 100%;\n height: auto;\n overflow: auto;\n -ms-overflow-style: none;\n scrollbar-width: none;\n --frigate-card-gallery-gap: 3px;\n --frigate-card-gallery-columns: 4;\n display: grid;\n grid-template-columns: repeat(var(--frigate-card-gallery-columns), minmax(0, 1fr));\n grid-auto-rows: 1fr;\n gap: var(--frigate-card-gallery-gap);\n}\n\n:host::-webkit-scrollbar {\n display: none;\n}\n\n:host ha-card {\n display: flex;\n justify-content: center;\n align-items: center;\n box-sizing: border-box;\n text-align: center;\n color: var(--primary-text-color, white);\n border: 1px solid var(--primary-color);\n border-radius: var(--ha-card-border-radius, 4px);\n background-color: var(--primary-background-color, black);\n padding: 10px;\n line-height: 1;\n overflow: hidden;\n margin: 0px !important;\n box-shadow: none !important;\n transition: transform 0.2s linear;\n}\n\nha-card:hover {\n transform: scale(1.04);\n}\n\nha-card,\nfrigate-card-thumbnail {\n height: 100%;\n max-height: var(--frigate-card-thumbnail-size);\n}\n\nfrigate-card-thumbnail:not([details]) {\n width: 100%;\n}")}};t([yt({attribute:!1})],Wy.prototype,"hass",void 0),t([yt({attribute:!1})],Wy.prototype,"view",void 0),t([yt({attribute:!1})],Wy.prototype,"galleryConfig",void 0),t([yt({attribute:!1})],Wy.prototype,"cameras",void 0),Wy=t([vt("frigate-card-gallery-core")],Wy); +/** + * @license + * Copyright 2020 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */ +const Vy=kt(class extends St{constructor(t){if(super(t),t.type!==xt&&t.type!==It&&t.type!==Bt)throw Error("The `live` directive is not allowed on child or event bindings");if(!Qt(t))throw Error("`live` bindings can only contain a single expression")}render(t){return t}update(t,[e]){if(e===Z||e===X)return e;const i=t.element,n=t.name;if(t.type===xt){if(e===i[n])return Z}else if(t.type===Bt){if(!!e===i.hasAttribute(n))return Z}else if(t.type===It&&i.getAttribute(n)===e+"")return Z;return Tt(t),e}});class Jy{constructor(t,e,i){this._timerSeconds=e,this._callback=i,(this._host=t).addController(this)}removeController(){this.stopTimer(),this._host.removeController(this)}get value(){return this._value}updateValue(){this._value=this._callback()}clearValue(){this._value=void 0}stopTimer(){void 0!==this._timerID&&window.clearInterval(this._timerID),this._timerID=void 0}startTimer(){this.stopTimer(),this._timerSeconds>0&&(this._timerID=window.setInterval((()=>{this.updateValue(),this._host.requestUpdate()}),1e3*this._timerSeconds))}hostConnected(){this.updateValue(),this.startTimer(),this._host.requestUpdate()}hostDisconnected(){this.clearValue(),this.stopTimer()}}var Ky="data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAUDBAQEAwUEBAQFBQUGBwwIBwcHBw8LCwkMEQ8SEhEPERETFhwXExQaFRERGCEYGh0dHx8fExciJCIeJBweHx7/2wBDAQUFBQcGBw4ICA4eFBEUHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh7/wgARCAEVAewDAREAAhEBAxEB/8QAGwAAAwEAAwEAAAAAAAAAAAAAAAECAwQFBgf/xAAaAQEBAQEBAQEAAAAAAAAAAAAAAQIDBAUG/9oADAMBAAIQAxAAAAHu/wBF+fKuKWoua2zblcOpTDeJqLJsVgAACCiNQEKJRCmEoMAhy1FzThq4VrCHDWbHCoilBWQKqzaa2xeTz3Uumd+Z+h4Sxy0VGmdbzV5AybMdZjUz1kEFA4AAEAAdEFAAEVKBDVxc1UtSgiaY1cSI4nPfl/N6eZrHp/Rw11mLJq83XO9c2ovO+Ry6ea+j4FY1uKl1zrSAAIucd5mlYUoBggA1ACiRiVgiCiW81w6JQqWpazQVTQCo6fz9vH+L2ec83o937PJ7P6HgsBAaZ1vjemdJNcb5HLr536PgACrioqFU2RZFkWLcAgAAokdoEhRKwgoHCCgrKpWrlQ1ctQpVU0jovN38P4fZ1HDta+y9HD3f1Pm2jEBrm78+muNXNVnW2N6Z15z6fz7zWSlDEkVnrMWKyaVgOCkA6AkBipwKBDhgIa1AC3KoaiuJtmPP+b0eM8Ps6Pl01lprsenL6V9T5vadMUJEa41y+XXXGqmrzrTOrzamvNfU+brnThgRrOdk2Z6yqSKxBTAQAgojBBRQAHDhhDViRLc1cpKhV5rzd/nnz/dw+PbkIqheXrH036nz+578LipVY42xvl8u14uk1pjeuNXNB5f6vzNc6uERc56znokjUEBBYAFACGAIAAAAKDyoqaEJRWVNOOn5dfnXz/b5rz9he1zutRGtfSvo/O731+aoYwjTOuRz6b893nW2N6Z3ebpnTXyf1/laZ0xM5azGpFioQAVgCiAAKmgAAoCAhgpDHLctZoNUvh/H6vnfzvfjHJl56taNNT6L9L5voPT59s1UAVLti8nl2rN1zrbn00zq860zoPJ/Y+SDM7nPUmxWIBiQoAKABAAAAAFEQ1BIBFTV5uktTXnOXX4/8n6euNbnYzWVjXkdMfR/qfL7X0cNM63xqpagKl5PLrrjdy643rjeuN641cpL4n73xUFmdzNCAACFAAFAAgAAogACCiQCiUlqWoqa0zfkXzvo+Z8fq7XnvmVx9Zmu27cvon1Pmcrvwcu+N6S689a51pnWmdb8+m/PppjeuNbZ3ea5QZ4H9D8JWISKhAKIApgAAgAK0SCiiACCwCEooOWocvTcuvx74v1+RjfZmk1jrPp/Z4/cfU+a9QHHIxupeRz3tjXJ5dXLvz6crl11570zqpXRDVnz39F8BwqlDUSCgwABgMIVORqkLEoAAJAFQAqsakOX5T8j6nQ+P19xNTc8nHXk9uP1L7fxI3hUK5d8a2xrk8+muNcnj25HPptjfI59NM6AHDVqHz79D+fCbFokAoHAAwAcEFEMWghKgALEgoAhaCiPLznm9Py3431+djXay8TU7vty919L5/YejzTYhDl3xrl8+nJ5dd+XTkc+nJ5ddcavOnKqCotoA+efovz9RGorEFMIYQUDQlYBAAtQAIKIVgoqRiqbAcuWNfH/AIv2ev4du3zrSqj6R9L5/fezxRYqRUC65vL5dOTx7crl15PLrtjd5tTRBTilagHzr9H+eZNgAwpwAADgGAQUAKwUQAQArjLG+s83p7P3+BhnXy/5H1vN+T1b5vPa1s9r34+++h87PWc9RwE2TV5cjn05vDvz/P6N+e9MbuWlBqAAQHzn9N+ecKwgGFjlBhBRDAIACkMSClEi0UOXTNpfN+L3ec+D+k7z6Xx+r8/o8FvlWddkbHP6Y+vfT+VyZqUmzTOtcbZnrNTXK49eVy67c9643rnVNAAAAAR84/TfnmgADgGADgAKcFEIBolKAEiRWhWbyMbivi3wf0EcuvKmuH38mWNdrbon036fy+768dsbcumd6Y1rjfL5dalBy0ry1zvXG6UAAAAA+cfpPzrAdAAMIcEFAACFoAISlCJSxQrUjl1zry3l9Pyz5P1MY1O72wxruK9F6vL7j6PzNc6359N8dORy6a43rje+NuAnRDjTGts7uaAAAAAPnH6T886IaFAQwGOEAAFAgAAAAAQ5Vm+D8Pt8J873xLKJeyrntdpL9I+n8vse/m1zvTOtM65vn9G/PpvjdQE1lrKRrUuuNbY3pNgAAAB85/S/niAdhBRDGAQUIKIgBSkEACpwEYvmPH7fCeH2dVx2mmVLFNnvLruq+o/R+ZyOvCprTO2c3z+jmce2uNMipsz1nPeHNa41rne3PWudtQAAAPnH6T86DAB0Q6IcFFJCBSwhKCBBQ43PfQ+fv5zyerzfl9XGzYRy6LCCiKucdxqfZPs/Fcu+OnJ5dUmmd87z+jkc9hOk2QznuXm6Z1pnWuN6501AEJGofOf0v51wAADGAQWCiClAgEEB13Lr82+T9TpOHaEUOXlzVmlaDlzlmzg3N12J9p+x8blaztjfJ5dtcbqORz68nl1cKgmxI2rmqy1xrSbYEiZais+c/pfzzQgAdOAAAAAKQQgpRwuXX5N8X6/X8+hHLObNaLnZRUFVL3HLp6P0eXzPSddJ0fPp9G4693+g+Lvm8nl15fHtU1rjV5rWpqoBDVxebpndytUJEjVqz5x+k/PMEFKcjAIKEFAAQhBWeNfJ/ifY6Xh25kvPWrMiluXVexzPQ/Q8HoPf4OT24llZvH8vp+X/ABPt9fqfSvT5fX/R8PL49eXx7OUVoS1LUuudENai860ztqwAEFAPnf6P88QtFRIU4YQUAOFaCRUiZfmHxvreb8vp5Evay1YWcatJe+9Pn9f7/ndp6fPGiSpRKl359PM/N9/kvN6uQfSvX5O81ORy63mxqTrNZ1rnTl0zqoqW86qaqVq4KAAAPnX6P8+IrFTHKIwhUwHCpWkIVnhPmfQ8N876HNl3rQYrnkdM/QfpfM7f1+VWCkXLedXCNcbvN+a/K+p6j0+fpPL6vqnq82+NXnUazNjNcbvOrlcC1LedXm0rUCAAoPm/6X88SA6ZWaBQhDBUipFZpb53y+r538f6txnWpVmusfTfqfL7D0cTWVQhDmtZrTN0zrTLfn00zrjY38u8fs+gduPF59PadMXmgE2VLctTSRq5by1zu86pQMgKAPm36b86wh2seQjUokqUEToi83qePb5b8b6153QrGdv25fRvq/K5PTDSLA0zqpXDW5dcXk8+nI5ddM6cvTZ347n07BPb9McrNqVjlcquW05QqXXFvOtJpqBAEAHzf9P+dACCql0zXEWMagkjSs3jc+nyf4/1sOfTSWyLO87+f6N9X5fJ1EBNjipdJalqWjbnvlce2/PprndZoeXzvgmlnsrnTN0zsVWRc3NXmuXTOtM6pQAAAAI+bfpfzgNUMoZWarCWgWbIoxr5b8f6/V8O2hcvYaz636Hz/Sezyck0zpWJLlZFgJbl0zeTy6czj25HLrU040zpnQY6d9rFDilCUVaY1rnVzTUAAAAAAPmv6T86wBGrCiAocriNJTwHyfq+U8Xr2NK9j6fN7j6Pz63ijk8+jgBBdsaqWUw6Yqa2xrXG+Xx7b8+ly1nVy6Z1WaCqNZVjzWVLpndKAAAAAAAB81/SfnC1hIDtBhDHKQjy/k9fgPk/V7beO69HD1Hp8/e+jz6ZrSbNM60zdM6i5z3nbn05fHtpnXH6c1W2N6Y1tjemdXnWmbedaZ2xIiNZjWQrOtc6poAAAAAAAAPmf6X845XRIwV2uAqLzoTi8uvnvH7O16c+768uRrNDluHGeo0vOtsbjWYueRz68nl10zus1rebct51UrlqNM7uVqIEmW+cay5rTGrmqUAAAAAAAD5l+l/OMYQwKtcripdc6uJ8nr7a5DXG9M6x3zy3loLFyJlvJLUa53yeXXbHTfnu86ZedVm6TQCOW5qpWoAJnc5ayy5qs22gAAAAAAAPmX6b825QcOiKtakmmdVLpm9t5PTyOfSprfnu86z1ni9uMazGs5bzFzjvIuubyuPXkcuu+OmmNXLeNbY1U01STqVLebTQAAJJQGtAoEFAAAAAAf/EACkQAAEEAgIBBAIDAQEBAAAAAAEAAgMEBREQIBITIUBQFCIGMDFBFSP/2gAIAQEAAQUC6hDofrwE1D+gIdDwfpNqxZggbNnAXQQ5Kwom+DOQgEBwEFrjXGkOpKJ+kuZKrWVvMWJUXeTsDVsMQ6gIDjSa1ALS8VpaWlrqfo7uUrVlcytqwhG8rwaFim0GzjqAgFpaQCA50tLS19Pcy9SBXMpYsrW0PZHax1J1ySjViqxjo0JoQHAC0tcBD6MdcjloKqu5GzaMMZI1pa4q1ZrMmMpMpxBDoxDkIchDk/R38hXptv5izYTimAl2zx4uKirSyyYim6pBpa6BNHAQCCHIQ5P0GuM1mPTT3lxUUJcgGtQCLXKNs7zhq81eu3s0IcBDgdifov5Db/GpOO1FE6VRQ/s4+y0CoK80rsZXdWqhBDjS0g1NatIBBqAQCAWlrja388chfyC3+TeVD/5Sy68/bijSltGnB+NXQQ4bwAgE0IBBqAQC19PtZu3+LRJ2q0fm4f7M0sQCxWMc6VrWsbwE3hqCAWkwIBAIfVZy3+TbYNuDWta9VnhyoVX2LX/OjUE1BNQag1AfV565+PVcdqkP3sBoR9xg6vqZCrTirSdAmhAJoTQmhBD6ueVkMN+y6zZHuWjxa8pgWDpehWIWuNLS0moJqaEAh119FJ5+Fa4JJOJHMijy+RdbkKrj9h/p91hcc90WkQtLS8V48NCaFGE0ID6cLSzNYPhNyz6dHMQyr+T+qXJo2QxrQG6VCo+1aiaGMCKAQCDV6a9JNjTWINQQ+nBQKc0OEkz6tya5t8V10jJmaMTSSxvtolYmr+LWCHDWrxTAgF4rxWuQh9O1ZvKNga874YdKPUsNc6k0Y34Wn52EE1BNCAQCHYIfTPLWMymb2nHyK1xVk0+WLb2bLMZCIqAagEE1NTUOu1tAoFD6OSRkTbmcgjV29YtO6FN9jE/yZjx52arDFXQWk1MTUOh5CCCHz5bEESsZupGrGctPUs75XE8BBjii0hNBJWlDoNx0xFkoIJqITE0odCtIBBBBD5t+3FUiu5OxYJcSt8AEoV3kCshGGoex9t+jomPyJBaWHRpvNexDI2aJqCaeAE1DrrkIfNu2Y6sF61Jan4ZXcQxjGD9db415BjduLC12Mr2JF/48L68uJsvnyGKsVZfJYa/tjSgmhNHA433CHzJZGRR5O263YUcBeoowxErSA9gAS6N8clenudmHb6sUEER2toFWofWiyNdvlVc6E4e2HhqYh12h1HzCQ1uYyBtSbUTNljkTobBBPu1U8XPMq9CrAieoQWaq+TcYIzas1pcbYxdgWa7Qh0HA/v38L+Q3/f3Ka1qPuWeyemD9Y60srocZTiPTSAXivFNavFZqia0uMljymOpSSYvJNIIHQcDqPl5e+K0etqb3LRzHDPIG1YparWhjOw4DUGoNVqsyxAPWxOTuwR36n8es7a3+sIIfIyVxlOB73zSjpjqL7hqwsrwddLS0gEAmBAIBaWVoMu18FZfTtZmF9O1XlbNDzrkchDgf3BHuFbnjrQXLEluf/gQTP2diKTprUUbI2865HRqaEBzpZrGC2zFWhbhwfq1rKCA6BaWkAtfB33c5rGZW665OOB/lWnNPHg6H47WMa0NatLS0vFeK1yEE1NQ5AWlexcdicMG9LXTSAWlr5Wcv+q5vuf8AuiXQYSQsjYGN0mhALS0tcNC8EYkWJrUGprUwIcaQWlpa7AIfLzdwwsmjeySWg+vRw2JLlSxsFZ4WlrgIcHhiHDmoNQagEAgEOB1PIQ+XcmbWrYyjM5UMXHA51dj3+C8V4rXGuBweGBDjS8UAtIDkIdSjyEPjjhn+zUhYm9NeCaxemnM77W0AmoIdNf1noPjjiP8A2M+yCHDgiODw7lqagghwAgOw+R//xAAsEQABBAEEAQQCAQQDAAAAAAABAAIDERAEEiAhMRMwQFAiQQUUQlFhIzIz/9oACAEDAQE/AfaPwB7Y+KPZHC0flj3GsLvCbpT/AHFF8bP+oRO43yGBms19WyB7kzSsHlCgtTM0jbypDLQgMUq+rZp3O89JkLWeFRVKXdR7rkEFSpUgM19VHpnO89JkLWeM0VI8Mbaklc/zxAQCrACr3L+gjgc/tRxtZ4QGaT3BnZU05k6/XIIZCH0tYGWROf4UcLWYGaTjtFlaicSdDm0YCpDA+mrEEO7s5rAVFF+3yVqJmyHpDgMAIYCGAPqImb3VgC0ETik+RrPJWolEh6QwOACa1UgEAgEAqVKs39EFpWU2/wDOGdFHMkzY/Kmm9U3zAQCAVIBAKlXC/pImb3bUEO1aIpV/lTztaKae0ST55BAIBUmhAIBV9VpY9rbP7yVGQfxKmf6Te047jfMBAJqpBqA+r00W92Go4lJjbam1DpBR5BAIBAIBDA+qaCTQUUQjbWbVLUybvx5hBNTQgPqGP2m1JpdzfUi7GAgLWn0+zs+cDMuo2t2DzwpUqxSATQgEFX09L+P1f9PJ+XgrV6COvUYEP42GZ/4Gv9KT+Pbpm7m8XvDBaJs2UEcAINXpr00I01iDcD6cZ0WtliYKUkrd++Ppf1Bcwschwnl3u4Bq2poQC2raqyEPpwoIPU7Pji3Gpk2NrAQQQCAQHMIfTBqi0v7egONILU9yFUqQQQQ52rVoH6NoLugo9I7+5MibH45hF+3tTyB77GaQTUPaH0DY3u8BN0bz56TNHGPPaaA3ocKVcSL6wEEFSaU08qwMD50URkNBRQNj8cdq2qs0qzSlidG6iggmnACbxpVwHzYozIaCYwMFDO3F8aUUrIzUnhanWxRvqMWjqYnC7UUgkvb+sSxCdlftVRo4AQCpDF+wPmMaXGgoYhGKxWL4EV5RLWi7Tte2ugn6iR/kqycBQSmJ+4I04bgmmlrIb/5AgE1DN5HEfMAtaeD0x/vgeEuqYwf5T9XI798KVYC0k1fgVKCOx5UMweFLF6bqQCHAfR6WGvyPEoJzwAn6p540qVKkAgoJN4o+VKwxutq/9WIIYpUhgcLQPy9LBvNnwq4lwCM7g40UST2eIQzSDVtTbabCNSNUTzE5TMo7ghwrA4hBD5EMRkKaABQ4yTNj8qSQvNn2qTRgBUmHaVIyxuCjdY2leOFKsDgAq+OExheaCYwMFDjPN6YTnuebPCuYQQGaTHbU9ldhOF94CrgMUgFXwb5tF9BQxemOBeB0VqZ+6aiS42UAqzSrgFSamhAZAVJppUq5AKlXytLBtG48HaloBTnF3lUqzWQFsXpotQC2oNQGKzSpVypAfL0sO47iimyBxoKXUbemqXUl/XIYOGoYIQag1AKlWQhwrgPlxx7zSfIB+A8KScu6b4Qc4CgqVKlXAK8tCGKVKlSriOJ+WMBR/iOltW1Bi2Itr2QE3AwM17RVKvkjDUzAQwQqwcHg1BDgAq9yvg//xAAsEQABBAEDBAICAgEFAAAAAAABAAIDERAEEiATITFQMEAiQTJhIxQVM0JR/9oACAECAQE/Afmr1h9q6RrPKdq/00JrJH/yKa0NFDiVeDwv4q9G/UMYn6qR3hdytLp3A7ieRKOS5Xi1fq5NSxvhSTverxCRY7WeRKJV4tHjfEZH3z2Umqa3wpJ3yec2omdR21RxNjHbiSiVeCVav1cuoaxSTOf5V8GMc801QacR9/3yKPrpJms8qTUOfxtNaXGgtNp+l+R88iUTgq/hHotRPt/EInjaazd4C00Do7JR5HJRzav00r9jC5WiawMWmRuf4WnhMY78bVolFytErcrVq1avNeiK1Ulu2/8AmHiwhmKB0nhQQiIVxOLVolWiVav4qVfelk6bd2CqQN40+nc424dkAB45FFEq04olWr9Vq5N7qH6yE8V+QUTOqaCY3aK5FFEpy3IuRPq9TL02/wB4Kbf7xC0SOpRQNjNjkUSiUSiUfkHoHODRZU0vUdeAqxpo9o3IHkUU5Eon46+5akZvb2UWrp3Tl7HJdS1M/U7Dxxi0+5284BVq1avBKJTiiUT6i1rtJ12WPIUGrk/gSv8AcJYmfl3TNc7UdjxYwyGggK7YCtWi5b11EZEXon1NZ1WnYZCms/Ha/uhEA4EJ2AqUMWxvAuVpxVrcr4H1BU8/T8eUTwKC08e43koolEon1xKm1f6Yib4DOmoMV5KKPCsUqVIhH6dfQc4N8qTWNH8VJM5/lXzDd3ZQsLGUVWSnchwKPoHSsb5KdrWDwn6158IuLvPxAoDBRQKciOVq8n70szYhZUuofJxtXmlavIKhlbK2wjgjFoo+mlkEbbKkkMhs5vFcbUkTpB+HlaXSyyMuTsv9PI00pWdKt37xDIdLLf8A1KsEWMOKJ+M/dc4NFlTSmR14vkDY7IbnnaGlN0Dv2UzTMZ4C2qlS1MDZmFpTCR+LvITm7gtDMW/4nIpyOaxXoiaWon6h/rgAqzFpXv8A6TNJG39IDhaONZp7/wAjfIUTgVNCWd1DN1GIlHgVfotZPf4DiMNYXJmkYONq1atEolTRdN1jwo3CRu0r/hfg4CtHnX2gtVqNg2jzya0lDTtLRaDQOwzfA4tbluTqcKKFxuUrBKxQusbSj6WaURNRcXGzxiidL4UcYY2hzvJKcVatWnjcFG7aaKe2nbgvPC/QPeGCypJDI6zx08XUd3TWBgocL5lEonNp4tMffYpprt8Fq1f0aVc3Gu5U8vUPANJFhaaDtbk1oaKCvF4tblfAopyvNq0RatWrzatEq/sjGr1G47RwZpX2E1oaKCtE4tWrwSt6EiDkXLci5OObVq1avA4X9zVT7BtHnDoy0WVDpy/u5Q6YR9z3Ob4jDkcAouRcrV/CD9+SQMbaZETbz5UUAb3d3KLWk2VuW5WrxfAYccWrW5WrV/EPulSfke63rei9b0Hc6wSjg5tX8YVq/tuT8FHDSgcDAyUUUckq8j7f/8QANxAAAQMBBQYEAwcFAQAAAAAAAQACAxEQEiExUQQTIjJBUCAjUmFxgaEwM0JikcHRBRRAYOFy/9oACAEBAAY/Av8Ab6zSNZ8Vc2SF0rtSr207RuG+iPNBoJNNTXvNHPvO9LVSOkDfqqm9I7Ulb2QNjachdxPeaV3j9Gq7euM0asli5MZGH7RL6rtGt7xRrt6/Rqu1uM0bZgsUQ0igzJVyMfE692LG+bJoMgvMfw+kZIuPguxtJVBi88x7rxuq/wBAzRAO7Z6W2YW4BXGNLj7Ihxq52Y07qdn2V3F+J6JJqbKnAKjRZkrsd4nQIia7U9Kd1ow0fJgLKMxOiN/CnS3NUiaXfBXH3b1endnXTwM4W2NkcMETbWMcIzJQiDr3dnUPG/BtlTkLcRgVvNoj8rQ9VdY0NGg7uSORuDVRUbYYZOU5exW4HKMSfZU7vum/eSfQWXim3MqY2M3gq0NvJ7468Xd3SyHhanSu62AIJt4G6TRCVxq+Rv6DuZ3brruhojBKN3M3NuvwtL5DdaOqutwiGQsrpbG+cNMRN673UzjB8Yr8kDxPLciM/wDqEZY/eIUfWMdLAFQWCMYDq5NY3JooO60OSk3D+AONEJIQY304qap7ZiX3lhlZihQVOSunmdi7ux2eE1lOZ9Pgu9eixWozRnrwRnD37qXvcGtHUoxbJgPWqnw32mlV+ZqiAFCRePc70j2tHuUWwN3h16KsrzTTp4/ZMiOF40qmRuIJaKdw8yVjfiV5YdIf0C8u7GPbNVke5x9zbgsrKWkE5j9FE8dHdvvyHHo3Vc11vpCxNuS6LFypZQ5K+OVUVFUYJklA6hyTZG5Htpkk+Q1Rlk+Q0swVTgsqqlLKqqp1V0ggoncl8XVB7b8cujslcMVPforoG8bdvVFjb3wcqjLtZkeaNCLzyjlFlcgsvn4ANVdkBb8QmhkjHh2gKBkc271DaqscQHgoOcYtRNKFVxwOaEROB5f47UXE0AV1hpE3L3sqVSytnWhR3g3TNXDFNoy84dXfYGdo/wDf8p2ybR93Nh8D0KDXGrDyuCvfjGDu0/2kRwHOf2sGGPgocNE3ynmvUBAhhcR6j9neZyHlP7Iwz4vbg7+VupuXI+7dVUZdn3bD5rvosVgKKtt9kbnNrSoChZtELS5jQgxoo0ZD7R0UgwP0V4jLP8wTZYqF1KsP7J2yP5o+WunZrxxeeUIySGpPhdQ3WjqUImZD6/b3cpBylHYNoq1pOFfwlM/qMHq4wmysPC4VHZDLIcB9UZH/ACGngwQMjDuhmrkbQ1un+DvI8J25fmT9g2webSmPX/qm/p0lSG8Ubuxl7jRozKwwjHKPBI9jcGDFGaVvG7IHorrGho0H+GzaGvMUrfxAKtMexnZ4j5beY6myiutFSozI+7XnGio0U6943EX3r/oFuSDeGaEsho954WdaaoTbU3h6N1V8cT9T07y6Z3T6p+3TU378Yw7ot7J5sxxLig9zAXNy73GZMY2Y3dT/ALh//8QAKhABAAICAQMCBgIDAQAAAAAAAQARECExQVFhIHEwQFCBkbGh8MHR4fH/2gAIAQEAAT8hhBgwyGCcYxl/LkIes9JlIkPQFrBxgwQxGLl4PywlSoQhCVhyPoUqnlt+0v1GjQfjlle9ehX5dIJpdTp+7hlQemI1GKhAQgQl4vIX8oQxUrJlzcuW1H8jLNvB3+cLdDmLsspP5nYYmQzVTli0emiCKwxYvliEPSYvCy4YnzLj3Zci14vyzd2PLHizFp5391bggZM2QZMEIZBFYWOH0vx6lQMkMVlZdCug5Yg/iR+Zd7bxfmdyOtVv23L+b92CH7ekPacvTz85HF8HBWIgipywqVGLFjFl/JmD1glRxxxep+RjO06NYmhA4mrRGK7XLzzq9D3ilv7Ug9AMOMIYCVK9BcUWLF+XIZqVCDh545f5dps1+pz7vWKtwkWgCbX3lzrCBlXpFociHEEkVWAhxkOAYBKgyWKLH5kYMMVhUuahoOng/wBxKycq8xblDb305gmhLtavywUCbl3GJvbsAs93rhWSBiGoZwggSsDLwLF+cIMGER7quOh1f73jKNIHkbYPUnuBQBQaAn2nSG+zLDLw1CW5s048X1yqBfw+vKmBci/QBhRLP+4zrHvVuzxEhg28957Iu+bIuCJ2ZCRKK3VZHUMCWyj1DKRWbjh+eJcIsFX/AGmMoHlCfhigapLHvHEdXqF1gLNN4XIeAojlwhDDNU5eggegJX0WwN/f/Mr+FzoN5i0NQ/b2vrK6B1dx4SqFlorcckUMGoYfQUGLwel+OfJEy6a/YzrJXS0R1arR2ZfbApLjOicfublHf0O2KlSvWoUwQl5IZJcX58lCAL9/ETXlo7HaDggkcnMVeype8hTNUSdPNWRUMGmLm+aECBKlQgPQfOVAg03UH3IFnSs15RzAYI0Nqm07fe8su7snLsKSaFXFSEKduqIaayC+LCYGiZgIECVK+gk2jPXsh3EDxj2Svnp+3mcaZ1KP4mySeLxZ/wCxIbjVtXHSXfLLVvEurDdGgg8UT2CcIZZKZdg+EXGRBiQPoxcRAAopGGmpi7KuEvrwnwja4FK9bgXcmyaiS8vVAJazQ6wj2dK48fbBSr9ABqUlIQQ+lU7YKP8ArcuXi9LHo7jg2uEnA9APiE7Ude7n+IOQzRlx6CEUUH6HUCcuIEoJWv8AA9b7doqIq4YNMo91A5OXUp0Sv8kEoH5VyGkW5xgghGLF9ITh9AvCTuHVL0u/1FqLoOh9pd4Emq1BHCoF7L7Mu5YfvTd2AOJeHCaMeRixwuEH0Jfid2whPBoWIPuv5Med4LpbLvmWWoMW+odaaeJWERumKnfRHXRLmFLhi3iYLJTFTmMfSA9avB8vtcXFyo3t9PSR60fvG2NaJl9/aM6ofaeYd5fR/wCwLDtwr2dF1C6a+GXF0i+wIGqIvf4l4dN08nhwWILwGo9RcVKwCGQ+Meo+AuXjqLtEo/QO0Xe5VtRx49nmDqs6qS7SR50QcbdOScPz1lBVVoo5Y4G++o5dpq8L48w6rWdZf5luthrrUXzFztAXT2igO5N6LQB3Dr7n6hIIKLE6zfFolYjgMH0GQ9R8qAstqy/A1dsjuDbaNMf700o3EUzls9sjcrV13drzHdAB0/d0QCeHuH5iRGlXy/zChRqXiRr0Nq9+z4eIu7Zfceo+YNNCD9cZvX/I+8ME4xIS4ODhgIEEPTXoD0nxTBCtXpGLOF/ZluI/AhCbbq9R93R1KAHMp8pd6cLRe5UHDf6Ihibra9+3ESLjmVFHqDpr+H96f+QQa3XqfB+vuxau/pf+JDSThTv39n0FzCCECEIYPgEXLyYPh2rsy6sJup3BnMOY2A5TYl1y3MVeJ8nZNiFLs/jiLeSHopolURBHSMO2cna/4/XtNW+8ngxKDTacdp7c/mEEFFidc0iYjlcGDFCHxCHpPSRnFwarp7yjAX1mogDsRDC9QT1NAXApUa0j9oUIlB0zUqEMSWTXh7UQeq6JOjBanC9T+6Yo4fLjyveK7T3zx+0WCJKhCXgyXx1ZIZYQ4jirQ77/AKjqX2rOcdk8S91KJOlNX2hv9x7u8rDCBDCesQFwq2f8b4mu0H8b7MA/R9x/pl0oUCEqEV6QggQfFMRkxccKBnEd3aKfz7A7QKpB0nPfBAqFXxFTNna+IDCuBAjKjAQwIQgyQSsKxhNuzsx0wG+Kf9JRFvQ0nb+b/MCDBWTgYpFfGJeRDDgRZbTpN6K6/wA8Nbh3hvQtdE5LA058HmKLU0Lg95UwehRgIYIMLXF4DE3BAgZKskHqq4uAVVilrEySGEQfIj0DLlxxzaur+1Y93RKJCdoDnk6o6feU7hbeV5Y4uj0Mlk3wKehCiCBCBCDEkYYrAPkzJgxUvPp3UnQTa9bmld1fuLt0iqBzXT7+xEhPS/ShhDpA3kDXojqJqWeoMBAggZqCMPkgyekgSp0veju6Ep0ieAfRYoWx5DxAlIjTi+YPEghNTlAY4JWFYDKuE0wmBUrIYqVBkRRfKHohqC4Xc0/7/t/mACqhiOkolSokqMXcJLYjgcECEBKwQh6RKgSsD5AyYMV9BBDKhQbiTjCKpeBDrEYGIJWHB6ySpUCV8b//2gAMAwEAAgADAAAAEH2HUWVRt01vusrnCqQdyy4N9XeYWWL2cdbhqRx0hGkn/wAs0nkte+AQgaKPE2wWfkGt2j1Y/JJpId4PnLAe3/kikDJPKyX9pQNglIi9KcD3LyLIV2KB7QVOhQZHc7sQaly8r7/4D4Qydu2J49xjIXy8xb5zVpyBHOglgjzzstSQq/p8m8/zqMBYezDcRwhuKVZtACMCW0WTFLAy1sZGYTVrfsdgKP3Q3F7rKImyM8xCB83o55LZ6wGYu5RdeI7Lp6AMoRWg4CLzuePJ7M55rLG3M4oebZO68kG2S/DT0p3Th/cUmwbUm7g/skONjaEm2qCyavWvb6KYFW2AmKms78tEtYtZbdAacIzaL9b6iRIf5emPy+0ABiRvgoxTAR8dgDbD5plFyEogUtcBEv8Am8krr0HX0PRe1t89izE+0Gjz8jUaolnmsk5yyiks1bZKkkNqS2w52KAqkjWVytEkmiuysoYxLaGX0Y/4aHqrhKS5MZ6YkkkmhsqzkkkQOp9gfQRBkAFYPmxJR4kkkkkb4Epj1ujAAUPLDQOrC6wQNRtM+AkkkkQzNwgHiYE28zo6YUo8csVUJJ3iREkkkCxdyIQYPqE2UUYrF8dAbxwpfhiBMkkk3+ww3QnxeW+y7PLTznY8DudN8XMMgHkrSWzu++IgiYVZqRZkUV/WYn7Xgnkk6khawJJQuMXP3iflDG6A+EBhYBPQQMn6A26DRwYBa/r+b/imdAcuoISNcLhqkgMkLg10wsUTJlq2+UaWXKVLueOM9rmmkkkncCt+MbCVspCfTY5xK9Il1hvLkmskmkHxIQqM7/EQmpcQNRUuLuw2WZXkoEm00oQG6Df4BzRLB39WcnufoYWtzmwfMmm2AKgGyksQOV3Rqr9fM2DZszWWBkgkkkkXW3qeeGsg2eGFYhkGJlRzvk65Ekkkkky+Ti1yD25a5AtyDMXfugXkmYkkkkkkkcL9pZf+MoG7i7OqkFJtorQTzkkkkkkkmCfngR+ZIUUu06s8RU1hhMJikkkkkkktGftSppknhiZ/VhReALFkhOoQkkkkkkInvAZg3jSpMLQ+AHeigckkv8Mmkkkkk//EACkRAAMAAgIBAwQBBQEAAAAAAAABERAhIDFBMFFhgaGx0XFAkeHw8cH/2gAIAQMBAT8QzRCdQmJkEkQsUuLxmLCjE5lBeiWKL0UTEwjQsExOi6GUXXF0XgPKxvitnR2LYmdjYniwTJiZIaEuE4I160SVh/H7NRZ+7H0ZQkJa4KGsEtEEFmjGxsvClKUTwhiJBZWh0QnlEEsJiylw2Mi+Tc7v/fBHEiAKv8ft8UhBCQlw6BojCQWIQbKP0IQgtkOxcJwQhEFhdCQuO+0fP6OiV+7E4hdiO6EX3/6TigooFQsZLCDRCEy+SylntYpRP0Esp4lEsLC24j2I+/8AY6tv3feE/Yttll2Nb09hMeFgWJUTJSIIXBvDLg2UfJCOspHWEXKEI7wkISFlZWkJNf2aLiUXtE1YaBrBD6wlj0ExLBBLCFijeG9FxOE4pZuKMWi0vG4Qg2EbxNe5tJX7sh2GNCd+BFGIkL0vPkhDoSEqJYEhBBBCEELDZRso+FFzomJEEPQxEEoXFELMCR8L/Ikkdis0uhLinsEKC8fIw0LQ0I8WEiFggihJmlGylLi5XGlEd8FjvhcIQtCYhEl+u3/H+X9qQb1E98kPpiGyF1rJ9xhDYhGNfEK3AmFkuDZdYReK4dYSFiUhcI6LwTwsLDae/wAPH7+olBtzJtNDYnv9g7SmEJCELDDEs1QXCsnil9FsuEMTEUhBaLcrZBawnjwRvDz/AB/nr6iC9mLYugo+A4ANa2UI7EKGjhCgo4JEy8P04QSIPsRJwb4rEZsTw3z34eBI0tLBT4/Hwyg9h7G7ZRYQhI0DBBGWCcEuLw2T0FyeE8JCWUjo7E0XFx2fS2//ABEp22Ik9D6Hle/Aj+D7kIQRBeBchYhZUQuNG/QWJvmsIuhDwsdkGsdiYldjFBfr8sSJMFsm+hzT0hqMgkQhMGEuSSEhYgkJcExvC9KE49Y6WFopKJQhDdlV5XwN7F8eUN4OZJKtil8j7EZ2LhbvIO9saJw0EHMcsSCCRCei+Gxems74rCwkpK5Jr2ur+xZlWn2ot/v8lYz+C/2d19RIRbpt9/7rwQREkJUug13YyRYJUiUGLHiFgWsEhejcLM9FcfOUxDwh6YwnUSjvappVPaHoLfa8X4+DvRev74oZdHR9LoT2JkpI2wVIIFAvWF6lwli4uVrPkQ1mxv8Aq+P4939P4SSKWD2MO00ntlpWKGjIrXBYYb0pl8exC5z0khjcP0n7/QhaRDY0JoVbQlZaD8CgQ0HrOovDobomUIr1BeKzRCxSiKJ4oncvDSFY1t4vv+jru/fyQQmIaF2N4IHHQ3rif6KI6GrHO/B9D1hCVFgvQby+D40sxOMxZ2drv6Hiv3fj9nlf+vgTRi+BvCFQ2EniC0hCNhuPIuhyyD5DwSEEsF1xvrJCR3yQkeHnlibSv3ZTR2JUTQQ0FoXyXL4ErcI04zsfhRjXg0wJXCkF1mDwpTCwXFcHyWeuKz1l4v4oIJJESCeLRKjZONFeJN4b+4p6jzap+z7KvP8Ab9D1P+HhlPb70/8AwbORtC40JzBNcFobEdBdZeEuEF6DFyRRA7GQL6kNxKD2yknoa80HZ10vktdv8iiPaH2HhmKH1PleRluhl4ifq84J4bMokIJcZwhMUvFcZwY0XYir7CEhPwNBMpdbIpbf75La0XwbPBMEEsL/AAvr4f8AkWPoDMn9UXU68YlINzKCQsJCWE56NGy5hMpTKFwR+Ji6Eh0SwhLYzNtaL6Ti+C0kEIQWBYqQdc0+6/wdBkzWrtCeMIMMaF4KLIXoLhOEwkQgsJEPZt9xItIYmM6O9Y/tTbHr7HiEEhBBCjFWBFkNDRTf+plS/qK8CzqUWSGKUTyYb0kpwj4IRMJYm/C7EpGkJ3FGyT7xjKEwiCQlhLJSyG2E4m6NoxbFhNwIJCwIJeiniiEIayhlySQUSQkIbRsU9lj1iWJrBLCKJiYtFwJJCSwfo+inxkKUSEokXBCCwUJ6SxM0QohcHv5BMfL7xTwPV2MrV1+R8ZWNEIJCvGCwlFgpghD3MYWntCQkSgkTCQwRSL1ITC5LNEe4f4I28NJC4W39mMq1GEEosoUsOhhiLiwpCEEkhIWU1BieIIQ9ZMvBbysJEIe3K/JCUWxl2zyK8x/gRwohIhEJbySEzQmi5DBEQQSgkIJwYagmL+gMWijwniYQkQetRmup3PwIuoObtMrBChoSNjCSD2JYkEqIyIIpEJMghZQg0JhMTE/6ClxRFwgtISsZt835xXDckQaPI+sJluNIJCaOsIJCEwlhLhBMEEhevcIRBZQp2G0XBSCmNUxo0FvCiEdMUEhbEpgSEg1hIXKDQgkJT1v/xAApEQEBAQACAgECBQUBAQAAAAABABEQISAxQTBRQGGhsdFxgZHB8OHx/9oACAECAQE/EA2zjLJJvXJEEEQ4PwJL5LznPx4MMMM8PBLOpj1y8M8ZZBBBHr8Gy2274NtsPkl7jkC9qG3I+xwgI42Uzp4L3Dbw2WZsssggiH198H1P0Q8es3X8rrOp/wB8yNq22gfv/B47wK23OJm8CbbbwPARHO/SbPDYbZeV43l4756Xs/8AfN7Fw+xYtfiOQ/2Pz+fXGx4gxZq52HhvIQ4OByeO22cPhvO28ZzvKWSBq3T9n9LoF19iLD5g/EmJz5/tZj2+88HGUspteBjNmbctjuIIizgYbedjgeM5PBs43y22DjpDtke09s5XLNG3Yu18/wAS+X2nqWWW22Z4DYIIIPE8S2J8N465ySeV5TgXt3dDuFswZFiwTrKlexn5W287ySymLPK8ZBCCPELJjrgPLOAs5ecsnjbbbt+39rR142D7y5AlebNsn38fbgPA2yzl2ertKWWeTLIIIPE8sstvjk52zjPFsmbOPfo/q/wfrl2g9p9dQi19pnDs/Hu/pJPqSXPMasa1rwBZwCzwzgILNg5Hfr5w+Dqnr93z/H9pbSD3euWMEnnQ+8pDu8MzCWczwnitbq+GQWcByZwcZZ4B4FsH00sstH5fH9f/AD3LL7XpENl+0AgNwZZwzw5eIBrrw3neCI8Mg43keFtjnbfpZZZD8N+75lg33CZf5fzJz6IAHxHLMpXRKfAB9Asg+k8D4t8cbb5By3pfbo/mW7GE0MIj8fmffL+kW22yy8SNSzwE+WQ8ngs4XLbPPOM4PANjrhmCdEiv18S8Cb7D3Fs9vANtttvEXTmFl5HJfFgQcnG8nVtt7jqY65HfMt4Mgsfhv8knw8bkQVepV8D9Zs2DL1MHoy9ch4yjwBFzGy+bbweWeSTzl1weAcsxA3c7h/1MRJnrt/4lzJ+bc/yRvpfeHr/v62zBzgEg9T7lOJuEUMHGrLs/S7+mtscZxmwSTHl8WTE7hyL8+fZ7mfgPT+X53R3kMZhw937ZJLc8CLtW7Xh/CngbL1wO85ZHAWckvAhOf+H5v+v+1F14L2Qul+QyyeC4MbWXgjhJJPwG2+BYyWZHBDxlnIxbbYmtjv8Ak/iRKvfgupugsFPmaskeuKl4IgcjxB+APBmWcZZBZ9DIbVkJnZvd+vtw9+A5Hd/dI4+pEbbuQmfcQRwyTJfwhn1vSherrF50nte287ls8k46fF0dz1wXfANLKYjg4Me5fJln0dtt4PpbfMX4JDtw+1t8cbY4HcmzMevm6Gx2cYWh/wD7weLcmvYdwXqG222WZ8D6nxznJ5rqc+G7bVhx6ZetsJpaQqPk/acN2+Mx9+/6XqP8WDTP9vtxlnt7/J/7+P6BXoZ65DdmyySyGGXkvgcbzvmcHPUPk6bolS9fHDi9wcfM6dwbdpk9haT0/wBO5rT2AdBZkX9pt+z8P9raLOhP9n5PsjUfUjp/R/7/AL/MpShk4JwSTjbSWfo7bHlkE8lngAV9T5np6/m22S04ZZKa9LuezAQcbw7TMg/uH3P5PZ/iZB9M0D2emHb5PfII7g5Fm2ec+jkHhsc7zkdcbbx+6f4ngMJ5OADZamv5wYQcLMYc7oY2l7H6P/v73zlLH8lns3ko4MmSySyfFtsfQe48Nth5WV9yX6Tq6wQRBKdEcHsicOoh4bbbwZzMYEeiGO6xP8iQjgt6tmyySySSfEbfobwS8jDPGo+X0TD2MxZHVqfbBvCZZeCy8gx4Ryl4Lj02zjeGwc9Syy+GWWfQZh8CIJZbaTmfcXTDr5ig4Sw2xF4eWfMLbGITvzYPntCpZZYYhl4Nbv0Ms8s5Ak5JgL6Jen0euPd84ToOizZ+/j8rDOEzYm8hu0smXFTNtmF2ae+d5EeQ38Klk8H1dh9H6w2R9pTLh+pZ5wjgL3w6xwwjHBrwPA0ltmMeDUMuFtn8GPFbeNvvq/Sx9sA6dhPQXZELaxN6mbZQ9cFFnyDWLLLLyXrgHZNmfw28NssqfxB9t+h/eX2/Yi5dljg8Q8NJkfALdJup4mbLPkT4SSz62eBznDwsLo/A+Pzu/ILvbbDwOwTMzgcyt4YzeXzURm2/WPotl6Q7jguEJYeDGCzwSl5FW8Lhnz22H6//xAAnEAEAAgICAgICAwADAQAAAAABABEhMRBBUWFxgSCRMKGxwdHw4f/aAAgBAQABPxC2JlBL4sxx8ApgIMpux1ERdxmuAzCVKmp1OuAlSoSqhCEqBBDmGJAxCahgl3waqdzqYlPqCRLJbKpvKuETFhQNuIYSptCFloXiMHAh4uMuLh56hycHAQiSvwIOBwWu5rBcBUqoMMtl4nsixcTCMaMsP0gy/RLS4pVHqh/wQHKKHM8Ob+ywZuV84lFY9w3eIZcOGUwsxLrFZTOOLcfmlU0xPCWR95iZYtRgeKgQhwEDkgQ7lQJUeWriBcIFAqGo4OJcRH5g3GkOsNMxsd3hdH236l5cx3z/AB9VGgo2kq/+9yhHi0mSiye1QlwFQY4q2ZYz1x6yzCXqUaRswFamJCvHRChEjruPURjweJWIk7hKlcdQODg5CVK3ByBKxKzOptBxGLnghtAknigi/QfVsY1dvbHjY/5GcQ5cMoh6802EsaKwCbA7a8p8Fy1gk1FmTHS6nqlRqXdT0ygg1BcsI4VN9So4LUKOPBlQh74BKzKgSoFcEJiHAQJpPhwkuKLFSoQFEvHElWCtGgJXuMW4vvX9XGgYqWQ/LbFJcld7hkA8soL2LxuINdBbc9bP/rqANGp5/b48EMKrgFy5mCNQRwSs7YMqhNYpUyhlqUOYeJuhDElQhMSuCVwQIHcz+HhB6ivECEYjDcylkKRYmYskuDnn+no+6mUB5H6V5+W2D22AO4YP2RC8/Us6/IhMqTrHyuiAnqtNDWh6P7/yg4dSs8ARJeMmGGYYYwPuPMRUEjG3ncOIqw5CE+uO+DXBDcPyJcWYoa4OB8V2blW1dkK8ej2/QxNHGFFP2f49RFZb9wqcEyGvcpTDpe0bXeGIMs81GGBqX9+Ja9BF1GvbnLMVyiFkqyMvDVmGiWvJimYoDxKMzAi1Em3PCrjqVUKj8zuEIy/xNfgsuHBOocHljIUwtDaXzKExlzbv2+f08xU8rYKe2LsrALILP6DzPlaYy/cQqfFSf7MoEE2McB+i0folIE6k83WX0wrVY3KrmUqETuDPEiyqM2CmCYuFa1LzBB1K02zbw2Tc6gwYzqH4Gp98kJ3+XXNwvzGyrcKptF6LKU9d9UQpVV7h9AgKlni4Qg0CGbOmDI8MA9RQbUwPZO2BgZuaRKfLoPmWQ1OYhqlS6UtvmjERUWZcVBWJpwRZV1LViKxPEc6jPUp3MMp4j+ZhHGo9suXcGXu51Dg4OCViGeA4PcxO/wAji4blIT5x+544Aaaf7H+qlh53L36hOvI99kuRUo/tFYmFuyUAkOBodTf648QGs6wLasDox/vG8sh1FcN9SpCi7qCmoB1PXBhnUpKJRCUstluLl2S4TPFwccnITrgPxXhhOp3Bjgw4AESubJZ/Qf2kYZsu4j829vRKlEG1IxCCADQ8j4iP3IH+kU5OwfRixrvxiawfkH0RWcbRQLZhl7TKo8RFOpeanrgkKr8AENcP4HAcXwQgSpUCVx55J3LnXJ+AwbllWoAWr1HrlUdAc/Zz8VAYQK18HcwrezzFqAUq/MtmE+C9npqk+PEbWLYrQgvkt6mHAMKtaKzwrHBzOipe8JRjpTLuoR1CIASw4DBArgQKlYmNwUiwlcHHmEN8HO0eTmuOo8GYstnrgmQPTTTp+zR9+ItxONeoGVYz2wKkm3OVuvSV/cxC9jGVJNmkgfsEtkOCValaY9/0RyR4FXqBtlzNfED1Kpj1KJiY/AeoMco7lAl0XghC4EODUCEMXL/O8Q5udQhEjB4AMuXldD2sarSF2OsegiV5K1U0Hlq9xeXo3AdgAnxYPkGKiIQaWtPstv1KVi+ouoi3XAEMEh1CRi1xUHFg4WiSj8FFZb+BAhDk1x1Dg4qp5/JlLLBBgWrBd4TZ/fhGOCax9kdiZg9I6XhaLQf/AH1Gi7Mb/wC3+fuFnsdsvfQvzL6L8ZnmcxEC/AWtYeG731ACAAKAMEvtqbS1LBqIbIt6iRTBVhmHMqJXxYJSU/IZ1yQhCEN8EITz+JyS4pxcUrgwUxKMV0d5iX5Nn/2EVBtV3yIsOsmHpLgK2JE85Y+iJwKjgsEaA9LbemtRC8Sh/BUuvcastj1K3Oi8dRwbK5RCl/OvuUFAHgKP8huKtE8SGskAajYcR1xAnUM2f1CMEI4GyUfwjDjEqUwhCVCHPTBK4vgjOp1xqXczBplDAgw9QGEdjFnKSNB0njRkmzq6q5umh3Lo7DKAtt+rmNKdvqW5sMy4sI+kjtFgrbYKimYaNFIV/d/cWZilzKM1MtRRpjtJj1AOoB1BRHmbR/xEMwhOuCEITrj75oPwvi/wYyrYDE6juwu2Bwg/+nzFdNr3K3OzgRJTY+Tr7gmWfdHZCr2ljflBPIqbtEF9ZDEVl1hvcCAxcSl1KSARCopUUWYfmD5ln8NQ5OA4Ic4qD+Oody8QZcshEmXCe/rKB8stY8tFfF6e3PxEqBartiK1EhbIeqLmGDZRjV9t/r9xWaGg1XklIMxbp3b9UfUqc6hB1FF8Uw4LIKiqYJXDgW9xZbFZ/CQg8EOCMvg3zcZfFwZcWDDtBuFXXUD8XuHhEotN+Nv9SuNNq+iMfcUnbLRzL2Yq4BRbdwMlkXpf80fqJp3FYCoa73Mt1xWgtBYOCj6iWO5bTg3VBMCKiZIuNhjWd0NcV/BmEPXA9cGp1Djrj44HHFy5cvMGXCGKtWhb63BSMxT+xz/U8Q3pg/8AGqj1G2sf9ytgIJWoa1awdKboah5ZkXmNhtq6gqFMBkJmAEpTbIX1fjplxA90Jkyez2J5EsiiL0xLviGmWLI4CwUmRcGIODhmTwUQQQcrUYtmnBxc7lwzCVidcY4Nfwo6DRn/AMx5YH2jMoPfa+2KlfawyqVnSxm0eAgoJsunKXwukLXH6A/vYLF701oRzHqvT5I+fS2YLWr+5nIZfBdYjcUVVJHbqRwyUiJnrMMtqmQ3t8+SUAD0afaHScKmYpRtgjZG5I3NYycEdQcXw6iy4Zg1DUNfgQ4V+OUYfhcJoX4b6Y/76jyctBo6B4lnivYQw5eiWxu1Zb6hQLFXWfhgdyyGiaq5NSptTPzEgl/0MS17TYo6muWAbHpGANMCADTfCL0eYudFQshFJkCVnq9MFoU2FyUDgUMDWaMSgnmVN6TLYtIXs8ywVEx6nUvTuhVe6M43YwgwealrA6R8RRq4BSaSmFoBAYhAhDBBU7w1GVKgQYzAxuBidSuCEJWJX4E6nmLF4ueJ+5j/AJfUfiys4/73axqy7hlWNC7RyV+4IKtslu6s/uXVGTIxu3Tuo1Ors7IHaFUUBfWXBDRmiEj0q0+CJhi1gWqFgPNw3n3SfFqyZAVG6vFpamiQaAoIeRlzcVKd0WCPqLXzfUBd3BKCoDwRH96RhpkMDAmd+e4egRX1nfhc/QzRwUbh4DqY98dqixY4wckeoHRCVKhFEo4wSo1FhMIQZ5mIQ7hNcMeGhIeoBtY/CU031/1HR9xbTMqcu7NsJpFZeGCSjc5auIwY/pjPXyHuIhvSmceEZwpGjfFg/vEKCpS/mNH0RRV4iLuC3ARLEQeNk4AoGxg/SqOqaYWVQI0s3OkV8Kks88zanD7VNX9oyx5TUYWH0ZPs6lEFES5hFZmy0lE1rgMrzX8HRERi4QTuaRYQhi5eIvFRICtEOwWzcdFvB37x1Ea5tFEGl5SXb8Re6vEOlM7nV1UVijkWr9RJHgUxNKNVjOYuLgPsnaK/pEytgwgvXJNjUMtRNCJblQWI7EggZ/hTK3z0vcKQhne/c8+XyN4c6dHBstgd/wDRh+1IWB0j4gxKxLJtmDMXAaJXhpgsVk0/gGXiHHtMItwnXAxAxGOoMNkIDURAa9mU7e/H78ShO1pS1VyxAlFBUFAf8TMPiHaBAlrwRH0rTotY7yfuKaaooDJdLzv3bKgehoHqJEg258YczXgRIU0aQPETAnY6O10j/wCphElp4z36H+inUaJ/HxPgGiOk9MvnWnBXq99vHwniBUsqoBIE2xCxwXmW3HuCxvA/4SEGDBgmUnHtw+omL4hmEMcCpfsfT/5LulM7i2OpS1LepeQZgT4I8FJblW0rurfr3K1R6aU2vbARwRZhthQ3qHjHlHBT1MHAwYBqs0u/Y78YZbKUdva/s1dJtjjQAWBWFa6bH3nbL7mruk0+zT7iuGFp6JUJqK5UBiLylH8BUOLhxp3AckSBBGOEVsAsrFHZnoHtjpcq+oiGQMsUKZXcJewgwdeHAv2xEprNlOrna1rNRrw4NHy+X3MdwQSRN1KYcwFRZqU6mbiXsxcBkBWo2NR34wwDXu8P040YVwFGV38nnF7GB+vSxNLbWQU6YeI8DSMTPCRd1PXBIAP4RhDWZ3CfOYQuVF3FiKdRS8xmU2KAbY0UMjs8/bDFquOsrjIooA7jfHPFauqgzs/AwpRt07VHtMV4vzCbIsGH0RdxQqZJ6ZcaiqsIi1ESCJdjXxrSk4V4G3UPndE3VoYtK3eoVDIHJC6L8Fv7ZXxAGBUQrXCqz1z1wCAH8h4hCHBYLBmCEaRy8zvwyMB17D+36jdWP8J6TLjoABaszbLUdZB5Wb8e4scGky608qxHqUOSF04F4gNSp1ANVEPBGSwjNJLiUxL1KXBaTZjhu4KkGoOAXC/CZ1/MMHi4TSEqCAyxG44Q21oLdMX8uiEGcKIGaTySpP57oF+AMK3nqYALQfoM/wBjG7ZxjD0NPvfxCdwXMHKpRGsNwyBUrPEoC2JZupX1L+pT1OqohOiYuM6lYjuNphgqKoiVhr+YZSDGKDCViE3lpBrUISz264D5YKF1GYNausUdEv6MPYNtQ9325+Jc5wNXCnzCbJpqOMQJbpL2gCAOYzaVYXXjoISNwkPFAOoPiV9QMPCCaTSdSkpMEOXh5iBX84MGDdwfMIOY5cILlEDQy4hKCxcD6C6O30zTlAPEC8EHxAdIl2ph1CRqUtIQGVYRzFyxLiVkFsKsyg43zPMcR3ACHMMOPwSypjY5szwoQZmn8twgwXDc7/AwiVE0iM3ZCvUGrgIjCQcCMwUyVjhqKWDLmFBhVBUF1AZQgSBiDHBghr8QSJgCBUAfzf/Z";const Zy=(t,e)=>{var i;void 0!==(null==e?void 0:e.fit)?t.style.setProperty("--frigate-card-media-layout-fit",e.fit):t.style.removeProperty("--frigate-card-media-layout-fit");for(const n of["x","y"])void 0!==(null===(i=null==e?void 0:e.position)||void 0===i?void 0:i[n])?t.style.setProperty(`--frigate-card-media-layout-position-${n}`,`${e.position[n]}%`):t.style.removeProperty(`--frigate-card-media-layout-position-${n}`)};function Xy(t){let e;return e=t instanceof Event?t.composedPath()[0]:t,e instanceof HTMLImageElement?{width:e.naturalWidth,height:e.naturalHeight}:e instanceof HTMLVideoElement?{width:e.videoWidth,height:e.videoHeight}:e instanceof HTMLCanvasElement?{width:e.width,height:e.height}:null}function t_(t,e){const i=Xy(e);i&&e_(t,i)}function e_(t,e){Dg(t,"media:loaded",e)}function i_(t){return t.height>=50&&t.width>=50}let n_=class extends gt{constructor(){super(...arguments),this._refImage=zt(),this._boundVisibilityHandler=this._visibilityHandler.bind(this)}_getCameraEntity(){var t,e,i,n;return null!==(n=(null===(t=this.cameraConfig)||void 0===t?void 0:t.camera_entity)||(null===(i=null===(e=this.cameraConfig)||void 0===e?void 0:e.webrtc_card)||void 0===i?void 0:i.entity))&&void 0!==n?n:null}shouldUpdate(t){var e,i;if(!this.hass||"visible"!==document.visibilityState)return!1;const n=this._getCameraEntity();return!t.has("hass")||1!=t.size||"camera"!==(null===(e=this.imageConfig)||void 0===e?void 0:e.mode)||!n||!!ny(this.hass,t.get("hass"),[n])&&(null===(i=this._cachedValueController)||void 0===i||i.clearValue(),!0)}willUpdate(t){var e,i,n,o,r;t.has("imageConfig")&&(this._cachedValueController&&this._cachedValueController.removeController(),this.imageConfig&&(this._cachedValueController=new Jy(this,this.imageConfig.refresh_seconds,this._getImageSource.bind(this))),Zy(this,null===(e=this.imageConfig)||void 0===e?void 0:e.layout)),(t.has("cameraConfig")||t.has("view")||"camera"===(null===(i=this.imageConfig)||void 0===i?void 0:i.mode)&&!this._getAcceptableState(this._getCameraEntity()))&&(null===(n=this._cachedValueController)||void 0===n||n.clearValue()),(null===(o=this._cachedValueController)||void 0===o?void 0:o.value)||null===(r=this._cachedValueController)||void 0===r||r.updateValue()}_getAcceptableState(t){var e,i;const n=null!==(i=t?null===(e=this.hass)||void 0===e?void 0:e.states[t]:null)&&void 0!==i?i:null;return this.hass&&this.hass.connected&&n&&Date.now()-Date.parse(n.last_updated)<3e5?n:null}connectedCallback(){var t;super.connectedCallback(),document.addEventListener("visibilitychange",this._boundVisibilityHandler),null===(t=this._cachedValueController)||void 0===t||t.startTimer()}disconnectedCallback(){var t;null===(t=this._cachedValueController)||void 0===t||t.stopTimer(),document.removeEventListener("visibilitychange",this._boundVisibilityHandler),super.disconnectedCallback()}_visibilityHandler(){var t,e,i;this._refImage.value&&("hidden"===document.visibilityState?(null===(t=this._cachedValueController)||void 0===t||t.stopTimer(),null===(e=this._cachedValueController)||void 0===e||e.clearValue(),this._forceSafeImage()):(null===(i=this._cachedValueController)||void 0===i||i.startTimer(),this.requestUpdate()))}_buildImageURL(t){const e=new URL(t,document.baseURI);return e.searchParams.append("_t",String(Date.now())),e.toString()}_getImageSource(){var t,e,i;if(this.hass&&"camera"===(null===(t=this.imageConfig)||void 0===t?void 0:t.mode)){const t=this._getAcceptableState(this._getCameraEntity());if(null==t?void 0:t.attributes.entity_picture)return this._buildImageURL(t.attributes.entity_picture)}return"screensaver"!==(null===(e=this.imageConfig)||void 0===e?void 0:e.mode)&&(null===(i=this.imageConfig)||void 0===i?void 0:i.url)?this._buildImageURL(this.imageConfig.url):Ky}_forceSafeImage(t){var e;this._refImage.value&&(this._refImage.value.src=!t&&(null===(e=this.imageConfig)||void 0===e?void 0:e.url)?this.imageConfig.url:Ky)}render(){var t;const e=null===(t=this._cachedValueController)||void 0===t?void 0:t.value;return e?K` {t_(this,t)}} + @error=${()=>{var t,e;"camera"===(null===(t=this.imageConfig)||void 0===t?void 0:t.mode)?this._forceSafeImage(!0):"url"===(null===(e=this.imageConfig)||void 0===e?void 0:e.mode)&&Gg(this,Sg("error.image_load_error"),{context:this.imageConfig})}} + />`:K``}static get styles(){return _("img {\n width: 100%;\n height: 100%;\n display: block;\n object-fit: var(--frigate-card-media-layout-fit, contain);\n object-position: var(--frigate-card-media-layout-position-x, 50%) var(--frigate-card-media-layout-position-y, 50%);\n}")}};function o_(){return o_=Object.assign?Object.assign.bind():function(t){for(var e=1;e"string"==typeof t&&t.constructor===String,l_=t=>"Promise"===Object.prototype.toString.call(t).slice(8,-1);var d_="WJ3NAvwFY9",c_="tR2-0dd-e1",h_="ZgIIHVSSYI",u_="kAA8SjbHe2",A_="OueN4AU4CJ";!function(t,e){void 0===e&&(e={});var i=e.insertAt;if(t&&"undefined"!=typeof document){var n=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css","top"===i&&n.firstChild?n.insertBefore(o,n.firstChild):n.appendChild(o),o.styleSheet?o.styleSheet.cssText=t:o.appendChild(document.createTextNode(t))}}(".WJ3NAvwFY9,.ZgIIHVSSYI,.kAA8SjbHe2,.tR2-0dd-e1{height:100%;left:0;position:absolute;top:0;width:100%;z-index:1}.ZgIIHVSSYI{-ms-flex-pack:center;-ms-flex-align:center;-webkit-align-items:center;align-items:center;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-justify-content:center;justify-content:center}.WJ3NAvwFY9,.tR2-0dd-e1{display:block}.tR2-0dd-e1.OueN4AU4CJ{display:none}.ZgIIHVSSYI,.kAA8SjbHe2{-webkit-tap-highlight-color:rgba(255,0,0,0);cursor:pointer;opacity:.7}.OueN4AU4CJ.ZgIIHVSSYI,.OueN4AU4CJ.kAA8SjbHe2{display:none}.ZgIIHVSSYI{z-index:10}.ZgIIHVSSYI>svg{fill:#fff;height:12vw;max-height:60px;max-width:60px;width:12vw}.kAA8SjbHe2{-ms-flex-pack:end;-ms-flex-align:end;-webkit-align-items:flex-end;align-items:flex-end;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-justify-content:flex-end;justify-content:flex-end;z-index:10}.kAA8SjbHe2>svg{fill:#fff;height:9vw;margin:0 15px 15px 0;max-height:40px;max-width:40px;width:9vw}");var p_=function(){function t(t,e,i,n){var o=void 0===i?{}:i,r=o.canvas,s=void 0===r?"":r,a=o.poster,l=void 0===a?"":a,d=o.autoplay,c=void 0!==d&&d,h=o.autoSetWrapperSize,u=void 0!==h&&h,A=o.loop,p=void 0!==A&&A,m=o.control,g=void 0===m||m,f=o.decodeFirstFrame,v=void 0===f||f,b=o.picMode,y=void 0!==b&&b,_=o.progressive,w=void 0===_||_,C=o.chunkSize,I=void 0===C?1048576:C,E=o.hooks,x=void 0===E?{}:E;void 0===n&&(n={}),this.options=o_({videoUrl:e,canvas:s,poster:l,picMode:y,autoplay:c,autoSetWrapperSize:u,loop:p,control:g,decodeFirstFrame:v,progressive:w,chunkSize:I,hooks:o_({play:function(){},pause:function(){},stop:function(){},load:function(){}},x)},n),this.options.needPlayButton=this.options.control&&!this.options.picMode,this.player=null,this.els={wrapper:a_(t)?document.querySelector(t):t,canvas:null,playButton:document.createElement("div"),unmuteButton:null,poster:null},"static"===window.getComputedStyle(this.els.wrapper).getPropertyValue("position")&&(this.els.wrapper.style.position="relative"),this.els.wrapper.clientRect=this.els.wrapper.getBoundingClientRect(),this.initCanvas(),this.initPlayButton(),this.initPlayer()}var e=t.prototype;return e.initCanvas=function(){this.options.canvas?this.els.canvas=a_(this.options.canvas)?document.querySelector(this.options.canvas):this.options.canvas:(this.els.canvas=document.createElement("canvas"),this.els.canvas.classList.add(d_),this.els.wrapper.appendChild(this.els.canvas))},e.initPlayer=function(){var t=this;this.options=o_(this.options,{canvas:this.els.canvas});var e=o_({},this.options,{autoplay:!1});if(this.player=new T_(this.options.videoUrl,e,{play:function(){t.options.needPlayButton&&t.els.playButton.classList.add(A_),t.els.poster&&t.els.poster.classList.add(A_),t.options.hooks.play()},pause:function(){t.options.needPlayButton&&t.els.playButton.classList.remove(A_),t.options.hooks.pause()},stop:function(){t.els.poster&&t.els.poster.classList.remove(A_),t.options.hooks.stop()},load:function(){t.options.autoplay&&t.play(),t._autoSetWrapperSize(),t.options.hooks.load()}}),this._copyPlayerFuncs(),this.els.wrapper.playerInstance=this.player,!this.options.poster||this.options.autoplay||this.player.options.streaming||(this.options.decodeFirstFrame=!1,this.els.poster=new Image,this.els.poster.src=this.options.poster,this.els.poster.classList.add(c_),this.els.wrapper.appendChild(this.els.poster)),this.player.options.streaming||this.els.wrapper.addEventListener("click",this.onClick.bind(this)),(this.options.autoplay||this.player.options.streaming)&&this.els.playButton.classList.add(A_),this.player.audioOut&&!this.player.audioOut.unlocked){var i=this.els.wrapper;(this.options.autoplay||this.player.options.streaming)&&(this.els.unmuteButton=document.createElement("div"),this.els.unmuteButton.innerHTML='\n\n \n\n',this.els.unmuteButton.classList.add(u_),this.els.wrapper.appendChild(this.els.unmuteButton),i=this.els.unmuteButton),this.unlockAudioBound=this.onUnlockAudio.bind(this,i),i.addEventListener("touchstart",this.unlockAudioBound,!1),i.addEventListener("click",this.unlockAudioBound,!0)}},e.initPlayButton=function(){this.options.needPlayButton&&(this.els.playButton.classList.add(h_),this.els.playButton.innerHTML='\n\n \n\n',this.els.wrapper.appendChild(this.els.playButton))},e._autoSetWrapperSize=function(){var t=this;if(!this.options.autoSetWrapperSize)return Promise.resolve();var e=this.player.video.destination;return e?Promise.resolve().then((function(){return function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return l_(t)?t:new Promise((i=>{t(),setTimeout(i,e)}))}((function(){t.els.wrapper.style.width=e.width+"px",t.els.wrapper.style.height=e.height+"px"}))})):Promise.resolve()},e.onUnlockAudio=function(t,e){var i=this;this.els.unmuteButton&&(e.preventDefault(),e.stopPropagation()),this.player.audioOut.unlock((function(){i.els.unmuteButton&&i.els.unmuteButton.classList.add(A_),t.removeEventListener("touchstart",i.unlockAudioBound),t.removeEventListener("click",i.unlockAudioBound)}))},e.onClick=function(){this.options.control&&(this.player.isPlaying?this.pause():this.play())},e._copyPlayerFuncs=function(){var t=this;this.play=function(){return t.player.play()},this.pause=function(){return t.player.pause()},this.stop=function(){return t.player.stop()},this.destroy=function(){t.player.destroy(),t.els.wrapper.innerHTML="",t.els.wrapper.playerInstance=null}},t}(),m_=function(){return window.performance?window.performance.now()/1e3:Date.now()/1e3},g_=function(t,e){if(t.fill)t.fill(e);else for(var i=0;it&&this.loadNextChunk())},e.destroy=function(){this.request.abort(),this.aborted=!0},e.loadNextChunk=function(){var t=this,e=this.loadedSize,i=Math.min(this.loadedSize+this.chunkSize-1,this.fileSize-1);if(e>=this.fileSize||this.aborted)return this.completed=!0,void(this.onCompletedCallback&&this.onCompletedCallback(this));this.isLoading=!0,this.loadStartTime=m_(),this.request=new XMLHttpRequest,this.request.onreadystatechange=function(){t.request.readyState===t.request.DONE&&t.request.status>=200&&t.request.status<300?t.onChunkLoad(t.request.response):t.request.readyState===t.request.DONE&&t.loadFails++<3&&t.loadNextChunk()},0===e&&(this.request.onprogress=this.onProgress.bind(this)),this.request.open("GET",this.url+"?"+e+"-"+i),this.request.setRequestHeader("Range","bytes="+e+"-"+i),this.request.responseType="arraybuffer",this.request.send()},e.onProgress=function(t){this.progress=t.loaded/t.total},e.onChunkLoad=function(t){var e=!this.established;this.established=!0,this.progress=1,this.loadedSize+=t.byteLength,this.loadFails=0,this.isLoading=!1,e&&this.hookOnEstablished&&this.hookOnEstablished(),e&&this.onEstablishedCallback&&this.onEstablishedCallback(this),this.destination&&this.destination.write(t),this.loadTime=m_()-this.loadStartTime,this.throttled||this.loadNextChunk()},t}(),y_=function(){function t(t,e){this.url=t,this.options=e,this.socket=null,this.streaming=!0,this.callbacks={connect:[],data:[]},this.destination=null,this.reconnectInterval=void 0!==e.reconnectInterval?e.reconnectInterval:5,this.shouldAttemptReconnect=!!this.reconnectInterval,this.completed=!1,this.established=!1,this.progress=0,this.reconnectTimeoutId=0,this.onEstablishedCallback=e.onSourceEstablished,this.onCompletedCallback=e.onSourceCompleted,e.hookOnEstablished&&(this.hookOnEstablished=e.hookOnEstablished)}var e=t.prototype;return e.connect=function(t){this.destination=t},e.destroy=function(){clearTimeout(this.reconnectTimeoutId),this.shouldAttemptReconnect=!1,this.socket.close()},e.start=function(){this.shouldAttemptReconnect=!!this.reconnectInterval,this.progress=0,this.established=!1,this.options.protocols?this.socket=new WebSocket(this.url,this.options.protocols):this.socket=new WebSocket(this.url),this.socket.binaryType="arraybuffer",this.socket.onmessage=this.onMessage.bind(this),this.socket.onopen=this.onOpen.bind(this),this.socket.onerror=this.onClose.bind(this),this.socket.onclose=this.onClose.bind(this)},e.resume=function(){},e.onOpen=function(){this.progress=1},e.onClose=function(){var t=this;this.shouldAttemptReconnect&&(clearTimeout(this.reconnectTimeoutId),this.reconnectTimeoutId=setTimeout((function(){t.start()}),1e3*this.reconnectInterval))},e.onMessage=function(t){var e=!this.established;this.established=!0,e&&this.hookOnEstablished&&this.hookOnEstablished(),e&&this.onEstablishedCallback&&this.onEstablishedCallback(this),this.destination&&this.destination.write(t.data)},t}(),__=function(){function t(e,i){"object"==typeof e?(this.bytes=e instanceof Uint8Array?e:new Uint8Array(e),this.byteLength=this.bytes.length):(this.bytes=new Uint8Array(e||1048576),this.byteLength=0),this.mode=i||t.MODE.EXPAND,this.index=0}var e=t.prototype;return e.resize=function(t){var e=new Uint8Array(t);0!==this.byteLength&&(this.byteLength=Math.min(this.byteLength,t),e.set(this.bytes,0,this.byteLength)),this.bytes=e,this.index=Math.min(this.index,this.byteLength<<3)},e.evict=function(t){var e=this.index>>3,i=this.bytes.length-this.byteLength;if(this.index===this.byteLength<<3||t>i+e)return this.byteLength=0,void(this.index=0);0!==e&&(this.bytes.copyWithin?this.bytes.copyWithin(0,e,this.byteLength):this.bytes.set(this.bytes.subarray(e,this.byteLength)),this.byteLength-=e,this.index-=e<<3)},e.write=function(e){var i="object"==typeof e[0],n=0,o=this.bytes.length-this.byteLength;if(i){n=0;for(var r=0;ro)if(this.mode===t.MODE.EXPAND){var s=Math.max(2*this.bytes.length,n-o);this.resize(s)}else this.evict(n);if(i)for(var a=0;a>3;t>3;return t>=this.byteLength||0===this.bytes[t]&&0===this.bytes[t+1]&&1===this.bytes[t+2]},e.peek=function(t){for(var e=this.index,i=0;t;){var n=8-(7&e),o=n>3]&255>>8-o<>r,e+=o,t-=o}return i},e.read=function(t){var e=this.peek(t);return this.index+=t,e},e.skip=function(t){return this.index+=t},e.rewind=function(t){this.index=Math.max(this.index-t,0)},e.has=function(t){return(this.byteLength<<3)-this.index>=t},t}();__.MODE={EVICT:1,EXPAND:2};var w_=function(){function t(){this.bits=null,this.leftoverBytes=null,this.guessVideoFrameEnd=!0,this.pidsToStreamIds={},this.pesPacketInfo={},this.startTime=0,this.currentTime=0}var e=t.prototype;return e.connect=function(t,e){this.pesPacketInfo[t]={destination:e,currentLength:0,totalLength:0,pts:0,buffers:[]}},e.write=function(t){if(this.leftoverBytes){var e=t.byteLength+this.leftoverBytes.byteLength;this.bits=new __(e),this.bits.write([this.leftoverBytes,t])}else this.bits=new __(t);for(;this.bits.has(1504)&&this.parsePacket(););var i=this.bits.byteLength-(this.bits.index>>3);this.leftoverBytes=i>0?this.bits.bytes.subarray(this.bits.index>>3):null},e.parsePacket=function(){if(71!==this.bits.read(8)&&!this.resync())return!1;var t=187+(this.bits.index>>3);this.bits.read(1);var e=this.bits.read(1);this.bits.read(1);var i=this.bits.read(13);this.bits.read(2);var n=this.bits.read(2);this.bits.read(4);var o=this.pidsToStreamIds[i];if(e&&o){var r=this.pesPacketInfo[o];r&&r.currentLength&&this.packetComplete(r)}if(1&n){if(2&n){var s=this.bits.read(8);this.bits.skip(s<<3)}if(e&&this.bits.nextBytesAreStartCode()){this.bits.skip(24),o=this.bits.read(8),this.pidsToStreamIds[i]=o;var a=this.bits.read(16);this.bits.skip(8);var l=this.bits.read(2);this.bits.skip(6);var d=this.bits.read(8),c=this.bits.index+(d<<3),h=this.pesPacketInfo[o];if(h){var u=0;if(2&l){this.bits.skip(4);var A=this.bits.read(3);this.bits.skip(1);var p=this.bits.read(15);this.bits.skip(1);var m=this.bits.read(15);this.bits.skip(1),u=(1073741824*A+32768*p+m)/9e4,this.currentTime=u,-1===this.startTime&&(this.startTime=u)}var g=a?a-d-3:0;this.packetStart(h,u,g)}this.bits.index=c}if(o){var f=this.pesPacketInfo[o];if(f){var v=this.bits.index>>3,b=!e&&2&n;(this.packetAddData(f,v,t)||this.guessVideoFrameEnd&&b)&&this.packetComplete(f)}}}return this.bits.index=t<<3,!0},e.resync=function(){if(!this.bits.has(9024))return!1;for(var t=this.bits.index>>3,e=0;e<187;e++)if(71===this.bits.bytes[t+e]){for(var i=!0,n=1;n<5;n++)if(71!==this.bits.bytes[t+e+188*n]){i=!1;break}if(i)return this.bits.index=t+e+1<<3,!0}return console.warn("JSMpeg: Possible garbage data. Skipping."),this.bits.skip(1496),!1},e.packetStart=function(t,e,i){t.totalLength=i,t.currentLength=0,t.pts=e},e.packetAddData=function(t,e,i){return t.buffers.push(this.bits.bytes.subarray(e,i)),t.currentLength+=i-e,0!==t.totalLength&&t.currentLength>=t.totalLength},e.packetComplete=function(t){t.destination.write(t.pts,t.buffers),t.totalLength=0,t.currentLength=0,t.buffers=[]},t}();w_.STREAM={PACK_HEADER:186,SYSTEM_HEADER:187,PROGRAM_MAP:188,PRIVATE_1:189,PADDING:190,PRIVATE_2:191,AUDIO_1:192,VIDEO_1:224,DIRECTORY:255};var C_=function(){function t(t){this.destination=null,this.canPlay=!1,this.collectTimestamps=!t.streaming,this.bytesWritten=0,this.timestamps=[],this.timestampIndex=0,this.startTime=0,this.decodedTime=0,Object.defineProperty(this,"currentTime",{get:this.getCurrentTime})}var e=t.prototype;return e.destroy=function(){},e.connect=function(t){this.destination=t},e.bufferGetIndex=function(){return this.bits.index},e.bufferSetIndex=function(t){this.bits.index=t},e.bufferWrite=function(t){return this.bits.write(t)},e.write=function(t,e){this.collectTimestamps&&(0===this.timestamps.length&&(this.startTime=t,this.decodedTime=t),this.timestamps.push({index:this.bytesWritten<<3,time:t})),this.bytesWritten+=this.bufferWrite(e),this.canPlay=!0},e.seek=function(t){if(this.collectTimestamps){this.timestampIndex=0;for(var e=0;et);e++)this.timestampIndex=e;var i=this.timestamps[this.timestampIndex];i?(this.bufferSetIndex(i.index),this.decodedTime=i.time):(this.bits.index=0,this.decodedTime=this.startTime)}},e.decode=function(){this.advanceDecodedTime(0)},e.advanceDecodedTime=function(t){if(this.collectTimestamps){for(var e=-1,i=this.bufferGetIndex(),n=this.timestampIndex;ni);n++)e=n;if(-1!==e&&e!==this.timestampIndex)return this.timestampIndex=e,void(this.decodedTime=this.timestamps[this.timestampIndex].time)}this.decodedTime+=t},e.getCurrentTime=function(){return this.decodedTime},t}(),I_=function(t){function e(e){var i;(i=t.call(this,e)||this).onDecodeCallback=e.onVideoDecode;var n=e.videoBufferSize||524288,o=e.streaming?__.MODE.EVICT:__.MODE.EXPAND;return i.bits=new __(n,o),i.customIntraQuantMatrix=new Uint8Array(64),i.customNonIntraQuantMatrix=new Uint8Array(64),i.blockData=new Int32Array(64),i.currentFrame=0,i.decodeFirstFrame=!1!==e.decodeFirstFrame,i}r_(e,t);var i=e.prototype;return i.write=function(t,i){if(C_.prototype.write.call(this,t,i),!this.hasSequenceHeader){if(-1===this.bits.findStartCode(e.START.SEQUENCE))return!1;this.decodeSequenceHeader(),this.decodeFirstFrame&&this.decode()}},i.decode=function(){var t=m_();if(!this.hasSequenceHeader)return!1;if(-1===this.bits.findStartCode(e.START.PICTURE))return!1;this.decodePicture(),this.advanceDecodedTime(1/this.frameRate);var i=m_()-t;return this.onDecodeCallback&&this.onDecodeCallback(this,i),!0},i.readHuffman=function(t){var e=0;do{e=t[e+this.bits.read(1)]}while(e>=0&&0!==t[e]);return t[e+2]},i.decodeSequenceHeader=function(){var t=this.bits.read(12),i=this.bits.read(12);if(this.bits.skip(4),this.frameRate=e.PICTURE_RATE[this.bits.read(4)],this.bits.skip(30),t===this.width&&i===this.height||(this.width=t,this.height=i,this.initBuffers(),this.destination&&this.destination.resize(t,i)),this.bits.read(1)){for(var n=0;n<64;n++)this.customIntraQuantMatrix[e.ZIG_ZAG[n]]=this.bits.read(8);this.intraQuantMatrix=this.customIntraQuantMatrix}if(this.bits.read(1)){for(var o=0;o<64;o++){var r=e.ZIG_ZAG[o];this.customNonIntraQuantMatrix[r]=this.bits.read(8)}this.nonIntraQuantMatrix=this.customNonIntraQuantMatrix}this.hasSequenceHeader=!0},i.initBuffers=function(){this.intraQuantMatrix=e.DEFAULT_INTRA_QUANT_MATRIX,this.nonIntraQuantMatrix=e.DEFAULT_NON_INTRA_QUANT_MATRIX,this.mbWidth=this.width+15>>4,this.mbHeight=this.height+15>>4,this.mbSize=this.mbWidth*this.mbHeight,this.codedWidth=this.mbWidth<<4,this.codedHeight=this.mbHeight<<4,this.codedSize=this.codedWidth*this.codedHeight,this.halfWidth=this.mbWidth<<3,this.halfHeight=this.mbHeight<<3,this.currentY=new Uint8ClampedArray(this.codedSize),this.currentY32=new Uint32Array(this.currentY.buffer),this.currentCr=new Uint8ClampedArray(this.codedSize>>2),this.currentCr32=new Uint32Array(this.currentCr.buffer),this.currentCb=new Uint8ClampedArray(this.codedSize>>2),this.currentCb32=new Uint32Array(this.currentCb.buffer),this.forwardY=new Uint8ClampedArray(this.codedSize),this.forwardY32=new Uint32Array(this.forwardY.buffer),this.forwardCr=new Uint8ClampedArray(this.codedSize>>2),this.forwardCr32=new Uint32Array(this.forwardCr.buffer),this.forwardCb=new Uint8ClampedArray(this.codedSize>>2),this.forwardCb32=new Uint32Array(this.forwardCb.buffer)},i.decodePicture=function(){if(this.currentFrame++,this.bits.skip(10),this.pictureType=this.bits.read(3),this.bits.skip(16),!(this.pictureType<=0||this.pictureType>=e.PICTURE_TYPE.B)){if(this.pictureType===e.PICTURE_TYPE.PREDICTIVE){if(this.fullPelForward=this.bits.read(1),this.forwardFCode=this.bits.read(3),0===this.forwardFCode)return;this.forwardRSize=this.forwardFCode-1,this.forwardF=1<=e.START.SLICE_FIRST&&t<=e.START.SLICE_LAST;)this.decodeSlice(255&t),t=this.bits.findNextStartCode();if(-1!==t&&this.bits.rewind(32),this.destination&&this.destination.render(this.currentY,this.currentCr,this.currentCb,!0),this.pictureType===e.PICTURE_TYPE.INTRA||this.pictureType===e.PICTURE_TYPE.PREDICTIVE){var i=this.forwardY,n=this.forwardY32,o=this.forwardCr,r=this.forwardCr32,s=this.forwardCb,a=this.forwardCb32;this.forwardY=this.currentY,this.forwardY32=this.currentY32,this.forwardCr=this.currentCr,this.forwardCr32=this.currentCr32,this.forwardCb=this.currentCb,this.forwardCb32=this.currentCb32,this.currentY=i,this.currentY32=n,this.currentCr=o,this.currentCr32=r,this.currentCb=s,this.currentCb32=a}}},i.decodeSlice=function(t){for(this.sliceBegin=!0,this.macroblockAddress=(t-1)*this.mbWidth-1,this.motionFwH=this.motionFwHPrev=0,this.motionFwV=this.motionFwVPrev=0,this.dcPredictorY=128,this.dcPredictorCr=128,this.dcPredictorCb=128,this.quantizerScale=this.bits.read(5);this.bits.read(1);)this.bits.skip(8);do{this.decodeMacroblock()}while(!this.bits.nextBytesAreStartCode())},i.decodeMacroblock=function(){for(var t=0,i=this.readHuffman(e.MACROBLOCK_ADDRESS_INCREMENT);34===i;)i=this.readHuffman(e.MACROBLOCK_ADDRESS_INCREMENT);for(;35===i;)t+=33,i=this.readHuffman(e.MACROBLOCK_ADDRESS_INCREMENT);if(t+=i,this.sliceBegin)this.sliceBegin=!1,this.macroblockAddress+=t;else{if(this.macroblockAddress+t>=this.mbSize)return;for(t>1&&(this.dcPredictorY=128,this.dcPredictorCr=128,this.dcPredictorCb=128,this.pictureType===e.PICTURE_TYPE.PREDICTIVE&&(this.motionFwH=this.motionFwHPrev=0,this.motionFwV=this.motionFwVPrev=0));t>1;)this.macroblockAddress++,this.mbRow=this.macroblockAddress/this.mbWidth|0,this.mbCol=this.macroblockAddress%this.mbWidth,this.copyMacroblock(this.motionFwH,this.motionFwV,this.forwardY,this.forwardCr,this.forwardCb),t--;this.macroblockAddress++}this.mbRow=this.macroblockAddress/this.mbWidth|0,this.mbCol=this.macroblockAddress%this.mbWidth;var n=e.MACROBLOCK_TYPE[this.pictureType];this.macroblockType=this.readHuffman(n),this.macroblockIntra=1&this.macroblockType,this.macroblockMotFw=8&this.macroblockType,0!=(16&this.macroblockType)&&(this.quantizerScale=this.bits.read(5)),this.macroblockIntra?(this.motionFwH=this.motionFwHPrev=0,this.motionFwV=this.motionFwVPrev=0):(this.dcPredictorY=128,this.dcPredictorCr=128,this.dcPredictorCb=128,this.decodeMotionVectors(),this.copyMacroblock(this.motionFwH,this.motionFwV,this.forwardY,this.forwardCr,this.forwardCb));for(var o=0!=(2&this.macroblockType)?this.readHuffman(e.CODE_BLOCK_PATTERN):this.macroblockIntra?63:0,r=0,s=32;r<6;r++)0!=(o&s)&&this.decodeBlock(r),s>>=1},i.decodeMotionVectors=function(){var t,i,n=0;this.macroblockMotFw?(0!==(t=this.readHuffman(e.MOTION))&&1!==this.forwardF?(n=this.bits.read(this.forwardRSize),i=(Math.abs(t)-1<(this.forwardF<<4)-1?this.motionFwHPrev-=this.forwardF<<5:this.motionFwHPrev<-this.forwardF<<4&&(this.motionFwHPrev+=this.forwardF<<5),this.motionFwH=this.motionFwHPrev,this.fullPelForward&&(this.motionFwH<<=1),0!==(t=this.readHuffman(e.MOTION))&&1!==this.forwardF?(n=this.bits.read(this.forwardRSize),i=(Math.abs(t)-1<(this.forwardF<<4)-1?this.motionFwVPrev-=this.forwardF<<5:this.motionFwVPrev<-this.forwardF<<4&&(this.motionFwVPrev+=this.forwardF<<5),this.motionFwV=this.motionFwVPrev,this.fullPelForward&&(this.motionFwV<<=1)):this.pictureType===e.PICTURE_TYPE.PREDICTIVE&&(this.motionFwH=this.motionFwHPrev=0,this.motionFwV=this.motionFwVPrev=0)},i.copyMacroblock=function(t,e,i,n,o){var r,s,a,l,d,c,h,u,A,p,m,g,f,v,b,y,_,w,C,I=this.currentY32,E=this.currentCb32,x=this.currentCr32;if(s=(r=this.codedWidth)-16,a=t>>1,l=e>>1,d=1==(1&t),c=1==(1&e),h=((this.mbRow<<4)+l)*r+(this.mbCol<<4)+a,A=(u=this.mbRow*r+this.mbCol<<2)+(r<<2),d)if(c)for(;u>2&255,f|=(m=i[++h]+i[h+r])+g+2<<6&65280,f|=m+(g=i[++h]+i[h+r])+2<<14&16711680,m=i[++h]+i[h+r],h++,f|=m+g+2<<22&4278190080,I[u++]=f;u+=s>>2,h+=s-1}else for(;u>1&255,f|=(m=i[h++])+g+1<<7&65280,f|=m+(g=i[h++])+1<<15&16711680,f|=(m=i[h++])+g+1<<23&4278190080,I[u++]=f;u+=s>>2,h+=s-1}else if(c)for(;u>1&255,f|=i[++h]+i[h+r]+1<<7&65280,f|=i[++h]+i[h+r]+1<<15&16711680,f|=i[++h]+i[h+r]+1<<23&4278190080,h++,I[u++]=f;u+=s>>2,h+=s}else for(;u>2,h+=s}if(s=(r=this.halfWidth)-8,a=t/2>>1,l=e/2>>1,d=1==(t/2&1),c=1==(e/2&1),h=((this.mbRow<<3)+l)*r+(this.mbCol<<3)+a,A=(u=this.mbRow*r+this.mbCol<<1)+(r<<1),d)if(c)for(;u>2&255,C=_+(w=o[h]+o[h+r])+2>>2&255,y|=(v=n[++h]+n[h+r])+b+2<<6&65280,C|=(_=o[h]+o[h+r])+w+2<<6&65280,y|=v+(b=n[++h]+n[h+r])+2<<14&16711680,C|=_+(w=o[h]+o[h+r])+2<<14&16711680,v=n[++h]+n[h+r],_=o[h]+o[h+r],h++,y|=v+b+2<<22&4278190080,C|=_+w+2<<22&4278190080,x[u]=y,E[u]=C,u++;u+=s>>2,h+=s-1}else for(;u>1&255,C=_+(w=o[h++])+1>>1&255,y|=(v=n[h])+b+1<<7&65280,C|=(_=o[h++])+w+1<<7&65280,y|=v+(b=n[h])+1<<15&16711680,C|=_+(w=o[h++])+1<<15&16711680,y|=(v=n[h])+b+1<<23&4278190080,C|=(_=o[h++])+w+1<<23&4278190080,x[u]=y,E[u]=C,u++;u+=s>>2,h+=s-1}else if(c)for(;u>1&255,C=o[h]+o[h+r]+1>>1&255,y|=n[++h]+n[h+r]+1<<7&65280,C|=o[h]+o[h+r]+1<<7&65280,y|=n[++h]+n[h+r]+1<<15&16711680,C|=o[h]+o[h+r]+1<<15&16711680,y|=n[++h]+n[h+r]+1<<23&4278190080,C|=o[h]+o[h+r]+1<<23&4278190080,h++,x[u]=y,E[u]=C,u++;u+=s>>2,h+=s}else for(;u>2,h+=s}},i.decodeBlock=function(t){var i,n=0;if(this.macroblockIntra){var o,r;if(t<4?(o=this.dcPredictorY,r=this.readHuffman(e.DCT_DC_SIZE_LUMINANCE)):(o=4===t?this.dcPredictorCr:this.dcPredictorCb,r=this.readHuffman(e.DCT_DC_SIZE_CHROMINANCE)),r>0){var s=this.bits.read(r);this.blockData[0]=0!=(s&1<0&&0===this.bits.read(1))break;65535===u?(h=this.bits.read(6),0===(c=this.bits.read(8))?c=this.bits.read(8):128===c?c=this.bits.read(8)-256:c>128&&(c-=256)):(h=u>>8,c=255&u,this.bits.read(1)&&(c=-c)),n+=h;var A=e.ZIG_ZAG[n];n++,c<<=1,this.macroblockIntra||(c+=c<0?-1:1),0==(1&(c=c*this.quantizerScale*i[A]>>4))&&(c-=c>0?1:-1),c>2047?c=2047:c<-2048&&(c=-2048),this.blockData[A]=c*e.PREMULTIPLIER_MATRIX[A]}t<4?(a=this.currentY,d=this.codedWidth-8,l=this.mbRow*this.codedWidth+this.mbCol<<4,0!=(1&t)&&(l+=8),0!=(2&t)&&(l+=this.codedWidth<<3)):(a=4===t?this.currentCb:this.currentCr,d=(this.codedWidth>>1)-8,l=(this.mbRow*this.codedWidth<<2)+(this.mbCol<<3)),this.macroblockIntra?1===n?(e.CopyValueToDestination(this.blockData[0]+128>>8,a,l,d),this.blockData[0]=0):(e.IDCT(this.blockData),e.CopyBlockToDestination(this.blockData,a,l,d),g_(this.blockData,0)):1===n?(e.AddValueToDestination(this.blockData[0]+128>>8,a,l,d),this.blockData[0]=0):(e.IDCT(this.blockData),e.AddBlockToDestination(this.blockData,a,l,d),g_(this.blockData,0)),n=0},e.CopyBlockToDestination=function(t,e,i,n){for(var o=0;o<64;o+=8,i+=n+8)e[i+0]=t[o+0],e[i+1]=t[o+1],e[i+2]=t[o+2],e[i+3]=t[o+3],e[i+4]=t[o+4],e[i+5]=t[o+5],e[i+6]=t[o+6],e[i+7]=t[o+7]},e.AddBlockToDestination=function(t,e,i,n){for(var o=0;o<64;o+=8,i+=n+8)e[i+0]+=t[o+0],e[i+1]+=t[o+1],e[i+2]+=t[o+2],e[i+3]+=t[o+3],e[i+4]+=t[o+4],e[i+5]+=t[o+5],e[i+6]+=t[o+6],e[i+7]+=t[o+7]},e.CopyValueToDestination=function(t,e,i,n){for(var o=0;o<64;o+=8,i+=n+8)e[i+0]=t,e[i+1]=t,e[i+2]=t,e[i+3]=t,e[i+4]=t,e[i+5]=t,e[i+6]=t,e[i+7]=t},e.AddValueToDestination=function(t,e,i,n){for(var o=0;o<64;o+=8,i+=n+8)e[i+0]+=t,e[i+1]+=t,e[i+2]+=t,e[i+3]+=t,e[i+4]+=t,e[i+5]+=t,e[i+6]+=t,e[i+7]+=t},e.IDCT=function(t){for(var e,i,n,o,r,s,a,l,d,c,h,u,A,p,m,g,f,v,b=0;b<8;++b)e=t[32+b],i=t[16+b]+t[48+b],n=t[40+b]-t[24+b],s=t[8+b]+t[56+b],a=t[24+b]+t[40+b],d=(A=(473*(o=t[8+b]-t[56+b])-196*n+128>>8)-(r=s+a))-(362*(s-a)+128>>8),p=(c=(l=t[0+b])-e)+(h=(362*(t[16+b]-t[48+b])+128>>8)-i),m=(u=l+e)+i,g=c-h,f=u-i,v=-d-(473*n+196*o+128>>8),t[0+b]=r+m,t[8+b]=A+p,t[16+b]=g-d,t[24+b]=f-v,t[32+b]=f+v,t[40+b]=d+g,t[48+b]=p-A,t[56+b]=m-r;for(var y=0;y<64;y+=8)e=t[4+y],i=t[2+y]+t[6+y],n=t[5+y]-t[3+y],s=t[1+y]+t[7+y],a=t[3+y]+t[5+y],d=(A=(473*(o=t[1+y]-t[7+y])-196*n+128>>8)-(r=s+a))-(362*(s-a)+128>>8),p=(c=(l=t[0+y])-e)+(h=(362*(t[2+y]-t[6+y])+128>>8)-i),m=(u=l+e)+i,g=c-h,f=u-i,v=-d-(473*n+196*o+128>>8),t[0+y]=r+m+128>>8,t[1+y]=A+p+128>>8,t[2+y]=g-d+128>>8,t[3+y]=f-v+128>>8,t[4+y]=f+v+128>>8,t[5+y]=d+g+128>>8,t[6+y]=p-A+128>>8,t[7+y]=m-r+128>>8},e}(C_);I_.prototype.frameRate=30,I_.prototype.currentY=null,I_.prototype.currentCr=null,I_.prototype.currentCb=null,I_.prototype.pictureType=0,I_.prototype.forwardY=null,I_.prototype.forwardCr=null,I_.prototype.forwardCb=null,I_.prototype.fullPelForward=!1,I_.prototype.forwardFCode=0,I_.prototype.forwardRSize=0,I_.prototype.forwardF=0,I_.prototype.quantizerScale=0,I_.prototype.sliceBegin=!1,I_.prototype.macroblockAddress=0,I_.prototype.mbRow=0,I_.prototype.mbCol=0,I_.prototype.macroblockType=0,I_.prototype.macroblockIntra=!1,I_.prototype.macroblockMotFw=!1,I_.prototype.motionFwH=0,I_.prototype.motionFwV=0,I_.prototype.motionFwHPrev=0,I_.prototype.motionFwVPrev=0,I_.prototype.dcPredictorY=0,I_.prototype.dcPredictorCr=0,I_.prototype.dcPredictorCb=0,I_.prototype.blockData=null,I_.PICTURE_RATE=[0,23.976,24,25,29.97,30,50,59.94,60,0,0,0,0,0,0,0],I_.ZIG_ZAG=new Uint8Array([0,1,8,16,9,2,3,10,17,24,32,25,18,11,4,5,12,19,26,33,40,48,41,34,27,20,13,6,7,14,21,28,35,42,49,56,57,50,43,36,29,22,15,23,30,37,44,51,58,59,52,45,38,31,39,46,53,60,61,54,47,55,62,63]),I_.DEFAULT_INTRA_QUANT_MATRIX=new Uint8Array([8,16,19,22,26,27,29,34,16,16,22,24,27,29,34,37,19,22,26,27,29,34,34,38,22,22,26,27,29,34,37,40,22,26,27,29,32,35,40,48,26,27,29,32,35,40,48,58,26,27,29,34,38,46,56,69,27,29,35,38,46,56,69,83]),I_.DEFAULT_NON_INTRA_QUANT_MATRIX=new Uint8Array([16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16]),I_.PREMULTIPLIER_MATRIX=new Uint8Array([32,44,42,38,32,25,17,9,44,62,58,52,44,35,24,12,42,58,55,49,42,33,23,12,38,52,49,44,38,30,20,10,32,44,42,38,32,25,17,9,25,35,33,30,25,20,14,7,17,24,23,20,17,14,9,5,9,12,12,10,9,7,5,2]),I_.MACROBLOCK_ADDRESS_INCREMENT=new Int16Array([3,6,0,9,12,0,0,0,1,15,18,0,21,24,0,27,30,0,33,36,0,0,0,3,0,0,2,39,42,0,45,48,0,0,0,5,0,0,4,51,54,0,57,60,0,0,0,7,0,0,6,63,66,0,69,72,0,75,78,0,81,84,0,-1,87,0,-1,90,0,93,96,0,99,102,0,105,108,0,111,114,0,0,0,9,0,0,8,117,120,0,123,126,0,129,132,0,135,138,0,0,0,15,0,0,14,0,0,13,0,0,12,0,0,11,0,0,10,141,-1,0,-1,144,0,147,150,0,153,156,0,159,162,0,165,168,0,171,174,0,177,180,0,183,-1,0,-1,186,0,189,192,0,195,198,0,201,204,0,207,210,0,213,216,0,219,222,0,0,0,21,0,0,20,0,0,19,0,0,18,0,0,17,0,0,16,0,0,35,0,0,34,0,0,33,0,0,32,0,0,31,0,0,30,0,0,29,0,0,28,0,0,27,0,0,26,0,0,25,0,0,24,0,0,23,0,0,22]),I_.MACROBLOCK_TYPE_INTRA=new Int8Array([3,6,0,-1,9,0,0,0,1,0,0,17]),I_.MACROBLOCK_TYPE_PREDICTIVE=new Int8Array([3,6,0,9,12,0,0,0,10,15,18,0,0,0,2,21,24,0,0,0,8,27,30,0,33,36,0,-1,39,0,0,0,18,0,0,26,0,0,1,0,0,17]),I_.MACROBLOCK_TYPE_B=new Int8Array([3,6,0,9,15,0,12,18,0,24,21,0,0,0,12,27,30,0,0,0,14,39,42,0,36,33,0,0,0,4,0,0,6,54,48,0,45,51,0,0,0,8,0,0,10,-1,57,0,0,0,1,60,63,0,0,0,30,0,0,17,0,0,22,0,0,26]),I_.MACROBLOCK_TYPE=[null,I_.MACROBLOCK_TYPE_INTRA,I_.MACROBLOCK_TYPE_PREDICTIVE,I_.MACROBLOCK_TYPE_B],I_.CODE_BLOCK_PATTERN=new Int16Array([6,3,0,9,18,0,12,15,0,24,33,0,36,39,0,27,21,0,30,42,0,60,57,0,54,48,0,69,51,0,81,75,0,63,84,0,45,66,0,72,78,0,0,0,60,105,120,0,132,144,0,114,108,0,126,141,0,87,93,0,117,96,0,0,0,32,135,138,0,99,123,0,129,102,0,0,0,4,90,111,0,0,0,8,0,0,16,0,0,44,150,168,0,0,0,28,0,0,52,0,0,62,183,177,0,156,180,0,0,0,1,165,162,0,0,0,61,0,0,56,171,174,0,0,0,2,0,0,40,153,186,0,0,0,48,192,189,0,147,159,0,0,0,20,0,0,12,240,249,0,0,0,63,231,225,0,195,219,0,252,198,0,0,0,24,0,0,36,0,0,3,207,261,0,243,237,0,204,213,0,210,234,0,201,228,0,216,222,0,258,255,0,264,246,0,-1,282,0,285,291,0,0,0,33,0,0,9,318,330,0,306,348,0,0,0,5,0,0,10,279,267,0,0,0,6,0,0,18,0,0,17,0,0,34,339,357,0,309,312,0,270,276,0,327,321,0,351,354,0,303,297,0,294,288,0,300,273,0,342,345,0,315,324,0,336,333,0,363,375,0,0,0,41,0,0,14,0,0,21,372,366,0,360,369,0,0,0,11,0,0,19,0,0,7,0,0,35,0,0,13,0,0,50,0,0,49,0,0,58,0,0,37,0,0,25,0,0,45,0,0,57,0,0,26,0,0,29,0,0,38,0,0,53,0,0,23,0,0,43,0,0,46,0,0,42,0,0,22,0,0,54,0,0,51,0,0,15,0,0,30,0,0,39,0,0,47,0,0,55,0,0,27,0,0,59,0,0,31]),I_.MOTION=new Int16Array([3,6,0,12,9,0,0,0,0,18,15,0,24,21,0,0,0,-1,0,0,1,27,30,0,36,33,0,0,0,2,0,0,-2,42,45,0,48,39,0,60,54,0,0,0,3,0,0,-3,51,57,0,-1,69,0,81,75,0,78,63,0,72,66,0,96,84,0,87,93,0,-1,99,0,108,105,0,0,0,-4,90,102,0,0,0,4,0,0,-7,0,0,5,111,123,0,0,0,-5,0,0,7,114,120,0,126,117,0,0,0,-6,0,0,6,153,162,0,150,147,0,135,138,0,156,141,0,129,159,0,132,144,0,0,0,10,0,0,9,0,0,8,0,0,-8,171,198,0,0,0,-9,180,192,0,168,183,0,165,186,0,174,189,0,0,0,-10,177,195,0,0,0,12,0,0,16,0,0,13,0,0,14,0,0,11,0,0,15,0,0,-16,0,0,-12,0,0,-14,0,0,-15,0,0,-11,0,0,-13]),I_.DCT_DC_SIZE_LUMINANCE=new Int8Array([6,3,0,18,15,0,9,12,0,0,0,1,0,0,2,27,24,0,21,30,0,0,0,0,36,33,0,0,0,4,0,0,3,39,42,0,0,0,5,0,0,6,48,45,0,51,-1,0,0,0,7,0,0,8]),I_.DCT_DC_SIZE_CHROMINANCE=new Int8Array([6,3,0,12,9,0,18,15,0,24,21,0,0,0,2,0,0,1,0,0,0,30,27,0,0,0,3,36,33,0,0,0,4,42,39,0,0,0,5,48,45,0,0,0,6,51,-1,0,0,0,7,0,0,8]),I_.DCT_COEFF=new Int32Array([3,6,0,12,9,0,0,0,1,21,24,0,18,15,0,39,27,0,33,30,0,42,36,0,0,0,257,60,66,0,54,63,0,48,57,0,0,0,513,51,45,0,0,0,2,0,0,3,81,75,0,87,93,0,72,78,0,96,90,0,0,0,1025,69,84,0,0,0,769,0,0,258,0,0,1793,0,0,65535,0,0,1537,111,108,0,0,0,1281,105,102,0,117,114,0,99,126,0,120,123,0,156,150,0,162,159,0,144,147,0,129,135,0,138,132,0,0,0,2049,0,0,4,0,0,514,0,0,2305,153,141,0,165,171,0,180,168,0,177,174,0,183,186,0,0,0,2561,0,0,3329,0,0,6,0,0,259,0,0,5,0,0,770,0,0,2817,0,0,3073,228,225,0,201,210,0,219,213,0,234,222,0,216,231,0,207,192,0,204,189,0,198,195,0,243,261,0,273,240,0,246,237,0,249,258,0,279,276,0,252,255,0,270,282,0,264,267,0,0,0,515,0,0,260,0,0,7,0,0,1026,0,0,1282,0,0,4097,0,0,3841,0,0,3585,315,321,0,333,342,0,312,291,0,375,357,0,288,294,0,-1,369,0,285,303,0,318,363,0,297,306,0,339,309,0,336,348,0,330,300,0,372,345,0,351,366,0,327,354,0,360,324,0,381,408,0,417,420,0,390,378,0,435,438,0,384,387,0,0,0,2050,396,402,0,465,462,0,0,0,8,411,399,0,429,432,0,453,414,0,426,423,0,0,0,10,0,0,9,0,0,11,0,0,5377,0,0,1538,0,0,771,0,0,5121,0,0,1794,0,0,4353,0,0,4609,0,0,4865,444,456,0,0,0,1027,459,450,0,0,0,261,393,405,0,0,0,516,447,441,0,516,519,0,486,474,0,510,483,0,504,498,0,471,537,0,507,501,0,522,513,0,534,531,0,468,477,0,492,495,0,549,546,0,525,528,0,0,0,263,0,0,2562,0,0,2306,0,0,5633,0,0,5889,0,0,6401,0,0,6145,0,0,1283,0,0,772,0,0,13,0,0,12,0,0,14,0,0,15,0,0,517,0,0,6657,0,0,262,540,543,0,480,489,0,588,597,0,0,0,27,609,555,0,606,603,0,0,0,19,0,0,22,591,621,0,0,0,18,573,576,0,564,570,0,0,0,20,552,582,0,0,0,21,558,579,0,0,0,23,612,594,0,0,0,25,0,0,24,600,615,0,0,0,31,0,0,30,0,0,28,0,0,29,0,0,26,0,0,17,0,0,16,567,618,0,561,585,0,654,633,0,0,0,37,645,648,0,0,0,36,630,636,0,0,0,34,639,627,0,663,666,0,657,624,0,651,642,0,669,660,0,0,0,35,0,0,267,0,0,40,0,0,268,0,0,266,0,0,32,0,0,264,0,0,265,0,0,38,0,0,269,0,0,270,0,0,33,0,0,39,0,0,7937,0,0,6913,0,0,7681,0,0,4098,0,0,7425,0,0,7169,0,0,271,0,0,274,0,0,273,0,0,272,0,0,1539,0,0,2818,0,0,3586,0,0,3330,0,0,3074,0,0,3842]),I_.PICTURE_TYPE={INTRA:1,PREDICTIVE:2,B:3},I_.START={SEQUENCE:179,SLICE_FIRST:1,SLICE_LAST:175,PICTURE:0,EXTENSION:181,USER_DATA:178};var E_=function(t){function e(e){var i;return(i=t.call(this,e)||this).onDecodeCallback=e.onVideoDecode,i.module=e.wasmModule,i.bufferSize=e.videoBufferSize||524288,i.bufferMode=e.streaming?__.MODE.EVICT:__.MODE.EXPAND,i.decodeFirstFrame=!1!==e.decodeFirstFrame,i.hasSequenceHeader=!1,i}r_(e,t);var i=e.prototype;return i.initializeWasmDecoder=function(){this.module.instance?(this.instance=this.module.instance,this.functions=this.module.instance.exports,this.decoder=this.functions._mpeg1_decoder_create(this.bufferSize,this.bufferMode)):console.warn("JSMpeg: WASM module not compiled yet")},i.destroy=function(){this.decoder&&this.functions._mpeg1_decoder_destroy(this.decoder)},i.bufferGetIndex=function(){if(this.decoder)return this.functions._mpeg1_decoder_get_index(this.decoder)},i.bufferSetIndex=function(t){this.decoder&&this.functions._mpeg1_decoder_set_index(this.decoder,t)},i.bufferWrite=function(t){this.decoder||this.initializeWasmDecoder();for(var e=0,i=0;i>2)),s=this.instance.heapU8.subarray(n,n+(this.codedSize>>2));this.destination.render(o,r,s,!1)}this.advanceDecodedTime(1/this.frameRate);var a=m_()-t;return this.onDecodeCallback&&this.onDecodeCallback(this,a),!0},e}(C_),x_=function(t){function e(i){var n;(n=t.call(this,i)||this).onDecodeCallback=i.onAudioDecode;var o=i.audioBufferSize||131072,r=i.streaming?__.MODE.EVICT:__.MODE.EXPAND;n.bits=new __(o,r),n.left=new Float32Array(1152),n.right=new Float32Array(1152),n.sampleRate=44100,n.D=new Float32Array(1024),n.D.set(e.SYNTHESIS_WINDOW,0),n.D.set(e.SYNTHESIS_WINDOW,512),n.V=[new Float32Array(1024),new Float32Array(1024)],n.U=new Int32Array(32),n.VPos=0,n.allocation=[new Array(32),new Array(32)],n.scaleFactorInfo=[new Uint8Array(32),new Uint8Array(32)],n.scaleFactor=[new Array(32),new Array(32)],n.sample=[new Array(32),new Array(32)];for(var s=0;s<2;s++)for(var a=0;a<32;a++)n.scaleFactor[s][a]=[0,0,0],n.sample[s][a]=[0,0,0];return n}r_(e,t);var i=e.prototype;return i.decode=function(){var t=m_(),e=this.bits.index>>3;if(e>=this.bits.byteLength)return!1;var i=this.decodeFrame(this.left,this.right);if(this.bits.index=e+i<<3,!i)return!1;this.destination&&this.destination.play(this.sampleRate,this.left,this.right),this.advanceDecodedTime(this.left.length/this.sampleRate);var n=m_()-t;return this.onDecodeCallback&&this.onDecodeCallback(this,n),!0},i.getCurrentTime=function(){var t=this.destination?this.destination.enqueuedTime:0;return this.decodedTime-t},i.decodeFrame=function(t,i){var n=this.bits.read(11),o=this.bits.read(2),r=this.bits.read(2),s=!this.bits.read(1);if(n!==e.FRAME_SYNC||o!==e.VERSION.MPEG_1||r!==e.LAYER.II)return 0;var a=this.bits.read(4)-1;if(a>13)return 0;var l=this.bits.read(2),d=e.SAMPLE_RATE[l];if(3===l)return 0;o===e.VERSION.MPEG_2&&(l+=4,a+=14);var c=this.bits.read(1);this.bits.read(1);var h=this.bits.read(2),u=0;h===e.MODE.JOINT_STEREO?u=this.bits.read(2)+1<<2:(this.bits.skip(2),u=h===e.MODE.MONO?0:32),this.bits.skip(4),s&&this.bits.skip(16);var A=144e3*e.BIT_RATE[a]/(d=e.SAMPLE_RATE[l])+c|0,p=0,m=0;if(o===e.VERSION.MPEG_2)p=2,m=30;else{var g=h===e.MODE.MONO?0:1,f=e.QUANT_LUT_STEP_1[g][a];m=63&(p=e.QUANT_LUT_STEP_2[f][l]),p>>=6}u>m&&(u=m);for(var v=0;v>1),R=this.VPos%128>>1;R<1024;){for(var P=0;P<32;++P)this.U[P]+=this.D[O++]*this.V[T][R++];R+=96,O+=32}for(R=1120-R,O-=480;R<1024;){for(var N=0;N<32;++N)this.U[N]+=this.D[O++]*this.V[T][R++];R+=96,O+=32}for(var F=0===T?t:i,L=0;L<32;L++)F[x+L]=this.U[L]/2147418112}x+=32}}return this.sampleRate=d,A},i.readAllocation=function(t,i){var n=e.QUANT_LUT_STEP_3[i][t],o=e.QUANT_LUT_STEP4[15&n][this.bits.read(n>>4)];return o?e.QUANT_TAB[o-1]:0},i.readSamples=function(t,i,n){var o=this.allocation[t][i],r=this.scaleFactor[t][i][n],s=this.sample[t][i],a=0;if(o){if(63===r)r=0;else{var l=r/3|0;r=e.SCALEFACTOR_BASE[r%3]+(1<>1)>>l}var d=o.levels;o.group?(a=this.bits.read(o.bits),s[0]=a%d,a=a/d|0,s[1]=a%d,s[2]=a/d|0):(s[0]=this.bits.read(o.bits),s[1]=this.bits.read(o.bits),s[2]=this.bits.read(o.bits));var c=65536/(d+1)|0;a=((d=(d+1>>1)-1)-s[0])*c,s[0]=a*(r>>12)+(a*(4095&r)+2048>>12)>>12,a=(d-s[1])*c,s[1]=a*(r>>12)+(a*(4095&r)+2048>>12)>>12,a=(d-s[2])*c,s[2]=a*(r>>12)+(a*(4095&r)+2048>>12)>>12}else s[0]=s[1]=s[2]=0},e.MatrixTransform=function(t,e,i,n){var o,r,s,a,l,d,c,h,u,A,p,m,g,f,v,b,y,_,w,C,I,E,x,B,k,S,D,Q,M,T,O,R,P;o=t[0][e]+t[31][e],r=.500602998235*(t[0][e]-t[31][e]),s=t[1][e]+t[30][e],a=.505470959898*(t[1][e]-t[30][e]),l=t[2][e]+t[29][e],d=.515447309923*(t[2][e]-t[29][e]),c=t[3][e]+t[28][e],h=.53104259109*(t[3][e]-t[28][e]),u=t[4][e]+t[27][e],A=.553103896034*(t[4][e]-t[27][e]),p=t[5][e]+t[26][e],m=.582934968206*(t[5][e]-t[26][e]),g=t[6][e]+t[25][e],f=.622504123036*(t[6][e]-t[25][e]),v=t[7][e]+t[24][e],b=.674808341455*(t[7][e]-t[24][e]),y=t[8][e]+t[23][e],_=.744536271002*(t[8][e]-t[23][e]),w=t[9][e]+t[22][e],C=.839349645416*(t[9][e]-t[22][e]),I=t[10][e]+t[21][e],E=.972568237862*(t[10][e]-t[21][e]),x=t[11][e]+t[20][e],B=1.16943993343*(t[11][e]-t[20][e]),k=t[12][e]+t[19][e],S=1.48416461631*(t[12][e]-t[19][e]),D=t[13][e]+t[18][e],Q=2.05778100995*(t[13][e]-t[18][e]),M=t[14][e]+t[17][e],T=3.40760841847*(t[14][e]-t[17][e]),P=o+(O=t[15][e]+t[16][e]),O=.502419286188*(o-O),o=s+M,M=.52249861494*(s-M),s=l+D,D=.566944034816*(l-D),l=c+k,k=.64682178336*(c-k),c=u+x,x=.788154623451*(u-x),u=p+I,I=1.06067768599*(p-I),p=g+w,w=1.72244709824*(g-w),g=v+y,y=5.10114861869*(v-y),v=P+g,g=.509795579104*(P-g),P=o+p,o=.601344886935*(o-p),p=s+u,u=.899976223136*(s-u),s=l+c,c=2.56291544774*(l-c),l=v+s,v=.541196100146*(v-s),s=P+p,p=1.30656296488*(P-p),P=l+s,l=.707106781187*(l-s),s=v+p,s+=v=.707106781187*(v-p),p=g+c,g=.541196100146*(g-c),c=o+u,u=1.30656296488*(o-u),o=p+c,c=.707106781187*(p-c),p=g+u,o+=p+=g=.707106781187*(g-u),p+=c,c+=g,u=O+y,O=.509795579104*(O-y),y=M+w,M=.601344886935*(M-w),w=D+I,I=.899976223136*(D-I),D=k+x,x=2.56291544774*(k-x),k=u+D,u=.541196100146*(u-D),D=y+w,w=1.30656296488*(y-w),y=k+D,D=.707106781187*(k-D),k=u+w,w=.707106781187*(u-w),u=O+x,O=.541196100146*(O-x),x=M+I,I=1.30656296488*(M-I),M=u+x,x=.707106781187*(u-x),u=O+I,y+=M+=u+=O=.707106781187*(O-I),M+=k+=w,k+=u+=x,u+=D,D+=x+=O,x+=w,w+=O,I=r+(R=10.1900081235*(t[15][e]-t[16][e])),r=.502419286188*(r-R),R=a+T,a=.52249861494*(a-T),T=d+Q,Q=.566944034816*(d-Q),d=h+S,h=.64682178336*(h-S),S=A+B,A=.788154623451*(A-B),B=m+E,E=1.06067768599*(m-E),m=f+C,C=1.72244709824*(f-C),f=b+_,b=5.10114861869*(b-_),_=I+f,f=.509795579104*(I-f),I=R+m,R=.601344886935*(R-m),m=T+B,B=.899976223136*(T-B),T=d+S,S=2.56291544774*(d-S),d=_+T,_=.541196100146*(_-T),T=I+m,m=1.30656296488*(I-m),I=d+T,T=.707106781187*(d-T),d=_+m,m=.707106781187*(_-m),_=f+S,S=.541196100146*(f-S),f=R+B,B=1.30656296488*(R-B),R=_+f,f=.707106781187*(_-f),_=S+B,R+=_+=B=.707106781187*(S-B),_+=f,S=f+B,f=r+b,r=.509795579104*(r-b),b=a+C,a=.601344886935*(a-C),C=Q+E,E=.899976223136*(Q-E),Q=h+A,A=2.56291544774*(h-A),h=f+Q,f=.541196100146*(f-Q),Q=b+C,C=1.30656296488*(b-C),b=h+Q,Q=.707106781187*(h-Q),h=f+C,C=.707106781187*(f-C),f=r+A,r=.541196100146*(r-A),A=a+E,E=1.30656296488*(a-E),a=f+A,A=.707106781187*(f-A),f=r+E,I+=b+=a+=f+=r=.707106781187*(r-E),b+=R,R+=a+=h+=C,a+=d+=m,d+=h+=f+=A,h+=_,_+=f+=Q,f+=T,T+=Q+=A+=r,Q+=S,S+=A+=C,A+=m,m+=C+=r,C+=B,B+=r,i[n+48]=-P,i[n+49]=i[n+47]=-I,i[n+50]=i[n+46]=-y,i[n+51]=i[n+45]=-b,i[n+52]=i[n+44]=-o,i[n+53]=i[n+43]=-R,i[n+54]=i[n+42]=-M,i[n+55]=i[n+41]=-a,i[n+56]=i[n+40]=-s,i[n+57]=i[n+39]=-d,i[n+58]=i[n+38]=-k,i[n+59]=i[n+37]=-h,i[n+60]=i[n+36]=-p,i[n+61]=i[n+35]=-_,i[n+62]=i[n+34]=-u,i[n+63]=i[n+33]=-f,i[n+32]=-l,i[n+0]=l,i[n+31]=-T,i[n+1]=T,i[n+30]=-D,i[n+2]=D,i[n+29]=-Q,i[n+3]=Q,i[n+28]=-c,i[n+4]=c,i[n+27]=-S,i[n+5]=S,i[n+26]=-x,i[n+6]=x,i[n+25]=-A,i[n+7]=A,i[n+24]=-v,i[n+8]=v,i[n+23]=-m,i[n+9]=m,i[n+22]=-w,i[n+10]=w,i[n+21]=-C,i[n+11]=C,i[n+20]=-g,i[n+12]=g,i[n+19]=-B,i[n+13]=B,i[n+18]=-O,i[n+14]=O,i[n+17]=-r,i[n+15]=r,i[n+16]=0},e}(C_);x_.FRAME_SYNC=2047,x_.VERSION={MPEG_2_5:0,MPEG_2:2,MPEG_1:3},x_.LAYER={III:1,II:2,I:3},x_.MODE={STEREO:0,JOINT_STEREO:1,DUAL_CHANNEL:2,MONO:3},x_.SAMPLE_RATE=new Uint16Array([44100,48e3,32e3,0,22050,24e3,16e3,0]),x_.BIT_RATE=new Uint16Array([32,48,56,64,80,96,112,128,160,192,224,256,320,384,8,16,24,32,40,48,56,64,80,96,112,128,144,160]),x_.SCALEFACTOR_BASE=new Uint32Array([33554432,26632170,21137968]),x_.SYNTHESIS_WINDOW=new Float32Array([0,-.5,-.5,-.5,-.5,-.5,-.5,-1,-1,-1,-1,-1.5,-1.5,-2,-2,-2.5,-2.5,-3,-3.5,-3.5,-4,-4.5,-5,-5.5,-6.5,-7,-8,-8.5,-9.5,-10.5,-12,-13,-14.5,-15.5,-17.5,-19,-20.5,-22.5,-24.5,-26.5,-29,-31.5,-34,-36.5,-39.5,-42.5,-45.5,-48.5,-52,-55.5,-58.5,-62.5,-66,-69.5,-73.5,-77,-80.5,-84.5,-88,-91.5,-95,-98,-101,-104,106.5,109,111,112.5,113.5,114,114,113.5,112,110.5,107.5,104,100,94.5,88.5,81.5,73,63.5,53,41.5,28.5,14.5,-1,-18,-36,-55.5,-76.5,-98.5,-122,-147,-173.5,-200.5,-229.5,-259.5,-290.5,-322.5,-355.5,-389.5,-424,-459.5,-495.5,-532,-568.5,-605,-641.5,-678,-714,-749,-783.5,-817,-849,-879.5,-908.5,-935,-959.5,-981,-1000.5,-1016,-1028.5,-1037.5,-1042.5,-1043.5,-1040,-1031.5,1018.5,1e3,976,946.5,911,869.5,822,767.5,707,640,565.5,485,397,302.5,201,92.5,-22.5,-144,-272.5,-407,-547.5,-694,-846,-1003,-1165,-1331.5,-1502,-1675.5,-1852.5,-2031.5,-2212.5,-2394,-2576.5,-2758.5,-2939.5,-3118.5,-3294.5,-3467.5,-3635.5,-3798.5,-3955,-4104.5,-4245.5,-4377.5,-4499,-4609.5,-4708,-4792.5,-4863.5,-4919,-4958,-4979.5,-4983,-4967.5,-4931.5,-4875,-4796,-4694.5,-4569.5,-4420,-4246,-4046,-3820,-3567,3287,2979.5,2644,2280.5,1888,1467.5,1018.5,541,35,-499,-1061,-1650,-2266.5,-2909,-3577,-4270,-4987.5,-5727.5,-6490,-7274,-8077.5,-8899.5,-9739,-10594.5,-11464.5,-12347,-13241,-14144.5,-15056,-15973.5,-16895.5,-17820,-18744.5,-19668,-20588,-21503,-22410.5,-23308.5,-24195,-25068.5,-25926.5,-26767,-27589,-28389,-29166.5,-29919,-30644.5,-31342,-32009.5,-32645,-33247,-33814.5,-34346,-34839.5,-35295,-35710,-36084.5,-36417.5,-36707.5,-36954,-37156.5,-37315,-37428,-37496,37519,37496,37428,37315,37156.5,36954,36707.5,36417.5,36084.5,35710,35295,34839.5,34346,33814.5,33247,32645,32009.5,31342,30644.5,29919,29166.5,28389,27589,26767,25926.5,25068.5,24195,23308.5,22410.5,21503,20588,19668,18744.5,17820,16895.5,15973.5,15056,14144.5,13241,12347,11464.5,10594.5,9739,8899.5,8077.5,7274,6490,5727.5,4987.5,4270,3577,2909,2266.5,1650,1061,499,-35,-541,-1018.5,-1467.5,-1888,-2280.5,-2644,-2979.5,3287,3567,3820,4046,4246,4420,4569.5,4694.5,4796,4875,4931.5,4967.5,4983,4979.5,4958,4919,4863.5,4792.5,4708,4609.5,4499,4377.5,4245.5,4104.5,3955,3798.5,3635.5,3467.5,3294.5,3118.5,2939.5,2758.5,2576.5,2394,2212.5,2031.5,1852.5,1675.5,1502,1331.5,1165,1003,846,694,547.5,407,272.5,144,22.5,-92.5,-201,-302.5,-397,-485,-565.5,-640,-707,-767.5,-822,-869.5,-911,-946.5,-976,-1e3,1018.5,1031.5,1040,1043.5,1042.5,1037.5,1028.5,1016,1000.5,981,959.5,935,908.5,879.5,849,817,783.5,749,714,678,641.5,605,568.5,532,495.5,459.5,424,389.5,355.5,322.5,290.5,259.5,229.5,200.5,173.5,147,122,98.5,76.5,55.5,36,18,1,-14.5,-28.5,-41.5,-53,-63.5,-73,-81.5,-88.5,-94.5,-100,-104,-107.5,-110.5,-112,-113.5,-114,-114,-113.5,-112.5,-111,-109,106.5,104,101,98,95,91.5,88,84.5,80.5,77,73.5,69.5,66,62.5,58.5,55.5,52,48.5,45.5,42.5,39.5,36.5,34,31.5,29,26.5,24.5,22.5,20.5,19,17.5,15.5,14.5,13,12,10.5,9.5,8.5,8,7,6.5,5.5,5,4.5,4,3.5,3.5,3,2.5,2.5,2,2,1.5,1.5,1,1,1,1,.5,.5,.5,.5,.5,.5]),x_.QUANT_LUT_STEP_1=[[0,0,1,1,1,2,2,2,2,2,2,2,2,2],[0,0,0,0,0,0,1,1,1,2,2,2,2,2]],x_.QUANT_TAB={A:91,B:94,C:8,D:12},x_.QUANT_LUT_STEP_2=[[x_.QUANT_TAB.C,x_.QUANT_TAB.C,x_.QUANT_TAB.D],[x_.QUANT_TAB.A,x_.QUANT_TAB.A,x_.QUANT_TAB.A],[x_.QUANT_TAB.B,x_.QUANT_TAB.A,x_.QUANT_TAB.B]],x_.QUANT_LUT_STEP_3=[[68,68,52,52,52,52,52,52,52,52,52,52],[67,67,67,66,66,66,66,66,66,66,66,49,49,49,49,49,49,49,49,49,49,49,49,32,32,32,32,32,32,32],[69,69,69,69,52,52,52,52,52,52,52,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36]],x_.QUANT_LUT_STEP4=[[0,1,2,17],[0,1,2,3,4,5,6,17],[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,17],[0,1,3,5,6,7,8,9,10,11,12,13,14,15,16,17],[0,1,2,4,5,6,7,8,9,10,11,12,13,14,15,17],[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15]],x_.QUANT_TAB=[{levels:3,group:1,bits:5},{levels:5,group:1,bits:7},{levels:7,group:0,bits:3},{levels:9,group:1,bits:10},{levels:15,group:0,bits:4},{levels:31,group:0,bits:5},{levels:63,group:0,bits:6},{levels:127,group:0,bits:7},{levels:255,group:0,bits:8},{levels:511,group:0,bits:9},{levels:1023,group:0,bits:10},{levels:2047,group:0,bits:11},{levels:4095,group:0,bits:12},{levels:8191,group:0,bits:13},{levels:16383,group:0,bits:14},{levels:32767,group:0,bits:15},{levels:65535,group:0,bits:16}];var B_=function(t){function e(e){var i;return(i=t.call(this,e)||this).onDecodeCallback=e.onAudioDecode,i.module=e.wasmModule,i.bufferSize=e.audioBufferSize||131072,i.bufferMode=e.streaming?__.MODE.EVICT:__.MODE.EXPAND,i.sampleRate=0,i}r_(e,t);var i=e.prototype;return i.initializeWasmDecoder=function(){this.module.instance?(this.instance=this.module.instance,this.functions=this.module.instance.exports,this.decoder=this.functions._mp2_decoder_create(this.bufferSize,this.bufferMode)):console.warn("JSMpeg: WASM module not compiled yet")},i.destroy=function(){this.decoder&&this.functions._mp2_decoder_destroy(this.decoder)},i.bufferGetIndex=function(){if(this.decoder)return this.functions._mp2_decoder_get_index(this.decoder)},i.bufferSetIndex=function(t){this.decoder&&this.functions._mp2_decoder_set_index(this.decoder,t)},i.bufferWrite=function(t){this.decoder||this.initializeWasmDecoder();for(var e=0,i=0;i>4<<4;this.gl.viewport(0,0,i,this.height)},e.createTexture=function(t,e){var i=this.gl,n=i.createTexture();return i.bindTexture(i.TEXTURE_2D,n),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_MAG_FILTER,i.LINEAR),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_MIN_FILTER,i.LINEAR),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_WRAP_S,i.CLAMP_TO_EDGE),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_WRAP_T,i.CLAMP_TO_EDGE),i.uniform1i(i.getUniformLocation(this.program,e),t),n},e.createProgram=function(t,e){var i=this.gl,n=i.createProgram();return i.attachShader(n,this.compileShader(i.VERTEX_SHADER,t)),i.attachShader(n,this.compileShader(i.FRAGMENT_SHADER,e)),i.linkProgram(n),i.useProgram(n),n},e.compileShader=function(t,e){var i=this.gl,n=i.createShader(t);if(i.shaderSource(n,e),i.compileShader(n),!i.getShaderParameter(n,i.COMPILE_STATUS))throw new Error(i.getShaderInfoLog(n));return n},e.allowsClampedTextureData=function(){var t=this.gl,e=t.createTexture();return t.bindTexture(t.TEXTURE_2D,e),t.texImage2D(t.TEXTURE_2D,0,t.LUMINANCE,1,1,0,t.LUMINANCE,t.UNSIGNED_BYTE,new Uint8ClampedArray([0])),0===t.getError()},e.renderProgress=function(t){var e=this.gl;e.useProgram(this.loadingProgram);var i=e.getUniformLocation(this.loadingProgram,"progress");e.uniform1f(i,t),e.drawArrays(e.TRIANGLE_STRIP,0,4)},e.render=function(t,e,i,n){if(this.enabled){var o=this.gl,r=this.width+15>>4<<4,s=this.height,a=r>>1,l=s>>1;n&&this.shouldCreateUnclampedViews&&(t=new Uint8Array(t.buffer),e=new Uint8Array(e.buffer),i=new Uint8Array(i.buffer)),o.useProgram(this.program),this.updateTexture(o.TEXTURE0,this.textureY,r,s,t),this.updateTexture(o.TEXTURE1,this.textureCb,a,l,e),this.updateTexture(o.TEXTURE2,this.textureCr,a,l,i),o.drawArrays(o.TRIANGLE_STRIP,0,4)}},e.updateTexture=function(t,e,i,n,o){var r=this.gl;r.activeTexture(t),r.bindTexture(r.TEXTURE_2D,e),this.hasTextureData[t]?r.texSubImage2D(r.TEXTURE_2D,0,0,0,i,n,r.LUMINANCE,r.UNSIGNED_BYTE,o):(this.hasTextureData[t]=!0,r.texImage2D(r.TEXTURE_2D,0,r.LUMINANCE,i,n,0,r.LUMINANCE,r.UNSIGNED_BYTE,o))},e.deleteTexture=function(t,e){var i=this.gl;i.activeTexture(t),i.bindTexture(i.TEXTURE_2D,null),i.deleteTexture(e)},t.IsSupported=function(){try{if(!window.WebGLRenderingContext)return!1;var t=document.createElement("canvas");return!(!t.getContext("webgl")&&!t.getContext("experimental-webgl"))}catch(t){return!1}},t}();k_.SHADER={FRAGMENT_YCRCB_TO_RGBA:["precision mediump float;","uniform sampler2D textureY;","uniform sampler2D textureCb;","uniform sampler2D textureCr;","varying vec2 texCoord;","mat4 rec601 = mat4(","1.16438, 0.00000, 1.59603, -0.87079,","1.16438, -0.39176, -0.81297, 0.52959,","1.16438, 2.01723, 0.00000, -1.08139,","0, 0, 0, 1",");","void main() {","float y = texture2D(textureY, texCoord).r;","float cb = texture2D(textureCb, texCoord).r;","float cr = texture2D(textureCr, texCoord).r;","gl_FragColor = vec4(y, cr, cb, 1.0) * rec601;","}"].join("\n"),FRAGMENT_LOADING:["precision mediump float;","uniform float progress;","varying vec2 texCoord;","void main() {","float c = ceil(progress-(1.0-texCoord.y));","gl_FragColor = vec4(c,c,c,1);","}"].join("\n"),VERTEX_IDENTITY:["attribute vec2 vertex;","varying vec2 texCoord;","void main() {","texCoord = vertex;","gl_Position = vec4((vertex * 2.0 - 1.0) * vec2(1, -1), 0.0, 1.0);","}"].join("\n")};var S_=function(){function t(t){this.canvas=t.canvas||document.createElement("canvas"),this.width=this.canvas.width,this.height=this.canvas.height,this.enabled=!0,this.context=this.canvas.getContext("2d")}var e=t.prototype;return e.destroy=function(){},e.resize=function(t,e){this.width=0|t,this.height=0|e,this.canvas.width=this.width,this.canvas.height=this.height,this.imageData=this.context.getImageData(0,0,this.width,this.height),g_(this.imageData.data,255)},e.renderProgress=function(t){var e=this.canvas.width,i=this.canvas.height,n=this.context;n.fillStyle="#222",n.fillRect(0,0,e,i),n.fillStyle="#fff",n.fillRect(0,i-i*t,e,i*t)},e.render=function(t,e,i){this.YCbCrToRGBA(t,e,i,this.imageData.data),this.context.putImageData(this.imageData,0,0)},e.YCbCrToRGBA=function(t,e,i,n){if(this.enabled)for(var o,r,s,a,l,d=this.width+15>>4<<4,c=d>>1,h=0,u=d,A=d+(d-this.width),p=0,m=c-(this.width>>1),g=0,f=4*this.width,v=4*this.width,b=this.width>>1,y=this.height>>1,_=0;_>8)-179,a=(88*r>>8)-44+(183*o>>8)-91,l=r+(198*r>>8)-227;var C=t[h++],I=t[h++];n[g]=C+s,n[g+1]=C-a,n[g+2]=C+l,n[g+4]=I+s,n[g+5]=I-a,n[g+6]=I+l,g+=8;var E=t[u++],x=t[u++];n[f]=E+s,n[f+1]=E-a,n[f+2]=E+l,n[f+4]=x+s,n[f+5]=x-a,n[f+6]=x+l,f+=8}h+=A,u+=A,g+=v,f+=v,p+=m}},t}(),D_=function(){function t(){this.context=t.CachedContext=t.CachedContext||new(window.AudioContext||window.webkitAudioContext),this.gain=this.context.createGain(),this.destination=this.gain,this.gain.connect(this.context.destination),this.context._connections=(this.context._connections||0)+1,this.startTime=0,this.buffer=null,this.wallclockStartTime=0,this.volume=1,this.enabled=!0,this.unlocked=!t.NeedsUnlocking(),Object.defineProperty(this,"enqueuedTime",{get:this.getEnqueuedTime})}var e=t.prototype;return e.destroy=function(){this.gain.disconnect(),this.context._connections--,0===this.context._connections&&(this.context.close(),t.CachedContext=null)},e.play=function(t,e,i){if(this.enabled){if(!this.unlocked){var n=m_();return this.wallclockStartTimethis.memory.buffer.byteLength){var i=this.brk-this.memory.buffer.byteLength,n=Math.ceil(i/this.pageSize);this.memory.grow(n),this.createHeapViews()}return e},e.c_abort=function(t){console.warn("JSMPeg: WASM abort",arguments)},e.c_assertFail=function(t){console.warn("JSMPeg: WASM ___assert_fail",arguments)},e.readDylinkSection=function(t){var e=new Uint8Array(t),i=0,n=function(){for(var t=0,n=1;;){var o=e[i++];if(t+=(127&o)*n,n*=128,!(128&o))return t}},o=function(t){for(var n=0;nthis.maxAudioLag&&(this.audioOut.resetEnqueuedTime(),this.audioOut.enabled=!1),t=this.audio.decode()}while(t);this.audioOut.enabled=!0}},e.updateForStaticFile=function(){var t=!1,e=0;if(this.audio&&this.audio.canPlay){for(;!t&&this.audio.decodedTime-this.audio.currentTime<.25;)t=!this.audio.decode();this.video&&this.video.currentTime0&&(n>2*o&&(this.startTime+=n),t=!this.video.decode()),e=this.demuxer.currentTime-i}this.source.resume(e),t&&this.source.completed?this.loop?this.seek(0):(this.stop(),this.options.onEnded&&this.options.onEnded(this)):t&&this.options.onStalled&&this.options.onStalled(this)},t}(),O_=function(){function t(t,e){this.url=t,this.destination=null,this.request=null,this.streaming=!0,this.completed=!1,this.established=!1,this.progress=0,this.aborted=!1,this.onEstablishedCallback=e.onSourceEstablished,this.onCompletedCallback=e.onSourceCompleted,e.hookOnEstablished&&(this.hookOnEstablished=e.hookOnEstablished)}var e=t.prototype;return e.connect=function(t){this.destination=t},e.start=function(){var t=this,e={method:"GET",headers:new Headers,cache:"default"};self.fetch(this.url,e).then((function(e){if(e.ok&&e.status>=200&&e.status<=299)return t.progress=1,t.established=!0,t.pump(e.body.getReader())})).catch((function(t){throw t}))},e.pump=function(t){var e=this;return t.read().then((function(i){if(!i.done)return e.aborted?t.cancel():(e.destination&&e.destination.write(i.value.buffer),e.pump(t));e.completed=!0})).catch((function(t){throw t}))},e.resume=function(){},e.abort=function(){this.aborted=!0},t}(),R_={Player:T_,VideoElement:p_,BitBuffer:__,Source:{Ajax:v_,AjaxProgressive:b_,WebSocket:y_,Fetch:O_},Demuxer:{TS:w_},Decoder:{Base:C_,MPEG1Video:I_,MPEG1VideoWASM:E_,MP2Audio:x_,MP2AudioWASM:B_},Renderer:{WebGL:k_,Canvas2D:S_},AudioOutput:{WebAudio:D_},WASMModule:Q_,Now:m_,CreateVideoElements:function(){for(var t=document.querySelectorAll(".jsmpeg"),e=0;ee}function s(t){return o(t)||r(t)}return{length:i,max:e,min:t,constrain:function(i){return s(i)?o(i)?t:e:i},reachedAny:s,reachedMax:r,reachedMin:o,removeOffset:function(t){return i?t-i*Math.ceil((t-e)/i):t}}}function p(t,e,i){var o=A(0,t),r=o.min,s=o.constrain,a=t+1,l=d(e);function d(t){return i?n((a+t)%a):s(t)}function c(){return l}function h(t){return l=d(t),u}var u={add:function(t){return h(c()+t)},clone:function(){return p(t,c(),i)},get:c,set:h,min:r,max:t};return u}function m(){var t=[],e={add:function(i,n,o,r){return void 0===r&&(r=!1),i.addEventListener(n,o,r),t.push((function(){return i.removeEventListener(n,o,r)})),e},removeAll:function(){return t=t.filter((function(t){return t()})),e}};return e}function g(e){var i=e;function n(t){return i/=t,r}function o(e){return t(e)?e:e.get()}var r={add:function(t){return i+=o(t),r},divide:n,get:function(){return i},multiply:function(t){return i*=t,r},normalize:function(){return 0!==i&&n(i),r},set:function(t){return i=o(t),r},subtract:function(t){return i-=o(t),r}};return r}function f(t,e,i,s,a,l,d,c,h,u,A,p,f,v,b,y){var _=t.cross,w=["INPUT","SELECT","TEXTAREA"],C=g(0),I=m(),E=m(),x=f.measure(20),B={mouse:300,touch:400},k={mouse:500,touch:600},S=b?5:16,D=0,Q=0,M=!1,T=!1,O=!1,R=!1;function P(t){if(!(R="mousedown"===t.type)||0===t.button){var e,n=r(s.get(),l.get())>=2,o=R||!n,d=(e=t.target.nodeName||"",!(w.indexOf(e)>-1)),c=n||R&&d;M=!0,a.pointerDown(t),C.set(s),s.set(l),h.useBaseMass().useSpeed(80),function(){var t=R?document:i;E.add(t,"touchmove",N).add(t,"touchend",F).add(t,"mousemove",N).add(t,"mouseup",F)}(),D=a.readPoint(t),Q=a.readPoint(t,_),p.emit("pointerDown"),o&&(O=!1),c&&t.preventDefault()}}function N(t){if(!T&&!R){if(!t.cancelable)return F(t);var i=a.readPoint(t),n=a.readPoint(t,_),o=r(i,D),l=r(n,Q);if(!(T=o>l)&&!O)return F(t)}var c=a.pointerMove(t);!O&&c&&(O=!0),d.start(),s.add(e.apply(c)),t.preventDefault()}function F(t){var i=u.byDistance(0,!1).index!==A.get(),l=a.pointerUp(t)*(b?k:B)[R?"mouse":"touch"],d=function(t,e){var i=A.clone().add(-1*o(t)),r=i.get()===A.min||i.get()===A.max,s=u.byDistance(t,!b).distance;return b||n(t)=.5,f=i&&m>.75,_=n(l)0?t.concat([i]):t}),[])}function f(i,o){var r="start"===o,s=r?-n:n,c=a.findSlideBounds([s]);return i.map((function(i){var o=r?0:-n,s=r?n:0,a=c.filter((function(t){return t.index===i}))[0][r?"end":"start"],h=g(-1),u=g(-1),A=I(t,e,d[i]);return{index:i,location:u,translate:A,target:function(){return h.set(l.get()>a?o:s)}}}))}return{canLoop:function(){return A.every((function(t){var e=t.index;return p(h.filter((function(t){return t!==e})),i)<=.1}))},clear:function(){A.forEach((function(t){return t.translate.clear()}))},loop:function(){A.forEach((function(t){var e=t.target,i=t.translate,n=t.location,o=e();o.get()!==n.get()&&(0===o.get()?i.clear():i.to(o),n.set(o))}))},loopPoints:A}}function x(t,e,i,n,o,r,s){var a=o.removeOffset,l=o.constrain,d=r?[0,e,-e]:[0],c=h(d,s);function h(e,o){var r=e||d,s=function(t){var e=t||0;return i.map((function(t){return A(.5,t-.5).constrain(t*e)}))}(o);return r.reduce((function(e,o){var r=n.map((function(e,n){return{start:e-i[n]+s[n]+o,end:e+t-s[n]+o,index:n}}));return e.concat(r)}),[])}return{check:function(t,e){var i=r?a(t):l(t);return(e||c).reduce((function(t,e){var n=e.index,o=e.start,r=e.end;return-1===t.indexOf(n)&&oi?t.concat([n]):t}),[])},findSlideBounds:h}}function B(e,i,n){var o=t(n);return{groupSlides:function(t){return o?function(t,e){return s(t).filter((function(t){return t%e==0})).map((function(i){return t.slice(i,i+e)}))}(t,n):function(t){return s(t).reduce((function(t,n){var o=i.slice(a(t),n+1).reduce((function(t,e){return t+e}),0);return!n||o>e?t.concat(n):t}),[]).map((function(e,i,n){return t.slice(e,n[i+1])}))}(t)}}}function k(t,e,i,o,r){var d=o.align,c=o.axis,h=o.direction,k=o.startIndex,S=o.inViewThreshold,D=o.loop,Q=o.speed,M=o.dragFree,T=o.slidesToScroll,O=o.skipSnaps,R=o.containScroll,P=e.getBoundingClientRect(),N=i.map((function(t){return t.getBoundingClientRect()})),F=function(t){var e="rtl"===t?-1:1;return{apply:function(t){return t*e}}}(h),L=function(t,e){var i="y"===t?"y":"x";return{scroll:i,cross:"y"===t?"x":"y",startEdge:"y"===i?"top":"rtl"===e?"right":"left",endEdge:"y"===i?"bottom":"rtl"===e?"left":"right",measureSize:function(t){var e=t.width,n=t.height;return"x"===i?e:n}}}(c,h),j=L.measureSize(P),z=function(t){return{measure:function(e){return t*(e/100)}}}(j),U=u(d,j),H=!D&&""!==R,G=function(t,e,i,o,r){var s=t.measureSize,d=t.startEdge,c=t.endEdge,h=function(){if(!r)return 0;var t=i[0];return n(e[d]-t[d])}(),u=function(){if(!r)return 0;var t=window.getComputedStyle(a(o));return parseFloat(t.getPropertyValue("margin-".concat(c)))}(),A=i.map(s),p=i.map((function(t,e,i){var n=!e,o=e===l(i);return n?A[e]+h:o?A[e]+u:i[e+1][d]-t[d]})).map(n);return{slideSizes:A,slideSizesWithGaps:p}}(L,P,N,i,D||""!==R),q=G.slideSizes,Y=G.slideSizesWithGaps,$=B(j,Y,T),W=function(t,e,i,o,r,s,d){var c,h=t.startEdge,u=t.endEdge,A=s.groupSlides,p=A(o).map((function(t){return a(t)[u]-t[0][h]})).map(n).map(e.measure),m=o.map((function(t){return i[h]-t[h]})).map((function(t){return-n(t)})),g=(c=a(m)-a(r),A(m).map((function(t){return t[0]})).map((function(t,e,i){var n=!e,o=e===l(i);return d&&n?0:d&&o?c:t+p[e]})));return{snaps:m,snapsAligned:g}}(L,U,P,N,Y,$,H),V=W.snaps,J=W.snapsAligned,K=-a(V)+a(Y),Z=y(j,K,J,R).snapsContained,X=H?Z:J,tt=function(t,e,i){var n,o;return{limit:(n=e[0],o=a(e),A(i?n-t:o,n))}}(K,X,D).limit,et=p(l(X),k,D),it=et.clone(),nt=s(i),ot=function(t){var e=0;function i(t,i){return function(){t===!!e&&i()}}function n(){e=window.requestAnimationFrame(t)}return{proceed:i(!0,n),start:i(!1,n),stop:i(!0,(function(){window.cancelAnimationFrame(e),e=0}))}}((function(){D||At.scrollBounds.constrain(At.dragHandler.pointerDown()),At.scrollBody.seek(at).update();var t=At.scrollBody.settle(at);t&&!At.dragHandler.pointerDown()&&(At.animation.stop(),r.emit("settle")),t||r.emit("scroll"),D&&(At.scrollLooper.loop(At.scrollBody.direction()),At.slideLooper.loop()),At.translate.to(st),At.animation.proceed()})),rt=X[et.get()],st=g(rt),at=g(rt),lt=v(st,Q,1),dt=C(D,X,K,tt,at),ct=function(t,e,i,n,o,r){function s(n){var s=n.distance,a=n.index!==e.get();s&&(t.start(),o.add(s)),a&&(i.set(e.get()),e.set(n.index),r.emit("select"))}return{distance:function(t,e){s(n.byDistance(t,e))},index:function(t,i){var o=e.clone().set(t);s(n.byIndex(o.get(),i))}}}(ot,et,it,dt,at,r),ht=x(j,K,q,V,tt,D,S),ut=f(L,F,t,at,function(t){var e,i;function o(t){return"undefined"!=typeof TouchEvent&&t instanceof TouchEvent}function r(t){return t.timeStamp}function s(e,i){var n=i||t.scroll,r="client".concat("x"===n?"X":"Y");return(o(e)?e.touches[0]:e)[r]}return{isTouchEvent:o,pointerDown:function(t){return e=t,i=t,s(t)},pointerMove:function(t){var n=s(t)-s(i),o=r(t)-r(e)>170;return i=t,o&&(e=t),n},pointerUp:function(t){if(!e||!i)return 0;var o=s(i)-s(e),a=r(t)-r(e),l=r(t)-r(i)>170,d=o/a;return a&&!l&&n(d)>.1?d:0},readPoint:s}}(L),st,ot,ct,lt,dt,et,r,z,D,M,O),At={containerRect:P,slideRects:N,animation:ot,axis:L,direction:F,dragHandler:ut,eventStore:m(),percentOfView:z,index:et,indexPrevious:it,limit:tt,location:st,options:o,scrollBody:lt,scrollBounds:b(tt,st,at,lt,z),scrollLooper:_(K,tt,st,[st,at]),scrollProgress:w(tt),scrollSnaps:X,scrollTarget:dt,scrollTo:ct,slideLooper:E(L,F,j,K,Y,X,ht,st,i),slidesToScroll:$,slidesInView:ht,slideIndexes:nt,target:at,translate:I(L,F,e)};return At}var S={align:"center",axis:"x",containScroll:"",direction:"ltr",slidesToScroll:1,breakpoints:{},dragFree:!1,draggable:!0,inViewThreshold:0,loop:!1,skipSnaps:!1,speed:10,startIndex:0,active:!0};function D(){function t(t,e){return c(t,e||{})}return{merge:t,areEqual:function(t,e){return JSON.stringify(d(t.breakpoints||{}))===JSON.stringify(d(e.breakpoints||{}))&&h(t,e)},atMedia:function(e){var i=e.breakpoints||{},n=d(i).filter((function(t){return window.matchMedia(t).matches})).map((function(t){return i[t]})).reduce((function(e,i){return t(e,i)}),{});return t(e,n)}}}function Q(t,e,i){var n,o,r,s,a,l=m(),d=D(),c=function(){var t=D(),e=t.atMedia,i=t.areEqual,n=[],o=[];function r(t){var n=e(t.options);return function(){return!i(n,e(t.options))}}var s={init:function(t,i){return o=t.map(r),(n=t.filter((function(t){return e(t.options).active}))).forEach((function(t){return t.init(i)})),t.reduce((function(t,e){var i;return Object.assign(t,((i={})[e.name]=e,i))}),{})},destroy:function(){n=n.filter((function(t){return t.destroy()}))},haveChanged:function(){return o.some((function(t){return t()}))}};return s}(),h=function(){var t={};function e(e){return t[e]||[]}var i={emit:function(t){return e(t).forEach((function(e){return e(t)})),i},off:function(n,o){return t[n]=e(n).filter((function(t){return t!==o})),i},on:function(n,o){return t[n]=e(n).concat([o]),i}};return i}(),u=h.on,A=h.off,p=w,g=!1,f=d.merge(S,Q.globalOptions),v=d.merge(f),b=[],y=0;function _(e,i){if(!g){var l,u;if(l="container"in t&&t.container,u="slides"in t&&t.slides,r="root"in t?t.root:t,s=l||r.children[0],a=u||[].slice.call(s.children),f=d.merge(f,e),v=d.atMedia(f),n=k(r,s,a,v,h),y=n.axis.measureSize(r.getBoundingClientRect()),!v.active)return C();if(n.translate.to(n.location),b=i||b,o=c.init(b,B),v.loop){if(!n.slideLooper.canLoop())return C(),_({loop:!1},i);n.slideLooper.loop()}v.draggable&&s.offsetParent&&a.length&&n.dragHandler.addActivationEvents()}}function w(t,e){var i=x();C(),_(d.merge({startIndex:i},t),e),h.emit("reInit")}function C(){n.dragHandler.removeAllEvents(),n.animation.stop(),n.eventStore.removeAll(),n.translate.clear(),n.slideLooper.clear(),c.destroy()}function I(t){var e=n[t?"target":"location"].get(),i=v.loop?"removeOffset":"constrain";return n.slidesInView.check(n.limit[i](e))}function E(t,e,i){v.active&&!g&&(n.scrollBody.useBaseMass().useSpeed(e?100:v.speed),n.scrollTo.index(t,i||0))}function x(){return n.index.get()}var B={canScrollNext:function(){return n.index.clone().add(1).get()!==x()},canScrollPrev:function(){return n.index.clone().add(-1).get()!==x()},clickAllowed:function(){return n.dragHandler.clickAllowed()},containerNode:function(){return s},internalEngine:function(){return n},destroy:function(){g||(g=!0,l.removeAll(),C(),h.emit("destroy"))},off:A,on:u,plugins:function(){return o},previousScrollSnap:function(){return n.indexPrevious.get()},reInit:p,rootNode:function(){return r},scrollNext:function(t){E(n.index.clone().add(1).get(),!0===t,-1)},scrollPrev:function(t){E(n.index.clone().add(-1).get(),!0===t,1)},scrollProgress:function(){return n.scrollProgress.get(n.location.get())},scrollSnapList:function(){return n.scrollSnaps.map(n.scrollProgress.get)},scrollTo:E,selectedScrollSnap:x,slideNodes:function(){return a},slidesInView:I,slidesNotInView:function(t){var e=I(t);return n.slideIndexes.filter((function(t){return-1===e.indexOf(t)}))}};return _(e,i),l.add(window,"resize",(function(){var t=d.atMedia(f),e=!d.areEqual(t,v),i=n.axis.measureSize(r.getBoundingClientRect()),o=y!==i,s=c.haveChanged();(o||e||s)&&w(),h.emit("resize")})),setTimeout((function(){return h.emit("init")}),0),B}return Q.globalOptions=void 0,Q.optionsHandler=D,Q}();function F_(){return F_=Object.assign||function(t){for(var e=1;e=t;case"y":return Math.abs(o)>=t;case"z":return Math.abs(r)>=t;default:return!1}}(r,n)&&t.preventDefault(),d.isStarted?d.isMomentum&&r>Math.max(2,2*d.lastAbsDelta)&&(I(!0),w()):w(),0===r&&Object.is&&Object.is(t.deltaX,-0)?c=!0:(e=t,d.axisMovement=L_(d.axisMovement,n),d.lastAbsDelta=r,d.scrollPointsToMerge.push({axisDelta:n,timeStamp:o}),m(),A({axisDelta:n,isStart:!d.isStartPublished}),d.isStartPublished=!0,C())},m=function(){var t;2===d.scrollPointsToMerge.length?(d.scrollPoints.unshift({axisDeltaSum:d.scrollPointsToMerge.map((function(t){return t.axisDelta})).reduce(L_),timeStamp:(t=d.scrollPointsToMerge.map((function(t){return t.timeStamp})),t.reduce((function(t,e){return t+e}))/t.length)}),f(),d.scrollPointsToMerge.length=0,d.scrollPoints.length=1,d.isMomentum||y()):d.isStartPublished||g()},g=function(){d.axisVelocity=function(t){return t[t.length-1]}(d.scrollPointsToMerge).axisDelta.map((function(t){return t/d.willEndTimeout}))},f=function(){var t=d.scrollPoints,e=t[0],i=t[1];if(i&&e){var n=e.timeStamp-i.timeStamp;if(!(n<=0)){var o=e.axisDeltaSum.map((function(t){return t/n})),r=o.map((function(t,e){return t/(d.axisVelocity[e]||1)}));d.axisVelocity=o,d.accelerationFactors.push(r),v(n)}}},v=function(t){var e=10*Math.ceil(t/10)*1.2;d.isMomentum||(e=Math.max(100,2*e)),d.willEndTimeout=Math.min(1e3,Math.round(e))},b=function(t){return 0===t||t<=.96&&t>=.6},y=function(){if(d.accelerationFactors.length>=5){if(c&&(c=!1,j_(d.axisVelocity)>=.2))return void _();var t=d.accelerationFactors.slice(-5);t.every((function(t){var e=!!t.reduce((function(t,e){return t&&t<1&&t===e?1:0})),i=t.filter(b).length===t.length;return e||i}))&&_(),d.accelerationFactors=t}},_=function(){d.isMomentum=!0},w=function(){(d={isStarted:!1,isStartPublished:!1,isMomentum:!1,startTime:0,lastAbsDelta:1/0,axisMovement:[0,0,0],axisVelocity:[0,0,0],accelerationFactors:[],scrollPoints:[],scrollPointsToMerge:[],willEndTimeout:400}).isStarted=!0,d.startTime=Date.now(),i=void 0,c=!1},C=function(){clearTimeout(n),n=setTimeout(I,d.willEndTimeout)},I=function(t){void 0===t&&(t=!1),d.isStarted&&(d.isMomentum&&t?A({isEnding:!0,isMomentumCancel:!0}):A({isEnding:!0}),d.isMomentum=!1,d.isStarted=!1)},E=function(t){var e=[],i=function(i){i.removeEventListener("wheel",t),e=e.filter((function(t){return t!==i}))};return z_({observe:function(n){return n.addEventListener("wheel",t,{passive:!1}),e.push(n),function(){return i(n)}},unobserve:i,disconnect:function(){e.forEach(i)}})}(h),x=E.observe,B=E.unobserve,k=E.disconnect;return u(t),z_({on:r,off:s,observe:x,unobserve:B,disconnect:k,feedWheel:h,updateOptions:u})}var $_={active:!0,breakpoints:{},wheelDraggingClass:"is-wheel-dragging",forceWheelAxis:void 0,target:void 0};function W_(t){var e,i=N_.optionsHandler(),n=i.merge($_,W_.globalOptions),o=function(){};var r={name:"wheelGestures",options:i.merge(n,t),init:function(t){var n,s;e=i.atMedia(r.options);var a,l=t.internalEngine(),d=null!=(n=e.target)?n:t.containerNode().parentNode,c=null!=(s=e.forceWheelAxis)?s:l.options.axis,h=Y_({preventWheelAction:c,reverseSign:[!0,!0,!1]}),u=h.observe(d),A=h.on("wheel",(function(t){var i=t.axisDelta,n=i[0],r=i[1],s="x"===c?n:r,l="x"===c?r:n,h=t.isMomentum&&t.previous&&!t.previous.isMomentum,u=t.isEnding&&!t.isMomentum||h;Math.abs(s)>Math.abs(l)&&!p&&!t.isMomentum&&function(t){try{v(a=new MouseEvent("mousedown",t.event))}catch(t){return o()}p=!0,document.documentElement.addEventListener("mousemove",g,!0),document.documentElement.addEventListener("mouseup",g,!0),void document.documentElement.addEventListener("mousedown",g,!0),e.wheelDraggingClass&&d.classList.add(e.wheelDraggingClass)}(t);if(!p)return;u?function(t){p=!1,v(f("mouseup",t)),m(),e.wheelDraggingClass&&d.classList.remove(e.wheelDraggingClass)}(t):v(f("mousemove",t))})),p=!1;function m(){document.documentElement.removeEventListener("mousemove",g,!0),document.documentElement.removeEventListener("mouseup",g,!0),document.documentElement.removeEventListener("mousedown",g,!0)}function g(t){p&&t.isTrusted&&t.stopImmediatePropagation()}function f(t,e){var i,n;if(c===l.options.axis){var o=e.axisMovement;i=o[0],n=o[1]}else{var r=e.axisMovement;n=r[0],i=r[1]}return new MouseEvent(t,{clientX:a.clientX+i,clientY:a.clientY+n,screenX:a.screenX+i,screenY:a.screenY+n,movementX:i,movementY:n,button:0,bubbles:!0,cancelable:!0,composed:!0})}function v(e){t.containerNode().dispatchEvent(e)}o=function(){u(),A(),m()}},destroy:function(){return o()}};return r} +/** + * @license + * Copyright 2018 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */W_.globalOptions=void 0;const V_={},J_=kt(class extends St{constructor(){super(...arguments),this.ot=V_}render(t,e){return e()}update(t,[e,i]){if(Array.isArray(e)){if(Array.isArray(this.ot)&&this.ot.length===e.length&&e.every(((t,e)=>t===this.ot[e])))return Z}else if(this.ot===e)return Z;return this.ot=Array.isArray(e)?Array.from(e):e,this.render(e,i)}}),K_=kt(class extends St{constructor(){super(...arguments),this.key=X}render(t,e){return this.key=t,e}update(t,[e,i]){return e!==this.key&&(Tt(t),this.key=e),i}}); +/** + * @license + * Copyright 2021 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */class Z_{constructor(t){var e,i,n,o;this.view=t.view,this.camera=t.camera,this.target=null!==(e=t.target)&&void 0!==e?e:null,this.childIndex=null!==(i=t.childIndex)&&void 0!==i?i:null,this.previous=null!==(n=t.previous)&&void 0!==n?n:null,this.context=null!==(o=t.context)&&void 0!==o?o:null}static selectBestViewForNonFrigateCameras(t){return["timeline","image"].includes(t)?t:"live"}static selectBestViewForUserSpecified(t){return up.includes(t)?t:"live"}static isMediaChange(t,e){return!t||!e||t.view!==e.view||t.camera!==e.camera||"live"!==e.view&&(t.target!==e.target||t.childIndex!==e.childIndex)}clone(){return new Z_({view:this.view,camera:this.camera,target:this.target,childIndex:this.childIndex,previous:this.previous,context:this.context})}evolve(t){return new Z_({view:void 0!==t.view?t.view:this.view,camera:void 0!==t.camera?t.camera:this.camera,target:void 0!==t.target?t.target:this.target,childIndex:void 0!==t.childIndex?t.childIndex:this.childIndex,context:void 0!==t.context?t.context:this.context,previous:void 0!==t.previous?t.previous:this})}mergeInContext(t){return this.context=Object.assign(Object.assign({},this.context),t),this}removeContext(t){return this.context&&delete this.context[t],this}is(t){return this.view==t}isGalleryView(){return"clips"==this.view||"snapshots"==this.view}isAnyMediaView(){return this.isViewerView()||this.is("live")||this.is("image")}isViewerView(){return["clip","snapshot","media"].includes(this.view)}isClipRelatedView(){return["clip","clips"].includes(this.view)}isSnapshotRelatedView(){return["snapshot","snapshots"].includes(this.view)}getMediaType(){return this.isClipRelatedView()?"clips":this.isSnapshotRelatedView()?"snapshots":null}get media(){var t;return this.target&&this.target.children&&null!==this.childIndex&&null!==(t=this.target.children[this.childIndex])&&void 0!==t?t:null}dispatchChangeEvent(t){Dg(t,"view:change",this)}}const X_={active:!0,breakpoints:{}};function tw(t){const e=N_.optionsHandler(),i=e.merge(X_,tw.globalOptions);let n,o,r;function s(){"hidden"===document.visibilityState?(n.autoPauseCondition&&["all","hidden"].includes(n.autoPauseCondition)&&function(){var t;for(const e of r)null===(t=a(e))||void 0===t||t.pause()}(),n.autoMuteCondition&&["all","hidden"].includes(n.autoMuteCondition)&&function(){var t;for(const e of r)null===(t=a(e))||void 0===t||t.mute()}()):"visible"===document.visibilityState&&(n.autoPlayCondition&&["all","visible"].includes(n.autoPlayCondition)&&l(),n.autoUnmuteCondition&&["all","visible"].includes(n.autoUnmuteCondition)&&h())}function a(t){return n.playerSelector?null==t?void 0:t.querySelector(n.playerSelector):null}function l(){var t;null===(t=a(r[o.selectedScrollSnap()]))||void 0===t||t.play()}function d(){var t;null===(t=a(r[o.selectedScrollSnap()]))||void 0===t||t.pause()}function c(){var t;null===(t=a(r[o.previousScrollSnap()]))||void 0===t||t.pause()}function h(){var t;null===(t=a(r[o.selectedScrollSnap()]))||void 0===t||t.unmute()}function u(){var t;null===(t=a(r[o.selectedScrollSnap()]))||void 0===t||t.mute()}function A(){var t;null===(t=a(r[o.previousScrollSnap()]))||void 0===t||t.mute()}const p={name:"autoMedia",options:e.merge(i,t),init:function(t){o=t,n=e.atMedia(p.options),r=o.slideNodes(),o.on("destroy",d),n.autoPauseCondition&&["all","unselected"].includes(n.autoPauseCondition)&&o.on("select",c),o.on("destroy",u),n.autoMuteCondition&&["all","unselected"].includes(n.autoMuteCondition)&&o.on("select",A),document.addEventListener("visibilitychange",s)},destroy:function(){o.off("destroy",d),n.autoPauseCondition&&["all","unselected"].includes(n.autoPauseCondition)&&o.off("select",c),o.off("destroy",u),n.autoMuteCondition&&["all","unselected"].includes(n.autoMuteCondition)&&o.off("select",A),document.removeEventListener("visibilitychange",s)},play:l,pause:d,mute:u,unmute:h};return p}tw.globalOptions=void 0;const ew={active:!0,breakpoints:{},lazyLoadCount:0};function iw(t){const e=N_.optionsHandler(),i=e.merge(ew,iw.globalOptions);let n,o,r;const s=new Set,a=["init","select","resize"],l=["select"];function d(){"hidden"===document.visibilityState&&n.lazyUnloadCallback&&n.lazyUnloadCondition&&["all","hidden"].includes(n.lazyUnloadCondition)?s.forEach((t=>{n.lazyUnloadCallback&&(n.lazyUnloadCallback(t,r[t]),s.delete(t))})):"visible"===document.visibilityState&&n.lazyLoadCallback&&h()}function c(t){return s.has(t)}function h(){var t;const e=null!==(t=n.lazyLoadCount)&&void 0!==t?t:0,i=o.selectedScrollSnap(),a=new Set;for(let t=1;t<=e&&i-t>=0;t++)a.add(i-t);a.add(i);for(let t=1;t<=e&&i+t{!c(t)&&n.lazyLoadCallback&&(s.add(t),n.lazyLoadCallback(t,r[t]))}))}function u(){const t=o.previousScrollSnap();c(t)&&n.lazyUnloadCallback&&(n.lazyUnloadCallback(t,r[t]),s.delete(t))}const A={name:"lazyload",options:e.merge(i,t),init:function(t){o=t,n=e.atMedia(A.options),r=o.slideNodes(),n.lazyLoadCallback&&a.forEach((t=>o.on(t,h))),n.lazyUnloadCallback&&n.lazyUnloadCondition&&["all","unselected"].includes(n.lazyUnloadCondition)&&l.forEach((t=>o.on(t,u))),document.addEventListener("visibilitychange",d)},destroy:function(){n.lazyLoadCallback&&a.forEach((t=>o.off(t,h))),n.lazyUnloadCallback&&l.forEach((t=>o.off(t,u))),document.removeEventListener("visibilitychange",d)},hasLazyloaded:c};return A}iw.globalOptions=void 0; +/** + * @license + * Copyright 2018 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */ +const nw=t=>null!=t?t:X;let ow=class extends gt{constructor(){super(...arguments),this.disabled=!1,this.label="",this._embedThumbnailTask=zy(this,(()=>this.hass),(()=>this.thumbnail))}set controlConfig(t){(null==t?void 0:t.size)&&this.style.setProperty("--frigate-card-next-prev-size",`${t.size}px`),this._controlConfig=t}render(){if(this.disabled||!this._controlConfig||"none"==this._controlConfig.style)return K``;const t={controls:!0,previous:"previous"==this.direction,next:"next"==this.direction,thumbnails:"thumbnails"==this._controlConfig.style,icons:["chevrons","icons"].includes(this._controlConfig.style),button:["chevrons","icons"].includes(this._controlConfig.style)};if(["chevrons","icons"].includes(this._controlConfig.style)){let e;if("chevrons"===this._controlConfig.style)e="previous"==this.direction?"mdi:chevron-left":"mdi:chevron-right";else{if(!this.icon)return K``;e=this.icon}return K` + + `}return this.thumbnail?Fy(this,this._embedThumbnailTask,(e=>e?K``:K``),(()=>K`
`)):K``}static get styles(){return _("ha-icon-button.button {\n color: var(--secondary-color, white);\n background-color: rgba(0, 0, 0, 0.6);\n border-radius: 50%;\n padding: 0px;\n margin: 3px;\n --ha-icon-display: block;\n /* Buttons can always be clicked */\n pointer-events: auto;\n opacity: 0.9;\n}\n\n@keyframes pulse {\n 0% {\n opacity: 1;\n }\n 50% {\n opacity: 0;\n }\n 100% {\n opacity: 1;\n }\n}\nha-icon[data-domain=alert][data-state=on],\nha-icon[data-domain=automation][data-state=on],\nha-icon[data-domain=binary_sensor][data-state=on],\nha-icon[data-domain=calendar][data-state=on],\nha-icon[data-domain=camera][data-state=streaming],\nha-icon[data-domain=cover][data-state=open],\nha-icon[data-domain=fan][data-state=on],\nha-icon[data-domain=humidifier][data-state=on],\nha-icon[data-domain=light][data-state=on],\nha-icon[data-domain=input_boolean][data-state=on],\nha-icon[data-domain=lock][data-state=unlocked],\nha-icon[data-domain=media_player][data-state=on],\nha-icon[data-domain=media_player][data-state=paused],\nha-icon[data-domain=media_player][data-state=playing],\nha-icon[data-domain=script][data-state=on],\nha-icon[data-domain=sun][data-state=above_horizon],\nha-icon[data-domain=switch][data-state=on],\nha-icon[data-domain=timer][data-state=active],\nha-icon[data-domain=vacuum][data-state=cleaning],\nha-icon[data-domain=group][data-state=on],\nha-icon[data-domain=group][data-state=home],\nha-icon[data-domain=group][data-state=open],\nha-icon[data-domain=group][data-state=locked],\nha-icon[data-domain=group][data-state=problem] {\n color: var(--paper-item-icon-active-color, #fdd835);\n}\n\nha-icon[data-domain=climate][data-state=cooling] {\n color: var(--cool-color, var(--state-climate-cool-color));\n}\n\nha-icon[data-domain=climate][data-state=heating] {\n color: var(--heat-color, var(--state-climate-heat-color));\n}\n\nha-icon[data-domain=climate][data-state=drying] {\n color: var(--dry-color, var(--state-climate-dry-color));\n}\n\nha-icon[data-domain=alarm_control_panel] {\n color: var(--alarm-color-armed, var(--label-badge-red));\n}\n\nha-icon[data-domain=alarm_control_panel][data-state=disarmed] {\n color: var(--alarm-color-disarmed, var(--label-badge-green));\n}\n\nha-icon[data-domain=alarm_control_panel][data-state=pending],\nha-icon[data-domain=alarm_control_panel][data-state=arming] {\n color: var(--alarm-color-pending, var(--label-badge-yellow));\n animation: pulse 1s infinite;\n}\n\nha-icon[data-domain=alarm_control_panel][data-state=triggered] {\n color: var(--alarm-color-triggered, var(--label-badge-red));\n animation: pulse 1s infinite;\n}\n\nha-icon[data-domain=plant][data-state=problem],\nha-icon[data-domain=zwave][data-state=dead] {\n color: var(--state-icon-error-color);\n}\n\n/* Color the icon if unavailable */\nha-icon[data-state=unavailable] {\n color: var(--state-unavailable-color);\n}\n\nha-icon-button[data-domain=alert][data-state=on],\nha-icon-button[data-domain=automation][data-state=on],\nha-icon-button[data-domain=binary_sensor][data-state=on],\nha-icon-button[data-domain=calendar][data-state=on],\nha-icon-button[data-domain=camera][data-state=streaming],\nha-icon-button[data-domain=cover][data-state=open],\nha-icon-button[data-domain=fan][data-state=on],\nha-icon-button[data-domain=humidifier][data-state=on],\nha-icon-button[data-domain=light][data-state=on],\nha-icon-button[data-domain=input_boolean][data-state=on],\nha-icon-button[data-domain=lock][data-state=unlocked],\nha-icon-button[data-domain=media_player][data-state=on],\nha-icon-button[data-domain=media_player][data-state=paused],\nha-icon-button[data-domain=media_player][data-state=playing],\nha-icon-button[data-domain=script][data-state=on],\nha-icon-button[data-domain=sun][data-state=above_horizon],\nha-icon-button[data-domain=switch][data-state=on],\nha-icon-button[data-domain=timer][data-state=active],\nha-icon-button[data-domain=vacuum][data-state=cleaning],\nha-icon-button[data-domain=group][data-state=on],\nha-icon-button[data-domain=group][data-state=home],\nha-icon-button[data-domain=group][data-state=open],\nha-icon-button[data-domain=group][data-state=locked],\nha-icon-button[data-domain=group][data-state=problem] {\n color: var(--paper-item-icon-active-color, #fdd835);\n}\n\nha-icon-button[data-domain=climate][data-state=cooling] {\n color: var(--cool-color, var(--state-climate-cool-color));\n}\n\nha-icon-button[data-domain=climate][data-state=heating] {\n color: var(--heat-color, var(--state-climate-heat-color));\n}\n\nha-icon-button[data-domain=climate][data-state=drying] {\n color: var(--dry-color, var(--state-climate-dry-color));\n}\n\nha-icon-button[data-domain=alarm_control_panel] {\n color: var(--alarm-color-armed, var(--label-badge-red));\n}\n\nha-icon-button[data-domain=alarm_control_panel][data-state=disarmed] {\n color: var(--alarm-color-disarmed, var(--label-badge-green));\n}\n\nha-icon-button[data-domain=alarm_control_panel][data-state=pending],\nha-icon-button[data-domain=alarm_control_panel][data-state=arming] {\n color: var(--alarm-color-pending, var(--label-badge-yellow));\n animation: pulse 1s infinite;\n}\n\nha-icon-button[data-domain=alarm_control_panel][data-state=triggered] {\n color: var(--alarm-color-triggered, var(--label-badge-red));\n animation: pulse 1s infinite;\n}\n\nha-icon-button[data-domain=plant][data-state=problem],\nha-icon-button[data-domain=zwave][data-state=dead] {\n color: var(--state-icon-error-color);\n}\n\n/* Color the icon if unavailable */\nha-icon-button[data-state=unavailable] {\n color: var(--state-unavailable-color);\n}\n\n:host {\n --frigate-card-next-prev-size: 48px;\n --frigate-card-next-prev-size-hover: calc(var(--frigate-card-next-prev-size) * 2);\n --frigate-card-prev-position: 45px;\n --frigate-card-next-position: 45px;\n --mdc-icon-button-size: var(--frigate-card-next-prev-size);\n --mdc-icon-size: calc(var(--mdc-icon-button-size) / 2);\n}\n\n.controls {\n position: absolute;\n z-index: 1;\n overflow: hidden;\n}\n\n.controls.previous {\n left: var(--frigate-card-prev-position);\n}\n\n.controls.next {\n right: var(--frigate-card-next-position);\n}\n\n.controls.icons {\n top: calc(50% - var(--frigate-card-next-prev-size) / 2);\n}\n\n.controls.thumbnails {\n border-radius: 50%;\n height: var(--frigate-card-next-prev-size);\n top: calc(50% - var(--frigate-card-next-prev-size) / 2);\n box-shadow: 0px 0px 20px 5px black;\n transition: all 0.2s ease-out;\n opacity: 0.8;\n aspect-ratio: 1/1;\n}\n\n.controls.thumbnails:hover {\n opacity: 1 !important;\n height: var(--frigate-card-next-prev-size-hover);\n top: calc(50% - var(--frigate-card-next-prev-size-hover) / 2);\n}\n\n.controls.previous.thumbnails:hover {\n left: calc(var(--frigate-card-prev-position) - (var(--frigate-card-next-prev-size-hover) - var(--frigate-card-next-prev-size)) / 2);\n}\n\n.controls.next.thumbnails:hover {\n right: calc(var(--frigate-card-next-position) - (var(--frigate-card-next-prev-size-hover) - var(--frigate-card-next-prev-size)) / 2);\n}")}};t([yt({attribute:!1})],ow.prototype,"direction",void 0),t([yt({attribute:!1})],ow.prototype,"hass",void 0),t([_t()],ow.prototype,"_controlConfig",void 0),t([yt({attribute:!1})],ow.prototype,"thumbnail",void 0),t([yt({attribute:!1})],ow.prototype,"icon",void 0),t([yt({attribute:!0,type:Boolean})],ow.prototype,"disabled",void 0),t([yt()],ow.prototype,"label",void 0),ow=t([vt("frigate-card-next-previous-control")],ow);let rw=class extends gt{constructor(){super(...arguments),this.direction="horizontal",this._savedStartIndex=null,this._refSlot=zt(),this._scrolling=!1,this._reInitOnSettle=!1,this._carouselReInitInPlace=hh(this._carouselReInitInPlaceInternal.bind(this),500,{trailing:!0})}connectedCallback(){super.connectedCallback(),this.requestUpdate()}disconnectedCallback(){this._destroyCarousel({savePosition:!0}),super.disconnectedCallback()}willUpdate(t){["direction","carouselOptions","carouselPlugins"].some((e=>t.has(e)))&&this._destroyCarousel({savePosition:!0})}carouselScrollTo(t){var e;null===(e=this._carousel)||void 0===e||e.scrollTo(t,"none"===this.transitionEffect)}carouselScrollPrevious(){var t;null===(t=this._carousel)||void 0===t||t.scrollPrev("none"===this.transitionEffect)}carouselScrollNext(){var t;null===(t=this._carousel)||void 0===t||t.scrollNext("none"===this.transitionEffect)}getCarouselSelected(){var t,e,i;const n=null===(t=this._carousel)||void 0===t?void 0:t.selectedScrollSnap(),o=void 0!==n&&null!==(i=null===(e=this._carousel)||void 0===e?void 0:e.slideNodes()[n])&&void 0!==i?i:null;return void 0!==n&&o?{index:n,element:o}:null}carouselClickAllowed(){var t,e;return null===(e=null===(t=this._carousel)||void 0===t?void 0:t.clickAllowed())||void 0===e||e}carousel(){var t;return null!==(t=this._carousel)&&void 0!==t?t:null}_carouselReInit(t){window.requestAnimationFrame((()=>{var e;null===(e=this._carousel)||void 0===e||e.reInit(Object.assign({},t))}))}_carouselReInitInPlaceInternal(){const t=this.getCarouselSelected();this._carouselReInit(Object.assign({},t&&{startIndex:t.index}))}carouselReInitWhenSafe(){this._scrolling?this._reInitOnSettle=!0:this._carouselReInitInPlace()}getCarouselPlugins(){var t,e;return null!==(e=null===(t=this._carousel)||void 0===t?void 0:t.plugins())&&void 0!==e?e:null}updated(t){super.updated(t),this._carousel||this._initCarousel()}_destroyCarousel(t){var e,i;this._savedStartIndex=null!==(i=(null==t?void 0:t.savePosition)?null===(e=this._carousel)||void 0===e?void 0:e.selectedScrollSnap():null)&&void 0!==i?i:null,this._carousel&&this._carousel.destroy(),this._carousel=void 0}_initCarousel(){var t;const e=this.renderRoot.querySelector(".embla__viewport"),i={root:e,slides:null===(t=this._refSlot.value)||void 0===t?void 0:t.assignedElements({flatten:!0})};e&&i.slides&&(this._carousel=N_(i,Object.assign(Object.assign({axis:"horizontal"==this.direction?"x":"y",speed:20},this.carouselOptions),this._savedStartIndex&&{startIndex:this._savedStartIndex}),this.carouselPlugins),this._carousel.on("init",(()=>Dg(this,"carousel:init"))),this._carousel.on("select",(()=>{const t=this.getCarouselSelected();t&&Dg(this,"carousel:select",t),this.requestUpdate()})),this._carousel.on("scroll",(()=>{this._scrolling=!0})),this._carousel.on("settle",(()=>{this._scrolling=!1,this._reInitOnSettle&&(this._reInitOnSettle=!1,this._carouselReInitInPlace())})),this._carousel.on("settle",(()=>{const t=this.getCarouselSelected();t&&Dg(this,"carousel:settle",t)})))}_slotChanged(){this._destroyCarousel({savePosition:!1}),this.requestUpdate()}render(){var t,e,i,n,o;const r=(null===(t=this._refSlot.value)||void 0===t?void 0:t.assignedElements({flatten:!0}))||[],s=null!==(i=null===(e=this._carousel)||void 0===e?void 0:e.selectedScrollSnap())&&void 0!==i?i:0,a=(null===(n=this.carouselOptions)||void 0===n?void 0:n.loop)||s>0,l=(null===(o=this.carouselOptions)||void 0===o?void 0:o.loop)||s+1 + ${a?K``:""} +
+
+ +
+
+ ${l?K``:""} + `}static get styles(){return _(":host {\n display: block;\n height: 100%;\n width: 100%;\n}\n\n.embla {\n width: 100%;\n height: 100%;\n margin-left: auto;\n margin-right: auto;\n}\n\n.embla__container {\n display: flex;\n width: 100%;\n height: 100%;\n user-select: none;\n -webkit-touch-callout: none;\n -khtml-user-select: none;\n -webkit-tap-highlight-color: transparent;\n}\n\n:host([direction=vertical]) .embla__container {\n flex-direction: column;\n}\n\n:host([direction=horizontal]) .embla__container {\n flex-direction: row;\n}\n\n.embla__viewport {\n width: 100%;\n height: 100%;\n overflow: hidden;\n display: flex;\n flex-direction: column;\n justify-content: center;\n}\n\n.embla__viewport.is-draggable {\n cursor: move;\n cursor: grab;\n}\n\n.embla__viewport.is-dragging {\n cursor: grabbing;\n}\n\n:host([direction=vertical]) ::slotted(.embla__slide) {\n margin-bottom: 5px;\n}\n\n:host([direction=horizontal]) ::slotted(.embla__slide) {\n margin-right: 5px;\n}")}};t([yt({attribute:!0,reflect:!0})],rw.prototype,"direction",void 0),t([yt({attribute:!1})],rw.prototype,"carouselOptions",void 0),t([yt({attribute:!1})],rw.prototype,"carouselPlugins",void 0),t([yt({attribute:!0})],rw.prototype,"transitionEffect",void 0),rw=t([vt("frigate-card-carousel")],rw);const sw=`data:image/svg+xml,%3Csvg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 ${16} ${9}"%3E%3C/svg%3E`;const aw=(t,e)=>{Dg(t,"carousel:media:loaded",e)},lw=(t,e)=>{e.stopPropagation(),aw(e.composedPath()[0],{slide:t,mediaLoadedInfo:e.detail})},dw=(t,e)=>{e.stopPropagation(),Dg(e.composedPath()[0],"carousel:media:unloaded",{slide:t})};let cw=class extends gt{constructor(){super(),this._mediaLoadedInfo={},this._nextControlRef=zt(),this._previousControlRef=zt(),this._titleControlRef=zt(),this._titleTimerID=null,this._boundAutoPlayHandler=this.autoPlay.bind(this),this._boundAutoUnmuteHandler=this.autoUnmute.bind(this),this._boundAdaptContainerHeightToSlide=this._adaptContainerHeightToSlide.bind(this),this._boundTitleHandler=this._titleHandler.bind(this),this._refCarousel=zt(),this._resizeObserver=new ResizeObserver(this._reInitAndAdjustHeight.bind(this)),this._slideResizeObserver=new ResizeObserver(this._reInitAndAdjustHeight.bind(this)),this._intersectionObserver=new IntersectionObserver(this._intersectionHandler.bind(this))}frigateCardCarousel(){var t;return null!==(t=this._refCarousel.value)&&void 0!==t?t:null}_getAutoMediaPlugin(){var t,e,i;return null!==(i=null===(e=null===(t=this.frigateCardCarousel())||void 0===t?void 0:t.carousel())||void 0===e?void 0:e.plugins().autoMedia)&&void 0!==i?i:null}autoPlay(){var t,e;const i=null===(t=this._getAutoMediaPlugin())||void 0===t?void 0:t.options;(null==i?void 0:i.autoPlayCondition)&&["all","selected"].includes(null==i?void 0:i.autoPlayCondition)&&(null===(e=this._getAutoMediaPlugin())||void 0===e||e.play())}autoPause(){var t,e;const i=null===(t=this._getAutoMediaPlugin())||void 0===t?void 0:t.options;(null==i?void 0:i.autoPauseCondition)&&["all","selected"].includes(i.autoPauseCondition)&&(null===(e=this._getAutoMediaPlugin())||void 0===e||e.pause())}autoUnmute(){var t,e;const i=null===(t=this._getAutoMediaPlugin())||void 0===t?void 0:t.options;(null==i?void 0:i.autoUnmuteCondition)&&["all","selected"].includes(null==i?void 0:i.autoUnmuteCondition)&&(null===(e=this._getAutoMediaPlugin())||void 0===e||e.unmute())}autoMute(){var t,e;const i=null===(t=this._getAutoMediaPlugin())||void 0===t?void 0:t.options;(null==i?void 0:i.autoMuteCondition)&&["all","selected"].includes(null==i?void 0:i.autoMuteCondition)&&(null===(e=this._getAutoMediaPlugin())||void 0===e||e.mute())}_titleHandler(){var t;const e=()=>{var t;this._titleTimerID=null,null===(t=this._titleControlRef.value)||void 0===t||t.show()};this._titleTimerID&&window.clearTimeout(this._titleTimerID),(null===(t=this._titleControlRef.value)||void 0===t?void 0:t.isVisible())&&e(),this._titleTimerID=window.setTimeout(e,500)}connectedCallback(){super.connectedCallback(),this.addEventListener("frigate-card:media:loaded",this._boundAutoPlayHandler),this.addEventListener("frigate-card:media:loaded",this._boundAutoUnmuteHandler),this.addEventListener("frigate-card:media:loaded",this._boundAdaptContainerHeightToSlide),this.addEventListener("frigate-card:media:loaded",this._boundTitleHandler),this._resizeObserver.observe(this),this._intersectionObserver.observe(this)}disconnectedCallback(){this.removeEventListener("frigate-card:media:loaded",this._boundAutoPlayHandler),this.removeEventListener("frigate-card:media:loaded",this._boundAutoUnmuteHandler),this.removeEventListener("frigate-card:media:loaded",this._boundAdaptContainerHeightToSlide),this.removeEventListener("frigate-card:media:loaded",this._boundTitleHandler),this._resizeObserver.disconnect(),this._intersectionObserver.disconnect(),this._mediaLoadedInfo={},super.disconnectedCallback()}_reInitAndAdjustHeight(){var t;null===(t=this.frigateCardCarousel())||void 0===t||t.carouselReInitWhenSafe(),this._adaptContainerHeightToSlide()}_intersectionHandler(t){t.some((t=>t.isIntersecting))&&this._reInitAndAdjustHeight()}_adaptContainerHeightToSlide(){window.requestAnimationFrame((()=>{var t;const e=null===(t=this.frigateCardCarousel())||void 0===t?void 0:t.getCarouselSelected();if(e){this.style.removeProperty("max-height");const t=e.element.getBoundingClientRect().height;void 0!==t&&t>0&&(this.style.maxHeight=`${t}px`)}}))}_dispatchMediaLoadedInfo(){var t,e;const i=null===(e=null===(t=this.frigateCardCarousel())||void 0===t?void 0:t.getCarouselSelected())||void 0===e?void 0:e.index;void 0!==i&&i in this._mediaLoadedInfo&&e_(this,this._mediaLoadedInfo[i])}_storeMediaLoadedInfo(t){var e,i;t.stopPropagation();const n=t.detail.mediaLoadedInfo,o=t.detail.slide;n&&i_(n)&&(this._mediaLoadedInfo[o]=n,(null===(i=null===(e=this.frigateCardCarousel())||void 0===e?void 0:e.getCarouselSelected())||void 0===i?void 0:i.index)===o&&e_(this,n))}_removeMediaLoadedInfo(t){var e,i;const n=t.detail.slide;delete this._mediaLoadedInfo[n],(null===(i=null===(e=this.frigateCardCarousel())||void 0===e?void 0:e.getCarouselSelected())||void 0===i?void 0:i.index)!==n&&t.stopPropagation()}render(){return K` {this._slideResizeObserver.disconnect(),this._slideResizeObserver.observe(t.detail.element),Dg(this,"media-carousel:select",t.detail),this._dispatchMediaLoadedInfo()}} + @frigate-card:carousel:media:loaded=${this._storeMediaLoadedInfo.bind(this)} + @frigate-card:carousel:media:unloaded=${this._removeMediaLoadedInfo.bind(this)} + > + + + + + ${this.label&&this.titlePopupConfig?K` + `:""}`}static get styles(){return _(":host {\n display: block;\n width: 100%;\n height: 100%;\n --video-max-height: none;\n position: relative;\n}")}};t([yt({attribute:!1})],cw.prototype,"nextPreviousConfig",void 0),t([yt({attribute:!1})],cw.prototype,"carouselOptions",void 0),t([yt({attribute:!1})],cw.prototype,"carouselPlugins",void 0),t([yt({attribute:!0})],cw.prototype,"transitionEffect",void 0),t([yt({attribute:!1})],cw.prototype,"label",void 0),t([yt({attribute:!1})],cw.prototype,"titlePopupConfig",void 0),cw=t([vt("frigate-card-media-carousel")],cw);let hw=class extends gt{constructor(){super(...arguments),this._toastRef=zt()}render(){if(!this.text||!this.config||"none"==this.config.mode||!this.fitInto)return K``;const t=this.config.mode.match(/-top-/)?"top":"bottom",e=this.config.mode.match(/-left$/)?"left":"right";return K` + `}isVisible(){var t,e;return null!==(e=null===(t=this._toastRef.value)||void 0===t?void 0:t.opened)&&void 0!==e&&e}hide(){this._toastRef.value&&(this._toastRef.value.opened=!1)}show(){this._toastRef.value&&(this._toastRef.value.opened=!1,this._toastRef.value.opened=!0)}static get styles(){return _(":host {\n --paper-toast-background-color: rgba(0,0,0,0.6);\n --paper-toast-color: white;\n}\n\npaper-toast {\n max-width: unset;\n min-width: unset;\n}")}};t([yt({attribute:!1})],hw.prototype,"config",void 0),t([yt({attribute:!1})],hw.prototype,"text",void 0),t([yt({attribute:!1})],hw.prototype,"fitInto",void 0),hw=t([vt("frigate-card-title-control")],hw);var uw=":host {\n width: 100%;\n height: 100%;\n display: flex;\n flex-direction: column;\n position: relative;\n overflow: hidden;\n}\n\n::slotted:not([name]) {\n flex: 1;\n}";const Aw=document.createElement("template");Aw.innerHTML='\n
\n
\n';class pw extends HTMLElement{constructor(){super();const t=this.attachShadow({mode:"open"});t.appendChild(Aw.content.cloneNode(!0)),this._freeSpaceDiv=t.getElementById("fs")}connectedCallback(){this._freeSpaceDiv&&this._freeSpaceDiv.addEventListener("click",this.handleFreeSpaceDivClick),this.upgradeProperty("open")}disconnectedCallback(){document.removeEventListener("keyup",this.handleKeyUp)}upgradeProperty(t){if(this.hasOwnProperty(t)){let e=this[t];delete this[t],this[t]=e}}handleKeyUp=t=>{if(!t.altKey&&"Escape"===t.key)t.preventDefault(),this.open=!1};get open(){return this.hasAttribute("open")}set open(t){t?this.hasAttribute("open")||this.setAttribute("open",""):this.hasAttribute("open")&&this.removeAttribute("open")}static get observedAttributes(){return["open"]}attributeChangedCallback(t,e,i){"open"===t&&(this.open?(this.setAttribute("tabindex","0"),this.setAttribute("aria-disabled","false"),this.focus({preventScroll:!0}),document.addEventListener("keyup",this.handleKeyUp),this.dispatchEvent(new CustomEvent("open",{bubbles:!0}))):(this.setAttribute("tabindex","-1"),this.setAttribute("aria-disabled","true"),document.removeEventListener("keyup",this.handleKeyUp),this.dispatchEvent(new CustomEvent("close",{bubbles:!0}))))}handleFreeSpaceDivClick=()=>{this.open=!1}}customElements.define("side-drawer",pw);let mw=class extends gt{constructor(){super(...arguments),this.location="left",this.control=!0,this.open=!1,this.empty=!0,this._refDrawer=zt(),this._refSlot=zt(),this._resizeObserver=new ResizeObserver((()=>this._hideDrawerIfNecessary())),this._isHoverableDevice=Rg()}firstUpdated(t){var e,i;super.firstUpdated(t);const n=document.createElement("style");n.innerHTML=":host {\n width: unset;\n}\n\n#fs {\n display: none;\n width: 100%;\n inset: 0;\n}\n\n#d,\n#fs {\n height: 100%;\n position: absolute;\n}\n\n#d {\n overflow: visible;\n max-width: 90%;\n}\n\n:host([location=right]) #d {\n left: unset;\n right: 0;\n transform: translateX(100%);\n}\n\n:host([location=right][open]) #d {\n transform: none;\n box-shadow: 0px 0px 25px 0px black;\n}\n\n#ifs {\n height: 100%;\n}",null===(i=null===(e=this._refDrawer.value)||void 0===e?void 0:e.shadowRoot)||void 0===i||i.appendChild(n)}_slotChanged(){var t;const e=null===(t=this._refSlot.value)||void 0===t?void 0:t.assignedElements({flatten:!0});this._resizeObserver.disconnect();for(const t of null!=e?e:[])this._resizeObserver.observe(t);this._hideDrawerIfNecessary()}_hideDrawerIfNecessary(){var t;if(!this._refDrawer.value)return;const e=null===(t=this._refSlot.value)||void 0===t?void 0:t.assignedElements({flatten:!0});this.empty=!e||!e.length||e.every((t=>{const e=t.getBoundingClientRect();return!e.width||!e.height}))}render(){return K` + {this.open&&(this.open=!1)}} + > + ${this.control?K` +
{Vm(t),this.open=!this.open}} + > + {this._isHoverableDevice&&!this.open&&(this.open=!0)}} + > + +
+ `:""} + +
+ `}static get styles(){return _("side-drawer {\n background-color: var(--card-background-color);\n}\n\ndiv.control-surround {\n position: absolute;\n bottom: 50%;\n transform: translateY(50%);\n z-index: 0;\n padding-top: 20px;\n padding-bottom: 20px;\n}\n\n:host([location=left]) div.control-surround {\n padding-right: 12px;\n left: 100%;\n}\n\n:host([location=right]) div.control-surround {\n padding-left: 12px;\n right: 100%;\n}\n\n:host([empty]), :host([empty]) > * {\n visibility: hidden;\n}\n\n:host(:not([empty])), :host(:not([empty])) > * {\n visibility: visible;\n}\n\nha-icon.control {\n color: var(--secondary-color, white);\n background-color: rgba(0, 0, 0, 0.7);\n opacity: 0.7;\n pointer-events: all;\n --mdc-icon-size: 20px;\n padding-top: 20px;\n padding-bottom: 20px;\n transition: opacity 0.5s ease;\n}\n\n:host([open]) ha-icon.control, ha-icon.control:hover {\n opacity: 1;\n background-color: black;\n}\n\n:host([location=left]) ha-icon.control {\n border-top-right-radius: 20px;\n border-bottom-right-radius: 20px;\n}\n\n:host([location=right]) ha-icon.control {\n border-top-left-radius: 20px;\n border-bottom-left-radius: 20px;\n}")}};t([yt({attribute:!0,reflect:!0})],mw.prototype,"location",void 0),t([yt({attribute:!0,reflect:!0,type:Boolean})],mw.prototype,"control",void 0),t([yt({type:Boolean,reflect:!0,attribute:!0})],mw.prototype,"open",void 0),t([yt({type:Boolean,reflect:!0,attribute:!0})],mw.prototype,"empty",void 0),mw=t([vt("frigate-card-drawer")],mw);let gw=class extends gt{constructor(){super(...arguments),this._refDrawerLeft=zt(),this._refDrawerRight=zt(),this._boundDrawerHandler=this._drawerHandler.bind(this)}connectedCallback(){super.connectedCallback(),this.addEventListener("frigate-card:drawer:open",this._boundDrawerHandler),this.addEventListener("frigate-card:drawer:close",this._boundDrawerHandler)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("frigate-card:drawer:open",this._boundDrawerHandler),this.removeEventListener("frigate-card:drawer:close",this._boundDrawerHandler)}_drawerHandler(t){const e=t.detail.drawer,i=t.type.endsWith(":open");"left"===e&&this._refDrawerLeft.value?this._refDrawerLeft.value.open=i:"right"===e&&this._refDrawerRight.value&&(this._refDrawerRight.value.open=i)}render(){return K` + + + + + + + + `}static get styles(){return _(uw)}};gw=t([vt("frigate-card-surround")],gw);let fw=class extends gt{async _fetchMedia(){var t,e,i,n;if(!this.fetch||!this.hass||!this.view||!this.config||"none"===this.config.mode||this.view.target||!this.browseMediaParams||null!==(i=null===(e=null===(t=this.view.context)||void 0===t?void 0:t.thumbnails)||void 0===e?void 0:e.fetch)&&void 0!==i&&!i)return;let o;try{o=await by(this.hass,this.browseMediaParams)}catch(t){return qg(this,t)}null!==gy(o)&&(null===(n=this.view)||void 0===n||n.evolve(Object.assign(Object.assign({},this.targetView&&{view:this.targetView}),{target:o,childIndex:null,previous:null})).dispatchChangeEvent(this))}_hasDrawer(){return!!this.config&&["left","right"].includes(this.config.mode)}willUpdate(t){["view","targetView","fetch","browseMediaParams"].some((e=>t.has(e)))&&this._fetchMedia()}render(){if(!this.hass||!this.view||!this.config)return;const t=(t,e)=>{this.config&&this._hasDrawer()&&Dg(t.composedPath()[0],"drawer:"+e,{drawer:this.config.mode})};return K` t(e,"open")} + @frigate-card:thumbnails:close=${e=>t(e,"close")} + > + ${this.config&&"none"!==this.config.mode?K` t(e,"close")} + @frigate-card:thumbnail-carousel:tap=${t=>{var e;null===(e=this.view)||void 0===e||e.evolve({view:this.targetView||"media",target:t.detail.target,childIndex:t.detail.childIndex,context:null}).dispatchChangeEvent(t.composedPath()[0])}} + > + `:""} + + `}static get styles(){return _(uw)}};t([yt({attribute:!1})],fw.prototype,"hass",void 0),t([yt({attribute:!1})],fw.prototype,"view",void 0),t([yt({attribute:!1,hasChanged:Tg})],fw.prototype,"config",void 0),t([yt({attribute:!1})],fw.prototype,"targetView",void 0),t([yt({attribute:!0,type:Boolean})],fw.prototype,"fetch",void 0),t([yt({attribute:!1,hasChanged:Tg})],fw.prototype,"browseMediaParams",void 0),t([yt({attribute:!1})],fw.prototype,"cameras",void 0),fw=t([vt("frigate-card-surround-thumbnails")],fw);var vw="img, video {\n object-fit: var(--frigate-card-media-layout-fit, contain);\n object-position: var(--frigate-card-media-layout-position-x, 50%) var(--frigate-card-media-layout-position-y, 50%);\n}";customElements.whenDefined("ha-hls-player").then((()=>{let e=class extends(customElements.get("ha-hls-player")){play(){var t;null===(t=this._video)||void 0===t||t.play()}pause(){var t;null===(t=this._video)||void 0===t||t.pause()}mute(){this._video&&(this._video.muted=!0)}unmute(){this._video&&(this._video.muted=!1)}seek(t){this._video&&(this._video.currentTime=t)}render(){return this._error?Gg(this,this._error):K` + + `}static get styles(){return[super.styles,_(vw),w` + :host { + width: 100%; + height: 100%; + } + video { + width: 100%; + height: 100%; + } + `]}};t([wt("#video")],e.prototype,"_video",void 0),e=t([vt("frigate-card-ha-hls-player")],e)})),customElements.whenDefined("ha-web-rtc-player").then((()=>{let e=class extends(customElements.get("ha-web-rtc-player")){play(){var t;null===(t=this._video)||void 0===t||t.play()}pause(){var t;null===(t=this._video)||void 0===t||t.pause()}mute(){this._video&&(this._video.muted=!0)}unmute(){this._video&&(this._video.muted=!1)}seek(t){this._video&&(this._video.currentTime=t)}render(){return this._error?Gg(this,`${this._error} (${this.entityid})`):K` + + `}static get styles(){return[super.styles,_(vw),w` + :host { + width: 100%; + height: 100%; + } + video { + width: 100%; + height: 100%; + } + `]}};t([wt("#remote-stream")],e.prototype,"_video",void 0),e=t([vt("frigate-card-ha-web-rtc-player")],e)})),customElements.whenDefined("ha-camera-stream").then((()=>{let e=class extends(customElements.get("ha-camera-stream")){play(){var t;null===(t=this._player)||void 0===t||t.play()}pause(){var t;null===(t=this._player)||void 0===t||t.pause()}mute(){var t;null===(t=this._player)||void 0===t||t.mute()}unmute(){var t;null===(t=this._player)||void 0===t||t.unmute()}seek(t){var e;null===(e=this._player)||void 0===e||e.seek(t)}render(){return this.stateObj?this._shouldRenderMJPEG?K` + {t_(this,t)}} + .src=${void 0===this._connected||this._connected?(i=this.stateObj,`/api/camera_proxy_stream/${i.entity_id}?token=${i.attributes.access_token}`):""} + .alt=${`Preview of the ${t=this.stateObj,void 0===t.attributes.friendly_name?(e=t.entity_id,e.substr(e.indexOf(".")+1)).replace(/_/g," "):t.attributes.friendly_name||""} camera.`} + /> + `:"hls"===this.stateObj.attributes.frontend_stream_type?this._url?K` `:K``:"web_rtc"===this.stateObj.attributes.frontend_stream_type?K``:void 0:K``;var t,e,i}static get styles(){return[super.styles,_(vw),w` + :host { + width: 100%; + height: 100%; + } + img { + width: 100%; + height: 100%; + } + `]}};t([wt("#player")],e.prototype,"_player",void 0),e=t([vt("frigate-card-ha-camera-stream")],e)}));let bw=class extends gt{constructor(){super(),this._inBackground=!0,this._backgroundMediaLoadedInfo=null,this._messageReceivedPostRender=!1,this._renderKey=0,this._intersectionObserver=new IntersectionObserver(this._intersectionHandler.bind(this))}_intersectionHandler(t){this._inBackground=t.every((t=>!t.isIntersecting)),this._inBackground||this._messageReceivedPostRender||!this._backgroundMediaLoadedInfo||(e_(this,this._backgroundMediaLoadedInfo),this._backgroundMediaLoadedInfo=null),this._messageReceivedPostRender&&!this._inBackground&&this.requestUpdate()}shouldUpdate(t){return!this._inBackground||!this._messageReceivedPostRender}connectedCallback(){this._intersectionObserver.observe(this),super.connectedCallback()}disconnectedCallback(){super.disconnectedCallback(),this._intersectionObserver.disconnect()}render(){if(!(this.hass&&this.liveConfig&&this.cameras&&this.view))return;const t=eg(this.liveConfig,this.liveOverrides,this.conditionState),e=Cy(this.hass,this.cameras,this.view.camera,t.controls.thumbnails.media),i=K`${K_(this._renderKey,K`{this._renderKey++,this._messageReceivedPostRender=!0,this._inBackground&&t.stopPropagation()}} + @frigate-card:media:loaded=${t=>{this._inBackground&&(this._backgroundMediaLoadedInfo=t.detail,t.stopPropagation())}} + @frigate-card:view:change=${t=>{this._inBackground&&t.stopPropagation()}} + > + + + `)}`;return this._messageReceivedPostRender=!1,i}static get styles(){return _(":host {\n width: 100%;\n height: 100%;\n display: flex;\n flex-direction: column;\n gap: 5px;\n}\n\nfrigate-card-live-carousel {\n flex: 1;\n min-height: 0;\n}")}};t([yt({attribute:!1})],bw.prototype,"conditionState",void 0),t([yt({attribute:!1})],bw.prototype,"hass",void 0),t([yt({attribute:!1})],bw.prototype,"view",void 0),t([yt({attribute:!1})],bw.prototype,"cameras",void 0),t([yt({attribute:!1})],bw.prototype,"liveConfig",void 0),t([yt({attribute:!1,hasChanged:Tg})],bw.prototype,"liveOverrides",void 0),t([_t()],bw.prototype,"_inBackground",void 0),bw=t([vt("frigate-card-live")],bw);let yw=class extends gt{constructor(){super(...arguments),this._cameraToSlide={},this._refMediaCarousel=zt()}updated(t){var e,i,n;super.updated(t);const o=this._refMediaCarousel.value,r=null==o?void 0:o.frigateCardCarousel();if(t.has("view")){const o=t.get("view");if(r&&(null===(e=this.view)||void 0===e?void 0:e.camera)&&(!o||(null===(i=this.view)||void 0===i?void 0:i.camera)!==o.camera)){const t=this._cameraToSlide[this.view.camera];void 0!==t&&t!==(null===(n=r.getCarouselSelected())||void 0===n?void 0:n.index)&&r.carouselScrollTo(t)}}o&&r&&t.has("inBackground")&&(this.inBackground?(o.autoPause(),o.autoMute()):(o.autoPlay(),o.autoUnmute()))}_getTransitionEffect(){var t,e;return null!==(e=null===(t=this.liveConfig)||void 0===t?void 0:t.transition_effect)&&void 0!==e?e:Pm.live.transition_effect}_getOptions(){var t;return{startIndex:this.cameras&&this.view?Math.max(0,Array.from(this.cameras.keys()).indexOf(this.view.camera)):0,draggable:null===(t=this.liveConfig)||void 0===t?void 0:t.draggable,loop:!0}}_getPlugins(){var t,e,i,n,o,r;return[...this.cameras&&this.cameras.size>1?[W_({forceWheelAxis:"y"})]:[],iw(Object.assign(Object.assign({},(null===(t=this.liveConfig)||void 0===t?void 0:t.lazy_load)&&{lazyLoadCallback:(t,e)=>this._lazyloadOrUnloadSlide("load",t,e)}),{lazyUnloadCondition:null===(e=this.liveConfig)||void 0===e?void 0:e.lazy_unload,lazyUnloadCallback:(t,e)=>this._lazyloadOrUnloadSlide("unload",t,e)})),tw(Object.assign(Object.assign(Object.assign(Object.assign({playerSelector:"frigate-card-live-provider"},(null===(i=this.liveConfig)||void 0===i?void 0:i.auto_play)&&{autoPlayCondition:this.liveConfig.auto_play}),(null===(n=this.liveConfig)||void 0===n?void 0:n.auto_pause)&&{autoPauseCondition:this.liveConfig.auto_pause}),(null===(o=this.liveConfig)||void 0===o?void 0:o.auto_mute)&&{autoMuteCondition:this.liveConfig.auto_mute}),(null===(r=this.liveConfig)||void 0===r?void 0:r.auto_unmute)&&{autoUnmuteCondition:this.liveConfig.auto_unmute}))]}_getLazyLoadCount(){var t;return!1===(null===(t=this.liveConfig)||void 0===t?void 0:t.lazy_load)?null:0}_getSlides(){if(!this.cameras)return[[],{}];const t=[],e={};for(const[i,n]of this.cameras){const o=this._renderLive(i,n,t.length);o&&(e[i]=t.length,t.push(o))}return[t,e]}_setViewHandler(){var t,e,i;const n=null===(i=null===(e=null===(t=this._refMediaCarousel.value)||void 0===t?void 0:t.frigateCardCarousel())||void 0===e?void 0:e.getCarouselSelected())||void 0===i?void 0:i.index;void 0!==n&&this.view&&this.cameras&&this.view.evolve({camera:Array.from(this.cameras.keys())[n],target:null,childIndex:null}).mergeInContext({thumbnails:{fetch:!1}}).dispatchChangeEvent(this)}_lazyloadOrUnloadSlide(t,e,i){i instanceof HTMLSlotElement&&(i=i.assignedElements({flatten:!0})[0]);const n=null==i?void 0:i.querySelector("frigate-card-live-provider");n&&(n.disabled="load"!==t)}_renderLive(t,e,i){if(!this.liveConfig)return;const n=Object.assign(Object.assign({},this.conditionState),{camera:t}),o=eg(this.liveConfig,this.liveOverrides,n);return K` +
+ {lw(i,t)}} + @frigate-card:media:unloaded=${t=>{dw(i,t)}} + > + +
+ `}_getCameraNeighbors(){var t,e;if(!this.cameras||!this.view||!this.hass)return[null,null];const i=Array.from(this.cameras.keys()),n=i.indexOf(this.view.camera);if(n<0||this.cameras.size<=1)return[null,null];return[null!==(t=this.cameras.get(i[n>0?n-1:this.cameras.size-1]))&&void 0!==t?t:null,null!==(e=this.cameras.get(i[n+1{Dg(this,"view:change-context",{thumbnails:{fetch:!0}})}} + > + {var e,i;null===(i=null===(e=this._refMediaCarousel.value)||void 0===e?void 0:e.frigateCardCarousel())||void 0===i||i.carouselScrollPrevious(),Vm(t)}} + > + + ${t} + {var e,i;null===(i=null===(e=this._refMediaCarousel.value)||void 0===e?void 0:e.frigateCardCarousel())||void 0===i||i.carouselScrollNext(),Vm(t)}} + > + + + `}static get styles(){return _(".embla__slide {\n height: 100%;\n flex: 0 0 100%;\n}")}};t([yt({attribute:!1})],yw.prototype,"hass",void 0),t([yt({attribute:!1})],yw.prototype,"view",void 0),t([yt({attribute:!1})],yw.prototype,"cameras",void 0),t([yt({attribute:!1})],yw.prototype,"liveConfig",void 0),t([yt({attribute:!1,hasChanged:Tg})],yw.prototype,"liveOverrides",void 0),t([yt({attribute:!1})],yw.prototype,"inBackground",void 0),t([yt({attribute:!1})],yw.prototype,"conditionState",void 0),yw=t([vt("frigate-card-live-carousel")],yw);let _w=class extends gt{constructor(){super(...arguments),this.disabled=!1,this.label="",this._isVideoMediaLoaded=!1,this._providerRef=zt()}play(){var t;null===(t=this._providerRef.value)||void 0===t||t.play()}pause(){var t;null===(t=this._providerRef.value)||void 0===t||t.pause()}mute(){var t;null===(t=this._providerRef.value)||void 0===t||t.mute()}unmute(){var t;null===(t=this._providerRef.value)||void 0===t||t.unmute()}seek(t){var e;null===(e=this._providerRef.value)||void 0===e||e.seek(t)}_getResolvedProvider(){var t,e,i,n,o,r,s,a;return"auto"===(null===(t=this.cameraConfig)||void 0===t?void 0:t.live_provider)?(null===(i=null===(e=this.cameraConfig)||void 0===e?void 0:e.webrtc_card)||void 0===i?void 0:i.entity)||(null===(o=null===(n=this.cameraConfig)||void 0===n?void 0:n.webrtc_card)||void 0===o?void 0:o.url)?"webrtc-card":(null===(r=this.cameraConfig)||void 0===r?void 0:r.camera_entity)?"ha":(null===(s=this.cameraConfig)||void 0===s?void 0:s.frigate.camera_name)?"frigate-jsmpeg":Pm.cameras.live_provider:(null===(a=this.cameraConfig)||void 0===a?void 0:a.live_provider)||Pm.cameras.live_provider}_shouldShowImageDuringLoading(){var t,e;return!!(null===(t=this.cameraConfig)||void 0===t?void 0:t.camera_entity)&&!!this.hass&&!!(null===(e=this.liveConfig)||void 0===e?void 0:e.show_image_during_load)}disconnectedCallback(){this._isVideoMediaLoaded=!1}_videoMediaShowHandler(){this._isVideoMediaLoaded=!0}willUpdate(t){var e;t.has("disabled")&&this.disabled&&(this._isVideoMediaLoaded=!1,Dg(this,"media:unloaded")),t.has("liveConfig")&&Zy(this,null===(e=this.liveConfig)||void 0===e?void 0:e.layout)}render(){if(this.disabled||!this.hass||!this.liveConfig||!this.cameraConfig)return;this.title=this.label,this.ariaLabel=this.label;const t=this._getResolvedProvider(),e=!this._isVideoMediaLoaded&&this._shouldShowImageDuringLoading(),i={hidden:e};return K` + ${e?K` + `:K``} + ${"ha"===t?K` + `:"webrtc-card"===t?K` + `:K` + `} + `}static get styles(){return _(".hidden {\n display: none;\n}")}};t([yt({attribute:!1})],_w.prototype,"hass",void 0),t([yt({attribute:!1})],_w.prototype,"cameraConfig",void 0),t([yt({attribute:!1})],_w.prototype,"liveConfig",void 0),t([yt({attribute:!0,type:Boolean})],_w.prototype,"disabled",void 0),t([yt({attribute:!1})],_w.prototype,"label",void 0),t([_t()],_w.prototype,"_isVideoMediaLoaded",void 0),_w=t([vt("frigate-card-live-provider")],_w);let ww=class extends gt{constructor(){super(...arguments),this._playerRef=zt()}play(){var t;null===(t=this._playerRef.value)||void 0===t||t.play()}pause(){var t;null===(t=this._playerRef.value)||void 0===t||t.pause()}mute(){var t;null===(t=this._playerRef.value)||void 0===t||t.mute()}unmute(){var t;null===(t=this._playerRef.value)||void 0===t||t.unmute()}seek(t){var e;null===(e=this._playerRef.value)||void 0===e||e.seek(t)}render(){var t;if(!this.hass)return;if(!(null===(t=this.cameraConfig)||void 0===t?void 0:t.camera_entity))return Gg(this,Sg("error.no_live_camera"),{context:this.cameraConfig});const e=this.hass.states[this.cameraConfig.camera_entity];return e?"unavailable"===e.state?Hg(this,Sg("error.live_camera_unavailable"),"info",{icon:"mdi:connection",context:uy(this.hass,this.cameraConfig)}):K` + `:Gg(this,Sg("error.live_camera_not_found"),{context:this.cameraConfig})}static get styles(){return _(":host {\n width: 100%;\n height: 100%;\n display: block;\n --video-max-height: none;\n}")}};t([yt({attribute:!1})],ww.prototype,"hass",void 0),t([yt({attribute:!1})],ww.prototype,"cameraConfig",void 0),ww=t([vt("frigate-card-live-ha")],ww);let Cw=class extends gt{constructor(){super(...arguments),this._webrtcTask=new jy(this,this._getWebRTCCardElement,(()=>[1]))}play(){var t;null===(t=this._getPlayer())||void 0===t||t.play().catch((()=>{}))}pause(){var t;null===(t=this._getPlayer())||void 0===t||t.pause()}mute(){const t=this._getPlayer();t&&(t.muted=!0)}unmute(){const t=this._getPlayer();t&&(t.muted=!1)}seek(t){const e=this._getPlayer();e&&(e.currentTime=t)}_getPlayer(){var t;return null===(t=this.renderRoot)||void 0===t?void 0:t.querySelector("#video")}async _getWebRTCCardElement(){return await customElements.whenDefined("webrtc-camera"),customElements.get("webrtc-camera")}_createWebRTC(){var t,e,i,n;const o=this._webrtcTask.value;if(o&&this.hass){const r=new o,s=Object.assign({},this.webRTCConfig);return s.url||(s.url=null===(e=null===(t=this.cameraConfig)||void 0===t?void 0:t.webrtc_card)||void 0===e?void 0:e.url),s.entity||(s.entity=null===(n=null===(i=this.cameraConfig)||void 0===i?void 0:i.webrtc_card)||void 0===n?void 0:n.entity),r.setConfig(s),r.hass=this.hass,r}return null}render(){return Fy(this,this._webrtcTask,(()=>{let t;try{t=this._createWebRTC()}catch(t){return Gg(this,t instanceof fp?t.message:Sg("error.webrtc_card_reported_error")+": "+t.message,{context:t.context})}return t&&(t.id="webrtc"),K`${t}`}),(()=>Ug(Sg("error.webrtc_card_waiting"))))}updated(){this.updateComplete.then((()=>{const t=this._getPlayer();if(t){const e=t.onloadeddata;t.onloadeddata=i=>{e&&e.call(t,i),t_(this,t)}}}))}static get styles(){return _(":host {\n width: 100%;\n height: 100%;\n display: block;\n}\n\n/* Don't drop shadow or have radius for nested webrtc card */\n#webrtc ha-card {\n border-radius: 0px;\n background-color: unset;\n margin: 0px;\n box-shadow: none;\n}\n\n#webrtc #video {\n object-fit: var(--frigate-card-media-layout-fit, contain);\n object-position: var(--frigate-card-media-layout-position-x, 50%) var(--frigate-card-media-layout-position-y, 50%);\n}")}};t([yt({attribute:!1,hasChanged:Tg})],Cw.prototype,"webRTCConfig",void 0),t([yt({attribute:!1})],Cw.prototype,"cameraConfig",void 0),Cw=t([vt("frigate-card-live-webrtc-card")],Cw);let Iw=class extends gt{play(){var t;null===(t=this._jsmpegVideoPlayer)||void 0===t||t.play()}pause(){var t;null===(t=this._jsmpegVideoPlayer)||void 0===t||t.stop()}mute(){var t;const e=null===(t=this._jsmpegVideoPlayer)||void 0===t?void 0:t.player;e&&(e.volume=0)}unmute(){var t;const e=null===(t=this._jsmpegVideoPlayer)||void 0===t?void 0:t.player;e&&(e.volume=1)}seek(t){}async _getURL(){var t,e;if(!this.hass||!(null===(t=this.cameraConfig)||void 0===t?void 0:t.frigate.client_id)||!(null===(e=this.cameraConfig)||void 0===e?void 0:e.frigate.camera_name))return null;let i;try{i=await ey(this.hass,`/api/frigate/${this.cameraConfig.frigate.client_id}/jsmpeg/${this.cameraConfig.frigate.camera_name}`,86400)}catch(t){return Og(t),null}return i?i.replace(/^http/i,"ws"):null}async _createJSMPEGPlayer(t){return new Promise((e=>{var i;let n=!1;const o=new R_.VideoElement(this,t,{canvas:this._jsmpegCanvasElement},Object.assign(Object.assign({pauseWhenHidden:!1,autoplay:!1,protocols:[],audio:!1,videoBufferSize:4194304},null===(i=this.jsmpegConfig)||void 0===i?void 0:i.options),{reconnectInterval:0,onVideoDecode:()=>{!n&&this._jsmpegCanvasElement&&(n=!0,t_(this,this._jsmpegCanvasElement),e(o))}}))}))}_resetPlayer(){if(this._refreshPlayerTimerID&&(window.clearTimeout(this._refreshPlayerTimerID),this._refreshPlayerTimerID=void 0),this._jsmpegVideoPlayer){try{this._jsmpegVideoPlayer.destroy()}catch(t){}this._jsmpegVideoPlayer=void 0}this._jsmpegCanvasElement&&(this._jsmpegCanvasElement.remove(),this._jsmpegCanvasElement=void 0)}connectedCallback(){super.connectedCallback(),this.isConnected&&this.requestUpdate()}disconnectedCallback(){this.isConnected||this._resetPlayer(),super.disconnectedCallback()}async _refreshPlayer(){var t;if(this._resetPlayer(),this._jsmpegCanvasElement=document.createElement("canvas"),this._jsmpegCanvasElement.className="media",!(null===(t=this.cameraConfig)||void 0===t?void 0:t.frigate.camera_name))return Gg(this,Sg("error.no_camera_name"),{context:this.cameraConfig});const e=await this._getURL();e?(this._jsmpegVideoPlayer=await this._createJSMPEGPlayer(e),this._refreshPlayerTimerID=window.setTimeout((()=>{this.requestUpdate()}),828e5)):Gg(this,Sg("error.jsmpeg_no_sign"))}render(){return K`${Vt((async()=>(await this._refreshPlayer(),this._jsmpegVideoPlayer&&this._jsmpegCanvasElement?K`${this._jsmpegCanvasElement}`:Gg(this,Sg("error.jsmpeg_no_player"))))(),Ug())}`}static get styles(){return _(":host {\n width: 100%;\n height: 100%;\n display: flex;\n}\n\ncanvas {\n display: block;\n width: 100%;\n height: 100%;\n object-fit: var(--frigate-card-media-layout-fit, contain);\n object-position: var(--frigate-card-media-layout-position-x, 50%) var(--frigate-card-media-layout-position-y, 50%);\n}")}};t([yt({attribute:!1})],Iw.prototype,"cameraConfig",void 0),t([yt({attribute:!1,hasChanged:Tg})],Iw.prototype,"jsmpegConfig",void 0),Iw=t([vt("frigate-card-live-jsmpeg")],Iw);let Ew=class extends gt{_renderItem(t){if(!this.hass)return;const e=sy(this.hass,Object.assign({},t));return K` + {e.detail.config=t}} + .actionHandler=${Zm({hasHold:Wm(t.hold_action),hasDoubleClick:Wm(t.double_tap_action)})} + > + ${e.title||""} + ${t.subtitle?K`${t.subtitle}`:""} + ${(t=>t.icon?K` + `:K``)(e)} + + `}render(){return this.submenu?K` + t.stopPropagation()} + @click=${t=>Vm(t)} + > + + + + ${this.submenu.items.map(this._renderItem.bind(this))} + + `:K``}static get styles(){return _("ha-icon-button.button {\n color: var(--secondary-color, white);\n background-color: rgba(0, 0, 0, 0.6);\n border-radius: 50%;\n padding: 0px;\n margin: 3px;\n --ha-icon-display: block;\n /* Buttons can always be clicked */\n pointer-events: auto;\n opacity: 0.9;\n}\n\n@keyframes pulse {\n 0% {\n opacity: 1;\n }\n 50% {\n opacity: 0;\n }\n 100% {\n opacity: 1;\n }\n}\nha-icon[data-domain=alert][data-state=on],\nha-icon[data-domain=automation][data-state=on],\nha-icon[data-domain=binary_sensor][data-state=on],\nha-icon[data-domain=calendar][data-state=on],\nha-icon[data-domain=camera][data-state=streaming],\nha-icon[data-domain=cover][data-state=open],\nha-icon[data-domain=fan][data-state=on],\nha-icon[data-domain=humidifier][data-state=on],\nha-icon[data-domain=light][data-state=on],\nha-icon[data-domain=input_boolean][data-state=on],\nha-icon[data-domain=lock][data-state=unlocked],\nha-icon[data-domain=media_player][data-state=on],\nha-icon[data-domain=media_player][data-state=paused],\nha-icon[data-domain=media_player][data-state=playing],\nha-icon[data-domain=script][data-state=on],\nha-icon[data-domain=sun][data-state=above_horizon],\nha-icon[data-domain=switch][data-state=on],\nha-icon[data-domain=timer][data-state=active],\nha-icon[data-domain=vacuum][data-state=cleaning],\nha-icon[data-domain=group][data-state=on],\nha-icon[data-domain=group][data-state=home],\nha-icon[data-domain=group][data-state=open],\nha-icon[data-domain=group][data-state=locked],\nha-icon[data-domain=group][data-state=problem] {\n color: var(--paper-item-icon-active-color, #fdd835);\n}\n\nha-icon[data-domain=climate][data-state=cooling] {\n color: var(--cool-color, var(--state-climate-cool-color));\n}\n\nha-icon[data-domain=climate][data-state=heating] {\n color: var(--heat-color, var(--state-climate-heat-color));\n}\n\nha-icon[data-domain=climate][data-state=drying] {\n color: var(--dry-color, var(--state-climate-dry-color));\n}\n\nha-icon[data-domain=alarm_control_panel] {\n color: var(--alarm-color-armed, var(--label-badge-red));\n}\n\nha-icon[data-domain=alarm_control_panel][data-state=disarmed] {\n color: var(--alarm-color-disarmed, var(--label-badge-green));\n}\n\nha-icon[data-domain=alarm_control_panel][data-state=pending],\nha-icon[data-domain=alarm_control_panel][data-state=arming] {\n color: var(--alarm-color-pending, var(--label-badge-yellow));\n animation: pulse 1s infinite;\n}\n\nha-icon[data-domain=alarm_control_panel][data-state=triggered] {\n color: var(--alarm-color-triggered, var(--label-badge-red));\n animation: pulse 1s infinite;\n}\n\nha-icon[data-domain=plant][data-state=problem],\nha-icon[data-domain=zwave][data-state=dead] {\n color: var(--state-icon-error-color);\n}\n\n/* Color the icon if unavailable */\nha-icon[data-state=unavailable] {\n color: var(--state-unavailable-color);\n}\n\nha-icon-button[data-domain=alert][data-state=on],\nha-icon-button[data-domain=automation][data-state=on],\nha-icon-button[data-domain=binary_sensor][data-state=on],\nha-icon-button[data-domain=calendar][data-state=on],\nha-icon-button[data-domain=camera][data-state=streaming],\nha-icon-button[data-domain=cover][data-state=open],\nha-icon-button[data-domain=fan][data-state=on],\nha-icon-button[data-domain=humidifier][data-state=on],\nha-icon-button[data-domain=light][data-state=on],\nha-icon-button[data-domain=input_boolean][data-state=on],\nha-icon-button[data-domain=lock][data-state=unlocked],\nha-icon-button[data-domain=media_player][data-state=on],\nha-icon-button[data-domain=media_player][data-state=paused],\nha-icon-button[data-domain=media_player][data-state=playing],\nha-icon-button[data-domain=script][data-state=on],\nha-icon-button[data-domain=sun][data-state=above_horizon],\nha-icon-button[data-domain=switch][data-state=on],\nha-icon-button[data-domain=timer][data-state=active],\nha-icon-button[data-domain=vacuum][data-state=cleaning],\nha-icon-button[data-domain=group][data-state=on],\nha-icon-button[data-domain=group][data-state=home],\nha-icon-button[data-domain=group][data-state=open],\nha-icon-button[data-domain=group][data-state=locked],\nha-icon-button[data-domain=group][data-state=problem] {\n color: var(--paper-item-icon-active-color, #fdd835);\n}\n\nha-icon-button[data-domain=climate][data-state=cooling] {\n color: var(--cool-color, var(--state-climate-cool-color));\n}\n\nha-icon-button[data-domain=climate][data-state=heating] {\n color: var(--heat-color, var(--state-climate-heat-color));\n}\n\nha-icon-button[data-domain=climate][data-state=drying] {\n color: var(--dry-color, var(--state-climate-dry-color));\n}\n\nha-icon-button[data-domain=alarm_control_panel] {\n color: var(--alarm-color-armed, var(--label-badge-red));\n}\n\nha-icon-button[data-domain=alarm_control_panel][data-state=disarmed] {\n color: var(--alarm-color-disarmed, var(--label-badge-green));\n}\n\nha-icon-button[data-domain=alarm_control_panel][data-state=pending],\nha-icon-button[data-domain=alarm_control_panel][data-state=arming] {\n color: var(--alarm-color-pending, var(--label-badge-yellow));\n animation: pulse 1s infinite;\n}\n\nha-icon-button[data-domain=alarm_control_panel][data-state=triggered] {\n color: var(--alarm-color-triggered, var(--label-badge-red));\n animation: pulse 1s infinite;\n}\n\nha-icon-button[data-domain=plant][data-state=problem],\nha-icon-button[data-domain=zwave][data-state=dead] {\n color: var(--state-icon-error-color);\n}\n\n/* Color the icon if unavailable */\nha-icon-button[data-state=unavailable] {\n color: var(--state-unavailable-color);\n}\n\n:host {\n pointer-events: auto;\n}\n\nmwc-list-item {\n z-index: 20;\n}")}};t([yt({attribute:!1})],Ew.prototype,"hass",void 0),t([yt({attribute:!1})],Ew.prototype,"submenu",void 0),Ew=t([vt("frigate-card-submenu")],Ew);let xw=class extends gt{shouldUpdate(t){const e=t.get("hass");return 1!=t.size||!this.submenuSelect||!!e&&ny(this.hass,e,[this.submenuSelect.entity])}willUpdate(){var t;if(!this.submenuSelect||!this.hass)return;const e=this.submenuSelect.entity,i=this.hass.states[e],n=null===(t=null==i?void 0:i.attributes)||void 0===t?void 0:t.options;if(!i||!n)return;const o=Object.assign(Object.assign(Object.assign({icon:Zb("select")},sy(this.hass,this.submenuSelect)),this.submenuSelect),{type:"custom:frigate-card-menu-submenu",items:[]});delete o.options;for(const t of n){const n=i.attributes.device_class?this.hass.localize(`component.select.state.${i.attributes.device_class}.${t}`):t;o.items.push(Object.assign(Object.assign({state_color:!0,selected:i.state===t,enabled:!0,title:n||t},(e.startsWith("select.")||e.startsWith("input_select."))&&{tap_action:{action:"call-service",service:e.startsWith("select.")?"select.select_option":"input_select.select_option",service_data:{entity_id:e,option:t}}}),this.submenuSelect.options&&this.submenuSelect.options[t]))}this._generatedSubmenu=o}render(){return K` `}};var Bw;t([yt({attribute:!1})],xw.prototype,"hass",void 0),t([yt({attribute:!1})],xw.prototype,"submenuSelect",void 0),xw=t([vt("frigate-card-submenu-select")],xw);let kw=Bw=class extends gt{constructor(){super(...arguments),this.expanded=!1,this.buttons=[]}set menuConfig(t){this._menuConfig=t,t&&this.style.setProperty("--frigate-card-menu-button-size",`${t.button_size}px`),this.setAttribute("data-style",t.style),this.setAttribute("data-position",t.position),this.setAttribute("data-alignment",t.alignment)}static isHidingMenu(t){var e;return null!==(e="hidden"===(null==t?void 0:t.style))&&void 0!==e&&e}toggleMenu(){this._isHidingMenu()&&(this.expanded=!this.expanded)}_isHidingMenu(){return Bw.isHidingMenu(this._menuConfig)}_isMenuToggleAction(t){if(!t)return!1;const e=Gm(t);return!!e&&"menu_toggle"==e.frigate_card_action}_actionHandler(t,e){if(!t)return;t.detail.config&&(e=t.detail.config),t.stopPropagation();const i=t.detail.action;let n=Ym(i,e);if(!e||!i)return;let o=!1,r=!1;if(Array.isArray(n)){const t=n.length;n=n.filter((t=>!this._isMenuToggleAction(t))),n.length!=t&&(r=!0),n.length&&(o=$m(this,this.hass,e,i,n))}else this._isMenuToggleAction(n)?r=!0:o=$m(this,this.hass,e,i,n);this._isHidingMenu()&&(r?this.expanded=!this.expanded:o&&(this.expanded=!1))}willUpdate(t){var e;const i=null===(e=this._menuConfig)||void 0===e?void 0:e.style,n=(t,e)=>{if("hidden"===i){if("frigate"===t.icon)return-1;if("frigate"===e.icon)return 1}return void 0===t.priority||void 0!==e.priority&&e.priority>t.priority?1:void 0===e.priority||void 0!==t.priority&&e.priority + `;if("custom:frigate-card-menu-submenu-select"===t.type)return K` + `;let e=Object.assign({},t);const i="frigate"===e.icon?Dy:"";this.hass&&"custom:frigate-card-menu-state-icon"===t.type&&(e=sy(this.hass,e));const n=Wm(t.hold_action),o=Wm(t.double_tap_action);return K` this._actionHandler(e,t)} + > + ${i?K``:K``} + `}render(){if(!this._menuConfig)return;const t=this._menuConfig.style;if("none"===t)return;const e="hidden"!==t||this.expanded?this.buttons.filter((t=>!t.alignment||"matching"===t.alignment)):this.buttons.filter((t=>"frigate"===t.icon)),i="hidden"!==t||this.expanded?this.buttons.filter((t=>"opposing"===t.alignment)):[],n={flex:String(e.length)},o={flex:String(i.length)};return K`
+ ${e.map((t=>this._renderButton(t)))} +
+
+ ${i.map((t=>this._renderButton(t)))} +
`}static get styles(){return _('ha-icon-button.button {\n color: var(--secondary-color, white);\n background-color: rgba(0, 0, 0, 0.6);\n border-radius: 50%;\n padding: 0px;\n margin: 3px;\n --ha-icon-display: block;\n /* Buttons can always be clicked */\n pointer-events: auto;\n opacity: 0.9;\n}\n\n@keyframes pulse {\n 0% {\n opacity: 1;\n }\n 50% {\n opacity: 0;\n }\n 100% {\n opacity: 1;\n }\n}\nha-icon[data-domain=alert][data-state=on],\nha-icon[data-domain=automation][data-state=on],\nha-icon[data-domain=binary_sensor][data-state=on],\nha-icon[data-domain=calendar][data-state=on],\nha-icon[data-domain=camera][data-state=streaming],\nha-icon[data-domain=cover][data-state=open],\nha-icon[data-domain=fan][data-state=on],\nha-icon[data-domain=humidifier][data-state=on],\nha-icon[data-domain=light][data-state=on],\nha-icon[data-domain=input_boolean][data-state=on],\nha-icon[data-domain=lock][data-state=unlocked],\nha-icon[data-domain=media_player][data-state=on],\nha-icon[data-domain=media_player][data-state=paused],\nha-icon[data-domain=media_player][data-state=playing],\nha-icon[data-domain=script][data-state=on],\nha-icon[data-domain=sun][data-state=above_horizon],\nha-icon[data-domain=switch][data-state=on],\nha-icon[data-domain=timer][data-state=active],\nha-icon[data-domain=vacuum][data-state=cleaning],\nha-icon[data-domain=group][data-state=on],\nha-icon[data-domain=group][data-state=home],\nha-icon[data-domain=group][data-state=open],\nha-icon[data-domain=group][data-state=locked],\nha-icon[data-domain=group][data-state=problem] {\n color: var(--paper-item-icon-active-color, #fdd835);\n}\n\nha-icon[data-domain=climate][data-state=cooling] {\n color: var(--cool-color, var(--state-climate-cool-color));\n}\n\nha-icon[data-domain=climate][data-state=heating] {\n color: var(--heat-color, var(--state-climate-heat-color));\n}\n\nha-icon[data-domain=climate][data-state=drying] {\n color: var(--dry-color, var(--state-climate-dry-color));\n}\n\nha-icon[data-domain=alarm_control_panel] {\n color: var(--alarm-color-armed, var(--label-badge-red));\n}\n\nha-icon[data-domain=alarm_control_panel][data-state=disarmed] {\n color: var(--alarm-color-disarmed, var(--label-badge-green));\n}\n\nha-icon[data-domain=alarm_control_panel][data-state=pending],\nha-icon[data-domain=alarm_control_panel][data-state=arming] {\n color: var(--alarm-color-pending, var(--label-badge-yellow));\n animation: pulse 1s infinite;\n}\n\nha-icon[data-domain=alarm_control_panel][data-state=triggered] {\n color: var(--alarm-color-triggered, var(--label-badge-red));\n animation: pulse 1s infinite;\n}\n\nha-icon[data-domain=plant][data-state=problem],\nha-icon[data-domain=zwave][data-state=dead] {\n color: var(--state-icon-error-color);\n}\n\n/* Color the icon if unavailable */\nha-icon[data-state=unavailable] {\n color: var(--state-unavailable-color);\n}\n\nha-icon-button[data-domain=alert][data-state=on],\nha-icon-button[data-domain=automation][data-state=on],\nha-icon-button[data-domain=binary_sensor][data-state=on],\nha-icon-button[data-domain=calendar][data-state=on],\nha-icon-button[data-domain=camera][data-state=streaming],\nha-icon-button[data-domain=cover][data-state=open],\nha-icon-button[data-domain=fan][data-state=on],\nha-icon-button[data-domain=humidifier][data-state=on],\nha-icon-button[data-domain=light][data-state=on],\nha-icon-button[data-domain=input_boolean][data-state=on],\nha-icon-button[data-domain=lock][data-state=unlocked],\nha-icon-button[data-domain=media_player][data-state=on],\nha-icon-button[data-domain=media_player][data-state=paused],\nha-icon-button[data-domain=media_player][data-state=playing],\nha-icon-button[data-domain=script][data-state=on],\nha-icon-button[data-domain=sun][data-state=above_horizon],\nha-icon-button[data-domain=switch][data-state=on],\nha-icon-button[data-domain=timer][data-state=active],\nha-icon-button[data-domain=vacuum][data-state=cleaning],\nha-icon-button[data-domain=group][data-state=on],\nha-icon-button[data-domain=group][data-state=home],\nha-icon-button[data-domain=group][data-state=open],\nha-icon-button[data-domain=group][data-state=locked],\nha-icon-button[data-domain=group][data-state=problem] {\n color: var(--paper-item-icon-active-color, #fdd835);\n}\n\nha-icon-button[data-domain=climate][data-state=cooling] {\n color: var(--cool-color, var(--state-climate-cool-color));\n}\n\nha-icon-button[data-domain=climate][data-state=heating] {\n color: var(--heat-color, var(--state-climate-heat-color));\n}\n\nha-icon-button[data-domain=climate][data-state=drying] {\n color: var(--dry-color, var(--state-climate-dry-color));\n}\n\nha-icon-button[data-domain=alarm_control_panel] {\n color: var(--alarm-color-armed, var(--label-badge-red));\n}\n\nha-icon-button[data-domain=alarm_control_panel][data-state=disarmed] {\n color: var(--alarm-color-disarmed, var(--label-badge-green));\n}\n\nha-icon-button[data-domain=alarm_control_panel][data-state=pending],\nha-icon-button[data-domain=alarm_control_panel][data-state=arming] {\n color: var(--alarm-color-pending, var(--label-badge-yellow));\n animation: pulse 1s infinite;\n}\n\nha-icon-button[data-domain=alarm_control_panel][data-state=triggered] {\n color: var(--alarm-color-triggered, var(--label-badge-red));\n animation: pulse 1s infinite;\n}\n\nha-icon-button[data-domain=plant][data-state=problem],\nha-icon-button[data-domain=zwave][data-state=dead] {\n color: var(--state-icon-error-color);\n}\n\n/* Color the icon if unavailable */\nha-icon-button[data-state=unavailable] {\n color: var(--state-unavailable-color);\n}\n\n:host {\n --frigate-card-menu-button-size: 40px;\n --mdc-icon-button-size: var(--frigate-card-menu-button-size);\n --mdc-icon-size: calc(var(--mdc-icon-button-size) / 2);\n pointer-events: none;\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n}\n\n/***********************************\n * Aligned divs: matching & opposing\n ***********************************/\ndiv.matching,\ndiv.opposing {\n display: flex;\n flex-wrap: wrap;\n flex-direction: row;\n align-items: flex-start;\n min-width: 0px;\n min-height: 0px;\n}\n\ndiv.matching {\n justify-content: flex-start;\n}\n\ndiv.opposing {\n justify-content: flex-end;\n}\n\n/********************\n * Outside menu style\n ********************/\n:host([data-style=outside]) {\n width: 100%;\n background: var(--secondary-background-color);\n}\n\n/************************************\n * Match menu rounded corners to card\n ************************************/\n:host([data-position=top]),\n:host([data-position=left]) {\n border-top-left-radius: var(--ha-card-border-radius, 4px);\n}\n\n:host([data-position=top]),\n:host([data-position=right]) {\n border-top-right-radius: var(--ha-card-border-radius, 4px);\n}\n\n:host([data-position=bottom]),\n:host([data-position=left]) {\n border-bottom-left-radius: var(--ha-card-border-radius, 4px);\n}\n\n:host([data-position=bottom]),\n:host([data-position=right]) {\n border-bottom-right-radius: var(--ha-card-border-radius, 4px);\n}\n\n/**************************************\n * Positioning for absolute menu styles\n **************************************/\n:host(:not([data-style=outside])[data-position=top]),\n:host(:not([data-style=outside])[data-position=left][data-alignment=top]),\n:host(:not([data-style=outside])[data-position=right][data-alignment=top]) {\n top: 0px;\n}\n\n:host(:not([data-style=outside])[data-position=bottom]),\n:host(:not([data-style=outside])[data-position=left][data-alignment=bottom]),\n:host(:not([data-style=outside])[data-position=right][data-alignment=bottom]) {\n bottom: 0px;\n}\n\n:host(:not([data-style=outside])[data-position=left]),\n:host(:not([data-style=outside])[data-position=top][data-alignment=left]),\n:host(:not([data-style=outside])[data-position=bottom][data-alignment=left]) {\n left: 0px;\n}\n\n:host(:not([data-style=outside])[data-position=right]),\n:host(:not([data-style=outside])[data-position=top][data-alignment=right]),\n:host(:not([data-style=outside])[data-position=bottom][data-alignment=right]) {\n right: 0px;\n}\n\n/********************************************************\n * Hack: Ensure host & div expand for column flex layouts\n ********************************************************/\n:host(:not([data-style=outside])[data-position=left]) {\n writing-mode: vertical-lr;\n}\n\n:host(:not([data-style=outside])[data-position=right]) {\n writing-mode: vertical-rl;\n}\n\n:host(:not([data-style=outside])[data-style=overlay][data-position=left]) div > *,\n:host(:not([data-style=outside])[data-style=overlay][data-position=right]) div > *,\n:host(:not([data-style=outside])[data-style=hover][data-position=left]) div > *,\n:host(:not([data-style=outside])[data-style=hover][data-position=right]) div > *,\n:host(:not([data-style=outside])[data-style=hidden][data-position=left]) div > *,\n:host(:not([data-style=outside])[data-style=hidden][data-position=right]) div > * {\n writing-mode: horizontal-tb;\n}\n\n/**********************\n * "Reverse" alignments\n **********************/\n:host(:not([data-style=outside])[data-position=left][data-alignment=bottom]),\n:host(:not([data-style=outside])[data-position=right][data-alignment=bottom]),\n:host([data-position=top][data-alignment=right]),\n:host([data-position=bottom][data-alignment=right]),\n:host(:not([data-style=outside])[data-position=left][data-alignment=bottom]) div,\n:host(:not([data-style=outside])[data-position=right][data-alignment=bottom]) div,\n:host([data-position=top][data-alignment=right]) div,\n:host([data-position=bottom][data-alignment=right]) div {\n flex-direction: row-reverse;\n}\n\n/****************************\n * Wrap upwards on the bottom\n ****************************/\n:host(:not([data-style=outside])[data-position=bottom]) div {\n flex-wrap: wrap-reverse;\n}\n\n/********************************************\n * Positioning for absolute based menu styles\n ********************************************/\n:host([data-style=overlay]),\n:host([data-style=hover]),\n:host([data-style=hidden]) {\n position: absolute;\n overflow: hidden;\n width: calc(var(--frigate-card-menu-button-size) + 6px);\n height: calc(var(--frigate-card-menu-button-size) + 6px);\n}\n\n:host([data-style=overlay][data-position=top]),\n:host([data-style=overlay][data-position=bottom]),\n:host([data-style=hover][data-position=top]),\n:host([data-style=hover][data-position=bottom]),\n:host([data-style=hidden][data-position=top][expanded]),\n:host([data-style=hidden][data-position=bottom][expanded]) {\n width: 100%;\n height: auto;\n overflow: visible;\n background: linear-gradient(90deg, rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0));\n}\n\n:host([data-style=overlay][data-position=left]),\n:host([data-style=overlay][data-position=right]),\n:host([data-style=hover][data-position=left]),\n:host([data-style=hover][data-position=right]),\n:host([data-style=hidden][data-position=left][expanded]),\n:host([data-style=hidden][data-position=right][expanded]) {\n height: 100%;\n width: auto;\n overflow: visible;\n background: linear-gradient(180deg, rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0));\n}')}};t([yt({attribute:!1})],kw.prototype,"hass",void 0),t([yt({attribute:!0,type:Boolean,reflect:!0})],kw.prototype,"expanded",void 0),t([_t()],kw.prototype,"_menuConfig",void 0),t([yt({attribute:!1})],kw.prototype,"buttons",void 0),kw=Bw=t([vt("frigate-card-menu")],kw);let Sw=class extends gt{constructor(){super(),this._refCarousel=zt(),this._selected=null,this._carouselPlugins=[W_({forceWheelAxis:"y"})],this._resizeObserver=new ResizeObserver(this._resizeHandler.bind(this))}set selected(t){this._selected=t,this.style.setProperty("--frigate-card-carousel-thumbnail-opacity",null===t?"1.0":"0.4")}_resizeHandler(){var t;null===(t=this._refCarousel.value)||void 0===t||t.carouselReInitWhenSafe()}connectedCallback(){super.connectedCallback(),this._resizeObserver.observe(this)}disconnectedCallback(){this._resizeObserver.disconnect(),super.disconnectedCallback()}_getOptions(){var t;return{containScroll:"keepSnaps",dragFree:!0,startIndex:null!==(t=this._selected)&&void 0!==t?t:0}}_getSlides(){if(!this.target||!this.target.children||!this.target.children.length)return[];const t=[];for(let e=0;e{var t;null!==this._selected&&(null===(t=this._refCarousel.value)||void 0===t||t.carouselScrollTo(this._selected))}))}_renderThumbnail(t,e,i){var n,o,r,s,a;if(!t.children||!t.children.length||!my(t.children[e]))return;const l={embla__slide:!0,"slide-selected":this._selected===e},d=(null===(n=this.view)||void 0===n?void 0:n.camera)?null===(o=this.cameras)||void 0===o?void 0:o.get(this.view.camera):null;return K` {var o;(null===(o=this._refCarousel.value)||void 0===o?void 0:o.carouselClickAllowed())&&Dg(this,"thumbnail-carousel:tap",{slideIndex:i,target:t,childIndex:e}),Vm(n)}} + > + `}_getDirection(){var t,e,i,n;return"left"===(null===(t=this.config)||void 0===t?void 0:t.mode)||"right"===(null===(e=this.config)||void 0===e?void 0:e.mode)?"vertical":"above"===(null===(i=this.config)||void 0===i?void 0:i.mode)||"below"===(null===(n=this.config)||void 0===n?void 0:n.mode)?"horizontal":void 0}render(){const t=this._getSlides();if(t.length&&this.config&&"none"!==this.config.mode)return K` + ${t} + `}static get styles(){return _(":host {\n --frigate-card-thumbnail-size-max: 175px;\n --frigate-card-thumbnail-details-width: calc(\n var(--frigate-card-thumbnail-size) + 200px\n );\n}\n\n:host {\n display: block;\n width: 100%;\n height: 100%;\n --frigate-card-carousel-thumbnail-opacity: 1;\n}\n\n:host([direction=vertical]) {\n height: 100%;\n}\n\n:host([direction=horizontal]) {\n height: auto;\n}\n\n.embla__slide {\n flex: 0 0 auto;\n opacity: var(--frigate-card-carousel-thumbnail-opacity);\n}\n\n.embla__slide.slide-selected {\n opacity: 1;\n}\n\nfrigate-card-thumbnail {\n width: var(--frigate-card-thumbnail-size);\n height: var(--frigate-card-thumbnail-size);\n}\n\nfrigate-card-thumbnail[details] {\n width: var(--frigate-card-thumbnail-details-width);\n}")}};t([yt({attribute:!1})],Sw.prototype,"hass",void 0),t([yt({attribute:!1})],Sw.prototype,"view",void 0),t([yt({attribute:!1,hasChanged:Tg})],Sw.prototype,"target",void 0),t([yt({attribute:!1})],Sw.prototype,"cameras",void 0),t([yt({attribute:!1})],Sw.prototype,"config",void 0),t([_t()],Sw.prototype,"_selected",void 0),t([yt({attribute:!1})],Sw.prototype,"selected",null),Sw=t([vt("frigate-card-thumbnail-carousel")],Sw);var Dw={exports:{}};!function(t){function e(t){if(t)return function(t){for(var i in e.prototype)t[i]=e.prototype[i];return t}(t)}Dw.exports=e,e.prototype.on=e.prototype.addEventListener=function(t,e){return this._callbacks=this._callbacks||{},(this._callbacks["$"+t]=this._callbacks["$"+t]||[]).push(e),this},e.prototype.once=function(t,e){function i(){this.off(t,i),e.apply(this,arguments)}return i.fn=e,this.on(t,i),this},e.prototype.off=e.prototype.removeListener=e.prototype.removeAllListeners=e.prototype.removeEventListener=function(t,e){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var i,n=this._callbacks["$"+t];if(!n)return this;if(1==arguments.length)return delete this._callbacks["$"+t],this;for(var o=0;o-1}var eC=function(){function t(t,e){this.manager=t,this.set(e)}var e=t.prototype;return e.set=function(t){"compute"===t&&(t=this.compute()),qw&&this.manager.element.style&&Yw[t]&&(this.manager.element.style[Gw]=t),this.actions=t.toLowerCase().trim()},e.update=function(){this.set(this.manager.options.touchAction)},e.compute=function(){var t=[];return Zw(this.manager.recognizers,(function(e){Xw(e.options.enable,[e])&&(t=t.concat(e.getTouchAction()))})),function(t){if(tC(t,"none"))return"none";var e=tC(t,"pan-x"),i=tC(t,"pan-y");return e&&i?"none":e||i?e?"pan-x":"pan-y":tC(t,"manipulation")?"manipulation":"auto"}(t.join(" "))},e.preventDefaults=function(t){var e=t.srcEvent,i=t.offsetDirection;if(this.manager.session.prevented)e.preventDefault();else{var n=this.actions,o=tC(n,"none")&&!Yw.none,r=tC(n,"pan-y")&&!Yw["pan-y"],s=tC(n,"pan-x")&&!Yw["pan-x"];if(o){var a=1===t.pointers.length,l=t.distance<2,d=t.deltaTime<250;if(a&&l&&d)return}if(!s||!r)return o||r&&6&i||s&&24&i?this.preventSrc(e):void 0}},e.preventSrc=function(t){this.manager.session.prevented=!0,t.preventDefault()},t}();function iC(t,e){for(;t;){if(t===e)return!0;t=t.parentNode}return!1}function nC(t){var e=t.length;if(1===e)return{x:jw(t[0].clientX),y:jw(t[0].clientY)};for(var i=0,n=0,o=0;o=zw(e)?t<0?2:4:e<0?8:16}function lC(t,e,i){return{x:e/t||0,y:i/t||0}}function dC(t,e){var i=t.session,n=e.pointers,o=n.length;i.firstInput||(i.firstInput=oC(e)),o>1&&!i.firstMultiple?i.firstMultiple=oC(e):1===o&&(i.firstMultiple=!1);var r=i.firstInput,s=i.firstMultiple,a=s?s.center:r.center,l=e.center=nC(n);e.timeStamp=Uw(),e.deltaTime=e.timeStamp-r.timeStamp,e.angle=sC(a,l),e.distance=rC(a,l),function(t,e){var i=e.center,n=t.offsetDelta||{},o=t.prevDelta||{},r=t.prevInput||{};1!==e.eventType&&4!==r.eventType||(o=t.prevDelta={x:r.deltaX||0,y:r.deltaY||0},n=t.offsetDelta={x:i.x,y:i.y}),e.deltaX=o.x+(i.x-n.x),e.deltaY=o.y+(i.y-n.y)}(i,e),e.offsetDirection=aC(e.deltaX,e.deltaY);var d,c,h=lC(e.deltaTime,e.deltaX,e.deltaY);e.overallVelocityX=h.x,e.overallVelocityY=h.y,e.overallVelocity=zw(h.x)>zw(h.y)?h.x:h.y,e.scale=s?(d=s.pointers,rC((c=n)[0],c[1],Kw)/rC(d[0],d[1],Kw)):1,e.rotation=s?function(t,e){return sC(e[1],e[0],Kw)+sC(t[1],t[0],Kw)}(s.pointers,n):0,e.maxPointers=i.prevInput?e.pointers.length>i.prevInput.maxPointers?e.pointers.length:i.prevInput.maxPointers:e.pointers.length,function(t,e){var i,n,o,r,s=t.lastInterval||e,a=e.timeStamp-s.timeStamp;if(8!==e.eventType&&(a>25||void 0===s.velocity)){var l=e.deltaX-s.deltaX,d=e.deltaY-s.deltaY,c=lC(a,l,d);n=c.x,o=c.y,i=zw(c.x)>zw(c.y)?c.x:c.y,r=aC(l,d),t.lastInterval=e}else i=s.velocity,n=s.velocityX,o=s.velocityY,r=s.direction;e.velocity=i,e.velocityX=n,e.velocityY=o,e.direction=r}(i,e);var u,A=t.element,p=e.srcEvent;iC(u=p.composedPath?p.composedPath()[0]:p.path?p.path[0]:p.target,A)&&(A=u),e.target=A}function cC(t,e,i){var n=i.pointers.length,o=i.changedPointers.length,r=1&e&&n-o==0,s=12&e&&n-o==0;i.isFirst=!!r,i.isFinal=!!s,r&&(t.session={}),i.eventType=e,dC(t,i),t.emit("hammer.input",i),t.recognize(i),t.session.prevInput=i}function hC(t){return t.trim().split(/\s+/g)}function uC(t,e,i){Zw(hC(e),(function(e){t.addEventListener(e,i,!1)}))}function AC(t,e,i){Zw(hC(e),(function(e){t.removeEventListener(e,i,!1)}))}function pC(t){var e=t.ownerDocument||t;return e.defaultView||e.parentWindow||window}var mC=function(){function t(t,e){var i=this;this.manager=t,this.callback=e,this.element=t.element,this.target=t.options.inputTarget,this.domHandler=function(e){Xw(t.options.enable,[t])&&i.handler(e)},this.init()}var e=t.prototype;return e.handler=function(){},e.init=function(){this.evEl&&uC(this.element,this.evEl,this.domHandler),this.evTarget&&uC(this.target,this.evTarget,this.domHandler),this.evWin&&uC(pC(this.element),this.evWin,this.domHandler)},e.destroy=function(){this.evEl&&AC(this.element,this.evEl,this.domHandler),this.evTarget&&AC(this.target,this.evTarget,this.domHandler),this.evWin&&AC(pC(this.element),this.evWin,this.domHandler)},t}();function gC(t,e,i){if(t.indexOf&&!i)return t.indexOf(e);for(var n=0;ni[e]})):n.sort()),n}var IC={touchstart:1,touchmove:2,touchend:4,touchcancel:8},EC=function(t){function e(){var i;return e.prototype.evTarget="touchstart touchmove touchend touchcancel",(i=t.apply(this,arguments)||this).targetIds={},i}return Ow(e,t),e.prototype.handler=function(t){var e=IC[t.type],i=xC.call(this,t,e);i&&this.callback(this.manager,e,{pointers:i[0],changedPointers:i[1],pointerType:"touch",srcEvent:t})},e}(mC);function xC(t,e){var i,n,o=wC(t.touches),r=this.targetIds;if(3&e&&1===o.length)return r[o[0].identifier]=!0,[o,o];var s=wC(t.changedTouches),a=[],l=this.target;if(n=o.filter((function(t){return iC(t.target,l)})),1===e)for(i=0;i-1&&n.splice(t,1)}),2500)}}function DC(t,e){1&t?(this.primaryTouch=e.changedPointers[0].identifier,SC.call(this,e)):12&t&&SC.call(this,e)}function QC(t){for(var e=t.srcEvent.clientX,i=t.srcEvent.clientY,n=0;n-1&&this.requireFail.splice(e,1),this},e.hasRequireFailures=function(){return this.requireFail.length>0},e.canRecognizeWith=function(t){return!!this.simultaneous[t.id]},e.emit=function(t){var e=this,i=this.state;function n(i){e.manager.emit(i,t)}i<8&&n(e.options.event+PC(i)),n(e.options.event),t.additionalEvent&&n(t.additionalEvent),i>=8&&n(e.options.event+PC(i))},e.tryEmit=function(t){if(this.canEmit())return this.emit(t);this.state=32},e.canEmit=function(){for(var t=0;te.threshold&&o&e.direction},i.attrTest=function(t){return LC.prototype.attrTest.call(this,t)&&(2&this.state||!(2&this.state)&&this.directionTest(t))},i.emit=function(e){this.pX=e.deltaX,this.pY=e.deltaY;var i=jC(e.direction);i&&(e.additionalEvent=this.options.event+i),t.prototype.emit.call(this,e)},e}(LC),UC=function(t){function e(e){return void 0===e&&(e={}),t.call(this,Tw({event:"swipe",threshold:10,velocity:.3,direction:30,pointers:1},e))||this}Ow(e,t);var i=e.prototype;return i.getTouchAction=function(){return zC.prototype.getTouchAction.call(this)},i.attrTest=function(e){var i,n=this.options.direction;return 30&n?i=e.overallVelocity:6&n?i=e.overallVelocityX:24&n&&(i=e.overallVelocityY),t.prototype.attrTest.call(this,e)&&n&e.offsetDirection&&e.distance>this.options.threshold&&e.maxPointers===this.options.pointers&&zw(i)>this.options.velocity&&4&e.eventType},i.emit=function(t){var e=jC(t.offsetDirection);e&&this.manager.emit(this.options.event+e,t),this.manager.emit(this.options.event,t)},e}(LC),HC=function(t){function e(e){return void 0===e&&(e={}),t.call(this,Tw({event:"pinch",threshold:0,pointers:2},e))||this}Ow(e,t);var i=e.prototype;return i.getTouchAction=function(){return["none"]},i.attrTest=function(e){return t.prototype.attrTest.call(this,e)&&(Math.abs(e.scale-1)>this.options.threshold||2&this.state)},i.emit=function(e){if(1!==e.scale){var i=e.scale<1?"in":"out";e.additionalEvent=this.options.event+i}t.prototype.emit.call(this,e)},e}(LC),GC=function(t){function e(e){return void 0===e&&(e={}),t.call(this,Tw({event:"rotate",threshold:0,pointers:2},e))||this}Ow(e,t);var i=e.prototype;return i.getTouchAction=function(){return["none"]},i.attrTest=function(e){return t.prototype.attrTest.call(this,e)&&(Math.abs(e.rotation)>this.options.threshold||2&this.state)},e}(LC),qC=function(t){function e(e){var i;return void 0===e&&(e={}),(i=t.call(this,Tw({event:"press",pointers:1,time:251,threshold:9},e))||this)._timer=null,i._input=null,i}Ow(e,t);var i=e.prototype;return i.getTouchAction=function(){return["auto"]},i.process=function(t){var e=this,i=this.options,n=t.pointers.length===i.pointers,o=t.distancei.time;if(this._input=t,!o||!n||12&t.eventType&&!r)this.reset();else if(1&t.eventType)this.reset(),this._timer=setTimeout((function(){e.state=8,e.tryEmit()}),i.time);else if(4&t.eventType)return 8;return 32},i.reset=function(){clearTimeout(this._timer)},i.emit=function(t){8===this.state&&(t&&4&t.eventType?this.manager.emit(this.options.event+"up",t):(this._input.timeStamp=Uw(),this.manager.emit(this.options.event,this._input)))},e}(NC),YC={domEvents:!1,touchAction:"compute",enable:!0,inputTarget:null,inputClass:null,cssProps:{userSelect:"none",touchSelect:"none",touchCallout:"none",contentZooming:"none",userDrag:"none",tapHighlightColor:"rgba(0,0,0,0)"}},$C=[[GC,{enable:!1}],[HC,{enable:!1},["rotate"]],[UC,{direction:6}],[zC,{direction:6},["swipe"]],[FC],[FC,{event:"doubletap",taps:2},["tap"]],[qC]];function WC(t,e){var i,n=t.element;n.style&&(Zw(t.options.cssProps,(function(o,r){i=Hw(n.style,r),e?(t.oldCssProps[i]=n.style[i],n.style[i]=o):n.style[i]=t.oldCssProps[i]||""})),e||(t.oldCssProps={}))}var VC=function(){function t(t,e){var i,n=this;this.options=Nw({},YC,e||{}),this.options.inputTarget=this.options.inputTarget||t,this.handlers={},this.session={},this.recognizers=[],this.oldCssProps={},this.element=t,this.input=new((i=this).options.inputClass||(Ww?_C:Vw?EC:$w?MC:kC))(i,cC),this.touchAction=new eC(this,this.options.touchAction),WC(this,!0),Zw(this.options.recognizers,(function(t){var e=n.add(new t[0](t[1]));t[2]&&e.recognizeWith(t[2]),t[3]&&e.requireFailure(t[3])}),this)}var e=t.prototype;return e.set=function(t){return Nw(this.options,t),t.touchAction&&this.touchAction.update(),t.inputTarget&&(this.input.destroy(),this.input.target=t.inputTarget,this.input.init()),this},e.stop=function(t){this.session.stopped=t?2:1},e.recognize=function(t){var e=this.session;if(!e.stopped){var i;this.touchAction.preventDefaults(t);var n=this.recognizers,o=e.curRecognizer;(!o||o&&8&o.state)&&(e.curRecognizer=null,o=null);for(var r=0;r\s*\(/gm,"{anonymous}()@"):"Unknown Stack Trace",o=window.console&&(window.console.warn||window.console.log);return o&&o.call(window.console,n,i),t.apply(this,arguments)}}var tI=XC((function(t,e,i){for(var n=Object.keys(e),o=0;o2)return lI(aI(t[0],t[1]),...t.slice(2));const e=t[0],i=t[1];for(const t of Reflect.ownKeys(i))Object.prototype.propertyIsEnumerable.call(i,t)&&(i[t]===rI?delete e[t]:null===e[t]||null===i[t]||"object"!=typeof e[t]||"object"!=typeof i[t]||Array.isArray(e[t])||Array.isArray(i[t])?e[t]=dI(i[t]):e[t]=lI(e[t],i[t]));return e}function dI(t){return Array.isArray(t)?t.map((t=>dI(t))):"object"==typeof t&&null!==t?lI({},t):t}function cI(t){for(const e of Object.keys(t))t[e]===rI?delete t[e]:"object"==typeof t[e]&&null!==t[e]&&cI(t[e])}const hI="undefined"!=typeof window?window.Hammer||oI:function(){return function(){const t=()=>{};return{on:t,off:t,destroy:t,emit:t,get:()=>({set:t})}}()};function uI(t){this._cleanupQueue=[],this.active=!1,this._dom={container:t,overlay:document.createElement("div")},this._dom.overlay.classList.add("vis-overlay"),this._dom.container.appendChild(this._dom.overlay),this._cleanupQueue.push((()=>{this._dom.overlay.parentNode.removeChild(this._dom.overlay)}));const e=hI(this._dom.overlay);e.on("tap",this._onTapOverlay.bind(this)),this._cleanupQueue.push((()=>{e.destroy()}));["tap","doubletap","press","pinch","pan","panstart","panmove","panend"].forEach((t=>{e.on(t,(t=>{t.srcEvent.stopPropagation()}))})),document&&document.body&&(this._onClick=e=>{(function(t,e){for(;t;){if(t===e)return!0;t=t.parentNode}return!1})(e.target,t)||this.deactivate()},document.body.addEventListener("click",this._onClick),this._cleanupQueue.push((()=>{document.body.removeEventListener("click",this._onClick)}))),this._escListener=t=>{("key"in t?"Escape"===t.key:27===t.keyCode)&&this.deactivate()}}Mw(uI.prototype),uI.current=null,uI.prototype.destroy=function(){this.deactivate();for(const t of this._cleanupQueue.splice(0).reverse())t()},uI.prototype.activate=function(){uI.current&&uI.current.deactivate(),uI.current=this,this.active=!0,this._dom.overlay.style.display="none",this._dom.container.classList.add("vis-active"),this.emit("change"),this.emit("activate"),document.body.addEventListener("keydown",this._escListener)},uI.prototype.deactivate=function(){this.active=!1,this._dom.overlay.style.display="block",this._dom.container.classList.remove("vis-active"),document.body.removeEventListener("keydown",this._escListener),this.emit("change"),this.emit("deactivate")},uI.prototype._onTapOverlay=function(t){this.activate(),t.srcEvent.stopPropagation()};const AI=/^\/?Date\((-?\d+)/i,pI=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i,mI=/^#?([a-f\d])([a-f\d])([a-f\d])$/i,gI=/^rgb\( *(1?\d{1,2}|2[0-4]\d|25[0-5]) *, *(1?\d{1,2}|2[0-4]\d|25[0-5]) *, *(1?\d{1,2}|2[0-4]\d|25[0-5]) *\)$/i,fI=/^rgba\( *(1?\d{1,2}|2[0-4]\d|25[0-5]) *, *(1?\d{1,2}|2[0-4]\d|25[0-5]) *, *(1?\d{1,2}|2[0-4]\d|25[0-5]) *, *([01]|0?\.\d+) *\)$/i;function vI(t){return t instanceof Number||"number"==typeof t}function bI(t){return t instanceof String||"string"==typeof t}function yI(t){return"object"==typeof t&&null!==t}function _I(t,e,i,n){let o=!1;!0===n&&(o=null===e[i]&&void 0!==t[i]),o?delete t[i]:t[i]=e[i]}const wI=Object.assign;function CI(t,e,i=!1,n=!1){for(const o in e)(Object.prototype.hasOwnProperty.call(e,o)||!0===i)&&("object"==typeof e[o]&&null!==e[o]&&Object.getPrototypeOf(e[o])===Object.prototype?void 0===t[o]?t[o]=CI({},e[o],i):"object"==typeof t[o]&&null!==t[o]&&Object.getPrototypeOf(t[o])===Object.prototype?CI(t[o],e[o],i):_I(t,e,o,n):Array.isArray(e[o])?t[o]=e[o].slice():_I(t,e,o,n));return t}function II(t){const e=typeof t;return"object"===e?null===t?"null":t instanceof Boolean?"Boolean":t instanceof Number?"Number":t instanceof String?"String":Array.isArray(t)?"Array":t instanceof Date?"Date":"Object":"number"===e?"Number":"boolean"===e?"Boolean":"string"===e?"String":void 0===e?"undefined":e}function EI(t,e){return[...t,e]}function xI(t){return t.slice()}const BI=Object.values;const kI={asBoolean:(t,e)=>("function"==typeof t&&(t=t()),null!=t?0!=t:e||null),asNumber:(t,e)=>("function"==typeof t&&(t=t()),null!=t?Number(t)||e||null:e||null),asString:(t,e)=>("function"==typeof t&&(t=t()),null!=t?String(t):e||null),asSize:(t,e)=>("function"==typeof t&&(t=t()),bI(t)?t:vI(t)?t+"px":e||null),asElement:(t,e)=>("function"==typeof t&&(t=t()),t||e||null)};function SI(t){let e;switch(t.length){case 3:case 4:return e=mI.exec(t),e?{r:parseInt(e[1]+e[1],16),g:parseInt(e[2]+e[2],16),b:parseInt(e[3]+e[3],16)}:null;case 6:case 7:return e=pI.exec(t),e?{r:parseInt(e[1],16),g:parseInt(e[2],16),b:parseInt(e[3],16)}:null;default:return null}}function DI(t,e,i){return"#"+((1<<24)+(t<<16)+(e<<8)+i).toString(16).slice(1)}function QI(t,e,i){t/=255,e/=255,i/=255;const n=Math.min(t,Math.min(e,i)),o=Math.max(t,Math.max(e,i));if(n===o)return{h:0,s:0,v:n};return{h:60*((t===n?3:i===n?1:5)-(t===n?e-i:i===n?t-e:i-t)/(o-n))/360,s:(o-n)/o,v:o}}const MI={split(t){const e={};return t.split(";").forEach((t=>{if(""!=t.trim()){const i=t.split(":"),n=i[0].trim(),o=i[1].trim();e[n]=o}})),e},join:t=>Object.keys(t).map((function(e){return e+": "+t[e]})).join("; ")};function TI(t,e,i){let n,o,r;const s=Math.floor(6*t),a=6*t-s,l=i*(1-e),d=i*(1-a*e),c=i*(1-(1-a)*e);switch(s%6){case 0:n=i,o=c,r=l;break;case 1:n=d,o=i,r=l;break;case 2:n=l,o=i,r=c;break;case 3:n=l,o=d,r=i;break;case 4:n=c,o=l,r=i;break;case 5:n=i,o=l,r=d}return{r:Math.floor(255*n),g:Math.floor(255*o),b:Math.floor(255*r)}}function OI(t,e,i){const n=TI(t,e,i);return DI(n.r,n.g,n.b)}function RI(t){const e=SI(t);if(!e)throw new TypeError(`'${t}' is not a valid color.`);return QI(e.r,e.g,e.b)}function PI(t){return/(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)/i.test(t)}function NI(t){return gI.test(t)}function FI(t){return fI.test(t)}function LI(t){if(null===t||"object"!=typeof t)return null;if(t instanceof Element)return t;const e=Object.create(t);for(const i in t)Object.prototype.hasOwnProperty.call(t,i)&&"object"==typeof t[i]&&(e[i]=LI(t[i]));return e}const jI={linear:t=>t,easeInQuad:t=>t*t,easeOutQuad:t=>t*(2-t),easeInOutQuad:t=>t<.5?2*t*t:(4-2*t)*t-1,easeInCubic:t=>t*t*t,easeOutCubic:t=>--t*t*t+1,easeInOutCubic:t=>t<.5?4*t*t*t:(t-1)*(2*t-2)*(2*t-2)+1,easeInQuart:t=>t*t*t*t,easeOutQuart:t=>1- --t*t*t*t,easeInOutQuart:t=>t<.5?8*t*t*t*t:1-8*--t*t*t*t,easeInQuint:t=>t*t*t*t*t,easeOutQuint:t=>1+--t*t*t*t*t,easeInOutQuint:t=>t<.5?16*t*t*t*t*t:1+16*--t*t*t*t*t};const zI={black:"#000000",navy:"#000080",darkblue:"#00008B",mediumblue:"#0000CD",blue:"#0000FF",darkgreen:"#006400",green:"#008000",teal:"#008080",darkcyan:"#008B8B",deepskyblue:"#00BFFF",darkturquoise:"#00CED1",mediumspringgreen:"#00FA9A",lime:"#00FF00",springgreen:"#00FF7F",aqua:"#00FFFF",cyan:"#00FFFF",midnightblue:"#191970",dodgerblue:"#1E90FF",lightseagreen:"#20B2AA",forestgreen:"#228B22",seagreen:"#2E8B57",darkslategray:"#2F4F4F",limegreen:"#32CD32",mediumseagreen:"#3CB371",turquoise:"#40E0D0",royalblue:"#4169E1",steelblue:"#4682B4",darkslateblue:"#483D8B",mediumturquoise:"#48D1CC",indigo:"#4B0082",darkolivegreen:"#556B2F",cadetblue:"#5F9EA0",cornflowerblue:"#6495ED",mediumaquamarine:"#66CDAA",dimgray:"#696969",slateblue:"#6A5ACD",olivedrab:"#6B8E23",slategray:"#708090",lightslategray:"#778899",mediumslateblue:"#7B68EE",lawngreen:"#7CFC00",chartreuse:"#7FFF00",aquamarine:"#7FFFD4",maroon:"#800000",purple:"#800080",olive:"#808000",gray:"#808080",skyblue:"#87CEEB",lightskyblue:"#87CEFA",blueviolet:"#8A2BE2",darkred:"#8B0000",darkmagenta:"#8B008B",saddlebrown:"#8B4513",darkseagreen:"#8FBC8F",lightgreen:"#90EE90",mediumpurple:"#9370D8",darkviolet:"#9400D3",palegreen:"#98FB98",darkorchid:"#9932CC",yellowgreen:"#9ACD32",sienna:"#A0522D",brown:"#A52A2A",darkgray:"#A9A9A9",lightblue:"#ADD8E6",greenyellow:"#ADFF2F",paleturquoise:"#AFEEEE",lightsteelblue:"#B0C4DE",powderblue:"#B0E0E6",firebrick:"#B22222",darkgoldenrod:"#B8860B",mediumorchid:"#BA55D3",rosybrown:"#BC8F8F",darkkhaki:"#BDB76B",silver:"#C0C0C0",mediumvioletred:"#C71585",indianred:"#CD5C5C",peru:"#CD853F",chocolate:"#D2691E",tan:"#D2B48C",lightgrey:"#D3D3D3",palevioletred:"#D87093",thistle:"#D8BFD8",orchid:"#DA70D6",goldenrod:"#DAA520",crimson:"#DC143C",gainsboro:"#DCDCDC",plum:"#DDA0DD",burlywood:"#DEB887",lightcyan:"#E0FFFF",lavender:"#E6E6FA",darksalmon:"#E9967A",violet:"#EE82EE",palegoldenrod:"#EEE8AA",lightcoral:"#F08080",khaki:"#F0E68C",aliceblue:"#F0F8FF",honeydew:"#F0FFF0",azure:"#F0FFFF",sandybrown:"#F4A460",wheat:"#F5DEB3",beige:"#F5F5DC",whitesmoke:"#F5F5F5",mintcream:"#F5FFFA",ghostwhite:"#F8F8FF",salmon:"#FA8072",antiquewhite:"#FAEBD7",linen:"#FAF0E6",lightgoldenrodyellow:"#FAFAD2",oldlace:"#FDF5E6",red:"#FF0000",fuchsia:"#FF00FF",magenta:"#FF00FF",deeppink:"#FF1493",orangered:"#FF4500",tomato:"#FF6347",hotpink:"#FF69B4",coral:"#FF7F50",darkorange:"#FF8C00",lightsalmon:"#FFA07A",orange:"#FFA500",lightpink:"#FFB6C1",pink:"#FFC0CB",gold:"#FFD700",peachpuff:"#FFDAB9",navajowhite:"#FFDEAD",moccasin:"#FFE4B5",bisque:"#FFE4C4",mistyrose:"#FFE4E1",blanchedalmond:"#FFEBCD",papayawhip:"#FFEFD5",lavenderblush:"#FFF0F5",seashell:"#FFF5EE",cornsilk:"#FFF8DC",lemonchiffon:"#FFFACD",floralwhite:"#FFFAF0",snow:"#FFFAFA",yellow:"#FFFF00",lightyellow:"#FFFFE0",ivory:"#FFFFF0",white:"#FFFFFF"};class UI{constructor(t=1){this.pixelRatio=t,this.generated=!1,this.centerCoordinates={x:144.5,y:144.5},this.r=289*.49,this.color={r:255,g:255,b:255,a:1},this.hueCircle=void 0,this.initialColor={r:255,g:255,b:255,a:1},this.previousColor=void 0,this.applied=!1,this.updateCallback=()=>{},this.closeCallback=()=>{},this._create()}insertTo(t){void 0!==this.hammer&&(this.hammer.destroy(),this.hammer=void 0),this.container=t,this.container.appendChild(this.frame),this._bindHammer(),this._setSize()}setUpdateCallback(t){if("function"!=typeof t)throw new Error("Function attempted to set as colorPicker update callback is not a function.");this.updateCallback=t}setCloseCallback(t){if("function"!=typeof t)throw new Error("Function attempted to set as colorPicker closing callback is not a function.");this.closeCallback=t}_isColorString(t){if("string"==typeof t)return zI[t]}setColor(t,e=!0){if("none"===t)return;let i;const n=this._isColorString(t);if(void 0!==n&&(t=n),!0===bI(t)){if(!0===NI(t)){const e=t.substr(4).substr(0,t.length-5).split(",");i={r:e[0],g:e[1],b:e[2],a:1}}else if(!0===FI(t)){const e=t.substr(5).substr(0,t.length-6).split(",");i={r:e[0],g:e[1],b:e[2],a:e[3]}}else if(!0===PI(t)){const e=SI(t);i={r:e.r,g:e.g,b:e.b,a:1}}}else if(t instanceof Object&&void 0!==t.r&&void 0!==t.g&&void 0!==t.b){const e=void 0!==t.a?t.a:"1.0";i={r:t.r,g:t.g,b:t.b,a:e}}if(void 0===i)throw new Error("Unknown color passed to the colorPicker. Supported are strings: rgb, hex, rgba. Object: rgb ({r:r,g:g,b:b,[a:a]}). Supplied: "+JSON.stringify(t));this._setColor(i,e)}show(){void 0!==this.closeCallback&&(this.closeCallback(),this.closeCallback=void 0),this.applied=!1,this.frame.style.display="block",this._generateHueCircle()}_hide(t=!0){!0===t&&(this.previousColor=Object.assign({},this.color)),!0===this.applied&&this.updateCallback(this.initialColor),this.frame.style.display="none",setTimeout((()=>{void 0!==this.closeCallback&&(this.closeCallback(),this.closeCallback=void 0)}),0)}_save(){this.updateCallback(this.color),this.applied=!1,this._hide()}_apply(){this.applied=!0,this.updateCallback(this.color),this._updatePicker(this.color)}_loadLast(){void 0!==this.previousColor?this.setColor(this.previousColor,!1):alert("There is no last color to load...")}_setColor(t,e=!0){!0===e&&(this.initialColor=Object.assign({},t)),this.color=t;const i=QI(t.r,t.g,t.b),n=2*Math.PI,o=this.r*i.s,r=this.centerCoordinates.x+o*Math.sin(n*i.h),s=this.centerCoordinates.y+o*Math.cos(n*i.h);this.colorPickerSelector.style.left=r-.5*this.colorPickerSelector.clientWidth+"px",this.colorPickerSelector.style.top=s-.5*this.colorPickerSelector.clientHeight+"px",this._updatePicker(t)}_setOpacity(t){this.color.a=t/100,this._updatePicker(this.color)}_setBrightness(t){const e=QI(this.color.r,this.color.g,this.color.b);e.v=t/100;const i=TI(e.h,e.s,e.v);i.a=this.color.a,this.color=i,this._updatePicker()}_updatePicker(t=this.color){const e=QI(t.r,t.g,t.b),i=this.colorPickerCanvas.getContext("2d");void 0===this.pixelRation&&(this.pixelRatio=(window.devicePixelRatio||1)/(i.webkitBackingStorePixelRatio||i.mozBackingStorePixelRatio||i.msBackingStorePixelRatio||i.oBackingStorePixelRatio||i.backingStorePixelRatio||1)),i.setTransform(this.pixelRatio,0,0,this.pixelRatio,0,0);const n=this.colorPickerCanvas.clientWidth,o=this.colorPickerCanvas.clientHeight;i.clearRect(0,0,n,o),i.putImageData(this.hueCircle,0,0),i.fillStyle="rgba(0,0,0,"+(1-e.v)+")",i.circle(this.centerCoordinates.x,this.centerCoordinates.y,this.r),i.fill(),this.brightnessRange.value=100*e.v,this.opacityRange.value=100*t.a,this.initialColorDiv.style.backgroundColor="rgba("+this.initialColor.r+","+this.initialColor.g+","+this.initialColor.b+","+this.initialColor.a+")",this.newColorDiv.style.backgroundColor="rgba("+this.color.r+","+this.color.g+","+this.color.b+","+this.color.a+")"}_setSize(){this.colorPickerCanvas.style.width="100%",this.colorPickerCanvas.style.height="100%",this.colorPickerCanvas.width=289*this.pixelRatio,this.colorPickerCanvas.height=289*this.pixelRatio}_create(){if(this.frame=document.createElement("div"),this.frame.className="vis-color-picker",this.colorPickerDiv=document.createElement("div"),this.colorPickerSelector=document.createElement("div"),this.colorPickerSelector.className="vis-selector",this.colorPickerDiv.appendChild(this.colorPickerSelector),this.colorPickerCanvas=document.createElement("canvas"),this.colorPickerDiv.appendChild(this.colorPickerCanvas),this.colorPickerCanvas.getContext){const t=this.colorPickerCanvas.getContext("2d");this.pixelRatio=(window.devicePixelRatio||1)/(t.webkitBackingStorePixelRatio||t.mozBackingStorePixelRatio||t.msBackingStorePixelRatio||t.oBackingStorePixelRatio||t.backingStorePixelRatio||1),this.colorPickerCanvas.getContext("2d").setTransform(this.pixelRatio,0,0,this.pixelRatio,0,0)}else{const t=document.createElement("DIV");t.style.color="red",t.style.fontWeight="bold",t.style.padding="10px",t.innerText="Error: your browser does not support HTML canvas",this.colorPickerCanvas.appendChild(t)}this.colorPickerDiv.className="vis-color",this.opacityDiv=document.createElement("div"),this.opacityDiv.className="vis-opacity",this.brightnessDiv=document.createElement("div"),this.brightnessDiv.className="vis-brightness",this.arrowDiv=document.createElement("div"),this.arrowDiv.className="vis-arrow",this.opacityRange=document.createElement("input");try{this.opacityRange.type="range",this.opacityRange.min="0",this.opacityRange.max="100"}catch(t){}this.opacityRange.value="100",this.opacityRange.className="vis-range",this.brightnessRange=document.createElement("input");try{this.brightnessRange.type="range",this.brightnessRange.min="0",this.brightnessRange.max="100"}catch(t){}this.brightnessRange.value="100",this.brightnessRange.className="vis-range",this.opacityDiv.appendChild(this.opacityRange),this.brightnessDiv.appendChild(this.brightnessRange);const t=this;this.opacityRange.onchange=function(){t._setOpacity(this.value)},this.opacityRange.oninput=function(){t._setOpacity(this.value)},this.brightnessRange.onchange=function(){t._setBrightness(this.value)},this.brightnessRange.oninput=function(){t._setBrightness(this.value)},this.brightnessLabel=document.createElement("div"),this.brightnessLabel.className="vis-label vis-brightness",this.brightnessLabel.innerText="brightness:",this.opacityLabel=document.createElement("div"),this.opacityLabel.className="vis-label vis-opacity",this.opacityLabel.innerText="opacity:",this.newColorDiv=document.createElement("div"),this.newColorDiv.className="vis-new-color",this.newColorDiv.innerText="new",this.initialColorDiv=document.createElement("div"),this.initialColorDiv.className="vis-initial-color",this.initialColorDiv.innerText="initial",this.cancelButton=document.createElement("div"),this.cancelButton.className="vis-button vis-cancel",this.cancelButton.innerText="cancel",this.cancelButton.onclick=this._hide.bind(this,!1),this.applyButton=document.createElement("div"),this.applyButton.className="vis-button vis-apply",this.applyButton.innerText="apply",this.applyButton.onclick=this._apply.bind(this),this.saveButton=document.createElement("div"),this.saveButton.className="vis-button vis-save",this.saveButton.innerText="save",this.saveButton.onclick=this._save.bind(this),this.loadButton=document.createElement("div"),this.loadButton.className="vis-button vis-load",this.loadButton.innerText="load last",this.loadButton.onclick=this._loadLast.bind(this),this.frame.appendChild(this.colorPickerDiv),this.frame.appendChild(this.arrowDiv),this.frame.appendChild(this.brightnessLabel),this.frame.appendChild(this.brightnessDiv),this.frame.appendChild(this.opacityLabel),this.frame.appendChild(this.opacityDiv),this.frame.appendChild(this.newColorDiv),this.frame.appendChild(this.initialColorDiv),this.frame.appendChild(this.cancelButton),this.frame.appendChild(this.applyButton),this.frame.appendChild(this.saveButton),this.frame.appendChild(this.loadButton)}_bindHammer(){this.drag={},this.pinch={},this.hammer=new hI(this.colorPickerCanvas),this.hammer.get("pinch").set({enable:!0}),this.hammer.on("hammer.input",(t=>{t.isFirst&&this._moveSelector(t)})),this.hammer.on("tap",(t=>{this._moveSelector(t)})),this.hammer.on("panstart",(t=>{this._moveSelector(t)})),this.hammer.on("panmove",(t=>{this._moveSelector(t)})),this.hammer.on("panend",(t=>{this._moveSelector(t)}))}_generateHueCircle(){if(!1===this.generated){const t=this.colorPickerCanvas.getContext("2d");void 0===this.pixelRation&&(this.pixelRatio=(window.devicePixelRatio||1)/(t.webkitBackingStorePixelRatio||t.mozBackingStorePixelRatio||t.msBackingStorePixelRatio||t.oBackingStorePixelRatio||t.backingStorePixelRatio||1)),t.setTransform(this.pixelRatio,0,0,this.pixelRatio,0,0);const e=this.colorPickerCanvas.clientWidth,i=this.colorPickerCanvas.clientHeight;let n,o,r,s;t.clearRect(0,0,e,i),this.centerCoordinates={x:.5*e,y:.5*i},this.r=.49*e;const a=2*Math.PI/360,l=1/360,d=1/this.r;let c;for(r=0;r<360;r++)for(s=0;so.distance?" in "+YI.printLocation(n.path,t,"")+"Perhaps it was misplaced? Matching option found at: "+YI.printLocation(o.path,o.closestMatch,""):n.distance<=8?'. Did you mean "'+n.closestMatch+'"?'+YI.printLocation(n.path,t):". Did you mean one of these: "+YI.print(Object.keys(e))+YI.printLocation(i,t),console.error('%cUnknown option detected: "'+t+'"'+r,"background: #FFeeee; color: #dd0000"),qI=!0}static findInOptions(t,e,i,n=!1){let o=1e9,r="",s=[];const a=t.toLowerCase();let l;for(const d in e){let c;if(void 0!==e[d].__type__&&!0===n){const n=YI.findInOptions(t,e[d],EI(i,d));o>n.distance&&(r=n.closestMatch,s=n.path,o=n.distance,l=n.indexMatch)}else-1!==d.toLowerCase().indexOf(a)&&(l=d),c=YI.levenshteinDistance(t,d),o>c&&(r=d,s=xI(i),o=c)}return{closestMatch:r,path:s,distance:o,indexMatch:l}}static printLocation(t,e,i="Problem value found at: \n"){let n="\n\n"+i+"options = {\n";for(let e=0;e!1)){this.parent=t,this.changedOptions=[],this.container=e,this.allowCreation=!1,this.hideOption=o,this.options={},this.initialized=!1,this.popupCounter=0,this.defaultOptions={enabled:!1,filter:!0,container:void 0,showButton:!0},Object.assign(this.options,this.defaultOptions),this.configureOptions=i,this.moduleOptions={},this.domElements=[],this.popupDiv={},this.popupLimit=5,this.popupHistory={},this.colorPicker=new UI(n),this.wrapper=void 0}setOptions(t){if(void 0!==t){this.popupHistory={},this._removePopup();let e=!0;if("string"==typeof t)this.options.filter=t;else if(Array.isArray(t))this.options.filter=t.join();else if("object"==typeof t){if(null==t)throw new TypeError("options cannot be null");void 0!==t.container&&(this.options.container=t.container),void 0!==t.filter&&(this.options.filter=t.filter),void 0!==t.showButton&&(this.options.showButton=t.showButton),void 0!==t.enabled&&(e=t.enabled)}else"boolean"==typeof t?(this.options.filter=!0,e=t):"function"==typeof t&&(this.options.filter=t,e=!0);!1===this.options.filter&&(e=!1),this.options.enabled=e}this._clean()}setModuleOptions(t){this.moduleOptions=t,!0===this.options.enabled&&(this._clean(),void 0!==this.options.container&&(this.container=this.options.container),this._create())}_create(){this._clean(),this.changedOptions=[];const t=this.options.filter;let e=0,i=!1;for(const n in this.configureOptions)Object.prototype.hasOwnProperty.call(this.configureOptions,n)&&(this.allowCreation=!1,i=!1,"function"==typeof t?(i=t(n,[]),i=i||this._handleObject(this.configureOptions[n],[n],!0)):!0!==t&&-1===t.indexOf(n)||(i=!0),!1!==i&&(this.allowCreation=!0,e>0&&this._makeItem([]),this._makeHeader(n),this._handleObject(this.configureOptions[n],[n])),e++);this._makeButton(),this._push()}_push(){this.wrapper=document.createElement("div"),this.wrapper.className="vis-configuration-wrapper",this.container.appendChild(this.wrapper);for(let t=0;t{i.appendChild(t)})),this.domElements.push(i),this.domElements.length}return 0}_makeHeader(t){const e=document.createElement("div");e.className="vis-configuration vis-config-header",e.innerText=t,this._makeItem([],e)}_makeLabel(t,e,i=!1){const n=document.createElement("div");if(n.className="vis-configuration vis-config-label vis-config-s"+e.length,!0===i){for(;n.firstChild;)n.removeChild(n.firstChild);n.appendChild(HI("i","b",t))}else n.innerText=t+":";return n}_makeDropdown(t,e,i){const n=document.createElement("select");n.className="vis-configuration vis-config-select";let o=0;void 0!==e&&-1!==t.indexOf(e)&&(o=t.indexOf(e));for(let e=0;er&&1!==r&&(a.max=Math.ceil(e*t),d=a.max,l="range increased"),a.value=e}else a.value=n;const c=document.createElement("input");c.className="vis-configuration vis-config-rangeinput",c.value=a.value;const h=this;a.onchange=function(){c.value=this.value,h._update(Number(this.value),i)},a.oninput=function(){c.value=this.value};const u=this._makeLabel(i[i.length-1],i),A=this._makeItem(i,u,a,c);""!==l&&this.popupHistory[A]!==d&&(this.popupHistory[A]=d,this._setupPopup(l,A))}_makeButton(){if(!0===this.options.showButton){const t=document.createElement("div");t.className="vis-configuration vis-config-button",t.innerText="generate options",t.onclick=()=>{this._printOptions()},t.onmouseover=()=>{t.className="vis-configuration vis-config-button hover"},t.onmouseout=()=>{t.className="vis-configuration vis-config-button"},this.optionsContainer=document.createElement("div"),this.optionsContainer.className="vis-configuration vis-config-option-container",this.domElements.push(this.optionsContainer),this.domElements.push(t)}}_setupPopup(t,e){if(!0===this.initialized&&!0===this.allowCreation&&this.popupCounter{this._removePopup()},this.popupCounter+=1,this.popupDiv={html:i,index:e}}}_removePopup(){void 0!==this.popupDiv.html&&(this.popupDiv.html.parentNode.removeChild(this.popupDiv.html),clearTimeout(this.popupDiv.hideTimeout),clearTimeout(this.popupDiv.deleteTimeout),this.popupDiv={})}_showPopupIfNeeded(){if(void 0!==this.popupDiv.html){const t=this.domElements[this.popupDiv.index].getBoundingClientRect();this.popupDiv.html.style.left=t.left+"px",this.popupDiv.html.style.top=t.top-30+"px",document.body.appendChild(this.popupDiv.html),this.popupDiv.hideTimeout=setTimeout((()=>{this.popupDiv.html.style.opacity=0}),1500),this.popupDiv.deleteTimeout=setTimeout((()=>{this._removePopup()}),1800)}}_makeCheckbox(t,e,i){const n=document.createElement("input");n.type="checkbox",n.className="vis-configuration vis-config-checkbox",n.checked=t,void 0!==e&&(n.checked=e,e!==t&&("object"==typeof t?e!==t.enabled&&this.changedOptions.push({path:i,value:e}):this.changedOptions.push({path:i,value:e})));const o=this;n.onchange=function(){o._update(this.checked,i)};const r=this._makeLabel(i[i.length-1],i);this._makeItem(i,r,n)}_makeTextInput(t,e,i){const n=document.createElement("input");n.type="text",n.className="vis-configuration vis-config-text",n.value=e,e!==t&&this.changedOptions.push({path:i,value:e});const o=this;n.onchange=function(){o._update(this.value,i)};const r=this._makeLabel(i[i.length-1],i);this._makeItem(i,r,n)}_makeColorField(t,e,i){const n=t[1],o=document.createElement("div");"none"!==(e=void 0===e?n:e)?(o.className="vis-configuration vis-config-colorBlock",o.style.backgroundColor=e):o.className="vis-configuration vis-config-colorBlock none",e=void 0===e?n:e,o.onclick=()=>{this._showColorPicker(e,o,i)};const r=this._makeLabel(i[i.length-1],i);this._makeItem(i,r,o)}_showColorPicker(t,e,i){e.onclick=function(){},this.colorPicker.insertTo(e),this.colorPicker.show(),this.colorPicker.setColor(t),this.colorPicker.setUpdateCallback((t=>{const n="rgba("+t.r+","+t.g+","+t.b+","+t.a+")";e.style.backgroundColor=n,this._update(n,i)})),this.colorPicker.setCloseCallback((()=>{e.onclick=()=>{this._showColorPicker(t,e,i)}}))}_handleObject(t,e=[],i=!1){let n=!1;const o=this.options.filter;let r=!1;for(const s in t)if(Object.prototype.hasOwnProperty.call(t,s)){n=!0;const a=t[s],l=EI(e,s);if("function"==typeof o&&(n=o(s,e),!1===n&&!Array.isArray(a)&&"string"!=typeof a&&"boolean"!=typeof a&&a instanceof Object&&(this.allowCreation=!1,n=this._handleObject(a,l,!0),this.allowCreation=!1===i)),!1!==n){r=!0;const t=this._getValue(l);if(Array.isArray(a))this._handleArray(a,t,l);else if("string"==typeof a)this._makeTextInput(a,t,l);else if("boolean"==typeof a)this._makeCheckbox(a,t,l);else if(a instanceof Object){if(!this.hideOption(e,s,this.moduleOptions))if(void 0!==a.enabled){const t=EI(l,"enabled"),e=this._getValue(t);if(!0===e){const t=this._makeLabel(s,l,!0);this._makeItem(l,t),r=this._handleObject(a,l)||r}else this._makeCheckbox(a,e,l)}else{const t=this._makeLabel(s,l,!0);this._makeItem(l,t),r=this._handleObject(a,l)||r}}else console.error("dont know how to handle",a,s,l)}}return r}_handleArray(t,e,i){"string"==typeof t[0]&&"color"===t[0]?(this._makeColorField(t,e,i),t[1]!==e&&this.changedOptions.push({path:i,value:e})):"string"==typeof t[0]?(this._makeDropdown(t,e,i),t[0]!==e&&this.changedOptions.push({path:i,value:e})):"number"==typeof t[0]&&(this._makeRange(t,e,i),t[0]!==e&&this.changedOptions.push({path:i,value:Number(e)}))}_update(t,e){const i=this._constructOptions(t,e);this.parent.body&&this.parent.body.emitter&&this.parent.body.emitter.emit&&this.parent.body.emitter.emit("configChange",i),this.initialized=!0,this.parent.setOptions(i)}_constructOptions(t,e,i={}){let n=i;t="false"!==(t="true"===t||t)&&t;for(let i=0;in-this.padding&&(i=!0),o=i?this.x-e:this.x,r=s?this.y-t:this.y}else r=this.y-t,r+t+this.padding>i&&(r=i-t-this.padding),rn&&(o=n-e-this.padding),o>>0,n-=t,n*=t,t=n>>>0,n-=t,t+=4294967296*n}return 2.3283064365386963e-10*(t>>>0)}}();let i=e(" "),n=e(" "),o=e(" ");for(let r=0;r{const t=2091639*e+2.3283064365386963e-10*o;return e=i,i=n,n=t-(o=0|t)};return r.uint32=()=>4294967296*r(),r.fract53=()=>r()+11102230246251565e-32*(2097152*r()|0),r.algorithm="Alea",r.seed=t,r.version="0.9",r}(t.length?t:[Date.now()])},ColorPicker:WI,Configurator:VI,DELETE:rI,HSVToHex:OI,HSVToRGB:TI,Hammer:JI,Popup:KI,RGBToHSV:QI,RGBToHex:DI,VALIDATOR_PRINT_STYLE:"background: #FFeeee; color: #dd0000",Validator:ZI,addClassName:function(t,e){let i=t.className.split(" ");const n=e.split(" ");i=i.concat(n.filter((function(t){return!i.includes(t)}))),t.className=i.join(" ")},addCssText:function(t,e){const i={...MI.split(t.style.cssText),...MI.split(e)};t.style.cssText=MI.join(i)},addEventListener:function(t,e,i,n){t.addEventListener?(void 0===n&&(n=!1),"mousewheel"===e&&navigator.userAgent.includes("Firefox")&&(e="DOMMouseScroll"),t.addEventListener(e,i,n)):t.attachEvent("on"+e,i)},binarySearchCustom:function(t,e,i,n){let o=0,r=0,s=t.length-1;for(;r<=s&&o<1e4;){const a=Math.floor((r+s)/2),l=t[a],d=e(void 0===n?l[i]:l[i][n]);if(0==d)return a;-1==d?r=a+1:s=a-1,o++}return-1},binarySearchValue:function(t,e,i,n,o){let r,s,a,l,d=0,c=0,h=t.length-1;for(o=null!=o?o:function(t,e){return t==e?0:t0)return"before"==n?Math.max(0,l-1):l;if(o(s,e)<0&&o(a,e)>0)return"before"==n?l:Math.min(t.length-1,l+1);o(s,e)<0?c=l+1:h=l-1,d++}return-1},bridgeObject:LI,copyAndExtendArray:EI,copyArray:xI,deepExtend:CI,deepObjectAssign:aI,easingFunctions:jI,equalArray:function(t,e){if(t.length!==e.length)return!1;for(let i=0,n=t.length;i0&&e(n,t[o-1])<0;o--)t[o]=t[o-1];t[o]=n}return t},isDate:function(t){if(t instanceof Date)return!0;if(bI(t)){if(AI.exec(t))return!0;if(!isNaN(Date.parse(t)))return!0}return!1},isNumber:vI,isObject:yI,isString:bI,isValidHex:PI,isValidRGB:NI,isValidRGBA:FI,mergeOptions:function(t,e,i,n={}){const o=function(t){return null!=t},r=function(t){return null!==t&&"object"==typeof t};if(!r(t))throw new Error("Parameter mergeTarget must be an object");if(!r(e))throw new Error("Parameter options must be an object");if(!o(i))throw new Error("Parameter option must have a value");if(!r(n))throw new Error("Parameter globalOptions must be an object");const s=e[i],a=r(n)&&!function(t){for(const e in t)if(Object.prototype.hasOwnProperty.call(t,e))return!1;return!0}(n),l=a?n[i]:void 0,d=l?l.enabled:void 0;if(void 0===s)return;if("boolean"==typeof s)return r(t[i])||(t[i]={}),void(t[i].enabled=s);if(null===s&&!r(t[i])){if(!o(l))return;t[i]=Object.create(l)}if(!r(s))return;let c=!0;void 0!==s.enabled?c=s.enabled:void 0!==d&&(c=l.enabled),function(t,e,i){r(t[i])||(t[i]={});const n=e[i],o=t[i];for(const t in n)Object.prototype.hasOwnProperty.call(n,t)&&(o[t]=n[t])}(t,e,i),t[i].enabled=c},option:kI,overrideOpacity:function(t,e){if(t.includes("rgba"))return t;if(t.includes("rgb")){const i=t.substr(t.indexOf("(")+1).replace(")","").split(",");return"rgba("+i[0]+","+i[1]+","+i[2]+","+e+")"}{const i=SI(t);return null==i?t:"rgba("+i.r+","+i.g+","+i.b+","+e+")"}},parseColor:function(t,e){if(bI(t)){let e=t;if(NI(e)){const t=e.substr(4).substr(0,e.length-5).split(",").map((function(t){return parseInt(t)}));e=DI(t[0],t[1],t[2])}if(!0===PI(e)){const t=RI(e),i={h:t.h,s:.8*t.s,v:Math.min(1,1.02*t.v)},n={h:t.h,s:Math.min(1,1.25*t.s),v:.8*t.v},o=OI(n.h,n.s,n.v),r=OI(i.h,i.s,i.v);return{background:e,border:o,highlight:{background:r,border:o},hover:{background:r,border:o}}}return{background:e,border:e,highlight:{background:e,border:e},hover:{background:e,border:e}}}if(e){return{background:t.background||e.background,border:t.border||e.border,highlight:bI(t.highlight)?{border:t.highlight,background:t.highlight}:{background:t.highlight&&t.highlight.background||e.highlight.background,border:t.highlight&&t.highlight.border||e.highlight.border},hover:bI(t.hover)?{border:t.hover,background:t.hover}:{border:t.hover&&t.hover.border||e.hover.border,background:t.hover&&t.hover.background||e.hover.background}}}return{background:t.background||void 0,border:t.border||void 0,highlight:bI(t.highlight)?{border:t.highlight,background:t.highlight}:{background:t.highlight&&t.highlight.background||void 0,border:t.highlight&&t.highlight.border||void 0},hover:bI(t.hover)?{border:t.hover,background:t.hover}:{border:t.hover&&t.hover.border||void 0,background:t.hover&&t.hover.background||void 0}}},preventDefault:function(t){t||(t=window.event),t&&(t.preventDefault?t.preventDefault():t.returnValue=!1)},pureDeepObjectAssign:sI,recursiveDOMDelete:function t(e){if(e)for(;!0===e.hasChildNodes();){const i=e.firstChild;i&&(t(i),e.removeChild(i))}},removeClassName:function(t,e){let i=t.className.split(" ");const n=e.split(" ");i=i.filter((function(t){return!n.includes(t)})),t.className=i.join(" ")},removeCssText:function(t,e){const i=MI.split(t.style.cssText),n=MI.split(e);for(const t in n)Object.prototype.hasOwnProperty.call(n,t)&&delete i[t];t.style.cssText=MI.join(i)},removeEventListener:function(t,e,i,n){t.removeEventListener?(void 0===n&&(n=!1),"mousewheel"===e&&navigator.userAgent.includes("Firefox")&&(e="DOMMouseScroll"),t.removeEventListener(e,i,n)):t.detachEvent("on"+e,i)},selectiveBridgeObject:function(t,e){if(null!==e&&"object"==typeof e){const i=Object.create(e);for(let n=0;n{e||(e=!0,requestAnimationFrame((()=>{e=!1,t()})))}},toArray:BI,topMost:function(t,e){let i;Array.isArray(e)||(e=[e]);for(const n of t)if(n){i=n[e[0]];for(let t=1;t1&&void 0!==arguments[1]?arguments[1]:0,i=(rE[t[e+0]]+rE[t[e+1]]+rE[t[e+2]]+rE[t[e+3]]+"-"+rE[t[e+4]]+rE[t[e+5]]+"-"+rE[t[e+6]]+rE[t[e+7]]+"-"+rE[t[e+8]]+rE[t[e+9]]+"-"+rE[t[e+10]]+rE[t[e+11]]+rE[t[e+12]]+rE[t[e+13]]+rE[t[e+14]]+rE[t[e+15]]).toLowerCase();if(!oE(i))throw TypeError("Stringified UUID is invalid");return i}function lE(t,e,i){function n(t,n,o,r){if("string"==typeof t&&(t=function(t){t=unescape(encodeURIComponent(t));for(var e=[],i=0;i>>24,i[1]=e>>>16&255,i[2]=e>>>8&255,i[3]=255&e,i[4]=(e=parseInt(t.slice(9,13),16))>>>8,i[5]=255&e,i[6]=(e=parseInt(t.slice(14,18),16))>>>8,i[7]=255&e,i[8]=(e=parseInt(t.slice(19,23),16))>>>8,i[9]=255&e,i[10]=(e=parseInt(t.slice(24,36),16))/1099511627776&255,i[11]=e/4294967296&255,i[12]=e>>>24&255,i[13]=e>>>16&255,i[14]=e>>>8&255,i[15]=255&e,i}(n)),16!==n.length)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");var s=new Uint8Array(16+t.length);if(s.set(n),s.set(t,n.length),(s=i(s))[6]=15&s[6]|e,s[8]=63&s[8]|128,o){r=r||0;for(var a=0;a<16;++a)o[r+a]=s[a];return o}return aE(s)}try{n.name=t}catch(t){}return n.DNS="6ba7b810-9dad-11d1-80b4-00c04fd430c8",n.URL="6ba7b811-9dad-11d1-80b4-00c04fd430c8",n}function dE(t){return 14+(t+64>>>9<<4)+1}function cE(t,e){var i=(65535&t)+(65535&e);return(t>>16)+(e>>16)+(i>>16)<<16|65535&i}function hE(t,e,i,n,o,r){return cE((s=cE(cE(e,t),cE(n,r)))<<(a=o)|s>>>32-a,i);var s,a}function uE(t,e,i,n,o,r,s){return hE(e&i|~e&n,t,e,o,r,s)}function AE(t,e,i,n,o,r,s){return hE(e&n|i&~n,t,e,o,r,s)}function pE(t,e,i,n,o,r,s){return hE(e^i^n,t,e,o,r,s)}function mE(t,e,i,n,o,r,s){return hE(i^(e|~n),t,e,o,r,s)}function gE(t,e,i){var n=(t=t||{}).random||(t.rng||iE)();if(n[6]=15&n[6]|64,n[8]=63&n[8]|128,e){i=i||0;for(var o=0;o<16;++o)e[i+o]=n[o];return e}return aE(n)}function fE(t,e,i,n){switch(t){case 0:return e&i^~e&n;case 1:case 3:return e^i^n;case 2:return e&i^e&n^i&n}}function vE(t,e){return t<>>32-e}lE("v3",48,(function(t){if("string"==typeof t){var e=unescape(encodeURIComponent(t));t=new Uint8Array(e.length);for(var i=0;i>5]>>>o%32&255,s=parseInt(n.charAt(r>>>4&15)+n.charAt(15&r),16);e.push(s)}return e}(function(t,e){t[e>>5]|=128<>5]|=(255&t[n/8])<>>0;b=v,v=f,f=vE(g,30)>>>0,g=m,m=w}i[0]=i[0]+m>>>0,i[1]=i[1]+g>>>0,i[2]=i[2]+f>>>0,i[3]=i[3]+v>>>0,i[4]=i[4]+b>>>0}return[i[0]>>24&255,i[0]>>16&255,i[0]>>8&255,255&i[0],i[1]>>24&255,i[1]>>16&255,i[1]>>8&255,255&i[1],i[2]>>24&255,i[2]>>16&255,i[2]>>8&255,255&i[2],i[3]>>24&255,i[3]>>16&255,i[3]>>8&255,255&i[3],i[4]>>24&255,i[4]>>16&255,i[4]>>8&255,255&i[4]]}));class bE{_source;_transformers;_target;_listeners={add:this._add.bind(this),remove:this._remove.bind(this),update:this._update.bind(this)};constructor(t,e,i){this._source=t,this._transformers=e,this._target=i}all(){return this._target.update(this._transformItems(this._source.get())),this}start(){return this._source.on("add",this._listeners.add),this._source.on("remove",this._listeners.remove),this._source.on("update",this._listeners.update),this}stop(){return this._source.off("add",this._listeners.add),this._source.off("remove",this._listeners.remove),this._source.off("update",this._listeners.update),this}_transformItems(t){return this._transformers.reduce(((t,e)=>e(t)),t)}_add(t,e){null!=e&&this._target.add(this._transformItems(this._source.get(e.items)))}_update(t,e){null!=e&&this._target.update(this._transformItems(this._source.get(e.items)))}_remove(t,e){null!=e&&this._target.remove(this._transformItems(e.oldData))}}class yE{_source;_transformers=[];constructor(t){this._source=t}filter(t){return this._transformers.push((e=>e.filter(t))),this}map(t){return this._transformers.push((e=>e.map(t))),this}flatMap(t){return this._transformers.push((e=>e.flatMap(t))),this}to(t){return new bE(this._source,this._transformers,t)}}function _E(t){return"string"==typeof t||"number"==typeof t}class wE{delay;max;_queue=[];_timeout=null;_extended=null;constructor(t){this.delay=null,this.max=1/0,this.setOptions(t)}setOptions(t){t&&void 0!==t.delay&&(this.delay=t.delay),t&&void 0!==t.max&&(this.max=t.max),this._flushIfNeeded()}static extend(t,e){const i=new wE(e);if(void 0!==t.flush)throw new Error("Target object already has a property flush");t.flush=()=>{i.flush()};const n=[{name:"flush",original:void 0}];if(e&&e.replace)for(let o=0;othis.max&&this.flush(),null!=this._timeout&&(clearTimeout(this._timeout),this._timeout=null),this.queue.length>0&&"number"==typeof this.delay&&(this._timeout=setTimeout((()=>{this.flush()}),this.delay))}flush(){this._queue.splice(0).forEach((t=>{t.fn.apply(t.context||t.fn,t.args||[])}))}}class CE{_subscribers={"*":[],add:[],remove:[],update:[]};_trigger(t,e,i){if("*"===t)throw new Error("Cannot trigger event *");[...this._subscribers[t],...this._subscribers["*"]].forEach((n=>{n(t,e,null!=i?i:null)}))}on(t,e){"function"==typeof e&&this._subscribers[t].push(e)}off(t,e){this._subscribers[t]=this._subscribers[t].filter((t=>t!==e))}subscribe=CE.prototype.on;unsubscribe=CE.prototype.off}class IE{_pairs;constructor(t){this._pairs=t}*[Symbol.iterator](){for(const[t,e]of this._pairs)yield[t,e]}*entries(){for(const[t,e]of this._pairs)yield[t,e]}*keys(){for(const[t]of this._pairs)yield t}*values(){for(const[,t]of this._pairs)yield t}toIdArray(){return[...this._pairs].map((t=>t[0]))}toItemArray(){return[...this._pairs].map((t=>t[1]))}toEntryArray(){return[...this._pairs]}toObjectMap(){const t=Object.create(null);for(const[e,i]of this._pairs)t[e]=i;return t}toMap(){return new Map(this._pairs)}toIdSet(){return new Set(this.toIdArray())}toItemSet(){return new Set(this.toItemArray())}cache(){return new IE([...this._pairs])}distinct(t){const e=new Set;for(const[i,n]of this._pairs)e.add(t(n,i));return e}filter(t){const e=this._pairs;return new IE({*[Symbol.iterator](){for(const[i,n]of e)t(n,i)&&(yield[i,n])}})}forEach(t){for(const[e,i]of this._pairs)t(i,e)}map(t){const e=this._pairs;return new IE({*[Symbol.iterator](){for(const[i,n]of e)yield[i,t(n,i)]}})}max(t){const e=this._pairs[Symbol.iterator]();let i=e.next();if(i.done)return null;let n=i.value[1],o=t(i.value[1],i.value[0]);for(;!(i=e.next()).done;){const[e,r]=i.value,s=t(r,e);s>o&&(o=s,n=r)}return n}min(t){const e=this._pairs[Symbol.iterator]();let i=e.next();if(i.done)return null;let n=i.value[1],o=t(i.value[1],i.value[0]);for(;!(i=e.next()).done;){const[e,r]=i.value,s=t(r,e);s[...this._pairs].sort((([e,i],[n,o])=>t(i,o,e,n)))[Symbol.iterator]()})}}class EE extends CE{flush;length;get idProp(){return this._idProp}_options;_data;_idProp;_queue=null;constructor(t,e){super(),t&&!Array.isArray(t)&&(e=t,t=[]),this._options=e||{},this._data=new Map,this.length=0,this._idProp=this._options.fieldId||"id",t&&t.length&&this.add(t),this.setOptions(e)}setOptions(t){t&&void 0!==t.queue&&(!1===t.queue?this._queue&&(this._queue.destroy(),this._queue=null):(this._queue||(this._queue=wE.extend(this,{replace:["add","update","remove"]})),t.queue&&"object"==typeof t.queue&&this._queue.setOptions(t.queue)))}add(t,e){const i=[];let n;if(Array.isArray(t)){const e=t.map((t=>t[this._idProp]));if(e.some((t=>this._data.has(t))))throw new Error("A duplicate id was found in the parameter array.");for(let e=0,o=t.length;e{const e=t[s];if(null!=e&&this._data.has(e)){const i=t,s=Object.assign({},this._data.get(e)),a=this._updateItem(i);n.push(a),r.push(i),o.push(s)}else{const e=this._addItem(t);i.push(e)}};if(Array.isArray(t))for(let e=0,i=t.length;e{const e=this._data.get(t[this._idProp]);if(null==e)throw new Error("Updating non-existent items is not allowed.");return{oldData:e,update:t}})).map((({oldData:t,update:e})=>{const i=t[this._idProp],n=sI(t,e);return this._data.set(i,n),{id:i,oldData:t,updatedData:n}}));if(i.length){const t={items:i.map((t=>t.id)),oldData:i.map((t=>t.oldData)),data:i.map((t=>t.updatedData))};return this._trigger("update",t,e),t.items}return[]}get(t,e){let i,n,o;_E(t)?(i=t,o=e):Array.isArray(t)?(n=t,o=e):o=t;const r=o&&"Object"===o.returnType?"Object":"Array",s=o&&o.filter,a=[];let l,d,c;if(null!=i)l=this._data.get(i),l&&s&&!s(l)&&(l=void 0);else if(null!=n)for(let t=0,e=n.length;t(e[i]=t[i],e)),{}):t}_sort(t,e){if("string"==typeof e){const i=e;t.sort(((t,e)=>{const n=t[i],o=e[i];return n>o?1:ni)&&(e=n,i=o)}return e||null}min(t){let e=null,i=null;for(const n of this._data.values()){const o=n[t];"number"==typeof o&&(null==i||or(t)&&s(t)),null==n?this._data.get(o):this._data.get(n,o)}getIds(t){if(this._data.length){const e=this._options.filter,i=null!=t?t.filter:null;let n;return n=i?e?t=>e(t)&&i(t):i:e,this._data.getIds({filter:n,order:t&&t.order})}return[]}forEach(t,e){if(this._data){const i=this._options.filter,n=e&&e.filter;let o;o=n?i?function(t){return i(t)&&n(t)}:n:i,this._data.forEach(t,{filter:o,order:e&&e.order})}}map(t,e){if(this._data){const i=this._options.filter,n=e&&e.filter;let o;return o=n?i?t=>i(t)&&n(t):n:i,this._data.map(t,{filter:o,order:e&&e.order})}return[]}getDataSet(){return this._data.getDataSet()}stream(t){return this._data.stream(t||{[Symbol.iterator]:this._ids.keys.bind(this._ids)})}dispose(){this._data?.off&&this._data.off("*",this._listener);const t="This data view has already been disposed of.",e={get:()=>{throw new Error(t)},set:()=>{throw new Error(t)},configurable:!1};for(const t of Reflect.ownKeys(xE.prototype))Object.defineProperty(this,t,e)}_onEvent(t,e,i){if(!e||!e.items||!this._data)return;const n=e.items,o=[],r=[],s=[],a=[],l=[],d=[];switch(t){case"add":for(let t=0,e=n.length;t>>0;for(e=0;e0)for(i=0;i=0?i?"+":"":"-")+Math.pow(10,Math.max(0,o)).toString().substr(1)+n}var P=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,N=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,F={},L={};function j(t,e,i,n){var o=n;"string"==typeof n&&(o=function(){return this[n]()}),t&&(L[t]=o),e&&(L[e[0]]=function(){return R(o.apply(this,arguments),e[1],e[2])}),i&&(L[i]=function(){return this.localeData().ordinal(o.apply(this,arguments),t)})}function z(t){return t.match(/\[[\s\S]/)?t.replace(/^\[|\]$/g,""):t.replace(/\\/g,"")}function U(t){var e,i,n=t.match(P);for(e=0,i=n.length;e=0&&N.test(t);)t=t.replace(N,n),N.lastIndex=0,i-=1;return t}var q={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};function Y(t){var e=this._longDateFormat[t],i=this._longDateFormat[t.toUpperCase()];return e||!i?e:(this._longDateFormat[t]=i.match(P).map((function(t){return"MMMM"===t||"MM"===t||"DD"===t||"dddd"===t?t.slice(1):t})).join(""),this._longDateFormat[t])}var $="Invalid date";function W(){return this._invalidDate}var V="%d",J=/\d{1,2}/;function K(t){return this._ordinal.replace("%d",t)}var Z={future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function X(t,e,i,n){var o=this._relativeTime[i];return S(o)?o(t,e,i,n):o.replace(/%d/i,t)}function tt(t,e){var i=this._relativeTime[t>0?"future":"past"];return S(i)?i(e):i.replace(/%s/i,e)}var et={};function it(t,e){var i=t.toLowerCase();et[i]=et[i+"s"]=et[e]=t}function nt(t){return"string"==typeof t?et[t]||et[t.toLowerCase()]:void 0}function ot(t){var e,i,n={};for(i in t)a(t,i)&&(e=nt(i))&&(n[e]=t[i]);return n}var rt={};function st(t,e){rt[t]=e}function at(t){var e,i=[];for(e in t)a(t,e)&&i.push({unit:e,priority:rt[e]});return i.sort((function(t,e){return t.priority-e.priority})),i}function lt(t){return t%4==0&&t%100!=0||t%400==0}function dt(t){return t<0?Math.ceil(t)||0:Math.floor(t)}function ct(t){var e=+t,i=0;return 0!==e&&isFinite(e)&&(i=dt(e)),i}function ht(t,e){return function(i){return null!=i?(At(this,t,i),n.updateOffset(this,e),this):ut(this,t)}}function ut(t,e){return t.isValid()?t._d["get"+(t._isUTC?"UTC":"")+e]():NaN}function At(t,e,i){t.isValid()&&!isNaN(i)&&("FullYear"===e&<(t.year())&&1===t.month()&&29===t.date()?(i=ct(i),t._d["set"+(t._isUTC?"UTC":"")+e](i,t.month(),Xt(i,t.month()))):t._d["set"+(t._isUTC?"UTC":"")+e](i))}function pt(t){return S(this[t=nt(t)])?this[t]():this}function mt(t,e){if("object"==typeof t){var i,n=at(t=ot(t)),o=n.length;for(i=0;i68?1900:2e3)};var ge=ht("FullYear",!0);function fe(){return lt(this.year())}function ve(t,e,i,n,o,r,s){var a;return t<100&&t>=0?(a=new Date(t+400,e,i,n,o,r,s),isFinite(a.getFullYear())&&a.setFullYear(t)):a=new Date(t,e,i,n,o,r,s),a}function be(t){var e,i;return t<100&&t>=0?((i=Array.prototype.slice.call(arguments))[0]=t+400,e=new Date(Date.UTC.apply(null,i)),isFinite(e.getUTCFullYear())&&e.setUTCFullYear(t)):e=new Date(Date.UTC.apply(null,arguments)),e}function ye(t,e,i){var n=7+e-i;return-(7+be(t,0,n).getUTCDay()-e)%7+n-1}function _e(t,e,i,n,o){var r,s,a=1+7*(e-1)+(7+i-n)%7+ye(t,n,o);return a<=0?s=me(r=t-1)+a:a>me(t)?(r=t+1,s=a-me(t)):(r=t,s=a),{year:r,dayOfYear:s}}function we(t,e,i){var n,o,r=ye(t.year(),e,i),s=Math.floor((t.dayOfYear()-r-1)/7)+1;return s<1?n=s+Ce(o=t.year()-1,e,i):s>Ce(t.year(),e,i)?(n=s-Ce(t.year(),e,i),o=t.year()+1):(o=t.year(),n=s),{week:n,year:o}}function Ce(t,e,i){var n=ye(t,e,i),o=ye(t+1,e,i);return(me(t)-n+o)/7}function Ie(t){return we(t,this._week.dow,this._week.doy).week}j("w",["ww",2],"wo","week"),j("W",["WW",2],"Wo","isoWeek"),it("week","w"),it("isoWeek","W"),st("week",5),st("isoWeek",5),Ot("w",wt),Ot("ww",wt,vt),Ot("W",wt),Ot("WW",wt,vt),jt(["w","ww","W","WW"],(function(t,e,i,n){e[n.substr(0,1)]=ct(t)}));var Ee={dow:0,doy:6};function xe(){return this._week.dow}function Be(){return this._week.doy}function ke(t){var e=this.localeData().week(this);return null==t?e:this.add(7*(t-e),"d")}function Se(t){var e=we(this,1,4).week;return null==t?e:this.add(7*(t-e),"d")}function De(t,e){return"string"!=typeof t?t:isNaN(t)?"number"==typeof(t=e.weekdaysParse(t))?t:null:parseInt(t,10)}function Qe(t,e){return"string"==typeof t?e.weekdaysParse(t)%7||7:isNaN(t)?null:t}function Me(t,e){return t.slice(e,7).concat(t.slice(0,e))}j("d",0,"do","day"),j("dd",0,0,(function(t){return this.localeData().weekdaysMin(this,t)})),j("ddd",0,0,(function(t){return this.localeData().weekdaysShort(this,t)})),j("dddd",0,0,(function(t){return this.localeData().weekdays(this,t)})),j("e",0,0,"weekday"),j("E",0,0,"isoWeekday"),it("day","d"),it("weekday","e"),it("isoWeekday","E"),st("day",11),st("weekday",11),st("isoWeekday",11),Ot("d",wt),Ot("e",wt),Ot("E",wt),Ot("dd",(function(t,e){return e.weekdaysMinRegex(t)})),Ot("ddd",(function(t,e){return e.weekdaysShortRegex(t)})),Ot("dddd",(function(t,e){return e.weekdaysRegex(t)})),jt(["dd","ddd","dddd"],(function(t,e,i,n){var o=i._locale.weekdaysParse(t,n,i._strict);null!=o?e.d=o:g(i).invalidWeekday=t})),jt(["d","e","E"],(function(t,e,i,n){e[n]=ct(t)}));var Te="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),Oe="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),Re="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),Pe=Tt,Ne=Tt,Fe=Tt;function Le(t,e){var i=r(this._weekdays)?this._weekdays:this._weekdays[t&&!0!==t&&this._weekdays.isFormat.test(e)?"format":"standalone"];return!0===t?Me(i,this._week.dow):t?i[t.day()]:i}function je(t){return!0===t?Me(this._weekdaysShort,this._week.dow):t?this._weekdaysShort[t.day()]:this._weekdaysShort}function ze(t){return!0===t?Me(this._weekdaysMin,this._week.dow):t?this._weekdaysMin[t.day()]:this._weekdaysMin}function Ue(t,e,i){var n,o,r,s=t.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],n=0;n<7;++n)r=p([2e3,1]).day(n),this._minWeekdaysParse[n]=this.weekdaysMin(r,"").toLocaleLowerCase(),this._shortWeekdaysParse[n]=this.weekdaysShort(r,"").toLocaleLowerCase(),this._weekdaysParse[n]=this.weekdays(r,"").toLocaleLowerCase();return i?"dddd"===e?-1!==(o=Ut.call(this._weekdaysParse,s))?o:null:"ddd"===e?-1!==(o=Ut.call(this._shortWeekdaysParse,s))?o:null:-1!==(o=Ut.call(this._minWeekdaysParse,s))?o:null:"dddd"===e?-1!==(o=Ut.call(this._weekdaysParse,s))||-1!==(o=Ut.call(this._shortWeekdaysParse,s))||-1!==(o=Ut.call(this._minWeekdaysParse,s))?o:null:"ddd"===e?-1!==(o=Ut.call(this._shortWeekdaysParse,s))||-1!==(o=Ut.call(this._weekdaysParse,s))||-1!==(o=Ut.call(this._minWeekdaysParse,s))?o:null:-1!==(o=Ut.call(this._minWeekdaysParse,s))||-1!==(o=Ut.call(this._weekdaysParse,s))||-1!==(o=Ut.call(this._shortWeekdaysParse,s))?o:null}function He(t,e,i){var n,o,r;if(this._weekdaysParseExact)return Ue.call(this,t,e,i);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),n=0;n<7;n++){if(o=p([2e3,1]).day(n),i&&!this._fullWeekdaysParse[n]&&(this._fullWeekdaysParse[n]=new RegExp("^"+this.weekdays(o,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[n]=new RegExp("^"+this.weekdaysShort(o,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[n]=new RegExp("^"+this.weekdaysMin(o,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[n]||(r="^"+this.weekdays(o,"")+"|^"+this.weekdaysShort(o,"")+"|^"+this.weekdaysMin(o,""),this._weekdaysParse[n]=new RegExp(r.replace(".",""),"i")),i&&"dddd"===e&&this._fullWeekdaysParse[n].test(t))return n;if(i&&"ddd"===e&&this._shortWeekdaysParse[n].test(t))return n;if(i&&"dd"===e&&this._minWeekdaysParse[n].test(t))return n;if(!i&&this._weekdaysParse[n].test(t))return n}}function Ge(t){if(!this.isValid())return null!=t?this:NaN;var e=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=t?(t=De(t,this.localeData()),this.add(t-e,"d")):e}function qe(t){if(!this.isValid())return null!=t?this:NaN;var e=(this.day()+7-this.localeData()._week.dow)%7;return null==t?e:this.add(t-e,"d")}function Ye(t){if(!this.isValid())return null!=t?this:NaN;if(null!=t){var e=Qe(t,this.localeData());return this.day(this.day()%7?e:e-7)}return this.day()||7}function $e(t){return this._weekdaysParseExact?(a(this,"_weekdaysRegex")||Je.call(this),t?this._weekdaysStrictRegex:this._weekdaysRegex):(a(this,"_weekdaysRegex")||(this._weekdaysRegex=Pe),this._weekdaysStrictRegex&&t?this._weekdaysStrictRegex:this._weekdaysRegex)}function We(t){return this._weekdaysParseExact?(a(this,"_weekdaysRegex")||Je.call(this),t?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(a(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=Ne),this._weekdaysShortStrictRegex&&t?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function Ve(t){return this._weekdaysParseExact?(a(this,"_weekdaysRegex")||Je.call(this),t?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(a(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=Fe),this._weekdaysMinStrictRegex&&t?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function Je(){function t(t,e){return e.length-t.length}var e,i,n,o,r,s=[],a=[],l=[],d=[];for(e=0;e<7;e++)i=p([2e3,1]).day(e),n=Nt(this.weekdaysMin(i,"")),o=Nt(this.weekdaysShort(i,"")),r=Nt(this.weekdays(i,"")),s.push(n),a.push(o),l.push(r),d.push(n),d.push(o),d.push(r);s.sort(t),a.sort(t),l.sort(t),d.sort(t),this._weekdaysRegex=new RegExp("^("+d.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+l.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+a.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+s.join("|")+")","i")}function Ke(){return this.hours()%12||12}function Ze(){return this.hours()||24}function Xe(t,e){j(t,0,0,(function(){return this.localeData().meridiem(this.hours(),this.minutes(),e)}))}function ti(t,e){return e._meridiemParse}function ei(t){return"p"===(t+"").toLowerCase().charAt(0)}j("H",["HH",2],0,"hour"),j("h",["hh",2],0,Ke),j("k",["kk",2],0,Ze),j("hmm",0,0,(function(){return""+Ke.apply(this)+R(this.minutes(),2)})),j("hmmss",0,0,(function(){return""+Ke.apply(this)+R(this.minutes(),2)+R(this.seconds(),2)})),j("Hmm",0,0,(function(){return""+this.hours()+R(this.minutes(),2)})),j("Hmmss",0,0,(function(){return""+this.hours()+R(this.minutes(),2)+R(this.seconds(),2)})),Xe("a",!0),Xe("A",!1),it("hour","h"),st("hour",13),Ot("a",ti),Ot("A",ti),Ot("H",wt),Ot("h",wt),Ot("k",wt),Ot("HH",wt,vt),Ot("hh",wt,vt),Ot("kk",wt,vt),Ot("hmm",Ct),Ot("hmmss",It),Ot("Hmm",Ct),Ot("Hmmss",It),Lt(["H","HH"],Yt),Lt(["k","kk"],(function(t,e,i){var n=ct(t);e[Yt]=24===n?0:n})),Lt(["a","A"],(function(t,e,i){i._isPm=i._locale.isPM(t),i._meridiem=t})),Lt(["h","hh"],(function(t,e,i){e[Yt]=ct(t),g(i).bigHour=!0})),Lt("hmm",(function(t,e,i){var n=t.length-2;e[Yt]=ct(t.substr(0,n)),e[$t]=ct(t.substr(n)),g(i).bigHour=!0})),Lt("hmmss",(function(t,e,i){var n=t.length-4,o=t.length-2;e[Yt]=ct(t.substr(0,n)),e[$t]=ct(t.substr(n,2)),e[Wt]=ct(t.substr(o)),g(i).bigHour=!0})),Lt("Hmm",(function(t,e,i){var n=t.length-2;e[Yt]=ct(t.substr(0,n)),e[$t]=ct(t.substr(n))})),Lt("Hmmss",(function(t,e,i){var n=t.length-4,o=t.length-2;e[Yt]=ct(t.substr(0,n)),e[$t]=ct(t.substr(n,2)),e[Wt]=ct(t.substr(o))}));var ii=/[ap]\.?m?\.?/i,ni=ht("Hours",!0);function oi(t,e,i){return t>11?i?"pm":"PM":i?"am":"AM"}var ri,si={calendar:T,longDateFormat:q,invalidDate:$,ordinal:V,dayOfMonthOrdinalParse:J,relativeTime:Z,months:te,monthsShort:ee,week:Ee,weekdays:Te,weekdaysMin:Re,weekdaysShort:Oe,meridiemParse:ii},ai={},li={};function di(t,e){var i,n=Math.min(t.length,e.length);for(i=0;i0;){if(n=Ai(o.slice(0,e).join("-")))return n;if(i&&i.length>=e&&di(o,i)>=e-1)break;e--}r++}return ri}function ui(t){return null!=t.match("^[^/\\\\]*$")}function Ai(e){var i=null;if(void 0===ai[e]&&t&&t.exports&&ui(e))try{i=ri._abbr,BE("./locale/"+e),pi(i)}catch(t){ai[e]=null}return ai[e]}function pi(t,e){var i;return t&&((i=d(e)?fi(t):mi(t,e))?ri=i:"undefined"!=typeof console&&console.warn&&console.warn("Locale "+t+" not found. Did you forget to load it?")),ri._abbr}function mi(t,e){if(null!==e){var i,n=si;if(e.abbr=t,null!=ai[t])k("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),n=ai[t]._config;else if(null!=e.parentLocale)if(null!=ai[e.parentLocale])n=ai[e.parentLocale]._config;else{if(null==(i=Ai(e.parentLocale)))return li[e.parentLocale]||(li[e.parentLocale]=[]),li[e.parentLocale].push({name:t,config:e}),null;n=i._config}return ai[t]=new M(Q(n,e)),li[t]&&li[t].forEach((function(t){mi(t.name,t.config)})),pi(t),ai[t]}return delete ai[t],null}function gi(t,e){if(null!=e){var i,n,o=si;null!=ai[t]&&null!=ai[t].parentLocale?ai[t].set(Q(ai[t]._config,e)):(null!=(n=Ai(t))&&(o=n._config),e=Q(o,e),null==n&&(e.abbr=t),(i=new M(e)).parentLocale=ai[t],ai[t]=i),pi(t)}else null!=ai[t]&&(null!=ai[t].parentLocale?(ai[t]=ai[t].parentLocale,t===pi()&&pi(t)):null!=ai[t]&&delete ai[t]);return ai[t]}function fi(t){var e;if(t&&t._locale&&t._locale._abbr&&(t=t._locale._abbr),!t)return ri;if(!r(t)){if(e=Ai(t))return e;t=[t]}return hi(t)}function vi(){return x(ai)}function bi(t){var e,i=t._a;return i&&-2===g(t).overflow&&(e=i[Gt]<0||i[Gt]>11?Gt:i[qt]<1||i[qt]>Xt(i[Ht],i[Gt])?qt:i[Yt]<0||i[Yt]>24||24===i[Yt]&&(0!==i[$t]||0!==i[Wt]||0!==i[Vt])?Yt:i[$t]<0||i[$t]>59?$t:i[Wt]<0||i[Wt]>59?Wt:i[Vt]<0||i[Vt]>999?Vt:-1,g(t)._overflowDayOfYear&&(eqt)&&(e=qt),g(t)._overflowWeeks&&-1===e&&(e=Jt),g(t)._overflowWeekday&&-1===e&&(e=Kt),g(t).overflow=e),t}var yi=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,_i=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,wi=/Z|[+-]\d\d(?::?\d\d)?/,Ci=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/],["YYYYMM",/\d{6}/,!1],["YYYY",/\d{4}/,!1]],Ii=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],Ei=/^\/?Date\((-?\d+)/i,xi=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,Bi={UT:0,GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function ki(t){var e,i,n,o,r,s,a=t._i,l=yi.exec(a)||_i.exec(a),d=Ci.length,c=Ii.length;if(l){for(g(t).iso=!0,e=0,i=d;eme(r)||0===t._dayOfYear)&&(g(t)._overflowDayOfYear=!0),i=be(r,0,t._dayOfYear),t._a[Gt]=i.getUTCMonth(),t._a[qt]=i.getUTCDate()),e=0;e<3&&null==t._a[e];++e)t._a[e]=s[e]=n[e];for(;e<7;e++)t._a[e]=s[e]=null==t._a[e]?2===e?1:0:t._a[e];24===t._a[Yt]&&0===t._a[$t]&&0===t._a[Wt]&&0===t._a[Vt]&&(t._nextDay=!0,t._a[Yt]=0),t._d=(t._useUTC?be:ve).apply(null,s),o=t._useUTC?t._d.getUTCDay():t._d.getDay(),null!=t._tzm&&t._d.setUTCMinutes(t._d.getUTCMinutes()-t._tzm),t._nextDay&&(t._a[Yt]=24),t._w&&void 0!==t._w.d&&t._w.d!==o&&(g(t).weekdayMismatch=!0)}}function Li(t){var e,i,n,o,r,s,a,l,d;null!=(e=t._w).GG||null!=e.W||null!=e.E?(r=1,s=4,i=Pi(e.GG,t._a[Ht],we(Wi(),1,4).year),n=Pi(e.W,1),((o=Pi(e.E,1))<1||o>7)&&(l=!0)):(r=t._locale._week.dow,s=t._locale._week.doy,d=we(Wi(),r,s),i=Pi(e.gg,t._a[Ht],d.year),n=Pi(e.w,d.week),null!=e.d?((o=e.d)<0||o>6)&&(l=!0):null!=e.e?(o=e.e+r,(e.e<0||e.e>6)&&(l=!0)):o=r),n<1||n>Ce(i,r,s)?g(t)._overflowWeeks=!0:null!=l?g(t)._overflowWeekday=!0:(a=_e(i,n,o,r,s),t._a[Ht]=a.year,t._dayOfYear=a.dayOfYear)}function ji(t){if(t._f!==n.ISO_8601)if(t._f!==n.RFC_2822){t._a=[],g(t).empty=!0;var e,i,o,r,s,a,l,d=""+t._i,c=d.length,h=0;for(l=(o=G(t._f,t._locale).match(P)||[]).length,e=0;e0&&g(t).unusedInput.push(s),d=d.slice(d.indexOf(i)+i.length),h+=i.length),L[r]?(i?g(t).empty=!1:g(t).unusedTokens.push(r),zt(r,i,t)):t._strict&&!i&&g(t).unusedTokens.push(r);g(t).charsLeftOver=c-h,d.length>0&&g(t).unusedInput.push(d),t._a[Yt]<=12&&!0===g(t).bigHour&&t._a[Yt]>0&&(g(t).bigHour=void 0),g(t).parsedDateParts=t._a.slice(0),g(t).meridiem=t._meridiem,t._a[Yt]=zi(t._locale,t._a[Yt],t._meridiem),null!==(a=g(t).era)&&(t._a[Ht]=t._locale.erasConvertYear(a,t._a[Ht])),Fi(t),bi(t)}else Oi(t);else ki(t)}function zi(t,e,i){var n;return null==i?e:null!=t.meridiemHour?t.meridiemHour(e,i):null!=t.isPM?((n=t.isPM(i))&&e<12&&(e+=12),n||12!==e||(e=0),e):e}function Ui(t){var e,i,n,o,r,s,a=!1,l=t._f.length;if(0===l)return g(t).invalidFormat=!0,void(t._d=new Date(NaN));for(o=0;othis?this:t:v()}));function Ki(t,e){var i,n;if(1===e.length&&r(e[0])&&(e=e[0]),!e.length)return Wi();for(i=e[0],n=1;nthis.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function wn(){if(!d(this._isDSTShifted))return this._isDSTShifted;var t,e={};return _(e,this),(e=qi(e))._a?(t=e._isUTC?p(e._a):Wi(e._a),this._isDSTShifted=this.isValid()&&dn(e._a,t.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}function Cn(){return!!this.isValid()&&!this._isUTC}function In(){return!!this.isValid()&&this._isUTC}function En(){return!!this.isValid()&&this._isUTC&&0===this._offset}n.updateOffset=function(){};var xn=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,Bn=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function kn(t,e){var i,n,o,r=t,s=null;return an(t)?r={ms:t._milliseconds,d:t._days,M:t._months}:c(t)||!isNaN(+t)?(r={},e?r[e]=+t:r.milliseconds=+t):(s=xn.exec(t))?(i="-"===s[1]?-1:1,r={y:0,d:ct(s[qt])*i,h:ct(s[Yt])*i,m:ct(s[$t])*i,s:ct(s[Wt])*i,ms:ct(ln(1e3*s[Vt]))*i}):(s=Bn.exec(t))?(i="-"===s[1]?-1:1,r={y:Sn(s[2],i),M:Sn(s[3],i),w:Sn(s[4],i),d:Sn(s[5],i),h:Sn(s[6],i),m:Sn(s[7],i),s:Sn(s[8],i)}):null==r?r={}:"object"==typeof r&&("from"in r||"to"in r)&&(o=Qn(Wi(r.from),Wi(r.to)),(r={}).ms=o.milliseconds,r.M=o.months),n=new sn(r),an(t)&&a(t,"_locale")&&(n._locale=t._locale),an(t)&&a(t,"_isValid")&&(n._isValid=t._isValid),n}function Sn(t,e){var i=t&&parseFloat(t.replace(",","."));return(isNaN(i)?0:i)*e}function Dn(t,e){var i={};return i.months=e.month()-t.month()+12*(e.year()-t.year()),t.clone().add(i.months,"M").isAfter(e)&&--i.months,i.milliseconds=+e-+t.clone().add(i.months,"M"),i}function Qn(t,e){var i;return t.isValid()&&e.isValid()?(e=An(e,t),t.isBefore(e)?i=Dn(t,e):((i=Dn(e,t)).milliseconds=-i.milliseconds,i.months=-i.months),i):{milliseconds:0,months:0}}function Mn(t,e){return function(i,n){var o;return null===n||isNaN(+n)||(k(e,"moment()."+e+"(period, number) is deprecated. Please use moment()."+e+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),o=i,i=n,n=o),Tn(this,kn(i,n),t),this}}function Tn(t,e,i,o){var r=e._milliseconds,s=ln(e._days),a=ln(e._months);t.isValid()&&(o=null==o||o,a&&de(t,ut(t,"Month")+a*i),s&&At(t,"Date",ut(t,"Date")+s*i),r&&t._d.setTime(t._d.valueOf()+r*i),o&&n.updateOffset(t,s||a))}kn.fn=sn.prototype,kn.invalid=rn;var On=Mn(1,"add"),Rn=Mn(-1,"subtract");function Pn(t){return"string"==typeof t||t instanceof String}function Nn(t){return C(t)||h(t)||Pn(t)||c(t)||Ln(t)||Fn(t)||null==t}function Fn(t){var e,i,n=s(t)&&!l(t),o=!1,r=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"],d=r.length;for(e=0;ei.valueOf():i.valueOf()9999?H(i,e?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):S(Date.prototype.toISOString)?e?this.toDate().toISOString():new Date(this.valueOf()+60*this.utcOffset()*1e3).toISOString().replace("Z",H(i,"Z")):H(i,e?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}function to(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var t,e,i,n,o="moment",r="";return this.isLocal()||(o=0===this.utcOffset()?"moment.utc":"moment.parseZone",r="Z"),t="["+o+'("]',e=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",i="-MM-DD[T]HH:mm:ss.SSS",n=r+'[")]',this.format(t+e+i+n)}function eo(t){t||(t=this.isUtc()?n.defaultFormatUtc:n.defaultFormat);var e=H(this,t);return this.localeData().postformat(e)}function io(t,e){return this.isValid()&&(C(t)&&t.isValid()||Wi(t).isValid())?kn({to:this,from:t}).locale(this.locale()).humanize(!e):this.localeData().invalidDate()}function no(t){return this.from(Wi(),t)}function oo(t,e){return this.isValid()&&(C(t)&&t.isValid()||Wi(t).isValid())?kn({from:this,to:t}).locale(this.locale()).humanize(!e):this.localeData().invalidDate()}function ro(t){return this.to(Wi(),t)}function so(t){var e;return void 0===t?this._locale._abbr:(null!=(e=fi(t))&&(this._locale=e),this)}n.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",n.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";var ao=E("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",(function(t){return void 0===t?this.localeData():this.locale(t)}));function lo(){return this._locale}var co=1e3,ho=60*co,uo=60*ho,Ao=3506328*uo;function po(t,e){return(t%e+e)%e}function mo(t,e,i){return t<100&&t>=0?new Date(t+400,e,i)-Ao:new Date(t,e,i).valueOf()}function go(t,e,i){return t<100&&t>=0?Date.UTC(t+400,e,i)-Ao:Date.UTC(t,e,i)}function fo(t){var e,i;if(void 0===(t=nt(t))||"millisecond"===t||!this.isValid())return this;switch(i=this._isUTC?go:mo,t){case"year":e=i(this.year(),0,1);break;case"quarter":e=i(this.year(),this.month()-this.month()%3,1);break;case"month":e=i(this.year(),this.month(),1);break;case"week":e=i(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":e=i(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":e=i(this.year(),this.month(),this.date());break;case"hour":e=this._d.valueOf(),e-=po(e+(this._isUTC?0:this.utcOffset()*ho),uo);break;case"minute":e=this._d.valueOf(),e-=po(e,ho);break;case"second":e=this._d.valueOf(),e-=po(e,co)}return this._d.setTime(e),n.updateOffset(this,!0),this}function vo(t){var e,i;if(void 0===(t=nt(t))||"millisecond"===t||!this.isValid())return this;switch(i=this._isUTC?go:mo,t){case"year":e=i(this.year()+1,0,1)-1;break;case"quarter":e=i(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":e=i(this.year(),this.month()+1,1)-1;break;case"week":e=i(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":e=i(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":e=i(this.year(),this.month(),this.date()+1)-1;break;case"hour":e=this._d.valueOf(),e+=uo-po(e+(this._isUTC?0:this.utcOffset()*ho),uo)-1;break;case"minute":e=this._d.valueOf(),e+=ho-po(e,ho)-1;break;case"second":e=this._d.valueOf(),e+=co-po(e,co)-1}return this._d.setTime(e),n.updateOffset(this,!0),this}function bo(){return this._d.valueOf()-6e4*(this._offset||0)}function yo(){return Math.floor(this.valueOf()/1e3)}function _o(){return new Date(this.valueOf())}function wo(){var t=this;return[t.year(),t.month(),t.date(),t.hour(),t.minute(),t.second(),t.millisecond()]}function Co(){var t=this;return{years:t.year(),months:t.month(),date:t.date(),hours:t.hours(),minutes:t.minutes(),seconds:t.seconds(),milliseconds:t.milliseconds()}}function Io(){return this.isValid()?this.toISOString():null}function Eo(){return f(this)}function xo(){return A({},g(this))}function Bo(){return g(this).overflow}function ko(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}function So(t,e){var i,o,r,s=this._eras||fi("en")._eras;for(i=0,o=s.length;i=0)return l[n]}function Qo(t,e){var i=t.since<=t.until?1:-1;return void 0===e?n(t.since).year():n(t.since).year()+(e-t.offset)*i}function Mo(){var t,e,i,n=this.localeData().eras();for(t=0,e=n.length;t(r=Ce(t,n,o))&&(e=r),Zo.call(this,t,e,i,n,o))}function Zo(t,e,i,n,o){var r=_e(t,e,i,n,o),s=be(r.year,0,r.dayOfYear);return this.year(s.getUTCFullYear()),this.month(s.getUTCMonth()),this.date(s.getUTCDate()),this}function Xo(t){return null==t?Math.ceil((this.month()+1)/3):this.month(3*(t-1)+this.month()%3)}j("N",0,0,"eraAbbr"),j("NN",0,0,"eraAbbr"),j("NNN",0,0,"eraAbbr"),j("NNNN",0,0,"eraName"),j("NNNNN",0,0,"eraNarrow"),j("y",["y",1],"yo","eraYear"),j("y",["yy",2],0,"eraYear"),j("y",["yyy",3],0,"eraYear"),j("y",["yyyy",4],0,"eraYear"),Ot("N",Lo),Ot("NN",Lo),Ot("NNN",Lo),Ot("NNNN",jo),Ot("NNNNN",zo),Lt(["N","NN","NNN","NNNN","NNNNN"],(function(t,e,i,n){var o=i._locale.erasParse(t,n,i._strict);o?g(i).era=o:g(i).invalidEra=t})),Ot("y",kt),Ot("yy",kt),Ot("yyy",kt),Ot("yyyy",kt),Ot("yo",Uo),Lt(["y","yy","yyy","yyyy"],Ht),Lt(["yo"],(function(t,e,i,n){var o;i._locale._eraYearOrdinalRegex&&(o=t.match(i._locale._eraYearOrdinalRegex)),i._locale.eraYearOrdinalParse?e[Ht]=i._locale.eraYearOrdinalParse(t,o):e[Ht]=parseInt(t,10)})),j(0,["gg",2],0,(function(){return this.weekYear()%100})),j(0,["GG",2],0,(function(){return this.isoWeekYear()%100})),Go("gggg","weekYear"),Go("ggggg","weekYear"),Go("GGGG","isoWeekYear"),Go("GGGGG","isoWeekYear"),it("weekYear","gg"),it("isoWeekYear","GG"),st("weekYear",1),st("isoWeekYear",1),Ot("G",St),Ot("g",St),Ot("GG",wt,vt),Ot("gg",wt,vt),Ot("GGGG",xt,yt),Ot("gggg",xt,yt),Ot("GGGGG",Bt,_t),Ot("ggggg",Bt,_t),jt(["gggg","ggggg","GGGG","GGGGG"],(function(t,e,i,n){e[n.substr(0,2)]=ct(t)})),jt(["gg","GG"],(function(t,e,i,o){e[o]=n.parseTwoDigitYear(t)})),j("Q",0,"Qo","quarter"),it("quarter","Q"),st("quarter",7),Ot("Q",ft),Lt("Q",(function(t,e){e[Gt]=3*(ct(t)-1)})),j("D",["DD",2],"Do","date"),it("date","D"),st("date",9),Ot("D",wt),Ot("DD",wt,vt),Ot("Do",(function(t,e){return t?e._dayOfMonthOrdinalParse||e._ordinalParse:e._dayOfMonthOrdinalParseLenient})),Lt(["D","DD"],qt),Lt("Do",(function(t,e){e[qt]=ct(t.match(wt)[0])}));var tr=ht("Date",!0);function er(t){var e=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==t?e:this.add(t-e,"d")}j("DDD",["DDDD",3],"DDDo","dayOfYear"),it("dayOfYear","DDD"),st("dayOfYear",4),Ot("DDD",Et),Ot("DDDD",bt),Lt(["DDD","DDDD"],(function(t,e,i){i._dayOfYear=ct(t)})),j("m",["mm",2],0,"minute"),it("minute","m"),st("minute",14),Ot("m",wt),Ot("mm",wt,vt),Lt(["m","mm"],$t);var ir=ht("Minutes",!1);j("s",["ss",2],0,"second"),it("second","s"),st("second",15),Ot("s",wt),Ot("ss",wt,vt),Lt(["s","ss"],Wt);var nr,or,rr=ht("Seconds",!1);for(j("S",0,0,(function(){return~~(this.millisecond()/100)})),j(0,["SS",2],0,(function(){return~~(this.millisecond()/10)})),j(0,["SSS",3],0,"millisecond"),j(0,["SSSS",4],0,(function(){return 10*this.millisecond()})),j(0,["SSSSS",5],0,(function(){return 100*this.millisecond()})),j(0,["SSSSSS",6],0,(function(){return 1e3*this.millisecond()})),j(0,["SSSSSSS",7],0,(function(){return 1e4*this.millisecond()})),j(0,["SSSSSSSS",8],0,(function(){return 1e5*this.millisecond()})),j(0,["SSSSSSSSS",9],0,(function(){return 1e6*this.millisecond()})),it("millisecond","ms"),st("millisecond",16),Ot("S",Et,ft),Ot("SS",Et,vt),Ot("SSS",Et,bt),nr="SSSS";nr.length<=9;nr+="S")Ot(nr,kt);function sr(t,e){e[Vt]=ct(1e3*("0."+t))}for(nr="S";nr.length<=9;nr+="S")Lt(nr,sr);function ar(){return this._isUTC?"UTC":""}function lr(){return this._isUTC?"Coordinated Universal Time":""}or=ht("Milliseconds",!1),j("z",0,0,"zoneAbbr"),j("zz",0,0,"zoneName");var dr=w.prototype;function cr(t){return Wi(1e3*t)}function hr(){return Wi.apply(null,arguments).parseZone()}function ur(t){return t}dr.add=On,dr.calendar=Un,dr.clone=Hn,dr.diff=Jn,dr.endOf=vo,dr.format=eo,dr.from=io,dr.fromNow=no,dr.to=oo,dr.toNow=ro,dr.get=pt,dr.invalidAt=Bo,dr.isAfter=Gn,dr.isBefore=qn,dr.isBetween=Yn,dr.isSame=$n,dr.isSameOrAfter=Wn,dr.isSameOrBefore=Vn,dr.isValid=Eo,dr.lang=ao,dr.locale=so,dr.localeData=lo,dr.max=Ji,dr.min=Vi,dr.parsingFlags=xo,dr.set=mt,dr.startOf=fo,dr.subtract=Rn,dr.toArray=wo,dr.toObject=Co,dr.toDate=_o,dr.toISOString=Xn,dr.inspect=to,"undefined"!=typeof Symbol&&null!=Symbol.for&&(dr[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"}),dr.toJSON=Io,dr.toString=Zn,dr.unix=yo,dr.valueOf=bo,dr.creationData=ko,dr.eraName=Mo,dr.eraNarrow=To,dr.eraAbbr=Oo,dr.eraYear=Ro,dr.year=ge,dr.isLeapYear=fe,dr.weekYear=qo,dr.isoWeekYear=Yo,dr.quarter=dr.quarters=Xo,dr.month=ce,dr.daysInMonth=he,dr.week=dr.weeks=ke,dr.isoWeek=dr.isoWeeks=Se,dr.weeksInYear=Vo,dr.weeksInWeekYear=Jo,dr.isoWeeksInYear=$o,dr.isoWeeksInISOWeekYear=Wo,dr.date=tr,dr.day=dr.days=Ge,dr.weekday=qe,dr.isoWeekday=Ye,dr.dayOfYear=er,dr.hour=dr.hours=ni,dr.minute=dr.minutes=ir,dr.second=dr.seconds=rr,dr.millisecond=dr.milliseconds=or,dr.utcOffset=mn,dr.utc=fn,dr.local=vn,dr.parseZone=bn,dr.hasAlignedHourOffset=yn,dr.isDST=_n,dr.isLocal=Cn,dr.isUtcOffset=In,dr.isUtc=En,dr.isUTC=En,dr.zoneAbbr=ar,dr.zoneName=lr,dr.dates=E("dates accessor is deprecated. Use date instead.",tr),dr.months=E("months accessor is deprecated. Use month instead",ce),dr.years=E("years accessor is deprecated. Use year instead",ge),dr.zone=E("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",gn),dr.isDSTShifted=E("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",wn);var Ar=M.prototype;function pr(t,e,i,n){var o=fi(),r=p().set(n,e);return o[i](r,t)}function mr(t,e,i){if(c(t)&&(e=t,t=void 0),t=t||"",null!=e)return pr(t,e,i,"month");var n,o=[];for(n=0;n<12;n++)o[n]=pr(t,n,i,"month");return o}function gr(t,e,i,n){"boolean"==typeof t?(c(e)&&(i=e,e=void 0),e=e||""):(i=e=t,t=!1,c(e)&&(i=e,e=void 0),e=e||"");var o,r=fi(),s=t?r._week.dow:0,a=[];if(null!=i)return pr(e,(i+s)%7,n,"day");for(o=0;o<7;o++)a[o]=pr(e,(o+s)%7,n,"day");return a}function fr(t,e){return mr(t,e,"months")}function vr(t,e){return mr(t,e,"monthsShort")}function br(t,e,i){return gr(t,e,i,"weekdays")}function yr(t,e,i){return gr(t,e,i,"weekdaysShort")}function _r(t,e,i){return gr(t,e,i,"weekdaysMin")}Ar.calendar=O,Ar.longDateFormat=Y,Ar.invalidDate=W,Ar.ordinal=K,Ar.preparse=ur,Ar.postformat=ur,Ar.relativeTime=X,Ar.pastFuture=tt,Ar.set=D,Ar.eras=So,Ar.erasParse=Do,Ar.erasConvertYear=Qo,Ar.erasAbbrRegex=No,Ar.erasNameRegex=Po,Ar.erasNarrowRegex=Fo,Ar.months=re,Ar.monthsShort=se,Ar.monthsParse=le,Ar.monthsRegex=Ae,Ar.monthsShortRegex=ue,Ar.week=Ie,Ar.firstDayOfYear=Be,Ar.firstDayOfWeek=xe,Ar.weekdays=Le,Ar.weekdaysMin=ze,Ar.weekdaysShort=je,Ar.weekdaysParse=He,Ar.weekdaysRegex=$e,Ar.weekdaysShortRegex=We,Ar.weekdaysMinRegex=Ve,Ar.isPM=ei,Ar.meridiem=oi,pi("en",{eras:[{since:"0001-01-01",until:1/0,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(t){var e=t%10;return t+(1===ct(t%100/10)?"th":1===e?"st":2===e?"nd":3===e?"rd":"th")}}),n.lang=E("moment.lang is deprecated. Use moment.locale instead.",pi),n.langData=E("moment.langData is deprecated. Use moment.localeData instead.",fi);var wr=Math.abs;function Cr(){var t=this._data;return this._milliseconds=wr(this._milliseconds),this._days=wr(this._days),this._months=wr(this._months),t.milliseconds=wr(t.milliseconds),t.seconds=wr(t.seconds),t.minutes=wr(t.minutes),t.hours=wr(t.hours),t.months=wr(t.months),t.years=wr(t.years),this}function Ir(t,e,i,n){var o=kn(e,i);return t._milliseconds+=n*o._milliseconds,t._days+=n*o._days,t._months+=n*o._months,t._bubble()}function Er(t,e){return Ir(this,t,e,1)}function xr(t,e){return Ir(this,t,e,-1)}function Br(t){return t<0?Math.floor(t):Math.ceil(t)}function kr(){var t,e,i,n,o,r=this._milliseconds,s=this._days,a=this._months,l=this._data;return r>=0&&s>=0&&a>=0||r<=0&&s<=0&&a<=0||(r+=864e5*Br(Dr(a)+s),s=0,a=0),l.milliseconds=r%1e3,t=dt(r/1e3),l.seconds=t%60,e=dt(t/60),l.minutes=e%60,i=dt(e/60),l.hours=i%24,s+=dt(i/24),a+=o=dt(Sr(s)),s-=Br(Dr(o)),n=dt(a/12),a%=12,l.days=s,l.months=a,l.years=n,this}function Sr(t){return 4800*t/146097}function Dr(t){return 146097*t/4800}function Qr(t){if(!this.isValid())return NaN;var e,i,n=this._milliseconds;if("month"===(t=nt(t))||"quarter"===t||"year"===t)switch(e=this._days+n/864e5,i=this._months+Sr(e),t){case"month":return i;case"quarter":return i/3;case"year":return i/12}else switch(e=this._days+Math.round(Dr(this._months)),t){case"week":return e/7+n/6048e5;case"day":return e+n/864e5;case"hour":return 24*e+n/36e5;case"minute":return 1440*e+n/6e4;case"second":return 86400*e+n/1e3;case"millisecond":return Math.floor(864e5*e)+n;default:throw new Error("Unknown unit "+t)}}function Mr(){return this.isValid()?this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*ct(this._months/12):NaN}function Tr(t){return function(){return this.as(t)}}var Or=Tr("ms"),Rr=Tr("s"),Pr=Tr("m"),Nr=Tr("h"),Fr=Tr("d"),Lr=Tr("w"),jr=Tr("M"),zr=Tr("Q"),Ur=Tr("y");function Hr(){return kn(this)}function Gr(t){return t=nt(t),this.isValid()?this[t+"s"]():NaN}function qr(t){return function(){return this.isValid()?this._data[t]:NaN}}var Yr=qr("milliseconds"),$r=qr("seconds"),Wr=qr("minutes"),Vr=qr("hours"),Jr=qr("days"),Kr=qr("months"),Zr=qr("years");function Xr(){return dt(this.days()/7)}var ts=Math.round,es={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function is(t,e,i,n,o){return o.relativeTime(e||1,!!i,t,n)}function ns(t,e,i,n){var o=kn(t).abs(),r=ts(o.as("s")),s=ts(o.as("m")),a=ts(o.as("h")),l=ts(o.as("d")),d=ts(o.as("M")),c=ts(o.as("w")),h=ts(o.as("y")),u=r<=i.ss&&["s",r]||r0,u[4]=n,is.apply(null,u)}function os(t){return void 0===t?ts:"function"==typeof t&&(ts=t,!0)}function rs(t,e){return void 0!==es[t]&&(void 0===e?es[t]:(es[t]=e,"s"===t&&(es.ss=e-1),!0))}function ss(t,e){if(!this.isValid())return this.localeData().invalidDate();var i,n,o=!1,r=es;return"object"==typeof t&&(e=t,t=!1),"boolean"==typeof t&&(o=t),"object"==typeof e&&(r=Object.assign({},es,e),null!=e.s&&null==e.ss&&(r.ss=e.s-1)),n=ns(this,!o,r,i=this.localeData()),o&&(n=i.pastFuture(+this,n)),i.postformat(n)}var as=Math.abs;function ls(t){return(t>0)-(t<0)||+t}function ds(){if(!this.isValid())return this.localeData().invalidDate();var t,e,i,n,o,r,s,a,l=as(this._milliseconds)/1e3,d=as(this._days),c=as(this._months),h=this.asSeconds();return h?(t=dt(l/60),e=dt(t/60),l%=60,t%=60,i=dt(c/12),c%=12,n=l?l.toFixed(3).replace(/\.?0+$/,""):"",o=h<0?"-":"",r=ls(this._months)!==ls(h)?"-":"",s=ls(this._days)!==ls(h)?"-":"",a=ls(this._milliseconds)!==ls(h)?"-":"",o+"P"+(i?r+i+"Y":"")+(c?r+c+"M":"")+(d?s+d+"D":"")+(e||t||l?"T":"")+(e?a+e+"H":"")+(t?a+t+"M":"")+(l?a+n+"S":"")):"P0D"}var cs=sn.prototype;return cs.isValid=on,cs.abs=Cr,cs.add=Er,cs.subtract=xr,cs.as=Qr,cs.asMilliseconds=Or,cs.asSeconds=Rr,cs.asMinutes=Pr,cs.asHours=Nr,cs.asDays=Fr,cs.asWeeks=Lr,cs.asMonths=jr,cs.asQuarters=zr,cs.asYears=Ur,cs.valueOf=Mr,cs._bubble=kr,cs.clone=Hr,cs.get=Gr,cs.milliseconds=Yr,cs.seconds=$r,cs.minutes=Wr,cs.hours=Vr,cs.days=Jr,cs.weeks=Xr,cs.months=Kr,cs.years=Zr,cs.humanize=ss,cs.toISOString=ds,cs.toString=ds,cs.toJSON=ds,cs.locale=so,cs.localeData=lo,cs.toIsoString=E("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",ds),cs.lang=ao,j("X",0,0,"unix"),j("x",0,0,"valueOf"),Ot("x",St),Ot("X",Mt),Lt("X",(function(t,e,i){i._d=new Date(1e3*parseFloat(t))})),Lt("x",(function(t,e,i){i._d=new Date(ct(t))})), +//! moment.js +n.version="2.29.4",o(Wi),n.fn=dr,n.min=Zi,n.max=Xi,n.now=tn,n.utc=p,n.unix=cr,n.months=fr,n.isDate=h,n.locale=pi,n.invalid=v,n.duration=kn,n.isMoment=C,n.weekdays=br,n.parseZone=hr,n.localeData=fi,n.isDuration=an,n.monthsShort=vr,n.weekdaysMin=_r,n.defineLocale=mi,n.updateLocale=gi,n.locales=vi,n.weekdaysShort=yr,n.normalizeUnits=nt,n.relativeTimeRounding=os,n.relativeTimeThreshold=rs,n.calendarFormat=zn,n.prototype=dr,n.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"},n}()}(kE);var SE=kE.exports,DE={exports:{}},QE={},ME={exports:{}},TE={};function OE(){var t={"align-content":!1,"align-items":!1,"align-self":!1,"alignment-adjust":!1,"alignment-baseline":!1,all:!1,"anchor-point":!1,animation:!1,"animation-delay":!1,"animation-direction":!1,"animation-duration":!1,"animation-fill-mode":!1,"animation-iteration-count":!1,"animation-name":!1,"animation-play-state":!1,"animation-timing-function":!1,azimuth:!1,"backface-visibility":!1,background:!0,"background-attachment":!0,"background-clip":!0,"background-color":!0,"background-image":!0,"background-origin":!0,"background-position":!0,"background-repeat":!0,"background-size":!0,"baseline-shift":!1,binding:!1,bleed:!1,"bookmark-label":!1,"bookmark-level":!1,"bookmark-state":!1,border:!0,"border-bottom":!0,"border-bottom-color":!0,"border-bottom-left-radius":!0,"border-bottom-right-radius":!0,"border-bottom-style":!0,"border-bottom-width":!0,"border-collapse":!0,"border-color":!0,"border-image":!0,"border-image-outset":!0,"border-image-repeat":!0,"border-image-slice":!0,"border-image-source":!0,"border-image-width":!0,"border-left":!0,"border-left-color":!0,"border-left-style":!0,"border-left-width":!0,"border-radius":!0,"border-right":!0,"border-right-color":!0,"border-right-style":!0,"border-right-width":!0,"border-spacing":!0,"border-style":!0,"border-top":!0,"border-top-color":!0,"border-top-left-radius":!0,"border-top-right-radius":!0,"border-top-style":!0,"border-top-width":!0,"border-width":!0,bottom:!1,"box-decoration-break":!0,"box-shadow":!0,"box-sizing":!0,"box-snap":!0,"box-suppress":!0,"break-after":!0,"break-before":!0,"break-inside":!0,"caption-side":!1,chains:!1,clear:!0,clip:!1,"clip-path":!1,"clip-rule":!1,color:!0,"color-interpolation-filters":!0,"column-count":!1,"column-fill":!1,"column-gap":!1,"column-rule":!1,"column-rule-color":!1,"column-rule-style":!1,"column-rule-width":!1,"column-span":!1,"column-width":!1,columns:!1,contain:!1,content:!1,"counter-increment":!1,"counter-reset":!1,"counter-set":!1,crop:!1,cue:!1,"cue-after":!1,"cue-before":!1,cursor:!1,direction:!1,display:!0,"display-inside":!0,"display-list":!0,"display-outside":!0,"dominant-baseline":!1,elevation:!1,"empty-cells":!1,filter:!1,flex:!1,"flex-basis":!1,"flex-direction":!1,"flex-flow":!1,"flex-grow":!1,"flex-shrink":!1,"flex-wrap":!1,float:!1,"float-offset":!1,"flood-color":!1,"flood-opacity":!1,"flow-from":!1,"flow-into":!1,font:!0,"font-family":!0,"font-feature-settings":!0,"font-kerning":!0,"font-language-override":!0,"font-size":!0,"font-size-adjust":!0,"font-stretch":!0,"font-style":!0,"font-synthesis":!0,"font-variant":!0,"font-variant-alternates":!0,"font-variant-caps":!0,"font-variant-east-asian":!0,"font-variant-ligatures":!0,"font-variant-numeric":!0,"font-variant-position":!0,"font-weight":!0,grid:!1,"grid-area":!1,"grid-auto-columns":!1,"grid-auto-flow":!1,"grid-auto-rows":!1,"grid-column":!1,"grid-column-end":!1,"grid-column-start":!1,"grid-row":!1,"grid-row-end":!1,"grid-row-start":!1,"grid-template":!1,"grid-template-areas":!1,"grid-template-columns":!1,"grid-template-rows":!1,"hanging-punctuation":!1,height:!0,hyphens:!1,icon:!1,"image-orientation":!1,"image-resolution":!1,"ime-mode":!1,"initial-letters":!1,"inline-box-align":!1,"justify-content":!1,"justify-items":!1,"justify-self":!1,left:!1,"letter-spacing":!0,"lighting-color":!0,"line-box-contain":!1,"line-break":!1,"line-grid":!1,"line-height":!1,"line-snap":!1,"line-stacking":!1,"line-stacking-ruby":!1,"line-stacking-shift":!1,"line-stacking-strategy":!1,"list-style":!0,"list-style-image":!0,"list-style-position":!0,"list-style-type":!0,margin:!0,"margin-bottom":!0,"margin-left":!0,"margin-right":!0,"margin-top":!0,"marker-offset":!1,"marker-side":!1,marks:!1,mask:!1,"mask-box":!1,"mask-box-outset":!1,"mask-box-repeat":!1,"mask-box-slice":!1,"mask-box-source":!1,"mask-box-width":!1,"mask-clip":!1,"mask-image":!1,"mask-origin":!1,"mask-position":!1,"mask-repeat":!1,"mask-size":!1,"mask-source-type":!1,"mask-type":!1,"max-height":!0,"max-lines":!1,"max-width":!0,"min-height":!0,"min-width":!0,"move-to":!1,"nav-down":!1,"nav-index":!1,"nav-left":!1,"nav-right":!1,"nav-up":!1,"object-fit":!1,"object-position":!1,opacity:!1,order:!1,orphans:!1,outline:!1,"outline-color":!1,"outline-offset":!1,"outline-style":!1,"outline-width":!1,overflow:!1,"overflow-wrap":!1,"overflow-x":!1,"overflow-y":!1,padding:!0,"padding-bottom":!0,"padding-left":!0,"padding-right":!0,"padding-top":!0,page:!1,"page-break-after":!1,"page-break-before":!1,"page-break-inside":!1,"page-policy":!1,pause:!1,"pause-after":!1,"pause-before":!1,perspective:!1,"perspective-origin":!1,pitch:!1,"pitch-range":!1,"play-during":!1,position:!1,"presentation-level":!1,quotes:!1,"region-fragment":!1,resize:!1,rest:!1,"rest-after":!1,"rest-before":!1,richness:!1,right:!1,rotation:!1,"rotation-point":!1,"ruby-align":!1,"ruby-merge":!1,"ruby-position":!1,"shape-image-threshold":!1,"shape-outside":!1,"shape-margin":!1,size:!1,speak:!1,"speak-as":!1,"speak-header":!1,"speak-numeral":!1,"speak-punctuation":!1,"speech-rate":!1,stress:!1,"string-set":!1,"tab-size":!1,"table-layout":!1,"text-align":!0,"text-align-last":!0,"text-combine-upright":!0,"text-decoration":!0,"text-decoration-color":!0,"text-decoration-line":!0,"text-decoration-skip":!0,"text-decoration-style":!0,"text-emphasis":!0,"text-emphasis-color":!0,"text-emphasis-position":!0,"text-emphasis-style":!0,"text-height":!0,"text-indent":!0,"text-justify":!0,"text-orientation":!0,"text-overflow":!0,"text-shadow":!0,"text-space-collapse":!0,"text-transform":!0,"text-underline-position":!0,"text-wrap":!0,top:!1,transform:!1,"transform-origin":!1,"transform-style":!1,transition:!1,"transition-delay":!1,"transition-duration":!1,"transition-property":!1,"transition-timing-function":!1,"unicode-bidi":!1,"vertical-align":!1,visibility:!1,"voice-balance":!1,"voice-duration":!1,"voice-family":!1,"voice-pitch":!1,"voice-range":!1,"voice-rate":!1,"voice-stress":!1,"voice-volume":!1,volume:!1,"white-space":!1,widows:!1,width:!0,"will-change":!1,"word-break":!0,"word-spacing":!0,"word-wrap":!0,"wrap-flow":!1,"wrap-through":!1,"writing-mode":!1,"z-index":!1};return t}var RE=/javascript\s*\:/gim;TE.whiteList=OE(),TE.getDefaultWhiteList=OE,TE.onAttr=function(t,e,i){},TE.onIgnoreAttr=function(t,e,i){},TE.safeAttrValue=function(t,e){return RE.test(e)?"":e};var PE={indexOf:function(t,e){var i,n;if(Array.prototype.indexOf)return t.indexOf(e);for(i=0,n=t.length;i/g,ZE=/"/g,XE=/"/g,tx=/&#([a-zA-Z0-9]*);?/gim,ex=/:?/gim,ix=/&newline;?/gim,nx=/((j\s*a\s*v\s*a|v\s*b|l\s*i\s*v\s*e)\s*s\s*c\s*r\s*i\s*p\s*t\s*|m\s*o\s*c\s*h\s*a):/gi,ox=/e\s*x\s*p\s*r\s*e\s*s\s*s\s*i\s*o\s*n\s*\(.*/gi,rx=/u\s*r\s*l\s*\(.*/gi;function sx(t){return t.replace(ZE,""")}function ax(t){return t.replace(XE,'"')}function lx(t){return t.replace(tx,(function(t,e){return"x"===e[0]||"X"===e[0]?String.fromCharCode(parseInt(e.substr(1),16)):String.fromCharCode(parseInt(e,10))}))}function dx(t){return t.replace(ex,":").replace(ix," ")}function cx(t){for(var e="",i=0,n=t.length;i0;e--){var i=t[e];if(" "!==i)return"="===i?e:-1}}function _x(t){return function(t){return'"'===t[0]&&'"'===t[t.length-1]||"'"===t[0]&&"'"===t[t.length-1]}(t)?t.substr(1,t.length-2):t}Ax.parseTag=function(t,e,i){var n="",o=0,r=!1,s=!1,a=0,l=t.length,d="",c="";t:for(a=0;a"===h||a===l-1){n+=i(t.slice(o,r)),d=mx(c=t.slice(r,a+1)),n+=e(r,n.length,d,c,gx(c)),o=a+1,r=!1;continue}if('"'===h||"'"===h)for(var u=1,A=t.charAt(a-u);""===A.trim()||"="===A;){if("="===A){s=h;continue t}A=t.charAt(a-++u)}}else if(h===s){s=!1;continue}}return o";var m=function(t){var e=Bx.spaceIndex(t);if(-1===e)return{html:"",closing:"/"===t[t.length-2]};var i="/"===(t=Bx.trim(t.slice(e+1,-1)))[t.length-1];return i&&(t=Bx.trim(t.slice(0,-1))),{html:t,closing:i}}(h),g=i[c],f=xx(m.html,(function(t,e){var i=-1!==Bx.indexOf(g,t),n=r(c,t,e,i);return kx(n)?i?(e=a(c,t,e,d))?t+'="'+e+'"':t:kx(n=s(c,t,e,i))?void 0:n:n}));return h="<"+c,f&&(h+=" "+f),m.closing&&(h+=" /"),h+=">"}return kx(p=o(c,h,A))?l(h):p}),l);return c&&(h=c.remove(h)),h};var Dx=Sx;!function(t,e){var i=QE,n=Ax,o=Dx;function r(t,e){return new o(e).process(t)}(e=t.exports=r).filterXSS=r,e.FilterXSS=o,function(){for(var t in i)e[t]=i[t];for(var o in n)e[o]=n[o]}(),"undefined"!=typeof window&&(window.filterXSS=t.exports),"undefined"!=typeof self&&"undefined"!=typeof DedicatedWorkerGlobalScope&&self instanceof DedicatedWorkerGlobalScope&&(self.filterXSS=t.exports)}(DE,DE.exports);var Qx=DE.exports,Mx=null; +/** + * vis-timeline and vis-graph2d + * https://visjs.github.io/vis-timeline/ + * + * Create a fully customizable, interactive timeline with items and ranges. + * + * @version 7.7.0 + * @date 2022-07-10T21:34:08.601Z + * + * @copyright (c) 2011-2017 Almende B.V, http://almende.com + * @copyright (c) 2017-2019 visjs contributors, https://github.com/visjs + * + * @license + * vis.js is dual licensed under both + * + * 1. The Apache 2.0 License + * http://www.apache.org/licenses/LICENSE-2.0 + * + * and + * + * 2. The MIT License + * http://opensource.org/licenses/MIT + * + * vis.js may be distributed under either license. + */ +var Tx="undefined"!=typeof window&&window.moment||SE;function Ox(t){if(!t)return!1;let e=t.idProp??t._idProp;return!!e&&function(t,e){return"object"==typeof e&&null!==e&&t===e.idProp&&"function"==typeof e.forEach&&"function"==typeof e.get&&"function"==typeof e.getDataSet&&"function"==typeof e.getIds&&"number"==typeof e.length&&"function"==typeof e.map&&"function"==typeof e.off&&"function"==typeof e.on&&"function"==typeof e.stream&&function(t,e){return"object"==typeof e&&null!==e&&t===e.idProp&&"function"==typeof e.add&&"function"==typeof e.clear&&"function"==typeof e.distinct&&"function"==typeof e.forEach&&"function"==typeof e.get&&"function"==typeof e.getDataSet&&"function"==typeof e.getIds&&"number"==typeof e.length&&"function"==typeof e.map&&"function"==typeof e.max&&"function"==typeof e.min&&"function"==typeof e.off&&"function"==typeof e.on&&"function"==typeof e.remove&&"function"==typeof e.setOptions&&"function"==typeof e.stream&&"function"==typeof e.update&&"function"==typeof e.updateOnly}(t,e.getDataSet())}(e,t)}const Rx=/^\/?Date\((-?\d+)/i,Px=/^\d+$/;function Nx(t,e){let i;if(void 0!==t){if(null===t)return null;if(!e)return t;if("string"!=typeof e&&!(e instanceof String))throw new Error("Type must be a string");switch(e){case"boolean":case"Boolean":return Boolean(t);case"number":case"Number":return bI(t)&&!isNaN(Date.parse(t))?SE(t).valueOf():Number(t.valueOf());case"string":case"String":return String(t);case"Date":try{return Nx(t,"Moment").toDate()}catch(i){throw i instanceof TypeError?new TypeError("Cannot convert object of type "+II(t)+" to type "+e):i}case"Moment":if(vI(t))return SE(t);if(t instanceof Date)return SE(t.valueOf());if(SE.isMoment(t))return SE(t);if(bI(t))return i=Rx.exec(t),i?SE(Number(i[1])):(i=Px.exec(t),SE(i?Number(t):t));throw new TypeError("Cannot convert object of type "+II(t)+" to type "+e);case"ISODate":if(vI(t))return new Date(t);if(t instanceof Date)return t.toISOString();if(SE.isMoment(t))return t.toDate().toISOString();if(bI(t))return i=Rx.exec(t),i?new Date(Number(i[1])).toISOString():SE(t).format();throw new Error("Cannot convert object of type "+II(t)+" to type ISODate");case"ASPDate":if(vI(t))return"/Date("+t+")/";if(t instanceof Date||SE.isMoment(t))return"/Date("+t.valueOf()+")/";if(bI(t)){let e;return i=Rx.exec(t),e=i?new Date(Number(i[1])).valueOf():new Date(t).valueOf(),"/Date("+e+")/"}throw new Error("Cannot convert object of type "+II(t)+" to type ASPDate");default:throw new Error(`Unknown type ${e}`)}}}function Fx(t,e={start:"Date",end:"Date"}){const i=t._idProp,n=new EE({fieldId:i}),o=(r=t,new yE(r)).map((t=>Object.keys(t).reduce(((i,n)=>(i[n]=Nx(t[n],e[n]),i)),{}))).to(n); +/** + * vis-data + * http://visjs.org/ + * + * Manage unstructured data using DataSet. Add, update, and remove data, and listen for changes in the data. + * + * @version 7.1.4 + * @date 2022-03-15T15:23:59.245Z + * + * @copyright (c) 2011-2017 Almende B.V, http://almende.com + * @copyright (c) 2017-2019 visjs contributors, https://github.com/visjs + * + * @license + * vis.js is dual licensed under both + * + * 1. The Apache 2.0 License + * http://www.apache.org/licenses/LICENSE-2.0 + * + * and + * + * 2. The MIT License + * http://opensource.org/licenses/MIT + * + * vis.js may be distributed under either license. + */ +var r;return o.all().start(),{add:(...e)=>t.getDataSet().add(...e),remove:(...e)=>t.getDataSet().remove(...e),update:(...e)=>t.getDataSet().update(...e),updateOnly:(...e)=>t.getDataSet().updateOnly(...e),clear:(...e)=>t.getDataSet().clear(...e),forEach:n.forEach.bind(n),get:n.get.bind(n),getIds:n.getIds.bind(n),off:n.off.bind(n),on:n.on.bind(n),get length(){return n.length},idProp:i,type:e,rawDS:t,coercedDS:n,dispose:()=>o.stop()}}const Lx=t=>{const e=new Qx.FilterXSS(t);return t=>e.process(t)},jx=t=>t;let zx=Lx();const Ux={...tE,convert:Nx,setupXSSProtection:t=>{t&&(!0===t.disabled?(zx=jx,console.warn("You disabled XSS protection for vis-Timeline. I sure hope you know what you're doing!")):t.filterOptions&&(zx=Lx(t.filterOptions)))}};Object.defineProperty(Ux,"xss",{get:function(){return zx}});class Hx{constructor(t,e){this.options=null,this.props=null}setOptions(t){t&&Ux.extend(this.options,t)}redraw(){return!1}destroy(){}_isResized(){const t=this.props._previousWidth!==this.props.width||this.props._previousHeight!==this.props.height;return this.props._previousWidth=this.props.width,this.props._previousHeight=this.props.height,t}}function Gx(t,e,i){if(i&&!Array.isArray(i))return Gx(t,e,[i]);if(e.hiddenDates=[],i&&1==Array.isArray(i)){for(let n=0;nt.start-e.start))}}function qx(t,e,i){if(i&&!Array.isArray(i))return qx(t,e,[i]);if(i&&void 0!==e.domProps.centerContainer.width){Gx(t,e,i);const n=t(e.range.start),o=t(e.range.end),r=(e.range.end-e.range.start)/e.domProps.centerContainer.width;for(let s=0;s=4*r){let t=0;const r=o.clone();switch(i[s].repeat){case"daily":a.day()!=l.day()&&(t=1),a.dayOfYear(n.dayOfYear()),a.year(n.year()),a.subtract(7,"days"),l.dayOfYear(n.dayOfYear()),l.year(n.year()),l.subtract(7-t,"days"),r.add(1,"weeks");break;case"weekly":{const t=l.diff(a,"days"),e=a.day();a.date(n.date()),a.month(n.month()),a.year(n.year()),l=a.clone(),a.day(e),l.day(e),l.add(t,"days"),a.subtract(1,"weeks"),l.subtract(1,"weeks"),r.add(1,"weeks");break}case"monthly":a.month()!=l.month()&&(t=1),a.month(n.month()),a.year(n.year()),a.subtract(1,"months"),l.month(n.month()),l.year(n.year()),l.subtract(1,"months"),l.add(t,"months"),r.add(1,"months");break;case"yearly":a.year()!=l.year()&&(t=1),a.year(n.year()),a.subtract(1,"years"),l.year(n.year()),l.subtract(1,"years"),l.add(t,"years"),r.add(1,"years");break;default:return void console.log("Wrong repeat format, allowed are: daily, weekly, monthly, yearly. Given:",i[s].repeat)}for(;a=e[n].start&&e[t].end<=e[n].end?e[t].remove=!0:e[t].start>=e[n].start&&e[t].start<=e[n].end?(e[n].end=e[t].end,e[t].remove=!0):e[t].end>=e[n].start&&e[t].end<=e[n].end&&(e[n].start=e[t].start,e[t].remove=!0));for(n=0;nt.start-e.start))}(e);const s=Zx(e.range.start,e.hiddenDates),a=Zx(e.range.end,e.hiddenDates);let l=e.range.start,d=e.range.end;1==s.hidden&&(l=1==e.range.startToFront?s.startDate-1:s.endDate+1),1==a.hidden&&(d=1==e.range.endToFront?a.startDate-1:a.endDate+1),1!=s.hidden&&1!=a.hidden||e.range._applyRange(l,d)}}function Yx(t,e,i){let n;if(0==t.body.hiddenDates.length)return n=t.range.conversion(i),(e.valueOf()-n.offset)*n.scale;{const o=Zx(e,t.body.hiddenDates);1==o.hidden&&(e=o.startDate);const r=Wx(t.body.hiddenDates,t.range.start,t.range.end);if(e=e&&s<=i&&(n+=s-r)}return n}(t.body.hiddenDates,e,n.offset);return e=t.options.moment(e).toDate().valueOf(),e+=o,-(n.offset-e.valueOf())*n.scale}if(e>t.range.end){const o={start:t.range.start,end:e};return e=Vx(t.options.moment,t.body.hiddenDates,o,e),n=t.range.conversion(i,r),(e.valueOf()-n.offset)*n.scale}return e=Vx(t.options.moment,t.body.hiddenDates,t.range,e),n=t.range.conversion(i,r),(e.valueOf()-n.offset)*n.scale}}function $x(t,e,i){if(0==t.body.hiddenDates.length){const n=t.range.conversion(i);return new Date(e/n.scale+n.offset)}{const n=Wx(t.body.hiddenDates,t.range.start,t.range.end),o=(t.range.end-t.range.start-n)*e/i,r=function(t,e,i){let n=0,o=0,r=e.start;for(let s=0;s=e.start&&l=i)break;n+=l-a}}return n}(t.body.hiddenDates,t.range,o);return new Date(r+o+t.range.start)}}function Wx(t,e,i){let n=0;for(let o=0;o=e&&s=i.start&&s=s&&(o+=s-r)}return o}function Kx(t,e,i,n){const o=Zx(e,t);return 1==o.hidden?i<0?1==n?o.startDate-(o.endDate-e)-1:o.startDate-1:1==n?o.endDate+(e-o.startDate)+1:o.endDate+1:e}function Zx(t,e){for(let o=0;o=i&&t1e3&&(i=1e3),t.body.dom.rollingModeBtn.style.visibility="hidden",t.currentTimeTimer=setTimeout(e,i)}()}stopRolling(){void 0!==this.currentTimeTimer&&(clearTimeout(this.currentTimeTimer),this.rolling=!1,this.body.dom.rollingModeBtn.style.visibility="visible")}setRange(t,e,i,n,o){i||(i={}),!0!==i.byUser&&(i.byUser=!1);const r=this,s=null!=t?Ux.convert(t,"Date").valueOf():null,a=null!=e?Ux.convert(e,"Date").valueOf():null;if(this._cancelAnimation(),this.millisecondsPerPixelCache=void 0,i.animation){const t=this.start,e=this.end,d="object"==typeof i.animation&&"duration"in i.animation?i.animation.duration:500,c="object"==typeof i.animation&&"easingFunction"in i.animation?i.animation.easingFunction:"easeInOutQuad",h=Ux.easingFunctions[c];if(!h)throw new Error(`Unknown easing function ${JSON.stringify(c)}. Choose from: ${Object.keys(Ux.easingFunctions).join(", ")}`);const u=Date.now();let A=!1;const p=()=>{if(!r.props.touch.dragging){const c=Date.now()-u,m=h(c/d),g=c>d,f=g||null===s?s:t+(s-t)*m,v=g||null===a?a:e+(a-e)*m;l=r._applyRange(f,v),qx(r.options.moment,r.body,r.options.hiddenDates),A=A||l;const b={start:new Date(r.start),end:new Date(r.end),byUser:i.byUser,event:i.event};if(o&&o(m,l,g),l&&r.body.emitter.emit("rangechange",b),g){if(A&&(r.body.emitter.emit("rangechanged",b),n))return n()}else r.animationTimer=setTimeout(p,20)}};return p()}var l=this._applyRange(s,a);if(qx(this.options.moment,this.body,this.options.hiddenDates),l){const t={start:new Date(this.start),end:new Date(this.end),byUser:i.byUser,event:i.event};if(this.body.emitter.emit("rangechange",t),clearTimeout(r.timeoutID),r.timeoutID=setTimeout((()=>{r.body.emitter.emit("rangechanged",t)}),200),n)return n()}}getMillisecondsPerPixel(){return void 0===this.millisecondsPerPixelCache&&(this.millisecondsPerPixelCache=(this.end-this.start)/this.body.dom.center.clientWidth),this.millisecondsPerPixelCache}_cancelAnimation(){this.animationTimer&&(clearTimeout(this.animationTimer),this.animationTimer=null)}_applyRange(t,e){let i=null!=t?Ux.convert(t,"Date").valueOf():this.start,n=null!=e?Ux.convert(e,"Date").valueOf():this.end;const o=null!=this.options.max?Ux.convert(this.options.max,"Date").valueOf():null,r=null!=this.options.min?Ux.convert(this.options.min,"Date").valueOf():null;let s;if(isNaN(i)||null===i)throw new Error(`Invalid start "${t}"`);if(isNaN(n)||null===n)throw new Error(`Invalid end "${e}"`);if(no&&(n=o)),null!==o&&n>o&&(s=n-o,i-=s,n-=s,null!=r&&i=this.start-e&&n<=this.end?(i=this.start,n=this.end):(s=t-(n-i),i-=s/2,n+=s/2)}}if(null!==this.options.zoomMax){let t=parseFloat(this.options.zoomMax);t<0&&(t=0),n-i>t&&(this.end-this.start===t&&ithis.end?(i=this.start,n=this.end):(s=n-i-t,i+=s/2,n-=s/2))}const a=this.start!=i||this.end!=n;return i>=this.start&&i<=this.end||n>=this.start&&n<=this.end||this.start>=i&&this.start<=n||this.end>=i&&this.end<=n||this.body.emitter.emit("checkRangedItems"),this.start=i,this.end=n,a}getRange(){return{start:this.start,end:this.end}}conversion(t,e){return Xx.conversion(this.start,this.end,t,e)}static conversion(t,e,i,n){return void 0===n&&(n=0),0!=i&&e-t!=0?{offset:t,scale:i/(e-t-n)}:{offset:0,scale:1}}_onDragStart(t){this.deltaDifference=0,this.previousDelta=0,this.options.moveable&&this._isInsideRange(t)&&this.props.touch.allowDragging&&(this.stopRolling(),this.props.touch.start=this.start,this.props.touch.end=this.end,this.props.touch.dragging=!0,this.body.dom.root&&(this.body.dom.root.style.cursor="move"))}_onDrag(t){if(!t)return;if(!this.props.touch.dragging)return;if(!this.options.moveable)return;if(!this.props.touch.allowDragging)return;const e=this.options.direction;tB(e);let i="horizontal"==e?t.deltaX:t.deltaY;i-=this.deltaDifference;let n=this.props.touch.end-this.props.touch.start;n-=Wx(this.body.hiddenDates,this.start,this.end);const o="horizontal"==e?this.body.domProps.center.width:this.body.domProps.center.height;let r;r=this.options.rtl?i/o*n:-i/o*n;const s=this.props.touch.start+r,a=this.props.touch.end+r,l=Kx(this.body.hiddenDates,s,this.previousDelta-i,!0),d=Kx(this.body.hiddenDates,a,this.previousDelta-i,!0);if(l!=s||d!=a)return this.deltaDifference+=i,this.props.touch.start=l,this.props.touch.end=d,void this._onDrag(t);this.previousDelta=i,this._applyRange(s,a);const c=new Date(this.start),h=new Date(this.end);this.body.emitter.emit("rangechange",{start:c,end:h,byUser:!0,event:t}),this.body.emitter.emit("panmove")}_onDragEnd(t){this.props.touch.dragging&&this.options.moveable&&this.props.touch.allowDragging&&(this.props.touch.dragging=!1,this.body.dom.root&&(this.body.dom.root.style.cursor="auto"),this.body.emitter.emit("rangechanged",{start:new Date(this.start),end:new Date(this.end),byUser:!0,event:t}))}_onMouseWheel(t){let e=0;if(t.wheelDelta?e=t.wheelDelta/120:t.detail?e=-t.detail/3:t.deltaY&&(e=-t.deltaY/3),!(this.options.zoomKey&&!t[this.options.zoomKey]&&this.options.zoomable||!this.options.zoomable&&this.options.moveable)&&this.options.zoomable&&this.options.moveable&&this._isInsideRange(t)&&e){const i=this.options.zoomFriction||5;let n,o;if(n=e<0?1-e/i:1/(1+e/i),this.rolling){const t=this.options.rollingMode&&this.options.rollingMode.offset||.5;o=this.start+(this.end-this.start)*t}else{const e=this.getPointer({x:t.clientX,y:t.clientY},this.body.dom.center);o=this._pointerToDate(e)}this.zoom(n,o,e,t),t.preventDefault()}}_onTouch(t){this.props.touch.start=this.start,this.props.touch.end=this.end,this.props.touch.allowDragging=!0,this.props.touch.center=null,this.props.touch.centerDate=null,this.scaleOffset=0,this.deltaDifference=0,Ux.preventDefault(t)}_onPinch(t){if(!this.options.zoomable||!this.options.moveable)return;Ux.preventDefault(t),this.props.touch.allowDragging=!1,this.props.touch.center||(this.props.touch.center=this.getPointer(t.center,this.body.dom.center),this.props.touch.centerDate=this._pointerToDate(this.props.touch.center)),this.stopRolling();const e=1/(t.scale+this.scaleOffset),i=this.props.touch.centerDate,n=Wx(this.body.hiddenDates,this.start,this.end),o=Jx(this.options.moment,this.body.hiddenDates,this,i),r=n-o;let s=i-o+(this.props.touch.start-(i-o))*e,a=i+r+(this.props.touch.end-(i+r))*e;this.startToFront=1-e<=0,this.endToFront=e-1<=0;const l=Kx(this.body.hiddenDates,s,1-e,!0),d=Kx(this.body.hiddenDates,a,e-1,!0);l==s&&d==a||(this.props.touch.start=l,this.props.touch.end=d,this.scaleOffset=1-t.scale,s=l,a=d);const c={animation:!1,byUser:!0,event:t};this.setRange(s,a,c),this.startToFront=!1,this.endToFront=!0}_isInsideRange(t){const e=t.center?t.center.x:t.clientX,i=this.body.dom.centerContainer.getBoundingClientRect(),n=this.options.rtl?e-i.left:i.right-e,o=this.body.util.toTime(n);return o>=this.start&&o<=this.end}_pointerToDate(t){let e;const i=this.options.direction;if(tB(i),"horizontal"==i)return this.body.util.toTime(t.x).valueOf();{const i=this.body.domProps.center.height;return e=this.conversion(i),t.y/e.scale+e.offset}}getPointer(t,e){const i=e.getBoundingClientRect();return this.options.rtl?{x:i.right-t.x,y:t.y-i.top}:{x:t.x-i.left,y:t.y-i.top}}zoom(t,e,i,n){null==e&&(e=(this.start+this.end)/2);const o=Wx(this.body.hiddenDates,this.start,this.end),r=Jx(this.options.moment,this.body.hiddenDates,this,e),s=o-r;let a=e-r+(this.start-(e-r))*t,l=e+s+(this.end-(e+s))*t;this.startToFront=!(i>0),this.endToFront=!(-i>0);const d=Kx(this.body.hiddenDates,a,i,!0),c=Kx(this.body.hiddenDates,l,-i,!0);d==a&&c==l||(a=d,l=c);const h={animation:!1,byUser:!0,event:n};this.setRange(a,l,h),this.startToFront=!1,this.endToFront=!0}move(t){const e=this.end-this.start,i=this.start+e*t,n=this.end+e*t;this.start=i,this.end=n}moveTo(t){const e=(this.start+this.end)/2-t,i=this.start-e,n=this.end-e;this.setRange(i,n,{animation:!1,byUser:!0,event:null})}}function tB(t){if("horizontal"!=t&&"vertical"!=t)throw new TypeError(`Unknown direction "${t}". Choose "horizontal" or "vertical".`)}let eB;if("undefined"!=typeof window){eB=function t(e,i){var n=i||{preventDefault:!1};if(e.Manager){var o=e,r=function(e,i){var r=Object.create(n);return i&&o.assign(r,i),t(new o(e,r),r)};return o.assign(r,o),r.Manager=function(e,i){var r=Object.create(n);return i&&o.assign(r,i),t(new o.Manager(e,r),r)},r}var s=Object.create(e),a=e.element;function l(t){return t.match(/[^ ]+/g)}function d(t){if("hammer.input"!==t.type){if(t.srcEvent._handled||(t.srcEvent._handled={}),t.srcEvent._handled[t.type])return;t.srcEvent._handled[t.type]=!0}var e=!1;t.stopPropagation=function(){e=!0};var i=t.srcEvent.stopPropagation.bind(t.srcEvent);"function"==typeof i&&(t.srcEvent.stopPropagation=function(){i(),t.stopPropagation()}),t.firstTarget=Mx;for(var n=Mx;n&&!e;){var o=n.hammer;if(o)for(var r,s=0;s0?s._handlers[t]=n:(e.off(t,d),delete s._handlers[t]))})),s},s.emit=function(t,i){Mx=i.target,e.emit(t,i)},s.destroy=function(){var t=e.element.hammer,i=t.indexOf(s);-1!==i&&t.splice(i,1),t.length||delete e.element.hammer,s._handlers={},e.destroy()},s}(window.Hammer||oI,{preventDefault:"mouse"})}else eB=()=>function(){const t=()=>{};return{on:t,off:t,destroy:t,emit:t,get:e=>({set:t})}}();var iB=eB;function nB(t,e){e.inputHandler=function(t){t.isFirst&&e(t)},t.on("hammer.input",e.inputHandler)}class oB{constructor(t,e,i,n,o){this.moment=o&&o.moment||Tx,this.options=o||{},this.current=this.moment(),this._start=this.moment(),this._end=this.moment(),this.autoScale=!0,this.scale="day",this.step=1,this.setRange(t,e,i),this.switchedDay=!1,this.switchedMonth=!1,this.switchedYear=!1,Array.isArray(n)?this.hiddenDates=n:this.hiddenDates=null!=n?[n]:[],this.format=oB.FORMAT}setMoment(t){this.moment=t,this.current=this.moment(this.current.valueOf()),this._start=this.moment(this._start.valueOf()),this._end=this.moment(this._end.valueOf())}setFormat(t){const e=Ux.deepExtend({},oB.FORMAT);this.format=Ux.deepExtend(e,t)}setRange(t,e,i){if(!(t instanceof Date&&e instanceof Date))throw"No legal start or end date in method setRange";this._start=null!=t?this.moment(t.valueOf()):Date.now(),this._end=null!=e?this.moment(e.valueOf()):Date.now(),this.autoScale&&this.setMinimumStep(i)}start(){this.current=this._start.clone(),this.roundToMinor()}roundToMinor(){switch("week"==this.scale&&this.current.weekday(0),this.scale){case"year":this.current.year(this.step*Math.floor(this.current.year()/this.step)),this.current.month(0);case"month":this.current.date(1);case"week":case"day":case"weekday":this.current.hours(0);case"hour":this.current.minutes(0);case"minute":this.current.seconds(0);case"second":this.current.milliseconds(0)}if(1!=this.step){let t=this.current.clone();switch(this.scale){case"millisecond":this.current.subtract(this.current.milliseconds()%this.step,"milliseconds");break;case"second":this.current.subtract(this.current.seconds()%this.step,"seconds");break;case"minute":this.current.subtract(this.current.minutes()%this.step,"minutes");break;case"hour":this.current.subtract(this.current.hours()%this.step,"hours");break;case"weekday":case"day":this.current.subtract((this.current.date()-1)%this.step,"day");break;case"week":this.current.subtract(this.current.week()%this.step,"week");break;case"month":this.current.subtract(this.current.month()%this.step,"month");break;case"year":this.current.subtract(this.current.year()%this.step,"year")}t.isSame(this.current)||(this.current=this.moment(Kx(this.hiddenDates,this.current.valueOf(),-1,!0)))}}hasNext(){return this.current.valueOf()<=this._end.valueOf()}next(){const t=this.current.valueOf();switch(this.scale){case"millisecond":this.current.add(this.step,"millisecond");break;case"second":this.current.add(this.step,"second");break;case"minute":this.current.add(this.step,"minute");break;case"hour":this.current.add(this.step,"hour"),this.current.month()<6?this.current.subtract(this.current.hours()%this.step,"hour"):this.current.hours()%this.step!=0&&this.current.add(this.step-this.current.hours()%this.step,"hour");break;case"weekday":case"day":this.current.add(this.step,"day");break;case"week":if(0!==this.current.weekday())this.current.weekday(0),this.current.add(this.step,"week");else if(!1===this.options.showMajorLabels)this.current.add(this.step,"week");else{const t=this.current.clone();t.add(1,"week"),t.isSame(this.current,"month")?this.current.add(this.step,"week"):(this.current.add(this.step,"week"),this.current.date(1))}break;case"month":this.current.add(this.step,"month");break;case"year":this.current.add(this.step,"year")}if(1!=this.step)switch(this.scale){case"millisecond":this.current.milliseconds()>0&&this.current.milliseconds()0&&this.current.seconds()0&&this.current.minutes()0&&this.current.hours()=i&&o0?t.step:1,this.autoScale=!1)}setAutoScale(t){this.autoScale=t}setMinimumStep(t){if(null==t)return;const e=31104e6,i=2592e6,n=864e5,o=36e5,r=6e4,s=1e3;1e3*e>t&&(this.scale="year",this.step=1e3),500*e>t&&(this.scale="year",this.step=500),100*e>t&&(this.scale="year",this.step=100),50*e>t&&(this.scale="year",this.step=50),10*e>t&&(this.scale="year",this.step=10),5*e>t&&(this.scale="year",this.step=5),e>t&&(this.scale="year",this.step=1),7776e6>t&&(this.scale="month",this.step=3),i>t&&(this.scale="month",this.step=1),6048e5>t&&this.options.showWeekScale&&(this.scale="week",this.step=1),1728e5>t&&(this.scale="day",this.step=2),n>t&&(this.scale="day",this.step=1),432e5>t&&(this.scale="weekday",this.step=1),144e5>t&&(this.scale="hour",this.step=4),o>t&&(this.scale="hour",this.step=1),9e5>t&&(this.scale="minute",this.step=15),6e5>t&&(this.scale="minute",this.step=10),3e5>t&&(this.scale="minute",this.step=5),r>t&&(this.scale="minute",this.step=1),15e3>t&&(this.scale="second",this.step=15),1e4>t&&(this.scale="second",this.step=10),5e3>t&&(this.scale="second",this.step=5),s>t&&(this.scale="second",this.step=1),200>t&&(this.scale="millisecond",this.step=200),100>t&&(this.scale="millisecond",this.step=100),50>t&&(this.scale="millisecond",this.step=50),10>t&&(this.scale="millisecond",this.step=10),5>t&&(this.scale="millisecond",this.step=5),1>t&&(this.scale="millisecond",this.step=1)}static snap(t,e,i){const n=Tx(t);if("year"==e){const t=n.year()+Math.round(n.month()/12);n.year(Math.round(t/i)*i),n.month(0),n.date(0),n.hours(0),n.minutes(0),n.seconds(0),n.milliseconds(0)}else if("month"==e)n.date()>15?(n.date(1),n.add(1,"month")):n.date(1),n.hours(0),n.minutes(0),n.seconds(0),n.milliseconds(0);else if("week"==e)n.weekday()>2?(n.weekday(0),n.add(1,"week")):n.weekday(0),n.hours(0),n.minutes(0),n.seconds(0),n.milliseconds(0);else if("day"==e){switch(i){case 5:case 2:n.hours(24*Math.round(n.hours()/24));break;default:n.hours(12*Math.round(n.hours()/12))}n.minutes(0),n.seconds(0),n.milliseconds(0)}else if("weekday"==e){switch(i){case 5:case 2:n.hours(12*Math.round(n.hours()/12));break;default:n.hours(6*Math.round(n.hours()/6))}n.minutes(0),n.seconds(0),n.milliseconds(0)}else if("hour"==e){if(4===i)n.minutes(60*Math.round(n.minutes()/60));else n.minutes(30*Math.round(n.minutes()/30));n.seconds(0),n.milliseconds(0)}else if("minute"==e){switch(i){case 15:case 10:n.minutes(5*Math.round(n.minutes()/5)),n.seconds(0);break;case 5:n.seconds(60*Math.round(n.seconds()/60));break;default:n.seconds(30*Math.round(n.seconds()/30))}n.milliseconds(0)}else if("second"==e)switch(i){case 15:case 10:n.seconds(5*Math.round(n.seconds()/5)),n.milliseconds(0);break;case 5:n.milliseconds(1e3*Math.round(n.milliseconds()/1e3));break;default:n.milliseconds(500*Math.round(n.milliseconds()/500))}else if("millisecond"==e){const t=i>5?i/2:1;n.milliseconds(Math.round(n.milliseconds()/t)*t)}return n}isMajor(){if(1==this.switchedYear)switch(this.scale){case"year":case"month":case"week":case"weekday":case"day":case"hour":case"minute":case"second":case"millisecond":return!0;default:return!1}else if(1==this.switchedMonth)switch(this.scale){case"week":case"weekday":case"day":case"hour":case"minute":case"second":case"millisecond":return!0;default:return!1}else if(1==this.switchedDay)switch(this.scale){case"millisecond":case"second":case"minute":case"hour":return!0;default:return!1}const t=this.moment(this.current);switch(this.scale){case"millisecond":return 0==t.milliseconds();case"second":return 0==t.seconds();case"minute":return 0==t.hours()&&0==t.minutes();case"hour":return 0==t.hours();case"weekday":case"day":return this.options.showWeekScale?1==t.isoWeekday():1==t.date();case"week":return 1==t.date();case"month":return 0==t.month();default:return!1}}getLabelMinor(t){if(null==t&&(t=this.current),t instanceof Date&&(t=this.moment(t)),"function"==typeof this.format.minorLabels)return this.format.minorLabels(t,this.scale,this.step);const e=this.format.minorLabels[this.scale];return"week"===this.scale&&1===t.date()&&0!==t.weekday()?"":e&&e.length>0?this.moment(t).format(e):""}getLabelMajor(t){if(null==t&&(t=this.current),t instanceof Date&&(t=this.moment(t)),"function"==typeof this.format.majorLabels)return this.format.majorLabels(t,this.scale,this.step);const e=this.format.majorLabels[this.scale];return e&&e.length>0?this.moment(t).format(e):""}getClassName(){const t=this.moment,e=this.moment(this.current),i=e.locale?e.locale("en"):e.lang("en"),n=this.step,o=[];function r(t){return t/n%2==0?" vis-even":" vis-odd"}function s(e){return e.isSame(Date.now(),"day")?" vis-today":e.isSame(t().add(1,"day"),"day")?" vis-tomorrow":e.isSame(t().add(-1,"day"),"day")?" vis-yesterday":""}function a(t){return t.isSame(Date.now(),"week")?" vis-current-week":""}function l(t){return t.isSame(Date.now(),"month")?" vis-current-month":""}switch(this.scale){case"millisecond":o.push(s(i)),o.push(r(i.milliseconds()));break;case"second":o.push(s(i)),o.push(r(i.seconds()));break;case"minute":o.push(s(i)),o.push(r(i.minutes()));break;case"hour":o.push(`vis-h${i.hours()}${4==this.step?"-h"+(i.hours()+4):""}`),o.push(s(i)),o.push(r(i.hours()));break;case"weekday":o.push(`vis-${i.format("dddd").toLowerCase()}`),o.push(s(i)),o.push(a(i)),o.push(r(i.date()));break;case"day":o.push(`vis-day${i.date()}`),o.push(`vis-${i.format("MMMM").toLowerCase()}`),o.push(s(i)),o.push(l(i)),o.push(this.step<=2?s(i):""),o.push(this.step<=2?`vis-${i.format("dddd").toLowerCase()}`:""),o.push(r(i.date()-1));break;case"week":o.push(`vis-week${i.format("w")}`),o.push(a(i)),o.push(r(i.week()));break;case"month":o.push(`vis-${i.format("MMMM").toLowerCase()}`),o.push(l(i)),o.push(r(i.month()));break;case"year":o.push(`vis-year${i.year()}`),o.push(function(t){return t.isSame(Date.now(),"year")?" vis-current-year":""}(i)),o.push(r(i.year()))}return o.filter(String).join(" ")}}oB.FORMAT={minorLabels:{millisecond:"SSS",second:"s",minute:"HH:mm",hour:"HH:mm",weekday:"ddd D",day:"D",week:"w",month:"MMM",year:"YYYY"},majorLabels:{millisecond:"HH:mm:ss",second:"D MMMM HH:mm",minute:"ddd D MMMM",hour:"ddd D MMMM",weekday:"MMMM YYYY",day:"MMMM YYYY",week:"MMMM YYYY",month:"YYYY",year:""}};class rB extends Hx{constructor(t,e){super(),this.dom={foreground:null,lines:[],majorTexts:[],minorTexts:[],redundant:{lines:[],majorTexts:[],minorTexts:[]}},this.props={range:{start:0,end:0,minimumStep:0},lineTop:0},this.defaultOptions={orientation:{axis:"bottom"},showMinorLabels:!0,showMajorLabels:!0,showWeekScale:!1,maxMinorChars:7,format:Ux.extend({},oB.FORMAT),moment:Tx,timeAxis:null},this.options=Ux.extend({},this.defaultOptions),this.body=t,this._create(),this.setOptions(e)}setOptions(t){t&&(Ux.selectiveExtend(["showMinorLabels","showMajorLabels","showWeekScale","maxMinorChars","hiddenDates","timeAxis","moment","rtl"],this.options,t),Ux.selectiveDeepExtend(["format"],this.options,t),"orientation"in t&&("string"==typeof t.orientation?this.options.orientation.axis=t.orientation:"object"==typeof t.orientation&&"axis"in t.orientation&&(this.options.orientation.axis=t.orientation.axis)),"locale"in t&&("function"==typeof Tx.locale?Tx.locale(t.locale):Tx.lang(t.locale)))}_create(){this.dom.foreground=document.createElement("div"),this.dom.background=document.createElement("div"),this.dom.foreground.className="vis-time-axis vis-foreground",this.dom.background.className="vis-time-axis vis-background"}destroy(){this.dom.foreground.parentNode&&this.dom.foreground.parentNode.removeChild(this.dom.foreground),this.dom.background.parentNode&&this.dom.background.parentNode.removeChild(this.dom.background),this.body=null}redraw(){const t=this.props,e=this.dom.foreground,i=this.dom.background,n="top"==this.options.orientation.axis?this.body.dom.top:this.body.dom.bottom,o=e.parentNode!==n;this._calculateCharSize();const r=this.options.showMinorLabels&&"none"!==this.options.orientation.axis,s=this.options.showMajorLabels&&"none"!==this.options.orientation.axis;t.minorLabelHeight=r?t.minorCharHeight:0,t.majorLabelHeight=s?t.majorCharHeight:0,t.height=t.minorLabelHeight+t.majorLabelHeight,t.width=e.offsetWidth,t.minorLineHeight=this.body.domProps.root.height-t.majorLabelHeight-("top"==this.options.orientation.axis?this.body.domProps.bottom.height:this.body.domProps.top.height),t.minorLineWidth=1,t.majorLineHeight=t.minorLineHeight+t.majorLabelHeight,t.majorLineWidth=1;const a=e.nextSibling,l=i.nextSibling;return e.parentNode&&e.parentNode.removeChild(e),i.parentNode&&i.parentNode.removeChild(i),e.style.height=`${this.props.height}px`,this._repaintLabels(),a?n.insertBefore(e,a):n.appendChild(e),l?this.body.dom.backgroundVertical.insertBefore(i,l):this.body.dom.backgroundVertical.appendChild(i),this._isResized()||o}_repaintLabels(){const t=this.options.orientation.axis,e=Ux.convert(this.body.range.start,"Number"),i=Ux.convert(this.body.range.end,"Number"),n=this.body.util.toTime((this.props.minorCharWidth||10)*this.options.maxMinorChars).valueOf();let o=n-Jx(this.options.moment,this.body.hiddenDates,this.body.range,n);o-=this.body.util.toTime(0).valueOf();const r=new oB(new Date(e),new Date(i),o,this.body.hiddenDates,this.options);r.setMoment(this.options.moment),this.options.format&&r.setFormat(this.options.format),this.options.timeAxis&&r.setScale(this.options.timeAxis),this.step=r;const s=this.dom;let a,l,d,c,h,u;s.redundant.lines=s.lines,s.redundant.majorTexts=s.majorTexts,s.redundant.minorTexts=s.minorTexts,s.lines=[],s.majorTexts=[],s.minorTexts=[];let A,p,m,g=0,f=0;const v=1e3;let b;for(r.start(),l=r.getCurrent(),c=this.body.util.toScreen(l);r.hasNext()&&f=.4*A;if(this.options.showMinorLabels&&u){var y=this._repaintMinorText(d,r.getLabelMinor(a),t,b);y.style.width=`${g}px`}h&&this.options.showMajorLabels?(d>0&&(null==m&&(m=d),y=this._repaintMajorText(d,r.getLabelMajor(a),t,b)),p=this._repaintMajorLine(d,g,t,b)):u?p=this._repaintMinorLine(d,g,t,b):p&&(p.style.width=`${parseInt(p.style.width)+g}px`)}if(f!==v||sB||(console.warn("Something is wrong with the Timeline scale. Limited drawing of grid lines to 1000 lines."),sB=!0),this.options.showMajorLabels){const e=this.body.util.toTime(0),i=r.getLabelMajor(e),n=i.length*(this.props.majorCharWidth||10)+10;(null==m||n{for(;t.length;){const e=t.pop();e&&e.parentNode&&e.parentNode.removeChild(e)}}))}_repaintMinorText(t,e,i,n){let o=this.dom.redundant.minorTexts.shift();if(!o){const t=document.createTextNode("");o=document.createElement("div"),o.appendChild(t),this.dom.foreground.appendChild(o)}this.dom.minorTexts.push(o),o.innerHTML=Ux.xss(e);let r="top"==i?this.props.majorLabelHeight:0;return this._setXY(o,t,r),o.className=`vis-text vis-minor ${n}`,o}_repaintMajorText(t,e,i,n){let o=this.dom.redundant.majorTexts.shift();if(!o){const t=document.createElement("div");o=document.createElement("div"),o.appendChild(t),this.dom.foreground.appendChild(o)}o.childNodes[0].innerHTML=Ux.xss(e),o.className=`vis-text vis-major ${n}`;let r="top"==i?0:this.props.minorLabelHeight;return this._setXY(o,t,r),this.dom.majorTexts.push(o),o}_setXY(t,e,i){const n=this.options.rtl?-1*e:e;t.style.transform=`translate(${n}px, ${i}px)`}_repaintMinorLine(t,e,i,n){let o=this.dom.redundant.lines.shift();o||(o=document.createElement("div"),this.dom.background.appendChild(o)),this.dom.lines.push(o);const r=this.props;o.style.width=`${e}px`,o.style.height=`${r.minorLineHeight}px`;let s="top"==i?r.majorLabelHeight:this.body.domProps.top.height,a=t-r.minorLineWidth/2;return this._setXY(o,a,s),o.className=`vis-grid ${this.options.rtl?"vis-vertical-rtl":"vis-vertical"} vis-minor ${n}`,o}_repaintMajorLine(t,e,i,n){let o=this.dom.redundant.lines.shift();o||(o=document.createElement("div"),this.dom.background.appendChild(o)),this.dom.lines.push(o);const r=this.props;o.style.width=`${e}px`,o.style.height=`${r.majorLineHeight}px`;let s="top"==i?0:this.body.domProps.top.height,a=t-r.majorLineWidth/2;return this._setXY(o,a,s),o.className=`vis-grid ${this.options.rtl?"vis-vertical-rtl":"vis-vertical"} vis-major ${n}`,o}_calculateCharSize(){this.dom.measureCharMinor||(this.dom.measureCharMinor=document.createElement("DIV"),this.dom.measureCharMinor.className="vis-text vis-minor vis-measure",this.dom.measureCharMinor.style.position="absolute",this.dom.measureCharMinor.appendChild(document.createTextNode("0")),this.dom.foreground.appendChild(this.dom.measureCharMinor)),this.props.minorCharHeight=this.dom.measureCharMinor.clientHeight,this.props.minorCharWidth=this.dom.measureCharMinor.clientWidth,this.dom.measureCharMajor||(this.dom.measureCharMajor=document.createElement("DIV"),this.dom.measureCharMajor.className="vis-text vis-major vis-measure",this.dom.measureCharMajor.style.position="absolute",this.dom.measureCharMajor.appendChild(document.createTextNode("0")),this.dom.foreground.appendChild(this.dom.measureCharMajor)),this.props.majorCharHeight=this.dom.measureCharMajor.clientHeight,this.props.majorCharWidth=this.dom.measureCharMajor.clientWidth}}var sB=!1;function aB(t){this.active=!1,this.dom={container:t},this.dom.overlay=document.createElement("div"),this.dom.overlay.className="vis-overlay",this.dom.container.appendChild(this.dom.overlay),this.hammer=iB(this.dom.overlay),this.hammer.on("tap",this._onTapOverlay.bind(this));var e=this;["tap","doubletap","press","pinch","pan","panstart","panmove","panend"].forEach((function(t){e.hammer.on(t,(function(t){t.stopPropagation()}))})),document&&document.body&&(this.onClick=function(i){(function(t,e){for(;t;){if(t===e)return!0;t=t.parentNode}return!1})(i.target,t)||e.deactivate()},document.body.addEventListener("click",this.onClick)),void 0!==this.keycharm&&this.keycharm.destroy(),this.keycharm=function(t){var e,i=t&&t.preventDefault||!1,n=t&&t.container||window,o={},r={keydown:{},keyup:{}},s={};for(e=97;e<=122;e++)s[String.fromCharCode(e)]={code:e-97+65,shift:!1};for(e=65;e<=90;e++)s[String.fromCharCode(e)]={code:e,shift:!0};for(e=0;e<=9;e++)s[""+e]={code:48+e,shift:!1};for(e=1;e<=12;e++)s["F"+e]={code:111+e,shift:!1};for(e=0;e<=9;e++)s["num"+e]={code:96+e,shift:!1};s["num*"]={code:106,shift:!1},s["num+"]={code:107,shift:!1},s["num-"]={code:109,shift:!1},s["num/"]={code:111,shift:!1},s["num."]={code:110,shift:!1},s.left={code:37,shift:!1},s.up={code:38,shift:!1},s.right={code:39,shift:!1},s.down={code:40,shift:!1},s.space={code:32,shift:!1},s.enter={code:13,shift:!1},s.shift={code:16,shift:void 0},s.esc={code:27,shift:!1},s.backspace={code:8,shift:!1},s.tab={code:9,shift:!1},s.ctrl={code:17,shift:!1},s.alt={code:18,shift:!1},s.delete={code:46,shift:!1},s.pageup={code:33,shift:!1},s.pagedown={code:34,shift:!1},s["="]={code:187,shift:!1},s["-"]={code:189,shift:!1},s["]"]={code:221,shift:!1},s["["]={code:219,shift:!1};var a=function(t){d(t,"keydown")},l=function(t){d(t,"keyup")},d=function(t,e){if(void 0!==r[e][t.keyCode]){for(var n=r[e][t.keyCode],o=0;o{this.options.locales[t]=Ux.extend({},i,this.options.locales[t])})),e&&null!=e.time?this.customTime=e.time:this.customTime=new Date,this.eventParams={},this._create()}setOptions(t){t&&Ux.selectiveExtend(["moment","locale","locales","id","title","rtl","snap"],this.options,t)}_create(){const t=document.createElement("div");t["custom-time"]=this,t.className=`vis-custom-time ${this.options.id||""}`,t.style.position="absolute",t.style.top="0px",t.style.height="100%",this.bar=t;const e=document.createElement("div");function i(t){this.body.range._onMouseWheel(t)}e.style.position="relative",e.style.top="0px",this.options.rtl?e.style.right="-10px":e.style.left="-10px",e.style.height="100%",e.style.width="20px",e.addEventListener?(e.addEventListener("mousewheel",i.bind(this),!1),e.addEventListener("DOMMouseScroll",i.bind(this),!1)):e.attachEvent("onmousewheel",i.bind(this)),t.appendChild(e),this.hammer=new iB(e),this.hammer.on("panstart",this._onDragStart.bind(this)),this.hammer.on("panmove",this._onDrag.bind(this)),this.hammer.on("panend",this._onDragEnd.bind(this)),this.hammer.get("pan").set({threshold:5,direction:iB.DIRECTION_ALL}),this.hammer.get("press").set({time:1e4})}destroy(){this.hide(),this.hammer.destroy(),this.hammer=null,this.body=null}redraw(){const t=this.body.dom.backgroundVertical;this.bar.parentNode!=t&&(this.bar.parentNode&&this.bar.parentNode.removeChild(this.bar),t.appendChild(this.bar));const e=this.body.util.toScreen(this.customTime);let i=this.options.locales[this.options.locale];i||(this.warned||(console.warn(`WARNING: options.locales['${this.options.locale}'] not found. See https://visjs.github.io/vis-timeline/docs/timeline/#Localization`),this.warned=!0),i=this.options.locales.en);let n=this.options.title;return void 0===n?(n=`${i.time}: ${this.options.moment(this.customTime).format("dddd, MMMM Do YYYY, H:mm:ss")}`,n=n.charAt(0).toUpperCase()+n.substring(1)):"function"==typeof n&&(n=n.call(this,this.customTime)),this.options.rtl?this.bar.style.right=`${e}px`:this.bar.style.left=`${e}px`,this.bar.title=n,!1}hide(){this.bar.parentNode&&this.bar.parentNode.removeChild(this.bar)}setCustomTime(t){this.customTime=Ux.convert(t,"Date"),this.redraw()}getCustomTime(){return new Date(this.customTime.valueOf())}setCustomMarker(t,e){const i=document.createElement("div");i.className="vis-custom-time-marker",i.innerHTML=Ux.xss(t),i.style.position="absolute",e&&(i.setAttribute("contenteditable","true"),i.addEventListener("pointerdown",(function(){i.focus()})),i.addEventListener("input",this._onMarkerChange.bind(this)),i.title=t,i.addEventListener("blur",function(t){this.title!=t.target.innerHTML&&(this._onMarkerChanged(t),this.title=t.target.innerHTML)}.bind(this))),this.bar.appendChild(i)}setCustomTitle(t){this.options.title=t}_onDragStart(t){this.eventParams.dragging=!0,this.eventParams.customTime=this.customTime,t.stopPropagation()}_onDrag(t){if(!this.eventParams.dragging)return;let e=this.options.rtl?-1*t.deltaX:t.deltaX;const i=this.body.util.toScreen(this.eventParams.customTime)+e,n=this.body.util.toTime(i),o=this.body.util.getScale(),r=this.body.util.getStep(),s=this.options.snap,a=s?s(n,o,r):n;this.setCustomTime(a),this.body.emitter.emit("timechange",{id:this.options.id,time:new Date(this.customTime.valueOf()),event:t}),t.stopPropagation()}_onDragEnd(t){this.eventParams.dragging&&(this.body.emitter.emit("timechanged",{id:this.options.id,time:new Date(this.customTime.valueOf()),event:t}),t.stopPropagation())}_onMarkerChange(t){this.body.emitter.emit("markerchange",{id:this.options.id,title:t.target.innerHTML,event:t}),t.stopPropagation()}_onMarkerChanged(t){this.body.emitter.emit("markerchanged",{id:this.options.id,title:t.target.innerHTML,event:t}),t.stopPropagation()}static customTimeFromTarget(t){let e=t.target;for(;e;){if(e.hasOwnProperty("custom-time"))return e["custom-time"];e=e.parentNode}return null}}class IB{_create(t){this.dom={},this.dom.container=t,this.dom.container.style.position="relative",this.dom.root=document.createElement("div"),this.dom.background=document.createElement("div"),this.dom.backgroundVertical=document.createElement("div"),this.dom.backgroundHorizontal=document.createElement("div"),this.dom.centerContainer=document.createElement("div"),this.dom.leftContainer=document.createElement("div"),this.dom.rightContainer=document.createElement("div"),this.dom.center=document.createElement("div"),this.dom.left=document.createElement("div"),this.dom.right=document.createElement("div"),this.dom.top=document.createElement("div"),this.dom.bottom=document.createElement("div"),this.dom.shadowTop=document.createElement("div"),this.dom.shadowBottom=document.createElement("div"),this.dom.shadowTopLeft=document.createElement("div"),this.dom.shadowBottomLeft=document.createElement("div"),this.dom.shadowTopRight=document.createElement("div"),this.dom.shadowBottomRight=document.createElement("div"),this.dom.rollingModeBtn=document.createElement("div"),this.dom.loadingScreen=document.createElement("div"),this.dom.root.className="vis-timeline",this.dom.background.className="vis-panel vis-background",this.dom.backgroundVertical.className="vis-panel vis-background vis-vertical",this.dom.backgroundHorizontal.className="vis-panel vis-background vis-horizontal",this.dom.centerContainer.className="vis-panel vis-center",this.dom.leftContainer.className="vis-panel vis-left",this.dom.rightContainer.className="vis-panel vis-right",this.dom.top.className="vis-panel vis-top",this.dom.bottom.className="vis-panel vis-bottom",this.dom.left.className="vis-content",this.dom.center.className="vis-content",this.dom.right.className="vis-content",this.dom.shadowTop.className="vis-shadow vis-top",this.dom.shadowBottom.className="vis-shadow vis-bottom",this.dom.shadowTopLeft.className="vis-shadow vis-top",this.dom.shadowBottomLeft.className="vis-shadow vis-bottom",this.dom.shadowTopRight.className="vis-shadow vis-top",this.dom.shadowBottomRight.className="vis-shadow vis-bottom",this.dom.rollingModeBtn.className="vis-rolling-mode-btn",this.dom.loadingScreen.className="vis-loading-screen",this.dom.root.appendChild(this.dom.background),this.dom.root.appendChild(this.dom.backgroundVertical),this.dom.root.appendChild(this.dom.backgroundHorizontal),this.dom.root.appendChild(this.dom.centerContainer),this.dom.root.appendChild(this.dom.leftContainer),this.dom.root.appendChild(this.dom.rightContainer),this.dom.root.appendChild(this.dom.top),this.dom.root.appendChild(this.dom.bottom),this.dom.root.appendChild(this.dom.rollingModeBtn),this.dom.centerContainer.appendChild(this.dom.center),this.dom.leftContainer.appendChild(this.dom.left),this.dom.rightContainer.appendChild(this.dom.right),this.dom.centerContainer.appendChild(this.dom.shadowTop),this.dom.centerContainer.appendChild(this.dom.shadowBottom),this.dom.leftContainer.appendChild(this.dom.shadowTopLeft),this.dom.leftContainer.appendChild(this.dom.shadowBottomLeft),this.dom.rightContainer.appendChild(this.dom.shadowTopRight),this.dom.rightContainer.appendChild(this.dom.shadowBottomRight),this.props={root:{},background:{},centerContainer:{},leftContainer:{},rightContainer:{},center:{},left:{},right:{},top:{},bottom:{},border:{},scrollTop:0,scrollTopMin:0},this.on("rangechange",(()=>{!0===this.initialDrawDone&&this._redraw()})),this.on("rangechanged",(()=>{this.initialRangeChangeDone||(this.initialRangeChangeDone=!0)})),this.on("touch",this._onTouch.bind(this)),this.on("panmove",this._onDrag.bind(this));const e=this;this._origRedraw=this._redraw.bind(this),this._redraw=Ux.throttle(this._origRedraw),this.on("_change",(t=>{e.itemSet&&e.itemSet.initialItemSetDrawn&&t&&1==t.queue?e._redraw():e._origRedraw()})),this.hammer=new iB(this.dom.root);const i=this.hammer.get("pinch").set({enable:!0});i&&function(t){t.getTouchAction=function(){return["pan-y"]}}(i),this.hammer.get("pan").set({threshold:5,direction:iB.DIRECTION_ALL}),this.timelineListeners={};var n,o;function r(t){this.isActive()&&this.emit("mousewheel",t);let e=0,i=0;if("detail"in t&&(i=-1*t.detail),"wheelDelta"in t&&(i=t.wheelDelta),"wheelDeltaY"in t&&(i=t.wheelDeltaY),"wheelDeltaX"in t&&(e=-1*t.wheelDeltaX),"axis"in t&&t.axis===t.HORIZONTAL_AXIS&&(e=-1*i,i=0),"deltaY"in t&&(i=-1*t.deltaY),"deltaX"in t&&(e=t.deltaX),t.deltaMode&&(1===t.deltaMode?(e*=40,i*=40):(e*=40,i*=800)),this.options.preferZoom){if(!this.options.zoomKey||t[this.options.zoomKey])return}else if(this.options.zoomKey&&t[this.options.zoomKey])return;if(this.options.verticalScroll||this.options.horizontalScroll)if(this.options.verticalScroll&&Math.abs(i)>=Math.abs(e)){const e=this.props.scrollTop,n=e+i;if(this.isActive()){this._setScrollTop(n)!==e&&(this._redraw(),this.emit("scroll",t),t.preventDefault())}}else if(this.options.horizontalScroll){const n=(Math.abs(e)>=Math.abs(i)?e:i)/120*(this.range.end-this.range.start)/20,o=this.range.start+n,r=this.range.end+n,s={animation:!1,byUser:!0,event:t};this.range.setRange(o,r,s),t.preventDefault()}}["tap","doubletap","press","pinch","pan","panstart","panmove","panend"].forEach((t=>{const i=i=>{e.isActive()&&e.emit(t,i)};e.hammer.on(t,i),e.timelineListeners[t]=i})),nB(this.hammer,(t=>{e.emit("touch",t)})),n=this.hammer,(o=t=>{e.emit("release",t)}).inputHandler=function(t){t.isFinal&&o(t)},n.on("hammer.input",o.inputHandler);const s="onwheel"in document.createElement("div")?"wheel":void 0!==document.onmousewheel?"mousewheel":this.dom.centerContainer.addEventListener?"DOMMouseScroll":"onmousewheel";function a(t){if(e.options.verticalScroll&&(t.preventDefault(),e.isActive())){const i=-t.target.scrollTop;e._setScrollTop(i),e._redraw(),e.emit("scrollSide",t)}}this.dom.top.addEventListener,this.dom.bottom.addEventListener,this.dom.centerContainer.addEventListener(s,r.bind(this),!1),this.dom.top.addEventListener(s,r.bind(this),!1),this.dom.bottom.addEventListener(s,r.bind(this),!1),this.dom.left.parentNode.addEventListener("scroll",a.bind(this)),this.dom.right.parentNode.addEventListener("scroll",a.bind(this));let l=!1;if(this.dom.center.addEventListener("dragover",function(t){if(t.preventDefault&&(e.emit("dragover",e.getEventProperties(t)),t.preventDefault()),t.target.className.indexOf("timeline")>-1&&!l)return t.dataTransfer.dropEffect="move",l=!0,!1}.bind(this),!1),this.dom.center.addEventListener("drop",function(t){t.preventDefault&&t.preventDefault(),t.stopPropagation&&t.stopPropagation();try{var i=JSON.parse(t.dataTransfer.getData("text"));if(!i||!i.content)return}catch(t){return!1}return l=!1,t.center={x:t.clientX,y:t.clientY},"item"!==i.target?e.itemSet._onAddItem(t):e.itemSet._onDropObjectOnItem(t),e.emit("drop",e.getEventProperties(t)),!1}.bind(this),!1),this.customTimes=[],this.touch={},this.redrawCount=0,this.initialDrawDone=!1,this.initialRangeChangeDone=!1,!t)throw new Error("No container provided");t.appendChild(this.dom.root),t.appendChild(this.dom.loadingScreen)}setOptions(t){if(t){const e=["width","height","minHeight","maxHeight","autoResize","start","end","clickToUse","dataAttributes","hiddenDates","locale","locales","moment","preferZoom","rtl","zoomKey","horizontalScroll","verticalScroll","longSelectPressTime","snap"];if(Ux.selectiveExtend(e,this.options,t),this.dom.rollingModeBtn.style.visibility="hidden",this.options.rtl&&(this.dom.container.style.direction="rtl",this.dom.backgroundVertical.className="vis-panel vis-background vis-vertical-rtl"),this.options.verticalScroll&&(this.options.rtl?this.dom.rightContainer.className="vis-panel vis-right vis-vertical-scroll":this.dom.leftContainer.className="vis-panel vis-left vis-vertical-scroll"),"object"!=typeof this.options.orientation&&(this.options.orientation={item:void 0,axis:void 0}),"orientation"in t&&("string"==typeof t.orientation?this.options.orientation={item:t.orientation,axis:t.orientation}:"object"==typeof t.orientation&&("item"in t.orientation&&(this.options.orientation.item=t.orientation.item),"axis"in t.orientation&&(this.options.orientation.axis=t.orientation.axis))),"both"===this.options.orientation.axis){if(!this.timeAxis2){const t=this.timeAxis2=new rB(this.body);t.setOptions=e=>{const i=e?Ux.extend({},e):{};i.orientation="top",rB.prototype.setOptions.call(t,i)},this.components.push(t)}}else if(this.timeAxis2){const t=this.components.indexOf(this.timeAxis2);-1!==t&&this.components.splice(t,1),this.timeAxis2.destroy(),this.timeAxis2=null}"function"==typeof t.drawPoints&&(t.drawPoints={onRender:t.drawPoints}),"hiddenDates"in this.options&&Gx(this.options.moment,this.body,this.options.hiddenDates),"clickToUse"in t&&(t.clickToUse?this.activator||(this.activator=new aB(this.dom.root)):this.activator&&(this.activator.destroy(),delete this.activator)),this._initAutoResize()}if(this.components.forEach((e=>e.setOptions(t))),"configure"in t){this.configurator||(this.configurator=this._createConfigurator()),this.configurator.setOptions(t.configure);const e=Ux.deepExtend({},this.options);this.components.forEach((t=>{Ux.deepExtend(e,t.options)})),this.configurator.setModuleOptions({global:e})}this._redraw()}isActive(){return!this.activator||this.activator.active}destroy(){this.setItems(null),this.setGroups(null),this.off(),this._stopAutoResize(),this.dom.root.parentNode&&this.dom.root.parentNode.removeChild(this.dom.root),this.dom=null,this.activator&&(this.activator.destroy(),delete this.activator);for(const t in this.timelineListeners)this.timelineListeners.hasOwnProperty(t)&&delete this.timelineListeners[t];this.timelineListeners=null,this.hammer&&this.hammer.destroy(),this.hammer=null,this.components.forEach((t=>t.destroy())),this.body=null}setCustomTime(t,e){const i=this.customTimes.filter((t=>e===t.options.id));if(0===i.length)throw new Error(`No custom time bar found with id ${JSON.stringify(e)}`);i.length>0&&i[0].setCustomTime(t)}getCustomTime(t){const e=this.customTimes.filter((e=>e.options.id===t));if(0===e.length)throw new Error(`No custom time bar found with id ${JSON.stringify(t)}`);return e[0].getCustomTime()}setCustomTimeMarker(t,e,i){const n=this.customTimes.filter((t=>t.options.id===e));if(0===n.length)throw new Error(`No custom time bar found with id ${JSON.stringify(e)}`);n.length>0&&n[0].setCustomMarker(t,i)}setCustomTimeTitle(t,e){const i=this.customTimes.filter((t=>t.options.id===e));if(0===i.length)throw new Error(`No custom time bar found with id ${JSON.stringify(e)}`);if(i.length>0)return i[0].setCustomTitle(t)}getEventProperties(t){return{event:t}}addCustomTime(t,e){const i=void 0!==t?Ux.convert(t,"Date"):new Date,n=this.customTimes.some((t=>t.options.id===e));if(n)throw new Error(`A custom time with id ${JSON.stringify(e)} already exists`);const o=new CB(this.body,Ux.extend({},this.options,{time:i,id:e,snap:this.itemSet?this.itemSet.options.snap:this.options.snap}));return this.customTimes.push(o),this.components.push(o),this._redraw(),e}removeCustomTime(t){const e=this.customTimes.filter((e=>e.options.id===t));if(0===e.length)throw new Error(`No custom time bar found with id ${JSON.stringify(t)}`);e.forEach((t=>{this.customTimes.splice(this.customTimes.indexOf(t),1),this.components.splice(this.components.indexOf(t),1),t.destroy()}))}getVisibleItems(){return this.itemSet&&this.itemSet.getVisibleItems()||[]}getItemsAtCurrentTime(t){return this.time=t,this.itemSet&&this.itemSet.getItemsAtCurrentTime(this.time)||[]}getVisibleGroups(){return this.itemSet&&this.itemSet.getVisibleGroups()||[]}fit(t,e){const i=this.getDataRange();if(null===i.min&&null===i.max)return;const n=i.max-i.min,o=new Date(i.min.valueOf()-.01*n),r=new Date(i.max.valueOf()+.01*n),s=!t||void 0===t.animation||t.animation;this.range.setRange(o,r,{animation:s},e)}getDataRange(){throw new Error("Cannot invoke abstract method getDataRange")}setWindow(t,e,i,n){let o,r;"function"==typeof arguments[2]&&(n=arguments[2],i={}),1==arguments.length?(r=arguments[0],o=void 0===r.animation||r.animation,this.range.setRange(r.start,r.end,{animation:o})):2==arguments.length&&"function"==typeof arguments[1]?(r=arguments[0],n=arguments[1],o=void 0===r.animation||r.animation,this.range.setRange(r.start,r.end,{animation:o},n)):(o=!i||void 0===i.animation||i.animation,this.range.setRange(t,e,{animation:o},n))}moveTo(t,e,i){"function"==typeof arguments[1]&&(i=arguments[1],e={});const n=this.range.end-this.range.start,o=Ux.convert(t,"Date").valueOf(),r=o-n/2,s=o+n/2,a=!e||void 0===e.animation||e.animation;this.range.setRange(r,s,{animation:a},i)}getWindow(){const t=this.range.getRange();return{start:new Date(t.start),end:new Date(t.end)}}zoomIn(t,e,i){if(!t||t<0||t>1)return;"function"==typeof arguments[1]&&(i=arguments[1],e={});const n=this.getWindow(),o=n.start.valueOf(),r=n.end.valueOf(),s=r-o,a=(s-s/(1+t))/2,l=o+a,d=r-a;this.setWindow(l,d,e,i)}zoomOut(t,e,i){if(!t||t<0||t>1)return;"function"==typeof arguments[1]&&(i=arguments[1],e={});const n=this.getWindow(),o=n.start.valueOf(),r=n.end.valueOf(),s=r-o,a=o-s*t/2,l=r+s*t/2;this.setWindow(a,l,e,i)}redraw(){this._redraw()}_redraw(){this.redrawCount++;const t=this.dom;if(!t||!t.container||0==t.root.offsetWidth)return;let e=!1;const i=this.options,n=this.props;qx(this.options.moment,this.body,this.options.hiddenDates),"top"==i.orientation?(Ux.addClassName(t.root,"vis-top"),Ux.removeClassName(t.root,"vis-bottom")):(Ux.removeClassName(t.root,"vis-top"),Ux.addClassName(t.root,"vis-bottom")),i.rtl?(Ux.addClassName(t.root,"vis-rtl"),Ux.removeClassName(t.root,"vis-ltr")):(Ux.addClassName(t.root,"vis-ltr"),Ux.removeClassName(t.root,"vis-rtl")),t.root.style.maxHeight=Ux.option.asSize(i.maxHeight,""),t.root.style.minHeight=Ux.option.asSize(i.minHeight,""),t.root.style.width=Ux.option.asSize(i.width,"");const o=t.root.offsetWidth;n.border.left=1,n.border.right=1,n.border.top=1,n.border.bottom=1,n.center.height=t.center.offsetHeight,n.left.height=t.left.offsetHeight,n.right.height=t.right.offsetHeight,n.top.height=t.top.clientHeight||-n.border.top,n.bottom.height=Math.round(t.bottom.getBoundingClientRect().height)||t.bottom.clientHeight||-n.border.bottom;const r=Math.max(n.left.height,n.center.height,n.right.height),s=n.top.height+r+n.bottom.height+n.border.top+n.border.bottom;t.root.style.height=Ux.option.asSize(i.height,`${s}px`),n.root.height=t.root.offsetHeight,n.background.height=n.root.height;const a=n.root.height-n.top.height-n.bottom.height;n.centerContainer.height=a,n.leftContainer.height=a,n.rightContainer.height=n.leftContainer.height,n.root.width=o,n.background.width=n.root.width,this.initialDrawDone||(n.scrollbarWidth=Ux.getScrollBarWidth());const l=t.leftContainer.clientWidth,d=t.rightContainer.clientWidth;i.verticalScroll?i.rtl?(n.left.width=l||-n.border.left,n.right.width=d+n.scrollbarWidth||-n.border.right):(n.left.width=l+n.scrollbarWidth||-n.border.left,n.right.width=d||-n.border.right):(n.left.width=l||-n.border.left,n.right.width=d||-n.border.right),this._setDOM();let c=this._updateScrollTop();"top"!=i.orientation.item&&(c+=Math.max(n.centerContainer.height-n.center.height-n.border.top-n.border.bottom,0)),t.center.style.transform=`translateY(${c}px)`;const h=0==n.scrollTop?"hidden":"",u=n.scrollTop==n.scrollTopMin?"hidden":"";t.shadowTop.style.visibility=h,t.shadowBottom.style.visibility=u,t.shadowTopLeft.style.visibility=h,t.shadowBottomLeft.style.visibility=u,t.shadowTopRight.style.visibility=h,t.shadowBottomRight.style.visibility=u,i.verticalScroll&&(t.rightContainer.className="vis-panel vis-right vis-vertical-scroll",t.leftContainer.className="vis-panel vis-left vis-vertical-scroll",t.shadowTopRight.style.visibility="hidden",t.shadowBottomRight.style.visibility="hidden",t.shadowTopLeft.style.visibility="hidden",t.shadowBottomLeft.style.visibility="hidden",t.left.style.top="0px",t.right.style.top="0px"),(!i.verticalScroll||n.center.heightn.centerContainer.height;this.hammer.get("pan").set({direction:A?iB.DIRECTION_ALL:iB.DIRECTION_HORIZONTAL}),this.hammer.get("press").set({time:this.options.longSelectPressTime}),this.components.forEach((t=>{e=t.redraw()||e}));if(e){if(this.redrawCount<5)return void this.body.emitter.emit("_change");console.log("WARNING: infinite loop in redraw?")}else this.redrawCount=0;this.body.emitter.emit("changed")}_setDOM(){const t=this.props,e=this.dom;t.leftContainer.width=t.left.width,t.rightContainer.width=t.right.width;const i=t.root.width-t.left.width-t.right.width;t.center.width=i,t.centerContainer.width=i,t.top.width=i,t.bottom.width=i,e.background.style.height=`${t.background.height}px`,e.backgroundVertical.style.height=`${t.background.height}px`,e.backgroundHorizontal.style.height=`${t.centerContainer.height}px`,e.centerContainer.style.height=`${t.centerContainer.height}px`,e.leftContainer.style.height=`${t.leftContainer.height}px`,e.rightContainer.style.height=`${t.rightContainer.height}px`,e.background.style.width=`${t.background.width}px`,e.backgroundVertical.style.width=`${t.centerContainer.width}px`,e.backgroundHorizontal.style.width=`${t.background.width}px`,e.centerContainer.style.width=`${t.center.width}px`,e.top.style.width=`${t.top.width}px`,e.bottom.style.width=`${t.bottom.width}px`,e.background.style.left="0",e.background.style.top="0",e.backgroundVertical.style.left=`${t.left.width+t.border.left}px`,e.backgroundVertical.style.top="0",e.backgroundHorizontal.style.left="0",e.backgroundHorizontal.style.top=`${t.top.height}px`,e.centerContainer.style.left=`${t.left.width}px`,e.centerContainer.style.top=`${t.top.height}px`,e.leftContainer.style.left="0",e.leftContainer.style.top=`${t.top.height}px`,e.rightContainer.style.left=`${t.left.width+t.center.width}px`,e.rightContainer.style.top=`${t.top.height}px`,e.top.style.left=`${t.left.width}px`,e.top.style.top="0",e.bottom.style.left=`${t.left.width}px`,e.bottom.style.top=`${t.top.height+t.centerContainer.height}px`,e.center.style.left="0",e.left.style.left="0",e.right.style.left="0"}setCurrentTime(t){if(!this.currentTime)throw new Error("Option showCurrentTime must be true");this.currentTime.setCurrentTime(t)}getCurrentTime(){if(!this.currentTime)throw new Error("Option showCurrentTime must be true");return this.currentTime.getCurrentTime()}_toTime(t){return $x(this,t,this.props.center.width)}_toGlobalTime(t){return $x(this,t,this.props.root.width)}_toScreen(t){return Yx(this,t,this.props.center.width)}_toGlobalScreen(t){return Yx(this,t,this.props.root.width)}_initAutoResize(){1==this.options.autoResize?this._startAutoResize():this._stopAutoResize()}_startAutoResize(){const t=this;this._stopAutoResize(),this._onResize=()=>{if(1==t.options.autoResize){if(t.dom.root){const e=t.dom.root.offsetHeight,i=t.dom.root.offsetWidth;i==t.props.lastWidth&&e==t.props.lastHeight||(t.props.lastWidth=i,t.props.lastHeight=e,t.props.scrollbarWidth=Ux.getScrollBarWidth(),t.body.emitter.emit("_change"))}}else t._stopAutoResize()},Ux.addEventListener(window,"resize",this._onResize),t.dom.root&&(t.props.lastWidth=t.dom.root.offsetWidth,t.props.lastHeight=t.dom.root.offsetHeight),this.watchTimer=setInterval(this._onResize,1e3)}_stopAutoResize(){this.watchTimer&&(clearInterval(this.watchTimer),this.watchTimer=void 0),this._onResize&&(Ux.removeEventListener(window,"resize",this._onResize),this._onResize=null)}_onTouch(t){this.touch.allowDragging=!0,this.touch.initialScrollTop=this.props.scrollTop}_onPinch(t){this.touch.allowDragging=!1}_onDrag(t){if(!t)return;if(!this.touch.allowDragging)return;const e=t.deltaY,i=this._getScrollTop(),n=this._setScrollTop(this.touch.initialScrollTop+e);this.options.verticalScroll&&(this.dom.left.parentNode.scrollTop=-this.props.scrollTop,this.dom.right.parentNode.scrollTop=-this.props.scrollTop),n!=i&&this.emit("verticalDrag")}_setScrollTop(t){return this.props.scrollTop=t,this._updateScrollTop(),this.props.scrollTop}_updateScrollTop(){const t=Math.min(this.props.centerContainer.height-this.props.border.top-this.props.border.bottom-this.props.center.height,0);return t!=this.props.scrollTopMin&&("top"!=this.options.orientation.item&&(this.props.scrollTop+=t-this.props.scrollTopMin),this.props.scrollTopMin=t),this.props.scrollTop>0&&(this.props.scrollTop=0),this.props.scrollTop{this.options.locales[t]=Ux.extend({},i,this.options.locales[t])})),this.offset=0,this._create()}_create(){const t=document.createElement("div");t.className="vis-current-time",t.style.position="absolute",t.style.top="0px",t.style.height="100%",this.bar=t}destroy(){this.options.showCurrentTime=!1,this.redraw(),this.body=null}setOptions(t){t&&Ux.selectiveExtend(["rtl","showCurrentTime","alignCurrentTime","moment","locale","locales"],this.options,t)}redraw(){if(this.options.showCurrentTime){const t=this.body.dom.backgroundVertical;this.bar.parentNode!=t&&(this.bar.parentNode&&this.bar.parentNode.removeChild(this.bar),t.appendChild(this.bar),this.start());let e=this.options.moment(Date.now()+this.offset);this.options.alignCurrentTime&&(e=e.startOf(this.options.alignCurrentTime));const i=this.body.util.toScreen(e);let n=this.options.locales[this.options.locale];n||(this.warned||(console.warn(`WARNING: options.locales['${this.options.locale}'] not found. See https://visjs.github.io/vis-timeline/docs/timeline/#Localization`),this.warned=!0),n=this.options.locales.en);let o=`${n.current} ${n.time}: ${e.format("dddd, MMMM Do YYYY, H:mm:ss")}`;o=o.charAt(0).toUpperCase()+o.substring(1),this.options.rtl?this.bar.style.transform=`translateX(${-1*i}px)`:this.bar.style.transform=`translateX(${i}px)`,this.bar.title=o}else this.bar.parentNode&&this.bar.parentNode.removeChild(this.bar),this.stop();return!1}start(){const t=this;!function e(){t.stop();let i=1/t.body.range.conversion(t.body.domProps.center.width).scale/10;i<30&&(i=30),i>1e3&&(i=1e3),t.redraw(),t.body.emitter.emit("currentTimeTick"),t.currentTimeTimer=setTimeout(e,i)}()}stop(){void 0!==this.currentTimeTimer&&(clearTimeout(this.currentTimeTimer),delete this.currentTimeTimer)}setCurrentTime(t){const e=Ux.convert(t,"Date").valueOf(),i=Date.now();this.offset=e-i,this.redraw()}getCurrentTime(){return new Date(Date.now()+this.offset)}}function xB(t,e,i,n){return null===DB(t,e.item,!1,(t=>t.stack&&(i||null===t.top)),(t=>t.stack),(t=>e.axis),n)}function BB(t,e,i){const n=DB(t,e.item,!1,(t=>t.stack),(t=>!0),(t=>t.baseTop));i.height=n-i.top+.5*e.item.vertical}function kB(t,e,i,n){for(let o=0;ot.index>e.index?1:t.index!0),(t=>!0),(t=>0));for(let n=0;ni[t].index&&(i[r].top+=i[t].height);const o=t[r];for(let t=0;tt.start,l=t=>t.end;if(!i){const i=!(!t[0]||!t[0].options.rtl);a=i?t=>t.right:t=>t.left,l=t=>a(t)+t.width+e.horizontal}const d=[],c=[];let h=null,u=0;for(const e of t)if(n(e))d.push(e);else if(o(e)){const t=a(e);null!==h&&ta(e)-.001>t),u),c.splice(u,0,e),u++}h=null;let A=null;u=0;let p=0,m=0,g=0;for(;d.length>0;){const t=d.shift();t.top=r(t);const i=a(t),n=l(t);null!==h&&iinn&&(m=TB(c,(t=>n+.001>=a(t)),p,horizontalOVerlapEndIndex)+1);const f=c.slice(p,m).filter((t=>ia(t))).sort(((t,e)=>t.top-e.top));for(let i=0;ia(t)-.001>i),u),c.splice(u,0,t),u++);const v=t.top+t.height;if(v>g&&(g=v),s&&s())return null}return g}function QB(t,e,i){return t.top-i.vertical+.001e.top}function MB(t,e,i){i||(i=0);const n=t.slice(i).findIndex(e);return-1===n?t.length:n+i}function TB(t,e,n,o){for(n||(n=0),o||(o=t.length),i=o-1;i>=n;i--)if(e(t[i]))return i;return n-1}const OB="__background__";class RB{constructor(t,e,i){if(this.groupId=t,this.subgroups={},this.subgroupStack={},this.subgroupStackAll=!1,this.subgroupVisibility={},this.doInnerStack=!1,this.shouldBailStackItems=!1,this.subgroupIndex=0,this.subgroupOrderer=e&&e.subgroupOrder,this.itemSet=i,this.isVisible=null,this.stackDirty=!0,this._disposeCallbacks=[],e&&e.nestedGroups&&(this.nestedGroups=e.nestedGroups,0==e.showNested?this.showNested=!1:this.showNested=!0),e&&e.subgroupStack)if("boolean"==typeof e.subgroupStack)this.doInnerStack=e.subgroupStack,this.subgroupStackAll=e.subgroupStack;else for(const t in e.subgroupStack)this.subgroupStack[t]=e.subgroupStack[t],this.doInnerStack=this.doInnerStack||e.subgroupStack[t];e&&e.heightMode?this.heightMode=e.heightMode:this.heightMode=i.options.groupHeightMode,this.nestedInGroup=null,this.dom={},this.props={label:{width:0,height:0}},this.className=null,this.items={},this.visibleItems=[],this.itemsInRange=[],this.orderedItems={byStart:[],byEnd:[]},this.checkRangedItems=!1;const n=()=>{this.checkRangedItems=!0};this.itemSet.body.emitter.on("checkRangedItems",n),this._disposeCallbacks.push((()=>{this.itemSet.body.emitter.off("checkRangedItems",n)})),this._create(),this.setData(e)}_create(){const t=document.createElement("div");this.itemSet.options.groupEditable.order?t.className="vis-label draggable":t.className="vis-label",this.dom.label=t;const e=document.createElement("div");e.className="vis-inner",t.appendChild(e),this.dom.inner=e;const i=document.createElement("div");i.className="vis-group",i["vis-group"]=this,this.dom.foreground=i,this.dom.background=document.createElement("div"),this.dom.background.className="vis-group",this.dom.axis=document.createElement("div"),this.dom.axis.className="vis-group",this.dom.marker=document.createElement("div"),this.dom.marker.style.visibility="hidden",this.dom.marker.style.position="absolute",this.dom.marker.innerHTML="",this.dom.background.appendChild(this.dom.marker)}setData(t){if(this.itemSet.groupTouchParams.isDragging)return;let e,i;if(t&&t.subgroupVisibility)for(const e in t.subgroupVisibility)this.subgroupVisibility[e]=t.subgroupVisibility[e];if(this.itemSet.options&&this.itemSet.options.groupTemplate?(i=this.itemSet.options.groupTemplate.bind(this),e=i(t,this.dom.inner)):e=t&&t.content,e instanceof Element){for(;this.dom.inner.firstChild;)this.dom.inner.removeChild(this.dom.inner.firstChild);this.dom.inner.appendChild(e)}else e instanceof Object&&e.isReactComponent||(e instanceof Object?i(t,this.dom.inner):this.dom.inner.innerHTML=null!=e?Ux.xss(e):Ux.xss(this.groupId||""));this.dom.label.title=t&&t.title||"",this.dom.inner.firstChild?Ux.removeClassName(this.dom.inner,"vis-hidden"):Ux.addClassName(this.dom.inner,"vis-hidden"),t&&t.nestedGroups?(this.nestedGroups&&this.nestedGroups==t.nestedGroups||(this.nestedGroups=t.nestedGroups),void 0===t.showNested&&void 0!==this.showNested||(0==t.showNested?this.showNested=!1:this.showNested=!0),Ux.addClassName(this.dom.label,"vis-nesting-group"),this.showNested?(Ux.removeClassName(this.dom.label,"collapsed"),Ux.addClassName(this.dom.label,"expanded")):(Ux.removeClassName(this.dom.label,"expanded"),Ux.addClassName(this.dom.label,"collapsed"))):this.nestedGroups&&(this.nestedGroups=null,Ux.removeClassName(this.dom.label,"collapsed"),Ux.removeClassName(this.dom.label,"expanded"),Ux.removeClassName(this.dom.label,"vis-nesting-group")),t&&(t.treeLevel||t.nestedInGroup)?(Ux.addClassName(this.dom.label,"vis-nested-group"),t.treeLevel?Ux.addClassName(this.dom.label,"vis-group-level-"+t.treeLevel):Ux.addClassName(this.dom.label,"vis-group-level-unknown-but-gte1")):Ux.addClassName(this.dom.label,"vis-group-level-0");const n=t&&t.className||null;n!=this.className&&(this.className&&(Ux.removeClassName(this.dom.label,this.className),Ux.removeClassName(this.dom.foreground,this.className),Ux.removeClassName(this.dom.background,this.className),Ux.removeClassName(this.dom.axis,this.className)),Ux.addClassName(this.dom.label,n),Ux.addClassName(this.dom.foreground,n),Ux.addClassName(this.dom.background,n),Ux.addClassName(this.dom.axis,n),this.className=n),this.style&&(Ux.removeCssText(this.dom.label,this.style),this.style=null),t&&t.style&&(Ux.addCssText(this.dom.label,t.style),this.style=t.style)}getLabelWidth(){return this.props.label.width}_didMarkerHeightChange(){const t=this.dom.marker.clientHeight;if(t!=this.lastMarkerHeight){this.lastMarkerHeight=t;const e={};let i=0;Ux.forEach(this.items,((t,n)=>{if(t.dirty=!0,t.displayed){const o=!0;e[n]=t.redraw(o),i=e[n].length}}));if(i>0)for(let t=0;t{e[t]()}));return!0}return!1}_calculateGroupSizeAndPosition(){const{offsetTop:t,offsetLeft:e,offsetWidth:i}=this.dom.foreground;this.top=t,this.right=e,this.width=i}_shouldBailItemsRedraw(){const t=this,e=this.itemSet.options.onTimeout,i={relativeBailingTime:this.itemSet.itemsSettingTime,bailTimeMs:e&&e.timeoutMs,userBailFunction:e&&e.callback,shouldBailStackItems:this.shouldBailStackItems};let n=null;if(!this.itemSet.initialDrawDone){if(i.shouldBailStackItems)return!0;Math.abs(Date.now()-new Date(i.relativeBailingTime))>i.bailTimeMs&&(i.userBailFunction&&null==this.itemSet.userContinueNotBail?i.userBailFunction((e=>{t.itemSet.userContinueNotBail=e,n=!e})):n=0==t.itemSet.userContinueNotBail)}return n}_redrawItems(t,e,i,n){if(t||this.stackDirty||this.isVisible&&!e){const t={byEnd:this.orderedItems.byEnd.filter((t=>!t.isCluster)),byStart:this.orderedItems.byStart.filter((t=>!t.isCluster))},e={byEnd:[...new Set(this.orderedItems.byEnd.map((t=>t.cluster)).filter((t=>!!t)))],byStart:[...new Set(this.orderedItems.byStart.map((t=>t.cluster)).filter((t=>!!t)))]},o=()=>[...this._updateItemsInRange(t,this.visibleItems.filter((t=>!t.isCluster)),n),...this._updateClustersInRange(e,this.visibleItems.filter((t=>t.isCluster)),n)],r=t=>{let e={};for(const i in this.subgroups){const n=this.visibleItems.filter((t=>t.data.subgroup===i));e[i]=t?n.sort(((e,i)=>t(e.data,i.data))):n}return e};if("function"==typeof this.itemSet.options.order){const t=this;if(this.doInnerStack&&this.itemSet.options.stackSubgroups){SB(r(this.itemSet.options.order),i,this.subgroups),this.visibleItems=o(),this._updateSubGroupHeights(i)}else{this.visibleItems=o(),this._updateSubGroupHeights(i);const e=this.visibleItems.slice().filter((t=>t.isCluster||!t.isCluster&&!t.cluster)).sort(((e,i)=>t.itemSet.options.order(e.data,i.data)));this.shouldBailStackItems=xB(e,i,!0,this._shouldBailItemsRedraw.bind(this))}}else if(this.visibleItems=o(),this._updateSubGroupHeights(i),this.itemSet.options.stack)if(this.doInnerStack&&this.itemSet.options.stackSubgroups){SB(r(),i,this.subgroups)}else this.shouldBailStackItems=xB(this.visibleItems,i,!0,this._shouldBailItemsRedraw.bind(this));else kB(this.visibleItems,i,this.subgroups,this.itemSet.options.stackSubgroups);for(let t=0;t{t.cluster&&t.displayed&&t.hide()})),this.shouldBailStackItems&&this.itemSet.body.emitter.emit("destroyTimeline"),this.stackDirty=!1}}_didResize(t,e){t=Ux.updateProperty(this,"height",e)||t;const i=this.dom.inner.clientWidth,n=this.dom.inner.clientHeight;return t=Ux.updateProperty(this.props.label,"width",i)||t,t=Ux.updateProperty(this.props.label,"height",n)||t}_applyGroupHeight(t){this.dom.background.style.height=`${t}px`,this.dom.foreground.style.height=`${t}px`,this.dom.label.style.height=`${t}px`}_updateItemsVerticalPosition(t){for(let e=0,i=this.visibleItems.length;e{i=this._didMarkerHeightChange.call(this)||i},this._updateSubGroupHeights.bind(this,e),this._calculateGroupSizeAndPosition.bind(this),()=>{this.isVisible=this._isGroupVisible.bind(this)(t,e)},()=>{this._redrawItems.bind(this)(i,r,e,t)},this._updateSubgroupsSizes.bind(this),()=>{s=this._calculateHeight.bind(this)(e)},this._calculateGroupSizeAndPosition.bind(this),()=>{o=this._didResize.bind(this)(o,s)},()=>{this._applyGroupHeight.bind(this)(s)},()=>{this._updateItemsVerticalPosition.bind(this)(e)},(()=>(!this.isVisible&&this.height&&(o=!1),o)).bind(this)];if(n)return a;{let t;return a.forEach((e=>{t=e()})),t}}_updateSubGroupHeights(t){if(Object.keys(this.subgroups).length>0){const e=this;this._resetSubgroups(),Ux.forEach(this.visibleItems,(i=>{void 0!==i.data.subgroup&&(e.subgroups[i.data.subgroup].height=Math.max(e.subgroups[i.data.subgroup].height,i.height+t.item.vertical),e.subgroups[i.data.subgroup].visible=void 0===this.subgroupVisibility[i.data.subgroup]||Boolean(this.subgroupVisibility[i.data.subgroup]))}))}}_isGroupVisible(t,e){return this.top<=t.body.domProps.centerContainer.height-t.body.domProps.scrollTop+e.axis&&this.top+this.height+e.axis>=-t.body.domProps.scrollTop}_calculateHeight(t){let e,i;if(i="fixed"===this.heightMode?Ux.toArray(this.items):this.visibleItems,i.length>0){let n=i[0].top,o=i[0].top+i[0].height;if(Ux.forEach(i,(t=>{n=Math.min(n,t.top),o=Math.max(o,t.top+t.height)})),n>t.axis){const e=n-t.axis;o-=e,Ux.forEach(i,(t=>{t.top-=e}))}e=Math.ceil(o+t.item.vertical/2),"fitItems"!==this.heightMode&&(e=Math.max(e,this.props.label.height))}else e=this.props.label.height;return e}show(){this.dom.label.parentNode||this.itemSet.dom.labelSet.appendChild(this.dom.label),this.dom.foreground.parentNode||this.itemSet.dom.foreground.appendChild(this.dom.foreground),this.dom.background.parentNode||this.itemSet.dom.background.appendChild(this.dom.background),this.dom.axis.parentNode||this.itemSet.dom.axis.appendChild(this.dom.axis)}hide(){const t=this.dom.label;t.parentNode&&t.parentNode.removeChild(t);const e=this.dom.foreground;e.parentNode&&e.parentNode.removeChild(e);const i=this.dom.background;i.parentNode&&i.parentNode.removeChild(i);const n=this.dom.axis;n.parentNode&&n.parentNode.removeChild(n)}add(t){if(this.items[t.id]=t,t.setParent(this),this.stackDirty=!0,void 0!==t.data.subgroup&&(this._addToSubgroup(t),this.orderSubgroups()),!this.visibleItems.includes(t)){const e=this.itemSet.body.range;this._checkIfVisible(t,this.visibleItems,e)}}_addToSubgroup(t,e=t.data.subgroup){null!=e&&void 0===this.subgroups[e]&&(this.subgroups[e]={height:0,top:0,start:t.data.start,end:t.data.end||t.data.start,visible:!1,index:this.subgroupIndex,items:[],stack:this.subgroupStackAll||this.subgroupStack[e]||!1},this.subgroupIndex++),new Date(t.data.start)new Date(this.subgroups[e].end)&&(this.subgroups[e].end=i),this.subgroups[e].items.push(t)}_updateSubgroupsSizes(){const t=this;if(t.subgroups)for(const e in t.subgroups){const i=t.subgroups[e].items[0].data.end||t.subgroups[e].items[0].data.start;let n=t.subgroups[e].items[0].data.start,o=i-1;t.subgroups[e].items.forEach((t=>{new Date(t.data.start)new Date(o)&&(o=e)})),t.subgroups[e].start=n,t.subgroups[e].end=new Date(o-1)}}orderSubgroups(){if(void 0!==this.subgroupOrderer){const t=[];if("string"==typeof this.subgroupOrderer){for(const e in this.subgroups)t.push({subgroup:e,sortField:this.subgroups[e].items[0].data[this.subgroupOrderer]});t.sort(((t,e)=>t.sortField-e.sortField))}else if("function"==typeof this.subgroupOrderer){for(const e in this.subgroups)t.push(this.subgroups[e].items[0].data);t.sort(this.subgroupOrderer)}if(t.length>0)for(let e=0;e=0&&(i.items.splice(n,1),i.items.length?this._updateSubgroupsSizes():delete this.subgroups[e])}}}removeFromDataSet(t){this.itemSet.removeItem(t.id)}order(){const t=Ux.toArray(this.items),e=[],i=[];for(let n=0;nt.data.start-e.data.start)),function(t){t.sort(((t,e)=>("end"in t.data?t.data.end:t.data.start)-("end"in e.data?e.data.end:e.data.start)))}(this.orderedItems.byEnd)}_updateItemsInRange(t,e,i){const n=[],o={};if(!this.isVisible&&this.groupId!=OB){for(let t=0;t{const{start:e,end:i}=t;return i0)for(let t=0;ttt.data.startl)),1==this.checkRangedItems){this.checkRangedItems=!1;for(let e=0;et.data.endl))}const h={};let u=0;for(let t=0;t0)for(let t=0;t{e[t]()}));for(let t=0;t=0;r--){let t=e[r];if(o(t))break;t.isCluster&&!t.hasItems()||t.cluster||void 0===n[t.id]&&(n[t.id]=!0,i.push(t))}for(let r=t+1;r0)for(let t=0;t0)for(var a=0;a{this.options.locales[t]=Ux.extend({},n,this.options.locales[t])})),this.selected=!1,this.displayed=!1,this.groupShowing=!0,this.selectable=i&&i.selectable||!1,this.dirty=!0,this.top=null,this.right=null,this.left=null,this.width=null,this.height=null,this.setSelectability(t),this.editable=null,this._updateEditStatus()}select(){this.selectable&&(this.selected=!0,this.dirty=!0,this.displayed&&this.redraw())}unselect(){this.selected=!1,this.dirty=!0,this.displayed&&this.redraw()}setData(t){null!=t.group&&this.data.group!=t.group&&null!=this.parent&&this.parent.itemSet._moveToGroup(this,t.group),this.setSelectability(t),this.parent&&(this.parent.stackDirty=!0);null!=t.subgroup&&this.data.subgroup!=t.subgroup&&null!=this.parent&&this.parent.changeSubgroup(this,this.data.subgroup,t.subgroup),this.data=t,this._updateEditStatus(),this.dirty=!0,this.displayed&&this.redraw()}setSelectability(t){t&&(this.selectable=void 0===t.selectable||Boolean(t.selectable))}setParent(t){this.displayed?(this.hide(),this.parent=t,this.parent&&this.show()):this.parent=t}isVisible(t){return!1}show(){return!1}hide(){return!1}redraw(){}repositionX(){}repositionY(){}_repaintDragCenter(){if(this.selected&&this.editable.updateTime&&!this.dom.dragCenter){const t=this,e=document.createElement("div");e.className="vis-drag-center",e.dragCenterItem=this,this.hammerDragCenter=new iB(e),this.hammerDragCenter.on("tap",(e=>{t.parent.itemSet.body.emitter.emit("click",{event:e,item:t.id})})),this.hammerDragCenter.on("doubletap",(e=>{e.stopPropagation(),t.parent.itemSet._onUpdateItem(t),t.parent.itemSet.body.emitter.emit("doubleClick",{event:e,item:t.id})})),this.hammerDragCenter.on("panstart",(e=>{e.stopPropagation(),t.parent.itemSet._onDragStart(e)})),this.hammerDragCenter.on("panmove",t.parent.itemSet._onDrag.bind(t.parent.itemSet)),this.hammerDragCenter.on("panend",t.parent.itemSet._onDragEnd.bind(t.parent.itemSet)),this.hammerDragCenter.get("press").set({time:1e4}),this.dom.box?this.dom.dragLeft?this.dom.box.insertBefore(e,this.dom.dragLeft):this.dom.box.appendChild(e):this.dom.point&&this.dom.point.appendChild(e),this.dom.dragCenter=e}else!this.selected&&this.dom.dragCenter&&(this.dom.dragCenter.parentNode&&this.dom.dragCenter.parentNode.removeChild(this.dom.dragCenter),this.dom.dragCenter=null,this.hammerDragCenter&&(this.hammerDragCenter.destroy(),this.hammerDragCenter=null))}_repaintDeleteButton(t){const e=(this.options.editable.overrideItems||null==this.editable)&&this.options.editable.remove||!this.options.editable.overrideItems&&null!=this.editable&&this.editable.remove;if(this.selected&&e&&!this.dom.deleteButton){const e=this,i=document.createElement("div");this.options.rtl?i.className="vis-delete-rtl":i.className="vis-delete";let n=this.options.locales[this.options.locale];n||(this.warned||(console.warn(`WARNING: options.locales['${this.options.locale}'] not found. See https://visjs.github.io/vis-timeline/docs/timeline/#Localization`),this.warned=!0),n=this.options.locales.en),i.title=n.deleteSelected,this.hammerDeleteButton=new iB(i).on("tap",(t=>{t.stopPropagation(),e.parent.removeFromDataSet(e)})),t.appendChild(i),this.dom.deleteButton=i}else this.selected&&e||!this.dom.deleteButton||(this.dom.deleteButton.parentNode&&this.dom.deleteButton.parentNode.removeChild(this.dom.deleteButton),this.dom.deleteButton=null,this.hammerDeleteButton&&(this.hammerDeleteButton.destroy(),this.hammerDeleteButton=null))}_repaintOnItemUpdateTimeTooltip(t){if(!this.options.tooltipOnItemUpdateTime)return;const e=(this.options.editable.updateTime||!0===this.data.editable)&&!1!==this.data.editable;if(this.selected&&e&&!this.dom.onItemUpdateTimeTooltip){const e=document.createElement("div");e.className="vis-onUpdateTime-tooltip",t.appendChild(e),this.dom.onItemUpdateTimeTooltip=e}else!this.selected&&this.dom.onItemUpdateTimeTooltip&&(this.dom.onItemUpdateTimeTooltip.parentNode&&this.dom.onItemUpdateTimeTooltip.parentNode.removeChild(this.dom.onItemUpdateTimeTooltip),this.dom.onItemUpdateTimeTooltip=null);if(this.dom.onItemUpdateTimeTooltip){this.dom.onItemUpdateTimeTooltip.style.visibility=this.parent.itemSet.touchParams.itemIsDragging?"visible":"hidden",this.dom.onItemUpdateTimeTooltip.style.transform="translateX(-50%)",this.dom.onItemUpdateTimeTooltip.style.left="50%";const t=50,e=this.parent.itemSet.body.domProps.scrollTop;let i;i="top"==this.options.orientation.item?this.top:this.parent.height-this.top-this.height;let n,o;i+this.parent.top-t<-e?(this.dom.onItemUpdateTimeTooltip.style.bottom="",this.dom.onItemUpdateTimeTooltip.style.top=`${this.height+2}px`):(this.dom.onItemUpdateTimeTooltip.style.top="",this.dom.onItemUpdateTimeTooltip.style.bottom=`${this.height+2}px`),this.options.tooltipOnItemUpdateTime&&this.options.tooltipOnItemUpdateTime.template?(o=this.options.tooltipOnItemUpdateTime.template.bind(this),n=o(this.data)):(n=`start: ${Tx(this.data.start).format("MM/DD/YYYY hh:mm")}`,this.data.end&&(n+=`
end: ${Tx(this.data.end).format("MM/DD/YYYY hh:mm")}`)),this.dom.onItemUpdateTimeTooltip.innerHTML=Ux.xss(n)}}_getItemData(){return this.parent.itemSet.itemsData.get(this.id)}_updateContents(t){let e,i,n,o,r;const s=this._getItemData(),a=(this.dom.box||this.dom.point).getElementsByClassName("vis-item-visible-frame")[0];if(this.options.visibleFrameTemplate?(r=this.options.visibleFrameTemplate.bind(this),o=Ux.xss(r(s,a))):o="",a)if(o instanceof Object&&!(o instanceof Element))r(s,a);else if(i=this._contentToString(this.itemVisibleFrameContent)!==this._contentToString(o),i){if(o instanceof Element)a.innerHTML="",a.appendChild(o);else if(null!=o)a.innerHTML=Ux.xss(o);else if("background"!=this.data.type||void 0!==this.data.content)throw new Error(`Property "content" missing in item ${this.id}`);this.itemVisibleFrameContent=o}if(this.options.template?(n=this.options.template.bind(this),e=n(s,t,this.data)):e=this.data.content,e instanceof Object&&!(e instanceof Element))n(s,t);else if(i=this._contentToString(this.content)!==this._contentToString(e),i){if(e instanceof Element)t.innerHTML="",t.appendChild(e);else if(null!=e)t.innerHTML=Ux.xss(e);else if("background"!=this.data.type||void 0!==this.data.content)throw new Error(`Property "content" missing in item ${this.id}`);this.content=e}}_updateDataAttributes(t){if(this.options.dataAttributes&&this.options.dataAttributes.length>0){let e=[];if(Array.isArray(this.options.dataAttributes))e=this.options.dataAttributes;else{if("all"!=this.options.dataAttributes)return;e=Object.keys(this.data)}for(const i of e){const e=this.data[i];null!=e?t.setAttribute(`data-${i}`,e):t.removeAttribute(`data-${i}`)}}}_updateStyle(t){this.style&&(Ux.removeCssText(t,this.style),this.style=null),this.data.style&&(Ux.addCssText(t,this.data.style),this.style=this.data.style)}_contentToString(t){return"string"==typeof t?t:t&&"outerHTML"in t?t.outerHTML:t}_updateEditStatus(){this.options&&("boolean"==typeof this.options.editable?this.editable={updateTime:this.options.editable,updateGroup:this.options.editable,remove:this.options.editable}:"object"==typeof this.options.editable&&(this.editable={},Ux.selectiveExtend(["updateTime","updateGroup","remove"],this.editable,this.options.editable))),this.options&&this.options.editable&&!0===this.options.editable.overrideItems||this.data&&("boolean"==typeof this.data.editable?this.editable={updateTime:this.data.editable,updateGroup:this.data.editable,remove:this.data.editable}:"object"==typeof this.data.editable&&(this.editable={},Ux.selectiveExtend(["updateTime","updateGroup","remove"],this.editable,this.data.editable)))}getWidthLeft(){return 0}getWidthRight(){return 0}getTitle(){if(this.options.tooltip&&this.options.tooltip.template){return this.options.tooltip.template.bind(this)(this._getItemData(),this.data)}return this.data.title}}NB.prototype.stack=!0;class FB extends NB{constructor(t,e,i){if(super(t,e,i),this.props={content:{width:0}},this.overflow=!1,t){if(null==t.start)throw new Error(`Property "start" missing in item ${t.id}`);if(null==t.end)throw new Error(`Property "end" missing in item ${t.id}`)}}isVisible(t){return!this.cluster&&(this.data.startt.start)}_createDomElement(){this.dom||(this.dom={},this.dom.box=document.createElement("div"),this.dom.frame=document.createElement("div"),this.dom.frame.className="vis-item-overflow",this.dom.box.appendChild(this.dom.frame),this.dom.visibleFrame=document.createElement("div"),this.dom.visibleFrame.className="vis-item-visible-frame",this.dom.box.appendChild(this.dom.visibleFrame),this.dom.content=document.createElement("div"),this.dom.content.className="vis-item-content",this.dom.frame.appendChild(this.dom.content),this.dom.box["vis-item"]=this,this.dirty=!0)}_appendDomElement(){if(!this.parent)throw new Error("Cannot redraw item: no parent attached");if(!this.dom.box.parentNode){const t=this.parent.dom.foreground;if(!t)throw new Error("Cannot redraw item: parent has no foreground container element");t.appendChild(this.dom.box)}this.displayed=!0}_updateDirtyDomComponents(){if(this.dirty){this._updateContents(this.dom.content),this._updateDataAttributes(this.dom.box),this._updateStyle(this.dom.box);const t=this.editable.updateTime||this.editable.updateGroup,e=(this.data.className?" "+this.data.className:"")+(this.selected?" vis-selected":"")+(t?" vis-editable":" vis-readonly");this.dom.box.className=this.baseClassName+e,this.dom.content.style.maxWidth="none"}}_getDomComponentsSizes(){return this.overflow="hidden"!==window.getComputedStyle(this.dom.frame).overflow,this.whiteSpace="nowrap"!==window.getComputedStyle(this.dom.content).whiteSpace,{content:{width:this.dom.content.offsetWidth},box:{height:this.dom.box.offsetHeight}}}_updateDomComponentsSizes(t){this.props.content.width=t.content.width,this.height=t.box.height,this.dom.content.style.maxWidth="",this.dirty=!1}_repaintDomAdditionals(){this._repaintOnItemUpdateTimeTooltip(this.dom.box),this._repaintDeleteButton(this.dom.box),this._repaintDragCenter(),this._repaintDragLeft(),this._repaintDragRight()}redraw(t){let e;const i=[this._createDomElement.bind(this),this._appendDomElement.bind(this),this._updateDirtyDomComponents.bind(this),()=>{this.dirty&&(e=this._getDomComponentsSizes.bind(this)())},()=>{this.dirty&&this._updateDomComponentsSizes.bind(this)(e)},this._repaintDomAdditionals.bind(this)];if(t)return i;{let t;return i.forEach((e=>{t=e()})),t}}show(t){if(!this.displayed)return this.redraw(t)}hide(){if(this.displayed){const t=this.dom.box;t.parentNode&&t.parentNode.removeChild(t),this.displayed=!1}}repositionX(t){const e=this.parent.width;let i=this.conversion.toScreen(this.data.start),n=this.conversion.toScreen(this.data.end);const o=void 0===this.data.align?this.options.align:this.data.align;let r,s;!1===this.data.limitSize||void 0!==t&&!0!==t||(i<-e&&(i=-e),n>2*e&&(n=2*e));const a=Math.max(Math.round(1e3*(n-i))/1e3,1);switch(this.overflow?(this.options.rtl?this.right=i:this.left=i,this.width=a+this.props.content.width,s=this.props.content.width):(this.options.rtl?this.right=i:this.left=i,this.width=a,s=Math.min(n-i,this.props.content.width)),this.options.rtl?this.dom.box.style.transform=`translateX(${-1*this.right}px)`:this.dom.box.style.transform=`translateX(${this.left}px)`,this.dom.box.style.width=`${a}px`,this.whiteSpace&&(this.height=this.dom.box.offsetHeight),o){case"left":this.dom.content.style.transform="translateX(0)";break;case"right":if(this.options.rtl){const t=-1*Math.max(a-s,0);this.dom.content.style.transform=`translateX(${t}px)`}else this.dom.content.style.transform=`translateX(${Math.max(a-s,0)}px)`;break;case"center":if(this.options.rtl){const t=-1*Math.max((a-s)/2,0);this.dom.content.style.transform=`translateX(${t}px)`}else this.dom.content.style.transform=`translateX(${Math.max((a-s)/2,0)}px)`;break;default:if(r=this.overflow?n>0?Math.max(-i,0):-s:i<0?-i:0,this.options.rtl){const t=-1*r;this.dom.content.style.transform=`translateX(${t}px)`}else this.dom.content.style.transform=`translateX(${r}px)`}}repositionY(){const t=this.options.orientation.item,e=this.dom.box;e.style.top="top"==t?`${this.top}px`:this.parent.height-this.top-this.height+"px"}_repaintDragLeft(){if((this.selected||this.options.itemsAlwaysDraggable.range)&&this.editable.updateTime&&!this.dom.dragLeft){const t=document.createElement("div");t.className="vis-drag-left",t.dragLeftItem=this,this.dom.box.appendChild(t),this.dom.dragLeft=t}else this.selected||this.options.itemsAlwaysDraggable.range||!this.dom.dragLeft||(this.dom.dragLeft.parentNode&&this.dom.dragLeft.parentNode.removeChild(this.dom.dragLeft),this.dom.dragLeft=null)}_repaintDragRight(){if((this.selected||this.options.itemsAlwaysDraggable.range)&&this.editable.updateTime&&!this.dom.dragRight){const t=document.createElement("div");t.className="vis-drag-right",t.dragRightItem=this,this.dom.box.appendChild(t),this.dom.dragRight=t}else this.selected||this.options.itemsAlwaysDraggable.range||!this.dom.dragRight||(this.dom.dragRight.parentNode&&this.dom.dragRight.parentNode.removeChild(this.dom.dragRight),this.dom.dragRight=null)}}FB.prototype.baseClassName="vis-item vis-range";class LB extends NB{constructor(t,e,i){if(super(t,e,i),this.props={content:{width:0}},this.overflow=!1,t){if(null==t.start)throw new Error(`Property "start" missing in item ${t.id}`);if(null==t.end)throw new Error(`Property "end" missing in item ${t.id}`)}}isVisible(t){return this.data.startt.start}_createDomElement(){this.dom||(this.dom={},this.dom.box=document.createElement("div"),this.dom.frame=document.createElement("div"),this.dom.frame.className="vis-item-overflow",this.dom.box.appendChild(this.dom.frame),this.dom.content=document.createElement("div"),this.dom.content.className="vis-item-content",this.dom.frame.appendChild(this.dom.content),this.dirty=!0)}_appendDomElement(){if(!this.parent)throw new Error("Cannot redraw item: no parent attached");if(!this.dom.box.parentNode){const t=this.parent.dom.background;if(!t)throw new Error("Cannot redraw item: parent has no background container element");t.appendChild(this.dom.box)}this.displayed=!0}_updateDirtyDomComponents(){if(this.dirty){this._updateContents(this.dom.content),this._updateDataAttributes(this.dom.content),this._updateStyle(this.dom.box);const t=(this.data.className?" "+this.data.className:"")+(this.selected?" vis-selected":"");this.dom.box.className=this.baseClassName+t}}_getDomComponentsSizes(){return this.overflow="hidden"!==window.getComputedStyle(this.dom.content).overflow,{content:{width:this.dom.content.offsetWidth}}}_updateDomComponentsSizes(t){this.props.content.width=t.content.width,this.height=0,this.dirty=!1}_repaintDomAdditionals(){}redraw(t){let e;const i=[this._createDomElement.bind(this),this._appendDomElement.bind(this),this._updateDirtyDomComponents.bind(this),()=>{this.dirty&&(e=this._getDomComponentsSizes.bind(this)())},()=>{this.dirty&&this._updateDomComponentsSizes.bind(this)(e)},this._repaintDomAdditionals.bind(this)];if(t)return i;{let t;return i.forEach((e=>{t=e()})),t}}repositionY(t){let e;const i=this.options.orientation.item;if(void 0!==this.data.subgroup){const t=this.data.subgroup;this.dom.box.style.height=`${this.parent.subgroups[t].height}px`,this.dom.box.style.top="top"==i?`${this.parent.top+this.parent.subgroups[t].top}px`:this.parent.top+this.parent.height-this.parent.subgroups[t].top-this.parent.subgroups[t].height+"px",this.dom.box.style.bottom=""}else this.parent instanceof PB?(e=Math.max(this.parent.height,this.parent.itemSet.body.domProps.center.height,this.parent.itemSet.body.domProps.centerContainer.height),this.dom.box.style.bottom="bottom"==i?"0":"",this.dom.box.style.top="top"==i?"0":""):(e=this.parent.height,this.dom.box.style.top=`${this.parent.top}px`,this.dom.box.style.bottom="");this.dom.box.style.height=`${e}px`}}LB.prototype.baseClassName="vis-item vis-background",LB.prototype.stack=!1,LB.prototype.show=FB.prototype.show,LB.prototype.hide=FB.prototype.hide,LB.prototype.repositionX=FB.prototype.repositionX;class jB{constructor(t,e){this.container=t,this.overflowMethod=e||"cap",this.x=0,this.y=0,this.padding=5,this.hidden=!1,this.frame=document.createElement("div"),this.frame.className="vis-tooltip",this.container.appendChild(this.frame)}setPosition(t,e){this.x=parseInt(t),this.y=parseInt(e)}setText(t){t instanceof Element?(this.frame.innerHTML="",this.frame.appendChild(t)):this.frame.innerHTML=Ux.xss(t)}show(t){if(void 0===t&&(t=!0),!0===t){var e=this.frame.clientHeight,i=this.frame.clientWidth,n=this.frame.parentNode.clientHeight,o=this.frame.parentNode.clientWidth,r=0,s=0;if("flip"==this.overflowMethod||"none"==this.overflowMethod){let t=!1,n=!0;"flip"==this.overflowMethod&&(this.y-eo-this.padding&&(t=!0)),r=t?this.x-i:this.x,s=n?this.y-e:this.y}else(s=this.y-e)+e+this.padding>n&&(s=n-e-this.padding),so&&(r=o-i-this.padding),rt.start&&this.hasItems()}getData(){return{isCluster:!0,id:this.id,items:this.data.items||[],data:this.data}}redraw(t){var e,i,n=[this._createDomElement.bind(this),this._appendDomElement.bind(this),this._updateDirtyDomComponents.bind(this),function(){this.dirty&&(e=this._getDomComponentsSizes())}.bind(this),function(){this.dirty&&this._updateDomComponentsSizes.bind(this)(e)}.bind(this),this._repaintDomAdditionals.bind(this)];return t?n:(n.forEach((function(t){i=t()})),i)}show(){this.displayed||this.redraw()}hide(){if(this.displayed){var t=this.dom;t.box.parentNode&&t.box.parentNode.removeChild(t.box),this.options.showStipes&&(t.line.parentNode&&t.line.parentNode.removeChild(t.line),t.dot.parentNode&&t.dot.parentNode.removeChild(t.dot)),this.displayed=!1}}repositionX(){let t=this.conversion.toScreen(this.data.start),e=this.data.end?this.conversion.toScreen(this.data.end):0;if(e)this.repositionXWithRanges(t,e);else{let e=void 0===this.data.align?this.options.align:this.data.align;this.repositionXWithoutRanges(t,e)}this.options.showStipes&&(this.dom.line.style.display=this._isStipeVisible()?"block":"none",this.dom.dot.style.display=this._isStipeVisible()?"block":"none",this._isStipeVisible()&&this.repositionStype(t,e))}repositionStype(t,e){this.dom.line.style.display="block",this.dom.dot.style.display="block";const i=this.dom.line.offsetWidth,n=this.dom.dot.offsetWidth;if(e){const o=i+t+(e-t)/2,r=o-n/2,s=this.options.rtl?-1*o:o,a=this.options.rtl?-1*r:r;this.dom.line.style.transform=`translateX(${s}px)`,this.dom.dot.style.transform=`translateX(${a}px)`}else{const e=this.options.rtl?-1*t:t,i=this.options.rtl?-1*(t-n/2):t-n/2;this.dom.line.style.transform=`translateX(${e}px)`,this.dom.dot.style.transform=`translateX(${i}px)`}}repositionXWithoutRanges(t,e){"right"==e?this.options.rtl?(this.right=t-this.width,this.dom.box.style.right=this.right+"px"):(this.left=t-this.width,this.dom.box.style.left=this.left+"px"):"left"==e?this.options.rtl?(this.right=t,this.dom.box.style.right=this.right+"px"):(this.left=t,this.dom.box.style.left=this.left+"px"):this.options.rtl?(this.right=t-this.width/2,this.dom.box.style.right=this.right+"px"):(this.left=t-this.width/2,this.dom.box.style.left=this.left+"px")}repositionXWithRanges(t,e){let i=Math.round(Math.max(e-t+.5,1));this.options.rtl?this.right=t:this.left=t,this.width=Math.max(i,this.minWidth||0),this.options.rtl?this.dom.box.style.right=this.right+"px":this.dom.box.style.left=this.left+"px",this.dom.box.style.width=i+"px"}repositionY(){var t=this.options.orientation.item,e=this.dom.box;if(e.style.top="top"==t?(this.top||0)+"px":(this.parent.height-this.top-this.height||0)+"px",this.options.showStipes){if("top"==t)this.dom.line.style.top="0",this.dom.line.style.height=this.parent.top+this.top+1+"px",this.dom.line.style.bottom="";else{var i=this.parent.itemSet.props.height,n=i-this.parent.top-this.parent.height+this.top;this.dom.line.style.top=i-n+"px",this.dom.line.style.bottom="0"}this.dom.dot.style.top=-this.dom.dot.offsetHeight/2+"px"}}getWidthLeft(){return this.width/2}getWidthRight(){return this.width/2}move(){this.repositionX(),this.repositionY()}attach(){for(let t of this.data.uiItems)t.cluster=this;this.data.items=this.data.uiItems.map((t=>t.data)),this.attached=!0,this.dirty=!0}detach(t=!1){if(this.hasItems()){for(let t of this.data.uiItems)delete t.cluster;this.attached=!1,t&&this.group&&(this.group.remove(this),this.group=null),this.data.items=[],this.dirty=!0}}_onDoubleClick(){this._fit()}_setupRange(){const t=this.data.uiItems.map((t=>({start:t.data.start.valueOf(),end:t.data.end?t.data.end.valueOf():t.data.start.valueOf()})));this.data.min=Math.min(...t.map((t=>Math.min(t.start,t.end||t.start)))),this.data.max=Math.max(...t.map((t=>Math.max(t.start,t.end||t.start))));const e=this.data.uiItems.map((t=>t.center)).reduce(((t,e)=>t+e),0)/this.data.uiItems.length;this.data.uiItems.some((t=>t.data.end))?(this.data.start=new Date(this.data.min),this.data.end=new Date(this.data.max)):(this.data.start=new Date(e),this.data.end=null)}_getUiItems(){return this.data.uiItems&&this.data.uiItems.length?this.data.uiItems.filter((t=>t.cluster===this)):[]}_createDomElement(){this.dom||(this.dom={},this.dom.box=document.createElement("DIV"),this.dom.content=document.createElement("DIV"),this.dom.content.className="vis-item-content",this.dom.box.appendChild(this.dom.content),this.options.showStipes&&(this.dom.line=document.createElement("DIV"),this.dom.line.className="vis-cluster-line",this.dom.line.style.display="none",this.dom.dot=document.createElement("DIV"),this.dom.dot.className="vis-cluster-dot",this.dom.dot.style.display="none"),this.options.fitOnDoubleClick&&(this.dom.box.ondblclick=zB.prototype._onDoubleClick.bind(this)),this.dom.box["vis-item"]=this,this.dirty=!0)}_appendDomElement(){if(!this.parent)throw new Error("Cannot redraw item: no parent attached");if(!this.dom.box.parentNode){const t=this.parent.dom.foreground;if(!t)throw new Error("Cannot redraw item: parent has no foreground container element");t.appendChild(this.dom.box)}const t=this.parent.dom.background;if(this.options.showStipes){if(!this.dom.line.parentNode){if(!t)throw new Error("Cannot redraw item: parent has no background container element");t.appendChild(this.dom.line)}if(!this.dom.dot.parentNode){var e=this.parent.dom.axis;if(!t)throw new Error("Cannot redraw item: parent has no axis container element");e.appendChild(this.dom.dot)}}this.displayed=!0}_updateDirtyDomComponents(){if(this.dirty){this._updateContents(this.dom.content),this._updateDataAttributes(this.dom.box),this._updateStyle(this.dom.box);const t=this.baseClassName+" "+(this.data.className?" "+this.data.className:"")+(this.selected?" vis-selected":"")+" vis-readonly";this.dom.box.className="vis-item "+t,this.options.showStipes&&(this.dom.line.className="vis-item vis-cluster-line "+(this.selected?" vis-selected":""),this.dom.dot.className="vis-item vis-cluster-dot "+(this.selected?" vis-selected":"")),this.data.end&&(this.dom.content.style.maxWidth="none")}}_getDomComponentsSizes(){const t={previous:{right:this.dom.box.style.right,left:this.dom.box.style.left},box:{width:this.dom.box.offsetWidth,height:this.dom.box.offsetHeight}};return this.options.showStipes&&(t.dot={height:this.dom.dot.offsetHeight,width:this.dom.dot.offsetWidth},t.line={width:this.dom.line.offsetWidth}),t}_updateDomComponentsSizes(t){this.options.rtl?this.dom.box.style.right="0px":this.dom.box.style.left="0px",this.data.end?this.minWidth=t.box.width:this.width=t.box.width,this.height=t.box.height,this.options.rtl?this.dom.box.style.right=t.previous.right:this.dom.box.style.left=t.previous.left,this.dirty=!1}_repaintDomAdditionals(){this._repaintOnItemUpdateTimeTooltip(this.dom.box)}_isStipeVisible(){return this.minWidth>=this.width||!this.data.end}_getFitRange(){const t=.05*(this.data.max-this.data.min)/2;return{fitStart:this.data.min-t,fitEnd:this.data.max+t}}_fit(){if(this.emitter){const{fitStart:t,fitEnd:e}=this._getFitRange(),i={start:new Date(t),end:new Date(e),animation:!0};this.emitter.emit("fit",i)}}_getItemData(){return this.data}}zB.prototype.baseClassName="vis-item vis-range vis-cluster";const UB="__ungrouped__";class HB{constructor(t){this.itemSet=t,this.groups={},this.cache={},this.cache[-1]=[]}createClusterItem(t,e,i){return new zB(t,e,i)}setItems(t,e){this.items=t||[],this.dataChanged=!0,this.applyOnChangedLevel=!1,e&&e.applyOnChangedLevel&&(this.applyOnChangedLevel=e.applyOnChangedLevel)}updateData(){this.dataChanged=!0,this.applyOnChangedLevel=!1}getClusters(t,e,i){let{maxItems:n,clusterCriteria:o}="boolean"==typeof i?{}:i;o||(o=()=>!0),n=n||1;let r=-1,s=0;if(e>0){if(e>=1)return[];r=Math.abs(Math.round(Math.log(100/e)/Math.log(2))),s=Math.abs(Math.pow(2,r))}if(this.dataChanged){const t=r!=this.cacheLevel;(!this.applyOnChangedLevel||t)&&(this._dropLevelsCache(),this._filterData())}this.cacheLevel=r;let a=this.cache[r];if(!a){a=[];for(let e in this.groups)if(this.groups.hasOwnProperty(e)){const r=this.groups[e],l=r.length;let d=0;for(;d=0&&e.center-r[c].center=0&&e.center-a[u].centern){const s=l-n+1,c=[];let h=d;for(;c.lengtht.center-e.center));this.dataChanged=!1}_getClusterForItems(t,e,i,n){const o=(i||[]).map((t=>({cluster:t,itemsIds:new Set(t.data.uiItems.map((t=>t.id)))})));let r;if(o.length)for(let e of o)if(e.itemsIds.size===t.length&&t.every((t=>e.itemsIds.has(t.id)))){r=e.cluster;break}if(r)return r.setUiItems(t),r.group!==e&&(r.group&&r.group.remove(r),e&&(e.add(r),r.group=e)),r;let s=n.titleTemplate||"";const a={toScreen:this.itemSet.body.util.toScreen,toTime:this.itemSet.body.util.toTime},l=s.replace(/{count}/,t.length),d='
'+t.length+"
",c=Object.assign({},n,this.itemSet.options),h={content:d,title:l,group:e,uiItems:t,eventEmitter:this.itemSet.body.emitter,range:this.itemSet.body.range};return r=this.createClusterItem(h,a,c),e&&(e.add(r),r.group=e),r.attach(),r}_dropLevelsCache(){this.cache={},this.cacheLevel=-1,this.cache[this.cacheLevel]=[]}}const GB="__background__";class qB extends Hx{constructor(t,e){super(),this.body=t,this.defaultOptions={type:null,orientation:{item:"bottom"},align:"auto",stack:!0,stackSubgroups:!0,groupOrderSwap(t,e,i){const n=e.order;e.order=t.order,t.order=n},groupOrder:"order",selectable:!0,multiselect:!1,longSelectPressTime:251,itemsAlwaysDraggable:{item:!1,range:!1},editable:{updateTime:!1,updateGroup:!1,add:!1,remove:!1,overrideItems:!1},groupEditable:{order:!1,add:!1,remove:!1},snap:oB.snap,onDropObjectOnItem(t,e,i){i(e)},onAdd(t,e){e(t)},onUpdate(t,e){e(t)},onMove(t,e){e(t)},onRemove(t,e){e(t)},onMoving(t,e){e(t)},onAddGroup(t,e){e(t)},onMoveGroup(t,e){e(t)},onRemoveGroup(t,e){e(t)},margin:{item:{horizontal:10,vertical:10},axis:20},showTooltips:!0,tooltip:{followMouse:!1,overflowMethod:"flip",delay:500},tooltipOnItemUpdateTime:!1},this.options=Ux.extend({},this.defaultOptions),this.options.rtl=e.rtl,this.options.onTimeout=e.onTimeout,this.conversion={toScreen:t.util.toScreen,toTime:t.util.toTime},this.dom={},this.props={},this.hammer=null;const i=this;this.itemsData=null,this.groupsData=null,this.itemsSettingTime=null,this.initialItemSetDrawn=!1,this.userContinueNotBail=null,this.sequentialSelection=!1,this.itemListeners={add(t,e,n){i._onAdd(e.items),i.options.cluster&&i.clusterGenerator.setItems(i.items,{applyOnChangedLevel:!1}),i.redraw()},update(t,e,n){i._onUpdate(e.items),i.options.cluster&&i.clusterGenerator.setItems(i.items,{applyOnChangedLevel:!1}),i.redraw()},remove(t,e,n){i._onRemove(e.items),i.options.cluster&&i.clusterGenerator.setItems(i.items,{applyOnChangedLevel:!1}),i.redraw()}},this.groupListeners={add(t,e,n){if(i._onAddGroups(e.items),i.groupsData&&i.groupsData.length>0){const t=i.groupsData.getDataSet();t.get().forEach((e=>{if(e.nestedGroups){0!=e.showNested&&(e.showNested=!0);let i=[];e.nestedGroups.forEach((n=>{const o=t.get(n);o&&(o.nestedInGroup=e.id,0==e.showNested&&(o.visible=!1),i=i.concat(o))})),t.update(i,n)}}))}},update(t,e,n){i._onUpdateGroups(e.items)},remove(t,e,n){i._onRemoveGroups(e.items)}},this.items={},this.groups={},this.groupIds=[],this.selection=[],this.popup=null,this.popupTimer=null,this.touchParams={},this.groupTouchParams={group:null,isDragging:!1},this._create(),this.setOptions(e),this.clusters=[]}_create(){const t=document.createElement("div");t.className="vis-itemset",t["vis-itemset"]=this,this.dom.frame=t;const e=document.createElement("div");e.className="vis-background",t.appendChild(e),this.dom.background=e;const i=document.createElement("div");i.className="vis-foreground",t.appendChild(i),this.dom.foreground=i;const n=document.createElement("div");n.className="vis-axis",this.dom.axis=n;const o=document.createElement("div");o.className="vis-labelset",this.dom.labelSet=o,this._updateUngrouped();const r=new PB(GB,null,this);r.show(),this.groups[GB]=r,this.hammer=new iB(this.body.dom.centerContainer),this.hammer.on("hammer.input",(t=>{t.isFirst&&this._onTouch(t)})),this.hammer.on("panstart",this._onDragStart.bind(this)),this.hammer.on("panmove",this._onDrag.bind(this)),this.hammer.on("panend",this._onDragEnd.bind(this)),this.hammer.get("pan").set({threshold:5,direction:iB.ALL}),this.hammer.get("press").set({time:1e4}),this.hammer.on("tap",this._onSelectItem.bind(this)),this.hammer.on("press",this._onMultiSelectItem.bind(this)),this.hammer.get("press").set({time:1e4}),this.hammer.on("doubletap",this._onAddItem.bind(this)),this.options.rtl?this.groupHammer=new iB(this.body.dom.rightContainer):this.groupHammer=new iB(this.body.dom.leftContainer),this.groupHammer.on("tap",this._onGroupClick.bind(this)),this.groupHammer.on("panstart",this._onGroupDragStart.bind(this)),this.groupHammer.on("panmove",this._onGroupDrag.bind(this)),this.groupHammer.on("panend",this._onGroupDragEnd.bind(this)),this.groupHammer.get("pan").set({threshold:5,direction:iB.DIRECTION_VERTICAL}),this.body.dom.centerContainer.addEventListener("mouseover",this._onMouseOver.bind(this)),this.body.dom.centerContainer.addEventListener("mouseout",this._onMouseOut.bind(this)),this.body.dom.centerContainer.addEventListener("mousemove",this._onMouseMove.bind(this)),this.body.dom.centerContainer.addEventListener("contextmenu",this._onDragEnd.bind(this)),this.body.dom.centerContainer.addEventListener("mousewheel",this._onMouseWheel.bind(this)),this.show()}setOptions(t){if(t){const e=["type","rtl","align","order","stack","stackSubgroups","selectable","multiselect","sequentialSelection","multiselectPerGroup","longSelectPressTime","groupOrder","dataAttributes","template","groupTemplate","visibleFrameTemplate","hide","snap","groupOrderSwap","showTooltips","tooltip","tooltipOnItemUpdateTime","groupHeightMode","onTimeout"];Ux.selectiveExtend(e,this.options,t),"itemsAlwaysDraggable"in t&&("boolean"==typeof t.itemsAlwaysDraggable?(this.options.itemsAlwaysDraggable.item=t.itemsAlwaysDraggable,this.options.itemsAlwaysDraggable.range=!1):"object"==typeof t.itemsAlwaysDraggable&&(Ux.selectiveExtend(["item","range"],this.options.itemsAlwaysDraggable,t.itemsAlwaysDraggable),this.options.itemsAlwaysDraggable.item||(this.options.itemsAlwaysDraggable.range=!1))),"sequentialSelection"in t&&"boolean"==typeof t.sequentialSelection&&(this.options.sequentialSelection=t.sequentialSelection),"orientation"in t&&("string"==typeof t.orientation?this.options.orientation.item="top"===t.orientation?"top":"bottom":"object"==typeof t.orientation&&"item"in t.orientation&&(this.options.orientation.item=t.orientation.item)),"margin"in t&&("number"==typeof t.margin?(this.options.margin.axis=t.margin,this.options.margin.item.horizontal=t.margin,this.options.margin.item.vertical=t.margin):"object"==typeof t.margin&&(Ux.selectiveExtend(["axis"],this.options.margin,t.margin),"item"in t.margin&&("number"==typeof t.margin.item?(this.options.margin.item.horizontal=t.margin.item,this.options.margin.item.vertical=t.margin.item):"object"==typeof t.margin.item&&Ux.selectiveExtend(["horizontal","vertical"],this.options.margin.item,t.margin.item)))),["locale","locales"].forEach((e=>{e in t&&(this.options[e]=t[e])})),"editable"in t&&("boolean"==typeof t.editable?(this.options.editable.updateTime=t.editable,this.options.editable.updateGroup=t.editable,this.options.editable.add=t.editable,this.options.editable.remove=t.editable,this.options.editable.overrideItems=!1):"object"==typeof t.editable&&Ux.selectiveExtend(["updateTime","updateGroup","add","remove","overrideItems"],this.options.editable,t.editable)),"groupEditable"in t&&("boolean"==typeof t.groupEditable?(this.options.groupEditable.order=t.groupEditable,this.options.groupEditable.add=t.groupEditable,this.options.groupEditable.remove=t.groupEditable):"object"==typeof t.groupEditable&&Ux.selectiveExtend(["order","add","remove"],this.options.groupEditable,t.groupEditable));const i=e=>{const i=t[e];if(i){if("function"!=typeof i)throw new Error(`option ${e} must be a function ${e}(item, callback)`);this.options[e]=i}};["onDropObjectOnItem","onAdd","onUpdate","onRemove","onMove","onMoving","onAddGroup","onMoveGroup","onRemoveGroup"].forEach(i),t.cluster?(Object.assign(this.options,{cluster:t.cluster}),this.clusterGenerator||(this.clusterGenerator=new HB(this)),this.clusterGenerator.setItems(this.items,{applyOnChangedLevel:!1}),this.markDirty({refreshItems:!0,restackGroups:!0}),this.redraw()):this.clusterGenerator?(this._detachAllClusters(),this.clusters=[],this.clusterGenerator=null,this.options.cluster=void 0,this.markDirty({refreshItems:!0,restackGroups:!0}),this.redraw()):this.markDirty()}}markDirty(t){this.groupIds=[],t&&(t.refreshItems&&Ux.forEach(this.items,(t=>{t.dirty=!0,t.displayed&&t.redraw()})),t.restackGroups&&Ux.forEach(this.groups,((t,e)=>{e!==GB&&(t.stackDirty=!0)})))}destroy(){this.clearPopupTimer(),this.hide(),this.setItems(null),this.setGroups(null),this.hammer&&this.hammer.destroy(),this.groupHammer&&this.groupHammer.destroy(),this.hammer=null,this.body=null,this.conversion=null}hide(){this.dom.frame.parentNode&&this.dom.frame.parentNode.removeChild(this.dom.frame),this.dom.axis.parentNode&&this.dom.axis.parentNode.removeChild(this.dom.axis),this.dom.labelSet.parentNode&&this.dom.labelSet.parentNode.removeChild(this.dom.labelSet)}show(){this.dom.frame.parentNode||this.body.dom.center.appendChild(this.dom.frame),this.dom.axis.parentNode||this.body.dom.backgroundVertical.appendChild(this.dom.axis),this.dom.labelSet.parentNode||(this.options.rtl?this.body.dom.right.appendChild(this.dom.labelSet):this.body.dom.left.appendChild(this.dom.labelSet))}setPopupTimer(t){if(this.clearPopupTimer(),t){const e=this.options.tooltip.delay||"number"==typeof this.options.tooltip.delay?this.options.tooltip.delay:500;this.popupTimer=setTimeout((function(){t.show()}),e)}}clearPopupTimer(){null!=this.popupTimer&&(clearTimeout(this.popupTimer),this.popupTimer=null)}setSelection(t){null==t&&(t=[]),Array.isArray(t)||(t=[t]);const e=this.selection.filter((e=>-1===t.indexOf(e)));for(let t of e){const e=this.getItemById(t);e&&e.unselect()}this.selection=[...t];for(let e of t){const t=this.getItemById(e);t&&t.select()}}getSelection(){return this.selection.concat([])}getVisibleItems(){const t=this.body.range.getRange();let e,i;this.options.rtl?(e=this.body.util.toScreen(t.start),i=this.body.util.toScreen(t.end)):(i=this.body.util.toScreen(t.start),e=this.body.util.toScreen(t.end));const n=[];for(const t in this.groups)if(this.groups.hasOwnProperty(t)){const o=this.groups[t],r=o.isVisible?o.visibleItems:[];for(const t of r)this.options.rtl?t.righte&&n.push(t.id):t.lefti&&n.push(t.id)}return n}getItemsAtCurrentTime(t){let e,i;this.options.rtl?(e=this.body.util.toScreen(t),i=this.body.util.toScreen(t)):(i=this.body.util.toScreen(t),e=this.body.util.toScreen(t));const n=[];for(const t in this.groups)if(this.groups.hasOwnProperty(t)){const o=this.groups[t],r=o.isVisible?o.visibleItems:[];for(const t of r)this.options.rtl?t.righte&&n.push(t.id):t.lefti&&n.push(t.id)}return n}getVisibleGroups(){const t=[];for(const e in this.groups)if(this.groups.hasOwnProperty(e)){this.groups[e].isVisible&&t.push(e)}return t}getItemById(t){return this.items[t]||this.clusters.find((e=>e.id===t))}_deselect(t){const e=this.selection;for(let i=0,n=e.length;i{if(i===GB)return;const n=t==A?p:m;v[i]=t.redraw(e,n,u,!0),b=v[i].length}));if(b>0){const t={};for(let e=0;e{t[n]=i[e]()}));Ux.forEach(this.groups,((e,i)=>{if(i===GB)return;const n=t[i];r=n||r,g+=e.height})),g=Math.max(g,f)}return g=Math.max(g,f),s.style.height=i(g),this.props.width=s.offsetWidth,this.props.height=g,this.dom.axis.style.top=i("top"==o?this.body.domProps.top.height+this.body.domProps.border.top:this.body.domProps.top.height+this.body.domProps.centerContainer.height),this.options.rtl?this.dom.axis.style.right="0":this.dom.axis.style.left="0",this.hammer.get("press").set({time:this.options.longSelectPressTime}),this.initialItemSetDrawn=!0,r=this._isResized()||r,r}_firstGroup(){const t="top"==this.options.orientation.item?0:this.groupIds.length-1,e=this.groupIds[t];return this.groups[e]||this.groups.__ungrouped__||null}_updateUngrouped(){let t,e,i=this.groups.__ungrouped__;if(this.groupsData){if(i)for(e in i.dispose(),delete this.groups.__ungrouped__,this.items)if(this.items.hasOwnProperty(e)){t=this.items[e],t.parent&&t.parent.remove(t);const i=this.getGroupId(t.data),n=this.groups[i];n&&n.add(t)||t.hide()}}else if(!i){const n=null,o=null;for(e in i=new RB(n,o,this),this.groups.__ungrouped__=i,this.items)this.items.hasOwnProperty(e)&&(t=this.items[e],i.add(t));i.show()}}getLabelSet(){return this.dom.labelSet}setItems(t){this.itemsSettingTime=new Date;const e=this;let i;const n=this.itemsData;if(t){if(!Ox(t))throw new TypeError("Data must implement the interface of DataSet or DataView");this.itemsData=Fx(t)}else this.itemsData=null;if(n&&(Ux.forEach(this.itemListeners,((t,e)=>{n.off(e,t)})),n.dispose(),i=n.getIds(),this._onRemove(i)),this.itemsData){const t=this.id;Ux.forEach(this.itemListeners,((i,n)=>{e.itemsData.on(n,i,t)})),i=this.itemsData.getIds(),this._onAdd(i),this._updateUngrouped()}this.body.emitter.emit("_change",{queue:!0})}getItems(){return null!=this.itemsData?this.itemsData.rawDS:null}setGroups(t){const e=this;let i;if(this.groupsData&&(Ux.forEach(this.groupListeners,((t,i)=>{e.groupsData.off(i,t)})),i=this.groupsData.getIds(),this.groupsData=null,this._onRemoveGroups(i)),t){if(!Ox(t))throw new TypeError("Data must implement the interface of DataSet or DataView");this.groupsData=t}else this.groupsData=null;if(this.groupsData){const t=this.groupsData.getDataSet();t.get().forEach((e=>{e.nestedGroups&&e.nestedGroups.forEach((i=>{const n=t.get(i);n.nestedInGroup=e.id,0==e.showNested&&(n.visible=!1),t.update(n)}))}));const n=this.id;Ux.forEach(this.groupListeners,((t,i)=>{e.groupsData.on(i,t,n)})),i=this.groupsData.getIds(),this._onAddGroups(i)}this._updateUngrouped(),this._order(),this.options.cluster&&(this.clusterGenerator.updateData(),this._clusterItems(),this.markDirty({refreshItems:!0,restackGroups:!0})),this.body.emitter.emit("_change",{queue:!0})}getGroups(){return this.groupsData}removeItem(t){const e=this.itemsData.get(t);e&&this.options.onRemove(e,(e=>{e&&this.itemsData.remove(t)}))}_getType(t){return t.type||this.options.type||(t.end?"range":"box")}getGroupId(t){return"background"==this._getType(t)&&null==t.group?GB:this.groupsData?t.group:"__ungrouped__"}_onUpdate(t){const e=this;t.forEach((t=>{const i=e.itemsData.get(t);let n=e.items[t];const o=i?e._getType(i):null,r=qB.types[o];let s;if(n&&(r&&n instanceof r?e._updateItem(n,i):(s=n.selected,e._removeItem(n),n=null)),!n&&i){if(!r)throw new TypeError(`Unknown item type "${o}"`);n=new r(i,e.conversion,e.options),n.id=t,e._addItem(n),s&&(this.selection.push(t),n.select())}})),this._order(),this.options.cluster&&(this.clusterGenerator.setItems(this.items,{applyOnChangedLevel:!1}),this._clusterItems()),this.body.emitter.emit("_change",{queue:!0})}_onRemove(t){let e=0;const i=this;t.forEach((t=>{const n=i.items[t];n&&(e++,i._removeItem(n))})),e&&(this._order(),this.body.emitter.emit("_change",{queue:!0}))}_order(){Ux.forEach(this.groups,(t=>{t.order()}))}_onUpdateGroups(t){this._onAddGroups(t)}_onAddGroups(t){const e=this;t.forEach((t=>{const i=e.groupsData.get(t);let n=e.groups[t];if(n)n.setData(i);else{if("__ungrouped__"==t||t==GB)throw new Error(`Illegal group id. ${t} is a reserved id.`);const o=Object.create(e.options);Ux.extend(o,{height:null}),n=new RB(t,i,e),e.groups[t]=n;for(const i in e.items)if(e.items.hasOwnProperty(i)){const o=e.items[i];o.data.group==t&&n.add(o)}n.order(),n.show()}})),this.body.emitter.emit("_change",{queue:!0})}_onRemoveGroups(t){t.forEach((t=>{const e=this.groups[t];e&&(e.dispose(),delete this.groups[t])})),this.options.cluster&&(this.clusterGenerator.updateData(),this._clusterItems()),this.markDirty({restackGroups:!!this.options.cluster}),this.body.emitter.emit("_change",{queue:!0})}_orderGroups(){if(this.groupsData){let t=this.groupsData.getIds({order:this.options.groupOrder});t=this._orderNestedGroups(t);const e=!Ux.equalArray(t,this.groupIds);if(e){const e=this.groups;t.forEach((t=>{e[t].hide()})),t.forEach((t=>{e[t].show()})),this.groupIds=t}return e}return!1}_orderNestedGroups(t){return function t(e,i){let n=[];return i.forEach((i=>{n.push(i);if(e.groupsData.get(i).nestedGroups){const o=e.groupsData.get({filter:t=>t.nestedInGroup==i,order:e.options.groupOrder}).map((t=>t.id));n=n.concat(t(e,o))}})),n}(this,t.filter((t=>!this.groupsData.get(t).nestedInGroup)))}_addItem(t){this.items[t.id]=t;const e=this.getGroupId(t.data),i=this.groups[e];i?i&&i.data&&i.data.showNested&&(t.groupShowing=!0):t.groupShowing=!1,i&&i.add(t)}_updateItem(t,e){t.setData(e);const i=this.getGroupId(t.data),n=this.groups[i];n?n&&n.data&&n.data.showNested&&(t.groupShowing=!0):t.groupShowing=!1}_removeItem(t){t.hide(),delete this.items[t.id];const e=this.selection.indexOf(t.id);-1!=e&&this.selection.splice(e,1),t.parent&&t.parent.remove(t),null!=this.popup&&this.popup.hide()}_constructByEndArray(t){const e=[];for(let i=0;i{const o=i.items[e],r=i._getGroupIndex(o.data.group);return{item:o,initialX:t.center.x,groupOffset:n-r,data:this._cloneItemData(o.data)}}))}t.stopPropagation()}else this.options.editable.add&&(t.srcEvent.ctrlKey||t.srcEvent.metaKey)&&this._onDragStartAddItem(t)}_onDragStartAddItem(t){const e=this.options.snap||null,i=this.dom.frame.getBoundingClientRect(),n=this.options.rtl?i.right-t.center.x+10:t.center.x-i.left-10,o=this.body.util.toTime(n),r=this.body.util.getScale(),s=this.body.util.getStep(),a=e?e(o,r,s):o,l={type:"range",start:a,end:a,content:"new item"},d=gE();l[this.itemsData.idProp]=d;const c=this.groupFromTarget(t);c&&(l.group=c.groupId);const h=new FB(l,this.conversion,this.options);h.id=d,h.data=this._cloneItemData(l),this._addItem(h),this.touchParams.selectedItem=h;const u={item:h,initialX:t.center.x,data:h.data};this.options.rtl?u.dragLeft=!0:u.dragRight=!0,this.touchParams.itemProps=[u],t.stopPropagation()}_onDrag(t){if(null!=this.popup&&this.options.showTooltips&&!this.popup.hidden){const e=this.body.dom.centerContainer,i=e.getBoundingClientRect();this.popup.setPosition(t.center.x-i.left+e.offsetLeft,t.center.y-i.top+e.offsetTop),this.popup.show()}if(this.touchParams.itemProps){t.stopPropagation();const e=this,i=this.options.snap||null,n=this.body.dom.root.offsetLeft,o=this.options.rtl?n+this.body.domProps.right.width:n+this.body.domProps.left.width,r=this.body.util.getScale(),s=this.body.util.getStep(),a=this.touchParams.selectedItem,l=(this.options.editable.overrideItems||null==a.editable)&&this.options.editable.updateGroup||!this.options.editable.overrideItems&&null!=a.editable&&a.editable.updateGroup;let d=null;if(l&&a&&null!=a.data.group){const i=e.groupFromTarget(t);i&&(d=this._getGroupIndex(i.groupId))}this.touchParams.itemProps.forEach((n=>{const c=e.body.util.toTime(t.center.x-o),h=e.body.util.toTime(n.initialX-o);let u,A,p,m,g;u=this.options.rtl?-(c-h):c-h;let f=this._cloneItemData(n.item.data);if(null!=n.item.editable&&!n.item.editable.updateTime&&!n.item.editable.updateGroup&&!e.options.editable.overrideItems)return;if((this.options.editable.overrideItems||null==a.editable)&&this.options.editable.updateTime||!this.options.editable.overrideItems&&null!=a.editable&&a.editable.updateTime)if(n.dragLeft)this.options.rtl?null!=f.end&&(p=Ux.convert(n.data.end,"Date"),g=new Date(p.valueOf()+u),f.end=i?i(g,r,s):g):null!=f.start&&(A=Ux.convert(n.data.start,"Date"),m=new Date(A.valueOf()+u),f.start=i?i(m,r,s):m);else if(n.dragRight)this.options.rtl?null!=f.start&&(A=Ux.convert(n.data.start,"Date"),m=new Date(A.valueOf()+u),f.start=i?i(m,r,s):m):null!=f.end&&(p=Ux.convert(n.data.end,"Date"),g=new Date(p.valueOf()+u),f.end=i?i(g,r,s):g);else if(null!=f.start)if(A=Ux.convert(n.data.start,"Date").valueOf(),m=new Date(A+u),null!=f.end){p=Ux.convert(n.data.end,"Date");const t=p.valueOf()-A.valueOf();f.start=i?i(m,r,s):m,f.end=new Date(f.start.valueOf()+t)}else f.start=i?i(m,r,s):m;if(l&&!n.dragLeft&&!n.dragRight&&null!=d&&null!=f.group){let t=d-n.groupOffset;t=Math.max(0,t),t=Math.min(e.groupIds.length-1,t),f.group=e.groupIds[t]}f=this._cloneItemData(f),e.options.onMoving(f,(t=>{t&&n.item.setData(this._cloneItemData(t,"Date"))}))})),this.body.emitter.emit("_change")}}_moveToGroup(t,e){const i=this.groups[e];if(i&&i.groupId!=t.data.group){const e=t.parent;e.remove(t),e.order(),t.data.group=i.groupId,i.add(t),i.order()}}_onDragEnd(t){if(this.touchParams.itemIsDragging=!1,this.touchParams.itemProps){t.stopPropagation();const e=this,i=this.touchParams.itemProps;this.touchParams.itemProps=null,i.forEach((t=>{const i=t.item.id;if(null!=e.itemsData.get(i)){const n=this._cloneItemData(t.item.data);e.options.onMove(n,(n=>{n?(n[this.itemsData.idProp]=i,this.itemsData.update(n)):(t.item.setData(t.data),e.body.emitter.emit("_change"))}))}else e.options.onAdd(t.item.data,(i=>{e._removeItem(t.item),i&&e.itemsData.add(i),e.body.emitter.emit("_change")}))}))}}_onGroupClick(t){const e=this.groupFromTarget(t);setTimeout((()=>{this.toggleGroupShowNested(e)}),1)}toggleGroupShowNested(t,e){if(!t||!t.nestedGroups)return;const i=this.groupsData.getDataSet();t.showNested=null!=e?!!e:!t.showNested;let n=i.get(t.groupId);n.showNested=t.showNested;let o=t.nestedGroups,r=o;for(;r.length>0;){let t=r;r=[];for(let e=0;e0&&(o=o.concat(r))}let s=i.get(o).map((function(t){return null==t.visible&&(t.visible=!0),t.visible=!!n.showNested,t}));i.update(s.concat(n)),n.showNested?(Ux.removeClassName(t.dom.label,"collapsed"),Ux.addClassName(t.dom.label,"expanded")):(Ux.removeClassName(t.dom.label,"expanded"),Ux.addClassName(t.dom.label,"collapsed"))}toggleGroupDragClassName(t){t.dom.label.classList.toggle("vis-group-is-dragging"),t.dom.foreground.classList.toggle("vis-group-is-dragging")}_onGroupDragStart(t){this.groupTouchParams.isDragging||this.options.groupEditable.order&&(this.groupTouchParams.group=this.groupFromTarget(t),this.groupTouchParams.group&&(t.stopPropagation(),this.groupTouchParams.isDragging=!0,this.toggleGroupDragClassName(this.groupTouchParams.group),this.groupTouchParams.originalOrder=this.groupsData.getIds({order:this.options.groupOrder})))}_onGroupDrag(t){if(this.options.groupEditable.order&&this.groupTouchParams.group){t.stopPropagation();const e=this.groupsData.getDataSet(),i=this.groupFromTarget(t);if(i&&i.height!=this.groupTouchParams.group.height){const e=i.topn)return}}if(i&&i!=this.groupTouchParams.group){const t=e.get(i.groupId),n=e.get(this.groupTouchParams.group.groupId);n&&t&&(this.options.groupOrderSwap(n,t,e),e.update(n),e.update(t));const o=e.getIds({order:this.options.groupOrder});if(!Ux.equalArray(o,this.groupTouchParams.originalOrder)){const t=this.groupTouchParams.originalOrder,i=this.groupTouchParams.group.groupId,n=Math.min(t.length,o.length);let r=0,s=0,a=0;for(;r=n)break;if(o[r+s]==i)s=1;else if(t[r+a]==i)a=1;else{const i=o.indexOf(t[r+a]),n=e.get(o[r+s]),l=e.get(t[r+a]);this.options.groupOrderSwap(n,l,e),e.update(n),e.update(l);const d=o[r+s];o[r+s]=t[r+a],o[i]=d,r++}}}}}}_onGroupDragEnd(t){if(this.groupTouchParams.isDragging=!1,this.options.groupEditable.order&&this.groupTouchParams.group){t.stopPropagation();const e=this,i=e.groupTouchParams.group.groupId,n=e.groupsData.getDataSet(),o=Ux.extend({},n.get(i));e.options.onMoveGroup(o,(t=>{if(t)t[n._idProp]=i,n.update(t);else{const t=n.getIds({order:e.options.groupOrder});if(!Ux.equalArray(t,e.groupTouchParams.originalOrder)){const i=e.groupTouchParams.originalOrder,o=Math.min(i.length,t.length);let r=0;for(;r=o)break;const s=t.indexOf(i[r]),a=n.get(t[r]),l=n.get(i[r]);e.options.groupOrderSwap(a,l,n),n.update(a),n.update(l);const d=t[r];t[r]=i[r],t[s]=d,r++}}}})),e.body.emitter.emit("groupDragged",{groupId:i}),this.toggleGroupDragClassName(this.groupTouchParams.group),this.groupTouchParams.group=null}}_onSelectItem(t){if(!this.options.selectable)return;const e=t.srcEvent&&(t.srcEvent.ctrlKey||t.srcEvent.metaKey),i=t.srcEvent&&t.srcEvent.shiftKey;if(e||i)return void this._onMultiSelectItem(t);const n=this.getSelection(),o=this.itemFromTarget(t),r=o&&o.selectable?[o.id]:[];this.setSelection(r);const s=this.getSelection();(s.length>0||n.length>0)&&this.body.emitter.emit("select",{items:s,event:t})}_onMouseOver(t){const e=this.itemFromTarget(t);if(!e)return;if(e===this.itemFromRelatedTarget(t))return;const i=e.getTitle();if(this.options.showTooltips&&i){null==this.popup&&(this.popup=new jB(this.body.dom.root,this.options.tooltip.overflowMethod||"flip")),this.popup.setText(i);const e=this.body.dom.centerContainer,n=e.getBoundingClientRect();this.popup.setPosition(t.clientX-n.left+e.offsetLeft,t.clientY-n.top+e.offsetTop),this.setPopupTimer(this.popup)}else this.clearPopupTimer(),null!=this.popup&&this.popup.hide();this.body.emitter.emit("itemover",{item:e.id,event:t})}_onMouseOut(t){const e=this.itemFromTarget(t);if(!e)return;e!==this.itemFromRelatedTarget(t)&&(this.clearPopupTimer(),null!=this.popup&&this.popup.hide(),this.body.emitter.emit("itemout",{item:e.id,event:t}))}_onMouseMove(t){if(this.itemFromTarget(t)&&(null!=this.popupTimer&&this.setPopupTimer(this.popup),this.options.showTooltips&&this.options.tooltip.followMouse&&this.popup&&!this.popup.hidden)){const e=this.body.dom.centerContainer,i=e.getBoundingClientRect();this.popup.setPosition(t.clientX-i.left+e.offsetLeft,t.clientY-i.top+e.offsetTop),this.popup.show()}}_onMouseWheel(t){this.touchParams.itemIsDragging&&this._onDragEnd(t)}_onUpdateItem(t){if(!this.options.selectable)return;if(!this.options.editable.updateTime&&!this.options.editable.updateGroup)return;const e=this;if(t){const i=e.itemsData.get(t.id);this.options.onUpdate(i,(t=>{t&&e.itemsData.update(t)}))}}_onDropObjectOnItem(t){const e=this.itemFromTarget(t),i=JSON.parse(t.dataTransfer.getData("text"));this.options.onDropObjectOnItem(i,e)}_onAddItem(t){if(!this.options.selectable)return;if(!this.options.editable.add)return;const e=this,i=this.options.snap||null,n=this.dom.frame.getBoundingClientRect(),o=this.options.rtl?n.right-t.center.x:t.center.x-n.left,r=this.body.util.toTime(o),s=this.body.util.getScale(),a=this.body.util.getStep();let l,d;"drop"==t.type?(d=JSON.parse(t.dataTransfer.getData("text")),d.content=d.content?d.content:"new item",d.start=d.start?d.start:i?i(r,s,a):r,d.type=d.type||"box",d[this.itemsData.idProp]=d.id||gE(),"range"!=d.type||d.end||(l=this.body.util.toTime(o+this.props.width/5),d.end=i?i(l,s,a):l)):(d={start:i?i(r,s,a):r,content:"new item"},d[this.itemsData.idProp]=gE(),"range"===this.options.type&&(l=this.body.util.toTime(o+this.props.width/5),d.end=i?i(l,s,a):l));const c=this.groupFromTarget(t);c&&(d.group=c.groupId),d=this._cloneItemData(d),this.options.onAdd(d,(i=>{i&&(e.itemsData.add(i),"drop"==t.type&&e.setSelection([i.id]))}))}_onMultiSelectItem(t){if(!this.options.selectable)return;const e=this.itemFromTarget(t);if(e){let i=this.options.multiselect?this.getSelection():[];if((t.srcEvent&&t.srcEvent.shiftKey||!1||this.options.sequentialSelection)&&this.options.multiselect){const t=this.itemsData.get(e.id).group;let n;this.options.multiselectPerGroup&&i.length>0&&(n=this.itemsData.get(i[0]).group),this.options.multiselectPerGroup&&null!=n&&n!=t||i.push(e.id);const o=qB._getItemRange(this.itemsData.get(i));if(!this.options.multiselectPerGroup||n==t){i=[];for(const t in this.items)if(this.items.hasOwnProperty(t)){const e=this.items[t],r=e.data.start,s=void 0!==e.data.end?e.data.end:r;!(r>=o.min&&s<=o.max)||this.options.multiselectPerGroup&&n!=this.itemsData.get(e.id).group||e instanceof LB||i.push(e.id)}}}else{const t=i.indexOf(e.id);-1==t?i.push(e.id):i.splice(t,1)}const n=i.filter((t=>this.getItemById(t).selectable));this.setSelection(n),this.body.emitter.emit("select",{items:this.getSelection(),event:t})}}static _getItemRange(t){let e=null,i=null;return t.forEach((t=>{(null==i||t.starte)&&(e=t.end):(null==e||t.start>e)&&(e=t.start)})),{min:i,max:e}}itemFromElement(t){let e=t;for(;e;){if(e.hasOwnProperty("vis-item"))return e["vis-item"];e=e.parentNode}return null}itemFromTarget(t){return this.itemFromElement(t.target)}itemFromRelatedTarget(t){return this.itemFromElement(t.relatedTarget)}groupFromTarget(t){const e=t.center?t.center.y:t.clientY;let i=this.groupIds;i.length<=0&&this.groupsData&&(i=this.groupsData.getIds({order:this.options.groupOrder}));for(let t=0;t=s.top&&es.top)return o}else if(0===t&&et.id))),i=this.clusters.filter((t=>!e.has(t.id)));let n=!1;for(let t of i){const e=this.selection.indexOf(t.id);-1!==e&&(t.unselect(),this.selection.splice(e,1),n=!0)}if(n){const t=this.getSelection();this.body.emitter.emit("select",{items:t,event:event})}}this.clusters=t||[]}}qB.types={background:LB,box:class extends NB{constructor(t,e,i){if(super(t,e,i),this.props={dot:{width:0,height:0},line:{width:0,height:0}},t&&null==t.start)throw new Error(`Property "start" missing in item ${t}`)}isVisible(t){if(this.cluster)return!1;let e;const i=this.data.align||this.options.align,n=this.width*t.getMillisecondsPerPixel();return e="right"==i?this.data.start.getTime()>t.start&&this.data.start.getTime()-nt.start&&this.data.start.getTime()t.start&&this.data.start.getTime()-n/2{this.dirty&&(e=this._getDomComponentsSizes())},()=>{this.dirty&&this._updateDomComponentsSizes.bind(this)(e)},this._repaintDomAdditionals.bind(this)];if(t)return i;{let t;return i.forEach((e=>{t=e()})),t}}show(t){if(!this.displayed)return this.redraw(t)}hide(){if(this.displayed){const t=this.dom;t.box.remove?t.box.remove():t.box.parentNode&&t.box.parentNode.removeChild(t.box),t.line.remove?t.line.remove():t.line.parentNode&&t.line.parentNode.removeChild(t.line),t.dot.remove?t.dot.remove():t.dot.parentNode&&t.dot.parentNode.removeChild(t.dot),this.displayed=!1}}repositionXY(){const t=this.options.rtl,e=(t,e,i,n=!1)=>{if(void 0===e&&void 0===i)return;const o=n?-1*e:e;t.style.transform=void 0!==i?void 0!==e?`translate(${o}px, ${i}px)`:`translateY(${i}px)`:`translateX(${o}px)`};e(this.dom.box,this.boxX,this.boxY,t),e(this.dom.dot,this.dotX,this.dotY,t),e(this.dom.line,this.lineX,this.lineY,t)}repositionX(){const t=this.conversion.toScreen(this.data.start),e=void 0===this.data.align?this.options.align:this.data.align,i=this.props.line.width,n=this.props.dot.width;"right"==e?(this.boxX=t-this.width,this.lineX=t-i,this.dotX=t-i/2-n/2):"left"==e?(this.boxX=t,this.lineX=t,this.dotX=t+i/2-n/2):(this.boxX=t-this.width/2,this.lineX=this.options.rtl?t-i:t-i/2,this.dotX=t-n/2),this.options.rtl?this.right=this.boxX:this.left=this.boxX,this.repositionXY()}repositionY(){const t=this.options.orientation.item,e=this.dom.line.style;if("top"==t){const t=this.parent.top+this.top+1;this.boxY=this.top||0,e.height=`${t}px`,e.bottom="",e.top="0"}else{const t=this.parent.itemSet.props.height-this.parent.top-this.parent.height+this.top;this.boxY=this.parent.height-this.top-(this.height||0),e.height=`${t}px`,e.top="",e.bottom="0"}this.dotY=-this.props.dot.height/2,this.repositionXY()}getWidthLeft(){return this.width/2}getWidthRight(){return this.width/2}},range:FB,point:class extends NB{constructor(t,e,i){if(super(t,e,i),this.props={dot:{top:0,width:0,height:0},content:{height:0,marginLeft:0,marginRight:0}},t&&null==t.start)throw new Error(`Property "start" missing in item ${t}`)}isVisible(t){if(this.cluster)return!1;const e=this.width*t.getMillisecondsPerPixel();return this.data.start.getTime()+e>t.start&&this.data.start{this.dirty&&(e=this._getDomComponentsSizes())},()=>{this.dirty&&this._updateDomComponentsSizes.bind(this)(e)},this._repaintDomAdditionals.bind(this)];if(t)return i;{let t;return i.forEach((e=>{t=e()})),t}}repositionXY(){const t=this.options.rtl;((t,e,i,n=!1)=>{if(void 0===e&&void 0===i)return;const o=n?-1*e:e;t.style.transform=void 0!==i?void 0!==e?`translate(${o}px, ${i}px)`:`translateY(${i}px)`:`translateX(${o}px)`})(this.dom.point,this.pointX,this.pointY,t)}show(t){if(!this.displayed)return this.redraw(t)}hide(){this.displayed&&(this.dom.point.parentNode&&this.dom.point.parentNode.removeChild(this.dom.point),this.displayed=!1)}repositionX(){const t=this.conversion.toScreen(this.data.start);this.pointX=t,this.options.rtl?this.right=t-this.props.dot.width:this.left=t-this.props.dot.width,this.repositionXY()}repositionY(){const t=this.options.orientation.item;this.pointY="top"==t?this.top:this.parent.height-this.top-this.height,this.repositionXY()}getWidthLeft(){return this.props.dot.width}getWidthRight(){return this.props.dot.width}}},qB.prototype._onAdd=qB.prototype._onUpdate;let YB,$B=!1,WB="background: #FFeeee; color: #dd0000";class VB{constructor(){}static validate(t,e,i){$B=!1,YB=e;let n=e;return void 0!==i&&(n=e[i]),VB.parse(t,n,[]),$B}static parse(t,e,i){for(let n in t)t.hasOwnProperty(n)&&VB.check(n,t,e,i)}static check(t,e,i,n){if(void 0===i[t]&&void 0===i.__any__)return void VB.getSuggestion(t,i,n);let o=t,r=!0;void 0===i[t]&&void 0!==i.__any__&&(o="__any__",r="object"===VB.getType(e[t]));let s=i[o];r&&void 0!==s.__type__&&(s=s.__type__),VB.checkFields(t,e,i,o,s,n)}static checkFields(t,e,i,n,o,r){let s=function(e){console.log("%c"+e+VB.printLocation(r,t),WB)},a=VB.getType(e[t]),l=o[a];void 0!==l?"array"===VB.getType(l)&&-1===l.indexOf(e[t])?(s('Invalid option detected in "'+t+'". Allowed values are:'+VB.print(l)+' not "'+e[t]+'". '),$B=!0):"object"===a&&"__any__"!==n&&(r=Ux.copyAndExtendArray(r,t),VB.parse(e[t],i[n],r)):void 0===o.any&&(s('Invalid type received for "'+t+'". Expected: '+VB.print(Object.keys(o))+". Received ["+a+'] "'+e[t]+'"'),$B=!0)}static getType(t){var e=typeof t;return"object"===e?null===t?"null":t instanceof Boolean?"boolean":t instanceof Number?"number":t instanceof String?"string":Array.isArray(t)?"array":t instanceof Date?"date":void 0!==t.nodeType?"dom":!0===t._isAMomentObject?"moment":"object":"number"===e?"number":"boolean"===e?"boolean":"string"===e?"string":void 0===e?"undefined":e}static getSuggestion(t,e,i){let n,o=VB.findInOptions(t,e,i,!1),r=VB.findInOptions(t,YB,[],!0);n=void 0!==o.indexMatch?" in "+VB.printLocation(o.path,t,"")+'Perhaps it was incomplete? Did you mean: "'+o.indexMatch+'"?\n\n':r.distance<=4&&o.distance>r.distance?" in "+VB.printLocation(o.path,t,"")+"Perhaps it was misplaced? Matching option found at: "+VB.printLocation(r.path,r.closestMatch,""):o.distance<=8?'. Did you mean "'+o.closestMatch+'"?'+VB.printLocation(o.path,t):". Did you mean one of these: "+VB.print(Object.keys(e))+VB.printLocation(i,t),console.log('%cUnknown option detected: "'+t+'"'+n,WB),$B=!0}static findInOptions(t,e,i,n=!1){let o,r=1e9,s="",a=[],l=t.toLowerCase();for(let d in e){let c;if(void 0!==e[d].__type__&&!0===n){let n=VB.findInOptions(t,e[d],Ux.copyAndExtendArray(i,d));r>n.distance&&(s=n.closestMatch,a=n.path,r=n.distance,o=n.indexMatch)}else-1!==d.toLowerCase().indexOf(l)&&(o=d),c=VB.levenshteinDistance(t,d),r>c&&(s=d,a=Ux.copyArray(i),r=c)}return{closestMatch:s,path:a,distance:r,indexMatch:o}}static printLocation(t,e,i="Problem value found at: \n"){let n="\n\n"+i+"options = {\n";for(let e=0;e{},this.closeCallback=()=>{},this._create()}insertTo(t){void 0!==this.hammer&&(this.hammer.destroy(),this.hammer=void 0),this.container=t,this.container.appendChild(this.frame),this._bindHammer(),this._setSize()}setUpdateCallback(t){if("function"!=typeof t)throw new Error("Function attempted to set as colorPicker update callback is not a function.");this.updateCallback=t}setCloseCallback(t){if("function"!=typeof t)throw new Error("Function attempted to set as colorPicker closing callback is not a function.");this.closeCallback=t}_isColorString(t){if("string"==typeof t)return XB[t]}setColor(t,e=!0){if("none"===t)return;let i;var n=this._isColorString(t);if(void 0!==n&&(t=n),!0===Ux.isString(t)){if(!0===Ux.isValidRGB(t)){let e=t.substr(4).substr(0,t.length-5).split(",");i={r:e[0],g:e[1],b:e[2],a:1}}else if(!0===Ux.isValidRGBA(t)){let e=t.substr(5).substr(0,t.length-6).split(",");i={r:e[0],g:e[1],b:e[2],a:e[3]}}else if(!0===Ux.isValidHex(t)){let e=Ux.hexToRGB(t);i={r:e.r,g:e.g,b:e.b,a:1}}}else if(t instanceof Object&&void 0!==t.r&&void 0!==t.g&&void 0!==t.b){let e=void 0!==t.a?t.a:"1.0";i={r:t.r,g:t.g,b:t.b,a:e}}if(void 0===i)throw new Error("Unknown color passed to the colorPicker. Supported are strings: rgb, hex, rgba. Object: rgb ({r:r,g:g,b:b,[a:a]}). Supplied: "+JSON.stringify(t));this._setColor(i,e)}show(){void 0!==this.closeCallback&&(this.closeCallback(),this.closeCallback=void 0),this.applied=!1,this.frame.style.display="block",this._generateHueCircle()}_hide(t=!0){!0===t&&(this.previousColor=Ux.extend({},this.color)),!0===this.applied&&this.updateCallback(this.initialColor),this.frame.style.display="none",setTimeout((()=>{void 0!==this.closeCallback&&(this.closeCallback(),this.closeCallback=void 0)}),0)}_save(){this.updateCallback(this.color),this.applied=!1,this._hide()}_apply(){this.applied=!0,this.updateCallback(this.color),this._updatePicker(this.color)}_loadLast(){void 0!==this.previousColor?this.setColor(this.previousColor,!1):alert("There is no last color to load...")}_setColor(t,e=!0){!0===e&&(this.initialColor=Ux.extend({},t)),this.color=t;let i=Ux.RGBToHSV(t.r,t.g,t.b),n=2*Math.PI,o=this.r*i.s,r=this.centerCoordinates.x+o*Math.sin(n*i.h),s=this.centerCoordinates.y+o*Math.cos(n*i.h);this.colorPickerSelector.style.left=r-.5*this.colorPickerSelector.clientWidth+"px",this.colorPickerSelector.style.top=s-.5*this.colorPickerSelector.clientHeight+"px",this._updatePicker(t)}_setOpacity(t){this.color.a=t/100,this._updatePicker(this.color)}_setBrightness(t){let e=Ux.RGBToHSV(this.color.r,this.color.g,this.color.b);e.v=t/100;let i=Ux.HSVToRGB(e.h,e.s,e.v);i.a=this.color.a,this.color=i,this._updatePicker()}_updatePicker(t=this.color){let e=Ux.RGBToHSV(t.r,t.g,t.b),i=this.colorPickerCanvas.getContext("2d");void 0===this.pixelRation&&(this.pixelRatio=(window.devicePixelRatio||1)/(i.webkitBackingStorePixelRatio||i.mozBackingStorePixelRatio||i.msBackingStorePixelRatio||i.oBackingStorePixelRatio||i.backingStorePixelRatio||1)),i.setTransform(this.pixelRatio,0,0,this.pixelRatio,0,0);let n=this.colorPickerCanvas.clientWidth,o=this.colorPickerCanvas.clientHeight;i.clearRect(0,0,n,o),i.putImageData(this.hueCircle,0,0),i.fillStyle="rgba(0,0,0,"+(1-e.v)+")",i.circle(this.centerCoordinates.x,this.centerCoordinates.y,this.r),i.fill(),this.brightnessRange.value=100*e.v,this.opacityRange.value=100*t.a,this.initialColorDiv.style.backgroundColor="rgba("+this.initialColor.r+","+this.initialColor.g+","+this.initialColor.b+","+this.initialColor.a+")",this.newColorDiv.style.backgroundColor="rgba("+this.color.r+","+this.color.g+","+this.color.b+","+this.color.a+")"}_setSize(){this.colorPickerCanvas.style.width="100%",this.colorPickerCanvas.style.height="100%",this.colorPickerCanvas.width=289*this.pixelRatio,this.colorPickerCanvas.height=289*this.pixelRatio}_create(){if(this.frame=document.createElement("div"),this.frame.className="vis-color-picker",this.colorPickerDiv=document.createElement("div"),this.colorPickerSelector=document.createElement("div"),this.colorPickerSelector.className="vis-selector",this.colorPickerDiv.appendChild(this.colorPickerSelector),this.colorPickerCanvas=document.createElement("canvas"),this.colorPickerDiv.appendChild(this.colorPickerCanvas),this.colorPickerCanvas.getContext){let t=this.colorPickerCanvas.getContext("2d");this.pixelRatio=(window.devicePixelRatio||1)/(t.webkitBackingStorePixelRatio||t.mozBackingStorePixelRatio||t.msBackingStorePixelRatio||t.oBackingStorePixelRatio||t.backingStorePixelRatio||1),this.colorPickerCanvas.getContext("2d").setTransform(this.pixelRatio,0,0,this.pixelRatio,0,0)}else{let t=document.createElement("DIV");t.style.color="red",t.style.fontWeight="bold",t.style.padding="10px",t.innerHTML="Error: your browser does not support HTML canvas",this.colorPickerCanvas.appendChild(t)}this.colorPickerDiv.className="vis-color",this.opacityDiv=document.createElement("div"),this.opacityDiv.className="vis-opacity",this.brightnessDiv=document.createElement("div"),this.brightnessDiv.className="vis-brightness",this.arrowDiv=document.createElement("div"),this.arrowDiv.className="vis-arrow",this.opacityRange=document.createElement("input");try{this.opacityRange.type="range",this.opacityRange.min="0",this.opacityRange.max="100"}catch(t){}this.opacityRange.value="100",this.opacityRange.className="vis-range",this.brightnessRange=document.createElement("input");try{this.brightnessRange.type="range",this.brightnessRange.min="0",this.brightnessRange.max="100"}catch(t){}this.brightnessRange.value="100",this.brightnessRange.className="vis-range",this.opacityDiv.appendChild(this.opacityRange),this.brightnessDiv.appendChild(this.brightnessRange);var t=this;this.opacityRange.onchange=function(){t._setOpacity(this.value)},this.opacityRange.oninput=function(){t._setOpacity(this.value)},this.brightnessRange.onchange=function(){t._setBrightness(this.value)},this.brightnessRange.oninput=function(){t._setBrightness(this.value)},this.brightnessLabel=document.createElement("div"),this.brightnessLabel.className="vis-label vis-brightness",this.brightnessLabel.innerHTML="brightness:",this.opacityLabel=document.createElement("div"),this.opacityLabel.className="vis-label vis-opacity",this.opacityLabel.innerHTML="opacity:",this.newColorDiv=document.createElement("div"),this.newColorDiv.className="vis-new-color",this.newColorDiv.innerHTML="new",this.initialColorDiv=document.createElement("div"),this.initialColorDiv.className="vis-initial-color",this.initialColorDiv.innerHTML="initial",this.cancelButton=document.createElement("div"),this.cancelButton.className="vis-button vis-cancel",this.cancelButton.innerHTML="cancel",this.cancelButton.onclick=this._hide.bind(this,!1),this.applyButton=document.createElement("div"),this.applyButton.className="vis-button vis-apply",this.applyButton.innerHTML="apply",this.applyButton.onclick=this._apply.bind(this),this.saveButton=document.createElement("div"),this.saveButton.className="vis-button vis-save",this.saveButton.innerHTML="save",this.saveButton.onclick=this._save.bind(this),this.loadButton=document.createElement("div"),this.loadButton.className="vis-button vis-load",this.loadButton.innerHTML="load last",this.loadButton.onclick=this._loadLast.bind(this),this.frame.appendChild(this.colorPickerDiv),this.frame.appendChild(this.arrowDiv),this.frame.appendChild(this.brightnessLabel),this.frame.appendChild(this.brightnessDiv),this.frame.appendChild(this.opacityLabel),this.frame.appendChild(this.opacityDiv),this.frame.appendChild(this.newColorDiv),this.frame.appendChild(this.initialColorDiv),this.frame.appendChild(this.cancelButton),this.frame.appendChild(this.applyButton),this.frame.appendChild(this.saveButton),this.frame.appendChild(this.loadButton)}_bindHammer(){this.drag={},this.pinch={},this.hammer=new iB(this.colorPickerCanvas),this.hammer.get("pinch").set({enable:!0}),nB(this.hammer,(t=>{this._moveSelector(t)})),this.hammer.on("tap",(t=>{this._moveSelector(t)})),this.hammer.on("panstart",(t=>{this._moveSelector(t)})),this.hammer.on("panmove",(t=>{this._moveSelector(t)})),this.hammer.on("panend",(t=>{this._moveSelector(t)}))}_generateHueCircle(){if(!1===this.generated){let t=this.colorPickerCanvas.getContext("2d");void 0===this.pixelRation&&(this.pixelRatio=(window.devicePixelRatio||1)/(t.webkitBackingStorePixelRatio||t.mozBackingStorePixelRatio||t.msBackingStorePixelRatio||t.oBackingStorePixelRatio||t.backingStorePixelRatio||1)),t.setTransform(this.pixelRatio,0,0,this.pixelRatio,0,0);let e,i,n,o,r=this.colorPickerCanvas.clientWidth,s=this.colorPickerCanvas.clientHeight;t.clearRect(0,0,r,s),this.centerCoordinates={x:.5*r,y:.5*s},this.r=.49*r;let a,l=2*Math.PI/360,d=1/360,c=1/this.r;for(n=0;n<360;n++)for(o=0;o0&&this._makeItem([]),this._makeHeader(n),this._handleObject(this.configureOptions[n],[n])),e++);this._makeButton(),this._push()}_push(){this.wrapper=document.createElement("div"),this.wrapper.className="vis-configuration-wrapper",this.container.appendChild(this.wrapper);for(var t=0;t{i.appendChild(t)})),this.domElements.push(i),this.domElements.length}return 0}_makeHeader(t){let e=document.createElement("div");e.className="vis-configuration vis-config-header",e.innerHTML=Ux.xss(t),this._makeItem([],e)}_makeLabel(t,e,i=!1){let n=document.createElement("div");return n.className="vis-configuration vis-config-label vis-config-s"+e.length,n.innerHTML=!0===i?Ux.xss(""+t+":"):Ux.xss(t+":"),n}_makeDropdown(t,e,i){let n=document.createElement("select");n.className="vis-configuration vis-config-select";let o=0;void 0!==e&&-1!==t.indexOf(e)&&(o=t.indexOf(e));for(let e=0;er&&1!==r&&(a.max=Math.ceil(e*t),d=a.max,l="range increased"),a.value=e}else a.value=n;let c=document.createElement("input");c.className="vis-configuration vis-config-rangeinput",c.value=Number(a.value);var h=this;a.onchange=function(){c.value=this.value,h._update(Number(this.value),i)},a.oninput=function(){c.value=this.value};let u=this._makeLabel(i[i.length-1],i),A=this._makeItem(i,u,a,c);""!==l&&this.popupHistory[A]!==d&&(this.popupHistory[A]=d,this._setupPopup(l,A))}_makeButton(){if(!0===this.options.showButton){let t=document.createElement("div");t.className="vis-configuration vis-config-button",t.innerHTML="generate options",t.onclick=()=>{this._printOptions()},t.onmouseover=()=>{t.className="vis-configuration vis-config-button hover"},t.onmouseout=()=>{t.className="vis-configuration vis-config-button"},this.optionsContainer=document.createElement("div"),this.optionsContainer.className="vis-configuration vis-config-option-container",this.domElements.push(this.optionsContainer),this.domElements.push(t)}}_setupPopup(t,e){if(!0===this.initialized&&!0===this.allowCreation&&this.popupCounter{this._removePopup()},this.popupCounter+=1,this.popupDiv={html:i,index:e}}}_removePopup(){void 0!==this.popupDiv.html&&(this.popupDiv.html.parentNode.removeChild(this.popupDiv.html),clearTimeout(this.popupDiv.hideTimeout),clearTimeout(this.popupDiv.deleteTimeout),this.popupDiv={})}_showPopupIfNeeded(){if(void 0!==this.popupDiv.html){let t=this.domElements[this.popupDiv.index].getBoundingClientRect();this.popupDiv.html.style.left=t.left+"px",this.popupDiv.html.style.top=t.top-30+"px",document.body.appendChild(this.popupDiv.html),this.popupDiv.hideTimeout=setTimeout((()=>{this.popupDiv.html.style.opacity=0}),1500),this.popupDiv.deleteTimeout=setTimeout((()=>{this._removePopup()}),1800)}}_makeCheckbox(t,e,i){var n=document.createElement("input");n.type="checkbox",n.className="vis-configuration vis-config-checkbox",n.checked=t,void 0!==e&&(n.checked=e,e!==t&&("object"==typeof t?e!==t.enabled&&this.changedOptions.push({path:i,value:e}):this.changedOptions.push({path:i,value:e})));let o=this;n.onchange=function(){o._update(this.checked,i)};let r=this._makeLabel(i[i.length-1],i);this._makeItem(i,r,n)}_makeTextInput(t,e,i){var n=document.createElement("input");n.type="text",n.className="vis-configuration vis-config-text",n.value=e,e!==t&&this.changedOptions.push({path:i,value:e});let o=this;n.onchange=function(){o._update(this.value,i)};let r=this._makeLabel(i[i.length-1],i);this._makeItem(i,r,n)}_makeColorField(t,e,i){let n=t[1],o=document.createElement("div");"none"!==(e=void 0===e?n:e)?(o.className="vis-configuration vis-config-colorBlock",o.style.backgroundColor=e):o.className="vis-configuration vis-config-colorBlock none",e=void 0===e?n:e,o.onclick=()=>{this._showColorPicker(e,o,i)};let r=this._makeLabel(i[i.length-1],i);this._makeItem(i,r,o)}_showColorPicker(t,e,i){e.onclick=function(){},this.colorPicker.insertTo(e),this.colorPicker.show(),this.colorPicker.setColor(t),this.colorPicker.setUpdateCallback((t=>{let n="rgba("+t.r+","+t.g+","+t.b+","+t.a+")";e.style.backgroundColor=n,this._update(n,i)})),this.colorPicker.setCloseCallback((()=>{e.onclick=()=>{this._showColorPicker(t,e,i)}}))}_handleObject(t,e=[],i=!1){let n=!1,o=this.options.filter,r=!1;for(let s in t)if(t.hasOwnProperty(s)){n=!0;let a=t[s],l=Ux.copyAndExtendArray(e,s);if("function"==typeof o&&(n=o(s,e),!1===n&&!Array.isArray(a)&&"string"!=typeof a&&"boolean"!=typeof a&&a instanceof Object&&(this.allowCreation=!1,n=this._handleObject(a,l,!0),this.allowCreation=!1===i)),!1!==n){r=!0;let t=this._getValue(l);if(Array.isArray(a))this._handleArray(a,t,l);else if("string"==typeof a)this._makeTextInput(a,t,l);else if("boolean"==typeof a)this._makeCheckbox(a,t,l);else if(a instanceof Object){let t=!0;if(-1!==e.indexOf("physics")&&this.moduleOptions.physics.solver!==s&&(t=!1),!0===t)if(void 0!==a.enabled){let t=Ux.copyAndExtendArray(l,"enabled"),e=this._getValue(t);if(!0===e){let t=this._makeLabel(s,l,!0);this._makeItem(l,t),r=this._handleObject(a,l)||r}else this._makeCheckbox(a,e,l)}else{let t=this._makeLabel(s,l,!0);this._makeItem(l,t),r=this._handleObject(a,l)||r}}else console.error("dont know how to handle",a,s,l)}}return r}_handleArray(t,e,i){"string"==typeof t[0]&&"color"===t[0]?(this._makeColorField(t,e,i),t[1]!==e&&this.changedOptions.push({path:i,value:e})):"string"==typeof t[0]?(this._makeDropdown(t,e,i),t[0]!==e&&this.changedOptions.push({path:i,value:e})):"number"==typeof t[0]&&(this._makeRange(t,e,i),t[0]!==e&&this.changedOptions.push({path:i,value:Number(e)}))}_update(t,e){let i=this._constructOptions(t,e);this.parent.body&&this.parent.body.emitter&&this.parent.body.emitter.emit&&this.parent.body.emitter.emit("configChange",i),this.initialized=!0,this.parent.setOptions(i)}_constructOptions(t,e,i={}){let n=i;t="false"!==(t="true"===t||t)&&t;for(let i=0;ivar options = "+JSON.stringify(t,null,2)+""}getOptions(){let t={};for(var e=0;eo.timeAxis.step.scale,getStep:()=>o.timeAxis.step.step,toScreen:o._toScreen.bind(o),toGlobalScreen:o._toGlobalScreen.bind(o),toTime:o._toTime.bind(o),toGlobalTime:o._toGlobalTime.bind(o)}},this.range=new Xx(this.body,this.options),this.components.push(this.range),this.body.range=this.range,this.timeAxis=new rB(this.body,this.options),this.timeAxis2=null,this.components.push(this.timeAxis),this.currentTime=new EB(this.body,this.options),this.components.push(this.currentTime),this.itemSet=new qB(this.body,this.options),this.components.push(this.itemSet),this.itemsData=null,this.groupsData=null,this.dom.root.onclick=t=>{s("click",t)},this.dom.root.ondblclick=t=>{s("doubleClick",t)},this.dom.root.oncontextmenu=t=>{s("contextmenu",t)},this.dom.root.onmouseover=t=>{s("mouseOver",t)},window.PointerEvent?(this.dom.root.onpointerdown=t=>{s("mouseDown",t)},this.dom.root.onpointermove=t=>{s("mouseMove",t)},this.dom.root.onpointerup=t=>{s("mouseUp",t)}):(this.dom.root.onmousemove=t=>{s("mouseMove",t)},this.dom.root.onmousedown=t=>{s("mouseDown",t)},this.dom.root.onmouseup=t=>{s("mouseUp",t)}),this.initialFitDone=!1,this.on("changed",(()=>{if(null!=o.itemsData){if(!o.initialFitDone&&!o.options.rollingMode)if(o.initialFitDone=!0,null!=o.options.start||null!=o.options.end){if(null==o.options.start||null==o.options.end)var t=o.getItemRange();const e=null!=o.options.start?o.options.start:t.min,i=null!=o.options.end?o.options.end:t.max;o.setWindow(e,i,{animation:!1})}else o.fit({animation:!1});o.initialDrawDone||!o.initialRangeChangeDone&&(o.options.start||o.options.end)&&!o.options.rollingMode||(o.initialDrawDone=!0,o.itemSet.initialDrawDone=!0,o.dom.root.style.visibility="visible",o.dom.loadingScreen.parentNode.removeChild(o.dom.loadingScreen),o.options.onInitialDrawComplete&&setTimeout((()=>o.options.onInitialDrawComplete()),0))}})),this.on("destroyTimeline",(()=>{o.destroy()})),n&&this.setOptions(n),this.body.emitter.on("fit",(t=>{this._onFit(t),this.redraw()})),i&&this.setGroups(i),e&&this.setItems(e),this._redraw()}_createConfigurator(){return new ek(this,this.dom.container,ZB)}redraw(){this.itemSet&&this.itemSet.markDirty({refreshItems:!0}),this._redraw()}setOptions(t){if(!0===VB.validate(t,KB)&&console.log("%cErrors have been found in the supplied options object.",WB),IB.prototype.setOptions.call(this,t),"type"in t&&t.type!==this.options.type){this.options.type=t.type;const e=this.itemsData;if(e){const t=this.getSelection();this.setItems(null),this.setItems(e.rawDS),this.setSelection(t)}}}setItems(t){let e;this.itemsDone=!1,e=t?Ox(t)?Fx(t):Fx(new EE(t)):null,this.itemsData&&this.itemsData.dispose(),this.itemsData=e,this.itemSet&&this.itemSet.setItems(null!=e?e.rawDS:null)}setGroups(t){let e;const i=t=>!1!==t.visible;t?(Array.isArray(t)&&(t=new EE(t)),e=new xE(t,{filter:i})):e=null,null!=this.groupsData&&"function"==typeof this.groupsData.setData&&this.groupsData.setData(null),this.groupsData=e,this.itemSet.setGroups(e)}setData(t){t&&t.groups&&this.setGroups(t.groups),t&&t.items&&this.setItems(t.items)}setSelection(t,e){this.itemSet&&this.itemSet.setSelection(t),e&&e.focus&&this.focus(t,e)}getSelection(){return this.itemSet&&this.itemSet.getSelection()||[]}focus(t,e){if(!this.itemsData||null==t)return;const i=Array.isArray(t)?t:[t],n=this.itemsData.get(i);let o=null,r=null;if(n.forEach((t=>{const e=t.start.valueOf(),i="end"in t?t.end.valueOf():t.start.valueOf();(null===o||er)&&(r=i)})),null!==o&&null!==r){const t=this,n=this.itemSet.items[i[0]];let s=-1*this._getScrollTop(),a=null;const l=(e,i,o)=>{const r=rk(t,n);if(!1===r)return;if(a||(a=r),a.itemTop==r.itemTop&&!a.shouldScroll)return;a.itemTop!=r.itemTop&&r.shouldScroll&&(a=r,s=-1*t._getScrollTop());const l=s,d=a.scrollOffset,c=o?d:l+(d-l)*e;t._setScrollTop(-c),i||t._redraw()},d=()=>{const e=rk(t,n);e.shouldScroll&&e.itemTop!=a.itemTop&&(t._setScrollTop(-e.scrollOffset),t._redraw())},c=()=>{d(),setTimeout(d,100)},h=!e||void 0===e.zoom||e.zoom,u=(o+r)/2,A=h?1.1*(r-o):Math.max(this.range.end-this.range.start,1.1*(r-o)),p=!e||void 0===e.animation||e.animation;p||(a={shouldScroll:!1,scrollOffset:-1,itemTop:-1}),this.range.setRange(u-A/2,u+A/2,{animation:p},c,l)}}fit(t,e){const i=!t||void 0===t.animation||t.animation;let n;1===this.itemsData.length&&void 0===this.itemsData.get()[0].end?(n=this.getDataRange(),this.moveTo(n.min.valueOf(),{animation:i},e)):(n=this.getItemRange(),this.range.setRange(n.min,n.max,{animation:i},e))}getItemRange(){const t=this.getDataRange();let e=null!==t.min?t.min.valueOf():null,i=null!==t.max?t.max.valueOf():null,n=null,o=null;if(null!=e&&null!=i){let t=i-e;t<=0&&(t=10);const r=t/this.props.center.width,s={};let a=0;Ux.forEach(this.itemSet.items,((t,e)=>{if(t.groupShowing){const i=!0;s[e]=t.redraw(i),a=s[e].length}}));if(a>0)for(let t=0;t{e[t]()}));if(Ux.forEach(this.itemSet.items,(t=>{const s=nk(t),a=ok(t);let l,d;this.options.rtl?(l=s-(t.getWidthRight()+10)*r,d=a+(t.getWidthLeft()+10)*r):(l=s-(t.getWidthLeft()+10)*r,d=a+(t.getWidthRight()+10)*r),li&&(i=d,o=t)})),n&&o){const r=n.getWidthLeft()+10,s=o.getWidthRight()+10,a=this.props.center.width-r-s;a>0&&(this.options.rtl?(e=nk(n)-s*t/a,i=ok(o)+r*t/a):(e=nk(n)-r*t/a,i=ok(o)+s*t/a))}}return{min:null!=e?new Date(e):null,max:null!=i?new Date(i):null}}getDataRange(){let t=null,e=null;return this.itemsData&&this.itemsData.forEach((i=>{const n=Ux.convert(i.start,"Date").valueOf(),o=Ux.convert(null!=i.end?i.end:i.start,"Date").valueOf();(null===t||ne)&&(e=o)})),{min:null!=t?new Date(t):null,max:null!=e?new Date(e):null}}getEventProperties(t){const e=t.center?t.center.x:t.clientX,i=t.center?t.center.y:t.clientY,n=this.dom.centerContainer.getBoundingClientRect(),o=this.options.rtl?n.right-e:e-n.left,r=i-n.top,s=this.itemSet.itemFromTarget(t),a=this.itemSet.groupFromTarget(t),l=CB.customTimeFromTarget(t),d=this.itemSet.options.snap||null,c=this.body.util.getScale(),h=this.body.util.getStep(),u=this._toTime(o),A=d?d(u,c,h):u,p=Ux.getTarget(t);let m=null;return null!=s?m="item":null!=l?m="custom-time":Ux.hasParent(p,this.timeAxis.dom.foreground)||this.timeAxis2&&Ux.hasParent(p,this.timeAxis2.dom.foreground)?m="axis":Ux.hasParent(p,this.itemSet.dom.labelSet)?m="group-label":Ux.hasParent(p,this.currentTime.bar)?m="current-time":Ux.hasParent(p,this.dom.center)&&(m="background"),{event:t,item:s?s.id:null,isCluster:!!s&&!!s.isCluster,items:s?s.items||[]:null,group:a?a.groupId:null,customTime:l?l.options.id:null,what:m,pageX:t.srcEvent?t.srcEvent.pageX:t.pageX,pageY:t.srcEvent?t.srcEvent.pageY:t.pageY,x:o,y:r,time:u,snappedTime:A}}toggleRollingMode(){this.range.rolling?this.range.stopRolling():(null==this.options.rollingMode&&this.setOptions(this.options),this.range.startRolling())}_redraw(){IB.prototype._redraw.call(this)}_onFit(t){const{start:e,end:i,animation:n}=t;i?this.range.setRange(e,i,{animation:n}):this.moveTo(e.valueOf(),{animation:n})}}function nk(t){return Ux.convert(t.data.start,"Date").valueOf()}function ok(t){const e=null!=t.data.end?t.data.end:t.data.start;return Ux.convert(e,"Date").valueOf()}function rk(t,e){if(!e.parent)return!1;const i=t.options.rtl?t.props.rightContainer.height:t.props.leftContainer.height,n=t.props.center.height,o=e.parent;let r=o.top,s=!0;const a=t.timeAxis.options.orientation.axis,l=()=>"bottom"==a?o.height-e.top-e.height:e.top,d=-1*t._getScrollTop(),c=r+l(),h=e.height;return cd+i?r+=l()+h-i+t.itemSet.options.margin.item.vertical:s=!1,r=Math.min(r,n-i),{shouldScroll:s,scrollOffset:r,itemTop:c}}function sk(t){for(var e in t)t.hasOwnProperty(e)&&(t[e].redundant=t[e].used,t[e].used=[])}function ak(t){for(var e in t)if(t.hasOwnProperty(e)&&t[e].redundant){for(var i=0;i0?(n=e[t].redundant[0],e[t].redundant.shift()):(n=document.createElementNS("http://www.w3.org/2000/svg",t),i.appendChild(n)):(n=document.createElementNS("http://www.w3.org/2000/svg",t),e[t]={used:[],redundant:[]},i.appendChild(n)),e[t].used.push(n),n}function dk(t,e,i,n){var o;return e.hasOwnProperty(t)?e[t].redundant.length>0?(o=e[t].redundant[0],e[t].redundant.shift()):(o=document.createElement(t),void 0!==n?i.insertBefore(o,n):i.appendChild(o)):(o=document.createElement(t),e[t]={used:[],redundant:[]},void 0!==n?i.insertBefore(o,n):i.appendChild(o)),e[t].used.push(o),o}function ck(t,e,i,n,o,r){var s;if("circle"==i.style?((s=lk("circle",n,o)).setAttributeNS(null,"cx",t),s.setAttributeNS(null,"cy",e),s.setAttributeNS(null,"r",.5*i.size)):((s=lk("rect",n,o)).setAttributeNS(null,"x",t-.5*i.size),s.setAttributeNS(null,"y",e-.5*i.size),s.setAttributeNS(null,"width",i.size),s.setAttributeNS(null,"height",i.size)),void 0!==i.styles&&s.setAttributeNS(null,"style",i.styles),s.setAttributeNS(null,"class",i.className+" vis-point"),r){var a=lk("text",n,o);r.xOffset&&(t+=r.xOffset),r.yOffset&&(e+=r.yOffset),r.content&&(a.textContent=r.content),r.className&&a.setAttributeNS(null,"class",r.className+" vis-label"),a.setAttributeNS(null,"x",t),a.setAttributeNS(null,"y",e)}return s}function hk(t,e,i,n,o,r,s,a){if(0!=n){n<0&&(e-=n*=-1);var l=lk("rect",r,s);l.setAttributeNS(null,"x",t-.5*i),l.setAttributeNS(null,"y",e),l.setAttributeNS(null,"width",i),l.setAttributeNS(null,"height",n),l.setAttributeNS(null,"class",o),a&&l.setAttributeNS(null,"style",a)}}class uk{constructor(t,e,i,n,o,r,s=!1,a=!1){if(this.majorSteps=[1,2,5,10],this.minorSteps=[.25,.5,1,2],this.customLines=null,this.containerHeight=o,this.majorCharHeight=r,this._start=t,this._end=e,this.scale=1,this.minorStepIdx=-1,this.magnitudefactor=1,this.determineScale(),this.zeroAlign=s,this.autoScaleStart=i,this.autoScaleEnd=n,this.formattingFunction=a,i||n){const t=this,e=e=>{const i=e-e%(t.magnitudefactor*t.minorSteps[t.minorStepIdx]);return e%(t.magnitudefactor*t.minorSteps[t.minorStepIdx])>t.magnitudefactor*t.minorSteps[t.minorStepIdx]*.5?i+t.magnitudefactor*t.minorSteps[t.minorStepIdx]:i};i&&(this._start-=2*this.magnitudefactor*this.minorSteps[this.minorStepIdx],this._start=e(this._start)),n&&(this._end+=this.magnitudefactor*this.minorSteps[this.minorStepIdx],this._end=e(this._end)),this.determineScale()}}setCharHeight(t){this.majorCharHeight=t}setHeight(t){this.containerHeight=t}determineScale(){const t=this._end-this._start;this.scale=this.containerHeight/t;const e=this.majorCharHeight/this.scale,i=t>0?Math.round(Math.log(t)/Math.LN10):0;this.minorStepIdx=-1,this.magnitudefactor=Math.pow(10,i);let n=0;i<0&&(n=i);let o=!1;for(let t=n;Math.abs(t)<=Math.abs(i);t++){this.magnitudefactor=Math.pow(10,t);for(let t=0;t=e){o=!0,this.minorStepIdx=t;break}}if(!0===o)break}}is_major(t){return t%(this.magnitudefactor*this.majorSteps[this.minorStepIdx])==0}getStep(){return this.magnitudefactor*this.minorSteps[this.minorStepIdx]}getFirstMajor(){const t=this.magnitudefactor*this.majorSteps[this.minorStepIdx];return this.convertValue(this._start+(t-this._start%t)%t)}formatValue(t){let e=t.toPrecision(5);return"function"==typeof this.formattingFunction&&(e=this.formattingFunction(t)),"number"==typeof e?`${e}`:"string"==typeof e?e:t.toPrecision(5)}getLines(){const t=[],e=this.getStep(),i=(e-this._start%e)%e;for(let n=this._start+i;this._end-n>1e-5;n+=e)n!=this._start&&t.push({major:this.is_major(n),y:this.convertValue(n),val:this.formatValue(n)});return t}followScale(t){const e=this.minorStepIdx,i=this._start,n=this._end,o=this,r=()=>{o.magnitudefactor*=2},s=()=>{o.magnitudefactor/=2};t.minorStepIdx<=1&&this.minorStepIdx<=1||t.minorStepIdx>1&&this.minorStepIdx>1||(t.minorStepIdxn+1e-5)s(),d=!1;else{if(!this.autoScaleStart&&this._start=0)){s(),d=!1;continue}console.warn("Can't adhere to given 'min' range, due to zeroalign")}this.autoScaleStart&&this.autoScaleEnd&&e`${parseFloat(t.toPrecision(3))}`,title:{text:void 0,style:void 0}},right:{range:{min:void 0,max:void 0},format:t=>`${parseFloat(t.toPrecision(3))}`,title:{text:void 0,style:void 0}}},this.linegraphOptions=n,this.linegraphSVG=i,this.props={},this.DOMelements={lines:{},labels:{},title:{}},this.dom={},this.scale=void 0,this.range={start:0,end:0},this.options=Ux.extend({},this.defaultOptions),this.conversionFactor=1,this.setOptions(e),this.width=Number(`${this.options.width}`.replace("px","")),this.minWidth=this.width,this.height=this.linegraphSVG.getBoundingClientRect().height,this.hidden=!1,this.stepPixels=25,this.zeroCrossing=-1,this.amountOfSteps=-1,this.lineOffset=0,this.master=!0,this.masterAxis=null,this.svgElements={},this.iconsRemoved=!1,this.groups={},this.amountOfGroups=0,this._create(),null==this.scale&&this._redrawLabels(),this.framework={svg:this.svg,svgElements:this.svgElements,options:this.options,groups:this.groups};const o=this;this.body.emitter.on("verticalDrag",(()=>{o.dom.lineContainer.style.top=`${o.body.domProps.scrollTop}px`}))}addGroup(t,e){this.groups.hasOwnProperty(t)||(this.groups[t]=e),this.amountOfGroups+=1}updateGroup(t,e){this.groups.hasOwnProperty(t)||(this.amountOfGroups+=1),this.groups[t]=e}removeGroup(t){this.groups.hasOwnProperty(t)&&(delete this.groups[t],this.amountOfGroups-=1)}setOptions(t){if(t){let e=!1;this.options.orientation!=t.orientation&&void 0!==t.orientation&&(e=!0);const i=["orientation","showMinorLabels","showMajorLabels","icons","majorLinesOffset","minorLinesOffset","labelOffsetX","labelOffsetY","iconWidth","width","visible","left","right","alignZeros"];Ux.selectiveDeepExtend(i,this.options,t),this.minWidth=Number(`${this.options.width}`.replace("px","")),!0===e&&this.dom.frame&&(this.hide(),this.show())}}_create(){this.dom.frame=document.createElement("div"),this.dom.frame.style.width=this.options.width,this.dom.frame.style.height=this.height,this.dom.lineContainer=document.createElement("div"),this.dom.lineContainer.style.width="100%",this.dom.lineContainer.style.height=this.height,this.dom.lineContainer.style.position="relative",this.dom.lineContainer.style.visibility="visible",this.dom.lineContainer.style.display="block",this.svg=document.createElementNS("http://www.w3.org/2000/svg","svg"),this.svg.style.position="absolute",this.svg.style.top="0px",this.svg.style.height="100%",this.svg.style.width="100%",this.svg.style.display="block",this.dom.frame.appendChild(this.svg)}_redrawGroupIcons(){let t;sk(this.svgElements);const e=this.options.iconWidth;let i=11.5;t="left"===this.options.orientation?4:this.width-e-4;const n=Object.keys(this.groups);n.sort(((t,e)=>t{const i=t.y,n=t.major;this.options.showMinorLabels&&!1===n&&this._redrawLabel(i-2,t.val,e,"vis-y-axis vis-minor",this.props.minorCharHeight),n&&i>=0&&this._redrawLabel(i-2,t.val,e,"vis-y-axis vis-major",this.props.majorCharHeight),!0===this.master&&(n?this._redrawLine(i,e,"vis-grid vis-horizontal vis-major",this.options.majorLinesOffset,this.props.majorLineWidth):this._redrawLine(i,e,"vis-grid vis-horizontal vis-minor",this.options.minorLinesOffset,this.props.minorLineWidth))}));let r=0;void 0!==this.options[e].title&&void 0!==this.options[e].title.text&&(r=this.props.titleCharHeight);const s=!0===this.options.icons?Math.max(this.options.iconWidth,r)+this.options.labelOffsetX+15:r+this.options.labelOffsetX+15;return this.maxLabelSize>this.width-s&&!0===this.options.visible?(this.width=this.maxLabelSize+s,this.options.width=`${this.width}px`,ak(this.DOMelements.lines),ak(this.DOMelements.labels),this.redraw(),t=!0):this.maxLabelSizethis.minWidth?(this.width=Math.max(this.minWidth,this.maxLabelSize+s),this.options.width=`${this.width}px`,ak(this.DOMelements.lines),ak(this.DOMelements.labels),this.redraw(),t=!0):(ak(this.DOMelements.lines),ak(this.DOMelements.labels),t=!1),t}convertValue(t){return this.scale.convertValue(t)}screenToValue(t){return this.scale.screenToValue(t)}_redrawLabel(t,e,i,n,o){const r=dk("div",this.DOMelements.labels,this.dom.frame);r.className=n,r.innerHTML=Ux.xss(e),"left"===i?(r.style.left=`-${this.options.labelOffsetX}px`,r.style.textAlign="right"):(r.style.right=`-${this.options.labelOffsetX}px`,r.style.textAlign="left"),r.style.top=`${t-.5*o+this.options.labelOffsetY}px`,e+="";const s=Math.max(this.props.majorCharWidth,this.props.minorCharWidth);this.maxLabelSize0&&(i=Math.min(i,Math.abs(e[n-1].screen_x-e[n].screen_x))),0===i&&(void 0===t[e[n].screen_x]&&(t[e[n].screen_x]={amount:0,resolved:0,accumulatedPositive:0,accumulatedNegative:0}),t[e[n].screen_x].amount+=1)},gk._getSafeDrawData=function(t,e,i){var n,o;return t0?(n=t0){t.sort((function(t,e){return t.screen_x===e.screen_x?t.groupIde[r].screen_y?e[r].screen_y:n,o=ot[s].accumulatedNegative?t[s].accumulatedNegative:n)>t[s].accumulatedPositive?t[s].accumulatedPositive:n,o=(o=o0){return 1==e.options.interpolation.enabled?fk._catmullRom(t,e):fk._linear(t)}},fk.drawIcon=function(t,e,i,n,o,r){var s,a,l=.5*o,d=lk("rect",r.svgElements,r.svg);(d.setAttributeNS(null,"x",e),d.setAttributeNS(null,"y",i-l),d.setAttributeNS(null,"width",n),d.setAttributeNS(null,"height",2*l),d.setAttributeNS(null,"class","vis-outline"),(s=lk("path",r.svgElements,r.svg)).setAttributeNS(null,"class",t.className),void 0!==t.style&&s.setAttributeNS(null,"style",t.style),s.setAttributeNS(null,"d","M"+e+","+i+" L"+(e+n)+","+i),1==t.options.shaded.enabled&&(a=lk("path",r.svgElements,r.svg),"top"==t.options.shaded.orientation?a.setAttributeNS(null,"d","M"+e+", "+(i-l)+"L"+e+","+i+" L"+(e+n)+","+i+" L"+(e+n)+","+(i-l)):a.setAttributeNS(null,"d","M"+e+","+i+" L"+e+","+(i+l)+" L"+(e+n)+","+(i+l)+"L"+(e+n)+","+i),a.setAttributeNS(null,"class",t.className+" vis-icon-fill"),void 0!==t.options.shaded.style&&""!==t.options.shaded.style&&a.setAttributeNS(null,"style",t.options.shaded.style)),1==t.options.drawPoints.enabled)&&ck(e+.5*n,i,{style:t.options.drawPoints.style,styles:t.options.drawPoints.styles,size:t.options.drawPoints.size,className:t.className},r.svgElements,r.svg)},fk.drawShading=function(t,e,i,n){if(1==e.options.shaded.enabled){var o,r=Number(n.svg.style.height.replace("px","")),s=lk("path",n.svgElements,n.svg),a="L";1==e.options.interpolation.enabled&&(a="C");var l=0;l="top"==e.options.shaded.orientation?0:"bottom"==e.options.shaded.orientation?r:Math.min(Math.max(0,e.zeroPosition),r),o="group"==e.options.shaded.orientation&&null!=i&&null!=i?"M"+t[0][0]+","+t[0][1]+" "+this.serializePath(t,a,!1)+" L"+i[i.length-1][0]+","+i[i.length-1][1]+" "+this.serializePath(i,a,!0)+i[0][0]+","+i[0][1]+" Z":"M"+t[0][0]+","+t[0][1]+" "+this.serializePath(t,a,!1)+" V"+l+" H"+t[0][0]+" Z",s.setAttributeNS(null,"class",e.className+" vis-fill"),void 0!==e.options.shaded.style&&s.setAttributeNS(null,"style",e.options.shaded.style),s.setAttributeNS(null,"d",o)}},fk.draw=function(t,e,i){if(null!=t&&null!=t){var n=lk("path",i.svgElements,i.svg);n.setAttributeNS(null,"class",e.className),void 0!==e.style&&n.setAttributeNS(null,"style",e.style);var o="L";1==e.options.interpolation.enabled&&(o="C"),n.setAttributeNS(null,"d","M"+t[0][0]+","+t[0][1]+" "+this.serializePath(t,o,!1))}},fk.serializePath=function(t,e,i){if(t.length<2)return"";var n,o=e;if(i)for(n=t.length-2;n>0;n--)o+=t[n][0]+","+t[n][1]+" ";else for(n=1;n0&&(p=1/p),(m=3*g*(g+f))>0&&(m=1/m),a={screen_x:(-b*n.screen_x+u*o.screen_x+y*r.screen_x)*p,screen_y:(-b*n.screen_y+u*o.screen_y+y*r.screen_y)*p},l={screen_x:(v*o.screen_x+A*r.screen_x-b*s.screen_x)*m,screen_y:(v*o.screen_y+A*r.screen_y-b*s.screen_y)*m},0==a.screen_x&&0==a.screen_y&&(a=o),0==l.screen_x&&0==l.screen_y&&(l=r),w.push([a.screen_x,a.screen_y]),w.push([l.screen_x,l.screen_y]),w.push([r.screen_x,r.screen_y]);return w},fk._linear=function(t){for(var e=[],i=0;ie.x?1:-1}))):this.itemsData=[]},vk.prototype.getItems=function(){return this.itemsData},vk.prototype.setZeroPosition=function(t){this.zeroPosition=t},vk.prototype.setOptions=function(t){if(void 0!==t){Ux.selectiveDeepExtend(["sampling","style","sort","yAxisOrientation","barChart","zIndex","excludeFromStacking","excludeFromLegend"],this.options,t),"function"==typeof t.drawPoints&&(t.drawPoints={onRender:t.drawPoints}),Ux.mergeOptions(this.options,t,"interpolation"),Ux.mergeOptions(this.options,t,"drawPoints"),Ux.mergeOptions(this.options,t,"shaded"),t.interpolation&&"object"==typeof t.interpolation&&t.interpolation.parametrization&&("uniform"==t.interpolation.parametrization?this.options.interpolation.alpha=0:"chordal"==t.interpolation.parametrization?this.options.interpolation.alpha=1:(this.options.interpolation.parametrization="centripetal",this.options.interpolation.alpha=.5))}},vk.prototype.update=function(t){this.group=t,this.content=t.content||"graph",this.className=t.className||this.className||"vis-graph-group"+this.groupsUsingDefaultStyles[0]%10,this.visible=void 0===t.visible||t.visible,this.style=t.style,this.setOptions(t.options)},vk.prototype.getLegend=function(t,e,i,n,o){null!=i&&null!=i||(i={svg:document.createElementNS("http://www.w3.org/2000/svg","svg"),svgElements:{},options:this.options,groups:[this]});switch(null!=n&&null!=n||(n=0),null!=o&&null!=o||(o=.5*e),this.options.style){case"line":fk.drawIcon(this,n,o,t,e,i);break;case"points":case"point":pk.drawIcon(this,n,o,t,e,i);break;case"bar":gk.drawIcon(this,n,o,t,e,i)}return{icon:i.svg,label:this.content,orientation:this.options.yAxisOrientation}},vk.prototype.getYRange=function(t){for(var e=t[0].y,i=t[0].y,n=0;nt[n].y?t[n].y:e,i=i");this.dom.textArea.innerHTML=Ux.xss(r),this.dom.textArea.style.lineHeight=.75*this.options.iconSize+this.options.iconSpacing+"px"}},bk.prototype.drawLegendIcons=function(){if(this.dom.frame.parentNode){var t=Object.keys(this.groups);t.sort((function(t,e){return t0){var s={};for(this._getRelevantData(r,s,n,o),this._applySampling(r,s),e=0;e0)switch(t.options.style){case"line":l.hasOwnProperty(r[e])||(l[r[e]]=fk.calcPath(s[r[e]],t)),fk.draw(l[r[e]],t,this.framework);case"point":case"points":"point"!=t.options.style&&"points"!=t.options.style&&1!=t.options.drawPoints.enabled||pk.draw(s[r[e]],t,this.framework)}}}return ak(this.svgElements),!1},yk.prototype._stack=function(t,e){var i,n,o,r,s;i=0;for(var a=0;at[a].x){s=e[l],r=0==l?s:e[l-1],i=l;break}}void 0===s&&(r=e[e.length-1],s=e[e.length-1]),n=s.x-r.x,o=s.y-r.y,t[a].y=0==n?t[a].orginalY+s.y:t[a].orginalY+o/n*(t[a].x-r.x)+r.y}},yk.prototype._getRelevantData=function(t,e,i,n){var o,r,s,a;if(t.length>0)for(r=0;r0)for(var i=0;i0){var o,r=n.length,s=r/(this.body.util.toGlobalScreen(n[n.length-1].x)-this.body.util.toGlobalScreen(n[0].x));o=Math.min(Math.ceil(.2*r),Math.max(1,Math.round(s)));for(var a=new Array(r),l=0;l0){for(r=0;r0&&(o=this.groups[t[r]],!0===s.stack&&"bar"===s.style?"left"===s.yAxisOrientation?a=a.concat(n):l=l.concat(n):i[t[r]]=o.getYRange(n,t[r]));gk.getStackedYRange(a,i,t,"__barStackLeft","left"),gk.getStackedYRange(l,i,t,"__barStackRight","right")}},yk.prototype._updateYAxis=function(t,e){var i,n,o=!1,r=!1,s=!1,a=1e9,l=1e9,d=-1e9,c=-1e9;if(t.length>0){for(var h=0;hi?i:a,d=di?i:l,c=cr.timeAxis.step.scale,getStep:()=>r.timeAxis.step.step,toScreen:r._toScreen.bind(r),toGlobalScreen:r._toGlobalScreen.bind(r),toTime:r._toTime.bind(r),toGlobalTime:r._toGlobalTime.bind(r)}},this.range=new Xx(this.body),this.components.push(this.range),this.body.range=this.range,this.timeAxis=new rB(this.body),this.components.push(this.timeAxis),this.currentTime=new EB(this.body),this.components.push(this.currentTime),this.linegraph=new yk(this.body),this.components.push(this.linegraph),this.itemsData=null,this.groupsData=null,this.on("tap",(function(t){r.emit("click",r.getEventProperties(t))})),this.on("doubletap",(function(t){r.emit("doubleClick",r.getEventProperties(t))})),this.dom.root.oncontextmenu=function(t){r.emit("contextmenu",r.getEventProperties(t))},this.initialFitDone=!1,this.on("changed",(function(){if(null!=r.itemsData){if(!r.initialFitDone&&!r.options.rollingMode)if(r.initialFitDone=!0,null!=r.options.start||null!=r.options.end){if(null==r.options.start||null==r.options.end)var t=r.getItemRange();var e=null!=r.options.start?r.options.start:t.min,i=null!=r.options.end?r.options.end:t.max;r.setWindow(e,i,{animation:!1})}else r.fit({animation:!1});r.initialDrawDone||!r.initialRangeChangeDone&&(r.options.start||r.options.end)&&!r.options.rollingMode||(r.initialDrawDone=!0,r.dom.root.style.visibility="visible",r.dom.loadingScreen.parentNode.removeChild(r.dom.loadingScreen),r.options.onInitialDrawComplete&&setTimeout((()=>r.options.onInitialDrawComplete()),0))}})),n&&this.setOptions(n),i&&this.setGroups(i),e&&this.setItems(e),this._redraw()}Bk.prototype=new IB,Bk.prototype.setOptions=function(t){!0===VB.validate(t,Ek)&&console.log("%cErrors have been found in the supplied options object.",WB),IB.prototype.setOptions.call(this,t)},Bk.prototype.setItems=function(t){var e,i=null==this.itemsData;if(e=t?Ox(t)?Fx(t):Fx(new EE(t)):null,this.itemsData&&this.itemsData.dispose(),this.itemsData=e,this.linegraph&&this.linegraph.setItems(null!=e?e.rawDS:null),i)if(null!=this.options.start||null!=this.options.end){var n=null!=this.options.start?this.options.start:null,o=null!=this.options.end?this.options.end:null;this.setWindow(n,o,{animation:!1})}else this.fit({animation:!1})},Bk.prototype.setGroups=function(t){var e;e=t?Ox(t)?t:new EE(t):null,this.groupsData=e,this.linegraph.setGroups(e)},Bk.prototype.getLegend=function(t,e,i){return void 0===e&&(e=15),void 0===i&&(i=15),void 0!==this.linegraph.groups[t]?this.linegraph.groups[t].getLegend(e,i):"cannot find group:'"+t+"'"},Bk.prototype.isGroupVisible=function(t){return void 0!==this.linegraph.groups[t]&&(this.linegraph.groups[t].visible&&(void 0===this.linegraph.options.groups.visibility[t]||1==this.linegraph.options.groups.visibility[t]))},Bk.prototype.getDataRange=function(){var t=null,e=null;for(var i in this.linegraph.groups)if(this.linegraph.groups.hasOwnProperty(i)&&1==this.linegraph.groups[i].visible)for(var n=0;nr?r:t,e=null==e||e0&&d.push(c.screenToValue(o)),!h.hidden&&this.itemsData.length>0&&d.push(h.screenToValue(o)),{event:t,customTime:s?s.options.id:null,what:l,pageX:t.srcEvent?t.srcEvent.pageX:t.pageX,pageY:t.srcEvent?t.srcEvent.pageY:t.pageY,x:n,y:o,time:r,value:d}},Bk.prototype._createConfigurator=function(){return new ek(this,this.dom.container,xk)};const kk=function(){try{return navigator?navigator.languages&&navigator.languages.length?navigator.languages:navigator.userLanguage||navigator.language||navigator.browserLanguage||"en":"en"}catch(t){return"en"}}();SE.locale(kk);class Sk extends Event{}class Dk{constructor(){this._dataset=new EE,this._maxAgeSeconds=10}get lastFetchDate(){var t;return null!==(t=this._dateFetch)&&void 0!==t?t:null}get dataset(){return this._dataset}isEmpty(){return 0===this._dataset.length}clear(){this._dataset.clear()}_addMediaSource(t,e,i){var n;const o=[];null===(n=i.children)||void 0===n||n.forEach((i=>{var n;const r=null===(n=i.frigate)||void 0===n?void 0:n.event;if(r&&my(i)&&["video","image"].includes(i.media_content_type)){let n=this._dataset.get(r.id);n||(n={id:r.id,group:t,content:"",start:1e3*r.start_time,event:r}),("video"===i.media_content_type&&["all","clips"].includes(e)||!n.source&&"image"===i.media_content_type&&["all","snapshots"].includes(e))&&(n.source=i),r.end_time?(n.end=1e3*r.end_time,n.type="range"):n.type="point",o.push(n)}})),this._dataset.update(o)}hasCoverage(t,e,i){return!!(this._dateFetch&&this._dateStart&&this._dateEnd)&&(!(this._maxAgeSeconds&&t.getTime()-this._dateFetch.getTime()>1e3*this._maxAgeSeconds)&&(!(e1e3*this._maxAgeSeconds)&&i.getTime()-1e3*this._maxAgeSeconds<=this._dateEnd.getTime())))))}async fetchIfNecessary(t,e,i,n,o,r,s){const a=new Date;return r=r>a?a:r,!this.hasCoverage(a,o,r)&&((!this._dateStart||othis._dateEnd)&&(this._dateEnd=r),this._dateFetch=new Date,await Promise.all([this._fetchEvents(t,e,i,n,this._dateStart,this._dateEnd),...s?[this._fetchRecordings(e,i)]:[]]),!0)}async _fetchRecordings(t,e){const i=[],n=new Date;await Promise.all(Array.from(e.entries()).map((([e,o])=>(async(e,o)=>{if(!o.frigate.camera_name)return;let r=[];try{r=await Ry(t,o.frigate.client_id,o.frigate.camera_name)}catch(t){Og(t)}for(const t of r)for(const o of t.hours){const r=af(t.day,{hours:o.hour}),s=vf(r);i.push({id:`recording-${e}-${vv(r,"yyyy-MM-dd-HH")}`,group:e,start:1e3*wv(jb(r)),end:1e3*wv(s>n?n:s),type:"background",content:""})}})(e,o)))),this._dataset.update(i)}async _fetchEvents(t,e,i,n,o,r){const s=[];if(i.forEach(((t,i)=>{("all"===n?["clips","snapshots"]:[n]).forEach((n=>{if("birdseye"!==t.frigate.camera_name){const a=_y(e,i,t,{before:r.getTime()/1e3,after:o.getTime()/1e3,unlimited:!0,mediaType:n});a&&s.push(a)}}))})),!s.length)return;let a;try{a=await vy(e,s)}catch(e){return qg(t,e)}for(const[t,e]of a.entries())t.cameraID&&this._addMediaSource(t.cameraID,n,e)}}let Qk=class extends gt{constructor(){super(...arguments),this.details=!1}render(){if(!this.thumbnail||!this.event)return K``;const t=new Sk("frigate-card:timeline:hass-request",{composed:!0,bubbles:!0});return this.dispatchEvent(t),t.hass?K` + `:K``}};t([yt({attribute:!0})],Qk.prototype,"thumbnail",void 0),t([yt({attribute:!0,type:Boolean})],Qk.prototype,"details",void 0),t([yt({attribute:!0})],Qk.prototype,"event",void 0),t([yt({attribute:!0})],Qk.prototype,"label",void 0),Qk=t([vt("frigate-card-timeline-thumbnail")],Qk);let Mk=class extends gt{render(){return this.timelineConfig?K` + + + `:K``}static get styles(){return _(":host {\n width: 100%;\n height: 100%;\n display: block;\n}")}};t([yt({attribute:!1})],Mk.prototype,"hass",void 0),t([yt({attribute:!1})],Mk.prototype,"view",void 0),t([yt({attribute:!1})],Mk.prototype,"cameras",void 0),t([yt({attribute:!1})],Mk.prototype,"timelineConfig",void 0),Mk=t([vt("frigate-card-timeline")],Mk);let Tk=class extends gt{constructor(){super(...arguments),this._data=new Dk,this._refTimeline=zt(),this._pointerHeld=!1,this._ignoreClick=!1,this._isHoverableDevice=Rg()}_getTooltip(t){var e,i;const n=t.source;if(!this._isHoverableDevice||!n)return"";const o=(null===(e=n.frigate)||void 0===e?void 0:e.event)?`event='${JSON.stringify(n.frigate.event)}'`:"",r=(null===(i=this.timelineConfig)||void 0===i?void 0:i.controls.thumbnails.show_details)?"details":"";return`\n \n `}render(){if(!this.hass||!this.view||!this.timelineConfig)return;const t=this.timelineConfig.controls.thumbnails,e={timeline:!0,"left-margin":"left"===t.mode,"right-margin":"right"===t.mode};return K`
{t.hass=this.hass}} + class="${Dt(e)}" + ${Gt(this._refTimeline)} + >
`}_getSeekTime(t,e){if(!e.length)return null;const i=wv(t),n=wv(jb(t));let o=0;for(const t of e){if(t.start_time>i)break;const e=t.start_timei?i:t.end_time)-e}return o}_createRecordingChildren(t,e,i){var n,o;const r=[],s=new Set;for(const l of(null===(n=this.cameras)||void 0===n?void 0:n.keys())||[]){const n=t.get(l),d=null===(o=this.cameras)||void 0===o?void 0:o.get(l);if(!n||!(null==d?void 0:d.frigate.camera_name))continue;const c=Ny(d);if(s.has(c))continue;s.add(c);const h=this._getSeekTime(e,n.segments);if(null!==h)for(const t of n.summary)for(const n of t.hours){const o=af(t.day,{hours:n.hour}),s=jb(o),l=vf(o),c=e>=s&&e<=l;i&&!c||r.push(By(`${Qg(d.frigate.camera_name)} ${vv(o,"yyyy-MM-dd HH:mm")}`,["media-source://frigate",(a={clientId:d.frigate.client_id,year:t.day.getFullYear(),month:t.day.getMonth()+1,day:t.day.getDate(),hour:n.hour,cameraName:d.frigate.camera_name}).clientId,"recordings",`${a.year}-${String(a.month).padStart(2,"0")}`,String(a.day).padStart(2,"0"),String(a.hour).padStart(2,"0"),a.cameraName].join("/"),{recording:Object.assign({camera:d.frigate.camera_name,start_time:wv(s),end_time:wv(l),events:n.events},c&&{seek_seconds:h,seek_time:e.getTime()/1e3})}))}}var a;return r}async _changeViewToRecording(t,e){var i,n,o;if(!this.hass)return;const r=vf(t),s=jb(t),a=new Map,l=async(t,e)=>{if(e&&e.frigate.camera_name&&this.hass)try{const i=await Promise.all([Py(this.hass,e.frigate.client_id,e.frigate.camera_name,r,s),Ry(this.hass,e.frigate.client_id,e.frigate.camera_name)]);a.set(t,{segments:i[0],summary:i[1]})}catch(t){Og(t)}},d=e?[e]:[...null!==(n=null===(i=this.cameras)||void 0===i?void 0:i.keys())&&void 0!==n?n:[]];await Promise.all(d.map((t=>{var e;return l(t,null===(e=this.cameras)||void 0===e?void 0:e.get(t))})));const c=this._createRecordingChildren(a,t,!e);if(!c.length)return;let h=0;e&&(h=c.findIndex((t=>{var e;return(null===(e=t.frigate)||void 0===e?void 0:e.recording)&&1e3*t.frigate.recording.start_time===s.getTime()})),h<0)||null===(o=this.view)||void 0===o||o.evolve({view:"media",target:xy(Sg("common.recordings"),c),childIndex:h}).dispatchChangeEvent(this)}_timelineRangeChangeHandler(t){t.event&&this._pointerHeld&&(this._ignoreClick=!0)}_timelineClickHandler(t){var e;("item"===t.what||this._ignoreClick)&&Vm(t.event),!this._ignoreClick&&t.what&&(null===(e=this.timelineConfig)||void 0===e?void 0:e.show_recordings)&&(["background","group-label"].includes(t.what)?(Vm(t.event),this._changeViewToRecording(t.time,String(t.group))):"axis"===t.what&&(Vm(t.event),this._changeViewToRecording(t.time))),this._ignoreClick=!1}_getPrefetchWindow(t,e){const i=ff(e,t);return[Hb(t,{seconds:i}),af(e,{seconds:i})]}_timelineRangeHandler(t){if(t.byUser&&this.hass&&this.cameras&&this._timeline&&this.timelineConfig){const[e,i]=this._getPrefetchWindow(t.start,t.end);this._data.fetchIfNecessary(this,this.hass,this.cameras,this.timelineConfig.media,e,i,this.timelineConfig.show_recordings).then((()=>{var t,e,i;if(this._timeline){const n=this._generateThumbnails();null===(t=this.view)||void 0===t||t.evolve({target:null!==(e=null==n?void 0:n.target)&&void 0!==e?e:null,childIndex:null!==(i=null==n?void 0:n.childIndex)&&void 0!==i?i:null}).mergeInContext(this._generateTimelineContext(!0)).dispatchChangeEvent(this)}}))}}_timelineSelectHandler(t){var e,i,n;if(!(null===(e=this.view)||void 0===e?void 0:e.target)||!(null===(i=this.view)||void 0===i?void 0:i.target.children))return;const o=t.items.length?this.view.target.children.findIndex((e=>{var i,n;return(null===(n=null===(i=e.frigate)||void 0===i?void 0:i.event)||void 0===n?void 0:n.id)===t.items[0]})):null;null===(n=this.view)||void 0===n||n.evolve({childIndex:o}).dispatchChangeEvent(this),Dg(this,null!==o&&o>=0?"thumbnails:open":"thumbnails:close")}_generateThumbnails(){if(!this._timeline)return null;const t=this._timeline.getSelection();let e=-1;const i=[];return this._data.dataset.get({order:(t,e)=>t.starte.start?-1:0}).forEach((n=>{n.event&&n.source&&(i.push(n.source),t.includes(n.event.id)&&(e=i.length-1))})),i.length?{target:xy("Timeline events",i),childIndex:e<0?null:e}:null}_getGroups(){var t;const e=[],i=new Set;return null===(t=this.cameras)||void 0===t||t.forEach(((t,n)=>{const o=(t=>[t.frigate.client_id,t.frigate.camera_name,t.frigate.label,t.frigate.zone].join("/"))(t);t.frigate.camera_name&&"birdseye"!==t.frigate.camera_name&&!i.has(o)&&(i.add(o),e.push({id:n,content:uy(this.hass,t)}))})),new EE(e)}_getStartEndFromEvent(t){const e=this._getConfiguredWindowSeconds();if(t.end_time){if(t.end_time-t.start_time>e)return[Hb(yv(t.end_time),{seconds:e}),yv(t.end_time)];{const i=e-(t.end_time-t.start_time);return[Hb(yv(t.start_time),{seconds:i/2}),af(yv(t.end_time),{seconds:i/2})]}}return[Hb(yv(t.start_time),{seconds:e/2}),af(yv(t.start_time),{seconds:e/2})]}_getConfiguredWindowSeconds(){var t,e;return null!==(e=null===(t=this.timelineConfig)||void 0===t?void 0:t.window_seconds)&&void 0!==e?e:Pm.timeline.window_seconds}_getStartEnd(){var t,e,i;const n=null===(i=null===(e=null===(t=this.view)||void 0===t?void 0:t.target)||void 0===e?void 0:e.frigate)||void 0===i?void 0:i.event;if(n)return this._getStartEndFromEvent(n);const o=new Date;return[Hb(o,{seconds:this._getConfiguredWindowSeconds()}),o]}_isClustering(){var t;return!!(null===(t=this.timelineConfig)||void 0===t?void 0:t.clustering_threshold)&&this.timelineConfig.clustering_threshold>0}_getOptions(){if(!this.timelineConfig)return;const[t,e]=this._getStartEnd();return{cluster:!!this._isClustering()&&{maxItems:this.timelineConfig.clustering_threshold,clusterCriteria:(t,e)=>{var i,n,o,r,s,a,l,d,c,h;return[t.type,e.type].every((t=>"background"!==t))&&t.type===e.type&&!!t.id&&t.id!==(null===(r=null===(o=null===(n=null===(i=this.view)||void 0===i?void 0:i.media)||void 0===n?void 0:n.frigate)||void 0===o?void 0:o.event)||void 0===r?void 0:r.id)&&!!e.id&&e.id!=(null===(d=null===(l=null===(a=null===(s=this.view)||void 0===s?void 0:s.media)||void 0===a?void 0:a.frigate)||void 0===l?void 0:l.event)||void 0===d?void 0:d.id)&&(null===(c=t.event)||void 0===c?void 0:c.label)===(null===(h=e.event)||void 0===h?void 0:h.label)}},minHeight:"100%",maxHeight:"100%",zoomMax:864e5,zoomMin:1e3,selectable:!0,start:t,end:e,groupHeightMode:"fixed",tooltip:{followMouse:!0,overflowMethod:"cap",template:this._getTooltip.bind(this)},xss:{disabled:!1,filterOptions:{whiteList:{"frigate-card-timeline-thumbnail":["details","thumbnail","label","event"],div:["title"],span:["style"]}}}}}shouldUpdate(t){return!!this.hass&&!!this.cameras&&this.cameras.size>0}async _updateTimelineFromView(){var t,e,i,n,o,r,s;if(!(this.hass&&this.cameras&&this.view&&this.timelineConfig))return;const a=null===(i=null===(e=null===(t=this.view)||void 0===t?void 0:t.media)||void 0===e?void 0:e.frigate)||void 0===i?void 0:i.event,[l,d]=a?this._getStartEndFromEvent(a):this._getStartEnd(),[c,h]=this._getPrefetchWindow(l,d),u=await this._data.fetchIfNecessary(this,this.hass,this.cameras,this.timelineConfig.media,c,h,this.timelineConfig.show_recordings);if(!this._timeline)return;this._timeline.setSelection(a?[a.id]:[],{focus:!1,animation:{animation:!1,zoom:!1}});const A=null===(n=this.view.context)||void 0===n?void 0:n.timeline,p=this._timeline.getWindow();if(null==A?void 0:A.window)Yl(A.window,p)||this._timeline.setWindow(A.window.start,A.window.end);else if(a){const t=new Date(1e3*a.start_time),e=a.end_time?new Date(1e3*a.end_time):0;if((tp.end||e&&(ep.end))&&this._timeline.setWindow(l,d),this._isClustering()){const t=this._data.dataset.get(a.id);t&&this._data.dataset.updateOnly(t)}}else this._timeline.setWindow(l,d);if(u){const t=this._generateThumbnails();null===(o=this.view)||void 0===o||o.evolve({target:null!==(r=null==t?void 0:t.target)&&void 0!==r?r:null,childIndex:null!==(s=null==t?void 0:t.childIndex)&&void 0!==s?s:null}).mergeInContext(this._generateTimelineContext(!1)).dispatchChangeEvent(this)}}_generateTimelineContext(t){var e,i;const n=null===(i=null===(e=this.view)||void 0===e?void 0:e.context)||void 0===i?void 0:i.timeline,o={};return t&&this._timeline?o.window=this._timeline.getWindow():(null==n?void 0:n.window)&&(o.window=n.window),this._data.lastFetchDate&&(o.dateFetch=this._data.lastFetchDate),Object.keys(o)?{timeline:o}:{}}willUpdate(t){var e,i;t.has("timelineConfig")&&((null===(e=this.timelineConfig)||void 0===e?void 0:e.controls.thumbnails.size)&&this.style.setProperty("--frigate-card-thumbnail-size",`${this.timelineConfig.controls.thumbnails.size}px`),(null===(i=this.timelineConfig)||void 0===i?void 0:i.show_recordings)?this.setAttribute("recordings",""):this.removeAttribute("recordings"))}updated(t){var e;super.updated(t),t.has("cameras")&&(this._data.clear(),null===(e=this._timeline)||void 0===e||e.destroy(),this._timeline=void 0);const i=this._getOptions();if(t.has("timelineConfig")&&this._refTimeline.value&&i)if(this._timeline)this._timeline.setOptions(i);else{const t=this._getGroups();if(!t.length)return void Hg(this,Sg("error.timeline_no_cameras"),"info",{icon:"mdi:chart-gantt"});this._timeline=new ik(this._refTimeline.value,this._data.dataset,t,i),this._timeline.on("select",this._timelineSelectHandler.bind(this)),this._timeline.on("rangechanged",this._timelineRangeHandler.bind(this)),this._timeline.on("click",this._timelineClickHandler.bind(this)),this._timeline.on("rangechange",this._timelineRangeChangeHandler.bind(this)),this._timeline.on("mouseDown",(()=>{this._pointerHeld=!0,this._ignoreClick=!1})),this._timeline.on("mouseUp",(()=>{this._pointerHeld=!1}))}t.has("view")&&this._updateTimelineFromView()}static get styles(){return _('@charset "UTF-8";\n/* override some bootstrap styles screwing up the timelines css */\n.vis [class*=span] {\n min-height: 0;\n width: auto;\n}\n\n.vis-current-time {\n background-color: #FF7F6E;\n width: 2px;\n z-index: 1;\n pointer-events: none;\n}\n\n.vis-rolling-mode-btn {\n height: 40px;\n width: 40px;\n position: absolute;\n top: 7px;\n right: 20px;\n border-radius: 50%;\n font-size: 28px;\n cursor: pointer;\n opacity: 0.8;\n color: white;\n font-weight: bold;\n text-align: center;\n background: #3876c2;\n}\n\n.vis-rolling-mode-btn:before {\n content: "⛶";\n}\n\n.vis-rolling-mode-btn:hover {\n opacity: 1;\n}\n\n.vis-timeline {\n /*\n -webkit-transition: height .4s ease-in-out;\n transition: height .4s ease-in-out;\n */\n}\n\n.vis-panel {\n /*\n -webkit-transition: height .4s ease-in-out, top .4s ease-in-out;\n transition: height .4s ease-in-out, top .4s ease-in-out;\n */\n}\n\n.vis-axis {\n /*\n -webkit-transition: top .4s ease-in-out;\n transition: top .4s ease-in-out;\n */\n}\n\n/* TODO: get animation working nicely\n\n.vis-item {\n -webkit-transition: top .4s ease-in-out;\n transition: top .4s ease-in-out;\n}\n\n.vis-item.line {\n -webkit-transition: height .4s ease-in-out, top .4s ease-in-out;\n transition: height .4s ease-in-out, top .4s ease-in-out;\n}\n/**/\n.vis-panel {\n position: absolute;\n padding: 0;\n margin: 0;\n box-sizing: border-box;\n}\n\n.vis-panel.vis-center,\n.vis-panel.vis-left,\n.vis-panel.vis-right,\n.vis-panel.vis-top,\n.vis-panel.vis-bottom {\n border: 1px #bfbfbf;\n}\n\n.vis-panel.vis-center,\n.vis-panel.vis-left,\n.vis-panel.vis-right {\n border-top-style: solid;\n border-bottom-style: solid;\n overflow: hidden;\n}\n\n.vis-left.vis-panel.vis-vertical-scroll, .vis-right.vis-panel.vis-vertical-scroll {\n height: 100%;\n overflow-x: hidden;\n overflow-y: scroll;\n}\n\n.vis-left.vis-panel.vis-vertical-scroll {\n direction: rtl;\n}\n\n.vis-left.vis-panel.vis-vertical-scroll .vis-content {\n direction: ltr;\n}\n\n.vis-right.vis-panel.vis-vertical-scroll {\n direction: ltr;\n}\n\n.vis-right.vis-panel.vis-vertical-scroll .vis-content {\n direction: rtl;\n}\n\n.vis-panel.vis-center,\n.vis-panel.vis-top,\n.vis-panel.vis-bottom {\n border-left-style: solid;\n border-right-style: solid;\n}\n\n.vis-background {\n overflow: hidden;\n}\n\n.vis-panel > .vis-content {\n position: relative;\n}\n\n.vis-panel .vis-shadow {\n position: absolute;\n width: 100%;\n height: 1px;\n box-shadow: 0 0 10px rgba(0, 0, 0, 0.8);\n /* TODO: find a nice way to ensure vis-shadows are drawn on top of items\n z-index: 1;\n */\n}\n\n.vis-panel .vis-shadow.vis-top {\n top: -1px;\n left: 0;\n}\n\n.vis-panel .vis-shadow.vis-bottom {\n bottom: -1px;\n left: 0;\n}\n\n.vis-graph-group0 {\n fill: #4f81bd;\n fill-opacity: 0;\n stroke-width: 2px;\n stroke: #4f81bd;\n}\n\n.vis-graph-group1 {\n fill: #f79646;\n fill-opacity: 0;\n stroke-width: 2px;\n stroke: #f79646;\n}\n\n.vis-graph-group2 {\n fill: #8c51cf;\n fill-opacity: 0;\n stroke-width: 2px;\n stroke: #8c51cf;\n}\n\n.vis-graph-group3 {\n fill: #75c841;\n fill-opacity: 0;\n stroke-width: 2px;\n stroke: #75c841;\n}\n\n.vis-graph-group4 {\n fill: #ff0100;\n fill-opacity: 0;\n stroke-width: 2px;\n stroke: #ff0100;\n}\n\n.vis-graph-group5 {\n fill: #37d8e6;\n fill-opacity: 0;\n stroke-width: 2px;\n stroke: #37d8e6;\n}\n\n.vis-graph-group6 {\n fill: #042662;\n fill-opacity: 0;\n stroke-width: 2px;\n stroke: #042662;\n}\n\n.vis-graph-group7 {\n fill: #00ff26;\n fill-opacity: 0;\n stroke-width: 2px;\n stroke: #00ff26;\n}\n\n.vis-graph-group8 {\n fill: #ff00ff;\n fill-opacity: 0;\n stroke-width: 2px;\n stroke: #ff00ff;\n}\n\n.vis-graph-group9 {\n fill: #8f3938;\n fill-opacity: 0;\n stroke-width: 2px;\n stroke: #8f3938;\n}\n\n.vis-timeline .vis-fill {\n fill-opacity: 0.1;\n stroke: none;\n}\n\n.vis-timeline .vis-bar {\n fill-opacity: 0.5;\n stroke-width: 1px;\n}\n\n.vis-timeline .vis-point {\n stroke-width: 2px;\n fill-opacity: 1;\n}\n\n.vis-timeline .vis-legend-background {\n stroke-width: 1px;\n fill-opacity: 0.9;\n fill: #ffffff;\n stroke: #c2c2c2;\n}\n\n.vis-timeline .vis-outline {\n stroke-width: 1px;\n fill-opacity: 1;\n fill: #ffffff;\n stroke: #e5e5e5;\n}\n\n.vis-timeline .vis-icon-fill {\n fill-opacity: 0.3;\n stroke: none;\n}\n\n.vis-timeline {\n position: relative;\n border: 1px solid #bfbfbf;\n overflow: hidden;\n padding: 0;\n margin: 0;\n box-sizing: border-box;\n}\n\n.vis-loading-screen {\n width: 100%;\n height: 100%;\n position: absolute;\n top: 0;\n left: 0;\n}\n\n.vis-custom-time {\n background-color: #6E94FF;\n width: 2px;\n cursor: move;\n z-index: 1;\n}\n\n.vis-custom-time > .vis-custom-time-marker {\n background-color: inherit;\n color: white;\n font-size: 12px;\n white-space: nowrap;\n padding: 3px 5px;\n top: 0px;\n cursor: initial;\n z-index: inherit;\n}\n\n.vis-panel.vis-background.vis-horizontal .vis-grid.vis-horizontal {\n position: absolute;\n width: 100%;\n height: 0;\n border-bottom: 1px solid;\n}\n\n.vis-panel.vis-background.vis-horizontal .vis-grid.vis-minor {\n border-color: #e5e5e5;\n}\n\n.vis-panel.vis-background.vis-horizontal .vis-grid.vis-major {\n border-color: #bfbfbf;\n}\n\n.vis-data-axis .vis-y-axis.vis-major {\n width: 100%;\n position: absolute;\n color: #4d4d4d;\n white-space: nowrap;\n}\n\n.vis-data-axis .vis-y-axis.vis-major.vis-measure {\n padding: 0;\n margin: 0;\n border: 0;\n visibility: hidden;\n width: auto;\n}\n\n.vis-data-axis .vis-y-axis.vis-minor {\n position: absolute;\n width: 100%;\n color: #bebebe;\n white-space: nowrap;\n}\n\n.vis-data-axis .vis-y-axis.vis-minor.vis-measure {\n padding: 0;\n margin: 0;\n border: 0;\n visibility: hidden;\n width: auto;\n}\n\n.vis-data-axis .vis-y-axis.vis-title {\n position: absolute;\n color: #4d4d4d;\n white-space: nowrap;\n bottom: 20px;\n text-align: center;\n}\n\n.vis-data-axis .vis-y-axis.vis-title.vis-measure {\n padding: 0;\n margin: 0;\n visibility: hidden;\n width: auto;\n}\n\n.vis-data-axis .vis-y-axis.vis-title.vis-left {\n bottom: 0;\n -webkit-transform-origin: left top;\n -moz-transform-origin: left top;\n -ms-transform-origin: left top;\n -o-transform-origin: left top;\n transform-origin: left bottom;\n -webkit-transform: rotate(-90deg);\n -moz-transform: rotate(-90deg);\n -ms-transform: rotate(-90deg);\n -o-transform: rotate(-90deg);\n transform: rotate(-90deg);\n}\n\n.vis-data-axis .vis-y-axis.vis-title.vis-right {\n bottom: 0;\n -webkit-transform-origin: right bottom;\n -moz-transform-origin: right bottom;\n -ms-transform-origin: right bottom;\n -o-transform-origin: right bottom;\n transform-origin: right bottom;\n -webkit-transform: rotate(90deg);\n -moz-transform: rotate(90deg);\n -ms-transform: rotate(90deg);\n -o-transform: rotate(90deg);\n transform: rotate(90deg);\n}\n\n.vis-legend {\n background-color: rgba(247, 252, 255, 0.65);\n padding: 5px;\n border: 1px solid #b3b3b3;\n box-shadow: 2px 2px 10px rgba(154, 154, 154, 0.55);\n}\n\n.vis-legend-text {\n /*font-size: 10px;*/\n white-space: nowrap;\n display: inline-block;\n}\n\n.vis-labelset {\n position: relative;\n overflow: hidden;\n box-sizing: border-box;\n}\n\n.vis-labelset .vis-label {\n position: relative;\n left: 0;\n top: 0;\n width: 100%;\n color: #4d4d4d;\n box-sizing: border-box;\n}\n\n.vis-labelset .vis-label {\n border-bottom: 1px solid #bfbfbf;\n}\n\n.vis-labelset .vis-label.draggable {\n cursor: pointer;\n}\n\n.vis-group-is-dragging {\n background: rgba(0, 0, 0, 0.1);\n}\n\n.vis-labelset .vis-label:last-child {\n border-bottom: none;\n}\n\n.vis-labelset .vis-label .vis-inner {\n display: inline-block;\n padding: 5px;\n}\n\n.vis-labelset .vis-label .vis-inner.vis-hidden {\n padding: 0;\n}\n\n.vis-itemset {\n position: relative;\n padding: 0;\n margin: 0;\n box-sizing: border-box;\n}\n\n.vis-itemset .vis-background,\n.vis-itemset .vis-foreground {\n position: absolute;\n width: 100%;\n height: 100%;\n overflow: visible;\n}\n\n.vis-axis {\n position: absolute;\n width: 100%;\n height: 0;\n left: 0;\n z-index: 1;\n}\n\n.vis-foreground .vis-group {\n position: relative;\n box-sizing: border-box;\n border-bottom: 1px solid #bfbfbf;\n}\n\n.vis-foreground .vis-group:last-child {\n border-bottom: none;\n}\n\n.vis-nesting-group {\n cursor: pointer;\n}\n\n.vis-label.vis-nested-group.vis-group-level-unknown-but-gte1 {\n background: #f5f5f5;\n}\n\n.vis-label.vis-nested-group.vis-group-level-0 {\n background-color: #ffffff;\n}\n\n.vis-ltr .vis-label.vis-nested-group.vis-group-level-0 .vis-inner {\n padding-left: 0;\n}\n\n.vis-rtl .vis-label.vis-nested-group.vis-group-level-0 .vis-inner {\n padding-right: 0;\n}\n\n.vis-label.vis-nested-group.vis-group-level-1 {\n background-color: rgba(0, 0, 0, 0.05);\n}\n\n.vis-ltr .vis-label.vis-nested-group.vis-group-level-1 .vis-inner {\n padding-left: 15px;\n}\n\n.vis-rtl .vis-label.vis-nested-group.vis-group-level-1 .vis-inner {\n padding-right: 15px;\n}\n\n.vis-label.vis-nested-group.vis-group-level-2 {\n background-color: rgba(0, 0, 0, 0.1);\n}\n\n.vis-ltr .vis-label.vis-nested-group.vis-group-level-2 .vis-inner {\n padding-left: 30px;\n}\n\n.vis-rtl .vis-label.vis-nested-group.vis-group-level-2 .vis-inner {\n padding-right: 30px;\n}\n\n.vis-label.vis-nested-group.vis-group-level-3 {\n background-color: rgba(0, 0, 0, 0.15);\n}\n\n.vis-ltr .vis-label.vis-nested-group.vis-group-level-3 .vis-inner {\n padding-left: 45px;\n}\n\n.vis-rtl .vis-label.vis-nested-group.vis-group-level-3 .vis-inner {\n padding-right: 45px;\n}\n\n.vis-label.vis-nested-group.vis-group-level-4 {\n background-color: rgba(0, 0, 0, 0.2);\n}\n\n.vis-ltr .vis-label.vis-nested-group.vis-group-level-4 .vis-inner {\n padding-left: 60px;\n}\n\n.vis-rtl .vis-label.vis-nested-group.vis-group-level-4 .vis-inner {\n padding-right: 60px;\n}\n\n.vis-label.vis-nested-group.vis-group-level-5 {\n background-color: rgba(0, 0, 0, 0.25);\n}\n\n.vis-ltr .vis-label.vis-nested-group.vis-group-level-5 .vis-inner {\n padding-left: 75px;\n}\n\n.vis-rtl .vis-label.vis-nested-group.vis-group-level-5 .vis-inner {\n padding-right: 75px;\n}\n\n.vis-label.vis-nested-group.vis-group-level-6 {\n background-color: rgba(0, 0, 0, 0.3);\n}\n\n.vis-ltr .vis-label.vis-nested-group.vis-group-level-6 .vis-inner {\n padding-left: 90px;\n}\n\n.vis-rtl .vis-label.vis-nested-group.vis-group-level-6 .vis-inner {\n padding-right: 90px;\n}\n\n.vis-label.vis-nested-group.vis-group-level-7 {\n background-color: rgba(0, 0, 0, 0.35);\n}\n\n.vis-ltr .vis-label.vis-nested-group.vis-group-level-7 .vis-inner {\n padding-left: 105px;\n}\n\n.vis-rtl .vis-label.vis-nested-group.vis-group-level-7 .vis-inner {\n padding-right: 105px;\n}\n\n.vis-label.vis-nested-group.vis-group-level-8 {\n background-color: rgba(0, 0, 0, 0.4);\n}\n\n.vis-ltr .vis-label.vis-nested-group.vis-group-level-8 .vis-inner {\n padding-left: 120px;\n}\n\n.vis-rtl .vis-label.vis-nested-group.vis-group-level-8 .vis-inner {\n padding-right: 120px;\n}\n\n.vis-label.vis-nested-group.vis-group-level-9 {\n background-color: rgba(0, 0, 0, 0.45);\n}\n\n.vis-ltr .vis-label.vis-nested-group.vis-group-level-9 .vis-inner {\n padding-left: 135px;\n}\n\n.vis-rtl .vis-label.vis-nested-group.vis-group-level-9 .vis-inner {\n padding-right: 135px;\n}\n\n/* default takes over beginning with level-10 (thats why we add .vis-nested-group\n to the selectors above, to have higher specifity than these rules for the defaults) */\n.vis-label.vis-nested-group {\n background-color: rgba(0, 0, 0, 0.5);\n}\n\n.vis-ltr .vis-label.vis-nested-group .vis-inner {\n padding-left: 150px;\n}\n\n.vis-rtl .vis-label.vis-nested-group .vis-inner {\n padding-right: 150px;\n}\n\n.vis-group-level-unknown-but-gte1 {\n border: 1px solid red;\n}\n\n/* expanded/collapsed indicators */\n.vis-label.vis-nesting-group:before,\n.vis-label.vis-nesting-group:before {\n display: inline-block;\n width: 15px;\n}\n\n.vis-label.vis-nesting-group.expanded:before {\n content: "▼";\n}\n\n.vis-label.vis-nesting-group.collapsed:before {\n content: "▶";\n}\n\n.vis-rtl .vis-label.vis-nesting-group.collapsed:before {\n content: "◀";\n}\n\n/* compensate missing expanded/collapsed indicator, but only at levels > 0 */\n.vis-ltr .vis-label:not(.vis-nesting-group):not(.vis-group-level-0) {\n padding-left: 15px;\n}\n\n.vis-rtl .vis-label:not(.vis-nesting-group):not(.vis-group-level-0) {\n padding-right: 15px;\n}\n\n.vis-overlay {\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n z-index: 10;\n}\n\n.vis-time-axis {\n position: relative;\n overflow: hidden;\n}\n\n.vis-time-axis.vis-foreground {\n top: 0;\n left: 0;\n width: 100%;\n}\n\n.vis-time-axis.vis-background {\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n}\n\n.vis-time-axis .vis-text {\n position: absolute;\n color: #4d4d4d;\n padding: 3px;\n overflow: hidden;\n box-sizing: border-box;\n white-space: nowrap;\n}\n\n.vis-time-axis .vis-text.vis-measure {\n position: absolute;\n padding-left: 0;\n padding-right: 0;\n margin-left: 0;\n margin-right: 0;\n visibility: hidden;\n}\n\n.vis-time-axis .vis-grid.vis-vertical {\n position: absolute;\n border-left: 1px solid;\n}\n\n.vis-time-axis .vis-grid.vis-vertical-rtl {\n position: absolute;\n border-right: 1px solid;\n}\n\n.vis-time-axis .vis-grid.vis-minor {\n border-color: #e5e5e5;\n}\n\n.vis-time-axis .vis-grid.vis-major {\n border-color: #bfbfbf;\n}\n\n.vis-item {\n position: absolute;\n color: #1A1A1A;\n border-color: #97B0F8;\n border-width: 1px;\n background-color: #D5DDF6;\n display: inline-block;\n z-index: 1;\n /*overflow: hidden;*/\n}\n\n.vis-item.vis-selected {\n border-color: #FFC200;\n background-color: #FFF785;\n /* z-index must be higher than the z-index of custom time bar and current time bar */\n z-index: 2;\n}\n\n.vis-editable.vis-selected {\n cursor: move;\n}\n\n.vis-item.vis-point.vis-selected {\n background-color: #FFF785;\n}\n\n.vis-item.vis-box {\n text-align: center;\n border-style: solid;\n border-radius: 2px;\n}\n\n.vis-item.vis-point {\n background: none;\n}\n\n.vis-item.vis-dot {\n position: absolute;\n padding: 0;\n border-width: 4px;\n border-style: solid;\n border-radius: 4px;\n}\n\n.vis-item.vis-range {\n border-style: solid;\n border-radius: 2px;\n box-sizing: border-box;\n}\n\n.vis-item.vis-background {\n border: none;\n background-color: rgba(213, 221, 246, 0.4);\n box-sizing: border-box;\n padding: 0;\n margin: 0;\n}\n\n.vis-item .vis-item-overflow {\n position: relative;\n width: 100%;\n height: 100%;\n padding: 0;\n margin: 0;\n overflow: hidden;\n}\n\n.vis-item-visible-frame {\n white-space: nowrap;\n}\n\n.vis-item.vis-range .vis-item-content {\n position: relative;\n display: inline-block;\n}\n\n.vis-item.vis-background .vis-item-content {\n position: absolute;\n display: inline-block;\n}\n\n.vis-item.vis-line {\n padding: 0;\n position: absolute;\n width: 0;\n border-left-width: 1px;\n border-left-style: solid;\n}\n\n.vis-item .vis-item-content {\n white-space: nowrap;\n box-sizing: border-box;\n padding: 5px;\n}\n\n.vis-item .vis-onUpdateTime-tooltip {\n position: absolute;\n background: #4f81bd;\n color: white;\n width: 200px;\n text-align: center;\n white-space: nowrap;\n padding: 5px;\n border-radius: 1px;\n transition: 0.4s;\n -o-transition: 0.4s;\n -moz-transition: 0.4s;\n -webkit-transition: 0.4s;\n}\n\n.vis-item .vis-delete, .vis-item .vis-delete-rtl {\n position: absolute;\n top: 0px;\n width: 24px;\n height: 24px;\n box-sizing: border-box;\n padding: 0px 5px;\n cursor: pointer;\n -webkit-transition: background 0.2s linear;\n -moz-transition: background 0.2s linear;\n -ms-transition: background 0.2s linear;\n -o-transition: background 0.2s linear;\n transition: background 0.2s linear;\n}\n\n.vis-item .vis-delete {\n right: -24px;\n}\n\n.vis-item .vis-delete-rtl {\n left: -24px;\n}\n\n.vis-item .vis-delete:after, .vis-item .vis-delete-rtl:after {\n content: "×"; /* MULTIPLICATION SIGN */\n color: red;\n font-family: arial, sans-serif;\n font-size: 22px;\n font-weight: bold;\n -webkit-transition: color 0.2s linear;\n -moz-transition: color 0.2s linear;\n -ms-transition: color 0.2s linear;\n -o-transition: color 0.2s linear;\n transition: color 0.2s linear;\n}\n\n.vis-item .vis-delete:hover, .vis-item .vis-delete-rtl:hover {\n background: red;\n}\n\n.vis-item .vis-delete:hover:after, .vis-item .vis-delete-rtl:hover:after {\n color: white;\n}\n\n.vis-item .vis-drag-center {\n position: absolute;\n width: 100%;\n height: 100%;\n top: 0;\n left: 0px;\n cursor: move;\n}\n\n.vis-item.vis-range .vis-drag-left {\n position: absolute;\n width: 24px;\n max-width: 20%;\n min-width: 2px;\n height: 100%;\n top: 0;\n left: -4px;\n cursor: w-resize;\n}\n\n.vis-item.vis-range .vis-drag-right {\n position: absolute;\n width: 24px;\n max-width: 20%;\n min-width: 2px;\n height: 100%;\n top: 0;\n right: -4px;\n cursor: e-resize;\n}\n\n.vis-range.vis-item.vis-readonly .vis-drag-left,\n.vis-range.vis-item.vis-readonly .vis-drag-right {\n cursor: auto;\n}\n\n.vis-item.vis-cluster {\n vertical-align: center;\n text-align: center;\n border-style: solid;\n border-radius: 2px;\n}\n\n.vis-item.vis-cluster-line {\n padding: 0;\n position: absolute;\n width: 0;\n border-left-width: 1px;\n border-left-style: solid;\n}\n\n.vis-item.vis-cluster-dot {\n position: absolute;\n padding: 0;\n border-width: 4px;\n border-style: solid;\n border-radius: 4px;\n}\n\ndiv.vis-configuration {\n position: relative;\n display: block;\n float: left;\n font-size: 12px;\n}\n\ndiv.vis-configuration-wrapper {\n display: block;\n width: 700px;\n}\n\ndiv.vis-configuration-wrapper::after {\n clear: both;\n content: "";\n display: block;\n}\n\ndiv.vis-configuration.vis-config-option-container {\n display: block;\n width: 495px;\n background-color: #ffffff;\n border: 2px solid #f7f8fa;\n border-radius: 4px;\n margin-top: 20px;\n left: 10px;\n padding-left: 5px;\n}\n\ndiv.vis-configuration.vis-config-button {\n display: block;\n width: 495px;\n height: 25px;\n vertical-align: middle;\n line-height: 25px;\n background-color: #f7f8fa;\n border: 2px solid #ceced0;\n border-radius: 4px;\n margin-top: 20px;\n left: 10px;\n padding-left: 5px;\n cursor: pointer;\n margin-bottom: 30px;\n}\n\ndiv.vis-configuration.vis-config-button.hover {\n background-color: #4588e6;\n border: 2px solid #214373;\n color: #ffffff;\n}\n\ndiv.vis-configuration.vis-config-item {\n display: block;\n float: left;\n width: 495px;\n height: 25px;\n vertical-align: middle;\n line-height: 25px;\n}\n\ndiv.vis-configuration.vis-config-item.vis-config-s2 {\n left: 10px;\n background-color: #f7f8fa;\n padding-left: 5px;\n border-radius: 3px;\n}\n\ndiv.vis-configuration.vis-config-item.vis-config-s3 {\n left: 20px;\n background-color: #e4e9f0;\n padding-left: 5px;\n border-radius: 3px;\n}\n\ndiv.vis-configuration.vis-config-item.vis-config-s4 {\n left: 30px;\n background-color: #cfd8e6;\n padding-left: 5px;\n border-radius: 3px;\n}\n\ndiv.vis-configuration.vis-config-header {\n font-size: 18px;\n font-weight: bold;\n}\n\ndiv.vis-configuration.vis-config-label {\n width: 120px;\n height: 25px;\n line-height: 25px;\n}\n\ndiv.vis-configuration.vis-config-label.vis-config-s3 {\n width: 110px;\n}\n\ndiv.vis-configuration.vis-config-label.vis-config-s4 {\n width: 100px;\n}\n\ndiv.vis-configuration.vis-config-colorBlock {\n top: 1px;\n width: 30px;\n height: 19px;\n border: 1px solid #444444;\n border-radius: 2px;\n padding: 0px;\n margin: 0px;\n cursor: pointer;\n}\n\ninput.vis-configuration.vis-config-checkbox {\n left: -5px;\n}\n\ninput.vis-configuration.vis-config-rangeinput {\n position: relative;\n top: -5px;\n width: 60px;\n /*height:13px;*/\n padding: 1px;\n margin: 0;\n pointer-events: none;\n}\n\ninput.vis-configuration.vis-config-range {\n /*removes default webkit styles*/\n -webkit-appearance: none;\n /*fix for FF unable to apply focus style bug */\n border: 0px solid white;\n background-color: rgba(0, 0, 0, 0);\n /*required for proper track sizing in FF*/\n width: 300px;\n height: 20px;\n}\n\ninput.vis-configuration.vis-config-range::-webkit-slider-runnable-track {\n width: 300px;\n height: 5px;\n background: #dedede; /* Old browsers */\n background: -moz-linear-gradient(top, #dedede 0%, #c8c8c8 99%); /* FF3.6+ */\n background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #dedede), color-stop(99%, #c8c8c8)); /* Chrome,Safari4+ */\n background: -webkit-linear-gradient(top, #dedede 0%, #c8c8c8 99%); /* Chrome10+,Safari5.1+ */\n background: -o-linear-gradient(top, #dedede 0%, #c8c8c8 99%); /* Opera 11.10+ */\n background: -ms-linear-gradient(top, #dedede 0%, #c8c8c8 99%); /* IE10+ */\n background: linear-gradient(to bottom, #dedede 0%, #c8c8c8 99%); /* W3C */\n filter: progid:DXImageTransform.Microsoft.gradient( startColorstr="#dedede", endColorstr="#c8c8c8",GradientType=0 ); /* IE6-9 */\n border: 1px solid #999999;\n box-shadow: #aaaaaa 0px 0px 3px 0px;\n border-radius: 3px;\n}\n\ninput.vis-configuration.vis-config-range::-webkit-slider-thumb {\n -webkit-appearance: none;\n border: 1px solid #14334b;\n height: 17px;\n width: 17px;\n border-radius: 50%;\n background: #3876c2; /* Old browsers */\n background: -moz-linear-gradient(top, #3876c2 0%, #385380 100%); /* FF3.6+ */\n background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #3876c2), color-stop(100%, #385380)); /* Chrome,Safari4+ */\n background: -webkit-linear-gradient(top, #3876c2 0%, #385380 100%); /* Chrome10+,Safari5.1+ */\n background: -o-linear-gradient(top, #3876c2 0%, #385380 100%); /* Opera 11.10+ */\n background: -ms-linear-gradient(top, #3876c2 0%, #385380 100%); /* IE10+ */\n background: linear-gradient(to bottom, #3876c2 0%, #385380 100%); /* W3C */\n filter: progid:DXImageTransform.Microsoft.gradient( startColorstr="#3876c2", endColorstr="#385380",GradientType=0 ); /* IE6-9 */\n box-shadow: #111927 0px 0px 1px 0px;\n margin-top: -7px;\n}\n\ninput.vis-configuration.vis-config-range:focus {\n outline: none;\n}\n\ninput.vis-configuration.vis-config-range:focus::-webkit-slider-runnable-track {\n background: #9d9d9d; /* Old browsers */\n background: -moz-linear-gradient(top, #9d9d9d 0%, #c8c8c8 99%); /* FF3.6+ */\n background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #9d9d9d), color-stop(99%, #c8c8c8)); /* Chrome,Safari4+ */\n background: -webkit-linear-gradient(top, #9d9d9d 0%, #c8c8c8 99%); /* Chrome10+,Safari5.1+ */\n background: -o-linear-gradient(top, #9d9d9d 0%, #c8c8c8 99%); /* Opera 11.10+ */\n background: -ms-linear-gradient(top, #9d9d9d 0%, #c8c8c8 99%); /* IE10+ */\n background: linear-gradient(to bottom, #9d9d9d 0%, #c8c8c8 99%); /* W3C */\n filter: progid:DXImageTransform.Microsoft.gradient( startColorstr="#9d9d9d", endColorstr="#c8c8c8",GradientType=0 ); /* IE6-9 */\n}\n\ninput.vis-configuration.vis-config-range::-moz-range-track {\n width: 300px;\n height: 10px;\n background: #dedede; /* Old browsers */\n background: -moz-linear-gradient(top, #dedede 0%, #c8c8c8 99%); /* FF3.6+ */\n background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #dedede), color-stop(99%, #c8c8c8)); /* Chrome,Safari4+ */\n background: -webkit-linear-gradient(top, #dedede 0%, #c8c8c8 99%); /* Chrome10+,Safari5.1+ */\n background: -o-linear-gradient(top, #dedede 0%, #c8c8c8 99%); /* Opera 11.10+ */\n background: -ms-linear-gradient(top, #dedede 0%, #c8c8c8 99%); /* IE10+ */\n background: linear-gradient(to bottom, #dedede 0%, #c8c8c8 99%); /* W3C */\n filter: progid:DXImageTransform.Microsoft.gradient( startColorstr="#dedede", endColorstr="#c8c8c8",GradientType=0 ); /* IE6-9 */\n border: 1px solid #999999;\n box-shadow: #aaaaaa 0px 0px 3px 0px;\n border-radius: 3px;\n}\n\ninput.vis-configuration.vis-config-range::-moz-range-thumb {\n border: none;\n height: 16px;\n width: 16px;\n border-radius: 50%;\n background: #385380;\n}\n\n/*hide the outline behind the border*/\ninput.vis-configuration.vis-config-range:-moz-focusring {\n outline: 1px solid white;\n outline-offset: -1px;\n}\n\ninput.vis-configuration.vis-config-range::-ms-track {\n width: 300px;\n height: 5px;\n /*remove bg colour from the track, we\'ll use ms-fill-lower and ms-fill-upper instead */\n background: transparent;\n /*leave room for the larger thumb to overflow with a transparent border */\n border-color: transparent;\n border-width: 6px 0;\n /*remove default tick marks*/\n color: transparent;\n}\n\ninput.vis-configuration.vis-config-range::-ms-fill-lower {\n background: #777;\n border-radius: 10px;\n}\n\ninput.vis-configuration.vis-config-range::-ms-fill-upper {\n background: #ddd;\n border-radius: 10px;\n}\n\ninput.vis-configuration.vis-config-range::-ms-thumb {\n border: none;\n height: 16px;\n width: 16px;\n border-radius: 50%;\n background: #385380;\n}\n\ninput.vis-configuration.vis-config-range:focus::-ms-fill-lower {\n background: #888;\n}\n\ninput.vis-configuration.vis-config-range:focus::-ms-fill-upper {\n background: #ccc;\n}\n\n.vis-configuration-popup {\n position: absolute;\n background: rgba(57, 76, 89, 0.85);\n border: 2px solid #f2faff;\n line-height: 30px;\n height: 30px;\n width: 150px;\n text-align: center;\n color: #ffffff;\n font-size: 14px;\n border-radius: 4px;\n -webkit-transition: opacity 0.3s ease-in-out;\n -moz-transition: opacity 0.3s ease-in-out;\n transition: opacity 0.3s ease-in-out;\n}\n\n.vis-configuration-popup:after, .vis-configuration-popup:before {\n left: 100%;\n top: 50%;\n border: solid transparent;\n content: " ";\n height: 0;\n width: 0;\n position: absolute;\n pointer-events: none;\n}\n\n.vis-configuration-popup:after {\n border-color: rgba(136, 183, 213, 0);\n border-left-color: rgba(57, 76, 89, 0.85);\n border-width: 8px;\n margin-top: -8px;\n}\n\n.vis-configuration-popup:before {\n border-color: rgba(194, 225, 245, 0);\n border-left-color: #f2faff;\n border-width: 12px;\n margin-top: -12px;\n}\n\n.vis .overlay {\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n /* Must be displayed above for example selected Timeline items */\n z-index: 10;\n}\n\n.vis-active {\n box-shadow: 0 0 10px #86d5f8;\n}\n\ndiv.vis-tooltip {\n position: absolute;\n visibility: hidden;\n padding: 5px;\n white-space: nowrap;\n font-family: verdana;\n font-size: 14px;\n color: #000000;\n background-color: #f5f4ed;\n -moz-border-radius: 3px;\n -webkit-border-radius: 3px;\n border-radius: 3px;\n border: 1px solid #808074;\n box-shadow: 3px 3px 10px rgba(0, 0, 0, 0.2);\n pointer-events: none;\n z-index: 5;\n}\n\nside-drawer {\n background-color: var(--card-background-color);\n}\n\ndiv.control-surround {\n position: absolute;\n bottom: 50%;\n transform: translateY(50%);\n z-index: 0;\n padding-top: 20px;\n padding-bottom: 20px;\n}\n\n:host([location=left]) div.control-surround {\n padding-right: 12px;\n left: 100%;\n}\n\n:host([location=right]) div.control-surround {\n padding-left: 12px;\n right: 100%;\n}\n\n:host([empty]), :host([empty]) > * {\n visibility: hidden;\n}\n\n:host(:not([empty])), :host(:not([empty])) > * {\n visibility: visible;\n}\n\nha-icon.control {\n color: var(--secondary-color, white);\n background-color: rgba(0, 0, 0, 0.7);\n opacity: 0.7;\n pointer-events: all;\n --mdc-icon-size: 20px;\n padding-top: 20px;\n padding-bottom: 20px;\n transition: opacity 0.5s ease;\n}\n\n:host([open]) ha-icon.control, ha-icon.control:hover {\n opacity: 1;\n background-color: black;\n}\n\n:host([location=left]) ha-icon.control {\n border-top-right-radius: 20px;\n border-bottom-right-radius: 20px;\n}\n\n:host([location=right]) ha-icon.control {\n border-top-left-radius: 20px;\n border-bottom-left-radius: 20px;\n}\n\n:host {\n --frigate-card-thumbnail-size-max: 175px;\n --frigate-card-thumbnail-details-width: calc(\n var(--frigate-card-thumbnail-size) + 200px\n );\n}\n\n:host {\n width: 100%;\n height: 100%;\n background-color: var(--card-background-color);\n padding-bottom: 5px;\n display: flex;\n flex-direction: column;\n position: relative;\n}\n\nfrigate-card-thumbnail {\n height: var(--frigate-card-thumbnail-size);\n width: var(--frigate-card-thumbnail-size);\n}\n\nfrigate-card-thumbnail[details] {\n width: var(--frigate-card-thumbnail-details-width);\n}\n\ndiv.timeline {\n flex: 1;\n}\n\ndiv.timeline.left-margin {\n margin-left: 21px;\n}\n\ndiv.timeline.right-margin {\n margin-right: 21px;\n}\n\n.vis-text {\n color: var(--primary-text-color) !important;\n}\n\n.vis-timeline {\n border: none;\n}\n\n.vis-labelset .vis-label {\n color: var(--primary-text-color);\n}\n\n.vis-item {\n border-color: var(--primary-color);\n background: none;\n color: var(--primary-text-color);\n background-color: var(--primary-color);\n transition: background-color ease-in-out 1s, border-color ease-in-out 1s, box-shadow ease-in-out 1s;\n}\n\n.vis-item.vis-selected {\n border-color: var(--accent-color);\n background-color: var(--accent-color);\n box-shadow: 0px 0px 5px 1px var(--primary-color);\n}\n\n.vis-item.vis-background {\n background-color: var(--primary-color);\n opacity: 0.1;\n}\n\n.vis-item:not(.vis-background) {\n cursor: pointer;\n}\n\n:host([recordings]) .vis-item.vis-background,\n:host([recordings]) .vis-labelset,\n:host([recordings]) .vis-time-axis {\n cursor: crosshair;\n}\n\n.vis-item:active {\n cursor: unset;\n}\n\n.vis-item.vis-box {\n border: none;\n}\n\n.vis-item .vis-item-content {\n padding: 0px;\n}\n\n.vis-item.vis-cluster {\n border-style: dotted;\n color: var(--primary-text-color);\n background-color: var(--primary-background-color);\n box-shadow: 0px 0px 5px 1px var(--primary-color);\n}\n\n.vis-time-axis .vis-grid.vis-minor {\n border-color: var(--secondary-color);\n}\n\n.vis-text.vis-minor,\n.vis-label {\n transition: background-color 0.5s ease-out;\n}\n\n:host([recordings]) .vis-text.vis-minor:hover,\n:host([recordings]) .vis-label:hover {\n background-color: var(--primary-color);\n}\n\n.vis-time-axis .vis-grid.vis-major {\n border-color: var(--secondary-color);\n}\n\n.vis-label {\n display: flex;\n justify-content: center;\n align-items: center;\n}\n\ndiv.vis-tooltip {\n padding: 0px;\n background-color: unset;\n border: none;\n font-family: unset;\n}')}};t([yt({attribute:!1})],Tk.prototype,"hass",void 0),t([yt({attribute:!1})],Tk.prototype,"view",void 0),t([yt({attribute:!1})],Tk.prototype,"cameras",void 0),t([yt({attribute:!1})],Tk.prototype,"timelineConfig",void 0),Tk=t([vt("frigate-card-timeline-core")],Tk);class Ok extends Map{constructor(t={}){if(super(),!(t.maxSize&&t.maxSize>0))throw new TypeError("`maxSize` must be a number greater than 0");if("number"==typeof t.maxAge&&0===t.maxAge)throw new TypeError("`maxAge` must be a number greater than 0");this.maxSize=t.maxSize,this.maxAge=t.maxAge||Number.POSITIVE_INFINITY,this.onEviction=t.onEviction,this.cache=new Map,this.oldCache=new Map,this._size=0}_emitEvictions(t){if("function"==typeof this.onEviction)for(const[e,i]of t)this.onEviction(e,i.value)}_deleteIfExpired(t,e){return"number"==typeof e.expiry&&e.expiry<=Date.now()&&("function"==typeof this.onEviction&&this.onEviction(t,e.value),this.delete(t))}_getOrDeleteIfExpired(t,e){if(!1===this._deleteIfExpired(t,e))return e.value}_getItemValue(t,e){return e.expiry?this._getOrDeleteIfExpired(t,e):e.value}_peek(t,e){const i=e.get(t);return this._getItemValue(t,i)}_set(t,e){this.cache.set(t,e),this._size++,this._size>=this.maxSize&&(this._size=0,this._emitEvictions(this.oldCache),this.oldCache=this.cache,this.cache=new Map)}_moveToRecent(t,e){this.oldCache.delete(t),this._set(t,e)}*_entriesAscending(){for(const t of this.oldCache){const[e,i]=t;if(!this.cache.has(e)){!1===this._deleteIfExpired(e,i)&&(yield t)}}for(const t of this.cache){const[e,i]=t;!1===this._deleteIfExpired(e,i)&&(yield t)}}get(t){if(this.cache.has(t)){const e=this.cache.get(t);return this._getItemValue(t,e)}if(this.oldCache.has(t)){const e=this.oldCache.get(t);if(!1===this._deleteIfExpired(t,e))return this._moveToRecent(t,e),e.value}}set(t,e,{maxAge:i=this.maxAge}={}){const n="number"==typeof i&&i!==Number.POSITIVE_INFINITY?Date.now()+i:void 0;this.cache.has(t)?this.cache.set(t,{value:e,expiry:n}):this._set(t,{value:e,expiry:n})}has(t){return this.cache.has(t)?!this._deleteIfExpired(t,this.cache.get(t)):!!this.oldCache.has(t)&&!this._deleteIfExpired(t,this.oldCache.get(t))}peek(t){return this.cache.has(t)?this._peek(t,this.cache):this.oldCache.has(t)?this._peek(t,this.oldCache):void 0}delete(t){const e=this.cache.delete(t);return e&&this._size--,this.oldCache.delete(t)||e}clear(){this.cache.clear(),this.oldCache.clear(),this._size=0}resize(t){if(!(t&&t>0))throw new TypeError("`maxSize` must be a number greater than 0");const e=[...this._entriesAscending()],i=e.length-t;i<0?(this.cache=new Map(e),this.oldCache=new Map,this._size=e.length):(i>0&&this._emitEvictions(e.slice(0,i)),this.oldCache=new Map(e.slice(i)),this.cache=new Map,this._size=0),this.maxSize=t}*keys(){for(const[t]of this)yield t}*values(){for(const[,t]of this)yield t}*[Symbol.iterator](){for(const t of this.cache){const[e,i]=t;!1===this._deleteIfExpired(e,i)&&(yield[e,i.value])}for(const t of this.oldCache){const[e,i]=t;if(!this.cache.has(e)){!1===this._deleteIfExpired(e,i)&&(yield[e,i.value])}}}*entriesDescending(){let t=[...this.cache];for(let e=t.length-1;e>=0;--e){const i=t[e],[n,o]=i;!1===this._deleteIfExpired(n,o)&&(yield[n,o.value])}t=[...this.oldCache];for(let e=t.length-1;e>=0;--e){const i=t[e],[n,o]=i;if(!this.cache.has(n)){!1===this._deleteIfExpired(n,o)&&(yield[n,o.value])}}}*entriesAscending(){for(const[t,e]of this._entriesAscending())yield[t,e.value]}get size(){if(!this._size)return this.oldCache.size;let t=0;for(const e of this.oldCache.keys())this.cache.has(e)||t++;return Math.min(this._size+t,this.maxSize)}entries(){return this.entriesAscending()}forEach(t,e=this){for(const[i,n]of this.entriesAscending())t.call(e,n,i,this)}get[Symbol.toStringTag](){return JSON.stringify([...this.entriesAscending()])}}class Rk{constructor(){this._cache=new Ok({maxSize:1e3})}has(t){return this._cache.has(t)}get(t){return this._cache.get(t)}set(t,e){this._cache.set(t,e)}}const Pk=async(t,e,i)=>{if(!e)return null;const n=i?i.get(e.media_content_id):void 0;if(n)return n;const o={type:"media_source/resolve_media",media_content_id:e.media_content_id};let r=null;try{r=await ty(t,Lm,o)}catch(t){Og(t)}return i&&r&&i.set(e.media_content_id,r),r};let Nk=class extends gt{render(){if(!(this.hass&&this.view&&this.cameras&&this.viewerConfig))return;const t=Iy(this,this.hass,this.cameras,this.view.camera);if(!this.view.target){const e=this.view.getMediaType();if(!t||!e)return;return Ey(this,this.hass,this.view,wy(t,{mediaType:e})),Ug()}return K` + + + `}static get styles(){return _(":host {\n width: 100%;\n height: 100%;\n display: flex;\n flex-direction: column;\n gap: 5px;\n}\n\nfrigate-card-viewer-carousel {\n flex: 1;\n min-height: 0;\n}")}};t([yt({attribute:!1})],Nk.prototype,"hass",void 0),t([yt({attribute:!1})],Nk.prototype,"view",void 0),t([yt({attribute:!1})],Nk.prototype,"viewerConfig",void 0),t([yt({attribute:!1})],Nk.prototype,"cameras",void 0),t([yt({attribute:!1})],Nk.prototype,"resolvedMediaCache",void 0),Nk=t([vt("frigate-card-viewer")],Nk);let Fk=class extends gt{constructor(){super(...arguments),this._refMediaCarousel=zt(),this._slideToChild={},this._mediaResolutionTask=new jy(this,(async([t])=>{var e;for(let i=0;!(null===(e=this.viewerConfig)||void 0===e?void 0:e.lazy_load)&&this.hass&&t&&t.children&&i<(t.children||[]).length;++i)my(t.children[i])&&await Pk(this.hass,t.children[i],this.resolvedMediaCache)}),(()=>{var t;return[null===(t=this.view)||void 0===t?void 0:t.target]}))}updated(t){var e,i,n;const o=null===(e=this._refMediaCarousel.value)||void 0===e?void 0:e.frigateCardCarousel();if(o&&t.has("view")){const e=t.get("view");if(e&&e.target===(null===(i=this.view)||void 0===i?void 0:i.target)&&this.view.childIndex!=e.childIndex){const t=this._getSlideForChild(this.view.childIndex);null!==t&&t!==(null===(n=o.getCarouselSelected())||void 0===n?void 0:n.index)&&o.carouselScrollTo(t)}}super.updated(t)}_getSlideForChild(t){if(null==t)return null;const e=Object.keys(this._slideToChild).find((e=>this._slideToChild[e]===t));return void 0!==e?Number(e):null}_getTransitionEffect(){var t,e;return null!==(e=null===(t=this.viewerConfig)||void 0===t?void 0:t.transition_effect)&&void 0!==e?e:Pm.media_viewer.transition_effect}_getOptions(){var t,e,i,n;return{startIndex:null!==(e=this._getSlideForChild(null===(t=this.view)||void 0===t?void 0:t.childIndex))&&void 0!==e?e:0,draggable:null===(n=null===(i=this.viewerConfig)||void 0===i?void 0:i.draggable)||void 0===n||n}}_getPlayer(t){var e,i,n,o;return t||(t=null===(n=null===(i=null===(e=this._refMediaCarousel.value)||void 0===e?void 0:e.frigateCardCarousel())||void 0===i?void 0:i.getCarouselSelected())||void 0===n?void 0:n.element),null!==(o=null==t?void 0:t.querySelector("frigate-card-ha-hls-player"))&&void 0!==o?o:null}_getPlugins(){var t,e,i,n,o;return[...this.view&&this.view.target&&this.view.target.children&&this.view.target.children.length>1?[W_({forceWheelAxis:"y"})]:[],iw(Object.assign({},(null===(t=this.viewerConfig)||void 0===t?void 0:t.lazy_load)&&{lazyLoadCallback:this._lazyloadSlide.bind(this)})),tw(Object.assign(Object.assign(Object.assign(Object.assign({playerSelector:"frigate-card-ha-hls-player"},(null===(e=this.viewerConfig)||void 0===e?void 0:e.auto_play)&&{autoPlayCondition:this.viewerConfig.auto_play}),(null===(i=this.viewerConfig)||void 0===i?void 0:i.auto_pause)&&{autoPauseCondition:this.viewerConfig.auto_pause}),(null===(n=this.viewerConfig)||void 0===n?void 0:n.auto_mute)&&{autoMuteCondition:this.viewerConfig.auto_mute}),(null===(o=this.viewerConfig)||void 0===o?void 0:o.auto_unmute)&&{autoUnmuteCondition:this.viewerConfig.auto_unmute}))]}_getMediaNeighbors(){if(!this.view||!this.view.target||!this.view.target.children||null===this.view.childIndex)return null;let t=null;for(let e=this.view.childIndex-1;e>=0;e--){const i=this.view.target.children[e];if(i&&my(i)){t=e;break}}let e=null;for(let t=this.view.childIndex+1;to)&&(o=i)}if(!n||!o)return null;const r=wy(this.browseMediaQueryParameters,{mediaType:"clips",before:o,after:n});try{i=await by(this.hass,r)}catch(t){return null}if(!i||!i.children||!i.children.length)return null;for(let t=0;t{if(!t)return;const i=e.querySelector("img"),n=this._getPlayer(e);i?i.src=this._canonicalizeHAURL(t.url)||"":n&&(n.url=this._canonicalizeHAURL(t.url)||"")}))}_getSlides(){var t;if(!(this.view&&this.view.target&&this.view.target.children&&this.view.target.children.length))return[[],{}];const e={},i=[];for(let n=0;n<(null===(t=this.view.target.children)||void 0===t?void 0:t.length);++n){const t=this._renderMediaItem(this.view.target.children[n],i.length);t&&(e[i.length]=n,i.push(t))}return[i,e]}_isMediaFullyResolved(){var t,e,i;for(const n of(null===(e=null===(t=this.view)||void 0===t?void 0:t.target)||void 0===e?void 0:e.children)||[])if(!(null===(i=this.resolvedMediaCache)||void 0===i?void 0:i.has(n.media_content_id)))return!1;return!0}willUpdate(t){var e;t.has("viewerConfig")&&Zy(this,null===(e=this.viewerConfig)||void 0===e?void 0:e.layout)}render(){var t;return this._slideToChild={},(null===(t=this.viewerConfig)||void 0===t?void 0:t.lazy_load)||this._isMediaFullyResolved()?this._render():Fy(this,this._mediaResolutionTask,this._render.bind(this))}_render(){var t,e,i,n,o,r,s;const[a,l]=this._getSlides();if(this._slideToChild=l,!a.length||!(null===(t=this.view)||void 0===t?void 0:t.media))return;const d=this._getMediaNeighbors(),[c,h]=[null==d?void 0:d.previous,null==d?void 0:d.next];return K` + {var e,i;null===(i=null===(e=this._refMediaCarousel.value)||void 0===e?void 0:e.frigateCardCarousel())||void 0===i||i.carouselScrollPrevious(),Vm(t)}} + > + ${a} + {var e,i;null===(i=null===(e=this._refMediaCarousel.value)||void 0===e?void 0:e.frigateCardCarousel())||void 0===i||i.carouselScrollNext(),Vm(t)}} + > + `}_recordingSeekHandler(){var t,e;const i=this._getPlayer();i&&i.media&&(null===(e=null===(t=i.media.frigate)||void 0===t?void 0:t.recording)||void 0===e?void 0:e.seek_seconds)&&i.seek(i.media.frigate.recording.seek_seconds)}_renderMediaItem(t,e){var i;if(!(this.hass&&this.view&&this.viewerConfig&&my(t)&&["video","image"].includes(t.media_content_type)))return;const n=this.viewerConfig.lazy_load,o=null===(i=this.resolvedMediaCache)||void 0===i?void 0:i.get(t.media_content_id);return o||n?K` +
+ ${"video"===t.media_content_type?K`{lw(e,t)}} + > + `:K`{var e,i;(null===(i=null===(e=this._refMediaCarousel.value)||void 0===e?void 0:e.frigateCardCarousel())||void 0===i?void 0:i.carouselClickAllowed())&&this._findRelatedClipView(t).then((t=>{t&&t.dispatchChangeEvent(this)}))}} + @load="${t=>{var i,o,r;const s=null===(r=null===(o=null===(i=this._refMediaCarousel.value)||void 0===i?void 0:i.frigateCardCarousel())||void 0===o?void 0:o.getCarouselPlugins())||void 0===r?void 0:r.lazyload;n&&!(null==s?void 0:s.hasLazyloaded(e))||((t,e)=>{const i=Xy(e);i&&aw(e.composedPath()[0],{slide:t,mediaLoadedInfo:i})})(e,t)}}" + />`} +
+ `:void 0}static get styles(){return _(".embla__slide {\n height: 100%;\n flex: 0 0 100%;\n}\n\n.embla__slide img {\n display: block;\n width: 100%;\n height: 100%;\n object-fit: var(--frigate-card-media-layout-fit, contain);\n object-position: var(--frigate-card-media-layout-position-x, 50%) var(--frigate-card-media-layout-position-y, 50%);\n}")}};t([yt({attribute:!1})],Fk.prototype,"hass",void 0),t([yt({attribute:!1})],Fk.prototype,"view",void 0),t([yt({attribute:!1,hasChanged:Tg})],Fk.prototype,"viewerConfig",void 0),t([yt({attribute:!1})],Fk.prototype,"browseMediaQueryParameters",void 0),t([yt({attribute:!1})],Fk.prototype,"resolvedMediaCache",void 0),Fk=t([vt("frigate-card-viewer-carousel")],Fk);const Lk=(t,e,i)=>{Pc(t,e,i)},jk=(t,e,i)=>so(t,e,i),zk=(t,e)=>{let i=e,n=t;if(e&&e.split&&e.includes(".")){const o=e.split(".");i=o[o.length-1],n=jk(t,o.slice(0,-1).join("."))}n&&"object"==typeof n&&delete n[i]},Uk=function(t){let e=!1;for(let i=0;i{let o=t(n);return"number"!=typeof o||(o=e?Math.max(e,o):o,o=i?Math.min(i,o):o),o}},$k=function(t){if("number"!=typeof t)return"string"!=typeof t?null:(t=t.replace(/px$/i,""),isNaN(t)?null:Number(t))},Wk=function(t){return null},Vk=(t,e,i,n)=>{const o=jk(t,e);if(void 0===o)return!1;const r=(null==n?void 0:n.transform)?n.transform(o):o;return(e!==i||!Yl(o,r))&&(null===r?!(null==n?void 0:n.keepOriginal)&&(zk(t,e),!0):void 0!==r&&((null==n?void 0:n.keepOriginal)||zk(t,e),Lk(t,i,r),!0))},Jk=(t,e)=>t.replace("#",`[${e.toString()}]`),Kk=function(t,e,i){return function(n){return Vk(n,t,e,i)}},Zk=function(t,e,i){return function(n){let o=Kk(t,e,i)(n);return o=eS("overrides",Kk(t,e,i),(t=>t.overrides))(n)||o,o}},Xk=function(t,e){return Zk(t,t,{transform:e})},tS=function(t,e){return Kk(t,t,{transform:e})},eS=function(t,e,i){return function(n){let o=!1;const r=jk(n,t);return Array.isArray(r)&&r.forEach((t=>{const n=i?i(t):t;n&&"object"==typeof n&&(o=e(n)||o)})),o}},iS=function(t){if("object"!=typeof t)return"boolean"!=typeof t?null:{enabled:t}},nS=t=>{const e=`${t}.show_controls`;return function(i){let n=!1;return n=Zk(e,`${t}.show_favorite_control`,{keepOriginal:!0})(i)||n,n=Zk(e,`${t}.show_timeline_control`,{keepOriginal:!0})(i)||n,Xk(e,Wk)(i)||n}},oS=[Kk("frigate_url","frigate.url"),Kk("frigate_client_id","frigate.client_id"),Kk("frigate_camera_name","frigate.camera_name"),Kk("label","frigate.label"),Kk("zone","frigate.zone"),Kk("view_default","view.default"),Kk("view_timeout","view.timeout"),Kk("live_provider","live.provider"),Kk("live_preload","live.preload"),Kk("webrtc","live.webrtc"),Kk("autoplay_clip","event_viewer.autoplay_clip"),Kk("controls.nextprev","event_viewer.controls.next_previous.style"),Kk("controls.nextprev_size","event_viewer.controls.next_previous.size"),Kk("menu_mode","menu.mode"),Kk("menu_buttons","menu.buttons"),Kk("menu_button_size","menu.button_size"),Kk("image","image.src",{transform:function(t){return"object"!=typeof t?t:void 0}}),Kk("update_entities","view.update_entities"),function(t){let e=!1;if(void 0!==jk(t,"cameras"))return!1;const i={camera_entity:"cameras.#.camera_entity","frigate.camera_name":"cameras.#.camera_name","frigate.client_id":"cameras.#.client_id","frigate.label":"cameras.#.label","frigate.url":"cameras.#.frigate_url","frigate.zone":"cameras.#.zone","live.webrtc.entity":"cameras.#.webrtc.entity","live.webrtc.url":"cameras.#.webrtc.url","live.provider":"cameras.#.live_provider"};return Object.keys(i).forEach((n=>{e=Vk(t,n,Jk(i[n],0))||e})),e},function(t){const e=jk(t,"menu.conditions");if(void 0===e)return!1;const i=jk(t,"overrides")||[];return Lk(t,`overrides.[${i.length}]`,{conditions:e,overrides:{menu:{mode:"none"}}}),zk(t,"menu.conditions"),!0},Kk("view.timeout","view.timeout_seconds",{transform:function(t){return isNaN(t)?void 0:Number(t)}}),Kk("event_viewer.autoplay_clip","event_viewer.auto_play"),eS("cameras",Xk("live_provider",(t=>"frigate"===t?"ha":"webrtc"===t?"webrtc-card":t))),eS("cameras",Kk("webrtc","webrtc_card")),Zk("live.webrtc","live.webrtc_card"),Zk("image.src","image.url"),Xk("live.controls.thumbnails.size",Yk($k,75,175)),Xk("event_viewer.controls.thumbnails.size",Yk($k,75,175)),Xk("live.controls.next_previous.size",Yk($k,20)),Xk("event_viewer.controls.next_previous.size",Yk($k,20)),Xk("menu.button_size",Yk($k,20)),Xk("event_gallery.min_columns",Wk),function(t){let e=!1;return e=Zk("menu.mode","menu.style",{transform:t=>{if("string"==typeof t){const e=t.match(/^(hover|hidden|overlay|above|below|none)/);if(e)switch(e[1]){case"hover":case"hidden":case"overlay":case"none":return e[1];case"above":case"below":return"outside"}}},keepOriginal:!0})(t)||e,e=Zk("menu.mode","menu.position",{transform:t=>{if("string"==typeof t){const e=t.match(/(above|below|left|right|top|bottom)$/);if(e)switch(e[1]){case"left":case"right":case"top":case"bottom":return e[1];case"above":return"top";case"below":return"bottom"}}},keepOriginal:!0})(t)||e,Xk("menu.mode",Wk)(t)||e},Xk("menu.buttons.frigate",iS),Xk("menu.buttons.cameras",iS),Xk("menu.buttons.live",iS),Xk("menu.buttons.clips",iS),Xk("menu.buttons.snapshots",iS),Xk("menu.buttons.image",iS),Xk("menu.buttons.download",iS),Xk("menu.buttons.frigate_ui",iS),Xk("menu.buttons.fullscreen",iS),tS("live.lazy_unload",(t=>"boolean"==typeof t?t?"all":"never":void 0)),tS("live.auto_unmute",(t=>"boolean"==typeof t?t?"all":"never":void 0)),tS("event_viewer.auto_play",(t=>"boolean"==typeof t?t?"all":"never":void 0)),tS("event_viewer.auto_unmute",(t=>"boolean"==typeof t?t?"all":"never":void 0)),Zk("event_viewer","media_viewer"),eS("cameras",Kk("camera_name","frigate.camera_name")),eS("cameras",Kk("client_id","frigate.client_id")),eS("cameras",Kk("label","frigate.label")),eS("cameras",Kk("frigate_url","frigate.url")),eS("cameras",Kk("zone","frigate.zone")),nS("event_gallery.controls.thumbnails"),nS("media_viewer.controls.thumbnails"),nS("live.controls.thumbnails"),nS("timeline.controls.thumbnails")];const rS={cameras:{icon:"video",name:Sg("editor.cameras"),secondary:Sg("editor.cameras_secondary")},view:{icon:"eye",name:Sg("editor.view"),secondary:Sg("editor.view_secondary")},menu:{icon:"menu",name:Sg("editor.menu"),secondary:Sg("editor.menu_secondary")},live:{icon:"cctv",name:Sg("editor.live"),secondary:Sg("editor.live_secondary")},media_viewer:{icon:"filmstrip",name:Sg("editor.media_viewer"),secondary:Sg("editor.media_viewer_secondary")},event_gallery:{icon:"grid",name:Sg("editor.event_gallery"),secondary:Sg("editor.event_gallery_secondary")},image:{icon:"image",name:Sg("editor.image"),secondary:Sg("editor.image_secondary")},timeline:{icon:"chart-gantt",name:Sg("editor.timeline"),secondary:Sg("editor.timeline_secondary")},dimensions:{icon:"aspect-ratio",name:Sg("editor.dimensions"),secondary:Sg("editor.dimensions_secondary")},overrides:{icon:"file-replace",name:Sg("editor.overrides"),secondary:Sg("editor.overrides_secondary")}};let sS=class extends gt{constructor(){super(...arguments),this._initialized=!1,this._configUpgradeable=!1,this._expandedMenus={},this._viewModes=[{value:"",label:""},{value:"live",label:Sg("config.view.views.live")},{value:"clips",label:Sg("config.view.views.clips")},{value:"snapshots",label:Sg("config.view.views.snapshots")},{value:"clip",label:Sg("config.view.views.clip")},{value:"snapshot",label:Sg("config.view.views.snapshot")},{value:"image",label:Sg("config.view.views.image")},{value:"timeline",label:Sg("config.view.views.timeline")}],this._cameraSelectViewModes=[...this._viewModes,{value:"current",label:Sg("config.view.views.current")}],this._menuStyles=[{value:"",label:""},{value:"none",label:Sg("config.menu.styles.none")},{value:"hidden",label:Sg("config.menu.styles.hidden")},{value:"overlay",label:Sg("config.menu.styles.overlay")},{value:"hover",label:Sg("config.menu.styles.hover")},{value:"outside",label:Sg("config.menu.styles.outside")}],this._menuPositions=[{value:"",label:""},{value:"left",label:Sg("config.menu.positions.left")},{value:"right",label:Sg("config.menu.positions.right")},{value:"top",label:Sg("config.menu.positions.top")},{value:"bottom",label:Sg("config.menu.positions.bottom")}],this._menuAlignments=[{value:"",label:""},{value:"left",label:Sg("config.menu.alignments.left")},{value:"right",label:Sg("config.menu.alignments.right")},{value:"top",label:Sg("config.menu.alignments.top")},{value:"bottom",label:Sg("config.menu.alignments.bottom")}],this._eventViewerNextPreviousControlStyles=[{value:"",label:""},{value:"thumbnails",label:Sg("config.media_viewer.controls.next_previous.styles.thumbnails")},{value:"chevrons",label:Sg("config.media_viewer.controls.next_previous.styles.chevrons")},{value:"none",label:Sg("config.media_viewer.controls.next_previous.styles.none")}],this._liveNextPreviousControlStyles=[{value:"",label:""},{value:"chevrons",label:Sg("config.live.controls.next_previous.styles.chevrons")},{value:"icons",label:Sg("config.live.controls.next_previous.styles.icons")},{value:"none",label:Sg("config.live.controls.next_previous.styles.none")}],this._aspectRatioModes=[{value:"",label:""},{value:"dynamic",label:Sg("config.dimensions.aspect_ratio_modes.dynamic")},{value:"static",label:Sg("config.dimensions.aspect_ratio_modes.static")},{value:"unconstrained",label:Sg("config.dimensions.aspect_ratio_modes.unconstrained")}],this._thumbnailModes=[{value:"",label:""},{value:"none",label:Sg("config.media_viewer.controls.thumbnails.modes.none")},{value:"above",label:Sg("config.media_viewer.controls.thumbnails.modes.above")},{value:"below",label:Sg("config.media_viewer.controls.thumbnails.modes.below")},{value:"left",label:Sg("config.media_viewer.controls.thumbnails.modes.left")},{value:"right",label:Sg("config.media_viewer.controls.thumbnails.modes.right")}],this._thumbnailMedias=[{value:"",label:""},{value:"clips",label:Sg("config.live.controls.thumbnails.medias.clips")},{value:"snapshots",label:Sg("config.live.controls.thumbnails.medias.snapshots")}],this._titleModes=[{value:"",label:""},{value:"none",label:Sg("config.media_viewer.controls.title.modes.none")},{value:"popup-top-left",label:Sg("config.media_viewer.controls.title.modes.popup-top-left")},{value:"popup-top-right",label:Sg("config.media_viewer.controls.title.modes.popup-top-right")},{value:"popup-bottom-left",label:Sg("config.media_viewer.controls.title.modes.popup-bottom-left")},{value:"popup-bottom-right",label:Sg("config.media_viewer.controls.title.modes.popup-bottom-right")}],this._transitionEffects=[{value:"",label:""},{value:"none",label:Sg("config.media_viewer.transition_effects.none")},{value:"slide",label:Sg("config.media_viewer.transition_effects.slide")}],this._imageModes=[{value:"",label:""},{value:"camera",label:Sg("config.image.modes.camera")},{value:"screensaver",label:Sg("config.image.modes.screensaver")},{value:"url",label:Sg("config.image.modes.url")}],this._timelineMediaTypes=[{value:"",label:""},{value:"all",label:Sg("config.timeline.medias.all")},{value:"clips",label:Sg("config.timeline.medias.clips")},{value:"snapshots",label:Sg("config.timeline.medias.snapshots")}],this._darkModes=[{value:"",label:""},{value:"on",label:Sg("config.view.dark_modes.on")},{value:"off",label:Sg("config.view.dark_modes.off")},{value:"auto",label:Sg("config.view.dark_modes.auto")}],this._mediaActionNegativeConditions=[{value:"",label:""},{value:"all",label:Sg("config.common.media_action_conditions.all")},{value:"unselected",label:Sg("config.common.media_action_conditions.unselected")},{value:"hidden",label:Sg("config.common.media_action_conditions.hidden")},{value:"never",label:Sg("config.common.media_action_conditions.never")}],this._mediaActionPositiveConditions=[{value:"",label:""},{value:"all",label:Sg("config.common.media_action_conditions.all")},{value:"selected",label:Sg("config.common.media_action_conditions.selected")},{value:"visible",label:Sg("config.common.media_action_conditions.visible")},{value:"never",label:Sg("config.common.media_action_conditions.never")}],this._layoutFits=[{value:"",label:""},{value:"contain",label:Sg("config.common.layout.fits.contain")},{value:"cover",label:Sg("config.common.layout.fits.cover")},{value:"fill",label:Sg("config.common.layout.fits.fill")}]}setConfig(t){this._config=t,this._configUpgradeable=Hk(t)}willUpdate(){this._initialized||dy().then((t=>{t&&(this._initialized=!0)}))}_renderOptionSetHeader(t){const e=rS[t];return K` +
+
+ +
${e.name}
+
+
${e.secondary}
+
+ `}_getLabel(t){const e=t.split(".").filter((t=>!t.match(/^\[[0-9]+\]$/))).join(".");return Sg(`config.${e}`)}_renderEntitySelector(t,e){if(this._config)return K` + this._valueChangedHandler(t,e)} + > + + `}_renderOptionSelector(t,e,i){if(this._config)return K` + this._valueChangedHandler(t,e)} + > + + `}_renderIconSelector(t,e){if(this._config)return K` + this._valueChangedHandler(t,e)} + > + + `}_renderNumberInput(t,e){if(!this._config)return;const i=jk(this._config,t),n=void 0===(null==e?void 0:e.max)?"box":"slider";return K` + this._valueChangedHandler(t,e)} + > + + `}_renderInfo(t){return K` ${t}`}_getEditorCameraTitle(t,e){return uy(this.hass,e)||Sg("editor.camera")+" #"+t}_renderViewScanMenu(){const t={submenu:!0,selected:!!this._expandedMenus.scan};return K` +
+ + ${this._expandedMenus.scan?K`
+ ${this._renderSwitch("view.scan.enabled",Pm.view.scan.enabled,{label:Sg("config.view.scan.enabled")})} + ${this._renderSwitch("view.scan.show_trigger_status",Pm.view.scan.show_trigger_status,{label:Sg("config.view.scan.show_trigger_status")})} + ${this._renderSwitch("view.scan.untrigger_reset",Pm.view.scan.untrigger_reset)} + ${this._renderNumberInput("view.scan.untrigger_seconds",{default:Pm.view.scan.untrigger_seconds})} +
`:""} +
+ `}_renderMenuButton(t){var e,i,n;const o=[{value:"",label:""},{value:"matching",label:Sg("config.menu.buttons.alignments.matching")},{value:"opposing",label:Sg("config.menu.buttons.alignments.opposing")}],r={submenu:!0,selected:this._expandedMenus.buttons===t};return K` +
+ + + ${this._expandedMenus.buttons===t?K`
+ ${this._renderSwitch(`menu.buttons.${t}.enabled`,null===(i=null===(e=Pm.menu.buttons[t])||void 0===e?void 0:e.enabled)||void 0===i||i,{label:Sg("config.menu.buttons.enabled")})} + ${this._renderOptionSelector(`menu.buttons.${t}.alignment`,o,{label:Sg("config.menu.buttons.alignment")})} + ${this._renderNumberInput(`menu.buttons.${t}.priority`,{max:100,default:null===(n=Pm.menu.buttons[t])||void 0===n?void 0:n.priority,label:Sg("config.menu.buttons.priority")})} + ${this._renderIconSelector(`menu.buttons.${t}.icon`,{label:Sg("config.menu.buttons.icon")})} +
`:""} +
+ `}_putInSubmenu(t,e,i,n,o){const r=this._expandedMenus[t]===e;return K`
+ + ${r?K`
${o}
`:""} +
`}_renderMediaLayout(t,e,i,n,o){return this._putInSubmenu(t,!0,e,{name:"mdi:page-layout-body"},K` + ${this._renderOptionSelector(i,this._layoutFits)} + ${this._renderNumberInput(n,{min:0,max:100,label:Sg("config.common.layout.position.x")})} + ${this._renderNumberInput(o,{min:0,max:100,label:Sg("config.common.layout.position.y")})} + `)}_renderCamera(t,e,i,n){const o=[{value:"",label:""},{value:"auto",label:Sg("config.cameras.live_providers.auto")},{value:"ha",label:Sg("config.cameras.live_providers.ha")},{value:"frigate-jsmpeg",label:Sg("config.cameras.live_providers.frigate-jsmpeg")},{value:"webrtc-card",label:Sg("config.cameras.live_providers.webrtc-card")}],r=[];t.forEach(((t,i)=>{i!==e&&r.push({value:hy(t),label:this._getEditorCameraTitle(i,t)})}));const s=t=>{if(this._config){const e=qk(this._config);t(e)&&this._updateConfig(e)}},a={submenu:!0,selected:this._expandedMenus.cameras===e};return K` +
+ + ${this._expandedMenus.cameras===e?K`
+
+ !n&&s((t=>!!(Array.isArray(t.cameras)&&e>0)&&(Mg(t.cameras,e,e-1),this._openMenu("cameras",e-1),!0)))} + > + + + =this._config.cameras.length-1} + @click=${()=>!n&&s((t=>!!(Array.isArray(t.cameras)&&e + + + {s((t=>!!Array.isArray(t.cameras)&&(t.cameras.splice(e,1),this._closeMenu("cameras"),!0)))}} + > + + +
+ ${this._renderEntitySelector(Jk("cameras.#.camera_entity",e),"camera")} + ${this._renderOptionSelector(Jk("cameras.#.live_provider",e),o)} + ${this._renderStringInput(Jk("cameras.#.title",e))} + ${this._renderIconSelector(Jk("cameras.#.icon",e),{label:Sg("config.cameras.icon")})} + ${this._renderStringInput(Jk("cameras.#.id",e))} + ${this._putInSubmenu("cameras.frigate",e,"config.cameras.frigate.options",{path:Dy},K` + ${this._renderStringInput(Jk("cameras.#.frigate.camera_name",e))} + ${this._renderStringInput(Jk("cameras.#.frigate.url",e))} + ${this._renderStringInput(Jk("cameras.#.frigate.label",e))} + ${this._renderStringInput(Jk("cameras.#.frigate.zone",e))} + ${this._renderStringInput(Jk("cameras.#.frigate.client_id",e))} + `)} + ${this._putInSubmenu("cameras.dependencies",e,"config.cameras.dependencies.options",{name:"mdi:graph"},K` ${this._renderSwitch(Jk("cameras.#.dependencies.all_cameras",e),Pm.cameras.dependencies.all_cameras)} + ${this._renderOptionSelector(Jk("cameras.#.dependencies.cameras",e),r,{multiple:!0})}`)} + ${this._putInSubmenu("cameras.triggers",e,"config.cameras.triggers.options",{name:"mdi:magnify-scan"},K` ${this._renderSwitch(Jk("cameras.#.triggers.occupancy",e),Pm.cameras.triggers.occupancy)} + ${this._renderSwitch(Jk("cameras.#.triggers.motion",e),Pm.cameras.triggers.motion)} + ${this._renderOptionSelector(Jk("cameras.#.triggers.entities",e),i,{multiple:!0})}`)} + ${this._putInSubmenu("cameras.webrtc",e,"config.cameras.webrtc_card.options",{name:"mdi:webrtc"},K`${this._renderEntitySelector(Jk("cameras.#.webrtc_card.entity",e),"camera")} + ${this._renderStringInput(Jk("cameras.#.webrtc_card.url",e))}`)} +
`:""} +
+ `}_renderStringInput(t,e){if(this._config)return K` + this._valueChangedHandler(t,e)} + > + + `}_renderSwitch(t,e,i){if(this._config)return K` + this._valueChangedHandler(t,e)} + > + + `}_updateConfig(t){this._config=t,c(this,"config-changed",{config:this._config})}render(){if(!this.hass||!this._config)return K``;const t=Pm,e=((t,e)=>{if(!t)return[];const i=Object.keys(t.states).filter((t=>!e||t.substr(0,t.indexOf("."))===e));return i.sort(),i})(this.hass),i=jk(this._config,"cameras")||[];return K` + ${this._configUpgradeable?K`
+ ${Sg("editor.upgrade_available")} + + {if(this._config){const t=qk(this._config);Uk(t),this._updateConfig(t)}}} + > + + +
+
`:K``} +
+ ${this._renderOptionSetHeader("cameras")} + ${"cameras"===this._expandedMenus.options?K` + ${i.map(((t,n)=>this._renderCamera(i,n,e)))} + ${this._renderCamera(i,i.length,e,!0)} + `:""} + ${this._renderOptionSetHeader("view")} + ${"view"===this._expandedMenus.options?K` +
+ ${this._renderOptionSelector("view.default",this._viewModes)} + ${this._renderOptionSelector("view.camera_select",this._cameraSelectViewModes)} + ${this._renderOptionSelector("view.dark_mode",this._darkModes)} + ${this._renderNumberInput("view.timeout_seconds")} + ${this._renderNumberInput("view.update_seconds")} + ${this._renderSwitch("view.update_force",t.view.update_force)} + ${this._renderSwitch("view.update_cycle_camera",t.view.update_cycle_camera)} + ${this._renderViewScanMenu()} +
+ `:""} + ${this._renderOptionSetHeader("menu")} + ${"menu"===this._expandedMenus.options?K` +
+ ${this._renderOptionSelector("menu.style",this._menuStyles)} + ${this._renderOptionSelector("menu.position",this._menuPositions)} + ${this._renderOptionSelector("menu.alignment",this._menuAlignments)} + ${this._renderNumberInput("menu.button_size",{min:20})} +
+ ${this._renderMenuButton("frigate")} + ${this._renderMenuButton("cameras")} + ${this._renderMenuButton("live")} + ${this._renderMenuButton("clips")} + ${this._renderMenuButton("snapshots")} + ${this._renderMenuButton("image")} + ${this._renderMenuButton("download")} + ${this._renderMenuButton("frigate_ui")} + ${this._renderMenuButton("fullscreen")} + ${this._renderMenuButton("timeline")} + ${this._renderMenuButton("media_player")} + `:""} + ${this._renderOptionSetHeader("live")} + ${"live"===this._expandedMenus.options?K` +
+ ${this._renderSwitch("live.preload",t.live.preload)} + ${this._renderSwitch("live.draggable",t.live.draggable)} + ${this._renderSwitch("live.lazy_load",t.live.lazy_load)} + ${this._renderOptionSelector("live.lazy_unload",this._mediaActionNegativeConditions)} + ${this._renderOptionSelector("live.auto_play",this._mediaActionPositiveConditions)} + ${this._renderOptionSelector("live.auto_pause",this._mediaActionNegativeConditions)} + ${this._renderOptionSelector("live.auto_mute",this._mediaActionNegativeConditions)} + ${this._renderOptionSelector("live.auto_unmute",this._mediaActionPositiveConditions)} + ${this._renderOptionSelector("live.transition_effect",this._transitionEffects)} + ${this._renderSwitch("live.show_image_during_load",t.live.show_image_during_load)} + ${this._putInSubmenu("live.controls",!0,"config.live.controls.options",{name:"mdi:gamepad"},K` + ${this._renderOptionSelector("live.controls.next_previous.style",this._liveNextPreviousControlStyles)} + ${this._renderNumberInput("live.controls.next_previous.size",{min:20})} + ${this._renderOptionSelector("live.controls.thumbnails.mode",this._thumbnailModes)} + ${this._renderOptionSelector("live.controls.thumbnails.media",this._thumbnailMedias)} + ${this._renderNumberInput("live.controls.thumbnails.size",{min:75,max:175})} + ${this._renderOptionSelector("live.controls.title.mode",this._titleModes)} + ${this._renderSwitch("live.controls.thumbnails.show_details",t.live.controls.thumbnails.show_details)} + ${this._renderSwitch("live.controls.thumbnails.show_favorite_control",t.live.controls.thumbnails.show_favorite_control)} + ${this._renderSwitch("live.controls.thumbnails.show_timeline_control",t.live.controls.thumbnails.show_timeline_control)} + ${this._renderNumberInput("live.controls.title.duration_seconds",{min:0,max:60})} + `)} + ${this._renderMediaLayout("live.layout","config.live.layout","live.layout.fit","live.layout.position.x","live.layout.position.y")} +
+ `:""} + ${this._renderOptionSetHeader("event_gallery")} + ${"event_gallery"===this._expandedMenus.options?K`
+ ${this._putInSubmenu("event_gallery.controls",!0,"config.event_gallery.controls.options",{name:"mdi:gamepad"},K` ${this._renderNumberInput("event_gallery.controls.thumbnails.size",{min:75,max:175})} + ${this._renderSwitch("event_gallery.controls.thumbnails.show_details",t.media_viewer.controls.thumbnails.show_details)} + ${this._renderSwitch("event_gallery.controls.thumbnails.show_favorite_control",t.media_viewer.controls.thumbnails.show_favorite_control)} + ${this._renderSwitch("event_gallery.controls.thumbnails.show_timeline_control",t.media_viewer.controls.thumbnails.show_timeline_control)}`)} +
`:""} + ${this._renderOptionSetHeader("media_viewer")} + ${"media_viewer"===this._expandedMenus.options?K`
+ ${this._renderOptionSelector("media_viewer.auto_play",this._mediaActionPositiveConditions)} + ${this._renderOptionSelector("media_viewer.auto_pause",this._mediaActionNegativeConditions)} + ${this._renderOptionSelector("media_viewer.auto_mute",this._mediaActionNegativeConditions)} + ${this._renderOptionSelector("media_viewer.auto_unmute",this._mediaActionPositiveConditions)} + ${this._renderSwitch("media_viewer.draggable",t.media_viewer.draggable)} + ${this._renderSwitch("media_viewer.lazy_load",t.media_viewer.lazy_load)} + ${this._renderOptionSelector("media_viewer.transition_effect",this._transitionEffects)} + ${this._putInSubmenu("media_viewer.controls",!0,"config.media_viewer.controls.options",{name:"mdi:gamepad"},K` + ${this._renderOptionSelector("media_viewer.controls.next_previous.style",this._eventViewerNextPreviousControlStyles)} + ${this._renderNumberInput("media_viewer.controls.next_previous.size",{min:20})} + ${this._renderOptionSelector("media_viewer.controls.thumbnails.mode",this._thumbnailModes)} + ${this._renderNumberInput("media_viewer.controls.thumbnails.size",{min:75,max:175})} + ${this._renderSwitch("media_viewer.controls.thumbnails.show_details",t.media_viewer.controls.thumbnails.show_details)} + ${this._renderSwitch("media_viewer.controls.thumbnails.show_favorite_control",t.media_viewer.controls.thumbnails.show_favorite_control)} + ${this._renderSwitch("media_viewer.controls.thumbnails.show_timeline_control",t.media_viewer.controls.thumbnails.show_timeline_control)} + ${this._renderOptionSelector("media_viewer.controls.title.mode",this._titleModes)} + ${this._renderNumberInput("media_viewer.controls.title.duration_seconds",{min:0,max:60})} + `)} + ${this._renderMediaLayout("media_viewer.layout","config.media_viewer.layout","media_viewer.layout.fit","media_viewer.layout.position.x","media_viewer.layout.position.y")} +
`:""} + ${this._renderOptionSetHeader("image")} + ${"image"===this._expandedMenus.options?K`
+ ${this._renderOptionSelector("image.mode",this._imageModes)} + ${this._renderStringInput("image.url")} + ${this._renderNumberInput("image.refresh_seconds")} + ${this._renderMediaLayout("image.layout","config.image.layout","image.layout.fit","image.layout.position.x","image.layout.position.y")} +
`:""} + ${this._renderOptionSetHeader("timeline")} + ${"timeline"===this._expandedMenus.options?K`
+ ${this._renderNumberInput("timeline.window_seconds")} + ${this._renderNumberInput("timeline.clustering_threshold")} + ${this._renderOptionSelector("timeline.media",this._timelineMediaTypes)} + ${this._renderSwitch("timeline.show_recordings",t.timeline.show_recordings)} + ${this._putInSubmenu("timeline.controls",!0,"config.timeline.controls.options",{name:"mdi:gamepad"},K` ${this._renderOptionSelector("timeline.controls.thumbnails.mode",this._thumbnailModes)} + ${this._renderNumberInput("timeline.controls.thumbnails.size",{min:75,max:175})} + ${this._renderSwitch("timeline.controls.thumbnails.show_details",t.timeline.controls.thumbnails.show_details)} + ${this._renderSwitch("timeline.controls.thumbnails.show_favorite_control",t.timeline.controls.thumbnails.show_favorite_control)} + ${this._renderSwitch("timeline.controls.thumbnails.show_timeline_control",t.timeline.controls.thumbnails.show_timeline_control)}`)} +
`:""} + ${this._renderOptionSetHeader("dimensions")} + ${"dimensions"===this._expandedMenus.options?K`
+ ${this._renderOptionSelector("dimensions.aspect_ratio_mode",this._aspectRatioModes)} + ${this._renderStringInput("dimensions.aspect_ratio")} +
`:""} + ${void 0!==this._config.overrides?K` ${this._renderOptionSetHeader("overrides")} + ${"overrides"===this._expandedMenus.options?K`
+ ${this._renderInfo(Sg("config.overrides.info"))} +
`:""}`:K``} +
+ `}_closeMenu(t){delete this._expandedMenus[t],this.requestUpdate()}_openMenu(t,e){this._expandedMenus[t]=e,this.requestUpdate()}_toggleMenu(t){if(t&&t.target){const e=t.target.domain,i=t.target.key;this._expandedMenus[e]===i?this._closeMenu(e):this._openMenu(e,i)}}_valueChangedHandler(t,e){if(!this._config||!this.hass)return;let i;if(e.detail&&void 0!==e.detail.value&&(i=e.detail.value,"string"==typeof i&&(i=i.trim())),jk(this._config,t)===i)return;const n=qk(this._config);""===i||void 0===i?zk(n,t):Lk(n,t,i),this._updateConfig(n)}static get styles(){return _('ha-icon-button.button {\n color: var(--secondary-color, white);\n background-color: rgba(0, 0, 0, 0.6);\n border-radius: 50%;\n padding: 0px;\n margin: 3px;\n --ha-icon-display: block;\n /* Buttons can always be clicked */\n pointer-events: auto;\n opacity: 0.9;\n}\n\n@keyframes pulse {\n 0% {\n opacity: 1;\n }\n 50% {\n opacity: 0;\n }\n 100% {\n opacity: 1;\n }\n}\nha-icon[data-domain=alert][data-state=on],\nha-icon[data-domain=automation][data-state=on],\nha-icon[data-domain=binary_sensor][data-state=on],\nha-icon[data-domain=calendar][data-state=on],\nha-icon[data-domain=camera][data-state=streaming],\nha-icon[data-domain=cover][data-state=open],\nha-icon[data-domain=fan][data-state=on],\nha-icon[data-domain=humidifier][data-state=on],\nha-icon[data-domain=light][data-state=on],\nha-icon[data-domain=input_boolean][data-state=on],\nha-icon[data-domain=lock][data-state=unlocked],\nha-icon[data-domain=media_player][data-state=on],\nha-icon[data-domain=media_player][data-state=paused],\nha-icon[data-domain=media_player][data-state=playing],\nha-icon[data-domain=script][data-state=on],\nha-icon[data-domain=sun][data-state=above_horizon],\nha-icon[data-domain=switch][data-state=on],\nha-icon[data-domain=timer][data-state=active],\nha-icon[data-domain=vacuum][data-state=cleaning],\nha-icon[data-domain=group][data-state=on],\nha-icon[data-domain=group][data-state=home],\nha-icon[data-domain=group][data-state=open],\nha-icon[data-domain=group][data-state=locked],\nha-icon[data-domain=group][data-state=problem] {\n color: var(--paper-item-icon-active-color, #fdd835);\n}\n\nha-icon[data-domain=climate][data-state=cooling] {\n color: var(--cool-color, var(--state-climate-cool-color));\n}\n\nha-icon[data-domain=climate][data-state=heating] {\n color: var(--heat-color, var(--state-climate-heat-color));\n}\n\nha-icon[data-domain=climate][data-state=drying] {\n color: var(--dry-color, var(--state-climate-dry-color));\n}\n\nha-icon[data-domain=alarm_control_panel] {\n color: var(--alarm-color-armed, var(--label-badge-red));\n}\n\nha-icon[data-domain=alarm_control_panel][data-state=disarmed] {\n color: var(--alarm-color-disarmed, var(--label-badge-green));\n}\n\nha-icon[data-domain=alarm_control_panel][data-state=pending],\nha-icon[data-domain=alarm_control_panel][data-state=arming] {\n color: var(--alarm-color-pending, var(--label-badge-yellow));\n animation: pulse 1s infinite;\n}\n\nha-icon[data-domain=alarm_control_panel][data-state=triggered] {\n color: var(--alarm-color-triggered, var(--label-badge-red));\n animation: pulse 1s infinite;\n}\n\nha-icon[data-domain=plant][data-state=problem],\nha-icon[data-domain=zwave][data-state=dead] {\n color: var(--state-icon-error-color);\n}\n\n/* Color the icon if unavailable */\nha-icon[data-state=unavailable] {\n color: var(--state-unavailable-color);\n}\n\nha-icon-button[data-domain=alert][data-state=on],\nha-icon-button[data-domain=automation][data-state=on],\nha-icon-button[data-domain=binary_sensor][data-state=on],\nha-icon-button[data-domain=calendar][data-state=on],\nha-icon-button[data-domain=camera][data-state=streaming],\nha-icon-button[data-domain=cover][data-state=open],\nha-icon-button[data-domain=fan][data-state=on],\nha-icon-button[data-domain=humidifier][data-state=on],\nha-icon-button[data-domain=light][data-state=on],\nha-icon-button[data-domain=input_boolean][data-state=on],\nha-icon-button[data-domain=lock][data-state=unlocked],\nha-icon-button[data-domain=media_player][data-state=on],\nha-icon-button[data-domain=media_player][data-state=paused],\nha-icon-button[data-domain=media_player][data-state=playing],\nha-icon-button[data-domain=script][data-state=on],\nha-icon-button[data-domain=sun][data-state=above_horizon],\nha-icon-button[data-domain=switch][data-state=on],\nha-icon-button[data-domain=timer][data-state=active],\nha-icon-button[data-domain=vacuum][data-state=cleaning],\nha-icon-button[data-domain=group][data-state=on],\nha-icon-button[data-domain=group][data-state=home],\nha-icon-button[data-domain=group][data-state=open],\nha-icon-button[data-domain=group][data-state=locked],\nha-icon-button[data-domain=group][data-state=problem] {\n color: var(--paper-item-icon-active-color, #fdd835);\n}\n\nha-icon-button[data-domain=climate][data-state=cooling] {\n color: var(--cool-color, var(--state-climate-cool-color));\n}\n\nha-icon-button[data-domain=climate][data-state=heating] {\n color: var(--heat-color, var(--state-climate-heat-color));\n}\n\nha-icon-button[data-domain=climate][data-state=drying] {\n color: var(--dry-color, var(--state-climate-dry-color));\n}\n\nha-icon-button[data-domain=alarm_control_panel] {\n color: var(--alarm-color-armed, var(--label-badge-red));\n}\n\nha-icon-button[data-domain=alarm_control_panel][data-state=disarmed] {\n color: var(--alarm-color-disarmed, var(--label-badge-green));\n}\n\nha-icon-button[data-domain=alarm_control_panel][data-state=pending],\nha-icon-button[data-domain=alarm_control_panel][data-state=arming] {\n color: var(--alarm-color-pending, var(--label-badge-yellow));\n animation: pulse 1s infinite;\n}\n\nha-icon-button[data-domain=alarm_control_panel][data-state=triggered] {\n color: var(--alarm-color-triggered, var(--label-badge-red));\n animation: pulse 1s infinite;\n}\n\nha-icon-button[data-domain=plant][data-state=problem],\nha-icon-button[data-domain=zwave][data-state=dead] {\n color: var(--state-icon-error-color);\n}\n\n/* Color the icon if unavailable */\nha-icon-button[data-state=unavailable] {\n color: var(--state-unavailable-color);\n}\n\n.option {\n padding: 4px 4px;\n cursor: pointer;\n}\n\n.option.option-overrides .title {\n color: var(--warning-color);\n}\n\n.row {\n display: flex;\n margin-bottom: -14px;\n pointer-events: none;\n}\n\n.title {\n padding-left: 16px;\n margin-top: -6px;\n pointer-events: none;\n}\n\n.secondary {\n padding-left: 40px;\n color: var(--secondary-text-color);\n pointer-events: none;\n}\n\n.values {\n background: var(--secondary-background-color);\n display: grid;\n}\n\n.values + .option,\n.submenu + .option {\n margin-top: 10px;\n}\n\ndiv.upgrade {\n width: auto;\n border: 1px dotted var(--primary-color);\n margin: 10px;\n display: flex;\n justify-content: space-between;\n align-items: center;\n}\n\ndiv.upgrade span {\n padding: 10px;\n}\n\n.submenu-header {\n display: flex;\n padding: 10px;\n cursor: pointer;\n}\n\n.submenu.selected > .submenu-header {\n background-color: var(--primary-color);\n color: var(--primary-text-color);\n}\n\n.submenu-header * {\n flex-basis: auto;\n pointer-events: none;\n}\n\n.submenu-header .new-camera {\n font-style: italic;\n}\n\n.submenu:not(.selected) > .submenu-header .new-camera {\n color: var(--secondary-text-color, "black");\n}\n\n.submenu-header ha-icon,\n.submenu-header ha-svg-icon {\n padding-right: 15px;\n}\n\n.submenu {\n border: 1px solid var(--divider-color);\n}\n\n.submenu.selected {\n border: 1px solid var(--primary-color);\n}\n\n.submenu .submenu {\n width: calc(100% - 20px);\n margin-left: auto;\n margin-right: auto;\n margin-bottom: 10px;\n}\n\n.submenu :not(.submenu.selected) {\n border: none;\n}\n\n.submenu .controls {\n display: inline-block;\n margin-left: auto;\n margin-right: 0px;\n margin-bottom: 5px;\n}\n\n.submenu .controls ha-icon-button.button {\n --mdc-icon-button-size: 32px;\n --mdc-icon-size: calc(var(--mdc-icon-button-size) / 2);\n}\n\nspan.info {\n padding: 4px;\n}\n\nha-selector {\n padding: 10px;\n border: 1px solid var(--divider-color);\n}')}};t([yt({attribute:!1})],sS.prototype,"hass",void 0),t([_t()],sS.prototype,"_config",void 0),t([_t()],sS.prototype,"_expandedMenus",void 0),sS=t([vt("frigate-card-editor")],sS);const aS=dp.object({model:dp.string().nullable(),config_entries:dp.string().array(),manufacturer:dp.string().nullable()}).array();class lS{constructor(){this._cache=new Map}has(t){return this._cache.has(t)}getMatch(t){var e;return null!==(e=[...this._cache.values()].find(t))&&void 0!==e?e:null}get(t){return this._cache.get(t)}set(t){this._cache.set(t.entity_id,t)}}const dS=async(t,e,i)=>{const n=i?i.get(e):void 0;if(n)return n;const o=await ty(t,Um,{type:"config/entity_registry/get",entity_id:e});return i&&i.set(o),o};var cS="4.0.0",hS="Fri, 23 Sep 2022 00:27:16 GMT",uS="Thu, 22 Sep 2022 16:53:03 -0700",AS="4.0.0-HEAD+ge5a0bf4";console.info(`%c FRIGATE-HASS-CARD \n%c ${Sg("common.version")} ${cS} `,"color: pink; font-weight: bold; background: black","color: white; font-weight: bold; background: dimgray"),window.customCards=window.customCards||[],window.customCards.push({type:"frigate-card",name:Sg("common.frigate_card"),description:Sg("common.frigate_card_description"),preview:!0,documentationURL:Pg});let pS=class extends gt{constructor(){super(...arguments),this._refMenu=zt(),this._refMain=zt(),this._refElements=zt(),this._refImage=zt(),this._refLive=zt(),this._interactionTimerID=null,this._updateTimerID=null,this._currentMediaLoadedInfo=null,this._lastValidMediaLoadedInfo=null,this._dynamicMenuButtons=[],this._message=null,this._resolvedMediaCache=new Rk,this._boundMouseHandler=hh(this._mouseHandler.bind(this),1e3),this._initialized=!1,this._triggers=new Map,this._untriggerTimerID=null}set hass(t){this._hass=t,this._hass&&(this._refMenu.value&&(this._refMenu.value.hass=this._hass),this._refElements.value&&(this._refElements.value.hass=this._hass),this._refImage.value&&(this._refImage.value.hass=this._hass)),this._generateConditionState(),this._setLightOrDarkMode()}static async getConfigElement(){return document.createElement("frigate-card-editor")}static getStubConfig(t,e){return{cameras:[{camera_entity:e.find((t=>t.startsWith("camera.")))}]}}_generateConditionState(){var t,e,i;this._conditionState={view:null===(t=this._view)||void 0===t?void 0:t.view,fullscreen:fu.isEnabled&&fu.isFullscreen,camera:null===(e=this._view)||void 0===e?void 0:e.camera,state:null===(i=this._hass)||void 0===i?void 0:i.states,mediaLoaded:!!this._currentMediaLoadedInfo},this._refLive.value&&(this._refLive.value.conditionState=this._conditionState),this._refElements.value&&(this._refElements.value.conditionState=this._conditionState);const n=eg(this._config,this._config.overrides,this._conditionState);Tg(n,this._overriddenConfig)&&(this._overriddenConfig=n)}_getEmphasizedStyle(){return{color:"var(--primary-color, white)"}}_getStyleFromActions(t){var e,i;for(const n of[t.tap_action,t.double_tap_action,t.hold_action,t.start_tap_action,t.end_tap_action]){const t=Array.isArray(n)?n:[n];for(const n of t){if(!n||"fire-dom-event"!==n.action||!("frigate_card_action"in n))continue;const t=n;if(up.some((e=>{var i;return e===t.frigate_card_action&&(null===(i=this._view)||void 0===i?void 0:i.is(t.frigate_card_action))}))||"default"===t.frigate_card_action&&(null===(e=this._view)||void 0===e?void 0:e.is(this._getConfig().view.default))||"fullscreen"===t.frigate_card_action&&fu.isEnabled&&fu.isFullscreen||"camera_select"===t.frigate_card_action&&(null===(i=this._view)||void 0===i?void 0:i.camera)===t.camera)return this._getEmphasizedStyle()}}return{}}_getMenuButtons(){var t,e,i,n,o,r,s,a,l,d,c;const h=[];if(h.push(Object.assign(Object.assign({icon:"frigate"},this._getConfig().menu.buttons.frigate),{type:"custom:frigate-card-menu-icon",title:Sg("config.menu.buttons.frigate"),tap_action:kw.isHidingMenu(this._getConfig().menu)?qm("menu_toggle"):qm("default"),hold_action:qm("diagnostics")})),this._cameras&&this._cameras.size>1){const t=Array.from(this._cameras,(([t,e])=>{var i;const n=qm("camera_select",{camera:t});return Object.assign({enabled:!0,icon:Ay(this._hass,e),entity:e.camera_entity,state_color:!0,title:uy(this._hass,e),selected:(null===(i=this._view)||void 0===i?void 0:i.camera)===t},n&&{tap_action:n})}));h.push(Object.assign(Object.assign({icon:"mdi:video-switch"},this._getConfig().menu.buttons.cameras),{type:"custom:frigate-card-menu-submenu",title:Sg("config.menu.buttons.cameras"),items:t}))}h.push(Object.assign(Object.assign({icon:"mdi:cctv"},this._getConfig().menu.buttons.live),{type:"custom:frigate-card-menu-icon",title:Sg("config.view.views.live"),style:(null===(t=this._view)||void 0===t?void 0:t.is("live"))?this._getEmphasizedStyle():{},tap_action:qm("live")}));const u=this._getSelectedCameraConfig();(null==u?void 0:u.frigate.camera_name)&&("birdseye"!==(null==u?void 0:u.frigate.camera_name)||u.dependencies.cameras.length||u.dependencies.all_cameras)&&h.push(Object.assign(Object.assign({icon:"mdi:filmstrip"},this._getConfig().menu.buttons.clips),{type:"custom:frigate-card-menu-icon",title:Sg("config.view.views.clips"),style:(null===(e=this._view)||void 0===e?void 0:e.is("clips"))?this._getEmphasizedStyle():{},tap_action:qm("clips"),hold_action:qm("clip")})),(null==u?void 0:u.frigate.camera_name)&&("birdseye"!==(null==u?void 0:u.frigate.camera_name)||(null==u?void 0:u.dependencies.cameras.length)||(null==u?void 0:u.dependencies.all_cameras))&&h.push(Object.assign(Object.assign({icon:"mdi:camera"},this._getConfig().menu.buttons.snapshots),{type:"custom:frigate-card-menu-icon",title:Sg("config.view.views.snapshots"),style:(null===(i=this._view)||void 0===i?void 0:i.is("snapshots"))?this._getEmphasizedStyle():{},tap_action:qm("snapshots"),hold_action:qm("snapshot")})),h.push(Object.assign(Object.assign({icon:"mdi:image"},this._getConfig().menu.buttons.image),{type:"custom:frigate-card-menu-icon",title:Sg("config.view.views.image"),style:(null===(n=this._view)||void 0===n?void 0:n.is("image"))?this._getEmphasizedStyle():{},tap_action:qm("image")})),this._cameras&&[...this._cameras.values()].some((t=>t.frigate.camera_name&&"birdseye"!==t.frigate.camera_name))&&h.push(Object.assign(Object.assign({icon:"mdi:chart-gantt"},this._getConfig().menu.buttons.timeline),{type:"custom:frigate-card-menu-icon",title:Sg("config.view.views.timeline"),style:(null===(o=this._view)||void 0===o?void 0:o.is("timeline"))?this._getEmphasizedStyle():{},tap_action:qm("timeline")})),!this._isBeingCasted()&&((null===(r=this._view)||void 0===r?void 0:r.isViewerView())||(null===(s=this._view)||void 0===s?void 0:s.is("timeline"))&&(null===(a=this._view)||void 0===a?void 0:a.media))&&h.push(Object.assign(Object.assign({icon:"mdi:download"},this._getConfig().menu.buttons.download),{type:"custom:frigate-card-menu-icon",title:Sg("config.menu.buttons.download"),tap_action:qm("download")})),(null==u?void 0:u.frigate.url)&&h.push(Object.assign(Object.assign({icon:"mdi:web"},this._getConfig().menu.buttons.frigate_ui),{type:"custom:frigate-card-menu-icon",title:Sg("config.menu.buttons.frigate_ui"),tap_action:qm("frigate_ui")})),fu.isEnabled&&!this._isBeingCasted()&&h.push(Object.assign(Object.assign({icon:fu.isFullscreen?"mdi:fullscreen-exit":"mdi:fullscreen"},this._getConfig().menu.buttons.fullscreen),{type:"custom:frigate-card-menu-icon",title:Sg("config.menu.buttons.fullscreen"),tap_action:qm("fullscreen"),style:fu.isFullscreen?this._getEmphasizedStyle():{}}));const A=Object.keys((null===(l=this._hass)||void 0===l?void 0:l.states)||{}).filter((t=>{var e;if(t.startsWith("media_player.")){const i=null===(e=this._hass)||void 0===e?void 0:e.states[t];if(i&&"unavailable"!==i.state&&Gb(i,131072))return!0}return!1}));if(A.length&&((null===(d=this._view)||void 0===d?void 0:d.isViewerView())||(null===(c=this._view)||void 0===c?void 0:c.is("live"))&&(null==u?void 0:u.camera_entity))){const t=A.map((t=>{var e;const i=ay(this._hass,t)||t,n=null===(e=this._hass)||void 0===e?void 0:e.states[t],o=qm("media_player",{media_player:t,media_player_action:"play"}),r=qm("media_player",{media_player:t,media_player_action:"stop"});return Object.assign(Object.assign({enabled:!0,selected:!1,icon:ly(this._hass,t)||"mdi:cast",entity:t,state_color:!1,title:i,disabled:!n||"unavailable"===n.state},o&&{tap_action:o}),r&&{hold_action:r})}));h.push(Object.assign(Object.assign({icon:"mdi:cast"},this._getConfig().menu.buttons.media_player),{type:"custom:frigate-card-menu-submenu",title:Sg("config.menu.buttons.media_player"),items:t}))}const p=this._dynamicMenuButtons.map((t=>Object.assign({style:this._getStyleFromActions(t)},t)));return h.concat(p)}_addDynamicMenuButton(t){this._dynamicMenuButtons.includes(t)||(this._dynamicMenuButtons=[...this._dynamicMenuButtons,t]),this._refMenu.value&&(this._refMenu.value.buttons=this._getMenuButtons())}_removeDynamicMenuButton(t){this._dynamicMenuButtons=this._dynamicMenuButtons.filter((e=>e!=t)),this._refMenu.value&&(this._refMenu.value.buttons=this._getMenuButtons())}_getMotionSensor(t,e){var i,n;return e.frigate.camera_name&&null!==(n=null===(i=t.getMatch((t=>{var i;return!!(null===(i=t.unique_id)||void 0===i?void 0:i.match(new RegExp(`:motion_sensor:${e.frigate.zone||e.frigate.camera_name}`)))})))||void 0===i?void 0:i.entity_id)&&void 0!==n?n:null}_getOccupancySensor(t,e){var i,n;return e.frigate.camera_name&&null!==(n=null===(i=t.getMatch((t=>{var i;return!!(null===(i=t.unique_id)||void 0===i?void 0:i.match(new RegExp(`:occupancy_sensor:${e.frigate.zone||e.frigate.camera_name}_${e.frigate.label||"all"}`)))})))||void 0===i?void 0:i.entity_id)&&void 0!==n?n:null}async _loadCameras(){if(!this._hass)return;const t=new lS;let e;try{e=await(async t=>await ty(t,Hm,{type:"config/entity_registry/list"}))(this._hass)}catch(t){Og(t)}const i=new Map;let n=!0;const o=async o=>{if(!this._hass)return;let r=null;if(o.camera_entity)try{r=await dS(this._hass,o.camera_entity,t)}catch(t){}if(!o.frigate.camera_name&&r){const t=this._getFrigateCameraNameFromEntity(r);t&&(o.frigate.camera_name=t)}if(r&&e){const i=e.filter((t=>t.config_entry_id===(null==r?void 0:r.config_entry_id)&&!t.disabled_by&&t.entity_id.startsWith("binary_sensor.")));try{await(async(t,e,i)=>{const n=new Map;return await Promise.all(e.map((async e=>{n.set(e,await dS(t,e,i))}))),n})(this._hass,i.map((t=>t.entity_id)),t)}catch(t){Og(t)}if(o.triggers.motion){const e=this._getMotionSensor(t,o);e&&o.triggers.entities.push(e)}if(o.triggers.occupancy){const e=this._getOccupancySensor(t,o);e&&o.triggers.entities.push(e)}}o.triggers.entities=[...new Set(o.triggers.entities)];const s=hy(o);s?i.has(s)?(this._setMessageAndUpdate({message:Sg("error.duplicate_camera_id"),type:"error",context:o}),n=!1):i.set(s,o):(this._setMessageAndUpdate({message:Sg("error.no_camera_id"),type:"error",context:o}),n=!1)};if(this._getConfig().cameras&&Array.isArray(this._getConfig().cameras))for(const t of this._getConfig().cameras)await o(t);if(!i.size)return this._setMessageAndUpdate({message:Sg("error.no_cameras"),type:"error"});n&&(this._cameras=i)}_getSelectedCameraConfig(){var t;return this._cameras&&this._cameras.size&&(null===(t=this._view)||void 0===t?void 0:t.camera)&&this._cameras.get(this._view.camera)||null}_getFrigateCameraNameFromEntity(t){if(t.unique_id&&"frigate"===t.platform){const e=t.unique_id.match(/:camera:(?[^:]+)$/);if(e&&e.groups)return e.groups.camera}return null}_getParseErrorPaths(t){const e=new Set;if(t&&t.issues)for(let i=0;i{Z_.isMediaChange(this._view,t)&&(this._currentMediaLoadedInfo=null),this._view=t,this._generateConditionState(),this._resetMainScroll()};if((null===(e=null==t?void 0:t.resetMessage)||void 0===e||e)&&(this._message=null),null==t?void 0:t.view)o(t.view);else{let t;if(null===(i=this._cameras)||void 0===i?void 0:i.size)if((null===(n=this._view)||void 0===n?void 0:n.camera)&&this._getConfig().view.update_cycle_camera){const e=Array.from(this._cameras.keys()),i=e.indexOf(this._view.camera);t=e[i+1>=e.length?0:i+1]}else t=this._cameras.keys().next().value;t&&(o(new Z_({view:this._getConfig().view.default,camera:t})),this._startUpdateTimer())}}_setLightOrDarkMode(){var t;"on"===this._getConfig().view.dark_mode||"auto"===this._getConfig().view.dark_mode&&(!this._interactionTimerID||(null===(t=this._hass)||void 0===t?void 0:t.themes.darkMode))?this.setAttribute("dark",""):this.removeAttribute("dark")}_changeViewHandler(t){this._changeView({view:t.detail})}_addViewContextHandler(t){var e;this._changeView({view:null===(e=this._view)||void 0===e?void 0:e.clone().mergeInContext(t.detail)})}willUpdate(){this._initialized||dy().then((t=>{t&&(this._initialized=!0)}))}_getMostRecentTrigger(){const t=[...this._triggers.entries()].sort(((t,e)=>e[1].getTime()-t[1].getTime()));return t.length?t[0][0]:null}_updateTriggeredCameras(t){var e,i,n;if(!this._view||!this._isAutomatedViewUpdateAllowed(!0))return!1;const o=new Date;let r=!1,s=!1;for(const[r,a]of null!==(i=null===(e=this._cameras)||void 0===e?void 0:e.entries())&&void 0!==i?i:[]){const e=null!==(n=a.triggers.entities)&&void 0!==n?n:[],i=iy(this._hass,t,e,{stateOnly:!0}).some((t=>cy(t.newState))),l=e.every((t=>{var e;return!cy(null===(e=this._hass)||void 0===e?void 0:e.states[t])}));i?(this._triggers.set(r,o),s=!0):l&&this._triggers.has(r)&&(this._triggers.delete(r),s=!0)}if(s)if(this._triggers.size){const t=this._getMostRecentTrigger();!t||this._view.camera===t&&this._view.is("live")||(this._changeView({view:new Z_({view:"live",camera:t})}),r=!0)}else this._startUntriggerTimer();return r}_isTriggered(){return!!this._triggers.size||!!this._untriggerTimerID}_untrigger(){const t=this._isTriggered();this._triggers.clear(),this._clearUntriggerTimer(),t&&this.requestUpdate()}_startUntriggerTimer(){this._clearUntriggerTimer(),this._untriggerTimerID=window.setTimeout((()=>{this._untrigger(),this._isAutomatedViewUpdateAllowed()&&this._getConfig().view.scan.untrigger_reset&&this._changeView()}),1e3*this._getConfig().view.scan.untrigger_seconds)}_clearUntriggerTimer(){this._untriggerTimerID&&(window.clearTimeout(this._untriggerTimerID),this._untriggerTimerID=null)}shouldUpdate(t){var e,i,n;const o=t.get("_hass");let r=!o||1!=t.size;if(!o&&!(null===(e=this._hass)||void 0===e?void 0:e.connected)||o&&o.connected!==!!(null===(i=this._hass)||void 0===i?void 0:i.connected))return(null===(n=this._hass)||void 0===n?void 0:n.connected)?this._changeView():this._setMessageAndUpdate({message:Sg("error.reconnecting"),icon:"mdi:lan-disconnect",type:"connection",dotdotdot:!0},!0),!0;if(o){const t=this._getSelectedCameraConfig();this._getConfig().view.scan.enabled&&this._updateTriggeredCameras(o)?r=!0:this._isAutomatedViewUpdateAllowed()&&ny(this._hass,o,[...this._getConfig().view.update_entities||[],...(null==t?void 0:t.triggers.entities)||[]])?(this._changeView(),r=!0):r||(r=ny(this._hass,o,this._getConfig().view.render_entities||[]))}return r}async _downloadViewerMedia(){var t,e;if(!this._hass||!(null===(t=this._view)||void 0===t?void 0:t.isViewerView())&&!(null===(e=this._view)||void 0===e?void 0:e.is("timeline")))return;if(!this._view.media||"video"!==this._view.media.media_content_type&&"image"!==this._view.media.media_content_type)return void this._setMessageAndUpdate({message:Sg("error.download_no_media"),type:"error"});const i=(t=>{var e,i,n;return null!==(n=null===(i=null===(e=t.frigate)||void 0===e?void 0:e.event)||void 0===i?void 0:i.id)&&void 0!==n?n:null})(this._view.media);if(!i)return void this._setMessageAndUpdate({message:Sg("error.download_no_event_id"),type:"error"});const n=this._getSelectedCameraConfig();if(!n)return;const o=`/api/frigate/${n.frigate.client_id}/notifications/${i}/`+("video"===this._view.media.media_content_type?"clip.mp4":"snapshot.jpg")+"?download=true";let r;try{r=await ey(this._hass,o)}catch(t){Og(t)}if(r)if(navigator.userAgent.startsWith("Home Assistant/")||navigator.userAgent.startsWith("HomeAssistant/"))window.open(r,"_blank");else{const t=document.createElement("a");t.setAttribute("download",""),t.href=r,t.click(),t.remove()}else this._setMessageAndUpdate({message:Sg("error.download_sign_failed"),type:"error"})}_mediaPlayerAction(t,e){var i,n,o,r,s,a,l;if(!["play","stop"].includes(e))return;let d,c;const h={},u=this._getSelectedCameraConfig(),A=null!==(i=null==u?void 0:u.camera_entity)&&void 0!==i?i:null;if((null===(n=this._view)||void 0===n?void 0:n.isViewerView())&&this._view.media)d=this._view.media.media_content_id,c=this._view.media.media_content_type,h.thumb=this._view.media.thumbnail,h.title=this._view.media.title;else{if(!(null===(o=this._view)||void 0===o?void 0:o.is("live"))||!A)return;(null===(r=this._hass)||void 0===r?void 0:r.states)&&A in this._hass.states&&(h.thumb=null!==(s=this._hass.states[A].attributes.entity_picture)&&void 0!==s?s:null),h.title=uy(this._hass,u),d=`media-source://camera/${A}`,c="application/vnd.apple.mpegurl"}"play"===e?null===(a=this._hass)||void 0===a||a.callService("media_player","play_media",{entity_id:t,media_content_id:d,media_content_type:c,extra:h}):"stop"===e&&(null===(l=this._hass)||void 0===l||l.callService("media_player","media_stop",{entity_id:t}))}_cardActionHandler(t){var e,i,n,o;const r=Gm(t.detail);if(!r)return;const s=r.frigate_card_action;switch(s){case"default":this._changeView();break;case"clip":case"clips":case"image":case"live":case"snapshot":case"snapshots":case"timeline":this._view&&this._changeView({view:new Z_({view:s,camera:this._view.camera})});break;case"download":this._downloadViewerMedia();break;case"frigate_ui":const t=this._getFrigateURLFromContext();t&&window.open(t);break;case"fullscreen":fu.isEnabled&&fu.toggle(this);break;case"menu_toggle":null===(e=this._refMenu.value)||void 0===e||e.toggleMenu();break;case"camera_select":const a=r.camera;if((null===(i=this._cameras)||void 0===i?void 0:i.has(a))&&this._view){const t=Z_.selectBestViewForUserSpecified("current"===this._getConfig().view.camera_select?this._view.view:this._getConfig().view.camera_select);this._changeView({view:new Z_({view:(null===(o=null===(n=this._cameras)||void 0===n?void 0:n.get(a))||void 0===o?void 0:o.frigate.camera_name)?t:Z_.selectBestViewForNonFrigateCameras(t),camera:a})})}break;case"media_player":this._mediaPlayerAction(r.media_player,r.media_player_action);break;case"diagnostics":this._diagnostics();break;default:console.warn(`Frigate card received unknown card action: ${s}`)}}async _diagnostics(){if(this._hass){let t=[];try{t=await(async t=>await ty(t,aS,{type:"config/device_registry/list"}))(this._hass)}catch(t){}const e=t.filter((t=>"Frigate"===t.manufacturer)),i=new Map;e.forEach((t=>{t.config_entries.forEach((e=>{t.model&&i.set(e,t.model)}))})),this._setMessageAndUpdate({message:Sg("error.diagnostics"),type:"diagnostics",icon:"mdi:information",context:Object.assign({ha_version:this._hass.config.version,card_version:cS,browser:navigator.userAgent,date:new Date,frigate_version:Object.fromEntries(i),lang:kg(),git:Object.assign(Object.assign(Object.assign({},{build_version:AS}),{build_date:hS}),{commit_date:uS})},this._rawConfig&&{config:this._rawConfig})})}}_getFrigateURLFromContext(){const t=this._getSelectedCameraConfig();return t&&t.frigate.url&&this._view?t.frigate.camera_name?this._view.isViewerView()||this._view.isGalleryView()?`${t.frigate.url}/events?camera=${t.frigate.camera_name}`:`${t.frigate.url}/cameras/${t.frigate.camera_name}`:t.frigate.url:null}_actionHandler(t,e){const i=t.detail.action,n=t.currentTarget;e&&n&&i&&Ym(i,e)&&((t,e,i,n)=>{$m(t,e,i,n,Ym(n,i))})(n,this._hass,e,t.detail.action),this._startInteractionTimer()}_mouseHandler(){this._startInteractionTimer()}_clearInteractionTimer(){this._interactionTimerID&&(window.clearTimeout(this._interactionTimerID),this._interactionTimerID=null)}_startInteractionTimer(){this._clearInteractionTimer(),this._untrigger(),this._getConfig().view.timeout_seconds&&(this._interactionTimerID=window.setTimeout((()=>{this._clearInteractionTimer(),this._isAutomatedViewUpdateAllowed()&&(this._changeView(),this._setLightOrDarkMode())}),1e3*this._getConfig().view.timeout_seconds)),this._setLightOrDarkMode()}_startUpdateTimer(){this._updateTimerID&&(window.clearTimeout(this._updateTimerID),this._updateTimerID=null),this._getConfig().view.update_seconds&&(this._updateTimerID=window.setTimeout((()=>{this._isAutomatedViewUpdateAllowed()?this._changeView():this._startUpdateTimer()}),1e3*this._getConfig().view.update_seconds))}_isAutomatedViewUpdateAllowed(t){return(t||!this._isTriggered())&&(this._getConfig().view.update_force||!this._interactionTimerID)}_renderMenu(){return K` + + `}_setMessageAndUpdate(t,e){var i,n;const o=this._message&&null!==(i=Nm[this._message.type])&&void 0!==i?i:0,r=null!==(n=Nm[t.type])&&void 0!==n?n:0;(!this._message||r>=o)&&(this._message=t,this._mediaUnloadedHandler(),e||(this.requestUpdate(),this._resetMainScroll()))}_resetMainScroll(){var t;null===(t=this._refMain.value)||void 0===t||t.scroll({top:0})}_messageHandler(t){return this._setMessageAndUpdate(t.detail)}_mediaLoadedHandler(t){const e=t.detail;i_(e)&&(this._lastValidMediaLoadedInfo=this._currentMediaLoadedInfo=e,this._generateConditionState(),this.requestUpdate())}_mediaUnloadedHandler(){this._currentMediaLoadedInfo=null,this._generateConditionState()}_fullscreenHandler(){this._generateConditionState(),this.requestUpdate()}connectedCallback(){super.connectedCallback(),fu.isEnabled&&fu.on("change",this._fullscreenHandler.bind(this)),this.addEventListener("mousemove",this._boundMouseHandler)}disconnectedCallback(){this._mediaUnloadedHandler(),fu.isEnabled&&fu.off("change",this._fullscreenHandler.bind(this)),this.removeEventListener("mousemove",this._boundMouseHandler),super.disconnectedCallback()}_isBeingCasted(){return!!navigator.userAgent.match(/CrKey\//)}_isAspectRatioEnforced(){var t,e;const i=this._getConfig().dimensions.aspect_ratio_mode;return!(fu.isEnabled&&fu.isFullscreen||"unconstrained"==i||"dynamic"==i&&((null===(t=this._view)||void 0===t?void 0:t.isAnyMediaView())||(null===(e=this._view)||void 0===e?void 0:e.is("timeline"))))}_getAspectRatioStyle(){if(!this._isAspectRatioEnforced())return"auto";if("dynamic"==this._getConfig().dimensions.aspect_ratio_mode&&this._lastValidMediaLoadedInfo)return`${this._lastValidMediaLoadedInfo.width} / ${this._lastValidMediaLoadedInfo.height}`;const t=this._getConfig().dimensions.aspect_ratio;return t?`${t[0]} / ${t[1]}`:"16 / 9"}_getMergedActions(){var t,e,i,n,o,r,s;if(this._message||(null===(t=this._view)||void 0===t?void 0:t.is("timeline")))return{};let a;return(null===(e=this._view)||void 0===e?void 0:e.is("live"))?a=this._getConfig().live.actions:(null===(i=this._view)||void 0===i?void 0:i.isGalleryView())?a=null===(n=this._getConfig().event_gallery)||void 0===n?void 0:n.actions:(null===(o=this._view)||void 0===o?void 0:o.isViewerView())?a=this._getConfig().media_viewer.actions:(null===(r=this._view)||void 0===r?void 0:r.is("image"))&&(a=null===(s=this._getConfig().image)||void 0===s?void 0:s.actions),Object.assign(Object.assign({},this._getConfig().view.actions),a)}render(){if(!this._hass)return;const t={"aspect-ratio":this._getAspectRatioStyle()},e={triggered:!!this._isTriggered()&&this._getConfig().view.scan.show_trigger_status},i={main:!0,"curve-top":"outside"!==this._getConfig().menu.style||"top"!==this._getConfig().menu.position,"curve-bottom":"outside"!==this._getConfig().menu.style||"top"===this._getConfig().menu.position},n=this._getMergedActions(),o="outside"===this._getConfig().menu.style&&"top"===this._getConfig().menu.position;return K` this._actionHandler(t,n)} + @ll-custom=${this._cardActionHandler.bind(this)} + @frigate-card:message=${this._messageHandler.bind(this)} + @frigate-card:view:change=${this._changeViewHandler.bind(this)} + @frigate-card:view:change-context=${this._addViewContextHandler.bind(this)} + @frigate-card:media:loaded=${this._mediaLoadedHandler.bind(this)} + @frigate-card:media:unloaded=${this._mediaUnloadedHandler.bind(this)} + @frigate-card:render=${()=>this.requestUpdate()} + > + ${o?this._renderMenu():""} +
+ ${void 0!==this._cameras||this._message?this._render():Vt((async()=>(await this._loadCameras(),this._changeView({resetMessage:!1}),this._render()))(),Ug())} + ${this._message?(r=this._message,"error"===r.type?K` `:K` `):""} +
+ ${o?"":this._renderMenu()} + ${this._getConfig().elements?K` {this._addDynamicMenuButton(t.detail)}} + @frigate-card:menu-remove=${t=>{this._removeDynamicMenuButton(t.detail)}} + @frigate-card:condition-state-request=${t=>{!function(t,e){t.conditionState=e}(t,this._conditionState)}} + > + `:""} +
`;var r}_render(){const t=this._getSelectedCameraConfig();if(!this._hass||!this._view||!t)return K``;const e={hidden:!!this._message||this._getConfig().live.preload&&!this._view.is("live")};return K` + ${!this._message&&this._view.is("image")?K` + `:""} + ${!this._message&&this._view.isGalleryView()?K` + `:""} + ${!this._message&&this._view.isViewerView()?K` + `:""} + ${!this._message&&this._view.is("timeline")?K` + `:""} + ${this._getConfig().live.preload||!this._message&&this._view.is("live")?K` + n in t.overrides)).map((t=>({conditions:t.conditions,overrides:t.overrides[n]}))))&&void 0!==o?o:[]} + .cameras=${this._cameras} + class="${Dt(e)}" + > + + `:""} + `;var i,n,o}static get styles(){return _(":host {\n display: block;\n position: relative;\n background-color: var(--card-background-color);\n border-radius: var(--ha-card-border-radius, 4px);\n}\n\n:host([dark]) {\n filter: brightness(75%);\n}\n\ndiv.main {\n position: relative;\n overflow: auto;\n width: 100%;\n height: 100%;\n margin: auto;\n display: flex;\n justify-content: center;\n transform: translateZ(0);\n box-sizing: border-box;\n scrollbar-width: none;\n -ms-overflow-style: none;\n}\n\n/* Hide scrollbar for Chrome, Safari and Opera */\ndiv.main::-webkit-scrollbar {\n display: none;\n}\n\ndiv.main.curve-top {\n border-top-left-radius: var(--ha-card-border-radius, 4px);\n border-top-right-radius: var(--ha-card-border-radius, 4px);\n}\n\ndiv.main.curve-bottom {\n border-bottom-left-radius: var(--ha-card-border-radius, 4px);\n border-bottom-right-radius: var(--ha-card-border-radius, 4px);\n}\n\n/* The 'hover' menu mode is styling applied outside of the menu itself */\nfrigate-card-menu[data-style=hover] {\n z-index: 1;\n transition: opacity 0.5s ease;\n}\n\n.main + frigate-card-menu[data-style=hover] {\n opacity: 0;\n}\n\nfrigate-card-menu[data-style=hover]:hover {\n opacity: 1;\n}\n\nha-card {\n display: flex;\n flex-direction: column;\n margin: auto;\n overflow: visible;\n width: 100%;\n height: 100%;\n position: static;\n color: var(--secondary-text-color, white);\n}\n\nha-card.triggered {\n animation: warning-pulse 5s infinite;\n}\n@keyframes warning-pulse {\n 0% {\n border: solid 2px rgba(0, 0, 0, 0);\n }\n 50% {\n border: solid 2px var(--warning-color);\n }\n 100% {\n border: solid 2px rgba(0, 0, 0, 0);\n }\n}\n\nfrigate-card-live.hidden {\n display: none;\n}\n\n/************\n * Fullscreen\n *************/\n:host(:fullscreen) #ha-card {\n border-radius: 0px;\n box-shadow: none;\n margin: 0;\n}\n\n:host(:-webkit-full-screen) #ha-card {\n border-radius: 0px;\n box-shadow: none;\n margin: 0;\n}\n\n:host(:fullscreen) div.main,\n:host(:fullscreen) frigate-card-menu {\n border-radius: 0px;\n}\n\n:host(:-webkit-full-screen) div.main,\n:host(:-webkit-full-screen) frigate-card-menu {\n border-radius: 0px;\n}")}getCardSize(){return this._lastValidMediaLoadedInfo?this._lastValidMediaLoadedInfo.height/50:6}};t([_t()],pS.prototype,"_hass",void 0),t([_t()],pS.prototype,"_config",void 0),t([_t()],pS.prototype,"_overriddenConfig",void 0),t([_t()],pS.prototype,"_view",void 0),t([_t()],pS.prototype,"_cameras",void 0),pS=t([vt("frigate-card")],pS);export{pS as FrigateCard}; diff --git a/www/mushroom.js b/www/mushroom.js index eb356f573..0af5df985 100644 --- a/www/mushroom.js +++ b/www/mushroom.js @@ -12,74 +12,185 @@ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -***************************************************************************** */function e(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}var i=function(){return i=Object.assign||function(t){for(var e,i=1,n=arguments.length;i=0;s--)(o=t[s])&&(a=(r<3?o(a):r>3?o(e,i,a):o(e,i))||a);return r>3&&a&&Object.defineProperty(e,i,a),a}function o(t){var e="function"==typeof Symbol&&Symbol.iterator,i=e&&t[e],n=0;if(i)return i.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}var r,a,s=function(t,e){return l(e).format(t)},l=function(t){return new Intl.DateTimeFormat(t.language,{year:"numeric",month:"long",day:"numeric"})};!function(t){t.language="language",t.system="system",t.comma_decimal="comma_decimal",t.decimal_comma="decimal_comma",t.space_comma="space_comma",t.none="none"}(r||(r={})),function(t){t.language="language",t.system="system",t.am_pm="12",t.twenty_four="24"}(a||(a={}));var c=function(t){if(t.time_format===a.language||t.time_format===a.system){var e=t.time_format===a.language?t.language:void 0,i=(new Date).toLocaleString(e);return i.includes("AM")||i.includes("PM")}return t.time_format===a.am_pm},d=function(t,e){return u(e).format(t)},u=function(t){return new Intl.DateTimeFormat(t.language,{year:"numeric",month:"long",day:"numeric",hour:c(t)?"numeric":"2-digit",minute:"2-digit",hour12:c(t)})},h=function(t,e){return m(e).format(t)},m=function(t){return new Intl.DateTimeFormat(t.language,{hour:"numeric",minute:"2-digit",hour12:c(t)})};function p(){return(p=Object.assign||function(t){for(var e=1;e-1?t.split(".")[1].length:0;i.minimumFractionDigits=n,i.maximumFractionDigits=n}return i},y=function(t,e,i,n){var o=void 0!==n?n:e.state;if("unknown"===o||"unavailable"===o)return t("state.default."+o);if(_(e)){if("monetary"===e.attributes.device_class)try{return b(o,i,{style:"currency",currency:e.attributes.unit_of_measurement})}catch(t){}return b(o,i)+(e.attributes.unit_of_measurement?" "+e.attributes.unit_of_measurement:"")}var r=function(t){return f(t.entity_id)}(e);if("input_datetime"===r){var a;if(void 0===n)return e.attributes.has_date&&e.attributes.has_time?(a=new Date(e.attributes.year,e.attributes.month-1,e.attributes.day,e.attributes.hour,e.attributes.minute),d(a,i)):e.attributes.has_date?(a=new Date(e.attributes.year,e.attributes.month-1,e.attributes.day),s(a,i)):e.attributes.has_time?((a=new Date).setHours(e.attributes.hour,e.attributes.minute),h(a,i)):e.state;try{var l=n.split(" ");if(2===l.length)return d(new Date(l.join("T")),i);if(1===l.length){if(n.includes("-"))return s(new Date(n+"T00:00"),i);if(n.includes(":")){var c=new Date;return h(new Date(c.toISOString().split("T")[0]+"T"+n),i)}}return n}catch(t){return n}}return"humidifier"===r&&"on"===o&&e.attributes.humidity?e.attributes.humidity+" %":"counter"===r||"number"===r||"input_number"===r?b(o,i):e.attributes.device_class&&t("component."+r+".state."+e.attributes.device_class+"."+o)||t("component."+r+".state._."+o)||o},x=["closed","locked","off"],w=function(t,e,i,n){n=n||{},i=null==i?{}:i;var o=new Event(e,{bubbles:void 0===n.bubbles||n.bubbles,cancelable:Boolean(n.cancelable),composed:void 0===n.composed||n.composed});return o.detail=i,t.dispatchEvent(o),o},C={alert:"mdi:alert",automation:"mdi:playlist-play",calendar:"mdi:calendar",camera:"mdi:video",climate:"mdi:thermostat",configurator:"mdi:settings",conversation:"mdi:text-to-speech",device_tracker:"mdi:account",fan:"mdi:fan",group:"mdi:google-circles-communities",history_graph:"mdi:chart-line",homeassistant:"mdi:home-assistant",homekit:"mdi:home-automation",image_processing:"mdi:image-filter-frames",input_boolean:"mdi:drawing",input_datetime:"mdi:calendar-clock",input_number:"mdi:ray-vertex",input_select:"mdi:format-list-bulleted",input_text:"mdi:textbox",light:"mdi:lightbulb",mailbox:"mdi:mailbox",notify:"mdi:comment-alert",person:"mdi:account",plant:"mdi:flower",proximity:"mdi:apple-safari",remote:"mdi:remote",scene:"mdi:google-pages",script:"mdi:file-document",sensor:"mdi:eye",simple_alarm:"mdi:bell",sun:"mdi:white-balance-sunny",switch:"mdi:flash",timer:"mdi:timer",updater:"mdi:cloud-upload",vacuum:"mdi:robot-vacuum",water_heater:"mdi:thermometer",weblink:"mdi:open-in-new"};function k(t,e){if(t in C)return C[t];switch(t){case"alarm_control_panel":switch(e){case"armed_home":return"mdi:bell-plus";case"armed_night":return"mdi:bell-sleep";case"disarmed":return"mdi:bell-outline";case"triggered":return"mdi:bell-ring";default:return"mdi:bell"}case"binary_sensor":return e&&"off"===e?"mdi:radiobox-blank":"mdi:checkbox-marked-circle";case"cover":return"closed"===e?"mdi:window-closed":"mdi:window-open";case"lock":return e&&"unlocked"===e?"mdi:lock-open":"mdi:lock";case"media_player":return e&&"off"!==e&&"idle"!==e?"mdi:cast-connected":"mdi:cast";case"zwave":switch(e){case"dead":return"mdi:emoticon-dead";case"sleeping":return"mdi:sleep";case"initializing":return"mdi:timer-sand";default:return"mdi:z-wave"}default:return console.warn("Unable to find icon for domain "+t+" ("+e+")"),"mdi:bookmark"}}var $=function(t){w(window,"haptic",t)},E=function(t,e){return function(t,e,i){void 0===i&&(i=!0);var n,o=f(e),r="group"===o?"homeassistant":o;switch(o){case"lock":n=i?"unlock":"lock";break;case"cover":n=i?"open_cover":"close_cover";break;default:n=i?"turn_on":"turn_off"}return t.callService(r,n,{entity_id:e})}(t,e,x.includes(t.states[e].state))},A=function(t,e,i,n){if(n||(n={action:"more-info"}),!n.confirmation||n.confirmation.exemptions&&n.confirmation.exemptions.some((function(t){return t.user===e.user.id}))||($("warning"),confirm(n.confirmation.text||"Are you sure you want to "+n.action+"?")))switch(n.action){case"more-info":(i.entity||i.camera_image)&&w(t,"hass-more-info",{entityId:i.entity?i.entity:i.camera_image});break;case"navigate":n.navigation_path&&function(t,e,i){void 0===i&&(i=!1),i?history.replaceState(null,"",e):history.pushState(null,"",e),w(window,"location-changed",{replace:i})}(0,n.navigation_path);break;case"url":n.url_path&&window.open(n.url_path);break;case"toggle":i.entity&&(E(e,i.entity),$("success"));break;case"call-service":if(!n.service)return void $("failure");var o=n.service.split(".",2);e.callService(o[0],o[1],n.service_data,n.target),$("success");break;case"fire-dom-event":w(t,"ll-custom",n)}},S=function(t,e,i,n){var o;"double_tap"===n&&i.double_tap_action?o=i.double_tap_action:"hold"===n&&i.hold_action?o=i.hold_action:"tap"===n&&i.tap_action&&(o=i.tap_action),A(t,e,i,o)};function I(t){return void 0!==t&&"none"!==t.action}var T={humidity:"mdi:water-percent",illuminance:"mdi:brightness-5",temperature:"mdi:thermometer",pressure:"mdi:gauge",power:"mdi:flash",signal_strength:"mdi:wifi"},O={binary_sensor:function(t,e){var i="off"===t;switch(null==e?void 0:e.attributes.device_class){case"battery":return i?"mdi:battery":"mdi:battery-outline";case"battery_charging":return i?"mdi:battery":"mdi:battery-charging";case"cold":return i?"mdi:thermometer":"mdi:snowflake";case"connectivity":return i?"mdi:server-network-off":"mdi:server-network";case"door":return i?"mdi:door-closed":"mdi:door-open";case"garage_door":return i?"mdi:garage":"mdi:garage-open";case"power":case"plug":return i?"mdi:power-plug-off":"mdi:power-plug";case"gas":case"problem":case"safety":case"tamper":return i?"mdi:check-circle":"mdi:alert-circle";case"smoke":return i?"mdi:check-circle":"mdi:smoke";case"heat":return i?"mdi:thermometer":"mdi:fire";case"light":return i?"mdi:brightness-5":"mdi:brightness-7";case"lock":return i?"mdi:lock":"mdi:lock-open";case"moisture":return i?"mdi:water-off":"mdi:water";case"motion":return i?"mdi:walk":"mdi:run";case"occupancy":case"presence":return i?"mdi:home-outline":"mdi:home";case"opening":return i?"mdi:square":"mdi:square-outline";case"running":return i?"mdi:stop":"mdi:play";case"sound":return i?"mdi:music-note-off":"mdi:music-note";case"update":return i?"mdi:package":"mdi:package-up";case"vibration":return i?"mdi:crop-portrait":"mdi:vibrate";case"window":return i?"mdi:window-closed":"mdi:window-open";default:return i?"mdi:radiobox-blank":"mdi:checkbox-marked-circle"}},cover:function(t){var e="closed"!==t.state;switch(t.attributes.device_class){case"garage":return e?"mdi:garage-open":"mdi:garage";case"door":return e?"mdi:door-open":"mdi:door-closed";case"shutter":return e?"mdi:window-shutter-open":"mdi:window-shutter";case"blind":return e?"mdi:blinds-open":"mdi:blinds";case"window":return e?"mdi:window-open":"mdi:window-closed";default:return k("cover",t.state)}},sensor:function(t){var e=t.attributes.device_class;if(e&&e in T)return T[e];if("battery"===e){var i=Number(t.state);if(isNaN(i))return"mdi:battery-unknown";var n=10*Math.round(i/10);return n>=100?"mdi:battery":n<=0?"mdi:battery-alert":"hass:battery-"+n}var o=t.attributes.unit_of_measurement;return"°C"===o||"°F"===o?"mdi:thermometer":k("sensor")},input_datetime:function(t){return t.attributes.has_date?t.attributes.has_time?k("input_datetime"):"mdi:calendar":"mdi:clock"}}; +***************************************************************************** */function e(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}var i=function(){return i=Object.assign||function(t){for(var e,i=1,n=arguments.length;i=0;l--)(o=t[l])&&(a=(r<3?o(a):r>3?o(e,i,a):o(e,i))||a);return r>3&&a&&Object.defineProperty(e,i,a),a}function o(t){var e="function"==typeof Symbol&&Symbol.iterator,i=e&&t[e],n=0;if(i)return i.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")} /** * @license * Copyright 2019 Google LLC * SPDX-License-Identifier: BSD-3-Clause - */const M=window.ShadowRoot&&(void 0===window.ShadyCSS||window.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,D=Symbol(),L=new Map;class z{constructor(t,e){if(this._$cssResult$=!0,e!==D)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t}get styleSheet(){let t=L.get(this.cssText);return M&&void 0===t&&(L.set(this.cssText,t=new CSSStyleSheet),t.replaceSync(this.cssText)),t}toString(){return this.cssText}}const j=t=>new z("string"==typeof t?t:t+"",D),N=(t,...e)=>{const i=1===t.length?t[0]:e.reduce(((e,i,n)=>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.")})(i)+t[n+1]),t[0]);return new z(i,D)},R=M?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e="";for(const i of t.cssRules)e+=i.cssText;return j(e)})(t):t + */const r=window.ShadowRoot&&(void 0===window.ShadyCSS||window.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,a=Symbol(),l=new Map;class s{constructor(t,e){if(this._$cssResult$=!0,e!==a)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t}get styleSheet(){let t=l.get(this.cssText);return r&&void 0===t&&(l.set(this.cssText,t=new CSSStyleSheet),t.replaceSync(this.cssText)),t}toString(){return this.cssText}}const c=t=>new s("string"==typeof t?t:t+"",a),d=(t,...e)=>{const i=1===t.length?t[0]:e.reduce(((e,i,n)=>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.")})(i)+t[n+1]),t[0]);return new s(i,a)},u=r?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e="";for(const i of t.cssRules)e+=i.cssText;return c(e)})(t):t /** * @license * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause - */;var P;const F=window.trustedTypes,V=F?F.emptyScript:"",B=window.reactiveElementPolyfillSupport,U={toAttribute(t,e){switch(e){case Boolean:t=t?V:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,e){let i=t;switch(e){case Boolean:i=null!==t;break;case Number:i=null===t?null:Number(t);break;case Object:case Array:try{i=JSON.parse(t)}catch(t){i=null}}return i}},H=(t,e)=>e!==t&&(e==e||t==t),Y={attribute:!0,type:String,converter:U,reflect:!1,hasChanged:H};class X extends HTMLElement{constructor(){super(),this._$Et=new Map,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Ei=null,this.o()}static addInitializer(t){var e;null!==(e=this.l)&&void 0!==e||(this.l=[]),this.l.push(t)}static get observedAttributes(){this.finalize();const t=[];return this.elementProperties.forEach(((e,i)=>{const n=this._$Eh(i,e);void 0!==n&&(this._$Eu.set(n,i),t.push(n))})),t}static createProperty(t,e=Y){if(e.state&&(e.attribute=!1),this.finalize(),this.elementProperties.set(t,e),!e.noAccessor&&!this.prototype.hasOwnProperty(t)){const i="symbol"==typeof t?Symbol():"__"+t,n=this.getPropertyDescriptor(t,i,e);void 0!==n&&Object.defineProperty(this.prototype,t,n)}}static getPropertyDescriptor(t,e,i){return{get(){return this[e]},set(n){const o=this[t];this[e]=n,this.requestUpdate(t,o,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)||Y}static finalize(){if(this.hasOwnProperty("finalized"))return!1;this.finalized=!0;const t=Object.getPrototypeOf(this);if(t.finalize(),this.elementProperties=new Map(t.elementProperties),this._$Eu=new Map,this.hasOwnProperty("properties")){const t=this.properties,e=[...Object.getOwnPropertyNames(t),...Object.getOwnPropertySymbols(t)];for(const i of e)this.createProperty(i,t[i])}return this.elementStyles=this.finalizeStyles(this.styles),!0}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const i=new Set(t.flat(1/0).reverse());for(const t of i)e.unshift(R(t))}else void 0!==t&&e.push(R(t));return e}static _$Eh(t,e){const i=e.attribute;return!1===i?void 0:"string"==typeof i?i:"string"==typeof t?t.toLowerCase():void 0}o(){var t;this._$Ep=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this._$Em(),this.requestUpdate(),null===(t=this.constructor.l)||void 0===t||t.forEach((t=>t(this)))}addController(t){var e,i;(null!==(e=this._$Eg)&&void 0!==e?e:this._$Eg=[]).push(t),void 0!==this.renderRoot&&this.isConnected&&(null===(i=t.hostConnected)||void 0===i||i.call(t))}removeController(t){var e;null===(e=this._$Eg)||void 0===e||e.splice(this._$Eg.indexOf(t)>>>0,1)}_$Em(){this.constructor.elementProperties.forEach(((t,e)=>{this.hasOwnProperty(e)&&(this._$Et.set(e,this[e]),delete this[e])}))}createRenderRoot(){var t;const e=null!==(t=this.shadowRoot)&&void 0!==t?t:this.attachShadow(this.constructor.shadowRootOptions);return((t,e)=>{M?t.adoptedStyleSheets=e.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet)):e.forEach((e=>{const i=document.createElement("style"),n=window.litNonce;void 0!==n&&i.setAttribute("nonce",n),i.textContent=e.cssText,t.appendChild(i)}))})(e,this.constructor.elementStyles),e}connectedCallback(){var t;void 0===this.renderRoot&&(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),null===(t=this._$Eg)||void 0===t||t.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._$Eg)||void 0===t||t.forEach((t=>{var e;return null===(e=t.hostDisconnected)||void 0===e?void 0:e.call(t)}))}attributeChangedCallback(t,e,i){this._$AK(t,i)}_$ES(t,e,i=Y){var n,o;const r=this.constructor._$Eh(t,i);if(void 0!==r&&!0===i.reflect){const a=(null!==(o=null===(n=i.converter)||void 0===n?void 0:n.toAttribute)&&void 0!==o?o:U.toAttribute)(e,i.type);this._$Ei=t,null==a?this.removeAttribute(r):this.setAttribute(r,a),this._$Ei=null}}_$AK(t,e){var i,n,o;const r=this.constructor,a=r._$Eu.get(t);if(void 0!==a&&this._$Ei!==a){const t=r.getPropertyOptions(a),s=t.converter,l=null!==(o=null!==(n=null===(i=s)||void 0===i?void 0:i.fromAttribute)&&void 0!==n?n:"function"==typeof s?s:null)&&void 0!==o?o:U.fromAttribute;this._$Ei=a,this[a]=l(e,t.type),this._$Ei=null}}requestUpdate(t,e,i){let n=!0;void 0!==t&&(((i=i||this.constructor.getPropertyOptions(t)).hasChanged||H)(this[t],e)?(this._$AL.has(t)||this._$AL.set(t,e),!0===i.reflect&&this._$Ei!==t&&(void 0===this._$EC&&(this._$EC=new Map),this._$EC.set(t,i))):n=!1),!this.isUpdatePending&&n&&(this._$Ep=this._$E_())}async _$E_(){this.isUpdatePending=!0;try{await this._$Ep}catch(t){Promise.reject(t)}const t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var t;if(!this.isUpdatePending)return;this.hasUpdated,this._$Et&&(this._$Et.forEach(((t,e)=>this[e]=t)),this._$Et=void 0);let e=!1;const i=this._$AL;try{e=this.shouldUpdate(i),e?(this.willUpdate(i),null===(t=this._$Eg)||void 0===t||t.forEach((t=>{var e;return null===(e=t.hostUpdate)||void 0===e?void 0:e.call(t)})),this.update(i)):this._$EU()}catch(t){throw e=!1,this._$EU(),t}e&&this._$AE(i)}willUpdate(t){}_$AE(t){var e;null===(e=this._$Eg)||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)}_$EU(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$Ep}shouldUpdate(t){return!0}update(t){void 0!==this._$EC&&(this._$EC.forEach(((t,e)=>this._$ES(e,this[e],t))),this._$EC=void 0),this._$EU()}updated(t){}firstUpdated(t){}} + */;var h;const m=window.trustedTypes,p=m?m.emptyScript:"",f=window.reactiveElementPolyfillSupport,g={toAttribute(t,e){switch(e){case Boolean:t=t?p:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,e){let i=t;switch(e){case Boolean:i=null!==t;break;case Number:i=null===t?null:Number(t);break;case Object:case Array:try{i=JSON.parse(t)}catch(t){i=null}}return i}},_=(t,e)=>e!==t&&(e==e||t==t),v={attribute:!0,type:String,converter:g,reflect:!1,hasChanged:_};class b extends HTMLElement{constructor(){super(),this._$Et=new Map,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Ei=null,this.o()}static addInitializer(t){var e;null!==(e=this.l)&&void 0!==e||(this.l=[]),this.l.push(t)}static get observedAttributes(){this.finalize();const t=[];return this.elementProperties.forEach(((e,i)=>{const n=this._$Eh(i,e);void 0!==n&&(this._$Eu.set(n,i),t.push(n))})),t}static createProperty(t,e=v){if(e.state&&(e.attribute=!1),this.finalize(),this.elementProperties.set(t,e),!e.noAccessor&&!this.prototype.hasOwnProperty(t)){const i="symbol"==typeof t?Symbol():"__"+t,n=this.getPropertyDescriptor(t,i,e);void 0!==n&&Object.defineProperty(this.prototype,t,n)}}static getPropertyDescriptor(t,e,i){return{get(){return this[e]},set(n){const o=this[t];this[e]=n,this.requestUpdate(t,o,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)||v}static finalize(){if(this.hasOwnProperty("finalized"))return!1;this.finalized=!0;const t=Object.getPrototypeOf(this);if(t.finalize(),this.elementProperties=new Map(t.elementProperties),this._$Eu=new Map,this.hasOwnProperty("properties")){const t=this.properties,e=[...Object.getOwnPropertyNames(t),...Object.getOwnPropertySymbols(t)];for(const i of e)this.createProperty(i,t[i])}return this.elementStyles=this.finalizeStyles(this.styles),!0}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const i=new Set(t.flat(1/0).reverse());for(const t of i)e.unshift(u(t))}else void 0!==t&&e.push(u(t));return e}static _$Eh(t,e){const i=e.attribute;return!1===i?void 0:"string"==typeof i?i:"string"==typeof t?t.toLowerCase():void 0}o(){var t;this._$Ep=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this._$Em(),this.requestUpdate(),null===(t=this.constructor.l)||void 0===t||t.forEach((t=>t(this)))}addController(t){var e,i;(null!==(e=this._$Eg)&&void 0!==e?e:this._$Eg=[]).push(t),void 0!==this.renderRoot&&this.isConnected&&(null===(i=t.hostConnected)||void 0===i||i.call(t))}removeController(t){var e;null===(e=this._$Eg)||void 0===e||e.splice(this._$Eg.indexOf(t)>>>0,1)}_$Em(){this.constructor.elementProperties.forEach(((t,e)=>{this.hasOwnProperty(e)&&(this._$Et.set(e,this[e]),delete this[e])}))}createRenderRoot(){var t;const e=null!==(t=this.shadowRoot)&&void 0!==t?t:this.attachShadow(this.constructor.shadowRootOptions);return((t,e)=>{r?t.adoptedStyleSheets=e.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet)):e.forEach((e=>{const i=document.createElement("style"),n=window.litNonce;void 0!==n&&i.setAttribute("nonce",n),i.textContent=e.cssText,t.appendChild(i)}))})(e,this.constructor.elementStyles),e}connectedCallback(){var t;void 0===this.renderRoot&&(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),null===(t=this._$Eg)||void 0===t||t.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._$Eg)||void 0===t||t.forEach((t=>{var e;return null===(e=t.hostDisconnected)||void 0===e?void 0:e.call(t)}))}attributeChangedCallback(t,e,i){this._$AK(t,i)}_$ES(t,e,i=v){var n,o;const r=this.constructor._$Eh(t,i);if(void 0!==r&&!0===i.reflect){const a=(null!==(o=null===(n=i.converter)||void 0===n?void 0:n.toAttribute)&&void 0!==o?o:g.toAttribute)(e,i.type);this._$Ei=t,null==a?this.removeAttribute(r):this.setAttribute(r,a),this._$Ei=null}}_$AK(t,e){var i,n,o;const r=this.constructor,a=r._$Eu.get(t);if(void 0!==a&&this._$Ei!==a){const t=r.getPropertyOptions(a),l=t.converter,s=null!==(o=null!==(n=null===(i=l)||void 0===i?void 0:i.fromAttribute)&&void 0!==n?n:"function"==typeof l?l:null)&&void 0!==o?o:g.fromAttribute;this._$Ei=a,this[a]=s(e,t.type),this._$Ei=null}}requestUpdate(t,e,i){let n=!0;void 0!==t&&(((i=i||this.constructor.getPropertyOptions(t)).hasChanged||_)(this[t],e)?(this._$AL.has(t)||this._$AL.set(t,e),!0===i.reflect&&this._$Ei!==t&&(void 0===this._$EC&&(this._$EC=new Map),this._$EC.set(t,i))):n=!1),!this.isUpdatePending&&n&&(this._$Ep=this._$E_())}async _$E_(){this.isUpdatePending=!0;try{await this._$Ep}catch(t){Promise.reject(t)}const t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var t;if(!this.isUpdatePending)return;this.hasUpdated,this._$Et&&(this._$Et.forEach(((t,e)=>this[e]=t)),this._$Et=void 0);let e=!1;const i=this._$AL;try{e=this.shouldUpdate(i),e?(this.willUpdate(i),null===(t=this._$Eg)||void 0===t||t.forEach((t=>{var e;return null===(e=t.hostUpdate)||void 0===e?void 0:e.call(t)})),this.update(i)):this._$EU()}catch(t){throw e=!1,this._$EU(),t}e&&this._$AE(i)}willUpdate(t){}_$AE(t){var e;null===(e=this._$Eg)||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)}_$EU(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$Ep}shouldUpdate(t){return!0}update(t){void 0!==this._$EC&&(this._$EC.forEach(((t,e)=>this._$ES(e,this[e],t))),this._$EC=void 0),this._$EU()}updated(t){}firstUpdated(t){}} /** * @license * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause */ -var q;X.finalized=!0,X.elementProperties=new Map,X.elementStyles=[],X.shadowRootOptions={mode:"open"},null==B||B({ReactiveElement:X}),(null!==(P=globalThis.reactiveElementVersions)&&void 0!==P?P:globalThis.reactiveElementVersions=[]).push("1.3.0");const W=globalThis.trustedTypes,G=W?W.createPolicy("lit-html",{createHTML:t=>t}):void 0,K=`lit$${(Math.random()+"").slice(9)}$`,Z="?"+K,J=`<${Z}>`,Q=document,tt=(t="")=>Q.createComment(t),et=t=>null===t||"object"!=typeof t&&"function"!=typeof t,it=Array.isArray,nt=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,ot=/-->/g,rt=/>/g,at=/>|[ \n \r](?:([^\s"'>=/]+)([ \n \r]*=[ \n \r]*(?:[^ \n \r"'`<>=]|("|')|))|$)/g,st=/'/g,lt=/"/g,ct=/^(?:script|style|textarea|title)$/i,dt=t=>(e,...i)=>({_$litType$:t,strings:e,values:i}),ut=dt(1),ht=dt(2),mt=Symbol.for("lit-noChange"),pt=Symbol.for("lit-nothing"),ft=new WeakMap,gt=Q.createTreeWalker(Q,129,null,!1),_t=(t,e)=>{const i=t.length-1,n=[];let o,r=2===e?"":"",a=nt;for(let e=0;e"===l[0]?(a=null!=o?o:nt,c=-1):void 0===l[1]?c=-2:(c=a.lastIndex-l[2].length,s=l[1],a=void 0===l[3]?at:'"'===l[3]?lt:st):a===lt||a===st?a=at:a===ot||a===rt?a=nt:(a=at,o=void 0);const u=a===at&&t[e+1].startsWith("/>")?" ":"";r+=a===nt?i+J:c>=0?(n.push(s),i.slice(0,c)+"$lit$"+i.slice(c)+K+u):i+K+(-2===c?(n.push(void 0),e):u)}const s=r+(t[i]||"")+(2===e?"":"");if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return[void 0!==G?G.createHTML(s):s,n]};class bt{constructor({strings:t,_$litType$:e},i){let n;this.parts=[];let o=0,r=0;const a=t.length-1,s=this.parts,[l,c]=_t(t,e);if(this.el=bt.createElement(l,i),gt.currentNode=this.el.content,2===e){const t=this.el.content,e=t.firstChild;e.remove(),t.append(...e.childNodes)}for(;null!==(n=gt.nextNode())&&s.length0){n.textContent=W?W.emptyScript:"";for(let i=0;i{var e;return it(t)||"function"==typeof(null===(e=t)||void 0===e?void 0:e[Symbol.iterator])})(t)?this.S(t):this.$(t)}A(t,e=this._$AB){return this._$AA.parentNode.insertBefore(t,e)}k(t){this._$AH!==t&&(this._$AR(),this._$AH=this.A(t))}$(t){this._$AH!==pt&&et(this._$AH)?this._$AA.nextSibling.data=t:this.k(Q.createTextNode(t)),this._$AH=t}T(t){var e;const{values:i,_$litType$:n}=t,o="number"==typeof n?this._$AC(t):(void 0===n.el&&(n.el=bt.createElement(n.h,this.options)),n);if((null===(e=this._$AH)||void 0===e?void 0:e._$AD)===o)this._$AH.m(i);else{const t=new yt(o,this),e=t.p(this.options);t.m(i),this.k(e),this._$AH=t}}_$AC(t){let e=ft.get(t.strings);return void 0===e&&ft.set(t.strings,e=new bt(t)),e}S(t){it(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let i,n=0;for(const o of t)n===e.length?e.push(i=new xt(this.A(tt()),this.A(tt()),this,this.options)):i=e[n],i._$AI(o),n++;n2||""!==i[0]||""!==i[1]?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=pt}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,e=this,i,n){const o=this.strings;let r=!1;if(void 0===o)t=vt(this,t,e,0),r=!et(t)||t!==this._$AH&&t!==mt,r&&(this._$AH=t);else{const n=t;let a,s;for(t=o[0],a=0;at}):void 0,k=`lit$${(Math.random()+"").slice(9)}$`,C="?"+k,$=`<${C}>`,E=document,A=(t="")=>E.createComment(t),S=t=>null===t||"object"!=typeof t&&"function"!=typeof t,I=Array.isArray,T=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,z=/-->/g,O=/>/g,M=/>|[ \n \r](?:([^\s"'>=/]+)([ \n \r]*=[ \n \r]*(?:[^ \n \r"'`<>=]|("|')|))|$)/g,L=/'/g,D=/"/g,j=/^(?:script|style|textarea|title)$/i,P=t=>(e,...i)=>({_$litType$:t,strings:e,values:i}),N=P(1),V=P(2),R=Symbol.for("lit-noChange"),F=Symbol.for("lit-nothing"),B=new WeakMap,U=E.createTreeWalker(E,129,null,!1),H=(t,e)=>{const i=t.length-1,n=[];let o,r=2===e?"":"",a=T;for(let e=0;e"===s[0]?(a=null!=o?o:T,c=-1):void 0===s[1]?c=-2:(c=a.lastIndex-s[2].length,l=s[1],a=void 0===s[3]?M:'"'===s[3]?D:L):a===D||a===L?a=M:a===z||a===O?a=T:(a=M,o=void 0);const u=a===M&&t[e+1].startsWith("/>")?" ":"";r+=a===T?i+$:c>=0?(n.push(l),i.slice(0,c)+"$lit$"+i.slice(c)+k+u):i+k+(-2===c?(n.push(void 0),e):u)}const l=r+(t[i]||"")+(2===e?"":"");if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return[void 0!==w?w.createHTML(l):l,n]};class Y{constructor({strings:t,_$litType$:e},i){let n;this.parts=[];let o=0,r=0;const a=t.length-1,l=this.parts,[s,c]=H(t,e);if(this.el=Y.createElement(s,i),U.currentNode=this.el.content,2===e){const t=this.el.content,e=t.firstChild;e.remove(),t.append(...e.childNodes)}for(;null!==(n=U.nextNode())&&l.length0){n.textContent=x?x.emptyScript:"";for(let i=0;i{var e;return I(t)||"function"==typeof(null===(e=t)||void 0===e?void 0:e[Symbol.iterator])})(t)?this.S(t):this.$(t)}A(t,e=this._$AB){return this._$AA.parentNode.insertBefore(t,e)}k(t){this._$AH!==t&&(this._$AR(),this._$AH=this.A(t))}$(t){this._$AH!==F&&S(this._$AH)?this._$AA.nextSibling.data=t:this.k(E.createTextNode(t)),this._$AH=t}T(t){var e;const{values:i,_$litType$:n}=t,o="number"==typeof n?this._$AC(t):(void 0===n.el&&(n.el=Y.createElement(n.h,this.options)),n);if((null===(e=this._$AH)||void 0===e?void 0:e._$AD)===o)this._$AH.m(i);else{const t=new W(o,this),e=t.p(this.options);t.m(i),this.k(e),this._$AH=t}}_$AC(t){let e=B.get(t.strings);return void 0===e&&B.set(t.strings,e=new Y(t)),e}S(t){I(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let i,n=0;for(const o of t)n===e.length?e.push(i=new q(this.A(A()),this.A(A()),this,this.options)):i=e[n],i._$AI(o),n++;n2||""!==i[0]||""!==i[1]?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=F}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,e=this,i,n){const o=this.strings;let r=!1;if(void 0===o)t=X(this,t,e,0),r=!S(t)||t!==this._$AH&&t!==R,r&&(this._$AH=t);else{const n=t;let a,l;for(t=o[0],a=0;a{var n,o;const r=null!==(n=null==i?void 0:i.renderBefore)&&void 0!==n?n:e;let a=r._$litPart$;if(void 0===a){const t=null!==(o=null==i?void 0:i.renderBefore)&&void 0!==o?o:null;r._$litPart$=a=new xt(e.insertBefore(tt(),t),t,void 0,null!=i?i:{})}return a._$AI(t),a})(e,this.renderRoot,this.renderOptions)}connectedCallback(){var t;super.connectedCallback(),null===(t=this._$Dt)||void 0===t||t.setConnected(!0)}disconnectedCallback(){var t;super.disconnectedCallback(),null===(t=this._$Dt)||void 0===t||t.setConnected(!1)}render(){return mt}}Ot.finalized=!0,Ot._$litElement$=!0,null===(It=globalThis.litElementHydrateSupport)||void 0===It||It.call(globalThis,{LitElement:Ot});const Mt=globalThis.litElementPolyfillSupport;null==Mt||Mt({LitElement:Ot}),(null!==(Tt=globalThis.litElementVersions)&&void 0!==Tt?Tt:globalThis.litElementVersions=[]).push("3.2.0"); +var it,nt;null==et||et(Y,q),(null!==(y=globalThis.litHtmlVersions)&&void 0!==y?y:globalThis.litHtmlVersions=[]).push("2.2.0");class ot extends b{constructor(){super(...arguments),this.renderOptions={host:this},this._$Dt=void 0}createRenderRoot(){var t,e;const i=super.createRenderRoot();return null!==(t=(e=this.renderOptions).renderBefore)&&void 0!==t||(e.renderBefore=i.firstChild),i}update(t){const e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Dt=((t,e,i)=>{var n,o;const r=null!==(n=null==i?void 0:i.renderBefore)&&void 0!==n?n:e;let a=r._$litPart$;if(void 0===a){const t=null!==(o=null==i?void 0:i.renderBefore)&&void 0!==o?o:null;r._$litPart$=a=new q(e.insertBefore(A(),t),t,void 0,null!=i?i:{})}return a._$AI(t),a})(e,this.renderRoot,this.renderOptions)}connectedCallback(){var t;super.connectedCallback(),null===(t=this._$Dt)||void 0===t||t.setConnected(!0)}disconnectedCallback(){var t;super.disconnectedCallback(),null===(t=this._$Dt)||void 0===t||t.setConnected(!1)}render(){return R}}ot.finalized=!0,ot._$litElement$=!0,null===(it=globalThis.litElementHydrateSupport)||void 0===it||it.call(globalThis,{LitElement:ot});const rt=globalThis.litElementPolyfillSupport;null==rt||rt({LitElement:ot}),(null!==(nt=globalThis.litElementVersions)&&void 0!==nt?nt:globalThis.litElementVersions=[]).push("3.2.0"); /** * @license * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause */ -const Dt=t=>e=>"function"==typeof e?((t,e)=>(window.customElements.define(t,e),e))(t,e):((t,e)=>{const{kind:i,elements:n}=e;return{kind:i,elements:n,finisher(e){window.customElements.define(t,e)}}})(t,e) +const at=t=>e=>"function"==typeof e?((t,e)=>(window.customElements.define(t,e),e))(t,e):((t,e)=>{const{kind:i,elements:n}=e;return{kind:i,elements:n,finisher(e){window.customElements.define(t,e)}}})(t,e) /** * @license * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause - */,Lt=(t,e)=>"method"===e.kind&&e.descriptor&&!("value"in e.descriptor)?{...e,finisher(i){i.createProperty(e.key,t)}}:{kind:"field",key:Symbol(),placement:"own",descriptor:{},originalKey:e.key,initializer(){"function"==typeof e.initializer&&(this[e.key]=e.initializer.call(this))},finisher(i){i.createProperty(e.key,t)}};function zt(t){return(e,i)=>void 0!==i?((t,e,i)=>{e.constructor.createProperty(i,t)})(t,e,i):Lt(t,e) + */,lt=(t,e)=>"method"===e.kind&&e.descriptor&&!("value"in e.descriptor)?{...e,finisher(i){i.createProperty(e.key,t)}}:{kind:"field",key:Symbol(),placement:"own",descriptor:{},originalKey:e.key,initializer(){"function"==typeof e.initializer&&(this[e.key]=e.initializer.call(this))},finisher(i){i.createProperty(e.key,t)}};function st(t){return(e,i)=>void 0!==i?((t,e,i)=>{e.constructor.createProperty(i,t)})(t,e,i):lt(t,e) /** * @license * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause - */}function jt(t){return zt({...t,state:!0})} + */}function ct(t){return st({...t,state:!0})} /** * @license * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause - */const Nt=({finisher:t,descriptor:e})=>(i,n)=>{var o;if(void 0===n){const n=null!==(o=i.originalKey)&&void 0!==o?o:i.key,r=null!=e?{kind:"method",placement:"prototype",key:n,descriptor:e(i.key)}:{...i,key:n};return null!=t&&(r.finisher=function(e){t(e,n)}),r}{const o=i.constructor;void 0!==e&&Object.defineProperty(i,n,e(n)),null==t||t(o,n)}} + */const dt=({finisher:t,descriptor:e})=>(i,n)=>{var o;if(void 0===n){const n=null!==(o=i.originalKey)&&void 0!==o?o:i.key,r=null!=e?{kind:"method",placement:"prototype",key:n,descriptor:e(i.key)}:{...i,key:n};return null!=t&&(r.finisher=function(e){t(e,n)}),r}{const o=i.constructor;void 0!==e&&Object.defineProperty(i,n,e(n)),null==t||t(o,n)}} /** * @license * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause - */;function Rt(t){return Nt({finisher:(e,i)=>{Object.assign(e.prototype[i],t)}})} + */;function ut(t){return dt({finisher:(e,i)=>{Object.assign(e.prototype[i],t)}})} /** * @license * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause - */function Pt(t,e){return Nt({descriptor:i=>{const n={get(){var e,i;return null!==(i=null===(e=this.renderRoot)||void 0===e?void 0:e.querySelector(t))&&void 0!==i?i:null},enumerable:!0,configurable:!0};if(e){const e="symbol"==typeof i?Symbol():"__"+i;n.get=function(){var i,n;return void 0===this[e]&&(this[e]=null!==(n=null===(i=this.renderRoot)||void 0===i?void 0:i.querySelector(t))&&void 0!==n?n:null),this[e]}}return n}})} + */function ht(t,e){return dt({descriptor:i=>{const n={get(){var e,i;return null!==(i=null===(e=this.renderRoot)||void 0===e?void 0:e.querySelector(t))&&void 0!==i?i:null},enumerable:!0,configurable:!0};if(e){const e="symbol"==typeof i?Symbol():"__"+i;n.get=function(){var i,n;return void 0===this[e]&&(this[e]=null!==(n=null===(i=this.renderRoot)||void 0===i?void 0:i.querySelector(t))&&void 0!==n?n:null),this[e]}}return n}})} /** * @license * Copyright 2021 Google LLC * SPDX-License-Identifier: BSD-3-Clause - */var Ft;null===(Ft=window.HTMLSlotElement)||void 0===Ft||Ft.prototype.assignedElements;const Vt=["toggle","more-info","navigate","url","call-service","none"];let Bt=class extends Ot{constructor(){super(...arguments),this.label="",this.configValue=""}_actionChanged(t){const e=t.detail.value;this.dispatchEvent(new CustomEvent("value-changed",{detail:{value:e}}))}render(){return ut` + */var mt;null===(mt=window.HTMLSlotElement)||void 0===mt||mt.prototype.assignedElements;const pt=["closed","locked","off"];var ft=Number.isNaN||function(t){return"number"==typeof t&&t!=t};function gt(t,e){if(t.length!==e.length)return!1;for(var i=0;inew Intl.DateTimeFormat(t.language,{weekday:"long",month:"long",day:"numeric"})));const vt=(t,e)=>bt(e).format(t),bt=_t((t=>new Intl.DateTimeFormat(t.language,{year:"numeric",month:"long",day:"numeric"})));var yt,xt;_t((t=>new Intl.DateTimeFormat(t.language,{year:"numeric",month:"numeric",day:"numeric"}))),_t((t=>new Intl.DateTimeFormat(t.language,{day:"numeric",month:"short"}))),_t((t=>new Intl.DateTimeFormat(t.language,{month:"long",year:"numeric"}))),_t((t=>new Intl.DateTimeFormat(t.language,{month:"long"}))),_t((t=>new Intl.DateTimeFormat(t.language,{year:"numeric"}))),function(t){t.language="language",t.system="system",t.comma_decimal="comma_decimal",t.decimal_comma="decimal_comma",t.space_comma="space_comma",t.none="none"}(yt||(yt={})),function(t){t.language="language",t.system="system",t.am_pm="12",t.twenty_four="24"}(xt||(xt={}));const wt=_t((t=>{if(t.time_format===xt.language||t.time_format===xt.system){const e=t.time_format===xt.language?t.language:void 0,i=(new Date).toLocaleString(e);return i.includes("AM")||i.includes("PM")}return t.time_format===xt.am_pm})),kt=(t,e)=>Ct(e).format(t),Ct=_t((t=>new Intl.DateTimeFormat("en"!==t.language||wt(t)?t.language:"en-u-hc-h23",{year:"numeric",month:"long",day:"numeric",hour:wt(t)?"numeric":"2-digit",minute:"2-digit",hour12:wt(t)})));_t((t=>new Intl.DateTimeFormat("en"!==t.language||wt(t)?t.language:"en-u-hc-h23",{year:"numeric",month:"long",day:"numeric",hour:wt(t)?"numeric":"2-digit",minute:"2-digit",second:"2-digit",hour12:wt(t)}))),_t((t=>new Intl.DateTimeFormat("en"!==t.language||wt(t)?t.language:"en-u-hc-h23",{year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"2-digit",hour12:wt(t)})));const $t=(t,e)=>Et(e).format(t),Et=_t((t=>new Intl.DateTimeFormat("en"!==t.language||wt(t)?t.language:"en-u-hc-h23",{hour:"numeric",minute:"2-digit",hour12:wt(t)})));_t((t=>new Intl.DateTimeFormat("en"!==t.language||wt(t)?t.language:"en-u-hc-h23",{hour:wt(t)?"numeric":"2-digit",minute:"2-digit",second:"2-digit",hour12:wt(t)}))),_t((t=>new Intl.DateTimeFormat("en"!==t.language||wt(t)?t.language:"en-u-hc-h23",{weekday:"long",hour:wt(t)?"numeric":"2-digit",minute:"2-digit",hour12:wt(t)})));const At=(t,e,i,n)=>{n=n||{},i=null==i?{}:i;const o=new Event(e,{bubbles:void 0===n.bubbles||n.bubbles,cancelable:Boolean(n.cancelable),composed:void 0===n.composed||n.composed});return o.detail=i,t.dispatchEvent(o),o},St="ha-main-window"===window.name?window:"ha-main-window"===parent.name?parent:top,It=t=>t.substr(0,t.indexOf(".")),Tt="unavailable",zt="unknown",Ot="off",Mt=[Tt,zt,Ot];function Lt(t){const e=It(t.entity_id),i=t.state;if(["button","input_button","scene"].includes(e))return i!==Tt;if(Mt.includes(i))return!1;switch(e){case"cover":return!["closed","closing"].includes(i);case"device_tracker":case"person":return"not_home"!==i;case"media_player":return"standby"!==i;case"vacuum":return!["idle","docked","paused"].includes(i);case"plant":return"problem"===i;default:return!0}}function Dt(t){return t.state!==Tt}function jt(t){return t.state===Ot}function Pt(t){return t.attributes.entity_picture_local||t.attributes.entity_picture}const Nt=(t,e)=>0!=(t.attributes.supported_features&e),Vt=t=>(t=>Nt(t,4)&&"number"==typeof t.attributes.in_progress)(t)||!!t.attributes.in_progress,Rt=(t,e=2)=>Math.round(t*10**e)/10**e,Ft=t=>!!t.unit_of_measurement||!!t.state_class,Bt=(t,e,i)=>{const n=e?(t=>{switch(t.number_format){case yt.comma_decimal:return["en-US","en"];case yt.decimal_comma:return["de","es","it"];case yt.space_comma:return["fr","sv","cs"];case yt.system:return;default:return t.language}})(e):void 0;if(Number.isNaN=Number.isNaN||function t(e){return"number"==typeof e&&t(e)},(null==e?void 0:e.number_format)!==yt.none&&!Number.isNaN(Number(t))&&Intl)try{return new Intl.NumberFormat(n,Ut(t,i)).format(Number(t))}catch(e){return console.error(e),new Intl.NumberFormat(void 0,Ut(t,i)).format(Number(t))}return"string"==typeof t?t:`${Rt(t,null==i?void 0:i.maximumFractionDigits).toString()}${"currency"===(null==i?void 0:i.style)?` ${i.currency}`:""}`},Ut=(t,e)=>{const i=Object.assign({maximumFractionDigits:2},e);if("string"!=typeof t)return i;if(!e||!e.minimumFractionDigits&&!e.maximumFractionDigits){const e=t.indexOf(".")>-1?t.split(".")[1].length:0;i.minimumFractionDigits=e,i.maximumFractionDigits=e}return i},Ht=(t,e,i,n)=>{var o;const r=void 0!==n?n:e.state;if(r===zt||r===Tt)return t(`state.default.${r}`);if((t=>Ft(t.attributes))(e)){if("monetary"===e.attributes.device_class)try{return Bt(r,i,{style:"currency",currency:e.attributes.unit_of_measurement})}catch(t){}return`${Bt(r,i)}${e.attributes.unit_of_measurement?" "+e.attributes.unit_of_measurement:""}`}const a=(t=>It(t.entity_id))(e);if("input_datetime"===a){if(void 0===n){let t;return e.attributes.has_date&&e.attributes.has_time?(t=new Date(e.attributes.year,e.attributes.month-1,e.attributes.day,e.attributes.hour,e.attributes.minute),kt(t,i)):e.attributes.has_date?(t=new Date(e.attributes.year,e.attributes.month-1,e.attributes.day),vt(t,i)):e.attributes.has_time?(t=new Date,t.setHours(e.attributes.hour,e.attributes.minute),$t(t,i)):e.state}try{const t=n.split(" ");if(2===t.length)return kt(new Date(t.join("T")),i);if(1===t.length){if(n.includes("-"))return vt(new Date(`${n}T00:00`),i);if(n.includes(":")){const t=new Date;return $t(new Date(`${t.toISOString().split("T")[0]}T${n}`),i)}}return n}catch(t){return n}}if("humidifier"===a&&"on"===r&&e.attributes.humidity)return`${e.attributes.humidity} %`;if("counter"===a||"number"===a||"input_number"===a)return Bt(r,i);if("button"===a||"input_button"===a||"scene"===a||"sensor"===a&&"timestamp"===e.attributes.device_class)try{return kt(new Date(r),i)}catch(t){return r}return"update"===a?"on"===r?Vt(e)?Nt(e,4)?t("ui.card.update.installing_with_progress",{progress:e.attributes.in_progress}):t("ui.card.update.installing"):e.attributes.latest_version:e.attributes.skipped_version===e.attributes.latest_version?null!==(o=e.attributes.latest_version)&&void 0!==o?o:t("state.default.unavailable"):t("ui.card.update.up_to_date"):e.attributes.device_class&&t(`component.${a}.state.${e.attributes.device_class}.${r}`)||t(`component.${a}.state._.${r}`)||r};class Yt extends TypeError{constructor(t,e){let i;const{message:n,...o}=t,{path:r}=t;super(0===r.length?n:"At path: "+r.join(".")+" -- "+n),this.value=void 0,this.key=void 0,this.type=void 0,this.refinement=void 0,this.path=void 0,this.branch=void 0,this.failures=void 0,Object.assign(this,o),this.name=this.constructor.name,this.failures=()=>{var n;return null!=(n=i)?n:i=[t,...e()]}}}function Xt(t){return"object"==typeof t&&null!=t}function Wt(t){return"string"==typeof t?JSON.stringify(t):""+t}function qt(t,e,i,n){if(!0===t)return;!1===t?t={}:"string"==typeof t&&(t={message:t});const{path:o,branch:r}=e,{type:a}=i,{refinement:l,message:s="Expected a value of type `"+a+"`"+(l?" with refinement `"+l+"`":"")+", but received: `"+Wt(n)+"`"}=t;return{value:n,type:a,refinement:l,key:o[o.length-1],path:o,branch:r,...t,message:s}}function*Kt(t,e,i,n){(function(t){return Xt(t)&&"function"==typeof t[Symbol.iterator]})(t)||(t=[t]);for(const o of t){const t=qt(o,e,i,n);t&&(yield t)}}function*Gt(t,e,i={}){const{path:n=[],branch:o=[t],coerce:r=!1,mask:a=!1}=i,l={path:n,branch:o};if(r&&(t=e.coercer(t,l),a&&"type"!==e.type&&Xt(e.schema)&&Xt(t)&&!Array.isArray(t)))for(const i in t)void 0===e.schema[i]&&delete t[i];let s=!0;for(const i of e.validator(t,l))s=!1,yield[i,void 0];for(let[i,c,d]of e.entries(t,l)){const e=Gt(c,d,{path:void 0===i?n:[...n,i],branch:void 0===i?o:[...o,c],coerce:r,mask:a});for(const n of e)n[0]?(s=!1,yield[n[0],void 0]):r&&(c=n[1],void 0===i?t=c:t instanceof Map?t.set(i,c):t instanceof Set?t.add(c):Xt(t)&&(t[i]=c))}if(s)for(const i of e.refiner(t,l))s=!1,yield[i,void 0];s&&(yield[void 0,t])}class Zt{constructor(t){this.TYPE=void 0,this.type=void 0,this.schema=void 0,this.coercer=void 0,this.validator=void 0,this.refiner=void 0,this.entries=void 0;const{type:e,schema:i,validator:n,refiner:o,coercer:r=(t=>t),entries:a=function*(){}}=t;this.type=e,this.schema=i,this.entries=a,this.coercer=r,this.validator=n?(t,e)=>Kt(n(t,e),e,this,t):()=>[],this.refiner=o?(t,e)=>Kt(o(t,e),e,this,t):()=>[]}assert(t){return Jt(t,this)}create(t){return function(t,e){const i=Qt(t,e,{coerce:!0});if(i[0])throw i[0];return i[1]}(t,this)}is(t){return function(t,e){return!Qt(t,e)[0]}(t,this)}mask(t){return function(t,e){const i=Qt(t,e,{coerce:!0,mask:!0});if(i[0])throw i[0];return i[1]}(t,this)}validate(t,e={}){return Qt(t,this,e)}}function Jt(t,e){const i=Qt(t,e);if(i[0])throw i[0]}function Qt(t,e,i={}){const n=Gt(t,e,i),o=function(t){const{done:e,value:i}=t.next();return e?void 0:i}(n);if(o[0]){const t=new Yt(o[0],(function*(){for(const t of n)t[0]&&(yield t[0])}));return[t,void 0]}return[void 0,o[1]]}function te(...t){const e="type"===t[0].type,i=t.map((t=>t.schema)),n=Object.assign({},...i);return e?he(n):ce(n)}function ee(t,e){return new Zt({type:t,schema:null,validator:e})}function ie(t){return new Zt({type:"dynamic",schema:null,*entries(e,i){const n=t(e,i);yield*n.entries(e,i)},validator:(e,i)=>t(e,i).validator(e,i),coercer:(e,i)=>t(e,i).coercer(e,i),refiner:(e,i)=>t(e,i).refiner(e,i)})}function ne(){return ee("any",(()=>!0))}function oe(t){return new Zt({type:"array",schema:t,*entries(e){if(t&&Array.isArray(e))for(const[i,n]of e.entries())yield[i,n,t]},coercer:t=>Array.isArray(t)?t.slice():t,validator:t=>Array.isArray(t)||"Expected an array value, but received: "+Wt(t)})}function re(){return ee("boolean",(t=>"boolean"==typeof t))}function ae(t){const e={},i=t.map((t=>Wt(t))).join();for(const i of t)e[i]=i;return new Zt({type:"enums",schema:e,validator:e=>t.includes(e)||"Expected one of `"+i+"`, but received: "+Wt(e)})}function le(t){const e=Wt(t),i=typeof t;return new Zt({type:"literal",schema:"string"===i||"number"===i||"boolean"===i?t:null,validator:i=>i===t||"Expected the literal `"+e+"`, but received: "+Wt(i)})}function se(){return ee("number",(t=>"number"==typeof t&&!isNaN(t)||"Expected a number, but received: "+Wt(t)))}function ce(t){const e=t?Object.keys(t):[],i=ee("never",(()=>!1));return new Zt({type:"object",schema:t||null,*entries(n){if(t&&Xt(n)){const o=new Set(Object.keys(n));for(const i of e)o.delete(i),yield[i,n[i],t[i]];for(const t of o)yield[t,n[t],i]}},validator:t=>Xt(t)||"Expected an object, but received: "+Wt(t),coercer:t=>Xt(t)?{...t}:t})}function de(t){return new Zt({...t,validator:(e,i)=>void 0===e||t.validator(e,i),refiner:(e,i)=>void 0===e||t.refiner(e,i)})}function ue(){return ee("string",(t=>"string"==typeof t||"Expected a string, but received: "+Wt(t)))}function he(t){const e=Object.keys(t);return new Zt({type:"type",schema:t,*entries(i){if(Xt(i))for(const n of e)yield[n,i[n],t[n]]},validator:t=>Xt(t)||"Expected an object, but received: "+Wt(t)})}function me(t){const e=t.map((t=>t.type)).join(" | ");return new Zt({type:"union",schema:null,coercer(e,i){const n=t.find((t=>{const[i]=t.validate(e,{coerce:!0});return!i}))||ee("unknown",(()=>!0));return n.coercer(e,i)},validator(i,n){const o=[];for(const e of t){const[...t]=Gt(i,e,n),[r]=t;if(!r[0])return[];for(const[e]of t)e&&o.push(e)}return["Expected the value to satisfy a union of `"+e+"`, but received: "+Wt(i),...o]}})}function pe(t){const e=t.language||"en";return t.translationMetadata.translations[e]&&t.translationMetadata.translations[e].isRTL||!1}const fe=(t,e,i=!1)=>{let n;const o=(...o)=>{const r=i&&!n;clearTimeout(n),n=window.setTimeout((()=>{n=void 0,i||t(...o)}),e),r&&t(...o)};return o.cancel=()=>{clearTimeout(n)},o},ge=(t,e)=>{if(t===e)return!0;if(t&&e&&"object"==typeof t&&"object"==typeof e){if(t.constructor!==e.constructor)return!1;let i,n;if(Array.isArray(t)){if(n=t.length,n!==e.length)return!1;for(i=n;0!=i--;)if(!ge(t[i],e[i]))return!1;return!0}if(t instanceof Map&&e instanceof Map){if(t.size!==e.size)return!1;for(i of t.entries())if(!e.has(i[0]))return!1;for(i of t.entries())if(!ge(i[1],e.get(i[0])))return!1;return!0}if(t instanceof Set&&e instanceof Set){if(t.size!==e.size)return!1;for(i of t.entries())if(!e.has(i[0]))return!1;return!0}if(ArrayBuffer.isView(t)&&ArrayBuffer.isView(e)){if(n=t.length,n!==e.length)return!1;for(i=n;0!=i--;)if(t[i]!==e[i])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 o=Object.keys(t);if(n=o.length,n!==Object.keys(e).length)return!1;for(i=n;0!=i--;)if(!Object.prototype.hasOwnProperty.call(e,o[i]))return!1;for(i=n;0!=i--;){const n=o[i];if(!ge(t[n],e[n]))return!1}return!0}return t!=t&&e!=e},_e=()=>new Promise((t=>{var e;e=t,requestAnimationFrame((()=>setTimeout(e,0)))})),ve={auto:1,heat_cool:2,heat:3,cool:4,dry:5,fan_only:6,off:7},be=(t,e)=>ve[t]-ve[e];const ye=t=>{At(window,"haptic",t)},xe=["hs","xy","rgb","rgbw","rgbww"],we=[...xe,"color_temp","brightness"],ke=(t,e,i)=>t.subscribeMessage((t=>e(t)),Object.assign({type:"render_template"},i)) +/** + * @license + * Copyright 2017 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */,Ce=1,$e=3,Ee=4,Ae=t=>(...e)=>({_$litDirective$:t,values:e});class Se{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,e,i){this._$Ct=t,this._$AM=e,this._$Ci=i}_$AS(t,e){return this.update(t,e)}update(t,e){return this.render(...e)}}const Ie=(t,e)=>{const i=(()=>{const t=document.body;if(t.querySelector("action-handler"))return t.querySelector("action-handler");const e=document.createElement("action-handler");return t.appendChild(e),e})();i&&i.bind(t,e)},Te=Ae(class extends Se{update(t,[e]){return Ie(t.element,e),R}render(t){}}),ze=(t,e)=>((t,e,i=!0)=>{const n=It(e),o="group"===n?"homeassistant":n;let r;switch(n){case"lock":r=i?"unlock":"lock";break;case"cover":r=i?"open_cover":"close_cover";break;case"button":case"input_button":r="press";break;case"scene":r="turn_on";break;default:r=i?"turn_on":"turn_off"}return t.callService(o,r,{entity_id:e})})(t,e,pt.includes(t.states[e].state)),Oe=async(t,e,i,n)=>{var o;let r;if("double_tap"===n&&i.double_tap_action?r=i.double_tap_action:"hold"===n&&i.hold_action?r=i.hold_action:"tap"===n&&i.tap_action&&(r=i.tap_action),r||(r={action:"more-info"}),r.confirmation&&(!r.confirmation.exemptions||!r.confirmation.exemptions.some((t=>t.user===e.user.id)))){let t;if(ye("warning"),"call-service"===r.action){const[i,n]=r.service.split(".",2),o=e.services;if(i in o&&n in o[i]){t=`${((t,e,i)=>t(`component.${e}.title`)||(null==i?void 0:i.name)||e)(await e.loadBackendTranslation("title"),i)}: ${o[i][n].name||n}`}}if(!confirm(r.confirmation.text||e.localize("ui.panel.lovelace.cards.actions.action_confirmation","action",t||e.localize("ui.panel.lovelace.editor.action-editor.actions."+r.action)||r.action)))return}switch(r.action){case"more-info":i.entity||i.camera_image?At(t,"hass-more-info",{entityId:i.entity?i.entity:i.camera_image}):(Me(t,{message:e.localize("ui.panel.lovelace.cards.actions.no_entity_more_info")}),ye("failure"));break;case"navigate":r.navigation_path?((t,e)=>{var i;const n=(null==e?void 0:e.replace)||!1;n?St.history.replaceState((null===(i=St.history.state)||void 0===i?void 0:i.root)?{root:!0}:null,"",t):St.history.pushState(null,"",t),At(St,"location-changed",{replace:n})})(r.navigation_path):(Me(t,{message:e.localize("ui.panel.lovelace.cards.actions.no_navigation_path")}),ye("failure"));break;case"url":r.url_path?window.open(r.url_path):(Me(t,{message:e.localize("ui.panel.lovelace.cards.actions.no_url")}),ye("failure"));break;case"toggle":i.entity?(ze(e,i.entity),ye("light")):(Me(t,{message:e.localize("ui.panel.lovelace.cards.actions.no_entity_toggle")}),ye("failure"));break;case"call-service":{if(!r.service)return Me(t,{message:e.localize("ui.panel.lovelace.cards.actions.no_service")}),void ye("failure");const[i,n]=r.service.split(".",2);e.callService(i,n,null!==(o=r.data)&&void 0!==o?o:r.service_data,r.target),ye("light");break}case"fire-dom-event":At(t,"ll-custom",r)}},Me=(t,e)=>At(t,"hass-notification",e);function Le(t){return void 0!==t&&"none"!==t.action}const De=ce({user:ue()}),je=me([re(),ce({text:de(ue()),excemptions:de(oe(De))})]),Pe=ce({action:le("url"),url_path:ue(),confirmation:de(je)}),Ne=ce({action:le("call-service"),service:ue(),service_data:de(ce()),data:de(ce()),target:de(ce({entity_id:de(me([ue(),oe(ue())])),device_id:de(me([ue(),oe(ue())])),area_id:de(me([ue(),oe(ue())]))})),confirmation:de(je)}),Ve=ce({action:le("navigate"),navigation_path:ue(),confirmation:de(je)}),Re=he({action:le("fire-dom-event")}),Fe=ce({action:ae(["none","toggle","more-info","call-service","url","navigate"]),confirmation:de(je)}),Be=ie((t=>{if(t&&"object"==typeof t&&"action"in t)switch(t.action){case"call-service":return Ne;case"fire-dom-event":return Re;case"navigate":return Ve;case"url":return Pe}return Fe})),Ue=d` + #sortable a:nth-of-type(2n) paper-icon-item { + animation-name: keyframes1; + animation-iteration-count: infinite; + transform-origin: 50% 10%; + animation-delay: -0.75s; + animation-duration: 0.25s; + } + + #sortable a:nth-of-type(2n-1) paper-icon-item { + animation-name: keyframes2; + animation-iteration-count: infinite; + animation-direction: alternate; + transform-origin: 30% 5%; + animation-delay: -0.5s; + animation-duration: 0.33s; + } + + #sortable a { + height: 48px; + display: flex; + } + + #sortable { + outline: none; + display: block !important; + } + + .hidden-panel { + display: flex !important; + } + + .sortable-fallback { + display: none; + } + + .sortable-ghost { + opacity: 0.4; + } + + .sortable-fallback { + opacity: 0; + } + + @keyframes keyframes1 { + 0% { + transform: rotate(-1deg); + animation-timing-function: ease-in; + } + + 50% { + transform: rotate(1.5deg); + animation-timing-function: ease-out; + } + } + + @keyframes keyframes2 { + 0% { + transform: rotate(1deg); + animation-timing-function: ease-in; + } + + 50% { + transform: rotate(-1.5deg); + animation-timing-function: ease-out; + } + } + + .show-panel, + .hide-panel { + display: none; + position: absolute; + top: 0; + right: 4px; + --mdc-icon-button-size: 40px; + } + + :host([rtl]) .show-panel { + right: initial; + left: 4px; + } + + .hide-panel { + top: 4px; + right: 8px; + } + + :host([rtl]) .hide-panel { + right: initial; + left: 8px; + } + + :host([expanded]) .hide-panel { + display: block; + } + + :host([expanded]) .show-panel { + display: inline-flex; + } + + paper-icon-item.hidden-panel, + paper-icon-item.hidden-panel span, + paper-icon-item.hidden-panel ha-icon[slot="item-icon"] { + color: var(--secondary-text-color); + cursor: pointer; + } +`,He=(t,e,i,n)=>{const[o,r,a]=t.split(".",3);return Number(o)>e||Number(o)===e&&(void 0===n?Number(r)>=i:Number(r)>i)||void 0!==n&&Number(o)===e&&Number(r)===i&&Number(a)>=n},Ye=["toggle","more-info","navigate","url","call-service","none"];let Xe=class extends ot{constructor(){super(...arguments),this.label="",this.configValue=""}_actionChanged(t){const e=t.detail.value;this.dispatchEvent(new CustomEvent("value-changed",{detail:{value:e}}))}render(){return N` - `}};n([zt()],Bt.prototype,"label",void 0),n([zt()],Bt.prototype,"value",void 0),n([zt()],Bt.prototype,"configValue",void 0),n([zt()],Bt.prototype,"actions",void 0),n([zt()],Bt.prototype,"hass",void 0),Bt=n([Dt("mushroom-action-picker")],Bt);let Ut=class extends Ot{render(){return ut` + `}};n([st()],Xe.prototype,"label",void 0),n([st()],Xe.prototype,"value",void 0),n([st()],Xe.prototype,"configValue",void 0),n([st()],Xe.prototype,"actions",void 0),n([st()],Xe.prototype,"hass",void 0),Xe=n([at("mushroom-action-picker")],Xe);let We=class extends ot{render(){return N` e=>"function"==typeof e?((t,e)=>(window.customElements.define(t,e),e .value=${this.value} @value-changed=${this._valueChanged} > - `}_valueChanged(t){w(this,"value-changed",{value:t.detail.value||void 0})}};n([zt()],Ut.prototype,"hass",void 0),n([zt()],Ut.prototype,"selector",void 0),n([zt()],Ut.prototype,"value",void 0),n([zt()],Ut.prototype,"label",void 0),Ut=n([Dt("ha-selector-mush-action")],Ut); -/** - * @license - * Copyright 2017 Google LLC - * SPDX-License-Identifier: BSD-3-Clause - */ -const Ht=1,Yt=3,Xt=4,qt=t=>(...e)=>({_$litDirective$:t,values:e});class Wt{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,e,i){this._$Ct=t,this._$AM=e,this._$Ci=i}_$AS(t,e){return this.update(t,e)}update(t,e){return this.render(...e)}} + `}_valueChanged(t){At(this,"value-changed",{value:t.detail.value||void 0})}};n([st()],We.prototype,"hass",void 0),n([st()],We.prototype,"selector",void 0),n([st()],We.prototype,"value",void 0),n([st()],We.prototype,"label",void 0),We=n([at("ha-selector-mush-action")],We);var qe={form:{color_picker:{values:{default:"اللون الإفتراضي"}},info_picker:{values:{default:"المعلومات الافتراضية",name:"الإسم",state:"الحالة","last-changed":"آخر تغيير","last-updated":"آخر تحديث",none:"لا شئ"}},icon_type_picker:{values:{default:"النوع افتراضي",icon:"أيقونة","entity-picture":"صورة الكيان",none:"لا شئ"}},layout_picker:{values:{default:"تخطيط افتراضي",vertical:"تخطيط رأسي",horizontal:"تخطيط أفقي"}},alignment_picker:{values:{default:"المحاذاة الافتراضية",start:"بداية",end:"نهاية",center:"توسيط",justify:"مساواة"}}},card:{generic:{icon_color:"لون الأيقونة",layout:"التخطيط",fill_container:"ملئ الحاوية",primary_info:"المعلومات الأساسية",secondary_info:"المعلومات الفرعية",icon_type:"نوع الأيقونة",content_info:"المحتوى",use_entity_picture:"استخدم صورة الكيان؟",collapsible_controls:"تصغير عناصر التحكم عند الإيقاف",icon_animation:"تحريك الرمز عندما يكون نشطًا؟"},light:{show_brightness_control:"التحكم في السطوع؟",use_light_color:"استخدم لون فاتح",show_color_temp_control:"التحكم في حرارة اللون؟",show_color_control:"التحكم في اللون؟",incompatible_controls:"قد لا يتم عرض بعض عناصر التحكم إذا كان الضوء الخاص بك لا يدعم الميزة."},fan:{show_percentage_control:"التحكم في النسبة المئوية؟",show_oscillate_control:"التحكم في التذبذب؟"},cover:{show_buttons_control:"أزرار التحكم؟",show_position_control:"التحكم في الموقع؟"},alarm_control_panel:{show_keypad:"إظهار لوحة المفاتيح"},template:{primary:"المعلومات الأساسية",secondary:"المعلومات الثانوية",multiline_secondary:"متعدد الأسطر الثانوية؟",entity_extra:"تستخدم في القوالب والإجراءات",content:"المحتوى",badge_icon:"أيقونة الشارة",badge_color:"لون الشارة",picture:"صورة (ستحل محل الأيقونة)"},title:{title:"العنوان",subtitle:"العنوان الفرعي"},chips:{alignment:"محاذاة"},weather:{show_conditions:"الأحوال الجوية؟",show_temperature:"الطقس؟"},update:{show_buttons_control:"أزرار التحكم؟"},vacuum:{commands:"الاوامر"},"media-player":{use_media_info:"استخدم معلومات الوسائط",use_media_artwork:"استخدم صورة الوسائط",show_volume_level:"إظهار مستوى الصوت",media_controls:"التحكم في الوسائط",media_controls_list:{on_off:"تشغيل/إيقاف",shuffle:"خلط",previous:"السابق",play_pause_stop:"تشغيل/إيقاف مؤقت/إيقاف",next:"التالي",repeat:"وضع التكرار"},volume_controls:"التحكم في الصوت",volume_controls_list:{volume_buttons:"أزرار الصوت",volume_set:"مستوى الصوت",volume_mute:"كتم"}},lock:{lock:"مقفل",unlock:"إلغاء قفل",open:"مفتوح"},humidifier:{show_target_humidity_control:"التحكم في الرطوبة؟?"},climate:{show_temperature_control:"التحكم في درجة الحرارة؟",hvac_modes:"أوضاع HVAC"}},chip:{sub_element_editor:{title:"محرر الرقاقة"},conditional:{chip:"رقاقة"},"chip-picker":{chips:"رقاقات",add:"أضف رقاقة",edit:"تعديل",clear:"مسح",select:"اختر الرقاقة",types:{action:"إجراء","alarm-control-panel":"تنبيه",back:"رجوع",conditional:"مشروط",entity:"الكيان",light:"Light",menu:"القائمة",template:"قالب",weather:"الطقس"}}}},Ke={editor:qe},Ge={form:{color_picker:{values:{default:"Výchozí barva"}},info_picker:{values:{default:"Základní informace",name:"Název",state:"Stav","last-changed":"Poslední změna","last-updated":"Poslední update",none:"Nic"}},icon_type_picker:{values:{default:"Výchozí typ",icon:"Ikona","entity-picture":"Ikona entity",none:"Nic"}},layout_picker:{values:{default:"Výchozí rozložení",vertical:"Svislé rozložení",horizontal:"Vodorovné rozložení"}},alignment_picker:{values:{default:"Výchozí zarovnání",start:"Začátek",end:"Konec",center:"Na střed",justify:"Důvod"}}},card:{generic:{icon_color:"Barva ikony",layout:"Rozložení",fill_container:"Vyplnit prostor",primary_info:"Základní informace",secondary_info:"Sekundární informace",icon_type:"Typ ikony",content_info:"Obsah",use_entity_picture:"Použít ikonu entity?",collapsible_controls:"Skrýt ovládací prvky pokud je VYP",icon_animation:"Animovaná ikona, pokud je aktivní?"},light:{show_brightness_control:"Ovládání jasu?",use_light_color:"Použít ovládání světla",show_color_temp_control:"Ovládání teploty světla?",show_color_control:"Ovládání baryv světla?",incompatible_controls:"Některé ovládací prvky se nemusí zobrazit, pokud vaše světlo tuto funkci nepodporuje."},fan:{show_percentage_control:"Ovládání v procentech?",show_oscillate_control:"Oscillate control?"},cover:{show_buttons_control:"Zobrazit ovládací tlačítka?",show_position_control:"Zobrazit ovládání polohy?"},alarm_control_panel:{show_keypad:"Zobrazit klávesnici"},template:{primary:"Základní informace",secondary:"Sekundární informace",multiline_secondary:"Víceřádková sekundární informace?",entity_extra:"Použito v šablonách a akcích",content:"Obsah",badge_icon:"Ikona odznaku",badge_color:"Barva odznaku",picture:"Obrázek (nahradí ikonu)"},title:{title:"Titulek",subtitle:"Popis"},chips:{alignment:"Zarovnání"},weather:{show_conditions:"Zobrazit podmínky?",show_temperature:"Zobrazit teplot?u"},update:{show_buttons_control:"Zobrazit ovládací tlačítka?"},vacuum:{commands:"Příkazy"},"media-player":{use_media_info:"Použít informace o médiích",use_media_artwork:"Použít ilustrace médií",show_volume_level:"Zobrazit úroveň hlasitosti",media_controls:"Ovládání médií",media_controls_list:{on_off:"Vyp / Zap",shuffle:"Zamíchat",previous:"Předchozí skladba",play_pause_stop:"hrát/pauza/zastavit",next:"Další skladba",repeat:"Opakovat"},volume_controls:"Ovládání hlasitosti",volume_controls_list:{volume_buttons:"Tlačítka hlasitosti",volume_set:"Úroveň hlasitosti",volume_mute:"Ztlumit"}},lock:{lock:"Zamčeno",unlock:"Odemčeno",open:"Otevřeno"},humidifier:{show_target_humidity_control:"Ovládání vlhkosti?"},climate:{show_temperature_control:"Ovládání teploty?",hvac_modes:"HVAC Mód"}},chip:{sub_element_editor:{title:"Editor tlačítek"},conditional:{chip:"Tlačítko"},"chip-picker":{chips:"Tlačítka",add:"Přidat tlačítko",edit:"Editovat",clear:"Vymazat",select:"Vybrat tlačítko",types:{action:"Akce","alarm-control-panel":"Alarm",back:"Zpět",conditional:"Podmínky",entity:"Entita",light:"Světlo",menu:"Menu",template:"Šablona",weather:"Počasí"}}}},Ze={editor:Ge},Je={form:{color_picker:{values:{default:"Standard farve"}},info_picker:{values:{default:"Standard information",name:"Navn",state:"Status","last-changed":"Sidst ændret","last-updated":"Sidst opdateret",none:"Ingen"}},icon_type_picker:{values:{default:"Standard type",icon:"Ikon","entity-picture":"Enheds billede",none:"Ingen"}},layout_picker:{values:{default:"Standard layout",vertical:"Vertikal layout",horizontal:"Horisontal layout"}},alignment_picker:{values:{default:"Standard justering",start:"Start",end:"Slut",center:"Centrer",justify:"Lige margener"}}},card:{generic:{icon_color:"Ikon farve",layout:"Layout",fill_container:"Fyld container",primary_info:"Primær information",secondary_info:"Sekundær information",icon_type:"Ikon type",content_info:"Indhold",use_entity_picture:"Brug enheds billede?",collapsible_controls:"Skjul kontroller når slukket",icon_animation:"Animér ikon når aktiv?"},light:{show_brightness_control:"Lysstyrkekontrol?",use_light_color:"Brug lysfarve",show_color_temp_control:"Temperatur farvekontrol?",show_color_control:"Farvekontrol?",incompatible_controls:"Nogle kontroller vises muligvis ikke, hvis dit lys ikke understøtter funktionen."},fan:{show_percentage_control:"Procentvis kontrol?",show_oscillate_control:"Oscillerende kontrol?"},cover:{show_buttons_control:"Betjeningsknapper?",show_position_control:"Positionskontrol?"},alarm_control_panel:{show_keypad:"Vis tastatur"},template:{primary:"Primær information",secondary:"Sekundær information",multiline_secondary:"Multi-linje skundær?",entity_extra:"Anvendes i skabelober og handlinger",content:"Indhold",badge_icon:"Badge ikon",badge_color:"Badge farve",picture:"Billede (erstatter ikonen)"},title:{title:"Titel",subtitle:"Undertitel"},chips:{alignment:"Justering"},weather:{show_conditions:"Forhold?",show_temperature:"Temperatur?"},update:{show_buttons_control:"Betjeningsknapper?"},vacuum:{commands:"Kommandoer"},"media-player":{use_media_info:"Brug medie info",use_media_artwork:"Brug mediebilleder",show_volume_level:"Vis volumen niveau",media_controls:"Medie kontrol",media_controls_list:{on_off:"Tænd/Sluk",shuffle:"Bland",previous:"Forrige nummer",play_pause_stop:"Afspil/Pause/Stop",next:"Næste nummer",repeat:"Gentagelsestilstand"},volume_controls:"Volumen kontrol",volume_controls_list:{volume_buttons:"Volumen knapper",volume_set:"Volumenniveau",volume_mute:"Lydløs"}},lock:{lock:"Lås",unlock:"Lås op",open:"Åben"},humidifier:{show_target_humidity_control:"Luftfugtigheds kontrol?"},climate:{show_temperature_control:"Temperatur kontrol?",hvac_modes:"HVAC-tilstande"}},chip:{sub_element_editor:{title:"Chip-editor"},conditional:{chip:"Chip"},"chip-picker":{chips:"Chips",add:"Tilføj chip",edit:"Rediger",clear:"Nulstil",select:"Vælg chip",types:{action:"Handling","alarm-control-panel":"Alarm",back:"Tilbage",conditional:"Betinget",entity:"Enhed",light:"Lys",menu:"Menu",template:"Skabelon",weather:"Vejr"}}}},Qe={editor:Je},ti={form:{color_picker:{values:{default:"Standardfarbe"}},info_picker:{values:{default:"Standard-Information",name:"Name",state:"Zustand","last-changed":"Letzte Änderung","last-updated":"Letzte Aktualisierung",none:"Keine"}},icon_type_picker:{values:{default:"Standard-Typ",icon:"Icon","entity-picture":"Entitätsbild",none:"Keines"}},layout_picker:{values:{default:"Standard-Layout",vertical:"Vertikales Layout",horizontal:"Horizontales Layout"}},alignment_picker:{values:{default:"Standard",start:"Anfang",end:"Ende",center:"Mitte",justify:"Ausrichten"}}},card:{generic:{icon_color:"Icon-Farbe",layout:"Layout",fill_container:"Container ausfüllen",primary_info:"Primäre Information",secondary_info:"Sekundäre Information",icon_type:"Icon-Typ",content_info:"Inhalt",use_entity_picture:"Entitätsbild verwenden?",collapsible_controls:"Schieberegler einklappen, wenn aus",icon_animation:"Icon animieren, wenn aktiv?"},light:{show_brightness_control:"Helligkeitsregelung?",use_light_color:"Farbsteuerung verwenden",show_color_temp_control:"Farbtemperatursteuerung?",show_color_control:"Farbsteuerung?",incompatible_controls:"Einige Steuerelemente werden möglicherweise nicht angezeigt, wenn Ihr Licht diese Funktion nicht unterstützt."},fan:{show_percentage_control:"Prozentuale Kontrolle?",show_oscillate_control:"Oszillationssteuerung?"},cover:{show_buttons_control:"Schaltflächensteuerung?",show_position_control:"Positionssteuerung?",show_tilt_position_control:"Winkelsteuerung?"},alarm_control_panel:{show_keypad:"Keypad anzeigen"},template:{primary:"Primäre Information",secondary:"Sekundäre Information",multiline_secondary:"Mehrzeilig sekundär?",entity_extra:"Wird in Vorlagen und Aktionen verwendet",content:"Inhalt",badge_icon:"Badge-Icon",badge_color:"Badge-Farbe",picture:"Bild (ersetzt das Icon)"},title:{title:"Titel",subtitle:"Untertitel"},chips:{alignment:"Ausrichtung"},weather:{show_conditions:"Bedingungen?",show_temperature:"Temperatur?"},update:{show_buttons_control:"Schaltflächensteuerung?"},vacuum:{commands:"Befehle",commands_list:{on_off:"An/Ausschalten"}},"media-player":{use_media_info:"Medieninfos verwenden",use_media_artwork:"Mediengrafik verwenden",show_volume_level:"Lautstärke-Level anzeigen",media_controls:"Mediensteuerung",media_controls_list:{on_off:"Ein/Aus",shuffle:"Zufällige Wiedergabe",previous:"Vorheriger Titel",play_pause_stop:"Play/Pause/Stop",next:"Nächster Titel",repeat:"Wiederholen"},volume_controls:"Lautstärkesteuerung",volume_controls_list:{volume_buttons:"Lautstärke-Buttons",volume_set:"Lautstärke-Level",volume_mute:"Stumm"}},lock:{lock:"Verriegeln",unlock:"Entriegeln",open:"Öffnen"},humidifier:{show_target_humidity_control:"Luftfeuchtigkeitssteuerung?"},climate:{show_temperature_control:"Temperatursteuerung?",hvac_modes:"HVAC-Modi"}},chip:{sub_element_editor:{title:"Chip Editor"},conditional:{chip:"Chip"},"chip-picker":{chips:"Chips",add:"Chip hinzufügen",edit:"Editieren",clear:"Löschen",select:"Chip auswählen",types:{action:"Aktion","alarm-control-panel":"Alarm",back:"Zurück",conditional:"Bedingung",entity:"Entität",light:"Licht",menu:"Menü",template:"Vorlage",weather:"Wetter"}}}},ei={editor:ti},ii={form:{color_picker:{values:{default:"Προεπιλεγμένο χρώμα"}},info_picker:{values:{default:"Προεπιλεγμένες πληροφορίες",name:"Όνομα",state:"Κατάσταση","last-changed":"Τελευταία αλλαγή","last-updated":"Τελευταία ενημέρωση",none:"Τίποτα"}},layout_picker:{values:{default:"Προεπιλεγμένη διάταξη",vertical:"Κάθετη διάταξη",horizontal:"Οριζόντια διάταξη"}},alignment_picker:{values:{default:"Προεπιλεγμένη στοίχιση",start:"Στοίχιση αριστερά",end:"Στοίχιση δεξιά",center:"Στοίχιση στο κέντρο",justify:"Πλήρης στοίχιση"}}},card:{generic:{icon_color:"Χρώμα εικονιδίου",layout:"Διάταξη",primary_info:"Πρωτεύουσες πληροφορίες",secondary_info:"Δευτερεύουσες πληροφορίες",content_info:"Περιεχόμενο",use_entity_picture:"Χρήση εικόνας οντότητας;",icon_animation:"Κίνηση εικονιδίου όταν είναι ενεργό;"},light:{show_brightness_control:"Έλεγχος φωτεινότητας;",use_light_color:"Χρήση χρώματος φωτος",show_color_temp_control:"Έλεγχος χρώματος θερμοκρασίας;",show_color_control:"Έλεγχος χρώματος;",incompatible_controls:"Ορισμένα στοιχεία ελέγχου ενδέχεται να μην εμφανίζονται εάν το φωτιστικό σας δεν υποστηρίζει τη λειτουργία."},fan:{show_percentage_control:"Έλεγχος ποσοστού;",show_oscillate_control:"Έλεγχος ταλάντωσης;"},cover:{show_buttons_control:"Έλεγχος κουμπιών;",show_position_control:"Έλεγχος θέσης;"},template:{primary:"Πρωτεύουσες πληροφορίες",secondary:"Δευτερεύουσες πληροφορίες",multiline_secondary:"Δευτερεύουσες πολλαπλών γραμμών;",entity_extra:"Χρησιμοποιείται σε πρότυπα και ενέργειες",content:"Περιεχόμενο"},title:{title:"Τίτλος",subtitle:"Υπότιτλος"},chips:{alignment:"Ευθυγράμμιση"},weather:{show_conditions:"Συνθήκες;",show_temperature:"Θερμοκρασία;"},update:{show_buttons_control:"Έλεγχος κουμπιών;"},vacuum:{commands:"Εντολές"},"media-player":{use_media_info:"Χρήση πληροφοριών πολυμέσων",use_media_artwork:"Χρήση έργων τέχνης πολυμέσων",media_controls:"Έλεγχος πολυμέσων",media_controls_list:{on_off:"Ενεργοποίηση/απενεργοποίηση",shuffle:"Τυχαία σειρά",previous:"Προηγούμενο κομμάτι",play_pause_stop:"Αναπαραγωγή/παύση/διακοπή",next:"Επόμενο κομμάτι",repeat:"Λειτουργία επανάληψης"},volume_controls:"Χειριστήρια έντασης ήχου",volume_controls_list:{volume_buttons:"Κουμπιά έντασης ήχου",volume_set:"Επίπεδο έντασης ήχου",volume_mute:"Σίγαση"}}},chip:{sub_element_editor:{title:"Επεξεργαστής Chip"},conditional:{chip:"Chip"},"chip-picker":{chips:"Chips",add:"Προσθήκη chip",edit:"Επεξεργασία",clear:"Καθαρισμός",select:"Επιλογή chip",types:{action:"Ενέργεια","alarm-control-panel":"Συναγερμός",back:"Πίσω",conditional:"Υπό προϋποθέσεις",entity:"Οντότητα",light:"Φως",menu:"Μενού",template:"Πρότυπο",weather:"Καιρός"}}}},ni={editor:ii},oi={form:{color_picker:{values:{default:"Default color"}},info_picker:{values:{default:"Default information",name:"Name",state:"State","last-changed":"Last Changed","last-updated":"Last Updated",none:"None"}},icon_type_picker:{values:{default:"Default type",icon:"Icon","entity-picture":"Entity picture",none:"None"}},layout_picker:{values:{default:"Default layout",vertical:"Vertical layout",horizontal:"Horizontal layout"}},alignment_picker:{values:{default:"Default alignment",start:"Start",end:"End",center:"Center",justify:"Justify"}}},card:{generic:{icon_color:"Icon color",layout:"Layout",fill_container:"Fill container",primary_info:"Primary information",secondary_info:"Secondary information",icon_type:"Icon type",content_info:"Content",use_entity_picture:"Use entity picture?",collapsible_controls:"Collapse controls when off",icon_animation:"Animate icon when active?"},light:{show_brightness_control:"Brightness control?",use_light_color:"Use light color",show_color_temp_control:"Temperature color control?",show_color_control:"Color control?",incompatible_controls:"Some controls may not be displayed if your light does not support the feature."},fan:{show_percentage_control:"Percentage control?",show_oscillate_control:"Oscillate control?"},cover:{show_buttons_control:"Control buttons?",show_position_control:"Position control?",show_tilt_position_control:"Tilt control?"},alarm_control_panel:{show_keypad:"Show keypad"},template:{primary:"Primary information",secondary:"Secondary information",multiline_secondary:"Multiline secondary?",entity_extra:"Used in templates and actions",content:"Content",badge_icon:"Badge icon",badge_color:"Badge color",picture:"Picture (will replace the icon)"},title:{title:"Title",subtitle:"Subtitle"},chips:{alignment:"Alignment"},weather:{show_conditions:"Conditions?",show_temperature:"Temperature?"},update:{show_buttons_control:"Control buttons?"},vacuum:{commands:"Commands",commands_list:{on_off:"Turn on/off"}},"media-player":{use_media_info:"Use media info",use_media_artwork:"Use media artwork",show_volume_level:"Show volume level",media_controls:"Media controls",media_controls_list:{on_off:"Turn on/off",shuffle:"Shuffle",previous:"Previous track",play_pause_stop:"Play/pause/stop",next:"Next track",repeat:"Repeat mode"},volume_controls:"Volume controls",volume_controls_list:{volume_buttons:"Volume buttons",volume_set:"Volume level",volume_mute:"Mute"}},lock:{lock:"Lock",unlock:"Unlock",open:"Open"},humidifier:{show_target_humidity_control:"Humidity control?"},climate:{show_temperature_control:"Temperature control?",hvac_modes:"HVAC Modes"}},chip:{sub_element_editor:{title:"Chip editor"},conditional:{chip:"Chip"},"chip-picker":{chips:"Chips",add:"Add chip",edit:"Edit",clear:"Clear",select:"Select chip",types:{action:"Action","alarm-control-panel":"Alarm",back:"Back",conditional:"Conditional",entity:"Entity",light:"Light",menu:"Menu",template:"Template",weather:"Weather"}}}},ri={editor:oi},ai={form:{color_picker:{values:{default:"Color predeterminado"}},info_picker:{values:{default:"Informacion predeterminada",name:"Nombre",state:"Estado","last-changed":"Último cambio","last-updated":"Última actualización",none:"Ninguno"}},layout_picker:{values:{default:"Diseño predeterminado",vertical:"Diseño vertical",horizontal:"Diseño Horizontal"}},alignment_picker:{values:{default:"Alineación predeterminada",start:"Inicio",end:"Final",center:"Centrado",justify:"Justificado"}}},card:{generic:{icon_color:"Color de icono",layout:"Diseño",fill_container:"Rellenar",primary_info:"Información primaria",secondary_info:"Información secundaria",content_info:"Contenido",use_entity_picture:"¿Usar imagen de entidad?",collapsible_controls:"Contraer controles cuando está apagado",icon_animation:"¿Icono animado cuando está activo?"},light:{show_brightness_control:"¿Controlar brillo?",use_light_color:"Usar color de la luz",show_color_temp_control:"¿Controlar temperatura del color?",show_color_control:"¿Controlar Color?",incompatible_controls:"Es posible que algunos controles no se muestren si su luz no es compatible con la función."},fan:{show_percentage_control:"¿Controlar porcentaje?",show_oscillate_control:"¿Controlar oscilación?"},cover:{show_buttons_control:"¿Botones de control?",show_position_control:"¿Control de posición?"},alarm_control_panel:{show_keypad:"Mostrar teclado"},template:{primary:"Información primaria",secondary:"Información secundaria",multiline_secondary:"¿Secundaria multilínea?",entity_extra:"Utilizado en plantillas y acciones.",content:"Contenido"},title:{title:"Título",subtitle:"Subtítulo"},chips:{alignment:"Alineación"},weather:{show_conditions:"¿Condiciones?",show_temperature:"¿Temperatura?"},update:{show_buttons_control:"¿Botones de control?"},vacuum:{commands:"Comandos"},"media-player":{use_media_info:"Usar información multimedia",use_media_artwork:"Usar ilustraciones multimedia",show_volume_level:"Mostrar nivel de volumen",media_controls:"Controles multimedia",media_controls_list:{on_off:"Encender/apagar",shuffle:"Aleatoria",previous:"Pista anterior",play_pause_stop:"Play/pausa/parar",next:"Pista siguiente",repeat:"Modo de repetición"},volume_controls:"Controles de volumen",volume_controls_list:{volume_buttons:"Botones de volumen",volume_set:"Nivel de volumen",volume_mute:"Silenciar"}},lock:{lock:"Bloquear",unlock:"Desbloquear",open:"Abrir"},humidifier:{show_target_humidity_control:"¿Controlar humedad?"}},chip:{sub_element_editor:{title:"Editor de chip"},conditional:{chip:"Chip"},"chip-picker":{chips:"Chips",add:"Añadir chip",edit:"Editar",clear:"Limpiar",select:"Seleccionar chip",types:{action:"Acción","alarm-control-panel":"Alarma",back:"Volver",conditional:"Condicional",entity:"Entidad",light:"Luz",menu:"Menú",template:"Plantilla",weather:"Clima"}}}},li={editor:ai},si={form:{color_picker:{values:{default:"Oletusväri"}},info_picker:{values:{default:"Oletustiedot",name:"Nimi",state:"Tila","last-changed":"Viimeksi muuttunut","last-updated":"Viimeksi päivittynyt",none:"Ei mitään"}},icon_type_picker:{values:{default:"Oletustyyppi",icon:"Kuvake","entity-picture":"Kohteen kuva",none:"Ei mitään"}},layout_picker:{values:{default:"Oletusasettelu",vertical:"Pystysuuntainen",horizontal:"Vaakasuuntainen"}},alignment_picker:{values:{default:"Keskitys",start:"Alku",end:"Loppu",center:"Keskitä",justify:"Sovita"}}},card:{generic:{icon_color:"Ikonin väri",layout:"Asettelu",fill_container:"Täytä alue",primary_info:"Ensisijaiset tiedot",secondary_info:"Toissijaiset tiedot",icon_type:"Kuvakkeen tyyppi",content_info:"Sisältö",use_entity_picture:"Käytä kohteen kuvaa?",collapsible_controls:"Piilota toiminnot off-tilassa",icon_animation:"Animoi kuvake, kun aktiivinen?"},light:{show_brightness_control:"Kirkkauden säätö?",use_light_color:"Käytä valaisimen väriä",show_color_temp_control:"Värilämpötilan säätö?",show_color_control:"Värin säätö?",incompatible_controls:"Jotkin toiminnot eivät näy, jos valaisimesi ei tue niitä."},fan:{show_percentage_control:"Prosentuaalinen säätö?",show_oscillate_control:"Oskillaation säätö?"},cover:{show_buttons_control:"Toimintopainikkeet?",show_position_control:"Sijainnin hallinta?"},alarm_control_panel:{show_keypad:"Näytä näppäimet"},template:{primary:"Ensisijaiset tiedot",secondary:"Toissijaiset tiedot",multiline_secondary:"Monirivinen toissijainen tieto?",entity_extra:"Käytetään malleissa ja toiminnoissa",content:"Sisältö",badge_icon:"Merkin kuvake",badge_color:"Merkin väri",picture:"Kuva (korvaa kuvakkeen)"},title:{title:"Otsikko",subtitle:"Tekstitys"},chips:{alignment:"Asettelu"},weather:{show_conditions:"Ehdot?",show_temperature:"Lämpötila?"},update:{show_buttons_control:"Toimintopainikkeet?"},vacuum:{commands:"Komennot"},"media-player":{use_media_info:"Käytä median tietoja",use_media_artwork:"Käytä median kuvituksia",show_volume_level:"Näytä äänenvoimakkuuden hallinta",media_controls:"Toiminnot",media_controls_list:{on_off:"Päälle/pois",shuffle:"Sekoita",previous:"Edellinen kappale",play_pause_stop:"Toista/keskeytä/pysäytä",next:"Seuraava kappale",repeat:"Jatkuva toisto"},volume_controls:"Äänenvoimakkuuden hallinta",volume_controls_list:{volume_buttons:"Äänenvoimakkuuspainikkeet",volume_set:"Äänenvoimakkuus",volume_mute:"Mykistä"}},lock:{lock:"Lukitse",unlock:"Poista lukitus",open:"Avaa"},humidifier:{show_target_humidity_control:"Kosteudenhallinta?"}},chip:{sub_element_editor:{title:"Merkkieditori"},conditional:{chip:"Merkki"},"chip-picker":{chips:"Merkit",add:"Lisää merkki",edit:"Muokkaa",clear:"Tyhjennä",select:"Valitse merkki",types:{action:"Toiminto","alarm-control-panel":"Hälytys",back:"Takaisin",conditional:"Ehdollinen",entity:"Kohde",light:"Valaisin",menu:"Valikko",template:"Malli",weather:"Sää"}}}},ci={editor:si},di={form:{color_picker:{values:{default:"Couleur par défaut"}},info_picker:{values:{default:"Information par défaut",name:"Nom",state:"État","last-changed":"Dernière modification","last-updated":"Dernière mise à jour",none:"Aucune"}},icon_type_picker:{values:{default:"Type par défaut",icon:"Icône","entity-picture":"Image de l'entité",none:"Aucune"}},layout_picker:{values:{default:"Disposition par défault",vertical:"Disposition verticale",horizontal:"Disposition horizontale"}},alignment_picker:{values:{default:"Alignement par défaut",start:"Début",end:"Fin",center:"Centré",justify:"Justifié"}}},card:{generic:{icon_color:"Couleur de l'icône",layout:"Disposition",fill_container:"Remplir le conteneur",primary_info:"Information principale",secondary_info:"Information secondaire",icon_type:"Type d'icône",content_info:"Contenu",use_entity_picture:"Utiliser l'image de l'entité ?",collapsible_controls:"Reduire les contrôles quand éteint",icon_animation:"Animation de l'icône ?"},light:{show_brightness_control:"Contrôle de luminosité ?",use_light_color:"Utiliser la couleur de la lumière",show_color_temp_control:"Contrôle de la température ?",show_color_control:"Contrôle de la couleur ?",incompatible_controls:"Certains contrôles peuvent ne pas être affichés si votre lumière ne supporte pas la fonctionnalité."},fan:{show_percentage_control:"Contrôle de la vitesse ?",show_oscillate_control:"Contrôle de l'oscillation ?"},cover:{show_buttons_control:"Contrôle avec boutons ?",show_position_control:"Contrôle de la position ?"},alarm_control_panel:{show_keypad:"Afficher le clavier"},template:{primary:"Information principale",secondary:"Information secondaire",multiline_secondary:"Information secondaire sur plusieurs lignes ?",entity_extra:"Utilisée pour les templates et les actions",content:"Contenu",badge_icon:"Icône du badge",badge_color:"Couleur du badge",picture:"Picture (remplacera l'icône)"},title:{title:"Titre",subtitle:"Sous-titre"},chips:{alignment:"Alignement"},weather:{show_conditons:"Conditions ?",show_temperature:"Température ?"},update:{show_buttons_control:"Contrôle avec boutons ?"},vacuum:{commands:"Commandes",commands_list:{on_off:"Allumer/Éteindre"}},"media-player":{use_media_info:"Utiliser les informations du media",use_media_artwork:"Utiliser l'illustration du media",show_volume_level:"Afficher le niveau de volume",media_controls:"Contrôles du media",media_controls_list:{on_off:"Allumer/Éteindre",shuffle:"Lecture aléatoire",previous:"Précédent",play_pause_stop:"Lecture/pause/stop",next:"Suivant",repeat:"Mode de répétition"},volume_controls:"Contrôles du volume",volume_controls_list:{volume_buttons:"Bouton de volume",volume_set:"Niveau de volume",volume_mute:"Muet"}},lock:{lock:"Verrouiller",unlock:"Déverrouiller",open:"Ouvrir"},humidifier:{show_target_humidity_control:"Contrôle d'humidité ?"},climate:{show_temperature_control:"Contrôle de la température?",hvac_modes:"Modes du thermostat"}},chip:{sub_element_editor:{title:'Éditeur de "chip"'},conditional:{chip:"Chip"},"chip-picker":{chips:'"Chips"',add:'Ajouter une "chip"',edit:"Modifier",clear:"Effacer",select:'Sélectionner une "chip"',types:{action:"Action","alarm-control-panel":"Alarme",back:"Retour",conditional:"Conditionnel",entity:"Entité",light:"Lumière",menu:"Menu",template:"Template",weather:"Météo"}}}},ui={editor:di},hi={form:{color_picker:{values:{default:"צבע ברירת מחדל"}},info_picker:{values:{default:"מידע ברירת מחדל",name:"שם",state:"מצב","last-changed":"שונה לאחרונה","last-updated":"עודכן לאחרונה",none:"ריק"}},layout_picker:{values:{default:"סידור ברירת מחדל",vertical:"סידור מאונך",horizontal:"סידור מאוזן"}},alignment_picker:{values:{default:"יישור ברירת מחדל",start:"התחלה",end:"סוף",center:"אמצע",justify:"מוצדק"}}},card:{generic:{icon_color:"צבע אייקון",layout:"סידור",fill_container:"מלא גבולות",primary_info:"מידע ראשי",secondary_info:"מידע מישני",content_info:"תוכן",use_entity_picture:"השתמש בתמונת ישות?",collapsible_controls:"הסתר שליטה כשאר מכובה?",icon_animation:"להנפיש אייקון כאשר דלוק?"},light:{show_brightness_control:"שליטה בבהירות?",use_light_color:"השתמש בצבע האור",show_color_temp_control:"שליטה בגוון האור?",show_color_control:"שליטה בצבע האור?",incompatible_controls:"יתכן וחלק מהכפתורים לא יופיעו אם התאורה אינה תומכת בתכונה."},fan:{show_percentage_control:"שליטה באחוז?",show_oscillate_control:"שליטה בהתנדנדות?"},cover:{show_buttons_control:"כפתורי שליטה?",show_position_control:"שליטה במיקום?"},alarm_control_panel:{show_keypad:"הצג מקלדת"},template:{primary:"מידע ראשי",secondary:"מידע מישני",multiline_secondary:"מידע מישני רו קווי?",entity_extra:"משמש בתבניות ופעולות",content:"תוכן"},title:{title:"כותרת",subtitle:"כתובית"},chips:{alignment:"יישור"},weather:{show_conditions:"הצג תנאים?",show_temperature:"הצג טמפרטורה?"},update:{show_buttons_control:"הצג כפתורי שליטה?"},vacuum:{commands:"פקודות",icon_animation:"להנפיש אייקון כאשר דלוק?"},"media-player":{use_media_info:"השתמש במידע מדיה",use_media_artwork:"השתמש באומנות מדיה",show_volume_level:"הצג שליטת ווליום",media_controls:"שליטה במדיה",media_controls_list:{on_off:"הדלק/כבה",shuffle:"ערבב",previous:"רצועה קודמת",play_pause_stop:"נגן/השהה/הפסק",next:"רצועה הבאה",repeat:"חזרה"},volume_controls:"שליטה בווליום",volume_controls_list:{volume_buttons:"כפתורי ווליום",volume_set:"רמת ווליום",volume_mute:"השתק"}},lock:{lock:"נעל",unlock:"בטל נעילה",open:"פתח"},humidifier:{show_target_humidity_control:"שליטה בלחות?"}},chip:{sub_element_editor:{title:"עורך שבב"},conditional:{chip:"שבב"},"chip-picker":{chips:"שבבים",add:"הוסף שבב",edit:"ערוך",clear:"נקה",select:"בחר שבב",types:{action:"פעולה","alarm-control-panel":"אזעקה",back:"חזור",conditional:"מותנה",entity:"ישות",light:"אור",menu:"תפריט",template:"תבנית",weather:"מזג אוויר"}}}},mi={editor:hi},pi={form:{color_picker:{values:{default:"Alapértelmezett szín"}},info_picker:{values:{default:"Alepértelmezett információ",name:"Név",state:"Állapot","last-changed":"Utoljára módosítva","last-updated":"Utoljára frissítve",none:"Egyik sem"}},icon_type_picker:{values:{default:"Alapértelmezett típus",icon:"Ikon","entity-picture":"Entitás kép",none:"Egyik sem"}},layout_picker:{values:{default:"Alapértelmezet elrendezés",vertical:"Függőleges elrendezés",horizontal:"Vízszintes elrendezés"}},alignment_picker:{values:{default:"Alapértelmezett rendezés",start:"Kezdete",end:"Vége",center:"Közepe",justify:"Sorkizárt"}}},card:{generic:{icon_color:"Ikon szín",layout:"Elrendezés",fill_container:"Tároló kitöltése",primary_info:"Elsődleges információ",secondary_info:"Másodlagos információ",icon_type:"Ikon típus",content_info:"Tartalom",use_entity_picture:"Entitás kép használata",collapsible_controls:"Vezérlők összezárása kikapcsolt állapotban",icon_animation:"Ikon animálása aktív állapotban"},light:{show_brightness_control:"Fényerő vezérlő",use_light_color:"Fény szín használata",show_color_temp_control:"Színhőmérséklet vezérlő",show_color_control:"Szín vezérlő",incompatible_controls:"Azok a vezérlők nem lesznek megjelenítve, amelyeket a fényforrás nem támogat."},fan:{show_percentage_control:"Százalékos vezérlő",show_oscillate_control:"Oszcilláció vezérlő"},cover:{show_buttons_control:"Vezérlő gombok",show_position_control:"Pozíció vezérlő"},alarm_control_panel:{show_keypad:"Billentyűzet mutatása"},template:{primary:"Elsődleges információ",secondary:"Másodlagos információ",multiline_secondary:"Másodlagost több sorba?",entity_extra:"Used in templates and actions",content:"Tartalom",badge_icon:"Jelvény ikon",badge_color:"Jelvény szín",picture:"Kép (helyettesíteni fogja az ikont)"},title:{title:"Fejléc",subtitle:"Alcím"},chips:{alignment:"Rendezés"},weather:{show_conditions:"Állapotok",show_temperature:"Hőmérséklet"},update:{show_buttons_control:"Vezérlő gombok"},vacuum:{commands:"Utasítások"},"media-player":{use_media_info:"Média infó használata",use_media_artwork:"Média borító használata",show_volume_level:"Hangerő mutatása",media_controls:"Média vezérlők",media_controls_list:{on_off:"Ki/bekapcsolás",shuffle:"Véletlen lejátszás",previous:"Előző szám",play_pause_stop:"Lejátszás/szünet/állj",next:"Következő szám",repeat:"Ismétlés módja"},volume_controls:"Hangerő vezérlők",volume_controls_list:{volume_buttons:"Hangerő gombok",volume_set:"Hangerő szint",volume_mute:"Némítás"}},lock:{lock:"Zár",unlock:"Nyit",open:"Nyitva"},humidifier:{show_target_humidity_control:"Páratartalom vezérlő"},climate:{show_temperature_control:"Hőmérséklet vezérlő",hvac_modes:"HVAC mód"}},chip:{sub_element_editor:{title:"Chip szerkesztő"},conditional:{chip:"Chip"},"chip-picker":{chips:"Chip-ek",add:"Chip hozzáadása",edit:"Szerkesztés",clear:"Üríté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ü",template:"Sablon",weather:"Időjárás"}}}},fi={editor:pi},gi={form:{color_picker:{values:{default:"Colore predefinito"}},info_picker:{values:{default:"Informazione predefinita",name:"Nome",state:"Stato","last-changed":"Ultimo Cambiamento","last-updated":"Ultimo Aggiornamento",none:"Nessuno"}},icon_type_picker:{values:{default:"Tipo predefinito",icon:"Icona","entity-picture":"Immagine dell'entità",none:"Nessuna"}},layout_picker:{values:{default:"Disposizione Predefinita",vertical:"Disposizione Verticale",horizontal:"Disposizione Orizzontale"}},alignment_picker:{values:{default:"Allineamento predefinito",start:"Inizio",end:"Fine",center:"Centro",justify:"Giustificato"}}},card:{generic:{icon_color:"Colore dell'icona",layout:"Disposizione",fill_container:"Riempi il contenitore",primary_info:"Informazione primaria",secondary_info:"Informazione secondaria",icon_type:"Tipo icona",content_info:"Contenuto",use_entity_picture:"Usa l'immagine dell'entità",collapsible_controls:"Nascondi i controlli quando spento",icon_animation:"Anima l'icona quando attiva"},light:{use_light_color:"Usa il colore della luce",show_brightness_control:"Controllo luminosità",show_color_temp_control:"Controllo temperatura",show_color_control:"Controllo colore",incompatible_controls:"Alcuni controlli potrebbero non essere mostrati se la tua luce non li supporta."},fan:{show_percentage_control:"Controllo potenza",show_oscillate_control:"Controllo oscillazione"},cover:{show_buttons_control:"Pulsanti di controllo",show_position_control:"Controllo percentuale apertura"},alarm_control_panel:{show_keypad:"Mostra il tastierino numerico"},template:{primary:"Informazione primaria",secondary:"Informazione secondaria",multiline_secondary:"Abilita frasi multilinea",entity_extra:"Usato in templates ed azioni",content:"Contenuto",badge_icon:"Icona del badge",badge_color:"Colore del badge",picture:"Immagine (sostituirà l'icona)"},title:{title:"Titolo",subtitle:"Sottotitolo"},chips:{alignment:"Allineamento"},weather:{show_conditions:"Condizioni",show_temperature:"Temperatura"},update:{show_buttons_control:"Pulsanti di controllo"},vacuum:{commands:"Comandi"},"media-player":{use_media_info:"Mostra le Informazioni Sorgente",use_media_artwork:"Usa la copertina della Sorgente",show_volume_level:"Mostra Volume",media_controls:"Controlli Media",media_controls_list:{on_off:"Accendi/Spegni",shuffle:"Riproduzione Casuale",previous:"Traccia Precedente",play_pause_stop:"Play/Pausa/Stop",next:"Traccia Successiva",repeat:"Loop"},volume_controls:"Controlli del Volume",volume_controls_list:{volume_buttons:"Bottoni del Volume",volume_set:"Livello del Volume",volume_mute:"Silenzia"}},lock:{lock:"Blocca",unlock:"Sblocca",open:"Aperto"},humidifier:{show_target_humidity_control:"Controllo umidità"},climate:{show_temperature_control:"Controllo della temperatura?",hvac_modes:"Modalità del termostato"}},chip:{sub_element_editor:{title:"Editor di chip"},conditional:{chip:"Chip"},"chip-picker":{chips:"Chips",add:"Aggiungi chip",edit:"Modifica",clear:"Rimuovi",select:"Seleziona chip",types:{action:"Azione","alarm-control-panel":"Allarme",back:"Pulsante indietro",conditional:"Condizione",entity:"Entità",light:"Luce",menu:"Menù",template:"Template",weather:"Meteo"}}}},_i={editor:gi},vi={form:{color_picker:{values:{default:"Standard farge"}},info_picker:{values:{default:"Standard informasjon",name:"Navn",state:"Tilstand","last-changed":"Sist endret","last-updated":"Sist oppdatert",none:"Ingen"}},layout_picker:{values:{default:"Standardoppsett",vertical:"Vertikalt oppsett",horizontal:"Horisontalt oppsett"}},alignment_picker:{values:{default:"Standard justering",start:"Start",end:"Slutt",center:"Senter",justify:"Bekreft"}}},card:{generic:{icon_color:"Ikon farge",layout:"Oppsett",primary_info:"Primærinformasjon",secondary_info:"Sekundærinformasjon",content_info:"Innhold",use_entity_picture:"Bruk enhetsbilde?",icon_animation:"Animer ikon når aktivt?"},light:{show_brightness_control:"Lysstyrkekontroll?",use_light_color:"Bruk lys farge",show_color_temp_control:"Temperatur fargekontroll?",show_color_control:"Fargekontroll?",incompatible_controls:"Noen kontroller vises kanskje ikke hvis lyset ditt ikke støtter denne funksjonen."},fan:{show_percentage_control:"Prosentvis kontroll?",show_oscillate_control:"Oscillerende kontroll?"},cover:{show_buttons_control:"Kontollere med knapper?",show_position_control:"Posisjonskontroll?"},template:{primary:"Primærinformasjon",secondary:"Sekundærinformasjon",multiline_secondary:"Multiline sekundær?",entity_extra:"Brukes i maler og handlinger",content:"Inhold"},title:{title:"Tittel",subtitle:"Undertekst"},chips:{alignment:"Justering"},weather:{show_conditions:"Forhold?",show_temperature:"Temperatur?"},vacuum:{commands:"Kommandoer"}},chip:{sub_element_editor:{title:"Chip redaktør"},conditional:{chip:"Chip"},"chip-picker":{chips:"Chips",add:"Legg til chip",edit:"Endre",clear:"Klare",select:"Velg chip",types:{action:"Handling","alarm-control-panel":"Alarm",back:"Tilbake",conditional:"Betinget",entity:"Entitet",light:"Lys",menu:"Meny",template:"Mal",weather:"Vær"}}}},bi={editor:vi},yi={form:{color_picker:{values:{default:"Standaard kleur"}},info_picker:{values:{default:"Standaard informatie",name:"Naam",state:"Staat","last-changed":"Laatst gewijzigd","last-updated":"Laatst bijgewerkt",none:"Geen"}},layout_picker:{values:{default:"Standaard lay-out",vertical:"Verticale lay-out",horizontal:"Horizontale lay-out"}},alignment_picker:{values:{default:"Standaard uitlijning",start:"Begin",end:"Einde",center:"Midden",justify:"Uitlijnen "}}},card:{generic:{icon_color:"Icoon kleur",layout:"Lay-out",primary_info:"Primaire informatie",secondary_info:"Secundaire informatie",content_info:"Inhoud",use_entity_picture:"Gebruik entiteit afbeelding",collapsible_controls:"Bedieningselementen verbergen wanneer uitgeschakeld",icon_animation:"Pictogram animeren indien actief"},light:{show_brightness_control:"Bediening helderheid",use_light_color:"Gebruik licht kleur",show_color_temp_control:"Bediening kleurtemperatuur",show_color_control:"Bediening kleur",incompatible_controls:"Sommige bedieningselementen worden mogelijk niet weergegeven als uw lamp deze functie niet ondersteunt."},fan:{show_percentage_control:"Bediening middels percentage",show_oscillate_control:"Bediening oscillatie"},cover:{show_buttons_control:"Toon knoppen",show_position_control:"Toon positie bediening"},alarm_control_panel:{show_keypad:"Toon toetsenbord"},template:{primary:"Primaire informatie",secondary:"Secundaire informatie",multiline_secondary:"Meerlijnig secundair?",entity_extra:"Gebruikt in sjablonen en acties",content:"Inhoud"},title:{title:"Titel",subtitle:"Ondertitel"},chips:{alignment:"Uitlijning"},weather:{show_conditions:"Weerbeeld",show_temperature:"Temperatuur"},update:{show_buttons_control:"Bedieningsknoppen?"},vacuum:{commands:"Commando's",commands_list:{on_off:"Zet aan/uit"}},"media-player":{use_media_info:"Gebruik media informatie",use_media_artwork:"Gebruik media omslag",show_volume_level:"Toon volumeniveau",media_controls:"Mediabediening",media_controls_list:{on_off:"zet aan/uit",shuffle:"Shuffle",previous:"Vorige nummer",play_pause_stop:"Speel/pauze/stop",next:"Volgende nummer",repeat:"Herhalen"},volume_controls:"Volumeregeling",volume_controls_list:{volume_buttons:"Volume knoppen",volume_set:"Volumeniveau",volume_mute:"Dempen"}},lock:{lock:"Vergrendel",unlock:"Ontgrendel",open:"Open"}},chip:{sub_element_editor:{title:"Chip-editor"},conditional:{chip:"Chip"},"chip-picker":{chips:"Chips",add:"Toevoegen chip",edit:"Bewerk",clear:"Maak leeg",select:"Selecteer chip",types:{action:"Actie","alarm-control-panel":"Alarm",back:"Terug",conditional:"Voorwaardelijk",entity:"Entiteit",light:"Licht",menu:"Menu",template:"Sjabloon",weather:"Weer"}}}},xi={editor:yi},wi={form:{color_picker:{values:{default:"Domyślny kolor"}},info_picker:{values:{default:"Domyślne informacje",name:"Nazwa",state:"Stan","last-changed":"Ostatnia zmiana","last-updated":"Ostatnia aktualizacja",none:"Brak"}},icon_type_picker:{values:{default:"Domyślny typ",icon:"Ikona","entity-picture":"Obraz encji",none:"Brak"}},layout_picker:{values:{default:"Układ domyślny",vertical:"Układ pionowy",horizontal:"Układ poziomy"}},alignment_picker:{values:{default:"Wyrównanie domyślne",start:"Wyrównanie do lewej",end:"Wyrównanie do prawej",center:"Wyśrodkowanie",justify:"Justowanie"}}},card:{generic:{icon_color:"Kolor ikony",layout:"Układ",fill_container:"Wypełnij zawartością",primary_info:"Informacje główne",secondary_info:"Informacje drugorzędne",icon_type:"Typ ikony",content_info:"Zawartość",use_entity_picture:"Użyć obrazu encji?",collapsible_controls:"Zwiń sterowanie, jeśli wyłączone",icon_animation:"Animować, gdy aktywny?"},light:{show_brightness_control:"Sterowanie jasnością?",use_light_color:"Użyj koloru światła",show_color_temp_control:"Sterowanie temperaturą światła?",show_color_control:"Sterowanie kolorami?",incompatible_controls:"Niektóre funkcje są niewidoczne, jeśli światło ich nie obsługuje."},fan:{show_percentage_control:"Sterowanie procentowe?",show_oscillate_control:"Sterowanie oscylacją?"},cover:{show_buttons_control:"Przyciski sterujące?",show_position_control:"Sterowanie położeniem?",show_tilt_position_control:"Sterowanie poziomem otwarcia?"},alarm_control_panel:{show_keypad:"Wyświetl klawiaturę"},template:{primary:"Informacje główne",secondary:"Informacje drugorzędne",multiline_secondary:"Drugorzędne wielowierszowe?",entity_extra:"Używane w szablonach i akcjach",content:"Zawartość",badge_icon:"Ikona odznaki",badge_color:"Kolor odznaki",picture:"Obraz (zamiast ikony)"},title:{title:"Tytuł",subtitle:"Podtytuł"},chips:{alignment:"Wyrównanie"},weather:{show_conditions:"Warunki?",show_temperature:"Temperatura?"},update:{show_buttons_control:"Przyciski sterujące?"},vacuum:{commands:"Polecenia"},"media-player":{use_media_info:"Użyj informacji o multimediach",use_media_artwork:"Użyj okładek multimediów",show_volume_level:"Wyświetl poziom głośności",media_controls:"Sterowanie multimediami",media_controls_list:{on_off:"Włącz/wyłącz",shuffle:"Losowo",previous:"Poprzednie nagranie",play_pause_stop:"Odtwórz/Pauza/Zatrzymaj",next:"Następne nagranie",repeat:"Powtarzanie"},volume_controls:"Sterowanie głośnością",volume_controls_list:{volume_buttons:"Przyciski głośności",volume_set:"Poziom głośności",volume_mute:"Wycisz"}},lock:{lock:"Zablokuj",unlock:"Odblokuj",open:"Otwórz"},humidifier:{show_target_humidity_control:"Sterowanie wilgotnością?"},climate:{show_temperature_control:"Sterowanie temperaturą?",hvac_modes:"Tryby urządzenia"}},chip:{sub_element_editor:{title:"Edytor czipów"},conditional:{chip:"Czip"},"chip-picker":{chips:"Czipy",add:"Dodaj czip",edit:"Edytuj",clear:"Wyczyść",select:"Wybierz czip",types:{action:"Akcja","alarm-control-panel":"Alarm",back:"Wstecz",conditional:"Warunkowy",entity:"Encja",light:"Światło",menu:"Menu",template:"Szablon",weather:"Pogoda"}}}},ki={editor:wi},Ci={form:{color_picker:{values:{default:"Cor padrão"}},info_picker:{values:{default:"Informações padrão",name:"Nome",state:"Estado","last-changed":"Última alteração","last-updated":"Última atualização",none:"Nenhum"}},layout_picker:{values:{default:"Layout padrão",vertical:"Layout vertical",horizontal:"Layout horizontal"}},alignment_picker:{values:{default:"Padrão (inicio)",end:"Final",center:"Centro",justify:"Justificado"}}},card:{generic:{icon_color:"Cor do ícone?",layout:"Layout",primary_info:"Informações primárias",secondary_info:"Informações secundárias",use_entity_picture:"Usar imagem da entidade?",icon_animation:"Animar ícone quando ativo?"},light:{show_brightness_control:"Mostrar controle de brilho?",use_light_color:"Usar cor da luz?",show_color_temp_control:"Mostrar controle de temperatura?",show_color_control:"Mostrar controle de cor?",incompatible_controls:"Alguns controles podem não ser exibidos se sua luz não suportar o recurso."},fan:{show_percentage_control:"Mostrar controle de porcentagem?",show_oscillate_control:"Mostrar controle de oscilação?"},cover:{show_buttons_control:"Mostrar botões?",show_position_control:"Mostrar controle de posição?"},template:{primary:"Informações primárias",secondary:"Informações secundárias",multiline_secondary:"Multilinha secundária?",content:"Conteúdo"},title:{title:"Título",subtitle:"Subtítulo"},chips:{alignment:"Alinhamento"},weather:{show_conditions:"Condições?",show_temperature:"Temperatura?"}},chip:{sub_element_editor:{title:"Editor de fichas"},conditional:{chip:"Ficha"},"chip-picker":{chips:"Fichas",add:"Adicionar ficha",edit:"Editar",clear:"Limpar",select:"Selecionar ficha",types:{action:"Ação","alarm-control-panel":"Alarme",back:"Voltar",conditional:"Condicional",entity:"Entidade",light:"Iluminação",menu:"Menu",template:"Modelo",weather:"Clima"}}}},$i={editor:Ci},Ei={form:{color_picker:{values:{default:"Cor padrão"}},info_picker:{values:{default:"Informações padrão",name:"Nome",state:"Estado","last-changed":"Última alteração","last-updated":"Última atualização",none:"Nenhum"}},layout_picker:{values:{default:"Layout padrão",vertical:"Layout vertical",horizontal:"Layout horizontal"}},alignment_picker:{values:{default:"Padrão (inicio)",end:"Fim",center:"Centrado",justify:"Justificado"}}},card:{generic:{icon_color:"Cor do ícone?",layout:"Layout",primary_info:"Informações primárias",secondary_info:"Informações secundárias",use_entity_picture:"Usar imagem da entidade?",icon_animation:"Animar ícone quando ativo?"},light:{show_brightness_control:"Mostrar controle de brilho?",use_light_color:"Usar cor da luz?",show_color_temp_control:"Mostrar controle de temperatura?",show_color_control:"Mostrar controle de cor?",incompatible_controls:"Alguns controles podem não ser exibidos se a luz não suportar o recurso."},fan:{show_percentage_control:"Mostrar controle de porcentagem?",show_oscillate_control:"Mostrar controle de oscilação?"},cover:{show_buttons_control:"Mostrar botões?",show_position_control:"Mostrar controle de posição?"},template:{primary:"Informações primárias",secondary:"Informações secundárias",multiline_secondary:"Multilinha secundária?",content:"Conteúdo"},title:{title:"Título",subtitle:"Subtítulo"},chips:{alignment:"Alinhamento"},weather:{show_conditions:"Condições?",show_temperature:"Temperatura?"}},chip:{sub_element_editor:{title:"Editor de fichas"},conditional:{chip:"Ficha"},"chip-picker":{chips:"Fichas",add:"Adicionar ficha",edit:"Editar",clear:"Limpar",select:"Selecionar ficha",types:{action:"Ação","alarm-control-panel":"Alarme",back:"Voltar",conditional:"Condicional",entity:"Entidade",light:"Iluminação",menu:"Menu",template:"Modelo",weather:"Clima"}}}},Ai={editor:Ei},Si={form:{color_picker:{values:{default:"Culoare implicită"}},info_picker:{values:{default:"Informație implicită",name:"Nume",state:"Stare","last-changed":"Ultima modificare","last-updated":"Ultima actulizare",none:"Niciuna"}},icon_type_picker:{values:{default:"Tip implicit",icon:"Pictogramă","entity-picture":"Imagine",none:"Niciuna"}},layout_picker:{values:{default:"Aranjare implicită",vertical:"Verticală",horizontal:"Orizontală"}},alignment_picker:{values:{default:"Aliniere implicită",start:"Stânga",end:"Dreapta",center:"Centrat",justify:"Umplere"}}},card:{generic:{icon_color:"Culoare pictogramă",layout:"Aranjare",fill_container:"Umplere container",primary_info:"Informație principală",secondary_info:"Informație secundară",icon_type:"Tip pictogramă",content_info:"Conținut",use_entity_picture:"Imagine?",collapsible_controls:"Restrângere la dezactivare"},light:{show_brightness_control:"Comandă pentru strălucire?",use_light_color:"Folosește culoarea luminii",show_color_temp_control:"Comandă pentru temperatură de culoare?",show_color_control:"Comandă pentru culoare?",incompatible_controls:"Unele comenzi ar putea să nu fie afișate dacă lumina nu suportă această caracteristică."},fan:{icon_animation:"Animare pictograma la activare?",show_percentage_control:"Comandă procent?",show_oscillate_control:"Comandă oscilație?"},cover:{show_buttons_control:"Comenzi pentru control?",show_position_control:"Comandă pentru poziție?",show_tilt_position_control:"Comandă pentru înclinare?"},alarm_control_panel:{show_keypad:"Arată tastatura"},template:{primary:"Informație principală",secondary:"Informație secundară",multiline_secondary:"Informație secundară pe mai multe linii?",entity_extra:"Folosită în șabloane și acțiuni",content:"Conținut",badge_icon:"Pictogramă insignă",badge_color:"Culoare insignă",picture:"Imagine (inlocuiește pictograma)"},title:{title:"Titlu",subtitle:"Subtitlu"},chips:{alignment:"Aliniere"},weather:{show_conditions:"Condiții?",show_temperature:"Temperatură?"},update:{show_buttons_control:"Comenzi control?"},vacuum:{commands:"Comenzi"},"media-player":{use_media_info:"Informații media",use_media_artwork:"Grafică media",show_volume_level:"Nivel volum",media_controls:"Comenzi media",media_controls_list:{on_off:"Pornit/Oprit",shuffle:"Amestecare",previous:"Pista anterioară",play_pause_stop:"Redare/Pauză/Stop",next:"Pista următoare",repeat:"Mod repetare"},volume_controls:"Comenzi volum",volume_controls_list:{volume_buttons:"Comenzi volum",volume_set:"Nivel volum",volume_mute:"Dezactivare sunet"}},lock:{lock:"Încuie",unlock:"Descuie",open:"Deschide"},humidifier:{show_target_humidity_control:"Comenzi umiditate?"},climate:{show_temperature_control:"Comenzi temperatură?",hvac_modes:"Moduri HVAC"}},chip:{sub_element_editor:{title:"Editor jeton"},conditional:{chip:"Jeton"},"chip-picker":{chips:"Jetoane",add:"Adaugă jeton",edit:"Modifică",clear:"Șterge",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"}}}},Ii={editor:Si},Ti={form:{color_picker:{values:{default:"Predvolená farba"}},info_picker:{values:{default:"Predvolené informácie",name:"Názov",state:"Stav","last-changed":"Posledná zmena","last-updated":"Posledná aktualizácia",none:"Žiadna"}},icon_type_picker:{values:{default:"Predvolený typ",icon:"Ikona","entity-picture":"Obrázok entity",none:"Žiadny"}},layout_picker:{values:{default:"Predvolené rozloženie",vertical:"Zvislé rozloženie",horizontal:"Vodorovné rozloženie"}},alignment_picker:{values:{default:"Predvolené zarovnanie",start:"Začiatok",end:"Koniec",center:"Stred",justify:"Vyplniť"}}},card:{generic:{icon_color:"Farba ikony",layout:"Rozloženie",fill_container:"Vyplniť priestor",primary_info:"Základné info",secondary_info:"Doplnkové info",icon_type:"Typ ikony",content_info:"Obsah",use_entity_picture:"Použiť obrázok entity?",collapsible_controls:"Skryť ovládanie v stave VYP.",icon_animation:"Animovaná ikona v stave ZAP?"},light:{show_brightness_control:"Ovládanie jasu?",use_light_color:"Použiť farbu svetla",show_color_temp_control:"Ovládanie teploty?",show_color_control:"Ovládanie farby?",incompatible_controls:"Niektoré ovládacie prvky sa nemusia zobraziť, pokiaľ ich svetlo nepodporuje."},fan:{show_percentage_control:"Ovládanie rýchlosti v percentách?",show_oscillate_control:"Ovládanie oscilácie?"},cover:{show_buttons_control:"Zobraziť ovládacie tlačidlá?",show_position_control:"Ovládanie pozície?",show_tilt_position_control:"Ovládanie natočenia?"},alarm_control_panel:{show_keypad:"Zobraziť klávesnicu"},template:{primary:"Základné info",secondary:"Doplnkové info",multiline_secondary:"Viacriadkové doplnkové info?",entity_extra:"Použitá v šablónach a akciách",content:"Obsah",badge_icon:"Ikona odznaku",badge_color:"Farba odznaku",picture:"Obrázok (nahrádza ikonu)"},title:{title:"Nadpis",subtitle:"Podnadpis"},chips:{alignment:"Zarovnanie"},weather:{show_conditions:"Zobraziť podmienky?",show_temperature:"Zobraziť teplotu?"},update:{show_buttons_control:"Zobraziť ovládacie tlačidlá?"},vacuum:{commands:"Príkazy"},"media-player":{use_media_info:"Použiť info o médiu",use_media_artwork:"Použiť obrázok z média",show_volume_level:"Zobraziť úroveň hlasitosti",media_controls:"Ovládanie média",media_controls_list:{on_off:"Zap / Vyp",shuffle:"Premiešať",previous:"Predchádzajúca",play_pause_stop:"Spustiť/pauza/stop",next:"Ďalšia",repeat:"Opakovať"},volume_controls:"Ovládanie hlasitosti",volume_controls_list:{volume_buttons:"Tlačidlá hlasitosti",volume_set:"Úroveň hlasitosti",volume_mute:"Stlmiť"}},lock:{lock:"Zamknuté",unlock:"Odomknuté",open:"Otvorené"},humidifier:{show_target_humidity_control:"Ovládanie vlhkosti?"},climate:{show_temperature_control:"Ovládanie teploty?",hvac_modes:"HVAC mód"}},chip:{sub_element_editor:{title:"Editor štítkov"},conditional:{chip:"Štítok"},"chip-picker":{chips:"Štítky",add:"Pridať štítok",edit:"Editovať",clear:"Vymazať",select:"Vybrať štítok",types:{action:"Akcia","alarm-control-panel":"Alarm",back:"Späť",conditional:"Podmienka",entity:"Entita",light:"Svetlo",menu:"Menu",template:"Šablóna",weather:"Počasie"}}}},zi={editor:Ti},Oi={form:{color_picker:{values:{default:"Standardfärg"}},info_picker:{values:{default:"Förvald information",name:"Namn",state:"Status","last-changed":"Sist ändrad","last-updated":"Sist uppdaterad",none:"Ingen"}},layout_picker:{values:{default:"Standard",vertical:"Vertikal",horizontal:"Horisontell"}},alignment_picker:{values:{default:"Standard (början)",end:"Slutet",center:"Centrerad",justify:"Anpassa"}}},card:{generic:{icon_color:"Ikonens färg",layout:"Layout",primary_info:"Primär information",secondary_info:"Sekundär information",use_entity_picture:"Använd enheten bild?",icon_animation:"Animera ikonen när fläkten är på?"},light:{show_brightness_control:"Styr ljushet?",use_light_color:"Styr ljusets färg",show_color_temp_control:"Styr färgtemperatur?",show_color_control:"Styr färg?",incompatible_controls:"Kontroller som inte stöds av enheten kommer inte visas."},fan:{show_percentage_control:"Procentuell kontroll?",show_oscillate_control:"Kontroll för oscillera?"},cover:{show_buttons_control:"Visa kontrollknappar?",show_position_control:"Visa positionskontroll?"},template:{primary:"Primär information",secondary:"Sekundär information",multiline_secondary:"Sekundär med flera rader?",content:"Innehåll"},title:{title:"Rubrik",subtitle:"Underrubrik"},chips:{alignment:"Justering"},weather:{show_conditions:"Förhållanden?",show_temperature:"Temperatur?"}},chip:{sub_element_editor:{title:"Chipredigerare"},conditional:{chip:"Chip"},"chip-picker":{chips:"Chips",add:"Lägg till chip",edit:"Redigera",clear:"Rensa",select:"Välj chip",types:{action:"Händelse","alarm-control-panel":"Alarm",back:"Bakåt",conditional:"Villkorad",entity:"Enhet",light:"Ljus",menu:"Meny",template:"Mall",weather:"Väder"}}}},Mi={editor:Oi},Li={form:{color_picker:{values:{default:"Varsayılan renk"}},info_picker:{values:{default:"Varsayılan bilgi",name:"İsim",state:"Durum","last-changed":"Son Değişim","last-updated":"Son Güncelleme",none:"None"}},layout_picker:{values:{default:"Varsayılan düzen",vertical:"Dikey düzen",horizontal:"Yatay düzen"}},alignment_picker:{values:{default:"Varsayılan hizalama",start:"Sola yasla",end:"Sağa yasla",center:"Ortala",justify:"İki yana yasla"}}},card:{generic:{icon_color:"Simge renki",layout:"Düzen",primary_info:"Birinci bilgi",secondary_info:"İkinci bilgi",content_info:"İçerik",use_entity_picture:"Varlık resmi kullanılsın",icon_animation:"Aktif olduğunda simgeyi hareket ettir"},light:{show_brightness_control:"Parlaklık kontrolü",use_light_color:"Işık rengini kullan",show_color_temp_control:"Renk ısısı kontrolü",show_color_control:"Renk kontrolü",incompatible_controls:"Kullandığınız lamba bu özellikleri desteklemiyorsa bazı kontroller görüntülenemeyebilir."},fan:{show_percentage_control:"Yüzde kontrolü",show_oscillate_control:"Salınım kontrolü"},cover:{show_buttons_control:"Düğme kontrolleri",show_position_control:"Pozisyon kontrolü"},template:{primary:"Birinci bilgi",secondary:"İkinci bilgi",multiline_secondary:"İkinci bilgi çok satır olsun",entity_extra:"Şablonlarda ve eylemlerde kullanılsın",content:"İçerik"},title:{title:"Başlık",subtitle:"Altbaşlık"},chips:{alignment:"Hizalama"},weather:{show_conditions:"Hava koşulu",show_temperature:"Sıcaklık"},update:{show_buttons_control:"Düğme kontrolü"},vacuum:{commands:"Komutlar"}},chip:{sub_element_editor:{title:"Chip düzenleyici"},conditional:{chip:"Chip"},"chip-picker":{chips:"Chips",add:"Chip ekle",edit:"Düzenle",clear:"Temizle",select:"Chip seç",types:{action:"Eylem","alarm-control-panel":"Alarm",back:"Geri",conditional:"Koşullu",entity:"Varlık",light:"Işık",menu:"Menü",template:"Şablon",weather:"Hava Durumu"}}}},Di={editor:Li},ji={form:{color_picker:{values:{default:"Màu mặc định"}},info_picker:{values:{default:"Thông tin mặc định",name:"Tên",state:"Trạng thái","last-changed":"Lần cuối thay đổi","last-updated":"Lần cuối cập nhật",none:"Rỗng"}},layout_picker:{values:{default:"Bố cục mặc định",vertical:"Bố cục dọc",horizontal:"Bố cục ngang"}},alignment_picker:{values:{default:"Căn chỉnh mặc định",start:"Căn đầu",end:"Căn cuối",center:"Căn giữa",justify:"Căn hai bên"}}},card:{generic:{icon_color:"Màu biểu tượng",layout:"Bố cục",fill_container:"Làm đầy",primary_info:"Thông tin chính",secondary_info:"Thông tin phụ",content_info:"Nội dung",use_entity_picture:"Dùng ảnh của thực thể?",collapsible_controls:"Thu nhỏ điều kiển khi tắt",icon_animation:"Biểu tượng hoạt ảnh khi hoạt động?"},light:{show_brightness_control:"Điều khiển độ sáng?",use_light_color:"Dùng ánh sáng màu",show_color_temp_control:"Điều khiển nhiệt độ màu?",show_color_control:"Điều khiển màu sắc?",incompatible_controls:"Một số màu sẽ không được hiển thị nếu đèn của bạn không hỗ trợ tính năng này."},fan:{show_percentage_control:"Điều khiển dạng phần trăm?",show_oscillate_control:"Điều khiển xoay?"},cover:{show_buttons_control:"Nút điều khiển?",show_position_control:"Điều khiển vị trí?"},alarm_control_panel:{show_keypad:"Hiện bàn phím"},template:{primary:"Thông tin chính",secondary:"Thông tin phụ",multiline_secondary:"Nhiều dòng thông tin phụ?",entity_extra:"Được sử dụng trong mẫu và hành động",content:"Nội dung"},title:{title:"Tiêu đề",subtitle:"Phụ đề"},chips:{alignment:"Căn chỉnh"},weather:{show_conditions:"Điều kiện?",show_temperature:"Nhiệt độ?"},update:{show_buttons_control:"Nút điều khiển?"},vacuum:{commands:"Mệnh lệnh"},"media-player":{use_media_info:"Dùng thông tin đa phương tiện",use_media_artwork:"Dùng ảnh đa phương tiện",media_controls:"Điều khiển đa phương tiện",media_controls_list:{on_off:"Bật/Tắt",shuffle:"Xáo trộn",previous:"Bài trước",play_pause_stop:"Phát/Tạm dừng/Dừng",next:"Bài tiếp theo",repeat:"Chế độ lặp lại"},volume_controls:"Điều khiển âm lượng",volume_controls_list:{volume_buttons:"Nút âm lượng",volume_set:"Mức âm lượng",volume_mute:"Im lặng"}},lock:{lock:"Khóa",unlock:"Mở khóa",open:"Mở"}},chip:{sub_element_editor:{title:"Chỉnh sửa chip"},conditional:{chip:"Chip"},"chip-picker":{chips:"Các chip",add:"Thêm chip",edit:"Chỉnh sửa",clear:"Làm mới",select:"Chọn chip",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:"Menu",template:"Mẫu",weather:"Thời tiết"}}}},Pi={editor:ji},Ni={form:{color_picker:{values:{default:"默认颜色"}},info_picker:{values:{default:"默认信息",name:"名称",state:"状态","last-changed":"变更时间","last-updated":"更新时间",none:"无"}},layout_picker:{values:{default:"默认布局",vertical:"垂直布局",horizontal:"水平布局"}},alignment_picker:{values:{default:"默认 (左对齐)",end:"右对齐",center:"居中对齐",justify:"两端对齐"}}},card:{generic:{icon_color:"图标颜色",primary_info:"首要信息",secondary_info:"次要信息",use_entity_picture:"使用实体图片?",icon_animation:"激活时使用动态图标?"},light:{show_brightness_control:"亮度控制?",use_light_color:"使用灯光颜色",show_color_temp_control:"色温控制?",show_color_control:"颜色控制?",incompatible_controls:"设备不支持的控制器将不会显示。"},fan:{show_percentage_control:"百分比控制?",show_oscillate_control:"摆动控制?"},cover:{show_buttons_control:"按钮控制?",show_position_control:"位置控制?"},template:{primary:"首要信息",secondary:"次要信息",multiline_secondary:"多行次要信息?",content:"内容"},title:{title:"标题",subtitle:"子标题"},chips:{alignment:"对齐"},weather:{show_conditions:"条件?",show_temperature:"温度?"}},chip:{sub_element_editor:{title:"Chip 编辑"},conditional:{chip:"Chip"},"chip-picker":{chips:"Chips",add:"添加 chip",edit:"编辑",clear:"清除",select:"选择 chip",types:{action:"动作","alarm-control-panel":"警戒控制台",back:"返回",conditional:"条件显示",entity:"实体",light:"灯光",menu:"菜单",template:"模板",weather:"天气"}}}},Vi={editor:Ni},Ri={form:{color_picker:{values:{default:"預設顏色"}},info_picker:{values:{default:"預設訊息",name:"名稱",state:"狀態","last-changed":"最近變動時間","last-updated":"最近更新時間",none:"無"}},icon_type_picker:{values:{default:"預設樣式",icon:"圖示","entity-picture":"實體圖片",none:"無"}},layout_picker:{values:{default:"預設佈局",vertical:"垂直佈局",horizontal:"水平佈局"}},alignment_picker:{values:{default:"預設對齊",start:"居左對齊",end:"居右對齊",center:"居中對齊",justify:"兩端對齊"}}},card:{generic:{icon_color:"圖示顏色",layout:"佈局",fill_container:"填滿容器",primary_info:"主要訊息",secondary_info:"次要訊息",icon_type:"圖示樣式",content_info:"內容",use_entity_picture:"使用實體圖片?",collapsible_controls:"關閉時隱藏控制項",icon_animation:"啟動時使用動態圖示?"},light:{show_brightness_control:"亮度控制?",use_light_color:"使用燈光顏色",show_color_temp_control:"色溫控制?",show_color_control:"色彩控制?",incompatible_controls:"裝置不支援的控制不會顯示。"},fan:{show_percentage_control:"百分比控制?",show_oscillate_control:"擺頭控制?"},cover:{show_buttons_control:"按鈕控制?",show_position_control:"位置控制?",show_tilt_position_control:"傾斜控制?"},alarm_control_panel:{show_keypad:"顯示鍵盤"},template:{primary:"主要訊息",secondary:"次要訊息",multiline_secondary:"多行次要訊息?",entity_extra:"用於模板與動作",content:"內容",badge_icon:"角標圖示",badge_color:"角標顏色",picture:"圖片(將會取代圖示)"},title:{title:"標題",subtitle:"副標題"},chips:{alignment:"對齊"},weather:{show_conditions:"狀況?",show_temperature:"溫度?"},update:{show_buttons_control:"按鈕控制?"},vacuum:{commands:"指令"},"media-player":{use_media_info:"使用媒體資訊",use_media_artwork:"使用媒體插圖",show_volume_level:"顯示音量大小",media_controls:"媒體控制",media_controls_list:{on_off:" 開啟、關閉",shuffle:"隨機播放",previous:"上一首",play_pause_stop:"播放、暫停、停止",next:"下一首",repeat:"重複播放"},volume_controls:"音量控制",volume_controls_list:{volume_buttons:"音量按鈕",volume_set:"音量等級",volume_mute:"靜音"}},lock:{lock:"上鎖",unlock:"解鎖",open:"打開"},humidifier:{show_target_humidity_control:"溼度控制?"},climate:{show_temperature_control:"溫度控制?",hvac_modes:"空調模式"}},chip:{sub_element_editor:{title:"Chip 編輯"},conditional:{chip:"Chip"},"chip-picker":{chips:"Chips",add:"新增 chip",edit:"編輯",clear:"清除",select:"選擇 chip",types:{action:"動作","alarm-control-panel":"警報器控制",back:"返回",conditional:"條件",entity:"實體",light:"燈光",menu:"選單",template:"模板",weather:"天氣"}}}},Fi={editor:Ri};const Bi={ar:Object.freeze({__proto__:null,editor:qe,default:Ke}),cs:Object.freeze({__proto__:null,editor:Ge,default:Ze}),da:Object.freeze({__proto__:null,editor:Je,default:Qe}),de:Object.freeze({__proto__:null,editor:ti,default:ei}),el:Object.freeze({__proto__:null,editor:ii,default:ni}),en:Object.freeze({__proto__:null,editor:oi,default:ri}),es:Object.freeze({__proto__:null,editor:ai,default:li}),fi:Object.freeze({__proto__:null,editor:si,default:ci}),fr:Object.freeze({__proto__:null,editor:di,default:ui}),he:Object.freeze({__proto__:null,editor:hi,default:mi}),hu:Object.freeze({__proto__:null,editor:pi,default:fi}),it:Object.freeze({__proto__:null,editor:gi,default:_i}),nb:Object.freeze({__proto__:null,editor:vi,default:bi}),nl:Object.freeze({__proto__:null,editor:yi,default:xi}),pl:Object.freeze({__proto__:null,editor:wi,default:ki}),"pt-BR":Object.freeze({__proto__:null,editor:Ci,default:$i}),"pt-PT":Object.freeze({__proto__:null,editor:Ei,default:Ai}),ro:Object.freeze({__proto__:null,editor:Si,default:Ii}),sk:Object.freeze({__proto__:null,editor:Ti,default:zi}),sv:Object.freeze({__proto__:null,editor:Oi,default:Mi}),tr:Object.freeze({__proto__:null,editor:Li,default:Di}),vi:Object.freeze({__proto__:null,editor:ji,default:Pi}),"zh-Hans":Object.freeze({__proto__:null,editor:Ni,default:Vi}),"zh-Hant":Object.freeze({__proto__:null,editor:Ri,default:Fi})};function Ui(t,e){try{return t.split(".").reduce(((t,e)=>t[e]),Bi[e])}catch(t){return}}function Hi(t){return function(e){var i;let n=Ui(e,null!==(i=null==t?void 0:t.locale.language)&&void 0!==i?i:"en");return n||(n=Ui(e,"en")),null!=n?n:e}} /** * @license - * Copyright 2018 Google LLC - * SPDX-License-Identifier: BSD-3-Clause - */const Gt=qt(class extends Wt{constructor(t){var e;if(super(t),t.type!==Ht||"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,i)=>{const n=t[i];return null==n?e:e+`${i=i.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase()}:${n};`}),"")}update(t,[e]){const{style:i}=t.element;if(void 0===this.ct){this.ct=new Set;for(const t in e)this.ct.add(t);return this.render(e)}this.ct.forEach((t=>{null==e[t]&&(this.ct.delete(t),t.includes("-")?i.removeProperty(t):i[t]="")}));for(const t in e){const n=e[t];null!=n&&(this.ct.add(t),t.includes("-")?i.setProperty(t,n):i[t]=n)}return mt}});var Kt={form:{color_picker:{values:{default:"Standardfarbe"}},info_picker:{values:{default:"Standard-Information",name:"Name",state:"Zustand","last-changed":"Letzte Änderung","last-updated":"Letzte Aktualisierung",none:"Keine"}},layout_picker:{values:{default:"Standard-Layout",vertical:"Vertikales Layout",horizontal:"Horizontales Layout"}},alignment_picker:{values:{default:"Standard",start:"Anfang",end:"Ende",center:"Mitte",justify:"Ausrichten"}}},card:{generic:{hide_name:"Name ausblenden?",hide_state:"Zustand ausblenden?",hide_icon:"Icon ausblenden?",icon_color:"Icon-Farbe",layout:"Layout",primary_info:"Primäre Information",secondary_info:"Sekundäre Information",content_info:"Inhalt",use_entity_picture:"Entitätsbild verwenden?"},light:{show_brightness_control:"Helligkeitsregelung?",use_light_color:"Farbsteuerung verwenden",show_color_temp_control:"Farbtemperatursteuerung?",show_color_control:"Farbsteuerung?",incompatible_controls:"Einige Steuerelemente werden möglicherweise nicht angezeigt, wenn Ihr Licht diese Funktion nicht unterstützt."},fan:{icon_animation:"Icon animieren, wenn aktiv?",show_percentage_control:"Prozentuale Kontrolle?",show_oscillate_control:"Oszillationssteuerung?"},cover:{show_buttons_control:"Schaltflächensteuerung?",show_position_control:"Positionssteuerung?"},template:{primary:"Primäre Information",secondary:"Sekundäre Information",multiline_secondary:"Mehrzeilig sekundär?",entity_extra:"Wird in Vorlagen und Aktionen verwendet",content:"Inhalt"},title:{title:"Titel",subtitle:"Untertitel"},chips:{alignment:"Ausrichtung"},weather:{show_conditions:"Bedingungen?",show_temperature:"Temperatur?"},update:{show_buttons_control:"Schaltflächensteuerung?"},vacuum:{commands:"Befehle"},"media-player":{use_media_info:"Medieninfos verwenden",use_media_artwork:"Mediengrafik verwenden",media_controls:"Mediensteuerung",media_controls_list:{on_off:"Ein/Aus",shuffle:"Zufällige Wiedergabe",previous:"Vorheriger Titel",play_pause_stop:"Play/Pause/Stop",next:"Nächster Titel",repeat:"Wiederholen"},volume_controls:"Lautstärkesteuerung",volume_controls_list:{volume_buttons:"Lautstärke Buttons",volume_set:"Lautstärke Level",volume_mute:"Stumm"}},lock:{lock:"Verriegeln",unlock:"Entriegeln",open:"Öffnen"}},chip:{sub_element_editor:{title:"Chip Editor"},conditional:{chip:"Chip"},"chip-picker":{chips:"Chips",details:"Zum Anzeigen von Details die Schaltfläche Bearbeiten auswählen",add:"Chip hinzufügen",edit:"Editieren",clear:"Löschen",select:"Chip auswählen",types:{action:"Aktion","alarm-control-panel":"Alarm",back:"Zurück",conditional:"Bedingung",entity:"Entität",light:"Licht",menu:"Menü",template:"Vorlage",weather:"Wetter"}}}},Zt={editor:Kt},Jt={form:{color_picker:{values:{default:"Προεπιλεγμένο χρώμα"}},info_picker:{values:{default:"Προεπιλεγμένες πληροφορίες",name:"Όνομα",state:"Κατάσταση","last-changed":"Τελευταία αλλαγή","last-updated":"Τελευταία ενημέρωση",none:"Τίποτα"}},layout_picker:{values:{default:"Προεπιλεγμένη διάταξη",vertical:"Κάθετη διάταξη",horizontal:"Οριζόντια διάταξη"}},alignment_picker:{values:{default:"Προεπιλεγμένη στοίχιση",start:"Στοίχιση αριστερά",end:"Στοίχιση δεξιά",center:"Στοίχιση στο κέντρο",justify:"Πλήρης στοίχιση"}}},card:{generic:{hide_name:"Απόκρυψη ονόματος;",hide_state:"Απόκρυψη κατάστασης;",hide_icon:"Απόκρυψη εικονιδίου;",icon_color:"Χρώμα εικονιδίου",layout:"Διάταξη",primary_info:"Πρωτεύουσες πληροφορίες",secondary_info:"Δευτερεύουσες πληροφορίες",content_info:"Περιεχόμενο",use_entity_picture:"Χρήση εικόνας οντότητας;"},light:{show_brightness_control:"Έλεγχος φωτεινότητας;",use_light_color:"Χρήση χρώματος φωτος",show_color_temp_control:"Έλεγχος χρώματος θερμοκρασίας;",show_color_control:"Έλεγχος χρώματος;",incompatible_controls:"Ορισμένα στοιχεία ελέγχου ενδέχεται να μην εμφανίζονται εάν το φωτιστικό σας δεν υποστηρίζει τη λειτουργία."},fan:{icon_animation:"Κίνηση εικονιδίου όταν είναι ενεργό;",show_percentage_control:"Έλεγχος ποσοστού;",show_oscillate_control:"Έλεγχος ταλάντωσης;"},cover:{show_buttons_control:"Έλεγχος κουμπιών;",show_position_control:"Έλεγχος θέσης;"},template:{primary:"Πρωτεύουσες πληροφορίες",secondary:"Δευτερεύουσες πληροφορίες",multiline_secondary:"Δευτερεύουσες πολλαπλών γραμμών;",entity_extra:"Χρησιμοποιείται σε πρότυπα και ενέργειες",content:"Περιεχόμενο"},title:{title:"Τίτλος",subtitle:"Υπότιτλος"},chips:{alignment:"Ευθυγράμμιση"},weather:{show_conditions:"Συνθήκες;",show_temperature:"Θερμοκρασία;"},update:{show_buttons_control:"Έλεγχος κουμπιών;"},vacuum:{commands:"Εντολές"},"media-player":{use_media_info:"Χρήση πληροφοριών πολυμέσων",use_media_artwork:"Χρήση έργων τέχνης πολυμέσων",media_controls:"Έλεγχος πολυμέσων",media_controls_list:{on_off:"Ενεργοποίηση/απενεργοποίηση",shuffle:"Τυχαία σειρά",previous:"Προηγούμενο κομμάτι",play_pause_stop:"Αναπαραγωγή/παύση/διακοπή",next:"Επόμενο κομμάτι",repeat:"Λειτουργία επανάληψης"},volume_controls:"Χειριστήρια έντασης ήχου",volume_controls_list:{volume_buttons:"Κουμπιά έντασης ήχου",volume_set:"Επίπεδο έντασης ήχου",volume_mute:"Σίγαση"}}},chip:{sub_element_editor:{title:"Επεξεργαστής Chip"},conditional:{chip:"Chip"},"chip-picker":{chips:"Chips",details:"Εμφάνιση λεπτομερειών κάνοντας κλικ στο κουμπί επεξεργασίας",add:"Προσθήκη chip",edit:"Επεξεργασία",clear:"Καθαρισμός",select:"Επιλογή chip",types:{action:"Ενέργεια","alarm-control-panel":"Συναγερμός",back:"Πίσω",conditional:"Υπό προϋποθέσεις",entity:"Οντότητα",light:"Φως",menu:"Μενού",template:"Πρότυπο",weather:"Καιρός"}}}},Qt={editor:Jt},te={form:{color_picker:{values:{default:"Default color"}},info_picker:{values:{default:"Default information",name:"Name",state:"State","last-changed":"Last Changed","last-updated":"Last Updated",none:"None"}},layout_picker:{values:{default:"Default layout",vertical:"Vertical layout",horizontal:"Horizontal layout"}},alignment_picker:{values:{default:"Default alignment",start:"Start",end:"End",center:"Center",justify:"Justify"}}},card:{generic:{hide_name:"Hide name?",hide_state:"Hide state?",hide_icon:"Hide icon?",icon_color:"Icon color",layout:"Layout",primary_info:"Primary information",secondary_info:"Secondary information",content_info:"Content",use_entity_picture:"Use entity picture?"},light:{show_brightness_control:"Brightness control?",use_light_color:"Use light color",show_color_temp_control:"Temperature color control?",show_color_control:"Color control?",incompatible_controls:"Some controls may not be displayed if your light does not support the feature."},fan:{icon_animation:"Animate icon when active?",show_percentage_control:"Percentage control?",show_oscillate_control:"Oscillate control?"},cover:{show_buttons_control:"Control buttons?",show_position_control:"Position control?"},alarm_control_panel:{show_keypad:"Show keypad"},template:{primary:"Primary information",secondary:"Secondary information",multiline_secondary:"Multiline secondary?",entity_extra:"Used in templates and actions",content:"Content"},title:{title:"Title",subtitle:"Subtitle"},chips:{alignment:"Alignment"},weather:{show_conditions:"Conditions?",show_temperature:"Temperature?"},update:{show_buttons_control:"Control buttons?"},vacuum:{commands:"Commands"},"media-player":{use_media_info:"Use media info",use_media_artwork:"Use media artwork",media_controls:"Media controls",media_controls_list:{on_off:"Turn on/off",shuffle:"Shuffle",previous:"Previous track",play_pause_stop:"Play/pause/stop",next:"Next track",repeat:"Repeat mode"},volume_controls:"Volume controls",volume_controls_list:{volume_buttons:"Volume buttons",volume_set:"Volume level",volume_mute:"Mute"}},lock:{lock:"Lock",unlock:"Unlock",open:"Open"}},chip:{sub_element_editor:{title:"Chip editor"},conditional:{chip:"Chip"},"chip-picker":{chips:"Chips",details:"Show details by clicking the edit button",add:"Add chip",edit:"Edit",clear:"Clear",select:"Select chip",types:{action:"Action","alarm-control-panel":"Alarm",back:"Back",conditional:"Conditional",entity:"Entity",light:"Light",menu:"Menu",template:"Template",weather:"Weather"}}}},ee={editor:te},ie={form:{color_picker:{values:{default:"Couleur par défaut"}},info_picker:{values:{default:"Information par défaut",name:"Nom",state:"État","last-changed":"Dernière modification","last-updated":"Dernière mise à jour",none:"Aucune"}},layout_picker:{values:{default:"Disposition par défault",vertical:"Disposition verticale",horizontal:"Disposition horizontale"}},alignment_picker:{values:{default:"Alignement par défaut",start:"Début",end:"Fin",center:"Centré",justify:"Justifié"}}},card:{generic:{hide_name:"Cacher le nom ?",hide_state:"Cacher l'état ?",hide_icon:"Cacher l'icône ?",icon_color:"Couleur de l'icône",layout:"Disposition",primary_info:"Information principale",secondary_info:"Information secondaire",content_info:"Contenu",use_entity_picture:"Utiliser l'image de l'entité ?"},light:{show_brightness_control:"Contrôle de luminosité ?",use_light_color:"Utiliser la couleur de la lumière",show_color_temp_control:"Contrôle de la température ?",show_color_control:"Contrôle de la couleur ?",incompatible_controls:"Certains contrôles peuvent ne pas être affichés si votre lumière ne supporte pas la fonctionnalité."},fan:{icon_animation:"Animation de l'icône ?",show_percentage_control:"Contrôle de la vitesse ?",show_oscillate_control:"Contrôle de l'oscillation ?"},cover:{show_buttons_control:"Contrôle avec boutons ?",show_position_control:"Contrôle de la position ?"},alarm_control_panel:{show_keypad:"Afficher le clavier"},template:{primary:"Information principale",secondary:"Information secondaire",multiline_secondary:"Information secondaire sur plusieurs lignes ?",entity_extra:"Utilisée pour les templates et les actions",content:"Contenu"},title:{title:"Titre",subtitle:"Sous-titre"},chips:{alignment:"Alignement"},weather:{show_conditons:"Conditions ?",show_temperature:"Température ?"},update:{show_buttons_control:"Contrôle avec boutons ?"},vacuum:{commands:"Commandes"},"media-player":{use_media_info:"Utiliser les informations du media",use_media_artwork:"Utiliser l'illustration du media",media_controls:"Contrôles du media",media_controls_list:{on_off:"Allumer/Éteindre",shuffle:"Lecture aléatoire",previous:"Précédent",play_pause_stop:"Lecture/pause/stop",next:"Suivant",repeat:"Mode de répétition"},volume_controls:"Contrôles du volume",volume_controls_list:{volume_buttons:"Bouton de volume",volume_set:"Niveau de volume",volume_mute:"Muet"}},lock:{lock:"Verrouiller",unlock:"Déverrouiller",open:"Ouvrir"}},chip:{sub_element_editor:{title:'Éditeur de "chip"'},conditional:{chip:"Chip"},"chip-picker":{chips:'"Chips"',details:"Affichez les détails en cliquant sur le bouton Modifier",add:'Ajouter une "chip"',edit:"Modifier",clear:"Effacer",select:'Sélectionner une "chip"',types:{action:"Action","alarm-control-panel":"Alarme",back:"Retour",conditional:"Conditionnel",entity:"Entité",light:"Lumière",menu:"Menu",template:"Template",weather:"Météo"}}}},ne={editor:ie},oe={form:{color_picker:{values:{default:"Colore predefinito"}},info_picker:{values:{default:"Informazione predefinita",name:"Nome",state:"Stato","last-changed":"Ultimo Cambiamento","last-updated":"Ultimo Aggiornamento",none:"Nessuno"}},layout_picker:{values:{default:"Disposizione Predefinita",vertical:"Disposizione Verticale",horizontal:"Disposizione Orizzontale"}},alignment_picker:{values:{default:"Allineamento predefinito",start:"Inizio",end:"Fine",center:"Centro",justify:"Giustificato"}}},card:{generic:{hide_name:"Nascondi nome",hide_state:"Nascondi stato",hide_icon:"Nascondi icona",icon_color:"Colore dell'icona",layout:"Disposizione",primary_info:"Informazione primaria",secondary_info:"Informazione secondaria",content_info:"Contenuto",use_entity_picture:"Usa l'immagine dell'entità"},light:{use_light_color:"Usa il colore della luce",show_brightness_control:"Controllo luminosità",show_color_temp_control:"Controllo temperatura",show_color_control:"Controllo colore",incompatible_controls:"Alcuni controlli potrebbero non essere mostrati se la tua luce non li supporta."},fan:{icon_animation:"Anima l'icona quando attiva",show_percentage_control:"Controllo potenza",show_oscillate_control:"Controllo oscillazione"},cover:{show_buttons_control:"Pulsanti di controllo",show_position_control:"Controllo percentuale apertura"},template:{primary:"Informazione primaria",secondary:"Informazione secondaria",multiline_secondary:"Abilita frasi multilinea",entity_extra:"Usato in templates ed azioni",content:"Contenuto"},title:{title:"Titolo",subtitle:"Sottotitolo"},chips:{alignment:"Allineamento"},weather:{show_conditions:"Condizioni",show_temperature:"Temperatura"},update:{show_buttons_control:"Pulsanti di controllo"},vacuum:{commands:"Comandi"},"media-player":{use_media_info:"Mostra le Informazioni Sorgente",use_media_artwork:"Usa la copertina della Sorgente",media_controls:"Controlli Media",media_controls_list:{on_off:"Accendi/Spegni",shuffle:"Riproduzione Casuale",previous:"Traccia Precedente",play_pause_stop:"Play/Pausa/Stop",next:"Traccia Successiva",repeat:"Loop"},volume_controls:"Controlli del Volume",volume_controls_list:{volume_buttons:"Bottoni del Volume",volume_set:"Livello del Volume",volume_mute:"Silenzia"}},lock:{lock:"Blocca",unlock:"Sblocca",open:"Aperto"}},chip:{sub_element_editor:{title:"Editor di chip"},conditional:{chip:"Chip"},"chip-picker":{chips:"Chips",details:"Mostra i dettagli cliccando sul bottone di modifica",add:"Aggiungi chip",edit:"Modifica",clear:"Rimuovi",select:"Seleziona chip",types:{action:"Azione","alarm-control-panel":"Allarme",back:"Pulsante indietro",conditional:"Condizione",entity:"Entità",light:"Luce",menu:"Menù",template:"Template",weather:"Meteo"}}}},re={editor:oe},ae={form:{color_picker:{values:{default:"Standard farge"}},info_picker:{values:{default:"Standard informasjon",name:"Navn",state:"Tilstand","last-changed":"Sist endret","last-updated":"Sist oppdatert",none:"Ingen"}},layout_picker:{values:{default:"Standardoppsett",vertical:"Vertikalt oppsett",horizontal:"Horisontalt oppsett"}},alignment_picker:{values:{default:"Standard justering",start:"Start",end:"Slutt",center:"Senter",justify:"Bekreft"}}},card:{generic:{hide_name:"Skjule navn?",hide_state:"Skjule tilstand?",hide_icon:"Skjul ikon?",icon_color:"Ikon farge",layout:"Oppsett",primary_info:"Primærinformasjon",secondary_info:"Sekundærinformasjon",content_info:"Innhold",use_entity_picture:"Bruk enhetsbilde?"},light:{show_brightness_control:"Lysstyrkekontroll?",use_light_color:"Bruk lys farge",show_color_temp_control:"Temperatur fargekontroll?",show_color_control:"Fargekontroll?",incompatible_controls:"Noen kontroller vises kanskje ikke hvis lyset ditt ikke støtter denne funksjonen."},fan:{icon_animation:"Animer ikon når aktivt?",show_percentage_control:"Prosentvis kontroll?",show_oscillate_control:"Oscillerende kontroll?"},cover:{show_buttons_control:"Kontollere med knapper?",show_position_control:"Posisjonskontroll?"},template:{primary:"Primærinformasjon",secondary:"Sekundærinformasjon",multiline_secondary:"Multiline sekundær?",entity_extra:"Brukes i maler og handlinger",content:"Inhold"},title:{title:"Tittel",subtitle:"Undertekst"},chips:{alignment:"Justering"},weather:{show_conditions:"Forhold?",show_temperature:"Temperatur?"}},chip:{sub_element_editor:{title:"Chip redaktør"},conditional:{chip:"Chip"},"chip-picker":{chips:"Chips",details:"Vis detaljer ved å klikke på rediger-knappen",add:"Legg til chip",edit:"Endre",clear:"Klare",select:"Velg chip",types:{action:"Handling","alarm-control-panel":"Alarm",back:"Tilbake",conditional:"Betinget",entity:"Entitet",light:"Lys",menu:"Meny",template:"Mal",weather:"Vær"}}}},se={editor:ae},le={form:{color_picker:{values:{default:"Standaard kleur"}},info_picker:{values:{default:"Standaard informatie",name:"Naam",state:"Staat","last-changed":"Laatst gewijzigd","last-updated":"Laatst bijgewerkt",none:"Geen"}},layout_picker:{values:{default:"Standaard lay-out",vertical:"Verticale lay-out",horizontal:"Horizontale lay-out"}},alignment_picker:{values:{default:"Standaard uitlijning",start:"Begin",end:"Einde",center:"Midden",justify:"Uitlijnen "}}},card:{generic:{hide_name:"Verberg naam",hide_state:"Verberg staat",hide_icon:"Verberg icoon",icon_color:"Icoon kleur",layout:"Lay-out",primary_info:"Primaire informatie",secondary_info:"Secundaire informatie",content_info:"Inhoud",use_entity_picture:"Gebruik entiteit afbeelding"},light:{show_brightness_control:"Bediening helderheid",use_light_color:"Gebruik licht kleur",show_color_temp_control:"Bediening kleurtemperatuur",show_color_control:"Bediening kleur",incompatible_controls:"Sommige bedieningselementen worden mogelijk niet weergegeven als uw lamp deze functie niet ondersteunt."},fan:{icon_animation:"Pictogram animeren indien actief",show_percentage_control:"Bediening middels percentage",show_oscillate_control:"Bediening oscillatie"},cover:{show_buttons_control:"Bediening middels knoppen",show_position_control:"Bediening middels positie"},alarm_control_panel:{show_keypad:"Toon toetsenbord"},template:{primary:"Primaire informatie",secondary:"Secundaire informatie",multiline_secondary:"Meerlijnig secundair?",entity_extra:"Gebruikt in sjablonen en acties",content:"Inhoud"},title:{title:"Titel",subtitle:"Ondertitel"},chips:{alignment:"Uitlijning"},weather:{show_conditions:"Weerbeeld",show_temperature:"Temperatuur"},update:{show_buttons_control:"Bedieningsknoppen?"},vacuum:{commands:"Commando's"},"media-player":{use_media_info:"Gebruik media informatie",use_media_artwork:"Gebruik media omslag",media_controls:"Mediabediening",media_controls_list:{on_off:"zet aan/uit",shuffle:"Shuffle",previous:"Vorige nummer",play_pause_stop:"Speel/pauze/stop",next:"Volgende nummer",repeat:"Herhaal modes"},volume_controls:"Volumeregeling",volume_controls_list:{volume_buttons:"Volume knoppen",volume_set:"Volumeniveau",volume_mute:"Demp"}},lock:{lock:"Vergrendel",unlock:"Ontgrendel",open:"Open"}},chip:{sub_element_editor:{title:"Chip-editor"},conditional:{chip:"Chip"},"chip-picker":{chips:"Chips",details:"Om meer details te tonen klik de edit knop",add:"Toevoegen chip",edit:"Bewerk",clear:"Maak leeg",select:"Selecteer chip",types:{action:"Actie","alarm-control-panel":"Alarm",back:"Terug",conditional:"Voorwaardelijk",entity:"Entiteit",light:"Licht",menu:"Menu",template:"Sjabloon",weather:"Weer"}}}},ce={editor:le},de={form:{color_picker:{values:{default:"Cor padrão"}},info_picker:{values:{default:"Informações padrão",name:"Nome",state:"Estado","last-changed":"Última alteração","last-updated":"Última atualização",none:"Nenhum"}},layout_picker:{values:{default:"Layout padrão",vertical:"Layout vertical",horizontal:"Layout horizontal"}},alignment_picker:{values:{default:"Padrão (inicio)",end:"Final",center:"Centro",justify:"Justificado"}}},card:{generic:{hide_name:"Ocultar nome?",hide_state:"Ocultar estado?",hide_icon:"Ocultar ícone?",icon_color:"Cor do ícone?",layout:"Layout",primary_info:"Informações primárias",secondary_info:"Informações secundárias",use_entity_picture:"Usar imagem da entidade?"},light:{show_brightness_control:"Mostrar controle de brilho?",use_light_color:"Usar cor da luz?",show_color_temp_control:"Mostrar controle de temperatura?",show_color_control:"Mostrar controle de cor?",incompatible_controls:"Alguns controles podem não ser exibidos se sua luz não suportar o recurso."},fan:{icon_animation:"Animar ícone quando ativo?",show_percentage_control:"Mostrar controle de porcentagem?",show_oscillate_control:"Mostrar controle de oscilação?"},cover:{show_buttons_control:"Mostrar botões?",show_position_control:"Mostrar controle de posição?"},template:{primary:"Informações primárias",secondary:"Informações secundárias",multiline_secondary:"Multilinha secundária?",content:"Conteúdo"},title:{title:"Título",subtitle:"Subtítulo"},chips:{alignment:"Alinhamento"},weather:{show_conditions:"Condições?",show_temperature:"Temperatura?"}},chip:{sub_element_editor:{title:"Editor de fichas"},conditional:{chip:"Ficha"},"chip-picker":{chips:"Fichas",details:"Mostrar detalhes clicando no botão editar",add:"Adicionar ficha",edit:"Editar",clear:"Limpar",select:"Selecionar ficha",types:{action:"Ação","alarm-control-panel":"Alarme",back:"Voltar",conditional:"Condicional",entity:"Entidade",light:"Iluminação",menu:"Menu",template:"Modelo",weather:"Clima"}}}},ue={editor:de},he={form:{color_picker:{values:{default:"Standardfärg"}},info_picker:{values:{default:"Förvald information",name:"Namn",state:"Status","last-changed":"Sist ändrad","last-updated":"Sist uppdaterad",none:"Ingen"}},layout_picker:{values:{default:"Standard",vertical:"Vertikal",horizontal:"Horisontell"}},alignment_picker:{values:{default:"Standard (början)",end:"Slutet",center:"Centrerad",justify:"Anpassa"}}},card:{generic:{hide_name:"Göm namn",hide_state:"Göm status?",hide_icon:"Göm ikon?",icon_color:"Ikonens färg",layout:"Layout",primary_info:"Primär information",secondary_info:"Sekundär information",use_entity_picture:"Använd enheten bild?"},light:{show_brightness_control:"Styr ljushet?",use_light_color:"Styr ljusets färg",show_color_temp_control:"Styr färgtemperatur?",show_color_control:"Styr färg?",incompatible_controls:"Kontroller som inte stöds av enheten kommer inte visas."},fan:{icon_animation:"Animera ikonen när fläkten är på?",show_percentage_control:"Procentuell kontroll?",show_oscillate_control:"Kontroll för oscillera?"},cover:{show_buttons_control:"Visa kontrollknappar?",show_position_control:"Visa positionskontroll?"},template:{primary:"Primär information",secondary:"Sekundär information",multiline_secondary:"Sekundär med flera rader?",content:"Innehåll"},title:{title:"Rubrik",subtitle:"Underrubrik"},chips:{alignment:"Justering"},weather:{show_conditions:"Förhållanden?",show_temperature:"Temperatur?"}},chip:{sub_element_editor:{title:"Chipredigerare"},conditional:{chip:"Chip"},"chip-picker":{chips:"Chips",details:"Visa detaljer genom att klicka på knappen Redigera",add:"Lägg till chip",edit:"Redigera",clear:"Rensa",select:"Välj chip",types:{action:"Händelse","alarm-control-panel":"Alarm",back:"Bakåt",conditional:"Villkorad",entity:"Enhet",light:"Ljus",menu:"Meny",template:"Mall",weather:"Väder"}}}},me={editor:he},pe={form:{color_picker:{values:{default:"Varsayılan renk"}},info_picker:{values:{default:"Varsayılan bilgi",name:"İsim",state:"Durum","last-changed":"Son Değişim","last-updated":"Son Güncelleme",none:"None"}},layout_picker:{values:{default:"Varsayılan düzen",vertical:"Dikey düzen",horizontal:"Yatay düzen"}},alignment_picker:{values:{default:"Varsayılan hizalama",start:"Sola yasla",end:"Sağa yasla",center:"Ortala",justify:"İki yana yasla"}}},card:{generic:{hide_name:"İsim gizlensin",hide_state:"Durum gizlensin",hide_icon:"Simge gizlensin",icon_color:"Simge renki",layout:"Düzen",primary_info:"Birinci bilgi",secondary_info:"İkinci bilgi",content_info:"İçerik",use_entity_picture:"Varlık resmi kullanılsın"},light:{show_brightness_control:"Parlaklık kontrolü",use_light_color:"Işık rengini kullan",show_color_temp_control:"Renk ısısı kontrolü",show_color_control:"Renk kontrolü",incompatible_controls:"Kullandığınız lamba bu özellikleri desteklemiyorsa bazı kontroller görüntülenemeyebilir."},fan:{icon_animation:"Aktif olduğunda simgeyi hareket ettir",show_percentage_control:"Yüzde kontrolü",show_oscillate_control:"Salınım kontrolü"},cover:{show_buttons_control:"Düğme kontrolleri",show_position_control:"Pozisyon kontrolü"},template:{primary:"Birinci bilgi",secondary:"İkinci bilgi",multiline_secondary:"İkinci bilgi çok satır olsun",entity_extra:"Şablonlarda ve eylemlerde kullanılsın",content:"İçerik"},title:{title:"Başlık",subtitle:"Altbaşlık"},chips:{alignment:"Hizalama"},weather:{show_conditions:"Hava koşulu",show_temperature:"Sıcaklık"},update:{show_buttons_control:"Düğme kontrolü"},vacuum:{commands:"Komutlar"}},chip:{sub_element_editor:{title:"Chip düzenleyici"},conditional:{chip:"Chip"},"chip-picker":{chips:"Chips",details:"Düzenleme butonuna basıldığında detaylar görüntülenir",add:"Chip ekle",edit:"Düzenle",clear:"Temizle",select:"Chip seç",types:{action:"Eylem","alarm-control-panel":"Alarm",back:"Geri",conditional:"Koşullu",entity:"Varlık",light:"Işık",menu:"Menü",template:"Şablon",weather:"Hava Durumu"}}}},fe={editor:pe},ge={form:{color_picker:{values:{default:"默认颜色"}},info_picker:{values:{default:"默认信息",name:"名称",state:"状态","last-changed":"变更时间","last-updated":"更新时间",none:"无"}},layout_picker:{values:{default:"默认布局",vertical:"垂直布局",horizontal:"水平布局"}},alignment_picker:{values:{default:"默认 (左对齐)",end:"右对齐",center:"居中对齐",justify:"两端对齐"}}},card:{generic:{hide_name:"隐藏名称?",hide_state:"隐藏状态?",hide_icon:"隐藏图标?",icon_color:"图标颜色",primary_info:"首要信息",secondary_info:"次要信息",use_entity_picture:"使用实体图片?"},light:{show_brightness_control:"亮度控制?",use_light_color:"使用灯光颜色",show_color_temp_control:"色温控制?",show_color_control:"颜色控制?",incompatible_controls:"设备不支持的控制器将不会显示。"},fan:{icon_animation:"激活时使用动态图标?",show_percentage_control:"百分比控制?",show_oscillate_control:"摆动控制?"},cover:{show_buttons_control:"按钮控制?",show_position_control:"位置控制?"},template:{primary:"首要信息",secondary:"次要信息",multiline_secondary:"多行次要信息?",content:"内容"},title:{title:"标题",subtitle:"子标题"},chips:{alignment:"对齐"},weather:{show_conditions:"条件?",show_temperature:"温度?"}},chip:{sub_element_editor:{title:"Chip 编辑"},conditional:{chip:"Chip"},"chip-picker":{chips:"Chips",details:"点击编辑按钮查看",add:"添加 chip",edit:"编辑",clear:"清除",select:"选择 chip",types:{action:"动作","alarm-control-panel":"警戒控制台",back:"返回",conditional:"条件显示",entity:"实体",light:"灯光",menu:"菜单",template:"模板",weather:"天气"}}}},_e={editor:ge},be={form:{color_picker:{values:{default:"預設顏色"}},info_picker:{values:{default:"預設訊息",name:"名稱",state:"狀態","last-changed":"最近變動時間","last-updated":"最近更新時間",none:"無"}},layout_picker:{values:{default:"預設佈局",vertical:"垂直佈局",horizontal:"水平佈局"}},alignment_picker:{values:{default:"預設對齊",start:"居左對齊",end:"居右對齊",center:"居中對齊",justify:"兩端對齊"}}},card:{generic:{hide_name:"隱藏名稱?",hide_state:"隱藏狀態?",hide_icon:"隱藏圖示?",icon_color:"圖示顏色",layout:"佈局",primary_info:"主要訊息",secondary_info:"次要訊息",content_info:"內容",use_entity_picture:"使用實體圖片?"},light:{show_brightness_control:"亮度控制?",use_light_color:"使用燈光顏色",show_color_temp_control:"色溫控制?",show_color_control:"色彩控制?",incompatible_controls:"裝置不支援的控制不會顯示。"},fan:{icon_animation:"啟動時使用動態圖示?",show_percentage_control:"百分比控制?",show_oscillate_control:"擺頭控制?"},cover:{show_buttons_control:"按鈕控制?",show_position_control:"位置控制?"},alarm_control_panel:{show_keypad:"顯示鍵盤"},template:{primary:"主要訊息",secondary:"次要訊息",multiline_secondary:"多行次要訊息?",entity_extra:"用於模板與動作",content:"內容"},title:{title:"標題",subtitle:"副標題"},chips:{alignment:"對齊"},weather:{show_conditions:"狀況?",show_temperature:"溫度?"},update:{show_buttons_control:"按鈕控制?"},vacuum:{commands:"指令"},"media-player":{use_media_info:"使用媒體資訊",use_media_artwork:"使用媒體插圖",media_controls:"媒體控制",media_controls_list:{on_off:" 開啟、關閉",shuffle:"隨機播放",previous:"上一首",play_pause_stop:"播放、暫停、停止",next:"下一首",repeat:"重複播放"},volume_controls:"音量控制",volume_controls_list:{volume_buttons:"音量按鈕",volume_set:"音量等級",volume_mute:"靜音"}},lock:{lock:"上鎖",unlock:"解鎖",open:"打開"}},chip:{sub_element_editor:{title:"Chip 編輯"},conditional:{chip:"Chip"},"chip-picker":{chips:"Chips",details:"點擊編輯按鈕來查看詳細訊息",add:"新增 chip",edit:"編輯",clear:"清除",select:"選擇 chip",types:{action:"動作","alarm-control-panel":"警報器控制",back:"返回",conditional:"條件",entity:"實體",light:"燈光",menu:"選單",template:"模板",weather:"天氣"}}}},ve={editor:be};const ye={de:Object.freeze({__proto__:null,editor:Kt,default:Zt}),el:Object.freeze({__proto__:null,editor:Jt,default:Qt}),en:Object.freeze({__proto__:null,editor:te,default:ee}),fr:Object.freeze({__proto__:null,editor:ie,default:ne}),it:Object.freeze({__proto__:null,editor:oe,default:re}),nb:Object.freeze({__proto__:null,editor:ae,default:se}),nl:Object.freeze({__proto__:null,editor:le,default:ce}),"pt-BR":Object.freeze({__proto__:null,editor:de,default:ue}),sv:Object.freeze({__proto__:null,editor:he,default:me}),tr:Object.freeze({__proto__:null,editor:pe,default:fe}),"zh-Hans":Object.freeze({__proto__:null,editor:ge,default:_e}),"zh-Hant":Object.freeze({__proto__:null,editor:be,default:ve})};function xe(t,e){try{return t.split(".").reduce(((t,e)=>t[e]),ye[e])}catch(t){return}}function we(t){return function(e){var i;let n=xe(e,null!==(i=null==t?void 0:t.locale.language)&&void 0!==i?i:"en");return n||(n=xe(e,"en")),null!=n?n:e}}var Ce={exports:{}},ke={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]},$e={exports:{}},Ee=function(t){return!(!t||"string"==typeof t)&&(t instanceof Array||Array.isArray(t)||t.length>=0&&(t.splice instanceof Function||Object.getOwnPropertyDescriptor(t,t.length-1)&&"String"!==t.constructor.name))},Ae=Array.prototype.concat,Se=Array.prototype.slice,Ie=$e.exports=function(t){for(var e=[],i=0,n=t.length;i=4&&1!==t[3]&&(e=", "+t[3]),"hwb("+t[0]+", "+t[1]+"%, "+t[2]+"%"+e+")"},ze.to.keyword=function(t){return De[t.slice(0,3)]};const Re=ke,Pe={};for(const t of Object.keys(Re))Pe[Re[t]]=t;const Fe={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};var Ve=Fe;for(const t of Object.keys(Fe)){if(!("channels"in Fe[t]))throw new Error("missing channels property: "+t);if(!("labels"in Fe[t]))throw new Error("missing channel labels property: "+t);if(Fe[t].labels.length!==Fe[t].channels)throw new Error("channel and label counts mismatch: "+t);const{channels:e,labels:i}=Fe[t];delete Fe[t].channels,delete Fe[t].labels,Object.defineProperty(Fe[t],"channels",{value:e}),Object.defineProperty(Fe[t],"labels",{value:i})}function Be(t,e){return(t[0]-e[0])**2+(t[1]-e[1])**2+(t[2]-e[2])**2}Fe.rgb.hsl=function(t){const e=t[0]/255,i=t[1]/255,n=t[2]/255,o=Math.min(e,i,n),r=Math.max(e,i,n),a=r-o;let s,l;r===o?s=0:e===r?s=(i-n)/a:i===r?s=2+(n-e)/a:n===r&&(s=4+(e-i)/a),s=Math.min(60*s,360),s<0&&(s+=360);const c=(o+r)/2;return l=r===o?0:c<=.5?a/(r+o):a/(2-r-o),[s,100*l,100*c]},Fe.rgb.hsv=function(t){let e,i,n,o,r;const a=t[0]/255,s=t[1]/255,l=t[2]/255,c=Math.max(a,s,l),d=c-Math.min(a,s,l),u=function(t){return(c-t)/6/d+.5};return 0===d?(o=0,r=0):(r=d/c,e=u(a),i=u(s),n=u(l),a===c?o=n-i:s===c?o=1/3+e-n:l===c&&(o=2/3+i-e),o<0?o+=1:o>1&&(o-=1)),[360*o,100*r,100*c]},Fe.rgb.hwb=function(t){const e=t[0],i=t[1];let n=t[2];const o=Fe.rgb.hsl(t)[0],r=1/255*Math.min(e,Math.min(i,n));return n=1-1/255*Math.max(e,Math.max(i,n)),[o,100*r,100*n]},Fe.rgb.cmyk=function(t){const e=t[0]/255,i=t[1]/255,n=t[2]/255,o=Math.min(1-e,1-i,1-n);return[100*((1-e-o)/(1-o)||0),100*((1-i-o)/(1-o)||0),100*((1-n-o)/(1-o)||0),100*o]},Fe.rgb.keyword=function(t){const e=Pe[t];if(e)return e;let i,n=1/0;for(const e of Object.keys(Re)){const o=Be(t,Re[e]);o.04045?((e+.055)/1.055)**2.4:e/12.92,i=i>.04045?((i+.055)/1.055)**2.4:i/12.92,n=n>.04045?((n+.055)/1.055)**2.4:n/12.92;return[100*(.4124*e+.3576*i+.1805*n),100*(.2126*e+.7152*i+.0722*n),100*(.0193*e+.1192*i+.9505*n)]},Fe.rgb.lab=function(t){const e=Fe.rgb.xyz(t);let i=e[0],n=e[1],o=e[2];i/=95.047,n/=100,o/=108.883,i=i>.008856?i**(1/3):7.787*i+16/116,n=n>.008856?n**(1/3):7.787*n+16/116,o=o>.008856?o**(1/3):7.787*o+16/116;return[116*n-16,500*(i-n),200*(n-o)]},Fe.hsl.rgb=function(t){const e=t[0]/360,i=t[1]/100,n=t[2]/100;let o,r,a;if(0===i)return a=255*n,[a,a,a];o=n<.5?n*(1+i):n+i-n*i;const s=2*n-o,l=[0,0,0];for(let t=0;t<3;t++)r=e+1/3*-(t-1),r<0&&r++,r>1&&r--,a=6*r<1?s+6*(o-s)*r:2*r<1?o:3*r<2?s+(o-s)*(2/3-r)*6:s,l[t]=255*a;return l},Fe.hsl.hsv=function(t){const e=t[0];let i=t[1]/100,n=t[2]/100,o=i;const r=Math.max(n,.01);n*=2,i*=n<=1?n:2-n,o*=r<=1?r:2-r;return[e,100*(0===n?2*o/(r+o):2*i/(n+i)),100*((n+i)/2)]},Fe.hsv.rgb=function(t){const e=t[0]/60,i=t[1]/100;let n=t[2]/100;const o=Math.floor(e)%6,r=e-Math.floor(e),a=255*n*(1-i),s=255*n*(1-i*r),l=255*n*(1-i*(1-r));switch(n*=255,o){case 0:return[n,l,a];case 1:return[s,n,a];case 2:return[a,n,l];case 3:return[a,s,n];case 4:return[l,a,n];case 5:return[n,a,s]}},Fe.hsv.hsl=function(t){const e=t[0],i=t[1]/100,n=t[2]/100,o=Math.max(n,.01);let r,a;a=(2-i)*n;const s=(2-i)*o;return r=i*o,r/=s<=1?s:2-s,r=r||0,a/=2,[e,100*r,100*a]},Fe.hwb.rgb=function(t){const e=t[0]/360;let i=t[1]/100,n=t[2]/100;const o=i+n;let r;o>1&&(i/=o,n/=o);const a=Math.floor(6*e),s=1-n;r=6*e-a,0!=(1&a)&&(r=1-r);const l=i+r*(s-i);let c,d,u;switch(a){default:case 6:case 0:c=s,d=l,u=i;break;case 1:c=l,d=s,u=i;break;case 2:c=i,d=s,u=l;break;case 3:c=i,d=l,u=s;break;case 4:c=l,d=i,u=s;break;case 5:c=s,d=i,u=l}return[255*c,255*d,255*u]},Fe.cmyk.rgb=function(t){const e=t[0]/100,i=t[1]/100,n=t[2]/100,o=t[3]/100;return[255*(1-Math.min(1,e*(1-o)+o)),255*(1-Math.min(1,i*(1-o)+o)),255*(1-Math.min(1,n*(1-o)+o))]},Fe.xyz.rgb=function(t){const e=t[0]/100,i=t[1]/100,n=t[2]/100;let o,r,a;return o=3.2406*e+-1.5372*i+-.4986*n,r=-.9689*e+1.8758*i+.0415*n,a=.0557*e+-.204*i+1.057*n,o=o>.0031308?1.055*o**(1/2.4)-.055:12.92*o,r=r>.0031308?1.055*r**(1/2.4)-.055:12.92*r,a=a>.0031308?1.055*a**(1/2.4)-.055:12.92*a,o=Math.min(Math.max(0,o),1),r=Math.min(Math.max(0,r),1),a=Math.min(Math.max(0,a),1),[255*o,255*r,255*a]},Fe.xyz.lab=function(t){let e=t[0],i=t[1],n=t[2];e/=95.047,i/=100,n/=108.883,e=e>.008856?e**(1/3):7.787*e+16/116,i=i>.008856?i**(1/3):7.787*i+16/116,n=n>.008856?n**(1/3):7.787*n+16/116;return[116*i-16,500*(e-i),200*(i-n)]},Fe.lab.xyz=function(t){let e,i,n;i=(t[0]+16)/116,e=t[1]/500+i,n=i-t[2]/200;const o=i**3,r=e**3,a=n**3;return i=o>.008856?o:(i-16/116)/7.787,e=r>.008856?r:(e-16/116)/7.787,n=a>.008856?a:(n-16/116)/7.787,e*=95.047,i*=100,n*=108.883,[e,i,n]},Fe.lab.lch=function(t){const e=t[0],i=t[1],n=t[2];let o;o=360*Math.atan2(n,i)/2/Math.PI,o<0&&(o+=360);return[e,Math.sqrt(i*i+n*n),o]},Fe.lch.lab=function(t){const e=t[0],i=t[1],n=t[2]/360*2*Math.PI;return[e,i*Math.cos(n),i*Math.sin(n)]},Fe.rgb.ansi16=function(t,e=null){const[i,n,o]=t;let r=null===e?Fe.rgb.hsv(t)[2]:e;if(r=Math.round(r/50),0===r)return 30;let a=30+(Math.round(o/255)<<2|Math.round(n/255)<<1|Math.round(i/255));return 2===r&&(a+=60),a},Fe.hsv.ansi16=function(t){return Fe.rgb.ansi16(Fe.hsv.rgb(t),t[2])},Fe.rgb.ansi256=function(t){const e=t[0],i=t[1],n=t[2];if(e===i&&i===n)return e<8?16:e>248?231:Math.round((e-8)/247*24)+232;return 16+36*Math.round(e/255*5)+6*Math.round(i/255*5)+Math.round(n/255*5)},Fe.ansi16.rgb=function(t){let e=t%10;if(0===e||7===e)return t>50&&(e+=3.5),e=e/10.5*255,[e,e,e];const i=.5*(1+~~(t>50));return[(1&e)*i*255,(e>>1&1)*i*255,(e>>2&1)*i*255]},Fe.ansi256.rgb=function(t){if(t>=232){const e=10*(t-232)+8;return[e,e,e]}let e;t-=16;return[Math.floor(t/36)/5*255,Math.floor((e=t%36)/6)/5*255,e%6/5*255]},Fe.rgb.hex=function(t){const e=(((255&Math.round(t[0]))<<16)+((255&Math.round(t[1]))<<8)+(255&Math.round(t[2]))).toString(16).toUpperCase();return"000000".substring(e.length)+e},Fe.hex.rgb=function(t){const e=t.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!e)return[0,0,0];let i=e[0];3===e[0].length&&(i=i.split("").map((t=>t+t)).join(""));const n=parseInt(i,16);return[n>>16&255,n>>8&255,255&n]},Fe.rgb.hcg=function(t){const e=t[0]/255,i=t[1]/255,n=t[2]/255,o=Math.max(Math.max(e,i),n),r=Math.min(Math.min(e,i),n),a=o-r;let s,l;return s=a<1?r/(1-a):0,l=a<=0?0:o===e?(i-n)/a%6:o===i?2+(n-e)/a:4+(e-i)/a,l/=6,l%=1,[360*l,100*a,100*s]},Fe.hsl.hcg=function(t){const e=t[1]/100,i=t[2]/100,n=i<.5?2*e*i:2*e*(1-i);let o=0;return n<1&&(o=(i-.5*n)/(1-n)),[t[0],100*n,100*o]},Fe.hsv.hcg=function(t){const e=t[1]/100,i=t[2]/100,n=e*i;let o=0;return n<1&&(o=(i-n)/(1-n)),[t[0],100*n,100*o]},Fe.hcg.rgb=function(t){const e=t[0]/360,i=t[1]/100,n=t[2]/100;if(0===i)return[255*n,255*n,255*n];const o=[0,0,0],r=e%1*6,a=r%1,s=1-a;let l=0;switch(Math.floor(r)){case 0:o[0]=1,o[1]=a,o[2]=0;break;case 1:o[0]=s,o[1]=1,o[2]=0;break;case 2:o[0]=0,o[1]=1,o[2]=a;break;case 3:o[0]=0,o[1]=s,o[2]=1;break;case 4:o[0]=a,o[1]=0,o[2]=1;break;default:o[0]=1,o[1]=0,o[2]=s}return l=(1-i)*n,[255*(i*o[0]+l),255*(i*o[1]+l),255*(i*o[2]+l)]},Fe.hcg.hsv=function(t){const e=t[1]/100,i=e+t[2]/100*(1-e);let n=0;return i>0&&(n=e/i),[t[0],100*n,100*i]},Fe.hcg.hsl=function(t){const e=t[1]/100,i=t[2]/100*(1-e)+.5*e;let n=0;return i>0&&i<.5?n=e/(2*i):i>=.5&&i<1&&(n=e/(2*(1-i))),[t[0],100*n,100*i]},Fe.hcg.hwb=function(t){const e=t[1]/100,i=e+t[2]/100*(1-e);return[t[0],100*(i-e),100*(1-i)]},Fe.hwb.hcg=function(t){const e=t[1]/100,i=1-t[2]/100,n=i-e;let o=0;return n<1&&(o=(i-n)/(1-n)),[t[0],100*n,100*o]},Fe.apple.rgb=function(t){return[t[0]/65535*255,t[1]/65535*255,t[2]/65535*255]},Fe.rgb.apple=function(t){return[t[0]/255*65535,t[1]/255*65535,t[2]/255*65535]},Fe.gray.rgb=function(t){return[t[0]/100*255,t[0]/100*255,t[0]/100*255]},Fe.gray.hsl=function(t){return[0,0,t[0]]},Fe.gray.hsv=Fe.gray.hsl,Fe.gray.hwb=function(t){return[0,100,t[0]]},Fe.gray.cmyk=function(t){return[0,0,0,t[0]]},Fe.gray.lab=function(t){return[t[0],0,0]},Fe.gray.hex=function(t){const e=255&Math.round(t[0]/100*255),i=((e<<16)+(e<<8)+e).toString(16).toUpperCase();return"000000".substring(i.length)+i},Fe.rgb.gray=function(t){return[(t[0]+t[1]+t[2])/3/255*100]};const Ue=Ve;function He(t){const e=function(){const t={},e=Object.keys(Ue);for(let i=e.length,n=0;n{Ge[t]={},Object.defineProperty(Ge[t],"channels",{value:qe[t].channels}),Object.defineProperty(Ge[t],"labels",{value:qe[t].labels});const e=We(t);Object.keys(e).forEach((i=>{const n=e[i];Ge[t][i]=function(t){const e=function(...e){const i=e[0];if(null==i)return i;i.length>1&&(e=i);const n=t(e);if("object"==typeof n)for(let t=n.length,e=0;e1&&(e=i),t(e))};return"conversion"in t&&(e.conversion=t.conversion),e}(n)}))}));var Ke=Ge;const Ze=Ce.exports,Je=Ke,Qe=["keyword","gray","hex"],ti={};for(const t of Object.keys(Je))ti[[...Je[t].labels].sort().join("")]=t;const ei={};function ii(t,e){if(!(this instanceof ii))return new ii(t,e);if(e&&e in Qe&&(e=null),e&&!(e in Je))throw new Error("Unknown model: "+e);let i,n;if(null==t)this.model="rgb",this.color=[0,0,0],this.valpha=1;else if(t instanceof ii)this.model=t.model,this.color=[...t.color],this.valpha=t.valpha;else if("string"==typeof t){const e=Ze.get(t);if(null===e)throw new Error("Unable to parse color from string: "+t);this.model=e.model,n=Je[this.model].channels,this.color=e.value.slice(0,n),this.valpha="number"==typeof e.value[n]?e.value[n]:1}else if(t.length>0){this.model=e||"rgb",n=Je[this.model].channels;const i=Array.prototype.slice.call(t,0,n);this.color=ai(i,n),this.valpha="number"==typeof t[n]?t[n]:1}else if("number"==typeof t)this.model="rgb",this.color=[t>>16&255,t>>8&255,255&t],this.valpha=1;else{this.valpha=1;const e=Object.keys(t);"alpha"in t&&(e.splice(e.indexOf("alpha"),1),this.valpha="number"==typeof t.alpha?t.alpha:0);const n=e.sort().join("");if(!(n in ti))throw new Error("Unable to parse color from object: "+JSON.stringify(t));this.model=ti[n];const{labels:o}=Je[this.model],r=[];for(i=0;i(t%360+360)%360)),saturationl:oi("hsl",1,ri(100)),lightness:oi("hsl",2,ri(100)),saturationv:oi("hsv",1,ri(100)),value:oi("hsv",2,ri(100)),chroma:oi("hcg",1,ri(100)),gray:oi("hcg",2,ri(100)),white:oi("hwb",1,ri(100)),wblack:oi("hwb",2,ri(100)),cyan:oi("cmyk",0,ri(100)),magenta:oi("cmyk",1,ri(100)),yellow:oi("cmyk",2,ri(100)),black:oi("cmyk",3,ri(100)),x:oi("xyz",0,ri(95.047)),y:oi("xyz",1,ri(100)),z:oi("xyz",2,ri(108.833)),l:oi("lab",0,ri(100)),a:oi("lab",1),b:oi("lab",2),keyword(t){return void 0!==t?new ii(t):Je[this.model].keyword(this.color)},hex(t){return void 0!==t?new ii(t):Ze.to.hex(this.rgb().round().color)},hexa(t){if(void 0!==t)return new ii(t);const e=this.rgb().round().color;let i=Math.round(255*this.valpha).toString(16).toUpperCase();return 1===i.length&&(i="0"+i),Ze.to.hex(e)+i},rgbNumber(){const t=this.rgb().color;return(255&t[0])<<16|(255&t[1])<<8|255&t[2]},luminosity(){const t=this.rgb().color,e=[];for(const[i,n]of t.entries()){const t=n/255;e[i]=t<=.04045?t/12.92:((t+.055)/1.055)**2.4}return.2126*e[0]+.7152*e[1]+.0722*e[2]},contrast(t){const e=this.luminosity(),i=t.luminosity();return e>i?(e+.05)/(i+.05):(i+.05)/(e+.05)},level(t){const e=this.contrast(t);return e>=7?"AAA":e>=4.5?"AA":""},isDark(){const t=this.rgb().color;return(2126*t[0]+7152*t[1]+722*t[2])/1e4<128},isLight(){return!this.isDark()},negate(){const t=this.rgb();for(let e=0;e<3;e++)t.color[e]=255-t.color[e];return t},lighten(t){const e=this.hsl();return e.color[2]+=e.color[2]*t,e},darken(t){const e=this.hsl();return e.color[2]-=e.color[2]*t,e},saturate(t){const e=this.hsl();return e.color[1]+=e.color[1]*t,e},desaturate(t){const e=this.hsl();return e.color[1]-=e.color[1]*t,e},whiten(t){const e=this.hwb();return e.color[1]+=e.color[1]*t,e},blacken(t){const e=this.hwb();return e.color[2]+=e.color[2]*t,e},grayscale(){const t=this.rgb().color,e=.3*t[0]+.59*t[1]+.11*t[2];return ii.rgb(e,e,e)},fade(t){return this.alpha(this.valpha-this.valpha*t)},opaquer(t){return this.alpha(this.valpha+this.valpha*t)},rotate(t){const e=this.hsl();let i=e.color[0];return i=(i+t)%360,i=i<0?360+i:i,e.color[0]=i,e},mix(t,e){if(!t||!t.rgb)throw new Error('Argument to "mix" was not a Color instance, but rather an instance of '+typeof t);const i=t.rgb(),n=this.rgb(),o=void 0===e?.5:e,r=2*o-1,a=i.alpha()-n.alpha(),s=((r*a==-1?r:(r+a)/(1+r*a))+1)/2,l=1-s;return ii.rgb(s*i.red()+l*n.red(),s*i.green()+l*n.green(),s*i.blue()+l*n.blue(),i.alpha()*o+n.alpha()*(1-o))}};for(const t of Object.keys(Je)){if(Qe.includes(t))continue;const{channels:e}=Je[t];ii.prototype[t]=function(...e){return this.model===t?new ii(this):e.length>0?new ii(e,t):new ii([...(i=Je[this.model][t].raw(this.color),Array.isArray(i)?i:[i]),this.valpha],t);var i},ii[t]=function(...i){let n=i[0];return"number"==typeof n&&(n=ai(i,e)),new ii(n,t)}}function ni(t){return function(e){return function(t,e){return Number(t.toFixed(e))}(e,t)}}function oi(t,e,i){t=Array.isArray(t)?t:[t];for(const n of t)(ei[n]||(ei[n]=[]))[e]=i;return t=t[0],function(n){let o;return void 0!==n?(i&&(n=i(n)),o=this[t](),o.color[e]=n,o):(o=this[t]().color[e],i&&(o=i(o)),o)}}function ri(t){return function(e){return Math.max(0,Math.min(t,e))}}function ai(t,e){for(let i=0;i(...e)=>({_$litDirective$:t,values:e});class Wt{const * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. - */;var ui="Unknown",hi="Backspace",mi="Enter",pi="Spacebar",fi="PageUp",gi="PageDown",_i="End",bi="Home",vi="ArrowLeft",yi="ArrowUp",xi="ArrowRight",wi="ArrowDown",Ci="Delete",ki="Escape",$i="Tab",Ei=new Set;Ei.add(hi),Ei.add(mi),Ei.add(pi),Ei.add(fi),Ei.add(gi),Ei.add(_i),Ei.add(bi),Ei.add(vi),Ei.add(yi),Ei.add(xi),Ei.add(wi),Ei.add(Ci),Ei.add(ki),Ei.add($i);var Ai=8,Si=13,Ii=32,Ti=33,Oi=34,Mi=35,Di=36,Li=37,zi=38,ji=39,Ni=40,Ri=46,Pi=27,Fi=9,Vi=new Map;Vi.set(Ai,hi),Vi.set(Si,mi),Vi.set(Ii,pi),Vi.set(Ti,fi),Vi.set(Oi,gi),Vi.set(Mi,_i),Vi.set(Di,bi),Vi.set(Li,vi),Vi.set(zi,yi),Vi.set(ji,xi),Vi.set(Ni,wi),Vi.set(Ri,Ci),Vi.set(Pi,ki),Vi.set(Fi,$i);var Bi,Ui,Hi=new Set;function Yi(t){var e=t.key;if(Ei.has(e))return e;var i=Vi.get(t.keyCode);return i||ui} + */kn.add(Ki),kn.add(Gi),kn.add(Zi),kn.add(Ji),kn.add(Qi),kn.add(tn),kn.add(en),kn.add(nn);var $n="Unknown",En="Backspace",An="Enter",Sn="Spacebar",In="PageUp",Tn="PageDown",zn="End",On="Home",Mn="ArrowLeft",Ln="ArrowUp",Dn="ArrowRight",jn="ArrowDown",Pn="Delete",Nn="Escape",Vn="Tab",Rn=new Set;Rn.add(En),Rn.add(An),Rn.add(Sn),Rn.add(In),Rn.add(Tn),Rn.add(zn),Rn.add(On),Rn.add(Mn),Rn.add(Ln),Rn.add(Dn),Rn.add(jn),Rn.add(Pn),Rn.add(Nn),Rn.add(Vn);var Fn=8,Bn=13,Un=32,Hn=33,Yn=34,Xn=35,Wn=36,qn=37,Kn=38,Gn=39,Zn=40,Jn=46,Qn=27,to=9,eo=new Map;eo.set(Fn,En),eo.set(Bn,An),eo.set(Un,Sn),eo.set(Hn,In),eo.set(Yn,Tn),eo.set(Xn,zn),eo.set(Wn,On),eo.set(qn,Mn),eo.set(Kn,Ln),eo.set(Gn,Dn),eo.set(Zn,jn),eo.set(Jn,Pn),eo.set(Qn,Nn),eo.set(to,Vn);var io,no,oo=new Set;function ro(t){var e=t.key;if(Rn.has(e))return e;var i=eo.get(t.keyCode);return i||$n} /** * @license * Copyright 2018 Google Inc. @@ -225,7 +264,7 @@ const Ht=1,Yt=3,Xt=4,qt=t=>(...e)=>({_$litDirective$:t,values:e});class Wt{const * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. - */Hi.add(fi),Hi.add(gi),Hi.add(_i),Hi.add(bi),Hi.add(vi),Hi.add(yi),Hi.add(xi),Hi.add(wi);var Xi="mdc-list-item--activated",qi="mdc-list-item",Wi="mdc-list-item--disabled",Gi="mdc-list-item--selected",Ki="mdc-list-item__text",Zi="mdc-list-item__primary-text",Ji="mdc-list";(Bi={})[""+Xi]="mdc-list-item--activated",Bi[""+qi]="mdc-list-item",Bi[""+Wi]="mdc-list-item--disabled",Bi[""+Gi]="mdc-list-item--selected",Bi[""+Zi]="mdc-list-item__primary-text",Bi[""+Ji]="mdc-list";var Qi=((Ui={})[""+Xi]="mdc-deprecated-list-item--activated",Ui[""+qi]="mdc-deprecated-list-item",Ui[""+Wi]="mdc-deprecated-list-item--disabled",Ui[""+Gi]="mdc-deprecated-list-item--selected",Ui[""+Ki]="mdc-deprecated-list-item__text",Ui[""+Zi]="mdc-deprecated-list-item__primary-text",Ui[""+Ji]="mdc-deprecated-list",Ui);Qi[qi],Qi[qi],Qi[qi],Qi[qi],Qi[qi],Qi[qi];var tn=300,en=["input","button","textarea","select"],nn=function(t){var e=t.target;if(e){var i=(""+e.tagName).toLowerCase();-1===en.indexOf(i)&&t.preventDefault()}}; + */oo.add(In),oo.add(Tn),oo.add(zn),oo.add(On),oo.add(Mn),oo.add(Ln),oo.add(Dn),oo.add(jn);var ao="mdc-list-item--activated",lo="mdc-list-item",so="mdc-list-item--disabled",co="mdc-list-item--selected",uo="mdc-list-item__text",ho="mdc-list-item__primary-text",mo="mdc-list";(io={})[""+ao]="mdc-list-item--activated",io[""+lo]="mdc-list-item",io[""+so]="mdc-list-item--disabled",io[""+co]="mdc-list-item--selected",io[""+ho]="mdc-list-item__primary-text",io[""+mo]="mdc-list";var po=((no={})[""+ao]="mdc-deprecated-list-item--activated",no[""+lo]="mdc-deprecated-list-item",no[""+so]="mdc-deprecated-list-item--disabled",no[""+co]="mdc-deprecated-list-item--selected",no[""+uo]="mdc-deprecated-list-item__text",no[""+ho]="mdc-deprecated-list-item__primary-text",no[""+mo]="mdc-deprecated-list",no);po[lo],po[lo],po[lo],po[lo],po[lo],po[lo];var fo=300,go=["input","button","textarea","select"],_o=function(t){var e=t.target;if(e){var i=(""+e.tagName).toLowerCase();-1===go.indexOf(i)&&t.preventDefault()}}; /** * @license * Copyright 2020 Google Inc. @@ -247,24 +286,24 @@ const Ht=1,Yt=3,Xt=4,qt=t=>(...e)=>({_$litDirective$:t,values:e});class Wt{const * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. - */function on(t,e){for(var i=new Map,n=0;ne&&!i(r[s].index)){l=s;break}if(-1!==l)return n.sortedIndexCursor=l,r[n.sortedIndexCursor].index;return-1}(r,a,l,e):function(t,e,i){var n=i.typeaheadBuffer[0],o=t.get(n);if(!o)return-1;var r=o[i.sortedIndexCursor];if(0===r.text.lastIndexOf(i.typeaheadBuffer,0)&&!e(r.index))return r.index;var a=(i.sortedIndexCursor+1)%o.length,s=-1;for(;a!==i.sortedIndexCursor;){var l=o[a],c=0===l.text.lastIndexOf(i.typeaheadBuffer,0),d=!e(l.index);if(c&&d){s=a;break}a=(a+1)%o.length}if(-1!==s)return i.sortedIndexCursor=s,o[i.sortedIndexCursor].index;return-1}(r,l,e),-1===i||s||o(i),i}function an(t){return t.typeaheadBuffer.length>0}function sn(t){return{addClass:e=>{t.classList.add(e)},removeClass:e=>{t.classList.remove(e)},hasClass:e=>t.classList.contains(e)}}const ln=()=>{},cn={get passive(){return!1}};document.addEventListener("x",ln,cn),document.removeEventListener("x",ln); + */function vo(t,e){for(var i=new Map,n=0;ne&&!i(r[l].index)){s=l;break}if(-1!==s)return n.sortedIndexCursor=s,r[n.sortedIndexCursor].index;return-1}(r,a,s,e):function(t,e,i){var n=i.typeaheadBuffer[0],o=t.get(n);if(!o)return-1;var r=o[i.sortedIndexCursor];if(0===r.text.lastIndexOf(i.typeaheadBuffer,0)&&!e(r.index))return r.index;var a=(i.sortedIndexCursor+1)%o.length,l=-1;for(;a!==i.sortedIndexCursor;){var s=o[a],c=0===s.text.lastIndexOf(i.typeaheadBuffer,0),d=!e(s.index);if(c&&d){l=a;break}a=(a+1)%o.length}if(-1!==l)return i.sortedIndexCursor=l,o[i.sortedIndexCursor].index;return-1}(r,s,e),-1===i||l||o(i),i}function yo(t){return t.typeaheadBuffer.length>0}function xo(t){return{addClass:e=>{t.classList.add(e)},removeClass:e=>{t.classList.remove(e)},hasClass:e=>t.classList.contains(e)}}const wo=()=>{},ko={get passive(){return!1}};document.addEventListener("x",wo,ko),document.removeEventListener("x",wo); /** * @license * Copyright 2018 Google LLC * SPDX-License-Identifier: Apache-2.0 */ -class dn extends Ot{click(){if(this.mdcRoot)return this.mdcRoot.focus(),void this.mdcRoot.click();super.click()}createFoundation(){void 0!==this.mdcFoundation&&this.mdcFoundation.destroy(),this.mdcFoundationClass&&(this.mdcFoundation=new this.mdcFoundationClass(this.createAdapter()),this.mdcFoundation.init())}firstUpdated(){this.createFoundation()}} +class Co extends ot{click(){if(this.mdcRoot)return this.mdcRoot.focus(),void this.mdcRoot.click();super.click()}createFoundation(){void 0!==this.mdcFoundation&&this.mdcFoundation.destroy(),this.mdcFoundationClass&&(this.mdcFoundation=new this.mdcFoundationClass(this.createAdapter()),this.mdcFoundation.init())}firstUpdated(){this.createFoundation()}} /** * @license * Copyright 2018 Google LLC * SPDX-License-Identifier: Apache-2.0 - */var un,hn;const mn=null!==(hn=null===(un=window.ShadyDOM)||void 0===un?void 0:un.inUse)&&void 0!==hn&&hn;class pn extends dn{constructor(){super(...arguments),this.disabled=!1,this.containingForm=null,this.formDataListener=t=>{this.disabled||this.setFormData(t.formData)}}findFormElement(){if(!this.shadowRoot||mn)return null;const t=this.getRootNode().querySelectorAll("form");for(const e of Array.from(t))if(e.contains(this))return e;return null}connectedCallback(){var t;super.connectedCallback(),this.containingForm=this.findFormElement(),null===(t=this.containingForm)||void 0===t||t.addEventListener("formdata",this.formDataListener)}disconnectedCallback(){var t;super.disconnectedCallback(),null===(t=this.containingForm)||void 0===t||t.removeEventListener("formdata",this.formDataListener),this.containingForm=null}click(){this.formElement&&!this.disabled&&(this.formElement.focus(),this.formElement.click())}firstUpdated(){super.firstUpdated(),this.shadowRoot&&this.mdcRoot.addEventListener("change",(t=>{this.dispatchEvent(new Event("change",t))}))}}pn.shadowRootOptions={mode:"open",delegatesFocus:!0},n([zt({type:Boolean})],pn.prototype,"disabled",void 0); + */var $o,Eo;const Ao=null!==(Eo=null===($o=window.ShadyDOM)||void 0===$o?void 0:$o.inUse)&&void 0!==Eo&&Eo;class So extends Co{constructor(){super(...arguments),this.disabled=!1,this.containingForm=null,this.formDataListener=t=>{this.disabled||this.setFormData(t.formData)}}findFormElement(){if(!this.shadowRoot||Ao)return null;const t=this.getRootNode().querySelectorAll("form");for(const e of Array.from(t))if(e.contains(this))return e;return null}connectedCallback(){var t;super.connectedCallback(),this.containingForm=this.findFormElement(),null===(t=this.containingForm)||void 0===t||t.addEventListener("formdata",this.formDataListener)}disconnectedCallback(){var t;super.disconnectedCallback(),null===(t=this.containingForm)||void 0===t||t.removeEventListener("formdata",this.formDataListener),this.containingForm=null}click(){this.formElement&&!this.disabled&&(this.formElement.focus(),this.formElement.click())}firstUpdated(){super.firstUpdated(),this.shadowRoot&&this.mdcRoot.addEventListener("change",(t=>{this.dispatchEvent(new Event("change",t))}))}}So.shadowRootOptions={mode:"open",delegatesFocus:!0},n([st({type:Boolean})],So.prototype,"disabled",void 0); /** * @license * Copyright 2018 Google LLC * SPDX-License-Identifier: Apache-2.0 */ -const fn=t=>(e,i)=>{if(e.constructor._observers){if(!e.constructor.hasOwnProperty("_observers")){const t=e.constructor._observers;e.constructor._observers=new Map,t.forEach(((t,i)=>e.constructor._observers.set(i,t)))}}else{e.constructor._observers=new Map;const t=e.updated;e.updated=function(e){t.call(this,e),e.forEach(((t,e)=>{const i=this.constructor._observers.get(e);void 0!==i&&i.call(this,this[e],t)}))}}e.constructor._observers.set(i,t)} +const Io=t=>(e,i)=>{if(e.constructor._observers){if(!e.constructor.hasOwnProperty("_observers")){const t=e.constructor._observers;e.constructor._observers=new Map,t.forEach(((t,i)=>e.constructor._observers.set(i,t)))}}else{e.constructor._observers=new Map;const t=e.updated;e.updated=function(e){t.call(this,e),e.forEach(((t,e)=>{const i=this.constructor._observers.get(e);void 0!==i&&i.call(this,this[e],t)}))}}e.constructor._observers.set(i,t)} /** * @license * Copyright 2016 Google Inc. @@ -286,7 +325,7 @@ const fn=t=>(e,i)=>{if(e.constructor._observers){if(!e.constructor.hasOwnPropert * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. - */;var gn=function(){function t(t){void 0===t&&(t={}),this.adapter=t}return Object.defineProperty(t,"cssClasses",{get:function(){return{}},enumerable:!1,configurable:!0}),Object.defineProperty(t,"strings",{get:function(){return{}},enumerable:!1,configurable:!0}),Object.defineProperty(t,"numbers",{get:function(){return{}},enumerable:!1,configurable:!0}),Object.defineProperty(t,"defaultAdapter",{get:function(){return{}},enumerable:!1,configurable:!0}),t.prototype.init=function(){},t.prototype.destroy=function(){},t}(),_n={LABEL_FLOAT_ABOVE:"mdc-floating-label--float-above",LABEL_REQUIRED:"mdc-floating-label--required",LABEL_SHAKE:"mdc-floating-label--shake",ROOT:"mdc-floating-label"},bn=function(t){function n(e){var o=t.call(this,i(i({},n.defaultAdapter),e))||this;return o.shakeAnimationEndHandler=function(){o.handleShakeAnimationEnd()},o}return e(n,t),Object.defineProperty(n,"cssClasses",{get:function(){return _n},enumerable:!1,configurable:!0}),Object.defineProperty(n,"defaultAdapter",{get:function(){return{addClass:function(){},removeClass:function(){},getWidth:function(){return 0},registerInteractionHandler:function(){},deregisterInteractionHandler:function(){}}},enumerable:!1,configurable:!0}),n.prototype.init=function(){this.adapter.registerInteractionHandler("animationend",this.shakeAnimationEndHandler)},n.prototype.destroy=function(){this.adapter.deregisterInteractionHandler("animationend",this.shakeAnimationEndHandler)},n.prototype.getWidth=function(){return this.adapter.getWidth()},n.prototype.shake=function(t){var e=n.cssClasses.LABEL_SHAKE;t?this.adapter.addClass(e):this.adapter.removeClass(e)},n.prototype.float=function(t){var e=n.cssClasses,i=e.LABEL_FLOAT_ABOVE,o=e.LABEL_SHAKE;t?this.adapter.addClass(i):(this.adapter.removeClass(i),this.adapter.removeClass(o))},n.prototype.setRequired=function(t){var e=n.cssClasses.LABEL_REQUIRED;t?this.adapter.addClass(e):this.adapter.removeClass(e)},n.prototype.handleShakeAnimationEnd=function(){var t=n.cssClasses.LABEL_SHAKE;this.adapter.removeClass(t)},n}(gn); + */;var To=function(){function t(t){void 0===t&&(t={}),this.adapter=t}return Object.defineProperty(t,"cssClasses",{get:function(){return{}},enumerable:!1,configurable:!0}),Object.defineProperty(t,"strings",{get:function(){return{}},enumerable:!1,configurable:!0}),Object.defineProperty(t,"numbers",{get:function(){return{}},enumerable:!1,configurable:!0}),Object.defineProperty(t,"defaultAdapter",{get:function(){return{}},enumerable:!1,configurable:!0}),t.prototype.init=function(){},t.prototype.destroy=function(){},t}(),zo={LABEL_FLOAT_ABOVE:"mdc-floating-label--float-above",LABEL_REQUIRED:"mdc-floating-label--required",LABEL_SHAKE:"mdc-floating-label--shake",ROOT:"mdc-floating-label"},Oo=function(t){function n(e){var o=t.call(this,i(i({},n.defaultAdapter),e))||this;return o.shakeAnimationEndHandler=function(){o.handleShakeAnimationEnd()},o}return e(n,t),Object.defineProperty(n,"cssClasses",{get:function(){return zo},enumerable:!1,configurable:!0}),Object.defineProperty(n,"defaultAdapter",{get:function(){return{addClass:function(){},removeClass:function(){},getWidth:function(){return 0},registerInteractionHandler:function(){},deregisterInteractionHandler:function(){}}},enumerable:!1,configurable:!0}),n.prototype.init=function(){this.adapter.registerInteractionHandler("animationend",this.shakeAnimationEndHandler)},n.prototype.destroy=function(){this.adapter.deregisterInteractionHandler("animationend",this.shakeAnimationEndHandler)},n.prototype.getWidth=function(){return this.adapter.getWidth()},n.prototype.shake=function(t){var e=n.cssClasses.LABEL_SHAKE;t?this.adapter.addClass(e):this.adapter.removeClass(e)},n.prototype.float=function(t){var e=n.cssClasses,i=e.LABEL_FLOAT_ABOVE,o=e.LABEL_SHAKE;t?this.adapter.addClass(i):(this.adapter.removeClass(i),this.adapter.removeClass(o))},n.prototype.setRequired=function(t){var e=n.cssClasses.LABEL_REQUIRED;t?this.adapter.addClass(e):this.adapter.removeClass(e)},n.prototype.handleShakeAnimationEnd=function(){var t=n.cssClasses.LABEL_SHAKE;this.adapter.removeClass(t)},n}(To); /** * @license * Copyright 2016 Google Inc. @@ -308,10 +347,10 @@ const fn=t=>(e,i)=>{if(e.constructor._observers){if(!e.constructor.hasOwnPropert * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. - */const vn=qt(class extends Wt{constructor(t){switch(super(t),this.foundation=null,this.previousPart=null,t.type){case Ht:case Yt:break;default:throw new Error("FloatingLabel directive only support attribute and property parts")}}update(t,[e]){if(t!==this.previousPart){this.foundation&&this.foundation.destroy(),this.previousPart=t;const e=t.element;e.classList.add("mdc-floating-label");const i=(t=>({addClass:e=>t.classList.add(e),removeClass:e=>t.classList.remove(e),getWidth:()=>t.scrollWidth,registerInteractionHandler:(e,i)=>{t.addEventListener(e,i)},deregisterInteractionHandler:(e,i)=>{t.removeEventListener(e,i)}}))(e);this.foundation=new bn(i),this.foundation.init()}return this.render(e)}render(t){return this.foundation}}); + */const Mo=Ae(class extends Se{constructor(t){switch(super(t),this.foundation=null,this.previousPart=null,t.type){case Ce:case $e:break;default:throw new Error("FloatingLabel directive only support attribute and property parts")}}update(t,[e]){if(t!==this.previousPart){this.foundation&&this.foundation.destroy(),this.previousPart=t;const e=t.element;e.classList.add("mdc-floating-label");const i=(t=>({addClass:e=>t.classList.add(e),removeClass:e=>t.classList.remove(e),getWidth:()=>t.scrollWidth,registerInteractionHandler:(e,i)=>{t.addEventListener(e,i)},deregisterInteractionHandler:(e,i)=>{t.removeEventListener(e,i)}}))(e);this.foundation=new Oo(i),this.foundation.init()}return this.render(e)}render(t){return this.foundation}}); /** * @license - * Copyright 2018 Google Inc. + * Copyright 2016 Google Inc. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal @@ -330,7 +369,7 @@ const fn=t=>(e,i)=>{if(e.constructor._observers){if(!e.constructor.hasOwnPropert * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. - */var yn={LINE_RIPPLE_ACTIVE:"mdc-line-ripple--active",LINE_RIPPLE_DEACTIVATING:"mdc-line-ripple--deactivating"},xn=function(t){function n(e){var o=t.call(this,i(i({},n.defaultAdapter),e))||this;return o.transitionEndHandler=function(t){o.handleTransitionEnd(t)},o}return e(n,t),Object.defineProperty(n,"cssClasses",{get:function(){return yn},enumerable:!1,configurable:!0}),Object.defineProperty(n,"defaultAdapter",{get:function(){return{addClass:function(){},removeClass:function(){},hasClass:function(){return!1},setStyle:function(){},registerEventHandler:function(){},deregisterEventHandler:function(){}}},enumerable:!1,configurable:!0}),n.prototype.init=function(){this.adapter.registerEventHandler("transitionend",this.transitionEndHandler)},n.prototype.destroy=function(){this.adapter.deregisterEventHandler("transitionend",this.transitionEndHandler)},n.prototype.activate=function(){this.adapter.removeClass(yn.LINE_RIPPLE_DEACTIVATING),this.adapter.addClass(yn.LINE_RIPPLE_ACTIVE)},n.prototype.setRippleCenter=function(t){this.adapter.setStyle("transform-origin",t+"px center")},n.prototype.deactivate=function(){this.adapter.addClass(yn.LINE_RIPPLE_DEACTIVATING)},n.prototype.handleTransitionEnd=function(t){var e=this.adapter.hasClass(yn.LINE_RIPPLE_DEACTIVATING);"opacity"===t.propertyName&&e&&(this.adapter.removeClass(yn.LINE_RIPPLE_ACTIVE),this.adapter.removeClass(yn.LINE_RIPPLE_DEACTIVATING))},n}(gn); + */var Lo=function(){function t(t){void 0===t&&(t={}),this.adapter=t}return Object.defineProperty(t,"cssClasses",{get:function(){return{}},enumerable:!1,configurable:!0}),Object.defineProperty(t,"strings",{get:function(){return{}},enumerable:!1,configurable:!0}),Object.defineProperty(t,"numbers",{get:function(){return{}},enumerable:!1,configurable:!0}),Object.defineProperty(t,"defaultAdapter",{get:function(){return{}},enumerable:!1,configurable:!0}),t.prototype.init=function(){},t.prototype.destroy=function(){},t}(),Do={LINE_RIPPLE_ACTIVE:"mdc-line-ripple--active",LINE_RIPPLE_DEACTIVATING:"mdc-line-ripple--deactivating"},jo=function(t){function n(e){var o=t.call(this,i(i({},n.defaultAdapter),e))||this;return o.transitionEndHandler=function(t){o.handleTransitionEnd(t)},o}return e(n,t),Object.defineProperty(n,"cssClasses",{get:function(){return Do},enumerable:!1,configurable:!0}),Object.defineProperty(n,"defaultAdapter",{get:function(){return{addClass:function(){},removeClass:function(){},hasClass:function(){return!1},setStyle:function(){},registerEventHandler:function(){},deregisterEventHandler:function(){}}},enumerable:!1,configurable:!0}),n.prototype.init=function(){this.adapter.registerEventHandler("transitionend",this.transitionEndHandler)},n.prototype.destroy=function(){this.adapter.deregisterEventHandler("transitionend",this.transitionEndHandler)},n.prototype.activate=function(){this.adapter.removeClass(Do.LINE_RIPPLE_DEACTIVATING),this.adapter.addClass(Do.LINE_RIPPLE_ACTIVE)},n.prototype.setRippleCenter=function(t){this.adapter.setStyle("transform-origin",t+"px center")},n.prototype.deactivate=function(){this.adapter.addClass(Do.LINE_RIPPLE_DEACTIVATING)},n.prototype.handleTransitionEnd=function(t){var e=this.adapter.hasClass(Do.LINE_RIPPLE_DEACTIVATING);"opacity"===t.propertyName&&e&&(this.adapter.removeClass(Do.LINE_RIPPLE_ACTIVE),this.adapter.removeClass(Do.LINE_RIPPLE_DEACTIVATING))},n}(Lo); /** * @license * Copyright 2018 Google Inc. @@ -352,10 +391,10 @@ const fn=t=>(e,i)=>{if(e.constructor._observers){if(!e.constructor.hasOwnPropert * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. - */const wn=qt(class extends Wt{constructor(t){switch(super(t),this.previousPart=null,this.foundation=null,t.type){case Ht:case Yt:return;default:throw new Error("LineRipple only support attribute and property parts.")}}update(t,e){if(this.previousPart!==t){this.foundation&&this.foundation.destroy(),this.previousPart=t;const e=t.element;e.classList.add("mdc-line-ripple");const i=(t=>({addClass:e=>t.classList.add(e),removeClass:e=>t.classList.remove(e),hasClass:e=>t.classList.contains(e),setStyle:(e,i)=>t.style.setProperty(e,i),registerEventHandler:(e,i)=>{t.addEventListener(e,i)},deregisterEventHandler:(e,i)=>{t.removeEventListener(e,i)}}))(e);this.foundation=new xn(i),this.foundation.init()}return this.render()}render(){return this.foundation}}); + */const Po=Ae(class extends Se{constructor(t){switch(super(t),this.previousPart=null,this.foundation=null,t.type){case Ce:case $e:return;default:throw new Error("LineRipple only support attribute and property parts.")}}update(t,e){if(this.previousPart!==t){this.foundation&&this.foundation.destroy(),this.previousPart=t;const e=t.element;e.classList.add("mdc-line-ripple");const i=(t=>({addClass:e=>t.classList.add(e),removeClass:e=>t.classList.remove(e),hasClass:e=>t.classList.contains(e),setStyle:(e,i)=>t.style.setProperty(e,i),registerEventHandler:(e,i)=>{t.addEventListener(e,i)},deregisterEventHandler:(e,i)=>{t.removeEventListener(e,i)}}))(e);this.foundation=new jo(i),this.foundation.init()}return this.render()}render(){return this.foundation}}); /** * @license - * Copyright 2018 Google Inc. + * Copyright 2016 Google Inc. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal @@ -374,10 +413,10 @@ const fn=t=>(e,i)=>{if(e.constructor._observers){if(!e.constructor.hasOwnPropert * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. - */var Cn,kn;!function(t){t[t.BOTTOM=1]="BOTTOM",t[t.CENTER=2]="CENTER",t[t.RIGHT=4]="RIGHT",t[t.FLIP_RTL=8]="FLIP_RTL"}(Cn||(Cn={})),function(t){t[t.TOP_LEFT=0]="TOP_LEFT",t[t.TOP_RIGHT=4]="TOP_RIGHT",t[t.BOTTOM_LEFT=1]="BOTTOM_LEFT",t[t.BOTTOM_RIGHT=5]="BOTTOM_RIGHT",t[t.TOP_START=8]="TOP_START",t[t.TOP_END=12]="TOP_END",t[t.BOTTOM_START=9]="BOTTOM_START",t[t.BOTTOM_END=13]="BOTTOM_END"}(kn||(kn={})); + */var No=function(){function t(t){void 0===t&&(t={}),this.adapter=t}return Object.defineProperty(t,"cssClasses",{get:function(){return{}},enumerable:!1,configurable:!0}),Object.defineProperty(t,"strings",{get:function(){return{}},enumerable:!1,configurable:!0}),Object.defineProperty(t,"numbers",{get:function(){return{}},enumerable:!1,configurable:!0}),Object.defineProperty(t,"defaultAdapter",{get:function(){return{}},enumerable:!1,configurable:!0}),t.prototype.init=function(){},t.prototype.destroy=function(){},t}(),Vo="Unknown",Ro="Backspace",Fo="Enter",Bo="Spacebar",Uo="PageUp",Ho="PageDown",Yo="End",Xo="Home",Wo="ArrowLeft",qo="ArrowUp",Ko="ArrowRight",Go="ArrowDown",Zo="Delete",Jo="Escape",Qo="Tab",tr=new Set; /** * @license - * Copyright 2016 Google Inc. + * Copyright 2020 Google Inc. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal @@ -396,31 +435,75 @@ const fn=t=>(e,i)=>{if(e.constructor._observers){if(!e.constructor.hasOwnPropert * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. - */ -var $n={ACTIVATED:"mdc-select--activated",DISABLED:"mdc-select--disabled",FOCUSED:"mdc-select--focused",INVALID:"mdc-select--invalid",MENU_INVALID:"mdc-select__menu--invalid",OUTLINED:"mdc-select--outlined",REQUIRED:"mdc-select--required",ROOT:"mdc-select",WITH_LEADING_ICON:"mdc-select--with-leading-icon"},En={ARIA_CONTROLS:"aria-controls",ARIA_DESCRIBEDBY:"aria-describedby",ARIA_SELECTED_ATTR:"aria-selected",CHANGE_EVENT:"MDCSelect:change",HIDDEN_INPUT_SELECTOR:'input[type="hidden"]',LABEL_SELECTOR:".mdc-floating-label",LEADING_ICON_SELECTOR:".mdc-select__icon",LINE_RIPPLE_SELECTOR:".mdc-line-ripple",MENU_SELECTOR:".mdc-select__menu",OUTLINE_SELECTOR:".mdc-notched-outline",SELECTED_TEXT_SELECTOR:".mdc-select__selected-text",SELECT_ANCHOR_SELECTOR:".mdc-select__anchor",VALUE_ATTR:"data-value"},An={LABEL_SCALE:.75,UNSET_INDEX:-1,CLICK_DEBOUNCE_TIMEOUT_MS:330},Sn=function(t){function n(e,o){void 0===o&&(o={});var r=t.call(this,i(i({},n.defaultAdapter),e))||this;return r.disabled=!1,r.isMenuOpen=!1,r.useDefaultValidation=!0,r.customValidity=!0,r.lastSelectedIndex=An.UNSET_INDEX,r.clickDebounceTimeout=0,r.recentlyClicked=!1,r.leadingIcon=o.leadingIcon,r.helperText=o.helperText,r}return e(n,t),Object.defineProperty(n,"cssClasses",{get:function(){return $n},enumerable:!1,configurable:!0}),Object.defineProperty(n,"numbers",{get:function(){return An},enumerable:!1,configurable:!0}),Object.defineProperty(n,"strings",{get:function(){return En},enumerable:!1,configurable:!0}),Object.defineProperty(n,"defaultAdapter",{get:function(){return{addClass:function(){},removeClass:function(){},hasClass:function(){return!1},activateBottomLine:function(){},deactivateBottomLine:function(){},getSelectedIndex:function(){return-1},setSelectedIndex:function(){},hasLabel:function(){return!1},floatLabel:function(){},getLabelWidth:function(){return 0},setLabelRequired:function(){},hasOutline:function(){return!1},notchOutline:function(){},closeOutline:function(){},setRippleCenter:function(){},notifyChange:function(){},setSelectedText:function(){},isSelectAnchorFocused:function(){return!1},getSelectAnchorAttr:function(){return""},setSelectAnchorAttr:function(){},removeSelectAnchorAttr:function(){},addMenuClass:function(){},removeMenuClass:function(){},openMenu:function(){},closeMenu:function(){},getAnchorElement:function(){return null},setMenuAnchorElement:function(){},setMenuAnchorCorner:function(){},setMenuWrapFocus:function(){},focusMenuItemAtIndex:function(){},getMenuItemCount:function(){return 0},getMenuItemValues:function(){return[]},getMenuItemTextAtIndex:function(){return""},isTypeaheadInProgress:function(){return!1},typeaheadMatchItem:function(){return-1}}},enumerable:!1,configurable:!0}),n.prototype.getSelectedIndex=function(){return this.adapter.getSelectedIndex()},n.prototype.setSelectedIndex=function(t,e,i){void 0===e&&(e=!1),void 0===i&&(i=!1),t>=this.adapter.getMenuItemCount()||(t===An.UNSET_INDEX?this.adapter.setSelectedText(""):this.adapter.setSelectedText(this.adapter.getMenuItemTextAtIndex(t).trim()),this.adapter.setSelectedIndex(t),e&&this.adapter.closeMenu(),i||this.lastSelectedIndex===t||this.handleChange(),this.lastSelectedIndex=t)},n.prototype.setValue=function(t,e){void 0===e&&(e=!1);var i=this.adapter.getMenuItemValues().indexOf(t);this.setSelectedIndex(i,!1,e)},n.prototype.getValue=function(){var t=this.adapter.getSelectedIndex(),e=this.adapter.getMenuItemValues();return t!==An.UNSET_INDEX?e[t]:""},n.prototype.getDisabled=function(){return this.disabled},n.prototype.setDisabled=function(t){this.disabled=t,this.disabled?(this.adapter.addClass($n.DISABLED),this.adapter.closeMenu()):this.adapter.removeClass($n.DISABLED),this.leadingIcon&&this.leadingIcon.setDisabled(this.disabled),this.disabled?this.adapter.removeSelectAnchorAttr("tabindex"):this.adapter.setSelectAnchorAttr("tabindex","0"),this.adapter.setSelectAnchorAttr("aria-disabled",this.disabled.toString())},n.prototype.openMenu=function(){this.adapter.addClass($n.ACTIVATED),this.adapter.openMenu(),this.isMenuOpen=!0,this.adapter.setSelectAnchorAttr("aria-expanded","true")},n.prototype.setHelperTextContent=function(t){this.helperText&&this.helperText.setContent(t)},n.prototype.layout=function(){if(this.adapter.hasLabel()){var t=this.getValue().length>0,e=this.adapter.hasClass($n.FOCUSED),i=t||e,n=this.adapter.hasClass($n.REQUIRED);this.notchOutline(i),this.adapter.floatLabel(i),this.adapter.setLabelRequired(n)}},n.prototype.layoutOptions=function(){var t=this.adapter.getMenuItemValues().indexOf(this.getValue());this.setSelectedIndex(t,!1,!0)},n.prototype.handleMenuOpened=function(){if(0!==this.adapter.getMenuItemValues().length){var t=this.getSelectedIndex(),e=t>=0?t:0;this.adapter.focusMenuItemAtIndex(e)}},n.prototype.handleMenuClosing=function(){this.adapter.setSelectAnchorAttr("aria-expanded","false")},n.prototype.handleMenuClosed=function(){this.adapter.removeClass($n.ACTIVATED),this.isMenuOpen=!1,this.adapter.isSelectAnchorFocused()||this.blur()},n.prototype.handleChange=function(){this.layout(),this.adapter.notifyChange(this.getValue()),this.adapter.hasClass($n.REQUIRED)&&this.useDefaultValidation&&this.setValid(this.isValid())},n.prototype.handleMenuItemAction=function(t){this.setSelectedIndex(t,!0)},n.prototype.handleFocus=function(){this.adapter.addClass($n.FOCUSED),this.layout(),this.adapter.activateBottomLine()},n.prototype.handleBlur=function(){this.isMenuOpen||this.blur()},n.prototype.handleClick=function(t){this.disabled||this.recentlyClicked||(this.setClickDebounceTimeout(),this.isMenuOpen?this.adapter.closeMenu():(this.adapter.setRippleCenter(t),this.openMenu()))},n.prototype.handleKeydown=function(t){if(!this.isMenuOpen&&this.adapter.hasClass($n.FOCUSED)){var e=Yi(t)===mi,i=Yi(t)===pi,n=Yi(t)===yi,o=Yi(t)===wi;if(!(t.ctrlKey||t.metaKey)&&(!i&&t.key&&1===t.key.length||i&&this.adapter.isTypeaheadInProgress())){var r=i?" ":t.key,a=this.adapter.typeaheadMatchItem(r,this.getSelectedIndex());return a>=0&&this.setSelectedIndex(a),void t.preventDefault()}(e||i||n||o)&&(n&&this.getSelectedIndex()>0?this.setSelectedIndex(this.getSelectedIndex()-1):o&&this.getSelectedIndex()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]){var i,n;if(void 0===this.et){this.et=new Set,void 0!==t.strings&&(this.st=new Set(t.strings.join(" ").split(/\s/).filter((t=>""!==t))));for(const t in e)e[t]&&!(null===(i=this.st)||void 0===i?void 0:i.has(t))&&this.et.add(t);return this.render(e)}const o=t.element.classList;this.et.forEach((t=>{t in e||(o.remove(t),this.et.delete(t))}));for(const t in e){const i=!!e[t];i===this.et.has(t)||(null===(n=this.st)||void 0===n?void 0:n.has(t))||(i?(o.add(t),this.et.add(t)):(o.remove(t),this.et.delete(t)))}return mt}}),On=t=>null!=t?t:pt + */tr.add(Ro),tr.add(Fo),tr.add(Bo),tr.add(Uo),tr.add(Ho),tr.add(Yo),tr.add(Xo),tr.add(Wo),tr.add(qo),tr.add(Ko),tr.add(Go),tr.add(Zo),tr.add(Jo),tr.add(Qo);var er=8,ir=13,nr=32,or=33,rr=34,ar=35,lr=36,sr=37,cr=38,dr=39,ur=40,hr=46,mr=27,pr=9,fr=new Map;fr.set(er,Ro),fr.set(ir,Fo),fr.set(nr,Bo),fr.set(or,Uo),fr.set(rr,Ho),fr.set(ar,Yo),fr.set(lr,Xo),fr.set(sr,Wo),fr.set(cr,qo),fr.set(dr,Ko),fr.set(ur,Go),fr.set(hr,Zo),fr.set(mr,Jo),fr.set(pr,Qo);var gr,_r,vr=new Set;function br(t){var e=t.key;if(tr.has(e))return e;var i=fr.get(t.keyCode);return i||Vo} /** * @license - * Copyright 2020 Google LLC - * SPDX-License-Identifier: Apache-2.0 - */,Mn=(t={})=>{const e={};for(const i in t)e[i]=t[i];return Object.assign({badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valid:!0,valueMissing:!1},e)}; + * Copyright 2018 Google Inc. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */vr.add(Uo),vr.add(Ho),vr.add(Yo),vr.add(Xo),vr.add(Wo),vr.add(qo),vr.add(Ko),vr.add(Go),function(t){t[t.BOTTOM=1]="BOTTOM",t[t.CENTER=2]="CENTER",t[t.RIGHT=4]="RIGHT",t[t.FLIP_RTL=8]="FLIP_RTL"}(gr||(gr={})),function(t){t[t.TOP_LEFT=0]="TOP_LEFT",t[t.TOP_RIGHT=4]="TOP_RIGHT",t[t.BOTTOM_LEFT=1]="BOTTOM_LEFT",t[t.BOTTOM_RIGHT=5]="BOTTOM_RIGHT",t[t.TOP_START=8]="TOP_START",t[t.TOP_END=12]="TOP_END",t[t.BOTTOM_START=9]="BOTTOM_START",t[t.BOTTOM_END=13]="BOTTOM_END"}(_r||(_r={})); /** * @license - * Copyright 2018 Google LLC - * SPDX-License-Identifier: BSD-3-Clause - */class Dn extends pn{constructor(){super(...arguments),this.mdcFoundationClass=In,this.disabled=!1,this.outlined=!1,this.label="",this.outlineOpen=!1,this.outlineWidth=0,this.value="",this.name="",this.selectedText="",this.icon="",this.menuOpen=!1,this.helper="",this.validateOnInitialRender=!1,this.validationMessage="",this.required=!1,this.naturalMenuWidth=!1,this.isUiValid=!0,this.fixedMenuPosition=!1,this.typeaheadState={bufferClearTimeout:0,currentFirstChar:"",sortedIndexCursor:0,typeaheadBuffer:""},this.sortedIndexByFirstChar=new Map,this.menuElement_=null,this.listeners=[],this.onBodyClickBound=()=>{},this._menuUpdateComplete=null,this.valueSetDirectly=!1,this.validityTransform=null,this._validity=Mn()}get items(){return this.menuElement_||(this.menuElement_=this.menuElement),this.menuElement_?this.menuElement_.items:[]}get selected(){const t=this.menuElement;return t?t.selected:null}get index(){const t=this.menuElement;return t?t.index:-1}get shouldRenderHelperText(){return!!this.helper||!!this.validationMessage}get validity(){return this._checkValidity(this.value),this._validity}render(){const t={"mdc-select--disabled":this.disabled,"mdc-select--no-label":!this.label,"mdc-select--filled":!this.outlined,"mdc-select--outlined":this.outlined,"mdc-select--with-leading-icon":!!this.icon,"mdc-select--required":this.required,"mdc-select--invalid":!this.isUiValid},e={"mdc-select__menu--invalid":!this.isUiValid},i=this.label?"label":void 0,n=this.shouldRenderHelperText?"helper-text":void 0;return ut` -
- =this.adapter.getMenuItemCount()||(t===wr.UNSET_INDEX?this.adapter.setSelectedText(""):this.adapter.setSelectedText(this.adapter.getMenuItemTextAtIndex(t).trim()),this.adapter.setSelectedIndex(t),e&&this.adapter.closeMenu(),i||this.lastSelectedIndex===t||this.handleChange(),this.lastSelectedIndex=t)},n.prototype.setValue=function(t,e){void 0===e&&(e=!1);var i=this.adapter.getMenuItemValues().indexOf(t);this.setSelectedIndex(i,!1,e)},n.prototype.getValue=function(){var t=this.adapter.getSelectedIndex(),e=this.adapter.getMenuItemValues();return t!==wr.UNSET_INDEX?e[t]:""},n.prototype.getDisabled=function(){return this.disabled},n.prototype.setDisabled=function(t){this.disabled=t,this.disabled?(this.adapter.addClass(yr.DISABLED),this.adapter.closeMenu()):this.adapter.removeClass(yr.DISABLED),this.leadingIcon&&this.leadingIcon.setDisabled(this.disabled),this.disabled?this.adapter.removeSelectAnchorAttr("tabindex"):this.adapter.setSelectAnchorAttr("tabindex","0"),this.adapter.setSelectAnchorAttr("aria-disabled",this.disabled.toString())},n.prototype.openMenu=function(){this.adapter.addClass(yr.ACTIVATED),this.adapter.openMenu(),this.isMenuOpen=!0,this.adapter.setSelectAnchorAttr("aria-expanded","true")},n.prototype.setHelperTextContent=function(t){this.helperText&&this.helperText.setContent(t)},n.prototype.layout=function(){if(this.adapter.hasLabel()){var t=this.getValue().length>0,e=this.adapter.hasClass(yr.FOCUSED),i=t||e,n=this.adapter.hasClass(yr.REQUIRED);this.notchOutline(i),this.adapter.floatLabel(i),this.adapter.setLabelRequired(n)}},n.prototype.layoutOptions=function(){var t=this.adapter.getMenuItemValues().indexOf(this.getValue());this.setSelectedIndex(t,!1,!0)},n.prototype.handleMenuOpened=function(){if(0!==this.adapter.getMenuItemValues().length){var t=this.getSelectedIndex(),e=t>=0?t:0;this.adapter.focusMenuItemAtIndex(e)}},n.prototype.handleMenuClosing=function(){this.adapter.setSelectAnchorAttr("aria-expanded","false")},n.prototype.handleMenuClosed=function(){this.adapter.removeClass(yr.ACTIVATED),this.isMenuOpen=!1,this.adapter.isSelectAnchorFocused()||this.blur()},n.prototype.handleChange=function(){this.layout(),this.adapter.notifyChange(this.getValue()),this.adapter.hasClass(yr.REQUIRED)&&this.useDefaultValidation&&this.setValid(this.isValid())},n.prototype.handleMenuItemAction=function(t){this.setSelectedIndex(t,!0)},n.prototype.handleFocus=function(){this.adapter.addClass(yr.FOCUSED),this.layout(),this.adapter.activateBottomLine()},n.prototype.handleBlur=function(){this.isMenuOpen||this.blur()},n.prototype.handleClick=function(t){this.disabled||this.recentlyClicked||(this.setClickDebounceTimeout(),this.isMenuOpen?this.adapter.closeMenu():(this.adapter.setRippleCenter(t),this.openMenu()))},n.prototype.handleKeydown=function(t){if(!this.isMenuOpen&&this.adapter.hasClass(yr.FOCUSED)){var e=br(t)===Fo,i=br(t)===Bo,n=br(t)===qo,o=br(t)===Go;if(!(t.ctrlKey||t.metaKey)&&(!i&&t.key&&1===t.key.length||i&&this.adapter.isTypeaheadInProgress())){var r=i?" ":t.key,a=this.adapter.typeaheadMatchItem(r,this.getSelectedIndex());return a>=0&&this.setSelectedIndex(a),void t.preventDefault()}(e||i||n||o)&&(n&&this.getSelectedIndex()>0?this.setSelectedIndex(this.getSelectedIndex()-1):o&&this.getSelectedIndex()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]){var i,n;if(void 0===this.et){this.et=new Set,void 0!==t.strings&&(this.st=new Set(t.strings.join(" ").split(/\s/).filter((t=>""!==t))));for(const t in e)e[t]&&!(null===(i=this.st)||void 0===i?void 0:i.has(t))&&this.et.add(t);return this.render(e)}const o=t.element.classList;this.et.forEach((t=>{t in e||(o.remove(t),this.et.delete(t))}));for(const t in e){const i=!!e[t];i===this.et.has(t)||(null===(n=this.st)||void 0===n?void 0:n.has(t))||(i?(o.add(t),this.et.add(t)):(o.remove(t),this.et.delete(t)))}return R}}),$r=t=>null!=t?t:F +/** + * @license + * Copyright 2020 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */,Er=(t={})=>{const e={};for(const i in t)e[i]=t[i];return Object.assign({badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valid:!0,valueMissing:!1},e)}; +/** + * @license + * Copyright 2018 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */class Ar extends So{constructor(){super(...arguments),this.mdcFoundationClass=kr,this.disabled=!1,this.outlined=!1,this.label="",this.outlineOpen=!1,this.outlineWidth=0,this.value="",this.name="",this.selectedText="",this.icon="",this.menuOpen=!1,this.helper="",this.validateOnInitialRender=!1,this.validationMessage="",this.required=!1,this.naturalMenuWidth=!1,this.isUiValid=!0,this.fixedMenuPosition=!1,this.typeaheadState={bufferClearTimeout:0,currentFirstChar:"",sortedIndexCursor:0,typeaheadBuffer:""},this.sortedIndexByFirstChar=new Map,this.menuElement_=null,this.listeners=[],this.onBodyClickBound=()=>{},this._menuUpdateComplete=null,this.valueSetDirectly=!1,this.validityTransform=null,this._validity=Er()}get items(){return this.menuElement_||(this.menuElement_=this.menuElement),this.menuElement_?this.menuElement_.items:[]}get selected(){const t=this.menuElement;return t?t.selected:null}get index(){const t=this.menuElement;return t?t.index:-1}get shouldRenderHelperText(){return!!this.helper||!!this.validationMessage}get validity(){return this._checkValidity(this.value),this._validity}render(){const t={"mdc-select--disabled":this.disabled,"mdc-select--no-label":!this.label,"mdc-select--filled":!this.outlined,"mdc-select--outlined":this.outlined,"mdc-select--with-leading-icon":!!this.icon,"mdc-select--required":this.required,"mdc-select--invalid":!this.isUiValid},e={"mdc-select__menu--invalid":!this.isUiValid},i=this.label?"label":void 0,n=this.shouldRenderHelperText?"helper-text":void 0;return N` +
+ @@ -430,9 +513,9 @@ const Tn=qt(class extends Wt{constructor(t){var e;if(super(t),t.type!==Ht||"clas aria-expanded=${this.menuOpen} aria-invalid=${!this.isUiValid} aria-haspopup="listbox" - aria-labelledby=${On(i)} + aria-labelledby=${$r(i)} aria-required=${this.required} - aria-describedby=${On(n)} + aria-describedby=${$r(n)} @click=${this.onClick} @focus=${this.onFocus} @blur=${this.onBlur} @@ -467,7 +550,7 @@ const Tn=qt(class extends Wt{constructor(t){var e;if(super(t),t.type!==Ht||"clas
- ${this.renderHelperText()}`}renderRipple(){return this.outlined?pt:ut` + ${this.renderHelperText()}`}renderRipple(){return this.outlined?F:N` - `}renderOutline(){return this.outlined?ut` + `}renderOutline(){return this.outlined?N` ${this.renderLabel()} - `:pt}renderLabel(){return this.label?ut` + `:F}renderLabel(){return this.label?N` ${this.label} - `:pt}renderLeadingIcon(){return this.icon?ut`
${this.icon}
`:pt}renderLineRipple(){return this.outlined?pt:ut` - - `}renderHelperText(){if(!this.shouldRenderHelperText)return pt;const t=this.validationMessage&&!this.isUiValid;return ut` + `:F}renderLeadingIcon(){return this.icon?N`
${this.icon}
`:F}renderLineRipple(){return this.outlined?F:N` + + `}renderHelperText(){if(!this.shouldRenderHelperText)return F;const t=this.validationMessage&&!this.isUiValid;return N`

${t?this.validationMessage:this.helper}

`}createAdapter(){return Object.assign(Object.assign({},sn(this.mdcRoot)),{activateBottomLine:()=>{this.lineRippleElement&&this.lineRippleElement.lineRippleFoundation.activate()},deactivateBottomLine:()=>{this.lineRippleElement&&this.lineRippleElement.lineRippleFoundation.deactivate()},hasLabel:()=>!!this.label,floatLabel:t=>{this.labelElement&&this.labelElement.floatingLabelFoundation.float(t)},getLabelWidth:()=>this.labelElement?this.labelElement.floatingLabelFoundation.getWidth():0,setLabelRequired:t=>{this.labelElement&&this.labelElement.floatingLabelFoundation.setRequired(t)},hasOutline:()=>this.outlined,notchOutline:t=>{this.outlineElement&&!this.outlineOpen&&(this.outlineWidth=t,this.outlineOpen=!0)},closeOutline:()=>{this.outlineElement&&(this.outlineOpen=!1)},setRippleCenter:t=>{if(this.lineRippleElement){this.lineRippleElement.lineRippleFoundation.setRippleCenter(t)}},notifyChange:async t=>{if(!this.valueSetDirectly&&t===this.value)return;this.valueSetDirectly=!1,this.value=t,await this.updateComplete;const e=new Event("change",{bubbles:!0});this.dispatchEvent(e)},setSelectedText:t=>this.selectedText=t,isSelectAnchorFocused:()=>{const t=this.anchorElement;if(!t)return!1;return t.getRootNode().activeElement===t},getSelectAnchorAttr:t=>{const e=this.anchorElement;return e?e.getAttribute(t):null},setSelectAnchorAttr:(t,e)=>{const i=this.anchorElement;i&&i.setAttribute(t,e)},removeSelectAnchorAttr:t=>{const e=this.anchorElement;e&&e.removeAttribute(t)},openMenu:()=>{this.menuOpen=!0},closeMenu:()=>{this.menuOpen=!1},addMenuClass:()=>{},removeMenuClass:()=>{},getAnchorElement:()=>this.anchorElement,setMenuAnchorElement:()=>{},setMenuAnchorCorner:()=>{const t=this.menuElement;t&&(t.corner="BOTTOM_START")},setMenuWrapFocus:t=>{const e=this.menuElement;e&&(e.wrapFocus=t)},focusMenuItemAtIndex:t=>{const e=this.menuElement;if(!e)return;const i=e.items[t];i&&i.focus()},getMenuItemCount:()=>{const t=this.menuElement;return t?t.items.length:0},getMenuItemValues:()=>{const t=this.menuElement;if(!t)return[];return t.items.map((t=>t.value))},getMenuItemTextAtIndex:t=>{const e=this.menuElement;if(!e)return"";const i=e.items[t];return i?i.text:""},getSelectedIndex:()=>this.index,setSelectedIndex:()=>{},isTypeaheadInProgress:()=>an(this.typeaheadState),typeaheadMatchItem:(t,e)=>{if(!this.menuElement)return-1;const i={focusItemAtIndex:t=>{this.menuElement.focusItemAtIndex(t)},focusedItemIndex:e||this.menuElement.getFocusedItemIndex(),nextChar:t,sortedIndexByFirstChar:this.sortedIndexByFirstChar,skipFocus:!1,isItemAtIndexDisabled:t=>this.items[t].disabled},n=rn(i,this.typeaheadState);return-1!==n&&this.select(n),n}})}checkValidity(){const t=this._checkValidity(this.value);if(!t){const t=new Event("invalid",{bubbles:!1,cancelable:!0});this.dispatchEvent(t)}return t}reportValidity(){const t=this.checkValidity();return this.isUiValid=t,t}_checkValidity(t){const e=this.formElement.validity;let i=Mn(e);if(this.validityTransform){const e=this.validityTransform(t,i);i=Object.assign(Object.assign({},i),e)}return this._validity=i,this._validity.valid}setCustomValidity(t){this.validationMessage=t,this.formElement.setCustomValidity(t)}async getUpdateComplete(){await this._menuUpdateComplete;return await super.getUpdateComplete()}async firstUpdated(){const t=this.menuElement;if(t&&(this._menuUpdateComplete=t.updateComplete,await this._menuUpdateComplete),super.firstUpdated(),this.mdcFoundation.isValid=()=>!0,this.mdcFoundation.setValid=()=>{},this.mdcFoundation.setDisabled(this.disabled),this.validateOnInitialRender&&this.reportValidity(),!this.selected){!this.items.length&&this.slotElement&&this.slotElement.assignedNodes({flatten:!0}).length&&(await new Promise((t=>requestAnimationFrame(t))),await this.layout());const t=this.items.length&&""===this.items[0].value;if(!this.value&&t)return void this.select(0);this.selectByValue(this.value)}this.sortedIndexByFirstChar=on(this.items.length,(t=>this.items[t].text))}onItemsUpdated(){this.sortedIndexByFirstChar=on(this.items.length,(t=>this.items[t].text))}select(t){const e=this.menuElement;e&&e.select(t)}selectByValue(t){let e=-1;for(let i=0;i0,o=i&&this.index{this.menuElement.focusItemAtIndex(t)},focusedItemIndex:e,isTargetListItem:!!i&&i.hasAttribute("mwc-list-item"),sortedIndexByFirstChar:this.sortedIndexByFirstChar,isItemAtIndexDisabled:t=>this.items[t].disabled};!function(t,e){var i=t.event,n=t.isTargetListItem,o=t.focusedItemIndex,r=t.focusItemAtIndex,a=t.sortedIndexByFirstChar,s=t.isItemAtIndexDisabled,l="ArrowLeft"===Yi(i),c="ArrowUp"===Yi(i),d="ArrowRight"===Yi(i),u="ArrowDown"===Yi(i),h="Home"===Yi(i),m="End"===Yi(i),p="Enter"===Yi(i),f="Spacebar"===Yi(i);i.ctrlKey||i.metaKey||l||c||d||u||h||m||p||(f||1!==i.key.length?f&&(n&&nn(i),n&&an(e)&&rn({focusItemAtIndex:r,focusedItemIndex:o,nextChar:" ",sortedIndexByFirstChar:a,skipFocus:!1,isItemAtIndexDisabled:s},e)):(nn(i),rn({focusItemAtIndex:r,focusedItemIndex:o,nextChar:i.key.toLowerCase(),sortedIndexByFirstChar:a,skipFocus:!1,isItemAtIndexDisabled:s},e)))} + class="mdc-select-helper-text ${Cr({"mdc-select-helper-text--validation-msg":t})}" + id="helper-text">${t?this.validationMessage:this.helper}

`}createAdapter(){return Object.assign(Object.assign({},xo(this.mdcRoot)),{activateBottomLine:()=>{this.lineRippleElement&&this.lineRippleElement.lineRippleFoundation.activate()},deactivateBottomLine:()=>{this.lineRippleElement&&this.lineRippleElement.lineRippleFoundation.deactivate()},hasLabel:()=>!!this.label,floatLabel:t=>{this.labelElement&&this.labelElement.floatingLabelFoundation.float(t)},getLabelWidth:()=>this.labelElement?this.labelElement.floatingLabelFoundation.getWidth():0,setLabelRequired:t=>{this.labelElement&&this.labelElement.floatingLabelFoundation.setRequired(t)},hasOutline:()=>this.outlined,notchOutline:t=>{this.outlineElement&&!this.outlineOpen&&(this.outlineWidth=t,this.outlineOpen=!0)},closeOutline:()=>{this.outlineElement&&(this.outlineOpen=!1)},setRippleCenter:t=>{if(this.lineRippleElement){this.lineRippleElement.lineRippleFoundation.setRippleCenter(t)}},notifyChange:async t=>{if(!this.valueSetDirectly&&t===this.value)return;this.valueSetDirectly=!1,this.value=t,await this.updateComplete;const e=new Event("change",{bubbles:!0});this.dispatchEvent(e)},setSelectedText:t=>this.selectedText=t,isSelectAnchorFocused:()=>{const t=this.anchorElement;if(!t)return!1;return t.getRootNode().activeElement===t},getSelectAnchorAttr:t=>{const e=this.anchorElement;return e?e.getAttribute(t):null},setSelectAnchorAttr:(t,e)=>{const i=this.anchorElement;i&&i.setAttribute(t,e)},removeSelectAnchorAttr:t=>{const e=this.anchorElement;e&&e.removeAttribute(t)},openMenu:()=>{this.menuOpen=!0},closeMenu:()=>{this.menuOpen=!1},addMenuClass:()=>{},removeMenuClass:()=>{},getAnchorElement:()=>this.anchorElement,setMenuAnchorElement:()=>{},setMenuAnchorCorner:()=>{const t=this.menuElement;t&&(t.corner="BOTTOM_START")},setMenuWrapFocus:t=>{const e=this.menuElement;e&&(e.wrapFocus=t)},focusMenuItemAtIndex:t=>{const e=this.menuElement;if(!e)return;const i=e.items[t];i&&i.focus()},getMenuItemCount:()=>{const t=this.menuElement;return t?t.items.length:0},getMenuItemValues:()=>{const t=this.menuElement;if(!t)return[];return t.items.map((t=>t.value))},getMenuItemTextAtIndex:t=>{const e=this.menuElement;if(!e)return"";const i=e.items[t];return i?i.text:""},getSelectedIndex:()=>this.index,setSelectedIndex:()=>{},isTypeaheadInProgress:()=>yo(this.typeaheadState),typeaheadMatchItem:(t,e)=>{if(!this.menuElement)return-1;const i={focusItemAtIndex:t=>{this.menuElement.focusItemAtIndex(t)},focusedItemIndex:e||this.menuElement.getFocusedItemIndex(),nextChar:t,sortedIndexByFirstChar:this.sortedIndexByFirstChar,skipFocus:!1,isItemAtIndexDisabled:t=>this.items[t].disabled},n=bo(i,this.typeaheadState);return-1!==n&&this.select(n),n}})}checkValidity(){const t=this._checkValidity(this.value);if(!t){const t=new Event("invalid",{bubbles:!1,cancelable:!0});this.dispatchEvent(t)}return t}reportValidity(){const t=this.checkValidity();return this.isUiValid=t,t}_checkValidity(t){const e=this.formElement.validity;let i=Er(e);if(this.validityTransform){const e=this.validityTransform(t,i);i=Object.assign(Object.assign({},i),e)}return this._validity=i,this._validity.valid}setCustomValidity(t){this.validationMessage=t,this.formElement.setCustomValidity(t)}async getUpdateComplete(){await this._menuUpdateComplete;return await super.getUpdateComplete()}async firstUpdated(){const t=this.menuElement;if(t&&(this._menuUpdateComplete=t.updateComplete,await this._menuUpdateComplete),super.firstUpdated(),this.mdcFoundation.isValid=()=>!0,this.mdcFoundation.setValid=()=>{},this.mdcFoundation.setDisabled(this.disabled),this.validateOnInitialRender&&this.reportValidity(),!this.selected){!this.items.length&&this.slotElement&&this.slotElement.assignedNodes({flatten:!0}).length&&(await new Promise((t=>requestAnimationFrame(t))),await this.layout());const t=this.items.length&&""===this.items[0].value;if(!this.value&&t)return void this.select(0);this.selectByValue(this.value)}this.sortedIndexByFirstChar=vo(this.items.length,(t=>this.items[t].text))}onItemsUpdated(){this.sortedIndexByFirstChar=vo(this.items.length,(t=>this.items[t].text))}select(t){const e=this.menuElement;e&&e.select(t)}selectByValue(t){let e=-1;for(let i=0;i0,o=i&&this.index{this.menuElement.focusItemAtIndex(t)},focusedItemIndex:e,isTargetListItem:!!i&&i.hasAttribute("mwc-list-item"),sortedIndexByFirstChar:this.sortedIndexByFirstChar,isItemAtIndexDisabled:t=>this.items[t].disabled};!function(t,e){var i=t.event,n=t.isTargetListItem,o=t.focusedItemIndex,r=t.focusItemAtIndex,a=t.sortedIndexByFirstChar,l=t.isItemAtIndexDisabled,s="ArrowLeft"===ro(i),c="ArrowUp"===ro(i),d="ArrowRight"===ro(i),u="ArrowDown"===ro(i),h="Home"===ro(i),m="End"===ro(i),p="Enter"===ro(i),f="Spacebar"===ro(i);i.ctrlKey||i.metaKey||s||c||d||u||h||m||p||(f||1!==i.key.length?f&&(n&&_o(i),n&&yo(e)&&bo({focusItemAtIndex:r,focusedItemIndex:o,nextChar:" ",sortedIndexByFirstChar:a,skipFocus:!1,isItemAtIndexDisabled:l},e)):(_o(i),bo({focusItemAtIndex:r,focusedItemIndex:o,nextChar:i.key.toLowerCase(),sortedIndexByFirstChar:a,skipFocus:!1,isItemAtIndexDisabled:l},e)))} /** * @license * Copyright 2018 Google LLC * SPDX-License-Identifier: Apache-2.0 - */(n,this.typeaheadState)}async onSelected(t){this.mdcFoundation||await this.updateComplete,this.mdcFoundation.handleMenuItemAction(t.detail.index);const e=this.items[t.detail.index];e&&(this.value=e.value)}onOpened(){this.mdcFoundation&&(this.menuOpen=!0,this.mdcFoundation.handleMenuOpened())}onClosed(){this.mdcFoundation&&(this.menuOpen=!1,this.mdcFoundation.handleMenuClosed())}setFormData(t){this.name&&null!==this.selected&&t.append(this.name,this.value)}async layout(t=!0){this.mdcFoundation&&this.mdcFoundation.layout(),await this.updateComplete;const e=this.menuElement;e&&e.layout(t);const i=this.labelElement;if(!i)return void(this.outlineOpen=!1);const n=!!this.label&&!!this.value;if(i.floatingLabelFoundation.float(n),!this.outlined)return;this.outlineOpen=n,await this.updateComplete;const o=i.floatingLabelFoundation.getWidth();this.outlineOpen&&(this.outlineWidth=o)}async layoutOptions(){this.mdcFoundation&&this.mdcFoundation.layoutOptions()}}n([Pt(".mdc-select")],Dn.prototype,"mdcRoot",void 0),n([Pt(".formElement")],Dn.prototype,"formElement",void 0),n([Pt("slot")],Dn.prototype,"slotElement",void 0),n([Pt("select")],Dn.prototype,"nativeSelectElement",void 0),n([Pt("input")],Dn.prototype,"nativeInputElement",void 0),n([Pt(".mdc-line-ripple")],Dn.prototype,"lineRippleElement",void 0),n([Pt(".mdc-floating-label")],Dn.prototype,"labelElement",void 0),n([Pt("mwc-notched-outline")],Dn.prototype,"outlineElement",void 0),n([Pt(".mdc-menu")],Dn.prototype,"menuElement",void 0),n([Pt(".mdc-select__anchor")],Dn.prototype,"anchorElement",void 0),n([zt({type:Boolean,attribute:"disabled",reflect:!0}),fn((function(t){this.mdcFoundation&&this.mdcFoundation.setDisabled(t)}))],Dn.prototype,"disabled",void 0),n([zt({type:Boolean}),fn((function(t,e){void 0!==e&&this.outlined!==e&&this.layout(!1)}))],Dn.prototype,"outlined",void 0),n([zt({type:String}),fn((function(t,e){void 0!==e&&this.label!==e&&this.layout(!1)}))],Dn.prototype,"label",void 0),n([jt()],Dn.prototype,"outlineOpen",void 0),n([jt()],Dn.prototype,"outlineWidth",void 0),n([zt({type:String}),fn((function(t){if(this.mdcFoundation){const e=null===this.selected&&!!t,i=this.selected&&this.selected.value!==t;(e||i)&&this.selectByValue(t),this.reportValidity()}}))],Dn.prototype,"value",void 0),n([zt()],Dn.prototype,"name",void 0),n([jt()],Dn.prototype,"selectedText",void 0),n([zt({type:String})],Dn.prototype,"icon",void 0),n([jt()],Dn.prototype,"menuOpen",void 0),n([zt({type:String})],Dn.prototype,"helper",void 0),n([zt({type:Boolean})],Dn.prototype,"validateOnInitialRender",void 0),n([zt({type:String})],Dn.prototype,"validationMessage",void 0),n([zt({type:Boolean})],Dn.prototype,"required",void 0),n([zt({type:Boolean})],Dn.prototype,"naturalMenuWidth",void 0),n([jt()],Dn.prototype,"isUiValid",void 0),n([zt({type:Boolean})],Dn.prototype,"fixedMenuPosition",void 0),n([Rt({capture:!0})],Dn.prototype,"handleTypeahead",null); + */(n,this.typeaheadState)}async onSelected(t){this.mdcFoundation||await this.updateComplete,this.mdcFoundation.handleMenuItemAction(t.detail.index);const e=this.items[t.detail.index];e&&(this.value=e.value)}onOpened(){this.mdcFoundation&&(this.menuOpen=!0,this.mdcFoundation.handleMenuOpened())}onClosed(){this.mdcFoundation&&(this.menuOpen=!1,this.mdcFoundation.handleMenuClosed())}setFormData(t){this.name&&null!==this.selected&&t.append(this.name,this.value)}async layout(t=!0){this.mdcFoundation&&this.mdcFoundation.layout(),await this.updateComplete;const e=this.menuElement;e&&e.layout(t);const i=this.labelElement;if(!i)return void(this.outlineOpen=!1);const n=!!this.label&&!!this.value;if(i.floatingLabelFoundation.float(n),!this.outlined)return;this.outlineOpen=n,await this.updateComplete;const o=i.floatingLabelFoundation.getWidth();this.outlineOpen&&(this.outlineWidth=o)}async layoutOptions(){this.mdcFoundation&&this.mdcFoundation.layoutOptions()}}n([ht(".mdc-select")],Ar.prototype,"mdcRoot",void 0),n([ht(".formElement")],Ar.prototype,"formElement",void 0),n([ht("slot")],Ar.prototype,"slotElement",void 0),n([ht("select")],Ar.prototype,"nativeSelectElement",void 0),n([ht("input")],Ar.prototype,"nativeInputElement",void 0),n([ht(".mdc-line-ripple")],Ar.prototype,"lineRippleElement",void 0),n([ht(".mdc-floating-label")],Ar.prototype,"labelElement",void 0),n([ht("mwc-notched-outline")],Ar.prototype,"outlineElement",void 0),n([ht(".mdc-menu")],Ar.prototype,"menuElement",void 0),n([ht(".mdc-select__anchor")],Ar.prototype,"anchorElement",void 0),n([st({type:Boolean,attribute:"disabled",reflect:!0}),Io((function(t){this.mdcFoundation&&this.mdcFoundation.setDisabled(t)}))],Ar.prototype,"disabled",void 0),n([st({type:Boolean}),Io((function(t,e){void 0!==e&&this.outlined!==e&&this.layout(!1)}))],Ar.prototype,"outlined",void 0),n([st({type:String}),Io((function(t,e){void 0!==e&&this.label!==e&&this.layout(!1)}))],Ar.prototype,"label",void 0),n([ct()],Ar.prototype,"outlineOpen",void 0),n([ct()],Ar.prototype,"outlineWidth",void 0),n([st({type:String}),Io((function(t){if(this.mdcFoundation){const e=null===this.selected&&!!t,i=this.selected&&this.selected.value!==t;(e||i)&&this.selectByValue(t),this.reportValidity()}}))],Ar.prototype,"value",void 0),n([st()],Ar.prototype,"name",void 0),n([ct()],Ar.prototype,"selectedText",void 0),n([st({type:String})],Ar.prototype,"icon",void 0),n([ct()],Ar.prototype,"menuOpen",void 0),n([st({type:String})],Ar.prototype,"helper",void 0),n([st({type:Boolean})],Ar.prototype,"validateOnInitialRender",void 0),n([st({type:String})],Ar.prototype,"validationMessage",void 0),n([st({type:Boolean})],Ar.prototype,"required",void 0),n([st({type:Boolean})],Ar.prototype,"naturalMenuWidth",void 0),n([ct()],Ar.prototype,"isUiValid",void 0),n([st({type:Boolean})],Ar.prototype,"fixedMenuPosition",void 0),n([ut({capture:!0})],Ar.prototype,"handleTypeahead",null); /** * @license * Copyright 2021 Google LLC * SPDX-LIcense-Identifier: Apache-2.0 */ -const Ln=N`.mdc-floating-label{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto, sans-serif;font-family:var(--mdc-typography-subtitle1-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:1rem;font-size:var(--mdc-typography-subtitle1-font-size, 1rem);font-weight:400;font-weight:var(--mdc-typography-subtitle1-font-weight, 400);letter-spacing:0.009375em;letter-spacing:var(--mdc-typography-subtitle1-letter-spacing, 0.009375em);text-decoration:inherit;text-decoration:var(--mdc-typography-subtitle1-text-decoration, inherit);text-transform:inherit;text-transform:var(--mdc-typography-subtitle1-text-transform, inherit);position:absolute;left:0;-webkit-transform-origin:left top;transform-origin:left top;line-height:1.15rem;text-align:left;text-overflow:ellipsis;white-space:nowrap;cursor:text;overflow:hidden;will-change:transform;transition:transform 150ms cubic-bezier(0.4, 0, 0.2, 1),color 150ms cubic-bezier(0.4, 0, 0.2, 1)}[dir=rtl] .mdc-floating-label,.mdc-floating-label[dir=rtl]{right:0;left:auto;-webkit-transform-origin:right top;transform-origin:right top;text-align:right}.mdc-floating-label--float-above{cursor:auto}.mdc-floating-label--required::after{margin-left:1px;margin-right:0px;content:"*"}[dir=rtl] .mdc-floating-label--required::after,.mdc-floating-label--required[dir=rtl]::after{margin-left:0;margin-right:1px}.mdc-floating-label--float-above{transform:translateY(-106%) scale(0.75)}.mdc-floating-label--shake{animation:mdc-floating-label-shake-float-above-standard 250ms 1}@keyframes mdc-floating-label-shake-float-above-standard{0%{transform:translateX(calc(0 - 0%)) translateY(-106%) scale(0.75)}33%{animation-timing-function:cubic-bezier(0.5, 0, 0.701732, 0.495819);transform:translateX(calc(4% - 0%)) translateY(-106%) scale(0.75)}66%{animation-timing-function:cubic-bezier(0.302435, 0.381352, 0.55, 0.956352);transform:translateX(calc(-4% - 0%)) translateY(-106%) scale(0.75)}100%{transform:translateX(calc(0 - 0%)) translateY(-106%) scale(0.75)}}@keyframes mdc-ripple-fg-radius-in{from{animation-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transform:translate(var(--mdc-ripple-fg-translate-start, 0)) scale(1)}to{transform:translate(var(--mdc-ripple-fg-translate-end, 0)) scale(var(--mdc-ripple-fg-scale, 1))}}@keyframes mdc-ripple-fg-opacity-in{from{animation-timing-function:linear;opacity:0}to{opacity:var(--mdc-ripple-fg-opacity, 0)}}@keyframes mdc-ripple-fg-opacity-out{from{animation-timing-function:linear;opacity:var(--mdc-ripple-fg-opacity, 0)}to{opacity:0}}.mdc-line-ripple::before,.mdc-line-ripple::after{position:absolute;bottom:0;left:0;width:100%;border-bottom-style:solid;content:""}.mdc-line-ripple::before{border-bottom-width:1px;z-index:1}.mdc-line-ripple::after{transform:scaleX(0);border-bottom-width:2px;opacity:0;z-index:2}.mdc-line-ripple::after{transition:transform 180ms cubic-bezier(0.4, 0, 0.2, 1),opacity 180ms cubic-bezier(0.4, 0, 0.2, 1)}.mdc-line-ripple--active::after{transform:scaleX(1);opacity:1}.mdc-line-ripple--deactivating::after{opacity:0}.mdc-notched-outline{display:flex;position:absolute;top:0;right:0;left:0;box-sizing:border-box;width:100%;max-width:100%;height:100%;text-align:left;pointer-events:none}[dir=rtl] .mdc-notched-outline,.mdc-notched-outline[dir=rtl]{text-align:right}.mdc-notched-outline__leading,.mdc-notched-outline__notch,.mdc-notched-outline__trailing{box-sizing:border-box;height:100%;border-top:1px solid;border-bottom:1px solid;pointer-events:none}.mdc-notched-outline__leading{border-left:1px solid;border-right:none;width:12px}[dir=rtl] .mdc-notched-outline__leading,.mdc-notched-outline__leading[dir=rtl]{border-left:none;border-right:1px solid}.mdc-notched-outline__trailing{border-left:none;border-right:1px solid;flex-grow:1}[dir=rtl] .mdc-notched-outline__trailing,.mdc-notched-outline__trailing[dir=rtl]{border-left:1px solid;border-right:none}.mdc-notched-outline__notch{flex:0 0 auto;width:auto;max-width:calc(100% - 12px * 2)}.mdc-notched-outline .mdc-floating-label{display:inline-block;position:relative;max-width:100%}.mdc-notched-outline .mdc-floating-label--float-above{text-overflow:clip}.mdc-notched-outline--upgraded .mdc-floating-label--float-above{max-width:calc(100% / 0.75)}.mdc-notched-outline--notched .mdc-notched-outline__notch{padding-left:0;padding-right:8px;border-top:none}[dir=rtl] .mdc-notched-outline--notched .mdc-notched-outline__notch,.mdc-notched-outline--notched .mdc-notched-outline__notch[dir=rtl]{padding-left:8px;padding-right:0}.mdc-notched-outline--no-label .mdc-notched-outline__notch{display:none}.mdc-select{display:inline-flex;position:relative}.mdc-select:not(.mdc-select--disabled) .mdc-select__selected-text{color:rgba(0, 0, 0, 0.87)}.mdc-select.mdc-select--disabled .mdc-select__selected-text{color:rgba(0, 0, 0, 0.38)}.mdc-select:not(.mdc-select--disabled) .mdc-floating-label{color:rgba(0, 0, 0, 0.6)}.mdc-select:not(.mdc-select--disabled).mdc-select--focused .mdc-floating-label{color:rgba(98, 0, 238, 0.87)}.mdc-select.mdc-select--disabled .mdc-floating-label{color:rgba(0, 0, 0, 0.38)}.mdc-select:not(.mdc-select--disabled) .mdc-select__dropdown-icon{fill:rgba(0, 0, 0, 0.54)}.mdc-select:not(.mdc-select--disabled).mdc-select--focused .mdc-select__dropdown-icon{fill:#6200ee;fill:var(--mdc-theme-primary, #6200ee)}.mdc-select.mdc-select--disabled .mdc-select__dropdown-icon{fill:rgba(0, 0, 0, 0.38)}.mdc-select:not(.mdc-select--disabled)+.mdc-select-helper-text{color:rgba(0, 0, 0, 0.6)}.mdc-select.mdc-select--disabled+.mdc-select-helper-text{color:rgba(0, 0, 0, 0.38)}.mdc-select:not(.mdc-select--disabled) .mdc-select__icon{color:rgba(0, 0, 0, 0.54)}.mdc-select.mdc-select--disabled .mdc-select__icon{color:rgba(0, 0, 0, 0.38)}@media screen and (forced-colors: active),(-ms-high-contrast: active){.mdc-select.mdc-select--disabled .mdc-select__selected-text{color:GrayText}.mdc-select.mdc-select--disabled .mdc-select__dropdown-icon{fill:red}.mdc-select.mdc-select--disabled .mdc-floating-label{color:GrayText}.mdc-select.mdc-select--disabled .mdc-line-ripple::before{border-bottom-color:GrayText}.mdc-select.mdc-select--disabled .mdc-notched-outline__leading,.mdc-select.mdc-select--disabled .mdc-notched-outline__notch,.mdc-select.mdc-select--disabled .mdc-notched-outline__trailing{border-color:GrayText}.mdc-select.mdc-select--disabled .mdc-select__icon{color:GrayText}.mdc-select.mdc-select--disabled+.mdc-select-helper-text{color:GrayText}}.mdc-select .mdc-floating-label{top:50%;transform:translateY(-50%);pointer-events:none}.mdc-select .mdc-select__anchor{padding-left:16px;padding-right:0}[dir=rtl] .mdc-select .mdc-select__anchor,.mdc-select .mdc-select__anchor[dir=rtl]{padding-left:0;padding-right:16px}.mdc-select.mdc-select--with-leading-icon .mdc-select__anchor{padding-left:0;padding-right:0}[dir=rtl] .mdc-select.mdc-select--with-leading-icon .mdc-select__anchor,.mdc-select.mdc-select--with-leading-icon .mdc-select__anchor[dir=rtl]{padding-left:0;padding-right:0}.mdc-select .mdc-select__icon{width:24px;height:24px;font-size:24px}.mdc-select .mdc-select__dropdown-icon{width:24px;height:24px}.mdc-select .mdc-select__menu .mdc-deprecated-list-item{padding-left:16px;padding-right:16px}[dir=rtl] .mdc-select .mdc-select__menu .mdc-deprecated-list-item,.mdc-select .mdc-select__menu .mdc-deprecated-list-item[dir=rtl]{padding-left:16px;padding-right:16px}.mdc-select .mdc-select__menu .mdc-deprecated-list-item__graphic{margin-left:0;margin-right:12px}[dir=rtl] .mdc-select .mdc-select__menu .mdc-deprecated-list-item__graphic,.mdc-select .mdc-select__menu .mdc-deprecated-list-item__graphic[dir=rtl]{margin-left:12px;margin-right:0}.mdc-select__dropdown-icon{margin-left:12px;margin-right:12px;display:inline-flex;position:relative;align-self:center;align-items:center;justify-content:center;flex-shrink:0;pointer-events:none}.mdc-select__dropdown-icon .mdc-select__dropdown-icon-active,.mdc-select__dropdown-icon .mdc-select__dropdown-icon-inactive{position:absolute;top:0;left:0}.mdc-select__dropdown-icon .mdc-select__dropdown-icon-graphic{width:41.6666666667%;height:20.8333333333%}.mdc-select__dropdown-icon .mdc-select__dropdown-icon-inactive{opacity:1;transition:opacity 75ms linear 75ms}.mdc-select__dropdown-icon .mdc-select__dropdown-icon-active{opacity:0;transition:opacity 75ms linear}[dir=rtl] .mdc-select__dropdown-icon,.mdc-select__dropdown-icon[dir=rtl]{margin-left:12px;margin-right:12px}.mdc-select--activated .mdc-select__dropdown-icon .mdc-select__dropdown-icon-inactive{opacity:0;transition:opacity 49.5ms linear}.mdc-select--activated .mdc-select__dropdown-icon .mdc-select__dropdown-icon-active{opacity:1;transition:opacity 100.5ms linear 49.5ms}.mdc-select__anchor{width:200px;min-width:0;flex:1 1 auto;position:relative;box-sizing:border-box;overflow:hidden;outline:none;cursor:pointer}.mdc-select__anchor .mdc-floating-label--float-above{transform:translateY(-106%) scale(0.75)}.mdc-select__selected-text-container{display:flex;appearance:none;pointer-events:none;box-sizing:border-box;width:auto;min-width:0;flex-grow:1;height:28px;border:none;outline:none;padding:0;background-color:transparent;color:inherit}.mdc-select__selected-text{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto, sans-serif;font-family:var(--mdc-typography-subtitle1-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:1rem;font-size:var(--mdc-typography-subtitle1-font-size, 1rem);line-height:1.75rem;line-height:var(--mdc-typography-subtitle1-line-height, 1.75rem);font-weight:400;font-weight:var(--mdc-typography-subtitle1-font-weight, 400);letter-spacing:0.009375em;letter-spacing:var(--mdc-typography-subtitle1-letter-spacing, 0.009375em);text-decoration:inherit;text-decoration:var(--mdc-typography-subtitle1-text-decoration, inherit);text-transform:inherit;text-transform:var(--mdc-typography-subtitle1-text-transform, inherit);text-overflow:ellipsis;white-space:nowrap;overflow:hidden;display:block;width:100%;text-align:left}[dir=rtl] .mdc-select__selected-text,.mdc-select__selected-text[dir=rtl]{text-align:right}.mdc-select--invalid:not(.mdc-select--disabled) .mdc-floating-label{color:#b00020;color:var(--mdc-theme-error, #b00020)}.mdc-select--invalid:not(.mdc-select--disabled).mdc-select--focused .mdc-floating-label{color:#b00020;color:var(--mdc-theme-error, #b00020)}.mdc-select--invalid:not(.mdc-select--disabled).mdc-select--invalid+.mdc-select-helper-text--validation-msg{color:#b00020;color:var(--mdc-theme-error, #b00020)}.mdc-select--invalid:not(.mdc-select--disabled) .mdc-select__dropdown-icon{fill:#b00020;fill:var(--mdc-theme-error, #b00020)}.mdc-select--invalid:not(.mdc-select--disabled).mdc-select--focused .mdc-select__dropdown-icon{fill:#b00020;fill:var(--mdc-theme-error, #b00020)}.mdc-select--disabled{cursor:default;pointer-events:none}.mdc-select--with-leading-icon .mdc-select__menu .mdc-deprecated-list-item{padding-left:12px;padding-right:12px}[dir=rtl] .mdc-select--with-leading-icon .mdc-select__menu .mdc-deprecated-list-item,.mdc-select--with-leading-icon .mdc-select__menu .mdc-deprecated-list-item[dir=rtl]{padding-left:12px;padding-right:12px}.mdc-select__menu .mdc-deprecated-list .mdc-select__icon,.mdc-select__menu .mdc-list .mdc-select__icon{margin-left:0;margin-right:0}[dir=rtl] .mdc-select__menu .mdc-deprecated-list .mdc-select__icon,[dir=rtl] .mdc-select__menu .mdc-list .mdc-select__icon,.mdc-select__menu .mdc-deprecated-list .mdc-select__icon[dir=rtl],.mdc-select__menu .mdc-list .mdc-select__icon[dir=rtl]{margin-left:0;margin-right:0}.mdc-select__menu .mdc-deprecated-list .mdc-deprecated-list-item--selected,.mdc-select__menu .mdc-deprecated-list .mdc-deprecated-list-item--activated,.mdc-select__menu .mdc-list .mdc-deprecated-list-item--selected,.mdc-select__menu .mdc-list .mdc-deprecated-list-item--activated{color:#000;color:var(--mdc-theme-on-surface, #000)}.mdc-select__menu .mdc-deprecated-list .mdc-deprecated-list-item--selected .mdc-deprecated-list-item__graphic,.mdc-select__menu .mdc-deprecated-list .mdc-deprecated-list-item--activated .mdc-deprecated-list-item__graphic,.mdc-select__menu .mdc-list .mdc-deprecated-list-item--selected .mdc-deprecated-list-item__graphic,.mdc-select__menu .mdc-list .mdc-deprecated-list-item--activated .mdc-deprecated-list-item__graphic{color:#000;color:var(--mdc-theme-on-surface, #000)}.mdc-select__menu .mdc-list-item__start{display:inline-flex;align-items:center}.mdc-select__option{padding-left:16px;padding-right:16px}[dir=rtl] .mdc-select__option,.mdc-select__option[dir=rtl]{padding-left:16px;padding-right:16px}.mdc-select__one-line-option.mdc-list-item--with-one-line{height:48px}.mdc-select__two-line-option.mdc-list-item--with-two-lines{height:64px}.mdc-select__two-line-option.mdc-list-item--with-two-lines .mdc-list-item__start{margin-top:20px}.mdc-select__two-line-option.mdc-list-item--with-two-lines .mdc-list-item__primary-text{display:block;margin-top:0;line-height:normal;margin-bottom:-20px}.mdc-select__two-line-option.mdc-list-item--with-two-lines .mdc-list-item__primary-text::before{display:inline-block;width:0;height:28px;content:"";vertical-align:0}.mdc-select__two-line-option.mdc-list-item--with-two-lines .mdc-list-item__primary-text::after{display:inline-block;width:0;height:20px;content:"";vertical-align:-20px}.mdc-select__two-line-option.mdc-list-item--with-two-lines.mdc-list-item--with-trailing-meta .mdc-list-item__end{display:block;margin-top:0;line-height:normal}.mdc-select__two-line-option.mdc-list-item--with-two-lines.mdc-list-item--with-trailing-meta .mdc-list-item__end::before{display:inline-block;width:0;height:36px;content:"";vertical-align:0}.mdc-select__option-with-leading-content{padding-left:0;padding-right:12px}.mdc-select__option-with-leading-content.mdc-list-item{padding-left:0;padding-right:auto}[dir=rtl] .mdc-select__option-with-leading-content.mdc-list-item,.mdc-select__option-with-leading-content.mdc-list-item[dir=rtl]{padding-left:auto;padding-right:0}.mdc-select__option-with-leading-content .mdc-list-item__start{margin-left:12px;margin-right:0}[dir=rtl] .mdc-select__option-with-leading-content .mdc-list-item__start,.mdc-select__option-with-leading-content .mdc-list-item__start[dir=rtl]{margin-left:0;margin-right:12px}.mdc-select__option-with-leading-content .mdc-list-item__start{width:36px;height:24px}[dir=rtl] .mdc-select__option-with-leading-content,.mdc-select__option-with-leading-content[dir=rtl]{padding-left:12px;padding-right:0}.mdc-select__option-with-meta.mdc-list-item{padding-left:auto;padding-right:0}[dir=rtl] .mdc-select__option-with-meta.mdc-list-item,.mdc-select__option-with-meta.mdc-list-item[dir=rtl]{padding-left:0;padding-right:auto}.mdc-select__option-with-meta .mdc-list-item__end{margin-left:12px;margin-right:12px}[dir=rtl] .mdc-select__option-with-meta .mdc-list-item__end,.mdc-select__option-with-meta .mdc-list-item__end[dir=rtl]{margin-left:12px;margin-right:12px}.mdc-select--filled .mdc-select__anchor{height:56px;display:flex;align-items:baseline}.mdc-select--filled .mdc-select__anchor::before{display:inline-block;width:0;height:40px;content:"";vertical-align:0}.mdc-select--filled.mdc-select--no-label .mdc-select__anchor .mdc-select__selected-text::before{content:"​"}.mdc-select--filled.mdc-select--no-label .mdc-select__anchor .mdc-select__selected-text-container{height:100%;display:inline-flex;align-items:center}.mdc-select--filled.mdc-select--no-label .mdc-select__anchor::before{display:none}.mdc-select--filled .mdc-select__anchor{border-top-left-radius:4px;border-top-left-radius:var(--mdc-shape-small, 4px);border-top-right-radius:4px;border-top-right-radius:var(--mdc-shape-small, 4px);border-bottom-right-radius:0;border-bottom-left-radius:0}.mdc-select--filled:not(.mdc-select--disabled) .mdc-select__anchor{background-color:whitesmoke}.mdc-select--filled.mdc-select--disabled .mdc-select__anchor{background-color:#fafafa}.mdc-select--filled:not(.mdc-select--disabled) .mdc-line-ripple::before{border-bottom-color:rgba(0, 0, 0, 0.42)}.mdc-select--filled:not(.mdc-select--disabled):hover .mdc-line-ripple::before{border-bottom-color:rgba(0, 0, 0, 0.87)}.mdc-select--filled:not(.mdc-select--disabled) .mdc-line-ripple::after{border-bottom-color:#6200ee;border-bottom-color:var(--mdc-theme-primary, #6200ee)}.mdc-select--filled.mdc-select--disabled .mdc-line-ripple::before{border-bottom-color:rgba(0, 0, 0, 0.06)}.mdc-select--filled .mdc-floating-label{max-width:calc(100% - 64px)}.mdc-select--filled .mdc-floating-label--float-above{max-width:calc(100% / 0.75 - 64px / 0.75)}.mdc-select--filled .mdc-menu-surface--is-open-below{border-top-left-radius:0px;border-top-right-radius:0px}.mdc-select--filled.mdc-select--focused.mdc-line-ripple::after{transform:scale(1, 2);opacity:1}.mdc-select--filled .mdc-floating-label{left:16px;right:initial}[dir=rtl] .mdc-select--filled .mdc-floating-label,.mdc-select--filled .mdc-floating-label[dir=rtl]{left:initial;right:16px}.mdc-select--filled.mdc-select--with-leading-icon .mdc-floating-label{left:48px;right:initial}[dir=rtl] .mdc-select--filled.mdc-select--with-leading-icon .mdc-floating-label,.mdc-select--filled.mdc-select--with-leading-icon .mdc-floating-label[dir=rtl]{left:initial;right:48px}.mdc-select--filled.mdc-select--with-leading-icon .mdc-floating-label{max-width:calc(100% - 96px)}.mdc-select--filled.mdc-select--with-leading-icon .mdc-floating-label--float-above{max-width:calc(100% / 0.75 - 96px / 0.75)}.mdc-select--invalid:not(.mdc-select--disabled) .mdc-line-ripple::before{border-bottom-color:#b00020;border-bottom-color:var(--mdc-theme-error, #b00020)}.mdc-select--invalid:not(.mdc-select--disabled):hover .mdc-line-ripple::before{border-bottom-color:#b00020;border-bottom-color:var(--mdc-theme-error, #b00020)}.mdc-select--invalid:not(.mdc-select--disabled) .mdc-line-ripple::after{border-bottom-color:#b00020;border-bottom-color:var(--mdc-theme-error, #b00020)}.mdc-select--outlined{border:none}.mdc-select--outlined .mdc-select__anchor{height:56px}.mdc-select--outlined .mdc-select__anchor .mdc-floating-label--float-above{transform:translateY(-37.25px) scale(1)}.mdc-select--outlined .mdc-select__anchor .mdc-floating-label--float-above{font-size:.75rem}.mdc-select--outlined .mdc-select__anchor.mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-select--outlined .mdc-select__anchor .mdc-notched-outline--upgraded .mdc-floating-label--float-above{transform:translateY(-34.75px) scale(0.75)}.mdc-select--outlined .mdc-select__anchor.mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-select--outlined .mdc-select__anchor .mdc-notched-outline--upgraded .mdc-floating-label--float-above{font-size:1rem}.mdc-select--outlined .mdc-select__anchor .mdc-floating-label--shake{animation:mdc-floating-label-shake-float-above-select-outlined-56px 250ms 1}@keyframes mdc-floating-label-shake-float-above-select-outlined-56px{0%{transform:translateX(calc(0 - 0%)) translateY(-34.75px) scale(0.75)}33%{animation-timing-function:cubic-bezier(0.5, 0, 0.701732, 0.495819);transform:translateX(calc(4% - 0%)) translateY(-34.75px) scale(0.75)}66%{animation-timing-function:cubic-bezier(0.302435, 0.381352, 0.55, 0.956352);transform:translateX(calc(-4% - 0%)) translateY(-34.75px) scale(0.75)}100%{transform:translateX(calc(0 - 0%)) translateY(-34.75px) scale(0.75)}}.mdc-select--outlined .mdc-notched-outline .mdc-notched-outline__leading{border-top-left-radius:4px;border-top-left-radius:var(--mdc-shape-small, 4px);border-top-right-radius:0;border-bottom-right-radius:0;border-bottom-left-radius:4px;border-bottom-left-radius:var(--mdc-shape-small, 4px)}[dir=rtl] .mdc-select--outlined .mdc-notched-outline .mdc-notched-outline__leading,.mdc-select--outlined .mdc-notched-outline .mdc-notched-outline__leading[dir=rtl]{border-top-left-radius:0;border-top-right-radius:4px;border-top-right-radius:var(--mdc-shape-small, 4px);border-bottom-right-radius:4px;border-bottom-right-radius:var(--mdc-shape-small, 4px);border-bottom-left-radius:0}@supports(top: max(0%)){.mdc-select--outlined .mdc-notched-outline .mdc-notched-outline__leading{width:max(12px, var(--mdc-shape-small, 4px))}}@supports(top: max(0%)){.mdc-select--outlined .mdc-notched-outline .mdc-notched-outline__notch{max-width:calc(100% - max(12px, var(--mdc-shape-small, 4px)) * 2)}}.mdc-select--outlined .mdc-notched-outline .mdc-notched-outline__trailing{border-top-left-radius:0;border-top-right-radius:4px;border-top-right-radius:var(--mdc-shape-small, 4px);border-bottom-right-radius:4px;border-bottom-right-radius:var(--mdc-shape-small, 4px);border-bottom-left-radius:0}[dir=rtl] .mdc-select--outlined .mdc-notched-outline .mdc-notched-outline__trailing,.mdc-select--outlined .mdc-notched-outline .mdc-notched-outline__trailing[dir=rtl]{border-top-left-radius:4px;border-top-left-radius:var(--mdc-shape-small, 4px);border-top-right-radius:0;border-bottom-right-radius:0;border-bottom-left-radius:4px;border-bottom-left-radius:var(--mdc-shape-small, 4px)}@supports(top: max(0%)){.mdc-select--outlined .mdc-select__anchor{padding-left:max(16px, calc(var(--mdc-shape-small, 4px) + 4px))}}[dir=rtl] .mdc-select--outlined .mdc-select__anchor,.mdc-select--outlined .mdc-select__anchor[dir=rtl]{padding-left:0}@supports(top: max(0%)){[dir=rtl] .mdc-select--outlined .mdc-select__anchor,.mdc-select--outlined .mdc-select__anchor[dir=rtl]{padding-right:max(16px, calc(var(--mdc-shape-small, 4px) + 4px))}}@supports(top: max(0%)){.mdc-select--outlined+.mdc-select-helper-text{margin-left:max(16px, calc(var(--mdc-shape-small, 4px) + 4px))}}[dir=rtl] .mdc-select--outlined+.mdc-select-helper-text,.mdc-select--outlined+.mdc-select-helper-text[dir=rtl]{margin-left:0}@supports(top: max(0%)){[dir=rtl] .mdc-select--outlined+.mdc-select-helper-text,.mdc-select--outlined+.mdc-select-helper-text[dir=rtl]{margin-right:max(16px, calc(var(--mdc-shape-small, 4px) + 4px))}}.mdc-select--outlined:not(.mdc-select--disabled) .mdc-select__anchor{background-color:transparent}.mdc-select--outlined.mdc-select--disabled .mdc-select__anchor{background-color:transparent}.mdc-select--outlined:not(.mdc-select--disabled) .mdc-notched-outline__leading,.mdc-select--outlined:not(.mdc-select--disabled) .mdc-notched-outline__notch,.mdc-select--outlined:not(.mdc-select--disabled) .mdc-notched-outline__trailing{border-color:rgba(0, 0, 0, 0.38)}.mdc-select--outlined:not(.mdc-select--disabled):not(.mdc-select--focused) .mdc-select__anchor:hover .mdc-notched-outline .mdc-notched-outline__leading,.mdc-select--outlined:not(.mdc-select--disabled):not(.mdc-select--focused) .mdc-select__anchor:hover .mdc-notched-outline .mdc-notched-outline__notch,.mdc-select--outlined:not(.mdc-select--disabled):not(.mdc-select--focused) .mdc-select__anchor:hover .mdc-notched-outline .mdc-notched-outline__trailing{border-color:rgba(0, 0, 0, 0.87)}.mdc-select--outlined:not(.mdc-select--disabled).mdc-select--focused .mdc-notched-outline .mdc-notched-outline__leading,.mdc-select--outlined:not(.mdc-select--disabled).mdc-select--focused .mdc-notched-outline .mdc-notched-outline__notch,.mdc-select--outlined:not(.mdc-select--disabled).mdc-select--focused .mdc-notched-outline .mdc-notched-outline__trailing{border-width:2px}.mdc-select--outlined:not(.mdc-select--disabled).mdc-select--focused .mdc-notched-outline .mdc-notched-outline__leading,.mdc-select--outlined:not(.mdc-select--disabled).mdc-select--focused .mdc-notched-outline .mdc-notched-outline__notch,.mdc-select--outlined:not(.mdc-select--disabled).mdc-select--focused .mdc-notched-outline .mdc-notched-outline__trailing{border-color:#6200ee;border-color:var(--mdc-theme-primary, #6200ee)}.mdc-select--outlined.mdc-select--disabled .mdc-notched-outline__leading,.mdc-select--outlined.mdc-select--disabled .mdc-notched-outline__notch,.mdc-select--outlined.mdc-select--disabled .mdc-notched-outline__trailing{border-color:rgba(0, 0, 0, 0.06)}.mdc-select--outlined .mdc-select__anchor :not(.mdc-notched-outline--notched) .mdc-notched-outline__notch{max-width:calc(100% - 60px)}.mdc-select--outlined .mdc-select__anchor{display:flex;align-items:baseline;overflow:visible}.mdc-select--outlined .mdc-select__anchor .mdc-floating-label--shake{animation:mdc-floating-label-shake-float-above-select-outlined 250ms 1}.mdc-select--outlined .mdc-select__anchor .mdc-floating-label--float-above{transform:translateY(-37.25px) scale(1)}.mdc-select--outlined .mdc-select__anchor .mdc-floating-label--float-above{font-size:.75rem}.mdc-select--outlined .mdc-select__anchor.mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-select--outlined .mdc-select__anchor .mdc-notched-outline--upgraded .mdc-floating-label--float-above{transform:translateY(-34.75px) scale(0.75)}.mdc-select--outlined .mdc-select__anchor.mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-select--outlined .mdc-select__anchor .mdc-notched-outline--upgraded .mdc-floating-label--float-above{font-size:1rem}.mdc-select--outlined .mdc-select__anchor .mdc-notched-outline--notched .mdc-notched-outline__notch{padding-top:1px}.mdc-select--outlined .mdc-select__anchor .mdc-select__selected-text::before{content:"​"}.mdc-select--outlined .mdc-select__anchor .mdc-select__selected-text-container{height:100%;display:inline-flex;align-items:center}.mdc-select--outlined .mdc-select__anchor::before{display:none}.mdc-select--outlined .mdc-select__selected-text-container{display:flex;border:none;z-index:1;background-color:transparent}.mdc-select--outlined .mdc-select__icon{z-index:2}.mdc-select--outlined .mdc-floating-label{line-height:1.15rem;left:4px;right:initial}[dir=rtl] .mdc-select--outlined .mdc-floating-label,.mdc-select--outlined .mdc-floating-label[dir=rtl]{left:initial;right:4px}.mdc-select--outlined.mdc-select--focused .mdc-notched-outline--notched .mdc-notched-outline__notch{padding-top:2px}.mdc-select--outlined.mdc-select--invalid:not(.mdc-select--disabled) .mdc-notched-outline__leading,.mdc-select--outlined.mdc-select--invalid:not(.mdc-select--disabled) .mdc-notched-outline__notch,.mdc-select--outlined.mdc-select--invalid:not(.mdc-select--disabled) .mdc-notched-outline__trailing{border-color:#b00020;border-color:var(--mdc-theme-error, #b00020)}.mdc-select--outlined.mdc-select--invalid:not(.mdc-select--disabled):not(.mdc-select--focused) .mdc-select__anchor:hover .mdc-notched-outline .mdc-notched-outline__leading,.mdc-select--outlined.mdc-select--invalid:not(.mdc-select--disabled):not(.mdc-select--focused) .mdc-select__anchor:hover .mdc-notched-outline .mdc-notched-outline__notch,.mdc-select--outlined.mdc-select--invalid:not(.mdc-select--disabled):not(.mdc-select--focused) .mdc-select__anchor:hover .mdc-notched-outline .mdc-notched-outline__trailing{border-color:#b00020;border-color:var(--mdc-theme-error, #b00020)}.mdc-select--outlined.mdc-select--invalid:not(.mdc-select--disabled).mdc-select--focused .mdc-notched-outline .mdc-notched-outline__leading,.mdc-select--outlined.mdc-select--invalid:not(.mdc-select--disabled).mdc-select--focused .mdc-notched-outline .mdc-notched-outline__notch,.mdc-select--outlined.mdc-select--invalid:not(.mdc-select--disabled).mdc-select--focused .mdc-notched-outline .mdc-notched-outline__trailing{border-width:2px}.mdc-select--outlined.mdc-select--invalid:not(.mdc-select--disabled).mdc-select--focused .mdc-notched-outline .mdc-notched-outline__leading,.mdc-select--outlined.mdc-select--invalid:not(.mdc-select--disabled).mdc-select--focused .mdc-notched-outline .mdc-notched-outline__notch,.mdc-select--outlined.mdc-select--invalid:not(.mdc-select--disabled).mdc-select--focused .mdc-notched-outline .mdc-notched-outline__trailing{border-color:#b00020;border-color:var(--mdc-theme-error, #b00020)}.mdc-select--outlined.mdc-select--with-leading-icon .mdc-floating-label{left:36px;right:initial}[dir=rtl] .mdc-select--outlined.mdc-select--with-leading-icon .mdc-floating-label,.mdc-select--outlined.mdc-select--with-leading-icon .mdc-floating-label[dir=rtl]{left:initial;right:36px}.mdc-select--outlined.mdc-select--with-leading-icon .mdc-floating-label--float-above{transform:translateY(-37.25px) translateX(-32px) scale(1)}[dir=rtl] .mdc-select--outlined.mdc-select--with-leading-icon .mdc-floating-label--float-above,.mdc-select--outlined.mdc-select--with-leading-icon .mdc-floating-label--float-above[dir=rtl]{transform:translateY(-37.25px) translateX(32px) scale(1)}.mdc-select--outlined.mdc-select--with-leading-icon .mdc-floating-label--float-above{font-size:.75rem}.mdc-select--outlined.mdc-select--with-leading-icon.mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-select--outlined.mdc-select--with-leading-icon .mdc-notched-outline--upgraded .mdc-floating-label--float-above{transform:translateY(-34.75px) translateX(-32px) scale(0.75)}[dir=rtl] .mdc-select--outlined.mdc-select--with-leading-icon.mdc-notched-outline--upgraded .mdc-floating-label--float-above,[dir=rtl] .mdc-select--outlined.mdc-select--with-leading-icon .mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-select--outlined.mdc-select--with-leading-icon.mdc-notched-outline--upgraded .mdc-floating-label--float-above[dir=rtl],.mdc-select--outlined.mdc-select--with-leading-icon .mdc-notched-outline--upgraded .mdc-floating-label--float-above[dir=rtl]{transform:translateY(-34.75px) translateX(32px) scale(0.75)}.mdc-select--outlined.mdc-select--with-leading-icon.mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-select--outlined.mdc-select--with-leading-icon .mdc-notched-outline--upgraded .mdc-floating-label--float-above{font-size:1rem}.mdc-select--outlined.mdc-select--with-leading-icon .mdc-floating-label--shake{animation:mdc-floating-label-shake-float-above-select-outlined-leading-icon-56px 250ms 1}@keyframes mdc-floating-label-shake-float-above-select-outlined-leading-icon-56px{0%{transform:translateX(calc(0 - 32px)) translateY(-34.75px) scale(0.75)}33%{animation-timing-function:cubic-bezier(0.5, 0, 0.701732, 0.495819);transform:translateX(calc(4% - 32px)) translateY(-34.75px) scale(0.75)}66%{animation-timing-function:cubic-bezier(0.302435, 0.381352, 0.55, 0.956352);transform:translateX(calc(-4% - 32px)) translateY(-34.75px) scale(0.75)}100%{transform:translateX(calc(0 - 32px)) translateY(-34.75px) scale(0.75)}}[dir=rtl] .mdc-select--outlined.mdc-select--with-leading-icon .mdc-floating-label--shake,.mdc-select--outlined.mdc-select--with-leading-icon[dir=rtl] .mdc-floating-label--shake{animation:mdc-floating-label-shake-float-above-select-outlined-leading-icon-56px 250ms 1}@keyframes mdc-floating-label-shake-float-above-select-outlined-leading-icon-56px-rtl{0%{transform:translateX(calc(0 - -32px)) translateY(-34.75px) scale(0.75)}33%{animation-timing-function:cubic-bezier(0.5, 0, 0.701732, 0.495819);transform:translateX(calc(4% - -32px)) translateY(-34.75px) scale(0.75)}66%{animation-timing-function:cubic-bezier(0.302435, 0.381352, 0.55, 0.956352);transform:translateX(calc(-4% - -32px)) translateY(-34.75px) scale(0.75)}100%{transform:translateX(calc(0 - -32px)) translateY(-34.75px) scale(0.75)}}.mdc-select--outlined.mdc-select--with-leading-icon .mdc-select__anchor :not(.mdc-notched-outline--notched) .mdc-notched-outline__notch{max-width:calc(100% - 96px)}.mdc-select--outlined .mdc-menu-surface{margin-bottom:8px}.mdc-select--outlined.mdc-select--no-label .mdc-menu-surface,.mdc-select--outlined .mdc-menu-surface--is-open-below{margin-bottom:0}.mdc-select__anchor{--mdc-ripple-fg-size: 0;--mdc-ripple-left: 0;--mdc-ripple-top: 0;--mdc-ripple-fg-scale: 1;--mdc-ripple-fg-translate-end: 0;--mdc-ripple-fg-translate-start: 0;-webkit-tap-highlight-color:rgba(0,0,0,0);will-change:transform,opacity}.mdc-select__anchor .mdc-select__ripple::before,.mdc-select__anchor .mdc-select__ripple::after{position:absolute;border-radius:50%;opacity:0;pointer-events:none;content:""}.mdc-select__anchor .mdc-select__ripple::before{transition:opacity 15ms linear,background-color 15ms linear;z-index:1;z-index:var(--mdc-ripple-z-index, 1)}.mdc-select__anchor .mdc-select__ripple::after{z-index:0;z-index:var(--mdc-ripple-z-index, 0)}.mdc-select__anchor.mdc-ripple-upgraded .mdc-select__ripple::before{transform:scale(var(--mdc-ripple-fg-scale, 1))}.mdc-select__anchor.mdc-ripple-upgraded .mdc-select__ripple::after{top:0;left:0;transform:scale(0);transform-origin:center center}.mdc-select__anchor.mdc-ripple-upgraded--unbounded .mdc-select__ripple::after{top:var(--mdc-ripple-top, 0);left:var(--mdc-ripple-left, 0)}.mdc-select__anchor.mdc-ripple-upgraded--foreground-activation .mdc-select__ripple::after{animation:mdc-ripple-fg-radius-in 225ms forwards,mdc-ripple-fg-opacity-in 75ms forwards}.mdc-select__anchor.mdc-ripple-upgraded--foreground-deactivation .mdc-select__ripple::after{animation:mdc-ripple-fg-opacity-out 150ms;transform:translate(var(--mdc-ripple-fg-translate-end, 0)) scale(var(--mdc-ripple-fg-scale, 1))}.mdc-select__anchor .mdc-select__ripple::before,.mdc-select__anchor .mdc-select__ripple::after{top:calc(50% - 100%);left:calc(50% - 100%);width:200%;height:200%}.mdc-select__anchor.mdc-ripple-upgraded .mdc-select__ripple::after{width:var(--mdc-ripple-fg-size, 100%);height:var(--mdc-ripple-fg-size, 100%)}.mdc-select__anchor .mdc-select__ripple::before,.mdc-select__anchor .mdc-select__ripple::after{background-color:rgba(0, 0, 0, 0.87);background-color:var(--mdc-ripple-color, rgba(0, 0, 0, 0.87))}.mdc-select__anchor:hover .mdc-select__ripple::before,.mdc-select__anchor.mdc-ripple-surface--hover .mdc-select__ripple::before{opacity:0.04;opacity:var(--mdc-ripple-hover-opacity, 0.04)}.mdc-select__anchor.mdc-ripple-upgraded--background-focused .mdc-select__ripple::before,.mdc-select__anchor:not(.mdc-ripple-upgraded):focus .mdc-select__ripple::before{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-focus-opacity, 0.12)}.mdc-select__anchor .mdc-select__ripple{position:absolute;top:0;left:0;width:100%;height:100%;pointer-events:none}.mdc-select__menu .mdc-deprecated-list .mdc-deprecated-list-item--selected .mdc-deprecated-list-item__ripple::before,.mdc-select__menu .mdc-deprecated-list .mdc-deprecated-list-item--selected .mdc-deprecated-list-item__ripple::after{background-color:#000;background-color:var(--mdc-ripple-color, var(--mdc-theme-on-surface, #000))}.mdc-select__menu .mdc-deprecated-list .mdc-deprecated-list-item--selected:hover .mdc-deprecated-list-item__ripple::before,.mdc-select__menu .mdc-deprecated-list .mdc-deprecated-list-item--selected.mdc-ripple-surface--hover .mdc-deprecated-list-item__ripple::before{opacity:0.04;opacity:var(--mdc-ripple-hover-opacity, 0.04)}.mdc-select__menu .mdc-deprecated-list .mdc-deprecated-list-item--selected.mdc-ripple-upgraded--background-focused .mdc-deprecated-list-item__ripple::before,.mdc-select__menu .mdc-deprecated-list .mdc-deprecated-list-item--selected:not(.mdc-ripple-upgraded):focus .mdc-deprecated-list-item__ripple::before{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-focus-opacity, 0.12)}.mdc-select__menu .mdc-deprecated-list .mdc-deprecated-list-item--selected:not(.mdc-ripple-upgraded) .mdc-deprecated-list-item__ripple::after{transition:opacity 150ms linear}.mdc-select__menu .mdc-deprecated-list .mdc-deprecated-list-item--selected:not(.mdc-ripple-upgraded):active .mdc-deprecated-list-item__ripple::after{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-press-opacity, 0.12)}.mdc-select__menu .mdc-deprecated-list .mdc-deprecated-list-item--selected.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.12)}.mdc-select__menu .mdc-deprecated-list .mdc-deprecated-list-item--selected .mdc-list-item__ripple::before,.mdc-select__menu .mdc-deprecated-list .mdc-deprecated-list-item--selected .mdc-list-item__ripple::after{background-color:#000;background-color:var(--mdc-ripple-color, var(--mdc-theme-on-surface, #000))}.mdc-select__menu .mdc-deprecated-list .mdc-deprecated-list-item--selected:hover .mdc-list-item__ripple::before,.mdc-select__menu .mdc-deprecated-list .mdc-deprecated-list-item--selected.mdc-ripple-surface--hover .mdc-list-item__ripple::before{opacity:0.04;opacity:var(--mdc-ripple-hover-opacity, 0.04)}.mdc-select__menu .mdc-deprecated-list .mdc-deprecated-list-item--selected.mdc-ripple-upgraded--background-focused .mdc-list-item__ripple::before,.mdc-select__menu .mdc-deprecated-list .mdc-deprecated-list-item--selected:not(.mdc-ripple-upgraded):focus .mdc-list-item__ripple::before{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-focus-opacity, 0.12)}.mdc-select__menu .mdc-deprecated-list .mdc-deprecated-list-item--selected:not(.mdc-ripple-upgraded) .mdc-list-item__ripple::after{transition:opacity 150ms linear}.mdc-select__menu .mdc-deprecated-list .mdc-deprecated-list-item--selected:not(.mdc-ripple-upgraded):active .mdc-list-item__ripple::after{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-press-opacity, 0.12)}.mdc-select__menu .mdc-deprecated-list .mdc-deprecated-list-item--selected.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.12)}.mdc-select-helper-text{margin:0;margin-left:16px;margin-right:16px;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto, sans-serif;font-family:var(--mdc-typography-caption-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:0.75rem;font-size:var(--mdc-typography-caption-font-size, 0.75rem);line-height:1.25rem;line-height:var(--mdc-typography-caption-line-height, 1.25rem);font-weight:400;font-weight:var(--mdc-typography-caption-font-weight, 400);letter-spacing:0.0333333333em;letter-spacing:var(--mdc-typography-caption-letter-spacing, 0.0333333333em);text-decoration:inherit;text-decoration:var(--mdc-typography-caption-text-decoration, inherit);text-transform:inherit;text-transform:var(--mdc-typography-caption-text-transform, inherit);display:block;margin-top:0;line-height:normal}[dir=rtl] .mdc-select-helper-text,.mdc-select-helper-text[dir=rtl]{margin-left:16px;margin-right:16px}.mdc-select-helper-text::before{display:inline-block;width:0;height:16px;content:"";vertical-align:0}.mdc-select-helper-text--validation-msg{opacity:0;transition:opacity 180ms cubic-bezier(0.4, 0, 0.2, 1)}.mdc-select--invalid+.mdc-select-helper-text--validation-msg,.mdc-select-helper-text--validation-msg-persistent{opacity:1}.mdc-select--with-leading-icon .mdc-select__icon{display:inline-block;box-sizing:border-box;border:none;text-decoration:none;cursor:pointer;user-select:none;flex-shrink:0;align-self:center;background-color:transparent;fill:currentColor}.mdc-select--with-leading-icon .mdc-select__icon{margin-left:12px;margin-right:12px}[dir=rtl] .mdc-select--with-leading-icon .mdc-select__icon,.mdc-select--with-leading-icon .mdc-select__icon[dir=rtl]{margin-left:12px;margin-right:12px}.mdc-select__icon:not([tabindex]),.mdc-select__icon[tabindex="-1"]{cursor:default;pointer-events:none}.material-icons{font-family:var(--mdc-icon-font, "Material Icons");font-weight:normal;font-style:normal;font-size:var(--mdc-icon-size, 24px);line-height:1;letter-spacing:normal;text-transform:none;display:inline-block;white-space:nowrap;word-wrap:normal;direction:ltr;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;-moz-osx-font-smoothing:grayscale;font-feature-settings:"liga"}:host{display:inline-block;vertical-align:top;outline:none}.mdc-select{width:100%}[hidden]{display:none}.mdc-select__icon{z-index:2}.mdc-select--with-leading-icon{--mdc-list-item-graphic-margin: calc( 48px - var(--mdc-list-item-graphic-size, 24px) - var(--mdc-list-side-padding, 16px) )}.mdc-select .mdc-select__anchor .mdc-select__selected-text{overflow:hidden}.mdc-select .mdc-select__anchor *{display:inline-flex}.mdc-select .mdc-select__anchor .mdc-floating-label{display:inline-block}mwc-notched-outline{--mdc-notched-outline-border-color: var( --mdc-select-outlined-idle-border-color, rgba(0, 0, 0, 0.38) );--mdc-notched-outline-notch-offset: 1px}:host(:not([disabled]):hover) .mdc-select:not(.mdc-select--invalid):not(.mdc-select--focused) mwc-notched-outline{--mdc-notched-outline-border-color: var( --mdc-select-outlined-hover-border-color, rgba(0, 0, 0, 0.87) )}:host(:not([disabled])) .mdc-select:not(.mdc-select--disabled) .mdc-select__selected-text{color:rgba(0, 0, 0, 0.87);color:var(--mdc-select-ink-color, rgba(0, 0, 0, 0.87))}:host(:not([disabled])) .mdc-select:not(.mdc-select--disabled) .mdc-line-ripple::before{border-bottom-color:rgba(0, 0, 0, 0.42);border-bottom-color:var(--mdc-select-idle-line-color, rgba(0, 0, 0, 0.42))}:host(:not([disabled])) .mdc-select:not(.mdc-select--disabled):hover .mdc-line-ripple::before{border-bottom-color:rgba(0, 0, 0, 0.87);border-bottom-color:var(--mdc-select-hover-line-color, rgba(0, 0, 0, 0.87))}:host(:not([disabled])) .mdc-select:not(.mdc-select--outlined):not(.mdc-select--disabled) .mdc-select__anchor{background-color:whitesmoke;background-color:var(--mdc-select-fill-color, whitesmoke)}:host(:not([disabled])) .mdc-select.mdc-select--invalid .mdc-select__dropdown-icon{fill:var(--mdc-select-error-dropdown-icon-color, var(--mdc-select-error-color, var(--mdc-theme-error, #b00020)))}:host(:not([disabled])) .mdc-select.mdc-select--invalid .mdc-floating-label,:host(:not([disabled])) .mdc-select.mdc-select--invalid .mdc-floating-label::after{color:var(--mdc-select-error-color, var(--mdc-theme-error, #b00020))}:host(:not([disabled])) .mdc-select.mdc-select--invalid mwc-notched-outline{--mdc-notched-outline-border-color: var(--mdc-select-error-color, var(--mdc-theme-error, #b00020))}.mdc-select__menu--invalid{--mdc-theme-primary: var(--mdc-select-error-color, var(--mdc-theme-error, #b00020))}:host(:not([disabled])) .mdc-select:not(.mdc-select--invalid):not(.mdc-select--focused) .mdc-floating-label,:host(:not([disabled])) .mdc-select:not(.mdc-select--invalid):not(.mdc-select--focused) .mdc-floating-label::after{color:rgba(0, 0, 0, 0.6);color:var(--mdc-select-label-ink-color, rgba(0, 0, 0, 0.6))}:host(:not([disabled])) .mdc-select:not(.mdc-select--invalid):not(.mdc-select--focused) .mdc-select__dropdown-icon{fill:rgba(0, 0, 0, 0.54);fill:var(--mdc-select-dropdown-icon-color, rgba(0, 0, 0, 0.54))}:host(:not([disabled])) .mdc-select.mdc-select--focused mwc-notched-outline{--mdc-notched-outline-stroke-width: 2px;--mdc-notched-outline-notch-offset: 2px}:host(:not([disabled])) .mdc-select.mdc-select--focused:not(.mdc-select--invalid) mwc-notched-outline{--mdc-notched-outline-border-color: var( --mdc-select-focused-label-color, var(--mdc-theme-primary, rgba(98, 0, 238, 0.87)) )}:host(:not([disabled])) .mdc-select.mdc-select--focused:not(.mdc-select--invalid) .mdc-select__dropdown-icon{fill:rgba(98,0,238,.87);fill:var(--mdc-select-focused-dropdown-icon-color, var(--mdc-theme-primary, rgba(98, 0, 238, 0.87)))}:host(:not([disabled])) .mdc-select.mdc-select--focused:not(.mdc-select--invalid) .mdc-floating-label{color:#6200ee;color:var(--mdc-theme-primary, #6200ee)}:host(:not([disabled])) .mdc-select.mdc-select--focused:not(.mdc-select--invalid) .mdc-floating-label::after{color:#6200ee;color:var(--mdc-theme-primary, #6200ee)}:host(:not([disabled])) .mdc-select-helper-text:not(.mdc-select-helper-text--validation-msg){color:var(--mdc-select-label-ink-color, rgba(0, 0, 0, 0.6))}:host([disabled]){pointer-events:none}:host([disabled]) .mdc-select:not(.mdc-select--outlined).mdc-select--disabled .mdc-select__anchor{background-color:#fafafa;background-color:var(--mdc-select-disabled-fill-color, #fafafa)}:host([disabled]) .mdc-select.mdc-select--outlined mwc-notched-outline{--mdc-notched-outline-border-color: var( --mdc-select-outlined-disabled-border-color, rgba(0, 0, 0, 0.06) )}:host([disabled]) .mdc-select .mdc-select__dropdown-icon{fill:rgba(0, 0, 0, 0.38);fill:var(--mdc-select-disabled-dropdown-icon-color, rgba(0, 0, 0, 0.38))}:host([disabled]) .mdc-select:not(.mdc-select--invalid):not(.mdc-select--focused) .mdc-floating-label,:host([disabled]) .mdc-select:not(.mdc-select--invalid):not(.mdc-select--focused) .mdc-floating-label::after{color:rgba(0, 0, 0, 0.38);color:var(--mdc-select-disabled-ink-color, rgba(0, 0, 0, 0.38))}:host([disabled]) .mdc-select-helper-text{color:rgba(0, 0, 0, 0.38);color:var(--mdc-select-disabled-ink-color, rgba(0, 0, 0, 0.38))}:host([disabled]) .mdc-select__selected-text{color:rgba(0, 0, 0, 0.38);color:var(--mdc-select-disabled-ink-color, rgba(0, 0, 0, 0.38))}`,zn=()=>new Promise((t=>{var e;e=t,requestAnimationFrame((()=>setTimeout(e,0)))}));let jn=class extends Dn{constructor(){super(...arguments),this._translationsUpdated=((t,e,i=!1)=>{let n;const o=(...o)=>{const r=i&&!n;clearTimeout(n),n=window.setTimeout((()=>{n=void 0,i||t(...o)}),e),r&&t(...o)};return o.cancel=()=>{clearTimeout(n)},o})((async()=>{await zn(),this.layoutOptions()}),500)}renderLeadingIcon(){return this.icon?ut``:pt}connectedCallback(){super.connectedCallback(),window.addEventListener("translations-updated",this._translationsUpdated)}disconnectedCallback(){super.disconnectedCallback(),window.removeEventListener("translations-updated",this._translationsUpdated)}};jn.styles=[Ln],n([zt({type:Boolean})],jn.prototype,"icon",void 0),jn=n([Dt("mushroom-select")],jn);let Nn=class extends Ot{constructor(){super(...arguments),this.label="",this.configValue=""}_selectChanged(t){const e=t.target.value;e&&this.dispatchEvent(new CustomEvent("value-changed",{detail:{value:"default"!==e?e:""}}))}render(){const t=we(this.hass);return ut` +const Sr=d`.mdc-floating-label{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto, sans-serif;font-family:var(--mdc-typography-subtitle1-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:1rem;font-size:var(--mdc-typography-subtitle1-font-size, 1rem);font-weight:400;font-weight:var(--mdc-typography-subtitle1-font-weight, 400);letter-spacing:0.009375em;letter-spacing:var(--mdc-typography-subtitle1-letter-spacing, 0.009375em);text-decoration:inherit;text-decoration:var(--mdc-typography-subtitle1-text-decoration, inherit);text-transform:inherit;text-transform:var(--mdc-typography-subtitle1-text-transform, inherit);position:absolute;left:0;-webkit-transform-origin:left top;transform-origin:left top;line-height:1.15rem;text-align:left;text-overflow:ellipsis;white-space:nowrap;cursor:text;overflow:hidden;will-change:transform;transition:transform 150ms cubic-bezier(0.4, 0, 0.2, 1),color 150ms cubic-bezier(0.4, 0, 0.2, 1)}[dir=rtl] .mdc-floating-label,.mdc-floating-label[dir=rtl]{right:0;left:auto;-webkit-transform-origin:right top;transform-origin:right top;text-align:right}.mdc-floating-label--float-above{cursor:auto}.mdc-floating-label--required::after{margin-left:1px;margin-right:0px;content:"*"}[dir=rtl] .mdc-floating-label--required::after,.mdc-floating-label--required[dir=rtl]::after{margin-left:0;margin-right:1px}.mdc-floating-label--float-above{transform:translateY(-106%) scale(0.75)}.mdc-floating-label--shake{animation:mdc-floating-label-shake-float-above-standard 250ms 1}@keyframes mdc-floating-label-shake-float-above-standard{0%{transform:translateX(calc(0 - 0%)) translateY(-106%) scale(0.75)}33%{animation-timing-function:cubic-bezier(0.5, 0, 0.701732, 0.495819);transform:translateX(calc(4% - 0%)) translateY(-106%) scale(0.75)}66%{animation-timing-function:cubic-bezier(0.302435, 0.381352, 0.55, 0.956352);transform:translateX(calc(-4% - 0%)) translateY(-106%) scale(0.75)}100%{transform:translateX(calc(0 - 0%)) translateY(-106%) scale(0.75)}}@keyframes mdc-ripple-fg-radius-in{from{animation-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transform:translate(var(--mdc-ripple-fg-translate-start, 0)) scale(1)}to{transform:translate(var(--mdc-ripple-fg-translate-end, 0)) scale(var(--mdc-ripple-fg-scale, 1))}}@keyframes mdc-ripple-fg-opacity-in{from{animation-timing-function:linear;opacity:0}to{opacity:var(--mdc-ripple-fg-opacity, 0)}}@keyframes mdc-ripple-fg-opacity-out{from{animation-timing-function:linear;opacity:var(--mdc-ripple-fg-opacity, 0)}to{opacity:0}}.mdc-line-ripple::before,.mdc-line-ripple::after{position:absolute;bottom:0;left:0;width:100%;border-bottom-style:solid;content:""}.mdc-line-ripple::before{border-bottom-width:1px;z-index:1}.mdc-line-ripple::after{transform:scaleX(0);border-bottom-width:2px;opacity:0;z-index:2}.mdc-line-ripple::after{transition:transform 180ms cubic-bezier(0.4, 0, 0.2, 1),opacity 180ms cubic-bezier(0.4, 0, 0.2, 1)}.mdc-line-ripple--active::after{transform:scaleX(1);opacity:1}.mdc-line-ripple--deactivating::after{opacity:0}.mdc-notched-outline{display:flex;position:absolute;top:0;right:0;left:0;box-sizing:border-box;width:100%;max-width:100%;height:100%;text-align:left;pointer-events:none}[dir=rtl] .mdc-notched-outline,.mdc-notched-outline[dir=rtl]{text-align:right}.mdc-notched-outline__leading,.mdc-notched-outline__notch,.mdc-notched-outline__trailing{box-sizing:border-box;height:100%;border-top:1px solid;border-bottom:1px solid;pointer-events:none}.mdc-notched-outline__leading{border-left:1px solid;border-right:none;width:12px}[dir=rtl] .mdc-notched-outline__leading,.mdc-notched-outline__leading[dir=rtl]{border-left:none;border-right:1px solid}.mdc-notched-outline__trailing{border-left:none;border-right:1px solid;flex-grow:1}[dir=rtl] .mdc-notched-outline__trailing,.mdc-notched-outline__trailing[dir=rtl]{border-left:1px solid;border-right:none}.mdc-notched-outline__notch{flex:0 0 auto;width:auto;max-width:calc(100% - 12px * 2)}.mdc-notched-outline .mdc-floating-label{display:inline-block;position:relative;max-width:100%}.mdc-notched-outline .mdc-floating-label--float-above{text-overflow:clip}.mdc-notched-outline--upgraded .mdc-floating-label--float-above{max-width:calc(100% / 0.75)}.mdc-notched-outline--notched .mdc-notched-outline__notch{padding-left:0;padding-right:8px;border-top:none}[dir=rtl] .mdc-notched-outline--notched .mdc-notched-outline__notch,.mdc-notched-outline--notched .mdc-notched-outline__notch[dir=rtl]{padding-left:8px;padding-right:0}.mdc-notched-outline--no-label .mdc-notched-outline__notch{display:none}.mdc-select{display:inline-flex;position:relative}.mdc-select:not(.mdc-select--disabled) .mdc-select__selected-text{color:rgba(0, 0, 0, 0.87)}.mdc-select.mdc-select--disabled .mdc-select__selected-text{color:rgba(0, 0, 0, 0.38)}.mdc-select:not(.mdc-select--disabled) .mdc-floating-label{color:rgba(0, 0, 0, 0.6)}.mdc-select:not(.mdc-select--disabled).mdc-select--focused .mdc-floating-label{color:rgba(98, 0, 238, 0.87)}.mdc-select.mdc-select--disabled .mdc-floating-label{color:rgba(0, 0, 0, 0.38)}.mdc-select:not(.mdc-select--disabled) .mdc-select__dropdown-icon{fill:rgba(0, 0, 0, 0.54)}.mdc-select:not(.mdc-select--disabled).mdc-select--focused .mdc-select__dropdown-icon{fill:#6200ee;fill:var(--mdc-theme-primary, #6200ee)}.mdc-select.mdc-select--disabled .mdc-select__dropdown-icon{fill:rgba(0, 0, 0, 0.38)}.mdc-select:not(.mdc-select--disabled)+.mdc-select-helper-text{color:rgba(0, 0, 0, 0.6)}.mdc-select.mdc-select--disabled+.mdc-select-helper-text{color:rgba(0, 0, 0, 0.38)}.mdc-select:not(.mdc-select--disabled) .mdc-select__icon{color:rgba(0, 0, 0, 0.54)}.mdc-select.mdc-select--disabled .mdc-select__icon{color:rgba(0, 0, 0, 0.38)}@media screen and (forced-colors: active),(-ms-high-contrast: active){.mdc-select.mdc-select--disabled .mdc-select__selected-text{color:GrayText}.mdc-select.mdc-select--disabled .mdc-select__dropdown-icon{fill:red}.mdc-select.mdc-select--disabled .mdc-floating-label{color:GrayText}.mdc-select.mdc-select--disabled .mdc-line-ripple::before{border-bottom-color:GrayText}.mdc-select.mdc-select--disabled .mdc-notched-outline__leading,.mdc-select.mdc-select--disabled .mdc-notched-outline__notch,.mdc-select.mdc-select--disabled .mdc-notched-outline__trailing{border-color:GrayText}.mdc-select.mdc-select--disabled .mdc-select__icon{color:GrayText}.mdc-select.mdc-select--disabled+.mdc-select-helper-text{color:GrayText}}.mdc-select .mdc-floating-label{top:50%;transform:translateY(-50%);pointer-events:none}.mdc-select .mdc-select__anchor{padding-left:16px;padding-right:0}[dir=rtl] .mdc-select .mdc-select__anchor,.mdc-select .mdc-select__anchor[dir=rtl]{padding-left:0;padding-right:16px}.mdc-select.mdc-select--with-leading-icon .mdc-select__anchor{padding-left:0;padding-right:0}[dir=rtl] .mdc-select.mdc-select--with-leading-icon .mdc-select__anchor,.mdc-select.mdc-select--with-leading-icon .mdc-select__anchor[dir=rtl]{padding-left:0;padding-right:0}.mdc-select .mdc-select__icon{width:24px;height:24px;font-size:24px}.mdc-select .mdc-select__dropdown-icon{width:24px;height:24px}.mdc-select .mdc-select__menu .mdc-deprecated-list-item{padding-left:16px;padding-right:16px}[dir=rtl] .mdc-select .mdc-select__menu .mdc-deprecated-list-item,.mdc-select .mdc-select__menu .mdc-deprecated-list-item[dir=rtl]{padding-left:16px;padding-right:16px}.mdc-select .mdc-select__menu .mdc-deprecated-list-item__graphic{margin-left:0;margin-right:12px}[dir=rtl] .mdc-select .mdc-select__menu .mdc-deprecated-list-item__graphic,.mdc-select .mdc-select__menu .mdc-deprecated-list-item__graphic[dir=rtl]{margin-left:12px;margin-right:0}.mdc-select__dropdown-icon{margin-left:12px;margin-right:12px;display:inline-flex;position:relative;align-self:center;align-items:center;justify-content:center;flex-shrink:0;pointer-events:none}.mdc-select__dropdown-icon .mdc-select__dropdown-icon-active,.mdc-select__dropdown-icon .mdc-select__dropdown-icon-inactive{position:absolute;top:0;left:0}.mdc-select__dropdown-icon .mdc-select__dropdown-icon-graphic{width:41.6666666667%;height:20.8333333333%}.mdc-select__dropdown-icon .mdc-select__dropdown-icon-inactive{opacity:1;transition:opacity 75ms linear 75ms}.mdc-select__dropdown-icon .mdc-select__dropdown-icon-active{opacity:0;transition:opacity 75ms linear}[dir=rtl] .mdc-select__dropdown-icon,.mdc-select__dropdown-icon[dir=rtl]{margin-left:12px;margin-right:12px}.mdc-select--activated .mdc-select__dropdown-icon .mdc-select__dropdown-icon-inactive{opacity:0;transition:opacity 49.5ms linear}.mdc-select--activated .mdc-select__dropdown-icon .mdc-select__dropdown-icon-active{opacity:1;transition:opacity 100.5ms linear 49.5ms}.mdc-select__anchor{width:200px;min-width:0;flex:1 1 auto;position:relative;box-sizing:border-box;overflow:hidden;outline:none;cursor:pointer}.mdc-select__anchor .mdc-floating-label--float-above{transform:translateY(-106%) scale(0.75)}.mdc-select__selected-text-container{display:flex;appearance:none;pointer-events:none;box-sizing:border-box;width:auto;min-width:0;flex-grow:1;height:28px;border:none;outline:none;padding:0;background-color:transparent;color:inherit}.mdc-select__selected-text{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto, sans-serif;font-family:var(--mdc-typography-subtitle1-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:1rem;font-size:var(--mdc-typography-subtitle1-font-size, 1rem);line-height:1.75rem;line-height:var(--mdc-typography-subtitle1-line-height, 1.75rem);font-weight:400;font-weight:var(--mdc-typography-subtitle1-font-weight, 400);letter-spacing:0.009375em;letter-spacing:var(--mdc-typography-subtitle1-letter-spacing, 0.009375em);text-decoration:inherit;text-decoration:var(--mdc-typography-subtitle1-text-decoration, inherit);text-transform:inherit;text-transform:var(--mdc-typography-subtitle1-text-transform, inherit);text-overflow:ellipsis;white-space:nowrap;overflow:hidden;display:block;width:100%;text-align:left}[dir=rtl] .mdc-select__selected-text,.mdc-select__selected-text[dir=rtl]{text-align:right}.mdc-select--invalid:not(.mdc-select--disabled) .mdc-floating-label{color:#b00020;color:var(--mdc-theme-error, #b00020)}.mdc-select--invalid:not(.mdc-select--disabled).mdc-select--focused .mdc-floating-label{color:#b00020;color:var(--mdc-theme-error, #b00020)}.mdc-select--invalid:not(.mdc-select--disabled).mdc-select--invalid+.mdc-select-helper-text--validation-msg{color:#b00020;color:var(--mdc-theme-error, #b00020)}.mdc-select--invalid:not(.mdc-select--disabled) .mdc-select__dropdown-icon{fill:#b00020;fill:var(--mdc-theme-error, #b00020)}.mdc-select--invalid:not(.mdc-select--disabled).mdc-select--focused .mdc-select__dropdown-icon{fill:#b00020;fill:var(--mdc-theme-error, #b00020)}.mdc-select--disabled{cursor:default;pointer-events:none}.mdc-select--with-leading-icon .mdc-select__menu .mdc-deprecated-list-item{padding-left:12px;padding-right:12px}[dir=rtl] .mdc-select--with-leading-icon .mdc-select__menu .mdc-deprecated-list-item,.mdc-select--with-leading-icon .mdc-select__menu .mdc-deprecated-list-item[dir=rtl]{padding-left:12px;padding-right:12px}.mdc-select__menu .mdc-deprecated-list .mdc-select__icon,.mdc-select__menu .mdc-list .mdc-select__icon{margin-left:0;margin-right:0}[dir=rtl] .mdc-select__menu .mdc-deprecated-list .mdc-select__icon,[dir=rtl] .mdc-select__menu .mdc-list .mdc-select__icon,.mdc-select__menu .mdc-deprecated-list .mdc-select__icon[dir=rtl],.mdc-select__menu .mdc-list .mdc-select__icon[dir=rtl]{margin-left:0;margin-right:0}.mdc-select__menu .mdc-deprecated-list .mdc-deprecated-list-item--selected,.mdc-select__menu .mdc-deprecated-list .mdc-deprecated-list-item--activated,.mdc-select__menu .mdc-list .mdc-deprecated-list-item--selected,.mdc-select__menu .mdc-list .mdc-deprecated-list-item--activated{color:#000;color:var(--mdc-theme-on-surface, #000)}.mdc-select__menu .mdc-deprecated-list .mdc-deprecated-list-item--selected .mdc-deprecated-list-item__graphic,.mdc-select__menu .mdc-deprecated-list .mdc-deprecated-list-item--activated .mdc-deprecated-list-item__graphic,.mdc-select__menu .mdc-list .mdc-deprecated-list-item--selected .mdc-deprecated-list-item__graphic,.mdc-select__menu .mdc-list .mdc-deprecated-list-item--activated .mdc-deprecated-list-item__graphic{color:#000;color:var(--mdc-theme-on-surface, #000)}.mdc-select__menu .mdc-list-item__start{display:inline-flex;align-items:center}.mdc-select__option{padding-left:16px;padding-right:16px}[dir=rtl] .mdc-select__option,.mdc-select__option[dir=rtl]{padding-left:16px;padding-right:16px}.mdc-select__one-line-option.mdc-list-item--with-one-line{height:48px}.mdc-select__two-line-option.mdc-list-item--with-two-lines{height:64px}.mdc-select__two-line-option.mdc-list-item--with-two-lines .mdc-list-item__start{margin-top:20px}.mdc-select__two-line-option.mdc-list-item--with-two-lines .mdc-list-item__primary-text{display:block;margin-top:0;line-height:normal;margin-bottom:-20px}.mdc-select__two-line-option.mdc-list-item--with-two-lines .mdc-list-item__primary-text::before{display:inline-block;width:0;height:28px;content:"";vertical-align:0}.mdc-select__two-line-option.mdc-list-item--with-two-lines .mdc-list-item__primary-text::after{display:inline-block;width:0;height:20px;content:"";vertical-align:-20px}.mdc-select__two-line-option.mdc-list-item--with-two-lines.mdc-list-item--with-trailing-meta .mdc-list-item__end{display:block;margin-top:0;line-height:normal}.mdc-select__two-line-option.mdc-list-item--with-two-lines.mdc-list-item--with-trailing-meta .mdc-list-item__end::before{display:inline-block;width:0;height:36px;content:"";vertical-align:0}.mdc-select__option-with-leading-content{padding-left:0;padding-right:12px}.mdc-select__option-with-leading-content.mdc-list-item{padding-left:0;padding-right:auto}[dir=rtl] .mdc-select__option-with-leading-content.mdc-list-item,.mdc-select__option-with-leading-content.mdc-list-item[dir=rtl]{padding-left:auto;padding-right:0}.mdc-select__option-with-leading-content .mdc-list-item__start{margin-left:12px;margin-right:0}[dir=rtl] .mdc-select__option-with-leading-content .mdc-list-item__start,.mdc-select__option-with-leading-content .mdc-list-item__start[dir=rtl]{margin-left:0;margin-right:12px}.mdc-select__option-with-leading-content .mdc-list-item__start{width:36px;height:24px}[dir=rtl] .mdc-select__option-with-leading-content,.mdc-select__option-with-leading-content[dir=rtl]{padding-left:12px;padding-right:0}.mdc-select__option-with-meta.mdc-list-item{padding-left:auto;padding-right:0}[dir=rtl] .mdc-select__option-with-meta.mdc-list-item,.mdc-select__option-with-meta.mdc-list-item[dir=rtl]{padding-left:0;padding-right:auto}.mdc-select__option-with-meta .mdc-list-item__end{margin-left:12px;margin-right:12px}[dir=rtl] .mdc-select__option-with-meta .mdc-list-item__end,.mdc-select__option-with-meta .mdc-list-item__end[dir=rtl]{margin-left:12px;margin-right:12px}.mdc-select--filled .mdc-select__anchor{height:56px;display:flex;align-items:baseline}.mdc-select--filled .mdc-select__anchor::before{display:inline-block;width:0;height:40px;content:"";vertical-align:0}.mdc-select--filled.mdc-select--no-label .mdc-select__anchor .mdc-select__selected-text::before{content:"​"}.mdc-select--filled.mdc-select--no-label .mdc-select__anchor .mdc-select__selected-text-container{height:100%;display:inline-flex;align-items:center}.mdc-select--filled.mdc-select--no-label .mdc-select__anchor::before{display:none}.mdc-select--filled .mdc-select__anchor{border-top-left-radius:4px;border-top-left-radius:var(--mdc-shape-small, 4px);border-top-right-radius:4px;border-top-right-radius:var(--mdc-shape-small, 4px);border-bottom-right-radius:0;border-bottom-left-radius:0}.mdc-select--filled:not(.mdc-select--disabled) .mdc-select__anchor{background-color:whitesmoke}.mdc-select--filled.mdc-select--disabled .mdc-select__anchor{background-color:#fafafa}.mdc-select--filled:not(.mdc-select--disabled) .mdc-line-ripple::before{border-bottom-color:rgba(0, 0, 0, 0.42)}.mdc-select--filled:not(.mdc-select--disabled):hover .mdc-line-ripple::before{border-bottom-color:rgba(0, 0, 0, 0.87)}.mdc-select--filled:not(.mdc-select--disabled) .mdc-line-ripple::after{border-bottom-color:#6200ee;border-bottom-color:var(--mdc-theme-primary, #6200ee)}.mdc-select--filled.mdc-select--disabled .mdc-line-ripple::before{border-bottom-color:rgba(0, 0, 0, 0.06)}.mdc-select--filled .mdc-floating-label{max-width:calc(100% - 64px)}.mdc-select--filled .mdc-floating-label--float-above{max-width:calc(100% / 0.75 - 64px / 0.75)}.mdc-select--filled .mdc-menu-surface--is-open-below{border-top-left-radius:0px;border-top-right-radius:0px}.mdc-select--filled.mdc-select--focused.mdc-line-ripple::after{transform:scale(1, 2);opacity:1}.mdc-select--filled .mdc-floating-label{left:16px;right:initial}[dir=rtl] .mdc-select--filled .mdc-floating-label,.mdc-select--filled .mdc-floating-label[dir=rtl]{left:initial;right:16px}.mdc-select--filled.mdc-select--with-leading-icon .mdc-floating-label{left:48px;right:initial}[dir=rtl] .mdc-select--filled.mdc-select--with-leading-icon .mdc-floating-label,.mdc-select--filled.mdc-select--with-leading-icon .mdc-floating-label[dir=rtl]{left:initial;right:48px}.mdc-select--filled.mdc-select--with-leading-icon .mdc-floating-label{max-width:calc(100% - 96px)}.mdc-select--filled.mdc-select--with-leading-icon .mdc-floating-label--float-above{max-width:calc(100% / 0.75 - 96px / 0.75)}.mdc-select--invalid:not(.mdc-select--disabled) .mdc-line-ripple::before{border-bottom-color:#b00020;border-bottom-color:var(--mdc-theme-error, #b00020)}.mdc-select--invalid:not(.mdc-select--disabled):hover .mdc-line-ripple::before{border-bottom-color:#b00020;border-bottom-color:var(--mdc-theme-error, #b00020)}.mdc-select--invalid:not(.mdc-select--disabled) .mdc-line-ripple::after{border-bottom-color:#b00020;border-bottom-color:var(--mdc-theme-error, #b00020)}.mdc-select--outlined{border:none}.mdc-select--outlined .mdc-select__anchor{height:56px}.mdc-select--outlined .mdc-select__anchor .mdc-floating-label--float-above{transform:translateY(-37.25px) scale(1)}.mdc-select--outlined .mdc-select__anchor .mdc-floating-label--float-above{font-size:.75rem}.mdc-select--outlined .mdc-select__anchor.mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-select--outlined .mdc-select__anchor .mdc-notched-outline--upgraded .mdc-floating-label--float-above{transform:translateY(-34.75px) scale(0.75)}.mdc-select--outlined .mdc-select__anchor.mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-select--outlined .mdc-select__anchor .mdc-notched-outline--upgraded .mdc-floating-label--float-above{font-size:1rem}.mdc-select--outlined .mdc-select__anchor .mdc-floating-label--shake{animation:mdc-floating-label-shake-float-above-select-outlined-56px 250ms 1}@keyframes mdc-floating-label-shake-float-above-select-outlined-56px{0%{transform:translateX(calc(0 - 0%)) translateY(-34.75px) scale(0.75)}33%{animation-timing-function:cubic-bezier(0.5, 0, 0.701732, 0.495819);transform:translateX(calc(4% - 0%)) translateY(-34.75px) scale(0.75)}66%{animation-timing-function:cubic-bezier(0.302435, 0.381352, 0.55, 0.956352);transform:translateX(calc(-4% - 0%)) translateY(-34.75px) scale(0.75)}100%{transform:translateX(calc(0 - 0%)) translateY(-34.75px) scale(0.75)}}.mdc-select--outlined .mdc-notched-outline .mdc-notched-outline__leading{border-top-left-radius:4px;border-top-left-radius:var(--mdc-shape-small, 4px);border-top-right-radius:0;border-bottom-right-radius:0;border-bottom-left-radius:4px;border-bottom-left-radius:var(--mdc-shape-small, 4px)}[dir=rtl] .mdc-select--outlined .mdc-notched-outline .mdc-notched-outline__leading,.mdc-select--outlined .mdc-notched-outline .mdc-notched-outline__leading[dir=rtl]{border-top-left-radius:0;border-top-right-radius:4px;border-top-right-radius:var(--mdc-shape-small, 4px);border-bottom-right-radius:4px;border-bottom-right-radius:var(--mdc-shape-small, 4px);border-bottom-left-radius:0}@supports(top: max(0%)){.mdc-select--outlined .mdc-notched-outline .mdc-notched-outline__leading{width:max(12px, var(--mdc-shape-small, 4px))}}@supports(top: max(0%)){.mdc-select--outlined .mdc-notched-outline .mdc-notched-outline__notch{max-width:calc(100% - max(12px, var(--mdc-shape-small, 4px)) * 2)}}.mdc-select--outlined .mdc-notched-outline .mdc-notched-outline__trailing{border-top-left-radius:0;border-top-right-radius:4px;border-top-right-radius:var(--mdc-shape-small, 4px);border-bottom-right-radius:4px;border-bottom-right-radius:var(--mdc-shape-small, 4px);border-bottom-left-radius:0}[dir=rtl] .mdc-select--outlined .mdc-notched-outline .mdc-notched-outline__trailing,.mdc-select--outlined .mdc-notched-outline .mdc-notched-outline__trailing[dir=rtl]{border-top-left-radius:4px;border-top-left-radius:var(--mdc-shape-small, 4px);border-top-right-radius:0;border-bottom-right-radius:0;border-bottom-left-radius:4px;border-bottom-left-radius:var(--mdc-shape-small, 4px)}@supports(top: max(0%)){.mdc-select--outlined .mdc-select__anchor{padding-left:max(16px, calc(var(--mdc-shape-small, 4px) + 4px))}}[dir=rtl] .mdc-select--outlined .mdc-select__anchor,.mdc-select--outlined .mdc-select__anchor[dir=rtl]{padding-left:0}@supports(top: max(0%)){[dir=rtl] .mdc-select--outlined .mdc-select__anchor,.mdc-select--outlined .mdc-select__anchor[dir=rtl]{padding-right:max(16px, calc(var(--mdc-shape-small, 4px) + 4px))}}@supports(top: max(0%)){.mdc-select--outlined+.mdc-select-helper-text{margin-left:max(16px, calc(var(--mdc-shape-small, 4px) + 4px))}}[dir=rtl] .mdc-select--outlined+.mdc-select-helper-text,.mdc-select--outlined+.mdc-select-helper-text[dir=rtl]{margin-left:0}@supports(top: max(0%)){[dir=rtl] .mdc-select--outlined+.mdc-select-helper-text,.mdc-select--outlined+.mdc-select-helper-text[dir=rtl]{margin-right:max(16px, calc(var(--mdc-shape-small, 4px) + 4px))}}.mdc-select--outlined:not(.mdc-select--disabled) .mdc-select__anchor{background-color:transparent}.mdc-select--outlined.mdc-select--disabled .mdc-select__anchor{background-color:transparent}.mdc-select--outlined:not(.mdc-select--disabled) .mdc-notched-outline__leading,.mdc-select--outlined:not(.mdc-select--disabled) .mdc-notched-outline__notch,.mdc-select--outlined:not(.mdc-select--disabled) .mdc-notched-outline__trailing{border-color:rgba(0, 0, 0, 0.38)}.mdc-select--outlined:not(.mdc-select--disabled):not(.mdc-select--focused) .mdc-select__anchor:hover .mdc-notched-outline .mdc-notched-outline__leading,.mdc-select--outlined:not(.mdc-select--disabled):not(.mdc-select--focused) .mdc-select__anchor:hover .mdc-notched-outline .mdc-notched-outline__notch,.mdc-select--outlined:not(.mdc-select--disabled):not(.mdc-select--focused) .mdc-select__anchor:hover .mdc-notched-outline .mdc-notched-outline__trailing{border-color:rgba(0, 0, 0, 0.87)}.mdc-select--outlined:not(.mdc-select--disabled).mdc-select--focused .mdc-notched-outline .mdc-notched-outline__leading,.mdc-select--outlined:not(.mdc-select--disabled).mdc-select--focused .mdc-notched-outline .mdc-notched-outline__notch,.mdc-select--outlined:not(.mdc-select--disabled).mdc-select--focused .mdc-notched-outline .mdc-notched-outline__trailing{border-width:2px}.mdc-select--outlined:not(.mdc-select--disabled).mdc-select--focused .mdc-notched-outline .mdc-notched-outline__leading,.mdc-select--outlined:not(.mdc-select--disabled).mdc-select--focused .mdc-notched-outline .mdc-notched-outline__notch,.mdc-select--outlined:not(.mdc-select--disabled).mdc-select--focused .mdc-notched-outline .mdc-notched-outline__trailing{border-color:#6200ee;border-color:var(--mdc-theme-primary, #6200ee)}.mdc-select--outlined.mdc-select--disabled .mdc-notched-outline__leading,.mdc-select--outlined.mdc-select--disabled .mdc-notched-outline__notch,.mdc-select--outlined.mdc-select--disabled .mdc-notched-outline__trailing{border-color:rgba(0, 0, 0, 0.06)}.mdc-select--outlined .mdc-select__anchor :not(.mdc-notched-outline--notched) .mdc-notched-outline__notch{max-width:calc(100% - 60px)}.mdc-select--outlined .mdc-select__anchor{display:flex;align-items:baseline;overflow:visible}.mdc-select--outlined .mdc-select__anchor .mdc-floating-label--shake{animation:mdc-floating-label-shake-float-above-select-outlined 250ms 1}.mdc-select--outlined .mdc-select__anchor .mdc-floating-label--float-above{transform:translateY(-37.25px) scale(1)}.mdc-select--outlined .mdc-select__anchor .mdc-floating-label--float-above{font-size:.75rem}.mdc-select--outlined .mdc-select__anchor.mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-select--outlined .mdc-select__anchor .mdc-notched-outline--upgraded .mdc-floating-label--float-above{transform:translateY(-34.75px) scale(0.75)}.mdc-select--outlined .mdc-select__anchor.mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-select--outlined .mdc-select__anchor .mdc-notched-outline--upgraded .mdc-floating-label--float-above{font-size:1rem}.mdc-select--outlined .mdc-select__anchor .mdc-notched-outline--notched .mdc-notched-outline__notch{padding-top:1px}.mdc-select--outlined .mdc-select__anchor .mdc-select__selected-text::before{content:"​"}.mdc-select--outlined .mdc-select__anchor .mdc-select__selected-text-container{height:100%;display:inline-flex;align-items:center}.mdc-select--outlined .mdc-select__anchor::before{display:none}.mdc-select--outlined .mdc-select__selected-text-container{display:flex;border:none;z-index:1;background-color:transparent}.mdc-select--outlined .mdc-select__icon{z-index:2}.mdc-select--outlined .mdc-floating-label{line-height:1.15rem;left:4px;right:initial}[dir=rtl] .mdc-select--outlined .mdc-floating-label,.mdc-select--outlined .mdc-floating-label[dir=rtl]{left:initial;right:4px}.mdc-select--outlined.mdc-select--focused .mdc-notched-outline--notched .mdc-notched-outline__notch{padding-top:2px}.mdc-select--outlined.mdc-select--invalid:not(.mdc-select--disabled) .mdc-notched-outline__leading,.mdc-select--outlined.mdc-select--invalid:not(.mdc-select--disabled) .mdc-notched-outline__notch,.mdc-select--outlined.mdc-select--invalid:not(.mdc-select--disabled) .mdc-notched-outline__trailing{border-color:#b00020;border-color:var(--mdc-theme-error, #b00020)}.mdc-select--outlined.mdc-select--invalid:not(.mdc-select--disabled):not(.mdc-select--focused) .mdc-select__anchor:hover .mdc-notched-outline .mdc-notched-outline__leading,.mdc-select--outlined.mdc-select--invalid:not(.mdc-select--disabled):not(.mdc-select--focused) .mdc-select__anchor:hover .mdc-notched-outline .mdc-notched-outline__notch,.mdc-select--outlined.mdc-select--invalid:not(.mdc-select--disabled):not(.mdc-select--focused) .mdc-select__anchor:hover .mdc-notched-outline .mdc-notched-outline__trailing{border-color:#b00020;border-color:var(--mdc-theme-error, #b00020)}.mdc-select--outlined.mdc-select--invalid:not(.mdc-select--disabled).mdc-select--focused .mdc-notched-outline .mdc-notched-outline__leading,.mdc-select--outlined.mdc-select--invalid:not(.mdc-select--disabled).mdc-select--focused .mdc-notched-outline .mdc-notched-outline__notch,.mdc-select--outlined.mdc-select--invalid:not(.mdc-select--disabled).mdc-select--focused .mdc-notched-outline .mdc-notched-outline__trailing{border-width:2px}.mdc-select--outlined.mdc-select--invalid:not(.mdc-select--disabled).mdc-select--focused .mdc-notched-outline .mdc-notched-outline__leading,.mdc-select--outlined.mdc-select--invalid:not(.mdc-select--disabled).mdc-select--focused .mdc-notched-outline .mdc-notched-outline__notch,.mdc-select--outlined.mdc-select--invalid:not(.mdc-select--disabled).mdc-select--focused .mdc-notched-outline .mdc-notched-outline__trailing{border-color:#b00020;border-color:var(--mdc-theme-error, #b00020)}.mdc-select--outlined.mdc-select--with-leading-icon .mdc-floating-label{left:36px;right:initial}[dir=rtl] .mdc-select--outlined.mdc-select--with-leading-icon .mdc-floating-label,.mdc-select--outlined.mdc-select--with-leading-icon .mdc-floating-label[dir=rtl]{left:initial;right:36px}.mdc-select--outlined.mdc-select--with-leading-icon .mdc-floating-label--float-above{transform:translateY(-37.25px) translateX(-32px) scale(1)}[dir=rtl] .mdc-select--outlined.mdc-select--with-leading-icon .mdc-floating-label--float-above,.mdc-select--outlined.mdc-select--with-leading-icon .mdc-floating-label--float-above[dir=rtl]{transform:translateY(-37.25px) translateX(32px) scale(1)}.mdc-select--outlined.mdc-select--with-leading-icon .mdc-floating-label--float-above{font-size:.75rem}.mdc-select--outlined.mdc-select--with-leading-icon.mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-select--outlined.mdc-select--with-leading-icon .mdc-notched-outline--upgraded .mdc-floating-label--float-above{transform:translateY(-34.75px) translateX(-32px) scale(0.75)}[dir=rtl] .mdc-select--outlined.mdc-select--with-leading-icon.mdc-notched-outline--upgraded .mdc-floating-label--float-above,[dir=rtl] .mdc-select--outlined.mdc-select--with-leading-icon .mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-select--outlined.mdc-select--with-leading-icon.mdc-notched-outline--upgraded .mdc-floating-label--float-above[dir=rtl],.mdc-select--outlined.mdc-select--with-leading-icon .mdc-notched-outline--upgraded .mdc-floating-label--float-above[dir=rtl]{transform:translateY(-34.75px) translateX(32px) scale(0.75)}.mdc-select--outlined.mdc-select--with-leading-icon.mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-select--outlined.mdc-select--with-leading-icon .mdc-notched-outline--upgraded .mdc-floating-label--float-above{font-size:1rem}.mdc-select--outlined.mdc-select--with-leading-icon .mdc-floating-label--shake{animation:mdc-floating-label-shake-float-above-select-outlined-leading-icon-56px 250ms 1}@keyframes mdc-floating-label-shake-float-above-select-outlined-leading-icon-56px{0%{transform:translateX(calc(0 - 32px)) translateY(-34.75px) scale(0.75)}33%{animation-timing-function:cubic-bezier(0.5, 0, 0.701732, 0.495819);transform:translateX(calc(4% - 32px)) translateY(-34.75px) scale(0.75)}66%{animation-timing-function:cubic-bezier(0.302435, 0.381352, 0.55, 0.956352);transform:translateX(calc(-4% - 32px)) translateY(-34.75px) scale(0.75)}100%{transform:translateX(calc(0 - 32px)) translateY(-34.75px) scale(0.75)}}[dir=rtl] .mdc-select--outlined.mdc-select--with-leading-icon .mdc-floating-label--shake,.mdc-select--outlined.mdc-select--with-leading-icon[dir=rtl] .mdc-floating-label--shake{animation:mdc-floating-label-shake-float-above-select-outlined-leading-icon-56px 250ms 1}@keyframes mdc-floating-label-shake-float-above-select-outlined-leading-icon-56px-rtl{0%{transform:translateX(calc(0 - -32px)) translateY(-34.75px) scale(0.75)}33%{animation-timing-function:cubic-bezier(0.5, 0, 0.701732, 0.495819);transform:translateX(calc(4% - -32px)) translateY(-34.75px) scale(0.75)}66%{animation-timing-function:cubic-bezier(0.302435, 0.381352, 0.55, 0.956352);transform:translateX(calc(-4% - -32px)) translateY(-34.75px) scale(0.75)}100%{transform:translateX(calc(0 - -32px)) translateY(-34.75px) scale(0.75)}}.mdc-select--outlined.mdc-select--with-leading-icon .mdc-select__anchor :not(.mdc-notched-outline--notched) .mdc-notched-outline__notch{max-width:calc(100% - 96px)}.mdc-select--outlined .mdc-menu-surface{margin-bottom:8px}.mdc-select--outlined.mdc-select--no-label .mdc-menu-surface,.mdc-select--outlined .mdc-menu-surface--is-open-below{margin-bottom:0}.mdc-select__anchor{--mdc-ripple-fg-size: 0;--mdc-ripple-left: 0;--mdc-ripple-top: 0;--mdc-ripple-fg-scale: 1;--mdc-ripple-fg-translate-end: 0;--mdc-ripple-fg-translate-start: 0;-webkit-tap-highlight-color:rgba(0,0,0,0);will-change:transform,opacity}.mdc-select__anchor .mdc-select__ripple::before,.mdc-select__anchor .mdc-select__ripple::after{position:absolute;border-radius:50%;opacity:0;pointer-events:none;content:""}.mdc-select__anchor .mdc-select__ripple::before{transition:opacity 15ms linear,background-color 15ms linear;z-index:1;z-index:var(--mdc-ripple-z-index, 1)}.mdc-select__anchor .mdc-select__ripple::after{z-index:0;z-index:var(--mdc-ripple-z-index, 0)}.mdc-select__anchor.mdc-ripple-upgraded .mdc-select__ripple::before{transform:scale(var(--mdc-ripple-fg-scale, 1))}.mdc-select__anchor.mdc-ripple-upgraded .mdc-select__ripple::after{top:0;left:0;transform:scale(0);transform-origin:center center}.mdc-select__anchor.mdc-ripple-upgraded--unbounded .mdc-select__ripple::after{top:var(--mdc-ripple-top, 0);left:var(--mdc-ripple-left, 0)}.mdc-select__anchor.mdc-ripple-upgraded--foreground-activation .mdc-select__ripple::after{animation:mdc-ripple-fg-radius-in 225ms forwards,mdc-ripple-fg-opacity-in 75ms forwards}.mdc-select__anchor.mdc-ripple-upgraded--foreground-deactivation .mdc-select__ripple::after{animation:mdc-ripple-fg-opacity-out 150ms;transform:translate(var(--mdc-ripple-fg-translate-end, 0)) scale(var(--mdc-ripple-fg-scale, 1))}.mdc-select__anchor .mdc-select__ripple::before,.mdc-select__anchor .mdc-select__ripple::after{top:calc(50% - 100%);left:calc(50% - 100%);width:200%;height:200%}.mdc-select__anchor.mdc-ripple-upgraded .mdc-select__ripple::after{width:var(--mdc-ripple-fg-size, 100%);height:var(--mdc-ripple-fg-size, 100%)}.mdc-select__anchor .mdc-select__ripple::before,.mdc-select__anchor .mdc-select__ripple::after{background-color:rgba(0, 0, 0, 0.87);background-color:var(--mdc-ripple-color, rgba(0, 0, 0, 0.87))}.mdc-select__anchor:hover .mdc-select__ripple::before,.mdc-select__anchor.mdc-ripple-surface--hover .mdc-select__ripple::before{opacity:0.04;opacity:var(--mdc-ripple-hover-opacity, 0.04)}.mdc-select__anchor.mdc-ripple-upgraded--background-focused .mdc-select__ripple::before,.mdc-select__anchor:not(.mdc-ripple-upgraded):focus .mdc-select__ripple::before{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-focus-opacity, 0.12)}.mdc-select__anchor .mdc-select__ripple{position:absolute;top:0;left:0;width:100%;height:100%;pointer-events:none}.mdc-select__menu .mdc-deprecated-list .mdc-deprecated-list-item--selected .mdc-deprecated-list-item__ripple::before,.mdc-select__menu .mdc-deprecated-list .mdc-deprecated-list-item--selected .mdc-deprecated-list-item__ripple::after{background-color:#000;background-color:var(--mdc-ripple-color, var(--mdc-theme-on-surface, #000))}.mdc-select__menu .mdc-deprecated-list .mdc-deprecated-list-item--selected:hover .mdc-deprecated-list-item__ripple::before,.mdc-select__menu .mdc-deprecated-list .mdc-deprecated-list-item--selected.mdc-ripple-surface--hover .mdc-deprecated-list-item__ripple::before{opacity:0.04;opacity:var(--mdc-ripple-hover-opacity, 0.04)}.mdc-select__menu .mdc-deprecated-list .mdc-deprecated-list-item--selected.mdc-ripple-upgraded--background-focused .mdc-deprecated-list-item__ripple::before,.mdc-select__menu .mdc-deprecated-list .mdc-deprecated-list-item--selected:not(.mdc-ripple-upgraded):focus .mdc-deprecated-list-item__ripple::before{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-focus-opacity, 0.12)}.mdc-select__menu .mdc-deprecated-list .mdc-deprecated-list-item--selected:not(.mdc-ripple-upgraded) .mdc-deprecated-list-item__ripple::after{transition:opacity 150ms linear}.mdc-select__menu .mdc-deprecated-list .mdc-deprecated-list-item--selected:not(.mdc-ripple-upgraded):active .mdc-deprecated-list-item__ripple::after{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-press-opacity, 0.12)}.mdc-select__menu .mdc-deprecated-list .mdc-deprecated-list-item--selected.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.12)}.mdc-select__menu .mdc-deprecated-list .mdc-deprecated-list-item--selected .mdc-list-item__ripple::before,.mdc-select__menu .mdc-deprecated-list .mdc-deprecated-list-item--selected .mdc-list-item__ripple::after{background-color:#000;background-color:var(--mdc-ripple-color, var(--mdc-theme-on-surface, #000))}.mdc-select__menu .mdc-deprecated-list .mdc-deprecated-list-item--selected:hover .mdc-list-item__ripple::before,.mdc-select__menu .mdc-deprecated-list .mdc-deprecated-list-item--selected.mdc-ripple-surface--hover .mdc-list-item__ripple::before{opacity:0.04;opacity:var(--mdc-ripple-hover-opacity, 0.04)}.mdc-select__menu .mdc-deprecated-list .mdc-deprecated-list-item--selected.mdc-ripple-upgraded--background-focused .mdc-list-item__ripple::before,.mdc-select__menu .mdc-deprecated-list .mdc-deprecated-list-item--selected:not(.mdc-ripple-upgraded):focus .mdc-list-item__ripple::before{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-focus-opacity, 0.12)}.mdc-select__menu .mdc-deprecated-list .mdc-deprecated-list-item--selected:not(.mdc-ripple-upgraded) .mdc-list-item__ripple::after{transition:opacity 150ms linear}.mdc-select__menu .mdc-deprecated-list .mdc-deprecated-list-item--selected:not(.mdc-ripple-upgraded):active .mdc-list-item__ripple::after{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-press-opacity, 0.12)}.mdc-select__menu .mdc-deprecated-list .mdc-deprecated-list-item--selected.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.12)}.mdc-select-helper-text{margin:0;margin-left:16px;margin-right:16px;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto, sans-serif;font-family:var(--mdc-typography-caption-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:0.75rem;font-size:var(--mdc-typography-caption-font-size, 0.75rem);line-height:1.25rem;line-height:var(--mdc-typography-caption-line-height, 1.25rem);font-weight:400;font-weight:var(--mdc-typography-caption-font-weight, 400);letter-spacing:0.0333333333em;letter-spacing:var(--mdc-typography-caption-letter-spacing, 0.0333333333em);text-decoration:inherit;text-decoration:var(--mdc-typography-caption-text-decoration, inherit);text-transform:inherit;text-transform:var(--mdc-typography-caption-text-transform, inherit);display:block;margin-top:0;line-height:normal}[dir=rtl] .mdc-select-helper-text,.mdc-select-helper-text[dir=rtl]{margin-left:16px;margin-right:16px}.mdc-select-helper-text::before{display:inline-block;width:0;height:16px;content:"";vertical-align:0}.mdc-select-helper-text--validation-msg{opacity:0;transition:opacity 180ms cubic-bezier(0.4, 0, 0.2, 1)}.mdc-select--invalid+.mdc-select-helper-text--validation-msg,.mdc-select-helper-text--validation-msg-persistent{opacity:1}.mdc-select--with-leading-icon .mdc-select__icon{display:inline-block;box-sizing:border-box;border:none;text-decoration:none;cursor:pointer;user-select:none;flex-shrink:0;align-self:center;background-color:transparent;fill:currentColor}.mdc-select--with-leading-icon .mdc-select__icon{margin-left:12px;margin-right:12px}[dir=rtl] .mdc-select--with-leading-icon .mdc-select__icon,.mdc-select--with-leading-icon .mdc-select__icon[dir=rtl]{margin-left:12px;margin-right:12px}.mdc-select__icon:not([tabindex]),.mdc-select__icon[tabindex="-1"]{cursor:default;pointer-events:none}.material-icons{font-family:var(--mdc-icon-font, "Material Icons");font-weight:normal;font-style:normal;font-size:var(--mdc-icon-size, 24px);line-height:1;letter-spacing:normal;text-transform:none;display:inline-block;white-space:nowrap;word-wrap:normal;direction:ltr;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;-moz-osx-font-smoothing:grayscale;font-feature-settings:"liga"}:host{display:inline-block;vertical-align:top;outline:none}.mdc-select{width:100%}[hidden]{display:none}.mdc-select__icon{z-index:2}.mdc-select--with-leading-icon{--mdc-list-item-graphic-margin: calc( 48px - var(--mdc-list-item-graphic-size, 24px) - var(--mdc-list-side-padding, 16px) )}.mdc-select .mdc-select__anchor .mdc-select__selected-text{overflow:hidden}.mdc-select .mdc-select__anchor *{display:inline-flex}.mdc-select .mdc-select__anchor .mdc-floating-label{display:inline-block}mwc-notched-outline{--mdc-notched-outline-border-color: var( --mdc-select-outlined-idle-border-color, rgba(0, 0, 0, 0.38) );--mdc-notched-outline-notch-offset: 1px}:host(:not([disabled]):hover) .mdc-select:not(.mdc-select--invalid):not(.mdc-select--focused) mwc-notched-outline{--mdc-notched-outline-border-color: var( --mdc-select-outlined-hover-border-color, rgba(0, 0, 0, 0.87) )}:host(:not([disabled])) .mdc-select:not(.mdc-select--disabled) .mdc-select__selected-text{color:rgba(0, 0, 0, 0.87);color:var(--mdc-select-ink-color, rgba(0, 0, 0, 0.87))}:host(:not([disabled])) .mdc-select:not(.mdc-select--disabled) .mdc-line-ripple::before{border-bottom-color:rgba(0, 0, 0, 0.42);border-bottom-color:var(--mdc-select-idle-line-color, rgba(0, 0, 0, 0.42))}:host(:not([disabled])) .mdc-select:not(.mdc-select--disabled):hover .mdc-line-ripple::before{border-bottom-color:rgba(0, 0, 0, 0.87);border-bottom-color:var(--mdc-select-hover-line-color, rgba(0, 0, 0, 0.87))}:host(:not([disabled])) .mdc-select:not(.mdc-select--outlined):not(.mdc-select--disabled) .mdc-select__anchor{background-color:whitesmoke;background-color:var(--mdc-select-fill-color, whitesmoke)}:host(:not([disabled])) .mdc-select.mdc-select--invalid .mdc-select__dropdown-icon{fill:var(--mdc-select-error-dropdown-icon-color, var(--mdc-select-error-color, var(--mdc-theme-error, #b00020)))}:host(:not([disabled])) .mdc-select.mdc-select--invalid .mdc-floating-label,:host(:not([disabled])) .mdc-select.mdc-select--invalid .mdc-floating-label::after{color:var(--mdc-select-error-color, var(--mdc-theme-error, #b00020))}:host(:not([disabled])) .mdc-select.mdc-select--invalid mwc-notched-outline{--mdc-notched-outline-border-color: var(--mdc-select-error-color, var(--mdc-theme-error, #b00020))}.mdc-select__menu--invalid{--mdc-theme-primary: var(--mdc-select-error-color, var(--mdc-theme-error, #b00020))}:host(:not([disabled])) .mdc-select:not(.mdc-select--invalid):not(.mdc-select--focused) .mdc-floating-label,:host(:not([disabled])) .mdc-select:not(.mdc-select--invalid):not(.mdc-select--focused) .mdc-floating-label::after{color:rgba(0, 0, 0, 0.6);color:var(--mdc-select-label-ink-color, rgba(0, 0, 0, 0.6))}:host(:not([disabled])) .mdc-select:not(.mdc-select--invalid):not(.mdc-select--focused) .mdc-select__dropdown-icon{fill:rgba(0, 0, 0, 0.54);fill:var(--mdc-select-dropdown-icon-color, rgba(0, 0, 0, 0.54))}:host(:not([disabled])) .mdc-select.mdc-select--focused mwc-notched-outline{--mdc-notched-outline-stroke-width: 2px;--mdc-notched-outline-notch-offset: 2px}:host(:not([disabled])) .mdc-select.mdc-select--focused:not(.mdc-select--invalid) mwc-notched-outline{--mdc-notched-outline-border-color: var( --mdc-select-focused-label-color, var(--mdc-theme-primary, rgba(98, 0, 238, 0.87)) )}:host(:not([disabled])) .mdc-select.mdc-select--focused:not(.mdc-select--invalid) .mdc-select__dropdown-icon{fill:rgba(98,0,238,.87);fill:var(--mdc-select-focused-dropdown-icon-color, var(--mdc-theme-primary, rgba(98, 0, 238, 0.87)))}:host(:not([disabled])) .mdc-select.mdc-select--focused:not(.mdc-select--invalid) .mdc-floating-label{color:#6200ee;color:var(--mdc-theme-primary, #6200ee)}:host(:not([disabled])) .mdc-select.mdc-select--focused:not(.mdc-select--invalid) .mdc-floating-label::after{color:#6200ee;color:var(--mdc-theme-primary, #6200ee)}:host(:not([disabled])) .mdc-select-helper-text:not(.mdc-select-helper-text--validation-msg){color:var(--mdc-select-label-ink-color, rgba(0, 0, 0, 0.6))}:host([disabled]){pointer-events:none}:host([disabled]) .mdc-select:not(.mdc-select--outlined).mdc-select--disabled .mdc-select__anchor{background-color:#fafafa;background-color:var(--mdc-select-disabled-fill-color, #fafafa)}:host([disabled]) .mdc-select.mdc-select--outlined mwc-notched-outline{--mdc-notched-outline-border-color: var( --mdc-select-outlined-disabled-border-color, rgba(0, 0, 0, 0.06) )}:host([disabled]) .mdc-select .mdc-select__dropdown-icon{fill:rgba(0, 0, 0, 0.38);fill:var(--mdc-select-disabled-dropdown-icon-color, rgba(0, 0, 0, 0.38))}:host([disabled]) .mdc-select:not(.mdc-select--invalid):not(.mdc-select--focused) .mdc-floating-label,:host([disabled]) .mdc-select:not(.mdc-select--invalid):not(.mdc-select--focused) .mdc-floating-label::after{color:rgba(0, 0, 0, 0.38);color:var(--mdc-select-disabled-ink-color, rgba(0, 0, 0, 0.38))}:host([disabled]) .mdc-select-helper-text{color:rgba(0, 0, 0, 0.38);color:var(--mdc-select-disabled-ink-color, rgba(0, 0, 0, 0.38))}:host([disabled]) .mdc-select__selected-text{color:rgba(0, 0, 0, 0.38);color:var(--mdc-select-disabled-ink-color, rgba(0, 0, 0, 0.38))}`;let Ir=class extends Ar{constructor(){super(...arguments),this._translationsUpdated=fe((async()=>{await _e(),this.layoutOptions()}),500)}renderLeadingIcon(){return this.icon?N``:F}connectedCallback(){super.connectedCallback(),window.addEventListener("translations-updated",this._translationsUpdated)}disconnectedCallback(){super.disconnectedCallback(),window.removeEventListener("translations-updated",this._translationsUpdated)}};Ir.styles=[Sr],n([st({type:Boolean})],Ir.prototype,"icon",void 0),Ir=n([at("mushroom-select")],Ir);const Tr=["default","start","center","end","justify"],zr={default:"mdi:format-align-left",start:"mdi:format-align-left",center:"mdi:format-align-center",end:"mdi:format-align-right",justify:"mdi:format-align-justify"};let Or=class extends ot{constructor(){super(...arguments),this.label="",this.configValue=""}_selectChanged(t){const e=t.target.value;e&&this.dispatchEvent(new CustomEvent("value-changed",{detail:{value:"default"!==e?e:""}}))}render(){const t=Hi(this.hass),e=this.value||"default";return N` + t.stopPropagation()} + .value=${this.value||"default"} + fixedMenuPosition + naturalMenuWidth + > + + ${Tr.map((e=>N` + + ${t(`editor.form.alignment_picker.values.${e}`)} + + + `))} + + `}static get styles(){return d` + mushroom-select { + width: 100%; + } + `}};n([st()],Or.prototype,"label",void 0),n([st()],Or.prototype,"value",void 0),n([st()],Or.prototype,"configValue",void 0),n([st()],Or.prototype,"hass",void 0),Or=n([at("mushroom-alignment-picker")],Or);let Mr=class extends ot{render(){return N` + + `}_valueChanged(t){At(this,"value-changed",{value:t.detail.value||void 0})}};n([st()],Mr.prototype,"hass",void 0),n([st()],Mr.prototype,"selector",void 0),n([st()],Mr.prototype,"value",void 0),n([st()],Mr.prototype,"label",void 0),Mr=n([at("ha-selector-mush-alignment")],Mr); +/** + * @license + * Copyright 2018 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */ +const Lr=Ae(class extends Se{constructor(t){var e;if(super(t),t.type!==Ce||"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,i)=>{const n=t[i];return null==n?e:e+`${i=i.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase()}:${n};`}),"")}update(t,[e]){const{style:i}=t.element;if(void 0===this.ct){this.ct=new Set;for(const t in e)this.ct.add(t);return this.render(e)}this.ct.forEach((t=>{null==e[t]&&(this.ct.delete(t),t.includes("-")?i.removeProperty(t):i[t]="")}));for(const t in e){const n=e[t];null!=n&&(this.ct.add(t),t.includes("-")?i.setProperty(t,n):i[t]=n)}return R}});var Dr={exports:{}},jr={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]},Pr={exports:{}},Nr=function(t){return!(!t||"string"==typeof t)&&(t instanceof Array||Array.isArray(t)||t.length>=0&&(t.splice instanceof Function||Object.getOwnPropertyDescriptor(t,t.length-1)&&"String"!==t.constructor.name))},Vr=Array.prototype.concat,Rr=Array.prototype.slice,Fr=Pr.exports=function(t){for(var e=[],i=0,n=t.length;i=4&&1!==t[3]&&(e=", "+t[3]),"hwb("+t[0]+", "+t[1]+"%, "+t[2]+"%"+e+")"},Wr.to.keyword=function(t){return Yr[t.slice(0,3)]};const Gr=jr,Zr={};for(const t of Object.keys(Gr))Zr[Gr[t]]=t;const Jr={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};var Qr=Jr;for(const t of Object.keys(Jr)){if(!("channels"in Jr[t]))throw new Error("missing channels property: "+t);if(!("labels"in Jr[t]))throw new Error("missing channel labels property: "+t);if(Jr[t].labels.length!==Jr[t].channels)throw new Error("channel and label counts mismatch: "+t);const{channels:e,labels:i}=Jr[t];delete Jr[t].channels,delete Jr[t].labels,Object.defineProperty(Jr[t],"channels",{value:e}),Object.defineProperty(Jr[t],"labels",{value:i})}function ta(t,e){return(t[0]-e[0])**2+(t[1]-e[1])**2+(t[2]-e[2])**2}Jr.rgb.hsl=function(t){const e=t[0]/255,i=t[1]/255,n=t[2]/255,o=Math.min(e,i,n),r=Math.max(e,i,n),a=r-o;let l,s;r===o?l=0:e===r?l=(i-n)/a:i===r?l=2+(n-e)/a:n===r&&(l=4+(e-i)/a),l=Math.min(60*l,360),l<0&&(l+=360);const c=(o+r)/2;return s=r===o?0:c<=.5?a/(r+o):a/(2-r-o),[l,100*s,100*c]},Jr.rgb.hsv=function(t){let e,i,n,o,r;const a=t[0]/255,l=t[1]/255,s=t[2]/255,c=Math.max(a,l,s),d=c-Math.min(a,l,s),u=function(t){return(c-t)/6/d+.5};return 0===d?(o=0,r=0):(r=d/c,e=u(a),i=u(l),n=u(s),a===c?o=n-i:l===c?o=1/3+e-n:s===c&&(o=2/3+i-e),o<0?o+=1:o>1&&(o-=1)),[360*o,100*r,100*c]},Jr.rgb.hwb=function(t){const e=t[0],i=t[1];let n=t[2];const o=Jr.rgb.hsl(t)[0],r=1/255*Math.min(e,Math.min(i,n));return n=1-1/255*Math.max(e,Math.max(i,n)),[o,100*r,100*n]},Jr.rgb.cmyk=function(t){const e=t[0]/255,i=t[1]/255,n=t[2]/255,o=Math.min(1-e,1-i,1-n);return[100*((1-e-o)/(1-o)||0),100*((1-i-o)/(1-o)||0),100*((1-n-o)/(1-o)||0),100*o]},Jr.rgb.keyword=function(t){const e=Zr[t];if(e)return e;let i,n=1/0;for(const e of Object.keys(Gr)){const o=ta(t,Gr[e]);o.04045?((e+.055)/1.055)**2.4:e/12.92,i=i>.04045?((i+.055)/1.055)**2.4:i/12.92,n=n>.04045?((n+.055)/1.055)**2.4:n/12.92;return[100*(.4124*e+.3576*i+.1805*n),100*(.2126*e+.7152*i+.0722*n),100*(.0193*e+.1192*i+.9505*n)]},Jr.rgb.lab=function(t){const e=Jr.rgb.xyz(t);let i=e[0],n=e[1],o=e[2];i/=95.047,n/=100,o/=108.883,i=i>.008856?i**(1/3):7.787*i+16/116,n=n>.008856?n**(1/3):7.787*n+16/116,o=o>.008856?o**(1/3):7.787*o+16/116;return[116*n-16,500*(i-n),200*(n-o)]},Jr.hsl.rgb=function(t){const e=t[0]/360,i=t[1]/100,n=t[2]/100;let o,r,a;if(0===i)return a=255*n,[a,a,a];o=n<.5?n*(1+i):n+i-n*i;const l=2*n-o,s=[0,0,0];for(let t=0;t<3;t++)r=e+1/3*-(t-1),r<0&&r++,r>1&&r--,a=6*r<1?l+6*(o-l)*r:2*r<1?o:3*r<2?l+(o-l)*(2/3-r)*6:l,s[t]=255*a;return s},Jr.hsl.hsv=function(t){const e=t[0];let i=t[1]/100,n=t[2]/100,o=i;const r=Math.max(n,.01);n*=2,i*=n<=1?n:2-n,o*=r<=1?r:2-r;return[e,100*(0===n?2*o/(r+o):2*i/(n+i)),100*((n+i)/2)]},Jr.hsv.rgb=function(t){const e=t[0]/60,i=t[1]/100;let n=t[2]/100;const o=Math.floor(e)%6,r=e-Math.floor(e),a=255*n*(1-i),l=255*n*(1-i*r),s=255*n*(1-i*(1-r));switch(n*=255,o){case 0:return[n,s,a];case 1:return[l,n,a];case 2:return[a,n,s];case 3:return[a,l,n];case 4:return[s,a,n];case 5:return[n,a,l]}},Jr.hsv.hsl=function(t){const e=t[0],i=t[1]/100,n=t[2]/100,o=Math.max(n,.01);let r,a;a=(2-i)*n;const l=(2-i)*o;return r=i*o,r/=l<=1?l:2-l,r=r||0,a/=2,[e,100*r,100*a]},Jr.hwb.rgb=function(t){const e=t[0]/360;let i=t[1]/100,n=t[2]/100;const o=i+n;let r;o>1&&(i/=o,n/=o);const a=Math.floor(6*e),l=1-n;r=6*e-a,0!=(1&a)&&(r=1-r);const s=i+r*(l-i);let c,d,u;switch(a){default:case 6:case 0:c=l,d=s,u=i;break;case 1:c=s,d=l,u=i;break;case 2:c=i,d=l,u=s;break;case 3:c=i,d=s,u=l;break;case 4:c=s,d=i,u=l;break;case 5:c=l,d=i,u=s}return[255*c,255*d,255*u]},Jr.cmyk.rgb=function(t){const e=t[0]/100,i=t[1]/100,n=t[2]/100,o=t[3]/100;return[255*(1-Math.min(1,e*(1-o)+o)),255*(1-Math.min(1,i*(1-o)+o)),255*(1-Math.min(1,n*(1-o)+o))]},Jr.xyz.rgb=function(t){const e=t[0]/100,i=t[1]/100,n=t[2]/100;let o,r,a;return o=3.2406*e+-1.5372*i+-.4986*n,r=-.9689*e+1.8758*i+.0415*n,a=.0557*e+-.204*i+1.057*n,o=o>.0031308?1.055*o**(1/2.4)-.055:12.92*o,r=r>.0031308?1.055*r**(1/2.4)-.055:12.92*r,a=a>.0031308?1.055*a**(1/2.4)-.055:12.92*a,o=Math.min(Math.max(0,o),1),r=Math.min(Math.max(0,r),1),a=Math.min(Math.max(0,a),1),[255*o,255*r,255*a]},Jr.xyz.lab=function(t){let e=t[0],i=t[1],n=t[2];e/=95.047,i/=100,n/=108.883,e=e>.008856?e**(1/3):7.787*e+16/116,i=i>.008856?i**(1/3):7.787*i+16/116,n=n>.008856?n**(1/3):7.787*n+16/116;return[116*i-16,500*(e-i),200*(i-n)]},Jr.lab.xyz=function(t){let e,i,n;i=(t[0]+16)/116,e=t[1]/500+i,n=i-t[2]/200;const o=i**3,r=e**3,a=n**3;return i=o>.008856?o:(i-16/116)/7.787,e=r>.008856?r:(e-16/116)/7.787,n=a>.008856?a:(n-16/116)/7.787,e*=95.047,i*=100,n*=108.883,[e,i,n]},Jr.lab.lch=function(t){const e=t[0],i=t[1],n=t[2];let o;o=360*Math.atan2(n,i)/2/Math.PI,o<0&&(o+=360);return[e,Math.sqrt(i*i+n*n),o]},Jr.lch.lab=function(t){const e=t[0],i=t[1],n=t[2]/360*2*Math.PI;return[e,i*Math.cos(n),i*Math.sin(n)]},Jr.rgb.ansi16=function(t,e=null){const[i,n,o]=t;let r=null===e?Jr.rgb.hsv(t)[2]:e;if(r=Math.round(r/50),0===r)return 30;let a=30+(Math.round(o/255)<<2|Math.round(n/255)<<1|Math.round(i/255));return 2===r&&(a+=60),a},Jr.hsv.ansi16=function(t){return Jr.rgb.ansi16(Jr.hsv.rgb(t),t[2])},Jr.rgb.ansi256=function(t){const e=t[0],i=t[1],n=t[2];if(e===i&&i===n)return e<8?16:e>248?231:Math.round((e-8)/247*24)+232;return 16+36*Math.round(e/255*5)+6*Math.round(i/255*5)+Math.round(n/255*5)},Jr.ansi16.rgb=function(t){let e=t%10;if(0===e||7===e)return t>50&&(e+=3.5),e=e/10.5*255,[e,e,e];const i=.5*(1+~~(t>50));return[(1&e)*i*255,(e>>1&1)*i*255,(e>>2&1)*i*255]},Jr.ansi256.rgb=function(t){if(t>=232){const e=10*(t-232)+8;return[e,e,e]}let e;t-=16;return[Math.floor(t/36)/5*255,Math.floor((e=t%36)/6)/5*255,e%6/5*255]},Jr.rgb.hex=function(t){const e=(((255&Math.round(t[0]))<<16)+((255&Math.round(t[1]))<<8)+(255&Math.round(t[2]))).toString(16).toUpperCase();return"000000".substring(e.length)+e},Jr.hex.rgb=function(t){const e=t.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!e)return[0,0,0];let i=e[0];3===e[0].length&&(i=i.split("").map((t=>t+t)).join(""));const n=parseInt(i,16);return[n>>16&255,n>>8&255,255&n]},Jr.rgb.hcg=function(t){const e=t[0]/255,i=t[1]/255,n=t[2]/255,o=Math.max(Math.max(e,i),n),r=Math.min(Math.min(e,i),n),a=o-r;let l,s;return l=a<1?r/(1-a):0,s=a<=0?0:o===e?(i-n)/a%6:o===i?2+(n-e)/a:4+(e-i)/a,s/=6,s%=1,[360*s,100*a,100*l]},Jr.hsl.hcg=function(t){const e=t[1]/100,i=t[2]/100,n=i<.5?2*e*i:2*e*(1-i);let o=0;return n<1&&(o=(i-.5*n)/(1-n)),[t[0],100*n,100*o]},Jr.hsv.hcg=function(t){const e=t[1]/100,i=t[2]/100,n=e*i;let o=0;return n<1&&(o=(i-n)/(1-n)),[t[0],100*n,100*o]},Jr.hcg.rgb=function(t){const e=t[0]/360,i=t[1]/100,n=t[2]/100;if(0===i)return[255*n,255*n,255*n];const o=[0,0,0],r=e%1*6,a=r%1,l=1-a;let s=0;switch(Math.floor(r)){case 0:o[0]=1,o[1]=a,o[2]=0;break;case 1:o[0]=l,o[1]=1,o[2]=0;break;case 2:o[0]=0,o[1]=1,o[2]=a;break;case 3:o[0]=0,o[1]=l,o[2]=1;break;case 4:o[0]=a,o[1]=0,o[2]=1;break;default:o[0]=1,o[1]=0,o[2]=l}return s=(1-i)*n,[255*(i*o[0]+s),255*(i*o[1]+s),255*(i*o[2]+s)]},Jr.hcg.hsv=function(t){const e=t[1]/100,i=e+t[2]/100*(1-e);let n=0;return i>0&&(n=e/i),[t[0],100*n,100*i]},Jr.hcg.hsl=function(t){const e=t[1]/100,i=t[2]/100*(1-e)+.5*e;let n=0;return i>0&&i<.5?n=e/(2*i):i>=.5&&i<1&&(n=e/(2*(1-i))),[t[0],100*n,100*i]},Jr.hcg.hwb=function(t){const e=t[1]/100,i=e+t[2]/100*(1-e);return[t[0],100*(i-e),100*(1-i)]},Jr.hwb.hcg=function(t){const e=t[1]/100,i=1-t[2]/100,n=i-e;let o=0;return n<1&&(o=(i-n)/(1-n)),[t[0],100*n,100*o]},Jr.apple.rgb=function(t){return[t[0]/65535*255,t[1]/65535*255,t[2]/65535*255]},Jr.rgb.apple=function(t){return[t[0]/255*65535,t[1]/255*65535,t[2]/255*65535]},Jr.gray.rgb=function(t){return[t[0]/100*255,t[0]/100*255,t[0]/100*255]},Jr.gray.hsl=function(t){return[0,0,t[0]]},Jr.gray.hsv=Jr.gray.hsl,Jr.gray.hwb=function(t){return[0,100,t[0]]},Jr.gray.cmyk=function(t){return[0,0,0,t[0]]},Jr.gray.lab=function(t){return[t[0],0,0]},Jr.gray.hex=function(t){const e=255&Math.round(t[0]/100*255),i=((e<<16)+(e<<8)+e).toString(16).toUpperCase();return"000000".substring(i.length)+i},Jr.rgb.gray=function(t){return[(t[0]+t[1]+t[2])/3/255*100]};const ea=Qr;function ia(t){const e=function(){const t={},e=Object.keys(ea);for(let i=e.length,n=0;n{la[t]={},Object.defineProperty(la[t],"channels",{value:ra[t].channels}),Object.defineProperty(la[t],"labels",{value:ra[t].labels});const e=aa(t);Object.keys(e).forEach((i=>{const n=e[i];la[t][i]=function(t){const e=function(...e){const i=e[0];if(null==i)return i;i.length>1&&(e=i);const n=t(e);if("object"==typeof n)for(let t=n.length,e=0;e1&&(e=i),t(e))};return"conversion"in t&&(e.conversion=t.conversion),e}(n)}))}));var sa=la;const ca=Dr.exports,da=sa,ua=["keyword","gray","hex"],ha={};for(const t of Object.keys(da))ha[[...da[t].labels].sort().join("")]=t;const ma={};function pa(t,e){if(!(this instanceof pa))return new pa(t,e);if(e&&e in ua&&(e=null),e&&!(e in da))throw new Error("Unknown model: "+e);let i,n;if(null==t)this.model="rgb",this.color=[0,0,0],this.valpha=1;else if(t instanceof pa)this.model=t.model,this.color=[...t.color],this.valpha=t.valpha;else if("string"==typeof t){const e=ca.get(t);if(null===e)throw new Error("Unable to parse color from string: "+t);this.model=e.model,n=da[this.model].channels,this.color=e.value.slice(0,n),this.valpha="number"==typeof e.value[n]?e.value[n]:1}else if(t.length>0){this.model=e||"rgb",n=da[this.model].channels;const i=Array.prototype.slice.call(t,0,n);this.color=va(i,n),this.valpha="number"==typeof t[n]?t[n]:1}else if("number"==typeof t)this.model="rgb",this.color=[t>>16&255,t>>8&255,255&t],this.valpha=1;else{this.valpha=1;const e=Object.keys(t);"alpha"in t&&(e.splice(e.indexOf("alpha"),1),this.valpha="number"==typeof t.alpha?t.alpha:0);const n=e.sort().join("");if(!(n in ha))throw new Error("Unable to parse color from object: "+JSON.stringify(t));this.model=ha[n];const{labels:o}=da[this.model],r=[];for(i=0;i(t%360+360)%360)),saturationl:ga("hsl",1,_a(100)),lightness:ga("hsl",2,_a(100)),saturationv:ga("hsv",1,_a(100)),value:ga("hsv",2,_a(100)),chroma:ga("hcg",1,_a(100)),gray:ga("hcg",2,_a(100)),white:ga("hwb",1,_a(100)),wblack:ga("hwb",2,_a(100)),cyan:ga("cmyk",0,_a(100)),magenta:ga("cmyk",1,_a(100)),yellow:ga("cmyk",2,_a(100)),black:ga("cmyk",3,_a(100)),x:ga("xyz",0,_a(95.047)),y:ga("xyz",1,_a(100)),z:ga("xyz",2,_a(108.833)),l:ga("lab",0,_a(100)),a:ga("lab",1),b:ga("lab",2),keyword(t){return void 0!==t?new pa(t):da[this.model].keyword(this.color)},hex(t){return void 0!==t?new pa(t):ca.to.hex(this.rgb().round().color)},hexa(t){if(void 0!==t)return new pa(t);const e=this.rgb().round().color;let i=Math.round(255*this.valpha).toString(16).toUpperCase();return 1===i.length&&(i="0"+i),ca.to.hex(e)+i},rgbNumber(){const t=this.rgb().color;return(255&t[0])<<16|(255&t[1])<<8|255&t[2]},luminosity(){const t=this.rgb().color,e=[];for(const[i,n]of t.entries()){const t=n/255;e[i]=t<=.04045?t/12.92:((t+.055)/1.055)**2.4}return.2126*e[0]+.7152*e[1]+.0722*e[2]},contrast(t){const e=this.luminosity(),i=t.luminosity();return e>i?(e+.05)/(i+.05):(i+.05)/(e+.05)},level(t){const e=this.contrast(t);return e>=7?"AAA":e>=4.5?"AA":""},isDark(){const t=this.rgb().color;return(2126*t[0]+7152*t[1]+722*t[2])/1e4<128},isLight(){return!this.isDark()},negate(){const t=this.rgb();for(let e=0;e<3;e++)t.color[e]=255-t.color[e];return t},lighten(t){const e=this.hsl();return e.color[2]+=e.color[2]*t,e},darken(t){const e=this.hsl();return e.color[2]-=e.color[2]*t,e},saturate(t){const e=this.hsl();return e.color[1]+=e.color[1]*t,e},desaturate(t){const e=this.hsl();return e.color[1]-=e.color[1]*t,e},whiten(t){const e=this.hwb();return e.color[1]+=e.color[1]*t,e},blacken(t){const e=this.hwb();return e.color[2]+=e.color[2]*t,e},grayscale(){const t=this.rgb().color,e=.3*t[0]+.59*t[1]+.11*t[2];return pa.rgb(e,e,e)},fade(t){return this.alpha(this.valpha-this.valpha*t)},opaquer(t){return this.alpha(this.valpha+this.valpha*t)},rotate(t){const e=this.hsl();let i=e.color[0];return i=(i+t)%360,i=i<0?360+i:i,e.color[0]=i,e},mix(t,e){if(!t||!t.rgb)throw new Error('Argument to "mix" was not a Color instance, but rather an instance of '+typeof t);const i=t.rgb(),n=this.rgb(),o=void 0===e?.5:e,r=2*o-1,a=i.alpha()-n.alpha(),l=((r*a==-1?r:(r+a)/(1+r*a))+1)/2,s=1-l;return pa.rgb(l*i.red()+s*n.red(),l*i.green()+s*n.green(),l*i.blue()+s*n.blue(),i.alpha()*o+n.alpha()*(1-o))}};for(const t of Object.keys(da)){if(ua.includes(t))continue;const{channels:e}=da[t];pa.prototype[t]=function(...e){return this.model===t?new pa(this):e.length>0?new pa(e,t):new pa([...(i=da[this.model][t].raw(this.color),Array.isArray(i)?i:[i]),this.valpha],t);var i},pa[t]=function(...i){let n=i[0];return"number"==typeof n&&(n=va(i,e)),new pa(n,t)}}function fa(t){return function(e){return function(t,e){return Number(t.toFixed(e))}(e,t)}}function ga(t,e,i){t=Array.isArray(t)?t:[t];for(const n of t)(ma[n]||(ma[n]=[]))[e]=i;return t=t[0],function(n){let o;return void 0!==n?(i&&(n=i(n)),o=this[t](),o.color[e]=n,o):(o=this[t]().color[e],i&&(o=i(o)),o)}}function _a(t){return function(e){return Math.max(0,Math.min(t,e))}}function va(t,e){for(let i=0;i ${t("editor.form.color_picker.values.default")} - ${li.map((t=>ut` + ${ya.map((t=>N` ${function(t){return t.split("-").map((t=>function(t){return t.charAt(0).toUpperCase()+t.slice(1)}(t))).join(" ")}(t)} ${this.renderColorCircle(t)} `))} - `}renderColorCircle(t){return ut` + `}renderColorCircle(t){return N` - `}static get styles(){return N` + `}static get styles(){return d` mushroom-select { width: 100%; } @@ -547,32 +691,32 @@ const Ln=N`.mdc-floating-label{-moz-osx-font-smoothing:grayscale;-webkit-font-sm width: 20px; height: 20px; } - `}};n([zt()],Nn.prototype,"label",void 0),n([zt()],Nn.prototype,"value",void 0),n([zt()],Nn.prototype,"configValue",void 0),n([zt()],Nn.prototype,"hass",void 0),Nn=n([Dt("mushroom-color-picker")],Nn);let Rn=class extends Ot{render(){return ut` + `}};n([st()],Ca.prototype,"label",void 0),n([st()],Ca.prototype,"value",void 0),n([st()],Ca.prototype,"configValue",void 0),n([st()],Ca.prototype,"hass",void 0),Ca=n([at("mushroom-color-picker")],Ca);let $a=class extends ot{render(){return N` - `}_valueChanged(t){w(this,"value-changed",{value:t.detail.value||void 0})}};n([zt()],Rn.prototype,"hass",void 0),n([zt()],Rn.prototype,"selector",void 0),n([zt()],Rn.prototype,"value",void 0),n([zt()],Rn.prototype,"label",void 0),Rn=n([Dt("ha-selector-mush-color")],Rn);const Pn="unavailable",Fn="unknown",Vn="off";function Bn(t){const e=t.entity_id.split(".")[0],i=t.state;if(i===Pn||i===Fn||i===Vn)return!1;switch(e){case"alarm_control_panel":return"disarmed"!==i;case"lock":return"unlocked"!==i;case"cover":return"open"===i||"opening"===i;case"device_tracker":case"person":return"home"===i;case"vacuum":return"cleaning"===i||"on"===i;case"plant":return"problem"===i;default:return!0}}function Un(t){return t.state!==Pn}function Hn(t){return t.state===Vn}const Yn=["name","state","last-changed","last-updated","none"],Xn=["button","input_button","scene"];function qn(t,e,i,n,o){switch(t){case"name":return e;case"state":const t=n.entity_id.split(".")[0];return"timestamp"!==n.attributes.device_class&&!Xn.includes(t)||!Un(n)||function(t){return t.state===Fn}(n)?i:ut` + `}_valueChanged(t){At(this,"value-changed",{value:t.detail.value||void 0})}};n([st()],$a.prototype,"hass",void 0),n([st()],$a.prototype,"selector",void 0),n([st()],$a.prototype,"value",void 0),n([st()],$a.prototype,"label",void 0),$a=n([at("ha-selector-mush-color")],$a);const Ea=["button","input_button","scene"],Aa=["name","state","last-changed","last-updated","none"],Sa=["icon","entity-picture","none"];function Ia(t,e,i,n,o){switch(t){case"name":return e;case"state":const t=n.entity_id.split(".")[0];return"timestamp"!==n.attributes.device_class&&!Ea.includes(t)||!Dt(n)||function(t){return t.state===zt}(n)?i:N` - `;case"last-changed":return ut` + `;case"last-changed":return N` - `;case"last-updated":return ut` + `;case"last-updated":return N` - `;case"none":return}}let Wn=class extends Ot{constructor(){super(...arguments),this.label="",this.configValue=""}_selectChanged(t){const e=t.target.value;e&&this.dispatchEvent(new CustomEvent("value-changed",{detail:{value:"default"!==e?e:""}}))}render(){var t;const e=we(this.hass);return ut` + `;case"none":return}}function Ta(t,e){return"entity-picture"===e?Pt(t):void 0}let za=class extends ot{constructor(){super(...arguments),this.label="",this.configValue=""}_selectChanged(t){const e=t.target.value;e&&this.dispatchEvent(new CustomEvent("value-changed",{detail:{value:"default"!==e?e:""}}))}render(){const t=Hi(this.hass);return N` - ${e("editor.form.info_picker.values.default")} + ${t("editor.form.icon_type_picker.values.default")} - ${(null!==(t=this.infos)&&void 0!==t?t:Yn).map((t=>ut` - - ${e(`editor.form.info_picker.values.${t}`)||function(t){return t.charAt(0).toUpperCase()+t.slice(1)}(t)} + ${Sa.map((e=>N` + + ${t(`editor.form.icon_type_picker.values.${e}`)||function(t){return t.charAt(0).toUpperCase()+t.slice(1)}(e)} `))} - `}static get styles(){return N` + `}static get styles(){return d` mushroom-select { width: 100%; } - `}};n([zt()],Wn.prototype,"label",void 0),n([zt()],Wn.prototype,"value",void 0),n([zt()],Wn.prototype,"configValue",void 0),n([zt()],Wn.prototype,"infos",void 0),n([zt()],Wn.prototype,"hass",void 0),Wn=n([Dt("mushroom-info-picker")],Wn);let Gn=class extends Ot{render(){return ut` - - `}_valueChanged(t){w(this,"value-changed",{value:t.detail.value||void 0})}};n([zt()],Gn.prototype,"hass",void 0),n([zt()],Gn.prototype,"selector",void 0),n([zt()],Gn.prototype,"value",void 0),n([zt()],Gn.prototype,"label",void 0),Gn=n([Dt("ha-selector-mush-info")],Gn);const Kn=["default","horizontal","vertical"],Zn={default:"mdi:card-text-outline",vertical:"mdi:focus-field-vertical",horizontal:"mdi:focus-field-horizontal"};let Jn=class extends Ot{constructor(){super(...arguments),this.label="",this.configValue=""}_selectChanged(t){const e=t.target.value;e&&this.dispatchEvent(new CustomEvent("value-changed",{detail:{value:"default"!==e?e:""}}))}render(){const t=we(this.hass),e=this.value||"default";return ut` + > + `}_valueChanged(t){At(this,"value-changed",{value:t.detail.value||void 0})}};n([st()],Oa.prototype,"hass",void 0),n([st()],Oa.prototype,"selector",void 0),n([st()],Oa.prototype,"value",void 0),n([st()],Oa.prototype,"label",void 0),Oa=n([at("ha-selector-mush-icon-type")],Oa);let Ma=class extends ot{constructor(){super(...arguments),this.label="",this.configValue=""}_selectChanged(t){const e=t.target.value;e&&this.dispatchEvent(new CustomEvent("value-changed",{detail:{value:"default"!==e?e:""}}))}render(){var t;const e=Hi(this.hass);return N` t.stopPropagation()} - .value=${e} + .value=${this.value||"default"} fixedMenuPosition naturalMenuWidth > - - ${Kn.map((e=>ut` - - ${t(`editor.form.layout_picker.values.${e}`)} - - - `))} + + ${e("editor.form.info_picker.values.default")} + + ${(null!==(t=this.infos)&&void 0!==t?t:Aa).map((t=>N` + + ${e(`editor.form.info_picker.values.${t}`)||function(t){return t.charAt(0).toUpperCase()+t.slice(1)}(t)} + + `))} - `}static get styles(){return N` + `}static get styles(){return d` mushroom-select { width: 100%; } - `}};n([zt()],Jn.prototype,"label",void 0),n([zt()],Jn.prototype,"value",void 0),n([zt()],Jn.prototype,"configValue",void 0),n([zt()],Jn.prototype,"hass",void 0),Jn=n([Dt("mushroom-layout-picker")],Jn);let Qn=class extends Ot{render(){return ut` - - `}_valueChanged(t){w(this,"value-changed",{value:t.detail.value||void 0})}};n([zt()],Qn.prototype,"hass",void 0),n([zt()],Qn.prototype,"selector",void 0),n([zt()],Qn.prototype,"value",void 0),n([zt()],Qn.prototype,"label",void 0),Qn=n([Dt("ha-selector-mush-layout")],Qn);const to=["default","start","center","end","justify"],eo={default:"mdi:format-align-left",start:"mdi:format-align-left",center:"mdi:format-align-center",end:"mdi:format-align-right",justify:"mdi:format-align-justify"};let io=class extends Ot{constructor(){super(...arguments),this.label="",this.configValue=""}_selectChanged(t){const e=t.target.value;e&&this.dispatchEvent(new CustomEvent("value-changed",{detail:{value:"default"!==e?e:""}}))}render(){const t=we(this.hass),e=this.value||"default";return ut` + > + `}_valueChanged(t){At(this,"value-changed",{value:t.detail.value||void 0})}};n([st()],La.prototype,"hass",void 0),n([st()],La.prototype,"selector",void 0),n([st()],La.prototype,"value",void 0),n([st()],La.prototype,"label",void 0),La=n([at("ha-selector-mush-info")],La);const Da=["default","horizontal","vertical"],ja={default:"mdi:card-text-outline",vertical:"mdi:focus-field-vertical",horizontal:"mdi:focus-field-horizontal"};let Pa=class extends ot{constructor(){super(...arguments),this.label="",this.configValue=""}_selectChanged(t){const e=t.target.value;e&&this.dispatchEvent(new CustomEvent("value-changed",{detail:{value:"default"!==e?e:""}}))}render(){const t=Hi(this.hass),e=this.value||"default";return N` t.stopPropagation()} - .value=${this.value||"default"} + .value=${e} fixedMenuPosition naturalMenuWidth > - - ${to.map((e=>ut` - - ${t(`editor.form.alignment_picker.values.${e}`)} - - - `))} + + ${Da.map((e=>N` + + ${t(`editor.form.layout_picker.values.${e}`)} + + + `))} - `}static get styles(){return N` + `}static get styles(){return d` mushroom-select { width: 100%; } - `}};n([zt()],io.prototype,"label",void 0),n([zt()],io.prototype,"value",void 0),n([zt()],io.prototype,"configValue",void 0),n([zt()],io.prototype,"hass",void 0),io=n([Dt("mushroom-alignment-picker")],io);let no=class extends Ot{render(){return ut` - - `}_valueChanged(t){w(this,"value-changed",{value:t.detail.value||void 0})}};n([zt()],no.prototype,"hass",void 0),n([zt()],no.prototype,"selector",void 0),n([zt()],no.prototype,"value",void 0),n([zt()],no.prototype,"label",void 0),no=n([Dt("ha-selector-mush-alignment")],no);const oo=(t,e)=>0!=(t.attributes.supported_features&e),ro=t=>(t=>oo(t,4)&&"number"==typeof t.attributes.in_progress)(t)||!!t.attributes.in_progress,ao=(t,e,i,n)=>{var o;const r=void 0!==n?n:e.state;if(r===Fn||r===Pn)return t(`state.default.${r}`);if(_(e)){if("monetary"===e.attributes.device_class)try{return b(r,i,{style:"currency",currency:e.attributes.unit_of_measurement})}catch(t){}return`${b(r,i)}${e.attributes.unit_of_measurement?" "+e.attributes.unit_of_measurement:""}`}const a=(t=>{return(e=t.entity_id).substr(0,e.indexOf("."));var e})(e);if("input_datetime"===a){if(void 0===n){let t;return e.attributes.has_date&&e.attributes.has_time?(t=new Date(e.attributes.year,e.attributes.month-1,e.attributes.day,e.attributes.hour,e.attributes.minute),d(t,i)):e.attributes.has_date?(t=new Date(e.attributes.year,e.attributes.month-1,e.attributes.day),s(t,i)):e.attributes.has_time?(t=new Date,t.setHours(e.attributes.hour,e.attributes.minute),h(t,i)):e.state}try{const t=n.split(" ");if(2===t.length)return d(new Date(t.join("T")),i);if(1===t.length){if(n.includes("-"))return s(new Date(`${n}T00:00`),i);if(n.includes(":")){const t=new Date;return h(new Date(`${t.toISOString().split("T")[0]}T${n}`),i)}}return n}catch(t){return n}}if("humidifier"===a&&"on"===r&&e.attributes.humidity)return`${e.attributes.humidity} %`;if("counter"===a||"number"===a||"input_number"===a)return b(r,i);if("button"===a||"input_button"===a||"scene"===a||"sensor"===a&&"timestamp"===e.attributes.device_class)try{return d(new Date(r),i)}catch(t){return r}return"update"===a?"on"===r?ro(e)?oo(e,4)?t("ui.card.update.installing_with_progress",{progress:e.attributes.in_progress}):t("ui.card.update.installing"):e.attributes.latest_version:e.attributes.skipped_version===e.attributes.latest_version?null!==(o=e.attributes.latest_version)&&void 0!==o?o:t("state.default.unavailable"):t("ui.card.update.up_to_date"):e.attributes.device_class&&t(`component.${a}.state.${e.attributes.device_class}.${r}`)||t(`component.${a}.state._.${r}`)||r};let so=class extends Ot{constructor(){super(...arguments),this.icon=""}render(){return ut` + > + `}_valueChanged(t){At(this,"value-changed",{value:t.detail.value||void 0})}};n([st()],Na.prototype,"hass",void 0),n([st()],Na.prototype,"selector",void 0),n([st()],Na.prototype,"value",void 0),n([st()],Na.prototype,"label",void 0),Na=n([at("ha-selector-mush-layout")],Na);let Va=class extends ot{constructor(){super(...arguments),this.icon=""}render(){return N`
- `}static get styles(){return N` + `}static get styles(){return d` :host { - --main-color: var(--state-unknown-color); - --icon-color: var(--text-primary-color); + --main-color: rgb(var(--rgb-grey)); + --icon-color: rgb(var(--rgb-white)); } .badge { display: flex; align-items: center; justify-content: center; - line-height: 10px; - width: 16px; - height: 16px; - border-radius: 50%; + line-height: 0; + width: var(--badge-size); + height: var(--badge-size); + font-size: var(--badge-size); + border-radius: var(--badge-border-radius); background-color: var(--main-color); transition: background-color 280ms ease-in-out; } .badge ha-icon { - --mdc-icon-size: 12px; + --mdc-icon-size: var(--badge-icon-size); + color: var(--icon-color); + } + `}};n([st()],Va.prototype,"icon",void 0),Va=n([at("mushroom-badge-icon")],Va);let Ra=class extends ot{constructor(){super(...arguments),this.icon="",this.title="",this.disabled=!1}render(){return N` + + `}static get styles(){return d` + :host { + --icon-color: var(--primary-text-color); + --icon-color-disabled: rgb(var(--rgb-disabled)); + --bg-color: rgba(var(--rgb-primary-text-color), 0.05); + --bg-color-disabled: rgba(var(--rgb-disabled), 0.2); + height: var(--control-height); + width: calc(var(--control-height) * var(--control-button-ratio)); + flex: none; + } + .button { + cursor: pointer; + display: flex; + align-items: center; + justify-content: center; + width: 100%; + height: 100%; + border-radius: var(--control-border-radius); + border: none; + background-color: var(--bg-color); + transition: background-color 280ms ease-in-out; + font-size: var(--control-height); + margin: 0; + padding: 0; + box-sizing: border-box; + line-height: 0; + } + .button:disabled { + cursor: not-allowed; + background-color: var(--bg-color-disabled); + } + .button ha-icon { + --mdc-icon-size: var(--control-icon-size); color: var(--icon-color); + pointer-events: none; + } + .button:disabled ha-icon { + color: var(--icon-color-disabled); } - `}};n([zt()],so.prototype,"icon",void 0),so=n([Dt("mushroom-badge-icon")],so);let lo=class extends Ot{constructor(){super(...arguments),this.layout="default"}render(){return this.noCardStyle?this.renderContent():ut`${this.renderContent()}`}renderContent(){return ut` + `}};n([st()],Ra.prototype,"icon",void 0),n([st()],Ra.prototype,"title",void 0),n([st({type:Boolean})],Ra.prototype,"disabled",void 0),Ra=n([at("mushroom-button")],Ra);let Fa=class extends ot{constructor(){super(...arguments),this.fill=!1,this.rtl=!1}render(){return N`
- `}static get styles(){return N` - ha-card { - height: 100%; - box-sizing: border-box; - padding: var(--spacing); + `}static get styles(){return d` + :host { display: flex; - flex-direction: column; - justify-content: center; + flex-direction: row; + width: 100%; + } + .container { + width: 100%; + display: flex; + flex-direction: row; + justify-content: flex-end; + } + .container ::slotted(*:not(:last-child)) { + margin-right: var(--spacing); + } + :host([rtl]) .container ::slotted(*:not(:last-child)) { + margin-right: initial; + margin-left: var(--spacing); + } + .container.fill > ::slotted(*) { + flex: 1; + width: 0; } + `}};n([st()],Fa.prototype,"fill",void 0),n([st()],Fa.prototype,"rtl",void 0),Fa=n([at("mushroom-button-group")],Fa);let Ba=class extends ot{render(){var t,e,i,n;return N` +
+ +
+ `}static get styles(){return d` .container { display: flex; flex-direction: column; @@ -720,6 +929,14 @@ const Ln=N`.mdc-floating-label{-moz-osx-font-smoothing:grayscale;-webkit-font-sm flex: 1; min-width: 0; } + .container.no-info > ::slotted(mushroom-state-item) { + flex: none; + } + .container.no-info.no-icon > ::slotted(mushroom-state-item) { + margin-right: 0; + margin-left: 0; + margin-bottom: 0; + } .container.horizontal > ::slotted(*:not(:last-child)) { margin-right: var(--spacing); margin-bottom: 0; @@ -729,34 +946,38 @@ const Ln=N`.mdc-floating-label{-moz-osx-font-smoothing:grayscale;-webkit-font-sm margin-left: var(--spacing); margin-bottom: 0; } - `}};n([zt({attribute:"no-card-style",type:Boolean})],lo.prototype,"noCardStyle",void 0),n([zt()],lo.prototype,"layout",void 0),lo=n([Dt("mushroom-card")],lo);const co={pulse:"@keyframes pulse {\n 0% {\n opacity: 1;\n }\n 50% {\n opacity: 0;\n }\n 100% {\n opacity: 1;\n }\n }",spin:"@keyframes spin {\n from {\n transform: rotate(0deg);\n }\n to {\n transform: rotate(360deg);\n }\n }"},uo=N` - ${j(co.pulse)} - `,ho=(N` - ${j(co.spin)} - `,N` - ${j(Object.values(co).join("\n"))} -`);let mo=class extends Ot{constructor(){super(...arguments),this.icon="",this.disabled=!1}render(){return ut` + `}};n([st()],Ba.prototype,"appearance",void 0),Ba=n([at("mushroom-card")],Ba);const Ua={pulse:"@keyframes pulse {\n 0% {\n opacity: 1;\n }\n 50% {\n opacity: 0;\n }\n 100% {\n opacity: 1;\n }\n }",spin:"@keyframes spin {\n from {\n transform: rotate(0deg);\n }\n to {\n transform: rotate(360deg);\n }\n }",cleaning:"@keyframes cleaning {\n 0% {\n transform: rotate(0) translate(0);\n }\n 5% {\n transform: rotate(0) translate(0, -3px);\n }\n 10% {\n transform: rotate(0) translate(0, 1px);\n }\n 15% {\n transform: rotate(0) translate(0);\n }\n\n 20% {\n transform: rotate(30deg) translate(0);\n }\n 25% {\n transform: rotate(30deg) translate(0, -3px);\n }\n 30% {\n transform: rotate(30deg) translate(0, 1px);\n }\n 35% {\n transform: rotate(30deg) translate(0);\n }\n 40% {\n transform: rotate(0) translate(0);\n }\n\n 45% {\n transform: rotate(-30deg) translate(0);\n }\n 50% {\n transform: rotate(-30deg) translate(0, -3px);\n }\n 55% {\n transform: rotate(-30deg) translate(0, 1px);\n }\n 60% {\n transform: rotate(-30deg) translate(0);\n }\n 70% {\n transform: rotate(0deg) translate(0);\n }\n 100% {\n transform: rotate(0deg);\n }\n }",returning:"@keyframes returning {\n 0% {\n transform: rotate(0);\n }\n 25% {\n transform: rotate(20deg);\n }\n 50% {\n transform: rotate(0);\n }\n 75% {\n transform: rotate(-20deg);\n }\n 100% {\n transform: rotate(0);\n }\n }"},Ha=d` + ${c(Ua.pulse)} + `,Ya=(d` + ${c(Ua.spin)} + `,d` + ${c(Ua.cleaning)} + `,d` + ${c(Ua.returning)} + `,d` + ${c(Object.values(Ua).join("\n"))} +`);let Xa=class extends ot{constructor(){super(...arguments),this.icon="",this.disabled=!1}render(){return N`
- `}static get styles(){return N` + `}static get styles(){return d` :host { --icon-color: var(--primary-text-color); - --icon-color-disabled: var(--disabled-text-color); + --icon-color-disabled: rgb(var(--rgb-disabled)); --icon-animation: none; --shape-color: rgba(var(--rgb-primary-text-color), 0.05); - --shape-color-disabled: rgba(var(--rgb-primary-text-color), 0.05); + --shape-color-disabled: rgba(var(--rgb-disabled), 0.2); --shape-animation: none; --shape-outline-color: transparent; - --shape-outline-size: 1px; flex: none; } .shape { position: relative; - width: 42px; - height: 42px; + width: var(--icon-size); + height: var(--icon-size); + font-size: var(--icon-size); border-radius: var(--icon-border-radius); display: flex; align-items: center; @@ -766,11 +987,11 @@ const Ln=N`.mdc-floating-label{-moz-osx-font-smoothing:grayscale;-webkit-font-sm transition-duration: 280ms; transition-timing-function: ease-out; animation: var(--shape-animation); - box-shadow: 0 0 0 var(--shape-outline-size) var(--shape-outline-color); + box-shadow: 0 0 0 1px var(--shape-outline-color); } .shape ha-icon { display: flex; - --mdc-icon-size: 20px; + --mdc-icon-size: var(--icon-symbol-size); color: var(--icon-color); transition: color 280ms ease-in-out; animation: var(--icon-animation); @@ -781,16 +1002,16 @@ const Ln=N`.mdc-floating-label{-moz-osx-font-smoothing:grayscale;-webkit-font-sm .shape.disabled ha-icon { color: var(--icon-color-disabled); } - ${ho} - `}};n([zt()],mo.prototype,"icon",void 0),n([zt()],mo.prototype,"disabled",void 0),mo=n([Dt("mushroom-shape-icon")],mo);let po=class extends Ot{constructor(){super(...arguments),this.primary="",this.multiline_secondary=!1}render(){return ut` + ${Ya} + `}};n([st()],Xa.prototype,"icon",void 0),n([st()],Xa.prototype,"disabled",void 0),Xa=n([at("mushroom-shape-icon")],Xa);let Wa=class extends ot{constructor(){super(...arguments),this.primary="",this.multiline_secondary=!1}render(){return N`
${this.primary} - ${this.secondary?ut`${this.secondary}`:null}
- `}static get styles(){return N` + `}static get styles(){return d` .container { min-width: 0; flex: 1; @@ -800,6 +1021,7 @@ const Ln=N`.mdc-floating-label{-moz-osx-font-smoothing:grayscale;-webkit-font-sm .primary { font-weight: var(--card-primary-font-weight); font-size: var(--card-primary-font-size); + line-height: var(--card-primary-line-height); color: var(--primary-text-color); text-overflow: ellipsis; overflow: hidden; @@ -808,6 +1030,7 @@ const Ln=N`.mdc-floating-label{-moz-osx-font-smoothing:grayscale;-webkit-font-sm .secondary { font-weight: var(--card-secondary-font-weight); font-size: var(--card-secondary-font-size); + line-height: var(--card-secondary-line-height); color: var(--secondary-text-color); text-overflow: ellipsis; overflow: hidden; @@ -816,23 +1039,23 @@ const Ln=N`.mdc-floating-label{-moz-osx-font-smoothing:grayscale;-webkit-font-sm .multiline_secondary { white-space: pre-wrap; } - `}};n([zt()],po.prototype,"primary",void 0),n([zt()],po.prototype,"secondary",void 0),n([zt()],po.prototype,"multiline_secondary",void 0),po=n([Dt("mushroom-state-info")],po);let fo=class extends Ot{constructor(){super(...arguments),this.layout="default",this.hide_icon=!1,this.hide_info=!1}render(){return ut` + `}};n([st()],Wa.prototype,"primary",void 0),n([st()],Wa.prototype,"secondary",void 0),n([st()],Wa.prototype,"multiline_secondary",void 0),Wa=n([at("mushroom-state-info")],Wa);let qa=class extends ot{render(){var t,e,i,n;return N`
- ${this.hide_icon?null:ut` + ${"none"!==(null===(e=this.appearance)||void 0===e?void 0:e.icon_type)?N`
- `} - ${this.hide_info?null:ut` + `:null} + ${"none"!==(null===(i=this.appearance)||void 0===i?void 0:i.primary_info)||"none"!==(null===(n=this.appearance)||void 0===n?void 0:n.secondary_info)?N`
- `} + `:null}
- `}static get styles(){return N` + `}static get styles(){return d` .container { display: flex; flex-direction: row; @@ -879,111 +1102,231 @@ const Ln=N`.mdc-floating-label{-moz-osx-font-smoothing:grayscale;-webkit-font-sm .container.vertical .info { text-align: center; } - `}};n([zt()],fo.prototype,"layout",void 0),n([zt()],fo.prototype,"hide_icon",void 0),n([zt()],fo.prototype,"hide_info",void 0),fo=n([Dt("mushroom-state-item")],fo);let go=class extends Ot{constructor(){super(...arguments),this.icon="",this.title="",this.disabled=!1}render(){return ut` - - `}static get styles(){return N` + `}};function Ka(t){var e,i,n,o,r;return{layout:null!==(e=t.layout)&&void 0!==e?e:Ga(t),fill_container:null!==(i=t.fill_container)&&void 0!==i&&i,primary_info:null!==(n=t.primary_info)&&void 0!==n?n:Ja(t),secondary_info:null!==(o=t.secondary_info)&&void 0!==o?o:Qa(t),icon_type:null!==(r=t.icon_type)&&void 0!==r?r:Za(t)}}function Ga(t){return t.vertical?"vertical":"default"}function Za(t){return t.hide_icon?"none":t.use_entity_picture||t.use_media_artwork?"entity-picture":"icon"}function Ja(t){return t.hide_name?"none":"name"}function Qa(t){return t.hide_state?"none":"state"}n([st()],qa.prototype,"appearance",void 0),qa=n([at("mushroom-state-item")],qa);let tl=class extends ot{constructor(){super(...arguments),this.picture_url=""}render(){return N` +
+ +
+ `}static get styles(){return d` :host { - --icon-color: var(--primary-text-color); - --icon-color-disabled: var(--disabled-text-color); - --bg-color: rgba(var(--rgb-primary-text-color), 0.05); - --bg-color-disabled: rgba(var(--rgb-primary-text-color), 0.05); - width: 42px; - height: 42px; + --main-color: var(--primary-text-color); + --icon-color-disabled: rgb(var(--rgb-disabled)); + --shape-color: rgba(var(--rgb-primary-text-color), 0.05); + --shape-color-disabled: rgba(var(--rgb-disabled), 0.2); flex: none; } - .button { - cursor: pointer; + .container { + position: relative; + width: var(--icon-size); + height: var(--icon-size); + flex: none; display: flex; align-items: center; justify-content: center; - width: 100%; - height: 100%; - border-radius: var(--control-border-radius); - border: none; - background-color: var(--bg-color); - transition: background-color 280ms ease-in-out; - } - .button:disabled { - cursor: not-allowed; - background-color: var(--bg-color-disabled); - } - .button ha-icon { - --mdc-icon-size: 20px; - color: var(--icon-color); - pointer-events: none; - } - .button:disabled ha-icon { - color: var(--icon-color-disabled); - } - `}};n([zt()],go.prototype,"icon",void 0),n([zt()],go.prototype,"title",void 0),n([zt({type:Boolean})],go.prototype,"disabled",void 0),go=n([Dt("mushroom-button")],go);let _o=class extends Ot{constructor(){super(...arguments),this.fill=!1,this.rtl=!1}render(){return ut` -
- -
- `}static get styles(){return N` - :host { - display: flex; - flex-direction: row; - width: 100%; } - .container { + .picture { width: 100%; - display: flex; - flex-direction: row; - justify-content: flex-end; - } - .container ::slotted(*:not(:last-child)) { - margin-right: var(--spacing); - } - :host([rtl]) .container ::slotted(*:not(:last-child)) { - margin-right: initial; - margin-left: var(--spacing); + height: 100%; + border-radius: var(--icon-border-radius); } - .container.fill > ::slotted(*) { - flex: 1; + `}};n([st()],tl.prototype,"picture_url",void 0),tl=n([at("mushroom-shape-avatar")],tl);const el=d` + --spacing: var(--mush-spacing, 12px); + + /* Title */ + --title-padding: var(--mush-title-padding, 24px 12px 16px); + --title-spacing: var(--mush-title-spacing, 12px); + --title-font-size: var(--mush-title-font-size, 24px); + --title-font-weight: var(--mush-title-font-weight, normal); + --title-line-height: var(--mush-title-line-height, 1.2); + --subtitle-font-size: var(--mush-subtitle-font-size, 16px); + --subtitle-font-weight: var(--mush-subtitle-font-weight, normal); + --subtitle-line-height: var(--mush-subtitle-line-height, 1.2); + + /* Card */ + --card-primary-font-size: var(--mush-card-primary-font-size, 14px); + --card-secondary-font-size: var(--mush-card-secondary-font-size, 12px); + --card-primary-font-weight: var(--mush-card-primary-font-weight, bold); + --card-secondary-font-weight: var(--mush-card-secondary-font-weight, bolder); + --card-primary-line-height: var(--mush-card-primary-line-height, 1.5); + --card-secondary-line-height: var(--mush-card-secondary-line-height, 1.5); + + /* Chips */ + --chip-spacing: var(--mush-chip-spacing, 8px); + --chip-padding: var(--mush-chip-padding, 0 0.25em); + --chip-height: var(--mush-chip-height, 36px); + --chip-border-radius: var(--mush-chip-border-radius, 19px); + --chip-border-width: var(--mush-chip-border-width, var(--ha-card-border-width, 1px)); + --chip-border-color: var( + --mush-chip-border-color, + var(--ha-card-border-color, var(--divider-color)) + ); + --chip-box-shadow: var(--mush-chip-box-shadow, var(--ha-card-box-shadow, "none")); + --chip-font-size: var(--mush-chip-font-size, 0.3em); + --chip-font-weight: var(--mush-chip-font-weight, bold); + --chip-icon-size: var(--mush-chip-icon-size, 0.5em); + --chip-avatar-padding: var(--mush-chip-avatar-padding, 0.1em); + --chip-avatar-border-radius: var(--mush-chip-avatar-border-radius, 50%); + --chip-background: var( + --mush-chip-background, + var(--ha-card-background, var(--card-background-color, white)) + ); + /* Controls */ + --control-border-radius: var(--mush-control-border-radius, 12px); + --control-height: var(--mush-control-height, 42px); + --control-button-ratio: var(--mush-control-button-ratio, 1); + --control-icon-size: var(--mush-control-icon-size, 0.5em); + + /* Slider */ + --slider-threshold: var(--mush-slider-threshold); + + /* Input Number */ + --input-number-debounce: var(--mush-input-number-debounce); + + /* Layout */ + --layout-align: var(--mush-layout-align, center); + + /* Badge */ + --badge-size: var(--mush-badge-size, 16px); + --badge-icon-size: var(--mush-badge-icon-size, 0.75em); + --badge-border-radius: var(--mush-badge-border-radius, 50%); + + /* Icon */ + --icon-border-radius: var(--mush-icon-border-radius, 50%); + --icon-size: var(--mush-icon-size, 42px); + --icon-symbol-size: var(--mush-icon-symbol-size, 0.5em); +`,il=d` + /* RGB */ + /* Standard colors */ + --rgb-red: var(--mush-rgb-red, var(--default-red)); + --rgb-pink: var(--mush-rgb-pink, var(--default-pink)); + --rgb-purple: var(--mush-rgb-purple, var(--default-purple)); + --rgb-deep-purple: var(--mush-rgb-deep-purple, var(--default-deep-purple)); + --rgb-indigo: var(--mush-rgb-indigo, var(--default-indigo)); + --rgb-blue: var(--mush-rgb-blue, var(--default-blue)); + --rgb-light-blue: var(--mush-rgb-light-blue, var(--default-light-blue)); + --rgb-cyan: var(--mush-rgb-cyan, var(--default-cyan)); + --rgb-teal: var(--mush-rgb-teal, var(--default-teal)); + --rgb-green: var(--mush-rgb-green, var(--default-green)); + --rgb-light-green: var(--mush-rgb-light-green, var(--default-light-green)); + --rgb-lime: var(--mush-rgb-lime, var(--default-lime)); + --rgb-yellow: var(--mush-rgb-yellow, var(--default-yellow)); + --rgb-amber: var(--mush-rgb-amber, var(--default-amber)); + --rgb-orange: var(--mush-rgb-orange, var(--default-orange)); + --rgb-deep-orange: var(--mush-rgb-deep-orange, var(--default-deep-orange)); + --rgb-brown: var(--mush-rgb-brown, var(--default-brown)); + --rgb-grey: var(--mush-rgb-grey, var(--default-grey)); + --rgb-blue-grey: var(--mush-rgb-blue-grey, var(--default-blue-grey)); + --rgb-black: var(--mush-rgb-black, var(--default-black)); + --rgb-white: var(--mush-rgb-white, var(--default-white)); + --rgb-disabled: var(--mush-rgb-disabled, var(--default-disabled)); + + /* Action colors */ + --rgb-info: var(--mush-rgb-info, var(--rgb-blue)); + --rgb-success: var(--mush-rgb-success, var(--rgb-green)); + --rgb-warning: var(--mush-rgb-warning, var(--rgb-orange)); + --rgb-danger: var(--mush-rgb-danger, var(--rgb-red)); + + /* State colors */ + --rgb-state-vacuum: var(--mush-rgb-state-vacuum, var(--rgb-teal)); + --rgb-state-fan: var(--mush-rgb-state-fan, var(--rgb-green)); + --rgb-state-light: var(--mush-rgb-state-light, var(--rgb-orange)); + --rgb-state-entity: var(--mush-rgb-state-entity, var(--rgb-blue)); + --rgb-state-media-player: var(--mush-rgb-state-media-player, var(--rgb-indigo)); + --rgb-state-lock: var(--mush-rgb-state-lock, var(--rgb-blue)); + --rgb-state-humidifier: var(--mush-rgb-state-humidifier, var(--rgb-purple)); + + /* State alarm colors */ + --rgb-state-alarm-disarmed: var(--mush-rgb-state-alarm-disarmed, var(--rgb-info)); + --rgb-state-alarm-armed: var(--mush-rgb-state-alarm-armed, var(--rgb-success)); + --rgb-state-alarm-triggered: var(--mush-rgb-state-alarm-triggered, var(--rgb-danger)); + + /* State person colors */ + --rgb-state-person-home: var(--mush-rgb-state-person-home, var(--rgb-success)); + --rgb-state-person-not-home: var(--mush-rgb-state-person-not-home, var(--rgb-danger)); + --rgb-state-person-zone: var(--mush-rgb-state-person-zone, var(--rgb-info)); + --rgb-state-person-unknown: var(--mush-rgb-state-person-unknown, var(--rgb-grey)); + + /* State update colors */ + --rgb-state-update-on: var(--mush-rgb-state-update-on, var(--rgb-orange)); + --rgb-state-update-off: var(--mush-rgb-update-off, var(--rgb-green)); + --rgb-state-update-installing: var(--mush-rgb-update-installing, var(--rgb-blue)); + + /* State lock colors */ + --rgb-state-lock-locked: var(--mush-rgb-state-lock-locked, var(--rgb-green)); + --rgb-state-lock-unlocked: var(--mush-rgb-state-lock-unlocked, var(--rgb-red)); + --rgb-state-lock-pending: var(--mush-rgb-state-lock-pending, var(--rgb-orange)); + + /* State cover colors */ + --rgb-state-cover-open: var(--mush-rgb-state-cover-open, var(--rgb-blue)); + --rgb-state-cover-closed: var(--mush-rgb-state-cover-closed, var(--rgb-disabled)); + + /* State climate colors */ + --rgb-state-climate-auto: var(--mush-rgb-state-climate-auto, var(--rgb-green)); + --rgb-state-climate-cool: var(--mush-rgb-state-climate-cool, var(--rgb-blue)); + --rgb-state-climate-dry: var(--mush-rgb-state-climate-dry, var(--rgb-orange)); + --rgb-state-climate-fan-only: var(--mush-rgb-state-climate-fan-only, var(--rgb-teal)); + --rgb-state-climate-heat: var(--mush-rgb-state-climate-heat, var(--rgb-deep-orange)); + --rgb-state-climate-heat-cool: var(--mush-rgb-state-climate-heat-cool, var(--rgb-green)); + --rgb-state-climate-idle: var(--mush-rgb-state-climate-idle, var(--rgb-disabled)); + --rgb-state-climate-off: var(--mush-rgb-state-climate-off, var(--rgb-disabled)); +`;function nl(t){return!!t&&t.themes.darkMode}class ol extends ot{updated(t){if(super.updated(t),t.has("hass")&&this.hass){const e=nl(t.get("hass")),i=nl(this.hass);e!==i&&this.toggleAttribute("dark-mode",i)}}static get styles(){return d` + :host { + ${wa} + } + :host([dark-mode]) { + ${ka} } - `}};n([zt()],_o.prototype,"fill",void 0),n([zt()],_o.prototype,"rtl",void 0),_o=n([Dt("mushroom-button-group")],_o);const bo=N` - :host { - ${di} - --spacing: var(--mush-spacing, 12px); - /* Title */ - --title-padding: var(--mush-title-padding, 24px 12px 16px); - --title-spacing: var(--mush-title-spacing, 12px); - --title-font-size: var(--mush-title-font-size, 24px); - --title-font-weight: var(--mush-title-font-weight, normal); - --title-line-height: var(--mush-title-line-height, 1.2); - --subtitle-font-size: var(--mush-subtitle-font-size, 16px); - --subtitle-font-weight: var(--mush-subtitle-font-weight, normal); - --subtitle-line-height: var(--mush-subtitle-line-height, 1.2); - /* Card */ - --icon-border-radius: var(--mush-icon-border-radius, 50%); - --control-border-radius: var(--mush-control-border-radius, 12px); - --card-primary-font-size: var(--mush-card-primary-font-size, 14px); - --card-secondary-font-size: var(--mush-card-secondary-font-size, 12px); - --card-primary-font-weight: var(--mush-card-primary-font-weight, bold); - --card-secondary-font-weight: var(--mush-card-secondary-font-weight, bolder); - /* Chips */ - --chip-spacing: var(--mush-chip-spacing, 8px); - --chip-padding: var(--mush-chip-padding, 0 10px); - --chip-height: var(--mush-chip-height, 36px); - --chip-border-radius: var(--mush-chip-border-radius, 18px); - --chip-font-size: var(--mush-chip-font-size, 1em); - --chip-font-weight: var(--mush-chip-font-weight, bold); - --chip-icon-size: var(--mush-chip-icon-size, 1.5em); - --chip-avatar-padding: var(--mush-chip-avatar-padding, 0.3em); - --chip-avatar-border-radius: var(--mush-chip-avatar-border-radius, 50%); - /* Slider */ - --slider-threshold: var(--mush-slider-threshold); + :host { + ${il} + ${el} + } + `}}n([st({attribute:!1})],ol.prototype,"hass",void 0);class rl extends ol{renderPicture(t){return N` + + `}renderIcon(t,e){const i=Lt(t);return N` + + `}renderBadge(t){return!Dt(t)?N` + + `:null}renderStateInfo(t,e,i,n){const o=Ht(this.hass.localize,t,this.hass.locale),r=null!=n?n:o,a=Ia(e.primary_info,i,r,t,this.hass),l=Ia(e.secondary_info,i,r,t,this.hass);return N` + + `}}const al=d` + ha-card { + box-sizing: border-box; + padding: var(--spacing); + display: flex; + flex-direction: column; + justify-content: var(--layout-align); + height: auto; + } + ha-card.fill-container { + height: 100%; } .actions { display: flex; flex-direction: row; align-items: flex-start; - justify-content: flex-end; - overflow-y: auto; + justify-content: flex-start; + overflow-x: auto; + overflow-y: hidden; + scrollbar-width: none; /* Firefox */ + -ms-overflow-style: none; /* IE 10+ */ + } + .actions::-webkit-scrollbar { + background: transparent; /* Chrome/Safari/Webkit */ + height: 0px; } .actions *:not(:last-child) { margin-right: var(--spacing); @@ -995,78 +1338,65 @@ const Ln=N`.mdc-floating-label{-moz-osx-font-smoothing:grayscale;-webkit-font-sm .unavailable { --main-color: var(--warning-color); } -`;function vo(t){const e=window;e.customCards=e.customCards||[],e.customCards.push(Object.assign(Object.assign({},t),{preview:!0}))}const yo=(t,e)=>{if(t===e)return!0;if(t&&e&&"object"==typeof t&&"object"==typeof e){if(t.constructor!==e.constructor)return!1;let i,n;if(Array.isArray(t)){if(n=t.length,n!==e.length)return!1;for(i=n;0!=i--;)if(!yo(t[i],e[i]))return!1;return!0}if(t instanceof Map&&e instanceof Map){if(t.size!==e.size)return!1;for(i of t.entries())if(!e.has(i[0]))return!1;for(i of t.entries())if(!yo(i[1],e.get(i[0])))return!1;return!0}if(t instanceof Set&&e instanceof Set){if(t.size!==e.size)return!1;for(i of t.entries())if(!e.has(i[0]))return!1;return!0}if(ArrayBuffer.isView(t)&&ArrayBuffer.isView(e)){if(n=t.length,n!==e.length)return!1;for(i=n;0!=i--;)if(t[i]!==e[i])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 o=Object.keys(t);if(n=o.length,n!==Object.keys(e).length)return!1;for(i=n;0!=i--;)if(!Object.prototype.hasOwnProperty.call(e,o[i]))return!1;for(i=n;0!=i--;){const n=o[i];if(!yo(t[n],e[n]))return!1}return!0}return t!=t&&e!=e},xo=(t,e)=>{const i=(()=>{const t=document.body;if(t.querySelector("action-handler"))return t.querySelector("action-handler");const e=document.createElement("action-handler");return t.appendChild(e),e})();i&&i.bind(t,e)},wo=qt(class extends Wt{update(t,[e]){return xo(t.element,e),mt}render(t){}}),Co={apparent_power:"mdi:flash",aqi:"mdi:air-filter",carbon_dioxide:"mdi:molecule-co2",carbon_monoxide:"mdi:molecule-co",current:"mdi:current-ac",date:"mdi:calendar",energy:"mdi:lightning-bolt",frequency:"mdi:sine-wave",gas:"mdi:gas-cylinder",humidity:"mdi:water-percent",illuminance:"mdi:brightness-5",monetary:"mdi:cash",nitrogen_dioxide:"mdi:molecule",nitrogen_monoxide:"mdi:molecule",nitrous_oxide:"mdi:molecule",ozone:"mdi:molecule",pm1:"mdi:molecule",pm10:"mdi:molecule",pm25:"mdi:molecule",power:"mdi:flash",power_factor:"mdi:angle-acute",pressure:"mdi:gauge",reactive_power:"mdi:flash",signal_strength:"mdi:wifi",sulphur_dioxide:"mdi:molecule",temperature:"mdi:thermometer",timestamp:"mdi:clock",volatile_organic_compounds:"mdi:molecule",voltage:"mdi:sine-wave"},ko={10:"mdi:battery-10",20:"mdi:battery-20",30:"mdi:battery-30",40:"mdi:battery-40",50:"mdi:battery-50",60:"mdi:battery-60",70:"mdi:battery-70",80:"mdi:battery-80",90:"mdi:battery-90",100:"mdi:battery"},$o={10:"mdi:battery-charging-10",20:"mdi:battery-charging-20",30:"mdi:battery-charging-30",40:"mdi:battery-charging-40",50:"mdi:battery-charging-50",60:"mdi:battery-charging-60",70:"mdi:battery-charging-70",80:"mdi:battery-charging-80",90:"mdi:battery-charging-90",100:"mdi:battery-charging"},Eo=(t,e)=>{const i=Number(t);if(isNaN(i))return"off"===t?"mdi:battery":"on"===t?"mdi:battery-alert":"mdi:battery-unknown";const n=10*Math.round(i/10);return e&&i>=10?$o[n]:e?"mdi:battery-charging-outline":i<=5?"mdi:battery-alert-variant-outline":ko[n]},Ao=t=>{const e=null==t?void 0:t.attributes.device_class;if(e&&e in Co)return Co[e];if("battery"===e)return t?((t,e)=>{const i=t.state,n="on"===(null==e?void 0:e.state);return Eo(i,n)})(t):"mdi:battery";const i=null==t?void 0:t.attributes.unit_of_measurement;return"°C"===i||"°F"===i?"mdi:thermometer":void 0},So={alert:"mdi:alert",air_quality:"mdi:air-filter",automation:"mdi:robot",calendar:"mdi:calendar",camera:"mdi:video",climate:"mdi:thermostat",configurator:"mdi:cog",conversation:"mdi:text-to-speech",counter:"mdi:counter",fan:"mdi:fan",google_assistant:"mdi:google-assistant",group:"mdi:google-circles-communities",homeassistant:"mdi:home-assistant",homekit:"mdi:home-automation",image_processing:"mdi:image-filter-frames",input_button:"mdi:gesture-tap-button",input_datetime:"mdi:calendar-clock",input_number:"mdi:ray-vertex",input_select:"mdi:format-list-bulleted",input_text:"mdi:form-textbox",light:"mdi:lightbulb",mailbox:"mdi:mailbox",notify:"mdi:comment-alert",number:"mdi:ray-vertex",persistent_notification:"mdi:bell",person:"mdi:account",plant:"mdi:flower",proximity:"mdi:apple-safari",remote:"mdi:remote",scene:"mdi:palette",script:"mdi:script-text",select:"mdi:format-list-bulleted",sensor:"mdi:eye",siren:"mdi:bullhorn",simple_alarm:"mdi:bell",sun:"mdi:white-balance-sunny",timer:"mdi:timer-outline",updater:"mdi:cloud-upload",vacuum:"mdi:robot-vacuum",water_heater:"mdi:thermometer",weather:"mdi:weather-cloudy",zone:"mdi:map-marker-radius"};function Io(t){if(t.attributes.icon)return t.attributes.icon;return function(t,e,i){switch(t){case"alarm_control_panel":return(t=>{switch(t){case"armed_away":return"mdi:shield-lock";case"armed_vacation":return"mdi:shield-airplane";case"armed_home":return"mdi:shield-home";case"armed_night":return"mdi:shield-moon";case"armed_custom_bypass":return"mdi:security";case"pending":case"arming":return"mdi:shield-sync";case"triggered":return"mdi:bell-ring";case"disarmed":return"mdi:shield-off";default:return"mdi:shield"}})(i);case"binary_sensor":return((t,e)=>{const i="off"===t;switch(null==e?void 0:e.attributes.device_class){case"battery":return i?"mdi:battery":"mdi:battery-outline";case"battery_charging":return i?"mdi:battery":"mdi:battery-charging";case"cold":return i?"mdi:thermometer":"mdi:snowflake";case"connectivity":return i?"mdi:close-network-outline":"mdi:check-network-outline";case"door":return i?"mdi:door-closed":"mdi:door-open";case"garage_door":return i?"mdi:garage":"mdi:garage-open";case"power":case"plug":return i?"mdi:power-plug-off":"mdi:power-plug";case"gas":case"problem":case"safety":case"tamper":return i?"mdi:check-circle":"mdi:alert-circle";case"smoke":return i?"mdi:check-circle":"mdi:smoke";case"heat":return i?"mdi:thermometer":"mdi:fire";case"light":return i?"mdi:brightness5":"mdi:brightness-7";case"lock":return i?"mdi:lock":"mdi:lock-open";case"moisture":return i?"mdi:water-off":"mdi:water";case"motion":return i?"mdi:motion-sensor-off":"mdi:motion-sensor";case"occupancy":case"presence":return i?"mdi:home-outline":"mdi:home";case"opening":return i?"mdi:square":"mdi:square-outline";case"running":return i?"mdi:stop":"mdi:play";case"sound":return i?"mdi:music-note-off":"mdi:music-note";case"update":return i?"mdi:package":"mdi:package-up";case"vibration":return i?"mdi:crop-portrait":"mdi:vibrate";case"window":return i?"mdi:window-closed":"mdi:window-open";default:return i?"mdi:radiobox-blank":"mdi:checkbox-marked-circle"}})(i,e);case"button":switch(null==e?void 0:e.attributes.device_class){case"restart":return"mdi:restart";case"update":return"mdi:package-up";default:return"mdi:gesture-tap-button"}case"cover":return((t,e)=>{const i="closed"!==t;switch(null==e?void 0:e.attributes.device_class){case"garage":switch(t){case"opening":return"mdi:arrow-up-box";case"closing":return"mdi:arrow-down-box";case"closed":return"mdi:garage";default:return"mdi:garage-open"}case"gate":switch(t){case"opening":case"closing":return"mdi:gate-arrow-right";case"closed":return"mdi:gate";default:return"mdi:gate-open"}case"door":return i?"mdi:door-open":"mdi:door-closed";case"damper":return i?"md:circle":"mdi:circle-slice-8";case"shutter":switch(t){case"opening":return"mdi:arrow-up-box";case"closing":return"mdi:arrow-down-box";case"closed":return"mdi:window-shutter";default:return"mdi:window-shutter-open"}case"curtain":switch(t){case"opening":return"mdi:arrow-split-vertical";case"closing":return"mdi:arrow-collapse-horizontal";case"closed":return"mdi:curtains-closed";default:return"mdi:curtains"}case"blind":case"shade":switch(t){case"opening":return"mdi:arrow-up-box";case"closing":return"mdi:arrow-down-box";case"closed":return"mdi:blinds";default:return"mdi:blinds-open"}case"window":switch(t){case"opening":return"mdi:arrow-up-box";case"closing":return"mdi:arrow-down-box";case"closed":return"mdi:window-closed";default:return"mdi:window-open"}}switch(t){case"opening":return"mdi:arrow-up-box";case"closing":return"mdi:arrow-down-box";case"closed":return"mdi:window-closed";default:return"mdi:window-open"}})(i,e);case"device_tracker":return"router"===(null==e?void 0:e.attributes.source_type)?"home"===i?"mdi:lan-connect":"mdi:lan-disconnect":["bluetooth","bluetooth_le"].includes(null==e?void 0:e.attributes.source_type)?"home"===i?"mdi:bluetooth-connect":"mdi:bluetooth":"not_home"===i?"mdi:account-arrow-right":"mdi:account";case"humidifier":return i&&"off"===i?"mdi:air-humidifier-off":"mdi:air-humidifier";case"input_boolean":return"on"===i?"mdi:check-circle-outline":"mdi:close-circle-outline";case"lock":switch(i){case"unlocked":return"mdi:lock-open";case"jammed":return"mdi:lock-alert";case"locking":case"unlocking":return"mdi:lock-clock";default:return"mdi:lock"}case"media_player":return"playing"===i?"mdi:cast-connected":"mdi:cast";case"switch":switch(null==e?void 0:e.attributes.device_class){case"outlet":return"on"===i?"mdi:power-plug":"mdi:power-plug-off";case"switch":return"on"===i?"mdi:toggle-switch":"mdi:toggle-switch-off";default:return"mdi:flash"}case"zwave":switch(i){case"dead":return"mdi:emoticon-dead";case"sleeping":return"mdi:sleep";case"initializing":return"mdi:timer-sand";default:return"mdi:z-wave"}case"sensor":{const t=Ao(e);if(t)return t;break}case"input_datetime":if(!(null==e?void 0:e.attributes.has_date))return"mdi:clock";if(!e.attributes.has_time)return"mdi:calendar";break;case"sun":return"above_horizon"===(null==e?void 0:e.state)?So[t]:"mdi:weather-night";case"update":return"on"===(null==e?void 0:e.state)?ro(e)?"mdi:package-down":"mdi:package-up":"mdi:package"}return t in So?So[t]:(console.warn(`Unable to find icon for domain ${t}`),"mdi:bookmark")}(f(t.entity_id),t,t.state)}class To extends TypeError{constructor(t,e){let i;const{message:n,...o}=t,{path:r}=t;super(0===r.length?n:"At path: "+r.join(".")+" -- "+n),this.value=void 0,this.key=void 0,this.type=void 0,this.refinement=void 0,this.path=void 0,this.branch=void 0,this.failures=void 0,Object.assign(this,o),this.name=this.constructor.name,this.failures=()=>{var n;return null!=(n=i)?n:i=[t,...e()]}}}function Oo(t){return"object"==typeof t&&null!=t}function Mo(t){return"string"==typeof t?JSON.stringify(t):""+t}function Do(t,e,i,n){if(!0===t)return;!1===t?t={}:"string"==typeof t&&(t={message:t});const{path:o,branch:r}=e,{type:a}=i,{refinement:s,message:l="Expected a value of type `"+a+"`"+(s?" with refinement `"+s+"`":"")+", but received: `"+Mo(n)+"`"}=t;return{value:n,type:a,refinement:s,key:o[o.length-1],path:o,branch:r,...t,message:l}}function*Lo(t,e,i,n){(function(t){return Oo(t)&&"function"==typeof t[Symbol.iterator]})(t)||(t=[t]);for(const o of t){const t=Do(o,e,i,n);t&&(yield t)}}function*zo(t,e,i={}){const{path:n=[],branch:o=[t],coerce:r=!1,mask:a=!1}=i,s={path:n,branch:o};if(r&&(t=e.coercer(t,s),a&&"type"!==e.type&&Oo(e.schema)&&Oo(t)&&!Array.isArray(t)))for(const i in t)void 0===e.schema[i]&&delete t[i];let l=!0;for(const i of e.validator(t,s))l=!1,yield[i,void 0];for(let[i,c,d]of e.entries(t,s)){const e=zo(c,d,{path:void 0===i?n:[...n,i],branch:void 0===i?o:[...o,c],coerce:r,mask:a});for(const n of e)n[0]?(l=!1,yield[n[0],void 0]):r&&(c=n[1],void 0===i?t=c:t instanceof Map?t.set(i,c):t instanceof Set?t.add(c):Oo(t)&&(t[i]=c))}if(l)for(const i of e.refiner(t,s))l=!1,yield[i,void 0];l&&(yield[void 0,t])}class jo{constructor(t){this.TYPE=void 0,this.type=void 0,this.schema=void 0,this.coercer=void 0,this.validator=void 0,this.refiner=void 0,this.entries=void 0;const{type:e,schema:i,validator:n,refiner:o,coercer:r=(t=>t),entries:a=function*(){}}=t;this.type=e,this.schema=i,this.entries=a,this.coercer=r,this.validator=n?(t,e)=>Lo(n(t,e),e,this,t):()=>[],this.refiner=o?(t,e)=>Lo(o(t,e),e,this,t):()=>[]}assert(t){return No(t,this)}create(t){return function(t,e){const i=Ro(t,e,{coerce:!0});if(i[0])throw i[0];return i[1]}(t,this)}is(t){return function(t,e){return!Ro(t,e)[0]}(t,this)}mask(t){return function(t,e){const i=Ro(t,e,{coerce:!0,mask:!0});if(i[0])throw i[0];return i[1]}(t,this)}validate(t,e={}){return Ro(t,this,e)}}function No(t,e){const i=Ro(t,e);if(i[0])throw i[0]}function Ro(t,e,i={}){const n=zo(t,e,i),o=function(t){const{done:e,value:i}=t.next();return e?void 0:i}(n);if(o[0]){const t=new To(o[0],(function*(){for(const t of n)t[0]&&(yield t[0])}));return[t,void 0]}return[void 0,o[1]]}function Po(...t){const e="type"===t[0].type,i=t.map((t=>t.schema)),n=Object.assign({},...i);return e?Go(n):Xo(n)}function Fo(t,e){return new jo({type:t,schema:null,validator:e})}function Vo(){return Fo("any",(()=>!0))}function Bo(t){return new jo({type:"array",schema:t,*entries(e){if(t&&Array.isArray(e))for(const[i,n]of e.entries())yield[i,n,t]},coercer:t=>Array.isArray(t)?t.slice():t,validator:t=>Array.isArray(t)||"Expected an array value, but received: "+Mo(t)})}function Uo(){return Fo("boolean",(t=>"boolean"==typeof t))}function Ho(t){const e={},i=t.map((t=>Mo(t))).join();for(const i of t)e[i]=i;return new jo({type:"enums",schema:e,validator:e=>t.includes(e)||"Expected one of `"+i+"`, but received: "+Mo(e)})}function Yo(t){const e=Mo(t),i=typeof t;return new jo({type:"literal",schema:"string"===i||"number"===i||"boolean"===i?t:null,validator:i=>i===t||"Expected the literal `"+e+"`, but received: "+Mo(i)})}function Xo(t){const e=t?Object.keys(t):[],i=Fo("never",(()=>!1));return new jo({type:"object",schema:t||null,*entries(n){if(t&&Oo(n)){const o=new Set(Object.keys(n));for(const i of e)o.delete(i),yield[i,n[i],t[i]];for(const t of o)yield[t,n[t],i]}},validator:t=>Oo(t)||"Expected an object, but received: "+Mo(t),coercer:t=>Oo(t)?{...t}:t})}function qo(t){return new jo({...t,validator:(e,i)=>void 0===e||t.validator(e,i),refiner:(e,i)=>void 0===e||t.refiner(e,i)})}function Wo(){return Fo("string",(t=>"string"==typeof t||"Expected a string, but received: "+Mo(t)))}function Go(t){const e=Object.keys(t);return new jo({type:"type",schema:t,*entries(i){if(Oo(i))for(const n of e)yield[n,i[n],t[n]]},validator:t=>Oo(t)||"Expected an object, but received: "+Mo(t)})}function Ko(t){const e=t.map((t=>t.type)).join(" | ");return new jo({type:"union",schema:null,coercer(e,i){const n=t.find((t=>{const[i]=t.validate(e,{coerce:!0});return!i}))||Fo("unknown",(()=>!0));return n.coercer(e,i)},validator(i,n){const o=[];for(const e of t){const[...t]=zo(i,e,n),[r]=t;if(!r[0])return[];for(const[e]of t)e&&o.push(e)}return["Expected the value to satisfy a union of `"+e+"`, but received: "+Mo(i),...o]}})}const Zo=Ko([Yo("horizontal"),Yo("vertical"),Yo("default")]);function Jo(t){var e;return null!==(e=t.layout)&&void 0!==e?e:Boolean(t.vertical)?"vertical":"default"}const Qo=["alarm_control_panel"],tr={disarmed:"var(--rgb-state-alarm-disarmed)",armed:"var(--rgb-state-alarm-armed)",triggered:"var(--rgb-state-alarm-triggered)",unavailable:"var(--rgb-warning)"},er={disarmed:"alarm_disarm",armed_away:"alarm_arm_away",armed_home:"alarm_arm_home",armed_night:"alarm_arm_night",armed_vacation:"alarm_arm_vacation",armed_custom_bypass:"alarm_arm_custom_bypass"};function ir(t){var e;return null!==(e=tr[t.split("_")[0]])&&void 0!==e?e:"var(--rgb-grey)"}function nr(t){return["arming","triggered","pending",Pn].indexOf(t)>=0}function or(t){return t.attributes.code_format&&"no_code"!==t.attributes.code_format}vo({type:"mushroom-alarm-control-panel-card",name:"Mushroom Alarm Control Panel Card",description:"Card for alarm control panel"});const rr=["1","2","3","4","5","6","7","8","9","","0","clear"];let ar=class extends Ot{static async getConfigElement(){return await Promise.resolve().then((function(){return os})),document.createElement("mushroom-alarm-control-panel-card-editor")}static async getStubConfig(t){const e=Object.keys(t.states).filter((t=>Qo.includes(t.split(".")[0])));return{type:"custom:mushroom-alarm-control-panel-card",entity:e[0],states:["armed_home","armed_away"]}}getCardSize(){return 1}setConfig(t){this._config=Object.assign({tap_action:{action:"more-info"},hold_action:{action:"more-info"},double_tap_action:{action:"more-info"}},t),this.loadComponents()}updated(t){super.updated(t),this.hass&&t.has("hass")&&this.loadComponents()}async loadComponents(){if(!this._config||!this.hass||!this._config.entity)return;const t=this._config.entity;or(this.hass.states[t])&&Promise.resolve().then((function(){return xs}))}_onTap(t,e){var i,n;const o=function(t){return er[t]}(e);if(!o)return;t.stopPropagation();const r=(null===(i=this._input)||void 0===i?void 0:i.value)||void 0;this.hass.callService("alarm_control_panel",o,{entity_id:null===(n=this._config)||void 0===n?void 0:n.entity,code:r}),this._input&&(this._input.value="")}_handlePadClick(t){const e=t.currentTarget.value;this._input&&(this._input.value="clear"===e?"":this._input.value+e)}_handleAction(t){S(this,this.hass,this._config,t.detail.action)}get _hasCode(){var t,e,i;const n=null===(t=this._config)||void 0===t?void 0:t.entity;if(n){return or(this.hass.states[n])&&null!==(i=null===(e=this._config)||void 0===e?void 0:e.show_keypad)&&void 0!==i&&i}return!1}render(){if(!this.hass||!this._config||!this._config.entity)return ut``;const t=this._config.entity,e=this.hass.states[t],i=this._config.name||e.attributes.friendly_name,n=this._config.icon||Io(e),o=ir(e.state),r=nr(e.state),a=Jo(this._config),s=this._config.hide_state,l=this._config.states&&this._config.states.length>0?function(t){return"disarmed"===t.state}(e)?this._config.states.map((t=>({state:t}))):[{state:"disarmed"}]:[],c=function(t){return Pn!==t.state}(e),d=ao(this.hass.localize,e,this.hass.locale),u={"--icon-color":`rgb(${o})`,"--shape-color":`rgba(${o}, 0.2)`},h=g(this.hass);return ut` - - +`;function ll(t){const e=window;e.customCards=e.customCards||[],e.customCards.push(Object.assign(Object.assign({},t),{preview:!0}))}const sl={apparent_power:"mdi:flash",aqi:"mdi:air-filter",carbon_dioxide:"mdi:molecule-co2",carbon_monoxide:"mdi:molecule-co",current:"mdi:current-ac",date:"mdi:calendar",energy:"mdi:lightning-bolt",frequency:"mdi:sine-wave",gas:"mdi:gas-cylinder",humidity:"mdi:water-percent",illuminance:"mdi:brightness-5",monetary:"mdi:cash",nitrogen_dioxide:"mdi:molecule",nitrogen_monoxide:"mdi:molecule",nitrous_oxide:"mdi:molecule",ozone:"mdi:molecule",pm1:"mdi:molecule",pm10:"mdi:molecule",pm25:"mdi:molecule",power:"mdi:flash",power_factor:"mdi:angle-acute",pressure:"mdi:gauge",reactive_power:"mdi:flash",signal_strength:"mdi:wifi",sulphur_dioxide:"mdi:molecule",temperature:"mdi:thermometer",timestamp:"mdi:clock",volatile_organic_compounds:"mdi:molecule",voltage:"mdi:sine-wave"},cl={10:"mdi:battery-10",20:"mdi:battery-20",30:"mdi:battery-30",40:"mdi:battery-40",50:"mdi:battery-50",60:"mdi:battery-60",70:"mdi:battery-70",80:"mdi:battery-80",90:"mdi:battery-90",100:"mdi:battery"},dl={10:"mdi:battery-charging-10",20:"mdi:battery-charging-20",30:"mdi:battery-charging-30",40:"mdi:battery-charging-40",50:"mdi:battery-charging-50",60:"mdi:battery-charging-60",70:"mdi:battery-charging-70",80:"mdi:battery-charging-80",90:"mdi:battery-charging-90",100:"mdi:battery-charging"},ul=(t,e)=>{const i=Number(t);if(isNaN(i))return"off"===t?"mdi:battery":"on"===t?"mdi:battery-alert":"mdi:battery-unknown";const n=10*Math.round(i/10);return e&&i>=10?dl[n]:e?"mdi:battery-charging-outline":i<=5?"mdi:battery-alert-variant-outline":cl[n]},hl=t=>{const e=null==t?void 0:t.attributes.device_class;if(e&&e in sl)return sl[e];if("battery"===e)return t?((t,e)=>{const i=t.state,n="on"===(null==e?void 0:e.state);return ul(i,n)})(t):"mdi:battery";const i=null==t?void 0:t.attributes.unit_of_measurement;return"°C"===i||"°F"===i?"mdi:thermometer":void 0},ml={alert:"mdi:alert",air_quality:"mdi:air-filter",automation:"mdi:robot",calendar:"mdi:calendar",camera:"mdi:video",climate:"mdi:thermostat",configurator:"mdi:cog",conversation:"mdi:text-to-speech",counter:"mdi:counter",fan:"mdi:fan",google_assistant:"mdi:google-assistant",group:"mdi:google-circles-communities",homeassistant:"mdi:home-assistant",homekit:"mdi:home-automation",image_processing:"mdi:image-filter-frames",input_button:"mdi:gesture-tap-button",input_datetime:"mdi:calendar-clock",input_number:"mdi:ray-vertex",input_select:"mdi:format-list-bulleted",input_text:"mdi:form-textbox",light:"mdi:lightbulb",mailbox:"mdi:mailbox",notify:"mdi:comment-alert",number:"mdi:ray-vertex",persistent_notification:"mdi:bell",person:"mdi:account",plant:"mdi:flower",proximity:"mdi:apple-safari",remote:"mdi:remote",scene:"mdi:palette",script:"mdi:script-text",select:"mdi:format-list-bulleted",sensor:"mdi:eye",siren:"mdi:bullhorn",simple_alarm:"mdi:bell",sun:"mdi:white-balance-sunny",timer:"mdi:timer-outline",updater:"mdi:cloud-upload",vacuum:"mdi:robot-vacuum",water_heater:"mdi:thermometer",zone:"mdi:map-marker-radius"};function pl(t){if(t.attributes.icon)return t.attributes.icon;return function(t,e,i){switch(t){case"alarm_control_panel":return(t=>{switch(t){case"armed_away":return"mdi:shield-lock";case"armed_vacation":return"mdi:shield-airplane";case"armed_home":return"mdi:shield-home";case"armed_night":return"mdi:shield-moon";case"armed_custom_bypass":return"mdi:security";case"pending":case"arming":return"mdi:shield-sync";case"triggered":return"mdi:bell-ring";case"disarmed":return"mdi:shield-off";default:return"mdi:shield"}})(i);case"binary_sensor":return((t,e)=>{const i="off"===t;switch(null==e?void 0:e.attributes.device_class){case"battery":return i?"mdi:battery":"mdi:battery-outline";case"battery_charging":return i?"mdi:battery":"mdi:battery-charging";case"cold":return i?"mdi:thermometer":"mdi:snowflake";case"connectivity":return i?"mdi:close-network-outline":"mdi:check-network-outline";case"door":return i?"mdi:door-closed":"mdi:door-open";case"garage_door":return i?"mdi:garage":"mdi:garage-open";case"power":case"plug":return i?"mdi:power-plug-off":"mdi:power-plug";case"gas":case"problem":case"safety":case"tamper":return i?"mdi:check-circle":"mdi:alert-circle";case"smoke":return i?"mdi:check-circle":"mdi:smoke";case"heat":return i?"mdi:thermometer":"mdi:fire";case"light":return i?"mdi:brightness5":"mdi:brightness-7";case"lock":return i?"mdi:lock":"mdi:lock-open";case"moisture":return i?"mdi:water-off":"mdi:water";case"motion":return i?"mdi:motion-sensor-off":"mdi:motion-sensor";case"occupancy":case"presence":return i?"mdi:home-outline":"mdi:home";case"opening":return i?"mdi:square":"mdi:square-outline";case"running":return i?"mdi:stop":"mdi:play";case"sound":return i?"mdi:music-note-off":"mdi:music-note";case"update":return i?"mdi:package":"mdi:package-up";case"vibration":return i?"mdi:crop-portrait":"mdi:vibrate";case"window":return i?"mdi:window-closed":"mdi:window-open";default:return i?"mdi:radiobox-blank":"mdi:checkbox-marked-circle"}})(i,e);case"button":switch(null==e?void 0:e.attributes.device_class){case"restart":return"mdi:restart";case"update":return"mdi:package-up";default:return"mdi:gesture-tap-button"}case"cover":return((t,e)=>{const i="closed"!==t;switch(null==e?void 0:e.attributes.device_class){case"garage":switch(t){case"opening":return"mdi:arrow-up-box";case"closing":return"mdi:arrow-down-box";case"closed":return"mdi:garage";default:return"mdi:garage-open"}case"gate":switch(t){case"opening":case"closing":return"mdi:gate-arrow-right";case"closed":return"mdi:gate";default:return"mdi:gate-open"}case"door":return i?"mdi:door-open":"mdi:door-closed";case"damper":return i?"md:circle":"mdi:circle-slice-8";case"shutter":switch(t){case"opening":return"mdi:arrow-up-box";case"closing":return"mdi:arrow-down-box";case"closed":return"mdi:window-shutter";default:return"mdi:window-shutter-open"}case"curtain":switch(t){case"opening":return"mdi:arrow-split-vertical";case"closing":return"mdi:arrow-collapse-horizontal";case"closed":return"mdi:curtains-closed";default:return"mdi:curtains"}case"blind":case"shade":switch(t){case"opening":return"mdi:arrow-up-box";case"closing":return"mdi:arrow-down-box";case"closed":return"mdi:blinds";default:return"mdi:blinds-open"}case"window":switch(t){case"opening":return"mdi:arrow-up-box";case"closing":return"mdi:arrow-down-box";case"closed":return"mdi:window-closed";default:return"mdi:window-open"}}switch(t){case"opening":return"mdi:arrow-up-box";case"closing":return"mdi:arrow-down-box";case"closed":return"mdi:window-closed";default:return"mdi:window-open"}})(i,e);case"device_tracker":return"router"===(null==e?void 0:e.attributes.source_type)?"home"===i?"mdi:lan-connect":"mdi:lan-disconnect":["bluetooth","bluetooth_le"].includes(null==e?void 0:e.attributes.source_type)?"home"===i?"mdi:bluetooth-connect":"mdi:bluetooth":"not_home"===i?"mdi:account-arrow-right":"mdi:account";case"humidifier":return i&&"off"===i?"mdi:air-humidifier-off":"mdi:air-humidifier";case"input_boolean":return"on"===i?"mdi:check-circle-outline":"mdi:close-circle-outline";case"lock":switch(i){case"unlocked":return"mdi:lock-open";case"jammed":return"mdi:lock-alert";case"locking":case"unlocking":return"mdi:lock-clock";default:return"mdi:lock"}case"media_player":return"playing"===i?"mdi:cast-connected":"mdi:cast";case"switch":switch(null==e?void 0:e.attributes.device_class){case"outlet":return"on"===i?"mdi:power-plug":"mdi:power-plug-off";case"switch":return"on"===i?"mdi:toggle-switch":"mdi:toggle-switch-off";default:return"mdi:flash"}case"weather":switch(i){case"clear-night":return"mdi:weather-night";case"cloudy":default:return"mdi:weather-cloudy";case"exceptional":return"mdi:alert-circle-outline";case"fog":return"mdi:weather-fog";case"hail":return"mdi:weather-hail";case"lightning":return"mdi:weather-lightning";case"lightning-rainy":return"mdi:weather-lightning-rainy";case"partlycloudy":return"mdi:weather-partly-cloudy";case"pouring":return"mdi:weather-pouring";case"rainy":return"mdi:weather-rainy";case"snowy":return"mdi:weather-snowy";case"snowy-rainy":return"mdi:weather-snowy-rainy";case"sunny":return"mdi:weather-sunny";case"windy":return"mdi:weather-windy";case"windy-variant":return"mdi:weather-windy-variant"}case"zwave":switch(i){case"dead":return"mdi:emoticon-dead";case"sleeping":return"mdi:sleep";case"initializing":return"mdi:timer-sand";default:return"mdi:z-wave"}case"sensor":{const t=hl(e);if(t)return t;break}case"input_datetime":if(!(null==e?void 0:e.attributes.has_date))return"mdi:clock";if(!e.attributes.has_time)return"mdi:calendar";break;case"sun":return"above_horizon"===(null==e?void 0:e.state)?ml[t]:"mdi:weather-night";case"update":return"on"===(null==e?void 0:e.state)?Vt(e)?"mdi:package-down":"mdi:package-up":"mdi:package"}return t in ml?ml[t]:(console.warn(`Unable to find icon for domain ${t}`),"mdi:bookmark")}(It(t.entity_id),t,t.state)}const fl=["alarm_control_panel"],gl={disarmed:"var(--rgb-state-alarm-disarmed)",armed:"var(--rgb-state-alarm-armed)",triggered:"var(--rgb-state-alarm-triggered)",unavailable:"var(--rgb-warning)"},_l={disarmed:"alarm_disarm",armed_away:"alarm_arm_away",armed_home:"alarm_arm_home",armed_night:"alarm_arm_night",armed_vacation:"alarm_arm_vacation",armed_custom_bypass:"alarm_arm_custom_bypass"};function vl(t){var e;return null!==(e=gl[t.split("_")[0]])&&void 0!==e?e:"var(--rgb-grey)"}function bl(t){return["arming","triggered","pending",Tt].indexOf(t)>=0}function yl(t){return t.attributes.code_format&&"no_code"!==t.attributes.code_format}ll({type:"mushroom-alarm-control-panel-card",name:"Mushroom Alarm Control Panel Card",description:"Card for alarm control panel"});const xl=["1","2","3","4","5","6","7","8","9","","0","clear"];let wl=class extends rl{static async getConfigElement(){return await Promise.resolve().then((function(){return Sc})),document.createElement("mushroom-alarm-control-panel-card-editor")}static async getStubConfig(t){const e=Object.keys(t.states).filter((t=>fl.includes(t.split(".")[0])));return{type:"custom:mushroom-alarm-control-panel-card",entity:e[0],states:["armed_home","armed_away"]}}getCardSize(){return 1}setConfig(t){this._config=Object.assign({tap_action:{action:"more-info"},hold_action:{action:"more-info"}},t),this.loadComponents()}updated(t){super.updated(t),this.hass&&t.has("hass")&&this.loadComponents()}async loadComponents(){if(!this._config||!this.hass||!this._config.entity)return;const t=this._config.entity;yl(this.hass.states[t])&&Promise.resolve().then((function(){return Yc}))}_onTap(t,e){var i,n;const o=function(t){return _l[t]}(e);if(!o)return;t.stopPropagation();const r=(null===(i=this._input)||void 0===i?void 0:i.value)||void 0;this.hass.callService("alarm_control_panel",o,{entity_id:null===(n=this._config)||void 0===n?void 0:n.entity,code:r}),this._input&&(this._input.value="")}_handlePadClick(t){const e=t.currentTarget.value;this._input&&(this._input.value="clear"===e?"":this._input.value+e)}_handleAction(t){Oe(this,this.hass,this._config,t.detail.action)}get _hasCode(){var t,e,i;const n=null===(t=this._config)||void 0===t?void 0:t.entity;if(n){return yl(this.hass.states[n])&&null!==(i=null===(e=this._config)||void 0===e?void 0:e.show_keypad)&&void 0!==i&&i}return!1}render(){if(!this.hass||!this._config||!this._config.entity)return N``;const t=this._config.entity,e=this.hass.states[t],i=this._config.name||e.attributes.friendly_name||"",n=this._config.icon||pl(e),o=Ka(this._config),r=Ta(e,o.icon_type),a=this._config.states&&this._config.states.length>0?function(t){return"disarmed"===t.state}(e)?this._config.states.map((t=>({state:t}))):[{state:"disarmed"}]:[],l=function(t){return Tt!==t.state}(e),s=pe(this.hass);return N` + + - - ${Un(e)?null:ut` - - `} - + ${r?this.renderPicture(r):this.renderIcon(e,n)} + ${this.renderBadge(e)} + ${this.renderStateInfo(e,o,i)}; - ${l.length>0?ut` - - ${l.map((t=>ut` + ${a.length>0?N` + + ${a.map((t=>N` {switch(t){case"armed_away":return"mdi:shield-lock-outline";case"armed_vacation":return"mdi:shield-airplane-outline";case"armed_home":return"mdi:shield-home-outline";case"armed_night":return"mdi:shield-moon-outline";case"armed_custom_bypass":return"mdi:shield-half-full";case"disarmed":return"mdi:shield-off-outline";default:return"mdi:shield-outline"}})(t.state)} @click=${e=>this._onTap(e,t.state)} - .disabled=${!c} + .disabled=${!l} > `))} `:null} - ${this._hasCode?ut` + ${this._hasCode?N` - `:ut``} - ${this._hasCode&&"number"===e.attributes.code_format?ut` + `:N``} + ${this._hasCode&&"number"===e.attributes.code_format?N`
- ${rr.map((t=>""===t?ut``:ut` + ${xl.map((t=>""===t?N``:N` ${"clear"===t?this.hass.localize("ui.card.alarm_control_panel.clear_code"):t} `))}
- `:ut``} + `:N``}
- `}static get styles(){return[bo,N` - ha-card { - height: 100%; - box-sizing: border-box; - padding: var(--spacing); - display: flex; - flex-direction: column; - justify-content: center; - } + `}renderIcon(t,e){const i=vl(t.state),n=bl(t.state);return N` + + `}static get styles(){return[super.styles,al,d` mushroom-state-item { cursor: pointer; } @@ -1095,26 +1425,35 @@ const Ln=N`.mdc-floating-label{-moz-osx-font-smoothing:grayscale;-webkit-font-sm width: 30%; box-sizing: border-box; } - `]}};n([zt({attribute:!1})],ar.prototype,"hass",void 0),n([jt()],ar.prototype,"_config",void 0),n([Pt("#alarmCode")],ar.prototype,"_input",void 0),ar=n([Dt("mushroom-alarm-control-panel-card")],ar);let sr=class extends Ot{constructor(){super(...arguments),this.icon="",this.label="",this.avatar=""}render(){return ut` - - ${this.avatar?ut` `:null} -
- -
+ `]}};n([ct()],wl.prototype,"_config",void 0),n([ht("#alarmCode")],wl.prototype,"_input",void 0),wl=n([at("mushroom-alarm-control-panel-card")],wl);let kl=class extends ot{constructor(){super(...arguments),this.icon="",this.label="",this.avatar="",this.avatarOnly=!1}render(){return N` + + ${this.avatar?N` `:null} + ${this.avatarOnly?null:N` +
+ +
+ `}
- `}static get styles(){return N` + `}static get styles(){return d` :host { --icon-color: var(--primary-text-color); --text-color: var(--primary-text-color); } - .chip { + ha-card { box-sizing: border-box; height: var(--chip-height); + min-width: var(--chip-height); + font-size: var(--chip-height); width: auto; border-radius: var(--chip-border-radius); display: flex; flex-direction: row; align-items: center; + background: var(--chip-background); + border-width: var(--chip-border-width); + border-color: var(--chip-border-color); + box-shadow: var(--chip-box-shadow); + box-sizing: content-box; } .avatar { --avatar-size: calc(var(--chip-height) - 2 * var(--chip-avatar-padding)); @@ -1135,7 +1474,6 @@ const Ln=N`.mdc-floating-label{-moz-osx-font-smoothing:grayscale;-webkit-font-sm align-items: center; justify-content: center; height: 100%; - font-size: calc(var(--chip-height) * 0.3); padding: var(--chip-padding); line-height: 0; } @@ -1156,36 +1494,37 @@ const Ln=N`.mdc-floating-label{-moz-osx-font-smoothing:grayscale;-webkit-font-sm color: var(--text-color); } ::slotted(*:not(:last-child)) { - margin-right: 0.5em; + margin-right: 0.15em; } :host([rtl]) ::slotted(*:not(:last-child)) { margin-right: initial; - margin-left: 0.5em; + margin-left: 0.15em; } - `}};n([zt()],sr.prototype,"icon",void 0),n([zt()],sr.prototype,"label",void 0),n([zt()],sr.prototype,"avatar",void 0),sr=n([Dt("mushroom-chip")],sr);const lr=t=>{try{const e=document.createElement(cr(t.type),t);return e.setConfig(t),e}catch(t){return}};function cr(t){return`mushroom-${t}-chip`}function dr(t){return`mushroom-${t}-chip-editor`}let ur=class extends Ot{static async getConfigElement(){return await Promise.resolve().then((function(){return ks})),document.createElement(dr("entity"))}static async getStubConfig(t){return{type:"entity",entity:Object.keys(t.states)[0]}}setConfig(t){this._config=t}_handleAction(t){S(this,this.hass,this._config,t.detail.action)}render(){var t;if(!this.hass||!this._config||!this._config.entity)return ut``;const e=this._config.entity,i=this.hass.states[e],n=this._config.name||i.attributes.friendly_name||"",o=this._config.icon||Io(i),r=this._config.icon_color,a=this._config.use_entity_picture?i.attributes.entity_picture:void 0,s=ao(this.hass.localize,i,this.hass.locale),l=Bn(i);r&&ci(r);const c=qn(null!==(t=this._config.content_info)&&void 0!==t?t:"state",n,s,i,this.hass),d=g(this.hass);return ut` + `}};n([st()],kl.prototype,"icon",void 0),n([st()],kl.prototype,"label",void 0),n([st()],kl.prototype,"avatar",void 0),n([st()],kl.prototype,"avatarOnly",void 0),kl=n([at("mushroom-chip")],kl);const Cl=t=>{try{const e=document.createElement($l(t.type),t);return e.setConfig(t),e}catch(t){return}};function $l(t){return`mushroom-${t}-chip`}function El(t){return`mushroom-${t}-chip-editor`}let Al=class extends ot{static async getConfigElement(){return await Promise.resolve().then((function(){return qc})),document.createElement(El("entity"))}static async getStubConfig(t){return{type:"entity",entity:Object.keys(t.states)[0]}}setConfig(t){this._config=t}_handleAction(t){Oe(this,this.hass,this._config,t.detail.action)}render(){var t;if(!this.hass||!this._config||!this._config.entity)return N``;const e=this._config.entity,i=this.hass.states[e],n=this._config.name||i.attributes.friendly_name||"",o=this._config.icon||pl(i),r=this._config.icon_color,a=this._config.use_entity_picture?Pt(i):void 0,l=Ht(this.hass.localize,i,this.hass.locale),s=Lt(i);r&&xa(r);const c=Ia(null!==(t=this._config.content_info)&&void 0!==t?t:"state",n,l,i,this.hass),d=pe(this.hass);return N` - ${a?null:this.renderIcon(o,r,l)} - ${c?ut`${c}`:null} + ${a?null:this.renderIcon(o,r,s)} + ${c?N`${c}`:null} - `}renderIcon(t,e,i){const n={};if(e){const t=ci(e);n["--color"]=`rgb(${t})`}return ut` + `}renderIcon(t,e,i){const n={};if(e){const t=xa(e);n["--color"]=`rgb(${t})`}return N` - `}static get styles(){return N` + `}static get styles(){return d` mushroom-chip { cursor: pointer; } ha-icon.active { color: var(--color); } - `}};n([zt({attribute:!1})],ur.prototype,"hass",void 0),n([jt()],ur.prototype,"_config",void 0),ur=n([Dt(cr("entity"))],ur);const hr=new Set(["partlycloudy","cloudy","fog","windy","windy-variant","hail","rainy","snowy","snowy-rainy","pouring","lightning","lightning-rainy"]),mr=new Set(["hail","rainy","pouring"]),pr=new Set(["windy","windy-variant"]),fr=new Set(["snowy","snowy-rainy"]),gr=new Set(["lightning","lightning-rainy"]),_r=N` + `}};n([st({attribute:!1})],Al.prototype,"hass",void 0),n([ct()],Al.prototype,"_config",void 0),Al=n([at($l("entity"))],Al);const Sl=new Set(["partlycloudy","cloudy","fog","windy","windy-variant","hail","rainy","snowy","snowy-rainy","pouring","lightning","lightning-rainy"]),Il=new Set(["hail","rainy","pouring"]),Tl=new Set(["windy","windy-variant"]),zl=new Set(["snowy","snowy-rainy"]),Ol=new Set(["lightning","lightning-rainy"]),Ml=d` .rain { fill: var(--weather-icon-rain-color, #30b3ff); } @@ -1201,35 +1540,35 @@ const Ln=N`.mdc-floating-label{-moz-osx-font-smoothing:grayscale;-webkit-font-sm .cloud-front { fill: var(--weather-icon-cloud-front-color, #f9f9f9); } -`;let br=class extends Ot{static async getConfigElement(){return await Promise.resolve().then((function(){return Is})),document.createElement(dr("weather"))}static async getStubConfig(t){const e=Object.keys(t.states).filter((t=>"weather"===t.split(".")[0]));return{type:"weather",entity:e[0]}}setConfig(t){this._config=t}_handleAction(t){S(this,this.hass,this._config,t.detail.action)}render(){if(!this.hass||!this._config||!this._config.entity)return ut``;const t=this._config.entity,e=this.hass.states[t],i=(n=e.state,o=!0,ht` +`;let Ll=class extends ot{static async getConfigElement(){return await Promise.resolve().then((function(){return td})),document.createElement(El("weather"))}static async getStubConfig(t){const e=Object.keys(t.states).filter((t=>"weather"===t.split(".")[0]));return{type:"weather",entity:e[0]}}setConfig(t){this._config=t}_handleAction(t){Oe(this,this.hass,this._config,t.detail.action)}render(){if(!this.hass||!this._config||!this._config.entity)return N``;const t=this._config.entity,e=this.hass.states[t],i=(n=e.state,o=!0,V` - ${"sunny"===n?ht` + ${"sunny"===n?V` `:""} - ${"clear-night"===n?ht` + ${"clear-night"===n?V` `:""} - ${"partlycloudy"===n&&o?ht` + ${"partlycloudy"===n&&o?V` - `:"partlycloudy"===n?ht` + `:"partlycloudy"===n?V` `:""} - ${hr.has(n)?ht` + ${Sl.has(n)?V` `:""} - ${mr.has(n)?ht` + ${Il.has(n)?V` `:""} - ${"pouring"===n?ht` + ${"pouring"===n?V` `:""} - ${pr.has(n)?ht` + ${Tl.has(n)?V` `:""} - ${fr.has(n)?ht` + ${zl.has(n)?V` `:""} - ${gr.has(n)?ht` + ${Ol.has(n)?V` `:""} - `);var n,o;const r=[];if(this._config.show_conditions){const t=ao(this.hass.localize,e,this.hass.locale);r.push(t)}if(this._config.show_temperature){const t=`${b(e.attributes.temperature,this.hass.locale)} ${this.hass.config.unit_system.temperature}`;r.push(t)}const a=g(this.hass);return ut` + `);var n,o;const r=[];if(this._config.show_conditions){const t=Ht(this.hass.localize,e,this.hass.locale);r.push(t)}if(this._config.show_temperature){const t=`${Bt(e.attributes.temperature,this.hass.locale)} ${this.hass.config.unit_system.temperature}`;r.push(t)}const a=pe(this.hass);return N` ${i} - ${r.length>0?ut`${r.join(" / ")}`:null} + ${r.length>0?N`${r.join(" / ")}`:null} - `}static get styles(){return[_r,N` + `}static get styles(){return[Ml,d` mushroom-chip { cursor: pointer; } - `]}};n([zt({attribute:!1})],br.prototype,"hass",void 0),n([jt()],br.prototype,"_config",void 0),br=n([Dt(cr("weather"))],br);let vr=class extends Ot{static async getConfigElement(){return await Promise.resolve().then((function(){return Ms})),document.createElement(dr("back"))}static async getStubConfig(t){return{type:"back"}}setConfig(t){this._config=t}_handleAction(){window.history.back()}render(){if(!this.hass||!this._config)return ut``;const t=this._config.icon||"mdi:arrow-left",e=g(this.hass);return ut` + `]}};n([st({attribute:!1})],Ll.prototype,"hass",void 0),n([ct()],Ll.prototype,"_config",void 0),Ll=n([at($l("weather"))],Ll);let Dl=class extends ot{static async getConfigElement(){return await Promise.resolve().then((function(){return nd})),document.createElement(El("back"))}static async getStubConfig(t){return{type:"back"}}setConfig(t){this._config=t}_handleAction(){window.history.back()}render(){if(!this.hass||!this._config)return N``;const t=this._config.icon||"mdi:arrow-left",e=pe(this.hass);return N` - `}static get styles(){return N` + `}static get styles(){return d` mushroom-chip { cursor: pointer; } - `}};n([zt({attribute:!1})],vr.prototype,"hass",void 0),n([jt()],vr.prototype,"_config",void 0),vr=n([Dt(cr("back"))],vr);let yr=class extends Ot{static async getConfigElement(){return await Promise.resolve().then((function(){return js})),document.createElement(dr("action"))}static async getStubConfig(t){return{type:"action"}}setConfig(t){this._config=t}_handleAction(t){S(this,this.hass,this._config,t.detail.action)}render(){if(!this.hass||!this._config)return ut``;const t=this._config.icon||"mdi:flash",e=this._config.icon_color,i={};if(e){const t=ci(e);i["--color"]=`rgb(${t})`}const n=g(this.hass);return ut` + `}};n([st({attribute:!1})],Dl.prototype,"hass",void 0),n([ct()],Dl.prototype,"_config",void 0),Dl=n([at($l("back"))],Dl);let jl=class extends ot{static async getConfigElement(){return await Promise.resolve().then((function(){return ld})),document.createElement(El("action"))}static async getStubConfig(t){return{type:"action"}}setConfig(t){this._config=t}_handleAction(t){Oe(this,this.hass,this._config,t.detail.action)}render(){if(!this.hass||!this._config)return N``;const t=this._config.icon||"mdi:flash",e=this._config.icon_color,i={};if(e){const t=xa(e);i["--color"]=`rgb(${t})`}const n=pe(this.hass);return N` - + - `}static get styles(){return N` + `}static get styles(){return d` mushroom-chip { cursor: pointer; } ha-icon { color: var(--color); } - `}};n([zt({attribute:!1})],yr.prototype,"hass",void 0),n([jt()],yr.prototype,"_config",void 0),yr=n([Dt(cr("action"))],yr);let xr=class extends Ot{static async getConfigElement(){return await Promise.resolve().then((function(){return Ps})),document.createElement(dr("menu"))}static async getStubConfig(t){return{type:"menu"}}setConfig(t){this._config=t}_handleAction(){w(this,"hass-toggle-menu")}render(){if(!this.hass||!this._config)return ut``;const t=this._config.icon||"mdi:menu",e=g(this.hass);return ut` + `}};n([st({attribute:!1})],jl.prototype,"hass",void 0),n([ct()],jl.prototype,"_config",void 0),jl=n([at($l("action"))],jl);let Pl=class extends ot{static async getConfigElement(){return await Promise.resolve().then((function(){return dd})),document.createElement(El("menu"))}static async getStubConfig(t){return{type:"menu"}}setConfig(t){this._config=t}_handleAction(){At(this,"hass-toggle-menu")}render(){if(!this.hass||!this._config)return N``;const t=this._config.icon||"mdi:menu",e=pe(this.hass);return N` - `}static get styles(){return N` + `}static get styles(){return d` mushroom-chip { cursor: pointer; } - `}};n([zt({attribute:!1})],xr.prototype,"hass",void 0),n([jt()],xr.prototype,"_config",void 0),xr=n([Dt(cr("menu"))],xr);const wr=(t,e,i)=>t.subscribeMessage((t=>e(t)),Object.assign({type:"render_template"},i)),Cr=["content","icon","icon_color"];let kr=class extends Ot{constructor(){super(...arguments),this._templateResults={},this._unsubRenderTemplates=new Map}static async getConfigElement(){return await Promise.resolve().then((function(){return qs})),document.createElement(dr("template"))}static async getStubConfig(t){return{type:"template"}}setConfig(t){Cr.forEach((e=>{var i,n;(null===(i=this._config)||void 0===i?void 0:i[e])===t[e]&&(null===(n=this._config)||void 0===n?void 0:n.entity)==t.entity||this._tryDisconnectKey(e)})),this._config=Object.assign({tap_action:{action:"toggle"},hold_action:{action:"more-info"},double_tap_action:{action:"more-info"}},t)}connectedCallback(){super.connectedCallback(),this._tryConnect()}disconnectedCallback(){this._tryDisconnect()}_handleAction(t){S(this,this.hass,this._config,t.detail.action)}isTemplate(t){var e;const i=null===(e=this._config)||void 0===e?void 0:e[t];return null==i?void 0:i.includes("{")}getValue(t){var e,i;return this.isTemplate(t)?null===(e=this._templateResults[t])||void 0===e?void 0:e.result:null===(i=this._config)||void 0===i?void 0:i[t]}render(){if(!this.hass||!this._config)return ut``;const t=this.getValue("icon"),e=this.getValue("icon_color"),i=this.getValue("content"),n=g(this.hass);return ut` + `}};n([st({attribute:!1})],Pl.prototype,"hass",void 0),n([ct()],Pl.prototype,"_config",void 0),Pl=n([at($l("menu"))],Pl);const Nl=["content","icon","icon_color","picture"];let Vl=class extends ot{constructor(){super(...arguments),this._templateResults={},this._unsubRenderTemplates=new Map}static async getConfigElement(){return await Promise.resolve().then((function(){return vd})),document.createElement(El("template"))}static async getStubConfig(t){return{type:"template"}}setConfig(t){Nl.forEach((e=>{var i,n;(null===(i=this._config)||void 0===i?void 0:i[e])===t[e]&&(null===(n=this._config)||void 0===n?void 0:n.entity)==t.entity||this._tryDisconnectKey(e)})),this._config=Object.assign({tap_action:{action:"toggle"},hold_action:{action:"more-info"}},t)}connectedCallback(){super.connectedCallback(),this._tryConnect()}disconnectedCallback(){this._tryDisconnect()}_handleAction(t){Oe(this,this.hass,this._config,t.detail.action)}isTemplate(t){var e;const i=null===(e=this._config)||void 0===e?void 0:e[t];return null==i?void 0:i.includes("{")}getValue(t){var e,i;return this.isTemplate(t)?null===(e=this._templateResults[t])||void 0===e?void 0:e.result:null===(i=this._config)||void 0===i?void 0:i[t]}render(){if(!this.hass||!this._config)return N``;const t=this.getValue("icon"),e=this.getValue("icon_color"),i=this.getValue("content"),n=this.getValue("picture"),o=pe(this.hass);return N` - ${t?this.renderIcon(t,e):null} + ${t&&!n?this.renderIcon(t,e):null} ${i?this.renderContent(i):null} - `}renderIcon(t,e){const i={};if(e){const t=ci(e);i["--color"]=`rgb(${t})`}return ut``}renderContent(t){return ut`${t}`}updated(t){super.updated(t),this._config&&this.hass&&this._tryConnect()}async _tryConnect(){Cr.forEach((t=>{this._tryConnectKey(t)}))}async _tryConnectKey(t){var e,i;if(void 0===this._unsubRenderTemplates.get(t)&&this.hass&&this._config&&this.isTemplate(t))try{const i=wr(this.hass.connection,(e=>{this._templateResults=Object.assign(Object.assign({},this._templateResults),{[t]:e})}),{template:null!==(e=this._config[t])&&void 0!==e?e:"",entity_ids:this._config.entity_id,variables:{config:this._config,user:this.hass.user.name,entity:this._config.entity}});this._unsubRenderTemplates.set(t,i),await i}catch(e){const n={result:null!==(i=this._config[t])&&void 0!==i?i:"",listeners:{all:!1,domains:[],entities:[],time:!1}};this._templateResults=Object.assign(Object.assign({},this._templateResults),{[t]:n}),this._unsubRenderTemplates.delete(t)}}async _tryDisconnect(){Cr.forEach((t=>{this._tryDisconnectKey(t)}))}async _tryDisconnectKey(t){const e=this._unsubRenderTemplates.get(t);if(e)try{(await e)(),this._unsubRenderTemplates.delete(t)}catch(t){if("not_found"!==t.code&&"template_error"!==t.code)throw t}}static get styles(){return N` + `}renderIcon(t,e){const i={};if(e){const t=xa(e);i["--color"]=`rgb(${t})`}return N``}renderContent(t){return N`${t}`}updated(t){super.updated(t),this._config&&this.hass&&this._tryConnect()}async _tryConnect(){Nl.forEach((t=>{this._tryConnectKey(t)}))}async _tryConnectKey(t){var e,i;if(void 0===this._unsubRenderTemplates.get(t)&&this.hass&&this._config&&this.isTemplate(t))try{const i=ke(this.hass.connection,(e=>{this._templateResults=Object.assign(Object.assign({},this._templateResults),{[t]:e})}),{template:null!==(e=this._config[t])&&void 0!==e?e:"",entity_ids:this._config.entity_id,variables:{config:this._config,user:this.hass.user.name,entity:this._config.entity},strict:!0});this._unsubRenderTemplates.set(t,i),await i}catch(e){const n={result:null!==(i=this._config[t])&&void 0!==i?i:"",listeners:{all:!1,domains:[],entities:[],time:!1}};this._templateResults=Object.assign(Object.assign({},this._templateResults),{[t]:n}),this._unsubRenderTemplates.delete(t)}}async _tryDisconnect(){Nl.forEach((t=>{this._tryDisconnectKey(t)}))}async _tryDisconnectKey(t){const e=this._unsubRenderTemplates.get(t);if(e)try{(await e)(),this._unsubRenderTemplates.delete(t)}catch(t){if("not_found"!==t.code&&"template_error"!==t.code)throw t}}static get styles(){return d` mushroom-chip { cursor: pointer; } ha-icon { color: var(--color); } - `}};n([zt({attribute:!1})],kr.prototype,"hass",void 0),n([jt()],kr.prototype,"_config",void 0),n([jt()],kr.prototype,"_templateResults",void 0),n([jt()],kr.prototype,"_unsubRenderTemplates",void 0),kr=n([Dt(cr("template"))],kr);let $r=class extends X{constructor(){super(...arguments),this.hidden=!1}createRenderRoot(){return this}validateConfig(t){if(!t.conditions)throw new Error("No conditions configured");if(!Array.isArray(t.conditions))throw new Error("Conditions need to be an array");if(!t.conditions.every((t=>t.entity&&(t.state||t.state_not))))throw new Error("Conditions are invalid");this.lastChild&&this.removeChild(this.lastChild),this._config=t}update(t){if(super.update(t),!this._element||!this.hass||!this._config)return;this._element.editMode=this.editMode;const e=this.editMode||(i=this._config.conditions,n=this.hass,i.every((t=>{const e=n.states[t.entity]?n.states[t.entity].state:"unavailable";return t.state?e===t.state:e!==t.state_not})));var i,n;this.hidden=!e,this.style.setProperty("display",e?"":"none"),e&&(this._element.hass=this.hass,this._element.parentElement||this.appendChild(this._element))}};n([zt({attribute:!1})],$r.prototype,"hass",void 0),n([zt()],$r.prototype,"editMode",void 0),n([zt()],$r.prototype,"_config",void 0),n([zt({type:Boolean,reflect:!0})],$r.prototype,"hidden",void 0),$r=n([Dt("mushroom-conditional-base")],$r);let Er=class extends $r{static async getConfigElement(){return await Promise.resolve().then((function(){return fd})),document.createElement(dr("conditional"))}static async getStubConfig(){return{type:"conditional",conditions:[]}}setConfig(t){if(this.validateConfig(t),!t.chip)throw new Error("No row configured");this._element=lr(t.chip)}};Er=n([Dt(cr("conditional"))],Er);const Ar=["hs","xy","rgb","rgbw","rgbww"],Sr=[...Ar,"color_temp","brightness"];function Ir(t){return null!=t.attributes.brightness?Math.max(Math.round(100*t.attributes.brightness/255),1):void 0}function Tr(t){return null!=t.attributes.rgb_color?t.attributes.rgb_color:void 0}function Or(t){return si.rgb(t).l()>96}function Mr(t){return si.rgb(t).l()>97}function Dr(t){return(t=>{var e;return null===(e=t.attributes.supported_color_modes)||void 0===e?void 0:e.some((t=>Ar.includes(t)))})(t)}function Lr(t){return(t=>{var e;return null===(e=t.attributes.supported_color_modes)||void 0===e?void 0:e.some((t=>Sr.includes(t)))})(t)}let zr=class extends Ot{static async getConfigElement(){return await Promise.resolve().then((function(){return Cd})),document.createElement(dr("light"))}static async getStubConfig(t){const e=Object.keys(t.states).filter((t=>"light"===t.split(".")[0]));return{type:"light",entity:e[0]}}setConfig(t){this._config=Object.assign({tap_action:{action:"toggle"},hold_action:{action:"more-info"},double_tap_action:{action:"more-info"}},t)}_handleAction(t){S(this,this.hass,this._config,t.detail.action)}render(){var t,e;if(!this.hass||!this._config||!this._config.entity)return ut``;const i=this._config.entity,n=this.hass.states[i],o=this._config.name||n.attributes.friendly_name||"",r=this._config.icon||Io(n),a=ao(this.hass.localize,n,this.hass.locale),s=Bn(n),l=Tr(n),c={};if(l&&(null===(t=this._config)||void 0===t?void 0:t.use_light_color)){const t=l.join(",");c["--color"]=`rgb(${t})`,Mr(l)&&(c["--color"]="rgba(var(--rgb-primary-text-color), 0.2)")}const d=qn(null!==(e=this._config.content_info)&&void 0!==e?e:"state",o,a,n,this.hass),u=g(this.hass);return ut` + `}};n([st({attribute:!1})],Vl.prototype,"hass",void 0),n([ct()],Vl.prototype,"_config",void 0),n([ct()],Vl.prototype,"_templateResults",void 0),n([ct()],Vl.prototype,"_unsubRenderTemplates",void 0),Vl=n([at($l("template"))],Vl);let Rl=class extends b{constructor(){super(...arguments),this.hidden=!1}createRenderRoot(){return this}validateConfig(t){if(!t.conditions)throw new Error("No conditions configured");if(!Array.isArray(t.conditions))throw new Error("Conditions need to be an array");if(!t.conditions.every((t=>t.entity&&(t.state||t.state_not))))throw new Error("Conditions are invalid");this.lastChild&&this.removeChild(this.lastChild),this._config=t}update(t){if(super.update(t),!this._element||!this.hass||!this._config)return;this._element.editMode=this.editMode;const e=this.editMode||(i=this._config.conditions,n=this.hass,i.every((t=>{const e=n.states[t.entity]?n.states[t.entity].state:Tt;return t.state?e===t.state:e!==t.state_not})));var i,n;this.hidden=!e,this.style.setProperty("display",e?"":"none"),e&&(this._element.hass=this.hass,this._element.parentElement||this.appendChild(this._element))}};n([st({attribute:!1})],Rl.prototype,"hass",void 0),n([st()],Rl.prototype,"editMode",void 0),n([st()],Rl.prototype,"_config",void 0),n([st({type:Boolean,reflect:!0})],Rl.prototype,"hidden",void 0),Rl=n([at("mushroom-conditional-base")],Rl);let Fl=class extends Rl{static async getConfigElement(){return await Promise.resolve().then((function(){return Fh})),document.createElement(El("conditional"))}static async getStubConfig(){return{type:"conditional",conditions:[]}}setConfig(t){if(this.validateConfig(t),!t.chip)throw new Error("No row configured");this._element=Cl(t.chip)}};function Bl(t){return null!=t.attributes.brightness?Math.max(Math.round(100*t.attributes.brightness/255),1):void 0}function Ul(t){return null!=t.attributes.rgb_color?t.attributes.rgb_color:void 0}function Hl(t){return ba.rgb(t).l()>96}function Yl(t){return ba.rgb(t).l()>97}function Xl(t){return(t=>{var e;return null===(e=t.attributes.supported_color_modes)||void 0===e?void 0:e.some((t=>xe.includes(t)))})(t)}function Wl(t){return(t=>{var e;return null===(e=t.attributes.supported_color_modes)||void 0===e?void 0:e.some((t=>we.includes(t)))})(t)}Fl=n([at($l("conditional"))],Fl);let ql=class extends ot{static async getConfigElement(){return await Promise.resolve().then((function(){return Kh})),document.createElement(El("light"))}static async getStubConfig(t){const e=Object.keys(t.states).filter((t=>"light"===t.split(".")[0]));return{type:"light",entity:e[0]}}setConfig(t){this._config=Object.assign({tap_action:{action:"toggle"},hold_action:{action:"more-info"}},t)}_handleAction(t){Oe(this,this.hass,this._config,t.detail.action)}render(){var t,e;if(!this.hass||!this._config||!this._config.entity)return N``;const i=this._config.entity,n=this.hass.states[i],o=this._config.name||n.attributes.friendly_name||"",r=this._config.icon||pl(n),a=Ht(this.hass.localize,n,this.hass.locale),l=Lt(n),s=Ul(n),c={};if(s&&(null===(t=this._config)||void 0===t?void 0:t.use_light_color)){const t=s.join(",");c["--color"]=`rgb(${t})`,Yl(s)&&(c["--color"]="rgba(var(--rgb-primary-text-color), 0.2)")}const d=Ia(null!==(e=this._config.content_info)&&void 0!==e?e:"state",o,a,n,this.hass),u=pe(this.hass);return N` - ${d?ut`${d}`:null} + ${d?N`${d}`:null} - `}static get styles(){return N` + `}static get styles(){return d` :host { --color: rgb(var(--rgb-state-light)); } @@ -1388,20 +1729,20 @@ const Ln=N`.mdc-floating-label{-moz-osx-font-smoothing:grayscale;-webkit-font-sm ha-icon.active { color: var(--color); } - `}};n([zt({attribute:!1})],zr.prototype,"hass",void 0),n([jt()],zr.prototype,"_config",void 0),zr=n([Dt(cr("light"))],zr);let jr=class extends Ot{static async getConfigElement(){return await Promise.resolve().then((function(){return Ad})),document.createElement(dr("alarm-control-panel"))}static async getStubConfig(t){const e=Object.keys(t.states).filter((t=>Qo.includes(t.split(".")[0])));return{type:"alarm-control-panel",entity:e[0]}}setConfig(t){this._config=t}_handleAction(t){S(this,this.hass,this._config,t.detail.action)}render(){var t;if(!this.hass||!this._config||!this._config.entity)return ut``;const e=this._config.entity,i=this.hass.states[e],n=this._config.name||i.attributes.friendly_name||"",o=this._config.icon||Io(i),r=ir(i.state),a=nr(i.state),s=ao(this.hass.localize,i,this.hass.locale),l={};if(r){const t=ci(r);l["--color"]=`rgb(${t})`}const c=qn(null!==(t=this._config.content_info)&&void 0!==t?t:"state",n,s,i,this.hass),d=g(this.hass);return ut` + `}};n([st({attribute:!1})],ql.prototype,"hass",void 0),n([ct()],ql.prototype,"_config",void 0),ql=n([at($l("light"))],ql);let Kl=class extends ot{static async getConfigElement(){return await Promise.resolve().then((function(){return Qh})),document.createElement(El("alarm-control-panel"))}static async getStubConfig(t){const e=Object.keys(t.states).filter((t=>fl.includes(t.split(".")[0])));return{type:"alarm-control-panel",entity:e[0]}}setConfig(t){this._config=t}_handleAction(t){Oe(this,this.hass,this._config,t.detail.action)}render(){var t;if(!this.hass||!this._config||!this._config.entity)return N``;const e=this._config.entity,i=this.hass.states[e],n=this._config.name||i.attributes.friendly_name||"",o=this._config.icon||pl(i),r=vl(i.state),a=bl(i.state),l=Ht(this.hass.localize,i,this.hass.locale),s={};if(r){const t=xa(r);s["--color"]=`rgb(${t})`}const c=Ia(null!==(t=this._config.content_info)&&void 0!==t?t:"state",n,l,i,this.hass),d=pe(this.hass);return N` - ${c?ut`${c}`:null} + ${c?N`${c}`:null} - `}static get styles(){return N` + `}static get styles(){return d` mushroom-chip { cursor: pointer; } @@ -1411,12 +1752,20 @@ const Ln=N`.mdc-floating-label{-moz-osx-font-smoothing:grayscale;-webkit-font-sm ha-icon.pulse { animation: 1s ease 0s infinite normal none running pulse; } - ${uo} - `}};n([zt({attribute:!1})],jr.prototype,"hass",void 0),n([jt()],jr.prototype,"_config",void 0),jr=n([Dt(cr("alarm-control-panel"))],jr),vo({type:"mushroom-chips-card",name:"Mushroom Chips Card",description:"Card with chips to display informations"});let Nr=class extends Ot{static async getConfigElement(){return await Promise.resolve().then((function(){return Xd})),document.createElement("mushroom-chips-card-editor")}static async getStubConfig(t){return{type:"custom:mushroom-chips-card",chips:await Promise.all([ur.getStubConfig(t)])}}set hass(t){var e;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 ut``;let t="";this._config.alignment&&(t=`align-${this._config.alignment}`);const e=g(this._hass);return ut` -
- ${this._config.chips.map((t=>this.renderChip(t)))} -
- `}renderChip(t){const e=lr(t);return e?(this._hass&&(e.hass=this._hass),ut`${e}`):ut``}static get styles(){return[bo,N` + ${Ha} + `}};n([st({attribute:!1})],Kl.prototype,"hass",void 0),n([ct()],Kl.prototype,"_config",void 0),Kl=n([at($l("alarm-control-panel"))],Kl);ll({type:"mushroom-chips-card",name:"Mushroom Chips Card",description:"Card with chips to display informations"});let Gl=class extends ot{static async getConfigElement(){return await Promise.resolve().then((function(){return _m})),document.createElement("mushroom-chips-card-editor")}static async getStubConfig(t){return{type:"custom:mushroom-chips-card",chips:await Promise.all([Al.getStubConfig(t)])}}set hass(t){var e;const i=nl(this._hass),n=nl(t);i!==n&&this.toggleAttribute("dark-mode",n),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 N``;let t="";this._config.alignment&&(t=`align-${this._config.alignment}`);const e=pe(this._hass);return N` + +
+ ${this._config.chips.map((t=>this.renderChip(t)))} +
+
+ `}renderChip(t){const e=Cl(t);return e?(this._hass&&(e.hass=this._hass),N`${e}`):N``}static get styles(){return[ol.styles,d` + ha-card { + background: none; + box-shadow: none; + border-radius: 0; + border: none; + } .chip-container { display: flex; flex-direction: row; @@ -1444,59 +1793,247 @@ const Ln=N`.mdc-floating-label{-moz-osx-font-smoothing:grayscale;-webkit-font-sm margin-right: initial; margin-left: var(--chip-spacing); } - `]}};n([jt()],Nr.prototype,"_config",void 0),Nr=n([Dt("mushroom-chips-card")],Nr);const Rr=["cover"];let Pr=class extends Ot{constructor(){super(...arguments),this.fill=!1}_onOpenTap(t){t.stopPropagation(),this.hass.callService("cover","open_cover",{entity_id:this.entity.entity_id})}_onCloseTap(t){t.stopPropagation(),this.hass.callService("cover","close_cover",{entity_id:this.entity.entity_id})}_onStopTap(t){t.stopPropagation(),this.hass.callService("cover","stop_cover",{entity_id:this.entity.entity_id})}get openDisabled(){const t=!0===this.entity.attributes.assumed_state;return((void 0!==(e=this.entity).attributes.current_position?100===e.attributes.current_position:"open"===e.state)||function(t){return"opening"===t.state}(this.entity))&&!t;var e}get closedDisabled(){const t=!0===this.entity.attributes.assumed_state;return((void 0!==(e=this.entity).attributes.current_position?0===e.attributes.current_position:"closed"===e.state)||function(t){return"closing"===t.state}(this.entity))&&!t;var e}render(){const t=g(this.hass);return ut` + `]}};n([ct()],Gl.prototype,"_config",void 0),Gl=n([at("mushroom-chips-card")],Gl);const Zl=["climate"],Jl={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)"},Ql={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)"},ts={auto:"mdi:calendar-sync",cool:"mdi:snowflake",dry:"mdi:water-percent",fan_only:"mdi:fan",heat:"mdi:fire",heat_cool:"mdi:autorenew",off:"mdi:power"},es={cooling:"mdi:snowflake",drying:"mdi:water-percent",heating:"mdi:fire",idle:"mdi:clock-outline",off:"mdi:power"};function is(t){var e;return null!==(e=Jl[t])&&void 0!==e?e:Jl.off}let ns=class extends ot{constructor(){super(...arguments),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=pe(this.hass),e=this.entity.attributes.hvac_modes.filter((t=>{var e;return(null!==(e=this.modes)&&void 0!==e?e:[]).includes(t)})).sort(be);return N` + + ${e.map((t=>this.renderModeButton(t)))} + + `}renderModeButton(t){const e={},i="off"===t?"var(--rgb-grey)":is(t);return t===this.entity.state&&(e["--icon-color"]=`rgb(${i})`,e["--bg-color"]=`rgba(${i}, 0.2)`),N` + + `}};n([st({attribute:!1})],ns.prototype,"hass",void 0),n([st({attribute:!1})],ns.prototype,"entity",void 0),n([st({attribute:!1})],ns.prototype,"modes",void 0),n([st()],ns.prototype,"fill",void 0),ns=n([at("mushroom-climate-hvac-modes-control")],ns);let os=class extends ot{constructor(){super(...arguments),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}_incrementValue(t){var e;if(t.stopPropagation(),!this.value)return;const i=Rt(this.value+(null!==(e=this.step)&&void 0!==e?e:1),1);this._processNewValue(i)}_decrementValue(t){var e;if(t.stopPropagation(),!this.value)return;const i=Rt(this.value-(null!==(e=this.step)&&void 0!==e?e:1),1);this._processNewValue(i)}firstUpdated(t){super.firstUpdated(t);const e=(t=>{const e=window.getComputedStyle(t).getPropertyValue("--input-number-debounce"),i=parseFloat(e);return isNaN(i)?2e3:i})(this.container);e&&(this.debounceDispatchValue=fe(this.dispatchValue,e))}_processNewValue(t){const e=((t,e,i)=>{let n;return n=e?Math.max(t,e):t,n=i?Math.min(n,i):n,n})(t,this.min,this.max);this.value!==e&&(this.value=e,this.pending=!0),this.debounceDispatchValue(e)}render(){const t=null!=this.value?Bt(this.value,this.locale,this.formatOptions):"-";return N` +
+ + + ${t} + + +
+ `}static get styles(){return d` + :host { + --text-color: var(--primary-text-color); + --text-color-disabled: rgb(var(--rgb-disabled)); + --icon-color: var(--primary-text-color); + --icon-color-disabled: rgb(var(--rgb-disabled)); + --bg-color: rgba(var(--rgb-primary-text-color), 0.05); + --bg-color-disabled: rgba(var(--rgb-disabled), 0.2); + height: var(--control-height); + width: calc(var(--control-height) * var(--control-button-ratio) * 3); + flex: none; + } + .container { + box-sizing: border-box; + width: 100%; + height: 100%; + padding: 6px; + display: flex; + flex-direction: row; + align-items: center; + justify-content: space-between; + border-radius: var(--control-border-radius); + border: none; + background-color: var(--bg-color); + transition: background-color 280ms ease-in-out; + } + .button { + display: flex; + flex-direction: row; + align-items: center; + justify-content: center; + padding: 6px; + border: none; + background: none; + cursor: pointer; + border-radius: var(--control-border-radius); + line-height: 0; + } + .button:disabled { + cursor: not-allowed; + } + .button ha-icon { + font-size: var(--control-height); + --mdc-icon-size: var(--control-icon-size); + color: var(--icon-color); + pointer-events: none; + } + .button:disabled ha-icon { + color: var(--icon-color-disabled); + } + span { + font-weight: bold; + color: var(--text-color); + } + span.disabled { + color: var(--text-color-disabled); + } + span.pending { + opacity: 0.5; + } + `}};n([st({attribute:!1})],os.prototype,"locale",void 0),n([st({type:Boolean})],os.prototype,"disabled",void 0),n([st({attribute:!1,type:Number,reflect:!0})],os.prototype,"value",void 0),n([st({type:Number})],os.prototype,"step",void 0),n([st({type:Number})],os.prototype,"min",void 0),n([st({type:Number})],os.prototype,"max",void 0),n([st({attribute:"false"})],os.prototype,"formatOptions",void 0),n([ct()],os.prototype,"pending",void 0),n([ht("#container")],os.prototype,"container",void 0),os=n([at("mushroom-input-number")],os);let rs=class extends ot{constructor(){super(...arguments),this.fill=!1}get _stepSize(){return this.entity.attributes.target_temp_step?this.entity.attributes.target_temp_step:"°F"===this.hass.config.unit_system.temperature?1:.5}onValueChange(t){const e=t.detail.value;this.hass.callService("climate","set_temperature",{entity_id:this.entity.entity_id,temperature:e})}onLowValueChange(t){const e=t.detail.value;this.hass.callService("climate","set_temperature",{entity_id:this.entity.entity_id,target_temp_low:e,target_temp_high:this.entity.attributes.target_temp_high})}onHighValueChange(t){const e=t.detail.value;this.hass.callService("climate","set_temperature",{entity_id:this.entity.entity_id,target_temp_low:this.entity.attributes.target_temp_low,target_temp_high:e})}render(){const t=pe(this.hass),e=Dt(this.entity),i=1===this._stepSize?{maximumFractionDigits:0}:{minimumFractionDigits:1,maximumFractionDigits:1},n=t=>({"--bg-color":`rgba(var(--rgb-state-climate-${t}), 0.05)`,"--icon-color":`rgb(var(--rgb-state-climate-${t}))`,"--text-color":`rgb(var(--rgb-state-climate-${t}))`});return N` + + ${null!=this.entity.attributes.temperature?N` + + `:null} + ${null!=this.entity.attributes.target_temp_low&&null!=this.entity.attributes.target_temp_high?N` + + `:null} + + `}};n([st({attribute:!1})],rs.prototype,"hass",void 0),n([st({attribute:!1})],rs.prototype,"entity",void 0),n([st()],rs.prototype,"fill",void 0),rs=n([at("mushroom-climate-temperature-control")],rs);const as={temperature_control:"mdi:thermometer",hvac_mode_control:"mdi:thermostat"};ll({type:"mushroom-climate-card",name:"Mushroom Climate Card",description:"Card for climate entity"});let ls=class extends rl{constructor(){super(...arguments),this._controls=[]}static async getConfigElement(){return await Promise.resolve().then((function(){return km})),document.createElement("mushroom-climate-card-editor")}static async getStubConfig(t){const e=Object.keys(t.states).filter((t=>Zl.includes(t.split(".")[0])));return{type:"custom:mushroom-climate-card",entity:e[0]}}_onControlTap(t,e){e.stopPropagation(),this._activeControl=t}getCardSize(){return 1}setConfig(t){this._config=Object.assign({tap_action:{action:"toggle"},hold_action:{action:"more-info"}},t),this.updateControls()}updated(t){super.updated(t),this.hass&&t.has("hass")&&this.updateControls()}updateControls(){if(!this._config||!this.hass||!this._config.entity)return;const t=this._config.entity,e=this.hass.states[t];if(!e)return;const i=[];this._config.collapsible_controls&&!Lt(e)||((t=>null!=t.attributes.temperature||null!=t.attributes.target_temp_low&&null!=t.attributes.target_temp_high)(e)&&this._config.show_temperature_control&&i.push("temperature_control"),((t,e)=>(t.attributes.hvac_modes||[]).some((t=>(null!=e?e:[]).includes(t))))(e,this._config.hvac_modes)&&i.push("hvac_mode_control")),this._controls=i;const n=!!this._activeControl&&i.includes(this._activeControl);this._activeControl=n?this._activeControl:i[0]}_handleAction(t){Oe(this,this.hass,this._config,t.detail.action)}render(){if(!this.hass||!this._config||!this._config.entity)return N``;const t=this._config.entity,e=this.hass.states[t],i=this._config.name||e.attributes.friendly_name||"",n=this._config.icon||pl(e),o=Ka(this._config),r=Ta(e,o.icon_type);let a=Ht(this.hass.localize,e,this.hass.locale);if(null!==e.attributes.current_temperature){a+=` - ${Bt(e.attributes.current_temperature,this.hass.locale)} ${this.hass.config.unit_system.temperature}`}const l=pe(this.hass);return N` + + + + ${r?this.renderPicture(r):this.renderIcon(e,n)} + ${this.renderBadge(e)} + ${this.renderStateInfo(e,o,i,a)}; + + ${this._controls.length>0?N` +
+ ${this.renderActiveControl(e)}${this.renderOtherControls()} +
+ `:null} +
+
+ `}renderIcon(t,e){const i=Dt(t),n=is(t.state),o={};return o["--icon-color"]=`rgb(${n})`,o["--shape-color"]=`rgba(${n}, 0.2)`,N` + + `}renderBadge(t){return!Dt(t)?super.renderBadge(t):this.renderActionBadge(t)}renderActionBadge(t){const e=t.attributes.hvac_action;if(!e||"off"==e)return null;const i=function(t){var e;return null!==(e=Ql[t])&&void 0!==e?e:Ql.off}(e),n=function(t){var e;return null!==(e=es[t])&&void 0!==e?e:""}(e);return n?N` + + `:null}renderOtherControls(){const t=this._controls.filter((t=>t!=this._activeControl));return N` + ${t.map((t=>N` + this._onControlTap(t,e)} + > + `))} + `}renderActiveControl(t){var e,i;const n=null!==(i=null===(e=this._config)||void 0===e?void 0:e.hvac_modes)&&void 0!==i?i:[];switch(this._activeControl){case"temperature_control":return N` + + `;case"hvac_mode_control":return N` + + `;default:return null}}static get styles(){return[super.styles,al,d` + mushroom-state-item { + cursor: pointer; + } + mushroom-climate-temperature-control, + mushroom-climate-hvac-modes-control { + flex: 1; + } + `]}};n([ct()],ls.prototype,"_config",void 0),n([ct()],ls.prototype,"_activeControl",void 0),n([ct()],ls.prototype,"_controls",void 0),ls=n([at("mushroom-climate-card")],ls);const ss=["cover"];let cs=class extends ot{constructor(){super(...arguments),this.fill=!1}_onOpenTap(t){t.stopPropagation(),this.hass.callService("cover","open_cover",{entity_id:this.entity.entity_id})}_onCloseTap(t){t.stopPropagation(),this.hass.callService("cover","close_cover",{entity_id:this.entity.entity_id})}_onStopTap(t){t.stopPropagation(),this.hass.callService("cover","stop_cover",{entity_id:this.entity.entity_id})}get openDisabled(){const t=!0===this.entity.attributes.assumed_state;return((void 0!==(e=this.entity).attributes.current_position?100===e.attributes.current_position:"open"===e.state)||function(t){return"opening"===t.state}(this.entity))&&!t;var e}get closedDisabled(){const t=!0===this.entity.attributes.assumed_state;return((void 0!==(e=this.entity).attributes.current_position?0===e.attributes.current_position:"closed"===e.state)||function(t){return"closing"===t.state}(this.entity))&&!t;var e}render(){const t=pe(this.hass);return N` - ${oo(this.entity,2)?ut` + ${Nt(this.entity,2)?N` {switch(t.attributes.device_class){case"awning":case"curtain":case"door":case"gate":return"mdi:arrow-collapse-horizontal";default:return"mdi:arrow-down"}})(this.entity)} - .disabled=${!Un(this.entity)||this.closedDisabled} + .disabled=${!Dt(this.entity)||this.closedDisabled} @click=${this._onCloseTap} > `:void 0} - ${oo(this.entity,8)?ut` + ${Nt(this.entity,8)?N` `:void 0} - ${oo(this.entity,1)?ut` + ${Nt(this.entity,1)?N` {switch(t.attributes.device_class){case"awning":case"curtain":case"door":case"gate":return"mdi:arrow-expand-horizontal";default:return"mdi:arrow-up"}})(this.entity)} - .disabled=${!Un(this.entity)||this.openDisabled} + .disabled=${!Dt(this.entity)||this.openDisabled} @click=${this._onOpenTap} > `:void 0} - `}};n([zt({attribute:!1})],Pr.prototype,"hass",void 0),n([zt({attribute:!1})],Pr.prototype,"entity",void 0),n([zt()],Pr.prototype,"fill",void 0),Pr=n([Dt("mushroom-cover-buttons-control")],Pr);var Fr; + `}};n([st({attribute:!1})],cs.prototype,"hass",void 0),n([st({attribute:!1})],cs.prototype,"entity",void 0),n([st()],cs.prototype,"fill",void 0),cs=n([at("mushroom-cover-buttons-control")],cs);var ds; /*! Hammer.JS - v2.0.7 - 2016-04-22 * http://hammerjs.github.io/ * * Copyright (c) 2016 Jorik Tangelder; - * Licensed under the MIT license */Fr={exports:{}},function(t,e,i,n){var o,r=["","webkit","Moz","MS","ms","o"],a=e.createElement("div"),s=Math.round,l=Math.abs,c=Date.now;function d(t,e,i){return setTimeout(_(t,i),e)}function u(t,e,i){return!!Array.isArray(t)&&(h(t,i[e],i),!0)}function h(t,e,i){var o;if(t)if(t.forEach)t.forEach(e,i);else if(t.length!==n)for(o=0;o\s*\(/gm,"{anonymous}()@"):"Unknown Stack Trace",r=t.console&&(t.console.warn||t.console.log);return r&&r.call(t.console,o,n),e.apply(this,arguments)}}o="function"!=typeof Object.assign?function(t){if(t===n||null===t)throw new TypeError("Cannot convert undefined or null to object");for(var e=Object(t),i=1;i-1}function k(t){return t.trim().split(/\s+/g)}function $(t,e,i){if(t.indexOf&&!i)return t.indexOf(e);for(var n=0;ni[e]})):n.sort()),n}function S(t,e){for(var i,o,a=e[0].toUpperCase()+e.slice(1),s=0;s1&&!i.firstMultiple?i.firstMultiple=V(e):1===r&&(i.firstMultiple=!1);var a=i.firstInput,s=i.firstMultiple,d=s?s.center:a.center,u=e.center=B(o);e.timeStamp=c(),e.deltaTime=e.timeStamp-a.timeStamp,e.angle=X(d,u),e.distance=Y(d,u),function(t,e){var i=e.center,n=t.offsetDelta||{},o=t.prevDelta||{},r=t.prevInput||{};1!==e.eventType&&4!==r.eventType||(o=t.prevDelta={x:r.deltaX||0,y:r.deltaY||0},n=t.offsetDelta={x:i.x,y:i.y}),e.deltaX=o.x+(i.x-n.x),e.deltaY=o.y+(i.y-n.y)}(i,e),e.offsetDirection=H(e.deltaX,e.deltaY);var h,m,p=U(e.deltaTime,e.deltaX,e.deltaY);e.overallVelocityX=p.x,e.overallVelocityY=p.y,e.overallVelocity=l(p.x)>l(p.y)?p.x:p.y,e.scale=s?(h=s.pointers,Y((m=o)[0],m[1],R)/Y(h[0],h[1],R)):1,e.rotation=s?function(t,e){return X(e[1],e[0],R)+X(t[1],t[0],R)}(s.pointers,o):0,e.maxPointers=i.prevInput?e.pointers.length>i.prevInput.maxPointers?e.pointers.length:i.prevInput.maxPointers:e.pointers.length,function(t,e){var i,o,r,a,s=t.lastInterval||e,c=e.timeStamp-s.timeStamp;if(8!=e.eventType&&(c>25||s.velocity===n)){var d=e.deltaX-s.deltaX,u=e.deltaY-s.deltaY,h=U(c,d,u);o=h.x,r=h.y,i=l(h.x)>l(h.y)?h.x:h.y,a=H(d,u),t.lastInterval=e}else i=s.velocity,o=s.velocityX,r=s.velocityY,a=s.direction;e.velocity=i,e.velocityX=o,e.velocityY=r,e.direction=a}(i,e);var f=t.element;w(e.srcEvent.target,f)&&(f=e.srcEvent.target),e.target=f}(t,i),t.emit("hammer.input",i),t.recognize(i),t.session.prevInput=i}function V(t){for(var e=[],i=0;i=l(e)?t<0?2:4:e<0?8:16}function Y(t,e,i){i||(i=N);var n=e[i[0]]-t[i[0]],o=e[i[1]]-t[i[1]];return Math.sqrt(n*n+o*o)}function X(t,e,i){i||(i=N);var n=e[i[0]]-t[i[0]],o=e[i[1]]-t[i[1]];return 180*Math.atan2(o,n)/Math.PI}P.prototype={handler:function(){},init:function(){this.evEl&&y(this.element,this.evEl,this.domHandler),this.evTarget&&y(this.target,this.evTarget,this.domHandler),this.evWin&&y(T(this.element),this.evWin,this.domHandler)},destroy:function(){this.evEl&&x(this.element,this.evEl,this.domHandler),this.evTarget&&x(this.target,this.evTarget,this.domHandler),this.evWin&&x(T(this.element),this.evWin,this.domHandler)}};var q={mousedown:1,mousemove:2,mouseup:4},W="mousedown",G="mousemove mouseup";function K(){this.evEl=W,this.evWin=G,this.pressed=!1,P.apply(this,arguments)}g(K,P,{handler:function(t){var e=q[t.type];1&e&&0===t.button&&(this.pressed=!0),2&e&&1!==t.which&&(e=4),this.pressed&&(4&e&&(this.pressed=!1),this.callback(this.manager,e,{pointers:[t],changedPointers:[t],pointerType:z,srcEvent:t}))}});var Z={pointerdown:1,pointermove:2,pointerup:4,pointercancel:8,pointerout:8},J={2:L,3:"pen",4:z,5:"kinect"},Q="pointerdown",tt="pointermove pointerup pointercancel";function et(){this.evEl=Q,this.evWin=tt,P.apply(this,arguments),this.store=this.manager.session.pointerEvents=[]}t.MSPointerEvent&&!t.PointerEvent&&(Q="MSPointerDown",tt="MSPointerMove MSPointerUp MSPointerCancel"),g(et,P,{handler:function(t){var e=this.store,i=!1,n=t.type.toLowerCase().replace("ms",""),o=Z[n],r=J[t.pointerType]||t.pointerType,a=r==L,s=$(e,t.pointerId,"pointerId");1&o&&(0===t.button||a)?s<0&&(e.push(t),s=e.length-1):12&o&&(i=!0),s<0||(e[s]=t,this.callback(this.manager,o,{pointers:e,changedPointers:[t],pointerType:r,srcEvent:t}),i&&e.splice(s,1))}});var it={touchstart:1,touchmove:2,touchend:4,touchcancel:8},nt="touchstart",ot="touchstart touchmove touchend touchcancel";function rt(){this.evTarget=nt,this.evWin=ot,this.started=!1,P.apply(this,arguments)}function at(t,e){var i=E(t.touches),n=E(t.changedTouches);return 12&e&&(i=A(i.concat(n),"identifier",!0)),[i,n]}g(rt,P,{handler:function(t){var e=it[t.type];if(1===e&&(this.started=!0),this.started){var i=at.call(this,t,e);12&e&&i[0].length-i[1].length==0&&(this.started=!1),this.callback(this.manager,e,{pointers:i[0],changedPointers:i[1],pointerType:L,srcEvent:t})}}});var st={touchstart:1,touchmove:2,touchend:4,touchcancel:8},lt="touchstart touchmove touchend touchcancel";function ct(){this.evTarget=lt,this.targetIds={},P.apply(this,arguments)}function dt(t,e){var i=E(t.touches),n=this.targetIds;if(3&e&&1===i.length)return n[i[0].identifier]=!0,[i,i];var o,r,a=E(t.changedTouches),s=[],l=this.target;if(r=i.filter((function(t){return w(t.target,l)})),1===e)for(o=0;o-1&&n.splice(t,1)}),2500)}}function pt(t){for(var e=t.srcEvent.clientX,i=t.srcEvent.clientY,n=0;n-1&&this.requireFail.splice(e,1),this},hasRequireFailures:function(){return this.requireFail.length>0},canRecognizeWith:function(t){return!!this.simultaneous[t.id]},emit:function(t){var e=this,i=this.state;function n(i){e.manager.emit(i,t)}i<8&&n(e.options.event+At(i)),n(e.options.event),t.additionalEvent&&n(t.additionalEvent),i>=8&&n(e.options.event+At(i))},tryEmit:function(t){if(this.canEmit())return this.emit(t);this.state=$t},canEmit:function(){for(var t=0;te.threshold&&o&e.direction},attrTest:function(t){return Tt.prototype.attrTest.call(this,t)&&(2&this.state||!(2&this.state)&&this.directionTest(t))},emit:function(t){this.pX=t.deltaX,this.pY=t.deltaY;var e=St(t.direction);e&&(t.additionalEvent=this.options.event+e),this._super.emit.call(this,t)}}),g(Mt,Tt,{defaults:{event:"pinch",threshold:0,pointers:2},getTouchAction:function(){return[yt]},attrTest:function(t){return this._super.attrTest.call(this,t)&&(Math.abs(t.scale-1)>this.options.threshold||2&this.state)},emit:function(t){if(1!==t.scale){var e=t.scale<1?"in":"out";t.additionalEvent=this.options.event+e}this._super.emit.call(this,t)}}),g(Dt,Et,{defaults:{event:"press",pointers:1,time:251,threshold:9},getTouchAction:function(){return[bt]},process:function(t){var e=this.options,i=t.pointers.length===e.pointers,n=t.distancee.time;if(this._input=t,!n||!i||12&t.eventType&&!o)this.reset();else if(1&t.eventType)this.reset(),this._timer=d((function(){this.state=8,this.tryEmit()}),e.time,this);else if(4&t.eventType)return 8;return $t},reset:function(){clearTimeout(this._timer)},emit:function(t){8===this.state&&(t&&4&t.eventType?this.manager.emit(this.options.event+"up",t):(this._input.timeStamp=c(),this.manager.emit(this.options.event,this._input)))}}),g(Lt,Tt,{defaults:{event:"rotate",threshold:0,pointers:2},getTouchAction:function(){return[yt]},attrTest:function(t){return this._super.attrTest.call(this,t)&&(Math.abs(t.rotation)>this.options.threshold||2&this.state)}}),g(zt,Tt,{defaults:{event:"swipe",threshold:10,velocity:.3,direction:30,pointers:1},getTouchAction:function(){return Ot.prototype.getTouchAction.call(this)},attrTest:function(t){var e,i=this.options.direction;return 30&i?e=t.overallVelocity:6&i?e=t.overallVelocityX:i&j&&(e=t.overallVelocityY),this._super.attrTest.call(this,t)&&i&t.offsetDirection&&t.distance>this.options.threshold&&t.maxPointers==this.options.pointers&&l(e)>this.options.velocity&&4&t.eventType},emit:function(t){var e=St(t.offsetDirection);e&&this.manager.emit(this.options.event+e,t),this.manager.emit(this.options.event,t)}}),g(jt,Et,{defaults:{event:"tap",pointers:1,taps:1,interval:300,time:250,threshold:9,posThreshold:10},getTouchAction:function(){return[vt]},process:function(t){var e=this.options,i=t.pointers.length===e.pointers,n=t.distance{const e=t.center.x,i=t.target.getBoundingClientRect().left,n=t.target.clientWidth;return Math.max(Math.min(1,(e-i)/n),0)};let Br=class extends Ot{constructor(){super(...arguments),this.disabled=!1,this.inactive=!1,this.min=0,this.max=100}valueToPercentage(t){return(t-this.min)/(this.max-this.min)}percentageToValue(t){return(this.max-this.min)*t+this.min}firstUpdated(t){super.firstUpdated(t),this.setupListeners()}connectedCallback(){super.connectedCallback(),this.setupListeners()}disconnectedCallback(){super.disconnectedCallback(),this.destroyListeners()}setupListeners(){if(this.slider&&!this._mc){const t=(t=>{const e=window.getComputedStyle(t).getPropertyValue("--slider-threshold"),i=parseFloat(e);return isNaN(i)?10:i})(this.slider);let e;this._mc=new Hammer.Manager(this.slider,{touchAction:"pan-y"}),this._mc.add(new Hammer.Pan({threshold:t,direction:Hammer.DIRECTION_ALL,enable:!0})),this._mc.add(new Hammer.Tap({event:"singletap"})),this._mc.on("panstart",(()=>{this.disabled||(e=this.value)})),this._mc.on("pancancel",(()=>{this.disabled||(this.value=e)})),this._mc.on("panmove",(t=>{if(this.disabled)return;const e=Vr(t);this.value=this.percentageToValue(e),this.dispatchEvent(new CustomEvent("current-change",{detail:{value:Math.round(this.value)}}))})),this._mc.on("panend",(t=>{if(this.disabled)return;const e=Vr(t);this.value=this.percentageToValue(e),this.dispatchEvent(new CustomEvent("current-change",{detail:{value:void 0}})),this.dispatchEvent(new CustomEvent("change",{detail:{value:Math.round(this.value)}}))})),this._mc.on("singletap",(t=>{if(this.disabled)return;const e=Vr(t);this.value=this.percentageToValue(e),this.dispatchEvent(new CustomEvent("change",{detail:{value:Math.round(this.value)}}))}))}}destroyListeners(){this._mc&&(this._mc.destroy(),this._mc=void 0)}render(){var t;return ut` -
+ * Licensed under the MIT license */ds={exports:{}},function(t,e,i,n){var o,r=["","webkit","Moz","MS","ms","o"],a=e.createElement("div"),l=Math.round,s=Math.abs,c=Date.now;function d(t,e,i){return setTimeout(_(t,i),e)}function u(t,e,i){return!!Array.isArray(t)&&(h(t,i[e],i),!0)}function h(t,e,i){var o;if(t)if(t.forEach)t.forEach(e,i);else if(t.length!==n)for(o=0;o\s*\(/gm,"{anonymous}()@"):"Unknown Stack Trace",r=t.console&&(t.console.warn||t.console.log);return r&&r.call(t.console,o,n),e.apply(this,arguments)}}o="function"!=typeof Object.assign?function(t){if(t===n||null===t)throw new TypeError("Cannot convert undefined or null to object");for(var e=Object(t),i=1;i-1}function C(t){return t.trim().split(/\s+/g)}function $(t,e,i){if(t.indexOf&&!i)return t.indexOf(e);for(var n=0;ni[e]})):n.sort()),n}function S(t,e){for(var i,o,a=e[0].toUpperCase()+e.slice(1),l=0;l1&&!i.firstMultiple?i.firstMultiple=F(e):1===r&&(i.firstMultiple=!1);var a=i.firstInput,l=i.firstMultiple,d=l?l.center:a.center,u=e.center=B(o);e.timeStamp=c(),e.deltaTime=e.timeStamp-a.timeStamp,e.angle=X(d,u),e.distance=Y(d,u),function(t,e){var i=e.center,n=t.offsetDelta||{},o=t.prevDelta||{},r=t.prevInput||{};1!==e.eventType&&4!==r.eventType||(o=t.prevDelta={x:r.deltaX||0,y:r.deltaY||0},n=t.offsetDelta={x:i.x,y:i.y}),e.deltaX=o.x+(i.x-n.x),e.deltaY=o.y+(i.y-n.y)}(i,e),e.offsetDirection=H(e.deltaX,e.deltaY);var h,m,p=U(e.deltaTime,e.deltaX,e.deltaY);e.overallVelocityX=p.x,e.overallVelocityY=p.y,e.overallVelocity=s(p.x)>s(p.y)?p.x:p.y,e.scale=l?(h=l.pointers,Y((m=o)[0],m[1],N)/Y(h[0],h[1],N)):1,e.rotation=l?function(t,e){return X(e[1],e[0],N)+X(t[1],t[0],N)}(l.pointers,o):0,e.maxPointers=i.prevInput?e.pointers.length>i.prevInput.maxPointers?e.pointers.length:i.prevInput.maxPointers:e.pointers.length,function(t,e){var i,o,r,a,l=t.lastInterval||e,c=e.timeStamp-l.timeStamp;if(8!=e.eventType&&(c>25||l.velocity===n)){var d=e.deltaX-l.deltaX,u=e.deltaY-l.deltaY,h=U(c,d,u);o=h.x,r=h.y,i=s(h.x)>s(h.y)?h.x:h.y,a=H(d,u),t.lastInterval=e}else i=l.velocity,o=l.velocityX,r=l.velocityY,a=l.direction;e.velocity=i,e.velocityX=o,e.velocityY=r,e.direction=a}(i,e);var f=t.element;w(e.srcEvent.target,f)&&(f=e.srcEvent.target),e.target=f}(t,i),t.emit("hammer.input",i),t.recognize(i),t.session.prevInput=i}function F(t){for(var e=[],i=0;i=s(e)?t<0?2:4:e<0?8:16}function Y(t,e,i){i||(i=P);var n=e[i[0]]-t[i[0]],o=e[i[1]]-t[i[1]];return Math.sqrt(n*n+o*o)}function X(t,e,i){i||(i=P);var n=e[i[0]]-t[i[0]],o=e[i[1]]-t[i[1]];return 180*Math.atan2(o,n)/Math.PI}V.prototype={handler:function(){},init:function(){this.evEl&&y(this.element,this.evEl,this.domHandler),this.evTarget&&y(this.target,this.evTarget,this.domHandler),this.evWin&&y(T(this.element),this.evWin,this.domHandler)},destroy:function(){this.evEl&&x(this.element,this.evEl,this.domHandler),this.evTarget&&x(this.target,this.evTarget,this.domHandler),this.evWin&&x(T(this.element),this.evWin,this.domHandler)}};var W={mousedown:1,mousemove:2,mouseup:4},q="mousedown",K="mousemove mouseup";function G(){this.evEl=q,this.evWin=K,this.pressed=!1,V.apply(this,arguments)}g(G,V,{handler:function(t){var e=W[t.type];1&e&&0===t.button&&(this.pressed=!0),2&e&&1!==t.which&&(e=4),this.pressed&&(4&e&&(this.pressed=!1),this.callback(this.manager,e,{pointers:[t],changedPointers:[t],pointerType:D,srcEvent:t}))}});var Z={pointerdown:1,pointermove:2,pointerup:4,pointercancel:8,pointerout:8},J={2:L,3:"pen",4:D,5:"kinect"},Q="pointerdown",tt="pointermove pointerup pointercancel";function et(){this.evEl=Q,this.evWin=tt,V.apply(this,arguments),this.store=this.manager.session.pointerEvents=[]}t.MSPointerEvent&&!t.PointerEvent&&(Q="MSPointerDown",tt="MSPointerMove MSPointerUp MSPointerCancel"),g(et,V,{handler:function(t){var e=this.store,i=!1,n=t.type.toLowerCase().replace("ms",""),o=Z[n],r=J[t.pointerType]||t.pointerType,a=r==L,l=$(e,t.pointerId,"pointerId");1&o&&(0===t.button||a)?l<0&&(e.push(t),l=e.length-1):12&o&&(i=!0),l<0||(e[l]=t,this.callback(this.manager,o,{pointers:e,changedPointers:[t],pointerType:r,srcEvent:t}),i&&e.splice(l,1))}});var it={touchstart:1,touchmove:2,touchend:4,touchcancel:8},nt="touchstart",ot="touchstart touchmove touchend touchcancel";function rt(){this.evTarget=nt,this.evWin=ot,this.started=!1,V.apply(this,arguments)}function at(t,e){var i=E(t.touches),n=E(t.changedTouches);return 12&e&&(i=A(i.concat(n),"identifier",!0)),[i,n]}g(rt,V,{handler:function(t){var e=it[t.type];if(1===e&&(this.started=!0),this.started){var i=at.call(this,t,e);12&e&&i[0].length-i[1].length==0&&(this.started=!1),this.callback(this.manager,e,{pointers:i[0],changedPointers:i[1],pointerType:L,srcEvent:t})}}});var lt={touchstart:1,touchmove:2,touchend:4,touchcancel:8},st="touchstart touchmove touchend touchcancel";function ct(){this.evTarget=st,this.targetIds={},V.apply(this,arguments)}function dt(t,e){var i=E(t.touches),n=this.targetIds;if(3&e&&1===i.length)return n[i[0].identifier]=!0,[i,i];var o,r,a=E(t.changedTouches),l=[],s=this.target;if(r=i.filter((function(t){return w(t.target,s)})),1===e)for(o=0;o-1&&n.splice(t,1)}),2500)}}function pt(t){for(var e=t.srcEvent.clientX,i=t.srcEvent.clientY,n=0;n-1&&this.requireFail.splice(e,1),this},hasRequireFailures:function(){return this.requireFail.length>0},canRecognizeWith:function(t){return!!this.simultaneous[t.id]},emit:function(t){var e=this,i=this.state;function n(i){e.manager.emit(i,t)}i<8&&n(e.options.event+At(i)),n(e.options.event),t.additionalEvent&&n(t.additionalEvent),i>=8&&n(e.options.event+At(i))},tryEmit:function(t){if(this.canEmit())return this.emit(t);this.state=$t},canEmit:function(){for(var t=0;te.threshold&&o&e.direction},attrTest:function(t){return Tt.prototype.attrTest.call(this,t)&&(2&this.state||!(2&this.state)&&this.directionTest(t))},emit:function(t){this.pX=t.deltaX,this.pY=t.deltaY;var e=St(t.direction);e&&(t.additionalEvent=this.options.event+e),this._super.emit.call(this,t)}}),g(Ot,Tt,{defaults:{event:"pinch",threshold:0,pointers:2},getTouchAction:function(){return[yt]},attrTest:function(t){return this._super.attrTest.call(this,t)&&(Math.abs(t.scale-1)>this.options.threshold||2&this.state)},emit:function(t){if(1!==t.scale){var e=t.scale<1?"in":"out";t.additionalEvent=this.options.event+e}this._super.emit.call(this,t)}}),g(Mt,Et,{defaults:{event:"press",pointers:1,time:251,threshold:9},getTouchAction:function(){return[vt]},process:function(t){var e=this.options,i=t.pointers.length===e.pointers,n=t.distancee.time;if(this._input=t,!n||!i||12&t.eventType&&!o)this.reset();else if(1&t.eventType)this.reset(),this._timer=d((function(){this.state=8,this.tryEmit()}),e.time,this);else if(4&t.eventType)return 8;return $t},reset:function(){clearTimeout(this._timer)},emit:function(t){8===this.state&&(t&&4&t.eventType?this.manager.emit(this.options.event+"up",t):(this._input.timeStamp=c(),this.manager.emit(this.options.event,this._input)))}}),g(Lt,Tt,{defaults:{event:"rotate",threshold:0,pointers:2},getTouchAction:function(){return[yt]},attrTest:function(t){return this._super.attrTest.call(this,t)&&(Math.abs(t.rotation)>this.options.threshold||2&this.state)}}),g(Dt,Tt,{defaults:{event:"swipe",threshold:10,velocity:.3,direction:30,pointers:1},getTouchAction:function(){return zt.prototype.getTouchAction.call(this)},attrTest:function(t){var e,i=this.options.direction;return 30&i?e=t.overallVelocity:6&i?e=t.overallVelocityX:i&j&&(e=t.overallVelocityY),this._super.attrTest.call(this,t)&&i&t.offsetDirection&&t.distance>this.options.threshold&&t.maxPointers==this.options.pointers&&s(e)>this.options.velocity&&4&t.eventType},emit:function(t){var e=St(t.offsetDirection);e&&this.manager.emit(this.options.event+e,t),this.manager.emit(this.options.event,t)}}),g(jt,Et,{defaults:{event:"tap",pointers:1,taps:1,interval:300,time:250,threshold:9,posThreshold:10},getTouchAction:function(){return[bt]},process:function(t){var e=this.options,i=t.pointers.length===e.pointers,n=t.distance{const e=t.center.x,i=t.target.getBoundingClientRect().left,n=t.target.clientWidth;return Math.max(Math.min(1,(e-i)/n),0)};let hs=class extends ot{constructor(){super(...arguments),this.disabled=!1,this.inactive=!1,this.step=1,this.min=0,this.max=100,this.controlled=!1}valueToPercentage(t){return(t-this.min)/(this.max-this.min)}percentageToValue(t){return(this.max-this.min)*t+this.min}firstUpdated(t){super.firstUpdated(t),this.setupListeners()}connectedCallback(){super.connectedCallback(),this.setupListeners()}disconnectedCallback(){super.disconnectedCallback(),this.destroyListeners()}setupListeners(){if(this.slider&&!this._mc){const t=(t=>{const e=window.getComputedStyle(t).getPropertyValue("--slider-threshold"),i=parseFloat(e);return isNaN(i)?10:i})(this.slider);let e;this._mc=new Hammer.Manager(this.slider,{touchAction:"pan-y"}),this._mc.add(new Hammer.Pan({threshold:t,direction:Hammer.DIRECTION_ALL,enable:!0})),this._mc.add(new Hammer.Tap({event:"singletap"})),this._mc.on("panstart",(()=>{this.disabled||(this.controlled=!0,e=this.value)})),this._mc.on("pancancel",(()=>{this.disabled||(this.controlled=!1,this.value=e)})),this._mc.on("panmove",(t=>{if(this.disabled)return;const e=us(t);this.value=this.percentageToValue(e),this.dispatchEvent(new CustomEvent("current-change",{detail:{value:Math.round(this.value/this.step)*this.step}}))})),this._mc.on("panend",(t=>{if(this.disabled)return;this.controlled=!1;const e=us(t);this.value=Math.round(this.percentageToValue(e)/this.step)*this.step,this.dispatchEvent(new CustomEvent("current-change",{detail:{value:void 0}})),this.dispatchEvent(new CustomEvent("change",{detail:{value:this.value}}))})),this._mc.on("singletap",(t=>{if(this.disabled)return;const e=us(t);this.value=Math.round(this.percentageToValue(e)/this.step)*this.step,this.dispatchEvent(new CustomEvent("change",{detail:{value:this.value}}))}))}}destroyListeners(){this._mc&&(this._mc.destroy(),this._mc=void 0)}render(){var t;return N` +
- ${this.showActive?ut`
`:null} - ${this.showIndicator?ut`
`:null} + ${this.showActive?N`
`:null} + ${this.showIndicator?N`
`:null}
- `}static get styles(){return N` + `}static get styles(){return d` :host { --main-color: rgba(var(--rgb-secondary-text-color), 1); --bg-gradient: none; --bg-color: rgba(var(--rgb-secondary-text-color), 0.2); - --main-color-inactive: var(--disabled-text-color); - --bg-color-inactive: rgba(var(--rgb-primary-text-color), 0.05); + --main-color-inactive: rgb(var(--rgb-disabled)); + --bg-color-inactive: rgba(var(--rgb-disabled), 0.2); } .container { display: flex; flex-direction: row; - height: 42px; + height: var(--control-height); } .slider { position: relative; @@ -1528,6 +2065,7 @@ const Ln=N`.mdc-floating-label{-moz-osx-font-smoothing:grayscale;-webkit-font-sm transform: scale3d(var(--value, 0), 1, 1); transform-origin: left; background-color: var(--main-color); + transition: transform 180ms ease-in-out; } .slider .slider-track-indicator { position: absolute; @@ -1538,6 +2076,7 @@ const Ln=N`.mdc-floating-label{-moz-osx-font-smoothing:grayscale;-webkit-font-sm border-radius: 3px; background-color: white; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12); + transition: left 180ms ease-in-out; } .slider .slider-track-indicator:after { display: block; @@ -1563,71 +2102,92 @@ const Ln=N`.mdc-floating-label{-moz-osx-font-smoothing:grayscale;-webkit-font-sm .inactive .slider .slider-track-active { background-color: var(--main-color-inactive); } - `}};function Ur(t){return null!=t.attributes.current_position?Math.round(t.attributes.current_position):void 0}n([zt({type:Boolean})],Br.prototype,"disabled",void 0),n([zt({type:Boolean})],Br.prototype,"inactive",void 0),n([zt({type:Boolean,attribute:"show-active"})],Br.prototype,"showActive",void 0),n([zt({type:Boolean,attribute:"show-indicator"})],Br.prototype,"showIndicator",void 0),n([zt({attribute:!1,type:Number,reflect:!0})],Br.prototype,"value",void 0),n([zt({type:Number})],Br.prototype,"min",void 0),n([zt({type:Number})],Br.prototype,"max",void 0),n([Pt("#slider")],Br.prototype,"slider",void 0),Br=n([Dt("mushroom-slider")],Br);let Hr=class extends Ot{onChange(t){const e=t.detail.value;this.hass.callService("cover","set_cover_position",{entity_id:this.entity.entity_id,position:e})}onCurrentChange(t){const e=t.detail.value;this.dispatchEvent(new CustomEvent("current-change",{detail:{value:e}}))}render(){const t=Ur(this.entity);return ut` + .controlled .slider .slider-track-active { + transition: none; + } + .controlled .slider .slider-track-indicator { + transition: none; + } + `}};function ms(t){return null!=t.attributes.current_position?Math.round(t.attributes.current_position):void 0}function ps(t){const e=t.state;return"open"===e||"opening"===e?"var(--rgb-state-cover-open)":"closed"===e||"closing"===e?"var(--rgb-state-cover-closed)":"var(--rgb-disabled)"}n([st({type:Boolean})],hs.prototype,"disabled",void 0),n([st({type:Boolean})],hs.prototype,"inactive",void 0),n([st({type:Boolean,attribute:"show-active"})],hs.prototype,"showActive",void 0),n([st({type:Boolean,attribute:"show-indicator"})],hs.prototype,"showIndicator",void 0),n([st({attribute:!1,type:Number,reflect:!0})],hs.prototype,"value",void 0),n([st({type:Number})],hs.prototype,"step",void 0),n([st({type:Number})],hs.prototype,"min",void 0),n([st({type:Number})],hs.prototype,"max",void 0),n([ct()],hs.prototype,"controlled",void 0),n([ht("#slider")],hs.prototype,"slider",void 0),hs=n([at("mushroom-slider")],hs);let fs=class extends ot{onChange(t){const e=t.detail.value;this.hass.callService("cover","set_cover_position",{entity_id:this.entity.entity_id,position:e})}onCurrentChange(t){const e=t.detail.value;this.dispatchEvent(new CustomEvent("current-change",{detail:{value:e}}))}render(){const t=ms(this.entity);return N` - `}static get styles(){return N` + `}static get styles(){return d` mushroom-slider { - --main-color: rgb(var(--rgb-state-cover)); - --bg-color: rgba(var(--rgb-state-cover), 0.2); - } - `}};n([zt({attribute:!1})],Hr.prototype,"hass",void 0),n([zt({attribute:!1})],Hr.prototype,"entity",void 0),Hr=n([Dt("mushroom-cover-position-control")],Hr);const Yr={buttons_control:"mdi:gesture-tap-button",position_control:"mdi:gesture-swipe-horizontal"};vo({type:"mushroom-cover-card",name:"Mushroom Cover Card",description:"Card for cover entity"});let Xr=class extends Ot{constructor(){super(...arguments),this._controls=[]}static async getConfigElement(){return await Promise.resolve().then((function(){return Zd})),document.createElement("mushroom-cover-card-editor")}static async getStubConfig(t){const e=Object.keys(t.states).filter((t=>Rr.includes(t.split(".")[0])));return{type:"custom:mushroom-cover-card",entity:e[0]}}get _nextControl(){var t;if(this._activeControl)return null!==(t=this._controls[this._controls.indexOf(this._activeControl)+1])&&void 0!==t?t:this._controls[0]}_onNextControlTap(t){t.stopPropagation(),this._activeControl=this._nextControl}getCardSize(){return 1}setConfig(t){var e,i;this._config=Object.assign({tap_action:{action:"toggle"},hold_action:{action:"more-info"},double_tap_action:{action:"more-info"}},t);const n=[];(null===(e=this._config)||void 0===e?void 0:e.show_buttons_control)&&n.push("buttons_control"),(null===(i=this._config)||void 0===i?void 0:i.show_position_control)&&n.push("position_control"),this._controls=n,this._activeControl=n[0],this.updatePosition()}updated(t){super.updated(t),this.hass&&t.has("hass")&&this.updatePosition()}updatePosition(){if(this.position=void 0,!this._config||!this.hass||!this._config.entity)return;const t=this._config.entity,e=this.hass.states[t];e&&(this.position=Ur(e))}onCurrentPositionChange(t){null!=t.detail.value&&(this.position=t.detail.value)}_handleAction(t){S(this,this.hass,this._config,t.detail.action)}render(){if(!this.hass||!this._config||!this._config.entity)return ut``;const t=this._config.entity,e=this.hass.states[t],i=this._config.name||e.attributes.friendly_name,n=this._config.icon||Io(e),o=Jo(this._config),r=this._config.hide_state;let a=`${ao(this.hass.localize,e,this.hass.locale)}`;this.position&&(a+=` - ${this.position}%`);const s=g(this.hass);return ut` - - - - ${Un(e)?null:ut` - - `} - - - ${this._controls.length>0?ut` -
- ${this.renderActiveControl(e,o)} - ${this.renderNextControlButton()} -
- `:null} -
- `}renderNextControlButton(){return this._nextControl&&this._nextControl!=this._activeControl?ut` + --main-color: var(--slider-color); + --bg-color: var(--slider-bg-color); + } + `}};n([st({attribute:!1})],fs.prototype,"hass",void 0),n([st({attribute:!1})],fs.prototype,"entity",void 0),fs=n([at("mushroom-cover-position-control")],fs);const gs=function(t=24,e=.2){const i=[];for(let n=0;n + `}static get styles(){const t=gs.map((([t,e])=>`${e} ${100*t}%`)).join(", ");return d` + mushroom-slider { + --main-color: var(--slider-color); + --bg-color: var(--slider-bg-color); + --gradient: -webkit-linear-gradient(left, ${c(t)}); + } + `}};n([st({attribute:!1})],_s.prototype,"hass",void 0),n([st({attribute:!1})],_s.prototype,"entity",void 0),_s=n([at("mushroom-cover-tilt-position-control")],_s);const vs={buttons_control:"mdi:gesture-tap-button",position_control:"mdi:gesture-swipe-horizontal",tilt_position_control:"mdi:rotate-right"};ll({type:"mushroom-cover-card",name:"Mushroom Cover Card",description:"Card for cover entity"});let bs=class extends rl{constructor(){super(...arguments),this._controls=[]}static async getConfigElement(){return await Promise.resolve().then((function(){return Sm})),document.createElement("mushroom-cover-card-editor")}static async getStubConfig(t){const e=Object.keys(t.states).filter((t=>ss.includes(t.split(".")[0])));return{type:"custom:mushroom-cover-card",entity:e[0]}}get _nextControl(){var t;if(this._activeControl)return null!==(t=this._controls[this._controls.indexOf(this._activeControl)+1])&&void 0!==t?t:this._controls[0]}_onNextControlTap(t){t.stopPropagation(),this._activeControl=this._nextControl}getCardSize(){return 1}setConfig(t){var e,i,n;this._config=Object.assign({tap_action:{action:"toggle"},hold_action:{action:"more-info"}},t);const o=[];(null===(e=this._config)||void 0===e?void 0:e.show_buttons_control)&&o.push("buttons_control"),(null===(i=this._config)||void 0===i?void 0:i.show_position_control)&&o.push("position_control"),(null===(n=this._config)||void 0===n?void 0:n.show_tilt_position_control)&&o.push("tilt_position_control"),this._controls=o,this._activeControl=o[0],this.updatePosition()}updated(t){super.updated(t),this.hass&&t.has("hass")&&this.updatePosition()}updatePosition(){if(this.position=void 0,!this._config||!this.hass||!this._config.entity)return;const t=this._config.entity,e=this.hass.states[t];e&&(this.position=ms(e))}onCurrentPositionChange(t){null!=t.detail.value&&(this.position=t.detail.value)}_handleAction(t){Oe(this,this.hass,this._config,t.detail.action)}render(){if(!this.hass||!this._config||!this._config.entity)return N``;const t=this._config.entity,e=this.hass.states[t],i=this._config.name||e.attributes.friendly_name||"",n=this._config.icon||pl(e),o=Ka(this._config),r=Ta(e,o.icon_type);let a=Ht(this.hass.localize,e,this.hass.locale);this.position&&(a+=` - ${this.position}%`);const l=pe(this.hass);return N` + + + + ${r?this.renderPicture(r):this.renderIcon(e,n)} + ${this.renderBadge(e)} + ${this.renderStateInfo(e,o,i,a)}; + + ${this._controls.length>0?N` +
+ ${this.renderActiveControl(e,o.layout)} + ${this.renderNextControlButton()} +
+ `:null} +
+
+ `}renderIcon(t,e){const i={},n=Dt(t),o=ps(t);return i["--icon-color"]=`rgb(${o})`,i["--shape-color"]=`rgba(${o}, 0.2)`,N` + + `}renderNextControlButton(){return this._nextControl&&this._nextControl!=this._activeControl?N` - `:null}renderActiveControl(t,e){switch(this._activeControl){case"buttons_control":return ut` + `:null}renderActiveControl(t,e){switch(this._activeControl){case"buttons_control":return N` - `;case"position_control":return ut` + `;case"position_control":{const e=ps(t),i={};return i["--slider-color"]=`rgb(${e})`,i["--slider-bg-color"]=`rgba(${e}, 0.2)`,N` - `;default:return null}}static get styles(){return[bo,N` + `}case"tilt_position_control":{const e=ps(t),i={};return i["--slider-color"]=`rgb(${e})`,i["--slider-bg-color"]=`rgba(${e}, 0.2)`,N` + + `}default:return null}}static get styles(){return[super.styles,al,d` mushroom-state-item { cursor: pointer; } @@ -1639,70 +2199,32 @@ const Ln=N`.mdc-floating-label{-moz-osx-font-smoothing:grayscale;-webkit-font-sm mushroom-cover-position-control { flex: 1; } - `]}};n([zt({attribute:!1})],Xr.prototype,"hass",void 0),n([jt()],Xr.prototype,"_config",void 0),n([jt()],Xr.prototype,"_activeControl",void 0),n([jt()],Xr.prototype,"_controls",void 0),n([jt()],Xr.prototype,"position",void 0),Xr=n([Dt("mushroom-cover-card")],Xr);let qr=class extends Ot{constructor(){super(...arguments),this.picture_url=""}render(){return ut` -
- -
- `}static get styles(){return N` - :host { - --main-color: var(--primary-text-color); - --main-color-disabled: var(--disabled-text-color); - --shape-color: rgba(var(--rgb-primary-text-color), 0.05); - --shape-color-disabled: rgba(var(--rgb-primary-text-color), 0.05); - flex: none; - } - .container { - position: relative; - width: 42px; - height: 42px; - flex: none; - display: flex; - align-items: center; - justify-content: center; - } - .picture { - width: 100%; - height: 100%; - border-radius: var(--icon-border-radius); - } - `}};n([zt()],qr.prototype,"picture_url",void 0),qr=n([Dt("mushroom-shape-avatar")],qr);vo({type:"mushroom-entity-card",name:"Mushroom Entity Card",description:"Card for all entities"});let Wr=class extends Ot{static async getConfigElement(){return await Promise.resolve().then((function(){return eu})),document.createElement("mushroom-entity-card-editor")}static async getStubConfig(t){return{type:"custom:mushroom-entity-card",entity:Object.keys(t.states)[0]}}getCardSize(){return 1}setConfig(t){this._config=Object.assign({tap_action:{action:"more-info"},hold_action:{action:"more-info"},double_tap_action:{action:"more-info"}},t)}_handleAction(t){S(this,this.hass,this._config,t.detail.action)}render(){var t,e;if(!this._config||!this.hass||!this._config.entity)return ut``;const i=this._config.entity,n=this.hass.states[i],o=this._config.name||n.attributes.friendly_name||"",r=this._config.icon||Io(n),a=!!this._config.hide_icon,s=Jo(this._config),l=this._config.use_entity_picture?n.attributes.entity_picture:void 0,c=ao(this.hass.localize,n,this.hass.locale),d=qn(null!==(t=this._config.primary_info)&&void 0!==t?t:"name",o,c,n,this.hass),u=qn(null!==(e=this._config.secondary_info)&&void 0!==e?e:"state",o,c,n,this.hass),h=this._config.icon_color,m=g(this.hass);return ut` - - - ${l?ut` - - `:this.renderIcon(r,h,Bn(n))} - ${Un(n)?null:ut` - - `} - - - - `}renderIcon(t,e,i){const n={};if(e){const t=ci(e);n["--icon-color"]=`rgb(${t})`,n["--shape-color"]=`rgba(${t}, 0.2)`}return ut` + mushroom-cover-tilt-position-control { + flex: 1; + } + `]}};n([ct()],bs.prototype,"_config",void 0),n([ct()],bs.prototype,"_activeControl",void 0),n([ct()],bs.prototype,"_controls",void 0),n([ct()],bs.prototype,"position",void 0),bs=n([at("mushroom-cover-card")],bs);ll({type:"mushroom-entity-card",name:"Mushroom Entity Card",description:"Card for all entities"});let ys=class extends rl{static async getConfigElement(){return await Promise.resolve().then((function(){return Om})),document.createElement("mushroom-entity-card-editor")}static async getStubConfig(t){return{type:"custom:mushroom-entity-card",entity:Object.keys(t.states)[0]}}getCardSize(){return 1}setConfig(t){this._config=Object.assign({tap_action:{action:"more-info"},hold_action:{action:"more-info"}},t)}_handleAction(t){Oe(this,this.hass,this._config,t.detail.action)}render(){if(!this._config||!this.hass||!this._config.entity)return N``;const t=this._config.entity,e=this.hass.states[t],i=this._config.name||e.attributes.friendly_name||"",n=this._config.icon||pl(e),o=Ka(this._config),r=Ta(e,o.icon_type),a=pe(this.hass);return N` + + + + ${r?this.renderPicture(r):this.renderIcon(e,n)} + ${this.renderBadge(e)} + ${this.renderStateInfo(e,o,i)}; + + + + `}renderIcon(t,e){var i;const n=Lt(t),o={},r=null===(i=this._config)||void 0===i?void 0:i.icon_color;if(r){const t=xa(r);o["--icon-color"]=`rgb(${t})`,o["--shape-color"]=`rgba(${t}, 0.2)`}return N` - `}static get styles(){return[bo,N` + `}static get styles(){return[super.styles,al,d` mushroom-state-item { cursor: pointer; } @@ -1710,82 +2232,77 @@ const Ln=N`.mdc-floating-label{-moz-osx-font-smoothing:grayscale;-webkit-font-sm --icon-color: rgb(var(--rgb-state-entity)); --shape-color: rgba(var(--rgb-state-entity), 0.2); } - `]}};n([zt({attribute:!1})],Wr.prototype,"hass",void 0),n([jt()],Wr.prototype,"_config",void 0),Wr=n([Dt("mushroom-entity-card")],Wr);const Gr=["fan"];function Kr(t){return null!=t.attributes.percentage?Math.round(t.attributes.percentage):void 0}function Zr(t){return null!=t.attributes.oscillating&&Boolean(t.attributes.oscillating)}let Jr=class extends Ot{_onTap(t){t.stopPropagation();const e=Zr(this.entity);this.hass.callService("fan","oscillate",{entity_id:this.entity.entity_id,oscillating:!e})}render(){const t=Zr(this.entity),e=Bn(this.entity);return ut` + `]}};n([ct()],ys.prototype,"_config",void 0),ys=n([at("mushroom-entity-card")],ys);const xs=["fan"];function ws(t){return null!=t.attributes.percentage?Math.round(t.attributes.percentage):void 0}function ks(t){return null!=t.attributes.oscillating&&Boolean(t.attributes.oscillating)}let Cs=class extends ot{_onTap(t){t.stopPropagation();const e=ks(this.entity);this.hass.callService("fan","oscillate",{entity_id:this.entity.entity_id,oscillating:!e})}render(){const t=ks(this.entity),e=Lt(this.entity);return N` - `}static get styles(){return N` + `}static get styles(){return d` :host { display: flex; } mushroom-button.active { - --icon-color: rgb(var(--rgb-white)); - --bg-color: rgb(var(--rgb-state-fan)); + --icon-color: rgb(var(--rgb-state-fan)); + --bg-color: rgba(var(--rgb-state-fan), 0.2); } - `}};n([zt({attribute:!1})],Jr.prototype,"hass",void 0),n([zt({attribute:!1})],Jr.prototype,"entity",void 0),Jr=n([Dt("mushroom-fan-oscillate-control")],Jr);let Qr=class extends Ot{onChange(t){const e=t.detail.value;this.hass.callService("fan","set_percentage",{entity_id:this.entity.entity_id,percentage:e})}onCurrentChange(t){const e=t.detail.value;this.dispatchEvent(new CustomEvent("current-change",{detail:{value:e}}))}render(){const t=Kr(this.entity);return ut` + `}};n([st({attribute:!1})],Cs.prototype,"hass",void 0),n([st({attribute:!1})],Cs.prototype,"entity",void 0),Cs=n([at("mushroom-fan-oscillate-control")],Cs);let $s=class extends ot{onChange(t){const e=t.detail.value;this.hass.callService("fan","set_percentage",{entity_id:this.entity.entity_id,percentage:e})}onCurrentChange(t){const e=t.detail.value;this.dispatchEvent(new CustomEvent("current-change",{detail:{value:e}}))}render(){const t=ws(this.entity);return N` - `}static get styles(){return N` + `;var e}static get styles(){return d` mushroom-slider { --main-color: rgb(var(--rgb-state-fan)); --bg-color: rgba(var(--rgb-state-fan), 0.2); } - `}};n([zt({attribute:!1})],Qr.prototype,"hass",void 0),n([zt({attribute:!1})],Qr.prototype,"entity",void 0),Qr=n([Dt("mushroom-fan-percentage-control")],Qr),vo({type:"mushroom-fan-card",name:"Mushroom Fan Card",description:"Card for fan entity"});let ta=class extends Ot{static async getConfigElement(){return await Promise.resolve().then((function(){return au})),document.createElement("mushroom-fan-card-editor")}static async getStubConfig(t){const e=Object.keys(t.states).filter((t=>Gr.includes(t.split(".")[0])));return{type:"custom:mushroom-fan-card",entity:e[0]}}getCardSize(){return 1}setConfig(t){this._config=Object.assign({tap_action:{action:"toggle"},hold_action:{action:"more-info"},double_tap_action:{action:"more-info"}},t),this.updatePercentage()}updated(t){super.updated(t),this.hass&&t.has("hass")&&this.updatePercentage()}updatePercentage(){if(this.percentage=void 0,!this._config||!this.hass||!this._config.entity)return;const t=this._config.entity,e=this.hass.states[t];e&&(this.percentage=Kr(e))}onCurrentPercentageChange(t){null!=t.detail.value&&(this.percentage=t.detail.value)}_handleAction(t){S(this,this.hass,this._config,t.detail.action)}render(){if(!this._config||!this.hass||!this._config.entity)return ut``;const t=this._config.entity,e=this.hass.states[t],i=this._config.name||e.attributes.friendly_name,n=this._config.icon||Io(e),o=Jo(this._config),r=this._config.hide_state,a=ao(this.hass.localize,e,this.hass.locale),s=Bn(e);let l={};const c=Kr(e);if(s)if(c){const t=1.5*(c/100)**.5;l["--animation-duration"]=1/t+"s"}else l["--animation-duration"]="1s";let d=`${a}`;this.percentage&&(d+=` - ${this.percentage}%`);const u=g(this.hass);return ut` - - - - ${Un(e)?null:ut` - - `} - - - ${this._config.show_percentage_control||this._config.show_oscillate_control?ut` -
- ${this._config.show_percentage_control?ut` - - `:null} - ${this._config.show_oscillate_control?ut` - - `:null} -
- `:null} -
- `}static get styles(){return[bo,N` + `}};n([st({attribute:!1})],$s.prototype,"hass",void 0),n([st({attribute:!1})],$s.prototype,"entity",void 0),$s=n([at("mushroom-fan-percentage-control")],$s),ll({type:"mushroom-fan-card",name:"Mushroom Fan Card",description:"Card for fan entity"});let Es=class extends rl{static async getConfigElement(){return await Promise.resolve().then((function(){return Pm})),document.createElement("mushroom-fan-card-editor")}static async getStubConfig(t){const e=Object.keys(t.states).filter((t=>xs.includes(t.split(".")[0])));return{type:"custom:mushroom-fan-card",entity:e[0]}}getCardSize(){return 1}setConfig(t){this._config=Object.assign({tap_action:{action:"toggle"},hold_action:{action:"more-info"}},t),this.updatePercentage()}updated(t){super.updated(t),this.hass&&t.has("hass")&&this.updatePercentage()}updatePercentage(){if(this.percentage=void 0,!this._config||!this.hass||!this._config.entity)return;const t=this._config.entity,e=this.hass.states[t];e&&(this.percentage=ws(e))}onCurrentPercentageChange(t){null!=t.detail.value&&(this.percentage=Math.round(t.detail.value))}_handleAction(t){Oe(this,this.hass,this._config,t.detail.action)}render(){if(!this._config||!this.hass||!this._config.entity)return N``;const t=this._config.entity,e=this.hass.states[t],i=this._config.name||e.attributes.friendly_name||"",n=this._config.icon||pl(e),o=Ka(this._config),r=Ta(e,o.icon_type);let a=Ht(this.hass.localize,e,this.hass.locale);null!=this.percentage&&(a=`${this.percentage}%`);const l=pe(this.hass),s=(!this._config.collapsible_controls||Lt(e))&&(this._config.show_percentage_control||this._config.show_oscillate_control);return N` + + + + ${r?this.renderPicture(r):this.renderIcon(e,n)} + ${this.renderBadge(e)} + ${this.renderStateInfo(e,o,i,a)}; + + ${s?N` +
+ ${this._config.show_percentage_control?N` + + `:null} + ${this._config.show_oscillate_control?N` + + `:null} +
+ `:null} +
+
+ `}renderIcon(t,e){var i;let n={};const o=ws(t),r=Lt(t);if(r)if(o){const t=1.5*(o/100)**.5;n["--animation-duration"]=1/t+"s"}else n["--animation-duration"]="1s";return N` + + `}static get styles(){return[super.styles,al,d` mushroom-state-item { cursor: pointer; } @@ -1802,16 +2319,65 @@ const Ln=N`.mdc-floating-label{-moz-osx-font-smoothing:grayscale;-webkit-font-sm mushroom-fan-percentage-control { flex: 1; } - `]}};n([zt({attribute:!1})],ta.prototype,"hass",void 0),n([jt()],ta.prototype,"_config",void 0),n([jt()],ta.prototype,"percentage",void 0),ta=n([Dt("mushroom-fan-card")],ta);const ea=["light"];let ia=class extends Ot{onChange(t){const e=t.detail.value;this.hass.callService("light","turn_on",{entity_id:this.entity.entity_id,brightness_pct:e})}onCurrentChange(t){const e=t.detail.value;this.dispatchEvent(new CustomEvent("current-change",{detail:{value:e}}))}render(){const t=Ir(this.entity);return ut` + `]}};n([ct()],Es.prototype,"_config",void 0),n([ct()],Es.prototype,"percentage",void 0),Es=n([at("mushroom-fan-card")],Es);const As=["humidifier"];let Ss=class extends ot{onChange(t){const e=t.detail.value;this.hass.callService("humidifier","set_humidity",{entity_id:this.entity.entity_id,humidity:e})}onCurrentChange(t){const e=t.detail.value;this.dispatchEvent(new CustomEvent("current-change",{detail:{value:e}}))}render(){const t=this.entity.attributes.max_humidity||100,e=this.entity.attributes.min_humidity||0;return N``}static get styles(){return d` + mushroom-slider { + --main-color: rgb(var(--rgb-state-humidifier)); + --bg-color: rgba(var(--rgb-state-humidifier), 0.2); + } + `}};n([st({attribute:!1})],Ss.prototype,"hass",void 0),n([st({attribute:!1})],Ss.prototype,"entity",void 0),n([st({attribute:!1})],Ss.prototype,"color",void 0),Ss=n([at("mushroom-humidifier-humidity-control")],Ss),ll({type:"mushroom-humidifier-card",name:"Mushroom Humidifier Card",description:"Card for humidifier entity"});let Is=class extends rl{static async getConfigElement(){return await Promise.resolve().then((function(){return Bm})),document.createElement("mushroom-humidifier-card-editor")}static async getStubConfig(t){const e=Object.keys(t.states).filter((t=>As.includes(t.split(".")[0])));return{type:"custom:mushroom-humidifier-card",entity:e[0]}}getCardSize(){return 1}setConfig(t){this._config=Object.assign({tap_action:{action:"toggle"},hold_action:{action:"more-info"}},t)}_handleAction(t){Oe(this,this.hass,this._config,t.detail.action)}onCurrentHumidityChange(t){null!=t.detail.value&&(this.humidity=t.detail.value)}render(){if(!this._config||!this.hass||!this._config.entity)return N``;const t=this._config.entity,e=this.hass.states[t],i=this._config.name||e.attributes.friendly_name||"",n=this._config.icon||pl(e),o=Ka(this._config),r=Ta(e,o.icon_type);let a=Ht(this.hass.localize,e,this.hass.locale);this.humidity&&(a=`${this.humidity} %`);const l=pe(this.hass),s=(!this._config.collapsible_controls||Lt(e))&&this._config.show_target_humidity_control;return N` + + + + ${r?this.renderPicture(r):this.renderIcon(e,n)} + ${this.renderBadge(e)} + ${this.renderStateInfo(e,o,i,a)}; + + ${s?N` +
+ +
+ `:null} +
+
+ `}static get styles(){return[super.styles,al,d` + mushroom-state-item { + cursor: pointer; + } + mushroom-shape-icon { + --icon-color: rgb(var(--rgb-state-humidifier)); + --shape-color: rgba(var(--rgb-state-humidifier), 0.2); + } + mushroom-humidifier-humidity-control { + flex: 1; + } + `]}};n([ct()],Is.prototype,"_config",void 0),n([ct()],Is.prototype,"humidity",void 0),Is=n([at("mushroom-humidifier-card")],Is);const Ts=["light"];let zs=class extends ot{onChange(t){const e=t.detail.value;this.hass.callService("light","turn_on",{entity_id:this.entity.entity_id,brightness_pct:e})}onCurrentChange(t){const e=t.detail.value;this.dispatchEvent(new CustomEvent("current-change",{detail:{value:e}}))}render(){const t=Bl(this.entity);return N` - `}static get styles(){return N` + `}static get styles(){return d` :host { --slider-color: rgb(var(--rgb-state-light)); --slider-outline-color: transparent; @@ -1822,86 +2388,80 @@ const Ln=N`.mdc-floating-label{-moz-osx-font-smoothing:grayscale;-webkit-font-sm --bg-color: var(--slider-bg-color); --main-outline-color: var(--slider-outline-color); } - `}};n([zt({attribute:!1})],ia.prototype,"hass",void 0),n([zt({attribute:!1})],ia.prototype,"entity",void 0),ia=n([Dt("mushroom-light-brightness-control")],ia);const na=[[0,"#f00"],[.17,"#ff0"],[.33,"#0f0"],[.5,"#0ff"],[.66,"#00f"],[.83,"#f0f"],[1,"#f00"]];let oa=class extends Ot{constructor(){super(...arguments),this._percent=0}_percentToRGB(t){return si.hsv(360*t,100,100).rgb().array()}_rgbToPercent(t){return si.rgb(t).hsv().hue()/360}onChange(t){const e=t.detail.value;this._percent=e;const i=this._percentToRGB(e/100);3===i.length&&this.hass.callService("light","turn_on",{entity_id:this.entity.entity_id,rgb_color:i})}render(){const t=this._percent||100*this._rgbToPercent(this.entity.attributes.rgb_color);return ut` + `}};n([st({attribute:!1})],zs.prototype,"hass",void 0),n([st({attribute:!1})],zs.prototype,"entity",void 0),zs=n([at("mushroom-light-brightness-control")],zs);const Os=[[0,"#f00"],[.17,"#ff0"],[.33,"#0f0"],[.5,"#0ff"],[.66,"#00f"],[.83,"#f0f"],[1,"#f00"]];let Ms=class extends ot{constructor(){super(...arguments),this._percent=0}_percentToRGB(t){return ba.hsv(360*t,100,100).rgb().array()}_rgbToPercent(t){return ba.rgb(t).hsv().hue()/360}onChange(t){const e=t.detail.value;this._percent=e;const i=this._percentToRGB(e/100);3===i.length&&this.hass.callService("light","turn_on",{entity_id:this.entity.entity_id,rgb_color:i})}render(){const t=this._percent||100*this._rgbToPercent(this.entity.attributes.rgb_color);return N` - `}static get styles(){const t=na.map((([t,e])=>`${e} ${100*t}%`)).join(", ");return N` + `}static get styles(){const t=Os.map((([t,e])=>`${e} ${100*t}%`)).join(", ");return d` mushroom-slider { - --gradient: -webkit-linear-gradient(left, ${j(t)}); + --gradient: -webkit-linear-gradient(left, ${c(t)}); } - `}};n([zt({attribute:!1})],oa.prototype,"hass",void 0),n([zt({attribute:!1})],oa.prototype,"entity",void 0),oa=n([Dt("mushroom-light-color-control")],oa);let ra=class extends Ot{onChange(t){const e=t.detail.value;this.hass.callService("light","turn_on",{entity_id:this.entity.entity_id,color_temp:e})}render(){var t,e;const i=null!=(n=this.entity).attributes.color_temp?Math.round(n.attributes.color_temp):void 0;var n;return ut` + `}};n([st({attribute:!1})],Ms.prototype,"hass",void 0),n([st({attribute:!1})],Ms.prototype,"entity",void 0),Ms=n([at("mushroom-light-color-control")],Ms);let Ls=class extends ot{onChange(t){const e=t.detail.value;this.hass.callService("light","turn_on",{entity_id:this.entity.entity_id,color_temp:e})}render(){var t,e;const i=null!=(n=this.entity).attributes.color_temp?Math.round(n.attributes.color_temp):void 0;var n;return N` - `}static get styles(){return N` + `}static get styles(){return d` mushroom-slider { --gradient: -webkit-linear-gradient(right, rgb(255, 160, 0) 0%, white 100%); } - `}};n([zt({attribute:!1})],ra.prototype,"hass",void 0),n([zt({attribute:!1})],ra.prototype,"entity",void 0),ra=n([Dt("mushroom-light-color-temp-control")],ra);const aa={brightness_control:"mdi:brightness-4",color_temp_control:"mdi:thermometer",color_control:"mdi:palette"};vo({type:"mushroom-light-card",name:"Mushroom Light Card",description:"Card for light entity"});let sa=class extends Ot{constructor(){super(...arguments),this._controls=[]}static async getConfigElement(){return await Promise.resolve().then((function(){return yd})),document.createElement("mushroom-light-card-editor")}static async getStubConfig(t){const e=Object.keys(t.states).filter((t=>ea.includes(t.split(".")[0])));return{type:"custom:mushroom-light-card",entity:e[0]}}_onControlTap(t,e){e.stopPropagation(),this._activeControl=t}getCardSize(){return 1}setConfig(t){this._config=Object.assign({tap_action:{action:"toggle"},hold_action:{action:"more-info"},double_tap_action:{action:"more-info"}},t),this.updateControls(),this.updateBrightness()}updated(t){super.updated(t),this.hass&&t.has("hass")&&(this.updateControls(),this.updateBrightness())}updateBrightness(){if(this.brightness=void 0,!this._config||!this.hass||!this._config.entity)return;const t=this._config.entity,e=this.hass.states[t];e&&(this.brightness=Ir(e))}onCurrentBrightnessChange(t){null!=t.detail.value&&(this.brightness=t.detail.value)}updateControls(){if(!this._config||!this.hass||!this._config.entity)return;const t=this._config.entity,e=this.hass.states[t];if(!e)return;const i=[];this._config.show_brightness_control&&Lr(e)&&i.push("brightness_control"),this._config.show_color_temp_control&&function(t){var e;return null===(e=t.attributes.supported_color_modes)||void 0===e?void 0:e.some((t=>["color_temp"].includes(t)))}(e)&&i.push("color_temp_control"),this._config.show_color_control&&Dr(e)&&i.push("color_control"),this._controls=i;const n=!!this._activeControl&&i.includes(this._activeControl);this._activeControl=n?this._activeControl:i[0]}_handleAction(t){S(this,this.hass,this._config,t.detail.action)}render(){var t;if(!this._config||!this.hass||!this._config.entity)return ut``;const e=this._config.entity,i=this.hass.states[e],n=this._config.name||i.attributes.friendly_name||"",o=this._config.icon||Io(i),r=Jo(this._config),a=!!this._config.hide_state,s=Bn(i),l=ao(this.hass.localize,i,this.hass.locale),c=null!=this.brightness?`${this.brightness}%`:l,d=Tr(i),u={};if(d&&(null===(t=this._config)||void 0===t?void 0:t.use_light_color)){const t=d.join(",");u["--icon-color"]=`rgb(${t})`,u["--shape-color"]=`rgba(${t}, 0.25)`,Or(d)&&!this.hass.themes.darkMode&&(u["--shape-outline-color"]="rgba(var(--rgb-primary-text-color), 0.05)",Mr(d)&&(u["--icon-color"]="rgba(var(--rgb-primary-text-color), 0.2)"))}const h=g(this.hass);return ut` - - - - ${Un(i)?null:ut` - - `} - - - ${this._controls.length>0?ut` -
- ${this.renderActiveControl(i)} ${this.renderOtherControls()} -
- `:null} -
- `}renderOtherControls(){const t=this._controls.filter((t=>t!=this._activeControl));return ut` - ${t.map((t=>ut` + `}};n([st({attribute:!1})],Ls.prototype,"hass",void 0),n([st({attribute:!1})],Ls.prototype,"entity",void 0),Ls=n([at("mushroom-light-color-temp-control")],Ls);const Ds={brightness_control:"mdi:brightness-4",color_temp_control:"mdi:thermometer",color_control:"mdi:palette"};ll({type:"mushroom-light-card",name:"Mushroom Light Card",description:"Card for light entity"});let js=class extends rl{constructor(){super(...arguments),this._controls=[]}static async getConfigElement(){return await Promise.resolve().then((function(){return Xh})),document.createElement("mushroom-light-card-editor")}static async getStubConfig(t){const e=Object.keys(t.states).filter((t=>Ts.includes(t.split(".")[0])));return{type:"custom:mushroom-light-card",entity:e[0]}}_onControlTap(t,e){e.stopPropagation(),this._activeControl=t}getCardSize(){return 1}setConfig(t){this._config=Object.assign({tap_action:{action:"toggle"},hold_action:{action:"more-info"}},t),this.updateControls(),this.updateBrightness()}updated(t){super.updated(t),this.hass&&t.has("hass")&&(this.updateControls(),this.updateBrightness())}updateBrightness(){if(this.brightness=void 0,!this._config||!this.hass||!this._config.entity)return;const t=this._config.entity,e=this.hass.states[t];e&&(this.brightness=Bl(e))}onCurrentBrightnessChange(t){null!=t.detail.value&&(this.brightness=t.detail.value)}updateControls(){if(!this._config||!this.hass||!this._config.entity)return;const t=this._config.entity,e=this.hass.states[t];if(!e)return;const i=[];this._config.collapsible_controls&&!Lt(e)||(this._config.show_brightness_control&&Wl(e)&&i.push("brightness_control"),this._config.show_color_temp_control&&function(t){var e;return null===(e=t.attributes.supported_color_modes)||void 0===e?void 0:e.some((t=>["color_temp"].includes(t)))}(e)&&i.push("color_temp_control"),this._config.show_color_control&&Xl(e)&&i.push("color_control")),this._controls=i;const n=!!this._activeControl&&i.includes(this._activeControl);this._activeControl=n?this._activeControl:i[0]}_handleAction(t){Oe(this,this.hass,this._config,t.detail.action)}render(){if(!this._config||!this.hass||!this._config.entity)return N``;const t=this._config.entity,e=this.hass.states[t],i=this._config.name||e.attributes.friendly_name||"",n=this._config.icon||pl(e),o=Ka(this._config),r=Ta(e,o.icon_type);let a=Ht(this.hass.localize,e,this.hass.locale);null!=this.brightness&&(a=`${this.brightness}%`);const l=pe(this.hass);return N` + + + + ${r?this.renderPicture(r):this.renderIcon(e,n)} + ${this.renderBadge(e)} + ${this.renderStateInfo(e,o,i,a)}; + + ${this._controls.length>0?N` +
+ ${this.renderActiveControl(e)} ${this.renderOtherControls()} +
+ `:null} +
+
+ `}renderIcon(t,e){var i;const n=Ul(t),o=Lt(t),r={};if(n&&(null===(i=this._config)||void 0===i?void 0:i.use_light_color)){const t=n.join(",");r["--icon-color"]=`rgb(${t})`,r["--shape-color"]=`rgba(${t}, 0.25)`,Hl(n)&&!this.hass.themes.darkMode&&(r["--shape-outline-color"]="rgba(var(--rgb-primary-text-color), 0.05)",Yl(n)&&(r["--icon-color"]="rgba(var(--rgb-primary-text-color), 0.2)"))}return N` + + `}renderOtherControls(){const t=this._controls.filter((t=>t!=this._activeControl));return N` + ${t.map((t=>N` this._onControlTap(t,e)} /> `))} - `}renderActiveControl(t){var e;switch(this._activeControl){case"brightness_control":const i=Tr(t),n={};if(i&&(null===(e=this._config)||void 0===e?void 0:e.use_light_color)){const t=i.join(",");n["--slider-color"]=`rgb(${t})`,n["--slider-bg-color"]=`rgba(${t}, 0.2)`,Or(i)&&!this.hass.themes.darkMode&&(n["--slider-bg-color"]="rgba(var(--rgb-primary-text-color), 0.05)",n["--slider-color"]="rgba(var(--rgb-primary-text-color), 0.15)")}return ut` + `}renderActiveControl(t){var e;switch(this._activeControl){case"brightness_control":const i=Ul(t),n={};if(i&&(null===(e=this._config)||void 0===e?void 0:e.use_light_color)){const t=i.join(",");n["--slider-color"]=`rgb(${t})`,n["--slider-bg-color"]=`rgba(${t}, 0.2)`,Hl(i)&&!this.hass.themes.darkMode&&(n["--slider-bg-color"]="rgba(var(--rgb-primary-text-color), 0.05)",n["--slider-color"]="rgba(var(--rgb-primary-text-color), 0.15)")}return N` - `;case"color_temp_control":return ut` + `;case"color_temp_control":return N` - `;case"color_control":return ut` + `;case"color_control":return N` - `;default:return null}}static get styles(){return[bo,N` + `;default:return null}}static get styles(){return[super.styles,al,d` mushroom-state-item { cursor: pointer; } @@ -1914,88 +2474,240 @@ const Ln=N`.mdc-floating-label{-moz-osx-font-smoothing:grayscale;-webkit-font-sm mushroom-light-color-control { flex: 1; } - `]}};n([zt({attribute:!1})],sa.prototype,"hass",void 0),n([jt()],sa.prototype,"_config",void 0),n([jt()],sa.prototype,"_activeControl",void 0),n([jt()],sa.prototype,"_controls",void 0),n([jt()],sa.prototype,"brightness",void 0),sa=n([Dt("mushroom-light-card")],sa);const la=["person","device_tracker"];vo({type:"mushroom-person-card",name:"Mushroom Person Card",description:"Card for person entity"});let ca=class extends Ot{static async getConfigElement(){return await Promise.resolve().then((function(){return uu})),document.createElement("mushroom-person-card-editor")}static async getStubConfig(t){const e=Object.keys(t.states).filter((t=>la.includes(t.split(".")[0])));return{type:"custom:mushroom-person-card",entity:e[0]}}getCardSize(){return 1}setConfig(t){this._config=Object.assign({tap_action:{action:"more-info"},hold_action:{action:"more-info"},double_tap_action:{action:"more-info"}},t)}_handleAction(t){S(this,this.hass,this._config,t.detail.action)}render(){if(!this._config||!this.hass||!this._config.entity)return ut``;const t=this._config.entity,e=this.hass.states[t],i=this._config.name||e.attributes.friendly_name,n=this._config.icon||Io(e),o=this._config.use_entity_picture?e.attributes.entity_picture:void 0,r=Jo(this._config),a=!!this._config.hide_state,s=!!this._config.hide_name,l=Object.values(this.hass.states).filter((t=>t.entity_id.startsWith("zone."))),c=function(t,e){const i=t.state;if(i===Fn)return"mdi:help";if("not_home"===i)return"mdi:home-export-outline";if("home"===i)return"mdi:home";const n=e.find((t=>i===t.attributes.friendly_name));return n&&n.attributes.icon?n.attributes.icon:"mdi:home"}(e,l),d=function(t,e){const i=t.state;if(i===Fn)return"var(--rgb-state-person-unknown)";if("not_home"===i)return"var(--rgb-state-person-not-home)";if("home"===i)return"var(--rgb-state-person-home)";const n=e.some((t=>i===t.attributes.friendly_name));return n?"var(--rgb-state-person-zone)":"var(--rgb-state-person-home)"}(e,l),u=y(this.hass.localize,e,this.hass.locale),h=g(this.hass);return ut` - -
+ `]}};n([ct()],js.prototype,"_config",void 0),n([ct()],js.prototype,"_activeControl",void 0),n([ct()],js.prototype,"_controls",void 0),n([ct()],js.prototype,"brightness",void 0),js=n([at("mushroom-light-card")],js);const Ps=["lock"];function Ns(t){return"unlocked"===t.state}function Vs(t){return"locked"===t.state}function Rs(t){switch(t.state){case"locking":case"unlocking":return!0;default:return!1}}const Fs=[{icon:"mdi:lock",title:"lock",serviceName:"lock",isVisible:t=>Ns(t),isDisabled:()=>!1},{icon:"mdi:lock-open",title:"unlock",serviceName:"unlock",isVisible:t=>Vs(t),isDisabled:()=>!1},{icon:"mdi:lock-clock",isVisible:t=>Rs(t),isDisabled:()=>!0},{icon:"mdi:door-open",title:"open",serviceName:"open",isVisible:t=>Nt(t,1)&&Ns(t),isDisabled:t=>Rs(t)}];let Bs=class extends ot{constructor(){super(...arguments),this.fill=!1}callService(t){t.stopPropagation();const e=t.target.entry;this.hass.callService("lock",e.serviceName,{entity_id:this.entity.entity_id})}render(){const t=pe(this.hass),e=Hi(this.hass);return N` + ${Fs.filter((t=>t.isVisible(this.entity))).map((t=>N` + + `))} + `}};n([st({attribute:!1})],Bs.prototype,"hass",void 0),n([st({attribute:!1})],Bs.prototype,"entity",void 0),n([st()],Bs.prototype,"fill",void 0),Bs=n([at("mushroom-lock-buttons-control")],Bs),ll({type:"mushroom-lock-card",name:"Mushroom Lock Card",description:"Card for all lock entities"});let Us=class extends rl{static async getConfigElement(){return await Promise.resolve().then((function(){return Xm})),document.createElement("mushroom-lock-card-editor")}static async getStubConfig(t){const e=Object.keys(t.states).filter((t=>Ps.includes(t.split(".")[0])));return{type:"custom:mushroom-lock-card",entity:e[0]}}getCardSize(){return 1}setConfig(t){this._config=Object.assign({tap_action:{action:"more-info"},hold_action:{action:"more-info"}},t)}_handleAction(t){Oe(this,this.hass,this._config,t.detail.action)}render(){if(!this._config||!this.hass||!this._config.entity)return N``;const t=this._config.entity,e=this.hass.states[t],i=this._config.name||e.attributes.friendly_name||"",n=this._config.icon||pl(e),o=Ka(this._config),r=Ta(e,o.icon_type),a=pe(this.hass);return N` + + - ${o?ut` - - `:ut` - - `} - ${Un(e)?this.renderStateBadge(c,d):this.renderUnavailableBadge()} - + ${r?this.renderPicture(r):this.renderIcon(e,n)} + ${this.renderBadge(e)} + ${this.renderStateInfo(e,o,i)}; -
-
- `}renderStateBadge(t,e){return ut` - - `}renderUnavailableBadge(){return ut` +
+ + +
+ + + `}renderIcon(t,e){const i=Dt(t),n={"--icon-color":"rgb(var(--rgb-state-lock))","--shape-color":"rgba(var(--rgb-state-lock), 0.2)"};return Vs(t)?(n["--icon-color"]="rgb(var(--rgb-state-lock-locked))",n["--shape-color"]="rgba(var(--rgb-state-lock-locked), 0.2)"):Ns(t)?(n["--icon-color"]="rgb(var(--rgb-state-lock-unlocked))",n["--shape-color"]="rgba(var(--rgb-state-lock-unlocked), 0.2)"):Rs(t)&&(n["--icon-color"]="rgb(var(--rgb-state-lock-pending))",n["--shape-color"]="rgba(var(--rgb-state-lock-pending), 0.2)"),N` + + `}static get styles(){return[super.styles,al,d` + mushroom-state-item { + cursor: pointer; + } + mushroom-lock-buttons-control { + flex: 1; + } + `]}};n([ct()],Us.prototype,"_config",void 0),Us=n([at("mushroom-lock-card")],Us);const Hs=["media_player"];function Ys(t){return null!=t.attributes.volume_level?100*t.attributes.volume_level:void 0}const Xs=(t,e)=>{if(!t)return[];const i=t.state;if("off"===i)return Nt(t,128)&&e.includes("on_off")?[{icon:"mdi:power",action:"turn_on"}]:[];const n=[];Nt(t,256)&&e.includes("on_off")&&n.push({icon:"mdi:power",action:"turn_off"});const o=!0===t.attributes.assumed_state,r=t.attributes;return("playing"===i||"paused"===i||o)&&Nt(t,32768)&&e.includes("shuffle")&&n.push({icon:!0===r.shuffle?"mdi:shuffle":"mdi:shuffle-disabled",action:"shuffle_set"}),("playing"===i||"paused"===i||o)&&Nt(t,16)&&e.includes("previous")&&n.push({icon:"mdi:skip-previous",action:"media_previous_track"}),!o&&("playing"===i&&(Nt(t,1)||Nt(t,4096))||("paused"===i||"idle"===i)&&Nt(t,16384)||"on"===i&&(Nt(t,16384)||Nt(t,1)))&&e.includes("play_pause_stop")&&n.push({icon:"on"===i?"mdi:play-pause":"playing"!==i?"mdi:play":Nt(t,1)?"mdi:pause":"mdi:stop",action:"playing"!==i?"media_play":Nt(t,1)?"media_pause":"media_stop"}),o&&Nt(t,16384)&&e.includes("play_pause_stop")&&n.push({icon:"mdi:play",action:"media_play"}),o&&Nt(t,1)&&e.includes("play_pause_stop")&&n.push({icon:"mdi:pause",action:"media_pause"}),o&&Nt(t,4096)&&e.includes("play_pause_stop")&&n.push({icon:"mdi:stop",action:"media_stop"}),("playing"===i||"paused"===i||o)&&Nt(t,32)&&e.includes("next")&&n.push({icon:"mdi:skip-next",action:"media_next_track"}),("playing"===i||"paused"===i||o)&&Nt(t,262144)&&e.includes("repeat")&&n.push({icon:"all"===r.repeat?"mdi:repeat":"one"===r.repeat?"mdi:repeat-once":"mdi:repeat-off",action:"repeat_set"}),n.length>0?n:[]},Ws=(t,e,i)=>{let n={};"shuffle_set"===i?n={shuffle:!e.attributes.shuffle}:"repeat_set"===i?n={repeat:"all"===e.attributes.repeat?"one":"off"===e.attributes.repeat?"all":"off"}:"volume_mute"===i&&(n={is_volume_muted:!e.attributes.is_volume_muted}),t.callService("media_player",i,Object.assign({entity_id:e.entity_id},n))};let qs=class extends ot{constructor(){super(...arguments),this.fill=!1}_handleClick(t){t.stopPropagation();const e=t.target.action;Ws(this.hass,this.entity,e)}render(){const t=pe(this.hass),e=Xs(this.entity,this.controls);return N` + + ${e.map((t=>N` + + `))} + + `}};n([st({attribute:!1})],qs.prototype,"hass",void 0),n([st({attribute:!1})],qs.prototype,"entity",void 0),n([st({attribute:!1})],qs.prototype,"controls",void 0),n([st()],qs.prototype,"fill",void 0),qs=n([at("mushroom-media-player-media-control")],qs);let Ks=class extends ot{constructor(){super(...arguments),this.fill=!1}handleSliderChange(t){const e=t.detail.value;this.hass.callService("media_player","volume_set",{entity_id:this.entity.entity_id,volume_level:e/100})}handleSliderCurrentChange(t){let e=t.detail.value;this.dispatchEvent(new CustomEvent("current-change",{detail:{value:e}}))}handleClick(t){t.stopPropagation();const e=t.target.action;Ws(this.hass,this.entity,e)}render(){var t,e,i;if(!this.entity)return null;const n=Ys(this.entity),o=pe(this.hass),r=(null===(t=this.controls)||void 0===t?void 0:t.includes("volume_set"))&&Nt(this.entity,4),a=(null===(e=this.controls)||void 0===e?void 0:e.includes("volume_mute"))&&Nt(this.entity,8),l=(null===(i=this.controls)||void 0===i?void 0:i.includes("volume_buttons"))&&Nt(this.entity,1024);return N` + + ${r?N` `:null} + ${a?N` + + `:void 0} + ${l?N` + + `:void 0} + ${l?N` + + `:void 0} + + `}static get styles(){return d` + mushroom-slider { + flex: 1; + --main-color: rgb(var(--rgb-state-media-player)); + --bg-color: rgba(var(--rgb-state-media-player), 0.2); + } + `}};n([st({attribute:!1})],Ks.prototype,"hass",void 0),n([st({attribute:!1})],Ks.prototype,"entity",void 0),n([st()],Ks.prototype,"fill",void 0),n([st({attribute:!1})],Ks.prototype,"controls",void 0),Ks=n([at("mushroom-media-player-volume-control")],Ks);const Gs={media_control:"mdi:play-pause",volume_control:"mdi:volume-high"};ll({type:"mushroom-media-player-card",name:"Mushroom Media Card",description:"Card for media player entity"});let Zs=class extends rl{constructor(){super(...arguments),this._controls=[]}static async getConfigElement(){return await Promise.resolve().then((function(){return Qm})),document.createElement("mushroom-media-player-card-editor")}static async getStubConfig(t){const e=Object.keys(t.states).filter((t=>Hs.includes(t.split(".")[0])));return{type:"custom:mushroom-media-player-card",entity:e[0]}}_onControlTap(t,e){e.stopPropagation(),this._activeControl=t}getCardSize(){return 1}setConfig(t){this._config=Object.assign({tap_action:{action:"more-info"},hold_action:{action:"more-info"}},t),this.updateControls(),this.updateVolume()}updated(t){super.updated(t),this.hass&&t.has("hass")&&(this.updateControls(),this.updateVolume())}updateVolume(){if(this.volume=void 0,!this._config||!this.hass||!this._config.entity)return;const t=this._config.entity,e=this.hass.states[t];if(!e)return;const i=Ys(e);this.volume=null!=i?Math.round(i):i}onCurrentVolumeChange(t){null!=t.detail.value&&(this.volume=t.detail.value)}updateControls(){var t;if(!this._config||!this.hass||!this._config.entity)return;const e=this._config.entity,i=this.hass.states[e];if(!i)return;const n=[];this._config.collapsible_controls&&!Lt(i)||(((t,e)=>Xs(t,null!=e?e:[]).length>0)(i,null===(t=this._config)||void 0===t?void 0:t.media_controls)&&n.push("media_control"),((t,e)=>(null==e?void 0:e.includes("volume_buttons"))&&Nt(t,1024)||(null==e?void 0:e.includes("volume_mute"))&&Nt(t,8)||(null==e?void 0:e.includes("volume_set"))&&Nt(t,4))(i,this._config.volume_controls)&&n.push("volume_control")),this._controls=n;const o=!!this._activeControl&&n.includes(this._activeControl);this._activeControl=o?this._activeControl:n[0]}_handleAction(t){Oe(this,this.hass,this._config,t.detail.action)}render(){if(!this._config||!this.hass||!this._config.entity)return N``;const t=this._config.entity,e=this.hass.states[t],i=function(t,e){var i,n=t.icon||pl(e);if(![Tt,zt,Ot].includes(e.state)&&t.use_media_info)switch(null===(i=e.attributes.app_name)||void 0===i?void 0:i.toLowerCase()){case"spotify":return"mdi:spotify";case"google podcasts":return"mdi:google-podcast";case"plex":return"mdi:plex";case"soundcloud":return"mdi:soundcloud";case"youtube":return"mdi:youtube";case"oto music":return"mdi:music-circle";case"netflix":return"mdi:netflix";default:return n}return n}(this._config,e),n=function(t,e){let i=t.name||e.attributes.friendly_name||"";return![Tt,zt,Ot].includes(e.state)&&t.use_media_info&&e.attributes.media_title&&(i=e.attributes.media_title),i}(this._config,e),o=function(t,e,i){let n=Ht(i.localize,e,i.locale);return![Tt,zt,Ot].includes(e.state)&&t.use_media_info&&(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})(e)||n}(this._config,e,this.hass),r=Ka(this._config),a=Ta(e,r.icon_type),l=null!=this.volume&&this._config.show_volume_level?`${o} - ${this.volume}%`:o,s=pe(this.hass);return N` + + + + ${a?this.renderPicture(a):this.renderIcon(e,i)} + ${this.renderBadge(e)} + ${this.renderStateInfo(e,r,n,l)}; + + ${this._controls.length>0?N` +
+ ${this.renderActiveControl(e,r.layout)} + ${this.renderOtherControls()} +
+ `:null} +
+
+ `}renderOtherControls(){const t=this._controls.filter((t=>t!=this._activeControl));return N` + ${t.map((t=>N` + this._onControlTap(t,e)} + /> + `))} + `}renderActiveControl(t,e){var i,n,o,r;const a=null!==(n=null===(i=this._config)||void 0===i?void 0:i.media_controls)&&void 0!==n?n:[],l=null!==(r=null===(o=this._config)||void 0===o?void 0:o.volume_controls)&&void 0!==r?r:[];switch(this._activeControl){case"media_control":return N` + + + `;case"volume_control":return N` + + `;default:return null}}static get styles(){return[super.styles,al,d` + mushroom-state-item { + cursor: pointer; + } + mushroom-shape-icon { + --icon-color: rgb(var(--rgb-state-media-player)); + --shape-color: rgba(var(--rgb-state-media-player), 0.2); + } + mushroom-media-player-media-control, + mushroom-media-player-volume-control { + flex: 1; + } + `]}};n([ct()],Zs.prototype,"_config",void 0),n([ct()],Zs.prototype,"_activeControl",void 0),n([ct()],Zs.prototype,"_controls",void 0),n([ct()],Zs.prototype,"volume",void 0),Zs=n([at("mushroom-media-player-card")],Zs);const Js=["person","device_tracker"];ll({type:"mushroom-person-card",name:"Mushroom Person Card",description:"Card for person entity"});let Qs=class extends rl{static async getConfigElement(){return await Promise.resolve().then((function(){return op})),document.createElement("mushroom-person-card-editor")}static async getStubConfig(t){const e=Object.keys(t.states).filter((t=>Js.includes(t.split(".")[0])));return{type:"custom:mushroom-person-card",entity:e[0]}}getCardSize(){return 1}setConfig(t){this._config=Object.assign({tap_action:{action:"more-info"},hold_action:{action:"more-info"}},t)}_handleAction(t){Oe(this,this.hass,this._config,t.detail.action)}render(){if(!this._config||!this.hass||!this._config.entity)return N``;const t=this._config.entity,e=this.hass.states[t],i=this._config.name||e.attributes.friendly_name||"",n=this._config.icon||pl(e),o=Ka(this._config),r=Ta(e,o.icon_type),a=pe(this.hass);return N` + + + + ${r?this.renderPicture(r):this.renderIcon(e,n)} + ${this.renderBadge(e)} + ${this.renderStateInfo(e,o,i)}; + + + + `}renderStateBadge(t){const e=Object.values(this.hass.states).filter((t=>t.entity_id.startsWith("zone."))),i=function(t,e){const i=t.state;if(i===zt)return"mdi:help";if("not_home"===i)return"mdi:home-export-outline";if("home"===i)return"mdi:home";const n=e.find((t=>i===t.attributes.friendly_name));return n&&n.attributes.icon?n.attributes.icon:"mdi:home"}(t,e),n=function(t,e){const i=t.state;if(i===zt)return"var(--rgb-state-person-unknown)";if("not_home"===i)return"var(--rgb-state-person-not-home)";if("home"===i)return"var(--rgb-state-person-home)";const n=e.some((t=>i===t.attributes.friendly_name));return n?"var(--rgb-state-person-zone)":"var(--rgb-state-person-home)"}(t,e);return N` - `}static get styles(){return[bo,N` + `}renderBadge(t){return!Dt(t)?super.renderBadge(t):this.renderStateBadge(t)}static get styles(){return[super.styles,al,d` mushroom-state-item { cursor: pointer; } - `]}};n([zt({attribute:!1})],ca.prototype,"hass",void 0),n([jt()],ca.prototype,"_config",void 0),ca=n([Dt("mushroom-person-card")],ca);vo({type:"mushroom-template-card",name:"Mushroom Template Card",description:"Card for custom rendering with templates"});const da=["icon","icon_color","primary","secondary"];let ua=class extends Ot{constructor(){super(...arguments),this._templateResults={},this._unsubRenderTemplates=new Map}static async getConfigElement(){return await Promise.resolve().then((function(){return Hs})),document.createElement("mushroom-template-card-editor")}static async getStubConfig(t){return{type:"custom:mushroom-template-card",primary:"Hello, {{user}}",secondary:"How are you?",icon:"mdi:home"}}getCardSize(){return 1}setConfig(t){da.forEach((e=>{var i,n;(null===(i=this._config)||void 0===i?void 0:i[e])===t[e]&&(null===(n=this._config)||void 0===n?void 0:n.entity)==t.entity||this._tryDisconnectKey(e)})),this._config=Object.assign({tap_action:{action:"toggle"},hold_action:{action:"more-info"},double_tap_action:{action:"more-info"}},t)}connectedCallback(){super.connectedCallback(),this._tryConnect()}disconnectedCallback(){this._tryDisconnect()}_handleAction(t){S(this,this.hass,this._config,t.detail.action)}isTemplate(t){var e;const i=null===(e=this._config)||void 0===e?void 0:e[t];return null==i?void 0:i.includes("{")}getValue(t){var e,i;return this.isTemplate(t)?null===(e=this._templateResults[t])||void 0===e?void 0:e.result:null===(i=this._config)||void 0===i?void 0:i[t]}render(){if(!this._config||!this.hass)return ut``;const t=this.getValue("icon"),e=this.getValue("icon_color"),i=this.getValue("primary"),n=this.getValue("secondary"),o=!t,r=Jo(this._config),a=this._config.multiline_secondary;e&&ci(e);const s=g(this.hass);return ut` - - - ${o?void 0:this.renderIcon(t,e)} - - - - `}renderIcon(t,e){const i={};if(e){const t=ci(e);i["--icon-color"]=`rgb(${t})`,i["--shape-color"]=`rgba(${t}, 0.2)`}return ut` + `]}};n([ct()],Qs.prototype,"_config",void 0),Qs=n([at("mushroom-person-card")],Qs);ll({type:"mushroom-template-card",name:"Mushroom Template Card",description:"Card for custom rendering with templates"});const tc=["icon","icon_color","badge_color","badge_icon","primary","secondary","picture"];let ec=class extends ol{constructor(){super(...arguments),this._templateResults={},this._unsubRenderTemplates=new Map}static async getConfigElement(){return await Promise.resolve().then((function(){return fd})),document.createElement("mushroom-template-card-editor")}static async getStubConfig(t){return{type:"custom:mushroom-template-card",primary:"Hello, {{user}}",secondary:"How are you?",icon:"mdi:home"}}getCardSize(){return 1}setConfig(t){tc.forEach((e=>{var i,n;(null===(i=this._config)||void 0===i?void 0:i[e])===t[e]&&(null===(n=this._config)||void 0===n?void 0:n.entity)==t.entity||this._tryDisconnectKey(e)})),this._config=Object.assign({tap_action:{action:"toggle"},hold_action:{action:"more-info"}},t)}connectedCallback(){super.connectedCallback(),this._tryConnect()}disconnectedCallback(){this._tryDisconnect()}_handleAction(t){Oe(this,this.hass,this._config,t.detail.action)}isTemplate(t){var e;const i=null===(e=this._config)||void 0===e?void 0:e[t];return null==i?void 0:i.includes("{")}getValue(t){var e,i;return this.isTemplate(t)?null===(e=this._templateResults[t])||void 0===e?void 0:e.result:null===(i=this._config)||void 0===i?void 0:i[t]}render(){if(!this._config||!this.hass)return N``;const t=this.getValue("icon"),e=this.getValue("icon_color"),i=this.getValue("badge_icon"),n=this.getValue("badge_color"),o=this.getValue("primary"),r=this.getValue("secondary"),a=this.getValue("picture"),l=this._config.multiline_secondary,s=pe(this.hass),c=Ka({fill_container:this._config.fill_container,layout:this._config.layout,icon_type:Boolean(a)?"entity-picture":Boolean(t)?"icon":"none",primary_info:Boolean(o)?"name":"none",secondary_info:Boolean(r)?"state":"none"});return N` + + + + ${a?this.renderPicture(a):t?this.renderIcon(t,e):null} + ${(t||a)&&i?this.renderBadgeIcon(i,n):void 0} + + + + + `}renderPicture(t){return N` + + `}renderIcon(t,e){const i={};if(e){const t=xa(e);i["--icon-color"]=`rgb(${t})`,i["--shape-color"]=`rgba(${t}, 0.2)`}return N` - `}updated(t){super.updated(t),this._config&&this.hass&&this._tryConnect()}async _tryConnect(){da.forEach((t=>{this._tryConnectKey(t)}))}async _tryConnectKey(t){var e,i;if(void 0===this._unsubRenderTemplates.get(t)&&this.hass&&this._config&&this.isTemplate(t))try{const i=wr(this.hass.connection,(e=>{this._templateResults=Object.assign(Object.assign({},this._templateResults),{[t]:e})}),{template:null!==(e=this._config[t])&&void 0!==e?e:"",entity_ids:this._config.entity_id,variables:{config:this._config,user:this.hass.user.name,entity:this._config.entity}});this._unsubRenderTemplates.set(t,i),await i}catch(e){const n={result:null!==(i=this._config[t])&&void 0!==i?i:"",listeners:{all:!1,domains:[],entities:[],time:!1}};this._templateResults=Object.assign(Object.assign({},this._templateResults),{[t]:n}),this._unsubRenderTemplates.delete(t)}}async _tryDisconnect(){da.forEach((t=>{this._tryDisconnectKey(t)}))}async _tryDisconnectKey(t){const e=this._unsubRenderTemplates.get(t);if(e)try{(await e)(),this._unsubRenderTemplates.delete(t)}catch(t){if("not_found"!==t.code&&"template_error"!==t.code)throw t}}static get styles(){return[bo,N` + `}renderBadgeIcon(t,e){const i={};if(e){const t=xa(e);i["--main-color"]=`rgba(${t})`}return N` + + `}updated(t){super.updated(t),this._config&&this.hass&&this._tryConnect()}async _tryConnect(){tc.forEach((t=>{this._tryConnectKey(t)}))}async _tryConnectKey(t){var e,i;if(void 0===this._unsubRenderTemplates.get(t)&&this.hass&&this._config&&this.isTemplate(t))try{const i=ke(this.hass.connection,(e=>{this._templateResults=Object.assign(Object.assign({},this._templateResults),{[t]:e})}),{template:null!==(e=this._config[t])&&void 0!==e?e:"",entity_ids:this._config.entity_id,variables:{config:this._config,user:this.hass.user.name,entity:this._config.entity},strict:!0});this._unsubRenderTemplates.set(t,i),await i}catch(e){const n={result:null!==(i=this._config[t])&&void 0!==i?i:"",listeners:{all:!1,domains:[],entities:[],time:!1}};this._templateResults=Object.assign(Object.assign({},this._templateResults),{[t]:n}),this._unsubRenderTemplates.delete(t)}}async _tryDisconnect(){tc.forEach((t=>{this._tryDisconnectKey(t)}))}async _tryDisconnectKey(t){const e=this._unsubRenderTemplates.get(t);if(e)try{(await e)(),this._unsubRenderTemplates.delete(t)}catch(t){if("not_found"!==t.code&&"template_error"!==t.code)throw t}}static get styles(){return[super.styles,al,d` mushroom-state-item { cursor: pointer; } - `]}};n([zt({attribute:!1})],ua.prototype,"hass",void 0),n([jt()],ua.prototype,"_config",void 0),n([jt()],ua.prototype,"_templateResults",void 0),n([jt()],ua.prototype,"_unsubRenderTemplates",void 0),ua=n([Dt("mushroom-template-card")],ua);vo({type:"mushroom-title-card",name:"Mushroom Title Card",description:"Title and subtitle to separate sections"});const ha=["title","subtitle"];let ma=class extends Ot{constructor(){super(...arguments),this._templateResults={},this._unsubRenderTemplates=new Map}static async getConfigElement(){return await Promise.resolve().then((function(){return gu})),document.createElement("mushroom-title-card-editor")}static async getStubConfig(t){return{type:"custom:mushroom-title-card",title:"Hello, {{ user }} !"}}getCardSize(){return 1}setConfig(t){ha.forEach((e=>{var i;(null===(i=this._config)||void 0===i?void 0:i[e])!==t[e]&&this._tryDisconnectKey(e)})),this._config=t}connectedCallback(){super.connectedCallback(),this._tryConnect()}disconnectedCallback(){this._tryDisconnect()}isTemplate(t){var e;const i=null===(e=this._config)||void 0===e?void 0:e[t];return null==i?void 0:i.includes("{")}getValue(t){var e,i;return this.isTemplate(t)?null===(e=this._templateResults[t])||void 0===e?void 0:e.result:null===(i=this._config)||void 0===i?void 0:i[t]}render(){if(!this._config||!this.hass)return ut``;const t=this.getValue("title"),e=this.getValue("subtitle");let i="";return this._config.alignment&&(i=`align-${this._config.alignment}`),ut` + mushroom-shape-icon { + --icon-color: rgb(var(--rgb-disabled)); + --shape-color: rgba(var(--rgb-disabled), 0.2); + } + `]}};n([ct()],ec.prototype,"_config",void 0),n([ct()],ec.prototype,"_templateResults",void 0),n([ct()],ec.prototype,"_unsubRenderTemplates",void 0),ec=n([at("mushroom-template-card")],ec);ll({type:"mushroom-title-card",name:"Mushroom Title Card",description:"Title and subtitle to separate sections"});const ic=["title","subtitle"];let nc=class extends ol{constructor(){super(...arguments),this._templateResults={},this._unsubRenderTemplates=new Map}static async getConfigElement(){return await Promise.resolve().then((function(){return cp})),document.createElement("mushroom-title-card-editor")}static async getStubConfig(t){return{type:"custom:mushroom-title-card",title:"Hello, {{ user }} !"}}getCardSize(){return 1}setConfig(t){ic.forEach((e=>{var i;(null===(i=this._config)||void 0===i?void 0:i[e])!==t[e]&&this._tryDisconnectKey(e)})),this._config=t}connectedCallback(){super.connectedCallback(),this._tryConnect()}disconnectedCallback(){this._tryDisconnect()}isTemplate(t){var e;const i=null===(e=this._config)||void 0===e?void 0:e[t];return null==i?void 0:i.includes("{")}getValue(t){var e,i;return this.isTemplate(t)?null===(e=this._templateResults[t])||void 0===e?void 0:e.result:null===(i=this._config)||void 0===i?void 0:i[t]}render(){if(!this._config||!this.hass)return N``;const t=this.getValue("title"),e=this.getValue("subtitle");let i="";return this._config.alignment&&(i=`align-${this._config.alignment}`),N`
- ${t?ut`

${t}

`:null} - ${e?ut`

${e}

`:null} + ${t?N`

${t}

`:null} + ${e?N`

${e}

`:null}
- `}updated(t){super.updated(t),this._config&&this.hass&&this._tryConnect()}async _tryConnect(){ha.forEach((t=>{this._tryConnectKey(t)}))}async _tryConnectKey(t){var e,i;if(void 0===this._unsubRenderTemplates.get(t)&&this.hass&&this._config&&this.isTemplate(t))try{const i=wr(this.hass.connection,(e=>{this._templateResults=Object.assign(Object.assign({},this._templateResults),{[t]:e})}),{template:null!==(e=this._config[t])&&void 0!==e?e:"",entity_ids:this._config.entity_id,variables:{config:this._config,user:this.hass.user.name}});this._unsubRenderTemplates.set(t,i),await i}catch(e){const n={result:null!==(i=this._config[t])&&void 0!==i?i:"",listeners:{all:!1,domains:[],entities:[],time:!1}};this._templateResults=Object.assign(Object.assign({},this._templateResults),{[t]:n}),this._unsubRenderTemplates.delete(t)}}async _tryDisconnect(){ha.forEach((t=>{this._tryDisconnectKey(t)}))}async _tryDisconnectKey(t){const e=this._unsubRenderTemplates.get(t);if(e)try{(await e)(),this._unsubRenderTemplates.delete(t)}catch(t){if("not_found"!==t.code&&"template_error"!==t.code)throw t}}static get styles(){return[bo,N` + `}updated(t){super.updated(t),this._config&&this.hass&&this._tryConnect()}async _tryConnect(){ic.forEach((t=>{this._tryConnectKey(t)}))}async _tryConnectKey(t){var e,i;if(void 0===this._unsubRenderTemplates.get(t)&&this.hass&&this._config&&this.isTemplate(t))try{const i=ke(this.hass.connection,(e=>{this._templateResults=Object.assign(Object.assign({},this._templateResults),{[t]:e})}),{template:null!==(e=this._config[t])&&void 0!==e?e:"",entity_ids:this._config.entity_id,variables:{config:this._config,user:this.hass.user.name},strict:!0});this._unsubRenderTemplates.set(t,i),await i}catch(e){const n={result:null!==(i=this._config[t])&&void 0!==i?i:"",listeners:{all:!1,domains:[],entities:[],time:!1}};this._templateResults=Object.assign(Object.assign({},this._templateResults),{[t]:n}),this._unsubRenderTemplates.delete(t)}}async _tryDisconnect(){ic.forEach((t=>{this._tryDisconnectKey(t)}))}async _tryDisconnectKey(t){const e=this._unsubRenderTemplates.get(t);if(e)try{(await e)(),this._unsubRenderTemplates.delete(t)}catch(t){if("not_found"!==t.code&&"template_error"!==t.code)throw t}}static get styles(){return[super.styles,al,d` .header { display: block; padding: var(--title-padding); @@ -2031,7 +2743,7 @@ const Ln=N`.mdc-floating-label{-moz-osx-font-smoothing:grayscale;-webkit-font-sm .align-justify { text-align: justify; } - `]}};n([zt({attribute:!1})],ma.prototype,"hass",void 0),n([jt()],ma.prototype,"_config",void 0),n([jt()],ma.prototype,"_templateResults",void 0),n([jt()],ma.prototype,"_unsubRenderTemplates",void 0),ma=n([Dt("mushroom-title-card")],ma);const pa=["update"],fa={on:"var(--rgb-state-update-on)",off:"var(--rgb-state-update-off)",installing:"var(--rgb-state-update-installing)"};let ga=class extends Ot{constructor(){super(...arguments),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(!Un(this.entity))return!0;const t=this.entity.attributes.latest_version&&this.entity.attributes.skipped_version===this.entity.attributes.latest_version;return!Bn(this.entity)&&!t||ro(this.entity)}get skipDisabled(){if(!Un(this.entity))return!0;return this.entity.attributes.latest_version&&this.entity.attributes.skipped_version===this.entity.attributes.latest_version||!Bn(this.entity)||ro(this.entity)}render(){const t=g(this.hass);return ut` + `]}};n([ct()],nc.prototype,"_config",void 0),n([ct()],nc.prototype,"_templateResults",void 0),n([ct()],nc.prototype,"_unsubRenderTemplates",void 0),nc=n([at("mushroom-title-card")],nc);const oc=["update"],rc={on:"var(--rgb-state-update-on)",off:"var(--rgb-state-update-off)",installing:"var(--rgb-state-update-installing)"};let ac=class extends ot{constructor(){super(...arguments),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(!Dt(this.entity))return!0;const t=this.entity.attributes.latest_version&&this.entity.attributes.skipped_version===this.entity.attributes.latest_version;return!Lt(this.entity)&&!t||Vt(this.entity)}get skipDisabled(){if(!Dt(this.entity))return!0;return this.entity.attributes.latest_version&&this.entity.attributes.skipped_version===this.entity.attributes.latest_version||!Lt(this.entity)||Vt(this.entity)}render(){const t=pe(this.hass);return N` - - `}};n([zt({attribute:!1})],ga.prototype,"hass",void 0),n([zt({attribute:!1})],ga.prototype,"entity",void 0),n([zt()],ga.prototype,"fill",void 0),ga=n([Dt("mushroom-update-buttons-control")],ga),vo({type:"mushroom-update-card",name:"Mushroom Update Card",description:"Card for update entity"});let _a=class extends Ot{static async getConfigElement(){return await Promise.resolve().then((function(){return wu})),document.createElement("mushroom-update-card-editor")}static async getStubConfig(t){const e=Object.keys(t.states).filter((t=>pa.includes(t.split(".")[0])));return{type:"custom:mushroom-update-card",entity:e[0]}}getCardSize(){return 1}setConfig(t){this._config=Object.assign({tap_action:{action:"more-info"},hold_action:{action:"more-info"},double_tap_action:{action:"more-info"}},t)}_handleAction(t){S(this,this.hass,this._config,t.detail.action)}render(){if(!this._config||!this.hass||!this._config.entity)return ut``;const t=this._config.entity,e=this.hass.states[t],i=this._config.name||e.attributes.friendly_name||"",n=this._config.icon||Io(e),o=this._config.use_entity_picture?e.attributes.entity_picture:void 0,r=Jo(this._config);let a=`${ao(this.hass.localize,e,this.hass.locale)}`;const s=g(this.hass);return ut` - - - ${o?ut` - - `:this.renderShapeIcon(e,n)} - ${Un(e)?null:ut` - - `} - - - ${this._config.show_buttons_control&&oo(e,1)?ut` -
- -
- `:null} -
- `}renderShapeIcon(t,e){const i=ro(t),n=function(t,e){return e?fa.installing:fa[t]||"var(--rgb-grey)"}(t.state,i),o={"--icon-color":`rgb(${n})`,"--shape-color":`rgba(${n}, 0.2)`};return ut` - - `}static get styles(){return[bo,N` - mushroom-state-item { - cursor: pointer; - } - mushroom-shape-icon { - --icon-color: rgb(var(--rgb-state-entity)); - --shape-color: rgba(var(--rgb-state-entity), 0.2); - } - mushroom-shape-icon.pulse { - --shape-animation: 1s ease 0s infinite normal none running pulse; - } - mushroom-update-buttons-control { - flex: 1; - } - `]}};n([zt({attribute:!1})],_a.prototype,"hass",void 0),n([jt()],_a.prototype,"_config",void 0),_a=n([Dt("mushroom-update-card")],_a);const ba=["media_player"];function va(t,e){var i,n=t.icon||function(t){if(!t)return"mdi:bookmark";if(t.attributes.icon)return t.attributes.icon;var e=f(t.entity_id);return e in O?O[e](t):k(e,t.state)}(e);if(![Pn,Fn,Vn].includes(e.state)&&t.use_media_info)switch(null===(i=e.attributes.app_name)||void 0===i?void 0:i.toLowerCase()){case"spotify":return"mdi:spotify";case"google podcasts":return"mdi:google-podcast";case"plex":return"mdi:plex";case"soundcloud":return"mdi:soundcloud";case"youtube":return"mdi:youtube";case"oto music":return"mdi:music-circle";case"netflix":return"mdi:netflix";default:return n}return n}const ya=(t,e)=>{if(!t)return[];const i=t.state;if("off"===i)return oo(t,128)&&e.includes("on_off")?[{icon:"mdi:power",action:"turn_on"}]:[];const n=[];oo(t,256)&&e.includes("on_off")&&n.push({icon:"mdi:power",action:"turn_off"});const o=!0===t.attributes.assumed_state,r=t.attributes;return("playing"===i||"paused"===i||o)&&oo(t,32768)&&e.includes("shuffle")&&n.push({icon:!0===r.shuffle?"mdi:shuffle":"mdi:shuffle-disabled",action:"shuffle_set"}),("playing"===i||"paused"===i||o)&&oo(t,16)&&e.includes("previous")&&n.push({icon:"mdi:skip-previous",action:"media_previous_track"}),!o&&("playing"===i&&(oo(t,1)||oo(t,4096))||("paused"===i||"idle"===i)&&oo(t,16384)||"on"===i&&(oo(t,16384)||oo(t,1)))&&e.includes("play_pause_stop")&&n.push({icon:"on"===i?"mdi:play-pause":"playing"!==i?"mdi:play":oo(t,1)?"mdi:pause":"mdi:stop",action:"playing"!==i?"media_play":oo(t,1)?"media_pause":"media_stop"}),o&&oo(t,16384)&&e.includes("play_pause_stop")&&n.push({icon:"mdi:play",action:"media_play"}),o&&oo(t,1)&&e.includes("play_pause_stop")&&n.push({icon:"mdi:pause",action:"media_pause"}),o&&oo(t,4096)&&e.includes("play_pause_stop")&&n.push({icon:"mdi:stop",action:"media_stop"}),("playing"===i||"paused"===i||o)&&oo(t,32)&&e.includes("next")&&n.push({icon:"mdi:skip-next",action:"media_next_track"}),("playing"===i||"paused"===i||o)&&oo(t,262144)&&e.includes("repeat")&&n.push({icon:"all"===r.repeat?"mdi:repeat":"one"===r.repeat?"mdi:repeat-once":"mdi:repeat-off",action:"repeat_set"}),n.length>0?n:[]},xa=(t,e,i)=>{let n={};"shuffle_set"===i?n={shuffle:!e.attributes.shuffle}:"repeat_set"===i?n={repeat:"all"===e.attributes.repeat?"one":"off"===e.attributes.repeat?"all":"off"}:"volume_mute"===i&&(n={is_volume_muted:!e.attributes.is_volume_muted}),t.callService("media_player",i,Object.assign({entity_id:e.entity_id},n))};let wa=class extends Ot{constructor(){super(...arguments),this.fill=!1}_handleClick(t){t.stopPropagation();const e=t.target.action;xa(this.hass,this.entity,e)}render(){const t=g(this.hass),e=ya(this.entity,this.controls);return ut` - - ${e.map((t=>ut` - - `))} - - `}};n([zt({attribute:!1})],wa.prototype,"hass",void 0),n([zt({attribute:!1})],wa.prototype,"entity",void 0),n([zt({attribute:!1})],wa.prototype,"controls",void 0),n([zt()],wa.prototype,"fill",void 0),wa=n([Dt("mushroom-media-player-media-control")],wa);let Ca=class extends Ot{constructor(){super(...arguments),this.fill=!1}handleSliderChange(t){const e=t.detail.value;this.hass.callService("media_player","volume_set",{entity_id:this.entity.entity_id,volume_level:e/100})}handleClick(t){t.stopPropagation();const e=t.target.action;xa(this.hass,this.entity,e)}render(){var t,e,i;if(!this.entity)return null;const n=null!=(o=this.entity).attributes.volume_level?100*o.attributes.volume_level:void 0;var o;const r=g(this.hass),a=(null===(t=this.controls)||void 0===t?void 0:t.includes("volume_set"))&&oo(this.entity,4),s=(null===(e=this.controls)||void 0===e?void 0:e.includes("volume_mute"))&&oo(this.entity,8),l=(null===(i=this.controls)||void 0===i?void 0:i.includes("volume_buttons"))&&oo(this.entity,1024);return ut` - - ${a?ut` `:null} - ${s?ut` - - `:void 0} - ${l?ut` - - `:void 0} - ${l?ut` - - `:void 0} - - `}static get styles(){return N` - mushroom-slider { - flex: 1; - --main-color: rgb(var(--rgb-state-media-player)); - --bg-color: rgba(var(--rgb-state-media-player), 0.2); - } - `}};n([zt({attribute:!1})],Ca.prototype,"hass",void 0),n([zt({attribute:!1})],Ca.prototype,"entity",void 0),n([zt()],Ca.prototype,"fill",void 0),n([zt({attribute:!1})],Ca.prototype,"controls",void 0),Ca=n([Dt("mushroom-media-player-volume-control")],Ca);const ka={media_control:"mdi:play-pause",volume_control:"mdi:volume-high"};vo({type:"mushroom-media-player-card",name:"Mushroom Media Card",description:"Card for media player entity"});let $a=class extends Ot{constructor(){super(...arguments),this._controls=[]}static async getConfigElement(){return await Promise.resolve().then((function(){return Iu})),document.createElement("mushroom-media-player-card-editor")}static async getStubConfig(t){const e=Object.keys(t.states).filter((t=>ba.includes(t.split(".")[0])));return{type:"custom:mushroom-media-player-card",entity:e[0]}}_onControlTap(t,e){e.stopPropagation(),this._activeControl=t}getCardSize(){return 1}setConfig(t){this._config=Object.assign({tap_action:{action:"more-info"},hold_action:{action:"more-info"},double_tap_action:{action:"more-info"}},t),this.updateControls()}updated(t){super.updated(t),this.hass&&t.has("hass")&&this.updateControls()}updateControls(){var t;if(!this._config||!this.hass||!this._config.entity)return;const e=this._config.entity,i=this.hass.states[e];if(!i)return;const n=[];((t,e)=>ya(t,null!=e?e:[]).length>0)(i,null===(t=this._config)||void 0===t?void 0:t.media_controls)&&n.push("media_control"),((t,e)=>(null==e?void 0:e.includes("volume_buttons"))&&oo(t,1024)||(null==e?void 0:e.includes("volume_mute"))&&oo(t,8)||(null==e?void 0:e.includes("volume_set"))&&oo(t,4))(i,this._config.volume_controls)&&n.push("volume_control"),this._controls=n;const o=!!this._activeControl&&n.includes(this._activeControl);this._activeControl=o?this._activeControl:n[0]}_handleAction(t){S(this,this.hass,this._config,t.detail.action)}render(){if(!this._config||!this.hass||!this._config.entity)return ut``;const t=this._config.entity,e=this.hass.states[t],i=va(this._config,e),n=Jo(this._config);let o=function(t,e){let i=t.name||e.attributes.friendly_name||"";return![Pn,Fn,Vn].includes(e.state)&&t.use_media_info&&e.attributes.media_title&&(i=e.attributes.media_title),i}(this._config,e),r=function(t,e,i){let n=y(i.localize,e,i.locale);return![Pn,Fn,Vn].includes(e.state)&&t.use_media_info&&(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})(e)||n}(this._config,e,this.hass);const a=g(this.hass),s=this._config.use_media_artwork?e.attributes.entity_picture:void 0;return ut` - - - ${s?ut` - - `:ut` - - `} - ${"unavailable"===e.state?ut` - - `:null} - - - ${this._controls.length>0?ut` -
- ${this.renderActiveControl(e,n)} - ${this.renderOtherControls()} -
- `:null} -
- `}renderOtherControls(){const t=this._controls.filter((t=>t!=this._activeControl));return ut` - ${t.map((t=>ut` - this._onControlTap(t,e)} - /> - `))} - `}renderActiveControl(t,e){var i,n,o,r;const a=null!==(n=null===(i=this._config)||void 0===i?void 0:i.media_controls)&&void 0!==n?n:[],s=null!==(r=null===(o=this._config)||void 0===o?void 0:o.volume_controls)&&void 0!==r?r:[];switch(this._activeControl){case"media_control":return ut` - + + `}};n([st({attribute:!1})],ac.prototype,"hass",void 0),n([st({attribute:!1})],ac.prototype,"entity",void 0),n([st()],ac.prototype,"fill",void 0),ac=n([at("mushroom-update-buttons-control")],ac),ll({type:"mushroom-update-card",name:"Mushroom Update Card",description:"Card for update entity"});let lc=class extends rl{static async getConfigElement(){return await Promise.resolve().then((function(){return fp})),document.createElement("mushroom-update-card-editor")}static async getStubConfig(t){const e=Object.keys(t.states).filter((t=>oc.includes(t.split(".")[0])));return{type:"custom:mushroom-update-card",entity:e[0]}}getCardSize(){return 1}setConfig(t){this._config=Object.assign({tap_action:{action:"more-info"},hold_action:{action:"more-info"}},t)}_handleAction(t){Oe(this,this.hass,this._config,t.detail.action)}render(){if(!this._config||!this.hass||!this._config.entity)return N``;const t=this._config.entity,e=this.hass.states[t],i=this._config.name||e.attributes.friendly_name||"",n=this._config.icon||pl(e),o=Ka(this._config),r=Ta(e,o.icon_type),a=pe(this.hass),l=(!this._config.collapsible_controls||Lt(e))&&this._config.show_buttons_control&&Nt(e,1);return N` + + + - - `;case"volume_control":return ut` - - `;default:return null}}static get styles(){return[bo,N` + ${r?this.renderPicture(r):this.renderIcon(e,n)} + ${this.renderBadge(e)} + ${this.renderStateInfo(e,o,i)}; + + ${l?N` +
+ +
+ `:null} +
+
+ `}renderIcon(t,e){const i=Vt(t),n=function(t,e){return e?rc.installing:rc[t]||"var(--rgb-grey)"}(t.state,i),o={"--icon-color":`rgb(${n})`,"--shape-color":`rgba(${n}, 0.2)`};return N` + + `}static get styles(){return[super.styles,al,d` mushroom-state-item { cursor: pointer; } mushroom-shape-icon { - --icon-color: rgb(var(--rgb-state-media-player)); - --shape-color: rgba(var(--rgb-state-media-player), 0.2); + --icon-color: rgb(var(--rgb-state-entity)); + --shape-color: rgba(var(--rgb-state-entity), 0.2); } - mushroom-media-player-media-control, - mushroom-media-player-volume-control { + mushroom-shape-icon.pulse { + --shape-animation: 1s ease 0s infinite normal none running pulse; + } + mushroom-update-buttons-control { flex: 1; } - `]}};n([zt({attribute:!1})],$a.prototype,"hass",void 0),n([jt()],$a.prototype,"_config",void 0),n([jt()],$a.prototype,"_activeControl",void 0),n([jt()],$a.prototype,"_controls",void 0),$a=n([Dt("mushroom-media-player-card")],$a);const Ea=["vacuum"];function Aa(t){switch(t.state){case"cleaning":case"on":return!0;default:return!1}}const Sa=[{icon:"mdi:play",serviceName:"start",isVisible:(t,e)=>oo(t,8192)&&e.includes("start_pause")&&!Aa(t),isDisabled:()=>!1},{icon:"mdi:pause",serviceName:"pause",isVisible:(t,e)=>oo(t,8192)&&oo(t,4)&&e.includes("start_pause")&&Aa(t),isDisabled:()=>!1},{icon:"mdi:play-pause",serviceName:"start_pause",isVisible:(t,e)=>!oo(t,8192)&&oo(t,4)&&e.includes("start_pause"),isDisabled:()=>!1},{icon:"mdi:stop",serviceName:"stop",isVisible:(t,e)=>oo(t,8)&&e.includes("stop"),isDisabled:t=>function(t){switch(t.state){case"docked":case"off":case"idle":case"returning":return!0;default:return!1}}(t)},{icon:"mdi:target-variant",serviceName:"clean_spot",isVisible:(t,e)=>oo(t,1024)&&e.includes("clean_spot"),isDisabled:()=>!1},{icon:"mdi:map-marker",serviceName:"locate",isVisible:(t,e)=>oo(t,512)&&e.includes("locate"),isDisabled:t=>function(t){switch(t.state){case"returning":case"off":return!0;default:return!1}}(t)},{icon:"mdi:home-map-marker",serviceName:"return_to_base",isVisible:(t,e)=>oo(t,16)&&e.includes("return_home"),isDisabled:()=>!1}];let Ia=class extends Ot{constructor(){super(...arguments),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=g(this.hass);return ut` + `]}};n([ct()],lc.prototype,"_config",void 0),lc=n([at("mushroom-update-card")],lc);const sc=["vacuum"];function cc(t){switch(t.state){case"cleaning":case"on":return!0;default:return!1}}function dc(t){return"returning"===t.state}const uc=[{icon:"mdi:power",serviceName:"turn_on",isVisible:(t,e)=>Nt(t,1)&&e.includes("on_off")&&!Lt(t),isDisabled:()=>!1},{icon:"mdi:power",serviceName:"turn_off",isVisible:(t,e)=>Nt(t,2)&&e.includes("on_off")&&Lt(t),isDisabled:()=>!1},{icon:"mdi:play",serviceName:"start",isVisible:(t,e)=>Nt(t,8192)&&e.includes("start_pause")&&!cc(t),isDisabled:()=>!1},{icon:"mdi:pause",serviceName:"pause",isVisible:(t,e)=>Nt(t,8192)&&Nt(t,4)&&e.includes("start_pause")&&cc(t),isDisabled:()=>!1},{icon:"mdi:play-pause",serviceName:"start_pause",isVisible:(t,e)=>!Nt(t,8192)&&Nt(t,4)&&e.includes("start_pause"),isDisabled:()=>!1},{icon:"mdi:stop",serviceName:"stop",isVisible:(t,e)=>Nt(t,8)&&e.includes("stop"),isDisabled:t=>function(t){switch(t.state){case"docked":case"off":case"idle":case"returning":return!0;default:return!1}}(t)},{icon:"mdi:target-variant",serviceName:"clean_spot",isVisible:(t,e)=>Nt(t,1024)&&e.includes("clean_spot"),isDisabled:()=>!1},{icon:"mdi:map-marker",serviceName:"locate",isVisible:(t,e)=>Nt(t,512)&&e.includes("locate"),isDisabled:t=>dc(t)},{icon:"mdi:home-map-marker",serviceName:"return_to_base",isVisible:(t,e)=>Nt(t,16)&&e.includes("return_home"),isDisabled:()=>!1}];let hc=class extends ot{constructor(){super(...arguments),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=pe(this.hass);return N` - ${Sa.filter((t=>t.isVisible(this.entity,this.commands))).map((t=>ut` + ${uc.filter((t=>t.isVisible(this.entity,this.commands))).map((t=>N` `))} - `}};n([zt({attribute:!1})],Ia.prototype,"hass",void 0),n([zt({attribute:!1})],Ia.prototype,"entity",void 0),n([zt({attribute:!1})],Ia.prototype,"commands",void 0),n([zt()],Ia.prototype,"fill",void 0),Ia=n([Dt("mushroom-vacuum-commands-control")],Ia),vo({type:"mushroom-vacuum-card",name:"Mushroom Vacuum Card",description:"Card for vacuum entity"});let Ta=class extends Ot{static async getConfigElement(){return await Promise.resolve().then((function(){return zu})),document.createElement("mushroom-vacuum-card-editor")}static async getStubConfig(t){const e=Object.keys(t.states).filter((t=>Ea.includes(t.split(".")[0])));return{type:"custom:mushroom-vacuum-card",entity:e[0]}}getCardSize(){return 1}setConfig(t){this._config=Object.assign({tap_action:{action:"more-info"},hold_action:{action:"more-info"},double_tap_action:{action:"more-info"}},t)}_handleAction(t){S(this,this.hass,this._config,t.detail.action)}render(){var t,e;if(!this._config||!this.hass||!this._config.entity)return ut``;const i=this._config.entity,n=this.hass.states[i],o=this._config.name||n.attributes.friendly_name,r=this._config.icon||Io(n),a=Jo(this._config),s=this._config.hide_state;let l=ao(this.hass.localize,n,this.hass.locale);const c=Bn(n),d=null!==(e=null===(t=this._config)||void 0===t?void 0:t.commands)&&void 0!==e?e:[],u=g(this.hass);return ut` - - - - ${Un(n)?null:ut` - - `} - - - ${((t,e)=>Sa.some((i=>i.isVisible(t,e))))(n,d)?ut` -
- - -
- `:null} -
- `}static get styles(){return[bo,N` + `}};n([st({attribute:!1})],hc.prototype,"hass",void 0),n([st({attribute:!1})],hc.prototype,"entity",void 0),n([st({attribute:!1})],hc.prototype,"commands",void 0),n([st()],hc.prototype,"fill",void 0),hc=n([at("mushroom-vacuum-commands-control")],hc),ll({type:"mushroom-vacuum-card",name:"Mushroom Vacuum Card",description:"Card for vacuum entity"});let mc=class extends rl{static async getConfigElement(){return await Promise.resolve().then((function(){return xp})),document.createElement("mushroom-vacuum-card-editor")}static async getStubConfig(t){const e=Object.keys(t.states).filter((t=>sc.includes(t.split(".")[0])));return{type:"custom:mushroom-vacuum-card",entity:e[0]}}getCardSize(){return 1}setConfig(t){this._config=Object.assign({tap_action:{action:"more-info"},hold_action:{action:"more-info"}},t)}_handleAction(t){Oe(this,this.hass,this._config,t.detail.action)}render(){var t,e;if(!this._config||!this.hass||!this._config.entity)return N``;const i=this._config.entity,n=this.hass.states[i],o=this._config.name||n.attributes.friendly_name||"",r=this._config.icon||pl(n),a=Ka(this._config),l=Ta(n,a.icon_type),s=pe(this.hass),c=null!==(e=null===(t=this._config)||void 0===t?void 0:t.commands)&&void 0!==e?e:[];return N` + + + + ${l?this.renderPicture(l):this.renderIcon(n,r)} + ${this.renderBadge(n)} + ${this.renderStateInfo(n,a,o)}; + + ${((t,e)=>uc.some((i=>i.isVisible(t,e))))(n,c)?N` +
+ + +
+ `:null} +
+
+ `}renderIcon(t,e){var i,n;return N` + + `}static get styles(){return[super.styles,al,d` mushroom-state-item { cursor: pointer; } @@ -2286,113 +2855,51 @@ const Ln=N`.mdc-floating-label{-moz-osx-font-smoothing:grayscale;-webkit-font-sm --icon-color: rgb(var(--rgb-state-vacuum)); --shape-color: rgba(var(--rgb-state-vacuum), 0.2); } - mushroom-vacuum-commands-control { - flex: 1; + mushroom-shape-icon.cleaning { + --icon-animation: 5s infinite linear cleaning; } - `]}};n([zt({attribute:!1})],Ta.prototype,"hass",void 0),n([jt()],Ta.prototype,"_config",void 0),Ta=n([Dt("mushroom-vacuum-card")],Ta);const Oa=["lock"];function Ma(t){return"unlocked"===t.state}function Da(t){return"locked"===t.state}function La(t){switch(t.state){case"locking":case"unlocking":return!0;default:return!1}}const za=[{icon:"mdi:lock",title:"lock",serviceName:"lock",isVisible:t=>Ma(t),isDisabled:()=>!1},{icon:"mdi:lock-open",title:"unlock",serviceName:"unlock",isVisible:t=>Da(t),isDisabled:()=>!1},{icon:"mdi:lock-clock",isVisible:t=>La(t),isDisabled:()=>!0},{icon:"mdi:door-open",title:"open",serviceName:"open",isVisible:t=>oo(t,1)&&Ma(t),isDisabled:t=>La(t)}];let ja=class extends Ot{constructor(){super(...arguments),this.fill=!1}callService(t){t.stopPropagation();const e=t.target.entry;this.hass.callService("lock",e.serviceName,{entity_id:this.entity.entity_id})}render(){const t=g(this.hass),e=we(this.hass);return ut` - ${za.filter((t=>t.isVisible(this.entity))).map((t=>ut` - - `))} - `}};n([zt({attribute:!1})],ja.prototype,"hass",void 0),n([zt({attribute:!1})],ja.prototype,"entity",void 0),n([zt()],ja.prototype,"fill",void 0),ja=n([Dt("mushroom-lock-buttons-control")],ja),vo({type:"mushroom-lock-card",name:"Mushroom Lock Card",description:"Card for all lock entities"});let Na=class extends Ot{static async getConfigElement(){return await Promise.resolve().then((function(){return Pu})),document.createElement("mushroom-lock-card-editor")}static async getStubConfig(t){const e=Object.keys(t.states).filter((t=>Oa.includes(t.split(".")[0])));return{type:"custom:mushroom-lock-card",entity:e[0]}}getCardSize(){return 1}setConfig(t){this._config=Object.assign({tap_action:{action:"more-info"},hold_action:{action:"more-info"},double_tap_action:{action:"more-info"}},t)}_handleAction(t){S(this,this.hass,this._config,t.detail.action)}render(){if(!this._config||!this.hass||!this._config.entity)return ut``;const t=this._config.entity,e=this.hass.states[t],i=this._config.name||e.attributes.friendly_name||"",n=this._config.icon||Io(e),o=this._config.hide_state,r=Jo(this._config),a=y(this.hass.localize,e,this.hass.locale),s=Un(e),l=g(this.hass);return ut` - - - ${this.renderIcon(e,n,s)} - ${s?null:ut` - - `} - - -
- - -
-
- `}renderIcon(t,e,i){const n={"--icon-color":"rgb(var(--rgb-state-lock))","--shape-color":"rgba(var(--rgb-state-lock), 0.2)"};return Da(t)?(n["--icon-color"]="rgb(var(--rgb-state-lock-locked))",n["--shape-color"]="rgba(var(--rgb-state-lock-locked), 0.2)"):Ma(t)?(n["--icon-color"]="rgb(var(--rgb-state-lock-unlocked))",n["--shape-color"]="rgba(var(--rgb-state-lock-unlocked), 0.2)"):La(t)&&(n["--icon-color"]="rgb(var(--rgb-state-lock-pending))",n["--shape-color"]="rgba(var(--rgb-state-lock-pending), 0.2)"),ut` - - `}static get styles(){return[bo,N` - mushroom-state-item { - cursor: pointer; + mushroom-shape-icon.returning { + --icon-animation: 2s infinite linear returning; } - mushroom-lock-buttons-control { + mushroom-vacuum-commands-control { flex: 1; } - `]}};n([zt({attribute:!1})],Na.prototype,"hass",void 0),n([jt()],Na.prototype,"_config",void 0),Na=n([Dt("mushroom-lock-card")],Na),console.info("%c🍄 Mushroom 🍄 - 1.6.3","color: #ef5350; font-weight: 700;");var Ra=Number.isNaN||function(t){return"number"==typeof t&&t!=t};function Pa(t,e){if(t.length!==e.length)return!1;for(var i=0;i * { - flex: 1; - padding-right: 8px; - } - .side-by-side > *:last-child { - flex: 1; - padding-right: 0; - } - .suffix { - margin: 0 8px; - } - hui-theme-select-editor, - hui-action-editor, - mushroom-select, - mushroom-textfield, - ha-icon-picker, - mushroom-layout-picker, - mushroom-info-picker, - mushroom-alignment-picker, - mushroom-color-picker { - margin-top: 8px; - } -`,Ba=Xo({type:Wo(),view_layout:Vo()}),Ua=["hide_name","hide_state","hide_icon","icon_color","layout","primary_info","secondary_info","content_info","use_entity_picture"],Ha=()=>{var t,e;customElements.get("ha-form")&&customElements.get("hui-action-editor")||null===(t=customElements.get("hui-button-card"))||void 0===t||t.getConfigElement(),customElements.get("ha-entity-picker")||null===(e=customElements.get("hui-conditional-card-editor"))||void 0===e||e.getConfigElement()},Ya=Xo({user:Wo()}),Xa=Ko([Uo(),Xo({text:qo(Wo()),excemptions:qo(Bo(Ya))})]),qa=Xo({action:Yo("url"),url_path:Wo(),confirmation:qo(Xa)}),Wa=Xo({action:Yo("call-service"),service:Wo(),service_data:qo(Xo()),target:qo(Xo({entity_id:qo(Ko([Wo(),Bo(Wo())])),device_id:qo(Ko([Wo(),Bo(Wo())])),area_id:qo(Ko([Wo(),Bo(Wo())]))})),confirmation:qo(Xa)}),Ga=Xo({action:Yo("navigate"),navigation_path:Wo(),confirmation:qo(Xa)}),Ka=Go({action:Yo("fire-dom-event")}),Za=Ko([Xo({action:Ho(["none","toggle","more-info","call-service","url","navigate"]),confirmation:qo(Xa)}),qa,Ga,Wa,Ka]),Ja=Po(Ba,Xo({entity:qo(Wo()),name:qo(Wo()),icon:qo(Wo()),states:qo(Bo()),show_keypad:qo(Uo()),layout:qo(Zo),hide_state:qo(Uo()),tap_action:qo(Za),hold_action:qo(Za),double_tap_action:qo(Za)})),Qa=["more-info","navigate","url","call-service","none"],ts=["armed_home","armed_away","armed_night","armed_vacation","armed_custom_bypass"],es=["show_keypad"],is=Fa(((t,e)=>[{name:"entity",selector:{entity:{domain:Qo}}},{name:"name",selector:{text:{}}},{type:"grid",name:"",schema:[{name:"icon",selector:{icon:{placeholder:e}}}]},{type:"grid",name:"",schema:[{name:"layout",selector:{"mush-layout":{}}},{name:"hide_state",selector:{boolean:{}}}]},{type:"multi_select",name:"states",options:ts.map((e=>[e,t(`ui.card.alarm_control_panel.${e.replace("armed","arm")}`)]))},{name:"show_keypad",selector:{boolean:{}}},{name:"tap_action",selector:{"mush-action":{actions:Qa}}},{name:"hold_action",selector:{"mush-action":{actions:Qa}}},{name:"double_tap_action",selector:{"mush-action":{actions:Qa}}}]));let ns=class extends Ot{constructor(){super(...arguments),this._computeLabelCallback=t=>{const e=we(this.hass);return Ua.includes(t.name)?e(`editor.card.generic.${t.name}`):es.includes(t.name)?e(`editor.card.alarm_control_panel.${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(),Ha()}setConfig(t){No(t,Ja),this._config=t}render(){if(!this.hass||!this._config)return ut``;const t=this._config.entity?this.hass.states[this._config.entity]:void 0,e=t?Io(t):void 0,i=this._config.icon||e,n=is(this.hass.localize,i);return ut` + `]}};n([ct()],mc.prototype,"_config",void 0),mc=n([at("mushroom-vacuum-card")],mc),console.info("%c🍄 Mushroom 🍄 - 2.4.1","color: #ef5350; font-weight: 700;");const pc=ce({tap_action:de(Be),hold_action:de(Be),double_tap_action:de(Be)}),fc=(t,e)=>[{name:"tap_action",selector:He(t,2022,11)?{"ui-action":{actions:e}}:{"mush-action":{actions:e}}},{name:"hold_action",selector:He(t,2022,11)?{"ui-action":{actions:e}}:{"mush-action":{actions:e}}},{name:"double_tap_action",selector:He(t,2022,11)?{"ui-action":{actions:e}}:{"mush-action":{actions:e}}}],gc=ce({layout:de(me([le("horizontal"),le("vertical"),le("default")])),fill_container:de(re()),primary_info:de(ae(Aa)),secondary_info:de(ae(Aa)),icon_type:de(ae(Sa))}),_c=[{type:"grid",name:"",schema:[{name:"layout",selector:{"mush-layout":{}}},{name:"fill_container",selector:{boolean:{}}}]},{type:"grid",name:"",schema:[{name:"primary_info",selector:{"mush-info":{}}},{name:"secondary_info",selector:{"mush-info":{}}},{name:"icon_type",selector:{"mush-icon-type":{}}}]}],vc=["icon_color","layout","fill_container","primary_info","secondary_info","icon_type","content_info","use_entity_picture","collapsible_controls","icon_animation"],bc=t=>{var e,i;customElements.get("ha-form")&&(customElements.get("hui-action-editor")||He(t,2022,11))||null===(e=customElements.get("hui-button-card"))||void 0===e||e.getConfigElement(),customElements.get("ha-entity-picker")||null===(i=customElements.get("hui-entities-card"))||void 0===i||i.getConfigElement()},yc=ce({entity:de(ue()),name:de(ue()),icon:de(ue())}),xc=ce({index:de(se()),view_index:de(se()),view_layout:ne(),type:ue()}),wc=te(xc,te(yc,gc,pc),ce({states:de(oe()),show_keypad:de(re())})),kc=["more-info","navigate","url","call-service","none"],Cc=["armed_home","armed_away","armed_night","armed_vacation","armed_custom_bypass"],$c=["show_keypad"],Ec=_t(((t,e,i)=>[{name:"entity",selector:{entity:{domain:fl}}},{name:"name",selector:{text:{}}},{name:"icon",selector:{icon:{placeholder:i}}},..._c,{type:"multi_select",name:"states",options:Cc.map((e=>[e,t(`ui.card.alarm_control_panel.${e.replace("armed","arm")}`)]))},{name:"show_keypad",selector:{boolean:{}}},...fc(e,kc)]));let Ac=class extends ol{constructor(){super(...arguments),this._computeLabel=t=>{const e=Hi(this.hass);return vc.includes(t.name)?e(`editor.card.generic.${t.name}`):$c.includes(t.name)?e(`editor.card.alarm_control_panel.${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(),bc(this.hass.connection.haVersion)}setConfig(t){Jt(t,wc),this._config=t}render(){if(!this.hass||!this._config)return N``;const t=this._config.entity?this.hass.states[this._config.entity]:void 0,e=t?pl(t):void 0,i=this._config.icon||e,n=Ec(this.hass.localize,this.hass.connection.haVersion,i);return N` - `}_valueChanged(t){w(this,"config-changed",{config:t.detail.value})}static get styles(){return[Va]}};n([zt({attribute:!1})],ns.prototype,"hass",void 0),n([jt()],ns.prototype,"_config",void 0),ns=n([Dt("mushroom-alarm-control-panel-card-editor")],ns);var os=Object.freeze({__proto__:null,get SwitchCardEditor(){return ns}}); + `}_valueChanged(t){At(this,"config-changed",{config:t.detail.value})}};n([ct()],Ac.prototype,"_config",void 0),Ac=n([at("mushroom-alarm-control-panel-card-editor")],Ac);var Sc=Object.freeze({__proto__:null,get SwitchCardEditor(){return Ac}}); /** * @license * Copyright 2021 Google LLC * SPDX-LIcense-Identifier: Apache-2.0 - */const rs=N`.mdc-floating-label{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto, sans-serif;font-family:var(--mdc-typography-subtitle1-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:1rem;font-size:var(--mdc-typography-subtitle1-font-size, 1rem);font-weight:400;font-weight:var(--mdc-typography-subtitle1-font-weight, 400);letter-spacing:0.009375em;letter-spacing:var(--mdc-typography-subtitle1-letter-spacing, 0.009375em);text-decoration:inherit;text-decoration:var(--mdc-typography-subtitle1-text-decoration, inherit);text-transform:inherit;text-transform:var(--mdc-typography-subtitle1-text-transform, inherit);position:absolute;left:0;-webkit-transform-origin:left top;transform-origin:left top;line-height:1.15rem;text-align:left;text-overflow:ellipsis;white-space:nowrap;cursor:text;overflow:hidden;will-change:transform;transition:transform 150ms cubic-bezier(0.4, 0, 0.2, 1),color 150ms cubic-bezier(0.4, 0, 0.2, 1)}[dir=rtl] .mdc-floating-label,.mdc-floating-label[dir=rtl]{right:0;left:auto;-webkit-transform-origin:right top;transform-origin:right top;text-align:right}.mdc-floating-label--float-above{cursor:auto}.mdc-floating-label--required::after{margin-left:1px;margin-right:0px;content:"*"}[dir=rtl] .mdc-floating-label--required::after,.mdc-floating-label--required[dir=rtl]::after{margin-left:0;margin-right:1px}.mdc-floating-label--float-above{transform:translateY(-106%) scale(0.75)}.mdc-floating-label--shake{animation:mdc-floating-label-shake-float-above-standard 250ms 1}@keyframes mdc-floating-label-shake-float-above-standard{0%{transform:translateX(calc(0 - 0%)) translateY(-106%) scale(0.75)}33%{animation-timing-function:cubic-bezier(0.5, 0, 0.701732, 0.495819);transform:translateX(calc(4% - 0%)) translateY(-106%) scale(0.75)}66%{animation-timing-function:cubic-bezier(0.302435, 0.381352, 0.55, 0.956352);transform:translateX(calc(-4% - 0%)) translateY(-106%) scale(0.75)}100%{transform:translateX(calc(0 - 0%)) translateY(-106%) scale(0.75)}}.mdc-line-ripple::before,.mdc-line-ripple::after{position:absolute;bottom:0;left:0;width:100%;border-bottom-style:solid;content:""}.mdc-line-ripple::before{border-bottom-width:1px;z-index:1}.mdc-line-ripple::after{transform:scaleX(0);border-bottom-width:2px;opacity:0;z-index:2}.mdc-line-ripple::after{transition:transform 180ms cubic-bezier(0.4, 0, 0.2, 1),opacity 180ms cubic-bezier(0.4, 0, 0.2, 1)}.mdc-line-ripple--active::after{transform:scaleX(1);opacity:1}.mdc-line-ripple--deactivating::after{opacity:0}.mdc-notched-outline{display:flex;position:absolute;top:0;right:0;left:0;box-sizing:border-box;width:100%;max-width:100%;height:100%;text-align:left;pointer-events:none}[dir=rtl] .mdc-notched-outline,.mdc-notched-outline[dir=rtl]{text-align:right}.mdc-notched-outline__leading,.mdc-notched-outline__notch,.mdc-notched-outline__trailing{box-sizing:border-box;height:100%;border-top:1px solid;border-bottom:1px solid;pointer-events:none}.mdc-notched-outline__leading{border-left:1px solid;border-right:none;width:12px}[dir=rtl] .mdc-notched-outline__leading,.mdc-notched-outline__leading[dir=rtl]{border-left:none;border-right:1px solid}.mdc-notched-outline__trailing{border-left:none;border-right:1px solid;flex-grow:1}[dir=rtl] .mdc-notched-outline__trailing,.mdc-notched-outline__trailing[dir=rtl]{border-left:1px solid;border-right:none}.mdc-notched-outline__notch{flex:0 0 auto;width:auto;max-width:calc(100% - 12px * 2)}.mdc-notched-outline .mdc-floating-label{display:inline-block;position:relative;max-width:100%}.mdc-notched-outline .mdc-floating-label--float-above{text-overflow:clip}.mdc-notched-outline--upgraded .mdc-floating-label--float-above{max-width:calc(100% / 0.75)}.mdc-notched-outline--notched .mdc-notched-outline__notch{padding-left:0;padding-right:8px;border-top:none}[dir=rtl] .mdc-notched-outline--notched .mdc-notched-outline__notch,.mdc-notched-outline--notched .mdc-notched-outline__notch[dir=rtl]{padding-left:8px;padding-right:0}.mdc-notched-outline--no-label .mdc-notched-outline__notch{display:none}@keyframes mdc-ripple-fg-radius-in{from{animation-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transform:translate(var(--mdc-ripple-fg-translate-start, 0)) scale(1)}to{transform:translate(var(--mdc-ripple-fg-translate-end, 0)) scale(var(--mdc-ripple-fg-scale, 1))}}@keyframes mdc-ripple-fg-opacity-in{from{animation-timing-function:linear;opacity:0}to{opacity:var(--mdc-ripple-fg-opacity, 0)}}@keyframes mdc-ripple-fg-opacity-out{from{animation-timing-function:linear;opacity:var(--mdc-ripple-fg-opacity, 0)}to{opacity:0}}.mdc-text-field--filled{--mdc-ripple-fg-size: 0;--mdc-ripple-left: 0;--mdc-ripple-top: 0;--mdc-ripple-fg-scale: 1;--mdc-ripple-fg-translate-end: 0;--mdc-ripple-fg-translate-start: 0;-webkit-tap-highlight-color:rgba(0,0,0,0);will-change:transform,opacity}.mdc-text-field--filled .mdc-text-field__ripple::before,.mdc-text-field--filled .mdc-text-field__ripple::after{position:absolute;border-radius:50%;opacity:0;pointer-events:none;content:""}.mdc-text-field--filled .mdc-text-field__ripple::before{transition:opacity 15ms linear,background-color 15ms linear;z-index:1;z-index:var(--mdc-ripple-z-index, 1)}.mdc-text-field--filled .mdc-text-field__ripple::after{z-index:0;z-index:var(--mdc-ripple-z-index, 0)}.mdc-text-field--filled.mdc-ripple-upgraded .mdc-text-field__ripple::before{transform:scale(var(--mdc-ripple-fg-scale, 1))}.mdc-text-field--filled.mdc-ripple-upgraded .mdc-text-field__ripple::after{top:0;left:0;transform:scale(0);transform-origin:center center}.mdc-text-field--filled.mdc-ripple-upgraded--unbounded .mdc-text-field__ripple::after{top:var(--mdc-ripple-top, 0);left:var(--mdc-ripple-left, 0)}.mdc-text-field--filled.mdc-ripple-upgraded--foreground-activation .mdc-text-field__ripple::after{animation:mdc-ripple-fg-radius-in 225ms forwards,mdc-ripple-fg-opacity-in 75ms forwards}.mdc-text-field--filled.mdc-ripple-upgraded--foreground-deactivation .mdc-text-field__ripple::after{animation:mdc-ripple-fg-opacity-out 150ms;transform:translate(var(--mdc-ripple-fg-translate-end, 0)) scale(var(--mdc-ripple-fg-scale, 1))}.mdc-text-field--filled .mdc-text-field__ripple::before,.mdc-text-field--filled .mdc-text-field__ripple::after{top:calc(50% - 100%);left:calc(50% - 100%);width:200%;height:200%}.mdc-text-field--filled.mdc-ripple-upgraded .mdc-text-field__ripple::after{width:var(--mdc-ripple-fg-size, 100%);height:var(--mdc-ripple-fg-size, 100%)}.mdc-text-field__ripple{position:absolute;top:0;left:0;width:100%;height:100%;pointer-events:none}.mdc-text-field{border-top-left-radius:4px;border-top-left-radius:var(--mdc-shape-small, 4px);border-top-right-radius:4px;border-top-right-radius:var(--mdc-shape-small, 4px);border-bottom-right-radius:0;border-bottom-left-radius:0;display:inline-flex;align-items:baseline;padding:0 16px;position:relative;box-sizing:border-box;overflow:hidden;will-change:opacity,transform,color}.mdc-text-field:not(.mdc-text-field--disabled) .mdc-floating-label{color:rgba(0, 0, 0, 0.6)}.mdc-text-field:not(.mdc-text-field--disabled) .mdc-text-field__input{color:rgba(0, 0, 0, 0.87)}@media all{.mdc-text-field:not(.mdc-text-field--disabled) .mdc-text-field__input::placeholder{color:rgba(0, 0, 0, 0.54)}}@media all{.mdc-text-field:not(.mdc-text-field--disabled) .mdc-text-field__input:-ms-input-placeholder{color:rgba(0, 0, 0, 0.54)}}.mdc-text-field .mdc-text-field__input{caret-color:#6200ee;caret-color:var(--mdc-theme-primary, #6200ee)}.mdc-text-field:not(.mdc-text-field--disabled)+.mdc-text-field-helper-line .mdc-text-field-helper-text{color:rgba(0, 0, 0, 0.6)}.mdc-text-field:not(.mdc-text-field--disabled) .mdc-text-field-character-counter,.mdc-text-field:not(.mdc-text-field--disabled)+.mdc-text-field-helper-line .mdc-text-field-character-counter{color:rgba(0, 0, 0, 0.6)}.mdc-text-field:not(.mdc-text-field--disabled) .mdc-text-field__icon--leading{color:rgba(0, 0, 0, 0.54)}.mdc-text-field:not(.mdc-text-field--disabled) .mdc-text-field__icon--trailing{color:rgba(0, 0, 0, 0.54)}.mdc-text-field:not(.mdc-text-field--disabled) .mdc-text-field__affix--prefix{color:rgba(0, 0, 0, 0.6)}.mdc-text-field:not(.mdc-text-field--disabled) .mdc-text-field__affix--suffix{color:rgba(0, 0, 0, 0.6)}.mdc-text-field .mdc-floating-label{top:50%;transform:translateY(-50%);pointer-events:none}.mdc-text-field__input{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto, sans-serif;font-family:var(--mdc-typography-subtitle1-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:1rem;font-size:var(--mdc-typography-subtitle1-font-size, 1rem);font-weight:400;font-weight:var(--mdc-typography-subtitle1-font-weight, 400);letter-spacing:0.009375em;letter-spacing:var(--mdc-typography-subtitle1-letter-spacing, 0.009375em);text-decoration:inherit;text-decoration:var(--mdc-typography-subtitle1-text-decoration, inherit);text-transform:inherit;text-transform:var(--mdc-typography-subtitle1-text-transform, inherit);height:28px;transition:opacity 150ms 0ms cubic-bezier(0.4, 0, 0.2, 1);width:100%;min-width:0;border:none;border-radius:0;background:none;appearance:none;padding:0}.mdc-text-field__input::-ms-clear{display:none}.mdc-text-field__input::-webkit-calendar-picker-indicator{display:none}.mdc-text-field__input:focus{outline:none}.mdc-text-field__input:invalid{box-shadow:none}@media all{.mdc-text-field__input::placeholder{transition:opacity 67ms 0ms cubic-bezier(0.4, 0, 0.2, 1);opacity:0}}@media all{.mdc-text-field__input:-ms-input-placeholder{transition:opacity 67ms 0ms cubic-bezier(0.4, 0, 0.2, 1);opacity:0}}@media all{.mdc-text-field--no-label .mdc-text-field__input::placeholder,.mdc-text-field--focused .mdc-text-field__input::placeholder{transition-delay:40ms;transition-duration:110ms;opacity:1}}@media all{.mdc-text-field--no-label .mdc-text-field__input:-ms-input-placeholder,.mdc-text-field--focused .mdc-text-field__input:-ms-input-placeholder{transition-delay:40ms;transition-duration:110ms;opacity:1}}.mdc-text-field__affix{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto, sans-serif;font-family:var(--mdc-typography-subtitle1-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:1rem;font-size:var(--mdc-typography-subtitle1-font-size, 1rem);font-weight:400;font-weight:var(--mdc-typography-subtitle1-font-weight, 400);letter-spacing:0.009375em;letter-spacing:var(--mdc-typography-subtitle1-letter-spacing, 0.009375em);text-decoration:inherit;text-decoration:var(--mdc-typography-subtitle1-text-decoration, inherit);text-transform:inherit;text-transform:var(--mdc-typography-subtitle1-text-transform, inherit);height:28px;transition:opacity 150ms 0ms cubic-bezier(0.4, 0, 0.2, 1);opacity:0;white-space:nowrap}.mdc-text-field--label-floating .mdc-text-field__affix,.mdc-text-field--no-label .mdc-text-field__affix{opacity:1}@supports(-webkit-hyphens: none){.mdc-text-field--outlined .mdc-text-field__affix{align-items:center;align-self:center;display:inline-flex;height:100%}}.mdc-text-field__affix--prefix{padding-left:0;padding-right:2px}[dir=rtl] .mdc-text-field__affix--prefix,.mdc-text-field__affix--prefix[dir=rtl]{padding-left:2px;padding-right:0}.mdc-text-field--end-aligned .mdc-text-field__affix--prefix{padding-left:0;padding-right:12px}[dir=rtl] .mdc-text-field--end-aligned .mdc-text-field__affix--prefix,.mdc-text-field--end-aligned .mdc-text-field__affix--prefix[dir=rtl]{padding-left:12px;padding-right:0}.mdc-text-field__affix--suffix{padding-left:12px;padding-right:0}[dir=rtl] .mdc-text-field__affix--suffix,.mdc-text-field__affix--suffix[dir=rtl]{padding-left:0;padding-right:12px}.mdc-text-field--end-aligned .mdc-text-field__affix--suffix{padding-left:2px;padding-right:0}[dir=rtl] .mdc-text-field--end-aligned .mdc-text-field__affix--suffix,.mdc-text-field--end-aligned .mdc-text-field__affix--suffix[dir=rtl]{padding-left:0;padding-right:2px}.mdc-text-field--filled{height:56px}.mdc-text-field--filled .mdc-text-field__ripple::before,.mdc-text-field--filled .mdc-text-field__ripple::after{background-color:rgba(0, 0, 0, 0.87);background-color:var(--mdc-ripple-color, rgba(0, 0, 0, 0.87))}.mdc-text-field--filled:hover .mdc-text-field__ripple::before,.mdc-text-field--filled.mdc-ripple-surface--hover .mdc-text-field__ripple::before{opacity:0.04;opacity:var(--mdc-ripple-hover-opacity, 0.04)}.mdc-text-field--filled.mdc-ripple-upgraded--background-focused .mdc-text-field__ripple::before,.mdc-text-field--filled:not(.mdc-ripple-upgraded):focus .mdc-text-field__ripple::before{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-focus-opacity, 0.12)}.mdc-text-field--filled::before{display:inline-block;width:0;height:40px;content:"";vertical-align:0}.mdc-text-field--filled:not(.mdc-text-field--disabled){background-color:whitesmoke}.mdc-text-field--filled:not(.mdc-text-field--disabled) .mdc-line-ripple::before{border-bottom-color:rgba(0, 0, 0, 0.42)}.mdc-text-field--filled:not(.mdc-text-field--disabled):hover .mdc-line-ripple::before{border-bottom-color:rgba(0, 0, 0, 0.87)}.mdc-text-field--filled .mdc-line-ripple::after{border-bottom-color:#6200ee;border-bottom-color:var(--mdc-theme-primary, #6200ee)}.mdc-text-field--filled .mdc-floating-label{left:16px;right:initial}[dir=rtl] .mdc-text-field--filled .mdc-floating-label,.mdc-text-field--filled .mdc-floating-label[dir=rtl]{left:initial;right:16px}.mdc-text-field--filled .mdc-floating-label--float-above{transform:translateY(-106%) scale(0.75)}.mdc-text-field--filled.mdc-text-field--no-label .mdc-text-field__input{height:100%}.mdc-text-field--filled.mdc-text-field--no-label .mdc-floating-label{display:none}.mdc-text-field--filled.mdc-text-field--no-label::before{display:none}@supports(-webkit-hyphens: none){.mdc-text-field--filled.mdc-text-field--no-label .mdc-text-field__affix{align-items:center;align-self:center;display:inline-flex;height:100%}}.mdc-text-field--outlined{height:56px;overflow:visible}.mdc-text-field--outlined .mdc-floating-label--float-above{transform:translateY(-37.25px) scale(1)}.mdc-text-field--outlined .mdc-floating-label--float-above{font-size:.75rem}.mdc-text-field--outlined.mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above{transform:translateY(-34.75px) scale(0.75)}.mdc-text-field--outlined.mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above{font-size:1rem}.mdc-text-field--outlined .mdc-floating-label--shake{animation:mdc-floating-label-shake-float-above-text-field-outlined 250ms 1}@keyframes mdc-floating-label-shake-float-above-text-field-outlined{0%{transform:translateX(calc(0 - 0%)) translateY(-34.75px) scale(0.75)}33%{animation-timing-function:cubic-bezier(0.5, 0, 0.701732, 0.495819);transform:translateX(calc(4% - 0%)) translateY(-34.75px) scale(0.75)}66%{animation-timing-function:cubic-bezier(0.302435, 0.381352, 0.55, 0.956352);transform:translateX(calc(-4% - 0%)) translateY(-34.75px) scale(0.75)}100%{transform:translateX(calc(0 - 0%)) translateY(-34.75px) scale(0.75)}}.mdc-text-field--outlined .mdc-text-field__input{height:100%}.mdc-text-field--outlined:not(.mdc-text-field--disabled) .mdc-notched-outline__leading,.mdc-text-field--outlined:not(.mdc-text-field--disabled) .mdc-notched-outline__notch,.mdc-text-field--outlined:not(.mdc-text-field--disabled) .mdc-notched-outline__trailing{border-color:rgba(0, 0, 0, 0.38)}.mdc-text-field--outlined:not(.mdc-text-field--disabled):not(.mdc-text-field--focused):hover .mdc-notched-outline .mdc-notched-outline__leading,.mdc-text-field--outlined:not(.mdc-text-field--disabled):not(.mdc-text-field--focused):hover .mdc-notched-outline .mdc-notched-outline__notch,.mdc-text-field--outlined:not(.mdc-text-field--disabled):not(.mdc-text-field--focused):hover .mdc-notched-outline .mdc-notched-outline__trailing{border-color:rgba(0, 0, 0, 0.87)}.mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--focused .mdc-notched-outline__leading,.mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--focused .mdc-notched-outline__notch,.mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--focused .mdc-notched-outline__trailing{border-color:#6200ee;border-color:var(--mdc-theme-primary, #6200ee)}.mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__leading{border-top-left-radius:4px;border-top-left-radius:var(--mdc-shape-small, 4px);border-top-right-radius:0;border-bottom-right-radius:0;border-bottom-left-radius:4px;border-bottom-left-radius:var(--mdc-shape-small, 4px)}[dir=rtl] .mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__leading,.mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__leading[dir=rtl]{border-top-left-radius:0;border-top-right-radius:4px;border-top-right-radius:var(--mdc-shape-small, 4px);border-bottom-right-radius:4px;border-bottom-right-radius:var(--mdc-shape-small, 4px);border-bottom-left-radius:0}@supports(top: max(0%)){.mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__leading{width:max(12px, var(--mdc-shape-small, 4px))}}@supports(top: max(0%)){.mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__notch{max-width:calc(100% - max(12px, var(--mdc-shape-small, 4px)) * 2)}}.mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__trailing{border-top-left-radius:0;border-top-right-radius:4px;border-top-right-radius:var(--mdc-shape-small, 4px);border-bottom-right-radius:4px;border-bottom-right-radius:var(--mdc-shape-small, 4px);border-bottom-left-radius:0}[dir=rtl] .mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__trailing,.mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__trailing[dir=rtl]{border-top-left-radius:4px;border-top-left-radius:var(--mdc-shape-small, 4px);border-top-right-radius:0;border-bottom-right-radius:0;border-bottom-left-radius:4px;border-bottom-left-radius:var(--mdc-shape-small, 4px)}@supports(top: max(0%)){.mdc-text-field--outlined{padding-left:max(16px, calc(var(--mdc-shape-small, 4px) + 4px))}}@supports(top: max(0%)){.mdc-text-field--outlined{padding-right:max(16px, var(--mdc-shape-small, 4px))}}@supports(top: max(0%)){.mdc-text-field--outlined+.mdc-text-field-helper-line{padding-left:max(16px, calc(var(--mdc-shape-small, 4px) + 4px))}}@supports(top: max(0%)){.mdc-text-field--outlined+.mdc-text-field-helper-line{padding-right:max(16px, var(--mdc-shape-small, 4px))}}.mdc-text-field--outlined.mdc-text-field--with-leading-icon{padding-left:0}@supports(top: max(0%)){.mdc-text-field--outlined.mdc-text-field--with-leading-icon{padding-right:max(16px, var(--mdc-shape-small, 4px))}}[dir=rtl] .mdc-text-field--outlined.mdc-text-field--with-leading-icon,.mdc-text-field--outlined.mdc-text-field--with-leading-icon[dir=rtl]{padding-right:0}@supports(top: max(0%)){[dir=rtl] .mdc-text-field--outlined.mdc-text-field--with-leading-icon,.mdc-text-field--outlined.mdc-text-field--with-leading-icon[dir=rtl]{padding-left:max(16px, var(--mdc-shape-small, 4px))}}.mdc-text-field--outlined.mdc-text-field--with-trailing-icon{padding-right:0}@supports(top: max(0%)){.mdc-text-field--outlined.mdc-text-field--with-trailing-icon{padding-left:max(16px, calc(var(--mdc-shape-small, 4px) + 4px))}}[dir=rtl] .mdc-text-field--outlined.mdc-text-field--with-trailing-icon,.mdc-text-field--outlined.mdc-text-field--with-trailing-icon[dir=rtl]{padding-left:0}@supports(top: max(0%)){[dir=rtl] .mdc-text-field--outlined.mdc-text-field--with-trailing-icon,.mdc-text-field--outlined.mdc-text-field--with-trailing-icon[dir=rtl]{padding-right:max(16px, calc(var(--mdc-shape-small, 4px) + 4px))}}.mdc-text-field--outlined.mdc-text-field--with-leading-icon.mdc-text-field--with-trailing-icon{padding-left:0;padding-right:0}.mdc-text-field--outlined .mdc-notched-outline--notched .mdc-notched-outline__notch{padding-top:1px}.mdc-text-field--outlined .mdc-text-field__ripple::before,.mdc-text-field--outlined .mdc-text-field__ripple::after{content:none}.mdc-text-field--outlined .mdc-floating-label{left:4px;right:initial}[dir=rtl] .mdc-text-field--outlined .mdc-floating-label,.mdc-text-field--outlined .mdc-floating-label[dir=rtl]{left:initial;right:4px}.mdc-text-field--outlined .mdc-text-field__input{display:flex;border:none !important;background-color:transparent}.mdc-text-field--outlined .mdc-notched-outline{z-index:1}.mdc-text-field--textarea{flex-direction:column;align-items:center;width:auto;height:auto;padding:0;transition:none}.mdc-text-field--textarea .mdc-floating-label{top:19px}.mdc-text-field--textarea .mdc-floating-label:not(.mdc-floating-label--float-above){transform:none}.mdc-text-field--textarea .mdc-text-field__input{flex-grow:1;height:auto;min-height:1.5rem;overflow-x:hidden;overflow-y:auto;box-sizing:border-box;resize:none;padding:0 16px;line-height:1.5rem}.mdc-text-field--textarea.mdc-text-field--filled::before{display:none}.mdc-text-field--textarea.mdc-text-field--filled .mdc-floating-label--float-above{transform:translateY(-10.25px) scale(0.75)}.mdc-text-field--textarea.mdc-text-field--filled .mdc-floating-label--shake{animation:mdc-floating-label-shake-float-above-textarea-filled 250ms 1}@keyframes mdc-floating-label-shake-float-above-textarea-filled{0%{transform:translateX(calc(0 - 0%)) translateY(-10.25px) scale(0.75)}33%{animation-timing-function:cubic-bezier(0.5, 0, 0.701732, 0.495819);transform:translateX(calc(4% - 0%)) translateY(-10.25px) scale(0.75)}66%{animation-timing-function:cubic-bezier(0.302435, 0.381352, 0.55, 0.956352);transform:translateX(calc(-4% - 0%)) translateY(-10.25px) scale(0.75)}100%{transform:translateX(calc(0 - 0%)) translateY(-10.25px) scale(0.75)}}.mdc-text-field--textarea.mdc-text-field--filled .mdc-text-field__input{margin-top:23px;margin-bottom:9px}.mdc-text-field--textarea.mdc-text-field--filled.mdc-text-field--no-label .mdc-text-field__input{margin-top:16px;margin-bottom:16px}.mdc-text-field--textarea.mdc-text-field--outlined .mdc-notched-outline--notched .mdc-notched-outline__notch{padding-top:0}.mdc-text-field--textarea.mdc-text-field--outlined .mdc-floating-label--float-above{transform:translateY(-27.25px) scale(1)}.mdc-text-field--textarea.mdc-text-field--outlined .mdc-floating-label--float-above{font-size:.75rem}.mdc-text-field--textarea.mdc-text-field--outlined.mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-text-field--textarea.mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above{transform:translateY(-24.75px) scale(0.75)}.mdc-text-field--textarea.mdc-text-field--outlined.mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-text-field--textarea.mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above{font-size:1rem}.mdc-text-field--textarea.mdc-text-field--outlined .mdc-floating-label--shake{animation:mdc-floating-label-shake-float-above-textarea-outlined 250ms 1}@keyframes mdc-floating-label-shake-float-above-textarea-outlined{0%{transform:translateX(calc(0 - 0%)) translateY(-24.75px) scale(0.75)}33%{animation-timing-function:cubic-bezier(0.5, 0, 0.701732, 0.495819);transform:translateX(calc(4% - 0%)) translateY(-24.75px) scale(0.75)}66%{animation-timing-function:cubic-bezier(0.302435, 0.381352, 0.55, 0.956352);transform:translateX(calc(-4% - 0%)) translateY(-24.75px) scale(0.75)}100%{transform:translateX(calc(0 - 0%)) translateY(-24.75px) scale(0.75)}}.mdc-text-field--textarea.mdc-text-field--outlined .mdc-text-field__input{margin-top:16px;margin-bottom:16px}.mdc-text-field--textarea.mdc-text-field--outlined .mdc-floating-label{top:18px}.mdc-text-field--textarea.mdc-text-field--with-internal-counter .mdc-text-field__input{margin-bottom:2px}.mdc-text-field--textarea.mdc-text-field--with-internal-counter .mdc-text-field-character-counter{align-self:flex-end;padding:0 16px}.mdc-text-field--textarea.mdc-text-field--with-internal-counter .mdc-text-field-character-counter::after{display:inline-block;width:0;height:16px;content:"";vertical-align:-16px}.mdc-text-field--textarea.mdc-text-field--with-internal-counter .mdc-text-field-character-counter::before{display:none}.mdc-text-field__resizer{align-self:stretch;display:inline-flex;flex-direction:column;flex-grow:1;max-height:100%;max-width:100%;min-height:56px;min-width:fit-content;min-width:-moz-available;min-width:-webkit-fill-available;overflow:hidden;resize:both}.mdc-text-field--filled .mdc-text-field__resizer{transform:translateY(-1px)}.mdc-text-field--filled .mdc-text-field__resizer .mdc-text-field__input,.mdc-text-field--filled .mdc-text-field__resizer .mdc-text-field-character-counter{transform:translateY(1px)}.mdc-text-field--outlined .mdc-text-field__resizer{transform:translateX(-1px) translateY(-1px)}[dir=rtl] .mdc-text-field--outlined .mdc-text-field__resizer,.mdc-text-field--outlined .mdc-text-field__resizer[dir=rtl]{transform:translateX(1px) translateY(-1px)}.mdc-text-field--outlined .mdc-text-field__resizer .mdc-text-field__input,.mdc-text-field--outlined .mdc-text-field__resizer .mdc-text-field-character-counter{transform:translateX(1px) translateY(1px)}[dir=rtl] .mdc-text-field--outlined .mdc-text-field__resizer .mdc-text-field__input,[dir=rtl] .mdc-text-field--outlined .mdc-text-field__resizer .mdc-text-field-character-counter,.mdc-text-field--outlined .mdc-text-field__resizer .mdc-text-field__input[dir=rtl],.mdc-text-field--outlined .mdc-text-field__resizer .mdc-text-field-character-counter[dir=rtl]{transform:translateX(-1px) translateY(1px)}.mdc-text-field--with-leading-icon{padding-left:0;padding-right:16px}[dir=rtl] .mdc-text-field--with-leading-icon,.mdc-text-field--with-leading-icon[dir=rtl]{padding-left:16px;padding-right:0}.mdc-text-field--with-leading-icon.mdc-text-field--filled .mdc-floating-label{max-width:calc(100% - 48px);left:48px;right:initial}[dir=rtl] .mdc-text-field--with-leading-icon.mdc-text-field--filled .mdc-floating-label,.mdc-text-field--with-leading-icon.mdc-text-field--filled .mdc-floating-label[dir=rtl]{left:initial;right:48px}.mdc-text-field--with-leading-icon.mdc-text-field--filled .mdc-floating-label--float-above{max-width:calc(100% / 0.75 - 64px / 0.75)}.mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-floating-label{left:36px;right:initial}[dir=rtl] .mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-floating-label,.mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-floating-label[dir=rtl]{left:initial;right:36px}.mdc-text-field--with-leading-icon.mdc-text-field--outlined :not(.mdc-notched-outline--notched) .mdc-notched-outline__notch{max-width:calc(100% - 60px)}.mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-floating-label--float-above{transform:translateY(-37.25px) translateX(-32px) scale(1)}[dir=rtl] .mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-floating-label--float-above,.mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-floating-label--float-above[dir=rtl]{transform:translateY(-37.25px) translateX(32px) scale(1)}.mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-floating-label--float-above{font-size:.75rem}.mdc-text-field--with-leading-icon.mdc-text-field--outlined.mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above{transform:translateY(-34.75px) translateX(-32px) scale(0.75)}[dir=rtl] .mdc-text-field--with-leading-icon.mdc-text-field--outlined.mdc-notched-outline--upgraded .mdc-floating-label--float-above,[dir=rtl] .mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-text-field--with-leading-icon.mdc-text-field--outlined.mdc-notched-outline--upgraded .mdc-floating-label--float-above[dir=rtl],.mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above[dir=rtl]{transform:translateY(-34.75px) translateX(32px) scale(0.75)}.mdc-text-field--with-leading-icon.mdc-text-field--outlined.mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above{font-size:1rem}.mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-floating-label--shake{animation:mdc-floating-label-shake-float-above-text-field-outlined-leading-icon 250ms 1}@keyframes mdc-floating-label-shake-float-above-text-field-outlined-leading-icon{0%{transform:translateX(calc(0 - 32px)) translateY(-34.75px) scale(0.75)}33%{animation-timing-function:cubic-bezier(0.5, 0, 0.701732, 0.495819);transform:translateX(calc(4% - 32px)) translateY(-34.75px) scale(0.75)}66%{animation-timing-function:cubic-bezier(0.302435, 0.381352, 0.55, 0.956352);transform:translateX(calc(-4% - 32px)) translateY(-34.75px) scale(0.75)}100%{transform:translateX(calc(0 - 32px)) translateY(-34.75px) scale(0.75)}}[dir=rtl] .mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-floating-label--shake,.mdc-text-field--with-leading-icon.mdc-text-field--outlined[dir=rtl] .mdc-floating-label--shake{animation:mdc-floating-label-shake-float-above-text-field-outlined-leading-icon 250ms 1}@keyframes mdc-floating-label-shake-float-above-text-field-outlined-leading-icon-rtl{0%{transform:translateX(calc(0 - -32px)) translateY(-34.75px) scale(0.75)}33%{animation-timing-function:cubic-bezier(0.5, 0, 0.701732, 0.495819);transform:translateX(calc(4% - -32px)) translateY(-34.75px) scale(0.75)}66%{animation-timing-function:cubic-bezier(0.302435, 0.381352, 0.55, 0.956352);transform:translateX(calc(-4% - -32px)) translateY(-34.75px) scale(0.75)}100%{transform:translateX(calc(0 - -32px)) translateY(-34.75px) scale(0.75)}}.mdc-text-field--with-trailing-icon{padding-left:16px;padding-right:0}[dir=rtl] .mdc-text-field--with-trailing-icon,.mdc-text-field--with-trailing-icon[dir=rtl]{padding-left:0;padding-right:16px}.mdc-text-field--with-trailing-icon.mdc-text-field--filled .mdc-floating-label{max-width:calc(100% - 64px)}.mdc-text-field--with-trailing-icon.mdc-text-field--filled .mdc-floating-label--float-above{max-width:calc(100% / 0.75 - 64px / 0.75)}.mdc-text-field--with-trailing-icon.mdc-text-field--outlined :not(.mdc-notched-outline--notched) .mdc-notched-outline__notch{max-width:calc(100% - 60px)}.mdc-text-field--with-leading-icon.mdc-text-field--with-trailing-icon{padding-left:0;padding-right:0}.mdc-text-field--with-leading-icon.mdc-text-field--with-trailing-icon.mdc-text-field--filled .mdc-floating-label{max-width:calc(100% - 96px)}.mdc-text-field--with-leading-icon.mdc-text-field--with-trailing-icon.mdc-text-field--filled .mdc-floating-label--float-above{max-width:calc(100% / 0.75 - 96px / 0.75)}.mdc-text-field-helper-line{display:flex;justify-content:space-between;box-sizing:border-box}.mdc-text-field+.mdc-text-field-helper-line{padding-right:16px;padding-left:16px}.mdc-form-field>.mdc-text-field+label{align-self:flex-start}.mdc-text-field--focused:not(.mdc-text-field--disabled) .mdc-floating-label{color:rgba(98, 0, 238, 0.87)}.mdc-text-field--focused .mdc-notched-outline__leading,.mdc-text-field--focused .mdc-notched-outline__notch,.mdc-text-field--focused .mdc-notched-outline__trailing{border-width:2px}.mdc-text-field--focused+.mdc-text-field-helper-line .mdc-text-field-helper-text:not(.mdc-text-field-helper-text--validation-msg){opacity:1}.mdc-text-field--focused.mdc-text-field--outlined .mdc-notched-outline--notched .mdc-notched-outline__notch{padding-top:2px}.mdc-text-field--focused.mdc-text-field--outlined.mdc-text-field--textarea .mdc-notched-outline--notched .mdc-notched-outline__notch{padding-top:0}.mdc-text-field--invalid:not(.mdc-text-field--disabled):hover .mdc-line-ripple::before{border-bottom-color:#b00020;border-bottom-color:var(--mdc-theme-error, #b00020)}.mdc-text-field--invalid:not(.mdc-text-field--disabled) .mdc-line-ripple::after{border-bottom-color:#b00020;border-bottom-color:var(--mdc-theme-error, #b00020)}.mdc-text-field--invalid:not(.mdc-text-field--disabled) .mdc-floating-label{color:#b00020;color:var(--mdc-theme-error, #b00020)}.mdc-text-field--invalid:not(.mdc-text-field--disabled).mdc-text-field--invalid+.mdc-text-field-helper-line .mdc-text-field-helper-text--validation-msg{color:#b00020;color:var(--mdc-theme-error, #b00020)}.mdc-text-field--invalid .mdc-text-field__input{caret-color:#b00020;caret-color:var(--mdc-theme-error, #b00020)}.mdc-text-field--invalid:not(.mdc-text-field--disabled) .mdc-text-field__icon--trailing{color:#b00020;color:var(--mdc-theme-error, #b00020)}.mdc-text-field--invalid:not(.mdc-text-field--disabled) .mdc-line-ripple::before{border-bottom-color:#b00020;border-bottom-color:var(--mdc-theme-error, #b00020)}.mdc-text-field--invalid:not(.mdc-text-field--disabled) .mdc-notched-outline__leading,.mdc-text-field--invalid:not(.mdc-text-field--disabled) .mdc-notched-outline__notch,.mdc-text-field--invalid:not(.mdc-text-field--disabled) .mdc-notched-outline__trailing{border-color:#b00020;border-color:var(--mdc-theme-error, #b00020)}.mdc-text-field--invalid:not(.mdc-text-field--disabled):not(.mdc-text-field--focused):hover .mdc-notched-outline .mdc-notched-outline__leading,.mdc-text-field--invalid:not(.mdc-text-field--disabled):not(.mdc-text-field--focused):hover .mdc-notched-outline .mdc-notched-outline__notch,.mdc-text-field--invalid:not(.mdc-text-field--disabled):not(.mdc-text-field--focused):hover .mdc-notched-outline .mdc-notched-outline__trailing{border-color:#b00020;border-color:var(--mdc-theme-error, #b00020)}.mdc-text-field--invalid:not(.mdc-text-field--disabled).mdc-text-field--focused .mdc-notched-outline__leading,.mdc-text-field--invalid:not(.mdc-text-field--disabled).mdc-text-field--focused .mdc-notched-outline__notch,.mdc-text-field--invalid:not(.mdc-text-field--disabled).mdc-text-field--focused .mdc-notched-outline__trailing{border-color:#b00020;border-color:var(--mdc-theme-error, #b00020)}.mdc-text-field--invalid+.mdc-text-field-helper-line .mdc-text-field-helper-text--validation-msg{opacity:1}.mdc-text-field--disabled{pointer-events:none}.mdc-text-field--disabled .mdc-text-field__input{color:rgba(0, 0, 0, 0.38)}@media all{.mdc-text-field--disabled .mdc-text-field__input::placeholder{color:rgba(0, 0, 0, 0.38)}}@media all{.mdc-text-field--disabled .mdc-text-field__input:-ms-input-placeholder{color:rgba(0, 0, 0, 0.38)}}.mdc-text-field--disabled .mdc-floating-label{color:rgba(0, 0, 0, 0.38)}.mdc-text-field--disabled+.mdc-text-field-helper-line .mdc-text-field-helper-text{color:rgba(0, 0, 0, 0.38)}.mdc-text-field--disabled .mdc-text-field-character-counter,.mdc-text-field--disabled+.mdc-text-field-helper-line .mdc-text-field-character-counter{color:rgba(0, 0, 0, 0.38)}.mdc-text-field--disabled .mdc-text-field__icon--leading{color:rgba(0, 0, 0, 0.3)}.mdc-text-field--disabled .mdc-text-field__icon--trailing{color:rgba(0, 0, 0, 0.3)}.mdc-text-field--disabled .mdc-text-field__affix--prefix{color:rgba(0, 0, 0, 0.38)}.mdc-text-field--disabled .mdc-text-field__affix--suffix{color:rgba(0, 0, 0, 0.38)}.mdc-text-field--disabled .mdc-line-ripple::before{border-bottom-color:rgba(0, 0, 0, 0.06)}.mdc-text-field--disabled .mdc-notched-outline__leading,.mdc-text-field--disabled .mdc-notched-outline__notch,.mdc-text-field--disabled .mdc-notched-outline__trailing{border-color:rgba(0, 0, 0, 0.06)}@media screen and (forced-colors: active),(-ms-high-contrast: active){.mdc-text-field--disabled .mdc-text-field__input::placeholder{color:GrayText}}@media screen and (forced-colors: active),(-ms-high-contrast: active){.mdc-text-field--disabled .mdc-text-field__input:-ms-input-placeholder{color:GrayText}}@media screen and (forced-colors: active),(-ms-high-contrast: active){.mdc-text-field--disabled .mdc-floating-label{color:GrayText}}@media screen and (forced-colors: active),(-ms-high-contrast: active){.mdc-text-field--disabled+.mdc-text-field-helper-line .mdc-text-field-helper-text{color:GrayText}}@media screen and (forced-colors: active),(-ms-high-contrast: active){.mdc-text-field--disabled .mdc-text-field-character-counter,.mdc-text-field--disabled+.mdc-text-field-helper-line .mdc-text-field-character-counter{color:GrayText}}@media screen and (forced-colors: active),(-ms-high-contrast: active){.mdc-text-field--disabled .mdc-text-field__icon--leading{color:GrayText}}@media screen and (forced-colors: active),(-ms-high-contrast: active){.mdc-text-field--disabled .mdc-text-field__icon--trailing{color:GrayText}}@media screen and (forced-colors: active),(-ms-high-contrast: active){.mdc-text-field--disabled .mdc-text-field__affix--prefix{color:GrayText}}@media screen and (forced-colors: active),(-ms-high-contrast: active){.mdc-text-field--disabled .mdc-text-field__affix--suffix{color:GrayText}}@media screen and (forced-colors: active),(-ms-high-contrast: active){.mdc-text-field--disabled .mdc-line-ripple::before{border-bottom-color:GrayText}}@media screen and (forced-colors: active),(-ms-high-contrast: active){.mdc-text-field--disabled .mdc-notched-outline__leading,.mdc-text-field--disabled .mdc-notched-outline__notch,.mdc-text-field--disabled .mdc-notched-outline__trailing{border-color:GrayText}}@media screen and (forced-colors: active){.mdc-text-field--disabled .mdc-text-field__input{background-color:Window}.mdc-text-field--disabled .mdc-floating-label{z-index:1}}.mdc-text-field--disabled .mdc-floating-label{cursor:default}.mdc-text-field--disabled.mdc-text-field--filled{background-color:#fafafa}.mdc-text-field--disabled.mdc-text-field--filled .mdc-text-field__ripple{display:none}.mdc-text-field--disabled .mdc-text-field__input{pointer-events:auto}.mdc-text-field--end-aligned .mdc-text-field__input{text-align:right}[dir=rtl] .mdc-text-field--end-aligned .mdc-text-field__input,.mdc-text-field--end-aligned .mdc-text-field__input[dir=rtl]{text-align:left}[dir=rtl] .mdc-text-field--ltr-text .mdc-text-field__input,[dir=rtl] .mdc-text-field--ltr-text .mdc-text-field__affix,.mdc-text-field--ltr-text[dir=rtl] .mdc-text-field__input,.mdc-text-field--ltr-text[dir=rtl] .mdc-text-field__affix{direction:ltr}[dir=rtl] .mdc-text-field--ltr-text .mdc-text-field__affix--prefix,.mdc-text-field--ltr-text[dir=rtl] .mdc-text-field__affix--prefix{padding-left:0;padding-right:2px}[dir=rtl] .mdc-text-field--ltr-text .mdc-text-field__affix--suffix,.mdc-text-field--ltr-text[dir=rtl] .mdc-text-field__affix--suffix{padding-left:12px;padding-right:0}[dir=rtl] .mdc-text-field--ltr-text .mdc-text-field__icon--leading,.mdc-text-field--ltr-text[dir=rtl] .mdc-text-field__icon--leading{order:1}[dir=rtl] .mdc-text-field--ltr-text .mdc-text-field__affix--suffix,.mdc-text-field--ltr-text[dir=rtl] .mdc-text-field__affix--suffix{order:2}[dir=rtl] .mdc-text-field--ltr-text .mdc-text-field__input,.mdc-text-field--ltr-text[dir=rtl] .mdc-text-field__input{order:3}[dir=rtl] .mdc-text-field--ltr-text .mdc-text-field__affix--prefix,.mdc-text-field--ltr-text[dir=rtl] .mdc-text-field__affix--prefix{order:4}[dir=rtl] .mdc-text-field--ltr-text .mdc-text-field__icon--trailing,.mdc-text-field--ltr-text[dir=rtl] .mdc-text-field__icon--trailing{order:5}[dir=rtl] .mdc-text-field--ltr-text.mdc-text-field--end-aligned .mdc-text-field__input,.mdc-text-field--ltr-text.mdc-text-field--end-aligned[dir=rtl] .mdc-text-field__input{text-align:right}[dir=rtl] .mdc-text-field--ltr-text.mdc-text-field--end-aligned .mdc-text-field__affix--prefix,.mdc-text-field--ltr-text.mdc-text-field--end-aligned[dir=rtl] .mdc-text-field__affix--prefix{padding-right:12px}[dir=rtl] .mdc-text-field--ltr-text.mdc-text-field--end-aligned .mdc-text-field__affix--suffix,.mdc-text-field--ltr-text.mdc-text-field--end-aligned[dir=rtl] .mdc-text-field__affix--suffix{padding-left:2px}.mdc-text-field-helper-text{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto, sans-serif;font-family:var(--mdc-typography-caption-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:0.75rem;font-size:var(--mdc-typography-caption-font-size, 0.75rem);line-height:1.25rem;line-height:var(--mdc-typography-caption-line-height, 1.25rem);font-weight:400;font-weight:var(--mdc-typography-caption-font-weight, 400);letter-spacing:0.0333333333em;letter-spacing:var(--mdc-typography-caption-letter-spacing, 0.0333333333em);text-decoration:inherit;text-decoration:var(--mdc-typography-caption-text-decoration, inherit);text-transform:inherit;text-transform:var(--mdc-typography-caption-text-transform, inherit);display:block;margin-top:0;line-height:normal;margin:0;opacity:0;will-change:opacity;transition:opacity 150ms 0ms cubic-bezier(0.4, 0, 0.2, 1)}.mdc-text-field-helper-text::before{display:inline-block;width:0;height:16px;content:"";vertical-align:0}.mdc-text-field-helper-text--persistent{transition:none;opacity:1;will-change:initial}.mdc-text-field-character-counter{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto, sans-serif;font-family:var(--mdc-typography-caption-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:0.75rem;font-size:var(--mdc-typography-caption-font-size, 0.75rem);line-height:1.25rem;line-height:var(--mdc-typography-caption-line-height, 1.25rem);font-weight:400;font-weight:var(--mdc-typography-caption-font-weight, 400);letter-spacing:0.0333333333em;letter-spacing:var(--mdc-typography-caption-letter-spacing, 0.0333333333em);text-decoration:inherit;text-decoration:var(--mdc-typography-caption-text-decoration, inherit);text-transform:inherit;text-transform:var(--mdc-typography-caption-text-transform, inherit);display:block;margin-top:0;line-height:normal;margin-left:auto;margin-right:0;padding-left:16px;padding-right:0;white-space:nowrap}.mdc-text-field-character-counter::before{display:inline-block;width:0;height:16px;content:"";vertical-align:0}[dir=rtl] .mdc-text-field-character-counter,.mdc-text-field-character-counter[dir=rtl]{margin-left:0;margin-right:auto}[dir=rtl] .mdc-text-field-character-counter,.mdc-text-field-character-counter[dir=rtl]{padding-left:0;padding-right:16px}.mdc-text-field__icon{align-self:center;cursor:pointer}.mdc-text-field__icon:not([tabindex]),.mdc-text-field__icon[tabindex="-1"]{cursor:default;pointer-events:none}.mdc-text-field__icon svg{display:block}.mdc-text-field__icon--leading{margin-left:16px;margin-right:8px}[dir=rtl] .mdc-text-field__icon--leading,.mdc-text-field__icon--leading[dir=rtl]{margin-left:8px;margin-right:16px}.mdc-text-field__icon--trailing{padding:12px;margin-left:0px;margin-right:0px}[dir=rtl] .mdc-text-field__icon--trailing,.mdc-text-field__icon--trailing[dir=rtl]{margin-left:0px;margin-right:0px}.material-icons{font-family:var(--mdc-icon-font, "Material Icons");font-weight:normal;font-style:normal;font-size:var(--mdc-icon-size, 24px);line-height:1;letter-spacing:normal;text-transform:none;display:inline-block;white-space:nowrap;word-wrap:normal;direction:ltr;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;-moz-osx-font-smoothing:grayscale;font-feature-settings:"liga"}:host{display:inline-flex;flex-direction:column;outline:none}.mdc-text-field{width:100%}.mdc-text-field:not(.mdc-text-field--disabled) .mdc-line-ripple::before{border-bottom-color:rgba(0, 0, 0, 0.42);border-bottom-color:var(--mdc-text-field-idle-line-color, rgba(0, 0, 0, 0.42))}.mdc-text-field:not(.mdc-text-field--disabled):hover .mdc-line-ripple::before{border-bottom-color:rgba(0, 0, 0, 0.87);border-bottom-color:var(--mdc-text-field-hover-line-color, rgba(0, 0, 0, 0.87))}.mdc-text-field.mdc-text-field--disabled .mdc-line-ripple::before{border-bottom-color:rgba(0, 0, 0, 0.06);border-bottom-color:var(--mdc-text-field-disabled-line-color, rgba(0, 0, 0, 0.06))}.mdc-text-field.mdc-text-field--invalid:not(.mdc-text-field--disabled) .mdc-line-ripple::before{border-bottom-color:#b00020;border-bottom-color:var(--mdc-theme-error, #b00020)}.mdc-text-field__input{direction:inherit}mwc-notched-outline{--mdc-notched-outline-border-color: var( --mdc-text-field-outlined-idle-border-color, rgba(0, 0, 0, 0.38) )}:host(:not([disabled]):hover) :not(.mdc-text-field--invalid):not(.mdc-text-field--focused) mwc-notched-outline{--mdc-notched-outline-border-color: var( --mdc-text-field-outlined-hover-border-color, rgba(0, 0, 0, 0.87) )}:host(:not([disabled])) .mdc-text-field:not(.mdc-text-field--outlined){background-color:var(--mdc-text-field-fill-color, whitesmoke)}:host(:not([disabled])) .mdc-text-field.mdc-text-field--invalid mwc-notched-outline{--mdc-notched-outline-border-color: var( --mdc-text-field-error-color, var(--mdc-theme-error, #b00020) )}:host(:not([disabled])) .mdc-text-field.mdc-text-field--invalid+.mdc-text-field-helper-line .mdc-text-field-character-counter,:host(:not([disabled])) .mdc-text-field.mdc-text-field--invalid .mdc-text-field__icon{color:var(--mdc-text-field-error-color, var(--mdc-theme-error, #b00020))}:host(:not([disabled])) .mdc-text-field:not(.mdc-text-field--invalid):not(.mdc-text-field--focused) .mdc-floating-label,:host(:not([disabled])) .mdc-text-field:not(.mdc-text-field--invalid):not(.mdc-text-field--focused) .mdc-floating-label::after{color:var(--mdc-text-field-label-ink-color, rgba(0, 0, 0, 0.6))}:host(:not([disabled])) .mdc-text-field.mdc-text-field--focused mwc-notched-outline{--mdc-notched-outline-stroke-width: 2px}:host(:not([disabled])) .mdc-text-field.mdc-text-field--focused:not(.mdc-text-field--invalid) mwc-notched-outline{--mdc-notched-outline-border-color: var( --mdc-text-field-focused-label-color, var(--mdc-theme-primary, rgba(98, 0, 238, 0.87)) )}:host(:not([disabled])) .mdc-text-field.mdc-text-field--focused:not(.mdc-text-field--invalid) .mdc-floating-label{color:#6200ee;color:var(--mdc-theme-primary, #6200ee)}:host(:not([disabled])) .mdc-text-field .mdc-text-field__input{color:var(--mdc-text-field-ink-color, rgba(0, 0, 0, 0.87))}:host(:not([disabled])) .mdc-text-field .mdc-text-field__input::placeholder{color:var(--mdc-text-field-label-ink-color, rgba(0, 0, 0, 0.6))}:host(:not([disabled])) .mdc-text-field-helper-line .mdc-text-field-helper-text:not(.mdc-text-field-helper-text--validation-msg),:host(:not([disabled])) .mdc-text-field-helper-line:not(.mdc-text-field--invalid) .mdc-text-field-character-counter{color:var(--mdc-text-field-label-ink-color, rgba(0, 0, 0, 0.6))}:host([disabled]) .mdc-text-field:not(.mdc-text-field--outlined){background-color:var(--mdc-text-field-disabled-fill-color, #fafafa)}:host([disabled]) .mdc-text-field.mdc-text-field--outlined mwc-notched-outline{--mdc-notched-outline-border-color: var( --mdc-text-field-outlined-disabled-border-color, rgba(0, 0, 0, 0.06) )}:host([disabled]) .mdc-text-field:not(.mdc-text-field--invalid):not(.mdc-text-field--focused) .mdc-floating-label,:host([disabled]) .mdc-text-field:not(.mdc-text-field--invalid):not(.mdc-text-field--focused) .mdc-floating-label::after{color:var(--mdc-text-field-disabled-ink-color, rgba(0, 0, 0, 0.38))}:host([disabled]) .mdc-text-field .mdc-text-field__input,:host([disabled]) .mdc-text-field .mdc-text-field__input::placeholder{color:var(--mdc-text-field-disabled-ink-color, rgba(0, 0, 0, 0.38))}:host([disabled]) .mdc-text-field-helper-line .mdc-text-field-helper-text,:host([disabled]) .mdc-text-field-helper-line .mdc-text-field-character-counter{color:var(--mdc-text-field-disabled-ink-color, rgba(0, 0, 0, 0.38))}` + */const Ic=d`.mdc-floating-label{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto, sans-serif;font-family:var(--mdc-typography-subtitle1-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:1rem;font-size:var(--mdc-typography-subtitle1-font-size, 1rem);font-weight:400;font-weight:var(--mdc-typography-subtitle1-font-weight, 400);letter-spacing:0.009375em;letter-spacing:var(--mdc-typography-subtitle1-letter-spacing, 0.009375em);text-decoration:inherit;text-decoration:var(--mdc-typography-subtitle1-text-decoration, inherit);text-transform:inherit;text-transform:var(--mdc-typography-subtitle1-text-transform, inherit);position:absolute;left:0;-webkit-transform-origin:left top;transform-origin:left top;line-height:1.15rem;text-align:left;text-overflow:ellipsis;white-space:nowrap;cursor:text;overflow:hidden;will-change:transform;transition:transform 150ms cubic-bezier(0.4, 0, 0.2, 1),color 150ms cubic-bezier(0.4, 0, 0.2, 1)}[dir=rtl] .mdc-floating-label,.mdc-floating-label[dir=rtl]{right:0;left:auto;-webkit-transform-origin:right top;transform-origin:right top;text-align:right}.mdc-floating-label--float-above{cursor:auto}.mdc-floating-label--required::after{margin-left:1px;margin-right:0px;content:"*"}[dir=rtl] .mdc-floating-label--required::after,.mdc-floating-label--required[dir=rtl]::after{margin-left:0;margin-right:1px}.mdc-floating-label--float-above{transform:translateY(-106%) scale(0.75)}.mdc-floating-label--shake{animation:mdc-floating-label-shake-float-above-standard 250ms 1}@keyframes mdc-floating-label-shake-float-above-standard{0%{transform:translateX(calc(0 - 0%)) translateY(-106%) scale(0.75)}33%{animation-timing-function:cubic-bezier(0.5, 0, 0.701732, 0.495819);transform:translateX(calc(4% - 0%)) translateY(-106%) scale(0.75)}66%{animation-timing-function:cubic-bezier(0.302435, 0.381352, 0.55, 0.956352);transform:translateX(calc(-4% - 0%)) translateY(-106%) scale(0.75)}100%{transform:translateX(calc(0 - 0%)) translateY(-106%) scale(0.75)}}.mdc-line-ripple::before,.mdc-line-ripple::after{position:absolute;bottom:0;left:0;width:100%;border-bottom-style:solid;content:""}.mdc-line-ripple::before{border-bottom-width:1px;z-index:1}.mdc-line-ripple::after{transform:scaleX(0);border-bottom-width:2px;opacity:0;z-index:2}.mdc-line-ripple::after{transition:transform 180ms cubic-bezier(0.4, 0, 0.2, 1),opacity 180ms cubic-bezier(0.4, 0, 0.2, 1)}.mdc-line-ripple--active::after{transform:scaleX(1);opacity:1}.mdc-line-ripple--deactivating::after{opacity:0}.mdc-notched-outline{display:flex;position:absolute;top:0;right:0;left:0;box-sizing:border-box;width:100%;max-width:100%;height:100%;text-align:left;pointer-events:none}[dir=rtl] .mdc-notched-outline,.mdc-notched-outline[dir=rtl]{text-align:right}.mdc-notched-outline__leading,.mdc-notched-outline__notch,.mdc-notched-outline__trailing{box-sizing:border-box;height:100%;border-top:1px solid;border-bottom:1px solid;pointer-events:none}.mdc-notched-outline__leading{border-left:1px solid;border-right:none;width:12px}[dir=rtl] .mdc-notched-outline__leading,.mdc-notched-outline__leading[dir=rtl]{border-left:none;border-right:1px solid}.mdc-notched-outline__trailing{border-left:none;border-right:1px solid;flex-grow:1}[dir=rtl] .mdc-notched-outline__trailing,.mdc-notched-outline__trailing[dir=rtl]{border-left:1px solid;border-right:none}.mdc-notched-outline__notch{flex:0 0 auto;width:auto;max-width:calc(100% - 12px * 2)}.mdc-notched-outline .mdc-floating-label{display:inline-block;position:relative;max-width:100%}.mdc-notched-outline .mdc-floating-label--float-above{text-overflow:clip}.mdc-notched-outline--upgraded .mdc-floating-label--float-above{max-width:calc(100% / 0.75)}.mdc-notched-outline--notched .mdc-notched-outline__notch{padding-left:0;padding-right:8px;border-top:none}[dir=rtl] .mdc-notched-outline--notched .mdc-notched-outline__notch,.mdc-notched-outline--notched .mdc-notched-outline__notch[dir=rtl]{padding-left:8px;padding-right:0}.mdc-notched-outline--no-label .mdc-notched-outline__notch{display:none}@keyframes mdc-ripple-fg-radius-in{from{animation-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transform:translate(var(--mdc-ripple-fg-translate-start, 0)) scale(1)}to{transform:translate(var(--mdc-ripple-fg-translate-end, 0)) scale(var(--mdc-ripple-fg-scale, 1))}}@keyframes mdc-ripple-fg-opacity-in{from{animation-timing-function:linear;opacity:0}to{opacity:var(--mdc-ripple-fg-opacity, 0)}}@keyframes mdc-ripple-fg-opacity-out{from{animation-timing-function:linear;opacity:var(--mdc-ripple-fg-opacity, 0)}to{opacity:0}}.mdc-text-field--filled{--mdc-ripple-fg-size: 0;--mdc-ripple-left: 0;--mdc-ripple-top: 0;--mdc-ripple-fg-scale: 1;--mdc-ripple-fg-translate-end: 0;--mdc-ripple-fg-translate-start: 0;-webkit-tap-highlight-color:rgba(0,0,0,0);will-change:transform,opacity}.mdc-text-field--filled .mdc-text-field__ripple::before,.mdc-text-field--filled .mdc-text-field__ripple::after{position:absolute;border-radius:50%;opacity:0;pointer-events:none;content:""}.mdc-text-field--filled .mdc-text-field__ripple::before{transition:opacity 15ms linear,background-color 15ms linear;z-index:1;z-index:var(--mdc-ripple-z-index, 1)}.mdc-text-field--filled .mdc-text-field__ripple::after{z-index:0;z-index:var(--mdc-ripple-z-index, 0)}.mdc-text-field--filled.mdc-ripple-upgraded .mdc-text-field__ripple::before{transform:scale(var(--mdc-ripple-fg-scale, 1))}.mdc-text-field--filled.mdc-ripple-upgraded .mdc-text-field__ripple::after{top:0;left:0;transform:scale(0);transform-origin:center center}.mdc-text-field--filled.mdc-ripple-upgraded--unbounded .mdc-text-field__ripple::after{top:var(--mdc-ripple-top, 0);left:var(--mdc-ripple-left, 0)}.mdc-text-field--filled.mdc-ripple-upgraded--foreground-activation .mdc-text-field__ripple::after{animation:mdc-ripple-fg-radius-in 225ms forwards,mdc-ripple-fg-opacity-in 75ms forwards}.mdc-text-field--filled.mdc-ripple-upgraded--foreground-deactivation .mdc-text-field__ripple::after{animation:mdc-ripple-fg-opacity-out 150ms;transform:translate(var(--mdc-ripple-fg-translate-end, 0)) scale(var(--mdc-ripple-fg-scale, 1))}.mdc-text-field--filled .mdc-text-field__ripple::before,.mdc-text-field--filled .mdc-text-field__ripple::after{top:calc(50% - 100%);left:calc(50% - 100%);width:200%;height:200%}.mdc-text-field--filled.mdc-ripple-upgraded .mdc-text-field__ripple::after{width:var(--mdc-ripple-fg-size, 100%);height:var(--mdc-ripple-fg-size, 100%)}.mdc-text-field__ripple{position:absolute;top:0;left:0;width:100%;height:100%;pointer-events:none}.mdc-text-field{border-top-left-radius:4px;border-top-left-radius:var(--mdc-shape-small, 4px);border-top-right-radius:4px;border-top-right-radius:var(--mdc-shape-small, 4px);border-bottom-right-radius:0;border-bottom-left-radius:0;display:inline-flex;align-items:baseline;padding:0 16px;position:relative;box-sizing:border-box;overflow:hidden;will-change:opacity,transform,color}.mdc-text-field:not(.mdc-text-field--disabled) .mdc-floating-label{color:rgba(0, 0, 0, 0.6)}.mdc-text-field:not(.mdc-text-field--disabled) .mdc-text-field__input{color:rgba(0, 0, 0, 0.87)}@media all{.mdc-text-field:not(.mdc-text-field--disabled) .mdc-text-field__input::placeholder{color:rgba(0, 0, 0, 0.54)}}@media all{.mdc-text-field:not(.mdc-text-field--disabled) .mdc-text-field__input:-ms-input-placeholder{color:rgba(0, 0, 0, 0.54)}}.mdc-text-field .mdc-text-field__input{caret-color:#6200ee;caret-color:var(--mdc-theme-primary, #6200ee)}.mdc-text-field:not(.mdc-text-field--disabled)+.mdc-text-field-helper-line .mdc-text-field-helper-text{color:rgba(0, 0, 0, 0.6)}.mdc-text-field:not(.mdc-text-field--disabled) .mdc-text-field-character-counter,.mdc-text-field:not(.mdc-text-field--disabled)+.mdc-text-field-helper-line .mdc-text-field-character-counter{color:rgba(0, 0, 0, 0.6)}.mdc-text-field:not(.mdc-text-field--disabled) .mdc-text-field__icon--leading{color:rgba(0, 0, 0, 0.54)}.mdc-text-field:not(.mdc-text-field--disabled) .mdc-text-field__icon--trailing{color:rgba(0, 0, 0, 0.54)}.mdc-text-field:not(.mdc-text-field--disabled) .mdc-text-field__affix--prefix{color:rgba(0, 0, 0, 0.6)}.mdc-text-field:not(.mdc-text-field--disabled) .mdc-text-field__affix--suffix{color:rgba(0, 0, 0, 0.6)}.mdc-text-field .mdc-floating-label{top:50%;transform:translateY(-50%);pointer-events:none}.mdc-text-field__input{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto, sans-serif;font-family:var(--mdc-typography-subtitle1-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:1rem;font-size:var(--mdc-typography-subtitle1-font-size, 1rem);font-weight:400;font-weight:var(--mdc-typography-subtitle1-font-weight, 400);letter-spacing:0.009375em;letter-spacing:var(--mdc-typography-subtitle1-letter-spacing, 0.009375em);text-decoration:inherit;text-decoration:var(--mdc-typography-subtitle1-text-decoration, inherit);text-transform:inherit;text-transform:var(--mdc-typography-subtitle1-text-transform, inherit);height:28px;transition:opacity 150ms 0ms cubic-bezier(0.4, 0, 0.2, 1);width:100%;min-width:0;border:none;border-radius:0;background:none;appearance:none;padding:0}.mdc-text-field__input::-ms-clear{display:none}.mdc-text-field__input::-webkit-calendar-picker-indicator{display:none}.mdc-text-field__input:focus{outline:none}.mdc-text-field__input:invalid{box-shadow:none}@media all{.mdc-text-field__input::placeholder{transition:opacity 67ms 0ms cubic-bezier(0.4, 0, 0.2, 1);opacity:0}}@media all{.mdc-text-field__input:-ms-input-placeholder{transition:opacity 67ms 0ms cubic-bezier(0.4, 0, 0.2, 1);opacity:0}}@media all{.mdc-text-field--no-label .mdc-text-field__input::placeholder,.mdc-text-field--focused .mdc-text-field__input::placeholder{transition-delay:40ms;transition-duration:110ms;opacity:1}}@media all{.mdc-text-field--no-label .mdc-text-field__input:-ms-input-placeholder,.mdc-text-field--focused .mdc-text-field__input:-ms-input-placeholder{transition-delay:40ms;transition-duration:110ms;opacity:1}}.mdc-text-field__affix{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto, sans-serif;font-family:var(--mdc-typography-subtitle1-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:1rem;font-size:var(--mdc-typography-subtitle1-font-size, 1rem);font-weight:400;font-weight:var(--mdc-typography-subtitle1-font-weight, 400);letter-spacing:0.009375em;letter-spacing:var(--mdc-typography-subtitle1-letter-spacing, 0.009375em);text-decoration:inherit;text-decoration:var(--mdc-typography-subtitle1-text-decoration, inherit);text-transform:inherit;text-transform:var(--mdc-typography-subtitle1-text-transform, inherit);height:28px;transition:opacity 150ms 0ms cubic-bezier(0.4, 0, 0.2, 1);opacity:0;white-space:nowrap}.mdc-text-field--label-floating .mdc-text-field__affix,.mdc-text-field--no-label .mdc-text-field__affix{opacity:1}@supports(-webkit-hyphens: none){.mdc-text-field--outlined .mdc-text-field__affix{align-items:center;align-self:center;display:inline-flex;height:100%}}.mdc-text-field__affix--prefix{padding-left:0;padding-right:2px}[dir=rtl] .mdc-text-field__affix--prefix,.mdc-text-field__affix--prefix[dir=rtl]{padding-left:2px;padding-right:0}.mdc-text-field--end-aligned .mdc-text-field__affix--prefix{padding-left:0;padding-right:12px}[dir=rtl] .mdc-text-field--end-aligned .mdc-text-field__affix--prefix,.mdc-text-field--end-aligned .mdc-text-field__affix--prefix[dir=rtl]{padding-left:12px;padding-right:0}.mdc-text-field__affix--suffix{padding-left:12px;padding-right:0}[dir=rtl] .mdc-text-field__affix--suffix,.mdc-text-field__affix--suffix[dir=rtl]{padding-left:0;padding-right:12px}.mdc-text-field--end-aligned .mdc-text-field__affix--suffix{padding-left:2px;padding-right:0}[dir=rtl] .mdc-text-field--end-aligned .mdc-text-field__affix--suffix,.mdc-text-field--end-aligned .mdc-text-field__affix--suffix[dir=rtl]{padding-left:0;padding-right:2px}.mdc-text-field--filled{height:56px}.mdc-text-field--filled .mdc-text-field__ripple::before,.mdc-text-field--filled .mdc-text-field__ripple::after{background-color:rgba(0, 0, 0, 0.87);background-color:var(--mdc-ripple-color, rgba(0, 0, 0, 0.87))}.mdc-text-field--filled:hover .mdc-text-field__ripple::before,.mdc-text-field--filled.mdc-ripple-surface--hover .mdc-text-field__ripple::before{opacity:0.04;opacity:var(--mdc-ripple-hover-opacity, 0.04)}.mdc-text-field--filled.mdc-ripple-upgraded--background-focused .mdc-text-field__ripple::before,.mdc-text-field--filled:not(.mdc-ripple-upgraded):focus .mdc-text-field__ripple::before{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-focus-opacity, 0.12)}.mdc-text-field--filled::before{display:inline-block;width:0;height:40px;content:"";vertical-align:0}.mdc-text-field--filled:not(.mdc-text-field--disabled){background-color:whitesmoke}.mdc-text-field--filled:not(.mdc-text-field--disabled) .mdc-line-ripple::before{border-bottom-color:rgba(0, 0, 0, 0.42)}.mdc-text-field--filled:not(.mdc-text-field--disabled):hover .mdc-line-ripple::before{border-bottom-color:rgba(0, 0, 0, 0.87)}.mdc-text-field--filled .mdc-line-ripple::after{border-bottom-color:#6200ee;border-bottom-color:var(--mdc-theme-primary, #6200ee)}.mdc-text-field--filled .mdc-floating-label{left:16px;right:initial}[dir=rtl] .mdc-text-field--filled .mdc-floating-label,.mdc-text-field--filled .mdc-floating-label[dir=rtl]{left:initial;right:16px}.mdc-text-field--filled .mdc-floating-label--float-above{transform:translateY(-106%) scale(0.75)}.mdc-text-field--filled.mdc-text-field--no-label .mdc-text-field__input{height:100%}.mdc-text-field--filled.mdc-text-field--no-label .mdc-floating-label{display:none}.mdc-text-field--filled.mdc-text-field--no-label::before{display:none}@supports(-webkit-hyphens: none){.mdc-text-field--filled.mdc-text-field--no-label .mdc-text-field__affix{align-items:center;align-self:center;display:inline-flex;height:100%}}.mdc-text-field--outlined{height:56px;overflow:visible}.mdc-text-field--outlined .mdc-floating-label--float-above{transform:translateY(-37.25px) scale(1)}.mdc-text-field--outlined .mdc-floating-label--float-above{font-size:.75rem}.mdc-text-field--outlined.mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above{transform:translateY(-34.75px) scale(0.75)}.mdc-text-field--outlined.mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above{font-size:1rem}.mdc-text-field--outlined .mdc-floating-label--shake{animation:mdc-floating-label-shake-float-above-text-field-outlined 250ms 1}@keyframes mdc-floating-label-shake-float-above-text-field-outlined{0%{transform:translateX(calc(0 - 0%)) translateY(-34.75px) scale(0.75)}33%{animation-timing-function:cubic-bezier(0.5, 0, 0.701732, 0.495819);transform:translateX(calc(4% - 0%)) translateY(-34.75px) scale(0.75)}66%{animation-timing-function:cubic-bezier(0.302435, 0.381352, 0.55, 0.956352);transform:translateX(calc(-4% - 0%)) translateY(-34.75px) scale(0.75)}100%{transform:translateX(calc(0 - 0%)) translateY(-34.75px) scale(0.75)}}.mdc-text-field--outlined .mdc-text-field__input{height:100%}.mdc-text-field--outlined:not(.mdc-text-field--disabled) .mdc-notched-outline__leading,.mdc-text-field--outlined:not(.mdc-text-field--disabled) .mdc-notched-outline__notch,.mdc-text-field--outlined:not(.mdc-text-field--disabled) .mdc-notched-outline__trailing{border-color:rgba(0, 0, 0, 0.38)}.mdc-text-field--outlined:not(.mdc-text-field--disabled):not(.mdc-text-field--focused):hover .mdc-notched-outline .mdc-notched-outline__leading,.mdc-text-field--outlined:not(.mdc-text-field--disabled):not(.mdc-text-field--focused):hover .mdc-notched-outline .mdc-notched-outline__notch,.mdc-text-field--outlined:not(.mdc-text-field--disabled):not(.mdc-text-field--focused):hover .mdc-notched-outline .mdc-notched-outline__trailing{border-color:rgba(0, 0, 0, 0.87)}.mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--focused .mdc-notched-outline__leading,.mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--focused .mdc-notched-outline__notch,.mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--focused .mdc-notched-outline__trailing{border-color:#6200ee;border-color:var(--mdc-theme-primary, #6200ee)}.mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__leading{border-top-left-radius:4px;border-top-left-radius:var(--mdc-shape-small, 4px);border-top-right-radius:0;border-bottom-right-radius:0;border-bottom-left-radius:4px;border-bottom-left-radius:var(--mdc-shape-small, 4px)}[dir=rtl] .mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__leading,.mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__leading[dir=rtl]{border-top-left-radius:0;border-top-right-radius:4px;border-top-right-radius:var(--mdc-shape-small, 4px);border-bottom-right-radius:4px;border-bottom-right-radius:var(--mdc-shape-small, 4px);border-bottom-left-radius:0}@supports(top: max(0%)){.mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__leading{width:max(12px, var(--mdc-shape-small, 4px))}}@supports(top: max(0%)){.mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__notch{max-width:calc(100% - max(12px, var(--mdc-shape-small, 4px)) * 2)}}.mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__trailing{border-top-left-radius:0;border-top-right-radius:4px;border-top-right-radius:var(--mdc-shape-small, 4px);border-bottom-right-radius:4px;border-bottom-right-radius:var(--mdc-shape-small, 4px);border-bottom-left-radius:0}[dir=rtl] .mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__trailing,.mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__trailing[dir=rtl]{border-top-left-radius:4px;border-top-left-radius:var(--mdc-shape-small, 4px);border-top-right-radius:0;border-bottom-right-radius:0;border-bottom-left-radius:4px;border-bottom-left-radius:var(--mdc-shape-small, 4px)}@supports(top: max(0%)){.mdc-text-field--outlined{padding-left:max(16px, calc(var(--mdc-shape-small, 4px) + 4px))}}@supports(top: max(0%)){.mdc-text-field--outlined{padding-right:max(16px, var(--mdc-shape-small, 4px))}}@supports(top: max(0%)){.mdc-text-field--outlined+.mdc-text-field-helper-line{padding-left:max(16px, calc(var(--mdc-shape-small, 4px) + 4px))}}@supports(top: max(0%)){.mdc-text-field--outlined+.mdc-text-field-helper-line{padding-right:max(16px, var(--mdc-shape-small, 4px))}}.mdc-text-field--outlined.mdc-text-field--with-leading-icon{padding-left:0}@supports(top: max(0%)){.mdc-text-field--outlined.mdc-text-field--with-leading-icon{padding-right:max(16px, var(--mdc-shape-small, 4px))}}[dir=rtl] .mdc-text-field--outlined.mdc-text-field--with-leading-icon,.mdc-text-field--outlined.mdc-text-field--with-leading-icon[dir=rtl]{padding-right:0}@supports(top: max(0%)){[dir=rtl] .mdc-text-field--outlined.mdc-text-field--with-leading-icon,.mdc-text-field--outlined.mdc-text-field--with-leading-icon[dir=rtl]{padding-left:max(16px, var(--mdc-shape-small, 4px))}}.mdc-text-field--outlined.mdc-text-field--with-trailing-icon{padding-right:0}@supports(top: max(0%)){.mdc-text-field--outlined.mdc-text-field--with-trailing-icon{padding-left:max(16px, calc(var(--mdc-shape-small, 4px) + 4px))}}[dir=rtl] .mdc-text-field--outlined.mdc-text-field--with-trailing-icon,.mdc-text-field--outlined.mdc-text-field--with-trailing-icon[dir=rtl]{padding-left:0}@supports(top: max(0%)){[dir=rtl] .mdc-text-field--outlined.mdc-text-field--with-trailing-icon,.mdc-text-field--outlined.mdc-text-field--with-trailing-icon[dir=rtl]{padding-right:max(16px, calc(var(--mdc-shape-small, 4px) + 4px))}}.mdc-text-field--outlined.mdc-text-field--with-leading-icon.mdc-text-field--with-trailing-icon{padding-left:0;padding-right:0}.mdc-text-field--outlined .mdc-notched-outline--notched .mdc-notched-outline__notch{padding-top:1px}.mdc-text-field--outlined .mdc-text-field__ripple::before,.mdc-text-field--outlined .mdc-text-field__ripple::after{content:none}.mdc-text-field--outlined .mdc-floating-label{left:4px;right:initial}[dir=rtl] .mdc-text-field--outlined .mdc-floating-label,.mdc-text-field--outlined .mdc-floating-label[dir=rtl]{left:initial;right:4px}.mdc-text-field--outlined .mdc-text-field__input{display:flex;border:none !important;background-color:transparent}.mdc-text-field--outlined .mdc-notched-outline{z-index:1}.mdc-text-field--textarea{flex-direction:column;align-items:center;width:auto;height:auto;padding:0;transition:none}.mdc-text-field--textarea .mdc-floating-label{top:19px}.mdc-text-field--textarea .mdc-floating-label:not(.mdc-floating-label--float-above){transform:none}.mdc-text-field--textarea .mdc-text-field__input{flex-grow:1;height:auto;min-height:1.5rem;overflow-x:hidden;overflow-y:auto;box-sizing:border-box;resize:none;padding:0 16px;line-height:1.5rem}.mdc-text-field--textarea.mdc-text-field--filled::before{display:none}.mdc-text-field--textarea.mdc-text-field--filled .mdc-floating-label--float-above{transform:translateY(-10.25px) scale(0.75)}.mdc-text-field--textarea.mdc-text-field--filled .mdc-floating-label--shake{animation:mdc-floating-label-shake-float-above-textarea-filled 250ms 1}@keyframes mdc-floating-label-shake-float-above-textarea-filled{0%{transform:translateX(calc(0 - 0%)) translateY(-10.25px) scale(0.75)}33%{animation-timing-function:cubic-bezier(0.5, 0, 0.701732, 0.495819);transform:translateX(calc(4% - 0%)) translateY(-10.25px) scale(0.75)}66%{animation-timing-function:cubic-bezier(0.302435, 0.381352, 0.55, 0.956352);transform:translateX(calc(-4% - 0%)) translateY(-10.25px) scale(0.75)}100%{transform:translateX(calc(0 - 0%)) translateY(-10.25px) scale(0.75)}}.mdc-text-field--textarea.mdc-text-field--filled .mdc-text-field__input{margin-top:23px;margin-bottom:9px}.mdc-text-field--textarea.mdc-text-field--filled.mdc-text-field--no-label .mdc-text-field__input{margin-top:16px;margin-bottom:16px}.mdc-text-field--textarea.mdc-text-field--outlined .mdc-notched-outline--notched .mdc-notched-outline__notch{padding-top:0}.mdc-text-field--textarea.mdc-text-field--outlined .mdc-floating-label--float-above{transform:translateY(-27.25px) scale(1)}.mdc-text-field--textarea.mdc-text-field--outlined .mdc-floating-label--float-above{font-size:.75rem}.mdc-text-field--textarea.mdc-text-field--outlined.mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-text-field--textarea.mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above{transform:translateY(-24.75px) scale(0.75)}.mdc-text-field--textarea.mdc-text-field--outlined.mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-text-field--textarea.mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above{font-size:1rem}.mdc-text-field--textarea.mdc-text-field--outlined .mdc-floating-label--shake{animation:mdc-floating-label-shake-float-above-textarea-outlined 250ms 1}@keyframes mdc-floating-label-shake-float-above-textarea-outlined{0%{transform:translateX(calc(0 - 0%)) translateY(-24.75px) scale(0.75)}33%{animation-timing-function:cubic-bezier(0.5, 0, 0.701732, 0.495819);transform:translateX(calc(4% - 0%)) translateY(-24.75px) scale(0.75)}66%{animation-timing-function:cubic-bezier(0.302435, 0.381352, 0.55, 0.956352);transform:translateX(calc(-4% - 0%)) translateY(-24.75px) scale(0.75)}100%{transform:translateX(calc(0 - 0%)) translateY(-24.75px) scale(0.75)}}.mdc-text-field--textarea.mdc-text-field--outlined .mdc-text-field__input{margin-top:16px;margin-bottom:16px}.mdc-text-field--textarea.mdc-text-field--outlined .mdc-floating-label{top:18px}.mdc-text-field--textarea.mdc-text-field--with-internal-counter .mdc-text-field__input{margin-bottom:2px}.mdc-text-field--textarea.mdc-text-field--with-internal-counter .mdc-text-field-character-counter{align-self:flex-end;padding:0 16px}.mdc-text-field--textarea.mdc-text-field--with-internal-counter .mdc-text-field-character-counter::after{display:inline-block;width:0;height:16px;content:"";vertical-align:-16px}.mdc-text-field--textarea.mdc-text-field--with-internal-counter .mdc-text-field-character-counter::before{display:none}.mdc-text-field__resizer{align-self:stretch;display:inline-flex;flex-direction:column;flex-grow:1;max-height:100%;max-width:100%;min-height:56px;min-width:fit-content;min-width:-moz-available;min-width:-webkit-fill-available;overflow:hidden;resize:both}.mdc-text-field--filled .mdc-text-field__resizer{transform:translateY(-1px)}.mdc-text-field--filled .mdc-text-field__resizer .mdc-text-field__input,.mdc-text-field--filled .mdc-text-field__resizer .mdc-text-field-character-counter{transform:translateY(1px)}.mdc-text-field--outlined .mdc-text-field__resizer{transform:translateX(-1px) translateY(-1px)}[dir=rtl] .mdc-text-field--outlined .mdc-text-field__resizer,.mdc-text-field--outlined .mdc-text-field__resizer[dir=rtl]{transform:translateX(1px) translateY(-1px)}.mdc-text-field--outlined .mdc-text-field__resizer .mdc-text-field__input,.mdc-text-field--outlined .mdc-text-field__resizer .mdc-text-field-character-counter{transform:translateX(1px) translateY(1px)}[dir=rtl] .mdc-text-field--outlined .mdc-text-field__resizer .mdc-text-field__input,[dir=rtl] .mdc-text-field--outlined .mdc-text-field__resizer .mdc-text-field-character-counter,.mdc-text-field--outlined .mdc-text-field__resizer .mdc-text-field__input[dir=rtl],.mdc-text-field--outlined .mdc-text-field__resizer .mdc-text-field-character-counter[dir=rtl]{transform:translateX(-1px) translateY(1px)}.mdc-text-field--with-leading-icon{padding-left:0;padding-right:16px}[dir=rtl] .mdc-text-field--with-leading-icon,.mdc-text-field--with-leading-icon[dir=rtl]{padding-left:16px;padding-right:0}.mdc-text-field--with-leading-icon.mdc-text-field--filled .mdc-floating-label{max-width:calc(100% - 48px);left:48px;right:initial}[dir=rtl] .mdc-text-field--with-leading-icon.mdc-text-field--filled .mdc-floating-label,.mdc-text-field--with-leading-icon.mdc-text-field--filled .mdc-floating-label[dir=rtl]{left:initial;right:48px}.mdc-text-field--with-leading-icon.mdc-text-field--filled .mdc-floating-label--float-above{max-width:calc(100% / 0.75 - 64px / 0.75)}.mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-floating-label{left:36px;right:initial}[dir=rtl] .mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-floating-label,.mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-floating-label[dir=rtl]{left:initial;right:36px}.mdc-text-field--with-leading-icon.mdc-text-field--outlined :not(.mdc-notched-outline--notched) .mdc-notched-outline__notch{max-width:calc(100% - 60px)}.mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-floating-label--float-above{transform:translateY(-37.25px) translateX(-32px) scale(1)}[dir=rtl] .mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-floating-label--float-above,.mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-floating-label--float-above[dir=rtl]{transform:translateY(-37.25px) translateX(32px) scale(1)}.mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-floating-label--float-above{font-size:.75rem}.mdc-text-field--with-leading-icon.mdc-text-field--outlined.mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above{transform:translateY(-34.75px) translateX(-32px) scale(0.75)}[dir=rtl] .mdc-text-field--with-leading-icon.mdc-text-field--outlined.mdc-notched-outline--upgraded .mdc-floating-label--float-above,[dir=rtl] .mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-text-field--with-leading-icon.mdc-text-field--outlined.mdc-notched-outline--upgraded .mdc-floating-label--float-above[dir=rtl],.mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above[dir=rtl]{transform:translateY(-34.75px) translateX(32px) scale(0.75)}.mdc-text-field--with-leading-icon.mdc-text-field--outlined.mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above{font-size:1rem}.mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-floating-label--shake{animation:mdc-floating-label-shake-float-above-text-field-outlined-leading-icon 250ms 1}@keyframes mdc-floating-label-shake-float-above-text-field-outlined-leading-icon{0%{transform:translateX(calc(0 - 32px)) translateY(-34.75px) scale(0.75)}33%{animation-timing-function:cubic-bezier(0.5, 0, 0.701732, 0.495819);transform:translateX(calc(4% - 32px)) translateY(-34.75px) scale(0.75)}66%{animation-timing-function:cubic-bezier(0.302435, 0.381352, 0.55, 0.956352);transform:translateX(calc(-4% - 32px)) translateY(-34.75px) scale(0.75)}100%{transform:translateX(calc(0 - 32px)) translateY(-34.75px) scale(0.75)}}[dir=rtl] .mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-floating-label--shake,.mdc-text-field--with-leading-icon.mdc-text-field--outlined[dir=rtl] .mdc-floating-label--shake{animation:mdc-floating-label-shake-float-above-text-field-outlined-leading-icon 250ms 1}@keyframes mdc-floating-label-shake-float-above-text-field-outlined-leading-icon-rtl{0%{transform:translateX(calc(0 - -32px)) translateY(-34.75px) scale(0.75)}33%{animation-timing-function:cubic-bezier(0.5, 0, 0.701732, 0.495819);transform:translateX(calc(4% - -32px)) translateY(-34.75px) scale(0.75)}66%{animation-timing-function:cubic-bezier(0.302435, 0.381352, 0.55, 0.956352);transform:translateX(calc(-4% - -32px)) translateY(-34.75px) scale(0.75)}100%{transform:translateX(calc(0 - -32px)) translateY(-34.75px) scale(0.75)}}.mdc-text-field--with-trailing-icon{padding-left:16px;padding-right:0}[dir=rtl] .mdc-text-field--with-trailing-icon,.mdc-text-field--with-trailing-icon[dir=rtl]{padding-left:0;padding-right:16px}.mdc-text-field--with-trailing-icon.mdc-text-field--filled .mdc-floating-label{max-width:calc(100% - 64px)}.mdc-text-field--with-trailing-icon.mdc-text-field--filled .mdc-floating-label--float-above{max-width:calc(100% / 0.75 - 64px / 0.75)}.mdc-text-field--with-trailing-icon.mdc-text-field--outlined :not(.mdc-notched-outline--notched) .mdc-notched-outline__notch{max-width:calc(100% - 60px)}.mdc-text-field--with-leading-icon.mdc-text-field--with-trailing-icon{padding-left:0;padding-right:0}.mdc-text-field--with-leading-icon.mdc-text-field--with-trailing-icon.mdc-text-field--filled .mdc-floating-label{max-width:calc(100% - 96px)}.mdc-text-field--with-leading-icon.mdc-text-field--with-trailing-icon.mdc-text-field--filled .mdc-floating-label--float-above{max-width:calc(100% / 0.75 - 96px / 0.75)}.mdc-text-field-helper-line{display:flex;justify-content:space-between;box-sizing:border-box}.mdc-text-field+.mdc-text-field-helper-line{padding-right:16px;padding-left:16px}.mdc-form-field>.mdc-text-field+label{align-self:flex-start}.mdc-text-field--focused:not(.mdc-text-field--disabled) .mdc-floating-label{color:rgba(98, 0, 238, 0.87)}.mdc-text-field--focused .mdc-notched-outline__leading,.mdc-text-field--focused .mdc-notched-outline__notch,.mdc-text-field--focused .mdc-notched-outline__trailing{border-width:2px}.mdc-text-field--focused+.mdc-text-field-helper-line .mdc-text-field-helper-text:not(.mdc-text-field-helper-text--validation-msg){opacity:1}.mdc-text-field--focused.mdc-text-field--outlined .mdc-notched-outline--notched .mdc-notched-outline__notch{padding-top:2px}.mdc-text-field--focused.mdc-text-field--outlined.mdc-text-field--textarea .mdc-notched-outline--notched .mdc-notched-outline__notch{padding-top:0}.mdc-text-field--invalid:not(.mdc-text-field--disabled):hover .mdc-line-ripple::before{border-bottom-color:#b00020;border-bottom-color:var(--mdc-theme-error, #b00020)}.mdc-text-field--invalid:not(.mdc-text-field--disabled) .mdc-line-ripple::after{border-bottom-color:#b00020;border-bottom-color:var(--mdc-theme-error, #b00020)}.mdc-text-field--invalid:not(.mdc-text-field--disabled) .mdc-floating-label{color:#b00020;color:var(--mdc-theme-error, #b00020)}.mdc-text-field--invalid:not(.mdc-text-field--disabled).mdc-text-field--invalid+.mdc-text-field-helper-line .mdc-text-field-helper-text--validation-msg{color:#b00020;color:var(--mdc-theme-error, #b00020)}.mdc-text-field--invalid .mdc-text-field__input{caret-color:#b00020;caret-color:var(--mdc-theme-error, #b00020)}.mdc-text-field--invalid:not(.mdc-text-field--disabled) .mdc-text-field__icon--trailing{color:#b00020;color:var(--mdc-theme-error, #b00020)}.mdc-text-field--invalid:not(.mdc-text-field--disabled) .mdc-line-ripple::before{border-bottom-color:#b00020;border-bottom-color:var(--mdc-theme-error, #b00020)}.mdc-text-field--invalid:not(.mdc-text-field--disabled) .mdc-notched-outline__leading,.mdc-text-field--invalid:not(.mdc-text-field--disabled) .mdc-notched-outline__notch,.mdc-text-field--invalid:not(.mdc-text-field--disabled) .mdc-notched-outline__trailing{border-color:#b00020;border-color:var(--mdc-theme-error, #b00020)}.mdc-text-field--invalid:not(.mdc-text-field--disabled):not(.mdc-text-field--focused):hover .mdc-notched-outline .mdc-notched-outline__leading,.mdc-text-field--invalid:not(.mdc-text-field--disabled):not(.mdc-text-field--focused):hover .mdc-notched-outline .mdc-notched-outline__notch,.mdc-text-field--invalid:not(.mdc-text-field--disabled):not(.mdc-text-field--focused):hover .mdc-notched-outline .mdc-notched-outline__trailing{border-color:#b00020;border-color:var(--mdc-theme-error, #b00020)}.mdc-text-field--invalid:not(.mdc-text-field--disabled).mdc-text-field--focused .mdc-notched-outline__leading,.mdc-text-field--invalid:not(.mdc-text-field--disabled).mdc-text-field--focused .mdc-notched-outline__notch,.mdc-text-field--invalid:not(.mdc-text-field--disabled).mdc-text-field--focused .mdc-notched-outline__trailing{border-color:#b00020;border-color:var(--mdc-theme-error, #b00020)}.mdc-text-field--invalid+.mdc-text-field-helper-line .mdc-text-field-helper-text--validation-msg{opacity:1}.mdc-text-field--disabled{pointer-events:none}.mdc-text-field--disabled .mdc-text-field__input{color:rgba(0, 0, 0, 0.38)}@media all{.mdc-text-field--disabled .mdc-text-field__input::placeholder{color:rgba(0, 0, 0, 0.38)}}@media all{.mdc-text-field--disabled .mdc-text-field__input:-ms-input-placeholder{color:rgba(0, 0, 0, 0.38)}}.mdc-text-field--disabled .mdc-floating-label{color:rgba(0, 0, 0, 0.38)}.mdc-text-field--disabled+.mdc-text-field-helper-line .mdc-text-field-helper-text{color:rgba(0, 0, 0, 0.38)}.mdc-text-field--disabled .mdc-text-field-character-counter,.mdc-text-field--disabled+.mdc-text-field-helper-line .mdc-text-field-character-counter{color:rgba(0, 0, 0, 0.38)}.mdc-text-field--disabled .mdc-text-field__icon--leading{color:rgba(0, 0, 0, 0.3)}.mdc-text-field--disabled .mdc-text-field__icon--trailing{color:rgba(0, 0, 0, 0.3)}.mdc-text-field--disabled .mdc-text-field__affix--prefix{color:rgba(0, 0, 0, 0.38)}.mdc-text-field--disabled .mdc-text-field__affix--suffix{color:rgba(0, 0, 0, 0.38)}.mdc-text-field--disabled .mdc-line-ripple::before{border-bottom-color:rgba(0, 0, 0, 0.06)}.mdc-text-field--disabled .mdc-notched-outline__leading,.mdc-text-field--disabled .mdc-notched-outline__notch,.mdc-text-field--disabled .mdc-notched-outline__trailing{border-color:rgba(0, 0, 0, 0.06)}@media screen and (forced-colors: active),(-ms-high-contrast: active){.mdc-text-field--disabled .mdc-text-field__input::placeholder{color:GrayText}}@media screen and (forced-colors: active),(-ms-high-contrast: active){.mdc-text-field--disabled .mdc-text-field__input:-ms-input-placeholder{color:GrayText}}@media screen and (forced-colors: active),(-ms-high-contrast: active){.mdc-text-field--disabled .mdc-floating-label{color:GrayText}}@media screen and (forced-colors: active),(-ms-high-contrast: active){.mdc-text-field--disabled+.mdc-text-field-helper-line .mdc-text-field-helper-text{color:GrayText}}@media screen and (forced-colors: active),(-ms-high-contrast: active){.mdc-text-field--disabled .mdc-text-field-character-counter,.mdc-text-field--disabled+.mdc-text-field-helper-line .mdc-text-field-character-counter{color:GrayText}}@media screen and (forced-colors: active),(-ms-high-contrast: active){.mdc-text-field--disabled .mdc-text-field__icon--leading{color:GrayText}}@media screen and (forced-colors: active),(-ms-high-contrast: active){.mdc-text-field--disabled .mdc-text-field__icon--trailing{color:GrayText}}@media screen and (forced-colors: active),(-ms-high-contrast: active){.mdc-text-field--disabled .mdc-text-field__affix--prefix{color:GrayText}}@media screen and (forced-colors: active),(-ms-high-contrast: active){.mdc-text-field--disabled .mdc-text-field__affix--suffix{color:GrayText}}@media screen and (forced-colors: active),(-ms-high-contrast: active){.mdc-text-field--disabled .mdc-line-ripple::before{border-bottom-color:GrayText}}@media screen and (forced-colors: active),(-ms-high-contrast: active){.mdc-text-field--disabled .mdc-notched-outline__leading,.mdc-text-field--disabled .mdc-notched-outline__notch,.mdc-text-field--disabled .mdc-notched-outline__trailing{border-color:GrayText}}@media screen and (forced-colors: active){.mdc-text-field--disabled .mdc-text-field__input{background-color:Window}.mdc-text-field--disabled .mdc-floating-label{z-index:1}}.mdc-text-field--disabled .mdc-floating-label{cursor:default}.mdc-text-field--disabled.mdc-text-field--filled{background-color:#fafafa}.mdc-text-field--disabled.mdc-text-field--filled .mdc-text-field__ripple{display:none}.mdc-text-field--disabled .mdc-text-field__input{pointer-events:auto}.mdc-text-field--end-aligned .mdc-text-field__input{text-align:right}[dir=rtl] .mdc-text-field--end-aligned .mdc-text-field__input,.mdc-text-field--end-aligned .mdc-text-field__input[dir=rtl]{text-align:left}[dir=rtl] .mdc-text-field--ltr-text .mdc-text-field__input,[dir=rtl] .mdc-text-field--ltr-text .mdc-text-field__affix,.mdc-text-field--ltr-text[dir=rtl] .mdc-text-field__input,.mdc-text-field--ltr-text[dir=rtl] .mdc-text-field__affix{direction:ltr}[dir=rtl] .mdc-text-field--ltr-text .mdc-text-field__affix--prefix,.mdc-text-field--ltr-text[dir=rtl] .mdc-text-field__affix--prefix{padding-left:0;padding-right:2px}[dir=rtl] .mdc-text-field--ltr-text .mdc-text-field__affix--suffix,.mdc-text-field--ltr-text[dir=rtl] .mdc-text-field__affix--suffix{padding-left:12px;padding-right:0}[dir=rtl] .mdc-text-field--ltr-text .mdc-text-field__icon--leading,.mdc-text-field--ltr-text[dir=rtl] .mdc-text-field__icon--leading{order:1}[dir=rtl] .mdc-text-field--ltr-text .mdc-text-field__affix--suffix,.mdc-text-field--ltr-text[dir=rtl] .mdc-text-field__affix--suffix{order:2}[dir=rtl] .mdc-text-field--ltr-text .mdc-text-field__input,.mdc-text-field--ltr-text[dir=rtl] .mdc-text-field__input{order:3}[dir=rtl] .mdc-text-field--ltr-text .mdc-text-field__affix--prefix,.mdc-text-field--ltr-text[dir=rtl] .mdc-text-field__affix--prefix{order:4}[dir=rtl] .mdc-text-field--ltr-text .mdc-text-field__icon--trailing,.mdc-text-field--ltr-text[dir=rtl] .mdc-text-field__icon--trailing{order:5}[dir=rtl] .mdc-text-field--ltr-text.mdc-text-field--end-aligned .mdc-text-field__input,.mdc-text-field--ltr-text.mdc-text-field--end-aligned[dir=rtl] .mdc-text-field__input{text-align:right}[dir=rtl] .mdc-text-field--ltr-text.mdc-text-field--end-aligned .mdc-text-field__affix--prefix,.mdc-text-field--ltr-text.mdc-text-field--end-aligned[dir=rtl] .mdc-text-field__affix--prefix{padding-right:12px}[dir=rtl] .mdc-text-field--ltr-text.mdc-text-field--end-aligned .mdc-text-field__affix--suffix,.mdc-text-field--ltr-text.mdc-text-field--end-aligned[dir=rtl] .mdc-text-field__affix--suffix{padding-left:2px}.mdc-text-field-helper-text{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto, sans-serif;font-family:var(--mdc-typography-caption-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:0.75rem;font-size:var(--mdc-typography-caption-font-size, 0.75rem);line-height:1.25rem;line-height:var(--mdc-typography-caption-line-height, 1.25rem);font-weight:400;font-weight:var(--mdc-typography-caption-font-weight, 400);letter-spacing:0.0333333333em;letter-spacing:var(--mdc-typography-caption-letter-spacing, 0.0333333333em);text-decoration:inherit;text-decoration:var(--mdc-typography-caption-text-decoration, inherit);text-transform:inherit;text-transform:var(--mdc-typography-caption-text-transform, inherit);display:block;margin-top:0;line-height:normal;margin:0;opacity:0;will-change:opacity;transition:opacity 150ms 0ms cubic-bezier(0.4, 0, 0.2, 1)}.mdc-text-field-helper-text::before{display:inline-block;width:0;height:16px;content:"";vertical-align:0}.mdc-text-field-helper-text--persistent{transition:none;opacity:1;will-change:initial}.mdc-text-field-character-counter{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto, sans-serif;font-family:var(--mdc-typography-caption-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:0.75rem;font-size:var(--mdc-typography-caption-font-size, 0.75rem);line-height:1.25rem;line-height:var(--mdc-typography-caption-line-height, 1.25rem);font-weight:400;font-weight:var(--mdc-typography-caption-font-weight, 400);letter-spacing:0.0333333333em;letter-spacing:var(--mdc-typography-caption-letter-spacing, 0.0333333333em);text-decoration:inherit;text-decoration:var(--mdc-typography-caption-text-decoration, inherit);text-transform:inherit;text-transform:var(--mdc-typography-caption-text-transform, inherit);display:block;margin-top:0;line-height:normal;margin-left:auto;margin-right:0;padding-left:16px;padding-right:0;white-space:nowrap}.mdc-text-field-character-counter::before{display:inline-block;width:0;height:16px;content:"";vertical-align:0}[dir=rtl] .mdc-text-field-character-counter,.mdc-text-field-character-counter[dir=rtl]{margin-left:0;margin-right:auto}[dir=rtl] .mdc-text-field-character-counter,.mdc-text-field-character-counter[dir=rtl]{padding-left:0;padding-right:16px}.mdc-text-field__icon{align-self:center;cursor:pointer}.mdc-text-field__icon:not([tabindex]),.mdc-text-field__icon[tabindex="-1"]{cursor:default;pointer-events:none}.mdc-text-field__icon svg{display:block}.mdc-text-field__icon--leading{margin-left:16px;margin-right:8px}[dir=rtl] .mdc-text-field__icon--leading,.mdc-text-field__icon--leading[dir=rtl]{margin-left:8px;margin-right:16px}.mdc-text-field__icon--trailing{padding:12px;margin-left:0px;margin-right:0px}[dir=rtl] .mdc-text-field__icon--trailing,.mdc-text-field__icon--trailing[dir=rtl]{margin-left:0px;margin-right:0px}.material-icons{font-family:var(--mdc-icon-font, "Material Icons");font-weight:normal;font-style:normal;font-size:var(--mdc-icon-size, 24px);line-height:1;letter-spacing:normal;text-transform:none;display:inline-block;white-space:nowrap;word-wrap:normal;direction:ltr;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;-moz-osx-font-smoothing:grayscale;font-feature-settings:"liga"}:host{display:inline-flex;flex-direction:column;outline:none}.mdc-text-field{width:100%}.mdc-text-field:not(.mdc-text-field--disabled) .mdc-line-ripple::before{border-bottom-color:rgba(0, 0, 0, 0.42);border-bottom-color:var(--mdc-text-field-idle-line-color, rgba(0, 0, 0, 0.42))}.mdc-text-field:not(.mdc-text-field--disabled):hover .mdc-line-ripple::before{border-bottom-color:rgba(0, 0, 0, 0.87);border-bottom-color:var(--mdc-text-field-hover-line-color, rgba(0, 0, 0, 0.87))}.mdc-text-field.mdc-text-field--disabled .mdc-line-ripple::before{border-bottom-color:rgba(0, 0, 0, 0.06);border-bottom-color:var(--mdc-text-field-disabled-line-color, rgba(0, 0, 0, 0.06))}.mdc-text-field.mdc-text-field--invalid:not(.mdc-text-field--disabled) .mdc-line-ripple::before{border-bottom-color:#b00020;border-bottom-color:var(--mdc-theme-error, #b00020)}.mdc-text-field__input{direction:inherit}mwc-notched-outline{--mdc-notched-outline-border-color: var( --mdc-text-field-outlined-idle-border-color, rgba(0, 0, 0, 0.38) )}:host(:not([disabled]):hover) :not(.mdc-text-field--invalid):not(.mdc-text-field--focused) mwc-notched-outline{--mdc-notched-outline-border-color: var( --mdc-text-field-outlined-hover-border-color, rgba(0, 0, 0, 0.87) )}:host(:not([disabled])) .mdc-text-field:not(.mdc-text-field--outlined){background-color:var(--mdc-text-field-fill-color, whitesmoke)}:host(:not([disabled])) .mdc-text-field.mdc-text-field--invalid mwc-notched-outline{--mdc-notched-outline-border-color: var( --mdc-text-field-error-color, var(--mdc-theme-error, #b00020) )}:host(:not([disabled])) .mdc-text-field.mdc-text-field--invalid+.mdc-text-field-helper-line .mdc-text-field-character-counter,:host(:not([disabled])) .mdc-text-field.mdc-text-field--invalid .mdc-text-field__icon{color:var(--mdc-text-field-error-color, var(--mdc-theme-error, #b00020))}:host(:not([disabled])) .mdc-text-field:not(.mdc-text-field--invalid):not(.mdc-text-field--focused) .mdc-floating-label,:host(:not([disabled])) .mdc-text-field:not(.mdc-text-field--invalid):not(.mdc-text-field--focused) .mdc-floating-label::after{color:var(--mdc-text-field-label-ink-color, rgba(0, 0, 0, 0.6))}:host(:not([disabled])) .mdc-text-field.mdc-text-field--focused mwc-notched-outline{--mdc-notched-outline-stroke-width: 2px}:host(:not([disabled])) .mdc-text-field.mdc-text-field--focused:not(.mdc-text-field--invalid) mwc-notched-outline{--mdc-notched-outline-border-color: var( --mdc-text-field-focused-label-color, var(--mdc-theme-primary, rgba(98, 0, 238, 0.87)) )}:host(:not([disabled])) .mdc-text-field.mdc-text-field--focused:not(.mdc-text-field--invalid) .mdc-floating-label{color:#6200ee;color:var(--mdc-theme-primary, #6200ee)}:host(:not([disabled])) .mdc-text-field .mdc-text-field__input{color:var(--mdc-text-field-ink-color, rgba(0, 0, 0, 0.87))}:host(:not([disabled])) .mdc-text-field .mdc-text-field__input::placeholder{color:var(--mdc-text-field-label-ink-color, rgba(0, 0, 0, 0.6))}:host(:not([disabled])) .mdc-text-field-helper-line .mdc-text-field-helper-text:not(.mdc-text-field-helper-text--validation-msg),:host(:not([disabled])) .mdc-text-field-helper-line:not(.mdc-text-field--invalid) .mdc-text-field-character-counter{color:var(--mdc-text-field-label-ink-color, rgba(0, 0, 0, 0.6))}:host([disabled]) .mdc-text-field:not(.mdc-text-field--outlined){background-color:var(--mdc-text-field-disabled-fill-color, #fafafa)}:host([disabled]) .mdc-text-field.mdc-text-field--outlined mwc-notched-outline{--mdc-notched-outline-border-color: var( --mdc-text-field-outlined-disabled-border-color, rgba(0, 0, 0, 0.06) )}:host([disabled]) .mdc-text-field:not(.mdc-text-field--invalid):not(.mdc-text-field--focused) .mdc-floating-label,:host([disabled]) .mdc-text-field:not(.mdc-text-field--invalid):not(.mdc-text-field--focused) .mdc-floating-label::after{color:var(--mdc-text-field-disabled-ink-color, rgba(0, 0, 0, 0.38))}:host([disabled]) .mdc-text-field .mdc-text-field__input,:host([disabled]) .mdc-text-field .mdc-text-field__input::placeholder{color:var(--mdc-text-field-disabled-ink-color, rgba(0, 0, 0, 0.38))}:host([disabled]) .mdc-text-field-helper-line .mdc-text-field-helper-text,:host([disabled]) .mdc-text-field-helper-line .mdc-text-field-character-counter{color:var(--mdc-text-field-disabled-ink-color, rgba(0, 0, 0, 0.38))}` +/** + * @license + * Copyright 2016 Google Inc. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */;var Tc=function(){function t(t){void 0===t&&(t={}),this.adapter=t}return Object.defineProperty(t,"cssClasses",{get:function(){return{}},enumerable:!1,configurable:!0}),Object.defineProperty(t,"strings",{get:function(){return{}},enumerable:!1,configurable:!0}),Object.defineProperty(t,"numbers",{get:function(){return{}},enumerable:!1,configurable:!0}),Object.defineProperty(t,"defaultAdapter",{get:function(){return{}},enumerable:!1,configurable:!0}),t.prototype.init=function(){},t.prototype.destroy=function(){},t}(),zc={ARIA_CONTROLS:"aria-controls",ARIA_DESCRIBEDBY:"aria-describedby",INPUT_SELECTOR:".mdc-text-field__input",LABEL_SELECTOR:".mdc-floating-label",LEADING_ICON_SELECTOR:".mdc-text-field__icon--leading",LINE_RIPPLE_SELECTOR:".mdc-line-ripple",OUTLINE_SELECTOR:".mdc-notched-outline",PREFIX_SELECTOR:".mdc-text-field__affix--prefix",SUFFIX_SELECTOR:".mdc-text-field__affix--suffix",TRAILING_ICON_SELECTOR:".mdc-text-field__icon--trailing"},Oc={DISABLED:"mdc-text-field--disabled",FOCUSED:"mdc-text-field--focused",HELPER_LINE:"mdc-text-field-helper-line",INVALID:"mdc-text-field--invalid",LABEL_FLOATING:"mdc-text-field--label-floating",NO_LABEL:"mdc-text-field--no-label",OUTLINED:"mdc-text-field--outlined",ROOT:"mdc-text-field",TEXTAREA:"mdc-text-field--textarea",WITH_LEADING_ICON:"mdc-text-field--with-leading-icon",WITH_TRAILING_ICON:"mdc-text-field--with-trailing-icon",WITH_INTERNAL_COUNTER:"mdc-text-field--with-internal-counter"},Mc={LABEL_SCALE:.75},Lc=["pattern","min","max","required","step","minlength","maxlength"],Dc=["color","date","datetime-local","month","range","time","week"],jc=["mousedown","touchstart"],Pc=["click","keydown"],Nc=function(t){function n(e,o){void 0===o&&(o={});var r=t.call(this,i(i({},n.defaultAdapter),e))||this;return r.isFocused=!1,r.receivedUserInput=!1,r.valid=!0,r.useNativeValidation=!0,r.validateOnValueChange=!0,r.helperText=o.helperText,r.characterCounter=o.characterCounter,r.leadingIcon=o.leadingIcon,r.trailingIcon=o.trailingIcon,r.inputFocusHandler=function(){r.activateFocus()},r.inputBlurHandler=function(){r.deactivateFocus()},r.inputInputHandler=function(){r.handleInput()},r.setPointerXOffset=function(t){r.setTransformOrigin(t)},r.textFieldInteractionHandler=function(){r.handleTextFieldInteraction()},r.validationAttributeChangeHandler=function(t){r.handleValidationAttributeChange(t)},r}return e(n,t),Object.defineProperty(n,"cssClasses",{get:function(){return Oc},enumerable:!1,configurable:!0}),Object.defineProperty(n,"strings",{get:function(){return zc},enumerable:!1,configurable:!0}),Object.defineProperty(n,"numbers",{get:function(){return Mc},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"shouldAlwaysFloat",{get:function(){var t=this.getNativeInput().type;return Dc.indexOf(t)>=0},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"shouldFloat",{get:function(){return this.shouldAlwaysFloat||this.isFocused||!!this.getValue()||this.isBadInput()},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"shouldShake",{get:function(){return!this.isFocused&&!this.isValid()&&!!this.getValue()},enumerable:!1,configurable:!0}),Object.defineProperty(n,"defaultAdapter",{get:function(){return{addClass:function(){},removeClass:function(){},hasClass:function(){return!0},setInputAttr:function(){},removeInputAttr:function(){},registerTextFieldInteractionHandler:function(){},deregisterTextFieldInteractionHandler:function(){},registerInputInteractionHandler:function(){},deregisterInputInteractionHandler:function(){},registerValidationAttributeChangeHandler:function(){return new MutationObserver((function(){}))},deregisterValidationAttributeChangeHandler:function(){},getNativeInput:function(){return null},isFocused:function(){return!1},activateLineRipple:function(){},deactivateLineRipple:function(){},setLineRippleTransformOrigin:function(){},shakeLabel:function(){},floatLabel:function(){},setLabelRequired:function(){},hasLabel:function(){return!1},getLabelWidth:function(){return 0},hasOutline:function(){return!1},notchOutline:function(){},closeOutline:function(){}}},enumerable:!1,configurable:!0}),n.prototype.init=function(){var t,e,i,n;this.adapter.hasLabel()&&this.getNativeInput().required&&this.adapter.setLabelRequired(!0),this.adapter.isFocused()?this.inputFocusHandler():this.adapter.hasLabel()&&this.shouldFloat&&(this.notchOutline(!0),this.adapter.floatLabel(!0),this.styleFloating(!0)),this.adapter.registerInputInteractionHandler("focus",this.inputFocusHandler),this.adapter.registerInputInteractionHandler("blur",this.inputBlurHandler),this.adapter.registerInputInteractionHandler("input",this.inputInputHandler);try{for(var r=o(jc),a=r.next();!a.done;a=r.next()){var l=a.value;this.adapter.registerInputInteractionHandler(l,this.setPointerXOffset)}}catch(e){t={error:e}}finally{try{a&&!a.done&&(e=r.return)&&e.call(r)}finally{if(t)throw t.error}}try{for(var s=o(Pc),c=s.next();!c.done;c=s.next()){l=c.value;this.adapter.registerTextFieldInteractionHandler(l,this.textFieldInteractionHandler)}}catch(t){i={error:t}}finally{try{c&&!c.done&&(n=s.return)&&n.call(s)}finally{if(i)throw i.error}}this.validationObserver=this.adapter.registerValidationAttributeChangeHandler(this.validationAttributeChangeHandler),this.setcharacterCounter(this.getValue().length)},n.prototype.destroy=function(){var t,e,i,n;this.adapter.deregisterInputInteractionHandler("focus",this.inputFocusHandler),this.adapter.deregisterInputInteractionHandler("blur",this.inputBlurHandler),this.adapter.deregisterInputInteractionHandler("input",this.inputInputHandler);try{for(var r=o(jc),a=r.next();!a.done;a=r.next()){var l=a.value;this.adapter.deregisterInputInteractionHandler(l,this.setPointerXOffset)}}catch(e){t={error:e}}finally{try{a&&!a.done&&(e=r.return)&&e.call(r)}finally{if(t)throw t.error}}try{for(var s=o(Pc),c=s.next();!c.done;c=s.next()){l=c.value;this.adapter.deregisterTextFieldInteractionHandler(l,this.textFieldInteractionHandler)}}catch(t){i={error:t}}finally{try{c&&!c.done&&(n=s.return)&&n.call(s)}finally{if(i)throw i.error}}this.adapter.deregisterValidationAttributeChangeHandler(this.validationObserver)},n.prototype.handleTextFieldInteraction=function(){var t=this.adapter.getNativeInput();t&&t.disabled||(this.receivedUserInput=!0)},n.prototype.handleValidationAttributeChange=function(t){var e=this;t.some((function(t){return Lc.indexOf(t)>-1&&(e.styleValidity(!0),e.adapter.setLabelRequired(e.getNativeInput().required),!0)})),t.indexOf("maxlength")>-1&&this.setcharacterCounter(this.getValue().length)},n.prototype.notchOutline=function(t){if(this.adapter.hasOutline()&&this.adapter.hasLabel())if(t){var e=this.adapter.getLabelWidth()*Mc.LABEL_SCALE;this.adapter.notchOutline(e)}else this.adapter.closeOutline()},n.prototype.activateFocus=function(){this.isFocused=!0,this.styleFocused(this.isFocused),this.adapter.activateLineRipple(),this.adapter.hasLabel()&&(this.notchOutline(this.shouldFloat),this.adapter.floatLabel(this.shouldFloat),this.styleFloating(this.shouldFloat),this.adapter.shakeLabel(this.shouldShake)),!this.helperText||!this.helperText.isPersistent()&&this.helperText.isValidation()&&this.valid||this.helperText.showToScreenReader()},n.prototype.setTransformOrigin=function(t){if(!this.isDisabled()&&!this.adapter.hasOutline()){var e=t.touches,i=e?e[0]:t,n=i.target.getBoundingClientRect(),o=i.clientX-n.left;this.adapter.setLineRippleTransformOrigin(o)}},n.prototype.handleInput=function(){this.autoCompleteFocus(),this.setcharacterCounter(this.getValue().length)},n.prototype.autoCompleteFocus=function(){this.receivedUserInput||this.activateFocus()},n.prototype.deactivateFocus=function(){this.isFocused=!1,this.adapter.deactivateLineRipple();var t=this.isValid();this.styleValidity(t),this.styleFocused(this.isFocused),this.adapter.hasLabel()&&(this.notchOutline(this.shouldFloat),this.adapter.floatLabel(this.shouldFloat),this.styleFloating(this.shouldFloat),this.adapter.shakeLabel(this.shouldShake)),this.shouldFloat||(this.receivedUserInput=!1)},n.prototype.getValue=function(){return this.getNativeInput().value},n.prototype.setValue=function(t){if(this.getValue()!==t&&(this.getNativeInput().value=t),this.setcharacterCounter(t.length),this.validateOnValueChange){var e=this.isValid();this.styleValidity(e)}this.adapter.hasLabel()&&(this.notchOutline(this.shouldFloat),this.adapter.floatLabel(this.shouldFloat),this.styleFloating(this.shouldFloat),this.validateOnValueChange&&this.adapter.shakeLabel(this.shouldShake))},n.prototype.isValid=function(){return this.useNativeValidation?this.isNativeInputValid():this.valid},n.prototype.setValid=function(t){this.valid=t,this.styleValidity(t);var e=!t&&!this.isFocused&&!!this.getValue();this.adapter.hasLabel()&&this.adapter.shakeLabel(e)},n.prototype.setValidateOnValueChange=function(t){this.validateOnValueChange=t},n.prototype.getValidateOnValueChange=function(){return this.validateOnValueChange},n.prototype.setUseNativeValidation=function(t){this.useNativeValidation=t},n.prototype.isDisabled=function(){return this.getNativeInput().disabled},n.prototype.setDisabled=function(t){this.getNativeInput().disabled=t,this.styleDisabled(t)},n.prototype.setHelperTextContent=function(t){this.helperText&&this.helperText.setContent(t)},n.prototype.setLeadingIconAriaLabel=function(t){this.leadingIcon&&this.leadingIcon.setAriaLabel(t)},n.prototype.setLeadingIconContent=function(t){this.leadingIcon&&this.leadingIcon.setContent(t)},n.prototype.setTrailingIconAriaLabel=function(t){this.trailingIcon&&this.trailingIcon.setAriaLabel(t)},n.prototype.setTrailingIconContent=function(t){this.trailingIcon&&this.trailingIcon.setContent(t)},n.prototype.setcharacterCounter=function(t){if(this.characterCounter){var e=this.getNativeInput().maxLength;if(-1===e)throw new Error("MDCTextFieldFoundation: Expected maxlength html property on text input or textarea.");this.characterCounter.setCounterValue(t,e)}},n.prototype.isBadInput=function(){return this.getNativeInput().validity.badInput||!1},n.prototype.isNativeInputValid=function(){return this.getNativeInput().validity.valid},n.prototype.styleValidity=function(t){var e=n.cssClasses.INVALID;if(t?this.adapter.removeClass(e):this.adapter.addClass(e),this.helperText){if(this.helperText.setValidity(t),!this.helperText.isValidation())return;var i=this.helperText.isVisible(),o=this.helperText.getId();i&&o?this.adapter.setInputAttr(zc.ARIA_DESCRIBEDBY,o):this.adapter.removeInputAttr(zc.ARIA_DESCRIBEDBY)}},n.prototype.styleFocused=function(t){var e=n.cssClasses.FOCUSED;t?this.adapter.addClass(e):this.adapter.removeClass(e)},n.prototype.styleDisabled=function(t){var e=n.cssClasses,i=e.DISABLED,o=e.INVALID;t?(this.adapter.addClass(i),this.adapter.removeClass(o)):this.adapter.removeClass(i),this.leadingIcon&&this.leadingIcon.setDisabled(t),this.trailingIcon&&this.trailingIcon.setDisabled(t)},n.prototype.styleFloating=function(t){var e=n.cssClasses.LABEL_FLOATING;t?this.adapter.addClass(e):this.adapter.removeClass(e)},n.prototype.getNativeInput=function(){return(this.adapter?this.adapter.getNativeInput():null)||{disabled:!1,maxLength:-1,required:!1,type:"input",validity:{badInput:!1,valid:!0},value:""}},n}(Tc); /** * @license * Copyright 2016 Google Inc. @@ -2414,19 +2921,19 @@ const Ln=N`.mdc-floating-label{-moz-osx-font-smoothing:grayscale;-webkit-font-sm * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. - */;var as={ARIA_CONTROLS:"aria-controls",ARIA_DESCRIBEDBY:"aria-describedby",INPUT_SELECTOR:".mdc-text-field__input",LABEL_SELECTOR:".mdc-floating-label",LEADING_ICON_SELECTOR:".mdc-text-field__icon--leading",LINE_RIPPLE_SELECTOR:".mdc-line-ripple",OUTLINE_SELECTOR:".mdc-notched-outline",PREFIX_SELECTOR:".mdc-text-field__affix--prefix",SUFFIX_SELECTOR:".mdc-text-field__affix--suffix",TRAILING_ICON_SELECTOR:".mdc-text-field__icon--trailing"},ss={DISABLED:"mdc-text-field--disabled",FOCUSED:"mdc-text-field--focused",HELPER_LINE:"mdc-text-field-helper-line",INVALID:"mdc-text-field--invalid",LABEL_FLOATING:"mdc-text-field--label-floating",NO_LABEL:"mdc-text-field--no-label",OUTLINED:"mdc-text-field--outlined",ROOT:"mdc-text-field",TEXTAREA:"mdc-text-field--textarea",WITH_LEADING_ICON:"mdc-text-field--with-leading-icon",WITH_TRAILING_ICON:"mdc-text-field--with-trailing-icon",WITH_INTERNAL_COUNTER:"mdc-text-field--with-internal-counter"},ls={LABEL_SCALE:.75},cs=["pattern","min","max","required","step","minlength","maxlength"],ds=["color","date","datetime-local","month","range","time","week"],us=["mousedown","touchstart"],hs=["click","keydown"],ms=function(t){function n(e,o){void 0===o&&(o={});var r=t.call(this,i(i({},n.defaultAdapter),e))||this;return r.isFocused=!1,r.receivedUserInput=!1,r.valid=!0,r.useNativeValidation=!0,r.validateOnValueChange=!0,r.helperText=o.helperText,r.characterCounter=o.characterCounter,r.leadingIcon=o.leadingIcon,r.trailingIcon=o.trailingIcon,r.inputFocusHandler=function(){r.activateFocus()},r.inputBlurHandler=function(){r.deactivateFocus()},r.inputInputHandler=function(){r.handleInput()},r.setPointerXOffset=function(t){r.setTransformOrigin(t)},r.textFieldInteractionHandler=function(){r.handleTextFieldInteraction()},r.validationAttributeChangeHandler=function(t){r.handleValidationAttributeChange(t)},r}return e(n,t),Object.defineProperty(n,"cssClasses",{get:function(){return ss},enumerable:!1,configurable:!0}),Object.defineProperty(n,"strings",{get:function(){return as},enumerable:!1,configurable:!0}),Object.defineProperty(n,"numbers",{get:function(){return ls},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"shouldAlwaysFloat",{get:function(){var t=this.getNativeInput().type;return ds.indexOf(t)>=0},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"shouldFloat",{get:function(){return this.shouldAlwaysFloat||this.isFocused||!!this.getValue()||this.isBadInput()},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"shouldShake",{get:function(){return!this.isFocused&&!this.isValid()&&!!this.getValue()},enumerable:!1,configurable:!0}),Object.defineProperty(n,"defaultAdapter",{get:function(){return{addClass:function(){},removeClass:function(){},hasClass:function(){return!0},setInputAttr:function(){},removeInputAttr:function(){},registerTextFieldInteractionHandler:function(){},deregisterTextFieldInteractionHandler:function(){},registerInputInteractionHandler:function(){},deregisterInputInteractionHandler:function(){},registerValidationAttributeChangeHandler:function(){return new MutationObserver((function(){}))},deregisterValidationAttributeChangeHandler:function(){},getNativeInput:function(){return null},isFocused:function(){return!1},activateLineRipple:function(){},deactivateLineRipple:function(){},setLineRippleTransformOrigin:function(){},shakeLabel:function(){},floatLabel:function(){},setLabelRequired:function(){},hasLabel:function(){return!1},getLabelWidth:function(){return 0},hasOutline:function(){return!1},notchOutline:function(){},closeOutline:function(){}}},enumerable:!1,configurable:!0}),n.prototype.init=function(){var t,e,i,n;this.adapter.hasLabel()&&this.getNativeInput().required&&this.adapter.setLabelRequired(!0),this.adapter.isFocused()?this.inputFocusHandler():this.adapter.hasLabel()&&this.shouldFloat&&(this.notchOutline(!0),this.adapter.floatLabel(!0),this.styleFloating(!0)),this.adapter.registerInputInteractionHandler("focus",this.inputFocusHandler),this.adapter.registerInputInteractionHandler("blur",this.inputBlurHandler),this.adapter.registerInputInteractionHandler("input",this.inputInputHandler);try{for(var r=o(us),a=r.next();!a.done;a=r.next()){var s=a.value;this.adapter.registerInputInteractionHandler(s,this.setPointerXOffset)}}catch(e){t={error:e}}finally{try{a&&!a.done&&(e=r.return)&&e.call(r)}finally{if(t)throw t.error}}try{for(var l=o(hs),c=l.next();!c.done;c=l.next()){s=c.value;this.adapter.registerTextFieldInteractionHandler(s,this.textFieldInteractionHandler)}}catch(t){i={error:t}}finally{try{c&&!c.done&&(n=l.return)&&n.call(l)}finally{if(i)throw i.error}}this.validationObserver=this.adapter.registerValidationAttributeChangeHandler(this.validationAttributeChangeHandler),this.setcharacterCounter(this.getValue().length)},n.prototype.destroy=function(){var t,e,i,n;this.adapter.deregisterInputInteractionHandler("focus",this.inputFocusHandler),this.adapter.deregisterInputInteractionHandler("blur",this.inputBlurHandler),this.adapter.deregisterInputInteractionHandler("input",this.inputInputHandler);try{for(var r=o(us),a=r.next();!a.done;a=r.next()){var s=a.value;this.adapter.deregisterInputInteractionHandler(s,this.setPointerXOffset)}}catch(e){t={error:e}}finally{try{a&&!a.done&&(e=r.return)&&e.call(r)}finally{if(t)throw t.error}}try{for(var l=o(hs),c=l.next();!c.done;c=l.next()){s=c.value;this.adapter.deregisterTextFieldInteractionHandler(s,this.textFieldInteractionHandler)}}catch(t){i={error:t}}finally{try{c&&!c.done&&(n=l.return)&&n.call(l)}finally{if(i)throw i.error}}this.adapter.deregisterValidationAttributeChangeHandler(this.validationObserver)},n.prototype.handleTextFieldInteraction=function(){var t=this.adapter.getNativeInput();t&&t.disabled||(this.receivedUserInput=!0)},n.prototype.handleValidationAttributeChange=function(t){var e=this;t.some((function(t){return cs.indexOf(t)>-1&&(e.styleValidity(!0),e.adapter.setLabelRequired(e.getNativeInput().required),!0)})),t.indexOf("maxlength")>-1&&this.setcharacterCounter(this.getValue().length)},n.prototype.notchOutline=function(t){if(this.adapter.hasOutline()&&this.adapter.hasLabel())if(t){var e=this.adapter.getLabelWidth()*ls.LABEL_SCALE;this.adapter.notchOutline(e)}else this.adapter.closeOutline()},n.prototype.activateFocus=function(){this.isFocused=!0,this.styleFocused(this.isFocused),this.adapter.activateLineRipple(),this.adapter.hasLabel()&&(this.notchOutline(this.shouldFloat),this.adapter.floatLabel(this.shouldFloat),this.styleFloating(this.shouldFloat),this.adapter.shakeLabel(this.shouldShake)),!this.helperText||!this.helperText.isPersistent()&&this.helperText.isValidation()&&this.valid||this.helperText.showToScreenReader()},n.prototype.setTransformOrigin=function(t){if(!this.isDisabled()&&!this.adapter.hasOutline()){var e=t.touches,i=e?e[0]:t,n=i.target.getBoundingClientRect(),o=i.clientX-n.left;this.adapter.setLineRippleTransformOrigin(o)}},n.prototype.handleInput=function(){this.autoCompleteFocus(),this.setcharacterCounter(this.getValue().length)},n.prototype.autoCompleteFocus=function(){this.receivedUserInput||this.activateFocus()},n.prototype.deactivateFocus=function(){this.isFocused=!1,this.adapter.deactivateLineRipple();var t=this.isValid();this.styleValidity(t),this.styleFocused(this.isFocused),this.adapter.hasLabel()&&(this.notchOutline(this.shouldFloat),this.adapter.floatLabel(this.shouldFloat),this.styleFloating(this.shouldFloat),this.adapter.shakeLabel(this.shouldShake)),this.shouldFloat||(this.receivedUserInput=!1)},n.prototype.getValue=function(){return this.getNativeInput().value},n.prototype.setValue=function(t){if(this.getValue()!==t&&(this.getNativeInput().value=t),this.setcharacterCounter(t.length),this.validateOnValueChange){var e=this.isValid();this.styleValidity(e)}this.adapter.hasLabel()&&(this.notchOutline(this.shouldFloat),this.adapter.floatLabel(this.shouldFloat),this.styleFloating(this.shouldFloat),this.validateOnValueChange&&this.adapter.shakeLabel(this.shouldShake))},n.prototype.isValid=function(){return this.useNativeValidation?this.isNativeInputValid():this.valid},n.prototype.setValid=function(t){this.valid=t,this.styleValidity(t);var e=!t&&!this.isFocused&&!!this.getValue();this.adapter.hasLabel()&&this.adapter.shakeLabel(e)},n.prototype.setValidateOnValueChange=function(t){this.validateOnValueChange=t},n.prototype.getValidateOnValueChange=function(){return this.validateOnValueChange},n.prototype.setUseNativeValidation=function(t){this.useNativeValidation=t},n.prototype.isDisabled=function(){return this.getNativeInput().disabled},n.prototype.setDisabled=function(t){this.getNativeInput().disabled=t,this.styleDisabled(t)},n.prototype.setHelperTextContent=function(t){this.helperText&&this.helperText.setContent(t)},n.prototype.setLeadingIconAriaLabel=function(t){this.leadingIcon&&this.leadingIcon.setAriaLabel(t)},n.prototype.setLeadingIconContent=function(t){this.leadingIcon&&this.leadingIcon.setContent(t)},n.prototype.setTrailingIconAriaLabel=function(t){this.trailingIcon&&this.trailingIcon.setAriaLabel(t)},n.prototype.setTrailingIconContent=function(t){this.trailingIcon&&this.trailingIcon.setContent(t)},n.prototype.setcharacterCounter=function(t){if(this.characterCounter){var e=this.getNativeInput().maxLength;if(-1===e)throw new Error("MDCTextFieldFoundation: Expected maxlength html property on text input or textarea.");this.characterCounter.setCounterValue(t,e)}},n.prototype.isBadInput=function(){return this.getNativeInput().validity.badInput||!1},n.prototype.isNativeInputValid=function(){return this.getNativeInput().validity.valid},n.prototype.styleValidity=function(t){var e=n.cssClasses.INVALID;if(t?this.adapter.removeClass(e):this.adapter.addClass(e),this.helperText){if(this.helperText.setValidity(t),!this.helperText.isValidation())return;var i=this.helperText.isVisible(),o=this.helperText.getId();i&&o?this.adapter.setInputAttr(as.ARIA_DESCRIBEDBY,o):this.adapter.removeInputAttr(as.ARIA_DESCRIBEDBY)}},n.prototype.styleFocused=function(t){var e=n.cssClasses.FOCUSED;t?this.adapter.addClass(e):this.adapter.removeClass(e)},n.prototype.styleDisabled=function(t){var e=n.cssClasses,i=e.DISABLED,o=e.INVALID;t?(this.adapter.addClass(i),this.adapter.removeClass(o)):this.adapter.removeClass(i),this.leadingIcon&&this.leadingIcon.setDisabled(t),this.trailingIcon&&this.trailingIcon.setDisabled(t)},n.prototype.styleFloating=function(t){var e=n.cssClasses.LABEL_FLOATING;t?this.adapter.addClass(e):this.adapter.removeClass(e)},n.prototype.getNativeInput=function(){return(this.adapter?this.adapter.getNativeInput():null)||{disabled:!1,maxLength:-1,required:!1,type:"input",validity:{badInput:!1,valid:!0},value:""}},n}(gn),ps=ms; + */ /** * @license * Copyright 2020 Google LLC * SPDX-License-Identifier: BSD-3-Clause */ -const fs={},gs=qt(class extends Wt{constructor(t){if(super(t),t.type!==Yt&&t.type!==Ht&&t.type!==Xt)throw Error("The `live` directive is not allowed on child or event bindings");if(!(t=>void 0===t.strings)(t))throw Error("`live` bindings can only contain a single expression")}render(t){return t}update(t,[e]){if(e===mt||e===pt)return e;const i=t.element,n=t.name;if(t.type===Yt){if(e===i[n])return mt}else if(t.type===Xt){if(!!e===i.hasAttribute(n))return mt}else if(t.type===Ht&&i.getAttribute(n)===e+"")return mt;return((t,e=fs)=>{t._$AH=e; +const Vc={},Rc=Ae(class extends Se{constructor(t){if(super(t),t.type!==$e&&t.type!==Ce&&t.type!==Ee)throw Error("The `live` directive is not allowed on child or event bindings");if(!(t=>void 0===t.strings)(t))throw Error("`live` bindings can only contain a single expression")}render(t){return t}update(t,[e]){if(e===R||e===F)return e;const i=t.element,n=t.name;if(t.type===$e){if(e===i[n])return R}else if(t.type===Ee){if(!!e===i.hasAttribute(n))return R}else if(t.type===Ce&&i.getAttribute(n)===e+"")return R;return((t,e=Vc)=>{t._$AH=e; /** * @license * Copyright 2020 Google LLC * SPDX-License-Identifier: BSD-3-Clause - */})(t),e}}),_s=["touchstart","touchmove","scroll","mousewheel"],bs=(t={})=>{const e={};for(const i in t)e[i]=t[i];return Object.assign({badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valid:!0,valueMissing:!1},e)};class vs extends pn{constructor(){super(...arguments),this.mdcFoundationClass=ps,this.value="",this.type="text",this.placeholder="",this.label="",this.icon="",this.iconTrailing="",this.disabled=!1,this.required=!1,this.minLength=-1,this.maxLength=-1,this.outlined=!1,this.helper="",this.validateOnInitialRender=!1,this.validationMessage="",this.autoValidate=!1,this.pattern="",this.min="",this.max="",this.step=null,this.size=null,this.helperPersistent=!1,this.charCounter=!1,this.endAligned=!1,this.prefix="",this.suffix="",this.name="",this.readOnly=!1,this.autocapitalize="",this.outlineOpen=!1,this.outlineWidth=0,this.isUiValid=!0,this.focused=!1,this._validity=bs(),this.validityTransform=null}get validity(){return this._checkValidity(this.value),this._validity}get willValidate(){return this.formElement.willValidate}get selectionStart(){return this.formElement.selectionStart}get selectionEnd(){return this.formElement.selectionEnd}focus(){const t=new CustomEvent("focus");this.formElement.dispatchEvent(t),this.formElement.focus()}blur(){const t=new CustomEvent("blur");this.formElement.dispatchEvent(t),this.formElement.blur()}select(){this.formElement.select()}setSelectionRange(t,e,i){this.formElement.setSelectionRange(t,e,i)}update(t){t.has("autoValidate")&&this.mdcFoundation&&this.mdcFoundation.setValidateOnValueChange(this.autoValidate),t.has("value")&&"string"!=typeof this.value&&(this.value=`${this.value}`),super.update(t)}setFormData(t){this.name&&t.append(this.name,this.value)}render(){const t=this.charCounter&&-1!==this.maxLength,e=!!this.helper||!!this.validationMessage||t,i={"mdc-text-field--disabled":this.disabled,"mdc-text-field--no-label":!this.label,"mdc-text-field--filled":!this.outlined,"mdc-text-field--outlined":this.outlined,"mdc-text-field--with-leading-icon":this.icon,"mdc-text-field--with-trailing-icon":this.iconTrailing,"mdc-text-field--end-aligned":this.endAligned};return ut` -
`:""}renderCharCounter(t){const e=Math.min(this.value.length,this.maxLength);return t?N` ${e} / ${this.maxLength}`:""}onInputFocus(){this.focused=!0}onInputBlur(){this.focused=!1,this.reportValidity()}checkValidity(){const t=this._checkValidity(this.value);if(!t){const t=new Event("invalid",{bubbles:!1,cancelable:!0});this.dispatchEvent(t)}return t}reportValidity(){const t=this.checkValidity();return this.mdcFoundation.setValid(t),this.isUiValid=t,t}_checkValidity(t){const e=this.formElement.validity;let i=bs(e);if(this.validityTransform){const e=this.validityTransform(t,i);i=Object.assign(Object.assign({},i),e),this.mdcFoundation.setUseNativeValidation(!1)}else this.mdcFoundation.setUseNativeValidation(!0);return this._validity=i,this._validity.valid}setCustomValidity(t){this.validationMessage=t,this.formElement.setCustomValidity(t)}handleInputChange(){this.value=this.formElement.value}createAdapter(){return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},this.getRootAdapterMethods()),this.getInputAdapterMethods()),this.getLabelAdapterMethods()),this.getLineRippleAdapterMethods()),this.getOutlineAdapterMethods())}getRootAdapterMethods(){return Object.assign({registerTextFieldInteractionHandler:(t,e)=>this.addEventListener(t,e),deregisterTextFieldInteractionHandler:(t,e)=>this.removeEventListener(t,e),registerValidationAttributeChangeHandler:t=>{const e=new MutationObserver((e=>{t((t=>t.map((t=>t.attributeName)).filter((t=>t)))(e))}));return e.observe(this.formElement,{attributes:!0}),e},deregisterValidationAttributeChangeHandler:t=>t.disconnect()},sn(this.mdcRoot))}getInputAdapterMethods(){return{getNativeInput:()=>this.formElement,setInputAttr:()=>{},removeInputAttr:()=>{},isFocused:()=>!!this.shadowRoot&&this.shadowRoot.activeElement===this.formElement,registerInputInteractionHandler:(t,e)=>this.formElement.addEventListener(t,e,{passive:t in _s}),deregisterInputInteractionHandler:(t,e)=>this.formElement.removeEventListener(t,e)}}getLabelAdapterMethods(){return{floatLabel:t=>this.labelElement&&this.labelElement.floatingLabelFoundation.float(t),getLabelWidth:()=>this.labelElement?this.labelElement.floatingLabelFoundation.getWidth():0,hasLabel:()=>Boolean(this.labelElement),shakeLabel:t=>this.labelElement&&this.labelElement.floatingLabelFoundation.shake(t),setLabelRequired:t=>{this.labelElement&&this.labelElement.floatingLabelFoundation.setRequired(t)}}}getLineRippleAdapterMethods(){return{activateLineRipple:()=>{this.lineRippleElement&&this.lineRippleElement.lineRippleFoundation.activate()},deactivateLineRipple:()=>{this.lineRippleElement&&this.lineRippleElement.lineRippleFoundation.deactivate()},setLineRippleTransformOrigin:t=>{this.lineRippleElement&&this.lineRippleElement.lineRippleFoundation.setRippleCenter(t)}}}async getUpdateComplete(){var t;const e=await super.getUpdateComplete();return await(null===(t=this.outlineElement)||void 0===t?void 0:t.updateComplete),e}firstUpdated(){var t;super.firstUpdated(),this.mdcFoundation.setValidateOnValueChange(this.autoValidate),this.validateOnInitialRender&&this.reportValidity(),null===(t=this.outlineElement)||void 0===t||t.updateComplete.then((()=>{var t;this.outlineWidth=(null===(t=this.labelElement)||void 0===t?void 0:t.floatingLabelFoundation.getWidth())||0}))}getOutlineAdapterMethods(){return{closeOutline:()=>this.outlineElement&&(this.outlineOpen=!1),hasOutline:()=>Boolean(this.outlineElement),notchOutline:t=>{this.outlineElement&&!this.outlineOpen&&(this.outlineWidth=t,this.outlineOpen=!0)}}}async layout(){await this.updateComplete;const t=this.labelElement;if(!t)return void(this.outlineOpen=!1);const e=!!this.label&&!!this.value;if(t.floatingLabelFoundation.float(e),!this.outlined)return;this.outlineOpen=e,await this.updateComplete;const i=t.floatingLabelFoundation.getWidth();this.outlineOpen&&(this.outlineWidth=i,await this.updateComplete)}}n([Pt(".mdc-text-field")],vs.prototype,"mdcRoot",void 0),n([Pt("input")],vs.prototype,"formElement",void 0),n([Pt(".mdc-floating-label")],vs.prototype,"labelElement",void 0),n([Pt(".mdc-line-ripple")],vs.prototype,"lineRippleElement",void 0),n([Pt("mwc-notched-outline")],vs.prototype,"outlineElement",void 0),n([Pt(".mdc-notched-outline__notch")],vs.prototype,"notchElement",void 0),n([zt({type:String})],vs.prototype,"value",void 0),n([zt({type:String})],vs.prototype,"type",void 0),n([zt({type:String})],vs.prototype,"placeholder",void 0),n([zt({type:String}),fn((function(t,e){void 0!==e&&this.label!==e&&this.layout()}))],vs.prototype,"label",void 0),n([zt({type:String})],vs.prototype,"icon",void 0),n([zt({type:String})],vs.prototype,"iconTrailing",void 0),n([zt({type:Boolean,reflect:!0})],vs.prototype,"disabled",void 0),n([zt({type:Boolean})],vs.prototype,"required",void 0),n([zt({type:Number})],vs.prototype,"minLength",void 0),n([zt({type:Number})],vs.prototype,"maxLength",void 0),n([zt({type:Boolean,reflect:!0}),fn((function(t,e){void 0!==e&&this.outlined!==e&&this.layout()}))],vs.prototype,"outlined",void 0),n([zt({type:String})],vs.prototype,"helper",void 0),n([zt({type:Boolean})],vs.prototype,"validateOnInitialRender",void 0),n([zt({type:String})],vs.prototype,"validationMessage",void 0),n([zt({type:Boolean})],vs.prototype,"autoValidate",void 0),n([zt({type:String})],vs.prototype,"pattern",void 0),n([zt({type:String})],vs.prototype,"min",void 0),n([zt({type:String})],vs.prototype,"max",void 0),n([zt({type:String})],vs.prototype,"step",void 0),n([zt({type:Number})],vs.prototype,"size",void 0),n([zt({type:Boolean})],vs.prototype,"helperPersistent",void 0),n([zt({type:Boolean})],vs.prototype,"charCounter",void 0),n([zt({type:Boolean})],vs.prototype,"endAligned",void 0),n([zt({type:String})],vs.prototype,"prefix",void 0),n([zt({type:String})],vs.prototype,"suffix",void 0),n([zt({type:String})],vs.prototype,"name",void 0),n([zt({type:String})],vs.prototype,"inputMode",void 0),n([zt({type:Boolean})],vs.prototype,"readOnly",void 0),n([zt({type:String})],vs.prototype,"autocapitalize",void 0),n([jt()],vs.prototype,"outlineOpen",void 0),n([jt()],vs.prototype,"outlineWidth",void 0),n([jt()],vs.prototype,"isUiValid",void 0),n([jt()],vs.prototype,"focused",void 0),n([Rt({passive:!0})],vs.prototype,"handleInputChange",null);class ys extends vs{updated(t){super.updated(t),(t.has("invalid")&&(this.invalid||void 0!==t.get("invalid"))||t.has("errorMessage"))&&(this.setCustomValidity(this.invalid?this.errorMessage||"Invalid":""),this.reportValidity())}renderOutline(){return""}renderIcon(t,e=!1){const i=e?"trailing":"leading";return ut` + >${e} / ${this.maxLength}`:""}onInputFocus(){this.focused=!0}onInputBlur(){this.focused=!1,this.reportValidity()}checkValidity(){const t=this._checkValidity(this.value);if(!t){const t=new Event("invalid",{bubbles:!1,cancelable:!0});this.dispatchEvent(t)}return t}reportValidity(){const t=this.checkValidity();return this.mdcFoundation.setValid(t),this.isUiValid=t,t}_checkValidity(t){const e=this.formElement.validity;let i=Bc(e);if(this.validityTransform){const e=this.validityTransform(t,i);i=Object.assign(Object.assign({},i),e),this.mdcFoundation.setUseNativeValidation(!1)}else this.mdcFoundation.setUseNativeValidation(!0);return this._validity=i,this._validity.valid}setCustomValidity(t){this.validationMessage=t,this.formElement.setCustomValidity(t)}handleInputChange(){this.value=this.formElement.value}createAdapter(){return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},this.getRootAdapterMethods()),this.getInputAdapterMethods()),this.getLabelAdapterMethods()),this.getLineRippleAdapterMethods()),this.getOutlineAdapterMethods())}getRootAdapterMethods(){return Object.assign({registerTextFieldInteractionHandler:(t,e)=>this.addEventListener(t,e),deregisterTextFieldInteractionHandler:(t,e)=>this.removeEventListener(t,e),registerValidationAttributeChangeHandler:t=>{const e=new MutationObserver((e=>{t((t=>t.map((t=>t.attributeName)).filter((t=>t)))(e))}));return e.observe(this.formElement,{attributes:!0}),e},deregisterValidationAttributeChangeHandler:t=>t.disconnect()},xo(this.mdcRoot))}getInputAdapterMethods(){return{getNativeInput:()=>this.formElement,setInputAttr:()=>{},removeInputAttr:()=>{},isFocused:()=>!!this.shadowRoot&&this.shadowRoot.activeElement===this.formElement,registerInputInteractionHandler:(t,e)=>this.formElement.addEventListener(t,e,{passive:t in Fc}),deregisterInputInteractionHandler:(t,e)=>this.formElement.removeEventListener(t,e)}}getLabelAdapterMethods(){return{floatLabel:t=>this.labelElement&&this.labelElement.floatingLabelFoundation.float(t),getLabelWidth:()=>this.labelElement?this.labelElement.floatingLabelFoundation.getWidth():0,hasLabel:()=>Boolean(this.labelElement),shakeLabel:t=>this.labelElement&&this.labelElement.floatingLabelFoundation.shake(t),setLabelRequired:t=>{this.labelElement&&this.labelElement.floatingLabelFoundation.setRequired(t)}}}getLineRippleAdapterMethods(){return{activateLineRipple:()=>{this.lineRippleElement&&this.lineRippleElement.lineRippleFoundation.activate()},deactivateLineRipple:()=>{this.lineRippleElement&&this.lineRippleElement.lineRippleFoundation.deactivate()},setLineRippleTransformOrigin:t=>{this.lineRippleElement&&this.lineRippleElement.lineRippleFoundation.setRippleCenter(t)}}}async getUpdateComplete(){var t;const e=await super.getUpdateComplete();return await(null===(t=this.outlineElement)||void 0===t?void 0:t.updateComplete),e}firstUpdated(){var t;super.firstUpdated(),this.mdcFoundation.setValidateOnValueChange(this.autoValidate),this.validateOnInitialRender&&this.reportValidity(),null===(t=this.outlineElement)||void 0===t||t.updateComplete.then((()=>{var t;this.outlineWidth=(null===(t=this.labelElement)||void 0===t?void 0:t.floatingLabelFoundation.getWidth())||0}))}getOutlineAdapterMethods(){return{closeOutline:()=>this.outlineElement&&(this.outlineOpen=!1),hasOutline:()=>Boolean(this.outlineElement),notchOutline:t=>{this.outlineElement&&!this.outlineOpen&&(this.outlineWidth=t,this.outlineOpen=!0)}}}async layout(){await this.updateComplete;const t=this.labelElement;if(!t)return void(this.outlineOpen=!1);const e=!!this.label&&!!this.value;if(t.floatingLabelFoundation.float(e),!this.outlined)return;this.outlineOpen=e,await this.updateComplete;const i=t.floatingLabelFoundation.getWidth();this.outlineOpen&&(this.outlineWidth=i,await this.updateComplete)}}n([ht(".mdc-text-field")],Uc.prototype,"mdcRoot",void 0),n([ht("input")],Uc.prototype,"formElement",void 0),n([ht(".mdc-floating-label")],Uc.prototype,"labelElement",void 0),n([ht(".mdc-line-ripple")],Uc.prototype,"lineRippleElement",void 0),n([ht("mwc-notched-outline")],Uc.prototype,"outlineElement",void 0),n([ht(".mdc-notched-outline__notch")],Uc.prototype,"notchElement",void 0),n([st({type:String})],Uc.prototype,"value",void 0),n([st({type:String})],Uc.prototype,"type",void 0),n([st({type:String})],Uc.prototype,"placeholder",void 0),n([st({type:String}),Io((function(t,e){void 0!==e&&this.label!==e&&this.layout()}))],Uc.prototype,"label",void 0),n([st({type:String})],Uc.prototype,"icon",void 0),n([st({type:String})],Uc.prototype,"iconTrailing",void 0),n([st({type:Boolean,reflect:!0})],Uc.prototype,"disabled",void 0),n([st({type:Boolean})],Uc.prototype,"required",void 0),n([st({type:Number})],Uc.prototype,"minLength",void 0),n([st({type:Number})],Uc.prototype,"maxLength",void 0),n([st({type:Boolean,reflect:!0}),Io((function(t,e){void 0!==e&&this.outlined!==e&&this.layout()}))],Uc.prototype,"outlined",void 0),n([st({type:String})],Uc.prototype,"helper",void 0),n([st({type:Boolean})],Uc.prototype,"validateOnInitialRender",void 0),n([st({type:String})],Uc.prototype,"validationMessage",void 0),n([st({type:Boolean})],Uc.prototype,"autoValidate",void 0),n([st({type:String})],Uc.prototype,"pattern",void 0),n([st({type:String})],Uc.prototype,"min",void 0),n([st({type:String})],Uc.prototype,"max",void 0),n([st({type:String})],Uc.prototype,"step",void 0),n([st({type:Number})],Uc.prototype,"size",void 0),n([st({type:Boolean})],Uc.prototype,"helperPersistent",void 0),n([st({type:Boolean})],Uc.prototype,"charCounter",void 0),n([st({type:Boolean})],Uc.prototype,"endAligned",void 0),n([st({type:String})],Uc.prototype,"prefix",void 0),n([st({type:String})],Uc.prototype,"suffix",void 0),n([st({type:String})],Uc.prototype,"name",void 0),n([st({type:String})],Uc.prototype,"inputMode",void 0),n([st({type:Boolean})],Uc.prototype,"readOnly",void 0),n([st({type:String})],Uc.prototype,"autocapitalize",void 0),n([ct()],Uc.prototype,"outlineOpen",void 0),n([ct()],Uc.prototype,"outlineWidth",void 0),n([ct()],Uc.prototype,"isUiValid",void 0),n([ct()],Uc.prototype,"focused",void 0),n([ut({passive:!0})],Uc.prototype,"handleInputChange",null);class Hc extends Uc{updated(t){super.updated(t),(t.has("invalid")&&(this.invalid||void 0!==t.get("invalid"))||t.has("errorMessage"))&&(this.setCustomValidity(this.invalid?this.errorMessage||"Invalid":""),this.reportValidity())}renderOutline(){return""}renderIcon(t,e=!1){const i=e?"trailing":"leading";return N` - `}}ys.styles=[rs,N` + `}}Hc.styles=[Ic,d` .mdc-text-field__input { width: var(--ha-textfield-input-width, 100%); } @@ -2527,67 +3034,67 @@ const fs={},gs=qt(class extends Wt{constructor(t){if(super(t),t.type!==Yt&&t.typ .mdc-text-field { overflow: var(--text-field-overflow); } - `],n([zt({type:Boolean})],ys.prototype,"invalid",void 0),n([zt({attribute:"error-message"})],ys.prototype,"errorMessage",void 0),customElements.define("mushroom-textfield",ys);var xs=Object.freeze({__proto__:null});const ws=Fa((t=>[{name:"entity",selector:{entity:{}}},{type:"grid",name:"",schema:[{name:"name",selector:{text:{}}},{name:"content_info",selector:{"mush-info":{}}}]},{type:"grid",name:"",schema:[{name:"icon",selector:{icon:{placeholder:t}}},{name:"icon_color",selector:{"mush-color":{}}}]},{name:"use_entity_picture",selector:{boolean:{}}},{name:"tap_action",selector:{"mush-action":{}}},{name:"hold_action",selector:{"mush-action":{}}},{name:"double_tap_action",selector:{"mush-action":{}}}]));let Cs=class extends Ot{constructor(){super(...arguments),this._computeLabelCallback=t=>{const e=we(this.hass);return Ua.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 ut``;const t=this._config.entity?this.hass.states[this._config.entity]:void 0,e=t?Io(t):void 0,i=this._config.icon||e,n=ws(i);return ut` + `],n([st({type:Boolean})],Hc.prototype,"invalid",void 0),n([st({attribute:"error-message"})],Hc.prototype,"errorMessage",void 0),customElements.define("mushroom-textfield",Hc);var Yc=Object.freeze({__proto__:null});const Xc=_t(((t,e)=>[{name:"entity",selector:{entity:{}}},{type:"grid",name:"",schema:[{name:"name",selector:{text:{}}},{name:"content_info",selector:{"mush-info":{}}}]},{type:"grid",name:"",schema:[{name:"icon",selector:{icon:{placeholder:e}}},{name:"icon_color",selector:{"mush-color":{}}}]},{name:"use_entity_picture",selector:{boolean:{}}},...fc(t)]));let Wc=class extends ot{constructor(){super(...arguments),this._computeLabel=t=>{const e=Hi(this.hass);return vc.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 N``;const t=this._config.entity?this.hass.states[this._config.entity]:void 0,e=t?pl(t):void 0,i=this._config.icon||e,n=Xc(this.hass.connection.haVersion,i);return N` - `}_valueChanged(t){w(this,"config-changed",{config:t.detail.value})}static get styles(){return Va}};n([zt({attribute:!1})],Cs.prototype,"hass",void 0),n([jt()],Cs.prototype,"_config",void 0),Cs=n([Dt(dr("entity"))],Cs);var ks=Object.freeze({__proto__:null,get EntityChipEditor(){return Cs}});const $s=["show_conditions","show_temperature"],Es=["more-info","navigate","url","call-service","none"],As=[{name:"entity",selector:{entity:{domain:["weather"]}}},{type:"grid",name:"",schema:[{name:"show_conditions",selector:{boolean:{}}},{name:"show_temperature",selector:{boolean:{}}}]},{name:"tap_action",selector:{"mush-action":{actions:Es}}},{name:"hold_action",selector:{"mush-action":{actions:Es}}},{name:"double_tap_action",selector:{"mush-action":{actions:Es}}}];let Ss=class extends Ot{constructor(){super(...arguments),this._computeLabelCallback=t=>{const e=we(this.hass);return Ua.includes(t.name)?e(`editor.card.generic.${t.name}`):$s.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(){return this.hass&&this._config?ut` + `}_valueChanged(t){At(this,"config-changed",{config:t.detail.value})}};n([st({attribute:!1})],Wc.prototype,"hass",void 0),n([ct()],Wc.prototype,"_config",void 0),Wc=n([at(El("entity"))],Wc);var qc=Object.freeze({__proto__:null,get EntityChipEditor(){return Wc}});const Kc=["weather"],Gc=["show_conditions","show_temperature"],Zc=["more-info","navigate","url","call-service","none"],Jc=_t((t=>[{name:"entity",selector:{entity:{domain:Kc}}},{type:"grid",name:"",schema:[{name:"show_conditions",selector:{boolean:{}}},{name:"show_temperature",selector:{boolean:{}}}]},...fc(t,Zc)]));let Qc=class extends ot{constructor(){super(...arguments),this._computeLabel=t=>{const e=Hi(this.hass);return vc.includes(t.name)?e(`editor.card.generic.${t.name}`):Gc.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 N``;const t=Jc(this.hass.connection.haVersion);return N` - `:ut``}_valueChanged(t){w(this,"config-changed",{config:t.detail.value})}static get styles(){return[Va]}};n([zt({attribute:!1})],Ss.prototype,"hass",void 0),n([jt()],Ss.prototype,"_config",void 0),Ss=n([Dt(dr("weather"))],Ss);var Is=Object.freeze({__proto__:null,get WeatherChipEditor(){return Ss}});const Ts=Fa((t=>[{name:"icon",selector:{icon:{placeholder:t}}}]));let Os=class extends Ot{constructor(){super(...arguments),this._computeLabelCallback=t=>this.hass.localize(`ui.panel.lovelace.editor.card.generic.${t.name}`)}setConfig(t){this._config=t}render(){if(!this.hass||!this._config)return ut``;const t=this._config.icon||"mdi:arrow-left",e=Ts(t);return ut` + `}_valueChanged(t){At(this,"config-changed",{config:t.detail.value})}};n([st({attribute:!1})],Qc.prototype,"hass",void 0),n([ct()],Qc.prototype,"_config",void 0),Qc=n([at(El("weather"))],Qc);var td=Object.freeze({__proto__:null,get WeatherChipEditor(){return Qc}});const ed=_t((t=>[{name:"icon",selector:{icon:{placeholder:t}}}]));let id=class extends ot{constructor(){super(...arguments),this._computeLabel=t=>this.hass.localize(`ui.panel.lovelace.editor.card.generic.${t.name}`)}setConfig(t){this._config=t}render(){if(!this.hass||!this._config)return N``;const t=this._config.icon||"mdi:arrow-left",e=ed(t);return N` - `}_valueChanged(t){w(this,"config-changed",{config:t.detail.value})}static get styles(){return Va}};n([zt({attribute:!1})],Os.prototype,"hass",void 0),n([jt()],Os.prototype,"_config",void 0),Os=n([Dt(dr("back"))],Os);var Ms=Object.freeze({__proto__:null,get BackChipEditor(){return Os}});const Ds=["navigate","url","call-service","none"],Ls=Fa((t=>[{type:"grid",name:"",schema:[{name:"icon",selector:{icon:{placeholder:t}}},{name:"icon_color",selector:{"mush-color":{}}}]},{name:"tap_action",selector:{"mush-action":{actions:Ds}}},{name:"hold_action",selector:{"mush-action":{actions:Ds}}},{name:"double_tap_action",selector:{"mush-action":{actions:Ds}}}]));let zs=class extends Ot{constructor(){super(...arguments),this._computeLabelCallback=t=>{const e=we(this.hass);return Ua.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 ut``;const t=this._config.icon||"mdi:flash",e=Ls(t);return ut` + `}_valueChanged(t){At(this,"config-changed",{config:t.detail.value})}};n([st({attribute:!1})],id.prototype,"hass",void 0),n([ct()],id.prototype,"_config",void 0),id=n([at(El("back"))],id);var nd=Object.freeze({__proto__:null,get BackChipEditor(){return id}});const od=["navigate","url","call-service","none"],rd=_t(((t,e)=>[{type:"grid",name:"",schema:[{name:"icon",selector:{icon:{placeholder:e}}},{name:"icon_color",selector:{"mush-color":{}}}]},...fc(t,od)]));let ad=class extends ot{constructor(){super(...arguments),this._computeLabel=t=>{const e=Hi(this.hass);return vc.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 N``;const t=this._config.icon||"mdi:flash",e=rd(this.hass.connection.haVersion,t);return N` - `}_valueChanged(t){w(this,"config-changed",{config:t.detail.value})}static get styles(){return Va}};n([zt({attribute:!1})],zs.prototype,"hass",void 0),n([jt()],zs.prototype,"_config",void 0),zs=n([Dt(dr("action"))],zs);var js=Object.freeze({__proto__:null,get EntityChipEditor(){return zs}});const Ns=Fa((t=>[{name:"icon",selector:{icon:{placeholder:t}}}]));let Rs=class extends Ot{constructor(){super(...arguments),this._computeLabelCallback=t=>this.hass.localize(`ui.panel.lovelace.editor.card.generic.${t.name}`)}setConfig(t){this._config=t}render(){if(!this.hass||!this._config)return ut``;const t=this._config.icon||"mdi:menu",e=Ns(t);return ut` + `}_valueChanged(t){At(this,"config-changed",{config:t.detail.value})}};n([st({attribute:!1})],ad.prototype,"hass",void 0),n([ct()],ad.prototype,"_config",void 0),ad=n([at(El("action"))],ad);var ld=Object.freeze({__proto__:null,get EntityChipEditor(){return ad}});const sd=_t((t=>[{name:"icon",selector:{icon:{placeholder:t}}}]));let cd=class extends ot{constructor(){super(...arguments),this._computeLabel=t=>this.hass.localize(`ui.panel.lovelace.editor.card.generic.${t.name}`)}setConfig(t){this._config=t}render(){if(!this.hass||!this._config)return N``;const t=this._config.icon||"mdi:menu",e=sd(t);return N` - `}_valueChanged(t){w(this,"config-changed",{config:t.detail.value})}static get styles(){return Va}};n([zt({attribute:!1})],Rs.prototype,"hass",void 0),n([jt()],Rs.prototype,"_config",void 0),Rs=n([Dt(dr("menu"))],Rs);var Ps=Object.freeze({__proto__:null,get MenuChipEditor(){return Rs}});const Fs=Po(Ba,Xo({entity:qo(Wo()),icon:qo(Wo()),icon_color:qo(Wo()),primary:qo(Wo()),secondary:qo(Wo()),multiline_secondary:qo(Uo()),layout:qo(Zo),tap_action:qo(Za),hold_action:qo(Za),double_tap_action:qo(Za),entity_id:qo(Ko([Wo(),Bo(Wo())]))})),Vs=["content","primary","secondary","multiline_secondary"],Bs=[{name:"entity",selector:{entity:{}}},{name:"icon",selector:{text:{multiline:!0}}},{name:"icon_color",selector:{text:{multiline:!0}}},{name:"primary",selector:{text:{multiline:!0}}},{name:"secondary",selector:{text:{multiline:!0}}},{type:"grid",name:"",schema:[{name:"layout",selector:{"mush-layout":{}}},{name:"multiline_secondary",selector:{boolean:{}}}]},{name:"tap_action",selector:{"mush-action":{}}},{name:"hold_action",selector:{"mush-action":{}}},{name:"double_tap_action",selector:{"mush-action":{}}}];let Us=class extends Ot{constructor(){super(...arguments),this._computeLabelCallback=t=>{const e=we(this.hass);return"entity"===t.name?`${this.hass.localize("ui.panel.lovelace.editor.card.generic.entity")} (${e("editor.card.template.entity_extra")})`:Ua.includes(t.name)?e(`editor.card.generic.${t.name}`):Vs.includes(t.name)?e(`editor.card.template.${t.name}`):this.hass.localize(`ui.panel.lovelace.editor.card.generic.${t.name}`)}}connectedCallback(){super.connectedCallback(),Ha()}setConfig(t){No(t,Fs),this._config=t}render(){return this.hass&&this._config?ut` + `}_valueChanged(t){At(this,"config-changed",{config:t.detail.value})}};n([st({attribute:!1})],cd.prototype,"hass",void 0),n([ct()],cd.prototype,"_config",void 0),cd=n([at(El("menu"))],cd);var dd=Object.freeze({__proto__:null,get MenuChipEditor(){return cd}});const ud=te(xc,te(gc,pc),ce({entity:de(ue()),icon:de(ue()),icon_color:de(ue()),primary:de(ue()),secondary:de(ue()),badge_icon:de(ue()),badge_color:de(ue()),picture:de(ue()),multiline_secondary:de(re()),entity_id:de(me([ue(),oe(ue())]))})),hd=["badge_icon","badge_color","content","primary","secondary","multiline_secondary","picture"],md=_t((t=>[{name:"entity",selector:{entity:{}}},{name:"icon",selector:He(t,2022,5)?{template:{}}:{text:{multiline:!0}}},{name:"icon_color",selector:He(t,2022,5)?{template:{}}:{text:{multiline:!0}}},{name:"primary",selector:He(t,2022,5)?{template:{}}:{text:{multiline:!0}}},{name:"secondary",selector:He(t,2022,5)?{template:{}}:{text:{multiline:!0}}},{name:"badge_icon",selector:He(t,2022,5)?{template:{}}:{text:{multiline:!0}}},{name:"badge_color",selector:He(t,2022,5)?{template:{}}:{text:{multiline:!0}}},{name:"picture",selector:He(t,2022,5)?{template:{}}:{text:{multiline:!0}}},{type:"grid",name:"",schema:[{name:"layout",selector:{"mush-layout":{}}},{name:"fill_container",selector:{boolean:{}}},{name:"multiline_secondary",selector:{boolean:{}}}]},...fc(t)]));let pd=class extends ol{constructor(){super(...arguments),this._computeLabel=t=>{const e=Hi(this.hass);return"entity"===t.name?`${this.hass.localize("ui.panel.lovelace.editor.card.generic.entity")} (${e("editor.card.template.entity_extra")})`:vc.includes(t.name)?e(`editor.card.generic.${t.name}`):hd.includes(t.name)?e(`editor.card.template.${t.name}`):this.hass.localize(`ui.panel.lovelace.editor.card.generic.${t.name}`)}}connectedCallback(){super.connectedCallback(),bc(this.hass.connection.haVersion)}setConfig(t){Jt(t,ud),this._config=t}render(){return this.hass&&this._config?N` - `:ut``}_valueChanged(t){w(this,"config-changed",{config:t.detail.value})}static get styles(){return Va}};n([zt({attribute:!1})],Us.prototype,"hass",void 0),n([jt()],Us.prototype,"_config",void 0),Us=n([Dt("mushroom-template-card-editor")],Us);var Hs=Object.freeze({__proto__:null,TEMPLATE_FIELDS:Vs,get TemplateCardEditor(){return Us}});const Ys=[{name:"entity",selector:{entity:{}}},{name:"icon",selector:{text:{multiline:!0}}},{name:"icon_color",selector:{text:{multiline:!0}}},{name:"content",selector:{text:{multiline:!0}}},{name:"tap_action",selector:{"mush-action":{}}},{name:"hold_action",selector:{"mush-action":{}}},{name:"double_tap_action",selector:{"mush-action":{}}}];let Xs=class extends Ot{constructor(){super(...arguments),this._computeLabelCallback=t=>{const e=we(this.hass);return"entity"===t.name?`${this.hass.localize("ui.panel.lovelace.editor.card.generic.entity")} (${e("editor.card.template.entity_extra")})`:Ua.includes(t.name)?e(`editor.card.generic.${t.name}`):Vs.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?ut` + `:N``}_valueChanged(t){At(this,"config-changed",{config:t.detail.value})}};n([ct()],pd.prototype,"_config",void 0),pd=n([at("mushroom-template-card-editor")],pd);var fd=Object.freeze({__proto__:null,TEMPLATE_LABELS:hd,get TemplateCardEditor(){return pd}});const gd=_t((t=>[{name:"entity",selector:{entity:{}}},{name:"icon",selector:He(t,2022,5)?{template:{}}:{text:{multiline:!0}}},{name:"icon_color",selector:He(t,2022,5)?{template:{}}:{text:{multiline:!0}}},{name:"picture",selector:He(t,2022,5)?{template:{}}:{text:{multiline:!0}}},{name:"content",selector:He(t,2022,5)?{template:{}}:{text:{multiline:!0}}},...fc(t)]));let _d=class extends ot{constructor(){super(...arguments),this._computeLabel=t=>{const e=Hi(this.hass);return"entity"===t.name?`${this.hass.localize("ui.panel.lovelace.editor.card.generic.entity")} (${e("editor.card.template.entity_extra")})`:vc.includes(t.name)?e(`editor.card.generic.${t.name}`):hd.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?N` - `:ut``}_valueChanged(t){w(this,"config-changed",{config:t.detail.value})}static get styles(){return Va}};n([zt({attribute:!1})],Xs.prototype,"hass",void 0),n([jt()],Xs.prototype,"_config",void 0),Xs=n([Dt(dr("template"))],Xs);var qs=Object.freeze({__proto__:null,get EntityChipEditor(){return Xs}}),Ws={},Gs={};function Ks(t){return null==t}function Zs(t,e){var i="",n=t.reason||"(unknown reason)";return t.mark?(t.mark.name&&(i+='in "'+t.mark.name+'" '),i+="("+(t.mark.line+1)+":"+(t.mark.column+1)+")",!e&&t.mark.snippet&&(i+="\n\n"+t.mark.snippet),n+" "+i):n}function Js(t,e){Error.call(this),this.name="YAMLException",this.reason=t,this.mark=e,this.message=Zs(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack||""}Gs.isNothing=Ks,Gs.isObject=function(t){return"object"==typeof t&&null!==t},Gs.toArray=function(t){return Array.isArray(t)?t:Ks(t)?[]:[t]},Gs.repeat=function(t,e){var i,n="";for(i=0;is&&(e=n-s+(r=" ... ").length),i-n>s&&(i=n+s-(a=" ...").length),{str:r+t.slice(e,i).replace(/\t/g,"→")+a,pos:n-e+r.length}}function il(t,e){return tl.repeat(" ",e-t.length)+t}var nl=function(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 i,n=/\r?\n|\r|\0/g,o=[0],r=[],a=-1;i=n.exec(t.buffer);)r.push(i.index),o.push(i.index+i[0].length),t.position<=i.index&&a<0&&(a=o.length-2);a<0&&(a=o.length-1);var s,l,c="",d=Math.min(t.line+e.linesAfter,r.length).toString().length,u=e.maxLength-(e.indent+d+3);for(s=1;s<=e.linesBefore&&!(a-s<0);s++)l=el(t.buffer,o[a-s],r[a-s],t.position-(o[a]-o[a-s]),u),c=tl.repeat(" ",e.indent)+il((t.line-s+1).toString(),d)+" | "+l.str+"\n"+c;for(l=el(t.buffer,o[a],r[a],t.position,u),c+=tl.repeat(" ",e.indent)+il((t.line+1).toString(),d)+" | "+l.str+"\n",c+=tl.repeat("-",e.indent+d+3+l.pos)+"^\n",s=1;s<=e.linesAfter&&!(a+s>=r.length);s++)l=el(t.buffer,o[a+s],r[a+s],t.position-(o[a]-o[a+s]),u),c+=tl.repeat(" ",e.indent)+il((t.line+s+1).toString(),d)+" | "+l.str+"\n";return c.replace(/\n$/,"")},ol=Qs,rl=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],al=["scalar","sequence","mapping"];var sl=function(t,e){if(e=e||{},Object.keys(e).forEach((function(e){if(-1===rl.indexOf(e))throw new ol('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(i){t[i].forEach((function(t){e[String(t)]=i}))})),e}(e.styleAliases||null),-1===al.indexOf(this.kind))throw new ol('Unknown kind "'+this.kind+'" is specified for "'+t+'" YAML type.')},ll=Qs,cl=sl;function dl(t,e){var i=[];return t[e].forEach((function(t){var e=i.length;i.forEach((function(i,n){i.tag===t.tag&&i.kind===t.kind&&i.multi===t.multi&&(e=n)})),i[e]=t})),i}function ul(t){return this.extend(t)}ul.prototype.extend=function(t){var e=[],i=[];if(t instanceof cl)i.push(t);else if(Array.isArray(t))i=i.concat(t);else{if(!t||!Array.isArray(t.implicit)&&!Array.isArray(t.explicit))throw new ll("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");t.implicit&&(e=e.concat(t.implicit)),t.explicit&&(i=i.concat(t.explicit))}e.forEach((function(t){if(!(t instanceof cl))throw new ll("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(t.loadKind&&"scalar"!==t.loadKind)throw new ll("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 ll("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")})),i.forEach((function(t){if(!(t instanceof cl))throw new ll("Specified list of YAML types (or a single Type object) contains a non-Type object.")}));var n=Object.create(ul.prototype);return n.implicit=(this.implicit||[]).concat(e),n.explicit=(this.explicit||[]).concat(i),n.compiledImplicit=dl(n,"implicit"),n.compiledExplicit=dl(n,"explicit"),n.compiledTypeMap=function(){var t,e,i={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}};function n(t){t.multi?(i.multi[t.kind].push(t),i.multi.fallback.push(t)):i[t.kind][t.tag]=i.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"]}}),yl=Gs,xl=sl,wl=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");var Cl=/^[-+]?[0-9]+e/;var kl=new xl("tag:yaml.org,2002:float",{kind:"scalar",resolve:function(t){return null!==t&&!(!wl.test(t)||"_"===t[t.length-1])},construct:function(t){var e,i;return i="-"===(e=t.replace(/_/g,"").toLowerCase())[0]?-1:1,"+-".indexOf(e[0])>=0&&(e=e.slice(1)),".inf"===e?1===i?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:".nan"===e?NaN:i*parseFloat(e,10)},predicate:function(t){return"[object Number]"===Object.prototype.toString.call(t)&&(t%1!=0||yl.isNegativeZero(t))},represent:function(t,e){var i;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(yl.isNegativeZero(t))return"-0.0";return i=t.toString(10),Cl.test(i)?i.replace("e",".e"):i},defaultStyle:"lowercase"}),$l=hl.extend({implicit:[ml,pl,vl,kl]}),El=sl,Al=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),Sl=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]))?))?$");var Il=new El("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:function(t){return null!==t&&(null!==Al.exec(t)||null!==Sl.exec(t))},construct:function(t){var e,i,n,o,r,a,s,l,c=0,d=null;if(null===(e=Al.exec(t))&&(e=Sl.exec(t)),null===e)throw new Error("Date resolve error");if(i=+e[1],n=+e[2]-1,o=+e[3],!e[4])return new Date(Date.UTC(i,n,o));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]&&(d=6e4*(60*+e[10]+ +(e[11]||0)),"-"===e[9]&&(d=-d)),l=new Date(Date.UTC(i,n,o,r,a,s,c)),d&&l.setTime(l.getTime()-d),l},instanceOf:Date,represent:function(t){return t.toISOString()}});var Tl=new sl("tag:yaml.org,2002:merge",{kind:"scalar",resolve:function(t){return"<<"===t||null===t}}),Ol="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r";var Ml=new sl("tag:yaml.org,2002:binary",{kind:"scalar",resolve:function(t){if(null===t)return!1;var e,i,n=0,o=t.length,r=Ol;for(i=0;i64)){if(e<0)return!1;n+=6}return n%8==0},construct:function(t){var e,i,n=t.replace(/[\r\n=]/g,""),o=n.length,r=Ol,a=0,s=[];for(e=0;e>16&255),s.push(a>>8&255),s.push(255&a)),a=a<<6|r.indexOf(n.charAt(e));return 0===(i=o%4*6)?(s.push(a>>16&255),s.push(a>>8&255),s.push(255&a)):18===i?(s.push(a>>10&255),s.push(a>>2&255)):12===i&&s.push(a>>4&255),new Uint8Array(s)},predicate:function(t){return"[object Uint8Array]"===Object.prototype.toString.call(t)},represent:function(t){var e,i,n="",o=0,r=t.length,a=Ol;for(e=0;e>18&63],n+=a[o>>12&63],n+=a[o>>6&63],n+=a[63&o]),o=(o<<8)+t[e];return 0===(i=r%3)?(n+=a[o>>18&63],n+=a[o>>12&63],n+=a[o>>6&63],n+=a[63&o]):2===i?(n+=a[o>>10&63],n+=a[o>>4&63],n+=a[o<<2&63],n+=a[64]):1===i&&(n+=a[o>>2&63],n+=a[o<<4&63],n+=a[64],n+=a[64]),n}}),Dl=sl,Ll=Object.prototype.hasOwnProperty,zl=Object.prototype.toString;var jl=new Dl("tag:yaml.org,2002:omap",{kind:"sequence",resolve:function(t){if(null===t)return!0;var e,i,n,o,r,a=[],s=t;for(e=0,i=s.length;e>10),56320+(t-65536&1023))}for(var dc=new Array(256),uc=new Array(256),hc=0;hc<256;hc++)dc[hc]=lc(hc)?1:0,uc[hc]=lc(hc);function mc(t,e){this.input=t,this.filename=e.filename||null,this.schema=e.schema||ql,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 pc(t,e){var i={name:t.filename,buffer:t.input.slice(0,-1),position:t.position,line:t.line,column:t.position-t.lineStart};return i.snippet=Xl(i),new Yl(e,i)}function fc(t,e){throw pc(t,e)}function gc(t,e){t.onWarning&&t.onWarning.call(null,pc(t,e))}var _c={YAML:function(t,e,i){var n,o,r;null!==t.version&&fc(t,"duplication of %YAML directive"),1!==i.length&&fc(t,"YAML directive accepts exactly one argument"),null===(n=/^([0-9]+)\.([0-9]+)$/.exec(i[0]))&&fc(t,"ill-formed argument of the YAML directive"),o=parseInt(n[1],10),r=parseInt(n[2],10),1!==o&&fc(t,"unacceptable YAML version of the document"),t.version=i[0],t.checkLineBreaks=r<2,1!==r&&2!==r&&gc(t,"unsupported YAML version of the document")},TAG:function(t,e,i){var n,o;2!==i.length&&fc(t,"TAG directive accepts exactly two arguments"),n=i[0],o=i[1],Jl.test(n)||fc(t,"ill-formed tag handle (first argument) of the TAG directive"),Wl.call(t.tagMap,n)&&fc(t,'there is a previously declared suffix for "'+n+'" tag handle'),Ql.test(o)||fc(t,"ill-formed tag prefix (second argument) of the TAG directive");try{o=decodeURIComponent(o)}catch(e){fc(t,"tag prefix is malformed: "+o)}t.tagMap[n]=o}};function bc(t,e,i,n){var o,r,a,s;if(e1&&(t.result+=Hl.repeat("\n",e-1))}function $c(t,e){var i,n,o=t.tag,r=t.anchor,a=[],s=!1;if(-1!==t.firstTabInLine)return!1;for(null!==t.anchor&&(t.anchorMap[t.anchor]=a),n=t.input.charCodeAt(t.position);0!==n&&(-1!==t.firstTabInLine&&(t.position=t.firstTabInLine,fc(t,"tab characters must not be used in indentation")),45===n)&&nc(t.input.charCodeAt(t.position+1));)if(s=!0,t.position++,wc(t,!0,-1)&&t.lineIndent<=e)a.push(null),n=t.input.charCodeAt(t.position);else if(i=t.line,Sc(t,e,3,!1,!0),a.push(t.result),wc(t,!0,-1),n=t.input.charCodeAt(t.position),(t.line===i||t.lineIndent>e)&&0!==n)fc(t,"bad indentation of a sequence entry");else if(t.lineIndente?p=1:t.lineIndent===e?p=0:t.lineIndente?p=1:t.lineIndent===e?p=0:t.lineIndente)&&(_&&(a=t.line,s=t.lineStart,l=t.position),Sc(t,e,4,!0,o)&&(_?f=t.result:g=t.result),_||(yc(t,h,m,p,f,g,a,s,l),p=f=g=null),wc(t,!0,-1),c=t.input.charCodeAt(t.position)),(t.line===r||t.lineIndent>e)&&0!==c)fc(t,"bad indentation of a mapping entry");else if(t.lineIndent=0))break;0===o?fc(t,"bad explicit indentation width of a block scalar; it cannot be less than one"):l?fc(t,"repeat of an indentation width identifier"):(c=e+o-1,l=!0)}if(ic(r)){do{r=t.input.charCodeAt(++t.position)}while(ic(r));if(35===r)do{r=t.input.charCodeAt(++t.position)}while(!ec(r)&&0!==r)}for(;0!==r;){for(xc(t),t.lineIndent=0,r=t.input.charCodeAt(t.position);(!l||t.lineIndentc&&(c=t.lineIndent),ec(r))d++;else{if(t.lineIndent0){for(o=a,r=0;o>0;o--)(a=rc(s=t.input.charCodeAt(++t.position)))>=0?r=(r<<4)+a:fc(t,"expected hexadecimal character");t.result+=cc(r),t.position++}else fc(t,"unknown escape sequence");i=n=t.position}else ec(s)?(bc(t,i,n,!0),kc(t,wc(t,!1,e)),i=n=t.position):t.position===t.lineStart&&Cc(t)?fc(t,"unexpected end of the document within a double quoted scalar"):(t.position++,n=t.position)}fc(t,"unexpected end of the stream within a double quoted scalar")}(t,h)?g=!0:!function(t){var e,i,n;if(42!==(n=t.input.charCodeAt(t.position)))return!1;for(n=t.input.charCodeAt(++t.position),e=t.position;0!==n&&!nc(n)&&!oc(n);)n=t.input.charCodeAt(++t.position);return t.position===e&&fc(t,"name of an alias node must contain at least one character"),i=t.input.slice(e,t.position),Wl.call(t.anchorMap,i)||fc(t,'unidentified alias "'+i+'"'),t.result=t.anchorMap[i],wc(t,!0,-1),!0}(t)?function(t,e,i){var n,o,r,a,s,l,c,d,u=t.kind,h=t.result;if(nc(d=t.input.charCodeAt(t.position))||oc(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)&&(nc(n=t.input.charCodeAt(t.position+1))||i&&oc(n)))return!1;for(t.kind="scalar",t.result="",o=r=t.position,a=!1;0!==d;){if(58===d){if(nc(n=t.input.charCodeAt(t.position+1))||i&&oc(n))break}else if(35===d){if(nc(t.input.charCodeAt(t.position-1)))break}else{if(t.position===t.lineStart&&Cc(t)||i&&oc(d))break;if(ec(d)){if(s=t.line,l=t.lineStart,c=t.lineIndent,wc(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&&(bc(t,o,r,!1),kc(t,t.line-s),o=r=t.position,a=!1),ic(d)||(r=t.position+1),d=t.input.charCodeAt(++t.position)}return bc(t,o,r,!1),!!t.result||(t.kind=u,t.result=h,!1)}(t,h,1===i)&&(g=!0,null===t.tag&&(t.tag="?")):(g=!0,null===t.tag&&null===t.anchor||fc(t,"alias node should not have any properties")),null!==t.anchor&&(t.anchorMap[t.anchor]=t.result)):0===p&&(g=s&&$c(t,m))),null===t.tag)null!==t.anchor&&(t.anchorMap[t.anchor]=t.result);else if("?"===t.tag){for(null!==t.result&&"scalar"!==t.kind&&fc(t,'unacceptable node kind for ! tag; it should be "scalar", not "'+t.kind+'"'),l=0,c=t.implicitTypes.length;l"),null!==t.result&&u.kind!==t.kind&&fc(t,"unacceptable node kind for !<"+t.tag+'> tag; it should be "'+u.kind+'", not "'+t.kind+'"'),u.resolve(t.result,t.tag)?(t.result=u.construct(t.result,t.tag),null!==t.anchor&&(t.anchorMap[t.anchor]=t.result)):fc(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 Ic(t){var e,i,n,o,r=t.position,a=!1;for(t.version=null,t.checkLineBreaks=t.legacy,t.tagMap=Object.create(null),t.anchorMap=Object.create(null);0!==(o=t.input.charCodeAt(t.position))&&(wc(t,!0,-1),o=t.input.charCodeAt(t.position),!(t.lineIndent>0||37!==o));){for(a=!0,o=t.input.charCodeAt(++t.position),e=t.position;0!==o&&!nc(o);)o=t.input.charCodeAt(++t.position);for(n=[],(i=t.input.slice(e,t.position)).length<1&&fc(t,"directive name must not be less than one character in length");0!==o;){for(;ic(o);)o=t.input.charCodeAt(++t.position);if(35===o){do{o=t.input.charCodeAt(++t.position)}while(0!==o&&!ec(o));break}if(ec(o))break;for(e=t.position;0!==o&&!nc(o);)o=t.input.charCodeAt(++t.position);n.push(t.input.slice(e,t.position))}0!==o&&xc(t),Wl.call(_c,i)?_c[i](t,i,n):gc(t,'unknown document directive "'+i+'"')}wc(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,wc(t,!0,-1)):a&&fc(t,"directives end mark is expected"),Sc(t,t.lineIndent-1,4,!1,!0),wc(t,!0,-1),t.checkLineBreaks&&Kl.test(t.input.slice(r,t.position))&&gc(t,"non-ASCII line breaks are interpreted as content"),t.documents.push(t.result),t.position===t.lineStart&&Cc(t)?46===t.input.charCodeAt(t.position)&&(t.position+=3,wc(t,!0,-1)):t.position=55296&&n<=56319&&e+1=56320&&i<=57343?1024*(n-55296)+i-56320+65536:n}function Gc(t){return/^\n* /.test(t)}function Kc(t,e,i,n,o,r,a,s){var l,c=0,d=null,u=!1,h=!1,m=-1!==n,p=-1,f=function(t){return Yc(t)&&65279!==t&&!Hc(t)&&45!==t&&63!==t&&58!==t&&44!==t&&91!==t&&93!==t&&123!==t&&125!==t&&35!==t&&38!==t&&42!==t&&33!==t&&124!==t&&61!==t&&62!==t&&39!==t&&34!==t&&37!==t&&64!==t&&96!==t}(Wc(t,0))&&function(t){return!Hc(t)&&58!==t}(Wc(t,t.length-1));if(e||a)for(l=0;l=65536?l+=2:l++){if(!Yc(c=Wc(t,l)))return 5;f=f&&qc(c,d,s),d=c}else{for(l=0;l=65536?l+=2:l++){if(10===(c=Wc(t,l)))u=!0,m&&(h=h||l-p-1>n&&" "!==t[p+1],p=l);else if(!Yc(c))return 5;f=f&&qc(c,d,s),d=c}h=h||m&&l-p-1>n&&" "!==t[p+1]}return u||h?i>9&&Gc(t)?5:a?2===r?5:2:h?4:3:!f||a||o(t)?2===r?5:2:1}function Zc(t,e,i,n,o){t.dump=function(){if(0===e.length)return 2===t.quotingType?'""':"''";if(!t.noCompatMode&&(-1!==Rc.indexOf(e)||Pc.test(e)))return 2===t.quotingType?'"'+e+'"':"'"+e+"'";var r=t.indent*Math.max(1,i),a=-1===t.lineWidth?-1:Math.max(Math.min(t.lineWidth,40),t.lineWidth-r),s=n||t.flowLevel>-1&&i>=t.flowLevel;switch(Kc(e,s,t.indent,a,(function(e){return function(t,e){var i,n;for(i=0,n=t.implicitTypes.length;i"+Jc(e,t.indent)+Qc(Bc(function(t,e){var i,n,o=/(\n+)([^\n]*)/g,r=(s=t.indexOf("\n"),s=-1!==s?s:t.length,o.lastIndex=s,td(t.slice(0,s),e)),a="\n"===t[0]||" "===t[0];var s;for(;n=o.exec(t);){var l=n[1],c=n[2];i=" "===c[0],r+=l+(a||i||""===c?"":"\n")+td(c,e),a=i}return r}(e,a),r));case 5:return'"'+function(t){for(var e,i="",n=0,o=0;o=65536?o+=2:o++)n=Wc(t,o),!(e=Nc[n])&&Yc(n)?(i+=t[o],n>=65536&&(i+=t[o+1])):i+=e||Fc(n);return i}(e)+'"';default:throw new Dc("impossible error: invalid scalar style")}}()}function Jc(t,e){var i=Gc(t)?String(e):"",n="\n"===t[t.length-1];return i+(n&&("\n"===t[t.length-2]||"\n"===t)?"+":n?"":"-")+"\n"}function Qc(t){return"\n"===t[t.length-1]?t.slice(0,-1):t}function td(t,e){if(""===t||" "===t[0])return t;for(var i,n,o=/ [^ ]/g,r=0,a=0,s=0,l="";i=o.exec(t);)(s=i.index)-r>e&&(n=a>r?a:s,l+="\n"+t.slice(r,n),r=n+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 ed(t,e,i,n){var o,r,a,s="",l=t.tag;for(o=0,r=i.length;o tag resolver accepts not "'+l+'" style');n=s.represent[l](e,l)}t.dump=n}return!0}return!1}function nd(t,e,i,n,o,r,a){t.tag=null,t.dump=i,id(t,i,!1)||id(t,i,!0);var s,l=zc.call(t.dump),c=n;n&&(n=t.flowLevel<0||t.flowLevel>e);var d,u,h="[object Object]"===l||"[object Array]"===l;if(h&&(u=-1!==(d=t.duplicates.indexOf(i))),(null!==t.tag&&"?"!==t.tag||u||2!==t.indent&&e>0)&&(o=!1),u&&t.usedDuplicates[d])t.dump="*ref_"+d;else{if(h&&u&&!t.usedDuplicates[d]&&(t.usedDuplicates[d]=!0),"[object Object]"===l)n&&0!==Object.keys(t.dump).length?(!function(t,e,i,n){var o,r,a,s,l,c,d="",u=t.tag,h=Object.keys(i);if(!0===t.sortKeys)h.sort();else if("function"==typeof t.sortKeys)h.sort(t.sortKeys);else if(t.sortKeys)throw new Dc("sortKeys must be a boolean or a function");for(o=0,r=h.length;o1024)&&(t.dump&&10===t.dump.charCodeAt(0)?c+="?":c+="? "),c+=t.dump,l&&(c+=Uc(t,e)),nd(t,e+1,s,!0,l)&&(t.dump&&10===t.dump.charCodeAt(0)?c+=":":c+=": ",d+=c+=t.dump));t.tag=u,t.dump=d||"{}"}(t,e,t.dump,o),u&&(t.dump="&ref_"+d+t.dump)):(!function(t,e,i){var n,o,r,a,s,l="",c=t.tag,d=Object.keys(i);for(n=0,o=d.length;n1024&&(s+="? "),s+=t.dump+(t.condenseFlow?'"':"")+":"+(t.condenseFlow?"":" "),nd(t,e,a,!1,!1)&&(l+=s+=t.dump));t.tag=c,t.dump="{"+l+"}"}(t,e,t.dump),u&&(t.dump="&ref_"+d+" "+t.dump));else if("[object Array]"===l)n&&0!==t.dump.length?(t.noArrayIndent&&!a&&e>0?ed(t,e-1,t.dump,o):ed(t,e,t.dump,o),u&&(t.dump="&ref_"+d+t.dump)):(!function(t,e,i){var n,o,r,a="",s=t.tag;for(n=0,o=i.length;n",t.dump=s+" "+t.dump)}return!0}function od(t,e){var i,n,o=[],r=[];for(rd(t,o,r),i=0,n=r.length;i0}get hasError(){return void 0!==this._errors&&this._errors.length>0}get GUImode(){return this._guiMode}set GUImode(t){this._guiMode=t,w(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 ut` + `:N``}_valueChanged(t){At(this,"config-changed",{config:t.detail.value})}};n([st({attribute:!1})],_d.prototype,"hass",void 0),n([ct()],_d.prototype,"_config",void 0),_d=n([at(El("template"))],_d);var vd=Object.freeze({__proto__:null,get EntityChipEditor(){return _d}}),bd={},yd={};function xd(t){return null==t}function wd(t,e){var i="",n=t.reason||"(unknown reason)";return t.mark?(t.mark.name&&(i+='in "'+t.mark.name+'" '),i+="("+(t.mark.line+1)+":"+(t.mark.column+1)+")",!e&&t.mark.snippet&&(i+="\n\n"+t.mark.snippet),n+" "+i):n}function kd(t,e){Error.call(this),this.name="YAMLException",this.reason=t,this.mark=e,this.message=wd(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack||""}yd.isNothing=xd,yd.isObject=function(t){return"object"==typeof t&&null!==t},yd.toArray=function(t){return Array.isArray(t)?t:xd(t)?[]:[t]},yd.repeat=function(t,e){var i,n="";for(i=0;il&&(e=n-l+(r=" ... ").length),i-n>l&&(i=n+l-(a=" ...").length),{str:r+t.slice(e,i).replace(/\t/g,"→")+a,pos:n-e+r.length}}function Ad(t,e){return $d.repeat(" ",e-t.length)+t}var Sd=function(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 i,n=/\r?\n|\r|\0/g,o=[0],r=[],a=-1;i=n.exec(t.buffer);)r.push(i.index),o.push(i.index+i[0].length),t.position<=i.index&&a<0&&(a=o.length-2);a<0&&(a=o.length-1);var l,s,c="",d=Math.min(t.line+e.linesAfter,r.length).toString().length,u=e.maxLength-(e.indent+d+3);for(l=1;l<=e.linesBefore&&!(a-l<0);l++)s=Ed(t.buffer,o[a-l],r[a-l],t.position-(o[a]-o[a-l]),u),c=$d.repeat(" ",e.indent)+Ad((t.line-l+1).toString(),d)+" | "+s.str+"\n"+c;for(s=Ed(t.buffer,o[a],r[a],t.position,u),c+=$d.repeat(" ",e.indent)+Ad((t.line+1).toString(),d)+" | "+s.str+"\n",c+=$d.repeat("-",e.indent+d+3+s.pos)+"^\n",l=1;l<=e.linesAfter&&!(a+l>=r.length);l++)s=Ed(t.buffer,o[a+l],r[a+l],t.position-(o[a]-o[a+l]),u),c+=$d.repeat(" ",e.indent)+Ad((t.line+l+1).toString(),d)+" | "+s.str+"\n";return c.replace(/\n$/,"")},Id={exports:{}},Td=Cd,zd=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],Od=["scalar","sequence","mapping"];var Md=function(t,e){if(e=e||{},Object.keys(e).forEach((function(e){if(-1===zd.indexOf(e))throw new Td('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(i){t[i].forEach((function(t){e[String(t)]=i}))})),e}(e.styleAliases||null),-1===Od.indexOf(this.kind))throw new Td('Unknown kind "'+this.kind+'" is specified for "'+t+'" YAML type.')},Ld=Cd,Dd=Md;function jd(t,e){var i=[];return t[e].forEach((function(t){var e=i.length;i.forEach((function(i,n){i.tag===t.tag&&i.kind===t.kind&&i.multi===t.multi&&(e=n)})),i[e]=t})),i}function Pd(t){return this.extend(t)}Pd.prototype.extend=function(t){var e=[],i=[];if(t instanceof Dd)i.push(t);else if(Array.isArray(t))i=i.concat(t);else{if(!t||!Array.isArray(t.implicit)&&!Array.isArray(t.explicit))throw new Ld("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");t.implicit&&(e=e.concat(t.implicit)),t.explicit&&(i=i.concat(t.explicit))}e.forEach((function(t){if(!(t instanceof Dd))throw new Ld("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(t.loadKind&&"scalar"!==t.loadKind)throw new Ld("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 Ld("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")})),i.forEach((function(t){if(!(t instanceof Dd))throw new Ld("Specified list of YAML types (or a single Type object) contains a non-Type object.")}));var n=Object.create(Pd.prototype);return n.implicit=(this.implicit||[]).concat(e),n.explicit=(this.explicit||[]).concat(i),n.compiledImplicit=jd(n,"implicit"),n.compiledExplicit=jd(n,"explicit"),n.compiledTypeMap=function(){var t,e,i={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}};function n(t){t.multi?(i.multi[t.kind].push(t),i.multi.fallback.push(t)):i[t.kind][t.tag]=i.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"]}}),Xd=yd,Wd=Md,qd=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");var Kd=/^[-+]?[0-9]+e/;var Gd=new Wd("tag:yaml.org,2002:float",{kind:"scalar",resolve:function(t){return null!==t&&!(!qd.test(t)||"_"===t[t.length-1])},construct:function(t){var e,i;return i="-"===(e=t.replace(/_/g,"").toLowerCase())[0]?-1:1,"+-".indexOf(e[0])>=0&&(e=e.slice(1)),".inf"===e?1===i?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:".nan"===e?NaN:i*parseFloat(e,10)},predicate:function(t){return"[object Number]"===Object.prototype.toString.call(t)&&(t%1!=0||Xd.isNegativeZero(t))},represent:function(t,e){var i;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(Xd.isNegativeZero(t))return"-0.0";return i=t.toString(10),Kd.test(i)?i.replace("e",".e"):i},defaultStyle:"lowercase"}),Zd=Nd.extend({implicit:[Vd,Rd,Yd,Gd]});Id.exports=Zd;var Jd=Md,Qd=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),tu=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]))?))?$");var eu=new Jd("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:function(t){return null!==t&&(null!==Qd.exec(t)||null!==tu.exec(t))},construct:function(t){var e,i,n,o,r,a,l,s,c=0,d=null;if(null===(e=Qd.exec(t))&&(e=tu.exec(t)),null===e)throw new Error("Date resolve error");if(i=+e[1],n=+e[2]-1,o=+e[3],!e[4])return new Date(Date.UTC(i,n,o));if(r=+e[4],a=+e[5],l=+e[6],e[7]){for(c=e[7].slice(0,3);c.length<3;)c+="0";c=+c}return e[9]&&(d=6e4*(60*+e[10]+ +(e[11]||0)),"-"===e[9]&&(d=-d)),s=new Date(Date.UTC(i,n,o,r,a,l,c)),d&&s.setTime(s.getTime()-d),s},instanceOf:Date,represent:function(t){return t.toISOString()}});var iu=new Md("tag:yaml.org,2002:merge",{kind:"scalar",resolve:function(t){return"<<"===t||null===t}}),nu="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r";var ou=new Md("tag:yaml.org,2002:binary",{kind:"scalar",resolve:function(t){if(null===t)return!1;var e,i,n=0,o=t.length,r=nu;for(i=0;i64)){if(e<0)return!1;n+=6}return n%8==0},construct:function(t){var e,i,n=t.replace(/[\r\n=]/g,""),o=n.length,r=nu,a=0,l=[];for(e=0;e>16&255),l.push(a>>8&255),l.push(255&a)),a=a<<6|r.indexOf(n.charAt(e));return 0===(i=o%4*6)?(l.push(a>>16&255),l.push(a>>8&255),l.push(255&a)):18===i?(l.push(a>>10&255),l.push(a>>2&255)):12===i&&l.push(a>>4&255),new Uint8Array(l)},predicate:function(t){return"[object Uint8Array]"===Object.prototype.toString.call(t)},represent:function(t){var e,i,n="",o=0,r=t.length,a=nu;for(e=0;e>18&63],n+=a[o>>12&63],n+=a[o>>6&63],n+=a[63&o]),o=(o<<8)+t[e];return 0===(i=r%3)?(n+=a[o>>18&63],n+=a[o>>12&63],n+=a[o>>6&63],n+=a[63&o]):2===i?(n+=a[o>>10&63],n+=a[o>>4&63],n+=a[o<<2&63],n+=a[64]):1===i&&(n+=a[o>>2&63],n+=a[o<<4&63],n+=a[64],n+=a[64]),n}}),ru=Md,au=Object.prototype.hasOwnProperty,lu=Object.prototype.toString;var su=new ru("tag:yaml.org,2002:omap",{kind:"sequence",resolve:function(t){if(null===t)return!0;var e,i,n,o,r,a=[],l=t;for(e=0,i=l.length;e>10),56320+(t-65536&1023))}for(var ju=new Array(256),Pu=new Array(256),Nu=0;Nu<256;Nu++)ju[Nu]=Lu(Nu)?1:0,Pu[Nu]=Lu(Nu);function Vu(t,e){this.input=t,this.filename=e.filename||null,this.schema=e.schema||bu,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 Ru(t,e){var i={name:t.filename,buffer:t.input.slice(0,-1),position:t.position,line:t.line,column:t.position-t.lineStart};return i.snippet=vu(i),new _u(e,i)}function Fu(t,e){throw Ru(t,e)}function Bu(t,e){t.onWarning&&t.onWarning.call(null,Ru(t,e))}var Uu={YAML:function(t,e,i){var n,o,r;null!==t.version&&Fu(t,"duplication of %YAML directive"),1!==i.length&&Fu(t,"YAML directive accepts exactly one argument"),null===(n=/^([0-9]+)\.([0-9]+)$/.exec(i[0]))&&Fu(t,"ill-formed argument of the YAML directive"),o=parseInt(n[1],10),r=parseInt(n[2],10),1!==o&&Fu(t,"unacceptable YAML version of the document"),t.version=i[0],t.checkLineBreaks=r<2,1!==r&&2!==r&&Bu(t,"unsupported YAML version of the document")},TAG:function(t,e,i){var n,o;2!==i.length&&Fu(t,"TAG directive accepts exactly two arguments"),n=i[0],o=i[1],Cu.test(n)||Fu(t,"ill-formed tag handle (first argument) of the TAG directive"),yu.call(t.tagMap,n)&&Fu(t,'there is a previously declared suffix for "'+n+'" tag handle'),$u.test(o)||Fu(t,"ill-formed tag prefix (second argument) of the TAG directive");try{o=decodeURIComponent(o)}catch(e){Fu(t,"tag prefix is malformed: "+o)}t.tagMap[n]=o}};function Hu(t,e,i,n){var o,r,a,l;if(e1&&(t.result+=gu.repeat("\n",e-1))}function Zu(t,e){var i,n,o=t.tag,r=t.anchor,a=[],l=!1;if(-1!==t.firstTabInLine)return!1;for(null!==t.anchor&&(t.anchorMap[t.anchor]=a),n=t.input.charCodeAt(t.position);0!==n&&(-1!==t.firstTabInLine&&(t.position=t.firstTabInLine,Fu(t,"tab characters must not be used in indentation")),45===n)&&Iu(t.input.charCodeAt(t.position+1));)if(l=!0,t.position++,qu(t,!0,-1)&&t.lineIndent<=e)a.push(null),n=t.input.charCodeAt(t.position);else if(i=t.line,th(t,e,3,!1,!0),a.push(t.result),qu(t,!0,-1),n=t.input.charCodeAt(t.position),(t.line===i||t.lineIndent>e)&&0!==n)Fu(t,"bad indentation of a sequence entry");else if(t.lineIndente?p=1:t.lineIndent===e?p=0:t.lineIndente?p=1:t.lineIndent===e?p=0:t.lineIndente)&&(_&&(a=t.line,l=t.lineStart,s=t.position),th(t,e,4,!0,o)&&(_?f=t.result:g=t.result),_||(Xu(t,h,m,p,f,g,a,l,s),p=f=g=null),qu(t,!0,-1),c=t.input.charCodeAt(t.position)),(t.line===r||t.lineIndent>e)&&0!==c)Fu(t,"bad indentation of a mapping entry");else if(t.lineIndent=0))break;0===o?Fu(t,"bad explicit indentation width of a block scalar; it cannot be less than one"):s?Fu(t,"repeat of an indentation width identifier"):(c=e+o-1,s=!0)}if(Su(r)){do{r=t.input.charCodeAt(++t.position)}while(Su(r));if(35===r)do{r=t.input.charCodeAt(++t.position)}while(!Au(r)&&0!==r)}for(;0!==r;){for(Wu(t),t.lineIndent=0,r=t.input.charCodeAt(t.position);(!s||t.lineIndentc&&(c=t.lineIndent),Au(r))d++;else{if(t.lineIndent0){for(o=a,r=0;o>0;o--)(a=zu(l=t.input.charCodeAt(++t.position)))>=0?r=(r<<4)+a:Fu(t,"expected hexadecimal character");t.result+=Du(r),t.position++}else Fu(t,"unknown escape sequence");i=n=t.position}else Au(l)?(Hu(t,i,n,!0),Gu(t,qu(t,!1,e)),i=n=t.position):t.position===t.lineStart&&Ku(t)?Fu(t,"unexpected end of the document within a double quoted scalar"):(t.position++,n=t.position)}Fu(t,"unexpected end of the stream within a double quoted scalar")}(t,h)?g=!0:!function(t){var e,i,n;if(42!==(n=t.input.charCodeAt(t.position)))return!1;for(n=t.input.charCodeAt(++t.position),e=t.position;0!==n&&!Iu(n)&&!Tu(n);)n=t.input.charCodeAt(++t.position);return t.position===e&&Fu(t,"name of an alias node must contain at least one character"),i=t.input.slice(e,t.position),yu.call(t.anchorMap,i)||Fu(t,'unidentified alias "'+i+'"'),t.result=t.anchorMap[i],qu(t,!0,-1),!0}(t)?function(t,e,i){var n,o,r,a,l,s,c,d,u=t.kind,h=t.result;if(Iu(d=t.input.charCodeAt(t.position))||Tu(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)&&(Iu(n=t.input.charCodeAt(t.position+1))||i&&Tu(n)))return!1;for(t.kind="scalar",t.result="",o=r=t.position,a=!1;0!==d;){if(58===d){if(Iu(n=t.input.charCodeAt(t.position+1))||i&&Tu(n))break}else if(35===d){if(Iu(t.input.charCodeAt(t.position-1)))break}else{if(t.position===t.lineStart&&Ku(t)||i&&Tu(d))break;if(Au(d)){if(l=t.line,s=t.lineStart,c=t.lineIndent,qu(t,!1,-1),t.lineIndent>=e){a=!0,d=t.input.charCodeAt(t.position);continue}t.position=r,t.line=l,t.lineStart=s,t.lineIndent=c;break}}a&&(Hu(t,o,r,!1),Gu(t,t.line-l),o=r=t.position,a=!1),Su(d)||(r=t.position+1),d=t.input.charCodeAt(++t.position)}return Hu(t,o,r,!1),!!t.result||(t.kind=u,t.result=h,!1)}(t,h,1===i)&&(g=!0,null===t.tag&&(t.tag="?")):(g=!0,null===t.tag&&null===t.anchor||Fu(t,"alias node should not have any properties")),null!==t.anchor&&(t.anchorMap[t.anchor]=t.result)):0===p&&(g=l&&Zu(t,m))),null===t.tag)null!==t.anchor&&(t.anchorMap[t.anchor]=t.result);else if("?"===t.tag){for(null!==t.result&&"scalar"!==t.kind&&Fu(t,'unacceptable node kind for ! tag; it should be "scalar", not "'+t.kind+'"'),s=0,c=t.implicitTypes.length;s"),null!==t.result&&u.kind!==t.kind&&Fu(t,"unacceptable node kind for !<"+t.tag+'> tag; it should be "'+u.kind+'", not "'+t.kind+'"'),u.resolve(t.result,t.tag)?(t.result=u.construct(t.result,t.tag),null!==t.anchor&&(t.anchorMap[t.anchor]=t.result)):Fu(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 eh(t){var e,i,n,o,r=t.position,a=!1;for(t.version=null,t.checkLineBreaks=t.legacy,t.tagMap=Object.create(null),t.anchorMap=Object.create(null);0!==(o=t.input.charCodeAt(t.position))&&(qu(t,!0,-1),o=t.input.charCodeAt(t.position),!(t.lineIndent>0||37!==o));){for(a=!0,o=t.input.charCodeAt(++t.position),e=t.position;0!==o&&!Iu(o);)o=t.input.charCodeAt(++t.position);for(n=[],(i=t.input.slice(e,t.position)).length<1&&Fu(t,"directive name must not be less than one character in length");0!==o;){for(;Su(o);)o=t.input.charCodeAt(++t.position);if(35===o){do{o=t.input.charCodeAt(++t.position)}while(0!==o&&!Au(o));break}if(Au(o))break;for(e=t.position;0!==o&&!Iu(o);)o=t.input.charCodeAt(++t.position);n.push(t.input.slice(e,t.position))}0!==o&&Wu(t),yu.call(Uu,i)?Uu[i](t,i,n):Bu(t,'unknown document directive "'+i+'"')}qu(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,qu(t,!0,-1)):a&&Fu(t,"directives end mark is expected"),th(t,t.lineIndent-1,4,!1,!0),qu(t,!0,-1),t.checkLineBreaks&&wu.test(t.input.slice(r,t.position))&&Bu(t,"non-ASCII line breaks are interpreted as content"),t.documents.push(t.result),t.position===t.lineStart&&Ku(t)?46===t.input.charCodeAt(t.position)&&(t.position+=3,qu(t,!0,-1)):t.position=55296&&n<=56319&&e+1=56320&&i<=57343?1024*(n-55296)+i-56320+65536:n}function xh(t){return/^\n* /.test(t)}function wh(t,e,i,n,o,r,a,l){var s,c=0,d=null,u=!1,h=!1,m=-1!==n,p=-1,f=function(t){return _h(t)&&65279!==t&&!gh(t)&&45!==t&&63!==t&&58!==t&&44!==t&&91!==t&&93!==t&&123!==t&&125!==t&&35!==t&&38!==t&&42!==t&&33!==t&&124!==t&&61!==t&&62!==t&&39!==t&&34!==t&&37!==t&&64!==t&&96!==t}(yh(t,0))&&function(t){return!gh(t)&&58!==t}(yh(t,t.length-1));if(e||a)for(s=0;s=65536?s+=2:s++){if(!_h(c=yh(t,s)))return 5;f=f&&bh(c,d,l),d=c}else{for(s=0;s=65536?s+=2:s++){if(10===(c=yh(t,s)))u=!0,m&&(h=h||s-p-1>n&&" "!==t[p+1],p=s);else if(!_h(c))return 5;f=f&&bh(c,d,l),d=c}h=h||m&&s-p-1>n&&" "!==t[p+1]}return u||h?i>9&&xh(t)?5:a?2===r?5:2:h?4:3:!f||a||o(t)?2===r?5:2:1}function kh(t,e,i,n,o){t.dump=function(){if(0===e.length)return 2===t.quotingType?'""':"''";if(!t.noCompatMode&&(-1!==dh.indexOf(e)||uh.test(e)))return 2===t.quotingType?'"'+e+'"':"'"+e+"'";var r=t.indent*Math.max(1,i),a=-1===t.lineWidth?-1:Math.max(Math.min(t.lineWidth,40),t.lineWidth-r),l=n||t.flowLevel>-1&&i>=t.flowLevel;switch(wh(e,l,t.indent,a,(function(e){return function(t,e){var i,n;for(i=0,n=t.implicitTypes.length;i"+Ch(e,t.indent)+$h(ph(function(t,e){var i,n,o=/(\n+)([^\n]*)/g,r=(l=t.indexOf("\n"),l=-1!==l?l:t.length,o.lastIndex=l,Eh(t.slice(0,l),e)),a="\n"===t[0]||" "===t[0];var l;for(;n=o.exec(t);){var s=n[1],c=n[2];i=" "===c[0],r+=s+(a||i||""===c?"":"\n")+Eh(c,e),a=i}return r}(e,a),r));case 5:return'"'+function(t){for(var e,i="",n=0,o=0;o=65536?o+=2:o++)n=yh(t,o),!(e=ch[n])&&_h(n)?(i+=t[o],n>=65536&&(i+=t[o+1])):i+=e||hh(n);return i}(e)+'"';default:throw new rh("impossible error: invalid scalar style")}}()}function Ch(t,e){var i=xh(t)?String(e):"",n="\n"===t[t.length-1];return i+(n&&("\n"===t[t.length-2]||"\n"===t)?"+":n?"":"-")+"\n"}function $h(t){return"\n"===t[t.length-1]?t.slice(0,-1):t}function Eh(t,e){if(""===t||" "===t[0])return t;for(var i,n,o=/ [^ ]/g,r=0,a=0,l=0,s="";i=o.exec(t);)(l=i.index)-r>e&&(n=a>r?a:l,s+="\n"+t.slice(r,n),r=n+1),a=l;return s+="\n",t.length-r>e&&a>r?s+=t.slice(r,a)+"\n"+t.slice(a+1):s+=t.slice(r),s.slice(1)}function Ah(t,e,i,n){var o,r,a,l="",s=t.tag;for(o=0,r=i.length;o tag resolver accepts not "'+s+'" style');n=l.represent[s](e,s)}t.dump=n}return!0}return!1}function Ih(t,e,i,n,o,r,a){t.tag=null,t.dump=i,Sh(t,i,!1)||Sh(t,i,!0);var l,s=lh.call(t.dump),c=n;n&&(n=t.flowLevel<0||t.flowLevel>e);var d,u,h="[object Object]"===s||"[object Array]"===s;if(h&&(u=-1!==(d=t.duplicates.indexOf(i))),(null!==t.tag&&"?"!==t.tag||u||2!==t.indent&&e>0)&&(o=!1),u&&t.usedDuplicates[d])t.dump="*ref_"+d;else{if(h&&u&&!t.usedDuplicates[d]&&(t.usedDuplicates[d]=!0),"[object Object]"===s)n&&0!==Object.keys(t.dump).length?(!function(t,e,i,n){var o,r,a,l,s,c,d="",u=t.tag,h=Object.keys(i);if(!0===t.sortKeys)h.sort();else if("function"==typeof t.sortKeys)h.sort(t.sortKeys);else if(t.sortKeys)throw new rh("sortKeys must be a boolean or a function");for(o=0,r=h.length;o1024)&&(t.dump&&10===t.dump.charCodeAt(0)?c+="?":c+="? "),c+=t.dump,s&&(c+=fh(t,e)),Ih(t,e+1,l,!0,s)&&(t.dump&&10===t.dump.charCodeAt(0)?c+=":":c+=": ",d+=c+=t.dump));t.tag=u,t.dump=d||"{}"}(t,e,t.dump,o),u&&(t.dump="&ref_"+d+t.dump)):(!function(t,e,i){var n,o,r,a,l,s="",c=t.tag,d=Object.keys(i);for(n=0,o=d.length;n1024&&(l+="? "),l+=t.dump+(t.condenseFlow?'"':"")+":"+(t.condenseFlow?"":" "),Ih(t,e,a,!1,!1)&&(s+=l+=t.dump));t.tag=c,t.dump="{"+s+"}"}(t,e,t.dump),u&&(t.dump="&ref_"+d+" "+t.dump));else if("[object Array]"===s)n&&0!==t.dump.length?(t.noArrayIndent&&!a&&e>0?Ah(t,e-1,t.dump,o):Ah(t,e,t.dump,o),u&&(t.dump="&ref_"+d+t.dump)):(!function(t,e,i){var n,o,r,a="",l=t.tag;for(n=0,o=i.length;n",t.dump=l+" "+t.dump)}return!0}function Th(t,e){var i,n,o=[],r=[];for(zh(t,o,r),i=0,n=r.length;i0}get hasError(){return void 0!==this._errors&&this._errors.length>0}get GUImode(){return this._guiMode}set GUImode(t){this._guiMode=t,At(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 N`
- ${this.GUImode?ut` + ${this.GUImode?N`
- ${this._loading?ut` + ${this._loading?N` `:this._configElement}
- `:ut` + `:N`
`} - ${!1===this._guiSupported&&this.configElementType?ut` + ${!1===this._guiSupported&&this.configElementType?N`
${this.hass.localize("ui.errors.config.editor_not_available","type",this.configElementType)}
`:""} - ${this.hasError?ut` + ${this.hasError?N`
${this.hass.localize("ui.errors.config.error_detected")}:
    - ${this._errors.map((t=>ut`
  • ${t}
  • `))} + ${this._errors.map((t=>N`
  • ${t}
  • `))}
`:""} - ${this.hasWarning?ut` + ${this.hasWarning?N` - ${this._warnings.length>0&&void 0!==this._warnings[0]?ut` + ${this._warnings.length>0&&void 0!==this._warnings[0]?N`
    - ${this._warnings.map((t=>ut`
  • ${t}
  • `))} + ${this._warnings.map((t=>N`
  • ${t}
  • `))}
`:void 0} ${this.hass.localize("ui.errors.config.edit_in_yaml_supported")}
`:""}
- `}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;if(!this.value)return;let e;try{if(this._errors=void 0,this._warnings=void 0,this._configElementType!==this.configElementType){if(this._guiSupported=void 0,this._configElement=void 0,!this.configElementType)throw new Error(this.hass.localize("ui.errors.config.no_type_provided"));this._configElementType=this.configElementType,this._loading=!0,e=await this.getConfigElement(),e&&(e.hass=this.hass,"lovelace"in e&&(e.lovelace=this.lovelace),e.addEventListener("config-changed",(t=>this._handleUIConfigChanged(t))),this._configElement=e,this._guiSupported=!0)}if(this._configElement)try{this._configElement.setConfig(this.value)}catch(t){const e=((t,e)=>{if(!(e instanceof To))return{warnings:[e.message],errors:void 0};const i=[],n=[];for(const o of e.failures())if(void 0===o.value)i.push(t.localize("ui.errors.config.key_missing","key",o.path.join(".")));else if("never"===o.type)n.push(t.localize("ui.errors.config.key_not_expected","key",o.path.join(".")));else{if("union"===o.type)continue;"enums"===o.type?n.push(t.localize("ui.errors.config.key_wrong_type","key",o.path.join("."),"type_correct",o.message.replace("Expected ","").split(", ")[0],"type_wrong",JSON.stringify(o.value))):n.push(t.localize("ui.errors.config.key_wrong_type","key",o.path.join("."),"type_correct",o.refinement||o.type,"type_wrong",JSON.stringify(o.value)))}return{warnings:n,errors:i}})(this.hass,t);throw new cd("Config is not supported",e.warnings,e.errors)}else this.GUImode=!1}catch(e){e instanceof cd?(this._warnings=null!==(t=e.warnings)&&void 0!==t?t:[e.message],this._errors=e.errors||void 0):this._errors=[e.message],this.GUImode=!1}finally{this._loading=!1}}_ignoreKeydown(t){t.stopPropagation()}static get styles(){return N` + `}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;if(!this.value)return;let e;try{if(this._errors=void 0,this._warnings=void 0,this._configElementType!==this.configElementType){if(this._guiSupported=void 0,this._configElement=void 0,!this.configElementType)throw new Error(this.hass.localize("ui.errors.config.no_type_provided"));this._configElementType=this.configElementType,this._loading=!0,e=await this.getConfigElement(),e&&(e.hass=this.hass,"lovelace"in e&&(e.lovelace=this.lovelace),e.addEventListener("config-changed",(t=>this._handleUIConfigChanged(t))),this._configElement=e,this._guiSupported=!0)}if(this._configElement)try{this._configElement.setConfig(this.value)}catch(t){const e=((t,e)=>{if(!(e instanceof Yt))return{warnings:[e.message],errors:void 0};const i=[],n=[];for(const o of e.failures())if(void 0===o.value)i.push(t.localize("ui.errors.config.key_missing","key",o.path.join(".")));else if("never"===o.type)n.push(t.localize("ui.errors.config.key_not_expected","key",o.path.join(".")));else{if("union"===o.type)continue;"enums"===o.type?n.push(t.localize("ui.errors.config.key_wrong_type","key",o.path.join("."),"type_correct",o.message.replace("Expected ","").split(", ")[0],"type_wrong",JSON.stringify(o.value))):n.push(t.localize("ui.errors.config.key_wrong_type","key",o.path.join("."),"type_correct",o.refinement||o.type,"type_wrong",JSON.stringify(o.value)))}return{warnings:n,errors:i}})(this.hass,t);throw new Dh("Config is not supported",e.warnings,e.errors)}else this.GUImode=!1}catch(e){e instanceof Dh?(this._warnings=null!==(t=e.warnings)&&void 0!==t?t:[e.message],this._errors=e.errors||void 0):this._errors=[e.message],this.GUImode=!1}finally{this._loading=!1}}_ignoreKeydown(t){t.stopPropagation()}static get styles(){return d` :host { display: flex; } @@ -2674,7 +3181,7 @@ const fs={},gs=qt(class extends Wt{constructor(t){if(super(t),t.type!==Yt&&t.typ display: block; margin: auto; } - `}}n([zt({attribute:!1})],dd.prototype,"hass",void 0),n([zt({attribute:!1})],dd.prototype,"lovelace",void 0),n([jt()],dd.prototype,"_yaml",void 0),n([jt()],dd.prototype,"_config",void 0),n([jt()],dd.prototype,"_configElement",void 0),n([jt()],dd.prototype,"_configElementType",void 0),n([jt()],dd.prototype,"_guiMode",void 0),n([jt()],dd.prototype,"_errors",void 0),n([jt()],dd.prototype,"_warnings",void 0),n([jt()],dd.prototype,"_guiSupported",void 0),n([jt()],dd.prototype,"_loading",void 0),n([Pt("ha-code-editor")],dd.prototype,"_yamlEditor",void 0);let ud=class extends dd{get configElementType(){var t;return null===(t=this.value)||void 0===t?void 0:t.type}async getConfigElement(){const t=await hd(this.configElementType);if(t&&t.getConfigElement)return t.getConfigElement()}};ud=n([Dt("mushroom-chip-element-editor")],ud);const hd=t=>customElements.get(cr(t)),md=["action","alarm-control-panel","back","conditional","entity","light","menu","template","weather"];let pd=class extends Ot{constructor(){super(...arguments),this._GUImode=!0,this._guiModeAvailable=!0,this._cardTab=!1}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 ut``;const e=we(this.hass),i=g(this.hass);return ut` + `}}n([st({attribute:!1})],jh.prototype,"hass",void 0),n([st({attribute:!1})],jh.prototype,"lovelace",void 0),n([ct()],jh.prototype,"_yaml",void 0),n([ct()],jh.prototype,"_config",void 0),n([ct()],jh.prototype,"_configElement",void 0),n([ct()],jh.prototype,"_configElementType",void 0),n([ct()],jh.prototype,"_guiMode",void 0),n([ct()],jh.prototype,"_errors",void 0),n([ct()],jh.prototype,"_warnings",void 0),n([ct()],jh.prototype,"_guiSupported",void 0),n([ct()],jh.prototype,"_loading",void 0),n([ht("ha-code-editor")],jh.prototype,"_yamlEditor",void 0);let Ph=class extends jh{get configElementType(){var t;return null===(t=this.value)||void 0===t?void 0:t.type}async getConfigElement(){const t=await Nh(this.configElementType);if(t&&t.getConfigElement)return t.getConfigElement()}};Ph=n([at("mushroom-chip-element-editor")],Ph);const Nh=t=>customElements.get($l(t)),Vh=["action","alarm-control-panel","back","conditional","entity","light","menu","template","weather"];let Rh=class extends ot{constructor(){super(...arguments),this._GUImode=!0,this._guiModeAvailable=!0,this._cardTab=!1}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 N``;const e=Hi(this.hass),i=pe(this.hass);return N` - ${this._cardTab?ut` + ${this._cardTab?N`
- ${void 0!==(null===(t=this._config.chip)||void 0===t?void 0:t.type)?ut` + ${void 0!==(null===(t=this._config.chip)||void 0===t?void 0:t.type)?N`
- `:ut` + `:N` - ${md.map((t=>ut` + ${Vh.map((t=>N` ${e(`editor.chip.chip-picker.types.${t}`)} @@ -2722,10 +3229,10 @@ const fs={},gs=qt(class extends Wt{constructor(t){if(super(t),t.type!==Yt&&t.typ `}
- `:ut` + `:N`
${this.hass.localize("ui.panel.lovelace.editor.card.conditional.condition_explanation")} - ${this._config.conditions.map(((t,e)=>{var n;return ut` + ${this._config.conditions.map(((t,e)=>{var n;return N`
`} - `}_selectTab(t){this._cardTab=1===t.detail.index}_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){const e=t.target.value;if(""===e)return;let i;const n=hd(e);i=n&&n.getStubConfig?await n.getStubConfig(this.hass):{type:e},t.target.value="",t.stopPropagation(),this._config&&(this._setMode(!0),this._guiModeAvailable=!0,this._config=Object.assign(Object.assign({},this._config),{chip:i}),w(this,"config-changed",{config:this._config}))}_handleChipChanged(t){t.stopPropagation(),this._config&&(this._config=Object.assign(Object.assign({},this._config),{chip:t.detail.config}),this._guiModeAvailable=t.detail.guiModeAvailable,w(this,"config-changed",{config:this._config}))}_handleReplaceChip(){this._config&&(this._config=Object.assign(Object.assign({},this._config),{chip:void 0}),w(this,"config-changed",{config:this._config}))}_addCondition(t){const e=t.target;if(""===e.value||!this._config)return;const i=[...this._config.conditions];i.push({entity:e.value,state:""}),this._config=Object.assign(Object.assign({},this._config),{conditions:i}),e.value="",w(this,"config-changed",{config:this._config})}_changeCondition(t){const e=t.target;if(!this._config||!e)return;const i=[...this._config.conditions];if("entity"!==e.configValue||e.value){const t=Object.assign({},i[e.idx]);"entity"===e.configValue?t.entity=e.value:"state"===e.configValue?void 0!==t.state_not?t.state_not=e.value:t.state=e.value:"invert"===e.configValue&&("true"===e.value?t.state&&(t.state_not=t.state,delete t.state):t.state_not&&(t.state=t.state_not,delete t.state_not)),i[e.idx]=t}else i.splice(e.idx,1);this._config=Object.assign(Object.assign({},this._config),{conditions:i}),w(this,"config-changed",{config:this._config})}static get styles(){return[Va,N` - mwc-tab-bar { - border-bottom: 1px solid var(--divider-color); - } - .conditions { - margin-top: 8px; - } + `}_selectTab(t){this._cardTab=1===t.detail.index}_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){const e=t.target.value;if(""===e)return;let i;const n=Nh(e);i=n&&n.getStubConfig?await n.getStubConfig(this.hass):{type:e},t.target.value="",t.stopPropagation(),this._config&&(this._setMode(!0),this._guiModeAvailable=!0,this._config=Object.assign(Object.assign({},this._config),{chip:i}),At(this,"config-changed",{config:this._config}))}_handleChipChanged(t){t.stopPropagation(),this._config&&(this._config=Object.assign(Object.assign({},this._config),{chip:t.detail.config}),this._guiModeAvailable=t.detail.guiModeAvailable,At(this,"config-changed",{config:this._config}))}_handleReplaceChip(){this._config&&(this._config=Object.assign(Object.assign({},this._config),{chip:void 0}),At(this,"config-changed",{config:this._config}))}_addCondition(t){const e=t.target;if(""===e.value||!this._config)return;const i=[...this._config.conditions];i.push({entity:e.value,state:""}),this._config=Object.assign(Object.assign({},this._config),{conditions:i}),e.value="",At(this,"config-changed",{config:this._config})}_changeCondition(t){const e=t.target;if(!this._config||!e)return;const i=[...this._config.conditions];if("entity"!==e.configValue||e.value){const t=Object.assign({},i[e.idx]);"entity"===e.configValue?t.entity=e.value:"state"===e.configValue?void 0!==t.state_not?t.state_not=e.value:t.state=e.value:"invert"===e.configValue&&("true"===e.value?t.state&&(t.state_not=t.state,delete t.state):t.state_not&&(t.state=t.state_not,delete t.state_not)),i[e.idx]=t}else i.splice(e.idx,1);this._config=Object.assign(Object.assign({},this._config),{conditions:i}),At(this,"config-changed",{config:this._config})}static get styles(){return d` + mwc-tab-bar { + border-bottom: 1px solid var(--divider-color); + } + .conditions { + margin-top: 8px; + } + .condition { + margin-top: 8px; + border: 1px solid var(--divider-color); + padding: 12px; + } + .condition .state { + display: flex; + align-items: flex-end; + } + .condition .state mushroom-select { + margin-right: 16px; + } + .condition[rtl] .state mushroom-select { + margin-right: initial; + margin-left: 16px; + } + .card { + margin-top: 8px; + border: 1px solid var(--divider-color); + padding: 12px; + } + .card mushroom-select { + width: 100%; + margin-top: 0px; + } + @media (max-width: 450px) { + .card, .condition { - margin-top: 8px; - border: 1px solid var(--divider-color); - padding: 12px; - } - .condition .state { - display: flex; - align-items: flex-end; - } - .condition .state mushroom-select { - margin-right: 16px; - } - .condition[rtl] .state mushroom-select { - margin-right: initial; - margin-left: 16px; - } - .card { - margin-top: 8px; - border: 1px solid var(--divider-color); - padding: 12px; - } - .card mushroom-select { - width: 100%; - margin-top: 0px; - } - @media (max-width: 450px) { - .card, - .condition { - margin: 8px -12px 0; - } - } - .card .card-options { - display: flex; - justify-content: flex-end; - width: 100%; - } - .gui-mode-button { - margin-right: auto; + margin: 8px -12px 0; } - `]}};n([zt({attribute:!1})],pd.prototype,"hass",void 0),n([zt({attribute:!1})],pd.prototype,"lovelace",void 0),n([jt()],pd.prototype,"_config",void 0),n([jt()],pd.prototype,"_GUImode",void 0),n([jt()],pd.prototype,"_guiModeAvailable",void 0),n([jt()],pd.prototype,"_cardTab",void 0),n([Pt("mushroom-chip-element-editor")],pd.prototype,"_cardEditorEl",void 0),pd=n([Dt(dr("conditional"))],pd);var fd=Object.freeze({__proto__:null,get ConditionalChipEditor(){return pd}});const gd=Po(Ba,Xo({entity:qo(Wo()),icon:qo(Wo()),name:qo(Wo()),layout:qo(Zo),hide_state:qo(Uo()),show_brightness_control:qo(Uo()),show_color_temp_control:qo(Uo()),show_color_control:qo(Uo()),use_light_color:qo(Uo()),tap_action:qo(Za),hold_action:qo(Za),double_tap_action:qo(Za)})),_d=["show_brightness_control","use_light_color","show_color_temp_control","show_color_control"],bd=Fa((t=>[{name:"entity",selector:{entity:{domain:ea}}},{name:"name",selector:{text:{}}},{type:"grid",name:"",schema:[{name:"icon",selector:{icon:{placeholder:t}}}]},{type:"grid",name:"",schema:[{name:"layout",selector:{"mush-layout":{}}},{name:"hide_state",selector:{boolean:{}}}]},{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:"tap_action",selector:{"mush-action":{}}},{name:"hold_action",selector:{"mush-action":{}}},{name:"double_tap_action",selector:{"mush-action":{}}}]));let vd=class extends Ot{constructor(){super(...arguments),this._computeLabelCallback=t=>{const e=we(this.hass);return Ua.includes(t.name)?e(`editor.card.generic.${t.name}`):_d.includes(t.name)?e(`editor.card.light.${t.name}`):this.hass.localize(`ui.panel.lovelace.editor.card.generic.${t.name}`)}}connectedCallback(){super.connectedCallback(),Ha()}setConfig(t){No(t,gd),this._config=t}render(){if(!this.hass||!this._config)return ut``;const t=this._config.entity?this.hass.states[this._config.entity]:void 0,e=t?Io(t):void 0,i=this._config.icon||e,n=bd(i);return ut` + } + .card .card-options { + display: flex; + justify-content: flex-end; + width: 100%; + } + .gui-mode-button { + margin-right: auto; + } + `}};n([st({attribute:!1})],Rh.prototype,"hass",void 0),n([st({attribute:!1})],Rh.prototype,"lovelace",void 0),n([ct()],Rh.prototype,"_config",void 0),n([ct()],Rh.prototype,"_GUImode",void 0),n([ct()],Rh.prototype,"_guiModeAvailable",void 0),n([ct()],Rh.prototype,"_cardTab",void 0),n([ht("mushroom-chip-element-editor")],Rh.prototype,"_cardEditorEl",void 0),Rh=n([at(El("conditional"))],Rh);var Fh=Object.freeze({__proto__:null,get ConditionalChipEditor(){return Rh}});const Bh=te(xc,te(yc,gc,pc),ce({show_brightness_control:de(re()),show_color_temp_control:de(re()),show_color_control:de(re()),collapsible_controls:de(re()),use_light_color:de(re())})),Uh=["show_brightness_control","use_light_color","show_color_temp_control","show_color_control"],Hh=_t(((t,e)=>[{name:"entity",selector:{entity:{domain:Ts}}},{name:"name",selector:{text:{}}},{name:"icon",selector:{icon:{placeholder:e}}},..._c,{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:{}}}]},...fc(t)]));let Yh=class extends ol{constructor(){super(...arguments),this._computeLabel=t=>{const e=Hi(this.hass);return vc.includes(t.name)?e(`editor.card.generic.${t.name}`):Uh.includes(t.name)?e(`editor.card.light.${t.name}`):this.hass.localize(`ui.panel.lovelace.editor.card.generic.${t.name}`)}}connectedCallback(){super.connectedCallback(),bc(this.hass.connection.haVersion)}setConfig(t){Jt(t,Bh),this._config=t}render(){if(!this.hass||!this._config)return N``;const t=this._config.entity?this.hass.states[this._config.entity]:void 0,e=t?pl(t):void 0,i=this._config.icon||e,n=Hh(this.hass.connection.haVersion,i);return N` - `}_valueChanged(t){w(this,"config-changed",{config:t.detail.value})}static get styles(){return[Va]}};n([zt({attribute:!1})],vd.prototype,"hass",void 0),n([jt()],vd.prototype,"_config",void 0),vd=n([Dt("mushroom-light-card-editor")],vd);var yd=Object.freeze({__proto__:null,LIGHT_FIELDS:_d,get LightCardEditor(){return vd}});const xd=Fa((t=>[{name:"entity",selector:{entity:{domain:ea}}},{type:"grid",name:"",schema:[{name:"name",selector:{text:{}}},{name:"content_info",selector:{"mush-info":{}}}]},{type:"grid",name:"",schema:[{name:"icon",selector:{icon:{placeholder:t}}},{name:"use_light_color",selector:{boolean:{}}}]},{name:"tap_action",selector:{"mush-action":{}}},{name:"hold_action",selector:{"mush-action":{}}},{name:"double_tap_action",selector:{"mush-action":{}}}]));let wd=class extends Ot{constructor(){super(...arguments),this._computeLabelCallback=t=>{const e=we(this.hass);return Ua.includes(t.name)?e(`editor.card.generic.${t.name}`):_d.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 ut``;const t=this._config.entity?this.hass.states[this._config.entity]:void 0,e=t?Io(t):void 0,i=this._config.icon||e,n=xd(i);return ut` + `}_valueChanged(t){At(this,"config-changed",{config:t.detail.value})}};n([ct()],Yh.prototype,"_config",void 0),Yh=n([at("mushroom-light-card-editor")],Yh);var Xh=Object.freeze({__proto__:null,LIGHT_LABELS:Uh,get LightCardEditor(){return Yh}});const Wh=_t(((t,e)=>[{name:"entity",selector:{entity:{domain:Ts}}},{type:"grid",name:"",schema:[{name:"name",selector:{text:{}}},{name:"content_info",selector:{"mush-info":{}}}]},{type:"grid",name:"",schema:[{name:"icon",selector:{icon:{placeholder:e}}},{name:"use_light_color",selector:{boolean:{}}}]},...fc(t)]));let qh=class extends ot{constructor(){super(...arguments),this._computeLabel=t=>{const e=Hi(this.hass);return vc.includes(t.name)?e(`editor.card.generic.${t.name}`):Uh.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 N``;const t=this._config.entity?this.hass.states[this._config.entity]:void 0,e=t?pl(t):void 0,i=this._config.icon||e,n=Wh(this.hass.connection.haVersion,i);return N` - `}_valueChanged(t){w(this,"config-changed",{config:t.detail.value})}static get styles(){return[Va]}};n([zt({attribute:!1})],wd.prototype,"hass",void 0),n([jt()],wd.prototype,"_config",void 0),wd=n([Dt(dr("light"))],wd);var Cd=Object.freeze({__proto__:null,get LightChipEditor(){return wd}});const kd=["more-info","navigate","url","call-service","none"],$d=Fa((t=>[{name:"entity",selector:{entity:{domain:Qo}}},{type:"grid",name:"",schema:[{name:"name",selector:{text:{}}},{name:"content_info",selector:{"mush-info":{}}}]},{name:"icon",selector:{icon:{placeholder:t}}},{name:"tap_action",selector:{"mush-action":{actions:kd}}},{name:"hold_action",selector:{"mush-action":{actions:kd}}},{name:"double_tap_action",selector:{"mush-action":{actions:kd}}}]));let Ed=class extends Ot{constructor(){super(...arguments),this._computeLabelCallback=t=>{const e=we(this.hass);return Ua.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 ut``;const t=this._config.entity?this.hass.states[this._config.entity]:void 0,e=t?Io(t):void 0,i=this._config.icon||e,n=$d(i);return ut` + `}_valueChanged(t){At(this,"config-changed",{config:t.detail.value})}};n([st({attribute:!1})],qh.prototype,"hass",void 0),n([ct()],qh.prototype,"_config",void 0),qh=n([at(El("light"))],qh);var Kh=Object.freeze({__proto__:null,get LightChipEditor(){return qh}});const Gh=["more-info","navigate","url","call-service","none"],Zh=_t(((t,e)=>[{name:"entity",selector:{entity:{domain:fl}}},{type:"grid",name:"",schema:[{name:"name",selector:{text:{}}},{name:"content_info",selector:{"mush-info":{}}}]},{name:"icon",selector:{icon:{placeholder:e}}},...fc(t,Gh)]));let Jh=class extends ot{constructor(){super(...arguments),this._computeLabel=t=>{const e=Hi(this.hass);return vc.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 N``;const t=this._config.entity?this.hass.states[this._config.entity]:void 0,e=t?pl(t):void 0,i=this._config.icon||e,n=Zh(this.hass.connection.haVersion,i);return N` - `}_valueChanged(t){w(this,"config-changed",{config:t.detail.value})}static get styles(){return Va}};n([zt({attribute:!1})],Ed.prototype,"hass",void 0),n([jt()],Ed.prototype,"_config",void 0),Ed=n([Dt(dr("alarm-control-panel"))],Ed);var Ad=Object.freeze({__proto__:null,get AlarmControlPanelChipEditor(){return Ed}});let Sd=class extends Ot{constructor(){super(...arguments),this._guiModeAvailable=!0,this._guiMode=!0}render(){const t=we(this.hass);return ut` + `}_valueChanged(t){At(this,"config-changed",{config:t.detail.value})}};n([st({attribute:!1})],Jh.prototype,"hass",void 0),n([ct()],Jh.prototype,"_config",void 0),Jh=n([at(El("alarm-control-panel"))],Jh);var Qh=Object.freeze({__proto__:null,get AlarmControlPanelChipEditor(){return Jh}});let tm=class extends ot{constructor(){super(...arguments),this._guiModeAvailable=!0,this._guiMode=!0}render(){const t=Hi(this.hass);return N`
- ${"chip"===this.config.type?ut` + ${"chip"===this.config.type?N` `:""} - `}_goBack(){w(this,"go-back")}_toggleMode(){var t;null===(t=this._editorElement)||void 0===t||t.toggleMode()}_handleGUIModeChanged(t){t.stopPropagation(),this._guiMode=t.detail.guiMode,this._guiModeAvailable=t.detail.guiModeAvailable}_handleConfigChanged(t){this._guiModeAvailable=t.detail.guiModeAvailable}static get styles(){return N` + `}_goBack(){At(this,"go-back")}_toggleMode(){var t;null===(t=this._editorElement)||void 0===t||t.toggleMode()}_handleGUIModeChanged(t){t.stopPropagation(),this._guiMode=t.detail.guiMode,this._guiModeAvailable=t.detail.guiModeAvailable}_handleConfigChanged(t){this._guiModeAvailable=t.detail.guiModeAvailable}static get styles(){return d` .header { display: flex; justify-content: space-between; @@ -2889,132 +3396,28 @@ const fs={},gs=qt(class extends Wt{constructor(t){if(super(t),t.type!==Yt&&t.typ align-items: center; justify-content: center; } - `}};n([zt({attribute:!1})],Sd.prototype,"config",void 0),n([jt()],Sd.prototype,"_guiModeAvailable",void 0),n([jt()],Sd.prototype,"_guiMode",void 0),n([Pt(".editor")],Sd.prototype,"_editorElement",void 0),Sd=n([Dt("mushroom-sub-element-editor")],Sd); + `}};n([st({attribute:!1})],tm.prototype,"config",void 0),n([ct()],tm.prototype,"_guiModeAvailable",void 0),n([ct()],tm.prototype,"_guiMode",void 0),n([ht(".editor")],tm.prototype,"_editorElement",void 0),tm=n([at("mushroom-sub-element-editor")],tm); /** * @license * Copyright 2018 Google LLC * SPDX-License-Identifier: BSD-3-Clause */ -const Id={},Td=qt(class extends Wt{constructor(){super(...arguments),this.nt=Id}render(t,e){return e()}update(t,[e,i]){if(Array.isArray(e)){if(Array.isArray(this.nt)&&this.nt.length===e.length&&e.every(((t,e)=>t===this.nt[e])))return mt}else if(this.nt===e)return mt;return this.nt=Array.isArray(e)?Array.from(e):e,this.render(e,i)}}),Od=N` - #sortable a:nth-of-type(2n) paper-icon-item { - animation-name: keyframes1; - animation-iteration-count: infinite; - transform-origin: 50% 10%; - animation-delay: -0.75s; - animation-duration: 0.25s; - } - - #sortable a:nth-of-type(2n-1) paper-icon-item { - animation-name: keyframes2; - animation-iteration-count: infinite; - animation-direction: alternate; - transform-origin: 30% 5%; - animation-delay: -0.5s; - animation-duration: 0.33s; - } - - #sortable a { - height: 48px; - display: flex; - } - - #sortable { - outline: none; - display: block !important; - } - - .hidden-panel { - display: flex !important; - } - - .sortable-fallback { - display: none; - } - - .sortable-ghost { - opacity: 0.4; - } - - .sortable-fallback { - opacity: 0; - } - - @keyframes keyframes1 { - 0% { - transform: rotate(-1deg); - animation-timing-function: ease-in; - } - - 50% { - transform: rotate(1.5deg); - animation-timing-function: ease-out; - } - } - - @keyframes keyframes2 { - 0% { - transform: rotate(1deg); - animation-timing-function: ease-in; - } - - 50% { - transform: rotate(-1.5deg); - animation-timing-function: ease-out; - } - } - - .show-panel, - .hide-panel { - display: none; - position: absolute; - top: 0; - right: 4px; - --mdc-icon-button-size: 40px; - } - - :host([rtl]) .show-panel { - right: initial; - left: 4px; - } - - .hide-panel { - top: 4px; - right: 8px; - } - - :host([rtl]) .hide-panel { - right: initial; - left: 8px; - } - - :host([expanded]) .hide-panel { - display: block; - } - - :host([expanded]) .show-panel { - display: inline-flex; - } - - paper-icon-item.hidden-panel, - paper-icon-item.hidden-panel span, - paper-icon-item.hidden-panel ha-icon[slot="item-icon"] { - color: var(--secondary-text-color); - cursor: pointer; - } -`;let Md,Dd=class extends Ot{constructor(){super(...arguments),this._attached=!1,this._renderEmptySortable=!1}connectedCallback(){super.connectedCallback(),this._attached=!0}disconnectedCallback(){super.disconnectedCallback(),this._attached=!1}render(){if(!this.chips||!this.hass)return ut``;const t=we(this.hass);return ut` +const em={},im=Ae(class extends Se{constructor(){super(...arguments),this.nt=em}render(t,e){return e()}update(t,[e,i]){if(Array.isArray(e)){if(Array.isArray(this.nt)&&this.nt.length===e.length&&e.every(((t,e)=>t===this.nt[e])))return R}else if(this.nt===e)return R;return this.nt=Array.isArray(e)?Array.from(e):e,this.render(e,i)}});let nm,om=class extends ol{constructor(){super(...arguments),this._attached=!1,this._renderEmptySortable=!1}connectedCallback(){super.connectedCallback(),this._attached=!0}disconnectedCallback(){super.disconnectedCallback(),this._attached=!1}render(){if(!this.chips||!this.hass)return N``;const t=Hi(this.hass);return N`

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

- ${Td([this.chips,this._renderEmptySortable],(()=>this._renderEmptySortable?"":this.chips.map(((e,i)=>ut` + ${im([this.chips,this._renderEmptySortable],(()=>this._renderEmptySortable?"":this.chips.map(((e,i)=>N`
- - ${ut` +
+ +
+ ${N`
- ${this._renderChipLabel(e)} + ${this._renderChipLabel(e)} ${t("editor.chip.chip-picker.details")}${this._renderChipSecondary(e)}
@@ -3045,13 +3448,13 @@ const Id={},Td=qt(class extends Wt{constructor(){super(...arguments),this.nt=Id} fixedMenuPosition naturalMenuWidth > - ${md.map((e=>ut` + ${Vh.map((e=>N` ${t(`editor.chip.chip-picker.types.${e}`)} `))} - `}updated(t){var e;super.updated(t);const i=t.has("_attached"),n=t.has("chips");if(n||i)return i&&!this._attached?(null===(e=this._sortable)||void 0===e||e.destroy(),void(this._sortable=void 0)):void(this._sortable||!this.chips?n&&this._handleChipsChanged():this._createSortable())}async _handleChipsChanged(){this._renderEmptySortable=!0,await this.updateComplete;const t=this.shadowRoot.querySelector(".chips");for(;t.lastElementChild;)t.removeChild(t.lastElementChild);this._renderEmptySortable=!1}async _createSortable(){if(!Md){const t=await Promise.resolve().then((function(){return sp}));Md=t.Sortable,Md.mount(t.OnSpill),Md.mount(t.AutoScroll())}this._sortable=new Md(this.shadowRoot.querySelector(".chips"),{animation:150,fallbackClass:"sortable-fallback",handle:".handle",onEnd:async t=>this._chipMoved(t)})}async _addChips(t){const e=t.target,i=e.value;if(""===i)return;let n;const o=hd(i);n=o&&o.getStubConfig?await o.getStubConfig(this.hass):{type:i};const r=this.chips.concat(n);e.value="",w(this,"chips-changed",{chips:r})}_chipMoved(t){if(t.oldIndex===t.newIndex)return;const e=this.chips.concat();e.splice(t.newIndex,0,e.splice(t.oldIndex,1)[0]),w(this,"chips-changed",{chips:e})}_removeChip(t){const e=t.currentTarget.index,i=this.chips.concat();i.splice(e,1),w(this,"chips-changed",{chips:i})}_editChip(t){const e=t.currentTarget.index;w(this,"edit-detail-element",{subElementConfig:{index:e,type:"chip",elementConfig:this.chips[e]}})}_renderChipLabel(t){let e=we(this.hass)(`editor.chip.chip-picker.types.${t.type}`);return"entity"in t&&t.entity&&(e+=` - ${t.entity}`),e}static get styles(){return[Od,N` + `}updated(t){var e;super.updated(t);const i=t.has("_attached"),n=t.has("chips");if(n||i)return i&&!this._attached?(null===(e=this._sortable)||void 0===e||e.destroy(),void(this._sortable=void 0)):void(this._sortable||!this.chips?n&&this._handleChipsChanged():this._createSortable())}async _handleChipsChanged(){this._renderEmptySortable=!0,await this.updateComplete;const t=this.shadowRoot.querySelector(".chips");for(;t.lastElementChild;)t.removeChild(t.lastElementChild);this._renderEmptySortable=!1}async _createSortable(){if(!nm){const t=await Promise.resolve().then((function(){return Hg}));nm=t.Sortable,nm.mount(t.OnSpill),nm.mount(t.AutoScroll())}this._sortable=new nm(this.shadowRoot.querySelector(".chips"),{animation:150,fallbackClass:"sortable-fallback",handle:".handle",onEnd:async t=>this._chipMoved(t)})}async _addChips(t){const e=t.target,i=e.value;if(""===i)return;let n;const o=Nh(i);n=o&&o.getStubConfig?await o.getStubConfig(this.hass):{type:i};const r=this.chips.concat(n);e.value="",At(this,"chips-changed",{chips:r})}_chipMoved(t){if(t.oldIndex===t.newIndex)return;const e=this.chips.concat();e.splice(t.newIndex,0,e.splice(t.oldIndex,1)[0]),At(this,"chips-changed",{chips:e})}_removeChip(t){const e=t.currentTarget.index,i=this.chips.concat();i.splice(e,1),At(this,"chips-changed",{chips:i})}_editChip(t){const e=t.currentTarget.index;At(this,"edit-detail-element",{subElementConfig:{index:e,type:"chip",elementConfig:this.chips[e]}})}_renderChipLabel(t){var e;let i=Hi(this.hass)(`editor.chip.chip-picker.types.${t.type}`);if("conditional"===t.type&&t.conditions.length>0){const n=t.conditions[0];i+=` - ${null!==(e=this.getEntityName(n.entity))&&void 0!==e?e:n.entity} ${n.state?`= ${n.state}`:n.state_not?`≠ ${n.state_not}`:null}`}return i}_renderChipSecondary(t){var e;const i=Hi(this.hass);if("entity"in t&&t.entity)return`${null!==(e=this.getEntityName(t.entity))&&void 0!==e?e:t.entity}`;if("chip"in t&&t.chip){const e=i(`editor.chip.chip-picker.types.${t.chip.type}`);return`${this._renderChipSecondary(t.chip)} (via ${e})`}}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,Ue,d` .chip { display: flex; align-items: center; @@ -3070,6 +3473,10 @@ const Id={},Td=qt(class extends Wt{constructor(){super(...arguments),this.nt=Id} cursor: move; } + .chip .handle > * { + pointer-events: none; + } + .special-row { height: 60px; font-size: 16px; @@ -3094,7 +3501,7 @@ const Id={},Td=qt(class extends Wt{constructor(){super(...arguments),this.nt=Id} font-size: 12px; color: var(--secondary-text-color); } - `]}};n([zt({attribute:!1})],Dd.prototype,"hass",void 0),n([zt({attribute:!1})],Dd.prototype,"chips",void 0),n([zt()],Dd.prototype,"label",void 0),n([jt()],Dd.prototype,"_attached",void 0),n([jt()],Dd.prototype,"_renderEmptySortable",void 0),Dd=n([Dt("mushroom-chips-card-chips-editor")],Dd);const Ld=Xo({type:Yo("action"),icon:qo(Wo()),icon_color:qo(Wo()),tap_action:qo(Za),hold_action:qo(Za),double_tap_action:qo(Za)}),zd=Xo({type:Yo("back"),icon:qo(Wo()),icon_color:qo(Wo())}),jd=Xo({type:Yo("entity"),entity:qo(Wo()),name:qo(Wo()),content_info:qo(Wo()),icon:qo(Wo()),icon_color:qo(Wo()),use_entity_picture:qo(Uo()),tap_action:qo(Za),hold_action:qo(Za),double_tap_action:qo(Za)}),Nd=Xo({type:Yo("menu"),icon:qo(Wo()),icon_color:qo(Wo())}),Rd=Xo({type:Yo("weather"),entity:qo(Wo()),tap_action:qo(Za),hold_action:qo(Za),double_tap_action:qo(Za),show_temperature:qo(Uo()),show_conditions:qo(Uo())}),Pd=Xo({entity:Wo(),state:qo(Wo()),state_not:qo(Wo())}),Fd=Xo({type:Yo("conditional"),chip:qo(Vo()),conditions:qo(Bo(Pd))}),Vd=Xo({type:Yo("light"),entity:qo(Wo()),name:qo(Wo()),content_info:qo(Wo()),icon:qo(Wo()),use_light_color:qo(Uo()),tap_action:qo(Za),hold_action:qo(Za),double_tap_action:qo(Za)}),Bd=Xo({type:Yo("template"),entity:qo(Wo()),tap_action:qo(Za),hold_action:qo(Za),double_tap_action:qo(Za),content:qo(Wo()),icon:qo(Wo()),icon_color:qo(Wo()),entity_id:qo(Ko([Wo(),Bo(Wo())]))}),Ud=function(t){return new jo({type:"dynamic",schema:null,*entries(e,i){const n=t(e,i);yield*n.entries(e,i)},validator:(e,i)=>t(e,i).validator(e,i),coercer:(e,i)=>t(e,i).coercer(e,i),refiner:(e,i)=>t(e,i).refiner(e,i)})}((t=>{if(t&&"object"==typeof t&&"type"in t)switch(t.type){case"action":return Ld;case"back":return zd;case"entity":return jd;case"menu":return Nd;case"weather":return Rd;case"conditional":return Fd;case"light":return Vd;case"template":return Bd}return Xo()})),Hd=Po(Ba,Xo({chips:Bo(Ud),alignment:qo(Wo())}));let Yd=class extends Ot{connectedCallback(){super.connectedCallback(),Ha()}setConfig(t){No(t,Hd),this._config=t}get _title(){return this._config.title||""}get _theme(){return this._config.theme||""}render(){if(!this.hass||!this._config)return ut``;if(this._subElementEditorConfig)return ut` + `]}};n([st({attribute:!1})],om.prototype,"chips",void 0),n([st()],om.prototype,"label",void 0),n([ct()],om.prototype,"_attached",void 0),n([ct()],om.prototype,"_renderEmptySortable",void 0),om=n([at("mushroom-chips-card-chips-editor")],om);const rm=ce({type:le("action"),icon:de(ue()),icon_color:de(ue()),tap_action:de(Be),hold_action:de(Be),double_tap_action:de(Be)}),am=ce({type:le("back"),icon:de(ue()),icon_color:de(ue())}),lm=ce({type:le("entity"),entity:de(ue()),name:de(ue()),content_info:de(ue()),icon:de(ue()),icon_color:de(ue()),use_entity_picture:de(re()),tap_action:de(Be),hold_action:de(Be),double_tap_action:de(Be)}),sm=ce({type:le("menu"),icon:de(ue()),icon_color:de(ue())}),cm=ce({type:le("weather"),entity:de(ue()),tap_action:de(Be),hold_action:de(Be),double_tap_action:de(Be),show_temperature:de(re()),show_conditions:de(re())}),dm=ce({entity:ue(),state:de(ue()),state_not:de(ue())}),um=ce({type:le("conditional"),chip:de(ne()),conditions:de(oe(dm))}),hm=ce({type:le("light"),entity:de(ue()),name:de(ue()),content_info:de(ue()),icon:de(ue()),use_light_color:de(re()),tap_action:de(Be),hold_action:de(Be),double_tap_action:de(Be)}),mm=ce({type:le("template"),entity:de(ue()),tap_action:de(Be),hold_action:de(Be),double_tap_action:de(Be),content:de(ue()),icon:de(ue()),icon_color:de(ue()),picture:de(ue()),entity_id:de(me([ue(),oe(ue())]))}),pm=ie((t=>{if(t&&"object"==typeof t&&"type"in t)switch(t.type){case"action":return rm;case"back":return am;case"entity":return lm;case"menu":return sm;case"weather":return cm;case"conditional":return um;case"light":return hm;case"template":return mm}return ce()})),fm=te(xc,ce({chips:oe(pm),alignment:de(ue())}));let gm=class extends ol{connectedCallback(){super.connectedCallback(),bc(this.hass.connection.haVersion)}setConfig(t){Jt(t,fm),this._config=t}get _title(){return this._config.title||""}get _theme(){return this._config.theme||""}render(){if(!this.hass||!this._config)return N``;if(this._subElementEditorConfig)return N` - `;const t=we(this.hass);return ut` + `;const t=Hi(this.hass);return N`
- `}_valueChanged(t){var e,i,n;if(!this._config||!this.hass)return;const o=t.target,r=o.configValue||(null===(e=this._subElementEditorConfig)||void 0===e?void 0:e.type),a=null!==(n=null!==(i=o.checked)&&void 0!==i?i:t.detail.value)&&void 0!==n?n:o.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=Object.assign(Object.assign({},this._config),{chips:e})}else r&&(a?this._config=Object.assign(Object.assign({},this._config),{[r]:a}):(this._config=Object.assign({},this._config),delete this._config[r]));w(this,"config-changed",{config:this._config})}_handleSubElementChanged(t){var e;if(t.stopPropagation(),!this._config||!this.hass)return;const i=null===(e=this._subElementEditorConfig)||void 0===e?void 0:e.type,n=t.detail.config;if("chip"===i){const t=this._config.chips.concat();n?t[this._subElementEditorConfig.index]=n:(t.splice(this._subElementEditorConfig.index,1),this._goBack()),this._config=Object.assign(Object.assign({},this._config),{chips:t})}else i&&(""===n?(this._config=Object.assign({},this._config),delete this._config[i]):this._config=Object.assign(Object.assign({},this._config),{[i]:n}));this._subElementEditorConfig=Object.assign(Object.assign({},this._subElementEditorConfig),{elementConfig:n}),w(this,"config-changed",{config:this._config})}_editDetailElement(t){this._subElementEditorConfig=t.detail.subElementConfig}_goBack(){this._subElementEditorConfig=void 0}};n([zt({attribute:!1})],Yd.prototype,"hass",void 0),n([jt()],Yd.prototype,"_config",void 0),n([jt()],Yd.prototype,"_subElementEditorConfig",void 0),Yd=n([Dt("mushroom-chips-card-editor")],Yd);var Xd=Object.freeze({__proto__:null,get ChipsCardEditor(){return Yd}});const qd=Po(Ba,Xo({entity:qo(Wo()),icon:qo(Wo()),name:qo(Wo()),layout:qo(Zo),hide_state:qo(Uo()),show_buttons_control:qo(Uo()),show_position_control:qo(Uo()),tap_action:qo(Za),hold_action:qo(Za),double_tap_action:qo(Za)})),Wd=["show_buttons_control","show_position_control"],Gd=Fa((t=>[{name:"entity",selector:{entity:{domain:Rr}}},{name:"name",selector:{text:{}}},{type:"grid",name:"",schema:[{name:"icon",selector:{icon:{placeholder:t}}}]},{type:"grid",name:"",schema:[{name:"layout",selector:{"mush-layout":{}}},{name:"hide_state",selector:{boolean:{}}}]},{type:"grid",name:"",schema:[{name:"show_position_control",selector:{boolean:{}}},{name:"show_buttons_control",selector:{boolean:{}}}]},{name:"tap_action",selector:{"mush-action":{}}},{name:"hold_action",selector:{"mush-action":{}}},{name:"double_tap_action",selector:{"mush-action":{}}}]));let Kd=class extends Ot{constructor(){super(...arguments),this._computeLabelCallback=t=>{const e=we(this.hass);return Ua.includes(t.name)?e(`editor.card.generic.${t.name}`):Wd.includes(t.name)?e(`editor.card.cover.${t.name}`):this.hass.localize(`ui.panel.lovelace.editor.card.generic.${t.name}`)}}connectedCallback(){super.connectedCallback(),Ha()}setConfig(t){No(t,qd),this._config=t}render(){if(!this.hass||!this._config)return ut``;const t=this._config.entity?this.hass.states[this._config.entity]:void 0,e=t?Io(t):void 0,i=this._config.icon||e,n=Gd(i);return ut` + `}_valueChanged(t){var e,i,n;if(!this._config||!this.hass)return;const o=t.target,r=o.configValue||(null===(e=this._subElementEditorConfig)||void 0===e?void 0:e.type),a=null!==(n=null!==(i=o.checked)&&void 0!==i?i:t.detail.value)&&void 0!==n?n:o.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=Object.assign(Object.assign({},this._config),{chips:e})}else r&&(a?this._config=Object.assign(Object.assign({},this._config),{[r]:a}):(this._config=Object.assign({},this._config),delete this._config[r]));At(this,"config-changed",{config:this._config})}_handleSubElementChanged(t){var e;if(t.stopPropagation(),!this._config||!this.hass)return;const i=null===(e=this._subElementEditorConfig)||void 0===e?void 0:e.type,n=t.detail.config;if("chip"===i){const t=this._config.chips.concat();n?t[this._subElementEditorConfig.index]=n:(t.splice(this._subElementEditorConfig.index,1),this._goBack()),this._config=Object.assign(Object.assign({},this._config),{chips:t})}else i&&(""===n?(this._config=Object.assign({},this._config),delete this._config[i]):this._config=Object.assign(Object.assign({},this._config),{[i]:n}));this._subElementEditorConfig=Object.assign(Object.assign({},this._subElementEditorConfig),{elementConfig:n}),At(this,"config-changed",{config:this._config})}_editDetailElement(t){this._subElementEditorConfig=t.detail.subElementConfig}_goBack(){this._subElementEditorConfig=void 0}};n([ct()],gm.prototype,"_config",void 0),n([ct()],gm.prototype,"_subElementEditorConfig",void 0),gm=n([at("mushroom-chips-card-editor")],gm);var _m=Object.freeze({__proto__:null,get ChipsCardEditor(){return gm}});const vm=["auto","heat_cool","heat","cool","dry","fan_only","off"],bm=te(xc,te(yc,gc,pc),ce({show_temperature_control:de(re()),hvac_modes:de(oe(ue())),collapsible_controls:de(re())})),ym=["hvac_modes","show_temperature_control"],xm=_t(((t,e,i)=>[{name:"entity",selector:{entity:{domain:Zl}}},{name:"name",selector:{text:{}}},{name:"icon",selector:{icon:{placeholder:i}}},..._c,{type:"grid",name:"",schema:[{name:"hvac_modes",selector:{select:{options:vm.map((e=>({value:e,label:t(`component.climate.state._.${e}`)}))),mode:"dropdown",multiple:!0}}},{name:"show_temperature_control",selector:{boolean:{}}},{name:"collapsible_controls",selector:{boolean:{}}}]},...fc(e)]));let wm=class extends ol{constructor(){super(...arguments),this._computeLabel=t=>{const e=Hi(this.hass);return vc.includes(t.name)?e(`editor.card.generic.${t.name}`):ym.includes(t.name)?e(`editor.card.climate.${t.name}`):this.hass.localize(`ui.panel.lovelace.editor.card.generic.${t.name}`)}}connectedCallback(){super.connectedCallback(),bc(this.hass.connection.haVersion)}setConfig(t){Jt(t,bm),this._config=t}render(){if(!this.hass||!this._config)return N``;const t=this._config.entity?this.hass.states[this._config.entity]:void 0,e=t?pl(t):void 0,i=this._config.icon||e,n=xm(this.hass.localize,this.hass.connection.haVersion,i);return N` - `}_valueChanged(t){w(this,"config-changed",{config:t.detail.value})}static get styles(){return[Va]}};n([zt({attribute:!1})],Kd.prototype,"hass",void 0),n([jt()],Kd.prototype,"_config",void 0),Kd=n([Dt("mushroom-cover-card-editor")],Kd);var Zd=Object.freeze({__proto__:null,get CoverCardEditor(){return Kd}});const Jd=Po(Ba,Xo({entity:qo(Wo()),icon:qo(Wo()),name:qo(Wo()),icon_color:qo(Wo()),use_entity_picture:qo(Uo()),hide_icon:qo(Uo()),layout:qo(Zo),primary_info:qo(Ho(Yn)),secondary_info:qo(Ho(Yn)),tap_action:qo(Za),hold_action:qo(Za),double_tap_action:qo(Za)})),Qd=Fa((t=>[{name:"entity",selector:{entity:{}}},{name:"name",selector:{text:{}}},{type:"grid",name:"",schema:[{name:"icon",selector:{icon:{placeholder:t}}},{name:"icon_color",selector:{"mush-color":{}}}]},{type:"grid",name:"",schema:[{name:"layout",selector:{"mush-layout":{}}},{name:"hide_icon",selector:{boolean:{}}},{name:"use_entity_picture",selector:{boolean:{}}}]},{type:"grid",name:"",schema:[{name:"primary_info",selector:{"mush-info":{}}},{name:"secondary_info",selector:{"mush-info":{}}}]},{name:"tap_action",selector:{"mush-action":{}}},{name:"hold_action",selector:{"mush-action":{}}},{name:"double_tap_action",selector:{"mush-action":{}}}]));let tu=class extends Ot{constructor(){super(...arguments),this._computeLabelCallback=t=>{const e=we(this.hass);return Ua.includes(t.name)?e(`editor.card.generic.${t.name}`):this.hass.localize(`ui.panel.lovelace.editor.card.generic.${t.name}`)}}connectedCallback(){super.connectedCallback(),Ha()}setConfig(t){No(t,Jd),this._config=t}render(){if(!this.hass||!this._config)return ut``;const t=this._config.entity?this.hass.states[this._config.entity]:void 0,e=t?Io(t):void 0,i=this._config.icon||e,n=Qd(i);return ut` + `}_valueChanged(t){At(this,"config-changed",{config:t.detail.value})}};n([ct()],wm.prototype,"_config",void 0),wm=n([at("mushroom-climate-card-editor")],wm);var km=Object.freeze({__proto__:null,get ClimateCardEditor(){return wm}});const Cm=te(xc,te(yc,gc,pc),ce({show_buttons_control:de(re()),show_position_control:de(re()),show_tilt_position_control:de(re())})),$m=["show_buttons_control","show_position_control","show_tilt_position_control"],Em=_t(((t,e)=>[{name:"entity",selector:{entity:{domain:ss}}},{name:"name",selector:{text:{}}},{name:"icon",selector:{icon:{placeholder:e}}},..._c,{type:"grid",name:"",schema:[{name:"show_position_control",selector:{boolean:{}}},{name:"show_tilt_position_control",selector:{boolean:{}}},{name:"show_buttons_control",selector:{boolean:{}}}]},...fc(t)]));let Am=class extends ol{constructor(){super(...arguments),this._computeLabel=t=>{const e=Hi(this.hass);return vc.includes(t.name)?e(`editor.card.generic.${t.name}`):$m.includes(t.name)?e(`editor.card.cover.${t.name}`):this.hass.localize(`ui.panel.lovelace.editor.card.generic.${t.name}`)}}connectedCallback(){super.connectedCallback(),bc(this.hass.connection.haVersion)}setConfig(t){Jt(t,Cm),this._config=t}render(){if(!this.hass||!this._config)return N``;const t=this._config.entity?this.hass.states[this._config.entity]:void 0,e=t?pl(t):void 0,i=this._config.icon||e,n=Em(this.hass.connection.haVersion,i);return N` - `}_valueChanged(t){w(this,"config-changed",{config:t.detail.value})}static get styles(){return Va}};n([zt({attribute:!1})],tu.prototype,"hass",void 0),n([jt()],tu.prototype,"_config",void 0),tu=n([Dt("mushroom-entity-card-editor")],tu);var eu=Object.freeze({__proto__:null,get EntityCardEditor(){return tu}});const iu=Po(Ba,Xo({entity:qo(Wo()),name:qo(Wo()),icon:qo(Wo()),icon_animation:qo(Uo()),layout:qo(Zo),hide_state:qo(Uo()),show_percentage_control:qo(Uo()),show_oscillate_control:qo(Uo()),tap_action:qo(Za),hold_action:qo(Za),double_tap_action:qo(Za)})),nu=["icon_animation","show_percentage_control","show_oscillate_control"],ou=Fa((t=>[{name:"entity",selector:{entity:{domain:Gr}}},{name:"name",selector:{text:{}}},{type:"grid",name:"",schema:[{name:"icon",selector:{icon:{placeholder:t}}},{name:"icon_animation",selector:{boolean:{}}}]},{type:"grid",name:"",schema:[{name:"layout",selector:{"mush-layout":{}}},{name:"hide_state",selector:{boolean:{}}}]},{type:"grid",name:"",schema:[{name:"show_percentage_control",selector:{boolean:{}}},{name:"show_oscillate_control",selector:{boolean:{}}}]},{name:"tap_action",selector:{"mush-action":{}}},{name:"hold_action",selector:{"mush-action":{}}},{name:"double_tap_action",selector:{"mush-action":{}}}]));let ru=class extends Ot{constructor(){super(...arguments),this._computeLabelCallback=t=>{const e=we(this.hass);return Ua.includes(t.name)?e(`editor.card.generic.${t.name}`):nu.includes(t.name)?e(`editor.card.fan.${t.name}`):this.hass.localize(`ui.panel.lovelace.editor.card.generic.${t.name}`)}}connectedCallback(){super.connectedCallback(),Ha()}setConfig(t){No(t,iu),this._config=t}render(){if(!this.hass||!this._config)return ut``;const t=this._config.entity?this.hass.states[this._config.entity]:void 0,e=t?Io(t):void 0,i=this._config.icon||e,n=ou(i);return ut` + `}_valueChanged(t){At(this,"config-changed",{config:t.detail.value})}};n([ct()],Am.prototype,"_config",void 0),Am=n([at("mushroom-cover-card-editor")],Am);var Sm=Object.freeze({__proto__:null,get CoverCardEditor(){return Am}});const Im=te(xc,te(yc,gc,pc),ce({icon_color:de(ue())})),Tm=_t(((t,e)=>[{name:"entity",selector:{entity:{}}},{name:"name",selector:{text:{}}},{type:"grid",name:"",schema:[{name:"icon",selector:{icon:{placeholder:e}}},{name:"icon_color",selector:{"mush-color":{}}}]},..._c,...fc(t)]));let zm=class extends ol{constructor(){super(...arguments),this._computeLabel=t=>{const e=Hi(this.hass);return vc.includes(t.name)?e(`editor.card.generic.${t.name}`):this.hass.localize(`ui.panel.lovelace.editor.card.generic.${t.name}`)}}connectedCallback(){super.connectedCallback(),bc(this.hass.connection.haVersion)}setConfig(t){Jt(t,Im),this._config=t}render(){if(!this.hass||!this._config)return N``;const t=this._config.entity?this.hass.states[this._config.entity]:void 0,e=t?pl(t):void 0,i=this._config.icon||e,n=Tm(this.hass.connection.haVersion,i);return N` - `}_valueChanged(t){w(this,"config-changed",{config:t.detail.value})}static get styles(){return Va}};n([zt({attribute:!1})],ru.prototype,"hass",void 0),n([jt()],ru.prototype,"_config",void 0),ru=n([Dt("mushroom-fan-card-editor")],ru);var au=Object.freeze({__proto__:null,get FanCardEditor(){return ru}});const su=Po(Ba,Xo({entity:qo(Wo()),icon:qo(Wo()),name:qo(Wo()),use_entity_picture:qo(Uo()),layout:qo(Zo),hide_state:qo(Uo()),hide_name:qo(Uo()),tap_action:qo(Za),hold_action:qo(Za),double_tap_action:qo(Za)})),lu=["more-info","navigate","url","call-service","none"],cu=Fa((t=>[{name:"entity",selector:{entity:{domain:la}}},{name:"name",selector:{text:{}}},{type:"grid",name:"",schema:[{name:"icon",selector:{icon:{placeholder:t}}},{name:"use_entity_picture",selector:{boolean:{}}}]},{type:"grid",name:"",schema:[{name:"layout",selector:{"mush-layout":{}}},{name:"hide_state",selector:{boolean:{}}},{name:"hide_name",selector:{boolean:{}}}]},{name:"tap_action",selector:{"mush-action":{actions:lu}}},{name:"hold_action",selector:{"mush-action":{actions:lu}}},{name:"double_tap_action",selector:{"mush-action":{actions:lu}}}]));let du=class extends Ot{constructor(){super(...arguments),this._computeLabelCallback=t=>{const e=we(this.hass);return Ua.includes(t.name)?e(`editor.card.generic.${t.name}`):this.hass.localize(`ui.panel.lovelace.editor.card.generic.${t.name}`)}}connectedCallback(){super.connectedCallback(),Ha()}setConfig(t){No(t,su),this._config=t}render(){if(!this.hass||!this._config)return ut``;const t=this._config.entity?this.hass.states[this._config.entity]:void 0,e=t?Io(t):void 0,i=this._config.icon||e,n=cu(i);return ut` + `}_valueChanged(t){At(this,"config-changed",{config:t.detail.value})}};n([ct()],zm.prototype,"_config",void 0),zm=n([at("mushroom-entity-card-editor")],zm);var Om=Object.freeze({__proto__:null,get EntityCardEditor(){return zm}});const Mm=te(xc,te(yc,gc,pc),ce({icon_animation:de(re()),show_percentage_control:de(re()),show_oscillate_control:de(re()),collapsible_controls:de(re())})),Lm=["icon_animation","show_percentage_control","show_oscillate_control"],Dm=_t(((t,e)=>[{name:"entity",selector:{entity:{domain:xs}}},{name:"name",selector:{text:{}}},{type:"grid",name:"",schema:[{name:"icon",selector:{icon:{placeholder:e}}},{name:"icon_animation",selector:{boolean:{}}}]},..._c,{type:"grid",name:"",schema:[{name:"show_percentage_control",selector:{boolean:{}}},{name:"show_oscillate_control",selector:{boolean:{}}},{name:"collapsible_controls",selector:{boolean:{}}}]},...fc(t)]));let jm=class extends ol{constructor(){super(...arguments),this._computeLabel=t=>{const e=Hi(this.hass);return vc.includes(t.name)?e(`editor.card.generic.${t.name}`):Lm.includes(t.name)?e(`editor.card.fan.${t.name}`):this.hass.localize(`ui.panel.lovelace.editor.card.generic.${t.name}`)}}connectedCallback(){super.connectedCallback(),bc(this.hass.connection.haVersion)}setConfig(t){Jt(t,Mm),this._config=t}render(){if(!this.hass||!this._config)return N``;const t=this._config.entity?this.hass.states[this._config.entity]:void 0,e=t?pl(t):void 0,i=this._config.icon||e,n=Dm(this.hass.connection.haVersion,i);return N` - `}_valueChanged(t){w(this,"config-changed",{config:t.detail.value})}static get styles(){return Va}};n([zt({attribute:!1})],du.prototype,"hass",void 0),n([jt()],du.prototype,"_config",void 0),du=n([Dt("mushroom-person-card-editor")],du);var uu=Object.freeze({__proto__:null,get SwitchCardEditor(){return du}});const hu=Po(Ba,Xo({title:qo(Wo()),subtitle:qo(Wo()),alignment:qo(Wo())})),mu=["title","subtitle"],pu=[{name:"title",selector:{text:{multiline:!0}}},{name:"subtitle",selector:{text:{multiline:!0}}},{name:"alignment",selector:{"mush-alignment":{}}}];let fu=class extends Ot{constructor(){super(...arguments),this._computeLabelCallback=t=>{const e=we(this.hass);return mu.includes(t.name)?e(`editor.card.title.${t.name}`):this.hass.localize(`ui.panel.lovelace.editor.card.generic.${t.name}`)}}connectedCallback(){super.connectedCallback(),Ha()}setConfig(t){No(t,hu),this._config=t}render(){return this.hass&&this._config?ut` + `}_valueChanged(t){At(this,"config-changed",{config:t.detail.value})}};n([ct()],jm.prototype,"_config",void 0),jm=n([at("mushroom-fan-card-editor")],jm);var Pm=Object.freeze({__proto__:null,get FanCardEditor(){return jm}});const Nm=te(xc,te(yc,gc,pc),ce({show_target_humidity_control:de(re()),collapsible_controls:de(re())})),Vm=["show_target_humidity_control"],Rm=_t(((t,e)=>[{name:"entity",selector:{entity:{domain:As}}},{name:"name",selector:{text:{}}},{name:"icon",selector:{icon:{placeholder:e}}},..._c,{type:"grid",name:"",schema:[{name:"show_target_humidity_control",selector:{boolean:{}}},{name:"collapsible_controls",selector:{boolean:{}}}]},...fc(t)]));let Fm=class extends ol{constructor(){super(...arguments),this._computeLabel=t=>{const e=Hi(this.hass);return vc.includes(t.name)?e(`editor.card.generic.${t.name}`):Vm.includes(t.name)?e(`editor.card.humidifier.${t.name}`):this.hass.localize(`ui.panel.lovelace.editor.card.generic.${t.name}`)}}connectedCallback(){super.connectedCallback(),bc(this.hass.connection.haVersion)}setConfig(t){Jt(t,Nm),this._config=t}render(){if(!this.hass||!this._config)return N``;const t=this._config.entity?this.hass.states[this._config.entity]:void 0,e=t?pl(t):void 0,i=this._config.icon||e,n=Rm(this.hass.connection.haVersion,i);return N` - `:ut``}_valueChanged(t){w(this,"config-changed",{config:t.detail.value})}static get styles(){return Va}};n([zt({attribute:!1})],fu.prototype,"hass",void 0),n([jt()],fu.prototype,"_config",void 0),fu=n([Dt("mushroom-title-card-editor")],fu);var gu=Object.freeze({__proto__:null,get TitleCardEditor(){return fu}});const _u=Po(Ba,Xo({entity:qo(Wo()),name:qo(Wo()),icon:qo(Wo()),use_entity_picture:qo(Uo()),layout:qo(Zo),show_buttons_control:qo(Uo()),tap_action:qo(Za),hold_action:qo(Za),double_tap_action:qo(Za)})),bu=["show_buttons_control"],vu=["more-info","navigate","url","call-service","none"],yu=Fa((t=>[{name:"entity",selector:{entity:{domain:pa}}},{name:"name",selector:{text:{}}},{type:"grid",name:"",schema:[{name:"icon",selector:{icon:{placeholder:t}}},{name:"use_entity_picture",selector:{boolean:{}}}]},{type:"grid",name:"",schema:[{name:"layout",selector:{"mush-layout":{}}}]},{type:"grid",name:"",schema:[{name:"show_buttons_control",selector:{boolean:{}}}]},{name:"tap_action",selector:{"mush-action":{actions:vu}}},{name:"hold_action",selector:{"mush-action":{actions:vu}}},{name:"double_tap_action",selector:{"mush-action":{actions:vu}}}]));let xu=class extends Ot{constructor(){super(...arguments),this._computeLabelCallback=t=>{const e=we(this.hass);return Ua.includes(t.name)?e(`editor.card.generic.${t.name}`):bu.includes(t.name)?e(`editor.card.update.${t.name}`):this.hass.localize(`ui.panel.lovelace.editor.card.generic.${t.name}`)}}connectedCallback(){super.connectedCallback(),Ha()}setConfig(t){No(t,_u),this._config=t}render(){if(!this.hass||!this._config)return ut``;const t=this._config.entity?this.hass.states[this._config.entity]:void 0,e=t?Io(t):void 0,i=this._config.icon||e,n=yu(i);return ut` + `}_valueChanged(t){At(this,"config-changed",{config:t.detail.value})}};n([ct()],Fm.prototype,"_config",void 0),Fm=n([at("mushroom-humidifier-card-editor")],Fm);var Bm=Object.freeze({__proto__:null,get HumidifierCardEditor(){return Fm}});const Um=te(xc,te(yc,gc,pc)),Hm=_t(((t,e)=>[{name:"entity",selector:{entity:{domain:Ps}}},{name:"name",selector:{text:{}}},{name:"icon",selector:{icon:{placeholder:e}}},..._c,...fc(t)]));let Ym=class extends ol{constructor(){super(...arguments),this._computeLabel=t=>{const e=Hi(this.hass);return vc.includes(t.name)?e(`editor.card.generic.${t.name}`):this.hass.localize(`ui.panel.lovelace.editor.card.generic.${t.name}`)}}connectedCallback(){super.connectedCallback(),bc(this.hass.connection.haVersion)}setConfig(t){Jt(t,Um),this._config=t}render(){if(!this.hass||!this._config)return N``;const t=this._config.entity?this.hass.states[this._config.entity]:void 0,e=t?pl(t):void 0,i=this._config.icon||e,n=Hm(this.hass.connection.haVersion,i);return N` - `}_valueChanged(t){w(this,"config-changed",{config:t.detail.value})}static get styles(){return[Va]}};n([zt({attribute:!1})],xu.prototype,"hass",void 0),n([jt()],xu.prototype,"_config",void 0),xu=n([Dt("mushroom-update-card-editor")],xu);var wu=Object.freeze({__proto__:null,get UpdateCardEditor(){return xu}});const Cu=["on_off","shuffle","previous","play_pause_stop","next","repeat"],ku=["volume_mute","volume_set","volume_buttons"],$u=Po(Ba,Xo({entity:qo(Wo()),icon:qo(Wo()),name:qo(Wo()),use_media_info:qo(Uo()),use_media_artwork:qo(Uo()),volume_controls:qo(Bo(Ho(ku))),media_controls:qo(Bo(Ho(Cu))),layout:qo(Zo),tap_action:qo(Za),hold_action:qo(Za),double_tap_action:qo(Za)})),Eu=["use_media_info","use_media_artwork","media_controls","volume_controls"],Au=Fa(((t,e)=>[{name:"entity",selector:{entity:{domain:ba}}},{name:"name",selector:{text:{}}},{type:"grid",name:"",schema:[{name:"icon",selector:{icon:{placeholder:e}}}]},{type:"grid",name:"",schema:[{name:"layout",selector:{"mush-layout":{}}}]},{type:"grid",name:"",schema:[{name:"use_media_info",selector:{boolean:{}}},{name:"use_media_artwork",selector:{boolean:{}}}]},{type:"grid",name:"",schema:[{name:"volume_controls",selector:{select:{options:ku.map((e=>({value:e,label:t(`editor.card.media-player.volume_controls_list.${e}`)}))),mode:"list",multiple:!0}}},{name:"media_controls",selector:{select:{options:Cu.map((e=>({value:e,label:t(`editor.card.media-player.media_controls_list.${e}`)}))),mode:"list",multiple:!0}}}]},{name:"tap_action",selector:{"mush-action":{}}},{name:"hold_action",selector:{"mush-action":{}}},{name:"double_tap_action",selector:{"mush-action":{}}}]));let Su=class extends Ot{constructor(){super(...arguments),this._computeLabelCallback=t=>{const e=we(this.hass);return Ua.includes(t.name)?e(`editor.card.generic.${t.name}`):Eu.includes(t.name)?e(`editor.card.media-player.${t.name}`):this.hass.localize(`ui.panel.lovelace.editor.card.generic.${t.name}`)}}connectedCallback(){super.connectedCallback(),Ha()}setConfig(t){No(t,$u),this._config=t}render(){if(!this.hass||!this._config)return ut``;const t=this._config.entity?this.hass.states[this._config.entity]:void 0,e=t?Io(t):void 0,i=this._config.icon||e,n=we(this.hass),o=Au(n,i);return ut` + `}_valueChanged(t){At(this,"config-changed",{config:t.detail.value})}};n([ct()],Ym.prototype,"_config",void 0),Ym=n([at("mushroom-lock-card-editor")],Ym);var Xm=Object.freeze({__proto__:null,get LockCardEditor(){return Ym}});const Wm=["on_off","shuffle","previous","play_pause_stop","next","repeat"],qm=["volume_mute","volume_set","volume_buttons"],Km=te(xc,te(yc,gc,pc),ce({use_media_info:de(re()),show_volume_level:de(re()),volume_controls:de(oe(ae(qm))),media_controls:de(oe(ae(Wm))),collapsible_controls:de(re())})),Gm=["use_media_info","use_media_artwork","show_volume_level","media_controls","volume_controls"],Zm=_t(((t,e,i)=>[{name:"entity",selector:{entity:{domain:Hs}}},{name:"name",selector:{text:{}}},{name:"icon",selector:{icon:{placeholder:i}}},..._c,{type:"grid",name:"",schema:[{name:"use_media_info",selector:{boolean:{}}},{name:"show_volume_level",selector:{boolean:{}}}]},{type:"grid",name:"",schema:[{name:"volume_controls",selector:{select:{options:qm.map((e=>({value:e,label:t(`editor.card.media-player.volume_controls_list.${e}`)}))),mode:"list",multiple:!0}}},{name:"media_controls",selector:{select:{options:Wm.map((e=>({value:e,label:t(`editor.card.media-player.media_controls_list.${e}`)}))),mode:"list",multiple:!0}}},{name:"collapsible_controls",selector:{boolean:{}}}]},...fc(e)]));let Jm=class extends ol{constructor(){super(...arguments),this._computeLabel=t=>{const e=Hi(this.hass);return vc.includes(t.name)?e(`editor.card.generic.${t.name}`):Gm.includes(t.name)?e(`editor.card.media-player.${t.name}`):this.hass.localize(`ui.panel.lovelace.editor.card.generic.${t.name}`)}}connectedCallback(){super.connectedCallback(),bc(this.hass.connection.haVersion)}setConfig(t){Jt(t,Km),this._config=t}render(){if(!this.hass||!this._config)return N``;const t=this._config.entity?this.hass.states[this._config.entity]:void 0,e=t?pl(t):void 0,i=this._config.icon||e,n=Hi(this.hass),o=Zm(n,this.hass.connection.haVersion,i);return N` - `}_valueChanged(t){w(this,"config-changed",{config:t.detail.value})}static get styles(){return[Va]}};n([zt({attribute:!1})],Su.prototype,"hass",void 0),n([jt()],Su.prototype,"_config",void 0),Su=n([Dt("mushroom-media-player-card-editor")],Su);var Iu=Object.freeze({__proto__:null,MEDIA_FIELDS:Eu,get MediaCardEditor(){return Su}});const Tu=["start_pause","stop","locate","clean_spot","return_home"],Ou=Po(Ba,Xo({entity:qo(Wo()),name:qo(Wo()),icon:qo(Wo()),layout:qo(Zo),hide_state:qo(Uo()),commands:qo(Bo(Wo())),tap_action:qo(Za),hold_action:qo(Za),double_tap_action:qo(Za)})),Mu=["commands"],Du=Fa(((t,e)=>[{name:"entity",selector:{entity:{domain:Ea}}},{name:"name",selector:{text:{}}},{type:"grid",name:"",schema:[{name:"icon",selector:{icon:{placeholder:e}}}]},{type:"grid",name:"",schema:[{name:"layout",selector:{"mush-layout":{}}},{name:"hide_state",selector:{boolean:{}}}]},{type:"multi_select",name:"commands",options:Tu.map((e=>[e,t(`ui.dialogs.more_info_control.vacuum.${e}`)]))},{name:"tap_action",selector:{"mush-action":{}}},{name:"hold_action",selector:{"mush-action":{}}},{name:"double_tap_action",selector:{"mush-action":{}}}]));let Lu=class extends Ot{constructor(){super(...arguments),this._computeLabelCallback=t=>{const e=we(this.hass);return Ua.includes(t.name)?e(`editor.card.generic.${t.name}`):Mu.includes(t.name)?e(`editor.card.vacuum.${t.name}`):this.hass.localize(`ui.panel.lovelace.editor.card.generic.${t.name}`)}}connectedCallback(){super.connectedCallback(),Ha()}setConfig(t){No(t,Ou),this._config=t}render(){if(!this.hass||!this._config)return ut``;const t=this._config.entity?this.hass.states[this._config.entity]:void 0,e=t?Io(t):void 0,i=this._config.icon||e,n=Du(this.hass.localize,i);return ut` + `}_valueChanged(t){At(this,"config-changed",{config:t.detail.value})}};n([ct()],Jm.prototype,"_config",void 0),Jm=n([at("mushroom-media-player-card-editor")],Jm);var Qm=Object.freeze({__proto__:null,MEDIA_LABELS:Gm,get MediaCardEditor(){return Jm}});const tp=te(xc,te(yc,gc,pc)),ep=["more-info","navigate","url","call-service","none"],ip=_t(((t,e)=>[{name:"entity",selector:{entity:{domain:Js}}},{name:"name",selector:{text:{}}},{name:"icon",selector:{icon:{placeholder:e}}},..._c,...fc(t,ep)]));let np=class extends ol{constructor(){super(...arguments),this._computeLabel=t=>{const e=Hi(this.hass);return vc.includes(t.name)?e(`editor.card.generic.${t.name}`):this.hass.localize(`ui.panel.lovelace.editor.card.generic.${t.name}`)}}connectedCallback(){super.connectedCallback(),bc(this.hass.connection.haVersion)}setConfig(t){Jt(t,tp),this._config=t}render(){if(!this.hass||!this._config)return N``;const t=this._config.entity?this.hass.states[this._config.entity]:void 0,e=t?pl(t):void 0,i=this._config.icon||e,n=ip(this.hass.connection.haVersion,i);return N` + `}_valueChanged(t){At(this,"config-changed",{config:t.detail.value})}};n([ct()],np.prototype,"_config",void 0),np=n([at("mushroom-person-card-editor")],np);var op=Object.freeze({__proto__:null,get SwitchCardEditor(){return np}});const rp=te(xc,ce({title:de(ue()),subtitle:de(ue()),alignment:de(ue())})),ap=["title","subtitle"],lp=_t((t=>[{name:"title",selector:He(t,2022,5)?{template:{}}:{text:{multiline:!0}}},{name:"subtitle",selector:He(t,2022,5)?{template:{}}:{text:{multiline:!0}}},{name:"alignment",selector:{"mush-alignment":{}}}]));let sp=class extends ol{constructor(){super(...arguments),this._computeLabel=t=>{const e=Hi(this.hass);return ap.includes(t.name)?e(`editor.card.title.${t.name}`):this.hass.localize(`ui.panel.lovelace.editor.card.generic.${t.name}`)}}connectedCallback(){super.connectedCallback(),bc(this.hass.connection.haVersion)}setConfig(t){Jt(t,rp),this._config=t}render(){return this.hass&&this._config?N` + - `}_valueChanged(t){w(this,"config-changed",{config:t.detail.value})}static get styles(){return Va}};n([zt({attribute:!1})],Lu.prototype,"hass",void 0),n([jt()],Lu.prototype,"_config",void 0),Lu=n([Dt("mushroom-vacuum-card-editor")],Lu);var zu=Object.freeze({__proto__:null,get VacuumCardEditor(){return Lu}});const ju=Po(Ba,Xo({entity:qo(Wo()),name:qo(Wo()),icon:qo(Wo()),layout:qo(Zo),hide_state:qo(Uo()),tap_action:qo(Za),hold_action:qo(Za),double_tap_action:qo(Za)})),Nu=Fa((t=>[{name:"entity",selector:{entity:{domain:Oa}}},{name:"name",selector:{text:{}}},{name:"icon",selector:{icon:{placeholder:t}}},{type:"grid",name:"",schema:[{name:"layout",selector:{"mush-layout":{}}},{name:"hide_state",selector:{boolean:{}}}]},{name:"tap_action",selector:{"mush-action":{}}},{name:"hold_action",selector:{"mush-action":{}}},{name:"double_tap_action",selector:{"mush-action":{}}}]));let Ru=class extends Ot{constructor(){super(...arguments),this._computeLabelCallback=t=>{const e=we(this.hass);return Ua.includes(t.name)?e(`editor.card.generic.${t.name}`):this.hass.localize(`ui.panel.lovelace.editor.card.generic.${t.name}`)}}connectedCallback(){super.connectedCallback(),Ha()}setConfig(t){No(t,ju),this._config=t}render(){if(!this.hass||!this._config)return ut``;const t=this._config.entity?this.hass.states[this._config.entity]:void 0,e=t?Io(t):void 0,i=this._config.icon||e,n=Nu(i);return ut` + `:N``}_valueChanged(t){At(this,"config-changed",{config:t.detail.value})}};n([ct()],sp.prototype,"_config",void 0),sp=n([at("mushroom-title-card-editor")],sp);var cp=Object.freeze({__proto__:null,get TitleCardEditor(){return sp}});const dp=te(xc,te(yc,gc,pc),ce({show_buttons_control:de(re()),collapsible_controls:de(re())})),up=["show_buttons_control"],hp=["more-info","navigate","url","call-service","none"],mp=_t(((t,e)=>[{name:"entity",selector:{entity:{domain:oc}}},{name:"name",selector:{text:{}}},{name:"icon",selector:{icon:{placeholder:e}}},..._c,{type:"grid",name:"",schema:[{name:"show_buttons_control",selector:{boolean:{}}},{name:"collapsible_controls",selector:{boolean:{}}}]},...fc(t,hp)]));let pp=class extends ol{constructor(){super(...arguments),this._computeLabel=t=>{const e=Hi(this.hass);return vc.includes(t.name)?e(`editor.card.generic.${t.name}`):up.includes(t.name)?e(`editor.card.update.${t.name}`):this.hass.localize(`ui.panel.lovelace.editor.card.generic.${t.name}`)}}connectedCallback(){super.connectedCallback(),bc(this.hass.connection.haVersion)}setConfig(t){Jt(t,dp),this._config=t}render(){if(!this.hass||!this._config)return N``;const t=this._config.entity?this.hass.states[this._config.entity]:void 0,e=t?pl(t):void 0,i=this._config.icon||e,n=mp(this.hass.connection.haVersion,i);return N` + `}_valueChanged(t){At(this,"config-changed",{config:t.detail.value})}};n([ct()],pp.prototype,"_config",void 0),pp=n([at("mushroom-update-card-editor")],pp);var fp=Object.freeze({__proto__:null,get UpdateCardEditor(){return pp}});const gp=["on_off","start_pause","stop","locate","clean_spot","return_home"],_p=te(xc,te(yc,gc,pc),ce({icon_animation:de(re()),commands:de(oe(ue()))})),vp=["commands"],bp=_t(((t,e,i,n)=>[{name:"entity",selector:{entity:{domain:sc}}},{name:"name",selector:{text:{}}},{type:"grid",name:"",schema:[{name:"icon",selector:{icon:{placeholder:n}}},{name:"icon_animation",selector:{boolean:{}}}]},..._c,{name:"commands",selector:{select:{mode:"list",multiple:!0,options:gp.map((i=>({value:i,label:"on_off"===i?e(`editor.card.vacuum.commands_list.${i}`):t(`ui.dialogs.more_info_control.vacuum.${i}`)})))}}},...fc(i)]));let yp=class extends ol{constructor(){super(...arguments),this._computeLabel=t=>{const e=Hi(this.hass);return vc.includes(t.name)?e(`editor.card.generic.${t.name}`):vp.includes(t.name)?e(`editor.card.vacuum.${t.name}`):this.hass.localize(`ui.panel.lovelace.editor.card.generic.${t.name}`)}}connectedCallback(){super.connectedCallback(),bc(this.hass.connection.haVersion)}setConfig(t){Jt(t,_p),this._config=t}render(){if(!this.hass||!this._config)return N``;const t=this._config.entity?this.hass.states[this._config.entity]:void 0,e=t?pl(t):void 0,i=this._config.icon||e,n=Hi(this.hass),o=bp(this.hass.localize,n,this.hass.connection.haVersion,i);return N` + - `}_valueChanged(t){w(this,"config-changed",{config:t.detail.value})}static get styles(){return Va}};n([zt({attribute:!1})],Ru.prototype,"hass",void 0),n([jt()],Ru.prototype,"_config",void 0),Ru=n([Dt("mushroom-lock-card-editor")],Ru);var Pu=Object.freeze({__proto__:null,get LockCardEditor(){return Ru}}); + `}_valueChanged(t){At(this,"config-changed",{config:t.detail.value})}};n([ct()],yp.prototype,"_config",void 0),yp=n([at("mushroom-vacuum-card-editor")],yp);var xp=Object.freeze({__proto__:null,get VacuumCardEditor(){return yp}}); /**! * Sortable 1.15.0 * @author RubaXa * @author owenm * @license MIT - */function Fu(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function Vu(t){for(var e=1;e=0||(o[i]=t[i]);return o}(t,e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(t,i)&&(o[i]=t[i])}return o}function Xu(t){return function(t){if(Array.isArray(t))return qu(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return qu(t,e);var i=Object.prototype.toString.call(t).slice(8,-1);"Object"===i&&t.constructor&&(i=t.constructor.name);if("Map"===i||"Set"===i)return Array.from(t);if("Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return qu(t,e)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function qu(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,n=new Array(e);i"===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(t){return!1}return!1}}function rh(t){return t.host&&t!==document&&t.host.nodeType?t.host:t.parentNode}function ah(t,e,i,n){if(t){i=i||document;do{if(null!=e&&(">"===e[0]?t.parentNode===i&&oh(t,e):oh(t,e))||n&&t===i)return t;if(t===i)break}while(t=rh(t))}return null}var sh,lh=/\s+/g;function ch(t,e,i){if(t&&e)if(t.classList)t.classList[i?"add":"remove"](e);else{var n=(" "+t.className+" ").replace(lh," ").replace(" "+e+" "," ");t.className=(n+(i?" "+e:"")).replace(lh," ")}}function dh(t,e,i){var n=t&&t.style;if(n){if(void 0===i)return document.defaultView&&document.defaultView.getComputedStyle?i=document.defaultView.getComputedStyle(t,""):t.currentStyle&&(i=t.currentStyle),void 0===e?i:i[e];e in n||-1!==e.indexOf("webkit")||(e="-webkit-"+e),n[e]=i+("string"==typeof i?"":"px")}}function uh(t,e){var i="";if("string"==typeof t)i=t;else do{var n=dh(t,"transform");n&&"none"!==n&&(i=n+" "+i)}while(!e&&(t=t.parentNode));var o=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return o&&new o(i)}function hh(t,e,i){if(t){var n=t.getElementsByTagName(e),o=0,r=n.length;if(i)for(;o=r:o<=r))return n;if(n===mh())break;n=yh(n,!1)}return!1}function gh(t,e,i,n){for(var o=0,r=0,a=t.children;r2&&void 0!==arguments[2]?arguments[2]:{},n=i.evt,o=Yu(i,Dh);Oh.pluginEvent.bind(Em)(t,e,Vu({dragEl:jh,parentEl:Nh,ghostEl:Rh,rootEl:Ph,nextEl:Fh,lastDownEl:Vh,cloneEl:Bh,cloneHidden:Uh,dragStarted:im,putSortable:Gh,activeSortable:Em.active,originalEvent:n,oldIndex:Hh,oldDraggableIndex:Xh,newIndex:Yh,newDraggableIndex:qh,hideGhostForTarget:wm,unhideGhostForTarget:Cm,cloneNowHidden:function(){Uh=!0},cloneNowShown:function(){Uh=!1},dispatchSortableEvent:function(t){zh({sortable:e,name:t,originalEvent:n})}},o))};function zh(t){Mh(Vu({putSortable:Gh,cloneEl:Bh,targetEl:jh,rootEl:Ph,oldIndex:Hh,oldDraggableIndex:Xh,newIndex:Yh,newDraggableIndex:qh},t))}var jh,Nh,Rh,Ph,Fh,Vh,Bh,Uh,Hh,Yh,Xh,qh,Wh,Gh,Kh,Zh,Jh,Qh,tm,em,im,nm,om,rm,am,sm=!1,lm=!1,cm=[],dm=!1,um=!1,hm=[],mm=!1,pm=[],fm="undefined"!=typeof document,gm=Qu,_m=Ku||Gu?"cssFloat":"float",bm=fm&&!th&&!Qu&&"draggable"in document.createElement("div"),vm=function(){if(fm){if(Gu)return!1;var t=document.createElement("x");return t.style.cssText="pointer-events:auto","auto"===t.style.pointerEvents}}(),ym=function(t,e){var i=dh(t),n=parseInt(i.width)-parseInt(i.paddingLeft)-parseInt(i.paddingRight)-parseInt(i.borderLeftWidth)-parseInt(i.borderRightWidth),o=gh(t,0,e),r=gh(t,1,e),a=o&&dh(o),s=r&&dh(r),l=a&&parseInt(a.marginLeft)+parseInt(a.marginRight)+ph(o).width,c=s&&parseInt(s.marginLeft)+parseInt(s.marginRight)+ph(r).width;if("flex"===i.display)return"column"===i.flexDirection||"column-reverse"===i.flexDirection?"vertical":"horizontal";if("grid"===i.display)return i.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(o&&a.float&&"none"!==a.float){var d="left"===a.float?"left":"right";return!r||"both"!==s.clear&&s.clear!==d?"horizontal":"vertical"}return o&&("block"===a.display||"flex"===a.display||"table"===a.display||"grid"===a.display||l>=n&&"none"===i[_m]||r&&"none"===i[_m]&&l+c>n)?"vertical":"horizontal"},xm=function(t){function e(t,i){return function(n,o,r,a){var s=n.options.group.name&&o.options.group.name&&n.options.group.name===o.options.group.name;if(null==t&&(i||s))return!0;if(null==t||!1===t)return!1;if(i&&"clone"===t)return t;if("function"==typeof t)return e(t(n,o,r,a),i)(n,o,r,a);var l=(i?n:o).options.group.name;return!0===t||"string"==typeof t&&t===l||t.join&&t.indexOf(l)>-1}}var i={},n=t.group;n&&"object"==Bu(n)||(n={name:n}),i.name=n.name,i.checkPull=e(n.pull,!0),i.checkPut=e(n.put),i.revertClone=n.revertClone,t.group=i},wm=function(){!vm&&Rh&&dh(Rh,"display","none")},Cm=function(){!vm&&Rh&&dh(Rh,"display","")};fm&&!th&&document.addEventListener("click",(function(t){if(lm)return t.preventDefault(),t.stopPropagation&&t.stopPropagation(),t.stopImmediatePropagation&&t.stopImmediatePropagation(),lm=!1,!1}),!0);var km=function(t){if(jh){var e=function(t,e){var i;return cm.some((function(n){var o=n[Ah].options.emptyInsertThreshold;if(o&&!_h(n)){var r=ph(n),a=t>=r.left-o&&t<=r.right+o,s=e>=r.top-o&&e<=r.bottom+o;return a&&s?i=n:void 0}})),i}((t=t.touches?t.touches[0]:t).clientX,t.clientY);if(e){var i={};for(var n in t)t.hasOwnProperty(n)&&(i[n]=t[n]);i.target=i.rootEl=e,i.preventDefault=void 0,i.stopPropagation=void 0,e[Ah]._onDragOver(i)}}},$m=function(t){jh&&jh.parentNode[Ah]._isOutsideThisEl(t.target)};function Em(t,e){if(!t||!t.nodeType||1!==t.nodeType)throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(t));this.el=t,this.options=e=Hu({},e),t[Ah]=this;var i={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(t.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return ym(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!==Em.supportPointer&&"PointerEvent"in window&&!Ju,emptyInsertThreshold:5};for(var n in Oh.initializePlugins(this,t,i),i)!(n in e)&&(e[n]=i[n]);for(var o in xm(e),this)"_"===o.charAt(0)&&"function"==typeof this[o]&&(this[o]=this[o].bind(this));this.nativeDraggable=!e.forceFallback&&bm,this.nativeDraggable&&(this.options.touchStartThreshold=1),e.supportPointer?ih(t,"pointerdown",this._onTapStart):(ih(t,"mousedown",this._onTapStart),ih(t,"touchstart",this._onTapStart)),this.nativeDraggable&&(ih(t,"dragover",this),ih(t,"dragenter",this)),cm.push(this.el),e.store&&e.store.get&&this.sort(e.store.get(this)||[]),Hu(this,Sh())}function Am(t,e,i,n,o,r,a,s){var l,c,d=t[Ah],u=d.options.onMove;return!window.CustomEvent||Gu||Ku?(l=document.createEvent("Event")).initEvent("move",!0,!0):l=new CustomEvent("move",{bubbles:!0,cancelable:!0}),l.to=e,l.from=t,l.dragged=i,l.draggedRect=n,l.related=o||e,l.relatedRect=r||ph(e),l.willInsertAfter=s,l.originalEvent=a,t.dispatchEvent(l),u&&(c=u.call(d,l,a)),c}function Sm(t){t.draggable=!1}function Im(){mm=!1}function Tm(t){for(var e=t.tagName+t.className+t.src+t.href+t.textContent,i=e.length,n=0;i--;)n+=e.charCodeAt(i);return n.toString(36)}function Om(t){return setTimeout(t,0)}function Mm(t){return clearTimeout(t)}Em.prototype={constructor:Em,_isOutsideThisEl:function(t){this.el.contains(t)||t===this.el||(nm=null)},_getDirection:function(t,e){return"function"==typeof this.options.direction?this.options.direction.call(this,t,e,jh):this.options.direction},_onTapStart:function(t){if(t.cancelable){var e=this,i=this.el,n=this.options,o=n.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=n.filter;if(function(t){pm.length=0;var e=t.getElementsByTagName("input"),i=e.length;for(;i--;){var n=e[i];n.checked&&pm.push(n)}}(i),!jh&&!(/mousedown|pointerdown/.test(r)&&0!==t.button||n.disabled)&&!l.isContentEditable&&(this.nativeDraggable||!Ju||!s||"SELECT"!==s.tagName.toUpperCase())&&!((s=ah(s,n.draggable,i,!1))&&s.animated||Vh===s)){if(Hh=bh(s),Xh=bh(s,n.draggable),"function"==typeof c){if(c.call(this,t,s,this))return zh({sortable:e,rootEl:l,name:"filter",targetEl:s,toEl:i,fromEl:i}),Lh("filter",e,{evt:t}),void(o&&t.cancelable&&t.preventDefault())}else if(c&&(c=c.split(",").some((function(n){if(n=ah(l,n.trim(),i,!1))return zh({sortable:e,rootEl:n,name:"filter",targetEl:s,fromEl:i,toEl:i}),Lh("filter",e,{evt:t}),!0}))))return void(o&&t.cancelable&&t.preventDefault());n.handle&&!ah(l,n.handle,i,!1)||this._prepareDragStart(t,a,s)}}},_prepareDragStart:function(t,e,i){var n,o=this,r=o.el,a=o.options,s=r.ownerDocument;if(i&&!jh&&i.parentNode===r){var l=ph(i);if(Ph=r,Nh=(jh=i).parentNode,Fh=jh.nextSibling,Vh=i,Wh=a.group,Em.dragged=jh,Kh={target:jh,clientX:(e||t).clientX,clientY:(e||t).clientY},tm=Kh.clientX-l.left,em=Kh.clientY-l.top,this._lastX=(e||t).clientX,this._lastY=(e||t).clientY,jh.style["will-change"]="all",n=function(){Lh("delayEnded",o,{evt:t}),Em.eventCanceled?o._onDrop():(o._disableDelayedDragEvents(),!Zu&&o.nativeDraggable&&(jh.draggable=!0),o._triggerDragStart(t,e),zh({sortable:o,name:"choose",originalEvent:t}),ch(jh,a.chosenClass,!0))},a.ignore.split(",").forEach((function(t){hh(jh,t.trim(),Sm)})),ih(s,"dragover",km),ih(s,"mousemove",km),ih(s,"touchmove",km),ih(s,"mouseup",o._onDrop),ih(s,"touchend",o._onDrop),ih(s,"touchcancel",o._onDrop),Zu&&this.nativeDraggable&&(this.options.touchStartThreshold=4,jh.draggable=!0),Lh("delayStart",this,{evt:t}),!a.delay||a.delayOnTouchOnly&&!e||this.nativeDraggable&&(Ku||Gu))n();else{if(Em.eventCanceled)return void this._onDrop();ih(s,"mouseup",o._disableDelayedDrag),ih(s,"touchend",o._disableDelayedDrag),ih(s,"touchcancel",o._disableDelayedDrag),ih(s,"mousemove",o._delayedDragTouchMoveHandler),ih(s,"touchmove",o._delayedDragTouchMoveHandler),a.supportPointer&&ih(s,"pointermove",o._delayedDragTouchMoveHandler),o._dragStartTimer=setTimeout(n,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(){jh&&Sm(jh),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var t=this.el.ownerDocument;nh(t,"mouseup",this._disableDelayedDrag),nh(t,"touchend",this._disableDelayedDrag),nh(t,"touchcancel",this._disableDelayedDrag),nh(t,"mousemove",this._delayedDragTouchMoveHandler),nh(t,"touchmove",this._delayedDragTouchMoveHandler),nh(t,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(t,e){e=e||"touch"==t.pointerType&&t,!this.nativeDraggable||e?this.options.supportPointer?ih(document,"pointermove",this._onTouchMove):ih(document,e?"touchmove":"mousemove",this._onTouchMove):(ih(jh,"dragend",this),ih(Ph,"dragstart",this._onDragStart));try{document.selection?Om((function(){document.selection.empty()})):window.getSelection().removeAllRanges()}catch(t){}},_dragStarted:function(t,e){if(sm=!1,Ph&&jh){Lh("dragStarted",this,{evt:e}),this.nativeDraggable&&ih(document,"dragover",$m);var i=this.options;!t&&ch(jh,i.dragClass,!1),ch(jh,i.ghostClass,!0),Em.active=this,t&&this._appendGhost(),zh({sortable:this,name:"start",originalEvent:e})}else this._nulling()},_emulateDragOver:function(){if(Zh){this._lastX=Zh.clientX,this._lastY=Zh.clientY,wm();for(var t=document.elementFromPoint(Zh.clientX,Zh.clientY),e=t;t&&t.shadowRoot&&(t=t.shadowRoot.elementFromPoint(Zh.clientX,Zh.clientY))!==e;)e=t;if(jh.parentNode[Ah]._isOutsideThisEl(t),e)do{if(e[Ah]){if(e[Ah]._onDragOver({clientX:Zh.clientX,clientY:Zh.clientY,target:t,rootEl:e})&&!this.options.dragoverBubble)break}t=e}while(e=e.parentNode);Cm()}},_onTouchMove:function(t){if(Kh){var e=this.options,i=e.fallbackTolerance,n=e.fallbackOffset,o=t.touches?t.touches[0]:t,r=Rh&&uh(Rh,!0),a=Rh&&r&&r.a,s=Rh&&r&&r.d,l=gm&&am&&vh(am),c=(o.clientX-Kh.clientX+n.x)/(a||1)+(l?l[0]-hm[0]:0)/(a||1),d=(o.clientY-Kh.clientY+n.y)/(s||1)+(l?l[1]-hm[1]:0)/(s||1);if(!Em.active&&!sm){if(i&&Math.max(Math.abs(o.clientX-this._lastX),Math.abs(o.clientY-this._lastY))n.right+o||t.clientX<=n.right&&t.clientY>n.bottom&&t.clientX>=n.left:t.clientX>n.right&&t.clientY>n.top||t.clientX<=n.right&&t.clientY>n.bottom+o}(t,o,this)&&!f.animated){if(f===jh)return O(!1);if(f&&r===t.target&&(a=f),a&&(i=ph(a)),!1!==Am(Ph,r,jh,e,a,i,t,!!a))return T(),f&&f.nextSibling?r.insertBefore(jh,f.nextSibling):r.appendChild(jh),Nh=r,M(),O(!0)}else if(f&&function(t,e,i){var n=ph(gh(i.el,0,i.options,!0)),o=10;return e?t.clientXd+c*r/2:lu-rm)return-om}else if(l>d+c*(1-o)/2&&lu-c*r/2))return l>d+c/2?1:-1;return 0}(t,a,i,o,x?1:s.swapThreshold,null==s.invertedSwapThreshold?s.swapThreshold:s.invertedSwapThreshold,um,nm===a),0!==_){var $=bh(jh);do{$-=_,v=Nh.children[$]}while(v&&("none"===dh(v,"display")||v===Rh))}if(0===_||v===a)return O(!1);nm=a,om=_;var E=a.nextElementSibling,A=!1,S=Am(Ph,r,jh,e,a,i,t,A=1===_);if(!1!==S)return 1!==S&&-1!==S||(A=1===S),mm=!0,setTimeout(Im,30),T(),A&&!E?r.appendChild(jh):a.parentNode.insertBefore(jh,A?E:a),C&&Ch(C,0,k-C.scrollTop),Nh=jh.parentNode,void 0===b||um||(rm=Math.abs(b-ph(a)[w])),M(),O(!0)}if(r.contains(jh))return O(!1)}return!1}function I(s,l){Lh(s,m,Vu({evt:t,isOwner:d,axis:o?"vertical":"horizontal",revert:n,dragRect:e,targetRect:i,canSort:u,fromSortable:h,target:a,completed:O,onMove:function(i,n){return Am(Ph,r,jh,e,i,ph(i),t,n)},changed:M},l))}function T(){I("dragOverAnimationCapture"),m.captureAnimationState(),m!==h&&h.captureAnimationState()}function O(e){return I("dragOverCompleted",{insertion:e}),e&&(d?c._hideClone():c._showClone(m),m!==h&&(ch(jh,Gh?Gh.options.ghostClass:c.options.ghostClass,!1),ch(jh,s.ghostClass,!0)),Gh!==m&&m!==Em.active?Gh=m:m===Em.active&&Gh&&(Gh=null),h===m&&(m._ignoreWhileAnimating=a),m.animateAll((function(){I("dragOverAnimationComplete"),m._ignoreWhileAnimating=null})),m!==h&&(h.animateAll(),h._ignoreWhileAnimating=null)),(a===jh&&!jh.animated||a===r&&!a.animated)&&(nm=null),s.dragoverBubble||t.rootEl||a===document||(jh.parentNode[Ah]._isOutsideThisEl(t.target),!e&&km(t)),!s.dragoverBubble&&t.stopPropagation&&t.stopPropagation(),p=!0}function M(){Yh=bh(jh),qh=bh(jh,s.draggable),zh({sortable:m,name:"change",toEl:r,newIndex:Yh,newDraggableIndex:qh,originalEvent:t})}},_ignoreWhileAnimating:null,_offMoveEvents:function(){nh(document,"mousemove",this._onTouchMove),nh(document,"touchmove",this._onTouchMove),nh(document,"pointermove",this._onTouchMove),nh(document,"dragover",km),nh(document,"mousemove",km),nh(document,"touchmove",km)},_offUpEvents:function(){var t=this.el.ownerDocument;nh(t,"mouseup",this._onDrop),nh(t,"touchend",this._onDrop),nh(t,"pointerup",this._onDrop),nh(t,"touchcancel",this._onDrop),nh(document,"selectstart",this)},_onDrop:function(t){var e=this.el,i=this.options;Yh=bh(jh),qh=bh(jh,i.draggable),Lh("drop",this,{evt:t}),Nh=jh&&jh.parentNode,Yh=bh(jh),qh=bh(jh,i.draggable),Em.eventCanceled||(sm=!1,um=!1,dm=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),Mm(this.cloneId),Mm(this._dragStartId),this.nativeDraggable&&(nh(document,"drop",this),nh(e,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),Ju&&dh(document.body,"user-select",""),dh(jh,"transform",""),t&&(im&&(t.cancelable&&t.preventDefault(),!i.dropBubble&&t.stopPropagation()),Rh&&Rh.parentNode&&Rh.parentNode.removeChild(Rh),(Ph===Nh||Gh&&"clone"!==Gh.lastPutMode)&&Bh&&Bh.parentNode&&Bh.parentNode.removeChild(Bh),jh&&(this.nativeDraggable&&nh(jh,"dragend",this),Sm(jh),jh.style["will-change"]="",im&&!sm&&ch(jh,Gh?Gh.options.ghostClass:this.options.ghostClass,!1),ch(jh,this.options.chosenClass,!1),zh({sortable:this,name:"unchoose",toEl:Nh,newIndex:null,newDraggableIndex:null,originalEvent:t}),Ph!==Nh?(Yh>=0&&(zh({rootEl:Nh,name:"add",toEl:Nh,fromEl:Ph,originalEvent:t}),zh({sortable:this,name:"remove",toEl:Nh,originalEvent:t}),zh({rootEl:Nh,name:"sort",toEl:Nh,fromEl:Ph,originalEvent:t}),zh({sortable:this,name:"sort",toEl:Nh,originalEvent:t})),Gh&&Gh.save()):Yh!==Hh&&Yh>=0&&(zh({sortable:this,name:"update",toEl:Nh,originalEvent:t}),zh({sortable:this,name:"sort",toEl:Nh,originalEvent:t})),Em.active&&(null!=Yh&&-1!==Yh||(Yh=Hh,qh=Xh),zh({sortable:this,name:"end",toEl:Nh,originalEvent:t}),this.save())))),this._nulling()},_nulling:function(){Lh("nulling",this),Ph=jh=Nh=Rh=Fh=Bh=Vh=Uh=Kh=Zh=im=Yh=qh=Hh=Xh=nm=om=Gh=Wh=Em.dragged=Em.ghost=Em.clone=Em.active=null,pm.forEach((function(t){t.checked=!0})),pm.length=Jh=Qh=0},handleEvent:function(t){switch(t.type){case"drop":case"dragend":this._onDrop(t);break;case"dragenter":case"dragover":jh&&(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=[],i=this.el.children,n=0,o=i.length,r=this.options;n1&&(tp.forEach((function(t){n.addAnimationState({target:t,rect:np?ph(t):o}),Eh(t),t.fromRect=o,e.removeAnimationState(t)})),np=!1,function(t,e){tp.forEach((function(i,n){var o=e.children[i.sortableIndex+(t?Number(n):0)];o?e.insertBefore(i,o):e.appendChild(i)}))}(!this.options.removeCloneOnHide,i))},dragOverCompleted:function(t){var e=t.sortable,i=t.isOwner,n=t.insertion,o=t.activeSortable,r=t.parentEl,a=t.putSortable,s=this.options;if(n){if(i&&o._hideClone(),ip=!1,s.animation&&tp.length>1&&(np||!i&&!o.options.sort&&!a)){var l=ph(Zm,!1,!0,!0);tp.forEach((function(t){t!==Zm&&($h(t,l),r.appendChild(t))})),np=!0}if(!i)if(np||ap(),tp.length>1){var c=Qm;o._showClone(e),o.options.animation&&!Qm&&c&&ep.forEach((function(t){o.addAnimationState({target:t,rect:Jm}),t.fromRect=Jm,t.thisAnimationDuration=null}))}else o._showClone(e)}},dragOverAnimationCapture:function(t){var e=t.dragRect,i=t.isOwner,n=t.activeSortable;if(tp.forEach((function(t){t.thisAnimationDuration=null})),n.options.animation&&!i&&n.multiDrag.isMultiDrag){Jm=Hu({},e);var o=uh(Zm,!0);Jm.top-=o.f,Jm.left-=o.e}},dragOverAnimationComplete:function(){np&&(np=!1,ap())},drop:function(t){var e=t.originalEvent,i=t.rootEl,n=t.parentEl,o=t.sortable,r=t.dispatchSortableEvent,a=t.oldIndex,s=t.putSortable,l=s||this.sortable;if(e){var c=this.options,d=n.children;if(!op)if(c.multiDragKey&&!this.multiDragKeyDown&&this._deselectMultiDrag(),ch(Zm,c.selectedClass,!~tp.indexOf(Zm)),~tp.indexOf(Zm))tp.splice(tp.indexOf(Zm),1),Gm=null,Mh({sortable:o,rootEl:i,name:"deselect",targetEl:Zm,originalEvent:e});else{if(tp.push(Zm),Mh({sortable:o,rootEl:i,name:"select",targetEl:Zm,originalEvent:e}),e.shiftKey&&Gm&&o.el.contains(Gm)){var u,h,m=bh(Gm),p=bh(Zm);if(~m&&~p&&m!==p)for(p>m?(h=m,u=p):(h=p,u=m+1);h1){var f=ph(Zm),g=bh(Zm,":not(."+this.options.selectedClass+")");if(!ip&&c.animation&&(Zm.thisAnimationDuration=null),l.captureAnimationState(),!ip&&(c.animation&&(Zm.fromRect=f,tp.forEach((function(t){if(t.thisAnimationDuration=null,t!==Zm){var e=np?ph(t):f;t.fromRect=e,l.addAnimationState({target:t,rect:e})}}))),ap(),tp.forEach((function(t){d[g]?n.insertBefore(t,d[g]):n.appendChild(t),g++})),a===bh(Zm))){var _=!1;tp.forEach((function(t){t.sortableIndex===bh(t)||(_=!0)})),_&&r("update")}tp.forEach((function(t){Eh(t)})),l.animateAll()}Km=l}(i===n||s&&"clone"!==s.lastPutMode)&&ep.forEach((function(t){t.parentNode&&t.parentNode.removeChild(t)}))}},nullingGlobal:function(){this.isMultiDrag=op=!1,ep.length=0},destroyGlobal:function(){this._deselectMultiDrag(),nh(document,"pointerup",this._deselectMultiDrag),nh(document,"mouseup",this._deselectMultiDrag),nh(document,"touchend",this._deselectMultiDrag),nh(document,"keydown",this._checkKeyDown),nh(document,"keyup",this._checkKeyUp)},_deselectMultiDrag:function(t){if(!(void 0!==op&&op||Km!==this.sortable||t&&ah(t.target,this.options.draggable,this.sortable.el,!1)||t&&0!==t.button))for(;tp.length;){var e=tp[0];ch(e,this.options.selectedClass,!1),tp.shift(),Mh({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)}},Hu(t,{pluginName:"multiDrag",utils:{select:function(t){var e=t.parentNode[Ah];e&&e.options.multiDrag&&!~tp.indexOf(t)&&(Km&&Km!==e&&(Km.multiDrag._deselectMultiDrag(),Km=e),ch(t,e.options.selectedClass,!0),tp.push(t))},deselect:function(t){var e=t.parentNode[Ah],i=tp.indexOf(t);e&&e.options.multiDrag&&~i&&(ch(t,e.options.selectedClass,!1),tp.splice(i,1))}},eventProperties:function(){var t=this,e=[],i=[];return tp.forEach((function(n){var o;e.push({multiDragElement:n,index:n.sortableIndex}),o=np&&n!==Zm?-1:np?bh(n,":not(."+t.options.selectedClass+")"):bh(n),i.push({multiDragElement:n,index:o})})),{items:Xu(tp),clones:[].concat(ep),oldIndicies:e,newIndicies:i}},optionListeners:{multiDragKey:function(t){return"ctrl"===(t=t.toLowerCase())?t="Control":t.length>1&&(t=t.charAt(0).toUpperCase()+t.substr(1)),t}}})},OnSpill:Wm,Sortable:Em,Swap:function(){function t(){this.defaults={swapClass:"sortable-swap-highlight"}}return t.prototype={dragStart:function(t){var e=t.dragEl;qm=e},dragOverValid:function(t){var e=t.completed,i=t.target,n=t.onMove,o=t.activeSortable,r=t.changed,a=t.cancel;if(o.options.swap){var s=this.sortable.el,l=this.options;if(i&&i!==s){var c=qm;!1!==n(i)?(ch(i,l.swapClass,!0),qm=i):qm=null,c&&c!==qm&&ch(c,l.swapClass,!1)}r(),e(!0),a()}},drop:function(t){var e=t.activeSortable,i=t.putSortable,n=t.dragEl,o=i||this.sortable,r=this.options;qm&&ch(qm,r.swapClass,!1),qm&&(r.swap||i&&i.options.swap)&&n!==qm&&(o.captureAnimationState(),o!==e&&e.captureAnimationState(),function(t,e){var i,n,o=t.parentNode,r=e.parentNode;if(!o||!r||o.isEqualNode(e)||r.isEqualNode(t))return;i=bh(t),n=bh(e),o.isEqualNode(r)&&i=0||(o[i]=t[i]);return o}(t,e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(t,i)&&(o[i]=t[i])}return o}function Sp(t){return function(t){if(Array.isArray(t))return Ip(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return Ip(t,e);var i=Object.prototype.toString.call(t).slice(8,-1);"Object"===i&&t.constructor&&(i=t.constructor.name);if("Map"===i||"Set"===i)return Array.from(t);if("Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return Ip(t,e)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ip(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,n=new Array(e);i"===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(t){return!1}return!1}}function Fp(t){return t.host&&t!==document&&t.host.nodeType?t.host:t.parentNode}function Bp(t,e,i,n){if(t){i=i||document;do{if(null!=e&&(">"===e[0]?t.parentNode===i&&Rp(t,e):Rp(t,e))||n&&t===i)return t;if(t===i)break}while(t=Fp(t))}return null}var Up,Hp=/\s+/g;function Yp(t,e,i){if(t&&e)if(t.classList)t.classList[i?"add":"remove"](e);else{var n=(" "+t.className+" ").replace(Hp," ").replace(" "+e+" "," ");t.className=(n+(i?" "+e:"")).replace(Hp," ")}}function Xp(t,e,i){var n=t&&t.style;if(n){if(void 0===i)return document.defaultView&&document.defaultView.getComputedStyle?i=document.defaultView.getComputedStyle(t,""):t.currentStyle&&(i=t.currentStyle),void 0===e?i:i[e];e in n||-1!==e.indexOf("webkit")||(e="-webkit-"+e),n[e]=i+("string"==typeof i?"":"px")}}function Wp(t,e){var i="";if("string"==typeof t)i=t;else do{var n=Xp(t,"transform");n&&"none"!==n&&(i=n+" "+i)}while(!e&&(t=t.parentNode));var o=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return o&&new o(i)}function qp(t,e,i){if(t){var n=t.getElementsByTagName(e),o=0,r=n.length;if(i)for(;o=r:o<=r))return n;if(n===Kp())break;n=nf(n,!1)}return!1}function Jp(t,e,i,n){for(var o=0,r=0,a=t.children;r2&&void 0!==arguments[2]?arguments[2]:{},n=i.evt,o=Ap(i,gf);pf.pluginEvent.bind(cg)(t,e,kp({dragEl:bf,parentEl:yf,ghostEl:xf,rootEl:wf,nextEl:kf,lastDownEl:Cf,cloneEl:$f,cloneHidden:Ef,dragStarted:Vf,putSortable:Of,activeSortable:cg.active,originalEvent:n,oldIndex:Af,oldDraggableIndex:If,newIndex:Sf,newDraggableIndex:Tf,hideGhostForTarget:rg,unhideGhostForTarget:ag,cloneNowHidden:function(){Ef=!0},cloneNowShown:function(){Ef=!1},dispatchSortableEvent:function(t){vf({sortable:e,name:t,originalEvent:n})}},o))};function vf(t){ff(kp({putSortable:Of,cloneEl:$f,targetEl:bf,rootEl:wf,oldIndex:Af,oldDraggableIndex:If,newIndex:Sf,newDraggableIndex:Tf},t))}var bf,yf,xf,wf,kf,Cf,$f,Ef,Af,Sf,If,Tf,zf,Of,Mf,Lf,Df,jf,Pf,Nf,Vf,Rf,Ff,Bf,Uf,Hf=!1,Yf=!1,Xf=[],Wf=!1,qf=!1,Kf=[],Gf=!1,Zf=[],Jf="undefined"!=typeof document,Qf=Dp,tg=Op||zp?"cssFloat":"float",eg=Jf&&!jp&&!Dp&&"draggable"in document.createElement("div"),ig=function(){if(Jf){if(zp)return!1;var t=document.createElement("x");return t.style.cssText="pointer-events:auto","auto"===t.style.pointerEvents}}(),ng=function(t,e){var i=Xp(t),n=parseInt(i.width)-parseInt(i.paddingLeft)-parseInt(i.paddingRight)-parseInt(i.borderLeftWidth)-parseInt(i.borderRightWidth),o=Jp(t,0,e),r=Jp(t,1,e),a=o&&Xp(o),l=r&&Xp(r),s=a&&parseInt(a.marginLeft)+parseInt(a.marginRight)+Gp(o).width,c=l&&parseInt(l.marginLeft)+parseInt(l.marginRight)+Gp(r).width;if("flex"===i.display)return"column"===i.flexDirection||"column-reverse"===i.flexDirection?"vertical":"horizontal";if("grid"===i.display)return i.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(o&&a.float&&"none"!==a.float){var d="left"===a.float?"left":"right";return!r||"both"!==l.clear&&l.clear!==d?"horizontal":"vertical"}return o&&("block"===a.display||"flex"===a.display||"table"===a.display||"grid"===a.display||s>=n&&"none"===i[tg]||r&&"none"===i[tg]&&s+c>n)?"vertical":"horizontal"},og=function(t){function e(t,i){return function(n,o,r,a){var l=n.options.group.name&&o.options.group.name&&n.options.group.name===o.options.group.name;if(null==t&&(i||l))return!0;if(null==t||!1===t)return!1;if(i&&"clone"===t)return t;if("function"==typeof t)return e(t(n,o,r,a),i)(n,o,r,a);var s=(i?n:o).options.group.name;return!0===t||"string"==typeof t&&t===s||t.join&&t.indexOf(s)>-1}}var i={},n=t.group;n&&"object"==Cp(n)||(n={name:n}),i.name=n.name,i.checkPull=e(n.pull,!0),i.checkPut=e(n.put),i.revertClone=n.revertClone,t.group=i},rg=function(){!ig&&xf&&Xp(xf,"display","none")},ag=function(){!ig&&xf&&Xp(xf,"display","")};Jf&&!jp&&document.addEventListener("click",(function(t){if(Yf)return t.preventDefault(),t.stopPropagation&&t.stopPropagation(),t.stopImmediatePropagation&&t.stopImmediatePropagation(),Yf=!1,!1}),!0);var lg=function(t){if(bf){var e=function(t,e){var i;return Xf.some((function(n){var o=n[df].options.emptyInsertThreshold;if(o&&!Qp(n)){var r=Gp(n),a=t>=r.left-o&&t<=r.right+o,l=e>=r.top-o&&e<=r.bottom+o;return a&&l?i=n:void 0}})),i}((t=t.touches?t.touches[0]:t).clientX,t.clientY);if(e){var i={};for(var n in t)t.hasOwnProperty(n)&&(i[n]=t[n]);i.target=i.rootEl=e,i.preventDefault=void 0,i.stopPropagation=void 0,e[df]._onDragOver(i)}}},sg=function(t){bf&&bf.parentNode[df]._isOutsideThisEl(t.target)};function cg(t,e){if(!t||!t.nodeType||1!==t.nodeType)throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(t));this.el=t,this.options=e=Ep({},e),t[df]=this;var i={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(t.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return ng(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!==cg.supportPointer&&"PointerEvent"in window&&!Lp,emptyInsertThreshold:5};for(var n in pf.initializePlugins(this,t,i),i)!(n in e)&&(e[n]=i[n]);for(var o in og(e),this)"_"===o.charAt(0)&&"function"==typeof this[o]&&(this[o]=this[o].bind(this));this.nativeDraggable=!e.forceFallback&&eg,this.nativeDraggable&&(this.options.touchStartThreshold=1),e.supportPointer?Np(t,"pointerdown",this._onTapStart):(Np(t,"mousedown",this._onTapStart),Np(t,"touchstart",this._onTapStart)),this.nativeDraggable&&(Np(t,"dragover",this),Np(t,"dragenter",this)),Xf.push(this.el),e.store&&e.store.get&&this.sort(e.store.get(this)||[]),Ep(this,uf())}function dg(t,e,i,n,o,r,a,l){var s,c,d=t[df],u=d.options.onMove;return!window.CustomEvent||zp||Op?(s=document.createEvent("Event")).initEvent("move",!0,!0):s=new CustomEvent("move",{bubbles:!0,cancelable:!0}),s.to=e,s.from=t,s.dragged=i,s.draggedRect=n,s.related=o||e,s.relatedRect=r||Gp(e),s.willInsertAfter=l,s.originalEvent=a,t.dispatchEvent(s),u&&(c=u.call(d,s,a)),c}function ug(t){t.draggable=!1}function hg(){Gf=!1}function mg(t){for(var e=t.tagName+t.className+t.src+t.href+t.textContent,i=e.length,n=0;i--;)n+=e.charCodeAt(i);return n.toString(36)}function pg(t){return setTimeout(t,0)}function fg(t){return clearTimeout(t)}cg.prototype={constructor:cg,_isOutsideThisEl:function(t){this.el.contains(t)||t===this.el||(Rf=null)},_getDirection:function(t,e){return"function"==typeof this.options.direction?this.options.direction.call(this,t,e,bf):this.options.direction},_onTapStart:function(t){if(t.cancelable){var e=this,i=this.el,n=this.options,o=n.preventOnFilter,r=t.type,a=t.touches&&t.touches[0]||t.pointerType&&"touch"===t.pointerType&&t,l=(a||t).target,s=t.target.shadowRoot&&(t.path&&t.path[0]||t.composedPath&&t.composedPath()[0])||l,c=n.filter;if(function(t){Zf.length=0;var e=t.getElementsByTagName("input"),i=e.length;for(;i--;){var n=e[i];n.checked&&Zf.push(n)}}(i),!bf&&!(/mousedown|pointerdown/.test(r)&&0!==t.button||n.disabled)&&!s.isContentEditable&&(this.nativeDraggable||!Lp||!l||"SELECT"!==l.tagName.toUpperCase())&&!((l=Bp(l,n.draggable,i,!1))&&l.animated||Cf===l)){if(Af=tf(l),If=tf(l,n.draggable),"function"==typeof c){if(c.call(this,t,l,this))return vf({sortable:e,rootEl:s,name:"filter",targetEl:l,toEl:i,fromEl:i}),_f("filter",e,{evt:t}),void(o&&t.cancelable&&t.preventDefault())}else if(c&&(c=c.split(",").some((function(n){if(n=Bp(s,n.trim(),i,!1))return vf({sortable:e,rootEl:n,name:"filter",targetEl:l,fromEl:i,toEl:i}),_f("filter",e,{evt:t}),!0}))))return void(o&&t.cancelable&&t.preventDefault());n.handle&&!Bp(s,n.handle,i,!1)||this._prepareDragStart(t,a,l)}}},_prepareDragStart:function(t,e,i){var n,o=this,r=o.el,a=o.options,l=r.ownerDocument;if(i&&!bf&&i.parentNode===r){var s=Gp(i);if(wf=r,yf=(bf=i).parentNode,kf=bf.nextSibling,Cf=i,zf=a.group,cg.dragged=bf,Mf={target:bf,clientX:(e||t).clientX,clientY:(e||t).clientY},Pf=Mf.clientX-s.left,Nf=Mf.clientY-s.top,this._lastX=(e||t).clientX,this._lastY=(e||t).clientY,bf.style["will-change"]="all",n=function(){_f("delayEnded",o,{evt:t}),cg.eventCanceled?o._onDrop():(o._disableDelayedDragEvents(),!Mp&&o.nativeDraggable&&(bf.draggable=!0),o._triggerDragStart(t,e),vf({sortable:o,name:"choose",originalEvent:t}),Yp(bf,a.chosenClass,!0))},a.ignore.split(",").forEach((function(t){qp(bf,t.trim(),ug)})),Np(l,"dragover",lg),Np(l,"mousemove",lg),Np(l,"touchmove",lg),Np(l,"mouseup",o._onDrop),Np(l,"touchend",o._onDrop),Np(l,"touchcancel",o._onDrop),Mp&&this.nativeDraggable&&(this.options.touchStartThreshold=4,bf.draggable=!0),_f("delayStart",this,{evt:t}),!a.delay||a.delayOnTouchOnly&&!e||this.nativeDraggable&&(Op||zp))n();else{if(cg.eventCanceled)return void this._onDrop();Np(l,"mouseup",o._disableDelayedDrag),Np(l,"touchend",o._disableDelayedDrag),Np(l,"touchcancel",o._disableDelayedDrag),Np(l,"mousemove",o._delayedDragTouchMoveHandler),Np(l,"touchmove",o._delayedDragTouchMoveHandler),a.supportPointer&&Np(l,"pointermove",o._delayedDragTouchMoveHandler),o._dragStartTimer=setTimeout(n,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(){bf&&ug(bf),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var t=this.el.ownerDocument;Vp(t,"mouseup",this._disableDelayedDrag),Vp(t,"touchend",this._disableDelayedDrag),Vp(t,"touchcancel",this._disableDelayedDrag),Vp(t,"mousemove",this._delayedDragTouchMoveHandler),Vp(t,"touchmove",this._delayedDragTouchMoveHandler),Vp(t,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(t,e){e=e||"touch"==t.pointerType&&t,!this.nativeDraggable||e?this.options.supportPointer?Np(document,"pointermove",this._onTouchMove):Np(document,e?"touchmove":"mousemove",this._onTouchMove):(Np(bf,"dragend",this),Np(wf,"dragstart",this._onDragStart));try{document.selection?pg((function(){document.selection.empty()})):window.getSelection().removeAllRanges()}catch(t){}},_dragStarted:function(t,e){if(Hf=!1,wf&&bf){_f("dragStarted",this,{evt:e}),this.nativeDraggable&&Np(document,"dragover",sg);var i=this.options;!t&&Yp(bf,i.dragClass,!1),Yp(bf,i.ghostClass,!0),cg.active=this,t&&this._appendGhost(),vf({sortable:this,name:"start",originalEvent:e})}else this._nulling()},_emulateDragOver:function(){if(Lf){this._lastX=Lf.clientX,this._lastY=Lf.clientY,rg();for(var t=document.elementFromPoint(Lf.clientX,Lf.clientY),e=t;t&&t.shadowRoot&&(t=t.shadowRoot.elementFromPoint(Lf.clientX,Lf.clientY))!==e;)e=t;if(bf.parentNode[df]._isOutsideThisEl(t),e)do{if(e[df]){if(e[df]._onDragOver({clientX:Lf.clientX,clientY:Lf.clientY,target:t,rootEl:e})&&!this.options.dragoverBubble)break}t=e}while(e=e.parentNode);ag()}},_onTouchMove:function(t){if(Mf){var e=this.options,i=e.fallbackTolerance,n=e.fallbackOffset,o=t.touches?t.touches[0]:t,r=xf&&Wp(xf,!0),a=xf&&r&&r.a,l=xf&&r&&r.d,s=Qf&&Uf&&ef(Uf),c=(o.clientX-Mf.clientX+n.x)/(a||1)+(s?s[0]-Kf[0]:0)/(a||1),d=(o.clientY-Mf.clientY+n.y)/(l||1)+(s?s[1]-Kf[1]:0)/(l||1);if(!cg.active&&!Hf){if(i&&Math.max(Math.abs(o.clientX-this._lastX),Math.abs(o.clientY-this._lastY))n.right+o||t.clientX<=n.right&&t.clientY>n.bottom&&t.clientX>=n.left:t.clientX>n.right&&t.clientY>n.top||t.clientX<=n.right&&t.clientY>n.bottom+o}(t,o,this)&&!f.animated){if(f===bf)return z(!1);if(f&&r===t.target&&(a=f),a&&(i=Gp(a)),!1!==dg(wf,r,bf,e,a,i,t,!!a))return T(),f&&f.nextSibling?r.insertBefore(bf,f.nextSibling):r.appendChild(bf),yf=r,O(),z(!0)}else if(f&&function(t,e,i){var n=Gp(Jp(i.el,0,i.options,!0)),o=10;return e?t.clientXd+c*r/2:su-Bf)return-Ff}else if(s>d+c*(1-o)/2&&su-c*r/2))return s>d+c/2?1:-1;return 0}(t,a,i,o,x?1:l.swapThreshold,null==l.invertedSwapThreshold?l.swapThreshold:l.invertedSwapThreshold,qf,Rf===a),0!==_){var $=tf(bf);do{$-=_,b=yf.children[$]}while(b&&("none"===Xp(b,"display")||b===xf))}if(0===_||b===a)return z(!1);Rf=a,Ff=_;var E=a.nextElementSibling,A=!1,S=dg(wf,r,bf,e,a,i,t,A=1===_);if(!1!==S)return 1!==S&&-1!==S||(A=1===S),Gf=!0,setTimeout(hg,30),T(),A&&!E?r.appendChild(bf):a.parentNode.insertBefore(bf,A?E:a),k&&af(k,0,C-k.scrollTop),yf=bf.parentNode,void 0===v||qf||(Bf=Math.abs(v-Gp(a)[w])),O(),z(!0)}if(r.contains(bf))return z(!1)}return!1}function I(l,s){_f(l,m,kp({evt:t,isOwner:d,axis:o?"vertical":"horizontal",revert:n,dragRect:e,targetRect:i,canSort:u,fromSortable:h,target:a,completed:z,onMove:function(i,n){return dg(wf,r,bf,e,i,Gp(i),t,n)},changed:O},s))}function T(){I("dragOverAnimationCapture"),m.captureAnimationState(),m!==h&&h.captureAnimationState()}function z(e){return I("dragOverCompleted",{insertion:e}),e&&(d?c._hideClone():c._showClone(m),m!==h&&(Yp(bf,Of?Of.options.ghostClass:c.options.ghostClass,!1),Yp(bf,l.ghostClass,!0)),Of!==m&&m!==cg.active?Of=m:m===cg.active&&Of&&(Of=null),h===m&&(m._ignoreWhileAnimating=a),m.animateAll((function(){I("dragOverAnimationComplete"),m._ignoreWhileAnimating=null})),m!==h&&(h.animateAll(),h._ignoreWhileAnimating=null)),(a===bf&&!bf.animated||a===r&&!a.animated)&&(Rf=null),l.dragoverBubble||t.rootEl||a===document||(bf.parentNode[df]._isOutsideThisEl(t.target),!e&&lg(t)),!l.dragoverBubble&&t.stopPropagation&&t.stopPropagation(),p=!0}function O(){Sf=tf(bf),Tf=tf(bf,l.draggable),vf({sortable:m,name:"change",toEl:r,newIndex:Sf,newDraggableIndex:Tf,originalEvent:t})}},_ignoreWhileAnimating:null,_offMoveEvents:function(){Vp(document,"mousemove",this._onTouchMove),Vp(document,"touchmove",this._onTouchMove),Vp(document,"pointermove",this._onTouchMove),Vp(document,"dragover",lg),Vp(document,"mousemove",lg),Vp(document,"touchmove",lg)},_offUpEvents:function(){var t=this.el.ownerDocument;Vp(t,"mouseup",this._onDrop),Vp(t,"touchend",this._onDrop),Vp(t,"pointerup",this._onDrop),Vp(t,"touchcancel",this._onDrop),Vp(document,"selectstart",this)},_onDrop:function(t){var e=this.el,i=this.options;Sf=tf(bf),Tf=tf(bf,i.draggable),_f("drop",this,{evt:t}),yf=bf&&bf.parentNode,Sf=tf(bf),Tf=tf(bf,i.draggable),cg.eventCanceled||(Hf=!1,qf=!1,Wf=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),fg(this.cloneId),fg(this._dragStartId),this.nativeDraggable&&(Vp(document,"drop",this),Vp(e,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),Lp&&Xp(document.body,"user-select",""),Xp(bf,"transform",""),t&&(Vf&&(t.cancelable&&t.preventDefault(),!i.dropBubble&&t.stopPropagation()),xf&&xf.parentNode&&xf.parentNode.removeChild(xf),(wf===yf||Of&&"clone"!==Of.lastPutMode)&&$f&&$f.parentNode&&$f.parentNode.removeChild($f),bf&&(this.nativeDraggable&&Vp(bf,"dragend",this),ug(bf),bf.style["will-change"]="",Vf&&!Hf&&Yp(bf,Of?Of.options.ghostClass:this.options.ghostClass,!1),Yp(bf,this.options.chosenClass,!1),vf({sortable:this,name:"unchoose",toEl:yf,newIndex:null,newDraggableIndex:null,originalEvent:t}),wf!==yf?(Sf>=0&&(vf({rootEl:yf,name:"add",toEl:yf,fromEl:wf,originalEvent:t}),vf({sortable:this,name:"remove",toEl:yf,originalEvent:t}),vf({rootEl:yf,name:"sort",toEl:yf,fromEl:wf,originalEvent:t}),vf({sortable:this,name:"sort",toEl:yf,originalEvent:t})),Of&&Of.save()):Sf!==Af&&Sf>=0&&(vf({sortable:this,name:"update",toEl:yf,originalEvent:t}),vf({sortable:this,name:"sort",toEl:yf,originalEvent:t})),cg.active&&(null!=Sf&&-1!==Sf||(Sf=Af,Tf=If),vf({sortable:this,name:"end",toEl:yf,originalEvent:t}),this.save())))),this._nulling()},_nulling:function(){_f("nulling",this),wf=bf=yf=xf=kf=$f=Cf=Ef=Mf=Lf=Vf=Sf=Tf=Af=If=Rf=Ff=Of=zf=cg.dragged=cg.ghost=cg.clone=cg.active=null,Zf.forEach((function(t){t.checked=!0})),Zf.length=Df=jf=0},handleEvent:function(t){switch(t.type){case"drop":case"dragend":this._onDrop(t);break;case"dragenter":case"dragover":bf&&(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=[],i=this.el.children,n=0,o=i.length,r=this.options;n1&&(Pg.forEach((function(t){n.addAnimationState({target:t,rect:Rg?Gp(t):o}),cf(t),t.fromRect=o,e.removeAnimationState(t)})),Rg=!1,function(t,e){Pg.forEach((function(i,n){var o=e.children[i.sortableIndex+(t?Number(n):0)];o?e.insertBefore(i,o):e.appendChild(i)}))}(!this.options.removeCloneOnHide,i))},dragOverCompleted:function(t){var e=t.sortable,i=t.isOwner,n=t.insertion,o=t.activeSortable,r=t.parentEl,a=t.putSortable,l=this.options;if(n){if(i&&o._hideClone(),Vg=!1,l.animation&&Pg.length>1&&(Rg||!i&&!o.options.sort&&!a)){var s=Gp(Lg,!1,!0,!0);Pg.forEach((function(t){t!==Lg&&(sf(t,s),r.appendChild(t))})),Rg=!0}if(!i)if(Rg||Ug(),Pg.length>1){var c=jg;o._showClone(e),o.options.animation&&!jg&&c&&Ng.forEach((function(t){o.addAnimationState({target:t,rect:Dg}),t.fromRect=Dg,t.thisAnimationDuration=null}))}else o._showClone(e)}},dragOverAnimationCapture:function(t){var e=t.dragRect,i=t.isOwner,n=t.activeSortable;if(Pg.forEach((function(t){t.thisAnimationDuration=null})),n.options.animation&&!i&&n.multiDrag.isMultiDrag){Dg=Ep({},e);var o=Wp(Lg,!0);Dg.top-=o.f,Dg.left-=o.e}},dragOverAnimationComplete:function(){Rg&&(Rg=!1,Ug())},drop:function(t){var e=t.originalEvent,i=t.rootEl,n=t.parentEl,o=t.sortable,r=t.dispatchSortableEvent,a=t.oldIndex,l=t.putSortable,s=l||this.sortable;if(e){var c=this.options,d=n.children;if(!Fg)if(c.multiDragKey&&!this.multiDragKeyDown&&this._deselectMultiDrag(),Yp(Lg,c.selectedClass,!~Pg.indexOf(Lg)),~Pg.indexOf(Lg))Pg.splice(Pg.indexOf(Lg),1),Og=null,ff({sortable:o,rootEl:i,name:"deselect",targetEl:Lg,originalEvent:e});else{if(Pg.push(Lg),ff({sortable:o,rootEl:i,name:"select",targetEl:Lg,originalEvent:e}),e.shiftKey&&Og&&o.el.contains(Og)){var u,h,m=tf(Og),p=tf(Lg);if(~m&&~p&&m!==p)for(p>m?(h=m,u=p):(h=p,u=m+1);h1){var f=Gp(Lg),g=tf(Lg,":not(."+this.options.selectedClass+")");if(!Vg&&c.animation&&(Lg.thisAnimationDuration=null),s.captureAnimationState(),!Vg&&(c.animation&&(Lg.fromRect=f,Pg.forEach((function(t){if(t.thisAnimationDuration=null,t!==Lg){var e=Rg?Gp(t):f;t.fromRect=e,s.addAnimationState({target:t,rect:e})}}))),Ug(),Pg.forEach((function(t){d[g]?n.insertBefore(t,d[g]):n.appendChild(t),g++})),a===tf(Lg))){var _=!1;Pg.forEach((function(t){t.sortableIndex===tf(t)||(_=!0)})),_&&r("update")}Pg.forEach((function(t){cf(t)})),s.animateAll()}Mg=s}(i===n||l&&"clone"!==l.lastPutMode)&&Ng.forEach((function(t){t.parentNode&&t.parentNode.removeChild(t)}))}},nullingGlobal:function(){this.isMultiDrag=Fg=!1,Ng.length=0},destroyGlobal:function(){this._deselectMultiDrag(),Vp(document,"pointerup",this._deselectMultiDrag),Vp(document,"mouseup",this._deselectMultiDrag),Vp(document,"touchend",this._deselectMultiDrag),Vp(document,"keydown",this._checkKeyDown),Vp(document,"keyup",this._checkKeyUp)},_deselectMultiDrag:function(t){if(!(void 0!==Fg&&Fg||Mg!==this.sortable||t&&Bp(t.target,this.options.draggable,this.sortable.el,!1)||t&&0!==t.button))for(;Pg.length;){var e=Pg[0];Yp(e,this.options.selectedClass,!1),Pg.shift(),ff({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)}},Ep(t,{pluginName:"multiDrag",utils:{select:function(t){var e=t.parentNode[df];e&&e.options.multiDrag&&!~Pg.indexOf(t)&&(Mg&&Mg!==e&&(Mg.multiDrag._deselectMultiDrag(),Mg=e),Yp(t,e.options.selectedClass,!0),Pg.push(t))},deselect:function(t){var e=t.parentNode[df],i=Pg.indexOf(t);e&&e.options.multiDrag&&~i&&(Yp(t,e.options.selectedClass,!1),Pg.splice(i,1))}},eventProperties:function(){var t=this,e=[],i=[];return Pg.forEach((function(n){var o;e.push({multiDragElement:n,index:n.sortableIndex}),o=Rg&&n!==Lg?-1:Rg?tf(n,":not(."+t.options.selectedClass+")"):tf(n),i.push({multiDragElement:n,index:o})})),{items:Sp(Pg),clones:[].concat(Ng),oldIndicies:e,newIndicies:i}},optionListeners:{multiDragKey:function(t){return"ctrl"===(t=t.toLowerCase())?t="Control":t.length>1&&(t=t.charAt(0).toUpperCase()+t.substr(1)),t}}})},OnSpill:zg,Sortable:cg,Swap:function(){function t(){this.defaults={swapClass:"sortable-swap-highlight"}}return t.prototype={dragStart:function(t){var e=t.dragEl;Tg=e},dragOverValid:function(t){var e=t.completed,i=t.target,n=t.onMove,o=t.activeSortable,r=t.changed,a=t.cancel;if(o.options.swap){var l=this.sortable.el,s=this.options;if(i&&i!==l){var c=Tg;!1!==n(i)?(Yp(i,s.swapClass,!0),Tg=i):Tg=null,c&&c!==Tg&&Yp(c,s.swapClass,!1)}r(),e(!0),a()}},drop:function(t){var e=t.activeSortable,i=t.putSortable,n=t.dragEl,o=i||this.sortable,r=this.options;Tg&&Yp(Tg,r.swapClass,!1),Tg&&(r.swap||i&&i.options.swap)&&n!==Tg&&(o.captureAnimationState(),o!==e&&e.captureAnimationState(),function(t,e){var i,n,o=t.parentNode,r=e.parentNode;if(!o||!r||o.isEqualNode(e)||r.isEqualNode(t))return;i=tf(t),n=tf(e),o.isEqualNode(r)&&i { + +console.info('NUMBERBOX_CARD 4.3'); +const html = LitElement.prototype.html; +const css = LitElement.prototype.css; +class NumberBox extends LitElement { + +constructor() { + super(); + this.bounce = false; + this.pending = false; + this.rolling = false; + this.state = 0; + this.old = {state: undefined, t:{}, h:''}; +} + +render() { + if(!this.stateObj){return html`Missing:'${this.config.entity}'`;} + if( this.config.name === undefined && this.stateObj.attributes.friendly_name ){ + this.config.name=this.stateObj.attributes.friendly_name; + } + if( this.config.icon === undefined && this.stateObj.attributes.icon ){ + this.config.icon=this.stateObj.attributes.icon; + } + if( this.config.picture === undefined && this.stateObj.attributes.entity_picture ){ + this.config.picture=this.stateObj.attributes.entity_picture; + } + if( this.config.unit === undefined && this.stateObj.attributes.unit_of_measurement ){ + this.config.unit=this.stateObj.attributes.unit_of_measurement; + } + if(this.config.min === undefined){ this.config.min=this.stateObj.attributes.min;} + if(isNaN(parseFloat(this.config.min))){this.config.min=0;} + if(this.config.max === undefined){ this.config.max=this.stateObj.attributes.max;} + if(isNaN(parseFloat(this.config.max))){this.config.max=9e9;} + if('step_entity' in this.config && this.config.step_entity in this._hass.states && !isNaN(parseFloat(this._hass.states[this.config.step_entity].state))) {this.config.step=this._hass.states[this.config.step_entity].state;} + if(this.config.step === undefined){ this.config.step=this.stateObj.attributes.step;} + + return html` + + ${(this.config.icon || this.config.picture || this.config.name) ? html`
+
+ ${this.config.picture ? html` + ` : this.config.icon ? html` + ` : null } +
+ ${this.config.name?this.config.name:''} + ${this.secondaryInfo()} +
+
${this.renderNum()}
` : this.renderNum() } +
+`; +} + +updated(x) { + if(this.old.h !=''){ + const a=this.renderRoot.querySelector('.secondary'); + if(a){a.innerHTML=this.old.h;} + } +} + + +secondaryInfo(){ + const s=this.config.secondary_info; + if(!s){return;} + let r=s; + let h=s; + if(s.indexOf('%')> -1){ + const j=s.split(' '); + for (let i in j) { + if(j[i][0]=='%'){ + j[i]=j[i].substring(1).split(':'); + let b=this._hass.states; + for (let d=0; d`; + } + } + if(h){h=r; r='';} + this.old.h=h; + return html`
${r}
`; +} + +renderNum(){ + return html` +
+
+
+ + +
+

${this.niceNum()}

+
+ + +
+
+
`; +} + +Press(v) { + if( this.config.speed>0 ){ + clearInterval(this.rolling); + if(v<2){this.rolling = setInterval(() => this.setNumb(v), this.config.speed, this);} + } +} + +timeNum(x,s,m){ + x=x+''; + if(x.indexOf(':')>0){ + x = x.split(':');s = 0; m = 1; + while (x.length > 0) { + s += m * parseInt(x.pop(), 10); + m *= 60; + } + x=s; + } + return Number(x); +} + +numTime(x,f,t,u){ + if(t=="timehm"){u=1;f=1;} + x=Math.round(x); + t = (x>=3600 || f)? Math.floor(x/3600).toString().padStart(2,'0') + ':' : ''; + t += (Math.floor(x/60)-Math.floor(x/3600)*60).toString().padStart(2,'0'); + if( !u ){ + t += ':' + Math.round(x%60).toString().padStart(2,'0'); + } + return t; +} + +setNumb(c){ + let v=this.pending; + if( v===false ){ v=this.timeNum(this.state); v=isNaN(v)?this.config.min:v;} + let adval=c?(v + Number(this.config.step)):(v - Number(this.config.step)); + adval=Math.round(adval*1e9)/1e9; + if( adval <= Number(this.config.max) && adval >= Number(this.config.min)){ + this.pending=(adval); + if(this.config.delay){ + clearTimeout(this.bounce); + this.bounce = setTimeout(this.publishNum, this.config.delay, this); + }else{ + this.publishNum(this); + } + } +} + +publishNum(dhis){ + const s=dhis.config.service.split('.'); + if(s[0]=='input_datetime'){dhis.pending=dhis.numTime(dhis.pending,1);} + const v={entity_id: dhis.config.entity, [dhis.config.param]: dhis.pending}; + dhis.pending=false; + dhis.old.state=dhis.state; + + dhis._hass.callService(s[0], s[1], v); +} + +niceNum(){ + let fix=0; let v=this.pending; + if( v === false ){ + v=this.state; + if(v=='unavailable' || ( v=='unknown' && this.config.initial === undefined ) ){return '?';} + v=this.timeNum(v); + if(isNaN(v) && this.config.initial !== undefined){ + v=Number(this.config.initial); + if(isNaN(v)){return this.config.initial;} + } + } + let stp=Number(this.config.step) || 1; + if( Math.round(stp) != stp ){ + fix=stp.toString().split(".")[1].length || 1; stp=fix; + }else{ stp=fix; } + fix = v.toFixed(fix); + const u=this.config.unit; + if( u=="time" || u=="timehm"){ + let t = this.numTime(fix,0,u); + return html`${t}`; + } + if(isNaN(Number(fix))){return fix;} + const lang={language:this._hass.language, comma_decimal:['en-US','en'], decimal_comma:['de','es','it'], space_comma:['fr','sv','cs'], system:undefined}; + let g=this._hass.locale.number_format || 'language'; + if(g!='none'){ + g=lang.hasOwnProperty(g)? lang[g] : lang.language; + fix = new Intl.NumberFormat(g, {maximumFractionDigits: stp, minimumFractionDigits: stp}).format(Number(fix)); + } + return u===false ? fix: html`${fix}${u}`; +} + + + +moreInfo() { + if(!this.config.moreinfo){return;} + const e = new Event('hass-more-info', {bubbles: true, cancelable: true, composed: true}); + e.detail = {entityId: this.config.moreinfo}; + this.dispatchEvent(e); + return e; +} + +static get properties() { + return { + _hass: {}, + config: {}, + stateObj: {}, + bounce: {}, + rolling: {}, + pending: {}, + state: {}, + old: {}, + }; +} + +static get styles() { + return css` + ha-card{ + -webkit-font-smoothing:var(--paper-font-body1_-_-webkit-font-smoothing); + font-size:var(--paper-font-body1_-_font-size); + font-weight:var(--paper-font-body1_-_font-weight); + line-height:var(--paper-font-body1_-_line-height); + padding:4px 0} + state-badge{flex:0 0 40px;} + ha-card.noborder{padding:0 !important;margin:0 !important; + box-shadow:none !important;border:none !important} + .body{ + display:grid;grid-auto-flow:column;grid-auto-columns:1fr; + place-items:center} + .main{display:flex;flex-direction:row;align-items:center;justify-content:center} + .cur-box{display:flex;align-items:center;justify-content:center;flex-direction:row-reverse} + .cur-num-box{display:flex;align-items:center} + .cur-num{ + font-size:var(--paper-font-subhead_-_font-size); + line-height:var(--paper-font-subhead_-_line-height); + font-weight:normal;margin:0} + .cur-unit{font-size:80%;opacity:0.5} + .upd{color:#f00} + .padr,.padl{padding:8px;cursor:pointer} + .grid { + display: grid; + grid-template-columns: repeat(2, auto); + } + .grid-content { + display: grid; align-items: center; + } + .grid-left { + cursor: pointer; + flex-direction: row; + display: flex; + overflow: hidden; + } + .info{ + margin-left: 16px; + margin-right: 8px; + text-align: left; + font-size: var(--paper-font-body1_-_font-size); + flex: 1 0 30%; + } + .info, .info > * { + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; + } + .grid-right .body{margin-left:auto} + .grid-right { + text-align: right + } + .secondary{ + color:var(--secondary-text-color); + white-space: normal;} + `; +} + +getCardSize() { + return 1; +} + +setConfig(config) { + if (!config.entity) throw new Error('Please define an entity.'); + const c=config.entity.split('.')[0]; + if (!(config.service || c == 'input_number' || c == 'number')){ + throw new Error('Please define a number entity.'); + } + this.config = { + icon_plus: "mdi:plus", + icon_minus: "mdi:minus", + service: c + ".set_value", + param: "value", + delay: 1000, + speed: 0, + initial: undefined, + moreinfo: config.entity, + ...config + }; + if(this.config.service.split('.').length < 2){ + this.config.service=c +'.'+this.config.service; + } +} + +set hass(hass) { + if (hass && this.config) { + this.stateObj = this.config.entity in hass.states ? hass.states[this.config.entity] : null; + } + this._hass = hass; + if(this.stateObj){ + this.state=this.stateObj.state; + if(this.config.state){this.state=this.stateObj.attributes[this.config.state];} + } +} + +shouldUpdate(changedProps) { + const o = this.old.t; + for(const p in o){if(p in this._hass.states && this._hass.states[p].last_updated != o[p]){ return true; }} + if( changedProps.has('config') || changedProps.has('stateObj') || changedProps.has('pending') ){ + if(this.old.state != this.state){ return true; } + } +} + +static getConfigElement() { + return document.createElement("numberbox-card-editor"); +} + +static getStubConfig() { + return {border: true}; +} + +} customElements.define('numberbox-card', NumberBox); + +//Editor +const fireEvent = (node, type, detail = {}, options = {}) => { + const event = new Event(type, { + bubbles: options.bubbles === undefined ? true : options.bubbles, + cancelable: Boolean(options.cancelable), + composed: options.composed === undefined ? true : options.composed, + }); + event.detail = detail; + node.dispatchEvent(event); + return event; +}; + +class NumberBoxEditor extends LitElement { + +async Pick(){ + const c="ha-entity-picker"; + if(!customElements.get(c)){ + const r = "partial-panel-resolver"; + await customElements.whenDefined(r); + const p = document.createElement(r); + p.hass = {panels: [{url_path: "tmp", component_name: "config"}]}; + p._updateRoutes(); + await p.routerOptions.routes.tmp.load(); + const d=document.createElement("ha-panel-config"); + await d.routerOptions.routes.automation.load(); + } + const a=document.createElement(c); + this.render(); +} +static get properties() { + return { hass: {}, config: {} }; +} + +static get styles() { + return css` +.side { + display:flex; + align-items:center; +} +.side > * { + flex:1; + padding-right:4px; +} +`; +} +get _border() { + if (this.config.border) { + return true; + } else { + return false; + } +} +setConfig(config) { + this.config = config; + this.Pick(); +} + +render() { + if (!this.hass){ return html``; } + return html` +
+ + + + +
+
+ + +
+
+ +
+
+ +
+ + +
+
+ + +
+
+ + +
+
Advanced Config more info
+
+ + + +
+
+ + +
+
+ + + +
+ +`; +} + + +updVal(v) { + if (!this.config || !this.hass) {return;} + const { target } = v; + if (this[`_${target.configValue}`] === target.value) { + return; + } + if (target.configValue) { + if (target.value === '') { + try{delete this.config[target.configValue];}catch(e){} + } else { + const reg = new RegExp(/^-?\d*\.?\d+$/); + if (target.value === 'false') { + target.value = false; + }else if(reg.test(target.value)){ + target.value=Number(target.value); + } + this.config = { + ...this.config, + [target.configValue]: target.checked !== undefined ? target.checked : target.value, + }; + } + } + fireEvent(this, 'config-changed', { config: this.config }); +} + +} +customElements.define("numberbox-card-editor", NumberBoxEditor); + +})(window.LitElement || Object.getPrototypeOf(customElements.get("hui-masonry-view") )); + +window.customCards = window.customCards || []; +window.customCards.push({ + type: 'numberbox-card', + name: 'Numberbox Card', + preview: false, + description: 'Replace number/input_number sliders with plus and minus buttons' +});